@vcp-dev/contracts 0.6.10 → 0.7.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.
Files changed (78) hide show
  1. package/README.md +5 -4
  2. package/dist/api-response.d.ts +11 -0
  3. package/dist/business-facts.d.ts +23 -0
  4. package/dist/cms-page-directory.d.ts +281 -0
  5. package/dist/cms-site-id.d.ts +4 -0
  6. package/dist/colorway-distinctness.js +1 -1
  7. package/dist/connect-dynamic-collection.d.ts +7 -3
  8. package/dist/connect-form.d.ts +7 -5
  9. package/dist/conversion-hints.d.ts +37 -0
  10. package/dist/crawler-task-service.d.ts +594 -0
  11. package/dist/custom-domain.d.ts +120 -206
  12. package/dist/customer-materials.d.ts +196 -0
  13. package/dist/deployment-lifecycle.d.ts +45 -0
  14. package/dist/deployment-progress.d.ts +51 -0
  15. package/dist/design-tokens.d.ts +1 -0
  16. package/dist/design-tokens.js +1 -1
  17. package/dist/designer-component-library.d.ts +9 -7
  18. package/dist/designer-page-library.d.ts +36 -40
  19. package/dist/e2b-preview-proxy.d.ts +5 -0
  20. package/dist/external-site-edit.d.ts +267 -0
  21. package/dist/firecrawl-internal.d.ts +122 -0
  22. package/dist/font-catalog.d.ts +5 -2
  23. package/dist/form-design.d.ts +109 -69
  24. package/dist/google-search-console.d.ts +317 -0
  25. package/dist/index.d.ts +7110 -1965
  26. package/dist/index.js +1 -1
  27. package/dist/industry-classification.d.ts +43 -0
  28. package/dist/input-context-bundle.d.ts +16 -6
  29. package/dist/internal-entity-id.d.ts +3 -0
  30. package/dist/knowledge-category.d.ts +20 -0
  31. package/dist/knowledge-source-readiness.d.ts +94 -0
  32. package/dist/launcher-prompt-templates.d.ts +742 -0
  33. package/dist/media-library.d.ts +164 -0
  34. package/dist/migration-products.d.ts +45 -0
  35. package/dist/page-slug.d.ts +2 -0
  36. package/dist/page-template.d.ts +95 -0
  37. package/dist/product-search.d.ts +227 -0
  38. package/dist/site-build.d.ts +563 -0
  39. package/dist/site-design-presets.d.ts +20 -0
  40. package/dist/site-edit-capability.d.ts +13 -1
  41. package/dist/site-edit-class-name-source.d.ts +40 -8
  42. package/dist/site-edit-command-result.d.ts +15 -4
  43. package/dist/site-edit-composition.d.ts +13 -0
  44. package/dist/site-edit-event.d.ts +76 -14
  45. package/dist/site-edit-history-status.d.ts +193 -0
  46. package/dist/site-edit-operation.d.ts +205 -62
  47. package/dist/site-edit-page-composition.d.ts +101 -22
  48. package/dist/site-edit-patch-plan.d.ts +49 -3
  49. package/dist/site-edit-render-document.d.ts +67 -17
  50. package/dist/site-edit-session.d.ts +5 -2
  51. package/dist/site-edit-source.d.ts +60 -11
  52. package/dist/site-edit-version.d.ts +1 -1
  53. package/dist/site-extra-requirement.d.ts +31 -0
  54. package/dist/site-locale.d.ts +20 -0
  55. package/dist/site-localization-fields.d.ts +196 -0
  56. package/dist/site-localization-scope.d.ts +95 -0
  57. package/dist/site-preview.d.ts +65 -0
  58. package/dist/site-publish-domain.d.ts +680 -0
  59. package/dist/site-publish-workflow.d.ts +612 -0
  60. package/dist/site-workflow-completions.d.ts +163 -0
  61. package/dist/site-workflow.d.ts +1026 -0
  62. package/dist/sitemap-navigation.d.ts +12 -0
  63. package/dist/step2-page-selection.d.ts +88 -0
  64. package/dist/step2-site-initialization.d.ts +500 -0
  65. package/dist/step3-digital-employee-analysis.d.ts +661 -0
  66. package/dist/step4-diagnosis.d.ts +272 -0
  67. package/dist/step5-strategy.d.ts +8076 -0
  68. package/dist/step6-design.d.ts +986 -0
  69. package/dist/subsite-localization-input.d.ts +121 -0
  70. package/dist/subsite-mount-path.d.ts +23 -0
  71. package/dist/subsite-visible-text-export.d.ts +22 -0
  72. package/dist/template-upgrade-observability.d.ts +2 -2
  73. package/dist/theme-presets.d.ts +56 -1
  74. package/dist/user-facing-copy.d.ts +1 -0
  75. package/dist/workspace-design-apply.d.ts +5 -0
  76. package/dist/workspace-resource-operation.d.ts +75 -33
  77. package/package.json +2 -1
  78. package/dist/publish-plan.d.ts +0 -54
