docs: async function searchTelemetryArchive(TelemetryArchive, searchTelemetryQuery) {
    let { type } = searchTelemetryQuery;
    const { n, timestamp, headersOnly } = searchTelemetryQuery;
    // {type, id, timestampCreated}
    let pings = await TelemetryArchive.promiseArchivedPingList();
    if (type && !Array.isArray(type)) {
      type = [type];
    }
    if (type) pings = pings.filter(p => type.includes(p.type));
  
    if (timestamp) pings = pings.filter(p => p.timestampCreated > timestamp);
  
    if (pings.length === 0) {
      return Promise.resolve([]);
    }
  
    pings.sort((a, b) => b.timestampCreated - a.timestampCreated);
  
    if (n) pings = pings.slice(0, n);
    const pingData = headersOnly
      ? pings
      : pings.map(ping => TelemetryArchive.promiseArchivedPingById(ping.id));
  
    return Promise.all(pingData);
  }