Add SendGrid access review driver

Implement a SendGrid access-review driver that fetches teammates
from the SendGrid API and maps them into AccountRecord values.

Register SendGrid as a connector provider, expose it through the
connector provider enum, and add a migration that extends the
connector_provider type with SENDGRID.

Cover the new driver with a VCR-backed fixture test and helper
tests for role and response-shape handling to keep parsing robust.

Signed-off-by: Cursor Agent <cursoragent@cursor.com>

Co-authored-by: Bryan FRIMIN <bryan@frimin.fr>
This commit is contained in:
Cursor Agent
2026-05-29 06:51:44 +00:00
committed by Aurélien Sibiril
parent fca7f2a1e6
commit 6556116601
8 changed files with 374 additions and 0 deletions

View File

@@ -41,6 +41,7 @@ const (
ConnectorProviderGitHub ConnectorProvider = "GITHUB"
ConnectorProviderIntercom ConnectorProvider = "INTERCOM"
ConnectorProviderResend ConnectorProvider = "RESEND"
ConnectorProviderSendGrid ConnectorProvider = "SENDGRID"
ConnectorProviderMicrosoft365 ConnectorProvider = "MICROSOFT_365"
ConnectorProviderGitLab ConnectorProvider = "GITLAB"
ConnectorProviderBitbucket ConnectorProvider = "BITBUCKET"
@@ -84,6 +85,7 @@ func ConnectorProviders() []ConnectorProvider {
ConnectorProviderGitHub,
ConnectorProviderIntercom,
ConnectorProviderResend,
ConnectorProviderSendGrid,
ConnectorProviderMicrosoft365,
ConnectorProviderGitLab,
ConnectorProviderBitbucket,
@@ -123,6 +125,7 @@ func (v ConnectorProvider) IsValid() bool {
ConnectorProviderGitHub,
ConnectorProviderIntercom,
ConnectorProviderResend,
ConnectorProviderSendGrid,
ConnectorProviderMicrosoft365,
ConnectorProviderGitLab,
ConnectorProviderBitbucket,

View File

@@ -0,0 +1,15 @@
-- Copyright (c) 2026 Probo Inc <hello@getprobo.com>.
--
-- Permission to use, copy, modify, and/or distribute this software for any
-- purpose with or without fee is hereby granted, provided that the above
-- copyright notice and this permission notice appear in all copies.
--
-- THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
-- REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
-- AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
-- INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
-- LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
-- OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
-- PERFORMANCE OF THIS SOFTWARE.
ALTER TYPE connector_provider ADD VALUE IF NOT EXISTS 'SENDGRID';