AssistantId is not possible to remove from PhoneNumber by parameter undefined, there is a missing type null
Closed this issue · 2 comments
jurkix commented
It is not possible to remove the assistantId from the PhoneNumber by setting it to undefined because the null type is missing. In UpdateTwilioPhoneNumberDto, you need to change the type from:
assistantId?: string;
to:
assistantId?: string | null;
This is necessary because setting it to null will remove the assistantId from the PhoneNumber, whereas setting it to undefined will leave it unchanged.
hackthehackerman commented
Hi @jurkix This should work
const number = await client.phoneNumbers.update(NUMBER_ID, {
assistantId: null,
squadId: SQUAD_ID
});
fern-support commented
@jurkix closing since @hackthehackerman has a suggestion that should work