1+ import {
2+ VoiceOptionSchema ,
3+ voiceOptionSchema ,
4+ } from '@/models/requests/voice/voiceOption' ;
15import {
26 KakaoOption ,
37 baseKakaoOptionSchema ,
@@ -40,8 +44,42 @@ export type MessageType =
4044 | 'RCS_ITPL'
4145 | 'RCS_LTPL'
4246 | 'FAX'
43- | 'VOICE' ;
47+ | 'VOICE'
48+ | 'BMS_TEXT'
49+ | 'BMS_IMAGE'
50+ | 'BMS_WIDE'
51+ | 'BMS_WIDE_ITEM_LIST'
52+ | 'BMS_CAROUSEL_FEED'
53+ | 'BMS_PREMIUM_VIDEO'
54+ | 'BMS_COMMERCE'
55+ | 'BMS_CAROUSEL_COMMERCE' ;
4456
57+ /**
58+ * 메시지 타입
59+ SMS: 단문 문자
60+ LMS: 장문 문자
61+ MMS: 사진 문자
62+ ATA: 알림톡
63+ CTA: 친구톡
64+ CTI: 친구톡 + 이미지
65+ NSA: 네이버 스마트 알림
66+ RCS_SMS: RCS 단문 문자
67+ RCS_LMS: RCS 장문 문자
68+ RCS_MMS: RCS 사진 문자
69+ RCS_TPL: RCS 템플릿 문자
70+ RCS_ITPL: RCS 이미지 템플릿 문자
71+ RCS_LTPL: RCS LMS 템플릿 문자
72+ FAX: 팩스
73+ VOICE: 보이스콜
74+ BMS_TEXT: 브랜드 메시지 텍스트형
75+ BMS_IMAGE: 브랜드 메시지 이미지형
76+ BMS_WIDE: 브랜드 메시지 와이드형
77+ BMS_WIDE_ITEM_LIST: 브랜드 메시지 와이드 아이템 리스트형
78+ BMS_CAROUSEL_FEED: 브랜드 메시지 캐러셀 피드형
79+ BMS_PREMIUM_VIDEO: 브랜드 메시지 프리미엄 비디오형
80+ BMS_COMMERCE: 브랜드 메시지 커머스형
81+ BMS_CAROUSEL_COMMERCE: 브랜드 메시지 캐러셀 커머스형
82+ */
4583export const messageTypeSchema = Schema . Literal (
4684 'SMS' ,
4785 'LMS' ,
@@ -58,6 +96,14 @@ export const messageTypeSchema = Schema.Literal(
5896 'RCS_LTPL' ,
5997 'FAX' ,
6098 'VOICE' ,
99+ 'BMS_TEXT' ,
100+ 'BMS_IMAGE' ,
101+ 'BMS_WIDE' ,
102+ 'BMS_WIDE_ITEM_LIST' ,
103+ 'BMS_CAROUSEL_FEED' ,
104+ 'BMS_PREMIUM_VIDEO' ,
105+ 'BMS_COMMERCE' ,
106+ 'BMS_CAROUSEL_COMMERCE' ,
61107) ;
62108
63109export const messageSchema = Schema . Struct ( {
@@ -75,10 +121,11 @@ export const messageSchema = Schema.Struct({
75121 customFields : Schema . optional (
76122 Schema . Record ( { key : Schema . String , value : Schema . String } ) ,
77123 ) ,
124+ naverOptions : Schema . optional ( naverOptionSchema ) ,
78125 faxOptions : Schema . optional (
79126 Schema . Struct ( { fileIds : Schema . Array ( Schema . String ) } ) ,
80127 ) ,
81- naverOptions : Schema . optional ( naverOptionSchema ) ,
128+ voiceOptions : Schema . optional ( voiceOptionSchema ) ,
82129} ) ;
83130
84131export type MessageSchema = Schema . Schema . Type < typeof messageSchema > ;
@@ -177,6 +224,8 @@ export class Message {
177224
178225 faxOptions ?: FileIds ;
179226
227+ voiceOptions ?: VoiceOptionSchema ;
228+
180229 constructor ( parameter : MessageSchema ) {
181230 this . to = parameter . to ;
182231 this . from = parameter . from ;
@@ -195,5 +244,6 @@ export class Message {
195244 this . customFields = parameter . customFields ;
196245 this . replacements = parameter . replacements ;
197246 this . faxOptions = parameter . faxOptions ;
247+ this . voiceOptions = parameter . voiceOptions ;
198248 }
199249}
0 commit comments