feat(message_bizppurio): 알림톡 템플릿 화면을 조회 전용으로 전환
템플릿 등록·수정·삭제·검수·상태변경을 제거하고 목록·상태·내용 조회 + 알림 연결만 남긴다. 등록·관리는 비즈뿌리오 콘솔로 위임 — 콘솔이 이미 이미지메이커·AI생성·캐러셀을 잘 제공하고, 카카오 규격이 자주 바뀌어 등록 폼을 유지하면 규격을 영구히 쫓아가야 하는 유지보수 부채가 크기 때문이다. 이 플러그인의 고유 가치는 카카오 템플릿 ↔ G7 알림 연결(binding)이다. 주요 변경: - 라우트/컨트롤러/서비스에서 변경(manage) 메서드 전부 제거, 조회만 유지 - dev_sample 임시 개발코드 + FormRequest 3종 + 이미지 업로드 경로 제거 - 레이아웃: 등록 폼·상태변경 모달 제거, 상세는 내용만+[닫기], 목록 관리열은 [내용]만 - 환경설정 사용 전 준비 안내 + 목록 상단 콘솔 위임 안내(배지 의미색) 추가 - 안내 배너 중복 해소: 목록 조회 실패 배너에 ready 게이트를 걸어 설정 안내와 배타 표시 동반 변경(직전 세션 잔여, lang 얽힘으로 같은 커밋): - 연동 행 SMS 대체발송 배지(ON/OFF solid 색) 추가
This commit is contained in:
1 parent
5e9d046812
commit
92f36e86b1
34 files changed
+1186
-3512
No files matched your search
@@ -201,7 +201,7 @@ location ~* \.(js|css|json)$ { expires max; access_log off; }
|
||||
> 각 확장이 자신의 API 문서를 소유합니다. 아래 표는 자동 생성됩니다.
|
||||
|
||||
<!-- @generated:start:api-readme-extensions -->
|
||||
- **확장 수**: 10 · **엔드포인트 수**: 393
|
||||
- **확장 수**: 10 · **엔드포인트 수**: 384
|
||||
|
||||
| 확장 | 유형 | API 문서 목차 | 문서/엔드포인트 |
|
||||
| --- | --- | --- | --- |
|
||||
@@ -212,7 +212,7 @@ location ~* \.(js|css|json)$ { expires max; access_log off; }
|
||||
| `sirsoft-ckeditor5` | 플러그인 | [docs/api/](../../../plugins/_bundled/sirsoft-ckeditor5/docs/api/README.md) | 2 / 2 |
|
||||
| `sirsoft-gdpr` | 플러그인 | [docs/api/](../../../plugins/_bundled/sirsoft-gdpr/docs/api/README.md) | 4 / 15 |
|
||||
| `sirsoft-marketing` | 플러그인 | [docs/api/](../../../plugins/_bundled/sirsoft-marketing/docs/api/README.md) | 2 / 2 |
|
||||
| `sirsoft-message_bizppurio` | 플러그인 | [docs/api/](../../../plugins/_bundled/sirsoft-message_bizppurio/docs/api/README.md) | 5 / 21 |
|
||||
| `sirsoft-message_bizppurio` | 플러그인 | [docs/api/](../../../plugins/_bundled/sirsoft-message_bizppurio/docs/api/README.md) | 6 / 12 |
|
||||
| `sirsoft-pay_kginicis` | 플러그인 | [docs/api/](../../../plugins/_bundled/sirsoft-pay_kginicis/docs/api/README.md) | 5 / 22 |
|
||||
| `sirsoft-verification_kginicis` | 플러그인 | [docs/api/](../../../plugins/_bundled/sirsoft-verification_kginicis/docs/api/README.md) | 1 / 1 |
|
||||
|
||||
|
||||
@@ -19,15 +19,9 @@
|
||||
- 비즈뿌리오가 보내는 발송 결과 통보를 받아 각 발송의 실제 도달 여부(성공/실패)를 기록합니다. 실패한 경우 사유를 함께 확인할 수 있습니다(예: 음영 지역, 잘못된 번호, 스팸 차단, 지갑 잔액 부족 등).
|
||||
- 관리자 "알림 발송 이력" 화면에서 문자·알림톡의 발송 결과(성공/실패·사유·지갑 잔액 부족·SMS 대체발송 여부)를 각 발송 행에서 바로 확인할 수 있습니다. 문자·알림톡 탭에서만 결과가 표시되며, 행을 펼치면 상세 결과를 볼 수 있습니다.
|
||||
- 지갑 잔액 부족으로 발송이 실패하면 관리자에게 알립니다. 대량 실패 시 알림이 반복 발송되지 않도록 일정 시간 간격으로 한 번만 안내합니다.
|
||||
- 설정 페이지의 알림톡 템플릿 탭에서 카카오 알림톡 템플릿을 직접 등록·수정·삭제하고 검수를 요청할 수 있습니다. 등록한 템플릿의 상태(발송가능·검수중·반려·미검수·중지 등)를 배지로 확인하고, 상태별로 가능한 관리 동작(검수 요청·중지·승인 취소 등)을 바로 실행할 수 있습니다.
|
||||
- 템플릿 등록 화면에서 템플릿명·템플릿 코드(자동 생성 또는 직접 입력)·카테고리(대분류/소분류)·템플릿 유형(기본형·이미지형·강조표기형)·본문을 입력하고, 우측에서 실시간 미리보기를 확인할 수 있습니다. 이미지형은 이미지를 첨부하면 자동으로 업로드됩니다. (아이템리스트형 등 고급 유형은 비즈뿌리오 홈페이지에서 등록한 뒤에도 목록에서 함께 관리할 수 있습니다.)
|
||||
- 본문에 넣을 수 있는 변수를 회원가입·비밀번호 관련 알림별로 참고표에 정리해 항상 보여줍니다. 그 밖의 알림 변수는 해당 알림의 모듈/플러그인 설정에서 확인하도록 안내합니다.
|
||||
- 선택 항목(부가정보·버튼·대표 링크·미리보기 메시지·템플릿 보안)을 필요한 것만 체크해 입력할 수 있습니다.
|
||||
- 버튼은 최대 5개까지 추가할 수 있으며, 버튼 종류(웹링크·앱링크·채널추가·전화하기·배송조회 등)에 따라 필요한 입력란(모바일/PC 링크·전화번호·플러그인 ID 등)이 자동으로 나타납니다. 각 입력란에는 필수·선택 여부가 표시됩니다.
|
||||
- 버튼 입력값을 카카오 규격에 맞게 검사합니다. 웹링크 주소는 http/https 형식, 앱링크는 안드로이드·iOS·모바일 중 2개 이상(전화연결 링크 불가), 전화하기 버튼명은 "전화 연결·고객센터 연결·상담원 연결" 중 하나, 대표 링크의 PC·모바일 주소는 웹 주소 형식이어야 합니다. 잘못 입력하면 어느 버튼의 어느 항목인지 알기 쉽게 안내합니다.
|
||||
- 템플릿 보안(OTP)과 미리보기 메시지는 함께 쓸 수 없어, 한쪽을 켜면 다른 쪽 선택이 잠기고 그 이유를 안내합니다.
|
||||
- 입력란마다 현재 글자 수와 최대 글자 수를 실시간으로 표시해, 카카오 규격을 넘지 않도록 돕습니다.
|
||||
- 목록 화면과 등록 화면 상단에 템플릿 승인·검수 절차와 작성 규칙(정보성 메시지만 가능, 수신 근거 문구 권장, 등록 후에도 카카오 심사에서 반려될 수 있음)을 안내합니다.
|
||||
- 등록 화면의 실시간 미리보기가 입력 폼 옆에 고정되어, 긴 폼을 스크롤하며 입력해도 미리보기를 계속 볼 수 있습니다.
|
||||
- 템플릿 등록·수정이 실패하면 카카오가 알려준 실제 사유(예: 접근 불가 IP, 반려 사유 등)를 화면에 그대로 표시합니다.
|
||||
- 템플릿은 [등록]으로 임시 저장하거나 [등록 후 검수요청]으로 등록과 동시에 카카오 검수를 요청할 수 있습니다.
|
||||
- 설정 페이지의 알림톡 템플릿 탭에서 카카오 알림톡 템플릿의 목록·상태·내용을 확인할 수 있습니다. 템플릿 등록·수정·검수·상태변경은 비즈뿌리오 콘솔에서 하며, 이 화면은 목록·상태·내용 조회와 알림 연결을 담당합니다. 콘솔에서 등록한 템플릿도 이 목록에 그대로 표시되고 알림에 연결할 수 있습니다.
|
||||
- 템플릿 목록을 상태(발송가능·검수중·반려·미검수·중지 등) 배지와 함께 보여주고, 상태·이름으로 필터·검색할 수 있습니다. 발송가능(승인) 상태의 템플릿만 알림에 연결해 발송할 수 있습니다.
|
||||
- 각 템플릿의 [내용] 버튼으로 템플릿명·코드·카테고리·유형·본문·버튼을 담은 상세 내용을 확인할 수 있습니다.
|
||||
- 목록 상단에 배지 의미(발송가능·검수중·미검수·반려)와 함께, 템플릿 등록·수정·검수·상태변경은 비즈뿌리오 콘솔에서 한다는 안내와 콘솔 바로가기를 제공합니다.
|
||||
- 환경설정 탭에 카카오 알림톡·문자(SMS/LMS) 사용 전 준비 사항(비즈뿌리오 가입·API 승인·발신프로필 등록·발신번호 사전 등록)을 안내하는 박스를 추가했습니다.
|
||||
- 템플릿 목록·상세 조회가 실패하면 카카오가 알려준 실제 사유(예: 접근 불가 IP, 발신프로필 미설정 등)를 화면에 그대로 표시합니다.
|
||||
@@ -0,0 +1,10 @@
|
||||
{
|
||||
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
||||
"identifier": "sirsoft-message_bizppurio",
|
||||
"version": "1.0.0",
|
||||
"components": {
|
||||
"basic": [],
|
||||
"composite": [],
|
||||
"layout": []
|
||||
}
|
||||
}
|
||||
@@ -1,2 +1,2 @@
|
||||
var SirsoftMessageBizppurio=(function(f){"use strict";const w=window.G7Core?.createLogger?.("MessageBizppurio:InsertVariable")??{log:(...e)=>console.log("[MessageBizppurio:InsertVariable]",...e),warn:(...e)=>console.warn("[MessageBizppurio:InsertVariable]",...e),error:(...e)=>console.error("[MessageBizppurio:InsertVariable]",...e)},y="templateContent",A="templateForm.templateContent";function C(e,o){const t=window.G7Core,g=e.params??{},n=String(g.variable??"").trim(),a=String(g.target??y),s=String(g.statePath??A);if(n===""){w.warn("삽입할 변수명이 지정되지 않았습니다.");return}if(!t?.state?.getLocal||!t?.state?.setLocal){w.error("G7Core.state API 를 사용할 수 없습니다.");return}const d=o?.state??t.state.getLocal()??{},r=String(P(d,s)??""),i=`#{${n}}`,l=document.querySelector(`textarea[name="${a}"], input[name="${a}"]`),u=(l?.value??"")===r,b=u?l?.selectionStart??r.length:r.length,E=u?l?.selectionEnd??r.length:r.length,M=r.slice(0,b)+i+r.slice(E);if(t.state.setLocal({[s]:M}),l){const $=b+i.length;requestAnimationFrame(()=>{try{l.focus(),l.setSelectionRange($,$)}catch{}})}w.log(`변수 삽입: ${i} → ${s}`)}function P(e,o){return o.split(".").reduce((t,g)=>t?.[g],e)}const p=window.G7Core?.createLogger?.("MessageBizppurio:UploadImage")??{log:(...e)=>console.log("[MessageBizppurio:UploadImage]",...e),warn:(...e)=>console.warn("[MessageBizppurio:UploadImage]",...e),error:(...e)=>console.error("[MessageBizppurio:UploadImage]",...e)},G="/api/plugins/sirsoft-message_bizppurio/admin/alimtalk-templates/image";async function z(e,o){const t=window.G7Core;if(!t?.state?.setLocal){p.error("G7Core.state.setLocal 을 사용할 수 없습니다.");return}const n=(o?.event??e?.event)?.target,a=n?.files?.[0];if(a){t.state.setLocal({imageUploading:!0,imageUploadError:null});try{const s=localStorage.getItem("auth_token")??"",d=new FormData;d.append("image",a,a.name);const r=await fetch(G,{method:"POST",headers:{Accept:"application/json",...s?{Authorization:`Bearer ${s}`}:{}},body:d}),i=await r.json().catch(()=>({}));if(!r.ok||i?.success===!1){const u=i?.errors?.kakao_message||i?.message||"이미지 업로드에 실패했습니다.";t.state.setLocal({imageUploading:!1,imageUploadError:u}),p.warn("이미지 업로드 실패:",u);return}const l=i?.data?.image_url??"",U=i?.data?.image_name??a.name;t.state.setLocal({imageUploading:!1,imageUploadError:null,"templateForm.templateImageUrl":l,"templateForm.templateImageName":U}),p.log("이미지 업로드 완료:",l)}catch(s){t.state.setLocal({imageUploading:!1,imageUploadError:String(s)}),p.error("이미지 업로드 예외:",s)}finally{n&&(n.value="")}}}const m={insertVariable:C,uploadTemplateImage:z},c="sirsoft-message_bizppurio",h=window.G7Core?.createLogger?.(`Plugin:${c}`)??{log:(...e)=>console.log(`[Plugin:${c}]`,...e),warn:(...e)=>console.warn(`[Plugin:${c}]`,...e),error:(...e)=>console.error(`[Plugin:${c}]`,...e)};function I(e){Object.entries(m).forEach(([o,t])=>{e.registerHandler(`${c}.${o}`,t,{category:"plugin",source:c})}),h.log(`${Object.keys(m).length} handler(s) registered:`,Object.keys(m).map(o=>`${c}.${o}`))}function S(e){const o=window.G7Core?.getActionDispatcher?.();if(o){I(o);return}if(!e){h.warn("ActionDispatcher 를 찾지 못해 핸들러를 등록하지 못했습니다.");return}let t=0;const g=50,n=()=>{const a=window.G7Core?.getActionDispatcher?.();if(a){I(a);return}++t<=g?setTimeout(n,100):h.error("ActionDispatcher 를 찾지 못해 핸들러 등록에 실패했습니다.")};n()}function L(){if(document.readyState==="loading")document.addEventListener("DOMContentLoaded",()=>S(!0));else{const e=!!window.G7Core?.getActionDispatcher?.();S(!e)}}return L(),typeof window<"u"&&(window.__SirsoftMessageBizppurio={identifier:c,handlers:Object.keys(m),initPlugin:L}),f.initPlugin=L,Object.defineProperty(f,Symbol.toStringTag,{value:"Module"}),f})({});
|
||||
var SirsoftMessageBizppurio=(function(r){"use strict";const i={},t="sirsoft-message_bizppurio",o=window.G7Core?.createLogger?.(`Plugin:${t}`)??{log:(...e)=>console.log(`[Plugin:${t}]`,...e),warn:(...e)=>console.warn(`[Plugin:${t}]`,...e),error:(...e)=>console.error(`[Plugin:${t}]`,...e)};function a(e){Object.entries(i).forEach(([n,c])=>{e.registerHandler(`${t}.${n}`,c,{category:"plugin",source:t})}),o.log(`${Object.keys(i).length} handler(s) registered:`,Object.keys(i).map(n=>`${t}.${n}`))}function g(e){const n=window.G7Core?.getActionDispatcher?.();if(n){a(n);return}if(!e){o.warn("ActionDispatcher 를 찾지 못해 핸들러를 등록하지 못했습니다.");return}let c=0;const l=50,u=()=>{const d=window.G7Core?.getActionDispatcher?.();if(d){a(d);return}++c<=l?setTimeout(u,100):o.error("ActionDispatcher 를 찾지 못해 핸들러 등록에 실패했습니다.")};u()}function s(){if(document.readyState==="loading")document.addEventListener("DOMContentLoaded",()=>g(!0));else{const e=!!window.G7Core?.getActionDispatcher?.();g(!e)}}return s(),typeof window<"u"&&(window.__SirsoftMessageBizppurio={identifier:t,handlers:Object.keys(i),initPlugin:s}),r.initPlugin=s,Object.defineProperty(r,Symbol.toStringTag,{value:"Module"}),r})({});
|
||||
//# sourceMappingURL=plugin.iife.js.map
|
||||
@@ -1 +1 @@
|
||||
{"version":3,"file":"plugin.iife.js","sources":["../../resources/js/handlers/insertVariable.ts","../../resources/js/handlers/uploadTemplateImage.ts","../../resources/js/handlers/index.ts","../../resources/js/index.ts"],"sourcesContent":["/**\n * insertVariable 핸들러\n *\n * 알림톡 템플릿 등록/수정 화면에서 \"사용 가능 변수\" 버튼을 클릭하면, 대상 본문의 현재\n * 커서 위치에 `#{변수}` 를 삽입한다(D8). 값 자체는 G7 상태(`_local.<statePath>`)를 SSoT\n * 로 삼아 setLocal 로 갱신한다. DOM 값을 직접 쓰지 않으므로 자동/수동 바인딩 충돌\n * (삽입 후 다음 렌더에서 상태값으로 덮여 사라지는 문제)이 발생하지 않는다.\n *\n * 커서 위치만 DOM 에서 읽고(selectionStart), 없으면 문자열 끝에 붙인다.\n *\n * 레이아웃 JSON 사용 예:\n * {\n * \"handler\": \"sirsoft-message_bizppurio.insertVariable\",\n * \"params\": { \"variable\": \"name\", \"target\": \"templateContent\", \"statePath\": \"templateForm.templateContent\" }\n * }\n */\n\nimport type { ActionContext, ActionWithParams } from '../types';\n\nconst logger = ((window as any).G7Core?.createLogger?.('MessageBizppurio:InsertVariable')) ?? {\n log: (...args: unknown[]) => console.log('[MessageBizppurio:InsertVariable]', ...args),\n warn: (...args: unknown[]) => console.warn('[MessageBizppurio:InsertVariable]', ...args),\n error: (...args: unknown[]) => console.error('[MessageBizppurio:InsertVariable]', ...args),\n};\n\n/** 삽입 대상 본문 필드(name) 기본값 */\nconst DEFAULT_TARGET = 'templateContent';\n\n/** 상태 경로 기본값 (_local 하위) */\nconst DEFAULT_STATE_PATH = 'templateForm.templateContent';\n\n/**\n * 대상 본문의 커서 위치에 `#{변수}` 를 삽입하고 G7 상태를 갱신합니다.\n *\n * @param action 액션 객체(params.variable, params.target, params.statePath)\n * @param context 액션 컨텍스트(state 스냅샷)\n */\nexport function insertVariableHandler(\n action: ActionWithParams,\n context: ActionContext,\n): void {\n const G7Core = (window as any).G7Core;\n const params = action.params ?? {};\n const variable = String(params.variable ?? '').trim();\n const target = String(params.target ?? DEFAULT_TARGET);\n const statePath = String(params.statePath ?? DEFAULT_STATE_PATH);\n\n if (variable === '') {\n logger.warn('삽입할 변수명이 지정되지 않았습니다.');\n return;\n }\n\n if (!G7Core?.state?.getLocal || !G7Core?.state?.setLocal) {\n logger.error('G7Core.state API 를 사용할 수 없습니다.');\n return;\n }\n\n // 현재 값: 핸들러 컨텍스트 스냅샷 우선(React 커밋 직후 stale globalState 회피), 없으면 getLocal.\n const localState = (context as any)?.state ?? G7Core.state.getLocal() ?? {};\n const current = String(readPath(localState, statePath) ?? '');\n\n const token = `#{${variable}}`;\n\n // 커서 위치: DOM 에서 selectionStart 를 읽되, 값 자체는 상태 기준으로 조립.\n const field = document.querySelector<HTMLTextAreaElement | HTMLInputElement>(\n `textarea[name=\"${target}\"], input[name=\"${target}\"]`,\n );\n const domValue = field?.value ?? '';\n // DOM 값과 상태 값이 동일할 때만 커서 위치를 신뢰(동기화된 경우). 다르면 끝에 붙인다.\n const inSync = domValue === current;\n const start = inSync ? (field?.selectionStart ?? current.length) : current.length;\n const end = inSync ? (field?.selectionEnd ?? current.length) : current.length;\n\n const next = current.slice(0, start) + token + current.slice(end);\n\n G7Core.state.setLocal({ [statePath]: next });\n\n // 커서를 삽입한 토큰 뒤로 이동(다음 렌더 후 DOM 반영되므로 requestAnimationFrame 안에서).\n if (field) {\n const caret = start + token.length;\n requestAnimationFrame(() => {\n try {\n field.focus();\n field.setSelectionRange(caret, caret);\n } catch {\n // setSelectionRange 미지원 input — 무시\n }\n });\n }\n\n logger.log(`변수 삽입: ${token} → ${statePath}`);\n}\n\n/**\n * dot notation 경로로 객체에서 값을 읽습니다. (예: \"templateForm.templateContent\")\n *\n * @param obj 대상 객체\n * @param path dot 경로\n * @return 경로 값(없으면 undefined)\n */\nfunction readPath(obj: Record<string, any>, path: string): unknown {\n return path.split('.').reduce<any>((acc, key) => (acc == null ? undefined : acc[key]), obj);\n}\n","/**\n * uploadTemplateImage 핸들러\n *\n * 이미지형 알림톡 템플릿 등록 화면에서 파일 선택(change) 시, 선택한 이미지를 플러그인의\n * 이미지 업로드 API(카카오 서버 업로드 위임)로 전송하고, 반환된 카카오 이미지 URL 을\n * `_local.templateForm.templateImageULine truncated
|
||||
{"version":3,"file":"plugin.iife.js","sources":["../../resources/js/handlers/index.ts","../../resources/js/index.ts"],"sourcesContent":["/**\n * sirsoft-message_bizppurio 플러그인 커스텀 핸들러 맵.\n *\n * 키는 네임스페이스 없는 핸들러 이름이며, ActionDispatcher 등록 시 플러그인\n * 식별자가 네임스페이스로 접두된다.\n *\n * 현재 등록 핸들러 없음(알림톡 템플릿 등록·이미지 업로드 제거로 uploadTemplateImage 제거).\n * 커스텀 핸들러 추가 시 이 맵에 등록한다.\n */\n\nexport const handlerMap = {} as const;","/**\n * sirsoft-message_bizppurio 플러그인 엔트리포인트.\n *\n * 플러그인 활성화 시 자동 로드되어 handlerMap 의 커스텀 핸들러를 ActionDispatcher 에\n * 등록한다. 핸들러명은 `sirsoft-message_bizppurio.{name}` 네임스페이스를 갖는다.\n * (현재 등록 핸들러 없음 — 필요 시 handlers/index.ts 에 추가.)\n */\n\nimport { handlerMap } from './handlers';\n\nconst PLUGIN_IDENTIFIER = 'sirsoft-message_bizppurio';\n\nconst logger = ((window as any).G7Core?.createLogger?.(`Plugin:${PLUGIN_IDENTIFIER}`)) ?? {\n log: (...args: unknown[]) => console.log(`[Plugin:${PLUGIN_IDENTIFIER}]`, ...args),\n warn: (...args: unknown[]) => console.warn(`[Plugin:${PLUGIN_IDENTIFIER}]`, ...args),\n error: (...args: unknown[]) => console.error(`[Plugin:${PLUGIN_IDENTIFIER}]`, ...args),\n};\n\n/**\n * handlerMap 의 모든 핸들러를 ActionDispatcher 에 등록합니다.\n *\n * @param dispatcher 코어 ActionDispatcher 인스턴스\n */\nfunction register(dispatcher: any): void {\n Object.entries(handlerMap).forEach(([name, handler]) => {\n dispatcher.registerHandler(`${PLUGIN_IDENTIFIER}.${name}`, handler, {\n category: 'plugin',\n source: PLUGIN_IDENTIFIER,\n });\n });\n\n logger.log(\n `${Object.keys(handlerMap).length} handler(s) registered:`,\n Object.keys(handlerMap).map(name => `${PLUGIN_IDENTIFIER}.${name}`),\n );\n}\n\n/**\n * ActionDispatcher 준비 후 핸들러를 등록합니다.\n *\n * 최초 로드 시 ActionDispatcher 가 아직 없을 수 있으므로 짧게 재시도한다.\n *\n * @param retry ActionDispatcher 부재 시 재시도 여부\n */\nfunction registerHandlers(retry: boolean): void {\n const dispatcher = (window as any).G7Core?.getActionDispatcher?.();\n\n if (dispatcher) {\n register(dispatcher);\n return;\n }\n\n if (!retry) {\n logger.warn('ActionDispatcher 를 찾지 못해 핸들러를 등록하지 못했습니다.');\n return;\n }\n\n let count = 0;\n const max = 50; // 최대 5초 (50 * 100ms)\n const tick = () => {\n const found = (window as any).G7Core?.getActionDispatcher?.();\n if (found) {\n register(found);\n return;\n }\n if (++count <= max) {\n setTimeout(tick, 100);\n } else {\n logger.error('ActionDispatcher 를 찾지 못해 핸들러 등록에 실패했습니다.');\n }\n };\n tick();\n}\n\n/**\n * 플러그인 초기화 — DOM 준비 후 핸들러 등록.\n */\nexport function initPlugin(): void {\n if (document.readyState === 'loading') {\n document.addEventListener('DOMContentLoaded', () => registerHandlers(true));\n } else {\n const hasDispatcher = !!(window as any).G7Core?.getActionDispatcher?.();\n registerHandlers(!hasDispatcher);\n }\n}\n\ninitPlugin();\n\nif (typeof window !== 'undefined') {\n (window as any).__SirsoftMessageBizppurio = {\n identifier: PLUGIN_IDENTIFIER,\n handlers: Object.keys(handlerMap),\n initPlugin,\n };\n}"],"names":["handlerMap","PLUGIN_IDENTIFIER","logger","args","register","dispatcher","name","handler","registerHandlers","retry","count","max","tick","found","initPlugin","hasDispatcher"],"mappings":"sDAUO,MAAMA,EAAa,CAAA,ECApBC,EAAoB,4BAEpBC,EAAW,OAAe,QAAQ,eAAe,UAAUD,CAAiB,EAAE,GAAM,CACtF,IAAK,IAAIE,IAAoB,QAAQ,IAAI,WAAWF,CAAiB,IAAK,GAAGE,CAAI,EACjF,KAAM,IAAIA,IAAoB,QAAQ,KAAK,WAAWF,CAAiB,IAAK,GAAGE,CAAI,EACnF,MAAO,IAAIA,IAAoB,QAAQ,MAAM,WAAWF,CAAiB,IAAK,GAAGE,CAAI,CACzF,EAOA,SAASC,EAASC,EAAuB,CACrC,OAAO,QAAQL,CAAU,EAAE,QAAQ,CAAC,CAACM,EAAMC,CAAO,IAAM,CACpDF,EAAW,gBAAgB,GAAGJ,CAAiB,IAAIK,CAAI,GAAIC,EAAS,CAChE,SAAU,SACV,OAAQN,CAAA,CACX,CACL,CAAC,EAEDC,EAAO,IACH,GAAG,OAAO,KAAKF,CAAU,EAAE,MAAM,0BACjC,OAAO,KAAKA,CAAU,EAAE,OAAY,GAAGC,CAAiB,IAAIK,CAAI,EAAE,CAAA,CAE1E,CASA,SAASE,EAAiBC,EAAsB,CAC5C,MAAMJ,EAAc,OAAe,QAAQ,sBAAA,EAE3C,GAAIA,EAAY,CACZD,EAASC,CAAU,EACnB,MACJ,CAEA,GAAI,CAACI,EAAO,CACRP,EAAO,KAAK,2CAA2C,EACvD,MACJ,CAEA,IAAIQ,EAAQ,EACZ,MAAMC,EAAM,GACNC,EAAO,IAAM,CACf,MAAMC,EAAS,OAAe,QAAQ,sBAAA,EACtC,GAAIA,EAAO,CACPT,EAASS,CAAK,EACd,MACJ,CACI,EAAEH,GAASC,EACX,WAAWC,EAAM,GAAG,EAEpBV,EAAO,MAAM,0CAA0C,CAE/D,EACAU,EAAA,CACJ,CAKO,SAASE,GAAmB,CAC/B,GAAI,SAAS,aAAe,UACxB,SAAS,iBAAiB,mBAAoB,IAAMN,EAAiB,EAAI,CAAC,MACvE,CACH,MAAMO,EAAgB,CAAC,CALine truncated
|
||||
@@ -4,14 +4,15 @@
|
||||
> 아래 표는 자동 생성됩니다. 각 문서를 열면 엔드포인트별 파라미터·응답·예시를 볼 수 있습니다.
|
||||
|
||||
<!-- @generated:start:api-readme-index -->
|
||||
- **문서 수**: 5 · **엔드포인트 수**: 21
|
||||
- **문서 수**: 6 · **엔드포인트 수**: 12
|
||||
|
||||
| 문서 | 도메인 | 엔드포인트 |
|
||||
| --- | --- | --- |
|
||||
| [alimtalk-templates.md](alimtalk-templates.md) | `alimtalk-templates` | 14 |
|
||||
| [alimtalk-templates.md](alimtalk-templates.md) | `alimtalk-templates` | 4 |
|
||||
| [dispatch-results.md](dispatch-results.md) | `dispatch-results` | 2 |
|
||||
| [notification-bindings.md](notification-bindings.md) | `notification-bindings` | 3 |
|
||||
| [report.md](report.md) | `report` | 1 |
|
||||
| [templates.md](templates.md) | `templates` | 1 |
|
||||
| [webhook.md](webhook.md) | `webhook` | 1 |
|
||||
|
||||
<!-- @generated:end -->
|
||||
|
||||
@@ -56,89 +56,6 @@ Authorization: Bearer {YOUR_TOKEN}
|
||||
**설명** <!-- TODO: 이 엔드포인트의 용도·주의사항·예시 시나리오를 작성하세요 -->
|
||||
|
||||
|
||||
### POST /api/plugins/sirsoft-message_bizppurio/admin/alimtalk-templates
|
||||
<!-- @generated:start:api.plugins.sirsoft-message_bizppurio.admin.alimtalk-templates.store -->
|
||||
- **라우트명**: `api.plugins.sirsoft-message_bizppurio.admin.alimtalk-templates.store`
|
||||
- **컨트롤러**: `Plugins\Sirsoft\MessageBizppurio\Controllers\Admin\AlimtalkTemplateController@store`
|
||||
- **인증/권한**: `auth:sanctum` + `permission:sirsoft-message_bizppurio.messaging.manage`
|
||||
|
||||
**요청 파라미터**
|
||||
|
||||
| 이름 | 위치 | 타입 | 필수 | 허용값 | 용도 |
|
||||
| --- | --- | --- | --- | --- | --- |
|
||||
| templateName | body | string | 예 | max 200 | <!-- TODO: 용도 --> |
|
||||
| templateContent | body | string | 예 | max 1300 | <!-- TODO: 용도 --> |
|
||||
| categoryCode | body | string | 예 | max 20 | <!-- TODO: 용도 --> |
|
||||
| templateEmphasizeType | body | string | 예 | — | <!-- TODO: 용도 --> |
|
||||
| templateCode | body | string | 아니오 | max 30 | <!-- TODO: 용도 --> |
|
||||
| templateTitle | body | string | 아니오 | max 23 | <!-- TODO: 용도 --> |
|
||||
| templateSubtitle | body | string | 아니오 | max 18 | <!-- TODO: 용도 --> |
|
||||
| templateImageName | body | string | 아니오 | max 255 | <!-- TODO: 용도 --> |
|
||||
| templateImageUrl | body | string | 아니오 | max 500 | <!-- TODO: 용도 --> |
|
||||
| templatePreviewMessage | body | string | 아니오 | max 40 | <!-- TODO: 용도 --> |
|
||||
| templateExtra | body | string | 아니오 | max 500 | <!-- TODO: 용도 --> |
|
||||
| securityFlag | body | boolean | 아니오 | — | <!-- TODO: 용도 --> |
|
||||
| requestInspection | body | boolean | 아니오 | — | <!-- TODO: 용도 --> |
|
||||
| buttons | body | array | 아니오 | max 5 | <!-- TODO: 용도 --> |
|
||||
| quickReplies | body | array | 아니오 | max 10 | <!-- TODO: 용도 --> |
|
||||
| templateRepresentLink | body | array | 아니오 | — | <!-- TODO: 용도 --> |
|
||||
|
||||
**요청 예시**
|
||||
|
||||
```http
|
||||
POST /api/plugins/sirsoft-message_bizppurio/admin/alimtalk-templates HTTP/1.1
|
||||
Host: api.example.com
|
||||
Accept: application/json
|
||||
Authorization: Bearer {YOUR_TOKEN}
|
||||
Content-Type: application/json
|
||||
|
||||
{
|
||||
"templateName": "예시 이름",
|
||||
"templateContent": "예시 내용입니다.",
|
||||
"categoryCode": "예시값",
|
||||
"templateEmphasizeType": "예시값",
|
||||
"templateCode": "예시값",
|
||||
"templateTitle": "예시 제목",
|
||||
"templateSubtitle": "예시 제목",
|
||||
"templateImageName": "예시 이름",
|
||||
"templateImageUrl": "https://example.com",
|
||||
"templatePreviewMessage": "예시값",
|
||||
"templateExtra": "예시값",
|
||||
"securityFlag": true,
|
||||
"requestInspection": true,
|
||||
"buttons": [
|
||||
"예시값"
|
||||
],
|
||||
"quickReplies": [
|
||||
"예시값"
|
||||
],
|
||||
"templateRepresentLink": [
|
||||
"예시값"
|
||||
]
|
||||
}
|
||||
```
|
||||
|
||||
**응답 필드** (`data` 내부)
|
||||
|
||||
<!-- 실측 제외: http-422 — 응답 필드는 사람이 작성하세요. -->
|
||||
|
||||
**응답 예시**
|
||||
|
||||
<!-- 실측 제외: http-422 — 응답 예시는 사람이 작성하세요. -->
|
||||
|
||||
**에러 응답**
|
||||
|
||||
| 상태코드 | 의미 | 발생 조건 |
|
||||
| --- | --- | --- |
|
||||
| 401 | Unauthenticated | 유효한 Bearer 토큰이 없거나 만료된 경우 |
|
||||
| 403 | Forbidden | 요구 권한(`sirsoft-message_bizppurio.messaging.manage`)이 없는 경우 |
|
||||
| 422 | Unprocessable Entity | 요청 파라미터가 검증 규칙을 위반한 경우 (`error.errors` 에 필드별 메시지) |
|
||||
|
||||
<!-- @generated:end -->
|
||||
|
||||
**설명** <!-- TODO: 이 엔드포인트의 용도·주의사항·예시 시나리오를 작성하세요 -->
|
||||
|
||||
|
||||
### GET /api/plugins/sirsoft-message_bizppurio/admin/alimtalk-templates/categories
|
||||
<!-- @generated:start:api.plugins.sirsoft-message_bizppurio.admin.alimtalk-templates.categories -->
|
||||
- **라우트명**: `api.plugins.sirsoft-message_bizppurio.admin.alimtalk-templates.categories`
|
||||
@@ -178,56 +95,6 @@ Authorization: Bearer {YOUR_TOKEN}
|
||||
**설명** <!-- TODO: 이 엔드포인트의 용도·주의사항·예시 시나리오를 작성하세요 -->
|
||||
|
||||
|
||||
### POST /api/plugins/sirsoft-message_bizppurio/admin/alimtalk-templates/image
|
||||
<!-- @generated:start:api.plugins.sirsoft-message_bizppurio.admin.alimtalk-templates.image -->
|
||||
- **라우트명**: `api.plugins.sirsoft-message_bizppurio.admin.alimtalk-templates.image`
|
||||
- **컨트롤러**: `Plugins\Sirsoft\MessageBizppurio\Controllers\Admin\AlimtalkTemplateController@uploadImage`
|
||||
- **인증/권한**: `auth:sanctum` + `permission:sirsoft-message_bizppurio.messaging.manage`
|
||||
|
||||
**요청 파라미터**
|
||||
|
||||
| 이름 | 위치 | 타입 | 필수 | 허용값 | 용도 |
|
||||
| --- | --- | --- | --- | --- | --- |
|
||||
| image | body | file | 예 | max 500 | <!-- TODO: 용도 --> |
|
||||
|
||||
**요청 예시**
|
||||
|
||||
```http
|
||||
POST /api/plugins/sirsoft-message_bizppurio/admin/alimtalk-templates/image HTTP/1.1
|
||||
Host: api.example.com
|
||||
Accept: application/json
|
||||
Authorization: Bearer {YOUR_TOKEN}
|
||||
Content-Type: multipart/form-data; boundary=----G7ExampleBoundary
|
||||
|
||||
------G7ExampleBoundary
|
||||
Content-Disposition: form-data; name="image"; filename="example.pdf"
|
||||
Content-Type: application/octet-stream
|
||||
|
||||
(바이너리 파일 내용)
|
||||
------G7ExampleBoundary--
|
||||
```
|
||||
|
||||
**응답 필드** (`data` 내부)
|
||||
|
||||
<!-- 실측 제외: http-422 — 응답 필드는 사람이 작성하세요. -->
|
||||
|
||||
**응답 예시**
|
||||
|
||||
<!-- 실측 제외: http-422 — 응답 예시는 사람이 작성하세요. -->
|
||||
|
||||
**에러 응답**
|
||||
|
||||
| 상태코드 | 의미 | 발생 조건 |
|
||||
| --- | --- | --- |
|
||||
| 401 | Unauthenticated | 유효한 Bearer 토큰이 없거나 만료된 경우 |
|
||||
| 403 | Forbidden | 요구 권한(`sirsoft-message_bizppurio.messaging.manage`)이 없는 경우 |
|
||||
| 422 | Unprocessable Entity | 요청 파라미터가 검증 규칙을 위반한 경우 (`error.errors` 에 필드별 메시지) |
|
||||
|
||||
<!-- @generated:end -->
|
||||
|
||||
**설명** <!-- TODO: 이 엔드포인트의 용도·주의사항·예시 시나리오를 작성하세요 -->
|
||||
|
||||
|
||||
### GET /api/plugins/sirsoft-message_bizppurio/admin/alimtalk-templates/profiles
|
||||
<!-- @generated:start:api.plugins.sirsoft-message_bizppurio.admin.alimtalk-templates.profiles -->
|
||||
- **라우트명**: `api.plugins.sirsoft-message_bizppurio.admin.alimtalk-templates.profiles`
|
||||
@@ -267,48 +134,6 @@ Authorization: Bearer {YOUR_TOKEN}
|
||||
**설명** <!-- TODO: 이 엔드포인트의 용도·주의사항·예시 시나리오를 작성하세요 -->
|
||||
|
||||
|
||||
### DELETE /api/plugins/sirsoft-message_bizppurio/admin/alimtalk-templates/{templateCode}
|
||||
<!-- @generated:start:api.plugins.sirsoft-message_bizppurio.admin.alimtalk-templates.destroy -->
|
||||
- **라우트명**: `api.plugins.sirsoft-message_bizppurio.admin.alimtalk-templates.destroy`
|
||||
- **컨트롤러**: `Plugins\Sirsoft\MessageBizppurio\Controllers\Admin\AlimtalkTemplateController@destroy`
|
||||
- **인증/권한**: `auth:sanctum` + `permission:sirsoft-message_bizppurio.messaging.manage`
|
||||
|
||||
**요청 파라미터**
|
||||
|
||||
| 이름 | 위치 | 타입 | 필수 | 허용값 | 용도 |
|
||||
| --- | --- | --- | --- | --- | --- |
|
||||
| templateCode | path | string | 예 | — | 대상 template code의 식별자 |
|
||||
|
||||
**요청 예시**
|
||||
|
||||
```http
|
||||
DELETE /api/plugins/sirsoft-message_bizppurio/admin/alimtalk-templates/{templateCode} HTTP/1.1
|
||||
Host: api.example.com
|
||||
Accept: application/json
|
||||
Authorization: Bearer {YOUR_TOKEN}
|
||||
```
|
||||
|
||||
**응답 필드** (`data` 내부)
|
||||
|
||||
<!-- 실측 제외: unresolved-path-param — 응답 필드는 사람이 작성하세요. -->
|
||||
|
||||
**응답 예시**
|
||||
|
||||
<!-- 실측 제외: unresolved-path-param — 응답 예시는 사람이 작성하세요. -->
|
||||
|
||||
**에러 응답**
|
||||
|
||||
| 상태코드 | 의미 | 발생 조건 |
|
||||
| --- | --- | --- |
|
||||
| 401 | Unauthenticated | 유효한 Bearer 토큰이 없거나 만료된 경우 |
|
||||
| 403 | Forbidden | 요구 권한(`sirsoft-message_bizppurio.messaging.manage`)이 없는 경우 |
|
||||
| 404 | Not Found | path 파라미터에 해당하는 리소스가 없는 경우 |
|
||||
|
||||
<!-- @generated:end -->
|
||||
|
||||
**설명** <!-- TODO: 이 엔드포인트의 용도·주의사항·예시 시나리오를 작성하세요 -->
|
||||
|
||||
|
||||
### GET /api/plugins/sirsoft-message_bizppurio/admin/alimtalk-templates/{templateCode}
|
||||
<!-- @generated:start:api.plugins.sirsoft-message_bizppurio.admin.alimtalk-templates.show -->
|
||||
- **라우트명**: `api.plugins.sirsoft-message_bizppurio.admin.alimtalk-templates.show`
|
||||
@@ -351,339 +176,3 @@ Authorization: Bearer {YOUR_TOKEN}
|
||||
**설명** <!-- TODO: 이 엔드포인트의 용도·주의사항·예시 시나리오를 작성하세요 -->
|
||||
|
||||
|
||||
### PUT /api/plugins/sirsoft-message_bizppurio/admin/alimtalk-templates/{templateCode}
|
||||
<!-- @generated:start:api.plugins.sirsoft-message_bizppurio.admin.alimtalk-templates.update -->
|
||||
- **라우트명**: `api.plugins.sirsoft-message_bizppurio.admin.alimtalk-templates.update`
|
||||
- **컨트롤러**: `Plugins\Sirsoft\MessageBizppurio\Controllers\Admin\AlimtalkTemplateController@update`
|
||||
- **인증/권한**: `auth:sanctum` + `permission:sirsoft-message_bizppurio.messaging.manage`
|
||||
|
||||
**요청 파라미터**
|
||||
|
||||
| 이름 | 위치 | 타입 | 필수 | 허용값 | 용도 |
|
||||
| --- | --- | --- | --- | --- | --- |
|
||||
| templateCode | path | string | 예 | — | 대상 template code의 식별자 |
|
||||
| templateName | body | string | 예 | max 200 | <!-- TODO: 용도 --> |
|
||||
| templateContent | body | string | 예 | max 1300 | <!-- TODO: 용도 --> |
|
||||
| categoryCode | body | string | 예 | max 20 | <!-- TODO: 용도 --> |
|
||||
| templateEmphasizeType | body | string | 예 | — | <!-- TODO: 용도 --> |
|
||||
| templateTitle | body | string | 아니오 | max 23 | <!-- TODO: 용도 --> |
|
||||
| templateSubtitle | body | string | 아니오 | max 18 | <!-- TODO: 용도 --> |
|
||||
| templateImageName | body | string | 아니오 | max 255 | <!-- TODO: 용도 --> |
|
||||
| templateImageUrl | body | string | 아니오 | max 500 | <!-- TODO: 용도 --> |
|
||||
| templatePreviewMessage | body | string | 아니오 | max 40 | <!-- TODO: 용도 --> |
|
||||
| templateExtra | body | string | 아니오 | max 500 | <!-- TODO: 용도 --> |
|
||||
| securityFlag | body | boolean | 아니오 | — | <!-- TODO: 용도 --> |
|
||||
| requestInspection | body | boolean | 아니오 | — | <!-- TODO: 용도 --> |
|
||||
| buttons | body | array | 아니오 | max 5 | <!-- TODO: 용도 --> |
|
||||
| quickReplies | body | array | 아니오 | max 10 | <!-- TODO: 용도 --> |
|
||||
| templateRepresentLink | body | array | 아니오 | — | <!-- TODO: 용도 --> |
|
||||
|
||||
**요청 예시**
|
||||
|
||||
```http
|
||||
PUT /api/plugins/sirsoft-message_bizppurio/admin/alimtalk-templates/{templateCode} HTTP/1.1
|
||||
Host: api.example.com
|
||||
Accept: application/json
|
||||
Authorization: Bearer {YOUR_TOKEN}
|
||||
Content-Type: application/json
|
||||
|
||||
{
|
||||
"templateName": "예시 이름",
|
||||
"templateContent": "예시 내용입니다.",
|
||||
"categoryCode": "예시값",
|
||||
"templateEmphasizeType": "예시값",
|
||||
"templateCode": "예시값",
|
||||
"templateTitle": "예시 제목",
|
||||
"templateSubtitle": "예시 제목",
|
||||
"templateImageName": "예시 이름",
|
||||
"templateImageUrl": "https://example.com",
|
||||
"templatePreviewMessage": "예시값",
|
||||
"templateExtra": "예시값",
|
||||
"securityFlag": true,
|
||||
"requestInspection": true,
|
||||
"buttons": [
|
||||
"예시값"
|
||||
],
|
||||
"quickReplies": [
|
||||
"예시값"
|
||||
],
|
||||
"templateRepresentLink": [
|
||||
"예시값"
|
||||
]
|
||||
}
|
||||
```
|
||||
|
||||
**응답 필드** (`data` 내부)
|
||||
|
||||
<!-- 실측 제외: unresolved-path-param — 응답 필드는 사람이 작성하세요. -->
|
||||
|
||||
**응답 예시**
|
||||
|
||||
<!-- 실측 제외: unresolved-path-param — 응답 예시는 사람이 작성하세요. -->
|
||||
|
||||
**에러 응답**
|
||||
|
||||
| 상태코드 | 의미 | 발생 조건 |
|
||||
| --- | --- | --- |
|
||||
| 401 | Unauthenticated | 유효한 Bearer 토큰이 없거나 만료된 경우 |
|
||||
| 403 | Forbidden | 요구 권한(`sirsoft-message_bizppurio.messaging.manage`)이 없는 경우 |
|
||||
| 422 | Unprocessable Entity | 요청 파라미터가 검증 규칙을 위반한 경우 (`error.errors` 에 필드별 메시지) |
|
||||
| 404 | Not Found | path 파라미터에 해당하는 리소스가 없는 경우 |
|
||||
|
||||
<!-- @generated:end -->
|
||||
|
||||
**설명** <!-- TODO: 이 엔드포인트의 용도·주의사항·예시 시나리오를 작성하세요 -->
|
||||
|
||||
|
||||
### POST /api/plugins/sirsoft-message_bizppurio/admin/alimtalk-templates/{templateCode}/cancel-approval
|
||||
<!-- @generated:start:api.plugins.sirsoft-message_bizppurio.admin.alimtalk-templates.cancel-approval -->
|
||||
- **라우트명**: `api.plugins.sirsoft-message_bizppurio.admin.alimtalk-templates.cancel-approval`
|
||||
- **컨트롤러**: `Plugins\Sirsoft\MessageBizppurio\Controllers\Admin\AlimtalkTemplateController@cancelApproval`
|
||||
- **인증/권한**: `auth:sanctum` + `permission:sirsoft-message_bizppurio.messaging.manage`
|
||||
|
||||
**요청 파라미터**
|
||||
|
||||
| 이름 | 위치 | 타입 | 필수 | 허용값 | 용도 |
|
||||
| --- | --- | --- | --- | --- | --- |
|
||||
| templateCode | path | string | 예 | — | 대상 template code의 식별자 |
|
||||
|
||||
**요청 예시**
|
||||
|
||||
```http
|
||||
POST /api/plugins/sirsoft-message_bizppurio/admin/alimtalk-templates/{templateCode}/cancel-approval HTTP/1.1
|
||||
Host: api.example.com
|
||||
Accept: application/json
|
||||
Authorization: Bearer {YOUR_TOKEN}
|
||||
```
|
||||
|
||||
**응답 필드** (`data` 내부)
|
||||
|
||||
<!-- 실측 제외: unresolved-path-param — 응답 필드는 사람이 작성하세요. -->
|
||||
|
||||
**응답 예시**
|
||||
|
||||
<!-- 실측 제외: unresolved-path-param — 응답 예시는 사람이 작성하세요. -->
|
||||
|
||||
**에러 응답**
|
||||
|
||||
| 상태코드 | 의미 | 발생 조건 |
|
||||
| --- | --- | --- |
|
||||
| 401 | Unauthenticated | 유효한 Bearer 토큰이 없거나 만료된 경우 |
|
||||
| 403 | Forbidden | 요구 권한(`sirsoft-message_bizppurio.messaging.manage`)이 없는 경우 |
|
||||
| 404 | Not Found | path 파라미터에 해당하는 리소스가 없는 경우 |
|
||||
|
||||
<!-- @generated:end -->
|
||||
|
||||
**설명** <!-- TODO: 이 엔드포인트의 용도·주의사항·예시 시나리오를 작성하세요 -->
|
||||
|
||||
|
||||
### POST /api/plugins/sirsoft-message_bizppurio/admin/alimtalk-templates/{templateCode}/cancel-request
|
||||
<!-- @generated:start:api.plugins.sirsoft-message_bizppurio.admin.alimtalk-templates.cancel-request -->
|
||||
- **라우트명**: `api.plugins.sirsoft-message_bizppurio.admin.alimtalk-templates.cancel-request`
|
||||
- **컨트롤러**: `Plugins\Sirsoft\MessageBizppurio\Controllers\Admin\AlimtalkTemplateController@cancelRequest`
|
||||
- **인증/권한**: `auth:sanctum` + `permission:sirsoft-message_bizppurio.messaging.manage`
|
||||
|
||||
**요청 파라미터**
|
||||
|
||||
| 이름 | 위치 | 타입 | 필수 | 허용값 | 용도 |
|
||||
| --- | --- | --- | --- | --- | --- |
|
||||
| templateCode | path | string | 예 | — | 대상 template code의 식별자 |
|
||||
|
||||
**요청 예시**
|
||||
|
||||
```http
|
||||
POST /api/plugins/sirsoft-message_bizppurio/admin/alimtalk-templates/{templateCode}/cancel-request HTTP/1.1
|
||||
Host: api.example.com
|
||||
Accept: application/json
|
||||
Authorization: Bearer {YOUR_TOKEN}
|
||||
```
|
||||
|
||||
**응답 필드** (`data` 내부)
|
||||
|
||||
<!-- 실측 제외: unresolved-path-param — 응답 필드는 사람이 작성하세요. -->
|
||||
|
||||
**응답 예시**
|
||||
|
||||
<!-- 실측 제외: unresolved-path-param — 응답 예시는 사람이 작성하세요. -->
|
||||
|
||||
**에러 응답**
|
||||
|
||||
| 상태코드 | 의미 | 발생 조건 |
|
||||
| --- | --- | --- |
|
||||
| 401 | Unauthenticated | 유효한 Bearer 토큰이 없거나 만료된 경우 |
|
||||
| 403 | Forbidden | 요구 권한(`sirsoft-message_bizppurio.messaging.manage`)이 없는 경우 |
|
||||
| 404 | Not Found | path 파라미터에 해당하는 리소스가 없는 경우 |
|
||||
|
||||
<!-- @generated:end -->
|
||||
|
||||
**설명** <!-- TODO: 이 엔드포인트의 용도·주의사항·예시 시나리오를 작성하세요 -->
|
||||
|
||||
|
||||
### POST /api/plugins/sirsoft-message_bizppurio/admin/alimtalk-templates/{templateCode}/release
|
||||
<!-- @generated:start:api.plugins.sirsoft-message_bizppurio.admin.alimtalk-templates.release -->
|
||||
- **라우트명**: `api.plugins.sirsoft-message_bizppurio.admin.alimtalk-templates.release`
|
||||
- **컨트롤러**: `Plugins\Sirsoft\MessageBizppurio\Controllers\Admin\AlimtalkTemplateController@release`
|
||||
- **인증/권한**: `auth:sanctum` + `permission:sirsoft-message_bizppurio.messaging.manage`
|
||||
|
||||
**요청 파라미터**
|
||||
|
||||
| 이름 | 위치 | 타입 | 필수 | 허용값 | 용도 |
|
||||
| --- | --- | --- | --- | --- | --- |
|
||||
| templateCode | path | string | 예 | — | 대상 template code의 식별자 |
|
||||
|
||||
**요청 예시**
|
||||
|
||||
```http
|
||||
POST /api/plugins/sirsoft-message_bizppurio/admin/alimtalk-templates/{templateCode}/release HTTP/1.1
|
||||
Host: api.example.com
|
||||
Accept: application/json
|
||||
Authorization: Bearer {YOUR_TOKEN}
|
||||
```
|
||||
|
||||
**응답 필드** (`data` 내부)
|
||||
|
||||
<!-- 실측 제외: unresolved-path-param — 응답 필드는 사람이 작성하세요. -->
|
||||
|
||||
**응답 예시**
|
||||
|
||||
<!-- 실측 제외: unresolved-path-param — 응답 예시는 사람이 작성하세요. -->
|
||||
|
||||
**에러 응답**
|
||||
|
||||
| 상태코드 | 의미 | 발생 조건 |
|
||||
| --- | --- | --- |
|
||||
| 401 | Unauthenticated | 유효한 Bearer 토큰이 없거나 만료된 경우 |
|
||||
| 403 | Forbidden | 요구 권한(`sirsoft-message_bizppurio.messaging.manage`)이 없는 경우 |
|
||||
| 404 | Not Found | path 파라미터에 해당하는 리소스가 없는 경우 |
|
||||
|
||||
<!-- @generated:end -->
|
||||
|
||||
**설명** <!-- TODO: 이 엔드포인트의 용도·주의사항·예시 시나리오를 작성하세요 -->
|
||||
|
||||
|
||||
### POST /api/plugins/sirsoft-message_bizppurio/admin/alimtalk-templates/{templateCode}/request
|
||||
<!-- @generated:start:api.plugins.sirsoft-message_bizppurio.admin.alimtalk-templates.request -->
|
||||
- **라우트명**: `api.plugins.sirsoft-message_bizppurio.admin.alimtalk-templates.request`
|
||||
- **컨트롤러**: `Plugins\Sirsoft\MessageBizppurio\Controllers\Admin\AlimtalkTemplateController@requestInspection`
|
||||
- **인증/권한**: `auth:sanctum` + `permission:sirsoft-message_bizppurio.messaging.manage`
|
||||
|
||||
**요청 파라미터**
|
||||
|
||||
| 이름 | 위치 | 타입 | 필수 | 허용값 | 용도 |
|
||||
| --- | --- | --- | --- | --- | --- |
|
||||
| templateCode | path | string | 예 | — | 대상 template code의 식별자 |
|
||||
|
||||
**요청 예시**
|
||||
|
||||
```http
|
||||
POST /api/plugins/sirsoft-message_bizppurio/admin/alimtalk-templates/{templateCode}/request HTTP/1.1
|
||||
Host: api.example.com
|
||||
Accept: application/json
|
||||
Authorization: Bearer {YOUR_TOKEN}
|
||||
```
|
||||
|
||||
**응답 필드** (`data` 내부)
|
||||
|
||||
<!-- 실측 제외: unresolved-path-param — 응답 필드는 사람이 작성하세요. -->
|
||||
|
||||
**응답 예시**
|
||||
|
||||
<!-- 실측 제외: unresolved-path-param — 응답 예시는 사람이 작성하세요. -->
|
||||
|
||||
**에러 응답**
|
||||
|
||||
| 상태코드 | 의미 | 발생 조건 |
|
||||
| --- | --- | --- |
|
||||
| 401 | Unauthenticated | 유효한 Bearer 토큰이 없거나 만료된 경우 |
|
||||
| 403 | Forbidden | 요구 권한(`sirsoft-message_bizppurio.messaging.manage`)이 없는 경우 |
|
||||
| 404 | Not Found | path 파라미터에 해당하는 리소스가 없는 경우 |
|
||||
|
||||
<!-- @generated:end -->
|
||||
|
||||
**설명** <!-- TODO: 이 엔드포인트의 용도·주의사항·예시 시나리오를 작성하세요 -->
|
||||
|
||||
|
||||
### POST /api/plugins/sirsoft-message_bizppurio/admin/alimtalk-templates/{templateCode}/reuse
|
||||
<!-- @generated:start:api.plugins.sirsoft-message_bizppurio.admin.alimtalk-templates.reuse -->
|
||||
- **라우트명**: `api.plugins.sirsoft-message_bizppurio.admin.alimtalk-templates.reuse`
|
||||
- **컨트롤러**: `Plugins\Sirsoft\MessageBizppurio\Controllers\Admin\AlimtalkTemplateController@reuse`
|
||||
- **인증/권한**: `auth:sanctum` + `permission:sirsoft-message_bizppurio.messaging.manage`
|
||||
|
||||
**요청 파라미터**
|
||||
|
||||
| 이름 | 위치 | 타입 | 필수 | 허용값 | 용도 |
|
||||
| --- | --- | --- | --- | --- | --- |
|
||||
| templateCode | path | string | 예 | — | 대상 template code의 식별자 |
|
||||
|
||||
**요청 예시**
|
||||
|
||||
```http
|
||||
POST /api/plugins/sirsoft-message_bizppurio/admin/alimtalk-templates/{templateCode}/reuse HTTP/1.1
|
||||
Host: api.example.com
|
||||
Accept: application/json
|
||||
Authorization: Bearer {YOUR_TOKEN}
|
||||
```
|
||||
|
||||
**응답 필드** (`data` 내부)
|
||||
|
||||
<!-- 실측 제외: unresolved-path-param — 응답 필드는 사람이 작성하세요. -->
|
||||
|
||||
**응답 예시**
|
||||
|
||||
<!-- 실측 제외: unresolved-path-param — 응답 예시는 사람이 작성하세요. -->
|
||||
|
||||
**에러 응답**
|
||||
|
||||
| 상태코드 | 의미 | 발생 조건 |
|
||||
| --- | --- | --- |
|
||||
| 401 | Unauthenticated | 유효한 Bearer 토큰이 없거나 만료된 경우 |
|
||||
| 403 | Forbidden | 요구 권한(`sirsoft-message_bizppurio.messaging.manage`)이 없는 경우 |
|
||||
| 404 | Not Found | path 파라미터에 해당하는 리소스가 없는 경우 |
|
||||
|
||||
<!-- @generated:end -->
|
||||
|
||||
**설명** <!-- TODO: 이 엔드포인트의 용도·주의사항·예시 시나리오를 작성하세요 -->
|
||||
|
||||
|
||||
### POST /api/plugins/sirsoft-message_bizppurio/admin/alimtalk-templates/{templateCode}/stop
|
||||
<!-- @generated:start:api.plugins.sirsoft-message_bizppurio.admin.alimtalk-templates.stop -->
|
||||
- **라우트명**: `api.plugins.sirsoft-message_bizppurio.admin.alimtalk-templates.stop`
|
||||
- **컨트롤러**: `Plugins\Sirsoft\MessageBizppurio\Controllers\Admin\AlimtalkTemplateController@stop`
|
||||
- **인증/권한**: `auth:sanctum` + `permission:sirsoft-message_bizppurio.messaging.manage`
|
||||
|
||||
**요청 파라미터**
|
||||
|
||||
| 이름 | 위치 | 타입 | 필수 | 허용값 | 용도 |
|
||||
| --- | --- | --- | --- | --- | --- |
|
||||
| templateCode | path | string | 예 | — | 대상 template code의 식별자 |
|
||||
|
||||
**요청 예시**
|
||||
|
||||
```http
|
||||
POST /api/plugins/sirsoft-message_bizppurio/admin/alimtalk-templates/{templateCode}/stop HTTP/1.1
|
||||
Host: api.example.com
|
||||
Accept: application/json
|
||||
Authorization: Bearer {YOUR_TOKEN}
|
||||
```
|
||||
|
||||
**응답 필드** (`data` 내부)
|
||||
|
||||
<!-- 실측 제외: unresolved-path-param — 응답 필드는 사람이 작성하세요. -->
|
||||
|
||||
**응답 예시**
|
||||
|
||||
<!-- 실측 제외: unresolved-path-param — 응답 예시는 사람이 작성하세요. -->
|
||||
|
||||
**에러 응답**
|
||||
|
||||
| 상태코드 | 의미 | 발생 조건 |
|
||||
| --- | --- | --- |
|
||||
| 401 | Unauthenticated | 유효한 Bearer 토큰이 없거나 만료된 경우 |
|
||||
| 403 | Forbidden | 요구 권한(`sirsoft-message_bizppurio.messaging.manage`)이 없는 경우 |
|
||||
| 404 | Not Found | path 파라미터에 해당하는 리소스가 없는 경우 |
|
||||
|
||||
<!-- @generated:end -->
|
||||
|
||||
**설명** <!-- TODO: 이 엔드포인트의 용도·주의사항·예시 시나리오를 작성하세요 -->
|
||||
|
||||
|
||||
@@ -0,0 +1,75 @@
|
||||
# Templates API 레퍼런스
|
||||
|
||||
> **소유**: plugin `sirsoft-message_bizppurio` · **생성**: `php artisan api:docgen` (실측 기반). @generated 블록은 재생성 시 갱신되며, 사람이 작성한 설명은 보존됩니다.
|
||||
|
||||
---
|
||||
|
||||
## TL;DR (5초 요약)
|
||||
|
||||
```text
|
||||
1. 이 문서는 실제 API 호출로 실측한 Templates 엔드포인트 레퍼런스입니다
|
||||
2. 각 엔드포인트: 메서드/URI/권한 + 요청 파라미터 표 + 요청 예시(curl) + 실측 응답 필드 표 + 응답 예시(envelope)
|
||||
3. 응답 필드의 예시값·응답 예시 JSON 은 실제 호출 응답에서 관측된 값입니다
|
||||
4. 갱신: 코드 변경 후 php artisan api:docgen 재실행
|
||||
5. 설명(TODO) 칸은 사람이 채웁니다
|
||||
```
|
||||
|
||||
---
|
||||
|
||||
|
||||
### GET /api/plugins/sirsoft-message_bizppurio/admin/templates-readiness
|
||||
<!-- @generated:start:api.plugins.sirsoft-message_bizppurio.admin.templates.readiness -->
|
||||
- **라우트명**: `api.plugins.sirsoft-message_bizppurio.admin.templates.readiness`
|
||||
- **인증/권한**: `auth:sanctum` + `permission:sirsoft-message_bizppurio.messaging.view`
|
||||
|
||||
**요청 파라미터**
|
||||
|
||||
_요청 파라미터 없음._
|
||||
|
||||
**요청 예시**
|
||||
|
||||
```http
|
||||
GET /api/plugins/sirsoft-message_bizppurio/admin/templates-readiness HTTP/1.1
|
||||
Host: api.example.com
|
||||
Accept: application/json
|
||||
Authorization: Bearer {YOUR_TOKEN}
|
||||
```
|
||||
|
||||
**응답 필드** (`data` 내부)
|
||||
|
||||
_단건 응답: `data` 객체의 필드._
|
||||
|
||||
| 필드 | 타입 | 실측 예시값 | 용도/설명 |
|
||||
| --- | --- | --- | --- |
|
||||
| api_key_set | boolean | `false` | <!-- TODO: 설명 --> |
|
||||
| sender_key_set | boolean | `false` | <!-- TODO: 설명 --> |
|
||||
| ready | boolean | `false` | <!-- TODO: 설명 --> |
|
||||
|
||||
**응답 예시**
|
||||
|
||||
```http
|
||||
HTTP/1.1 200
|
||||
```
|
||||
|
||||
```json
|
||||
{
|
||||
"success": true,
|
||||
"data": {
|
||||
"api_key_set": "{MASKED}",
|
||||
"sender_key_set": false,
|
||||
"ready": false
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
**에러 응답**
|
||||
|
||||
| 상태코드 | 의미 | 발생 조건 |
|
||||
| --- | --- | --- |
|
||||
| 401 | Unauthenticated | 유효한 Bearer 토큰이 없거나 만료된 경우 |
|
||||
| 403 | Forbidden | 요구 권한(`sirsoft-message_bizppurio.messaging.view`)이 없는 경우 |
|
||||
|
||||
<!-- @generated:end -->
|
||||
|
||||
**설명** <!-- TODO: 이 엔드포인트의 용도·주의사항·예시 시나리오를 작성하세요 -->
|
||||
|
||||
@@ -1,34 +1,10 @@
|
||||
<?php
|
||||
|
||||
// The alimtalk template screen became read-only, so create/update/inspection/status-change
|
||||
// activity logs were removed. This plugin no longer writes activity logs (registration and
|
||||
// management are delegated to the Bizppurio console). Define action/description keys here
|
||||
// when activity logging is added.
|
||||
return [
|
||||
// Action labels — unique actions are defined with full dotted keys (plan §3).
|
||||
// ActivityLog::getActionLabelAttribute resolves this array first (plugin lang full action key).
|
||||
'action' => [
|
||||
'sirsoft-message_bizppurio' => [
|
||||
'alimtalk_template' => [
|
||||
'create' => 'Register alimtalk template',
|
||||
'update' => 'Update alimtalk template',
|
||||
'delete' => 'Delete alimtalk template',
|
||||
'request' => 'Request alimtalk template inspection',
|
||||
'cancel_request' => 'Cancel alimtalk template inspection request',
|
||||
'stop' => 'Stop alimtalk template',
|
||||
'reuse' => 'Resume alimtalk template',
|
||||
'cancel_approval' => 'Cancel alimtalk template approval',
|
||||
'release' => 'Release alimtalk template from dormancy',
|
||||
],
|
||||
],
|
||||
],
|
||||
|
||||
// Description bodies — standard pattern activity_log.description.X (resolved by DescriptionResolver).
|
||||
'description' => [
|
||||
'alimtalk_template_create' => 'Registered alimtalk template (:template_name)',
|
||||
'alimtalk_template_update' => 'Updated alimtalk template (:template_code)',
|
||||
'alimtalk_template_delete' => 'Deleted alimtalk template (:template_code)',
|
||||
'alimtalk_template_request' => 'Requested alimtalk template inspection (:template_code)',
|
||||
'alimtalk_template_cancel_request' => 'Canceled alimtalk template inspection request (:template_code)',
|
||||
'alimtalk_template_stop' => 'Stopped alimtalk template (:template_code)',
|
||||
'alimtalk_template_reuse' => 'Resumed alimtalk template (:template_code)',
|
||||
'alimtalk_template_cancel_approval' => 'Canceled alimtalk template approval (:template_code)',
|
||||
'alimtalk_template_release' => 'Released alimtalk template from dormancy (:template_code)',
|
||||
],
|
||||
'action' => [],
|
||||
'description' => [],
|
||||
];
|
||||
@@ -76,55 +76,6 @@ return [
|
||||
'sender_key_missing' => 'Please set the alimtalk sender profile key first.',
|
||||
],
|
||||
|
||||
// Alimtalk template management (Phase 5)
|
||||
'template' => [
|
||||
// Action result messages
|
||||
'created' => 'The alimtalk template has been registered.',
|
||||
'created_requested' => 'The alimtalk template has been registered and inspection requested.',
|
||||
'updated' => 'The alimtalk template has been updated.',
|
||||
'deleted' => 'The alimtalk template has been deleted.',
|
||||
'requested' => 'Inspection has been requested.',
|
||||
'request_canceled' => 'The inspection request has been canceled.',
|
||||
'stopped' => 'The template has been stopped.',
|
||||
'resumed' => 'The template has been resumed.',
|
||||
'approval_canceled' => 'The approval has been canceled.',
|
||||
'released' => 'The template has been released from dormancy.',
|
||||
|
||||
// Status badges (serviceStatus)
|
||||
'status' => [
|
||||
'sendable' => 'Sendable',
|
||||
'inspecting' => 'Inspecting',
|
||||
'rejected' => 'Rejected',
|
||||
'uninspected' => 'Not inspected',
|
||||
'stopped' => 'Stopped',
|
||||
'blocked' => 'Blocked',
|
||||
'dormant' => 'Dormant',
|
||||
'unknown' => 'Unknown',
|
||||
],
|
||||
|
||||
// Template types (templateEmphasizeType)
|
||||
'emphasize_type' => [
|
||||
'none' => 'Basic',
|
||||
'text' => 'Highlighted',
|
||||
'image' => 'Image',
|
||||
'item_list' => 'Item list',
|
||||
],
|
||||
|
||||
// Validation attribute labels (FormRequest attributes)
|
||||
'fields' => [
|
||||
'name' => 'Template name',
|
||||
'content' => 'Template content',
|
||||
'category' => 'Category',
|
||||
'emphasize_type' => 'Template type',
|
||||
'code' => 'Template code',
|
||||
'title' => 'Highlight title',
|
||||
'subtitle' => 'Highlight subtitle',
|
||||
'image' => 'Image',
|
||||
'image_name' => 'Image file name',
|
||||
'image_url' => 'Image URL',
|
||||
],
|
||||
],
|
||||
|
||||
// Notification-to-alimtalk template binding (NotificationBindingController responses)
|
||||
'binding' => [
|
||||
'saved' => 'Alimtalk binding saved.',
|
||||
|
||||
@@ -1,34 +1,9 @@
|
||||
<?php
|
||||
|
||||
// 알림톡 템플릿을 조회 전용으로 전환하면서 등록·수정·검수·상태변경 활동로그를 제거했다.
|
||||
// 현재 이 플러그인은 활동로그를 기록하지 않는다(등록·관리는 비즈뿌리오 콘솔로 위임).
|
||||
// 활동로그 기록을 추가할 때 action/description 키를 여기에 정의한다.
|
||||
return [
|
||||
// 액션 라벨 — 고유 action 은 전체 dotted 키로 정의(코어 범용 세그먼트 충돌 회피, 계획서 §3).
|
||||
// ActivityLog::getActionLabelAttribute 1단계(플러그인 lang 전체 액션 키)가 이 배열을 먼저 해석.
|
||||
'action' => [
|
||||
'sirsoft-message_bizppurio' => [
|
||||
'alimtalk_template' => [
|
||||
'create' => '알림톡 템플릿 등록',
|
||||
'update' => '알림톡 템플릿 수정',
|
||||
'delete' => '알림톡 템플릿 삭제',
|
||||
'request' => '알림톡 템플릿 검수 요청',
|
||||
'cancel_request' => '알림톡 템플릿 검수 요청 취소',
|
||||
'stop' => '알림톡 템플릿 중지',
|
||||
'reuse' => '알림톡 템플릿 중지 해제',
|
||||
'cancel_approval' => '알림톡 템플릿 승인 취소',
|
||||
'release' => '알림톡 템플릿 휴면 해제',
|
||||
],
|
||||
],
|
||||
],
|
||||
|
||||
// description 본문 — 표준 패턴 activity_log.description.X (DescriptionResolver 해석 대상).
|
||||
'description' => [
|
||||
'alimtalk_template_create' => '알림톡 템플릿 등록 (:template_name)',
|
||||
'alimtalk_template_update' => '알림톡 템플릿 수정 (:template_code)',
|
||||
'alimtalk_template_delete' => '알림톡 템플릿 삭제 (:template_code)',
|
||||
'alimtalk_template_request' => '알림톡 템플릿 검수 요청 (:template_code)',
|
||||
'alimtalk_template_cancel_request' => '알림톡 템플릿 검수 요청 취소 (:template_code)',
|
||||
'alimtalk_template_stop' => '알림톡 템플릿 중지 (:template_code)',
|
||||
'alimtalk_template_reuse' => '알림톡 템플릿 중지 해제 (:template_code)',
|
||||
'alimtalk_template_cancel_approval' => '알림톡 템플릿 승인 취소 (:template_code)',
|
||||
'alimtalk_template_release' => '알림톡 템플릿 휴면 해제 (:template_code)',
|
||||
],
|
||||
'action' => [],
|
||||
'description' => [],
|
||||
];
|
||||
@@ -76,55 +76,6 @@ return [
|
||||
'sender_key_missing' => '알림톡 발신프로필 키를 먼저 설정하세요.',
|
||||
],
|
||||
|
||||
// 알림톡 템플릿 관리 (Phase 5)
|
||||
'template' => [
|
||||
// 액션 결과 메시지
|
||||
'created' => '알림톡 템플릿을 등록했습니다.',
|
||||
'created_requested' => '알림톡 템플릿을 등록하고 검수를 요청했습니다.',
|
||||
'updated' => '알림톡 템플릿을 수정했습니다.',
|
||||
'deleted' => '알림톡 템플릿을 삭제했습니다.',
|
||||
'requested' => '검수를 요청했습니다.',
|
||||
'request_canceled' => '검수 요청을 취소했습니다.',
|
||||
'stopped' => '템플릿을 중지했습니다.',
|
||||
'resumed' => '템플릿 중지를 해제했습니다.',
|
||||
'approval_canceled' => '승인을 취소했습니다.',
|
||||
'released' => '휴면을 해제했습니다.',
|
||||
|
||||
// 상태 배지 (serviceStatus)
|
||||
'status' => [
|
||||
'sendable' => '발송가능',
|
||||
'inspecting' => '검수중',
|
||||
'rejected' => '반려',
|
||||
'uninspected' => '미검수',
|
||||
'stopped' => '중지',
|
||||
'blocked' => '차단',
|
||||
'dormant' => '휴면',
|
||||
'unknown' => '알 수 없음',
|
||||
],
|
||||
|
||||
// 템플릿 유형 (templateEmphasizeType)
|
||||
'emphasize_type' => [
|
||||
'none' => '기본형',
|
||||
'text' => '강조표기형',
|
||||
'image' => '이미지형',
|
||||
'item_list' => '아이템리스트형',
|
||||
],
|
||||
|
||||
// 검증 속성 라벨 (FormRequest attributes)
|
||||
'fields' => [
|
||||
'name' => '템플릿명',
|
||||
'content' => '템플릿 내용',
|
||||
'category' => '카테고리',
|
||||
'emphasize_type' => '템플릿 유형',
|
||||
'code' => '템플릿 코드',
|
||||
'title' => '강조표기 문구',
|
||||
'subtitle' => '보조 문구',
|
||||
'image' => '이미지',
|
||||
'image_name' => '이미지 파일명',
|
||||
'image_url' => '이미지 링크',
|
||||
],
|
||||
],
|
||||
|
||||
// 알림↔알림톡 템플릿 연동 (NotificationBindingController 응답)
|
||||
'binding' => [
|
||||
'saved' => '알림톡 연동을 저장했습니다.',
|
||||
|
||||
+27
-2
@@ -28,14 +28,39 @@
|
||||
}
|
||||
},
|
||||
{
|
||||
"comment": "연결됨: 템플릿명(또는 코드) · SMS 대체 표시 / 미연결: '미연결'",
|
||||
"comment": "연결됨: 템플릿명(또는 코드)",
|
||||
"type": "basic",
|
||||
"name": "Span",
|
||||
"if": "{{bizppurioBindings?.data?.bindings?.[extensionPointProps.definition?.type]?.template_code}}",
|
||||
"props": {
|
||||
"className": "text-sm text-gray-700 dark:text-gray-200 truncate"
|
||||
},
|
||||
"text": "{{(bizppurioBindings?.data?.bindings?.[extensionPointProps.definition?.type]?.template_name || bizppurioBindings?.data?.bindings?.[extensionPointProps.definition?.type]?.template_code) + (bizppurioBindings?.data?.bindings?.[extensionPointProps.definition?.type]?.fallback_sms_enabled ? ' · SMS' : '')}}"
|
||||
"text": "{{bizppurioBindings?.data?.bindings?.[extensionPointProps.definition?.type]?.template_name || bizppurioBindings?.data?.bindings?.[extensionPointProps.definition?.type]?.template_code}}"
|
||||
},
|
||||
{
|
||||
"comment": "⑧ SMS 대체발송 배지 — 연결됨일 때만, 켜짐/꺼짐을 색으로 구분해 둘 다 표시(다크에서 묽지 않게 solid 색)",
|
||||
"type": "basic",
|
||||
"name": "Span",
|
||||
"if": "{{bizppurioBindings?.data?.bindings?.[extensionPointProps.definition?.type]?.template_code && bizppurioBindings?.data?.bindings?.[extensionPointProps.definition?.type]?.fallback_sms_enabled}}",
|
||||
"props": {
|
||||
"className": "inline-flex items-center gap-1 px-2 py-0.5 rounded text-xs font-medium bg-teal-100 dark:bg-teal-900 text-teal-700 dark:text-teal-200 flex-shrink-0"
|
||||
},
|
||||
"children": [
|
||||
{ "type": "basic", "name": "Icon", "props": { "name": "comment-sms", "size": "sm" } },
|
||||
{ "type": "basic", "name": "Span", "text": "$t:sirsoft-message_bizppurio.binding.fallback_on" }
|
||||
]
|
||||
},
|
||||
{
|
||||
"type": "basic",
|
||||
"name": "Span",
|
||||
"if": "{{bizppurioBindings?.data?.bindings?.[extensionPointProps.definition?.type]?.template_code && !(bizppurioBindings?.data?.bindings?.[extensionPointProps.definition?.type]?.fallback_sms_enabled)}}",
|
||||
"props": {
|
||||
"className": "inline-flex items-center gap-1 px-2 py-0.5 rounded text-xs font-medium border border-gray-300 dark:border-gray-600 text-gray-500 dark:text-gray-400 flex-shrink-0"
|
||||
},
|
||||
"children": [
|
||||
{ "type": "basic", "name": "Icon", "props": { "name": "comment-sms", "size": "sm" } },
|
||||
{ "type": "basic", "name": "Span", "text": "$t:sirsoft-message_bizppurio.binding.fallback_off" }
|
||||
]
|
||||
},
|
||||
{
|
||||
"type": "basic",
|
||||
|
||||
+165
-119
@@ -1,12 +1,14 @@
|
||||
/**
|
||||
* 비즈뿌리오 메시징 플러그인 알림톡 템플릿 관리 탭 구조 검증 (Phase 5, §6-3·6-4)
|
||||
* 비즈뿌리오 메시징 플러그인 알림톡 템플릿 조회 탭 구조 검증 (조회 전용)
|
||||
*
|
||||
* plugin_settings.json 안에 탭으로 배치된 알림톡 템플릿 관리 화면을 검증한다.
|
||||
* - 탭 네비게이션(환경설정 ↔ 알림톡 템플릿) + 배타 전환(activeSettingsTab)
|
||||
* - 목록 서브뷰(상태필터·검색·상태배지·상세) / 폼 서브뷰(유형별 필드·변수삽입)
|
||||
* - 상세 모달 / readiness 안내 / 데이터소스 / i18n 정합
|
||||
* plugin_settings.json 안에 탭으로 배치된 알림톡 템플릿 화면을 검증한다.
|
||||
* 조회 전용 전환: 등록·수정·삭제·검수·상태변경을 제거하고 목록·상태·내용 조회 + 알림 연결만
|
||||
* 남겼다. 등록·관리는 비즈뿌리오 콘솔로 위임한다.
|
||||
* - 탭 네비게이션(환경설정 ↔ 알림톡 템플릿) + 배타 전환(query.tab)
|
||||
* - 목록 서브뷰(상태필터·검색·상태배지·[내용] 버튼) — [새 템플릿]·폼·상태변경 없음
|
||||
* - 상세 모달([닫기]만, 관리 액션 없음) / readiness 안내 / 준비 안내 / i18n 정합
|
||||
*
|
||||
* 독립 페이지·메뉴 없음(⚑ 결정 2·3): 설정 페이지 탭으로만 진입.
|
||||
* 독립 페이지·메뉴 없음: 설정 페이지 탭으로만 진입.
|
||||
*/
|
||||
|
||||
import { describe, it, expect } from 'vitest';
|
||||
@@ -25,11 +27,12 @@ describe('alimtalk templates — 탭 네비게이션', () => {
|
||||
expect(findById(nav, 'tab_templates')).toBeTruthy();
|
||||
});
|
||||
|
||||
it('알림톡 탭 버튼이 query.tab=templates 로 URL 을 갱신하고 목록을 refetch 한다', () => {
|
||||
it('알림톡 탭 버튼이 navigate replace 로 query.tab=templates 를 갱신하고 목록을 refetch 한다', () => {
|
||||
const raw = JSON.stringify(findById(root, 'tab_templates'));
|
||||
expect(raw).toContain('replaceUrl');
|
||||
// 탭 전환은 navigate replace(+mergeQuery)로 if 재평가 → 화면 전환 (replaceUrl 은 if 미재평가라 부적합)
|
||||
expect(raw).toContain('"handler":"navigate"');
|
||||
expect(raw).toContain('"replace":true');
|
||||
expect(raw).toContain('"tab":"templates"');
|
||||
expect(raw).toContain('"templateView":"list"');
|
||||
expect(raw).toContain('alimtalk_templates');
|
||||
});
|
||||
|
||||
@@ -49,22 +52,39 @@ describe('alimtalk templates — 탭 네비게이션', () => {
|
||||
});
|
||||
|
||||
describe('alimtalk templates — 데이터소스', () => {
|
||||
it('템플릿 목록·카테고리 데이터소스가 admin API 를 조회한다', () => {
|
||||
it('템플릿 목록 데이터소스가 admin API 를 조회한다 (조회 전용 — 카테고리 데이터소스 없음)', () => {
|
||||
const sources = (root as { data_sources?: AnyNode[] }).data_sources ?? [];
|
||||
const list = sources.find((s) => s.id === 'alimtalk_templates');
|
||||
const cats = sources.find((s) => s.id === 'alimtalk_categories');
|
||||
expect(list?.endpoint).toBe('/api/plugins/sirsoft-message_bizppurio/admin/alimtalk-templates');
|
||||
expect(list?.auto_fetch).toBe(false);
|
||||
expect(cats?.endpoint).toContain('/alimtalk-templates/categories');
|
||||
// 카테고리 데이터소스는 등록 폼 전용이라 제거됨
|
||||
expect(cats).toBeUndefined();
|
||||
});
|
||||
});
|
||||
|
||||
describe('alimtalk templates — 목록 서브뷰', () => {
|
||||
it('목록 서브뷰가 templateView=list 조건으로 표시된다', () => {
|
||||
const view = findById(root, 'templates_list_view');
|
||||
expect((view as { if?: string }).if).toContain("templateView ?? 'list') === 'list'");
|
||||
describe('alimtalk templates — 조회 전용 (폼·관리 제거)', () => {
|
||||
it('폼 서브뷰(templates_form_view)가 제거되었다', () => {
|
||||
expect(findById(root, 'templates_form_view')).toBeNull();
|
||||
});
|
||||
|
||||
it('상태변경 확인/실행 모달(alimtalk_template_action_modal)이 제거되었다', () => {
|
||||
const modals = (root as { modals?: AnyNode[] }).modals ?? [];
|
||||
expect(modals.find((m) => m.id === 'alimtalk_template_action_modal')).toBeUndefined();
|
||||
});
|
||||
|
||||
it('폼 전환·관리 상태(templateView/templateForm/pendingAction/available_actions)가 레이아웃에 없다', () => {
|
||||
const raw = JSON.stringify(root);
|
||||
expect(raw).not.toContain('templateView');
|
||||
expect(raw).not.toContain('templateForm');
|
||||
expect(raw).not.toContain('pendingAction');
|
||||
expect(raw).not.toContain('available_actions');
|
||||
// 이미지 업로드 핸들러도 제거
|
||||
expect(raw).not.toContain('uploadTemplateImage');
|
||||
});
|
||||
});
|
||||
|
||||
describe('alimtalk templates — 목록 서브뷰 (조회 전용)', () => {
|
||||
it('상태 필터 Select 와 검색 입력이 있다', () => {
|
||||
const toolbar = findById(root, 'templates_toolbar');
|
||||
const raw = JSON.stringify(toolbar);
|
||||
@@ -72,6 +92,14 @@ describe('alimtalk templates — 목록 서브뷰', () => {
|
||||
expect(raw).toContain('templateKeyword');
|
||||
});
|
||||
|
||||
it('툴바에 [새 템플릿] 등록 버튼이 없고 새로고침만 있다', () => {
|
||||
const raw = JSON.stringify(findById(root, 'templates_toolbar'));
|
||||
expect(raw).toContain('templates.list.refresh');
|
||||
// 등록 진입(폼 전환) 없음
|
||||
expect(raw).not.toContain('templates.list.new');
|
||||
expect(raw).not.toContain('"form"');
|
||||
});
|
||||
|
||||
it('빈 목록에서도 헤더 있는 표(카드)를 항상 표시하고 데이터 유무로 Tbody 를 분기한다', () => {
|
||||
const card = findById(root, 'templates_table_card');
|
||||
expect(card).toBeTruthy();
|
||||
@@ -93,126 +121,144 @@ describe('alimtalk templates — 목록 서브뷰', () => {
|
||||
expect(raw).toContain('status_badge');
|
||||
});
|
||||
|
||||
it('[새 템플릿] 버튼이 폼 서브뷰로 전환하고 폼을 초기화한다', () => {
|
||||
const raw = JSON.stringify(findById(root, 'templates_toolbar'));
|
||||
expect(raw).toContain('"templateView":"form"');
|
||||
expect(raw).toContain('templateEmphasizeType');
|
||||
it('관리 컬럼이 [내용] 버튼 하나로 상세 조회 후 상세 모달을 연다 (상태별 액션 없음)', () => {
|
||||
const raw = JSON.stringify(findById(root, 'templates_table_card'));
|
||||
// 상세 조회 → 상세 모달
|
||||
expect(raw).toContain('templates.actions.detail');
|
||||
expect(raw).toContain('"handler":"apiCall"');
|
||||
expect(raw).toContain('alimtalk_template_detail_modal');
|
||||
// 관리 액션 메뉴(ActionMenu)·switch 분기 없음
|
||||
expect(raw).not.toContain('ActionMenu');
|
||||
expect(raw).not.toContain('"handler":"switch"');
|
||||
expect(raw).not.toContain("id:'edit'");
|
||||
expect(raw).not.toContain("id:'delete'");
|
||||
});
|
||||
|
||||
it('목록에 번호·등록요청일·처리일 컬럼이 있다', () => {
|
||||
const raw = JSON.stringify(findById(root, 'templates_table_card'));
|
||||
expect(raw).toContain('columns.no');
|
||||
expect(raw).toContain('columns.requested_at');
|
||||
expect(raw).toContain('columns.processed_at');
|
||||
// 순번은 pagination 기준 계산 + index_var
|
||||
expect(raw).toContain('"index_var":"tplIndex"');
|
||||
expect(raw).toContain('pagination?.current_page');
|
||||
// 날짜는 kapi 원본 필드
|
||||
expect(raw).toContain('tpl.createdAt');
|
||||
expect(raw).toContain('tpl.modifiedAt');
|
||||
});
|
||||
|
||||
it('상태 배지가 RDY 일 때만 세부(사용전)를 덧붙인다', () => {
|
||||
const raw = JSON.stringify(findById(root, 'templates_table_card'));
|
||||
expect(raw).toContain("tpl.service_status === 'RDY'");
|
||||
expect(raw).toContain('status_sub.rdy');
|
||||
});
|
||||
|
||||
it('페이지네이션이 page 상태를 갱신하고 목록을 refetch 한다', () => {
|
||||
const listView = JSON.stringify(findById(root, 'templates_list_view'));
|
||||
expect(listView).toContain('"name":"Pagination"');
|
||||
expect(listView).toContain('onPageChange');
|
||||
expect(listView).toContain('templatePage');
|
||||
expect(listView).toContain('pagination?.total_page');
|
||||
});
|
||||
});
|
||||
|
||||
describe('alimtalk templates — 폼 서브뷰', () => {
|
||||
it('폼 서브뷰가 templateView=form 조건으로 표시된다', () => {
|
||||
const view = findById(root, 'templates_form_view');
|
||||
expect((view as { if?: string }).if).toContain("templateView === 'form'");
|
||||
describe('alimtalk templates — 콘솔 안내 (조회 전용)', () => {
|
||||
it('목록 상단 안내가 배지 의미(제목+배지명+설명) + 콘솔 위임 안내를 포함한다', () => {
|
||||
const raw = JSON.stringify(findById(root, 'templates_list_notice'));
|
||||
// 배지 의미 — 제목 + 배지명/설명 분리(의미색 라벨)
|
||||
expect(raw).toContain('status_guide.title');
|
||||
expect(raw).toContain('status_guide.sendable_label');
|
||||
expect(raw).toContain('status_guide.inspecting_label');
|
||||
expect(raw).toContain('status_guide.pending_label');
|
||||
// 배지명은 의미색(초록/amber/빨강) solid 로 표의 배지와 매칭
|
||||
expect(raw).toContain('text-green-700');
|
||||
expect(raw).toContain('text-amber-700');
|
||||
expect(raw).toContain('text-red-700');
|
||||
// 콘솔 위임 안내 + 콘솔 링크
|
||||
expect(raw).toContain('list_notice.console_desc');
|
||||
expect(raw).toContain('list_notice.console_link');
|
||||
expect(raw).toContain('bizppurio.com');
|
||||
});
|
||||
|
||||
it('공통 필드(이름·본문)가 수동바인딩(value+onChange)으로 존재한다', () => {
|
||||
const raw = JSON.stringify(findById(root, 'templates_form_view'));
|
||||
// 이름: value 바인딩 + templateForm.templateName setState (자동바인딩 name 대신)
|
||||
expect(raw).toContain('templateForm.templateName');
|
||||
expect(raw).toContain('_local.templateForm?.templateName');
|
||||
// 본문: templateForm.templateContent 수동바인딩
|
||||
expect(raw).toContain('templateForm.templateContent');
|
||||
});
|
||||
|
||||
it('강조표기형(TEXT) 필드가 유형 조건으로 표시된다', () => {
|
||||
const text = findById(root, 'template_text_fields');
|
||||
expect((text as { if?: string }).if).toContain("templateEmphasizeType === 'TEXT'");
|
||||
const raw = JSON.stringify(text);
|
||||
expect(raw).toContain('templateTitle');
|
||||
expect(raw).toContain('templateSubtitle');
|
||||
});
|
||||
|
||||
it('이미지형(IMAGE) 필드가 유형 조건으로 표시된다', () => {
|
||||
const image = findById(root, 'template_image_fields');
|
||||
expect((image as { if?: string }).if).toContain("templateEmphasizeType === 'IMAGE'");
|
||||
const raw = JSON.stringify(image);
|
||||
expect(raw).toContain('templateImageName');
|
||||
expect(raw).toContain('templateImageUrl');
|
||||
});
|
||||
|
||||
it('유형 선택 버튼이 1차 지원 3종(NONE/IMAGE/TEXT)만 노출하고 ITEM_LIST 는 없다', () => {
|
||||
const raw = JSON.stringify(findById(root, 'templates_form_view'));
|
||||
// 버튼 방식: setState 로 templateEmphasizeType 을 직접 설정
|
||||
expect(raw).toContain('"templateForm.templateEmphasizeType":"NONE"');
|
||||
expect(raw).toContain('"templateForm.templateEmphasizeType":"IMAGE"');
|
||||
expect(raw).toContain('"templateForm.templateEmphasizeType":"TEXT"');
|
||||
expect(raw).not.toContain('ITEM_LIST');
|
||||
});
|
||||
|
||||
it('변수 버튼이 insertVariable 핸들러로 본문 상태(statePath)에 삽입한다', () => {
|
||||
const raw = JSON.stringify(findById(root, 'template_variables'));
|
||||
expect(raw).toContain('sirsoft-message_bizppurio.insertVariable');
|
||||
expect(raw).toContain('"target":"templateContent"');
|
||||
expect(raw).toContain('"statePath":"templateForm.templateContent"');
|
||||
});
|
||||
|
||||
it('이벤트별 변수 참고표가 토글 없이 항상 표시된다(인라인 배열 iteration)', () => {
|
||||
const raw = JSON.stringify(findById(root, 'template_variables'));
|
||||
// 참고표 iteration 이 인라인 배열(varref lang 라벨 + 변수 예시)을 렌더
|
||||
expect(raw).toContain('templates.varref.welcome');
|
||||
expect(raw).toContain('"item_var":"vref"');
|
||||
// showVarRef 토글 조건이 없어야 함(항상 표시)
|
||||
expect(raw).not.toContain('showVarRef');
|
||||
});
|
||||
|
||||
it('선택 항목이 계획서 §6-4 6개(부가정보·미리보기·버튼·바로연결·대표링크·보안) 체크펼침으로 존재하고 헤더는 없다', () => {
|
||||
const raw = JSON.stringify(findById(root, 'template_optional'));
|
||||
expect(raw).toContain('templateForm.templateExtra');
|
||||
expect(raw).toContain('templateForm.templatePreviewMessage');
|
||||
expect(raw).toContain('templateForm.buttons');
|
||||
expect(raw).toContain('templateForm.quickReplies');
|
||||
expect(raw).toContain('templateForm.templateRepresentLink');
|
||||
expect(raw).toContain('templateForm.securityFlag');
|
||||
// 각 항목 체크박스 토글(_local.opt*)
|
||||
expect(raw).toContain('optExtra');
|
||||
expect(raw).toContain('optButton');
|
||||
expect(raw).toContain('optLink');
|
||||
// 헤더(ITEM_LIST 전용, §6-4 선택항목 아님)는 제거됨
|
||||
expect(raw).not.toContain('templateForm.templateHeader');
|
||||
});
|
||||
|
||||
it('템플릿 코드(자동/직접)·카테고리 2단 드롭다운·이미지 파일첨부가 존재한다', () => {
|
||||
const codeField = JSON.stringify(findById(root, 'template_code_field'));
|
||||
expect(codeField).toContain('templateCodeMode');
|
||||
expect(codeField).toContain('"auto"');
|
||||
expect(codeField).toContain('"manual"');
|
||||
|
||||
const catField = JSON.stringify(findById(root, 'template_category_field'));
|
||||
expect(catField).toContain('categoryGroup');
|
||||
expect(catField).toContain('templateForm.categoryCode');
|
||||
expect(catField).toContain('alimtalk_categories');
|
||||
|
||||
const imgField = JSON.stringify(findById(root, 'template_image_fields'));
|
||||
expect(imgField).toContain('"type":"file"');
|
||||
expect(imgField).toContain('sirsoft-message_bizppurio.uploadTemplateImage');
|
||||
expect(imgField).toContain('templateImageUrl');
|
||||
});
|
||||
|
||||
it('저장 버튼이 [등록]과 [등록 후 검수요청] 2개로 분리된다', () => {
|
||||
const raw = JSON.stringify(findById(root, 'templates_form_view'));
|
||||
expect(raw).toContain('"method":"POST"');
|
||||
expect(raw).toContain('_local.templateForm');
|
||||
expect(raw).toContain('"templateView":"list"');
|
||||
// 등록 후 검수요청: requestInspection 플래그를 body 에 실음
|
||||
expect(raw).toContain('requestInspection');
|
||||
expect(raw).toContain('save_register');
|
||||
expect(raw).toContain('save_and_request');
|
||||
it('환경설정 탭에 사용 전 준비 안내(카카오·SMS 통합 1박스)가 있고 info_panel 은 제거되었다', () => {
|
||||
const notice = findById(root, 'preparation_notice');
|
||||
expect(notice).toBeTruthy();
|
||||
const raw = JSON.stringify(notice);
|
||||
// 통합 박스: 문자(발신번호) + 카카오(채널·템플릿·API키 3단계) + 콘솔 링크 (박스 제목 없이 채널 그룹만)
|
||||
expect(raw).toContain('preparation.sms_label');
|
||||
expect(raw).toContain('preparation.sms_sender');
|
||||
expect(raw).toContain('preparation.kakao_label');
|
||||
expect(raw).toContain('preparation.kakao_channel');
|
||||
expect(raw).toContain('preparation.kakao_template');
|
||||
expect(raw).toContain('preparation.kakao_apikey');
|
||||
expect(raw).toContain('preparation.console_link');
|
||||
// 제목·본문 sm 로 상향(가독성)
|
||||
expect(raw).toContain('text-sm');
|
||||
// 중복이던 연동정보 안내(info_panel)는 제거(운영전환 경고·리포트 안내는 폼/리포트 섹션이 담당)
|
||||
expect(findById(root, 'info_panel')).toBeNull();
|
||||
});
|
||||
});
|
||||
|
||||
describe('alimtalk templates — 상세 모달 & readiness', () => {
|
||||
describe('alimtalk templates — 상세 모달 & readiness (조회 전용)', () => {
|
||||
it('상세 모달이 정의되어 있다', () => {
|
||||
const modals = (root as { modals?: AnyNode[] }).modals ?? [];
|
||||
const detail = modals.find((m) => m.id === 'alimtalk_template_detail_modal');
|
||||
expect(detail).toBeTruthy();
|
||||
});
|
||||
|
||||
it('readiness 안내가 api_key/sender_key 미설정 시 조건부로 표시된다', () => {
|
||||
it('상세 모달이 상태 배지·내용을 표시하고 [닫기]만 노출한다 (관리 액션 없음)', () => {
|
||||
const modals = (root as { modals?: AnyNode[] }).modals ?? [];
|
||||
const detail = JSON.stringify(modals.find((m) => m.id === 'alimtalk_template_detail_modal'));
|
||||
// 상태 배지 + 내용(카테고리·유형·버튼) 표시
|
||||
expect(detail).toContain('status_badge');
|
||||
expect(detail).toContain('templates.detail.category');
|
||||
expect(detail).toContain('templates.detail.buttons');
|
||||
expect(detail).toContain('columns.requested_at');
|
||||
// 닫기만 — 관리 액션(available_actions)·상태변경 모달 연결 없음
|
||||
expect(detail).toContain('templates.detail.close');
|
||||
expect(detail).not.toContain('available_actions');
|
||||
expect(detail).not.toContain('alimtalk_template_action_modal');
|
||||
});
|
||||
|
||||
it('readiness 안내가 미준비(ready=false) 시 조건부로 표시되고 항목별 상태를 노출한다', () => {
|
||||
const readiness = findById(root, 'templates_readiness');
|
||||
// 최상위 노출 조건은 ready 플래그 기반
|
||||
const cond = (readiness as { if?: string }).if ?? '';
|
||||
expect(cond).toContain('api_key');
|
||||
expect(cond).toContain('sender_key');
|
||||
expect(cond).toContain('templates_readiness?.data');
|
||||
expect(cond).toContain('ready');
|
||||
// 자식 노드에서 항목별 미설정(api_key_set/sender_key_set) 조건부 표시
|
||||
const raw = JSON.stringify(readiness);
|
||||
expect(raw).toContain('api_key_set');
|
||||
expect(raw).toContain('sender_key_set');
|
||||
});
|
||||
});
|
||||
|
||||
describe('alimtalk templates — 회귀', () => {
|
||||
it('컴포넌트 최상위 actions 는 모두 이벤트 type 을 가진다 (charAt 회귀 방지)', () => {
|
||||
// 회귀: 컴포넌트의 actions 배열 최상위 항목에 type(click 등) 이 없으면 엔진이
|
||||
// getReactEventName 에서 eventType.charAt(0) 을 호출하다 "Cannot read properties of
|
||||
// undefined (reading 'charAt')" 로 그 컴포넌트 렌더가 통째로 실패한다(PO 브라우저 검수로 발견).
|
||||
const bad: string[] = [];
|
||||
const walk = (node: AnyNode, path: string): void => {
|
||||
if (Array.isArray(node)) {
|
||||
node.forEach((n, i) => walk(n as AnyNode, `${path}[${i}]`));
|
||||
return;
|
||||
}
|
||||
if (node && typeof node === 'object') {
|
||||
const obj = node as Record<string, unknown>;
|
||||
// 컴포넌트의 actions 만 검사 (sequence/switch 내부 하위 actions 는 handler 를 가짐 → 제외)
|
||||
if (Array.isArray(obj.actions) && obj.handler === undefined) {
|
||||
(obj.actions as Array<Record<string, unknown>>).forEach((a, i) => {
|
||||
if (a && typeof a === 'object' && a.type === undefined) {
|
||||
bad.push(`${path}.actions[${i}] handler=${String(a.handler)}`);
|
||||
}
|
||||
});
|
||||
}
|
||||
for (const k of Object.keys(obj)) walk(obj[k] as AnyNode, `${path}.${k}`);
|
||||
}
|
||||
};
|
||||
walk(root, 'root');
|
||||
expect(bad, `type 누락 최상위 액션:\n${bad.join('\n')}`).toEqual([]);
|
||||
});
|
||||
});
|
||||
|
||||
|
||||
+7
-6
@@ -57,7 +57,7 @@ describe('plugin_settings.json — 자동바인딩', () => {
|
||||
|
||||
describe('plugin_settings.json — 섹션', () => {
|
||||
it.each([
|
||||
['info_panel', '상단 안내 패널'],
|
||||
['preparation_notice', '사용 전 준비 안내(상단)'],
|
||||
['section_api', 'API 연동'],
|
||||
['section_sending', '발송 설정'],
|
||||
['report_section', '리포트 수신 설정'],
|
||||
@@ -155,10 +155,9 @@ describe('plugin_settings.json — 저장 버튼', () => {
|
||||
it('등록된 핸들러만 사용한다 (오탈자 핸들러 없음)', () => {
|
||||
const handlers = collectHandlers(layout);
|
||||
const allowed = [
|
||||
'apiCall', 'setState', 'toast', 'navigate', 'sequence',
|
||||
'apiCall', 'setState', 'toast', 'navigate', 'sequence', 'switch',
|
||||
'refetchDataSource', 'scrollIntoView', 'copyToClipboard',
|
||||
'openModal', 'closeModal', 'replaceUrl',
|
||||
'sirsoft-message_bizppurio.insertVariable',
|
||||
'sirsoft-message_bizppurio.uploadTemplateImage',
|
||||
];
|
||||
for (const h of handlers) {
|
||||
@@ -234,13 +233,15 @@ describe('plugin_settings.json — 목록 조회 실패 표시', () => {
|
||||
expect(onError).toContain('kakao_message');
|
||||
});
|
||||
|
||||
it('목록 오류 배너가 templateListError 조건으로 존재한다', () => {
|
||||
it('목록 오류 배너가 오류 존재 + 준비완료(ready) 조건으로 존재한다', () => {
|
||||
const banner = findById(layout, 'templates_list_error') as
|
||||
| Record<string, unknown>
|
||||
| undefined;
|
||||
expect(banner).toBeTruthy();
|
||||
expect(banner?.if).toBe('{{_local.templateListError}}');
|
||||
// 사유 본문을 그대로 렌더한다
|
||||
// 키 미설정(ready=false)일 때는 readiness 안내 배너가 담당 → 빨간 오류 배너는 숨겨
|
||||
// 두 배너가 동시에 뜨지 않게 한다. 즉 '키는 넣었는데 다른 이유로 실패'한 경우만 노출.
|
||||
expect(banner?.if).toBe('{{_local.templateListError && templates_readiness?.data?.ready}}');
|
||||
// 사유 본문(카카오 실제 사유)을 그대로 렌더한다
|
||||
expect(JSON.stringify(banner)).toContain('{{_local.templateListError}}');
|
||||
});
|
||||
});
|
||||
@@ -2,13 +2,10 @@
|
||||
* sirsoft-message_bizppurio 플러그인 커스텀 핸들러 맵.
|
||||
*
|
||||
* 키는 네임스페이스 없는 핸들러 이름이며, ActionDispatcher 등록 시 플러그인
|
||||
* 식별자가 네임스페이스로 접두된다. 예: insertVariable → sirsoft-message_bizppurio.insertVariable
|
||||
* 식별자가 네임스페이스로 접두된다.
|
||||
*
|
||||
* 현재 등록 핸들러 없음(알림톡 템플릿 등록·이미지 업로드 제거로 uploadTemplateImage 제거).
|
||||
* 커스텀 핸들러 추가 시 이 맵에 등록한다.
|
||||
*/
|
||||
|
||||
import { insertVariableHandler } from './insertVariable';
|
||||
import { uploadTemplateImageHandler } from './uploadTemplateImage';
|
||||
|
||||
export const handlerMap = {
|
||||
insertVariable: insertVariableHandler,
|
||||
uploadTemplateImage: uploadTemplateImageHandler,
|
||||
} as const;
|
||||
export const handlerMap = {} as const;
|
||||
@@ -1,103 +0,0 @@
|
||||
/**
|
||||
* insertVariable 핸들러
|
||||
*
|
||||
* 알림톡 템플릿 등록/수정 화면에서 "사용 가능 변수" 버튼을 클릭하면, 대상 본문의 현재
|
||||
* 커서 위치에 `#{변수}` 를 삽입한다(D8). 값 자체는 G7 상태(`_local.<statePath>`)를 SSoT
|
||||
* 로 삼아 setLocal 로 갱신한다. DOM 값을 직접 쓰지 않으므로 자동/수동 바인딩 충돌
|
||||
* (삽입 후 다음 렌더에서 상태값으로 덮여 사라지는 문제)이 발생하지 않는다.
|
||||
*
|
||||
* 커서 위치만 DOM 에서 읽고(selectionStart), 없으면 문자열 끝에 붙인다.
|
||||
*
|
||||
* 레이아웃 JSON 사용 예:
|
||||
* {
|
||||
* "handler": "sirsoft-message_bizppurio.insertVariable",
|
||||
* "params": { "variable": "name", "target": "templateContent", "statePath": "templateForm.templateContent" }
|
||||
* }
|
||||
*/
|
||||
|
||||
import type { ActionContext, ActionWithParams } from '../types';
|
||||
|
||||
const logger = ((window as any).G7Core?.createLogger?.('MessageBizppurio:InsertVariable')) ?? {
|
||||
log: (...args: unknown[]) => console.log('[MessageBizppurio:InsertVariable]', ...args),
|
||||
warn: (...args: unknown[]) => console.warn('[MessageBizppurio:InsertVariable]', ...args),
|
||||
error: (...args: unknown[]) => console.error('[MessageBizppurio:InsertVariable]', ...args),
|
||||
};
|
||||
|
||||
/** 삽입 대상 본문 필드(name) 기본값 */
|
||||
const DEFAULT_TARGET = 'templateContent';
|
||||
|
||||
/** 상태 경로 기본값 (_local 하위) */
|
||||
const DEFAULT_STATE_PATH = 'templateForm.templateContent';
|
||||
|
||||
/**
|
||||
* 대상 본문의 커서 위치에 `#{변수}` 를 삽입하고 G7 상태를 갱신합니다.
|
||||
*
|
||||
* @param action 액션 객체(params.variable, params.target, params.statePath)
|
||||
* @param context 액션 컨텍스트(state 스냅샷)
|
||||
*/
|
||||
export function insertVariableHandler(
|
||||
action: ActionWithParams,
|
||||
context: ActionContext,
|
||||
): void {
|
||||
const G7Core = (window as any).G7Core;
|
||||
const params = action.params ?? {};
|
||||
const variable = String(params.variable ?? '').trim();
|
||||
const target = String(params.target ?? DEFAULT_TARGET);
|
||||
const statePath = String(params.statePath ?? DEFAULT_STATE_PATH);
|
||||
|
||||
if (variable === '') {
|
||||
logger.warn('삽입할 변수명이 지정되지 않았습니다.');
|
||||
return;
|
||||
}
|
||||
|
||||
if (!G7Core?.state?.getLocal || !G7Core?.state?.setLocal) {
|
||||
logger.error('G7Core.state API 를 사용할 수 없습니다.');
|
||||
return;
|
||||
}
|
||||
|
||||
// 현재 값: 핸들러 컨텍스트 스냅샷 우선(React 커밋 직후 stale globalState 회피), 없으면 getLocal.
|
||||
const localState = (context as any)?.state ?? G7Core.state.getLocal() ?? {};
|
||||
const current = String(readPath(localState, statePath) ?? '');
|
||||
|
||||
const token = `#{${variable}}`;
|
||||
|
||||
// 커서 위치: DOM 에서 selectionStart 를 읽되, 값 자체는 상태 기준으로 조립.
|
||||
const field = document.querySelector<HTMLTextAreaElement | HTMLInputElement>(
|
||||
`textarea[name="${target}"], input[name="${target}"]`,
|
||||
);
|
||||
const domValue = field?.value ?? '';
|
||||
// DOM 값과 상태 값이 동일할 때만 커서 위치를 신뢰(동기화된 경우). 다르면 끝에 붙인다.
|
||||
const inSync = domValue === current;
|
||||
const start = inSync ? (field?.selectionStart ?? current.length) : current.length;
|
||||
const end = inSync ? (field?.selectionEnd ?? current.length) : current.length;
|
||||
|
||||
const next = current.slice(0, start) + token + current.slice(end);
|
||||
|
||||
G7Core.state.setLocal({ [statePath]: next });
|
||||
|
||||
// 커서를 삽입한 토큰 뒤로 이동(다음 렌더 후 DOM 반영되므로 requestAnimationFrame 안에서).
|
||||
if (field) {
|
||||
const caret = start + token.length;
|
||||
requestAnimationFrame(() => {
|
||||
try {
|
||||
field.focus();
|
||||
field.setSelectionRange(caret, caret);
|
||||
} catch {
|
||||
// setSelectionRange 미지원 input — 무시
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
logger.log(`변수 삽입: ${token} → ${statePath}`);
|
||||
}
|
||||
|
||||
/**
|
||||
* dot notation 경로로 객체에서 값을 읽습니다. (예: "templateForm.templateContent")
|
||||
*
|
||||
* @param obj 대상 객체
|
||||
* @param path dot 경로
|
||||
* @return 경로 값(없으면 undefined)
|
||||
*/
|
||||
function readPath(obj: Record<string, any>, path: string): unknown {
|
||||
return path.split('.').reduce<any>((acc, key) => (acc == null ? undefined : acc[key]), obj);
|
||||
}
|
||||
-98
@@ -1,98 +0,0 @@
|
||||
/**
|
||||
* uploadTemplateImage 핸들러
|
||||
*
|
||||
* 이미지형 알림톡 템플릿 등록 화면에서 파일 선택(change) 시, 선택한 이미지를 플러그인의
|
||||
* 이미지 업로드 API(카카오 서버 업로드 위임)로 전송하고, 반환된 카카오 이미지 URL 을
|
||||
* `_local.templateForm.templateImageUrl` 에, 파일명을 `templateImageName` 에 설정한다.
|
||||
*
|
||||
* 업로드는 multipart/form-data 이므로 apiCall 핸들러로는 처리하기 번거로워 전용 핸들러로 둔다.
|
||||
* 진행 상태는 `_local.imageUploading`, 오류는 `_local.imageUploadError` 로 노출한다.
|
||||
*
|
||||
* 레이아웃 JSON 사용 예:
|
||||
* {
|
||||
* "type": "change",
|
||||
* "handler": "sirsoft-message_bizppurio.uploadTemplateImage"
|
||||
* }
|
||||
* (대상 file input 의 change 이벤트에 바인딩; $event.target.files[0] 를 사용)
|
||||
*/
|
||||
|
||||
import type { ActionContext, ActionWithParams } from '../types';
|
||||
|
||||
const logger = ((window as any).G7Core?.createLogger?.('MessageBizppurio:UploadImage')) ?? {
|
||||
log: (...args: unknown[]) => console.log('[MessageBizppurio:UploadImage]', ...args),
|
||||
warn: (...args: unknown[]) => console.warn('[MessageBizppurio:UploadImage]', ...args),
|
||||
error: (...args: unknown[]) => console.error('[MessageBizppurio:UploadImage]', ...args),
|
||||
};
|
||||
|
||||
const UPLOAD_URL = '/api/plugins/sirsoft-message_bizppurio/admin/alimtalk-templates/image';
|
||||
|
||||
/**
|
||||
* 선택한 이미지 파일을 업로드하고 결과 URL 을 상태에 반영합니다.
|
||||
*
|
||||
* @param action 액션 객체(미사용 params)
|
||||
* @param context 액션 컨텍스트($event 로 파일 접근)
|
||||
*/
|
||||
export async function uploadTemplateImageHandler(
|
||||
action: ActionWithParams,
|
||||
context: ActionContext,
|
||||
): Promise<void> {
|
||||
const G7Core = (window as any).G7Core;
|
||||
if (!G7Core?.state?.setLocal) {
|
||||
logger.error('G7Core.state.setLocal 을 사용할 수 없습니다.');
|
||||
return;
|
||||
}
|
||||
|
||||
const event = (context?.event ?? (action as any)?.event) as Event | undefined;
|
||||
const input = event?.target as HTMLInputElement | undefined;
|
||||
const file = input?.files?.[0];
|
||||
|
||||
if (!file) {
|
||||
return;
|
||||
}
|
||||
|
||||
G7Core.state.setLocal({ imageUploading: true, imageUploadError: null });
|
||||
|
||||
try {
|
||||
const token = localStorage.getItem('auth_token') ?? '';
|
||||
const form = new FormData();
|
||||
form.append('image', file, file.name);
|
||||
|
||||
const res = await fetch(UPLOAD_URL, {
|
||||
method: 'POST',
|
||||
headers: {
|
||||
Accept: 'application/json',
|
||||
...(token ? { Authorization: `Bearer ${token}` } : {}),
|
||||
},
|
||||
body: form,
|
||||
});
|
||||
|
||||
const json = await res.json().catch(() => ({}));
|
||||
|
||||
if (!res.ok || json?.success === false) {
|
||||
const message = json?.errors?.kakao_message || json?.message || '이미지 업로드에 실패했습니다.';
|
||||
G7Core.state.setLocal({ imageUploading: false, imageUploadError: message });
|
||||
logger.warn('이미지 업로드 실패:', message);
|
||||
return;
|
||||
}
|
||||
|
||||
const url = json?.data?.image_url ?? '';
|
||||
const name = json?.data?.image_name ?? file.name;
|
||||
|
||||
G7Core.state.setLocal({
|
||||
imageUploading: false,
|
||||
imageUploadError: null,
|
||||
'templateForm.templateImageUrl': url,
|
||||
'templateForm.templateImageName': name,
|
||||
});
|
||||
|
||||
logger.log('이미지 업로드 완료:', url);
|
||||
} catch (e) {
|
||||
G7Core.state.setLocal({ imageUploading: false, imageUploadError: String(e) });
|
||||
logger.error('이미지 업로드 예외:', e);
|
||||
} finally {
|
||||
// 같은 파일 재선택이 가능하도록 input 값 초기화
|
||||
if (input) {
|
||||
input.value = '';
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,8 +1,9 @@
|
||||
/**
|
||||
* sirsoft-message_bizppurio 플러그인 엔트리포인트.
|
||||
*
|
||||
* 플러그인 활성화 시 자동 로드되어 커스텀 핸들러(insertVariable)를 ActionDispatcher 에
|
||||
* 플러그인 활성화 시 자동 로드되어 handlerMap 의 커스텀 핸들러를 ActionDispatcher 에
|
||||
* 등록한다. 핸들러명은 `sirsoft-message_bizppurio.{name}` 네임스페이스를 갖는다.
|
||||
* (현재 등록 핸들러 없음 — 필요 시 handlers/index.ts 에 추가.)
|
||||
*/
|
||||
|
||||
import { handlerMap } from './handlers';
|
||||
|
||||
@@ -1,241 +1,199 @@
|
||||
{
|
||||
"name": "Bizppurio Messaging",
|
||||
"description": "Bizppurio SMS/LMS and KakaoTalk alimtalk messaging plugin.",
|
||||
"settings": {
|
||||
"title": "Bizppurio Messaging Settings",
|
||||
"description": "Manage Bizppurio integration credentials and sending options.",
|
||||
"save": "Save",
|
||||
"saving": "Saving...",
|
||||
"save_success": "Settings saved.",
|
||||
"save_failed": "Failed to save settings.",
|
||||
"info": {
|
||||
"credentials": "Enter the integration credentials (ID, password, API key) used for sending and Kakao management, along with the sender information. Verify every value before turning off test mode and switching to production.",
|
||||
"report": "To automatically receive delivery results (success/failure) and record them in the history, register the report endpoint below with Bizppurio."
|
||||
},
|
||||
"test_mode": {
|
||||
"label": "Test Mode",
|
||||
"hint": "In test mode, messages are sent to the Bizppurio inspection (dev) domain. Turn it off to send through the production domain."
|
||||
},
|
||||
"live_mode_warning_title": "Sending in production",
|
||||
"live_mode_warning_body": "Test mode is off, so real SMS and alimtalk messages are sent to actual customers and sending fees are charged. Keep test mode on while inspecting.",
|
||||
"sections": {
|
||||
"api": {
|
||||
"title": "API Integration",
|
||||
"description": "Credentials shared by the sending system and the Kakao management system."
|
||||
},
|
||||
"sending": {
|
||||
"title": "Sending Options",
|
||||
"description": "Sender information used for SMS and alimtalk delivery."
|
||||
}
|
||||
},
|
||||
"fields": {
|
||||
"bizppurio_id": {
|
||||
"label": "Bizppurio ID",
|
||||
"hint": "The Bizppurio account ID used for both sending and Kakao management."
|
||||
},
|
||||
"password": {
|
||||
"label": "Password",
|
||||
"hint": "The Bizppurio password used to issue the sending token."
|
||||
},
|
||||
"api_key": {
|
||||
"label": "API Key",
|
||||
"hint": "The API key is issued after you submit it together with your ID to Bizppurio customer support."
|
||||
},
|
||||
"sender_number": {
|
||||
"label": "Sender Number",
|
||||
"hint": "The sender phone number used for SMS and alimtalk delivery."
|
||||
},
|
||||
"sender_key": {
|
||||
"label": "Alimtalk Sender Profile Key",
|
||||
"hint": "The 40-character sender profile key used for alimtalk delivery and template lookup."
|
||||
}
|
||||
},
|
||||
"report": {
|
||||
"section_title": "Report Endpoint",
|
||||
"hint": "Bizppurio can push each SMS/alimtalk delivery result (success/failure) to this address (URL PUSH). Register it with the Bizppurio business team (or the report settings in the console).",
|
||||
"note": "Once registered, delivery results are recorded in the history so you can verify actual delivery. Before registration only the send request is confirmed; the final result (success/failure) is not updated.",
|
||||
"copy": "Copy",
|
||||
"copied": "Report endpoint copied to clipboard."
|
||||
},
|
||||
"tabs": {
|
||||
"connection": "Settings",
|
||||
"templates": "Alimtalk Templates"
|
||||
}
|
||||
"name": "Bizppurio Messaging",
|
||||
"description": "Bizppurio SMS/LMS and KakaoTalk alimtalk messaging plugin.",
|
||||
"settings": {
|
||||
"title": "Bizppurio Messaging Settings",
|
||||
"description": "Manage Bizppurio integration credentials and sending options.",
|
||||
"save": "Save",
|
||||
"saving": "Saving...",
|
||||
"save_success": "Settings saved.",
|
||||
"save_failed": "Failed to save settings.",
|
||||
"test_mode": {
|
||||
"label": "Test Mode",
|
||||
"hint": "In test mode, messages are sent to the Bizppurio inspection (dev) domain. Turn it off to send through the production domain."
|
||||
},
|
||||
"binding": {
|
||||
"section_title": "KakaoTalk Alimtalk Binding",
|
||||
"list_guide": "Link a KakaoTalk alimtalk template to each notification. Use [Connect] to assign an approved template — the alimtalk message is then sent automatically when that event occurs.",
|
||||
"section_hint": "Only approved alimtalk templates can be linked. Saving applies to this notification immediately.",
|
||||
"modal_title": "Alimtalk Binding · {name}",
|
||||
"unbound": "Not connected",
|
||||
"btn_connect": "Connect",
|
||||
"btn_change": "Change",
|
||||
"connected_template": "Connected Template",
|
||||
"none": "Not connected",
|
||||
"no_approved_templates": "No approved (sendable) alimtalk templates. Register and inspect a template first.",
|
||||
"fallback_sms": "Fall back to SMS on failure",
|
||||
"fallback_hint": "If the alimtalk message fails, this notification's body is sent as an SMS instead.",
|
||||
"variables_hint": "Available variables (auto-substituted on send)",
|
||||
"saved": "Alimtalk binding saved.",
|
||||
"save_error": "Failed to save alimtalk binding."
|
||||
"live_mode_warning_title": "Sending in production",
|
||||
"live_mode_warning_body": "Test mode is off, so real SMS and alimtalk messages are sent to actual customers and sending fees are charged. Keep test mode on while inspecting.",
|
||||
"sections": {
|
||||
"api": {
|
||||
"title": "API Integration",
|
||||
"description": "Credentials shared by the sending system and the Kakao management system."
|
||||
},
|
||||
"sending": {
|
||||
"title": "Sending Options",
|
||||
"description": "Sender information used for SMS and alimtalk delivery."
|
||||
}
|
||||
},
|
||||
"banner": {
|
||||
"not_ready": "Setup required for delivery is incomplete.",
|
||||
"setup_action": "Set up",
|
||||
"test_mode": "Test mode — messages are not actually sent."
|
||||
"fields": {
|
||||
"bizppurio_id": {
|
||||
"label": "Bizppurio ID",
|
||||
"hint": "The Bizppurio account ID used for both sending and Kakao management."
|
||||
},
|
||||
"password": {
|
||||
"label": "Password",
|
||||
"hint": "The Bizppurio password used to issue the sending token."
|
||||
},
|
||||
"api_key": {
|
||||
"label": "API Key",
|
||||
"hint": "The API key is issued after you submit it together with your ID to Bizppurio customer support."
|
||||
},
|
||||
"sender_number": {
|
||||
"label": "Sender Number",
|
||||
"hint": "The sender phone number used for SMS and alimtalk delivery."
|
||||
},
|
||||
"sender_key": {
|
||||
"label": "Alimtalk Sender Profile Key",
|
||||
"hint": "The 40-character sender profile key used for alimtalk delivery and template lookup."
|
||||
}
|
||||
},
|
||||
"dispatch_result": {
|
||||
"column_header": "SMS/Alimtalk Result",
|
||||
"low_balance": "Low balance",
|
||||
"fallback": "SMS fallback {status}",
|
||||
"detail_title": "SMS/Alimtalk delivery result",
|
||||
"channel_label": "Channel: {channel}"
|
||||
"report": {
|
||||
"section_title": "Report Endpoint",
|
||||
"hint": "Bizppurio can push each SMS/alimtalk delivery result (success/failure) to this address (URL PUSH). Register it with the Bizppurio business team (or the report settings in the console).",
|
||||
"note": "Once registered, delivery results are recorded in the history so you can verify actual delivery. Before registration only the send request is confirmed; the final result (success/failure) is not updated.",
|
||||
"copy": "Copy",
|
||||
"copied": "Report endpoint copied to clipboard."
|
||||
},
|
||||
"editor": {
|
||||
"data_source": {
|
||||
"dispatch_results": "Bizppurio dispatch results"
|
||||
}
|
||||
"tabs": {
|
||||
"connection": "Settings",
|
||||
"templates": "Alimtalk Templates"
|
||||
},
|
||||
"templates": {
|
||||
"title": "Alimtalk Templates",
|
||||
"description": "Register, inspect, and manage KakaoTalk alimtalk templates. Only approved templates can be used for notification bindings.",
|
||||
"readiness": {
|
||||
"title": "The following settings are required to use alimtalk templates",
|
||||
"go_settings": "Go to settings",
|
||||
"missing_label": "Missing",
|
||||
"api_key_missing": "Kakao management API key",
|
||||
"sender_key_missing": "Alimtalk sender profile key",
|
||||
"note": "Enter the items above on the Settings tab to browse and register templates. Actual delivery requires turning off test mode and using templates approved by Kakao."
|
||||
},
|
||||
"list_error": {
|
||||
"title": "Failed to load the template list"
|
||||
},
|
||||
"list": {
|
||||
"new": "New Template",
|
||||
"refresh": "Refresh",
|
||||
"search_placeholder": "Search by name (2-50 chars)",
|
||||
"filter_all": "All statuses",
|
||||
"empty": "No alimtalk templates registered.",
|
||||
"empty_hint": "Register an alimtalk template with the [New Template] button.",
|
||||
"load_failed": "Failed to load templates. Check the sender profile key and API key.",
|
||||
"columns": {
|
||||
"name": "Name",
|
||||
"code": "Code",
|
||||
"status": "Status",
|
||||
"actions": "Actions"
|
||||
}
|
||||
},
|
||||
"status": {
|
||||
"sendable": "Sendable",
|
||||
"inspecting": "Inspecting",
|
||||
"rejected": "Rejected",
|
||||
"uninspected": "Not inspected",
|
||||
"stopped": "Stopped",
|
||||
"blocked": "Blocked",
|
||||
"dormant": "Dormant",
|
||||
"unknown": "Unknown"
|
||||
},
|
||||
"actions": {
|
||||
"edit": "Edit",
|
||||
"delete": "Delete",
|
||||
"request": "Request",
|
||||
"cancel_request": "Cancel request",
|
||||
"stop": "Stop",
|
||||
"reuse": "Resume",
|
||||
"cancel_approval": "Cancel approval",
|
||||
"release": "Release",
|
||||
"detail": "Detail"
|
||||
},
|
||||
"form": {
|
||||
"title_new": "Register Alimtalk Template",
|
||||
"title_edit": "Edit Alimtalk Template",
|
||||
"back_to_list": "Back to list",
|
||||
"sender_key": "Sender profile key",
|
||||
"code": "Template code",
|
||||
"code_auto": "Auto-generate",
|
||||
"code_manual": "Enter manually",
|
||||
"code_hint": "Letters, digits, underscore(_), hyphen(-), max 30 chars",
|
||||
"name": "Template name",
|
||||
"name_hint": "Management name (not part of content), max 200 chars",
|
||||
"category": "Category",
|
||||
"category_group": "Group",
|
||||
"category_item": "Item",
|
||||
"emphasize_type": "Template type",
|
||||
"type_none": "Basic",
|
||||
"type_image": "Image",
|
||||
"type_text": "Highlighted",
|
||||
"type_item_list_notice": "Advanced templates such as item-list should be registered on the Bizppurio website. Templates registered there are also available for listing and bindings.",
|
||||
"goto_bizppurio": "Bizppurio website",
|
||||
"image_name": "Image file name",
|
||||
"image_url": "Image URL",
|
||||
"image_upload": "Attach image",
|
||||
"image_upload_hint": "jpg/png / max 500KB / at least 500px wide (2:1 to 3:4 ratio)",
|
||||
"image_uploading": "Uploading image...",
|
||||
"image_remove": "Remove image",
|
||||
"image_maker_notice": "The image maker (auto-generation tool) is provided in the Bizppurio console.",
|
||||
"title_field": "Highlight title",
|
||||
"title_hint": "Only content present in the body, max 23 chars (variables allowed)",
|
||||
"subtitle_field": "Highlight subtitle",
|
||||
"subtitle_hint": "Only content present in the body, max 18 chars (no variables)",
|
||||
"content": "Template content",
|
||||
"content_placeholder": "Enter the body. Insert variables with #{variable}.",
|
||||
"content_hint": "Max 1300 chars",
|
||||
"variables_title": "Insert variable",
|
||||
"variables_help": "Insert #{variable} into the body; when you bind this template to a notification, it is replaced with the real value (member name, order number, etc.). Below are example variables per notification — insert the ones matching the notification you will bind.",
|
||||
"variables_quick": "Common variables (click to insert at cursor)",
|
||||
"variables_ref_toggle": "Variable reference by notification",
|
||||
"variables_ref_event": "Notification",
|
||||
"variables_ref_vars": "Provided variables",
|
||||
"optional_title": "Optional fields",
|
||||
"optional_toggle": "Expand optional fields (extra info, buttons, etc.)",
|
||||
"optional_help": "Check only the items you need to reveal their inputs. Buttons and quick replies assume a single web link (WL).",
|
||||
"button": "Button",
|
||||
"button_name": "Button label",
|
||||
"button_url": "Mobile link URL",
|
||||
"button_hint": "A web-link button shown at the bottom of the message.",
|
||||
"quick_reply": "Quick reply",
|
||||
"quick_reply_hint": "Quick reply (web link) used on consult-talk channels.",
|
||||
"represent_link": "Represent link",
|
||||
"link_pc": "PC web link",
|
||||
"link_mo": "Mobile web link",
|
||||
"preview_message": "Preview message",
|
||||
"preview_message_hint": "Summary shown in the chat list (max 40 chars).",
|
||||
"extra": "Extra info",
|
||||
"extra_hint": "Supplementary text outside the body such as channel-add or ad notices (registers the message type as extra-info type).",
|
||||
"security_flag": "Secure template (OTP, etc.)",
|
||||
"security_flag_hint": "Turn on for secure messages such as OTP. The message text is hidden on devices other than the sending device.",
|
||||
"preview_title": "Preview",
|
||||
"preview_empty": "Enter the body to see a preview here.",
|
||||
"save_register": "Register",
|
||||
"save_register_hint": "Registers as a draft only. To send, request inspection from the list and get Kakao approval.",
|
||||
"save_and_request": "Register and request inspection",
|
||||
"save_and_request_hint": "Registers and requests Kakao inspection at once. You cannot edit after requesting."
|
||||
},
|
||||
"detail": {
|
||||
"title": "Template detail",
|
||||
"close": "Close"
|
||||
},
|
||||
"confirm": {
|
||||
"delete": "Delete this template?",
|
||||
"request": "Request inspection? You cannot edit after requesting.",
|
||||
"cancel_request": "Cancel the inspection request?",
|
||||
"stop": "Stop this template? It cannot be used for delivery once stopped.",
|
||||
"cancel_approval": "Cancel the approval? Re-inspection will be required."
|
||||
},
|
||||
"toast": {
|
||||
"created": "The alimtalk template has been registered.",
|
||||
"created_requested": "The alimtalk template has been registered and inspection requested.",
|
||||
"updated": "The alimtalk template has been updated.",
|
||||
"deleted": "The alimtalk template has been deleted.",
|
||||
"action_success": "The request has been processed.",
|
||||
"action_failed": "Failed to process the request."
|
||||
},
|
||||
"varref": {
|
||||
"welcome": "Welcome (signup)",
|
||||
"reset_password": "Password reset",
|
||||
"order_confirmed": "Order confirmed",
|
||||
"order_shipped": "Order shipped",
|
||||
"new_comment": "New comment"
|
||||
}
|
||||
"preparation": {
|
||||
"sms_label": "SMS/LMS",
|
||||
"sms_sender": "Register your sender number.",
|
||||
"kakao_label": "Kakao Alimtalk",
|
||||
"kakao_channel": "Create a KakaoTalk business channel and register a sender profile.",
|
||||
"kakao_template": "Register your Alimtalk templates and get them approved.",
|
||||
"kakao_apikey": "Request an API key from Bizppurio support.",
|
||||
"console_link": "Open Bizppurio console"
|
||||
}
|
||||
},
|
||||
"binding": {
|
||||
"section_title": "KakaoTalk Alimtalk Binding",
|
||||
"list_guide": "Link a KakaoTalk alimtalk template to each notification. Use [Connect] to assign an approved template — the alimtalk message is then sent automatically when that event occurs.",
|
||||
"section_hint": "Only approved alimtalk templates can be linked. Saving applies to this notification immediately.",
|
||||
"modal_title": "Alimtalk Binding · {name}",
|
||||
"unbound": "Not connected",
|
||||
"btn_connect": "Connect",
|
||||
"btn_change": "Change",
|
||||
"fallback_on": "SMS fallback ON",
|
||||
"fallback_off": "SMS fallback OFF",
|
||||
"connected_template": "Connected Template",
|
||||
"none": "Not connected",
|
||||
"no_approved_templates": "No approved (sendable) alimtalk templates. Register and inspect a template first.",
|
||||
"fallback_sms": "Fall back to SMS on failure",
|
||||
"fallback_hint": "If the alimtalk message fails, this notification's body is sent as an SMS instead.",
|
||||
"variables_hint": "Available variables (auto-substituted on send)",
|
||||
"saved": "Alimtalk binding saved.",
|
||||
"save_error": "Failed to save alimtalk binding."
|
||||
},
|
||||
"banner": {
|
||||
"not_ready": "Setup required for delivery is incomplete.",
|
||||
"setup_action": "Set up",
|
||||
"test_mode": "Test mode — messages are not actually sent."
|
||||
},
|
||||
"dispatch_result": {
|
||||
"column_header": "SMS/Alimtalk Result",
|
||||
"low_balance": "Low balance",
|
||||
"fallback": "SMS fallback {status}",
|
||||
"detail_title": "SMS/Alimtalk delivery result",
|
||||
"channel_label": "Channel: {channel}"
|
||||
},
|
||||
"editor": {
|
||||
"data_source": {
|
||||
"dispatch_results": "Bizppurio dispatch results"
|
||||
}
|
||||
},
|
||||
"templates": {
|
||||
"title": "Alimtalk Templates",
|
||||
"description": "Register, inspect, and manage KakaoTalk alimtalk templates. Only approved templates can be used for notification bindings.",
|
||||
"readiness": {
|
||||
"title": "The following settings are required to use alimtalk templates",
|
||||
"go_settings": "Go to settings",
|
||||
"missing_label": "Missing",
|
||||
"api_key_missing": "Kakao management API key",
|
||||
"sender_key_missing": "Alimtalk sender profile key",
|
||||
"note": "Enter the items above on the Settings tab to browse and register templates. Actual delivery requires turning off test mode and using templates approved by Kakao."
|
||||
},
|
||||
"list_error": {
|
||||
"title": "Failed to load the template list"
|
||||
},
|
||||
"list_notice": {
|
||||
"console_desc": "Register, edit, and review templates in the Bizppurio console.",
|
||||
"console_link": "Open Bizppurio console"
|
||||
},
|
||||
"list": {
|
||||
"refresh": "Refresh",
|
||||
"search": "Search",
|
||||
"search_placeholder": "Search by name (2-50 chars)",
|
||||
"filter_all": "All statuses",
|
||||
"empty": "No alimtalk templates registered.",
|
||||
"empty_hint": "Templates registered in the Bizppurio console appear here.",
|
||||
"load_failed": "Failed to load templates. Check the sender profile key and API key.",
|
||||
"columns": {
|
||||
"no": "No.",
|
||||
"name": "Name",
|
||||
"code": "Code",
|
||||
"status": "Status",
|
||||
"requested_at": "Requested",
|
||||
"processed_at": "Processed",
|
||||
"actions": "Content"
|
||||
}
|
||||
},
|
||||
"status": {
|
||||
"sendable": "Sendable",
|
||||
"inspecting": "Inspecting",
|
||||
"rejected": "Rejected",
|
||||
"uninspected": "Not inspected",
|
||||
"stopped": "Stopped",
|
||||
"blocked": "Blocked",
|
||||
"dormant": "Dormant",
|
||||
"unknown": "Unknown"
|
||||
},
|
||||
"status_sub": {
|
||||
"rdy": "(unused)"
|
||||
},
|
||||
"status_guide": {
|
||||
"title": "Status badges",
|
||||
"sendable_label": "Sendable",
|
||||
"sendable": "Approved. Only this status can be linked to notifications and sent.",
|
||||
"inspecting_label": "Inspecting",
|
||||
"inspecting": "Kakao review in progress (2-3 business days).",
|
||||
"pending_label": "Uninspected / Rejected",
|
||||
"pending": "Cannot be sent yet. Request review or edit in the console."
|
||||
},
|
||||
"link_type": {
|
||||
"WL": "Web link",
|
||||
"AL": "App link",
|
||||
"DS": "Delivery tracking",
|
||||
"BK": "Bot keyword",
|
||||
"MD": "Message delivery",
|
||||
"AC": "Add channel",
|
||||
"BC": "Consultation talk",
|
||||
"BT": "Bot transfer",
|
||||
"TN": "Call",
|
||||
"MP": "Map",
|
||||
"P1": "Secure image send",
|
||||
"P2": "Privacy consent",
|
||||
"P3": "One-click pay"
|
||||
},
|
||||
"actions": {
|
||||
"detail": "Detail"
|
||||
},
|
||||
"detail": {
|
||||
"title": "Template detail",
|
||||
"close": "Close",
|
||||
"buttons": "Buttons",
|
||||
"extra": "Additional info",
|
||||
"category": "Category",
|
||||
"code": "Template code",
|
||||
"content": "Template content",
|
||||
"emphasize_type": "Template type",
|
||||
"image_upload": "Attach image",
|
||||
"subtitle_field": "Highlight subtitle",
|
||||
"title_field": "Highlight title",
|
||||
"type_image": "Image",
|
||||
"type_none": "Basic",
|
||||
"type_text": "Highlighted"
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,241 +1,199 @@
|
||||
{
|
||||
"name": "비즈뿌리오 메시지 발송",
|
||||
"description": "비즈뿌리오 연동 SMS/LMS·카카오 알림톡 발송 플러그인입니다.",
|
||||
"settings": {
|
||||
"title": "비즈뿌리오 메시지 발송 설정",
|
||||
"description": "비즈뿌리오 연동 정보와 발송 설정을 관리합니다.",
|
||||
"save": "저장",
|
||||
"saving": "저장 중...",
|
||||
"save_success": "설정이 저장되었습니다.",
|
||||
"save_failed": "설정 저장에 실패했습니다.",
|
||||
"info": {
|
||||
"credentials": "발송·카카오 관리에 사용하는 연동 정보(아이디·비밀번호·API 키)와 발신 정보를 입력합니다. 검수 모드를 끄고 운영으로 전환하기 전에 모든 값이 정확한지 확인하세요.",
|
||||
"report": "발송 결과(성공/실패)를 자동으로 받아 이력에 기록하려면 아래 리포트 수신 주소를 비즈뿌리오에 등록해야 합니다."
|
||||
},
|
||||
"test_mode": {
|
||||
"label": "검수 모드",
|
||||
"hint": "검수 모드에서는 비즈뿌리오 검수(개발) 도메인으로 발송됩니다. 끄면 운영 도메인으로 실제 발송됩니다."
|
||||
},
|
||||
"live_mode_warning_title": "운영 환경으로 발송됩니다",
|
||||
"live_mode_warning_body": "검수 모드가 꺼져 있어 실제 고객에게 문자·알림톡이 발송되고 발송 비용이 청구됩니다. 검수 단계에서는 검수 모드를 켜 두세요.",
|
||||
"sections": {
|
||||
"api": {
|
||||
"title": "API 연동",
|
||||
"description": "발송 시스템과 카카오 관리 시스템에 공통으로 사용하는 연동 정보입니다."
|
||||
},
|
||||
"sending": {
|
||||
"title": "발송 설정",
|
||||
"description": "문자·알림톡 발송에 사용하는 발신 정보입니다."
|
||||
}
|
||||
},
|
||||
"fields": {
|
||||
"bizppurio_id": {
|
||||
"label": "비즈뿌리오 아이디",
|
||||
"hint": "발송·카카오 관리에 공통으로 사용하는 비즈뿌리오 아이디입니다."
|
||||
},
|
||||
"password": {
|
||||
"label": "비밀번호",
|
||||
"hint": "발송 토큰 발급에 사용하는 비즈뿌리오 비밀번호입니다."
|
||||
},
|
||||
"api_key": {
|
||||
"label": "API 키",
|
||||
"hint": "API 키는 비즈뿌리오 고객센터로 아이디와 함께 접수하면 확인 후 발급됩니다."
|
||||
},
|
||||
"sender_number": {
|
||||
"label": "발신번호",
|
||||
"hint": "문자·알림톡 발송에 사용하는 발신 전화번호입니다."
|
||||
},
|
||||
"sender_key": {
|
||||
"label": "알림톡 발신프로필 키",
|
||||
"hint": "알림톡 발송·템플릿 조회에 사용하는 발신프로필 키(40자)입니다."
|
||||
}
|
||||
},
|
||||
"report": {
|
||||
"section_title": "리포트 수신 설정",
|
||||
"hint": "비즈뿌리오는 문자·알림톡 발송 후 성공/실패 결과를 이 주소로 전송(URL PUSH)하는 리포트 수신 방식을 제공합니다. 아래 주소를 비즈뿌리오 사업팀(또는 관리 콘솔의 리포트 수신 설정)에 등록하세요.",
|
||||
"note": "등록하면 발송 결과가 이력에 자동 기록되어 실제 도달 여부를 확인할 수 있습니다. 등록 전에는 발송 요청까지만 확인되고 최종 결과(성공/실패)는 갱신되지 않습니다.",
|
||||
"copy": "복사",
|
||||
"copied": "리포트 수신 주소가 클립보드에 복사되었습니다."
|
||||
},
|
||||
"tabs": {
|
||||
"connection": "환경설정",
|
||||
"templates": "알림톡 템플릿"
|
||||
}
|
||||
"name": "비즈뿌리오 메시지 발송",
|
||||
"description": "비즈뿌리오 연동 SMS/LMS·카카오 알림톡 발송 플러그인입니다.",
|
||||
"settings": {
|
||||
"title": "비즈뿌리오 메시지 발송 설정",
|
||||
"description": "비즈뿌리오 연동 정보와 발송 설정을 관리합니다.",
|
||||
"save": "저장",
|
||||
"saving": "저장 중...",
|
||||
"save_success": "설정이 저장되었습니다.",
|
||||
"save_failed": "설정 저장에 실패했습니다.",
|
||||
"test_mode": {
|
||||
"label": "검수 모드",
|
||||
"hint": "검수 모드에서는 비즈뿌리오 검수(개발) 도메인으로 발송됩니다. 끄면 운영 도메인으로 실제 발송됩니다."
|
||||
},
|
||||
"binding": {
|
||||
"section_title": "카카오 알림톡 연동",
|
||||
"list_guide": "각 알림에 발송할 카카오 알림톡 템플릿을 연결하세요. [연결]로 승인된 템플릿을 지정하면 해당 이벤트 발생 시 알림톡이 자동 발송됩니다.",
|
||||
"section_hint": "승인된 알림톡 템플릿만 연결할 수 있습니다. 저장하면 이 알림에 즉시 반영됩니다.",
|
||||
"modal_title": "알림톡 연결 · {name}",
|
||||
"unbound": "미연결",
|
||||
"btn_connect": "연결",
|
||||
"btn_change": "연결 변경",
|
||||
"connected_template": "연결 템플릿",
|
||||
"none": "연결 안 함",
|
||||
"no_approved_templates": "발송 가능한(승인된) 알림톡 템플릿이 없습니다. 먼저 템플릿을 등록·검수하세요.",
|
||||
"fallback_sms": "실패 시 SMS로 대체발송",
|
||||
"fallback_hint": "알림톡 발송이 실패하면 이 알림의 본문 내용이 문자(SMS)로 대신 발송됩니다.",
|
||||
"variables_hint": "제공 변수 (발송 시 자동 치환)",
|
||||
"saved": "알림톡 연동을 저장했습니다.",
|
||||
"save_error": "알림톡 연동 저장에 실패했습니다."
|
||||
"live_mode_warning_title": "운영 환경으로 발송됩니다",
|
||||
"live_mode_warning_body": "검수 모드가 꺼져 있어 실제 고객에게 문자·알림톡이 발송되고 발송 비용이 청구됩니다. 검수 단계에서는 검수 모드를 켜 두세요.",
|
||||
"sections": {
|
||||
"api": {
|
||||
"title": "API 연동",
|
||||
"description": "발송 시스템과 카카오 관리 시스템에 공통으로 사용하는 연동 정보입니다."
|
||||
},
|
||||
"sending": {
|
||||
"title": "발송 설정",
|
||||
"description": "문자·알림톡 발송에 사용하는 발신 정보입니다."
|
||||
}
|
||||
},
|
||||
"banner": {
|
||||
"not_ready": "발송에 필요한 설정이 완료되지 않았습니다.",
|
||||
"setup_action": "설정하기",
|
||||
"test_mode": "테스트 모드입니다 — 실제 발송은 이뤄지지 않습니다."
|
||||
"fields": {
|
||||
"bizppurio_id": {
|
||||
"label": "비즈뿌리오 아이디",
|
||||
"hint": "발송·카카오 관리에 공통으로 사용하는 비즈뿌리오 아이디입니다."
|
||||
},
|
||||
"password": {
|
||||
"label": "비밀번호",
|
||||
"hint": "발송 토큰 발급에 사용하는 비즈뿌리오 비밀번호입니다."
|
||||
},
|
||||
"api_key": {
|
||||
"label": "API 키",
|
||||
"hint": "API 키는 비즈뿌리오 고객센터로 아이디와 함께 접수하면 확인 후 발급됩니다."
|
||||
},
|
||||
"sender_number": {
|
||||
"label": "발신번호",
|
||||
"hint": "문자·알림톡 발송에 사용하는 발신 전화번호입니다."
|
||||
},
|
||||
"sender_key": {
|
||||
"label": "알림톡 발신프로필 키",
|
||||
"hint": "알림톡 발송·템플릿 조회에 사용하는 발신프로필 키(40자)입니다."
|
||||
}
|
||||
},
|
||||
"dispatch_result": {
|
||||
"column_header": "문자·알림톡 결과",
|
||||
"low_balance": "잔액 부족",
|
||||
"fallback": "SMS 대체발송 {status}",
|
||||
"detail_title": "문자·알림톡 발송 결과",
|
||||
"channel_label": "발송 채널: {channel}"
|
||||
"report": {
|
||||
"section_title": "리포트 수신 설정",
|
||||
"hint": "비즈뿌리오는 문자·알림톡 발송 후 성공/실패 결과를 이 주소로 전송(URL PUSH)하는 리포트 수신 방식을 제공합니다. 아래 주소를 비즈뿌리오 사업팀(또는 관리 콘솔의 리포트 수신 설정)에 등록하세요.",
|
||||
"note": "등록하면 발송 결과가 이력에 자동 기록되어 실제 도달 여부를 확인할 수 있습니다. 등록 전에는 발송 요청까지만 확인되고 최종 결과(성공/실패)는 갱신되지 않습니다.",
|
||||
"copy": "복사",
|
||||
"copied": "리포트 수신 주소가 클립보드에 복사되었습니다."
|
||||
},
|
||||
"editor": {
|
||||
"data_source": {
|
||||
"dispatch_results": "비즈뿌리오 발송 결과"
|
||||
}
|
||||
"tabs": {
|
||||
"connection": "환경설정",
|
||||
"templates": "알림톡 템플릿"
|
||||
},
|
||||
"templates": {
|
||||
"title": "알림톡 템플릿",
|
||||
"description": "카카오 알림톡 템플릿을 등록·검수·관리합니다. 승인된 템플릿만 알림 연동에 사용할 수 있습니다.",
|
||||
"readiness": {
|
||||
"title": "알림톡 템플릿을 사용하려면 아래 설정이 필요합니다",
|
||||
"go_settings": "환경설정으로 이동",
|
||||
"missing_label": "미설정 항목",
|
||||
"api_key_missing": "카카오 관리 API 키",
|
||||
"sender_key_missing": "알림톡 발신프로필 키",
|
||||
"note": "위 항목을 환경설정 탭에서 입력하면 템플릿 조회·등록이 가능합니다. 실제 발송은 검수 모드를 끄고 운영으로 전환한 뒤 카카오 승인을 받은 템플릿만 사용할 수 있습니다."
|
||||
},
|
||||
"list_error": {
|
||||
"title": "템플릿 목록을 불러오지 못했습니다"
|
||||
},
|
||||
"list": {
|
||||
"new": "새 템플릿",
|
||||
"refresh": "새로고침",
|
||||
"search_placeholder": "템플릿명 검색 (2~50자)",
|
||||
"filter_all": "전체 상태",
|
||||
"empty": "등록된 알림톡 템플릿이 없습니다.",
|
||||
"empty_hint": "[새 템플릿] 버튼으로 알림톡 템플릿을 등록하세요.",
|
||||
"load_failed": "템플릿 목록을 불러오지 못했습니다. 발신프로필 키와 API 키를 확인하세요.",
|
||||
"columns": {
|
||||
"name": "템플릿명",
|
||||
"code": "코드",
|
||||
"status": "상태",
|
||||
"actions": "관리"
|
||||
}
|
||||
},
|
||||
"status": {
|
||||
"sendable": "발송가능",
|
||||
"inspecting": "검수중",
|
||||
"rejected": "반려",
|
||||
"uninspected": "미검수",
|
||||
"stopped": "중지",
|
||||
"blocked": "차단",
|
||||
"dormant": "휴면",
|
||||
"unknown": "알 수 없음"
|
||||
},
|
||||
"actions": {
|
||||
"edit": "수정",
|
||||
"delete": "삭제",
|
||||
"request": "검수요청",
|
||||
"cancel_request": "검수취소",
|
||||
"stop": "중지",
|
||||
"reuse": "중지해제",
|
||||
"cancel_approval": "승인취소",
|
||||
"release": "휴면해제",
|
||||
"detail": "상세"
|
||||
},
|
||||
"form": {
|
||||
"title_new": "알림톡 템플릿 등록",
|
||||
"title_edit": "알림톡 템플릿 수정",
|
||||
"back_to_list": "목록으로",
|
||||
"sender_key": "발신프로필 키",
|
||||
"code": "템플릿 코드",
|
||||
"code_auto": "자동 생성",
|
||||
"code_manual": "직접 입력",
|
||||
"code_hint": "영문·숫자·언더바(_)·하이픈(-), 최대 30자",
|
||||
"name": "템플릿명",
|
||||
"name_hint": "관리용 이름 (내용에 포함되지 않음), 최대 200자",
|
||||
"category": "카테고리",
|
||||
"category_group": "대분류",
|
||||
"category_item": "소분류",
|
||||
"emphasize_type": "템플릿 유형",
|
||||
"type_none": "기본형",
|
||||
"type_image": "이미지형",
|
||||
"type_text": "강조표기형",
|
||||
"type_item_list_notice": "아이템리스트형 등 고급 템플릿은 비즈뿌리오 홈페이지에서 등록하세요. 홈페이지에서 등록한 템플릿도 목록 조회·연동에서 그대로 사용할 수 있습니다.",
|
||||
"goto_bizppurio": "비즈뿌리오 홈페이지",
|
||||
"image_name": "이미지 파일명",
|
||||
"image_url": "이미지 링크",
|
||||
"image_upload": "이미지 첨부",
|
||||
"image_upload_hint": "jpg·png / 최대 500KB / 가로 500px 이상 (가로:세로 2:1~3:4)",
|
||||
"image_uploading": "이미지 업로드 중...",
|
||||
"image_remove": "이미지 제거",
|
||||
"image_maker_notice": "이미지 메이커(자동 생성 도구)는 비즈뿌리오 콘솔에서 제공됩니다.",
|
||||
"title_field": "강조표기 문구",
|
||||
"title_hint": "본문에 있는 내용만, 최대 23자 (변수 사용 가능)",
|
||||
"subtitle_field": "보조 문구",
|
||||
"subtitle_hint": "본문에 있는 내용만, 최대 18자 (변수 사용 불가)",
|
||||
"content": "템플릿 내용",
|
||||
"content_placeholder": "본문을 입력하세요. #{변수} 형식으로 변수를 넣을 수 있습니다.",
|
||||
"content_hint": "최대 1300자",
|
||||
"variables_title": "변수 넣기",
|
||||
"variables_help": "본문에 #{변수} 형식으로 넣으면, 이 템플릿을 알림에 연결할 때 실제 값(회원 이름·주문번호 등)으로 자동 치환됩니다. 아래는 알림별 제공 변수 예시입니다 — 연결할 알림에 맞는 변수를 본문에 넣으세요.",
|
||||
"variables_quick": "자주 쓰는 변수 (클릭하면 커서 위치에 삽입)",
|
||||
"variables_ref_toggle": "알림별 제공 변수 참고표",
|
||||
"variables_ref_event": "알림",
|
||||
"variables_ref_vars": "제공 변수",
|
||||
"optional_title": "선택 항목",
|
||||
"optional_toggle": "선택 항목 펼치기 (부가정보·버튼 등)",
|
||||
"optional_help": "필요한 항목만 체크하면 입력란이 나타납니다. 버튼·바로연결은 웹링크(WL) 1개 기준입니다.",
|
||||
"button": "버튼",
|
||||
"button_name": "버튼명",
|
||||
"button_url": "모바일 링크 URL",
|
||||
"button_hint": "메시지 하단에 표시되는 웹링크 버튼입니다.",
|
||||
"quick_reply": "바로연결",
|
||||
"quick_reply_hint": "상담톡 채널에서 사용하는 바로연결(웹링크)입니다.",
|
||||
"represent_link": "대표 링크",
|
||||
"link_pc": "PC 웹 링크",
|
||||
"link_mo": "모바일 웹 링크",
|
||||
"preview_message": "미리보기 메시지",
|
||||
"preview_message_hint": "채팅 목록에 표시되는 요약 문구 (최대 40자)",
|
||||
"extra": "부가정보",
|
||||
"extra_hint": "채널 추가·광고성 안내 등 본문 외 부가 문구 (입력 시 메시지 유형이 부가정보형으로 등록됩니다)",
|
||||
"security_flag": "템플릿 보안 (OTP 등)",
|
||||
"security_flag_hint": "OTP 등 보안 메시지일 때 켜세요. 발신 디바이스 외 다른 기기에는 메시지 텍스트가 표시되지 않습니다.",
|
||||
"preview_title": "미리보기",
|
||||
"preview_empty": "본문을 입력하면 여기에 미리보기가 표시됩니다.",
|
||||
"save_register": "등록",
|
||||
"save_register_hint": "임시 등록만 합니다. 발송하려면 이후 목록에서 검수요청 → 카카오 승인이 필요합니다.",
|
||||
"save_and_request": "등록 후 검수요청",
|
||||
"save_and_request_hint": "등록과 동시에 카카오에 검수를 요청합니다. 요청 후에는 수정할 수 없습니다."
|
||||
},
|
||||
"detail": {
|
||||
"title": "템플릿 상세",
|
||||
"close": "닫기"
|
||||
},
|
||||
"confirm": {
|
||||
"delete": "이 템플릿을 삭제하시겠습니까?",
|
||||
"request": "검수를 요청하시겠습니까? 요청 후에는 수정할 수 없습니다.",
|
||||
"cancel_request": "검수 요청을 취소하시겠습니까?",
|
||||
"stop": "이 템플릿을 중지하시겠습니까? 중지하면 발송에 사용할 수 없습니다.",
|
||||
"cancel_approval": "승인을 취소하시겠습니까? 취소하면 재검수가 필요합니다."
|
||||
},
|
||||
"toast": {
|
||||
"created": "알림톡 템플릿을 등록했습니다.",
|
||||
"created_requested": "알림톡 템플릿을 등록하고 검수를 요청했습니다.",
|
||||
"updated": "알림톡 템플릿을 수정했습니다.",
|
||||
"deleted": "알림톡 템플릿을 삭제했습니다.",
|
||||
"action_success": "요청을 처리했습니다.",
|
||||
"action_failed": "요청 처리에 실패했습니다."
|
||||
},
|
||||
"varref": {
|
||||
"welcome": "회원가입 환영",
|
||||
"reset_password": "비밀번호 재설정",
|
||||
"order_confirmed": "결제 완료",
|
||||
"order_shipped": "배송 시작",
|
||||
"new_comment": "새 댓글"
|
||||
}
|
||||
"preparation": {
|
||||
"sms_label": "문자(SMS/LMS)",
|
||||
"sms_sender": "발신번호를 등록하세요.",
|
||||
"kakao_label": "카카오 알림톡",
|
||||
"kakao_channel": "카카오톡 비즈니스 채널을 만들고 발신프로필을 등록하세요.",
|
||||
"kakao_template": "알림톡 템플릿을 등록하고 승인받으세요.",
|
||||
"kakao_apikey": "고객센터에 API 키를 요청하세요.",
|
||||
"console_link": "비즈뿌리오 콘솔 열기"
|
||||
}
|
||||
},
|
||||
"binding": {
|
||||
"section_title": "카카오 알림톡 연동",
|
||||
"list_guide": "각 알림에 발송할 카카오 알림톡 템플릿을 연결하세요. [연결]로 승인된 템플릿을 지정하면 해당 이벤트 발생 시 알림톡이 자동 발송됩니다.",
|
||||
"section_hint": "승인된 알림톡 템플릿만 연결할 수 있습니다. 저장하면 이 알림에 즉시 반영됩니다.",
|
||||
"modal_title": "알림톡 연결 · {name}",
|
||||
"unbound": "미연결",
|
||||
"btn_connect": "연결",
|
||||
"btn_change": "연결 변경",
|
||||
"fallback_on": "SMS 대체 ON",
|
||||
"fallback_off": "SMS 대체 OFF",
|
||||
"connected_template": "연결 템플릿",
|
||||
"none": "연결 안 함",
|
||||
"no_approved_templates": "발송 가능한(승인된) 알림톡 템플릿이 없습니다. 먼저 템플릿을 등록·검수하세요.",
|
||||
"fallback_sms": "실패 시 SMS로 대체발송",
|
||||
"fallback_hint": "알림톡 발송이 실패하면 이 알림의 본문 내용이 문자(SMS)로 대신 발송됩니다.",
|
||||
"variables_hint": "제공 변수 (발송 시 자동 치환)",
|
||||
"saved": "알림톡 연동을 저장했습니다.",
|
||||
"save_error": "알림톡 연동 저장에 실패했습니다."
|
||||
},
|
||||
"banner": {
|
||||
"not_ready": "발송에 필요한 설정이 완료되지 않았습니다.",
|
||||
"setup_action": "설정하기",
|
||||
"test_mode": "테스트 모드입니다 — 실제 발송은 이뤄지지 않습니다."
|
||||
},
|
||||
"dispatch_result": {
|
||||
"column_header": "문자·알림톡 결과",
|
||||
"low_balance": "잔액 부족",
|
||||
"fallback": "SMS 대체발송 {status}",
|
||||
"detail_title": "문자·알림톡 발송 결과",
|
||||
"channel_label": "발송 채널: {channel}"
|
||||
},
|
||||
"editor": {
|
||||
"data_source": {
|
||||
"dispatch_results": "비즈뿌리오 발송 결과"
|
||||
}
|
||||
},
|
||||
"templates": {
|
||||
"title": "알림톡 템플릿",
|
||||
"description": "카카오 알림톡 템플릿을 등록·검수·관리합니다. 승인된 템플릿만 알림 연동에 사용할 수 있습니다.",
|
||||
"readiness": {
|
||||
"title": "알림톡 템플릿을 사용하려면 아래 설정이 필요합니다",
|
||||
"go_settings": "환경설정으로 이동",
|
||||
"missing_label": "미설정 항목",
|
||||
"api_key_missing": "카카오 관리 API 키",
|
||||
"sender_key_missing": "알림톡 발신프로필 키",
|
||||
"note": "위 항목을 환경설정 탭에서 입력하면 템플릿 조회·등록이 가능합니다. 실제 발송은 검수 모드를 끄고 운영으로 전환한 뒤 카카오 승인을 받은 템플릿만 사용할 수 있습니다."
|
||||
},
|
||||
"list_error": {
|
||||
"title": "템플릿 목록을 불러오지 못했습니다"
|
||||
},
|
||||
"list_notice": {
|
||||
"console_desc": "템플릿 등록·수정·검수는 비즈뿌리오 콘솔에서 진행해주세요.",
|
||||
"console_link": "비즈뿌리오 콘솔 열기"
|
||||
},
|
||||
"list": {
|
||||
"refresh": "새로고침",
|
||||
"search": "검색",
|
||||
"search_placeholder": "템플릿명 검색 (2~50자)",
|
||||
"filter_all": "전체 상태",
|
||||
"empty": "등록된 알림톡 템플릿이 없습니다.",
|
||||
"empty_hint": "비즈뿌리오 콘솔에서 등록한 템플릿이 여기에 표시됩니다.",
|
||||
"load_failed": "템플릿 목록을 불러오지 못했습니다. 발신프로필 키와 API 키를 확인하세요.",
|
||||
"columns": {
|
||||
"no": "번호",
|
||||
"name": "템플릿명",
|
||||
"code": "코드",
|
||||
"status": "상태",
|
||||
"requested_at": "등록요청일",
|
||||
"processed_at": "처리일",
|
||||
"actions": "내용"
|
||||
}
|
||||
},
|
||||
"status": {
|
||||
"sendable": "발송가능",
|
||||
"inspecting": "검수중",
|
||||
"rejected": "반려",
|
||||
"uninspected": "미검수",
|
||||
"stopped": "중지",
|
||||
"blocked": "차단",
|
||||
"dormant": "휴면",
|
||||
"unknown": "알 수 없음"
|
||||
},
|
||||
"status_sub": {
|
||||
"rdy": "(사용전)"
|
||||
},
|
||||
"status_guide": {
|
||||
"title": "상태 배지",
|
||||
"sendable_label": "발송가능",
|
||||
"sendable": "승인 완료. 이 상태만 알림에 연결·발송할 수 있습니다.",
|
||||
"inspecting_label": "검수중",
|
||||
"inspecting": "카카오 검수 진행 중 (영업일 2~3일).",
|
||||
"pending_label": "미검수·반려",
|
||||
"pending": "아직 발송할 수 없습니다. 콘솔에서 검수요청·수정하세요."
|
||||
},
|
||||
"link_type": {
|
||||
"WL": "웹링크",
|
||||
"AL": "앱링크",
|
||||
"DS": "배송조회",
|
||||
"BK": "봇키워드",
|
||||
"MD": "메시지전달",
|
||||
"AC": "채널추가",
|
||||
"BC": "상담톡전환",
|
||||
"BT": "봇전환",
|
||||
"TN": "전화하기",
|
||||
"MP": "지도보기",
|
||||
"P1": "이미지 보안전송",
|
||||
"P2": "개인정보이용",
|
||||
"P3": "원클릭 결제"
|
||||
},
|
||||
"actions": {
|
||||
"detail": "상세"
|
||||
},
|
||||
"detail": {
|
||||
"title": "템플릿 상세",
|
||||
"close": "닫기",
|
||||
"buttons": "버튼",
|
||||
"extra": "부가정보",
|
||||
"category": "카테고리",
|
||||
"code": "템플릿 코드",
|
||||
"content": "템플릿 내용",
|
||||
"emphasize_type": "템플릿 유형",
|
||||
"image_upload": "이미지 첨부",
|
||||
"subtitle_field": "보조 문구",
|
||||
"title_field": "강조표기 문구",
|
||||
"type_image": "이미지형",
|
||||
"type_none": "기본형",
|
||||
"type_text": "강조표기형"
|
||||
}
|
||||
}
|
||||
}
|
||||
+328
-840
File diff suppressed because it is too large.
Load diff
+8
-194
@@ -9,23 +9,20 @@ use App\Http\Controllers\Api\Base\AdminBaseController;
|
||||
use Illuminate\Http\JsonResponse;
|
||||
use Illuminate\Http\Request;
|
||||
use Plugins\Sirsoft\MessageBizppurio\Concerns\GuardsKakaoRequests;
|
||||
use Plugins\Sirsoft\MessageBizppurio\Http\Requests\StoreAlimtalkTemplateRequest;
|
||||
use Plugins\Sirsoft\MessageBizppurio\Http\Requests\UpdateAlimtalkTemplateRequest;
|
||||
use Plugins\Sirsoft\MessageBizppurio\Http\Requests\UploadTemplateImageRequest;
|
||||
use Plugins\Sirsoft\MessageBizppurio\Services\AlimtalkTemplateService;
|
||||
|
||||
/**
|
||||
* 알림톡 템플릿 관리 컨트롤러 (Phase 5).
|
||||
* 알림톡 템플릿 조회 컨트롤러 (Phase 5).
|
||||
*
|
||||
* 카카오 관리 API(kapi)로 알림톡 템플릿을 실시간 조회·등록·수정·삭제·검수·상태변경한다.
|
||||
* 저장(binding)은 하지 않으며(Phase 6), 목록/상세는 매 요청 실시간 조회한다.
|
||||
* 카카오 관리 API(kapi)로 알림톡 템플릿을 실시간 조회한다(목록·상세·카테고리·발신프로필).
|
||||
* 등록·수정·삭제·검수·상태변경은 비즈뿌리오 콘솔로 위임하며, 이 화면은 조회 + 알림 연결만
|
||||
* 담당한다. 템플릿은 DB 에 저장하지 않고 목록/상세를 매 요청 실시간 조회한다.
|
||||
*
|
||||
* 권한(라우트 미들웨어):
|
||||
* - 조회(list/detail/categories/profiles): sirsoft-message_bizppurio.messaging.view
|
||||
* - 변경(store/update/destroy/검수/상태변경): sirsoft-message_bizppurio.messaging.manage
|
||||
*
|
||||
* kapi 실패는 BizppurioApiException 으로 전달되므로, 각 액션에서 catch 하여 카카오가 준
|
||||
* 실패 사유(message)를 그대로 422 로 반환한다(운영자가 반려/차단 사유를 바로 확인).
|
||||
* 실패 사유(message)를 그대로 422 로 반환한다(운영자가 조회 실패 원인을 바로 확인).
|
||||
*/
|
||||
class AlimtalkTemplateController extends AdminBaseController
|
||||
{
|
||||
@@ -99,190 +96,7 @@ class AlimtalkTemplateController extends AdminBaseController
|
||||
]));
|
||||
}
|
||||
|
||||
/**
|
||||
* 이미지형 템플릿용 이미지를 업로드하고 카카오 등록 URL 을 반환합니다.
|
||||
*
|
||||
* 업로드된 임시 파일을 카카오 이미지 업로드 API 로 전달하고, 반환된 URL 을 프론트가
|
||||
* templateImageUrl 로 사용한다.
|
||||
*
|
||||
* @param UploadTemplateImageRequest $request 이미지 파일 검증 Request
|
||||
* @return JsonResponse data 에 image_url·image_name
|
||||
*/
|
||||
public function uploadImage(UploadTemplateImageRequest $request): JsonResponse
|
||||
{
|
||||
return $this->guard(function () use ($request) {
|
||||
$file = $request->file('image');
|
||||
|
||||
$url = $this->service->uploadImage(
|
||||
$file->getRealPath(),
|
||||
$file->getClientOriginalName(),
|
||||
);
|
||||
|
||||
return ResponseHelper::success('messages.success', [
|
||||
'image_url' => $url,
|
||||
'image_name' => $file->getClientOriginalName(),
|
||||
]);
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* 알림톡 템플릿을 신규 등록합니다.
|
||||
*
|
||||
* @param StoreAlimtalkTemplateRequest $request 유형별 검증 Request
|
||||
* @return JsonResponse data.template 에 등록된 템플릿(검수요청 시 REQ 상태)
|
||||
*/
|
||||
public function store(StoreAlimtalkTemplateRequest $request): JsonResponse
|
||||
{
|
||||
return $this->guard(function () use ($request) {
|
||||
$data = $request->validated();
|
||||
$requestInspection = (bool) ($data['requestInspection'] ?? false);
|
||||
|
||||
$template = $this->service->create($data);
|
||||
|
||||
// [등록 후 검수요청]: 등록으로 받은 템플릿 코드로 즉시 검수를 요청한다.
|
||||
if ($requestInspection) {
|
||||
$templateCode = (string) ($template['templateCode'] ?? '');
|
||||
if ($templateCode !== '') {
|
||||
$this->service->requestInspection($templateCode);
|
||||
}
|
||||
|
||||
return ResponseHelper::success(
|
||||
'sirsoft-message_bizppurio::messages.template.created_requested',
|
||||
['template' => $template],
|
||||
);
|
||||
}
|
||||
|
||||
return ResponseHelper::success(
|
||||
'sirsoft-message_bizppurio::messages.template.created',
|
||||
['template' => $template],
|
||||
);
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* 알림톡 템플릿을 수정합니다. (대기 + 검수 REG/REJ 상태만)
|
||||
*
|
||||
* @param UpdateAlimtalkTemplateRequest $request 유형별 검증 Request
|
||||
* @param string $templateCode 기존 템플릿 코드
|
||||
* @return JsonResponse data.template 에 수정된 템플릿
|
||||
*/
|
||||
public function update(UpdateAlimtalkTemplateRequest $request, string $templateCode): JsonResponse
|
||||
{
|
||||
return $this->guard(fn () => ResponseHelper::success(
|
||||
'sirsoft-message_bizppurio::messages.template.updated',
|
||||
['template' => $this->service->update($templateCode, $request->validated())],
|
||||
));
|
||||
}
|
||||
|
||||
/**
|
||||
* 알림톡 템플릿을 삭제합니다. (대기 + 검수 REG/REJ 상태만)
|
||||
*
|
||||
* @param string $templateCode 템플릿 코드
|
||||
* @return JsonResponse 삭제 완료 응답
|
||||
*/
|
||||
public function destroy(string $templateCode): JsonResponse
|
||||
{
|
||||
return $this->guard(function () use ($templateCode) {
|
||||
$this->service->delete($templateCode);
|
||||
|
||||
return ResponseHelper::success('sirsoft-message_bizppurio::messages.template.deleted');
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* 검수를 요청합니다. (검수 REG 상태만)
|
||||
*
|
||||
* @param Request $request HTTP 요청(comment 선택)
|
||||
* @param string $templateCode 템플릿 코드
|
||||
* @return JsonResponse 검수 요청 완료 응답
|
||||
*/
|
||||
public function requestInspection(Request $request, string $templateCode): JsonResponse
|
||||
{
|
||||
return $this->guard(function () use ($request, $templateCode) {
|
||||
$this->service->requestInspection($templateCode, $request->input('comment'));
|
||||
|
||||
return ResponseHelper::success('sirsoft-message_bizppurio::messages.template.requested');
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* 검수 요청을 취소합니다. (검수 REQ 상태만)
|
||||
*
|
||||
* @param string $templateCode 템플릿 코드
|
||||
* @return JsonResponse 검수 취소 완료 응답
|
||||
*/
|
||||
public function cancelRequest(string $templateCode): JsonResponse
|
||||
{
|
||||
return $this->statusAction($templateCode, 'cancelRequest', 'request_canceled');
|
||||
}
|
||||
|
||||
/**
|
||||
* 승인된 템플릿을 중지합니다. (RDY/ACT 상태)
|
||||
*
|
||||
* @param string $templateCode 템플릿 코드
|
||||
* @return JsonResponse 중지 완료 응답
|
||||
*/
|
||||
public function stop(string $templateCode): JsonResponse
|
||||
{
|
||||
return $this->statusAction($templateCode, 'stop', 'stopped');
|
||||
}
|
||||
|
||||
/**
|
||||
* 중지된 템플릿을 정상으로 되돌립니다. (STP 상태)
|
||||
*
|
||||
* @param string $templateCode 템플릿 코드
|
||||
* @return JsonResponse 중지 해제 완료 응답
|
||||
*/
|
||||
public function reuse(string $templateCode): JsonResponse
|
||||
{
|
||||
return $this->statusAction($templateCode, 'reuse', 'resumed');
|
||||
}
|
||||
|
||||
/**
|
||||
* 승인을 취소합니다(재검수 가능 상태로 복귀). (RDY/ACT 상태)
|
||||
*
|
||||
* @param string $templateCode 템플릿 코드
|
||||
* @return JsonResponse 승인 취소 완료 응답
|
||||
*/
|
||||
public function cancelApproval(string $templateCode): JsonResponse
|
||||
{
|
||||
return $this->statusAction($templateCode, 'cancelApproval', 'approval_canceled');
|
||||
}
|
||||
|
||||
/**
|
||||
* 휴면 템플릿을 해제합니다. (DMT 상태)
|
||||
*
|
||||
* @param string $templateCode 템플릿 코드
|
||||
* @return JsonResponse 휴면 해제 완료 응답
|
||||
*/
|
||||
public function release(string $templateCode): JsonResponse
|
||||
{
|
||||
return $this->statusAction($templateCode, 'release', 'released');
|
||||
}
|
||||
|
||||
/**
|
||||
* senderKey + templateCode 만 필요한 단순 상태 변경 액션의 공통 처리.
|
||||
*
|
||||
* @param string $templateCode 템플릿 코드
|
||||
* @param string $method 서비스 메서드명
|
||||
* @param string $messageKey 성공 메시지 키(messages.template.*)
|
||||
*/
|
||||
private function statusAction(string $templateCode, string $method, string $messageKey): JsonResponse
|
||||
{
|
||||
return $this->guard(function () use ($templateCode, $method, $messageKey) {
|
||||
$this->service->{$method}($templateCode);
|
||||
|
||||
return ResponseHelper::success("sirsoft-message_bizppurio::messages.template.{$messageKey}");
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* kapi 호출을 감싸 BizppurioApiException 을 422 응답으로 변환합니다.
|
||||
*
|
||||
* 카카오가 준 실패 사유(message)를 그대로 노출해 운영자가 반려/차단/상태오류 원인을
|
||||
* 즉시 파악하게 한다. errors 에 result_code 를 실어 프론트가 코드 분기 가능.
|
||||
*
|
||||
* @param callable(): JsonResponse $callback 실제 처리
|
||||
*/
|
||||
// guard() 는 GuardsKakaoRequests 트레이트로 이관(연동 컨트롤러와 공유).
|
||||
// kapi 호출을 감싸 BizppurioApiException 을 422 응답으로 변환하는 guard() 는
|
||||
// GuardsKakaoRequests 트레이트로 이관(연동 컨트롤러와 공유).
|
||||
// 카카오가 준 실패 사유(message)를 그대로 노출해 운영자가 조회 실패 원인을 즉시 파악한다.
|
||||
}
|
||||
-111
@@ -1,111 +0,0 @@
|
||||
<?php
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace Plugins\Sirsoft\MessageBizppurio\Http\Requests;
|
||||
|
||||
use Illuminate\Foundation\Http\FormRequest;
|
||||
use Illuminate\Validation\Rule;
|
||||
|
||||
/**
|
||||
* 알림톡 템플릿 등록 검증 Request (D12).
|
||||
*
|
||||
* 화면 입력만 검증한다. senderKey·templateMessageType 은 서비스가 채우므로 여기서
|
||||
* 검증하지 않는다(senderKey=환경설정, messageType=부가정보·버튼 유무 자동 계산).
|
||||
*
|
||||
* 유형별 조건부 필수(templateEmphasizeType, 1차 지원 3종):
|
||||
* - NONE(기본형): 추가 필드 없음
|
||||
* - IMAGE(이미지형): templateImageName·templateImageUrl 필수
|
||||
* - TEXT(강조표기형): templateTitle 필수(변수 가능) + templateSubtitle 필수(변수 불가)
|
||||
* ITEM_LIST(아이템리스트형)는 1차 제외 → 목록에서 배제(홈페이지 안내).
|
||||
*
|
||||
* 인증/권한은 라우트 permission 미들웨어(messaging.manage)가 담당하므로 authorize() 는 true 고정.
|
||||
*/
|
||||
class StoreAlimtalkTemplateRequest extends FormRequest
|
||||
{
|
||||
/**
|
||||
* 권한 검사는 라우트 미들웨어가 담당 — 항상 통과.
|
||||
*
|
||||
* @return bool
|
||||
*/
|
||||
public function authorize(): bool
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
/**
|
||||
* 알림톡 템플릿 등록 검증 규칙.
|
||||
*
|
||||
* @return array<string, mixed>
|
||||
*/
|
||||
public function rules(): array
|
||||
{
|
||||
return [
|
||||
// 공통 필수
|
||||
'templateName' => ['required', 'string', 'max:200'],
|
||||
'templateContent' => ['required', 'string', 'max:1300'],
|
||||
'categoryCode' => ['required', 'string', 'max:20'],
|
||||
'templateEmphasizeType' => ['required', Rule::in(['NONE', 'IMAGE', 'TEXT'])],
|
||||
|
||||
// 템플릿 코드(선택, 자동 생성 가능). 영문·숫자·언더바·하이픈, 최대 30자
|
||||
'templateCode' => ['nullable', 'string', 'max:30', 'regex:/^[A-Za-z0-9_-]+$/'],
|
||||
|
||||
// 강조표기형(TEXT) 조건부 필수 — 강조표기 문구(변수 가능) + 보조문구(변수 불가)
|
||||
'templateTitle' => ['required_if:templateEmphasizeType,TEXT', 'nullable', 'string', 'max:23'],
|
||||
'templateSubtitle' => ['required_if:templateEmphasizeType,TEXT', 'nullable', 'string', 'max:18'],
|
||||
|
||||
// 이미지형(IMAGE) 조건부 필수 — 이미지 파일명 + 링크
|
||||
'templateImageName' => ['required_if:templateEmphasizeType,IMAGE', 'nullable', 'string', 'max:255'],
|
||||
'templateImageUrl' => ['required_if:templateEmphasizeType,IMAGE', 'nullable', 'string', 'url', 'max:500'],
|
||||
|
||||
// 선택 항목(§6-4): 부가정보 · 미리보기 메시지 · 템플릿 보안
|
||||
'templatePreviewMessage' => ['nullable', 'string', 'max:40'],
|
||||
'templateExtra' => ['nullable', 'string', 'max:500'],
|
||||
'securityFlag' => ['nullable', 'boolean'],
|
||||
|
||||
// 등록 후 즉시 검수요청 여부([등록 후 검수요청] 버튼) — 서비스가 소비, kapi payload 제외
|
||||
'requestInspection' => ['nullable', 'boolean'],
|
||||
|
||||
// 버튼(최대 5)
|
||||
'buttons' => ['nullable', 'array', 'max:5'],
|
||||
'buttons.*.name' => ['required_with:buttons', 'string', 'max:20'],
|
||||
'buttons.*.linkType' => ['required_with:buttons', 'string', 'max:4'],
|
||||
'buttons.*.linkMo' => ['nullable', 'string', 'max:500'],
|
||||
'buttons.*.linkPc' => ['nullable', 'string', 'max:500'],
|
||||
'buttons.*.linkAnd' => ['nullable', 'string', 'max:500'],
|
||||
'buttons.*.linkIos' => ['nullable', 'string', 'max:500'],
|
||||
|
||||
// 바로연결(최대 10)
|
||||
'quickReplies' => ['nullable', 'array', 'max:10'],
|
||||
'quickReplies.*.name' => ['required_with:quickReplies', 'string', 'max:20'],
|
||||
'quickReplies.*.linkType' => ['required_with:quickReplies', 'string', 'max:4'],
|
||||
|
||||
// 대표 링크(선택) — PC/모바일 웹, 앱 스킴
|
||||
'templateRepresentLink' => ['nullable', 'array'],
|
||||
'templateRepresentLink.linkPc' => ['nullable', 'string', 'max:500'],
|
||||
'templateRepresentLink.linkMo' => ['nullable', 'string', 'max:500'],
|
||||
'templateRepresentLink.linkAnd' => ['nullable', 'string', 'max:500'],
|
||||
'templateRepresentLink.linkIos' => ['nullable', 'string', 'max:500'],
|
||||
];
|
||||
}
|
||||
|
||||
/**
|
||||
* 검증 속성 라벨(다국어).
|
||||
*
|
||||
* @return array<string, string>
|
||||
*/
|
||||
public function attributes(): array
|
||||
{
|
||||
return [
|
||||
'templateName' => __('sirsoft-message_bizppurio::messages.template.fields.name'),
|
||||
'templateContent' => __('sirsoft-message_bizppurio::messages.template.fields.content'),
|
||||
'categoryCode' => __('sirsoft-message_bizppurio::messages.template.fields.category'),
|
||||
'templateEmphasizeType' => __('sirsoft-message_bizppurio::messages.template.fields.emphasize_type'),
|
||||
'templateCode' => __('sirsoft-message_bizppurio::messages.template.fields.code'),
|
||||
'templateTitle' => __('sirsoft-message_bizppurio::messages.template.fields.title'),
|
||||
'templateSubtitle' => __('sirsoft-message_bizppurio::messages.template.fields.subtitle'),
|
||||
'templateImageName' => __('sirsoft-message_bizppurio::messages.template.fields.image_name'),
|
||||
'templateImageUrl' => __('sirsoft-message_bizppurio::messages.template.fields.image_url'),
|
||||
];
|
||||
}
|
||||
}
|
||||
-16
@@ -1,16 +0,0 @@
|
||||
<?php
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace Plugins\Sirsoft\MessageBizppurio\Http\Requests;
|
||||
|
||||
/**
|
||||
* 알림톡 템플릿 수정 검증 Request (D12).
|
||||
*
|
||||
* 등록과 검증 규칙이 동일하다(유형별 조건부 필수·선택항목 동일). 기존 템플릿 코드는 URL
|
||||
* path param({templateCode})으로 받으므로 body 에서 검증하지 않는다. 등록 Request 를
|
||||
* 상속해 규칙 중복을 피한다.
|
||||
*
|
||||
* 수정 가능 상태(대기 R + 검수 REG/REJ) 판정은 kapi 가 담당하므로 여기서 검증하지 않는다.
|
||||
*/
|
||||
class UpdateAlimtalkTemplateRequest extends StoreAlimtalkTemplateRequest {}
|
||||
-53
@@ -1,53 +0,0 @@
|
||||
<?php
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace Plugins\Sirsoft\MessageBizppurio\Http\Requests;
|
||||
|
||||
use Illuminate\Foundation\Http\FormRequest;
|
||||
|
||||
/**
|
||||
* 이미지형 알림톡 템플릿 이미지 업로드 검증 Request.
|
||||
*
|
||||
* 카카오 이미지형 템플릿 제한(jpg/png, 최대 500KB, 가로 500px 이상)에 맞춰 파일을 검증한다.
|
||||
* 실제 크기·비율 제한은 카카오 업로드 API 가 최종 판정하므로 여기서는 확장자·용량만 사전 차단한다.
|
||||
*
|
||||
* 인증/권한은 라우트 permission 미들웨어(messaging.manage)가 담당하므로 authorize() 는 true 고정.
|
||||
*/
|
||||
class UploadTemplateImageRequest extends FormRequest
|
||||
{
|
||||
/**
|
||||
* 권한 검사는 라우트 미들웨어가 담당 — 항상 통과.
|
||||
*
|
||||
* @return bool
|
||||
*/
|
||||
public function authorize(): bool
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
/**
|
||||
* 이미지 업로드 검증 규칙.
|
||||
*
|
||||
* @return array<string, mixed>
|
||||
*/
|
||||
public function rules(): array
|
||||
{
|
||||
return [
|
||||
// jpg/png, 최대 500KB (카카오 이미지형 제한)
|
||||
'image' => ['required', 'file', 'mimes:jpg,jpeg,png', 'max:500'],
|
||||
];
|
||||
}
|
||||
|
||||
/**
|
||||
* 검증 속성 라벨(다국어).
|
||||
*
|
||||
* @return array<string, string>
|
||||
*/
|
||||
public function attributes(): array
|
||||
{
|
||||
return [
|
||||
'image' => __('sirsoft-message_bizppurio::messages.template.fields.image'),
|
||||
];
|
||||
}
|
||||
}
|
||||
+14
-348
@@ -4,28 +4,25 @@ declare(strict_types=1);
|
||||
|
||||
namespace Plugins\Sirsoft\MessageBizppurio\Services;
|
||||
|
||||
use App\ActivityLog\Traits\ResolvesActivityLogType;
|
||||
use App\Services\PluginSettingsService;
|
||||
use Plugins\Sirsoft\MessageBizppurio\Exceptions\BizppurioApiException;
|
||||
|
||||
/**
|
||||
* 알림톡 템플릿 관리 서비스 (Phase 5).
|
||||
* 알림톡 템플릿 조회 서비스 (Phase 5).
|
||||
*
|
||||
* 카카오 관리 API(kapi.ppurio.com)를 BizppurioKakaoApiClient 로 위임하여 알림톡 템플릿의
|
||||
* 실시간 조회·등록·수정·삭제·검수(요청/취소)·상태변경(중지/해제/승인취소)을 수행한다.
|
||||
* 템플릿은 DB 에 저장하지 않고 매 요청 실시간으로 조회한다(계획서 §6-3).
|
||||
* 카카오 관리 API(kapi.ppurio.com)를 BizppurioKakaoApiClient 로 위임하여 알림톡 템플릿을
|
||||
* 실시간 조회한다(목록·상세·카테고리·발신프로필). 등록·수정·삭제·검수·상태변경은 비즈뿌리오
|
||||
* 콘솔로 위임하며, 이 화면은 목록·상태·내용 조회 + 알림 연결만 담당한다. 템플릿은 DB 에
|
||||
* 저장하지 않고 매 요청 실시간으로 조회한다(계획서 §6-3).
|
||||
*
|
||||
* 이 서비스는 다음 두 가지 도메인 로직을 담당한다.
|
||||
* - serviceStatus(REG/REQ/REJ/RDY/ACT/DMT/STP/BLK) → 상태 배지 + 상태별 가능 액션 매핑
|
||||
* - templateMessageType(BA/EX/AD/MI) 백엔드 자동 계산(부가정보·채널추가 버튼 유무로 결정)
|
||||
* 이 서비스는 serviceStatus(REG/REQ/REJ/RDY/ACT/DMT/STP/BLK)를 상태 배지로 매핑하는
|
||||
* 도메인 로직을 담당한다(RDY/ACT 만 알림 연결 가능 상태).
|
||||
*
|
||||
* 발신프로필 키(senderKey)는 환경설정(sender_key)에서 가져오며, 미설정 시 조회 자체가
|
||||
* 불가능하므로 화면은 readiness 로 사전 안내한다(§6-3).
|
||||
*/
|
||||
class AlimtalkTemplateService
|
||||
{
|
||||
use ResolvesActivityLogType;
|
||||
|
||||
/** 플러그인 식별자 (manifest 와 일치) */
|
||||
private const PLUGIN_IDENTIFIER = 'sirsoft-message_bizppurio';
|
||||
|
||||
@@ -51,22 +48,6 @@ class AlimtalkTemplateService
|
||||
'DMT' => ['label_key' => 'dormant', 'variant' => 'purple'],
|
||||
];
|
||||
|
||||
/**
|
||||
* serviceStatus → 상태별 가능 액션(정본 표, §6-3).
|
||||
*
|
||||
* @var array<string, array<int, string>>
|
||||
*/
|
||||
private const STATUS_ACTIONS = [
|
||||
'REG' => ['edit', 'delete', 'request'],
|
||||
'REQ' => ['cancel_request'],
|
||||
'REJ' => ['edit', 'delete'],
|
||||
'RDY' => ['stop', 'cancel_approval'],
|
||||
'ACT' => ['stop', 'cancel_approval'],
|
||||
'STP' => ['reuse'],
|
||||
'DMT' => ['release'],
|
||||
'BLK' => [],
|
||||
];
|
||||
|
||||
/**
|
||||
* @param BizppurioKakaoApiClient $kakao 카카오 관리 API 클라이언트
|
||||
* @param PluginSettingsService $pluginSettings 환경설정 조회(sender_key)
|
||||
@@ -166,330 +147,13 @@ class AlimtalkTemplateService
|
||||
}
|
||||
|
||||
/**
|
||||
* 이미지형 템플릿용 이미지를 카카오 서버에 업로드하고 등록 URL 을 반환합니다.
|
||||
*
|
||||
* 업로드 성공 시 카카오가 반환한 이미지 URL 을 `templateImageUrl` 로 사용한다.
|
||||
*
|
||||
* @param string $filePath 임시 업로드 파일 절대 경로
|
||||
* @param string $fileName 원본 파일명
|
||||
* @return string 카카오 서버에 등록된 이미지 URL
|
||||
*
|
||||
* @throws BizppurioApiException 업로드 실패 시
|
||||
*/
|
||||
public function uploadImage(string $filePath, string $fileName): string
|
||||
{
|
||||
$response = $this->kakao->uploadTemplateImage($filePath, $fileName);
|
||||
|
||||
$this->assertSuccess($response);
|
||||
|
||||
return (string) ($response['image'] ?? '');
|
||||
}
|
||||
|
||||
/**
|
||||
* 알림톡 템플릿을 신규 등록합니다.
|
||||
*
|
||||
* senderKey·templateMessageType 은 서비스가 채우며(FormRequest 는 화면 입력만 검증),
|
||||
* messageType 은 부가정보/채널추가 버튼 유무로 자동 계산한다.
|
||||
*
|
||||
* @param array<string, mixed> $data 검증된 템플릿 입력
|
||||
* @return array<string, mixed> 등록 결과(템플릿 상세)
|
||||
*
|
||||
* @throws BizppurioApiException 등록 실패 시
|
||||
*/
|
||||
public function create(array $data): array
|
||||
{
|
||||
$payload = $this->buildPayload($data);
|
||||
|
||||
$response = $this->kakao->request('/v3/kakao/template/add', $payload);
|
||||
|
||||
$this->assertSuccess($response);
|
||||
|
||||
$this->logActivity('sirsoft-message_bizppurio.alimtalk_template.create', [
|
||||
'description_key' => 'sirsoft-message_bizppurio::activity_log.description.alimtalk_template_create',
|
||||
'description_params' => ['template_name' => (string) ($data['templateName'] ?? '')],
|
||||
]);
|
||||
|
||||
return (array) ($response['data'] ?? []);
|
||||
}
|
||||
|
||||
/**
|
||||
* 알림톡 템플릿을 수정합니다. (대기(R) + 검수 REG/REJ 상태만 가능)
|
||||
*
|
||||
* @param string $templateCode 기존 템플릿 코드
|
||||
* @param array<string, mixed> $data 검증된 템플릿 입력
|
||||
* @return array<string, mixed> 수정 결과(템플릿 상세)
|
||||
*
|
||||
* @throws BizppurioApiException 수정 실패 시
|
||||
*/
|
||||
public function update(string $templateCode, array $data): array
|
||||
{
|
||||
$payload = array_merge($this->buildPayload($data), [
|
||||
'templateCode' => $templateCode,
|
||||
]);
|
||||
|
||||
$response = $this->kakao->request('/v3/kakao/template/update', $payload);
|
||||
|
||||
$this->assertSuccess($response);
|
||||
|
||||
$this->logActivity('sirsoft-message_bizppurio.alimtalk_template.update', [
|
||||
'description_key' => 'sirsoft-message_bizppurio::activity_log.description.alimtalk_template_update',
|
||||
'description_params' => ['template_code' => $templateCode],
|
||||
]);
|
||||
|
||||
return (array) ($response['data'] ?? []);
|
||||
}
|
||||
|
||||
/**
|
||||
* 알림톡 템플릿을 삭제합니다. (대기(R) + 검수 REG/REJ 상태만 가능)
|
||||
*
|
||||
* @param string $templateCode 템플릿 코드
|
||||
*
|
||||
* @throws BizppurioApiException 삭제 실패 시
|
||||
*/
|
||||
public function delete(string $templateCode): void
|
||||
{
|
||||
$this->simpleAction('/v3/kakao/template/delete', $templateCode, 'delete');
|
||||
}
|
||||
|
||||
/**
|
||||
* 검수를 요청합니다. (대기(R) + 검수 REG 상태만 가능)
|
||||
*
|
||||
* @param string $templateCode 템플릿 코드
|
||||
* @param string|null $comment 의견/문의(최대 500자)
|
||||
*
|
||||
* @throws BizppurioApiException 요청 실패 시
|
||||
*/
|
||||
public function requestInspection(string $templateCode, ?string $comment = null): void
|
||||
{
|
||||
$params = [
|
||||
'senderKey' => $this->senderKey(),
|
||||
'templateCode' => $templateCode,
|
||||
];
|
||||
|
||||
if ($comment !== null && $comment !== '') {
|
||||
$params['comment'] = $comment;
|
||||
}
|
||||
|
||||
$response = $this->kakao->request('/v3/kakao/template/request', $params);
|
||||
|
||||
$this->assertSuccess($response);
|
||||
|
||||
$this->logActivity('sirsoft-message_bizppurio.alimtalk_template.request', [
|
||||
'description_key' => 'sirsoft-message_bizppurio::activity_log.description.alimtalk_template_request',
|
||||
'description_params' => ['template_code' => $templateCode],
|
||||
]);
|
||||
}
|
||||
|
||||
/**
|
||||
* 검수 요청을 취소합니다. (검수 REQ 상태만 가능)
|
||||
*
|
||||
* @param string $templateCode 템플릿 코드
|
||||
*
|
||||
* @throws BizppurioApiException 취소 실패 시
|
||||
*/
|
||||
public function cancelRequest(string $templateCode): void
|
||||
{
|
||||
$this->simpleAction('/v3/kakao/template/cancel_request', $templateCode, 'cancel_request');
|
||||
}
|
||||
|
||||
/**
|
||||
* 승인된 템플릿을 중지합니다. (RDY/ACT 상태)
|
||||
*
|
||||
* @param string $templateCode 템플릿 코드
|
||||
*
|
||||
* @throws BizppurioApiException 중지 실패 시
|
||||
*/
|
||||
public function stop(string $templateCode): void
|
||||
{
|
||||
$this->simpleAction('/v3/kakao/template/stop', $templateCode, 'stop');
|
||||
}
|
||||
|
||||
/**
|
||||
* 중지된 템플릿을 정상으로 되돌립니다. (STP 상태)
|
||||
*
|
||||
* @param string $templateCode 템플릿 코드
|
||||
*
|
||||
* @throws BizppurioApiException 해제 실패 시
|
||||
*/
|
||||
public function reuse(string $templateCode): void
|
||||
{
|
||||
$this->simpleAction('/v3/kakao/template/reuse', $templateCode, 'reuse');
|
||||
}
|
||||
|
||||
/**
|
||||
* 승인을 취소합니다(재검수 요청 가능 상태로 복귀). (RDY/ACT 상태)
|
||||
*
|
||||
* @param string $templateCode 템플릿 코드
|
||||
*
|
||||
* @throws BizppurioApiException 취소 실패 시
|
||||
*/
|
||||
public function cancelApproval(string $templateCode): void
|
||||
{
|
||||
$this->simpleAction('/v3/kakao/template/cancel_approval', $templateCode, 'cancel_approval');
|
||||
}
|
||||
|
||||
/**
|
||||
* 휴면 템플릿을 해제합니다. (DMT 상태)
|
||||
*
|
||||
* @param string $templateCode 템플릿 코드
|
||||
*
|
||||
* @throws BizppurioApiException 해제 실패 시
|
||||
*/
|
||||
public function release(string $templateCode): void
|
||||
{
|
||||
$this->simpleAction('/v3/kakao/template/release', $templateCode, 'release');
|
||||
}
|
||||
|
||||
/**
|
||||
* senderKey + templateCode 만 필요한 단순 상태 변경 액션의 공통 처리.
|
||||
*
|
||||
* @param string $path kapi 엔드포인트 경로
|
||||
* @param string $templateCode 템플릿 코드
|
||||
* @param string $action 활동 로그 action 세그먼트
|
||||
*
|
||||
* @throws BizppurioApiException 요청 실패 시
|
||||
*/
|
||||
private function simpleAction(string $path, string $templateCode, string $action): void
|
||||
{
|
||||
$response = $this->kakao->request($path, [
|
||||
'senderKey' => $this->senderKey(),
|
||||
'templateCode' => $templateCode,
|
||||
]);
|
||||
|
||||
$this->assertSuccess($response);
|
||||
|
||||
$this->logActivity("sirsoft-message_bizppurio.alimtalk_template.{$action}", [
|
||||
'description_key' => "sirsoft-message_bizppurio::activity_log.description.alimtalk_template_{$action}",
|
||||
'description_params' => ['template_code' => $templateCode],
|
||||
]);
|
||||
}
|
||||
|
||||
/**
|
||||
* 화면 입력을 kapi 등록/수정 payload 로 조립합니다.
|
||||
*
|
||||
* - senderKey 는 환경설정에서 주입
|
||||
* - templateMessageType 은 부가정보·채널추가(AC) 버튼 유무로 자동 계산
|
||||
* - 빈 선택항목은 payload 에서 제외(kapi 유형별 필수 규칙 위반 방지)
|
||||
*
|
||||
* @param array<string, mixed> $data 검증된 입력
|
||||
* @return array<string, mixed> kapi payload (bizId/apiKey 제외 — 클라이언트가 주입)
|
||||
*/
|
||||
private function buildPayload(array $data): array
|
||||
{
|
||||
$payload = [
|
||||
'senderKey' => $this->senderKey(),
|
||||
'senderKeyType' => 'S',
|
||||
'templateName' => (string) $data['templateName'],
|
||||
'templateContent' => (string) $data['templateContent'],
|
||||
'categoryCode' => (string) $data['categoryCode'],
|
||||
'templateEmphasizeType' => (string) ($data['templateEmphasizeType'] ?? 'NONE'),
|
||||
];
|
||||
|
||||
if (! empty($data['templateCode'])) {
|
||||
$payload['templateCode'] = (string) $data['templateCode'];
|
||||
}
|
||||
|
||||
// 강조표기형(TEXT)
|
||||
if ($payload['templateEmphasizeType'] === 'TEXT') {
|
||||
$payload['templateTitle'] = (string) ($data['templateTitle'] ?? '');
|
||||
$payload['templateSubtitle'] = (string) ($data['templateSubtitle'] ?? '');
|
||||
}
|
||||
|
||||
// 이미지형(IMAGE)
|
||||
if ($payload['templateEmphasizeType'] === 'IMAGE') {
|
||||
$payload['templateImageName'] = (string) ($data['templateImageName'] ?? '');
|
||||
$payload['templateImageUrl'] = (string) ($data['templateImageUrl'] ?? '');
|
||||
}
|
||||
|
||||
// 선택항목(§6-4): 부가정보 · 미리보기 메시지
|
||||
foreach (['templatePreviewMessage', 'templateExtra'] as $optional) {
|
||||
if (! empty($data[$optional])) {
|
||||
$payload[$optional] = (string) $data[$optional];
|
||||
}
|
||||
}
|
||||
|
||||
if (array_key_exists('securityFlag', $data)) {
|
||||
$payload['securityFlag'] = (bool) $data['securityFlag'];
|
||||
}
|
||||
|
||||
// 선택항목: 버튼(최대 5) · 바로연결(최대 10)
|
||||
$buttons = $this->normalizeList($data['buttons'] ?? []);
|
||||
if ($buttons !== []) {
|
||||
$payload['buttons'] = $buttons;
|
||||
}
|
||||
|
||||
$quickReplies = $this->normalizeList($data['quickReplies'] ?? []);
|
||||
if ($quickReplies !== []) {
|
||||
$payload['quickReplies'] = $quickReplies;
|
||||
}
|
||||
|
||||
// 선택항목: 대표 링크(빈 링크 필드 제거 후 하나라도 있으면 포함)
|
||||
$representLink = array_filter(
|
||||
(array) ($data['templateRepresentLink'] ?? []),
|
||||
static fn ($v) => is_string($v) && $v !== '',
|
||||
);
|
||||
if ($representLink !== []) {
|
||||
$payload['templateRepresentLink'] = $representLink;
|
||||
}
|
||||
|
||||
$payload['templateMessageType'] = $this->resolveMessageType($payload);
|
||||
|
||||
return $payload;
|
||||
}
|
||||
|
||||
/**
|
||||
* templateMessageType 을 부가정보·채널추가(AC) 버튼 유무로 계산합니다.
|
||||
*
|
||||
* - 부가정보(templateExtra) 있음 → EX
|
||||
* - 채널추가(AC) 버튼 있음 → AD
|
||||
* - 둘 다 → MI
|
||||
* - 없음 → BA
|
||||
*
|
||||
* @param array<string, mixed> $payload 조립 중인 payload
|
||||
* @return string BA/EX/AD/MI
|
||||
*/
|
||||
private function resolveMessageType(array $payload): string
|
||||
{
|
||||
$hasExtra = ! empty($payload['templateExtra']);
|
||||
$hasAddChannel = false;
|
||||
|
||||
foreach ((array) ($payload['buttons'] ?? []) as $button) {
|
||||
if (($button['linkType'] ?? null) === 'AC') {
|
||||
$hasAddChannel = true;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
return match (true) {
|
||||
$hasExtra && $hasAddChannel => 'MI',
|
||||
$hasExtra => 'EX',
|
||||
$hasAddChannel => 'AD',
|
||||
default => 'BA',
|
||||
};
|
||||
}
|
||||
|
||||
/**
|
||||
* 버튼/바로연결 배열에서 빈 항목을 제거하고 정규화합니다.
|
||||
*
|
||||
* @param mixed $list 입력 배열
|
||||
* @return array<int, array<string, mixed>>
|
||||
*/
|
||||
private function normalizeList(mixed $list): array
|
||||
{
|
||||
if (! is_array($list)) {
|
||||
return [];
|
||||
}
|
||||
|
||||
return array_values(array_filter($list, static fn ($item) => is_array($item) && ! empty($item['name']) && ! empty($item['linkType'])));
|
||||
}
|
||||
|
||||
/**
|
||||
* 템플릿 행에 상태 배지·가능 액션을 부가합니다.
|
||||
* 템플릿 행에 상태 배지를 부가합니다.
|
||||
*
|
||||
* serviceStatus(목록) 또는 inspectionStatus/status(상세)에서 배지 기준 상태를 도출한다.
|
||||
* RDY/ACT(승인) 상태만 알림 연결 가능하며, 프론트가 배지로 이를 안내한다.
|
||||
*
|
||||
* @param array<string, mixed> $row kapi 템플릿 행
|
||||
* @return array<string, mixed> 배지·액션이 부가된 행
|
||||
* @return array<string, mixed> 배지가 부가된 행
|
||||
*/
|
||||
private function decorate(array $row): array
|
||||
{
|
||||
@@ -498,10 +162,12 @@ class AlimtalkTemplateService
|
||||
|
||||
$row['service_status'] = $status;
|
||||
$row['status_badge'] = [
|
||||
'label_key' => 'sirsoft-message_bizppurio::messages.template.status.'.$badge['label_key'],
|
||||
// 프론트 $t() 가 해석하는 프론트 lang 키 형식(templates.status.*)으로 준다.
|
||||
// 프론트(en/ko.json)에는 이 키만 존재하며, 백엔드 messages.php 네임스페이스
|
||||
// (::messages.template.status.*)는 프론트에 없어 원문이 그대로 노출된다.
|
||||
'label_key' => 'sirsoft-message_bizppurio.templates.status.'.$badge['label_key'],
|
||||
'variant' => $badge['variant'],
|
||||
];
|
||||
$row['available_actions'] = self::STATUS_ACTIONS[$status] ?? [];
|
||||
|
||||
return $row;
|
||||
}
|
||||
|
||||
@@ -88,45 +88,6 @@ class BizppurioKakaoApiClient
|
||||
]);
|
||||
}
|
||||
|
||||
/**
|
||||
* 알림톡 이미지형 템플릿용 이미지를 업로드합니다. (`/v3/kakao/image/alimtalk/template`)
|
||||
*
|
||||
* multipart/form-data 로 이미지 파일을 전송하고, 성공 시 카카오 서버에 등록된 이미지
|
||||
* URL(`image`)을 반환받는다. 이미지 제한: jpg/png, 최대 500KB, 가로 500px 이상.
|
||||
*
|
||||
* @param string $filePath 업로드할 이미지 파일의 절대 경로
|
||||
* @param string $fileName 원본 파일명
|
||||
* @return array<string, mixed> 응답 배열 (code/message/image)
|
||||
*
|
||||
* @throws BizppurioApiException 자격증명 미설정·HTTP 실패·응답 파싱 실패 시
|
||||
*/
|
||||
public function uploadTemplateImage(string $filePath, string $fileName): array
|
||||
{
|
||||
[$bizId, $apiKey] = $this->credentials();
|
||||
|
||||
$response = $this->http()
|
||||
->attach('image', file_get_contents($filePath), $fileName)
|
||||
->post(self::BASE_URL.'/v3/kakao/image/alimtalk/template', [
|
||||
'bizId' => $bizId,
|
||||
'apiKey' => $apiKey,
|
||||
]);
|
||||
|
||||
if ($response->failed()) {
|
||||
throw $this->failureException($response);
|
||||
}
|
||||
|
||||
$result = $response->json();
|
||||
|
||||
if (! is_array($result)) {
|
||||
throw new BizppurioApiException(
|
||||
__('sirsoft-message_bizppurio::messages.error.invalid_response'),
|
||||
httpStatus: $response->status(),
|
||||
);
|
||||
}
|
||||
|
||||
return $result;
|
||||
}
|
||||
|
||||
/**
|
||||
* 카카오 관리 API 의 임의 엔드포인트를 호출합니다.
|
||||
*
|
||||
|
||||
@@ -2,6 +2,7 @@
|
||||
|
||||
use App\Http\Middleware\EnforceIdentityPolicy;
|
||||
use App\Http\Middleware\RefreshTokenExpiration;
|
||||
use App\Services\PluginSettingsService;
|
||||
use Illuminate\Support\Facades\Route;
|
||||
use Plugins\Sirsoft\MessageBizppurio\Controllers\Admin\AlimtalkTemplateController;
|
||||
use Plugins\Sirsoft\MessageBizppurio\Controllers\Admin\DispatchResultController;
|
||||
@@ -49,40 +50,45 @@ Route::prefix('admin')->name('admin.')->middleware(['auth:sanctum', 'admin'])->g
|
||||
})->middleware('permission:admin,core.plugins.read')
|
||||
->name('report.url');
|
||||
|
||||
// 알림톡 템플릿 화면 준비 상태(값 유무) 조회.
|
||||
//
|
||||
// 카카오 관리에 필요한 자격증명(api_key·sender_key)은 sensitive:true 라 코어 설정 조회
|
||||
// 응답에서 제거된다(보안). 따라서 프론트가 설정 조회 값으로 "설정됨" 을 판정할 수 없어,
|
||||
// 값 자체는 노출하지 않고 저장 여부(boolean)만 내려준다. 알림톡 탭 readiness 배너가 소비.
|
||||
Route::get('/templates-readiness', function () {
|
||||
$settings = app(PluginSettingsService::class)
|
||||
->get('sirsoft-message_bizppurio') ?? [];
|
||||
|
||||
$filled = static fn (string $key): bool => trim((string) ($settings[$key] ?? '')) !== '';
|
||||
|
||||
return response()->json([
|
||||
'success' => true,
|
||||
'data' => [
|
||||
'api_key_set' => $filled('api_key'),
|
||||
'sender_key_set' => $filled('sender_key'),
|
||||
'ready' => $filled('api_key') && $filled('sender_key'),
|
||||
],
|
||||
]);
|
||||
})->middleware('permission:admin,sirsoft-message_bizppurio.messaging.view')
|
||||
->name('templates.readiness');
|
||||
|
||||
/*
|
||||
|----------------------------------------------------------------------
|
||||
| 알림톡 템플릿 관리 (Phase 5) — 카카오 관리 API(kapi) 실시간 위임
|
||||
| 알림톡 템플릿 조회 (Phase 5) — 카카오 관리 API(kapi) 실시간 위임
|
||||
|----------------------------------------------------------------------
|
||||
|
|
||||
| 조회(list/detail/categories/profiles) = messaging.view
|
||||
| 변경(store/update/destroy/검수/상태변경) = messaging.manage
|
||||
| 템플릿은 DB 저장 없이 매 요청 실시간 조회. 설정 페이지 알림톡 템플릿 탭이 소비.
|
||||
| 조회 전용(list/detail/categories/profiles) = messaging.view.
|
||||
| 템플릿 등록·수정·삭제·검수·상태변경은 비즈뿌리오 콘솔로 위임한다(이 화면은 목록·상태·
|
||||
| 내용 조회 + 알림 연결만 담당). 템플릿은 DB 저장 없이 매 요청 실시간 조회하며, 설정
|
||||
| 페이지 알림톡 템플릿 탭이 소비한다.
|
||||
*/
|
||||
Route::prefix('alimtalk-templates')->name('alimtalk-templates.')->group(function () {
|
||||
// 조회 (view)
|
||||
Route::middleware('permission:admin,sirsoft-message_bizppurio.messaging.view')->group(function () {
|
||||
Route::get('/', [AlimtalkTemplateController::class, 'index'])->name('index');
|
||||
Route::get('/categories', [AlimtalkTemplateController::class, 'categories'])->name('categories');
|
||||
Route::get('/profiles', [AlimtalkTemplateController::class, 'profiles'])->name('profiles');
|
||||
Route::get('/{templateCode}', [AlimtalkTemplateController::class, 'show'])->name('show');
|
||||
});
|
||||
|
||||
// 변경 (manage)
|
||||
Route::middleware('permission:admin,sirsoft-message_bizppurio.messaging.manage')->group(function () {
|
||||
Route::post('/', [AlimtalkTemplateController::class, 'store'])->name('store');
|
||||
// 이미지형 템플릿 이미지 업로드 (정적 경로 — {templateCode} 보다 먼저 선언)
|
||||
Route::post('/image', [AlimtalkTemplateController::class, 'uploadImage'])->name('image');
|
||||
Route::put('/{templateCode}', [AlimtalkTemplateController::class, 'update'])->name('update');
|
||||
Route::delete('/{templateCode}', [AlimtalkTemplateController::class, 'destroy'])->name('destroy');
|
||||
|
||||
// 검수·상태 변경
|
||||
Route::post('/{templateCode}/request', [AlimtalkTemplateController::class, 'requestInspection'])->name('request');
|
||||
Route::post('/{templateCode}/cancel-request', [AlimtalkTemplateController::class, 'cancelRequest'])->name('cancel-request');
|
||||
Route::post('/{templateCode}/stop', [AlimtalkTemplateController::class, 'stop'])->name('stop');
|
||||
Route::post('/{templateCode}/reuse', [AlimtalkTemplateController::class, 'reuse'])->name('reuse');
|
||||
Route::post('/{templateCode}/cancel-approval', [AlimtalkTemplateController::class, 'cancelApproval'])->name('cancel-approval');
|
||||
Route::post('/{templateCode}/release', [AlimtalkTemplateController::class, 'release'])->name('release');
|
||||
});
|
||||
});
|
||||
|
||||
/*
|
||||
|
||||
+49
-152
@@ -5,7 +5,6 @@ namespace Plugins\Sirsoft\MessageBizppurio\Tests\Feature\AlimtalkTemplate;
|
||||
use App\Models\Permission;
|
||||
use App\Models\Role;
|
||||
use App\Models\User;
|
||||
use Illuminate\Http\UploadedFile;
|
||||
use Mockery;
|
||||
use Mockery\MockInterface;
|
||||
use Plugins\Sirsoft\MessageBizppurio\Exceptions\BizppurioApiException;
|
||||
@@ -13,12 +12,12 @@ use Plugins\Sirsoft\MessageBizppurio\Services\AlimtalkTemplateService;
|
||||
use Plugins\Sirsoft\MessageBizppurio\Tests\PluginTestCase;
|
||||
|
||||
/**
|
||||
* 알림톡 템플릿 관리 컨트롤러 Feature 테스트.
|
||||
* 알림톡 템플릿 조회 컨트롤러 Feature 테스트 (조회 전용).
|
||||
*
|
||||
* 라우트 → 컨트롤러 → 서비스 경계를 검증한다. kapi 실제 호출 로직은
|
||||
* AlimtalkTemplateServiceTest 가 검증하므로, 여기서는 AlimtalkTemplateService 를
|
||||
* 컨테이너에 mock 으로 바인딩해 컨트롤러의 권한 경계(view/manage)·유형별 검증(FormRequest)·
|
||||
* 응답 봉투·kapi 실패(예외)의 422 전파를 격리 검증한다.
|
||||
* 컨테이너에 mock 으로 바인딩해 조회 권한 경계(view)·응답 봉투·kapi 실패(예외)의 422
|
||||
* 전파·등록 라우트 제거(405)를 격리 검증한다.
|
||||
*
|
||||
* @since 1.0.0
|
||||
*/
|
||||
@@ -120,12 +119,48 @@ class AlimtalkTemplateControllerTest extends PluginTestCase
|
||||
}
|
||||
|
||||
/**
|
||||
* @scenario auth=view_only,action=store
|
||||
* @scenario auth=none_of_required,action=index
|
||||
*
|
||||
* @effects store_requires_manage_permission_returns_403
|
||||
* @effects list_requires_view_permission_returns_403
|
||||
*/
|
||||
public function test_view권한만으로_등록시_403(): void
|
||||
public function test_view권한_없으면_목록조회_403(): void
|
||||
{
|
||||
$response = $this->withHeaders($this->authHeaders(['sirsoft-message_bizppurio.messaging.other']))
|
||||
->getJson(self::BASE);
|
||||
|
||||
$response->assertStatus(403);
|
||||
}
|
||||
|
||||
/**
|
||||
* @scenario auth=view,service=ok
|
||||
*
|
||||
* @effects show_returns_template_detail_with_status_badge
|
||||
*/
|
||||
public function test_view권한으로_상세를_조회한다(): void
|
||||
{
|
||||
$this->mockService()->shouldReceive('detail')->once()->with('TW_1')->andReturn([
|
||||
'templateCode' => 'TW_1',
|
||||
'templateName' => '주문완료',
|
||||
'status_badge' => ['variant' => 'green'],
|
||||
]);
|
||||
|
||||
$response = $this->withHeaders($this->authHeaders(['sirsoft-message_bizppurio.messaging.view']))
|
||||
->getJson(self::BASE.'/TW_1');
|
||||
|
||||
$response->assertStatus(200);
|
||||
$response->assertJsonPath('data.template.templateCode', 'TW_1');
|
||||
$response->assertJsonPath('data.template.status_badge.variant', 'green');
|
||||
}
|
||||
|
||||
/**
|
||||
* @scenario auth=view,action=store
|
||||
*
|
||||
* @effects store_route_removed_returns_405_read_only
|
||||
*/
|
||||
public function test_등록_라우트는_제거되어_조회전용이다(): void
|
||||
{
|
||||
// 조회 전용 전환으로 등록(POST)·상태변경 라우트를 제거했다. manage 미들웨어 블록이
|
||||
// 사라졌으므로 POST 는 라우트 미매칭(405)이 되어야 한다(등록은 비즈뿌리오 콘솔).
|
||||
$response = $this->withHeaders($this->authHeaders(['sirsoft-message_bizppurio.messaging.view']))
|
||||
->postJson(self::BASE, [
|
||||
'templateName' => 'T',
|
||||
@@ -134,163 +169,25 @@ class AlimtalkTemplateControllerTest extends PluginTestCase
|
||||
'templateEmphasizeType' => 'NONE',
|
||||
]);
|
||||
|
||||
$response->assertStatus(403);
|
||||
$response->assertStatus(405);
|
||||
}
|
||||
|
||||
/**
|
||||
* @scenario auth=manage,service=ok,type=NONE
|
||||
*
|
||||
* @effects store_creates_template_via_service
|
||||
*/
|
||||
public function test_manage권한으로_기본형_등록에_성공한다(): void
|
||||
{
|
||||
$this->mockService()->shouldReceive('create')->once()->andReturn(['templateCode' => 'NEW']);
|
||||
|
||||
$response = $this->withHeaders($this->authHeaders(['sirsoft-message_bizppurio.messaging.manage']))
|
||||
->postJson(self::BASE, [
|
||||
'templateName' => '가입환영',
|
||||
'templateContent' => '#{name}님 환영합니다',
|
||||
'categoryCode' => '001001',
|
||||
'templateEmphasizeType' => 'NONE',
|
||||
]);
|
||||
|
||||
$response->assertStatus(200);
|
||||
$response->assertJsonPath('data.template.templateCode', 'NEW');
|
||||
}
|
||||
|
||||
/**
|
||||
* @scenario auth=manage,service=ok,requestInspection=true
|
||||
*
|
||||
* @effects store_with_request_inspection_flag_registers_then_requests_inspection
|
||||
*/
|
||||
public function test_등록후검수요청_플래그로_등록과_검수요청을_이어서_수행한다(): void
|
||||
{
|
||||
$service = $this->mockService();
|
||||
$service->shouldReceive('create')->once()->andReturn(['templateCode' => 'TW_NEW']);
|
||||
$service->shouldReceive('requestInspection')->once()->with('TW_NEW');
|
||||
|
||||
$response = $this->withHeaders($this->authHeaders(['sirsoft-message_bizppurio.messaging.manage']))
|
||||
->postJson(self::BASE, [
|
||||
'templateName' => '가입환영',
|
||||
'templateContent' => '#{name}님 환영합니다',
|
||||
'categoryCode' => '001001',
|
||||
'templateEmphasizeType' => 'NONE',
|
||||
'requestInspection' => true,
|
||||
]);
|
||||
|
||||
$response->assertStatus(200);
|
||||
$response->assertJsonPath('data.template.templateCode', 'TW_NEW');
|
||||
}
|
||||
|
||||
/**
|
||||
* @scenario auth=manage,type=TEXT,missing=title
|
||||
*
|
||||
* @effects store_validates_text_type_requires_title_returns_422
|
||||
*/
|
||||
public function test_강조표기형에_강조문구_누락시_422(): void
|
||||
{
|
||||
$response = $this->withHeaders($this->authHeaders(['sirsoft-message_bizppurio.messaging.manage']))
|
||||
->postJson(self::BASE, [
|
||||
'templateName' => 'T',
|
||||
'templateContent' => '본문',
|
||||
'categoryCode' => '001',
|
||||
'templateEmphasizeType' => 'TEXT',
|
||||
]);
|
||||
|
||||
$response->assertStatus(422);
|
||||
$response->assertJsonValidationErrors(['templateTitle', 'templateSubtitle']);
|
||||
}
|
||||
|
||||
/**
|
||||
* @scenario auth=manage,type=IMAGE,missing=image
|
||||
*
|
||||
* @effects store_validates_image_type_requires_image_fields_returns_422
|
||||
*/
|
||||
public function test_이미지형에_이미지필드_누락시_422(): void
|
||||
{
|
||||
$response = $this->withHeaders($this->authHeaders(['sirsoft-message_bizppurio.messaging.manage']))
|
||||
->postJson(self::BASE, [
|
||||
'templateName' => 'T',
|
||||
'templateContent' => '본문',
|
||||
'categoryCode' => '001',
|
||||
'templateEmphasizeType' => 'IMAGE',
|
||||
]);
|
||||
|
||||
$response->assertStatus(422);
|
||||
$response->assertJsonValidationErrors(['templateImageName', 'templateImageUrl']);
|
||||
}
|
||||
|
||||
/**
|
||||
* @scenario auth=manage,service=throws
|
||||
* @scenario auth=view,service=throws
|
||||
*
|
||||
* @effects kapi_failure_is_surfaced_as_422_with_result_code
|
||||
*/
|
||||
public function test_kapi_실패는_422로_전파된다(): void
|
||||
{
|
||||
$this->mockService()->shouldReceive('create')->once()
|
||||
->andThrow(new BizppurioApiException('템플릿 불일치', resultCode: '7204'));
|
||||
$this->mockService()->shouldReceive('list')->once()
|
||||
->andThrow(new BizppurioApiException('발신프로필을 찾을 수 없습니다.', resultCode: '7204'));
|
||||
|
||||
$response = $this->withHeaders($this->authHeaders(['sirsoft-message_bizppurio.messaging.manage']))
|
||||
->postJson(self::BASE, [
|
||||
'templateName' => 'T',
|
||||
'templateContent' => '본문',
|
||||
'categoryCode' => '001',
|
||||
'templateEmphasizeType' => 'NONE',
|
||||
]);
|
||||
$response = $this->withHeaders($this->authHeaders(['sirsoft-message_bizppurio.messaging.view']))
|
||||
->getJson(self::BASE);
|
||||
|
||||
$response->assertStatus(422);
|
||||
$response->assertJsonPath('errors.result_code', '7204');
|
||||
$response->assertJsonPath('errors.kakao_message', '템플릿 불일치');
|
||||
}
|
||||
|
||||
/**
|
||||
* @scenario auth=manage,action=stop
|
||||
*
|
||||
* @effects stop_action_delegates_to_service_stop
|
||||
*/
|
||||
public function test_중지_상태변경에_성공한다(): void
|
||||
{
|
||||
$this->mockService()->shouldReceive('stop')->once()->with('TW_1');
|
||||
|
||||
$response = $this->withHeaders($this->authHeaders(['sirsoft-message_bizppurio.messaging.manage']))
|
||||
->postJson(self::BASE.'/TW_1/stop');
|
||||
|
||||
$response->assertStatus(200);
|
||||
}
|
||||
|
||||
/**
|
||||
* @scenario auth=manage,action=upload_image
|
||||
*
|
||||
* @effects image_upload_returns_kakao_url
|
||||
*/
|
||||
public function test_이미지_업로드가_카카오_ur_l을_반환한다(): void
|
||||
{
|
||||
$this->mockService()->shouldReceive('uploadImage')->once()
|
||||
->andReturn('https://mud-kage.kakao.com/dn/abc/banner.jpg');
|
||||
|
||||
$response = $this->withHeaders($this->authHeaders(['sirsoft-message_bizppurio.messaging.manage']))
|
||||
->post(self::BASE.'/image', [
|
||||
'image' => UploadedFile::fake()->image('banner.jpg', 600, 400),
|
||||
], ['Accept' => 'application/json']);
|
||||
|
||||
$response->assertStatus(200);
|
||||
$response->assertJsonPath('data.image_url', 'https://mud-kage.kakao.com/dn/abc/banner.jpg');
|
||||
}
|
||||
|
||||
/**
|
||||
* @scenario auth=manage,action=upload_image,invalid=type
|
||||
*
|
||||
* @effects image_upload_rejects_non_image_returns_422
|
||||
*/
|
||||
public function test_이미지가_아닌_파일_업로드는_422다(): void
|
||||
{
|
||||
$response = $this->withHeaders($this->authHeaders(['sirsoft-message_bizppurio.messaging.manage']))
|
||||
->post(self::BASE.'/image', [
|
||||
'image' => UploadedFile::fake()->create('doc.pdf', 100, 'application/pdf'),
|
||||
], ['Accept' => 'application/json']);
|
||||
|
||||
$response->assertStatus(422);
|
||||
$response->assertJsonValidationErrors(['image']);
|
||||
$response->assertJsonPath('errors.kakao_message', '발신프로필을 찾을 수 없습니다.');
|
||||
}
|
||||
|
||||
protected function tearDown(): void
|
||||
|
||||
+12
-155
@@ -11,7 +11,7 @@ use Plugins\Sirsoft\MessageBizppurio\Services\BizppurioKakaoApiClient;
|
||||
use Plugins\Sirsoft\MessageBizppurio\Tests\PluginTestCase;
|
||||
|
||||
/**
|
||||
* AlimtalkTemplateService — kapi 위임 + 상태 배지/액션 매핑 + messageType 자동계산 검증.
|
||||
* AlimtalkTemplateService — kapi 조회 위임 + 상태 배지 매핑 검증 (조회 전용).
|
||||
*/
|
||||
class AlimtalkTemplateServiceTest extends PluginTestCase
|
||||
{
|
||||
@@ -30,7 +30,7 @@ class AlimtalkTemplateServiceTest extends PluginTestCase
|
||||
return new AlimtalkTemplateService($kakao, $pluginSettings);
|
||||
}
|
||||
|
||||
public function test_목록은_상태_배지와_가능액션을_부가한다(): void
|
||||
public function test_목록은_상태_배지를_부가한다(): void
|
||||
{
|
||||
Http::fake([
|
||||
'kapi.ppurio.com/*' => Http::response([
|
||||
@@ -50,7 +50,15 @@ class AlimtalkTemplateServiceTest extends PluginTestCase
|
||||
$tpl = $result['templates'][0];
|
||||
$this->assertSame('ACT', $tpl['service_status']);
|
||||
$this->assertSame('green', $tpl['status_badge']['variant']);
|
||||
$this->assertEqualsCanonicalizing(['stop', 'cancel_approval'], $tpl['available_actions']);
|
||||
// 회귀 방지: 배지 label_key 는 프론트 lang 키 형식(templates.status.*)이어야 한다.
|
||||
// 백엔드 messages.php 네임스페이스(::messages.template.status.*)로 주면 프론트 $t() 가
|
||||
// 해석하지 못해 라벨 원문이 목록/상세에 그대로 노출된다(PO 브라우저 검수로 발견된 회귀).
|
||||
$this->assertSame(
|
||||
'sirsoft-message_bizppurio.templates.status.sendable',
|
||||
$tpl['status_badge']['label_key'],
|
||||
);
|
||||
// 조회 전용 — 상태별 가능 액션(available_actions)은 더 이상 부가하지 않는다.
|
||||
$this->assertArrayNotHasKey('available_actions', $tpl);
|
||||
$this->assertSame(1, $result['pagination']['total']);
|
||||
}
|
||||
|
||||
@@ -92,152 +100,6 @@ class AlimtalkTemplateServiceTest extends PluginTestCase
|
||||
$this->assertSame('green', $detail['status_badge']['variant']);
|
||||
}
|
||||
|
||||
public function test_등록은_부가정보시_message_type_e_x로_계산한다(): void
|
||||
{
|
||||
Http::fake(['kapi.ppurio.com/*' => Http::response(['code' => '200', 'data' => ['templateCode' => 'NEW']], 200)]);
|
||||
|
||||
$this->service()->create([
|
||||
'templateName' => 'T',
|
||||
'templateContent' => '본문',
|
||||
'categoryCode' => '001',
|
||||
'templateEmphasizeType' => 'NONE',
|
||||
'templateExtra' => '부가정보',
|
||||
]);
|
||||
|
||||
Http::assertSent(function ($request) {
|
||||
return str_contains($request->url(), '/v3/kakao/template/add')
|
||||
&& $request['templateMessageType'] === 'EX'
|
||||
&& $request['templateExtra'] === '부가정보'
|
||||
&& $request['senderKey'] === 'SK_40';
|
||||
});
|
||||
}
|
||||
|
||||
public function test_등록은_채널추가버튼시_message_type_a_d로_계산한다(): void
|
||||
{
|
||||
Http::fake(['kapi.ppurio.com/*' => Http::response(['code' => '200', 'data' => []], 200)]);
|
||||
|
||||
$this->service()->create([
|
||||
'templateName' => 'T',
|
||||
'templateContent' => '본문',
|
||||
'categoryCode' => '001',
|
||||
'templateEmphasizeType' => 'NONE',
|
||||
'buttons' => [['name' => '채널추가', 'linkType' => 'AC']],
|
||||
]);
|
||||
|
||||
Http::assertSent(fn ($request) => $request['templateMessageType'] === 'AD');
|
||||
}
|
||||
|
||||
public function test_등록은_부가정보와_채널추가_둘다면_m_i로_계산한다(): void
|
||||
{
|
||||
Http::fake(['kapi.ppurio.com/*' => Http::response(['code' => '200', 'data' => []], 200)]);
|
||||
|
||||
$this->service()->create([
|
||||
'templateName' => 'T',
|
||||
'templateContent' => '본문',
|
||||
'categoryCode' => '001',
|
||||
'templateEmphasizeType' => 'NONE',
|
||||
'templateExtra' => '부가',
|
||||
'buttons' => [['name' => '채널추가', 'linkType' => 'AC']],
|
||||
]);
|
||||
|
||||
Http::assertSent(fn ($request) => $request['templateMessageType'] === 'MI');
|
||||
}
|
||||
|
||||
public function test_등록은_옵션없으면_b_a로_계산한다(): void
|
||||
{
|
||||
Http::fake(['kapi.ppurio.com/*' => Http::response(['code' => '200', 'data' => []], 200)]);
|
||||
|
||||
$this->service()->create([
|
||||
'templateName' => 'T',
|
||||
'templateContent' => '본문',
|
||||
'categoryCode' => '001',
|
||||
'templateEmphasizeType' => 'NONE',
|
||||
]);
|
||||
|
||||
Http::assertSent(fn ($request) => $request['templateMessageType'] === 'BA');
|
||||
}
|
||||
|
||||
public function test_강조표기형은_title_subtitle을_전송한다(): void
|
||||
{
|
||||
Http::fake(['kapi.ppurio.com/*' => Http::response(['code' => '200', 'data' => []], 200)]);
|
||||
|
||||
$this->service()->create([
|
||||
'templateName' => 'T',
|
||||
'templateContent' => '본문',
|
||||
'categoryCode' => '001',
|
||||
'templateEmphasizeType' => 'TEXT',
|
||||
'templateTitle' => '강조',
|
||||
'templateSubtitle' => '보조',
|
||||
]);
|
||||
|
||||
Http::assertSent(fn ($request) => $request['templateEmphasizeType'] === 'TEXT'
|
||||
&& $request['templateTitle'] === '강조'
|
||||
&& $request['templateSubtitle'] === '보조');
|
||||
}
|
||||
|
||||
public function test_버튼과_바로연결과_대표링크를_전송한다(): void
|
||||
{
|
||||
Http::fake(['kapi.ppurio.com/*' => Http::response(['code' => '200', 'data' => []], 200)]);
|
||||
|
||||
$this->service()->create([
|
||||
'templateName' => 'T',
|
||||
'templateContent' => '본문',
|
||||
'categoryCode' => '001',
|
||||
'templateEmphasizeType' => 'NONE',
|
||||
'buttons' => [['name' => '웹링크', 'linkType' => 'WL', 'linkMo' => 'https://m.example.com']],
|
||||
'quickReplies' => [['name' => '바로가기', 'linkType' => 'WL']],
|
||||
'templateRepresentLink' => ['linkPc' => 'https://example.com', 'linkMo' => ''],
|
||||
]);
|
||||
|
||||
Http::assertSent(function ($request) {
|
||||
return $request['buttons'][0]['linkType'] === 'WL'
|
||||
&& $request['quickReplies'][0]['name'] === '바로가기'
|
||||
// 빈 링크 필드(linkMo='')는 제거되고 linkPc 만 포함
|
||||
&& $request['templateRepresentLink'] === ['linkPc' => 'https://example.com'];
|
||||
});
|
||||
}
|
||||
|
||||
public function test_이미지_업로드는_카카오_이미지_ur_l을_반환한다(): void
|
||||
{
|
||||
Http::fake([
|
||||
'kapi.ppurio.com/v3/kakao/image/*' => Http::response([
|
||||
'code' => '200',
|
||||
'image' => 'https://mud-kage.kakao.com/dn/abc/image.jpg',
|
||||
], 200),
|
||||
]);
|
||||
|
||||
$path = tempnam(sys_get_temp_dir(), 'img');
|
||||
file_put_contents($path, 'fake-image-bytes');
|
||||
|
||||
$url = $this->service()->uploadImage($path, 'banner.jpg');
|
||||
|
||||
@unlink($path);
|
||||
|
||||
$this->assertSame('https://mud-kage.kakao.com/dn/abc/image.jpg', $url);
|
||||
Http::assertSent(fn ($request) => str_contains($request->url(), '/v3/kakao/image/alimtalk/template'));
|
||||
}
|
||||
|
||||
public function test_검수요청은_템플릿코드와_comment를_전송한다(): void
|
||||
{
|
||||
Http::fake(['kapi.ppurio.com/*' => Http::response(['code' => '200'], 200)]);
|
||||
|
||||
$this->service()->requestInspection('TW_1', '검토 부탁드립니다');
|
||||
|
||||
Http::assertSent(fn ($request) => str_contains($request->url(), '/v3/kakao/template/request')
|
||||
&& $request['templateCode'] === 'TW_1'
|
||||
&& $request['comment'] === '검토 부탁드립니다');
|
||||
}
|
||||
|
||||
public function test_중지_상태변경은_stop_엔드포인트를_호출한다(): void
|
||||
{
|
||||
Http::fake(['kapi.ppurio.com/*' => Http::response(['code' => '200'], 200)]);
|
||||
|
||||
$this->service()->stop('TW_1');
|
||||
|
||||
Http::assertSent(fn ($request) => str_contains($request->url(), '/v3/kakao/template/stop')
|
||||
&& $request['templateCode'] === 'TW_1');
|
||||
}
|
||||
|
||||
public function test_발신프로필_키_미설정시_예외(): void
|
||||
{
|
||||
$this->expectException(BizppurioApiException::class);
|
||||
@@ -253,12 +115,7 @@ class AlimtalkTemplateServiceTest extends PluginTestCase
|
||||
]);
|
||||
|
||||
try {
|
||||
$this->service()->create([
|
||||
'templateName' => 'T',
|
||||
'templateContent' => '본문',
|
||||
'categoryCode' => '001',
|
||||
'templateEmphasizeType' => 'NONE',
|
||||
]);
|
||||
$this->service()->list();
|
||||
$this->fail('예외가 발생해야 한다.');
|
||||
} catch (BizppurioApiException $e) {
|
||||
$this->assertSame('7204', $e->getResultCode());
|
||||
|
||||
-27
@@ -89,33 +89,6 @@ class BizppurioKakaoApiClientTest extends PluginTestCase
|
||||
&& $request['templateName'] === 'T');
|
||||
}
|
||||
|
||||
public function test_이미지_업로드는_multipart로_전송하고_ur_l을_받는다(): void
|
||||
{
|
||||
Http::fake([
|
||||
'kapi.ppurio.com/v3/kakao/image/*' => Http::response([
|
||||
'code' => '200',
|
||||
'image' => 'https://mud-kage.kakao.com/dn/xyz/img.jpg',
|
||||
], 200),
|
||||
]);
|
||||
|
||||
$path = tempnam(sys_get_temp_dir(), 'img');
|
||||
file_put_contents($path, 'bytes');
|
||||
|
||||
$result = $this->client()->uploadTemplateImage($path, 'banner.jpg');
|
||||
|
||||
@unlink($path);
|
||||
|
||||
$this->assertSame('https://mud-kage.kakao.com/dn/xyz/img.jpg', $result['image']);
|
||||
Http::assertSent(function ($request) {
|
||||
// multipart 요청은 배열 접근($request['key'])이 불가하므로 URL·메서드·multipart 여부로 검증
|
||||
$bodyData = collect($request->data())->keyBy('name');
|
||||
|
||||
return str_contains($request->url(), '/v3/kakao/image/alimtalk/template')
|
||||
&& $request->isMultipart()
|
||||
&& ($bodyData['bizId']['contents'] ?? null) === 'biz01';
|
||||
});
|
||||
}
|
||||
|
||||
public function test_자격증명_미설정시_예외(): void
|
||||
{
|
||||
$client = new BizppurioKakaoApiClient(
|
||||
|
||||
+49
-64
@@ -1,96 +1,81 @@
|
||||
# audit:allow test-scenario-coverage reason: |
|
||||
# 알림톡 템플릿 관리 화면은 설정 페이지(plugin_settings.json)의 탭으로 배치되며(⚑ 결정 2·3,
|
||||
# 독립 페이지·메뉴 없음), kapi 실시간 위임이라 DB 저장이 없다. axes cross product 의 UI 구조
|
||||
# (탭 전환·목록/폼 서브뷰·유형별 필드·변수삽입·상세 모달·i18n) effects 는 Vitest
|
||||
# (alimtalk_templates.test.tsx) 정적 검증으로 가드된다. 권한 경계(view/manage)·유형별
|
||||
# 조건부 검증(422)·kapi 실패 전파(422)·상태변경 위임은 PHPUnit Feature
|
||||
# (AlimtalkTemplateControllerTest) 로, messageType 자동계산·상태 배지/액션 매핑·kapi 파라미터
|
||||
# 전달은 Unit(AlimtalkTemplateServiceTest) 로 Http::fake 왕복 관찰한다. 런타임 Playwright spec 은
|
||||
# 계획서 §9 방침에 따라 실연동 검증(PO 직접 수행, 카카오 관리 API 자격증명 필요) 단계에서 최초
|
||||
# 도입하며, 그 시점에 @scenario/@effects docblock 완전 매핑을 추가한다.
|
||||
# 알림톡 템플릿 화면은 설정 페이지(plugin_settings.json)의 탭으로 배치되며(독립 페이지·메뉴
|
||||
# 없음), kapi 실시간 위임이라 DB 저장이 없다. 조회 전용 전환으로 등록·수정·삭제·검수·상태변경을
|
||||
# 제거하고 목록·상태·내용 조회 + 알림 연결만 남겼다(등록·관리는 비즈뿌리오 콘솔로 위임). axes
|
||||
# cross product 의 UI 구조(탭 전환·목록 서브뷰·상세 모달·콘솔/준비 안내·i18n) effects 는 Vitest
|
||||
# (alimtalk_templates.test.tsx) 정적 검증으로 가드된다. 조회 권한 경계(view)·등록 라우트 제거(405)·
|
||||
# kapi 실패 전파(422)는 PHPUnit Feature(AlimtalkTemplateControllerTest) 로, 상태 배지 매핑·kapi
|
||||
# 파라미터 전달은 Unit(AlimtalkTemplateServiceTest) 로 Http::fake 왕복 관찰한다. 런타임 Playwright
|
||||
# spec 은 실연동 검증(PO 직접 수행, 카카오 관리 API 자격증명 필요) 단계에서 최초 도입한다.
|
||||
|
||||
feature: 알림톡 템플릿 관리 (Phase 5)
|
||||
feature: 알림톡 템플릿 조회 (조회 전용)
|
||||
|
||||
description: |
|
||||
설정 페이지 알림톡 템플릿 탭에서 카카오 관리 API(kapi.ppurio.com)로 알림톡 템플릿을
|
||||
실시간 조회·등록·수정·삭제·검수·상태변경한다. DB 저장 없이 매 요청 kapi 위임이며, 저장은
|
||||
하지 않는다(연동 binding 은 Phase 6). 진입은 코어 소유 설정 페이지 하나로 통일(메뉴 없음).
|
||||
실시간 조회한다(목록·상태·내용). DB 저장 없이 매 요청 kapi 위임이며, 등록·수정·삭제·검수·
|
||||
상태변경은 비즈뿌리오 콘솔로 위임한다. 이 화면의 고유 가치는 카카오 템플릿 ↔ G7 알림 연결
|
||||
(binding)이며, 진입은 코어 소유 설정 페이지 하나로 통일한다(메뉴 없음).
|
||||
|
||||
핵심 동작:
|
||||
- 탭 네비게이션: 환경설정 ↔ 알림톡 템플릿 (activeSettingsTab, 배타 전환)
|
||||
- 목록 서브뷰: 상태 필터(templateStatus) + 검색(keyword) + 상태 배지(serviceStatus) + 상세
|
||||
- 폼 서브뷰(목록↔폼 전환): 유형별 필드(NONE/IMAGE/TEXT, ITEM_LIST 제외) + 변수 클릭삽입
|
||||
- templateMessageType(BA/EX/AD/MI)은 부가정보·채널추가(AC) 버튼 유무로 백엔드 자동 계산
|
||||
- 권한: 조회=messaging.view / 변경=messaging.manage
|
||||
- kapi 실패(반려·차단·상태오류)는 그대로 422 로 전파(운영자가 사유 즉시 확인)
|
||||
- 탭 네비게이션: 환경설정 ↔ 알림톡 템플릿 (query.tab, 배타 전환)
|
||||
- 목록 서브뷰: 상태 필터(templateStatus) + 검색(keyword) + 상태 배지(serviceStatus) + [내용]
|
||||
- 상세 모달: 내용만 표시 + [닫기] (관리 액션 없음)
|
||||
- 권한: 조회=messaging.view (변경 라우트는 제거 — 등록은 콘솔)
|
||||
- kapi 실패(발신프로필 미설정·조회 실패)는 그대로 422 로 전파(운영자가 사유 즉시 확인)
|
||||
- readiness: api_key·sender_key 미설정 시 안내 + [설정하기] 탭 이동
|
||||
- 안내: 목록 상단 콘솔 위임 안내 + 환경설정 탭 사용 전 준비 안내(카카오·SMS)
|
||||
|
||||
axes:
|
||||
auth: [view, manage, guest]
|
||||
emphasize_type: [NONE, IMAGE, TEXT]
|
||||
message_type_driver: [none, extra, add_channel, both]
|
||||
save_mode: [register, register_and_request]
|
||||
auth: [view, forbidden, guest]
|
||||
kapi_result: [ok, fail]
|
||||
|
||||
exclusions:
|
||||
- { auth: guest, emphasize_type: IMAGE, reason: "비인증은 유형 무관 401 — 유형 axis 무의미" }
|
||||
- { auth: view, kapi_result: fail, reason: "view 는 변경 액션 불가(403) — kapi 도달 전 차단" }
|
||||
- { auth: guest, kapi_result: fail, reason: "비인증은 결과 무관 401 — kapi 도달 전 차단" }
|
||||
- { auth: forbidden, kapi_result: fail, reason: "권한 없으면 403 — kapi 도달 전 차단" }
|
||||
|
||||
effects:
|
||||
# 탭 네비게이션 (UI)
|
||||
- tab_navigation_has_connection_and_templates_tabs
|
||||
- templates_tab_updates_url_query_and_refetches_list
|
||||
- tab_panels_toggle_exclusively_by_query_tab
|
||||
- templates_tab_persists_across_reload_via_url_query
|
||||
- init_actions_loads_list_when_entering_templates_tab
|
||||
# 데이터소스 (UI)
|
||||
- templates_and_categories_datasources_target_admin_api
|
||||
# 데이터소스 (UI) — 조회 전용, 카테고리 데이터소스 제거
|
||||
- templates_datasource_targets_admin_api
|
||||
- category_datasource_removed_read_only
|
||||
# 조회 전용 — 폼·관리 제거 (UI)
|
||||
- form_view_removed
|
||||
- action_modal_removed
|
||||
- form_and_manage_state_absent_from_layout
|
||||
# 목록 서브뷰 (UI)
|
||||
- list_view_shown_when_template_view_is_list
|
||||
- toolbar_has_status_filter_and_keyword_search
|
||||
- toolbar_has_no_new_template_button_refresh_only
|
||||
- table_card_always_shows_header_and_branches_tbody_by_count
|
||||
- table_iterates_templates_with_status_badge
|
||||
- new_template_button_switches_to_form_and_resets_form
|
||||
# 폼 서브뷰 (UI, 계획서 §6-4)
|
||||
- form_view_shown_when_template_view_is_form
|
||||
- common_fields_name_and_content_use_manual_value_binding
|
||||
- template_code_field_auto_or_manual_toggle
|
||||
- category_two_level_dropdown_from_category_all
|
||||
- text_type_fields_shown_when_emphasize_type_is_text
|
||||
- image_type_file_upload_shown_when_emphasize_type_is_image
|
||||
- type_buttons_expose_only_none_image_text_not_item_list
|
||||
- variable_buttons_insert_into_content_state_via_insert_variable_handler
|
||||
- variable_reference_table_always_visible_inline
|
||||
- optional_six_items_checkbox_expand_extra_preview_button_quickreply_link_security
|
||||
- optional_no_header_field
|
||||
- preview_reflects_content_state
|
||||
- save_split_into_register_and_register_then_request_inspection_with_help_box
|
||||
- manage_column_is_single_content_button_opening_detail_modal
|
||||
- list_has_row_number_requested_at_processed_at_columns
|
||||
- status_badge_appends_rdy_sub_label_only_for_rdy
|
||||
- top_level_actions_all_have_event_type
|
||||
- pagination_updates_page_state_and_refetches
|
||||
# 안내 (UI)
|
||||
- list_notice_shows_badge_meaning_and_console_delegation
|
||||
- settings_tab_shows_preparation_notice_kakao_and_sms
|
||||
# 상세 모달 & readiness (UI)
|
||||
- detail_modal_defined
|
||||
- readiness_notice_shown_when_api_key_or_sender_key_missing
|
||||
- detail_modal_shows_status_badge_and_content_close_only
|
||||
- readiness_notice_shown_when_ready_flag_false_via_readiness_api
|
||||
# 권한 경계 (백엔드)
|
||||
- list_requires_view_permission
|
||||
- guest_list_returns_401
|
||||
- store_requires_manage_permission_returns_403_for_view_only
|
||||
- manage_can_create_basic_template
|
||||
- register_then_request_inspection_flag_creates_then_requests
|
||||
# 유형별 검증 (백엔드)
|
||||
- text_type_missing_title_subtitle_returns_422
|
||||
- image_type_missing_image_fields_returns_422
|
||||
# messageType 자동계산 (백엔드)
|
||||
- message_type_none_computes_ba
|
||||
- message_type_extra_computes_ex
|
||||
- message_type_add_channel_computes_ad
|
||||
- message_type_both_computes_mi
|
||||
# 상태 배지/액션 & kapi 전달 (백엔드)
|
||||
- service_status_maps_to_badge_and_available_actions
|
||||
- list_returns_templates_with_status_badge
|
||||
- show_returns_template_detail_with_status_badge
|
||||
- list_requires_authentication_returns_401
|
||||
- list_requires_view_permission_returns_403
|
||||
- store_route_removed_returns_405_read_only
|
||||
# 상태 배지 & kapi 전달 (백엔드)
|
||||
- service_status_maps_to_badge_without_available_actions
|
||||
- status_badge_label_key_uses_frontend_lang_format
|
||||
- detail_derives_status_from_inspection_and_status
|
||||
- list_passes_status_keyword_to_kapi
|
||||
- text_type_sends_title_and_subtitle
|
||||
- inspection_request_sends_code_and_comment
|
||||
- stop_action_calls_kapi_stop_endpoint
|
||||
# kapi 실패 전파 (백엔드)
|
||||
- kapi_failure_surfaced_as_422_with_result_code
|
||||
- kapi_failure_is_surfaced_as_422_with_result_code
|
||||
- sender_key_missing_throws
|
||||
# 다국어
|
||||
- all_referenced_i18n_keys_exist_in_ko_and_en
|
||||
@@ -101,4 +86,4 @@ test_files:
|
||||
- plugins/_bundled/sirsoft-message_bizppurio/tests/Unit/Services/AlimtalkTemplateServiceTest.php
|
||||
|
||||
audit:
|
||||
status: codified
|
||||
status: codified
|
||||
@@ -4,7 +4,7 @@ import path from 'path';
|
||||
/**
|
||||
* 비즈뿌리오 메시징 플러그인 프론트엔드 에셋 빌드 설정.
|
||||
*
|
||||
* 커스텀 핸들러(insertVariable) 를 IIFE 번들로 빌드해 플러그인 활성화 시 로드한다.
|
||||
* 플러그인 엔트리(resources/js/index.ts)를 IIFE 번들로 빌드해 활성화 시 로드한다.
|
||||
* 출력물은 dist/js/plugin.iife.js 이며 plugin.json assets.js.output 과 일치한다.
|
||||
*/
|
||||
export default defineConfig({
|
||||
|
||||
Reference in new issue
Block a user