code: public function findPublishedByType($siteId, $type = NodeInterface::TYPE_DEFAULT)
      {
          $qa = $this->createAggregationQuery();
          $qa->match(
              array(
                  'siteId' => $siteId,
                  'deleted' => false,
                  'nodeType' => $type,
                  'status.publishedState' => true,
              )
          );
  
          return $this->hydrateAggregateQuery($qa);
      }
docs: @param string $siteId
  @param string $type
  
  @return array