Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 1 addition & 3 deletions packages/backend-core/src/api/resources/Props.ts
Original file line number Diff line number Diff line change
Expand Up @@ -134,6 +134,7 @@ export interface SMSMessageProps extends ClerkProps {
}

export interface UserProps extends ClerkProps {
externalId: Nullable<string>;
username: Nullable<string>;
firstName: Nullable<string>;
lastName: Nullable<string>;
Expand All @@ -144,9 +145,6 @@ export interface UserProps extends ClerkProps {
primaryPhoneNumberId: Nullable<string>;
passwordEnabled: boolean;
twoFactorEnabled: boolean;
// emailAddresses: EmailAddressProps[];
// phoneNumbers: PhoneNumberProps[];
// externalAccounts: GoogleAccountProps[];
publicMetadata: Record<string, unknown>;
privateMetadata: Record<string, unknown>;
unsafeMetadata: Record<string, unknown>;
Expand Down
1 change: 1 addition & 0 deletions packages/backend-core/src/api/resources/User.ts
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ export interface User extends UserPayload {}
export class User {
static attributes = [
'id',
'externalId',
'username',
'firstName',
'lastName',
Expand Down
2 changes: 2 additions & 0 deletions packages/clerk-js/src/core/resources/User.ts
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ export class User extends BaseResource implements UserResource {
pathRoot = '/me';

id = '';
externalId: string | null = null;
username: string | null = null;
emailAddresses: EmailAddressResource[] = [];
phoneNumbers: PhoneNumberResource[] = [];
Expand Down Expand Up @@ -170,6 +171,7 @@ export class User extends BaseResource implements UserResource {

protected fromJSON(data: UserJSON): this {
this.id = data.id;
this.externalId = data.external_id;
this.firstName = data.first_name;
this.lastName = data.last_name;
if (this.firstName && this.lastName) {
Expand Down
1 change: 1 addition & 0 deletions packages/types/src/json.ts
Original file line number Diff line number Diff line change
Expand Up @@ -153,6 +153,7 @@ export interface ExternalAccountJSON extends ClerkResourceJSON {
export interface UserJSON extends ClerkResourceJSON {
object: 'user';
id: string;
external_id: string;
primary_email_address_id: string;
primary_phone_number_id: string;
primary_web3_wallet_id: string;
Expand Down
1 change: 1 addition & 0 deletions packages/types/src/user.ts
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ declare global {

export interface UserResource extends ClerkResource {
id: string;
externalId: string | null;
primaryEmailAddressId: string | null;
primaryEmailAddress: EmailAddressResource | null;
primaryPhoneNumberId: string | null;
Expand Down