declare module '@ioc:Adonis/Addons/FCM' { import { IMessageOptions, IResponseBody, ISenderOptions, Message } from 'node-gcm'; import { IRecipient, ISenderSendOptions } from 'node-gcm'; export type FCMMessage = IMessageOptions | Message; export type FCMConfig = { apiKey: string; requestOptions?: ISenderOptions; }; export interface FakeFCMContract { /** * Returns the last sent message. */ recent(): object | undefined; /** * Returns the last sent message and removes it from * the array as well */ pullRecent(): object | undefined; /** * Returns a copy of all the messages */ all(): object[]; /** * Clear all stored messages */ clear(): void; send(message: FCMMessage): Promise; sendNoRetry(message: FCMMessage): Promise; } export interface FCMContract { message(options?: FCMMessage): Message; fake(): void; restore(): void; send(message: FCMMessage, registrationIds: string | string[] | IRecipient): Promise; send(message: FCMMessage, registrationIds: string | string[] | IRecipient, retries: number): Promise; send(message: FCMMessage, registrationIds: string | string[] | IRecipient, options: ISenderSendOptions): Promise; sendNoRetry(message: FCMMessage, registrationIds: string | string[] | IRecipient): Promise; } const FCM: FCMContract; export default FCM; }