diff --git a/docs/api-reference/endpoint/collections/get-collection-by-name.mdx b/docs/api-reference/endpoint/collections/get-collection-by-name.mdx index 22c3196f..fb29aef1 100644 --- a/docs/api-reference/endpoint/collections/get-collection-by-name.mdx +++ b/docs/api-reference/endpoint/collections/get-collection-by-name.mdx @@ -1,3 +1,3 @@ --- -openapi: get /apps/{app_id}/users/{user_id}/collections/{name} ---- \ No newline at end of file +openapi: get /apps/{app_id}/users/{user_id}/collections/name/{name} +--- diff --git a/docs/api-reference/endpoint/users/get-user-by-name.mdx b/docs/api-reference/endpoint/users/get-user-by-name.mdx index 4fcf37b6..6f6ec65c 100644 --- a/docs/api-reference/endpoint/users/get-user-by-name.mdx +++ b/docs/api-reference/endpoint/users/get-user-by-name.mdx @@ -1,3 +1,3 @@ --- -openapi: get /apps/{app_id}/users/{name} ---- \ No newline at end of file +openapi: get /apps/{app_id}/users/name/{name} +--- diff --git a/docs/guides/discord.mdx b/docs/guides/discord.mdx index 23654e5d..cc32361a 100644 --- a/docs/guides/discord.mdx +++ b/docs/guides/discord.mdx @@ -5,7 +5,13 @@ description: "Discord is a powerful chat application that handles many UI compli sidebarTitle: 'Discord' --- -Any application interface that defines logic based on events and supports special commands can work easily with Honcho. Here's how to use Honcho with **Discord** as an interface. If you're not familiar with Discord bot application logic, the [py-cord](https://pycord.dev/) docs would be a good place to start. +> Example code is available on [GitHub](https://github.com/plastic-labs/honcho-python/blob/main/examples/discord/roast-bot/main.py) + +Any application interface that defines logic based on events and supports +special commands can work easily with Honcho. Here's how to use Honcho with +**Discord** as an interface. If you're not familiar with Discord bot +application logic, the [py-cord](https://pycord.dev/) docs would be a good +place to start. ## Events @@ -17,27 +23,49 @@ async def on_message(message): return user_id = f"discord_{str(message.author.id)}" - user = honcho.get_or_create_user(user_id) - location_id=str(message.channel.id) + user = honcho.apps.users.get_or_create(name=user_id, app_id=app.id) - sessions = list(user.get_sessions_generator(location_id)) + # Get the session associated with the user and location + location_id = str(message.channel.id) # Get the channel id for the message + + sessions = [ + session + for session in honcho.apps.users.sessions.list( + user_id=user.id, app_id=app.id, is_active=True, location_id=location_id + ) + ] if len(sessions) > 0: session = sessions[0] else: - session = user.create_session(location_id) + session = honcho.apps.users.sessions.create(user_id=user.id, app_id=app.id, location_id=location_id) - history = list(session.get_messages_generator()) - chat_history = langchain_message_converter(history) + history = [ + message + for message in honcho.apps.users.sessions.messages.list(session_id=session.id, app_id=app.id, user_id=user.id) + ] + chat_history = messages_to_langchain(history) inp = message.content - session.create_message(is_user=True, content=inp) + honcho.apps.users.sessions.messages.create( + app_id=app.id, + user_id=user.id, + session_id=session.id, + content=input, + is_user=True, + ) async with message.channel.typing(): response = await chain.ainvoke({"chat_history": chat_history, "input": inp}) await message.channel.send(response) - session.create_message(is_user=False, content=response) + honcho.apps.users.sessions.messages.create( + app_id=app.id, + user_id=user.id, + session_id=session.id, + content=response, + is_user=False, + ) ``` Let's break down what each chunk of code is doing... @@ -58,43 +86,80 @@ location_id = str(message.channel.id) Honcho accepts a `location_id` argument to help separate out locations messages were sent (which is convenient for Discord channels). ```python -sessions = list(user.get_sessions_generator(location_id)) +sessions = [ + session + for session in honcho.apps.users.sessions.list( + user_id=user.id, app_id=app.id, is_active=True, location_id=location_id + ) + ] if len(sessions) > 0: session = sessions[0] else: - session = user.create_session(user_id, location_id) + session = honcho.apps.users.sessions.create(user_id=user.id, app_id=app.id, location_id=location_id) ``` -Here we're querying the `session` object for the user based on the location (channel) they're in. This will get all the sessions, so the if statement just pops the most recent one (if there are many) or creates a new one if none exist. +Here we're querying honcho for the user's sessions based on the location (channel) they're in. This will get all the sessions, so the if statement just pops the most recent one (if there are many) or creates a new one if none exist. ```python -history = list(session.get_messages_generator()) -chat_history = langchain_message_converter(history) +history = [ + message + for message in honcho.apps.users.sessions.messages.list(session_id=session.id, app_id=app.id, user_id=user.id) + ] +chat_history = messages_to_langchain(history) -inp = message.content -session.create_message(is_user=True, content=inp) +# Add user message to session +input = message.content +honcho.apps.users.sessions.messages.create( + app_id=app.id, + user_id=user.id, + session_id=session.id, + content=input, + is_user=True, +) async with message.channel.typing(): response = await chain.ainvoke({"chat_history": chat_history, "input": inp}) await message.channel.send(response) -session.create_message(is_user=False, content=response) +# Add bot message to session +honcho.apps.users.sessions.messages.create( + app_id=app.id, + user_id=user.id, + session_id=session.id, + content=response, + is_user=False, +) ``` -This chunk is all about constructing the object to send to an LLM API. We get the messages from a `session` and construct a `chat_history` object with a quick utility function (more on that in the [Langchain](../llm-frameworks/langchain) guide). Then, we access the user message via `message.content` and use `session.create_message` to add it to Honcho. The `async with` method allows the bot to show that it's "typing" while waiting for an LLM response and then uses `message.channel.send` to respond to the user. We can then add that AI response to Honcho with the same `session.create_message` method, this time specifying that this message did not come from a user with `is_user=False`. +This chunk is all about constructing the object to send to an LLM API. We get +the messages from a `session` and construct a `chat_history` object with a +quick utility function (more on that in the [Langchain](./langchain) guide). +Then, we access the user message via `message.content` and add it to Honcho. +The `async with` method allows the bot to show that it's "typing" while waiting +for an LLM response and then uses `message.channel.send` to respond to the +user. We can then add that AI response to Honcho with the same +`session.create_message` method, this time specifying that this message did not +come from a user with `is_user=False`. ## Slash Commands -Discord bots also offer slash command functionality. We can use Honcho to do interesting things via slash commands. Here's a simple example: +Discord bots also offer slash command functionality. We can use Honcho to do +interesting things via slash commands. Here's a simple example: ```python @bot.slash_command(name = "restart", description = "Restart the Conversation") async def restart(ctx): user_id=f"discord_{str(ctx.author.id)}" - user = honcho.get_or_create_user(user_id) + user = honcho.apps.users.get_or_create(name=user_id, app_id=app.id) location_id=str(ctx.channel_id) - sessions = list(user.get_sessions_generator(location_id)) - sessions[0].close() if len(sessions) > 0 else None + sessions = [ + session + for session in honcho.apps.users.sessions.list( + user_id=user.id, app_id=app.id, is_active=True, location_id=location_id + ) + ] + if len(sessions) > 0: + honcho.apps.users.sessions.delete(app_id=app.id, user_id=user.id, session_id=sessions[0].id) msg = "Great! The conversation has been restarted. What would you like to talk about?" await ctx.respond(msg) @@ -103,11 +168,17 @@ async def restart(ctx): This slash command restarts a conversation with a bot. In that case, we want to remove that session from storage. You can see we follow the same steps to access the user metadata via commands from the application interface: ```python user_id=f"discord_{str(ctx.author.id)}" -user = honcho.get_or_create_user(user_id) +user = honcho.apps.users.get_or_create(name=user_id, app_id=app.id) location_id=str(ctx.channel_id) ``` -Then we can retrieve and delete the messages associated with that metadata: +Then we can retrieve and delete the session associated with that metadata: ```python -sessions = list(user.get_sessions_generator(user_id, location_id)) -sessions[0].close() if len(sessions) > 0 else None +sessions = [ + session + for session in honcho.apps.users.sessions.list( + user_id=user.id, app_id=app.id, is_active=True, location_id=location_id + ) +] +if len(sessions) > 0: + honcho.apps.users.sessions.delete(app_id=app.id, user_id=user.id, session_id=sessions[0].id) ``` diff --git a/docs/guides/langchain.mdx b/docs/guides/langchain.mdx index 5bb9c74a..c2960cd3 100644 --- a/docs/guides/langchain.mdx +++ b/docs/guides/langchain.mdx @@ -15,7 +15,6 @@ from langchain_core.prompts import ChatPromptTemplate, MessagesPlaceholder from langchain_core.output_parsers import StrOutputParser from langchain_core.messages import AIMessage, HumanMessage -from uuid import uuid4 # for generating random app and user names from dotenv import load_dotenv # for loading in LLM API keys load_dotenv() # assumes you have a .env file with OPENAI_API_KEY defined @@ -24,12 +23,12 @@ load_dotenv() # assumes you have a .env file with OPENAI_API_KEY defined Next let's instantiate our Honcho client: ```python -app_name = str(uuid4()) +honcho = Honcho(environment="demo") +app_name = "LangChain App" +app = honcho.apps.get_or_create(name=app_name) # create or get app -honcho = Honcho(app_name=app_name) -honcho.initialize() user_name = str(uuid4()) -user = honcho.create_or_get_user(user_name) # create or get user +user = honcho.apps.users.get_or_create(app_id=app.id, name=user_name) # create or get user ``` Then we can define our chain using the LangChain Expression Language ([LCEL](https://python.langchain.com/docs/expression_language/why)): @@ -48,7 +47,7 @@ chain = prompt | model | output_parser Honcho returns lists of `Message` objects when queried using a built-in method like `get_messages()`, so a quick utility function is needed to change the list format to message objects LangChain expects: ```python -def langchain_message_converter(messages: List): +def messages_to_langchain(messages: List): new_messages = [] for message in messages: if message.is_user: @@ -58,18 +57,38 @@ def langchain_message_converter(messages: List): return new_messages ``` +This method is importable with the following statement + +```python +from honcho.lib.ext.langchain import messages_to_langchain +``` + Now we can structure Honcho calls around our LLM inference: ```python -sessions = list(user.get_sessions_generator(location_id)) # args come from application logic +sessions = [ + session for session in + honcho.apps.users.sessions.list( + app_id=app.id, + user_id=user.id, + location_id=location_id + ) +] # args come from application logic session = sessions[0] # most recent session for user -history = list(session.get_messages_generator()) -chat_history = langchain_message_converter(history) # convert messages for LangChain +history = [ + message for message in + honcho.apps.users.sessions.messages.list( + app_id=app.id, + user_id=user.id, + session_id=session.id + ) +] +chat_history = messages_to_langchain(history) # convert messages for LangChain inp = "Here's a user message!" -session.create_message(is_user=True, content=inp) +honcho.apps.users.sessions.messages.create(app_id=app.id, user_id=user.id, is_user=True, content=inp) response = await chain.ainvoke({"chat_history": chat_history, "input": inp}) -session.create_message(is_user=False, content=response) +honcho.apps.users.sessions.messages.create(app_id=app.id, user_id=user.id, is_user=False, content=response) ``` -Here we query messages from a user's session using Honcho and construct a chat history object to send to the LLM alongside our immediate user input. Once the LLM has responded, we can add that to Honcho! \ No newline at end of file +Here we query messages from a user's session using Honcho and construct a chat history object to send to the LLM alongside our immediate user input. Once the LLM has responded, we can add that to Honcho! diff --git a/docs/guides/simple-memory.mdx b/docs/guides/simple-memory.mdx index bfe02f6c..c34ae7fb 100644 --- a/docs/guides/simple-memory.mdx +++ b/docs/guides/simple-memory.mdx @@ -7,8 +7,8 @@ description: "A simple example of how to store and derive facts about individual This guide shows how to implement a simple user memory system that derives and stores facts about users that are then referenced later on. -A fully working example can be found on [GitHub](https://github.com/plastic-labs/honcho/tree/main/example/discord/honcho-fact-memory). -It's setup as a discord bot so view our [Discord guide](../interfaces/discord) +A fully working example can be found on [GitHub](https://github.com/plastic-labs/honcho-python/tree/main/examples/discord/fact-memory). +It's setup as a discord bot so view our [Discord guide](./discord) for more details on how to set that up. ## Initial Setup @@ -31,7 +31,9 @@ from langchain.schema import ( from langchain_core.output_parsers import NumberedListOutputParser llm: ChatOpenAI = ChatOpenAI(model_name="gpt-4") -honcho = Honcho(app_id="Simple User Memory") +app_name = "Fact-Memory" + +honcho = Honcho(environment="demo") ``` The 3 steps to this project are: @@ -81,23 +83,30 @@ template: > Output the facts as a numbered list. ``` -We then invoke the chain and parse the output to get our list of facts. We take advantage of one of LangChain's built in output parsers for this. +We then invoke the chain and parse the output to get our list of facts. We take +advantage of one of LangChain's built in output parsers for this. ## Step 2 - Storing Facts -This is where Honcho comes into play. With Honcho we can initialize `Collections` for each user and can store facts as vector embeddings. You can use multiple collections if you want to segment different types of facts or data, but for now we just need one. +This is where Honcho comes into play. With Honcho we can initialize +`Collections` for each user and can store facts as vector embeddings. You can +use multiple collections if you want to segment different types of facts or +data, but for now we just need one. ```python -def store_facts(user_name, facts): - user = honcho.get_or_create_user(user_name) +def store_facts(app_id, user_id, facts): + user = honcho.apps.users.get_or_create(name=user_id, app_id=app.id) + + try: + collection = honcho.apps.users.collections.get_by_name(app_id=app.id, user_id=user.id, name="discord") + except NotFoundError as e: + collection = honcho.apps.users.collections.create(app_id=app.id, user_id=user.id, name="discord") collection: Collection - try: # Check if collection exists if not create it - collection = user.get_collection("simple-memory") - except Exception - collection = user.create_collection("simple-memory") for fact in facts: # store each fact in the collection - collection.create_document(content=fact) + honcho.apps.users.collections.documents.create( + app_id=app_id, user_id=user_id, collection_id=collection.id, content=fact + ) ``` @@ -181,4 +190,4 @@ template: > --- This is a very simple method of using Honcho to hold user context. For further reading on the limits read about -[violation of expectation](https://arxiv.org/abs/2310.06983). \ No newline at end of file +[violation of expectation](https://arxiv.org/abs/2310.06983). diff --git a/docs/openapi.json b/docs/openapi.json index e9571e5e..fbd88189 100644 --- a/docs/openapi.json +++ b/docs/openapi.json @@ -1,4426 +1 @@ -{ - "openapi": "3.1.0", - "info": { - "title": "Honcho API", - "summary": "An API for adding personalization to AI Apps", - "description": "This API is used to store data and get insights about users for AI\n applications", - "version": "0.1.0" - }, - "servers": [ - { - "url": "http://127.0.0.1:8000", - "description": "Local Development Server" - }, - { - "url": "https:/demo.honcho.dev", - "description": "Demo Server" - } - ], - "paths": { - "/apps/{app_id}": { - "get": { - "tags": [ - "apps" - ], - "summary": "Get App", - "description": "Get an App by ID\n\nArgs:\n app_id (uuid.UUID): The ID of the app\n\nReturns:\n schemas.App: App object", - "operationId": "get_app_apps__app_id__get", - "security": [ - { - "HTTPBearer": [] - }, - {} - ], - "parameters": [ - { - "name": "app_id", - "in": "path", - "required": true, - "schema": { - "type": "string", - "format": "uuid", - "title": "App Id" - } - } - ], - "responses": { - "200": { - "description": "Successful Response", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/App" - } - } - } - }, - "422": { - "description": "Validation Error", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/HTTPValidationError" - } - } - } - } - }, - "x-codeSamples": [ - { - "lang": "JavaScript", - "source": "import Honcho from 'honcho-ai';\n\nconst honcho = new Honcho({\n apiKey: process.env['HONCHO_AUTH_TOKEN'], // This is the default and can be omitted\n});\n\nasync function main() {\n const app = await honcho.apps.get('182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e');\n\n console.log(app.id);\n}\n\nmain();" - }, - { - "lang": "Python", - "source": "import os\nfrom honcho import Honcho\n\nclient = Honcho(\n # This is the default and can be omitted\n api_key=os.environ.get(\"HONCHO_AUTH_TOKEN\"),\n)\napp = client.apps.get(\n \"182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e\",\n)\nprint(app.id)" - } - ] - }, - "put": { - "tags": [ - "apps" - ], - "summary": "Update App", - "description": "Update an App\n\nArgs:\n app_id (uuid.UUID): The ID of the app to update\n app (schemas.AppUpdate): The App object containing any new metadata\n\nReturns:\n schemas.App: The App object of the updated App", - "operationId": "update_app_apps__app_id__put", - "security": [ - { - "HTTPBearer": [] - }, - {} - ], - "parameters": [ - { - "name": "app_id", - "in": "path", - "required": true, - "schema": { - "type": "string", - "format": "uuid", - "title": "App Id" - } - } - ], - "requestBody": { - "required": true, - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/AppUpdate" - } - } - } - }, - "responses": { - "200": { - "description": "Successful Response", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/App" - } - } - } - }, - "422": { - "description": "Validation Error", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/HTTPValidationError" - } - } - } - } - }, - "x-codeSamples": [ - { - "lang": "JavaScript", - "source": "import Honcho from 'honcho-ai';\n\nconst honcho = new Honcho({\n apiKey: process.env['HONCHO_AUTH_TOKEN'], // This is the default and can be omitted\n});\n\nasync function main() {\n const app = await honcho.apps.update('182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e');\n\n console.log(app.id);\n}\n\nmain();" - }, - { - "lang": "Python", - "source": "import os\nfrom honcho import Honcho\n\nclient = Honcho(\n # This is the default and can be omitted\n api_key=os.environ.get(\"HONCHO_AUTH_TOKEN\"),\n)\napp = client.apps.update(\n \"182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e\",\n)\nprint(app.id)" - } - ] - } - }, - "/apps/name/{name}": { - "get": { - "tags": [ - "apps" - ], - "summary": "Get App By Name", - "description": "Get an App by Name\n\nArgs:\n app_name (str): The name of the app\n\nReturns:\n schemas.App: App object", - "operationId": "get_app_by_name_apps_name__name__get", - "security": [ - { - "HTTPBearer": [] - }, - {} - ], - "parameters": [ - { - "name": "name", - "in": "path", - "required": true, - "schema": { - "type": "string", - "title": "Name" - } - } - ], - "responses": { - "200": { - "description": "Successful Response", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/App" - } - } - } - }, - "422": { - "description": "Validation Error", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/HTTPValidationError" - } - } - } - } - }, - "x-codeSamples": [ - { - "lang": "JavaScript", - "source": "import Honcho from 'honcho-ai';\n\nconst honcho = new Honcho({\n apiKey: process.env['HONCHO_AUTH_TOKEN'], // This is the default and can be omitted\n});\n\nasync function main() {\n const app = await honcho.apps.getByName('string');\n\n console.log(app.id);\n}\n\nmain();" - }, - { - "lang": "Python", - "source": "import os\nfrom honcho import Honcho\n\nclient = Honcho(\n # This is the default and can be omitted\n api_key=os.environ.get(\"HONCHO_AUTH_TOKEN\"),\n)\napp = client.apps.get_by_name(\n \"string\",\n)\nprint(app.id)" - } - ] - } - }, - "/apps": { - "post": { - "tags": [ - "apps" - ], - "summary": "Create App", - "description": "Create an App\n\nArgs:\n app (schemas.AppCreate): The App object containing any metadata\n\nReturns:\n schemas.App: Created App object", - "operationId": "create_app_apps_post", - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/AppCreate" - } - } - }, - "required": true - }, - "responses": { - "200": { - "description": "Successful Response", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/App" - } - } - } - }, - "422": { - "description": "Validation Error", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/HTTPValidationError" - } - } - } - } - }, - "security": [ - { - "HTTPBearer": [] - }, - {} - ], - "x-codeSamples": [ - { - "lang": "JavaScript", - "source": "import Honcho from 'honcho-ai';\n\nconst honcho = new Honcho({\n apiKey: process.env['HONCHO_AUTH_TOKEN'], // This is the default and can be omitted\n});\n\nasync function main() {\n const app = await honcho.apps.create({ name: 'string' });\n\n console.log(app.id);\n}\n\nmain();" - }, - { - "lang": "Python", - "source": "import os\nfrom honcho import Honcho\n\nclient = Honcho(\n # This is the default and can be omitted\n api_key=os.environ.get(\"HONCHO_AUTH_TOKEN\"),\n)\napp = client.apps.create(\n name=\"string\",\n)\nprint(app.id)" - } - ] - } - }, - "/apps/get_or_create/{name}": { - "get": { - "tags": [ - "apps" - ], - "summary": "Get Or Create App", - "description": "Get or Create an App\n\nArgs:\n app_name (str): The name of the app\n\nReturns:\n schemas.App: App object", - "operationId": "get_or_create_app_apps_get_or_create__name__get", - "security": [ - { - "HTTPBearer": [] - }, - {} - ], - "parameters": [ - { - "name": "name", - "in": "path", - "required": true, - "schema": { - "type": "string", - "title": "Name" - } - } - ], - "responses": { - "200": { - "description": "Successful Response", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/App" - } - } - } - }, - "422": { - "description": "Validation Error", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/HTTPValidationError" - } - } - } - } - }, - "x-codeSamples": [ - { - "lang": "JavaScript", - "source": "import Honcho from 'honcho-ai';\n\nconst honcho = new Honcho({\n apiKey: process.env['HONCHO_AUTH_TOKEN'], // This is the default and can be omitted\n});\n\nasync function main() {\n const app = await honcho.apps.getOrCreate('string');\n\n console.log(app.id);\n}\n\nmain();" - }, - { - "lang": "Python", - "source": "import os\nfrom honcho import Honcho\n\nclient = Honcho(\n # This is the default and can be omitted\n api_key=os.environ.get(\"HONCHO_AUTH_TOKEN\"),\n)\napp = client.apps.get_or_create(\n \"string\",\n)\nprint(app.id)" - } - ] - } - }, - "/apps/{app_id}/users": { - "post": { - "tags": [ - "users" - ], - "summary": "Create User", - "description": "Create a User\n\nArgs:\n app_id (uuid.UUID): The ID of the app representing the client application using\n honcho\n user (schemas.UserCreate): The User object containing any metadata\n\nReturns:\n schemas.User: Created User object", - "operationId": "create_user_apps__app_id__users_post", - "security": [ - { - "HTTPBearer": [] - }, - {} - ], - "parameters": [ - { - "name": "app_id", - "in": "path", - "required": true, - "schema": { - "type": "string", - "format": "uuid", - "title": "App Id" - } - } - ], - "requestBody": { - "required": true, - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/UserCreate" - } - } - } - }, - "responses": { - "200": { - "description": "Successful Response", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/User" - } - } - } - }, - "422": { - "description": "Validation Error", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/HTTPValidationError" - } - } - } - } - }, - "x-codeSamples": [ - { - "lang": "JavaScript", - "source": "import Honcho from 'honcho-ai';\n\nconst honcho = new Honcho({\n apiKey: process.env['HONCHO_AUTH_TOKEN'], // This is the default and can be omitted\n});\n\nasync function main() {\n const user = await honcho.apps.users.create('182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e', { name: 'string' });\n\n console.log(user.id);\n}\n\nmain();" - }, - { - "lang": "Python", - "source": "import os\nfrom honcho import Honcho\n\nclient = Honcho(\n # This is the default and can be omitted\n api_key=os.environ.get(\"HONCHO_AUTH_TOKEN\"),\n)\nuser = client.apps.users.create(\n \"182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e\",\n name=\"string\",\n)\nprint(user.id)" - } - ] - }, - "get": { - "tags": [ - "users" - ], - "summary": "Get Users", - "description": "Get All Users for an App\n\nArgs:\n app_id (uuid.UUID): The ID of the app representing the client\n application using honcho\n\nReturns:\n list[schemas.User]: List of User objects", - "operationId": "get_users_apps__app_id__users_get", - "security": [ - { - "HTTPBearer": [] - }, - {} - ], - "parameters": [ - { - "name": "app_id", - "in": "path", - "required": true, - "schema": { - "type": "string", - "format": "uuid", - "title": "App Id" - } - }, - { - "name": "reverse", - "in": "query", - "required": false, - "schema": { - "type": "boolean", - "default": false, - "title": "Reverse" - } - }, - { - "name": "filter", - "in": "query", - "required": false, - "schema": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "title": "Filter" - } - }, - { - "name": "page", - "in": "query", - "required": false, - "schema": { - "type": "integer", - "minimum": 1, - "description": "Page number", - "default": 1, - "title": "Page" - }, - "description": "Page number" - }, - { - "name": "size", - "in": "query", - "required": false, - "schema": { - "type": "integer", - "maximum": 100, - "minimum": 1, - "description": "Page size", - "default": 50, - "title": "Size" - }, - "description": "Page size" - } - ], - "responses": { - "200": { - "description": "Successful Response", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/Page_User_" - } - } - } - }, - "422": { - "description": "Validation Error", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/HTTPValidationError" - } - } - } - } - }, - "x-codeSamples": [ - { - "lang": "JavaScript", - "source": "import Honcho from 'honcho-ai';\n\nconst honcho = new Honcho({\n apiKey: process.env['HONCHO_AUTH_TOKEN'], // This is the default and can be omitted\n});\n\nasync function main() {\n // Automatically fetches more pages as needed.\n for await (const user of honcho.apps.users.list('182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e')) {\n console.log(user.id);\n }\n}\n\nmain();" - }, - { - "lang": "Python", - "source": "import os\nfrom honcho import Honcho\n\nclient = Honcho(\n # This is the default and can be omitted\n api_key=os.environ.get(\"HONCHO_AUTH_TOKEN\"),\n)\npage = client.apps.users.list(\n \"182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e\",\n)\nuser = page.items[0]\nprint(user.id)" - } - ] - } - }, - "/apps/{app_id}/users/name/{name}": { - "get": { - "tags": [ - "users" - ], - "summary": "Get User By Name", - "description": "Get a User\n\nArgs:\n app_id (uuid.UUID): The ID of the app representing the client application using\n honcho\n user_id (str): The User ID representing the user, managed by the user\n\nReturns:\n schemas.User: User object", - "operationId": "get_user_by_name_apps__app_id__users_name__name__get", - "security": [ - { - "HTTPBearer": [] - }, - {} - ], - "parameters": [ - { - "name": "app_id", - "in": "path", - "required": true, - "schema": { - "type": "string", - "format": "uuid", - "title": "App Id" - } - }, - { - "name": "name", - "in": "path", - "required": true, - "schema": { - "type": "string", - "title": "Name" - } - } - ], - "responses": { - "200": { - "description": "Successful Response", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/User" - } - } - } - }, - "422": { - "description": "Validation Error", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/HTTPValidationError" - } - } - } - } - }, - "x-codeSamples": [ - { - "lang": "JavaScript", - "source": "import Honcho from 'honcho-ai';\n\nconst honcho = new Honcho({\n apiKey: process.env['HONCHO_AUTH_TOKEN'], // This is the default and can be omitted\n});\n\nasync function main() {\n const user = await honcho.apps.users.getByName('182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e', 'string');\n\n console.log(user.id);\n}\n\nmain();" - }, - { - "lang": "Python", - "source": "import os\nfrom honcho import Honcho\n\nclient = Honcho(\n # This is the default and can be omitted\n api_key=os.environ.get(\"HONCHO_AUTH_TOKEN\"),\n)\nuser = client.apps.users.get_by_name(\n \"string\",\n app_id=\"182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e\",\n)\nprint(user.id)" - } - ] - } - }, - "/apps/{app_id}/users/{user_id}": { - "get": { - "tags": [ - "users" - ], - "summary": "Get User", - "description": "Get a User\n\nArgs:\n app_id (uuid.UUID): The ID of the app representing the client application using\n honcho\n user_id (str): The User ID representing the user, managed by the user\n\nReturns:\n schemas.User: User object", - "operationId": "get_user_apps__app_id__users__user_id__get", - "security": [ - { - "HTTPBearer": [] - }, - {} - ], - "parameters": [ - { - "name": "app_id", - "in": "path", - "required": true, - "schema": { - "type": "string", - "format": "uuid", - "title": "App Id" - } - }, - { - "name": "user_id", - "in": "path", - "required": true, - "schema": { - "type": "string", - "format": "uuid", - "title": "User Id" - } - } - ], - "responses": { - "200": { - "description": "Successful Response", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/User" - } - } - } - }, - "422": { - "description": "Validation Error", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/HTTPValidationError" - } - } - } - } - }, - "x-codeSamples": [ - { - "lang": "JavaScript", - "source": "import Honcho from 'honcho-ai';\n\nconst honcho = new Honcho({\n apiKey: process.env['HONCHO_AUTH_TOKEN'], // This is the default and can be omitted\n});\n\nasync function main() {\n const user = await honcho.apps.users.get(\n '182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e',\n '182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e',\n );\n\n console.log(user.id);\n}\n\nmain();" - }, - { - "lang": "Python", - "source": "import os\nfrom honcho import Honcho\n\nclient = Honcho(\n # This is the default and can be omitted\n api_key=os.environ.get(\"HONCHO_AUTH_TOKEN\"),\n)\nuser = client.apps.users.get(\n \"182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e\",\n app_id=\"182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e\",\n)\nprint(user.id)" - } - ] - }, - "put": { - "tags": [ - "users" - ], - "summary": "Update User", - "description": "Update a User\n\nArgs:\n app_id (uuid.UUID): The ID of the app representing the client application using\n honcho\n user_id (str): The User ID representing the user, managed by the user\n user (schemas.UserCreate): The User object containing any metadata\n\nReturns:\n schemas.User: Updated User object", - "operationId": "update_user_apps__app_id__users__user_id__put", - "security": [ - { - "HTTPBearer": [] - }, - {} - ], - "parameters": [ - { - "name": "app_id", - "in": "path", - "required": true, - "schema": { - "type": "string", - "format": "uuid", - "title": "App Id" - } - }, - { - "name": "user_id", - "in": "path", - "required": true, - "schema": { - "type": "string", - "format": "uuid", - "title": "User Id" - } - } - ], - "requestBody": { - "required": true, - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/UserUpdate" - } - } - } - }, - "responses": { - "200": { - "description": "Successful Response", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/User" - } - } - } - }, - "422": { - "description": "Validation Error", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/HTTPValidationError" - } - } - } - } - }, - "x-codeSamples": [ - { - "lang": "JavaScript", - "source": "import Honcho from 'honcho-ai';\n\nconst honcho = new Honcho({\n apiKey: process.env['HONCHO_AUTH_TOKEN'], // This is the default and can be omitted\n});\n\nasync function main() {\n const user = await honcho.apps.users.update(\n '182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e',\n '182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e',\n );\n\n console.log(user.id);\n}\n\nmain();" - }, - { - "lang": "Python", - "source": "import os\nfrom honcho import Honcho\n\nclient = Honcho(\n # This is the default and can be omitted\n api_key=os.environ.get(\"HONCHO_AUTH_TOKEN\"),\n)\nuser = client.apps.users.update(\n \"182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e\",\n app_id=\"182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e\",\n)\nprint(user.id)" - } - ] - } - }, - "/apps/{app_id}/users/get_or_create/{name}": { - "get": { - "tags": [ - "users" - ], - "summary": "Get Or Create User", - "description": "Get or Create a User\n\nArgs:\n app_id (uuid.UUID): The ID of the app representing the client application using\n honcho\n user_id (str): The User ID representing the user, managed by the user\n\nReturns:\n schemas.User: User object", - "operationId": "get_or_create_user_apps__app_id__users_get_or_create__name__get", - "security": [ - { - "HTTPBearer": [] - }, - {} - ], - "parameters": [ - { - "name": "app_id", - "in": "path", - "required": true, - "schema": { - "type": "string", - "format": "uuid", - "title": "App Id" - } - }, - { - "name": "name", - "in": "path", - "required": true, - "schema": { - "type": "string", - "title": "Name" - } - } - ], - "responses": { - "200": { - "description": "Successful Response", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/User" - } - } - } - }, - "422": { - "description": "Validation Error", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/HTTPValidationError" - } - } - } - } - }, - "x-codeSamples": [ - { - "lang": "JavaScript", - "source": "import Honcho from 'honcho-ai';\n\nconst honcho = new Honcho({\n apiKey: process.env['HONCHO_AUTH_TOKEN'], // This is the default and can be omitted\n});\n\nasync function main() {\n const user = await honcho.apps.users.getOrCreate('182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e', 'string');\n\n console.log(user.id);\n}\n\nmain();" - }, - { - "lang": "Python", - "source": "import os\nfrom honcho import Honcho\n\nclient = Honcho(\n # This is the default and can be omitted\n api_key=os.environ.get(\"HONCHO_AUTH_TOKEN\"),\n)\nuser = client.apps.users.get_or_create(\n \"string\",\n app_id=\"182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e\",\n)\nprint(user.id)" - } - ] - } - }, - "/apps/{app_id}/users/{user_id}/sessions": { - "get": { - "tags": [ - "sessions" - ], - "summary": "Get Sessions", - "description": "Get All Sessions for a User\n\nArgs:\n app_id (uuid.UUID): The ID of the app representing the client application using\n honcho\n user_id (uuid.UUID): The User ID representing the user, managed by the user\n location_id (str, optional): Optional Location ID representing the location of a\n session\n\nReturns:\n list[schemas.Session]: List of Session objects", - "operationId": "get_sessions_apps__app_id__users__user_id__sessions_get", - "security": [ - { - "HTTPBearer": [] - }, - {} - ], - "parameters": [ - { - "name": "app_id", - "in": "path", - "required": true, - "schema": { - "type": "string", - "format": "uuid", - "title": "App Id" - } - }, - { - "name": "user_id", - "in": "path", - "required": true, - "schema": { - "type": "string", - "format": "uuid", - "title": "User Id" - } - }, - { - "name": "location_id", - "in": "query", - "required": false, - "schema": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "title": "Location Id" - } - }, - { - "name": "is_active", - "in": "query", - "required": false, - "schema": { - "anyOf": [ - { - "type": "boolean" - }, - { - "type": "null" - } - ], - "default": false, - "title": "Is Active" - } - }, - { - "name": "reverse", - "in": "query", - "required": false, - "schema": { - "anyOf": [ - { - "type": "boolean" - }, - { - "type": "null" - } - ], - "default": false, - "title": "Reverse" - } - }, - { - "name": "filter", - "in": "query", - "required": false, - "schema": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "title": "Filter" - } - }, - { - "name": "page", - "in": "query", - "required": false, - "schema": { - "type": "integer", - "minimum": 1, - "description": "Page number", - "default": 1, - "title": "Page" - }, - "description": "Page number" - }, - { - "name": "size", - "in": "query", - "required": false, - "schema": { - "type": "integer", - "maximum": 100, - "minimum": 1, - "description": "Page size", - "default": 50, - "title": "Size" - }, - "description": "Page size" - } - ], - "responses": { - "200": { - "description": "Successful Response", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/Page_Session_" - } - } - } - }, - "422": { - "description": "Validation Error", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/HTTPValidationError" - } - } - } - } - }, - "x-codeSamples": [ - { - "lang": "JavaScript", - "source": "import Honcho from 'honcho-ai';\n\nconst honcho = new Honcho({\n apiKey: process.env['HONCHO_AUTH_TOKEN'], // This is the default and can be omitted\n});\n\nasync function main() {\n // Automatically fetches more pages as needed.\n for await (const session of honcho.apps.users.sessions.list(\n '182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e',\n '182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e',\n )) {\n console.log(session.id);\n }\n}\n\nmain();" - }, - { - "lang": "Python", - "source": "import os\nfrom honcho import Honcho\n\nclient = Honcho(\n # This is the default and can be omitted\n api_key=os.environ.get(\"HONCHO_AUTH_TOKEN\"),\n)\npage = client.apps.users.sessions.list(\n \"182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e\",\n app_id=\"182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e\",\n)\nsession = page.items[0]\nprint(session.id)" - } - ] - }, - "post": { - "tags": [ - "sessions" - ], - "summary": "Create Session", - "description": "Create a Session for a User\n\nArgs:\n app_id (uuid.UUID): The ID of the app representing the client\n application using honcho\n user_id (uuid.UUID): The User ID representing the user, managed by the user\n session (schemas.SessionCreate): The Session object containing any\n metadata and a location ID\n\nReturns:\n schemas.Session: The Session object of the new Session", - "operationId": "create_session_apps__app_id__users__user_id__sessions_post", - "security": [ - { - "HTTPBearer": [] - }, - {} - ], - "parameters": [ - { - "name": "app_id", - "in": "path", - "required": true, - "schema": { - "type": "string", - "format": "uuid", - "title": "App Id" - } - }, - { - "name": "user_id", - "in": "path", - "required": true, - "schema": { - "type": "string", - "format": "uuid", - "title": "User Id" - } - } - ], - "requestBody": { - "required": true, - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/SessionCreate" - } - } - } - }, - "responses": { - "200": { - "description": "Successful Response", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/Session" - } - } - } - }, - "422": { - "description": "Validation Error", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/HTTPValidationError" - } - } - } - } - }, - "x-codeSamples": [ - { - "lang": "JavaScript", - "source": "import Honcho from 'honcho-ai';\n\nconst honcho = new Honcho({\n apiKey: process.env['HONCHO_AUTH_TOKEN'], // This is the default and can be omitted\n});\n\nasync function main() {\n const session = await honcho.apps.users.sessions.create(\n '182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e',\n '182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e',\n { location_id: 'string' },\n );\n\n console.log(session.id);\n}\n\nmain();" - }, - { - "lang": "Python", - "source": "import os\nfrom honcho import Honcho\n\nclient = Honcho(\n # This is the default and can be omitted\n api_key=os.environ.get(\"HONCHO_AUTH_TOKEN\"),\n)\nsession = client.apps.users.sessions.create(\n \"182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e\",\n app_id=\"182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e\",\n location_id=\"string\",\n)\nprint(session.id)" - } - ] - } - }, - "/apps/{app_id}/users/{user_id}/sessions/{session_id}": { - "put": { - "tags": [ - "sessions" - ], - "summary": "Update Session", - "description": "Update the metadata of a Session\n\nArgs:\n app_id (uuid.UUID): The ID of the app representing the client application using\n honcho\n user_id (uuid.UUID): The User ID representing the user, managed by the user\n session_id (uuid.UUID): The ID of the Session to update\n session (schemas.SessionUpdate): The Session object containing any new metadata\n\nReturns:\n schemas.Session: The Session object of the updated Session", - "operationId": "update_session_apps__app_id__users__user_id__sessions__session_id__put", - "security": [ - { - "HTTPBearer": [] - }, - {} - ], - "parameters": [ - { - "name": "app_id", - "in": "path", - "required": true, - "schema": { - "type": "string", - "format": "uuid", - "title": "App Id" - } - }, - { - "name": "user_id", - "in": "path", - "required": true, - "schema": { - "type": "string", - "format": "uuid", - "title": "User Id" - } - }, - { - "name": "session_id", - "in": "path", - "required": true, - "schema": { - "type": "string", - "format": "uuid", - "title": "Session Id" - } - } - ], - "requestBody": { - "required": true, - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/SessionUpdate" - } - } - } - }, - "responses": { - "200": { - "description": "Successful Response", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/Session" - } - } - } - }, - "422": { - "description": "Validation Error", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/HTTPValidationError" - } - } - } - } - }, - "x-codeSamples": [ - { - "lang": "JavaScript", - "source": "import Honcho from 'honcho-ai';\n\nconst honcho = new Honcho({\n apiKey: process.env['HONCHO_AUTH_TOKEN'], // This is the default and can be omitted\n});\n\nasync function main() {\n const session = await honcho.apps.users.sessions.update(\n '182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e',\n '182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e',\n '182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e',\n );\n\n console.log(session.id);\n}\n\nmain();" - }, - { - "lang": "Python", - "source": "import os\nfrom honcho import Honcho\n\nclient = Honcho(\n # This is the default and can be omitted\n api_key=os.environ.get(\"HONCHO_AUTH_TOKEN\"),\n)\nsession = client.apps.users.sessions.update(\n \"182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e\",\n app_id=\"182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e\",\n user_id=\"182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e\",\n)\nprint(session.id)" - } - ] - }, - "delete": { - "tags": [ - "sessions" - ], - "summary": "Delete Session", - "description": "Delete a session by marking it as inactive\n\nArgs:\n app_id (uuid.UUID): The ID of the app representing the client application using\n honcho\n user_id (uuid.UUID): The User ID representing the user, managed by the user\n session_id (uuid.UUID): The ID of the Session to delete\n\nReturns:\n dict: A message indicating that the session was deleted\n\nRaises:\n HTTPException: If the session is not found", - "operationId": "delete_session_apps__app_id__users__user_id__sessions__session_id__delete", - "security": [ - { - "HTTPBearer": [] - }, - {} - ], - "parameters": [ - { - "name": "app_id", - "in": "path", - "required": true, - "schema": { - "type": "string", - "format": "uuid", - "title": "App Id" - } - }, - { - "name": "user_id", - "in": "path", - "required": true, - "schema": { - "type": "string", - "format": "uuid", - "title": "User Id" - } - }, - { - "name": "session_id", - "in": "path", - "required": true, - "schema": { - "type": "string", - "format": "uuid", - "title": "Session Id" - } - } - ], - "responses": { - "200": { - "description": "Successful Response", - "content": { - "application/json": { - "schema": {} - } - } - }, - "422": { - "description": "Validation Error", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/HTTPValidationError" - } - } - } - } - }, - "x-codeSamples": [ - { - "lang": "JavaScript", - "source": "import Honcho from 'honcho-ai';\n\nconst honcho = new Honcho({\n apiKey: process.env['HONCHO_AUTH_TOKEN'], // This is the default and can be omitted\n});\n\nasync function main() {\n const sessionDeleteResponse = await honcho.apps.users.sessions.delete(\n '182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e',\n '182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e',\n '182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e',\n );\n\n console.log(sessionDeleteResponse);\n}\n\nmain();" - }, - { - "lang": "Python", - "source": "import os\nfrom honcho import Honcho\n\nclient = Honcho(\n # This is the default and can be omitted\n api_key=os.environ.get(\"HONCHO_AUTH_TOKEN\"),\n)\nsession = client.apps.users.sessions.delete(\n \"182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e\",\n app_id=\"182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e\",\n user_id=\"182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e\",\n)\nprint(session)" - } - ] - }, - "get": { - "tags": [ - "sessions" - ], - "summary": "Get Session", - "description": "Get a specific session for a user by ID\n\nArgs:\n app_id (uuid.UUID): The ID of the app representing the client application using\n honcho\n user_id (uuid.UUID): The User ID representing the user, managed by the user\n session_id (uuid.UUID): The ID of the Session to retrieve\n\nReturns:\n schemas.Session: The Session object of the requested Session\n\nRaises:\n HTTPException: If the session is not found", - "operationId": "get_session_apps__app_id__users__user_id__sessions__session_id__get", - "security": [ - { - "HTTPBearer": [] - }, - {} - ], - "parameters": [ - { - "name": "app_id", - "in": "path", - "required": true, - "schema": { - "type": "string", - "format": "uuid", - "title": "App Id" - } - }, - { - "name": "user_id", - "in": "path", - "required": true, - "schema": { - "type": "string", - "format": "uuid", - "title": "User Id" - } - }, - { - "name": "session_id", - "in": "path", - "required": true, - "schema": { - "type": "string", - "format": "uuid", - "title": "Session Id" - } - } - ], - "responses": { - "200": { - "description": "Successful Response", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/Session" - } - } - } - }, - "422": { - "description": "Validation Error", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/HTTPValidationError" - } - } - } - } - }, - "x-codeSamples": [ - { - "lang": "JavaScript", - "source": "import Honcho from 'honcho-ai';\n\nconst honcho = new Honcho({\n apiKey: process.env['HONCHO_AUTH_TOKEN'], // This is the default and can be omitted\n});\n\nasync function main() {\n const session = await honcho.apps.users.sessions.get(\n '182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e',\n '182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e',\n '182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e',\n );\n\n console.log(session.id);\n}\n\nmain();" - }, - { - "lang": "Python", - "source": "import os\nfrom honcho import Honcho\n\nclient = Honcho(\n # This is the default and can be omitted\n api_key=os.environ.get(\"HONCHO_AUTH_TOKEN\"),\n)\nsession = client.apps.users.sessions.get(\n \"182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e\",\n app_id=\"182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e\",\n user_id=\"182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e\",\n)\nprint(session.id)" - } - ] - } - }, - "/apps/{app_id}/users/{user_id}/sessions/{session_id}/chat": { - "get": { - "tags": [ - "sessions" - ], - "summary": "Get Chat", - "operationId": "get_chat_apps__app_id__users__user_id__sessions__session_id__chat_get", - "security": [ - { - "HTTPBearer": [] - }, - {} - ], - "parameters": [ - { - "name": "app_id", - "in": "path", - "required": true, - "schema": { - "type": "string", - "format": "uuid", - "title": "App Id" - } - }, - { - "name": "user_id", - "in": "path", - "required": true, - "schema": { - "type": "string", - "format": "uuid", - "title": "User Id" - } - }, - { - "name": "session_id", - "in": "path", - "required": true, - "schema": { - "type": "string", - "format": "uuid", - "title": "Session Id" - } - }, - { - "name": "query", - "in": "query", - "required": true, - "schema": { - "type": "string", - "title": "Query" - } - } - ], - "responses": { - "200": { - "description": "Successful Response", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/AgentChat" - } - } - } - }, - "422": { - "description": "Validation Error", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/HTTPValidationError" - } - } - } - } - }, - "x-codeSamples": [ - { - "lang": "JavaScript", - "source": "import Honcho from 'honcho-ai';\n\nconst honcho = new Honcho({\n apiKey: process.env['HONCHO_AUTH_TOKEN'], // This is the default and can be omitted\n});\n\nasync function main() {\n const agentChat = await honcho.apps.users.sessions.chat(\n '182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e',\n '182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e',\n '182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e',\n { query: 'string' },\n );\n\n console.log(agentChat.content);\n}\n\nmain();" - }, - { - "lang": "Python", - "source": "import os\nfrom honcho import Honcho\n\nclient = Honcho(\n # This is the default and can be omitted\n api_key=os.environ.get(\"HONCHO_AUTH_TOKEN\"),\n)\nsession = client.apps.users.sessions.chat(\n \"182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e\",\n app_id=\"182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e\",\n user_id=\"182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e\",\n query=\"string\",\n)\nprint(session.content)" - } - ] - } - }, - "/apps/{app_id}/users/{user_id}/sessions/{session_id}/chat/stream": { - "get": { - "tags": [ - "sessions" - ], - "summary": "Get Chat Stream", - "operationId": "get_chat_stream_apps__app_id__users__user_id__sessions__session_id__chat_stream_get", - "security": [ - { - "HTTPBearer": [] - }, - {} - ], - "parameters": [ - { - "name": "app_id", - "in": "path", - "required": true, - "schema": { - "type": "string", - "format": "uuid", - "title": "App Id" - } - }, - { - "name": "user_id", - "in": "path", - "required": true, - "schema": { - "type": "string", - "format": "uuid", - "title": "User Id" - } - }, - { - "name": "session_id", - "in": "path", - "required": true, - "schema": { - "type": "string", - "format": "uuid", - "title": "Session Id" - } - }, - { - "name": "query", - "in": "query", - "required": true, - "schema": { - "type": "string", - "title": "Query" - } - } - ], - "responses": { - "200": { - "description": "Chat stream", - "content": { - "application/json": { - "schema": {} - }, - "text/event-stream": { - "schema": { - "type": "string", - "format": "binary" - } - } - } - }, - "422": { - "description": "Validation Error", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/HTTPValidationError" - } - } - } - } - }, - "x-codeSamples": [ - { - "lang": "JavaScript", - "source": "import Honcho from 'honcho-ai';\n\nconst honcho = new Honcho({\n apiKey: process.env['HONCHO_AUTH_TOKEN'], // This is the default and can be omitted\n});\n\nasync function main() {\n const sessionStreamResponse = await honcho.apps.users.sessions.stream(\n '182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e',\n '182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e',\n '182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e',\n { query: 'string' },\n );\n\n console.log(sessionStreamResponse);\n}\n\nmain();" - }, - { - "lang": "Python", - "source": "import os\nfrom honcho import Honcho\n\nclient = Honcho(\n # This is the default and can be omitted\n api_key=os.environ.get(\"HONCHO_AUTH_TOKEN\"),\n)\nsession = client.apps.users.sessions.stream(\n \"182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e\",\n app_id=\"182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e\",\n user_id=\"182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e\",\n query=\"string\",\n)\nprint(session)" - } - ] - } - }, - "/apps/{app_id}/users/{user_id}/sessions/{session_id}/messages": { - "post": { - "tags": [ - "messages" - ], - "summary": "Create Message For Session", - "description": "Adds a message to a session\n\nArgs:\n app_id (uuid.UUID): The ID of the app representing the client application using\n honcho\n user_id (str): The User ID representing the user, managed by the user\n session_id (int): The ID of the Session to add the message to\n message (schemas.MessageCreate): The Message object to add containing the\n message content and type\n\nReturns:\n schemas.Message: The Message object of the added message\n\nRaises:\n HTTPException: If the session is not found", - "operationId": "create_message_for_session_apps__app_id__users__user_id__sessions__session_id__messages_post", - "security": [ - { - "HTTPBearer": [] - }, - {} - ], - "parameters": [ - { - "name": "app_id", - "in": "path", - "required": true, - "schema": { - "type": "string", - "format": "uuid", - "title": "App Id" - } - }, - { - "name": "user_id", - "in": "path", - "required": true, - "schema": { - "type": "string", - "format": "uuid", - "title": "User Id" - } - }, - { - "name": "session_id", - "in": "path", - "required": true, - "schema": { - "type": "string", - "format": "uuid", - "title": "Session Id" - } - } - ], - "requestBody": { - "required": true, - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/MessageCreate" - } - } - } - }, - "responses": { - "200": { - "description": "Successful Response", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/Message" - } - } - } - }, - "422": { - "description": "Validation Error", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/HTTPValidationError" - } - } - } - } - }, - "x-codeSamples": [ - { - "lang": "JavaScript", - "source": "import Honcho from 'honcho-ai';\n\nconst honcho = new Honcho({\n apiKey: process.env['HONCHO_AUTH_TOKEN'], // This is the default and can be omitted\n});\n\nasync function main() {\n const message = await honcho.apps.users.sessions.messages.create(\n '182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e',\n '182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e',\n '182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e',\n { content: 'string', is_user: true },\n );\n\n console.log(message.id);\n}\n\nmain();" - }, - { - "lang": "Python", - "source": "import os\nfrom honcho import Honcho\n\nclient = Honcho(\n # This is the default and can be omitted\n api_key=os.environ.get(\"HONCHO_AUTH_TOKEN\"),\n)\nmessage = client.apps.users.sessions.messages.create(\n \"182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e\",\n app_id=\"182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e\",\n user_id=\"182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e\",\n content=\"string\",\n is_user=True,\n)\nprint(message.id)" - } - ] - }, - "get": { - "tags": [ - "messages" - ], - "summary": "Get Messages", - "description": "Get all messages for a session\n\nArgs:\n app_id (uuid.UUID): The ID of the app representing the client application using\n honcho\n user_id (str): The User ID representing the user, managed by the user\n session_id (int): The ID of the Session to retrieve\n reverse (bool): Whether to reverse the order of the messages\n\nReturns:\n list[schemas.Message]: List of Message objects\n\nRaises:\n HTTPException: If the session is not found", - "operationId": "get_messages_apps__app_id__users__user_id__sessions__session_id__messages_get", - "security": [ - { - "HTTPBearer": [] - }, - {} - ], - "parameters": [ - { - "name": "app_id", - "in": "path", - "required": true, - "schema": { - "type": "string", - "format": "uuid", - "title": "App Id" - } - }, - { - "name": "user_id", - "in": "path", - "required": true, - "schema": { - "type": "string", - "format": "uuid", - "title": "User Id" - } - }, - { - "name": "session_id", - "in": "path", - "required": true, - "schema": { - "type": "string", - "format": "uuid", - "title": "Session Id" - } - }, - { - "name": "reverse", - "in": "query", - "required": false, - "schema": { - "anyOf": [ - { - "type": "boolean" - }, - { - "type": "null" - } - ], - "default": false, - "title": "Reverse" - } - }, - { - "name": "filter", - "in": "query", - "required": false, - "schema": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "title": "Filter" - } - }, - { - "name": "page", - "in": "query", - "required": false, - "schema": { - "type": "integer", - "minimum": 1, - "description": "Page number", - "default": 1, - "title": "Page" - }, - "description": "Page number" - }, - { - "name": "size", - "in": "query", - "required": false, - "schema": { - "type": "integer", - "maximum": 100, - "minimum": 1, - "description": "Page size", - "default": 50, - "title": "Size" - }, - "description": "Page size" - } - ], - "responses": { - "200": { - "description": "Successful Response", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/Page_Message_" - } - } - } - }, - "422": { - "description": "Validation Error", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/HTTPValidationError" - } - } - } - } - }, - "x-codeSamples": [ - { - "lang": "JavaScript", - "source": "import Honcho from 'honcho-ai';\n\nconst honcho = new Honcho({\n apiKey: process.env['HONCHO_AUTH_TOKEN'], // This is the default and can be omitted\n});\n\nasync function main() {\n // Automatically fetches more pages as needed.\n for await (const message of honcho.apps.users.sessions.messages.list(\n '182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e',\n '182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e',\n '182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e',\n )) {\n console.log(message.id);\n }\n}\n\nmain();" - }, - { - "lang": "Python", - "source": "import os\nfrom honcho import Honcho\n\nclient = Honcho(\n # This is the default and can be omitted\n api_key=os.environ.get(\"HONCHO_AUTH_TOKEN\"),\n)\npage = client.apps.users.sessions.messages.list(\n \"182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e\",\n app_id=\"182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e\",\n user_id=\"182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e\",\n)\nmessage = page.items[0]\nprint(message.id)" - } - ] - } - }, - "/apps/{app_id}/users/{user_id}/sessions/{session_id}/messages/{message_id}": { - "get": { - "tags": [ - "messages" - ], - "summary": "Get Message", - "operationId": "get_message_apps__app_id__users__user_id__sessions__session_id__messages__message_id__get", - "security": [ - { - "HTTPBearer": [] - }, - {} - ], - "parameters": [ - { - "name": "app_id", - "in": "path", - "required": true, - "schema": { - "type": "string", - "format": "uuid", - "title": "App Id" - } - }, - { - "name": "user_id", - "in": "path", - "required": true, - "schema": { - "type": "string", - "format": "uuid", - "title": "User Id" - } - }, - { - "name": "session_id", - "in": "path", - "required": true, - "schema": { - "type": "string", - "format": "uuid", - "title": "Session Id" - } - }, - { - "name": "message_id", - "in": "path", - "required": true, - "schema": { - "type": "string", - "format": "uuid", - "title": "Message Id" - } - } - ], - "responses": { - "200": { - "description": "Successful Response", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/Message" - } - } - } - }, - "422": { - "description": "Validation Error", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/HTTPValidationError" - } - } - } - } - }, - "x-codeSamples": [ - { - "lang": "JavaScript", - "source": "import Honcho from 'honcho-ai';\n\nconst honcho = new Honcho({\n apiKey: process.env['HONCHO_AUTH_TOKEN'], // This is the default and can be omitted\n});\n\nasync function main() {\n const message = await honcho.apps.users.sessions.messages.get(\n '182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e',\n '182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e',\n '182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e',\n '182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e',\n );\n\n console.log(message.id);\n}\n\nmain();" - }, - { - "lang": "Python", - "source": "import os\nfrom honcho import Honcho\n\nclient = Honcho(\n # This is the default and can be omitted\n api_key=os.environ.get(\"HONCHO_AUTH_TOKEN\"),\n)\nmessage = client.apps.users.sessions.messages.get(\n \"182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e\",\n app_id=\"182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e\",\n user_id=\"182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e\",\n session_id=\"182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e\",\n)\nprint(message.id)" - } - ] - }, - "put": { - "tags": [ - "messages" - ], - "summary": "Update Message", - "description": "Update's the metadata of a message", - "operationId": "update_message_apps__app_id__users__user_id__sessions__session_id__messages__message_id__put", - "security": [ - { - "HTTPBearer": [] - }, - {} - ], - "parameters": [ - { - "name": "app_id", - "in": "path", - "required": true, - "schema": { - "type": "string", - "format": "uuid", - "title": "App Id" - } - }, - { - "name": "user_id", - "in": "path", - "required": true, - "schema": { - "type": "string", - "format": "uuid", - "title": "User Id" - } - }, - { - "name": "session_id", - "in": "path", - "required": true, - "schema": { - "type": "string", - "format": "uuid", - "title": "Session Id" - } - }, - { - "name": "message_id", - "in": "path", - "required": true, - "schema": { - "type": "string", - "format": "uuid", - "title": "Message Id" - } - } - ], - "requestBody": { - "required": true, - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/MessageUpdate" - } - } - } - }, - "responses": { - "200": { - "description": "Successful Response", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/Message" - } - } - } - }, - "422": { - "description": "Validation Error", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/HTTPValidationError" - } - } - } - } - }, - "x-codeSamples": [ - { - "lang": "JavaScript", - "source": "import Honcho from 'honcho-ai';\n\nconst honcho = new Honcho({\n apiKey: process.env['HONCHO_AUTH_TOKEN'], // This is the default and can be omitted\n});\n\nasync function main() {\n const message = await honcho.apps.users.sessions.messages.update(\n '182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e',\n '182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e',\n '182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e',\n '182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e',\n );\n\n console.log(message.id);\n}\n\nmain();" - }, - { - "lang": "Python", - "source": "import os\nfrom honcho import Honcho\n\nclient = Honcho(\n # This is the default and can be omitted\n api_key=os.environ.get(\"HONCHO_AUTH_TOKEN\"),\n)\nmessage = client.apps.users.sessions.messages.update(\n \"182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e\",\n app_id=\"182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e\",\n user_id=\"182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e\",\n session_id=\"182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e\",\n)\nprint(message.id)" - } - ] - } - }, - "/apps/{app_id}/users/{user_id}/sessions/{session_id}/metamessages": { - "post": { - "tags": [ - "messages" - ], - "summary": "Create Metamessage", - "description": "Adds a message to a session\n\nArgs:\n app_id (uuid.UUID): The ID of the app representing the client application using\n honcho\n user_id (str): The User ID representing the user, managed by the user\n session_id (int): The ID of the Session to add the message to\n message (schemas.MessageCreate): The Message object to add containing the\n message content and type\n\nReturns:\n schemas.Message: The Message object of the added message\n\nRaises:\n HTTPException: If the session is not found", - "operationId": "create_metamessage_apps__app_id__users__user_id__sessions__session_id__metamessages_post", - "security": [ - { - "HTTPBearer": [] - }, - {} - ], - "parameters": [ - { - "name": "app_id", - "in": "path", - "required": true, - "schema": { - "type": "string", - "format": "uuid", - "title": "App Id" - } - }, - { - "name": "user_id", - "in": "path", - "required": true, - "schema": { - "type": "string", - "format": "uuid", - "title": "User Id" - } - }, - { - "name": "session_id", - "in": "path", - "required": true, - "schema": { - "type": "string", - "format": "uuid", - "title": "Session Id" - } - } - ], - "requestBody": { - "required": true, - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/MetamessageCreate" - } - } - } - }, - "responses": { - "200": { - "description": "Successful Response", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/Metamessage" - } - } - } - }, - "422": { - "description": "Validation Error", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/HTTPValidationError" - } - } - } - } - }, - "x-codeSamples": [ - { - "lang": "JavaScript", - "source": "import Honcho from 'honcho-ai';\n\nconst honcho = new Honcho({\n apiKey: process.env['HONCHO_AUTH_TOKEN'], // This is the default and can be omitted\n});\n\nasync function main() {\n const metamessage = await honcho.apps.users.sessions.metamessages.create(\n '182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e',\n '182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e',\n '182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e',\n { content: 'string', message_id: '182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e', metamessage_type: 'string' },\n );\n\n console.log(metamessage.id);\n}\n\nmain();" - }, - { - "lang": "Python", - "source": "import os\nfrom honcho import Honcho\n\nclient = Honcho(\n # This is the default and can be omitted\n api_key=os.environ.get(\"HONCHO_AUTH_TOKEN\"),\n)\nmetamessage = client.apps.users.sessions.metamessages.create(\n \"182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e\",\n app_id=\"182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e\",\n user_id=\"182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e\",\n content=\"string\",\n message_id=\"182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e\",\n metamessage_type=\"string\",\n)\nprint(metamessage.id)" - } - ] - }, - "get": { - "tags": [ - "messages" - ], - "summary": "Get Metamessages", - "description": "Get all messages for a session\n\nArgs:\n app_id (uuid.UUID): The ID of the app representing the client application using\n honcho\n user_id (str): The User ID representing the user, managed by the user\n session_id (int): The ID of the Session to retrieve\n reverse (bool): Whether to reverse the order of the metamessages\n\nReturns:\n list[schemas.Message]: List of Message objects\n\nRaises:\n HTTPException: If the session is not found", - "operationId": "get_metamessages_apps__app_id__users__user_id__sessions__session_id__metamessages_get", - "security": [ - { - "HTTPBearer": [] - }, - {} - ], - "parameters": [ - { - "name": "app_id", - "in": "path", - "required": true, - "schema": { - "type": "string", - "format": "uuid", - "title": "App Id" - } - }, - { - "name": "user_id", - "in": "path", - "required": true, - "schema": { - "type": "string", - "format": "uuid", - "title": "User Id" - } - }, - { - "name": "session_id", - "in": "path", - "required": true, - "schema": { - "type": "string", - "format": "uuid", - "title": "Session Id" - } - }, - { - "name": "message_id", - "in": "query", - "required": false, - "schema": { - "anyOf": [ - { - "type": "string", - "format": "uuid" - }, - { - "type": "null" - } - ], - "title": "Message Id" - } - }, - { - "name": "metamessage_type", - "in": "query", - "required": false, - "schema": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "title": "Metamessage Type" - } - }, - { - "name": "reverse", - "in": "query", - "required": false, - "schema": { - "anyOf": [ - { - "type": "boolean" - }, - { - "type": "null" - } - ], - "default": false, - "title": "Reverse" - } - }, - { - "name": "filter", - "in": "query", - "required": false, - "schema": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "title": "Filter" - } - }, - { - "name": "page", - "in": "query", - "required": false, - "schema": { - "type": "integer", - "minimum": 1, - "description": "Page number", - "default": 1, - "title": "Page" - }, - "description": "Page number" - }, - { - "name": "size", - "in": "query", - "required": false, - "schema": { - "type": "integer", - "maximum": 100, - "minimum": 1, - "description": "Page size", - "default": 50, - "title": "Size" - }, - "description": "Page size" - } - ], - "responses": { - "200": { - "description": "Successful Response", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/Page_Metamessage_" - } - } - } - }, - "422": { - "description": "Validation Error", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/HTTPValidationError" - } - } - } - } - }, - "x-codeSamples": [ - { - "lang": "JavaScript", - "source": "import Honcho from 'honcho-ai';\n\nconst honcho = new Honcho({\n apiKey: process.env['HONCHO_AUTH_TOKEN'], // This is the default and can be omitted\n});\n\nasync function main() {\n // Automatically fetches more pages as needed.\n for await (const metamessage of honcho.apps.users.sessions.metamessages.list(\n '182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e',\n '182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e',\n '182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e',\n )) {\n console.log(metamessage.id);\n }\n}\n\nmain();" - }, - { - "lang": "Python", - "source": "import os\nfrom honcho import Honcho\n\nclient = Honcho(\n # This is the default and can be omitted\n api_key=os.environ.get(\"HONCHO_AUTH_TOKEN\"),\n)\npage = client.apps.users.sessions.metamessages.list(\n \"182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e\",\n app_id=\"182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e\",\n user_id=\"182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e\",\n)\nmetamessage = page.items[0]\nprint(metamessage.id)" - } - ] - } - }, - "/apps/{app_id}/users/{user_id}/sessions/{session_id}/metamessages/{metamessage_id}": { - "get": { - "tags": [ - "messages" - ], - "summary": "Get Metamessage", - "description": "Get a specific Metamessage by ID\n\nArgs:\n app_id (uuid.UUID): The ID of the app representing the client application using\n honcho\n user_id (str): The User ID representing the user, managed by the user\n session_id (int): The ID of the Session to retrieve\n\nReturns:\n schemas.Session: The Session object of the requested Session\n\nRaises:\n HTTPException: If the session is not found", - "operationId": "get_metamessage_apps__app_id__users__user_id__sessions__session_id__metamessages__metamessage_id__get", - "security": [ - { - "HTTPBearer": [] - }, - {} - ], - "parameters": [ - { - "name": "app_id", - "in": "path", - "required": true, - "schema": { - "type": "string", - "format": "uuid", - "title": "App Id" - } - }, - { - "name": "user_id", - "in": "path", - "required": true, - "schema": { - "type": "string", - "format": "uuid", - "title": "User Id" - } - }, - { - "name": "session_id", - "in": "path", - "required": true, - "schema": { - "type": "string", - "format": "uuid", - "title": "Session Id" - } - }, - { - "name": "metamessage_id", - "in": "path", - "required": true, - "schema": { - "type": "string", - "format": "uuid", - "title": "Metamessage Id" - } - }, - { - "name": "message_id", - "in": "query", - "required": true, - "schema": { - "type": "string", - "format": "uuid", - "title": "Message Id" - } - } - ], - "responses": { - "200": { - "description": "Successful Response", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/Metamessage" - } - } - } - }, - "422": { - "description": "Validation Error", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/HTTPValidationError" - } - } - } - } - }, - "x-codeSamples": [ - { - "lang": "JavaScript", - "source": "import Honcho from 'honcho-ai';\n\nconst honcho = new Honcho({\n apiKey: process.env['HONCHO_AUTH_TOKEN'], // This is the default and can be omitted\n});\n\nasync function main() {\n const metamessage = await honcho.apps.users.sessions.metamessages.get(\n '182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e',\n '182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e',\n '182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e',\n '182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e',\n { message_id: '182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e' },\n );\n\n console.log(metamessage.id);\n}\n\nmain();" - }, - { - "lang": "Python", - "source": "import os\nfrom honcho import Honcho\n\nclient = Honcho(\n # This is the default and can be omitted\n api_key=os.environ.get(\"HONCHO_AUTH_TOKEN\"),\n)\nmetamessage = client.apps.users.sessions.metamessages.get(\n \"182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e\",\n app_id=\"182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e\",\n user_id=\"182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e\",\n session_id=\"182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e\",\n message_id=\"182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e\",\n)\nprint(metamessage.id)" - } - ] - }, - "put": { - "tags": [ - "messages" - ], - "summary": "Update Metamessage", - "description": "Update's the metadata of a metamessage", - "operationId": "update_metamessage_apps__app_id__users__user_id__sessions__session_id__metamessages__metamessage_id__put", - "security": [ - { - "HTTPBearer": [] - }, - {} - ], - "parameters": [ - { - "name": "app_id", - "in": "path", - "required": true, - "schema": { - "type": "string", - "format": "uuid", - "title": "App Id" - } - }, - { - "name": "user_id", - "in": "path", - "required": true, - "schema": { - "type": "string", - "format": "uuid", - "title": "User Id" - } - }, - { - "name": "session_id", - "in": "path", - "required": true, - "schema": { - "type": "string", - "format": "uuid", - "title": "Session Id" - } - }, - { - "name": "metamessage_id", - "in": "path", - "required": true, - "schema": { - "type": "string", - "format": "uuid", - "title": "Metamessage Id" - } - } - ], - "requestBody": { - "required": true, - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/MetamessageUpdate" - } - } - } - }, - "responses": { - "200": { - "description": "Successful Response", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/Metamessage" - } - } - } - }, - "422": { - "description": "Validation Error", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/HTTPValidationError" - } - } - } - } - }, - "x-codeSamples": [ - { - "lang": "JavaScript", - "source": "import Honcho from 'honcho-ai';\n\nconst honcho = new Honcho({\n apiKey: process.env['HONCHO_AUTH_TOKEN'], // This is the default and can be omitted\n});\n\nasync function main() {\n const metamessage = await honcho.apps.users.sessions.metamessages.update(\n '182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e',\n '182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e',\n '182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e',\n '182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e',\n { message_id: '182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e' },\n );\n\n console.log(metamessage.id);\n}\n\nmain();" - }, - { - "lang": "Python", - "source": "import os\nfrom honcho import Honcho\n\nclient = Honcho(\n # This is the default and can be omitted\n api_key=os.environ.get(\"HONCHO_AUTH_TOKEN\"),\n)\nmetamessage = client.apps.users.sessions.metamessages.update(\n \"182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e\",\n app_id=\"182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e\",\n user_id=\"182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e\",\n session_id=\"182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e\",\n message_id=\"182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e\",\n)\nprint(metamessage.id)" - } - ] - } - }, - "/apps/{app_id}/users/{user_id}/collections": { - "get": { - "tags": [ - "collections" - ], - "summary": "Get Collections", - "description": "Get All Collections for a User\n\nArgs:\n app_id (uuid.UUID): The ID of the app representing the client\n application using honcho\n user_id (uuid.UUID): The User ID representing the user, managed by the user\n\nReturns:\n list[schemas.Collection]: List of Collection objects", - "operationId": "get_collections_apps__app_id__users__user_id__collections_get", - "security": [ - { - "HTTPBearer": [] - }, - {} - ], - "parameters": [ - { - "name": "app_id", - "in": "path", - "required": true, - "schema": { - "type": "string", - "format": "uuid", - "title": "App Id" - } - }, - { - "name": "user_id", - "in": "path", - "required": true, - "schema": { - "type": "string", - "format": "uuid", - "title": "User Id" - } - }, - { - "name": "reverse", - "in": "query", - "required": false, - "schema": { - "anyOf": [ - { - "type": "boolean" - }, - { - "type": "null" - } - ], - "default": false, - "title": "Reverse" - } - }, - { - "name": "filter", - "in": "query", - "required": false, - "schema": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "title": "Filter" - } - }, - { - "name": "page", - "in": "query", - "required": false, - "schema": { - "type": "integer", - "minimum": 1, - "description": "Page number", - "default": 1, - "title": "Page" - }, - "description": "Page number" - }, - { - "name": "size", - "in": "query", - "required": false, - "schema": { - "type": "integer", - "maximum": 100, - "minimum": 1, - "description": "Page size", - "default": 50, - "title": "Size" - }, - "description": "Page size" - } - ], - "responses": { - "200": { - "description": "Successful Response", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/Page_Collection_" - } - } - } - }, - "422": { - "description": "Validation Error", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/HTTPValidationError" - } - } - } - } - }, - "x-codeSamples": [ - { - "lang": "JavaScript", - "source": "import Honcho from 'honcho-ai';\n\nconst honcho = new Honcho({\n apiKey: process.env['HONCHO_AUTH_TOKEN'], // This is the default and can be omitted\n});\n\nasync function main() {\n // Automatically fetches more pages as needed.\n for await (const collection of honcho.apps.users.collections.list(\n '182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e',\n '182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e',\n )) {\n console.log(collection.id);\n }\n}\n\nmain();" - }, - { - "lang": "Python", - "source": "import os\nfrom honcho import Honcho\n\nclient = Honcho(\n # This is the default and can be omitted\n api_key=os.environ.get(\"HONCHO_AUTH_TOKEN\"),\n)\npage = client.apps.users.collections.list(\n \"182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e\",\n app_id=\"182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e\",\n)\ncollection = page.items[0]\nprint(collection.id)" - } - ] - }, - "post": { - "tags": [ - "collections" - ], - "summary": "Create Collection", - "operationId": "create_collection_apps__app_id__users__user_id__collections_post", - "security": [ - { - "HTTPBearer": [] - }, - {} - ], - "parameters": [ - { - "name": "app_id", - "in": "path", - "required": true, - "schema": { - "type": "string", - "format": "uuid", - "title": "App Id" - } - }, - { - "name": "user_id", - "in": "path", - "required": true, - "schema": { - "type": "string", - "format": "uuid", - "title": "User Id" - } - } - ], - "requestBody": { - "required": true, - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/CollectionCreate" - } - } - } - }, - "responses": { - "200": { - "description": "Successful Response", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/Collection" - } - } - } - }, - "422": { - "description": "Validation Error", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/HTTPValidationError" - } - } - } - } - }, - "x-codeSamples": [ - { - "lang": "JavaScript", - "source": "import Honcho from 'honcho-ai';\n\nconst honcho = new Honcho({\n apiKey: process.env['HONCHO_AUTH_TOKEN'], // This is the default and can be omitted\n});\n\nasync function main() {\n const collection = await honcho.apps.users.collections.create(\n '182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e',\n '182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e',\n { name: 'string' },\n );\n\n console.log(collection.id);\n}\n\nmain();" - }, - { - "lang": "Python", - "source": "import os\nfrom honcho import Honcho\n\nclient = Honcho(\n # This is the default and can be omitted\n api_key=os.environ.get(\"HONCHO_AUTH_TOKEN\"),\n)\ncollection = client.apps.users.collections.create(\n \"182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e\",\n app_id=\"182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e\",\n name=\"string\",\n)\nprint(collection.id)" - } - ] - } - }, - "/apps/{app_id}/users/{user_id}/collections/name/{name}": { - "get": { - "tags": [ - "collections" - ], - "summary": "Get Collection By Name", - "operationId": "get_collection_by_name_apps__app_id__users__user_id__collections_name__name__get", - "security": [ - { - "HTTPBearer": [] - }, - {} - ], - "parameters": [ - { - "name": "app_id", - "in": "path", - "required": true, - "schema": { - "type": "string", - "format": "uuid", - "title": "App Id" - } - }, - { - "name": "user_id", - "in": "path", - "required": true, - "schema": { - "type": "string", - "format": "uuid", - "title": "User Id" - } - }, - { - "name": "name", - "in": "path", - "required": true, - "schema": { - "type": "string", - "title": "Name" - } - } - ], - "responses": { - "200": { - "description": "Successful Response", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/Collection" - } - } - } - }, - "422": { - "description": "Validation Error", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/HTTPValidationError" - } - } - } - } - }, - "x-codeSamples": [ - { - "lang": "JavaScript", - "source": "import Honcho from 'honcho-ai';\n\nconst honcho = new Honcho({\n apiKey: process.env['HONCHO_AUTH_TOKEN'], // This is the default and can be omitted\n});\n\nasync function main() {\n const collection = await honcho.apps.users.collections.getByName(\n '182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e',\n '182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e',\n 'string',\n );\n\n console.log(collection.id);\n}\n\nmain();" - }, - { - "lang": "Python", - "source": "import os\nfrom honcho import Honcho\n\nclient = Honcho(\n # This is the default and can be omitted\n api_key=os.environ.get(\"HONCHO_AUTH_TOKEN\"),\n)\ncollection = client.apps.users.collections.get_by_name(\n \"string\",\n app_id=\"182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e\",\n user_id=\"182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e\",\n)\nprint(collection.id)" - } - ] - } - }, - "/apps/{app_id}/users/{user_id}/collections/{collection_id}": { - "get": { - "tags": [ - "collections" - ], - "summary": "Get Collection By Id", - "operationId": "get_collection_by_id_apps__app_id__users__user_id__collections__collection_id__get", - "security": [ - { - "HTTPBearer": [] - }, - {} - ], - "parameters": [ - { - "name": "app_id", - "in": "path", - "required": true, - "schema": { - "type": "string", - "format": "uuid", - "title": "App Id" - } - }, - { - "name": "user_id", - "in": "path", - "required": true, - "schema": { - "type": "string", - "format": "uuid", - "title": "User Id" - } - }, - { - "name": "collection_id", - "in": "path", - "required": true, - "schema": { - "type": "string", - "format": "uuid", - "title": "Collection Id" - } - } - ], - "responses": { - "200": { - "description": "Successful Response", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/Collection" - } - } - } - }, - "422": { - "description": "Validation Error", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/HTTPValidationError" - } - } - } - } - }, - "x-codeSamples": [ - { - "lang": "JavaScript", - "source": "import Honcho from 'honcho-ai';\n\nconst honcho = new Honcho({\n apiKey: process.env['HONCHO_AUTH_TOKEN'], // This is the default and can be omitted\n});\n\nasync function main() {\n const collection = await honcho.apps.users.collections.get(\n '182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e',\n '182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e',\n '182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e',\n );\n\n console.log(collection.id);\n}\n\nmain();" - }, - { - "lang": "Python", - "source": "import os\nfrom honcho import Honcho\n\nclient = Honcho(\n # This is the default and can be omitted\n api_key=os.environ.get(\"HONCHO_AUTH_TOKEN\"),\n)\ncollection = client.apps.users.collections.get(\n \"182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e\",\n app_id=\"182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e\",\n user_id=\"182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e\",\n)\nprint(collection.id)" - } - ] - }, - "put": { - "tags": [ - "collections" - ], - "summary": "Update Collection", - "operationId": "update_collection_apps__app_id__users__user_id__collections__collection_id__put", - "security": [ - { - "HTTPBearer": [] - }, - {} - ], - "parameters": [ - { - "name": "app_id", - "in": "path", - "required": true, - "schema": { - "type": "string", - "format": "uuid", - "title": "App Id" - } - }, - { - "name": "user_id", - "in": "path", - "required": true, - "schema": { - "type": "string", - "format": "uuid", - "title": "User Id" - } - }, - { - "name": "collection_id", - "in": "path", - "required": true, - "schema": { - "type": "string", - "format": "uuid", - "title": "Collection Id" - } - } - ], - "requestBody": { - "required": true, - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/CollectionUpdate" - } - } - } - }, - "responses": { - "200": { - "description": "Successful Response", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/Collection" - } - } - } - }, - "422": { - "description": "Validation Error", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/HTTPValidationError" - } - } - } - } - }, - "x-codeSamples": [ - { - "lang": "JavaScript", - "source": "import Honcho from 'honcho-ai';\n\nconst honcho = new Honcho({\n apiKey: process.env['HONCHO_AUTH_TOKEN'], // This is the default and can be omitted\n});\n\nasync function main() {\n const collection = await honcho.apps.users.collections.update(\n '182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e',\n '182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e',\n '182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e',\n { name: 'string' },\n );\n\n console.log(collection.id);\n}\n\nmain();" - }, - { - "lang": "Python", - "source": "import os\nfrom honcho import Honcho\n\nclient = Honcho(\n # This is the default and can be omitted\n api_key=os.environ.get(\"HONCHO_AUTH_TOKEN\"),\n)\ncollection = client.apps.users.collections.update(\n \"182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e\",\n app_id=\"182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e\",\n user_id=\"182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e\",\n name=\"string\",\n)\nprint(collection.id)" - } - ] - }, - "delete": { - "tags": [ - "collections" - ], - "summary": "Delete Collection", - "operationId": "delete_collection_apps__app_id__users__user_id__collections__collection_id__delete", - "security": [ - { - "HTTPBearer": [] - }, - {} - ], - "parameters": [ - { - "name": "app_id", - "in": "path", - "required": true, - "schema": { - "type": "string", - "format": "uuid", - "title": "App Id" - } - }, - { - "name": "user_id", - "in": "path", - "required": true, - "schema": { - "type": "string", - "format": "uuid", - "title": "User Id" - } - }, - { - "name": "collection_id", - "in": "path", - "required": true, - "schema": { - "type": "string", - "format": "uuid", - "title": "Collection Id" - } - } - ], - "responses": { - "200": { - "description": "Successful Response", - "content": { - "application/json": { - "schema": {} - } - } - }, - "422": { - "description": "Validation Error", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/HTTPValidationError" - } - } - } - } - }, - "x-codeSamples": [ - { - "lang": "JavaScript", - "source": "import Honcho from 'honcho-ai';\n\nconst honcho = new Honcho({\n apiKey: process.env['HONCHO_AUTH_TOKEN'], // This is the default and can be omitted\n});\n\nasync function main() {\n const collectionDeleteResponse = await honcho.apps.users.collections.delete(\n '182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e',\n '182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e',\n '182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e',\n );\n\n console.log(collectionDeleteResponse);\n}\n\nmain();" - }, - { - "lang": "Python", - "source": "import os\nfrom honcho import Honcho\n\nclient = Honcho(\n # This is the default and can be omitted\n api_key=os.environ.get(\"HONCHO_AUTH_TOKEN\"),\n)\ncollection = client.apps.users.collections.delete(\n \"182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e\",\n app_id=\"182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e\",\n user_id=\"182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e\",\n)\nprint(collection)" - } - ] - } - }, - "/apps/{app_id}/users/{user_id}/collections/{collection_id}/documents": { - "get": { - "tags": [ - "documents" - ], - "summary": "Get Documents", - "operationId": "get_documents_apps__app_id__users__user_id__collections__collection_id__documents_get", - "security": [ - { - "HTTPBearer": [] - }, - {} - ], - "parameters": [ - { - "name": "app_id", - "in": "path", - "required": true, - "schema": { - "type": "string", - "format": "uuid", - "title": "App Id" - } - }, - { - "name": "user_id", - "in": "path", - "required": true, - "schema": { - "type": "string", - "format": "uuid", - "title": "User Id" - } - }, - { - "name": "collection_id", - "in": "path", - "required": true, - "schema": { - "type": "string", - "format": "uuid", - "title": "Collection Id" - } - }, - { - "name": "reverse", - "in": "query", - "required": false, - "schema": { - "anyOf": [ - { - "type": "boolean" - }, - { - "type": "null" - } - ], - "default": false, - "title": "Reverse" - } - }, - { - "name": "filter", - "in": "query", - "required": false, - "schema": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "title": "Filter" - } - }, - { - "name": "page", - "in": "query", - "required": false, - "schema": { - "type": "integer", - "minimum": 1, - "description": "Page number", - "default": 1, - "title": "Page" - }, - "description": "Page number" - }, - { - "name": "size", - "in": "query", - "required": false, - "schema": { - "type": "integer", - "maximum": 100, - "minimum": 1, - "description": "Page size", - "default": 50, - "title": "Size" - }, - "description": "Page size" - } - ], - "responses": { - "200": { - "description": "Successful Response", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/Page_Document_" - } - } - } - }, - "422": { - "description": "Validation Error", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/HTTPValidationError" - } - } - } - } - }, - "x-codeSamples": [ - { - "lang": "JavaScript", - "source": "import Honcho from 'honcho-ai';\n\nconst honcho = new Honcho({\n apiKey: process.env['HONCHO_AUTH_TOKEN'], // This is the default and can be omitted\n});\n\nasync function main() {\n // Automatically fetches more pages as needed.\n for await (const document of honcho.apps.users.collections.documents.list(\n '182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e',\n '182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e',\n '182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e',\n )) {\n console.log(document.id);\n }\n}\n\nmain();" - }, - { - "lang": "Python", - "source": "import os\nfrom honcho import Honcho\n\nclient = Honcho(\n # This is the default and can be omitted\n api_key=os.environ.get(\"HONCHO_AUTH_TOKEN\"),\n)\npage = client.apps.users.collections.documents.list(\n \"182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e\",\n app_id=\"182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e\",\n user_id=\"182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e\",\n)\ndocument = page.items[0]\nprint(document.id)" - } - ] - }, - "post": { - "tags": [ - "documents" - ], - "summary": "Create Document", - "operationId": "create_document_apps__app_id__users__user_id__collections__collection_id__documents_post", - "security": [ - { - "HTTPBearer": [] - }, - {} - ], - "parameters": [ - { - "name": "app_id", - "in": "path", - "required": true, - "schema": { - "type": "string", - "format": "uuid", - "title": "App Id" - } - }, - { - "name": "user_id", - "in": "path", - "required": true, - "schema": { - "type": "string", - "format": "uuid", - "title": "User Id" - } - }, - { - "name": "collection_id", - "in": "path", - "required": true, - "schema": { - "type": "string", - "format": "uuid", - "title": "Collection Id" - } - } - ], - "requestBody": { - "required": true, - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/DocumentCreate" - } - } - } - }, - "responses": { - "200": { - "description": "Successful Response", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/Document" - } - } - } - }, - "422": { - "description": "Validation Error", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/HTTPValidationError" - } - } - } - } - }, - "x-codeSamples": [ - { - "lang": "JavaScript", - "source": "import Honcho from 'honcho-ai';\n\nconst honcho = new Honcho({\n apiKey: process.env['HONCHO_AUTH_TOKEN'], // This is the default and can be omitted\n});\n\nasync function main() {\n const document = await honcho.apps.users.collections.documents.create(\n '182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e',\n '182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e',\n '182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e',\n { content: 'string' },\n );\n\n console.log(document.id);\n}\n\nmain();" - }, - { - "lang": "Python", - "source": "import os\nfrom honcho import Honcho\n\nclient = Honcho(\n # This is the default and can be omitted\n api_key=os.environ.get(\"HONCHO_AUTH_TOKEN\"),\n)\ndocument = client.apps.users.collections.documents.create(\n \"182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e\",\n app_id=\"182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e\",\n user_id=\"182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e\",\n content=\"string\",\n)\nprint(document.id)" - } - ] - } - }, - "/apps/{app_id}/users/{user_id}/collections/{collection_id}/documents/{document_id}": { - "get": { - "tags": [ - "documents" - ], - "summary": "Get Document", - "operationId": "get_document_apps__app_id__users__user_id__collections__collection_id__documents__document_id__get", - "security": [ - { - "HTTPBearer": [] - }, - {} - ], - "parameters": [ - { - "name": "app_id", - "in": "path", - "required": true, - "schema": { - "type": "string", - "format": "uuid", - "title": "App Id" - } - }, - { - "name": "user_id", - "in": "path", - "required": true, - "schema": { - "type": "string", - "format": "uuid", - "title": "User Id" - } - }, - { - "name": "collection_id", - "in": "path", - "required": true, - "schema": { - "type": "string", - "format": "uuid", - "title": "Collection Id" - } - }, - { - "name": "document_id", - "in": "path", - "required": true, - "schema": { - "type": "string", - "format": "uuid", - "title": "Document Id" - } - } - ], - "responses": { - "200": { - "description": "Successful Response", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/Document" - } - } - } - }, - "422": { - "description": "Validation Error", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/HTTPValidationError" - } - } - } - } - }, - "x-codeSamples": [ - { - "lang": "JavaScript", - "source": "import Honcho from 'honcho-ai';\n\nconst honcho = new Honcho({\n apiKey: process.env['HONCHO_AUTH_TOKEN'], // This is the default and can be omitted\n});\n\nasync function main() {\n const document = await honcho.apps.users.collections.documents.get(\n '182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e',\n '182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e',\n '182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e',\n '182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e',\n );\n\n console.log(document.id);\n}\n\nmain();" - }, - { - "lang": "Python", - "source": "import os\nfrom honcho import Honcho\n\nclient = Honcho(\n # This is the default and can be omitted\n api_key=os.environ.get(\"HONCHO_AUTH_TOKEN\"),\n)\ndocument = client.apps.users.collections.documents.get(\n \"182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e\",\n app_id=\"182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e\",\n user_id=\"182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e\",\n collection_id=\"182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e\",\n)\nprint(document.id)" - } - ] - }, - "put": { - "tags": [ - "documents" - ], - "summary": "Update Document", - "operationId": "update_document_apps__app_id__users__user_id__collections__collection_id__documents__document_id__put", - "security": [ - { - "HTTPBearer": [] - }, - {} - ], - "parameters": [ - { - "name": "app_id", - "in": "path", - "required": true, - "schema": { - "type": "string", - "format": "uuid", - "title": "App Id" - } - }, - { - "name": "user_id", - "in": "path", - "required": true, - "schema": { - "type": "string", - "format": "uuid", - "title": "User Id" - } - }, - { - "name": "collection_id", - "in": "path", - "required": true, - "schema": { - "type": "string", - "format": "uuid", - "title": "Collection Id" - } - }, - { - "name": "document_id", - "in": "path", - "required": true, - "schema": { - "type": "string", - "format": "uuid", - "title": "Document Id" - } - } - ], - "requestBody": { - "required": true, - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/DocumentUpdate" - } - } - } - }, - "responses": { - "200": { - "description": "Successful Response", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/Document" - } - } - } - }, - "422": { - "description": "Validation Error", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/HTTPValidationError" - } - } - } - } - }, - "x-codeSamples": [ - { - "lang": "JavaScript", - "source": "import Honcho from 'honcho-ai';\n\nconst honcho = new Honcho({\n apiKey: process.env['HONCHO_AUTH_TOKEN'], // This is the default and can be omitted\n});\n\nasync function main() {\n const document = await honcho.apps.users.collections.documents.update(\n '182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e',\n '182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e',\n '182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e',\n '182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e',\n );\n\n console.log(document.id);\n}\n\nmain();" - }, - { - "lang": "Python", - "source": "import os\nfrom honcho import Honcho\n\nclient = Honcho(\n # This is the default and can be omitted\n api_key=os.environ.get(\"HONCHO_AUTH_TOKEN\"),\n)\ndocument = client.apps.users.collections.documents.update(\n \"182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e\",\n app_id=\"182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e\",\n user_id=\"182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e\",\n collection_id=\"182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e\",\n)\nprint(document.id)" - } - ] - }, - "delete": { - "tags": [ - "documents" - ], - "summary": "Delete Document", - "operationId": "delete_document_apps__app_id__users__user_id__collections__collection_id__documents__document_id__delete", - "security": [ - { - "HTTPBearer": [] - }, - {} - ], - "parameters": [ - { - "name": "app_id", - "in": "path", - "required": true, - "schema": { - "type": "string", - "format": "uuid", - "title": "App Id" - } - }, - { - "name": "user_id", - "in": "path", - "required": true, - "schema": { - "type": "string", - "format": "uuid", - "title": "User Id" - } - }, - { - "name": "collection_id", - "in": "path", - "required": true, - "schema": { - "type": "string", - "format": "uuid", - "title": "Collection Id" - } - }, - { - "name": "document_id", - "in": "path", - "required": true, - "schema": { - "type": "string", - "format": "uuid", - "title": "Document Id" - } - } - ], - "responses": { - "200": { - "description": "Successful Response", - "content": { - "application/json": { - "schema": {} - } - } - }, - "422": { - "description": "Validation Error", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/HTTPValidationError" - } - } - } - } - }, - "x-codeSamples": [ - { - "lang": "JavaScript", - "source": "import Honcho from 'honcho-ai';\n\nconst honcho = new Honcho({\n apiKey: process.env['HONCHO_AUTH_TOKEN'], // This is the default and can be omitted\n});\n\nasync function main() {\n const documentDeleteResponse = await honcho.apps.users.collections.documents.delete(\n '182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e',\n '182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e',\n '182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e',\n '182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e',\n );\n\n console.log(documentDeleteResponse);\n}\n\nmain();" - }, - { - "lang": "Python", - "source": "import os\nfrom honcho import Honcho\n\nclient = Honcho(\n # This is the default and can be omitted\n api_key=os.environ.get(\"HONCHO_AUTH_TOKEN\"),\n)\ndocument = client.apps.users.collections.documents.delete(\n \"182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e\",\n app_id=\"182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e\",\n user_id=\"182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e\",\n collection_id=\"182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e\",\n)\nprint(document)" - } - ] - } - }, - "/apps/{app_id}/users/{user_id}/collections/{collection_id}/query": { - "get": { - "tags": [ - "documents" - ], - "summary": "Query Documents", - "operationId": "query_documents_apps__app_id__users__user_id__collections__collection_id__query_get", - "security": [ - { - "HTTPBearer": [] - }, - {} - ], - "parameters": [ - { - "name": "app_id", - "in": "path", - "required": true, - "schema": { - "type": "string", - "format": "uuid", - "title": "App Id" - } - }, - { - "name": "user_id", - "in": "path", - "required": true, - "schema": { - "type": "string", - "format": "uuid", - "title": "User Id" - } - }, - { - "name": "collection_id", - "in": "path", - "required": true, - "schema": { - "type": "string", - "format": "uuid", - "title": "Collection Id" - } - }, - { - "name": "query", - "in": "query", - "required": true, - "schema": { - "type": "string", - "title": "Query" - } - }, - { - "name": "top_k", - "in": "query", - "required": false, - "schema": { - "type": "integer", - "default": 5, - "title": "Top K" - } - }, - { - "name": "filter", - "in": "query", - "required": false, - "schema": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "title": "Filter" - } - } - ], - "responses": { - "200": { - "description": "Successful Response", - "content": { - "application/json": { - "schema": { - "type": "array", - "items": { - "$ref": "#/components/schemas/Document" - }, - "title": "Response Query Documents Apps App Id Users User Id Collections Collection Id Query Get" - } - } - } - }, - "422": { - "description": "Validation Error", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/HTTPValidationError" - } - } - } - } - }, - "x-codeSamples": [ - { - "lang": "JavaScript", - "source": "import Honcho from 'honcho-ai';\n\nconst honcho = new Honcho({\n apiKey: process.env['HONCHO_AUTH_TOKEN'], // This is the default and can be omitted\n});\n\nasync function main() {\n const collectionQueryResponse = await honcho.apps.users.collections.query(\n '182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e',\n '182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e',\n '182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e',\n { query: 'string' },\n );\n\n console.log(collectionQueryResponse);\n}\n\nmain();" - }, - { - "lang": "Python", - "source": "import os\nfrom honcho import Honcho\n\nclient = Honcho(\n # This is the default and can be omitted\n api_key=os.environ.get(\"HONCHO_AUTH_TOKEN\"),\n)\ncollection = client.apps.users.collections.query(\n \"182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e\",\n app_id=\"182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e\",\n user_id=\"182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e\",\n query=\"string\",\n)\nprint(collection)" - } - ] - } - } - }, - "components": { - "schemas": { - "AgentChat": { - "properties": { - "content": { - "type": "string", - "title": "Content" - } - }, - "type": "object", - "required": [ - "content" - ], - "title": "AgentChat" - }, - "App": { - "properties": { - "id": { - "type": "string", - "format": "uuid", - "title": "Id" - }, - "name": { - "type": "string", - "title": "Name" - }, - "metadata": { - "type": "object", - "title": "Metadata" - }, - "created_at": { - "type": "string", - "format": "date-time", - "title": "Created At" - } - }, - "type": "object", - "required": [ - "id", - "name", - "metadata", - "created_at" - ], - "title": "App", - "exclude": [ - "h_metadata" - ] - }, - "AppCreate": { - "properties": { - "name": { - "type": "string", - "title": "Name" - }, - "metadata": { - "anyOf": [ - { - "type": "object" - }, - { - "type": "null" - } - ], - "title": "Metadata", - "default": {} - } - }, - "type": "object", - "required": [ - "name" - ], - "title": "AppCreate" - }, - "AppUpdate": { - "properties": { - "name": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "title": "Name" - }, - "metadata": { - "anyOf": [ - { - "type": "object" - }, - { - "type": "null" - } - ], - "title": "Metadata" - } - }, - "type": "object", - "title": "AppUpdate" - }, - "Collection": { - "properties": { - "id": { - "type": "string", - "format": "uuid", - "title": "Id" - }, - "name": { - "type": "string", - "title": "Name" - }, - "user_id": { - "type": "string", - "format": "uuid", - "title": "User Id" - }, - "metadata": { - "type": "object", - "title": "Metadata" - }, - "created_at": { - "type": "string", - "format": "date-time", - "title": "Created At" - } - }, - "type": "object", - "required": [ - "id", - "name", - "user_id", - "metadata", - "created_at" - ], - "title": "Collection", - "exclude": [ - "h_metadata" - ] - }, - "CollectionCreate": { - "properties": { - "name": { - "type": "string", - "title": "Name" - }, - "metadata": { - "anyOf": [ - { - "type": "object" - }, - { - "type": "null" - } - ], - "title": "Metadata", - "default": {} - } - }, - "type": "object", - "required": [ - "name" - ], - "title": "CollectionCreate" - }, - "CollectionUpdate": { - "properties": { - "name": { - "type": "string", - "title": "Name" - }, - "metadata": { - "anyOf": [ - { - "type": "object" - }, - { - "type": "null" - } - ], - "title": "Metadata" - } - }, - "type": "object", - "required": [ - "name" - ], - "title": "CollectionUpdate" - }, - "Document": { - "properties": { - "content": { - "type": "string", - "title": "Content" - }, - "id": { - "type": "string", - "format": "uuid", - "title": "Id" - }, - "metadata": { - "type": "object", - "title": "Metadata" - }, - "created_at": { - "type": "string", - "format": "date-time", - "title": "Created At" - }, - "collection_id": { - "type": "string", - "format": "uuid", - "title": "Collection Id" - } - }, - "type": "object", - "required": [ - "content", - "id", - "metadata", - "created_at", - "collection_id" - ], - "title": "Document", - "exclude": [ - "h_metadata" - ] - }, - "DocumentCreate": { - "properties": { - "content": { - "type": "string", - "title": "Content" - }, - "metadata": { - "anyOf": [ - { - "type": "object" - }, - { - "type": "null" - } - ], - "title": "Metadata", - "default": {} - } - }, - "type": "object", - "required": [ - "content" - ], - "title": "DocumentCreate" - }, - "DocumentUpdate": { - "properties": { - "content": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "title": "Content" - }, - "metadata": { - "anyOf": [ - { - "type": "object" - }, - { - "type": "null" - } - ], - "title": "Metadata" - } - }, - "type": "object", - "title": "DocumentUpdate" - }, - "HTTPValidationError": { - "properties": { - "detail": { - "items": { - "$ref": "#/components/schemas/ValidationError" - }, - "type": "array", - "title": "Detail" - } - }, - "type": "object", - "title": "HTTPValidationError" - }, - "Message": { - "properties": { - "content": { - "type": "string", - "title": "Content" - }, - "is_user": { - "type": "boolean", - "title": "Is User" - }, - "session_id": { - "type": "string", - "format": "uuid", - "title": "Session Id" - }, - "id": { - "type": "string", - "format": "uuid", - "title": "Id" - }, - "metadata": { - "type": "object", - "title": "Metadata" - }, - "created_at": { - "type": "string", - "format": "date-time", - "title": "Created At" - } - }, - "type": "object", - "required": [ - "content", - "is_user", - "session_id", - "id", - "metadata", - "created_at" - ], - "title": "Message", - "exclude": [ - "h_metadata" - ] - }, - "MessageCreate": { - "properties": { - "content": { - "type": "string", - "title": "Content" - }, - "is_user": { - "type": "boolean", - "title": "Is User" - }, - "metadata": { - "anyOf": [ - { - "type": "object" - }, - { - "type": "null" - } - ], - "title": "Metadata", - "default": {} - } - }, - "type": "object", - "required": [ - "content", - "is_user" - ], - "title": "MessageCreate" - }, - "MessageUpdate": { - "properties": { - "metadata": { - "anyOf": [ - { - "type": "object" - }, - { - "type": "null" - } - ], - "title": "Metadata" - } - }, - "type": "object", - "title": "MessageUpdate" - }, - "Metamessage": { - "properties": { - "metamessage_type": { - "type": "string", - "title": "Metamessage Type" - }, - "content": { - "type": "string", - "title": "Content" - }, - "id": { - "type": "string", - "format": "uuid", - "title": "Id" - }, - "message_id": { - "type": "string", - "format": "uuid", - "title": "Message Id" - }, - "metadata": { - "type": "object", - "title": "Metadata" - }, - "created_at": { - "type": "string", - "format": "date-time", - "title": "Created At" - } - }, - "type": "object", - "required": [ - "metamessage_type", - "content", - "id", - "message_id", - "metadata", - "created_at" - ], - "title": "Metamessage", - "exclude": [ - "h_metadata" - ] - }, - "MetamessageCreate": { - "properties": { - "metamessage_type": { - "type": "string", - "title": "Metamessage Type" - }, - "content": { - "type": "string", - "title": "Content" - }, - "message_id": { - "type": "string", - "format": "uuid", - "title": "Message Id" - }, - "metadata": { - "anyOf": [ - { - "type": "object" - }, - { - "type": "null" - } - ], - "title": "Metadata", - "default": {} - } - }, - "type": "object", - "required": [ - "metamessage_type", - "content", - "message_id" - ], - "title": "MetamessageCreate" - }, - "MetamessageUpdate": { - "properties": { - "message_id": { - "type": "string", - "format": "uuid", - "title": "Message Id" - }, - "metamessage_type": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "title": "Metamessage Type" - }, - "metadata": { - "anyOf": [ - { - "type": "object" - }, - { - "type": "null" - } - ], - "title": "Metadata" - } - }, - "type": "object", - "required": [ - "message_id" - ], - "title": "MetamessageUpdate" - }, - "Page_Collection_": { - "properties": { - "items": { - "items": { - "$ref": "#/components/schemas/Collection" - }, - "type": "array", - "title": "Items" - }, - "total": { - "type": "integer", - "minimum": 0, - "title": "Total" - }, - "page": { - "type": "integer", - "minimum": 1, - "title": "Page" - }, - "size": { - "type": "integer", - "minimum": 1, - "title": "Size" - }, - "pages": { - "type": "integer", - "minimum": 0, - "title": "Pages" - } - }, - "type": "object", - "required": [ - "items", - "total", - "page", - "size" - ], - "title": "Page[Collection]" - }, - "Page_Document_": { - "properties": { - "items": { - "items": { - "$ref": "#/components/schemas/Document" - }, - "type": "array", - "title": "Items" - }, - "total": { - "type": "integer", - "minimum": 0, - "title": "Total" - }, - "page": { - "type": "integer", - "minimum": 1, - "title": "Page" - }, - "size": { - "type": "integer", - "minimum": 1, - "title": "Size" - }, - "pages": { - "type": "integer", - "minimum": 0, - "title": "Pages" - } - }, - "type": "object", - "required": [ - "items", - "total", - "page", - "size" - ], - "title": "Page[Document]" - }, - "Page_Message_": { - "properties": { - "items": { - "items": { - "$ref": "#/components/schemas/Message" - }, - "type": "array", - "title": "Items" - }, - "total": { - "type": "integer", - "minimum": 0, - "title": "Total" - }, - "page": { - "type": "integer", - "minimum": 1, - "title": "Page" - }, - "size": { - "type": "integer", - "minimum": 1, - "title": "Size" - }, - "pages": { - "type": "integer", - "minimum": 0, - "title": "Pages" - } - }, - "type": "object", - "required": [ - "items", - "total", - "page", - "size" - ], - "title": "Page[Message]" - }, - "Page_Metamessage_": { - "properties": { - "items": { - "items": { - "$ref": "#/components/schemas/Metamessage" - }, - "type": "array", - "title": "Items" - }, - "total": { - "type": "integer", - "minimum": 0, - "title": "Total" - }, - "page": { - "type": "integer", - "minimum": 1, - "title": "Page" - }, - "size": { - "type": "integer", - "minimum": 1, - "title": "Size" - }, - "pages": { - "type": "integer", - "minimum": 0, - "title": "Pages" - } - }, - "type": "object", - "required": [ - "items", - "total", - "page", - "size" - ], - "title": "Page[Metamessage]" - }, - "Page_Session_": { - "properties": { - "items": { - "items": { - "$ref": "#/components/schemas/Session" - }, - "type": "array", - "title": "Items" - }, - "total": { - "type": "integer", - "minimum": 0, - "title": "Total" - }, - "page": { - "type": "integer", - "minimum": 1, - "title": "Page" - }, - "size": { - "type": "integer", - "minimum": 1, - "title": "Size" - }, - "pages": { - "type": "integer", - "minimum": 0, - "title": "Pages" - } - }, - "type": "object", - "required": [ - "items", - "total", - "page", - "size" - ], - "title": "Page[Session]" - }, - "Page_User_": { - "properties": { - "items": { - "items": { - "$ref": "#/components/schemas/User" - }, - "type": "array", - "title": "Items" - }, - "total": { - "type": "integer", - "minimum": 0, - "title": "Total" - }, - "page": { - "type": "integer", - "minimum": 1, - "title": "Page" - }, - "size": { - "type": "integer", - "minimum": 1, - "title": "Size" - }, - "pages": { - "type": "integer", - "minimum": 0, - "title": "Pages" - } - }, - "type": "object", - "required": [ - "items", - "total", - "page", - "size" - ], - "title": "Page[User]" - }, - "Session": { - "properties": { - "id": { - "type": "string", - "format": "uuid", - "title": "Id" - }, - "is_active": { - "type": "boolean", - "title": "Is Active" - }, - "user_id": { - "type": "string", - "format": "uuid", - "title": "User Id" - }, - "location_id": { - "type": "string", - "title": "Location Id" - }, - "metadata": { - "type": "object", - "title": "Metadata" - }, - "created_at": { - "type": "string", - "format": "date-time", - "title": "Created At" - } - }, - "type": "object", - "required": [ - "id", - "is_active", - "user_id", - "location_id", - "metadata", - "created_at" - ], - "title": "Session", - "exclude": [ - "h_metadata" - ] - }, - "SessionCreate": { - "properties": { - "location_id": { - "type": "string", - "title": "Location Id" - }, - "metadata": { - "anyOf": [ - { - "type": "object" - }, - { - "type": "null" - } - ], - "title": "Metadata", - "default": {} - } - }, - "type": "object", - "required": [ - "location_id" - ], - "title": "SessionCreate" - }, - "SessionUpdate": { - "properties": { - "metadata": { - "anyOf": [ - { - "type": "object" - }, - { - "type": "null" - } - ], - "title": "Metadata" - } - }, - "type": "object", - "title": "SessionUpdate" - }, - "User": { - "properties": { - "id": { - "type": "string", - "format": "uuid", - "title": "Id" - }, - "name": { - "type": "string", - "title": "Name" - }, - "app_id": { - "type": "string", - "format": "uuid", - "title": "App Id" - }, - "created_at": { - "type": "string", - "format": "date-time", - "title": "Created At" - }, - "metadata": { - "type": "object", - "title": "Metadata" - } - }, - "type": "object", - "required": [ - "id", - "name", - "app_id", - "created_at", - "metadata" - ], - "title": "User", - "exclude": [ - "h_metadata" - ] - }, - "UserCreate": { - "properties": { - "name": { - "type": "string", - "title": "Name" - }, - "metadata": { - "anyOf": [ - { - "type": "object" - }, - { - "type": "null" - } - ], - "title": "Metadata", - "default": {} - } - }, - "type": "object", - "required": [ - "name" - ], - "title": "UserCreate" - }, - "UserUpdate": { - "properties": { - "name": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "title": "Name" - }, - "metadata": { - "anyOf": [ - { - "type": "object" - }, - { - "type": "null" - } - ], - "title": "Metadata" - } - }, - "type": "object", - "title": "UserUpdate" - }, - "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": { - "HTTPBearer": { - "type": "http", - "scheme": "bearer" - } - } - } -} +{"openapi":"3.1.0","info":{"title":"Honcho API","summary":"An API for adding personalization to AI Apps","description":"This API is used to store data and get insights about users for AI\n applications","version":"0.1.0"},"servers":[{"url":"http://127.0.0.1:8000","description":"Local Development Server"},{"url":"https:/demo.honcho.dev","description":"Demo Server"}],"paths":{"/apps/{app_id}":{"get":{"tags":["apps"],"summary":"Get App","description":"Get an App by ID\n\nArgs:\n app_id (uuid.UUID): The ID of the app\n\nReturns:\n schemas.App: App object","operationId":"get_app_apps__app_id__get","security":[{"HTTPBearer":[]},{}],"parameters":[{"name":"app_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"App Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/App"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"x-codeSamples":[{"lang":"JavaScript","source":"import Honcho from 'honcho-ai';\n\nconst honcho = new Honcho({\n apiKey: process.env['HONCHO_AUTH_TOKEN'], // This is the default and can be omitted\n});\n\nasync function main() {\n const app = await honcho.apps.get('182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e');\n\n console.log(app.id);\n}\n\nmain();"},{"lang":"Python","source":"import os\nfrom honcho import Honcho\n\nclient = Honcho(\n # This is the default and can be omitted\n api_key=os.environ.get(\"HONCHO_AUTH_TOKEN\"),\n)\napp = client.apps.get(\n \"182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e\",\n)\nprint(app.id)"}]},"put":{"tags":["apps"],"summary":"Update App","description":"Update an App\n\nArgs:\n app_id (uuid.UUID): The ID of the app to update\n app (schemas.AppUpdate): The App object containing any new metadata\n\nReturns:\n schemas.App: The App object of the updated App","operationId":"update_app_apps__app_id__put","security":[{"HTTPBearer":[]},{}],"parameters":[{"name":"app_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"App Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AppUpdate"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/App"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"x-codeSamples":[{"lang":"JavaScript","source":"import Honcho from 'honcho-ai';\n\nconst honcho = new Honcho({\n apiKey: process.env['HONCHO_AUTH_TOKEN'], // This is the default and can be omitted\n});\n\nasync function main() {\n const app = await honcho.apps.update('182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e');\n\n console.log(app.id);\n}\n\nmain();"},{"lang":"Python","source":"import os\nfrom honcho import Honcho\n\nclient = Honcho(\n # This is the default and can be omitted\n api_key=os.environ.get(\"HONCHO_AUTH_TOKEN\"),\n)\napp = client.apps.update(\n \"182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e\",\n)\nprint(app.id)"}]}},"/apps/name/{name}":{"get":{"tags":["apps"],"summary":"Get App By Name","description":"Get an App by Name\n\nArgs:\n app_name (str): The name of the app\n\nReturns:\n schemas.App: App object","operationId":"get_app_by_name_apps_name__name__get","security":[{"HTTPBearer":[]},{}],"parameters":[{"name":"name","in":"path","required":true,"schema":{"type":"string","title":"Name"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/App"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"x-codeSamples":[{"lang":"JavaScript","source":"import Honcho from 'honcho-ai';\n\nconst honcho = new Honcho({\n apiKey: process.env['HONCHO_AUTH_TOKEN'], // This is the default and can be omitted\n});\n\nasync function main() {\n const app = await honcho.apps.getByName('string');\n\n console.log(app.id);\n}\n\nmain();"},{"lang":"Python","source":"import os\nfrom honcho import Honcho\n\nclient = Honcho(\n # This is the default and can be omitted\n api_key=os.environ.get(\"HONCHO_AUTH_TOKEN\"),\n)\napp = client.apps.get_by_name(\n \"string\",\n)\nprint(app.id)"}]}},"/apps":{"post":{"tags":["apps"],"summary":"Create App","description":"Create an App\n\nArgs:\n app (schemas.AppCreate): The App object containing any metadata\n\nReturns:\n schemas.App: Created App object","operationId":"create_app_apps_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AppCreate"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/App"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]},{}],"x-codeSamples":[{"lang":"JavaScript","source":"import Honcho from 'honcho-ai';\n\nconst honcho = new Honcho({\n apiKey: process.env['HONCHO_AUTH_TOKEN'], // This is the default and can be omitted\n});\n\nasync function main() {\n const app = await honcho.apps.create({ name: 'string' });\n\n console.log(app.id);\n}\n\nmain();"},{"lang":"Python","source":"import os\nfrom honcho import Honcho\n\nclient = Honcho(\n # This is the default and can be omitted\n api_key=os.environ.get(\"HONCHO_AUTH_TOKEN\"),\n)\napp = client.apps.create(\n name=\"string\",\n)\nprint(app.id)"}]}},"/apps/get_or_create/{name}":{"get":{"tags":["apps"],"summary":"Get Or Create App","description":"Get or Create an App\n\nArgs:\n app_name (str): The name of the app\n\nReturns:\n schemas.App: App object","operationId":"get_or_create_app_apps_get_or_create__name__get","security":[{"HTTPBearer":[]},{}],"parameters":[{"name":"name","in":"path","required":true,"schema":{"type":"string","title":"Name"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/App"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"x-codeSamples":[{"lang":"JavaScript","source":"import Honcho from 'honcho-ai';\n\nconst honcho = new Honcho({\n apiKey: process.env['HONCHO_AUTH_TOKEN'], // This is the default and can be omitted\n});\n\nasync function main() {\n const app = await honcho.apps.getOrCreate('string');\n\n console.log(app.id);\n}\n\nmain();"},{"lang":"Python","source":"import os\nfrom honcho import Honcho\n\nclient = Honcho(\n # This is the default and can be omitted\n api_key=os.environ.get(\"HONCHO_AUTH_TOKEN\"),\n)\napp = client.apps.get_or_create(\n \"string\",\n)\nprint(app.id)"}]}},"/apps/{app_id}/users":{"post":{"tags":["users"],"summary":"Create User","description":"Create a User\n\nArgs:\n app_id (uuid.UUID): The ID of the app representing the client application using\n honcho\n user (schemas.UserCreate): The User object containing any metadata\n\nReturns:\n schemas.User: Created User object","operationId":"create_user_apps__app_id__users_post","security":[{"HTTPBearer":[]},{}],"parameters":[{"name":"app_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"App Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UserCreate"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/User"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"x-codeSamples":[{"lang":"JavaScript","source":"import Honcho from 'honcho-ai';\n\nconst honcho = new Honcho({\n apiKey: process.env['HONCHO_AUTH_TOKEN'], // This is the default and can be omitted\n});\n\nasync function main() {\n const user = await honcho.apps.users.create('182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e', { name: 'string' });\n\n console.log(user.id);\n}\n\nmain();"},{"lang":"Python","source":"import os\nfrom honcho import Honcho\n\nclient = Honcho(\n # This is the default and can be omitted\n api_key=os.environ.get(\"HONCHO_AUTH_TOKEN\"),\n)\nuser = client.apps.users.create(\n \"182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e\",\n name=\"string\",\n)\nprint(user.id)"}]},"get":{"tags":["users"],"summary":"Get Users","description":"Get All Users for an App\n\nArgs:\n app_id (uuid.UUID): The ID of the app representing the client\n application using honcho\n\nReturns:\n list[schemas.User]: List of User objects","operationId":"get_users_apps__app_id__users_get","security":[{"HTTPBearer":[]},{}],"parameters":[{"name":"app_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"App Id"}},{"name":"reverse","in":"query","required":false,"schema":{"type":"boolean","default":false,"title":"Reverse"}},{"name":"filter","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Filter"}},{"name":"page","in":"query","required":false,"schema":{"type":"integer","minimum":1,"description":"Page number","default":1,"title":"Page"},"description":"Page number"},{"name":"size","in":"query","required":false,"schema":{"type":"integer","maximum":100,"minimum":1,"description":"Page size","default":50,"title":"Size"},"description":"Page size"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Page_User_"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"x-codeSamples":[{"lang":"JavaScript","source":"import Honcho from 'honcho-ai';\n\nconst honcho = new Honcho({\n apiKey: process.env['HONCHO_AUTH_TOKEN'], // This is the default and can be omitted\n});\n\nasync function main() {\n // Automatically fetches more pages as needed.\n for await (const user of honcho.apps.users.list('182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e')) {\n console.log(user.id);\n }\n}\n\nmain();"},{"lang":"Python","source":"import os\nfrom honcho import Honcho\n\nclient = Honcho(\n # This is the default and can be omitted\n api_key=os.environ.get(\"HONCHO_AUTH_TOKEN\"),\n)\npage = client.apps.users.list(\n \"182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e\",\n)\nuser = page.items[0]\nprint(user.id)"}]}},"/apps/{app_id}/users/name/{name}":{"get":{"tags":["users"],"summary":"Get User By Name","description":"Get a User\n\nArgs:\n app_id (uuid.UUID): The ID of the app representing the client application using\n honcho\n user_id (str): The User ID representing the user, managed by the user\n\nReturns:\n schemas.User: User object","operationId":"get_user_by_name_apps__app_id__users_name__name__get","security":[{"HTTPBearer":[]},{}],"parameters":[{"name":"app_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"App Id"}},{"name":"name","in":"path","required":true,"schema":{"type":"string","title":"Name"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/User"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"x-codeSamples":[{"lang":"JavaScript","source":"import Honcho from 'honcho-ai';\n\nconst honcho = new Honcho({\n apiKey: process.env['HONCHO_AUTH_TOKEN'], // This is the default and can be omitted\n});\n\nasync function main() {\n const user = await honcho.apps.users.getByName('182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e', 'string');\n\n console.log(user.id);\n}\n\nmain();"},{"lang":"Python","source":"import os\nfrom honcho import Honcho\n\nclient = Honcho(\n # This is the default and can be omitted\n api_key=os.environ.get(\"HONCHO_AUTH_TOKEN\"),\n)\nuser = client.apps.users.get_by_name(\n \"string\",\n app_id=\"182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e\",\n)\nprint(user.id)"}]}},"/apps/{app_id}/users/{user_id}":{"get":{"tags":["users"],"summary":"Get User","description":"Get a User\n\nArgs:\n app_id (uuid.UUID): The ID of the app representing the client application using\n honcho\n user_id (str): The User ID representing the user, managed by the user\n\nReturns:\n schemas.User: User object","operationId":"get_user_apps__app_id__users__user_id__get","security":[{"HTTPBearer":[]},{}],"parameters":[{"name":"app_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"App Id"}},{"name":"user_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"User Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/User"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"x-codeSamples":[{"lang":"JavaScript","source":"import Honcho from 'honcho-ai';\n\nconst honcho = new Honcho({\n apiKey: process.env['HONCHO_AUTH_TOKEN'], // This is the default and can be omitted\n});\n\nasync function main() {\n const user = await honcho.apps.users.get(\n '182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e',\n '182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e',\n );\n\n console.log(user.id);\n}\n\nmain();"},{"lang":"Python","source":"import os\nfrom honcho import Honcho\n\nclient = Honcho(\n # This is the default and can be omitted\n api_key=os.environ.get(\"HONCHO_AUTH_TOKEN\"),\n)\nuser = client.apps.users.get(\n \"182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e\",\n app_id=\"182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e\",\n)\nprint(user.id)"}]},"put":{"tags":["users"],"summary":"Update User","description":"Update a User\n\nArgs:\n app_id (uuid.UUID): The ID of the app representing the client application using\n honcho\n user_id (str): The User ID representing the user, managed by the user\n user (schemas.UserCreate): The User object containing any metadata\n\nReturns:\n schemas.User: Updated User object","operationId":"update_user_apps__app_id__users__user_id__put","security":[{"HTTPBearer":[]},{}],"parameters":[{"name":"app_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"App Id"}},{"name":"user_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"User Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UserUpdate"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/User"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"x-codeSamples":[{"lang":"JavaScript","source":"import Honcho from 'honcho-ai';\n\nconst honcho = new Honcho({\n apiKey: process.env['HONCHO_AUTH_TOKEN'], // This is the default and can be omitted\n});\n\nasync function main() {\n const user = await honcho.apps.users.update(\n '182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e',\n '182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e',\n );\n\n console.log(user.id);\n}\n\nmain();"},{"lang":"Python","source":"import os\nfrom honcho import Honcho\n\nclient = Honcho(\n # This is the default and can be omitted\n api_key=os.environ.get(\"HONCHO_AUTH_TOKEN\"),\n)\nuser = client.apps.users.update(\n \"182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e\",\n app_id=\"182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e\",\n)\nprint(user.id)"}]}},"/apps/{app_id}/users/get_or_create/{name}":{"get":{"tags":["users"],"summary":"Get Or Create User","description":"Get or Create a User\n\nArgs:\n app_id (uuid.UUID): The ID of the app representing the client application using\n honcho\n user_id (str): The User ID representing the user, managed by the user\n\nReturns:\n schemas.User: User object","operationId":"get_or_create_user_apps__app_id__users_get_or_create__name__get","security":[{"HTTPBearer":[]},{}],"parameters":[{"name":"app_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"App Id"}},{"name":"name","in":"path","required":true,"schema":{"type":"string","title":"Name"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/User"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"x-codeSamples":[{"lang":"JavaScript","source":"import Honcho from 'honcho-ai';\n\nconst honcho = new Honcho({\n apiKey: process.env['HONCHO_AUTH_TOKEN'], // This is the default and can be omitted\n});\n\nasync function main() {\n const user = await honcho.apps.users.getOrCreate('182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e', 'string');\n\n console.log(user.id);\n}\n\nmain();"},{"lang":"Python","source":"import os\nfrom honcho import Honcho\n\nclient = Honcho(\n # This is the default and can be omitted\n api_key=os.environ.get(\"HONCHO_AUTH_TOKEN\"),\n)\nuser = client.apps.users.get_or_create(\n \"string\",\n app_id=\"182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e\",\n)\nprint(user.id)"}]}},"/apps/{app_id}/users/{user_id}/sessions":{"get":{"tags":["sessions"],"summary":"Get Sessions","description":"Get All Sessions for a User\n\nArgs:\n app_id (uuid.UUID): The ID of the app representing the client application using\n honcho\n user_id (uuid.UUID): The User ID representing the user, managed by the user\n location_id (str, optional): Optional Location ID representing the location of a\n session\n\nReturns:\n list[schemas.Session]: List of Session objects","operationId":"get_sessions_apps__app_id__users__user_id__sessions_get","security":[{"HTTPBearer":[]},{}],"parameters":[{"name":"app_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"App Id"}},{"name":"user_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"User Id"}},{"name":"location_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Location Id"}},{"name":"is_active","in":"query","required":false,"schema":{"anyOf":[{"type":"boolean"},{"type":"null"}],"default":false,"title":"Is Active"}},{"name":"reverse","in":"query","required":false,"schema":{"anyOf":[{"type":"boolean"},{"type":"null"}],"default":false,"title":"Reverse"}},{"name":"filter","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Filter"}},{"name":"page","in":"query","required":false,"schema":{"type":"integer","minimum":1,"description":"Page number","default":1,"title":"Page"},"description":"Page number"},{"name":"size","in":"query","required":false,"schema":{"type":"integer","maximum":100,"minimum":1,"description":"Page size","default":50,"title":"Size"},"description":"Page size"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Page_Session_"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"x-codeSamples":[{"lang":"JavaScript","source":"import Honcho from 'honcho-ai';\n\nconst honcho = new Honcho({\n apiKey: process.env['HONCHO_AUTH_TOKEN'], // This is the default and can be omitted\n});\n\nasync function main() {\n // Automatically fetches more pages as needed.\n for await (const session of honcho.apps.users.sessions.list(\n '182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e',\n '182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e',\n )) {\n console.log(session.id);\n }\n}\n\nmain();"},{"lang":"Python","source":"import os\nfrom honcho import Honcho\n\nclient = Honcho(\n # This is the default and can be omitted\n api_key=os.environ.get(\"HONCHO_AUTH_TOKEN\"),\n)\npage = client.apps.users.sessions.list(\n \"182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e\",\n app_id=\"182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e\",\n)\nsession = page.items[0]\nprint(session.id)"}]},"post":{"tags":["sessions"],"summary":"Create Session","description":"Create a Session for a User\n\nArgs:\n app_id (uuid.UUID): The ID of the app representing the client\n application using honcho\n user_id (uuid.UUID): The User ID representing the user, managed by the user\n session (schemas.SessionCreate): The Session object containing any\n metadata and a location ID\n\nReturns:\n schemas.Session: The Session object of the new Session","operationId":"create_session_apps__app_id__users__user_id__sessions_post","security":[{"HTTPBearer":[]},{}],"parameters":[{"name":"app_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"App Id"}},{"name":"user_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"User Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SessionCreate"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Session"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"x-codeSamples":[{"lang":"JavaScript","source":"import Honcho from 'honcho-ai';\n\nconst honcho = new Honcho({\n apiKey: process.env['HONCHO_AUTH_TOKEN'], // This is the default and can be omitted\n});\n\nasync function main() {\n const session = await honcho.apps.users.sessions.create(\n '182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e',\n '182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e',\n { location_id: 'string' },\n );\n\n console.log(session.id);\n}\n\nmain();"},{"lang":"Python","source":"import os\nfrom honcho import Honcho\n\nclient = Honcho(\n # This is the default and can be omitted\n api_key=os.environ.get(\"HONCHO_AUTH_TOKEN\"),\n)\nsession = client.apps.users.sessions.create(\n \"182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e\",\n app_id=\"182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e\",\n location_id=\"string\",\n)\nprint(session.id)"}]}},"/apps/{app_id}/users/{user_id}/sessions/{session_id}":{"put":{"tags":["sessions"],"summary":"Update Session","description":"Update the metadata of a Session\n\nArgs:\n app_id (uuid.UUID): The ID of the app representing the client application using\n honcho\n user_id (uuid.UUID): The User ID representing the user, managed by the user\n session_id (uuid.UUID): The ID of the Session to update\n session (schemas.SessionUpdate): The Session object containing any new metadata\n\nReturns:\n schemas.Session: The Session object of the updated Session","operationId":"update_session_apps__app_id__users__user_id__sessions__session_id__put","security":[{"HTTPBearer":[]},{}],"parameters":[{"name":"app_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"App Id"}},{"name":"user_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"User Id"}},{"name":"session_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Session Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SessionUpdate"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Session"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"x-codeSamples":[{"lang":"JavaScript","source":"import Honcho from 'honcho-ai';\n\nconst honcho = new Honcho({\n apiKey: process.env['HONCHO_AUTH_TOKEN'], // This is the default and can be omitted\n});\n\nasync function main() {\n const session = await honcho.apps.users.sessions.update(\n '182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e',\n '182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e',\n '182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e',\n );\n\n console.log(session.id);\n}\n\nmain();"},{"lang":"Python","source":"import os\nfrom honcho import Honcho\n\nclient = Honcho(\n # This is the default and can be omitted\n api_key=os.environ.get(\"HONCHO_AUTH_TOKEN\"),\n)\nsession = client.apps.users.sessions.update(\n \"182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e\",\n app_id=\"182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e\",\n user_id=\"182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e\",\n)\nprint(session.id)"}]},"delete":{"tags":["sessions"],"summary":"Delete Session","description":"Delete a session by marking it as inactive\n\nArgs:\n app_id (uuid.UUID): The ID of the app representing the client application using\n honcho\n user_id (uuid.UUID): The User ID representing the user, managed by the user\n session_id (uuid.UUID): The ID of the Session to delete\n\nReturns:\n dict: A message indicating that the session was deleted\n\nRaises:\n HTTPException: If the session is not found","operationId":"delete_session_apps__app_id__users__user_id__sessions__session_id__delete","security":[{"HTTPBearer":[]},{}],"parameters":[{"name":"app_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"App Id"}},{"name":"user_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"User Id"}},{"name":"session_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Session Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"x-codeSamples":[{"lang":"JavaScript","source":"import Honcho from 'honcho-ai';\n\nconst honcho = new Honcho({\n apiKey: process.env['HONCHO_AUTH_TOKEN'], // This is the default and can be omitted\n});\n\nasync function main() {\n const sessionDeleteResponse = await honcho.apps.users.sessions.delete(\n '182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e',\n '182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e',\n '182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e',\n );\n\n console.log(sessionDeleteResponse);\n}\n\nmain();"},{"lang":"Python","source":"import os\nfrom honcho import Honcho\n\nclient = Honcho(\n # This is the default and can be omitted\n api_key=os.environ.get(\"HONCHO_AUTH_TOKEN\"),\n)\nsession = client.apps.users.sessions.delete(\n \"182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e\",\n app_id=\"182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e\",\n user_id=\"182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e\",\n)\nprint(session)"}]},"get":{"tags":["sessions"],"summary":"Get Session","description":"Get a specific session for a user by ID\n\nArgs:\n app_id (uuid.UUID): The ID of the app representing the client application using\n honcho\n user_id (uuid.UUID): The User ID representing the user, managed by the user\n session_id (uuid.UUID): The ID of the Session to retrieve\n\nReturns:\n schemas.Session: The Session object of the requested Session\n\nRaises:\n HTTPException: If the session is not found","operationId":"get_session_apps__app_id__users__user_id__sessions__session_id__get","security":[{"HTTPBearer":[]},{}],"parameters":[{"name":"app_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"App Id"}},{"name":"user_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"User Id"}},{"name":"session_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Session Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Session"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"x-codeSamples":[{"lang":"JavaScript","source":"import Honcho from 'honcho-ai';\n\nconst honcho = new Honcho({\n apiKey: process.env['HONCHO_AUTH_TOKEN'], // This is the default and can be omitted\n});\n\nasync function main() {\n const session = await honcho.apps.users.sessions.get(\n '182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e',\n '182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e',\n '182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e',\n );\n\n console.log(session.id);\n}\n\nmain();"},{"lang":"Python","source":"import os\nfrom honcho import Honcho\n\nclient = Honcho(\n # This is the default and can be omitted\n api_key=os.environ.get(\"HONCHO_AUTH_TOKEN\"),\n)\nsession = client.apps.users.sessions.get(\n \"182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e\",\n app_id=\"182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e\",\n user_id=\"182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e\",\n)\nprint(session.id)"}]}},"/apps/{app_id}/users/{user_id}/sessions/{session_id}/chat":{"get":{"tags":["sessions"],"summary":"Get Chat","operationId":"get_chat_apps__app_id__users__user_id__sessions__session_id__chat_get","security":[{"HTTPBearer":[]},{}],"parameters":[{"name":"app_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"App Id"}},{"name":"user_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"User Id"}},{"name":"session_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Session Id"}},{"name":"query","in":"query","required":true,"schema":{"type":"string","title":"Query"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AgentChat"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"x-codeSamples":[{"lang":"JavaScript","source":"import Honcho from 'honcho-ai';\n\nconst honcho = new Honcho({\n apiKey: process.env['HONCHO_AUTH_TOKEN'], // This is the default and can be omitted\n});\n\nasync function main() {\n const agentChat = await honcho.apps.users.sessions.chat(\n '182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e',\n '182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e',\n '182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e',\n { query: 'string' },\n );\n\n console.log(agentChat.content);\n}\n\nmain();"},{"lang":"Python","source":"import os\nfrom honcho import Honcho\n\nclient = Honcho(\n # This is the default and can be omitted\n api_key=os.environ.get(\"HONCHO_AUTH_TOKEN\"),\n)\nsession = client.apps.users.sessions.chat(\n \"182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e\",\n app_id=\"182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e\",\n user_id=\"182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e\",\n query=\"string\",\n)\nprint(session.content)"}]}},"/apps/{app_id}/users/{user_id}/sessions/{session_id}/chat/stream":{"get":{"tags":["sessions"],"summary":"Get Chat Stream","operationId":"get_chat_stream_apps__app_id__users__user_id__sessions__session_id__chat_stream_get","security":[{"HTTPBearer":[]},{}],"parameters":[{"name":"app_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"App Id"}},{"name":"user_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"User Id"}},{"name":"session_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Session Id"}},{"name":"query","in":"query","required":true,"schema":{"type":"string","title":"Query"}}],"responses":{"200":{"description":"Chat stream","content":{"application/json":{"schema":{}},"text/event-stream":{"schema":{"type":"string","format":"binary"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"x-codeSamples":[{"lang":"JavaScript","source":"import Honcho from 'honcho-ai';\n\nconst honcho = new Honcho({\n apiKey: process.env['HONCHO_AUTH_TOKEN'], // This is the default and can be omitted\n});\n\nasync function main() {\n const sessionStreamResponse = await honcho.apps.users.sessions.stream(\n '182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e',\n '182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e',\n '182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e',\n { query: 'string' },\n );\n\n console.log(sessionStreamResponse);\n}\n\nmain();"},{"lang":"Python","source":"import os\nfrom honcho import Honcho\n\nclient = Honcho(\n # This is the default and can be omitted\n api_key=os.environ.get(\"HONCHO_AUTH_TOKEN\"),\n)\nsession = client.apps.users.sessions.stream(\n \"182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e\",\n app_id=\"182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e\",\n user_id=\"182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e\",\n query=\"string\",\n)\nprint(session)"}]}},"/apps/{app_id}/users/{user_id}/sessions/{session_id}/messages":{"post":{"tags":["messages"],"summary":"Create Message For Session","description":"Adds a message to a session\n\nArgs:\n app_id (uuid.UUID): The ID of the app representing the client application using\n honcho\n user_id (str): The User ID representing the user, managed by the user\n session_id (int): The ID of the Session to add the message to\n message (schemas.MessageCreate): The Message object to add containing the\n message content and type\n\nReturns:\n schemas.Message: The Message object of the added message\n\nRaises:\n HTTPException: If the session is not found","operationId":"create_message_for_session_apps__app_id__users__user_id__sessions__session_id__messages_post","security":[{"HTTPBearer":[]},{}],"parameters":[{"name":"app_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"App Id"}},{"name":"user_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"User Id"}},{"name":"session_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Session Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/MessageCreate"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Message"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"x-codeSamples":[{"lang":"JavaScript","source":"import Honcho from 'honcho-ai';\n\nconst honcho = new Honcho({\n apiKey: process.env['HONCHO_AUTH_TOKEN'], // This is the default and can be omitted\n});\n\nasync function main() {\n const message = await honcho.apps.users.sessions.messages.create(\n '182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e',\n '182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e',\n '182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e',\n { content: 'string', is_user: true },\n );\n\n console.log(message.id);\n}\n\nmain();"},{"lang":"Python","source":"import os\nfrom honcho import Honcho\n\nclient = Honcho(\n # This is the default and can be omitted\n api_key=os.environ.get(\"HONCHO_AUTH_TOKEN\"),\n)\nmessage = client.apps.users.sessions.messages.create(\n \"182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e\",\n app_id=\"182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e\",\n user_id=\"182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e\",\n content=\"string\",\n is_user=True,\n)\nprint(message.id)"}]},"get":{"tags":["messages"],"summary":"Get Messages","description":"Get all messages for a session\n\nArgs:\n app_id (uuid.UUID): The ID of the app representing the client application using\n honcho\n user_id (str): The User ID representing the user, managed by the user\n session_id (int): The ID of the Session to retrieve\n reverse (bool): Whether to reverse the order of the messages\n\nReturns:\n list[schemas.Message]: List of Message objects\n\nRaises:\n HTTPException: If the session is not found","operationId":"get_messages_apps__app_id__users__user_id__sessions__session_id__messages_get","security":[{"HTTPBearer":[]},{}],"parameters":[{"name":"app_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"App Id"}},{"name":"user_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"User Id"}},{"name":"session_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Session Id"}},{"name":"reverse","in":"query","required":false,"schema":{"anyOf":[{"type":"boolean"},{"type":"null"}],"default":false,"title":"Reverse"}},{"name":"filter","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Filter"}},{"name":"page","in":"query","required":false,"schema":{"type":"integer","minimum":1,"description":"Page number","default":1,"title":"Page"},"description":"Page number"},{"name":"size","in":"query","required":false,"schema":{"type":"integer","maximum":100,"minimum":1,"description":"Page size","default":50,"title":"Size"},"description":"Page size"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Page_Message_"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"x-codeSamples":[{"lang":"JavaScript","source":"import Honcho from 'honcho-ai';\n\nconst honcho = new Honcho({\n apiKey: process.env['HONCHO_AUTH_TOKEN'], // This is the default and can be omitted\n});\n\nasync function main() {\n // Automatically fetches more pages as needed.\n for await (const message of honcho.apps.users.sessions.messages.list(\n '182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e',\n '182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e',\n '182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e',\n )) {\n console.log(message.id);\n }\n}\n\nmain();"},{"lang":"Python","source":"import os\nfrom honcho import Honcho\n\nclient = Honcho(\n # This is the default and can be omitted\n api_key=os.environ.get(\"HONCHO_AUTH_TOKEN\"),\n)\npage = client.apps.users.sessions.messages.list(\n \"182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e\",\n app_id=\"182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e\",\n user_id=\"182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e\",\n)\nmessage = page.items[0]\nprint(message.id)"}]}},"/apps/{app_id}/users/{user_id}/sessions/{session_id}/messages/{message_id}":{"get":{"tags":["messages"],"summary":"Get Message","operationId":"get_message_apps__app_id__users__user_id__sessions__session_id__messages__message_id__get","security":[{"HTTPBearer":[]},{}],"parameters":[{"name":"app_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"App Id"}},{"name":"user_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"User Id"}},{"name":"session_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Session Id"}},{"name":"message_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Message Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Message"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"x-codeSamples":[{"lang":"JavaScript","source":"import Honcho from 'honcho-ai';\n\nconst honcho = new Honcho({\n apiKey: process.env['HONCHO_AUTH_TOKEN'], // This is the default and can be omitted\n});\n\nasync function main() {\n const message = await honcho.apps.users.sessions.messages.get(\n '182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e',\n '182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e',\n '182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e',\n '182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e',\n );\n\n console.log(message.id);\n}\n\nmain();"},{"lang":"Python","source":"import os\nfrom honcho import Honcho\n\nclient = Honcho(\n # This is the default and can be omitted\n api_key=os.environ.get(\"HONCHO_AUTH_TOKEN\"),\n)\nmessage = client.apps.users.sessions.messages.get(\n \"182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e\",\n app_id=\"182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e\",\n user_id=\"182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e\",\n session_id=\"182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e\",\n)\nprint(message.id)"}]},"put":{"tags":["messages"],"summary":"Update Message","description":"Update's the metadata of a message","operationId":"update_message_apps__app_id__users__user_id__sessions__session_id__messages__message_id__put","security":[{"HTTPBearer":[]},{}],"parameters":[{"name":"app_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"App Id"}},{"name":"user_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"User Id"}},{"name":"session_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Session Id"}},{"name":"message_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Message Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/MessageUpdate"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Message"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"x-codeSamples":[{"lang":"JavaScript","source":"import Honcho from 'honcho-ai';\n\nconst honcho = new Honcho({\n apiKey: process.env['HONCHO_AUTH_TOKEN'], // This is the default and can be omitted\n});\n\nasync function main() {\n const message = await honcho.apps.users.sessions.messages.update(\n '182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e',\n '182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e',\n '182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e',\n '182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e',\n );\n\n console.log(message.id);\n}\n\nmain();"},{"lang":"Python","source":"import os\nfrom honcho import Honcho\n\nclient = Honcho(\n # This is the default and can be omitted\n api_key=os.environ.get(\"HONCHO_AUTH_TOKEN\"),\n)\nmessage = client.apps.users.sessions.messages.update(\n \"182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e\",\n app_id=\"182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e\",\n user_id=\"182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e\",\n session_id=\"182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e\",\n)\nprint(message.id)"}]}},"/apps/{app_id}/users/{user_id}/sessions/{session_id}/metamessages":{"post":{"tags":["messages"],"summary":"Create Metamessage","description":"Adds a message to a session\n\nArgs:\n app_id (uuid.UUID): The ID of the app representing the client application using\n honcho\n user_id (str): The User ID representing the user, managed by the user\n session_id (int): The ID of the Session to add the message to\n message (schemas.MessageCreate): The Message object to add containing the\n message content and type\n\nReturns:\n schemas.Message: The Message object of the added message\n\nRaises:\n HTTPException: If the session is not found","operationId":"create_metamessage_apps__app_id__users__user_id__sessions__session_id__metamessages_post","security":[{"HTTPBearer":[]},{}],"parameters":[{"name":"app_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"App Id"}},{"name":"user_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"User Id"}},{"name":"session_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Session Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/MetamessageCreate"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Metamessage"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"x-codeSamples":[{"lang":"JavaScript","source":"import Honcho from 'honcho-ai';\n\nconst honcho = new Honcho({\n apiKey: process.env['HONCHO_AUTH_TOKEN'], // This is the default and can be omitted\n});\n\nasync function main() {\n const metamessage = await honcho.apps.users.sessions.metamessages.create(\n '182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e',\n '182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e',\n '182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e',\n { content: 'string', message_id: '182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e', metamessage_type: 'string' },\n );\n\n console.log(metamessage.id);\n}\n\nmain();"},{"lang":"Python","source":"import os\nfrom honcho import Honcho\n\nclient = Honcho(\n # This is the default and can be omitted\n api_key=os.environ.get(\"HONCHO_AUTH_TOKEN\"),\n)\nmetamessage = client.apps.users.sessions.metamessages.create(\n \"182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e\",\n app_id=\"182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e\",\n user_id=\"182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e\",\n content=\"string\",\n message_id=\"182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e\",\n metamessage_type=\"string\",\n)\nprint(metamessage.id)"}]},"get":{"tags":["messages"],"summary":"Get Metamessages","description":"Get all messages for a session\n\nArgs:\n app_id (uuid.UUID): The ID of the app representing the client application using\n honcho\n user_id (str): The User ID representing the user, managed by the user\n session_id (int): The ID of the Session to retrieve\n reverse (bool): Whether to reverse the order of the metamessages\n\nReturns:\n list[schemas.Message]: List of Message objects\n\nRaises:\n HTTPException: If the session is not found","operationId":"get_metamessages_apps__app_id__users__user_id__sessions__session_id__metamessages_get","security":[{"HTTPBearer":[]},{}],"parameters":[{"name":"app_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"App Id"}},{"name":"user_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"User Id"}},{"name":"session_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Session Id"}},{"name":"message_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Message Id"}},{"name":"metamessage_type","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Metamessage Type"}},{"name":"reverse","in":"query","required":false,"schema":{"anyOf":[{"type":"boolean"},{"type":"null"}],"default":false,"title":"Reverse"}},{"name":"filter","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Filter"}},{"name":"page","in":"query","required":false,"schema":{"type":"integer","minimum":1,"description":"Page number","default":1,"title":"Page"},"description":"Page number"},{"name":"size","in":"query","required":false,"schema":{"type":"integer","maximum":100,"minimum":1,"description":"Page size","default":50,"title":"Size"},"description":"Page size"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Page_Metamessage_"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"x-codeSamples":[{"lang":"JavaScript","source":"import Honcho from 'honcho-ai';\n\nconst honcho = new Honcho({\n apiKey: process.env['HONCHO_AUTH_TOKEN'], // This is the default and can be omitted\n});\n\nasync function main() {\n // Automatically fetches more pages as needed.\n for await (const metamessage of honcho.apps.users.sessions.metamessages.list(\n '182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e',\n '182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e',\n '182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e',\n )) {\n console.log(metamessage.id);\n }\n}\n\nmain();"},{"lang":"Python","source":"import os\nfrom honcho import Honcho\n\nclient = Honcho(\n # This is the default and can be omitted\n api_key=os.environ.get(\"HONCHO_AUTH_TOKEN\"),\n)\npage = client.apps.users.sessions.metamessages.list(\n \"182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e\",\n app_id=\"182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e\",\n user_id=\"182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e\",\n)\nmetamessage = page.items[0]\nprint(metamessage.id)"}]}},"/apps/{app_id}/users/{user_id}/sessions/{session_id}/metamessages/{metamessage_id}":{"get":{"tags":["messages"],"summary":"Get Metamessage","description":"Get a specific Metamessage by ID\n\nArgs:\n app_id (uuid.UUID): The ID of the app representing the client application using\n honcho\n user_id (str): The User ID representing the user, managed by the user\n session_id (int): The ID of the Session to retrieve\n\nReturns:\n schemas.Session: The Session object of the requested Session\n\nRaises:\n HTTPException: If the session is not found","operationId":"get_metamessage_apps__app_id__users__user_id__sessions__session_id__metamessages__metamessage_id__get","security":[{"HTTPBearer":[]},{}],"parameters":[{"name":"app_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"App Id"}},{"name":"user_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"User Id"}},{"name":"session_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Session Id"}},{"name":"metamessage_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Metamessage Id"}},{"name":"message_id","in":"query","required":true,"schema":{"type":"string","format":"uuid","title":"Message Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Metamessage"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"x-codeSamples":[{"lang":"JavaScript","source":"import Honcho from 'honcho-ai';\n\nconst honcho = new Honcho({\n apiKey: process.env['HONCHO_AUTH_TOKEN'], // This is the default and can be omitted\n});\n\nasync function main() {\n const metamessage = await honcho.apps.users.sessions.metamessages.get(\n '182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e',\n '182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e',\n '182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e',\n '182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e',\n { message_id: '182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e' },\n );\n\n console.log(metamessage.id);\n}\n\nmain();"},{"lang":"Python","source":"import os\nfrom honcho import Honcho\n\nclient = Honcho(\n # This is the default and can be omitted\n api_key=os.environ.get(\"HONCHO_AUTH_TOKEN\"),\n)\nmetamessage = client.apps.users.sessions.metamessages.get(\n \"182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e\",\n app_id=\"182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e\",\n user_id=\"182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e\",\n session_id=\"182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e\",\n message_id=\"182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e\",\n)\nprint(metamessage.id)"}]},"put":{"tags":["messages"],"summary":"Update Metamessage","description":"Update's the metadata of a metamessage","operationId":"update_metamessage_apps__app_id__users__user_id__sessions__session_id__metamessages__metamessage_id__put","security":[{"HTTPBearer":[]},{}],"parameters":[{"name":"app_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"App Id"}},{"name":"user_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"User Id"}},{"name":"session_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Session Id"}},{"name":"metamessage_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Metamessage Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/MetamessageUpdate"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Metamessage"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"x-codeSamples":[{"lang":"JavaScript","source":"import Honcho from 'honcho-ai';\n\nconst honcho = new Honcho({\n apiKey: process.env['HONCHO_AUTH_TOKEN'], // This is the default and can be omitted\n});\n\nasync function main() {\n const metamessage = await honcho.apps.users.sessions.metamessages.update(\n '182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e',\n '182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e',\n '182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e',\n '182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e',\n { message_id: '182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e' },\n );\n\n console.log(metamessage.id);\n}\n\nmain();"},{"lang":"Python","source":"import os\nfrom honcho import Honcho\n\nclient = Honcho(\n # This is the default and can be omitted\n api_key=os.environ.get(\"HONCHO_AUTH_TOKEN\"),\n)\nmetamessage = client.apps.users.sessions.metamessages.update(\n \"182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e\",\n app_id=\"182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e\",\n user_id=\"182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e\",\n session_id=\"182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e\",\n message_id=\"182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e\",\n)\nprint(metamessage.id)"}]}},"/apps/{app_id}/users/{user_id}/collections":{"get":{"tags":["collections"],"summary":"Get Collections","description":"Get All Collections for a User\n\nArgs:\n app_id (uuid.UUID): The ID of the app representing the client\n application using honcho\n user_id (uuid.UUID): The User ID representing the user, managed by the user\n\nReturns:\n list[schemas.Collection]: List of Collection objects","operationId":"get_collections_apps__app_id__users__user_id__collections_get","security":[{"HTTPBearer":[]},{}],"parameters":[{"name":"app_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"App Id"}},{"name":"user_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"User Id"}},{"name":"reverse","in":"query","required":false,"schema":{"anyOf":[{"type":"boolean"},{"type":"null"}],"default":false,"title":"Reverse"}},{"name":"filter","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Filter"}},{"name":"page","in":"query","required":false,"schema":{"type":"integer","minimum":1,"description":"Page number","default":1,"title":"Page"},"description":"Page number"},{"name":"size","in":"query","required":false,"schema":{"type":"integer","maximum":100,"minimum":1,"description":"Page size","default":50,"title":"Size"},"description":"Page size"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Page_Collection_"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"x-codeSamples":[{"lang":"JavaScript","source":"import Honcho from 'honcho-ai';\n\nconst honcho = new Honcho({\n apiKey: process.env['HONCHO_AUTH_TOKEN'], // This is the default and can be omitted\n});\n\nasync function main() {\n // Automatically fetches more pages as needed.\n for await (const collection of honcho.apps.users.collections.list(\n '182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e',\n '182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e',\n )) {\n console.log(collection.id);\n }\n}\n\nmain();"},{"lang":"Python","source":"import os\nfrom honcho import Honcho\n\nclient = Honcho(\n # This is the default and can be omitted\n api_key=os.environ.get(\"HONCHO_AUTH_TOKEN\"),\n)\npage = client.apps.users.collections.list(\n \"182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e\",\n app_id=\"182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e\",\n)\ncollection = page.items[0]\nprint(collection.id)"}]},"post":{"tags":["collections"],"summary":"Create Collection","operationId":"create_collection_apps__app_id__users__user_id__collections_post","security":[{"HTTPBearer":[]},{}],"parameters":[{"name":"app_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"App Id"}},{"name":"user_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"User Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CollectionCreate"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Collection"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"x-codeSamples":[{"lang":"JavaScript","source":"import Honcho from 'honcho-ai';\n\nconst honcho = new Honcho({\n apiKey: process.env['HONCHO_AUTH_TOKEN'], // This is the default and can be omitted\n});\n\nasync function main() {\n const collection = await honcho.apps.users.collections.create(\n '182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e',\n '182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e',\n { name: 'string' },\n );\n\n console.log(collection.id);\n}\n\nmain();"},{"lang":"Python","source":"import os\nfrom honcho import Honcho\n\nclient = Honcho(\n # This is the default and can be omitted\n api_key=os.environ.get(\"HONCHO_AUTH_TOKEN\"),\n)\ncollection = client.apps.users.collections.create(\n \"182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e\",\n app_id=\"182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e\",\n name=\"string\",\n)\nprint(collection.id)"}]}},"/apps/{app_id}/users/{user_id}/collections/name/{name}":{"get":{"tags":["collections"],"summary":"Get Collection By Name","operationId":"get_collection_by_name_apps__app_id__users__user_id__collections_name__name__get","security":[{"HTTPBearer":[]},{}],"parameters":[{"name":"app_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"App Id"}},{"name":"user_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"User Id"}},{"name":"name","in":"path","required":true,"schema":{"type":"string","title":"Name"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Collection"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"x-codeSamples":[{"lang":"JavaScript","source":"import Honcho from 'honcho-ai';\n\nconst honcho = new Honcho({\n apiKey: process.env['HONCHO_AUTH_TOKEN'], // This is the default and can be omitted\n});\n\nasync function main() {\n const collection = await honcho.apps.users.collections.getByName(\n '182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e',\n '182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e',\n 'string',\n );\n\n console.log(collection.id);\n}\n\nmain();"},{"lang":"Python","source":"import os\nfrom honcho import Honcho\n\nclient = Honcho(\n # This is the default and can be omitted\n api_key=os.environ.get(\"HONCHO_AUTH_TOKEN\"),\n)\ncollection = client.apps.users.collections.get_by_name(\n \"string\",\n app_id=\"182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e\",\n user_id=\"182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e\",\n)\nprint(collection.id)"}]}},"/apps/{app_id}/users/{user_id}/collections/{collection_id}":{"get":{"tags":["collections"],"summary":"Get Collection By Id","operationId":"get_collection_by_id_apps__app_id__users__user_id__collections__collection_id__get","security":[{"HTTPBearer":[]},{}],"parameters":[{"name":"app_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"App Id"}},{"name":"user_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"User Id"}},{"name":"collection_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Collection Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Collection"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"x-codeSamples":[{"lang":"JavaScript","source":"import Honcho from 'honcho-ai';\n\nconst honcho = new Honcho({\n apiKey: process.env['HONCHO_AUTH_TOKEN'], // This is the default and can be omitted\n});\n\nasync function main() {\n const collection = await honcho.apps.users.collections.get(\n '182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e',\n '182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e',\n '182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e',\n );\n\n console.log(collection.id);\n}\n\nmain();"},{"lang":"Python","source":"import os\nfrom honcho import Honcho\n\nclient = Honcho(\n # This is the default and can be omitted\n api_key=os.environ.get(\"HONCHO_AUTH_TOKEN\"),\n)\ncollection = client.apps.users.collections.get(\n \"182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e\",\n app_id=\"182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e\",\n user_id=\"182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e\",\n)\nprint(collection.id)"}]},"put":{"tags":["collections"],"summary":"Update Collection","operationId":"update_collection_apps__app_id__users__user_id__collections__collection_id__put","security":[{"HTTPBearer":[]},{}],"parameters":[{"name":"app_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"App Id"}},{"name":"user_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"User Id"}},{"name":"collection_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Collection Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CollectionUpdate"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Collection"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"x-codeSamples":[{"lang":"JavaScript","source":"import Honcho from 'honcho-ai';\n\nconst honcho = new Honcho({\n apiKey: process.env['HONCHO_AUTH_TOKEN'], // This is the default and can be omitted\n});\n\nasync function main() {\n const collection = await honcho.apps.users.collections.update(\n '182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e',\n '182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e',\n '182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e',\n { name: 'string' },\n );\n\n console.log(collection.id);\n}\n\nmain();"},{"lang":"Python","source":"import os\nfrom honcho import Honcho\n\nclient = Honcho(\n # This is the default and can be omitted\n api_key=os.environ.get(\"HONCHO_AUTH_TOKEN\"),\n)\ncollection = client.apps.users.collections.update(\n \"182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e\",\n app_id=\"182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e\",\n user_id=\"182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e\",\n name=\"string\",\n)\nprint(collection.id)"}]},"delete":{"tags":["collections"],"summary":"Delete Collection","operationId":"delete_collection_apps__app_id__users__user_id__collections__collection_id__delete","security":[{"HTTPBearer":[]},{}],"parameters":[{"name":"app_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"App Id"}},{"name":"user_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"User Id"}},{"name":"collection_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Collection Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"x-codeSamples":[{"lang":"JavaScript","source":"import Honcho from 'honcho-ai';\n\nconst honcho = new Honcho({\n apiKey: process.env['HONCHO_AUTH_TOKEN'], // This is the default and can be omitted\n});\n\nasync function main() {\n const collectionDeleteResponse = await honcho.apps.users.collections.delete(\n '182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e',\n '182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e',\n '182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e',\n );\n\n console.log(collectionDeleteResponse);\n}\n\nmain();"},{"lang":"Python","source":"import os\nfrom honcho import Honcho\n\nclient = Honcho(\n # This is the default and can be omitted\n api_key=os.environ.get(\"HONCHO_AUTH_TOKEN\"),\n)\ncollection = client.apps.users.collections.delete(\n \"182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e\",\n app_id=\"182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e\",\n user_id=\"182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e\",\n)\nprint(collection)"}]}},"/apps/{app_id}/users/{user_id}/collections/{collection_id}/documents":{"get":{"tags":["documents"],"summary":"Get Documents","operationId":"get_documents_apps__app_id__users__user_id__collections__collection_id__documents_get","security":[{"HTTPBearer":[]},{}],"parameters":[{"name":"app_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"App Id"}},{"name":"user_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"User Id"}},{"name":"collection_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Collection Id"}},{"name":"reverse","in":"query","required":false,"schema":{"anyOf":[{"type":"boolean"},{"type":"null"}],"default":false,"title":"Reverse"}},{"name":"filter","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Filter"}},{"name":"page","in":"query","required":false,"schema":{"type":"integer","minimum":1,"description":"Page number","default":1,"title":"Page"},"description":"Page number"},{"name":"size","in":"query","required":false,"schema":{"type":"integer","maximum":100,"minimum":1,"description":"Page size","default":50,"title":"Size"},"description":"Page size"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Page_Document_"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"x-codeSamples":[{"lang":"JavaScript","source":"import Honcho from 'honcho-ai';\n\nconst honcho = new Honcho({\n apiKey: process.env['HONCHO_AUTH_TOKEN'], // This is the default and can be omitted\n});\n\nasync function main() {\n // Automatically fetches more pages as needed.\n for await (const document of honcho.apps.users.collections.documents.list(\n '182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e',\n '182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e',\n '182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e',\n )) {\n console.log(document.id);\n }\n}\n\nmain();"},{"lang":"Python","source":"import os\nfrom honcho import Honcho\n\nclient = Honcho(\n # This is the default and can be omitted\n api_key=os.environ.get(\"HONCHO_AUTH_TOKEN\"),\n)\npage = client.apps.users.collections.documents.list(\n \"182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e\",\n app_id=\"182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e\",\n user_id=\"182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e\",\n)\ndocument = page.items[0]\nprint(document.id)"}]},"post":{"tags":["documents"],"summary":"Create Document","operationId":"create_document_apps__app_id__users__user_id__collections__collection_id__documents_post","security":[{"HTTPBearer":[]},{}],"parameters":[{"name":"app_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"App Id"}},{"name":"user_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"User Id"}},{"name":"collection_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Collection Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DocumentCreate"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Document"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"x-codeSamples":[{"lang":"JavaScript","source":"import Honcho from 'honcho-ai';\n\nconst honcho = new Honcho({\n apiKey: process.env['HONCHO_AUTH_TOKEN'], // This is the default and can be omitted\n});\n\nasync function main() {\n const document = await honcho.apps.users.collections.documents.create(\n '182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e',\n '182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e',\n '182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e',\n { content: 'string' },\n );\n\n console.log(document.id);\n}\n\nmain();"},{"lang":"Python","source":"import os\nfrom honcho import Honcho\n\nclient = Honcho(\n # This is the default and can be omitted\n api_key=os.environ.get(\"HONCHO_AUTH_TOKEN\"),\n)\ndocument = client.apps.users.collections.documents.create(\n \"182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e\",\n app_id=\"182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e\",\n user_id=\"182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e\",\n content=\"string\",\n)\nprint(document.id)"}]}},"/apps/{app_id}/users/{user_id}/collections/{collection_id}/documents/{document_id}":{"get":{"tags":["documents"],"summary":"Get Document","operationId":"get_document_apps__app_id__users__user_id__collections__collection_id__documents__document_id__get","security":[{"HTTPBearer":[]},{}],"parameters":[{"name":"app_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"App Id"}},{"name":"user_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"User Id"}},{"name":"collection_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Collection Id"}},{"name":"document_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Document Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Document"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"x-codeSamples":[{"lang":"JavaScript","source":"import Honcho from 'honcho-ai';\n\nconst honcho = new Honcho({\n apiKey: process.env['HONCHO_AUTH_TOKEN'], // This is the default and can be omitted\n});\n\nasync function main() {\n const document = await honcho.apps.users.collections.documents.get(\n '182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e',\n '182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e',\n '182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e',\n '182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e',\n );\n\n console.log(document.id);\n}\n\nmain();"},{"lang":"Python","source":"import os\nfrom honcho import Honcho\n\nclient = Honcho(\n # This is the default and can be omitted\n api_key=os.environ.get(\"HONCHO_AUTH_TOKEN\"),\n)\ndocument = client.apps.users.collections.documents.get(\n \"182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e\",\n app_id=\"182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e\",\n user_id=\"182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e\",\n collection_id=\"182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e\",\n)\nprint(document.id)"}]},"put":{"tags":["documents"],"summary":"Update Document","operationId":"update_document_apps__app_id__users__user_id__collections__collection_id__documents__document_id__put","security":[{"HTTPBearer":[]},{}],"parameters":[{"name":"app_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"App Id"}},{"name":"user_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"User Id"}},{"name":"collection_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Collection Id"}},{"name":"document_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Document Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DocumentUpdate"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Document"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"x-codeSamples":[{"lang":"JavaScript","source":"import Honcho from 'honcho-ai';\n\nconst honcho = new Honcho({\n apiKey: process.env['HONCHO_AUTH_TOKEN'], // This is the default and can be omitted\n});\n\nasync function main() {\n const document = await honcho.apps.users.collections.documents.update(\n '182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e',\n '182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e',\n '182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e',\n '182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e',\n );\n\n console.log(document.id);\n}\n\nmain();"},{"lang":"Python","source":"import os\nfrom honcho import Honcho\n\nclient = Honcho(\n # This is the default and can be omitted\n api_key=os.environ.get(\"HONCHO_AUTH_TOKEN\"),\n)\ndocument = client.apps.users.collections.documents.update(\n \"182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e\",\n app_id=\"182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e\",\n user_id=\"182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e\",\n collection_id=\"182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e\",\n)\nprint(document.id)"}]},"delete":{"tags":["documents"],"summary":"Delete Document","operationId":"delete_document_apps__app_id__users__user_id__collections__collection_id__documents__document_id__delete","security":[{"HTTPBearer":[]},{}],"parameters":[{"name":"app_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"App Id"}},{"name":"user_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"User Id"}},{"name":"collection_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Collection Id"}},{"name":"document_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Document Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"x-codeSamples":[{"lang":"JavaScript","source":"import Honcho from 'honcho-ai';\n\nconst honcho = new Honcho({\n apiKey: process.env['HONCHO_AUTH_TOKEN'], // This is the default and can be omitted\n});\n\nasync function main() {\n const documentDeleteResponse = await honcho.apps.users.collections.documents.delete(\n '182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e',\n '182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e',\n '182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e',\n '182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e',\n );\n\n console.log(documentDeleteResponse);\n}\n\nmain();"},{"lang":"Python","source":"import os\nfrom honcho import Honcho\n\nclient = Honcho(\n # This is the default and can be omitted\n api_key=os.environ.get(\"HONCHO_AUTH_TOKEN\"),\n)\ndocument = client.apps.users.collections.documents.delete(\n \"182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e\",\n app_id=\"182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e\",\n user_id=\"182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e\",\n collection_id=\"182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e\",\n)\nprint(document)"}]}},"/apps/{app_id}/users/{user_id}/collections/{collection_id}/query":{"get":{"tags":["documents"],"summary":"Query Documents","operationId":"query_documents_apps__app_id__users__user_id__collections__collection_id__query_get","security":[{"HTTPBearer":[]},{}],"parameters":[{"name":"app_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"App Id"}},{"name":"user_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"User Id"}},{"name":"collection_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Collection Id"}},{"name":"query","in":"query","required":true,"schema":{"type":"string","title":"Query"}},{"name":"top_k","in":"query","required":false,"schema":{"type":"integer","default":5,"title":"Top K"}},{"name":"filter","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Filter"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/Document"},"title":"Response Query Documents Apps App Id Users User Id Collections Collection Id Query Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"x-codeSamples":[{"lang":"JavaScript","source":"import Honcho from 'honcho-ai';\n\nconst honcho = new Honcho({\n apiKey: process.env['HONCHO_AUTH_TOKEN'], // This is the default and can be omitted\n});\n\nasync function main() {\n const collectionQueryResponse = await honcho.apps.users.collections.query(\n '182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e',\n '182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e',\n '182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e',\n { query: 'string' },\n );\n\n console.log(collectionQueryResponse);\n}\n\nmain();"},{"lang":"Python","source":"import os\nfrom honcho import Honcho\n\nclient = Honcho(\n # This is the default and can be omitted\n api_key=os.environ.get(\"HONCHO_AUTH_TOKEN\"),\n)\ncollection = client.apps.users.collections.query(\n \"182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e\",\n app_id=\"182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e\",\n user_id=\"182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e\",\n query=\"string\",\n)\nprint(collection)"}]}}},"components":{"schemas":{"AgentChat":{"properties":{"content":{"type":"string","title":"Content"}},"type":"object","required":["content"],"title":"AgentChat"},"App":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"name":{"type":"string","title":"Name"},"metadata":{"type":"object","title":"Metadata","additionalProperties":true},"created_at":{"type":"string","format":"date-time","title":"Created At"}},"type":"object","required":["id","name","metadata","created_at"],"title":"App","exclude":["h_metadata"]},"AppCreate":{"properties":{"name":{"type":"string","title":"Name"},"metadata":{"anyOf":[{"type":"object","additionalProperties":true},{"type":"null"}],"title":"Metadata","default":{}}},"type":"object","required":["name"],"title":"AppCreate"},"AppUpdate":{"properties":{"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"metadata":{"anyOf":[{"type":"object","additionalProperties":true},{"type":"null"}],"title":"Metadata"}},"type":"object","title":"AppUpdate"},"Collection":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"name":{"type":"string","title":"Name"},"user_id":{"type":"string","format":"uuid","title":"User Id"},"metadata":{"type":"object","title":"Metadata","additionalProperties":true},"created_at":{"type":"string","format":"date-time","title":"Created At"}},"type":"object","required":["id","name","user_id","metadata","created_at"],"title":"Collection","exclude":["h_metadata"]},"CollectionCreate":{"properties":{"name":{"type":"string","title":"Name"},"metadata":{"anyOf":[{"type":"object","additionalProperties":true},{"type":"null"}],"title":"Metadata","default":{}}},"type":"object","required":["name"],"title":"CollectionCreate"},"CollectionUpdate":{"properties":{"name":{"type":"string","title":"Name"},"metadata":{"anyOf":[{"type":"object","additionalProperties":true},{"type":"null"}],"title":"Metadata"}},"type":"object","required":["name"],"title":"CollectionUpdate"},"Document":{"properties":{"content":{"type":"string","title":"Content"},"id":{"type":"string","format":"uuid","title":"Id"},"metadata":{"type":"object","title":"Metadata","additionalProperties":true},"created_at":{"type":"string","format":"date-time","title":"Created At"},"collection_id":{"type":"string","format":"uuid","title":"Collection Id"}},"type":"object","required":["content","id","metadata","created_at","collection_id"],"title":"Document","exclude":["h_metadata"]},"DocumentCreate":{"properties":{"content":{"type":"string","title":"Content"},"metadata":{"anyOf":[{"type":"object","additionalProperties":true},{"type":"null"}],"title":"Metadata","default":{}}},"type":"object","required":["content"],"title":"DocumentCreate"},"DocumentUpdate":{"properties":{"content":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Content"},"metadata":{"anyOf":[{"type":"object","additionalProperties":true},{"type":"null"}],"title":"Metadata"}},"type":"object","title":"DocumentUpdate"},"HTTPValidationError":{"properties":{"detail":{"items":{"$ref":"#/components/schemas/ValidationError"},"type":"array","title":"Detail"}},"type":"object","title":"HTTPValidationError"},"Message":{"properties":{"content":{"type":"string","title":"Content"},"is_user":{"type":"boolean","title":"Is User"},"session_id":{"type":"string","format":"uuid","title":"Session Id"},"id":{"type":"string","format":"uuid","title":"Id"},"metadata":{"type":"object","title":"Metadata","additionalProperties":true},"created_at":{"type":"string","format":"date-time","title":"Created At"}},"type":"object","required":["content","is_user","session_id","id","metadata","created_at"],"title":"Message","exclude":["h_metadata"]},"MessageCreate":{"properties":{"content":{"type":"string","title":"Content"},"is_user":{"type":"boolean","title":"Is User"},"metadata":{"anyOf":[{"type":"object","additionalProperties":true},{"type":"null"}],"title":"Metadata","default":{}}},"type":"object","required":["content","is_user"],"title":"MessageCreate"},"MessageUpdate":{"properties":{"metadata":{"anyOf":[{"type":"object","additionalProperties":true},{"type":"null"}],"title":"Metadata"}},"type":"object","title":"MessageUpdate"},"Metamessage":{"properties":{"metamessage_type":{"type":"string","title":"Metamessage Type"},"content":{"type":"string","title":"Content"},"id":{"type":"string","format":"uuid","title":"Id"},"message_id":{"type":"string","format":"uuid","title":"Message Id"},"metadata":{"type":"object","title":"Metadata","additionalProperties":true},"created_at":{"type":"string","format":"date-time","title":"Created At"}},"type":"object","required":["metamessage_type","content","id","message_id","metadata","created_at"],"title":"Metamessage","exclude":["h_metadata"]},"MetamessageCreate":{"properties":{"metamessage_type":{"type":"string","title":"Metamessage Type"},"content":{"type":"string","title":"Content"},"message_id":{"type":"string","format":"uuid","title":"Message Id"},"metadata":{"anyOf":[{"type":"object","additionalProperties":true},{"type":"null"}],"title":"Metadata","default":{}}},"type":"object","required":["metamessage_type","content","message_id"],"title":"MetamessageCreate"},"MetamessageUpdate":{"properties":{"message_id":{"type":"string","format":"uuid","title":"Message Id"},"metamessage_type":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Metamessage Type"},"metadata":{"anyOf":[{"type":"object","additionalProperties":true},{"type":"null"}],"title":"Metadata"}},"type":"object","required":["message_id"],"title":"MetamessageUpdate"},"Page_Collection_":{"properties":{"items":{"items":{"$ref":"#/components/schemas/Collection"},"type":"array","title":"Items"},"total":{"type":"integer","minimum":0,"title":"Total"},"page":{"type":"integer","minimum":1,"title":"Page"},"size":{"type":"integer","minimum":1,"title":"Size"},"pages":{"type":"integer","minimum":0,"title":"Pages"}},"type":"object","required":["items","total","page","size"],"title":"Page[Collection]"},"Page_Document_":{"properties":{"items":{"items":{"$ref":"#/components/schemas/Document"},"type":"array","title":"Items"},"total":{"type":"integer","minimum":0,"title":"Total"},"page":{"type":"integer","minimum":1,"title":"Page"},"size":{"type":"integer","minimum":1,"title":"Size"},"pages":{"type":"integer","minimum":0,"title":"Pages"}},"type":"object","required":["items","total","page","size"],"title":"Page[Document]"},"Page_Message_":{"properties":{"items":{"items":{"$ref":"#/components/schemas/Message"},"type":"array","title":"Items"},"total":{"type":"integer","minimum":0,"title":"Total"},"page":{"type":"integer","minimum":1,"title":"Page"},"size":{"type":"integer","minimum":1,"title":"Size"},"pages":{"type":"integer","minimum":0,"title":"Pages"}},"type":"object","required":["items","total","page","size"],"title":"Page[Message]"},"Page_Metamessage_":{"properties":{"items":{"items":{"$ref":"#/components/schemas/Metamessage"},"type":"array","title":"Items"},"total":{"type":"integer","minimum":0,"title":"Total"},"page":{"type":"integer","minimum":1,"title":"Page"},"size":{"type":"integer","minimum":1,"title":"Size"},"pages":{"type":"integer","minimum":0,"title":"Pages"}},"type":"object","required":["items","total","page","size"],"title":"Page[Metamessage]"},"Page_Session_":{"properties":{"items":{"items":{"$ref":"#/components/schemas/Session"},"type":"array","title":"Items"},"total":{"type":"integer","minimum":0,"title":"Total"},"page":{"type":"integer","minimum":1,"title":"Page"},"size":{"type":"integer","minimum":1,"title":"Size"},"pages":{"type":"integer","minimum":0,"title":"Pages"}},"type":"object","required":["items","total","page","size"],"title":"Page[Session]"},"Page_User_":{"properties":{"items":{"items":{"$ref":"#/components/schemas/User"},"type":"array","title":"Items"},"total":{"type":"integer","minimum":0,"title":"Total"},"page":{"type":"integer","minimum":1,"title":"Page"},"size":{"type":"integer","minimum":1,"title":"Size"},"pages":{"type":"integer","minimum":0,"title":"Pages"}},"type":"object","required":["items","total","page","size"],"title":"Page[User]"},"Session":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"is_active":{"type":"boolean","title":"Is Active"},"user_id":{"type":"string","format":"uuid","title":"User Id"},"location_id":{"type":"string","title":"Location Id"},"metadata":{"type":"object","title":"Metadata","additionalProperties":true},"created_at":{"type":"string","format":"date-time","title":"Created At"}},"type":"object","required":["id","is_active","user_id","location_id","metadata","created_at"],"title":"Session","exclude":["h_metadata"]},"SessionCreate":{"properties":{"location_id":{"type":"string","title":"Location Id"},"metadata":{"anyOf":[{"type":"object","additionalProperties":true},{"type":"null"}],"title":"Metadata","default":{}}},"type":"object","required":["location_id"],"title":"SessionCreate"},"SessionUpdate":{"properties":{"metadata":{"anyOf":[{"type":"object","additionalProperties":true},{"type":"null"}],"title":"Metadata"}},"type":"object","title":"SessionUpdate"},"User":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"name":{"type":"string","title":"Name"},"app_id":{"type":"string","format":"uuid","title":"App Id"},"created_at":{"type":"string","format":"date-time","title":"Created At"},"metadata":{"type":"object","title":"Metadata","additionalProperties":true}},"type":"object","required":["id","name","app_id","created_at","metadata"],"title":"User","exclude":["h_metadata"]},"UserCreate":{"properties":{"name":{"type":"string","title":"Name"},"metadata":{"anyOf":[{"type":"object","additionalProperties":true},{"type":"null"}],"title":"Metadata","default":{}}},"type":"object","required":["name"],"title":"UserCreate"},"UserUpdate":{"properties":{"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"metadata":{"anyOf":[{"type":"object","additionalProperties":true},{"type":"null"}],"title":"Metadata"}},"type":"object","title":"UserUpdate"},"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":{"HTTPBearer":{"type":"http","scheme":"bearer"}}}} \ No newline at end of file