Files
contact-front/src/types/message.ts

92 lines
2.0 KiB
TypeScript

import type { Template, TemplateEmail, 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;
};
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;
};