IAV-256/feat: bulk UserIntegration lookup by UIDs + first AgentIntegration by UserIntegration
feat(integrations): add bulk user integration lookup and deterministic first-agent-integration retrieval
Adds two new read endpoints:
-
Bulk fetch —
GET /user-integrations/by-uids?uids=...to retrieve multiple user integrations in a single call instead of N individual requests. -
First by user integration —
GET /agent-integrations/user-integration/{uid}/firstto get the primary agent integration linked to a user integration. Selection is deterministic viaORDER BY createdAt ASC, replacing the previous arbitraryget(0)pattern.
Both endpoints follow the existing enrichment pattern (credential info + secondary credentials). No schema changes, no breaking changes.