{
  "openapi": "3.0.0",
  "info": {
    "title": "n8n 公共 API",
    "version": "1.1.1"
  },
  "components": {
    "schemas": {
      "applyPackageResultDto.generated": {
        "oneOf": [
          {
            "type": "object",
            "properties": {
              "environmentId": {
                "type": "string",
                "minLength": 1,
                "maxLength": 36
              },
              "git": {
                "type": "object",
                "properties": {
                  "commitSha": {
                    "type": "string"
                  },
                  "branchName": {
                    "type": "string"
                  }
                },
                "required": [
                  "commitSha",
                  "branchName"
                ]
              },
              "status": {
                "type": "string",
                "enum": [
                  "applied"
                ]
              },
              "counts": {
                "type": "object",
                "properties": {
                  "projects": {
                    "type": "object",
                    "properties": {
                      "created": {
                        "type": "integer",
                        "minimum": 0
                      },
                      "updated": {
                        "type": "integer",
                        "minimum": 0
                      },
                      "skipped": {
                        "type": "integer",
                        "minimum": 0
                      },
                      "deleted": {
                        "type": "integer",
                        "minimum": 0
                      }
                    },
                    "required": [
                      "created",
                      "updated",
                      "skipped",
                      "deleted"
                    ]
                  },
                  "folders": {
                    "type": "object",
                    "properties": {
                      "created": {
                        "type": "integer",
                        "minimum": 0
                      },
                      "updated": {
                        "type": "integer",
                        "minimum": 0,
                        "description": "Apply 为匹配分支而移动或重命名的现有文件夹。"
                      },
                      "skipped": {
                        "type": "integer",
                        "minimum": 0
                      },
                      "moved": {
                        "type": "integer",
                        "minimum": 0,
                        "description": "Apply 将其移到项目内其他父文件夹下的已更新文件夹，也包含在 `updated` 中。"
                      },
                      "renamed": {
                        "type": "integer",
                        "minimum": 0,
                        "description": "Apply 将其名称改为分支上名称的已更新文件夹，也包含在 `updated` 中。"
                      },
                      "removed": {
                        "type": "integer",
                        "minimum": 0
                      }
                    },
                    "required": [
                      "created",
                      "updated",
                      "skipped",
                      "moved",
                      "renamed",
                      "removed"
                    ]
                  },
                  "workflows": {
                    "type": "object",
                    "properties": {
                      "created": {
                        "type": "integer",
                        "minimum": 0
                      },
                      "updated": {
                        "type": "integer",
                        "minimum": 0
                      },
                      "skipped": {
                        "type": "integer",
                        "minimum": 0
                      },
                      "moved": {
                        "type": "integer",
                        "minimum": 0,
                        "description": "Apply 同时将其移到项目内其他文件夹的已更新工作流，也包含在 `updated` 中。"
                      },
                      "archived": {
                        "type": "integer",
                        "minimum": 0
                      },
                      "deleted": {
                        "type": "integer",
                        "minimum": 0
                      },
                      "publishing": {
                        "type": "object",
                        "properties": {
                          "published": {
                            "type": "integer",
                            "minimum": 0
                          },
                          "unpublished": {
                            "type": "integer",
                            "minimum": 0
                          },
                          "unchanged": {
                            "type": "integer",
                            "minimum": 0
                          },
                          "blocked": {
                            "type": "integer",
                            "minimum": 0
                          },
                          "failed": {
                            "type": "integer",
                            "minimum": 0
                          }
                        },
                        "required": [
                          "published",
                          "unpublished",
                          "unchanged",
                          "blocked",
                          "failed"
                        ]
                      }
                    },
                    "required": [
                      "created",
                      "updated",
                      "skipped",
                      "moved",
                      "archived",
                      "deleted",
                      "publishing"
                    ]
                  },
                  "credentials": {
                    "type": "object",
                    "properties": {
                      "matched": {
                        "type": "integer",
                        "minimum": 0
                      },
                      "stubbed": {
                        "type": "integer",
                        "minimum": 0
                      },
                      "updated": {
                        "type": "integer",
                        "minimum": 0
                      }
                    },
                    "required": [
                      "matched",
                      "stubbed",
                      "updated"
                    ]
                  },
                  "dataTables": {
                    "type": "object",
                    "properties": {
                      "matched": {
                        "type": "integer",
                        "minimum": 0
                      },
                      "created": {
                        "type": "integer",
                        "minimum": 0
                      },
                      "updated": {
                        "type": "integer",
                        "minimum": 0
                      }
                    },
                    "required": [
                      "matched",
                      "created",
                      "updated"
                    ]
                  },
                  "variables": {
                    "type": "object",
                    "properties": {
                      "matched": {
                        "type": "integer",
                        "minimum": 0
                      },
                      "created": {
                        "type": "integer",
                        "minimum": 0
                      },
                      "updated": {
                        "type": "integer",
                        "minimum": 0
                      },
                      "stubbed": {
                        "type": "integer",
                        "minimum": 0
                      },
                      "missing": {
                        "type": "integer",
                        "minimum": 0
                      }
                    },
                    "required": [
                      "matched",
                      "created",
                      "updated",
                      "stubbed",
                      "missing"
                    ]
                  },
                  "tags": {
                    "type": "object",
                    "properties": {
                      "matched": {
                        "type": "integer",
                        "minimum": 0
                      },
                      "created": {
                        "type": "integer",
                        "minimum": 0
                      },
                      "renamed": {
                        "type": "integer",
                        "minimum": 0
                      },
                      "reconciled": {
                        "type": "integer",
                        "minimum": 0
                      },
                      "skipped": {
                        "type": "integer",
                        "minimum": 0
                      }
                    },
                    "required": [
                      "matched",
                      "created",
                      "renamed",
                      "reconciled",
                      "skipped"
                    ]
                  }
                },
                "required": [
                  "projects",
                  "folders",
                  "workflows",
                  "credentials",
                  "dataTables",
                  "variables",
                  "tags"
                ]
              },
              "warnings": {
                "type": "array",
                "items": {
                  "type": "object",
                  "properties": {
                    "kind": {
                      "type": "string",
                      "enum": [
                        "variable"
                      ]
                    },
                    "code": {
                      "type": "string",
                      "enum": [
                        "variable-shadowed"
                      ]
                    },
                    "name": {
                      "type": "string",
                      "minLength": 1
                    },
                    "scope": {
                      "type": "object",
                      "properties": {
                        "kind": {
                          "type": "string",
                          "enum": [
                            "global"
                          ]
                        }
                      },
                      "required": [
                        "kind"
                      ]
                    },
                    "consumers": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "project": {
                            "type": "object",
                            "properties": {
                              "id": {
                                "type": "string",
                                "minLength": 1
                              },
                              "name": {
                                "type": "string"
                              }
                            },
                            "required": [
                              "id",
                              "name"
                            ]
                          },
                          "workflows": {
                            "type": "array",
                            "items": {
                              "type": "object",
                              "properties": {
                                "id": {
                                  "type": "string",
                                  "minLength": 1
                                },
                                "name": {
                                  "type": "string"
                                }
                              },
                              "required": [
                                "id",
                                "name"
                              ]
                            },
                            "minItems": 1
                          }
                        },
                        "required": [
                          "project",
                          "workflows"
                        ]
                      },
                      "minItems": 1
                    }
                  },
                  "required": [
                    "kind",
                    "code",
                    "name",
                    "scope",
                    "consumers"
                  ]
                }
              }
            },
            "required": [
              "environmentId",
              "git",
              "status",
              "counts",
              "warnings"
            ]
          },
          {
            "type": "object",
            "properties": {
              "environmentId": {
                "type": "string",
                "minLength": 1,
                "maxLength": 36
              },
              "git": {
                "type": "object",
                "properties": {
                  "commitSha": {
                    "type": "string"
                  },
                  "branchName": {
                    "type": "string"
                  }
                },
                "required": [
                  "commitSha",
                  "branchName"
                ]
              },
              "status": {
                "type": "string",
                "enum": [
                  "blocked"
                ]
              },
              "preflight": {
                "type": "object",
                "properties": {
                  "missingProjects": {
                    "type": "array",
                    "items": {
                      "type": "object",
                      "properties": {
                        "id": {
                          "type": "string",
                          "minLength": 1
                        },
                        "name": {
                          "type": "string"
                        },
                        "icon": {
                          "type": "object",
                          "properties": {
                            "type": {
                              "type": "string",
                              "enum": [
                                "emoji",
                                "icon"
                              ]
                            },
                            "value": {
                              "type": "string"
                            }
                          },
                          "required": [
                            "type",
                            "value"
                          ]
                        },
                        "description": {
                          "type": "string"
                        },
                        "customTelemetryTags": {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "key": {
                                "type": "string"
                              },
                              "value": {
                                "type": "string"
                              }
                            },
                            "required": [
                              "key",
                              "value"
                            ]
                          }
                        }
                      },
                      "required": [
                        "id",
                        "name"
                      ]
                    },
                    "description": "包中存在、但实例上不存在的项目。预检会保留其元数据，不检查项目创建规则。项目创建 API 可能拒绝无效值。"
                  },
                  "missingBindings": {
                    "type": "array",
                    "items": {
                      "oneOf": [
                        {
                          "type": "object",
                          "properties": {
                            "kind": {
                              "type": "string",
                              "enum": [
                                "credential"
                              ]
                            },
                            "sourceId": {
                              "type": "string",
                              "minLength": 1
                            },
                            "name": {
                              "type": "string"
                            },
                            "credentialType": {
                              "type": "string",
                              "minLength": 1
                            },
                            "consumers": {
                              "type": "array",
                              "items": {
                                "type": "object",
                                "properties": {
                                  "project": {
                                    "type": "object",
                                    "properties": {
                                      "id": {
                                        "type": "string",
                                        "minLength": 1
                                      },
                                      "name": {
                                        "type": "string"
                                      }
                                    },
                                    "required": [
                                      "id",
                                      "name"
                                    ]
                                  },
                                  "workflows": {
                                    "type": "array",
                                    "items": {
                                      "type": "object",
                                      "properties": {
                                        "id": {
                                          "type": "string",
                                          "minLength": 1
                                        },
                                        "name": {
                                          "type": "string"
                                        }
                                      },
                                      "required": [
                                        "id",
                                        "name"
                                      ]
                                    },
                                    "minItems": 1
                                  }
                                },
                                "required": [
                                  "project",
                                  "workflows"
                                ]
                              },
                              "minItems": 1
                            },
                            "ownerProject": {
                              "type": "object",
                              "properties": {
                                "id": {
                                  "type": "string",
                                  "minLength": 1
                                },
                                "name": {
                                  "type": "string"
                                }
                              },
                              "required": [
                                "id",
                                "name"
                              ]
                            },
                            "expressionData": {
                              "type": "object",
                              "additionalProperties": {
                                "$ref": "#/components/schemas/promotionCredentialExpressionValue.generated"
                              },
                              "description": "凭据表达式。"
                            }
                          },
                          "required": [
                            "kind",
                            "sourceId",
                            "name",
                            "credentialType",
                            "consumers",
                            "ownerProject"
                          ]
                        },
                        {
                          "type": "object",
                          "properties": {
                            "kind": {
                              "type": "string",
                              "enum": [
                                "variable"
                              ]
                            },
                            "name": {
                              "type": "string",
                              "minLength": 1
                            },
                            "variableType": {
                              "type": "string",
                              "enum": [
                                "string"
                              ],
                              "default": "string"
                            },
                            "scope": {
                              "oneOf": [
                                {
                                  "type": "object",
                                  "properties": {
                                    "kind": {
                                      "type": "string",
                                      "enum": [
                                        "global"
                                      ]
                                    }
                                  },
                                  "required": [
                                    "kind"
                                  ]
                                },
                                {
                                  "type": "object",
                                  "properties": {
                                    "kind": {
                                      "type": "string",
                                      "enum": [
                                        "project"
                                      ]
                                    },
                                    "project": {
                                      "type": "object",
                                      "properties": {
                                        "id": {
                                          "type": "string",
                                          "minLength": 1
                                        },
                                        "name": {
                                          "type": "string"
                                        }
                                      },
                                      "required": [
                                        "id",
                                        "name"
                                      ]
                                    }
                                  },
                                  "required": [
                                    "kind",
                                    "project"
                                  ]
                                }
                              ],
                              "type": "object"
                            },
                            "sourceValue": {
                              "type": "string",
                              "maxLength": 1000
                            },
                            "consumers": {
                              "type": "array",
                              "items": {
                                "type": "object",
                                "properties": {
                                  "project": {
                                    "type": "object",
                                    "properties": {
                                      "id": {
                                        "type": "string",
                                        "minLength": 1
                                      },
                                      "name": {
                                        "type": "string"
                                      }
                                    },
                                    "required": [
                                      "id",
                                      "name"
                                    ]
                                  },
                                  "workflows": {
                                    "type": "array",
                                    "items": {
                                      "type": "object",
                                      "properties": {
                                        "id": {
                                          "type": "string",
                                          "minLength": 1
                                        },
                                        "name": {
                                          "type": "string"
                                        }
                                      },
                                      "required": [
                                        "id",
                                        "name"
                                      ]
                                    },
                                    "minItems": 1
                                  }
                                },
                                "required": [
                                  "project",
                                  "workflows"
                                ]
                              },
                              "minItems": 1
                            }
                          },
                          "required": [
                            "kind",
                            "name",
                            "scope",
                            "consumers"
                          ]
                        }
                      ],
                      "type": "object"
                    }
                  },
                  "accessRequirements": {
                    "type": "array",
                    "items": {
                      "type": "object",
                      "properties": {
                        "kind": {
                          "type": "string",
                          "enum": [
                            "credential"
                          ]
                        },
                        "sourceId": {
                          "type": "string",
                          "minLength": 1
                        },
                        "name": {
                          "type": "string"
                        },
                        "credentialType": {
                          "type": "string",
                          "minLength": 1
                        },
                        "consumers": {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "project": {
                                "type": "object",
                                "properties": {
                                  "id": {
                                    "type": "string",
                                    "minLength": 1
                                  },
                                  "name": {
                                    "type": "string"
                                  }
                                },
                                "required": [
                                  "id",
                                  "name"
                                ]
                              },
                              "workflows": {
                                "type": "array",
                                "items": {
                                  "type": "object",
                                  "properties": {
                                    "id": {
                                      "type": "string",
                                      "minLength": 1
                                    },
                                    "name": {
                                      "type": "string"
                                    }
                                  },
                                  "required": [
                                    "id",
                                    "name"
                                  ]
                                },
                                "minItems": 1
                              }
                            },
                            "required": [
                              "project",
                              "workflows"
                            ]
                          },
                          "minItems": 1
                        },
                        "code": {
                          "type": "string",
                          "enum": [
                            "access-required"
                          ]
                        }
                      },
                      "required": [
                        "kind",
                        "sourceId",
                        "name",
                        "credentialType",
                        "consumers",
                        "code"
                      ]
                    }
                  },
                  "conflicts": {
                    "type": "array",
                    "items": {
                      "oneOf": [
                        {
                          "type": "object",
                          "properties": {
                            "kind": {
                              "type": "string",
                              "enum": [
                                "credential"
                              ]
                            },
                            "sourceId": {
                              "type": "string",
                              "nullable": true,
                              "minLength": 1
                            },
                            "name": {
                              "type": "string"
                            },
                            "expectedTypes": {
                              "type": "array",
                              "items": {
                                "type": "string"
                              },
                              "minItems": 1
                            },
                            "filePath": {
                              "type": "string"
                            },
                            "referenceFiles": {
                              "type": "array",
                              "items": {
                                "type": "string"
                              },
                              "minItems": 1
                            },
                            "consumers": {
                              "type": "array",
                              "items": {
                                "type": "object",
                                "properties": {
                                  "project": {
                                    "type": "object",
                                    "properties": {
                                      "id": {
                                        "type": "string",
                                        "minLength": 1
                                      },
                                      "name": {
                                        "type": "string"
                                      }
                                    },
                                    "required": [
                                      "id",
                                      "name"
                                    ]
                                  },
                                  "workflows": {
                                    "type": "array",
                                    "items": {
                                      "type": "object",
                                      "properties": {
                                        "id": {
                                          "type": "string",
                                          "minLength": 1
                                        },
                                        "name": {
                                          "type": "string"
                                        }
                                      },
                                      "required": [
                                        "id",
                                        "name"
                                      ]
                                    },
                                    "minItems": 1
                                  }
                                },
                                "required": [
                                  "project",
                                  "workflows"
                                ]
                              },
                              "minItems": 1
                            },
                            "code": {
                              "type": "string",
                              "enum": [
                                "missing-id"
                              ]
                            }
                          },
                          "required": [
                            "kind",
                            "sourceId",
                            "name",
                            "expectedTypes",
                            "referenceFiles",
                            "consumers",
                            "code"
                          ]
                        },
                        {
                          "type": "object",
                          "properties": {
                            "kind": {
                              "type": "string",
                              "enum": [
                                "credential"
                              ]
                            },
                            "sourceId": {
                              "type": "string",
                              "nullable": true,
                              "minLength": 1
                            },
                            "name": {
                              "type": "string"
                            },
                            "expectedTypes": {
                              "type": "array",
                              "items": {
                                "type": "string"
                              },
                              "minItems": 1
                            },
                            "filePath": {
                              "type": "string"
                            },
                            "referenceFiles": {
                              "type": "array",
                              "items": {
                                "type": "string"
                              },
                              "minItems": 1
                            },
                            "consumers": {
                              "type": "array",
                              "items": {
                                "type": "object",
                                "properties": {
                                  "project": {
                                    "type": "object",
                                    "properties": {
                                      "id": {
                                        "type": "string",
                                        "minLength": 1
                                      },
                                      "name": {
                                        "type": "string"
                                      }
                                    },
                                    "required": [
                                      "id",
                                      "name"
                                    ]
                                  },
                                  "workflows": {
                                    "type": "array",
                                    "items": {
                                      "type": "object",
                                      "properties": {
                                        "id": {
                                          "type": "string",
                                          "minLength": 1
                                        },
                                        "name": {
                                          "type": "string"
                                        }
                                      },
                                      "required": [
                                        "id",
                                        "name"
                                      ]
                                    },
                                    "minItems": 1
                                  }
                                },
                                "required": [
                                  "project",
                                  "workflows"
                                ]
                              },
                              "minItems": 1
                            },
                            "code": {
                              "type": "string",
                              "enum": [
                                "conflicting-types"
                              ]
                            }
                          },
                          "required": [
                            "kind",
                            "sourceId",
                            "name",
                            "expectedTypes",
                            "referenceFiles",
                            "consumers",
                            "code"
                          ]
                        },
                        {
                          "type": "object",
                          "properties": {
                            "kind": {
                              "type": "string",
                              "enum": [
                                "credential"
                              ]
                            },
                            "sourceId": {
                              "type": "string",
                              "nullable": true,
                              "minLength": 1
                            },
                            "name": {
                              "type": "string"
                            },
                            "expectedTypes": {
                              "type": "array",
                              "items": {
                                "type": "string"
                              },
                              "minItems": 1
                            },
                            "filePath": {
                              "type": "string"
                            },
                            "referenceFiles": {
                              "type": "array",
                              "items": {
                                "type": "string"
                              },
                              "minItems": 1
                            },
                            "consumers": {
                              "type": "array",
                              "items": {
                                "type": "object",
                                "properties": {
                                  "project": {
                                    "type": "object",
                                    "properties": {
                                      "id": {
                                        "type": "string",
                                        "minLength": 1
                                      },
                                      "name": {
                                        "type": "string"
                                      }
                                    },
                                    "required": [
                                      "id",
                                      "name"
                                    ]
                                  },
                                  "workflows": {
                                    "type": "array",
                                    "items": {
                                      "type": "object",
                                      "properties": {
                                        "id": {
                                          "type": "string",
                                          "minLength": 1
                                        },
                                        "name": {
                                          "type": "string"
                                        }
                                      },
                                      "required": [
                                        "id",
                                        "name"
                                      ]
                                    },
                                    "minItems": 1
                                  }
                                },
                                "required": [
                                  "project",
                                  "workflows"
                                ]
                              },
                              "minItems": 1
                            },
                            "code": {
                              "type": "string",
                              "enum": [
                                "unknown-type"
                              ]
                            }
                          },
                          "required": [
                            "kind",
                            "sourceId",
                            "name",
                            "expectedTypes",
                            "referenceFiles",
                            "consumers",
                            "code"
                          ]
                        },
                        {
                          "type": "object",
                          "properties": {
                            "kind": {
                              "type": "string",
                              "enum": [
                                "credential"
                              ]
                            },
                            "sourceId": {
                              "type": "string",
                              "nullable": true,
                              "minLength": 1
                            },
                            "name": {
                              "type": "string"
                            },
                            "expectedTypes": {
                              "type": "array",
                              "items": {
                                "type": "string"
                              },
                              "minItems": 1
                            },
                            "filePath": {
                              "type": "string"
                            },
                            "referenceFiles": {
                              "type": "array",
                              "items": {
                                "type": "string"
                              },
                              "minItems": 1
                            },
                            "consumers": {
                              "type": "array",
                              "items": {
                                "type": "object",
                                "properties": {
                                  "project": {
                                    "type": "object",
                                    "properties": {
                                      "id": {
                                        "type": "string",
                                        "minLength": 1
                                      },
                                      "name": {
                                        "type": "string"
                                      }
                                    },
                                    "required": [
                                      "id",
                                      "name"
                                    ]
                                  },
                                  "workflows": {
                                    "type": "array",
                                    "items": {
                                      "type": "object",
                                      "properties": {
                                        "id": {
                                          "type": "string",
                                          "minLength": 1
                                        },
                                        "name": {
                                          "type": "string"
                                        }
                                      },
                                      "required": [
                                        "id",
                                        "name"
                                      ]
                                    },
                                    "minItems": 1
                                  }
                                },
                                "required": [
                                  "project",
                                  "workflows"
                                ]
                              },
                              "minItems": 1
                            },
                            "code": {
                              "type": "string",
                              "enum": [
                                "unknown-owner"
                              ]
                            }
                          },
                          "required": [
                            "kind",
                            "sourceId",
                            "name",
                            "expectedTypes",
                            "referenceFiles",
                            "consumers",
                            "code"
                          ]
                        },
                        {
                          "type": "object",
                          "properties": {
                            "kind": {
                              "type": "string",
                              "enum": [
                                "credential"
                              ]
                            },
                            "sourceId": {
                              "type": "string",
                              "nullable": true,
                              "minLength": 1
                            },
                            "name": {
                              "type": "string"
                            },
                            "expectedTypes": {
                              "type": "array",
                              "items": {
                                "type": "string"
                              },
                              "minItems": 1
                            },
                            "filePath": {
                              "type": "string"
                            },
                            "referenceFiles": {
                              "type": "array",
                              "items": {
                                "type": "string"
                              },
                              "minItems": 1
                            },
                            "consumers": {
                              "type": "array",
                              "items": {
                                "type": "object",
                                "properties": {
                                  "project": {
                                    "type": "object",
                                    "properties": {
                                      "id": {
                                        "type": "string",
                                        "minLength": 1
                                      },
                                      "name": {
                                        "type": "string"
                                      }
                                    },
                                    "required": [
                                      "id",
                                      "name"
                                    ]
                                  },
                                  "workflows": {
                                    "type": "array",
                                    "items": {
                                      "type": "object",
                                      "properties": {
                                        "id": {
                                          "type": "string",
                                          "minLength": 1
                                        },
                                        "name": {
                                          "type": "string"
                                        }
                                      },
                                      "required": [
                                        "id",
                                        "name"
                                      ]
                                    },
                                    "minItems": 1
                                  }
                                },
                                "required": [
                                  "project",
                                  "workflows"
                                ]
                              },
                              "minItems": 1
                            },
                            "code": {
                              "type": "string",
                              "enum": [
                                "type-mismatch"
                              ]
                            },
                            "targetType": {
                              "type": "string"
                            }
                          },
                          "required": [
                            "kind",
                            "sourceId",
                            "name",
                            "expectedTypes",
                            "referenceFiles",
                            "consumers",
                            "code",
                            "targetType"
                          ]
                        },
                        {
                          "type": "object",
                          "properties": {
                            "kind": {
                              "type": "string",
                              "enum": [
                                "credential"
                              ]
                            },
                            "sourceId": {
                              "type": "string",
                              "nullable": true,
                              "minLength": 1
                            },
                            "name": {
                              "type": "string"
                            },
                            "expectedTypes": {
                              "type": "array",
                              "items": {
                                "type": "string"
                              },
                              "minItems": 1
                            },
                            "filePath": {
                              "type": "string"
                            },
                            "referenceFiles": {
                              "type": "array",
                              "items": {
                                "type": "string"
                              },
                              "minItems": 1
                            },
                            "consumers": {
                              "type": "array",
                              "items": {
                                "type": "object",
                                "properties": {
                                  "project": {
                                    "type": "object",
                                    "properties": {
                                      "id": {
                                        "type": "string",
                                        "minLength": 1
                                      },
                                      "name": {
                                        "type": "string"
                                      }
                                    },
                                    "required": [
                                      "id",
                                      "name"
                                    ]
                                  },
                                  "workflows": {
                                    "type": "array",
                                    "items": {
                                      "type": "object",
                                      "properties": {
                                        "id": {
                                          "type": "string",
                                          "minLength": 1
                                        },
                                        "name": {
                                          "type": "string"
                                        }
                                      },
                                      "required": [
                                        "id",
                                        "name"
                                      ]
                                    },
                                    "minItems": 1
                                  }
                                },
                                "required": [
                                  "project",
                                  "workflows"
                                ]
                              },
                              "minItems": 1
                            },
                            "code": {
                              "type": "string",
                              "enum": [
                                "incompatible-usage-scope"
                              ]
                            },
                            "usageScope": {
                              "type": "string"
                            }
                          },
                          "required": [
                            "kind",
                            "sourceId",
                            "name",
                            "expectedTypes",
                            "referenceFiles",
                            "consumers",
                            "code",
                            "usageScope"
                          ]
                        },
                        {
                          "type": "object",
                          "properties": {
                            "kind": {
                              "type": "string",
                              "enum": [
                                "variable"
                              ]
                            },
                            "code": {
                              "type": "string",
                              "enum": [
                                "missing-definition"
                              ]
                            },
                            "name": {
                              "type": "string",
                              "minLength": 1
                            },
                            "referenceFiles": {
                              "type": "array",
                              "items": {
                                "type": "string"
                              },
                              "minItems": 1
                            },
                            "consumers": {
                              "type": "array",
                              "items": {
                                "type": "object",
                                "properties": {
                                  "project": {
                                    "type": "object",
                                    "properties": {
                                      "id": {
                                        "type": "string",
                                        "minLength": 1
                                      },
                                      "name": {
                                        "type": "string"
                                      }
                                    },
                                    "required": [
                                      "id",
                                      "name"
                                    ]
                                  },
                                  "workflows": {
                                    "type": "array",
                                    "items": {
                                      "type": "object",
                                      "properties": {
                                        "id": {
                                          "type": "string",
                                          "minLength": 1
                                        },
                                        "name": {
                                          "type": "string"
                                        }
                                      },
                                      "required": [
                                        "id",
                                        "name"
                                      ]
                                    },
                                    "minItems": 1
                                  }
                                },
                                "required": [
                                  "project",
                                  "workflows"
                                ]
                              },
                              "minItems": 1
                            }
                          },
                          "required": [
                            "kind",
                            "code",
                            "name",
                            "referenceFiles",
                            "consumers"
                          ]
                        },
                        {
                          "type": "object",
                          "properties": {
                            "kind": {
                              "type": "string",
                              "enum": [
                                "project"
                              ]
                            },
                            "code": {
                              "type": "string",
                              "enum": [
                                "project-not-team"
                              ]
                            },
                            "project": {
                              "type": "object",
                              "properties": {
                                "id": {
                                  "type": "string",
                                  "minLength": 1
                                },
                                "name": {
                                  "type": "string"
                                }
                              },
                              "required": [
                                "id",
                                "name"
                              ]
                            },
                            "filePath": {
                              "type": "string"
                            },
                            "workflows": {
                              "type": "array",
                              "items": {
                                "type": "object",
                                "properties": {
                                  "id": {
                                    "type": "string",
                                    "minLength": 1
                                  },
                                  "name": {
                                    "type": "string"
                                  }
                                },
                                "required": [
                                  "id",
                                  "name"
                                ]
                              }
                            }
                          },
                          "required": [
                            "kind",
                            "code",
                            "project",
                            "filePath",
                            "workflows"
                          ]
                        },
                        {
                          "type": "object",
                          "properties": {
                            "kind": {
                              "type": "string",
                              "enum": [
                                "project"
                              ]
                            },
                            "code": {
                              "type": "string",
                              "enum": [
                                "project-deletion"
                              ]
                            },
                            "project": {
                              "type": "object",
                              "properties": {
                                "id": {
                                  "type": "string",
                                  "minLength": 1
                                },
                                "name": {
                                  "type": "string"
                                }
                              },
                              "required": [
                                "id",
                                "name"
                              ]
                            }
                          },
                          "required": [
                            "kind",
                            "code",
                            "project"
                          ]
                        },
                        {
                          "type": "object",
                          "properties": {
                            "kind": {
                              "type": "string",
                              "enum": [
                                "data-table"
                              ]
                            },
                            "code": {
                              "type": "string",
                              "enum": [
                                "destructive-change"
                              ]
                            },
                            "id": {
                              "type": "string",
                              "minLength": 1
                            },
                            "name": {
                              "type": "string"
                            },
                            "consumers": {
                              "type": "array",
                              "items": {
                                "type": "object",
                                "properties": {
                                  "project": {
                                    "type": "object",
                                    "properties": {
                                      "id": {
                                        "type": "string",
                                        "minLength": 1
                                      },
                                      "name": {
                                        "type": "string"
                                      }
                                    },
                                    "required": [
                                      "id",
                                      "name"
                                    ]
                                  },
                                  "workflows": {
                                    "type": "array",
                                    "items": {
                                      "type": "object",
                                      "properties": {
                                        "id": {
                                          "type": "string",
                                          "minLength": 1
                                        },
                                        "name": {
                                          "type": "string"
                                        }
                                      },
                                      "required": [
                                        "id",
                                        "name"
                                      ]
                                    },
                                    "minItems": 1
                                  }
                                },
                                "required": [
                                  "project",
                                  "workflows"
                                ]
                              },
                              "minItems": 1
                            },
                            "changes": {
                              "type": "array",
                              "items": {
                                "oneOf": [
                                  {
                                    "type": "object",
                                    "properties": {
                                      "kind": {
                                        "type": "string",
                                        "enum": [
                                          "add-column"
                                        ]
                                      },
                                      "column": {
                                        "type": "string"
                                      },
                                      "type": {
                                        "type": "string",
                                        "enum": [
                                          "string",
                                          "number",
                                          "boolean",
                                          "date"
                                        ]
                                      },
                                      "destructive": {
                                        "type": "boolean",
                                        "enum": [
                                          false
                                        ]
                                      }
                                    },
                                    "required": [
                                      "kind",
                                      "column",
                                      "type",
                                      "destructive"
                                    ]
                                  },
                                  {
                                    "type": "object",
                                    "properties": {
                                      "kind": {
                                        "type": "string",
                                        "enum": [
                                          "remove-column"
                                        ]
                                      },
                                      "column": {
                                        "type": "string"
                                      },
                                      "type": {
                                        "type": "string",
                                        "enum": [
                                          "string",
                                          "number",
                                          "boolean",
                                          "date"
                                        ]
                                      },
                                      "destructive": {
                                        "type": "boolean",
                                        "enum": [
                                          true
                                        ]
                                      }
                                    },
                                    "required": [
                                      "kind",
                                      "column",
                                      "type",
                                      "destructive"
                                    ]
                                  },
                                  {
                                    "type": "object",
                                    "properties": {
                                      "kind": {
                                        "type": "string",
                                        "enum": [
                                          "change-column-type"
                                        ]
                                      },
                                      "column": {
                                        "type": "string"
                                      },
                                      "from": {
                                        "type": "string",
                                        "enum": [
                                          "string",
                                          "number",
                                          "boolean",
                                          "date"
                                        ]
                                      },
                                      "to": {
                                        "type": "string",
                                        "enum": [
                                          "string",
                                          "number",
                                          "boolean",
                                          "date"
                                        ]
                                      },
                                      "destructive": {
                                        "type": "boolean",
                                        "enum": [
                                          true
                                        ]
                                      }
                                    },
                                    "required": [
                                      "kind",
                                      "column",
                                      "from",
                                      "to",
                                      "destructive"
                                    ]
                                  },
                                  {
                                    "type": "object",
                                    "properties": {
                                      "kind": {
                                        "type": "string",
                                        "enum": [
                                          "rename-column"
                                        ]
                                      },
                                      "from": {
                                        "type": "string"
                                      },
                                      "to": {
                                        "type": "string"
                                      },
                                      "destructive": {
                                        "type": "boolean",
                                        "enum": [
                                          false
                                        ]
                                      }
                                    },
                                    "required": [
                                      "kind",
                                      "from",
                                      "to",
                                      "destructive"
                                    ]
                                  },
                                  {
                                    "type": "object",
                                    "properties": {
                                      "kind": {
                                        "type": "string",
                                        "enum": [
                                          "reorder-columns"
                                        ]
                                      },
                                      "destructive": {
                                        "type": "boolean",
                                        "enum": [
                                          false
                                        ]
                                      }
                                    },
                                    "required": [
                                      "kind",
                                      "destructive"
                                    ]
                                  },
                                  {
                                    "type": "object",
                                    "properties": {
                                      "kind": {
                                        "type": "string",
                                        "enum": [
                                          "rename-table"
                                        ]
                                      },
                                      "from": {
                                        "type": "string"
                                      },
                                      "to": {
                                        "type": "string"
                                      },
                                      "destructive": {
                                        "type": "boolean",
                                        "enum": [
                                          false
                                        ]
                                      }
                                    },
                                    "required": [
                                      "kind",
                                      "from",
                                      "to",
                                      "destructive"
                                    ]
                                  }
                                ],
                                "type": "object"
                              },
                              "minItems": 1
                            }
                          },
                          "required": [
                            "kind",
                            "code",
                            "id",
                            "name",
                            "consumers",
                            "changes"
                          ]
                        }
                      ],
                      "type": "object"
                    }
                  },
                  "warnings": {
                    "type": "array",
                    "items": {
                      "type": "object",
                      "properties": {
                        "kind": {
                          "type": "string",
                          "enum": [
                            "variable"
                          ]
                        },
                        "code": {
                          "type": "string",
                          "enum": [
                            "variable-shadowed"
                          ]
                        },
                        "name": {
                          "type": "string",
                          "minLength": 1
                        },
                        "scope": {
                          "type": "object",
                          "properties": {
                            "kind": {
                              "type": "string",
                              "enum": [
                                "global"
                              ]
                            }
                          },
                          "required": [
                            "kind"
                          ]
                        },
                        "consumers": {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "project": {
                                "type": "object",
                                "properties": {
                                  "id": {
                                    "type": "string",
                                    "minLength": 1
                                  },
                                  "name": {
                                    "type": "string"
                                  }
                                },
                                "required": [
                                  "id",
                                  "name"
                                ]
                              },
                              "workflows": {
                                "type": "array",
                                "items": {
                                  "type": "object",
                                  "properties": {
                                    "id": {
                                      "type": "string",
                                      "minLength": 1
                                    },
                                    "name": {
                                      "type": "string"
                                    }
                                  },
                                  "required": [
                                    "id",
                                    "name"
                                  ]
                                },
                                "minItems": 1
                              }
                            },
                            "required": [
                              "project",
                              "workflows"
                            ]
                          },
                          "minItems": 1
                        }
                      },
                      "required": [
                        "kind",
                        "code",
                        "name",
                        "scope",
                        "consumers"
                      ]
                    }
                  }
                },
                "required": [
                  "missingProjects",
                  "missingBindings",
                  "accessRequirements",
                  "conflicts",
                  "warnings"
                ]
              }
            },
            "required": [
              "environmentId",
              "git",
              "status",
              "preflight"
            ]
          },
          {
            "type": "object",
            "properties": {
              "environmentId": {
                "type": "string",
                "minLength": 1,
                "maxLength": 36
              },
              "git": {
                "type": "object",
                "properties": {
                  "commitSha": {
                    "type": "string"
                  },
                  "branchName": {
                    "type": "string"
                  }
                },
                "required": [
                  "commitSha",
                  "branchName"
                ]
              },
              "status": {
                "type": "string",
                "enum": [
                  "source-changed"
                ]
              }
            },
            "required": [
              "environmentId",
              "git",
              "status"
            ]
          }
        ],
        "type": "object"
      },
      "promotionCredentialExpressionValue.generated": {
        "anyOf": [
          {
            "type": "string"
          },
          {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/promotionCredentialExpressionValue.generated"
            }
          },
          {
            "type": "object",
            "additionalProperties": {
              "$ref": "#/components/schemas/promotionCredentialExpressionValue.generated"
            }
          }
        ],
        "description": "值可以是字符串、数组或嵌套对象。每个叶节点都是表达式字符串。"
      }
    }
  }
}
