From 90710579ba1c12060877f6ec2d26103f9c31058d Mon Sep 17 00:00:00 2001 From: Rafi Zadanly Date: Mon, 23 Oct 2023 17:11:33 +0700 Subject: Refactor and migrate register page --- src-migrate/common/types/auth.ts | 32 ++++++++++++++++++++++++++++++++ 1 file changed, 32 insertions(+) create mode 100644 src-migrate/common/types/auth.ts (limited to 'src-migrate/common/types/auth.ts') diff --git a/src-migrate/common/types/auth.ts b/src-migrate/common/types/auth.ts new file mode 100644 index 00000000..63fac6e0 --- /dev/null +++ b/src-migrate/common/types/auth.ts @@ -0,0 +1,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'; + }; +}; -- cgit v1.2.3