-
Notifications
You must be signed in to change notification settings - Fork 318
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?
Changes from 2 commits
4fc2842
ff94083
d9766ec
d66f110
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
--- | ||
'@clerk/backend': patch | ||
--- | ||
|
||
Added WaitlistEntryJSON and updated WebhookEvent to include WaitlistEntry | ||
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -34,6 +34,7 @@ export const ObjectType = { | |
SignUpAttempt: 'sign_up_attempt', | ||
SmsMessage: 'sms_message', | ||
User: 'user', | ||
WaitlistEntry: 'waitlist_entry', | ||
Web3Wallet: 'web3_wallet', | ||
Token: 'token', | ||
TotalCount: 'total_count', | ||
|
@@ -382,6 +383,16 @@ export interface VerificationJSON extends ClerkResourceJSON { | |
message?: string | null; | ||
} | ||
|
||
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 commentThe reason will be displayed to describe this comment to others. Learn more. Hey @mackenzienolan, We should add also the There was a problem hiding this comment. Choose a reason for hiding this commentThe 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. |
||
|
||
export interface Web3WalletJSON extends ClerkResourceJSON { | ||
object: typeof ObjectType.Web3Wallet; | ||
web3_wallet: string; | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -10,6 +10,7 @@ import type { | |
SessionJSON, | ||
SMSMessageJSON, | ||
UserJSON, | ||
WaitlistEntryJSON, | ||
} from './JSON'; | ||
|
||
type Webhook<EvtType, Data> = { type: EvtType; object: 'event'; data: Data }; | ||
|
@@ -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 commentThe reason will be displayed to describe this comment to others. Learn more. Hey @mackenzienolan,
|
||
|
||
export type WebhookEvent = | ||
| UserWebhookEvent | ||
| SessionWebhookEvent | ||
|
@@ -62,6 +65,7 @@ export type WebhookEvent = | |
| OrganizationMembershipWebhookEvent | ||
| OrganizationInvitationWebhookEvent | ||
| RoleWebhookEvent | ||
| PermissionWebhookEvent; | ||
| PermissionWebhookEvent | ||
| WaitlistEntryWebhookEvent; | ||
|
||
export type WebhookEventType = WebhookEvent['type']; |
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.