SuggestOptions

public struct SuggestOptions : Equatable, Hashable, Codable
extension SuggestOptions: Sendable

Options for a suggest request, mapped to merino suggest endpoint query parameters. All fields are optional — omitted fields are not sent to merino.

  • List of suggestion providers to query (e.g. ["wikipedia", "adm"]).

    Declaration

    Swift

    public var providers: [String]?
  • Identifier of which part of firefox the request comes from (e.g. "urlbar", "newtab").

    Declaration

    Swift

    public var source: String?
  • ISO 3166-1 country code (e.g. "US").

    Declaration

    Swift

    public var country: String?
  • Comma separated string of subdivision code(s) (e.g. "CA").

    Declaration

    Swift

    public var region: String?
  • City name (e.g. "San Francisco").

    Declaration

    Swift

    public var city: String?
  • List of any experiments or rollouts that are affecting the client’s Suggest experience. If Merino recognizes any of them it will modify its behavior accordingly.

    Declaration

    Swift

    public var clientVariants: [String]?
  • For AccuWeather provider, the request type should be either a “location” or “weather” string. For “location” it will get location completion suggestion. For “weather” it will return weather suggestions. If omitted, it defaults to weather suggestions.

    Declaration

    Swift

    public var requestType: String?
  • The Accept-Language header value to forward to Merino (e.g. "en-US").

    Declaration

    Swift

    public var acceptLanguage: String?
  • Declaration

    Swift

    public init(
        /**
         * List of suggestion providers to query (e.g. `["wikipedia", "adm"]`).
         */providers: [String]?, 
        /**
         * Identifier of which part of firefox the request comes from (e.g. `"urlbar"`, `"newtab"`).
         */source: String?, 
        /**
         * ISO 3166-1 country code (e.g. `"US"`).
         */country: String?, 
        /**
         * Comma separated string of subdivision code(s) (e.g. `"CA"`).
         */region: String?, 
        /**
         * City name (e.g. `"San Francisco"`).
         */city: String?, 
        /**
         * List of any experiments or rollouts that are affecting the client's Suggest experience.
         * If Merino recognizes any of them it will modify its behavior accordingly.
         */clientVariants: [String]?, 
        /**
         * For AccuWeather provider, the request type should be either a "location" or "weather" string. For "location" it will get location completion suggestion. For "weather" it will return weather suggestions.
         * If omitted, it defaults to weather suggestions.
         */requestType: String?, 
        /**
         * The `Accept-Language` header value to forward to Merino (e.g. `"en-US"`).
         */acceptLanguage: String?)