{
  "openapi": "3.0.1",
  "info": {
    "title": "ChatRoom.Server",
    "version": "v1"
  },
  "paths": {
    "/api/ChatRoomClient/Version": {
      "get": {
        "tags": [
          "ChatRoomClient"
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "text/plain": {
                "schema": {
                  "type": "string"
                }
              },
              "application/json": {
                "schema": {
                  "type": "string"
                }
              },
              "text/json": {
                "schema": {
                  "type": "string"
                }
              }
            }
          }
        }
      }
    },
    "/api/ChatRoomClient/SendTextMessageToChannel": {
      "post": {
        "tags": [
          "ChatRoomClient"
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/SendTextMessageToChannelRequest"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/SendTextMessageToChannelRequest"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/SendTextMessageToChannelRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/api/ChatRoomClient/GetRoomCheckpoints": {
      "get": {
        "tags": [
          "ChatRoomClient"
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "text/plain": {
                "schema": {
                  "type": "array",
                  "items": {
                    "type": "string"
                  }
                }
              },
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "type": "string"
                  }
                }
              },
              "text/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "type": "string"
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/ChatRoomClient/UnloadCheckpoint": {
      "get": {
        "tags": [
          "ChatRoomClient"
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/api/ChatRoomClient/LoadCheckpoint": {
      "get": {
        "tags": [
          "ChatRoomClient"
        ],
        "parameters": [
          {
            "name": "checkpointName",
            "in": "query",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/api/ChatRoomClient/SaveCheckpoint": {
      "get": {
        "tags": [
          "ChatRoomClient"
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/api/ChatRoomClient/DeleteCheckpoint/{checkpointPath}": {
      "get": {
        "tags": [
          "ChatRoomClient"
        ],
        "parameters": [
          {
            "name": "checkpointPath",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/api/ChatRoomClient/GetChannels": {
      "get": {
        "tags": [
          "ChatRoomClient"
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "text/plain": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/ChannelInfo"
                  }
                }
              },
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/ChannelInfo"
                  }
                }
              },
              "text/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/ChannelInfo"
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/ChatRoomClient/GetUserInfo": {
      "get": {
        "tags": [
          "ChatRoomClient"
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/AgentInfo"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AgentInfo"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/AgentInfo"
                }
              }
            }
          }
        }
      }
    },
    "/api/ChatRoomClient/ClearHistory/{channelName}": {
      "get": {
        "tags": [
          "ChatRoomClient"
        ],
        "parameters": [
          {
            "name": "channelName",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/api/ChatRoomClient/NewMessageSse/{channelName}": {
      "get": {
        "tags": [
          "ChatRoomClient"
        ],
        "parameters": [
          {
            "name": "channelName",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/api/ChatRoomClient/GenerateNextReply": {
      "post": {
        "tags": [
          "ChatRoomClient"
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/GenerateNextReplyRequest"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/GenerateNextReplyRequest"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/GenerateNextReplyRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/GenerateNextReplyResponse"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/GenerateNextReplyResponse"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/GenerateNextReplyResponse"
                }
              }
            }
          }
        }
      }
    },
    "/api/ChatRoomClient/GetRoomMembers": {
      "get": {
        "tags": [
          "ChatRoomClient"
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "text/plain": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/AgentInfo"
                  }
                }
              },
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/AgentInfo"
                  }
                }
              },
              "text/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/AgentInfo"
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/ChatRoomClient/GetChannelInfo/{channelName}": {
      "get": {
        "tags": [
          "ChatRoomClient"
        ],
        "parameters": [
          {
            "name": "channelName",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ChannelInfo"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ChannelInfo"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ChannelInfo"
                }
              }
            }
          }
        }
      }
    },
    "/api/ChatRoomClient/EditTextMessage": {
      "post": {
        "tags": [
          "ChatRoomClient"
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/EditTextMessageRequest"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/EditTextMessageRequest"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/EditTextMessageRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/api/ChatRoomClient/DeleteMessage/{channelName}/{messageId}": {
      "get": {
        "tags": [
          "ChatRoomClient"
        ],
        "parameters": [
          {
            "name": "channelName",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "messageId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int64"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/api/ChatRoomClient/GetChannelMembers": {
      "post": {
        "tags": [
          "ChatRoomClient"
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/GetChannelMembersRequest"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/GetChannelMembersRequest"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/GetChannelMembersRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "text/plain": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/AgentInfo"
                  }
                }
              },
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/AgentInfo"
                  }
                }
              },
              "text/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/AgentInfo"
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/ChatRoomClient/GetChannelChatHistory": {
      "post": {
        "tags": [
          "ChatRoomClient"
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/GetChannelChatHistoryRequest"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/GetChannelChatHistoryRequest"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/GetChannelChatHistoryRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "text/plain": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/ChatMsg"
                  }
                }
              },
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/ChatMsg"
                  }
                }
              },
              "text/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/ChatMsg"
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/ChatRoomClient/CreateChannel": {
      "post": {
        "tags": [
          "ChatRoomClient"
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CreateChannelRequest"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/CreateChannelRequest"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/CreateChannelRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/api/ChatRoomClient/DeleteChannel": {
      "post": {
        "tags": [
          "ChatRoomClient"
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/DeleteChannelRequest"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/DeleteChannelRequest"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/DeleteChannelRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/api/ChatRoomClient/AddAgentToChannel": {
      "post": {
        "tags": [
          "ChatRoomClient"
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/AddAgentToChannelRequest"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/AddAgentToChannelRequest"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/AddAgentToChannelRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/api/ChatRoomClient/RemoveAgentFromChannel": {
      "post": {
        "tags": [
          "ChatRoomClient"
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/RemoveAgentFromChannelRequest"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/RemoveAgentFromChannelRequest"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/RemoveAgentFromChannelRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/api/ChatRoomClient/GetOrchestrators": {
      "get": {
        "tags": [
          "ChatRoomClient"
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "text/plain": {
                "schema": {
                  "type": "array",
                  "items": {
                    "type": "string"
                  }
                }
              },
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "type": "string"
                  }
                }
              },
              "text/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "type": "string"
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/ChatRoomClient/GetChannelOrchestrators": {
      "get": {
        "tags": [
          "ChatRoomClient"
        ],
        "parameters": [
          {
            "name": "channel",
            "in": "query",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "text/plain": {
                "schema": {
                  "type": "array",
                  "items": {
                    "type": "string"
                  }
                }
              },
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "type": "string"
                  }
                }
              },
              "text/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "type": "string"
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/ChatRoomClient/AddOrchestratorToChannel": {
      "post": {
        "tags": [
          "ChatRoomClient"
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/AddOrchestratorToChannelRequest"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/AddOrchestratorToChannelRequest"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/AddOrchestratorToChannelRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/api/ChatRoomClient/RemoveOrchestratorFromChannel": {
      "post": {
        "tags": [
          "ChatRoomClient"
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/RemoveOrchestratorFromChannelRequest"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/RemoveOrchestratorFromChannelRequest"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/RemoveOrchestratorFromChannelRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/api/ChatRoomClient/CloneChannel": {
      "post": {
        "tags": [
          "ChatRoomClient"
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CloneChannelRequest"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/CloneChannelRequest"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/CloneChannelRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/api/ChatRoomClient/EditChannelName": {
      "post": {
        "tags": [
          "ChatRoomClient"
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/EditChannelNameRequest"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/EditChannelNameRequest"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/EditChannelNameRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    }
  },
  "components": {
    "schemas": {
      "AddAgentToChannelRequest": {
        "type": "object",
        "properties": {
          "channelName": {
            "type": "string",
            "nullable": true
          },
          "agentName": {
            "type": "string",
            "nullable": true
          }
        },
        "additionalProperties": false
      },
      "AddOrchestratorToChannelRequest": {
        "type": "object",
        "properties": {
          "channelName": {
            "type": "string",
            "nullable": true
          },
          "orchestratorName": {
            "type": "string",
            "nullable": true
          }
        },
        "additionalProperties": false
      },
      "AgentInfo": {
        "type": "object",
        "properties": {
          "name": {
            "type": "string",
            "nullable": true
          },
          "selfDescription": {
            "type": "string",
            "nullable": true
          },
          "isHuman": {
            "type": "boolean"
          }
        },
        "additionalProperties": false
      },
      "ChannelInfo": {
        "type": "object",
        "properties": {
          "name": {
            "type": "string",
            "nullable": true
          },
          "members": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/AgentInfo"
            },
            "nullable": true
          },
          "orchestrators": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "nullable": true
          }
        },
        "additionalProperties": false
      },
      "ChatMsg": {
        "type": "object",
        "properties": {
          "from": {
            "type": "string",
            "nullable": true
          },
          "created": {
            "type": "string",
            "format": "date-time"
          },
          "parts": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ChatMsgPart"
            },
            "nullable": true
          },
          "id": {
            "type": "integer",
            "format": "int64"
          }
        },
        "additionalProperties": false
      },
      "ChatMsgPart": {
        "type": "object",
        "properties": {
          "textPart": {
            "type": "string",
            "nullable": true
          },
          "imageData": {
            "type": "string",
            "format": "byte",
            "nullable": true
          },
          "imageUrl": {
            "type": "string",
            "format": "uri",
            "nullable": true
          },
          "mimeType": {
            "type": "string",
            "nullable": true
          }
        },
        "additionalProperties": false
      },
      "CloneChannelRequest": {
        "type": "object",
        "properties": {
          "channelName": {
            "type": "string",
            "nullable": true
          },
          "newChannelName": {
            "type": "string",
            "nullable": true
          }
        },
        "additionalProperties": false
      },
      "CreateChannelRequest": {
        "type": "object",
        "properties": {
          "channelName": {
            "type": "string",
            "nullable": true
          }
        },
        "additionalProperties": false
      },
      "DeleteChannelRequest": {
        "type": "object",
        "properties": {
          "channelName": {
            "type": "string",
            "nullable": true
          }
        },
        "additionalProperties": false
      },
      "EditChannelNameRequest": {
        "type": "object",
        "properties": {
          "oldChannelName": {
            "type": "string",
            "nullable": true
          },
          "newChannelName": {
            "type": "string",
            "nullable": true
          }
        },
        "additionalProperties": false
      },
      "EditTextMessageRequest": {
        "type": "object",
        "properties": {
          "channelName": {
            "type": "string",
            "nullable": true
          },
          "messageId": {
            "type": "integer",
            "format": "int64"
          },
          "newText": {
            "type": "string",
            "nullable": true
          }
        },
        "additionalProperties": false
      },
      "GenerateNextReplyRequest": {
        "type": "object",
        "properties": {
          "channelName": {
            "type": "string",
            "nullable": true
          },
          "chatMsgs": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ChatMsg"
            },
            "nullable": true
          },
          "candidates": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "nullable": true
          },
          "orchestrator": {
            "type": "string",
            "nullable": true
          }
        },
        "additionalProperties": false
      },
      "GenerateNextReplyResponse": {
        "type": "object",
        "properties": {
          "message": {
            "$ref": "#/components/schemas/ChatMsg"
          }
        },
        "additionalProperties": false
      },
      "GetChannelChatHistoryRequest": {
        "type": "object",
        "properties": {
          "channelName": {
            "type": "string",
            "nullable": true
          },
          "count": {
            "type": "integer",
            "format": "int32"
          }
        },
        "additionalProperties": false
      },
      "GetChannelMembersRequest": {
        "type": "object",
        "properties": {
          "channelName": {
            "type": "string",
            "nullable": true
          }
        },
        "additionalProperties": false
      },
      "RemoveAgentFromChannelRequest": {
        "type": "object",
        "properties": {
          "channelName": {
            "type": "string",
            "nullable": true
          },
          "agentName": {
            "type": "string",
            "nullable": true
          }
        },
        "additionalProperties": false
      },
      "RemoveOrchestratorFromChannelRequest": {
        "type": "object",
        "properties": {
          "channelName": {
            "type": "string",
            "nullable": true
          },
          "orchestratorName": {
            "type": "string",
            "nullable": true
          }
        },
        "additionalProperties": false
      },
      "SendTextMessageToChannelRequest": {
        "type": "object",
        "properties": {
          "channelName": {
            "type": "string",
            "nullable": true
          },
          "message": {
            "$ref": "#/components/schemas/ChatMsg"
          }
        },
        "additionalProperties": false
      }
    }
  }
}