diff options
| author | Rafi Zadanly <zadanlyr@gmail.com> | 2023-10-30 09:21:30 +0700 |
|---|---|---|
| committer | Rafi Zadanly <zadanlyr@gmail.com> | 2023-10-30 09:21:30 +0700 |
| commit | e8c414325a1e32474e740cc6e7dca8396affc5e3 (patch) | |
| tree | e84feb31cd8619d208b4558c5fcf30becc5337e0 /src-migrate/common/types/auth.ts | |
| parent | 1694c12f75ad06c5e40d6f9a66e245c3e683146c (diff) | |
| parent | c82110f7d3a2f85de99045fde7b579e369f15b2c (diff) | |
Merge branch 'refactor/all' into development
Diffstat (limited to 'src-migrate/common/types/auth.ts')
| -rw-r--r-- | src-migrate/common/types/auth.ts | 62 |
1 files changed, 62 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..ca7b562a --- /dev/null +++ b/src-migrate/common/types/auth.ts @@ -0,0 +1,62 @@ +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; + phone: string; +}; + +export type RegisterResApiProps = { + register: boolean; + reason: 'EMAIL_USED' | 'NOT_ACTIVE' | null; +}; + +type ActivationResProps = { + activation: boolean; + user: AuthProps | null; +}; + +export type ActivationTokenProps = { + token: string; +}; + +export type ActivationTokenResApiProps = ActivationResProps & { + reason: 'INVALID_TOKEN' | null; +}; + +export type ActivationOtpProps = { + email: string; + otp: string; +}; + +export type ActivationOtpResApiProps = ActivationResProps & { + reason: 'INVALID_OTP' | null; +}; + +export type ActivationReqProps = { + email: string; +}; + +export type ActivationReqResApiProps = { + activation_request: boolean; + reason: 'NOT_FOUND' | 'ACTIVE' | null; +}; |
