# Public Urls

akeneo_connectivity_connection_connect_apps_v1_authorize:
    path: '/connect/apps/v1/authorize'
    controller: akeneo_connectivity.connection.public.controller.apps.authorize
    methods: [ GET ]

akeneo_connectivity_connection_connect_apps_v1_token:
    path: '/connect/apps/v1/oauth2/token'
    controller: akeneo_connectivity.connection.public.controller.apps.token
    methods: [ POST ]

akeneo_connectivity_connection_connect_apps_v1_openid_public_key:
    path: '/connect/apps/v1/openid/public-key'
    controller: Akeneo\Connectivity\Connection\Infrastructure\Apps\Controller\GetOpenIdPublicKeyAction
    methods: [ GET ]

# Internal API

akeneo_connectivity_connection_error_management_rest:
    resource: ./routing/error-management.yml
    name_prefix: akeneo_connectivity_connection_error_management_rest_
    prefix: /rest/connections

akeneo_connectivity_connection_audit_rest:
    resource: ./routing/audit.yml
    name_prefix: akeneo_connectivity_connection_audit_rest_
    prefix: /rest/connections/audit

akeneo_connectivity_connection_rest:
    resource: ./routing/connection.yml
    name_prefix: akeneo_connectivity_connection_rest_
    prefix: /rest/connections
    trailing_slash_on_root: false

akeneo_connectivity_connection_webhook_rest:
    resource: ./routing/webhook.yml
    name_prefix: akeneo_connectivity_connection_webhook_rest_
    prefix: /rest/connections

akeneo_connectivity_connection_events_api_debug_rest:
    resource: ./routing/events_api_debug.yml
    name_prefix: akeneo_connectivity_connection_events_api_debug_rest_
    prefix: /rest/events-api-debug

akeneo_connectivity_connection_marketplace_rest:
    resource: ./routing/marketplace.yml
    prefix: /rest/marketplace

akeneo_connectivity_connection_apps:
    resource: ./routing/apps.yml
    prefix: /rest/apps

# Frontend

## Marketplace
akeneo_connectivity_connection_connect_marketplace:
    path: '/connect/app-store'

akeneo_connectivity_connection_connect_marketplace_profile:
    path: '/connect/app-store/profile'

## Apps
akeneo_connectivity_connection_connect_apps_activate:
    path: '/connect/apps/activate'

akeneo_connectivity_connection_connect_apps_authorize:
    path: '/connect/apps/authorize'

akeneo_connectivity_connection_connect_apps_authenticate:
    path: '/connect/apps/authenticate'

## Error Management
akeneo_connectivity_connection_error_management_dashboard:
    path: '/connect/data-flows/business-errors'

akeneo_connectivity_connection_error_management_connection_monitoring:
    path: '/connect/connection-settings/{code}/monitoring'
    requirements:
        code: '[a-zA-Z0-9_]+'

## Audit
akeneo_connectivity_connection_audit_index:
    path: '/connect/data-flows'

akeneo_connectivity_connection_audit_any:
    path: '/connect/data-flows/{any}'
    requirements:
        any: .*

akeneo_connectivity_connection_redirect_audit:
    path: '/connection/dashboard'

## Webhook
akeneo_connectivity_connection_webhook_regenerate_secret:
    path: '/connect/connection-settings/{code}/event-subscription/regenerate-secret'
    requirements:
        code: '[a-zA-Z0-9_]+'

akeneo_connectivity_connection_webhook_edit:
    path: '/connect/connection-settings/{code}/event-subscription'
    requirements:
        code: '[a-zA-Z0-9_]+'

akeneo_connectivity_connection_webhook_event_logs:
    path: '/connect/connection-settings/{code}/event-logs'
    requirements:
        code: '[a-zA-Z0-9_]+'

## Settings
akeneo_connectivity_connection_settings_redirect:
    path: '/connections'

akeneo_connectivity_connection_settings_index:
    path: '/connect/connection-settings'

akeneo_connectivity_connection_settings_edit:
    path: '/connect/connection-settings/{code}/edit'
    requirements:
        code: '[a-zA-Z0-9_]+'

akeneo_connectivity_connection_settings_any:
    path: '/connect/connection-settings/{any}'
    requirements:
        any: .*

## Connected Apps
akeneo_connectivity_connection_connect_connected_apps:
    path: '/connect/connected-apps'

akeneo_connectivity_connection_connect_connected_apps_edit:
    path: '/connect/connected-apps/{connectionCode}'
    requirements:
        connectionCode: '[a-zA-Z0-9_-]+'

akeneo_connectivity_connection_connect_connected_apps_delete:
    path: '/connect/connected-apps/{connectionCode}/delete'
    requirements:
        connectionCode: '[a-zA-Z0-9_-]+'
