Skip to content

[Bug]: Clearing a users MobilePhone field appears impossible in the TypeScript Client #3334

@rod-martens-alida

Description

@rod-martens-alida

What happened?

Patching the User record with a null mobilePhone like so

  --url https://alida-stage.fusionauth.io/api/user/618d8d81-4d8c-413e-98d5-ad26013add3b \
  --header 'authorization: <apikey>' \
  --header 'content-type: application/json' \
  --header 'x-fusionauth-tenantid: 660c4985-c328-361f-f3e1-0e808e152c2e' \
  --data '{
  "user": {
    "mobilePhone": null
  }
}'``` clears the field.  
However the User definition here https://github.com/FusionAuth/fusionauth-typescript-client/blob/develop/src/FusionAuthClient.ts#L12207 
Only allows undefined (which doesn't modify) or a valid phone number.

### Version

1.61.2

### Affects Versions

_No response_

### Alternatives / Workarounds

separate by PATCH for a null `mobilePhone` using `fetch`

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions