{
  "openapi": "3.0.0",
  "info": {
    "title": "Feishu API Integration",
    "description": "API to interact with Feishu for token retrieval, field data fetching, and record management",
    "version": "1.0.0"
  },
  "servers": [
    {
      "url": "填入自己的url",
      "description": "Main server"
    }
  ],
  "paths": {
    "/get-access-token": {
      "get": {
        "description": "Retrieves a Feishu access token.",
        "summary": "Get Access Token",
        "operationId": "getAccessToken_get",
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {}
              }
            }
          }
        },
        "security": [
          {
            "APIKeyHeader": []
          }
        ]
      }
    },
    "/get-fields": {
      "get": {
        "description": "Fetches field data from Feishu.",
        "summary": "Get Fields",
        "operationId": "getFields_get",
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {}
              }
            }
          }
        },
        "security": [
          {
            "APIKeyHeader": []
          }
        ]
      }
    },
    "/list-records": {
      "get": {
        "summary": "List Records",
        "operationId": "list_records_get",
        "security": [
          {
            "APIKeyHeader": []
          }
        ],
        "parameters": [
          {
            "name": "filter",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "title": "Filter"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {}
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/gpt-update-record": {
      "post": {
        "summary": "Gpt Update Record",
        "operationId": "gpt_update_record_post",
        "x-openai-isConsequential": "false",
        "parameters": [
          {
            "name": "record_id",
            "in": "body",
            "required": true,
            "schema": {
              "type": "string",
              "title": "Record Id"
            }
          },
          {
            "name": "update_fields",
            "in": "body",
            "required": true,
            "schema": {
              "type": "json"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {}
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        },
        "security": [
          {
            "APIKeyHeader": []
          }
        ]
      }
    },
    "/gpt-delete-record": {
      "post": {
        "summary": "Gpt Delete Record",
        "operationId": "gpt_delete_record_post",
        "x-openai-isConsequential": "false",
        "security": [
          {
            "APIKeyHeader": []
          }
        ],
        "parameters": [
          {
            "name": "record_id",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string",
              "title": "Record Id"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {}
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/create-record": {
      "post": {
        "description": "Create a new record to Feishu.",
        "summary": "Create Record",
        "operationId": "createRecord_post",
        "x-openai-isConsequential": "false",
        "parameters": [
          {
            "name": "fields",
            "in": "body",
            "required": true,
            "schema": {
              "type": "json"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {}
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        },
        "security": [
          {
            "APIKeyHeader": []
          }
        ]
      }
    }
  },
  "components": {
    "schemas": {
      "HTTPValidationError": {
        "properties": {
          "detail": {
            "items": {
              "$ref": "#/components/schemas/ValidationError"
            },
            "type": "array",
            "title": "Detail"
          }
        },
        "type": "object",
        "title": "HTTPValidationError"
      },
      "RecordUpdateRequest": {
        "properties": {
          "record_id": {
            "type": "string",
            "title": "Record Id"
          },
          "update_fields": {
            "type": "object",
            "title": "Update Fields"
          }
        },
        "type": "object",
        "required": [
          "record_id",
          "update_fields"
        ],
        "title": "RecordUpdateRequest"
      },
      "ValidationError": {
        "properties": {
          "loc": {
            "items": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "integer"
                }
              ]
            },
            "type": "array",
            "title": "Location"
          },
          "msg": {
            "type": "string",
            "title": "Message"
          },
          "type": {
            "type": "string",
            "title": "Error Type"
          }
        },
        "type": "object",
        "required": [
          "loc",
          "msg",
          "type"
        ],
        "title": "ValidationError"
      }
    },
    "securitySchemes": {
      "APIKeyHeader": {
        "type": "apiKey",
        "in": "header",
        "name": "X-API-Key"
      }
    }
  }
}