code: function makeCharacters(agent) {
      let characters = function (id, ssoToken) {
          if (ssoToken === undefined) {
              return new CharacterInfoImpl(agent, id);
          }
          else {
              return new CharacterImpl({ agent, id, ssoToken });
          }
      };
      characters.search = search_1.makeDefaultSearch(agent, "character" /* CHARACTER */);
      characters.affiliations = function (ids) {
          return agent.request('post_characters_affiliation', { body: ids });
      };
      characters.names = function (ids) {
          if (ids.length > 100) {
              // Use universe/names end point since the /characters one breaks if
              // the URL gets too long.
              return names_1.getNames(agent, "character" /* CHARACTER */, ids);
          }
          else {
              // Use character/names end point
              return agent.request('get_characters_names', { query: { character_ids: ids } })
                  .then(result => {
                  let map = new Map();
                  for (let c of result) {
                      map.set(c.character_id, c.character_name);
                  }
                  return map;
              });
          }
      };
      return characters;
  }
docs: Create a new {@link Characters} instance that uses the given `agent` to
  make its HTTP requests to the ESI interface.
  
  @param agent The agent making actual requests
  @returns A Characters API instance