-
Notifications
You must be signed in to change notification settings - Fork 313
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
chore(backend): Added types to webhook json for waitlist entry #5148
base: main
Are you sure you want to change the base?
chore(backend): Added types to webhook json for waitlist entry #5148
Conversation
🦋 Changeset detectedLatest commit: d66f110 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 Git ↗︎
|
export interface WaitlistEntryJSON extends ClerkResourceJSON { | ||
created_at: number; | ||
email_address: string; | ||
id: string; | ||
invitation: InvitationJSON | null; | ||
object: typeof ObjectType.WaitlistEntry; | ||
status: string; | ||
updated_at: number; | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hey @mackenzienolan,
Thank you for the contribution 🤝
We should add also the is_locked: boolean
property because we return the same resource as we have in the Backend API
ref
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice catch! Added is_locked. Was checking the webhook catalog and didn't double check the api.
'@clerk/backend': patch | ||
--- | ||
|
||
Added WaitlistEntryJSON and updated WebhookEvent to include WaitlistEntry |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Added WaitlistEntryJSON and updated WebhookEvent to include WaitlistEntry | |
Add waitlist entry types | |
- `WaitlistEntryJSON` | |
- `WaitlistEntryWebhookEvent` | |
Update `WebhookEvent` to include `WaitlistEntryWebhookEvent` |
@@ -52,6 +53,8 @@ export type PermissionWebhookEvent = Webhook< | |||
PermissionJSON | |||
>; | |||
|
|||
export type WaitlistEntryWebhookEvent = Webhook<'waitlistEntry.created' | 'waitlistEntry.updated', WaitlistEntryJSON>; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hey @mackenzienolan,
can you include the WaitlistEntryWebhookEvent
in the webhooks export we have in packages/backend/src/api/resources/index.ts
? :)
export type {
EmailWebhookEvent,
OrganizationWebhookEvent,
OrganizationDomainWebhookEvent,
OrganizationInvitationWebhookEvent,
OrganizationMembershipWebhookEvent,
PermissionWebhookEvent,
RoleWebhookEvent,
SessionWebhookEvent,
SMSWebhookEvent,
UserWebhookEvent,
WebhookEvent,
WebhookEventType,
WaitlistEntryWebhookEvent,
} from './Webhooks';
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I had to block this one, because the PR got approved. Let's fix the minor issues we commented and it will be good to go.
Description
Added JSON types for WaitlistEntry for use with WebhookEvent
#5143
Checklist
pnpm test
runs as expected.pnpm build
runs as expected.Type of change