From adb330aa63d89d91243c5a9ebf8bc34aa5206d6e Mon Sep 17 00:00:00 2001 From: Art Turanoff <89371470+turanofff@users.noreply.github.com> Date: Wed, 17 Apr 2024 19:26:08 +1000 Subject: [PATCH] fix(firebase-x): setConfigSettings function input parameters aligned with firebase-x plugin (#4757) * Implement fix * revert changes to firebase * correct success callback * fix jsdoc * fix return type --- .../plugins/firebase-x/index.ts | 17 ++++++++++++----- 1 file changed, 12 insertions(+), 5 deletions(-) diff --git a/src/@awesome-cordova-plugins/plugins/firebase-x/index.ts b/src/@awesome-cordova-plugins/plugins/firebase-x/index.ts index 95014fade..9a7782244 100644 --- a/src/@awesome-cordova-plugins/plugins/firebase-x/index.ts +++ b/src/@awesome-cordova-plugins/plugins/firebase-x/index.ts @@ -116,7 +116,7 @@ export interface MessagePayloadAps { alert?: { title: string; body: string; - } + }; } export interface MessagePayload { title?: string; @@ -830,13 +830,20 @@ export class FirebaseX extends AwesomeCordovaNativePlugin { } /** - * Android only. Change the settings for the FirebaseRemoteConfig object's operations. + * Change the settings for the FirebaseRemoteConfig object's operations. * - * @param {Object} settings - * @returns {Promise} + * @param {number} fetchTimeout - fetch timeout in seconds. Default is 60 seconds. + * @param {number} minimumFetchInterval - minimum fetch inteval in seconds. Default is 12 hours. + * @param {Function} success - callback function to be call on successfully setting the remote config settings + * @param {Function} error - callback function which will be passed a {string} error message as an argument */ @Cordova() - setConfigSettings(settings: any): Promise { + setConfigSettings( + fetchTimeout: number, + minimumFetchInterval: number, + success: () => void, + error: (err: string) => void + ): void { return; }