NTP-30767 | Naman Khurmi | Nae fix (#14718)

This commit is contained in:
Naman Khurmi
2025-01-28 16:15:52 +05:30
committed by GitHub
parent 8d3467a976
commit 597c59a9c2
5 changed files with 15 additions and 35 deletions

View File

@@ -8,6 +8,7 @@
package com.naviapp.dashboard.repositories
import com.navi.common.checkmate.model.MetricInfo
import com.navi.common.network.models.isSuccess
import com.navi.common.network.models.isSuccessWithData
import com.naviapp.network.retrofit.ResponseCallback
import com.naviapp.utils.superAppRetrofitService
@@ -23,7 +24,6 @@ class DashboardRepository : ResponseCallback() {
suspend fun logout(naeScreenName: String) =
apiResponseCallback(
superAppRetrofitService().logout(),
metricInfo =
MetricInfo.AppMetric(screen = naeScreenName, isNae = { !it.isSuccessWithData() }),
metricInfo = MetricInfo.AppMetric(screen = naeScreenName, isNae = { !it.isSuccess() }),
)
}

View File

@@ -37,9 +37,6 @@ class UserDataRepository : ResponseCallback() {
metricInfo = metricInfo,
)
suspend fun getPreSignedUrlList(dataIngestionTypes: String) =
apiResponseCallback(retrofitService().getPreSignedUrlList(dataIngestionTypes))
suspend fun postIngestionStatus(
ingestionStatusBody: IngestionStatusBody,
metricInfo: MetricInfo.CommonMetric<Any>,

View File

@@ -93,9 +93,7 @@ import com.naviapp.models.response.LoginOtpVerifyResponse
import com.naviapp.models.response.LoginResponse
import com.naviapp.models.response.NotificationSettingsContent
import com.naviapp.models.response.OnboardingResponse
import com.naviapp.models.response.PanVerificationResponse
import com.naviapp.models.response.PartPrePaymentItemsResponse
import com.naviapp.models.response.PermissionDetailsResponse
import com.naviapp.models.response.PrePaymentDetailsResponse
import com.naviapp.models.response.PrePaymentReviewResponse
import com.naviapp.models.response.PreSignData
@@ -167,11 +165,6 @@ interface RetrofitService {
@Tag excludeFromHashEncryption: String = EXCLUDE_FROM_HASH_ENCRYPTION,
): Response<GenericResponse<SuccessResponse>>
@GET("/requests/{requestId}/status")
suspend fun fetchAsyncRequestData(
@Path("requestId") requestId: String
): Response<GenericResponse<UploadDataAsyncResponse>>
@GET("/requests/{requestId}")
suspend fun fetchAsyncRequestWithError(
@Path("requestId") requestId: String
@@ -251,14 +244,6 @@ interface RetrofitService {
@Header("X-Target") channel: String,
): Response<BranchSDKResponse>
@GET("/customer-service/customers/me/permission")
suspend fun fetchPermissionDetails(): Response<GenericResponse<PermissionDetailsResponse>>
@GET("/v1/permissions")
suspend fun fetchPermissionDetailsV1(
@Query("moduleName") moduleName: String?
): Response<GenericResponse<PermissionDetailsResponse>>
@GET("/kruz/proxy/config")
suspend fun fetchMqttConfig(
@Header("X-Target") channel: String
@@ -341,11 +326,6 @@ interface RetrofitService {
@Query("overlayScreenType") overlayScreenType: String? = null,
): Response<GenericResponse<DashboardContentResponse>>
@GET("/customer-device/customer/me/pre-signed-url")
suspend fun getPreSignedUrlList(
@Query("dataIngestionTypes") dataIngestionTypes: String
): Response<GenericResponse<PreSignedUrlListResponse>>
@POST("/customer-device/customer/me/async/pre-signed-url")
suspend fun getPreSignedUrl(
@Body preSignedUrlRequest: PreSignedUrlRequest
@@ -381,9 +361,6 @@ interface RetrofitService {
@Query("required") required: String
): Response<GenericResponse<HomeFeatureResponse>>
@GET("/customer-service/customers/me/pan-verification")
suspend fun fetchPanVerification(): Response<GenericResponse<PanVerificationResponse>>
@POST("/hide-status-card")
suspend fun hideStatusCard2(
@Body hideCardData: HideCardData,

View File

@@ -87,10 +87,9 @@ abstract class ApResponseCallback {
getBottomSheetStructure(body.genericErrorBottomSheetFields),
errors =
body.errors
?: listOf(
body.genericErrorBottomSheetFields?.toGenericErrorResponse()
?: GenericErrorResponse()
),
?: body.genericErrorBottomSheetFields?.let {
listOf(it.toGenericErrorResponse())
},
genericErrorBottomSheetFields = body.genericErrorBottomSheetFields,
)
}
@@ -291,7 +290,7 @@ abstract class ApResponseCallback {
val errorResponse = getLocalErrorResponse(exception)
var apiUrl = ""
try {
apiUrl = response.raw()?.request?.url.toString()
apiUrl = response.raw().request.url.toString()
} catch (_: Exception) {}
val statusCode = errorResponse.statusCode
val methodName = NetworkErrorType.NETWORK_API_CODE.name

View File

@@ -8,6 +8,7 @@
package com.navi.common.useruploaddata.repository
import com.navi.analytics.utils.NaviTrackEvent
import com.navi.common.checkmate.model.MetricInfo
import com.navi.common.model.DeviceDetail
import com.navi.common.model.ModuleName
import com.navi.common.network.retrofit.ResponseCallback
@@ -18,15 +19,21 @@ import retrofit2.Response
class UserDataRepository : ResponseCallback() {
companion object {
const val TAG = "UserDataUploadStatus"
}
suspend fun getPreSignedUrlList(dataIngestionTypes: String, businessVertical: String) =
apiResponseCallback(
retrofitService()
.getPreSignedUrlList(ModuleName.LE.name, dataIngestionTypes, businessVertical)
.getPreSignedUrlList(ModuleName.LE.name, dataIngestionTypes, businessVertical),
metricInfo = MetricInfo.CommonMetric(screen = TAG, isNae = { false }),
)
suspend fun postIngestionStatus(ingestionStatusBody: IngestionStatusBody) =
apiResponseCallback(
retrofitService().postIngestionStatus(ModuleName.LE.name, ingestionStatusBody)
retrofitService().postIngestionStatus(ModuleName.LE.name, ingestionStatusBody),
metricInfo = MetricInfo.CommonMetric(screen = TAG, isNae = { false }),
)
suspend fun postZippedMessage(