123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698 |
- export const INVALID_EMAIL = 'invalid/email' as const;
- export const EMAIL_FAILED = 'email/failed' as const;
- export const DUPLICATE_EMAIL = 'email/both_emails_cannot_be_same' as const;
- /**
- * Only one admin account found in infra
- * (AdminService)
- */
- export const ONLY_ONE_ADMIN_ACCOUNT =
- 'admin/only_one_admin_account_found' as const;
- /**
- * Token Authorization failed (Check 'Authorization' Header)
- * (GqlAuthGuard)
- */
- export const AUTH_FAIL = 'auth/fail';
- /**
- * Invalid JSON
- * (Utils)
- */
- export const JSON_INVALID = 'json_invalid';
- /**
- * Auth Provider not specified
- * (Auth)
- */
- export const AUTH_PROVIDER_NOT_SPECIFIED = 'auth/provider_not_specified';
- /**
- * Auth Provider not specified
- * (Auth)
- */
- export const AUTH_PROVIDER_NOT_CONFIGURED =
- 'auth/provider_not_configured_correctly';
- /**
- * Environment variable "VITE_ALLOWED_AUTH_PROVIDERS" is not present in .env file
- */
- export const ENV_NOT_FOUND_KEY_AUTH_PROVIDERS =
- '"VITE_ALLOWED_AUTH_PROVIDERS" is not present in .env file';
- /**
- * Environment variable "VITE_ALLOWED_AUTH_PROVIDERS" is empty in .env file
- */
- export const ENV_EMPTY_AUTH_PROVIDERS =
- '"VITE_ALLOWED_AUTH_PROVIDERS" is empty in .env file';
- /**
- * Environment variable "VITE_ALLOWED_AUTH_PROVIDERS" contains unsupported provider in .env file
- */
- export const ENV_NOT_SUPPORT_AUTH_PROVIDERS =
- '"VITE_ALLOWED_AUTH_PROVIDERS" contains an unsupported auth provider in .env file';
- /**
- * Tried to delete a user data document from fb firestore but failed.
- * (FirebaseService)
- */
- export const USER_FB_DOCUMENT_DELETION_FAILED =
- 'fb/firebase_document_deletion_failed' as const;
- /**
- * Tried to do an action on a user where user is not found
- */
- export const USER_NOT_FOUND = 'user/not_found' as const;
- /**
- * User is already invited by admin
- */
- export const USER_ALREADY_INVITED = 'admin/user_already_invited' as const;
- /**
- * User update failure
- * (UserService)
- */
- export const USER_UPDATE_FAILED = 'user/update_failed' as const;
- /**
- * User deletion failure
- * (UserService)
- */
- export const USER_DELETION_FAILED = 'user/deletion_failed' as const;
- /**
- * Users not found
- * (UserService)
- */
- export const USERS_NOT_FOUND = 'user/users_not_found' as const;
- /**
- * User deletion failure error due to user being a team owner
- * (UserService)
- */
- export const USER_IS_OWNER = 'user/is_owner' as const;
- /**
- * User deletion failure error due to user being an admin
- * (UserService)
- */
- export const USER_IS_ADMIN = 'user/is_admin' as const;
- /**
- * Teams not found
- * (TeamsService)
- */
- export const TEAMS_NOT_FOUND = 'user/teams_not_found' as const;
- /**
- * Tried to find user collection but failed
- * (UserRequestService)
- */
- export const USER_COLLECTION_NOT_FOUND = 'user_collection/not_found' as const;
- /**
- * Tried to reorder user request but failed
- * (UserRequestService)
- */
- export const USER_REQUEST_CREATION_FAILED =
- 'user_request/creation_failed' as const;
- /**
- * Tried to do an action on a user request but user request is not matched with user collection
- * (UserRequestService)
- */
- export const USER_REQUEST_INVALID_TYPE = 'user_request/type_mismatch' as const;
- /**
- * Tried to do an action on a user request where user request is not found
- * (UserRequestService)
- */
- export const USER_REQUEST_NOT_FOUND = 'user_request/not_found' as const;
- /**
- * Tried to reorder user request but failed
- * (UserRequestService)
- */
- export const USER_REQUEST_REORDERING_FAILED =
- 'user_request/reordering_failed' as const;
- /**
- * Tried to perform action on a team which they are not a member of
- * (GqlTeamMemberGuard)
- */
- export const TEAM_MEMBER_NOT_FOUND = 'team/member_not_found' as const;
- /**
- * Tried to perform action on a team that doesn't accept their member role level
- * (GqlTeamMemberGuard)
- */
- export const TEAM_NOT_REQUIRED_ROLE = 'team/not_required_role' as const;
- /**
- * Team name validation failure
- * (TeamService)
- */
- export const TEAM_NAME_INVALID = 'team/name_invalid';
- /**
- * Couldn't find the sync data from the user
- * (TeamCollectionService)
- */
- export const TEAM_USER_NO_FB_SYNCDATA = 'team/user_no_fb_syncdata';
- /**
- * There was a problem resolving the firebase collection path
- * (TeamCollectionService)
- */
- export const TEAM_FB_COLL_PATH_RESOLVE_FAIL = 'team/fb_coll_path_resolve_fail';
- /**
- * Could not find the team in the database
- * (TeamCollectionService)
- */
- export const TEAM_COLL_NOT_FOUND = 'team_coll/collection_not_found';
- /**
- * Cannot make parent collection a child of a collection that a child of itself
- * (TeamCollectionService)
- */
- export const TEAM_COLL_IS_PARENT_COLL = 'team_coll/collection_is_parent_coll';
- /**
- * Target and Parent collections are not from the same team
- * (TeamCollectionService)
- */
- export const TEAM_COLL_NOT_SAME_TEAM = 'team_coll/collections_not_same_team';
- /**
- * Target and Parent collections are the same
- * (TeamCollectionService)
- */
- export const TEAM_COLL_DEST_SAME =
- 'team_coll/target_and_destination_collection_are_same';
- /**
- * Collection is already a root collection
- * (TeamCollectionService)
- */
- export const TEAM_COL_ALREADY_ROOT =
- 'team_coll/target_collection_is_already_root_collection';
- /**
- * Collections have different parents
- * (TeamCollectionService)
- */
- export const TEAM_COL_NOT_SAME_PARENT =
- 'team_coll/team_collections_have_different_parents';
- /**
- * Collection and next Collection are the same
- * (TeamCollectionService)
- */
- export const TEAM_COL_SAME_NEXT_COLL =
- 'team_coll/collection_and_next_collection_are_same';
- /**
- * Team Collection Re-Ordering Failed
- * (TeamCollectionService)
- */
- export const TEAM_COL_REORDERING_FAILED = 'team_coll/reordering_failed';
- /**
- * Tried to update the team to a state it doesn't have any owners
- * (TeamService)
- */
- export const TEAM_ONLY_ONE_OWNER = 'team/only_one_owner';
- /**
- * Invalid or non-existent Team ID
- * (TeamService)
- */
- export const TEAM_INVALID_ID = 'team/invalid_id' as const;
- /**
- * Invalid or non-existent collection id
- * (GqlCollectionTeamMemberGuard)
- */
- export const TEAM_INVALID_COLL_ID = 'team/invalid_coll_id' as const;
- /**
- * Invalid team id or user id
- * (TeamService)
- */
- export const TEAM_INVALID_ID_OR_USER = 'team/invalid_id_or_user';
- /**
- * The provided title for the team collection is short (less than 3 characters)
- * (TeamCollectionService)
- */
- export const TEAM_COLL_SHORT_TITLE = 'team_coll/short_title';
- /**
- * The JSON used is not valid
- * (TeamCollectionService)
- */
- export const TEAM_COLL_INVALID_JSON = 'team_coll/invalid_json';
- /**
- * The Team Collection does not belong to the team
- * (TeamCollectionService)
- */
- export const TEAM_NOT_OWNER = 'team_coll/team_not_owner' as const;
- /**
- * The Team Collection data is not valid
- * (TeamCollectionService)
- */
- export const TEAM_COLL_DATA_INVALID =
- 'team_coll/team_coll_data_invalid' as const;
- /**
- * Tried to perform an action on a request that doesn't accept their member role level
- * (GqlRequestTeamMemberGuard)
- */
- export const TEAM_REQ_NOT_REQUIRED_ROLE = 'team_req/not_required_role';
- /**
- * Tried to operate on a request which does not exist
- * (TeamRequestService)
- */
- export const TEAM_REQ_NOT_FOUND = 'team_req/not_found' as const;
- /**
- * Invalid or non-existent collection id
- * (TeamRequestService)
- */
- export const TEAM_REQ_INVALID_TARGET_COLL_ID =
- 'team_req/invalid_target_id' as const;
- /**
- * Tried to reorder team request but failed
- * (TeamRequestService)
- */
- export const TEAM_REQ_REORDERING_FAILED = 'team_req/reordering_failed' as const;
- /**
- * No Postmark Sender Email defined
- * (AuthService)
- */
- export const SENDER_EMAIL_INVALID = 'mailer/sender_email_invalid' as const;
- /**
- * Tried to perform an action on a request when the user is not even a member of the team
- * (GqlRequestTeamMemberGuard, GqlCollectionTeamMemberGuard)
- */
- export const TEAM_REQ_NOT_MEMBER = 'team_req/not_member';
- export const TEAM_INVITE_MEMBER_HAS_INVITE =
- 'team_invite/member_has_invite' as const;
- export const TEAM_INVITE_NO_INVITE_FOUND =
- 'team_invite/no_invite_found' as const;
- export const TEAM_INVITE_ALREADY_MEMBER = 'team_invite/already_member' as const;
- export const TEAM_INVITE_EMAIL_DO_NOT_MATCH =
- 'team_invite/email_do_not_match' as const;
- export const TEAM_INVITE_NOT_VALID_VIEWER =
- 'team_invite/not_valid_viewer' as const;
- /**
- * No team invitations found
- * (TeamInvitationService)
- */
- export const TEAM_INVITATION_NOT_FOUND =
- 'team_invite/invitations_not_found' as const;
- /**
- * ShortCode not found in DB
- * (ShortcodeService)
- */
- export const SHORTCODE_NOT_FOUND = 'shortcode/not_found' as const;
- /**
- * Invalid or non-existent TEAM ENVIRONMENT ID
- * (TeamEnvironmentsService)
- */
- export const TEAM_ENVIRONMENT_NOT_FOUND = 'team_environment/not_found' as const;
- /**
- * Invalid TEAM ENVIRONMENT name
- * (TeamEnvironmentsService)
- */
- export const TEAM_ENVIRONMENT_SHORT_NAME =
- 'team_environment/short_name' as const;
- /**
- * The user is not a member of the team of the given environment
- * (GqlTeamEnvTeamGuard)
- */
- export const TEAM_ENVIRONMENT_NOT_TEAM_MEMBER =
- 'team_environment/not_team_member' as const;
- /**
- * User setting not found for a user
- * (UserSettingsService)
- */
- export const USER_SETTINGS_NOT_FOUND = 'user_settings/not_found' as const;
- /**
- * User setting already exists for a user
- * (UserSettingsService)
- */
- export const USER_SETTINGS_ALREADY_EXISTS =
- 'user_settings/settings_already_exists' as const;
- /**
- * User setting invalid (null) settings
- * (UserSettingsService)
- */
- export const USER_SETTINGS_NULL_SETTINGS =
- 'user_settings/null_settings' as const;
- /*
- * Global environment doesn't exist for the user
- * (UserEnvironmentsService)
- */
- export const USER_ENVIRONMENT_GLOBAL_ENV_DOES_NOT_EXISTS =
- 'user_environment/global_env_does_not_exists' as const;
- /**
- * Global environment already exists for the user
- * (UserEnvironmentsService)
- */
- export const USER_ENVIRONMENT_GLOBAL_ENV_EXISTS =
- 'user_environment/global_env_already_exists' as const;
- /*
- /**
- * User environment doesn't exist for the user
- * (UserEnvironmentsService)
- */
- export const USER_ENVIRONMENT_ENV_DOES_NOT_EXISTS =
- 'user_environment/user_env_does_not_exists' as const;
- /*
- /**
- * Cannot delete the global user environment
- * (UserEnvironmentsService)
- */
- export const USER_ENVIRONMENT_GLOBAL_ENV_DELETION_FAILED =
- 'user_environment/user_env_global_env_deletion_failed' as const;
- /*
- /**
- * User environment is not a global environment
- * (UserEnvironmentsService)
- */
- export const USER_ENVIRONMENT_IS_NOT_GLOBAL =
- 'user_environment/user_env_is_not_global' as const;
- /*
- /**
- * User environment update failed
- * (UserEnvironmentsService)
- */
- export const USER_ENVIRONMENT_UPDATE_FAILED =
- 'user_environment/user_env_update_failed' as const;
- /*
- /**
- * User environment invalid environment name
- * (UserEnvironmentsService)
- */
- export const USER_ENVIRONMENT_INVALID_ENVIRONMENT_NAME =
- 'user_environment/user_env_invalid_env_name' as const;
- /*
- /**
- * User history not found
- * (UserHistoryService)
- */
- export const USER_HISTORY_NOT_FOUND = 'user_history/history_not_found' as const;
- /*
- /**
- * Invalid Request Type in History
- * (UserHistoryService)
- */
- export const USER_HISTORY_INVALID_REQ_TYPE =
- 'user_history/req_type_invalid' as const;
- /*
- |------------------------------------|
- |Server errors that are actually bugs|
- |------------------------------------|
- */
- /**
- * Couldn't find user data from the GraphQL context (Check if GqlAuthGuard is applied)
- * (GqlTeamMemberGuard, GqlCollectionTeamMemberGuard)
- */
- export const BUG_AUTH_NO_USER_CTX = 'bug/auth/auth_no_user_ctx' as const;
- /**
- * Couldn't find teamID parameter in the attached GraphQL operation. (Check if teamID is present)
- * (GqlTeamMemberGuard, GQLEAAdminGuard, GqlCollectionTeamMemberGuard)
- */
- export const BUG_TEAM_NO_TEAM_ID = 'bug/team/no_team_id';
- /**
- * Couldn't find RequireTeamRole decorator. (Check if it is applied)
- * (GqlTeamMemberGuard)
- */
- export const BUG_TEAM_NO_REQUIRE_TEAM_ROLE = 'bug/team/no_require_team_role';
- /**
- * Couldn't find 'collectionID' param to the attached GQL operation. (Check if exists)
- * (GqlCollectionTeamMemberGuard)
- */
- export const BUG_TEAM_COLL_NO_COLL_ID = 'bug/team_coll/no_coll_id';
- /**
- * Couldn't find 'requestID' param to the attached GQL operation. (Check if exists)
- * (GqlRequestTeamMemberGuard)
- */
- export const BUG_TEAM_REQ_NO_REQ_ID = 'bug/team_req/no_req_id';
- export const BUG_TEAM_INVITE_NO_INVITE_ID =
- 'bug/team_invite/no_invite_id' as const;
- /**
- * Couldn't find RequireTeamRole decorator. (Check if it is applied)
- * (GqlTeamEnvTeamGuard)
- */
- export const BUG_TEAM_ENV_GUARD_NO_REQUIRE_ROLES =
- 'bug/team_env/guard_no_require_roles' as const;
- /**
- * Couldn't find 'id' param to the operation. (Check if it is applied)
- * (GqlTeamEnvTeamGuard)
- */
- export const BUG_TEAM_ENV_GUARD_NO_ENV_ID =
- 'bug/team_env/guard_no_env_id' as const;
- /**
- * The data sent to the verify route are invalid
- * (AuthService)
- */
- export const INVALID_MAGIC_LINK_DATA = 'auth/magic_link_invalid_data' as const;
- /**
- * Could not find VerificationToken entry in the db
- * (AuthService)
- */
- export const VERIFICATION_TOKEN_DATA_NOT_FOUND =
- 'auth/verification_token_data_not_found' as const;
- /**
- * Auth Tokens expired
- * (AuthService)
- */
- export const TOKEN_EXPIRED = 'auth/token_expired' as const;
- /**
- * VerificationToken Tokens expired i.e. magic-link expired
- * (AuthService)
- */
- export const MAGIC_LINK_EXPIRED = 'auth/magic_link_expired' as const;
- /**
- * No cookies were found in the auth request
- * (AuthService)
- */
- export const COOKIES_NOT_FOUND = 'auth/cookies_not_found' as const;
- /**
- * Access Token is malformed or invalid
- * (AuthService)
- */
- export const INVALID_ACCESS_TOKEN = 'auth/invalid_access_token' as const;
- /**
- * Refresh Token is malformed or invalid
- * (AuthService)
- */
- export const INVALID_REFRESH_TOKEN = 'auth/invalid_refresh_token' as const;
- /**
- * The provided title for the user collection is short (less than 3 characters)
- * (UserCollectionService)
- */
- export const USER_COLL_SHORT_TITLE = 'user_coll/short_title' as const;
- /**
- * User Collection could not be found
- * (UserCollectionService)
- */
- export const USER_COLL_NOT_FOUND = 'user_coll/not_found' as const;
- /**
- * UserCollection is already a root collection
- * (UserCollectionService)
- */
- export const USER_COLL_ALREADY_ROOT =
- 'user_coll/target_user_collection_is_already_root_user_collection' as const;
- /**
- * Target and Parent user collections are the same
- * (UserCollectionService)
- */
- export const USER_COLL_DEST_SAME =
- 'user_coll/target_and_destination_user_collection_are_same' as const;
- /**
- * Target and Parent user collections are not from the same user
- * (UserCollectionService)
- */
- export const USER_COLL_NOT_SAME_USER = 'user_coll/not_same_user' as const;
- /**
- * Target and Parent user collections are not from the same type
- * (UserCollectionService)
- */
- export const USER_COLL_NOT_SAME_TYPE = 'user_coll/type_mismatch' as const;
- /**
- * Cannot make a parent user collection a child of itself
- * (UserCollectionService)
- */
- export const USER_COLL_IS_PARENT_COLL =
- 'user_coll/user_collection_is_parent_coll' as const;
- /**
- * User Collection Re-Ordering Failed
- * (UserCollectionService)
- */
- export const USER_COLL_REORDERING_FAILED =
- 'user_coll/reordering_failed' as const;
- /**
- * The Collection and Next User Collection are the same
- * (UserCollectionService)
- */
- export const USER_COLL_SAME_NEXT_COLL =
- 'user_coll/user_collection_and_next_user_collection_are_same' as const;
- /**
- * The User Collection data is not valid
- * (UserCollectionService)
- */
- export const USER_COLL_DATA_INVALID =
- 'user_coll/user_coll_data_invalid' as const;
- /**
- * The User Collection does not belong to the logged-in user
- * (UserCollectionService)
- */
- export const USER_NOT_OWNER = 'user_coll/user_not_owner' as const;
- /**
- * The JSON used is not valid
- * (UserCollectionService)
- */
- export const USER_COLL_INVALID_JSON = 'user_coll/invalid_json';
- /*
- * MAILER_SMTP_URL environment variable is not defined
- * (MailerModule)
- */
- export const MAILER_SMTP_URL_UNDEFINED = 'mailer/smtp_url_undefined' as const;
- /**
- * MAILER_ADDRESS_FROM environment variable is not defined
- * (MailerModule)
- */
- export const MAILER_FROM_ADDRESS_UNDEFINED =
- 'mailer/from_address_undefined' as const;
- /**
- * SharedRequest invalid request JSON format
- * (ShortcodeService)
- */
- export const SHORTCODE_INVALID_REQUEST_JSON =
- 'shortcode/request_invalid_format' as const;
- /**
- * SharedRequest invalid properties JSON format
- * (ShortcodeService)
- */
- export const SHORTCODE_INVALID_PROPERTIES_JSON =
- 'shortcode/properties_invalid_format' as const;
- /**
- * SharedRequest invalid properties not found
- * (ShortcodeService)
- */
- export const SHORTCODE_PROPERTIES_NOT_FOUND =
- 'shortcode/properties_not_found' as const;
- /**
- * Infra Config not found
- * (InfraConfigService)
- */
- export const INFRA_CONFIG_NOT_FOUND = 'infra_config/not_found' as const;
- /**
- * Infra Config update failed
- * (InfraConfigService)
- */
- export const INFRA_CONFIG_UPDATE_FAILED = 'infra_config/update_failed' as const;
- /**
- * Infra Config not listed for onModuleInit creation
- * (InfraConfigService)
- */
- export const INFRA_CONFIG_NOT_LISTED =
- 'infra_config/properly_not_listed' as const;
- /**
- * Infra Config reset failed
- * (InfraConfigService)
- */
- export const INFRA_CONFIG_RESET_FAILED = 'infra_config/reset_failed' as const;
- /**
- * Infra Config invalid input for Config variable
- * (InfraConfigService)
- */
- export const INFRA_CONFIG_INVALID_INPUT = 'infra_config/invalid_input' as const;
- /**
- * Infra Config service (auth provider/mailer/audit logs) not configured
- * (InfraConfigService)
- */
- export const INFRA_CONFIG_SERVICE_NOT_CONFIGURED =
- 'infra_config/service_not_configured' as const;
- /**
- * Error message for when the database table does not exist
- * (InfraConfigService)
- */
- export const DATABASE_TABLE_NOT_EXIST =
- 'Database migration not found. Please check the documentation for assistance: https://docs.hoppscotch.io/documentation/self-host/community-edition/install-and-build#running-migrations';
|