@mathrunet/masamune
Version:
Manages packages for the server portion (NodeJS) of the Masamune framework.
110 lines (109 loc) • 3.39 kB
TypeScript
/**
* Define the process for PUSH notification.
*
* PUSH通知を行うための処理を定義します。
*
* @param title
* The title of the notice should be listed.
*
* 通知タイトルを記載します。
*
* @param body
* The contents of the notice will be described.
*
* 通知内容を記載します。
*
* @param channel_id
* Describe ChannelId for Android.
*
* Android向けのChannelIdを記載します。
*
* @param data
* Specify the data to be placed on the notification.
*
* 通知に乗せるデータを指定します。
*
* @param link
* Specify the link to be opened when the notification is clicked.
*
* 通知がクリックされたときに開くリンクを指定します。
*
* @param badgeCount
* Specifies the badge count of the notification.
*
* 通知のバッジカウントを指定します。
*
* @param sound
* Specifies the sound of the notification.
*
* 通知のサウンドを指定します。
*
* @param targetToken
* Specifies the FCM token.
*
* FCMトークンを指定します。
*
* @param targetTopic
* Specifies the topic of the FCM.
*
* FCMのトピックを指定します。
*
* @param targetCollectionPath
* Specifies the path of the collection to be notified.
*
* 通知対象のコレクションのパスを指定します。
*
* @param targetDocumentPath
* Specifies the path of the document to be notified.
*
* 通知対象のドキュメントのパスを指定します。
*
* @param targetTokenField
* Specifies the key of the field used to retrieve the token to be notified.
*
* 通知対象のトークンを取得する際のフィールドのキーを指定します。
*
* @param targetWheres
* Specify the conditions for retrieving the collections to be notified.
*
* 通知対象のコレクションを取得する際の条件を指定します。
*
* @param targetConditions
* Specify the conditions under which data is to be notified.
*
* データを通知対象とする条件を指定します。
*
* @param responseTokenList
* Specifies whether to return the token list for debugging.
*
* デバッグ用にトークンリストを返すかどうかを指定します。
*/
export declare function sendNotification({ title, body, data, link, channelId, badgeCount, sound, targetToken, targetTopic, targetCollectionPath, targetDocumentPath, targetTokenField, targetWheres, targetConditions, responseTokenList, firestoreInstance, showLog, }: {
title: string;
body: string;
link?: string | undefined | null;
channelId?: string | undefined | null;
data?: {
[key: string]: any;
} | undefined;
badgeCount?: number | undefined | null;
sound?: string | undefined | null;
targetToken?: string | string[] | undefined | null;
targetTopic?: string | undefined | null;
targetCollectionPath?: string | undefined | null;
targetDocumentPath?: string | undefined | null;
targetTokenField?: string | {
[key: string]: any;
} | undefined | null;
targetWheres?: {
[key: string]: any;
}[] | undefined;
targetConditions?: {
[key: string]: any;
}[] | undefined;
responseTokenList?: boolean | undefined | null;
firestoreInstance: FirebaseFirestore.Firestore;
showLog?: boolean | undefined | null;
}): Promise<{
[key: string]: any;
}>;