@cranberry-money/shared-constants
Version:
Shared constants for Blueberry platform
35 lines • 1.71 kB
JavaScript
export const USER_PREFERENCES_VALIDATION = {
MAX_FAVORITE_ACCOUNTS: 1,
MAX_FAVORITE_PORTFOLIOS: 1,
};
export const USER_PREFERENCES_CACHE = {
TTL_SECONDS: 300,
CACHE_KEY_PREFIX: 'user_preferences',
};
export const USER_PREFERENCES_FIELD_NAMES = {
USER_PROFILE: 'userProfile',
FAVORITE_ACCOUNT: 'favoriteAccount',
FAVORITE_PORTFOLIO: 'favoritePortfolio',
};
export const USER_PREFERENCES_LABELS = {
[USER_PREFERENCES_FIELD_NAMES.FAVORITE_ACCOUNT]: 'Favorite Account',
[USER_PREFERENCES_FIELD_NAMES.FAVORITE_PORTFOLIO]: 'Favorite Portfolio',
};
export const USER_PREFERENCES_PLACEHOLDERS = {
[USER_PREFERENCES_FIELD_NAMES.FAVORITE_ACCOUNT]: 'Select your favorite account',
[USER_PREFERENCES_FIELD_NAMES.FAVORITE_PORTFOLIO]: 'Select your favorite portfolio',
};
export const USER_PREFERENCES_HELP_TEXT = {
[USER_PREFERENCES_FIELD_NAMES.FAVORITE_ACCOUNT]: 'Your preferred account for quick access',
[USER_PREFERENCES_FIELD_NAMES.FAVORITE_PORTFOLIO]: 'Your preferred portfolio for quick access',
};
export const USER_PREFERENCES_ERROR_MESSAGES = {
FAVORITE_PORTFOLIO_ACCOUNT_MISMATCH: 'The favorite portfolio must belong to the favorite account',
FAVORITE_ACCOUNT_REQUIRED_FOR_PORTFOLIO: 'A favorite account must be selected when a favorite portfolio is chosen',
FAVORITE_ACCOUNT_NOT_OWNED: 'The favorite account must be one of your accounts',
FAVORITE_PORTFOLIO_NOT_OWNED: 'The favorite portfolio must be one of your portfolios',
PREFERENCES_NOT_FOUND: 'User preferences not found',
FAILED_TO_LOAD: 'Failed to load user preferences',
FAILED_TO_UPDATE: 'Failed to update user preferences',
};
//# sourceMappingURL=user-preferences.js.map