chore: copy helper functions from admin and space into @plane/utils (#6256)

* chore: copy helper functions from space to @plane/utils

Co-Authored-By: sriram@plane.so <sriram@plane.so>

* refactor: move enums from utils/auth.ts to @plane/constants/auth.ts

Co-Authored-By: sriram@plane.so <sriram@plane.so>

---------

Co-authored-by: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
Co-authored-by: sriram@plane.so <sriram@plane.so>
This commit is contained in:
devin-ai-integration[bot] 2024-12-23 14:30:13 +05:30 committed by GitHub
parent 043f4eaa5e
commit 9f5def3a6a
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
11 changed files with 651 additions and 3 deletions

View file

@ -39,6 +39,14 @@ export enum EAuthPageTypes {
AUTHENTICATED = "AUTHENTICATED",
}
export enum EPageTypes {
INIT = "INIT",
PUBLIC = "PUBLIC",
NON_AUTHENTICATED = "NON_AUTHENTICATED",
ONBOARDING = "ONBOARDING",
AUTHENTICATED = "AUTHENTICATED",
}
export enum EAuthModes {
SIGN_IN = "SIGN_IN",
SIGN_UP = "SIGN_UP",
@ -50,9 +58,9 @@ export enum EAuthSteps {
UNIQUE_CODE = "UNIQUE_CODE",
}
// TODO: remove this
export enum EErrorAlertType {
BANNER_ALERT = "BANNER_ALERT",
TOAST_ALERT = "TOAST_ALERT",
INLINE_FIRST_NAME = "INLINE_FIRST_NAME",
INLINE_EMAIL = "INLINE_EMAIL",
INLINE_PASSWORD = "INLINE_PASSWORD",
@ -127,7 +135,7 @@ export enum EAuthErrorCodes {
INCORRECT_OLD_PASSWORD = "5135",
MISSING_PASSWORD = "5138",
INVALID_NEW_PASSWORD = "5140",
// set passowrd
// set password
PASSWORD_ALREADY_SET = "5145",
// Admin
ADMIN_ALREADY_EXIST = "5150",