Skip to content

Commit 6affc67

Browse files
authored
Merge pull request #1555 from algolia/feature/MAGE-941
Feature/mage 941 - Refactor / intro service classes
2 parents 12dda37 + 4bbc9bf commit 6affc67

26 files changed

+837
-975
lines changed

Api/Insights/EventsInterface.php renamed to Api/Insights/EventProcessorInterface.php

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
use Magento\Sales\Model\Order;
1010
use Magento\Store\Model\StoreManagerInterface;
1111

12-
interface EventsInterface
12+
interface EventProcessorInterface
1313
{
1414
/** @var string */
1515
public const EVENT_KEY_SUBTYPE = 'eventSubtype';
@@ -37,13 +37,13 @@ interface EventsInterface
3737
/** @var int */
3838
public const MAX_EVENTS_PER_REQUEST = 1000;
3939

40-
public function setInsightsClient(InsightsClient $client): EventsInterface;
40+
public function setInsightsClient(InsightsClient $client): EventProcessorInterface;
4141

42-
public function setAuthenticatedUserToken(string $token): EventsInterface;
42+
public function setAuthenticatedUserToken(string $token): EventProcessorInterface;
4343

44-
public function setAnonymousUserToken(string $token): EventsInterface;
44+
public function setAnonymousUserToken(string $token): EventProcessorInterface;
4545

46-
public function setStoreManager(StoreManagerInterface $storeManager): EventsInterface;
46+
public function setStoreManager(StoreManagerInterface $storeManager): EventProcessorInterface;
4747

4848
/**
4949
* @param string $eventName

Api/Product/ReplicaManagerInterface.php

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -15,11 +15,9 @@ interface ReplicaManagerInterface
1515
public const SORT_KEY_VIRTUAL_REPLICA = 'virtualReplica';
1616
public const MAX_VIRTUAL_REPLICA_LIMIT = 20;
1717

18-
1918
/**
2019
* Configure replicas in Algolia based on the sorting configuration in Magento
2120
*
22-
* @param string $primaryIndexName Could be tmp (legacy impl)
2321
* @param int $storeId
2422
* @param array<string, mixed> $primaryIndexSettings
2523
* @return void
@@ -29,8 +27,7 @@ interface ReplicaManagerInterface
2927
* @throws LocalizedException
3028
* @throws NoSuchEntityException
3129
*/
32-
public function handleReplicas(string $primaryIndexName, int $storeId, array $primaryIndexSettings): void;
33-
30+
public function syncReplicasToAlgolia(int $storeId, array $primaryIndexSettings): void;
3431

3532
/**
3633
* For standard Magento front end (e.g. Luma) replicas will likely only be needed if InstantSearch is enabled

0 commit comments

Comments
 (0)