fix(12): CR-01 remove extraneous providerType from postSetupCredential wire body

The server's credentialSchema does not declare providerType; it was being
silently stripped by Zod. Remove it from the request body and add a
contract test suite asserting the exact wire keys sent, mirroring the
existing BUG-1 tests for postSetupConfig.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
Lucas Berger
2026-06-15 16:14:18 -04:00
co-authored by Claude Sonnet 4.6
parent ef3e9810a9
commit 066b69f2be
2 changed files with 56 additions and 2 deletions
+1 -1
View File
@@ -671,9 +671,9 @@ export async function postSetupCredential(payload: SetupCredentialPayload): Prom
method: 'POST',
headers: { 'Content-Type': 'application/json' },
body: JSON.stringify({
providerType: 'caldav',
fastmailEmail: payload.fastmailEmail,
appPassword: payload.appPassword,
// providerType omitted — not in credentialSchema; server hard-codes 'caldav'
}),
});