FirebaseLegacyNativeMessage interface

代表 Firebase 舊版 HTTP 介面之 HTTP JSON 訊息的目標、選項和承載。

屬性

collapse_key

用來識別訊息群組。

condition

決定訊息目標之條件的邏輯表達式。

content_available

背景通知旗標。 若要執行無訊息背景更新,請指定值 1,且不包含承載中的警示、徽章或聲音密鑰。

data

訊息承載的自定義機碼/值組。

dry_run

設定為 true 時,可讓開發人員測試要求,而不需要實際傳送訊息。

mutable_content

通知服務應用程式延伸模組旗標。 如果值為 1,系統會在傳遞之前,將通知傳遞至您的通知服務應用程式延伸模組。

notification

通知承載的預先定義用戶可見索引鍵/值組。

priority

訊息的優先順序。

registration_ids

多播訊息的收件者,傳送至多個註冊令牌的訊息。

restricted_package_name

註冊令牌必須相符的應用程式套件名稱,才能接收訊息。

time_to_live

指定當裝置離線時,訊息應該保留在 FCM 記憶體的時間長度(秒為單位)

to

郵件的收件者。

屬性詳細資料

collapse_key

用來識別訊息群組。

collapse_key?: string

屬性值

string

condition

決定訊息目標之條件的邏輯表達式。

condition?: string

屬性值

string

content_available

背景通知旗標。 若要執行無訊息背景更新,請指定值 1,且不包含承載中的警示、徽章或聲音密鑰。

content_available?: boolean

屬性值

boolean

data

訊息承載的自定義機碼/值組。

data?: Record<string, any>

屬性值

Record<string, any>

dry_run

設定為 true 時,可讓開發人員測試要求,而不需要實際傳送訊息。

dry_run?: boolean

屬性值

boolean

mutable_content

通知服務應用程式延伸模組旗標。 如果值為 1,系統會在傳遞之前,將通知傳遞至您的通知服務應用程式延伸模組。

mutable_content?: number

屬性值

number

notification

通知承載的預先定義用戶可見索引鍵/值組。

notification?: FirebaseLegacyAppleNativePayload | FirebaseLegacyAndroidNativePayload | FirebaseLegacyWebNativePayload

屬性值

priority

訊息的優先順序。

priority?: "normal" | "high"

屬性值

"normal" | "high"

registration_ids

多播訊息的收件者,傳送至多個註冊令牌的訊息。

registration_ids?: string[]

屬性值

string[]

restricted_package_name

註冊令牌必須相符的應用程式套件名稱,才能接收訊息。

restricted_package_name?: string

屬性值

string

time_to_live

指定當裝置離線時,訊息應該保留在 FCM 記憶體的時間長度(秒為單位)

time_to_live?: number

屬性值

number

to

郵件的收件者。

to?: string

屬性值

string