﻿{
  "openapi": "3.0.3",
  "info": {
    "title": "Hex API",
    "version": "1.0.0",
    "description": "API specification for the Hex External API",
    "license": {
      "name": "UNLICENSED"
    },
    "contact": {}
  },
  "servers": [
    {
      "url": "https://app.hex.tech/api"
    }
  ],
  "security": [
    {
      "bearerAuth": []
    }
  ],
  "paths": {
    "/v1/embedding/createPresignedUrl/{projectId}": {
      "post": {
        "operationId": "CreatePresignedUrl",
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/EmbeddingResponse"
                }
              }
            }
          },
          "400": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TsoaErrorResponsePayload"
                }
              }
            }
          },
          "403": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TsoaErrorResponsePayload"
                }
              }
            }
          },
          "422": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TsoaErrorResponsePayload"
                }
              }
            }
          }
        },
        "description": "Create an embedded url for a project",
        "parameters": [
          {
            "in": "path",
            "name": "projectId",
            "required": true,
            "schema": {
              "$ref": "#/components/schemas/ProjectId"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/EmbeddingRequest"
              }
            }
          }
        }
      }
    },
    "/v1/projects": {
      "get": {
        "operationId": "ListProjects",
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProjectsListApiResource"
                }
              }
            }
          },
          "400": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TsoaErrorResponsePayload"
                }
              }
            }
          },
          "403": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TsoaErrorResponsePayload"
                }
              }
            }
          }
        },
        "description": "List all viewable projects, sorted by most recently created first.",
        "parameters": [
          {
            "in": "query",
            "name": "includeArchived",
            "required": false,
            "schema": {
              "default": false,
              "type": "boolean"
            }
          },
          {
            "in": "query",
            "name": "includeComponents",
            "required": false,
            "schema": {
              "default": false,
              "type": "boolean"
            }
          },
          {
            "in": "query",
            "name": "includeTrashed",
            "required": false,
            "schema": {
              "default": false,
              "type": "boolean"
            }
          },
          {
            "in": "query",
            "name": "includeSharing",
            "required": false,
            "schema": {
              "default": false,
              "type": "boolean"
            }
          },
          {
            "in": "query",
            "name": "statuses",
            "required": false,
            "schema": {
              "default": [],
              "type": "array",
              "items": {
                "type": "string"
              }
            }
          },
          {
            "in": "query",
            "name": "categories",
            "required": false,
            "schema": {
              "default": [],
              "type": "array",
              "items": {
                "type": "string"
              }
            }
          },
          {
            "in": "query",
            "name": "creatorEmail",
            "required": false,
            "schema": {
              "default": null,
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "ownerEmail",
            "required": false,
            "schema": {
              "default": null,
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "collectionId",
            "required": false,
            "schema": {
              "default": null,
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "limit",
            "required": false,
            "schema": {
              "$ref": "#/components/schemas/PageSize"
            }
          },
          {
            "in": "query",
            "name": "after",
            "required": false,
            "schema": {
              "default": null
            }
          },
          {
            "in": "query",
            "name": "before",
            "required": false,
            "schema": {
              "default": null
            }
          },
          {
            "in": "query",
            "name": "sortBy",
            "required": false,
            "schema": {
              "$ref": "#/components/schemas/SortByEnum"
            }
          },
          {
            "in": "query",
            "name": "sortDirection",
            "required": false,
            "schema": {
              "$ref": "#/components/schemas/SortDirectionEnum"
            }
          }
        ]
      },
      "post": {
        "operationId": "CreateProject",
        "summary": "CreateProject",
        "description": "Create a new project in the workspace with the specified title, and optionally a description.\n\nThis endpoint is subject to the following rate limits:\n- `hex-api`: Default rate limit group for the Hex API\n  - Max requests per minute may vary (default: 30)\n  - Max requests per hour may vary (default: 1800)",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "title": {
                    "type": "string",
                    "description": "The title of the new project."
                  },
                  "description": {
                    "type": "string",
                    "description": "An optional description for the new project."
                  }
                },
                "required": [
                  "title"
                ]
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Project"
                }
              }
            }
          },
          "400": {
            "description": "Invalid input data",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/error.BAD_REQUEST"
                }
              }
            }
          },
          "403": {
            "description": "Insufficient access",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/error.FORBIDDEN"
                }
              }
            }
          }
        }
      }
    },
    "/v1/projects/{projectId}/queriedTables": {
      "get": {
        "operationId": "GetQueriedTables",
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProjectQueriedTablesApiResource"
                }
              }
            }
          },
          "400": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TsoaErrorResponsePayload"
                }
              }
            }
          },
          "403": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TsoaErrorResponsePayload"
                }
              }
            }
          },
          "404": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TsoaErrorResponsePayload"
                }
              }
            }
          },
          "422": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TsoaErrorResponsePayload"
                }
              }
            }
          },
          "500": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TsoaErrorResponsePayload"
                }
              }
            }
          }
        },
        "description": "Given a project ID, return the list of warehouse tables queried in the project.",
        "parameters": [
          {
            "in": "query",
            "name": "limit",
            "required": false,
            "schema": {
              "$ref": "#/components/schemas/PageSize"
            }
          },
          {
            "in": "query",
            "name": "after",
            "required": false,
            "schema": {
              "default": null
            }
          },
          {
            "in": "query",
            "name": "before",
            "required": false,
            "schema": {
              "default": null
            }
          },
          {
            "in": "path",
            "name": "projectId",
            "required": true,
            "schema": {
              "$ref": "#/components/schemas/ProjectId"
            }
          }
        ]
      }
    },
    "/v1/projects/{projectId}/sharing/collections": {
      "patch": {
        "operationId": "EditProjectSharingCollections",
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/EditProjectSharingCollectionsResponse"
                }
              }
            }
          },
          "400": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TsoaErrorResponsePayload"
                }
              }
            }
          },
          "403": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TsoaErrorResponsePayload"
                }
              }
            }
          },
          "404": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TsoaErrorResponsePayload"
                }
              }
            }
          },
          "500": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TsoaErrorResponsePayload"
                }
              }
            }
          }
        },
        "description": "Add a project to collections or remove it from collections.\nFor projects, use `CAN_VIEW` to grant the UI permission labeled \"Can explore\".\nUse `APP_ONLY` to grant the UI permission labeled \"Can view app\".\nWorkspace tokens calling this endpoint need to have \"Collections -> Write access\" scope\nin addition to \"Projects -> Write access\" scope.",
        "parameters": [
          {
            "in": "path",
            "name": "projectId",
            "required": true,
            "schema": {
              "$ref": "#/components/schemas/ProjectId"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "properties": {
                  "sharing": {
                    "properties": {
                      "upsert": {
                        "properties": {
                          "collections": {
                            "items": {
                              "properties": {
                                "access": {
                                  "$ref": "#/components/schemas/AccessLevelEnum"
                                },
                                "collection": {
                                  "properties": {
                                    "id": {
                                      "$ref": "#/components/schemas/CollectionId"
                                    }
                                  },
                                  "required": [
                                    "id"
                                  ],
                                  "type": "object"
                                }
                              },
                              "required": [
                                "access",
                                "collection"
                              ],
                              "type": "object"
                            },
                            "type": "array",
                            "maxItems": 25
                          }
                        },
                        "required": [
                          "collections"
                        ],
                        "type": "object"
                      }
                    },
                    "required": [
                      "upsert"
                    ],
                    "type": "object"
                  }
                },
                "required": [
                  "sharing"
                ],
                "type": "object"
              }
            }
          }
        }
      }
    },
    "/v1/projects/{projectId}/sharing/workspaceAndPublic": {
      "patch": {
        "operationId": "EditProjectSharingOrgAndPublic",
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/EditProjectSharingWorkspaceAndPublicResponse"
                }
              }
            }
          },
          "400": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TsoaErrorResponsePayload"
                }
              }
            }
          },
          "403": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TsoaErrorResponsePayload"
                }
              }
            }
          },
          "404": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TsoaErrorResponsePayload"
                }
              }
            }
          },
          "500": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TsoaErrorResponsePayload"
                }
              }
            }
          }
        },
        "description": "Update workspace or public-web sharing for a project.\nFor projects, use `CAN_VIEW` to grant the UI permission labeled \"Can explore\".\nUse `APP_ONLY` to grant the UI permission labeled \"Can view app\".",
        "parameters": [
          {
            "in": "path",
            "name": "projectId",
            "required": true,
            "schema": {
              "$ref": "#/components/schemas/ProjectId"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "properties": {
                  "sharing": {
                    "properties": {
                      "publicWeb": {
                        "$ref": "#/components/schemas/PublicWebAccessLevel"
                      },
                      "workspace": {
                        "$ref": "#/components/schemas/AccessLevelEnum"
                      }
                    },
                    "type": "object"
                  }
                },
                "required": [
                  "sharing"
                ],
                "type": "object"
              }
            }
          }
        }
      }
    },
    "/v1/projects/{projectId}/sharing/groups": {
      "patch": {
        "operationId": "EditProjectSharingGroups",
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/EditProjectSharingGroupsResponse"
                }
              }
            }
          },
          "400": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TsoaErrorResponsePayload"
                }
              }
            }
          },
          "403": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TsoaErrorResponsePayload"
                }
              }
            }
          },
          "404": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TsoaErrorResponsePayload"
                }
              }
            }
          },
          "500": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TsoaErrorResponsePayload"
                }
              }
            }
          }
        },
        "description": "Add groups to a project or update/remove their project sharing access.\nFor projects, use `CAN_VIEW` to grant the UI permission labeled \"Can explore\".\nUse `APP_ONLY` to grant the UI permission labeled \"Can view app\".",
        "parameters": [
          {
            "in": "path",
            "name": "projectId",
            "required": true,
            "schema": {
              "$ref": "#/components/schemas/ProjectId"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "properties": {
                  "sharing": {
                    "properties": {
                      "upsert": {
                        "properties": {
                          "groups": {
                            "items": {
                              "properties": {
                                "access": {
                                  "$ref": "#/components/schemas/AccessLevelEnum"
                                },
                                "group": {
                                  "properties": {
                                    "id": {
                                      "$ref": "#/components/schemas/GroupId"
                                    }
                                  },
                                  "required": [
                                    "id"
                                  ],
                                  "type": "object"
                                }
                              },
                              "required": [
                                "access",
                                "group"
                              ],
                              "type": "object"
                            },
                            "type": "array",
                            "maxItems": 25
                          }
                        },
                        "required": [
                          "groups"
                        ],
                        "type": "object"
                      }
                    },
                    "required": [
                      "upsert"
                    ],
                    "type": "object"
                  }
                },
                "required": [
                  "sharing"
                ],
                "type": "object"
              }
            }
          }
        }
      }
    },
    "/v1/projects/{projectId}": {
      "patch": {
        "operationId": "UpdateProject",
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProjectApiResource"
                }
              }
            }
          },
          "400": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TsoaErrorResponsePayload"
                }
              }
            }
          },
          "403": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TsoaErrorResponsePayload"
                }
              }
            }
          },
          "404": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TsoaErrorResponsePayload"
                }
              }
            }
          },
          "500": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TsoaErrorResponsePayload"
                }
              }
            }
          }
        },
        "description": "Use this endpoint to add or remove a status (including endorsements) from a project",
        "parameters": [
          {
            "in": "path",
            "name": "projectId",
            "required": true,
            "schema": {
              "$ref": "#/components/schemas/ProjectId"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "properties": {
                  "status": {
                    "type": "string",
                    "nullable": true
                  }
                },
                "type": "object"
              }
            }
          }
        }
      },
      "get": {
        "operationId": "GetProject",
        "summary": "GetProject",
        "description": "Get metadata about a single project.\n\nThis endpoint is subject to the following rate limits:\n- `hex-api`: Default rate limit group for the Hex API\n  - Max requests per minute may vary (default: 30)\n  - Max requests per hour may vary (default: 1800)",
        "parameters": [
          {
            "in": "path",
            "name": "projectId",
            "description": "The project to fetch.",
            "schema": {
              "type": "string",
              "description": "The project to fetch."
            },
            "required": true
          },
          {
            "in": "query",
            "name": "includeSharing",
            "description": "Whether to include sharing metadata in the response.",
            "schema": {
              "type": "boolean",
              "default": false,
              "description": "Whether to include sharing metadata in the response."
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Project"
                }
              }
            }
          },
          "400": {
            "description": "Invalid input data",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/error.BAD_REQUEST"
                }
              }
            }
          },
          "401": {
            "description": "Authorization not provided",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/error.UNAUTHORIZED"
                }
              }
            }
          },
          "403": {
            "description": "Insufficient access",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/error.FORBIDDEN"
                }
              }
            }
          },
          "404": {
            "description": "Not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/error.NOT_FOUND"
                }
              }
            }
          },
          "500": {
            "description": "Internal server error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/error.INTERNAL_SERVER_ERROR"
                }
              }
            }
          }
        }
      }
    },
    "/v1/semantic-(projects|models)/{semanticProjectId}/ingest": {
      "post": {
        "operationId": "IngestSemanticProject",
        "responses": {
          "201": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SemanticProjectsSyncResponsePayload"
                }
              }
            }
          },
          "400": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/TsoaErrorResponsePayload"
                    },
                    {
                      "properties": {
                        "problems": {
                          "items": {
                            "$ref": "#/components/schemas/HexSLProblemWithDisplay"
                          },
                          "type": "array"
                        }
                      },
                      "type": "object"
                    }
                  ]
                }
              }
            }
          },
          "403": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TsoaErrorResponsePayload"
                }
              }
            }
          },
          "415": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TsoaErrorResponsePayload"
                }
              }
            }
          },
          "500": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TsoaErrorResponsePayload"
                }
              }
            }
          },
          "502": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TsoaErrorResponsePayload"
                }
              }
            }
          }
        },
        "description": "Ingest a semantic project from a zip file.\n\nThis API endpoint is subject to a maximum of 3 requests per minute.",
        "parameters": [
          {
            "in": "path",
            "name": "semanticProjectId",
            "required": true,
            "schema": {
              "$ref": "#/components/schemas/SemanticProjectId"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "properties": {
                  "verbose": {
                    "type": "boolean",
                    "description": "Whether to respond with detail on which components of the semantic layer were successfully synced",
                    "default": true
                  },
                  "debug": {
                    "type": "boolean",
                    "description": "Whether to include additional debug information",
                    "default": false
                  },
                  "dryRun": {
                    "type": "boolean",
                    "description": "If enabled, the sync will not actually write to the database"
                  }
                },
                "type": "object"
              }
            }
          }
        }
      }
    },
    "/v1/semantic-(projects|models)/{semanticProjectId}": {
      "patch": {
        "operationId": "UpdateSemanticProject",
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/UpdateSemanticProjectResponse"
                }
              }
            }
          },
          "400": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/Omit_TsoaErrorResponsePayload.details_"
                    },
                    {
                      "properties": {
                        "details": {
                          "items": {
                            "$ref": "#/components/schemas/UpdateStatusErrorDetail"
                          },
                          "type": "array"
                        }
                      },
                      "type": "object"
                    }
                  ]
                }
              }
            }
          },
          "403": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TsoaErrorResponsePayload"
                }
              }
            }
          },
          "404": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/Omit_TsoaErrorResponsePayload.details_"
                    },
                    {
                      "properties": {
                        "details": {
                          "items": {
                            "$ref": "#/components/schemas/UpdateStatusErrorDetail"
                          },
                          "type": "array"
                        }
                      },
                      "type": "object"
                    }
                  ]
                }
              }
            }
          }
        },
        "description": "Use this endpoint to add or remove a status (including endorsements) from datasets and views within a semantic project\n\nThis endpoint uses atomic semantics - if any update in the batch fails validation,\nthe entire request fails and no changes are applied.",
        "parameters": [
          {
            "in": "path",
            "name": "semanticProjectId",
            "required": true,
            "schema": {
              "$ref": "#/components/schemas/SemanticProjectId"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/UpdateSemanticProjectRequest"
              }
            }
          }
        }
      }
    },
    "/v1/projects/{projectId}/runs/{runId}": {
      "delete": {
        "operationId": "CancelRun",
        "responses": {
          "204": {
            "description": ""
          },
          "400": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TsoaErrorResponsePayload"
                }
              }
            }
          },
          "403": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TsoaErrorResponsePayload"
                }
              }
            }
          },
          "422": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TsoaErrorResponsePayload"
                }
              }
            }
          }
        },
        "description": "Cancel a project run.",
        "parameters": [
          {
            "in": "path",
            "name": "projectId",
            "required": true,
            "schema": {
              "$ref": "#/components/schemas/ProjectId"
            }
          },
          {
            "in": "path",
            "name": "runId",
            "required": true,
            "schema": {
              "$ref": "#/components/schemas/InputRunId"
            }
          }
        ]
      },
      "get": {
        "operationId": "GetRunStatus",
        "summary": "GetRunStatus",
        "description": "Get the status of a project run.\n\nThis endpoint is subject to the following rate limits:\n- `hex-api`: Default rate limit group for the Hex API\n  - Max requests per minute may vary (default: 30)\n  - Max requests per hour may vary (default: 1800)",
        "parameters": [
          {
            "in": "path",
            "name": "projectId",
            "description": "The project the run belongs to.",
            "schema": {
              "type": "string",
              "description": "The project the run belongs to."
            },
            "required": true
          },
          {
            "in": "path",
            "name": "runId",
            "description": "The run to retrieve.",
            "schema": {
              "type": "string",
              "description": "The run to retrieve."
            },
            "required": true
          },
          {
            "in": "header",
            "name": "enable-expanded-stats",
            "description": "Include state events and the run's flag configuration override. Set to `true` to enable.",
            "schema": {
              "type": "string",
              "description": "Include state events and the run's flag configuration override. Set to `true` to enable."
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProjectRun"
                }
              }
            }
          },
          "400": {
            "description": "Invalid input data",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/error.BAD_REQUEST"
                }
              }
            }
          },
          "403": {
            "description": "Insufficient access",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/error.FORBIDDEN"
                }
              }
            }
          },
          "422": {
            "description": "Unprocessable content",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/error.UNPROCESSABLE_CONTENT"
                }
              }
            }
          }
        }
      }
    },
    "/v1/groups/{groupId}": {
      "get": {
        "operationId": "GetGroup",
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/GroupApiResource"
                }
              }
            }
          },
          "400": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TsoaErrorResponsePayload"
                }
              }
            }
          },
          "403": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TsoaErrorResponsePayload"
                }
              }
            }
          },
          "500": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TsoaErrorResponsePayload"
                }
              }
            }
          }
        },
        "parameters": [
          {
            "in": "path",
            "name": "groupId",
            "required": true,
            "schema": {
              "$ref": "#/components/schemas/GroupId"
            }
          }
        ]
      },
      "delete": {
        "operationId": "DeleteGroup",
        "responses": {
          "204": {
            "description": ""
          },
          "400": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TsoaErrorResponsePayload"
                }
              }
            }
          },
          "403": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TsoaErrorResponsePayload"
                }
              }
            }
          },
          "500": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TsoaErrorResponsePayload"
                }
              }
            }
          }
        },
        "parameters": [
          {
            "in": "path",
            "name": "groupId",
            "required": true,
            "schema": {
              "$ref": "#/components/schemas/GroupId"
            }
          }
        ]
      },
      "patch": {
        "operationId": "EditGroup",
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/GroupApiResource"
                }
              }
            }
          },
          "400": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TsoaErrorResponsePayload"
                }
              }
            }
          },
          "403": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TsoaErrorResponsePayload"
                }
              }
            }
          },
          "500": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TsoaErrorResponsePayload"
                }
              }
            }
          }
        },
        "parameters": [
          {
            "in": "path",
            "name": "groupId",
            "required": true,
            "schema": {
              "$ref": "#/components/schemas/GroupId"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "properties": {
                  "members": {
                    "properties": {
                      "remove": {
                        "$ref": "#/components/schemas/GroupMembers"
                      },
                      "add": {
                        "$ref": "#/components/schemas/GroupMembers"
                      }
                    },
                    "type": "object"
                  },
                  "name": {
                    "$ref": "#/components/schemas/Name"
                  }
                },
                "type": "object"
              }
            }
          }
        }
      }
    },
    "/v1/groups": {
      "get": {
        "operationId": "ListGroups",
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ListGroupsResponse"
                }
              }
            }
          },
          "400": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TsoaErrorResponsePayload"
                }
              }
            }
          },
          "403": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TsoaErrorResponsePayload"
                }
              }
            }
          },
          "500": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TsoaErrorResponsePayload"
                }
              }
            }
          }
        },
        "parameters": [
          {
            "in": "query",
            "name": "after",
            "required": false,
            "schema": {
              "default": null
            }
          },
          {
            "in": "query",
            "name": "before",
            "required": false,
            "schema": {
              "default": null
            }
          },
          {
            "in": "query",
            "name": "limit",
            "required": false,
            "schema": {
              "$ref": "#/components/schemas/LargerPageSize"
            }
          },
          {
            "in": "query",
            "name": "sortBy",
            "required": false,
            "schema": {
              "$ref": "#/components/schemas/ListGroupsSortByEnum"
            }
          },
          {
            "in": "query",
            "name": "sortDirection",
            "required": false,
            "schema": {
              "$ref": "#/components/schemas/SortDirectionEnum"
            }
          }
        ]
      },
      "post": {
        "operationId": "CreateGroup",
        "responses": {
          "201": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CreateGroupResponse"
                }
              }
            }
          },
          "400": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TsoaErrorResponsePayload"
                }
              }
            }
          },
          "403": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TsoaErrorResponsePayload"
                }
              }
            }
          },
          "500": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TsoaErrorResponsePayload"
                }
              }
            }
          }
        },
        "parameters": [],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "properties": {
                  "members": {
                    "$ref": "#/components/schemas/GroupMembers"
                  },
                  "name": {
                    "$ref": "#/components/schemas/Name"
                  }
                },
                "required": [
                  "name"
                ],
                "type": "object"
              }
            }
          }
        }
      }
    },
    "/v1/data-connections": {
      "post": {
        "operationId": "CreateDataConnection",
        "responses": {
          "201": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DataConnectionWithSensitiveFieldsApiResource"
                }
              }
            }
          },
          "400": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TsoaErrorResponsePayload"
                }
              }
            }
          },
          "403": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TsoaErrorResponsePayload"
                }
              }
            }
          },
          "404": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TsoaErrorResponsePayload"
                }
              }
            }
          },
          "422": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TsoaErrorResponsePayload"
                }
              }
            }
          },
          "500": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TsoaErrorResponsePayload"
                }
              }
            }
          }
        },
        "parameters": [],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "properties": {
                  "sharing": {
                    "properties": {
                      "workspace": {
                        "properties": {
                          "public": {
                            "$ref": "#/components/schemas/DataConnectionPublicSharingAccessLevelEnum"
                          },
                          "guests": {
                            "$ref": "#/components/schemas/DataConnectionSharingAccessLevelEnum"
                          },
                          "members": {
                            "$ref": "#/components/schemas/DataConnectionSharingAccessLevelEnum"
                          }
                        },
                        "type": "object"
                      },
                      "groups": {
                        "items": {
                          "properties": {
                            "access": {
                              "$ref": "#/components/schemas/DataConnectionSharingAccessLevelEnum"
                            },
                            "group": {
                              "properties": {
                                "id": {
                                  "$ref": "#/components/schemas/GroupId"
                                }
                              },
                              "required": [
                                "id"
                              ],
                              "type": "object"
                            }
                          },
                          "required": [
                            "access",
                            "group"
                          ],
                          "type": "object"
                        },
                        "type": "array"
                      }
                    },
                    "type": "object"
                  },
                  "schemaRefreshAccess": {
                    "$ref": "#/components/schemas/DataConnectionSchemaRefreshAccess"
                  },
                  "schemaRefreshSchedule": {
                    "$ref": "#/components/schemas/SchemaRefreshScheduleApiResource"
                  },
                  "schemaFilters": {
                    "properties": {
                      "tables": {
                        "$ref": "#/components/schemas/SchemaEntityFilter"
                      },
                      "schemas": {
                        "$ref": "#/components/schemas/SchemaEntityFilter"
                      },
                      "databases": {
                        "$ref": "#/components/schemas/SchemaEntityFilter"
                      }
                    },
                    "type": "object"
                  },
                  "allowWritebackCells": {
                    "type": "boolean"
                  },
                  "includeMagic": {
                    "type": "boolean"
                  },
                  "connectViaSsh": {
                    "type": "boolean"
                  },
                  "description": {
                    "type": "string"
                  },
                  "connectionDetails": {
                    "$ref": "#/components/schemas/CreateConnectionDetails"
                  },
                  "type": {
                    "$ref": "#/components/schemas/DataConnectionApiType"
                  },
                  "name": {
                    "$ref": "#/components/schemas/Name"
                  }
                },
                "required": [
                  "connectionDetails",
                  "type",
                  "name"
                ],
                "type": "object"
              }
            }
          }
        }
      },
      "get": {
        "operationId": "ListDataConnections",
        "summary": "ListDataConnections",
        "description": "List the workspace's data connections.\n\nThis endpoint is subject to the following rate limits:\n- `hex-api`: Default rate limit group for the Hex API\n  - Max requests per minute may vary (default: 30)\n  - Max requests per hour may vary (default: 1800)",
        "parameters": [
          {
            "in": "query",
            "name": "after",
            "schema": {
              "type": "string",
              "nullable": true,
              "default": null
            }
          },
          {
            "in": "query",
            "name": "before",
            "schema": {
              "type": "string",
              "nullable": true,
              "default": null
            }
          },
          {
            "in": "query",
            "name": "limit",
            "schema": {
              "type": "number",
              "minimum": 1,
              "maximum": 100,
              "default": 25
            }
          },
          {
            "in": "query",
            "name": "sortBy",
            "schema": {
              "type": "string",
              "enum": [
                "NAME",
                "CREATED_AT"
              ],
              "default": "NAME"
            }
          },
          {
            "in": "query",
            "name": "sortDirection",
            "schema": {
              "type": "string",
              "enum": [
                "ASC",
                "DESC"
              ],
              "default": "ASC"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "values": {
                      "type": "array",
                      "items": {
                        "anyOf": [
                          {
                            "$ref": "#/components/schemas/DataConnection"
                          },
                          {
                            "$ref": "#/components/schemas/DataConnectionBasic"
                          }
                        ]
                      }
                    },
                    "pagination": {
                      "$ref": "#/components/schemas/Pagination"
                    }
                  },
                  "required": [
                    "values",
                    "pagination"
                  ]
                }
              }
            }
          },
          "400": {
            "description": "Invalid input data",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/error.BAD_REQUEST"
                }
              }
            }
          },
          "401": {
            "description": "Authorization not provided",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/error.UNAUTHORIZED"
                }
              }
            }
          },
          "403": {
            "description": "Insufficient access",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/error.FORBIDDEN"
                }
              }
            }
          },
          "404": {
            "description": "Not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/error.NOT_FOUND"
                }
              }
            }
          },
          "500": {
            "description": "Internal server error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/error.INTERNAL_SERVER_ERROR"
                }
              }
            }
          }
        }
      }
    },
    "/v1/data-connections/{dataConnectionId}": {
      "patch": {
        "operationId": "EditDataConnection",
        "responses": {
          "201": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DataConnectionWithSensitiveFieldsApiResource"
                }
              }
            }
          },
          "400": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TsoaErrorResponsePayload"
                }
              }
            }
          },
          "403": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TsoaErrorResponsePayload"
                }
              }
            }
          },
          "404": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TsoaErrorResponsePayload"
                }
              }
            }
          },
          "422": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TsoaErrorResponsePayload"
                }
              }
            }
          },
          "500": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TsoaErrorResponsePayload"
                }
              }
            }
          }
        },
        "parameters": [
          {
            "in": "path",
            "name": "dataConnectionId",
            "required": true,
            "schema": {
              "$ref": "#/components/schemas/DataConnectionId"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "properties": {
                  "sharing": {
                    "properties": {
                      "workspace": {
                        "properties": {
                          "public": {
                            "$ref": "#/components/schemas/DataConnectionPublicSharingAccessLevelEnum"
                          },
                          "guests": {
                            "$ref": "#/components/schemas/DataConnectionSharingAccessLevelEnum"
                          },
                          "members": {
                            "$ref": "#/components/schemas/DataConnectionSharingAccessLevelEnum"
                          }
                        },
                        "type": "object"
                      },
                      "groups": {
                        "properties": {
                          "upsert": {
                            "items": {
                              "properties": {
                                "access": {
                                  "$ref": "#/components/schemas/DataConnectionSharingAccessLevelEnum"
                                },
                                "group": {
                                  "properties": {
                                    "id": {
                                      "$ref": "#/components/schemas/GroupId"
                                    }
                                  },
                                  "required": [
                                    "id"
                                  ],
                                  "type": "object"
                                }
                              },
                              "required": [
                                "access",
                                "group"
                              ],
                              "type": "object"
                            },
                            "type": "array"
                          }
                        },
                        "type": "object"
                      }
                    },
                    "type": "object"
                  },
                  "schemaRefreshAccess": {
                    "$ref": "#/components/schemas/DataConnectionSchemaRefreshAccess"
                  },
                  "schemaRefreshSchedule": {
                    "allOf": [
                      {
                        "$ref": "#/components/schemas/SchemaRefreshScheduleApiResource"
                      }
                    ],
                    "nullable": true
                  },
                  "schemaFilters": {
                    "properties": {
                      "tables": {
                        "$ref": "#/components/schemas/SchemaEntityFilter"
                      },
                      "schemas": {
                        "$ref": "#/components/schemas/SchemaEntityFilter"
                      },
                      "databases": {
                        "$ref": "#/components/schemas/SchemaEntityFilter"
                      }
                    },
                    "type": "object"
                  },
                  "allowWritebackCells": {
                    "type": "boolean"
                  },
                  "includeMagic": {
                    "type": "boolean"
                  },
                  "connectViaSsh": {
                    "type": "boolean"
                  },
                  "description": {
                    "type": "string"
                  },
                  "connectionDetails": {
                    "$ref": "#/components/schemas/EditConnectionDetails"
                  },
                  "name": {
                    "type": "string"
                  }
                },
                "type": "object"
              }
            }
          }
        }
      },
      "get": {
        "operationId": "GetDataConnection",
        "summary": "GetDataConnection",
        "description": "Get a single data connection by its ID.\n\nThis endpoint is subject to the following rate limits:\n- `hex-api`: Default rate limit group for the Hex API\n  - Max requests per minute may vary (default: 30)\n  - Max requests per hour may vary (default: 1800)",
        "parameters": [
          {
            "in": "path",
            "name": "dataConnectionId",
            "schema": {
              "type": "string"
            },
            "required": true
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DataConnection"
                }
              }
            }
          },
          "400": {
            "description": "Invalid input data",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/error.BAD_REQUEST"
                }
              }
            }
          },
          "401": {
            "description": "Authorization not provided",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/error.UNAUTHORIZED"
                }
              }
            }
          },
          "403": {
            "description": "Insufficient access",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/error.FORBIDDEN"
                }
              }
            }
          },
          "404": {
            "description": "Not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/error.NOT_FOUND"
                }
              }
            }
          },
          "500": {
            "description": "Internal server error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/error.INTERNAL_SERVER_ERROR"
                }
              }
            }
          }
        }
      }
    },
    "/v1/data-connections/{dataConnectionId}/schema": {
      "patch": {
        "operationId": "UpdateDataConnectionSchema",
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/UpdateDataConnectionSchemaResponse"
                }
              }
            }
          },
          "400": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/Omit_TsoaErrorResponsePayload.details_"
                    },
                    {
                      "properties": {
                        "details": {
                          "items": {
                            "$ref": "#/components/schemas/UpdateSchemaObjectErrorDetail"
                          },
                          "type": "array"
                        }
                      },
                      "type": "object"
                    }
                  ]
                }
              }
            }
          },
          "403": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TsoaErrorResponsePayload"
                }
              }
            }
          },
          "404": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/Omit_TsoaErrorResponsePayload.details_"
                    },
                    {
                      "properties": {
                        "details": {
                          "items": {
                            "$ref": "#/components/schemas/UpdateSchemaObjectErrorDetail"
                          },
                          "type": "array"
                        }
                      },
                      "type": "object"
                    }
                  ]
                }
              }
            }
          }
        },
        "description": "Use this endpoint to add or remove a status (including endorsements) from databases, schemas, and tables\nwithin a data connection\n\nThis endpoint uses atomic semantics - if any update in the batch fails validation,\nthe entire request fails and no changes are applied",
        "parameters": [
          {
            "in": "path",
            "name": "dataConnectionId",
            "required": true,
            "schema": {
              "$ref": "#/components/schemas/DataConnectionId"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/UpdateDataConnectionSchemaRequest"
              }
            }
          }
        }
      }
    },
    "/v1/guides/draft": {
      "put": {
        "operationId": "UpsertGuideDraft",
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/UpsertGuideDraftResponsePayload"
                }
              }
            }
          },
          "400": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TsoaErrorResponsePayload"
                }
              }
            }
          },
          "403": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TsoaErrorResponsePayload"
                }
              }
            }
          },
          "500": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TsoaErrorResponsePayload"
                }
              }
            }
          }
        },
        "description": "Update or create guide drafts by filePath.\n\nAccepts a dictionary mapping file paths to their contents.\nFor each file:\n- If the guide doesn't exist, it will be created.\n- If the guide exists but has no draft, a new draft will be created.\n- If the guide exists with a draft, the draft contents will be updated.",
        "parameters": [],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/UpsertGuideDraftRequestBody"
              }
            }
          }
        }
      }
    },
    "/v1/guides/publish": {
      "post": {
        "operationId": "PublishGuideDrafts",
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PublishGuidesResponsePayload"
                }
              }
            }
          },
          "400": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TsoaErrorResponsePayload"
                }
              }
            }
          },
          "403": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TsoaErrorResponsePayload"
                }
              }
            }
          },
          "500": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TsoaErrorResponsePayload"
                }
              }
            }
          }
        },
        "description": "Publish all currently drafted guides.",
        "parameters": [],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/PublishGuidesRequestBody"
              }
            }
          }
        }
      }
    },
    "/v1/guides/draft/{orgGuideFileId}": {
      "delete": {
        "operationId": "DeleteGuideDraft",
        "responses": {
          "204": {
            "description": ""
          },
          "400": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TsoaErrorResponsePayload"
                }
              }
            }
          },
          "403": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TsoaErrorResponsePayload"
                }
              }
            }
          },
          "500": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TsoaErrorResponsePayload"
                }
              }
            }
          }
        },
        "parameters": [
          {
            "in": "path",
            "name": "orgGuideFileId",
            "required": true,
            "schema": {
              "$ref": "#/components/schemas/OrgGuideFileId"
            }
          }
        ]
      }
    },
    "/v1/collections/{collectionId}": {
      "get": {
        "operationId": "GetCollection",
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CollectionApiResource"
                }
              }
            }
          },
          "400": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TsoaErrorResponsePayload"
                }
              }
            }
          },
          "403": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TsoaErrorResponsePayload"
                }
              }
            }
          },
          "500": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TsoaErrorResponsePayload"
                }
              }
            }
          }
        },
        "parameters": [
          {
            "in": "path",
            "name": "collectionId",
            "required": true,
            "schema": {
              "$ref": "#/components/schemas/CollectionId"
            }
          }
        ]
      },
      "patch": {
        "operationId": "EditCollection",
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CollectionApiResource"
                }
              }
            }
          },
          "400": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TsoaErrorResponsePayload"
                }
              }
            }
          },
          "403": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TsoaErrorResponsePayload"
                }
              }
            }
          },
          "500": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TsoaErrorResponsePayload"
                }
              }
            }
          }
        },
        "parameters": [
          {
            "in": "path",
            "name": "collectionId",
            "required": true,
            "schema": {
              "$ref": "#/components/schemas/CollectionId"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "properties": {
                  "sharing": {
                    "properties": {
                      "upsert": {
                        "$ref": "#/components/schemas/CollectionApiResourceSharing"
                      }
                    },
                    "type": "object"
                  },
                  "description": {
                    "type": "string"
                  },
                  "name": {
                    "$ref": "#/components/schemas/Name"
                  }
                },
                "type": "object"
              }
            }
          }
        }
      }
    },
    "/v1/collections": {
      "get": {
        "operationId": "ListCollections",
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ListCollectionsResponse"
                }
              }
            }
          },
          "400": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TsoaErrorResponsePayload"
                }
              }
            }
          },
          "403": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TsoaErrorResponsePayload"
                }
              }
            }
          },
          "500": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TsoaErrorResponsePayload"
                }
              }
            }
          }
        },
        "parameters": [
          {
            "in": "query",
            "name": "after",
            "required": false,
            "schema": {
              "default": null
            }
          },
          {
            "in": "query",
            "name": "before",
            "required": false,
            "schema": {
              "default": null
            }
          },
          {
            "in": "query",
            "name": "limit",
            "required": false,
            "schema": {
              "$ref": "#/components/schemas/PageSize"
            }
          },
          {
            "in": "query",
            "name": "sortBy",
            "required": false,
            "schema": {
              "$ref": "#/components/schemas/ListCollectionsSortByEnum"
            }
          }
        ]
      },
      "post": {
        "operationId": "CreateCollection",
        "responses": {
          "201": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CollectionApiResource"
                }
              }
            }
          },
          "400": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TsoaErrorResponsePayload"
                }
              }
            }
          },
          "403": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TsoaErrorResponsePayload"
                }
              }
            }
          },
          "500": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TsoaErrorResponsePayload"
                }
              }
            }
          }
        },
        "parameters": [],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "properties": {
                  "sharing": {
                    "$ref": "#/components/schemas/CollectionApiResourceSharing"
                  },
                  "description": {
                    "type": "string"
                  },
                  "name": {
                    "type": "string"
                  }
                },
                "required": [
                  "name"
                ],
                "type": "object"
              }
            }
          }
        }
      }
    },
    "/v1/cells/{cellId}": {
      "get": {
        "operationId": "GetCell",
        "summary": "GetCell",
        "description": "Get a single cell by ID\n\nThis endpoint is subject to the following rate limits:\n- `hex-api-30rpm`: Rate limit group for the Hex API at 30 requests per minute\n  - Max 30 requests per minute",
        "parameters": [
          {
            "in": "path",
            "name": "cellId",
            "schema": {
              "type": "string"
            },
            "required": true
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "string"
                    },
                    "staticId": {
                      "type": "string"
                    },
                    "cellType": {
                      "type": "string",
                      "enum": [
                        "CODE",
                        "MARKDOWN",
                        "DISPLAY_TABLE",
                        "INPUT",
                        "SQL",
                        "VEGA_CHART",
                        "CELL_GROUP",
                        "METRIC",
                        "TEXT",
                        "MAP",
                        "WRITEBACK",
                        "DBT_METRIC",
                        "PIVOT",
                        "FILTER",
                        "COMPONENT_IMPORT",
                        "CHART",
                        "BLOCK",
                        "EXPLORE",
                        "COLLAPSIBLE"
                      ]
                    },
                    "label": {
                      "type": "string",
                      "nullable": true
                    },
                    "dataConnectionId": {
                      "type": "string",
                      "nullable": true
                    },
                    "contents": {
                      "type": "object",
                      "properties": {
                        "codeCell": {
                          "type": "object",
                          "nullable": true,
                          "properties": {
                            "source": {
                              "type": "string"
                            }
                          },
                          "required": [
                            "source"
                          ]
                        },
                        "sqlCell": {
                          "type": "object",
                          "nullable": true,
                          "properties": {
                            "source": {
                              "type": "string"
                            },
                            "outputDataframe": {
                              "type": "string",
                              "description": "The name of the dataframe that the result will be stored into"
                            }
                          },
                          "required": [
                            "source",
                            "outputDataframe"
                          ]
                        },
                        "markdownCell": {
                          "type": "object",
                          "nullable": true,
                          "properties": {
                            "source": {
                              "type": "string"
                            }
                          },
                          "required": [
                            "source"
                          ]
                        }
                      },
                      "required": [
                        "codeCell",
                        "sqlCell",
                        "markdownCell"
                      ]
                    },
                    "projectId": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "id",
                    "staticId",
                    "cellType",
                    "label",
                    "dataConnectionId",
                    "contents",
                    "projectId"
                  ]
                }
              }
            }
          },
          "400": {
            "description": "Invalid input data",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/error.BAD_REQUEST"
                }
              }
            }
          },
          "401": {
            "description": "Authorization not provided",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/error.UNAUTHORIZED"
                }
              }
            }
          },
          "403": {
            "description": "Insufficient access",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/error.FORBIDDEN"
                }
              }
            }
          },
          "404": {
            "description": "Not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/error.NOT_FOUND"
                }
              }
            }
          },
          "500": {
            "description": "Internal server error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/error.INTERNAL_SERVER_ERROR"
                }
              }
            }
          }
        }
      },
      "patch": {
        "operationId": "UpdateCell",
        "summary": "UpdateCell",
        "description": "Update a cell's source and/or data connection. For SQL cells, can update the SQL source, output dataframe, and data connection. For code and markdown cells, can update the source. Returns the updated cell.\n\nThis endpoint is subject to the following rate limits:\n- `hex-api-30rpm`: Rate limit group for the Hex API at 30 requests per minute\n  - Max 30 requests per minute",
        "parameters": [
          {
            "in": "path",
            "name": "cellId",
            "schema": {
              "type": "string"
            },
            "required": true
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "dataConnectionId": {
                    "type": "string",
                    "nullable": true,
                    "description": "Data connection to attach to a SQL cell. Pass null to detach the existing data connection."
                  },
                  "contents": {
                    "type": "object",
                    "properties": {
                      "codeCell": {
                        "type": "object",
                        "properties": {
                          "source": {
                            "type": "string"
                          }
                        },
                        "required": [
                          "source"
                        ]
                      },
                      "sqlCell": {
                        "type": "object",
                        "properties": {
                          "source": {
                            "type": "string"
                          },
                          "outputDataframe": {
                            "type": "string",
                            "description": "The name of the dataframe that the SQL result will be stored into."
                          }
                        },
                        "required": [
                          "source"
                        ]
                      },
                      "markdownCell": {
                        "type": "object",
                        "properties": {
                          "source": {
                            "type": "string"
                          }
                        },
                        "required": [
                          "source"
                        ]
                      }
                    }
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "string"
                    },
                    "staticId": {
                      "type": "string"
                    },
                    "cellType": {
                      "type": "string",
                      "enum": [
                        "CODE",
                        "MARKDOWN",
                        "DISPLAY_TABLE",
                        "INPUT",
                        "SQL",
                        "VEGA_CHART",
                        "CELL_GROUP",
                        "METRIC",
                        "TEXT",
                        "MAP",
                        "WRITEBACK",
                        "DBT_METRIC",
                        "PIVOT",
                        "FILTER",
                        "COMPONENT_IMPORT",
                        "CHART",
                        "BLOCK",
                        "EXPLORE",
                        "COLLAPSIBLE"
                      ]
                    },
                    "label": {
                      "type": "string",
                      "nullable": true
                    },
                    "dataConnectionId": {
                      "type": "string",
                      "nullable": true
                    },
                    "contents": {
                      "type": "object",
                      "properties": {
                        "codeCell": {
                          "type": "object",
                          "nullable": true,
                          "properties": {
                            "source": {
                              "type": "string"
                            }
                          },
                          "required": [
                            "source"
                          ]
                        },
                        "sqlCell": {
                          "type": "object",
                          "nullable": true,
                          "properties": {
                            "source": {
                              "type": "string"
                            },
                            "outputDataframe": {
                              "type": "string",
                              "description": "The name of the dataframe that the result will be stored into"
                            }
                          },
                          "required": [
                            "source",
                            "outputDataframe"
                          ]
                        },
                        "markdownCell": {
                          "type": "object",
                          "nullable": true,
                          "properties": {
                            "source": {
                              "type": "string"
                            }
                          },
                          "required": [
                            "source"
                          ]
                        }
                      },
                      "required": [
                        "codeCell",
                        "sqlCell",
                        "markdownCell"
                      ]
                    },
                    "projectId": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "id",
                    "staticId",
                    "cellType",
                    "label",
                    "dataConnectionId",
                    "contents",
                    "projectId"
                  ]
                }
              }
            }
          },
          "400": {
            "description": "Invalid input data",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/error.BAD_REQUEST"
                }
              }
            }
          },
          "401": {
            "description": "Authorization not provided",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/error.UNAUTHORIZED"
                }
              }
            }
          },
          "403": {
            "description": "Insufficient access",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/error.FORBIDDEN"
                }
              }
            }
          },
          "404": {
            "description": "Not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/error.NOT_FOUND"
                }
              }
            }
          },
          "500": {
            "description": "Internal server error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/error.INTERNAL_SERVER_ERROR"
                }
              }
            }
          }
        }
      },
      "delete": {
        "operationId": "DeleteCell",
        "summary": "DeleteCell",
        "description": "Delete a cell from the draft version of a project by ID\n\nThis endpoint is subject to the following rate limits:\n- `hex-api-30rpm`: Rate limit group for the Hex API at 30 requests per minute\n  - Max 30 requests per minute",
        "parameters": [
          {
            "in": "path",
            "name": "cellId",
            "schema": {
              "type": "string"
            },
            "required": true
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "cellId": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "cellId"
                  ]
                }
              }
            }
          },
          "400": {
            "description": "Invalid input data",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/error.BAD_REQUEST"
                }
              }
            }
          },
          "401": {
            "description": "Authorization not provided",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/error.UNAUTHORIZED"
                }
              }
            }
          },
          "403": {
            "description": "Insufficient access",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/error.FORBIDDEN"
                }
              }
            }
          },
          "404": {
            "description": "Not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/error.NOT_FOUND"
                }
              }
            }
          },
          "500": {
            "description": "Internal server error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/error.INTERNAL_SERVER_ERROR"
                }
              }
            }
          }
        }
      }
    },
    "/v1/cells/{cellId}/output": {
      "get": {
        "operationId": "GetCellOutput",
        "summary": "GetCellOutput",
        "description": "**Unstable**: This endpoint is unstable API. Hex may make breaking changes to this endpoint without notice.\n\nGet the latest output preview for a SQL cell in the active draft notebook session.\n\nThis endpoint is subject to the following rate limits:\n- `hex-api`: Default rate limit group for the Hex API\n  - Max requests per minute may vary (default: 30)\n  - Max requests per hour may vary (default: 1800)",
        "parameters": [
          {
            "in": "path",
            "name": "cellId",
            "description": "The SQL cell ID or static cell ID to read output for.",
            "schema": {
              "type": "string",
              "description": "The SQL cell ID or static cell ID to read output for."
            },
            "required": true
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "projectId": {
                      "type": "string"
                    },
                    "runId": {
                      "type": "string"
                    },
                    "cell": {
                      "type": "object",
                      "properties": {
                        "id": {
                          "type": "string"
                        },
                        "staticId": {
                          "type": "string"
                        },
                        "cellType": {
                          "type": "string",
                          "enum": [
                            "CODE",
                            "MARKDOWN",
                            "DISPLAY_TABLE",
                            "INPUT",
                            "SQL",
                            "VEGA_CHART",
                            "CELL_GROUP",
                            "METRIC",
                            "TEXT",
                            "MAP",
                            "WRITEBACK",
                            "DBT_METRIC",
                            "PIVOT",
                            "FILTER",
                            "COMPONENT_IMPORT",
                            "CHART",
                            "BLOCK",
                            "EXPLORE",
                            "COLLAPSIBLE"
                          ]
                        }
                      },
                      "required": [
                        "id",
                        "staticId",
                        "cellType"
                      ]
                    },
                    "result": {
                      "oneOf": [
                        {
                          "type": "object",
                          "properties": {
                            "type": {
                              "type": "string",
                              "enum": [
                                "table"
                              ]
                            },
                            "rowLimit": {
                              "type": "number"
                            },
                            "rowsReturned": {
                              "type": "number"
                            },
                            "totalRows": {
                              "type": "number",
                              "nullable": true
                            },
                            "totalRowsKind": {
                              "type": "string",
                              "enum": [
                                "EXACT",
                                "LOWER_BOUND",
                                "UNKNOWN"
                              ]
                            },
                            "truncated": {
                              "type": "boolean"
                            },
                            "columns": {
                              "type": "array",
                              "items": {
                                "type": "object",
                                "properties": {
                                  "name": {
                                    "type": "string"
                                  },
                                  "type": {
                                    "type": "string"
                                  }
                                },
                                "required": [
                                  "name",
                                  "type"
                                ]
                              }
                            },
                            "rows": {
                              "type": "array",
                              "items": {
                                "type": "object",
                                "additionalProperties": {
                                  "type": "string",
                                  "nullable": true
                                }
                              }
                            }
                          },
                          "required": [
                            "type",
                            "rowLimit",
                            "rowsReturned",
                            "totalRows",
                            "totalRowsKind",
                            "truncated",
                            "columns",
                            "rows"
                          ]
                        },
                        {
                          "type": "object",
                          "properties": {
                            "type": {
                              "type": "string",
                              "enum": [
                                "cell_run_error"
                              ]
                            },
                            "message": {
                              "type": "string"
                            },
                            "traceback": {
                              "type": "string",
                              "nullable": true
                            }
                          },
                          "required": [
                            "type",
                            "message",
                            "traceback"
                          ]
                        }
                      ]
                    }
                  },
                  "required": [
                    "projectId",
                    "runId",
                    "cell",
                    "result"
                  ]
                }
              }
            }
          },
          "400": {
            "description": "Invalid input data",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/error.BAD_REQUEST"
                }
              }
            }
          },
          "401": {
            "description": "Authorization not provided",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/error.UNAUTHORIZED"
                }
              }
            }
          },
          "403": {
            "description": "Insufficient access",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/error.FORBIDDEN"
                }
              }
            }
          },
          "404": {
            "description": "Not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/error.NOT_FOUND"
                }
              }
            }
          },
          "500": {
            "description": "Internal server error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/error.INTERNAL_SERVER_ERROR"
                }
              }
            }
          }
        }
      }
    },
    "/v1/cells": {
      "post": {
        "operationId": "CreateCell",
        "summary": "CreateCell",
        "description": "Create a new cell in the draft version of a project\n\nThis endpoint is subject to the following rate limits:\n- `hex-api-30rpm`: Rate limit group for the Hex API at 30 requests per minute\n  - Max 30 requests per minute",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "projectId": {
                    "type": "string",
                    "description": "The project to create the cell in."
                  },
                  "cellType": {
                    "type": "string",
                    "enum": [
                      "CODE",
                      "SQL",
                      "MARKDOWN"
                    ],
                    "description": "The type of cell to create. Determines which `contents` variant is required."
                  },
                  "label": {
                    "type": "string",
                    "description": "Optional label for the cell."
                  },
                  "contents": {
                    "anyOf": [
                      {
                        "type": "object",
                        "properties": {
                          "codeCell": {
                            "type": "object",
                            "properties": {
                              "source": {
                                "type": "string"
                              }
                            },
                            "required": [
                              "source"
                            ]
                          }
                        },
                        "required": [
                          "codeCell"
                        ]
                      },
                      {
                        "type": "object",
                        "properties": {
                          "sqlCell": {
                            "type": "object",
                            "properties": {
                              "source": {
                                "type": "string"
                              },
                              "dataConnectionId": {
                                "type": "string",
                                "description": "Optional data connection ID for SQL cells. Mutually exclusive with isDataframeSql."
                              },
                              "isDataframeSql": {
                                "type": "boolean",
                                "description": "Set to true to create a dataframe SQL cell that queries the outputs of other SQL cells in the project instead of a data connection. Mutually exclusive with dataConnectionId."
                              },
                              "outputDataframe": {
                                "type": "string",
                                "description": "Optional custom dataframe name for the query result. If omitted, one will be auto-generated."
                              }
                            },
                            "required": [
                              "source"
                            ]
                          }
                        },
                        "required": [
                          "sqlCell"
                        ]
                      },
                      {
                        "type": "object",
                        "properties": {
                          "markdownCell": {
                            "type": "object",
                            "properties": {
                              "source": {
                                "type": "string"
                              }
                            },
                            "required": [
                              "source"
                            ]
                          }
                        },
                        "required": [
                          "markdownCell"
                        ]
                      }
                    ],
                    "description": "Cell contents. Provide exactly the variant matching `cellType`: `codeCell` for CODE, `sqlCell` for SQL, `markdownCell` for MARKDOWN."
                  },
                  "location": {
                    "type": "object",
                    "properties": {
                      "insertAfterCellId": {
                        "type": "string",
                        "description": "Insert the new cell after this cell ID. The cell must belong to the target project."
                      },
                      "parentCellId": {
                        "type": "string",
                        "description": "Insert the new cell as a child of a section (parent) cell. Use with childPosition to control placement within the section."
                      },
                      "childPosition": {
                        "type": "string",
                        "enum": [
                          "FIRST",
                          "LAST"
                        ],
                        "description": "Where to place the cell within the parent section. Defaults to LAST."
                      }
                    },
                    "description": "Controls where the new cell is placed. If omitted, the cell is appended to the end of the project."
                  }
                },
                "required": [
                  "projectId",
                  "cellType",
                  "contents"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "string"
                    },
                    "staticId": {
                      "type": "string"
                    },
                    "cellType": {
                      "type": "string",
                      "enum": [
                        "CODE",
                        "MARKDOWN",
                        "DISPLAY_TABLE",
                        "INPUT",
                        "SQL",
                        "VEGA_CHART",
                        "CELL_GROUP",
                        "METRIC",
                        "TEXT",
                        "MAP",
                        "WRITEBACK",
                        "DBT_METRIC",
                        "PIVOT",
                        "FILTER",
                        "COMPONENT_IMPORT",
                        "CHART",
                        "BLOCK",
                        "EXPLORE",
                        "COLLAPSIBLE"
                      ]
                    },
                    "label": {
                      "type": "string",
                      "nullable": true
                    },
                    "dataConnectionId": {
                      "type": "string",
                      "nullable": true
                    },
                    "contents": {
                      "type": "object",
                      "properties": {
                        "codeCell": {
                          "type": "object",
                          "nullable": true,
                          "properties": {
                            "source": {
                              "type": "string"
                            }
                          },
                          "required": [
                            "source"
                          ]
                        },
                        "sqlCell": {
                          "type": "object",
                          "nullable": true,
                          "properties": {
                            "source": {
                              "type": "string"
                            },
                            "outputDataframe": {
                              "type": "string",
                              "description": "The name of the dataframe that the result will be stored into"
                            }
                          },
                          "required": [
                            "source",
                            "outputDataframe"
                          ]
                        },
                        "markdownCell": {
                          "type": "object",
                          "nullable": true,
                          "properties": {
                            "source": {
                              "type": "string"
                            }
                          },
                          "required": [
                            "source"
                          ]
                        }
                      },
                      "required": [
                        "codeCell",
                        "sqlCell",
                        "markdownCell"
                      ]
                    },
                    "projectId": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "id",
                    "staticId",
                    "cellType",
                    "label",
                    "dataConnectionId",
                    "contents",
                    "projectId"
                  ]
                }
              }
            }
          },
          "400": {
            "description": "Invalid input data",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/error.BAD_REQUEST"
                }
              }
            }
          },
          "401": {
            "description": "Authorization not provided",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/error.UNAUTHORIZED"
                }
              }
            }
          },
          "403": {
            "description": "Insufficient access",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/error.FORBIDDEN"
                }
              }
            }
          },
          "500": {
            "description": "Internal server error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/error.INTERNAL_SERVER_ERROR"
                }
              }
            }
          }
        }
      },
      "get": {
        "operationId": "ListCells",
        "summary": "ListCells",
        "description": "List cells from the draft version of a project. Returns code, SQL, and markdown cell contents.\n\nThis endpoint is subject to the following rate limits:\n- `hex-api-30rpm`: Rate limit group for the Hex API at 30 requests per minute\n  - Max 30 requests per minute",
        "parameters": [
          {
            "in": "query",
            "name": "projectId",
            "description": "The project to list cells from",
            "schema": {
              "type": "string",
              "description": "The project to list cells from"
            },
            "required": true
          },
          {
            "in": "query",
            "name": "after",
            "schema": {
              "type": "string",
              "nullable": true,
              "default": null
            }
          },
          {
            "in": "query",
            "name": "before",
            "schema": {
              "type": "string",
              "nullable": true,
              "default": null
            }
          },
          {
            "in": "query",
            "name": "limit",
            "schema": {
              "type": "number",
              "minimum": 1,
              "maximum": 100,
              "default": 25
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "values": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "id": {
                            "type": "string"
                          },
                          "staticId": {
                            "type": "string"
                          },
                          "cellType": {
                            "type": "string",
                            "enum": [
                              "CODE",
                              "MARKDOWN",
                              "DISPLAY_TABLE",
                              "INPUT",
                              "SQL",
                              "VEGA_CHART",
                              "CELL_GROUP",
                              "METRIC",
                              "TEXT",
                              "MAP",
                              "WRITEBACK",
                              "DBT_METRIC",
                              "PIVOT",
                              "FILTER",
                              "COMPONENT_IMPORT",
                              "CHART",
                              "BLOCK",
                              "EXPLORE",
                              "COLLAPSIBLE"
                            ]
                          },
                          "label": {
                            "type": "string",
                            "nullable": true
                          },
                          "dataConnectionId": {
                            "type": "string",
                            "nullable": true
                          },
                          "contents": {
                            "type": "object",
                            "properties": {
                              "codeCell": {
                                "type": "object",
                                "nullable": true,
                                "properties": {
                                  "source": {
                                    "type": "string"
                                  }
                                },
                                "required": [
                                  "source"
                                ]
                              },
                              "sqlCell": {
                                "type": "object",
                                "nullable": true,
                                "properties": {
                                  "source": {
                                    "type": "string"
                                  },
                                  "outputDataframe": {
                                    "type": "string",
                                    "description": "The name of the dataframe that the result will be stored into"
                                  }
                                },
                                "required": [
                                  "source",
                                  "outputDataframe"
                                ]
                              },
                              "markdownCell": {
                                "type": "object",
                                "nullable": true,
                                "properties": {
                                  "source": {
                                    "type": "string"
                                  }
                                },
                                "required": [
                                  "source"
                                ]
                              }
                            },
                            "required": [
                              "codeCell",
                              "sqlCell",
                              "markdownCell"
                            ]
                          },
                          "projectId": {
                            "type": "string"
                          }
                        },
                        "required": [
                          "id",
                          "staticId",
                          "cellType",
                          "label",
                          "dataConnectionId",
                          "contents",
                          "projectId"
                        ]
                      }
                    },
                    "pagination": {
                      "$ref": "#/components/schemas/Pagination"
                    }
                  },
                  "required": [
                    "values",
                    "pagination"
                  ]
                }
              }
            }
          },
          "400": {
            "description": "Invalid input data",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/error.BAD_REQUEST"
                }
              }
            }
          },
          "401": {
            "description": "Authorization not provided",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/error.UNAUTHORIZED"
                }
              }
            }
          },
          "403": {
            "description": "Insufficient access",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/error.FORBIDDEN"
                }
              }
            }
          },
          "404": {
            "description": "Not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/error.NOT_FOUND"
                }
              }
            }
          },
          "500": {
            "description": "Internal server error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/error.INTERNAL_SERVER_ERROR"
                }
              }
            }
          }
        }
      }
    },
    "/v1/cells/{cellId}/image": {
      "get": {
        "operationId": "GetChartImageFromLogic",
        "summary": "GetChartImageFromLogic",
        "description": "Get the rendered PNG image of a chart cell from the project's current notebook (draft) session.\nThe cell must have been executed and must not be in an error state.\nOnly chart-type cells are supported.\n\nThis endpoint is subject to the following rate limits:\n- `hex-chart-image`: Rate limits for rendering chart images\n  - Max 20 requests per minute",
        "parameters": [
          {
            "in": "path",
            "name": "cellId",
            "description": "The id of the chart cell (scoped to a specific version); a staticCellId is also accepted and resolved within the draft version.",
            "schema": {
              "type": "string",
              "description": "The id of the chart cell (scoped to a specific version); a staticCellId is also accepted and resolved within the draft version."
            },
            "required": true
          },
          {
            "in": "query",
            "name": "width",
            "description": "Output image width in pixels, between 100 and 2000. Both width and height must be provided to apply.",
            "schema": {
              "type": "integer",
              "minimum": 100,
              "maximum": 2000,
              "description": "Output image width in pixels, between 100 and 2000. Both width and height must be provided to apply."
            }
          },
          {
            "in": "query",
            "name": "height",
            "description": "Output image height in pixels, between 100 and 2000. Both width and height must be provided to apply.",
            "schema": {
              "type": "integer",
              "minimum": 100,
              "maximum": 2000,
              "description": "Output image height in pixels, between 100 and 2000. Both width and height must be provided to apply."
            }
          },
          {
            "in": "query",
            "name": "includeTitle",
            "description": "Include the chart title in the image when true.",
            "schema": {
              "type": "boolean",
              "description": "Include the chart title in the image when true."
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "cellId": {
                      "type": "string"
                    },
                    "imageBase64": {
                      "type": "string",
                      "description": "Base64-encoded PNG image of the chart cell as it currently appears in the notebook."
                    },
                    "mimeType": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "cellId",
                    "imageBase64",
                    "mimeType"
                  ]
                }
              }
            }
          },
          "400": {
            "description": "Invalid input data",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/error.BAD_REQUEST"
                }
              }
            }
          },
          "401": {
            "description": "Authorization not provided",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/error.UNAUTHORIZED"
                }
              }
            }
          },
          "403": {
            "description": "Insufficient access",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/error.FORBIDDEN"
                }
              }
            }
          },
          "404": {
            "description": "Not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/error.NOT_FOUND"
                }
              }
            }
          },
          "500": {
            "description": "Internal server error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/error.INTERNAL_SERVER_ERROR"
                }
              }
            }
          }
        }
      }
    },
    "/v1/projects/{projectId}/sharing/users": {
      "patch": {
        "operationId": "EditProjectSharingUsers",
        "summary": "EditProjectSharingUsers",
        "description": "Add users to a project or update/remove their project sharing access. Use CAN_VIEW for the UI permission labeled \"Can explore\" and APP_ONLY for \"Can view app\". Use NONE to remove a user's access.\n\nThis endpoint is subject to the following rate limits:\n- `hex-api-30rpm`: Rate limit group for the Hex API at 30 requests per minute\n  - Max 30 requests per minute",
        "parameters": [
          {
            "in": "path",
            "name": "projectId",
            "description": "The project to update sharing for.",
            "schema": {
              "type": "string",
              "description": "The project to update sharing for."
            },
            "required": true
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "sharing": {
                    "type": "object",
                    "properties": {
                      "upsert": {
                        "type": "object",
                        "properties": {
                          "users": {
                            "type": "array",
                            "items": {
                              "type": "object",
                              "properties": {
                                "user": {
                                  "type": "object",
                                  "properties": {
                                    "id": {
                                      "type": "string"
                                    }
                                  },
                                  "required": [
                                    "id"
                                  ]
                                },
                                "access": {
                                  "type": "string",
                                  "enum": [
                                    "NONE",
                                    "APP_ONLY",
                                    "CAN_VIEW",
                                    "CAN_EDIT",
                                    "FULL_ACCESS"
                                  ]
                                }
                              },
                              "required": [
                                "user",
                                "access"
                              ]
                            },
                            "maxItems": 25
                          }
                        },
                        "required": [
                          "users"
                        ]
                      }
                    },
                    "required": [
                      "upsert"
                    ]
                  }
                },
                "required": [
                  "sharing"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "project": {
                      "$ref": "#/components/schemas/Project"
                    },
                    "errors": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "userIds": {
                            "type": "array",
                            "items": {
                              "type": "string"
                            }
                          },
                          "reason": {
                            "type": "string"
                          }
                        },
                        "required": [
                          "userIds",
                          "reason"
                        ]
                      }
                    }
                  },
                  "required": [
                    "project"
                  ]
                }
              }
            }
          },
          "400": {
            "description": "Invalid input data",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/error.BAD_REQUEST"
                }
              }
            }
          },
          "401": {
            "description": "Authorization not provided",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/error.UNAUTHORIZED"
                }
              }
            }
          },
          "403": {
            "description": "Insufficient access",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/error.FORBIDDEN"
                }
              }
            }
          },
          "404": {
            "description": "Not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/error.NOT_FOUND"
                }
              }
            }
          },
          "500": {
            "description": "Internal server error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/error.INTERNAL_SERVER_ERROR"
                }
              }
            }
          }
        }
      }
    },
    "/v1/projects/export": {
      "post": {
        "operationId": "ExportProject",
        "summary": "ExportProject",
        "description": "Exports a Hex project in the *.hex.yaml format.\n\nAvailability of this endpoint varies by organization. Contact Hex support to request access.\n\nThis endpoint is subject to the following rate limits:\n- `hex-api`: Default rate limit group for the Hex API\n  - Max requests per minute may vary (default: 30)\n  - Max requests per hour may vary (default: 1800)",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "projectId": {
                    "type": "string",
                    "description": "The project to export."
                  },
                  "version": {
                    "anyOf": [
                      {
                        "type": "integer",
                        "minimum": 1
                      },
                      {
                        "type": "string",
                        "enum": [
                          "draft"
                        ]
                      },
                      {
                        "type": "string",
                        "enum": [
                          "latest"
                        ]
                      }
                    ],
                    "default": "draft",
                    "description": "Used to specify the version to export. \"draft\" is the current notebook version; \"latest\" is the latest published app version."
                  }
                },
                "required": [
                  "projectId"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "filename": {
                      "type": "string"
                    },
                    "content": {
                      "type": "string",
                      "description": "YAML encoded hex project following the *.hex.yaml format"
                    }
                  },
                  "required": [
                    "filename",
                    "content"
                  ]
                }
              }
            }
          },
          "400": {
            "description": "Invalid input data",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/error.BAD_REQUEST"
                }
              }
            }
          },
          "401": {
            "description": "Authorization not provided",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/error.UNAUTHORIZED"
                }
              }
            }
          },
          "403": {
            "description": "Insufficient access",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/error.FORBIDDEN"
                }
              }
            }
          },
          "500": {
            "description": "Internal server error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/error.INTERNAL_SERVER_ERROR"
                }
              }
            }
          }
        }
      }
    },
    "/v1/projects/{projectId}/runs/{runId}/cells/{staticId}/image": {
      "get": {
        "operationId": "GetChartImageFromRun",
        "summary": "GetChartImageFromRun",
        "description": "Get the rendered PNG image of a chart cell from a completed run by staticCellId.\nThe cell must have been executed and must not be in an error state.\nOnly chart-type cells are supported.\n\nThis endpoint is subject to the following rate limits:\n- `hex-chart-image`: Rate limits for rendering chart images\n  - Max 20 requests per minute",
        "parameters": [
          {
            "in": "path",
            "name": "projectId",
            "description": "The project the run belongs to.",
            "schema": {
              "type": "string",
              "description": "The project the run belongs to."
            },
            "required": true
          },
          {
            "in": "path",
            "name": "runId",
            "description": "The run to read the chart image from.",
            "schema": {
              "type": "string",
              "description": "The run to read the chart image from."
            },
            "required": true
          },
          {
            "in": "path",
            "name": "staticId",
            "description": "The staticId of the chart cell (which remains stable across project versions), as opposed to its cellId (which is scoped to a specific version).",
            "schema": {
              "type": "string",
              "description": "The staticId of the chart cell (which remains stable across project versions), as opposed to its cellId (which is scoped to a specific version)."
            },
            "required": true
          },
          {
            "in": "query",
            "name": "width",
            "description": "Output image width in pixels, between 100 and 2000. Both width and height must be provided to apply.",
            "schema": {
              "type": "integer",
              "minimum": 100,
              "maximum": 2000,
              "description": "Output image width in pixels, between 100 and 2000. Both width and height must be provided to apply."
            }
          },
          {
            "in": "query",
            "name": "height",
            "description": "Output image height in pixels, between 100 and 2000. Both width and height must be provided to apply.",
            "schema": {
              "type": "integer",
              "minimum": 100,
              "maximum": 2000,
              "description": "Output image height in pixels, between 100 and 2000. Both width and height must be provided to apply."
            }
          },
          {
            "in": "query",
            "name": "includeTitle",
            "description": "Include the chart title in the image when true.",
            "schema": {
              "type": "boolean",
              "description": "Include the chart title in the image when true."
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "projectId": {
                      "type": "string"
                    },
                    "runId": {
                      "type": "string"
                    },
                    "staticId": {
                      "type": "string"
                    },
                    "imageBase64": {
                      "type": "string",
                      "description": "Base64-encoded PNG image of the chart cell as rendered at the time of the specified run."
                    },
                    "mimeType": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "projectId",
                    "runId",
                    "staticId",
                    "imageBase64",
                    "mimeType"
                  ]
                }
              }
            }
          },
          "400": {
            "description": "Invalid input data",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/error.BAD_REQUEST"
                }
              }
            }
          },
          "401": {
            "description": "Authorization not provided",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/error.UNAUTHORIZED"
                }
              }
            }
          },
          "403": {
            "description": "Insufficient access",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/error.FORBIDDEN"
                }
              }
            }
          },
          "404": {
            "description": "Not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/error.NOT_FOUND"
                }
              }
            }
          },
          "500": {
            "description": "Internal server error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/error.INTERNAL_SERVER_ERROR"
                }
              }
            }
          }
        }
      }
    },
    "/v1/projects/{projectId}/runs": {
      "get": {
        "operationId": "GetProjectRuns",
        "summary": "GetProjectRuns",
        "description": "Get the status of runs of a project. By default, all run types are returned (API-triggered, scheduled, and publish/refresh runs). Use the `runTriggerFilter` parameter to filter to a specific type.\n\nThis endpoint is subject to the following rate limits:\n- `hex-api`: Default rate limit group for the Hex API\n  - Max requests per minute may vary (default: 30)\n  - Max requests per hour may vary (default: 1800)",
        "parameters": [
          {
            "in": "path",
            "name": "projectId",
            "description": "The project whose runs should be listed.",
            "schema": {
              "type": "string",
              "description": "The project whose runs should be listed."
            },
            "required": true
          },
          {
            "in": "query",
            "name": "limit",
            "description": "Number of runs to return per page.",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 100,
              "default": 25,
              "description": "Number of runs to return per page."
            }
          },
          {
            "in": "query",
            "name": "offset",
            "description": "Number of runs to skip.",
            "schema": {
              "type": "integer",
              "minimum": 0,
              "default": 0,
              "description": "Number of runs to skip."
            }
          },
          {
            "in": "query",
            "name": "statusFilter",
            "schema": {
              "type": "string",
              "enum": [
                "PENDING",
                "RUNNING",
                "ERRORED",
                "COMPLETED",
                "KILLED",
                "UNABLE_TO_ALLOCATE_KERNEL"
              ]
            }
          },
          {
            "in": "query",
            "name": "runTriggerFilter",
            "schema": {
              "type": "string",
              "enum": [
                "SCHEDULED",
                "API",
                "APP_REFRESH",
                "ALL"
              ]
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "runs": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/ProjectRun"
                      }
                    },
                    "nextPage": {
                      "type": "string",
                      "nullable": true
                    },
                    "previousPage": {
                      "type": "string",
                      "nullable": true
                    },
                    "traceId": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "runs",
                    "nextPage",
                    "previousPage",
                    "traceId"
                  ]
                }
              }
            }
          },
          "400": {
            "description": "Invalid input data",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/error.BAD_REQUEST"
                }
              }
            }
          },
          "403": {
            "description": "Insufficient access",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/error.FORBIDDEN"
                }
              }
            }
          },
          "422": {
            "description": "Unprocessable content",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/error.UNPROCESSABLE_CONTENT"
                }
              }
            }
          }
        }
      },
      "post": {
        "operationId": "RunProject",
        "summary": "RunProject",
        "description": "Trigger a run of the latest published version of a project.\n\nThis endpoint is subject to the following rate limits:\n- `hex-run-kernel`: Rate limits for starting project runs or sending thread messages\n  - Max requests per minute may vary\n  - Max requests per hour may vary",
        "parameters": [
          {
            "in": "path",
            "name": "projectId",
            "description": "The project whose latest published version should run.",
            "schema": {
              "type": "string",
              "description": "The project whose latest published version should run."
            },
            "required": true
          }
        ],
        "requestBody": {
          "required": false,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/RunProjectRequestBody"
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "projectId": {
                      "type": "string"
                    },
                    "runId": {
                      "type": "string"
                    },
                    "runUrl": {
                      "type": "string"
                    },
                    "runStatusUrl": {
                      "type": "string"
                    },
                    "traceId": {
                      "type": "string"
                    },
                    "projectVersion": {
                      "type": "integer"
                    },
                    "notifications": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/ProjectRunNotificationRecipient"
                      }
                    }
                  },
                  "required": [
                    "projectId",
                    "runId",
                    "runUrl",
                    "runStatusUrl",
                    "traceId",
                    "projectVersion"
                  ]
                }
              }
            }
          },
          "400": {
            "description": "Invalid input data",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/error.BAD_REQUEST"
                }
              }
            }
          },
          "403": {
            "description": "Insufficient access",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/error.FORBIDDEN"
                }
              }
            }
          },
          "422": {
            "description": "Unprocessable content",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/error.UNPROCESSABLE_CONTENT"
                }
              }
            }
          },
          "503": {
            "description": "Service unavailable",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/error.SERVICE_UNAVAILABLE"
                }
              }
            }
          }
        }
      }
    },
    "/v1/threads": {
      "post": {
        "operationId": "CreateThread",
        "summary": "CreateThread",
        "description": "Start an agent thread with a prompt. The Hex agent will analyze data and respond to the prompt. The thread runs asynchronously — poll its status or visit the returned URL to view progress.\n\nAvailability of this endpoint varies by organization. Contact Hex support to request access.\n\nThis endpoint is subject to the following rate limits:\n- `hex-run-kernel`: Rate limits for starting project runs or sending thread messages\n  - Max requests per minute may vary\n  - Max requests per hour may vary",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "prompt": {
                    "type": "string",
                    "minLength": 1
                  },
                  "attachments": {
                    "type": "object",
                    "properties": {
                      "dataConnectionId": {
                        "type": "string",
                        "nullable": true,
                        "description": "Data connection referenced by the prompt"
                      },
                      "tableIds": {
                        "type": "array",
                        "items": {
                          "type": "string"
                        },
                        "description": "Tables referenced by the prompt"
                      },
                      "semanticDatasetIds": {
                        "type": "array",
                        "items": {
                          "type": "string"
                        },
                        "description": "Semantic datasets referenced by the prompt"
                      },
                      "semanticViewIds": {
                        "type": "array",
                        "items": {
                          "type": "string"
                        },
                        "description": "Semantic views referenced by the prompt"
                      },
                      "projectIds": {
                        "type": "array",
                        "items": {
                          "type": "string"
                        },
                        "description": "Projects referenced by the prompt"
                      }
                    },
                    "description": "Entities referenced by the prompt"
                  },
                  "previewId": {
                    "type": "string",
                    "nullable": true
                  },
                  "projectId": {
                    "type": "string",
                    "nullable": true,
                    "description": "Run the thread against an existing project. Mutually exclusive with `newProject`"
                  },
                  "newProject": {
                    "type": "boolean",
                    "nullable": true,
                    "description": "Create a new project for the thread to work on. Mutually exclusive with `projectId`"
                  },
                  "muted": {
                    "type": "boolean",
                    "nullable": true,
                    "description": "If true, the thread will not be shown in any aggregated UI surfaces and will not contribute to user-facing statistics. The thread is still individually viewable. Only applies for non-project-backed threads (ignored when `projectId` or `newProject` is set). This is distinct from a `sensitive` thread."
                  }
                },
                "required": [
                  "prompt"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "threadId": {
                      "type": "string"
                    },
                    "url": {
                      "type": "string"
                    },
                    "createdAt": {
                      "type": "string"
                    },
                    "projectId": {
                      "type": "string",
                      "nullable": true
                    }
                  },
                  "required": [
                    "threadId",
                    "url",
                    "createdAt",
                    "projectId"
                  ]
                }
              }
            }
          },
          "400": {
            "description": "Invalid input data",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/error.BAD_REQUEST"
                }
              }
            }
          },
          "401": {
            "description": "Authorization not provided",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/error.UNAUTHORIZED"
                }
              }
            }
          },
          "403": {
            "description": "Insufficient access",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/error.FORBIDDEN"
                }
              }
            }
          },
          "500": {
            "description": "Internal server error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/error.INTERNAL_SERVER_ERROR"
                }
              }
            }
          }
        }
      },
      "get": {
        "operationId": "ListThreads",
        "summary": "ListThreads",
        "description": "List agent threads in the workspace, sorted by most recently created first. Requires Manager org role or higher. Workspace admins receive every non-private thread; managers receive threads they created plus Threads-type threads on projects they have access to. Threads marked private are returned with their title redacted.\n\nThis endpoint is subject to the following rate limits:\n- `hex-api`: Default rate limit group for the Hex API\n  - Max requests per minute may vary (default: 30)\n  - Max requests per hour may vary (default: 1800)",
        "parameters": [
          {
            "in": "query",
            "name": "after",
            "schema": {
              "type": "string",
              "nullable": true,
              "default": null
            }
          },
          {
            "in": "query",
            "name": "before",
            "schema": {
              "type": "string",
              "nullable": true,
              "default": null
            }
          },
          {
            "in": "query",
            "name": "limit",
            "schema": {
              "type": "number",
              "minimum": 1,
              "maximum": 100,
              "default": 25
            }
          },
          {
            "in": "query",
            "name": "source",
            "schema": {
              "type": "string",
              "nullable": true,
              "enum": [
                "HEX",
                "SLACK",
                "MCP",
                "PUBLIC_API",
                null
              ]
            }
          },
          {
            "in": "query",
            "name": "userId",
            "schema": {
              "type": "string",
              "nullable": true
            }
          },
          {
            "in": "query",
            "name": "type",
            "schema": {
              "type": "string",
              "nullable": true,
              "enum": [
                "THREADS",
                "NOTEBOOK",
                "MODELING",
                null
              ]
            }
          },
          {
            "in": "query",
            "name": "numDays",
            "schema": {
              "type": "integer",
              "nullable": true,
              "minimum": 0,
              "exclusiveMinimum": true
            }
          },
          {
            "in": "query",
            "name": "hasFeedback",
            "schema": {
              "type": "boolean",
              "nullable": true
            }
          },
          {
            "in": "query",
            "name": "roles",
            "description": "Comma-separated list of user org roles to filter by (ADMIN, MANAGER, EDITOR, EXPLORER, MEMBER, GUEST)",
            "schema": {
              "type": "string",
              "nullable": true,
              "description": "Comma-separated list of user org roles to filter by (ADMIN, MANAGER, EDITOR, EXPLORER, MEMBER, GUEST)"
            }
          },
          {
            "in": "query",
            "name": "warnings",
            "description": "Comma-separated list of warning types to filter by (DATA_LIMITATION, USER_DOUBT, MISSING_CONTEXT, OTHER)",
            "schema": {
              "type": "string",
              "nullable": true,
              "description": "Comma-separated list of warning types to filter by (DATA_LIMITATION, USER_DOUBT, MISSING_CONTEXT, OTHER)"
            }
          },
          {
            "in": "query",
            "name": "topicIds",
            "description": "Comma-separated list of topic IDs to filter by",
            "schema": {
              "type": "string",
              "nullable": true,
              "description": "Comma-separated list of topic IDs to filter by"
            }
          },
          {
            "in": "query",
            "name": "resourceIds",
            "schema": {
              "type": "string",
              "nullable": true
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "threads": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "title": {
                            "type": "string",
                            "nullable": true,
                            "description": "Title of the thread, when available. Null for private threads"
                          },
                          "creditsUsed": {
                            "type": "number",
                            "nullable": true,
                            "description": "The total credits used by the thread"
                          },
                          "topics": {
                            "type": "array",
                            "items": {
                              "type": "object",
                              "properties": {
                                "id": {
                                  "type": "string"
                                },
                                "name": {
                                  "type": "string"
                                }
                              },
                              "required": [
                                "id",
                                "name"
                              ]
                            }
                          },
                          "warnings": {
                            "type": "array",
                            "items": {
                              "type": "object",
                              "properties": {
                                "id": {
                                  "type": "string"
                                },
                                "type": {
                                  "type": "string"
                                },
                                "summary": {
                                  "type": "string"
                                }
                              },
                              "required": [
                                "id",
                                "type",
                                "summary"
                              ]
                            }
                          },
                          "feedback": {
                            "type": "array",
                            "items": {
                              "type": "object",
                              "properties": {
                                "id": {
                                  "type": "string"
                                },
                                "userFeedback": {
                                  "type": "string"
                                },
                                "type": {
                                  "type": "string",
                                  "enum": [
                                    "THUMBS",
                                    "FLAG"
                                  ]
                                },
                                "selectedReason": {
                                  "type": "string",
                                  "nullable": true
                                },
                                "userLiked": {
                                  "type": "boolean"
                                }
                              },
                              "required": [
                                "id",
                                "userFeedback",
                                "type",
                                "userLiked"
                              ]
                            }
                          },
                          "warningsGeneratedAt": {
                            "type": "string",
                            "nullable": true
                          },
                          "threadSummary": {
                            "type": "string",
                            "nullable": true
                          },
                          "threadIntent": {
                            "type": "string",
                            "nullable": true
                          },
                          "model": {
                            "type": "string",
                            "description": "Deprecated: use `auto` and `effectiveModel` instead. The model the user explicitly selected, or 'Auto' when the thread runs on Auto",
                            "deprecated": true
                          },
                          "auto": {
                            "type": "boolean",
                            "description": "Whether the thread runs on Auto rather than an explicit model selection"
                          },
                          "effectiveModel": {
                            "type": "string",
                            "nullable": true,
                            "description": "The model the thread actually runs on. For Auto threads this is the model Auto selected. Null for legacy threads with no recorded model"
                          },
                          "userId": {
                            "type": "string",
                            "nullable": true
                          },
                          "type": {
                            "type": "string",
                            "description": "User-facing label for the type of agent thread"
                          },
                          "source": {
                            "type": "string",
                            "description": "The source of where the thread was created"
                          },
                          "createdAt": {
                            "type": "string"
                          },
                          "sensitive": {
                            "type": "boolean",
                            "description": "Whether the thread has been marked as sensitive. When true, the thread's contents (such as title) are hidden from callers other than the thread author"
                          },
                          "id": {
                            "type": "string"
                          },
                          "orgId": {
                            "type": "string"
                          },
                          "url": {
                            "type": "string"
                          }
                        },
                        "required": [
                          "userId",
                          "type",
                          "source",
                          "createdAt",
                          "sensitive",
                          "id",
                          "orgId",
                          "url"
                        ]
                      }
                    },
                    "pagination": {
                      "$ref": "#/components/schemas/Pagination"
                    }
                  },
                  "required": [
                    "threads",
                    "pagination"
                  ]
                }
              }
            }
          },
          "400": {
            "description": "Invalid input data",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/error.BAD_REQUEST"
                }
              }
            }
          },
          "401": {
            "description": "Authorization not provided",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/error.UNAUTHORIZED"
                }
              }
            }
          },
          "403": {
            "description": "Insufficient access",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/error.FORBIDDEN"
                }
              }
            }
          },
          "404": {
            "description": "Not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/error.NOT_FOUND"
                }
              }
            }
          },
          "500": {
            "description": "Internal server error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/error.INTERNAL_SERVER_ERROR"
                }
              }
            }
          }
        }
      }
    },
    "/v1/threads/{id}": {
      "get": {
        "operationId": "GetThread",
        "summary": "GetThread",
        "description": "Get the response of an agent thread. Returns the current status (RUNNING, IDLE, or ERROR) and the agent's response content when available.\n\nThis endpoint is subject to the following rate limits:\n- `hex-api`: Default rate limit group for the Hex API\n  - Max requests per minute may vary (default: 30)\n  - Max requests per hour may vary (default: 1800)",
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "schema": {
              "type": "string"
            },
            "required": true
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "title": {
                      "type": "string",
                      "nullable": true,
                      "description": "Title of the thread, when available. Null for private threads"
                    },
                    "creditsUsed": {
                      "type": "number",
                      "nullable": true,
                      "description": "The total credits used by the thread"
                    },
                    "topics": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "id": {
                            "type": "string"
                          },
                          "name": {
                            "type": "string"
                          }
                        },
                        "required": [
                          "id",
                          "name"
                        ]
                      }
                    },
                    "warnings": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "id": {
                            "type": "string"
                          },
                          "type": {
                            "type": "string"
                          },
                          "summary": {
                            "type": "string"
                          }
                        },
                        "required": [
                          "id",
                          "type",
                          "summary"
                        ]
                      }
                    },
                    "feedback": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "id": {
                            "type": "string"
                          },
                          "userFeedback": {
                            "type": "string"
                          },
                          "type": {
                            "type": "string",
                            "enum": [
                              "THUMBS",
                              "FLAG"
                            ]
                          },
                          "selectedReason": {
                            "type": "string",
                            "nullable": true
                          },
                          "userLiked": {
                            "type": "boolean"
                          }
                        },
                        "required": [
                          "id",
                          "userFeedback",
                          "type",
                          "userLiked"
                        ]
                      }
                    },
                    "warningsGeneratedAt": {
                      "type": "string",
                      "nullable": true
                    },
                    "threadSummary": {
                      "type": "string",
                      "nullable": true
                    },
                    "threadIntent": {
                      "type": "string",
                      "nullable": true
                    },
                    "model": {
                      "type": "string",
                      "description": "Deprecated: use `auto` and `effectiveModel` instead. The model the user explicitly selected, or 'Auto' when the thread runs on Auto",
                      "deprecated": true
                    },
                    "auto": {
                      "type": "boolean",
                      "description": "Whether the thread runs on Auto rather than an explicit model selection"
                    },
                    "effectiveModel": {
                      "type": "string",
                      "nullable": true,
                      "description": "The model the thread actually runs on. For Auto threads this is the model Auto selected. Null for legacy threads with no recorded model"
                    },
                    "userId": {
                      "type": "string",
                      "nullable": true
                    },
                    "type": {
                      "type": "string",
                      "description": "User-facing label for the type of agent thread"
                    },
                    "source": {
                      "type": "string",
                      "description": "The source of where the thread was created"
                    },
                    "createdAt": {
                      "type": "string"
                    },
                    "sensitive": {
                      "type": "boolean",
                      "description": "Whether the thread has been marked as sensitive. When true, the thread's contents (such as title) are hidden from callers other than the thread author"
                    },
                    "threadId": {
                      "type": "string"
                    },
                    "status": {
                      "type": "string",
                      "enum": [
                        "IDLE",
                        "RUNNING",
                        "ERROR"
                      ]
                    },
                    "url": {
                      "type": "string"
                    },
                    "error": {
                      "type": "object",
                      "nullable": true,
                      "properties": {
                        "type": {
                          "type": "string",
                          "enum": [
                            "NO_CONTEXT",
                            "BAD_DATA",
                            "AGENT_ERROR",
                            "AGENT_OVERLOADED",
                            "GENERIC_ERROR",
                            "POSSIBLE_PROMPT_INJECTION",
                            "OVER_LIMIT",
                            "NO_DATA",
                            "INVALID_RESPONSE",
                            "HALLUCINATED_SCHEMA_ELEMENT",
                            "NON_EXPRESSIBLE",
                            "INVALID_JOIN",
                            "EXPLORE_TIMED_OUT",
                            "EXPLORE_ERRORED",
                            "EXPLORE_TABLE_SWAPPED",
                            "UNSUPPORTED_QUERY_ELEMENTS",
                            "EXPLORE_NO_DATA",
                            "CHART_ROW_LIMIT_EXCEEDED",
                            "BYOK_AUTHENTICATION",
                            "BYOK_KEY_MISSING",
                            "AGENT_COMPRESSION_ERROR",
                            "TOKEN_COUNTING_FAILURE",
                            "REQUEST_CANCELLED",
                            "INVALID_MESSAGE_HISTORY",
                            "INVALID_REQUEST",
                            "DATA_CONNECTION_NOT_AUTHORIZED",
                            "MODEL_NOT_AVAILABLE",
                            "PROVIDER_CONNECTION_INTERRUPTED",
                            "AGENT_AUTH",
                            "PROVIDER_QUOTA_EXCEEDED",
                            "JOIN_VALIDATION_TIMEOUT"
                          ]
                        },
                        "message": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "type",
                        "message"
                      ]
                    },
                    "resources": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "id": {
                            "type": "string"
                          },
                          "resourceType": {
                            "type": "string"
                          },
                          "name": {
                            "type": "string"
                          }
                        },
                        "required": [
                          "id",
                          "resourceType",
                          "name"
                        ]
                      }
                    },
                    "response": {
                      "type": "array",
                      "nullable": true,
                      "items": {
                        "oneOf": [
                          {
                            "type": "object",
                            "properties": {
                              "type": {
                                "type": "string",
                                "enum": [
                                  "text"
                                ]
                              },
                              "text": {
                                "type": "string"
                              }
                            },
                            "required": [
                              "type",
                              "text"
                            ]
                          },
                          {
                            "type": "object",
                            "properties": {
                              "type": {
                                "type": "string",
                                "enum": [
                                  "cell"
                                ]
                              },
                              "id": {
                                "type": "string"
                              },
                              "staticId": {
                                "type": "string"
                              },
                              "label": {
                                "type": "string",
                                "nullable": true
                              }
                            },
                            "required": [
                              "type",
                              "id",
                              "staticId",
                              "label"
                            ]
                          },
                          {
                            "type": "object",
                            "properties": {
                              "type": {
                                "type": "string",
                                "enum": [
                                  "project"
                                ]
                              },
                              "id": {
                                "type": "string"
                              },
                              "title": {
                                "type": "string",
                                "nullable": true
                              }
                            },
                            "required": [
                              "type",
                              "id",
                              "title"
                            ]
                          },
                          {
                            "type": "object",
                            "properties": {
                              "type": {
                                "type": "string",
                                "enum": [
                                  "task"
                                ]
                              },
                              "title": {
                                "type": "string"
                              }
                            },
                            "required": [
                              "type",
                              "title"
                            ]
                          }
                        ]
                      }
                    }
                  },
                  "required": [
                    "title",
                    "creditsUsed",
                    "topics",
                    "warnings",
                    "feedback",
                    "model",
                    "auto",
                    "effectiveModel",
                    "userId",
                    "type",
                    "source",
                    "createdAt",
                    "sensitive",
                    "threadId",
                    "status",
                    "url",
                    "resources",
                    "response"
                  ]
                }
              }
            }
          },
          "400": {
            "description": "Invalid input data",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/error.BAD_REQUEST"
                }
              }
            }
          },
          "401": {
            "description": "Authorization not provided",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/error.UNAUTHORIZED"
                }
              }
            }
          },
          "403": {
            "description": "Insufficient access",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/error.FORBIDDEN"
                }
              }
            }
          },
          "404": {
            "description": "Not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/error.NOT_FOUND"
                }
              }
            }
          },
          "500": {
            "description": "Internal server error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/error.INTERNAL_SERVER_ERROR"
                }
              }
            }
          }
        }
      }
    },
    "/v1/threads/{threadId}/messages": {
      "get": {
        "operationId": "GetThreadMessages",
        "summary": "GetThreadMessages",
        "description": "List the messages in an agent thread, rendered as a single flat list of text blocks. Within a page messages are chronological (oldest first); each text block is prefixed with the authoring role, and thinking and error blocks are tagged. Each block includes the creation time of its originating message. Tool-call, tool-result, and mention blocks are omitted, and inline references are left as raw tags. By default the most recent page is returned (matching the MCP get_thread tool); pass the `before` cursor to fetch older messages and `after` to fetch newer ones. Set `full` to include JSON-encoded message records with thinking, tool calls, results, and mentions. Supports cursor pagination with a maximum page size of 50.\n\nThis endpoint is subject to the following rate limits:\n- `hex-api`: Default rate limit group for the Hex API\n  - Max requests per minute may vary (default: 30)\n  - Max requests per hour may vary (default: 1800)",
        "parameters": [
          {
            "in": "path",
            "name": "threadId",
            "schema": {
              "type": "string"
            },
            "required": true
          },
          {
            "in": "query",
            "name": "after",
            "schema": {
              "type": "string",
              "nullable": true,
              "default": null
            }
          },
          {
            "in": "query",
            "name": "before",
            "schema": {
              "type": "string",
              "nullable": true,
              "default": null
            }
          },
          {
            "in": "query",
            "name": "limit",
            "schema": {
              "type": "number",
              "minimum": 1,
              "maximum": 50,
              "default": 25
            }
          },
          {
            "in": "query",
            "name": "full",
            "description": "Include JSON-encoded message records with thinking, tool calls, results, and mentions",
            "schema": {
              "type": "boolean",
              "default": false,
              "description": "Include JSON-encoded message records with thinking, tool calls, results, and mentions"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "content": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "type": {
                            "type": "string",
                            "enum": [
                              "text"
                            ]
                          },
                          "text": {
                            "type": "string"
                          },
                          "createdAt": {
                            "type": "string",
                            "description": "When the originating message was created"
                          }
                        },
                        "required": [
                          "type",
                          "text",
                          "createdAt"
                        ],
                        "description": "A rendered text block from the thread"
                      },
                      "description": "The thread's messages rendered as a single flat, ordered list of content blocks"
                    },
                    "pagination": {
                      "$ref": "#/components/schemas/Pagination"
                    }
                  },
                  "required": [
                    "content",
                    "pagination"
                  ]
                }
              }
            }
          },
          "400": {
            "description": "Invalid input data",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/error.BAD_REQUEST"
                }
              }
            }
          },
          "401": {
            "description": "Authorization not provided",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/error.UNAUTHORIZED"
                }
              }
            }
          },
          "403": {
            "description": "Insufficient access",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/error.FORBIDDEN"
                }
              }
            }
          },
          "404": {
            "description": "Not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/error.NOT_FOUND"
                }
              }
            }
          },
          "500": {
            "description": "Internal server error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/error.INTERNAL_SERVER_ERROR"
                }
              }
            }
          }
        }
      }
    },
    "/v1/threads/{id}/followup": {
      "post": {
        "operationId": "ContinueThread",
        "summary": "ContinueThread",
        "description": "Continue an existing agent thread with a follow-up prompt. This endpoint does not support queuing: the thread must be idle before a follow-up can be sent.\n\nAvailability of this endpoint varies by organization. Contact Hex support to request access.\n\nThis endpoint is subject to the following rate limits:\n- `hex-run-kernel`: Rate limits for starting project runs or sending thread messages\n  - Max requests per minute may vary\n  - Max requests per hour may vary",
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "schema": {
              "type": "string"
            },
            "required": true
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "prompt": {
                    "type": "string",
                    "minLength": 1
                  },
                  "attachments": {
                    "type": "object",
                    "properties": {
                      "dataConnectionId": {
                        "type": "string",
                        "nullable": true,
                        "description": "Data connection referenced by the prompt"
                      },
                      "tableIds": {
                        "type": "array",
                        "items": {
                          "type": "string"
                        },
                        "description": "Tables referenced by the prompt"
                      },
                      "semanticDatasetIds": {
                        "type": "array",
                        "items": {
                          "type": "string"
                        },
                        "description": "Semantic datasets referenced by the prompt"
                      },
                      "semanticViewIds": {
                        "type": "array",
                        "items": {
                          "type": "string"
                        },
                        "description": "Semantic views referenced by the prompt"
                      },
                      "projectIds": {
                        "type": "array",
                        "items": {
                          "type": "string"
                        },
                        "description": "Projects referenced by the prompt"
                      }
                    },
                    "description": "Entities referenced by the prompt"
                  }
                },
                "required": [
                  "prompt"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "threadId": {
                      "type": "string"
                    },
                    "url": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "threadId",
                    "url"
                  ]
                }
              }
            }
          },
          "400": {
            "description": "Invalid input data",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/error.BAD_REQUEST"
                }
              }
            }
          },
          "401": {
            "description": "Authorization not provided",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/error.UNAUTHORIZED"
                }
              }
            }
          },
          "403": {
            "description": "Insufficient access",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/error.FORBIDDEN"
                }
              }
            }
          },
          "500": {
            "description": "Internal server error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/error.INTERNAL_SERVER_ERROR"
                }
              }
            }
          }
        }
      }
    },
    "/v1/users/me": {
      "get": {
        "operationId": "Me",
        "summary": "Me",
        "description": "Returns information about the current logged in user.\nUser metadata will be omitted when authenticating with a workspace token.\n\nThis endpoint is subject to the following rate limits:\n- `hex-api-30rpm`: Rate limit group for the Hex API at 30 requests per minute\n  - Max 30 requests per minute",
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "anyOf": [
                    {
                      "type": "object",
                      "properties": {
                        "id": {
                          "type": "string"
                        },
                        "name": {
                          "type": "string",
                          "nullable": true
                        },
                        "email": {
                          "type": "string"
                        },
                        "role": {
                          "type": "string",
                          "enum": [
                            "ADMIN",
                            "MANAGER",
                            "EDITOR",
                            "EXPLORER",
                            "MEMBER",
                            "GUEST",
                            "EMBEDDED_USER",
                            "ANONYMOUS"
                          ]
                        },
                        "lastLoginDate": {
                          "type": "string",
                          "nullable": true
                        },
                        "org": {
                          "type": "object",
                          "properties": {
                            "id": {
                              "type": "string"
                            }
                          },
                          "required": [
                            "id"
                          ]
                        },
                        "token": {
                          "type": "object",
                          "nullable": true,
                          "properties": {
                            "exp": {
                              "type": "number",
                              "nullable": true
                            }
                          },
                          "required": [
                            "exp"
                          ]
                        }
                      },
                      "required": [
                        "id",
                        "name",
                        "email",
                        "role",
                        "lastLoginDate",
                        "org"
                      ]
                    },
                    {
                      "type": "object",
                      "properties": {
                        "org": {
                          "type": "object",
                          "properties": {
                            "id": {
                              "type": "string"
                            }
                          },
                          "required": [
                            "id"
                          ]
                        },
                        "token": {
                          "type": "object",
                          "nullable": true,
                          "properties": {
                            "exp": {
                              "type": "number",
                              "nullable": true
                            }
                          },
                          "required": [
                            "exp"
                          ]
                        }
                      },
                      "required": [
                        "org"
                      ]
                    }
                  ]
                }
              }
            }
          },
          "400": {
            "description": "Invalid input data",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/error.BAD_REQUEST"
                }
              }
            }
          },
          "401": {
            "description": "Authorization not provided",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/error.UNAUTHORIZED"
                }
              }
            }
          },
          "403": {
            "description": "Insufficient access",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/error.FORBIDDEN"
                }
              }
            }
          },
          "404": {
            "description": "Not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/error.NOT_FOUND"
                }
              }
            }
          },
          "500": {
            "description": "Internal server error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/error.INTERNAL_SERVER_ERROR"
                }
              }
            }
          }
        }
      }
    },
    "/v1/users": {
      "get": {
        "operationId": "ListUsers",
        "summary": "ListUsers",
        "description": "List all users in the workspace\n\nThis endpoint is subject to the following rate limits:\n- `hex-api-30rpm`: Rate limit group for the Hex API at 30 requests per minute\n  - Max 30 requests per minute",
        "parameters": [
          {
            "in": "query",
            "name": "after",
            "schema": {
              "type": "string",
              "nullable": true,
              "default": null
            }
          },
          {
            "in": "query",
            "name": "before",
            "schema": {
              "type": "string",
              "nullable": true,
              "default": null
            }
          },
          {
            "in": "query",
            "name": "limit",
            "schema": {
              "type": "number",
              "minimum": 1,
              "maximum": 500,
              "default": 25
            }
          },
          {
            "in": "query",
            "name": "sortBy",
            "schema": {
              "type": "string",
              "enum": [
                "NAME",
                "EMAIL"
              ],
              "default": "NAME"
            }
          },
          {
            "in": "query",
            "name": "sortDirection",
            "schema": {
              "type": "string",
              "enum": [
                "ASC",
                "DESC"
              ],
              "default": "ASC"
            }
          },
          {
            "in": "query",
            "name": "groupId",
            "schema": {
              "type": "string",
              "nullable": true
            }
          },
          {
            "in": "query",
            "name": "userIds",
            "description": "Comma-separated list of user IDs",
            "schema": {
              "type": "string",
              "nullable": true,
              "description": "Comma-separated list of user IDs"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "values": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "id": {
                            "type": "string"
                          },
                          "name": {
                            "type": "string",
                            "nullable": true
                          },
                          "email": {
                            "type": "string"
                          },
                          "role": {
                            "type": "string",
                            "enum": [
                              "ADMIN",
                              "MANAGER",
                              "EDITOR",
                              "EXPLORER",
                              "MEMBER",
                              "GUEST",
                              "EMBEDDED_USER",
                              "ANONYMOUS"
                            ]
                          },
                          "lastLoginDate": {
                            "type": "string",
                            "nullable": true
                          }
                        },
                        "required": [
                          "id",
                          "name",
                          "email",
                          "role",
                          "lastLoginDate"
                        ]
                      }
                    },
                    "pagination": {
                      "$ref": "#/components/schemas/Pagination"
                    }
                  },
                  "required": [
                    "values",
                    "pagination"
                  ]
                }
              }
            }
          },
          "400": {
            "description": "Invalid input data",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/error.BAD_REQUEST"
                }
              }
            }
          },
          "401": {
            "description": "Authorization not provided",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/error.UNAUTHORIZED"
                }
              }
            }
          },
          "403": {
            "description": "Insufficient access",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/error.FORBIDDEN"
                }
              }
            }
          },
          "404": {
            "description": "Not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/error.NOT_FOUND"
                }
              }
            }
          },
          "500": {
            "description": "Internal server error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/error.INTERNAL_SERVER_ERROR"
                }
              }
            }
          }
        }
      }
    },
    "/v1/users/{userId}/deactivate": {
      "post": {
        "operationId": "DeactivateUser",
        "summary": "DeactivateUser",
        "description": "Deactivate a user\n\nThis endpoint is subject to the following rate limits:\n- `hex-api-30rpm`: Rate limit group for the Hex API at 30 requests per minute\n  - Max 30 requests per minute",
        "parameters": [
          {
            "in": "path",
            "name": "userId",
            "schema": {
              "type": "string"
            },
            "required": true
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "user": {
                      "type": "object",
                      "properties": {
                        "id": {
                          "type": "string"
                        },
                        "name": {
                          "type": "string",
                          "nullable": true
                        },
                        "email": {
                          "type": "string"
                        },
                        "role": {
                          "type": "string",
                          "enum": [
                            "ADMIN",
                            "MANAGER",
                            "EDITOR",
                            "EXPLORER",
                            "MEMBER",
                            "GUEST",
                            "EMBEDDED_USER",
                            "ANONYMOUS"
                          ]
                        },
                        "lastLoginDate": {
                          "type": "string",
                          "nullable": true
                        }
                      },
                      "required": [
                        "id",
                        "name",
                        "email",
                        "role",
                        "lastLoginDate"
                      ]
                    }
                  },
                  "required": [
                    "user"
                  ]
                }
              }
            }
          },
          "400": {
            "description": "Invalid input data",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/error.BAD_REQUEST"
                }
              }
            }
          },
          "401": {
            "description": "Authorization not provided",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/error.UNAUTHORIZED"
                }
              }
            }
          },
          "403": {
            "description": "Insufficient access",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/error.FORBIDDEN"
                }
              }
            }
          },
          "500": {
            "description": "Internal server error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/error.INTERNAL_SERVER_ERROR"
                }
              }
            }
          }
        }
      }
    },
    "/v1/context/topics": {
      "get": {
        "operationId": "ListTopics",
        "summary": "ListTopics",
        "description": "List thread topics in the workspace, sorted by name.\n\nThis endpoint is subject to the following rate limits:\n- `hex-api`: Default rate limit group for the Hex API\n  - Max requests per minute may vary (default: 30)\n  - Max requests per hour may vary (default: 1800)",
        "parameters": [
          {
            "in": "query",
            "name": "after",
            "schema": {
              "type": "string",
              "nullable": true,
              "default": null
            }
          },
          {
            "in": "query",
            "name": "before",
            "schema": {
              "type": "string",
              "nullable": true,
              "default": null
            }
          },
          {
            "in": "query",
            "name": "limit",
            "schema": {
              "type": "number",
              "minimum": 1,
              "maximum": 100,
              "default": 25
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "topics": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "id": {
                            "type": "string"
                          },
                          "name": {
                            "type": "string"
                          }
                        },
                        "required": [
                          "id",
                          "name"
                        ]
                      }
                    },
                    "pagination": {
                      "$ref": "#/components/schemas/Pagination"
                    }
                  },
                  "required": [
                    "topics",
                    "pagination"
                  ]
                }
              }
            }
          },
          "400": {
            "description": "Invalid input data",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/error.BAD_REQUEST"
                }
              }
            }
          },
          "401": {
            "description": "Authorization not provided",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/error.UNAUTHORIZED"
                }
              }
            }
          },
          "403": {
            "description": "Insufficient access",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/error.FORBIDDEN"
                }
              }
            }
          },
          "404": {
            "description": "Not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/error.NOT_FOUND"
                }
              }
            }
          },
          "500": {
            "description": "Internal server error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/error.INTERNAL_SERVER_ERROR"
                }
              }
            }
          }
        }
      }
    },
    "/v1/guides/draft/list": {
      "get": {
        "operationId": "ListDraftGuides",
        "summary": "ListDraftGuides",
        "description": "List draft guides\n\nThis endpoint is subject to the following rate limits:\n- `hex-api-30rpm`: Rate limit group for the Hex API at 30 requests per minute\n  - Max 30 requests per minute",
        "parameters": [
          {
            "in": "query",
            "name": "limit",
            "schema": {
              "type": "number",
              "minimum": 1,
              "maximum": 100,
              "default": 100
            }
          },
          {
            "in": "query",
            "name": "after",
            "schema": {
              "type": "string",
              "nullable": true,
              "default": null
            }
          },
          {
            "in": "query",
            "name": "before",
            "schema": {
              "type": "string",
              "nullable": true,
              "default": null
            }
          },
          {
            "in": "query",
            "name": "externalSource",
            "schema": {
              "type": "string",
              "nullable": true
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "values": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "id": {
                            "type": "string"
                          },
                          "filePath": {
                            "type": "string"
                          }
                        },
                        "required": [
                          "id",
                          "filePath"
                        ]
                      }
                    },
                    "pagination": {
                      "$ref": "#/components/schemas/Pagination"
                    }
                  },
                  "required": [
                    "values",
                    "pagination"
                  ]
                }
              }
            }
          },
          "400": {
            "description": "Invalid input data",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/error.BAD_REQUEST"
                }
              }
            }
          },
          "401": {
            "description": "Authorization not provided",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/error.UNAUTHORIZED"
                }
              }
            }
          },
          "403": {
            "description": "Insufficient access",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/error.FORBIDDEN"
                }
              }
            }
          },
          "404": {
            "description": "Not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/error.NOT_FOUND"
                }
              }
            }
          },
          "500": {
            "description": "Internal server error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/error.INTERNAL_SERVER_ERROR"
                }
              }
            }
          }
        }
      }
    }
  },
  "components": {
    "schemas": {
      "EmbeddingResponse": {
        "properties": {
          "url": {
            "type": "string"
          }
        },
        "required": [
          "url"
        ],
        "type": "object",
        "additionalProperties": false
      },
      "TraceId": {
        "type": "string",
        "description": "A unique identifier for this API request. The Hex Support team may request this value when debugging an issue."
      },
      "TsoaErrorResponsePayload": {
        "properties": {
          "details": {
            "type": "string"
          },
          "traceId": {
            "$ref": "#/components/schemas/TraceId"
          },
          "reason": {
            "type": "string"
          }
        },
        "required": [
          "reason"
        ],
        "type": "object"
      },
      "EmbeddingRequest": {
        "properties": {
          "hexUserAttributes": {
            "properties": {},
            "additionalProperties": {
              "type": "string"
            },
            "type": "object",
            "description": "A map of attributes meant to populate hex_user_attributes in the app for the running user. This must be a string to string map. For more complexity, you can do json serialization",
            "example": {
              "orgId": "my-org-id",
              "groupId": "my-group-id"
            }
          },
          "scope": {
            "items": {
              "type": "string"
            },
            "type": "array",
            "description": "Optionally include additional permissions for a user to do in an embedded app. Valid scopes include:\n\nEXPORT_PDF: allow users to download the app as a pdf\nEXPORT_CSV: allow users to download CSVs from tables"
          },
          "inputParameters": {
            "properties": {},
            "additionalProperties": {},
            "type": "object",
            "description": "Optionall sets default values for input states. The keys are the names of the inputs and the values are the default values for those inputs."
          },
          "expiresIn": {
            "type": "number",
            "format": "double",
            "description": "Optionally specify the expiration time of the embedding url in milliseconds.\nThis represents the maximum allowed time between receiving the API response with the single-use signed URL, and requesting the signed URL for the iframe.\nDefault is 15 seconds. Maximum value is 300 seconds (5 minutes).",
            "default": "15000"
          },
          "displayOptions": {
            "properties": {
              "theme": {
                "type": "string",
                "enum": [
                  "light",
                  "dark"
                ]
              },
              "showEmbeddedRunButton": {
                "type": "boolean",
                "description": "The showEmbeddedRunButton parameter will ensure the run button always shows up in the embedded app navbar"
              },
              "noEmbedHeaderPadding": {
                "type": "boolean",
                "description": "The noEmbedHeaderPadding parameter removes the top padding added to apps with no tabs."
              },
              "noEmbedBasePadding": {
                "type": "boolean",
                "description": "The noEmbedBasePadding parameter removes the padding around the embedded app container"
              },
              "noEmbedOutline": {
                "type": "boolean",
                "description": "The noEmbedOutline parameter removes the border around the embedded app"
              },
              "noEmbedFooter": {
                "type": "boolean",
                "description": "The noEmbedFooter parameter removes the Hex-branded footer at the bottom of the embedded app"
              }
            },
            "additionalProperties": {},
            "type": "object",
            "description": "Optionally customize the display of the embedded app"
          },
          "testMode": {
            "type": "boolean",
            "description": "Run the embed API call in test mode. Does not run the app and will not count towards rate limits or embedding usage counts."
          }
        },
        "type": "object",
        "additionalProperties": {}
      },
      "ProjectId": {
        "type": "string",
        "format": "uuid",
        "description": "Unique ID for a Hex project. This can be found in the Variables side bar of the Logic View of a project, or by visiting the Project, and copying the UUID after `hex` in the URL.",
        "pattern": "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$"
      },
      "ProjectVersionId": {
        "type": "string",
        "format": "uuid",
        "description": "Unique ID for a Hex project version.",
        "pattern": "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$"
      },
      "CellId": {
        "type": "string",
        "format": "uuid",
        "description": "Unique ID for a cell. This can be found by going into the menu of a cell in the notebook.",
        "pattern": "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$"
      },
      "ImportProjectWarningsApiResource": {
        "properties": {
          "categories": {
            "items": {
              "type": "string"
            },
            "type": "array",
            "nullable": true
          },
          "components": {
            "items": {
              "properties": {
                "version": {
                  "type": "string"
                },
                "componentId": {
                  "type": "string"
                }
              },
              "required": [
                "version",
                "componentId"
              ],
              "type": "object"
            },
            "type": "array",
            "nullable": true
          },
          "status": {
            "type": "string",
            "nullable": true
          },
          "projectSecrets": {
            "items": {
              "type": "string"
            },
            "type": "array",
            "nullable": true
          },
          "sharedSecrets": {
            "items": {
              "type": "string"
            },
            "type": "array",
            "nullable": true
          },
          "projectDataConnectionIds": {
            "items": {
              "type": "string"
            },
            "type": "array",
            "nullable": true
          },
          "sharedDataConnections": {
            "items": {
              "type": "string"
            },
            "type": "array",
            "nullable": true
          },
          "sharedVcsPackages": {
            "items": {
              "type": "string"
            },
            "type": "array",
            "nullable": true
          },
          "projectTitle": {
            "type": "string",
            "nullable": true
          },
          "projectLanguage": {
            "type": "string",
            "nullable": true
          },
          "cellIds": {
            "items": {
              "$ref": "#/components/schemas/CellId"
            },
            "type": "array",
            "nullable": true
          },
          "appLayout": {
            "items": {
              "type": "string"
            },
            "type": "array",
            "nullable": true
          },
          "timezones": {
            "items": {
              "type": "string"
            },
            "type": "array",
            "nullable": true
          },
          "externalFileIntegrations": {
            "items": {
              "type": "string"
            },
            "type": "array",
            "nullable": true
          },
          "exportedHexType": {
            "type": "string",
            "nullable": true
          },
          "semanticProjects": {
            "items": {
              "type": "string"
            },
            "type": "array",
            "nullable": true
          }
        },
        "required": [
          "categories",
          "components",
          "status",
          "projectSecrets",
          "sharedSecrets",
          "projectDataConnectionIds",
          "sharedDataConnections",
          "sharedVcsPackages",
          "projectTitle",
          "projectLanguage",
          "cellIds",
          "appLayout",
          "timezones",
          "externalFileIntegrations",
          "exportedHexType",
          "semanticProjects"
        ],
        "type": "object",
        "additionalProperties": false
      },
      "ImportProjectApiResource": {
        "properties": {
          "projectId": {
            "$ref": "#/components/schemas/ProjectId"
          },
          "hexVersionId": {
            "$ref": "#/components/schemas/ProjectVersionId"
          },
          "warnings": {
            "$ref": "#/components/schemas/ImportProjectWarningsApiResource"
          }
        },
        "required": [
          "projectId",
          "hexVersionId",
          "warnings"
        ],
        "type": "object",
        "additionalProperties": false
      },
      "EnumValues_typeofProjectTypeApiEnum_": {
        "type": "string",
        "enum": [
          "PROJECT",
          "COMPONENT"
        ]
      },
      "ProjectTypeApiEnum": {
        "$ref": "#/components/schemas/EnumValues_typeofProjectTypeApiEnum_",
        "description": "The type of the ProjectApiResource being returned."
      },
      "Timestamp": {
        "type": "string",
        "format": "timestamp",
        "description": "An ISO 8601 timestamp with timezone like 1970-01-01T00:00:00Z."
      },
      "EnumValues_typeofScheduleCadenceApiEnum_": {
        "type": "string",
        "enum": [
          "HOURLY",
          "DAILY",
          "WEEKLY",
          "MONTHLY",
          "CUSTOM"
        ]
      },
      "ScheduleCadenceApiEnum": {
        "$ref": "#/components/schemas/EnumValues_typeofScheduleCadenceApiEnum_",
        "description": "Types of cadence of a schedule for a Hex project."
      },
      "TimezoneDesignator": {
        "type": "string",
        "description": "An ISO 8601 timezone designator like +08:00."
      },
      "EnumValues_typeofDayOfWeekApiEnum_": {
        "type": "string",
        "enum": [
          "SUNDAY",
          "MONDAY",
          "TUESDAY",
          "WEDNESDAY",
          "THURSDAY",
          "FRIDAY",
          "SATURDAY"
        ]
      },
      "DayOfWeekApiEnum": {
        "$ref": "#/components/schemas/EnumValues_typeofDayOfWeekApiEnum_"
      },
      "ScheduleApiResource": {
        "properties": {
          "cadence": {
            "$ref": "#/components/schemas/ScheduleCadenceApiEnum"
          },
          "enabled": {
            "type": "boolean"
          },
          "hourly": {
            "properties": {
              "timezone": {
                "$ref": "#/components/schemas/TimezoneDesignator"
              },
              "minute": {
                "type": "integer",
                "format": "int32",
                "minimum": 0,
                "maximum": 59
              }
            },
            "required": [
              "timezone",
              "minute"
            ],
            "type": "object",
            "nullable": true
          },
          "daily": {
            "properties": {
              "timezone": {
                "$ref": "#/components/schemas/TimezoneDesignator"
              },
              "minute": {
                "type": "integer",
                "format": "int32",
                "minimum": 0,
                "maximum": 59
              },
              "hour": {
                "type": "integer",
                "format": "int32",
                "minimum": 0,
                "maximum": 23
              }
            },
            "required": [
              "timezone",
              "minute",
              "hour"
            ],
            "type": "object",
            "nullable": true
          },
          "weekly": {
            "properties": {
              "timezone": {
                "$ref": "#/components/schemas/TimezoneDesignator"
              },
              "minute": {
                "type": "integer",
                "format": "int32",
                "minimum": 0,
                "maximum": 59
              },
              "hour": {
                "type": "integer",
                "format": "int32",
                "minimum": 0,
                "maximum": 23
              },
              "dayOfWeek": {
                "$ref": "#/components/schemas/DayOfWeekApiEnum"
              }
            },
            "required": [
              "timezone",
              "minute",
              "hour",
              "dayOfWeek"
            ],
            "type": "object",
            "nullable": true
          },
          "monthly": {
            "properties": {
              "timezone": {
                "$ref": "#/components/schemas/TimezoneDesignator"
              },
              "minute": {
                "type": "integer",
                "format": "int32",
                "minimum": 0,
                "maximum": 59
              },
              "hour": {
                "type": "integer",
                "format": "int32",
                "minimum": 0,
                "maximum": 23
              },
              "day": {
                "type": "integer",
                "format": "int32",
                "minimum": 1,
                "maximum": 28
              }
            },
            "required": [
              "timezone",
              "minute",
              "hour",
              "day"
            ],
            "type": "object",
            "nullable": true
          },
          "custom": {
            "properties": {
              "timezone": {
                "$ref": "#/components/schemas/TimezoneDesignator"
              },
              "cron": {
                "type": "string"
              }
            },
            "required": [
              "timezone",
              "cron"
            ],
            "type": "object",
            "nullable": true
          }
        },
        "required": [
          "cadence",
          "enabled",
          "hourly",
          "daily",
          "weekly",
          "monthly",
          "custom"
        ],
        "type": "object",
        "additionalProperties": false
      },
      "EnumValues_typeofAccessLevelEnum_": {
        "type": "string",
        "enum": [
          "NONE",
          "APP_ONLY",
          "CAN_VIEW",
          "CAN_EDIT",
          "FULL_ACCESS"
        ]
      },
      "AccessLevelEnum": {
        "$ref": "#/components/schemas/EnumValues_typeofAccessLevelEnum_",
        "description": "Access level granted by sharing endpoints.\nFor projects, `CAN_VIEW` is the API value that corresponds to the UI permission labeled \"Can explore\".\n`APP_ONLY` is the API value that corresponds to the UI permission labeled \"Can view app\"."
      },
      "SharingResource": {
        "properties": {
          "users": {
            "items": {
              "properties": {
                "access": {
                  "$ref": "#/components/schemas/AccessLevelEnum"
                },
                "user": {
                  "properties": {
                    "email": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "email"
                  ],
                  "type": "object"
                }
              },
              "required": [
                "access",
                "user"
              ],
              "type": "object"
            },
            "type": "array"
          },
          "collections": {
            "items": {
              "properties": {
                "access": {
                  "$ref": "#/components/schemas/AccessLevelEnum"
                },
                "collection": {
                  "properties": {
                    "name": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "name"
                  ],
                  "type": "object"
                }
              },
              "required": [
                "access",
                "collection"
              ],
              "type": "object"
            },
            "type": "array"
          },
          "groups": {
            "items": {
              "properties": {
                "access": {
                  "$ref": "#/components/schemas/AccessLevelEnum"
                },
                "group": {
                  "properties": {
                    "name": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "name"
                  ],
                  "type": "object"
                }
              },
              "required": [
                "access",
                "group"
              ],
              "type": "object"
            },
            "type": "array"
          },
          "workspace": {
            "properties": {
              "access": {
                "$ref": "#/components/schemas/AccessLevelEnum"
              }
            },
            "required": [
              "access"
            ],
            "type": "object"
          },
          "publicWeb": {
            "properties": {
              "access": {
                "$ref": "#/components/schemas/AccessLevelEnum"
              }
            },
            "required": [
              "access"
            ],
            "type": "object"
          },
          "support": {
            "properties": {
              "access": {
                "$ref": "#/components/schemas/AccessLevelEnum"
              }
            },
            "required": [
              "access"
            ],
            "type": "object"
          }
        },
        "required": [
          "users",
          "collections",
          "groups",
          "workspace",
          "publicWeb",
          "support"
        ],
        "type": "object",
        "additionalProperties": false
      },
      "ProjectApiResource": {
        "properties": {
          "id": {
            "$ref": "#/components/schemas/ProjectId"
          },
          "title": {
            "type": "string"
          },
          "description": {
            "type": "string",
            "nullable": true
          },
          "type": {
            "$ref": "#/components/schemas/ProjectTypeApiEnum"
          },
          "creator": {
            "properties": {
              "email": {
                "type": "string"
              }
            },
            "required": [
              "email"
            ],
            "type": "object"
          },
          "owner": {
            "properties": {
              "email": {
                "type": "string"
              }
            },
            "required": [
              "email"
            ],
            "type": "object"
          },
          "status": {
            "properties": {
              "name": {
                "type": "string"
              }
            },
            "required": [
              "name"
            ],
            "type": "object",
            "nullable": true
          },
          "categories": {
            "items": {
              "properties": {
                "description": {
                  "type": "string",
                  "nullable": true
                },
                "name": {
                  "type": "string"
                }
              },
              "required": [
                "description",
                "name"
              ],
              "type": "object"
            },
            "type": "array"
          },
          "reviews": {
            "properties": {
              "required": {
                "type": "boolean"
              }
            },
            "required": [
              "required"
            ],
            "type": "object"
          },
          "analytics": {
            "properties": {
              "publishedResultsUpdatedAt": {
                "allOf": [
                  {
                    "$ref": "#/components/schemas/Timestamp"
                  }
                ],
                "nullable": true
              },
              "lastViewedAt": {
                "allOf": [
                  {
                    "$ref": "#/components/schemas/Timestamp"
                  }
                ],
                "nullable": true
              },
              "appViews": {
                "properties": {
                  "lastThirtyDays": {
                    "type": "integer",
                    "format": "int32"
                  },
                  "lastFourteenDays": {
                    "type": "integer",
                    "format": "int32"
                  },
                  "lastSevenDays": {
                    "type": "integer",
                    "format": "int32"
                  },
                  "allTime": {
                    "type": "integer",
                    "format": "int32"
                  }
                },
                "required": [
                  "lastThirtyDays",
                  "lastFourteenDays",
                  "lastSevenDays",
                  "allTime"
                ],
                "type": "object"
              }
            },
            "required": [
              "publishedResultsUpdatedAt",
              "lastViewedAt",
              "appViews"
            ],
            "type": "object"
          },
          "lastEditedAt": {
            "$ref": "#/components/schemas/Timestamp"
          },
          "lastPublishedAt": {
            "allOf": [
              {
                "$ref": "#/components/schemas/Timestamp"
              }
            ],
            "nullable": true
          },
          "createdAt": {
            "$ref": "#/components/schemas/Timestamp"
          },
          "archivedAt": {
            "allOf": [
              {
                "$ref": "#/components/schemas/Timestamp"
              }
            ],
            "nullable": true
          },
          "trashedAt": {
            "allOf": [
              {
                "$ref": "#/components/schemas/Timestamp"
              }
            ],
            "nullable": true
          },
          "schedules": {
            "items": {
              "$ref": "#/components/schemas/ScheduleApiResource"
            },
            "type": "array"
          },
          "sharing": {
            "$ref": "#/components/schemas/SharingResource"
          }
        },
        "required": [
          "id",
          "title",
          "description",
          "type",
          "creator",
          "owner",
          "status",
          "categories",
          "reviews",
          "analytics",
          "lastEditedAt",
          "lastPublishedAt",
          "createdAt",
          "archivedAt",
          "trashedAt",
          "schedules"
        ],
        "type": "object",
        "additionalProperties": false
      },
      "ApiPaginationCursor": {
        "type": "string",
        "description": "A cursor string used with `before` and `after` parameters to paginate through a list\nof items on the API."
      },
      "PaginationApiResource": {
        "properties": {
          "after": {
            "allOf": [
              {
                "$ref": "#/components/schemas/ApiPaginationCursor"
              }
            ],
            "nullable": true
          },
          "before": {
            "allOf": [
              {
                "$ref": "#/components/schemas/ApiPaginationCursor"
              }
            ],
            "nullable": true
          }
        },
        "required": [
          "after",
          "before"
        ],
        "type": "object",
        "additionalProperties": false
      },
      "ProjectsListApiResource": {
        "properties": {
          "values": {
            "items": {
              "$ref": "#/components/schemas/ProjectApiResource"
            },
            "type": "array"
          },
          "pagination": {
            "$ref": "#/components/schemas/PaginationApiResource"
          }
        },
        "required": [
          "values",
          "pagination"
        ],
        "type": "object",
        "additionalProperties": false
      },
      "PageSize": {
        "type": "integer",
        "format": "int32",
        "default": "25",
        "description": "Number of results to fetch per page for paginated requests",
        "minimum": 1,
        "maximum": 100
      },
      "EnumValues_typeofSortByEnum_": {
        "type": "string",
        "enum": [
          "CREATED_AT",
          "LAST_EDITED_AT",
          "LAST_PUBLISHED_AT"
        ]
      },
      "SortByEnum": {
        "$ref": "#/components/schemas/EnumValues_typeofSortByEnum_"
      },
      "EnumValues_typeofSortDirectionEnum_": {
        "type": "string",
        "enum": [
          "DESC",
          "ASC"
        ]
      },
      "SortDirectionEnum": {
        "$ref": "#/components/schemas/EnumValues_typeofSortDirectionEnum_"
      },
      "DataConnectionId": {
        "type": "string",
        "format": "uuid",
        "description": "Unique ID for a data connection.",
        "pattern": "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$"
      },
      "ProjectQueriedTableResource": {
        "properties": {
          "dataConnectionId": {
            "$ref": "#/components/schemas/DataConnectionId"
          },
          "dataConnectionName": {
            "type": "string"
          },
          "tableName": {
            "type": "string"
          }
        },
        "required": [
          "dataConnectionId",
          "dataConnectionName",
          "tableName"
        ],
        "type": "object",
        "additionalProperties": false
      },
      "ProjectQueriedTablesApiResource": {
        "properties": {
          "values": {
            "items": {
              "$ref": "#/components/schemas/ProjectQueriedTableResource"
            },
            "type": "array"
          },
          "pagination": {
            "$ref": "#/components/schemas/PaginationApiResource"
          },
          "traceId": {
            "type": "string"
          }
        },
        "required": [
          "values",
          "pagination",
          "traceId"
        ],
        "type": "object",
        "additionalProperties": false
      },
      "CollectionId": {
        "type": "string",
        "format": "uuid",
        "description": "Unique ID for a collection.",
        "pattern": "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$"
      },
      "ShareProjectWithCollectionError": {
        "properties": {
          "collectionIds": {
            "items": {
              "$ref": "#/components/schemas/CollectionId"
            },
            "type": "array"
          },
          "reason": {
            "type": "string"
          }
        },
        "required": [
          "collectionIds",
          "reason"
        ],
        "type": "object",
        "additionalProperties": false
      },
      "EditProjectSharingCollectionsResponse": {
        "properties": {
          "project": {
            "$ref": "#/components/schemas/ProjectApiResource"
          },
          "errors": {
            "items": {
              "$ref": "#/components/schemas/ShareProjectWithCollectionError"
            },
            "type": "array"
          }
        },
        "required": [
          "project"
        ],
        "type": "object",
        "additionalProperties": false
      },
      "ShareProjectWithWorkspaceError": {
        "properties": {
          "type": {
            "type": "string",
            "enum": [
              "workspace",
              "publicWeb"
            ]
          },
          "reason": {
            "type": "string"
          }
        },
        "required": [
          "type",
          "reason"
        ],
        "type": "object",
        "additionalProperties": false
      },
      "EditProjectSharingWorkspaceAndPublicResponse": {
        "properties": {
          "project": {
            "$ref": "#/components/schemas/ProjectApiResource"
          },
          "errors": {
            "items": {
              "$ref": "#/components/schemas/ShareProjectWithWorkspaceError"
            },
            "type": "array"
          }
        },
        "required": [
          "project"
        ],
        "type": "object",
        "additionalProperties": false
      },
      "PublicWebAccessLevel": {
        "$ref": "#/components/schemas/EnumValues_typeofAccessLevelEnum_"
      },
      "GroupId": {
        "type": "string",
        "format": "uuid",
        "description": "Unique ID for a group. This can be found from the groups page (in Settings).",
        "pattern": "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$"
      },
      "ShareProjectWithGroupError": {
        "properties": {
          "groupIds": {
            "items": {
              "$ref": "#/components/schemas/GroupId"
            },
            "type": "array"
          },
          "reason": {
            "type": "string"
          }
        },
        "required": [
          "groupIds",
          "reason"
        ],
        "type": "object",
        "additionalProperties": false
      },
      "EditProjectSharingGroupsResponse": {
        "properties": {
          "project": {
            "$ref": "#/components/schemas/ProjectApiResource"
          },
          "errors": {
            "items": {
              "$ref": "#/components/schemas/ShareProjectWithGroupError"
            },
            "type": "array"
          }
        },
        "required": [
          "project"
        ],
        "type": "object",
        "additionalProperties": false
      },
      "UserId": {
        "type": "string",
        "format": "uuid",
        "description": "Unique ID for a user. This can be found from the users page (in Settings).",
        "pattern": "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$"
      },
      "ProblemSeverity": {
        "type": "string",
        "enum": [
          "fatal",
          "error",
          "warning"
        ]
      },
      "ProblemMessage": {
        "type": "string"
      },
      "ProblemKeyPath": {
        "items": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "number",
              "format": "double"
            }
          ]
        },
        "type": "array"
      },
      "HexSLTypes.PublicProblem": {
        "description": "A problem encountered during the import of a public HexSL project.",
        "properties": {
          "severity": {
            "$ref": "#/components/schemas/ProblemSeverity"
          },
          "message": {
            "$ref": "#/components/schemas/ProblemMessage"
          },
          "cause_paths": {
            "items": {
              "$ref": "#/components/schemas/ProblemKeyPath"
            },
            "type": "array"
          },
          "impact_paths": {
            "items": {
              "$ref": "#/components/schemas/ProblemKeyPath"
            },
            "type": "array"
          },
          "validated_by_json_schema": {
            "type": "boolean"
          }
        },
        "required": [
          "severity",
          "message",
          "cause_paths",
          "impact_paths"
        ],
        "type": "object",
        "additionalProperties": false
      },
      "HexSLProblemWithDisplay": {
        "allOf": [
          {
            "$ref": "#/components/schemas/HexSLTypes.PublicProblem"
          },
          {
            "properties": {
              "display": {
                "type": "string"
              }
            },
            "required": [
              "display"
            ],
            "type": "object"
          }
        ]
      },
      "Record_string.Record_string.HexSLTypes.DataType__": {
        "properties": {},
        "type": "object",
        "description": "Construct a type with a set of properties K of type T"
      },
      "MetricflowModelSchemas": {
        "$ref": "#/components/schemas/Record_string.Record_string.HexSLTypes.DataType__"
      },
      "SemanticProjectsSyncResponsePayload": {
        "properties": {
          "traceId": {
            "type": "string"
          },
          "contents": {
            "items": {
              "type": "string"
            },
            "type": "array"
          },
          "warnings": {
            "items": {
              "type": "string"
            },
            "type": "array"
          },
          "skipped": {
            "properties": {},
            "additionalProperties": {},
            "type": "object"
          },
          "problems": {
            "items": {
              "$ref": "#/components/schemas/HexSLProblemWithDisplay"
            },
            "type": "array"
          },
          "debug": {
            "properties": {
              "metricflowModelSchemas": {
                "$ref": "#/components/schemas/MetricflowModelSchemas"
              }
            },
            "type": "object"
          }
        },
        "required": [
          "traceId",
          "contents"
        ],
        "type": "object",
        "additionalProperties": false
      },
      "SemanticProjectId": {
        "type": "string",
        "format": "uuid",
        "description": "Unique ID for a Hex semantic project. This can be found from the semantic\nprojects admin panel (in Settings).",
        "pattern": "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$"
      },
      "UpdateSemanticProjectResponse": {
        "description": "Response body for successful status updates",
        "properties": {
          "updated": {
            "properties": {
              "views": {
                "items": {
                  "properties": {
                    "status": {
                      "type": "string",
                      "nullable": true
                    },
                    "name": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "status",
                    "name"
                  ],
                  "type": "object"
                },
                "type": "array"
              },
              "datasets": {
                "items": {
                  "properties": {
                    "status": {
                      "type": "string",
                      "nullable": true
                    },
                    "name": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "status",
                    "name"
                  ],
                  "type": "object"
                },
                "type": "array"
              }
            },
            "required": [
              "views",
              "datasets"
            ],
            "type": "object"
          }
        },
        "required": [
          "updated"
        ],
        "type": "object",
        "additionalProperties": false
      },
      "SemanticObjectUpdate": {
        "description": "A single update for a semantic object (dataset or view)\nCurrently, only status updates are supported.",
        "properties": {
          "type": {
            "type": "string",
            "enum": [
              "DATASET",
              "VIEW"
            ],
            "description": "The type of object to update"
          },
          "name": {
            "type": "string",
            "description": "The name of the dataset or view"
          },
          "status": {
            "type": "string",
            "nullable": true,
            "description": "The status name to apply, or null to remove the current status"
          }
        },
        "required": [
          "type",
          "name",
          "status"
        ],
        "type": "object",
        "additionalProperties": false
      },
      "UpdateSemanticProjectRequest": {
        "description": "Request body for updating semantic datasets and views\nCurrently, only status updates are supported.",
        "properties": {
          "updates": {
            "items": {
              "$ref": "#/components/schemas/SemanticObjectUpdate"
            },
            "type": "array",
            "description": "Array of updates to apply"
          }
        },
        "required": [
          "updates"
        ],
        "type": "object",
        "additionalProperties": false
      },
      "Pick_TsoaErrorResponsePayload.Exclude_keyofTsoaErrorResponsePayload.details__": {
        "properties": {
          "reason": {
            "type": "string"
          },
          "traceId": {
            "$ref": "#/components/schemas/TraceId"
          }
        },
        "required": [
          "reason"
        ],
        "type": "object",
        "description": "From T, pick a set of properties whose keys are in the union K"
      },
      "Omit_TsoaErrorResponsePayload.details_": {
        "$ref": "#/components/schemas/Pick_TsoaErrorResponsePayload.Exclude_keyofTsoaErrorResponsePayload.details__",
        "description": "Construct a type with the properties of T except for those in type K."
      },
      "UpdateStatusErrorDetail": {
        "description": "Details about a failed update",
        "properties": {
          "name": {
            "type": "string",
            "description": "The name of the dataset or view"
          },
          "type": {
            "type": "string",
            "enum": [
              "DATASET",
              "VIEW"
            ],
            "description": "The type of object"
          },
          "reason": {
            "type": "string",
            "enum": [
              "not_found",
              "invalid_status"
            ],
            "description": "The reason for the failure"
          },
          "value": {
            "type": "string",
            "description": "The invalid value (for invalid_status errors)"
          }
        },
        "required": [
          "name",
          "type",
          "reason"
        ],
        "type": "object",
        "additionalProperties": false
      },
      "InputRunId": {
        "type": "string",
        "format": "uuid",
        "description": "Unique ID for a run of a Hex project. This ID is part of the response returned by the RunProject endpoint. The GetProjectRuns endpoint can also be used to find the specific runs for a project.",
        "pattern": "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$"
      },
      "GroupApiResource": {
        "properties": {
          "id": {
            "$ref": "#/components/schemas/GroupId"
          },
          "name": {
            "type": "string"
          },
          "createdAt": {
            "$ref": "#/components/schemas/Timestamp"
          }
        },
        "required": [
          "id",
          "name",
          "createdAt"
        ],
        "type": "object",
        "additionalProperties": false
      },
      "ListGroupsResponse": {
        "properties": {
          "values": {
            "items": {
              "$ref": "#/components/schemas/GroupApiResource"
            },
            "type": "array"
          },
          "pagination": {
            "$ref": "#/components/schemas/PaginationApiResource"
          }
        },
        "required": [
          "values",
          "pagination"
        ],
        "type": "object",
        "additionalProperties": false
      },
      "LargerPageSize": {
        "type": "integer",
        "format": "int32",
        "default": "25",
        "description": "Number of results to fetch per page for paginated requests",
        "minimum": 1,
        "maximum": 500
      },
      "EnumValues_typeofListGroupsSortByEnum_": {
        "type": "string",
        "enum": [
          "CREATED_AT",
          "NAME"
        ]
      },
      "ListGroupsSortByEnum": {
        "$ref": "#/components/schemas/EnumValues_typeofListGroupsSortByEnum_"
      },
      "Name": {
        "type": "string",
        "minLength": 1
      },
      "GroupMembers": {
        "properties": {
          "users": {
            "items": {
              "properties": {
                "id": {
                  "$ref": "#/components/schemas/UserId"
                }
              },
              "required": [
                "id"
              ],
              "type": "object"
            },
            "type": "array",
            "maxItems": 100
          }
        },
        "type": "object",
        "additionalProperties": false
      },
      "CreateGroupResponse": {
        "properties": {
          "id": {
            "$ref": "#/components/schemas/GroupId"
          },
          "name": {
            "$ref": "#/components/schemas/Name"
          },
          "members": {
            "$ref": "#/components/schemas/GroupMembers"
          }
        },
        "required": [
          "id",
          "name",
          "members"
        ],
        "type": "object",
        "additionalProperties": false
      },
      "ReadableConnectionDetails": {
        "anyOf": [
          {
            "properties": {
              "athena": {
                "properties": {
                  "accessKeyId": {
                    "type": "string"
                  },
                  "workgroup": {
                    "type": "string",
                    "nullable": true
                  },
                  "catalog": {
                    "type": "string",
                    "nullable": true
                  },
                  "s3OutputPath": {
                    "type": "string"
                  },
                  "port": {
                    "type": "number",
                    "format": "double"
                  },
                  "hostname": {
                    "type": "string"
                  }
                },
                "type": "object"
              }
            },
            "required": [
              "athena"
            ],
            "type": "object"
          },
          {
            "properties": {
              "bigquery": {
                "properties": {
                  "enableStorageApi": {
                    "type": "boolean"
                  },
                  "enableDriveAccess": {
                    "type": "boolean"
                  },
                  "projectId": {
                    "type": "string"
                  }
                },
                "type": "object"
              }
            },
            "required": [
              "bigquery"
            ],
            "type": "object"
          },
          {
            "properties": {
              "clickhouse": {
                "properties": {
                  "username": {
                    "type": "string"
                  },
                  "port": {
                    "type": "number",
                    "format": "double"
                  },
                  "hostname": {
                    "type": "string"
                  }
                },
                "type": "object"
              }
            },
            "required": [
              "clickhouse"
            ],
            "type": "object"
          },
          {
            "properties": {
              "databricks": {
                "properties": {
                  "jdbcUrl": {
                    "type": "string"
                  }
                },
                "type": "object"
              }
            },
            "required": [
              "databricks"
            ],
            "type": "object"
          },
          {
            "properties": {
              "postgres": {
                "properties": {
                  "username": {
                    "type": "string"
                  },
                  "database": {
                    "type": "string"
                  },
                  "port": {
                    "type": "number",
                    "format": "double"
                  },
                  "hostname": {
                    "type": "string"
                  }
                },
                "type": "object"
              }
            },
            "required": [
              "postgres"
            ],
            "type": "object"
          },
          {
            "properties": {
              "redshift": {
                "properties": {
                  "username": {
                    "type": "string"
                  },
                  "database": {
                    "type": "string"
                  },
                  "port": {
                    "type": "number",
                    "format": "double"
                  },
                  "host": {
                    "type": "string"
                  }
                },
                "type": "object"
              }
            },
            "required": [
              "redshift"
            ],
            "type": "object"
          },
          {
            "properties": {
              "snowflake": {
                "properties": {
                  "role": {
                    "type": "string",
                    "nullable": true
                  },
                  "username": {
                    "type": "string"
                  },
                  "schema": {
                    "type": "string",
                    "nullable": true
                  },
                  "database": {
                    "type": "string"
                  },
                  "warehouse": {
                    "type": "string"
                  },
                  "accountName": {
                    "type": "string"
                  }
                },
                "type": "object"
              }
            },
            "required": [
              "snowflake"
            ],
            "type": "object"
          },
          {
            "properties": {
              "trino": {
                "properties": {
                  "sessionProperties": {
                    "items": {
                      "properties": {
                        "value": {
                          "type": "string"
                        },
                        "key": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "value",
                        "key"
                      ],
                      "type": "object"
                    },
                    "type": "array"
                  },
                  "username": {
                    "type": "string"
                  },
                  "schema": {
                    "type": "string"
                  },
                  "catalog": {
                    "type": "string"
                  },
                  "port": {
                    "type": "number",
                    "format": "double"
                  },
                  "hostname": {
                    "type": "string"
                  }
                },
                "type": "object"
              }
            },
            "required": [
              "trino"
            ],
            "type": "object"
          }
        ]
      },
      "EnumValues_typeofSchemaFilterMatchType_": {
        "type": "string",
        "enum": [
          "EXACT",
          "PREFIX",
          "REGEX",
          "SUFFIX"
        ]
      },
      "SchemaFilterMatchType": {
        "$ref": "#/components/schemas/EnumValues_typeofSchemaFilterMatchType_"
      },
      "SchemaEntityFilter": {
        "properties": {
          "exclude": {
            "properties": {
              "values": {
                "items": {
                  "type": "string"
                },
                "type": "array"
              },
              "matchType": {
                "$ref": "#/components/schemas/SchemaFilterMatchType"
              }
            },
            "required": [
              "values",
              "matchType"
            ],
            "type": "object"
          },
          "include": {
            "properties": {
              "values": {
                "items": {
                  "type": "string"
                },
                "type": "array"
              },
              "matchType": {
                "$ref": "#/components/schemas/SchemaFilterMatchType"
              }
            },
            "required": [
              "values",
              "matchType"
            ],
            "type": "object"
          }
        },
        "type": "object"
      },
      "TimezoneStringDesignator": {
        "type": "string"
      },
      "SchemaRefreshScheduleApiResource": {
        "properties": {
          "cadence": {
            "$ref": "#/components/schemas/ScheduleCadenceApiEnum"
          },
          "enabled": {
            "type": "boolean"
          },
          "daily": {
            "properties": {
              "timezoneString": {
                "$ref": "#/components/schemas/TimezoneStringDesignator"
              },
              "minute": {
                "type": "integer",
                "format": "int32",
                "minimum": 0,
                "maximum": 59
              },
              "hour": {
                "type": "integer",
                "format": "int32",
                "minimum": 0,
                "maximum": 23
              }
            },
            "required": [
              "timezoneString",
              "minute",
              "hour"
            ],
            "type": "object",
            "nullable": true
          },
          "weekly": {
            "properties": {
              "timezoneString": {
                "$ref": "#/components/schemas/TimezoneDesignator"
              },
              "minute": {
                "type": "integer",
                "format": "int32",
                "minimum": 0,
                "maximum": 59
              },
              "hour": {
                "type": "integer",
                "format": "int32",
                "minimum": 0,
                "maximum": 23
              },
              "dayOfWeek": {
                "$ref": "#/components/schemas/DayOfWeekApiEnum"
              }
            },
            "required": [
              "timezoneString",
              "minute",
              "hour",
              "dayOfWeek"
            ],
            "type": "object",
            "nullable": true
          },
          "monthly": {
            "properties": {
              "timezoneString": {
                "$ref": "#/components/schemas/TimezoneDesignator"
              },
              "minute": {
                "type": "integer",
                "format": "int32",
                "minimum": 0,
                "maximum": 59
              },
              "hour": {
                "type": "integer",
                "format": "int32",
                "minimum": 0,
                "maximum": 23
              },
              "day": {
                "type": "integer",
                "format": "int32",
                "minimum": 1,
                "maximum": 28
              }
            },
            "required": [
              "timezoneString",
              "minute",
              "hour",
              "day"
            ],
            "type": "object",
            "nullable": true
          },
          "custom": {
            "properties": {
              "timezoneString": {
                "$ref": "#/components/schemas/TimezoneDesignator"
              },
              "cron": {
                "type": "string"
              }
            },
            "required": [
              "timezoneString",
              "cron"
            ],
            "type": "object",
            "nullable": true
          }
        },
        "required": [
          "cadence",
          "enabled"
        ],
        "type": "object",
        "additionalProperties": false
      },
      "EnumValues_typeofDataConnectionSchemaRefreshAccess_": {
        "type": "string",
        "enum": [
          "ADMINS",
          "USERS_WITH_QUERY_ACCESS"
        ]
      },
      "DataConnectionSchemaRefreshAccess": {
        "$ref": "#/components/schemas/EnumValues_typeofDataConnectionSchemaRefreshAccess_"
      },
      "EnumValues_typeofDataConnectionSharingAccessLevelEnum_": {
        "type": "string",
        "enum": [
          "NONE",
          "QUERY",
          "VIEW_RESULTS"
        ]
      },
      "DataConnectionSharingAccessLevelEnum": {
        "$ref": "#/components/schemas/EnumValues_typeofDataConnectionSharingAccessLevelEnum_"
      },
      "EnumValues_typeofDataConnectionApiType_": {
        "type": "string",
        "enum": [
          "athena",
          "bigquery",
          "clickhouse",
          "databricks",
          "postgres",
          "redshift",
          "snowflake",
          "trino"
        ]
      },
      "DataConnectionApiType": {
        "$ref": "#/components/schemas/EnumValues_typeofDataConnectionApiType_"
      },
      "DataConnectionWithSensitiveFieldsApiResource": {
        "properties": {
          "id": {
            "$ref": "#/components/schemas/DataConnectionId"
          },
          "name": {
            "$ref": "#/components/schemas/Name"
          },
          "type": {
            "$ref": "#/components/schemas/DataConnectionApiType"
          },
          "description": {
            "type": "string"
          },
          "connectionDetails": {
            "allOf": [
              {
                "$ref": "#/components/schemas/ReadableConnectionDetails"
              }
            ],
            "nullable": true
          },
          "connectViaSsh": {
            "type": "boolean"
          },
          "includeMagic": {
            "type": "boolean"
          },
          "allowWritebackCells": {
            "type": "boolean"
          },
          "schemaFilters": {
            "properties": {
              "tables": {
                "$ref": "#/components/schemas/SchemaEntityFilter"
              },
              "schemas": {
                "$ref": "#/components/schemas/SchemaEntityFilter"
              },
              "databases": {
                "$ref": "#/components/schemas/SchemaEntityFilter"
              }
            },
            "type": "object"
          },
          "schemaRefreshSchedule": {
            "$ref": "#/components/schemas/SchemaRefreshScheduleApiResource"
          },
          "schemaRefreshAccess": {
            "$ref": "#/components/schemas/DataConnectionSchemaRefreshAccess"
          },
          "sharing": {
            "properties": {
              "workspace": {
                "properties": {
                  "public": {
                    "$ref": "#/components/schemas/DataConnectionSharingAccessLevelEnum"
                  },
                  "guests": {
                    "$ref": "#/components/schemas/DataConnectionSharingAccessLevelEnum"
                  },
                  "members": {
                    "$ref": "#/components/schemas/DataConnectionSharingAccessLevelEnum"
                  }
                },
                "type": "object"
              },
              "groups": {
                "items": {
                  "properties": {
                    "access": {
                      "$ref": "#/components/schemas/DataConnectionSharingAccessLevelEnum"
                    },
                    "group": {
                      "properties": {
                        "name": {
                          "type": "string"
                        },
                        "id": {
                          "$ref": "#/components/schemas/GroupId"
                        }
                      },
                      "required": [
                        "name",
                        "id"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "access",
                    "group"
                  ],
                  "type": "object"
                },
                "type": "array"
              }
            },
            "type": "object"
          }
        },
        "required": [
          "id",
          "name",
          "type",
          "connectionDetails",
          "connectViaSsh",
          "includeMagic",
          "allowWritebackCells",
          "schemaRefreshAccess",
          "sharing"
        ],
        "type": "object",
        "additionalProperties": false
      },
      "CreateConnectionDetails": {
        "anyOf": [
          {
            "properties": {
              "athena": {
                "properties": {
                  "secretAccessKey": {
                    "type": "string"
                  },
                  "accessKeyId": {
                    "type": "string"
                  },
                  "workgroup": {
                    "type": "string",
                    "nullable": true
                  },
                  "catalog": {
                    "type": "string",
                    "nullable": true
                  },
                  "s3OutputPath": {
                    "type": "string"
                  },
                  "port": {
                    "type": "number",
                    "format": "double"
                  },
                  "hostname": {
                    "type": "string"
                  }
                },
                "required": [
                  "secretAccessKey",
                  "accessKeyId",
                  "s3OutputPath",
                  "port",
                  "hostname"
                ],
                "type": "object"
              }
            },
            "required": [
              "athena"
            ],
            "type": "object"
          },
          {
            "properties": {
              "bigquery": {
                "properties": {
                  "serviceAccountJsonConfig": {
                    "type": "string"
                  },
                  "enableStorageApi": {
                    "type": "boolean"
                  },
                  "enableDriveAccess": {
                    "type": "boolean"
                  },
                  "projectId": {
                    "type": "string"
                  }
                },
                "required": [
                  "serviceAccountJsonConfig",
                  "projectId"
                ],
                "type": "object"
              }
            },
            "required": [
              "bigquery"
            ],
            "type": "object"
          },
          {
            "properties": {
              "databricks": {
                "properties": {
                  "accessToken": {
                    "type": "string"
                  },
                  "jdbcUrl": {
                    "type": "string"
                  }
                },
                "required": [
                  "accessToken",
                  "jdbcUrl"
                ],
                "type": "object"
              }
            },
            "required": [
              "databricks"
            ],
            "type": "object"
          },
          {
            "properties": {
              "postgres": {
                "properties": {
                  "password": {
                    "type": "string"
                  },
                  "username": {
                    "type": "string"
                  },
                  "database": {
                    "type": "string"
                  },
                  "port": {
                    "type": "number",
                    "format": "double"
                  },
                  "hostname": {
                    "type": "string"
                  }
                },
                "required": [
                  "password",
                  "username",
                  "database",
                  "port",
                  "hostname"
                ],
                "type": "object"
              }
            },
            "required": [
              "postgres"
            ],
            "type": "object"
          },
          {
            "properties": {
              "redshift": {
                "properties": {
                  "sslRootCert": {
                    "type": "string",
                    "nullable": true
                  },
                  "password": {
                    "type": "string"
                  },
                  "username": {
                    "type": "string"
                  },
                  "database": {
                    "type": "string"
                  },
                  "port": {
                    "type": "number",
                    "format": "double"
                  },
                  "host": {
                    "type": "string"
                  }
                },
                "required": [
                  "password",
                  "username",
                  "database",
                  "port",
                  "host"
                ],
                "type": "object"
              }
            },
            "required": [
              "redshift"
            ],
            "type": "object"
          },
          {
            "properties": {
              "snowflake": {
                "properties": {
                  "role": {
                    "type": "string",
                    "nullable": true
                  },
                  "passphrase": {
                    "type": "string"
                  },
                  "privateKey": {
                    "type": "string"
                  },
                  "username": {
                    "type": "string"
                  },
                  "schema": {
                    "type": "string",
                    "nullable": true
                  },
                  "database": {
                    "type": "string"
                  },
                  "warehouse": {
                    "type": "string"
                  },
                  "accountName": {
                    "type": "string"
                  }
                },
                "required": [
                  "passphrase",
                  "privateKey",
                  "username",
                  "database",
                  "warehouse",
                  "accountName"
                ],
                "type": "object"
              }
            },
            "required": [
              "snowflake"
            ],
            "type": "object"
          },
          {
            "properties": {
              "trino": {
                "properties": {
                  "sessionProperties": {
                    "items": {
                      "properties": {
                        "value": {
                          "type": "string"
                        },
                        "key": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "value",
                        "key"
                      ],
                      "type": "object"
                    },
                    "type": "array",
                    "nullable": true
                  },
                  "password": {
                    "type": "string"
                  },
                  "username": {
                    "type": "string"
                  },
                  "schema": {
                    "type": "string"
                  },
                  "catalog": {
                    "type": "string"
                  },
                  "port": {
                    "type": "number",
                    "format": "double"
                  },
                  "hostname": {
                    "type": "string"
                  }
                },
                "required": [
                  "username",
                  "port",
                  "hostname"
                ],
                "type": "object"
              }
            },
            "required": [
              "trino"
            ],
            "type": "object"
          }
        ]
      },
      "EnumValues_typeofDataConnectionPublicSharingAccessLevelEnum_": {
        "type": "string",
        "enum": [
          "NONE",
          "VIEW_RESULTS"
        ]
      },
      "DataConnectionPublicSharingAccessLevelEnum": {
        "$ref": "#/components/schemas/EnumValues_typeofDataConnectionPublicSharingAccessLevelEnum_"
      },
      "EditConnectionDetails": {
        "anyOf": [
          {
            "properties": {
              "athena": {
                "properties": {
                  "secretAccessKey": {
                    "type": "string"
                  },
                  "accessKeyId": {
                    "type": "string"
                  },
                  "workgroup": {
                    "type": "string",
                    "nullable": true
                  },
                  "catalog": {
                    "type": "string",
                    "nullable": true
                  },
                  "s3OutputPath": {
                    "type": "string"
                  },
                  "port": {
                    "type": "number",
                    "format": "double"
                  },
                  "hostname": {
                    "type": "string"
                  }
                },
                "type": "object"
              }
            },
            "required": [
              "athena"
            ],
            "type": "object"
          },
          {
            "properties": {
              "bigquery": {
                "properties": {
                  "serviceAccountJsonConfig": {
                    "type": "string"
                  },
                  "enableStorageApi": {
                    "type": "boolean"
                  },
                  "enableDriveAccess": {
                    "type": "boolean"
                  },
                  "projectId": {
                    "type": "string"
                  }
                },
                "type": "object"
              }
            },
            "required": [
              "bigquery"
            ],
            "type": "object"
          },
          {
            "properties": {
              "databricks": {
                "properties": {
                  "accessToken": {
                    "type": "string"
                  },
                  "jdbcUrl": {
                    "type": "string"
                  }
                },
                "type": "object"
              }
            },
            "required": [
              "databricks"
            ],
            "type": "object"
          },
          {
            "properties": {
              "postgres": {
                "properties": {
                  "password": {
                    "type": "string"
                  },
                  "username": {
                    "type": "string"
                  },
                  "database": {
                    "type": "string"
                  },
                  "port": {
                    "type": "number",
                    "format": "double"
                  },
                  "hostname": {
                    "type": "string"
                  }
                },
                "type": "object"
              }
            },
            "required": [
              "postgres"
            ],
            "type": "object"
          },
          {
            "properties": {
              "redshift": {
                "properties": {
                  "sslRootCert": {
                    "type": "string",
                    "nullable": true
                  },
                  "password": {
                    "type": "string"
                  },
                  "username": {
                    "type": "string"
                  },
                  "database": {
                    "type": "string"
                  },
                  "port": {
                    "type": "number",
                    "format": "double"
                  },
                  "host": {
                    "type": "string"
                  }
                },
                "type": "object"
              }
            },
            "required": [
              "redshift"
            ],
            "type": "object"
          },
          {
            "properties": {
              "snowflake": {
                "properties": {
                  "role": {
                    "type": "string",
                    "nullable": true
                  },
                  "passphrase": {
                    "type": "string"
                  },
                  "privateKey": {
                    "type": "string"
                  },
                  "username": {
                    "type": "string"
                  },
                  "schema": {
                    "type": "string",
                    "nullable": true
                  },
                  "database": {
                    "type": "string"
                  },
                  "warehouse": {
                    "type": "string"
                  },
                  "accountName": {
                    "type": "string"
                  }
                },
                "type": "object"
              }
            },
            "required": [
              "snowflake"
            ],
            "type": "object"
          },
          {
            "properties": {
              "trino": {
                "properties": {
                  "sessionProperties": {
                    "items": {
                      "properties": {
                        "value": {
                          "type": "string"
                        },
                        "key": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "value",
                        "key"
                      ],
                      "type": "object"
                    },
                    "type": "array",
                    "nullable": true
                  },
                  "password": {
                    "type": "string"
                  },
                  "username": {
                    "type": "string"
                  },
                  "schema": {
                    "type": "string"
                  },
                  "catalog": {
                    "type": "string"
                  },
                  "port": {
                    "type": "number",
                    "format": "double"
                  },
                  "hostname": {
                    "type": "string"
                  }
                },
                "type": "object"
              }
            },
            "required": [
              "trino"
            ],
            "type": "object"
          }
        ]
      },
      "UpdateDataConnectionSchemaResponse": {
        "description": "Response body for successful schema object status updates",
        "properties": {
          "updated": {
            "properties": {
              "tables": {
                "items": {
                  "properties": {
                    "status": {
                      "type": "string",
                      "nullable": true
                    },
                    "name": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "status",
                    "name"
                  ],
                  "type": "object"
                },
                "type": "array"
              },
              "schemas": {
                "items": {
                  "properties": {
                    "status": {
                      "type": "string",
                      "nullable": true
                    },
                    "name": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "status",
                    "name"
                  ],
                  "type": "object"
                },
                "type": "array"
              },
              "databases": {
                "items": {
                  "properties": {
                    "status": {
                      "type": "string",
                      "nullable": true
                    },
                    "name": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "status",
                    "name"
                  ],
                  "type": "object"
                },
                "type": "array"
              }
            },
            "required": [
              "tables",
              "schemas",
              "databases"
            ],
            "type": "object"
          }
        },
        "required": [
          "updated"
        ],
        "type": "object",
        "additionalProperties": false
      },
      "SchemaObjectUpdate": {
        "description": "Schema object update request - specifies a status change for a database, schema, or table.\nCurrently, only status updates are supported.",
        "properties": {
          "type": {
            "type": "string",
            "enum": [
              "DATABASE",
              "SCHEMA",
              "TABLE"
            ],
            "description": "The type of object to update"
          },
          "name": {
            "type": "string",
            "description": "The name of the object - simple for DATABASE, qualified for SCHEMA/TABLE"
          },
          "status": {
            "type": "string",
            "nullable": true,
            "description": "The status name to apply, or null to remove the current status"
          }
        },
        "required": [
          "type",
          "name",
          "status"
        ],
        "type": "object",
        "additionalProperties": false
      },
      "UpdateDataConnectionSchemaRequest": {
        "description": "Request body for updating data connection schema object statuses\nCurrently, only status updates are supported.",
        "properties": {
          "updates": {
            "items": {
              "$ref": "#/components/schemas/SchemaObjectUpdate"
            },
            "type": "array",
            "description": "Array of updates to apply"
          }
        },
        "required": [
          "updates"
        ],
        "type": "object",
        "additionalProperties": false
      },
      "UpdateSchemaObjectErrorDetail": {
        "description": "Details about a failed update",
        "properties": {
          "name": {
            "type": "string",
            "description": "The name of the object"
          },
          "type": {
            "type": "string",
            "enum": [
              "DATABASE",
              "SCHEMA",
              "TABLE"
            ],
            "description": "The type of object"
          },
          "reason": {
            "type": "string",
            "enum": [
              "not_found",
              "invalid_status",
              "ambiguous_name",
              "database_not_supported",
              "invalid_name_format"
            ],
            "description": "The reason for the failure"
          },
          "value": {
            "type": "string",
            "description": "The invalid value (for invalid_status errors) or additional context"
          }
        },
        "required": [
          "name",
          "type",
          "reason"
        ],
        "type": "object",
        "additionalProperties": false
      },
      "OrgGuideFileId": {
        "type": "string",
        "format": "uuid",
        "description": "Unique ID for a guide file. This can be found by going into the menu of a guide file in the guide files side bar.",
        "pattern": "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$"
      },
      "GuideFileApiResource": {
        "properties": {
          "id": {
            "$ref": "#/components/schemas/OrgGuideFileId",
            "description": "The unique ID of the guide file."
          },
          "filePath": {
            "type": "string",
            "description": "The file path of the guide file.\nexample: \"guide.md\""
          }
        },
        "required": [
          "id",
          "filePath"
        ],
        "type": "object",
        "additionalProperties": false
      },
      "UpsertGuideDraftResponsePayload": {
        "properties": {
          "files": {
            "items": {
              "$ref": "#/components/schemas/GuideFileApiResource"
            },
            "type": "array"
          },
          "warnings": {
            "items": {
              "properties": {
                "message": {
                  "type": "string"
                },
                "filePath": {
                  "type": "string"
                }
              },
              "required": [
                "message",
                "filePath"
              ],
              "type": "object"
            },
            "type": "array"
          },
          "traceId": {
            "$ref": "#/components/schemas/TraceId"
          }
        },
        "required": [
          "files",
          "warnings",
          "traceId"
        ],
        "type": "object",
        "additionalProperties": false
      },
      "UnknownExternalSourceLocatorInput": {
        "properties": {
          "id": {
            "type": "string",
            "description": "An optional identifier that can be used to distinguish between different unspecified external sources."
          },
          "source": {
            "type": "string",
            "enum": [
              "unknown"
            ],
            "nullable": false
          }
        },
        "required": [
          "source"
        ],
        "type": "object"
      },
      "UnknownExternalSourceInput": {
        "$ref": "#/components/schemas/UnknownExternalSourceLocatorInput"
      },
      "GithubExternalSourceLocatorInput": {
        "properties": {
          "repo": {
            "type": "string",
            "description": "The name of the github repository."
          },
          "owner": {
            "type": "string",
            "description": "The owner of the github repository."
          },
          "base": {
            "type": "string",
            "description": "The base URL of the github instance. This is usually `https://github.com` (default) unless uploaded from a self-hosted github instance."
          },
          "source": {
            "type": "string",
            "enum": [
              "github"
            ],
            "nullable": false
          }
        },
        "required": [
          "repo",
          "owner",
          "source"
        ],
        "type": "object"
      },
      "GithubExternalSourceLocatorWithMetadataInput": {
        "allOf": [
          {
            "$ref": "#/components/schemas/GithubExternalSourceLocatorInput"
          },
          {
            "properties": {
              "branch": {
                "type": "string",
                "description": "The git branch for the uploaded version of the guide file\ne.g. `main`"
              },
              "commitHash": {
                "type": "string",
                "description": "The git commit hash for the uploaded version of the guide file"
              }
            },
            "required": [
              "branch",
              "commitHash"
            ],
            "type": "object"
          }
        ]
      },
      "GithubExternalSourceInput": {
        "allOf": [
          {
            "$ref": "#/components/schemas/GithubExternalSourceLocatorWithMetadataInput"
          },
          {
            "properties": {
              "path": {
                "type": "string",
                "description": "The path to the guide file within the github repository\ne.g. `guides/guide.md`"
              }
            },
            "required": [
              "path"
            ],
            "type": "object"
          }
        ]
      },
      "ExternalSourceInput": {
        "anyOf": [
          {
            "$ref": "#/components/schemas/UnknownExternalSourceInput"
          },
          {
            "$ref": "#/components/schemas/GithubExternalSourceInput"
          }
        ],
        "description": "A unique identifier for a file that is sourced from an external source.\nThis is used to track the where the guide file was authored from and where we expect updates to come from."
      },
      "UpsertGuideDraftRequestBody": {
        "properties": {
          "forceWrite": {
            "type": "boolean",
            "description": "If true, will overwrite an existing guide that is synced from a different source if there is a guide of the same name\ne.g. guide1.md is authored in Hex, request.files includes guide1.md -> this will overwrite the guide that was authored in Hex\n\ndefault: false"
          },
          "files": {
            "items": {
              "properties": {
                "externalSource": {
                  "$ref": "#/components/schemas/ExternalSourceInput",
                  "description": "The external source identifier for the guide file. This is used to track the where the guide file was authored from and where we expect updates to come from."
                },
                "contents": {
                  "type": "string",
                  "description": "The contents of the guide file. Maximum length is 100000 characters.",
                  "maxLength": 100000
                },
                "filePath": {
                  "type": "string",
                  "description": "The file path of the guide file.\nexample: \"guide.md\""
                }
              },
              "additionalProperties": {},
              "required": [
                "contents",
                "filePath"
              ],
              "type": "object"
            },
            "type": "array",
            "description": "A mapping from filePath -> contents"
          }
        },
        "required": [
          "files"
        ],
        "type": "object",
        "additionalProperties": false
      },
      "PublishGuidesResponsePayload": {
        "properties": {
          "message": {
            "type": "string"
          },
          "publishedGuides": {
            "items": {
              "$ref": "#/components/schemas/GuideFileApiResource"
            },
            "type": "array"
          },
          "traceId": {
            "$ref": "#/components/schemas/TraceId"
          }
        },
        "required": [
          "message",
          "publishedGuides",
          "traceId"
        ],
        "type": "object",
        "additionalProperties": false
      },
      "PublishGuidesRequestBody": {
        "properties": {
          "orgGuideFileIds": {
            "items": {
              "$ref": "#/components/schemas/OrgGuideFileId"
            },
            "type": "array",
            "description": "The IDs of the guides to publish if publishAllGuides is false."
          },
          "publishAllDraftGuides": {
            "type": "boolean",
            "description": "Publish all draft guides (ignores the orgGuideFileIds field if true)"
          }
        },
        "type": "object",
        "additionalProperties": false
      },
      "CreateContextVersionResponse": {
        "properties": {
          "contextVersionId": {
            "type": "string"
          },
          "orgId": {
            "type": "string"
          },
          "traceId": {
            "type": "string"
          }
        },
        "required": [
          "contextVersionId",
          "orgId",
          "traceId"
        ],
        "type": "object",
        "additionalProperties": false
      },
      "UnknownExternalSourceLocatorWithMetadataInput": {
        "$ref": "#/components/schemas/UnknownExternalSourceLocatorInput"
      },
      "ExternalSourceLocatorWithMetadataInput": {
        "anyOf": [
          {
            "$ref": "#/components/schemas/UnknownExternalSourceLocatorWithMetadataInput"
          },
          {
            "$ref": "#/components/schemas/GithubExternalSourceLocatorWithMetadataInput"
          }
        ]
      },
      "CreateContextVersionRequestBody": {
        "properties": {
          "externalSource": {
            "$ref": "#/components/schemas/ExternalSourceLocatorWithMetadataInput",
            "description": "The external source that the context changeset is sourced from"
          }
        },
        "required": [
          "externalSource"
        ],
        "type": "object",
        "additionalProperties": false
      },
      "UpdateContextVersionOperationResult": {
        "anyOf": [
          {
            "properties": {
              "warnings": {
                "items": {
                  "properties": {
                    "message": {
                      "type": "string"
                    },
                    "filePath": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "message",
                    "filePath"
                  ],
                  "type": "object"
                },
                "type": "array"
              },
              "noops": {
                "items": {
                  "properties": {
                    "filePath": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "filePath"
                  ],
                  "type": "object"
                },
                "type": "array"
              },
              "files": {
                "items": {
                  "properties": {
                    "result": {
                      "type": "string",
                      "enum": [
                        "created",
                        "updated"
                      ]
                    },
                    "filePath": {
                      "type": "string"
                    },
                    "id": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "result",
                    "filePath",
                    "id"
                  ],
                  "type": "object"
                },
                "type": "array"
              },
              "type": {
                "type": "string",
                "enum": [
                  "upsert_guide"
                ],
                "nullable": false
              }
            },
            "required": [
              "warnings",
              "noops",
              "files",
              "type"
            ],
            "type": "object"
          },
          {
            "properties": {
              "removedGuides": {
                "items": {
                  "properties": {
                    "externalSource": {
                      "allOf": [
                        {
                          "$ref": "#/components/schemas/ExternalSourceInput"
                        }
                      ],
                      "nullable": true
                    },
                    "hexFilePath": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "externalSource",
                    "hexFilePath"
                  ],
                  "type": "object"
                },
                "type": "array"
              },
              "type": {
                "type": "string",
                "enum": [
                  "prune_guides"
                ],
                "nullable": false
              }
            },
            "required": [
              "removedGuides",
              "type"
            ],
            "type": "object"
          }
        ]
      },
      "UpdateContextVersionResponse": {
        "properties": {
          "contextVersionId": {
            "type": "string"
          },
          "result": {
            "$ref": "#/components/schemas/UpdateContextVersionOperationResult"
          },
          "traceId": {
            "type": "string"
          }
        },
        "required": [
          "contextVersionId",
          "result",
          "traceId"
        ],
        "type": "object",
        "additionalProperties": false
      },
      "ExternalSourceLocatorInput": {
        "anyOf": [
          {
            "$ref": "#/components/schemas/UnknownExternalSourceLocatorInput"
          },
          {
            "$ref": "#/components/schemas/GithubExternalSourceLocatorInput"
          }
        ],
        "description": "A locator that points to an external source that could include a bunch of context. For example, a github repository"
      },
      "UpdateContextVersionOperation": {
        "anyOf": [
          {
            "properties": {
              "forceWrite": {
                "type": "boolean",
                "description": "If true, will overwrite an existing guide that is synced from a different source if there is a guide of the same name"
              },
              "files": {
                "items": {
                  "properties": {
                    "externalSource": {
                      "$ref": "#/components/schemas/ExternalSourceInput",
                      "description": "The external source that the guide is sourced from"
                    },
                    "contents": {
                      "type": "string",
                      "description": "The contents of the guide"
                    },
                    "filePath": {
                      "type": "string",
                      "description": "The file path of the guide that will show up in Hex"
                    }
                  },
                  "required": [
                    "contents",
                    "filePath"
                  ],
                  "type": "object"
                },
                "type": "array"
              },
              "type": {
                "type": "string",
                "enum": [
                  "upsert_guide"
                ],
                "nullable": false,
                "description": "Upsert one or more guides against the draft version"
              }
            },
            "required": [
              "files",
              "type"
            ],
            "type": "object"
          },
          {
            "properties": {
              "externalSource": {
                "$ref": "#/components/schemas/ExternalSourceLocatorInput",
                "description": "The external source that the guides are sourced from - this is used to figure out which guides Hex expects to be synced and which guides should be deleted"
              },
              "guideFilePaths": {
                "items": {
                  "type": "string"
                },
                "type": "array",
                "description": "The file paths of the guides that currently exist in the repo"
              },
              "type": {
                "type": "string",
                "enum": [
                  "prune_guides"
                ],
                "nullable": false,
                "description": "Prune guides that are not present in the supplied guidesFilePaths"
              }
            },
            "required": [
              "externalSource",
              "guideFilePaths",
              "type"
            ],
            "type": "object"
          }
        ]
      },
      "UpdateContextVersionRequestBody": {
        "properties": {
          "operation": {
            "$ref": "#/components/schemas/UpdateContextVersionOperation"
          }
        },
        "required": [
          "operation"
        ],
        "type": "object",
        "additionalProperties": false
      },
      "PublishContextVersionResponse": {
        "properties": {
          "contextVersionId": {
            "type": "string"
          }
        },
        "required": [
          "contextVersionId"
        ],
        "type": "object",
        "additionalProperties": false
      },
      "PublishContextVersionRequestBody": {
        "properties": {
          "updateLatestVersion": {
            "type": "boolean",
            "description": "If true, will also update the latest version of the context with the changes from the draft version"
          },
          "title": {
            "type": "string",
            "description": "A short, human-readable name for the version."
          },
          "description": {
            "type": "string",
            "description": "A long, human-readable representation for the version."
          }
        },
        "required": [
          "updateLatestVersion"
        ],
        "type": "object",
        "additionalProperties": false
      },
      "EnumValues_typeofCollectionAccess_": {
        "type": "string"
      },
      "CollectionAccess": {
        "$ref": "#/components/schemas/EnumValues_typeofCollectionAccess_"
      },
      "CollectionApiResourceSharing": {
        "properties": {
          "users": {
            "items": {
              "properties": {
                "access": {
                  "$ref": "#/components/schemas/CollectionAccess"
                },
                "id": {
                  "$ref": "#/components/schemas/UserId"
                }
              },
              "required": [
                "access",
                "id"
              ],
              "type": "object"
            },
            "type": "array"
          },
          "groups": {
            "items": {
              "properties": {
                "access": {
                  "$ref": "#/components/schemas/CollectionAccess"
                },
                "id": {
                  "$ref": "#/components/schemas/GroupId"
                }
              },
              "required": [
                "access",
                "id"
              ],
              "type": "object"
            },
            "type": "array"
          },
          "workspace": {
            "properties": {
              "members": {
                "$ref": "#/components/schemas/CollectionAccess"
              }
            },
            "type": "object"
          }
        },
        "type": "object",
        "additionalProperties": false
      },
      "CollectionApiResource": {
        "properties": {
          "id": {
            "$ref": "#/components/schemas/CollectionId"
          },
          "name": {
            "$ref": "#/components/schemas/Name"
          },
          "description": {
            "type": "string"
          },
          "creator": {
            "properties": {
              "email": {
                "type": "string"
              },
              "id": {
                "$ref": "#/components/schemas/UserId"
              }
            },
            "required": [
              "email",
              "id"
            ],
            "type": "object"
          },
          "sharing": {
            "$ref": "#/components/schemas/CollectionApiResourceSharing"
          }
        },
        "required": [
          "id",
          "name",
          "sharing"
        ],
        "type": "object",
        "additionalProperties": false
      },
      "ListCollectionsResponse": {
        "properties": {
          "values": {
            "items": {
              "$ref": "#/components/schemas/CollectionApiResource"
            },
            "type": "array"
          },
          "pagination": {
            "$ref": "#/components/schemas/PaginationApiResource"
          }
        },
        "required": [
          "values",
          "pagination"
        ],
        "type": "object",
        "additionalProperties": false
      },
      "EnumValues_typeofListCollectionsSortByEnum_": {
        "type": "string",
        "enum": [
          "NAME"
        ],
        "nullable": false
      },
      "ListCollectionsSortByEnum": {
        "$ref": "#/components/schemas/EnumValues_typeofListCollectionsSortByEnum_"
      },
      "error.BAD_REQUEST": {
        "type": "object",
        "properties": {
          "message": {
            "type": "string",
            "description": "The error message",
            "example": "Invalid input data"
          },
          "code": {
            "type": "string",
            "description": "The error code",
            "example": "BAD_REQUEST"
          },
          "issues": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "message": {
                  "type": "string"
                }
              },
              "required": [
                "message"
              ]
            },
            "description": "An array of issues that were responsible for the error",
            "example": []
          }
        },
        "required": [
          "message",
          "code"
        ],
        "title": "Invalid input data error (400)",
        "description": "The error information",
        "example": {
          "code": "BAD_REQUEST",
          "message": "Invalid input data",
          "issues": []
        }
      },
      "error.UNAUTHORIZED": {
        "type": "object",
        "properties": {
          "message": {
            "type": "string",
            "description": "The error message",
            "example": "Authorization not provided"
          },
          "code": {
            "type": "string",
            "description": "The error code",
            "example": "UNAUTHORIZED"
          },
          "issues": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "message": {
                  "type": "string"
                }
              },
              "required": [
                "message"
              ]
            },
            "description": "An array of issues that were responsible for the error",
            "example": []
          }
        },
        "required": [
          "message",
          "code"
        ],
        "title": "Authorization not provided error (401)",
        "description": "The error information",
        "example": {
          "code": "UNAUTHORIZED",
          "message": "Authorization not provided",
          "issues": []
        }
      },
      "error.FORBIDDEN": {
        "type": "object",
        "properties": {
          "message": {
            "type": "string",
            "description": "The error message",
            "example": "Insufficient access"
          },
          "code": {
            "type": "string",
            "description": "The error code",
            "example": "FORBIDDEN"
          },
          "issues": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "message": {
                  "type": "string"
                }
              },
              "required": [
                "message"
              ]
            },
            "description": "An array of issues that were responsible for the error",
            "example": []
          }
        },
        "required": [
          "message",
          "code"
        ],
        "title": "Insufficient access error (403)",
        "description": "The error information",
        "example": {
          "code": "FORBIDDEN",
          "message": "Insufficient access",
          "issues": []
        }
      },
      "error.NOT_FOUND": {
        "type": "object",
        "properties": {
          "message": {
            "type": "string",
            "description": "The error message",
            "example": "Not found"
          },
          "code": {
            "type": "string",
            "description": "The error code",
            "example": "NOT_FOUND"
          },
          "issues": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "message": {
                  "type": "string"
                }
              },
              "required": [
                "message"
              ]
            },
            "description": "An array of issues that were responsible for the error",
            "example": []
          }
        },
        "required": [
          "message",
          "code"
        ],
        "title": "Not found error (404)",
        "description": "The error information",
        "example": {
          "code": "NOT_FOUND",
          "message": "Not found",
          "issues": []
        }
      },
      "error.INTERNAL_SERVER_ERROR": {
        "type": "object",
        "properties": {
          "message": {
            "type": "string",
            "description": "The error message",
            "example": "Internal server error"
          },
          "code": {
            "type": "string",
            "description": "The error code",
            "example": "INTERNAL_SERVER_ERROR"
          },
          "issues": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "message": {
                  "type": "string"
                }
              },
              "required": [
                "message"
              ]
            },
            "description": "An array of issues that were responsible for the error",
            "example": []
          }
        },
        "required": [
          "message",
          "code"
        ],
        "title": "Internal server error error (500)",
        "description": "The error information",
        "example": {
          "code": "INTERNAL_SERVER_ERROR",
          "message": "Internal server error",
          "issues": []
        }
      },
      "Pagination": {
        "type": "object",
        "properties": {
          "before": {
            "type": "string",
            "nullable": true,
            "default": null
          },
          "after": {
            "type": "string",
            "nullable": true,
            "default": null
          }
        },
        "required": [
          "before",
          "after"
        ]
      },
      "Project": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string"
          },
          "title": {
            "type": "string"
          },
          "description": {
            "type": "string",
            "nullable": true
          },
          "type": {
            "type": "string",
            "enum": [
              "PROJECT",
              "COMPONENT"
            ]
          },
          "creator": {
            "type": "object",
            "properties": {
              "email": {
                "type": "string"
              }
            },
            "required": [
              "email"
            ]
          },
          "owner": {
            "type": "object",
            "properties": {
              "email": {
                "type": "string"
              }
            },
            "required": [
              "email"
            ]
          },
          "status": {
            "type": "object",
            "nullable": true,
            "properties": {
              "name": {
                "type": "string"
              }
            },
            "required": [
              "name"
            ]
          },
          "categories": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "name": {
                  "type": "string"
                },
                "description": {
                  "type": "string",
                  "nullable": true
                }
              },
              "required": [
                "name",
                "description"
              ]
            }
          },
          "reviews": {
            "type": "object",
            "properties": {
              "required": {
                "type": "boolean"
              }
            },
            "required": [
              "required"
            ]
          },
          "analytics": {
            "type": "object",
            "properties": {
              "appViews": {
                "type": "object",
                "properties": {
                  "allTime": {
                    "type": "integer"
                  },
                  "lastSevenDays": {
                    "type": "integer"
                  },
                  "lastFourteenDays": {
                    "type": "integer"
                  },
                  "lastThirtyDays": {
                    "type": "integer"
                  }
                },
                "required": [
                  "allTime",
                  "lastSevenDays",
                  "lastFourteenDays",
                  "lastThirtyDays"
                ]
              },
              "lastViewedAt": {
                "type": "string",
                "nullable": true
              },
              "publishedResultsUpdatedAt": {
                "type": "string",
                "nullable": true
              }
            },
            "required": [
              "appViews",
              "lastViewedAt",
              "publishedResultsUpdatedAt"
            ]
          },
          "lastEditedAt": {
            "type": "string"
          },
          "lastPublishedAt": {
            "type": "string",
            "nullable": true
          },
          "createdAt": {
            "type": "string"
          },
          "archivedAt": {
            "type": "string",
            "nullable": true
          },
          "trashedAt": {
            "type": "string",
            "nullable": true
          },
          "schedules": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "cadence": {
                  "type": "string",
                  "enum": [
                    "HOURLY",
                    "DAILY",
                    "WEEKLY",
                    "MONTHLY",
                    "CUSTOM"
                  ]
                },
                "enabled": {
                  "type": "boolean"
                },
                "hourly": {
                  "type": "object",
                  "nullable": true,
                  "properties": {
                    "minute": {
                      "type": "integer"
                    },
                    "timezone": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "minute",
                    "timezone"
                  ]
                },
                "daily": {
                  "type": "object",
                  "nullable": true,
                  "properties": {
                    "hour": {
                      "type": "integer"
                    },
                    "minute": {
                      "type": "integer"
                    },
                    "timezone": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "hour",
                    "minute",
                    "timezone"
                  ]
                },
                "weekly": {
                  "type": "object",
                  "nullable": true,
                  "properties": {
                    "dayOfWeek": {
                      "type": "string",
                      "enum": [
                        "SUNDAY",
                        "MONDAY",
                        "TUESDAY",
                        "WEDNESDAY",
                        "THURSDAY",
                        "FRIDAY",
                        "SATURDAY"
                      ]
                    },
                    "hour": {
                      "type": "integer"
                    },
                    "minute": {
                      "type": "integer"
                    },
                    "timezone": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "dayOfWeek",
                    "hour",
                    "minute",
                    "timezone"
                  ]
                },
                "monthly": {
                  "type": "object",
                  "nullable": true,
                  "properties": {
                    "day": {
                      "type": "integer"
                    },
                    "hour": {
                      "type": "integer"
                    },
                    "minute": {
                      "type": "integer"
                    },
                    "timezone": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "day",
                    "hour",
                    "minute",
                    "timezone"
                  ]
                },
                "custom": {
                  "type": "object",
                  "nullable": true,
                  "properties": {
                    "cron": {
                      "type": "string"
                    },
                    "timezone": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "cron",
                    "timezone"
                  ]
                }
              },
              "required": [
                "cadence",
                "enabled",
                "hourly",
                "daily",
                "weekly",
                "monthly",
                "custom"
              ]
            }
          },
          "sharing": {
            "$ref": "#/components/schemas/ProjectSharing"
          }
        },
        "required": [
          "id",
          "title",
          "description",
          "type",
          "creator",
          "owner",
          "status",
          "categories",
          "reviews",
          "analytics",
          "lastEditedAt",
          "lastPublishedAt",
          "createdAt",
          "archivedAt",
          "trashedAt",
          "schedules"
        ]
      },
      "ProjectSharing": {
        "type": "object",
        "properties": {
          "users": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "user": {
                  "type": "object",
                  "properties": {
                    "email": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "email"
                  ]
                },
                "access": {
                  "type": "string",
                  "enum": [
                    "NONE",
                    "APP_ONLY",
                    "CAN_VIEW",
                    "CAN_EDIT",
                    "FULL_ACCESS"
                  ]
                }
              },
              "required": [
                "user",
                "access"
              ]
            }
          },
          "collections": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "collection": {
                  "type": "object",
                  "properties": {
                    "name": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "name"
                  ]
                },
                "access": {
                  "type": "string",
                  "enum": [
                    "NONE",
                    "APP_ONLY",
                    "CAN_VIEW",
                    "CAN_EDIT",
                    "FULL_ACCESS"
                  ]
                }
              },
              "required": [
                "collection",
                "access"
              ]
            }
          },
          "groups": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "group": {
                  "type": "object",
                  "properties": {
                    "name": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "name"
                  ]
                },
                "access": {
                  "type": "string",
                  "enum": [
                    "NONE",
                    "APP_ONLY",
                    "CAN_VIEW",
                    "CAN_EDIT",
                    "FULL_ACCESS"
                  ]
                }
              },
              "required": [
                "group",
                "access"
              ]
            }
          },
          "workspace": {
            "type": "object",
            "properties": {
              "access": {
                "type": "string",
                "enum": [
                  "NONE",
                  "APP_ONLY",
                  "CAN_VIEW",
                  "CAN_EDIT",
                  "FULL_ACCESS"
                ]
              }
            },
            "required": [
              "access"
            ]
          },
          "publicWeb": {
            "type": "object",
            "properties": {
              "access": {
                "type": "string",
                "enum": [
                  "NONE",
                  "APP_ONLY",
                  "CAN_VIEW",
                  "CAN_EDIT",
                  "FULL_ACCESS"
                ]
              }
            },
            "required": [
              "access"
            ]
          },
          "support": {
            "type": "object",
            "properties": {
              "access": {
                "type": "string",
                "enum": [
                  "NONE",
                  "APP_ONLY",
                  "CAN_VIEW",
                  "CAN_EDIT",
                  "FULL_ACCESS"
                ]
              }
            },
            "required": [
              "access"
            ]
          }
        },
        "required": [
          "users",
          "collections",
          "groups",
          "workspace",
          "publicWeb",
          "support"
        ]
      },
      "ProjectRun": {
        "type": "object",
        "properties": {
          "projectId": {
            "type": "string"
          },
          "projectVersion": {
            "type": "string",
            "description": "The project version that was run. Numeric versions are ordered starting at \"1\"; notebook runs use \"draft\"."
          },
          "runId": {
            "type": "string"
          },
          "runUrl": {
            "type": "string"
          },
          "status": {
            "type": "string",
            "enum": [
              "PENDING",
              "RUNNING",
              "ERRORED",
              "COMPLETED",
              "KILLED",
              "UNABLE_TO_ALLOCATE_KERNEL"
            ]
          },
          "runTrigger": {
            "type": "string",
            "enum": [
              "API",
              "SCHEDULED",
              "APP_REFRESH"
            ]
          },
          "startTime": {
            "type": "string",
            "nullable": true
          },
          "endTime": {
            "type": "string",
            "nullable": true
          },
          "elapsedTime": {
            "type": "number",
            "nullable": true
          },
          "flagConfigOverride": {
            "type": "string"
          },
          "traceId": {
            "type": "string"
          },
          "notifications": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ProjectRunNotificationRecipient"
            }
          },
          "stateEvents": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ProjectRunStateEvent"
            }
          }
        },
        "required": [
          "projectId",
          "projectVersion",
          "runId",
          "runUrl",
          "status",
          "runTrigger",
          "startTime",
          "endTime",
          "elapsedTime",
          "traceId"
        ]
      },
      "ProjectRunNotificationRecipient": {
        "type": "object",
        "properties": {
          "type": {
            "type": "string",
            "enum": [
              "SUCCESS",
              "FAILURE",
              "ALL"
            ]
          },
          "subject": {
            "type": "string"
          },
          "body": {
            "type": "string"
          },
          "recipientType": {
            "type": "string",
            "enum": [
              "USER",
              "GROUP",
              "SLACK_CHANNEL"
            ]
          },
          "includeSuccessScreenshot": {
            "type": "boolean"
          },
          "screenshotFormat": {
            "type": "array",
            "items": {
              "type": "string",
              "enum": [
                "png",
                "pdf"
              ]
            }
          },
          "recipient": {
            "$ref": "#/components/schemas/NotificationRecipient"
          }
        },
        "required": [
          "type",
          "recipientType",
          "includeSuccessScreenshot",
          "recipient"
        ]
      },
      "NotificationRecipient": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string"
          },
          "name": {
            "type": "string"
          },
          "isPrivate": {
            "type": "boolean"
          }
        },
        "required": [
          "id",
          "name"
        ]
      },
      "ProjectRunStateEvent": {
        "type": "object",
        "properties": {
          "type": {
            "type": "string"
          },
          "value": {
            "type": "string"
          },
          "timestamp": {
            "type": "string"
          }
        },
        "required": [
          "type",
          "value",
          "timestamp"
        ]
      },
      "error.UNPROCESSABLE_CONTENT": {
        "type": "object",
        "properties": {
          "message": {
            "type": "string",
            "description": "The error message",
            "example": "Unprocessable content"
          },
          "code": {
            "type": "string",
            "description": "The error code",
            "example": "UNPROCESSABLE_CONTENT"
          },
          "issues": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "message": {
                  "type": "string"
                }
              },
              "required": [
                "message"
              ]
            },
            "description": "An array of issues that were responsible for the error",
            "example": []
          }
        },
        "required": [
          "message",
          "code"
        ],
        "title": "Unprocessable content error (422)",
        "description": "The error information",
        "example": {
          "code": "UNPROCESSABLE_CONTENT",
          "message": "Unprocessable content",
          "issues": []
        }
      },
      "error.SERVICE_UNAVAILABLE": {
        "type": "object",
        "properties": {
          "message": {
            "type": "string",
            "description": "The error message",
            "example": "Service unavailable"
          },
          "code": {
            "type": "string",
            "description": "The error code",
            "example": "SERVICE_UNAVAILABLE"
          },
          "issues": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "message": {
                  "type": "string"
                }
              },
              "required": [
                "message"
              ]
            },
            "description": "An array of issues that were responsible for the error",
            "example": []
          }
        },
        "required": [
          "message",
          "code"
        ],
        "title": "Service unavailable error (503)",
        "description": "The error information",
        "example": {
          "code": "SERVICE_UNAVAILABLE",
          "message": "Service unavailable",
          "issues": []
        }
      },
      "DataConnection": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string"
          },
          "name": {
            "type": "string"
          },
          "type": {
            "type": "string",
            "enum": [
              "athena",
              "bigquery",
              "clickhouse",
              "databricks",
              "postgres",
              "redshift",
              "snowflake",
              "trino"
            ]
          },
          "description": {
            "type": "string"
          },
          "connectionDetails": {
            "nullable": true,
            "anyOf": [
              {
                "type": "object",
                "properties": {
                  "athena": {
                    "type": "object",
                    "properties": {
                      "hostname": {
                        "type": "string"
                      },
                      "port": {
                        "type": "number"
                      },
                      "s3OutputPath": {
                        "type": "string"
                      },
                      "catalog": {
                        "type": "string",
                        "nullable": true
                      },
                      "workgroup": {
                        "type": "string",
                        "nullable": true
                      },
                      "accessKeyId": {
                        "type": "string"
                      }
                    }
                  }
                },
                "required": [
                  "athena"
                ]
              },
              {
                "type": "object",
                "properties": {
                  "bigquery": {
                    "type": "object",
                    "properties": {
                      "projectId": {
                        "type": "string"
                      },
                      "enableDriveAccess": {
                        "type": "boolean"
                      },
                      "enableStorageApi": {
                        "type": "boolean"
                      }
                    }
                  }
                },
                "required": [
                  "bigquery"
                ]
              },
              {
                "type": "object",
                "properties": {
                  "clickhouse": {
                    "type": "object",
                    "properties": {
                      "hostname": {
                        "type": "string"
                      },
                      "port": {
                        "type": "number"
                      },
                      "username": {
                        "type": "string"
                      }
                    }
                  }
                },
                "required": [
                  "clickhouse"
                ]
              },
              {
                "type": "object",
                "properties": {
                  "databricks": {
                    "type": "object",
                    "properties": {
                      "jdbcUrl": {
                        "type": "string"
                      }
                    }
                  }
                },
                "required": [
                  "databricks"
                ]
              },
              {
                "type": "object",
                "properties": {
                  "postgres": {
                    "type": "object",
                    "properties": {
                      "hostname": {
                        "type": "string"
                      },
                      "port": {
                        "type": "number"
                      },
                      "database": {
                        "type": "string"
                      },
                      "username": {
                        "type": "string"
                      }
                    }
                  }
                },
                "required": [
                  "postgres"
                ]
              },
              {
                "type": "object",
                "properties": {
                  "redshift": {
                    "type": "object",
                    "properties": {
                      "host": {
                        "type": "string"
                      },
                      "port": {
                        "type": "number"
                      },
                      "database": {
                        "type": "string"
                      },
                      "username": {
                        "type": "string"
                      }
                    }
                  }
                },
                "required": [
                  "redshift"
                ]
              },
              {
                "type": "object",
                "properties": {
                  "snowflake": {
                    "type": "object",
                    "properties": {
                      "accountName": {
                        "type": "string"
                      },
                      "warehouse": {
                        "type": "string"
                      },
                      "database": {
                        "type": "string"
                      },
                      "schema": {
                        "type": "string",
                        "nullable": true
                      },
                      "username": {
                        "type": "string"
                      },
                      "role": {
                        "type": "string",
                        "nullable": true
                      }
                    }
                  }
                },
                "required": [
                  "snowflake"
                ]
              },
              {
                "type": "object",
                "properties": {
                  "trino": {
                    "type": "object",
                    "properties": {
                      "hostname": {
                        "type": "string"
                      },
                      "port": {
                        "type": "number"
                      },
                      "catalog": {
                        "type": "string"
                      },
                      "schema": {
                        "type": "string"
                      },
                      "username": {
                        "type": "string"
                      },
                      "sessionProperties": {
                        "type": "array",
                        "items": {
                          "type": "object",
                          "properties": {
                            "key": {
                              "type": "string"
                            },
                            "value": {
                              "type": "string"
                            }
                          },
                          "required": [
                            "key",
                            "value"
                          ]
                        }
                      }
                    }
                  }
                },
                "required": [
                  "trino"
                ]
              }
            ]
          },
          "connectViaSsh": {
            "type": "boolean"
          },
          "includeMagic": {
            "type": "boolean"
          },
          "allowWritebackCells": {
            "type": "boolean"
          },
          "schemaFilters": {
            "type": "object",
            "properties": {
              "databases": {
                "type": "object",
                "properties": {
                  "include": {
                    "type": "object",
                    "properties": {
                      "matchType": {
                        "type": "string",
                        "enum": [
                          "EXACT",
                          "PREFIX",
                          "REGEX",
                          "SUFFIX"
                        ]
                      },
                      "values": {
                        "type": "array",
                        "items": {
                          "type": "string"
                        }
                      }
                    },
                    "required": [
                      "matchType",
                      "values"
                    ]
                  },
                  "exclude": {
                    "type": "object",
                    "properties": {
                      "matchType": {
                        "type": "string",
                        "enum": [
                          "EXACT",
                          "PREFIX",
                          "REGEX",
                          "SUFFIX"
                        ]
                      },
                      "values": {
                        "type": "array",
                        "items": {
                          "type": "string"
                        }
                      }
                    },
                    "required": [
                      "matchType",
                      "values"
                    ]
                  }
                }
              },
              "schemas": {
                "type": "object",
                "properties": {
                  "include": {
                    "type": "object",
                    "properties": {
                      "matchType": {
                        "type": "string",
                        "enum": [
                          "EXACT",
                          "PREFIX",
                          "REGEX",
                          "SUFFIX"
                        ]
                      },
                      "values": {
                        "type": "array",
                        "items": {
                          "type": "string"
                        }
                      }
                    },
                    "required": [
                      "matchType",
                      "values"
                    ]
                  },
                  "exclude": {
                    "type": "object",
                    "properties": {
                      "matchType": {
                        "type": "string",
                        "enum": [
                          "EXACT",
                          "PREFIX",
                          "REGEX",
                          "SUFFIX"
                        ]
                      },
                      "values": {
                        "type": "array",
                        "items": {
                          "type": "string"
                        }
                      }
                    },
                    "required": [
                      "matchType",
                      "values"
                    ]
                  }
                }
              },
              "tables": {
                "type": "object",
                "properties": {
                  "include": {
                    "type": "object",
                    "properties": {
                      "matchType": {
                        "type": "string",
                        "enum": [
                          "EXACT",
                          "PREFIX",
                          "REGEX",
                          "SUFFIX"
                        ]
                      },
                      "values": {
                        "type": "array",
                        "items": {
                          "type": "string"
                        }
                      }
                    },
                    "required": [
                      "matchType",
                      "values"
                    ]
                  },
                  "exclude": {
                    "type": "object",
                    "properties": {
                      "matchType": {
                        "type": "string",
                        "enum": [
                          "EXACT",
                          "PREFIX",
                          "REGEX",
                          "SUFFIX"
                        ]
                      },
                      "values": {
                        "type": "array",
                        "items": {
                          "type": "string"
                        }
                      }
                    },
                    "required": [
                      "matchType",
                      "values"
                    ]
                  }
                }
              }
            }
          },
          "schemaRefreshSchedule": {
            "type": "object",
            "properties": {
              "cadence": {
                "type": "string",
                "enum": [
                  "HOURLY",
                  "DAILY",
                  "WEEKLY",
                  "MONTHLY",
                  "CUSTOM"
                ]
              },
              "enabled": {
                "type": "boolean"
              },
              "daily": {
                "type": "object",
                "nullable": true,
                "properties": {
                  "hour": {
                    "type": "integer"
                  },
                  "minute": {
                    "type": "integer"
                  },
                  "timezoneString": {
                    "type": "string"
                  }
                },
                "required": [
                  "hour",
                  "minute",
                  "timezoneString"
                ]
              },
              "weekly": {
                "type": "object",
                "nullable": true,
                "properties": {
                  "dayOfWeek": {
                    "type": "string",
                    "enum": [
                      "SUNDAY",
                      "MONDAY",
                      "TUESDAY",
                      "WEDNESDAY",
                      "THURSDAY",
                      "FRIDAY",
                      "SATURDAY"
                    ]
                  },
                  "hour": {
                    "type": "integer"
                  },
                  "minute": {
                    "type": "integer"
                  },
                  "timezoneString": {
                    "type": "string"
                  }
                },
                "required": [
                  "dayOfWeek",
                  "hour",
                  "minute",
                  "timezoneString"
                ]
              },
              "monthly": {
                "type": "object",
                "nullable": true,
                "properties": {
                  "day": {
                    "type": "integer"
                  },
                  "hour": {
                    "type": "integer"
                  },
                  "minute": {
                    "type": "integer"
                  },
                  "timezoneString": {
                    "type": "string"
                  }
                },
                "required": [
                  "day",
                  "hour",
                  "minute",
                  "timezoneString"
                ]
              },
              "custom": {
                "type": "object",
                "nullable": true,
                "properties": {
                  "cron": {
                    "type": "string"
                  },
                  "timezoneString": {
                    "type": "string"
                  }
                },
                "required": [
                  "cron",
                  "timezoneString"
                ]
              }
            },
            "required": [
              "cadence",
              "enabled"
            ]
          },
          "schemaRefreshAccess": {
            "type": "string",
            "enum": [
              "ADMINS",
              "USERS_WITH_QUERY_ACCESS"
            ]
          },
          "sharing": {
            "type": "object",
            "properties": {
              "groups": {
                "type": "array",
                "items": {
                  "type": "object",
                  "properties": {
                    "group": {
                      "type": "object",
                      "properties": {
                        "id": {
                          "type": "string"
                        },
                        "name": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "id",
                        "name"
                      ]
                    },
                    "access": {
                      "type": "string",
                      "enum": [
                        "NONE",
                        "QUERY",
                        "VIEW_RESULTS"
                      ]
                    }
                  },
                  "required": [
                    "group",
                    "access"
                  ]
                }
              },
              "workspace": {
                "type": "object",
                "properties": {
                  "members": {
                    "type": "string",
                    "enum": [
                      "NONE",
                      "QUERY",
                      "VIEW_RESULTS"
                    ]
                  },
                  "guests": {
                    "type": "string",
                    "enum": [
                      "NONE",
                      "QUERY",
                      "VIEW_RESULTS"
                    ]
                  },
                  "public": {
                    "type": "string",
                    "enum": [
                      "NONE",
                      "QUERY",
                      "VIEW_RESULTS"
                    ]
                  }
                }
              }
            }
          }
        },
        "required": [
          "id",
          "name",
          "type",
          "connectionDetails",
          "connectViaSsh",
          "includeMagic",
          "allowWritebackCells",
          "schemaRefreshAccess",
          "sharing"
        ]
      },
      "DataConnectionBasic": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string"
          },
          "name": {
            "type": "string"
          },
          "type": {
            "type": "string",
            "enum": [
              "athena",
              "bigquery",
              "clickhouse",
              "databricks",
              "postgres",
              "redshift",
              "snowflake",
              "trino"
            ]
          },
          "description": {
            "type": "string"
          }
        },
        "required": [
          "id",
          "name",
          "type"
        ]
      },
      "ProjectRunNotification": {
        "type": "object",
        "properties": {
          "type": {
            "type": "string",
            "enum": [
              "SUCCESS",
              "FAILURE",
              "ALL"
            ]
          },
          "includeSuccessScreenshot": {
            "type": "boolean"
          },
          "screenshotFormat": {
            "type": "string",
            "enum": [
              "png",
              "pdf"
            ]
          },
          "slackChannelIds": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "userIds": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "groupIds": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "subject": {
            "type": "string"
          },
          "body": {
            "type": "string"
          }
        },
        "required": [
          "type",
          "includeSuccessScreenshot"
        ]
      },
      "RunProjectRequestBody": {
        "type": "object",
        "properties": {
          "inputParams": {
            "type": "object",
            "additionalProperties": {},
            "description": "Published app input values keyed by variable name."
          },
          "dryRun": {
            "type": "boolean",
            "default": false,
            "description": "Validate the request without starting a run."
          },
          "updateCache": {
            "type": "boolean",
            "description": "`updateCache` is deprecated. Please use the new `updatePublishedResults` and `useCachedSqlResults` parameters instead. When true, published results are updated and cached SQL results are not used. When false, published results are not updated and cached SQL results may be used."
          },
          "notifications": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ProjectRunNotification"
            }
          },
          "updatePublishedResults": {
            "type": "boolean",
            "default": false,
            "description": "Update the published app with the run results."
          },
          "useCachedSqlResults": {
            "type": "boolean",
            "default": true,
            "description": "Allow SQL cells to reuse cached results."
          },
          "viewId": {
            "type": "string",
            "description": "Use the inputs from this saved view."
          }
        }
      }
    },
    "responses": {},
    "parameters": {},
    "examples": {},
    "requestBodies": {},
    "headers": {},
    "securitySchemes": {
      "bearerAuth": {
        "type": "http",
        "scheme": "bearer"
      }
    }
  }