Add Android node foundation with FCM push support

This commit is contained in:
William Valentin
2026-02-16 12:55:22 -08:00
parent 58c4b0b9bb
commit a954d7e136
11 changed files with 190 additions and 19 deletions
+3 -3
View File
@@ -46,7 +46,7 @@ export interface NodeStatusSetParams {
export interface NodePushTokenSetParams {
connectionId: string;
provider: 'apns';
provider: 'apns' | 'fcm';
token: string;
topic?: string;
environment?: 'sandbox' | 'production';
@@ -309,7 +309,7 @@ export function parseNodePushTokenSetParams(params: unknown): NodePushTokenSetPa
if (typeof p.connectionId !== 'string' || !p.connectionId.trim()) {
return null;
}
if (p.provider !== 'apns') {
if (p.provider !== 'apns' && p.provider !== 'fcm') {
return null;
}
if (typeof p.token !== 'string' || p.token.trim().length < 16) {
@@ -324,7 +324,7 @@ export function parseNodePushTokenSetParams(params: unknown): NodePushTokenSetPa
return {
connectionId: p.connectionId,
provider: 'apns',
provider: p.provider,
token: p.token.trim(),
topic: typeof p.topic === 'string' ? p.topic.trim() : undefined,
environment: p.environment as NodePushTokenSetParams['environment'] | undefined,