From 2dbae9824c1dd36cb5bdf3e0b3a65e35ce93ece6 Mon Sep 17 00:00:00 2001 From: Francis Date: Thu, 3 Feb 2022 18:50:24 +0900 Subject: [PATCH] ADD: normal meesage --- pyproject.toml | 2 +- rcs_pydantic/enums.py | 17 ++++++++++++++++- rcs_pydantic/main.py | 2 +- rcs_pydantic/scheme.py | 2 +- 4 files changed, 19 insertions(+), 4 deletions(-) diff --git a/pyproject.toml b/pyproject.toml index 6e49c90..623b631 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [tool.poetry] name = "rcs-pydantic" -version = "0.1.17" +version = "0.1.18" description = "" authors = ["xncbf "] keywords = ["pydantic", "rcs", "fastapi"] diff --git a/rcs_pydantic/enums.py b/rcs_pydantic/enums.py index 685457a..d41da74 100644 --- a/rcs_pydantic/enums.py +++ b/rcs_pydantic/enums.py @@ -71,7 +71,7 @@ class EventTypeEnum(Enum): NEW_USER: str = "newuser" -class MessageEnum(Enum): +class RCSMessageEnum(Enum): STANDALONE_1: str = "SCS00000" # 기본 말풍선 STANDALONE_2: str = "SCL00000" # 텍스트 카드 CAROUSEL_MEDIUM_1: str = "CCwMhM0200" # 슬라이드형(Medium, 2장) @@ -86,3 +86,18 @@ class MessageEnum(Enum): CAROUSEL_SMALL_5: str = "CCwShS0600" # 슬라이드형(Small, 6장) STANDALONE_MEDIA_TOP_1: str = "SCwThT00" # 세로형(Tall) STANDALONE_MEDIA_TOP_2: str = "SCwThM00" # 세로형(Medium) + + +class MessageEnum(Enum): + STANDALONE_1: str = "SS000000" # 기본 말풍선 + STANDALONE_2: str = "SL000000" # 텍스트 카드 + STANDALONE_MEDIA_TOP_1: str = "SMwThT00" # 세로형(Tall) + STANDALONE_MEDIA_TOP_2: str = "SMwThM00" # 세로형(Medium) + CAROUSEL_MEDIUM_2: str = "CMwMhM0300" # 슬라이드형(Medium, 3장) + CAROUSEL_MEDIUM_3: str = "CMwMhM0400" # 슬라이드형(Medium, 4장) + CAROUSEL_MEDIUM_4: str = "CMwMhM0500" # 슬라이드형(Medium, 5장) + CAROUSEL_MEDIUM_5: str = "CMwMhM0600" # 슬라이드형(Medium, 6장) + CAROUSEL_SMALL_2: str = "CMwShS0300" # 슬라이드형(Small, 3장) + CAROUSEL_SMALL_3: str = "CMwShS0400" # 슬라이드형(Small, 4장) + CAROUSEL_SMALL_4: str = "CMwShS0500" # 슬라이드형(Small, 5장) + CAROUSEL_SMALL_5: str = "CMwShS0600" # 슬라이드형(Small, 6장) diff --git a/rcs_pydantic/main.py b/rcs_pydantic/main.py index da5707f..93c45ef 100644 --- a/rcs_pydantic/main.py +++ b/rcs_pydantic/main.py @@ -17,7 +17,7 @@ def __init__( scheme.RcsTMPLBody, ], agency_id: Optional[str] = None, - message_base_id: enums.MessageEnum = enums.MessageEnum.STANDALONE_1, + message_base_id: Union[enums.MessageEnum, enums.RCSMessageEnum] = enums.MessageEnum.STANDALONE_1, service_type: enums.ServiceTypeEnum = enums.ServiceTypeEnum.SMS, expiry_option: Optional[enums.ExpiryOptionEnum] = None, header: enums.HeaderEnum = enums.HeaderEnum.NOT_ADVERTISE, diff --git a/rcs_pydantic/scheme.py b/rcs_pydantic/scheme.py index eba8b80..dd9bac0 100644 --- a/rcs_pydantic/scheme.py +++ b/rcs_pydantic/scheme.py @@ -262,7 +262,7 @@ class RcsInfo(BaseModel): * Agency ID는 "Rcs Biz Center - 브랜드 운영관리" 에서 기업의 브랜드가 대행사 권한을 부여한 대행사의 ID Agency ID가 "ktbizrcs" 가 아닌 경우 필수 입력 필요. """ - messagebaseId: enums.MessageEnum + messagebaseId: Union[enums.MessageEnum, enums.RCSMessageEnum] serviceType: enums.ServiceTypeEnum expiryOption: Optional[enums.ExpiryOptionEnum] """