summaryrefslogtreecommitdiff
path: root/src-migrate/common/types/auth.ts
diff options
context:
space:
mode:
Diffstat (limited to 'src-migrate/common/types/auth.ts')
-rw-r--r--src-migrate/common/types/auth.ts32
1 files changed, 32 insertions, 0 deletions
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';
+ };
+};