summaryrefslogtreecommitdiff
path: root/src-migrate/common/types/auth.ts
blob: 63fac6e0daa1920ed4f54ea17648ebd57c70ebcd (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
import { OdooApiProps } from './odoo';

export type AuthProps = {
  id: number;
  parent_id: number;
  parent_name: string;
  partner_id: number;
  name: string;
  email: string;
  phone: string;
  mobile: string;
  external: boolean;
  company: boolean;
  pricelist: string | null;
  token: string;
};

export type AuthApiProps = OdooApiProps & { result: AuthProps };

export type RegisterProps = {
  name: string;
  email: string;
  password: string;
  company: string;
};

export type RegisterApiProps = OdooApiProps & {
  result: {
    register: boolean;
    reason?: 'EMAIL_USED';
  };
};