/* 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<string>;
}
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<string>;
}
export interface AuditLogsGet200Response {
    'data'?: AuditLogsGet200ResponseAllOfData;
    'error'?: object;
    'success'?: boolean;
}
export interface AuditLogsGet200ResponseAllOfData {
    'logs'?: Array<string>;
    '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<string>;
}
export interface InternalCoreTrackBatchDeleteRequest {
    'track_ids': Array<string>;
}
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<InternalHandlersCreateOrderRequestItemsInner>;
}
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<string>;
}
export interface InternalHandlersSetupTwoFactorResponse {
    'qr_code_url'?: string;
    'recovery_codes'?: Array<string>;
    '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<VezaBackendApiInternalModelsPlaylist>;
}
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<string>;
    '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<VezaBackendApiInternalModelsTrack>;
}
export interface TracksIdAnalyticsPlaysGet200Response {
    'data'?: TracksIdAnalyticsPlaysGet200ResponseAllOfData;
    'error'?: object;
    'success'?: boolean;
}
export interface TracksIdAnalyticsPlaysGet200ResponseAllOfData {
    'points'?: Array<string>;
}
export interface TracksIdCommentsGet200Response {
    'data'?: TracksIdCommentsGet200ResponseAllOfData;
    'error'?: object;
    'success'?: boolean;
}
export interface TracksIdCommentsGet200ResponseAllOfData {
    'comments'?: Array<string>;
    '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<string>;
}
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<VezaBackendApiInternalCoreMarketplaceOrderItem>;
    /**
     * 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<VezaBackendApiInternalModelsPlaylistCollaborator>;
    'cover_url'?: string;
    'created_at'?: string;
    'description'?: string;
    'follower_count'?: number;
    'id'?: string;
    'is_public'?: boolean;
    'title'?: string;
    'track_count'?: number;
    'tracks'?: Array<VezaBackendApiInternalModelsPlaylistTrack>;
    '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<string>;
}
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<RequestArgs> => {
            // 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<RequestArgs> => {
            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<RequestArgs> => {
            // 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<RequestArgs> => {
            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<RequestArgs> => {
            // 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<RequestArgs> => {
            // 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<RequestArgs> => {
            // 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<RequestArgs> => {
            // 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<AnalyticsEventsPost200Response>> {
            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<AnalyticsGet200Response>> {
            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<AnalyticsTracksIdGet200Response>> {
            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<AnalyticsTracksTopGet200Response>> {
            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<TracksIdAnalyticsPlaysGet200Response>> {
            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<AnalyticsEventsPost200Response>> {
            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<AuditStatsGet200Response>> {
            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<AuditStatsGet200Response>> {
            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<AnalyticsEventsPost200Response> {
            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<AnalyticsGet200Response> {
            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<AnalyticsTracksIdGet200Response> {
            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<AnalyticsTracksTopGet200Response> {
            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<TracksIdAnalyticsPlaysGet200Response> {
            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<AnalyticsEventsPost200Response> {
            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<AuditStatsGet200Response> {
            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<AuditStatsGet200Response> {
            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<AnalyticsEventsPost200Response>;

    /**
     * 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<AnalyticsGet200Response>;

    /**
     * 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<AnalyticsTracksIdGet200Response>;

    /**
     * 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<AnalyticsTracksTopGet200Response>;

    /**
     * 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<TracksIdAnalyticsPlaysGet200Response>;

    /**
     * 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<AnalyticsEventsPost200Response>;

    /**
     * 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<AuditStatsGet200Response>;

    /**
     * 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<AuditStatsGet200Response>;

}

/**
 * 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<RequestArgs> => {
            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<RequestArgs> => {
            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<RequestArgs> => {
            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<AuditActivityGet200Response>> {
            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<AuditLogsGet200Response>> {
            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<AuditStatsGet200Response>> {
            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<AuditActivityGet200Response> {
            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<AuditLogsGet200Response> {
            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<AuditStatsGet200Response> {
            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<AuditActivityGet200Response>;

    /**
     * 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<AuditLogsGet200Response>;

    /**
     * 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<AuditStatsGet200Response>;

}

/**
 * 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<RequestArgs> => {
            // 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<RequestArgs> => {
            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<RequestArgs> => {
            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<RequestArgs> => {
            // 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<RequestArgs> => {
            // 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<RequestArgs> => {
            // 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<RequestArgs> => {
            // 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<RequestArgs> => {
            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<RequestArgs> => {
            // 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<RequestArgs> => {
            // 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<RequestArgs> => {
            // 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<RequestArgs> => {
            // 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<AnalyticsEventsPost200Response>> {
            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<Auth2faSetupPost200Response>> {
            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<Auth2faStatusGet200Response>> {
            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<AnalyticsEventsPost200Response>> {
            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<AuthCheckUsernameGet200Response>> {
            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<VezaBackendApiInternalDtoLoginResponse>> {
            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<InternalHandlersAPIResponse>> {
            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<AuthMeGet200Response>> {
            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<VezaBackendApiInternalDtoTokenResponse>> {
            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<VezaBackendApiInternalDtoRegisterResponse>> {
            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<InternalHandlersAPIResponse>> {
            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<InternalHandlersAPIResponse>> {
            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<AnalyticsEventsPost200Response> {
            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<Auth2faSetupPost200Response> {
            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<Auth2faStatusGet200Response> {
            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<AnalyticsEventsPost200Response> {
            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<AuthCheckUsernameGet200Response> {
            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<VezaBackendApiInternalDtoLoginResponse> {
            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<InternalHandlersAPIResponse> {
            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<AuthMeGet200Response> {
            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<VezaBackendApiInternalDtoTokenResponse> {
            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<VezaBackendApiInternalDtoRegisterResponse> {
            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<InternalHandlersAPIResponse> {
            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<InternalHandlersAPIResponse> {
            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<AnalyticsEventsPost200Response>;

    /**
     * Generate 2FA secret and QR code for setup
     * @summary Setup 2FA
     * @param {*} [options] Override http request option.
     * @throws {RequiredError}
     */
    auth2faSetupPost(options?: RawAxiosRequestConfig): AxiosPromise<Auth2faSetupPost200Response>;

    /**
     * Get 2FA enabled status for authenticated user
     * @summary Get 2FA Status
     * @param {*} [options] Override http request option.
     * @throws {RequiredError}
     */
    auth2faStatusGet(options?: RawAxiosRequestConfig): AxiosPromise<Auth2faStatusGet200Response>;

    /**
     * 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<AnalyticsEventsPost200Response>;

    /**
     * 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<AuthCheckUsernameGet200Response>;

    /**
     * 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<VezaBackendApiInternalDtoLoginResponse>;

    /**
     * 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<InternalHandlersAPIResponse>;

    /**
     * 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<AuthMeGet200Response>;

    /**
     * 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<VezaBackendApiInternalDtoTokenResponse>;

    /**
     * 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<VezaBackendApiInternalDtoRegisterResponse>;

    /**
     * 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<InternalHandlersAPIResponse>;

    /**
     * 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<InternalHandlersAPIResponse>;

}

/**
 * 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<RequestArgs> => {
            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<ChatTokenGet200Response>> {
            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<ChatTokenGet200Response> {
            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<ChatTokenGet200Response>;

}

/**
 * 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<RequestArgs> => {
            // 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<RequestArgs> => {
            // 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<RequestArgs> => {
            // 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<RequestArgs> => {
            // 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<RequestArgs> => {
            // 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<CommentsIdPut200Response>> {
            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<CommentsIdRepliesGet200Response>> {
            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<AnalyticsEventsPost200Response>> {
            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<TracksIdCommentsGet200Response>> {
            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<CommentsIdPut200Response>> {
            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<CommentsIdPut200Response> {
            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<CommentsIdRepliesGet200Response> {
            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<AnalyticsEventsPost200Response> {
            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<TracksIdCommentsGet200Response> {
            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<CommentsIdPut200Response> {
            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<CommentsIdPut200Response>;

    /**
     * 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<CommentsIdRepliesGet200Response>;

    /**
     * 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<AnalyticsEventsPost200Response>;

    /**
     * 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<TracksIdCommentsGet200Response>;

    /**
     * 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<CommentsIdPut200Response>;

}

/**
 * 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<RequestArgs> => {
            // 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<ApiV1LogsFrontendPost200Response>> {
            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<ApiV1LogsFrontendPost200Response> {
            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<ApiV1LogsFrontendPost200Response>;

}

/**
 * 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<RequestArgs> => {
            // 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<RequestArgs> => {
            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<RequestArgs> => {
            // 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<RequestArgs> => {
            // 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<RequestArgs> => {
            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<RequestArgs> => {
            // 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<RequestArgs> => {
            // 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<Array<VezaBackendApiInternalCoreMarketplaceOrder>>> {
            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<VezaBackendApiInternalCoreMarketplaceOrder>> {
            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<VezaBackendApiInternalCoreMarketplaceOrder>> {
            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<Array<VezaBackendApiInternalCoreMarketplaceProduct>>> {
            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<VezaBackendApiInternalCoreMarketplaceProduct>> {
            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<VezaBackendApiInternalCoreMarketplaceProduct>> {
            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<Array<VezaBackendApiInternalCoreMarketplaceOrder>> {
            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<VezaBackendApiInternalCoreMarketplaceOrder> {
            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<VezaBackendApiInternalCoreMarketplaceOrder> {
            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<Array<VezaBackendApiInternalCoreMarketplaceProduct>> {
            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<VezaBackendApiInternalCoreMarketplaceProduct> {
            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<VezaBackendApiInternalCoreMarketplaceProduct> {
            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<Array<VezaBackendApiInternalCoreMarketplaceOrder>>;

    /**
     * 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<VezaBackendApiInternalCoreMarketplaceOrder>;

    /**
     * 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<VezaBackendApiInternalCoreMarketplaceOrder>;

    /**
     * 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<Array<VezaBackendApiInternalCoreMarketplaceProduct>>;

    /**
     * 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<VezaBackendApiInternalCoreMarketplaceProduct>;

    /**
     * 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<VezaBackendApiInternalCoreMarketplaceProduct>;

}

/**
 * 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<RequestArgs> => {
            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<RequestArgs> => {
            // 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<RequestArgs> => {
            // 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<RequestArgs> => {
            // 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<RequestArgs> => {
            // 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<RequestArgs> => {
            // 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<RequestArgs> => {
            // 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<RequestArgs> => {
            // 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<PlaylistsGet200Response>> {
            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<AnalyticsEventsPost200Response>> {
            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<PlaylistsPost201Response>> {
            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<PlaylistsPost201Response>> {
            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<AnalyticsEventsPost200Response>> {
            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<AnalyticsEventsPost200Response>> {
            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<AnalyticsEventsPost200Response>> {
            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<PlaylistsPost201Response>> {
            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<PlaylistsGet200Response> {
            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<AnalyticsEventsPost200Response> {
            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<PlaylistsPost201Response> {
            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<PlaylistsPost201Response> {
            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<AnalyticsEventsPost200Response> {
            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<AnalyticsEventsPost200Response> {
            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<AnalyticsEventsPost200Response> {
            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<PlaylistsPost201Response> {
            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<PlaylistsGet200Response>;

    /**
     * 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<AnalyticsEventsPost200Response>;

    /**
     * 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<PlaylistsPost201Response>;

    /**
     * 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<PlaylistsPost201Response>;

    /**
     * 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<AnalyticsEventsPost200Response>;

    /**
     * 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<AnalyticsEventsPost200Response>;

    /**
     * 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<AnalyticsEventsPost200Response>;

    /**
     * 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<PlaylistsPost201Response>;

}

/**
 * PlaylistApi - object-oriented interface
 */
