@roottale/cms-mcp 0.61.1 → 0.63.0
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 +25 -0
- package/dist/index.js +192 -16
- package/dist/index.js.map +1 -1
- package/docs/api-reference.md +3 -0
- package/docs/blog.md +11 -1
- package/docs/content-models-and-exposures.md +6 -1
- package/docs/popups-and-banners.md +198 -0
- package/docs/revalidation-webhooks.md +4 -0
- package/docs/theme-and-settings.md +52 -14
- package/examples/nextjs/app/.well-known/roottale.json/route.ts +4 -2
- package/examples/nextjs/app/api/exposures/route.ts +10 -0
- package/examples/nextjs/app/blog/[slug]/page.tsx +3 -0
- package/examples/nextjs/app/layout.tsx +2 -1
- package/examples/nextjs/app/page.tsx +5 -0
- package/examples/nextjs/app/preview/post/[id]/page.tsx +3 -0
- package/examples/nextjs/cms/exposure-slots.json +127 -0
- package/examples/nextjs/components/global-popup.tsx +5 -5
- package/examples/nextjs/components/site-exposures.tsx +22 -0
- package/examples/nextjs/lib/exposure-slots.ts +3 -0
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,30 @@
|
|
|
1
1
|
# @roottale/cms-mcp
|
|
2
2
|
|
|
3
|
+
## 0.63.0
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- a858d8e: 목차 배치를 사이트 코드의 `RootTaleBlogPost.tocPosition`으로 관리할 수 있습니다.
|
|
8
|
+
명시한 값은 CMS 설정보다 우선하며, 생략한 기존 연동은 CMS 배치를 유지합니다.
|
|
9
|
+
현재 배치를 prop으로 명시하면 실제 화면을 바꾸지 않고 관리 주체를 코드로 옮깁니다.
|
|
10
|
+
|
|
11
|
+
공통 블록 디자인은 `RootTaleBlogPost.footerPatternPresentation`과
|
|
12
|
+
`RootTalePostPattern.presentation`으로 전체 대체할 수 있습니다. `null`은 원격
|
|
13
|
+
디자인 주입을 생략하고 사이트 CSS에 맡기며, 생략한 기존 연동은 원격값을 유지합니다.
|
|
14
|
+
고객 콘텐츠와 제작 디자인을 분리하는 문서·발행/미리보기 예제를 함께 갱신합니다.
|
|
15
|
+
|
|
16
|
+
공개 `RootTaleCssVars` 타입의 비공개 UI 패키지 참조도 제거해 독립 소비자의
|
|
17
|
+
strict 타입 검사를 지원합니다.
|
|
18
|
+
|
|
19
|
+
섹션 구성·디자인 변경 검사 함수를 공개 CMS core에서 공유해 편집기와 저장 단계가
|
|
20
|
+
같은 고객 편집 경계를 적용합니다.
|
|
21
|
+
|
|
22
|
+
## 0.62.0
|
|
23
|
+
|
|
24
|
+
### Minor Changes
|
|
25
|
+
|
|
26
|
+
- 083fc47: 팝업·배너의 예약 시작과 종료를 사이트 재배포 없이 반영하는 공통 runtime과 Next.js 조회 경로를 제공합니다. 공개본과 수정안을 분리하고 일정 변경·일시 중지·예약 취소를 관리 API, MCP, CLI에서 지원합니다. 신규 고객 스타터와 기존 사이트에서 같은 표시 계약을 사용합니다. 메인 홈 전용 자동 캐러셀, 다음 슬라이드까지의 진행률, 모바일 스와이프·스크롤 반응과 쿠키 숨김을 지원합니다.
|
|
27
|
+
|
|
3
28
|
## 0.61.1
|
|
4
29
|
|
|
5
30
|
## 0.61.0
|
package/dist/index.js
CHANGED
|
@@ -483,6 +483,25 @@ var strings = (description) => ({
|
|
|
483
483
|
items: { type: "string" },
|
|
484
484
|
description
|
|
485
485
|
});
|
|
486
|
+
var exposureFields = {
|
|
487
|
+
siteId: string("\uC0AC\uC774\uD2B8 ID"),
|
|
488
|
+
name: string("\uAD00\uB9AC\uC6A9 \uC774\uB984"),
|
|
489
|
+
slotKey: string("\uB178\uCD9C \uC2AC\uB86F key"),
|
|
490
|
+
kind: enumValue(["banner", "popup"]),
|
|
491
|
+
content: object("camelCase \uCF58\uD150\uCE20; assetId/mobileAssetId, linkTarget self|blank"),
|
|
492
|
+
delivery: object("v2 \uD45C\uC2DC \uC870\uAC74; timeZone, includePaths, excludePaths, schedule"),
|
|
493
|
+
startsAt: nullableString("\uC2DC\uC791 ISO \uC2DC\uAC01"),
|
|
494
|
+
endsAt: nullableString("\uC885\uB8CC ISO \uC2DC\uAC01"),
|
|
495
|
+
targetPaths: strings("\uC774\uC804 runtime \uB300\uC0C1 \uACBD\uB85C"),
|
|
496
|
+
priority: number("\uC6B0\uC120\uC21C\uC704"),
|
|
497
|
+
repeat: enumValue(["always", "session", "day", "never"])
|
|
498
|
+
};
|
|
499
|
+
var exposureRequired = ["slotKey", "kind", "content", "startsAt", "endsAt", "targetPaths", "priority", "repeat"];
|
|
500
|
+
var exposureVersionFields = {
|
|
501
|
+
exposureId: string("\uB178\uCD9C \uCEA0\uD398\uC778 ID"),
|
|
502
|
+
siteId: string("\uC0AC\uC774\uD2B8 ID"),
|
|
503
|
+
expectedVersion: number("\uC870\uD68C\uD55C \uD604\uC7AC version")
|
|
504
|
+
};
|
|
486
505
|
var MANAGEMENT_TOOL_DEFINITIONS = [
|
|
487
506
|
tool2("listCmsContentModels", "\uD398\uC774\uC9C0\xB7\uAE00\xB7\uC815\uBCF4 \uCF58\uD150\uCE20 \uBAA8\uB378\uACFC \uC0AC\uC6A9\uB7C9\uC744 \uC870\uD68C\uD569\uB2C8\uB2E4.", {
|
|
488
507
|
siteId: string("\uC0AC\uC774\uD2B8 ID"),
|
|
@@ -583,6 +602,8 @@ var MANAGEMENT_TOOL_DEFINITIONS = [
|
|
|
583
602
|
siteId: string("\uC0AC\uC774\uD2B8 ID")
|
|
584
603
|
}, ["exposureId"]),
|
|
585
604
|
tool2("createCmsExposure", "FRONT \uC2AC\uB86F \uACC4\uC57D\uC5D0 \uB9DE\uB294 \uB178\uCD9C \uCEA0\uD398\uC778 \uCD08\uC548\uC744 \uB9CC\uB4ED\uB2C8\uB2E4.", {
|
|
605
|
+
name: exposureFields.name,
|
|
606
|
+
delivery: exposureFields.delivery,
|
|
586
607
|
siteId: string("\uC0AC\uC774\uD2B8 ID"),
|
|
587
608
|
slotKey: string("\uB178\uCD9C \uC2AC\uB86F key"),
|
|
588
609
|
kind: enumValue(["banner", "popup"]),
|
|
@@ -594,6 +615,8 @@ var MANAGEMENT_TOOL_DEFINITIONS = [
|
|
|
594
615
|
repeat: enumValue(["always", "session", "day", "never"])
|
|
595
616
|
}, ["slotKey", "kind", "content", "startsAt", "endsAt", "targetPaths", "priority", "repeat"]),
|
|
596
617
|
tool2("updateCmsExposure", "\uB178\uCD9C \uCEA0\uD398\uC778\uC744 \uB099\uAD00\uC801 \uC7A0\uAE08\uC73C\uB85C \uC218\uC815\uD569\uB2C8\uB2E4.", {
|
|
618
|
+
name: exposureFields.name,
|
|
619
|
+
delivery: exposureFields.delivery,
|
|
597
620
|
exposureId: string("\uB178\uCD9C \uCEA0\uD398\uC778 ID"),
|
|
598
621
|
expectedVersion: number("\uD604\uC7AC version"),
|
|
599
622
|
siteId: string("\uC0AC\uC774\uD2B8 ID"),
|
|
@@ -607,13 +630,37 @@ var MANAGEMENT_TOOL_DEFINITIONS = [
|
|
|
607
630
|
repeat: enumValue(["always", "session", "day", "never"])
|
|
608
631
|
}, ["exposureId", "expectedVersion", "slotKey", "kind", "content", "startsAt", "endsAt", "targetPaths", "priority", "repeat"]),
|
|
609
632
|
tool2("publishCmsExposure", "\uB178\uCD9C \uCEA0\uD398\uC778\uC744 \uBC1C\uD589\uD558\uACE0 \uACB9\uCE68 \uACBD\uACE0\uB97C \uBC18\uD658\uD569\uB2C8\uB2E4.", {
|
|
633
|
+
expectedVersion: exposureVersionFields.expectedVersion,
|
|
610
634
|
exposureId: string("\uB178\uCD9C \uCEA0\uD398\uC778 ID"),
|
|
611
635
|
siteId: string("\uC0AC\uC774\uD2B8 ID")
|
|
612
636
|
}, ["exposureId"]),
|
|
613
637
|
tool2("archiveCmsExposure", "\uB178\uCD9C \uCEA0\uD398\uC778\uC744 \uBCF4\uAD00\uD569\uB2C8\uB2E4.", {
|
|
638
|
+
expectedVersion: exposureVersionFields.expectedVersion,
|
|
614
639
|
exposureId: string("\uB178\uCD9C \uCEA0\uD398\uC778 ID"),
|
|
615
640
|
siteId: string("\uC0AC\uC774\uD2B8 ID")
|
|
616
|
-
}, ["exposureId"])
|
|
641
|
+
}, ["exposureId"]),
|
|
642
|
+
tool2("saveCmsExposureDraft", "\uACF5\uAC1C\uBCF8\uC744 \uC720\uC9C0\uD558\uBA70 \uC218\uC815\uC548\uC744 \uC800\uC7A5\uD569\uB2C8\uB2E4.", {
|
|
643
|
+
...exposureFields,
|
|
644
|
+
...exposureVersionFields
|
|
645
|
+
}, ["exposureId", "expectedVersion", ...exposureRequired]),
|
|
646
|
+
tool2("updateCmsExposureSchedule", "\uB0B4\uC6A9 \uC218\uC815\uC548\uC744 \uBC1C\uD589\uD558\uC9C0 \uC54A\uACE0 \uACF5\uAC1C\uBCF8\uC758 \uC77C\uC815\uB9CC \uBC14\uAFC9\uB2C8\uB2E4.", {
|
|
647
|
+
...exposureVersionFields,
|
|
648
|
+
startsAt: nullableString("\uC2DC\uC791 ISO \uC2DC\uAC01"),
|
|
649
|
+
endsAt: nullableString("\uC885\uB8CC ISO \uC2DC\uAC01"),
|
|
650
|
+
schedule: object("camelCase \uAE30\uAC04 \uD3B8\uC9D1 \uC815\uBCF4")
|
|
651
|
+
}, ["exposureId", "expectedVersion", "startsAt", "endsAt"]),
|
|
652
|
+
tool2("pauseCmsExposure", "\uD604\uC7AC \uB178\uCD9C\uC744 \uC77C\uC2DC \uC911\uC9C0\uD569\uB2C8\uB2E4.", exposureVersionFields, ["exposureId", "expectedVersion"]),
|
|
653
|
+
tool2("resumeCmsExposure", "\uC720\uD6A8\uD55C \uAE30\uAC04\uC758 \uC77C\uC2DC \uC911\uC9C0 \uD56D\uBAA9\uC744 \uC7AC\uAC1C\uD569\uB2C8\uB2E4.", exposureVersionFields, ["exposureId", "expectedVersion"]),
|
|
654
|
+
tool2("cancelCmsExposureReservation", "\uC2DC\uC791 \uC804 \uC608\uC57D\uC744 \uCDE8\uC18C\uD558\uACE0 \uCD08\uC548\uC73C\uB85C \uB418\uB3CC\uB9BD\uB2C8\uB2E4.", exposureVersionFields, ["exposureId", "expectedVersion"]),
|
|
655
|
+
tool2("duplicateCmsExposure", "\uC0C8 ID\uC640 \uBE44\uC5B4 \uC788\uB294 \uC77C\uC815\uC73C\uB85C \uCD08\uC548\uC744 \uBCF5\uC81C\uD569\uB2C8\uB2E4.", exposureVersionFields, ["exposureId", "expectedVersion"]),
|
|
656
|
+
tool2("restoreCmsExposure", "\uBCF4\uAD00\uD55C \uD56D\uBAA9\uC744 \uCD08\uC548\uC73C\uB85C \uBCF5\uC6D0\uD569\uB2C8\uB2E4.", exposureVersionFields, ["exposureId", "expectedVersion"]),
|
|
657
|
+
tool2("previewCmsExposure", "\uC800\uC7A5\uD558\uC9C0 \uC54A\uACE0 \uACBD\uB85C\xB7\uAE30\uAE30\xB7\uC2DC\uAC01\uC5D0 \uB9DE\uB294 \uB178\uCD9C \uACB0\uACFC\uB97C \uD655\uC778\uD569\uB2C8\uB2E4.", {
|
|
658
|
+
exposureId: string("\uC218\uC815 \uC911\uC778 \uAE30\uC874 \uD56D\uBAA9 ID; \uC0DD\uB7B5\uD558\uBA74 \uC0C8 \uD56D\uBAA9\uC73C\uB85C \uD655\uC778"),
|
|
659
|
+
...exposureFields,
|
|
660
|
+
path: string("\uBBF8\uB9AC \uBCFC \uC0AC\uC774\uD2B8 \uACBD\uB85C"),
|
|
661
|
+
device: enumValue(["desktop", "mobile"]),
|
|
662
|
+
evaluatedAt: string("\uD655\uC778\uD560 ISO \uC2DC\uAC01; \uC0DD\uB7B5 \uC2DC \uD604\uC7AC")
|
|
663
|
+
}, [...exposureRequired, "path", "device"])
|
|
617
664
|
];
|
|
618
665
|
function isManagementToolName(name) {
|
|
619
666
|
return MANAGEMENT_TOOL_DEFINITIONS.some((definition) => definition.name === name);
|
|
@@ -689,7 +736,42 @@ var ListExposuresInput = SiteInput.extend({
|
|
|
689
736
|
status: z3.enum(["draft", "published", "archived"]).optional()
|
|
690
737
|
}).strict();
|
|
691
738
|
var ExposureRefInput = z3.object({ exposureId: Key, siteId: SiteId2 }).strict();
|
|
739
|
+
var ExposureStateInput = ExposureRefInput.extend({
|
|
740
|
+
expectedVersion: z3.number().int().positive().optional()
|
|
741
|
+
}).strict();
|
|
742
|
+
var ExposureMutationInput = ExposureStateInput.required({ expectedVersion: true });
|
|
743
|
+
var ScheduleInput = z3.object({
|
|
744
|
+
startMode: z3.enum(["now", "scheduled"]),
|
|
745
|
+
startDate: z3.string().optional(),
|
|
746
|
+
startTime: z3.string().optional(),
|
|
747
|
+
endMode: z3.enum(["none", "date"]),
|
|
748
|
+
endDate: z3.string().optional(),
|
|
749
|
+
endTime: z3.string().optional(),
|
|
750
|
+
endPreset: z3.union([z3.literal(1), z3.literal(7), z3.literal(30)]).optional()
|
|
751
|
+
}).strict();
|
|
752
|
+
var PathRuleInput = z3.object({ path: z3.string().startsWith("/"), match: z3.enum(["exact", "prefix"]) }).strict();
|
|
753
|
+
var DeliveryInput = z3.object({
|
|
754
|
+
version: z3.literal(2),
|
|
755
|
+
timeZone: z3.string().optional(),
|
|
756
|
+
device: z3.enum(["all", "desktop", "mobile"]).optional(),
|
|
757
|
+
includePaths: z3.array(PathRuleInput).min(1).max(100),
|
|
758
|
+
excludePaths: z3.array(PathRuleInput).max(100).optional(),
|
|
759
|
+
delaySeconds: z3.number().min(0).max(30).optional(),
|
|
760
|
+
scrollPercent: z3.union([z3.literal(25), z3.literal(50), z3.literal(75)]).nullable().optional(),
|
|
761
|
+
dismissible: z3.boolean().optional(),
|
|
762
|
+
hideForToday: z3.boolean().optional(),
|
|
763
|
+
size: z3.enum(["small", "medium", "large"]).optional(),
|
|
764
|
+
dayBoundary: z3.enum(["calendar", "rolling"]).optional(),
|
|
765
|
+
schedule: ScheduleInput.optional()
|
|
766
|
+
}).strict();
|
|
767
|
+
var ExposureScheduleInput = ExposureMutationInput.extend({
|
|
768
|
+
startsAt: DateTime.nullable(),
|
|
769
|
+
endsAt: DateTime.nullable(),
|
|
770
|
+
schedule: ScheduleInput.optional()
|
|
771
|
+
}).strict();
|
|
692
772
|
var ExposureFields = {
|
|
773
|
+
name: z3.string().max(200).optional(),
|
|
774
|
+
delivery: DeliveryInput.optional(),
|
|
693
775
|
slotKey: Key,
|
|
694
776
|
kind: z3.enum(["banner", "popup"]),
|
|
695
777
|
content: z3.object({
|
|
@@ -699,8 +781,13 @@ var ExposureFields = {
|
|
|
699
781
|
description: z3.string().optional(),
|
|
700
782
|
assetUrl: z3.string().url().optional(),
|
|
701
783
|
assetAlt: z3.string().optional(),
|
|
784
|
+
assetId: Key.optional(),
|
|
785
|
+
mobileAssetId: Key.optional(),
|
|
786
|
+
mobileAssetUrl: z3.string().url().optional(),
|
|
787
|
+
mobileAssetAlt: z3.string().optional(),
|
|
702
788
|
linkLabel: z3.string().optional(),
|
|
703
|
-
linkUrl: z3.string().optional()
|
|
789
|
+
linkUrl: z3.string().optional(),
|
|
790
|
+
linkTarget: z3.enum(["self", "blank"]).optional()
|
|
704
791
|
}).strict(),
|
|
705
792
|
startsAt: DateTime.nullable(),
|
|
706
793
|
endsAt: DateTime.nullable(),
|
|
@@ -715,6 +802,12 @@ var UpdateExposureInput = z3.object({
|
|
|
715
802
|
siteId: SiteId2,
|
|
716
803
|
...ExposureFields
|
|
717
804
|
}).strict();
|
|
805
|
+
var PreviewExposureInput = CreateExposureInput.extend({
|
|
806
|
+
exposureId: Key.optional(),
|
|
807
|
+
path: z3.string().startsWith("/"),
|
|
808
|
+
device: z3.enum(["desktop", "mobile"]),
|
|
809
|
+
evaluatedAt: DateTime.optional()
|
|
810
|
+
}).strict();
|
|
718
811
|
var VersionResponse = z3.object({ version: z3.number().int().positive() }).passthrough();
|
|
719
812
|
var UpdatedAtResponse = z3.object({ updated_at: DateTime.nullable() }).passthrough();
|
|
720
813
|
|
|
@@ -888,11 +981,12 @@ async function callManagementTool(name, args) {
|
|
|
888
981
|
body: exposureBody(input)
|
|
889
982
|
});
|
|
890
983
|
}
|
|
891
|
-
case "updateCmsExposure":
|
|
984
|
+
case "updateCmsExposure":
|
|
985
|
+
case "saveCmsExposureDraft": {
|
|
892
986
|
const input = UpdateExposureInput.parse(args);
|
|
893
987
|
return requestRootTaleApi({
|
|
894
|
-
method: "PATCH",
|
|
895
|
-
pathname: exposurePath(input.exposureId)
|
|
988
|
+
method: name === "saveCmsExposureDraft" ? "POST" : "PATCH",
|
|
989
|
+
pathname: `${exposurePath(input.exposureId)}${name === "saveCmsExposureDraft" ? "/draft" : ""}`,
|
|
896
990
|
body: {
|
|
897
991
|
...exposureBody(input),
|
|
898
992
|
expected_version: input.expectedVersion
|
|
@@ -900,16 +994,51 @@ async function callManagementTool(name, args) {
|
|
|
900
994
|
});
|
|
901
995
|
}
|
|
902
996
|
case "publishCmsExposure":
|
|
903
|
-
case "archiveCmsExposure":
|
|
904
|
-
|
|
905
|
-
|
|
997
|
+
case "archiveCmsExposure":
|
|
998
|
+
case "pauseCmsExposure":
|
|
999
|
+
case "resumeCmsExposure":
|
|
1000
|
+
case "cancelCmsExposureReservation":
|
|
1001
|
+
case "duplicateCmsExposure":
|
|
1002
|
+
case "restoreCmsExposure": {
|
|
1003
|
+
const input = (name === "publishCmsExposure" || name === "archiveCmsExposure" ? ExposureStateInput : ExposureMutationInput).parse(args);
|
|
1004
|
+
const expectedVersion = input.expectedVersion ?? VersionResponse.parse(
|
|
906
1005
|
await get(exposurePath(input.exposureId), { site_id: input.siteId })
|
|
907
|
-
);
|
|
908
|
-
const
|
|
1006
|
+
).version;
|
|
1007
|
+
const actions = {
|
|
1008
|
+
publishCmsExposure: "publish",
|
|
1009
|
+
archiveCmsExposure: "archive",
|
|
1010
|
+
pauseCmsExposure: "pause",
|
|
1011
|
+
resumeCmsExposure: "resume",
|
|
1012
|
+
cancelCmsExposureReservation: "cancel",
|
|
1013
|
+
duplicateCmsExposure: "duplicate",
|
|
1014
|
+
restoreCmsExposure: "restore"
|
|
1015
|
+
};
|
|
909
1016
|
return requestRootTaleApi({
|
|
910
1017
|
method: "POST",
|
|
911
|
-
pathname: `${exposurePath(input.exposureId)}/${
|
|
912
|
-
body: { site_id: input.siteId, expected_version:
|
|
1018
|
+
pathname: `${exposurePath(input.exposureId)}/${actions[name]}`,
|
|
1019
|
+
body: { site_id: input.siteId, expected_version: expectedVersion }
|
|
1020
|
+
});
|
|
1021
|
+
}
|
|
1022
|
+
case "updateCmsExposureSchedule": {
|
|
1023
|
+
const input = ExposureScheduleInput.parse(args);
|
|
1024
|
+
return requestRootTaleApi({
|
|
1025
|
+
method: "POST",
|
|
1026
|
+
pathname: `${exposurePath(input.exposureId)}/schedule`,
|
|
1027
|
+
body: {
|
|
1028
|
+
site_id: input.siteId,
|
|
1029
|
+
expected_version: input.expectedVersion,
|
|
1030
|
+
starts_at: input.startsAt,
|
|
1031
|
+
ends_at: input.endsAt,
|
|
1032
|
+
schedule: scheduleBody(input.schedule)
|
|
1033
|
+
}
|
|
1034
|
+
});
|
|
1035
|
+
}
|
|
1036
|
+
case "previewCmsExposure": {
|
|
1037
|
+
const input = PreviewExposureInput.parse(args);
|
|
1038
|
+
return requestRootTaleApi({
|
|
1039
|
+
method: "POST",
|
|
1040
|
+
pathname: "/v1/cms/exposures/preview",
|
|
1041
|
+
body: { ...exposureBody(input), exposure_id: input.exposureId, path: input.path, device: input.device, evaluated_at: input.evaluatedAt }
|
|
913
1042
|
});
|
|
914
1043
|
}
|
|
915
1044
|
default:
|
|
@@ -944,6 +1073,21 @@ function modelBody(input) {
|
|
|
944
1073
|
function exposureBody(input) {
|
|
945
1074
|
return {
|
|
946
1075
|
site_id: input.siteId,
|
|
1076
|
+
name: input.name,
|
|
1077
|
+
delivery: input.delivery ? {
|
|
1078
|
+
version: input.delivery.version,
|
|
1079
|
+
time_zone: input.delivery.timeZone,
|
|
1080
|
+
device: input.delivery.device,
|
|
1081
|
+
include_paths: input.delivery.includePaths,
|
|
1082
|
+
exclude_paths: input.delivery.excludePaths,
|
|
1083
|
+
delay_seconds: input.delivery.delaySeconds,
|
|
1084
|
+
scroll_percent: input.delivery.scrollPercent,
|
|
1085
|
+
dismissible: input.delivery.dismissible,
|
|
1086
|
+
hide_for_today: input.delivery.hideForToday,
|
|
1087
|
+
size: input.delivery.size,
|
|
1088
|
+
day_boundary: input.delivery.dayBoundary,
|
|
1089
|
+
schedule: scheduleBody(input.delivery.schedule)
|
|
1090
|
+
} : void 0,
|
|
947
1091
|
slot_key: input.slotKey,
|
|
948
1092
|
kind: input.kind,
|
|
949
1093
|
content: {
|
|
@@ -953,8 +1097,13 @@ function exposureBody(input) {
|
|
|
953
1097
|
description: input.content.description,
|
|
954
1098
|
asset_url: input.content.assetUrl,
|
|
955
1099
|
asset_alt: input.content.assetAlt,
|
|
1100
|
+
asset_id: input.content.assetId,
|
|
1101
|
+
mobile_asset_id: input.content.mobileAssetId,
|
|
1102
|
+
mobile_asset_url: input.content.mobileAssetUrl,
|
|
1103
|
+
mobile_asset_alt: input.content.mobileAssetAlt,
|
|
956
1104
|
link_label: input.content.linkLabel,
|
|
957
|
-
link_url: input.content.linkUrl
|
|
1105
|
+
link_url: input.content.linkUrl,
|
|
1106
|
+
link_target: input.content.linkTarget
|
|
958
1107
|
},
|
|
959
1108
|
starts_at: input.startsAt,
|
|
960
1109
|
ends_at: input.endsAt,
|
|
@@ -963,6 +1112,17 @@ function exposureBody(input) {
|
|
|
963
1112
|
repeat: input.repeat
|
|
964
1113
|
};
|
|
965
1114
|
}
|
|
1115
|
+
function scheduleBody(schedule) {
|
|
1116
|
+
return schedule ? {
|
|
1117
|
+
start_mode: schedule.startMode,
|
|
1118
|
+
start_date: schedule.startDate,
|
|
1119
|
+
start_time: schedule.startTime,
|
|
1120
|
+
end_mode: schedule.endMode,
|
|
1121
|
+
end_date: schedule.endDate,
|
|
1122
|
+
end_time: schedule.endTime,
|
|
1123
|
+
end_preset: schedule.endPreset
|
|
1124
|
+
} : void 0;
|
|
1125
|
+
}
|
|
966
1126
|
function optionalQuery2(values) {
|
|
967
1127
|
return Object.fromEntries(
|
|
968
1128
|
Object.entries(values).filter((entry) => entry[1] !== void 0)
|
|
@@ -1070,9 +1230,25 @@ function registerManagementCommands(cli) {
|
|
|
1070
1230
|
inputCommand(exposures, "update <exposure-id>", "updateCmsExposure", "exposureId");
|
|
1071
1231
|
refCommand(exposures, "publish <exposure-id>", "publishCmsExposure", "exposureId");
|
|
1072
1232
|
refCommand(exposures, "archive <exposure-id>", "archiveCmsExposure", "exposureId");
|
|
1233
|
+
inputCommand(exposures, "save-draft <exposure-id>", "saveCmsExposureDraft", "exposureId");
|
|
1234
|
+
inputCommand(exposures, "schedule <exposure-id>", "updateCmsExposureSchedule", "exposureId");
|
|
1235
|
+
inputCommand(exposures, "preview", "previewCmsExposure");
|
|
1236
|
+
for (const [command, toolName] of [
|
|
1237
|
+
["pause", "pauseCmsExposure"],
|
|
1238
|
+
["resume", "resumeCmsExposure"],
|
|
1239
|
+
["cancel", "cancelCmsExposureReservation"],
|
|
1240
|
+
["duplicate", "duplicateCmsExposure"],
|
|
1241
|
+
["restore", "restoreCmsExposure"]
|
|
1242
|
+
]) {
|
|
1243
|
+
exposures.command(`${command} <exposure-id>`).option("--site-id <id>").requiredOption("--expected-version <number>", "\uC870\uD68C\uD55C \uD604\uC7AC version", integer).action(async (exposureId, options) => runManagement(toolName, { exposureId, ...options }));
|
|
1244
|
+
}
|
|
1073
1245
|
}
|
|
1074
1246
|
function refCommand(parent, syntax, toolName, key) {
|
|
1075
|
-
parent.command(syntax).option("--site-id <id>")
|
|
1247
|
+
const command = parent.command(syntax).option("--site-id <id>");
|
|
1248
|
+
if (key === "exposureId" && (toolName === "publishCmsExposure" || toolName === "archiveCmsExposure")) {
|
|
1249
|
+
command.option("--expected-version <number>", "\uC870\uD68C\uD55C \uD604\uC7AC version", integer);
|
|
1250
|
+
}
|
|
1251
|
+
command.action(async (value, options) => runManagement(toolName, { [key]: value, ...options }));
|
|
1076
1252
|
}
|
|
1077
1253
|
function twoRefCommand(parent, syntax, toolName) {
|
|
1078
1254
|
parent.command(syntax).option("--site-id <id>").action(async (modelKey, groupKey, options) => runManagement(toolName, { modelKey, groupKey, ...options }));
|
|
@@ -1085,7 +1261,7 @@ function inputCommand(parent, syntax, toolName, firstKey, secondKey) {
|
|
|
1085
1261
|
const refs = {};
|
|
1086
1262
|
if (firstKey) refs[firstKey] = values[0];
|
|
1087
1263
|
if (secondKey) refs[secondKey] = values[1];
|
|
1088
|
-
await runManagement(toolName, { ...input, ...refs, siteId: options.siteId });
|
|
1264
|
+
await runManagement(toolName, { ...input, ...refs, ...options.siteId ? { siteId: options.siteId } : {} });
|
|
1089
1265
|
});
|
|
1090
1266
|
}
|
|
1091
1267
|
function registerMediaCommands(cli) {
|
|
@@ -1559,7 +1735,7 @@ function registerTools(server) {
|
|
|
1559
1735
|
}
|
|
1560
1736
|
|
|
1561
1737
|
// src/server.ts
|
|
1562
|
-
var VERSION = true ? "0.
|
|
1738
|
+
var VERSION = true ? "0.63.0" : "dev";
|
|
1563
1739
|
var SERVER_INSTRUCTIONS = `
|
|
1564
1740
|
roottale-cms-mcp\uB294 RootTale CMS\uB97C \uC678\uBD80 \uC0AC\uC774\uD2B8(\uC8FC\uB85C Next.js)\uC5D0 \uC5F0\uB3D9\uD558\uACE0
|
|
1565
1741
|
\uAE00\xB7\uC378\uB124\uC77C\xB7\uBCF8\uBB38 \uC774\uBBF8\uC9C0\uB97C \uC790\uB3D9\uD654\uD558\uAE30 \uC704\uD55C \uBB38\uC11C\xB7\uC608\uC2DC \uCF54\uB4DC\xB7API tool\uC744 \uC81C\uACF5\uD569\uB2C8\uB2E4.
|