UNPKG

@cranberry-money/shared-constants

Version:

Shared constants for Blueberry platform

87 lines 3 kB
export const API_CONFIG = { DEFAULT_TIMEOUT: 30000, DEFAULT_RETRY_ATTEMPTS: 3, DEFAULT_RETRY_DELAY: 1000, MAX_RETRY_DELAY: 10000, REQUEST_DEBOUNCE_MS: 300, }; export const CACHE_TIMING = { VERY_SHORT_STALE_TIME: 30 * 1000, SHORT_STALE_TIME: 2 * 60 * 1000, DEFAULT_STALE_TIME: 5 * 60 * 1000, LONG_STALE_TIME: 10 * 60 * 1000, VERY_LONG_STALE_TIME: 30 * 60 * 1000, EXTRA_LONG_STALE_TIME: 24 * 60 * 60 * 1000, DEFAULT_GC_TIME: 2 * 60 * 1000, MEDIUM_GC_TIME: 5 * 60 * 1000, LONG_GC_TIME: 10 * 60 * 1000, VERY_LONG_GC_TIME: 30 * 60 * 1000, EXTRA_LONG_GC_TIME: 24 * 60 * 60 * 1000, }; export const USER_ACCOUNT_ENDPOINTS = { BASE: '/api/user-accounts/', DETAIL: (uuid) => `/api/user-accounts/${uuid}/`, }; export const AUTH_ENDPOINTS = { SIGNIN: '/api/signin/', SIGNOUT: '/api/signout/', SIGNUP: '/api/signup/', CHANGE_PASSWORD: '/api/change-password/', EMAIL_VERIFICATION: '/api/email-verification/', RESEND_VERIFICATION: '/api/resend-verification/', TOKEN_REFRESH: '/api/token/refresh/', VERIFY: '/api/auth/verify/', }; export const COUNTRY_ENDPOINTS = { BASE: '/api/countries/', DETAIL: (uuid) => `/api/countries/${uuid}/`, }; export const ASSET_ENDPOINTS = { BASE: '/api/assets/', DETAIL: (uuid) => `/api/assets/${uuid}/`, }; export const PORTFOLIO_ENDPOINTS = { BASE: '/api/portfolios/', DETAIL: (uuid) => `/api/portfolios/${uuid}/`, }; export const USER_PROFILE_ENDPOINTS = { BASE: '/api/user-profiles/', DETAIL: (uuid) => `/api/user-profiles/${uuid}/`, DELETE_ACCOUNT: '/api/user-profiles/delete-account/', EXPORT_DATA: '/api/user-profiles/export-data/', }; export const FINANCIAL_PROFILE_ENDPOINTS = { BASE: '/api/financial-profiles/', DETAIL: (uuid) => `/api/financial-profiles/${uuid}/`, }; export const USER_PREFERENCES_ENDPOINTS = { BASE: '/api/user-preferences/' }; export const IDENTITY_VERIFICATION_ENDPOINTS = { TOKEN: '/api/users/identity-verification/token/', STATUS: '/api/users/identity-verification/status/', }; export const FAVOURITE_ASSET_ENDPOINTS = { BASE: '/api/favourite-assets/', DETAIL: (uuid) => `/api/favourite-assets/${uuid}/`, }; export const DEVICE_TOKEN_ENDPOINTS = { BASE: '/api/device-tokens/', REGISTER: '/api/device-tokens/register/', UNREGISTER: '/api/device-tokens/unregister/', }; export const NOTIFICATION_PREFERENCES_ENDPOINTS = { BASE: '/api/notification-preferences/', }; export const NOTIFICATION_ENDPOINTS = { BASE: '/api/notifications/', DETAIL: (uuid) => `/api/notifications/${uuid}/`, UNREAD_COUNT: '/api/notifications/unread-count/', MARK_ALL_READ: '/api/notifications/mark-all-read/', }; export const FEATURE_FLAG_ENDPOINTS = { BASE: '/api/feature-flags/', }; export const EXTERNAL_URLS = { TERMS_OF_SERVICE: 'https://blueberry.money/terms-of-service', PRIVACY_POLICY: 'https://blueberry.money/privacy-policy', }; //# sourceMappingURL=api.js.map