From 54d5b57d1ce6af82f30258f7100c0ab5eb85ed84 Mon Sep 17 00:00:00 2001 From: r-ising Date: Thu, 3 Mar 2016 12:07:48 +0100 Subject: [PATCH] Update node-gcm.d.ts added missing recipient type --- node-gcm/node-gcm.d.ts | 16 ++++++++++++---- 1 file changed, 12 insertions(+), 4 deletions(-) diff --git a/node-gcm/node-gcm.d.ts b/node-gcm/node-gcm.d.ts index 8a467cfe8..b2aadff15 100644 --- a/node-gcm/node-gcm.d.ts +++ b/node-gcm/node-gcm.d.ts @@ -54,15 +54,23 @@ declare module "node-gcm" { backoff?: number; } + export interface IRecipient { + to?: string, + topic?: string, + notificationKey?: string, + registrationIds?: string[], + registrationTokens?: string[] + } + export class Sender { constructor(key: string, options?: ISenderOptions); key: string; options: ISenderOptions; - send(message: Message, registrationIds: string|string[], callback: (err: any, resJson: IResponseBody) => void): void; - send(message: Message, registrationIds: string|string[], retries: number, callback: (err: any, resJson: IResponseBody) => void): void; - send(message: Message, registrationIds: string|string[], options: ISenderSendOptions, callback: (err: any, resJson: IResponseBody) => void): void; - sendNoRetry(message: Message, registrationIds: string|string[], callback: (err: any, resJson: IResponseBody) => void): void; + send(message: Message, registrationIds: string|string[]|IRecipient, callback: (err: any, resJson: IResponseBody) => void): void; + send(message: Message, registrationIds: string|string[]|IRecipient, retries: number, callback: (err: any, resJson: IResponseBody) => void): void; + send(message: Message, registrationIds: string|string[]|IRecipient, options: ISenderSendOptions, callback: (err: any, resJson: IResponseBody) => void): void; + sendNoRetry(message: Message, registrationIds: string|string[]|IRecipient, callback: (err: any, resJson: IResponseBody) => void): void; }