Arguments:

request.slot required (string): Name of collection slot.
request.offset optional (number): Offset of products items. Used in pagination.
request.limit optional (number): Number of products in result.
request.filters optional (filter[]): Array of selected filters.
request.sort optional (sort[]): Array of selected sortings.
request.user optional (user): User object. Could be provided either at initialization or at request.

Types

filter.name required (string): Name of filter.
filter.type required (string): Type of filter.
filter.values optional (object[]): Array of selected filter values.
filter.values[].value optional (string): Selected filter value.
filter.values[].from optional (string): Selected range filter "from" value.
filter.values[].to optional (string): Selected range filter "to" value.

sort.field required (string): Field for sorting.
sort.order required ('desc' || 'asc'): Sorting order.

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:

Smart collection with products list, selected facets list and meta data.

Examples of usage:

var request = {
    slot: 't-shirts',
    offset: 20,
    limit: 15,
    filters: [{
        name: 'category1',
        type: 'category',
        values: [{
            value: 'T-Shirts'
        }]
    }],
    sort: [{
        field: 'price',
        order: 'asc'
    }]
};

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