// Generated by Create API
// https://github.com/CreateAPI/CreateAPI

import Foundation
import Get
import URLQueryEncoder

extension Paths.Search {
    public var omnisearch: Omnisearch {
        Omnisearch(path: path + "/omnisearch")
    }

    public struct Omnisearch {
        /// Path: `/api/search/omnisearch`
        public let path: String

        /// Omnisearch
        ///
        /// Execute an omnisearch query that returns results across all content types.
        /// 
        /// This endpoint searches for clips (songs), users, playlists, and genres simultaneously
        /// and returns them in organized sections. The top result is determined from the search
        /// results, currently using the highest-ranked song.
        /// 
        /// Args:
        ///     request: The HTTP request with user authentication
        ///     search_request: The omnisearch request containing the search term
        /// 
        /// Returns:
        ///     OmnisearchResult: Contains a top result and sections for each content type
        public func post(_ body: GenAPI.OmnisearchRequest) -> Request<GenAPI.OmnisearchResult> {
            Request(path: path, method: "POST", body: body, id: "studio_api_search_api_omnisearch")
        }
    }
}
