Skip to content

Commit

Permalink
Initial commit
Browse files Browse the repository at this point in the history
  • Loading branch information
bartoszherba committed Dec 12, 2018
0 parents commit 7af22bd
Show file tree
Hide file tree
Showing 248 changed files with 19,060 additions and 0 deletions.
27 changes: 27 additions & 0 deletions Api/AttributeSetRepositoryInterface.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
<?php
/**
* @package Divante\PimcoreIntegration
* @author Bartosz Herba <[email protected]>
* @copyright 2018 Divante Sp. z o.o.
* @license See LICENSE_DIVANTE.txt for license details.
*/

namespace Divante\PimcoreIntegration\Api;

use Magento\Eav\Api\Data\AttributeSetInterface;
use Magento\Framework\Exception\NoSuchEntityException;

/**
* Interface AttributeSetRepositoryInterface
*/
interface AttributeSetRepositoryInterface extends \Magento\Catalog\Api\AttributeSetRepositoryInterface
{
/**
* @param string $checksum
*
* @throws NoSuchEntityException
*
* @return AttributeSetInterface
*/
public function getByChecksum(string $checksum): AttributeSetInterface;
}
28 changes: 28 additions & 0 deletions Api/CategoryRepositoryInterface.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
<?php
/**
* @package Divante\PimcoreIntegration
* @author Bartosz Herba <[email protected]>
* @copyright 2018 Divante Sp. z o.o.
* @license See LICENSE_DIVANTE.txt for license details.
*/

namespace Divante\PimcoreIntegration\Api;

use Magento\Catalog\Api\Data\CategoryInterface;
use Magento\Framework\Exception\NoSuchEntityException;

/**
* Interface CategoryRepositoryInterface
*/
interface CategoryRepositoryInterface extends \Magento\Catalog\Api\CategoryRepositoryInterface
{
/**
* @param int $pimId
* @param int $storeId
*
* @throws NoSuchEntityException
*
* @return CategoryInterface
*/
public function getByPimId(int $pimId, int $storeId = 0): CategoryInterface;
}
32 changes: 32 additions & 0 deletions Api/Data/AttributeSetInterface.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
<?php
/**
* @package Divante\PimcoreIntegration
* @author Bartosz Herba <[email protected]>
* @copyright 2018 Divante Sp. z o.o.
* @license See LICENSE_DIVANTE.txt for license details.
*/

namespace Divante\PimcoreIntegration\Api\Data;

/**
* Interface AttributeSetInterface
*/
interface AttributeSetInterface extends \Magento\Eav\Api\Data\AttributeSetInterface
{
/**
* Attribute set checksum key
*/
const KEY_ATTRIBUTE_SET_CHECKSUM = 'checksum';

/**
* @return string
*/
public function getChecksum(): string;

/**
* @param string $checksum
*
* @return AttributeSetInterface
*/
public function setChecksum(string $checksum): AttributeSetInterface;
}
72 changes: 72 additions & 0 deletions Api/Pimcore/PimcoreAttributeMapperInterface.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,72 @@
<?php
/**
* @package Divante\PimcoreIntegration
* @author Mateusz Bukowski <[email protected]>
* @copyright 2018 Divante Sp. z o.o.
* @license See LICENSE_DIVANTE.txt for license details.
*/

namespace Divante\PimcoreIntegration\Api\Pimcore;

/**
* Interface PimcoreAttributeHandlerInterface
*/
interface PimcoreAttributeMapperInterface
{
/**
* Pimcore datetime object
*/
const DATETIME = 'datetime';

/**
* Pimcore text object
*/
const TEXT = 'text';

/**
* Pimcore textarea object
*/
const TEXTAREA= 'textarea';

/**
* Pimcore wysiwyg object
*/
const WYSIWYG= 'wysiwyg';

/**
* Pimcore object type object
*/
const OBJECT = 'object';

/**
* Pimcore object type yesno
*/
const YESNO = 'yesno';

/**
* Pimcore multiobject type object
*/
const MULTIOBJECT = 'multiobject';

/**
* Pimcore asset type object
*/
const ASSET = 'asset';

/**
* Pimcore select type object
*/
const SELECT = 'select';

/**
* Pimcore multiselect type object
*/
const MULTISELECT = 'multiselect';

/**
* @param array $attributeData
*
* @return mixed
*/
public function mapUsingType(array $attributeData);
}
51 changes: 51 additions & 0 deletions Api/Pimcore/PimcoreProductInterface.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
<?php
/**
* @package Divante\PimcoreIntegration
* @author Mateusz Bukowski <[email protected]>
* @copyright 2018 Divante Sp. z o.o.
* @license See LICENSE_DIVANTE.txt for license details.
*/

namespace Divante\PimcoreIntegration\Api\Pimcore;

