-
Notifications
You must be signed in to change notification settings - Fork 62
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'develop' into release/4.27.0
- Loading branch information
Showing
166 changed files
with
6,536 additions
and
2,145 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
<?php | ||
|
||
declare(strict_types=1); | ||
|
||
namespace Dotdigitalgroup\Email\Api\Model\Sync\Batch; | ||
|
||
interface BatchMergerInterface | ||
{ | ||
/** | ||
* Merge two batches of data. | ||
* | ||
* @param array $batch | ||
* @param array $megaBatch | ||
* @return array | ||
*/ | ||
public function mergeBatch(array $batch, array $megaBatch); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
<?php | ||
|
||
declare(strict_types=1); | ||
|
||
namespace Dotdigitalgroup\Email\Api\Model\Sync\Batch; | ||
|
||
interface BatchProcessorInterface | ||
{ | ||
/** | ||
* Processes a batch of data for a specific import type and website. | ||
* | ||
* @param array $batch An array of data to be processed. | ||
* @param int $websiteId The ID of the website the batch is associated with. | ||
* @param string $importType The type of import, which determines the processing logic to be applied. | ||
* @param string $bulkImportMode The type of import mode. | ||
*/ | ||
public function process(array $batch, int $websiteId, string $importType, string $bulkImportMode); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
<?php | ||
|
||
declare(strict_types=1); | ||
|
||
namespace Dotdigitalgroup\Email\Api\Model\Sync\Batch; | ||
|
||
interface BatchStrategyFactoryInterface | ||
{ | ||
/** | ||
* Creates a batch strategy instance based on the specified import type. | ||
* | ||
* @param string $importType The type of import for which the strategy is created. | ||
* @return BatchStrategyInterface | ||
*/ | ||
public function create(string $importType): BatchStrategyInterface; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
<?php | ||
|
||
declare(strict_types=1); | ||
|
||
namespace Dotdigitalgroup\Email\Api\Model\Sync\Batch; | ||
|
||
interface BatchStrategyInterface | ||
{ | ||
/** | ||
* Processes the data set by setData method. | ||
* | ||
* This method is the core of the strategy, where the actual processing of the data happens. | ||
* It should contain the logic specific to the strategy's purpose, such as sending emails, | ||
* importing records, or any other task that the strategy is designed to perform. | ||
* | ||
* @return mixed | ||
*/ | ||
public function process(); | ||
} |
25 changes: 25 additions & 0 deletions
25
Api/Model/Sync/Batch/Record/RecordImportedStrategyInterface.php
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
<?php | ||
|
||
declare(strict_types=1); | ||
|
||
namespace Dotdigitalgroup\Email\Api\Model\Sync\Batch\Record; | ||
|
||
use Dotdigitalgroup\Email\Api\Model\Sync\Batch\BatchStrategyInterface; | ||
|
||
interface RecordImportedStrategyInterface extends BatchStrategyInterface | ||
{ | ||
/** | ||
* Sets the data to be processed by the strategy. | ||
* | ||
* @param array $records | ||
* @return RecordImportedStrategyInterface | ||
*/ | ||
public function setRecords(array $records): RecordImportedStrategyInterface; | ||
|
||
/** | ||
* Processes a batch of records. | ||
* | ||
* @return void | ||
*/ | ||
public function process(): void; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
<?php | ||
|
||
declare(strict_types=1); | ||
|
||
namespace Dotdigitalgroup\Email\Api\Model\Sync\Batch\Sender; | ||
|
||
use Dotdigitalgroup\Email\Api\Model\Sync\Batch\BatchStrategyInterface; | ||
|
||
interface SenderStrategyInterface extends BatchStrategyInterface | ||
{ | ||
/** | ||
* Sets the batch of data to be processed. | ||
* | ||
* @param array $batch | ||
* @return SenderStrategyInterface | ||
*/ | ||
public function setBatch(array $batch): SenderStrategyInterface; | ||
|
||
/** | ||
* Sets the website ID associated with the data batch. | ||
* | ||
* @param int $websiteId | ||
* @return SenderStrategyInterface | ||
*/ | ||
public function setWebsiteId(int $websiteId): SenderStrategyInterface; | ||
|
||
/** | ||
* Processes a batch of records. | ||
* | ||
* @return string An import ID, or an empty string. | ||
*/ | ||
public function process(): string; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,45 @@ | ||
<?php | ||
|
||
declare(strict_types=1); | ||
|
||
namespace Dotdigitalgroup\Email\Api\Model\Sync\Export; | ||
|
||
use Exception; | ||
use Magento\Framework\Exception\LocalizedException; | ||
use Magento\Store\Api\Data\WebsiteInterface; | ||
|
||
/** | ||
* Interface ContactExporterInterface | ||
* | ||
* This interface extends the ExporterInterface and provides methods to export data and manage field mappings. | ||
*/ | ||
interface ContactExporterInterface extends ExporterInterface | ||
{ | ||
/** | ||
* Export data. | ||
* | ||
* @param array $data | ||
* @param WebsiteInterface $website | ||
* @param int $listId | ||
* | ||
* @return array | ||
* @throws LocalizedException|Exception | ||
*/ | ||
public function export(array $data, WebsiteInterface $website, int $listId); | ||
|
||
/** | ||
* Set field mapping. | ||
* | ||
* @param WebsiteInterface $website | ||
* | ||
* @return void | ||
*/ | ||
public function setFieldMapping(WebsiteInterface $website): void; | ||
|
||
/** | ||
* Get field mapping. | ||
* | ||
* @return array | ||
*/ | ||
public function getFieldMapping(): array; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
<?php | ||
|
||
declare(strict_types=1); | ||
|
||
namespace Dotdigitalgroup\Email\Api\Model\Sync\Export; | ||
|
||
interface ExporterInterface | ||
{ | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
<?php | ||
|
||
declare(strict_types=1); | ||
|
||
namespace Dotdigitalgroup\Email\Api\Model\Sync\Export; | ||
|
||
use Dotdigital\V3\Models\InsightData\Record; | ||
use Magento\Store\Api\Data\WebsiteInterface; | ||
|
||
/** | ||
* Interface InsightDataExporterInterface | ||
* | ||
* This interface extends the ExporterInterface and provides a method to build a collection of insight data records. | ||
*/ | ||
interface InsightDataExporterInterface extends ExporterInterface | ||
{ | ||
/** | ||
* Build a collection of insight data records. | ||
* | ||
* @param array $data | ||
* @return array<string, Record> | ||
*/ | ||
public function export(array $data): array; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
<?php | ||
|
||
declare(strict_types=1); | ||
|
||
namespace Dotdigitalgroup\Email\Api\Model\Sync\Export; | ||
|
||
/** | ||
* Interface SyncBuilderInterface | ||
* | ||
* This interface defines the methods required for building and exporting sync data. | ||
*/ | ||
interface SdkBuilderInterface | ||
{ | ||
/** | ||
* Set the data to be built. | ||
* | ||
* @param mixed $data The data to be built. | ||
* @return SdkBuilderInterface Returns the instance of the builder. | ||
*/ | ||
public function setBuildableData($data): SdkBuilderInterface; | ||
|
||
/** | ||
* Build the data. | ||
* | ||
* @return mixed The built data. | ||
*/ | ||
public function build(); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
<?php | ||
|
||
declare(strict_types=1); | ||
|
||
namespace Dotdigitalgroup\Email\Api\Model\Sync\Export; | ||
|
||
use Dotdigital\V3\Models\InsightData\RecordsCollection; | ||
|
||
interface SdkCollectionBuilderInterface extends SdkBuilderInterface | ||
{ | ||
/** | ||
* Build a RecordsCollection. | ||
* | ||
* @return RecordsCollection | ||
*/ | ||
public function build(): RecordsCollection; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
<?php | ||
|
||
declare(strict_types=1); | ||
|
||
namespace Dotdigitalgroup\Email\Api\Model\Sync\Importer; | ||
|
||
use Dotdigitalgroup\Email\Model\Importer as ImporterModel; | ||
|
||
interface BulkSyncInterface | ||
{ | ||
/** | ||
* Process a single importer item. | ||
* | ||
* @param ImporterModel $item | ||
* @return mixed | ||
*/ | ||
public function process(ImporterModel $item); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.