Uh oh!
There was an error while loading. Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork 470
feat(clerk-js,types): Add support for additional fields for SignUp#6716
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
Uh oh!
There was an error while loading. Please reload this page.
Changes from all commits
9fb061dad91d878050f86472af4ab5e07d495b78e2e9217b0aa09a905a4a29dFile filter
Filter by extension
Conversations
Uh oh!
There was an error while loading. Please reload this page.
Jump to
Uh oh!
There was an error while loading. Please reload this page.
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,6 @@ | ||
| --- | ||
| '@clerk/clerk-js': minor | ||
| '@clerk/types': minor | ||
| --- | ||
| [Experimental] Add support for additional params for SignUp |
| Original file line number | Diff line number | Diff line change | ||||
|---|---|---|---|---|---|---|
| @@ -2,21 +2,32 @@ import type { SetActiveNavigate } from './clerk'; | ||||||
| import type { PhoneCodeChannel } from './phoneCodeChannel'; | ||||||
| import type { SignUpIdentificationField, SignUpStatus } from './signUpCommon'; | ||||||
| export interface SignUpFutureCreateParams { | ||||||
| interface SignUpFutureAdditionalParams { | ||||||
| firstName?: string; | ||||||
| lastName?: string; | ||||||
| unsafeMetadata?: SignUpUnsafeMetadata; | ||||||
| legalAccepted?: boolean; | ||||||
| } | ||||||
| export interface SignUpFutureCreateParams extends SignUpFutureAdditionalParams { | ||||||
| transfer?: boolean; | ||||||
| } | ||||||
| // This will likely get more properties | ||||||
| // eslint-disable-next-line @typescript-eslint/no-empty-object-type | ||||||
| export interface SignUpFutureUpdateParams extends SignUpFutureAdditionalParams {} | ||||||
Contributor 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. Fix ESLint error: avoid empty interface.
Apply: -export interface SignUpFutureUpdateParams extends SignUpFutureAdditionalParams {}+export type SignUpFutureUpdateParams = SignUpFutureAdditionalParams;📝 Committable suggestion
Suggested change
🧰 Tools🪛 ESLint[error] 16-16: An interface declaring no members is equivalent to its supertype. (@typescript-eslint/no-empty-object-type) 🤖 Prompt for AI Agents | ||||||
| export interface SignUpFutureEmailCodeVerifyParams { | ||||||
| code: string; | ||||||
| } | ||||||
| export type SignUpFuturePasswordParams = { | ||||||
| export type SignUpFuturePasswordParams = SignUpFutureAdditionalParams & { | ||||||
| password: string; | ||||||
| } & ( | ||||||
| | { emailAddress: string; phoneNumber?: string; username?: string } | ||||||
| | { emailAddress?: string; phoneNumber: string; username?: string } | ||||||
| | { emailAddress?: string; phoneNumber?: string; username: string } | ||||||
| ); | ||||||
| | { emailAddress: string; phoneNumber?: string; username?: string } | ||||||
| | { emailAddress?: string; phoneNumber: string; username?: string } | ||||||
| | { emailAddress?: string; phoneNumber?: string; username: string } | ||||||
| ); | ||||||
| export interface SignUpFuturePhoneCodeSendParams { | ||||||
| phoneNumber?: string; | ||||||
| @@ -67,6 +78,8 @@ export interface SignUpFutureResource { | ||||||
| create: (params: SignUpFutureCreateParams) => Promise<{ error: unknown }>; | ||||||
| update: (params: SignUpFutureUpdateParams) => Promise<{ error: unknown }>; | ||||||
| /** | ||||||
| * | ||||||
| */ | ||||||
Uh oh!
There was an error while loading. Please reload this page.
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.
Good thinking keeping this internal for now. I think we might want to consolidate the future + current params at some point so we don't have duplicate definitions. Not sure how this will look like yet, so lets keep what we can private ✔️