@@ -0,0 +1,121 @@
1
+ import { z } from "zod";
2
+ /**
3
+ * 子站本地化的**上游可传入参**合同:术语表与站点信息。
4
+ *
5
+ * 两项都可选,两项都遵循同一条取向:**服务不猜上游本该给的东西**。子站编排链路
6
+ * 上只有调用方知道「这个品牌词该译成什么」「这个站是做什么的」,服务端能做的只是
7
+ * 从主站已有数据里尽力还原一份兜底;传了就用传的,没传才走兜底。
8
+ *
9
+ * 三个使用点共用本文件:`apps/api` 公网入口(subsites.controller)、
10
+ * 该入口组装的入队 payload(subsites.service)、以及 `services/subsite-service`
11
+ * 侧对 payload 的读取。口径只此一份。
12
+ */
13
+ /** 单条术语表条目的长度上限。原文与译文都是短语,超长即为误用。 */
14
+ export declare const SUBSITE_GLOSSARY_ENTRY_MAX_CHARS = 200;
15
+ /**
16
+ * 术语表条目数上限。术语表随**每一个**翻译批次一起发出去(不是每站一次),
17
+ * 条数直接乘进每批的输入 token,因此必须有上界。
18
+ */
19
+ export declare const SUBSITE_GLOSSARY_MAX_ENTRIES = 200;
20
+ /**
21
+ * 术语表条目的形态:`"原文:译文"`,半角冒号分隔,取第一个冒号为分隔点
22
+ * (译文里可以再出现冒号)。
23
+ *
24
+ * ✓ 实测(dev 翻译服务,2026-08-16):术语表是**以指令方式交给模型**的,不是
25
+ * 字符串替换——同一批 6 条含品牌词的中文,不带术语表时译名在
26
+ * `SANY Heavy Industry` 与 `Sany Heavy Industry` 之间三三分裂;带上
27
+ * `三一重工:SANY` 后 6/6 全部落在 `SANY`。这正是「一个品牌名在产出站里裂成三种
28
+ * 写法」这条缺陷的修法。
29
+ *
30
+ * 返回 `null` 表示形态不合格(没有冒号、冒号在首位、或某一侧只有空白)。
31
+ */
32
+ export declare function splitSubsiteGlossaryEntry(entry: string): {
33
+ readonly source: string;
34
+ readonly target: string;
35
+ } | null;
36
+ /**
37
+ * 单条术语表条目。**刻意不做 transform**:schema effect 会让 `z.toJSONSchema`
38
+ * 抛错,连带炸掉 OpenAPI 文档生成(与 `SubsiteMountPathSchema` 同一条约束)。
39
+ * refine 只校验不改值,条目原样进入翻译请求体。
40
+ */
41
+ export declare const SubsiteGlossaryEntrySchema: z.ZodString;
42
+ export declare const SubsiteGlossariesSchema: z.ZodArray<z.ZodString>;
43
+ /**
44
+ * 翻译服务的站点上下文。
45
+ *
46
+ * **只有 `website_name` 必填**,行业与一句话简介可缺。✓ 实测(dev,2026-08-16):
47
+ * 该服务对 `site_info` 既不强制存在、也不要求三项齐全——完全不带 `site_info`
48
+ * 与只带 `website_name` 都返回 200 且译文正常。因此「凑不齐三项」不是中止本地化
49
+ * 的正当理由:缺的字段省略掉,照常翻译,把不完整记成可观测的降级信号。
50
+ */
51
+ export declare const SubsiteSiteInfoSchema: z.ZodObject<{
52
+ website_name: z.ZodString;
53
+ website_industry: z.ZodOptional<z.ZodString>;
54
+ website_description: z.ZodOptional<z.ZodString>;
55
+ }, z.core.$strip>;
56
+ export type SubsiteSiteInfo = z.infer<typeof SubsiteSiteInfoSchema>;
57
+ /**
58
+ * 配色本地化档位。
59
+ *
60
+ * **只约束颜色与明暗底面,不约束图片**:`fonts_only` 档下用户在 `note` 里写的
61
+ * 换图诉求仍然生效。档位这个词容易被读成「什么都不变」,界面提示语必须写明这一点。
62
+ *
63
+ * 只有两档,却覆盖三级优先级:锁定色值不是第三种模式,而是在 `regional` 档下
64
+ * 按槽施加的约束(见 `SubsitePaletteSeedsSchema`)。
65
+ */
66
+ export declare const SubsitePaletteModeSchema: z.ZodEnum<{
67
+ regional: "regional";
68
+ fonts_only: "fonts_only";
69
+ }>;
70
+ export type SubsitePaletteMode = z.infer<typeof SubsitePaletteModeSchema>;
71
+ /**
72
+ * 用户锁定的色值。只接受 `#rrggbb`——界面给的是取色器,出来就是十六进制;
73
+ * 模型面 schema 允许 CSS 颜色名是给模型的宽容度,用户输入不需要那份宽容。
74
+ *
75
+ * **刻意不做 transform**:schema effect 会让 `z.toJSONSchema` 抛错,连带炸掉
76
+ * OpenAPI 文档生成(与 `SubsiteGlossaryEntrySchema` 同一条约束)。
77
+ */
78
+ export declare const SubsiteHexColorSchema: z.ZodString;
79
+ /**
80
+ * 四个角色与 `DesignColorSeeds` 一一对应,不自造一套命名。**逐槽可选**:
81
+ * 填了的槽服务端强制覆盖模型产出,空槽交给模型按目标地区补齐。
82
+ */
83
+ export declare const SubsitePaletteSeedsSchema: z.ZodObject<{
84
+ primary: z.ZodOptional<z.ZodString>;
85
+ accent: z.ZodOptional<z.ZodString>;
86
+ foreground: z.ZodOptional<z.ZodString>;
87
+ neutral: z.ZodOptional<z.ZodString>;
88
+ }, z.core.$strip>;
89
+ export type SubsitePaletteSeeds = z.infer<typeof SubsitePaletteSeedsSchema>;
90
+ /** 风格补充说明的长度上限。整段进用户提示词,必须有上界。 */
91
+ export declare const SUBSITE_PALETTE_NOTE_MAX_CHARS = 600;
92
+ export declare const SubsitePaletteLocalizationSchema: z.ZodObject<{
93
+ mode: z.ZodDefault<z.ZodEnum<{
94
+ regional: "regional";
95
+ fonts_only: "fonts_only";
96
+ }>>;
97
+ seeds: z.ZodOptional<z.ZodObject<{
98
+ primary: z.ZodOptional<z.ZodString>;
99
+ accent: z.ZodOptional<z.ZodString>;
100
+ foreground: z.ZodOptional<z.ZodString>;
101
+ neutral: z.ZodOptional<z.ZodString>;
102
+ }, z.core.$strip>>;
103
+ note: z.ZodOptional<z.ZodString>;
104
+ }, z.core.$strip>;
105
+ export type SubsitePaletteLocalization = z.infer<typeof SubsitePaletteLocalizationSchema>;
106
+ /**
107
+ * 缺省档位。
108
+ *
109
+ * 存在的理由是一个容易踩的 zod 行为:上游把整个 `palette` 声明成 `.optional()`
110
+ * 之后,字段整体缺席时解析结果是 `undefined`,内层 `mode` 的 `.default()`
111
+ * **根本没机会触发**。若不在服务端显式补这一格,`undefined` 会一路传到底,
112
+ * 而下游每一层都得自己猜「空了算哪档」——同样的请求会产出不同结果。
113
+ */
114
+ export declare const DEFAULT_SUBSITE_PALETTE: SubsitePaletteLocalization;
115
+ /**
116
+ * 是否锁了至少一个色值槽。
117
+ *
118
+ * 两个使用点共用:公网入口据此拒绝「只改字体 + 又锁了色值」这种矛盾输入;
119
+ * 决策侧据此决定要不要逐槽压掉模型的颜色产出。
120
+ */
121
+ export declare function hasLockedSeeds(seeds: SubsitePaletteSeeds | undefined): boolean;
@@ -0,0 +1,23 @@
1
+ import { z } from "zod";
2
+ /**
3
+ * 子站挂载路径合同(设计 5.3 约束 3):单层、小写、带前导斜杠、不带尾斜杠,
4
+ * 形如 `/fr`。三个校验点——apps/api 公网入口(subsites.controller)、
5
+ * apps/api 内部回写(internal-subsites.controller)、subsite-service 入队
6
+ * (subsite-jobs.controller)——共用本文件,口径只此一份。
7
+ */
8
+ export declare const SUBSITE_MOUNT_PATH_PATTERN: RegExp;
9
+ /**
10
+ * 设计 5.4 保留段清单:主站基础设施占用的一级路径,不得作为 `mount_path`。
11
+ * `_next` / `robots.txt` / `sitemap.xml` / `.well-known` 当前已被字符集正则
12
+ * 天然挡掉(下划线与点号不在集合内),仍全量列出——保留段语义不依赖正则的
13
+ * 具体收紧程度,正则将来放宽(如允许点号后缀)时清单继续兜底。
14
+ */
15
+ export declare const SUBSITE_RESERVED_MOUNT_SEGMENTS: readonly ["api", "_next", "assets", "static", "robots.txt", "sitemap.xml", ".well-known"];
16
+ /** 传入不带前导斜杠的一级段(如 `api`)。 */
17
+ export declare function isReservedSubsiteMountSegment(segment: string): boolean;
18
+ /**
19
+ * 唯一的 `mount_path` 校验 schema:形态正则 + 保留段拦截。
20
+ * 刻意不做 transform(schema effect 会让 `z.toJSONSchema` 抛错,
21
+ * 连带炸掉 OpenAPI 文档生成),refine 仅校验不改值。
22
+ */
23
+ export declare const SubsiteMountPathSchema: z.ZodString;
@@ -0,0 +1,22 @@
1
+ import { z } from "zod";
2
+ /**
3
+ * apps/api 调用 subsite-service 导出站点静态可见文本时的内部合同。
4
+ * tenant_id 是主库 text 主键(例如 tenant_dev),不是 UUID。
5
+ */
6
+ export declare const SubsiteVisibleTextExportRequestSchema: z.ZodObject<{
7
+ tenant_id: z.ZodString;
8
+ site_id: z.ZodUUID;
9
+ snapshot_id: z.ZodUUID;
10
+ manifest_hash: z.ZodString;
11
+ object_key: z.ZodString;
12
+ }, z.core.$strip>;
13
+ export type SubsiteVisibleTextExportRequest = z.infer<typeof SubsiteVisibleTextExportRequestSchema>;
14
+ /** 内部服务返回 Markdown 正文及可审计计数;公网接口只下载 markdown 字段。 */
15
+ export declare const SubsiteVisibleTextExportResponseSchema: z.ZodObject<{
16
+ site_id: z.ZodUUID;
17
+ snapshot_id: z.ZodUUID;
18
+ unit_count: z.ZodNumber;
19
+ file_count: z.ZodNumber;
20
+ markdown: z.ZodString;
21
+ }, z.core.$strip>;
22
+ export type SubsiteVisibleTextExportResponse = z.infer<typeof SubsiteVisibleTextExportResponseSchema>;
@@ -19,8 +19,8 @@ export declare const TemplateUpgradeValidationStageSchema: z.ZodEnum<{
19
19
  }>;
