2024-10-07 14:53:05 -07:00
|
|
|
import type { Account as BaseAccount } from 'pl-api';
|
|
|
|
|
2024-10-23 14:27:36 -07:00
|
|
|
const normalizeAccount = ({ moved, relationship, ...account }: BaseAccount) => ({
|
2024-10-12 15:15:58 -07:00
|
|
|
...account,
|
|
|
|
moved_id: moved?.id || null,
|
|
|
|
});
|
2024-10-07 14:53:05 -07:00
|
|
|
|
|
|
|
type Account = ReturnType<typeof normalizeAccount>;
|
|
|
|
|
2024-10-24 14:46:22 -07:00
|
|
|
export { normalizeAccount, type Account as NormalizedAccount };
|