Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions .github/workflows/android_cd.yml
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,8 @@ jobs:
run: |
echo "CARE_DEV_BASE_URL=${{ secrets.CARE_DEV_BASE_URL }}" >> local.properties
echo "CARE_PROD_BASE_URL=${{ secrets.CARE_PROD_BASE_URL }}" >> local.properties
echo "CARE_DEV_WEBSOCKET_URL=${{ secrets.CARE_DEV_WEBSOCKET_URL }}" >> local.properties
echo "CARE_PROD_WEBSOCKET_URL=${{ secrets.CARE_PROD_WEBSOCKET_URL }}" >> local.properties
echo "NAVER_BASE_URL=${{ secrets.NAVER_BASE_URL }}" >> local.properties
echo "NAVER_CLIENT_ID=${{ secrets.NAVER_CLIENT_ID }}" >> local.properties
echo "NAVER_CLIENT_SECRET=${{ secrets.NAVER_CLIENT_SECRET }}" >> local.properties
Expand Down
2 changes: 2 additions & 0 deletions .github/workflows/android_ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,8 @@ jobs:
run: |
echo "CARE_DEV_BASE_URL=${{ secrets.CARE_DEV_BASE_URL }}" >> local.properties
echo "CARE_PROD_BASE_URL=${{ secrets.CARE_PROD_BASE_URL }}" >> local.properties
echo "CARE_DEV_WEBSOCKET_URL=${{ secrets.CARE_DEV_WEBSOCKET_URL }}" >> local.properties
echo "CARE_PROD_WEBSOCKET_URL=${{ secrets.CARE_PROD_WEBSOCKET_URL }}" >> local.properties
echo "NAVER_BASE_URL=${{ secrets.NAVER_BASE_URL }}" >> local.properties
echo "NAVER_CLIENT_ID=${{ secrets.NAVER_CLIENT_ID }}" >> local.properties
echo "NAVER_CLIENT_SECRET=${{ secrets.NAVER_CLIENT_SECRET }}" >> local.properties
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -161,18 +161,25 @@ class ChatRepositoryImpl @Inject constructor(
receiverId: String,
senderName: String,
content: String,
userType: UserType,
): Result<Unit> = chatDataSource.sendMessage(
SendMessageRequest(
userType = userType,
sendMessageRequest = SendMessageRequest(
chatroomId = chatroomId,
receiverId = receiverId,
senderName = senderName,
content = content,
)
)

override suspend fun readMessage(chatroomId: String, opponentId: String): Result<Unit> =
override suspend fun readMessage(
chatroomId: String,
opponentId: String,
userType: UserType,
): Result<Unit> =
chatDataSource.readMessage(
ReadMessageRequest(
userType = userType,
readMessageRequest = ReadMessageRequest(
chatroomId = chatroomId,
opponentId = opponentId,
)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -41,10 +41,12 @@ interface ChatRepository {
receiverId: String,
senderName: String,
content: String,
userType: UserType,
): Result<Unit>

suspend fun readMessage(
chatroomId: String,
opponentId: String,
userType: UserType,
): Result<Unit>
}
Original file line number Diff line number Diff line change
Expand Up @@ -46,16 +46,16 @@ sealed class DeepLinkDestination(
data class ChattingDetail(
val chattingRoomId: String,
val myId: String,
val receiverUserType: String,
val myUserType: String,
val opponentId: String,
val fromJobPosting: Boolean,
) : DeepLinkDestination(
addressRes = R.string.chatting_detail_deeplink_url,
params = mapOf(
"chattingRoomId" to chattingRoomId,
"receiverId" to myId,
"receiverUserType" to receiverUserType,
"senderId" to opponentId,
"myId" to myId,
"myUserType" to myUserType,
"opponentId" to opponentId,
"fromJobPosting" to fromJobPosting,
)
)
Expand Down
2 changes: 1 addition & 1 deletion core/navigation/src/main/res/values/deeplinks.xml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
<string name="withdrawal_deeplink_url">care://withdrawal/{userType}</string>
<string name="signup_complete_deeplink_url">care://signup/complete</string>
<string name="new_password_deeplink_url">care://newPassword</string>
<string name="chatting_detail_deeplink_url">care://chatting/detail/{chattingRoomId}/{receiverId}/{receiverUserType}/{senderId}/{fromJobPosting}</string>
<string name="chatting_detail_deeplink_url">care://chatting/detail/{chattingRoomId}/{myId}/{myUserType}/{opponentId}/{fromJobPosting}</string>
<string name="chatting_see_all_chat_deeplink_url">care://chatting/seeallchat/{allChatContents}</string>

<string name="worker_signup_deeplink_url">care://signup/worker</string>
Expand Down
32 changes: 16 additions & 16 deletions core/network/src/main/java/com/idle/network/api/AuthApi.kt
Original file line number Diff line number Diff line change
Expand Up @@ -20,56 +20,56 @@ import retrofit2.http.POST
import retrofit2.http.Path

interface AuthApi {
@POST("/api/v1/auth/common/refresh")
@POST("api/v1/auth/common/refresh")
suspend fun refreshToken(@Body refreshTokenRequest: RefreshTokenRequest): Response<TokenResponse>

@POST("/api/v1/auth/common/send")
@POST("api/v1/auth/common/send")
suspend fun sendPhoneNumber(@Body sendPhoneRequest: SendPhoneRequest): Response<Unit>

@POST("/api/v1/auth/common/confirm")
@POST("api/v1/auth/common/confirm")
suspend fun confirmAuthCode(@Body confirmAuthCodeRequest: ConfirmAuthCodeRequest): Response<Unit>

@POST("/api/v1/auth/center/join")
@POST("api/v1/auth/center/join")
suspend fun signUpCenter(@Body signUpCenterRequest: SignUpCenterRequest): Response<Unit>

@POST("/api/v1/auth/center/login")
@POST("api/v1/auth/center/login")
suspend fun signInCenter(@Body signInCenterRequest: SignInCenterRequest): Response<TokenResponse>

@POST("/api/v1/auth/carer/join")
@POST("api/v1/auth/carer/join")
suspend fun signUpWorker(@Body signUpWorkerRequest: SignUpWorkerRequest): Response<TokenResponse>

@POST("/api/v1/auth/carer/login")
@POST("api/v1/auth/carer/login")
suspend fun signInWorker(@Body signInWorkerRequest: SignInWorkerRequest): Response<TokenResponse>

@POST("/api/v1/auth/center/logout")
@POST("api/v1/auth/center/logout")
suspend fun logoutCenter(): Response<Unit>

@POST("/api/v1/auth/carer/logout")
@POST("api/v1/auth/carer/logout")
suspend fun logoutWorker(): Response<Unit>

@POST("/api/v1/auth/center/withdraw")
@POST("api/v1/auth/center/withdraw")
suspend fun withdrawalCenter(
@Body withdrawalCenterRequest: WithdrawalCenterRequest
): Response<Unit>

@POST("/api/v1/auth/carer/withdraw")
@POST("api/v1/auth/carer/withdraw")
suspend fun withdrawalWorker(
@Body withdrawalWorkerRequest: WithdrawalWorkerRequest
): Response<Unit>

@GET("/api/v1/auth/center/validation/{identifier}")
@GET("api/v1/auth/center/validation/{identifier}")
suspend fun validateIdentifier(@Path("identifier") identifier: String): Response<Unit>

@GET("/api/v1/auth/center/authentication/{businessRegistrationNumber}")
@GET("api/v1/auth/center/authentication/{businessRegistrationNumber}")
suspend fun validateBusinessRegistrationNumber(
@Path("businessRegistrationNumber") businessRegistrationNumber: String
): Response<BusinessRegistrationResponse>

@PATCH("/api/v1/auth/center/password/new")
@PATCH("api/v1/auth/center/password/new")
suspend fun generateNewPassword(
@Body generateNewPasswordRequest: GenerateNewPasswordRequest
): Response<Unit>

@PATCH("/api/v1/auth/center/join/verify")
@PATCH("api/v1/auth/center/join/verify")
suspend fun sendCenterVerificationRequest(): Response<Unit>
}
}
12 changes: 6 additions & 6 deletions core/network/src/main/java/com/idle/network/api/ChatApi.kt
Original file line number Diff line number Diff line change
Expand Up @@ -10,25 +10,25 @@ import retrofit2.http.Path
import retrofit2.http.Query

interface ChatApi {
@GET("/api/v2/chat/carer/chatrooms")
@GET("api/v2/chat/carer/chatrooms")
suspend fun getWorkerChatRooms(): Response<List<GetChatRoomResponse>>

@GET("/api/v2/chat/center/chatrooms")
@GET("api/v2/chat/center/chatrooms")
suspend fun getCenterChatRooms(): Response<List<GetChatRoomResponse>>

@POST("/api/v2/chat/carer/chatrooms")
@POST("api/v2/chat/carer/chatrooms")
suspend fun generateWorkerChatRoom(@Query("opponentId") opponentId: String): Response<GenerateChatRoomResponse>

@POST("/api/v2/chat/carer/chatrooms")
@POST("api/v2/chat/carer/chatrooms")
suspend fun generateCenterChatRoom(@Query("opponentId") opponentId: String): Response<GenerateChatRoomResponse>

@GET("/api/v2/chat/carer/chatrooms/{chatroom-id}/messages")
@GET("api/v2/chat/carer/chatrooms/{chatroom-id}/messages")
suspend fun getWorkerChatRoomMessages(
@Path("chatroom-id") chatRoomId: String,
@Query("message-id") messageId: String?,
): Response<List<ChatMessageResponse>>

@GET("/api/v2/chat/center/chatrooms/{chatroom-id}/messages")
@GET("api/v2/chat/center/chatrooms/{chatroom-id}/messages")
suspend fun getCenterChatRoomMessages(
@Path("chatroom-id") chatRoomId: String,
@Query("message-id") messageId: String?,
Expand Down
38 changes: 19 additions & 19 deletions core/network/src/main/java/com/idle/network/api/JobPostingApi.kt
Original file line number Diff line number Diff line change
Expand Up @@ -23,84 +23,84 @@ import retrofit2.http.Path
import retrofit2.http.Query

interface JobPostingApi {
@POST("/api/v1/job-postings")
@POST("api/v1/job-postings")
suspend fun postJobPosting(@Body jobPostingRequest: JobPostingRequest): Response<Unit>

@PATCH("/api/v1/job-postings/{job-posting-id}")
@PATCH("api/v1/job-postings/{job-posting-id}")
suspend fun updateJobPosting(
@Path("job-posting-id") jobPostingId: String,
@Body jobPostingRequest: JobPostingRequest,
): Response<Unit>

@GET("/api/v1/job-postings/{job-posting-id}/center")
@GET("api/v1/job-postings/{job-posting-id}/center")
suspend fun getJobPostingDetailCenter(
@Path("job-posting-id") jobPostingId: String
): Response<GetCenterJobPostingDetailResponse>

@GET("/api/v1/job-postings")
@GET("api/v1/job-postings")
suspend fun getJobPostings(
@Query("next") next: String?,
@Query("limit") limit: Int,
): Response<GetJobPostingsResponse>

@GET("/api/v1/job-postings/carer/my/applied")
@GET("api/v1/job-postings/carer/my/applied")
suspend fun getJobPostingsApplied(
@Query("next") next: String?,
@Query("limit") limit: Int,
): Response<GetJobPostingsResponse>

@GET("/api/v1/job-postings/my/favorites")
@GET("api/v1/job-postings/my/favorites")
suspend fun getMyFavoriteJobPostings(): Response<GetFavoriteJobPostingsResponse>

@GET("/api/v1/crawling-job-postings/my/favorites")
@GET("api/v1/crawling-job-postings/my/favorites")
suspend fun getMyFavoriteCrawlingJobPostings(): Response<GetFavoriteCrawlingJobPostingsResponse>

@GET("/api/v1/job-postings/status/in-progress")
@GET("api/v1/job-postings/status/in-progress")
suspend fun getJobPostingsInProgress(): Response<GetJobPostingsCenterResponse>

@GET("/api/v1/job-postings/status/completed")
@GET("api/v1/job-postings/status/completed")
suspend fun getJobPostingsCompleted(): Response<GetJobPostingsCenterResponse>

@GET("/api/v1/job-postings/{job-posting-id}/applicant-count")
@GET("api/v1/job-postings/{job-posting-id}/applicant-count")
suspend fun getApplicantCount(
@Path("job-posting-id") jobPostingId: String
): Response<GetApplicantCountResponse>

@GET("/api/v1/job-postings/{job-posting-id}/carer")
@GET("api/v1/job-postings/{job-posting-id}/carer")
suspend fun getJobPostingDetailWorker(
@Path("job-posting-id") jobPostingId: String
): Response<GetWorkerJobPostingDetailResponse>

@GET("/api/v1/job-postings/{job-posting-id}/applicants")
@GET("api/v1/job-postings/{job-posting-id}/applicants")
suspend fun getApplicants(
@Path("job-posting-id") jobPostingId: String
): Response<GetApplicantsResponse>

@POST("/api/v1/applys")
@POST("api/v1/applys")
suspend fun applyJobPosting(@Body applyJobPostingRequest: ApplyJobPostingRequest): Response<Unit>

@POST("/api/v1/job-postings/{job-posting-id}/favorites")
@POST("api/v1/job-postings/{job-posting-id}/favorites")
suspend fun addFavoriteJobPosting(
@Path("job-posting-id") jobPostingId: String,
@Body favoriteJobPostingRequest: FavoriteJobPostingRequest,
): Response<Unit>

@DELETE("/api/v1/job-postings/{job-posting-id}/remove-favorites")
@DELETE("api/v1/job-postings/{job-posting-id}/remove-favorites")
suspend fun removeFavoriteJobPosting(@Path("job-posting-id") jobPostingId: String): Response<Unit>

@PATCH("/api/v1/job-postings/{job-posting-id}/end")
@PATCH("api/v1/job-postings/{job-posting-id}/end")
suspend fun endJobPosting(@Path("job-posting-id") jobPostingId: String): Response<Unit>

@DELETE("/api/v1/job-postings/{job-posting-id}")
@DELETE("api/v1/job-postings/{job-posting-id}")
suspend fun deleteJobPosting(@Path("job-posting-id") jobPostingId: String): Response<Unit>

@GET("/api/v1/crawling-job-postings")
@GET("api/v1/crawling-job-postings")
suspend fun getCrawlingJobPostings(
@Query("next") next: String?,
@Query("limit") limit: Int,
): Response<GetCrawlingJobPostingsResponse>

@GET("/api/v1/crawling-job-postings/{crawling-job-posting-id}")
@GET("api/v1/crawling-job-postings/{crawling-job-posting-id}")
suspend fun getCrawlingJobPostingsDetail(
@Path("crawling-job-posting-id") jobPostingId: String
): Response<GetCrawlingJobPostingDetailResponse>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,21 +14,21 @@ import retrofit2.http.Path
import retrofit2.http.Query

interface NotificationApi {
@POST("/api/v1/fcm/token")
@POST("api/v1/fcm/token")
suspend fun postFCMToken(@Body postFcmTokenRequest: PostFcmTokenRequest): Response<Unit>

@HTTP(method = "DELETE", path = "/api/v1/fcm/token", hasBody = true)
suspend fun deleteFCMToken(@Body deleteFcmTokenRequest: DeleteFcmTokenRequest): Response<Unit>

@GET("/api/v1/notifications/my")
@GET("api/v1/notifications/my")
suspend fun getMyNotifications(
@Query("next") next: String?,
@Query("limit") limit: Int,
): Response<GetMyNotificationResponse>

@PATCH("/api/v1/notifications/{notification-id}")
@PATCH("api/v1/notifications/{notification-id}")
suspend fun readNotification(@Path("notification-id") notificationId: String): Response<Unit>

@GET("/api/v1/notifications/count")
@GET("api/v1/notifications/count")
suspend fun getUnreadNotificationCount(): Response<GetUnreadNotificationCountResponse>
}
24 changes: 12 additions & 12 deletions core/network/src/main/java/com/idle/network/api/UserApi.kt
Original file line number Diff line number Diff line change
Expand Up @@ -21,20 +21,20 @@ import retrofit2.http.Query
import retrofit2.http.Url

interface UserApi {
@GET("/api/v1/users/center/my/profile")
@GET("api/v1/users/center/my/profile")
suspend fun getMyCenterProfile(): Response<GetCenterProfileResponse>

@PATCH("/api/v1/users/center/my/profile")
@PATCH("api/v1/users/center/my/profile")
suspend fun updateMyCenterProfile(
@Body updateCenterProfileRequest: UpdateCenterProfileRequest
): Response<Unit>

@GET("/api/v1/users/center/profile/{center-id}")
@GET("api/v1/users/center/profile/{center-id}")
suspend fun getCenterProfile(
@Path("center-id") centerId: String,
): Response<GetCenterProfileResponse>

@GET("/api/v1/users/{user-type}/my/profile-image/upload-url")
@GET("api/v1/users/{user-type}/my/profile-image/upload-url")
suspend fun getImageUploadUrl(
@Path("user-type") userType: String,
@Query("imageFileExtension") imageFileExtension: String,
Expand All @@ -46,33 +46,33 @@ interface UserApi {
@Body requestImage: RequestBody,
): Response<Unit>

@POST("/api/v1/users/{user-type}/my/profile-image/upload-callback")
@POST("api/v1/users/{user-type}/my/profile-image/upload-callback")
suspend fun callbackImageUpload(
@Path("user-type") userType: String,
@Body callbackImageUploadRequest: CallbackImageUploadRequest,
): Response<Unit>

@GET("/api/v1/users/carer/my/profile")
@GET("api/v1/users/carer/my/profile")
suspend fun getMyWorkerProfile(): Response<GetWorkerProfileResponse>

@GET("/api/v1/users/carer/profile/{carer-id}")
@GET("api/v1/users/carer/profile/{carer-id}")
suspend fun getWorkerProfile(
@Path("carer-id") workerId: String,
): Response<GetWorkerProfileResponse>

@PATCH("/api/v1/users/carer/my/profile")
@PATCH("api/v1/users/carer/my/profile")
suspend fun updateWorkerProfile(
@Body updateWorkerProfileRequest: UpdateWorkerProfileRequest
): Response<Unit>

@POST("/api/v1/users/center/my/profile")
@POST("api/v1/users/center/my/profile")
suspend fun registerCenterProfile(
@Body registerCenterProfileRequest: RegisterCenterProfileRequest
): Response<Unit>

@GET("/api/v1/logs/users/carer/my")
@GET("api/v1/logs/users/carer/my")
suspend fun getWorkerId(): Response<GetWorkerIdResponse>

@GET("/api/v1/auth/center/join/status")
@GET("api/v1/auth/center/join/status")
suspend fun getCenterStatus(): Response<GetCenterStatusResponse>
}
}
Loading