20
20
  export type TemplateUpgradeValidationStage = z.infer<typeof TemplateUpgradeValidationStageSchema>;
21
21
  export declare const TemplateUpgradeCasOutcomeSchema: z.ZodEnum<{
22
- not_attempted: "not_attempted";
23
22
  promoted: "promoted";
23
+ not_attempted: "not_attempted";
24
24
  aborted: "aborted";
25
25
  }>;
26
26
  export type TemplateUpgradeCasOutcome = z.infer<typeof TemplateUpgradeCasOutcomeSchema>;
@@ -50,8 +50,8 @@ export declare const RecordTemplateUpgradeEventRequestSchema: z.ZodObject<{
50
50
  validation: "validation";
51
51
  }>>;
52
52
  cas_outcome: z.ZodNullable<z.ZodEnum<{
53
- not_attempted: "not_attempted";
54
53
  promoted: "promoted";
54
+ not_attempted: "not_attempted";
55
55
  aborted: "aborted";
56
56
  }>>;
57
57
  }, z.core.$strict>;
@@ -6,13 +6,68 @@
6
6
  * resources (workspace ns, keyed by preset id) and switch with the locale;
7
7
  * the preset itself only holds stable data (id + seeds), never a label.
8
8
  */
9
- export type ThemePresetId = "ocean" | "forest" | "clay" | "violet" | "graphite" | "crimson";
9
+ import type { SiteDesignRadiusId } from "./site-design-presets.js";
10
+ export declare const THEME_PRESET_IDS: readonly ["ocean", "forest", "clay", "violet", "graphite", "crimson"];
11
+ export type ThemePresetId = (typeof THEME_PRESET_IDS)[number];
12
+ /**
13
+ * 旧 Step6 AI 目录的主题 id(`ai-*`)。生成式主题卡上线后不再有新推荐使用
14
+ * 这些 id,仅保留给存量 selection 行与历史推荐读取兼容(schema 并集的一员)。
15
+ */
16
+ export declare const STEP6_AI_THEME_IDS: readonly ["ai-forest", "ai-navy", "ai-steel"];
17
+ export type Step6AiThemeId = (typeof STEP6_AI_THEME_IDS)[number];
18
+ /**
19
+ * 生成式主题卡 id:API 侧按卡片内容确定性派生(见 step6-design.service 的
20
+ * 拼接序列化),形状 `gen-` + 8 位小写 hex。内容相同则 id 相同。
21
+ */
22
+ export declare const STEP6_GENERATED_THEME_ID_PATTERN: RegExp;
23
+ export type Step6GeneratedThemeId = `gen-${string}`;
24
+ export type SiteDesignThemeId = ThemePresetId | Step6AiThemeId | Step6GeneratedThemeId;
10
25
  export interface ThemePreset {
11
26
  /** Stable identity; the i18n display name keys off this. */
12
27
  id: ThemePresetId;
13
28
  colorSeeds: {
14
29
  primary: string;
15
30
  accent: string;
31
+ foreground: string;
16
32
  };
33
+ surfaceMode: "light" | "dark";
34
+ /**
35
+ * 该主题的默认圆角档位。用户在 Step6 换主题时随之带出,
36
+ * 之后仍可单独调整;调整过就不再被换主题覆盖。
37
+ */
38
+ radius: SiteDesignRadiusId;
17
39
  }
