import PagedDataProvider from 'bitbucket/internal/impl/data-provider/paged';

import models from '../models/models';

/**
 * Provides data about participants in a particular repository. Implementers should respect the `filter` property,
 * and should transform their data into a {@link UserModel}.
 */
export default class ParticipantsDataProvider extends PagedDataProvider {
    constructor(options, ...args) {
        options.jsonDescriptor = [models.user];
        options.filterDescriptor = {
            term: 'string?',
            role: 'string?',
        };
        super(options, ...args);
    }
}
