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

@@ -37,6 +37,7 @@
"@parse/node-apn": "^5.0.0",
"@types/jsonwebtoken": "^9.0.9",
"@types/uuid": "^10.0.0",
"apns2": "^12.2.0",
"axios": "^1.10.0",
"body-parser": "^2.2.0",
"class-transformer": "^0.5.1",
@@ -106,4 +107,4 @@
"coverageDirectory": "../coverage",
"testEnvironment": "node"
}
}
}