Skip to content

Open source website builder and Webflow alternative. Webstudio is an advanced visual builder that connects to any headless CMS, supports all CSS properties, and can be hosted anywhere, including with us.

53.8 KB
Raw Blame
// This file is generated by apps/builder/scripts/generate-server-only-api-metadata.ts.
// Do not edit manually.

import type {
  InputJsonSchema,
  PublicApiOperationNamespace,
  PublicApiOperationPermit,
} from "../runtime-contracts";

export const serverOnlyRouterOperationMetadata = {
  "auth.me": {
    id: "auth.me",
    command: "whoami",
    method: "query",
    path: "api.auth.me",
    client: "getApiTokenInfo",
    permit: "view",
    inputSchema: {
      type: "object",
      additionalProperties: true,
      properties: {},
      required: [],
    },
  },
  "forms.simulateSubmission": {
    id: "forms.simulateSubmission",
    command: "simulate-form-submission",
    method: "mutation",
    path: "api.forms.simulateSubmission",
    client: "simulateFormSubmission",
    permit: "build",
    inputSchema: {
      type: "object",
      properties: {
        formId: {
          type: "string",
          minLength: 1,
        },
        path: {
          type: "string",
          minLength: 1,
          maxLength: 2048,
        },
        siteOrigin: {
          type: "string",
          format: "uri",
        },
        values: {
          maxItems: 100,
          type: "array",
          items: {
            type: "object",
            properties: {
              name: {
                type: "string",
                minLength: 1,
                maxLength: 256,
              },
              value: {
                type: "string",
                maxLength: 10000,
              },
            },
            required: ["name", "value"],
          },
        },
        arrayNames: {
          default: [],
          maxItems: 100,
          type: "array",
          items: {
            type: "string",
            minLength: 1,
            maxLength: 256,
          },
        },
      },
      required: ["formId", "path", "values"],
    },
  },
  "projects.permissions": {
    id: "projects.permissions",
    command: "permissions",
    method: "query",
    path: "api.projects.permissions",
    client: "getProjectPermissions",
    permit: "view",
    inputSchema: {
      type: "object",
      properties: {},
      required: [],
      additionalProperties: true,
    },
  },
  "projects.get": {
    id: "projects.get",
    command: "inspect",
    method: "query",
    path: "api.projects.get",
    client: "getProjectInfo",
    permit: "view",
    inputSchema: {
      type: "object",
      properties: {},
      required: [],
      additionalProperties: true,
    },
  },
  "projects.submitMarketplaceProduct": {
    id: "projects.submitMarketplaceProduct",
    command: "submit-marketplace-product",
    method: "mutation",
    path: "api.projects.submitMarketplaceProduct",
    client: "submitMarketplaceProduct",
    permit: "edit",
    inputSchema: {
      type: "object",
      properties: {
        acknowledgePublicSubmission: {
          type: "boolean",
          const: true,
          description:
            "Acknowledge that submission starts public marketplace review",
        },
      },
      required: ["acknowledgePublicSubmission"],
    },
  },
  "reports.issue": {
    id: "reports.issue",
    command: "report-issue",
    method: "mutation",
    path: "api.reports.issue",
    client: "reportIssue",
    permit: "view",
    inputSchema: {
      type: "object",
      properties: {
        trigger: {
          type: "string",
          enum: ["user-requested", "automatic-friction"],
        },
        category: {
          type: "string",
          enum: [
            "tool-failure",
            "incorrect-result",
            "schema-or-docs-mismatch",
            "documented-recovery-failed",
            "undocumented-workaround",
            "hang-or-crash",
            "feature-request",
            "other",
          ],
        },
        deduplicationKey: {
          type: "string",
          minLength: 3,
          maxLength: 160,
          pattern: "^[a-z0-9]+(?:[.-][a-z0-9]+)*$",
          description:
            "Stable lowercase anonymous technical slug without user, project, resource, or domain identifiers.",
        },
        title: {
          type: "string",
          minLength: 1,
          maxLength: 160,
        },
        agent: {
          type: "object",
          properties: {
            client: {
              type: "string",
              minLength: 1,
              maxLength: 100,
            },
            clientVersion: {
              type: "string",
              minLength: 1,
              maxLength: 100,
            },
            provider: {
              type: "string",
              minLength: 1,
              maxLength: 100,
            },
            model: {
              type: "string",
              minLength: 1,
              maxLength: 200,
            },
            reasoningEffort: {
              type: "string",
              enum: [
                "none",
                "minimal",
                "low",
                "medium",
                "high",
                "xhigh",
                "max",
                "ultra",
                "unknown",
              ],
            },
          },
          required: ["client", "model", "reasoningEffort"],
          additionalProperties: false,
        },
        runtime: {
          type: "object",
          properties: {
            cliVersion: {
              type: "string",
              minLength: 1,
              maxLength: 100,
            },
            nodeVersion: {
              type: "string",
              minLength: 1,
              maxLength: 100,
            },
            os: {
              type: "string",
              minLength: 1,
              maxLength: 100,
            },
            osVersion: {
              type: "string",
              minLength: 1,
              maxLength: 100,
            },
            architecture: {
              type: "string",
              minLength: 1,
              maxLength: 100,
            },
            executionMode: {
              type: "string",
              enum: ["mcp"],
            },
            apiContractVersion: {
              type: "string",
              minLength: 1,
              maxLength: 100,
            },
            serverApiContractVersion: {
              type: "string",
              minLength: 1,
              maxLength: 100,
            },
            bundleVersion: {
              type: "string",
              minLength: 1,
              maxLength: 100,
            },
            recentFailure: {
              type: "object",
              properties: {
                tool: {
                  type: "string",
                  minLength: 1,
                  maxLength: 160,
                },
                code: {
                  type: "string",
                  minLength: 1,
                  maxLength: 160,
                },
                errorType: {
                  type: "string",
                  pattern: "^[A-Za-z][A-Za-z0-9]{0,99}(Error|Exception)$",
                },
                requestId: {
                  type: "string",
                  pattern: "^[A-Za-z0-9_-]{1,100}$",
                },
                httpStatus: {
                  type: "integer",
                  minimum: 100,
                  maximum: 599,
                },
                elapsedMs: {
                  type: "integer",
                  minimum: 0,
                  maximum: 9007199254740991,
                },
                entityIds: {
                  maxItems: 20,
                  type: "array",
                  items: {
                    type: "object",
                    properties: {
                      field: {
                        type: "string",
                        enum: [
                          "formId",
                          "requestId",
                          "jobId",
                          "domainId",
                          "blockInstanceId",
                          "assetId",
                          "pageId",
                          "parentFolderId",
                          "socialImageAssetId",
                          "thumbnailAssetId",
                          "faviconAssetId",
                          "breakpointId",
                          "templateId",
                          "sourceTemplateId",
                          "targetTemplateId",
                          "folderId",
                          "targetFolderId",
                          "scopeInstanceId",
                          "resourceId",
                          "instanceId",
                          "styleSourceId",
                          "childId",
                          "rootInstanceId",
                          "parentInstanceId",
                          "sourceSlotId",
                          "sourceInstanceId",
                          "targetParentInstanceId",
                          "designTokenId",
                          "dataSourceId",
                          "parentId",
                          "fromAssetId",
                          "toAssetId",
                        ],
                      },
                      id: {
                        type: "string",
                        minLength: 1,
                        maxLength: 160,
                        pattern: "^[A-Za-z0-9_-]+$",
                      },
                    },
                    required: ["field", "id"],
                    additionalProperties: false,
                  },
                },
                issues: {
                  maxItems: 30,
                  type: "array",
                  items: {
                    type: "object",
                    properties: {
                      path: {
                        maxItems: 30,
                        type: "array",
                        items: {
                          type: "string",
                          maxLength: 200,
                        },
                      },
                      code: {
                        type: "string",
                        minLength: 1,
                        maxLength: 100,
                      },
                      constraint: {
                        type: "string",
                        minLength: 1,
                        maxLength: 500,
                      },
                    },
                    required: ["path", "code", "constraint"],
                    additionalProperties: false,
                  },
                },
                response: {
                  type: "object",
                  properties: {
                    format: {
                      type: "string",
                      enum: ["json", "html", "other"],
                    },
                    envelope: {
                      type: "string",
                      enum: ["result", "error", "other", "missing"],
                    },
                    batchSize: {
                      type: "integer",
                      minimum: 0,
                      maximum: 1000,
                    },
                  },
                  required: ["format", "envelope"],
                  additionalProperties: false,
                },
                browser: {
                  type: "object",
                  properties: {
                    exitSignal: {
                      type: "string",
                      enum: [
                        "SIGABRT",
                        "SIGBUS",
                        "SIGFPE",
                        "SIGHUP",
                        "SIGILL",
                        "SIGINT",
                        "SIGKILL",
                        "SIGPIPE",
                        "SIGQUIT",
                        "SIGSEGV",
                        "SIGSYS",
                        "SIGTERM",
                        "SIGTRAP",
                      ],
                    },
                    exitCode: {
                      type: "integer",
                      minimum: 0,
                      maximum: 255,
                    },
                    attempts: {
                      maxItems: 10,
                      type: "array",
                      items: {
                        type: "object",
                        properties: {
                          browser: {
                            type: "string",
                            enum: ["chromium", "chrome", "edge", "brave"],
                          },
                          source: {
                            type: "string",
                            enum: [
                              "option",
                              "env",
                              "path",
                              "platform",
                              "playwright",
                              "chrome-launcher",
                            ],
                          },
                        },
                        required: ["browser", "source"],
                        additionalProperties: false,
                      },
                    },
                  },
                  additionalProperties: false,
                  required: [],
                },
                previewInstall: {
                  type: "object",
                  properties: {
                    processErrorCode: {
                      type: "string",
                      pattern: "^[A-Z][A-Z0-9_]{0,159}$",
                    },
                    exitCode: {
                      type: "integer",
                      minimum: 0,
                      maximum: 255,
                    },
                    terminated: {
                      type: "boolean",
                    },
                  },
                  additionalProperties: false,
                  required: [],
                },
              },
              required: ["tool", "code"],
              additionalProperties: false,
            },
            recentTargets: {
              maxItems: 3,
              type: "array",
              items: {
                type: "object",
                properties: {
                  tool: {
                    type: "string",
                    minLength: 1,
                    maxLength: 160,
                  },
                  entityIds: {
                    minItems: 1,
                    maxItems: 20,
                    type: "array",
                    items: {
                      type: "object",
                      properties: {
                        field: {
                          type: "string",
                          enum: [
                            "formId",
                            "requestId",
                            "jobId",
                            "domainId",
                            "blockInstanceId",
                            "assetId",
                            "pageId",
                            "parentFolderId",
                            "socialImageAssetId",
                            "thumbnailAssetId",
                            "faviconAssetId",
                            "breakpointId",
                            "templateId",
                            "sourceTemplateId",
                            "targetTemplateId",
                            "folderId",
                            "targetFolderId",
                            "scopeInstanceId",
                            "resourceId",
                            "instanceId",
                            "styleSourceId",
                            "childId",
                            "rootInstanceId",
                            "parentInstanceId",
                            "sourceSlotId",
                            "sourceInstanceId",
                            "targetParentInstanceId",
                            "designTokenId",
                            "dataSourceId",
                            "parentId",
                            "fromAssetId",
                            "toAssetId",
                          ],
                        },
                        id: {
                          type: "string",
                          minLength: 1,
                          maxLength: 160,
                          pattern: "^[A-Za-z0-9_-]+$",
                        },
                      },
                      required: ["field", "id"],
                      additionalProperties: false,
                    },
                  },
                },
                required: ["tool", "entityIds"],
                additionalProperties: false,
              },
            },
            session: {
              type: "object",
              properties: {
                staleNamespaces: {
                  maxItems: 50,
                  type: "array",
                  items: {
                    type: "string",
                    maxLength: 100,
                  },
                },
                missingNamespaces: {
                  maxItems: 50,
                  type: "array",
                  items: {
                    type: "string",
                    maxLength: 100,
                  },
                },
                invalidatedNamespaces: {
                  maxItems: 50,
                  type: "array",
                  items: {
                    type: "string",
                    maxLength: 100,
                  },
                },
              },
              required: [
                "staleNamespaces",
                "missingNamespaces",
                "invalidatedNamespaces",
              ],
              additionalProperties: false,
            },
            preview: {
              type: "object",
              properties: {
                stale: {
                  type: "boolean",
                },
                hasRenderedVersion: {
                  type: "boolean",
                },
                renderedVersionMatchesSession: {
                  type: "boolean",
                },
              },
              required: ["stale", "hasRenderedVersion"],
              additionalProperties: false,
            },
          },
          required: [
            "cliVersion",
            "nodeVersion",
            "os",
            "osVersion",
            "architecture",
            "executionMode",
            "apiContractVersion",
          ],
          additionalProperties: false,
          description:
            "CLI-collected runtime metadata with the project ID and bounded entity IDs from recent tool inputs; no raw arguments, URLs, credentials, or customer content.",
        },
        report: {
          type: "object",
          properties: {
            userStory: {
              type: "string",
              minLength: 1,
              maxLength: 4000,
            },
            summary: {
              type: "string",
              minLength: 1,
              maxLength: 4000,
            },
            attemptedWorkflow: {
              minItems: 1,
              maxItems: 20,
              type: "array",
              items: {
                type: "string",
                minLength: 1,
                maxLength: 4000,
              },
            },
            expectedBehavior: {
              type: "string",
              minLength: 1,
              maxLength: 4000,
            },
            actualResult: {
              type: "string",
              minLength: 1,
              maxLength: 4000,
            },
            recoveryAttempts: {
              minItems: 1,
              maxItems: 20,
              type: "array",
              items: {
                type: "string",
                minLength: 1,
                maxLength: 4000,
              },
            },
            userImpact: {
              type: "string",
              minLength: 1,
              maxLength: 4000,
            },
            technicalContext: {
              type: "string",
              minLength: 1,
              maxLength: 4000,
            },
            acceptanceCriteria: {
              minItems: 1,
              maxItems: 20,
              type: "array",
              items: {
                type: "string",
                minLength: 1,
                maxLength: 4000,
              },
            },
          },
          required: [
            "userStory",
            "summary",
            "attemptedWorkflow",
            "expectedBehavior",
            "actualResult",
            "recoveryAttempts",
            "userImpact",
            "technicalContext",
            "acceptanceCriteria",
          ],
          additionalProperties: false,
        },
      },
      required: [
        "trigger",
        "category",
        "deduplicationKey",
        "title",
        "agent",
        "report",
      ],
      additionalProperties: false,
      description:
        "LLM-authored technical report. The CLI attaches the project ID and recognized IDs from recent tool inputs. Generalize all other context; exclude names, URLs, credentials, customer content, and raw tool data.",
    },
  },
  "build.get": {
    id: "build.get",
    command: "snapshot",
    method: "query",
    path: "api.build.get",
    client: "getBuildSnapshot",
    permit: "view",
    inputSchema: {
      type: "object",
      properties: {
        include: {
          type: "array",
          items: {
            type: "string",
            enum: [
              "designTokens",
              "pages",
              "folders",
              "instances",
              "props",
              "styles",
              "styleSources",
              "styleSourceSelections",
              "variables",
              "resources",
              "assets",
              "assetFolders",
              "breakpoints",
              "projectSettings",
              "marketplaceProduct",
            ],
          },
        },
        version: {
          type: "integer",
          minimum: -9007199254740991,
          maximum: 9007199254740991,
        },
      },
      required: [],
    },
  },
  "build.patch": {
    id: "build.patch",
    command: "apply-patch",
    method: "mutation",
    path: "api.build.patch",
    client: "applyBuildPatch",
    permit: "edit",
    invalidatesNamespaces: [
      "pages",
      "instances",
      "props",
      "styles",
      "styleSources",
      "styleSourceSelections",
      "dataSources",
      "resources",
      "assets",
      "assetFolders",
      "breakpoints",
      "projectSettings",
      "marketplaceProduct",
    ],
    inputSchema: {
      type: "object",
      properties: {
        baseVersion: {
          type: "integer",
          minimum: -9007199254740991,
          maximum: 9007199254740991,
        },
        transactions: {
          minItems: 1,
          type: "array",
          items: {
            type: "object",
            properties: {
              id: {
                type: "string",
                minLength: 1,
              },
              payload: {
                type: "array",
                items: {
                  type: "object",
                  properties: {
                    namespace: {
                      type: "string",
                      enum: [
                        "pages",
                        "instances",
                        "props",
                        "styles",
                        "styleSources",
                        "styleSourceSelections",
                        "dataSources",
                        "resources",
                        "assets",
                        "assetFolders",
                        "breakpoints",
                        "projectSettings",
                        "marketplaceProduct",
                      ],
                    },
                    patches: {
                      type: "array",
                      items: {
                        anyOf: [
                          {
                            type: "object",
                            properties: {
                              op: {
                                type: "string",
                                const: "add",
                              },
                              path: {
                                type: "array",
                                items: {
                                  anyOf: [
                                    {
                                      type: "string",
                                    },
                                    {
                                      type: "number",
                                    },
                                  ],
                                },
                              },
                              value: {},
                            },
                            required: ["op", "path"],
                          },
                          {
                            type: "object",
                            properties: {
                              op: {
                                type: "string",
                                const: "replace",
                              },
                              path: {
                                type: "array",
                                items: {
                                  anyOf: [
                                    {
                                      type: "string",
                                    },
                                    {
                                      type: "number",
                                    },
                                  ],
                                },
                              },
                              value: {},
                            },
                            required: ["op", "path"],
                          },
                          {
                            type: "object",
                            properties: {
                              op: {
                                type: "string",
                                const: "remove",
                              },
                              path: {
                                type: "array",
                                items: {
                                  anyOf: [
                                    {
                                      type: "string",
                                    },
                                    {
                                      type: "number",
                                    },
                                  ],
                                },
                              },
                            },
                            required: ["op", "path"],
                          },
                        ],
                      },
                    },
                  },
                  required: ["namespace", "patches"],
                },
              },
            },
            required: ["id", "payload"],
          },
        },
      },
      required: ["baseVersion", "transactions"],
    },
  },
  "assetQueries.validate": {
    id: "assetQueries.validate",
    command: "validate-asset-query",
    method: "query",
    path: "api.assetQueries.validate",
    client: "validateAssetQuery",
    permit: "view",
    inputSchema: {
      type: "object",
      properties: {
        query: {
          type: "object",
          properties: {
            result: {
              default: "many",
              type: "string",
              enum: ["many", "one", "first", "last"],
            },
            where: {
              default: {
                all: [],
              },
              $ref: "#/$defs/__schema2",
            },
            sort: {
              default: [],
              maxItems: 8,
              type: "array",
              items: {
                type: "object",
                properties: {
                  field: {
                    minItems: 1,
                    maxItems: 9,
                    type: "array",
                    items: {
                      type: "string",
                      minLength: 1,
                    },
                  },
                  direction: {
                    type: "string",
                    enum: ["asc", "desc"],
                  },
                },
                required: ["field", "direction"],
                additionalProperties: false,
              },
            },
            limit: {
              default: 20,
              type: "integer",
              minimum: 0,
              maximum: 1000,
            },
            offset: {
              default: 0,
              type: "integer",
              minimum: 0,
              maximum: 1000,
            },
            output: {
              default: {
                mode: "fields",
                includeMetadata: false,
                fields: [["url"], ["width"], ["height"]],
              },
              oneOf: [
                {
                  type: "object",
                  properties: {
                    mode: {
                      type: "string",
                      const: "all",
                    },
                    includeMetadata: {
                      default: true,
                      type: "boolean",
                    },
                  },
                  required: ["mode"],
                  additionalProperties: false,
                },
                {
                  type: "object",
                  properties: {
                    mode: {
                      type: "string",
                      const: "base",
                    },
                    includeMetadata: {
                      default: true,
                      type: "boolean",
                    },
                  },
                  required: ["mode"],
                  additionalProperties: false,
                },
                {
                  type: "object",
                  properties: {
                    mode: {
                      type: "string",
                      const: "fields",
                    },
                    includeMetadata: {
                      default: true,
                      type: "boolean",
                    },
                    fields: {
                      maxItems: 256,
                      type: "array",
                      items: {
                        minItems: 1,
                        maxItems: 9,
                        type: "array",
                        items: {
                          type: "string",
                          minLength: 1,
                        },
                      },
                    },
                  },
                  required: ["mode", "fields"],
                  additionalProperties: false,
                },
              ],
            },
            content: {
              default: {
                mode: "none",
              },
              oneOf: [
                {
                  type: "object",
                  properties: {
                    mode: {
                      type: "string",
                      const: "none",
                    },
                  },
                  required: ["mode"],
                  additionalProperties: false,
                },
                {
                  type: "object",
                  properties: {
                    mode: {
                      type: "string",
                      const: "full",
                    },
                    maxBytes: {
                      type: "integer",
                      exclusiveMinimum: 0,
                      maximum: 1048576,
                    },
                  },
                  required: ["mode"],
                  additionalProperties: false,
                },
                {
                  type: "object",
                  properties: {
                    mode: {
                      type: "string",
                      const: "range",
                    },
                    offset: {
                      type: "integer",
                      minimum: 0,
                      maximum: 9007199254740991,
                    },
                    length: {
                      type: "integer",
                      exclusiveMinimum: 0,
                      maximum: 262144,
                    },
                  },
                  required: ["mode", "offset", "length"],
                  additionalProperties: false,
                },
                {
                  type: "object",
                  properties: {
                    mode: {
                      type: "string",
                      const: "markdown-body-ref",
                    },
                    maxBytes: {
                      type: "integer",
                      exclusiveMinimum: 0,
                      maximum: 1048576,
                    },
                  },
                  required: ["mode"],
                  additionalProperties: false,
                },
              ],
            },
          },
          additionalProperties: false,
          required: [],
        },
      },
      required: ["query"],
      $defs: {
        __schema0: {
          anyOf: [
            {
              type: "string",
            },
            {
              type: "number",
            },
            {
              type: "boolean",
            },
            {
              type: "null",
            },
            {
              type: "array",
              items: {
                $ref: "#/$defs/__schema0",
              },
            },
            {
              type: "object",
              propertyNames: {
                type: "string",
              },
              additionalProperties: {
                $ref: "#/$defs/__schema0",
              },
            },
          ],
        },
        __schema1: {
          anyOf: [
            {
              type: "string",
            },
            {
              type: "number",
            },
            {
              type: "boolean",
            },
            {
              type: "null",
            },
            {
              type: "array",
              items: {
                $ref: "#/$defs/__schema1",
              },
            },
            {
              type: "object",
              propertyNames: {
                type: "string",
              },
              additionalProperties: {
                $ref: "#/$defs/__schema1",
              },
            },
          ],
        },
        __schema2: {
          anyOf: [
            {
              oneOf: [
                {
                  type: "object",
                  properties: {
                    field: {
                      minItems: 1,
                      maxItems: 9,
                      type: "array",
                      items: {
                        type: "string",
                        minLength: 1,
                      },
                    },
                    operator: {
                      type: "string",
                      enum: [
                        "eq",
                        "ne",
                        "contains",
                        "startsWith",
                        "endsWith",
                        "gt",
                        "gte",
                        "lt",
                        "lte",
                      ],
                    },
                    value: {
                      $ref: "#/$defs/__schema0",
                    },
                  },
                  required: ["field", "operator", "value"],
                  additionalProperties: false,
                },
                {
                  type: "object",
                  properties: {
                    field: {
                      minItems: 1,
                      maxItems: 9,
                      type: "array",
                      items: {
                        type: "string",
                        minLength: 1,
                      },
                    },
                    operator: {
                      type: "string",
                      const: "in",
                    },
                    value: {
                      maxItems: 1000,
                      type: "array",
                      items: {
                        $ref: "#/$defs/__schema1",
                      },
                    },
                  },
                  required: ["field", "operator", "value"],
                  additionalProperties: false,
                },
                {
                  type: "object",
                  properties: {
                    field: {
                      minItems: 1,
                      maxItems: 9,
                      type: "array",
                      items: {
                        type: "string",
                        minLength: 1,
                      },
                    },
                    operator: {
                      type: "string",
                      enum: ["exists", "isEmpty"],
                    },
                    value: {
                      type: "boolean",
                    },
                  },
                  required: ["field", "operator", "value"],
                  additionalProperties: false,
                },
              ],
            },
            {
              type: "object",
              properties: {
                all: {
                  maxItems: 32,
                  type: "array",
                  items: {
                    $ref: "#/$defs/__schema2",
                  },
                },
              },
              required: ["all"],
              additionalProperties: false,
            },
            {
              type: "object",
              properties: {
                any: {
                  maxItems: 32,
                  type: "array",
                  items: {
                    $ref: "#/$defs/__schema2",
                  },
                },
              },
              required: ["any"],
              additionalProperties: false,
            },
          ],
        },
      },
    },
  },
  "assetQueries.preview": {
    id: "assetQueries.preview",
    command: "preview-asset-query",
    method: "query",
    path: "api.assetQueries.preview",
    client: "previewAssetQuery",
    permit: "view",
    inputSchema: {
      type: "object",
      properties: {
        query: {
          type: "object",
          properties: {
            result: {
              default: "many",
              type: "string",
              enum: ["many", "one", "first", "last"],
            },
            where: {
              default: {
                all: [],
              },
              $ref: "#/$defs/__schema2",
            },
            sort: {
              default: [],
              maxItems: 8,
              type: "array",
              items: {
                type: "object",
                properties: {
                  field: {
                    minItems: 1,
                    maxItems: 9,
                    type: "array",
                    items: {
                      type: "string",
                      minLength: 1,
                    },
                  },
                  direction: {
                    type: "string",
                    enum: ["asc", "desc"],
                  },
                },
                required: ["field", "direction"],
                additionalProperties: false,
              },
            },
            limit: {
              default: 20,
              type: "integer",
              minimum: 0,
              maximum: 1000,
            },
            offset: {
              default: 0,
              type: "integer",
              minimum: 0,
              maximum: 1000,
            },
            output: {
              default: {
                mode: "fields",
                includeMetadata: false,
                fields: [["url"], ["width"], ["height"]],
              },
              oneOf: [
                {
                  type: "object",
                  properties: {
                    mode: {
                      type: "string",
                      const: "all",
                    },
                    includeMetadata: {
                      default: true,
                      type: "boolean",
                    },
                  },
                  required: ["mode"],
                  additionalProperties: false,
                },
                {
                  type: "object",
                  properties: {
                    mode: {
                      type: "string",
                      const: "base",
                    },
                    includeMetadata: {
                      default: true,
                      type: "boolean",
                    },
                  },
                  required: ["mode"],
                  additionalProperties: false,
                },
                {
                  type: "object",
                  properties: {
                    mode: {
                      type: "string",
                      const: "fields",
                    },
                    includeMetadata: {
                      default: true,
                      type: "boolean",
                    },
                    fields: {
                      maxItems: 256,
                      type: "array",
                      items: {
                        minItems: 1,
                        maxItems: 9,
                        type: "array",
                        items: {
                          type: "string",
                          minLength: 1,
                        },
                      },
                    },
                  },
                  required: ["mode", "fields"],
                  additionalProperties: false,
                },
              ],
            },
            content: {
              default: {
                mode: "none",
              },
              oneOf: [
                {
                  type: "object",
                  properties: {
                    mode: {
                      type: "string",
                      const: "none",
                    },
                  },
                  required: ["mode"],
                  additionalProperties: false,
                },
                {
                  type: "object",
                  properties: {
                    mode: {
                      type: "string",
                      const: "full",
                    },
                    maxBytes: {
                      type: "integer",
                      exclusiveMinimum: 0,
                      maximum: 1048576,
                    },
                  },
                  required: ["mode"],
                  additionalProperties: false,
                },
                {
                  type: "object",
                  properties: {
                    mode: {
                      type: "string",
                      const: "range",
                    },
                    offset: {
                      type: "integer",
                      minimum: 0,
                      maximum: 9007199254740991,
                    },
                    length: {
                      type: "integer",
                      exclusiveMinimum: 0,
                      maximum: 262144,
                    },
                  },
                  required: ["mode", "offset", "length"],
                  additionalProperties: false,
                },
                {
                  type: "object",
                  properties: {
                    mode: {
                      type: "string",
                      const: "markdown-body-ref",
                    },
                    maxBytes: {
                      type: "integer",
                      exclusiveMinimum: 0,
                      maximum: 1048576,
                    },
                  },
                  required: ["mode"],
                  additionalProperties: false,
                },
              ],
            },
          },
          additionalProperties: false,
          required: [],
        },
        indexRevision: {
          type: "string",
          minLength: 1,
          maxLength: 255,
        },
      },
      required: ["query"],
      $defs: {
        __schema0: {
          anyOf: [
            {
              type: "string",
            },
            {
              type: "number",
            },
            {
              type: "boolean",
            },
            {
              type: "null",
            },
            {
              type: "array",
              items: {
                $ref: "#/$defs/__schema0",
              },
            },
            {
              type: "object",
              propertyNames: {
                type: "string",
              },
              additionalProperties: {
                $ref: "#/$defs/__schema0",
              },
            },
          ],
        },
        __schema1: {
          anyOf: [
            {
              type: "string",
            },
            {
              type: "number",
            },
            {
              type: "boolean",
            },
            {
              type: "null",
            },
            {
              type: "array",
              items: {
                $ref: "#/$defs/__schema1",
              },
            },
            {
              type: "object",
              propertyNames: {
                type: "string",
              },
              additionalProperties: {
                $ref: "#/$defs/__schema1",
              },
            },
          ],
        },
        __schema2: {
          anyOf: [
            {
              oneOf: [
                {
                  type: "object",
                  properties: {
                    field: {
                      minItems: 1,
                      maxItems: 9,
                      type: "array",
                      items: {
                        type: "string",
                        minLength: 1,
                      },
                    },
                    operator: {
                      type: "string",
                      enum: [
                        "eq",
                        "ne",
                        "contains",
                        "startsWith",
                        "endsWith",
                        "gt",
                        "gte",
                        "lt",
                        "lte",
                      ],
                    },
                    value: {
                      $ref: "#/$defs/__schema0",
                    },
                  },
                  required: ["field", "operator", "value"],
                  additionalProperties: false,
                },
                {
                  type: "object",
                  properties: {
                    field: {
                      minItems: 1,
                      maxItems: 9,
                      type: "array",
                      items: {
                        type: "string",
                        minLength: 1,
                      },
                    },
                    operator: {
                      type: "string",
                      const: "in",
                    },
                    value: {
                      maxItems: 1000,
                      type: "array",
                      items: {
                        $ref: "#/$defs/__schema1",
                      },
                    },
                  },
                  required: ["field", "operator", "value"],
                  additionalProperties: false,
                },
                {
                  type: "object",
                  properties: {
                    field: {
                      minItems: 1,
                      maxItems: 9,
                      type: "array",
                      items: {
                        type: "string",
                        minLength: 1,
                      },
                    },
                    operator: {
                      type: "string",
                      enum: ["exists", "isEmpty"],
                    },
                    value: {
                      type: "boolean",
                    },
                  },
                  required: ["field", "operator", "value"],
                  additionalProperties: false,
                },
              ],
            },
            {
              type: "object",
              properties: {
                all: {
                  maxItems: 32,
                  type: "array",
                  items: {
                    $ref: "#/$defs/__schema2",
                  },
                },
              },
              required: ["all"],
              additionalProperties: false,
            },
            {
              type: "object",
              properties: {
                any: {
                  maxItems: 32,
                  type: "array",
                  items: {
                    $ref: "#/$defs/__schema2",
                  },
                },
              },
              required: ["any"],
              additionalProperties: false,
            },
          ],
        },
      },
    },
  },
  "assetQueries.fieldCatalog": {
    id: "assetQueries.fieldCatalog",
    command: "get-asset-field-catalog",
    method: "query",
    path: "api.assetQueries.fieldCatalog",
    client: "getAssetFieldCatalog",
    permit: "view",
    inputSchema: {
      type: "object",
      properties: {},
      required: [],
      additionalProperties: true,
    },
  },
  "publish.validate": {
    id: "publish.validate",
    command: "validate-publish",
    method: "query",
    path: "api.publish.validate",
    client: "validatePublish",
    permit: "edit",
    inputSchema: {
      type: "object",
      properties: {
        target: {
          type: "string",
          enum: ["staging", "production"],
        },
        domains: {
          type: "array",
          items: {
            type: "string",
          },
        },
      },
      required: ["target"],
    },
  },
  "publish.list": {
    id: "publish.list",
    command: "list-publishes",
    method: "query",
    path: "api.publish.list",
    client: "listPublishes",
    permit: "view",
    inputSchema: {
      type: "object",
      properties: {
        cursor: {
          type: "string",
        },
        limit: {
          type: "integer",
          minimum: 1,
          maximum: 200,
        },
        verbose: {
          description:
            "Expand the same result with complete records and diagnostics. Omit for compact output.",
          type: "boolean",
        },
      },
      required: [],
    },
  },
  "publish.create": {
    id: "publish.create",
    command: "publish",
    method: "mutation",
    path: "api.publish.create",
    client: "publish",
    permit: "edit",
    inputSchema: {
      type: "object",
      properties: {
        target: {
          type: "string",
          enum: ["staging", "production"],
        },
        domains: {
          type: "array",
          items: {
            type: "string",
          },
        },
        message: {
          type: "string",
        },
        idempotencyKey: {
          type: "string",
        },
      },
      required: ["target"],
    },
  },
  "publish.getJob": {
    id: "publish.getJob",
    command: "get-publish-job",
    method: "query",
    path: "api.publish.getJob",
    client: "getPublishJob",
    permit: "view",
    inputSchema: {
      type: "object",
      properties: {
        jobId: {
          type: "string",
        },
      },
      required: ["jobId"],
    },
  },
  "publish.unpublish": {
    id: "publish.unpublish",
    command: "unpublish",
    method: "mutation",
    path: "api.publish.unpublish",
    client: "unpublish",
    permit: "edit",
    inputSchema: {
      type: "object",
      properties: {
        target: {
          type: "string",
          enum: ["staging", "production"],
        },
        domains: {
          type: "array",
          items: {
            type: "string",
          },
        },
        message: {
          type: "string",
        },
        idempotencyKey: {
          type: "string",
        },
      },
      required: ["target"],
    },
  },
  "domains.list": {
    id: "domains.list",
    command: "list-domains",
    method: "query",
    path: "api.domains.list",
    client: "listDomains",
    permit: "view",
    inputSchema: {
      type: "object",
      properties: {
        cursor: {
          type: "string",
        },
        limit: {
          type: "integer",
          minimum: 1,
          maximum: 200,
        },
        verbose: {
          description:
            "Expand the same result with complete records and diagnostics. Omit for compact output.",
          type: "boolean",
        },
      },
      required: [],
    },
  },
  "domains.create": {
    id: "domains.create",
    command: "create-domain",
    method: "mutation",
    path: "api.domains.create",
    client: "createDomain",
    permit: "admin",
    inputSchema: {
      type: "object",
      properties: {
        domain: {
          type: "string",
        },
      },
      required: ["domain"],
    },
  },
  "domains.update": {
    id: "domains.update",
    command: "update-domain",
    method: "mutation",
    path: "api.domains.update",
    client: "updateDomain",
    permit: "admin",
    inputSchema: {
      type: "object",
      properties: {
        domainId: {
          type: "string",
        },
        updates: {
          type: "object",
          properties: {
            domain: {
              type: "string",
            },
          },
          required: [],
        },
      },
      required: ["domainId", "updates"],
    },
  },
  "domains.delete": {
    id: "domains.delete",
    command: "delete-domain",
    method: "mutation",
    path: "api.domains.delete",
    client: "deleteDomain",
    permit: "admin",
    inputSchema: {
      type: "object",
      properties: {
        domainId: {
          type: "string",
        },
      },
      required: ["domainId"],
    },
  },
  "domains.verify": {
    id: "domains.verify",
    command: "verify-domain",
    method: "mutation",
    path: "api.domains.verify",
    client: "verifyDomain",
    permit: "admin",
    inputSchema: {
      type: "object",
      properties: {
        domainId: {
          type: "string",
        },
      },
      required: ["domainId"],
    },
  },
} as const satisfies Record<
  string,
  {
    id: string;
    command: string;
    method: "query" | "mutation";
    path: string;
    client: string;
    permit: PublicApiOperationPermit;
    invalidatesNamespaces?: readonly PublicApiOperationNamespace[];
    inputSchema: InputJsonSchema;
  }
>;