@roottale/cms-mcp 0.41.0 → 0.41.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md
CHANGED
package/dist/index.js
CHANGED
|
@@ -279,7 +279,7 @@ function registerTools(server2) {
|
|
|
279
279
|
}
|
|
280
280
|
|
|
281
281
|
// src/server.ts
|
|
282
|
-
var VERSION = true ? "0.41.
|
|
282
|
+
var VERSION = true ? "0.41.1" : "dev";
|
|
283
283
|
var SERVER_INSTRUCTIONS = `
|
|
284
284
|
roottale-cms-mcp\uB294 RootTale CMS\uB97C \uC678\uBD80 \uC0AC\uC774\uD2B8(\uC8FC\uB85C Next.js)\uC5D0 \uC5F0\uB3D9\uD558\uAE30 \uC704\uD55C
|
|
285
285
|
\uD1B5\uD569 \uBB38\uC11C\xB7\uC608\uC2DC \uCF54\uB4DC\xB7\uACF5\uAC1C API \uC870\uD68C tool\uC744 \uC81C\uACF5\uD569\uB2C8\uB2E4.
|
package/docs/api-reference.md
CHANGED
|
@@ -207,12 +207,14 @@ settings.siteProfile.defaultOgImageUrl` 순으로 우선합니다. `logo_url`·
|
|
|
207
207
|
| `message`, `consultation_field`, `current_site_url` | | |
|
|
208
208
|
| `lead_kind` | | `patient`(기본) \| `sales` |
|
|
209
209
|
| `_redirect_url` | | 완료 후 redirect base (allowlist 검증) |
|
|
210
|
+
| `cf-turnstile-response` | | Cloudflare Turnstile 토큰. tenant-api에 `LEAD_INTAKE_TURNSTILE_SECRET_KEY`가 설정된 경우 필수 |
|
|
210
211
|
| `attr_landing_path`, `attr_rt_src`, `attr_utm_source`, `attr_utm_medium`, `attr_utm_campaign`, `attr_referrer`, `attr_first_touch_at` | | 유입 어트리뷰션 — CRM에 유입 경로 표시 (`inquiries.md` 참고). 그 외 `attr_*` 키는 무시 |
|
|
211
212
|
| 기타 임의 필드 | | 최대 50개, 암호화 보관, CRM 상세 노출 |
|
|
212
213
|
|
|
213
214
|
응답: `302` redirect — 성공 `?ok=1`, 실패 `?err=<code>`
|
|
214
215
|
(`consent_privacy`, `consent_overseas`, `invalid_vertical`, `missing_fields`,
|
|
215
|
-
`invalid_email`, `internal`). 잘못된 키는 `401`.
|
|
216
|
+
`invalid_email`, `turnstile_failed`, `internal`). 잘못된 키는 `401`.
|
|
217
|
+
IP/tenant rate limit 초과 시 `429 rate_limited`를 반환합니다.
|
|
216
218
|
|
|
217
219
|
서버-서버 호출 시 redirect를 따라가지 말고(`redirect: "manual"`) `Location`
|
|
218
220
|
헤더를 파싱하세요 — `@roottale/cms-client`의 `submitInquiry`가 이를 대신합니다.
|
package/docs/inquiries.md
CHANGED
|
@@ -31,6 +31,8 @@ export async function submitContact(
|
|
|
31
31
|
const name = (formData.get("name") as string | null)?.trim() ?? "";
|
|
32
32
|
const phone = (formData.get("phone") as string | null)?.trim() ?? "";
|
|
33
33
|
const message = (formData.get("message") as string | null)?.trim() ?? "";
|
|
34
|
+
const turnstileToken =
|
|
35
|
+
(formData.get("cf-turnstile-response") as string | null)?.trim() ?? "";
|
|
34
36
|
const privacyConsent = formData.get("privacyConsent") !== null;
|
|
35
37
|
|
|
36
38
|
const errors: ContactState["errors"] = {};
|
|
@@ -51,6 +53,7 @@ export async function submitContact(
|
|
|
51
53
|
email: `noemail-${name}@example.invalid`, // 이메일 미수집 폼이면 placeholder
|
|
52
54
|
phone, // 자동으로 010-1234-5678 형태 포맷됨
|
|
53
55
|
message: message || undefined,
|
|
56
|
+
turnstileToken: turnstileToken || undefined,
|
|
54
57
|
privacyConsent: true, // 사용자가 명시 동의한 경우에만 true
|
|
55
58
|
},
|
|
56
59
|
});
|
|
@@ -80,6 +83,7 @@ export async function submitContact(
|
|
|
80
83
|
| `currentSiteUrl` | | 현재 사이트 URL |
|
|
81
84
|
| `overseasTransferConsent` | medical 시 ✅ | 국외이전 동의 |
|
|
82
85
|
| `leadKind` | | `patient`(기본) \| `sales` |
|
|
86
|
+
| `turnstileToken` | | Cloudflare Turnstile 토큰. tenant-api secret 검증을 켠 경우 전달 |
|
|
83
87
|
| `extras` | | 임의 추가 항목 (최대 50개, 암호화 보관, CRM 상세에 노출) |
|
|
84
88
|
| `attribution` | | 유입 first-touch — 아래 [유입 어트리뷰션](#유입-어트리뷰션-attribution) 참고 |
|
|
85
89
|
|
|
@@ -154,6 +158,8 @@ type SubmitInquiryResult =
|
|
|
154
158
|
| `missing_fields` | 필수 필드 누락 |
|
|
155
159
|
| `invalid_email` | 이메일 형식 오류 |
|
|
156
160
|
| `invalid_vertical` | 허용되지 않는 vertical |
|
|
161
|
+
| `turnstile_failed` | Turnstile 검증 실패 |
|
|
162
|
+
| `rate_limited` | 같은 tenant/IP에서 요청 과다 |
|
|
157
163
|
| `invalid_api_key` | 키 인증 실패 |
|
|
158
164
|
| `internal` | 서버/네트워크 오류 |
|
|
159
165
|
|
|
@@ -163,5 +169,8 @@ type SubmitInquiryResult =
|
|
|
163
169
|
`RootTaleLeadForm`(RSC, HTML form)을 사용할 수 있습니다. 디자인·검증을
|
|
164
170
|
통제하려면 위의 Server Action 방식을 권장합니다.
|
|
165
171
|
|
|
172
|
+
`RootTaleLeadForm`에 `turnstileSiteKey`를 넘기면 Cloudflare Turnstile 위젯과
|
|
173
|
+
`cf-turnstile-response` 필드가 함께 렌더링됩니다.
|
|
174
|
+
|
|
166
175
|
raw HTTP로 직접 연동(비 JS 스택)하려면 `api-reference.md`의
|
|
167
176
|
`POST /v1/public/inquiries`를 참고하세요.
|
|
@@ -18,6 +18,8 @@ export async function submitContact(
|
|
|
18
18
|
const phone = (formData.get("phone") as string | null)?.trim() ?? "";
|
|
19
19
|
const field = (formData.get("field") as string | null)?.trim() ?? "";
|
|
20
20
|
const message = (formData.get("message") as string | null)?.trim() ?? "";
|
|
21
|
+
const turnstileToken =
|
|
22
|
+
(formData.get("cf-turnstile-response") as string | null)?.trim() ?? "";
|
|
21
23
|
const privacyConsent = formData.get("privacyConsent") !== null;
|
|
22
24
|
// 유입 어트리뷰션 (선택) — 클라이언트 폼이 readAttribution() 값을 hidden
|
|
23
25
|
// input(name="attribution")에 JSON 으로 실어 보내면 CRM 에 유입 경로가 표시된다.
|
|
@@ -42,6 +44,7 @@ export async function submitContact(
|
|
|
42
44
|
phone,
|
|
43
45
|
consultationField: field || undefined,
|
|
44
46
|
message: message || undefined,
|
|
47
|
+
turnstileToken: turnstileToken || undefined,
|
|
45
48
|
privacyConsent: true, // 사용자가 명시 동의한 경우에만
|
|
46
49
|
attribution,
|
|
47
50
|
},
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@roottale/cms-mcp",
|
|
3
|
-
"version": "0.41.
|
|
3
|
+
"version": "0.41.1",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"description": "RootTale CMS integration MCP server — bundled integration docs, Next.js example code, and public API lookup tools. Run with: npx @roottale/cms-mcp",
|
|
6
6
|
"bin": {
|