code: function makeAlliances(agent) {
      let functor = function (id) {
          if (id !== undefined) {
              return new AllianceImpl(agent, id);
          }
          else {
              return agent.request('get_alliances', undefined);
          }
      };
      functor.search = search_1.makeDefaultSearch(agent, "alliance" /* ALLIANCE */);
      functor.names = function (ids) {
          if (ids === undefined) {
              return functor().then(allIds => functor.names(allIds));
          }
          else if (ids.length > 100) {
              return names_1.getNames(agent, "alliance" /* ALLIANCE */, ids);
          }
          else {
              return agent.request('get_alliances_names', { query: { 'alliance_ids': ids } })
                  .then(result => {
                  let map = new Map();
                  for (let r of result) {
                      map.set(r.alliance_id, r.alliance_name);
                  }
                  return map;
              });
          }
      };
      return functor;
  }
docs: Create a new {@link Alliances} instance that uses the given `agent` to
  make its HTTP requests to the ESI interface.
  
  @param agent The agent making actual requests
  @returns An Alliances API instance