mirror of
https://github.com/zhigang1992/react-native-firebase.git
synced 2026-04-24 04:24:52 +08:00
[types][ts] deprecate all *AndRetrieveData* methods + fix all typos...
This commit is contained in:
65
src/index.d.ts
vendored
65
src/index.d.ts
vendored
@@ -1,4 +1,4 @@
|
||||
// Type definitions for React Native Firebase v4.2.0
|
||||
// Type definitions for React Native Firebase v5.0.0
|
||||
// Project: https://github.com/invertase/react-native-firebase
|
||||
// Definitions by: React Native Firebase Contributors
|
||||
// TypeScript Version: 2.1
|
||||
@@ -188,22 +188,22 @@ declare module 'react-native-firebase' {
|
||||
*/
|
||||
bundleID?: string;
|
||||
/**
|
||||
* defualt ""
|
||||
* default ""
|
||||
* The Google App ID that is used to uniquely identify an instance of an app.
|
||||
*/
|
||||
googleAppID?: string;
|
||||
/**
|
||||
* deufalt ""
|
||||
* default ""
|
||||
* The database root (i.e. https://my-app.firebaseio.com)
|
||||
*/
|
||||
databaseURL?: string;
|
||||
/**
|
||||
* defualt ""
|
||||
* default ""
|
||||
* URL scheme to set up durable deep link service
|
||||
*/
|
||||
deepLinkURLScheme?: string;
|
||||
/**
|
||||
* defualt ""
|
||||
* default ""
|
||||
* The Google Cloud storage bucket name
|
||||
*/
|
||||
storageBucket?: string;
|
||||
@@ -228,7 +228,7 @@ declare module 'react-native-firebase' {
|
||||
*/
|
||||
clientID?: string;
|
||||
/**
|
||||
* defualt ""
|
||||
* default ""
|
||||
* The secret iOS API key used for authenticating requests from our app
|
||||
*/
|
||||
APIKey?: string;
|
||||
@@ -682,16 +682,16 @@ declare module 'react-native-firebase' {
|
||||
* Sets the minimum engagement time required before starting a session.
|
||||
* The default value is 10000 (10 seconds)
|
||||
*/
|
||||
setMinimumSessionDuration(miliseconds: number): void;
|
||||
setMinimumSessionDuration(milliseconds: number): void;
|
||||
|
||||
/**
|
||||
* Sets the duration of inactivity that terminates the current session.
|
||||
* The default value is 1800000 (30 minutes).
|
||||
*/
|
||||
setSessionTimeoutDuration(miliseconds: number): void;
|
||||
setSessionTimeoutDuration(milliseconds: number): void;
|
||||
|
||||
/**
|
||||
* Gives a user a uniqiue identificaition.
|
||||
* Gives a user a unique identification.
|
||||
* @example
|
||||
* const id = firebase.auth().currentUser.uid;
|
||||
*
|
||||
@@ -791,6 +791,10 @@ declare module 'react-native-firebase' {
|
||||
|
||||
getToken(forceRefresh?: boolean): Promise<string>;
|
||||
|
||||
/**
|
||||
* @deprecated
|
||||
* @param credential
|
||||
*/
|
||||
linkAndRetrieveDataWithCredential(
|
||||
credential: AuthCredential
|
||||
): Promise<UserCredential>;
|
||||
@@ -798,8 +802,12 @@ declare module 'react-native-firebase' {
|
||||
/**
|
||||
* Link the user with a 3rd party credential provider.
|
||||
*/
|
||||
linkWithCredential(credential: AuthCredential): Promise<User>;
|
||||
linkWithCredential(credential: AuthCredential): Promise<UserCredential>;
|
||||
|
||||
/**
|
||||
* @deprecated
|
||||
* @param credential
|
||||
*/
|
||||
reauthenticateAndRetrieveDataWithCredential(
|
||||
credential: AuthCredential
|
||||
): Promise<UserCredential>;
|
||||
@@ -807,7 +815,7 @@ declare module 'react-native-firebase' {
|
||||
/**
|
||||
* Re-authenticate a user with a third-party authentication provider
|
||||
*/
|
||||
reauthenticateWithCredential(credential: AuthCredential): Promise<void>;
|
||||
reauthenticateWithCredential(credential: AuthCredential): Promise<UserCredential>;
|
||||
|
||||
/**
|
||||
* Refreshes the current user.
|
||||
@@ -998,14 +1006,22 @@ declare module 'react-native-firebase' {
|
||||
|
||||
signOut(): Promise<void>;
|
||||
|
||||
/**
|
||||
* @deprecated
|
||||
*/
|
||||
signInAnonymouslyAndRetrieveData(): Promise<UserCredential>;
|
||||
|
||||
/**
|
||||
* Sign an anonymous user.
|
||||
* If the user has already signed in, that user will be returned
|
||||
*/
|
||||
signInAnonymously(): Promise<User>;
|
||||
signInAnonymously(): Promise<UserCredential>;
|
||||
|
||||
/**
|
||||
* @deprecated
|
||||
* @param email
|
||||
* @param password
|
||||
*/
|
||||
createUserAndRetrieveDataWithEmailAndPassword(
|
||||
email: string,
|
||||
password: string
|
||||
@@ -1025,8 +1041,13 @@ declare module 'react-native-firebase' {
|
||||
createUserWithEmailAndPassword(
|
||||
email: string,
|
||||
password: string
|
||||
): Promise<User>;
|
||||
): Promise<UserCredential>;
|
||||
|
||||
/**
|
||||
* @deprecated
|
||||
* @param email
|
||||
* @param password
|
||||
*/
|
||||
signInAndRetrieveDataWithEmailAndPassword(
|
||||
email: string,
|
||||
password: string
|
||||
@@ -1039,8 +1060,12 @@ declare module 'react-native-firebase' {
|
||||
signInWithEmailAndPassword(
|
||||
email: string,
|
||||
password: string
|
||||
): Promise<User>;
|
||||
): Promise<UserCredential>;
|
||||
|
||||
/**
|
||||
* @deprecated
|
||||
* @param token
|
||||
*/
|
||||
signInAndRetrieveDataWithCustomToken(
|
||||
token: string
|
||||
): Promise<UserCredential>;
|
||||
@@ -1051,8 +1076,12 @@ declare module 'react-native-firebase' {
|
||||
* use the signInWithCustomToken() function.
|
||||
* It accepts one parameter, the custom token:
|
||||
*/
|
||||
signInWithCustomToken(token: string): Promise<User>;
|
||||
signInWithCustomToken(token: string): Promise<UserCredential>;
|
||||
|
||||
/**
|
||||
* @deprecated
|
||||
* @param credential
|
||||
*/
|
||||
signInAndRetrieveDataWithCredential(
|
||||
credential: AuthCredential
|
||||
): Promise<UserCredential>;
|
||||
@@ -1061,7 +1090,7 @@ declare module 'react-native-firebase' {
|
||||
* Sign in the user with a 3rd party credential provider.
|
||||
* credential requires the following properties:
|
||||
*/
|
||||
signInWithCredential(credential: AuthCredential): Promise<User>;
|
||||
signInWithCredential(credential: AuthCredential): Promise<UserCredential>;
|
||||
|
||||
/**
|
||||
* Asynchronously signs in using a phone number.
|
||||
@@ -1182,7 +1211,7 @@ declare module 'react-native-firebase' {
|
||||
subscribeToTopic(topic: string): void;
|
||||
|
||||
/**
|
||||
* Unsubscribes the device from a topic.
|
||||
* Unsubscribe the device from a topic.
|
||||
*/
|
||||
unsubscribeFromTopic(topic: string): void;
|
||||
}
|
||||
@@ -2792,7 +2821,7 @@ declare module 'react-native-firebase/functions' {
|
||||
export type HttpsErrorCode = RNFirebase.functions.HttpsErrorCode;
|
||||
export type FunctionsErrorCode = RNFirebase.functions.FunctionsErrorCode;
|
||||
export type HttpsCallableResult = RNFirebase.functions.HttpsCallableResult;
|
||||
export type Funtions = RNFirebase.functions.Functions;
|
||||
export type Functions = RNFirebase.functions.Functions;
|
||||
export type HttpsError = RNFirebase.functions.HttpsError;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user