Automated Action 545563e776 Implement comprehensive real-time chat API with NestJS
- Complete NestJS TypeScript implementation with WebSocket support
- Direct messaging (DM) and group chat functionality
- End-to-end encryption with AES encryption and key pairs
- Media file support (images, videos, audio, documents) up to 100MB
- Push notifications with Firebase Cloud Messaging integration
- Mention alerts and real-time typing indicators
- User authentication with JWT and Passport
- SQLite database with TypeORM entities and relationships
- Comprehensive API documentation with Swagger/OpenAPI
- File upload handling with secure access control
- Online/offline status tracking and presence management
- Message editing, deletion, and reply functionality
- Notification management with automatic cleanup
- Health check endpoint for monitoring
- CORS configuration for cross-origin requests
- Environment-based configuration management
- Structured for Flutter SDK integration

Features implemented:
 Real-time messaging with Socket.IO
 User registration and authentication
 Direct messages and group chats
 Media file uploads and management
 End-to-end encryption
 Push notifications
 Mention alerts
 Typing indicators
 Message read receipts
 Online status tracking
 File access control
 Comprehensive API documentation

Ready for Flutter SDK development and production deployment.
2025-06-21 17:13:05 +00:00

65 lines
2.1 KiB
JavaScript

// Estonian [et]
import dayjs from '../index';
function relativeTimeWithTense(number, withoutSuffix, key, isFuture) {
var format = {
s: ['mõne sekundi', 'mõni sekund', 'paar sekundit'],
m: ['ühe minuti', 'üks minut'],
mm: ['%d minuti', '%d minutit'],
h: ['ühe tunni', 'tund aega', 'üks tund'],
hh: ['%d tunni', '%d tundi'],
d: ['ühe päeva', 'üks päev'],
M: ['kuu aja', 'kuu aega', 'üks kuu'],
MM: ['%d kuu', '%d kuud'],
y: ['ühe aasta', 'aasta', 'üks aasta'],
yy: ['%d aasta', '%d aastat']
};
if (withoutSuffix) {
return (format[key][2] ? format[key][2] : format[key][1]).replace('%d', number);
}
return (isFuture ? format[key][0] : format[key][1]).replace('%d', number);
}
var locale = {
name: 'et',
// Estonian
weekdays: 'pühapäev_esmaspäev_teisipäev_kolmapäev_neljapäev_reede_laupäev'.split('_'),
// Note weekdays are not capitalized in Estonian
weekdaysShort: 'P_E_T_K_N_R_L'.split('_'),
// There is no short form of weekdays in Estonian except this 1 letter format so it is used for both 'weekdaysShort' and 'weekdaysMin'
weekdaysMin: 'P_E_T_K_N_R_L'.split('_'),
months: 'jaanuar_veebruar_märts_aprill_mai_juuni_juuli_august_september_oktoober_november_detsember'.split('_'),
// Note month names are not capitalized in Estonian
monthsShort: 'jaan_veebr_märts_apr_mai_juuni_juuli_aug_sept_okt_nov_dets'.split('_'),
ordinal: function ordinal(n) {
return n + ".";
},
weekStart: 1,
relativeTime: {
future: '%s pärast',
past: '%s tagasi',
s: relativeTimeWithTense,
m: relativeTimeWithTense,
mm: relativeTimeWithTense,
h: relativeTimeWithTense,
hh: relativeTimeWithTense,
d: relativeTimeWithTense,
dd: '%d päeva',
M: relativeTimeWithTense,
MM: relativeTimeWithTense,
y: relativeTimeWithTense,
yy: relativeTimeWithTense
},
formats: {
LT: 'H:mm',
LTS: 'H:mm:ss',
L: 'DD.MM.YYYY',
LL: 'D. MMMM YYYY',
LLL: 'D. MMMM YYYY H:mm',
LLLL: 'dddd, D. MMMM YYYY H:mm'
}
};
dayjs.locale(locale, null, true);
export default locale;