export class PlaylistApi extends BaseAPI implements 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}
     */
    public playlistsGet(page?: number, limit?: number, userId?: string, options?: RawAxiosRequestConfig) {
        return PlaylistApiFp(this.configuration).playlistsGet(page, limit, userId, options).then((request) => request(this.axios, this.basePath));
    }

    /**
     * Permanently delete a playlist
     * @summary Delete Playlist
     * @param {string} id Playlist ID
     * @param {*} [options] Override http request option.
     * @throws {RequiredError}
     */
    public playlistsIdDelete(id: string, options?: RawAxiosRequestConfig) {
        return PlaylistApiFp(this.configuration).playlistsIdDelete(id, options).then((request) => request(this.axios, this.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}
     */
    public playlistsIdGet(id: string, options?: RawAxiosRequestConfig) {
        return PlaylistApiFp(this.configuration).playlistsIdGet(id, options).then((request) => request(this.axios, this.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}
     */
    public playlistsIdPut(id: string, playlist: InternalHandlersUpdatePlaylistRequest, options?: RawAxiosRequestConfig) {
        return PlaylistApiFp(this.configuration).playlistsIdPut(id, playlist, options).then((request) => request(this.axios, this.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}
     */
    public playlistsIdTracksPost(id: string, trackId: PlaylistsIdTracksPostRequest, options?: RawAxiosRequestConfig) {
        return PlaylistApiFp(this.configuration).playlistsIdTracksPost(id, trackId, options).then((request) => request(this.axios, this.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}
     */
    public playlistsIdTracksReorderPut(id: string, order: InternalHandlersReorderTracksRequest, options?: RawAxiosRequestConfig) {
        return PlaylistApiFp(this.configuration).playlistsIdTracksReorderPut(id, order, options).then((request) => request(this.axios, this.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}
     */
    public playlistsIdTracksTrackIdDelete(id: string, trackId: string, options?: RawAxiosRequestConfig) {
        return PlaylistApiFp(this.configuration).playlistsIdTracksTrackIdDelete(id, trackId, options).then((request) => request(this.axios, this.basePath));
    }

    /**
     * Create a new playlist
     * @summary Create Playlist
     * @param {InternalHandlersCreatePlaylistRequest} request Playlist Metadata
     * @param {*} [options] Override http request option.
     * @throws {RequiredError}
     */
    public playlistsPost(request: InternalHandlersCreatePlaylistRequest, options?: RawAxiosRequestConfig) {
        return PlaylistApiFp(this.configuration).playlistsPost(request, options).then((request) => request(this.axios, this.basePath));
    }
}



/**
 * TrackApi - axios parameter creator
 */
export const TrackApiAxiosParamCreator = function (configuration?: Configuration) {
    return {
        /**
         * Delete multiple tracks at once
         * @summary Batch Delete Tracks
         * @param {InternalCoreTrackBatchDeleteRequest} request List of Track IDs
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        tracksBatchDeletePost: async (request: InternalCoreTrackBatchDeleteRequest, options: RawAxiosRequestConfig = {}): Promise<RequestArgs> => {
            // verify required parameter 'request' is not null or undefined
            assertParamExists('tracksBatchDeletePost', 'request', request)
            const localVarPath = `/tracks/batch/delete`;
            // 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,
            };
        },
        /**
         * Upload a single chunk of a file
         * @summary Upload Chunk
         * @param {File} chunk Chunk Data
         * @param {string} uploadId Upload ID
         * @param {number} chunkNumber Chunk Number
         * @param {number} totalChunks Total Chunks
         * @param {number} totalSize Total Size
         * @param {string} filename Filename
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        tracksChunkPost: async (chunk: File, uploadId: string, chunkNumber: number, totalChunks: number, totalSize: number, filename: string, options: RawAxiosRequestConfig = {}): Promise<RequestArgs> => {
            // verify required parameter 'chunk' is not null or undefined
            assertParamExists('tracksChunkPost', 'chunk', chunk)
            // verify required parameter 'uploadId' is not null or undefined
            assertParamExists('tracksChunkPost', 'uploadId', uploadId)
            // verify required parameter 'chunkNumber' is not null or undefined
            assertParamExists('tracksChunkPost', 'chunkNumber', chunkNumber)
            // verify required parameter 'totalChunks' is not null or undefined
            assertParamExists('tracksChunkPost', 'totalChunks', totalChunks)
            // verify required parameter 'totalSize' is not null or undefined
            assertParamExists('tracksChunkPost', 'totalSize', totalSize)
            // verify required parameter 'filename' is not null or undefined
            assertParamExists('tracksChunkPost', 'filename', filename)
            const localVarPath = `/tracks/chunk`;
            // 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;
            const localVarFormParams = new ((configuration && configuration.formDataCtor) || FormData)();

            // authentication BearerAuth required
            await setApiKeyToObject(localVarHeaderParameter, "Authorization", configuration)


            if (chunk !== undefined) { 
                localVarFormParams.append('chunk', chunk as any);
            }

            if (uploadId !== undefined) { 
                localVarFormParams.append('upload_id', uploadId as any);
            }

            if (chunkNumber !== undefined) { 
                localVarFormParams.append('chunk_number', chunkNumber as any);
            }

            if (totalChunks !== undefined) { 
                localVarFormParams.append('total_chunks', totalChunks as any);
            }

            if (totalSize !== undefined) { 
                localVarFormParams.append('total_size', totalSize as any);
            }

            if (filename !== undefined) { 
                localVarFormParams.append('filename', filename as any);
            }
            localVarHeaderParameter['Content-Type'] = 'multipart/form-data';
            localVarHeaderParameter['Accept'] = 'application/json';

            setSearchParams(localVarUrlObj, localVarQueryParameter);
            let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
            localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
            localVarRequestOptions.data = localVarFormParams;

            return {
                url: toPathString(localVarUrlObj),
                options: localVarRequestOptions,
            };
        },
        /**
         * Finish upload session and assemble file
         * @summary Complete Chunked Upload
         * @param {InternalCoreTrackCompleteChunkedUploadRequest} request Upload ID
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        tracksCompletePost: async (request: InternalCoreTrackCompleteChunkedUploadRequest, options: RawAxiosRequestConfig = {}): Promise<RequestArgs> => {
            // verify required parameter 'request' is not null or undefined
            assertParamExists('tracksCompletePost', 'request', request)
            const localVarPath = `/tracks/complete`;
            // 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 a paginated list of tracks with filters
         * @summary List Tracks
         * @param {number} [page] Page number
         * @param {number} [limit] Items per page
         * @param {string} [userId] Filter by User ID
         * @param {string} [genre] Filter by Genre
         * @param {string} [format] Filter by Format
         * @param {string} [sortBy] Sort field
         * @param {string} [sortOrder] Sort order (asc/desc)
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        tracksGet: async (page?: number, limit?: number, userId?: string, genre?: string, format?: string, sortBy?: string, sortOrder?: string, options: RawAxiosRequestConfig = {}): Promise<RequestArgs> => {
            const localVarPath = `/tracks`;
            // 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;
            }

            if (userId !== undefined) {
                localVarQueryParameter['user_id'] = userId;
            }

            if (genre !== undefined) {
                localVarQueryParameter['genre'] = genre;
            }

            if (format !== undefined) {
                localVarQueryParameter['format'] = format;
            }

            if (sortBy !== undefined) {
                localVarQueryParameter['sort_by'] = sortBy;
            }

            if (sortOrder !== undefined) {
                localVarQueryParameter['sort_order'] = sortOrder;
            }

            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 track
         * @summary Delete Track
         * @param {string} id Track ID
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        tracksIdDelete: async (id: string, options: RawAxiosRequestConfig = {}): Promise<RequestArgs> => {
            // verify required parameter 'id' is not null or undefined
            assertParamExists('tracksIdDelete', 'id', id)
            const localVarPath = `/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: '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 track
         * @summary Get Track by ID
         * @param {string} id Track ID
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        tracksIdGet: async (id: string, options: RawAxiosRequestConfig = {}): Promise<RequestArgs> => {
            // verify required parameter 'id' is not null or undefined
            assertParamExists('tracksIdGet', 'id', id)
            const localVarPath = `/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;

            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 track metadata
         * @summary Update Track
         * @param {string} id Track ID
         * @param {InternalCoreTrackUpdateTrackRequest} track Track Metadata
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        tracksIdPut: async (id: string, track: InternalCoreTrackUpdateTrackRequest, options: RawAxiosRequestConfig = {}): Promise<RequestArgs> => {
            // verify required parameter 'id' is not null or undefined
            assertParamExists('tracksIdPut', 'id', id)
            // verify required parameter 'track' is not null or undefined
            assertParamExists('tracksIdPut', 'track', track)
            const localVarPath = `/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: '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(track, localVarRequestOptions, configuration)

            return {
                url: toPathString(localVarUrlObj),
                options: localVarRequestOptions,
            };
        },
        /**
         * Get the processing status of an uploaded track
         * @summary Get Upload Status
         * @param {string} id Track ID
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        tracksIdStatusGet: async (id: string, options: RawAxiosRequestConfig = {}): Promise<RequestArgs> => {
            // verify required parameter 'id' is not null or undefined
            assertParamExists('tracksIdStatusGet', 'id', id)
            const localVarPath = `/tracks/{id}/status`
                .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,
            };
        },
        /**
         * Start a new chunked upload session
         * @summary Initiate Chunked Upload
         * @param {InternalCoreTrackInitiateChunkedUploadRequest} request Upload Metadata
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        tracksInitiatePost: async (request: InternalCoreTrackInitiateChunkedUploadRequest, options: RawAxiosRequestConfig = {}): Promise<RequestArgs> => {
            // verify required parameter 'request' is not null or undefined
            assertParamExists('tracksInitiatePost', 'request', request)
            const localVarPath = `/tracks/initiate`;
            // 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,
            };
        },
        /**
         * Upload a new track (audio file)
         * @summary Upload Track
         * @param {File} file Audio File (MP3, WAV, FLAC, OGG)
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        tracksPost: async (file: File, options: RawAxiosRequestConfig = {}): Promise<RequestArgs> => {
            // verify required parameter 'file' is not null or undefined
            assertParamExists('tracksPost', 'file', file)
            const localVarPath = `/tracks`;
            // 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;
            const localVarFormParams = new ((configuration && configuration.formDataCtor) || FormData)();

            // authentication BearerAuth required
            await setApiKeyToObject(localVarHeaderParameter, "Authorization", configuration)


            if (file !== undefined) { 
                localVarFormParams.append('file', file as any);
            }
            localVarHeaderParameter['Content-Type'] = 'multipart/form-data';
            localVarHeaderParameter['Accept'] = 'application/json';

            setSearchParams(localVarUrlObj, localVarQueryParameter);
            let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
            localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
            localVarRequestOptions.data = localVarFormParams;

            return {
                url: toPathString(localVarUrlObj),
                options: localVarRequestOptions,
            };
        },
        /**
         * Get remaining upload quota for the user
         * @summary Get Upload Quota
         * @param {string} id User ID (optional, defaults to current user)
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        tracksQuotaIdGet: async (id: string, options: RawAxiosRequestConfig = {}): Promise<RequestArgs> => {
            // verify required parameter 'id' is not null or undefined
            assertParamExists('tracksQuotaIdGet', 'id', id)
            const localVarPath = `/tracks/quota/{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 state of an interrupted upload
         * @summary Resume Upload
         * @param {string} uploadId Upload ID
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        tracksResumeUploadIdGet: async (uploadId: string, options: RawAxiosRequestConfig = {}): Promise<RequestArgs> => {
            // verify required parameter 'uploadId' is not null or undefined
            assertParamExists('tracksResumeUploadIdGet', 'uploadId', uploadId)
            const localVarPath = `/tracks/resume/{uploadId}`
                .replace(`{${"uploadId"}}`, encodeURIComponent(String(uploadId)));
            // 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,
            };
        },
    }
};

/**
 * TrackApi - functional programming interface
 */
export const TrackApiFp = function(configuration?: Configuration) {
    const localVarAxiosParamCreator = TrackApiAxiosParamCreator(configuration)
    return {
        /**
         * Delete multiple tracks at once
         * @summary Batch Delete Tracks
         * @param {InternalCoreTrackBatchDeleteRequest} request List of Track IDs
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        async tracksBatchDeletePost(request: InternalCoreTrackBatchDeleteRequest, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<TracksBatchDeletePost200Response>> {
            const localVarAxiosArgs = await localVarAxiosParamCreator.tracksBatchDeletePost(request, options);
            const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
            const localVarOperationServerBasePath = operationServerMap['TrackApi.tracksBatchDeletePost']?.[localVarOperationServerIndex]?.url;
            return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
        },
        /**
         * Upload a single chunk of a file
         * @summary Upload Chunk
         * @param {File} chunk Chunk Data
         * @param {string} uploadId Upload ID
         * @param {number} chunkNumber Chunk Number
         * @param {number} totalChunks Total Chunks
         * @param {number} totalSize Total Size
         * @param {string} filename Filename
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        async tracksChunkPost(chunk: File, uploadId: string, chunkNumber: number, totalChunks: number, totalSize: number, filename: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<TracksChunkPost200Response>> {
            const localVarAxiosArgs = await localVarAxiosParamCreator.tracksChunkPost(chunk, uploadId, chunkNumber, totalChunks, totalSize, filename, options);
            const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
            const localVarOperationServerBasePath = operationServerMap['TrackApi.tracksChunkPost']?.[localVarOperationServerIndex]?.url;
            return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
        },
        /**
         * Finish upload session and assemble file
         * @summary Complete Chunked Upload
         * @param {InternalCoreTrackCompleteChunkedUploadRequest} request Upload ID
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        async tracksCompletePost(request: InternalCoreTrackCompleteChunkedUploadRequest, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<TracksCompletePost201Response>> {
            const localVarAxiosArgs = await localVarAxiosParamCreator.tracksCompletePost(request, options);
            const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
            const localVarOperationServerBasePath = operationServerMap['TrackApi.tracksCompletePost']?.[localVarOperationServerIndex]?.url;
            return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
        },
        /**
         * Get a paginated list of tracks with filters
         * @summary List Tracks
         * @param {number} [page] Page number
         * @param {number} [limit] Items per page
         * @param {string} [userId] Filter by User ID
         * @param {string} [genre] Filter by Genre
         * @param {string} [format] Filter by Format
         * @param {string} [sortBy] Sort field
         * @param {string} [sortOrder] Sort order (asc/desc)
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        async tracksGet(page?: number, limit?: number, userId?: string, genre?: string, format?: string, sortBy?: string, sortOrder?: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<TracksGet200Response>> {
            const localVarAxiosArgs = await localVarAxiosParamCreator.tracksGet(page, limit, userId, genre, format, sortBy, sortOrder, options);
            const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
            const localVarOperationServerBasePath = operationServerMap['TrackApi.tracksGet']?.[localVarOperationServerIndex]?.url;
            return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
        },
        /**
         * Permanently delete a track
         * @summary Delete Track
         * @param {string} id Track ID
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        async tracksIdDelete(id: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<TracksIdDelete200Response>> {
            const localVarAxiosArgs = await localVarAxiosParamCreator.tracksIdDelete(id, options);
            const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
            const localVarOperationServerBasePath = operationServerMap['TrackApi.tracksIdDelete']?.[localVarOperationServerIndex]?.url;
            return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
        },
        /**
         * Get detailed information about a track
         * @summary Get Track by ID
         * @param {string} id Track ID
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        async tracksIdGet(id: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<TracksPost201Response>> {
            const localVarAxiosArgs = await localVarAxiosParamCreator.tracksIdGet(id, options);
            const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
            const localVarOperationServerBasePath = operationServerMap['TrackApi.tracksIdGet']?.[localVarOperationServerIndex]?.url;
            return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
        },
        /**
         * Update track metadata
         * @summary Update Track
         * @param {string} id Track ID
         * @param {InternalCoreTrackUpdateTrackRequest} track Track Metadata
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        async tracksIdPut(id: string, track: InternalCoreTrackUpdateTrackRequest, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<TracksPost201Response>> {
            const localVarAxiosArgs = await localVarAxiosParamCreator.tracksIdPut(id, track, options);
            const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
            const localVarOperationServerBasePath = operationServerMap['TrackApi.tracksIdPut']?.[localVarOperationServerIndex]?.url;
            return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
        },
        /**
         * Get the processing status of an uploaded track
         * @summary Get Upload Status
         * @param {string} id Track ID
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        async tracksIdStatusGet(id: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<TracksIdStatusGet200Response>> {
            const localVarAxiosArgs = await localVarAxiosParamCreator.tracksIdStatusGet(id, options);
            const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
            const localVarOperationServerBasePath = operationServerMap['TrackApi.tracksIdStatusGet']?.[localVarOperationServerIndex]?.url;
            return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
        },
        /**
         * Start a new chunked upload session
         * @summary Initiate Chunked Upload
         * @param {InternalCoreTrackInitiateChunkedUploadRequest} request Upload Metadata
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        async tracksInitiatePost(request: InternalCoreTrackInitiateChunkedUploadRequest, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<TracksInitiatePost200Response>> {
            const localVarAxiosArgs = await localVarAxiosParamCreator.tracksInitiatePost(request, options);
            const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
            const localVarOperationServerBasePath = operationServerMap['TrackApi.tracksInitiatePost']?.[localVarOperationServerIndex]?.url;
            return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
        },
        /**
         * Upload a new track (audio file)
         * @summary Upload Track
         * @param {File} file Audio File (MP3, WAV, FLAC, OGG)
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        async tracksPost(file: File, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<TracksPost201Response>> {
            const localVarAxiosArgs = await localVarAxiosParamCreator.tracksPost(file, options);
            const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
            const localVarOperationServerBasePath = operationServerMap['TrackApi.tracksPost']?.[localVarOperationServerIndex]?.url;
            return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
        },
        /**
         * Get remaining upload quota for the user
         * @summary Get Upload Quota
         * @param {string} id User ID (optional, defaults to current user)
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        async tracksQuotaIdGet(id: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<TracksQuotaIdGet200Response>> {
            const localVarAxiosArgs = await localVarAxiosParamCreator.tracksQuotaIdGet(id, options);
            const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
            const localVarOperationServerBasePath = operationServerMap['TrackApi.tracksQuotaIdGet']?.[localVarOperationServerIndex]?.url;
            return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
        },
        /**
         * Get state of an interrupted upload
         * @summary Resume Upload
         * @param {string} uploadId Upload ID
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        async tracksResumeUploadIdGet(uploadId: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<TracksResumeUploadIdGet200Response>> {
            const localVarAxiosArgs = await localVarAxiosParamCreator.tracksResumeUploadIdGet(uploadId, options);
            const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
            const localVarOperationServerBasePath = operationServerMap['TrackApi.tracksResumeUploadIdGet']?.[localVarOperationServerIndex]?.url;
            return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
        },
    }
};

/**
 * TrackApi - factory interface
 */
export const TrackApiFactory = function (configuration?: Configuration, basePath?: string, axios?: AxiosInstance) {
    const localVarFp = TrackApiFp(configuration)
    return {
        /**
         * Delete multiple tracks at once
         * @summary Batch Delete Tracks
         * @param {InternalCoreTrackBatchDeleteRequest} request List of Track IDs
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        tracksBatchDeletePost(request: InternalCoreTrackBatchDeleteRequest, options?: RawAxiosRequestConfig): AxiosPromise<TracksBatchDeletePost200Response> {
            return localVarFp.tracksBatchDeletePost(request, options).then((request) => request(axios, basePath));
        },
        /**
         * Upload a single chunk of a file
         * @summary Upload Chunk
         * @param {File} chunk Chunk Data
         * @param {string} uploadId Upload ID
         * @param {number} chunkNumber Chunk Number
         * @param {number} totalChunks Total Chunks
         * @param {number} totalSize Total Size
         * @param {string} filename Filename
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        tracksChunkPost(chunk: File, uploadId: string, chunkNumber: number, totalChunks: number, totalSize: number, filename: string, options?: RawAxiosRequestConfig): AxiosPromise<TracksChunkPost200Response> {
            return localVarFp.tracksChunkPost(chunk, uploadId, chunkNumber, totalChunks, totalSize, filename, options).then((request) => request(axios, basePath));
        },
        /**
         * Finish upload session and assemble file
         * @summary Complete Chunked Upload
         * @param {InternalCoreTrackCompleteChunkedUploadRequest} request Upload ID
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        tracksCompletePost(request: InternalCoreTrackCompleteChunkedUploadRequest, options?: RawAxiosRequestConfig): AxiosPromise<TracksCompletePost201Response> {
            return localVarFp.tracksCompletePost(request, options).then((request) => request(axios, basePath));
        },
        /**
         * Get a paginated list of tracks with filters
         * @summary List Tracks
         * @param {number} [page] Page number
         * @param {number} [limit] Items per page
         * @param {string} [userId] Filter by User ID
         * @param {string} [genre] Filter by Genre
         * @param {string} [format] Filter by Format
         * @param {string} [sortBy] Sort field
         * @param {string} [sortOrder] Sort order (asc/desc)
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        tracksGet(page?: number, limit?: number, userId?: string, genre?: string, format?: string, sortBy?: string, sortOrder?: string, options?: RawAxiosRequestConfig): AxiosPromise<TracksGet200Response> {
            return localVarFp.tracksGet(page, limit, userId, genre, format, sortBy, sortOrder, options).then((request) => request(axios, basePath));
        },
        /**
         * Permanently delete a track
         * @summary Delete Track
         * @param {string} id Track ID
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        tracksIdDelete(id: string, options?: RawAxiosRequestConfig): AxiosPromise<TracksIdDelete200Response> {
            return localVarFp.tracksIdDelete(id, options).then((request) => request(axios, basePath));
        },
        /**
         * Get detailed information about a track
         * @summary Get Track by ID
         * @param {string} id Track ID
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        tracksIdGet(id: string, options?: RawAxiosRequestConfig): AxiosPromise<TracksPost201Response> {
            return localVarFp.tracksIdGet(id, options).then((request) => request(axios, basePath));
        },
        /**
         * Update track metadata
         * @summary Update Track
         * @param {string} id Track ID
         * @param {InternalCoreTrackUpdateTrackRequest} track Track Metadata
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        tracksIdPut(id: string, track: InternalCoreTrackUpdateTrackRequest, options?: RawAxiosRequestConfig): AxiosPromise<TracksPost201Response> {
            return localVarFp.tracksIdPut(id, track, options).then((request) => request(axios, basePath));
        },
        /**
         * Get the processing status of an uploaded track
         * @summary Get Upload Status
         * @param {string} id Track ID
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        tracksIdStatusGet(id: string, options?: RawAxiosRequestConfig): AxiosPromise<TracksIdStatusGet200Response> {
            return localVarFp.tracksIdStatusGet(id, options).then((request) => request(axios, basePath));
        },
        /**
         * Start a new chunked upload session
         * @summary Initiate Chunked Upload
         * @param {InternalCoreTrackInitiateChunkedUploadRequest} request Upload Metadata
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        tracksInitiatePost(request: InternalCoreTrackInitiateChunkedUploadRequest, options?: RawAxiosRequestConfig): AxiosPromise<TracksInitiatePost200Response> {
            return localVarFp.tracksInitiatePost(request, options).then((request) => request(axios, basePath));
        },
        /**
         * Upload a new track (audio file)
         * @summary Upload Track
         * @param {File} file Audio File (MP3, WAV, FLAC, OGG)
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        tracksPost(file: File, options?: RawAxiosRequestConfig): AxiosPromise<TracksPost201Response> {
            return localVarFp.tracksPost(file, options).then((request) => request(axios, basePath));
        },
        /**
         * Get remaining upload quota for the user
         * @summary Get Upload Quota
         * @param {string} id User ID (optional, defaults to current user)
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        tracksQuotaIdGet(id: string, options?: RawAxiosRequestConfig): AxiosPromise<TracksQuotaIdGet200Response> {
            return localVarFp.tracksQuotaIdGet(id, options).then((request) => request(axios, basePath));
        },
        /**
         * Get state of an interrupted upload
         * @summary Resume Upload
         * @param {string} uploadId Upload ID
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        tracksResumeUploadIdGet(uploadId: string, options?: RawAxiosRequestConfig): AxiosPromise<TracksResumeUploadIdGet200Response> {
            return localVarFp.tracksResumeUploadIdGet(uploadId, options).then((request) => request(axios, basePath));
        },
    };
};

/**
 * TrackApi - interface
 */
export interface TrackApiInterface {
    /**
     * Delete multiple tracks at once
     * @summary Batch Delete Tracks
     * @param {InternalCoreTrackBatchDeleteRequest} request List of Track IDs
     * @param {*} [options] Override http request option.
     * @throws {RequiredError}
     */
    tracksBatchDeletePost(request: InternalCoreTrackBatchDeleteRequest, options?: RawAxiosRequestConfig): AxiosPromise<TracksBatchDeletePost200Response>;

    /**
     * Upload a single chunk of a file
     * @summary Upload Chunk
     * @param {File} chunk Chunk Data
     * @param {string} uploadId Upload ID
     * @param {number} chunkNumber Chunk Number
     * @param {number} totalChunks Total Chunks
     * @param {number} totalSize Total Size
     * @param {string} filename Filename
     * @param {*} [options] Override http request option.
     * @throws {RequiredError}
     */
    tracksChunkPost(chunk: File, uploadId: string, chunkNumber: number, totalChunks: number, totalSize: number, filename: string, options?: RawAxiosRequestConfig): AxiosPromise<TracksChunkPost200Response>;

    /**
     * Finish upload session and assemble file
     * @summary Complete Chunked Upload
     * @param {InternalCoreTrackCompleteChunkedUploadRequest} request Upload ID
     * @param {*} [options] Override http request option.
     * @throws {RequiredError}
     */
    tracksCompletePost(request: InternalCoreTrackCompleteChunkedUploadRequest, options?: RawAxiosRequestConfig): AxiosPromise<TracksCompletePost201Response>;

    /**
     * Get a paginated list of tracks with filters
     * @summary List Tracks
     * @param {number} [page] Page number
     * @param {number} [limit] Items per page
     * @param {string} [userId] Filter by User ID
     * @param {string} [genre] Filter by Genre
     * @param {string} [format] Filter by Format
     * @param {string} [sortBy] Sort field
     * @param {string} [sortOrder] Sort order (asc/desc)
     * @param {*} [options] Override http request option.
     * @throws {RequiredError}
     */
    tracksGet(page?: number, limit?: number, userId?: string, genre?: string, format?: string, sortBy?: string, sortOrder?: string, options?: RawAxiosRequestConfig): AxiosPromise<TracksGet200Response>;

    /**
     * Permanently delete a track
     * @summary Delete Track
     * @param {string} id Track ID
     * @param {*} [options] Override http request option.
     * @throws {RequiredError}
     */
    tracksIdDelete(id: string, options?: RawAxiosRequestConfig): AxiosPromise<TracksIdDelete200Response>;

    /**
     * Get detailed information about a track
     * @summary Get Track by ID
     * @param {string} id Track ID
     * @param {*} [options] Override http request option.
     * @throws {RequiredError}
     */
    tracksIdGet(id: string, options?: RawAxiosRequestConfig): AxiosPromise<TracksPost201Response>;

    /**
     * Update track metadata
     * @summary Update Track
     * @param {string} id Track ID
     * @param {InternalCoreTrackUpdateTrackRequest} track Track Metadata
     * @param {*} [options] Override http request option.
     * @throws {RequiredError}
     */
    tracksIdPut(id: string, track: InternalCoreTrackUpdateTrackRequest, options?: RawAxiosRequestConfig): AxiosPromise<TracksPost201Response>;

    /**
     * Get the processing status of an uploaded track
     * @summary Get Upload Status
     * @param {string} id Track ID
     * @param {*} [options] Override http request option.
     * @throws {RequiredError}
     */
    tracksIdStatusGet(id: string, options?: RawAxiosRequestConfig): AxiosPromise<TracksIdStatusGet200Response>;

    /**
     * Start a new chunked upload session
     * @summary Initiate Chunked Upload
     * @param {InternalCoreTrackInitiateChunkedUploadRequest} request Upload Metadata
     * @param {*} [options] Override http request option.
     * @throws {RequiredError}
     */
    tracksInitiatePost(request: InternalCoreTrackInitiateChunkedUploadRequest, options?: RawAxiosRequestConfig): AxiosPromise<TracksInitiatePost200Response>;

    /**
     * Upload a new track (audio file)
     * @summary Upload Track
     * @param {File} file Audio File (MP3, WAV, FLAC, OGG)
     * @param {*} [options] Override http request option.
     * @throws {RequiredError}
     */
    tracksPost(file: File, options?: RawAxiosRequestConfig): AxiosPromise<TracksPost201Response>;

    /**
     * Get remaining upload quota for the user
     * @summary Get Upload Quota
     * @param {string} id User ID (optional, defaults to current user)
     * @param {*} [options] Override http request option.
     * @throws {RequiredError}
     */
    tracksQuotaIdGet(id: string, options?: RawAxiosRequestConfig): AxiosPromise<TracksQuotaIdGet200Response>;

    /**
     * Get state of an interrupted upload
     * @summary Resume Upload
     * @param {string} uploadId Upload ID
     * @param {*} [options] Override http request option.
     * @throws {RequiredError}
     */
    tracksResumeUploadIdGet(uploadId: string, options?: RawAxiosRequestConfig): AxiosPromise<TracksResumeUploadIdGet200Response>;

}

/**
 * TrackApi - object-oriented interface
 */
export class TrackApi extends BaseAPI implements TrackApiInterface {
    /**
     * Delete multiple tracks at once
     * @summary Batch Delete Tracks
     * @param {InternalCoreTrackBatchDeleteRequest} request List of Track IDs
     * @param {*} [options] Override http request option.
     * @throws {RequiredError}
     */
    public tracksBatchDeletePost(request: InternalCoreTrackBatchDeleteRequest, options?: RawAxiosRequestConfig) {
        return TrackApiFp(this.configuration).tracksBatchDeletePost(request, options).then((request) => request(this.axios, this.basePath));
    }

    /**
     * Upload a single chunk of a file
     * @summary Upload Chunk
     * @param {File} chunk Chunk Data
     * @param {string} uploadId Upload ID
     * @param {number} chunkNumber Chunk Number
     * @param {number} totalChunks Total Chunks
     * @param {number} totalSize Total Size
     * @param {string} filename Filename
     * @param {*} [options] Override http request option.
     * @throws {RequiredError}
     */
    public tracksChunkPost(chunk: File, uploadId: string, chunkNumber: number, totalChunks: number, totalSize: number, filename: string, options?: RawAxiosRequestConfig) {
        return TrackApiFp(this.configuration).tracksChunkPost(chunk, uploadId, chunkNumber, totalChunks, totalSize, filename, options).then((request) => request(this.axios, this.basePath));
    }

    /**
     * Finish upload session and assemble file
     * @summary Complete Chunked Upload
     * @param {InternalCoreTrackCompleteChunkedUploadRequest} request Upload ID
     * @param {*} [options] Override http request option.
     * @throws {RequiredError}
     */
    public tracksCompletePost(request: InternalCoreTrackCompleteChunkedUploadRequest, options?: RawAxiosRequestConfig) {
        return TrackApiFp(this.configuration).tracksCompletePost(request, options).then((request) => request(this.axios, this.basePath));
    }

    /**
     * Get a paginated list of tracks with filters
     * @summary List Tracks
     * @param {number} [page] Page number
     * @param {number} [limit] Items per page
     * @param {string} [userId] Filter by User ID
     * @param {string} [genre] Filter by Genre
     * @param {string} [format] Filter by Format
     * @param {string} [sortBy] Sort field
     * @param {string} [sortOrder] Sort order (asc/desc)
     * @param {*} [options] Override http request option.
     * @throws {RequiredError}
     */
    public tracksGet(page?: number, limit?: number, userId?: string, genre?: string, format?: string, sortBy?: string, sortOrder?: string, options?: RawAxiosRequestConfig) {
        return TrackApiFp(this.configuration).tracksGet(page, limit, userId, genre, format, sortBy, sortOrder, options).then((request) => request(this.axios, this.basePath));
    }

    /**
     * Permanently delete a track
     * @summary Delete Track
     * @param {string} id Track ID
     * @param {*} [options] Override http request option.
     * @throws {RequiredError}
     */
    public tracksIdDelete(id: string, options?: RawAxiosRequestConfig) {
        return TrackApiFp(this.configuration).tracksIdDelete(id, options).then((request) => request(this.axios, this.basePath));
    }

    /**
     * Get detailed information about a track
     * @summary Get Track by ID
     * @param {string} id Track ID
     * @param {*} [options] Override http request option.
     * @throws {RequiredError}
     */
    public tracksIdGet(id: string, options?: RawAxiosRequestConfig) {
        return TrackApiFp(this.configuration).tracksIdGet(id, options).then((request) => request(this.axios, this.basePath));
    }

    /**
     * Update track metadata
     * @summary Update Track
     * @param {string} id Track ID
     * @param {InternalCoreTrackUpdateTrackRequest} track Track Metadata
     * @param {*} [options] Override http request option.
     * @throws {RequiredError}
     */
    public tracksIdPut(id: string, track: InternalCoreTrackUpdateTrackRequest, options?: RawAxiosRequestConfig) {
        return TrackApiFp(this.configuration).tracksIdPut(id, track, options).then((request) => request(this.axios, this.basePath));
    }

    /**
     * Get the processing status of an uploaded track
     * @summary Get Upload Status
     * @param {string} id Track ID
     * @param {*} [options] Override http request option.
     * @throws {RequiredError}
     */
    public tracksIdStatusGet(id: string, options?: RawAxiosRequestConfig) {
        return TrackApiFp(this.configuration).tracksIdStatusGet(id, options).then((request) => request(this.axios, this.basePath));
    }

    /**
     * Start a new chunked upload session
     * @summary Initiate Chunked Upload
     * @param {InternalCoreTrackInitiateChunkedUploadRequest} request Upload Metadata
     * @param {*} [options] Override http request option.
     * @throws {RequiredError}
     */
    public tracksInitiatePost(request: InternalCoreTrackInitiateChunkedUploadRequest, options?: RawAxiosRequestConfig) {
        return TrackApiFp(this.configuration).tracksInitiatePost(request, options).then((request) => request(this.axios, this.basePath));
    }

    /**
     * Upload a new track (audio file)
     * @summary Upload Track
     * @param {File} file Audio File (MP3, WAV, FLAC, OGG)
     * @param {*} [options] Override http request option.
     * @throws {RequiredError}
     */
    public tracksPost(file: File, options?: RawAxiosRequestConfig) {
        return TrackApiFp(this.configuration).tracksPost(file, options).then((request) => request(this.axios, this.basePath));
    }

    /**
     * Get remaining upload quota for the user
     * @summary Get Upload Quota
     * @param {string} id User ID (optional, defaults to current user)
     * @param {*} [options] Override http request option.
     * @throws {RequiredError}
     */
    public tracksQuotaIdGet(id: string, options?: RawAxiosRequestConfig) {
        return TrackApiFp(this.configuration).tracksQuotaIdGet(id, options).then((request) => request(this.axios, this.basePath));
    }

    /**
     * Get state of an interrupted upload
     * @summary Resume Upload
     * @param {string} uploadId Upload ID
     * @param {*} [options] Override http request option.
     * @throws {RequiredError}
     */
    public tracksResumeUploadIdGet(uploadId: string, options?: RawAxiosRequestConfig) {
        return TrackApiFp(this.configuration).tracksResumeUploadIdGet(uploadId, options).then((request) => request(this.axios, this.basePath));
    }
}



/**
 * UserApi - axios parameter creator
 */
export const UserApiAxiosParamCreator = function (configuration?: Configuration) {
    return {
        /**
         * Get public profile information for a user by username
         * @summary Get Profile by Username
         * @param {string} username Username
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        usersByUsernameUsernameGet: async (username: string, options: RawAxiosRequestConfig = {}): Promise<RequestArgs> => {
            // verify required parameter 'username' is not null or undefined
            assertParamExists('usersByUsernameUsernameGet', 'username', username)
            const localVarPath = `/users/by-username/{username}`
                .replace(`{${"username"}}`, encodeURIComponent(String(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;

            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 paginated list of users with optional filtering
         * @summary List Users
         * @param {number} [page] Page number
         * @param {number} [limit] Items per page
         * @param {string} [role] Filter by role
         * @param {boolean} [isActive] Filter by active status
         * @param {boolean} [isVerified] Filter by verified status
         * @param {string} [search] Search by username, email, first_name, last_name
         * @param {string} [sortBy] Sort field (created_at, username, email, last_login_at)
         * @param {string} [sortOrder] Sort order (asc, desc)
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        usersGet: async (page?: number, limit?: number, role?: string, isActive?: boolean, isVerified?: boolean, search?: string, sortBy?: string, sortOrder?: string, options: RawAxiosRequestConfig = {}): Promise<RequestArgs> => {
            const localVarPath = `/users`;
            // 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;
            }

            if (role !== undefined) {
                localVarQueryParameter['role'] = role;
            }

            if (isActive !== undefined) {
                localVarQueryParameter['is_active'] = isActive;
            }

            if (isVerified !== undefined) {
                localVarQueryParameter['is_verified'] = isVerified;
            }

            if (search !== undefined) {
                localVarQueryParameter['search'] = search;
            }

            if (sortBy !== undefined) {
                localVarQueryParameter['sort_by'] = sortBy;
            }

            if (sortOrder !== undefined) {
                localVarQueryParameter['sort_order'] = sortOrder;
            }

            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 profile completion percentage and missing fields
         * @summary Get Profile Completion
         * @param {string} id User ID
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        usersIdCompletionGet: async (id: string, options: RawAxiosRequestConfig = {}): Promise<RequestArgs> => {
            // verify required parameter 'id' is not null or undefined
            assertParamExists('usersIdCompletionGet', 'id', id)
            const localVarPath = `/users/{id}/completion`
                .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,
            };
        },
        /**
         * Soft delete a user (only user owner or admin can delete)
         * @summary Delete user
         * @param {string} id User ID
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        usersIdDelete: async (id: string, options: RawAxiosRequestConfig = {}): Promise<RequestArgs> => {
            // verify required parameter 'id' is not null or undefined
            assertParamExists('usersIdDelete', 'id', id)
            const localVarPath = `/users/{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 public profile information for a user
         * @summary Get Profile by ID
         * @param {string} id User ID
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        usersIdGet: async (id: string, options: RawAxiosRequestConfig = {}): Promise<RequestArgs> => {
            // verify required parameter 'id' is not null or undefined
            assertParamExists('usersIdGet', 'id', id)
            const localVarPath = `/users/{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;

            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 user profile details
         * @summary Update Profile
         * @param {string} id User ID
         * @param {InternalHandlersUpdateProfileRequest} profile Profile Data
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        usersIdPut: async (id: string, profile: InternalHandlersUpdateProfileRequest, options: RawAxiosRequestConfig = {}): Promise<RequestArgs> => {
            // verify required parameter 'id' is not null or undefined
            assertParamExists('usersIdPut', 'id', id)
            // verify required parameter 'profile' is not null or undefined
            assertParamExists('usersIdPut', 'profile', profile)
            const localVarPath = `/users/{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(profile, localVarRequestOptions, configuration)

            return {
                url: toPathString(localVarUrlObj),
                options: localVarRequestOptions,
            };
        },
    }
};

/**
 * UserApi - functional programming interface
 */
export const UserApiFp = function(configuration?: Configuration) {
    const localVarAxiosParamCreator = UserApiAxiosParamCreator(configuration)
    return {
        /**
         * Get public profile information for a user by username
         * @summary Get Profile by Username
         * @param {string} username Username
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        async usersByUsernameUsernameGet(username: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<UsersIdGet200Response>> {
            const localVarAxiosArgs = await localVarAxiosParamCreator.usersByUsernameUsernameGet(username, options);
            const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
            const localVarOperationServerBasePath = operationServerMap['UserApi.usersByUsernameUsernameGet']?.[localVarOperationServerIndex]?.url;
            return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
        },
        /**
         * Get a paginated list of users with optional filtering
         * @summary List Users
         * @param {number} [page] Page number
         * @param {number} [limit] Items per page
         * @param {string} [role] Filter by role
         * @param {boolean} [isActive] Filter by active status
         * @param {boolean} [isVerified] Filter by verified status
         * @param {string} [search] Search by username, email, first_name, last_name
         * @param {string} [sortBy] Sort field (created_at, username, email, last_login_at)
         * @param {string} [sortOrder] Sort order (asc, desc)
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        async usersGet(page?: number, limit?: number, role?: string, isActive?: boolean, isVerified?: boolean, search?: string, sortBy?: string, sortOrder?: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<UsersGet200Response>> {
            const localVarAxiosArgs = await localVarAxiosParamCreator.usersGet(page, limit, role, isActive, isVerified, search, sortBy, sortOrder, options);
            const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
            const localVarOperationServerBasePath = operationServerMap['UserApi.usersGet']?.[localVarOperationServerIndex]?.url;
            return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
        },
        /**
         * Get profile completion percentage and missing fields
         * @summary Get Profile Completion
         * @param {string} id User ID
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        async usersIdCompletionGet(id: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<AuthMeGet200Response>> {
            const localVarAxiosArgs = await localVarAxiosParamCreator.usersIdCompletionGet(id, options);
            const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
            const localVarOperationServerBasePath = operationServerMap['UserApi.usersIdCompletionGet']?.[localVarOperationServerIndex]?.url;
            return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
        },
        /**
         * Soft delete a user (only user owner or admin can delete)
         * @summary Delete user
         * @param {string} id User ID
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        async usersIdDelete(id: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<InternalHandlersAPIResponse>> {
            const localVarAxiosArgs = await localVarAxiosParamCreator.usersIdDelete(id, options);
            const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
            const localVarOperationServerBasePath = operationServerMap['UserApi.usersIdDelete']?.[localVarOperationServerIndex]?.url;
            return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
        },
        /**
         * Get public profile information for a user
         * @summary Get Profile by ID
         * @param {string} id User ID
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        async usersIdGet(id: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<UsersIdGet200Response>> {
            const localVarAxiosArgs = await localVarAxiosParamCreator.usersIdGet(id, options);
            const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
            const localVarOperationServerBasePath = operationServerMap['UserApi.usersIdGet']?.[localVarOperationServerIndex]?.url;
            return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
        },
        /**
         * Update user profile details
         * @summary Update Profile
         * @param {string} id User ID
         * @param {InternalHandlersUpdateProfileRequest} profile Profile Data
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        async usersIdPut(id: string, profile: InternalHandlersUpdateProfileRequest, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<UsersIdGet200Response>> {
            const localVarAxiosArgs = await localVarAxiosParamCreator.usersIdPut(id, profile, options);
            const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
            const localVarOperationServerBasePath = operationServerMap['UserApi.usersIdPut']?.[localVarOperationServerIndex]?.url;
            return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
        },
    }
};

/**
 * UserApi - factory interface
 */
export const UserApiFactory = function (configuration?: Configuration, basePath?: string, axios?: AxiosInstance) {
    const localVarFp = UserApiFp(configuration)
    return {
        /**
         * Get public profile information for a user by username
         * @summary Get Profile by Username
         * @param {string} username Username
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        usersByUsernameUsernameGet(username: string, options?: RawAxiosRequestConfig): AxiosPromise<UsersIdGet200Response> {
            return localVarFp.usersByUsernameUsernameGet(username, options).then((request) => request(axios, basePath));
        },
        /**
         * Get a paginated list of users with optional filtering
         * @summary List Users
         * @param {number} [page] Page number
         * @param {number} [limit] Items per page
         * @param {string} [role] Filter by role
         * @param {boolean} [isActive] Filter by active status
         * @param {boolean} [isVerified] Filter by verified status
         * @param {string} [search] Search by username, email, first_name, last_name
         * @param {string} [sortBy] Sort field (created_at, username, email, last_login_at)
         * @param {string} [sortOrder] Sort order (asc, desc)
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        usersGet(page?: number, limit?: number, role?: string, isActive?: boolean, isVerified?: boolean, search?: string, sortBy?: string, sortOrder?: string, options?: RawAxiosRequestConfig): AxiosPromise<UsersGet200Response> {
            return localVarFp.usersGet(page, limit, role, isActive, isVerified, search, sortBy, sortOrder, options).then((request) => request(axios, basePath));
        },
        /**
         * Get profile completion percentage and missing fields
         * @summary Get Profile Completion
         * @param {string} id User ID
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        usersIdCompletionGet(id: string, options?: RawAxiosRequestConfig): AxiosPromise<AuthMeGet200Response> {
            return localVarFp.usersIdCompletionGet(id, options).then((request) => request(axios, basePath));
        },
        /**
         * Soft delete a user (only user owner or admin can delete)
         * @summary Delete user
         * @param {string} id User ID
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        usersIdDelete(id: string, options?: RawAxiosRequestConfig): AxiosPromise<InternalHandlersAPIResponse> {
            return localVarFp.usersIdDelete(id, options).then((request) => request(axios, basePath));
        },
        /**
         * Get public profile information for a user
         * @summary Get Profile by ID
         * @param {string} id User ID
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        usersIdGet(id: string, options?: RawAxiosRequestConfig): AxiosPromise<UsersIdGet200Response> {
            return localVarFp.usersIdGet(id, options).then((request) => request(axios, basePath));
        },
        /**
         * Update user profile details
         * @summary Update Profile
         * @param {string} id User ID
         * @param {InternalHandlersUpdateProfileRequest} profile Profile Data
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        usersIdPut(id: string, profile: InternalHandlersUpdateProfileRequest, options?: RawAxiosRequestConfig): AxiosPromise<UsersIdGet200Response> {
            return localVarFp.usersIdPut(id, profile, options).then((request) => request(axios, basePath));
        },
    };
};

/**
 * UserApi - interface
 */
export interface UserApiInterface {
    /**
     * Get public profile information for a user by username
     * @summary Get Profile by Username
     * @param {string} username Username
     * @param {*} [options] Override http request option.
     * @throws {RequiredError}
     */
    usersByUsernameUsernameGet(username: string, options?: RawAxiosRequestConfig): AxiosPromise<UsersIdGet200Response>;

    /**
     * Get a paginated list of users with optional filtering
     * @summary List Users
     * @param {number} [page] Page number
     * @param {number} [limit] Items per page
     * @param {string} [role] Filter by role
     * @param {boolean} [isActive] Filter by active status
     * @param {boolean} [isVerified] Filter by verified status
     * @param {string} [search] Search by username, email, first_name, last_name
     * @param {string} [sortBy] Sort field (created_at, username, email, last_login_at)
     * @param {string} [sortOrder] Sort order (asc, desc)
     * @param {*} [options] Override http request option.
     * @throws {RequiredError}
     */
    usersGet(page?: number, limit?: number, role?: string, isActive?: boolean, isVerified?: boolean, search?: string, sortBy?: string, sortOrder?: string, options?: RawAxiosRequestConfig): AxiosPromise<UsersGet200Response>;

    /**
     * Get profile completion percentage and missing fields
     * @summary Get Profile Completion
     * @param {string} id User ID
     * @param {*} [options] Override http request option.
     * @throws {RequiredError}
     */
    usersIdCompletionGet(id: string, options?: RawAxiosRequestConfig): AxiosPromise<AuthMeGet200Response>;

    /**
     * Soft delete a user (only user owner or admin can delete)
     * @summary Delete user
     * @param {string} id User ID
     * @param {*} [options] Override http request option.
     * @throws {RequiredError}
     */
    usersIdDelete(id: string, options?: RawAxiosRequestConfig): AxiosPromise<InternalHandlersAPIResponse>;

    /**
     * Get public profile information for a user
     * @summary Get Profile by ID
     * @param {string} id User ID
     * @param {*} [options] Override http request option.
     * @throws {RequiredError}
     */
    usersIdGet(id: string, options?: RawAxiosRequestConfig): AxiosPromise<UsersIdGet200Response>;

    /**
     * Update user profile details
     * @summary Update Profile
     * @param {string} id User ID
     * @param {InternalHandlersUpdateProfileRequest} profile Profile Data
     * @param {*} [options] Override http request option.
     * @throws {RequiredError}
     */
    usersIdPut(id: string, profile: InternalHandlersUpdateProfileRequest, options?: RawAxiosRequestConfig): AxiosPromise<UsersIdGet200Response>;

}

/**
 * UserApi - object-oriented interface
 */
export class UserApi extends BaseAPI implements UserApiInterface {
    /**
     * Get public profile information for a user by username
     * @summary Get Profile by Username
     * @param {string} username Username
     * @param {*} [options] Override http request option.
     * @throws {RequiredError}
     */
    public usersByUsernameUsernameGet(username: string, options?: RawAxiosRequestConfig) {
        return UserApiFp(this.configuration).usersByUsernameUsernameGet(username, options).then((request) => request(this.axios, this.basePath));
    }

    /**
     * Get a paginated list of users with optional filtering
     * @summary List Users
     * @param {number} [page] Page number
     * @param {number} [limit] Items per page
     * @param {string} [role] Filter by role
     * @param {boolean} [isActive] Filter by active status
     * @param {boolean} [isVerified] Filter by verified status
     * @param {string} [search] Search by username, email, first_name, last_name
     * @param {string} [sortBy] Sort field (created_at, username, email, last_login_at)
     * @param {string} [sortOrder] Sort order (asc, desc)
     * @param {*} [options] Override http request option.
     * @throws {RequiredError}
     */
    public usersGet(page?: number, limit?: number, role?: string, isActive?: boolean, isVerified?: boolean, search?: string, sortBy?: string, sortOrder?: string, options?: RawAxiosRequestConfig) {
        return UserApiFp(this.configuration).usersGet(page, limit, role, isActive, isVerified, search, sortBy, sortOrder, options).then((request) => request(this.axios, this.basePath));
    }

    /**
     * Get profile completion percentage and missing fields
     * @summary Get Profile Completion
     * @param {string} id User ID
     * @param {*} [options] Override http request option.
     * @throws {RequiredError}
     */
    public usersIdCompletionGet(id: string, options?: RawAxiosRequestConfig) {
        return UserApiFp(this.configuration).usersIdCompletionGet(id, options).then((request) => request(this.axios, this.basePath));
    }

    /**
     * Soft delete a user (only user owner or admin can delete)
     * @summary Delete user
     * @param {string} id User ID
     * @param {*} [options] Override http request option.
     * @throws {RequiredError}
     */
    public usersIdDelete(id: string, options?: RawAxiosRequestConfig) {
        return UserApiFp(this.configuration).usersIdDelete(id, options).then((request) => request(this.axios, this.basePath));
    }

    /**
     * Get public profile information for a user
     * @summary Get Profile by ID
     * @param {string} id User ID
     * @param {*} [options] Override http request option.
     * @throws {RequiredError}
     */
    public usersIdGet(id: string, options?: RawAxiosRequestConfig) {
        return UserApiFp(this.configuration).usersIdGet(id, options).then((request) => request(this.axios, this.basePath));
    }

    /**
     * Update user profile details
     * @summary Update Profile
     * @param {string} id User ID
     * @param {InternalHandlersUpdateProfileRequest} profile Profile Data
     * @param {*} [options] Override http request option.
     * @throws {RequiredError}
     */
    public usersIdPut(id: string, profile: InternalHandlersUpdateProfileRequest, options?: RawAxiosRequestConfig) {
        return UserApiFp(this.configuration).usersIdPut(id, profile, options).then((request) => request(this.axios, this.basePath));
    }
}



/**
 * WebhookApi - axios parameter creator
 */
export const WebhookApiAxiosParamCreator = function (configuration?: Configuration) {
    return {
        /**
         * Get a list of all webhooks registered by the current user
         * @summary List webhooks
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        webhooksGet: async (options: RawAxiosRequestConfig = {}): Promise<RequestArgs> => {
            const localVarPath = `/webhooks`;
            // 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,
            };
        },
        /**
         * Delete a webhook by ID
         * @summary Delete webhook
         * @param {string} id Webhook ID
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        webhooksIdDelete: async (id: string, options: RawAxiosRequestConfig = {}): Promise<RequestArgs> => {
            // verify required parameter 'id' is not null or undefined
            assertParamExists('webhooksIdDelete', 'id', id)
            const localVarPath = `/webhooks/{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,
            };
        },
        /**
         * Generate a new API key for a webhook (invalidates the old one)
         * @summary Regenerate webhook API key
         * @param {string} id Webhook ID
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        webhooksIdRegenerateKeyPost: async (id: string, options: RawAxiosRequestConfig = {}): Promise<RequestArgs> => {
            // verify required parameter 'id' is not null or undefined
            assertParamExists('webhooksIdRegenerateKeyPost', 'id', id)
            const localVarPath = `/webhooks/{id}/regenerate-key`
                .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['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,
            };
        },
        /**
         * Send a test event to a webhook to verify it\'s working
         * @summary Test webhook
         * @param {string} id Webhook ID
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        webhooksIdTestPost: async (id: string, options: RawAxiosRequestConfig = {}): Promise<RequestArgs> => {
            // verify required parameter 'id' is not null or undefined
            assertParamExists('webhooksIdTestPost', 'id', id)
            const localVarPath = `/webhooks/{id}/test`
                .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['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,
            };
        },
        /**
         * Register a new webhook for receiving events
         * @summary Register webhook
         * @param {object} webhook Webhook registration data
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        webhooksPost: async (webhook: object, options: RawAxiosRequestConfig = {}): Promise<RequestArgs> => {
            // verify required parameter 'webhook' is not null or undefined
            assertParamExists('webhooksPost', 'webhook', webhook)
            const localVarPath = `/webhooks`;
            // 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(webhook, localVarRequestOptions, configuration)

            return {
                url: toPathString(localVarUrlObj),
                options: localVarRequestOptions,
            };
        },
        /**
         * Get statistics for webhook delivery and performance
         * @summary Get webhook statistics
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        webhooksStatsGet: async (options: RawAxiosRequestConfig = {}): Promise<RequestArgs> => {
            const localVarPath = `/webhooks/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)

            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,
            };
        },
    }
};

/**
 * WebhookApi - functional programming interface
 */
export const WebhookApiFp = function(configuration?: Configuration) {
    const localVarAxiosParamCreator = WebhookApiAxiosParamCreator(configuration)
    return {
        /**
         * Get a list of all webhooks registered by the current user
         * @summary List webhooks
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        async webhooksGet(options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<WebhooksGet200Response>> {
            const localVarAxiosArgs = await localVarAxiosParamCreator.webhooksGet(options);
            const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
            const localVarOperationServerBasePath = operationServerMap['WebhookApi.webhooksGet']?.[localVarOperationServerIndex]?.url;
            return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
        },
        /**
         * Delete a webhook by ID
         * @summary Delete webhook
         * @param {string} id Webhook ID
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        async webhooksIdDelete(id: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<AnalyticsEventsPost200Response>> {
            const localVarAxiosArgs = await localVarAxiosParamCreator.webhooksIdDelete(id, options);
            const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
            const localVarOperationServerBasePath = operationServerMap['WebhookApi.webhooksIdDelete']?.[localVarOperationServerIndex]?.url;
            return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
        },
        /**
         * Generate a new API key for a webhook (invalidates the old one)
         * @summary Regenerate webhook API key
         * @param {string} id Webhook ID
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        async webhooksIdRegenerateKeyPost(id: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<WebhooksIdRegenerateKeyPost200Response>> {
            const localVarAxiosArgs = await localVarAxiosParamCreator.webhooksIdRegenerateKeyPost(id, options);
            const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
            const localVarOperationServerBasePath = operationServerMap['WebhookApi.webhooksIdRegenerateKeyPost']?.[localVarOperationServerIndex]?.url;
            return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
        },
        /**
         * Send a test event to a webhook to verify it\'s working
         * @summary Test webhook
         * @param {string} id Webhook ID
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        async webhooksIdTestPost(id: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<AnalyticsEventsPost200Response>> {
            const localVarAxiosArgs = await localVarAxiosParamCreator.webhooksIdTestPost(id, options);
            const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
            const localVarOperationServerBasePath = operationServerMap['WebhookApi.webhooksIdTestPost']?.[localVarOperationServerIndex]?.url;
            return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
        },
        /**
         * Register a new webhook for receiving events
         * @summary Register webhook
         * @param {object} webhook Webhook registration data
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        async webhooksPost(webhook: object, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<WebhooksPost201Response>> {
            const localVarAxiosArgs = await localVarAxiosParamCreator.webhooksPost(webhook, options);
            const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
            const localVarOperationServerBasePath = operationServerMap['WebhookApi.webhooksPost']?.[localVarOperationServerIndex]?.url;
            return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
        },
        /**
         * Get statistics for webhook delivery and performance
         * @summary Get webhook statistics
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        async webhooksStatsGet(options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<AuditStatsGet200Response>> {
            const localVarAxiosArgs = await localVarAxiosParamCreator.webhooksStatsGet(options);
            const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
            const localVarOperationServerBasePath = operationServerMap['WebhookApi.webhooksStatsGet']?.[localVarOperationServerIndex]?.url;
            return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
        },
    }
};

/**
 * WebhookApi - factory interface
 */
export const WebhookApiFactory = function (configuration?: Configuration, basePath?: string, axios?: AxiosInstance) {
    const localVarFp = WebhookApiFp(configuration)
    return {
        /**
         * Get a list of all webhooks registered by the current user
         * @summary List webhooks
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        webhooksGet(options?: RawAxiosRequestConfig): AxiosPromise<WebhooksGet200Response> {
            return localVarFp.webhooksGet(options).then((request) => request(axios, basePath));
        },
        /**
         * Delete a webhook by ID
         * @summary Delete webhook
         * @param {string} id Webhook ID
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        webhooksIdDelete(id: string, options?: RawAxiosRequestConfig): AxiosPromise<AnalyticsEventsPost200Response> {
            return localVarFp.webhooksIdDelete(id, options).then((request) => request(axios, basePath));
        },
        /**
         * Generate a new API key for a webhook (invalidates the old one)
         * @summary Regenerate webhook API key
         * @param {string} id Webhook ID
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        webhooksIdRegenerateKeyPost(id: string, options?: RawAxiosRequestConfig): AxiosPromise<WebhooksIdRegenerateKeyPost200Response> {
            return localVarFp.webhooksIdRegenerateKeyPost(id, options).then((request) => request(axios, basePath));
        },
        /**
         * Send a test event to a webhook to verify it\'s working
         * @summary Test webhook
         * @param {string} id Webhook ID
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        webhooksIdTestPost(id: string, options?: RawAxiosRequestConfig): AxiosPromise<AnalyticsEventsPost200Response> {
            return localVarFp.webhooksIdTestPost(id, options).then((request) => request(axios, basePath));
        },
        /**
         * Register a new webhook for receiving events
         * @summary Register webhook
         * @param {object} webhook Webhook registration data
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        webhooksPost(webhook: object, options?: RawAxiosRequestConfig): AxiosPromise<WebhooksPost201Response> {
            return localVarFp.webhooksPost(webhook, options).then((request) => request(axios, basePath));
        },
        /**
         * Get statistics for webhook delivery and performance
         * @summary Get webhook statistics
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        webhooksStatsGet(options?: RawAxiosRequestConfig): AxiosPromise<AuditStatsGet200Response> {
            return localVarFp.webhooksStatsGet(options).then((request) => request(axios, basePath));
        },
    };
};

/**
 * WebhookApi - interface
 */
export interface WebhookApiInterface {
    /**
     * Get a list of all webhooks registered by the current user
     * @summary List webhooks
     * @param {*} [options] Override http request option.
     * @throws {RequiredError}
     */
    webhooksGet(options?: RawAxiosRequestConfig): AxiosPromise<WebhooksGet200Response>;

    /**
     * Delete a webhook by ID
     * @summary Delete webhook
     * @param {string} id Webhook ID
     * @param {*} [options] Override http request option.
     * @throws {RequiredError}
     */
    webhooksIdDelete(id: string, options?: RawAxiosRequestConfig): AxiosPromise<AnalyticsEventsPost200Response>;

    /**
     * Generate a new API key for a webhook (invalidates the old one)
     * @summary Regenerate webhook API key
     * @param {string} id Webhook ID
     * @param {*} [options] Override http request option.
     * @throws {RequiredError}
     */
    webhooksIdRegenerateKeyPost(id: string, options?: RawAxiosRequestConfig): AxiosPromise<WebhooksIdRegenerateKeyPost200Response>;

    /**
     * Send a test event to a webhook to verify it\'s working
     * @summary Test webhook
     * @param {string} id Webhook ID
     * @param {*} [options] Override http request option.
     * @throws {RequiredError}
     */
    webhooksIdTestPost(id: string, options?: RawAxiosRequestConfig): AxiosPromise<AnalyticsEventsPost200Response>;

    /**
     * Register a new webhook for receiving events
     * @summary Register webhook
     * @param {object} webhook Webhook registration data
     * @param {*} [options] Override http request option.
     * @throws {RequiredError}
     */
    webhooksPost(webhook: object, options?: RawAxiosRequestConfig): AxiosPromise<WebhooksPost201Response>;

    /**
     * Get statistics for webhook delivery and performance
     * @summary Get webhook statistics
     * @param {*} [options] Override http request option.
     * @throws {RequiredError}
     */
    webhooksStatsGet(options?: RawAxiosRequestConfig): AxiosPromise<AuditStatsGet200Response>;

}

/**
 * WebhookApi - object-oriented interface
 */
export class WebhookApi extends BaseAPI implements WebhookApiInterface {
    /**
     * Get a list of all webhooks registered by the current user
     * @summary List webhooks
     * @param {*} [options] Override http request option.
     * @throws {RequiredError}
     */
    public webhooksGet(options?: RawAxiosRequestConfig) {
        return WebhookApiFp(this.configuration).webhooksGet(options).then((request) => request(this.axios, this.basePath));
    }

    /**
     * Delete a webhook by ID
     * @summary Delete webhook
     * @param {string} id Webhook ID
     * @param {*} [options] Override http request option.
     * @throws {RequiredError}
     */
    public webhooksIdDelete(id: string, options?: RawAxiosRequestConfig) {
        return WebhookApiFp(this.configuration).webhooksIdDelete(id, options).then((request) => request(this.axios, this.basePath));
    }

    /**
     * Generate a new API key for a webhook (invalidates the old one)
     * @summary Regenerate webhook API key
     * @param {string} id Webhook ID
     * @param {*} [options] Override http request option.
     * @throws {RequiredError}
     */
    public webhooksIdRegenerateKeyPost(id: string, options?: RawAxiosRequestConfig) {
        return WebhookApiFp(this.configuration).webhooksIdRegenerateKeyPost(id, options).then((request) => request(this.axios, this.basePath));
    }

    /**
     * Send a test event to a webhook to verify it\'s working
     * @summary Test webhook
     * @param {string} id Webhook ID
     * @param {*} [options] Override http request option.
     * @throws {RequiredError}
     */
    public webhooksIdTestPost(id: string, options?: RawAxiosRequestConfig) {
        return WebhookApiFp(this.configuration).webhooksIdTestPost(id, options).then((request) => request(this.axios, this.basePath));
    }

    /**
     * Register a new webhook for receiving events
     * @summary Register webhook
     * @param {object} webhook Webhook registration data
     * @param {*} [options] Override http request option.
     * @throws {RequiredError}
     */
    public webhooksPost(webhook: object, options?: RawAxiosRequestConfig) {
        return WebhookApiFp(this.configuration).webhooksPost(webhook, options).then((request) => request(this.axios, this.basePath));
    }

    /**
     * Get statistics for webhook delivery and performance
     * @summary Get webhook statistics
     * @param {*} [options] Override http request option.
     * @throws {RequiredError}
     */
    public webhooksStatsGet(options?: RawAxiosRequestConfig) {
        return WebhookApiFp(this.configuration).webhooksStatsGet(options).then((request) => request(this.axios, this.basePath));
    }
}



