107 lines
2.5 KiB
TypeScript
107 lines
2.5 KiB
TypeScript
import type { Template, TemplateEmail, TemplateSms, TemplateSummary } from '@kri/common/noti-hub';
|
|
import type { ListFilter } from './list';
|
|
|
|
export type TemplatePurpose = 0 | 1;
|
|
|
|
export type TemplateWithPurpose = Template & {
|
|
tmplatPurpose: TemplatePurpose;
|
|
};
|
|
|
|
export type TemplateSummaryWithPurpose = TemplateSummary & {
|
|
tmplatPurpose: TemplatePurpose;
|
|
};
|
|
|
|
export type MessageSendChannel = 'sms' | 'email';
|
|
|
|
/**
|
|
* @kri/common의 TemplateEmail에는 atchFl(첨부파일 필드)이 아직 없어 로컬에서 확장한다.
|
|
* 조회 응답 전용 필드로, 파이프(|)로 구분된 첨부파일명 목록이 내려온다. 요청 시엔 사용하지 않는다.
|
|
*/
|
|
export type TemplateEmailWithAttachments = TemplateEmail & {
|
|
tmplatPurpose: TemplatePurpose;
|
|
atchFl?: string;
|
|
};
|
|
|
|
/**
|
|
* 문자 템플릿 JPG 첨부파일명 목록 (TemplateEmailWithAttachments와 동일하게 조회 응답 전용).
|
|
* 첨부가 하나라도 있으면 서버가 LMS_MMS로 저장한다.
|
|
*/
|
|
export type TemplateSmsWithAttachments = TemplateSms & {
|
|
tmplatPurpose: TemplatePurpose;
|
|
atchFl?: string;
|
|
};
|
|
|
|
/** 문자 미리보기에 표시할 첨부 이미지 (src는 data URL 또는 Object URL) */
|
|
export type TemplateAttachmentImage = {
|
|
fileName: string;
|
|
src: string;
|
|
};
|
|
|
|
export type PhoneVerificationSendData = {
|
|
verificationId: string;
|
|
expireDt: string;
|
|
};
|
|
|
|
export type SendSingleResponse = {
|
|
cmid: string;
|
|
data: Record<string, unknown>;
|
|
};
|
|
|
|
export type MessageSendSingleRequest = {
|
|
tmplatIdx: number;
|
|
resve: boolean;
|
|
sendDt?: string;
|
|
sid: string;
|
|
destHeaderIds: number[];
|
|
destNameHeaderId?: number;
|
|
};
|
|
|
|
export type MessageSendBulkRequest = {
|
|
tmplatIdx: number;
|
|
resve: boolean;
|
|
sendDt?: string;
|
|
listFilter: ListFilter;
|
|
destHeaderIds: number[];
|
|
destNameHeaderId?: number;
|
|
};
|
|
|
|
export type MessageFailedChunk = {
|
|
sidList?: string[];
|
|
reason?: string;
|
|
};
|
|
|
|
export type MessageBulkSendResponse = {
|
|
bulkSendKey?: string;
|
|
targetCount: number;
|
|
requestCount: number;
|
|
acceptCount: number;
|
|
failCount: number;
|
|
failedChunks?: MessageFailedChunk[];
|
|
};
|
|
|
|
export type SendResultInfo = {
|
|
cmid: string;
|
|
bulkSendKey?: string;
|
|
sendTy: number;
|
|
itrntPrjctCd: string;
|
|
reqstSvc: string;
|
|
prjctCd: string;
|
|
sid: string;
|
|
resve: boolean;
|
|
resultCode: number;
|
|
resultLabel?: string;
|
|
resultViewLabel?: string;
|
|
tmplatIdx?: number;
|
|
kkoTmplatCd?: string;
|
|
sendEml?: string;
|
|
sendTel?: string;
|
|
sendNm?: string;
|
|
sendDt: string;
|
|
destEml?: string;
|
|
destNm?: string;
|
|
destTel?: string;
|
|
regCmpn: string;
|
|
regUser: string;
|
|
regDt: string;
|
|
};
|