{
  "openapi": "3.1.0",
  "info": {
    "title": "FastAPI",
    "version": "0.1.0"
  },
  "paths": {
    "/patterns": {
      "get": {
        "summary": "Patterns",
        "description": "Retrieves application patterns based on resolver information.\n\nReturns:\n    ApplicationPatternsResponse: A response containing a list of PatternInfo objects.",
        "operationId": "patterns_patterns_get",
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApplicationPatternsResponse"
                }
              }
            }
          }
        }
      }
    },
    "/blocks": {
      "get": {
        "summary": "Blocks",
        "description": "Retrieves application blocks based on resolver information.\n\nReturns:\n    ApplicationBlocksResponse: A response containing a list of BlockInfo objects.",
        "operationId": "blocks_blocks_get",
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApplicationBlocksResponse"
                }
              }
            }
          }
        }
      }
    },
    "/applications/{application_id}": {
      "get": {
        "summary": "Get App",
        "description": "Get information about a specific application.\n\nArgs:\n    application_id (str): The ID of the application to retrieve.\n\nReturns:\n    ApplicationInfoResponse: Information about the application, including its ID, name,\n        active version, creation timestamp, and last update timestamp.",
        "operationId": "get_app_applications__application_id__get",
        "parameters": [
          {
            "required": true,
            "schema": {
              "type": "string",
              "title": "Application Id"
            },
            "name": "application_id",
            "in": "path"
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApplicationInfoResponse"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      },
      "put": {
        "summary": "Update App Meta",
        "description": "Update the metadata of an application.\n\nArgs:\n    application_id (str): The ID of the application to update.\n    metadata (Metadata): The new metadata for the application.\n\nReturns:\n    ItemUpdateResponse: An object indicating the success or failure of the update operation.",
        "operationId": "update_app_meta_applications__application_id__put",
        "parameters": [
          {
            "required": true,
            "schema": {
              "type": "string",
              "title": "Application Id"
            },
            "name": "application_id",
            "in": "path"
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/AppMetadata"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ItemUpdateResponse"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      },
      "delete": {
        "summary": "Delete App",
        "description": "Delete an application by its ID.\n\nArgs:\n    application_id (str): The ID of the application to be deleted.\n\nReturns:\n    ItemDeleteResponse: A response indicating the success or failure of the deletion.",
        "operationId": "delete_app_applications__application_id__delete",
        "parameters": [
          {
            "required": true,
            "schema": {
              "type": "string",
              "title": "Application Id"
            },
            "name": "application_id",
            "in": "path"
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ItemDeleteResponse"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/applications": {
      "get": {
        "summary": "List App",
        "description": "Retrieve a list of applications.\n\nReturns:\n    ApplicationListResponse: The response containing a list of applications.",
        "operationId": "list_app_applications_get",
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApplicationListResponse"
                }
              }
            }
          }
        }
      },
      "post": {
        "summary": "Create App",
        "description": "Endpoint to create a new application.\n\nArgs:\n    application (ApplicationCreate): The application data to create.\n\nReturns:\n    ApplicationCreateResponse: The response containing the ID of the created application.",
        "operationId": "create_app_applications_post",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ApplicationCreate"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApplicationCreateResponse"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/applications/{application_id}/async_run": {
      "post": {
        "summary": "Async Run App",
        "description": "Asynchronously runs an application with the specified ID and configuration.\n\nArgs:\n    application_id (str): The ID of the application to run.\n    config (ApplicationRun): The configuration for running the application.\n\nReturns:\n    ApplicationRunResponse: The response containing the interaction ID which is\n        used for polling running result latter.",
        "operationId": "async_run_app_applications__application_id__async_run_post",
        "parameters": [
          {
            "required": true,
            "schema": {
              "type": "string",
              "title": "Application Id"
            },
            "name": "application_id",
            "in": "path"
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ApplicationRun"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApplicationRunResponse"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/interactions/{interaction_id}": {
      "get": {
        "summary": "Get Interaction",
        "description": "Retrieves information about a specific interaction by its ID.\n\nArgs:\n    interaction_id (str): The ID of the interaction to retrieve.\n\nReturns:\n    InteractionInfoResponse: An object containing information about the interaction.",
        "operationId": "get_interaction_interactions__interaction_id__get",
        "parameters": [
          {
            "required": true,
            "schema": {
              "type": "string",
              "title": "Interaction Id"
            },
            "name": "interaction_id",
            "in": "path"
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/InteractionInfoResponse"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/applications/{application_id}/versions/{version_id}/async_run": {
      "post": {
        "summary": "Async Run App Version",
        "description": "Asynchronously runs an application with the specified app ID, version ID and configuration.\n\nArgs:\n    application_id (str): The ID of the application to run.\n    version_id (str): The version of the application to run.\n    config (ApplicationRun): The configuration for running the application.\n\nReturns:\n    ApplicationRunResponse: The response containing the interaction ID which is\n        used for polling running result latter.",
        "operationId": "async_run_app_version_applications__application_id__versions__version_id__async_run_post",
        "parameters": [
          {
            "required": true,
            "schema": {
              "type": "string",
              "title": "Application Id"
            },
            "name": "application_id",
            "in": "path"
          },
          {
            "required": true,
            "schema": {
              "type": "string",
              "title": "Version Id"
            },
            "name": "version_id",
            "in": "path"
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ApplicationRun"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApplicationRunResponse"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/applications/{application_id}/versions/{version_id}": {
      "get": {
        "summary": "Get App Version",
        "operationId": "get_app_version_applications__application_id__versions__version_id__get",
        "parameters": [
          {
            "required": true,
            "schema": {
              "type": "string",
              "title": "Application Id"
            },
            "name": "application_id",
            "in": "path"
          },
          {
            "required": true,
            "schema": {
              "type": "string",
              "title": "Version Id"
            },
            "name": "version_id",
            "in": "path"
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/VersionInfoResponse"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      },
      "put": {
        "summary": "Update App Version Meta",
        "description": "Update the metadata of an application.\n\nArgs:\n    application_id (str): The ID of the application.\n    version_id (str): The ID of the version to be updated.\n    metadata (VersionMetadata): The new metadata for the version.\n\nReturns:\n    ItemUpdateResponse: An object indicating the success or failure of the update operation.",
        "operationId": "update_app_version_meta_applications__application_id__versions__version_id__put",
        "parameters": [
          {
            "required": true,
            "schema": {
              "type": "string",
              "title": "Application Id"
            },
            "name": "application_id",
            "in": "path"
          },
          {
            "required": true,
            "schema": {
              "type": "string",
              "title": "Version Id"
            },
            "name": "version_id",
            "in": "path"
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/VersionMetadata"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ItemUpdateResponse"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      },
      "delete": {
        "summary": "Delete App Version",
        "description": "Delete a specific version of an application.\n\nArgs:\n    application_id (str): The ID of the application.\n    version_id (str): The ID of the version to be deleted.\n\nReturns:\n    ItemDeleteResponse: An object indicating whether the deletion was successful.",
        "operationId": "delete_app_version_applications__application_id__versions__version_id__delete",
        "parameters": [
          {
            "required": true,
            "schema": {
              "type": "string",
              "title": "Application Id"
            },
            "name": "application_id",
            "in": "path"
          },
          {
            "required": true,
            "schema": {
              "type": "string",
              "title": "Version Id"
            },
            "name": "version_id",
            "in": "path"
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ItemDeleteResponse"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/applications/{application_id}/versions": {
      "get": {
        "summary": "List App Versions",
        "description": "Get a list of application versions for the specified application_id.\n\nArgs:\n    application_id (str): The ID of the application.\n\nReturns:\n    VersionListResponse: A response containing a list of ApplicationVersionInfo objects\n        representing the versions of the specified application.",
        "operationId": "list_app_versions_applications__application_id__versions_get",
        "parameters": [
          {
            "required": true,
            "schema": {
              "type": "string",
              "title": "Application Id"
            },
            "name": "application_id",
            "in": "path"
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/VersionListResponse"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      },
      "post": {
        "summary": "Create App Version",
        "description": "Create a new application version.\n\nArgs:\n    application_id (str): The ID of the application.\n    version (ApplicationVersionCreate): The details of the new application version.\n\nReturns:\n    VersionCreateResponse: The response containing the ID of the created version.",
        "operationId": "create_app_version_applications__application_id__versions_post",
        "parameters": [
          {
            "required": true,
            "schema": {
              "type": "string",
              "title": "Application Id"
            },
            "name": "application_id",
            "in": "path"
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ApplicationVersionCreate"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/VersionCreateResponse"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/applications/{application_id}/versions/{version_id}/active": {
      "put": {
        "summary": "Active App Version",
        "description": "Update the active version of an application in the database.\n\nArgs:\n    application_id (str): The ID of the application to update.\n    version_id (str): The ID of the version to set as active.\n\nReturns:\n    ItemUpdateResponse: An ItemUpdateResponse indicating the success or failure of the update.",
        "operationId": "active_app_version_applications__application_id__versions__version_id__active_put",
        "parameters": [
          {
            "required": true,
            "schema": {
              "type": "string",
              "title": "Application Id"
            },
            "name": "application_id",
            "in": "path"
          },
          {
            "required": true,
            "schema": {
              "type": "string",
              "title": "Version Id"
            },
            "name": "version_id",
            "in": "path"
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {}
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/ping": {
      "get": {
        "summary": "Ping",
        "operationId": "ping_ping_get",
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "title": "Response Ping Ping Get"
                }
              }
            }
          }
        }
      }
    },
    "/me": {
      "get": {
        "summary": "Me",
        "operationId": "me_me_get",
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/User"
                }
              }
            }
          }
        }
      }
    }
  },
  "components": {
    "schemas": {
      "AppMetadata": {
        "properties": {
          "name": {
            "type": "string",
            "title": "Name"
          },
          "langfusePublicKey": {
            "type": "string",
            "title": "Langfusepublickey"
          },
          "langfuseSecretKey": {
            "type": "string",
            "title": "Langfusesecretkey"
          }
        },
        "type": "object",
        "required": [
          "name"
        ],
        "title": "AppMetadata",
        "description": "The request model for updating app data."
      },
      "ApplicationBlocksResponse": {
        "properties": {
          "blocks": {
            "items": {
              "$ref": "#/components/schemas/BlockInfo"
            },
            "type": "array",
            "title": "Blocks"
          }
        },
        "type": "object",
        "required": [
          "blocks"
        ],
        "title": "ApplicationBlocksResponse",
        "description": "The response model for /blocks."
      },
      "ApplicationCreate": {
        "properties": {
          "name": {
            "type": "string",
            "title": "Name"
          },
          "langfusePublicKey": {
            "type": "string",
            "title": "Langfusepublickey"
          },
          "langfuseSecretKey": {
            "type": "string",
            "title": "Langfusesecretkey"
          }
        },
        "type": "object",
        "required": [
          "name"
        ],
        "title": "ApplicationCreate",
        "description": "The request model for creating app."
      },
      "ApplicationCreateResponse": {
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid",
            "title": "Id"
          }
        },
        "type": "object",
        "required": [
          "id"
        ],
        "title": "ApplicationCreateResponse",
        "description": "The response model for creating app."
      },
      "ApplicationInfo": {
        "properties": {
          "id": {
            "type": "string",
            "title": "Id"
          },
          "name": {
            "type": "string",
            "title": "Name"
          },
          "user": {
            "type": "string",
            "title": "User"
          },
          "langfuse_public_key": {
            "type": "string",
            "title": "Langfuse Public Key"
          },
          "langfuse_secret_key": {
            "type": "string",
            "title": "Langfuse Secret Key"
          },
          "active_version": {
            "type": "string",
            "title": "Active Version"
          },
          "created_at": {
            "type": "integer",
            "title": "Created At"
          },
          "updated_at": {
            "type": "integer",
            "title": "Updated At"
          }
        },
        "type": "object",
        "required": [
          "id",
          "name",
          "user",
          "created_at",
          "updated_at"
        ],
        "title": "ApplicationInfo",
        "description": "ApplicationInfo models the app object."
      },
      "ApplicationInfoResponse": {
        "properties": {
          "application": {
            "$ref": "#/components/schemas/ApplicationInfo"
          }
        },
        "type": "object",
        "title": "ApplicationInfoResponse",
        "description": "The response model for /applications/{application_id}, which returns information\nof specific app. If the specifed app not found, the application property will be\nNone."
      },
      "ApplicationListResponse": {
        "properties": {
          "applications": {
            "items": {
              "$ref": "#/components/schemas/ApplicationInfo"
            },
            "type": "array",
            "title": "Applications"
          }
        },
        "type": "object",
        "required": [
          "applications"
        ],
        "title": "ApplicationListResponse",
        "description": "The response model for /applications, which returns a list of app info."
      },
      "ApplicationPatternsResponse": {
        "properties": {
          "patterns": {
            "items": {
              "$ref": "#/components/schemas/PatternInfo"
            },
            "type": "array",
            "title": "Patterns"
          }
        },
        "type": "object",
        "required": [
          "patterns"
        ],
        "title": "ApplicationPatternsResponse",
        "description": "The response model for /patterns."
      },
      "ApplicationRun": {
        "properties": {
          "input": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "items": {
                  "type": "string"
                },
                "type": "array"
              },
              {
                "additionalProperties": {
                  "type": "string"
                },
                "type": "object"
              }
            ],
            "title": "Input"
          }
        },
        "type": "object",
        "required": [
          "input"
        ],
        "title": "ApplicationRun",
        "description": "The request model for trigger an app."
      },
      "ApplicationRunResponse": {
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid",
            "title": "Id"
          }
        },
        "type": "object",
        "required": [
          "id"
        ],
        "title": "ApplicationRunResponse",
        "description": "The response model for trigger an app."
      },
      "ApplicationVersionCreate": {
        "properties": {
          "name": {
            "type": "string",
            "title": "Name"
          },
          "parentId": {
            "type": "string",
            "title": "Parentid"
          },
          "metadata": {
            "type": "object",
            "title": "Metadata"
          },
          "configuration": {
            "$ref": "#/components/schemas/GraphConfiguration"
          }
        },
        "type": "object",
        "required": [
          "name",
          "configuration"
        ],
        "title": "ApplicationVersionCreate",
        "description": "The request model for app version creation api."
      },
      "ApplicationVersionInfo": {
        "properties": {
          "id": {
            "type": "string",
            "title": "Id"
          },
          "name": {
            "type": "string",
            "title": "Name"
          },
          "user": {
            "type": "string",
            "title": "User"
          },
          "app_id": {
            "type": "string",
            "title": "App Id"
          },
          "created_at": {
            "type": "integer",
            "title": "Created At"
          },
          "updated_at": {
            "type": "integer",
            "title": "Updated At"
          },
          "metadata": {
            "type": "object",
            "title": "Metadata"
          },
          "configuration": {
            "type": "object",
            "title": "Configuration"
          }
        },
        "type": "object",
        "required": [
          "id",
          "name",
          "user",
          "app_id",
          "created_at",
          "updated_at"
        ],
        "title": "ApplicationVersionInfo",
        "description": "ApplicationVersionInfo models the app version object.\nAn app can have multiple versions (but at most one active)."
      },
      "BlockInfo": {
        "properties": {
          "name": {
            "type": "string",
            "title": "Name"
          },
          "alias": {
            "type": "string",
            "title": "Alias"
          },
          "dir": {
            "type": "string",
            "title": "Dir"
          },
          "slots": {
            "items": {
              "$ref": "#/components/schemas/Parameter"
            },
            "type": "array",
            "title": "Slots"
          },
          "inports": {
            "items": {
              "$ref": "#/components/schemas/Parameter"
            },
            "type": "array",
            "title": "Inports"
          },
          "outport": {
            "type": "string",
            "title": "Outport"
          }
        },
        "type": "object",
        "required": [
          "name",
          "alias",
          "dir",
          "slots",
          "inports",
          "outport"
        ],
        "title": "BlockInfo",
        "description": "A `Block` is a node in LinguFlow DAG.\n\nBlockInfo class describes:\n- what the node take (inports property)\n- what the node produce (outport property)\n- how to construct the node (slots property)"
      },
      "GraphConfiguration": {
        "properties": {
          "nodes": {
            "items": {
              "$ref": "#/components/schemas/GraphNode"
            },
            "type": "array",
            "title": "Nodes"
          },
          "edges": {
            "items": {
              "$ref": "#/components/schemas/GraphEdge"
            },
            "type": "array",
            "title": "Edges"
          }
        },
        "type": "object",
        "required": [
          "nodes",
          "edges"
        ],
        "title": "GraphConfiguration",
        "description": "GraphConfiguration defines the DAG in app version.\nIt contains a node list which defines how to construct each node.\nAnd a edige list which defines how data flows."
      },
      "GraphEdge": {
        "properties": {
          "src_block": {
            "type": "string",
            "title": "Src Block"
          },
          "dst_block": {
            "type": "string",
            "title": "Dst Block"
          },
          "dst_port": {
            "type": "string",
            "title": "Dst Port"
          },
          "alias": {
            "type": "string",
            "title": "Alias"
          },
          "case": {
            "anyOf": [
              {
                "type": "boolean"
              },
              {
                "type": "string"
              },
              {
                "type": "integer"
              }
            ],
            "title": "Case"
          }
        },
        "type": "object",
        "title": "GraphEdge",
        "description": "GraphEdge defines the dataflow direction between nodes in the DAG."
      },
      "GraphNode": {
        "properties": {
          "id": {
            "type": "string",
            "title": "Id"
          },
          "name": {
            "type": "string",
            "title": "Name"
          },
          "alias": {
            "type": "string",
            "title": "Alias"
          },
          "slots": {
            "type": "object",
            "title": "Slots"
          }
        },
        "type": "object",
        "required": [
          "id",
          "name"
        ],
        "title": "GraphNode",
        "description": "GraphNode describes nodes in DAG.\nIt defines the id and fills construction parameters for blocks."
      },
      "HTTPValidationError": {
        "properties": {
          "detail": {
            "items": {
              "$ref": "#/components/schemas/ValidationError"
            },
            "type": "array",
            "title": "Detail"
          }
        },
        "type": "object",
        "title": "HTTPValidationError"
      },
      "InteractionInfo": {
        "properties": {
          "id": {
            "type": "string",
            "title": "Id"
          },
          "user": {
            "type": "string",
            "title": "User"
          },
          "version_id": {
            "type": "string",
            "title": "Version Id"
          },
          "created_at": {
            "type": "integer",
            "title": "Created At"
          },
          "updated_at": {
            "type": "integer",
            "title": "Updated At"
          },
          "output": {
            "type": "string",
            "title": "Output"
          },
          "data": {
            "type": "object",
            "title": "Data"
          }
        },
        "type": "object",
        "required": [
          "id",
          "user",
          "version_id",
          "created_at",
          "updated_at"
        ],
        "title": "InteractionInfo",
        "description": "InteractionInfo models the interaction object."
      },
      "InteractionInfoResponse": {
        "properties": {
          "interaction": {
            "$ref": "#/components/schemas/InteractionInfo"
          }
        },
        "type": "object",
        "title": "InteractionInfoResponse",
        "description": "The response model for /interactions/{interaction_id}."
      },
      "ItemDeleteResponse": {
        "properties": {
          "success": {
            "type": "boolean",
            "title": "Success"
          },
          "message": {
            "type": "string",
            "title": "Message"
          }
        },
        "type": "object",
        "required": [
          "success",
          "message"
        ],
        "title": "ItemDeleteResponse",
        "description": "The response model for app/version deletion."
      },
      "ItemUpdateResponse": {
        "properties": {
          "success": {
            "type": "boolean",
            "title": "Success"
          },
          "message": {
            "type": "string",
            "title": "Message"
          }
        },
        "type": "object",
        "required": [
          "success",
          "message"
        ],
        "title": "ItemUpdateResponse",
        "description": "The response model for app/version update."
      },
      "Parameter": {
        "properties": {
          "name": {
            "type": "string",
            "title": "Name"
          },
          "class_name": {
            "type": "string",
            "title": "Class Name"
          },
          "default": {
            "title": "Default"
          },
          "is_variable_keyword": {
            "type": "boolean",
            "title": "Is Variable Keyword",
            "default": false
          }
        },
        "type": "object",
        "required": [
          "name",
          "class_name"
        ],
        "title": "Parameter",
        "description": "Parameter describles the parameter of Block.__init__ and Pattern.__init__ .\n\nFor example, for Secret pattern it has a __init__ function:\n\n```\ndef __init__(self, plaintext: str):\n    ...\n```\n\nSo the Parameter `plaintext` will be:\n\n```json\n{\n    \"name\": \"plaintext\"\n    \"class_name\": \"text\",\n    \"default\": null,\n    \"is_variable_keyword\": false\n}\n```"
      },
      "PatternInfo": {
        "properties": {
          "name": {
            "type": "string",
            "title": "Name"
          },
          "alias": {
            "type": "string",
            "title": "Alias"
          },
          "candidates": {
            "items": {
              "type": "string"
            },
            "type": "array",
            "title": "Candidates"
          },
          "slots": {
            "items": {
              "$ref": "#/components/schemas/Parameter"
            },
            "type": "array",
            "title": "Slots"
          }
        },
        "type": "object",
        "required": [
          "name",
          "alias",
          "candidates"
        ],
        "title": "PatternInfo",
        "description": "PatternInfo describe how to construct a Pattern itself.\n\nFor example, for Secret pattern it has a __init__ function:\n\n```\ndef __init__(self, plaintext: str):\n    ...\n```\n\nSo its' PatternInfo will be:\n\n```json\n{\n    \"name\": \"Secret\",\n    \"alias\": null,\n    \"candidates\": [\"Secret\"],\n    \"slots\": [{\n        \"name\": \"plaintext\"\n        \"class_name\": \"text\",\n        \"default\": null,\n        \"is_variable_keyword\": false\n    }]\n}\n```"
      },
      "User": {
        "properties": {
          "user": {
            "type": "string",
            "title": "User"
          }
        },
        "type": "object",
        "required": [
          "user"
        ],
        "title": "User",
        "description": "The user identity"
      },
      "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"
      },
      "VersionCreateResponse": {
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid",
            "title": "Id"
          }
        },
        "type": "object",
        "required": [
          "id"
        ],
        "title": "VersionCreateResponse",
        "description": "The reaponse model for app version creation api."
      },
      "VersionInfoResponse": {
        "properties": {
          "version": {
            "$ref": "#/components/schemas/ApplicationVersionInfo"
          }
        },
        "type": "object",
        "title": "VersionInfoResponse",
        "description": "The response model for /applications/{application_id}/versions/{version_id},\nwhich returns information of specific app version. If the specifed version not\nfound, the version property will be None."
      },
      "VersionListResponse": {
        "properties": {
          "versions": {
            "items": {
              "$ref": "#/components/schemas/ApplicationVersionInfo"
            },
            "type": "array",
            "title": "Versions"
          }
        },
        "type": "object",
        "required": [
          "versions"
        ],
        "title": "VersionListResponse",
        "description": "The response model for application version list api."
      },
      "VersionMetadata": {
        "properties": {
          "name": {
            "type": "string",
            "title": "Name"
          },
          "metadata": {
            "type": "object",
            "title": "Metadata"
          }
        },
        "type": "object",
        "required": [
          "name"
        ],
        "title": "VersionMetadata",
        "description": "The request model for updating app version data."
      }
    }
  }
}