services:
    akeneo_connectivity.connection.internal_api.controller.connection:
        public: true
        class: 'Akeneo\Connectivity\Connection\Infrastructure\InternalApi\Controller\ConnectionController'
        arguments:
            - '@akeneo_connectivity.connection.application.handler.create_connection'
            - '@akeneo_connectivity.connection.application.handler.fetch_connections'
            - '@akeneo_connectivity.connection.application.handler.find_a_connection'
            - '@akeneo_connectivity.connection.application.handler.update_connection'
            - '@akeneo_connectivity.connection.application.handler.delete_connection'
            - '@akeneo_connectivity.connection.application.handler.regenerate_connection_secret'
            - '@akeneo_connectivity.connection.application.handler.regenerate_connection_password'
            - '@oro_security.security_facade'

    akeneo_connectivity.connection.internal_api.controller.audit:
        public: true
        class: 'Akeneo\Connectivity\Connection\Infrastructure\InternalApi\Controller\AuditController'
        arguments:
            - '@pim_user.context.user'
            - '@akeneo_connectivity.connection.application.audit.handler.get_period_event_count_per_connection'
            - '@akeneo_connectivity.connection.application.audit.handler.get_error_count_per_connection'
            - '@akeneo_connectivity.connection.application.audit.handler.get_period_error_count_per_connection'

    akeneo_connectivity.connection.internal_api.controller.error_management:
        public: true
        class: 'Akeneo\Connectivity\Connection\Infrastructure\InternalApi\Controller\ErrorManagementController'
        arguments:
            - '@akeneo_connectivity.connection.application.error_management.handler.get_connection_business_errors'

    akeneo_connectivity.connection.internal_api.controller.webhook:
        public: true
        class: 'Akeneo\Connectivity\Connection\Infrastructure\InternalApi\Controller\WebhookController'
        arguments:
            - '@oro_security.security_facade'
            - '@akeneo_connectivity.connection.application.webhook.handler.get_connection_webhook'
            - '@akeneo_connectivity.connection.application.webhook.handler.check_url_reachability'
            - '@akeneo_connectivity.connection.application.webhook.handler.update_connection_webhook'
            - '@akeneo_connectivity.connection.application.webhook.handler.generate_webhook_secret'

    akeneo_connectivity.connection.internal_api.controller.events_api_debug:
        public: true
        class: Akeneo\Connectivity\Connection\Infrastructure\InternalApi\Controller\EventsApiDebugController
        arguments:
            - '@akeneo_connectivity.connection.persistence.query.get_event_subscription_logs_query'
            - '@akeneo_connectivity.connection.persistence.query.search_event_subscription_debug_logs_query'
            - '@oro_security.security_facade'

    akeneo_connectivity.connection.internal_api.controller.marketplace.get_web_marketplace_url:
        public: true
        class: Akeneo\Connectivity\Connection\Infrastructure\InternalApi\Controller\Marketplace\GetWebMarketplaceUrl
        arguments:
            - '@akeneo_connectivity.connection.marketplace.url_generator'
            - '@pim_user.context.user'

    akeneo_connectivity.connection.internal_api.controller.marketplace.get_all_extensions:
        public: true
        class: Akeneo\Connectivity\Connection\Infrastructure\InternalApi\Controller\Marketplace\GetAllExtensions
        arguments:
            - '@akeneo_connectivity.connection.marketplace.get_all_extensions_query'
            - '@akeneo_connectivity.connection.marketplace.analytics_generator'
            - '@pim_user.context.user'
            - '@logger'

    akeneo_connectivity.connection.internal_api.controller.marketplace.get_all_apps:
        public: true
        class: Akeneo\Connectivity\Connection\Infrastructure\InternalApi\Controller\Marketplace\GetAllApps
        arguments:
            - '@akeneo_connectivity.connection.marketplace.app_url_generator'
            - '@akeneo_connectivity.connection.marketplace.get_all_apps_query'
            - '@akeneo_connectivity.connection.marketplace.analytics_generator'
            - '@pim_user.context.user'
            - '@logger'
            - '@akeneo_connectivity.connection.marketplace_activate.feature'

    akeneo_connectivity.connection.internal_api.controller.apps.get_app_activate_url:
        public: true
        class: Akeneo\Connectivity\Connection\Infrastructure\InternalApi\Controller\Apps\GetAppActivateUrlController
        arguments:
            - '@akeneo_connectivity.connection.marketplace.get_app_query'
            - '@akeneo_connectivity.connection.service.apps.client_provider'
            - '@akeneo_connectivity.connection.marketplace.app_url_generator'
            - '@oro_security.security_facade'
            - '@akeneo_connectivity.connection.marketplace_activate.feature'

    akeneo_connectivity.connection.public.controller.apps.authorize:
        public: true
        class: Akeneo\Connectivity\Connection\Infrastructure\Apps\Controller\AuthorizeAction
        arguments:
            - '@Akeneo\Connectivity\Connection\Application\Apps\Command\RequestAppAuthorizationHandler'
            - '@router'
            - '@akeneo_connectivity.connection.marketplace_activate.feature'
            - '@Akeneo\Connectivity\Connection\Infrastructure\Apps\Session\AppAuthorizationSession'
            - '@Akeneo\Connectivity\Connection\Infrastructure\Apps\Persistence\Query\GetAppConfirmationQuery'
            - '@Akeneo\Connectivity\Connection\Infrastructure\Apps\OAuth\RedirectUriWithAuthorizationCodeGenerator'
            - '@Akeneo\Connectivity\Connection\Infrastructure\Apps\Security\ConnectedPimUserProvider'
            - '@Akeneo\Connectivity\Connection\Application\Apps\Command\RequestAppAuthenticationHandler'
            - '@oro_security.security_facade'

    akeneo_connectivity.connection.public.controller.apps.token:
        public: true
        class: Akeneo\Connectivity\Connection\Infrastructure\Apps\Controller\RequestAccessTokenAction
        arguments:
            - '@akeneo_connectivity.connection.marketplace_activate.feature'
            - '@validator'
            - '@Akeneo\Connectivity\Connection\Infrastructure\Apps\OAuth\CreateAccessToken'

    akeneo_connectivity.connection.public.controller.apps.get_wizard_data:
        public: true
        class: Akeneo\Connectivity\Connection\Infrastructure\Apps\Controller\GetWizardDataAction
        arguments:
            - '@akeneo_connectivity.connection.marketplace.get_app_query'
            - '@Akeneo\Connectivity\Connection\Infrastructure\Apps\Session\AppAuthorizationSession'
            - '@Akeneo\Connectivity\Connection\Infrastructure\Apps\Security\ScopeMapperRegistry'

    akeneo_connectivity.connection.apps.controller.apps.confirm_authorization:
        public: true
        class: Akeneo\Connectivity\Connection\Infrastructure\Apps\Controller\ConfirmAuthorizationAction
        arguments:
            - '@Akeneo\Connectivity\Connection\Application\Apps\Command\CreateAppWithAuthorizationHandler'
            - '@akeneo_connectivity.connection.marketplace_activate.feature'
            - '@Akeneo\Connectivity\Connection\Infrastructure\Apps\Persistence\Query\GetAppConfirmationQuery'
            - '@Akeneo\Connectivity\Connection\Infrastructure\Apps\Normalizer\ViolationListNormalizer'
            - '@oro_security.security_facade'
            - '@logger'
            - '@Akeneo\Connectivity\Connection\Infrastructure\Apps\OAuth\RedirectUriWithAuthorizationCodeGenerator'
            - '@Akeneo\Connectivity\Connection\Infrastructure\Apps\Session\AppAuthorizationSession'
            - '@Akeneo\Connectivity\Connection\Infrastructure\Apps\Security\ConnectedPimUserProvider'
            - '@Akeneo\Connectivity\Connection\Application\Apps\Command\ConsentAppAuthenticationHandler'

    akeneo_connectivity.connection.apps.controller.apps.confirm_authentication:
        public: true
        class: Akeneo\Connectivity\Connection\Infrastructure\Apps\Controller\ConfirmAuthenticationAction
        arguments:
            - '@akeneo_connectivity.connection.marketplace_activate.feature'
            - '@Akeneo\Connectivity\Connection\Infrastructure\Apps\Persistence\Query\GetAppConfirmationQuery'
            - '@oro_security.security_facade'
            - '@Akeneo\Connectivity\Connection\Infrastructure\Apps\OAuth\RedirectUriWithAuthorizationCodeGenerator'
            - '@Akeneo\Connectivity\Connection\Infrastructure\Apps\Session\AppAuthorizationSession'
            - '@Akeneo\Connectivity\Connection\Infrastructure\Apps\Security\ConnectedPimUserProvider'
            - '@Akeneo\Connectivity\Connection\Application\Apps\Command\ConsentAppAuthenticationHandler'
            - '@logger'
            - '@Akeneo\Connectivity\Connection\Infrastructure\Apps\Normalizer\ViolationListNormalizer'

    akeneo_connectivity.connection.internal_api.controller.apps.get_all_connected_apps:
        public: true
        class: 'Akeneo\Connectivity\Connection\Infrastructure\Apps\Controller\InternalApi\GetAllConnectedAppsAction'
        arguments:
            - '@akeneo_connectivity.connection.marketplace_activate.feature'
            - '@Akeneo\Connectivity\Connection\Infrastructure\Apps\Persistence\DbalConnectedAppRepository'

    akeneo_connectivity.connection.internal_api.controller.apps.get_connected_app:
        public: true
        class: 'Akeneo\Connectivity\Connection\Infrastructure\Apps\Controller\InternalApi\GetConnectedAppAction'
        arguments:
            - '@akeneo_connectivity.connection.marketplace_activate.feature'
            - '@oro_security.security_facade'
            - '@Akeneo\Connectivity\Connection\Infrastructure\Apps\Persistence\DbalConnectedAppRepository'

    akeneo_connectivity.connection.internal_api.controller.apps.connected_app.get_all_scope_messages:
        public: true
        class: 'Akeneo\Connectivity\Connection\Infrastructure\Apps\Controller\InternalApi\GetAllConnectedAppScopeMessagesAction'
        arguments:
            - '@akeneo_connectivity.connection.marketplace_activate.feature'
            - '@oro_security.security_facade'
            - '@Akeneo\Connectivity\Connection\Infrastructure\Apps\Persistence\DbalConnectedAppRepository'
            - '@Akeneo\Connectivity\Connection\Infrastructure\Apps\Security\ScopeMapperRegistry'

    Akeneo\Connectivity\Connection\Infrastructure\Apps\Controller\InternalApi\DeleteAppAction:
        public: true
        arguments:
            - '@akeneo_connectivity.connection.marketplace_activate.feature'
            - '@oro_security.security_facade'
            - '@Akeneo\Connectivity\Connection\Infrastructure\Apps\Persistence\DbalConnectedAppRepository'
            - '@Akeneo\Connectivity\Connection\Application\Apps\Command\DeleteAppHandler'

    Akeneo\Connectivity\Connection\Infrastructure\Apps\Controller\GetOpenIdPublicKeyAction:
        public: true
        arguments:
            - '@Akeneo\Connectivity\Connection\Infrastructure\Apps\Persistence\Query\GetAsymmetricKeysQuery'

    Akeneo\Connectivity\Connection\Infrastructure\Apps\Controller\InternalApi\GetConnectedAppMonitoringSettingsAction:
        public: true
        arguments:
            - '@akeneo_connectivity.connection.marketplace_activate.feature'
            - '@oro_security.security_facade'
            - '@akeneo_connectivity.connection.application.handler.find_a_connection'

    Akeneo\Connectivity\Connection\Infrastructure\Apps\Controller\InternalApi\UpdateConnectedAppMonitoringSettingsAction:
        public: true
        arguments:
            - '@akeneo_connectivity.connection.marketplace_activate.feature'
            - '@oro_security.security_facade'
            - '@akeneo_connectivity.connection.application.handler.find_a_connection'
            - '@akeneo_connectivity.connection.application.handler.update_connection'
