From 3eb1a0ce3412685e9bf876fc4db24ccf5199f112 Mon Sep 17 00:00:00 2001 From: mr-kew Date: Thu, 29 Aug 2024 23:40:33 +0200 Subject: [PATCH] Native properties moved into extensions --- firebase-auth/api/android/firebase-auth.api | 2 +- .../src/androidMain/kotlin/dev/gitlive/firebase/auth/auth.kt | 5 ++++- .../src/iosMain/kotlin/dev/gitlive/firebase/auth/auth.kt | 4 +++- .../src/jsMain/kotlin/dev/gitlive/firebase/auth/auth.kt | 4 +++- 4 files changed, 11 insertions(+), 4 deletions(-) diff --git a/firebase-auth/api/android/firebase-auth.api b/firebase-auth/api/android/firebase-auth.api index 793afeb1f..e6ab3cfef 100644 --- a/firebase-auth/api/android/firebase-auth.api +++ b/firebase-auth/api/android/firebase-auth.api @@ -53,7 +53,6 @@ public final class dev/gitlive/firebase/auth/ActionCodeSettings { public final class dev/gitlive/firebase/auth/AdditionalUserInfo { public fun (Lcom/google/firebase/auth/AdditionalUserInfo;)V - public final fun getAndroid ()Lcom/google/firebase/auth/AdditionalUserInfo; public final fun getProfile ()Ljava/util/Map; public final fun getProviderId ()Ljava/lang/String; public final fun getUsername ()Ljava/lang/String; @@ -290,6 +289,7 @@ public final class dev/gitlive/firebase/auth/UserMetaData { public final class dev/gitlive/firebase/auth/android { public static final fun auth (Ldev/gitlive/firebase/Firebase;Ldev/gitlive/firebase/FirebaseApp;)Ldev/gitlive/firebase/auth/FirebaseAuth; + public static final fun getAndroid (Ldev/gitlive/firebase/auth/AdditionalUserInfo;)Lcom/google/firebase/auth/AdditionalUserInfo; public static final fun getAndroid (Ldev/gitlive/firebase/auth/AuthResult;)Lcom/google/firebase/auth/AuthResult; public static final fun getAndroid (Ldev/gitlive/firebase/auth/AuthTokenResult;)Lcom/google/firebase/auth/GetTokenResult; public static final fun getAndroid (Ldev/gitlive/firebase/auth/FirebaseAuth;)Lcom/google/firebase/auth/FirebaseAuth; diff --git a/firebase-auth/src/androidMain/kotlin/dev/gitlive/firebase/auth/auth.kt b/firebase-auth/src/androidMain/kotlin/dev/gitlive/firebase/auth/auth.kt index 045e683c6..cc4f2957d 100644 --- a/firebase-auth/src/androidMain/kotlin/dev/gitlive/firebase/auth/auth.kt +++ b/firebase-auth/src/androidMain/kotlin/dev/gitlive/firebase/auth/auth.kt @@ -127,8 +127,11 @@ public actual class AuthResult(internal val android: com.google.firebase.auth.Au get() = android.additionalUserInfo?.let { AdditionalUserInfo(it) } } +public val AdditionalUserInfo.android: com.google.firebase.auth.AdditionalUserInfo + get() = android + public actual class AdditionalUserInfo( - public val android: com.google.firebase.auth.AdditionalUserInfo, + internal val android: com.google.firebase.auth.AdditionalUserInfo, ) { public actual val providerId: String? get() = android.providerId diff --git a/firebase-auth/src/iosMain/kotlin/dev/gitlive/firebase/auth/auth.kt b/firebase-auth/src/iosMain/kotlin/dev/gitlive/firebase/auth/auth.kt index 71cca6ed8..b7588fe80 100644 --- a/firebase-auth/src/iosMain/kotlin/dev/gitlive/firebase/auth/auth.kt +++ b/firebase-auth/src/iosMain/kotlin/dev/gitlive/firebase/auth/auth.kt @@ -117,8 +117,10 @@ public actual class AuthResult(internal val ios: FIRAuthDataResult) { get() = ios.additionalUserInfo?.let { AdditionalUserInfo(it) } } +public val AdditionalUserInfo.ios: FIRAdditionalUserInfo get() = ios + public actual class AdditionalUserInfo( - public val ios: FIRAdditionalUserInfo, + internal val ios: FIRAdditionalUserInfo, ) { public actual val providerId: String? get() = ios.providerID diff --git a/firebase-auth/src/jsMain/kotlin/dev/gitlive/firebase/auth/auth.kt b/firebase-auth/src/jsMain/kotlin/dev/gitlive/firebase/auth/auth.kt index 4442d2661..4d0223d28 100644 --- a/firebase-auth/src/jsMain/kotlin/dev/gitlive/firebase/auth/auth.kt +++ b/firebase-auth/src/jsMain/kotlin/dev/gitlive/firebase/auth/auth.kt @@ -144,8 +144,10 @@ public actual class AuthResult(internal val js: JsAuthResult) { get() = rethrow { js.additionalUserInfo?.let { AdditionalUserInfo(it) } } } +public val AdditionalUserInfo.js: JsAdditionalUserInfo get() = js + public actual class AdditionalUserInfo( - public val js: JsAdditionalUserInfo, + internal val js: JsAdditionalUserInfo, ) { public actual val providerId: String? get() = js.providerId