feat(push): migrate APNs provider from @parse/node-apn to apns2 library

- Replace @parse/node-apn with apns2 for improved APNs integration
- Update ApnsProvider to use new ApnsClient with modern API
- Refactor notification creation and sending logic for better error handling
- Add proper error event listeners for device token issues
- Update configuration interface to match apns2 requirements
- Modify push notification endpoints to allow public access for token registration
- Update service methods to handle new response format from apns2
- Add UsersModule dependency to PushNotificationsModule
This commit is contained in:
richarjiang
2025-10-14 19:25:30 +08:00
parent 305a969912
commit 38dd740c8c
9 changed files with 520 additions and 171 deletions

View File

@@ -12,11 +12,13 @@ import { PushMessage } from './models/push-message.model';
import { PushTemplate } from './models/push-template.model';
import { ConfigModule } from '@nestjs/config';
import { DatabaseModule } from '../database/database.module';
import { UsersModule } from '../users/users.module';
@Module({
imports: [
ConfigModule,
DatabaseModule,
UsersModule,
SequelizeModule.forFeature([
UserPushToken,
PushMessage,