[cs] WIP: 알림톡템플릿관리
This commit is contained in:
@@ -44,7 +44,6 @@ export const LwpoCodeFormSchema = z.object({
|
||||
prntLwpoCd: z.string().max(10).nullish(),
|
||||
useYn: z.string(),
|
||||
sortSeq: z.number(),
|
||||
delYn: z.string(),
|
||||
});
|
||||
|
||||
export type LwpoCodeFormData = z.infer<typeof LwpoCodeFormSchema>;
|
||||
|
||||
@@ -32,8 +32,11 @@ export interface UpCodeDetail extends UpCodeFormData {
|
||||
}
|
||||
|
||||
export const upCodeFormSchema = z.object({
|
||||
upCd: z.string().max(10).nonempty(),
|
||||
upCdNm: z.string().max(100).nonempty(),
|
||||
upCd: z
|
||||
.string()
|
||||
.max(30, "최대 30자까지 입력할 수 있습니다.")
|
||||
.nonempty("최소 1자 이상 입력해주세요."),
|
||||
upCdNm: z.string().max(100).nonempty("최소 1자 이상 입력해주세요."),
|
||||
upCdExpln: z.string().max(1000).nullish(),
|
||||
cdSe: z.string().max(10).nonempty(),
|
||||
siteId: z.string().max(2).nullish(),
|
||||
|
||||
@@ -0,0 +1,64 @@
|
||||
import { client } from "@/shared/api";
|
||||
import { ENDPOINT } from "@/shared/config";
|
||||
import {
|
||||
type NtftalkBiztalkCheckInspectionResponse,
|
||||
type NtftalkBiztalkInspectionRequestItem,
|
||||
type NtftalkBiztalkInspectionResponse,
|
||||
type NtftalkBiztalkSender,
|
||||
type NtftalkBiztalkService,
|
||||
type NtftalkBiztalkSyncTemplatesParams,
|
||||
type NtftalkBiztalkSyncTemplatesResponse,
|
||||
} from "../model/ntftalk-biztalk-interface";
|
||||
|
||||
export const NtftalkBiztalkApi: NtftalkBiztalkService = {
|
||||
async getSender(): Promise<NtftalkBiztalkSender> {
|
||||
const response = await client.get<NtftalkBiztalkSender>(
|
||||
`${ENDPOINT.NTFTALK_SERVICE.NTFTALK_BIZTALK}/sender`,
|
||||
);
|
||||
return response.data;
|
||||
},
|
||||
|
||||
async syncTemplates(
|
||||
params?: NtftalkBiztalkSyncTemplatesParams,
|
||||
): Promise<NtftalkBiztalkSyncTemplatesResponse> {
|
||||
const response = await client.post<NtftalkBiztalkSyncTemplatesResponse>(
|
||||
`${ENDPOINT.NTFTALK_SERVICE.NTFTALK_BIZTALK}/sync-templates`,
|
||||
undefined,
|
||||
{
|
||||
params: {
|
||||
senderKeyType: params?.senderKeyType,
|
||||
},
|
||||
},
|
||||
);
|
||||
return response.data;
|
||||
},
|
||||
|
||||
async requestInspection(
|
||||
requestList: NtftalkBiztalkInspectionRequestItem[],
|
||||
): Promise<NtftalkBiztalkInspectionResponse> {
|
||||
const response = await client.post<NtftalkBiztalkInspectionResponse>(
|
||||
`${ENDPOINT.NTFTALK_SERVICE.NTFTALK_BIZTALK}/request-inspection`,
|
||||
requestList,
|
||||
);
|
||||
return response.data;
|
||||
},
|
||||
|
||||
async cancelInspection(
|
||||
requestList: NtftalkBiztalkInspectionRequestItem[],
|
||||
): Promise<NtftalkBiztalkInspectionResponse> {
|
||||
const response = await client.post<NtftalkBiztalkInspectionResponse>(
|
||||
`${ENDPOINT.NTFTALK_SERVICE.NTFTALK_BIZTALK}/cancel-inspection`,
|
||||
requestList,
|
||||
);
|
||||
return response.data;
|
||||
},
|
||||
|
||||
async checkInspection(
|
||||
templateCode: string,
|
||||
): Promise<NtftalkBiztalkCheckInspectionResponse> {
|
||||
const response = await client.get<NtftalkBiztalkCheckInspectionResponse>(
|
||||
`${ENDPOINT.NTFTALK_SERVICE.NTFTALK_BIZTALK}/check-inspection/${encodeURIComponent(templateCode)}`,
|
||||
);
|
||||
return response.data;
|
||||
},
|
||||
};
|
||||
@@ -1,5 +1,6 @@
|
||||
export { NtftalkVarApi } from "./api/ntftalk-var-service";
|
||||
export { NtftalkTempApi } from "./api/ntftalk-temp-service";
|
||||
export { NtftalkBiztalkApi } from "./api/ntftalk-biztalk-service";
|
||||
export type {
|
||||
NtftalkVar,
|
||||
NtftalkVarPageList,
|
||||
@@ -7,6 +8,14 @@ export type {
|
||||
NtftalkVarSearchParams,
|
||||
NtftalkVarUpdatePayload,
|
||||
} from "./model/ntftalk-var-interface";
|
||||
export type {
|
||||
NtftalkBiztalkCheckInspectionResponse,
|
||||
NtftalkBiztalkInspectionRequestItem,
|
||||
NtftalkBiztalkInspectionResponse,
|
||||
NtftalkBiztalkSender,
|
||||
NtftalkBiztalkSyncTemplatesParams,
|
||||
NtftalkBiztalkSyncTemplatesResponse,
|
||||
} from "./model/ntftalk-biztalk-interface";
|
||||
export type {
|
||||
NtftalkBtnTemp,
|
||||
NtftalkBtnTempSavePayload,
|
||||
|
||||
@@ -0,0 +1,48 @@
|
||||
export interface NtftalkBiztalkSender {
|
||||
senderKey: string;
|
||||
name: string;
|
||||
uuid: string;
|
||||
status: string;
|
||||
}
|
||||
|
||||
export interface NtftalkBiztalkSyncTemplatesParams {
|
||||
senderKeyType?: string;
|
||||
}
|
||||
|
||||
export interface NtftalkBiztalkSyncTemplatesResponse {
|
||||
syncCount: number;
|
||||
message: string;
|
||||
}
|
||||
|
||||
export interface NtftalkBiztalkInspectionRequestItem {
|
||||
senderKey: string;
|
||||
templateCode: string;
|
||||
senderKeyType: string;
|
||||
}
|
||||
|
||||
export interface NtftalkBiztalkInspectionResponse {
|
||||
processedCount: number;
|
||||
message: string;
|
||||
}
|
||||
|
||||
export interface NtftalkBiztalkCheckInspectionResponse {
|
||||
templateCode: string;
|
||||
approved: boolean;
|
||||
message: string;
|
||||
}
|
||||
|
||||
export interface NtftalkBiztalkService {
|
||||
getSender(): Promise<NtftalkBiztalkSender>;
|
||||
syncTemplates(
|
||||
params?: NtftalkBiztalkSyncTemplatesParams,
|
||||
): Promise<NtftalkBiztalkSyncTemplatesResponse>;
|
||||
requestInspection(
|
||||
requestList: NtftalkBiztalkInspectionRequestItem[],
|
||||
): Promise<NtftalkBiztalkInspectionResponse>;
|
||||
cancelInspection(
|
||||
requestList: NtftalkBiztalkInspectionRequestItem[],
|
||||
): Promise<NtftalkBiztalkInspectionResponse>;
|
||||
checkInspection(
|
||||
templateCode: string,
|
||||
): Promise<NtftalkBiztalkCheckInspectionResponse>;
|
||||
}
|
||||
@@ -3,9 +3,13 @@ import type { PageableList, PageableParams } from "@/shared/model";
|
||||
export interface NtftalkTempSearchParams extends PageableParams {
|
||||
templateCode?: string;
|
||||
templateName?: string;
|
||||
/** 백엔드 스펙 확정 시 전달 */
|
||||
templateContent?: string;
|
||||
inspectionStatus?: string;
|
||||
senderKey?: string;
|
||||
status?: string;
|
||||
/** 백엔드 스펙 확정 시 전달 */
|
||||
templateMessageType?: string;
|
||||
}
|
||||
|
||||
export interface NtftalkBtnTemp {
|
||||
|
||||
Reference in New Issue
Block a user