Compare commits

..
Author SHA1 Message Date
Daniel Sogl 7517aa234f feat(firebase-x): add methods added upstream since last sync, deprecate getByteArray
cordova-plugin-firebasex is now a backward-compatible meta-package (20.0.2)
that installs 9 modular sub-plugins behind the same window.FirebasePlugin
global. Diffed the wrapper against the published www/*.js shims of each
sub-plugin (core, messaging, analytics, auth, crashlytics, config,
performance, firestore, functions) and added every exported method that
was missing, without touching any existing method signature.
2026-07-27 22:21:10 +02:00
2 changed files with 506 additions and 196 deletions
@@ -32,13 +32,6 @@ import { Cordova, CordovaProperty, AwesomeCordovaNativePlugin, Plugin } from '@a
*
* ```
*/
export interface DiagnosticLocalNetworkAuthorizationOptions {
/**
* Override the default fallback timeout (2000ms) before treating a slow response as indeterminate (`UNKNOWN`).
*/
timeoutMs?: number;
}
@Plugin({
pluginName: 'Diagnostic',
plugin: 'cordova.plugins.diagnostic',
@@ -53,7 +46,6 @@ export class Diagnostic extends AwesomeCordovaNativePlugin {
ACCESS_BACKGROUND_LOCATION: 'ACCESS_BACKGROUND_LOCATION',
ACCESS_COARSE_LOCATION: 'ACCESS_COARSE_LOCATION',
ACCESS_FINE_LOCATION: 'ACCESS_FINE_LOCATION',
ACCESS_LOCAL_NETWORK: 'ACCESS_LOCAL_NETWORK',
ACCESS_MEDIA_LOCATION: 'ACCESS_MEDIA_LOCATION',
ACTIVITY_RECOGNITION: 'ACTIVITY_RECOGNITION',
ADD_VOICEMAIL: 'ADD_VOICEMAIL',
@@ -69,7 +61,6 @@ export class Diagnostic extends AwesomeCordovaNativePlugin {
NEARBY_WIFI_DEVICES: 'NEARBY_WIFI_DEVICES',
POST_NOTIFICATIONS: 'POST_NOTIFICATIONS',
PROCESS_OUTGOING_CALLS: 'PROCESS_OUTGOING_CALLS',
RANGING: 'RANGING',
READ_CALENDAR: 'READ_CALENDAR',
READ_CALL_LOG: 'READ_CALL_LOG',
READ_CONTACTS: 'READ_CONTACTS',
@@ -77,7 +68,6 @@ export class Diagnostic extends AwesomeCordovaNativePlugin {
READ_MEDIA_AUDIO: 'READ_MEDIA_AUDIO',
READ_MEDIA_IMAGES: 'READ_MEDIA_IMAGES',
READ_MEDIA_VIDEO: 'READ_MEDIA_VIDEO',
READ_MEDIA_VISUAL_USER_SELECTED: 'READ_MEDIA_VISUAL_USER_SELECTED',
READ_PHONE_NUMBERS: 'READ_PHONE_NUMBERS',
READ_PHONE_STATE: 'READ_PHONE_STATE',
READ_SMS: 'READ_SMS',
@@ -109,11 +99,6 @@ export class Diagnostic extends AwesomeCordovaNativePlugin {
EPHEMERAL: string;
PROVISIONAL: string;
LIMITED: string;
/**
* Returned when the underlying OS has not yet provided a concrete status (for example, if an iOS
* Local Network probe timed out). Treat this as a transient state and retry before surfacing a denial to the user.
*/
UNKNOWN: string;
};
locationAuthorizationMode = {
@@ -125,22 +110,8 @@ export class Diagnostic extends AwesomeCordovaNativePlugin {
* Location accuracy authorization
*/
locationAccuracyAuthorization = {
/** Alias for BEST. On iOS, sets `kCLLocationAccuracyBest`. */
FULL: 'full',
/** On iOS, sets `kCLLocationAccuracyReduced` - approximate location, no GPS. */
REDUCED: 'reduced',
/** On iOS, sets `kCLLocationAccuracyBest`. May engage GPS hardware. */
BEST: 'best',
/** On iOS, sets `kCLLocationAccuracyBestForNavigation`. Highest accuracy using additional sensor data. */
BEST_FOR_NAVIGATION: 'bestForNavigation',
/** On iOS, sets `kCLLocationAccuracyNearestTenMeters`. */
NEAREST_TEN_METERS: 'nearestTenMeters',
/** On iOS, sets `kCLLocationAccuracyHundredMeters`. */
HUNDRED_METERS: 'hundredMeters',
/** On iOS, sets `kCLLocationAccuracyKilometer`. */
KILOMETER: 'kilometer',
/** On iOS, sets `kCLLocationAccuracyThreeKilometers`. */
THREE_KILOMETERS: 'threeKilometers',
};
permissionGroups = {
@@ -161,7 +132,7 @@ export class Diagnostic extends AwesomeCordovaNativePlugin {
SENSORS: ['BODY_SENSORS'],
SMS: ['SEND_SMS', 'RECEIVE_SMS', 'READ_SMS', 'RECEIVE_WAP_PUSH', 'RECEIVE_MMS'],
STORAGE: ['READ_EXTERNAL_STORAGE', 'WRITE_EXTERNAL_STORAGE'],
NEARBY_DEVICES: ['BLUETOOTH_ADVERTISE', 'BLUETOOTH_SCAN', 'BLUETOOTH_CONNECT'],
NEARBY_DEVICES: ["BLUETOOTH_ADVERTISE", "BLUETOOTH_SCAN", "BLUETOOTH_CONNECT"],
};
locationMode = {
@@ -193,21 +164,21 @@ export class Diagnostic extends AwesomeCordovaNativePlugin {
@CordovaProperty()
cpuArchitecture: {
MIPS: string;
MIPS_64: string;
UNKNOWN: string;
ARMv6: string;
ARMv7: string;
ARMv8: string;
X86: string;
X86_64: string;
MIPS: string;
MIPS_64: string;
UNKNOWN: string;
ARMv6: string;
ARMv7: string;
ARMv8: string;
X86: string;
X86_64: string;
};
@CordovaProperty()
remoteNotificationType: {
ALERT: string;
SOUND: string;
BADGE: string;
ALERT: string;
SOUND: string;
BADGE: string;
};
@CordovaProperty()
@@ -336,6 +307,7 @@ export class Diagnostic extends AwesomeCordovaNativePlugin {
return;
}
// ANDROID AND IOS ONLY
/**
@@ -388,6 +360,7 @@ export class Diagnostic extends AwesomeCordovaNativePlugin {
return;
}
/**
* Returns the location authorization status for the application.
* Note for Android: this is intended for Android 6 / API 23 and above. Calling on Android 5 / API 22 and below will always return GRANTED status as permissions are already granted at installation time.
@@ -605,7 +578,7 @@ export class Diagnostic extends AwesomeCordovaNativePlugin {
@Cordova({ platforms: ['Android', 'iOS'] })
getArchitecture(): Promise<any> {
return;
}
}
/**
* Returns the current battery level of the device as a percentage.
@@ -615,62 +588,7 @@ export class Diagnostic extends AwesomeCordovaNativePlugin {
@Cordova({ platforms: ['Android', 'iOS'] })
getCurrentBatteryLevel(): Promise<any> {
return;
}
/**
* Checks if low power mode is currently enabled on the device.
*
* @returns {Promise<boolean>}
*/
@Cordova({ platforms: ['Android', 'iOS'] })
isLowPowerModeEnabled(): Promise<boolean> {
return;
}
/**
* Registers a function to be called whenever the device low power mode status changes.
*
* @param {Function} handler
*/
@Cordova({ platforms: ['Android', 'iOS'], sync: true })
onLowPowerModeChange(handler: Function): void {}
/**
* Checks if currently running app build is a debug build.
*
* @returns {Promise<boolean>}
*/
@Cordova({ platforms: ['Android', 'iOS'] })
isDebugBuild(): Promise<boolean> {
return;
}
/**
* Checks if Accessibility Mode (Talkback on Android, VoiceOver on iOS) is currently enabled on the device.
*
* @returns {Promise<boolean>}
*/
@Cordova({ platforms: ['Android', 'iOS'] })
isAccessibilityModeEnabled(): Promise<boolean> {
return;
}
/**
* Checks if app is able to access device heading.
*
* @returns {Promise<boolean>}
*/
@Cordova({ platforms: ['Android', 'iOS'] })
isCompassAvailable(): Promise<boolean> {
return;
}
/**
* Opens notification settings for your app.
* On Android versions lower than O and on iOS versions lower than 15.4, this will open the same page as `switchToSettings()`.
*/
@Cordova({ platforms: ['Android', 'iOS'], sync: true })
switchToNotificationSettings(): void {}
}
// ANDROID ONLY
@@ -687,6 +605,7 @@ export class Diagnostic extends AwesomeCordovaNativePlugin {
return;
}
/**
* Checks if high-accuracy locations are available to the app from GPS hardware.
* Returns true if Location mode is enabled and is set to "Device only" or "High accuracy" AND if the app is authorized to use location.
@@ -745,7 +664,7 @@ export class Diagnostic extends AwesomeCordovaNativePlugin {
return;
}
/**
/**
* Checks if mobile data is enabled on device.
*
* @returns {Promise<any>}
@@ -755,37 +674,6 @@ export class Diagnostic extends AwesomeCordovaNativePlugin {
return;
}
/**
* Checks if the app is currently ignoring battery optimizations.
*
* @returns {Promise<boolean>}
*/
@Cordova({ platforms: ['Android'] })
isIgnoringBatteryOptimizations(): Promise<boolean> {
return;
}
/**
* Prompts the user to allow the app to ignore battery optimizations.
* Requires permission `<uses-permission android:name="android.permission.REQUEST_IGNORE_BATTERY_OPTIMIZATIONS" />`
*
* @returns {Promise<any>}
*/
@Cordova({ platforms: ['Android'] })
requestIgnoreBatteryOptimizations(): Promise<any> {
return;
}
/**
* Checks if touch exploration (in accessibility mode) is currently enabled on the device.
*
* @returns {Promise<boolean>}
*/
@Cordova({ platforms: ['Android'] })
isTouchExplorationEnabled(): Promise<boolean> {
return;
}
/**
* Returns the current location mode setting for the device.
*
@@ -801,7 +689,7 @@ export class Diagnostic extends AwesomeCordovaNativePlugin {
*
* @returns {Promise<any>}
*/
@Cordova({ platforms: ['Android', 'iOS'] })
@Cordova({ platforms: ['Android'] })
getDeviceOSVersion(): Promise<any> {
return;
}
@@ -811,7 +699,7 @@ export class Diagnostic extends AwesomeCordovaNativePlugin {
*
* @returns {Promise<any>}
*/
@Cordova({ platforms: ['Android', 'iOS'] })
@Cordova({ platforms: ['Android'] })
getBuildOSVersion(): Promise<any> {
return;
}
@@ -938,7 +826,7 @@ export class Diagnostic extends AwesomeCordovaNativePlugin {
getBluetoothAuthorizationStatus(): Promise<any> {
return;
}
/**
* Returns the individual authorization status for each Bluetooth run-time permission on Android 12+ / API 31+
* On Android 11 / API 30 and below, all will be returned as GRANTED if the manifest has BLUETOOTH since they are implicitly granted at build-time.
@@ -950,19 +838,6 @@ export class Diagnostic extends AwesomeCordovaNativePlugin {
return;
}
/**
* Returns the individual camera authorization statuses for each of the relevant permissions.
* Note for Android: this is intended for Android 6 / API 23 and above. Calling on Android 5.1 / API 22 and below will always return GRANTED status as permissions are already granted at installation time.
*
* @param {boolean} [storage] Android only: If true, requests storage permissions in addition to CAMERA run-time permission.
* cordova-plugin-camera@2.2+ requires both of these permissions. Defaults to true.
* @returns {Promise<any>}
*/
@Cordova({ platforms: ['Android'], callbackOrder: 'reverse' })
getCameraAuthorizationStatuses(storage?: boolean): Promise<any> {
return;
}
/**
* Checks if the application is authorized to use external storage.
*
@@ -1156,7 +1031,7 @@ export class Diagnostic extends AwesomeCordovaNativePlugin {
return;
}
/**
/**
* Presents limited library picker UI on iOS 14+
*
* @returns {Promise<any>}
@@ -1362,53 +1237,4 @@ export class Diagnostic extends AwesomeCordovaNativePlugin {
*/
@Cordova({ platforms: ['iOS'], sync: true })
registerLocationAccuracyAuthorizationChangeHandler(handler: Function): void {}
/**
* Checks if mobile data is authorized for this app.
* Returns true if the per-app Mobile Data setting is set to enabled (regardless of whether the device is currently connected to a cellular network)
*
* @returns {Promise<boolean>}
*/
@Cordova({ platforms: ['iOS'] })
isMobileDataAuthorized(): Promise<boolean> {
return;
}
/**
* Checks if the app is authorised to access devices on the local network (iOS 14+).
* On iOS versions prior to 14 this will always return TRUE as no local network authorization is required.
*
* @param {DiagnosticLocalNetworkAuthorizationOptions} [options] Optional timeout control - provide `timeoutMs` to override the default 2000ms timeout.
* @returns {Promise<boolean>}
*/
@Cordova({ platforms: ['iOS'], callbackOrder: 'reverse' })
isLocalNetworkAuthorized(options?: DiagnosticLocalNetworkAuthorizationOptions): Promise<boolean> {
return;
}
/**
* Returns the app's Local Network authorization status (iOS 14+).
* On iOS 14+ this returns one of: NOT_REQUESTED, GRANTED, DENIED_ALWAYS, UNKNOWN (this.permissionStatus).
* `UNKNOWN` indicates that iOS did not return a definitive answer before the timeout elapsed, so the app can retry before warning the user.
* On iOS versions prior to 14 this will always return GRANTED as no authorization is required.
*
* @param {DiagnosticLocalNetworkAuthorizationOptions} [options] Optional timeout override (defaults to 2000ms).
* @returns {Promise<string>}
*/
@Cordova({ platforms: ['iOS'], callbackOrder: 'reverse' })
getLocalNetworkAuthorizationStatus(options?: DiagnosticLocalNetworkAuthorizationOptions): Promise<string> {
return;
}
/**
* Requests the user to authorise the app to access devices on the local network (iOS 14+).
* On iOS versions prior to 14 this does nothing and will return success as no authorization is required.
* May return UNKNOWN if iOS does not respond before the native APIs time out, allowing the app to retry.
*
* @returns {Promise<string>}
*/
@Cordova({ platforms: ['iOS'] })
requestLocalNetworkAuthorization(): Promise<string> {
return;
}
}
@@ -111,6 +111,26 @@ export interface FirebaseUser {
* name
*/
name?: string;
/**
* whether the user is anonymous
*/
isAnonymous?: boolean;
/**
* account creation timestamp in milliseconds
*/
creationTimestamp?: number;
/**
* last sign-in timestamp in milliseconds
*/
lastSignInTimestamp?: number;
/**
* array of linked provider info objects
*/
providers?: any[];
}
export interface MessagePayloadAps {
alert?: {
@@ -133,6 +153,59 @@ export interface MessagePayload {
tap?: 'background' | 'foreground';
aps?: MessagePayloadAps;
}
export interface OnDeviceConversionUserIdentifier {
/**
* The user's email address. Mutually exclusive with phoneNumber.
*/
emailAddress?: string;
/**
* The user's phone number in E.164 format. Mutually exclusive with emailAddress.
*/
phoneNumber?: string;
}
export interface EnrollSecondAuthFactorOptions {
/**
* A display name for this factor. Auto-generated (masking all but the last 4 digits of the phone number) if not provided.
*/
displayName?: string;
}
export interface VerifySecondAuthFactorParams {
/**
* Index of the enrolled factor to verify (for an MFA sign-in challenge).
*/
selectedIndex?: number;
/**
* The verification ID from phone verification.
*/
verificationId?: string;
/**
* The SMS verification code entered by the user.
*/
code?: string;
}
export interface EnrolledSecondAuthFactor {
/**
* The factor's index.
*/
index: number;
/**
* The enrolled phone number.
*/
phoneNumber: string;
/**
* The display name for this factor, if set.
*/
displayName?: string;
}
/**
* @name Firebase X
* @description
@@ -160,6 +233,10 @@ export interface MessagePayload {
* ```
* @interfaces
* IChannelOptions
* OnDeviceConversionUserIdentifier
* EnrollSecondAuthFactorOptions
* VerifySecondAuthFactorParams
* EnrolledSecondAuthFactor
*/
@Plugin({
pluginName: 'FirebaseX',
@@ -190,6 +267,66 @@ export class FirebaseX extends AwesomeCordovaNativePlugin {
return;
}
/**
* Alias for getId(). Returns the current Firebase Installation ID (FID).
*
* @returns {Promise<string>}
*/
@Cordova()
getInstallationId(): Promise<string> {
return;
}
/**
* Returns a valid Firebase Installation auth token (always force-refreshed).
*
* @returns {Promise<string>}
*/
@Cordova()
getInstallationToken(): Promise<string> {
return;
}
/**
* Deletes the current Firebase Installation ID and all associated data. Firebase will generate a new FID on next access.
*
* @returns {Promise<any>}
*/
@Cordova()
deleteInstallationId(): Promise<any> {
return;
}
/**
* Registers a listener that is called whenever the Firebase Installation ID changes.
*
* @param {Function} fn - callback function to invoke with the new installation ID string
*/
@Cordova()
registerInstallationIdChangeListener(fn: any): Promise<any> {
return;
}
/**
* Registers a listener that is called when the application transitions to the foreground (iOS applicationDidBecomeActive / Android onResume).
*
* @param {Function} fn - callback function to invoke when the app becomes active
*/
@Cordova()
registerApplicationDidBecomeActiveListener(fn: any): Promise<any> {
return;
}
/**
* Registers a listener that is called when the application transitions to the background (iOS applicationDidEnterBackground / Android onPause).
*
* @param {Function} fn - callback function to invoke when the app enters the background
*/
@Cordova()
registerApplicationDidEnterBackgroundListener(fn: any): Promise<any> {
return;
}
/**
* Get the current FCM user.
*
@@ -261,6 +398,20 @@ export class FirebaseX extends AwesomeCordovaNativePlugin {
return;
}
/**
* iOS 12+ only.
* Get notified when the user taps the notification settings action in the system notification settings.
* Requires UNAuthorizationOptionProvidesAppNotificationSettings.
*
* @returns {Observable<any>}
*/
@Cordova({
observable: true,
})
onOpenSettings(): Observable<any> {
return;
}
/**
* Grant permission to receive push notifications (will trigger prompt) and return hasPermission: true. iOS only (Android will always return true).
*
@@ -273,6 +424,19 @@ export class FirebaseX extends AwesomeCordovaNativePlugin {
return;
}
/**
* iOS 12+ only. Grant critical alert permission (bypasses Do Not Disturb and the ringer switch). Requires a special Apple entitlement.
* On Android this is a no-op and returns false.
*
* @returns {Promise<boolean>}
*/
@Cordova({
platforms: ['iOS'],
})
grantCriticalPermission(): Promise<boolean> {
return;
}
/**
* Check permission to receive push notifications and return hasPermission: true. iOS only (Android will always return true).
*
@@ -283,6 +447,16 @@ export class FirebaseX extends AwesomeCordovaNativePlugin {
return;
}
/**
* iOS 12+ only. Check whether the app has critical alert permission. On Android this always returns false.
*
* @returns {Promise<boolean>}
*/
@Cordova()
hasCriticalPermission(): Promise<boolean> {
return;
}
/**
* Unregister from firebase, used to stop receiving push notifications. Call this when you logout user from your app.
*/
@@ -428,6 +602,16 @@ export class FirebaseX extends AwesomeCordovaNativePlugin {
return;
}
/**
* Get the current analytics data collection enabled state.
*
* @returns {Promise<boolean>}
*/
@Cordova()
isAnalyticsCollectionEnabled(): Promise<boolean> {
return;
}
/**
* Enable/disable Crashlytics collection.
*
@@ -439,6 +623,16 @@ export class FirebaseX extends AwesomeCordovaNativePlugin {
return;
}
/**
* Get the current Crashlytics data collection enabled state.
*
* @returns {Promise<boolean>}
*/
@Cordova()
isCrashlyticsCollectionEnabled(): Promise<boolean> {
return;
}
/**
* Enable/disable performance collection.
*
@@ -450,6 +644,16 @@ export class FirebaseX extends AwesomeCordovaNativePlugin {
return;
}
/**
* Get the current performance data collection enabled state.
*
* @returns {Promise<boolean>}
*/
@Cordova()
isPerformanceCollectionEnabled(): Promise<boolean> {
return;
}
/**
* Log an event using Analytics
*
@@ -496,6 +700,20 @@ export class FirebaseX extends AwesomeCordovaNativePlugin {
return;
}
/**
* iOS only. Initiates on-device conversion measurement using an email address or phone number.
* Only one identifier type may be provided per call.
*
* @param {OnDeviceConversionUserIdentifier} userIdentifier
* @returns {Promise<any>}
*/
@Cordova({
platforms: ['iOS'],
})
initiateOnDeviceConversionMeasurement(userIdentifier: OnDeviceConversionUserIdentifier): Promise<any> {
return;
}
/**
* Set Crashlytics user identifier.
* To diagnose an issue, its often helpful to know which of your users experienced a given crash.
@@ -512,6 +730,18 @@ export class FirebaseX extends AwesomeCordovaNativePlugin {
return;
}
/**
* Set a custom key-value pair for Crashlytics crash reports. Appears in the "Keys" tab of a crash report.
*
* @param {string} key
* @param {string | number | boolean} value
* @returns {Promise<any>}
*/
@Cordova()
setCrashlyticsCustomKey(key: string, value: string | number | boolean): Promise<any> {
return;
}
/**
* Simulates (causes) a fatal native crash which causes a crash event to be sent to Crashlytics (useful for testing).
* See the Firebase documentation regarding crash testing.
@@ -552,6 +782,16 @@ export class FirebaseX extends AwesomeCordovaNativePlugin {
return;
}
/**
* Returns whether the app crashed during the previous execution.
*
* @returns {Promise<boolean>}
*/
@Cordova()
didCrashOnPreviousExecution(): Promise<boolean> {
return;
}
/**
* Requests verification of a phone number in order to authenticate a user and sign then into Firebase in your app.
*
@@ -583,6 +823,57 @@ export class FirebaseX extends AwesomeCordovaNativePlugin {
return;
}
/**
* Enrolls a phone number as a second authentication factor (MFA) for the current user.
*
* @param {string} number - phone number to enroll as a second factor, in E.164 format
* @param {EnrollSecondAuthFactorOptions} [opts] - optional parameters
* @returns {Promise<any>} resolves with the enrollment result (contains verificationId for SMS code entry)
*/
@Cordova({
callbackOrder: 'reverse',
})
enrollSecondAuthFactor(number: string, opts?: EnrollSecondAuthFactorOptions): Promise<any> {
return;
}
/**
* Verifies a second authentication factor during an MFA sign-in challenge or enrollment.
*
* @param {VerifySecondAuthFactorParams} params
* @param {object} [opts] - reserved for future use
* @returns {Promise<any>}
*/
@Cordova({
callbackOrder: 'reverse',
})
verifySecondAuthFactor(params: VerifySecondAuthFactorParams, opts?: object): Promise<any> {
return;
}
/**
* Lists the second authentication factors enrolled for the current user.
*
* @returns {Promise<EnrolledSecondAuthFactor[]>}
*/
@Cordova()
listEnrolledSecondAuthFactors(): Promise<EnrolledSecondAuthFactor[]> {
return;
}
/**
* Removes an enrolled second authentication factor from the current user.
*
* @param {number} selectedIndex - index of the enrolled factor to remove (from listEnrolledSecondAuthFactors())
* @returns {Promise<any>}
*/
@Cordova({
callbackOrder: 'reverse',
})
unenrollSecondAuthFactor(selectedIndex: number): Promise<any> {
return;
}
/**
* Switch current authentification system language, for example, the phone sms code.
*
@@ -626,6 +917,19 @@ export class FirebaseX extends AwesomeCordovaNativePlugin {
return;
}
/**
* Creates an email/password credential without signing in. The returned credential can be used with
* signInWithCredential(), linkUserWithCredential(), or reauthenticateWithCredential().
*
* @param email
* @param password
* @returns {Promise<any>}
*/
@Cordova()
authenticateUserWithEmailAndPassword(email: string, password: string): Promise<any> {
return;
}
/**
* Signs in user with custom token.
*
@@ -666,6 +970,43 @@ export class FirebaseX extends AwesomeCordovaNativePlugin {
return;
}
/**
* Authenticates the user with Microsoft Sign-In via Firebase OAuthProvider. Returns a credential for use with signInWithCredential().
*
* @param locale - optional locale to pass to the Microsoft sign-in provider
*/
@Cordova({
callbackOrder: 'reverse',
})
authenticateUserWithMicrosoft(locale?: string): Promise<any> {
return;
}
/**
* Authenticates the user with Facebook using an access token obtained from the Facebook SDK.
* Returns a credential for use with signInWithCredential().
*
* @param accessToken - a Facebook access token obtained via the Facebook Login SDK
*/
@Cordova()
authenticateUserWithFacebook(accessToken: string): Promise<any> {
return;
}
/**
* Authenticates the user with a generic OAuth provider via Firebase OAuthProvider. Returns a credential for use with signInWithCredential().
*
* @param providerId - the OAuth provider ID (e.g. "github.com", "twitter.com", "yahoo.com")
* @param customParameters - optional custom OAuth parameters to send to the provider
* @param scopes - optional OAuth scopes to request from the provider
*/
@Cordova({
callbackOrder: 'reverse',
})
authenticateUserWithOAuth(providerId: string, customParameters?: object, scopes?: string[]): Promise<any> {
return;
}
/**
* Links the user account to an existing Firebase user account with credentials obtained using verifyPhoneNumber().
* See the Android- and iOS-specific Firebase documentation for more info.
@@ -691,6 +1032,16 @@ export class FirebaseX extends AwesomeCordovaNativePlugin {
return;
}
/**
* Unlinks a provider from the currently signed-in user, removing that sign-in method.
*
* @param {string} providerId - the provider ID to unlink (e.g. "google.com", "password", "phone")
*/
@Cordova()
unlinkUserWithProvider(providerId: string): Promise<any> {
return;
}
/**
* Checks if there is a current Firebase user signed into the app.
*/
@@ -729,6 +1080,17 @@ export class FirebaseX extends AwesomeCordovaNativePlugin {
return;
}
/**
* Sends a verification email to the specified new email address before updating.
* The email is only updated after the user clicks the verification link.
*
* @param email - the new email address to verify
*/
@Cordova()
verifyBeforeUpdateEmail(email: string): Promise<any> {
return;
}
/**
* Sends a verification email to the currently configured email address of the current Firebase user signed into the app.
* When the user opens the contained link, their email address will have been verified.
@@ -777,6 +1139,37 @@ export class FirebaseX extends AwesomeCordovaNativePlugin {
return;
}
/**
* Registers a callback that fires whenever the user's ID token changes (sign-in, sign-out, and token refresh events).
*
* @param {Function} fn - callback function to invoke when the ID token changes
*/
@Cordova()
registerAuthIdTokenChangeListener(fn: any): Promise<any> {
return;
}
/**
* Configures Firebase Auth to connect to a local Auth emulator for testing. Must be called before any other auth operations.
*
* @param {string} host - the emulator host (e.g. "localhost" or "10.0.2.2" for Android emulator)
* @param {number} port - the emulator port (e.g. 9099)
*/
@Cordova()
useAuthEmulator(host: string, port: number): Promise<any> {
return;
}
/**
* Retrieves the custom claims from the current user's ID token. Custom claims are set server-side using the Firebase Admin SDK.
*
* @returns {Promise<any>}
*/
@Cordova()
getClaims(): Promise<any> {
return;
}
/**
* Fetch Remote Config parameter values for your app.
*
@@ -809,6 +1202,16 @@ export class FirebaseX extends AwesomeCordovaNativePlugin {
return;
}
/**
* Reset all Remote Config values back to defaults. Note: not currently available on iOS.
*
* @returns {Promise<boolean>}
*/
@Cordova()
resetRemoteConfig(): Promise<boolean> {
return;
}
/**
* Returns a Map of Firebase Remote Config key value pairs.
*
@@ -834,6 +1237,7 @@ export class FirebaseX extends AwesomeCordovaNativePlugin {
/**
* Android only. Retrieve a Remote Config byte array.
*
* @deprecated Removed upstream in cordova-plugin-firebasex 20.0.0 (modular plugin rewrite); no longer present in the Remote Config API.
* @param {string} key
* @returns {Promise<any>}
*/
@@ -1033,6 +1437,86 @@ export class FirebaseX extends AwesomeCordovaNativePlugin {
): Promise<any> {
return;
}
/**
* Checks whether a document exists in a Firestore collection.
*
* @param {string} documentId - document ID of the document to check.
* @param {string} collection - name of top-level collection to check.
* @returns {Promise<boolean>}
*/
@Cordova()
documentExistsInFirestoreCollection(documentId: string, collection: string): Promise<boolean> {
return;
}
/**
* Registers a real-time listener on a single document in a Firestore collection.
* The success callback is called multiple times: first with {eventType: "id", id: listenerId},
* then with {eventType: "change", snapshot, source, fromCache} on each change.
* Call removeFirestoreListener() with the returned listener ID to stop listening.
*
* @param {string} documentId - document ID of the document to listen to.
* @param {string} collection - name of top-level collection to listen to.
* @param {boolean} includeMetadata - whether to include metadata-only changes.
* @returns {Observable<any>}
*/
@Cordova({
callbackOrder: 'reverse',
observable: true,
})
listenToDocumentInFirestoreCollection(
documentId: string,
collection: string,
includeMetadata?: boolean
): Observable<any> {
return;
}
/**
* Registers a real-time listener on an entire Firestore collection, optionally filtered.
* The success callback is called multiple times: first with {eventType: "id", id: listenerId},
* then with {eventType: "change", documents: {...}} on each change.
* Call removeFirestoreListener() with the returned listener ID to stop listening.
*
* @param {string} collection - name of top-level collection to listen to.
* @param {Array} filters - filters to apply to the collection (same format as fetchFirestoreCollection()).
* @param {boolean} includeMetadata - whether to include metadata-only changes.
* @returns {Observable<any>}
*/
@Cordova({
callbackOrder: 'reverse',
observable: true,
})
listenToFirestoreCollection(collection: string, filters?: any[], includeMetadata?: boolean): Observable<any> {
return;
}
/**
* Removes a previously registered Firestore snapshot listener.
*
* @param {string} listenerId - the listener ID returned in the initial listener response.
* @returns {Promise<any>}
*/
@Cordova({
callbackOrder: 'reverse',
})
removeFirestoreListener(listenerId: string): Promise<any> {
return;
}
/**
* Invokes an HTTPS-callable Cloud Function by name.
*
* @param {string} name - the name of the Cloud Function to call.
* @param {any} args - arguments to pass to the function (any JSON-serialisable value).
* @returns {Promise<any>} the function's return value
*/
@Cordova()
functionsHttpsCallable(name: string, args: any): Promise<any> {
return;
}
/**
* Set new V2 consent mode
*