Repository navigation
feat(backend): Add directory group webhook event types - #10378
mauricioabreu wants to merge 1 commit into
Conversation
🦋 Changeset detectedLatest commit: 5452ee4 The changes in this PR will be included in the next version bump. This PR includes changesets to release 11 packages
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info
📝 Walkthrough
Merge Risk: ⚪ Minimal · up to
|
@clerk/astro
@clerk/backend
@clerk/chrome-extension
@clerk/clerk-js
@clerk/electron
@clerk/electron-passkeys
@clerk/eslint-plugin
@clerk/expo
@clerk/expo-biometrics
@clerk/expo-google-signin
@clerk/expo-native-components
@clerk/expo-passkeys
@clerk/express
@clerk/fastify
@clerk/hono
@clerk/localizations
@clerk/mosaic
@clerk/nextjs
@clerk/nuxt
@clerk/react
@clerk/react-router
@clerk/shared
@clerk/tanstack-react-start
@clerk/testing
@clerk/ui
@clerk/upgrade
@clerk/vue
commit: |
The directoryGroup.* and directoryGroupMembership.* events Directory Sync sends are now in the public webhook reference, but verifyWebhook() could not narrow them because WebhookEvent had no members for them. The membership payload declares an optional id it never sets, so event.data.id keeps its type across the union.
59d2b69 to
5452ee4
Compare
API Changes Report
Summary
@clerk/backendCurrent version: 3.26.1 Subpath
|
Description
Directory Sync sends
directoryGroup.created,.updated,.deletedanddirectoryGroupMembership.created,.deleted, butWebhookEventhas no members for them, soverifyWebhook()cannot narrow them and handlers have to cast the payload.Adds
DirectoryGroupWebhookEventandDirectoryGroupMembershipWebhookEventto the union, with their payload types. The deleted membership carriescause(group_deletedormember_removed). The membership payload has noid, so it declaresid?: neverto keepevent.data.idtyped asstring | undefinedacross the union, which an existing type test guards.Checklist
pnpm testruns as expected.pnpm buildruns as expected.Type of change