bigbuffet-rw/packages/pl-hooks/lib/normalizers/account.ts

11 lines
304 B
TypeScript
Raw Normal View History

import type { Account as BaseAccount } from 'pl-api';
const normalizeAccount = ({ moved, relationship, ...account }: BaseAccount) => ({
...account,
moved_id: moved?.id || null,
});
type Account = ReturnType<typeof normalizeAccount>;
export { normalizeAccount, type Account as NormalizedAccount };