Skip to content

Commit b5091e7

Browse files
Update dep and reformat files
1 parent e2736ea commit b5091e7

File tree

6 files changed

+288
-99
lines changed

6 files changed

+288
-99
lines changed

pyproject.toml

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[project]
22
name = "solapi"
3-
version = "5.0.0"
3+
version = "5.0.1"
44
description = "SOLAPI SDK for Python"
55
authors = [
66
{ name = "SOLAPI Team", email = "contact@solapi.com" }
@@ -27,12 +27,13 @@ readme = "README.md"
2727
requires-python = ">=3.9"
2828
dependencies = [
2929
"httpx (>=0.28.1,<0.29.0)",
30-
"pydantic (>=2.10.6,<3.0.0)"
30+
"pydantic (>=2.11.4,<3.0.0)"
3131
]
3232

3333
[project.optional-dependencies]
3434
dev = [
35-
"ruff>=0.11.0"
35+
"ruff>=0.11.0",
36+
"pytest>=7.0.0"
3637
]
3738

3839
[build-system]

solapi/model/__init__.py

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,15 @@
11
from .kakao.kakao_option import KakaoOption
2-
from .message import Message
2+
from .message_type import MessageType
33
from .request.groups.get_groups import GetGroupsRequest
4+
from .request.message import Message as RequestMessage
45
from .request.send_message_request import SendRequestConfig
6+
from .response.message import Message as ResponseMessage
57

6-
__all__ = ["Message", "SendRequestConfig", "KakaoOption", "GetGroupsRequest"]
8+
__all__ = [
9+
"RequestMessage",
10+
"ResponseMessage",
11+
"SendRequestConfig",
12+
"KakaoOption",
13+
"GetGroupsRequest",
14+
"MessageType",
15+
]

solapi/model/kakao/kakao_button.py

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
from typing import Optional
2+
3+
from pydantic import BaseModel, ConfigDict
4+
from pydantic.alias_generators import to_camel
5+
6+
7+
class KakaoButton(BaseModel):
8+
link_mo: Optional[str] = None
9+
link_pc: Optional[str] = None
10+
button_name: Optional[str] = None
11+
# TODO: 추후 타입 추가 필요
12+
button_type: Optional[str] = None
13+
link_and: Optional[str] = None
14+
link_ios: Optional[str] = None
15+
16+
model_config = ConfigDict(alias_generator=to_camel, populate_by_name=True)

solapi/model/message_type.py

Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
from enum import Enum
2+
3+
4+
class MessageType(Enum):
5+
"""
6+
메시지 유형(단문 문자, 장문 문자, 알림톡 등)
7+
SMS: 단문 문자
8+
LMS: 장문 문자
9+
MMS: 사진 문자
10+
ATA: 알림톡
11+
CTA: 친구톡
12+
CTI: 사진 한장이 포함된 친구톡
13+
NSA: 네이버 스마트알림(톡톡)
14+
RCS_SMS: RCS 단문 문자
15+
RCS_LMS: RCS 장문 문자
16+
RCS_MMS: RCS 사진 문자
17+
RCS_TPL: RCS 템플릿
18+
RCS_ITPL: RCS 이미지 템플릿
19+
RCS_LTPL: RCS LMS 템플릿 문자
20+
FAX: 팩스
21+
VOICE: 음성문자(TTS)
22+
"""
23+
24+
SMS = "SMS"
25+
LMS = "LMS"
26+
MMS = "MMS"
27+
ATA = "ATA"
28+
CTA = "CTA"
29+
CTI = "CTI"
30+
NSA = "NSA"
31+
RCS_SMS = "RCS_SMS"
32+
RCS_LMS = "RCS_LMS"
33+
RCS_MMS = "RCS_MMS"
34+
RCS_TPL = "RCS_TPL"
35+
RCS_ITPL = "RCS_ITPL"
36+
RCS_LTPL = "RCS_LTPL"
37+
FAX = "FAX"
38+
VOICE = "VOICE"
39+
40+
def __str__(self) -> str:
41+
return self.value
42+
43+
def __repr__(self):
44+
return repr(self.value)

solapi/model/request/messages/get_messages.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
from pydantic.alias_generators import to_camel
66

77
from solapi.lib.string_date_transfer import format_with_transfer
8-
from solapi.model.message import MessageType
8+
from solapi.model.message_type import MessageType
99

1010

1111
class GetMessagesRequest(BaseModel):

0 commit comments

Comments
 (0)