+
{subtitle && (
{subtitle}
@@ -58,7 +64,7 @@ export function AuthLayout({
{/* Content Card */}
{children}
diff --git a/apps/web/src/features/chat/store/chatStore.ts b/apps/web/src/features/chat/store/chatStore.ts
index bec7616e6..eb0011df5 100644
--- a/apps/web/src/features/chat/store/chatStore.ts
+++ b/apps/web/src/features/chat/store/chatStore.ts
@@ -96,7 +96,24 @@ export const useChatStore = create()(
}),
loadMessages: (conversationId, newMessages) =>
set((state) => {
- state.messages[conversationId] = newMessages;
+ const existing = state.messages[conversationId] || [];
+
+ // Create a Set of IDs from newMessages for efficient lookup
+ const newMessageIds = new Set(newMessages.map(m => m.id));
+
+ // Keep existing messages that are NOT in the new batch
+ // (these are likely real-time messages that arrived after fetch started)
+ const realtimeMessages = existing.filter(m => !newMessageIds.has(m.id));
+
+ // Merge: combine real-time messages with history
+ const merged = [...realtimeMessages, ...newMessages];
+
+ // Sort by created_at to maintain chronological order
+ merged.sort((a, b) =>
+ new Date(a.created_at).getTime() - new Date(b.created_at).getTime()
+ );
+
+ state.messages[conversationId] = merged;
}),
addReaction: (conversationId, messageId, userId, emoji) =>
set((state) => {
diff --git a/apps/web/src/features/chat/types/index.ts b/apps/web/src/features/chat/types/index.ts
index aa729d253..1ec80471d 100644
--- a/apps/web/src/features/chat/types/index.ts
+++ b/apps/web/src/features/chat/types/index.ts
@@ -49,7 +49,18 @@ export interface IncomingMessage {
is_typing?: boolean;
emoji?: string;
attachments?: MessageAttachment[];
- messages?: any[]; // For HistoryChunk
+ messages?: HistoryMessage[]; // For HistoryChunk
has_more_before?: boolean;
has_more_after?: boolean;
}
+
+export interface HistoryMessage {
+ id: string;
+ conversation_id: string;
+ sender_id: string;
+ sender_username: string;
+ content: string;
+ created_at: string;
+ reactions?: Record;
+ attachments?: MessageAttachment[];
+}
diff --git a/apps/web/src/features/library/pages/LibraryPage.tsx b/apps/web/src/features/library/pages/LibraryPage.tsx
index 7614010ad..6cf60524a 100644
--- a/apps/web/src/features/library/pages/LibraryPage.tsx
+++ b/apps/web/src/features/library/pages/LibraryPage.tsx
@@ -25,6 +25,10 @@ import {
Trash2,
CheckSquare,
X,
+ Grid3x3,
+ List,
+ Heart,
+ Clock,
} from 'lucide-react';
import { Input } from '@/components/ui/input';
import {
@@ -39,14 +43,6 @@ import {
DropdownMenuLabel,
} from '@/components/ui/dropdown-menu';
import { Select } from '@/components/ui/select';
-import {
- Table,
- TableBody,
- TableCell,
- TableHead,
- TableHeader,
- TableRow,
-} from '@/components/ui/table';
import { UploadModal } from '@/features/upload/components/UploadModal';
import { useToast } from '@/hooks/useToast';
import { Checkbox } from '@/components/ui/checkbox';
@@ -54,33 +50,34 @@ import { Pagination } from '@/components/navigation/Pagination';
import { ConfirmationDialog } from '@/components/ui/confirmation-dialog';
import { logger } from '@/utils/logger';
import { parseApiError } from '@/utils/apiErrorHandler';
-
-// FE-PAGE-002: Complete Library page implementation
+import { cn } from '@/lib/utils';
type SortField = 'created_at' | 'title' | 'popularity';
type SortOrder = 'asc' | 'desc';
+type ViewMode = 'grid' | 'list';
-export default function LibraryPage() {
+/**
+ * Library Page Premium - Version MVP avec UI moderne et professionnelle
+ * Grille de tracks avec design premium
+ */
+export default function LibraryPagePremium() {
const queryClient = useQueryClient();
const toast = useToast();
const [page, setPage] = useState(1);
const [limit] = useState(50);
const [isUploadModalOpen, setIsUploadModalOpen] = useState(false);
const [showDeleteConfirm, setShowDeleteConfirm] = useState(false);
+ const [viewMode, setViewMode] = useState('grid');
- // FE-PAGE-002: Filtering and sorting state
const [searchTerm, setSearchTerm] = useState('');
const [genreFilter, setGenreFilter] = useState('');
const [formatFilter, setFormatFilter] = useState('');
const [sortBy, setSortBy] = useState('created_at');
const [sortOrder, setSortOrder] = useState('desc');
- // FE-PAGE-002: Bulk operations state
const [selectedTracks, setSelectedTracks] = useState>(new Set());
const [isBulkMode, setIsBulkMode] = useState(false);
- // CRITIQUE FIX #48: Build query params avec recherche côté serveur
- // Utiliser la recherche backend si searchTerm est présent
const queryParams: GetTracksParams = {
page,
limit,
@@ -94,14 +91,10 @@ export default function LibraryPage() {
if (formatFilter) {
queryParams.format = formatFilter;
}
- // CRITIQUE FIX #48: Ajouter le paramètre de recherche au backend
if (searchTerm.trim()) {
queryParams.search = searchTerm.trim();
}
- // CRITIQUE FIX #24: Utiliser la recherche backend si disponible pour éviter le filtrage côté client
- // Note: Si le backend ne supporte pas la recherche, on devra faire le filtrage côté client
- // mais seulement sur la page actuelle, pas sur toutes les données
const {
data: tracksData,
isLoading: isTracksLoading,
@@ -115,23 +108,17 @@ export default function LibraryPage() {
const { data: playlistsData } = usePlaylists();
const addTrackToPlaylistMutation = useAddTrackToPlaylist();
- // CRITIQUE FIX #48: Utiliser directement les tracks du backend car la recherche est maintenant côté serveur
- // Le backend filtre et retourne les résultats paginés, donc pas besoin de filtrage côté client
const filteredTracks: Track[] = useMemo(() => {
if (!tracksData?.tracks) return [];
- // CRITIQUE FIX #48: Le backend gère maintenant la recherche, donc on utilise directement les résultats
return tracksData.tracks;
}, [tracksData?.tracks]);
- // CRITIQUE FIX #24: Réinitialiser à la page 1 lors d'un changement de recherche pour une meilleure UX
- // Utiliser useEffect pour réinitialiser la page quand searchTerm change
useEffect(() => {
if (searchTerm.trim() && page !== 1) {
setPage(1);
}
}, [searchTerm]);
- // FE-PAGE-002: Get unique genres and formats for filters
const genres = Array.from(
new Set(
tracksData?.tracks
@@ -163,11 +150,9 @@ export default function LibraryPage() {
const handleCloseUpload = () => {
setIsUploadModalOpen(false);
- // Refresh tracks after upload
queryClient.invalidateQueries({ queryKey: ['tracks'] });
};
- // FE-PAGE-002: Toggle track selection
const toggleTrackSelection = (trackId: string) => {
setSelectedTracks((prev) => {
const next = new Set(prev);
@@ -180,7 +165,6 @@ export default function LibraryPage() {
});
};
- // FE-PAGE-002: Select all / deselect all
const toggleSelectAll = () => {
if (selectedTracks.size === filteredTracks.length) {
setSelectedTracks(new Set());
@@ -189,7 +173,6 @@ export default function LibraryPage() {
}
};
- // CRITIQUE FIX #46: Bulk delete avec modal de confirmation au lieu de confirm()
const handleBulkDelete = async () => {
if (selectedTracks.size === 0) return;
setShowDeleteConfirm(true);
@@ -212,7 +195,6 @@ export default function LibraryPage() {
}
};
- // CRITIQUE FIX #56: Bulk update avec gestion d'erreur améliorée
const handleBulkUpdate = async (updates: { is_public?: boolean }) => {
if (selectedTracks.size === 0) return;
@@ -223,15 +205,12 @@ export default function LibraryPage() {
setIsBulkMode(false);
queryClient.invalidateQueries({ queryKey: ['tracks'] });
} catch (error: unknown) {
- // CRITIQUE FIX #56: Gestion d'erreur améliorée avec message détaillé
const apiError = parseApiError(error);
- const errorMessage = apiError.message;
- logger.error('Erreur lors de la mise à jour des pistes:', { error: errorMessage });
- toast.error(errorMessage);
+ logger.error('Erreur lors de la mise à jour des pistes:', { error: apiError.message });
+ toast.error(apiError.message);
}
};
- // FE-PAGE-002: Toggle sort order
const handleSort = (field: SortField) => {
if (sortBy === field) {
setSortOrder(sortOrder === 'asc' ? 'desc' : 'asc');
@@ -241,22 +220,29 @@ export default function LibraryPage() {
}
};
+ const formatDuration = (seconds: number) => {
+ const mins = Math.floor(seconds / 60);
+ const secs = seconds % 60;
+ return `${mins}:${secs.toString().padStart(2, '0')}`;
+ };
+
return (
-
-
+
+ {/* Header */}
+
-
Bibliothèque
-
- Gérez vos fichiers et documents
+
Bibliothèque
+
+ Gérez et organisez vos fichiers audio
-
+
{isBulkMode && selectedTracks.size > 0 && (
<>
-
+
+ setViewMode('grid')}
+ className={cn(
+ "p-2 transition-colors",
+ viewMode === 'grid'
+ ? "bg-kodo-cyan/20 text-kodo-cyan"
+ : "text-kodo-secondary hover:text-white"
+ )}
+ >
+
+
+ setViewMode('list')}
+ className={cn(
+ "p-2 transition-colors border-l border-white/10",
+ viewMode === 'list'
+ ? "bg-kodo-cyan/20 text-kodo-cyan"
+ : "text-kodo-secondary hover:text-white"
+ )}
+ >
+
+
+
+
- Upload Track
+ Upload
- {/* FE-PAGE-002: Filters and sorting */}
+ {/* Filters */}
-
+
-
+
-
+
-
-
+
)}
- {/* FE-COMP-006: Pagination component */}
+ {/* Pagination */}
{tracksData?.pagination && tracksData.pagination.total_pages > 1 && (
)}
- {/* CRITIQUE FIX #46: Modal de confirmation pour la suppression en masse */}
setShowDeleteConfirm(false)}
diff --git a/apps/web/src/features/library/pages/LibraryPage.tsx.old b/apps/web/src/features/library/pages/LibraryPage.tsx.old
new file mode 100644
index 000000000..7614010ad
--- /dev/null
+++ b/apps/web/src/features/library/pages/LibraryPage.tsx.old
@@ -0,0 +1,535 @@
+import { useState, useMemo, useEffect } from 'react';
+import { useQuery, useQueryClient } from '@tanstack/react-query';
+import {
+ usePlaylists,
+ useAddTrackToPlaylist,
+} from '@/features/playlists/hooks/usePlaylist';
+import {
+ getTracks,
+ batchDeleteTracks,
+ batchUpdateTracks,
+ type GetTracksParams,
+} from '@/features/tracks/api/trackApi';
+import type { Track } from '@/features/tracks/types/track';
+import { Button } from '@/components/ui/button';
+import { Card, CardContent } from '@/components/ui/card';
+import {
+ Upload,
+ Search,
+ Music,
+ MoreVertical,
+ Play,
+ Plus,
+ Filter,
+ ArrowUpDown,
+ Trash2,
+ CheckSquare,
+ X,
+} from 'lucide-react';
+import { Input } from '@/components/ui/input';
+import {
+ DropdownMenu,
+ DropdownMenuContent,
+ DropdownMenuItem,
+ DropdownMenuTrigger,
+ DropdownMenuSub,
+ DropdownMenuSubTrigger,
+ DropdownMenuSubContent,
+ DropdownMenuPortal,
+ DropdownMenuLabel,
+} from '@/components/ui/dropdown-menu';
+import { Select } from '@/components/ui/select';
+import {
+ Table,
+ TableBody,
+ TableCell,
+ TableHead,
+ TableHeader,
+ TableRow,
+} from '@/components/ui/table';
+import { UploadModal } from '@/features/upload/components/UploadModal';
+import { useToast } from '@/hooks/useToast';
+import { Checkbox } from '@/components/ui/checkbox';
+import { Pagination } from '@/components/navigation/Pagination';
+import { ConfirmationDialog } from '@/components/ui/confirmation-dialog';
+import { logger } from '@/utils/logger';
+import { parseApiError } from '@/utils/apiErrorHandler';
+
+// FE-PAGE-002: Complete Library page implementation
+
+type SortField = 'created_at' | 'title' | 'popularity';
+type SortOrder = 'asc' | 'desc';
+
+export default function LibraryPage() {
+ const queryClient = useQueryClient();
+ const toast = useToast();
+ const [page, setPage] = useState(1);
+ const [limit] = useState(50);
+ const [isUploadModalOpen, setIsUploadModalOpen] = useState(false);
+ const [showDeleteConfirm, setShowDeleteConfirm] = useState(false);
+
+ // FE-PAGE-002: Filtering and sorting state
+ const [searchTerm, setSearchTerm] = useState('');
+ const [genreFilter, setGenreFilter] = useState('');
+ const [formatFilter, setFormatFilter] = useState('');
+ const [sortBy, setSortBy] = useState('created_at');
+ const [sortOrder, setSortOrder] = useState('desc');
+
+ // FE-PAGE-002: Bulk operations state
+ const [selectedTracks, setSelectedTracks] = useState>(new Set());
+ const [isBulkMode, setIsBulkMode] = useState(false);
+
+ // CRITIQUE FIX #48: Build query params avec recherche côté serveur
+ // Utiliser la recherche backend si searchTerm est présent
+ const queryParams: GetTracksParams = {
+ page,
+ limit,
+ sortBy,
+ sortOrder,
+ };
+
+ if (genreFilter) {
+ queryParams.genre = genreFilter;
+ }
+ if (formatFilter) {
+ queryParams.format = formatFilter;
+ }
+ // CRITIQUE FIX #48: Ajouter le paramètre de recherche au backend
+ if (searchTerm.trim()) {
+ queryParams.search = searchTerm.trim();
+ }
+
+ // CRITIQUE FIX #24: Utiliser la recherche backend si disponible pour éviter le filtrage côté client
+ // Note: Si le backend ne supporte pas la recherche, on devra faire le filtrage côté client
+ // mais seulement sur la page actuelle, pas sur toutes les données
+ const {
+ data: tracksData,
+ isLoading: isTracksLoading,
+ isError: isTracksError,
+ error: tracksError,
+ } = useQuery({
+ queryKey: ['tracks', 'library', queryParams, searchTerm],
+ queryFn: () => getTracks(page, limit, queryParams),
+ });
+
+ const { data: playlistsData } = usePlaylists();
+ const addTrackToPlaylistMutation = useAddTrackToPlaylist();
+
+ // CRITIQUE FIX #48: Utiliser directement les tracks du backend car la recherche est maintenant côté serveur
+ // Le backend filtre et retourne les résultats paginés, donc pas besoin de filtrage côté client
+ const filteredTracks: Track[] = useMemo(() => {
+ if (!tracksData?.tracks) return [];
+ // CRITIQUE FIX #48: Le backend gère maintenant la recherche, donc on utilise directement les résultats
+ return tracksData.tracks;
+ }, [tracksData?.tracks]);
+
+ // CRITIQUE FIX #24: Réinitialiser à la page 1 lors d'un changement de recherche pour une meilleure UX
+ // Utiliser useEffect pour réinitialiser la page quand searchTerm change
+ useEffect(() => {
+ if (searchTerm.trim() && page !== 1) {
+ setPage(1);
+ }
+ }, [searchTerm]);
+
+ // FE-PAGE-002: Get unique genres and formats for filters
+ const genres = Array.from(
+ new Set(
+ tracksData?.tracks
+ .map((t) => t.genre)
+ .filter((g): g is string => !!g) || [],
+ ),
+ ).sort();
+ const formats = Array.from(
+ new Set(
+ tracksData?.tracks
+ .map((t) => t.format)
+ .filter((f): f is string => !!f) || [],
+ ),
+ ).sort();
+
+ const handleAddToPlaylist = async (playlistId: string, trackId: string) => {
+ try {
+ await addTrackToPlaylistMutation.mutateAsync({ playlistId, trackId });
+ toast.success('Piste ajoutée à la playlist');
+ } catch (error) {
+ logger.error('Failed to add track to playlist:', { error });
+ toast.error('Impossible d\'ajouter la piste à la playlist');
+ }
+ };
+
+ const handleOpenUpload = () => {
+ setIsUploadModalOpen(true);
+ };
+
+ const handleCloseUpload = () => {
+ setIsUploadModalOpen(false);
+ // Refresh tracks after upload
+ queryClient.invalidateQueries({ queryKey: ['tracks'] });
+ };
+
+ // FE-PAGE-002: Toggle track selection
+ const toggleTrackSelection = (trackId: string) => {
+ setSelectedTracks((prev) => {
+ const next = new Set(prev);
+ if (next.has(trackId)) {
+ next.delete(trackId);
+ } else {
+ next.add(trackId);
+ }
+ return next;
+ });
+ };
+
+ // FE-PAGE-002: Select all / deselect all
+ const toggleSelectAll = () => {
+ if (selectedTracks.size === filteredTracks.length) {
+ setSelectedTracks(new Set());
+ } else {
+ setSelectedTracks(new Set(filteredTracks.map((t) => t.id)));
+ }
+ };
+
+ // CRITIQUE FIX #46: Bulk delete avec modal de confirmation au lieu de confirm()
+ const handleBulkDelete = async () => {
+ if (selectedTracks.size === 0) return;
+ setShowDeleteConfirm(true);
+ };
+
+ const confirmBulkDelete = async () => {
+ if (selectedTracks.size === 0) return;
+
+ try {
+ await batchDeleteTracks(Array.from(selectedTracks));
+ toast.success(`${selectedTracks.size} piste(s) supprimée(s)`);
+ setSelectedTracks(new Set());
+ setIsBulkMode(false);
+ setShowDeleteConfirm(false);
+ queryClient.invalidateQueries({ queryKey: ['tracks'] });
+ } catch (error) {
+ logger.error('Failed to bulk delete tracks:', { error });
+ toast.error('Impossible de supprimer les pistes');
+ setShowDeleteConfirm(false);
+ }
+ };
+
+ // CRITIQUE FIX #56: Bulk update avec gestion d'erreur améliorée
+ const handleBulkUpdate = async (updates: { is_public?: boolean }) => {
+ if (selectedTracks.size === 0) return;
+
+ try {
+ await batchUpdateTracks(Array.from(selectedTracks), updates);
+ toast.success(`${selectedTracks.size} piste(s) mise(s) à jour`);
+ setSelectedTracks(new Set());
+ setIsBulkMode(false);
+ queryClient.invalidateQueries({ queryKey: ['tracks'] });
+ } catch (error: unknown) {
+ // CRITIQUE FIX #56: Gestion d'erreur améliorée avec message détaillé
+ const apiError = parseApiError(error);
+ const errorMessage = apiError.message;
+ logger.error('Erreur lors de la mise à jour des pistes:', { error: errorMessage });
+ toast.error(errorMessage);
+ }
+ };
+
+ // FE-PAGE-002: Toggle sort order
+ const handleSort = (field: SortField) => {
+ if (sortBy === field) {
+ setSortOrder(sortOrder === 'asc' ? 'desc' : 'asc');
+ } else {
+ setSortBy(field);
+ setSortOrder('desc');
+ }
+ };
+
+ return (
+
+
+
+
Bibliothèque
+
+ Gérez vos fichiers et documents
+
+
+
+ {isBulkMode && selectedTracks.size > 0 && (
+ <>
+
+
+ Supprimer ({selectedTracks.size})
+
+ handleBulkUpdate({ is_public: true })}
+ >
+ Rendre public ({selectedTracks.size})
+
+ handleBulkUpdate({ is_public: false })}
+ >
+ Rendre privé ({selectedTracks.size})
+
+ >
+ )}
+ {
+ setIsBulkMode(!isBulkMode);
+ setSelectedTracks(new Set());
+ }}
+ >
+ {isBulkMode ? (
+ <>
+
+ Annuler
+ >
+ ) : (
+ <>
+
+ Sélection multiple
+ >
+ )}
+
+
+
+ Upload Track
+
+
+
+
+ {/* FE-PAGE-002: Filters and sorting */}
+
+
+
+
+ setSearchTerm(e.target.value)}
+ className="pl-10"
+ />
+
+
+
+
+
+
+
+
+
Trier par:
+
+
+
+
+ {sortBy === 'created_at'
+ ? 'Date'
+ : sortBy === 'title'
+ ? 'Titre'
+ : 'Popularité'}
+ {sortOrder === 'asc' ? ' ↑' : ' ↓'}
+
+
+
+ Trier par
+ handleSort('created_at')}>
+ Date {sortBy === 'created_at' && (sortOrder === 'asc' ? '↑' : '↓')}
+
+ handleSort('title')}>
+ Titre {sortBy === 'title' && (sortOrder === 'asc' ? '↑' : '↓')}
+
+ handleSort('popularity')}>
+ Popularité {sortBy === 'popularity' && (sortOrder === 'asc' ? '↑' : '↓')}
+
+
+
+
+
+
+
+
+ {isTracksLoading ? (
+
Chargement...
+ ) : isTracksError ? (
+
+
+
+
Erreur lors du chargement des pistes
+
+ {tracksError instanceof Error
+ ? tracksError.message
+ : 'Une erreur est survenue'}
+
+
+
+
+ ) : (
+
+
+ {/* CRITIQUE FIX #40: Ajouter aria-label pour l'accessibilité */}
+
+
+
+ {isBulkMode && (
+
+ 0 &&
+ selectedTracks.size === filteredTracks.length
+ }
+ onCheckedChange={toggleSelectAll}
+ aria-label="Sélectionner toutes les pistes"
+ />
+
+ )}
+ #
+ Titre
+ Artiste
+ Durée
+
+
+
+
+ {filteredTracks.map((track: Track, index: number) => (
+
+ {isBulkMode && (
+
+ toggleTrackSelection(track.id)}
+ />
+
+ )}
+ {index + 1}
+
+
+
+ {track.artist}
+
+ {Math.floor(track.duration / 60)}:
+ {(track.duration % 60).toString().padStart(2, '0')}
+
+
+
+
+
+
+
+
+
+
+
+
+ Ajouter à une playlist
+
+
+
+ {playlistsData?.playlists.map((playlist) => (
+
+ handleAddToPlaylist(playlist.id, track.id)
+ }
+ >
+ {playlist.title}
+
+ ))}
+ {(!playlistsData?.playlists ||
+ playlistsData.playlists.length === 0) && (
+
+ Aucune playlist
+
+ )}
+
+
+
+
+
+
+
+ ))}
+ {filteredTracks.length === 0 && (
+
+
+
+
+
+ )}
+
+
+
+
+ )}
+
+ {/* FE-COMP-006: Pagination component */}
+ {tracksData?.pagination && tracksData.pagination.total_pages > 1 && (
+
+ )}
+
+
+
+ {/* CRITIQUE FIX #46: Modal de confirmation pour la suppression en masse */}
+
setShowDeleteConfirm(false)}
+ onConfirm={confirmBulkDelete}
+ title="Supprimer les pistes"
+ description={`Êtes-vous sûr de vouloir supprimer ${selectedTracks.size} piste(s) ? Cette action est irréversible.`}
+ confirmLabel="Supprimer"
+ variant="destructive"
+ />
+
+ );
+}
diff --git a/apps/web/src/features/library/pages/LibraryPagePremium.tsx b/apps/web/src/features/library/pages/LibraryPagePremium.tsx
new file mode 100644
index 000000000..6cf60524a
--- /dev/null
+++ b/apps/web/src/features/library/pages/LibraryPagePremium.tsx
@@ -0,0 +1,593 @@
+import { useState, useMemo, useEffect } from 'react';
+import { useQuery, useQueryClient } from '@tanstack/react-query';
+import {
+ usePlaylists,
+ useAddTrackToPlaylist,
+} from '@/features/playlists/hooks/usePlaylist';
+import {
+ getTracks,
+ batchDeleteTracks,
+ batchUpdateTracks,
+ type GetTracksParams,
+} from '@/features/tracks/api/trackApi';
+import type { Track } from '@/features/tracks/types/track';
+import { Button } from '@/components/ui/button';
+import { Card, CardContent } from '@/components/ui/card';
+import {
+ Upload,
+ Search,
+ Music,
+ MoreVertical,
+ Play,
+ Plus,
+ Filter,
+ ArrowUpDown,
+ Trash2,
+ CheckSquare,
+ X,
+ Grid3x3,
+ List,
+ Heart,
+ Clock,
+} from 'lucide-react';
+import { Input } from '@/components/ui/input';
+import {
+ DropdownMenu,
+ DropdownMenuContent,
+ DropdownMenuItem,
+ DropdownMenuTrigger,
+ DropdownMenuSub,
+ DropdownMenuSubTrigger,
+ DropdownMenuSubContent,
+ DropdownMenuPortal,
+ DropdownMenuLabel,
+} from '@/components/ui/dropdown-menu';
+import { Select } from '@/components/ui/select';
+import { UploadModal } from '@/features/upload/components/UploadModal';
+import { useToast } from '@/hooks/useToast';
+import { Checkbox } from '@/components/ui/checkbox';
+import { Pagination } from '@/components/navigation/Pagination';
+import { ConfirmationDialog } from '@/components/ui/confirmation-dialog';
+import { logger } from '@/utils/logger';
+import { parseApiError } from '@/utils/apiErrorHandler';
+import { cn } from '@/lib/utils';
+
+type SortField = 'created_at' | 'title' | 'popularity';
+type SortOrder = 'asc' | 'desc';
+type ViewMode = 'grid' | 'list';
+
+/**
+ * Library Page Premium - Version MVP avec UI moderne et professionnelle
+ * Grille de tracks avec design premium
+ */
+export default function LibraryPagePremium() {
+ const queryClient = useQueryClient();
+ const toast = useToast();
+ const [page, setPage] = useState(1);
+ const [limit] = useState(50);
+ const [isUploadModalOpen, setIsUploadModalOpen] = useState(false);
+ const [showDeleteConfirm, setShowDeleteConfirm] = useState(false);
+ const [viewMode, setViewMode] = useState('grid');
+
+ const [searchTerm, setSearchTerm] = useState('');
+ const [genreFilter, setGenreFilter] = useState('');
+ const [formatFilter, setFormatFilter] = useState('');
+ const [sortBy, setSortBy] = useState('created_at');
+ const [sortOrder, setSortOrder] = useState('desc');
+
+ const [selectedTracks, setSelectedTracks] = useState>(new Set());
+ const [isBulkMode, setIsBulkMode] = useState(false);
+
+ const queryParams: GetTracksParams = {
+ page,
+ limit,
+ sortBy,
+ sortOrder,
+ };
+
+ if (genreFilter) {
+ queryParams.genre = genreFilter;
+ }
+ if (formatFilter) {
+ queryParams.format = formatFilter;
+ }
+ if (searchTerm.trim()) {
+ queryParams.search = searchTerm.trim();
+ }
+
+ const {
+ data: tracksData,
+ isLoading: isTracksLoading,
+ isError: isTracksError,
+ error: tracksError,
+ } = useQuery({
+ queryKey: ['tracks', 'library', queryParams, searchTerm],
+ queryFn: () => getTracks(page, limit, queryParams),
+ });
+
+ const { data: playlistsData } = usePlaylists();
+ const addTrackToPlaylistMutation = useAddTrackToPlaylist();
+
+ const filteredTracks: Track[] = useMemo(() => {
+ if (!tracksData?.tracks) return [];
+ return tracksData.tracks;
+ }, [tracksData?.tracks]);
+
+ useEffect(() => {
+ if (searchTerm.trim() && page !== 1) {
+ setPage(1);
+ }
+ }, [searchTerm]);
+
+ const genres = Array.from(
+ new Set(
+ tracksData?.tracks
+ .map((t) => t.genre)
+ .filter((g): g is string => !!g) || [],
+ ),
+ ).sort();
+ const formats = Array.from(
+ new Set(
+ tracksData?.tracks
+ .map((t) => t.format)
+ .filter((f): f is string => !!f) || [],
+ ),
+ ).sort();
+
+ const handleAddToPlaylist = async (playlistId: string, trackId: string) => {
+ try {
+ await addTrackToPlaylistMutation.mutateAsync({ playlistId, trackId });
+ toast.success('Piste ajoutée à la playlist');
+ } catch (error) {
+ logger.error('Failed to add track to playlist:', { error });
+ toast.error('Impossible d\'ajouter la piste à la playlist');
+ }
+ };
+
+ const handleOpenUpload = () => {
+ setIsUploadModalOpen(true);
+ };
+
+ const handleCloseUpload = () => {
+ setIsUploadModalOpen(false);
+ queryClient.invalidateQueries({ queryKey: ['tracks'] });
+ };
+
+ const toggleTrackSelection = (trackId: string) => {
+ setSelectedTracks((prev) => {
+ const next = new Set(prev);
+ if (next.has(trackId)) {
+ next.delete(trackId);
+ } else {
+ next.add(trackId);
+ }
+ return next;
+ });
+ };
+
+ const toggleSelectAll = () => {
+ if (selectedTracks.size === filteredTracks.length) {
+ setSelectedTracks(new Set());
+ } else {
+ setSelectedTracks(new Set(filteredTracks.map((t) => t.id)));
+ }
+ };
+
+ const handleBulkDelete = async () => {
+ if (selectedTracks.size === 0) return;
+ setShowDeleteConfirm(true);
+ };
+
+ const confirmBulkDelete = async () => {
+ if (selectedTracks.size === 0) return;
+
+ try {
+ await batchDeleteTracks(Array.from(selectedTracks));
+ toast.success(`${selectedTracks.size} piste(s) supprimée(s)`);
+ setSelectedTracks(new Set());
+ setIsBulkMode(false);
+ setShowDeleteConfirm(false);
+ queryClient.invalidateQueries({ queryKey: ['tracks'] });
+ } catch (error) {
+ logger.error('Failed to bulk delete tracks:', { error });
+ toast.error('Impossible de supprimer les pistes');
+ setShowDeleteConfirm(false);
+ }
+ };
+
+ const handleBulkUpdate = async (updates: { is_public?: boolean }) => {
+ if (selectedTracks.size === 0) return;
+
+ try {
+ await batchUpdateTracks(Array.from(selectedTracks), updates);
+ toast.success(`${selectedTracks.size} piste(s) mise(s) à jour`);
+ setSelectedTracks(new Set());
+ setIsBulkMode(false);
+ queryClient.invalidateQueries({ queryKey: ['tracks'] });
+ } catch (error: unknown) {
+ const apiError = parseApiError(error);
+ logger.error('Erreur lors de la mise à jour des pistes:', { error: apiError.message });
+ toast.error(apiError.message);
+ }
+ };
+
+ const handleSort = (field: SortField) => {
+ if (sortBy === field) {
+ setSortOrder(sortOrder === 'asc' ? 'desc' : 'asc');
+ } else {
+ setSortBy(field);
+ setSortOrder('desc');
+ }
+ };
+
+ const formatDuration = (seconds: number) => {
+ const mins = Math.floor(seconds / 60);
+ const secs = seconds % 60;
+ return `${mins}:${secs.toString().padStart(2, '0')}`;
+ };
+
+ return (
+
+ {/* Header */}
+
+
+
Bibliothèque
+
+ Gérez et organisez vos fichiers audio
+
+
+
+ {isBulkMode && selectedTracks.size > 0 && (
+ <>
+
+
+ Supprimer ({selectedTracks.size})
+
+
handleBulkUpdate({ is_public: true })}
+ size="sm"
+ >
+ Public ({selectedTracks.size})
+
+
handleBulkUpdate({ is_public: false })}
+ size="sm"
+ >
+ Privé ({selectedTracks.size})
+
+ >
+ )}
+
{
+ setIsBulkMode(!isBulkMode);
+ setSelectedTracks(new Set());
+ }}
+ size="sm"
+ >
+ {isBulkMode ? (
+ <>
+
+ Annuler
+ >
+ ) : (
+ <>
+
+ Sélection
+ >
+ )}
+
+
+ setViewMode('grid')}
+ className={cn(
+ "p-2 transition-colors",
+ viewMode === 'grid'
+ ? "bg-kodo-cyan/20 text-kodo-cyan"
+ : "text-kodo-secondary hover:text-white"
+ )}
+ >
+
+
+ setViewMode('list')}
+ className={cn(
+ "p-2 transition-colors border-l border-white/10",
+ viewMode === 'list'
+ ? "bg-kodo-cyan/20 text-kodo-cyan"
+ : "text-kodo-secondary hover:text-white"
+ )}
+ >
+
+
+
+
+
+ Upload
+
+
+
+
+ {/* Filters */}
+
+
+
+
+ setSearchTerm(e.target.value)}
+ className="pl-10"
+ />
+
+
+
+
+
+
+
+
+
+ {/* Tracks Display */}
+ {isTracksLoading ? (
+
+ {Array(8).fill(0).map((_, i) => (
+
+
+
+
+
+
+
+ ))}
+
+ ) : isTracksError ? (
+
+
+
+
Erreur lors du chargement des pistes
+
+ {tracksError instanceof Error
+ ? tracksError.message
+ : 'Une erreur est survenue'}
+
+
+
+
+ ) : viewMode === 'grid' ? (
+
+ {filteredTracks.map((track) => (
+
isBulkMode && toggleTrackSelection(track.id)}
+ >
+
+
+ {isBulkMode && (
+
+ toggleTrackSelection(track.id)}
+ onClick={(e) => e.stopPropagation()}
+ />
+
+ )}
+
+
{
+ e.stopPropagation();
+ // TODO: Play track
+ }}
+ >
+
+
+
+
+ {formatDuration(track.duration)}
+
+
+
+
+ {track.title}
+
+
+ {track.artist || 'Artiste inconnu'}
+
+
+
+
+ {new Date(track.created_at).toLocaleDateString('fr-FR')}
+
+ {track.genre && (
+
+ {track.genre}
+
+ )}
+
+
+
+
+ ))}
+ {filteredTracks.length === 0 && (
+
+
+
+
+ Aucun titre trouvé
+
+ {searchTerm ? 'Essayez avec d\'autres termes de recherche' : 'Commencez par uploader votre premier track'}
+
+ {!searchTerm && (
+
+
+ Upload Track
+
+ )}
+
+
+
+ )}
+
+ ) : (
+
+
+
+ {filteredTracks.map((track, index) => (
+
isBulkMode && toggleTrackSelection(track.id)}
+ >
+ {isBulkMode && (
+
toggleTrackSelection(track.id)}
+ onClick={(e) => e.stopPropagation()}
+ />
+ )}
+
+ {index + 1}
+
+
+
+ {track.title}
+
+
+ {track.artist || 'Artiste inconnu'}
+
+
+
+ {track.genre && (
+
+ {track.genre}
+
+ )}
+
+
+ {formatDuration(track.duration)}
+
+
+
+ e.stopPropagation()}>
+
+
+
+
+
+
+
+
+ Ajouter à une playlist
+
+
+
+ {playlistsData?.playlists.map((playlist) => (
+ handleAddToPlaylist(playlist.id, track.id)}
+ >
+ {playlist.title}
+
+ ))}
+
+
+
+
+
+
+ ))}
+
+
+
+ )}
+
+ {/* Pagination */}
+ {tracksData?.pagination && tracksData.pagination.total_pages > 1 && (
+
+ )}
+
+
+
+
setShowDeleteConfirm(false)}
+ onConfirm={confirmBulkDelete}
+ title="Supprimer les pistes"
+ description={`Êtes-vous sûr de vouloir supprimer ${selectedTracks.size} piste(s) ? Cette action est irréversible.`}
+ confirmLabel="Supprimer"
+ variant="destructive"
+ />
+
+ );
+}
diff --git a/apps/web/src/index.css b/apps/web/src/index.css
index 026c985ad..ae3dd753b 100644
--- a/apps/web/src/index.css
+++ b/apps/web/src/index.css
@@ -1,4 +1,5 @@
@import 'tailwindcss';
+@import './styles/design-tokens.css';
/* === SMOOTH THEME TRANSITIONS === */
* {
@@ -131,16 +132,52 @@
}
/* Base styles - Kodo dark theme by default */
-body {
+:root {
+ color-scheme: dark;
+}
+
+html {
background-color: rgb(var(--kodo-void));
- color: rgb(var(--kodo-text-main));
- font-family: 'Inter', sans-serif;
+}
+
+body {
+ background-color: rgb(var(--kodo-void)) !important;
+ color: rgb(var(--kodo-text-main)) !important;
+ font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
transition: background-color 0.5s cubic-bezier(0.4, 0, 0.2, 1);
+ -webkit-font-smoothing: antialiased;
+ -moz-osx-font-smoothing: grayscale;
+ text-rendering: optimizeLegibility;
+}
+
+/* Smooth scrolling */
+html {
+ scroll-behavior: smooth;
+}
+
+/* Custom scrollbar */
+::-webkit-scrollbar {
+ width: 8px;
+ height: 8px;
+}
+
+::-webkit-scrollbar-track {
+ background: rgb(var(--kodo-void));
+}
+
+::-webkit-scrollbar-thumb {
+ background: rgb(var(--kodo-steel));
+ border-radius: 4px;
+}
+
+::-webkit-scrollbar-thumb:hover {
+ background: rgb(var(--kodo-cyan));
}
/* === LIGHT MODE === */
-.light,
-[data-theme="light"] {
+/* Note: Light mode désactivé par défaut - utiliser uniquement si explicitement activé */
+html:not(.dark):not([data-theme="dark"]) .light,
+html:not(.dark):not([data-theme="dark"]) [data-theme="light"] {
/* Light backgrounds */
--kodo-void: 250 250 252;
/* #FAFAFC Almost white */
diff --git a/apps/web/src/pages/DashboardPage.tsx b/apps/web/src/pages/DashboardPage.tsx
index 5707a1444..b14ad768a 100644
--- a/apps/web/src/pages/DashboardPage.tsx
+++ b/apps/web/src/pages/DashboardPage.tsx
@@ -3,30 +3,29 @@ import { useNavigate } from 'react-router-dom';
import { useAuthStore } from '@/features/auth/store/authStore';
import { useLibraryItems, useLibraryActions, useLibraryStatus } from '@/utils/storeSelectors';
import { useDashboard } from '@/features/dashboard/hooks/useDashboard';
-import { Button } from '@veza/design-system';
-import { Music, MessageSquare, Users, Heart, Library, Upload, Plus, Globe } from 'lucide-react';
+import { Button } from '@/components/ui/button';
+import { Card, CardContent, CardHeader, CardTitle } from '@/components/ui/card';
+import { Music, MessageSquare, Users, Heart, Library, Upload, Plus, TrendingUp, Activity, Clock } from 'lucide-react';
import { formatDistanceToNow } from 'date-fns';
import { fr } from 'date-fns/locale';
import { KodoEmptyState } from '@/components/ui/KodoEmptyState';
import { cn } from '@/lib/utils';
/**
- * Page principale du dashboard avec statistiques et aperçu de l'activité.
- * FE-PAGE-001: Complete Dashboard page implementation
- * MIGRATED: Now using Kōdō Design System
+ * Dashboard Premium - Version MVP avec UI moderne et professionnelle
+ * Intégration complète avec backend Go uniquement
*/
export function DashboardPage() {
- // FE-STATE-009: Use selector that returns denormalized array
const { addTrack, fetchItems } = useLibraryActions();
const { isLoading: isLoadingLibrary } = useLibraryStatus();
const { stats, recentActivity, isLoading: isLoadingDashboard } = useDashboard();
const navigate = useNavigate();
+ const { user } = useAuthStore();
useEffect(() => {
fetchItems({ limit: 5 });
}, [fetchItems]);
- // FE-PAGE-001: Format stats with real data
const formatNumber = (num: number): string => {
if (num >= 1000000) {
return `${(num / 1000000).toFixed(1)}M`;
@@ -44,6 +43,7 @@ export function DashboardPage() {
change: stats?.tracks_played_change || '+0%',
icon: Music,
color: 'text-kodo-cyan',
+ bgGradient: 'from-kodo-cyan/10 to-kodo-cyan/5',
},
{
title: 'Messages envoyés',
@@ -51,6 +51,7 @@ export function DashboardPage() {
change: stats?.messages_sent_change || '+0%',
icon: MessageSquare,
color: 'text-kodo-lime',
+ bgGradient: 'from-kodo-lime/10 to-kodo-lime/5',
},
{
title: 'Favoris',
@@ -58,6 +59,7 @@ export function DashboardPage() {
change: stats?.favorites_change || '+0%',
icon: Heart,
color: 'text-kodo-magenta',
+ bgGradient: 'from-kodo-magenta/10 to-kodo-magenta/5',
},
{
title: 'Amis actifs',
@@ -65,32 +67,10 @@ export function DashboardPage() {
change: stats?.active_friends_change || '+0%',
icon: Users,
color: 'text-kodo-gold',
+ bgGradient: 'from-kodo-gold/10 to-kodo-gold/5',
},
];
- // FE-PAGE-001: Get activity icon color based on type
- const getActivityColor = (type: string) => {
- switch (type) {
- case 'track_upload':
- return 'bg-kodo-cyan';
- case 'message_received':
- return 'bg-kodo-lime';
- case 'favorite_added':
- return 'bg-kodo-magenta';
- case 'playlist_created':
- return 'bg-kodo-gold';
- case 'comment_added':
- return 'bg-kodo-orange';
- case 'post':
- return 'bg-kodo-magenta'; // Use magenta or primary
-
- default:
- return 'bg-kodo-steel';
- }
- };
-
- // CRITIQUE FIX #55: Format timestamp to relative time avec memoization des résultats
- // Memoizer les timestamps formatés pour éviter les recalculs inutiles
const formattedTimestamps = useMemo(() => {
const cache: Record = {};
return recentActivity.reduce((acc, activity) => {
@@ -114,220 +94,221 @@ export function DashboardPage() {
};
return (
-
- {/* HUD Header Section */}
-
-
-
- Sector
- COMMAND_CORE_ALPHA
-
-
- Command Center
+
+ {/* Header Section */}
+
+
+
+ Bienvenue, {user?.username || 'Utilisateur'}
-
-
- SYSTEM_STABLE // NO_THREAT_DETECTED // {new Date().toLocaleDateString()}
+
+ Voici un aperçu de votre activité sur Veza
navigate('/library?action=upload')}
+ onClick={() => navigate('/library')}
+ className="hidden sm:flex"
>
-
- DEPLOY_DATA_PACK
+
+ Bibliothèque
+
+
navigate('/library?action=upload')}
+ className="shadow-glow-cyan"
+ >
+
+ Upload Track
- {/* Primary HUD Stats Grid */}
+ {/* Stats Grid */}
{dashboardStats.map((stat, i) => (
-
-
-
-
-
+
+
+
+
+
+
+
+ {stat.change}
+
-
- {stat.change}
-
-
-
{stat.title.replace(' ', '_').toUpperCase()}
-
{stat.value}
-
-
+
+
+ {stat.title}
+
+
+ {stat.value}
+
+
+
+
))}
- {/* Activity HUD */}
-
-
- {/* Scanner line effect */}
-
-
-
-
-
-
Timeline_Analysis
+ {/* Activity Feed */}
+
+ {/* Chart Card */}
+
+
+
+
+
+ Activité récente
+
+
+
+ 7J
+
+
+ 30J
+
+
+ MAX
+
+
-
- 7D
- 30D
- MAX
-
-
-
-
-
+
+
+
{[40, 65, 35, 90, 55, 75, 45, 85, 60, 70, 50, 95].map((h, i) => (
-
+
+
-
-
UPLINK_FREQ: 440Hz
-
PARSING_ENGINE: OPTIMIZED
-
-
-
- {/* Recent Activity HUD */}
-
-
-
-
Live_Feed_Direct
- Stream_All
-
-
-
- {isLoadingDashboard ? (
- Array(3).fill(0).map((_, i) => (
-
- ))
- ) : recentActivity.length > 0 ? (
- recentActivity.slice(0, 4).map((act, i) => (
-
-
-
- {act.title[0]}
-
-
-
- {act.title}
+ {/* Recent Activity List */}
+
+
+
+
+ Dernières activités
+
+
+
+
+ {isLoadingDashboard ? (
+ Array(3).fill(0).map((_, i) => (
+
+ ))
+ ) : recentActivity.length > 0 ? (
+ recentActivity.slice(0, 5).map((act, i) => (
+
+
+
+
-
{act.description || 'System Interaction'}
+
+
+ {act.title}
+
+
+ {act.description || 'Activité système'}
+
+
+
+
+ {formatTimestamp(act.timestamp)}
-
{formatTimestamp(act.timestamp)}
-
- ))
- ) : (
-
- )}
-
-
+ ))
+ ) : (
+
+ )}
+
+
+
- {/* Sidebar Panel HUD */}
-
- {/* System Integrity Panel */}
-
-
-
Security_Level_Alpha
-
-
-
-
- KERNEL_SHIELD
- REINFORCED
-
-
-
-
-
-
-
-
- navigate('/settings')} className="w-full py-3 rounded-2xl bg-white/5 border border-white/10 text-hud hover:bg-kodo-cyan hover:text-kodo-void hover:border-kodo-cyan transition-all font-black text-center">
- CONFIGURE_SYSTEM_PARAMS
-
-
-
-
- {/* Quick Access Matrix */}
-
-
Fast_Matrix_Access
-
+ {/* Sidebar */}
+
+ {/* Quick Actions */}
+
+
+ Actions rapides
+
+
{[
- { label: 'UPLINK', icon: , action: () => navigate('/library?action=upload') },
- { label: 'MATRIX', icon: , action: () => navigate('/marketplace') },
- { label: 'STORAGE', icon: , action: () => navigate('/library') },
- { label: 'COMS', icon: , action: () => navigate('/chat') }
- ].map((op, i) => (
- navigate('/library?action=upload'), variant: 'default' as const },
+ { label: 'Bibliothèque', icon: Library, action: () => navigate('/library'), variant: 'outline' as const },
+ { label: 'Messages', icon: MessageSquare, action: () => navigate('/chat'), variant: 'outline' as const },
+ ].map((action, i) => (
+
-
- {op.icon}
-
- {op.label}
-
+
+ {action.label}
+
))}
-
-
+
+
- {/* Mobile Uplink Invite */}
-
-
-
-
-
-
+ {/* System Status */}
+
+
+ Statut système
+
+
+
+
+
Backend API
+
+
+ En ligne
+
+
+
- VEZA_OS_MOBILE
- Initiate remote uplink protocol to access core systems on the move.
-
- ESTABLISH_CONNECTION
-
+
+ navigate('/settings')}
+ >
+ Paramètres système
+
-
-
+
+
diff --git a/apps/web/src/services/api/auth.ts b/apps/web/src/services/api/auth.ts
index d23ba196f..933b191e5 100644
--- a/apps/web/src/services/api/auth.ts
+++ b/apps/web/src/services/api/auth.ts
@@ -62,7 +62,7 @@ export async function register(
const response = await apiClient.post
('/auth/register', {
email: data.email,
password: data.password,
- password_confirm: data.password_confirm,
+ password_confirmation: data.password_confirm, // Backend expects password_confirmation
username: data.username,
});
diff --git a/apps/web/src/services/api/client.ts b/apps/web/src/services/api/client.ts
index adcfb12cd..8e58230f6 100644
--- a/apps/web/src/services/api/client.ts
+++ b/apps/web/src/services/api/client.ts
@@ -1004,8 +1004,14 @@ apiClient.interceptors.response.use(
}
// Use a fixed ID for network errors to prevent stacking
- toast.error(errorMessage, {
- duration: 5000,
+ // For network errors, show a more helpful message with suggestions
+ let enhancedMessage = errorMessage;
+ if (isNetworkError) {
+ enhancedMessage = `${errorMessage} 💡 Vérifiez votre connexion internet. Si le problème persiste, le serveur pourrait être temporairement indisponible.`;
+ }
+
+ toast.error(enhancedMessage, {
+ duration: 8000, // Longer duration for network errors to read suggestions
id: toastId, // Use fixed ID if it's a network error
});
}
diff --git a/apps/web/src/stores/ui.ts b/apps/web/src/stores/ui.ts
index cd631034e..27ee1b8a6 100644
--- a/apps/web/src/stores/ui.ts
+++ b/apps/web/src/stores/ui.ts
@@ -24,8 +24,8 @@ export const useUIStore = create()(
persist(
broadcastSync(
(set) => ({
- // État initial
- theme: 'system',
+ // État initial - Dark mode par défaut pour MVP Premium
+ theme: 'dark',
language: 'en',
sidebarOpen: true,
notifications: [],
diff --git a/apps/web/src/styles/design-tokens.css b/apps/web/src/styles/design-tokens.css
new file mode 100644
index 000000000..82201c75f
--- /dev/null
+++ b/apps/web/src/styles/design-tokens.css
@@ -0,0 +1,223 @@
+/* ============================================
+ DESIGN TOKENS - SaaS Premium Design System
+ ============================================ */
+
+@theme {
+ /* === SPACING SCALE (4px base) === */
+ --spacing-0: 0;
+ --spacing-1: 0.25rem; /* 4px */
+ --spacing-2: 0.5rem; /* 8px */
+ --spacing-3: 0.75rem; /* 12px */
+ --spacing-4: 1rem; /* 16px */
+ --spacing-5: 1.25rem; /* 20px */
+ --spacing-6: 1.5rem; /* 24px */
+ --spacing-8: 2rem; /* 32px */
+ --spacing-10: 2.5rem; /* 40px */
+ --spacing-12: 3rem; /* 48px */
+ --spacing-16: 4rem; /* 64px */
+ --spacing-20: 5rem; /* 80px */
+ --spacing-24: 6rem; /* 96px */
+
+ /* === TYPOGRAPHY SCALE === */
+ --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
+ --font-mono: 'JetBrains Mono', 'Fira Code', 'Consolas', monospace;
+
+ /* Font Sizes */
+ --text-xs: 0.75rem; /* 12px */
+ --text-sm: 0.875rem; /* 14px */
+ --text-base: 1rem; /* 16px */
+ --text-lg: 1.125rem; /* 18px */
+ --text-xl: 1.25rem; /* 20px */
+ --text-2xl: 1.5rem; /* 24px */
+ --text-3xl: 1.875rem; /* 30px */
+ --text-4xl: 2.25rem; /* 36px */
+ --text-5xl: 3rem; /* 48px */
+
+ /* Font Weights */
+ --font-normal: 400;
+ --font-medium: 500;
+ --font-semibold: 600;
+ --font-bold: 700;
+
+ /* Line Heights */
+ --leading-tight: 1.25;
+ --leading-normal: 1.5;
+ --leading-relaxed: 1.75;
+
+ /* === BORDER RADIUS === */
+ --radius-sm: 0.375rem; /* 6px */
+ --radius-md: 0.5rem; /* 8px */
+ --radius-lg: 0.75rem; /* 12px */
+ --radius-xl: 1rem; /* 16px */
+ --radius-2xl: 1.5rem; /* 24px */
+ --radius-full: 9999px;
+
+ /* === SHADOWS === */
+ --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
+ --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
+ --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
+ --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
+ --shadow-2xl: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
+
+ /* Premium Glow Effects */
+ --shadow-glow-cyan: 0 0 20px rgba(102, 252, 241, 0.3);
+ --shadow-glow-cyan-lg: 0 0 40px rgba(102, 252, 241, 0.4);
+ --shadow-glow-magenta: 0 0 20px rgba(138, 126, 164, 0.3);
+
+ /* === TRANSITIONS === */
+ --transition-fast: 150ms cubic-bezier(0.4, 0, 0.2, 1);
+ --transition-base: 200ms cubic-bezier(0.4, 0, 0.2, 1);
+ --transition-slow: 300ms cubic-bezier(0.4, 0, 0.2, 1);
+ --transition-slower: 500ms cubic-bezier(0.4, 0, 0.2, 1);
+
+ /* === GLASSMORPHISM === */
+ --glass-bg: rgba(255, 255, 255, 0.05);
+ --glass-border: rgba(255, 255, 255, 0.1);
+ --glass-blur: blur(12px);
+ --glass-bg-hover: rgba(255, 255, 255, 0.08);
+ --glass-border-hover: rgba(255, 255, 255, 0.15);
+
+ /* === Z-INDEX SCALE === */
+ --z-base: 0;
+ --z-dropdown: 1000;
+ --z-sticky: 1020;
+ --z-fixed: 1030;
+ --z-modal-backdrop: 1040;
+ --z-modal: 1050;
+ --z-popover: 1060;
+ --z-tooltip: 1070;
+ --z-notification: 1080;
+}
+
+/* === UTILITY CLASSES === */
+
+/* Glassmorphism */
+.glass {
+ background: var(--glass-bg);
+ border: 1px solid var(--glass-border);
+ backdrop-filter: var(--glass-blur);
+ -webkit-backdrop-filter: var(--glass-blur);
+}
+
+.glass-hover:hover {
+ background: var(--glass-bg-hover);
+ border-color: var(--glass-border-hover);
+}
+
+/* Smooth Animations */
+.animate-fade-in {
+ animation: fadeIn 0.3s ease-in-out;
+}
+
+.animate-slide-up {
+ animation: slideUp 0.3s ease-out;
+}
+
+.animate-scale-in {
+ animation: scaleIn 0.2s ease-out;
+}
+
+@keyframes fadeIn {
+ from {
+ opacity: 0;
+ }
+ to {
+ opacity: 1;
+ }
+}
+
+@keyframes slideUp {
+ from {
+ opacity: 0;
+ transform: translateY(10px);
+ }
+ to {
+ opacity: 1;
+ transform: translateY(0);
+ }
+}
+
+@keyframes scaleIn {
+ from {
+ opacity: 0;
+ transform: scale(0.95);
+ }
+ to {
+ opacity: 1;
+ transform: scale(1);
+ }
+}
+
+/* Hover Effects */
+.hover-lift {
+ transition: transform var(--transition-base), box-shadow var(--transition-base);
+}
+
+.hover-lift:hover {
+ transform: translateY(-2px);
+ box-shadow: var(--shadow-lg);
+}
+
+/* Premium Glow Effects */
+.glow-cyan {
+ box-shadow: 0 0 20px rgba(102, 252, 241, 0.3), 0 0 40px rgba(102, 252, 241, 0.1);
+}
+
+.glow-cyan-lg {
+ box-shadow: 0 0 30px rgba(102, 252, 241, 0.5), 0 0 60px rgba(102, 252, 241, 0.2);
+}
+
+/* Smooth Scroll */
+.smooth-scroll {
+ scroll-behavior: smooth;
+ -webkit-overflow-scrolling: touch;
+}
+
+/* Loading States */
+@keyframes shimmer {
+ 0% {
+ background-position: -1000px 0;
+ }
+ 100% {
+ background-position: 1000px 0;
+ }
+}
+
+.shimmer {
+ animation: shimmer 2s infinite linear;
+ background: linear-gradient(
+ to right,
+ rgba(255, 255, 255, 0.05) 0%,
+ rgba(255, 255, 255, 0.1) 50%,
+ rgba(255, 255, 255, 0.05) 100%
+ );
+ background-size: 1000px 100%;
+}
+
+/* Pulse Glow */
+@keyframes pulse-glow {
+ 0%, 100% {
+ opacity: 1;
+ box-shadow: 0 0 10px rgba(102, 252, 241, 0.3);
+ }
+ 50% {
+ opacity: 0.8;
+ box-shadow: 0 0 20px rgba(102, 252, 241, 0.6);
+ }
+}
+
+.pulse-glow {
+ animation: pulse-glow 2s ease-in-out infinite;
+}
+
+/* Focus States */
+.focus-ring {
+ outline: 2px solid transparent;
+ outline-offset: 2px;
+ transition: outline-color var(--transition-fast);
+}
+
+.focus-ring:focus-visible {
+ outline-color: rgb(var(--kodo-cyan));
+ outline-width: 2px;
+}
diff --git a/apps/web/src/types/generated/.gitignore b/apps/web/src/types/generated/.gitignore
new file mode 100644
index 000000000..149b57654
--- /dev/null
+++ b/apps/web/src/types/generated/.gitignore
@@ -0,0 +1,4 @@
+wwwroot/*.js
+node_modules
+typings
+dist
diff --git a/apps/web/src/types/generated/.npmignore b/apps/web/src/types/generated/.npmignore
new file mode 100644
index 000000000..999d88df6
--- /dev/null
+++ b/apps/web/src/types/generated/.npmignore
@@ -0,0 +1 @@
+# empty npmignore to ensure all required files (e.g., in the dist folder) are published by npm
\ No newline at end of file
diff --git a/apps/web/src/types/generated/.openapi-generator-ignore b/apps/web/src/types/generated/.openapi-generator-ignore
new file mode 100644
index 000000000..7484ee590
--- /dev/null
+++ b/apps/web/src/types/generated/.openapi-generator-ignore
@@ -0,0 +1,23 @@
+# OpenAPI Generator Ignore
+# Generated by openapi-generator https://github.com/openapitools/openapi-generator
+
+# Use this file to prevent files from being overwritten by the generator.
+# The patterns follow closely to .gitignore or .dockerignore.
+
+# As an example, the C# client generator defines ApiClient.cs.
+# You can make changes and tell OpenAPI Generator to ignore just this file by uncommenting the following line:
+#ApiClient.cs
+
+# You can match any string of characters against a directory, file or extension with a single asterisk (*):
+#foo/*/qux
+# The above matches foo/bar/qux and foo/baz/qux, but not foo/bar/baz/qux
+
+# You can recursively match patterns against a directory, file or extension with a double asterisk (**):
+#foo/**/qux
+# This matches foo/bar/qux, foo/baz/qux, and foo/bar/baz/qux
+
+# You can also negate patterns with an exclamation (!).
+# For example, you can ignore all files in a docs folder with the file extension .md:
+#docs/*.md
+# Then explicitly reverse the ignore rule for a single file:
+#!docs/README.md
diff --git a/apps/web/src/types/generated/.openapi-generator/FILES b/apps/web/src/types/generated/.openapi-generator/FILES
new file mode 100644
index 000000000..f9090ceb8
--- /dev/null
+++ b/apps/web/src/types/generated/.openapi-generator/FILES
@@ -0,0 +1,129 @@
+.gitignore
+.npmignore
+.openapi-generator-ignore
+api.ts
+base.ts
+common.ts
+configuration.ts
+docs/AnalyticsApi.md
+docs/AnalyticsEventsPost200Response.md
+docs/AnalyticsEventsPost200ResponseAllOfData.md
+docs/AnalyticsGet200Response.md
+docs/AnalyticsGet200ResponseAllOfData.md
+docs/AnalyticsTracksIdGet200Response.md
+docs/AnalyticsTracksIdGet200ResponseAllOfData.md
+docs/AnalyticsTracksTopGet200Response.md
+docs/AnalyticsTracksTopGet200ResponseAllOfData.md
+docs/ApiV1LogsFrontendPost200Response.md
+docs/ApiV1LogsFrontendPost200ResponseAllOfData.md
+docs/AuditActivityGet200Response.md
+docs/AuditActivityGet200ResponseAllOfData.md
+docs/AuditApi.md
+docs/AuditLogsGet200Response.md
+docs/AuditLogsGet200ResponseAllOfData.md
+docs/AuditStatsGet200Response.md
+docs/AuditStatsGet200ResponseAllOfData.md
+docs/Auth2faSetupPost200Response.md
+docs/Auth2faStatusGet200Response.md
+docs/Auth2faStatusGet200ResponseAllOfData.md
+docs/AuthApi.md
+docs/AuthCheckUsernameGet200Response.md
+docs/AuthCheckUsernameGet200ResponseAllOfData.md
+docs/AuthLogoutPostRequest.md
+docs/AuthMeGet200Response.md
+docs/ChatApi.md
+docs/ChatTokenGet200Response.md
+docs/ChatTokenGet200ResponseAllOfData.md
+docs/CommentApi.md
+docs/CommentsIdPut200Response.md
+docs/CommentsIdPut200ResponseAllOfData.md
+docs/CommentsIdRepliesGet200Response.md
+docs/CommentsIdRepliesGet200ResponseAllOfData.md
+docs/InternalCoreTrackBatchDeleteRequest.md
+docs/InternalCoreTrackCompleteChunkedUploadRequest.md
+docs/InternalCoreTrackInitiateChunkedUploadRequest.md
+docs/InternalCoreTrackUpdateTrackRequest.md
+docs/InternalHandlersAPIResponse.md
+docs/InternalHandlersCreateCommentRequest.md
+docs/InternalHandlersCreateOrderRequest.md
+docs/InternalHandlersCreateOrderRequestItemsInner.md
+docs/InternalHandlersCreatePlaylistRequest.md
+docs/InternalHandlersCreateProductRequest.md
+docs/InternalHandlersDisableTwoFactorRequest.md
+docs/InternalHandlersFrontendLogRequest.md
+docs/InternalHandlersRecordEventRequest.md
+docs/InternalHandlersRecordPlayRequest.md
+docs/InternalHandlersReorderTracksRequest.md
+docs/InternalHandlersSetupTwoFactorResponse.md
+docs/InternalHandlersUpdateCommentRequest.md
+docs/InternalHandlersUpdatePlaylistRequest.md
+docs/InternalHandlersUpdateProductRequest.md
+docs/InternalHandlersUpdateProfileRequest.md
+docs/InternalHandlersVerifyTwoFactorRequest.md
+docs/LoggingApi.md
+docs/MarketplaceApi.md
+docs/PlaylistApi.md
+docs/PlaylistsGet200Response.md
+docs/PlaylistsGet200ResponseAllOfData.md
+docs/PlaylistsIdTracksPostRequest.md
+docs/PlaylistsPost201Response.md
+docs/PlaylistsPost201ResponseAllOfData.md
+docs/TrackApi.md
+docs/TracksBatchDeletePost200Response.md
+docs/TracksBatchDeletePost200ResponseAllOfData.md
+docs/TracksChunkPost200Response.md
+docs/TracksChunkPost200ResponseAllOfData.md
+docs/TracksCompletePost201Response.md
+docs/TracksCompletePost201ResponseAllOfData.md
+docs/TracksGet200Response.md
+docs/TracksGet200ResponseAllOfData.md
+docs/TracksIdAnalyticsPlaysGet200Response.md
+docs/TracksIdAnalyticsPlaysGet200ResponseAllOfData.md
+docs/TracksIdCommentsGet200Response.md
+docs/TracksIdCommentsGet200ResponseAllOfData.md
+docs/TracksIdDelete200Response.md
+docs/TracksIdStatusGet200Response.md
+docs/TracksIdStatusGet200ResponseAllOfData.md
+docs/TracksInitiatePost200Response.md
+docs/TracksInitiatePost200ResponseAllOfData.md
+docs/TracksPost201Response.md
+docs/TracksPost201ResponseAllOfData.md
+docs/TracksQuotaIdGet200Response.md
+docs/TracksQuotaIdGet200ResponseAllOfData.md
+docs/TracksResumeUploadIdGet200Response.md
+docs/TracksResumeUploadIdGet200ResponseAllOfData.md
+docs/UserApi.md
+docs/UsersGet200Response.md
+docs/UsersGet200ResponseAllOfData.md
+docs/UsersIdGet200Response.md
+docs/UsersIdGet200ResponseAllOfData.md
+docs/VezaBackendApiInternalCoreMarketplaceLicenseType.md
+docs/VezaBackendApiInternalCoreMarketplaceOrder.md
+docs/VezaBackendApiInternalCoreMarketplaceOrderItem.md
+docs/VezaBackendApiInternalCoreMarketplaceProduct.md
+docs/VezaBackendApiInternalCoreMarketplaceProductStatus.md
+docs/VezaBackendApiInternalDtoLoginRequest.md
+docs/VezaBackendApiInternalDtoLoginResponse.md
+docs/VezaBackendApiInternalDtoRefreshRequest.md
+docs/VezaBackendApiInternalDtoRegisterRequest.md
+docs/VezaBackendApiInternalDtoRegisterResponse.md
+docs/VezaBackendApiInternalDtoResendVerificationRequest.md
+docs/VezaBackendApiInternalDtoTokenResponse.md
+docs/VezaBackendApiInternalDtoUserResponse.md
+docs/VezaBackendApiInternalModelsPlaylist.md
+docs/VezaBackendApiInternalModelsPlaylistCollaborator.md
+docs/VezaBackendApiInternalModelsPlaylistPermission.md
+docs/VezaBackendApiInternalModelsPlaylistTrack.md
+docs/VezaBackendApiInternalModelsTrack.md
+docs/VezaBackendApiInternalModelsTrackStatus.md
+docs/VezaBackendApiInternalModelsUser.md
+docs/VezaBackendApiInternalResponseAPIResponse.md
+docs/WebhookApi.md
+docs/WebhooksGet200Response.md
+docs/WebhooksGet200ResponseAllOfData.md
+docs/WebhooksIdRegenerateKeyPost200Response.md
+docs/WebhooksIdRegenerateKeyPost200ResponseAllOfData.md
+docs/WebhooksPost201Response.md
+docs/WebhooksPost201ResponseAllOfData.md
+git_push.sh
+index.ts
diff --git a/apps/web/src/types/generated/.openapi-generator/VERSION b/apps/web/src/types/generated/.openapi-generator/VERSION
new file mode 100644
index 000000000..1b2d969d1
--- /dev/null
+++ b/apps/web/src/types/generated/.openapi-generator/VERSION
@@ -0,0 +1 @@
+7.18.0
diff --git a/apps/web/src/types/generated/api.ts b/apps/web/src/types/generated/api.ts
new file mode 100644
index 000000000..421f7e353
--- /dev/null
+++ b/apps/web/src/types/generated/api.ts
@@ -0,0 +1,7123 @@
+/* tslint:disable */
+/* eslint-disable */
+/**
+ * Veza Backend API
+ * Backend API for Veza platform.
+ *
+ * The version of the OpenAPI document: 1.2.0
+ * Contact: support@veza.app
+ *
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
+ * https://openapi-generator.tech
+ * Do not edit the class manually.
+ */
+
+
+import type { Configuration } from './configuration';
+import type { AxiosPromise, AxiosInstance, RawAxiosRequestConfig } from 'axios';
+import globalAxios from 'axios';
+// Some imports not used depending on template conditions
+// @ts-ignore
+import { DUMMY_BASE_URL, assertParamExists, setApiKeyToObject, setBasicAuthToObject, setBearerAuthToObject, setOAuthToObject, setSearchParams, serializeDataIfNeeded, toPathString, createRequestFunction } from './common';
+import type { RequestArgs } from './base';
+// @ts-ignore
+import { BASE_PATH, COLLECTION_FORMATS, BaseAPI, RequiredError, operationServerMap } from './base';
+
+export interface AnalyticsEventsPost200Response {
+ 'data'?: AnalyticsEventsPost200ResponseAllOfData;
+ 'error'?: object;
+ 'success'?: boolean;
+}
+export interface AnalyticsEventsPost200ResponseAllOfData {
+ 'message'?: string;
+}
+export interface AnalyticsGet200Response {
+ 'data'?: AnalyticsGet200ResponseAllOfData;
+ 'error'?: object;
+ 'success'?: boolean;
+}
+export interface AnalyticsGet200ResponseAllOfData {
+ 'period'?: object;
+ 'playlists'?: object;
+ 'tracks'?: object;
+}
+export interface AnalyticsTracksIdGet200Response {
+ 'data'?: AnalyticsTracksIdGet200ResponseAllOfData;
+ 'error'?: object;
+ 'success'?: boolean;
+}
+export interface AnalyticsTracksIdGet200ResponseAllOfData {
+ 'dashboard'?: object;
+}
+export interface AnalyticsTracksTopGet200Response {
+ 'data'?: AnalyticsTracksTopGet200ResponseAllOfData;
+ 'error'?: object;
+ 'success'?: boolean;
+}
+export interface AnalyticsTracksTopGet200ResponseAllOfData {
+ 'tracks'?: Array;
+}
+export interface ApiV1LogsFrontendPost200Response {
+ 'data'?: ApiV1LogsFrontendPost200ResponseAllOfData;
+ 'error'?: object;
+ 'success'?: boolean;
+}
+export interface ApiV1LogsFrontendPost200ResponseAllOfData {
+ 'received'?: boolean;
+}
+export interface AuditActivityGet200Response {
+ 'data'?: AuditActivityGet200ResponseAllOfData;
+ 'error'?: object;
+ 'success'?: boolean;
+}
+export interface AuditActivityGet200ResponseAllOfData {
+ 'activities'?: Array;
+}
+export interface AuditLogsGet200Response {
+ 'data'?: AuditLogsGet200ResponseAllOfData;
+ 'error'?: object;
+ 'success'?: boolean;
+}
+export interface AuditLogsGet200ResponseAllOfData {
+ 'logs'?: Array;
+ 'pagination'?: object;
+}
+export interface AuditStatsGet200Response {
+ 'data'?: AuditStatsGet200ResponseAllOfData;
+ 'error'?: object;
+ 'success'?: boolean;
+}
+export interface AuditStatsGet200ResponseAllOfData {
+ 'stats'?: object;
+}
+export interface Auth2faSetupPost200Response {
+ 'data'?: InternalHandlersSetupTwoFactorResponse;
+ 'error'?: object;
+ 'success'?: boolean;
+}
+export interface Auth2faStatusGet200Response {
+ 'data'?: Auth2faStatusGet200ResponseAllOfData;
+ 'error'?: object;
+ 'success'?: boolean;
+}
+export interface Auth2faStatusGet200ResponseAllOfData {
+ 'enabled'?: boolean;
+}
+export interface AuthCheckUsernameGet200Response {
+ 'data'?: AuthCheckUsernameGet200ResponseAllOfData;
+ 'error'?: object;
+ 'success'?: boolean;
+}
+export interface AuthCheckUsernameGet200ResponseAllOfData {
+ 'available'?: boolean;
+ 'username'?: string;
+}
+export interface AuthLogoutPostRequest {
+ 'refresh_token'?: string;
+}
+export interface AuthMeGet200Response {
+ 'data'?: object;
+ 'error'?: object;
+ 'success'?: boolean;
+}
+export interface ChatTokenGet200Response {
+ 'data'?: ChatTokenGet200ResponseAllOfData;
+ 'error'?: object;
+ 'success'?: boolean;
+}
+export interface ChatTokenGet200ResponseAllOfData {
+ 'token'?: string;
+}
+export interface CommentsIdPut200Response {
+ 'data'?: CommentsIdPut200ResponseAllOfData;
+ 'error'?: object;
+ 'success'?: boolean;
+}
+export interface CommentsIdPut200ResponseAllOfData {
+ 'comment'?: object;
+}
+export interface CommentsIdRepliesGet200Response {
+ 'data'?: CommentsIdRepliesGet200ResponseAllOfData;
+ 'error'?: object;
+ 'success'?: boolean;
+}
+export interface CommentsIdRepliesGet200ResponseAllOfData {
+ 'pagination'?: object;
+ 'replies'?: Array;
+}
+export interface InternalCoreTrackBatchDeleteRequest {
+ 'track_ids': Array;
+}
+export interface InternalCoreTrackCompleteChunkedUploadRequest {
+ 'upload_id': string;
+}
+export interface InternalCoreTrackInitiateChunkedUploadRequest {
+ 'filename': string;
+ 'total_chunks': number;
+ 'total_size': number;
+}
+export interface InternalCoreTrackUpdateTrackRequest {
+ 'album'?: string;
+ 'artist'?: string;
+ 'genre'?: string;
+ 'is_public'?: boolean;
+ 'title'?: string;
+ 'year'?: number;
+}
+export interface InternalHandlersAPIResponse {
+ 'data'?: object;
+ 'error'?: object;
+ 'success'?: boolean;
+}
+export interface InternalHandlersCreateCommentRequest {
+ 'content': string;
+ /**
+ * Changed to *uuid.UUID
+ */
+ 'parent_id'?: string;
+}
+export interface InternalHandlersCreateOrderRequest {
+ 'items': Array;
+}
+export interface InternalHandlersCreateOrderRequestItemsInner {
+ 'product_id': string;
+}
+export interface InternalHandlersCreatePlaylistRequest {
+ 'description'?: string;
+ 'is_public'?: boolean;
+ 'title': string;
+}
+export interface InternalHandlersCreateProductRequest {
+ 'description'?: string;
+ 'license_type'?: InternalHandlersCreateProductRequestLicenseTypeEnum;
+ 'price': number;
+ 'product_type': InternalHandlersCreateProductRequestProductTypeEnum;
+ 'title': string;
+ /**
+ * UUID string
+ */
+ 'track_id'?: string;
+}
+
+export const InternalHandlersCreateProductRequestLicenseTypeEnum = {
+ Standard: 'standard',
+ Exclusive: 'exclusive',
+ Commercial: 'commercial'
+} as const;
+
+export type InternalHandlersCreateProductRequestLicenseTypeEnum = typeof InternalHandlersCreateProductRequestLicenseTypeEnum[keyof typeof InternalHandlersCreateProductRequestLicenseTypeEnum];
+export const InternalHandlersCreateProductRequestProductTypeEnum = {
+ Track: 'track',
+ Pack: 'pack',
+ Service: 'service'
+} as const;
+
+export type InternalHandlersCreateProductRequestProductTypeEnum = typeof InternalHandlersCreateProductRequestProductTypeEnum[keyof typeof InternalHandlersCreateProductRequestProductTypeEnum];
+
+export interface InternalHandlersDisableTwoFactorRequest {
+ 'password': string;
+}
+export interface InternalHandlersFrontendLogRequest {
+ 'context'?: { [key: string]: any; };
+ 'data'?: object;
+ 'level'?: string;
+ 'message'?: string;
+ 'timestamp'?: string;
+}
+export interface InternalHandlersRecordEventRequest {
+ 'event_name': string;
+ 'payload'?: { [key: string]: any; };
+}
+export interface InternalHandlersRecordPlayRequest {
+ 'device'?: string;
+ 'duration': number;
+}
+export interface InternalHandlersReorderTracksRequest {
+ /**
+ * Changed to []uuid.UUID
+ */
+ 'track_ids': Array;
+}
+export interface InternalHandlersSetupTwoFactorResponse {
+ 'qr_code_url'?: string;
+ 'recovery_codes'?: Array;
+ 'secret'?: string;
+}
+export interface InternalHandlersUpdateCommentRequest {
+ 'content': string;
+}
+export interface InternalHandlersUpdatePlaylistRequest {
+ 'description'?: string;
+ 'is_public'?: boolean;
+ 'title'?: string;
+}
+export interface InternalHandlersUpdateProductRequest {
+ 'description'?: string;
+ 'price'?: number;
+ 'status'?: InternalHandlersUpdateProductRequestStatusEnum;
+ 'title'?: string;
+}
+
+export const InternalHandlersUpdateProductRequestStatusEnum = {
+ Draft: 'draft',
+ Active: 'active',
+ Archived: 'archived'
+} as const;
+
+export type InternalHandlersUpdateProductRequestStatusEnum = typeof InternalHandlersUpdateProductRequestStatusEnum[keyof typeof InternalHandlersUpdateProductRequestStatusEnum];
+
+export interface InternalHandlersUpdateProfileRequest {
+ 'bio'?: string;
+ 'birthdate'?: string;
+ 'first_name'?: string;
+ 'gender'?: InternalHandlersUpdateProfileRequestGenderEnum;
+ 'last_name'?: string;
+ 'location'?: string;
+ 'social_links'?: { [key: string]: any; };
+ 'username'?: string;
+}
+
+export const InternalHandlersUpdateProfileRequestGenderEnum = {
+ Male: 'Male',
+ Female: 'Female',
+ Other: 'Other',
+ PreferNotToSay: 'Prefer not to say'
+} as const;
+
+export type InternalHandlersUpdateProfileRequestGenderEnum = typeof InternalHandlersUpdateProfileRequestGenderEnum[keyof typeof InternalHandlersUpdateProfileRequestGenderEnum];
+
+export interface InternalHandlersVerifyTwoFactorRequest {
+ /**
+ * TOTP code to verify
+ */
+ 'code': string;
+ /**
+ * Secret from setup step
+ */
+ 'secret': string;
+}
+export interface PlaylistsGet200Response {
+ 'data'?: PlaylistsGet200ResponseAllOfData;
+ 'error'?: object;
+ 'success'?: boolean;
+}
+export interface PlaylistsGet200ResponseAllOfData {
+ 'pagination'?: object;
+ 'playlists'?: Array;
+}
+export interface PlaylistsIdTracksPostRequest {
+ 'track_id'?: string;
+}
+export interface PlaylistsPost201Response {
+ 'data'?: PlaylistsPost201ResponseAllOfData;
+ 'error'?: object;
+ 'success'?: boolean;
+}
+export interface PlaylistsPost201ResponseAllOfData {
+ 'playlist'?: VezaBackendApiInternalModelsPlaylist;
+}
+export interface TracksBatchDeletePost200Response {
+ 'data'?: TracksBatchDeletePost200ResponseAllOfData;
+ 'error'?: object;
+ 'success'?: boolean;
+}
+export interface TracksBatchDeletePost200ResponseAllOfData {
+ 'deleted'?: Array;
+ 'failed'?: object;
+}
+export interface TracksChunkPost200Response {
+ 'data'?: TracksChunkPost200ResponseAllOfData;
+ 'error'?: object;
+ 'success'?: boolean;
+}
+export interface TracksChunkPost200ResponseAllOfData {
+ 'message'?: string;
+ 'progress'?: number;
+ 'received_chunks'?: number;
+ 'upload_id'?: string;
+}
+export interface TracksCompletePost201Response {
+ 'data'?: TracksCompletePost201ResponseAllOfData;
+ 'error'?: object;
+ 'success'?: boolean;
+}
+export interface TracksCompletePost201ResponseAllOfData {
+ 'md5'?: string;
+ 'message'?: string;
+ 'track'?: VezaBackendApiInternalModelsTrack;
+}
+export interface TracksGet200Response {
+ 'data'?: TracksGet200ResponseAllOfData;
+ 'error'?: object;
+ 'success'?: boolean;
+}
+export interface TracksGet200ResponseAllOfData {
+ 'pagination'?: object;
+ 'tracks'?: Array;
+}
+export interface TracksIdAnalyticsPlaysGet200Response {
+ 'data'?: TracksIdAnalyticsPlaysGet200ResponseAllOfData;
+ 'error'?: object;
+ 'success'?: boolean;
+}
+export interface TracksIdAnalyticsPlaysGet200ResponseAllOfData {
+ 'points'?: Array;
+}
+export interface TracksIdCommentsGet200Response {
+ 'data'?: TracksIdCommentsGet200ResponseAllOfData;
+ 'error'?: object;
+ 'success'?: boolean;
+}
+export interface TracksIdCommentsGet200ResponseAllOfData {
+ 'comments'?: Array;
+ 'pagination'?: object;
+}
+export interface TracksIdDelete200Response {
+ 'data'?: AnalyticsEventsPost200ResponseAllOfData;
+ 'error'?: object;
+ 'success'?: boolean;
+}
+export interface TracksIdStatusGet200Response {
+ 'data'?: TracksIdStatusGet200ResponseAllOfData;
+ 'error'?: object;
+ 'success'?: boolean;
+}
+export interface TracksIdStatusGet200ResponseAllOfData {
+ 'progress'?: number;
+}
+export interface TracksInitiatePost200Response {
+ 'data'?: TracksInitiatePost200ResponseAllOfData;
+ 'error'?: object;
+ 'success'?: boolean;
+}
+export interface TracksInitiatePost200ResponseAllOfData {
+ 'message'?: string;
+ 'upload_id'?: string;
+}
+export interface TracksPost201Response {
+ 'data'?: TracksPost201ResponseAllOfData;
+ 'error'?: object;
+ 'success'?: boolean;
+}
+export interface TracksPost201ResponseAllOfData {
+ 'track'?: VezaBackendApiInternalModelsTrack;
+}
+export interface TracksQuotaIdGet200Response {
+ 'data'?: TracksQuotaIdGet200ResponseAllOfData;
+ 'error'?: object;
+ 'success'?: boolean;
+}
+export interface TracksQuotaIdGet200ResponseAllOfData {
+ 'quota'?: object;
+}
+export interface TracksResumeUploadIdGet200Response {
+ 'data'?: TracksResumeUploadIdGet200ResponseAllOfData;
+ 'error'?: object;
+ 'success'?: boolean;
+}
+export interface TracksResumeUploadIdGet200ResponseAllOfData {
+ 'chunks_received'?: number;
+ 'upload_id'?: string;
+}
+export interface UsersGet200Response {
+ 'data'?: UsersGet200ResponseAllOfData;
+ 'error'?: object;
+ 'success'?: boolean;
+}
+export interface UsersGet200ResponseAllOfData {
+ 'pagination'?: object;
+ 'users'?: Array;
+}
+export interface UsersIdGet200Response {
+ 'data'?: UsersIdGet200ResponseAllOfData;
+ 'error'?: object;
+ 'success'?: boolean;
+}
+export interface UsersIdGet200ResponseAllOfData {
+ 'profile'?: object;
+}
+
+export const VezaBackendApiInternalCoreMarketplaceLicenseType = {
+ LicenseBasic: 'basic',
+ LicensePremium: 'premium',
+ LicenseExclusive: 'exclusive'
+} as const;
+
+export type VezaBackendApiInternalCoreMarketplaceLicenseType = typeof VezaBackendApiInternalCoreMarketplaceLicenseType[keyof typeof VezaBackendApiInternalCoreMarketplaceLicenseType];
+
+
+export interface VezaBackendApiInternalCoreMarketplaceOrder {
+ 'buyer_id'?: string;
+ 'created_at'?: string;
+ 'currency'?: string;
+ 'id'?: string;
+ 'items'?: Array;
+ /**
+ * Stripe PaymentIntent ID
+ */
+ 'payment_intent'?: string;
+ /**
+ * pending, paid, failed, refunded
+ */
+ 'status'?: string;
+ 'total_amount'?: number;
+ 'updated_at'?: string;
+}
+export interface VezaBackendApiInternalCoreMarketplaceOrderItem {
+ 'id'?: string;
+ 'order_id'?: string;
+ 'price'?: number;
+ 'product_id'?: string;
+}
+export interface VezaBackendApiInternalCoreMarketplaceProduct {
+ 'created_at'?: string;
+ 'currency'?: string;
+ 'description'?: string;
+ 'id'?: string;
+ 'license_type'?: VezaBackendApiInternalCoreMarketplaceLicenseType;
+ 'price'?: number;
+ /**
+ * \"track\", \"pack\", \"service\"
+ */
+ 'product_type'?: string;
+ 'seller_id'?: string;
+ 'status'?: VezaBackendApiInternalCoreMarketplaceProductStatus;
+ 'title'?: string;
+ /**
+ * Liaison optionnelle avec un Track (si ProductType == \"track\")
+ */
+ 'track_id'?: string;
+ 'updated_at'?: string;
+}
+
+
+
+export const VezaBackendApiInternalCoreMarketplaceProductStatus = {
+ ProductStatusDraft: 'draft',
+ ProductStatusActive: 'active',
+ ProductStatusArchived: 'archived'
+} as const;
+
+export type VezaBackendApiInternalCoreMarketplaceProductStatus = typeof VezaBackendApiInternalCoreMarketplaceProductStatus[keyof typeof VezaBackendApiInternalCoreMarketplaceProductStatus];
+
+
+export interface VezaBackendApiInternalDtoLoginRequest {
+ 'email': string;
+ 'password': string;
+ 'remember_me'?: boolean;
+}
+export interface VezaBackendApiInternalDtoLoginResponse {
+ /**
+ * BE-API-001: Flag indicating 2FA is required
+ */
+ 'requires_2fa'?: boolean;
+ 'token'?: VezaBackendApiInternalDtoTokenResponse;
+ 'user'?: VezaBackendApiInternalDtoUserResponse;
+}
+export interface VezaBackendApiInternalDtoRefreshRequest {
+ 'refresh_token': string;
+}
+export interface VezaBackendApiInternalDtoRegisterRequest {
+ 'email': string;
+ 'password': string;
+ 'password_confirmation': string;
+ 'username'?: string;
+}
+export interface VezaBackendApiInternalDtoRegisterResponse {
+ 'token'?: VezaBackendApiInternalDtoTokenResponse;
+ 'user'?: VezaBackendApiInternalDtoUserResponse;
+}
+export interface VezaBackendApiInternalDtoResendVerificationRequest {
+ 'email': string;
+}
+export interface VezaBackendApiInternalDtoTokenResponse {
+ 'access_token'?: string;
+ 'expires_in'?: number;
+ 'refresh_token'?: string;
+}
+export interface VezaBackendApiInternalDtoUserResponse {
+ 'email'?: string;
+ 'id'?: string;
+ 'username'?: string;
+}
+export interface VezaBackendApiInternalModelsPlaylist {
+ 'collaborators'?: Array;
+ 'cover_url'?: string;
+ 'created_at'?: string;
+ 'description'?: string;
+ 'follower_count'?: number;
+ 'id'?: string;
+ 'is_public'?: boolean;
+ 'title'?: string;
+ 'track_count'?: number;
+ 'tracks'?: Array;
+ 'updated_at'?: string;
+ 'user_id'?: string;
+}
+export interface VezaBackendApiInternalModelsPlaylistCollaborator {
+ 'created_at'?: string;
+ 'id'?: string;
+ 'permission'?: VezaBackendApiInternalModelsPlaylistPermission;
+ 'playlist_id'?: string;
+ 'updated_at'?: string;
+ 'user'?: VezaBackendApiInternalModelsUser;
+ 'user_id'?: string;
+}
+
+
+
+export const VezaBackendApiInternalModelsPlaylistPermission = {
+ PlaylistPermissionRead: 'read',
+ PlaylistPermissionWrite: 'write',
+ PlaylistPermissionAdmin: 'admin'
+} as const;
+
+export type VezaBackendApiInternalModelsPlaylistPermission = typeof VezaBackendApiInternalModelsPlaylistPermission[keyof typeof VezaBackendApiInternalModelsPlaylistPermission];
+
+
+export interface VezaBackendApiInternalModelsPlaylistTrack {
+ 'added_at'?: string;
+ 'added_by'?: string;
+ 'id'?: string;
+ 'playlist_id'?: string;
+ 'position'?: number;
+ 'track'?: VezaBackendApiInternalModelsTrack;
+ 'track_id'?: string;
+}
+export interface VezaBackendApiInternalModelsTrack {
+ 'album'?: string;
+ 'artist'?: string;
+ /**
+ * kbps
+ */
+ 'bitrate'?: number;
+ 'cover_art_path'?: string;
+ 'created_at'?: string;
+ 'creator_id'?: string;
+ /**
+ * seconds
+ */
+ 'duration'?: number;
+ /**
+ * NULL temporairement avant création fichier
+ */
+ 'file_id'?: string;
+ 'file_path'?: string;
+ /**
+ * bytes
+ */
+ 'file_size'?: number;
+ /**
+ * mp3, flac, wav, etc.
+ */
+ 'format'?: string;
+ 'genre'?: string;
+ 'id'?: string;
+ 'is_public'?: boolean;
+ 'like_count'?: number;
+ 'play_count'?: number;
+ /**
+ * Hz
+ */
+ 'sample_rate'?: number;
+ 'status'?: VezaBackendApiInternalModelsTrackStatus;
+ 'status_message'?: string;
+ 'stream_manifest_url'?: string;
+ /**
+ * pending, processing, ready, error
+ */
+ 'stream_status'?: string;
+ 'title'?: string;
+ 'updated_at'?: string;
+ 'waveform_path'?: string;
+ 'year'?: number;
+}
+
+
+
+export const VezaBackendApiInternalModelsTrackStatus = {
+ TrackStatusUploading: 'uploading',
+ TrackStatusProcessing: 'processing',
+ TrackStatusCompleted: 'completed',
+ TrackStatusFailed: 'failed'
+} as const;
+
+export type VezaBackendApiInternalModelsTrackStatus = typeof VezaBackendApiInternalModelsTrackStatus[keyof typeof VezaBackendApiInternalModelsTrackStatus];
+
+
+export interface VezaBackendApiInternalModelsUser {
+ 'avatar'?: string;
+ 'bio'?: string;
+ 'birthdate'?: string;
+ 'created_at'?: string;
+ 'email'?: string;
+ 'first_name'?: string;
+ 'gender'?: string;
+ 'id'?: string;
+ 'is_active'?: boolean;
+ 'is_admin'?: boolean;
+ 'is_banned'?: boolean;
+ 'is_public'?: boolean;
+ 'is_verified'?: boolean;
+ 'last_login_at'?: string;
+ 'last_name'?: string;
+ 'location'?: string;
+ 'login_count'?: number;
+ /**
+ * Virtual field for input
+ */
+ 'password'?: string;
+ 'role'?: string;
+ 'slug'?: string;
+ 'social_links'?: string;
+ 'token_version'?: number;
+ 'updated_at'?: string;
+ 'username'?: string;
+ 'username_changed_at'?: string;
+}
+export interface VezaBackendApiInternalResponseAPIResponse {
+ 'data'?: object;
+ 'error'?: object;
+ 'success'?: boolean;
+}
+export interface WebhooksGet200Response {
+ 'data'?: WebhooksGet200ResponseAllOfData;
+ 'error'?: object;
+ 'success'?: boolean;
+}
+export interface WebhooksGet200ResponseAllOfData {
+ 'webhooks'?: Array;
+}
+export interface WebhooksIdRegenerateKeyPost200Response {
+ 'data'?: WebhooksIdRegenerateKeyPost200ResponseAllOfData;
+ 'error'?: object;
+ 'success'?: boolean;
+}
+export interface WebhooksIdRegenerateKeyPost200ResponseAllOfData {
+ 'api_key'?: string;
+ 'message'?: string;
+}
+export interface WebhooksPost201Response {
+ 'data'?: WebhooksPost201ResponseAllOfData;
+ 'error'?: object;
+ 'success'?: boolean;
+}
+export interface WebhooksPost201ResponseAllOfData {
+ 'webhook'?: object;
+}
+
+/**
+ * AnalyticsApi - axios parameter creator
+ */
+export const AnalyticsApiAxiosParamCreator = function (configuration?: Configuration) {
+ return {
+ /**
+ * Record a custom analytics event
+ * @summary Record Analytics Event
+ * @param {InternalHandlersRecordEventRequest} request Event Data
+ * @param {*} [options] Override http request option.
+ * @throws {RequiredError}
+ */
+ analyticsEventsPost: async (request: InternalHandlersRecordEventRequest, options: RawAxiosRequestConfig = {}): Promise => {
+ // verify required parameter 'request' is not null or undefined
+ assertParamExists('analyticsEventsPost', 'request', request)
+ const localVarPath = `/analytics/events`;
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
+ let baseOptions;
+ if (configuration) {
+ baseOptions = configuration.baseOptions;
+ }
+
+ const localVarRequestOptions = { method: 'POST', ...baseOptions, ...options};
+ const localVarHeaderParameter = {} as any;
+ const localVarQueryParameter = {} as any;
+
+ // authentication BearerAuth required
+ await setApiKeyToObject(localVarHeaderParameter, "Authorization", configuration)
+
+ localVarHeaderParameter['Content-Type'] = 'application/json';
+ localVarHeaderParameter['Accept'] = 'application/json';
+
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
+ localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
+ localVarRequestOptions.data = serializeDataIfNeeded(request, localVarRequestOptions, configuration)
+
+ return {
+ url: toPathString(localVarUrlObj),
+ options: localVarRequestOptions,
+ };
+ },
+ /**
+ * Get aggregated analytics data for tracks and playlists
+ * @summary Get Analytics Data
+ * @param {number} [days] Number of days (default: 30)
+ * @param {string} [startDate] Start date (ISO 8601)
+ * @param {string} [endDate] End date (ISO 8601)
+ * @param {*} [options] Override http request option.
+ * @throws {RequiredError}
+ */
+ analyticsGet: async (days?: number, startDate?: string, endDate?: string, options: RawAxiosRequestConfig = {}): Promise => {
+ const localVarPath = `/analytics`;
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
+ let baseOptions;
+ if (configuration) {
+ baseOptions = configuration.baseOptions;
+ }
+
+ const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options};
+ const localVarHeaderParameter = {} as any;
+ const localVarQueryParameter = {} as any;
+
+ // authentication BearerAuth required
+ await setApiKeyToObject(localVarHeaderParameter, "Authorization", configuration)
+
+ if (days !== undefined) {
+ localVarQueryParameter['days'] = days;
+ }
+
+ if (startDate !== undefined) {
+ localVarQueryParameter['start_date'] = startDate;
+ }
+
+ if (endDate !== undefined) {
+ localVarQueryParameter['end_date'] = endDate;
+ }
+
+ localVarHeaderParameter['Accept'] = 'application/json';
+
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
+ localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
+
+ return {
+ url: toPathString(localVarUrlObj),
+ options: localVarRequestOptions,
+ };
+ },
+ /**
+ * Get comprehensive analytics dashboard for a track
+ * @summary Get Track Analytics Dashboard
+ * @param {string} id Track ID
+ * @param {*} [options] Override http request option.
+ * @throws {RequiredError}
+ */
+ analyticsTracksIdGet: async (id: string, options: RawAxiosRequestConfig = {}): Promise => {
+ // verify required parameter 'id' is not null or undefined
+ assertParamExists('analyticsTracksIdGet', 'id', id)
+ const localVarPath = `/analytics/tracks/{id}`
+ .replace(`{${"id"}}`, encodeURIComponent(String(id)));
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
+ let baseOptions;
+ if (configuration) {
+ baseOptions = configuration.baseOptions;
+ }
+
+ const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options};
+ const localVarHeaderParameter = {} as any;
+ const localVarQueryParameter = {} as any;
+
+ // authentication BearerAuth required
+ await setApiKeyToObject(localVarHeaderParameter, "Authorization", configuration)
+
+ localVarHeaderParameter['Accept'] = 'application/json';
+
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
+ localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
+
+ return {
+ url: toPathString(localVarUrlObj),
+ options: localVarRequestOptions,
+ };
+ },
+ /**
+ * Get list of top tracks by play count, optionally filtered by date range
+ * @summary Get top tracks
+ * @param {number} [limit] Number of tracks to return
+ * @param {string} [startDate] Start date filter (RFC3339 format)
+ * @param {string} [endDate] End date filter (RFC3339 format)
+ * @param {*} [options] Override http request option.
+ * @throws {RequiredError}
+ */
+ analyticsTracksTopGet: async (limit?: number, startDate?: string, endDate?: string, options: RawAxiosRequestConfig = {}): Promise => {
+ const localVarPath = `/analytics/tracks/top`;
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
+ let baseOptions;
+ if (configuration) {
+ baseOptions = configuration.baseOptions;
+ }
+
+ const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options};
+ const localVarHeaderParameter = {} as any;
+ const localVarQueryParameter = {} as any;
+
+ if (limit !== undefined) {
+ localVarQueryParameter['limit'] = limit;
+ }
+
+ if (startDate !== undefined) {
+ localVarQueryParameter['start_date'] = startDate;
+ }
+
+ if (endDate !== undefined) {
+ localVarQueryParameter['end_date'] = endDate;
+ }
+
+ localVarHeaderParameter['Accept'] = 'application/json';
+
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
+ localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
+
+ return {
+ url: toPathString(localVarUrlObj),
+ options: localVarRequestOptions,
+ };
+ },
+ /**
+ * Get play statistics over time for a track, grouped by time period
+ * @summary Get plays over time
+ * @param {string} id Track ID (UUID)
+ * @param {string} [startDate] Start date (RFC3339 format)
+ * @param {string} [endDate] End date (RFC3339 format)
+ * @param {string} [interval] Time period grouping (hour, day, week, month)
+ * @param {*} [options] Override http request option.
+ * @throws {RequiredError}
+ */
+ tracksIdAnalyticsPlaysGet: async (id: string, startDate?: string, endDate?: string, interval?: string, options: RawAxiosRequestConfig = {}): Promise => {
+ // verify required parameter 'id' is not null or undefined
+ assertParamExists('tracksIdAnalyticsPlaysGet', 'id', id)
+ const localVarPath = `/tracks/{id}/analytics/plays`
+ .replace(`{${"id"}}`, encodeURIComponent(String(id)));
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
+ let baseOptions;
+ if (configuration) {
+ baseOptions = configuration.baseOptions;
+ }
+
+ const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options};
+ const localVarHeaderParameter = {} as any;
+ const localVarQueryParameter = {} as any;
+
+ if (startDate !== undefined) {
+ localVarQueryParameter['start_date'] = startDate;
+ }
+
+ if (endDate !== undefined) {
+ localVarQueryParameter['end_date'] = endDate;
+ }
+
+ if (interval !== undefined) {
+ localVarQueryParameter['interval'] = interval;
+ }
+
+ localVarHeaderParameter['Accept'] = 'application/json';
+
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
+ localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
+
+ return {
+ url: toPathString(localVarUrlObj),
+ options: localVarRequestOptions,
+ };
+ },
+ /**
+ * Record a play event for a track. Can be called anonymously or with authentication.
+ * @summary Record play
+ * @param {string} id Track ID (UUID)
+ * @param {InternalHandlersRecordPlayRequest} request Play event data
+ * @param {*} [options] Override http request option.
+ * @throws {RequiredError}
+ */
+ tracksIdPlayPost: async (id: string, request: InternalHandlersRecordPlayRequest, options: RawAxiosRequestConfig = {}): Promise => {
+ // verify required parameter 'id' is not null or undefined
+ assertParamExists('tracksIdPlayPost', 'id', id)
+ // verify required parameter 'request' is not null or undefined
+ assertParamExists('tracksIdPlayPost', 'request', request)
+ const localVarPath = `/tracks/{id}/play`
+ .replace(`{${"id"}}`, encodeURIComponent(String(id)));
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
+ let baseOptions;
+ if (configuration) {
+ baseOptions = configuration.baseOptions;
+ }
+
+ const localVarRequestOptions = { method: 'POST', ...baseOptions, ...options};
+ const localVarHeaderParameter = {} as any;
+ const localVarQueryParameter = {} as any;
+
+ localVarHeaderParameter['Content-Type'] = 'application/json';
+ localVarHeaderParameter['Accept'] = 'application/json';
+
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
+ localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
+ localVarRequestOptions.data = serializeDataIfNeeded(request, localVarRequestOptions, configuration)
+
+ return {
+ url: toPathString(localVarUrlObj),
+ options: localVarRequestOptions,
+ };
+ },
+ /**
+ * Get statistics for a track (plays, likes, etc.)
+ * @summary Get track statistics
+ * @param {string} id Track ID (UUID)
+ * @param {*} [options] Override http request option.
+ * @throws {RequiredError}
+ */
+ tracksIdStatsGet: async (id: string, options: RawAxiosRequestConfig = {}): Promise => {
+ // verify required parameter 'id' is not null or undefined
+ assertParamExists('tracksIdStatsGet', 'id', id)
+ const localVarPath = `/tracks/{id}/stats`
+ .replace(`{${"id"}}`, encodeURIComponent(String(id)));
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
+ let baseOptions;
+ if (configuration) {
+ baseOptions = configuration.baseOptions;
+ }
+
+ const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options};
+ const localVarHeaderParameter = {} as any;
+ const localVarQueryParameter = {} as any;
+
+ localVarHeaderParameter['Accept'] = 'application/json';
+
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
+ localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
+
+ return {
+ url: toPathString(localVarUrlObj),
+ options: localVarRequestOptions,
+ };
+ },
+ /**
+ * Get analytics statistics for a user (total plays, tracks, etc.)
+ * @summary Get user statistics
+ * @param {string} id User ID (UUID)
+ * @param {*} [options] Override http request option.
+ * @throws {RequiredError}
+ */
+ usersIdAnalyticsStatsGet: async (id: string, options: RawAxiosRequestConfig = {}): Promise => {
+ // verify required parameter 'id' is not null or undefined
+ assertParamExists('usersIdAnalyticsStatsGet', 'id', id)
+ const localVarPath = `/users/{id}/analytics/stats`
+ .replace(`{${"id"}}`, encodeURIComponent(String(id)));
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
+ let baseOptions;
+ if (configuration) {
+ baseOptions = configuration.baseOptions;
+ }
+
+ const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options};
+ const localVarHeaderParameter = {} as any;
+ const localVarQueryParameter = {} as any;
+
+ // authentication BearerAuth required
+ await setApiKeyToObject(localVarHeaderParameter, "Authorization", configuration)
+
+ localVarHeaderParameter['Accept'] = 'application/json';
+
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
+ localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
+
+ return {
+ url: toPathString(localVarUrlObj),
+ options: localVarRequestOptions,
+ };
+ },
+ }
+};
+
+/**
+ * AnalyticsApi - functional programming interface
+ */
+export const AnalyticsApiFp = function(configuration?: Configuration) {
+ const localVarAxiosParamCreator = AnalyticsApiAxiosParamCreator(configuration)
+ return {
+ /**
+ * Record a custom analytics event
+ * @summary Record Analytics Event
+ * @param {InternalHandlersRecordEventRequest} request Event Data
+ * @param {*} [options] Override http request option.
+ * @throws {RequiredError}
+ */
+ async analyticsEventsPost(request: InternalHandlersRecordEventRequest, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> {
+ const localVarAxiosArgs = await localVarAxiosParamCreator.analyticsEventsPost(request, options);
+ const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
+ const localVarOperationServerBasePath = operationServerMap['AnalyticsApi.analyticsEventsPost']?.[localVarOperationServerIndex]?.url;
+ return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
+ },
+ /**
+ * Get aggregated analytics data for tracks and playlists
+ * @summary Get Analytics Data
+ * @param {number} [days] Number of days (default: 30)
+ * @param {string} [startDate] Start date (ISO 8601)
+ * @param {string} [endDate] End date (ISO 8601)
+ * @param {*} [options] Override http request option.
+ * @throws {RequiredError}
+ */
+ async analyticsGet(days?: number, startDate?: string, endDate?: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> {
+ const localVarAxiosArgs = await localVarAxiosParamCreator.analyticsGet(days, startDate, endDate, options);
+ const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
+ const localVarOperationServerBasePath = operationServerMap['AnalyticsApi.analyticsGet']?.[localVarOperationServerIndex]?.url;
+ return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
+ },
+ /**
+ * Get comprehensive analytics dashboard for a track
+ * @summary Get Track Analytics Dashboard
+ * @param {string} id Track ID
+ * @param {*} [options] Override http request option.
+ * @throws {RequiredError}
+ */
+ async analyticsTracksIdGet(id: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> {
+ const localVarAxiosArgs = await localVarAxiosParamCreator.analyticsTracksIdGet(id, options);
+ const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
+ const localVarOperationServerBasePath = operationServerMap['AnalyticsApi.analyticsTracksIdGet']?.[localVarOperationServerIndex]?.url;
+ return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
+ },
+ /**
+ * Get list of top tracks by play count, optionally filtered by date range
+ * @summary Get top tracks
+ * @param {number} [limit] Number of tracks to return
+ * @param {string} [startDate] Start date filter (RFC3339 format)
+ * @param {string} [endDate] End date filter (RFC3339 format)
+ * @param {*} [options] Override http request option.
+ * @throws {RequiredError}
+ */
+ async analyticsTracksTopGet(limit?: number, startDate?: string, endDate?: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> {
+ const localVarAxiosArgs = await localVarAxiosParamCreator.analyticsTracksTopGet(limit, startDate, endDate, options);
+ const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
+ const localVarOperationServerBasePath = operationServerMap['AnalyticsApi.analyticsTracksTopGet']?.[localVarOperationServerIndex]?.url;
+ return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
+ },
+ /**
+ * Get play statistics over time for a track, grouped by time period
+ * @summary Get plays over time
+ * @param {string} id Track ID (UUID)
+ * @param {string} [startDate] Start date (RFC3339 format)
+ * @param {string} [endDate] End date (RFC3339 format)
+ * @param {string} [interval] Time period grouping (hour, day, week, month)
+ * @param {*} [options] Override http request option.
+ * @throws {RequiredError}
+ */
+ async tracksIdAnalyticsPlaysGet(id: string, startDate?: string, endDate?: string, interval?: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> {
+ const localVarAxiosArgs = await localVarAxiosParamCreator.tracksIdAnalyticsPlaysGet(id, startDate, endDate, interval, options);
+ const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
+ const localVarOperationServerBasePath = operationServerMap['AnalyticsApi.tracksIdAnalyticsPlaysGet']?.[localVarOperationServerIndex]?.url;
+ return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
+ },
+ /**
+ * Record a play event for a track. Can be called anonymously or with authentication.
+ * @summary Record play
+ * @param {string} id Track ID (UUID)
+ * @param {InternalHandlersRecordPlayRequest} request Play event data
+ * @param {*} [options] Override http request option.
+ * @throws {RequiredError}
+ */
+ async tracksIdPlayPost(id: string, request: InternalHandlersRecordPlayRequest, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> {
+ const localVarAxiosArgs = await localVarAxiosParamCreator.tracksIdPlayPost(id, request, options);
+ const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
+ const localVarOperationServerBasePath = operationServerMap['AnalyticsApi.tracksIdPlayPost']?.[localVarOperationServerIndex]?.url;
+ return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
+ },
+ /**
+ * Get statistics for a track (plays, likes, etc.)
+ * @summary Get track statistics
+ * @param {string} id Track ID (UUID)
+ * @param {*} [options] Override http request option.
+ * @throws {RequiredError}
+ */
+ async tracksIdStatsGet(id: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> {
+ const localVarAxiosArgs = await localVarAxiosParamCreator.tracksIdStatsGet(id, options);
+ const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
+ const localVarOperationServerBasePath = operationServerMap['AnalyticsApi.tracksIdStatsGet']?.[localVarOperationServerIndex]?.url;
+ return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
+ },
+ /**
+ * Get analytics statistics for a user (total plays, tracks, etc.)
+ * @summary Get user statistics
+ * @param {string} id User ID (UUID)
+ * @param {*} [options] Override http request option.
+ * @throws {RequiredError}
+ */
+ async usersIdAnalyticsStatsGet(id: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> {
+ const localVarAxiosArgs = await localVarAxiosParamCreator.usersIdAnalyticsStatsGet(id, options);
+ const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
+ const localVarOperationServerBasePath = operationServerMap['AnalyticsApi.usersIdAnalyticsStatsGet']?.[localVarOperationServerIndex]?.url;
+ return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
+ },
+ }
+};
+
+/**
+ * AnalyticsApi - factory interface
+ */
+export const AnalyticsApiFactory = function (configuration?: Configuration, basePath?: string, axios?: AxiosInstance) {
+ const localVarFp = AnalyticsApiFp(configuration)
+ return {
+ /**
+ * Record a custom analytics event
+ * @summary Record Analytics Event
+ * @param {InternalHandlersRecordEventRequest} request Event Data
+ * @param {*} [options] Override http request option.
+ * @throws {RequiredError}
+ */
+ analyticsEventsPost(request: InternalHandlersRecordEventRequest, options?: RawAxiosRequestConfig): AxiosPromise {
+ return localVarFp.analyticsEventsPost(request, options).then((request) => request(axios, basePath));
+ },
+ /**
+ * Get aggregated analytics data for tracks and playlists
+ * @summary Get Analytics Data
+ * @param {number} [days] Number of days (default: 30)
+ * @param {string} [startDate] Start date (ISO 8601)
+ * @param {string} [endDate] End date (ISO 8601)
+ * @param {*} [options] Override http request option.
+ * @throws {RequiredError}
+ */
+ analyticsGet(days?: number, startDate?: string, endDate?: string, options?: RawAxiosRequestConfig): AxiosPromise {
+ return localVarFp.analyticsGet(days, startDate, endDate, options).then((request) => request(axios, basePath));
+ },
+ /**
+ * Get comprehensive analytics dashboard for a track
+ * @summary Get Track Analytics Dashboard
+ * @param {string} id Track ID
+ * @param {*} [options] Override http request option.
+ * @throws {RequiredError}
+ */
+ analyticsTracksIdGet(id: string, options?: RawAxiosRequestConfig): AxiosPromise {
+ return localVarFp.analyticsTracksIdGet(id, options).then((request) => request(axios, basePath));
+ },
+ /**
+ * Get list of top tracks by play count, optionally filtered by date range
+ * @summary Get top tracks
+ * @param {number} [limit] Number of tracks to return
+ * @param {string} [startDate] Start date filter (RFC3339 format)
+ * @param {string} [endDate] End date filter (RFC3339 format)
+ * @param {*} [options] Override http request option.
+ * @throws {RequiredError}
+ */
+ analyticsTracksTopGet(limit?: number, startDate?: string, endDate?: string, options?: RawAxiosRequestConfig): AxiosPromise {
+ return localVarFp.analyticsTracksTopGet(limit, startDate, endDate, options).then((request) => request(axios, basePath));
+ },
+ /**
+ * Get play statistics over time for a track, grouped by time period
+ * @summary Get plays over time
+ * @param {string} id Track ID (UUID)
+ * @param {string} [startDate] Start date (RFC3339 format)
+ * @param {string} [endDate] End date (RFC3339 format)
+ * @param {string} [interval] Time period grouping (hour, day, week, month)
+ * @param {*} [options] Override http request option.
+ * @throws {RequiredError}
+ */
+ tracksIdAnalyticsPlaysGet(id: string, startDate?: string, endDate?: string, interval?: string, options?: RawAxiosRequestConfig): AxiosPromise {
+ return localVarFp.tracksIdAnalyticsPlaysGet(id, startDate, endDate, interval, options).then((request) => request(axios, basePath));
+ },
+ /**
+ * Record a play event for a track. Can be called anonymously or with authentication.
+ * @summary Record play
+ * @param {string} id Track ID (UUID)
+ * @param {InternalHandlersRecordPlayRequest} request Play event data
+ * @param {*} [options] Override http request option.
+ * @throws {RequiredError}
+ */
+ tracksIdPlayPost(id: string, request: InternalHandlersRecordPlayRequest, options?: RawAxiosRequestConfig): AxiosPromise {
+ return localVarFp.tracksIdPlayPost(id, request, options).then((request) => request(axios, basePath));
+ },
+ /**
+ * Get statistics for a track (plays, likes, etc.)
+ * @summary Get track statistics
+ * @param {string} id Track ID (UUID)
+ * @param {*} [options] Override http request option.
+ * @throws {RequiredError}
+ */
+ tracksIdStatsGet(id: string, options?: RawAxiosRequestConfig): AxiosPromise {
+ return localVarFp.tracksIdStatsGet(id, options).then((request) => request(axios, basePath));
+ },
+ /**
+ * Get analytics statistics for a user (total plays, tracks, etc.)
+ * @summary Get user statistics
+ * @param {string} id User ID (UUID)
+ * @param {*} [options] Override http request option.
+ * @throws {RequiredError}
+ */
+ usersIdAnalyticsStatsGet(id: string, options?: RawAxiosRequestConfig): AxiosPromise {
+ return localVarFp.usersIdAnalyticsStatsGet(id, options).then((request) => request(axios, basePath));
+ },
+ };
+};
+
+/**
+ * AnalyticsApi - interface
+ */
+export interface AnalyticsApiInterface {
+ /**
+ * Record a custom analytics event
+ * @summary Record Analytics Event
+ * @param {InternalHandlersRecordEventRequest} request Event Data
+ * @param {*} [options] Override http request option.
+ * @throws {RequiredError}
+ */
+ analyticsEventsPost(request: InternalHandlersRecordEventRequest, options?: RawAxiosRequestConfig): AxiosPromise;
+
+ /**
+ * Get aggregated analytics data for tracks and playlists
+ * @summary Get Analytics Data
+ * @param {number} [days] Number of days (default: 30)
+ * @param {string} [startDate] Start date (ISO 8601)
+ * @param {string} [endDate] End date (ISO 8601)
+ * @param {*} [options] Override http request option.
+ * @throws {RequiredError}
+ */
+ analyticsGet(days?: number, startDate?: string, endDate?: string, options?: RawAxiosRequestConfig): AxiosPromise;
+
+ /**
+ * Get comprehensive analytics dashboard for a track
+ * @summary Get Track Analytics Dashboard
+ * @param {string} id Track ID
+ * @param {*} [options] Override http request option.
+ * @throws {RequiredError}
+ */
+ analyticsTracksIdGet(id: string, options?: RawAxiosRequestConfig): AxiosPromise;
+
+ /**
+ * Get list of top tracks by play count, optionally filtered by date range
+ * @summary Get top tracks
+ * @param {number} [limit] Number of tracks to return
+ * @param {string} [startDate] Start date filter (RFC3339 format)
+ * @param {string} [endDate] End date filter (RFC3339 format)
+ * @param {*} [options] Override http request option.
+ * @throws {RequiredError}
+ */
+ analyticsTracksTopGet(limit?: number, startDate?: string, endDate?: string, options?: RawAxiosRequestConfig): AxiosPromise;
+
+ /**
+ * Get play statistics over time for a track, grouped by time period
+ * @summary Get plays over time
+ * @param {string} id Track ID (UUID)
+ * @param {string} [startDate] Start date (RFC3339 format)
+ * @param {string} [endDate] End date (RFC3339 format)
+ * @param {string} [interval] Time period grouping (hour, day, week, month)
+ * @param {*} [options] Override http request option.
+ * @throws {RequiredError}
+ */
+ tracksIdAnalyticsPlaysGet(id: string, startDate?: string, endDate?: string, interval?: string, options?: RawAxiosRequestConfig): AxiosPromise;
+
+ /**
+ * Record a play event for a track. Can be called anonymously or with authentication.
+ * @summary Record play
+ * @param {string} id Track ID (UUID)
+ * @param {InternalHandlersRecordPlayRequest} request Play event data
+ * @param {*} [options] Override http request option.
+ * @throws {RequiredError}
+ */
+ tracksIdPlayPost(id: string, request: InternalHandlersRecordPlayRequest, options?: RawAxiosRequestConfig): AxiosPromise;
+
+ /**
+ * Get statistics for a track (plays, likes, etc.)
+ * @summary Get track statistics
+ * @param {string} id Track ID (UUID)
+ * @param {*} [options] Override http request option.
+ * @throws {RequiredError}
+ */
+ tracksIdStatsGet(id: string, options?: RawAxiosRequestConfig): AxiosPromise;
+
+ /**
+ * Get analytics statistics for a user (total plays, tracks, etc.)
+ * @summary Get user statistics
+ * @param {string} id User ID (UUID)
+ * @param {*} [options] Override http request option.
+ * @throws {RequiredError}
+ */
+ usersIdAnalyticsStatsGet(id: string, options?: RawAxiosRequestConfig): AxiosPromise;
+
+}
+
+/**
+ * AnalyticsApi - object-oriented interface
+ */
+export class AnalyticsApi extends BaseAPI implements AnalyticsApiInterface {
+ /**
+ * Record a custom analytics event
+ * @summary Record Analytics Event
+ * @param {InternalHandlersRecordEventRequest} request Event Data
+ * @param {*} [options] Override http request option.
+ * @throws {RequiredError}
+ */
+ public analyticsEventsPost(request: InternalHandlersRecordEventRequest, options?: RawAxiosRequestConfig) {
+ return AnalyticsApiFp(this.configuration).analyticsEventsPost(request, options).then((request) => request(this.axios, this.basePath));
+ }
+
+ /**
+ * Get aggregated analytics data for tracks and playlists
+ * @summary Get Analytics Data
+ * @param {number} [days] Number of days (default: 30)
+ * @param {string} [startDate] Start date (ISO 8601)
+ * @param {string} [endDate] End date (ISO 8601)
+ * @param {*} [options] Override http request option.
+ * @throws {RequiredError}
+ */
+ public analyticsGet(days?: number, startDate?: string, endDate?: string, options?: RawAxiosRequestConfig) {
+ return AnalyticsApiFp(this.configuration).analyticsGet(days, startDate, endDate, options).then((request) => request(this.axios, this.basePath));
+ }
+
+ /**
+ * Get comprehensive analytics dashboard for a track
+ * @summary Get Track Analytics Dashboard
+ * @param {string} id Track ID
+ * @param {*} [options] Override http request option.
+ * @throws {RequiredError}
+ */
+ public analyticsTracksIdGet(id: string, options?: RawAxiosRequestConfig) {
+ return AnalyticsApiFp(this.configuration).analyticsTracksIdGet(id, options).then((request) => request(this.axios, this.basePath));
+ }
+
+ /**
+ * Get list of top tracks by play count, optionally filtered by date range
+ * @summary Get top tracks
+ * @param {number} [limit] Number of tracks to return
+ * @param {string} [startDate] Start date filter (RFC3339 format)
+ * @param {string} [endDate] End date filter (RFC3339 format)
+ * @param {*} [options] Override http request option.
+ * @throws {RequiredError}
+ */
+ public analyticsTracksTopGet(limit?: number, startDate?: string, endDate?: string, options?: RawAxiosRequestConfig) {
+ return AnalyticsApiFp(this.configuration).analyticsTracksTopGet(limit, startDate, endDate, options).then((request) => request(this.axios, this.basePath));
+ }
+
+ /**
+ * Get play statistics over time for a track, grouped by time period
+ * @summary Get plays over time
+ * @param {string} id Track ID (UUID)
+ * @param {string} [startDate] Start date (RFC3339 format)
+ * @param {string} [endDate] End date (RFC3339 format)
+ * @param {string} [interval] Time period grouping (hour, day, week, month)
+ * @param {*} [options] Override http request option.
+ * @throws {RequiredError}
+ */
+ public tracksIdAnalyticsPlaysGet(id: string, startDate?: string, endDate?: string, interval?: string, options?: RawAxiosRequestConfig) {
+ return AnalyticsApiFp(this.configuration).tracksIdAnalyticsPlaysGet(id, startDate, endDate, interval, options).then((request) => request(this.axios, this.basePath));
+ }
+
+ /**
+ * Record a play event for a track. Can be called anonymously or with authentication.
+ * @summary Record play
+ * @param {string} id Track ID (UUID)
+ * @param {InternalHandlersRecordPlayRequest} request Play event data
+ * @param {*} [options] Override http request option.
+ * @throws {RequiredError}
+ */
+ public tracksIdPlayPost(id: string, request: InternalHandlersRecordPlayRequest, options?: RawAxiosRequestConfig) {
+ return AnalyticsApiFp(this.configuration).tracksIdPlayPost(id, request, options).then((request) => request(this.axios, this.basePath));
+ }
+
+ /**
+ * Get statistics for a track (plays, likes, etc.)
+ * @summary Get track statistics
+ * @param {string} id Track ID (UUID)
+ * @param {*} [options] Override http request option.
+ * @throws {RequiredError}
+ */
+ public tracksIdStatsGet(id: string, options?: RawAxiosRequestConfig) {
+ return AnalyticsApiFp(this.configuration).tracksIdStatsGet(id, options).then((request) => request(this.axios, this.basePath));
+ }
+
+ /**
+ * Get analytics statistics for a user (total plays, tracks, etc.)
+ * @summary Get user statistics
+ * @param {string} id User ID (UUID)
+ * @param {*} [options] Override http request option.
+ * @throws {RequiredError}
+ */
+ public usersIdAnalyticsStatsGet(id: string, options?: RawAxiosRequestConfig) {
+ return AnalyticsApiFp(this.configuration).usersIdAnalyticsStatsGet(id, options).then((request) => request(this.axios, this.basePath));
+ }
+}
+
+
+
+/**
+ * AuditApi - axios parameter creator
+ */
+export const AuditApiAxiosParamCreator = function (configuration?: Configuration) {
+ return {
+ /**
+ * Get recent activity logs for the current user
+ * @summary Get user activity
+ * @param {number} [limit] Number of activities to return
+ * @param {*} [options] Override http request option.
+ * @throws {RequiredError}
+ */
+ auditActivityGet: async (limit?: number, options: RawAxiosRequestConfig = {}): Promise => {
+ const localVarPath = `/audit/activity`;
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
+ let baseOptions;
+ if (configuration) {
+ baseOptions = configuration.baseOptions;
+ }
+
+ const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options};
+ const localVarHeaderParameter = {} as any;
+ const localVarQueryParameter = {} as any;
+
+ // authentication BearerAuth required
+ await setApiKeyToObject(localVarHeaderParameter, "Authorization", configuration)
+
+ if (limit !== undefined) {
+ localVarQueryParameter['limit'] = limit;
+ }
+
+ localVarHeaderParameter['Accept'] = 'application/json';
+
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
+ localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
+
+ return {
+ url: toPathString(localVarUrlObj),
+ options: localVarRequestOptions,
+ };
+ },
+ /**
+ * Search and filter audit logs with pagination support. Supports filtering by action, resource, date range, IP address, and user agent.
+ * @summary Search audit logs
+ * @param {string} [action] Filter by action type
+ * @param {string} [resource] Filter by resource type
+ * @param {string} [resourceId] Filter by resource ID (UUID)
+ * @param {string} [ipAddress] Filter by IP address
+ * @param {string} [userAgent] Filter by user agent
+ * @param {string} [startDate] Start date filter (YYYY-MM-DD)
+ * @param {string} [endDate] End date filter (YYYY-MM-DD)
+ * @param {number} [page] Page number
+ * @param {number} [limit] Items per page
+ * @param {number} [offset] Offset for pagination
+ * @param {*} [options] Override http request option.
+ * @throws {RequiredError}
+ */
+ auditLogsGet: async (action?: string, resource?: string, resourceId?: string, ipAddress?: string, userAgent?: string, startDate?: string, endDate?: string, page?: number, limit?: number, offset?: number, options: RawAxiosRequestConfig = {}): Promise => {
+ const localVarPath = `/audit/logs`;
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
+ let baseOptions;
+ if (configuration) {
+ baseOptions = configuration.baseOptions;
+ }
+
+ const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options};
+ const localVarHeaderParameter = {} as any;
+ const localVarQueryParameter = {} as any;
+
+ // authentication BearerAuth required
+ await setApiKeyToObject(localVarHeaderParameter, "Authorization", configuration)
+
+ if (action !== undefined) {
+ localVarQueryParameter['action'] = action;
+ }
+
+ if (resource !== undefined) {
+ localVarQueryParameter['resource'] = resource;
+ }
+
+ if (resourceId !== undefined) {
+ localVarQueryParameter['resource_id'] = resourceId;
+ }
+
+ if (ipAddress !== undefined) {
+ localVarQueryParameter['ip_address'] = ipAddress;
+ }
+
+ if (userAgent !== undefined) {
+ localVarQueryParameter['user_agent'] = userAgent;
+ }
+
+ if (startDate !== undefined) {
+ localVarQueryParameter['start_date'] = startDate;
+ }
+
+ if (endDate !== undefined) {
+ localVarQueryParameter['end_date'] = endDate;
+ }
+
+ if (page !== undefined) {
+ localVarQueryParameter['page'] = page;
+ }
+
+ if (limit !== undefined) {
+ localVarQueryParameter['limit'] = limit;
+ }
+
+ if (offset !== undefined) {
+ localVarQueryParameter['offset'] = offset;
+ }
+
+ localVarHeaderParameter['Accept'] = 'application/json';
+
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
+ localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
+
+ return {
+ url: toPathString(localVarUrlObj),
+ options: localVarRequestOptions,
+ };
+ },
+ /**
+ * Get audit statistics for the current user, optionally filtered by date range
+ * @summary Get audit statistics
+ * @param {string} [startDate] Start date (YYYY-MM-DD)
+ * @param {string} [endDate] End date (YYYY-MM-DD)
+ * @param {*} [options] Override http request option.
+ * @throws {RequiredError}
+ */
+ auditStatsGet: async (startDate?: string, endDate?: string, options: RawAxiosRequestConfig = {}): Promise => {
+ const localVarPath = `/audit/stats`;
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
+ let baseOptions;
+ if (configuration) {
+ baseOptions = configuration.baseOptions;
+ }
+
+ const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options};
+ const localVarHeaderParameter = {} as any;
+ const localVarQueryParameter = {} as any;
+
+ // authentication BearerAuth required
+ await setApiKeyToObject(localVarHeaderParameter, "Authorization", configuration)
+
+ if (startDate !== undefined) {
+ localVarQueryParameter['start_date'] = startDate;
+ }
+
+ if (endDate !== undefined) {
+ localVarQueryParameter['end_date'] = endDate;
+ }
+
+ localVarHeaderParameter['Accept'] = 'application/json';
+
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
+ localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
+
+ return {
+ url: toPathString(localVarUrlObj),
+ options: localVarRequestOptions,
+ };
+ },
+ }
+};
+
+/**
+ * AuditApi - functional programming interface
+ */
+export const AuditApiFp = function(configuration?: Configuration) {
+ const localVarAxiosParamCreator = AuditApiAxiosParamCreator(configuration)
+ return {
+ /**
+ * Get recent activity logs for the current user
+ * @summary Get user activity
+ * @param {number} [limit] Number of activities to return
+ * @param {*} [options] Override http request option.
+ * @throws {RequiredError}
+ */
+ async auditActivityGet(limit?: number, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> {
+ const localVarAxiosArgs = await localVarAxiosParamCreator.auditActivityGet(limit, options);
+ const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
+ const localVarOperationServerBasePath = operationServerMap['AuditApi.auditActivityGet']?.[localVarOperationServerIndex]?.url;
+ return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
+ },
+ /**
+ * Search and filter audit logs with pagination support. Supports filtering by action, resource, date range, IP address, and user agent.
+ * @summary Search audit logs
+ * @param {string} [action] Filter by action type
+ * @param {string} [resource] Filter by resource type
+ * @param {string} [resourceId] Filter by resource ID (UUID)
+ * @param {string} [ipAddress] Filter by IP address
+ * @param {string} [userAgent] Filter by user agent
+ * @param {string} [startDate] Start date filter (YYYY-MM-DD)
+ * @param {string} [endDate] End date filter (YYYY-MM-DD)
+ * @param {number} [page] Page number
+ * @param {number} [limit] Items per page
+ * @param {number} [offset] Offset for pagination
+ * @param {*} [options] Override http request option.
+ * @throws {RequiredError}
+ */
+ async auditLogsGet(action?: string, resource?: string, resourceId?: string, ipAddress?: string, userAgent?: string, startDate?: string, endDate?: string, page?: number, limit?: number, offset?: number, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> {
+ const localVarAxiosArgs = await localVarAxiosParamCreator.auditLogsGet(action, resource, resourceId, ipAddress, userAgent, startDate, endDate, page, limit, offset, options);
+ const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
+ const localVarOperationServerBasePath = operationServerMap['AuditApi.auditLogsGet']?.[localVarOperationServerIndex]?.url;
+ return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
+ },
+ /**
+ * Get audit statistics for the current user, optionally filtered by date range
+ * @summary Get audit statistics
+ * @param {string} [startDate] Start date (YYYY-MM-DD)
+ * @param {string} [endDate] End date (YYYY-MM-DD)
+ * @param {*} [options] Override http request option.
+ * @throws {RequiredError}
+ */
+ async auditStatsGet(startDate?: string, endDate?: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> {
+ const localVarAxiosArgs = await localVarAxiosParamCreator.auditStatsGet(startDate, endDate, options);
+ const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
+ const localVarOperationServerBasePath = operationServerMap['AuditApi.auditStatsGet']?.[localVarOperationServerIndex]?.url;
+ return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
+ },
+ }
+};
+
+/**
+ * AuditApi - factory interface
+ */
+export const AuditApiFactory = function (configuration?: Configuration, basePath?: string, axios?: AxiosInstance) {
+ const localVarFp = AuditApiFp(configuration)
+ return {
+ /**
+ * Get recent activity logs for the current user
+ * @summary Get user activity
+ * @param {number} [limit] Number of activities to return
+ * @param {*} [options] Override http request option.
+ * @throws {RequiredError}
+ */
+ auditActivityGet(limit?: number, options?: RawAxiosRequestConfig): AxiosPromise {
+ return localVarFp.auditActivityGet(limit, options).then((request) => request(axios, basePath));
+ },
+ /**
+ * Search and filter audit logs with pagination support. Supports filtering by action, resource, date range, IP address, and user agent.
+ * @summary Search audit logs
+ * @param {string} [action] Filter by action type
+ * @param {string} [resource] Filter by resource type
+ * @param {string} [resourceId] Filter by resource ID (UUID)
+ * @param {string} [ipAddress] Filter by IP address
+ * @param {string} [userAgent] Filter by user agent
+ * @param {string} [startDate] Start date filter (YYYY-MM-DD)
+ * @param {string} [endDate] End date filter (YYYY-MM-DD)
+ * @param {number} [page] Page number
+ * @param {number} [limit] Items per page
+ * @param {number} [offset] Offset for pagination
+ * @param {*} [options] Override http request option.
+ * @throws {RequiredError}
+ */
+ auditLogsGet(action?: string, resource?: string, resourceId?: string, ipAddress?: string, userAgent?: string, startDate?: string, endDate?: string, page?: number, limit?: number, offset?: number, options?: RawAxiosRequestConfig): AxiosPromise {
+ return localVarFp.auditLogsGet(action, resource, resourceId, ipAddress, userAgent, startDate, endDate, page, limit, offset, options).then((request) => request(axios, basePath));
+ },
+ /**
+ * Get audit statistics for the current user, optionally filtered by date range
+ * @summary Get audit statistics
+ * @param {string} [startDate] Start date (YYYY-MM-DD)
+ * @param {string} [endDate] End date (YYYY-MM-DD)
+ * @param {*} [options] Override http request option.
+ * @throws {RequiredError}
+ */
+ auditStatsGet(startDate?: string, endDate?: string, options?: RawAxiosRequestConfig): AxiosPromise {
+ return localVarFp.auditStatsGet(startDate, endDate, options).then((request) => request(axios, basePath));
+ },
+ };
+};
+
+/**
+ * AuditApi - interface
+ */
+export interface AuditApiInterface {
+ /**
+ * Get recent activity logs for the current user
+ * @summary Get user activity
+ * @param {number} [limit] Number of activities to return
+ * @param {*} [options] Override http request option.
+ * @throws {RequiredError}
+ */
+ auditActivityGet(limit?: number, options?: RawAxiosRequestConfig): AxiosPromise;
+
+ /**
+ * Search and filter audit logs with pagination support. Supports filtering by action, resource, date range, IP address, and user agent.
+ * @summary Search audit logs
+ * @param {string} [action] Filter by action type
+ * @param {string} [resource] Filter by resource type
+ * @param {string} [resourceId] Filter by resource ID (UUID)
+ * @param {string} [ipAddress] Filter by IP address
+ * @param {string} [userAgent] Filter by user agent
+ * @param {string} [startDate] Start date filter (YYYY-MM-DD)
+ * @param {string} [endDate] End date filter (YYYY-MM-DD)
+ * @param {number} [page] Page number
+ * @param {number} [limit] Items per page
+ * @param {number} [offset] Offset for pagination
+ * @param {*} [options] Override http request option.
+ * @throws {RequiredError}
+ */
+ auditLogsGet(action?: string, resource?: string, resourceId?: string, ipAddress?: string, userAgent?: string, startDate?: string, endDate?: string, page?: number, limit?: number, offset?: number, options?: RawAxiosRequestConfig): AxiosPromise;
+
+ /**
+ * Get audit statistics for the current user, optionally filtered by date range
+ * @summary Get audit statistics
+ * @param {string} [startDate] Start date (YYYY-MM-DD)
+ * @param {string} [endDate] End date (YYYY-MM-DD)
+ * @param {*} [options] Override http request option.
+ * @throws {RequiredError}
+ */
+ auditStatsGet(startDate?: string, endDate?: string, options?: RawAxiosRequestConfig): AxiosPromise;
+
+}
+
+/**
+ * AuditApi - object-oriented interface
+ */
+export class AuditApi extends BaseAPI implements AuditApiInterface {
+ /**
+ * Get recent activity logs for the current user
+ * @summary Get user activity
+ * @param {number} [limit] Number of activities to return
+ * @param {*} [options] Override http request option.
+ * @throws {RequiredError}
+ */
+ public auditActivityGet(limit?: number, options?: RawAxiosRequestConfig) {
+ return AuditApiFp(this.configuration).auditActivityGet(limit, options).then((request) => request(this.axios, this.basePath));
+ }
+
+ /**
+ * Search and filter audit logs with pagination support. Supports filtering by action, resource, date range, IP address, and user agent.
+ * @summary Search audit logs
+ * @param {string} [action] Filter by action type
+ * @param {string} [resource] Filter by resource type
+ * @param {string} [resourceId] Filter by resource ID (UUID)
+ * @param {string} [ipAddress] Filter by IP address
+ * @param {string} [userAgent] Filter by user agent
+ * @param {string} [startDate] Start date filter (YYYY-MM-DD)
+ * @param {string} [endDate] End date filter (YYYY-MM-DD)
+ * @param {number} [page] Page number
+ * @param {number} [limit] Items per page
+ * @param {number} [offset] Offset for pagination
+ * @param {*} [options] Override http request option.
+ * @throws {RequiredError}
+ */
+ public auditLogsGet(action?: string, resource?: string, resourceId?: string, ipAddress?: string, userAgent?: string, startDate?: string, endDate?: string, page?: number, limit?: number, offset?: number, options?: RawAxiosRequestConfig) {
+ return AuditApiFp(this.configuration).auditLogsGet(action, resource, resourceId, ipAddress, userAgent, startDate, endDate, page, limit, offset, options).then((request) => request(this.axios, this.basePath));
+ }
+
+ /**
+ * Get audit statistics for the current user, optionally filtered by date range
+ * @summary Get audit statistics
+ * @param {string} [startDate] Start date (YYYY-MM-DD)
+ * @param {string} [endDate] End date (YYYY-MM-DD)
+ * @param {*} [options] Override http request option.
+ * @throws {RequiredError}
+ */
+ public auditStatsGet(startDate?: string, endDate?: string, options?: RawAxiosRequestConfig) {
+ return AuditApiFp(this.configuration).auditStatsGet(startDate, endDate, options).then((request) => request(this.axios, this.basePath));
+ }
+}
+
+
+
+/**
+ * AuthApi - axios parameter creator
+ */
+export const AuthApiAxiosParamCreator = function (configuration?: Configuration) {
+ return {
+ /**
+ * Disable 2FA for user (requires password confirmation)
+ * @summary Disable 2FA
+ * @param {InternalHandlersDisableTwoFactorRequest} request Password Confirmation
+ * @param {*} [options] Override http request option.
+ * @throws {RequiredError}
+ */
+ auth2faDisablePost: async (request: InternalHandlersDisableTwoFactorRequest, options: RawAxiosRequestConfig = {}): Promise => {
+ // verify required parameter 'request' is not null or undefined
+ assertParamExists('auth2faDisablePost', 'request', request)
+ const localVarPath = `/auth/2fa/disable`;
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
+ let baseOptions;
+ if (configuration) {
+ baseOptions = configuration.baseOptions;
+ }
+
+ const localVarRequestOptions = { method: 'POST', ...baseOptions, ...options};
+ const localVarHeaderParameter = {} as any;
+ const localVarQueryParameter = {} as any;
+
+ // authentication BearerAuth required
+ await setApiKeyToObject(localVarHeaderParameter, "Authorization", configuration)
+
+ localVarHeaderParameter['Content-Type'] = 'application/json';
+ localVarHeaderParameter['Accept'] = 'application/json';
+
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
+ localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
+ localVarRequestOptions.data = serializeDataIfNeeded(request, localVarRequestOptions, configuration)
+
+ return {
+ url: toPathString(localVarUrlObj),
+ options: localVarRequestOptions,
+ };
+ },
+ /**
+ * Generate 2FA secret and QR code for setup
+ * @summary Setup 2FA
+ * @param {*} [options] Override http request option.
+ * @throws {RequiredError}
+ */
+ auth2faSetupPost: async (options: RawAxiosRequestConfig = {}): Promise => {
+ const localVarPath = `/auth/2fa/setup`;
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
+ let baseOptions;
+ if (configuration) {
+ baseOptions = configuration.baseOptions;
+ }
+
+ const localVarRequestOptions = { method: 'POST', ...baseOptions, ...options};
+ const localVarHeaderParameter = {} as any;
+ const localVarQueryParameter = {} as any;
+
+ // authentication BearerAuth required
+ await setApiKeyToObject(localVarHeaderParameter, "Authorization", configuration)
+
+ localVarHeaderParameter['Accept'] = 'application/json';
+
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
+ localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
+
+ return {
+ url: toPathString(localVarUrlObj),
+ options: localVarRequestOptions,
+ };
+ },
+ /**
+ * Get 2FA enabled status for authenticated user
+ * @summary Get 2FA Status
+ * @param {*} [options] Override http request option.
+ * @throws {RequiredError}
+ */
+ auth2faStatusGet: async (options: RawAxiosRequestConfig = {}): Promise => {
+ const localVarPath = `/auth/2fa/status`;
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
+ let baseOptions;
+ if (configuration) {
+ baseOptions = configuration.baseOptions;
+ }
+
+ const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options};
+ const localVarHeaderParameter = {} as any;
+ const localVarQueryParameter = {} as any;
+
+ // authentication BearerAuth required
+ await setApiKeyToObject(localVarHeaderParameter, "Authorization", configuration)
+
+ localVarHeaderParameter['Accept'] = 'application/json';
+
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
+ localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
+
+ return {
+ url: toPathString(localVarUrlObj),
+ options: localVarRequestOptions,
+ };
+ },
+ /**
+ * Verify 2FA code and enable 2FA for user
+ * @summary Verify and Enable 2FA
+ * @param {InternalHandlersVerifyTwoFactorRequest} request 2FA Code
+ * @param {*} [options] Override http request option.
+ * @throws {RequiredError}
+ */
+ auth2faVerifyPost: async (request: InternalHandlersVerifyTwoFactorRequest, options: RawAxiosRequestConfig = {}): Promise => {
+ // verify required parameter 'request' is not null or undefined
+ assertParamExists('auth2faVerifyPost', 'request', request)
+ const localVarPath = `/auth/2fa/verify`;
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
+ let baseOptions;
+ if (configuration) {
+ baseOptions = configuration.baseOptions;
+ }
+
+ const localVarRequestOptions = { method: 'POST', ...baseOptions, ...options};
+ const localVarHeaderParameter = {} as any;
+ const localVarQueryParameter = {} as any;
+
+ // authentication BearerAuth required
+ await setApiKeyToObject(localVarHeaderParameter, "Authorization", configuration)
+
+ localVarHeaderParameter['Content-Type'] = 'application/json';
+ localVarHeaderParameter['Accept'] = 'application/json';
+
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
+ localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
+ localVarRequestOptions.data = serializeDataIfNeeded(request, localVarRequestOptions, configuration)
+
+ return {
+ url: toPathString(localVarUrlObj),
+ options: localVarRequestOptions,
+ };
+ },
+ /**
+ * Check if a username is already taken
+ * @summary Check Username Availability
+ * @param {string} username Username to check
+ * @param {*} [options] Override http request option.
+ * @throws {RequiredError}
+ */
+ authCheckUsernameGet: async (username: string, options: RawAxiosRequestConfig = {}): Promise => {
+ // verify required parameter 'username' is not null or undefined
+ assertParamExists('authCheckUsernameGet', 'username', username)
+ const localVarPath = `/auth/check-username`;
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
+ let baseOptions;
+ if (configuration) {
+ baseOptions = configuration.baseOptions;
+ }
+
+ const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options};
+ const localVarHeaderParameter = {} as any;
+ const localVarQueryParameter = {} as any;
+
+ if (username !== undefined) {
+ localVarQueryParameter['username'] = username;
+ }
+
+ localVarHeaderParameter['Accept'] = 'application/json';
+
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
+ localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
+
+ return {
+ url: toPathString(localVarUrlObj),
+ options: localVarRequestOptions,
+ };
+ },
+ /**
+ * Authenticate user and return access token. Refresh token is set in httpOnly cookie.
+ * @summary User Login
+ * @param {VezaBackendApiInternalDtoLoginRequest} request Login Credentials
+ * @param {*} [options] Override http request option.
+ * @throws {RequiredError}
+ */
+ authLoginPost: async (request: VezaBackendApiInternalDtoLoginRequest, options: RawAxiosRequestConfig = {}): Promise => {
+ // verify required parameter 'request' is not null or undefined
+ assertParamExists('authLoginPost', 'request', request)
+ const localVarPath = `/auth/login`;
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
+ let baseOptions;
+ if (configuration) {
+ baseOptions = configuration.baseOptions;
+ }
+
+ const localVarRequestOptions = { method: 'POST', ...baseOptions, ...options};
+ const localVarHeaderParameter = {} as any;
+ const localVarQueryParameter = {} as any;
+
+ localVarHeaderParameter['Content-Type'] = 'application/json';
+ localVarHeaderParameter['Accept'] = 'application/json';
+
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
+ localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
+ localVarRequestOptions.data = serializeDataIfNeeded(request, localVarRequestOptions, configuration)
+
+ return {
+ url: toPathString(localVarUrlObj),
+ options: localVarRequestOptions,
+ };
+ },
+ /**
+ * Revoke refresh token and current session
+ * @summary Logout
+ * @param {AuthLogoutPostRequest} request Refresh Token to revoke
+ * @param {*} [options] Override http request option.
+ * @throws {RequiredError}
+ */
+ authLogoutPost: async (request: AuthLogoutPostRequest, options: RawAxiosRequestConfig = {}): Promise => {
+ // verify required parameter 'request' is not null or undefined
+ assertParamExists('authLogoutPost', 'request', request)
+ const localVarPath = `/auth/logout`;
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
+ let baseOptions;
+ if (configuration) {
+ baseOptions = configuration.baseOptions;
+ }
+
+ const localVarRequestOptions = { method: 'POST', ...baseOptions, ...options};
+ const localVarHeaderParameter = {} as any;
+ const localVarQueryParameter = {} as any;
+
+ // authentication BearerAuth required
+ await setApiKeyToObject(localVarHeaderParameter, "Authorization", configuration)
+
+ localVarHeaderParameter['Content-Type'] = 'application/json';
+ localVarHeaderParameter['Accept'] = 'application/json';
+
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
+ localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
+ localVarRequestOptions.data = serializeDataIfNeeded(request, localVarRequestOptions, configuration)
+
+ return {
+ url: toPathString(localVarUrlObj),
+ options: localVarRequestOptions,
+ };
+ },
+ /**
+ * Get profile information of the currently logged-in user
+ * @summary Get Current User
+ * @param {*} [options] Override http request option.
+ * @throws {RequiredError}
+ */
+ authMeGet: async (options: RawAxiosRequestConfig = {}): Promise => {
+ const localVarPath = `/auth/me`;
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
+ let baseOptions;
+ if (configuration) {
+ baseOptions = configuration.baseOptions;
+ }
+
+ const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options};
+ const localVarHeaderParameter = {} as any;
+ const localVarQueryParameter = {} as any;
+
+ // authentication BearerAuth required
+ await setApiKeyToObject(localVarHeaderParameter, "Authorization", configuration)
+
+ localVarHeaderParameter['Accept'] = 'application/json';
+
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
+ localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
+
+ return {
+ url: toPathString(localVarUrlObj),
+ options: localVarRequestOptions,
+ };
+ },
+ /**
+ * Get a new access token using a refresh token
+ * @summary Refresh Token
+ * @param {VezaBackendApiInternalDtoRefreshRequest} request Refresh Token
+ * @param {*} [options] Override http request option.
+ * @throws {RequiredError}
+ */
+ authRefreshPost: async (request: VezaBackendApiInternalDtoRefreshRequest, options: RawAxiosRequestConfig = {}): Promise => {
+ // verify required parameter 'request' is not null or undefined
+ assertParamExists('authRefreshPost', 'request', request)
+ const localVarPath = `/auth/refresh`;
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
+ let baseOptions;
+ if (configuration) {
+ baseOptions = configuration.baseOptions;
+ }
+
+ const localVarRequestOptions = { method: 'POST', ...baseOptions, ...options};
+ const localVarHeaderParameter = {} as any;
+ const localVarQueryParameter = {} as any;
+
+ localVarHeaderParameter['Content-Type'] = 'application/json';
+ localVarHeaderParameter['Accept'] = 'application/json';
+
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
+ localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
+ localVarRequestOptions.data = serializeDataIfNeeded(request, localVarRequestOptions, configuration)
+
+ return {
+ url: toPathString(localVarUrlObj),
+ options: localVarRequestOptions,
+ };
+ },
+ /**
+ * Register a new user account
+ * @summary User Registration
+ * @param {VezaBackendApiInternalDtoRegisterRequest} request Registration Data
+ * @param {*} [options] Override http request option.
+ * @throws {RequiredError}
+ */
+ authRegisterPost: async (request: VezaBackendApiInternalDtoRegisterRequest, options: RawAxiosRequestConfig = {}): Promise => {
+ // verify required parameter 'request' is not null or undefined
+ assertParamExists('authRegisterPost', 'request', request)
+ const localVarPath = `/auth/register`;
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
+ let baseOptions;
+ if (configuration) {
+ baseOptions = configuration.baseOptions;
+ }
+
+ const localVarRequestOptions = { method: 'POST', ...baseOptions, ...options};
+ const localVarHeaderParameter = {} as any;
+ const localVarQueryParameter = {} as any;
+
+ localVarHeaderParameter['Content-Type'] = 'application/json';
+ localVarHeaderParameter['Accept'] = 'application/json';
+
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
+ localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
+ localVarRequestOptions.data = serializeDataIfNeeded(request, localVarRequestOptions, configuration)
+
+ return {
+ url: toPathString(localVarUrlObj),
+ options: localVarRequestOptions,
+ };
+ },
+ /**
+ * Resend the email verification link
+ * @summary Resend Verification Email
+ * @param {VezaBackendApiInternalDtoResendVerificationRequest} request Email
+ * @param {*} [options] Override http request option.
+ * @throws {RequiredError}
+ */
+ authResendVerificationPost: async (request: VezaBackendApiInternalDtoResendVerificationRequest, options: RawAxiosRequestConfig = {}): Promise => {
+ // verify required parameter 'request' is not null or undefined
+ assertParamExists('authResendVerificationPost', 'request', request)
+ const localVarPath = `/auth/resend-verification`;
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
+ let baseOptions;
+ if (configuration) {
+ baseOptions = configuration.baseOptions;
+ }
+
+ const localVarRequestOptions = { method: 'POST', ...baseOptions, ...options};
+ const localVarHeaderParameter = {} as any;
+ const localVarQueryParameter = {} as any;
+
+ localVarHeaderParameter['Content-Type'] = 'application/json';
+ localVarHeaderParameter['Accept'] = 'application/json';
+
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
+ localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
+ localVarRequestOptions.data = serializeDataIfNeeded(request, localVarRequestOptions, configuration)
+
+ return {
+ url: toPathString(localVarUrlObj),
+ options: localVarRequestOptions,
+ };
+ },
+ /**
+ * Verify user email address using a token
+ * @summary Verify Email
+ * @param {string} token Verification Token
+ * @param {*} [options] Override http request option.
+ * @throws {RequiredError}
+ */
+ authVerifyEmailPost: async (token: string, options: RawAxiosRequestConfig = {}): Promise => {
+ // verify required parameter 'token' is not null or undefined
+ assertParamExists('authVerifyEmailPost', 'token', token)
+ const localVarPath = `/auth/verify-email`;
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
+ let baseOptions;
+ if (configuration) {
+ baseOptions = configuration.baseOptions;
+ }
+
+ const localVarRequestOptions = { method: 'POST', ...baseOptions, ...options};
+ const localVarHeaderParameter = {} as any;
+ const localVarQueryParameter = {} as any;
+
+ if (token !== undefined) {
+ localVarQueryParameter['token'] = token;
+ }
+
+ localVarHeaderParameter['Accept'] = 'application/json';
+
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
+ localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
+
+ return {
+ url: toPathString(localVarUrlObj),
+ options: localVarRequestOptions,
+ };
+ },
+ }
+};
+
+/**
+ * AuthApi - functional programming interface
+ */
+export const AuthApiFp = function(configuration?: Configuration) {
+ const localVarAxiosParamCreator = AuthApiAxiosParamCreator(configuration)
+ return {
+ /**
+ * Disable 2FA for user (requires password confirmation)
+ * @summary Disable 2FA
+ * @param {InternalHandlersDisableTwoFactorRequest} request Password Confirmation
+ * @param {*} [options] Override http request option.
+ * @throws {RequiredError}
+ */
+ async auth2faDisablePost(request: InternalHandlersDisableTwoFactorRequest, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> {
+ const localVarAxiosArgs = await localVarAxiosParamCreator.auth2faDisablePost(request, options);
+ const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
+ const localVarOperationServerBasePath = operationServerMap['AuthApi.auth2faDisablePost']?.[localVarOperationServerIndex]?.url;
+ return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
+ },
+ /**
+ * Generate 2FA secret and QR code for setup
+ * @summary Setup 2FA
+ * @param {*} [options] Override http request option.
+ * @throws {RequiredError}
+ */
+ async auth2faSetupPost(options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> {
+ const localVarAxiosArgs = await localVarAxiosParamCreator.auth2faSetupPost(options);
+ const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
+ const localVarOperationServerBasePath = operationServerMap['AuthApi.auth2faSetupPost']?.[localVarOperationServerIndex]?.url;
+ return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
+ },
+ /**
+ * Get 2FA enabled status for authenticated user
+ * @summary Get 2FA Status
+ * @param {*} [options] Override http request option.
+ * @throws {RequiredError}
+ */
+ async auth2faStatusGet(options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> {
+ const localVarAxiosArgs = await localVarAxiosParamCreator.auth2faStatusGet(options);
+ const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
+ const localVarOperationServerBasePath = operationServerMap['AuthApi.auth2faStatusGet']?.[localVarOperationServerIndex]?.url;
+ return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
+ },
+ /**
+ * Verify 2FA code and enable 2FA for user
+ * @summary Verify and Enable 2FA
+ * @param {InternalHandlersVerifyTwoFactorRequest} request 2FA Code
+ * @param {*} [options] Override http request option.
+ * @throws {RequiredError}
+ */
+ async auth2faVerifyPost(request: InternalHandlersVerifyTwoFactorRequest, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> {
+ const localVarAxiosArgs = await localVarAxiosParamCreator.auth2faVerifyPost(request, options);
+ const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
+ const localVarOperationServerBasePath = operationServerMap['AuthApi.auth2faVerifyPost']?.[localVarOperationServerIndex]?.url;
+ return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
+ },
+ /**
+ * Check if a username is already taken
+ * @summary Check Username Availability
+ * @param {string} username Username to check
+ * @param {*} [options] Override http request option.
+ * @throws {RequiredError}
+ */
+ async authCheckUsernameGet(username: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> {
+ const localVarAxiosArgs = await localVarAxiosParamCreator.authCheckUsernameGet(username, options);
+ const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
+ const localVarOperationServerBasePath = operationServerMap['AuthApi.authCheckUsernameGet']?.[localVarOperationServerIndex]?.url;
+ return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
+ },
+ /**
+ * Authenticate user and return access token. Refresh token is set in httpOnly cookie.
+ * @summary User Login
+ * @param {VezaBackendApiInternalDtoLoginRequest} request Login Credentials
+ * @param {*} [options] Override http request option.
+ * @throws {RequiredError}
+ */
+ async authLoginPost(request: VezaBackendApiInternalDtoLoginRequest, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> {
+ const localVarAxiosArgs = await localVarAxiosParamCreator.authLoginPost(request, options);
+ const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
+ const localVarOperationServerBasePath = operationServerMap['AuthApi.authLoginPost']?.[localVarOperationServerIndex]?.url;
+ return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
+ },
+ /**
+ * Revoke refresh token and current session
+ * @summary Logout
+ * @param {AuthLogoutPostRequest} request Refresh Token to revoke
+ * @param {*} [options] Override http request option.
+ * @throws {RequiredError}
+ */
+ async authLogoutPost(request: AuthLogoutPostRequest, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> {
+ const localVarAxiosArgs = await localVarAxiosParamCreator.authLogoutPost(request, options);
+ const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
+ const localVarOperationServerBasePath = operationServerMap['AuthApi.authLogoutPost']?.[localVarOperationServerIndex]?.url;
+ return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
+ },
+ /**
+ * Get profile information of the currently logged-in user
+ * @summary Get Current User
+ * @param {*} [options] Override http request option.
+ * @throws {RequiredError}
+ */
+ async authMeGet(options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> {
+ const localVarAxiosArgs = await localVarAxiosParamCreator.authMeGet(options);
+ const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
+ const localVarOperationServerBasePath = operationServerMap['AuthApi.authMeGet']?.[localVarOperationServerIndex]?.url;
+ return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
+ },
+ /**
+ * Get a new access token using a refresh token
+ * @summary Refresh Token
+ * @param {VezaBackendApiInternalDtoRefreshRequest} request Refresh Token
+ * @param {*} [options] Override http request option.
+ * @throws {RequiredError}
+ */
+ async authRefreshPost(request: VezaBackendApiInternalDtoRefreshRequest, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> {
+ const localVarAxiosArgs = await localVarAxiosParamCreator.authRefreshPost(request, options);
+ const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
+ const localVarOperationServerBasePath = operationServerMap['AuthApi.authRefreshPost']?.[localVarOperationServerIndex]?.url;
+ return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
+ },
+ /**
+ * Register a new user account
+ * @summary User Registration
+ * @param {VezaBackendApiInternalDtoRegisterRequest} request Registration Data
+ * @param {*} [options] Override http request option.
+ * @throws {RequiredError}
+ */
+ async authRegisterPost(request: VezaBackendApiInternalDtoRegisterRequest, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> {
+ const localVarAxiosArgs = await localVarAxiosParamCreator.authRegisterPost(request, options);
+ const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
+ const localVarOperationServerBasePath = operationServerMap['AuthApi.authRegisterPost']?.[localVarOperationServerIndex]?.url;
+ return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
+ },
+ /**
+ * Resend the email verification link
+ * @summary Resend Verification Email
+ * @param {VezaBackendApiInternalDtoResendVerificationRequest} request Email
+ * @param {*} [options] Override http request option.
+ * @throws {RequiredError}
+ */
+ async authResendVerificationPost(request: VezaBackendApiInternalDtoResendVerificationRequest, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> {
+ const localVarAxiosArgs = await localVarAxiosParamCreator.authResendVerificationPost(request, options);
+ const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
+ const localVarOperationServerBasePath = operationServerMap['AuthApi.authResendVerificationPost']?.[localVarOperationServerIndex]?.url;
+ return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
+ },
+ /**
+ * Verify user email address using a token
+ * @summary Verify Email
+ * @param {string} token Verification Token
+ * @param {*} [options] Override http request option.
+ * @throws {RequiredError}
+ */
+ async authVerifyEmailPost(token: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> {
+ const localVarAxiosArgs = await localVarAxiosParamCreator.authVerifyEmailPost(token, options);
+ const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
+ const localVarOperationServerBasePath = operationServerMap['AuthApi.authVerifyEmailPost']?.[localVarOperationServerIndex]?.url;
+ return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
+ },
+ }
+};
+
+/**
+ * AuthApi - factory interface
+ */
+export const AuthApiFactory = function (configuration?: Configuration, basePath?: string, axios?: AxiosInstance) {
+ const localVarFp = AuthApiFp(configuration)
+ return {
+ /**
+ * Disable 2FA for user (requires password confirmation)
+ * @summary Disable 2FA
+ * @param {InternalHandlersDisableTwoFactorRequest} request Password Confirmation
+ * @param {*} [options] Override http request option.
+ * @throws {RequiredError}
+ */
+ auth2faDisablePost(request: InternalHandlersDisableTwoFactorRequest, options?: RawAxiosRequestConfig): AxiosPromise {
+ return localVarFp.auth2faDisablePost(request, options).then((request) => request(axios, basePath));
+ },
+ /**
+ * Generate 2FA secret and QR code for setup
+ * @summary Setup 2FA
+ * @param {*} [options] Override http request option.
+ * @throws {RequiredError}
+ */
+ auth2faSetupPost(options?: RawAxiosRequestConfig): AxiosPromise {
+ return localVarFp.auth2faSetupPost(options).then((request) => request(axios, basePath));
+ },
+ /**
+ * Get 2FA enabled status for authenticated user
+ * @summary Get 2FA Status
+ * @param {*} [options] Override http request option.
+ * @throws {RequiredError}
+ */
+ auth2faStatusGet(options?: RawAxiosRequestConfig): AxiosPromise {
+ return localVarFp.auth2faStatusGet(options).then((request) => request(axios, basePath));
+ },
+ /**
+ * Verify 2FA code and enable 2FA for user
+ * @summary Verify and Enable 2FA
+ * @param {InternalHandlersVerifyTwoFactorRequest} request 2FA Code
+ * @param {*} [options] Override http request option.
+ * @throws {RequiredError}
+ */
+ auth2faVerifyPost(request: InternalHandlersVerifyTwoFactorRequest, options?: RawAxiosRequestConfig): AxiosPromise {
+ return localVarFp.auth2faVerifyPost(request, options).then((request) => request(axios, basePath));
+ },
+ /**
+ * Check if a username is already taken
+ * @summary Check Username Availability
+ * @param {string} username Username to check
+ * @param {*} [options] Override http request option.
+ * @throws {RequiredError}
+ */
+ authCheckUsernameGet(username: string, options?: RawAxiosRequestConfig): AxiosPromise {
+ return localVarFp.authCheckUsernameGet(username, options).then((request) => request(axios, basePath));
+ },
+ /**
+ * Authenticate user and return access token. Refresh token is set in httpOnly cookie.
+ * @summary User Login
+ * @param {VezaBackendApiInternalDtoLoginRequest} request Login Credentials
+ * @param {*} [options] Override http request option.
+ * @throws {RequiredError}
+ */
+ authLoginPost(request: VezaBackendApiInternalDtoLoginRequest, options?: RawAxiosRequestConfig): AxiosPromise {
+ return localVarFp.authLoginPost(request, options).then((request) => request(axios, basePath));
+ },
+ /**
+ * Revoke refresh token and current session
+ * @summary Logout
+ * @param {AuthLogoutPostRequest} request Refresh Token to revoke
+ * @param {*} [options] Override http request option.
+ * @throws {RequiredError}
+ */
+ authLogoutPost(request: AuthLogoutPostRequest, options?: RawAxiosRequestConfig): AxiosPromise {
+ return localVarFp.authLogoutPost(request, options).then((request) => request(axios, basePath));
+ },
+ /**
+ * Get profile information of the currently logged-in user
+ * @summary Get Current User
+ * @param {*} [options] Override http request option.
+ * @throws {RequiredError}
+ */
+ authMeGet(options?: RawAxiosRequestConfig): AxiosPromise {
+ return localVarFp.authMeGet(options).then((request) => request(axios, basePath));
+ },
+ /**
+ * Get a new access token using a refresh token
+ * @summary Refresh Token
+ * @param {VezaBackendApiInternalDtoRefreshRequest} request Refresh Token
+ * @param {*} [options] Override http request option.
+ * @throws {RequiredError}
+ */
+ authRefreshPost(request: VezaBackendApiInternalDtoRefreshRequest, options?: RawAxiosRequestConfig): AxiosPromise {
+ return localVarFp.authRefreshPost(request, options).then((request) => request(axios, basePath));
+ },
+ /**
+ * Register a new user account
+ * @summary User Registration
+ * @param {VezaBackendApiInternalDtoRegisterRequest} request Registration Data
+ * @param {*} [options] Override http request option.
+ * @throws {RequiredError}
+ */
+ authRegisterPost(request: VezaBackendApiInternalDtoRegisterRequest, options?: RawAxiosRequestConfig): AxiosPromise {
+ return localVarFp.authRegisterPost(request, options).then((request) => request(axios, basePath));
+ },
+ /**
+ * Resend the email verification link
+ * @summary Resend Verification Email
+ * @param {VezaBackendApiInternalDtoResendVerificationRequest} request Email
+ * @param {*} [options] Override http request option.
+ * @throws {RequiredError}
+ */
+ authResendVerificationPost(request: VezaBackendApiInternalDtoResendVerificationRequest, options?: RawAxiosRequestConfig): AxiosPromise {
+ return localVarFp.authResendVerificationPost(request, options).then((request) => request(axios, basePath));
+ },
+ /**
+ * Verify user email address using a token
+ * @summary Verify Email
+ * @param {string} token Verification Token
+ * @param {*} [options] Override http request option.
+ * @throws {RequiredError}
+ */
+ authVerifyEmailPost(token: string, options?: RawAxiosRequestConfig): AxiosPromise {
+ return localVarFp.authVerifyEmailPost(token, options).then((request) => request(axios, basePath));
+ },
+ };
+};
+
+/**
+ * AuthApi - interface
+ */
+export interface AuthApiInterface {
+ /**
+ * Disable 2FA for user (requires password confirmation)
+ * @summary Disable 2FA
+ * @param {InternalHandlersDisableTwoFactorRequest} request Password Confirmation
+ * @param {*} [options] Override http request option.
+ * @throws {RequiredError}
+ */
+ auth2faDisablePost(request: InternalHandlersDisableTwoFactorRequest, options?: RawAxiosRequestConfig): AxiosPromise;
+
+ /**
+ * Generate 2FA secret and QR code for setup
+ * @summary Setup 2FA
+ * @param {*} [options] Override http request option.
+ * @throws {RequiredError}
+ */
+ auth2faSetupPost(options?: RawAxiosRequestConfig): AxiosPromise;
+
+ /**
+ * Get 2FA enabled status for authenticated user
+ * @summary Get 2FA Status
+ * @param {*} [options] Override http request option.
+ * @throws {RequiredError}
+ */
+ auth2faStatusGet(options?: RawAxiosRequestConfig): AxiosPromise;
+
+ /**
+ * Verify 2FA code and enable 2FA for user
+ * @summary Verify and Enable 2FA
+ * @param {InternalHandlersVerifyTwoFactorRequest} request 2FA Code
+ * @param {*} [options] Override http request option.
+ * @throws {RequiredError}
+ */
+ auth2faVerifyPost(request: InternalHandlersVerifyTwoFactorRequest, options?: RawAxiosRequestConfig): AxiosPromise;
+
+ /**
+ * Check if a username is already taken
+ * @summary Check Username Availability
+ * @param {string} username Username to check
+ * @param {*} [options] Override http request option.
+ * @throws {RequiredError}
+ */
+ authCheckUsernameGet(username: string, options?: RawAxiosRequestConfig): AxiosPromise;
+
+ /**
+ * Authenticate user and return access token. Refresh token is set in httpOnly cookie.
+ * @summary User Login
+ * @param {VezaBackendApiInternalDtoLoginRequest} request Login Credentials
+ * @param {*} [options] Override http request option.
+ * @throws {RequiredError}
+ */
+ authLoginPost(request: VezaBackendApiInternalDtoLoginRequest, options?: RawAxiosRequestConfig): AxiosPromise;
+
+ /**
+ * Revoke refresh token and current session
+ * @summary Logout
+ * @param {AuthLogoutPostRequest} request Refresh Token to revoke
+ * @param {*} [options] Override http request option.
+ * @throws {RequiredError}
+ */
+ authLogoutPost(request: AuthLogoutPostRequest, options?: RawAxiosRequestConfig): AxiosPromise;
+
+ /**
+ * Get profile information of the currently logged-in user
+ * @summary Get Current User
+ * @param {*} [options] Override http request option.
+ * @throws {RequiredError}
+ */
+ authMeGet(options?: RawAxiosRequestConfig): AxiosPromise;
+
+ /**
+ * Get a new access token using a refresh token
+ * @summary Refresh Token
+ * @param {VezaBackendApiInternalDtoRefreshRequest} request Refresh Token
+ * @param {*} [options] Override http request option.
+ * @throws {RequiredError}
+ */
+ authRefreshPost(request: VezaBackendApiInternalDtoRefreshRequest, options?: RawAxiosRequestConfig): AxiosPromise;
+
+ /**
+ * Register a new user account
+ * @summary User Registration
+ * @param {VezaBackendApiInternalDtoRegisterRequest} request Registration Data
+ * @param {*} [options] Override http request option.
+ * @throws {RequiredError}
+ */
+ authRegisterPost(request: VezaBackendApiInternalDtoRegisterRequest, options?: RawAxiosRequestConfig): AxiosPromise;
+
+ /**
+ * Resend the email verification link
+ * @summary Resend Verification Email
+ * @param {VezaBackendApiInternalDtoResendVerificationRequest} request Email
+ * @param {*} [options] Override http request option.
+ * @throws {RequiredError}
+ */
+ authResendVerificationPost(request: VezaBackendApiInternalDtoResendVerificationRequest, options?: RawAxiosRequestConfig): AxiosPromise;
+
+ /**
+ * Verify user email address using a token
+ * @summary Verify Email
+ * @param {string} token Verification Token
+ * @param {*} [options] Override http request option.
+ * @throws {RequiredError}
+ */
+ authVerifyEmailPost(token: string, options?: RawAxiosRequestConfig): AxiosPromise;
+
+}
+
+/**
+ * AuthApi - object-oriented interface
+ */
+export class AuthApi extends BaseAPI implements AuthApiInterface {
+ /**
+ * Disable 2FA for user (requires password confirmation)
+ * @summary Disable 2FA
+ * @param {InternalHandlersDisableTwoFactorRequest} request Password Confirmation
+ * @param {*} [options] Override http request option.
+ * @throws {RequiredError}
+ */
+ public auth2faDisablePost(request: InternalHandlersDisableTwoFactorRequest, options?: RawAxiosRequestConfig) {
+ return AuthApiFp(this.configuration).auth2faDisablePost(request, options).then((request) => request(this.axios, this.basePath));
+ }
+
+ /**
+ * Generate 2FA secret and QR code for setup
+ * @summary Setup 2FA
+ * @param {*} [options] Override http request option.
+ * @throws {RequiredError}
+ */
+ public auth2faSetupPost(options?: RawAxiosRequestConfig) {
+ return AuthApiFp(this.configuration).auth2faSetupPost(options).then((request) => request(this.axios, this.basePath));
+ }
+
+ /**
+ * Get 2FA enabled status for authenticated user
+ * @summary Get 2FA Status
+ * @param {*} [options] Override http request option.
+ * @throws {RequiredError}
+ */
+ public auth2faStatusGet(options?: RawAxiosRequestConfig) {
+ return AuthApiFp(this.configuration).auth2faStatusGet(options).then((request) => request(this.axios, this.basePath));
+ }
+
+ /**
+ * Verify 2FA code and enable 2FA for user
+ * @summary Verify and Enable 2FA
+ * @param {InternalHandlersVerifyTwoFactorRequest} request 2FA Code
+ * @param {*} [options] Override http request option.
+ * @throws {RequiredError}
+ */
+ public auth2faVerifyPost(request: InternalHandlersVerifyTwoFactorRequest, options?: RawAxiosRequestConfig) {
+ return AuthApiFp(this.configuration).auth2faVerifyPost(request, options).then((request) => request(this.axios, this.basePath));
+ }
+
+ /**
+ * Check if a username is already taken
+ * @summary Check Username Availability
+ * @param {string} username Username to check
+ * @param {*} [options] Override http request option.
+ * @throws {RequiredError}
+ */
+ public authCheckUsernameGet(username: string, options?: RawAxiosRequestConfig) {
+ return AuthApiFp(this.configuration).authCheckUsernameGet(username, options).then((request) => request(this.axios, this.basePath));
+ }
+
+ /**
+ * Authenticate user and return access token. Refresh token is set in httpOnly cookie.
+ * @summary User Login
+ * @param {VezaBackendApiInternalDtoLoginRequest} request Login Credentials
+ * @param {*} [options] Override http request option.
+ * @throws {RequiredError}
+ */
+ public authLoginPost(request: VezaBackendApiInternalDtoLoginRequest, options?: RawAxiosRequestConfig) {
+ return AuthApiFp(this.configuration).authLoginPost(request, options).then((request) => request(this.axios, this.basePath));
+ }
+
+ /**
+ * Revoke refresh token and current session
+ * @summary Logout
+ * @param {AuthLogoutPostRequest} request Refresh Token to revoke
+ * @param {*} [options] Override http request option.
+ * @throws {RequiredError}
+ */
+ public authLogoutPost(request: AuthLogoutPostRequest, options?: RawAxiosRequestConfig) {
+ return AuthApiFp(this.configuration).authLogoutPost(request, options).then((request) => request(this.axios, this.basePath));
+ }
+
+ /**
+ * Get profile information of the currently logged-in user
+ * @summary Get Current User
+ * @param {*} [options] Override http request option.
+ * @throws {RequiredError}
+ */
+ public authMeGet(options?: RawAxiosRequestConfig) {
+ return AuthApiFp(this.configuration).authMeGet(options).then((request) => request(this.axios, this.basePath));
+ }
+
+ /**
+ * Get a new access token using a refresh token
+ * @summary Refresh Token
+ * @param {VezaBackendApiInternalDtoRefreshRequest} request Refresh Token
+ * @param {*} [options] Override http request option.
+ * @throws {RequiredError}
+ */
+ public authRefreshPost(request: VezaBackendApiInternalDtoRefreshRequest, options?: RawAxiosRequestConfig) {
+ return AuthApiFp(this.configuration).authRefreshPost(request, options).then((request) => request(this.axios, this.basePath));
+ }
+
+ /**
+ * Register a new user account
+ * @summary User Registration
+ * @param {VezaBackendApiInternalDtoRegisterRequest} request Registration Data
+ * @param {*} [options] Override http request option.
+ * @throws {RequiredError}
+ */
+ public authRegisterPost(request: VezaBackendApiInternalDtoRegisterRequest, options?: RawAxiosRequestConfig) {
+ return AuthApiFp(this.configuration).authRegisterPost(request, options).then((request) => request(this.axios, this.basePath));
+ }
+
+ /**
+ * Resend the email verification link
+ * @summary Resend Verification Email
+ * @param {VezaBackendApiInternalDtoResendVerificationRequest} request Email
+ * @param {*} [options] Override http request option.
+ * @throws {RequiredError}
+ */
+ public authResendVerificationPost(request: VezaBackendApiInternalDtoResendVerificationRequest, options?: RawAxiosRequestConfig) {
+ return AuthApiFp(this.configuration).authResendVerificationPost(request, options).then((request) => request(this.axios, this.basePath));
+ }
+
+ /**
+ * Verify user email address using a token
+ * @summary Verify Email
+ * @param {string} token Verification Token
+ * @param {*} [options] Override http request option.
+ * @throws {RequiredError}
+ */
+ public authVerifyEmailPost(token: string, options?: RawAxiosRequestConfig) {
+ return AuthApiFp(this.configuration).authVerifyEmailPost(token, options).then((request) => request(this.axios, this.basePath));
+ }
+}
+
+
+
+/**
+ * ChatApi - axios parameter creator
+ */
+export const ChatApiAxiosParamCreator = function (configuration?: Configuration) {
+ return {
+ /**
+ * Generate a short-lived token for chat authentication
+ * @summary Get Chat Token
+ * @param {*} [options] Override http request option.
+ * @throws {RequiredError}
+ */
+ chatTokenGet: async (options: RawAxiosRequestConfig = {}): Promise => {
+ const localVarPath = `/chat/token`;
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
+ let baseOptions;
+ if (configuration) {
+ baseOptions = configuration.baseOptions;
+ }
+
+ const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options};
+ const localVarHeaderParameter = {} as any;
+ const localVarQueryParameter = {} as any;
+
+ // authentication BearerAuth required
+ await setApiKeyToObject(localVarHeaderParameter, "Authorization", configuration)
+
+ localVarHeaderParameter['Accept'] = 'application/json';
+
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
+ localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
+
+ return {
+ url: toPathString(localVarUrlObj),
+ options: localVarRequestOptions,
+ };
+ },
+ }
+};
+
+/**
+ * ChatApi - functional programming interface
+ */
+export const ChatApiFp = function(configuration?: Configuration) {
+ const localVarAxiosParamCreator = ChatApiAxiosParamCreator(configuration)
+ return {
+ /**
+ * Generate a short-lived token for chat authentication
+ * @summary Get Chat Token
+ * @param {*} [options] Override http request option.
+ * @throws {RequiredError}
+ */
+ async chatTokenGet(options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> {
+ const localVarAxiosArgs = await localVarAxiosParamCreator.chatTokenGet(options);
+ const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
+ const localVarOperationServerBasePath = operationServerMap['ChatApi.chatTokenGet']?.[localVarOperationServerIndex]?.url;
+ return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
+ },
+ }
+};
+
+/**
+ * ChatApi - factory interface
+ */
+export const ChatApiFactory = function (configuration?: Configuration, basePath?: string, axios?: AxiosInstance) {
+ const localVarFp = ChatApiFp(configuration)
+ return {
+ /**
+ * Generate a short-lived token for chat authentication
+ * @summary Get Chat Token
+ * @param {*} [options] Override http request option.
+ * @throws {RequiredError}
+ */
+ chatTokenGet(options?: RawAxiosRequestConfig): AxiosPromise {
+ return localVarFp.chatTokenGet(options).then((request) => request(axios, basePath));
+ },
+ };
+};
+
+/**
+ * ChatApi - interface
+ */
+export interface ChatApiInterface {
+ /**
+ * Generate a short-lived token for chat authentication
+ * @summary Get Chat Token
+ * @param {*} [options] Override http request option.
+ * @throws {RequiredError}
+ */
+ chatTokenGet(options?: RawAxiosRequestConfig): AxiosPromise;
+
+}
+
+/**
+ * ChatApi - object-oriented interface
+ */
+export class ChatApi extends BaseAPI implements ChatApiInterface {
+ /**
+ * Generate a short-lived token for chat authentication
+ * @summary Get Chat Token
+ * @param {*} [options] Override http request option.
+ * @throws {RequiredError}
+ */
+ public chatTokenGet(options?: RawAxiosRequestConfig) {
+ return ChatApiFp(this.configuration).chatTokenGet(options).then((request) => request(this.axios, this.basePath));
+ }
+}
+
+
+
+/**
+ * CommentApi - axios parameter creator
+ */
+export const CommentApiAxiosParamCreator = function (configuration?: Configuration) {
+ return {
+ /**
+ * Update a comment (only by owner)
+ * @summary Update comment
+ * @param {string} id Comment ID (UUID)
+ * @param {InternalHandlersUpdateCommentRequest} comment Updated comment content
+ * @param {*} [options] Override http request option.
+ * @throws {RequiredError}
+ */
+ commentsIdPut: async (id: string, comment: InternalHandlersUpdateCommentRequest, options: RawAxiosRequestConfig = {}): Promise => {
+ // verify required parameter 'id' is not null or undefined
+ assertParamExists('commentsIdPut', 'id', id)
+ // verify required parameter 'comment' is not null or undefined
+ assertParamExists('commentsIdPut', 'comment', comment)
+ const localVarPath = `/comments/{id}`
+ .replace(`{${"id"}}`, encodeURIComponent(String(id)));
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
+ let baseOptions;
+ if (configuration) {
+ baseOptions = configuration.baseOptions;
+ }
+
+ const localVarRequestOptions = { method: 'PUT', ...baseOptions, ...options};
+ const localVarHeaderParameter = {} as any;
+ const localVarQueryParameter = {} as any;
+
+ // authentication BearerAuth required
+ await setApiKeyToObject(localVarHeaderParameter, "Authorization", configuration)
+
+ localVarHeaderParameter['Content-Type'] = 'application/json';
+ localVarHeaderParameter['Accept'] = 'application/json';
+
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
+ localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
+ localVarRequestOptions.data = serializeDataIfNeeded(comment, localVarRequestOptions, configuration)
+
+ return {
+ url: toPathString(localVarUrlObj),
+ options: localVarRequestOptions,
+ };
+ },
+ /**
+ * Get paginated list of replies to a comment
+ * @summary Get comment replies
+ * @param {string} id Parent Comment ID (UUID)
+ * @param {number} [page] Page number
+ * @param {number} [limit] Items per page
+ * @param {*} [options] Override http request option.
+ * @throws {RequiredError}
+ */
+ commentsIdRepliesGet: async (id: string, page?: number, limit?: number, options: RawAxiosRequestConfig = {}): Promise => {
+ // verify required parameter 'id' is not null or undefined
+ assertParamExists('commentsIdRepliesGet', 'id', id)
+ const localVarPath = `/comments/{id}/replies`
+ .replace(`{${"id"}}`, encodeURIComponent(String(id)));
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
+ let baseOptions;
+ if (configuration) {
+ baseOptions = configuration.baseOptions;
+ }
+
+ const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options};
+ const localVarHeaderParameter = {} as any;
+ const localVarQueryParameter = {} as any;
+
+ if (page !== undefined) {
+ localVarQueryParameter['page'] = page;
+ }
+
+ if (limit !== undefined) {
+ localVarQueryParameter['limit'] = limit;
+ }
+
+ localVarHeaderParameter['Accept'] = 'application/json';
+
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
+ localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
+
+ return {
+ url: toPathString(localVarUrlObj),
+ options: localVarRequestOptions,
+ };
+ },
+ /**
+ * Delete a comment (only by owner or admin)
+ * @summary Delete comment
+ * @param {string} id Track ID
+ * @param {string} commentId Comment ID
+ * @param {*} [options] Override http request option.
+ * @throws {RequiredError}
+ */
+ tracksIdCommentsCommentIdDelete: async (id: string, commentId: string, options: RawAxiosRequestConfig = {}): Promise => {
+ // verify required parameter 'id' is not null or undefined
+ assertParamExists('tracksIdCommentsCommentIdDelete', 'id', id)
+ // verify required parameter 'commentId' is not null or undefined
+ assertParamExists('tracksIdCommentsCommentIdDelete', 'commentId', commentId)
+ const localVarPath = `/tracks/{id}/comments/{comment_id}`
+ .replace(`{${"id"}}`, encodeURIComponent(String(id)))
+ .replace(`{${"comment_id"}}`, encodeURIComponent(String(commentId)));
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
+ let baseOptions;
+ if (configuration) {
+ baseOptions = configuration.baseOptions;
+ }
+
+ const localVarRequestOptions = { method: 'DELETE', ...baseOptions, ...options};
+ const localVarHeaderParameter = {} as any;
+ const localVarQueryParameter = {} as any;
+
+ // authentication BearerAuth required
+ await setApiKeyToObject(localVarHeaderParameter, "Authorization", configuration)
+
+ localVarHeaderParameter['Accept'] = 'application/json';
+
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
+ localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
+
+ return {
+ url: toPathString(localVarUrlObj),
+ options: localVarRequestOptions,
+ };
+ },
+ /**
+ * Get paginated list of comments for a track
+ * @summary Get track comments
+ * @param {string} id Track ID
+ * @param {number} [page] Page number
+ * @param {number} [limit] Items per page
+ * @param {*} [options] Override http request option.
+ * @throws {RequiredError}
+ */
+ tracksIdCommentsGet: async (id: string, page?: number, limit?: number, options: RawAxiosRequestConfig = {}): Promise => {
+ // verify required parameter 'id' is not null or undefined
+ assertParamExists('tracksIdCommentsGet', 'id', id)
+ const localVarPath = `/tracks/{id}/comments`
+ .replace(`{${"id"}}`, encodeURIComponent(String(id)));
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
+ let baseOptions;
+ if (configuration) {
+ baseOptions = configuration.baseOptions;
+ }
+
+ const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options};
+ const localVarHeaderParameter = {} as any;
+ const localVarQueryParameter = {} as any;
+
+ if (page !== undefined) {
+ localVarQueryParameter['page'] = page;
+ }
+
+ if (limit !== undefined) {
+ localVarQueryParameter['limit'] = limit;
+ }
+
+ localVarHeaderParameter['Accept'] = 'application/json';
+
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
+ localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
+
+ return {
+ url: toPathString(localVarUrlObj),
+ options: localVarRequestOptions,
+ };
+ },
+ /**
+ * Create a new comment on a track. Can be a top-level comment or a reply to another comment (using parent_id).
+ * @summary Create comment
+ * @param {string} id Track ID (UUID)
+ * @param {InternalHandlersCreateCommentRequest} comment Comment data
+ * @param {*} [options] Override http request option.
+ * @throws {RequiredError}
+ */
+ tracksIdCommentsPost: async (id: string, comment: InternalHandlersCreateCommentRequest, options: RawAxiosRequestConfig = {}): Promise => {
+ // verify required parameter 'id' is not null or undefined
+ assertParamExists('tracksIdCommentsPost', 'id', id)
+ // verify required parameter 'comment' is not null or undefined
+ assertParamExists('tracksIdCommentsPost', 'comment', comment)
+ const localVarPath = `/tracks/{id}/comments`
+ .replace(`{${"id"}}`, encodeURIComponent(String(id)));
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
+ let baseOptions;
+ if (configuration) {
+ baseOptions = configuration.baseOptions;
+ }
+
+ const localVarRequestOptions = { method: 'POST', ...baseOptions, ...options};
+ const localVarHeaderParameter = {} as any;
+ const localVarQueryParameter = {} as any;
+
+ // authentication BearerAuth required
+ await setApiKeyToObject(localVarHeaderParameter, "Authorization", configuration)
+
+ localVarHeaderParameter['Content-Type'] = 'application/json';
+ localVarHeaderParameter['Accept'] = 'application/json';
+
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
+ localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
+ localVarRequestOptions.data = serializeDataIfNeeded(comment, localVarRequestOptions, configuration)
+
+ return {
+ url: toPathString(localVarUrlObj),
+ options: localVarRequestOptions,
+ };
+ },
+ }
+};
+
+/**
+ * CommentApi - functional programming interface
+ */
+export const CommentApiFp = function(configuration?: Configuration) {
+ const localVarAxiosParamCreator = CommentApiAxiosParamCreator(configuration)
+ return {
+ /**
+ * Update a comment (only by owner)
+ * @summary Update comment
+ * @param {string} id Comment ID (UUID)
+ * @param {InternalHandlersUpdateCommentRequest} comment Updated comment content
+ * @param {*} [options] Override http request option.
+ * @throws {RequiredError}
+ */
+ async commentsIdPut(id: string, comment: InternalHandlersUpdateCommentRequest, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> {
+ const localVarAxiosArgs = await localVarAxiosParamCreator.commentsIdPut(id, comment, options);
+ const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
+ const localVarOperationServerBasePath = operationServerMap['CommentApi.commentsIdPut']?.[localVarOperationServerIndex]?.url;
+ return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
+ },
+ /**
+ * Get paginated list of replies to a comment
+ * @summary Get comment replies
+ * @param {string} id Parent Comment ID (UUID)
+ * @param {number} [page] Page number
+ * @param {number} [limit] Items per page
+ * @param {*} [options] Override http request option.
+ * @throws {RequiredError}
+ */
+ async commentsIdRepliesGet(id: string, page?: number, limit?: number, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> {
+ const localVarAxiosArgs = await localVarAxiosParamCreator.commentsIdRepliesGet(id, page, limit, options);
+ const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
+ const localVarOperationServerBasePath = operationServerMap['CommentApi.commentsIdRepliesGet']?.[localVarOperationServerIndex]?.url;
+ return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
+ },
+ /**
+ * Delete a comment (only by owner or admin)
+ * @summary Delete comment
+ * @param {string} id Track ID
+ * @param {string} commentId Comment ID
+ * @param {*} [options] Override http request option.
+ * @throws {RequiredError}
+ */
+ async tracksIdCommentsCommentIdDelete(id: string, commentId: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> {
+ const localVarAxiosArgs = await localVarAxiosParamCreator.tracksIdCommentsCommentIdDelete(id, commentId, options);
+ const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
+ const localVarOperationServerBasePath = operationServerMap['CommentApi.tracksIdCommentsCommentIdDelete']?.[localVarOperationServerIndex]?.url;
+ return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
+ },
+ /**
+ * Get paginated list of comments for a track
+ * @summary Get track comments
+ * @param {string} id Track ID
+ * @param {number} [page] Page number
+ * @param {number} [limit] Items per page
+ * @param {*} [options] Override http request option.
+ * @throws {RequiredError}
+ */
+ async tracksIdCommentsGet(id: string, page?: number, limit?: number, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> {
+ const localVarAxiosArgs = await localVarAxiosParamCreator.tracksIdCommentsGet(id, page, limit, options);
+ const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
+ const localVarOperationServerBasePath = operationServerMap['CommentApi.tracksIdCommentsGet']?.[localVarOperationServerIndex]?.url;
+ return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
+ },
+ /**
+ * Create a new comment on a track. Can be a top-level comment or a reply to another comment (using parent_id).
+ * @summary Create comment
+ * @param {string} id Track ID (UUID)
+ * @param {InternalHandlersCreateCommentRequest} comment Comment data
+ * @param {*} [options] Override http request option.
+ * @throws {RequiredError}
+ */
+ async tracksIdCommentsPost(id: string, comment: InternalHandlersCreateCommentRequest, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> {
+ const localVarAxiosArgs = await localVarAxiosParamCreator.tracksIdCommentsPost(id, comment, options);
+ const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
+ const localVarOperationServerBasePath = operationServerMap['CommentApi.tracksIdCommentsPost']?.[localVarOperationServerIndex]?.url;
+ return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
+ },
+ }
+};
+
+/**
+ * CommentApi - factory interface
+ */
+export const CommentApiFactory = function (configuration?: Configuration, basePath?: string, axios?: AxiosInstance) {
+ const localVarFp = CommentApiFp(configuration)
+ return {
+ /**
+ * Update a comment (only by owner)
+ * @summary Update comment
+ * @param {string} id Comment ID (UUID)
+ * @param {InternalHandlersUpdateCommentRequest} comment Updated comment content
+ * @param {*} [options] Override http request option.
+ * @throws {RequiredError}
+ */
+ commentsIdPut(id: string, comment: InternalHandlersUpdateCommentRequest, options?: RawAxiosRequestConfig): AxiosPromise {
+ return localVarFp.commentsIdPut(id, comment, options).then((request) => request(axios, basePath));
+ },
+ /**
+ * Get paginated list of replies to a comment
+ * @summary Get comment replies
+ * @param {string} id Parent Comment ID (UUID)
+ * @param {number} [page] Page number
+ * @param {number} [limit] Items per page
+ * @param {*} [options] Override http request option.
+ * @throws {RequiredError}
+ */
+ commentsIdRepliesGet(id: string, page?: number, limit?: number, options?: RawAxiosRequestConfig): AxiosPromise {
+ return localVarFp.commentsIdRepliesGet(id, page, limit, options).then((request) => request(axios, basePath));
+ },
+ /**
+ * Delete a comment (only by owner or admin)
+ * @summary Delete comment
+ * @param {string} id Track ID
+ * @param {string} commentId Comment ID
+ * @param {*} [options] Override http request option.
+ * @throws {RequiredError}
+ */
+ tracksIdCommentsCommentIdDelete(id: string, commentId: string, options?: RawAxiosRequestConfig): AxiosPromise {
+ return localVarFp.tracksIdCommentsCommentIdDelete(id, commentId, options).then((request) => request(axios, basePath));
+ },
+ /**
+ * Get paginated list of comments for a track
+ * @summary Get track comments
+ * @param {string} id Track ID
+ * @param {number} [page] Page number
+ * @param {number} [limit] Items per page
+ * @param {*} [options] Override http request option.
+ * @throws {RequiredError}
+ */
+ tracksIdCommentsGet(id: string, page?: number, limit?: number, options?: RawAxiosRequestConfig): AxiosPromise {
+ return localVarFp.tracksIdCommentsGet(id, page, limit, options).then((request) => request(axios, basePath));
+ },
+ /**
+ * Create a new comment on a track. Can be a top-level comment or a reply to another comment (using parent_id).
+ * @summary Create comment
+ * @param {string} id Track ID (UUID)
+ * @param {InternalHandlersCreateCommentRequest} comment Comment data
+ * @param {*} [options] Override http request option.
+ * @throws {RequiredError}
+ */
+ tracksIdCommentsPost(id: string, comment: InternalHandlersCreateCommentRequest, options?: RawAxiosRequestConfig): AxiosPromise {
+ return localVarFp.tracksIdCommentsPost(id, comment, options).then((request) => request(axios, basePath));
+ },
+ };
+};
+
+/**
+ * CommentApi - interface
+ */
+export interface CommentApiInterface {
+ /**
+ * Update a comment (only by owner)
+ * @summary Update comment
+ * @param {string} id Comment ID (UUID)
+ * @param {InternalHandlersUpdateCommentRequest} comment Updated comment content
+ * @param {*} [options] Override http request option.
+ * @throws {RequiredError}
+ */
+ commentsIdPut(id: string, comment: InternalHandlersUpdateCommentRequest, options?: RawAxiosRequestConfig): AxiosPromise;
+
+ /**
+ * Get paginated list of replies to a comment
+ * @summary Get comment replies
+ * @param {string} id Parent Comment ID (UUID)
+ * @param {number} [page] Page number
+ * @param {number} [limit] Items per page
+ * @param {*} [options] Override http request option.
+ * @throws {RequiredError}
+ */
+ commentsIdRepliesGet(id: string, page?: number, limit?: number, options?: RawAxiosRequestConfig): AxiosPromise;
+
+ /**
+ * Delete a comment (only by owner or admin)
+ * @summary Delete comment
+ * @param {string} id Track ID
+ * @param {string} commentId Comment ID
+ * @param {*} [options] Override http request option.
+ * @throws {RequiredError}
+ */
+ tracksIdCommentsCommentIdDelete(id: string, commentId: string, options?: RawAxiosRequestConfig): AxiosPromise;
+
+ /**
+ * Get paginated list of comments for a track
+ * @summary Get track comments
+ * @param {string} id Track ID
+ * @param {number} [page] Page number
+ * @param {number} [limit] Items per page
+ * @param {*} [options] Override http request option.
+ * @throws {RequiredError}
+ */
+ tracksIdCommentsGet(id: string, page?: number, limit?: number, options?: RawAxiosRequestConfig): AxiosPromise;
+
+ /**
+ * Create a new comment on a track. Can be a top-level comment or a reply to another comment (using parent_id).
+ * @summary Create comment
+ * @param {string} id Track ID (UUID)
+ * @param {InternalHandlersCreateCommentRequest} comment Comment data
+ * @param {*} [options] Override http request option.
+ * @throws {RequiredError}
+ */
+ tracksIdCommentsPost(id: string, comment: InternalHandlersCreateCommentRequest, options?: RawAxiosRequestConfig): AxiosPromise;
+
+}
+
+/**
+ * CommentApi - object-oriented interface
+ */
+export class CommentApi extends BaseAPI implements CommentApiInterface {
+ /**
+ * Update a comment (only by owner)
+ * @summary Update comment
+ * @param {string} id Comment ID (UUID)
+ * @param {InternalHandlersUpdateCommentRequest} comment Updated comment content
+ * @param {*} [options] Override http request option.
+ * @throws {RequiredError}
+ */
+ public commentsIdPut(id: string, comment: InternalHandlersUpdateCommentRequest, options?: RawAxiosRequestConfig) {
+ return CommentApiFp(this.configuration).commentsIdPut(id, comment, options).then((request) => request(this.axios, this.basePath));
+ }
+
+ /**
+ * Get paginated list of replies to a comment
+ * @summary Get comment replies
+ * @param {string} id Parent Comment ID (UUID)
+ * @param {number} [page] Page number
+ * @param {number} [limit] Items per page
+ * @param {*} [options] Override http request option.
+ * @throws {RequiredError}
+ */
+ public commentsIdRepliesGet(id: string, page?: number, limit?: number, options?: RawAxiosRequestConfig) {
+ return CommentApiFp(this.configuration).commentsIdRepliesGet(id, page, limit, options).then((request) => request(this.axios, this.basePath));
+ }
+
+ /**
+ * Delete a comment (only by owner or admin)
+ * @summary Delete comment
+ * @param {string} id Track ID
+ * @param {string} commentId Comment ID
+ * @param {*} [options] Override http request option.
+ * @throws {RequiredError}
+ */
+ public tracksIdCommentsCommentIdDelete(id: string, commentId: string, options?: RawAxiosRequestConfig) {
+ return CommentApiFp(this.configuration).tracksIdCommentsCommentIdDelete(id, commentId, options).then((request) => request(this.axios, this.basePath));
+ }
+
+ /**
+ * Get paginated list of comments for a track
+ * @summary Get track comments
+ * @param {string} id Track ID
+ * @param {number} [page] Page number
+ * @param {number} [limit] Items per page
+ * @param {*} [options] Override http request option.
+ * @throws {RequiredError}
+ */
+ public tracksIdCommentsGet(id: string, page?: number, limit?: number, options?: RawAxiosRequestConfig) {
+ return CommentApiFp(this.configuration).tracksIdCommentsGet(id, page, limit, options).then((request) => request(this.axios, this.basePath));
+ }
+
+ /**
+ * Create a new comment on a track. Can be a top-level comment or a reply to another comment (using parent_id).
+ * @summary Create comment
+ * @param {string} id Track ID (UUID)
+ * @param {InternalHandlersCreateCommentRequest} comment Comment data
+ * @param {*} [options] Override http request option.
+ * @throws {RequiredError}
+ */
+ public tracksIdCommentsPost(id: string, comment: InternalHandlersCreateCommentRequest, options?: RawAxiosRequestConfig) {
+ return CommentApiFp(this.configuration).tracksIdCommentsPost(id, comment, options).then((request) => request(this.axios, this.basePath));
+ }
+}
+
+
+
+/**
+ * LoggingApi - axios parameter creator
+ */
+export const LoggingApiAxiosParamCreator = function (configuration?: Configuration) {
+ return {
+ /**
+ * Receive and store a log entry from the frontend application
+ * @summary Receive frontend log
+ * @param {InternalHandlersFrontendLogRequest} log Frontend log entry
+ * @param {*} [options] Override http request option.
+ * @throws {RequiredError}
+ */
+ apiV1LogsFrontendPost: async (log: InternalHandlersFrontendLogRequest, options: RawAxiosRequestConfig = {}): Promise => {
+ // verify required parameter 'log' is not null or undefined
+ assertParamExists('apiV1LogsFrontendPost', 'log', log)
+ const localVarPath = `/api/v1/logs/frontend`;
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
+ let baseOptions;
+ if (configuration) {
+ baseOptions = configuration.baseOptions;
+ }
+
+ const localVarRequestOptions = { method: 'POST', ...baseOptions, ...options};
+ const localVarHeaderParameter = {} as any;
+ const localVarQueryParameter = {} as any;
+
+ localVarHeaderParameter['Content-Type'] = 'application/json';
+ localVarHeaderParameter['Accept'] = 'application/json';
+
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
+ localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
+ localVarRequestOptions.data = serializeDataIfNeeded(log, localVarRequestOptions, configuration)
+
+ return {
+ url: toPathString(localVarUrlObj),
+ options: localVarRequestOptions,
+ };
+ },
+ }
+};
+
+/**
+ * LoggingApi - functional programming interface
+ */
+export const LoggingApiFp = function(configuration?: Configuration) {
+ const localVarAxiosParamCreator = LoggingApiAxiosParamCreator(configuration)
+ return {
+ /**
+ * Receive and store a log entry from the frontend application
+ * @summary Receive frontend log
+ * @param {InternalHandlersFrontendLogRequest} log Frontend log entry
+ * @param {*} [options] Override http request option.
+ * @throws {RequiredError}
+ */
+ async apiV1LogsFrontendPost(log: InternalHandlersFrontendLogRequest, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> {
+ const localVarAxiosArgs = await localVarAxiosParamCreator.apiV1LogsFrontendPost(log, options);
+ const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
+ const localVarOperationServerBasePath = operationServerMap['LoggingApi.apiV1LogsFrontendPost']?.[localVarOperationServerIndex]?.url;
+ return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
+ },
+ }
+};
+
+/**
+ * LoggingApi - factory interface
+ */
+export const LoggingApiFactory = function (configuration?: Configuration, basePath?: string, axios?: AxiosInstance) {
+ const localVarFp = LoggingApiFp(configuration)
+ return {
+ /**
+ * Receive and store a log entry from the frontend application
+ * @summary Receive frontend log
+ * @param {InternalHandlersFrontendLogRequest} log Frontend log entry
+ * @param {*} [options] Override http request option.
+ * @throws {RequiredError}
+ */
+ apiV1LogsFrontendPost(log: InternalHandlersFrontendLogRequest, options?: RawAxiosRequestConfig): AxiosPromise {
+ return localVarFp.apiV1LogsFrontendPost(log, options).then((request) => request(axios, basePath));
+ },
+ };
+};
+
+/**
+ * LoggingApi - interface
+ */
+export interface LoggingApiInterface {
+ /**
+ * Receive and store a log entry from the frontend application
+ * @summary Receive frontend log
+ * @param {InternalHandlersFrontendLogRequest} log Frontend log entry
+ * @param {*} [options] Override http request option.
+ * @throws {RequiredError}
+ */
+ apiV1LogsFrontendPost(log: InternalHandlersFrontendLogRequest, options?: RawAxiosRequestConfig): AxiosPromise;
+
+}
+
+/**
+ * LoggingApi - object-oriented interface
+ */
+export class LoggingApi extends BaseAPI implements LoggingApiInterface {
+ /**
+ * Receive and store a log entry from the frontend application
+ * @summary Receive frontend log
+ * @param {InternalHandlersFrontendLogRequest} log Frontend log entry
+ * @param {*} [options] Override http request option.
+ * @throws {RequiredError}
+ */
+ public apiV1LogsFrontendPost(log: InternalHandlersFrontendLogRequest, options?: RawAxiosRequestConfig) {
+ return LoggingApiFp(this.configuration).apiV1LogsFrontendPost(log, options).then((request) => request(this.axios, this.basePath));
+ }
+}
+
+
+
+/**
+ * MarketplaceApi - axios parameter creator
+ */
+export const MarketplaceApiAxiosParamCreator = function (configuration?: Configuration) {
+ return {
+ /**
+ * Get a secure download URL for a purchased product
+ * @summary Get download URL
+ * @param {string} productId Product ID
+ * @param {*} [options] Override http request option.
+ * @throws {RequiredError}
+ */
+ apiV1MarketplaceDownloadProductIdGet: async (productId: string, options: RawAxiosRequestConfig = {}): Promise => {
+ // verify required parameter 'productId' is not null or undefined
+ assertParamExists('apiV1MarketplaceDownloadProductIdGet', 'productId', productId)
+ const localVarPath = `/api/v1/marketplace/download/{product_id}`
+ .replace(`{${"product_id"}}`, encodeURIComponent(String(productId)));
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
+ let baseOptions;
+ if (configuration) {
+ baseOptions = configuration.baseOptions;
+ }
+
+ const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options};
+ const localVarHeaderParameter = {} as any;
+ const localVarQueryParameter = {} as any;
+
+ // authentication BearerAuth required
+ await setApiKeyToObject(localVarHeaderParameter, "Authorization", configuration)
+
+ localVarHeaderParameter['Accept'] = 'application/json';
+
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
+ localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
+
+ return {
+ url: toPathString(localVarUrlObj),
+ options: localVarRequestOptions,
+ };
+ },
+ /**
+ * Get all orders for the authenticated user
+ * @summary List user orders
+ * @param {*} [options] Override http request option.
+ * @throws {RequiredError}
+ */
+ apiV1MarketplaceOrdersGet: async (options: RawAxiosRequestConfig = {}): Promise => {
+ const localVarPath = `/api/v1/marketplace/orders`;
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
+ let baseOptions;
+ if (configuration) {
+ baseOptions = configuration.baseOptions;
+ }
+
+ const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options};
+ const localVarHeaderParameter = {} as any;
+ const localVarQueryParameter = {} as any;
+
+ // authentication BearerAuth required
+ await setApiKeyToObject(localVarHeaderParameter, "Authorization", configuration)
+
+ localVarHeaderParameter['Accept'] = 'application/json';
+
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
+ localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
+
+ return {
+ url: toPathString(localVarUrlObj),
+ options: localVarRequestOptions,
+ };
+ },
+ /**
+ * Get details of a specific order (only order owner can access)
+ * @summary Get order details
+ * @param {string} id Order ID
+ * @param {*} [options] Override http request option.
+ * @throws {RequiredError}
+ */
+ apiV1MarketplaceOrdersIdGet: async (id: string, options: RawAxiosRequestConfig = {}): Promise => {
+ // verify required parameter 'id' is not null or undefined
+ assertParamExists('apiV1MarketplaceOrdersIdGet', 'id', id)
+ const localVarPath = `/api/v1/marketplace/orders/{id}`
+ .replace(`{${"id"}}`, encodeURIComponent(String(id)));
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
+ let baseOptions;
+ if (configuration) {
+ baseOptions = configuration.baseOptions;
+ }
+
+ const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options};
+ const localVarHeaderParameter = {} as any;
+ const localVarQueryParameter = {} as any;
+
+ // authentication BearerAuth required
+ await setApiKeyToObject(localVarHeaderParameter, "Authorization", configuration)
+
+ localVarHeaderParameter['Accept'] = 'application/json';
+
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
+ localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
+
+ return {
+ url: toPathString(localVarUrlObj),
+ options: localVarRequestOptions,
+ };
+ },
+ /**
+ * Purchase products
+ * @summary Create a new order
+ * @param {InternalHandlersCreateOrderRequest} order Order items
+ * @param {*} [options] Override http request option.
+ * @throws {RequiredError}
+ */
+ apiV1MarketplaceOrdersPost: async (order: InternalHandlersCreateOrderRequest, options: RawAxiosRequestConfig = {}): Promise => {
+ // verify required parameter 'order' is not null or undefined
+ assertParamExists('apiV1MarketplaceOrdersPost', 'order', order)
+ const localVarPath = `/api/v1/marketplace/orders`;
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
+ let baseOptions;
+ if (configuration) {
+ baseOptions = configuration.baseOptions;
+ }
+
+ const localVarRequestOptions = { method: 'POST', ...baseOptions, ...options};
+ const localVarHeaderParameter = {} as any;
+ const localVarQueryParameter = {} as any;
+
+ // authentication BearerAuth required
+ await setApiKeyToObject(localVarHeaderParameter, "Authorization", configuration)
+
+ localVarHeaderParameter['Content-Type'] = 'application/json';
+ localVarHeaderParameter['Accept'] = 'application/json';
+
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
+ localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
+ localVarRequestOptions.data = serializeDataIfNeeded(order, localVarRequestOptions, configuration)
+
+ return {
+ url: toPathString(localVarUrlObj),
+ options: localVarRequestOptions,
+ };
+ },
+ /**
+ * List marketplace products with filters
+ * @summary List products
+ * @param {string} [status] Product status
+ * @param {string} [sellerId] Seller ID
+ * @param {string} [q] Search query
+ * @param {string} [type] Product type (track, pack, service)
+ * @param {number} [minPrice] Minimum price
+ * @param {number} [maxPrice] Maximum price
+ * @param {number} [page] Page number
+ * @param {number} [limit] Items per page
+ * @param {*} [options] Override http request option.
+ * @throws {RequiredError}
+ */
+ apiV1MarketplaceProductsGet: async (status?: string, sellerId?: string, q?: string, type?: string, minPrice?: number, maxPrice?: number, page?: number, limit?: number, options: RawAxiosRequestConfig = {}): Promise => {
+ const localVarPath = `/api/v1/marketplace/products`;
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
+ let baseOptions;
+ if (configuration) {
+ baseOptions = configuration.baseOptions;
+ }
+
+ const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options};
+ const localVarHeaderParameter = {} as any;
+ const localVarQueryParameter = {} as any;
+
+ if (status !== undefined) {
+ localVarQueryParameter['status'] = status;
+ }
+
+ if (sellerId !== undefined) {
+ localVarQueryParameter['seller_id'] = sellerId;
+ }
+
+ if (q !== undefined) {
+ localVarQueryParameter['q'] = q;
+ }
+
+ if (type !== undefined) {
+ localVarQueryParameter['type'] = type;
+ }
+
+ if (minPrice !== undefined) {
+ localVarQueryParameter['min_price'] = minPrice;
+ }
+
+ if (maxPrice !== undefined) {
+ localVarQueryParameter['max_price'] = maxPrice;
+ }
+
+ if (page !== undefined) {
+ localVarQueryParameter['page'] = page;
+ }
+
+ if (limit !== undefined) {
+ localVarQueryParameter['limit'] = limit;
+ }
+
+ localVarHeaderParameter['Accept'] = 'application/json';
+
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
+ localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
+
+ return {
+ url: toPathString(localVarUrlObj),
+ options: localVarRequestOptions,
+ };
+ },
+ /**
+ * Update product details (only seller can update)
+ * @summary Update a product
+ * @param {string} id Product ID
+ * @param {InternalHandlersUpdateProductRequest} product Product updates
+ * @param {*} [options] Override http request option.
+ * @throws {RequiredError}
+ */
+ apiV1MarketplaceProductsIdPut: async (id: string, product: InternalHandlersUpdateProductRequest, options: RawAxiosRequestConfig = {}): Promise => {
+ // verify required parameter 'id' is not null or undefined
+ assertParamExists('apiV1MarketplaceProductsIdPut', 'id', id)
+ // verify required parameter 'product' is not null or undefined
+ assertParamExists('apiV1MarketplaceProductsIdPut', 'product', product)
+ const localVarPath = `/api/v1/marketplace/products/{id}`
+ .replace(`{${"id"}}`, encodeURIComponent(String(id)));
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
+ let baseOptions;
+ if (configuration) {
+ baseOptions = configuration.baseOptions;
+ }
+
+ const localVarRequestOptions = { method: 'PUT', ...baseOptions, ...options};
+ const localVarHeaderParameter = {} as any;
+ const localVarQueryParameter = {} as any;
+
+ // authentication BearerAuth required
+ await setApiKeyToObject(localVarHeaderParameter, "Authorization", configuration)
+
+ localVarHeaderParameter['Content-Type'] = 'application/json';
+ localVarHeaderParameter['Accept'] = 'application/json';
+
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
+ localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
+ localVarRequestOptions.data = serializeDataIfNeeded(product, localVarRequestOptions, configuration)
+
+ return {
+ url: toPathString(localVarUrlObj),
+ options: localVarRequestOptions,
+ };
+ },
+ /**
+ * Create a product (Track, Pack, Service) for sale
+ * @summary Create a new product
+ * @param {InternalHandlersCreateProductRequest} product Product info
+ * @param {*} [options] Override http request option.
+ * @throws {RequiredError}
+ */
+ apiV1MarketplaceProductsPost: async (product: InternalHandlersCreateProductRequest, options: RawAxiosRequestConfig = {}): Promise => {
+ // verify required parameter 'product' is not null or undefined
+ assertParamExists('apiV1MarketplaceProductsPost', 'product', product)
+ const localVarPath = `/api/v1/marketplace/products`;
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
+ let baseOptions;
+ if (configuration) {
+ baseOptions = configuration.baseOptions;
+ }
+
+ const localVarRequestOptions = { method: 'POST', ...baseOptions, ...options};
+ const localVarHeaderParameter = {} as any;
+ const localVarQueryParameter = {} as any;
+
+ // authentication BearerAuth required
+ await setApiKeyToObject(localVarHeaderParameter, "Authorization", configuration)
+
+ localVarHeaderParameter['Content-Type'] = 'application/json';
+ localVarHeaderParameter['Accept'] = 'application/json';
+
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
+ localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
+ localVarRequestOptions.data = serializeDataIfNeeded(product, localVarRequestOptions, configuration)
+
+ return {
+ url: toPathString(localVarUrlObj),
+ options: localVarRequestOptions,
+ };
+ },
+ }
+};
+
+/**
+ * MarketplaceApi - functional programming interface
+ */
+export const MarketplaceApiFp = function(configuration?: Configuration) {
+ const localVarAxiosParamCreator = MarketplaceApiAxiosParamCreator(configuration)
+ return {
+ /**
+ * Get a secure download URL for a purchased product
+ * @summary Get download URL
+ * @param {string} productId Product ID
+ * @param {*} [options] Override http request option.
+ * @throws {RequiredError}
+ */
+ async apiV1MarketplaceDownloadProductIdGet(productId: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<{ [key: string]: string; }>> {
+ const localVarAxiosArgs = await localVarAxiosParamCreator.apiV1MarketplaceDownloadProductIdGet(productId, options);
+ const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
+ const localVarOperationServerBasePath = operationServerMap['MarketplaceApi.apiV1MarketplaceDownloadProductIdGet']?.[localVarOperationServerIndex]?.url;
+ return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
+ },
+ /**
+ * Get all orders for the authenticated user
+ * @summary List user orders
+ * @param {*} [options] Override http request option.
+ * @throws {RequiredError}
+ */
+ async apiV1MarketplaceOrdersGet(options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise>> {
+ const localVarAxiosArgs = await localVarAxiosParamCreator.apiV1MarketplaceOrdersGet(options);
+ const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
+ const localVarOperationServerBasePath = operationServerMap['MarketplaceApi.apiV1MarketplaceOrdersGet']?.[localVarOperationServerIndex]?.url;
+ return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
+ },
+ /**
+ * Get details of a specific order (only order owner can access)
+ * @summary Get order details
+ * @param {string} id Order ID
+ * @param {*} [options] Override http request option.
+ * @throws {RequiredError}
+ */
+ async apiV1MarketplaceOrdersIdGet(id: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> {
+ const localVarAxiosArgs = await localVarAxiosParamCreator.apiV1MarketplaceOrdersIdGet(id, options);
+ const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
+ const localVarOperationServerBasePath = operationServerMap['MarketplaceApi.apiV1MarketplaceOrdersIdGet']?.[localVarOperationServerIndex]?.url;
+ return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
+ },
+ /**
+ * Purchase products
+ * @summary Create a new order
+ * @param {InternalHandlersCreateOrderRequest} order Order items
+ * @param {*} [options] Override http request option.
+ * @throws {RequiredError}
+ */
+ async apiV1MarketplaceOrdersPost(order: InternalHandlersCreateOrderRequest, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> {
+ const localVarAxiosArgs = await localVarAxiosParamCreator.apiV1MarketplaceOrdersPost(order, options);
+ const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
+ const localVarOperationServerBasePath = operationServerMap['MarketplaceApi.apiV1MarketplaceOrdersPost']?.[localVarOperationServerIndex]?.url;
+ return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
+ },
+ /**
+ * List marketplace products with filters
+ * @summary List products
+ * @param {string} [status] Product status
+ * @param {string} [sellerId] Seller ID
+ * @param {string} [q] Search query
+ * @param {string} [type] Product type (track, pack, service)
+ * @param {number} [minPrice] Minimum price
+ * @param {number} [maxPrice] Maximum price
+ * @param {number} [page] Page number
+ * @param {number} [limit] Items per page
+ * @param {*} [options] Override http request option.
+ * @throws {RequiredError}
+ */
+ async apiV1MarketplaceProductsGet(status?: string, sellerId?: string, q?: string, type?: string, minPrice?: number, maxPrice?: number, page?: number, limit?: number, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise>> {
+ const localVarAxiosArgs = await localVarAxiosParamCreator.apiV1MarketplaceProductsGet(status, sellerId, q, type, minPrice, maxPrice, page, limit, options);
+ const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
+ const localVarOperationServerBasePath = operationServerMap['MarketplaceApi.apiV1MarketplaceProductsGet']?.[localVarOperationServerIndex]?.url;
+ return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
+ },
+ /**
+ * Update product details (only seller can update)
+ * @summary Update a product
+ * @param {string} id Product ID
+ * @param {InternalHandlersUpdateProductRequest} product Product updates
+ * @param {*} [options] Override http request option.
+ * @throws {RequiredError}
+ */
+ async apiV1MarketplaceProductsIdPut(id: string, product: InternalHandlersUpdateProductRequest, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> {
+ const localVarAxiosArgs = await localVarAxiosParamCreator.apiV1MarketplaceProductsIdPut(id, product, options);
+ const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
+ const localVarOperationServerBasePath = operationServerMap['MarketplaceApi.apiV1MarketplaceProductsIdPut']?.[localVarOperationServerIndex]?.url;
+ return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
+ },
+ /**
+ * Create a product (Track, Pack, Service) for sale
+ * @summary Create a new product
+ * @param {InternalHandlersCreateProductRequest} product Product info
+ * @param {*} [options] Override http request option.
+ * @throws {RequiredError}
+ */
+ async apiV1MarketplaceProductsPost(product: InternalHandlersCreateProductRequest, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> {
+ const localVarAxiosArgs = await localVarAxiosParamCreator.apiV1MarketplaceProductsPost(product, options);
+ const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
+ const localVarOperationServerBasePath = operationServerMap['MarketplaceApi.apiV1MarketplaceProductsPost']?.[localVarOperationServerIndex]?.url;
+ return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
+ },
+ }
+};
+
+/**
+ * MarketplaceApi - factory interface
+ */
+export const MarketplaceApiFactory = function (configuration?: Configuration, basePath?: string, axios?: AxiosInstance) {
+ const localVarFp = MarketplaceApiFp(configuration)
+ return {
+ /**
+ * Get a secure download URL for a purchased product
+ * @summary Get download URL
+ * @param {string} productId Product ID
+ * @param {*} [options] Override http request option.
+ * @throws {RequiredError}
+ */
+ apiV1MarketplaceDownloadProductIdGet(productId: string, options?: RawAxiosRequestConfig): AxiosPromise<{ [key: string]: string; }> {
+ return localVarFp.apiV1MarketplaceDownloadProductIdGet(productId, options).then((request) => request(axios, basePath));
+ },
+ /**
+ * Get all orders for the authenticated user
+ * @summary List user orders
+ * @param {*} [options] Override http request option.
+ * @throws {RequiredError}
+ */
+ apiV1MarketplaceOrdersGet(options?: RawAxiosRequestConfig): AxiosPromise> {
+ return localVarFp.apiV1MarketplaceOrdersGet(options).then((request) => request(axios, basePath));
+ },
+ /**
+ * Get details of a specific order (only order owner can access)
+ * @summary Get order details
+ * @param {string} id Order ID
+ * @param {*} [options] Override http request option.
+ * @throws {RequiredError}
+ */
+ apiV1MarketplaceOrdersIdGet(id: string, options?: RawAxiosRequestConfig): AxiosPromise {
+ return localVarFp.apiV1MarketplaceOrdersIdGet(id, options).then((request) => request(axios, basePath));
+ },
+ /**
+ * Purchase products
+ * @summary Create a new order
+ * @param {InternalHandlersCreateOrderRequest} order Order items
+ * @param {*} [options] Override http request option.
+ * @throws {RequiredError}
+ */
+ apiV1MarketplaceOrdersPost(order: InternalHandlersCreateOrderRequest, options?: RawAxiosRequestConfig): AxiosPromise {
+ return localVarFp.apiV1MarketplaceOrdersPost(order, options).then((request) => request(axios, basePath));
+ },
+ /**
+ * List marketplace products with filters
+ * @summary List products
+ * @param {string} [status] Product status
+ * @param {string} [sellerId] Seller ID
+ * @param {string} [q] Search query
+ * @param {string} [type] Product type (track, pack, service)
+ * @param {number} [minPrice] Minimum price
+ * @param {number} [maxPrice] Maximum price
+ * @param {number} [page] Page number
+ * @param {number} [limit] Items per page
+ * @param {*} [options] Override http request option.
+ * @throws {RequiredError}
+ */
+ apiV1MarketplaceProductsGet(status?: string, sellerId?: string, q?: string, type?: string, minPrice?: number, maxPrice?: number, page?: number, limit?: number, options?: RawAxiosRequestConfig): AxiosPromise> {
+ return localVarFp.apiV1MarketplaceProductsGet(status, sellerId, q, type, minPrice, maxPrice, page, limit, options).then((request) => request(axios, basePath));
+ },
+ /**
+ * Update product details (only seller can update)
+ * @summary Update a product
+ * @param {string} id Product ID
+ * @param {InternalHandlersUpdateProductRequest} product Product updates
+ * @param {*} [options] Override http request option.
+ * @throws {RequiredError}
+ */
+ apiV1MarketplaceProductsIdPut(id: string, product: InternalHandlersUpdateProductRequest, options?: RawAxiosRequestConfig): AxiosPromise {
+ return localVarFp.apiV1MarketplaceProductsIdPut(id, product, options).then((request) => request(axios, basePath));
+ },
+ /**
+ * Create a product (Track, Pack, Service) for sale
+ * @summary Create a new product
+ * @param {InternalHandlersCreateProductRequest} product Product info
+ * @param {*} [options] Override http request option.
+ * @throws {RequiredError}
+ */
+ apiV1MarketplaceProductsPost(product: InternalHandlersCreateProductRequest, options?: RawAxiosRequestConfig): AxiosPromise {
+ return localVarFp.apiV1MarketplaceProductsPost(product, options).then((request) => request(axios, basePath));
+ },
+ };
+};
+
+/**
+ * MarketplaceApi - interface
+ */
+export interface MarketplaceApiInterface {
+ /**
+ * Get a secure download URL for a purchased product
+ * @summary Get download URL
+ * @param {string} productId Product ID
+ * @param {*} [options] Override http request option.
+ * @throws {RequiredError}
+ */
+ apiV1MarketplaceDownloadProductIdGet(productId: string, options?: RawAxiosRequestConfig): AxiosPromise<{ [key: string]: string; }>;
+
+ /**
+ * Get all orders for the authenticated user
+ * @summary List user orders
+ * @param {*} [options] Override http request option.
+ * @throws {RequiredError}
+ */
+ apiV1MarketplaceOrdersGet(options?: RawAxiosRequestConfig): AxiosPromise>;
+
+ /**
+ * Get details of a specific order (only order owner can access)
+ * @summary Get order details
+ * @param {string} id Order ID
+ * @param {*} [options] Override http request option.
+ * @throws {RequiredError}
+ */
+ apiV1MarketplaceOrdersIdGet(id: string, options?: RawAxiosRequestConfig): AxiosPromise;
+
+ /**
+ * Purchase products
+ * @summary Create a new order
+ * @param {InternalHandlersCreateOrderRequest} order Order items
+ * @param {*} [options] Override http request option.
+ * @throws {RequiredError}
+ */
+ apiV1MarketplaceOrdersPost(order: InternalHandlersCreateOrderRequest, options?: RawAxiosRequestConfig): AxiosPromise;
+
+ /**
+ * List marketplace products with filters
+ * @summary List products
+ * @param {string} [status] Product status
+ * @param {string} [sellerId] Seller ID
+ * @param {string} [q] Search query
+ * @param {string} [type] Product type (track, pack, service)
+ * @param {number} [minPrice] Minimum price
+ * @param {number} [maxPrice] Maximum price
+ * @param {number} [page] Page number
+ * @param {number} [limit] Items per page
+ * @param {*} [options] Override http request option.
+ * @throws {RequiredError}
+ */
+ apiV1MarketplaceProductsGet(status?: string, sellerId?: string, q?: string, type?: string, minPrice?: number, maxPrice?: number, page?: number, limit?: number, options?: RawAxiosRequestConfig): AxiosPromise>;
+
+ /**
+ * Update product details (only seller can update)
+ * @summary Update a product
+ * @param {string} id Product ID
+ * @param {InternalHandlersUpdateProductRequest} product Product updates
+ * @param {*} [options] Override http request option.
+ * @throws {RequiredError}
+ */
+ apiV1MarketplaceProductsIdPut(id: string, product: InternalHandlersUpdateProductRequest, options?: RawAxiosRequestConfig): AxiosPromise;
+
+ /**
+ * Create a product (Track, Pack, Service) for sale
+ * @summary Create a new product
+ * @param {InternalHandlersCreateProductRequest} product Product info
+ * @param {*} [options] Override http request option.
+ * @throws {RequiredError}
+ */
+ apiV1MarketplaceProductsPost(product: InternalHandlersCreateProductRequest, options?: RawAxiosRequestConfig): AxiosPromise;
+
+}
+
+/**
+ * MarketplaceApi - object-oriented interface
+ */
+export class MarketplaceApi extends BaseAPI implements MarketplaceApiInterface {
+ /**
+ * Get a secure download URL for a purchased product
+ * @summary Get download URL
+ * @param {string} productId Product ID
+ * @param {*} [options] Override http request option.
+ * @throws {RequiredError}
+ */
+ public apiV1MarketplaceDownloadProductIdGet(productId: string, options?: RawAxiosRequestConfig) {
+ return MarketplaceApiFp(this.configuration).apiV1MarketplaceDownloadProductIdGet(productId, options).then((request) => request(this.axios, this.basePath));
+ }
+
+ /**
+ * Get all orders for the authenticated user
+ * @summary List user orders
+ * @param {*} [options] Override http request option.
+ * @throws {RequiredError}
+ */
+ public apiV1MarketplaceOrdersGet(options?: RawAxiosRequestConfig) {
+ return MarketplaceApiFp(this.configuration).apiV1MarketplaceOrdersGet(options).then((request) => request(this.axios, this.basePath));
+ }
+
+ /**
+ * Get details of a specific order (only order owner can access)
+ * @summary Get order details
+ * @param {string} id Order ID
+ * @param {*} [options] Override http request option.
+ * @throws {RequiredError}
+ */
+ public apiV1MarketplaceOrdersIdGet(id: string, options?: RawAxiosRequestConfig) {
+ return MarketplaceApiFp(this.configuration).apiV1MarketplaceOrdersIdGet(id, options).then((request) => request(this.axios, this.basePath));
+ }
+
+ /**
+ * Purchase products
+ * @summary Create a new order
+ * @param {InternalHandlersCreateOrderRequest} order Order items
+ * @param {*} [options] Override http request option.
+ * @throws {RequiredError}
+ */
+ public apiV1MarketplaceOrdersPost(order: InternalHandlersCreateOrderRequest, options?: RawAxiosRequestConfig) {
+ return MarketplaceApiFp(this.configuration).apiV1MarketplaceOrdersPost(order, options).then((request) => request(this.axios, this.basePath));
+ }
+
+ /**
+ * List marketplace products with filters
+ * @summary List products
+ * @param {string} [status] Product status
+ * @param {string} [sellerId] Seller ID
+ * @param {string} [q] Search query
+ * @param {string} [type] Product type (track, pack, service)
+ * @param {number} [minPrice] Minimum price
+ * @param {number} [maxPrice] Maximum price
+ * @param {number} [page] Page number
+ * @param {number} [limit] Items per page
+ * @param {*} [options] Override http request option.
+ * @throws {RequiredError}
+ */
+ public apiV1MarketplaceProductsGet(status?: string, sellerId?: string, q?: string, type?: string, minPrice?: number, maxPrice?: number, page?: number, limit?: number, options?: RawAxiosRequestConfig) {
+ return MarketplaceApiFp(this.configuration).apiV1MarketplaceProductsGet(status, sellerId, q, type, minPrice, maxPrice, page, limit, options).then((request) => request(this.axios, this.basePath));
+ }
+
+ /**
+ * Update product details (only seller can update)
+ * @summary Update a product
+ * @param {string} id Product ID
+ * @param {InternalHandlersUpdateProductRequest} product Product updates
+ * @param {*} [options] Override http request option.
+ * @throws {RequiredError}
+ */
+ public apiV1MarketplaceProductsIdPut(id: string, product: InternalHandlersUpdateProductRequest, options?: RawAxiosRequestConfig) {
+ return MarketplaceApiFp(this.configuration).apiV1MarketplaceProductsIdPut(id, product, options).then((request) => request(this.axios, this.basePath));
+ }
+
+ /**
+ * Create a product (Track, Pack, Service) for sale
+ * @summary Create a new product
+ * @param {InternalHandlersCreateProductRequest} product Product info
+ * @param {*} [options] Override http request option.
+ * @throws {RequiredError}
+ */
+ public apiV1MarketplaceProductsPost(product: InternalHandlersCreateProductRequest, options?: RawAxiosRequestConfig) {
+ return MarketplaceApiFp(this.configuration).apiV1MarketplaceProductsPost(product, options).then((request) => request(this.axios, this.basePath));
+ }
+}
+
+
+
+/**
+ * PlaylistApi - axios parameter creator
+ */
+export const PlaylistApiAxiosParamCreator = function (configuration?: Configuration) {
+ return {
+ /**
+ * Get a paginated list of playlists
+ * @summary Get Playlists
+ * @param {number} [page] Page number
+ * @param {number} [limit] Items per page
+ * @param {string} [userId] Filter by User ID
+ * @param {*} [options] Override http request option.
+ * @throws {RequiredError}
+ */
+ playlistsGet: async (page?: number, limit?: number, userId?: string, options: RawAxiosRequestConfig = {}): Promise => {
+ const localVarPath = `/playlists`;
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
+ let baseOptions;
+ if (configuration) {
+ baseOptions = configuration.baseOptions;
+ }
+
+ const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options};
+ const localVarHeaderParameter = {} as any;
+ const localVarQueryParameter = {} as any;
+
+ // authentication BearerAuth required
+ await setApiKeyToObject(localVarHeaderParameter, "Authorization", configuration)
+
+ if (page !== undefined) {
+ localVarQueryParameter['page'] = page;
+ }
+
+ if (limit !== undefined) {
+ localVarQueryParameter['limit'] = limit;
+ }
+
+ if (userId !== undefined) {
+ localVarQueryParameter['user_id'] = userId;
+ }
+
+ localVarHeaderParameter['Accept'] = 'application/json';
+
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
+ localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
+
+ return {
+ url: toPathString(localVarUrlObj),
+ options: localVarRequestOptions,
+ };
+ },
+ /**
+ * Permanently delete a playlist
+ * @summary Delete Playlist
+ * @param {string} id Playlist ID
+ * @param {*} [options] Override http request option.
+ * @throws {RequiredError}
+ */
+ playlistsIdDelete: async (id: string, options: RawAxiosRequestConfig = {}): Promise => {
+ // verify required parameter 'id' is not null or undefined
+ assertParamExists('playlistsIdDelete', 'id', id)
+ const localVarPath = `/playlists/{id}`
+ .replace(`{${"id"}}`, encodeURIComponent(String(id)));
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
+ let baseOptions;
+ if (configuration) {
+ baseOptions = configuration.baseOptions;
+ }
+
+ const localVarRequestOptions = { method: 'DELETE', ...baseOptions, ...options};
+ const localVarHeaderParameter = {} as any;
+ const localVarQueryParameter = {} as any;
+
+ // authentication BearerAuth required
+ await setApiKeyToObject(localVarHeaderParameter, "Authorization", configuration)
+
+ localVarHeaderParameter['Accept'] = 'application/json';
+
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
+ localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
+
+ return {
+ url: toPathString(localVarUrlObj),
+ options: localVarRequestOptions,
+ };
+ },
+ /**
+ * Get detailed information about a playlist
+ * @summary Get Playlist by ID
+ * @param {string} id Playlist ID
+ * @param {*} [options] Override http request option.
+ * @throws {RequiredError}
+ */
+ playlistsIdGet: async (id: string, options: RawAxiosRequestConfig = {}): Promise => {
+ // verify required parameter 'id' is not null or undefined
+ assertParamExists('playlistsIdGet', 'id', id)
+ const localVarPath = `/playlists/{id}`
+ .replace(`{${"id"}}`, encodeURIComponent(String(id)));
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
+ let baseOptions;
+ if (configuration) {
+ baseOptions = configuration.baseOptions;
+ }
+
+ const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options};
+ const localVarHeaderParameter = {} as any;
+ const localVarQueryParameter = {} as any;
+
+ // authentication BearerAuth required
+ await setApiKeyToObject(localVarHeaderParameter, "Authorization", configuration)
+
+ localVarHeaderParameter['Accept'] = 'application/json';
+
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
+ localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
+
+ return {
+ url: toPathString(localVarUrlObj),
+ options: localVarRequestOptions,
+ };
+ },
+ /**
+ * Update playlist metadata
+ * @summary Update Playlist
+ * @param {string} id Playlist ID
+ * @param {InternalHandlersUpdatePlaylistRequest} playlist Playlist Metadata
+ * @param {*} [options] Override http request option.
+ * @throws {RequiredError}
+ */
+ playlistsIdPut: async (id: string, playlist: InternalHandlersUpdatePlaylistRequest, options: RawAxiosRequestConfig = {}): Promise => {
+ // verify required parameter 'id' is not null or undefined
+ assertParamExists('playlistsIdPut', 'id', id)
+ // verify required parameter 'playlist' is not null or undefined
+ assertParamExists('playlistsIdPut', 'playlist', playlist)
+ const localVarPath = `/playlists/{id}`
+ .replace(`{${"id"}}`, encodeURIComponent(String(id)));
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
+ let baseOptions;
+ if (configuration) {
+ baseOptions = configuration.baseOptions;
+ }
+
+ const localVarRequestOptions = { method: 'PUT', ...baseOptions, ...options};
+ const localVarHeaderParameter = {} as any;
+ const localVarQueryParameter = {} as any;
+
+ // authentication BearerAuth required
+ await setApiKeyToObject(localVarHeaderParameter, "Authorization", configuration)
+
+ localVarHeaderParameter['Content-Type'] = 'application/json';
+ localVarHeaderParameter['Accept'] = 'application/json';
+
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
+ localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
+ localVarRequestOptions.data = serializeDataIfNeeded(playlist, localVarRequestOptions, configuration)
+
+ return {
+ url: toPathString(localVarUrlObj),
+ options: localVarRequestOptions,
+ };
+ },
+ /**
+ * Add a track to the playlist
+ * @summary Add Track to Playlist
+ * @param {string} id Playlist ID
+ * @param {PlaylistsIdTracksPostRequest} trackId Track ID (in body)
+ * @param {*} [options] Override http request option.
+ * @throws {RequiredError}
+ */
+ playlistsIdTracksPost: async (id: string, trackId: PlaylistsIdTracksPostRequest, options: RawAxiosRequestConfig = {}): Promise => {
+ // verify required parameter 'id' is not null or undefined
+ assertParamExists('playlistsIdTracksPost', 'id', id)
+ // verify required parameter 'trackId' is not null or undefined
+ assertParamExists('playlistsIdTracksPost', 'trackId', trackId)
+ const localVarPath = `/playlists/{id}/tracks`
+ .replace(`{${"id"}}`, encodeURIComponent(String(id)));
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
+ let baseOptions;
+ if (configuration) {
+ baseOptions = configuration.baseOptions;
+ }
+
+ const localVarRequestOptions = { method: 'POST', ...baseOptions, ...options};
+ const localVarHeaderParameter = {} as any;
+ const localVarQueryParameter = {} as any;
+
+ // authentication BearerAuth required
+ await setApiKeyToObject(localVarHeaderParameter, "Authorization", configuration)
+
+ localVarHeaderParameter['Content-Type'] = 'application/json';
+ localVarHeaderParameter['Accept'] = 'application/json';
+
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
+ localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
+ localVarRequestOptions.data = serializeDataIfNeeded(trackId, localVarRequestOptions, configuration)
+
+ return {
+ url: toPathString(localVarUrlObj),
+ options: localVarRequestOptions,
+ };
+ },
+ /**
+ * Reorder tracks in the playlist
+ * @summary Reorder Tracks
+ * @param {string} id Playlist ID
+ * @param {InternalHandlersReorderTracksRequest} order New Track Order
+ * @param {*} [options] Override http request option.
+ * @throws {RequiredError}
+ */
+ playlistsIdTracksReorderPut: async (id: string, order: InternalHandlersReorderTracksRequest, options: RawAxiosRequestConfig = {}): Promise => {
+ // verify required parameter 'id' is not null or undefined
+ assertParamExists('playlistsIdTracksReorderPut', 'id', id)
+ // verify required parameter 'order' is not null or undefined
+ assertParamExists('playlistsIdTracksReorderPut', 'order', order)
+ const localVarPath = `/playlists/{id}/tracks/reorder`
+ .replace(`{${"id"}}`, encodeURIComponent(String(id)));
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
+ let baseOptions;
+ if (configuration) {
+ baseOptions = configuration.baseOptions;
+ }
+
+ const localVarRequestOptions = { method: 'PUT', ...baseOptions, ...options};
+ const localVarHeaderParameter = {} as any;
+ const localVarQueryParameter = {} as any;
+
+ // authentication BearerAuth required
+ await setApiKeyToObject(localVarHeaderParameter, "Authorization", configuration)
+
+ localVarHeaderParameter['Content-Type'] = 'application/json';
+ localVarHeaderParameter['Accept'] = 'application/json';
+
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
+ localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
+ localVarRequestOptions.data = serializeDataIfNeeded(order, localVarRequestOptions, configuration)
+
+ return {
+ url: toPathString(localVarUrlObj),
+ options: localVarRequestOptions,
+ };
+ },
+ /**
+ * Remove a track from the playlist
+ * @summary Remove Track from Playlist
+ * @param {string} id Playlist ID
+ * @param {string} trackId Track ID
+ * @param {*} [options] Override http request option.
+ * @throws {RequiredError}
+ */
+ playlistsIdTracksTrackIdDelete: async (id: string, trackId: string, options: RawAxiosRequestConfig = {}): Promise => {
+ // verify required parameter 'id' is not null or undefined
+ assertParamExists('playlistsIdTracksTrackIdDelete', 'id', id)
+ // verify required parameter 'trackId' is not null or undefined
+ assertParamExists('playlistsIdTracksTrackIdDelete', 'trackId', trackId)
+ const localVarPath = `/playlists/{id}/tracks/{trackId}`
+ .replace(`{${"id"}}`, encodeURIComponent(String(id)))
+ .replace(`{${"trackId"}}`, encodeURIComponent(String(trackId)));
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
+ let baseOptions;
+ if (configuration) {
+ baseOptions = configuration.baseOptions;
+ }
+
+ const localVarRequestOptions = { method: 'DELETE', ...baseOptions, ...options};
+ const localVarHeaderParameter = {} as any;
+ const localVarQueryParameter = {} as any;
+
+ // authentication BearerAuth required
+ await setApiKeyToObject(localVarHeaderParameter, "Authorization", configuration)
+
+ localVarHeaderParameter['Accept'] = 'application/json';
+
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
+ localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
+
+ return {
+ url: toPathString(localVarUrlObj),
+ options: localVarRequestOptions,
+ };
+ },
+ /**
+ * Create a new playlist
+ * @summary Create Playlist
+ * @param {InternalHandlersCreatePlaylistRequest} request Playlist Metadata
+ * @param {*} [options] Override http request option.
+ * @throws {RequiredError}
+ */
+ playlistsPost: async (request: InternalHandlersCreatePlaylistRequest, options: RawAxiosRequestConfig = {}): Promise => {
+ // verify required parameter 'request' is not null or undefined
+ assertParamExists('playlistsPost', 'request', request)
+ const localVarPath = `/playlists`;
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
+ let baseOptions;
+ if (configuration) {
+ baseOptions = configuration.baseOptions;
+ }
+
+ const localVarRequestOptions = { method: 'POST', ...baseOptions, ...options};
+ const localVarHeaderParameter = {} as any;
+ const localVarQueryParameter = {} as any;
+
+ // authentication BearerAuth required
+ await setApiKeyToObject(localVarHeaderParameter, "Authorization", configuration)
+
+ localVarHeaderParameter['Content-Type'] = 'application/json';
+ localVarHeaderParameter['Accept'] = 'application/json';
+
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
+ localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
+ localVarRequestOptions.data = serializeDataIfNeeded(request, localVarRequestOptions, configuration)
+
+ return {
+ url: toPathString(localVarUrlObj),
+ options: localVarRequestOptions,
+ };
+ },
+ }
+};
+
+/**
+ * PlaylistApi - functional programming interface
+ */
+export const PlaylistApiFp = function(configuration?: Configuration) {
+ const localVarAxiosParamCreator = PlaylistApiAxiosParamCreator(configuration)
+ return {
+ /**
+ * Get a paginated list of playlists
+ * @summary Get Playlists
+ * @param {number} [page] Page number
+ * @param {number} [limit] Items per page
+ * @param {string} [userId] Filter by User ID
+ * @param {*} [options] Override http request option.
+ * @throws {RequiredError}
+ */
+ async playlistsGet(page?: number, limit?: number, userId?: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> {
+ const localVarAxiosArgs = await localVarAxiosParamCreator.playlistsGet(page, limit, userId, options);
+ const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
+ const localVarOperationServerBasePath = operationServerMap['PlaylistApi.playlistsGet']?.[localVarOperationServerIndex]?.url;
+ return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
+ },
+ /**
+ * Permanently delete a playlist
+ * @summary Delete Playlist
+ * @param {string} id Playlist ID
+ * @param {*} [options] Override http request option.
+ * @throws {RequiredError}
+ */
+ async playlistsIdDelete(id: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> {
+ const localVarAxiosArgs = await localVarAxiosParamCreator.playlistsIdDelete(id, options);
+ const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
+ const localVarOperationServerBasePath = operationServerMap['PlaylistApi.playlistsIdDelete']?.[localVarOperationServerIndex]?.url;
+ return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
+ },
+ /**
+ * Get detailed information about a playlist
+ * @summary Get Playlist by ID
+ * @param {string} id Playlist ID
+ * @param {*} [options] Override http request option.
+ * @throws {RequiredError}
+ */
+ async playlistsIdGet(id: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> {
+ const localVarAxiosArgs = await localVarAxiosParamCreator.playlistsIdGet(id, options);
+ const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
+ const localVarOperationServerBasePath = operationServerMap['PlaylistApi.playlistsIdGet']?.[localVarOperationServerIndex]?.url;
+ return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
+ },
+ /**
+ * Update playlist metadata
+ * @summary Update Playlist
+ * @param {string} id Playlist ID
+ * @param {InternalHandlersUpdatePlaylistRequest} playlist Playlist Metadata
+ * @param {*} [options] Override http request option.
+ * @throws {RequiredError}
+ */
+ async playlistsIdPut(id: string, playlist: InternalHandlersUpdatePlaylistRequest, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> {
+ const localVarAxiosArgs = await localVarAxiosParamCreator.playlistsIdPut(id, playlist, options);
+ const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
+ const localVarOperationServerBasePath = operationServerMap['PlaylistApi.playlistsIdPut']?.[localVarOperationServerIndex]?.url;
+ return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
+ },
+ /**
+ * Add a track to the playlist
+ * @summary Add Track to Playlist
+ * @param {string} id Playlist ID
+ * @param {PlaylistsIdTracksPostRequest} trackId Track ID (in body)
+ * @param {*} [options] Override http request option.
+ * @throws {RequiredError}
+ */
+ async playlistsIdTracksPost(id: string, trackId: PlaylistsIdTracksPostRequest, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> {
+ const localVarAxiosArgs = await localVarAxiosParamCreator.playlistsIdTracksPost(id, trackId, options);
+ const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
+ const localVarOperationServerBasePath = operationServerMap['PlaylistApi.playlistsIdTracksPost']?.[localVarOperationServerIndex]?.url;
+ return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
+ },
+ /**
+ * Reorder tracks in the playlist
+ * @summary Reorder Tracks
+ * @param {string} id Playlist ID
+ * @param {InternalHandlersReorderTracksRequest} order New Track Order
+ * @param {*} [options] Override http request option.
+ * @throws {RequiredError}
+ */
+ async playlistsIdTracksReorderPut(id: string, order: InternalHandlersReorderTracksRequest, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> {
+ const localVarAxiosArgs = await localVarAxiosParamCreator.playlistsIdTracksReorderPut(id, order, options);
+ const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
+ const localVarOperationServerBasePath = operationServerMap['PlaylistApi.playlistsIdTracksReorderPut']?.[localVarOperationServerIndex]?.url;
+ return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
+ },
+ /**
+ * Remove a track from the playlist
+ * @summary Remove Track from Playlist
+ * @param {string} id Playlist ID
+ * @param {string} trackId Track ID
+ * @param {*} [options] Override http request option.
+ * @throws {RequiredError}
+ */
+ async playlistsIdTracksTrackIdDelete(id: string, trackId: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> {
+ const localVarAxiosArgs = await localVarAxiosParamCreator.playlistsIdTracksTrackIdDelete(id, trackId, options);
+ const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
+ const localVarOperationServerBasePath = operationServerMap['PlaylistApi.playlistsIdTracksTrackIdDelete']?.[localVarOperationServerIndex]?.url;
+ return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
+ },
+ /**
+ * Create a new playlist
+ * @summary Create Playlist
+ * @param {InternalHandlersCreatePlaylistRequest} request Playlist Metadata
+ * @param {*} [options] Override http request option.
+ * @throws {RequiredError}
+ */
+ async playlistsPost(request: InternalHandlersCreatePlaylistRequest, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> {
+ const localVarAxiosArgs = await localVarAxiosParamCreator.playlistsPost(request, options);
+ const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
+ const localVarOperationServerBasePath = operationServerMap['PlaylistApi.playlistsPost']?.[localVarOperationServerIndex]?.url;
+ return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
+ },
+ }
+};
+
+/**
+ * PlaylistApi - factory interface
+ */
+export const PlaylistApiFactory = function (configuration?: Configuration, basePath?: string, axios?: AxiosInstance) {
+ const localVarFp = PlaylistApiFp(configuration)
+ return {
+ /**
+ * Get a paginated list of playlists
+ * @summary Get Playlists
+ * @param {number} [page] Page number
+ * @param {number} [limit] Items per page
+ * @param {string} [userId] Filter by User ID
+ * @param {*} [options] Override http request option.
+ * @throws {RequiredError}
+ */
+ playlistsGet(page?: number, limit?: number, userId?: string, options?: RawAxiosRequestConfig): AxiosPromise {
+ return localVarFp.playlistsGet(page, limit, userId, options).then((request) => request(axios, basePath));
+ },
+ /**
+ * Permanently delete a playlist
+ * @summary Delete Playlist
+ * @param {string} id Playlist ID
+ * @param {*} [options] Override http request option.
+ * @throws {RequiredError}
+ */
+ playlistsIdDelete(id: string, options?: RawAxiosRequestConfig): AxiosPromise {
+ return localVarFp.playlistsIdDelete(id, options).then((request) => request(axios, basePath));
+ },
+ /**
+ * Get detailed information about a playlist
+ * @summary Get Playlist by ID
+ * @param {string} id Playlist ID
+ * @param {*} [options] Override http request option.
+ * @throws {RequiredError}
+ */
+ playlistsIdGet(id: string, options?: RawAxiosRequestConfig): AxiosPromise {
+ return localVarFp.playlistsIdGet(id, options).then((request) => request(axios, basePath));
+ },
+ /**
+ * Update playlist metadata
+ * @summary Update Playlist
+ * @param {string} id Playlist ID
+ * @param {InternalHandlersUpdatePlaylistRequest} playlist Playlist Metadata
+ * @param {*} [options] Override http request option.
+ * @throws {RequiredError}
+ */
+ playlistsIdPut(id: string, playlist: InternalHandlersUpdatePlaylistRequest, options?: RawAxiosRequestConfig): AxiosPromise {
+ return localVarFp.playlistsIdPut(id, playlist, options).then((request) => request(axios, basePath));
+ },
+ /**
+ * Add a track to the playlist
+ * @summary Add Track to Playlist
+ * @param {string} id Playlist ID
+ * @param {PlaylistsIdTracksPostRequest} trackId Track ID (in body)
+ * @param {*} [options] Override http request option.
+ * @throws {RequiredError}
+ */
+ playlistsIdTracksPost(id: string, trackId: PlaylistsIdTracksPostRequest, options?: RawAxiosRequestConfig): AxiosPromise {
+ return localVarFp.playlistsIdTracksPost(id, trackId, options).then((request) => request(axios, basePath));
+ },
+ /**
+ * Reorder tracks in the playlist
+ * @summary Reorder Tracks
+ * @param {string} id Playlist ID
+ * @param {InternalHandlersReorderTracksRequest} order New Track Order
+ * @param {*} [options] Override http request option.
+ * @throws {RequiredError}
+ */
+ playlistsIdTracksReorderPut(id: string, order: InternalHandlersReorderTracksRequest, options?: RawAxiosRequestConfig): AxiosPromise {
+ return localVarFp.playlistsIdTracksReorderPut(id, order, options).then((request) => request(axios, basePath));
+ },
+ /**
+ * Remove a track from the playlist
+ * @summary Remove Track from Playlist
+ * @param {string} id Playlist ID
+ * @param {string} trackId Track ID
+ * @param {*} [options] Override http request option.
+ * @throws {RequiredError}
+ */
+ playlistsIdTracksTrackIdDelete(id: string, trackId: string, options?: RawAxiosRequestConfig): AxiosPromise {
+ return localVarFp.playlistsIdTracksTrackIdDelete(id, trackId, options).then((request) => request(axios, basePath));
+ },
+ /**
+ * Create a new playlist
+ * @summary Create Playlist
+ * @param {InternalHandlersCreatePlaylistRequest} request Playlist Metadata
+ * @param {*} [options] Override http request option.
+ * @throws {RequiredError}
+ */
+ playlistsPost(request: InternalHandlersCreatePlaylistRequest, options?: RawAxiosRequestConfig): AxiosPromise {
+ return localVarFp.playlistsPost(request, options).then((request) => request(axios, basePath));
+ },
+ };
+};
+
+/**
+ * PlaylistApi - interface
+ */
+export interface PlaylistApiInterface {
+ /**
+ * Get a paginated list of playlists
+ * @summary Get Playlists
+ * @param {number} [page] Page number
+ * @param {number} [limit] Items per page
+ * @param {string} [userId] Filter by User ID
+ * @param {*} [options] Override http request option.
+ * @throws {RequiredError}
+ */
+ playlistsGet(page?: number, limit?: number, userId?: string, options?: RawAxiosRequestConfig): AxiosPromise;
+
+ /**
+ * Permanently delete a playlist
+ * @summary Delete Playlist
+ * @param {string} id Playlist ID
+ * @param {*} [options] Override http request option.
+ * @throws {RequiredError}
+ */
+ playlistsIdDelete(id: string, options?: RawAxiosRequestConfig): AxiosPromise;
+
+ /**
+ * Get detailed information about a playlist
+ * @summary Get Playlist by ID
+ * @param {string} id Playlist ID
+ * @param {*} [options] Override http request option.
+ * @throws {RequiredError}
+ */
+ playlistsIdGet(id: string, options?: RawAxiosRequestConfig): AxiosPromise;
+
+ /**
+ * Update playlist metadata
+ * @summary Update Playlist
+ * @param {string} id Playlist ID
+ * @param {InternalHandlersUpdatePlaylistRequest} playlist Playlist Metadata
+ * @param {*} [options] Override http request option.
+ * @throws {RequiredError}
+ */
+ playlistsIdPut(id: string, playlist: InternalHandlersUpdatePlaylistRequest, options?: RawAxiosRequestConfig): AxiosPromise