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

@@ -0,0 +1,37 @@
---
version: 2
interactions:
- id: 0
request:
proto: HTTP/1.1
proto_major: 1
proto_minor: 1
content_length: 0
host: api.sendgrid.com
form:
limit:
- "500"
offset:
- "0"
headers:
Accept:
- application/json
url: https://api.sendgrid.com/v3/teammates?limit=500&offset=0
method: GET
response:
proto: HTTP/2.0
proto_major: 2
proto_minor: 0
content_length: -1
uncompressed: true
body: '{"result":[{"username":"owner-user","email":"owner@example.com","first_name":"Olivia","last_name":"Owner","user_type":"owner","is_admin":true},{"username":"admin-user","email":"admin@example.com","first_name":"","last_name":"","user_type":"admin","is_admin":true},{"username":"teammate-user","email":"teammate@example.com","first_name":"Taylor","last_name":"Teammate","user_type":"teammate","is_admin":false},{"username":"missing-email","email":"","first_name":"Missing","last_name":"Email","user_type":"teammate","is_admin":false}]}'
headers:
Content-Type:
- application/json
Date:
- Fri, 29 May 2026 06:52:00 GMT
Server:
- nginx
status: 200 OK
code: 200
duration: 18ms