@webstudio-is/protocol 0.275.0 → 0.276.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/lib/fixtures.js +28 -0
- package/lib/index.js +2057 -200
- package/lib/schema.js +30 -1
- package/lib/types/builder-api/__generated__/server-only-router-operation-metadata.d.ts +3 -3
- package/lib/types/builder-api/operations.d.ts +1 -0
- package/lib/types/builder-api/runtime-contracts.d.ts +2 -1
- package/lib/types/schema.d.ts +367 -298
- package/package.json +6 -6
package/lib/schema.js
CHANGED
|
@@ -15032,6 +15032,7 @@ var projectMeta = external_exports.object({
|
|
|
15032
15032
|
contactEmail: external_exports.string().optional(),
|
|
15033
15033
|
faviconAssetId: external_exports.string().optional(),
|
|
15034
15034
|
code: external_exports.string().optional(),
|
|
15035
|
+
agentInstructions: external_exports.string().optional(),
|
|
15035
15036
|
auth: external_exports.string().optional()
|
|
15036
15037
|
});
|
|
15037
15038
|
var projectNewRedirectPath = external_exports.string().min(1, "Path is required").refine((data) => {
|
|
@@ -15717,6 +15718,7 @@ var builderNamespaces = [
|
|
|
15717
15718
|
"resources",
|
|
15718
15719
|
"assets",
|
|
15719
15720
|
"breakpoints",
|
|
15721
|
+
"projectSettings",
|
|
15720
15722
|
"marketplaceProduct"
|
|
15721
15723
|
];
|
|
15722
15724
|
|
|
@@ -15750,7 +15752,7 @@ var builderPatchSchema = external_exports.union([
|
|
|
15750
15752
|
var pageGeneratedRecordPaths = /* @__PURE__ */ new Set(["pages", "folders", "pageTemplates"]);
|
|
15751
15753
|
var generatedRecordNamespaces = new Set(
|
|
15752
15754
|
builderNamespaces.filter(
|
|
15753
|
-
(namespace) => namespace !== "pages" && namespace !== "marketplaceProduct"
|
|
15755
|
+
(namespace) => namespace !== "pages" && namespace !== "projectSettings" && namespace !== "marketplaceProduct"
|
|
15754
15756
|
)
|
|
15755
15757
|
);
|
|
15756
15758
|
var isGeneratedRecordCreatePatch = (namespace, patch) => {
|
|
@@ -15855,6 +15857,31 @@ var serializedPages = external_exports.object({
|
|
|
15855
15857
|
folders: external_exports.array(folder)
|
|
15856
15858
|
});
|
|
15857
15859
|
|
|
15860
|
+
// ../project-build/src/shared/marketplace.ts
|
|
15861
|
+
var marketplaceProduct = external_exports.object({
|
|
15862
|
+
category: external_exports.union([
|
|
15863
|
+
external_exports.literal("sectionTemplates"),
|
|
15864
|
+
external_exports.literal("pageTemplates"),
|
|
15865
|
+
external_exports.literal("integrationTemplates")
|
|
15866
|
+
]),
|
|
15867
|
+
name: external_exports.string().min(2).max(200).trim(),
|
|
15868
|
+
thumbnailAssetId: external_exports.string(),
|
|
15869
|
+
author: external_exports.string().min(2).max(200).trim(),
|
|
15870
|
+
email: external_exports.string().email().max(200).trim(),
|
|
15871
|
+
website: external_exports.union([
|
|
15872
|
+
external_exports.string().max(200).url().trim().optional(),
|
|
15873
|
+
external_exports.literal("")
|
|
15874
|
+
]),
|
|
15875
|
+
issues: external_exports.union([external_exports.string().max(200).url().trim().optional(), external_exports.literal("")]),
|
|
15876
|
+
description: external_exports.string().trim().min(10).max(1e3)
|
|
15877
|
+
});
|
|
15878
|
+
|
|
15879
|
+
// ../project-build/src/shared/project-settings.ts
|
|
15880
|
+
var projectSettings = external_exports.object({
|
|
15881
|
+
meta: projectMeta,
|
|
15882
|
+
compiler: compilerSettings
|
|
15883
|
+
});
|
|
15884
|
+
|
|
15858
15885
|
// ../project-build/src/schema.ts
|
|
15859
15886
|
var entry = (value) => external_exports.tuple([external_exports.string(), value]);
|
|
15860
15887
|
var serializedBuildShape = {
|
|
@@ -15872,6 +15899,8 @@ var serializedBuildShape = {
|
|
|
15872
15899
|
instances: external_exports.array(entry(instance)),
|
|
15873
15900
|
dataSources: external_exports.array(entry(dataSource)),
|
|
15874
15901
|
resources: external_exports.array(entry(resource)),
|
|
15902
|
+
marketplaceProduct: marketplaceProduct.optional(),
|
|
15903
|
+
projectSettings: projectSettings.optional(),
|
|
15875
15904
|
deployment: deployment.optional()
|
|
15876
15905
|
};
|
|
15877
15906
|
var serializedBuild = external_exports.object(serializedBuildShape);
|
|
@@ -55,7 +55,7 @@ export declare const serverOnlyRouterOperationMetadata: {
|
|
|
55
55
|
readonly type: "array";
|
|
56
56
|
readonly items: {
|
|
57
57
|
readonly type: "string";
|
|
58
|
-
readonly enum: ["pages", "folders", "instances", "props", "styles", "styleSources", "styleSourceSelections", "designTokens", "assets", "resources", "variables", "breakpoints", "marketplaceProduct"];
|
|
58
|
+
readonly enum: ["pages", "folders", "instances", "props", "styles", "styleSources", "styleSourceSelections", "designTokens", "assets", "resources", "variables", "breakpoints", "projectSettings", "marketplaceProduct"];
|
|
59
59
|
};
|
|
60
60
|
};
|
|
61
61
|
readonly version: {
|
|
@@ -74,7 +74,7 @@ export declare const serverOnlyRouterOperationMetadata: {
|
|
|
74
74
|
readonly path: "api.build.patch";
|
|
75
75
|
readonly client: "applyBuildPatch";
|
|
76
76
|
readonly permit: "build";
|
|
77
|
-
readonly invalidatesNamespaces: readonly ["pages", "instances", "props", "styles", "styleSources", "styleSourceSelections", "dataSources", "resources", "assets", "breakpoints", "marketplaceProduct"];
|
|
77
|
+
readonly invalidatesNamespaces: readonly ["pages", "instances", "props", "styles", "styleSources", "styleSourceSelections", "dataSources", "resources", "assets", "breakpoints", "projectSettings", "marketplaceProduct"];
|
|
78
78
|
readonly inputSchema: {
|
|
79
79
|
readonly type: "object";
|
|
80
80
|
readonly properties: {
|
|
@@ -100,7 +100,7 @@ export declare const serverOnlyRouterOperationMetadata: {
|
|
|
100
100
|
readonly properties: {
|
|
101
101
|
readonly namespace: {
|
|
102
102
|
readonly type: "string";
|
|
103
|
-
readonly enum: ["pages", "instances", "props", "styles", "styleSources", "styleSourceSelections", "dataSources", "resources", "assets", "breakpoints", "marketplaceProduct"];
|
|
103
|
+
readonly enum: ["pages", "instances", "props", "styles", "styleSources", "styleSourceSelections", "dataSources", "resources", "assets", "breakpoints", "projectSettings", "marketplaceProduct"];
|
|
104
104
|
};
|
|
105
105
|
readonly patches: {
|
|
106
106
|
readonly type: "array";
|
|
@@ -21,6 +21,7 @@ export type PublicApiOperation<Command extends string = string> = Omit<PublicApi
|
|
|
21
21
|
requiredInputFields: readonly string[];
|
|
22
22
|
inputFieldTypes: Partial<Record<string, "array">>;
|
|
23
23
|
inputSchema: InputJsonSchema;
|
|
24
|
+
outputSchema?: InputJsonSchema;
|
|
24
25
|
requiredOptions?: readonly string[];
|
|
25
26
|
examples: readonly string[];
|
|
26
27
|
localCapable: boolean;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { runtimeOperationContracts } from "@webstudio-is/project-build/contracts/builder-runtime";
|
|
2
2
|
import type { InputJsonSchema } from "@webstudio-is/sdk";
|
|
3
3
|
export type { InputJsonSchema };
|
|
4
|
-
export declare const publicApiOperationNamespaces: readonly ["pages", "instances", "props", "styles", "styleSources", "styleSourceSelections", "dataSources", "resources", "assets", "breakpoints", "marketplaceProduct"];
|
|
4
|
+
export declare const publicApiOperationNamespaces: readonly ["pages", "instances", "props", "styles", "styleSources", "styleSourceSelections", "dataSources", "resources", "assets", "breakpoints", "projectSettings", "marketplaceProduct"];
|
|
5
5
|
export type PublicApiOperationNamespace = (typeof publicApiOperationNamespaces)[number];
|
|
6
6
|
export declare const publicApiOperationPermits: readonly ["api", "view", "edit", "build", "admin"];
|
|
7
7
|
export type PublicApiOperationPermit = (typeof publicApiOperationPermits)[number];
|
|
@@ -14,6 +14,7 @@ export type PublicRuntimeOperationContract = {
|
|
|
14
14
|
permit?: PublicApiOperationPermit;
|
|
15
15
|
kind: PublicApiOperationKind;
|
|
16
16
|
inputSchema: InputJsonSchema;
|
|
17
|
+
outputSchema?: InputJsonSchema;
|
|
17
18
|
readNamespaces: readonly PublicApiOperationNamespace[];
|
|
18
19
|
writeNamespaces: readonly PublicApiOperationNamespace[];
|
|
19
20
|
invalidatesNamespaces: readonly PublicApiOperationNamespace[];
|