Arguments:

request.q required (string): Autocomplete query.
request.suggestion_limit optional (number): Limit of search suggestions.
request.item_limit optional (number): Limit of product matches.
request.user optional (object): User object. Could be provided either at initialization or at request.

Types:

user.uid required (string): Unique customer id.
user.sid required (string): Session id.
user.email optional (string): Customer email.
user.ip optional (number): Customer ip.
user.ua optional (string): Customer user agent.
user.lang optional (string[]): Languages.

Returns:

List of search suggestions queries, product matches and query meta data.

Examples of usage:

var request = {
    q: 'White t-shirt',
    suggestion_limit: 5,
    item_limit: 10,
};

client.autocomplete(request).then(function(response) {
    // handle autocomplete response
});