message: feat: Add active parameter to list profiles
diff: import nock from 'nock';
  import {ProfileAPI} from './ProfileAPI';
  +import url from 'url';
  describe('ProfileAPI', () => {
  afterEach(() => nock.cleanAll());
  @@ -30,6 +31,42 @@ describe('ProfileAPI', () => {
  expect(profiles.length).toBe(1);
  expect(profiles[0].id).toBe(profileId);
  });
  +
  + it('can list only active profiles', async () => {
  + nock(global.REST_URL)
  + .get(ProfileAPI.URL.PROFILES)
  + .query(true)
  + .reply(requestUrl => {
  + const {query} = url.parse(requestUrl, true);
  + return [
  + 200,
  + JSON.stringify(
  + [
  + {
  + active: true,
  + created_at: '2019-11-18T15:08:40.236309Z',
  + id: '86602c68-306a-4500-ac73-4ce56a91d83c',
  + is_default: true,
  + name: 'default',
  + user_id: '5844eceecf7e803e259d0365',
  + },
  + {
  + active: false,
  + created_at: '2021-02-01T00:00:01.236309Z',
  + id: '54481c48-288a-4511-ad59-5dx77a51d84d',
  + is_default: false,
  + name: 'default',
  + user_id: '6755eceecf7e803e259d0365',
  + },
  + ].filter(profile => String(profile.active) === query.active)
  + ),
  + ];
  + });
  +
  + const profiles = await global.client.rest.profile.listProfiles(true);
  +
  + expect(profiles.length).toBe(1);
  + });
  });
  describe('getProfile', () => {
  