solapi
Version:
SOLAPI SDK for Node.js(Server Side Only)
1,695 lines (1,660 loc) • 97 kB
TypeScript
import { Schema } from 'effect';
import * as effect_Cause from 'effect/Cause';
import * as effect_Types from 'effect/Types';
type Count = {
total: number;
sentTotal: number;
sentFailed: number;
sentSuccess: number;
sentPending: number;
sentReplacement: number;
refund: number;
registeredFailed: number;
registeredSuccess: number;
};
type CountryChargeStatus = Record<string, number>;
type CountForCharge = {
sms: CountryChargeStatus;
lms: CountryChargeStatus;
mms: CountryChargeStatus;
ata: CountryChargeStatus;
cta: CountryChargeStatus;
cti: CountryChargeStatus;
nsa: CountryChargeStatus;
rcs_sms: CountryChargeStatus;
rcs_lms: CountryChargeStatus;
rcs_mms: CountryChargeStatus;
rcs_tpl: CountryChargeStatus;
};
type CommonCashResponse = {
requested: number;
replacement: number;
refund: number;
sum: number;
};
type MessageTypeRecord = {
sms: number;
lms: number;
mms: number;
ata: number;
cta: number;
cti: number;
nsa: number;
rcs_sms: number;
rcs_lms: number;
rcs_mms: number;
rcs_tpl: number;
};
type App = {
profit: MessageTypeRecord;
appId: string | null | undefined;
};
type Log = Array<object>;
type GroupId = string;
type Group = {
count: {
total: number;
sentTotal: number;
sentFailed: number;
sentSuccess: number;
sentPending: number;
sentReplacement: number;
refund: number;
registeredFailed: number;
registeredSuccess: number;
};
balance: CommonCashResponse;
point: CommonCashResponse;
app: App;
sdkVersion: string;
osPlatform: string;
log: Log;
status: string;
scheduledDate?: string;
dateSent?: string;
dateCompleted?: string;
isRefunded: boolean;
groupId: GroupId;
accountId: string;
countForCharge: CountForCharge;
dateCreated: string;
dateUpdated: string;
};
type HandleKey = string;
type Black = {
handleKey: HandleKey;
type: 'DENIAL';
senderNumber: string;
recipientNumber: string;
dateCreated: string;
dateUpdated: string;
};
type BlockGroup = {
blockGroupId: string;
accountId: string;
status: 'INACTIVE' | 'ACTIVE';
name: string;
useAll: boolean;
senderNumbers: string[];
dateCreated: string;
dateUpdated: string;
};
type BlockNumber = {
blockNumberId: string;
accountId: string;
memo: string;
phoneNumber: string;
blockGroupIds: string[];
dateCreated: string;
dateUpdated: string;
};
/**
* @name "카카오 버튼타입"
*/
type KakaoButtonType = 'WL' | 'AL' | 'BK' | 'MD' | 'DS' | 'BC' | 'BT' | 'AC';
type KakaoWebButton = {
buttonName: string;
buttonType: Extract<KakaoButtonType, 'WL'>;
linkMo: string;
linkPc?: string | null;
linkAnd?: never;
linkIos?: never;
};
type KakaoAppButton = {
buttonName: string;
buttonType: Extract<KakaoButtonType, 'AL'>;
linkMo?: never;
linkPc?: never;
linkAnd: string;
linkIos: string;
};
type KakaoDefaultButton = {
buttonName: string;
buttonType: Exclude<KakaoButtonType, 'WL' | 'AL'>;
linkMo?: never;
linkPc?: never;
linkAnd?: never;
linkIos?: never;
};
type KakaoButton = KakaoWebButton | KakaoAppButton | KakaoDefaultButton;
type kakaoOptionRequest = {
pfId: string;
templateId?: string;
variables?: Record<string, string>;
disableSms?: boolean;
adFlag?: boolean;
buttons?: ReadonlyArray<KakaoButton>;
imageId?: string;
};
declare class KakaoOption {
pfId: string;
templateId?: string;
variables?: Record<string, string>;
disableSms?: boolean;
adFlag?: boolean;
buttons?: ReadonlyArray<KakaoButton>;
imageId?: string;
constructor(parameter: kakaoOptionRequest);
}
/**
* @name "RCS 버튼타입"
*/
type RcsButtonType = 'WL' | 'ML' | 'MQ' | 'MR' | 'CA' | 'CL' | 'DL' | 'MS';
type RcsWebButton = {
buttonName: string;
buttonType: Extract<RcsButtonType, 'WL'>;
link: string;
};
type RcsMapButton = {
buttonName: string;
buttonType: Extract<RcsButtonType, 'ML'>;
latitude: string;
longitude: string;
};
type RcsDefaultButton = {
buttonName: string;
buttonType: Exclude<RcsButtonType, 'WL'>;
link: string;
};
type RcsButton = RcsWebButton | RcsMapButton | RcsDefaultButton;
/**
* RCS 사진문자 발송 시 필요한 오브젝트
*/
type AdditionalBody = {
/**
* 슬라이드 제목
*/
title: string;
/**
* 슬라이드 설명
*/
description: string;
/**
* MMS 발송 시 사용되는 이미지의 고유 아이디. 이미지 타입이 MMS일 경우에만 사용 가능합니다.
* @see https://console.solapi.com/storage
* @see https://developers.solapi.com/references/storage
*/
imaggeId?: string;
/**
* 슬라이드에 추가되는 버튼 목록, 최대 2개
*/
buttons?: ReadonlyArray<RcsButton>;
};
/**
* RCS 발송을 위한 파라미터 타입
*/
type RcsOptionRequest = {
/**
* RCS 채널의 브랜드 ID
*/
brandId: string;
/**
* RCS 템플릿 ID
*/
templateId?: string;
/**
* 문자 복사 가능 여부
*/
copyAllowed?: boolean;
/**
* RCS 템플릿 대체 문구 입력 오브젝트
* 예) { #{치환문구1} : "치환문구 값" }
*/
variables?: Record<string, string>;
/**
* 사진 문자 타입. 타입: "M3", "S3", "M4", "S4", "M5", "S5", "M6", "S6" (M: 중간 사이즈. S: 작은 사이즈. 숫자: 사진 개수)
*/
mmsType?: 'M3' | 'S3' | 'M4' | 'S4' | 'M5' | 'S5' | 'M6' | 'S6';
/**
* 광고 문자 여부
*/
commercialType?: boolean;
/**
* 대체발송여부. false 로 설정했을 경우 해당건이 발송에 실패하게 됐을 때 문자로(SMS, LMS, MMS)로 대체 발송됩니다. 대체 발송이 될 경우 기존 가격은 환불되고 각 문자 타입에 맞는 금액이 차감됩니다. 기본값: false
*/
disableSms?: boolean;
/**
* RCS 사진 문자 전송 시 필요한 오브젝트
*/
additionalBody?: AdditionalBody;
/**
* RCS 템플릿 버튼 배열
*/
buttons?: ReadonlyArray<RcsButton>;
};
declare class RcsOption {
brandId: string;
templateId?: string;
copyAllowed?: boolean;
variables?: Record<string, string>;
mmsType?: 'M3' | 'S3' | 'M4' | 'S4' | 'M5' | 'S5' | 'M6' | 'S6';
commercialType?: boolean;
disableSms?: boolean;
additionalBody?: AdditionalBody;
buttons?: ReadonlyArray<RcsButton>;
constructor(parameter: RcsOptionRequest);
}
declare const sendRequestConfigSchema: Schema.Struct<{
scheduledDate: Schema.optional<Schema.transform<Schema.Union<[typeof Schema.DateFromSelf, typeof Schema.DateFromString]>, typeof Schema.String>>;
allowDuplicates: Schema.optional<typeof Schema.Boolean>;
appId: Schema.optional<typeof Schema.String>;
showMessageList: Schema.optional<typeof Schema.Boolean>;
}>;
type SendRequestConfigSchema = Schema.Schema.Type<typeof sendRequestConfigSchema>;
/**
* 그룹 내 메시지 목록 조회 요청
*/
type GetGroupMessagesRequest = {
startKey?: string;
limit?: number;
};
/**
* Storage API에서 사용하는 파일 ID 컬렉션 타입
*/
type FileIds = {
fileIds: ReadonlyArray<string>;
};
type FileType = 'KAKAO' | 'MMS' | 'DOCUMENT' | 'RCS' | 'FAX';
declare const voiceOptionSchema: Schema.Struct<{
voiceType: Schema.Literal<["FEMALE", "MALE"]>;
headerMessage: Schema.optional<typeof Schema.String>;
tailMessage: Schema.optional<typeof Schema.String>;
replyRange: Schema.optional<Schema.Literal<[1, 2, 3, 4, 5, 6, 7, 8, 9]>>;
counselorNumber: Schema.optional<typeof Schema.String>;
}>;
type VoiceOptionSchema = Schema.Schema.Type<typeof voiceOptionSchema>;
/**
* @name MessageType 메시지 유형(단문 문자, 장문 문자, 알림톡 등)
* SMS: 단문 문자
* LMS: 장문 문자
* MMS: 사진 문자
* ATA: 알림톡
* CTA: 친구톡
* CTI: 사진 한장이 포함된 친구톡
* NSA: 네이버 스마트알림(톡톡)
* RCS_SMS: RCS 단문 문자
* RCS_LMS: RCS 장문 문자
* RCS_MMS: RCS 사진 문자
* RCS_TPL: RCS 템플릿
* RCS_ITPL: RCS 이미지 템플릿
* RCS_LTPL: RCS LMS 템플릿 문자
* FAX: 팩스
* VOICE: 음성문자(TTS)
*/
type MessageType = 'SMS' | 'LMS' | 'MMS' | 'ATA' | 'CTA' | 'CTI' | 'NSA' | 'RCS_SMS' | 'RCS_LMS' | 'RCS_MMS' | 'RCS_TPL' | 'RCS_ITPL' | 'RCS_LTPL' | 'FAX' | 'VOICE' | 'BMS_TEXT' | 'BMS_IMAGE' | 'BMS_WIDE' | 'BMS_WIDE_ITEM_LIST' | 'BMS_CAROUSEL_FEED' | 'BMS_PREMIUM_VIDEO' | 'BMS_COMMERCE' | 'BMS_CAROUSEL_COMMERCE';
declare const messageSchema: Schema.Struct<{
to: Schema.Union<[typeof Schema.String, Schema.Array$<typeof Schema.String>]>;
from: Schema.optional<typeof Schema.String>;
text: Schema.optional<typeof Schema.String>;
imageId: Schema.optional<typeof Schema.String>;
type: Schema.optional<Schema.Literal<["SMS", "LMS", "MMS", "ATA", "CTA", "CTI", "NSA", "RCS_SMS", "RCS_LMS", "RCS_MMS", "RCS_TPL", "RCS_ITPL", "RCS_LTPL", "FAX", "VOICE", "BMS_TEXT", "BMS_IMAGE", "BMS_WIDE", "BMS_WIDE_ITEM_LIST", "BMS_CAROUSEL_FEED", "BMS_PREMIUM_VIDEO", "BMS_COMMERCE", "BMS_CAROUSEL_COMMERCE"]>>;
subject: Schema.optional<typeof Schema.String>;
autoTypeDetect: Schema.optional<typeof Schema.Boolean>;
kakaoOptions: Schema.optional<Schema.Struct<{
pfId: typeof Schema.String;
templateId: Schema.optional<typeof Schema.String>;
variables: Schema.optional<Schema.transform<Schema.Record$<typeof Schema.String, typeof Schema.String>, Schema.Record$<typeof Schema.String, typeof Schema.String>>>;
disableSms: Schema.optional<typeof Schema.Boolean>;
adFlag: Schema.optional<typeof Schema.Boolean>;
imageId: Schema.optional<typeof Schema.String>;
buttons: Schema.optional<Schema.Array$<Schema.Union<[Schema.Struct<{
buttonName: typeof Schema.String;
buttonType: Schema.Literal<["WL"]>;
linkMo: typeof Schema.String;
linkPc: Schema.optional<Schema.NullOr<typeof Schema.String>>;
}>, Schema.Struct<{
buttonName: typeof Schema.String;
buttonType: Schema.Literal<["AL"]>;
linkAnd: typeof Schema.String;
linkIos: typeof Schema.String;
}>, Schema.Struct<{
buttonName: typeof Schema.String;
buttonType: Schema.Literal<["BK", "MD", "DS", "BC", "BT", "AC"]>;
}>]>>>;
bms: Schema.optional<Schema.Struct<{
targeting: Schema.Literal<["I", "M", "N"]>;
}>>;
}>>;
rcsOptions: Schema.optional<Schema.Struct<{
brandId: typeof Schema.String;
templateId: Schema.optional<typeof Schema.String>;
copyAllowed: Schema.optional<typeof Schema.Boolean>;
variables: Schema.optional<Schema.Record$<typeof Schema.String, typeof Schema.String>>;
mmsType: Schema.optional<Schema.Literal<["M3", "S3", "M4", "S4", "M5", "S5", "M6", "S6"]>>;
commercialType: Schema.optional<typeof Schema.Boolean>;
disableSms: Schema.optional<typeof Schema.Boolean>;
additionalBody: Schema.optional<Schema.Struct<{
title: typeof Schema.String;
description: typeof Schema.String;
imaggeId: Schema.optional<typeof Schema.String>;
buttons: Schema.optional<Schema.Array$<Schema.Union<[Schema.Struct<{
buttonName: typeof Schema.String;
buttonType: Schema.Literal<["WL"]>;
link: typeof Schema.String;
}>, Schema.Struct<{
buttonName: typeof Schema.String;
buttonType: Schema.Literal<["ML"]>;
latitude: typeof Schema.String;
longitude: typeof Schema.String;
}>, Schema.Struct<{
buttonName: typeof Schema.String;
buttonType: Schema.Literal<["MQ", "MR", "CA", "CL", "DL", "MS"]>;
link: typeof Schema.String;
}>]>>>;
}>>;
buttons: Schema.optional<Schema.Array$<Schema.Union<[Schema.Struct<{
buttonName: typeof Schema.String;
buttonType: Schema.Literal<["WL"]>;
link: typeof Schema.String;
}>, Schema.Struct<{
buttonName: typeof Schema.String;
buttonType: Schema.Literal<["ML"]>;
latitude: typeof Schema.String;
longitude: typeof Schema.String;
}>, Schema.Struct<{
buttonName: typeof Schema.String;
buttonType: Schema.Literal<["MQ", "MR", "CA", "CL", "DL", "MS"]>;
link: typeof Schema.String;
}>]>>>;
}>>;
country: Schema.optional<typeof Schema.String>;
replacements: Schema.optional<Schema.Array$<Schema.Struct<{}>>>;
customFields: Schema.optional<Schema.Record$<typeof Schema.String, typeof Schema.String>>;
naverOptions: Schema.optional<Schema.Struct<{
talkId: typeof Schema.String;
templateId: typeof Schema.String;
disableSms: Schema.optional<typeof Schema.Boolean>;
variables: Schema.optional<Schema.Record$<typeof Schema.String, typeof Schema.String>>;
buttons: Schema.optional<Schema.Array$<Schema.Struct<{
buttonName: typeof Schema.String;
buttonType: typeof Schema.String;
linkMo: Schema.optional<typeof Schema.String>;
linkPc: Schema.optional<typeof Schema.String>;
linkAnd: Schema.optional<typeof Schema.String>;
linkIos: Schema.optional<typeof Schema.String>;
}>>>;
}>>;
faxOptions: Schema.optional<Schema.Struct<{
fileIds: Schema.Array$<typeof Schema.String>;
}>>;
voiceOptions: Schema.optional<Schema.Struct<{
voiceType: Schema.Literal<["FEMALE", "MALE"]>;
headerMessage: Schema.optional<typeof Schema.String>;
tailMessage: Schema.optional<typeof Schema.String>;
replyRange: Schema.optional<Schema.Literal<[1, 2, 3, 4, 5, 6, 7, 8, 9]>>;
counselorNumber: Schema.optional<typeof Schema.String>;
}>>;
}>;
type MessageSchema = Schema.Schema.Type<typeof messageSchema>;
/**
* 메시지 모델, 전체적인 메시지 발송을 위한 파라미터는 이 Message 모델에서 관장함
*/
declare class Message {
/**
* 수신번호
*/
to: string | ReadonlyArray<string>;
/**
* 발신번호
*/
from?: string;
/**
* 메시지 내용
*/
text?: string;
/**
* 메시지 생성일자
*/
dateCreated?: string;
/**
* 메시지 수정일자
*/
dateUpdated?: string;
/**
* 메시지의 그룹 ID
*/
groupId?: string;
/**
* 해당 메시지의 ID
*/
messageId?: string;
/**
* MMS 전용 스토리지(이미지) ID
*/
imageId?: string;
/**
* @name MessageType 메시지 유형
*/
type?: MessageType;
/**
* 문자 제목(LMS, MMS 전용)
*/
subject?: string;
/**
* 메시지 타입 감지 여부(비활성화 시 반드시 타입이 명시 되어야 함)
*/
autoTypeDetect?: boolean;
/**
* 카카오 알림톡/친구톡을 위한 프로퍼티
*/
kakaoOptions?: KakaoOption;
/**
* RCS 메시지를 위한 프로퍼티
*/
rcsOptions?: RcsOption;
/**
* 해외 문자 발송을 위한 국가번호(예) "82", "1" 등)
*/
country?: string;
/**
* 메시지 로그
*/
log?: ReadonlyArray<object>;
replacements?: ReadonlyArray<object>;
/**
* 메시지 상태 코드
* @see https://developers.solapi.com/references/message-status-codes
*/
statusCode?: string;
/**
* 사용자를 위한 사용자만의 커스텀 값을 입력할 수 있는 필드
* 단, 오브젝트 내 키 값 모두 문자열 형태로 입력되어야 합니다.
*/
customFields?: Record<string, string>;
faxOptions?: FileIds;
voiceOptions?: VoiceOptionSchema;
constructor(parameter: MessageSchema);
}
type SingleMessageSentResponse = {
groupId: string;
to: string;
from: string;
type: MessageType;
statusMessage: string;
country: string;
messageId: string;
statusCode: string;
accountId: string;
};
type GroupMessageResponse = {
count: Count;
countForCharge: CountForCharge;
balance: CommonCashResponse;
point: CommonCashResponse;
app: App;
log: Log;
status: string;
allowDuplicates: boolean;
isRefunded: boolean;
accountId: string;
masterAccountId: string | null;
apiVersion: string;
groupId: string;
price: object;
dateCreated: string;
dateUpdated: string;
scheduledDate?: string;
dateSent?: string;
dateCompleted?: string;
};
type AddMessageResult = {
to: string;
from: string;
type: string;
country: string;
messageId: string;
statusCode: string;
statusMessage: string;
accountId: string;
customFields?: Record<string, string>;
};
type AddMessageResponse = {
errorCount: string;
resultList: Array<AddMessageResult>;
};
type GetMessagesResponse = {
startKey: string | null;
nextKey: string | null;
limit: number;
messageList: Record<string, Message>;
};
type RemoveGroupMessagesResponse = {
groupId: GroupId;
errorCount: number;
resultList: Array<{
messageId: string;
resultCode: string;
}>;
};
type GetGroupsResponse = {
startKey: string | null | undefined;
limit: number;
nextKey: string | null | undefined;
groupList: Record<GroupId, Group>;
};
type StatisticsPeriodResult = {
total: number;
sms: number;
lms: number;
mms: number;
ata: number;
cta: number;
cti: number;
nsa: number;
rcs_sms: number;
rcs_lms: number;
rcs_mms: number;
rcs_tpl: number;
};
type GetStatisticsResponse = {
balance: number;
point: number;
monthlyBalanceAvg: number;
monthlyPointAvg: number;
monthPeriod: Array<{
date: string;
balance: number;
balanceAvg: number;
point: number;
pointAvg: number;
dayPeriod: Array<{
_id: string;
month: string;
balance: number;
point: number;
statusCode: Record<string, MessageTypeRecord>;
refund: {
balance: number;
point: number;
};
total: StatisticsPeriodResult;
successed: StatisticsPeriodResult;
failed: StatisticsPeriodResult;
}>;
refund: {
balance: number;
balanceAvg: number;
point: number;
pointAvg: number;
};
total: StatisticsPeriodResult;
successed: StatisticsPeriodResult;
failed: StatisticsPeriodResult;
}>;
total: StatisticsPeriodResult;
successed: StatisticsPeriodResult;
failed: StatisticsPeriodResult;
dailyBalanceAvg: number;
dailyPointAvg: number;
dailyTotalCountAvg: number;
dailyFailedCountAvg: number;
dailySuccessedCountAvg: number;
};
type GetBalanceResponse = {
balance: number;
point: number;
};
type FileUploadResponse = {
fileId: string;
type: string;
link: string | null | undefined;
};
type RequestKakaoChannelTokenResponse = {
success: boolean;
};
type CreateKakaoChannelResponse = {
accountId: string;
phoneNumber: string;
searchId: string;
dateCreated: string;
dateUpdated: string;
channelId: string;
};
type DefaultServiceParameter<T> = {
httpMethod: 'GET' | 'POST' | 'PUT' | 'DELETE' | 'PATCH';
url: string;
body?: T;
};
declare class DefaultService {
private readonly baseUrl;
private readonly authInfo;
constructor(apiKey: string, apiSecret: string);
protected request<T, R>(parameter: DefaultServiceParameter<T>): Promise<R>;
}
declare class CashService extends DefaultService {
constructor(apiKey: string, apiSecret: string);
/**
* 잔액조회
* @returns GetBalanceResponse
*/
getBalance(): Promise<GetBalanceResponse>;
}
interface GetBlacksRequest {
/**
* @description 080 수신거부를 요청한 수신번호
*/
senderNumber?: string;
/**
* @description 페이지네이션 조회 키
*/
startKey?: string;
/**
* @description 조회 시 제한할 건 수 (기본: 20, 최대: 500)
*/
limit?: number;
/**
* @description 조회할 시작 날짜
*/
startDate?: string | Date;
/**
* @description 조회할 종료 날짜
*/
endDate?: string | Date;
}
interface GetBlockGroupsRequest {
/**
* @description 수신 거부 그룹 핸들키
*/
blockGroupId?: string;
/**
* @description 수신 거부 그룹에 등록된 모든 발신번호 적용 여부.
*/
useAll?: boolean;
/**
* @description 수신 거부 그룹에 등록된 발신번호
*/
senderNumber?: string;
/**
* @description 수신 거부 그룹 이름 (부분 검색 가능)
*/
name?: {
like: string;
} | string;
/**
* @description 수신 거부 그룹 활성화 상태
*/
status?: 'ACTIVE' | 'INACTIVE';
/**
* @description 페이지네이션 조회 키
*/
startKey?: string;
/**
* @description 조회 시 제한할 건 수 (기본: 20, 최대: 500)
*/
limit?: number;
}
interface GetBlockNumbersRequest {
/**
* @description 수신 차단 그룹 별 수신번호 핸들키
*/
blockNumberId?: string;
/**
* @description 해당 그룹의 발신번호를 차단한 수신번호
*/
phoneNumber?: string;
/**
* @description 수신 차단 그룹 핸들키
*/
blockGroupId?: string;
/**
* @description 수신 차단 그룹 별 수신번호 목록에 대한 메모 (부분 검색 가능)
*/
memo?: {
like: string;
} | string;
/**
* @description 페이지네이션 조회 키
*/
startKey?: string;
/**
* @description 조회 시 제한할 건 수 (기본: 20, 최대: 500)
*/
limit?: number;
}
type GetBlacksResponse = {
startKey: string | null | undefined;
limit: number;
nextKey: string | null | undefined;
blackList: Record<HandleKey, Black>;
};
type GetBlockGroupsResponse = {
startKey: string | null | undefined;
limit: number;
nextKey: string | null | undefined;
blockGroups: BlockGroup[];
};
type GetBlockNumbersResponse = {
startKey: string | null | undefined;
limit: number;
nextKey: string | null | undefined;
blockNumbers: BlockNumber[];
};
declare class IamService extends DefaultService {
constructor(apiKey: string, apiSecret: string);
/**
* 080 수신 거부 조회
* @param data 080 수신 거부 상세 조회용 request 데이터
* @returns GetBlacksResponse
*/
getBlacks(data?: GetBlacksRequest): Promise<GetBlacksResponse>;
/**
* 수신 거부 그룹 조회
* @param data 수신 거부 그룹 조회용 request 데이터
* @returns GetBlockGroupsResponse
*/
getBlockGroups(data?: GetBlockGroupsRequest): Promise<GetBlockGroupsResponse>;
/**
* 수신 거부 번호 조회
* @param data 수신 거부 번호 상세 조회용 request 데이터
* @returns GetBlockNumbersResponse
*/
getBlockNumbers(data?: GetBlockNumbersRequest): Promise<GetBlockNumbersResponse>;
}
/**
* @description 카카오 채널 카테고리 타입
* @property code 카테고리 코드번호
* @property name 카테고리 설명(이름)
*/
type KakaoChannelCategory = {
code: string;
name: string;
};
interface KakaoChannelInterface {
channelId: string;
searchId: string;
accountId: string;
phoneNumber: string;
sharedAccountIds: Array<string>;
dateCreated?: string | Date;
dateUpdated?: string | Date;
}
/**
* @description 카카오 채널
* @property channelId 카카오 채널 고유 ID, SOLAPI 내부 식별용
* @property searchId 카카오 채널 검색용 아이디, 채널명이 아님
* @property accountId 계정 고유번호
* @property phoneNumber 카카오 채널 담당자 휴대전화 번호
* @property sharedAccountIds 카카오 채널을 공유한 SOLAPI 계정 고유번호 목록
* @property dateCreated 카카오 채널 생성일자(연동일자)
* @property dateUpdated 카카오 채널 정보 수정일자
*/
declare class KakaoChannel implements KakaoChannelInterface {
channelId: string;
searchId: string;
accountId: string;
phoneNumber: string;
sharedAccountIds: Array<string>;
dateCreated?: Date;
dateUpdated?: Date;
constructor(parameter: KakaoChannelInterface);
}
/**
* 카카오 채널 인증 토큰 요청 타입
*/
type CreateKakaoChannelTokenRequest = {
/** 카카오 채널 검색용 아이디 */
searchId: string;
/** 카카오 채널 담당자 휴대전화 번호 */
phoneNumber: string;
};
/**
* 카카오 채널 생성 요청 타입
*/
type CreateKakaoChannelRequest = {
/** 카카오 채널 검색용 아이디 */
searchId: string;
/** 카카오 채널 담당자 휴대전화 번호 */
phoneNumber: string;
/** 카카오톡 채널 카테고리 코드 */
categoryCode: string;
/** CreateKakaoChannelTokenRequest 요청으로 받은 인증 토큰 */
token: string;
};
/**
* @name GetKakaoChannelsRequest
* @description 카카오 채널 목록 조회를 위한 요청 타입
*/
interface GetKakaoChannelsRequest {
/**
* @description 카카오 채널 ID(구 pfId)
*/
channelId?: string;
/**
* @description 카카오 채널 검색용 아이디
*/
searchId?: string;
/**
* @description 카카오 채널 담당자 휴대전화 번호
*/
phoneNumber?: string;
/**
* @description 카카오톡 채널 카테고리 코드
*/
categoryCode?: string;
/**
* @description 페이지네이션 조회 키
*/
startKey?: string;
/**
* @description 조회 시 제한할 건 수 (기본: 20, 최대: 500)
*/
limit?: number;
/**
* @description 공유받은 채널 여부 조회(true일 경우 공유받지 않은 본인 채널만 조회)
*/
isMine?: boolean;
/**
* @description 조회할 시작 날짜
*/
startDate?: string | Date;
/**
* @description 조회할 종료 날짜
*/
endDate?: string | Date;
}
type GetKakaoChannelsFinalizeResponse = {
limit: number;
startKey: string;
nextKey: string | null;
channelList: Array<KakaoChannel>;
};
declare class KakaoChannelService extends DefaultService {
constructor(apiKey: string, apiSecret: string);
/**
* 카카오 채널 카테고리 조회
*/
getKakaoChannelCategories(): Promise<Array<KakaoChannelCategory>>;
/**
* 카카오 채널 목록 조회
* @param data 카카오 채널 목록을 더 자세하게 조회할 때 필요한 파라미터
*/
getKakaoChannels(data?: GetKakaoChannelsRequest): Promise<GetKakaoChannelsFinalizeResponse>;
/**
* @description 카카오 채널 조회
* @param channelId 카카오 채널 ID(구 pfId)
*/
getKakaoChannel(channelId: string): Promise<KakaoChannel>;
/**
* @description 카카오 채널 연동을 위한 인증 토큰 요청
*/
requestKakaoChannelToken(data: CreateKakaoChannelTokenRequest): Promise<RequestKakaoChannelTokenResponse>;
/**
* @description 카카오 채널 연동 메소드
* getKakaoChannelCategories, requestKakaoChannelToken 메소드를 선행적으로 호출해야 합니다!
*/
createKakaoChannel(data: CreateKakaoChannelRequest): Promise<CreateKakaoChannelResponse>;
/**
* @description 카카오 채널 삭제, 채널이 삭제 될 경우 해당 채널의 템플릿이 모두 삭제됩니다!
* @param channelId 카카오 채널 ID
*/
removeKakaoChannel(channelId: string): Promise<KakaoChannel>;
}
interface GetKakaoTemplateResponse extends KakaoAlimtalkTemplateInterface {
assignType: KakaoAlimtalkTemplateAssignType;
accountId: string;
commentable: boolean;
dateCreated: string;
dateUpdated: string;
}
type KakaoAlimtalkTemplateQuickReplyWebLink = {
name: string;
linkType: Extract<KakaoButtonType, 'WL'>;
linkMo: string;
linkPc?: string;
linkAnd?: never;
linkIos?: never;
};
type KakaoAlimtalkTemplateQuickReplyAppLink = {
name: string;
linkType: Extract<KakaoButtonType, 'AL'>;
linkMo?: never;
linkPc?: never;
linkAnd: string;
linkIos: string;
};
type KakaoAlimtalkTemplateQuickReplyDefault = {
name: string;
linkType: Exclude<KakaoButtonType, 'AC' | 'DS' | 'MD' | 'AL' | 'WL'>;
linkMo?: never;
linkPc?: never;
linkAnd?: never;
linkIos?: never;
};
type KakaoAlimtalkTemplateQuickReply = KakaoAlimtalkTemplateQuickReplyWebLink | KakaoAlimtalkTemplateQuickReplyAppLink | KakaoAlimtalkTemplateQuickReplyDefault;
/**
* @description 카카오 채널 카테고리 타입
* @property code 카테고리 코드번호
* @property name 카테고리 설명(이름)
*/
type KakaoAlimtalkTemplateCategory = KakaoChannelCategory;
/**
* @description 카카오 알림톡 템플릿 메시지 유형<br>
* BA:기본형, EX:부가정보형, AD:광고추가형, MI: 복합형
*/
type KakaoAlimtalkTemplateMessageType = 'BA' | 'EX' | 'AD' | 'MI';
/**
* @description 카카오 알림톡 템플릿 강조 유형<br>
* NONE: 선택안함, TEXT: 강조표기형, IMAGE: 이미지형, ITEM_LIST: 아이템리스트형
*/
type KakaoAlimtalkTemplateEmphasizeType = 'NONE' | 'TEXT' | 'IMAGE' | 'ITEM_LIST';
/**
* @description 카카오 알림톡 템플릿 그룹 유형(기본값은 Channel)
*/
type KakaoAlimtalkTemplateAssignType = 'CHANNEL' | 'GROUP';
/**
* @description 카카오 알림톡 템플릿 상태<br><br>
* PENDING - 대기<br><br>
* INSPECTING - 검수중<br><br>
* APPROVED - 등록완료(검수완료)<br><br>
* REJECTED - 반려됨<br><br>
*/
type KakaoAlimtalkTemplateStatus = 'PENDING' | 'INSPECTING' | 'APPROVED' | 'REJECTED';
/**
* @description 알림톡 템플릿 댓글 타입
*/
type KakaoAlimtalkTemplateCommentType = {
isAdmin: boolean;
memberId: string;
content: string | null;
dateCreated: string;
};
type KakaoAlimtalkTemplateHighlightType = {
title?: string | null;
description?: string | null;
imageId?: string | null;
};
type KakaoAlimtalkTemplateItemType = {
list: Array<{
title: string;
description: string;
}>;
summary: {
title?: string | null;
description?: string | null;
};
};
declare const kakaoAlimtalkTemplateSchema: Schema.Struct<{
name: typeof Schema.String;
channelId: Schema.optional<Schema.NullOr<typeof Schema.String>>;
channelGroupId: Schema.optional<Schema.NullOr<typeof Schema.String>>;
content: Schema.optional<typeof Schema.String>;
isHidden: Schema.optional<typeof Schema.Boolean>;
messageType: Schema.Literal<["BA", "EX", "AD", "MI"]>;
emphasizeType: Schema.Literal<["NONE", "TEXT", "IMAGE", "ITEM_LIST"]>;
extra: Schema.optional<Schema.NullOr<typeof Schema.String>>;
ad: Schema.optional<Schema.NullOr<typeof Schema.String>>;
emphasizeTitle: Schema.optional<Schema.NullOr<typeof Schema.String>>;
emphasizeSubtitle: Schema.optional<Schema.NullOr<typeof Schema.String>>;
securityFlag: typeof Schema.Boolean;
imageId: Schema.optional<Schema.NullOr<typeof Schema.String>>;
assignType: Schema.optional<Schema.Literal<["CHANNEL", "GROUP"]>>;
buttons: Schema.optional<Schema.Array$<Schema.Union<[Schema.Struct<{
buttonName: typeof Schema.String;
buttonType: Schema.Literal<["WL"]>;
linkMo: typeof Schema.String;
linkPc: Schema.optional<Schema.NullOr<typeof Schema.String>>;
}>, Schema.Struct<{
buttonName: typeof Schema.String;
buttonType: Schema.Literal<["AL"]>;
linkAnd: typeof Schema.String;
linkIos: typeof Schema.String;
}>, Schema.Struct<{
buttonName: typeof Schema.String;
buttonType: Schema.Literal<["BK", "MD", "DS", "BC", "BT", "AC"]>;
}>]>>>;
comments: Schema.optional<Schema.Array$<Schema.Struct<{
isAdmin: typeof Schema.Boolean;
memberId: typeof Schema.String;
content: Schema.NullOr<typeof Schema.String>;
dateCreated: typeof Schema.String;
}>>>;
commentable: Schema.optional<typeof Schema.Boolean>;
quickReplies: Schema.optional<Schema.Array$<Schema.Union<[Schema.Struct<{
name: typeof Schema.String;
linkType: Schema.Literal<["WL"]>;
linkMo: typeof Schema.String;
linkPc: Schema.optional<typeof Schema.String>;
}>, Schema.Struct<{
name: typeof Schema.String;
linkType: Schema.Literal<["AL"]>;
linkAnd: typeof Schema.String;
linkIos: typeof Schema.String;
}>, Schema.Struct<{
name: typeof Schema.String;
linkType: Schema.Literal<["BK", "BT", "BC"]>;
}>]>>>;
header: Schema.optional<Schema.NullOr<typeof Schema.String>>;
highlight: Schema.optional<Schema.NullOr<Schema.Struct<{
title: Schema.optional<Schema.NullOr<typeof Schema.String>>;
description: Schema.optional<Schema.NullOr<typeof Schema.String>>;
imageId: Schema.optional<Schema.NullOr<typeof Schema.String>>;
}>>>;
item: Schema.optional<Schema.NullOr<Schema.Struct<{
list: Schema.Array$<Schema.Struct<{
title: typeof Schema.String;
description: typeof Schema.String;
}>>;
summary: Schema.Struct<{
title: Schema.optional<Schema.NullOr<typeof Schema.String>>;
description: Schema.optional<Schema.NullOr<typeof Schema.String>>;
}>;
}>>>;
templateId: typeof Schema.String;
code: Schema.optional<Schema.NullOr<typeof Schema.String>>;
status: Schema.Literal<["PENDING", "INSPECTING", "APPROVED", "REJECTED"]>;
variables: Schema.optional<Schema.Array$<Schema.Struct<{
name: typeof Schema.String;
}>>>;
dateCreated: Schema.optional<Schema.Union<[typeof Schema.DateFromString, typeof Schema.Date, typeof Schema.DateFromSelf]>>;
dateUpdated: Schema.optional<Schema.Union<[typeof Schema.DateFromString, typeof Schema.Date, typeof Schema.DateFromSelf]>>;
}>;
type KakaoAlimtalkTemplateSchema = Schema.Schema.Type<typeof kakaoAlimtalkTemplateSchema>;
interface KakaoAlimtalkTemplateInterface {
/**
* @description 템플릿 제목
*/
name: string;
/**
* @description 카카오 비즈니스 채널 ID
*/
channelId?: string | null;
/**
* @description 카카오 비즈니스 채널 그룹 ID
*/
channelGroupId?: string | null;
/**
* @description 알림톡 템플릿 내용
*/
content?: string;
/**
* @description 알림톡 템플릿 숨김 여부
*/
isHidden?: boolean;
/**
* @description 알림톡 템플릿 메시지 유형
*/
messageType: KakaoAlimtalkTemplateMessageType;
/**
* @description 강조 유형
*/
emphasizeType: KakaoAlimtalkTemplateEmphasizeType;
/**
* @description 부가정보. 메시지 유형이 "부가정보형"또는 "복합형"일 경우 필수
*/
extra?: string | null;
/**
* @description 간단 광고 문구. 메시지 유형이 "광고추가형"또는 "복합형"일 경우 필수
*/
ad?: string | null;
/**
* @description 강조표기 핵심문구(변수사용가능, emphasizeType이 TEXT일 경우 필수 값). 템플릿 내용에 강조표기할 핵심문구가 동일하게 포함되어 있어야합니다.
*/
emphasizeTitle?: string | null;
/**
* @description 강조표기 보조문구(emphasizeType이 TEXT일 경우 필수 값). 템플릿 내용에 강조표기할 보조문구가 동일하게 포함되어 있어야합니다.
*/
emphasizeSubtitle?: string | null;
/**
* @description PC 노출 여부. OTP, 보안 메시지의 경우 유저선택 무관 PC 미노출
*/
securityFlag: boolean;
/**
* @description 템플릿에 사용되는 이미지 ID
*/
imageId?: string | null;
/**
* @description 카카오 알림톡 템플릿 그룹 유형
*/
assignType?: KakaoAlimtalkTemplateAssignType;
/**
* @description 카카오 알림톡 템플릿 버튼 목록
*/
buttons?: Array<KakaoButton>;
/**
* @description 카카오 알림톡 템플릿 상태 현황목록, commentable이 true일 때만 해당 값이 표시됩니다.
*/
comments?: Array<KakaoAlimtalkTemplateCommentType>;
/**
* @description 의견을 남길 수 있는 템플릿 여부
*/
commentable?: boolean;
/**
* 바로가기 연결(링크) 목록
*/
quickReplies?: Array<KakaoAlimtalkTemplateQuickReply>;
/**
* @description 아이템 리스트 용 헤더
*/
header?: string | null;
/**
* @description 아이템 리스트용 하이라이트 정보 유형
*/
highlight?: KakaoAlimtalkTemplateHighlightType | null;
/**
* @description 아이템 리스트 유형
*/
item?: KakaoAlimtalkTemplateItemType | null;
/**
* @description 카카오 알림톡 템플릿 ID
*/
templateId: string;
/**
* @description 긴급 검수를 위한 알림토 딜러사 측 템플릿 코드, commentable이 false일 때만 해당 코드가 표시됩니다.
*/
code?: string | null;
/**
* @description 카카오 알림톡 템플릿 상태<br><br>
* PENDING - 대기<br><br>
* INSPECTING - 검수중<br><br>
* APPROVED - 등록완료(검수완료)<br><br>
* REJECTED - 반려됨<br><br>
*/
status: KakaoAlimtalkTemplateStatus;
}
/**
* @description 카카오 알림톡 템플릿 모델<br>
* 알림톡 템플릿 자체의 정보는 아래 페이지를 참고해보세요!
* @see https://kakaobusiness.gitbook.io/main/ad/bizmessage/notice-friend/content-guide
*/
declare class KakaoAlimtalkTemplate implements KakaoAlimtalkTemplateInterface {
name: string;
channelId?: string | null;
channelGroupId?: string | null;
content?: string;
isHidden?: boolean;
messageType: KakaoAlimtalkTemplateMessageType;
emphasizeType: KakaoAlimtalkTemplateEmphasizeType;
extra?: string | null;
ad?: string | null;
emphasizeTitle?: string | null;
emphasizeSubtitle?: string | null;
securityFlag: boolean;
imageId?: string | null;
assignType?: KakaoAlimtalkTemplateAssignType;
buttons?: KakaoButton[];
quickReplies?: KakaoAlimtalkTemplateQuickReply[];
header?: string | null;
highlight?: KakaoAlimtalkTemplateHighlightType | null;
item?: KakaoAlimtalkTemplateItemType | null;
templateId: string;
commentable?: boolean;
comments?: Array<KakaoAlimtalkTemplateCommentType>;
code?: string | null;
status: KakaoAlimtalkTemplateStatus;
/**
* 알림톡 템플릿 생성일자
*/
dateCreated: Date;
/**
* 알림톡 템플릿 수정일자
*/
dateUpdated: Date;
constructor(parameter: KakaoAlimtalkTemplateInterface | GetKakaoTemplateResponse);
}
/**
* @description 카카오 알림톡 템플릿 요청 타입
*/
type BaseKakaoAlimtalkTemplateRequest = {
/**
* @description 알림톡 템플릿 제목
*/
name: string;
/**
* @description 알림톡 템플릿 내용
*/
content: string;
/**
* @description 알림톡 템플릿 카테고리 코드, KakaoAlimtalkTemplateCategory 타입 참고
*/
categoryCode: string;
/**
* @description 알림톡 템플릿 버튼 배열
*/
buttons?: Array<KakaoButton>;
/**
* @description 바로연결(버튼과 유사한 링크) 배열
*/
quickReplies?: Array<KakaoAlimtalkTemplateQuickReply>;
/**
* @description 알림톡 템플릿 메시지 유형
*/
messageType?: KakaoAlimtalkTemplateMessageType;
/**
* @description 카카오 알림톡 템플릿 강조 유형
*/
emphasizeType?: KakaoAlimtalkTemplateEmphasizeType;
/**
* @description 아이템 리스트용 헤더
*/
header?: string;
/**
* @description 아이템 리스트용 하이라이트 정보 유형
*/
highlight?: KakaoAlimtalkTemplateHighlightType;
/**
* @description 아이템 리스트 유형
*/
item?: KakaoAlimtalkTemplateItemType;
/**
* @description 부가정보, 치환문구를 넣을 수 없음. 최대 500자
*/
extra?: string;
/**
* @description 강조 표기 제목 (강조 표기형 유형만 등록 가능)
*/
emphasizeTitle?: string;
/**
* @description 강조 표기 부제목 (강조 표기형 유형만 등록 가능)
*/
emphasizeSubTitle?: string;
/**
* @description 보안 템플릿 여부
*/
securityFlag?: boolean;
/**
* @description 알림톡 템플릿 내에 업로드 할 이미지 ID (Storage API 사용 필요)
*/
imageId?: string;
};
type CreateKakaoChannelAlimtalkTemplateRequest = BaseKakaoAlimtalkTemplateRequest & {
/**
* @description 템플릿을 생성할 채널의 ID
*/
channelId: string;
};
type CreateKakaoChannelGroupAlimtalkTemplateRequest = BaseKakaoAlimtalkTemplateRequest & {
/**
* @description 템플릿을 생성할 채널 그룹의 ID
*/
channelGroupId: string;
};
/**
* @description 카카오 알림톡 템플릿 생성 요청 타입
*/
type CreateKakaoAlimtalkTemplateRequest = CreateKakaoChannelAlimtalkTemplateRequest | CreateKakaoChannelGroupAlimtalkTemplateRequest;
type GetKakaoAlimtalkTemplatesNameType = {
eq?: string;
ne?: string;
like?: never;
} | {
eq?: never;
ne?: never;
like: string;
};
/**
* @name GetKakaoAlimtalkTemplatesRequest
* @description 카카오 알림톡 조회를 위한 요청 타입
*/
interface GetKakaoAlimtalkTemplatesRequest {
/**
* @description 알림톡 템플릿 제목
* 주의! like 프로퍼티가 들어가는 경우 eq와 ne는 무시됩니다.
*/
name?: GetKakaoAlimtalkTemplatesNameType | string;
/**
* @description 카카오 비즈니스 채널 ID
*/
channelId?: string;
/**
* @description 카카오 알림톡 템플릿 ID
*/
templateId?: string;
/**
* @description 숨긴 템플릿 여부 확인
*/
isHidden?: boolean;
/**
* @description 알림톡 템플릿 상태
*/
status?: KakaoAlimtalkTemplateStatus;
/**
* @description 페이지네이션 조회 키
*/
startKey?: string;
/**
* @description 조회 시 제한할 건 수 (기본: 20, 최대: 500)
*/
limit?: number;
/**
* @description 조회할 시작 날짜
*/
startDate?: string | Date;
/**
* @description 조회할 종료 날짜
*/
endDate?: string | Date;
}
/**
* @description 카카오 알림톡 템플릿 요청 타입
*/
type UpdateKakaoAlimtalkTemplateRequest = {
/**
* @description 알림톡 템플릿 제목
*/
name?: string;
/**
* @description 알림톡 템플릿 내용
*/
content?: string;
/**
* @description 알림톡 템플릿 카테고리 코드, KakaoAlimtalkTemplateCategory 타입 참고
*/
categoryCode?: string;
/**
* @description 알림톡 템플릿 버튼 배열
*/
buttons?: Array<KakaoButton>;
/**
* @description 바로연결(버튼과 유사한 링크) 배열
*/
quickReplies?: Array<KakaoAlimtalkTemplateQuickReply>;
/**
* @description 알림톡 템플릿 메시지 유형
*/
messageType?: KakaoAlimtalkTemplateMessageType;
/**
* @description 카카오 알림톡 템플릿 강조 유형
*/
emphasizeType?: KakaoAlimtalkTemplateEmphasizeType;
/**
* @description 아이템 리스트 용 헤더
*/
header?: string;
/**
* @description 아이템 리스트용 하이라이트 정보 유형
*/
highlight?: KakaoAlimtalkTemplateHighlightType;
/**
* @description 아이템 리스트 유형
*/
item?: KakaoAlimtalkTemplateItemType;
/**
* @description 부가정보, 치환문구를 넣을 수 없음
*/
extra?: string;
/**
* @description 강조 표기 제목 (강조 표기형 유형만 등록 가능)
*/
emphasizeTitle?: string;
/**
* @description 강조 표기 부제목 (강조 표기형 유형만 등록 가능)
*/
emphasizeSubTitle?: string;
/**
* @description 보안 템플릿 여부
*/
securityFlag?: boolean;
/**
* @description 알림톡 템플릿 내에 업로드 할 이미지 ID (Storage API 사용 필요)
*/
imageId?: string;
};
interface GetKakaoAlimtalkTemplatesFinalizeResponse {
limit: number;
templateList: Array<KakaoAlimtalkTemplateSchema>;
startKey: string;
nextKey: string | null;
}
declare class KakaoTemplateService extends DefaultService {
constructor(apiKey: string, apiSecret: string);
/**
* 카카오 템플릿 카테고리 조회
*/
getKakaoAlimtalkTemplateCategories(): Promise<Array<KakaoAlimtalkTemplateCategory>>;
/**
* @description 카카오 알림톡 템플릿 생성
* 반드시 getKakaoAlimtalkTemplateCategories를 먼저 호출하여 카테고리 값을 확인해야 합니다!
* @param data 알림톡 템플릿 생성을 위한 파라미터
*/
createKakaoAlimtalkTemplate(data: CreateKakaoAlimtalkTemplateRequest): Promise<KakaoAlimtalkTemplate>;
/**
* 카카오 템플릿 목록 조회
* @param data 카카오 템플릿 목록을 더 자세하게 조회할 때 필요한 파라미터
*/
getKakaoAlimtalkTemplates(data?: GetKakaoAlimtalkTemplatesRequest): Promise<GetKakaoAlimtalkTemplatesFinalizeResponse>;
/**
* 카카오 템플릿 상세 조회
* @param templateId 카카오 알림톡 템플릿 ID
*/
getKakaoAlimtalkTemplate(templateId: string): Promise<KakaoAlimtalkTemplate>;
/**
* 카카오 알림톡 템플릿 검수 취소 요청
* @param templateId 카카오 알림톡 템플릿 ID
*/
cancelInspectionKakaoAlimtalkTemplate(templateId: string): Promise<KakaoAlimtalkTemplate>;
/**
* 카카오 알림톡 템플릿 수정(검수 X)
* @param templateId 카카오 알림톡 템플릿 ID
* @param data 카카오 알림톡 템플릿 수정을 위한 파라미터
*/
updateKakaoAlimtalkTemplate(templateId: string, data: UpdateKakaoAlimtalkTemplateRequest): Promise<KakaoAlimtalkTemplate>;
/**
* 카카오 알림톡 템플릿 이름 수정(검수 상태 상관없이 변경가능)
* @param templateId 카카오 알림톡 템플릿 ID
* @param name 카카오 알림톡 템플릿 이름 변경을 위한 파라미터
*/
updateKakaoAlimtalkTemplateName(templateId: string, name: string): Promise<KakaoAlimtalkTemplate>;
/**
* 카카오 알림톡 템플릿 삭제(대기, 반려 상태일 때만 삭제가능)
* @param templateId 카카오 알림톡 템플릿 ID
*/
removeKakaoAlimtalkTemplate(templateId: string): Promise<KakaoAlimtalkTemplate>;
}
interface GetGroupsRequest {
groupId?: string;
startKey?: string;
limit?: number;
startDate?: string | Date;
endDate?: string | Date;
}
/**
* 단건 메시지 발송 요청 모델
* @description 단건 메시지 발송 요청 모델
* @example
* ```ts
* const message = {
* to: '01012345678',
* from: '01012345678',
* text: 'Hello, world!',
* };
* ```
*/
declare const requestSendOneMessageSchema: Schema.extend<Schema.SchemaClass<{
readonly imageId?: string | undefined;
readonly text?: string | undefined;
readonly type?: "SMS" | "LMS" | "MMS" | "ATA" | "CTA" | "CTI" | "NSA" | "RCS_SMS" | "RCS_LMS" | "RCS_MMS" | "RCS_TPL" | "RCS_ITPL" | "RCS_LTPL" | "FAX" | "VOICE" | "BMS_TEXT" | "BMS_IMAGE" | "BMS_WIDE" | "BMS_WIDE_ITEM_LIST" | "BMS_CAROUSEL_FEED" | "BMS_PREMIUM_VIDEO" | "BMS_COMMERCE" | "BMS_CAROUSEL_COMMERCE" | undefined;
readonly subject?: string | undefined;
readonly autoTypeDetect?: boolean | undefined;
readonly kakaoOptions?: {
readonly pfId: string;
readonly templateId?: string | undefined;
readonly variables?: {
readonly [x: string]: string;
} | undefined;
readonly disableSms?: boolean | undefined;
readonly adFlag?: boolean | undefined;
readonly buttons?: readonly ({
readonly buttonName: string;
readonly buttonType: "WL";
readonly linkMo: string;
readonly linkPc?: string | null | undefined;
} | {
readonly buttonName: string;
readonly buttonType: "AL";
readonly linkAnd: string;
readonly linkIos: string;
} | {
readonly buttonName: string;
readonly buttonType: "BK" | "MD" | "DS" | "BC" | "BT" | "AC";
})[] | undefined;
readonly imageId?: string | undefined;
readonly bms?: {
readonly targeting: "I" | "M" | "N";
} | undefined;
} | undefined;
readonly rcsOptions?: {
readonly templateId?: string | undefined;
readonly variables?: {
readonly [x: string]: string;
} | undefined;
readonly disableSms?: boolean | undefined;
readonly buttons?: readonly ({
readonly buttonName: string;
readonly buttonType: "WL";
readonly link: string;
} | {
readonly buttonName: string;
readonly buttonType: "ML";
readonly latitude: string;
readonly longitude: string;
} | {
readonly buttonName: string;
readonly buttonType: "MQ" | "MR" | "CA" | "CL" | "DL" | "MS";
readonly link: string;
})[] | undefined;
readonly brandId: string;
readonly copyAllowed?: boolean | undefined;
readonly mmsType?: "M3" | "S3" | "M4" | "S4" | "M5" | "S5" | "M6" | "S6" | undefined;
readonly commercialType?: boolean | undefined;
readonly additionalBody?: {
readonly buttons?: readonly ({
readonly buttonName: string;
readonly buttonType: "WL";
readonly link: string;
} | {
readonly buttonName: string;
readonly buttonType: "ML";
readonly latitude: string;
readonly longitude: string;
} | {
readonly buttonName: string;
readonly buttonType: "MQ" | "MR" | "CA" | "CL" | "DL" | "MS";
readonly link: string;
})[] | undefined;
readonly title: string;
readonly description: string;
readonly imaggeId?: string | undefined;
} | undefined;
} | undefined;
readonly country?: string | undefined;
readonly replacements?: readonly {}[] | undefined;
readonly customFields?: {
readonly [x: string]: string;
} | undefined;
readonly naverOptions?: {
readonly templateId: string;
readonly variables?: {
readonly [x: string]: string;
} | undefined;
readonly disableSms?: boolean | undefined;
readonly buttons?: readonly {
readonly buttonName: string;
readonly buttonType: string;
readonly linkMo?: string | undefined;
readonly linkPc?: string | undefined;
readonly linkAnd?: string | undefined;
readonly linkIos?: string | undefined;
}[] | undefined;
readonly talkId: string;
} | undefined;
readonly faxOptions?: {
readonly fileIds: readonly string[];
} | undefined;
readonly voiceOptions?: {
readonly voiceType: "FEMALE" | "MALE";
readonly headerMessage?: string | undefined;
readonly tailMessage?: string | undefined;
readonly replyRange?: 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | undefined;
readonly counselorNumber?: string | undefined;
} | undefined;
}, {
readonly imageId?: string | undefined;
readonly text?: string | undefined;
readonly type?: "SMS" | "LMS" | "MMS" | "ATA" | "CTA" | "CTI" | "NSA" | "RCS_SMS" | "RCS_LMS" | "RCS_MMS" | "RCS_TPL" | "RCS_ITPL" | "RCS_LTPL" | "FAX" | "VOICE" | "BMS_TEXT" | "BMS_IMAGE" | "BMS_WIDE" | "BMS_WIDE_ITEM_LIST" | "BMS_CAROUSEL_FEED" | "BMS_PREMIUM_VIDEO" | "BMS_COMMERCE" | "BMS_CAROUSEL_COMMERCE" | undefined;
readonly subject?: string | undefined;
readonly autoTypeDetect?: boolean | undefined;
readonly kakaoOptions?: {
readonly pfId: string;
readonly templateId?: string | undefined;
readonly variables?: {
readonly [x: string]: string;
} | undefined;
readonly disableSms?: boolean | undefined;
readonly adFlag?: boolean | undefined;
readonly buttons?: readonly ({
readonly buttonName: string;
readonly buttonType: "WL";
readonly linkMo: string;
readonly linkPc?: string | null | undefined;
} | {
readonly buttonName: string;
readonly buttonType: "AL";
readonly linkAnd: string;
readonly linkIos: string;
} | {
readonly buttonName: string;
readonly buttonType: "BK" | "MD" | "DS" | "BC" | "BT" | "AC";
})[] | undefined;
readonly imageId?: string | undefined;
readonly bms?: {
readonly targeting: "I" | "M" | "N";
} | undefined;
} | undefined;
readonly rcsOptions?: {
readonly brandId: string;
readonly templateId?: string | undefined;
readonly variables?: {
readonly [x: string]: string;
} | undefined;
readonly disableSms?: boolean | undefined;
readonly buttons?: readonly ({
readonly buttonName: string;
readonly buttonType: "WL";
readonly link: string;
} | {
readonly buttonName: string;
readonly buttonType: "ML";
readonly latitude: string;
readonly longitude: string;
} | {
readonly buttonName: string;
readonly buttonType: "MQ" | "MR" | "CA" | "CL" | "DL" | "MS";
readonly link: string;
})[] | undefined;
readonly copyAllowed?: boolean | undefined;
readonly mmsType?: "M3" | "S3" | "M4" | "S4" | "M5" | "S5" | "M6" | "S6" | undefined;
readonly commercialType?: boolean | undefined;
readonly additionalBody?: {
readonly title: string;
readonly description: string;
readonly buttons?: readonly ({
readonly buttonName: string;
readonly buttonType: "WL";
readonly link: string;
} | {
readonly buttonName: string;
readonly buttonType: "ML";
readonly latitude: string;
readonly longitude: string;
} | {
re