Your IP : 216.73.216.189


Current Path : /var/www/magento.test.indacotrentino.com/www/vendor/magento/module-saas-common/etc/
Upload File :
Current File : /var/www/magento.test.indacotrentino.com/www/vendor/magento/module-saas-common/etc/di.xml

<?xml version="1.0"?>
<!--
/**
 * Copyright 2024 Adobe
 * All Rights Reserved.
 *
 * NOTICE: All information contained herein is, and remains
 * the property of Adobe and its suppliers, if any. The intellectual
 * and technical concepts contained herein are proprietary to Adobe
 * and its suppliers and are protected by all applicable intellectual
 * property laws, including trade secret and copyright laws.
 * Dissemination of this information or reproduction of this material
 * is strictly forbidden unless prior written permission is obtained
 * from Adobe.
 */
-->
<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:ObjectManager/etc/config.xsd">
    <preference for="Magento\SaaSCommon\Model\Http\Command\FeedRouteResolverInterface" type="Magento\SaaSCommon\Model\Http\Command\FeedRouteResolver" />
    <preference for="Magento\SaaSCommon\Cron\SubmitFeedInterface" type="Magento\SaaSCommon\Cron\SubmitFeed" />
    <preference for="Magento\DataExporter\Model\ExportFeedInterface" type="Magento\SaaSCommon\Model\ExportFeed" />

    <type name="Magento\SaaSCommon\Console\Command\Resync">
        <arguments>
            <argument name="name" xsi:type="string">saas:resync</argument>
        </arguments>
    </type>
    <type name="Magento\Framework\Console\CommandListInterface">
        <arguments>
            <argument name="commands" xsi:type="array">
                <item name="saas_resync" xsi:type="object">Magento\SaaSCommon\Console\Command\Resync</item>
            </argument>
        </arguments>
    </type>

    <!-- Logger -->
    <virtualType name="SaaSExportLogger" type="Magento\SaaSCommon\Model\Logging\Monolog">
        <arguments>
            <argument name="handlers" xsi:type="array">
                <item name="error" xsi:type="object">Magento\SaaSCommon\Model\Logging\Error</item>
                <item name="system" xsi:type="object">Magento\SaaSCommon\Model\Logging\Base</item>
            </argument>
        </arguments>
    </virtualType>
    <preference for="Magento\SaaSCommon\Model\Logging\SaaSExportLoggerInterface" type="SaaSExportLogger"/>
    <type name="Magento\SaaSCommon\Model\Http\Command\SubmitFeed">
        <arguments>
            <argument name="extendedLog" xsi:type="init_parameter">Magento\SaaSCommon\Model\Logging\SaaSExportLoggerInterface::EXPORTER_EXTENDED_LOG</argument>
            <argument name="headers" xsi:type="array">
                <!-- this is the example of the header  -->
                <!-- <item name="x-gw-metadata" xsi:type="string"></item>  -->
            </argument>
        </arguments>
    </type>

    <type name="Magento\SaaSCommon\Model\Metadata\RequestMetadataHeaderProvider">
        <arguments>
            <argument name="serializer" xsi:type="object">Magento\Framework\Serialize\Serializer\Json</argument>
        </arguments>
    </type>
    <type name="Magento\SaaSCommon\Model\Metadata\MetadataPool">
        <arguments>
            <argument name="metadata" xsi:type="array">
                <item name="commerce-edition" xsi:type="object">Magento\SaaSCommon\Model\Metadata\CommerceEdition</item>
                <item name="saas-exporter-extension" xsi:type="object">Magento\SaaSCommon\Model\Metadata\ClientVersion</item>
            </argument>
        </arguments>
    </type>
    <type name="Magento\SaaSCommon\Cron\SubmitFeed">
        <arguments>
            <argument name="batchGenerator" xsi:type="object">Magento\DataExporter\Model\Batch\Feed\Generator</argument>
        </arguments>
    </type>
    <type name="Magento\SaaSCommon\Model\ResyncManager">
        <arguments>
            <argument name="batchGenerator" xsi:type="object">Magento\DataExporter\Model\Batch\Feed\Generator</argument>
        </arguments>
    </type>
    <type name="\Magento\SaaSCommon\Model\ResyncOptions">
        <arguments>
            <argument name="optionsList" xsi:type="array">
                <item name="noReindex" xsi:type="array">
                    <item name="name" xsi:type="const">\Magento\SaaSCommon\Model\ResyncOptions::NO_REINDEX_OPTION</item>
                    <item name="mode" xsi:type="const">\Symfony\Component\Console\Input\InputOption::VALUE_NONE</item>
                    <item name="description" xsi:type="string">Run re-submission of feed data to SaaS service only. Does not re-index. (This option is not applicable to the products, productoverrides, prices feeds)</item>
                </item>
                <item name="cleanUpFeed" xsi:type="array">
                    <item name="name" xsi:type="const">\Magento\SaaSCommon\Model\ResyncOptions::CLEANUP_FEED</item>
                    <item name="mode" xsi:type="const">\Symfony\Component\Console\Input\InputOption::VALUE_NONE</item>
                    <item name="description" xsi:type="string">Force to cleanup feed indexer table before sync.</item>
                </item>
                <item name="dryRun" xsi:type="array">
                    <item name="name" xsi:type="const">\Magento\SaaSCommon\Model\ResyncOptions::DRY_RUN_OPTION</item>
                    <item name="mode" xsi:type="const">\Symfony\Component\Console\Input\InputOption::VALUE_NONE</item>
                    <item name="description" xsi:type="string">Dry run. Data will not be exported. To save payload to log file var/log/saas-export.log run with env variable EXPORTER_EXTENDED_LOG=1.</item>
                </item>
                <item name="threadCount" xsi:type="array">
                    <item name="name" xsi:type="const">\Magento\SaaSCommon\Model\ResyncOptions::THREAD_COUNT</item>
                    <item name="mode" xsi:type="const">\Symfony\Component\Console\Input\InputOption::VALUE_REQUIRED</item>
                    <item name="description" xsi:type="string">Set synchronization thread count.</item>
                </item>
                <item name="batchSize" xsi:type="array">
                    <item name="name" xsi:type="const">\Magento\SaaSCommon\Model\ResyncOptions::BATCH_SIZE</item>
                    <item name="mode" xsi:type="const">\Symfony\Component\Console\Input\InputOption::VALUE_REQUIRED</item>
                    <item name="description" xsi:type="string">Set synchronization batch size</item>
                </item>
                <item name="continueResync" xsi:type="array">
                    <item name="name" xsi:type="const">\Magento\SaaSCommon\Model\ResyncOptions::CONTINUE_RESYNC</item>
                    <item name="mode" xsi:type="const">\Symfony\Component\Console\Input\InputOption::VALUE_NONE</item>
                    <item name="description" xsi:type="string">Continue resync from the last stored position (This option is applicable to the products, productoverrides, prices feeds)</item>
                </item>
            </argument>
        </arguments>
    </type>
    <type name="Magento\DataExporter\Model\Batch\FeedSource\Iterator">
        <plugin name="update_feed_source_progress_bar"
                type="Magento\SaaSCommon\Plugin\UpdateProgressBarPlugin"/>
    </type>
    <type name="Magento\DataExporter\Model\Batch\Feed\Iterator">
        <plugin name="update_feed_progress_bar"
                type="Magento\SaaSCommon\Plugin\UpdateProgressBarPlugin"/>
    </type>
    <type name="Magento\DataExporter\Model\Batch\FeedSource\Generator">
        <plugin name="init_feed_source_progress_bar"
                type="Magento\SaaSCommon\Plugin\InitProgressBarPlugin"/>
    </type>
    <type name="Magento\DataExporter\Model\Batch\Feed\Generator">
        <plugin name="init_feed_progress_bar"
                type="Magento\SaaSCommon\Plugin\InitProgressBarPlugin"/>
    </type>
</config>