docs: def get_export_allowable_types(cursor, exports_dirs, id, version):
      """Return export types."""
      request = get_current_request()
      type_settings = request.registry.settings['_type_info']
      type_names = [k for k, v in type_settings]
      type_infos = [v for k, v in type_settings]
      # We took the type_names directly from the setting this function uses to
      # check for valid types, so it should never raise an ExportError here
      file_tuples = get_export_files(cursor, id, version, type_names,
                                     exports_dirs, read_file=False)
      type_settings = dict(type_settings)
      for filename, mimetype, file_size, file_created, state, file_content \
              in file_tuples:
          type_name = filename.rsplit('.', 1)[-1]
          type_info = type_settings[type_name]
          yield {
              'format': type_info['user_friendly_name'],
              'filename': filename,
              'size': file_size,
              'created': file_created and file_created.isoformat() or None,
              'state': state,
              'details': type_info['description'],
              'path': request.route_path(
                  'export', ident_hash=join_ident_hash(id, version),
                  type=type_name, ignore=u'/{}'.format(filename))
              }