type WithSipUri = {
sipUri?: string | null;
hasSipUri?: boolean | null;
};
export const normalizeSipUriForPayload = <T extends WithSipUri>(
values: T,
): T => {
return {
...values,
sipUri: values.hasSipUri ? values.sipUri ?? '' : '',
} as T;
};
type WithSipUri = {
sipUri?: string | null;
hasSipUri?: boolean | null;
};
export const normalizeSipUriForPayload = <T extends WithSipUri>(
values: T,
): T => {
return {
...values,
sipUri: values.hasSipUri ? values.sipUri ?? '' : '',
} as T;
};