/**
* Interface PimcoreProductInterface
*/
interface PimcoreProductInterface
{
/**
* Pimcore product attribute set ID code
*/
const ATTRIBUTE_SET_ID = 'attribute_set_id';

/**
* @param array $elements
*
* @return PimcoreProductInterface
*/
public function setElements(array $elements): PimcoreProductInterface;

/**
* @param string $key
* @param string|int|null $index
*
* @return mixed
*/
public function getData($key = '', $index = null);

/**
* @param string$key
* @param mixed $value
*
* @return mixed
*/
public function setData($key, $value = null);

/**
* Unset data from the object.
*
* @param null|string|array $key
* @return $this
*/
public function unsetData($key = null);
}
28 changes: 28 additions & 0 deletions Api/ProductRepositoryInterface.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
<?php
/**
* @package Divante\PimcoreIntegration
* @author Mateusz Bukowski <[email protected]>
* @copyright 2018 Divante Sp. z o.o.
* @license See LICENSE_DIVANTE.txt for license details.
*/

namespace Divante\PimcoreIntegration\Api;

use Magento\Catalog\Api\Data\ProductInterface;
use Magento\Framework\Exception\NoSuchEntityException;

/**
* Interface ProductRepositoryInterface
*/
interface ProductRepositoryInterface extends \Magento\Catalog\Api\ProductRepositoryInterface
{
/**
* @param int $pimcoreId
* @param bool $joinOutOfStock
*
* @throws NoSuchEntityException
*
* @return ProductInterface
*/
public function getByPimId($pimcoreId, bool $joinOutOfStock = true): ProductInterface;
}
37 changes: 37 additions & 0 deletions Api/Queue/AssetQueueImporterInterface.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
<?php
/**
* @package Divante\PimcoreIntegration
* @author Bartosz Herba <[email protected]>
* @copyright 2018 Divante Sp. z o.o.
* @license See LICENSE_DIVANTE.txt for license details.
*/

namespace Divante\PimcoreIntegration\Api\Queue;

use Divante\PimcoreIntegration\Api\Queue\Data\AssetQueueInterface;

/**
* Interface AssetQueueImporterInterface
*
* @api
*/
interface AssetQueueImporterInterface
{
/**
* Add published asset in Pimcore to Magento import queue as a insert/update request
*
* @param AssetQueueInterface $data
*
* @return array
*/
public function insertOrUpdate(AssetQueueInterface $data): array;

/**
* Add published asset in Pimcore to Magento import queue as a delete request
*
* @param int $assetId
*
* @return array
*/
public function delete(int $assetId): array;
}
50 changes: 50 additions & 0 deletions Api/Queue/AssetQueueRepositoryInterface.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
<?php
/**
* @package Divante\PimcoreIntegration
* @author Bartosz Herba <[email protected]>
* @copyright 2018 Divante Sp. z o.o.
* @license See LICENSE_DIVANTE.txt for license details.
*/

namespace Divante\PimcoreIntegration\Api\Queue;

use Divante\PimcoreIntegration\Api\Queue\Data\AssetQueueInterface;
use Divante\PimcoreIntegration\Api\Queue\Data\AssetQueueSearchResultsInterface;
use Divante\PimcoreIntegration\Api\Queue\Data\QueueInterface;
use Magento\Framework\Api\Search\SearchResult;
use Magento\Framework\Api\SearchCriteriaInterface;
use Magento\Framework\Model\AbstractModel;

/**
* Interface AssetQueueRepositoryInterface
*/
interface AssetQueueRepositoryInterface
{
/**
* @param int $transactionId
*
* @return AssetQueueInterface
*/
public function getById(int $transactionId): AssetQueueInterface;

/**
* @param AssetQueueInterface $assetQueue
*
* @return QueueInterface
*/
public function save(AssetQueueInterface $assetQueue): QueueInterface;

/**
* @param SearchCriteriaInterface $criteria
*
* @return AssetQueueSearchResultsInterface
*/
public function getList(SearchCriteriaInterface $criteria);

/**
* @param AssetQueueInterface $assetQueue
*
* @return bool
*/
public function delete(AssetQueueInterface $assetQueue): bool;
}
37 changes: 37 additions & 0 deletions Api/Queue/CategoryQueueImporterInterface.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
<?php
/**
* @package Divante\PimcoreIntegration
* @author Mateusz Bukowski <[email protected]>
* @copyright 2018 Divante Sp. z o.o.
* @license See LICENSE_DIVANTE.txt for license details.
*/

namespace Divante\PimcoreIntegration\Api\Queue;

use Divante\PimcoreIntegration\Api\Queue\Data\CategoryQueueInterface;

/**
* Interface CategoryQueueImporterInterface
*
* @api
*/
interface CategoryQueueImporterInterface
{
/**
* Add published category in Pimcore to Magento import queue as a insert/update request
*
* @param CategoryQueueInterface $data
*
* @return array
*/
public function insertOrUpdate(CategoryQueueInterface $data): array;

/**
* Add published category in Pimcore to Magento import queue as a delete request
*
* @param int $categoryId
*
* @return array
*/
public function delete(int $categoryId): array;
}
Loading

0 comments on commit 7af22bd

Please sign in to comment.