IAV-584/feat(agent-wizard): add check integration exists by platform ID endpoint
Summary
Adds a new endpoint to detect duplicate integrations before creation, by resolving the platform account ID directly from raw credential data.
Changes
-
Controller — new
POSThandlercheckIntegrationExistsByPlatformIdinAgentWizardController, secured byx-user-uidheader -
Service — new method
checkIntegrationExistsByPlatformId(userUid, request)inAgentIntegrationServicethat:- Extracts the platform account ID from
credentialData+credentialType - Checks whether an integration with that platform ID already exists for the user
- Returns a
Boolean
- Extracts the platform account ID from
Why
Prevents duplicate integrations from being created by giving the frontend a lightweight pre-check before hitting the full creation flow.