def get_need_types(app):
    """
    Returns a list of directive-names from all configured need_types.

    **Usage**::

        from sphinxcontrib.needs.api import get_need_types

        all_types = get_need_types(app)

    :param app: Sphinx application object
    :return: list of strings
    """
    needs_types = getattr(app.config, 'needs_types', [])
    return [x['directive'] for x in needs_types]