40
+ export interface Step6AiThemePreset {
41
+ /**
42
+ * 旧目录 id(`ai-*`)。新推荐不再使用——生成卡用 `gen-*` id、fallback 卡也按
43
+ * 内容派生 `gen-*` id。保留该字段只为记录每套 fallback 内容对应的旧目录身份,
44
+ * 并让 `getSiteDesignThemeRadius` 能回答存量 `ai-*` 选择的圆角回退。
45
+ */
46
+ id: Step6AiThemeId;
47
+ name: string;
48
+ description: string;
49
+ /** fallback 卡的原因文案(为什么这套适合作为默认兜底)。 */
50
+ fallbackReason: string;
51
+ colorSeeds: {
52
+ primary: string;
53
+ accent: string;
54
+ foreground: string;
55
+ };
56
+ surfaceMode: "light" | "dark";
57
+ radius: SiteDesignRadiusId;
58
+ }
59
+ /**
60
+ * Step6 设计推荐的 deterministic fallback 内容:模型生成连续失败时,API 侧用
61
+ * 这三套人工调过的锚点造卡(`buildStep6FallbackThemeCards`),保证「卡必达」。
62
+ * 不再是模型排序的目录——生成式方案里颜色由模型按站点现场 authoring。
63
+ */
64
+ export declare const STEP6_AI_THEME_PRESETS: readonly Step6AiThemePreset[];
18
65
  export declare const THEME_PRESETS: readonly ThemePreset[];
