anchor.diff:  add(#{ id := ServiceId } = ServiceInfo) when is_binary(ServiceId) ->
       tts_data:service_add(ServiceId, maps:put(enabled, false, ServiceInfo)),
       {ok, ServiceId};
  -add(ServiceMap) when is_map(ServiceMap) ->
  -    ServiceInfo = map_to_atom_keys(ServiceMap),
  -    add(ServiceInfo);
   add(_ServiceMap)  ->
       {error, invalid_config}.
   
  
positive.code: -export([is_enabled/1]).
  -export([allows_same_state/1]).
  -export([get_credential_limit/1]).
  -export([group_plugin_configs/1]).
  
  get_list() ->
       tts_data:service_get_list().
  
  get_list(#{site := #{uid := UserId}})  ->
      get_list(UserId);
  get_list(#{uid := UserId})  ->
      get_list(UserId);
  get_list(UserId) ->
      %TODO: implement a whitelist per service
      {ok, ServiceList} = tts_data:service_get_list(),
      UpdateLimit = fun(Service, List) ->
                        #{ id := ServiceId
                         } = Service,
                        Limit = maps:get(cred_limit, Service, 0),
                        {ok, Count} = tts_credential:get_count(UserId, ServiceId),
                        LimitReached = (Count >= Limit),
                        Update = #{ limit_reached => LimitReached,
                                    cred_count => Count
                                  },
                        [ maps:merge(Service, Update) | List]
  
negative.code:             end;
          _ -> {error, not_found}
      end.
  