import { RpcMethod } from './commonTypes'; export type KakaoPresetsService_List = RpcMethod; export type KakaoPresetsService_Get = RpcMethod; export type KakaoPresetsService_Create = RpcMethod; export type KakaoPresetsService_Update = RpcMethod; export type KakaoPresetsService_Delete = RpcMethod; export type KakaoPresetsService_Clone = RpcMethod; export type KakaoPresetsService_SubmitForApproval = RpcMethod; export interface KakaoPresetsService { /** Lists Kakao (KakaoTalk) message-template presets for an application, with paging and optional name/category filters, refreshing each preset's approval status live from the SureM/Kakao server. Use to browse Kakao presets or find a preset code before fetching or editing one. */ List: KakaoPresetsService_List; /** Returns one Kakao preset by its preset code, refreshing its approval status and template from the SureM/Kakao server. Use after list_kakao_presets to inspect a single preset. */ Get: KakaoPresetsService_Get; /** Creates a Kakao message-template preset in an application and registers the template on the SureM/Kakao server. Use to author a new KakaoTalk template; the template field is a KakaoTemplate JSON document. */ Create: KakaoPresetsService_Create; /** Overwrites a Kakao preset's name, categories and template and pushes the new template to the SureM/Kakao server. Allowed only while the preset is not yet submitted or approved; use to edit a draft before submitting for approval. */ Update: KakaoPresetsService_Update; /** Deletes a Kakao preset and removes its template from the SureM/Kakao server. Blocked for approved presets and presets used in a journey; use to remove a draft or rejected preset. */ Delete: KakaoPresetsService_Delete; /** Clones an existing Kakao preset into a target application, creating a new preset with a new code and registering its template on the SureM/Kakao server. Use to duplicate a KakaoTemplate instead of re-authoring it. */ Clone: KakaoPresetsService_Clone; /** Submits a Kakao preset's template to the SureM/Kakao server for KakaoTalk approval review. Use once the template is final; fails if the preset is already submitted or approved. */ SubmitForApproval: KakaoPresetsService_SubmitForApproval; } export type ListKakaoPresetsRequest_OrderBy = 'NAME' | 'CREATED' | 'UPDATED'; export type ListKakaoPresetsRequest_OrderDirection = 'ASC' | 'DESC'; export type ListKakaoPresetsRequest = { /** application code (XXXXX-XXXXX) whose Kakao presets to list */ application?: string; orderBy?: ListKakaoPresetsRequest_OrderBy; orderDirection?: ListKakaoPresetsRequest_OrderDirection; page?: number; perPage?: number; /** like %name% */ searchByName?: string; /** in ['category'] */ searchByCategory?: string[]; }; export type KakaoPreset = { name: string; code: string; categories: string[]; template: string; created: Date; updated: Date; status: string; statusDescription: string; }; export type ListKakaoPresetsResponse = { presets: KakaoPreset[]; page: number; perPage: number; total: number; }; export type GetKakaoPresetRequest = { /** Kakao preset code */ code?: string; }; export type GetKakaoPresetResponse = { preset: KakaoPreset; }; export type CreateKakaoPresetRequest = { /** application code (XXXXX-XXXXX) to create the preset in */ application?: string; name?: string; categories?: string[]; /** KakaoTemplate as a JSON document */ template?: string; }; export type CreateKakaoPresetResponse = { preset: KakaoPreset; }; export type UpdateKakaoPresetRequest = { /** Kakao preset code to update */ code?: string; name?: string; categories?: string[]; /** KakaoTemplate as a JSON document */ template?: string; }; export type UpdateKakaoPresetResponse = { preset: KakaoPreset; }; export type DeleteKakaoPresetRequest = { /** Kakao preset code to delete */ code?: string; }; export type DeleteKakaoPresetResponse = {}; export type CloneKakaoPresetRequest = { /** source Kakao preset code to clone from */ kakaoPresetCode?: string; /** application code (XXXXX-XXXXX) to place the clone in */ applicationCode?: string; }; export type CloneKakaoPresetResponse = { kakaoPresetCode: string; }; export type SubmitForApprovalKakaoPresetRequest = { /** Kakao preset code to submit for approval */ code?: string; /** application code (XXXXX-XXXXX) the preset belongs to */ application?: string; }; export type SubmitForApprovalKakaoPresetResponse = {};