{
  "openapi": "3.0.4",
  "info": {
    "title": "Datlo Apicultor API",
    "version": "v1"
  },
  "paths": {
    "/admin/bigquery-schema": {
      "get": {
        "tags": [
          "AdminBigQuery"
        ],
        "parameters": [
          {
            "name": "table_id",
            "in": "query",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponse_GetBigQuerySchemaResult"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponse_GetBigQuerySchemaResult"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponse_GetBigQuerySchemaResult"
                }
              }
            }
          }
        }
      }
    },
    "/admin/datasets": {
      "get": {
        "tags": [
          "AdminDatasets"
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponse_IReadOnlyList_GetDatasetResult"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponse_IReadOnlyList_GetDatasetResult"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponse_IReadOnlyList_GetDatasetResult"
                }
              }
            }
          }
        }
      },
      "post": {
        "tags": [
          "AdminDatasets"
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CreateDatasetCommand"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/CreateDatasetCommand"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/CreateDatasetCommand"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponse_GetDatasetResult"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponse_GetDatasetResult"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponse_GetDatasetResult"
                }
              }
            }
          }
        }
      }
    },
    "/admin/datasets/{id}": {
      "get": {
        "tags": [
          "AdminDatasets"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponse_GetDatasetResult"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponse_GetDatasetResult"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponse_GetDatasetResult"
                }
              }
            }
          }
        }
      },
      "patch": {
        "tags": [
          "AdminDatasets"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/UpdateDatasetRequest"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/UpdateDatasetRequest"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/UpdateDatasetRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponse_GetDatasetResult"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponse_GetDatasetResult"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponse_GetDatasetResult"
                }
              }
            }
          }
        }
      },
      "delete": {
        "tags": [
          "AdminDatasets"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponse"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponse"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponse"
                }
              }
            }
          }
        }
      }
    },
    "/admin/datasets/{id}/metadata-sync": {
      "post": {
        "tags": [
          "AdminDatasets"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponse"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponse"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponse"
                }
              }
            }
          }
        }
      }
    },
    "/admin/endpoints": {
      "get": {
        "tags": [
          "AdminEndpoints"
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponse_IReadOnlyList_EndpointResult"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponse_IReadOnlyList_EndpointResult"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponse_IReadOnlyList_EndpointResult"
                }
              }
            }
          }
        }
      },
      "post": {
        "tags": [
          "AdminEndpoints"
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CreateEndpointCommand"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/CreateEndpointCommand"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/CreateEndpointCommand"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponse_EndpointResult"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponse_EndpointResult"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponse_EndpointResult"
                }
              }
            }
          }
        }
      }
    },
    "/admin/endpoints/{id}": {
      "get": {
        "tags": [
          "AdminEndpoints"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponse_EndpointResult"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponse_EndpointResult"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponse_EndpointResult"
                }
              }
            }
          }
        }
      },
      "put": {
        "tags": [
          "AdminEndpoints"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/UpdateEndpointRequest"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/UpdateEndpointRequest"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/UpdateEndpointRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponse_EndpointResult"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponse_EndpointResult"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponse_EndpointResult"
                }
              }
            }
          }
        }
      },
      "delete": {
        "tags": [
          "AdminEndpoints"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponse"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponse"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponse"
                }
              }
            }
          }
        }
      }
    },
    "/admin/endpoints/{id}/enable": {
      "post": {
        "tags": [
          "AdminEndpoints"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponse"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponse"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponse"
                }
              }
            }
          }
        }
      }
    },
    "/admin/endpoints/{id}/disable": {
      "post": {
        "tags": [
          "AdminEndpoints"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponse"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponse"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponse"
                }
              }
            }
          }
        }
      }
    },
    "/data/v{version}/{endpoint}": {
      "post": {
        "tags": [
          "DataQuery"
        ],
        "parameters": [
          {
            "name": "version",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          },
          {
            "name": "endpoint",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/DataQueryRequest"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/DataQueryRequest"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/DataQueryRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/IDataQueryResponse"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/IDataQueryResponse"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/IDataQueryResponse"
                }
              }
            }
          }
        }
      }
    },
    "/.well-known/oauth-protected-resource/mcp": {
      "get": {
        "tags": [
          "Datlo.Apicultor.Api"
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/openapi/openapi.json": {
      "get": {
        "tags": [
          "OpenApi"
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    }
  },
  "components": {
    "schemas": {
      "ApiError": {
        "type": "object",
        "properties": {
          "code": {
            "type": "string",
            "nullable": true
          },
          "message": {
            "type": "string",
            "nullable": true
          },
          "field": {
            "type": "string",
            "nullable": true
          }
        },
        "additionalProperties": false
      },
      "ApiResponse": {
        "type": "object",
        "properties": {
          "success": {
            "type": "boolean"
          },
          "message": {
            "type": "string",
            "nullable": true
          },
          "data": {
            "nullable": true
          },
          "errors": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ApiError"
            },
            "nullable": true
          }
        },
        "additionalProperties": false
      },
      "ApiResponse_EndpointResult": {
        "type": "object",
        "properties": {
          "success": {
            "type": "boolean"
          },
          "message": {
            "type": "string",
            "nullable": true
          },
          "data": {
            "$ref": "#/components/schemas/EndpointResult"
          },
          "errors": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ApiError"
            },
            "nullable": true
          }
        },
        "additionalProperties": false
      },
      "ApiResponse_GetBigQuerySchemaResult": {
        "type": "object",
        "properties": {
          "success": {
            "type": "boolean"
          },
          "message": {
            "type": "string",
            "nullable": true
          },
          "data": {
            "$ref": "#/components/schemas/GetBigQuerySchemaResult"
          },
          "errors": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ApiError"
            },
            "nullable": true
          }
        },
        "additionalProperties": false
      },
      "ApiResponse_GetDatasetResult": {
        "type": "object",
        "properties": {
          "success": {
            "type": "boolean"
          },
          "message": {
            "type": "string",
            "nullable": true
          },
          "data": {
            "$ref": "#/components/schemas/GetDatasetResult"
          },
          "errors": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ApiError"
            },
            "nullable": true
          }
        },
        "additionalProperties": false
      },
      "ApiResponse_IReadOnlyList_EndpointResult": {
        "type": "object",
        "properties": {
          "success": {
            "type": "boolean"
          },
          "message": {
            "type": "string",
            "nullable": true
          },
          "data": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/EndpointResult"
            },
            "nullable": true
          },
          "errors": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ApiError"
            },
            "nullable": true
          }
        },
        "additionalProperties": false
      },
      "ApiResponse_IReadOnlyList_GetDatasetResult": {
        "type": "object",
        "properties": {
          "success": {
            "type": "boolean"
          },
          "message": {
            "type": "string",
            "nullable": true
          },
          "data": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/GetDatasetResult"
            },
            "nullable": true
          },
          "errors": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ApiError"
            },
            "nullable": true
          }
        },
        "additionalProperties": false
      },
      "BigQuerySchemaColumnResponse": {
        "type": "object",
        "properties": {
          "name": {
            "type": "string",
            "nullable": true
          },
          "data_schema": { },
          "description": {
            "type": "string",
            "nullable": true
          }
        },
        "additionalProperties": false
      },
      "CreateDatasetCommand": {
        "type": "object",
        "properties": {
          "name": {
            "type": "string",
            "nullable": true
          },
          "table_name": {
            "type": "string",
            "nullable": true
          },
          "bigquery_table_reference": {
            "type": "string",
            "nullable": true
          },
          "description": {
            "type": "string",
            "nullable": true
          },
          "fields": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/CreateDatasetFieldCommand"
            },
            "nullable": true
          }
        },
        "additionalProperties": false
      },
      "CreateDatasetFieldCommand": {
        "type": "object",
        "properties": {
          "column_name": {
            "type": "string",
            "nullable": true
          },
          "name": {
            "type": "string",
            "nullable": true
          },
          "title": {
            "type": "string",
            "nullable": true
          },
          "data_schema": { },
          "description": {
            "type": "string",
            "nullable": true
          },
          "is_key": {
            "type": "boolean"
          },
          "supports_null_check": {
            "type": "boolean"
          },
          "type": {
            "$ref": "#/components/schemas/DatasetFieldType"
          }
        },
        "additionalProperties": false
      },
      "CreateEndpointCommand": {
        "type": "object",
        "properties": {
          "dataset_id": {
            "type": "string",
            "format": "uuid"
          },
          "version": {
            "type": "integer",
            "format": "int32"
          },
          "name": {
            "type": "string",
            "nullable": true
          },
          "route": {
            "type": "string",
            "nullable": true
          },
          "description": {
            "type": "string",
            "nullable": true
          },
          "type": {
            "$ref": "#/components/schemas/EndpointType"
          },
          "credits_per_result": {
            "type": "integer",
            "format": "int32"
          },
          "fields": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/EndpointFieldCommand"
            },
            "nullable": true
          },
          "tool": {
            "$ref": "#/components/schemas/EndpointToolInput"
          }
        },
        "additionalProperties": false
      },
      "DataQueryFilterRequest": {
        "type": "object",
        "properties": {
          "field": {
            "type": "string",
            "nullable": true
          },
          "operator": {
            "type": "string",
            "nullable": true
          },
          "value": {
            "nullable": true
          },
          "values": {
            "type": "array",
            "items": { },
            "nullable": true
          },
          "range": {
            "$ref": "#/components/schemas/DataQueryRangeRequest"
          }
        },
        "additionalProperties": false
      },
      "DataQueryRangeRequest": {
        "type": "object",
        "properties": {
          "min": {
            "nullable": true
          },
          "max": {
            "nullable": true
          }
        },
        "additionalProperties": false
      },
      "DataQueryRequest": {
        "type": "object",
        "properties": {
          "filters": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/DataQueryFilterRequest"
            },
            "nullable": true
          },
          "fields": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "nullable": true
          },
          "limit": {
            "type": "integer",
            "format": "int32",
            "nullable": true
          },
          "cursor": {
            "type": "string",
            "nullable": true
          }
        },
        "additionalProperties": false
      },
      "DatasetFieldResponse": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "dataset_id": {
            "type": "string",
            "format": "uuid"
          },
          "position": {
            "type": "integer",
            "format": "int32"
          },
          "column_name": {
            "type": "string",
            "nullable": true
          },
          "name": {
            "type": "string",
            "nullable": true
          },
          "title": {
            "type": "string",
            "nullable": true
          },
          "data_schema": { },
          "description": {
            "type": "string",
            "nullable": true
          },
          "is_key": {
            "type": "boolean"
          },
          "supports_null_check": {
            "type": "boolean"
          },
          "type": {
            "$ref": "#/components/schemas/DatasetFieldType"
          },
          "numeric_minimum": {
            "type": "number",
            "format": "double",
            "nullable": true
          },
          "numeric_maximum": {
            "type": "number",
            "format": "double",
            "nullable": true
          },
          "date_minimum": {
            "type": "string",
            "format": "date-time",
            "nullable": true
          },
          "date_maximum": {
            "type": "string",
            "format": "date-time",
            "nullable": true
          },
          "metadata_sync_status": {
            "$ref": "#/components/schemas/MetadataSyncStatus"
          },
          "metadata_updated_at": {
            "type": "string",
            "format": "date-time",
            "nullable": true
          },
          "metadata_sync_error": {
            "type": "string",
            "nullable": true
          },
          "created_at": {
            "type": "string",
            "format": "date-time"
          },
          "updated_at": {
            "type": "string",
            "format": "date-time",
            "nullable": true
          }
        },
        "additionalProperties": false
      },
      "DatasetFieldSummaryResult": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "name": {
            "type": "string",
            "nullable": true
          },
          "column_name": {
            "type": "string",
            "nullable": true
          },
          "title": {
            "type": "string",
            "nullable": true
          },
          "data_schema": { },
          "is_key": {
            "type": "boolean"
          },
          "supports_null_check": {
            "type": "boolean"
          }
        },
        "additionalProperties": false
      },
      "DatasetFieldType": {
        "enum": [
          "text",
          "category",
          "numeric",
          "date",
          "date_time",
          "boolean",
          "geometry",
          "object",
          "array"
        ],
        "type": "string"
      },
      "EndpointFieldCommand": {
        "type": "object",
        "properties": {
          "dataset_field_id": {
            "type": "string",
            "format": "uuid"
          },
          "role": {
            "$ref": "#/components/schemas/EndpointFieldRole"
          },
          "is_required": {
            "type": "boolean",
            "nullable": true
          },
          "filter_type": {
            "$ref": "#/components/schemas/FilterType"
          },
          "filter_semantic_type": {
            "$ref": "#/components/schemas/FilterSemanticType"
          },
          "supports_null_check": {
            "type": "boolean"
          }
        },
        "additionalProperties": false
      },
      "EndpointFieldResult": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "endpoint_id": {
            "type": "string",
            "format": "uuid"
          },
          "dataset_field_id": {
            "type": "string",
            "format": "uuid"
          },
          "role": {
            "$ref": "#/components/schemas/EndpointFieldRole"
          },
          "is_required": {
            "type": "boolean",
            "nullable": true
          },
          "position": {
            "type": "integer",
            "format": "int32"
          },
          "filter_type": {
            "$ref": "#/components/schemas/FilterType"
          },
          "filter_semantic_type": {
            "$ref": "#/components/schemas/FilterSemanticType"
          },
          "supports_null_check": {
            "type": "boolean"
          },
          "created_at": {
            "type": "string",
            "format": "date-time"
          },
          "updated_at": {
            "type": "string",
            "format": "date-time",
            "nullable": true
          },
          "dataset_field": {
            "$ref": "#/components/schemas/DatasetFieldSummaryResult"
          }
        },
        "additionalProperties": false
      },
      "EndpointFieldRole": {
        "enum": [
          "query",
          "response",
          "both"
        ],
        "type": "string"
      },
      "EndpointIndexingStatus": {
        "enum": [
          "ready",
          "processing",
          "failed"
        ],
        "type": "string"
      },
      "EndpointResult": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "dataset_id": {
            "type": "string",
            "format": "uuid"
          },
          "version": {
            "type": "integer",
            "format": "int32"
          },
          "name": {
            "type": "string",
            "nullable": true
          },
          "route": {
            "type": "string",
            "nullable": true
          },
          "description": {
            "type": "string",
            "nullable": true
          },
          "type": {
            "$ref": "#/components/schemas/EndpointType"
          },
          "status": {
            "$ref": "#/components/schemas/EndpointStatus"
          },
          "indexing_status": {
            "$ref": "#/components/schemas/EndpointIndexingStatus"
          },
          "indexing_error_message": {
            "type": "string",
            "nullable": true
          },
          "credits_per_result": {
            "type": "integer",
            "format": "int32"
          },
          "tool": {
            "$ref": "#/components/schemas/EndpointToolResult"
          },
          "fields": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/EndpointFieldResult"
            },
            "nullable": true
          },
          "created_at": {
            "type": "string",
            "format": "date-time"
          },
          "updated_at": {
            "type": "string",
            "format": "date-time",
            "nullable": true
          }
        },
        "additionalProperties": false
      },
      "EndpointStatus": {
        "enum": [
          "disabled",
          "enabled"
        ],
        "type": "string"
      },
      "EndpointToolInput": {
        "type": "object",
        "properties": {
          "name": {
            "type": "string",
            "nullable": true
          },
          "description": {
            "type": "string",
            "nullable": true
          }
        },
        "additionalProperties": false
      },
      "EndpointToolResult": {
        "type": "object",
        "properties": {
          "name": {
            "type": "string",
            "nullable": true
          },
          "description": {
            "type": "string",
            "nullable": true
          }
        },
        "additionalProperties": false
      },
      "EndpointType": {
        "enum": [
          "lookup",
          "filter"
        ],
        "type": "string"
      },
      "FilterSemanticType": {
        "enum": [
          "category",
          "text"
        ],
        "type": "string"
      },
      "FilterType": {
        "enum": [
          "list",
          "relational",
          "value"
        ],
        "type": "string"
      },
      "GetBigQuerySchemaResult": {
        "type": "object",
        "properties": {
          "table_id": {
            "type": "string",
            "nullable": true
          },
          "description": {
            "type": "string",
            "nullable": true
          },
          "columns": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/BigQuerySchemaColumnResponse"
            },
            "nullable": true
          }
        },
        "additionalProperties": false
      },
      "GetDatasetResult": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "name": {
            "type": "string",
            "nullable": true
          },
          "table_name": {
            "type": "string",
            "nullable": true
          },
          "bigquery_table_reference": {
            "type": "string",
            "nullable": true
          },
          "description": {
            "type": "string",
            "nullable": true
          },
          "created_at": {
            "type": "string",
            "format": "date-time"
          },
          "updated_at": {
            "type": "string",
            "format": "date-time",
            "nullable": true
          },
          "fields": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/DatasetFieldResponse"
            },
            "nullable": true
          }
        },
        "additionalProperties": false
      },
      "IDataQueryResponse": {
        "type": "object",
        "additionalProperties": false
      },
      "MetadataSyncStatus": {
        "enum": [
          "not_synced",
          "pending",
          "processing",
          "completed",
          "failed"
        ],
        "type": "string"
      },
      "UpdateDatasetFieldCommand": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid",
            "nullable": true
          },
          "name": {
            "type": "string",
            "nullable": true
          },
          "title": {
            "type": "string",
            "nullable": true
          },
          "description": {
            "type": "string",
            "nullable": true
          },
          "supports_null_check": {
            "type": "boolean"
          },
          "type": {
            "$ref": "#/components/schemas/DatasetFieldType"
          }
        },
        "additionalProperties": false
      },
      "UpdateDatasetRequest": {
        "type": "object",
        "properties": {
          "name": {
            "type": "string",
            "nullable": true
          },
          "description": {
            "type": "string",
            "nullable": true
          },
          "fields": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/UpdateDatasetFieldCommand"
            },
            "nullable": true
          }
        },
        "additionalProperties": false
      },
      "UpdateEndpointRequest": {
        "type": "object",
        "properties": {
          "version": {
            "type": "integer",
            "format": "int32"
          },
          "name": {
            "type": "string",
            "nullable": true
          },
          "route": {
            "type": "string",
            "nullable": true
          },
          "description": {
            "type": "string",
            "nullable": true
          },
          "type": {
            "$ref": "#/components/schemas/EndpointType"
          },
          "credits_per_result": {
            "type": "integer",
            "format": "int32"
          },
          "fields": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/EndpointFieldCommand"
            },
            "nullable": true
          },
          "tool": {
            "$ref": "#/components/schemas/EndpointToolInput"
          }
        },
        "additionalProperties": false
      }
    },
    "securitySchemes": {
      "Bearer": {
        "type": "http",
        "description": "JWT: Bearer {token}",
        "scheme": "bearer",
        "bearerFormat": "JWT"
      }
    }
  },
  "tags": [
    {
      "name": "AdminBigQuery"
    },
    {
      "name": "AdminDatasets"
    },
    {
      "name": "AdminEndpoints"
    },
    {
      "name": "DataQuery"
    },
    {
      "name": "Datlo.Apicultor.Api"
    },
    {
      "name": "OpenApi"
    }
  ]
}