66
+ export declare function getThemePreset(id: ThemePresetId): ThemePreset;
67
+ /**
68
+ * 主题(含存量 `ai-*` 候选)对应的默认圆角档位。id 不认识时返回 undefined,
69
+ * 由调用方决定回退,避免在合同层吞掉未知主题。生成卡(`gen-*`)自带 radius,
70
+ * 不走这里。入参放宽为 string:zod 的 regex schema 推断类型是 string,
71
+ * 本函数只做查表,不认识就 undefined。
72
+ */
73
+ export declare function getSiteDesignThemeRadius(id: string): SiteDesignRadiusId | undefined;
@@ -23,6 +23,7 @@ export declare const ERROR_COPY: {
23
23
  readonly WORKSPACE_MODEL_STREAM_ABORTED: "Generation was interrupted before finishing. Please try again.";
24
24
  readonly MODEL_OUTPUT_TRUNCATED: "The response was too long and was cut off before any change was applied. Try again, or split the request into smaller changes.";
25
25
  readonly WORKSPACE_EDIT_NOT_APPLIED: "No change was applied. Try describing the change differently.";
26
+ readonly PRODUCT_SEARCH_APPLY_NOT_AVAILABLE: "Product search changes aren't available yet. Please try again later.";
26
27
  readonly WORKSPACE_INITIAL_EXECUTION_FAILED: "Initial generation failed. Please retry from the brief.";
27
28
  readonly WORKSPACE_INITIAL_GENERATION_CHECK_FAILED: "Initial generation could not be verified. Please retry.";
28
29
  readonly WORKSPACE_INITIAL_GENERATION_FINALIZE_FAILED: "Initial generation could not finalize. Please retry.";
@@ -4,7 +4,12 @@ export declare const WorkspaceDesignApplyRequestSchema: z.ZodObject<{
4
4
  colorSeeds: z.ZodOptional<z.ZodObject<{
5
5
  primary: z.ZodString;
6
6
  accent: z.ZodString;
7
+ foreground: z.ZodOptional<z.ZodString>;
7
8
  }, z.core.$strict>>;
9
+ surfaceMode: z.ZodOptional<z.ZodEnum<{
10
+ light: "light";
11
+ dark: "dark";
12
+ }>>;
8
13
  fonts: z.ZodOptional<z.ZodObject<{
9
14
  heading: z.ZodString;
10
15
  body: z.ZodString;
@@ -1,14 +1,14 @@
1
1
  import { z } from "zod";
2
2
  export declare const WorkspaceResourceKindSchema: z.ZodEnum<{
3
- page: "page";
4
3
  pages: "pages";
4
+ page: "page";
5
5
  component: "component";
6
6
  }>;
7
7
  export type WorkspaceResourceKind = z.infer<typeof WorkspaceResourceKindSchema>;
8
8
  export declare const WorkspaceResourceOperationSummarySchema: z.ZodObject<{
9
9
  resource_kind: z.ZodEnum<{
10
- page: "page";
11
10
  pages: "pages";
11
+ page: "page";
12
12
  component: "component";
13
13
  }>;
14
14
  resource_name: z.ZodString;
@@ -35,7 +35,10 @@ export declare const WorkspaceResourceOperationTransientInputSchema: z.ZodObject
35
35
  id: z.ZodString;
36
36
  siteId: z.ZodUUID;
37
37
  baseSnapshotId: z.ZodUUID;
38
- routeId: z.ZodOptional<z.ZodString>;
38
+ composition: z.ZodObject<{
39
+ routeId: z.ZodString;
40
+ templateId: z.ZodOptional<z.ZodString>;
41
+ }, z.core.$strict>;
39
42
  kind: z.ZodEnum<{
40
43
  "insert-child": "insert-child";
41
44
  "update-text": "update-text";
@@ -47,24 +50,31 @@ export declare const WorkspaceResourceOperationTransientInputSchema: z.ZodObject
47
50
  "apply-style-draft": "apply-style-draft";
48
51
  "source-edit": "source-edit";
49
52
  "insert-page-resource": "insert-page-resource";
53
+ "delete-page-source": "delete-page-source";
50
54
  }>;
51
55
  target: z.ZodDiscriminatedUnion<[z.ZodObject<{
52
56
  kind: z.ZodLiteral<"node">;
53
57
  key: z.ZodString;
54
- }, z.core.$strip>, z.ZodObject<{
58
+ }, z.core.$strict>, z.ZodObject<{
55
59
  kind: z.ZodLiteral<"page-unit">;
56
- routeId: z.ZodString;
60
+ composition: z.ZodObject<{
61
+ routeId: z.ZodString;
62
+ templateId: z.ZodOptional<z.ZodString>;
63
+ }, z.core.$strict>;
57
64
  placementUnitKey: z.ZodString;
58
65
  }, z.core.$strict>, z.ZodObject<{
59
66
  kind: z.ZodLiteral<"route">;
60
- routeId: z.ZodString;
61
- }, z.core.$strip>, z.ZodObject<{
67
+ composition: z.ZodObject<{
68
+ routeId: z.ZodString;
69
+ templateId: z.ZodOptional<z.ZodString>;
70
+ }, z.core.$strict>;
71
+ }, z.core.$strict>, z.ZodObject<{
62
72
  kind: z.ZodLiteral<"source-file">;
63
73
  path: z.ZodString;
64
- }, z.core.$strip>, z.ZodObject<{
74
+ }, z.core.$strict>, z.ZodObject<{
65
75
  kind: z.ZodLiteral<"source-batch">;
66
76
  paths: z.ZodArray<z.ZodString>;
67
- }, z.core.$strip>, z.ZodObject<{
77
+ }, z.core.$strict>, z.ZodObject<{
68
78
  kind: z.ZodLiteral<"project">;
69
79
  }, z.core.$strict>], "kind">;
70
80
  documentVersion: z.ZodNumber;
@@ -143,7 +153,10 @@ export declare const WorkspaceResourceOperationTransientInputSchema: z.ZodObject
143
153
  kind: z.ZodLiteral<"page-composition">;
144
154
  placementKey: z.ZodString;
145
155
  documentVersion: z.ZodNumber;
146
- routeId: z.ZodString;
156
+ composition: z.ZodObject<{
157
+ routeId: z.ZodString;
158
+ templateId: z.ZodOptional<z.ZodString>;
159
+ }, z.core.$strict>;
147
160
  placementUnitKey: z.ZodString;
148
161
  relation: z.ZodEnum<{
149
162
  before: "before";
@@ -155,6 +168,10 @@ export declare const WorkspaceResourceOperationTransientInputSchema: z.ZodObject
155
168
  kind: z.ZodLiteral<"page-composition">;
156
169
  placementKey: z.ZodString;
157
170
  documentVersion: z.ZodNumber;
171
+ composition: z.ZodObject<{
172
+ routeId: z.ZodString;
173
+ templateId: z.ZodOptional<z.ZodString>;
174
+ }, z.core.$strict>;
158
175
  }, z.core.$strict>]>;
159
176
  }, z.core.$strip>, z.ZodObject<{
160
177
  kind: z.ZodLiteral<"move-node">;
@@ -174,7 +191,10 @@ export declare const WorkspaceResourceOperationTransientInputSchema: z.ZodObject
174
191
  kind: z.ZodLiteral<"page-composition">;
175
192
  placementKey: z.ZodString;
176
193
  documentVersion: z.ZodNumber;
177
- routeId: z.ZodString;
194
+ composition: z.ZodObject<{
195
+ routeId: z.ZodString;
196
+ templateId: z.ZodOptional<z.ZodString>;
197
+ }, z.core.$strict>;
178
198
  placementUnitKey: z.ZodString;
179
199
  relation: z.ZodEnum<{
180
200
  before: "before";
@@ -186,7 +206,6 @@ export declare const WorkspaceResourceOperationTransientInputSchema: z.ZodObject
186
206
  preserveBindings: z.ZodOptional<z.ZodBoolean>;
187
207
  }, z.core.$strip>, z.ZodObject<{
188
208
  kind: z.ZodLiteral<"set-class-name-source">;
189
- routeId: z.ZodOptional<z.ZodString>;
190
209
  filePath: z.ZodString;
191
210
  expectedVersion: z.ZodObject<{
192
211
  documentVersion: z.ZodNumber;
@@ -227,7 +246,6 @@ export declare const WorkspaceResourceOperationTransientInputSchema: z.ZodObject
227
246
  }, z.core.$strip>, z.ZodObject<{
228
247
  kind: z.ZodLiteral<"apply-style-draft">;
229
248
  className: z.ZodOptional<z.ZodObject<{
230
- routeId: z.ZodOptional<z.ZodString>;
231
249
  filePath: z.ZodString;
232
250
  expectedVersion: z.ZodObject<{
233
251
  documentVersion: z.ZodNumber;
@@ -289,11 +307,11 @@ export declare const WorkspaceResourceOperationTransientInputSchema: z.ZodObject
289
307
  artifact: z.ZodObject<{
290
308
  resource_id: z.ZodString;
291
309
  resource_type: z.ZodEnum<{
292
- page: "page";
293
310
  pages: "pages";
311
+ page: "page";
294
312
  }>;
295
- resolved_version: z.ZodString;
296
- revision_id: z.ZodString;
313
+ resolved_version: z.ZodNumber;
314
+ revision_id: z.ZodOptional<z.ZodString>;
297
315
  digest_sha256: z.ZodString;
298
316
  components: z.ZodArray<z.ZodObject<{
299
317
  component_id: z.ZodString;
@@ -345,8 +363,11 @@ export declare const WorkspaceResourceOperationTransientInputSchema: z.ZodObject
345
363
  }, z.core.$strict>>;
346
364
  project_dependencies: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodNever>>;
347
365
  }, z.core.$strict>;
366
+ }, z.core.$strict>, z.ZodObject<{
367
+ kind: z.ZodLiteral<"delete-page-source">;
368
+ expectedUrlPath: z.ZodString;
348
369
  }, z.core.$strict>], "kind">;
349
- }, z.core.$strip>;
370
+ }, z.core.$strict>;
350
371
  navigation_selection: z.ZodOptional<z.ZodDiscriminatedUnion<[z.ZodObject<{
351
372
  kind: z.ZodLiteral<"none">;
352
373
  }, z.core.$strict>, z.ZodObject<{
@@ -370,8 +391,8 @@ export declare const WorkspaceResourceOperationClientMessageSchema: z.ZodObject<
370
391
  client_message_id: z.ZodString;
371
392
  display: z.ZodObject<{
372
393
  resource_kind: z.ZodEnum<{
373
- page: "page";
374
394
  pages: "pages";
395
+ page: "page";
375
396
  component: "component";
376
397
  }>;
377
398
  resource_name: z.ZodString;
@@ -387,7 +408,10 @@ export declare const WorkspaceResourceOperationClientMessageSchema: z.ZodObject<
387
408
  id: z.ZodString;
388
409
  siteId: z.ZodUUID;
389
410
  baseSnapshotId: z.ZodUUID;
390
- routeId: z.ZodOptional<z.ZodString>;
411
+ composition: z.ZodObject<{
412
+ routeId: z.ZodString;
413
+ templateId: z.ZodOptional<z.ZodString>;
414
+ }, z.core.$strict>;
391
415
  kind: z.ZodEnum<{
392
416
  "insert-child": "insert-child";
393
417
  "update-text": "update-text";
@@ -399,24 +423,31 @@ export declare const WorkspaceResourceOperationClientMessageSchema: z.ZodObject<
399
423
  "apply-style-draft": "apply-style-draft";
400
424
  "source-edit": "source-edit";
401
425
  "insert-page-resource": "insert-page-resource";
426
+ "delete-page-source": "delete-page-source";
402
427
  }>;
403
428
  target: z.ZodDiscriminatedUnion<[z.ZodObject<{
404
429
  kind: z.ZodLiteral<"node">;
405
430
  key: z.ZodString;
406
- }, z.core.$strip>, z.ZodObject<{
431
+ }, z.core.$strict>, z.ZodObject<{
407
432
  kind: z.ZodLiteral<"page-unit">;
408
- routeId: z.ZodString;
433
+ composition: z.ZodObject<{
434
+ routeId: z.ZodString;
435
+ templateId: z.ZodOptional<z.ZodString>;
436
+ }, z.core.$strict>;
409
437
  placementUnitKey: z.ZodString;
410
438
  }, z.core.$strict>, z.ZodObject<{
411
439
  kind: z.ZodLiteral<"route">;
412
- routeId: z.ZodString;
413
- }, z.core.$strip>, z.ZodObject<{
440
+ composition: z.ZodObject<{
441
+ routeId: z.ZodString;
442
+ templateId: z.ZodOptional<z.ZodString>;
443
+ }, z.core.$strict>;
444
+ }, z.core.$strict>, z.ZodObject<{
414
445
  kind: z.ZodLiteral<"source-file">;
415
446
  path: z.ZodString;
416
- }, z.core.$strip>, z.ZodObject<{
447
+ }, z.core.$strict>, z.ZodObject<{
417
448
  kind: z.ZodLiteral<"source-batch">;
418
449
  paths: z.ZodArray<z.ZodString>;
419
- }, z.core.$strip>, z.ZodObject<{
450
+ }, z.core.$strict>, z.ZodObject<{
420
451
  kind: z.ZodLiteral<"project">;
421
452
  }, z.core.$strict>], "kind">;
422
453
  documentVersion: z.ZodNumber;
@@ -495,7 +526,10 @@ export declare const WorkspaceResourceOperationClientMessageSchema: z.ZodObject<
495
526
  kind: z.ZodLiteral<"page-composition">;
496
527
  placementKey: z.ZodString;
497
528
  documentVersion: z.ZodNumber;
498
- routeId: z.ZodString;
529
+ composition: z.ZodObject<{
530
+ routeId: z.ZodString;
531
+ templateId: z.ZodOptional<z.ZodString>;
532
+ }, z.core.$strict>;
499
533
  placementUnitKey: z.ZodString;
500
534
  relation: z.ZodEnum<{
501
535
  before: "before";
@@ -507,6 +541,10 @@ export declare const WorkspaceResourceOperationClientMessageSchema: z.ZodObject<
507
541
  kind: z.ZodLiteral<"page-composition">;
508
542
  placementKey: z.ZodString;
509
543
  documentVersion: z.ZodNumber;
544
+ composition: z.ZodObject<{
545
+ routeId: z.ZodString;
546
+ templateId: z.ZodOptional<z.ZodString>;
547
+ }, z.core.$strict>;
510
548
  }, z.core.$strict>]>;
511
549
  }, z.core.$strip>, z.ZodObject<{
512
550
  kind: z.ZodLiteral<"move-node">;
@@ -526,7 +564,10 @@ export declare const WorkspaceResourceOperationClientMessageSchema: z.ZodObject<
526
564
  kind: z.ZodLiteral<"page-composition">;
527
565
  placementKey: z.ZodString;
528
566
  documentVersion: z.ZodNumber;
529
- routeId: z.ZodString;
567
+ composition: z.ZodObject<{
568
+ routeId: z.ZodString;
569
+ templateId: z.ZodOptional<z.ZodString>;
570
+ }, z.core.$strict>;
530
571
  placementUnitKey: z.ZodString;
531
572
  relation: z.ZodEnum<{
532
573
  before: "before";
@@ -538,7 +579,6 @@ export declare const WorkspaceResourceOperationClientMessageSchema: z.ZodObject<
538
579
  preserveBindings: z.ZodOptional<z.ZodBoolean>;
539
580
  }, z.core.$strip>, z.ZodObject<{
540
581
  kind: z.ZodLiteral<"set-class-name-source">;
541
- routeId: z.ZodOptional<z.ZodString>;
542
582
  filePath: z.ZodString;
543
583
  expectedVersion: z.ZodObject<{
544
584
  documentVersion: z.ZodNumber;
@@ -579,7 +619,6 @@ export declare const WorkspaceResourceOperationClientMessageSchema: z.ZodObject<
579
619
  }, z.core.$strip>, z.ZodObject<{
580
620
  kind: z.ZodLiteral<"apply-style-draft">;
581
621
  className: z.ZodOptional<z.ZodObject<{
582
- routeId: z.ZodOptional<z.ZodString>;
583
622
  filePath: z.ZodString;
584
623
  expectedVersion: z.ZodObject<{
585
624
  documentVersion: z.ZodNumber;
@@ -641,11 +680,11 @@ export declare const WorkspaceResourceOperationClientMessageSchema: z.ZodObject<
641
680
  artifact: z.ZodObject<{
642
681
  resource_id: z.ZodString;
643
682
  resource_type: z.ZodEnum<{
644
- page: "page";
645
683
  pages: "pages";
684
+ page: "page";
646
685
  }>;
647
- resolved_version: z.ZodString;
648
- revision_id: z.ZodString;
686
+ resolved_version: z.ZodNumber;
687
+ revision_id: z.ZodOptional<z.ZodString>;
649
688
  digest_sha256: z.ZodString;
650
689
  components: z.ZodArray<z.ZodObject<{
651
690
  component_id: z.ZodString;
@@ -697,8 +736,11 @@ export declare const WorkspaceResourceOperationClientMessageSchema: z.ZodObject<
697
736
  }, z.core.$strict>>;
698
737
  project_dependencies: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodNever>>;
699
738
  }, z.core.$strict>;
739
+ }, z.core.$strict>, z.ZodObject<{
740
+ kind: z.ZodLiteral<"delete-page-source">;
741
+ expectedUrlPath: z.ZodString;
700
742
  }, z.core.$strict>], "kind">;
701
- }, z.core.$strip>;
743
+ }, z.core.$strict>;
702
744
  navigation_selection: z.ZodOptional<z.ZodDiscriminatedUnion<[z.ZodObject<{
703
745
  kind: z.ZodLiteral<"none">;
704
746
  }, z.core.$strict>, z.ZodObject<{
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@vcp-dev/contracts",
3
- "version": "0.6.10",
3
+ "version": "0.7.0",
4
4
  "type": "module",
5
5
  "license": "UNLICENSED",
6
6
  "repository": {
@@ -51,6 +51,7 @@
51
51
  "typecheck": "tsc -p tsconfig.json --noEmit"
52
52
  },
53
53
  "dependencies": {
54
+ "@noble/hashes": "^1.8.0",
54
55
  "culori": "^4.0.2",
55
56
  "zod": "^4.0.0"
56
57
  },
@@ -1,54 +0,0 @@
1
- import { z } from "zod";
2
- export declare const PublishPlanFeatureSnapshotSchema: z.ZodObject<{
3
- maxSites: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
4
- maxStorageMb: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
5
- customDomains: z.ZodOptional<z.ZodNullable<z.ZodBoolean>>;
6
- }, z.core.$loose>;
7
- export type PublishPlanFeatureSnapshot = z.infer<typeof PublishPlanFeatureSnapshotSchema>;
8
- export declare const PublishPlanSchema: z.ZodObject<{
9
- subscriptionId: z.ZodString;
10
- planId: z.ZodString;
11
- locale: z.ZodUnion<[z.ZodEnum<{
12
- en: "en";
13
- zh_CN: "zh_CN";
14
- }>, z.ZodString]>;
15
- currentPeriodEnd: z.ZodNullable<z.ZodString>;
16
- servicePeriodEnd: z.ZodNullable<z.ZodString>;
17
- featureSnapshot: z.ZodNullable<z.ZodObject<{
18
- maxSites: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
19
- maxStorageMb: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
20
- customDomains: z.ZodOptional<z.ZodNullable<z.ZodBoolean>>;
21
- }, z.core.$loose>>;
22
- code: z.ZodNullable<z.ZodString>;
23
- level: z.ZodNullable<z.ZodNumber>;
24
- name: z.ZodNullable<z.ZodString>;
25
- }, z.core.$strict>;
26
- export type PublishPlan = z.infer<typeof PublishPlanSchema>;
27
- export declare const PublishEntitlementSchema: z.ZodObject<{
28
- hasActiveSubscription: z.ZodBoolean;
29
- }, z.core.$strict>;
30
- export type PublishEntitlement = z.infer<typeof PublishEntitlementSchema>;
31
- export declare const GetSitePlanDataSchema: z.ZodObject<{
32
- plan: z.ZodNullable<z.ZodObject<{
33
- subscriptionId: z.ZodString;
34
- planId: z.ZodString;
35
- locale: z.ZodUnion<[z.ZodEnum<{
36
- en: "en";
37
- zh_CN: "zh_CN";
38
- }>, z.ZodString]>;
39
- currentPeriodEnd: z.ZodNullable<z.ZodString>;
40
- servicePeriodEnd: z.ZodNullable<z.ZodString>;
41
- featureSnapshot: z.ZodNullable<z.ZodObject<{
42
- maxSites: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
43
- maxStorageMb: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
44
- customDomains: z.ZodOptional<z.ZodNullable<z.ZodBoolean>>;
45
- }, z.core.$loose>>;
46
- code: z.ZodNullable<z.ZodString>;
47
- level: z.ZodNullable<z.ZodNumber>;
48
- name: z.ZodNullable<z.ZodString>;
49
- }, z.core.$strict>>;
50
- entitlement: z.ZodObject<{
51
- hasActiveSubscription: z.ZodBoolean;
52
- }, z.core.$strict>;
53
- }, z.core.$strict>;
54
- export type GetSitePlanData = z.infer<typeof GetSitePlanDataSchema>;