@vcp-dev/contracts 0.10.21 → 0.10.22
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/dist/cms-page-directory.d.ts +7 -0
- package/dist/external-site-edit.d.ts +32 -1
- package/dist/index.d.ts +115 -2
- package/dist/index.js +8 -8
- package/dist/input-context-bundle.d.ts +1 -1
- package/dist/media-library.d.ts +17 -58
- package/dist/page-template.d.ts +24 -0
- package/dist/site-edit-version.d.ts +1 -1
- package/dist/site-workflow.d.ts +0 -1
- package/dist/workspace-file-mutation-tools.d.ts +17 -2
- package/package.json +1 -1
|
@@ -137,7 +137,7 @@ export declare const MAX_DOCUMENT_SOURCES_PER_SITE = 2;
|
|
|
137
137
|
*
|
|
138
138
|
* multipart/form-data 字段值一律是字符串:`consent_cross_border` 用字面量联合只放行
|
|
139
139
|
* `true` / `"true"`(其余含 `"false"` 一律拒)。**不用 `.transform()`**——会破坏
|
|
140
|
-
* `z.toJSONSchema` → OpenAPI(该 schema 进 `@ApiBody
|
|
140
|
+
* `z.toJSONSchema` → OpenAPI(该 schema 进 `@ApiBody`);
|
|
141
141
|
* 服务端用 `isConsentGranted()` 把 `true`/`"true"` 归一为已同意布尔。
|
|
142
142
|
*/
|
|
143
143
|
export declare const CreateDocumentUploadRequestSchema: z.ZodObject<{
|
package/dist/media-library.d.ts
CHANGED
|
@@ -101,32 +101,19 @@ export declare const UploadMediaLibraryAssetResponseSchema: z.ZodObject<{
|
|
|
101
101
|
}, z.core.$strip>;
|
|
102
102
|
export type UploadMediaLibraryAssetResponse = z.infer<typeof UploadMediaLibraryAssetResponseSchema>;
|
|
103
103
|
export declare const AI_IMAGE_GENERATION_MAX_QUANTITY = 4;
|
|
104
|
-
export declare const AI_IMAGE_GENERATION_ENTITLEMENT = "site.image_generation.max";
|
|
105
|
-
export declare const AiImageGenerationPrecheckRequestSchema: z.ZodObject<{
|
|
106
|
-
quantity: z.ZodNumber;
|
|
107
|
-
}, z.core.$strip>;
|
|
108
|
-
export type AiImageGenerationPrecheckRequest = z.infer<typeof AiImageGenerationPrecheckRequestSchema>;
|
|
109
|
-
export declare const AiImageGenerationQuotaSchema: z.ZodObject<{
|
|
110
|
-
available: z.ZodBoolean;
|
|
111
|
-
remaining: z.ZodNullable<z.ZodNumber>;
|
|
112
|
-
unlimited: z.ZodBoolean;
|
|
113
|
-
max_quantity: z.ZodNumber;
|
|
114
|
-
}, z.core.$strip>;
|
|
115
|
-
export type AiImageGenerationQuota = z.infer<typeof AiImageGenerationQuotaSchema>;
|
|
116
|
-
export declare const AiImageGenerationPrecheckResponseSchema: z.ZodObject<{
|
|
117
|
-
code: z.ZodLiteral<0>;
|
|
118
|
-
message: z.ZodString;
|
|
119
|
-
data: z.ZodObject<{
|
|
120
|
-
available: z.ZodBoolean;
|
|
121
|
-
remaining: z.ZodNullable<z.ZodNumber>;
|
|
122
|
-
unlimited: z.ZodBoolean;
|
|
123
|
-
max_quantity: z.ZodNumber;
|
|
124
|
-
}, z.core.$strip>;
|
|
125
|
-
}, z.core.$strip>;
|
|
126
|
-
export type AiImageGenerationPrecheckResponse = z.infer<typeof AiImageGenerationPrecheckResponseSchema>;
|
|
127
104
|
export declare const GenerateAiImagesRequestSchema: z.ZodObject<{
|
|
128
105
|
pageName: z.ZodString;
|
|
129
|
-
pageType: z.
|
|
106
|
+
pageType: z.ZodEnum<{
|
|
107
|
+
landing_page: "landing_page";
|
|
108
|
+
general_page: "general_page";
|
|
109
|
+
detail_page: "detail_page";
|
|
110
|
+
list_page: "list_page";
|
|
111
|
+
category_page: "category_page";
|
|
112
|
+
tag_page: "tag_page";
|
|
113
|
+
author_page: "author_page";
|
|
114
|
+
search_page: "search_page";
|
|
115
|
+
date_page: "date_page";
|
|
116
|
+
}>;
|
|
130
117
|
sectionTitle: z.ZodString;
|
|
131
118
|
nearbyTitle: z.ZodString;
|
|
132
119
|
nearbyBody: z.ZodString;
|
|
@@ -134,49 +121,21 @@ export declare const GenerateAiImagesRequestSchema: z.ZodObject<{
|
|
|
134
121
|
aspectRatio: z.ZodString;
|
|
135
122
|
}, z.core.$strip>;
|
|
136
123
|
export type GenerateAiImagesRequest = z.infer<typeof GenerateAiImagesRequestSchema>;
|
|
137
|
-
export declare const GeneratedAiImageResultSchema: z.
|
|
124
|
+
export declare const GeneratedAiImageResultSchema: z.ZodObject<{
|
|
138
125
|
index: z.ZodNumber;
|
|
139
126
|
ok: z.ZodLiteral<true>;
|
|
140
|
-
url: z.
|
|
141
|
-
|
|
142
|
-
}, z.core.$strip>, z.ZodObject<{
|
|
143
|
-
index: z.ZodNumber;
|
|
144
|
-
ok: z.ZodLiteral<false>;
|
|
145
|
-
error: z.ZodEnum<{
|
|
146
|
-
quota: "quota";
|
|
147
|
-
generate: "generate";
|
|
148
|
-
network: "network";
|
|
149
|
-
}>;
|
|
150
|
-
message: z.ZodString;
|
|
151
|
-
request_id: z.ZodNullable<z.ZodString>;
|
|
152
|
-
}, z.core.$strip>], "ok">;
|
|
127
|
+
url: z.ZodString;
|
|
128
|
+
}, z.core.$strip>;
|
|
153
129
|
export type GeneratedAiImageResult = z.infer<typeof GeneratedAiImageResultSchema>;
|
|
154
130
|
export declare const GenerateAiImagesResponseSchema: z.ZodObject<{
|
|
155
131
|
code: z.ZodLiteral<0>;
|
|
156
132
|
message: z.ZodString;
|
|
157
133
|
data: z.ZodObject<{
|
|
158
|
-
|
|
159
|
-
available: z.ZodBoolean;
|
|
160
|
-
remaining: z.ZodNullable<z.ZodNumber>;
|
|
161
|
-
unlimited: z.ZodBoolean;
|
|
162
|
-
max_quantity: z.ZodNumber;
|
|
163
|
-
}, z.core.$strip>;
|
|
164
|
-
items: z.ZodArray<z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
134
|
+
items: z.ZodArray<z.ZodObject<{
|
|
165
135
|
index: z.ZodNumber;
|
|
166
136
|
ok: z.ZodLiteral<true>;
|
|
167
|
-
url: z.
|
|
168
|
-
|
|
169
|
-
}, z.core.$strip>, z.ZodObject<{
|
|
170
|
-
index: z.ZodNumber;
|
|
171
|
-
ok: z.ZodLiteral<false>;
|
|
172
|
-
error: z.ZodEnum<{
|
|
173
|
-
quota: "quota";
|
|
174
|
-
generate: "generate";
|
|
175
|
-
network: "network";
|
|
176
|
-
}>;
|
|
177
|
-
message: z.ZodString;
|
|
178
|
-
request_id: z.ZodNullable<z.ZodString>;
|
|
179
|
-
}, z.core.$strip>], "ok">>;
|
|
137
|
+
url: z.ZodString;
|
|
138
|
+
}, z.core.$strip>>;
|
|
180
139
|
}, z.core.$strip>;
|
|
181
140
|
}, z.core.$strip>;
|
|
182
141
|
export type GenerateAiImagesResponse = z.infer<typeof GenerateAiImagesResponseSchema>;
|
package/dist/page-template.d.ts
CHANGED
|
@@ -78,6 +78,12 @@ export declare const PageTemplateTaskSchema: z.ZodObject<{
|
|
|
78
78
|
created_at: z.ZodString;
|
|
79
79
|
started_at: z.ZodNullable<z.ZodString>;
|
|
80
80
|
finished_at: z.ZodNullable<z.ZodString>;
|
|
81
|
+
advisories: z.ZodDefault<z.ZodNullable<z.ZodArray<z.ZodObject<{
|
|
82
|
+
code: z.ZodEnum<{
|
|
83
|
+
preexisting_placeholder_media: "preexisting_placeholder_media";
|
|
84
|
+
}>;
|
|
85
|
+
block_ids: z.ZodArray<z.ZodString>;
|
|
86
|
+
}, z.core.$strict>>>>;
|
|
81
87
|
execution_scene: z.ZodLiteral<"page_template_create">;
|
|
82
88
|
external_run_id: z.ZodString;
|
|
83
89
|
external_thread_id: z.ZodString;
|
|
@@ -111,6 +117,12 @@ export declare const PageTemplateCreateResponseSchema: z.ZodObject<{
|
|
|
111
117
|
created_at: z.ZodString;
|
|
112
118
|
started_at: z.ZodNullable<z.ZodString>;
|
|
113
119
|
finished_at: z.ZodNullable<z.ZodString>;
|
|
120
|
+
advisories: z.ZodDefault<z.ZodNullable<z.ZodArray<z.ZodObject<{
|
|
121
|
+
code: z.ZodEnum<{
|
|
122
|
+
preexisting_placeholder_media: "preexisting_placeholder_media";
|
|
123
|
+
}>;
|
|
124
|
+
block_ids: z.ZodArray<z.ZodString>;
|
|
125
|
+
}, z.core.$strict>>>>;
|
|
114
126
|
execution_scene: z.ZodLiteral<"page_template_create">;
|
|
115
127
|
external_run_id: z.ZodString;
|
|
116
128
|
external_thread_id: z.ZodString;
|
|
@@ -138,6 +150,12 @@ export declare const PageTemplatePromoteResponseSchema: z.ZodObject<{
|
|
|
138
150
|
page_path: z.ZodString;
|
|
139
151
|
route_id: z.ZodString;
|
|
140
152
|
snapshot_id: z.ZodUUID;
|
|
153
|
+
advisories: z.ZodDefault<z.ZodArray<z.ZodObject<{
|
|
154
|
+
code: z.ZodEnum<{
|
|
155
|
+
preexisting_placeholder_media: "preexisting_placeholder_media";
|
|
156
|
+
}>;
|
|
157
|
+
block_ids: z.ZodArray<z.ZodString>;
|
|
158
|
+
}, z.core.$strict>>>;
|
|
141
159
|
}, z.core.$strict>;
|
|
142
160
|
export type PageTemplatePromoteResponse = z.infer<typeof PageTemplatePromoteResponseSchema>;
|
|
143
161
|
export declare const PageTemplateCleanupResponseSchema: z.ZodObject<{
|
|
@@ -148,6 +166,12 @@ export declare const PageTemplateCleanupResponseSchema: z.ZodObject<{
|
|
|
148
166
|
page_path: z.ZodString;
|
|
149
167
|
route_id: z.ZodString;
|
|
150
168
|
snapshot_id: z.ZodUUID;
|
|
169
|
+
advisories: z.ZodDefault<z.ZodArray<z.ZodObject<{
|
|
170
|
+
code: z.ZodEnum<{
|
|
171
|
+
preexisting_placeholder_media: "preexisting_placeholder_media";
|
|
172
|
+
}>;
|
|
173
|
+
block_ids: z.ZodArray<z.ZodString>;
|
|
174
|
+
}, z.core.$strict>>>;
|
|
151
175
|
}, z.core.$strict>;
|
|
152
176
|
export type PageTemplateCleanupResponse = z.infer<typeof PageTemplateCleanupResponseSchema>;
|
|
153
177
|
export declare const PageTemplateErrorCodeSchema: z.ZodEnum<{
|
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
*
|
|
6
6
|
* 由 release-edit-engine-packages.ts 在 bump 版本时自动更新。
|
|
7
7
|
*/
|
|
8
|
-
export declare const CURRENT_EDIT_ENGINE_VERSION = "0.10.
|
|
8
|
+
export declare const CURRENT_EDIT_ENGINE_VERSION = "0.10.22";
|
|
9
9
|
export declare const EDIT_ENGINE_VERSION_HEADER = "x-vcp-edit-engine-version";
|
|
10
10
|
export declare const EDIT_ENGINE_VERSION_SOURCE_HEADER = "x-vcp-edit-engine-version-source";
|
|
11
11
|
export type EditEngineVersionSource = "explicit" | "fallback_current" | "system_current";
|
package/dist/site-workflow.d.ts
CHANGED
|
@@ -933,7 +933,6 @@ export declare const CompleteSiteWorkflowRequestSchema: z.ZodObject<{
|
|
|
933
933
|
}, z.core.$strict>;
|
|
934
934
|
export type CompleteSiteWorkflowRequest = z.infer<typeof CompleteSiteWorkflowRequestSchema>;
|
|
935
935
|
export declare const CompleteQualityOnlyWorkflowRequestSchema: z.ZodObject<{
|
|
936
|
-
expected_current_node: z.ZodLiteral<"preview_personalization">;
|
|
937
936
|
publish_workflow_id: z.ZodUUID;
|
|
938
937
|
expected_publish_revision: z.ZodNumber;
|
|
939
938
|
}, z.core.$strict>;
|
|
@@ -19,9 +19,18 @@ export declare const MODEL_FILE_MUTATION_TOOL_NAMES: readonly ["write_file", "ed
|
|
|
19
19
|
* 会错判。
|
|
20
20
|
*/
|
|
21
21
|
export declare const LEGACY_FILE_MUTATION_TOOL_NAME: "apply_patch_batch";
|
|
22
|
-
/**
|
|
23
|
-
|
|
22
|
+
/**
|
|
23
|
+
* 平台确定性改写站点代码的类型化工具:模型只给意图(例如面包屑放法),平台在工具
|
|
24
|
+
* 内部读工作副本、算出改动、经 `applyPatchBatch` 一次写入。它们会改站点代码,所以
|
|
25
|
+
* 算写类(预览蒙层、工具卡分类都要认);但入参与结果不是 canonical 补丁形状,
|
|
26
|
+
* agent 运行时的补丁归一、逐文件重试预算只认 {@link isCanonicalFileMutationToolName}。
|
|
27
|
+
*/
|
|
28
|
+
export declare const PLATFORM_FILE_MUTATION_TOOL_NAMES: readonly ["set_breadcrumb_placement"];
|
|
29
|
+
/** 写类工具全集:模型可见的三个 + 历史批量工具 + 平台确定性写入工具。 */
|
|
30
|
+
export declare const WORKSPACE_FILE_MUTATION_TOOL_NAMES: readonly ["write_file", "edit_file", "delete_file", "apply_patch_batch", "set_breadcrumb_placement"];
|
|
24
31
|
export type ModelFileMutationToolName = (typeof MODEL_FILE_MUTATION_TOOL_NAMES)[number];
|
|
32
|
+
export type PlatformFileMutationToolName = (typeof PLATFORM_FILE_MUTATION_TOOL_NAMES)[number];
|
|
33
|
+
export type CanonicalFileMutationToolName = ModelFileMutationToolName | typeof LEGACY_FILE_MUTATION_TOOL_NAME;
|
|
25
34
|
export type WorkspaceFileMutationToolName = (typeof WORKSPACE_FILE_MUTATION_TOOL_NAMES)[number];
|
|
26
35
|
/** 是不是模型可见的文件修改工具(不含历史批量工具)。 */
|
|
27
36
|
export declare function isModelFileMutationToolName(toolName: string): toolName is ModelFileMutationToolName;
|
|
@@ -30,3 +39,9 @@ export declare function isModelFileMutationToolName(toolName: string): toolName
|
|
|
30
39
|
* ——预览蒙层、工具卡分类、状态胶囊、业务任务标题共用同一判据。
|
|
31
40
|
*/
|
|
32
41
|
export declare function isWorkspaceFileMutationToolName(toolName: string): toolName is WorkspaceFileMutationToolName;
|
|
42
|
+
/**
|
|
43
|
+
* 是不是走 canonical 补丁协议的写类工具(模型可见的三个 + 历史批量工具):入参能
|
|
44
|
+
* 归一成 `ApplyPatchBatchToolInput`、结果就是 `ApplyPatchBatchResult`。平台确定性
|
|
45
|
+
* 写入工具不在此列,它们的结果由调用方按各自合同处理。
|
|
46
|
+
*/
|
|
47
|
+
export declare function isCanonicalFileMutationToolName(toolName: string): toolName is CanonicalFileMutationToolName;
|