-
Notifications
You must be signed in to change notification settings - Fork 402
chore(backend): Added types to webhook json for waitlist entry #5148
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
Conversation
🦋 Changeset detectedLatest commit: 9f9b021 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.
| 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.
@nikospapcom added 👍
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.
|
The webhook types are also exported from the various platform-specific packages (eg |
…to backend index exports
@ijxy added for @clerk/nextjs, seemed like most other packages either did a barrel export or didn't export other specific webhook types but just the generic But if you have any that I missed let me know |
Co-authored-by: panteliselef <panteliselef@outlook.com>
Description
Added JSON types for WaitlistEntry for use with WebhookEvent
#5143
Checklist
pnpm testruns as expected.pnpm buildruns as expected.Type of change