Spaces:
Runtime error
Runtime error
File size: 1,660 Bytes
24727a3 | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 | export const ORDER_STATUS = Object.freeze({
PENDING: 'PENDING',
ACCEPTED: 'ACCEPTED',
IN_PROGRESS: 'IN_PROGRESS',
COMPLETED: 'COMPLETED',
CANCELLED: 'CANCELLED',
})
export const USER_ROLE = Object.freeze({
CLIENT: 'CLIENT',
SUPPORT: 'SUPPORT',
ACCOUNTS: 'ACCOUNTS',
ADMIN: 'ADMIN',
SUPER_ADMIN: 'SUPER_ADMIN',
})
export const STAFF_ROLES = Object.freeze(['ADMIN', 'SUPPORT', 'ACCOUNTS', 'SUPER_ADMIN'])
export const LANDING_SECTIONS = Object.freeze([
'hero', 'heroSettings', 'features', 'steps', 'how_it_works', 'testimonials',
'footer', 'about', 'aboutPage', 'demoVideo',
])
export const CACHE_TTL = Object.freeze({
TEMPLATE_LIST: 300,
TEMPLATE: 600,
LANDING: 600,
STATS: 120,
})
export const CACHE_PREFIX = Object.freeze({
TEMPLATE: (id) => `templates:${id}`,
TEMPLATE_LIST: (params) => `templates:list:${JSON.stringify(params)}`,
LANDING: (s) => `landing:${s}`,
STATS: 'admin:stats',
BLACKLIST: (token) => `blacklist:${token}`,
SUSPENDED: (id) => `suspended:${id}`,
})
export const SAFE_USER_SELECT = Object.freeze({
id: true, firstName: true, lastName: true,
email: true, phone: true, avatarUrl: true,
role: true, isActive: true, createdAt: true,
})
export const ROLE_HIERARCHY = Object.freeze({
SUPPORT: ['CLIENT'],
ACCOUNTS: ['CLIENT'],
ADMIN: ['CLIENT', 'SUPPORT', 'ACCOUNTS'],
SUPER_ADMIN: ['CLIENT', 'SUPPORT', 'ACCOUNTS', 'ADMIN'],
})
export const NOTIFICATION_TYPES = Object.freeze({
CONTACT_REPLY: 'contact_reply',
CONTACT_RESOLVED: 'contact_resolved',
CHAT_MESSAGE: 'chat_message',
ORDER_UPDATE: 'order_update',
NEW_ORDER: 'new_order',
NEW_CONTACT: 'new_contact',
})
|