Merge pull request 'develop' (#42) from develop into master

Reviewed-on: #42
This commit is contained in:
2026-11-02 12:13:28 +09:00
6 changed files with 42 additions and 0 deletions

View File

@@ -13,6 +13,7 @@ import com.kri.common.feature.web.RequestUserContext;
import com.kri.contact.server.common.external.notihub.dto.NotiHubBulkSendCreateRequestDto;
import com.kri.contact.server.common.external.notihub.dto.NotiHubBulkSendInfoDto;
import com.kri.contact.server.common.external.notihub.dto.NotiHubBulkSendResponseDto;
import com.kri.contact.server.common.external.notihub.dto.NotiHubKkoSenderProfileDto;
import com.kri.contact.server.common.external.notihub.dto.NotiHubKkoTemplateDetailDto;
import com.kri.contact.server.common.external.notihub.dto.NotiHubKkoTemplateDetailRequestDto;
import com.kri.contact.server.common.external.notihub.dto.NotiHubKkoTemplateListRequestDto;
@@ -132,6 +133,13 @@ public class NotiHubApiClient {
return sendBulk("/send-kko/bulk", request);
}
public ResponseEntity<List<NotiHubKkoSenderProfileDto>> getKkoSenderProfiles(
HttpServletRequest request,
RequestUserContext ctx
) {
return relay(request, null, new ParameterizedTypeReference<>() {}, ctx);
}
public ResponseEntity<NotiHubKkoTemplateListResponseDto> getKkoTemplateList(
NotiHubKkoTemplateListRequestDto body,
HttpServletRequest request,

View File

@@ -0,0 +1,11 @@
package com.kri.contact.server.common.external.notihub.dto;
import io.swagger.v3.oas.annotations.media.Schema;
@Schema(description = "Kakao sender profile")
public record NotiHubKkoSenderProfileDto(
String senderKey,
String name,
String uuid
) {
}

View File

@@ -1,11 +1,14 @@
package com.kri.contact.server.common.external.notihub.dto;
import io.swagger.v3.oas.annotations.media.Schema;
import jakarta.validation.constraints.NotBlank;
import jakarta.validation.constraints.Pattern;
import jakarta.validation.constraints.Size;
public record NotiHubKkoTemplateDetailRequestDto(
@Schema(description = "Selected sender profile key; validated by NotiHub", requiredMode = Schema.RequiredMode.REQUIRED)
String senderKey,
@NotBlank
@Size(max = 30)
@Pattern(regexp = "[A-Za-z0-9_-]+")

View File

@@ -1,9 +1,12 @@
package com.kri.contact.server.common.external.notihub.dto;
import io.swagger.v3.oas.annotations.media.Schema;
import jakarta.validation.constraints.Size;
public record NotiHubKkoTemplateListRequestDto(
@Schema(description = "Selected sender profile key; validated by NotiHub", requiredMode = Schema.RequiredMode.REQUIRED)
String senderKey,
@Size(min = 2, max = 50)
String keyword
) {

View File

@@ -1,6 +1,7 @@
package com.kri.contact.server.controller;
import com.kri.common.feature.web.RequestUserContext;
import com.kri.contact.server.common.external.notihub.dto.NotiHubKkoSenderProfileDto;
import com.kri.contact.server.common.external.notihub.dto.NotiHubKkoTemplateDetailDto;
import com.kri.contact.server.common.external.notihub.dto.NotiHubKkoTemplateDetailRequestDto;
import com.kri.contact.server.common.external.notihub.dto.NotiHubKkoTemplateListRequestDto;
@@ -37,6 +38,14 @@ public class MessageTemplateController {
private final MessageTemplateService messageTemplateService;
@GetMapping("/kko/profiles")
public ResponseEntity<List<NotiHubKkoSenderProfileDto>> getKkoSenderProfiles(
HttpServletRequest request,
RequestUserContext ctx
) {
return messageTemplateService.getKkoSenderProfiles(request, ctx);
}
@PostMapping(value = "/kko/list", consumes = MediaType.APPLICATION_JSON_VALUE)
public ResponseEntity<NotiHubKkoTemplateListResponseDto> getKkoTemplateList(
@Valid @RequestBody NotiHubKkoTemplateListRequestDto body,

View File

@@ -2,6 +2,7 @@ package com.kri.contact.server.service;
import com.kri.common.feature.web.BusinessException;
import com.kri.common.feature.web.RequestUserContext;
import com.kri.contact.server.common.external.notihub.dto.NotiHubKkoSenderProfileDto;
import com.kri.contact.server.common.external.notihub.dto.NotiHubKkoTemplateDetailDto;
import com.kri.contact.server.common.external.notihub.dto.NotiHubKkoTemplateDetailRequestDto;
import com.kri.contact.server.common.external.notihub.dto.NotiHubKkoTemplateListRequestDto;
@@ -25,6 +26,13 @@ public class MessageTemplateService {
private final NotiHubApiClient notiHubApiClient;
private final ProjectMainTemplateRepository projectMainTemplateRepository;
public ResponseEntity<List<NotiHubKkoSenderProfileDto>> getKkoSenderProfiles(
HttpServletRequest request,
RequestUserContext ctx
) {
return notiHubApiClient.getKkoSenderProfiles(request, ctx);
}
public ResponseEntity<NotiHubKkoTemplateListResponseDto> getKkoTemplateList(
NotiHubKkoTemplateListRequestDto body,
HttpServletRequest request,