Skip to content

Commit

Permalink
Deprecate sendToDevice and sendToDeviceGroup and their response classes
Browse files Browse the repository at this point in the history
1. Deprecate sendToDevice and its response class, MessagingDeviceResponse
2. Deprecate sendToDeviceGroup and its response class, MessagingDeviceGroupResponse
  • Loading branch information
Doris-Ge committed Mar 1, 2023
1 parent 49251a8 commit a271310
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 1 deletion.
10 changes: 9 additions & 1 deletion src/messaging/messaging-api.ts
Original file line number Diff line number Diff line change
Expand Up @@ -940,7 +940,11 @@ export interface MessagingOptions {
[key: string]: any | undefined;
}

/* Individual status response payload from single devices */
/**
* Individual status response payload from single devices
*
* @deprecated Returned by {@link firebase-admin.messaging#sendToDevice} which is also deprecated.
*/
export interface MessagingDeviceResult {
/**
* The error that occurred when processing the message for the recipient.
Expand All @@ -967,6 +971,8 @@ export interface MessagingDeviceResult {
* See
* {@link https://firebase.google.com/docs/cloud-messaging/admin/send-messages#send_to_individual_devices |
* Send to individual devices} for code samples and detailed documentation.
*
* @deprecated Returned by {@link firebase-admin.messaging#sendToDevice} which is also deprecated.
*/
export interface MessagingDevicesResponse {
canonicalRegistrationTokenCount: number;
Expand All @@ -983,6 +989,8 @@ export interface MessagingDevicesResponse {
* See
* {@link https://firebase.google.com/docs/cloud-messaging/send-message?authuser=0#send_messages_to_device_groups |
* Send messages to device groups} for code samples and detailed documentation.
*
* @deprecated Returned by {@link firebase-admin.messaging#sendToDeviceGroup} which is also deprecated.
*/
export interface MessagingDeviceGroupResponse {

Expand Down
4 changes: 4 additions & 0 deletions src/messaging/messaging.ts
Original file line number Diff line number Diff line change
Expand Up @@ -376,6 +376,8 @@ export class Messaging {
*
* @returns A promise fulfilled with the server's response after the message
* has been sent.
*
* @deprecated Use {@link firebase-admin.messaging#send} instead.
*/
public sendToDevice(
registrationTokenOrTokens: string | string[],
Expand Down Expand Up @@ -445,6 +447,8 @@ export class Messaging {
*
* @returns A promise fulfilled with the server's response after the message
* has been sent.
*
* @deprecated Use {@link firebase-admin.messaging#send} instead.
*/
public sendToDeviceGroup(
notificationKey: string,
Expand Down

0 comments on commit a271310

Please sign in to comment.