diff --git a/CHANGELOG.md b/CHANGELOG.md index fc6f0d64..f6371839 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,175 +1,195 @@ # Change Log + All notable changes to this project will be documented in this file. - + The format is based on [Keep a Changelog](http://keepachangelog.com/) and this project adheres to [Semantic Versioning](http://semver.org/). +## [0.0.12] — 2024-10-21 + +### Added + +- GitHub Actions Testing +- Ability to disable derivations on a session using the `deriver_disabled` flag + in a session's metadata +- `/v1/` prefix to all routes +- Environment variable to control deriver workers + +### Changed + +- public_ids to use [NanoID](https://github.com/ai/nanoid) and internal ID to + use `BigInt` +- Dialectic Endpoint can take a list of queries +- Using `uv` for project management +- User Representations stored in a metamessage rather than using reserved + collection +- Base model for Dialectic API and Deriver is now Claude 3.5 Sonnet +- Paginated GET requests now POST requests for better developer UX + +### Removed + +- Mirascope Dependency +- Slowapi Dependency +- Opentelemetry Dependencies and Setup + ## [0.0.11] — 2024-08-01 ### Added -* `session_id` column to `QueueItem` Table -* `ActiveQueueSession` Table to track which sessions are being actively -processed -* Queue can process multiple sessions at once +- `session_id` column to `QueueItem` Table +- `ActiveQueueSession` Table to track, which sessions are being actively + processed +- Queue can process multiple sessions at once ### Changed -* Sessions do not require a `location_id` -* Detailed printing using `rich` +- Sessions do not require a `location_id` +- Detailed printing using `rich` ## [0.0.10] — 2024-07-23 ### Added -* Test cases for Storage API -* Sentry tracing and profiling -* Additional Error handling +- Test cases for Storage API +- Sentry tracing and profiling +- Additional Error handling ### Changed -* Document API uses same embedding endpoint as deriver -* CRUD operations use one less database call by removing extra refresh -* Use database for timestampz rather than API -* Pydantic schemas to use modern syntax +- Document API uses same embedding endpoint as deriver +- CRUD operations use one less database call by removing extra refresh +- Use database for timestampz rather than API +- Pydantic schemas to use modern syntax ### Fixed -* Deriver queue resolution - +- Deriver queue resolution ## [0.0.9] — 2024-05-16 ### Added -* Deriver to docker compose -* Postgres based Queue for background jobs +- Deriver to docker compose +- Postgres based Queue for background jobs ### Changed -* Deriver to use a queue instead of supabase realtime -* Using mirascope instead of langchain +- Deriver to use a queue instead of supabase realtime +- Using mirascope instead of langchain ### Removed -* Legacy SDKs in preference for stainless SDKs - +- Legacy SDKs in preference for stainless SDKs ## [0.0.8] — 2024-05-09 ### Added -* Documentation to OpenAPI -* Bearer token auth to OpenAPI routes -* Get by ID routes for users and collections -* [NodeJS](https://github.com/plastic-labs/honcho-node) SDK support +- Documentation to OpenAPI +- Bearer token auth to OpenAPI routes +- Get by ID routes for users and collections +- [NodeJS](https://github.com/plastic-labs/honcho-node) SDK support ### Changed -* Authentication Middleware now implemented using built-in FastAPI Security -module -* Get by name routes for users and collections now include "name" in slug -* Python SDK moved to separate [respository](https://github.com/plastic-labs/honcho-python) +- Authentication Middleware now implemented using built-in FastAPI Security + module +- Get by name routes for users and collections now include "name" in slug +- Python SDK moved to separate [respository](https://github.com/plastic-labs/honcho-python) ### Fixed -* Error reporting for methods with integrity errors due to unique key -constraints +- Error reporting for methods with integrity errors due to unique key + constraints ## [0.0.7] — 2024-04-01 ### Added -* Authentication Middleware Interface +- Authentication Middleware Interface ## [0.0.6] — 2024-03-21 ### Added -* Full docker-compose for API and Database +- Full docker-compose for API and Database ### Fixed -* API Response schema removed unnecessary fields -* OTEL logging to properly work with async database engine -* `fly.toml` default settings for deriver set `auto_stop=false` +- API Response schema removed unnecessary fields +- OTEL logging to properly work with async database engine +- `fly.toml` default settings for deriver set `auto_stop=false` ### Changed -* Refactored API server into multiple route files - +- Refactored API server into multiple route files ## [0.0.5] — 2024-03-14 ### Added -* Metadata to all data primitives (Users, Sessions, Messages, etc.) -* Ability to filter paginated GET requests by JSON filter based on metadata -* Optional Sentry error monitoring -* Optional Opentelemetry logging -* Dialectic API to interact with honcho agent and get insights about users -* Automatic Fact Derivation Script for automatically generating simple memory +- Metadata to all data primitives (Users, Sessions, Messages, etc.) +- Ability to filter paginated GET requests by JSON filter based on metadata +- Optional Sentry error monitoring +- Optional Opentelemetry logging +- Dialectic API to interact with honcho agent and get insights about users +- Automatic Fact Derivation Script for automatically generating simple memory ### Changed -* API Server now uses async methods to make use of benefits of FastAPI - +- API Server now uses async methods to make use of benefits of FastAPI ## [0.0.4] — 2024-02-22 ### Added -* apps table with a relationship to the users table -* users table with a relationship to the collections and sessions tables -* Reverse Pagination support to get recent messages, sessions, etc. more easily -* Linting Rules +- apps table with a relationship to the users table +- users table with a relationship to the collections and sessions tables +- Reverse Pagination support to get recent messages, sessions, etc. more easily +- Linting Rules ### Changed -* Get sessions method returns all sessions including inactive -* using timestampz instead of timestamp - +- Get sessions method returns all sessions including inactive +- using timestampz instead of timestamp ## [0.0.3] — 2024-02-15 ### Added -* Collections table to reference a collection of embedding documents -* Documents table to hold vector embeddings for RAG workflows -* Local scripts for running a postgres database with pgvector installed -* OpenAI Dependency for embedding models -* PGvector dependency for vector db support +- Collections table to reference a collection of embedding documents +- Documents table to hold vector embeddings for RAG workflows +- Local scripts for running a postgres database with pgvector installed +- OpenAI Dependency for embedding models +- PGvector dependency for vector db support ### Changed -* session_data is now metadata -* session_data is a JSON field used python `dict` for compatability - +- session_data is now metadata +- session_data is a JSON field used python `dict` for compatability ## [0.0.2] — 2024-02-01 ### Added -* Pagination for requests via `fastapi_pagination` -* Metamessages -* `get_message` routes -* `created_at` field added to each Table -* Message size limits +- Pagination for requests via `fastapi_pagination` +- Metamessages +- `get_message` routes +- `created_at` field added to each Table +- Message size limits ### Changed -* IDs are now UUIDs -* default rate limit now 100 requests per minute +- IDs are now UUIDs +- default rate limit now 100 requests per minute ### Removed -* Removed messages from session response model - +- Removed messages from session response model ## [0.0.1] — 2024-02-01 ### Added -* Rate limiting of 10 requests for minute -* Application level scoping - +- Rate limiting of 10 requests for minute +- Application level scoping diff --git a/docs/api-reference/endpoint/apps/create-app.mdx b/docs/api-reference/endpoint/apps/create-app.mdx index 0a2ec539..f557617b 100644 --- a/docs/api-reference/endpoint/apps/create-app.mdx +++ b/docs/api-reference/endpoint/apps/create-app.mdx @@ -1,3 +1,3 @@ --- -openapi: post /apps +openapi: post /v1/apps --- \ No newline at end of file diff --git a/docs/api-reference/endpoint/apps/get-app-by-name.mdx b/docs/api-reference/endpoint/apps/get-app-by-name.mdx index e738d851..97cdd25e 100644 --- a/docs/api-reference/endpoint/apps/get-app-by-name.mdx +++ b/docs/api-reference/endpoint/apps/get-app-by-name.mdx @@ -1,3 +1,3 @@ --- -openapi: get /apps/name/{name} +openapi: get /v1/apps/name/{name} --- \ No newline at end of file diff --git a/docs/api-reference/endpoint/apps/get-app.mdx b/docs/api-reference/endpoint/apps/get-app.mdx index 955aa866..34e1def7 100644 --- a/docs/api-reference/endpoint/apps/get-app.mdx +++ b/docs/api-reference/endpoint/apps/get-app.mdx @@ -1,3 +1,3 @@ --- -openapi: get /apps/{app_id} +openapi: get /v1/apps/{app_id} --- \ No newline at end of file diff --git a/docs/api-reference/endpoint/apps/get-or-create-app.mdx b/docs/api-reference/endpoint/apps/get-or-create-app.mdx index c871fccd..ff43616e 100644 --- a/docs/api-reference/endpoint/apps/get-or-create-app.mdx +++ b/docs/api-reference/endpoint/apps/get-or-create-app.mdx @@ -1,3 +1,3 @@ --- -openapi: get /apps/get_or_create/{name} +openapi: get /v1/apps/get_or_create/{name} --- \ No newline at end of file diff --git a/docs/api-reference/endpoint/apps/update-app.mdx b/docs/api-reference/endpoint/apps/update-app.mdx index e12a95f8..b2e718c4 100644 --- a/docs/api-reference/endpoint/apps/update-app.mdx +++ b/docs/api-reference/endpoint/apps/update-app.mdx @@ -1,3 +1,3 @@ --- -openapi: put /apps/{app_id} +openapi: put /v1/apps/{app_id} --- \ No newline at end of file diff --git a/docs/api-reference/endpoint/collections/create-collection.mdx b/docs/api-reference/endpoint/collections/create-collection.mdx index 351b11b0..ebb14c42 100644 --- a/docs/api-reference/endpoint/collections/create-collection.mdx +++ b/docs/api-reference/endpoint/collections/create-collection.mdx @@ -1,3 +1,3 @@ --- -openapi: post /apps/{app_id}/users/{user_id}/collections +openapi: post /v1/apps/{app_id}/users/{user_id}/collections --- \ No newline at end of file diff --git a/docs/api-reference/endpoint/collections/delete-collection.mdx b/docs/api-reference/endpoint/collections/delete-collection.mdx index ebbc68f0..7a059489 100644 --- a/docs/api-reference/endpoint/collections/delete-collection.mdx +++ b/docs/api-reference/endpoint/collections/delete-collection.mdx @@ -1,3 +1,3 @@ --- -openapi: delete /apps/{app_id}/users/{user_id}/collections/{collection_id} +openapi: delete /v1/apps/{app_id}/users/{user_id}/collections/{collection_id} --- \ No newline at end of file diff --git a/docs/api-reference/endpoint/collections/get-collection-by-id.mdx b/docs/api-reference/endpoint/collections/get-collection-by-id.mdx index 7771a149..390ea384 100644 --- a/docs/api-reference/endpoint/collections/get-collection-by-id.mdx +++ b/docs/api-reference/endpoint/collections/get-collection-by-id.mdx @@ -1,3 +1,3 @@ --- -openapi: get /apps/{app_id}/users/{user_id}/collections/{collection_id} +openapi: get /v1/apps/{app_id}/users/{user_id}/collections/{collection_id} --- \ No newline at end of file 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 fb29aef1..54dc1f92 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/{name} ---- +openapi: get /v1/apps/{app_id}/users/{user_id}/collections/name/{name} +--- \ No newline at end of file diff --git a/docs/api-reference/endpoint/collections/get-collections.mdx b/docs/api-reference/endpoint/collections/get-collections.mdx index 2f2e3b44..9b6e96cf 100644 --- a/docs/api-reference/endpoint/collections/get-collections.mdx +++ b/docs/api-reference/endpoint/collections/get-collections.mdx @@ -1,3 +1,3 @@ --- -openapi: get /apps/{app_id}/users/{user_id}/collections +openapi: post /v1/apps/{app_id}/users/{user_id}/collections/list --- \ No newline at end of file diff --git a/docs/api-reference/endpoint/collections/update-collection.mdx b/docs/api-reference/endpoint/collections/update-collection.mdx index ad16c142..56560e7e 100644 --- a/docs/api-reference/endpoint/collections/update-collection.mdx +++ b/docs/api-reference/endpoint/collections/update-collection.mdx @@ -1,3 +1,3 @@ --- -openapi: put /apps/{app_id}/users/{user_id}/collections/{collection_id} +openapi: put /v1/apps/{app_id}/users/{user_id}/collections/{collection_id} --- \ No newline at end of file diff --git a/docs/api-reference/endpoint/documents/create-document.mdx b/docs/api-reference/endpoint/documents/create-document.mdx index 829c4169..55fa7cc5 100644 --- a/docs/api-reference/endpoint/documents/create-document.mdx +++ b/docs/api-reference/endpoint/documents/create-document.mdx @@ -1,3 +1,3 @@ --- -openapi: post /apps/{app_id}/users/{user_id}/collections/{collection_id}/documents +openapi: post /v1/apps/{app_id}/users/{user_id}/collections/{collection_id}/documents --- \ No newline at end of file diff --git a/docs/api-reference/endpoint/documents/delete-document.mdx b/docs/api-reference/endpoint/documents/delete-document.mdx index c6c4f234..c5b3bbba 100644 --- a/docs/api-reference/endpoint/documents/delete-document.mdx +++ b/docs/api-reference/endpoint/documents/delete-document.mdx @@ -1,3 +1,3 @@ --- -openapi: delete /apps/{app_id}/users/{user_id}/collections/{collection_id}/documents/{document_id} +openapi: delete /v1/apps/{app_id}/users/{user_id}/collections/{collection_id}/documents/{document_id} --- \ No newline at end of file diff --git a/docs/api-reference/endpoint/documents/get-document.mdx b/docs/api-reference/endpoint/documents/get-document.mdx index 5f60bdde..a073650b 100644 --- a/docs/api-reference/endpoint/documents/get-document.mdx +++ b/docs/api-reference/endpoint/documents/get-document.mdx @@ -1,3 +1,3 @@ --- -openapi: get /apps/{app_id}/users/{user_id}/collections/{collection_id}/documents/{document_id} +openapi: get /v1/apps/{app_id}/users/{user_id}/collections/{collection_id}/documents/{document_id} --- \ No newline at end of file diff --git a/docs/api-reference/endpoint/documents/get-documents.mdx b/docs/api-reference/endpoint/documents/get-documents.mdx index 55331c2c..4ae4ef73 100644 --- a/docs/api-reference/endpoint/documents/get-documents.mdx +++ b/docs/api-reference/endpoint/documents/get-documents.mdx @@ -1,3 +1,3 @@ --- -openapi: get /apps/{app_id}/users/{user_id}/collections/{collection_id}/documents +openapi: post /v1/apps/{app_id}/users/{user_id}/collections/{collection_id}/documents/list --- \ No newline at end of file diff --git a/docs/api-reference/endpoint/documents/query-documents.mdx b/docs/api-reference/endpoint/documents/query-documents.mdx index a9f35ba3..ca97f4ec 100644 --- a/docs/api-reference/endpoint/documents/query-documents.mdx +++ b/docs/api-reference/endpoint/documents/query-documents.mdx @@ -1,3 +1,3 @@ --- -openapi: get /apps/{app_id}/users/{user_id}/collections/{collection_id}/query +openapi: get /v1/apps/{app_id}/users/{user_id}/collections/{collection_id}/documents/query --- \ No newline at end of file diff --git a/docs/api-reference/endpoint/documents/update-document.mdx b/docs/api-reference/endpoint/documents/update-document.mdx index 5b0cb136..9e2fb1fa 100644 --- a/docs/api-reference/endpoint/documents/update-document.mdx +++ b/docs/api-reference/endpoint/documents/update-document.mdx @@ -1,3 +1,3 @@ --- -openapi: put /apps/{app_id}/users/{user_id}/collections/{collection_id}/documents/{document_id} +openapi: put /v1/apps/{app_id}/users/{user_id}/collections/{collection_id}/documents/{document_id} --- \ No newline at end of file diff --git a/docs/api-reference/endpoint/messages/create-message-for-session.mdx b/docs/api-reference/endpoint/messages/create-message-for-session.mdx index 67477599..29581f9a 100644 --- a/docs/api-reference/endpoint/messages/create-message-for-session.mdx +++ b/docs/api-reference/endpoint/messages/create-message-for-session.mdx @@ -1,3 +1,3 @@ --- -openapi: post /apps/{app_id}/users/{user_id}/sessions/{session_id}/messages +openapi: post /v1/apps/{app_id}/users/{user_id}/sessions/{session_id}/messages --- \ No newline at end of file diff --git a/docs/api-reference/endpoint/messages/create-metamessage.mdx b/docs/api-reference/endpoint/messages/create-metamessage.mdx deleted file mode 100644 index 47b4ff34..00000000 --- a/docs/api-reference/endpoint/messages/create-metamessage.mdx +++ /dev/null @@ -1,3 +0,0 @@ ---- -openapi: post /apps/{app_id}/users/{user_id}/sessions/{session_id}/metamessages ---- \ No newline at end of file diff --git a/docs/api-reference/endpoint/messages/get-message.mdx b/docs/api-reference/endpoint/messages/get-message.mdx index e614aeb3..519fbecc 100644 --- a/docs/api-reference/endpoint/messages/get-message.mdx +++ b/docs/api-reference/endpoint/messages/get-message.mdx @@ -1,3 +1,3 @@ --- -openapi: get /apps/{app_id}/users/{user_id}/sessions/{session_id}/messages/{message_id} +openapi: get /v1/apps/{app_id}/users/{user_id}/sessions/{session_id}/messages/{message_id} --- \ No newline at end of file diff --git a/docs/api-reference/endpoint/messages/get-messages.mdx b/docs/api-reference/endpoint/messages/get-messages.mdx index d3602fa3..1f6001f4 100644 --- a/docs/api-reference/endpoint/messages/get-messages.mdx +++ b/docs/api-reference/endpoint/messages/get-messages.mdx @@ -1,3 +1,3 @@ --- -openapi: get /apps/{app_id}/users/{user_id}/sessions/{session_id}/messages +openapi: post /v1/apps/{app_id}/users/{user_id}/sessions/{session_id}/messages/list --- \ No newline at end of file diff --git a/docs/api-reference/endpoint/messages/get-metamessage.mdx b/docs/api-reference/endpoint/messages/get-metamessage.mdx deleted file mode 100644 index ec0a8719..00000000 --- a/docs/api-reference/endpoint/messages/get-metamessage.mdx +++ /dev/null @@ -1,3 +0,0 @@ ---- -openapi: get /apps/{app_id}/users/{user_id}/sessions/{session_id}/metamessages/{metamessage_id} ---- \ No newline at end of file diff --git a/docs/api-reference/endpoint/messages/get-metamessages.mdx b/docs/api-reference/endpoint/messages/get-metamessages.mdx deleted file mode 100644 index 73ba6a6b..00000000 --- a/docs/api-reference/endpoint/messages/get-metamessages.mdx +++ /dev/null @@ -1,3 +0,0 @@ ---- -openapi: get /apps/{app_id}/users/{user_id}/sessions/{session_id}/metamessages ---- \ No newline at end of file diff --git a/docs/api-reference/endpoint/messages/update-message.mdx b/docs/api-reference/endpoint/messages/update-message.mdx index 06975171..ed44d5e0 100644 --- a/docs/api-reference/endpoint/messages/update-message.mdx +++ b/docs/api-reference/endpoint/messages/update-message.mdx @@ -1,3 +1,3 @@ --- -openapi: put /apps/{app_id}/users/{user_id}/sessions/{session_id}/messages/{message_id} +openapi: put /v1/apps/{app_id}/users/{user_id}/sessions/{session_id}/messages/{message_id} --- \ No newline at end of file diff --git a/docs/api-reference/endpoint/messages/update-metamessage.mdx b/docs/api-reference/endpoint/messages/update-metamessage.mdx deleted file mode 100644 index 507100d1..00000000 --- a/docs/api-reference/endpoint/messages/update-metamessage.mdx +++ /dev/null @@ -1,3 +0,0 @@ ---- -openapi: put /apps/{app_id}/users/{user_id}/sessions/{session_id}/metamessages/{metamessage_id} ---- \ No newline at end of file diff --git a/docs/api-reference/endpoint/metamessages/create-metamessage.mdx b/docs/api-reference/endpoint/metamessages/create-metamessage.mdx new file mode 100644 index 00000000..755d8f3d --- /dev/null +++ b/docs/api-reference/endpoint/metamessages/create-metamessage.mdx @@ -0,0 +1,3 @@ +--- +openapi: post /v1/apps/{app_id}/users/{user_id}/sessions/{session_id}/metamessages +--- \ No newline at end of file diff --git a/docs/api-reference/endpoint/metamessages/get-metamessage.mdx b/docs/api-reference/endpoint/metamessages/get-metamessage.mdx new file mode 100644 index 00000000..187df41c --- /dev/null +++ b/docs/api-reference/endpoint/metamessages/get-metamessage.mdx @@ -0,0 +1,3 @@ +--- +openapi: get /v1/apps/{app_id}/users/{user_id}/sessions/{session_id}/metamessages/{metamessage_id} +--- \ No newline at end of file diff --git a/docs/api-reference/endpoint/metamessages/get-metamessages-by-user.mdx b/docs/api-reference/endpoint/metamessages/get-metamessages-by-user.mdx new file mode 100644 index 00000000..ca013d21 --- /dev/null +++ b/docs/api-reference/endpoint/metamessages/get-metamessages-by-user.mdx @@ -0,0 +1,3 @@ +--- +openapi: post /v1/apps/{app_id}/users/{user_id}/metamessages/list +--- \ No newline at end of file diff --git a/docs/api-reference/endpoint/metamessages/get-metamessages.mdx b/docs/api-reference/endpoint/metamessages/get-metamessages.mdx new file mode 100644 index 00000000..629c64b5 --- /dev/null +++ b/docs/api-reference/endpoint/metamessages/get-metamessages.mdx @@ -0,0 +1,3 @@ +--- +openapi: post /v1/apps/{app_id}/users/{user_id}/sessions/{session_id}/metamessages/list +--- \ No newline at end of file diff --git a/docs/api-reference/endpoint/metamessages/update-metamessage.mdx b/docs/api-reference/endpoint/metamessages/update-metamessage.mdx new file mode 100644 index 00000000..c94afcb0 --- /dev/null +++ b/docs/api-reference/endpoint/metamessages/update-metamessage.mdx @@ -0,0 +1,3 @@ +--- +openapi: put /v1/apps/{app_id}/users/{user_id}/sessions/{session_id}/metamessages/{metamessage_id} +--- \ No newline at end of file diff --git a/docs/api-reference/endpoint/sessions/chat-stream.mdx b/docs/api-reference/endpoint/sessions/chat-stream.mdx new file mode 100644 index 00000000..6b4cd59e --- /dev/null +++ b/docs/api-reference/endpoint/sessions/chat-stream.mdx @@ -0,0 +1,3 @@ +--- +openapi: post /v1/apps/{app_id}/users/{user_id}/sessions/{session_id}/chat/stream +--- diff --git a/docs/api-reference/endpoint/sessions/chat.mdx b/docs/api-reference/endpoint/sessions/chat.mdx new file mode 100644 index 00000000..da1520af --- /dev/null +++ b/docs/api-reference/endpoint/sessions/chat.mdx @@ -0,0 +1,3 @@ +--- +openapi: post /v1/apps/{app_id}/users/{user_id}/sessions/{session_id}/chat +--- \ No newline at end of file diff --git a/docs/api-reference/endpoint/sessions/create-session.mdx b/docs/api-reference/endpoint/sessions/create-session.mdx index f785e35b..455f8e6b 100644 --- a/docs/api-reference/endpoint/sessions/create-session.mdx +++ b/docs/api-reference/endpoint/sessions/create-session.mdx @@ -1,3 +1,3 @@ --- -openapi: post /apps/{app_id}/users/{user_id}/sessions +openapi: post /v1/apps/{app_id}/users/{user_id}/sessions --- \ No newline at end of file diff --git a/docs/api-reference/endpoint/sessions/delete-session.mdx b/docs/api-reference/endpoint/sessions/delete-session.mdx index 3bacb400..f9c3480a 100644 --- a/docs/api-reference/endpoint/sessions/delete-session.mdx +++ b/docs/api-reference/endpoint/sessions/delete-session.mdx @@ -1,3 +1,3 @@ --- -openapi: delete /apps/{app_id}/users/{user_id}/sessions/{session_id} +openapi: delete /v1/apps/{app_id}/users/{user_id}/sessions/{session_id} --- \ No newline at end of file diff --git a/docs/api-reference/endpoint/sessions/get-chat-stream.mdx b/docs/api-reference/endpoint/sessions/get-chat-stream.mdx deleted file mode 100644 index ac52ac0f..00000000 --- a/docs/api-reference/endpoint/sessions/get-chat-stream.mdx +++ /dev/null @@ -1,3 +0,0 @@ ---- -openapi: get /apps/{app_id}/users/{user_id}/sessions/{session_id}/chat/stream ---- \ No newline at end of file diff --git a/docs/api-reference/endpoint/sessions/get-chat.mdx b/docs/api-reference/endpoint/sessions/get-chat.mdx deleted file mode 100644 index 566b50e7..00000000 --- a/docs/api-reference/endpoint/sessions/get-chat.mdx +++ /dev/null @@ -1,3 +0,0 @@ ---- -openapi: get /apps/{app_id}/users/{user_id}/sessions/{session_id}/chat ---- \ No newline at end of file diff --git a/docs/api-reference/endpoint/sessions/get-session.mdx b/docs/api-reference/endpoint/sessions/get-session.mdx index 762384ac..18c8b94f 100644 --- a/docs/api-reference/endpoint/sessions/get-session.mdx +++ b/docs/api-reference/endpoint/sessions/get-session.mdx @@ -1,3 +1,3 @@ --- -openapi: get /apps/{app_id}/users/{user_id}/sessions/{session_id} +openapi: get /v1/apps/{app_id}/users/{user_id}/sessions/{session_id} --- \ No newline at end of file diff --git a/docs/api-reference/endpoint/sessions/get-sessions.mdx b/docs/api-reference/endpoint/sessions/get-sessions.mdx index cb6e61eb..e5ca7307 100644 --- a/docs/api-reference/endpoint/sessions/get-sessions.mdx +++ b/docs/api-reference/endpoint/sessions/get-sessions.mdx @@ -1,3 +1,3 @@ --- -openapi: get /apps/{app_id}/users/{user_id}/sessions +openapi: post /v1/apps/{app_id}/users/{user_id}/sessions/list --- \ No newline at end of file diff --git a/docs/api-reference/endpoint/sessions/update-session.mdx b/docs/api-reference/endpoint/sessions/update-session.mdx index 25c75c1d..ca747d47 100644 --- a/docs/api-reference/endpoint/sessions/update-session.mdx +++ b/docs/api-reference/endpoint/sessions/update-session.mdx @@ -1,3 +1,3 @@ --- -openapi: put /apps/{app_id}/users/{user_id}/sessions/{session_id} +openapi: put /v1/apps/{app_id}/users/{user_id}/sessions/{session_id} --- \ No newline at end of file diff --git a/docs/api-reference/endpoint/users/create-user.mdx b/docs/api-reference/endpoint/users/create-user.mdx index 24b5314f..e98510ac 100644 --- a/docs/api-reference/endpoint/users/create-user.mdx +++ b/docs/api-reference/endpoint/users/create-user.mdx @@ -1,3 +1,3 @@ --- -openapi: post /apps/{app_id}/users +openapi: post /v1/apps/{app_id}/users --- \ No newline at end of file diff --git a/docs/api-reference/endpoint/users/get-or-create-user.mdx b/docs/api-reference/endpoint/users/get-or-create-user.mdx index 6741344f..0dd11ce4 100644 --- a/docs/api-reference/endpoint/users/get-or-create-user.mdx +++ b/docs/api-reference/endpoint/users/get-or-create-user.mdx @@ -1,3 +1,3 @@ --- -openapi: get /apps/{app_id}/users/get_or_create/{name} +openapi: get /v1/apps/{app_id}/users/get_or_create/{name} --- \ No newline at end of file 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 6f6ec65c..aa9ad808 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/{name} ---- +openapi: get /v1/apps/{app_id}/users/name/{name} +--- \ No newline at end of file diff --git a/docs/api-reference/endpoint/users/get-user.mdx b/docs/api-reference/endpoint/users/get-user.mdx index 95c39f96..420a260f 100644 --- a/docs/api-reference/endpoint/users/get-user.mdx +++ b/docs/api-reference/endpoint/users/get-user.mdx @@ -1,3 +1,3 @@ --- -openapi: get /apps/{app_id}/users/{user_id} +openapi: get /v1/apps/{app_id}/users/{user_id} --- \ No newline at end of file diff --git a/docs/api-reference/endpoint/users/get-users.mdx b/docs/api-reference/endpoint/users/get-users.mdx index c2766389..e75216ad 100644 --- a/docs/api-reference/endpoint/users/get-users.mdx +++ b/docs/api-reference/endpoint/users/get-users.mdx @@ -1,3 +1,3 @@ --- -openapi: get /apps/{app_id}/users +openapi: post /v1/apps/{app_id}/users/list --- \ No newline at end of file diff --git a/docs/api-reference/endpoint/users/update-user.mdx b/docs/api-reference/endpoint/users/update-user.mdx index 7c8790e0..720a6137 100644 --- a/docs/api-reference/endpoint/users/update-user.mdx +++ b/docs/api-reference/endpoint/users/update-user.mdx @@ -1,3 +1,3 @@ --- -openapi: put /apps/{app_id}/users/{user_id} +openapi: put /v1/apps/{app_id}/users/{user_id} --- \ No newline at end of file diff --git a/docs/formatted_old.json b/docs/formatted_old.json new file mode 100644 index 00000000..f75bd032 --- /dev/null +++ b/docs/formatted_old.json @@ -0,0 +1,4426 @@ +{ + "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.0.11" + }, + "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';\n\nconst client = new Honcho({\n apiKey: process.env['HONCHO_API_KEY'], // This is the default and can be omitted\n});\n\nasync function main() {\n const app = await client.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_API_KEY\"),\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';\n\nconst client = new Honcho({\n apiKey: process.env['HONCHO_API_KEY'], // This is the default and can be omitted\n});\n\nasync function main() {\n const app = await client.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_API_KEY\"),\n)\napp = client.apps.update(\n app_id=\"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';\n\nconst client = new Honcho({\n apiKey: process.env['HONCHO_API_KEY'], // This is the default and can be omitted\n});\n\nasync function main() {\n const app = await client.apps.getByName('name');\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_API_KEY\"),\n)\napp = client.apps.get_by_name(\n \"name\",\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';\n\nconst client = new Honcho({\n apiKey: process.env['HONCHO_API_KEY'], // This is the default and can be omitted\n});\n\nasync function main() {\n const app = await client.apps.create({ name: 'name' });\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_API_KEY\"),\n)\napp = client.apps.create(\n name=\"name\",\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';\n\nconst client = new Honcho({\n apiKey: process.env['HONCHO_API_KEY'], // This is the default and can be omitted\n});\n\nasync function main() {\n const app = await client.apps.getOrCreate('name');\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_API_KEY\"),\n)\napp = client.apps.get_or_create(\n \"name\",\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';\n\nconst client = new Honcho({\n apiKey: process.env['HONCHO_API_KEY'], // This is the default and can be omitted\n});\n\nasync function main() {\n const user = await client.apps.users.create('182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e', { name: 'name' });\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_API_KEY\"),\n)\nuser = client.apps.users.create(\n app_id=\"182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e\",\n name=\"name\",\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';\n\nconst client = new Honcho({\n apiKey: process.env['HONCHO_API_KEY'], // 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 client.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_API_KEY\"),\n)\npage = client.apps.users.list(\n app_id=\"182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e\",\n)\npage = page.items[0]\nprint(page.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';\n\nconst client = new Honcho({\n apiKey: process.env['HONCHO_API_KEY'], // This is the default and can be omitted\n});\n\nasync function main() {\n const user = await client.apps.users.getByName('182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e', 'name');\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_API_KEY\"),\n)\nuser = client.apps.users.get_by_name(\n name=\"name\",\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';\n\nconst client = new Honcho({\n apiKey: process.env['HONCHO_API_KEY'], // This is the default and can be omitted\n});\n\nasync function main() {\n const user = await client.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_API_KEY\"),\n)\nuser = client.apps.users.get(\n user_id=\"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';\n\nconst client = new Honcho({\n apiKey: process.env['HONCHO_API_KEY'], // This is the default and can be omitted\n});\n\nasync function main() {\n const user = await client.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_API_KEY\"),\n)\nuser = client.apps.users.update(\n user_id=\"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';\n\nconst client = new Honcho({\n apiKey: process.env['HONCHO_API_KEY'], // This is the default and can be omitted\n});\n\nasync function main() {\n const user = await client.apps.users.getOrCreate('182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e', 'name');\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_API_KEY\"),\n)\nuser = client.apps.users.get_or_create(\n name=\"name\",\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\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": "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';\n\nconst client = new Honcho({\n apiKey: process.env['HONCHO_API_KEY'], // 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 client.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_API_KEY\"),\n)\npage = client.apps.users.sessions.list(\n user_id=\"182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e\",\n app_id=\"182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e\",\n)\npage = page.items[0]\nprint(page.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\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';\n\nconst client = new Honcho({\n apiKey: process.env['HONCHO_API_KEY'], // This is the default and can be omitted\n});\n\nasync function main() {\n const session = await client.apps.users.sessions.create(\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_API_KEY\"),\n)\nsession = client.apps.users.sessions.create(\n user_id=\"182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e\",\n app_id=\"182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e\",\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';\n\nconst client = new Honcho({\n apiKey: process.env['HONCHO_API_KEY'], // This is the default and can be omitted\n});\n\nasync function main() {\n const session = await client.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_API_KEY\"),\n)\nsession = client.apps.users.sessions.update(\n session_id=\"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';\n\nconst client = new Honcho({\n apiKey: process.env['HONCHO_API_KEY'], // This is the default and can be omitted\n});\n\nasync function main() {\n const sessionDeleteResponse = await client.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_API_KEY\"),\n)\nsession_delete_response = client.apps.users.sessions.delete(\n session_id=\"182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e\",\n app_id=\"182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e\",\n user_id=\"182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e\",\n)\nprint(session_delete_response)" + } + ] + }, + "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';\n\nconst client = new Honcho({\n apiKey: process.env['HONCHO_API_KEY'], // This is the default and can be omitted\n});\n\nasync function main() {\n const session = await client.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_API_KEY\"),\n)\nsession = client.apps.users.sessions.get(\n session_id=\"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';\n\nconst client = new Honcho({\n apiKey: process.env['HONCHO_API_KEY'], // This is the default and can be omitted\n});\n\nasync function main() {\n const agentChat = await client.apps.users.sessions.chat(\n '182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e',\n '182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e',\n '182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e',\n { query: 'query' },\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_API_KEY\"),\n)\nagent_chat = client.apps.users.sessions.chat(\n session_id=\"182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e\",\n app_id=\"182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e\",\n user_id=\"182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e\",\n query=\"query\",\n)\nprint(agent_chat.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';\n\nconst client = new Honcho({\n apiKey: process.env['HONCHO_API_KEY'], // This is the default and can be omitted\n});\n\nasync function main() {\n const sessionStreamResponse = await client.apps.users.sessions.stream(\n '182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e',\n '182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e',\n '182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e',\n { query: 'query' },\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_API_KEY\"),\n)\nsession_stream_response = client.apps.users.sessions.stream(\n session_id=\"182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e\",\n app_id=\"182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e\",\n user_id=\"182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e\",\n query=\"query\",\n)\nprint(session_stream_response)" + } + ] + } + }, + "/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';\n\nconst client = new Honcho({\n apiKey: process.env['HONCHO_API_KEY'], // This is the default and can be omitted\n});\n\nasync function main() {\n const message = await client.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: 'content', 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_API_KEY\"),\n)\nmessage = client.apps.users.sessions.messages.create(\n session_id=\"182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e\",\n app_id=\"182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e\",\n user_id=\"182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e\",\n content=\"content\",\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';\n\nconst client = new Honcho({\n apiKey: process.env['HONCHO_API_KEY'], // 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 client.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_API_KEY\"),\n)\npage = client.apps.users.sessions.messages.list(\n session_id=\"182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e\",\n app_id=\"182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e\",\n user_id=\"182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e\",\n)\npage = page.items[0]\nprint(page.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';\n\nconst client = new Honcho({\n apiKey: process.env['HONCHO_API_KEY'], // This is the default and can be omitted\n});\n\nasync function main() {\n const message = await client.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_API_KEY\"),\n)\nmessage = client.apps.users.sessions.messages.get(\n message_id=\"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';\n\nconst client = new Honcho({\n apiKey: process.env['HONCHO_API_KEY'], // This is the default and can be omitted\n});\n\nasync function main() {\n const message = await client.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_API_KEY\"),\n)\nmessage = client.apps.users.sessions.messages.update(\n message_id=\"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 metamessage 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 metamessage to\n metamessage (schemas.MetamessageCreate): The Metamessage object to add containing the\n metamessage content and type\n\nReturns:\n schemas.Metamessage: The Metamessage object of the added metamessage\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';\n\nconst client = new Honcho({\n apiKey: process.env['HONCHO_API_KEY'], // This is the default and can be omitted\n});\n\nasync function main() {\n const metamessage = await client.apps.users.sessions.metamessages.create(\n '182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e',\n '182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e',\n '182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e',\n {\n content: 'content',\n message_id: '182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e',\n metamessage_type: 'metamessage_type',\n },\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_API_KEY\"),\n)\nmetamessage = client.apps.users.sessions.metamessages.create(\n session_id=\"182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e\",\n app_id=\"182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e\",\n user_id=\"182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e\",\n content=\"content\",\n message_id=\"182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e\",\n metamessage_type=\"metamessage_type\",\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';\n\nconst client = new Honcho({\n apiKey: process.env['HONCHO_API_KEY'], // 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 client.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_API_KEY\"),\n)\npage = client.apps.users.sessions.metamessages.list(\n session_id=\"182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e\",\n app_id=\"182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e\",\n user_id=\"182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e\",\n)\npage = page.items[0]\nprint(page.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';\n\nconst client = new Honcho({\n apiKey: process.env['HONCHO_API_KEY'], // This is the default and can be omitted\n});\n\nasync function main() {\n const metamessage = await client.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_API_KEY\"),\n)\nmetamessage = client.apps.users.sessions.metamessages.get(\n metamessage_id=\"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';\n\nconst client = new Honcho({\n apiKey: process.env['HONCHO_API_KEY'], // This is the default and can be omitted\n});\n\nasync function main() {\n const metamessage = await client.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_API_KEY\"),\n)\nmetamessage = client.apps.users.sessions.metamessages.update(\n metamessage_id=\"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';\n\nconst client = new Honcho({\n apiKey: process.env['HONCHO_API_KEY'], // 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 client.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_API_KEY\"),\n)\npage = client.apps.users.collections.list(\n user_id=\"182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e\",\n app_id=\"182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e\",\n)\npage = page.items[0]\nprint(page.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';\n\nconst client = new Honcho({\n apiKey: process.env['HONCHO_API_KEY'], // This is the default and can be omitted\n});\n\nasync function main() {\n const collection = await client.apps.users.collections.create(\n '182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e',\n '182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e',\n { name: 'name' },\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_API_KEY\"),\n)\ncollection = client.apps.users.collections.create(\n user_id=\"182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e\",\n app_id=\"182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e\",\n name=\"name\",\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';\n\nconst client = new Honcho({\n apiKey: process.env['HONCHO_API_KEY'], // This is the default and can be omitted\n});\n\nasync function main() {\n const collection = await client.apps.users.collections.getByName(\n '182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e',\n '182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e',\n 'name',\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_API_KEY\"),\n)\ncollection = client.apps.users.collections.get_by_name(\n name=\"name\",\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';\n\nconst client = new Honcho({\n apiKey: process.env['HONCHO_API_KEY'], // This is the default and can be omitted\n});\n\nasync function main() {\n const collection = await client.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_API_KEY\"),\n)\ncollection = client.apps.users.collections.get(\n collection_id=\"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';\n\nconst client = new Honcho({\n apiKey: process.env['HONCHO_API_KEY'], // This is the default and can be omitted\n});\n\nasync function main() {\n const collection = await client.apps.users.collections.update(\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_API_KEY\"),\n)\ncollection = client.apps.users.collections.update(\n collection_id=\"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)" + } + ] + }, + "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';\n\nconst client = new Honcho({\n apiKey: process.env['HONCHO_API_KEY'], // This is the default and can be omitted\n});\n\nasync function main() {\n const collectionDeleteResponse = await client.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_API_KEY\"),\n)\ncollection_delete_response = client.apps.users.collections.delete(\n collection_id=\"182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e\",\n app_id=\"182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e\",\n user_id=\"182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e\",\n)\nprint(collection_delete_response)" + } + ] + } + }, + "/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';\n\nconst client = new Honcho({\n apiKey: process.env['HONCHO_API_KEY'], // 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 client.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_API_KEY\"),\n)\npage = client.apps.users.collections.documents.list(\n collection_id=\"182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e\",\n app_id=\"182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e\",\n user_id=\"182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e\",\n)\npage = page.items[0]\nprint(page.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';\n\nconst client = new Honcho({\n apiKey: process.env['HONCHO_API_KEY'], // This is the default and can be omitted\n});\n\nasync function main() {\n const document = await client.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: 'content' },\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_API_KEY\"),\n)\ndocument = client.apps.users.collections.documents.create(\n collection_id=\"182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e\",\n app_id=\"182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e\",\n user_id=\"182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e\",\n content=\"content\",\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';\n\nconst client = new Honcho({\n apiKey: process.env['HONCHO_API_KEY'], // This is the default and can be omitted\n});\n\nasync function main() {\n const document = await client.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_API_KEY\"),\n)\ndocument = client.apps.users.collections.documents.get(\n document_id=\"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';\n\nconst client = new Honcho({\n apiKey: process.env['HONCHO_API_KEY'], // This is the default and can be omitted\n});\n\nasync function main() {\n const document = await client.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_API_KEY\"),\n)\ndocument = client.apps.users.collections.documents.update(\n document_id=\"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';\n\nconst client = new Honcho({\n apiKey: process.env['HONCHO_API_KEY'], // This is the default and can be omitted\n});\n\nasync function main() {\n const documentDeleteResponse = await client.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_API_KEY\"),\n)\ndocument_delete_response = client.apps.users.collections.documents.delete(\n document_id=\"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_delete_response)" + } + ] + } + }, + "/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 Documents Query Get" + } + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + }, + "x-codeSamples": [ + { + "lang": "JavaScript", + "source": "import Honcho from 'honcho';\n\nconst client = new Honcho({\n apiKey: process.env['HONCHO_API_KEY'], // This is the default and can be omitted\n});\n\nasync function main() {\n const collectionQueryResponse = await client.apps.users.collections.query(\n '182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e',\n '182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e',\n '182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e',\n { query: 'query' },\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_API_KEY\"),\n)\ncollection_query_response = client.apps.users.collections.query(\n collection_id=\"182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e\",\n app_id=\"182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e\",\n user_id=\"182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e\",\n query=\"query\",\n)\nprint(collection_query_response)" + } + ] + } + } + }, + "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": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Name" + }, + "metadata": { + "anyOf": [ + { + "type": "object", + "additionalProperties": true + }, + { + "type": "null" + } + ], + "title": "Metadata" + } + }, + "type": "object", + "title": "CollectionUpdate" + }, + "Document": { + "properties": { + "id": { + "type": "string", + "format": "uuid", + "title": "Id" + }, + "content": { + "type": "string", + "title": "Content" + }, + "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": [ + "id", + "content", + "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" + }, + "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", + "metadata", + "created_at" + ], + "title": "Session", + "exclude": [ + "h_metadata" + ] + }, + "SessionCreate": { + "properties": { + "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" + } + } + } +} diff --git a/docs/mint.json b/docs/mint.json index 329110d9..3397a40d 100644 --- a/docs/mint.json +++ b/docs/mint.json @@ -61,34 +61,23 @@ }, { "group": "Getting Started", - "pages": [ - "guides/overview" - ] + "pages": ["guides/overview"] }, { "group": "Application Interfaces", - "pages": [ - "guides/discord" - ] + "pages": ["guides/discord"] }, { "group": "Integrations", - "pages": [ - "guides/langchain" - ] + "pages": ["guides/langchain"] }, { "group": "Personal Memory", - "pages": [ - "guides/simple-memory", - "guides/dialectic-endpoint" - ] + "pages": ["guides/simple-memory", "guides/dialectic-endpoint"] }, { "group": "API Documentation", - "pages": [ - "api-reference/introduction" - ] + "pages": ["api-reference/introduction"] }, { "group": "apps", @@ -119,8 +108,8 @@ "api-reference/endpoint/sessions/get-session", "api-reference/endpoint/sessions/update-session", "api-reference/endpoint/sessions/delete-session", - "api-reference/endpoint/sessions/get-chat", - "api-reference/endpoint/sessions/get-chat-stream" + "api-reference/endpoint/sessions/chat", + "api-reference/endpoint/sessions/chat-stream" ] }, { @@ -129,11 +118,17 @@ "api-reference/endpoint/messages/get-messages", "api-reference/endpoint/messages/create-message-for-session", "api-reference/endpoint/messages/get-message", - "api-reference/endpoint/messages/update-message", - "api-reference/endpoint/messages/get-metamessages", - "api-reference/endpoint/messages/create-metamessage", - "api-reference/endpoint/messages/get-metamessage", - "api-reference/endpoint/messages/update-metamessage" + "api-reference/endpoint/messages/update-message" + ] + }, + { + "group": "metamessages", + "pages": [ + "api-reference/endpoint/metamessages/create-metamessage", + "api-reference/endpoint/metamessages/get-metamessages", + "api-reference/endpoint/metamessages/get-metamessage", + "api-reference/endpoint/metamessages/update-metamessage", + "api-reference/endpoint/metamessages/get-metamessages-by-user" ] }, { @@ -164,9 +159,7 @@ "github": "https://github.com/plastic-labs", "linkedin": "https://www.linkedin.com/company/plasticlabs" }, - "openapi": [ - "/openapi.json" - ], + "openapi": ["/openapi.json"], "analytics": { "posthog": { "apiKey": "phc_1yrzzcgywqXGcerkkI4g7C0YfyPMcAKNOOvGcjTCiUk" diff --git a/docs/openapi.json b/docs/openapi.json index e78a660e..a9553ec3 100644 --- a/docs/openapi.json +++ b/docs/openapi.json @@ -9,11 +9,6 @@ "url": "https://plasticlabs.ai/", "email": "hello@plasticlabs.ai" }, - "license": { - "name": "GNU Affero General Public License v3.0", - "identifier": "AGPL-3.0-only", - "url": "https://github.com/plastic-labs/honcho/blob/main/LICENSE" - }, "version": "0.0.12" }, "servers": [ @@ -21,35 +16,22 @@ "url": "http://127.0.0.1:8000", "description": "Local Development Server" }, - { - "url": "https:/demo.honcho.dev", - "description": "Demo Server" - } + { "url": "https:/demo.honcho.dev", "description": "Demo Server" } ], "paths": { "/v1/apps/{app_id}": { "get": { - "tags": [ - "apps" - ], + "tags": ["apps"], "summary": "Get App", "description": "Get an App by ID\n\nArgs:\n app_id (str): The ID of the app\n\nReturns:\n schemas.App: App object", "operationId": "get_app_v1_apps__app_id__get", - "security": [ - { - "HTTPBearer": [] - }, - {} - ], + "security": [{ "HTTPBearer": [] }, {}], "parameters": [ { "name": "app_id", "in": "path", "required": true, - "schema": { - "type": "string", - "title": "App Id" - } + "schema": { "type": "string", "title": "App Id" } } ], "responses": { @@ -57,9 +39,7 @@ "description": "Successful Response", "content": { "application/json": { - "schema": { - "$ref": "#/components/schemas/App" - } + "schema": { "$ref": "#/components/schemas/App" } } } }, @@ -67,9 +47,7 @@ "description": "Validation Error", "content": { "application/json": { - "schema": { - "$ref": "#/components/schemas/HTTPValidationError" - } + "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } @@ -86,36 +64,24 @@ ] }, "put": { - "tags": [ - "apps" - ], + "tags": ["apps"], "summary": "Update App", "description": "Update an App\n\nArgs:\n app_id (str): 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_v1_apps__app_id__put", - "security": [ - { - "HTTPBearer": [] - }, - {} - ], + "security": [{ "HTTPBearer": [] }, {}], "parameters": [ { "name": "app_id", "in": "path", "required": true, - "schema": { - "type": "string", - "title": "App Id" - } + "schema": { "type": "string", "title": "App Id" } } ], "requestBody": { "required": true, "content": { "application/json": { - "schema": { - "$ref": "#/components/schemas/AppUpdate" - } + "schema": { "$ref": "#/components/schemas/AppUpdate" } } } }, @@ -124,9 +90,7 @@ "description": "Successful Response", "content": { "application/json": { - "schema": { - "$ref": "#/components/schemas/App" - } + "schema": { "$ref": "#/components/schemas/App" } } } }, @@ -134,9 +98,7 @@ "description": "Validation Error", "content": { "application/json": { - "schema": { - "$ref": "#/components/schemas/HTTPValidationError" - } + "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } @@ -155,27 +117,17 @@ }, "/v1/apps/name/{name}": { "get": { - "tags": [ - "apps" - ], + "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_v1_apps_name__name__get", - "security": [ - { - "HTTPBearer": [] - }, - {} - ], + "security": [{ "HTTPBearer": [] }, {}], "parameters": [ { "name": "name", "in": "path", "required": true, - "schema": { - "type": "string", - "title": "Name" - } + "schema": { "type": "string", "title": "Name" } } ], "responses": { @@ -183,9 +135,7 @@ "description": "Successful Response", "content": { "application/json": { - "schema": { - "$ref": "#/components/schemas/App" - } + "schema": { "$ref": "#/components/schemas/App" } } } }, @@ -193,9 +143,7 @@ "description": "Validation Error", "content": { "application/json": { - "schema": { - "$ref": "#/components/schemas/HTTPValidationError" - } + "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } @@ -214,18 +162,14 @@ }, "/v1/apps": { "post": { - "tags": [ - "apps" - ], + "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_v1_apps_post", "requestBody": { "content": { "application/json": { - "schema": { - "$ref": "#/components/schemas/AppCreate" - } + "schema": { "$ref": "#/components/schemas/AppCreate" } } }, "required": true @@ -235,9 +179,7 @@ "description": "Successful Response", "content": { "application/json": { - "schema": { - "$ref": "#/components/schemas/App" - } + "schema": { "$ref": "#/components/schemas/App" } } } }, @@ -245,19 +187,12 @@ "description": "Validation Error", "content": { "application/json": { - "schema": { - "$ref": "#/components/schemas/HTTPValidationError" - } + "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } }, - "security": [ - { - "HTTPBearer": [] - }, - {} - ], + "security": [{ "HTTPBearer": [] }, {}], "x-codeSamples": [ { "lang": "JavaScript", @@ -272,27 +207,17 @@ }, "/v1/apps/get_or_create/{name}": { "get": { - "tags": [ - "apps" - ], + "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_v1_apps_get_or_create__name__get", - "security": [ - { - "HTTPBearer": [] - }, - {} - ], + "security": [{ "HTTPBearer": [] }, {}], "parameters": [ { "name": "name", "in": "path", "required": true, - "schema": { - "type": "string", - "title": "Name" - } + "schema": { "type": "string", "title": "Name" } } ], "responses": { @@ -300,9 +225,7 @@ "description": "Successful Response", "content": { "application/json": { - "schema": { - "$ref": "#/components/schemas/App" - } + "schema": { "$ref": "#/components/schemas/App" } } } }, @@ -310,9 +233,7 @@ "description": "Validation Error", "content": { "application/json": { - "schema": { - "$ref": "#/components/schemas/HTTPValidationError" - } + "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } @@ -331,36 +252,24 @@ }, "/v1/apps/{app_id}/users": { "post": { - "tags": [ - "users" - ], + "tags": ["users"], "summary": "Create User", "description": "Create a User\n\nArgs:\n app_id (str): 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_v1_apps__app_id__users_post", - "security": [ - { - "HTTPBearer": [] - }, - {} - ], + "security": [{ "HTTPBearer": [] }, {}], "parameters": [ { "name": "app_id", "in": "path", "required": true, - "schema": { - "type": "string", - "title": "App Id" - } + "schema": { "type": "string", "title": "App Id" } } ], "requestBody": { "required": true, "content": { "application/json": { - "schema": { - "$ref": "#/components/schemas/UserCreate" - } + "schema": { "$ref": "#/components/schemas/UserCreate" } } } }, @@ -369,9 +278,7 @@ "description": "Successful Response", "content": { "application/json": { - "schema": { - "$ref": "#/components/schemas/User" - } + "schema": { "$ref": "#/components/schemas/User" } } } }, @@ -379,9 +286,7 @@ "description": "Validation Error", "content": { "application/json": { - "schema": { - "$ref": "#/components/schemas/HTTPValidationError" - } + "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } @@ -400,27 +305,17 @@ }, "/v1/apps/{app_id}/users/list": { "post": { - "tags": [ - "users" - ], + "tags": ["users"], "summary": "Get Users", "description": "Get All Users for an App\n\nArgs:\n app_id (str): 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_v1_apps__app_id__users_list_post", - "security": [ - { - "HTTPBearer": [] - }, - {} - ], + "security": [{ "HTTPBearer": [] }, {}], "parameters": [ { "name": "app_id", "in": "path", "required": true, - "schema": { - "type": "string", - "title": "App Id" - } + "schema": { "type": "string", "title": "App Id" } }, { "name": "reverse", @@ -464,9 +359,7 @@ "required": true, "content": { "application/json": { - "schema": { - "$ref": "#/components/schemas/UserGet" - } + "schema": { "$ref": "#/components/schemas/UserGet" } } } }, @@ -475,9 +368,7 @@ "description": "Successful Response", "content": { "application/json": { - "schema": { - "$ref": "#/components/schemas/Page_User_" - } + "schema": { "$ref": "#/components/schemas/Page_User_" } } } }, @@ -485,9 +376,7 @@ "description": "Validation Error", "content": { "application/json": { - "schema": { - "$ref": "#/components/schemas/HTTPValidationError" - } + "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } @@ -506,36 +395,23 @@ }, "/v1/apps/{app_id}/users/name/{name}": { "get": { - "tags": [ - "users" - ], + "tags": ["users"], "summary": "Get User By Name", "description": "Get a User\n\nArgs:\n app_id (str): 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_v1_apps__app_id__users_name__name__get", - "security": [ - { - "HTTPBearer": [] - }, - {} - ], + "security": [{ "HTTPBearer": [] }, {}], "parameters": [ { "name": "app_id", "in": "path", "required": true, - "schema": { - "type": "string", - "title": "App Id" - } + "schema": { "type": "string", "title": "App Id" } }, { "name": "name", "in": "path", "required": true, - "schema": { - "type": "string", - "title": "Name" - } + "schema": { "type": "string", "title": "Name" } } ], "responses": { @@ -543,9 +419,7 @@ "description": "Successful Response", "content": { "application/json": { - "schema": { - "$ref": "#/components/schemas/User" - } + "schema": { "$ref": "#/components/schemas/User" } } } }, @@ -553,9 +427,7 @@ "description": "Validation Error", "content": { "application/json": { - "schema": { - "$ref": "#/components/schemas/HTTPValidationError" - } + "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } @@ -574,36 +446,23 @@ }, "/v1/apps/{app_id}/users/{user_id}": { "get": { - "tags": [ - "users" - ], + "tags": ["users"], "summary": "Get User", "description": "Get a User\n\nArgs:\n app_id (str): 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_v1_apps__app_id__users__user_id__get", - "security": [ - { - "HTTPBearer": [] - }, - {} - ], + "security": [{ "HTTPBearer": [] }, {}], "parameters": [ { "name": "app_id", "in": "path", "required": true, - "schema": { - "type": "string", - "title": "App Id" - } + "schema": { "type": "string", "title": "App Id" } }, { "name": "user_id", "in": "path", "required": true, - "schema": { - "type": "string", - "title": "User Id" - } + "schema": { "type": "string", "title": "User Id" } } ], "responses": { @@ -611,9 +470,7 @@ "description": "Successful Response", "content": { "application/json": { - "schema": { - "$ref": "#/components/schemas/User" - } + "schema": { "$ref": "#/components/schemas/User" } } } }, @@ -621,9 +478,7 @@ "description": "Validation Error", "content": { "application/json": { - "schema": { - "$ref": "#/components/schemas/HTTPValidationError" - } + "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } @@ -640,45 +495,30 @@ ] }, "put": { - "tags": [ - "users" - ], + "tags": ["users"], "summary": "Update User", "description": "Update a User\n\nArgs:\n app_id (str): 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_v1_apps__app_id__users__user_id__put", - "security": [ - { - "HTTPBearer": [] - }, - {} - ], + "security": [{ "HTTPBearer": [] }, {}], "parameters": [ { "name": "app_id", "in": "path", "required": true, - "schema": { - "type": "string", - "title": "App Id" - } + "schema": { "type": "string", "title": "App Id" } }, { "name": "user_id", "in": "path", "required": true, - "schema": { - "type": "string", - "title": "User Id" - } + "schema": { "type": "string", "title": "User Id" } } ], "requestBody": { "required": true, "content": { "application/json": { - "schema": { - "$ref": "#/components/schemas/UserUpdate" - } + "schema": { "$ref": "#/components/schemas/UserUpdate" } } } }, @@ -687,9 +527,7 @@ "description": "Successful Response", "content": { "application/json": { - "schema": { - "$ref": "#/components/schemas/User" - } + "schema": { "$ref": "#/components/schemas/User" } } } }, @@ -697,9 +535,7 @@ "description": "Validation Error", "content": { "application/json": { - "schema": { - "$ref": "#/components/schemas/HTTPValidationError" - } + "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } @@ -718,36 +554,23 @@ }, "/v1/apps/{app_id}/users/get_or_create/{name}": { "get": { - "tags": [ - "users" - ], + "tags": ["users"], "summary": "Get Or Create User", "description": "Get or Create a User\n\nArgs:\n app_id (str): 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_v1_apps__app_id__users_get_or_create__name__get", - "security": [ - { - "HTTPBearer": [] - }, - {} - ], + "security": [{ "HTTPBearer": [] }, {}], "parameters": [ { "name": "app_id", "in": "path", "required": true, - "schema": { - "type": "string", - "title": "App Id" - } + "schema": { "type": "string", "title": "App Id" } }, { "name": "name", "in": "path", "required": true, - "schema": { - "type": "string", - "title": "Name" - } + "schema": { "type": "string", "title": "Name" } } ], "responses": { @@ -755,9 +578,7 @@ "description": "Successful Response", "content": { "application/json": { - "schema": { - "$ref": "#/components/schemas/User" - } + "schema": { "$ref": "#/components/schemas/User" } } } }, @@ -765,9 +586,7 @@ "description": "Validation Error", "content": { "application/json": { - "schema": { - "$ref": "#/components/schemas/HTTPValidationError" - } + "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } @@ -786,50 +605,30 @@ }, "/v1/apps/{app_id}/users/{user_id}/sessions/list": { "post": { - "tags": [ - "sessions" - ], + "tags": ["sessions"], "summary": "Get Sessions", "description": "Get All Sessions for a User\n\nArgs:\n app_id (str): 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 list[schemas.Session]: List of Session objects", "operationId": "get_sessions_v1_apps__app_id__users__user_id__sessions_list_post", - "security": [ - { - "HTTPBearer": [] - }, - {} - ], + "security": [{ "HTTPBearer": [] }, {}], "parameters": [ { "name": "app_id", "in": "path", "required": true, - "schema": { - "type": "string", - "title": "App Id" - } + "schema": { "type": "string", "title": "App Id" } }, { "name": "user_id", "in": "path", "required": true, - "schema": { - "type": "string", - "title": "User Id" - } + "schema": { "type": "string", "title": "User Id" } }, { "name": "reverse", "in": "query", "required": false, "schema": { - "anyOf": [ - { - "type": "boolean" - }, - { - "type": "null" - } - ], + "anyOf": [{ "type": "boolean" }, { "type": "null" }], "default": false, "title": "Reverse" } @@ -866,9 +665,7 @@ "required": true, "content": { "application/json": { - "schema": { - "$ref": "#/components/schemas/SessionGet" - } + "schema": { "$ref": "#/components/schemas/SessionGet" } } } }, @@ -877,9 +674,7 @@ "description": "Successful Response", "content": { "application/json": { - "schema": { - "$ref": "#/components/schemas/Page_Session_" - } + "schema": { "$ref": "#/components/schemas/Page_Session_" } } } }, @@ -887,9 +682,7 @@ "description": "Validation Error", "content": { "application/json": { - "schema": { - "$ref": "#/components/schemas/HTTPValidationError" - } + "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } @@ -908,45 +701,30 @@ }, "/v1/apps/{app_id}/users/{user_id}/sessions": { "post": { - "tags": [ - "sessions" - ], + "tags": ["sessions"], "summary": "Create Session", "description": "Create a Session for a User\n\nArgs:\n app_id (str): The ID of the app representing the client\n application using honcho\n user_id (str): The User ID representing the user, managed by the user\n session (schemas.SessionCreate): The Session object containing any\n metadata\n\nReturns:\n schemas.Session: The Session object of the new Session", "operationId": "create_session_v1_apps__app_id__users__user_id__sessions_post", - "security": [ - { - "HTTPBearer": [] - }, - {} - ], + "security": [{ "HTTPBearer": [] }, {}], "parameters": [ { "name": "app_id", "in": "path", "required": true, - "schema": { - "type": "string", - "title": "App Id" - } + "schema": { "type": "string", "title": "App Id" } }, { "name": "user_id", "in": "path", "required": true, - "schema": { - "type": "string", - "title": "User Id" - } + "schema": { "type": "string", "title": "User Id" } } ], "requestBody": { "required": true, "content": { "application/json": { - "schema": { - "$ref": "#/components/schemas/SessionCreate" - } + "schema": { "$ref": "#/components/schemas/SessionCreate" } } } }, @@ -955,9 +733,7 @@ "description": "Successful Response", "content": { "application/json": { - "schema": { - "$ref": "#/components/schemas/Session" - } + "schema": { "$ref": "#/components/schemas/Session" } } } }, @@ -965,9 +741,7 @@ "description": "Validation Error", "content": { "application/json": { - "schema": { - "$ref": "#/components/schemas/HTTPValidationError" - } + "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } @@ -986,54 +760,36 @@ }, "/v1/apps/{app_id}/users/{user_id}/sessions/{session_id}": { "put": { - "tags": [ - "sessions" - ], + "tags": ["sessions"], "summary": "Update Session", "description": "Update the metadata of a Session\n\nArgs:\n app_id (str): 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 (str): 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_v1_apps__app_id__users__user_id__sessions__session_id__put", - "security": [ - { - "HTTPBearer": [] - }, - {} - ], + "security": [{ "HTTPBearer": [] }, {}], "parameters": [ { "name": "app_id", "in": "path", "required": true, - "schema": { - "type": "string", - "title": "App Id" - } + "schema": { "type": "string", "title": "App Id" } }, { "name": "user_id", "in": "path", "required": true, - "schema": { - "type": "string", - "title": "User Id" - } + "schema": { "type": "string", "title": "User Id" } }, { "name": "session_id", "in": "path", "required": true, - "schema": { - "type": "string", - "title": "Session Id" - } + "schema": { "type": "string", "title": "Session Id" } } ], "requestBody": { "required": true, "content": { "application/json": { - "schema": { - "$ref": "#/components/schemas/SessionUpdate" - } + "schema": { "$ref": "#/components/schemas/SessionUpdate" } } } }, @@ -1042,9 +798,7 @@ "description": "Successful Response", "content": { "application/json": { - "schema": { - "$ref": "#/components/schemas/Session" - } + "schema": { "$ref": "#/components/schemas/Session" } } } }, @@ -1052,9 +806,7 @@ "description": "Validation Error", "content": { "application/json": { - "schema": { - "$ref": "#/components/schemas/HTTPValidationError" - } + "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } @@ -1071,63 +823,41 @@ ] }, "delete": { - "tags": [ - "sessions" - ], + "tags": ["sessions"], "summary": "Delete Session", "description": "Delete a session by marking it as inactive\n\nArgs:\n app_id (str): 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 (str): 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_v1_apps__app_id__users__user_id__sessions__session_id__delete", - "security": [ - { - "HTTPBearer": [] - }, - {} - ], + "security": [{ "HTTPBearer": [] }, {}], "parameters": [ { "name": "app_id", "in": "path", "required": true, - "schema": { - "type": "string", - "title": "App Id" - } + "schema": { "type": "string", "title": "App Id" } }, { "name": "user_id", "in": "path", "required": true, - "schema": { - "type": "string", - "title": "User Id" - } + "schema": { "type": "string", "title": "User Id" } }, { "name": "session_id", "in": "path", "required": true, - "schema": { - "type": "string", - "title": "Session Id" - } + "schema": { "type": "string", "title": "Session Id" } } ], "responses": { "200": { "description": "Successful Response", - "content": { - "application/json": { - "schema": {} - } - } + "content": { "application/json": { "schema": {} } } }, "422": { "description": "Validation Error", "content": { "application/json": { - "schema": { - "$ref": "#/components/schemas/HTTPValidationError" - } + "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } @@ -1144,45 +874,29 @@ ] }, "get": { - "tags": [ - "sessions" - ], + "tags": ["sessions"], "summary": "Get Session", "description": "Get a specific session for a user by ID\n\nArgs:\n app_id (str): 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 (str): 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_v1_apps__app_id__users__user_id__sessions__session_id__get", - "security": [ - { - "HTTPBearer": [] - }, - {} - ], + "security": [{ "HTTPBearer": [] }, {}], "parameters": [ { "name": "app_id", "in": "path", "required": true, - "schema": { - "type": "string", - "title": "App Id" - } + "schema": { "type": "string", "title": "App Id" } }, { "name": "user_id", "in": "path", "required": true, - "schema": { - "type": "string", - "title": "User Id" - } + "schema": { "type": "string", "title": "User Id" } }, { "name": "session_id", "in": "path", "required": true, - "schema": { - "type": "string", - "title": "Session Id" - } + "schema": { "type": "string", "title": "Session Id" } } ], "responses": { @@ -1190,9 +904,7 @@ "description": "Successful Response", "content": { "application/json": { - "schema": { - "$ref": "#/components/schemas/Session" - } + "schema": { "$ref": "#/components/schemas/Session" } } } }, @@ -1200,9 +912,7 @@ "description": "Validation Error", "content": { "application/json": { - "schema": { - "$ref": "#/components/schemas/HTTPValidationError" - } + "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } @@ -1221,53 +931,35 @@ }, "/v1/apps/{app_id}/users/{user_id}/sessions/{session_id}/chat": { "post": { - "tags": [ - "sessions" - ], + "tags": ["sessions"], "summary": "Chat", "operationId": "chat_v1_apps__app_id__users__user_id__sessions__session_id__chat_post", - "security": [ - { - "HTTPBearer": [] - }, - {} - ], + "security": [{ "HTTPBearer": [] }, {}], "parameters": [ { "name": "app_id", "in": "path", "required": true, - "schema": { - "type": "string", - "title": "App Id" - } + "schema": { "type": "string", "title": "App Id" } }, { "name": "user_id", "in": "path", "required": true, - "schema": { - "type": "string", - "title": "User Id" - } + "schema": { "type": "string", "title": "User Id" } }, { "name": "session_id", "in": "path", "required": true, - "schema": { - "type": "string", - "title": "Session Id" - } + "schema": { "type": "string", "title": "Session Id" } } ], "requestBody": { "required": true, "content": { "application/json": { - "schema": { - "$ref": "#/components/schemas/AgentQuery" - } + "schema": { "$ref": "#/components/schemas/AgentQuery" } } } }, @@ -1276,9 +968,7 @@ "description": "Successful Response", "content": { "application/json": { - "schema": { - "$ref": "#/components/schemas/AgentChat" - } + "schema": { "$ref": "#/components/schemas/AgentChat" } } } }, @@ -1286,9 +976,7 @@ "description": "Validation Error", "content": { "application/json": { - "schema": { - "$ref": "#/components/schemas/HTTPValidationError" - } + "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } @@ -1307,53 +995,35 @@ }, "/v1/apps/{app_id}/users/{user_id}/sessions/{session_id}/chat/stream": { "post": { - "tags": [ - "sessions" - ], + "tags": ["sessions"], "summary": "Get Chat Stream", "operationId": "get_chat_stream_v1_apps__app_id__users__user_id__sessions__session_id__chat_stream_post", - "security": [ - { - "HTTPBearer": [] - }, - {} - ], + "security": [{ "HTTPBearer": [] }, {}], "parameters": [ { "name": "app_id", "in": "path", "required": true, - "schema": { - "type": "string", - "title": "App Id" - } + "schema": { "type": "string", "title": "App Id" } }, { "name": "user_id", "in": "path", "required": true, - "schema": { - "type": "string", - "title": "User Id" - } + "schema": { "type": "string", "title": "User Id" } }, { "name": "session_id", "in": "path", "required": true, - "schema": { - "type": "string", - "title": "Session Id" - } + "schema": { "type": "string", "title": "Session Id" } } ], "requestBody": { "required": true, "content": { "application/json": { - "schema": { - "$ref": "#/components/schemas/AgentQuery" - } + "schema": { "$ref": "#/components/schemas/AgentQuery" } } } }, @@ -1361,14 +1031,9 @@ "200": { "description": "Chat stream", "content": { - "application/json": { - "schema": {} - }, + "application/json": { "schema": {} }, "text/event-stream": { - "schema": { - "type": "string", - "format": "binary" - } + "schema": { "type": "string", "format": "binary" } } } }, @@ -1376,9 +1041,7 @@ "description": "Validation Error", "content": { "application/json": { - "schema": { - "$ref": "#/components/schemas/HTTPValidationError" - } + "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } @@ -1397,54 +1060,36 @@ }, "/v1/apps/{app_id}/users/{user_id}/sessions/{session_id}/messages": { "post": { - "tags": [ - "messages" - ], + "tags": ["messages"], "summary": "Create Message For Session", "description": "Adds a message to a session\n\nArgs:\n app_id (str): The ID of the app representing the client application using 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 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_v1_apps__app_id__users__user_id__sessions__session_id__messages_post", - "security": [ - { - "HTTPBearer": [] - }, - {} - ], + "security": [{ "HTTPBearer": [] }, {}], "parameters": [ { "name": "app_id", "in": "path", "required": true, - "schema": { - "type": "string", - "title": "App Id" - } + "schema": { "type": "string", "title": "App Id" } }, { "name": "user_id", "in": "path", "required": true, - "schema": { - "type": "string", - "title": "User Id" - } + "schema": { "type": "string", "title": "User Id" } }, { "name": "session_id", "in": "path", "required": true, - "schema": { - "type": "string", - "title": "Session Id" - } + "schema": { "type": "string", "title": "Session Id" } } ], "requestBody": { "required": true, "content": { "application/json": { - "schema": { - "$ref": "#/components/schemas/MessageCreate" - } + "schema": { "$ref": "#/components/schemas/MessageCreate" } } } }, @@ -1453,9 +1098,7 @@ "description": "Successful Response", "content": { "application/json": { - "schema": { - "$ref": "#/components/schemas/Message" - } + "schema": { "$ref": "#/components/schemas/Message" } } } }, @@ -1463,9 +1106,7 @@ "description": "Validation Error", "content": { "application/json": { - "schema": { - "$ref": "#/components/schemas/HTTPValidationError" - } + "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } @@ -1484,59 +1125,36 @@ }, "/v1/apps/{app_id}/users/{user_id}/sessions/{session_id}/messages/list": { "post": { - "tags": [ - "messages" - ], + "tags": ["messages"], "summary": "Get Messages", "description": "Get all messages for a session\n\nArgs:\n app_id (str): 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_v1_apps__app_id__users__user_id__sessions__session_id__messages_list_post", - "security": [ - { - "HTTPBearer": [] - }, - {} - ], + "security": [{ "HTTPBearer": [] }, {}], "parameters": [ { "name": "app_id", "in": "path", "required": true, - "schema": { - "type": "string", - "title": "App Id" - } + "schema": { "type": "string", "title": "App Id" } }, { "name": "user_id", "in": "path", "required": true, - "schema": { - "type": "string", - "title": "User Id" - } + "schema": { "type": "string", "title": "User Id" } }, { "name": "session_id", "in": "path", "required": true, - "schema": { - "type": "string", - "title": "Session Id" - } + "schema": { "type": "string", "title": "Session Id" } }, { "name": "reverse", "in": "query", "required": false, "schema": { - "anyOf": [ - { - "type": "boolean" - }, - { - "type": "null" - } - ], + "anyOf": [{ "type": "boolean" }, { "type": "null" }], "default": false, "title": "Reverse" } @@ -1573,9 +1191,7 @@ "required": true, "content": { "application/json": { - "schema": { - "$ref": "#/components/schemas/MessageGet" - } + "schema": { "$ref": "#/components/schemas/MessageGet" } } } }, @@ -1584,9 +1200,7 @@ "description": "Successful Response", "content": { "application/json": { - "schema": { - "$ref": "#/components/schemas/Page_Message_" - } + "schema": { "$ref": "#/components/schemas/Page_Message_" } } } }, @@ -1594,9 +1208,7 @@ "description": "Validation Error", "content": { "application/json": { - "schema": { - "$ref": "#/components/schemas/HTTPValidationError" - } + "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } @@ -1615,53 +1227,34 @@ }, "/v1/apps/{app_id}/users/{user_id}/sessions/{session_id}/messages/{message_id}": { "get": { - "tags": [ - "messages" - ], + "tags": ["messages"], "summary": "Get Message", "operationId": "get_message_v1_apps__app_id__users__user_id__sessions__session_id__messages__message_id__get", - "security": [ - { - "HTTPBearer": [] - }, - {} - ], + "security": [{ "HTTPBearer": [] }, {}], "parameters": [ { "name": "app_id", "in": "path", "required": true, - "schema": { - "type": "string", - "title": "App Id" - } + "schema": { "type": "string", "title": "App Id" } }, { "name": "user_id", "in": "path", "required": true, - "schema": { - "type": "string", - "title": "User Id" - } + "schema": { "type": "string", "title": "User Id" } }, { "name": "session_id", "in": "path", "required": true, - "schema": { - "type": "string", - "title": "Session Id" - } + "schema": { "type": "string", "title": "Session Id" } }, { "name": "message_id", "in": "path", "required": true, - "schema": { - "type": "string", - "title": "Message Id" - } + "schema": { "type": "string", "title": "Message Id" } } ], "responses": { @@ -1669,9 +1262,7 @@ "description": "Successful Response", "content": { "application/json": { - "schema": { - "$ref": "#/components/schemas/Message" - } + "schema": { "$ref": "#/components/schemas/Message" } } } }, @@ -1679,9 +1270,7 @@ "description": "Validation Error", "content": { "application/json": { - "schema": { - "$ref": "#/components/schemas/HTTPValidationError" - } + "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } @@ -1698,63 +1287,42 @@ ] }, "put": { - "tags": [ - "messages" - ], + "tags": ["messages"], "summary": "Update Message", "description": "Update's the metadata of a message", "operationId": "update_message_v1_apps__app_id__users__user_id__sessions__session_id__messages__message_id__put", - "security": [ - { - "HTTPBearer": [] - }, - {} - ], + "security": [{ "HTTPBearer": [] }, {}], "parameters": [ { "name": "app_id", "in": "path", "required": true, - "schema": { - "type": "string", - "title": "App Id" - } + "schema": { "type": "string", "title": "App Id" } }, { "name": "user_id", "in": "path", "required": true, - "schema": { - "type": "string", - "title": "User Id" - } + "schema": { "type": "string", "title": "User Id" } }, { "name": "session_id", "in": "path", "required": true, - "schema": { - "type": "string", - "title": "Session Id" - } + "schema": { "type": "string", "title": "Session Id" } }, { "name": "message_id", "in": "path", "required": true, - "schema": { - "type": "string", - "title": "Message Id" - } + "schema": { "type": "string", "title": "Message Id" } } ], "requestBody": { "required": true, "content": { "application/json": { - "schema": { - "$ref": "#/components/schemas/MessageUpdate" - } + "schema": { "$ref": "#/components/schemas/MessageUpdate" } } } }, @@ -1763,9 +1331,7 @@ "description": "Successful Response", "content": { "application/json": { - "schema": { - "$ref": "#/components/schemas/Message" - } + "schema": { "$ref": "#/components/schemas/Message" } } } }, @@ -1773,9 +1339,7 @@ "description": "Validation Error", "content": { "application/json": { - "schema": { - "$ref": "#/components/schemas/HTTPValidationError" - } + "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } @@ -1794,54 +1358,36 @@ }, "/v1/apps/{app_id}/users/{user_id}/sessions/{session_id}/metamessages": { "post": { - "tags": [ - "metamessages" - ], + "tags": ["metamessages"], "summary": "Create Metamessage", "description": "Adds a message to a session\n\nArgs:\n app_id (str): 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 metamessage (schemas.MeteamessageCreate): The metamessage creation object\n\nReturns:\n schemas.Metamessage: The Metamessage object of the added metamessage\n\nRaises:\n HTTPException: If the session is not found", "operationId": "create_metamessage_v1_apps__app_id__users__user_id__sessions__session_id__metamessages_post", - "security": [ - { - "HTTPBearer": [] - }, - {} - ], + "security": [{ "HTTPBearer": [] }, {}], "parameters": [ { "name": "app_id", "in": "path", "required": true, - "schema": { - "type": "string", - "title": "App Id" - } + "schema": { "type": "string", "title": "App Id" } }, { "name": "user_id", "in": "path", "required": true, - "schema": { - "type": "string", - "title": "User Id" - } + "schema": { "type": "string", "title": "User Id" } }, { "name": "session_id", "in": "path", "required": true, - "schema": { - "type": "string", - "title": "Session Id" - } + "schema": { "type": "string", "title": "Session Id" } } ], "requestBody": { "required": true, "content": { "application/json": { - "schema": { - "$ref": "#/components/schemas/MetamessageCreate" - } + "schema": { "$ref": "#/components/schemas/MetamessageCreate" } } } }, @@ -1850,9 +1396,7 @@ "description": "Successful Response", "content": { "application/json": { - "schema": { - "$ref": "#/components/schemas/Metamessage" - } + "schema": { "$ref": "#/components/schemas/Metamessage" } } } }, @@ -1860,9 +1404,7 @@ "description": "Validation Error", "content": { "application/json": { - "schema": { - "$ref": "#/components/schemas/HTTPValidationError" - } + "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } @@ -1881,59 +1423,36 @@ }, "/v1/apps/{app_id}/users/{user_id}/sessions/{session_id}/metamessages/list": { "post": { - "tags": [ - "metamessages" - ], + "tags": ["metamessages"], "summary": "Get Metamessages", "description": "Get all messages for a session\n\nArgs:\n app_id (str): 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_v1_apps__app_id__users__user_id__sessions__session_id__metamessages_list_post", - "security": [ - { - "HTTPBearer": [] - }, - {} - ], + "security": [{ "HTTPBearer": [] }, {}], "parameters": [ { "name": "app_id", "in": "path", "required": true, - "schema": { - "type": "string", - "title": "App Id" - } + "schema": { "type": "string", "title": "App Id" } }, { "name": "user_id", "in": "path", "required": true, - "schema": { - "type": "string", - "title": "User Id" - } + "schema": { "type": "string", "title": "User Id" } }, { "name": "session_id", "in": "path", "required": true, - "schema": { - "type": "string", - "title": "Session Id" - } + "schema": { "type": "string", "title": "Session Id" } }, { "name": "reverse", "in": "query", "required": false, "schema": { - "anyOf": [ - { - "type": "boolean" - }, - { - "type": "null" - } - ], + "anyOf": [{ "type": "boolean" }, { "type": "null" }], "default": false, "title": "Reverse" } @@ -1970,9 +1489,7 @@ "required": true, "content": { "application/json": { - "schema": { - "$ref": "#/components/schemas/MetamessageGet" - } + "schema": { "$ref": "#/components/schemas/MetamessageGet" } } } }, @@ -1981,9 +1498,7 @@ "description": "Successful Response", "content": { "application/json": { - "schema": { - "$ref": "#/components/schemas/Page_Metamessage_" - } + "schema": { "$ref": "#/components/schemas/Page_Metamessage_" } } } }, @@ -1991,9 +1506,7 @@ "description": "Validation Error", "content": { "application/json": { - "schema": { - "$ref": "#/components/schemas/HTTPValidationError" - } + "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } @@ -2012,63 +1525,41 @@ }, "/v1/apps/{app_id}/users/{user_id}/sessions/{session_id}/metamessages/{metamessage_id}": { "get": { - "tags": [ - "metamessages" - ], + "tags": ["metamessages"], "summary": "Get Metamessage", "description": "Get a specific Metamessage by ID\n\nArgs:\n app_id (str): 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_v1_apps__app_id__users__user_id__sessions__session_id__metamessages__metamessage_id__get", - "security": [ - { - "HTTPBearer": [] - }, - {} - ], + "security": [{ "HTTPBearer": [] }, {}], "parameters": [ { "name": "app_id", "in": "path", "required": true, - "schema": { - "type": "string", - "title": "App Id" - } + "schema": { "type": "string", "title": "App Id" } }, { "name": "user_id", "in": "path", "required": true, - "schema": { - "type": "string", - "title": "User Id" - } + "schema": { "type": "string", "title": "User Id" } }, { "name": "session_id", "in": "path", "required": true, - "schema": { - "type": "string", - "title": "Session Id" - } + "schema": { "type": "string", "title": "Session Id" } }, { "name": "metamessage_id", "in": "path", "required": true, - "schema": { - "type": "string", - "title": "Metamessage Id" - } + "schema": { "type": "string", "title": "Metamessage Id" } }, { "name": "message_id", "in": "query", "required": true, - "schema": { - "type": "string", - "title": "Message Id" - } + "schema": { "type": "string", "title": "Message Id" } } ], "responses": { @@ -2076,9 +1567,7 @@ "description": "Successful Response", "content": { "application/json": { - "schema": { - "$ref": "#/components/schemas/Metamessage" - } + "schema": { "$ref": "#/components/schemas/Metamessage" } } } }, @@ -2086,9 +1575,7 @@ "description": "Validation Error", "content": { "application/json": { - "schema": { - "$ref": "#/components/schemas/HTTPValidationError" - } + "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } @@ -2105,63 +1592,42 @@ ] }, "put": { - "tags": [ - "metamessages" - ], + "tags": ["metamessages"], "summary": "Update Metamessage", "description": "Update's the metadata of a metamessage", "operationId": "update_metamessage_v1_apps__app_id__users__user_id__sessions__session_id__metamessages__metamessage_id__put", - "security": [ - { - "HTTPBearer": [] - }, - {} - ], + "security": [{ "HTTPBearer": [] }, {}], "parameters": [ { "name": "app_id", "in": "path", "required": true, - "schema": { - "type": "string", - "title": "App Id" - } + "schema": { "type": "string", "title": "App Id" } }, { "name": "user_id", "in": "path", "required": true, - "schema": { - "type": "string", - "title": "User Id" - } + "schema": { "type": "string", "title": "User Id" } }, { "name": "session_id", "in": "path", "required": true, - "schema": { - "type": "string", - "title": "Session Id" - } + "schema": { "type": "string", "title": "Session Id" } }, { "name": "metamessage_id", "in": "path", "required": true, - "schema": { - "type": "string", - "title": "Metamessage Id" - } + "schema": { "type": "string", "title": "Metamessage Id" } } ], "requestBody": { "required": true, "content": { "application/json": { - "schema": { - "$ref": "#/components/schemas/MetamessageUpdate" - } + "schema": { "$ref": "#/components/schemas/MetamessageUpdate" } } } }, @@ -2170,9 +1636,7 @@ "description": "Successful Response", "content": { "application/json": { - "schema": { - "$ref": "#/components/schemas/Metamessage" - } + "schema": { "$ref": "#/components/schemas/Metamessage" } } } }, @@ -2180,9 +1644,7 @@ "description": "Validation Error", "content": { "application/json": { - "schema": { - "$ref": "#/components/schemas/HTTPValidationError" - } + "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } @@ -2201,50 +1663,30 @@ }, "/v1/apps/{app_id}/users/{user_id}/metamessages/list": { "post": { - "tags": [ - "metamessages" - ], + "tags": ["metamessages"], "summary": "Get Metamessages By User", "description": "Paginate through the user metamessages for a user\n\nArgs:\n app_id (str): The ID of the app representing the client application using honcho\n user_id (str): The User ID representing the user, managed by the user\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_by_user_v1_apps__app_id__users__user_id__metamessages_list_post", - "security": [ - { - "HTTPBearer": [] - }, - {} - ], + "security": [{ "HTTPBearer": [] }, {}], "parameters": [ { "name": "app_id", "in": "path", "required": true, - "schema": { - "type": "string", - "title": "App Id" - } + "schema": { "type": "string", "title": "App Id" } }, { "name": "user_id", "in": "path", "required": true, - "schema": { - "type": "string", - "title": "User Id" - } + "schema": { "type": "string", "title": "User Id" } }, { "name": "reverse", "in": "query", "required": false, "schema": { - "anyOf": [ - { - "type": "boolean" - }, - { - "type": "null" - } - ], + "anyOf": [{ "type": "boolean" }, { "type": "null" }], "default": false, "title": "Reverse" } @@ -2292,9 +1734,7 @@ "description": "Successful Response", "content": { "application/json": { - "schema": { - "$ref": "#/components/schemas/Page_Metamessage_" - } + "schema": { "$ref": "#/components/schemas/Page_Metamessage_" } } } }, @@ -2302,9 +1742,7 @@ "description": "Validation Error", "content": { "application/json": { - "schema": { - "$ref": "#/components/schemas/HTTPValidationError" - } + "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } @@ -2323,50 +1761,30 @@ }, "/v1/apps/{app_id}/users/{user_id}/collections/list": { "post": { - "tags": [ - "collections" - ], + "tags": ["collections"], "summary": "Get Collections", "description": "Get All Collections for a User\n\nArgs:\n app_id (str): The ID of the app representing the client\n application using honcho\n user_id (str): The User ID representing the user, managed by the user\n\nReturns:\n list[schemas.Collection]: List of Collection objects", "operationId": "get_collections_v1_apps__app_id__users__user_id__collections_list_post", - "security": [ - { - "HTTPBearer": [] - }, - {} - ], + "security": [{ "HTTPBearer": [] }, {}], "parameters": [ { "name": "app_id", "in": "path", "required": true, - "schema": { - "type": "string", - "title": "App Id" - } + "schema": { "type": "string", "title": "App Id" } }, { "name": "user_id", "in": "path", "required": true, - "schema": { - "type": "string", - "title": "User Id" - } + "schema": { "type": "string", "title": "User Id" } }, { "name": "reverse", "in": "query", "required": false, "schema": { - "anyOf": [ - { - "type": "boolean" - }, - { - "type": "null" - } - ], + "anyOf": [{ "type": "boolean" }, { "type": "null" }], "default": false, "title": "Reverse" } @@ -2403,9 +1821,7 @@ "required": true, "content": { "application/json": { - "schema": { - "$ref": "#/components/schemas/CollectionGet" - } + "schema": { "$ref": "#/components/schemas/CollectionGet" } } } }, @@ -2414,9 +1830,7 @@ "description": "Successful Response", "content": { "application/json": { - "schema": { - "$ref": "#/components/schemas/Page_Collection_" - } + "schema": { "$ref": "#/components/schemas/Page_Collection_" } } } }, @@ -2424,9 +1838,7 @@ "description": "Validation Error", "content": { "application/json": { - "schema": { - "$ref": "#/components/schemas/HTTPValidationError" - } + "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } @@ -2445,44 +1857,28 @@ }, "/v1/apps/{app_id}/users/{user_id}/collections/name/{name}": { "get": { - "tags": [ - "collections" - ], + "tags": ["collections"], "summary": "Get Collection By Name", "operationId": "get_collection_by_name_v1_apps__app_id__users__user_id__collections_name__name__get", - "security": [ - { - "HTTPBearer": [] - }, - {} - ], + "security": [{ "HTTPBearer": [] }, {}], "parameters": [ { "name": "app_id", "in": "path", "required": true, - "schema": { - "type": "string", - "title": "App Id" - } + "schema": { "type": "string", "title": "App Id" } }, { "name": "user_id", "in": "path", "required": true, - "schema": { - "type": "string", - "title": "User Id" - } + "schema": { "type": "string", "title": "User Id" } }, { "name": "name", "in": "path", "required": true, - "schema": { - "type": "string", - "title": "Name" - } + "schema": { "type": "string", "title": "Name" } } ], "responses": { @@ -2490,9 +1886,7 @@ "description": "Successful Response", "content": { "application/json": { - "schema": { - "$ref": "#/components/schemas/Collection" - } + "schema": { "$ref": "#/components/schemas/Collection" } } } }, @@ -2500,9 +1894,7 @@ "description": "Validation Error", "content": { "application/json": { - "schema": { - "$ref": "#/components/schemas/HTTPValidationError" - } + "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } @@ -2521,44 +1913,28 @@ }, "/v1/apps/{app_id}/users/{user_id}/collections/{collection_id}": { "get": { - "tags": [ - "collections" - ], + "tags": ["collections"], "summary": "Get Collection By Id", "operationId": "get_collection_by_id_v1_apps__app_id__users__user_id__collections__collection_id__get", - "security": [ - { - "HTTPBearer": [] - }, - {} - ], + "security": [{ "HTTPBearer": [] }, {}], "parameters": [ { "name": "app_id", "in": "path", "required": true, - "schema": { - "type": "string", - "title": "App Id" - } + "schema": { "type": "string", "title": "App Id" } }, { "name": "user_id", "in": "path", "required": true, - "schema": { - "type": "string", - "title": "User Id" - } + "schema": { "type": "string", "title": "User Id" } }, { "name": "collection_id", "in": "path", "required": true, - "schema": { - "type": "string", - "title": "Collection Id" - } + "schema": { "type": "string", "title": "Collection Id" } } ], "responses": { @@ -2566,9 +1942,7 @@ "description": "Successful Response", "content": { "application/json": { - "schema": { - "$ref": "#/components/schemas/Collection" - } + "schema": { "$ref": "#/components/schemas/Collection" } } } }, @@ -2576,9 +1950,7 @@ "description": "Validation Error", "content": { "application/json": { - "schema": { - "$ref": "#/components/schemas/HTTPValidationError" - } + "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } @@ -2595,53 +1967,35 @@ ] }, "put": { - "tags": [ - "collections" - ], + "tags": ["collections"], "summary": "Update Collection", "operationId": "update_collection_v1_apps__app_id__users__user_id__collections__collection_id__put", - "security": [ - { - "HTTPBearer": [] - }, - {} - ], + "security": [{ "HTTPBearer": [] }, {}], "parameters": [ { "name": "app_id", "in": "path", "required": true, - "schema": { - "type": "string", - "title": "App Id" - } + "schema": { "type": "string", "title": "App Id" } }, { "name": "user_id", "in": "path", "required": true, - "schema": { - "type": "string", - "title": "User Id" - } + "schema": { "type": "string", "title": "User Id" } }, { "name": "collection_id", "in": "path", "required": true, - "schema": { - "type": "string", - "title": "Collection Id" - } + "schema": { "type": "string", "title": "Collection Id" } } ], "requestBody": { "required": true, "content": { "application/json": { - "schema": { - "$ref": "#/components/schemas/CollectionUpdate" - } + "schema": { "$ref": "#/components/schemas/CollectionUpdate" } } } }, @@ -2650,9 +2004,7 @@ "description": "Successful Response", "content": { "application/json": { - "schema": { - "$ref": "#/components/schemas/Collection" - } + "schema": { "$ref": "#/components/schemas/Collection" } } } }, @@ -2660,9 +2012,7 @@ "description": "Validation Error", "content": { "application/json": { - "schema": { - "$ref": "#/components/schemas/HTTPValidationError" - } + "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } @@ -2679,62 +2029,40 @@ ] }, "delete": { - "tags": [ - "collections" - ], + "tags": ["collections"], "summary": "Delete Collection", "operationId": "delete_collection_v1_apps__app_id__users__user_id__collections__collection_id__delete", - "security": [ - { - "HTTPBearer": [] - }, - {} - ], + "security": [{ "HTTPBearer": [] }, {}], "parameters": [ { "name": "app_id", "in": "path", "required": true, - "schema": { - "type": "string", - "title": "App Id" - } + "schema": { "type": "string", "title": "App Id" } }, { "name": "user_id", "in": "path", "required": true, - "schema": { - "type": "string", - "title": "User Id" - } + "schema": { "type": "string", "title": "User Id" } }, { "name": "collection_id", "in": "path", "required": true, - "schema": { - "type": "string", - "title": "Collection Id" - } + "schema": { "type": "string", "title": "Collection Id" } } ], "responses": { "200": { "description": "Successful Response", - "content": { - "application/json": { - "schema": {} - } - } + "content": { "application/json": { "schema": {} } } }, "422": { "description": "Validation Error", "content": { "application/json": { - "schema": { - "$ref": "#/components/schemas/HTTPValidationError" - } + "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } @@ -2753,44 +2081,29 @@ }, "/v1/apps/{app_id}/users/{user_id}/collections": { "post": { - "tags": [ - "collections" - ], + "tags": ["collections"], "summary": "Create Collection", "operationId": "create_collection_v1_apps__app_id__users__user_id__collections_post", - "security": [ - { - "HTTPBearer": [] - }, - {} - ], + "security": [{ "HTTPBearer": [] }, {}], "parameters": [ { "name": "app_id", "in": "path", "required": true, - "schema": { - "type": "string", - "title": "App Id" - } + "schema": { "type": "string", "title": "App Id" } }, { "name": "user_id", "in": "path", "required": true, - "schema": { - "type": "string", - "title": "User Id" - } + "schema": { "type": "string", "title": "User Id" } } ], "requestBody": { "required": true, "content": { "application/json": { - "schema": { - "$ref": "#/components/schemas/CollectionCreate" - } + "schema": { "$ref": "#/components/schemas/CollectionCreate" } } } }, @@ -2799,9 +2112,7 @@ "description": "Successful Response", "content": { "application/json": { - "schema": { - "$ref": "#/components/schemas/Collection" - } + "schema": { "$ref": "#/components/schemas/Collection" } } } }, @@ -2809,9 +2120,7 @@ "description": "Validation Error", "content": { "application/json": { - "schema": { - "$ref": "#/components/schemas/HTTPValidationError" - } + "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } @@ -2830,58 +2139,35 @@ }, "/v1/apps/{app_id}/users/{user_id}/collections/{collection_id}/documents/list": { "post": { - "tags": [ - "documents" - ], + "tags": ["documents"], "summary": "Get Documents", "operationId": "get_documents_v1_apps__app_id__users__user_id__collections__collection_id__documents_list_post", - "security": [ - { - "HTTPBearer": [] - }, - {} - ], + "security": [{ "HTTPBearer": [] }, {}], "parameters": [ { "name": "app_id", "in": "path", "required": true, - "schema": { - "type": "string", - "title": "App Id" - } + "schema": { "type": "string", "title": "App Id" } }, { "name": "user_id", "in": "path", "required": true, - "schema": { - "type": "string", - "title": "User Id" - } + "schema": { "type": "string", "title": "User Id" } }, { "name": "collection_id", "in": "path", "required": true, - "schema": { - "type": "string", - "title": "Collection Id" - } + "schema": { "type": "string", "title": "Collection Id" } }, { "name": "reverse", "in": "query", "required": false, "schema": { - "anyOf": [ - { - "type": "boolean" - }, - { - "type": "null" - } - ], + "anyOf": [{ "type": "boolean" }, { "type": "null" }], "default": false, "title": "Reverse" } @@ -2918,9 +2204,7 @@ "required": true, "content": { "application/json": { - "schema": { - "$ref": "#/components/schemas/DocumentGet" - } + "schema": { "$ref": "#/components/schemas/DocumentGet" } } } }, @@ -2929,9 +2213,7 @@ "description": "Successful Response", "content": { "application/json": { - "schema": { - "$ref": "#/components/schemas/Page_Document_" - } + "schema": { "$ref": "#/components/schemas/Page_Document_" } } } }, @@ -2939,9 +2221,7 @@ "description": "Validation Error", "content": { "application/json": { - "schema": { - "$ref": "#/components/schemas/HTTPValidationError" - } + "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } @@ -2960,53 +2240,34 @@ }, "/v1/apps/{app_id}/users/{user_id}/collections/{collection_id}/documents/{document_id}": { "get": { - "tags": [ - "documents" - ], + "tags": ["documents"], "summary": "Get Document", "operationId": "get_document_v1_apps__app_id__users__user_id__collections__collection_id__documents__document_id__get", - "security": [ - { - "HTTPBearer": [] - }, - {} - ], + "security": [{ "HTTPBearer": [] }, {}], "parameters": [ { "name": "app_id", "in": "path", "required": true, - "schema": { - "type": "string", - "title": "App Id" - } + "schema": { "type": "string", "title": "App Id" } }, { "name": "user_id", "in": "path", "required": true, - "schema": { - "type": "string", - "title": "User Id" - } + "schema": { "type": "string", "title": "User Id" } }, { "name": "collection_id", "in": "path", "required": true, - "schema": { - "type": "string", - "title": "Collection Id" - } + "schema": { "type": "string", "title": "Collection Id" } }, { "name": "document_id", "in": "path", "required": true, - "schema": { - "type": "string", - "title": "Document Id" - } + "schema": { "type": "string", "title": "Document Id" } } ], "responses": { @@ -3014,9 +2275,7 @@ "description": "Successful Response", "content": { "application/json": { - "schema": { - "$ref": "#/components/schemas/Document" - } + "schema": { "$ref": "#/components/schemas/Document" } } } }, @@ -3024,9 +2283,7 @@ "description": "Validation Error", "content": { "application/json": { - "schema": { - "$ref": "#/components/schemas/HTTPValidationError" - } + "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } @@ -3043,62 +2300,41 @@ ] }, "put": { - "tags": [ - "documents" - ], + "tags": ["documents"], "summary": "Update Document", "operationId": "update_document_v1_apps__app_id__users__user_id__collections__collection_id__documents__document_id__put", - "security": [ - { - "HTTPBearer": [] - }, - {} - ], + "security": [{ "HTTPBearer": [] }, {}], "parameters": [ { "name": "app_id", "in": "path", "required": true, - "schema": { - "type": "string", - "title": "App Id" - } + "schema": { "type": "string", "title": "App Id" } }, { "name": "user_id", "in": "path", "required": true, - "schema": { - "type": "string", - "title": "User Id" - } + "schema": { "type": "string", "title": "User Id" } }, { "name": "collection_id", "in": "path", "required": true, - "schema": { - "type": "string", - "title": "Collection Id" - } + "schema": { "type": "string", "title": "Collection Id" } }, { "name": "document_id", "in": "path", "required": true, - "schema": { - "type": "string", - "title": "Document Id" - } + "schema": { "type": "string", "title": "Document Id" } } ], "requestBody": { "required": true, "content": { "application/json": { - "schema": { - "$ref": "#/components/schemas/DocumentUpdate" - } + "schema": { "$ref": "#/components/schemas/DocumentUpdate" } } } }, @@ -3107,9 +2343,7 @@ "description": "Successful Response", "content": { "application/json": { - "schema": { - "$ref": "#/components/schemas/Document" - } + "schema": { "$ref": "#/components/schemas/Document" } } } }, @@ -3117,9 +2351,7 @@ "description": "Validation Error", "content": { "application/json": { - "schema": { - "$ref": "#/components/schemas/HTTPValidationError" - } + "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } @@ -3136,71 +2368,46 @@ ] }, "delete": { - "tags": [ - "documents" - ], + "tags": ["documents"], "summary": "Delete Document", "operationId": "delete_document_v1_apps__app_id__users__user_id__collections__collection_id__documents__document_id__delete", - "security": [ - { - "HTTPBearer": [] - }, - {} - ], + "security": [{ "HTTPBearer": [] }, {}], "parameters": [ { "name": "app_id", "in": "path", "required": true, - "schema": { - "type": "string", - "title": "App Id" - } + "schema": { "type": "string", "title": "App Id" } }, { "name": "user_id", "in": "path", "required": true, - "schema": { - "type": "string", - "title": "User Id" - } + "schema": { "type": "string", "title": "User Id" } }, { "name": "collection_id", "in": "path", "required": true, - "schema": { - "type": "string", - "title": "Collection Id" - } + "schema": { "type": "string", "title": "Collection Id" } }, { "name": "document_id", "in": "path", "required": true, - "schema": { - "type": "string", - "title": "Document Id" - } + "schema": { "type": "string", "title": "Document Id" } } ], "responses": { "200": { "description": "Successful Response", - "content": { - "application/json": { - "schema": {} - } - } + "content": { "application/json": { "schema": {} } } }, "422": { "description": "Validation Error", "content": { "application/json": { - "schema": { - "$ref": "#/components/schemas/HTTPValidationError" - } + "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } @@ -3219,77 +2426,47 @@ }, "/v1/apps/{app_id}/users/{user_id}/collections/{collection_id}/documents/query": { "get": { - "tags": [ - "documents" - ], + "tags": ["documents"], "summary": "Query Documents", "operationId": "query_documents_v1_apps__app_id__users__user_id__collections__collection_id__documents_query_get", - "security": [ - { - "HTTPBearer": [] - }, - {} - ], + "security": [{ "HTTPBearer": [] }, {}], "parameters": [ { "name": "app_id", "in": "path", "required": true, - "schema": { - "type": "string", - "title": "App Id" - } + "schema": { "type": "string", "title": "App Id" } }, { "name": "user_id", "in": "path", "required": true, - "schema": { - "type": "string", - "title": "User Id" - } + "schema": { "type": "string", "title": "User Id" } }, { "name": "collection_id", "in": "path", "required": true, - "schema": { - "type": "string", - "title": "Collection Id" - } + "schema": { "type": "string", "title": "Collection Id" } }, { "name": "query", "in": "query", "required": true, - "schema": { - "type": "string", - "title": "Query" - } + "schema": { "type": "string", "title": "Query" } }, { "name": "top_k", "in": "query", "required": false, - "schema": { - "type": "integer", - "default": 5, - "title": "Top K" - } + "schema": { "type": "integer", "default": 5, "title": "Top K" } }, { "name": "filter", "in": "query", "required": false, "schema": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], + "anyOf": [{ "type": "string" }, { "type": "null" }], "title": "Filter" } } @@ -3301,9 +2478,7 @@ "application/json": { "schema": { "type": "array", - "items": { - "$ref": "#/components/schemas/Document" - }, + "items": { "$ref": "#/components/schemas/Document" }, "title": "Response Query Documents V1 Apps App Id Users User Id Collections Collection Id Documents Query Get" } } @@ -3313,9 +2488,7 @@ "description": "Validation Error", "content": { "application/json": { - "schema": { - "$ref": "#/components/schemas/HTTPValidationError" - } + "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } @@ -3334,53 +2507,35 @@ }, "/v1/apps/{app_id}/users/{user_id}/collections/{collection_id}/documents": { "post": { - "tags": [ - "documents" - ], + "tags": ["documents"], "summary": "Create Document", "operationId": "create_document_v1_apps__app_id__users__user_id__collections__collection_id__documents_post", - "security": [ - { - "HTTPBearer": [] - }, - {} - ], + "security": [{ "HTTPBearer": [] }, {}], "parameters": [ { "name": "app_id", "in": "path", "required": true, - "schema": { - "type": "string", - "title": "App Id" - } + "schema": { "type": "string", "title": "App Id" } }, { "name": "user_id", "in": "path", "required": true, - "schema": { - "type": "string", - "title": "User Id" - } + "schema": { "type": "string", "title": "User Id" } }, { "name": "collection_id", "in": "path", "required": true, - "schema": { - "type": "string", - "title": "Collection Id" - } + "schema": { "type": "string", "title": "Collection Id" } } ], "requestBody": { "required": true, "content": { "application/json": { - "schema": { - "$ref": "#/components/schemas/DocumentCreate" - } + "schema": { "$ref": "#/components/schemas/DocumentCreate" } } } }, @@ -3389,9 +2544,7 @@ "description": "Successful Response", "content": { "application/json": { - "schema": { - "$ref": "#/components/schemas/Document" - } + "schema": { "$ref": "#/components/schemas/Document" } } } }, @@ -3399,9 +2552,7 @@ "description": "Validation Error", "content": { "application/json": { - "schema": { - "$ref": "#/components/schemas/HTTPValidationError" - } + "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } @@ -3422,17 +2573,24 @@ "components": { "schemas": { "AgentChat": { + "properties": { "content": { "type": "string", "title": "Content" } }, + "type": "object", + "required": ["content"], + "title": "AgentChat" + }, + "AgentQuery": { "properties": { - "content": { - "type": "string", - "title": "Content" + "queries": { + "anyOf": [ + { "type": "string" }, + { "items": { "type": "string" }, "type": "array" } + ], + "title": "Queries" } }, "type": "object", - "required": [ - "content" - ], - "title": "AgentChat" + "required": ["queries"], + "title": "AgentQuery" }, "AgentQuery": { "properties": { @@ -3452,21 +2610,13 @@ } }, "type": "object", - "required": [ - "queries" - ], + "required": ["queries"], "title": "AgentQuery" }, "App": { "properties": { - "id": { - "type": "string", - "title": "Id" - }, - "name": { - "type": "string", - "title": "Name" - }, + "id": { "type": "string", "title": "Id" }, + "name": { "type": "string", "title": "Name" }, "metadata": { "type": "object", "title": "Metadata", @@ -3479,24 +2629,13 @@ } }, "type": "object", - "required": [ - "id", - "name", - "metadata", - "created_at" - ], + "required": ["id", "name", "metadata", "created_at"], "title": "App", - "exclude": [ - "h_metadata", - "public_id" - ] + "exclude": ["h_metadata", "public_id"] }, "AppCreate": { "properties": { - "name": { - "type": "string", - "title": "Name" - }, + "name": { "type": "string", "title": "Name" }, "metadata": { "type": "object", "title": "Metadata", @@ -3505,33 +2644,19 @@ } }, "type": "object", - "required": [ - "name" - ], + "required": ["name"], "title": "AppCreate" }, "AppUpdate": { "properties": { "name": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], + "anyOf": [{ "type": "string" }, { "type": "null" }], "title": "Name" }, "metadata": { "anyOf": [ - { - "type": "object", - "additionalProperties": true - }, - { - "type": "null" - } + { "type": "object", "additionalProperties": true }, + { "type": "null" } ], "title": "Metadata" } @@ -3541,18 +2666,9 @@ }, "Collection": { "properties": { - "id": { - "type": "string", - "title": "Id" - }, - "name": { - "type": "string", - "title": "Name" - }, - "user_id": { - "type": "string", - "title": "User Id" - }, + "id": { "type": "string", "title": "Id" }, + "name": { "type": "string", "title": "Name" }, + "user_id": { "type": "string", "title": "User Id" }, "metadata": { "type": "object", "title": "Metadata", @@ -3565,56 +2681,32 @@ } }, "type": "object", - "required": [ - "id", - "name", - "user_id", - "metadata", - "created_at" - ], + "required": ["id", "name", "user_id", "metadata", "created_at"], "title": "Collection", - "exclude": [ - "h_metadata", - "public_id" - ] + "exclude": ["h_metadata", "public_id"] }, "CollectionCreate": { "properties": { - "name": { - "type": "string", - "title": "Name" - }, + "name": { "type": "string", "title": "Name" }, "metadata": { "anyOf": [ - { - "type": "object", - "additionalProperties": true - }, - { - "type": "null" - } + { "type": "object", "additionalProperties": true }, + { "type": "null" } ], "title": "Metadata", "default": {} } }, "type": "object", - "required": [ - "name" - ], + "required": ["name"], "title": "CollectionCreate" }, "CollectionGet": { "properties": { "filter": { "anyOf": [ - { - "type": "object", - "additionalProperties": true - }, - { - "type": "null" - } + { "type": "object", "additionalProperties": true }, + { "type": "null" } ], "title": "Filter" } @@ -3625,25 +2717,13 @@ "CollectionUpdate": { "properties": { "name": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], + "anyOf": [{ "type": "string" }, { "type": "null" }], "title": "Name" }, "metadata": { "anyOf": [ - { - "type": "object", - "additionalProperties": true - }, - { - "type": "null" - } + { "type": "object", "additionalProperties": true }, + { "type": "null" } ], "title": "Metadata" } @@ -3653,14 +2733,8 @@ }, "Document": { "properties": { - "id": { - "type": "string", - "title": "Id" - }, - "content": { - "type": "string", - "title": "Content" - }, + "id": { "type": "string", "title": "Id" }, + "content": { "type": "string", "title": "Content" }, "metadata": { "type": "object", "title": "Metadata", @@ -3671,10 +2745,7 @@ "format": "date-time", "title": "Created At" }, - "collection_id": { - "type": "string", - "title": "Collection Id" - } + "collection_id": { "type": "string", "title": "Collection Id" } }, "type": "object", "required": [ @@ -3685,48 +2756,30 @@ "collection_id" ], "title": "Document", - "exclude": [ - "h_metadata", - "public_id" - ] + "exclude": ["h_metadata", "public_id"] }, "DocumentCreate": { "properties": { - "content": { - "type": "string", - "title": "Content" - }, + "content": { "type": "string", "title": "Content" }, "metadata": { "anyOf": [ - { - "type": "object", - "additionalProperties": true - }, - { - "type": "null" - } + { "type": "object", "additionalProperties": true }, + { "type": "null" } ], "title": "Metadata", "default": {} } }, "type": "object", - "required": [ - "content" - ], + "required": ["content"], "title": "DocumentCreate" }, "DocumentGet": { "properties": { "filter": { "anyOf": [ - { - "type": "object", - "additionalProperties": true - }, - { - "type": "null" - } + { "type": "object", "additionalProperties": true }, + { "type": "null" } ], "title": "Filter" } @@ -3738,25 +2791,13 @@ "properties": { "metadata": { "anyOf": [ - { - "type": "object", - "additionalProperties": true - }, - { - "type": "null" - } + { "type": "object", "additionalProperties": true }, + { "type": "null" } ], "title": "Metadata" }, "content": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], + "anyOf": [{ "type": "string" }, { "type": "null" }], "title": "Content" } }, @@ -3766,9 +2807,7 @@ "HTTPValidationError": { "properties": { "detail": { - "items": { - "$ref": "#/components/schemas/ValidationError" - }, + "items": { "$ref": "#/components/schemas/ValidationError" }, "type": "array", "title": "Detail" } @@ -3778,22 +2817,10 @@ }, "Message": { "properties": { - "id": { - "type": "string", - "title": "Id" - }, - "content": { - "type": "string", - "title": "Content" - }, - "is_user": { - "type": "boolean", - "title": "Is User" - }, - "session_id": { - "type": "string", - "title": "Session Id" - }, + "id": { "type": "string", "title": "Id" }, + "content": { "type": "string", "title": "Content" }, + "is_user": { "type": "boolean", "title": "Is User" }, + "session_id": { "type": "string", "title": "Session Id" }, "metadata": { "type": "object", "title": "Metadata", @@ -3815,21 +2842,12 @@ "created_at" ], "title": "Message", - "exclude": [ - "h_metadata", - "public_id" - ] + "exclude": ["h_metadata", "public_id"] }, "MessageCreate": { "properties": { - "content": { - "type": "string", - "title": "Content" - }, - "is_user": { - "type": "boolean", - "title": "Is User" - }, + "content": { "type": "string", "title": "Content" }, + "is_user": { "type": "boolean", "title": "Is User" }, "metadata": { "type": "object", "title": "Metadata", @@ -3838,23 +2856,15 @@ } }, "type": "object", - "required": [ - "content", - "is_user" - ], + "required": ["content", "is_user"], "title": "MessageCreate" }, "MessageGet": { "properties": { "filter": { "anyOf": [ - { - "type": "object", - "additionalProperties": true - }, - { - "type": "null" - } + { "type": "object", "additionalProperties": true }, + { "type": "null" } ], "title": "Filter" } @@ -3866,13 +2876,8 @@ "properties": { "metadata": { "anyOf": [ - { - "type": "object", - "additionalProperties": true - }, - { - "type": "null" - } + { "type": "object", "additionalProperties": true }, + { "type": "null" } ], "title": "Metadata" } @@ -3882,22 +2887,10 @@ }, "Metamessage": { "properties": { - "id": { - "type": "string", - "title": "Id" - }, - "metamessage_type": { - "type": "string", - "title": "Metamessage Type" - }, - "content": { - "type": "string", - "title": "Content" - }, - "message_id": { - "type": "string", - "title": "Message Id" - }, + "id": { "type": "string", "title": "Id" }, + "metamessage_type": { "type": "string", "title": "Metamessage Type" }, + "content": { "type": "string", "title": "Content" }, + "message_id": { "type": "string", "title": "Message Id" }, "metadata": { "type": "object", "title": "Metadata", @@ -3919,80 +2912,40 @@ "created_at" ], "title": "Metamessage", - "exclude": [ - "h_metadata", - "public_id" - ] + "exclude": ["h_metadata", "public_id"] }, "MetamessageCreate": { "properties": { - "metamessage_type": { - "type": "string", - "title": "Metamessage Type" - }, - "content": { - "type": "string", - "title": "Content" - }, - "message_id": { - "type": "string", - "title": "Message Id" - }, + "metamessage_type": { "type": "string", "title": "Metamessage Type" }, + "content": { "type": "string", "title": "Content" }, + "message_id": { "type": "string", "title": "Message Id" }, "metadata": { "anyOf": [ - { - "type": "object", - "additionalProperties": true - }, - { - "type": "null" - } + { "type": "object", "additionalProperties": true }, + { "type": "null" } ], "title": "Metadata", "default": {} } }, "type": "object", - "required": [ - "metamessage_type", - "content", - "message_id" - ], + "required": ["metamessage_type", "content", "message_id"], "title": "MetamessageCreate" }, "MetamessageGet": { "properties": { "metamessage_type": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], + "anyOf": [{ "type": "string" }, { "type": "null" }], "title": "Metamessage Type" }, "message_id": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], + "anyOf": [{ "type": "string" }, { "type": "null" }], "title": "Message Id" }, "filter": { "anyOf": [ - { - "type": "object", - "additionalProperties": true - }, - { - "type": "null" - } + { "type": "object", "additionalProperties": true }, + { "type": "null" } ], "title": "Filter" } @@ -4004,25 +2957,13 @@ "properties": { "filter": { "anyOf": [ - { - "type": "object", - "additionalProperties": true - }, - { - "type": "null" - } + { "type": "object", "additionalProperties": true }, + { "type": "null" } ], "title": "Filter" }, "metamessage_type": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], + "anyOf": [{ "type": "string" }, { "type": "null" }], "title": "Metamessage Type" } }, @@ -4031,288 +2972,124 @@ }, "MetamessageUpdate": { "properties": { - "message_id": { - "type": "string", - "title": "Message Id" - }, + "message_id": { "type": "string", "title": "Message Id" }, "metamessage_type": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], + "anyOf": [{ "type": "string" }, { "type": "null" }], "title": "Metamessage Type" }, "metadata": { "anyOf": [ - { - "type": "object", - "additionalProperties": true - }, - { - "type": "null" - } + { "type": "object", "additionalProperties": true }, + { "type": "null" } ], "title": "Metadata" } }, "type": "object", - "required": [ - "message_id" - ], + "required": ["message_id"], "title": "MetamessageUpdate" }, "Page_Collection_": { "properties": { "items": { - "items": { - "$ref": "#/components/schemas/Collection" - }, + "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" - } + "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" - ], + "required": ["items", "total", "page", "size"], "title": "Page[Collection]" }, "Page_Document_": { "properties": { "items": { - "items": { - "$ref": "#/components/schemas/Document" - }, + "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" - } + "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" - ], + "required": ["items", "total", "page", "size"], "title": "Page[Document]" }, "Page_Message_": { "properties": { "items": { - "items": { - "$ref": "#/components/schemas/Message" - }, + "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" - } + "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" - ], + "required": ["items", "total", "page", "size"], "title": "Page[Message]" }, "Page_Metamessage_": { "properties": { "items": { - "items": { - "$ref": "#/components/schemas/Metamessage" - }, + "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" - } + "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" - ], + "required": ["items", "total", "page", "size"], "title": "Page[Metamessage]" }, "Page_Session_": { "properties": { "items": { - "items": { - "$ref": "#/components/schemas/Session" - }, + "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" - } + "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" - ], + "required": ["items", "total", "page", "size"], "title": "Page[Session]" }, "Page_User_": { "properties": { "items": { - "items": { - "$ref": "#/components/schemas/User" - }, + "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" - } + "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" - ], + "required": ["items", "total", "page", "size"], "title": "Page[User]" }, "Session": { "properties": { - "id": { - "type": "string", - "title": "Id" - }, - "is_active": { - "type": "boolean", - "title": "Is Active" - }, - "user_id": { - "type": "string", - "title": "User Id" - }, + "id": { "type": "string", "title": "Id" }, + "is_active": { "type": "boolean", "title": "Is Active" }, + "user_id": { "type": "string", "title": "User Id" }, "metadata": { "type": "object", "title": "Metadata", @@ -4325,18 +3102,9 @@ } }, "type": "object", - "required": [ - "id", - "is_active", - "user_id", - "metadata", - "created_at" - ], + "required": ["id", "is_active", "user_id", "metadata", "created_at"], "title": "Session", - "exclude": [ - "h_metadata", - "public_id" - ] + "exclude": ["h_metadata", "public_id"] }, "SessionCreate": { "properties": { @@ -4354,13 +3122,8 @@ "properties": { "filter": { "anyOf": [ - { - "type": "object", - "additionalProperties": true - }, - { - "type": "null" - } + { "type": "object", "additionalProperties": true }, + { "type": "null" } ], "title": "Filter" }, @@ -4377,13 +3140,8 @@ "properties": { "metadata": { "anyOf": [ - { - "type": "object", - "additionalProperties": true - }, - { - "type": "null" - } + { "type": "object", "additionalProperties": true }, + { "type": "null" } ], "title": "Metadata" } @@ -4393,18 +3151,9 @@ }, "User": { "properties": { - "id": { - "type": "string", - "title": "Id" - }, - "name": { - "type": "string", - "title": "Name" - }, - "app_id": { - "type": "string", - "title": "App Id" - }, + "id": { "type": "string", "title": "Id" }, + "name": { "type": "string", "title": "Name" }, + "app_id": { "type": "string", "title": "App Id" }, "created_at": { "type": "string", "format": "date-time", @@ -4417,25 +3166,13 @@ } }, "type": "object", - "required": [ - "id", - "name", - "app_id", - "created_at", - "metadata" - ], + "required": ["id", "name", "app_id", "created_at", "metadata"], "title": "User", - "exclude": [ - "h_metadata", - "public_id" - ] + "exclude": ["h_metadata", "public_id"] }, "UserCreate": { "properties": { - "name": { - "type": "string", - "title": "Name" - }, + "name": { "type": "string", "title": "Name" }, "metadata": { "type": "object", "title": "Metadata", @@ -4444,22 +3181,15 @@ } }, "type": "object", - "required": [ - "name" - ], + "required": ["name"], "title": "UserCreate" }, "UserGet": { "properties": { "filter": { "anyOf": [ - { - "type": "object", - "additionalProperties": true - }, - { - "type": "null" - } + { "type": "object", "additionalProperties": true }, + { "type": "null" } ], "title": "Filter" } @@ -4470,25 +3200,13 @@ "UserUpdate": { "properties": { "name": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], + "anyOf": [{ "type": "string" }, { "type": "null" }], "title": "Name" }, "metadata": { "anyOf": [ - { - "type": "object", - "additionalProperties": true - }, - { - "type": "null" - } + { "type": "object", "additionalProperties": true }, + { "type": "null" } ], "title": "Metadata" } @@ -4499,42 +3217,19 @@ "ValidationError": { "properties": { "loc": { - "items": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "integer" - } - ] - }, + "items": { "anyOf": [{ "type": "string" }, { "type": "integer" }] }, "type": "array", "title": "Location" }, - "msg": { - "type": "string", - "title": "Message" - }, - "type": { - "type": "string", - "title": "Error Type" - } + "msg": { "type": "string", "title": "Message" }, + "type": { "type": "string", "title": "Error Type" } }, "type": "object", - "required": [ - "loc", - "msg", - "type" - ], + "required": ["loc", "msg", "type"], "title": "ValidationError" } }, - "securitySchemes": { - "HTTPBearer": { - "type": "http", - "scheme": "bearer" - } - } + "securitySchemes": { "HTTPBearer": { "type": "http", "scheme": "bearer" } } } -} \ No newline at end of file +} + diff --git a/docs/openapi.json] b/docs/openapi.json] new file mode 100644 index 00000000..bc5b8473 --- /dev/null +++ b/docs/openapi.json] @@ -0,0 +1,4358 @@ +{ + "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", + "contact": { + "name": "Plastic Labs", + "url": "https://plasticlabs.ai/", + "email": "hello@plasticlabs.ai" + }, + "version": "0.0.12" + }, + "servers": [ + { + "url": "http://127.0.0.1:8000", + "description": "Local Development Server" + }, + { + "url": "https:/demo.honcho.dev", + "description": "Demo Server" + } + ], + "paths": { + "/v1/apps/{app_id}": { + "get": { + "tags": ["apps"], + "summary": "Get App", + "description": "Get an App by ID\n\nArgs:\n app_id (str): The ID of the app\n\nReturns:\n schemas.App: App object", + "operationId": "get_app_v1_apps__app_id__get", + "security": [ + { + "HTTPBearer": [] + }, + {} + ], + "parameters": [ + { + "name": "app_id", + "in": "path", + "required": true, + "schema": { + "type": "string", + "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';\n\nconst client = new Honcho({\n apiKey: process.env['HONCHO_API_KEY'], // This is the default and can be omitted\n});\n\nasync function main() {\n const app = await client.apps.get('app_id');\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_API_KEY\"),\n)\napp = client.apps.get(\n \"app_id\",\n)\nprint(app.id)" + } + ] + }, + "put": { + "tags": ["apps"], + "summary": "Update App", + "description": "Update an App\n\nArgs:\n app_id (str): 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_v1_apps__app_id__put", + "security": [ + { + "HTTPBearer": [] + }, + {} + ], + "parameters": [ + { + "name": "app_id", + "in": "path", + "required": true, + "schema": { + "type": "string", + "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';\n\nconst client = new Honcho({\n apiKey: process.env['HONCHO_API_KEY'], // This is the default and can be omitted\n});\n\nasync function main() {\n const app = await client.apps.update('app_id');\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_API_KEY\"),\n)\napp = client.apps.update(\n app_id=\"app_id\",\n)\nprint(app.id)" + } + ] + } + }, + "/v1/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_v1_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';\n\nconst client = new Honcho({\n apiKey: process.env['HONCHO_API_KEY'], // This is the default and can be omitted\n});\n\nasync function main() {\n const app = await client.apps.getByName('name');\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_API_KEY\"),\n)\napp = client.apps.get_by_name(\n \"name\",\n)\nprint(app.id)" + } + ] + } + }, + "/v1/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_v1_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';\n\nconst client = new Honcho({\n apiKey: process.env['HONCHO_API_KEY'], // This is the default and can be omitted\n});\n\nasync function main() {\n const app = await client.apps.create({ name: 'name' });\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_API_KEY\"),\n)\napp = client.apps.create(\n name=\"name\",\n)\nprint(app.id)" + } + ] + } + }, + "/v1/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_v1_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';\n\nconst client = new Honcho({\n apiKey: process.env['HONCHO_API_KEY'], // This is the default and can be omitted\n});\n\nasync function main() {\n const app = await client.apps.getOrCreate('name');\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_API_KEY\"),\n)\napp = client.apps.get_or_create(\n \"name\",\n)\nprint(app.id)" + } + ] + } + }, + "/v1/apps/{app_id}/users": { + "post": { + "tags": ["users"], + "summary": "Create User", + "description": "Create a User\n\nArgs:\n app_id (str): 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_v1_apps__app_id__users_post", + "security": [ + { + "HTTPBearer": [] + }, + {} + ], + "parameters": [ + { + "name": "app_id", + "in": "path", + "required": true, + "schema": { + "type": "string", + "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';\n\nconst client = new Honcho({\n apiKey: process.env['HONCHO_API_KEY'], // This is the default and can be omitted\n});\n\nasync function main() {\n const user = await client.apps.users.create('app_id', { name: 'name' });\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_API_KEY\"),\n)\nuser = client.apps.users.create(\n app_id=\"app_id\",\n name=\"name\",\n)\nprint(user.id)" + } + ] + } + }, + "/v1/apps/{app_id}/users/list": { + "post": { + "tags": ["users"], + "summary": "Get Users", + "description": "Get All Users for an App\n\nArgs:\n app_id (str): 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_v1_apps__app_id__users_list_post", + "security": [ + { + "HTTPBearer": [] + }, + {} + ], + "parameters": [ + { + "name": "app_id", + "in": "path", + "required": true, + "schema": { + "type": "string", + "title": "App Id" + } + }, + { + "name": "reverse", + "in": "query", + "required": false, + "schema": { + "type": "boolean", + "default": false, + "title": "Reverse" + } + }, + { + "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" + } + ], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UserGet" + } + } + } + }, + "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';\n\nconst client = new Honcho({\n apiKey: process.env['HONCHO_API_KEY'], // 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 client.apps.users.list('app_id')) {\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_API_KEY\"),\n)\npage = client.apps.users.list(\n app_id=\"app_id\",\n)\npage = page.items[0]\nprint(page.id)" + } + ] + } + }, + "/v1/apps/{app_id}/users/name/{name}": { + "get": { + "tags": ["users"], + "summary": "Get User By Name", + "description": "Get a User\n\nArgs:\n app_id (str): 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_v1_apps__app_id__users_name__name__get", + "security": [ + { + "HTTPBearer": [] + }, + {} + ], + "parameters": [ + { + "name": "app_id", + "in": "path", + "required": true, + "schema": { + "type": "string", + "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';\n\nconst client = new Honcho({\n apiKey: process.env['HONCHO_API_KEY'], // This is the default and can be omitted\n});\n\nasync function main() {\n const user = await client.apps.users.getByName('app_id', 'name');\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_API_KEY\"),\n)\nuser = client.apps.users.get_by_name(\n name=\"name\",\n app_id=\"app_id\",\n)\nprint(user.id)" + } + ] + } + }, + "/v1/apps/{app_id}/users/{user_id}": { + "get": { + "tags": ["users"], + "summary": "Get User", + "description": "Get a User\n\nArgs:\n app_id (str): 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_v1_apps__app_id__users__user_id__get", + "security": [ + { + "HTTPBearer": [] + }, + {} + ], + "parameters": [ + { + "name": "app_id", + "in": "path", + "required": true, + "schema": { + "type": "string", + "title": "App Id" + } + }, + { + "name": "user_id", + "in": "path", + "required": true, + "schema": { + "type": "string", + "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';\n\nconst client = new Honcho({\n apiKey: process.env['HONCHO_API_KEY'], // This is the default and can be omitted\n});\n\nasync function main() {\n const user = await client.apps.users.get('app_id', 'user_id');\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_API_KEY\"),\n)\nuser = client.apps.users.get(\n user_id=\"user_id\",\n app_id=\"app_id\",\n)\nprint(user.id)" + } + ] + }, + "put": { + "tags": ["users"], + "summary": "Update User", + "description": "Update a User\n\nArgs:\n app_id (str): 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_v1_apps__app_id__users__user_id__put", + "security": [ + { + "HTTPBearer": [] + }, + {} + ], + "parameters": [ + { + "name": "app_id", + "in": "path", + "required": true, + "schema": { + "type": "string", + "title": "App Id" + } + }, + { + "name": "user_id", + "in": "path", + "required": true, + "schema": { + "type": "string", + "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';\n\nconst client = new Honcho({\n apiKey: process.env['HONCHO_API_KEY'], // This is the default and can be omitted\n});\n\nasync function main() {\n const user = await client.apps.users.update('app_id', 'user_id');\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_API_KEY\"),\n)\nuser = client.apps.users.update(\n user_id=\"user_id\",\n app_id=\"app_id\",\n)\nprint(user.id)" + } + ] + } + }, + "/v1/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 (str): 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_v1_apps__app_id__users_get_or_create__name__get", + "security": [ + { + "HTTPBearer": [] + }, + {} + ], + "parameters": [ + { + "name": "app_id", + "in": "path", + "required": true, + "schema": { + "type": "string", + "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';\n\nconst client = new Honcho({\n apiKey: process.env['HONCHO_API_KEY'], // This is the default and can be omitted\n});\n\nasync function main() {\n const user = await client.apps.users.getOrCreate('app_id', 'name');\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_API_KEY\"),\n)\nuser = client.apps.users.get_or_create(\n name=\"name\",\n app_id=\"app_id\",\n)\nprint(user.id)" + } + ] + } + }, + "/v1/apps/{app_id}/users/{user_id}/sessions/list": { + "post": { + "tags": ["sessions"], + "summary": "Get Sessions", + "description": "Get All Sessions for a User\n\nArgs:\n app_id (str): 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 list[schemas.Session]: List of Session objects", + "operationId": "get_sessions_v1_apps__app_id__users__user_id__sessions_list_post", + "security": [ + { + "HTTPBearer": [] + }, + {} + ], + "parameters": [ + { + "name": "app_id", + "in": "path", + "required": true, + "schema": { + "type": "string", + "title": "App Id" + } + }, + { + "name": "user_id", + "in": "path", + "required": true, + "schema": { + "type": "string", + "title": "User Id" + } + }, + { + "name": "reverse", + "in": "query", + "required": false, + "schema": { + "anyOf": [ + { + "type": "boolean" + }, + { + "type": "null" + } + ], + "default": false, + "title": "Reverse" + } + }, + { + "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" + } + ], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/SessionGet" + } + } + } + }, + "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';\n\nconst client = new Honcho({\n apiKey: process.env['HONCHO_API_KEY'], // 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 client.apps.users.sessions.list('app_id', 'user_id')) {\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_API_KEY\"),\n)\npage = client.apps.users.sessions.list(\n user_id=\"user_id\",\n app_id=\"app_id\",\n)\npage = page.items[0]\nprint(page.id)" + } + ] + } + }, + "/v1/apps/{app_id}/users/{user_id}/sessions": { + "post": { + "tags": ["sessions"], + "summary": "Create Session", + "description": "Create a Session for a User\n\nArgs:\n app_id (str): The ID of the app representing the client\n application using honcho\n user_id (str): The User ID representing the user, managed by the user\n session (schemas.SessionCreate): The Session object containing any\n metadata\n\nReturns:\n schemas.Session: The Session object of the new Session", + "operationId": "create_session_v1_apps__app_id__users__user_id__sessions_post", + "security": [ + { + "HTTPBearer": [] + }, + {} + ], + "parameters": [ + { + "name": "app_id", + "in": "path", + "required": true, + "schema": { + "type": "string", + "title": "App Id" + } + }, + { + "name": "user_id", + "in": "path", + "required": true, + "schema": { + "type": "string", + "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';\n\nconst client = new Honcho({\n apiKey: process.env['HONCHO_API_KEY'], // This is the default and can be omitted\n});\n\nasync function main() {\n const session = await client.apps.users.sessions.create('app_id', 'user_id');\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_API_KEY\"),\n)\nsession = client.apps.users.sessions.create(\n user_id=\"user_id\",\n app_id=\"app_id\",\n)\nprint(session.id)" + } + ] + } + }, + "/v1/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 (str): 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 (str): 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_v1_apps__app_id__users__user_id__sessions__session_id__put", + "security": [ + { + "HTTPBearer": [] + }, + {} + ], + "parameters": [ + { + "name": "app_id", + "in": "path", + "required": true, + "schema": { + "type": "string", + "title": "App Id" + } + }, + { + "name": "user_id", + "in": "path", + "required": true, + "schema": { + "type": "string", + "title": "User Id" + } + }, + { + "name": "session_id", + "in": "path", + "required": true, + "schema": { + "type": "string", + "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';\n\nconst client = new Honcho({\n apiKey: process.env['HONCHO_API_KEY'], // This is the default and can be omitted\n});\n\nasync function main() {\n const session = await client.apps.users.sessions.update('app_id', 'user_id', 'session_id');\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_API_KEY\"),\n)\nsession = client.apps.users.sessions.update(\n session_id=\"session_id\",\n app_id=\"app_id\",\n user_id=\"user_id\",\n)\nprint(session.id)" + } + ] + }, + "delete": { + "tags": ["sessions"], + "summary": "Delete Session", + "description": "Delete a session by marking it as inactive\n\nArgs:\n app_id (str): 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 (str): 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_v1_apps__app_id__users__user_id__sessions__session_id__delete", + "security": [ + { + "HTTPBearer": [] + }, + {} + ], + "parameters": [ + { + "name": "app_id", + "in": "path", + "required": true, + "schema": { + "type": "string", + "title": "App Id" + } + }, + { + "name": "user_id", + "in": "path", + "required": true, + "schema": { + "type": "string", + "title": "User Id" + } + }, + { + "name": "session_id", + "in": "path", + "required": true, + "schema": { + "type": "string", + "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';\n\nconst client = new Honcho({\n apiKey: process.env['HONCHO_API_KEY'], // This is the default and can be omitted\n});\n\nasync function main() {\n const session = await client.apps.users.sessions.delete('app_id', 'user_id', 'session_id');\n\n console.log(session);\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_API_KEY\"),\n)\nsession = client.apps.users.sessions.delete(\n session_id=\"session_id\",\n app_id=\"app_id\",\n user_id=\"user_id\",\n)\nprint(session)" + } + ] + }, + "get": { + "tags": ["sessions"], + "summary": "Get Session", + "description": "Get a specific session for a user by ID\n\nArgs:\n app_id (str): 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 (str): 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_v1_apps__app_id__users__user_id__sessions__session_id__get", + "security": [ + { + "HTTPBearer": [] + }, + {} + ], + "parameters": [ + { + "name": "app_id", + "in": "path", + "required": true, + "schema": { + "type": "string", + "title": "App Id" + } + }, + { + "name": "user_id", + "in": "path", + "required": true, + "schema": { + "type": "string", + "title": "User Id" + } + }, + { + "name": "session_id", + "in": "path", + "required": true, + "schema": { + "type": "string", + "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';\n\nconst client = new Honcho({\n apiKey: process.env['HONCHO_API_KEY'], // This is the default and can be omitted\n});\n\nasync function main() {\n const session = await client.apps.users.sessions.get('app_id', 'user_id', 'session_id');\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_API_KEY\"),\n)\nsession = client.apps.users.sessions.get(\n session_id=\"session_id\",\n app_id=\"app_id\",\n user_id=\"user_id\",\n)\nprint(session.id)" + } + ] + } + }, + "/v1/apps/{app_id}/users/{user_id}/sessions/{session_id}/chat": { + "post": { + "tags": ["sessions"], + "summary": "Chat", + "operationId": "chat_v1_apps__app_id__users__user_id__sessions__session_id__chat_post", + "security": [ + { + "HTTPBearer": [] + }, + {} + ], + "parameters": [ + { + "name": "app_id", + "in": "path", + "required": true, + "schema": { + "type": "string", + "title": "App Id" + } + }, + { + "name": "user_id", + "in": "path", + "required": true, + "schema": { + "type": "string", + "title": "User Id" + } + }, + { + "name": "session_id", + "in": "path", + "required": true, + "schema": { + "type": "string", + "title": "Session Id" + } + } + ], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/AgentQuery" + } + } + } + }, + "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';\n\nconst client = new Honcho({\n apiKey: process.env['HONCHO_API_KEY'], // This is the default and can be omitted\n});\n\nasync function main() {\n const agentChat = await client.apps.users.sessions.chat('app_id', 'user_id', 'session_id', {\n queries: '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_API_KEY\"),\n)\nagent_chat = client.apps.users.sessions.chat(\n session_id=\"session_id\",\n app_id=\"app_id\",\n user_id=\"user_id\",\n queries=\"string\",\n)\nprint(agent_chat.content)" + } + ] + } + }, + "/v1/apps/{app_id}/users/{user_id}/sessions/{session_id}/chat/stream": { + "post": { + "tags": ["sessions"], + "summary": "Get Chat Stream", + "operationId": "get_chat_stream_v1_apps__app_id__users__user_id__sessions__session_id__chat_stream_post", + "security": [ + { + "HTTPBearer": [] + }, + {} + ], + "parameters": [ + { + "name": "app_id", + "in": "path", + "required": true, + "schema": { + "type": "string", + "title": "App Id" + } + }, + { + "name": "user_id", + "in": "path", + "required": true, + "schema": { + "type": "string", + "title": "User Id" + } + }, + { + "name": "session_id", + "in": "path", + "required": true, + "schema": { + "type": "string", + "title": "Session Id" + } + } + ], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/AgentQuery" + } + } + } + }, + "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';\n\nconst client = new Honcho({\n apiKey: process.env['HONCHO_API_KEY'], // This is the default and can be omitted\n});\n\nasync function main() {\n const response = await client.apps.users.sessions.stream('app_id', 'user_id', 'session_id', {\n queries: 'string',\n });\n\n console.log(response);\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_API_KEY\"),\n)\nresponse = client.apps.users.sessions.stream(\n session_id=\"session_id\",\n app_id=\"app_id\",\n user_id=\"user_id\",\n queries=\"string\",\n)\nprint(response)" + } + ] + } + }, + "/v1/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 (str): The ID of the app representing the client application using 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 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_v1_apps__app_id__users__user_id__sessions__session_id__messages_post", + "security": [ + { + "HTTPBearer": [] + }, + {} + ], + "parameters": [ + { + "name": "app_id", + "in": "path", + "required": true, + "schema": { + "type": "string", + "title": "App Id" + } + }, + { + "name": "user_id", + "in": "path", + "required": true, + "schema": { + "type": "string", + "title": "User Id" + } + }, + { + "name": "session_id", + "in": "path", + "required": true, + "schema": { + "type": "string", + "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';\n\nconst client = new Honcho({\n apiKey: process.env['HONCHO_API_KEY'], // This is the default and can be omitted\n});\n\nasync function main() {\n const message = await client.apps.users.sessions.messages.create('app_id', 'user_id', 'session_id', {\n content: 'content',\n 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_API_KEY\"),\n)\nmessage = client.apps.users.sessions.messages.create(\n session_id=\"session_id\",\n app_id=\"app_id\",\n user_id=\"user_id\",\n content=\"content\",\n is_user=True,\n)\nprint(message.id)" + } + ] + } + }, + "/v1/apps/{app_id}/users/{user_id}/sessions/{session_id}/messages/list": { + "post": { + "tags": ["messages"], + "summary": "Get Messages", + "description": "Get all messages for a session\n\nArgs:\n app_id (str): 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_v1_apps__app_id__users__user_id__sessions__session_id__messages_list_post", + "security": [ + { + "HTTPBearer": [] + }, + {} + ], + "parameters": [ + { + "name": "app_id", + "in": "path", + "required": true, + "schema": { + "type": "string", + "title": "App Id" + } + }, + { + "name": "user_id", + "in": "path", + "required": true, + "schema": { + "type": "string", + "title": "User Id" + } + }, + { + "name": "session_id", + "in": "path", + "required": true, + "schema": { + "type": "string", + "title": "Session Id" + } + }, + { + "name": "reverse", + "in": "query", + "required": false, + "schema": { + "anyOf": [ + { + "type": "boolean" + }, + { + "type": "null" + } + ], + "default": false, + "title": "Reverse" + } + }, + { + "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" + } + ], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/MessageGet" + } + } + } + }, + "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';\n\nconst client = new Honcho({\n apiKey: process.env['HONCHO_API_KEY'], // 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 client.apps.users.sessions.messages.list('app_id', 'user_id', 'session_id')) {\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_API_KEY\"),\n)\npage = client.apps.users.sessions.messages.list(\n session_id=\"session_id\",\n app_id=\"app_id\",\n user_id=\"user_id\",\n)\npage = page.items[0]\nprint(page.id)" + } + ] + } + }, + "/v1/apps/{app_id}/users/{user_id}/sessions/{session_id}/messages/{message_id}": { + "get": { + "tags": ["messages"], + "summary": "Get Message", + "operationId": "get_message_v1_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", + "title": "App Id" + } + }, + { + "name": "user_id", + "in": "path", + "required": true, + "schema": { + "type": "string", + "title": "User Id" + } + }, + { + "name": "session_id", + "in": "path", + "required": true, + "schema": { + "type": "string", + "title": "Session Id" + } + }, + { + "name": "message_id", + "in": "path", + "required": true, + "schema": { + "type": "string", + "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';\n\nconst client = new Honcho({\n apiKey: process.env['HONCHO_API_KEY'], // This is the default and can be omitted\n});\n\nasync function main() {\n const message = await client.apps.users.sessions.messages.get(\n 'app_id',\n 'user_id',\n 'session_id',\n 'message_id',\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_API_KEY\"),\n)\nmessage = client.apps.users.sessions.messages.get(\n message_id=\"message_id\",\n app_id=\"app_id\",\n user_id=\"user_id\",\n session_id=\"session_id\",\n)\nprint(message.id)" + } + ] + }, + "put": { + "tags": ["messages"], + "summary": "Update Message", + "description": "Update's the metadata of a message", + "operationId": "update_message_v1_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", + "title": "App Id" + } + }, + { + "name": "user_id", + "in": "path", + "required": true, + "schema": { + "type": "string", + "title": "User Id" + } + }, + { + "name": "session_id", + "in": "path", + "required": true, + "schema": { + "type": "string", + "title": "Session Id" + } + }, + { + "name": "message_id", + "in": "path", + "required": true, + "schema": { + "type": "string", + "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';\n\nconst client = new Honcho({\n apiKey: process.env['HONCHO_API_KEY'], // This is the default and can be omitted\n});\n\nasync function main() {\n const message = await client.apps.users.sessions.messages.update(\n 'app_id',\n 'user_id',\n 'session_id',\n 'message_id',\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_API_KEY\"),\n)\nmessage = client.apps.users.sessions.messages.update(\n message_id=\"message_id\",\n app_id=\"app_id\",\n user_id=\"user_id\",\n session_id=\"session_id\",\n)\nprint(message.id)" + } + ] + } + }, + "/v1/apps/{app_id}/users/{user_id}/sessions/{session_id}/metamessages": { + "post": { + "tags": ["metamessages"], + "summary": "Create Metamessage", + "description": "Adds a message to a session\n\nArgs:\n app_id (str): 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 metamessage (schemas.MeteamessageCreate): The metamessage creation object\n\nReturns:\n schemas.Metamessage: The Metamessage object of the added metamessage\n\nRaises:\n HTTPException: If the session is not found", + "operationId": "create_metamessage_v1_apps__app_id__users__user_id__sessions__session_id__metamessages_post", + "security": [ + { + "HTTPBearer": [] + }, + {} + ], + "parameters": [ + { + "name": "app_id", + "in": "path", + "required": true, + "schema": { + "type": "string", + "title": "App Id" + } + }, + { + "name": "user_id", + "in": "path", + "required": true, + "schema": { + "type": "string", + "title": "User Id" + } + }, + { + "name": "session_id", + "in": "path", + "required": true, + "schema": { + "type": "string", + "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';\n\nconst client = new Honcho({\n apiKey: process.env['HONCHO_API_KEY'], // This is the default and can be omitted\n});\n\nasync function main() {\n const metamessage = await client.apps.users.sessions.metamessages.create(\n 'app_id',\n 'user_id',\n 'session_id',\n { content: 'content', message_id: 'message_id', metamessage_type: 'metamessage_type' },\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_API_KEY\"),\n)\nmetamessage = client.apps.users.sessions.metamessages.create(\n session_id=\"session_id\",\n app_id=\"app_id\",\n user_id=\"user_id\",\n content=\"content\",\n message_id=\"message_id\",\n metamessage_type=\"metamessage_type\",\n)\nprint(metamessage.id)" + } + ] + } + }, + "/v1/apps/{app_id}/users/{user_id}/sessions/{session_id}/metamessages/list": { + "post": { + "tags": ["metamessages"], + "summary": "Get Metamessages", + "description": "Get all messages for a session\n\nArgs:\n app_id (str): 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_v1_apps__app_id__users__user_id__sessions__session_id__metamessages_list_post", + "security": [ + { + "HTTPBearer": [] + }, + {} + ], + "parameters": [ + { + "name": "app_id", + "in": "path", + "required": true, + "schema": { + "type": "string", + "title": "App Id" + } + }, + { + "name": "user_id", + "in": "path", + "required": true, + "schema": { + "type": "string", + "title": "User Id" + } + }, + { + "name": "session_id", + "in": "path", + "required": true, + "schema": { + "type": "string", + "title": "Session Id" + } + }, + { + "name": "reverse", + "in": "query", + "required": false, + "schema": { + "anyOf": [ + { + "type": "boolean" + }, + { + "type": "null" + } + ], + "default": false, + "title": "Reverse" + } + }, + { + "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" + } + ], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/MetamessageGet" + } + } + } + }, + "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';\n\nconst client = new Honcho({\n apiKey: process.env['HONCHO_API_KEY'], // 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 client.apps.users.sessions.metamessages.list(\n 'app_id',\n 'user_id',\n 'session_id',\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_API_KEY\"),\n)\npage = client.apps.users.sessions.metamessages.list(\n session_id=\"session_id\",\n app_id=\"app_id\",\n user_id=\"user_id\",\n)\npage = page.items[0]\nprint(page.id)" + } + ] + } + }, + "/v1/apps/{app_id}/users/{user_id}/sessions/{session_id}/metamessages/{metamessage_id}": { + "get": { + "tags": ["metamessages"], + "summary": "Get Metamessage", + "description": "Get a specific Metamessage by ID\n\nArgs:\n app_id (str): 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_v1_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", + "title": "App Id" + } + }, + { + "name": "user_id", + "in": "path", + "required": true, + "schema": { + "type": "string", + "title": "User Id" + } + }, + { + "name": "session_id", + "in": "path", + "required": true, + "schema": { + "type": "string", + "title": "Session Id" + } + }, + { + "name": "metamessage_id", + "in": "path", + "required": true, + "schema": { + "type": "string", + "title": "Metamessage Id" + } + }, + { + "name": "message_id", + "in": "query", + "required": true, + "schema": { + "type": "string", + "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';\n\nconst client = new Honcho({\n apiKey: process.env['HONCHO_API_KEY'], // This is the default and can be omitted\n});\n\nasync function main() {\n const metamessage = await client.apps.users.sessions.metamessages.get(\n 'app_id',\n 'user_id',\n 'session_id',\n 'metamessage_id',\n { message_id: 'message_id' },\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_API_KEY\"),\n)\nmetamessage = client.apps.users.sessions.metamessages.get(\n metamessage_id=\"metamessage_id\",\n app_id=\"app_id\",\n user_id=\"user_id\",\n session_id=\"session_id\",\n message_id=\"message_id\",\n)\nprint(metamessage.id)" + } + ] + }, + "put": { + "tags": ["metamessages"], + "summary": "Update Metamessage", + "description": "Update's the metadata of a metamessage", + "operationId": "update_metamessage_v1_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", + "title": "App Id" + } + }, + { + "name": "user_id", + "in": "path", + "required": true, + "schema": { + "type": "string", + "title": "User Id" + } + }, + { + "name": "session_id", + "in": "path", + "required": true, + "schema": { + "type": "string", + "title": "Session Id" + } + }, + { + "name": "metamessage_id", + "in": "path", + "required": true, + "schema": { + "type": "string", + "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';\n\nconst client = new Honcho({\n apiKey: process.env['HONCHO_API_KEY'], // This is the default and can be omitted\n});\n\nasync function main() {\n const metamessage = await client.apps.users.sessions.metamessages.update(\n 'app_id',\n 'user_id',\n 'session_id',\n 'metamessage_id',\n { message_id: 'message_id' },\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_API_KEY\"),\n)\nmetamessage = client.apps.users.sessions.metamessages.update(\n metamessage_id=\"metamessage_id\",\n app_id=\"app_id\",\n user_id=\"user_id\",\n session_id=\"session_id\",\n message_id=\"message_id\",\n)\nprint(metamessage.id)" + } + ] + } + }, + "/v1/apps/{app_id}/users/{user_id}/metamessages/list": { + "post": { + "tags": ["metamessages"], + "summary": "Get Metamessages By User", + "description": "Paginate through the user metamessages for a user\n\nArgs:\n app_id (str): The ID of the app representing the client application using honcho\n user_id (str): The User ID representing the user, managed by the user\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_by_user_v1_apps__app_id__users__user_id__metamessages_list_post", + "security": [ + { + "HTTPBearer": [] + }, + {} + ], + "parameters": [ + { + "name": "app_id", + "in": "path", + "required": true, + "schema": { + "type": "string", + "title": "App Id" + } + }, + { + "name": "user_id", + "in": "path", + "required": true, + "schema": { + "type": "string", + "title": "User Id" + } + }, + { + "name": "reverse", + "in": "query", + "required": false, + "schema": { + "anyOf": [ + { + "type": "boolean" + }, + { + "type": "null" + } + ], + "default": false, + "title": "Reverse" + } + }, + { + "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" + } + ], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/MetamessageGetUserLevel" + } + } + } + }, + "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';\n\nconst client = new Honcho({\n apiKey: process.env['HONCHO_API_KEY'], // 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 client.apps.users.metamessages.list('app_id', 'user_id')) {\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_API_KEY\"),\n)\npage = client.apps.users.metamessages.list(\n user_id=\"user_id\",\n app_id=\"app_id\",\n)\npage = page.items[0]\nprint(page.id)" + } + ] + } + }, + "/v1/apps/{app_id}/users/{user_id}/collections/list": { + "post": { + "tags": ["collections"], + "summary": "Get Collections", + "description": "Get All Collections for a User\n\nArgs:\n app_id (str): The ID of the app representing the client\n application using honcho\n user_id (str): The User ID representing the user, managed by the user\n\nReturns:\n list[schemas.Collection]: List of Collection objects", + "operationId": "get_collections_v1_apps__app_id__users__user_id__collections_list_post", + "security": [ + { + "HTTPBearer": [] + }, + {} + ], + "parameters": [ + { + "name": "app_id", + "in": "path", + "required": true, + "schema": { + "type": "string", + "title": "App Id" + } + }, + { + "name": "user_id", + "in": "path", + "required": true, + "schema": { + "type": "string", + "title": "User Id" + } + }, + { + "name": "reverse", + "in": "query", + "required": false, + "schema": { + "anyOf": [ + { + "type": "boolean" + }, + { + "type": "null" + } + ], + "default": false, + "title": "Reverse" + } + }, + { + "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" + } + ], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/CollectionGet" + } + } + } + }, + "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';\n\nconst client = new Honcho({\n apiKey: process.env['HONCHO_API_KEY'], // 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 client.apps.users.collections.list('app_id', 'user_id')) {\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_API_KEY\"),\n)\npage = client.apps.users.collections.list(\n user_id=\"user_id\",\n app_id=\"app_id\",\n)\npage = page.items[0]\nprint(page.id)" + } + ] + } + }, + "/v1/apps/{app_id}/users/{user_id}/collections/name/{name}": { + "get": { + "tags": ["collections"], + "summary": "Get Collection By Name", + "operationId": "get_collection_by_name_v1_apps__app_id__users__user_id__collections_name__name__get", + "security": [ + { + "HTTPBearer": [] + }, + {} + ], + "parameters": [ + { + "name": "app_id", + "in": "path", + "required": true, + "schema": { + "type": "string", + "title": "App Id" + } + }, + { + "name": "user_id", + "in": "path", + "required": true, + "schema": { + "type": "string", + "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';\n\nconst client = new Honcho({\n apiKey: process.env['HONCHO_API_KEY'], // This is the default and can be omitted\n});\n\nasync function main() {\n const collection = await client.apps.users.collections.getByName('app_id', 'user_id', 'name');\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_API_KEY\"),\n)\ncollection = client.apps.users.collections.get_by_name(\n name=\"name\",\n app_id=\"app_id\",\n user_id=\"user_id\",\n)\nprint(collection.id)" + } + ] + } + }, + "/v1/apps/{app_id}/users/{user_id}/collections/{collection_id}": { + "get": { + "tags": ["collections"], + "summary": "Get Collection By Id", + "operationId": "get_collection_by_id_v1_apps__app_id__users__user_id__collections__collection_id__get", + "security": [ + { + "HTTPBearer": [] + }, + {} + ], + "parameters": [ + { + "name": "app_id", + "in": "path", + "required": true, + "schema": { + "type": "string", + "title": "App Id" + } + }, + { + "name": "user_id", + "in": "path", + "required": true, + "schema": { + "type": "string", + "title": "User Id" + } + }, + { + "name": "collection_id", + "in": "path", + "required": true, + "schema": { + "type": "string", + "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';\n\nconst client = new Honcho({\n apiKey: process.env['HONCHO_API_KEY'], // This is the default and can be omitted\n});\n\nasync function main() {\n const collection = await client.apps.users.collections.get('app_id', 'user_id', 'collection_id');\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_API_KEY\"),\n)\ncollection = client.apps.users.collections.get(\n collection_id=\"collection_id\",\n app_id=\"app_id\",\n user_id=\"user_id\",\n)\nprint(collection.id)" + } + ] + }, + "put": { + "tags": ["collections"], + "summary": "Update Collection", + "operationId": "update_collection_v1_apps__app_id__users__user_id__collections__collection_id__put", + "security": [ + { + "HTTPBearer": [] + }, + {} + ], + "parameters": [ + { + "name": "app_id", + "in": "path", + "required": true, + "schema": { + "type": "string", + "title": "App Id" + } + }, + { + "name": "user_id", + "in": "path", + "required": true, + "schema": { + "type": "string", + "title": "User Id" + } + }, + { + "name": "collection_id", + "in": "path", + "required": true, + "schema": { + "type": "string", + "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';\n\nconst client = new Honcho({\n apiKey: process.env['HONCHO_API_KEY'], // This is the default and can be omitted\n});\n\nasync function main() {\n const collection = await client.apps.users.collections.update('app_id', 'user_id', 'collection_id');\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_API_KEY\"),\n)\ncollection = client.apps.users.collections.update(\n collection_id=\"collection_id\",\n app_id=\"app_id\",\n user_id=\"user_id\",\n)\nprint(collection.id)" + } + ] + }, + "delete": { + "tags": ["collections"], + "summary": "Delete Collection", + "operationId": "delete_collection_v1_apps__app_id__users__user_id__collections__collection_id__delete", + "security": [ + { + "HTTPBearer": [] + }, + {} + ], + "parameters": [ + { + "name": "app_id", + "in": "path", + "required": true, + "schema": { + "type": "string", + "title": "App Id" + } + }, + { + "name": "user_id", + "in": "path", + "required": true, + "schema": { + "type": "string", + "title": "User Id" + } + }, + { + "name": "collection_id", + "in": "path", + "required": true, + "schema": { + "type": "string", + "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';\n\nconst client = new Honcho({\n apiKey: process.env['HONCHO_API_KEY'], // This is the default and can be omitted\n});\n\nasync function main() {\n const collection = await client.apps.users.collections.delete('app_id', 'user_id', 'collection_id');\n\n console.log(collection);\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_API_KEY\"),\n)\ncollection = client.apps.users.collections.delete(\n collection_id=\"collection_id\",\n app_id=\"app_id\",\n user_id=\"user_id\",\n)\nprint(collection)" + } + ] + } + }, + "/v1/apps/{app_id}/users/{user_id}/collections": { + "post": { + "tags": ["collections"], + "summary": "Create Collection", + "operationId": "create_collection_v1_apps__app_id__users__user_id__collections_post", + "security": [ + { + "HTTPBearer": [] + }, + {} + ], + "parameters": [ + { + "name": "app_id", + "in": "path", + "required": true, + "schema": { + "type": "string", + "title": "App Id" + } + }, + { + "name": "user_id", + "in": "path", + "required": true, + "schema": { + "type": "string", + "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';\n\nconst client = new Honcho({\n apiKey: process.env['HONCHO_API_KEY'], // This is the default and can be omitted\n});\n\nasync function main() {\n const collection = await client.apps.users.collections.create('app_id', 'user_id', { name: 'name' });\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_API_KEY\"),\n)\ncollection = client.apps.users.collections.create(\n user_id=\"user_id\",\n app_id=\"app_id\",\n name=\"name\",\n)\nprint(collection.id)" + } + ] + } + }, + "/v1/apps/{app_id}/users/{user_id}/collections/{collection_id}/documents/list": { + "post": { + "tags": ["documents"], + "summary": "Get Documents", + "operationId": "get_documents_v1_apps__app_id__users__user_id__collections__collection_id__documents_list_post", + "security": [ + { + "HTTPBearer": [] + }, + {} + ], + "parameters": [ + { + "name": "app_id", + "in": "path", + "required": true, + "schema": { + "type": "string", + "title": "App Id" + } + }, + { + "name": "user_id", + "in": "path", + "required": true, + "schema": { + "type": "string", + "title": "User Id" + } + }, + { + "name": "collection_id", + "in": "path", + "required": true, + "schema": { + "type": "string", + "title": "Collection Id" + } + }, + { + "name": "reverse", + "in": "query", + "required": false, + "schema": { + "anyOf": [ + { + "type": "boolean" + }, + { + "type": "null" + } + ], + "default": false, + "title": "Reverse" + } + }, + { + "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" + } + ], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/DocumentGet" + } + } + } + }, + "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';\n\nconst client = new Honcho({\n apiKey: process.env['HONCHO_API_KEY'], // 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 client.apps.users.collections.documents.list(\n 'app_id',\n 'user_id',\n 'collection_id',\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_API_KEY\"),\n)\npage = client.apps.users.collections.documents.list(\n collection_id=\"collection_id\",\n app_id=\"app_id\",\n user_id=\"user_id\",\n)\npage = page.items[0]\nprint(page.id)" + } + ] + } + }, + "/v1/apps/{app_id}/users/{user_id}/collections/{collection_id}/documents/{document_id}": { + "get": { + "tags": ["documents"], + "summary": "Get Document", + "operationId": "get_document_v1_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", + "title": "App Id" + } + }, + { + "name": "user_id", + "in": "path", + "required": true, + "schema": { + "type": "string", + "title": "User Id" + } + }, + { + "name": "collection_id", + "in": "path", + "required": true, + "schema": { + "type": "string", + "title": "Collection Id" + } + }, + { + "name": "document_id", + "in": "path", + "required": true, + "schema": { + "type": "string", + "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';\n\nconst client = new Honcho({\n apiKey: process.env['HONCHO_API_KEY'], // This is the default and can be omitted\n});\n\nasync function main() {\n const document = await client.apps.users.collections.documents.get(\n 'app_id',\n 'user_id',\n 'collection_id',\n 'document_id',\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_API_KEY\"),\n)\ndocument = client.apps.users.collections.documents.get(\n document_id=\"document_id\",\n app_id=\"app_id\",\n user_id=\"user_id\",\n collection_id=\"collection_id\",\n)\nprint(document.id)" + } + ] + }, + "put": { + "tags": ["documents"], + "summary": "Update Document", + "operationId": "update_document_v1_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", + "title": "App Id" + } + }, + { + "name": "user_id", + "in": "path", + "required": true, + "schema": { + "type": "string", + "title": "User Id" + } + }, + { + "name": "collection_id", + "in": "path", + "required": true, + "schema": { + "type": "string", + "title": "Collection Id" + } + }, + { + "name": "document_id", + "in": "path", + "required": true, + "schema": { + "type": "string", + "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';\n\nconst client = new Honcho({\n apiKey: process.env['HONCHO_API_KEY'], // This is the default and can be omitted\n});\n\nasync function main() {\n const document = await client.apps.users.collections.documents.update(\n 'app_id',\n 'user_id',\n 'collection_id',\n 'document_id',\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_API_KEY\"),\n)\ndocument = client.apps.users.collections.documents.update(\n document_id=\"document_id\",\n app_id=\"app_id\",\n user_id=\"user_id\",\n collection_id=\"collection_id\",\n)\nprint(document.id)" + } + ] + }, + "delete": { + "tags": ["documents"], + "summary": "Delete Document", + "operationId": "delete_document_v1_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", + "title": "App Id" + } + }, + { + "name": "user_id", + "in": "path", + "required": true, + "schema": { + "type": "string", + "title": "User Id" + } + }, + { + "name": "collection_id", + "in": "path", + "required": true, + "schema": { + "type": "string", + "title": "Collection Id" + } + }, + { + "name": "document_id", + "in": "path", + "required": true, + "schema": { + "type": "string", + "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';\n\nconst client = new Honcho({\n apiKey: process.env['HONCHO_API_KEY'], // This is the default and can be omitted\n});\n\nasync function main() {\n const document = await client.apps.users.collections.documents.delete(\n 'app_id',\n 'user_id',\n 'collection_id',\n 'document_id',\n );\n\n console.log(document);\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_API_KEY\"),\n)\ndocument = client.apps.users.collections.documents.delete(\n document_id=\"document_id\",\n app_id=\"app_id\",\n user_id=\"user_id\",\n collection_id=\"collection_id\",\n)\nprint(document)" + } + ] + } + }, + "/v1/apps/{app_id}/users/{user_id}/collections/{collection_id}/documents/query": { + "get": { + "tags": ["documents"], + "summary": "Query Documents", + "operationId": "query_documents_v1_apps__app_id__users__user_id__collections__collection_id__documents_query_get", + "security": [ + { + "HTTPBearer": [] + }, + {} + ], + "parameters": [ + { + "name": "app_id", + "in": "path", + "required": true, + "schema": { + "type": "string", + "title": "App Id" + } + }, + { + "name": "user_id", + "in": "path", + "required": true, + "schema": { + "type": "string", + "title": "User Id" + } + }, + { + "name": "collection_id", + "in": "path", + "required": true, + "schema": { + "type": "string", + "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 V1 Apps App Id Users User Id Collections Collection Id Documents Query Get" + } + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + }, + "x-codeSamples": [ + { + "lang": "JavaScript", + "source": "import Honcho from 'honcho';\n\nconst client = new Honcho({\n apiKey: process.env['HONCHO_API_KEY'], // This is the default and can be omitted\n});\n\nasync function main() {\n const documents = await client.apps.users.collections.documents.query(\n 'app_id',\n 'user_id',\n 'collection_id',\n { query: 'query' },\n );\n\n console.log(documents);\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_API_KEY\"),\n)\ndocuments = client.apps.users.collections.documents.query(\n collection_id=\"collection_id\",\n app_id=\"app_id\",\n user_id=\"user_id\",\n query=\"query\",\n)\nprint(documents)" + } + ] + } + }, + "/v1/apps/{app_id}/users/{user_id}/collections/{collection_id}/documents": { + "post": { + "tags": ["documents"], + "summary": "Create Document", + "operationId": "create_document_v1_apps__app_id__users__user_id__collections__collection_id__documents_post", + "security": [ + { + "HTTPBearer": [] + }, + {} + ], + "parameters": [ + { + "name": "app_id", + "in": "path", + "required": true, + "schema": { + "type": "string", + "title": "App Id" + } + }, + { + "name": "user_id", + "in": "path", + "required": true, + "schema": { + "type": "string", + "title": "User Id" + } + }, + { + "name": "collection_id", + "in": "path", + "required": true, + "schema": { + "type": "string", + "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';\n\nconst client = new Honcho({\n apiKey: process.env['HONCHO_API_KEY'], // This is the default and can be omitted\n});\n\nasync function main() {\n const document = await client.apps.users.collections.documents.create(\n 'app_id',\n 'user_id',\n 'collection_id',\n { content: 'content' },\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_API_KEY\"),\n)\ndocument = client.apps.users.collections.documents.create(\n collection_id=\"collection_id\",\n app_id=\"app_id\",\n user_id=\"user_id\",\n content=\"content\",\n)\nprint(document.id)" + } + ] + } + } + }, + "components": { + "schemas": { + "AgentChat": { + "properties": { + "content": { + "type": "string", + "title": "Content" + } + }, + "type": "object", + "required": ["content"], + "title": "AgentChat" + }, + "AgentQuery": { + "properties": { + "queries": { + "anyOf": [ + { + "type": "string" + }, + { + "items": { + "type": "string" + }, + "type": "array" + } + ], + "title": "Queries" + } + }, + "type": "object", + "required": ["queries"], + "title": "AgentQuery" + }, + "App": { + "properties": { + "id": { + "type": "string", + "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", "public_id"] + }, + "AppCreate": { + "properties": { + "name": { + "type": "string", + "title": "Name" + }, + "metadata": { + "type": "object", + "title": "Metadata", + "default": {}, + "additionalProperties": true + } + }, + "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", + "title": "Id" + }, + "name": { + "type": "string", + "title": "Name" + }, + "user_id": { + "type": "string", + "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", "public_id"] + }, + "CollectionCreate": { + "properties": { + "name": { + "type": "string", + "title": "Name" + }, + "metadata": { + "anyOf": [ + { + "type": "object", + "additionalProperties": true + }, + { + "type": "null" + } + ], + "title": "Metadata", + "default": {} + } + }, + "type": "object", + "required": ["name"], + "title": "CollectionCreate" + }, + "CollectionGet": { + "properties": { + "filter": { + "anyOf": [ + { + "type": "object", + "additionalProperties": true + }, + { + "type": "null" + } + ], + "title": "Filter" + } + }, + "type": "object", + "title": "CollectionGet" + }, + "CollectionUpdate": { + "properties": { + "name": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Name" + }, + "metadata": { + "anyOf": [ + { + "type": "object", + "additionalProperties": true + }, + { + "type": "null" + } + ], + "title": "Metadata" + } + }, + "type": "object", + "title": "CollectionUpdate" + }, + "Document": { + "properties": { + "id": { + "type": "string", + "title": "Id" + }, + "content": { + "type": "string", + "title": "Content" + }, + "metadata": { + "type": "object", + "title": "Metadata", + "additionalProperties": true + }, + "created_at": { + "type": "string", + "format": "date-time", + "title": "Created At" + }, + "collection_id": { + "type": "string", + "title": "Collection Id" + } + }, + "type": "object", + "required": [ + "id", + "content", + "metadata", + "created_at", + "collection_id" + ], + "title": "Document", + "exclude": ["h_metadata", "public_id"] + }, + "DocumentCreate": { + "properties": { + "content": { + "type": "string", + "title": "Content" + }, + "metadata": { + "anyOf": [ + { + "type": "object", + "additionalProperties": true + }, + { + "type": "null" + } + ], + "title": "Metadata", + "default": {} + } + }, + "type": "object", + "required": ["content"], + "title": "DocumentCreate" + }, + "DocumentGet": { + "properties": { + "filter": { + "anyOf": [ + { + "type": "object", + "additionalProperties": true + }, + { + "type": "null" + } + ], + "title": "Filter" + } + }, + "type": "object", + "title": "DocumentGet" + }, + "DocumentUpdate": { + "properties": { + "metadata": { + "anyOf": [ + { + "type": "object", + "additionalProperties": true + }, + { + "type": "null" + } + ], + "title": "Metadata" + }, + "content": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Content" + } + }, + "type": "object", + "title": "DocumentUpdate" + }, + "HTTPValidationError": { + "properties": { + "detail": { + "items": { + "$ref": "#/components/schemas/ValidationError" + }, + "type": "array", + "title": "Detail" + } + }, + "type": "object", + "title": "HTTPValidationError" + }, + "Message": { + "properties": { + "id": { + "type": "string", + "title": "Id" + }, + "content": { + "type": "string", + "title": "Content" + }, + "is_user": { + "type": "boolean", + "title": "Is User" + }, + "session_id": { + "type": "string", + "title": "Session Id" + }, + "metadata": { + "type": "object", + "title": "Metadata", + "additionalProperties": true + }, + "created_at": { + "type": "string", + "format": "date-time", + "title": "Created At" + } + }, + "type": "object", + "required": [ + "id", + "content", + "is_user", + "session_id", + "metadata", + "created_at" + ], + "title": "Message", + "exclude": ["h_metadata", "public_id"] + }, + "MessageCreate": { + "properties": { + "content": { + "type": "string", + "title": "Content" + }, + "is_user": { + "type": "boolean", + "title": "Is User" + }, + "metadata": { + "type": "object", + "title": "Metadata", + "default": {}, + "additionalProperties": true + } + }, + "type": "object", + "required": ["content", "is_user"], + "title": "MessageCreate" + }, + "MessageGet": { + "properties": { + "filter": { + "anyOf": [ + { + "type": "object", + "additionalProperties": true + }, + { + "type": "null" + } + ], + "title": "Filter" + } + }, + "type": "object", + "title": "MessageGet" + }, + "MessageUpdate": { + "properties": { + "metadata": { + "anyOf": [ + { + "type": "object", + "additionalProperties": true + }, + { + "type": "null" + } + ], + "title": "Metadata" + } + }, + "type": "object", + "title": "MessageUpdate" + }, + "Metamessage": { + "properties": { + "id": { + "type": "string", + "title": "Id" + }, + "metamessage_type": { + "type": "string", + "title": "Metamessage Type" + }, + "content": { + "type": "string", + "title": "Content" + }, + "message_id": { + "type": "string", + "title": "Message Id" + }, + "metadata": { + "type": "object", + "title": "Metadata", + "additionalProperties": true + }, + "created_at": { + "type": "string", + "format": "date-time", + "title": "Created At" + } + }, + "type": "object", + "required": [ + "id", + "metamessage_type", + "content", + "message_id", + "metadata", + "created_at" + ], + "title": "Metamessage", + "exclude": ["h_metadata", "public_id"] + }, + "MetamessageCreate": { + "properties": { + "metamessage_type": { + "type": "string", + "title": "Metamessage Type" + }, + "content": { + "type": "string", + "title": "Content" + }, + "message_id": { + "type": "string", + "title": "Message Id" + }, + "metadata": { + "anyOf": [ + { + "type": "object", + "additionalProperties": true + }, + { + "type": "null" + } + ], + "title": "Metadata", + "default": {} + } + }, + "type": "object", + "required": ["metamessage_type", "content", "message_id"], + "title": "MetamessageCreate" + }, + "MetamessageGet": { + "properties": { + "metamessage_type": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Metamessage Type" + }, + "message_id": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Message Id" + }, + "filter": { + "anyOf": [ + { + "type": "object", + "additionalProperties": true + }, + { + "type": "null" + } + ], + "title": "Filter" + } + }, + "type": "object", + "title": "MetamessageGet" + }, + "MetamessageGetUserLevel": { + "properties": { + "filter": { + "anyOf": [ + { + "type": "object", + "additionalProperties": true + }, + { + "type": "null" + } + ], + "title": "Filter" + }, + "metamessage_type": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Metamessage Type" + } + }, + "type": "object", + "title": "MetamessageGetUserLevel" + }, + "MetamessageUpdate": { + "properties": { + "message_id": { + "type": "string", + "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", + "title": "Id" + }, + "is_active": { + "type": "boolean", + "title": "Is Active" + }, + "user_id": { + "type": "string", + "title": "User 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", "metadata", "created_at"], + "title": "Session", + "exclude": ["h_metadata", "public_id"] + }, + "SessionCreate": { + "properties": { + "metadata": { + "type": "object", + "title": "Metadata", + "default": {}, + "additionalProperties": true + } + }, + "type": "object", + "title": "SessionCreate" + }, + "SessionGet": { + "properties": { + "filter": { + "anyOf": [ + { + "type": "object", + "additionalProperties": true + }, + { + "type": "null" + } + ], + "title": "Filter" + }, + "is_active": { + "type": "boolean", + "title": "Is Active", + "default": false + } + }, + "type": "object", + "title": "SessionGet" + }, + "SessionUpdate": { + "properties": { + "metadata": { + "anyOf": [ + { + "type": "object", + "additionalProperties": true + }, + { + "type": "null" + } + ], + "title": "Metadata" + } + }, + "type": "object", + "title": "SessionUpdate" + }, + "User": { + "properties": { + "id": { + "type": "string", + "title": "Id" + }, + "name": { + "type": "string", + "title": "Name" + }, + "app_id": { + "type": "string", + "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", "public_id"] + }, + "UserCreate": { + "properties": { + "name": { + "type": "string", + "title": "Name" + }, + "metadata": { + "type": "object", + "title": "Metadata", + "default": {}, + "additionalProperties": true + } + }, + "type": "object", + "required": ["name"], + "title": "UserCreate" + }, + "UserGet": { + "properties": { + "filter": { + "anyOf": [ + { + "type": "object", + "additionalProperties": true + }, + { + "type": "null" + } + ], + "title": "Filter" + } + }, + "type": "object", + "title": "UserGet" + }, + "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" + } + } + } +} diff --git a/docs/package.json b/docs/package.json index 2ba96c07..e8ba319f 100644 --- a/docs/package.json +++ b/docs/package.json @@ -5,13 +5,13 @@ "main": ".pnp.js", "scripts": { "dev": "mintlify dev", - "openapi": "npx @mintlify/scraping@latest openapi-file openapi.json -o api-reference/endpoint", + "openapi": "npx @mintlify/scraping openapi-file openapi.json -o api-reference/endpoint", "test": "echo \"Error: no test specified\" && exit 1" }, "author": "", "license": "ISC", "dependencies": { "@mintlify/scraping": "^3.0.92", - "mintlify": "^4.0.132" + "mintlify": "^4.0.245" } } diff --git a/docs/pnpm-lock.yaml b/docs/pnpm-lock.yaml index 7cc023a3..09421f63 100644 --- a/docs/pnpm-lock.yaml +++ b/docs/pnpm-lock.yaml @@ -10,10 +10,10 @@ importers: dependencies: '@mintlify/scraping': specifier: ^3.0.92 - version: 3.0.167(openapi-types@12.1.3)(react-dom@18.3.1(react@18.3.1))(react@18.3.1) + version: 3.0.92(openapi-types@12.1.3)(react-dom@18.3.1(react@18.3.1))(react@18.3.1) mintlify: - specifier: ^4.0.132 - version: 4.0.222(openapi-types@12.1.3)(react-dom@18.3.1(react@18.3.1))(react@18.3.1) + specifier: ^4.0.245 + version: 4.0.245(react-dom@18.3.1(react@18.3.1))(react@18.3.1) packages: @@ -166,39 +166,61 @@ packages: peerDependencies: react: '>=16' - '@mintlify/cli@4.0.222': - resolution: {integrity: sha512-fcSLAMZpYuq5AATo227Qam4kV0ABGz70YWTxUe4i2AAU/lQjL/RT4Ci3Ryz9gWMj8yAnpp15gzDJhxAlxPM3Zg==} + '@mintlify/cli@4.0.245': + resolution: {integrity: sha512-2dOTeMYBjY169mKQuLrwrewsEZQBzNh1M/gTh6MpXwUJGV/WbjhAqTw1vknUmj+Q8AUCuHH3BSqaQI/NF75v0w==} engines: {node: '>=18.0.0'} hasBin: true - '@mintlify/common@1.0.144': - resolution: {integrity: sha512-40xZVyY+2L0HW7G3csbUbdnAE5q0vA0tAkIvoFgDJ2/yYPV2Hmk14piJm2nMhXsID6Pi9Bs/UTMYzP3Ns2jcyQ==} + '@mintlify/common@1.0.161': + resolution: {integrity: sha512-n5ErWtY2/w33NjLpkeaTjQ/zeH0e8Lq4Ht5YxTafoCe2W6Wc4D3WSjxR8qLOul6jKm0RsASxBpA416Gz4C181g==} - '@mintlify/link-rot@3.0.224': - resolution: {integrity: sha512-0JXXOh7+dFUsGPfQZdLLGVPRZEK9/ktNN87q7DK3BHJEiF00W56/w3FvUI45Sdz0Krj422hHJ985eYWCiTk57w==} + '@mintlify/common@1.0.76': + resolution: {integrity: sha512-aM+E0u5rLKu+6z64eoCKsvnAB0WziBx+wnRStFrbRdTCSt/LpsSbW+bNdz9AJOQADtiQdS39cLFPUVow7IPi7w==} + + '@mintlify/link-rot@3.0.242': + resolution: {integrity: sha512-6aiM56idPHIGbxm5l7+fMiw9FPQvReaOCsOdoufztlx2HmRtcUjctkbLJsX2Q3lFMR6/ZpWypriojRpMKoYvTw==} engines: {node: '>=18.0.0'} + '@mintlify/mdx@0.0.44': + resolution: {integrity: sha512-lvgadIgVxvqJUC4OeRugQGDfbNE7WnxoVaJk4Wvd2EFSB+3o9b1/XvXLrsOcD9uwyFgK94YhpmZQbftHu8ol0A==} + '@mintlify/mdx@0.0.46': resolution: {integrity: sha512-8BZsTvFhek4Z6//+kWKvlgnKy+dOjbtHqPnhiYaNlvZvGFU5BkLjOtFFP2jG+7vluvfI2yWOS8g3mtPwntWrVg==} - '@mintlify/models@0.0.123': - resolution: {integrity: sha512-1hCxHLmaeBDhg017Uw7Rxc9skakGwnQndXXN4+pEMS6mfqspDyaCTvxzgfvrLEwVKLGruy9VnpEfWNtmwuZfjA==} + '@mintlify/models@0.0.136': + resolution: {integrity: sha512-fIJ00IlNgJkIWgv8Ett3+Bjohyotg2Qdk7G1FcSeSSpDQhaJFl50aJncbkPjNukGn94luYgnrpwr8mQGhVVZ6Q==} engines: {node: '>=18.0.0'} - '@mintlify/prebuild@1.0.223': - resolution: {integrity: sha512-uJkxDLufZrXkdEdC5vkkuQwT5HftDMj4yUJJisqSUJp2hspAgpzUUBZkWqYpPxs9SA11T/tmCjcupTCc1ByFhw==} - - '@mintlify/previewing@4.0.216': - resolution: {integrity: sha512-SLYA9jjoyWSMMXxC83CqkHLSDaUssdy7EOnHy70N/1eHCxUGAhvSFIsxGYCgNkemVxoDSAZjEDXzTOYQSL+6Cg==} + '@mintlify/models@0.0.72': + resolution: {integrity: sha512-nwwC/PT2ieB7eDFzwB8p8j/rm35dmzvaLf2+1bZiuCmgi3xMcx39QY0HH83lgV98YgUzPs4EvBeAmpwdn4mkdQ==} engines: {node: '>=18.0.0'} - '@mintlify/scraping@3.0.167': - resolution: {integrity: sha512-yW8coPa7ZJsTJbMQOeYmBVXeqGK4/+ZU6r5tvUL85f1IfUjUzoa0zOGO2nHh6anMcpx9f2eagVcxsca1E+GEZQ==} + '@mintlify/openapi-parser@0.0.0': + resolution: {integrity: sha512-gUdgc5/Y2HsQ6avd3kr3SVQ8ONfUdctgOuVYmuv/dPWPOTizf+EL+azaoLS6ZNk7mBRsewVW1y1iGdjfzmTNiQ==} + engines: {node: '>=18'} + + '@mintlify/prebuild@1.0.241': + resolution: {integrity: sha512-32Tnyx8zfdHeHc1c3sgO5KFYBMP6ggPRn/6e7ug7hOX8wm1MoLs1Pn2+e2o2ghHV6ESK+aOwh3xjec3F/jlQIw==} + + '@mintlify/previewing@4.0.239': + resolution: {integrity: sha512-NhSpsKCYmhjefEt7vL++Gbpm77OXR4n5ktsJ7dvQCr1LGjMBsbvbdnNnGFzG5+FGhLIVc9MttVsQYOHLhhHbAw==} + engines: {node: '>=18.0.0'} + + '@mintlify/scraping@3.0.184': + resolution: {integrity: sha512-AYLXCEh3FULsBy2XTfRnom97oNhuWP3SljzMWw8vkOEdv8fk47g3wJRyitYhWXJOEQL0zGVQYbTWqS7wqMoF4w==} engines: {node: '>=18.0.0'} hasBin: true - '@mintlify/validation@0.1.189': - resolution: {integrity: sha512-KBoB35pMo9HTnR7BBeUrRWWVxOv5dR5ri/aMxaouOa7s5IJYAfEAnKEyYFN/NLBlLpWZ+ONU8GCuvy3igrzDPg==} + '@mintlify/scraping@3.0.92': + resolution: {integrity: sha512-cg8tSDahcIXpvGr8CBBAC836yJEWofdK8eRJu8rCoA7kTuRYEaYXFMV8RA4UDLY9bPQ4wiOkXvZzocIcEACskg==} + engines: {node: '>=18.0.0'} + hasBin: true + + '@mintlify/validation@0.1.129': + resolution: {integrity: sha512-xJ/G9rt0ryDwtRfcWuvkIeqHyfKdin/LEri/mRyS+caY/qACTWtRQBo/W99E++xPOq+ZRe/xppxmajXsTuU8Pg==} + + '@mintlify/validation@0.1.205': + resolution: {integrity: sha512-EF1M4j0GTc6Lls8oBfJA0fHbXJhlj3jqFNndTbO8BOXzIOQV56povOA6VNvnfKECpFZcWS6C8UicCz4VggvkpA==} '@octokit/auth-token@3.0.4': resolution: {integrity: sha512-TWFX7cZF2LXoCvdmJWY7XVPi74aSY0+FfBZNSXEXFkMpjcqsQwDSYVv5FhRFaI0V1ECnwbz4j59T/G+rXNWaIQ==} @@ -257,6 +279,16 @@ packages: '@octokit/types@9.3.2': resolution: {integrity: sha512-D4iHGTdAnEEVsB8fl95m1hiz7D5YiRdQ9b/OEb3BYRVwbLsGHcRVPz+u+BgRLNk0Q0/4iZCBqDN96j2XNxfXrA==} + '@puppeteer/browsers@0.5.0': + resolution: {integrity: sha512-Uw6oB7VvmPRLE4iKsjuOh8zgDabhNX67dzo8U/BB0f9527qx+4eeUs+korU98OhG5C4ubg7ufBgVi63XYwS6TQ==} + engines: {node: '>=14.1.0'} + hasBin: true + peerDependencies: + typescript: '>= 4.7.4' + peerDependenciesMeta: + typescript: + optional: true + '@puppeteer/browsers@2.3.0': resolution: {integrity: sha512-ioXoq9gPxkss4MYhD+SFaU9p1IHFUX0ILAWFPyjGaBdjLsYAlZw6j1iLA0N/m12uVHLFDfSYNF7EQccjinIMDA==} engines: {node: '>=18'} @@ -374,6 +406,10 @@ packages: resolution: {integrity: sha512-4B/qKCfeE/ODUaAUpSwfzazo5x29WD4r3vXiWsB7I2mSDAihwEqKO+g8GELZUQSSAo5e1XTYh3ZVfLyxBc12nA==} engines: {node: '>= 10.0.0'} + agent-base@6.0.2: + resolution: {integrity: sha512-RZNwNclF7+MS/8bDg70amg32dyeZGZxiDuQmZxKLAlQjr3jGyLx+4Kkk58UO7D2QdgFIQCovuSuZESne6RG6XQ==} + engines: {node: '>= 6.0.0'} + agent-base@7.1.1: resolution: {integrity: sha512-H0TSyFNDMomMNJQBn8wFV5YC/2eJ+VXECwOadZJT554xP6cODZHPX3H9QMQECxvrgiSOP1pHjy1sMWQVYJOUOA==} engines: {node: '>= 14'} @@ -390,6 +426,14 @@ packages: ajv: optional: true + ajv-formats@3.0.1: + resolution: {integrity: sha512-8iUql50EUR+uUcdRQ3HDqa6EVyo3docL8g5WJ3FNcWmu62IbkGUue/pEyLBW8VGKKucTPgqeks4fIU1DA4yowQ==} + peerDependencies: + ajv: ^8.0.0 + peerDependenciesMeta: + ajv: + optional: true + ajv@8.17.1: resolution: {integrity: sha512-B/gBuNg5SiMTrPkC+A2+cW0RszwxYmn6VYxB/inlBStS5nx6xHIt/ehKRhIMhqusl7a8LjQoZnjCs5vhwxOQ1g==} @@ -474,10 +518,17 @@ packages: before-after-hook@2.2.3: resolution: {integrity: sha512-NzUnlZexiaH/46WDhANlyR2bXRopNg4F/zuSA3OpZnllCUgRaOF2znDioDWrmbNVsuZk6l9pMquQB38cfBZwkQ==} + better-opn@3.0.2: + resolution: {integrity: sha512-aVNobHnJqLiUelTaHat9DZ1qM2w0C0Eym4LPI/3JxOnSokGVdsl1T1kN7TFvsEAD8G47A6VKQ0TVHqbBnYMJlQ==} + engines: {node: '>=12.0.0'} + binary-extensions@2.3.0: resolution: {integrity: sha512-Ceh+7ox5qe7LJuLHoY0feh3pHuUDHAcRUeyL2VYghZwfpkNIy/+8Ocg0a3UuSoYzavmylwuLWQOf3hl0jjMMIw==} engines: {node: '>=8'} + bl@4.1.0: + resolution: {integrity: sha512-1W07cM9gS6DcLperZfFSj+bWLtaPGSOHWhPiGzXmvVJbRLdG82sH/Kn8EtW1VqWVA54AKf2h5k5BbnIbwF3h6w==} + bl@5.1.0: resolution: {integrity: sha512-tv1ZJHLfTDnXE6tMHv73YgSJaWR2AFuPwMntBe7XL/GBFHnT0CLnsHMogfk5+GzCDC5ZWarSCYaIGATZt9dNsQ==} @@ -550,6 +601,10 @@ packages: cheerio-select@2.1.0: resolution: {integrity: sha512-9v9kG0LvzrlcungtnJtpGNxY+fzECQKhK4EGJX2vByejiMX84MFNQw4UxPJl3bFbTMw+Dfs37XaIkCwTZfLh4g==} + cheerio@0.22.0: + resolution: {integrity: sha512-8/MzidM6G/TgRelkzDG13y3Y9LxBjCb+8yOEZ9+wwq5gVF2w2pV0wmHvjfT0RvuxGyR7UEuK36r+yYMbT4uKgA==} + engines: {node: '>= 0.6'} + cheerio@1.0.0: resolution: {integrity: sha512-quS9HgjQpdaXOvsZz82Oz7uxtXiy6UIsIQcpBj7HRw2M63Skasm9qlDocAM7jNuaxdhpPU7c4kJN+gA5MCu4ww==} engines: {node: '>=18.17'} @@ -558,10 +613,18 @@ packages: resolution: {integrity: sha512-7VT13fmjotKpGipCW9JEQAusEPE+Ei8nl6/g4FBAmIm0GOOLMua9NDDo/DWp0ZAxCr3cPq5ZpBqmPAQgDda2Pw==} engines: {node: '>= 8.10.0'} + chownr@1.1.4: + resolution: {integrity: sha512-jJ0bqzaylmJtVnNgzTeSOs8DPavpbYgEr/b0YL8/2GO3xJEhInFmhKMUnEJQjZumK7KXGFhUy89PrsJWlakBVg==} + chownr@2.0.0: resolution: {integrity: sha512-bIomtDF5KGpdogkLd9VspvFzk9KfpyyGlS8YFVZl7TGPBHL5snIOnxeshwVgPteQ9b4Eydl+pVbIyE1DcvCWgQ==} engines: {node: '>=10'} + chromium-bidi@0.4.7: + resolution: {integrity: sha512-6+mJuFXwTMU6I3vYLs6IL8A1DyQTPjCfIL971X0aMPVGRbGnNfl6i6Cl0NMbxi2bRYLGESt9T2ZIMRM5PAEcIQ==} + peerDependencies: + devtools-protocol: '*' + chromium-bidi@0.6.3: resolution: {integrity: sha512-qXlsCmpCZJAnoTYI83Iu6EdYQpMYdVkCfq08KDh2pmlVqK5t5IA9mGs4/LwCwp4fqisSOMXZxP3HIh8w8aRn0A==} peerDependencies: @@ -641,6 +704,10 @@ packages: resolution: {integrity: sha512-KIHbLJqu73RGr/hnbrO9uBeixNGuvSQjul/jdFvS/KFSIH1hWVd1ng7zOHx+YrEfInLG7q4n6GHQ9cDtxv/P6g==} engines: {node: '>= 0.10'} + cosmiconfig@8.1.3: + resolution: {integrity: sha512-/UkO2JKI18b5jVMJUp0lvKFMpa/Gye+ZgZjKD+DGEN9y7NRcf/nK1A0sp67ONmKtnDCNMS44E6jrk0Yc3bDuUw==} + engines: {node: '>=14'} + cosmiconfig@9.0.0: resolution: {integrity: sha512-itvL5h8RETACmOTFc4UfIyB2RfEHi71Ax6E/PivVxq9NseKbOWpeyHEOIbmAw1rs8Ak0VursQNww7lf7YtUwzg==} engines: {node: '>=14'} @@ -650,9 +717,18 @@ packages: typescript: optional: true + cross-fetch@3.1.5: + resolution: {integrity: sha512-lvb1SBsI0Z7GDwmuid+mU3kWVBwTVUbe7S0H52yaaAdQOXq2YktTCZdlAcNKFzE6QtRz0snpw9bNiPeOIkkQvw==} + + css-select@1.2.0: + resolution: {integrity: sha512-dUQOBoqdR7QwV90WysXPLXG5LO7nhYBgiWVfxF80DKPF8zx1t/pUd2FYy73emg3zrjtM6dzmYgbHKfV2rxiHQA==} + css-select@5.1.0: resolution: {integrity: sha512-nwoRF1rvRRnnCqqY7updORDsuqKzqYJ28+oSMaJMMgOauh3fvwHqMS7EZpIPqK8GL+g9mKxF1vP/ZjSeNjEVHg==} + css-what@2.1.3: + resolution: {integrity: sha512-a+EPoD+uZiNfh+5fxw2nO9QwFa6nJe2Or35fGY6Ipw1R3R4AGz1d1TEZrCegvw2YTmZ0jXirGYlzxxpYSHwpEg==} + css-what@6.1.0: resolution: {integrity: sha512-HTUrgRJ7r4dsZKU6GjmpfRK1O76h97Z8MfS1G0FozR+oF2kG6Vfe8JE6zwrkbxigziPHinCJ+gCPjA9EaBDtRw==} engines: {node: '>= 6'} @@ -672,6 +748,15 @@ packages: supports-color: optional: true + debug@4.3.4: + resolution: {integrity: sha512-PRWFHuSU3eDtQJPvnNY7Jcket1j0t5OuOsFzPPzsekD52Zl8qUfFIPEiswXqIvHWGVHOgX+7G/vCNNhehwxfkQ==} + engines: {node: '>=6.0'} + peerDependencies: + supports-color: '*' + peerDependenciesMeta: + supports-color: + optional: true + debug@4.3.7: resolution: {integrity: sha512-Er2nc/H7RrMXZBFCEim6TCmMk02Z8vLC2Rbi1KEBggpo0fS6l0S1nnapwmIi3yW/+GOJap1Krg4w0Hg80oCqgQ==} engines: {node: '>=6.0'} @@ -738,6 +823,9 @@ packages: devlop@1.1.0: resolution: {integrity: sha512-RWmIqhcFf1lRYBvNmr7qTNuyCt/7/ns2jbpp1+PalgE/rDQcBT0fioSMUpJ93irlUhC5hrg4cYqe6U+0ImW0rA==} + devtools-protocol@0.0.1107588: + resolution: {integrity: sha512-yIR+pG9x65Xko7bErCUSQaDLrO/P1p3JUzEk7JCU4DowPcGHkTGUGQapcfcLc4qj0UaALwZ+cr0riFgiqpixcg==} + devtools-protocol@0.0.1312386: resolution: {integrity: sha512-DPnhUXvmvKT2dFA/j7B+riVLUt9Q6RKJlcppojL5CoRywJJKLDYnRlw0gTFKfgDPHP5E04UoB71SxoJlVZy8FA==} @@ -753,16 +841,31 @@ packages: resolution: {integrity: sha512-BDeBd8najI4/lS00HSKpdFia+OvUMytaVjfzR9n5Lq8MlZRSvtbI+uLtx1+XmQFls5wFU9dssccTmQQ6nfpjdg==} engines: {node: '>=6'} + dom-serializer@0.1.1: + resolution: {integrity: sha512-l0IU0pPzLWSHBcieZbpOKgkIn3ts3vAh7ZuFyXNwJxJXk/c4Gwj9xaTJwIDVQCXawWD0qb3IzMGH5rglQaO0XA==} + dom-serializer@2.0.0: resolution: {integrity: sha512-wIkAryiqt/nV5EQKqQpo3SToSOV9J0DnbJqwK7Wv/Trc92zIAYZ4FlMu+JPFW1DfGFt81ZTCGgDEabffXeLyJg==} + domelementtype@1.3.1: + resolution: {integrity: sha512-BSKB+TSpMpFI/HOxCNr1O8aMOTZ8hT3pM3GQ0w/mWRmkhEDSFJkkyzz4XQsBV44BChwGkrDfMyjVD0eA2aFV3w==} + domelementtype@2.3.0: resolution: {integrity: sha512-OLETBj6w0OsagBwdXnPdN0cnMfF9opN69co+7ZrbfPGrdpPVNBUj02spi6B1N7wChLQiPn4CSH/zJvXw56gmHw==} + domhandler@2.4.2: + resolution: {integrity: sha512-JiK04h0Ht5u/80fdLMCEmV4zkNh2BcoMFBmZ/91WtYZ8qVXSKjiw7fXMgFPnHcSZgOo3XdinHvmnDUeMf5R4wA==} + domhandler@5.0.3: resolution: {integrity: sha512-cgwlv/1iFQiFnU96XXgROh8xTeetsnJiDsTc7TYCLFd9+/WNkIqPTxiM/8pSd8VIrhXGTf1Ny1q1hquVqDJB5w==} engines: {node: '>= 4'} + domutils@1.5.1: + resolution: {integrity: sha512-gSu5Oi/I+3wDENBsOWBiRK1eoGxcywYSqg3rR960/+EfY0CF4EX1VPkgHOZ3WiS/Jg2DtliF6BhWcHlfpYUcGw==} + + domutils@1.7.0: + resolution: {integrity: sha512-Lgd2XcJ/NjEw+7tFvfKxOzCYKZsdct5lczQ2ZaQY8Djz7pfAD3Gbp8ySJWtreII/vDlMVmxwa6pHmdxIYgttDg==} + domutils@3.1.0: resolution: {integrity: sha512-H78uMmQtI2AhgDJjWeQmHwJJ2bLPD3GMmO7Zja/ZZh84wkm+4ut+IUnUdRa8uCGX88DiVx1j6FRe1XfxEgjEZA==} @@ -794,6 +897,9 @@ packages: resolution: {integrity: sha512-C5Pn8Wk+1vKBoHghJODM63yk8MvrO9EWZUfkAt5HAqIgPE4/8FF0PEGHXtEd40l223+cE5ABWuPzm38PHFXfMA==} engines: {node: '>=10.2.0'} + entities@1.1.2: + resolution: {integrity: sha512-f2LZMYl1Fzu7YSBKg+RoROelpOaNrcGmE9AZubeDfrCEia483oW4MI4VyFd5VNHIgQ/7qm1I0wUHK1eJnn2y2w==} + entities@4.5.0: resolution: {integrity: sha512-V0hjH4dGPh9Ao5p0MoRY6BVqtwCjhz6vI5LT8AJ55H+4g9/4vbHx1I54fS0XuclLhDHArPQCiMjDxjaL8fPxhw==} engines: {node: '>=0.12'} @@ -952,6 +1058,9 @@ packages: resolution: {integrity: sha512-zJ2mQYM18rEFOudeV4GShTGIQ7RbzA7ozbU9I/XBpm7kqgMywgmylMwXHxZJmkVoYkna9d2pVXVXPdYTP9ej8Q==} engines: {node: '>= 0.6'} + fs-constants@1.0.0: + resolution: {integrity: sha512-y6OAwoSIf7FyjMIv94u+b5rdheZEjzR63GTyZJm5qh4Bi+2YgwLCcI/fPFZkL5PSixOt6ZNKm+w+Hfp/Bciwow==} + fs-extra@11.2.0: resolution: {integrity: sha512-PmDi3uwK5nFuXh7XDTlVnS17xJS7vW36is2+w3xcv8SVxiB4NyATf4ctkVY5bkSjX0Y4nbvZCq1/EjtEyr9ktw==} engines: {node: '>=14.14'} @@ -1105,6 +1214,9 @@ packages: html-void-elements@2.0.1: resolution: {integrity: sha512-0quDb7s97CfemeJAnW9wC0hw78MtW7NU3hqtCD75g2vFlDLt36llsYD7uB7SUzojLMP24N5IatXf7ylGXiGG9A==} + htmlparser2@3.10.1: + resolution: {integrity: sha512-IgieNijUMbkDovyoKObU1DUhm1iwNYE/fuifEoEHfd1oZKZDaONBSkal7Y01shxsM49R4XaMdGez3WnF9UfiCQ==} + htmlparser2@9.1.0: resolution: {integrity: sha512-5zfg6mHUoaer/97TxnGpxmbR7zJtPwIYFMZ/H5ucTlPZhKvtum05yiPK3Mgai3a0DyVxv7qYqoweaEd2nrYQzQ==} @@ -1123,6 +1235,10 @@ packages: resolution: {integrity: sha512-V5nVw1PAOgfI3Lmeaj2Exmeg7fenjhRUgz1lPSezy1CuhPYbgQtbQj4jZfEAEMlaL+vupsvhjqCyjzob0yxsmQ==} engines: {node: '>=10.19.0'} + https-proxy-agent@5.0.1: + resolution: {integrity: sha512-dFcAjpTQFgoLMzC2VwU+C/CbS7uRL0lWmxDITmqm7C+7F0Odmj6s9l6alZc6AELXhrnggM2CeWSXHGOdX2YtwA==} + engines: {node: '>= 6'} + https-proxy-agent@7.0.5: resolution: {integrity: sha512-1e4Wqeblerz+tMKPIq2EMGiiWW1dIjZOksyHWSUm1rmuvw/how9hBHZ38lAGj5ID4Ik6EdkOw7NmWPy6LAwalw==} engines: {node: '>= 14'} @@ -1276,6 +1392,10 @@ packages: jsonfile@6.1.0: resolution: {integrity: sha512-5dgndWOriYSm5cnYaJNhalLNDKOqFwyDB/rr1E9ZsGciGvKPs8R2xYGCacuf3z6K1YKDz182fd+fY3cn3pMqXQ==} + jsonpointer@5.0.1: + resolution: {integrity: sha512-p/nXbhSEcu3pZRdkW1OfJhpsVtW1gd4Wa1fnQc9YLiTfAjn0312eMKimbdIQzuZl9aa9xUGaRlP9T/CJE/ditQ==} + engines: {node: '>=0.10.0'} + katex@0.16.11: resolution: {integrity: sha512-RQrI8rlHY92OLf3rho/Ts8i/XvjgguEjOkO1BEXcU3N8BqPpSzBNwV/G0Ukr+P/l3ivvJUE/Fa/CwbS6HesGNQ==} hasBin: true @@ -1294,9 +1414,49 @@ packages: lcm@0.0.3: resolution: {integrity: sha512-TB+ZjoillV6B26Vspf9l2L/vKaRY/4ep3hahcyVkCGFgsTNRUQdc24bQeNFiZeoxH0vr5+7SfNRMQuPHv/1IrQ==} + leven@4.0.0: + resolution: {integrity: sha512-puehA3YKku3osqPlNuzGDUHq8WpwXupUg1V6NXdV38G+gr+gkBwFC8g1b/+YcIvp8gnqVIus+eJCH/eGsRmJNw==} + engines: {node: ^12.20.0 || ^14.13.1 || >=16.0.0} + lines-and-columns@1.2.4: resolution: {integrity: sha512-7ylylesZQ/PV29jhEDl3Ufjo6ZX7gCqJr5F7PKrqc93v7fzSymt1BpwEU8nAUXs8qzzvqhbjhK5QZg6Mt/HkBg==} + lodash.assignin@4.2.0: + resolution: {integrity: sha512-yX/rx6d/UTVh7sSVWVSIMjfnz95evAgDFdb1ZozC35I9mSFCkmzptOzevxjgbQUsc78NR44LVHWjsoMQXy9FDg==} + + lodash.bind@4.2.1: + resolution: {integrity: sha512-lxdsn7xxlCymgLYo1gGvVrfHmkjDiyqVv62FAeF2i5ta72BipE1SLxw8hPEPLhD4/247Ijw07UQH7Hq/chT5LA==} + + lodash.defaults@4.2.0: + resolution: {integrity: sha512-qjxPLHd3r5DnsdGacqOMU6pb/avJzdh9tFX2ymgoZE27BmjXrNy/y4LoaiTeAb+O3gL8AfpJGtqfX/ae2leYYQ==} + + lodash.filter@4.6.0: + resolution: {integrity: sha512-pXYUy7PR8BCLwX5mgJ/aNtyOvuJTdZAo9EQFUvMIYugqmJxnrYaANvTbgndOzHSCSR0wnlBBfRXJL5SbWxo3FQ==} + + lodash.flatten@4.4.0: + resolution: {integrity: sha512-C5N2Z3DgnnKr0LOpv/hKCgKdb7ZZwafIrsesve6lmzvZIRZRGaZ/l6Q8+2W7NaT+ZwO3fFlSCzCzrDCFdJfZ4g==} + + lodash.foreach@4.5.0: + resolution: {integrity: sha512-aEXTF4d+m05rVOAUG3z4vZZ4xVexLKZGF0lIxuHZ1Hplpk/3B6Z1+/ICICYRLm7c41Z2xiejbkCkJoTlypoXhQ==} + + lodash.map@4.6.0: + resolution: {integrity: sha512-worNHGKLDetmcEYDvh2stPCrrQRkP20E4l0iIS7F8EvzMqBBi7ltvFN5m1HvTf1P7Jk1txKhvFcmYsCr8O2F1Q==} + + lodash.merge@4.6.2: + resolution: {integrity: sha512-0KpjqXRVvrYyCsX1swR/XTK0va6VQkQM6MNo7PqW77ByjAhoARA8EfrP1N4+KlKj8YS0ZUCtRT/YUuhyYDujIQ==} + + lodash.pick@4.4.0: + resolution: {integrity: sha512-hXt6Ul/5yWjfklSGvLQl8vM//l3FtyHZeuelpzK6mm99pNvN9yTDruNZPEJZD1oWrqo+izBmB7oUfWgcCX7s4Q==} + + lodash.reduce@4.6.0: + resolution: {integrity: sha512-6raRe2vxCYBhpBu+B+TtNGUzah+hQjVdu3E17wfusjyrXBka2nBS8OH/gjVZ5PvHOhWmIZTYri09Z6n/QfnNMw==} + + lodash.reject@4.6.0: + resolution: {integrity: sha512-qkTuvgEzYdyhiJBx42YPzPo71R1aEr0z79kAv7Ixg8wPFEjgRgJdUsGMG3Hf3OYSF/kHI79XhNlt+5Ar6OzwxQ==} + + lodash.some@4.6.0: + resolution: {integrity: sha512-j7MJE+TuT51q9ggt4fSgVqro163BEFjAt3u97IqU+JA2DkWl80nFTrowzLpZ/BnpN7rrl0JA/593NAdd8p/scQ==} + lodash@4.17.21: resolution: {integrity: sha512-v2kDEe57lecTulaDIuNTPy3Ry4gLGJ6Z1O3vE1krgXZNrsQ+LFTGHVxVjcXPs17LhbZVGedAJv8XZ1tvj5FvSg==} @@ -1546,14 +1706,20 @@ packages: resolution: {integrity: sha512-bAxsR8BVfj60DWXHE3u30oHzfl4G7khkSuPW+qvpd7jFRHm7dLxOjUk1EHACJ/hxLY8phGJ0YhYHZo7jil7Qdg==} engines: {node: '>= 8'} - mintlify@4.0.222: - resolution: {integrity: sha512-oZEUObPCOl/PrGxm6ioDXTRWWCaSnoQt20fnVPAe+m4QDggl17CZ1EgtUsqX4u078uOU99FwpVMzFNNwV3DUAA==} + mintlify@4.0.245: + resolution: {integrity: sha512-LbkT4OB0zhBgPXAREmAW6g+I1oGiCKgDZa7m271VoyGCRvWT2Ckhu/1AyJUuySzfqqCkWOKIVb2k7AF9LoHt9w==} engines: {node: '>=18.0.0'} hasBin: true + mitt@3.0.0: + resolution: {integrity: sha512-7dX2/10ITVyqh4aOSVI9gdape+t9l2/8QxHrFmUXu4EEUpdlxl6RudZUPZoc+zuY2hk1j7XxVroIVIan/pD/SQ==} + mitt@3.0.1: resolution: {integrity: sha512-vKivATfr97l2/QBCYAkXYDbrIWPM2IIKEl7YPhjCvKlG3kE2gm+uBo6nEXK3M5/Ffh/FLpKExzOQ3JJoJGFKBw==} + mkdirp-classic@0.5.3: + resolution: {integrity: sha512-gKLcREMhtuZRwRAfqP3RFW+TK4JqApVBtOIftVgjuABpAtpxhPGaDcfvbhNvD0B8iD1oUr/txX35NjcaY6Ns/A==} + mkdirp@1.0.4: resolution: {integrity: sha512-vVqVZQyf3WLx2Shd0qJ9xuvqgAyKPLAiqITEtqW0oIUjzo3PePDd6fW9iFz30ef7Ysp/oiWqbhszeGWW2T6Gzw==} engines: {node: '>=10'} @@ -1566,6 +1732,9 @@ packages: ms@2.0.0: resolution: {integrity: sha512-Tpp60P6IUJDTuOq/5Z8cdskzJujfwqfOTkrwIwj7IRISpnkJnT6SyJ4PCPnGMoFjC9ddhal5KVIYtAt97ix05A==} + ms@2.1.2: + resolution: {integrity: sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==} + ms@2.1.3: resolution: {integrity: sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA==} @@ -1587,6 +1756,15 @@ packages: nlcst-to-string@3.1.1: resolution: {integrity: sha512-63mVyqaqt0cmn2VcI2aH6kxe1rLAmSROqHMA0i4qqg1tidkfExgpb0FGMikMCn86mw5dFtBtEANfmSSK7TjNHw==} + node-fetch@2.6.7: + resolution: {integrity: sha512-ZjMPFEfVx5j+y2yF35Kzx5sF7kDzxuDj6ziH4FFbOp87zKDZNx8yExJIb05OGF4Nlt9IHFIMBkRl41VdvcNdbQ==} + engines: {node: 4.x || >=6.0.0} + peerDependencies: + encoding: ^0.1.0 + peerDependenciesMeta: + encoding: + optional: true + node-fetch@2.7.0: resolution: {integrity: sha512-c4FRfUm/dbcWZ7U+1Wq0AwCyFL+3nt2bEw05wfxSz+DWpWsitgmSgYmy2dQdWyKC1694ELPqMs/YzUSNozLt8A==} engines: {node: 4.x || >=6.0.0} @@ -1611,6 +1789,9 @@ packages: resolution: {integrity: sha512-IO9QvjUMWxPQQhs60oOu10CRkWCiZzSUkzbXGGV9pviYl1fXYcvkzQ5jV9z8Y6un8ARoVRl4EtC6v6jNqbaJ/w==} engines: {node: '>=14.16'} + nth-check@1.0.2: + resolution: {integrity: sha512-WeBOdju8SnzPN5vTUJYxYUxLeXpCaVP5i5e0LF8fg7WORF2Wd7wFX/pk0tYZk7s8T+J7VLy0Da6J1+wCT0AtHg==} + nth-check@2.1.1: resolution: {integrity: sha512-lqjrjmaOoAnWfMmBPL+XNnynZh2+swxiX3WUE0s4yEHI6m+AwrK2UZOimIRl3X/4QctVqS8AiZjFqyOGrMXb/w==} @@ -1701,6 +1882,10 @@ packages: path-to-regexp@0.1.10: resolution: {integrity: sha512-7lf7qcQidTku0Gu3YDPc8DJ1q7OOucfa/BSsIwjuh56VU7katFvuM8hULfkwB3Fns/rsVF7PwPKVw1sl5KQS9w==} + path-type@4.0.0: + resolution: {integrity: sha512-gDKb8aZMDeD/tZWs9P6+q0J9Mwkdl6xMV8TjnGP3qJVJ06bdMgkbBlLU8IdfOsIsFz2BW1rNVT3XuNEl8zPAvw==} + engines: {node: '>=8'} + pend@1.2.0: resolution: {integrity: sha512-F3asv42UuXchdzt+xXqfW1OGlVBe+mxa2mqI0pg5yAHZPvFmY3Y6drSf/GQ1A86WgWEN9Kzh/WrgKa6iGcHXLg==} @@ -1739,10 +1924,23 @@ packages: pump@3.0.2: resolution: {integrity: sha512-tUPXtzlGM8FE3P0ZL6DVs/3P58k9nk8/jZeQCurTJylQA8qFYzHFfhBJkuqyE0FifOsQ0uKWekiZ5g8wtr28cw==} + puppeteer-core@19.11.1: + resolution: {integrity: sha512-qcuC2Uf0Fwdj9wNtaTZ2OvYRraXpAK+puwwVW8ofOhOgLPZyz1c68tsorfIZyCUOpyBisjr+xByu7BMbEYMepA==} + engines: {node: '>=14.14.0'} + peerDependencies: + typescript: '>= 4.7.4' + peerDependenciesMeta: + typescript: + optional: true + puppeteer-core@22.15.0: resolution: {integrity: sha512-cHArnywCiAAVXa3t4GGL2vttNxh7GqXtIYGym99egkNJ3oG//wL9LkvO4WE8W1TJe95t1F1ocu9X4xWaGsOKOA==} engines: {node: '>=18'} + puppeteer@19.11.1: + resolution: {integrity: sha512-39olGaX2djYUdhaQQHDZ0T0GwEp+5f9UB9HmEP0qHfdQHIq0xGQZuAZ5TLnJIc/88SrPLpEflPC+xUqOTv3c5g==} + deprecated: < 22.8.2 is no longer supported + puppeteer@22.15.0: resolution: {integrity: sha512-XjCY1SiSEi1T7iSYuxS82ft85kwDJUS7wj1Z0eGVXKdtr5g4xnVcbjwxhq5xBnpK/E7x1VZZoJDxpjAOasHT4Q==} engines: {node: '>=18'} @@ -1987,9 +2185,16 @@ packages: resolution: {integrity: sha512-QjVjwdXIt408MIiAqCX4oUKsgU2EqAGzs2Ppkm4aQYbjm+ZEWEcW4SfFNTr4uMNZma0ey4f5lgLrkB0aX0QMow==} engines: {node: '>=4'} + tar-fs@2.1.1: + resolution: {integrity: sha512-V0r2Y9scmbDRLCNex/+hYzvp/zyYjvFbHPNgVTKfQvVrb6guiE/fxP+XblDNR011utopbkex2nM4dHNV6GDsng==} + tar-fs@3.0.6: resolution: {integrity: sha512-iokBDQQkUyeXhgPYaZxmczGPhnhXZ0CmrqI+MOb/WFGS9DW5wnfrLgtjUJBvz50vQ3qfRwJ62QVoCFu8mPVu5w==} + tar-stream@2.2.0: + resolution: {integrity: sha512-ujeqbceABgwMZxEJnk2HDY2DlnUZ+9oEcb1KzTVfYHio0UE6dG71n60d8D2I4qNvleWrrXpmjpt7vZeF1LnMZQ==} + engines: {node: '>=6'} + tar-stream@3.1.7: resolution: {integrity: sha512-qJj60CXt7IU1Ffyc3NJMjh6EkuCFej46zUqJ4J7pqYlThyd9bO0XBTmcOIhSzZJVWfsLks0+nle/j538YAW9RQ==} @@ -2184,6 +2389,18 @@ packages: wrappy@1.0.2: resolution: {integrity: sha512-l4Sp/DRseor9wL6EvV2+TuQn63dMkPjZ/sp9XkghTEbV9KlPS1xUsZ3u7/IQO4wxtcFB4bgpQPRcR3QCvezPcQ==} + ws@8.13.0: + resolution: {integrity: sha512-x9vcZYTrFPC7aSIbj7sRCYo7L/Xb8Iy+pW0ng0wt2vCJv7M9HOMy0UoN3rr+IFC7hb7vXoqS+P9ktyLLLhO+LA==} + engines: {node: '>=10.0.0'} + peerDependencies: + bufferutil: ^4.0.1 + utf-8-validate: '>=5.0.2' + peerDependenciesMeta: + bufferutil: + optional: true + utf-8-validate: + optional: true + ws@8.17.1: resolution: {integrity: sha512-6XQFvXTkbfUOZOKKILFG1PDK2NDQs4azKQl26T0YS5CxqWLgXajbPZ+h4gZekJyRqFU8pvnbAbbs/3TgRPy+GQ==} engines: {node: '>=10.0.0'} @@ -2223,10 +2440,19 @@ packages: yallist@4.0.0: resolution: {integrity: sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A==} + yaml@2.6.0: + resolution: {integrity: sha512-a6ae//JvKDEra2kdi1qzCyrJW/WZCgFi8ydDV+eXExl95t+5R+ijnqHJbz9tmMh8FUjx3iv2fCQ4dclAQlO2UQ==} + engines: {node: '>= 14'} + hasBin: true + yargs-parser@21.1.1: resolution: {integrity: sha512-tVpsJW7DdjecAiFpbIB1e3qxIQsE6NoPc5/eTdrbbIC4h0LVsWhnoa3g+m2HclBIujHzsxZ4VJVA+GUuc2/LBw==} engines: {node: '>=12'} + yargs@17.7.1: + resolution: {integrity: sha512-cwiTb08Xuv5fqF4AovYacTFNxk62th7LKJ6BL9IGUpTJrWoU7/7WdQGTP2SjKf1dUNBGzDd28p/Yfs/GI6JrLw==} + engines: {node: '>=12'} + yargs@17.7.2: resolution: {integrity: sha512-7dSzzRQ++CKnNI/krKnYRV7JKKPUXMEh61soaHKg9mrWEhzFWhFnxPxGl+69cD1Ou63C13NUPCnmIcrvqCuM6w==} engines: {node: '>=12'} @@ -2394,14 +2620,13 @@ snapshots: '@types/react': 18.3.5 react: 18.3.1 - '@mintlify/cli@4.0.222(openapi-types@12.1.3)(react-dom@18.3.1(react@18.3.1))(react@18.3.1)': + '@mintlify/cli@4.0.245(react-dom@18.3.1(react@18.3.1))(react@18.3.1)': dependencies: - '@apidevtools/swagger-parser': 10.1.0(openapi-types@12.1.3) - '@mintlify/link-rot': 3.0.224(react-dom@18.3.1(react@18.3.1))(react@18.3.1) - '@mintlify/models': 0.0.123 - '@mintlify/prebuild': 1.0.223(react-dom@18.3.1(react@18.3.1))(react@18.3.1) - '@mintlify/previewing': 4.0.216(react-dom@18.3.1(react@18.3.1))(react@18.3.1) - '@mintlify/validation': 0.1.189 + '@mintlify/link-rot': 3.0.242(react-dom@18.3.1(react@18.3.1))(react@18.3.1) + '@mintlify/models': 0.0.136 + '@mintlify/prebuild': 1.0.241(react-dom@18.3.1(react@18.3.1))(react@18.3.1) + '@mintlify/previewing': 4.0.239(react-dom@18.3.1(react@18.3.1))(react@18.3.1) + '@mintlify/validation': 0.1.205 chalk: 5.3.0 detect-port: 1.6.1 fs-extra: 11.2.0 @@ -2413,19 +2638,18 @@ snapshots: - bufferutil - debug - encoding - - openapi-types - react - react-dom - supports-color - typescript - utf-8-validate - '@mintlify/common@1.0.144(react-dom@18.3.1(react@18.3.1))(react@18.3.1)': + '@mintlify/common@1.0.161(react-dom@18.3.1(react@18.3.1))(react@18.3.1)': dependencies: - '@apidevtools/swagger-parser': 10.1.0(openapi-types@12.1.3) '@mintlify/mdx': 0.0.46(react-dom@18.3.1(react@18.3.1))(react@18.3.1) - '@mintlify/models': 0.0.123 - '@mintlify/validation': 0.1.189 + '@mintlify/models': 0.0.136 + '@mintlify/openapi-parser': 0.0.0 + '@mintlify/validation': 0.1.205 '@sindresorhus/slugify': 2.2.1 acorn: 8.12.1 acorn-jsx: 5.3.2(acorn@8.12.1) @@ -2467,11 +2691,57 @@ snapshots: - react-dom - supports-color - '@mintlify/link-rot@3.0.224(react-dom@18.3.1(react@18.3.1))(react@18.3.1)': + '@mintlify/common@1.0.76(react-dom@18.3.1(react@18.3.1))(react@18.3.1)': dependencies: '@apidevtools/swagger-parser': 10.1.0(openapi-types@12.1.3) - '@mintlify/common': 1.0.144(react-dom@18.3.1(react@18.3.1))(react@18.3.1) - '@mintlify/prebuild': 1.0.223(react-dom@18.3.1(react@18.3.1))(react@18.3.1) + '@mintlify/mdx': 0.0.44(react-dom@18.3.1(react@18.3.1))(react@18.3.1) + '@mintlify/models': 0.0.72 + '@mintlify/validation': 0.1.129 + '@sindresorhus/slugify': 2.2.1 + acorn: 8.12.1 + acorn-jsx: 5.3.2(acorn@8.12.1) + esast-util-from-js: 2.0.1 + estree-util-to-js: 2.0.0 + estree-walker: 3.0.3 + gray-matter: 4.0.3 + hast-util-from-html: 1.0.2 + hast-util-from-html-isomorphic: 2.0.0 + hast-util-to-html: 8.0.4 + hast-util-to-text: 4.0.2 + is-absolute-url: 4.0.1 + lodash: 4.17.21 + mdast: 3.0.0 + mdast-util-from-markdown: 1.3.1 + mdast-util-gfm: 2.0.2 + mdast-util-mdx: 2.0.1 + mdast-util-mdx-jsx: 2.1.4 + mdast-util-mdxjs-esm: 1.3.1 + micromark-extension-mdx-jsx: 1.0.5 + micromark-extension-mdxjs: 1.0.1 + micromark-extension-mdxjs-esm: 1.0.5 + openapi-types: 12.1.3 + remark: 14.0.3 + remark-frontmatter: 4.0.1 + remark-gfm: 3.0.1 + remark-math: 5.1.1 + remark-mdx: 2.3.0 + unist-builder: 3.0.1 + unist-util-map: 3.1.3 + unist-util-remove: 3.1.1 + unist-util-remove-position: 4.0.2 + unist-util-visit: 4.1.2 + unist-util-visit-parents: 5.1.3 + vfile: 5.3.7 + transitivePeerDependencies: + - debug + - react + - react-dom + - supports-color + + '@mintlify/link-rot@3.0.242(react-dom@18.3.1(react@18.3.1))(react@18.3.1)': + dependencies: + '@mintlify/common': 1.0.161(react-dom@18.3.1(react@18.3.1))(react@18.3.1) + '@mintlify/prebuild': 1.0.241(react-dom@18.3.1(react@18.3.1))(react@18.3.1) chalk: 5.3.0 fs-extra: 11.2.0 gray-matter: 4.0.3 @@ -2487,6 +2757,21 @@ snapshots: - typescript - utf-8-validate + '@mintlify/mdx@0.0.44(react-dom@18.3.1(react@18.3.1))(react@18.3.1)': + dependencies: + hast-util-to-string: 2.0.0 + next-mdx-remote: 4.4.1(react-dom@18.3.1(react@18.3.1))(react@18.3.1) + refractor: 4.8.1 + rehype-katex: 6.0.3 + remark-gfm: 3.0.1 + remark-math: 5.1.1 + remark-smartypants: 2.1.0 + unist-util-visit: 4.1.2 + transitivePeerDependencies: + - react + - react-dom + - supports-color + '@mintlify/mdx@0.0.46(react-dom@18.3.1(react@18.3.1))(react@18.3.1)': dependencies: hast-util-to-string: 2.0.0 @@ -2502,19 +2787,35 @@ snapshots: - react-dom - supports-color - '@mintlify/models@0.0.123': + '@mintlify/models@0.0.136': dependencies: axios: 1.7.7 openapi-types: 12.1.3 transitivePeerDependencies: - debug - '@mintlify/prebuild@1.0.223(react-dom@18.3.1(react@18.3.1))(react@18.3.1)': + '@mintlify/models@0.0.72': dependencies: - '@apidevtools/swagger-parser': 10.1.0(openapi-types@12.1.3) - '@mintlify/common': 1.0.144(react-dom@18.3.1(react@18.3.1))(react@18.3.1) - '@mintlify/scraping': 3.0.167(openapi-types@12.1.3)(react-dom@18.3.1(react@18.3.1))(react@18.3.1) - '@mintlify/validation': 0.1.189 + axios: 1.7.7 + openapi-types: 12.1.3 + transitivePeerDependencies: + - debug + + '@mintlify/openapi-parser@0.0.0': + dependencies: + ajv: 8.17.1 + ajv-draft-04: 1.0.0(ajv@8.17.1) + ajv-formats: 3.0.1(ajv@8.17.1) + jsonpointer: 5.0.1 + leven: 4.0.0 + yaml: 2.6.0 + + '@mintlify/prebuild@1.0.241(react-dom@18.3.1(react@18.3.1))(react@18.3.1)': + dependencies: + '@mintlify/common': 1.0.161(react-dom@18.3.1(react@18.3.1))(react@18.3.1) + '@mintlify/openapi-parser': 0.0.0 + '@mintlify/scraping': 3.0.184(react-dom@18.3.1(react@18.3.1))(react@18.3.1) + '@mintlify/validation': 0.1.205 axios: 1.7.7 chalk: 5.3.0 favicons: 7.2.0 @@ -2533,13 +2834,13 @@ snapshots: - typescript - utf-8-validate - '@mintlify/previewing@4.0.216(react-dom@18.3.1(react@18.3.1))(react@18.3.1)': + '@mintlify/previewing@4.0.239(react-dom@18.3.1(react@18.3.1))(react@18.3.1)': dependencies: - '@apidevtools/swagger-parser': 10.1.0(openapi-types@12.1.3) - '@mintlify/common': 1.0.144(react-dom@18.3.1(react@18.3.1))(react@18.3.1) - '@mintlify/prebuild': 1.0.223(react-dom@18.3.1(react@18.3.1))(react@18.3.1) - '@mintlify/validation': 0.1.189 + '@mintlify/common': 1.0.161(react-dom@18.3.1(react@18.3.1))(react@18.3.1) + '@mintlify/prebuild': 1.0.241(react-dom@18.3.1(react@18.3.1))(react@18.3.1) + '@mintlify/validation': 0.1.205 '@octokit/rest': 19.0.13 + better-opn: 3.0.2 chalk: 5.3.0 chokidar: 3.6.0 express: 4.21.0 @@ -2548,7 +2849,6 @@ snapshots: gray-matter: 4.0.3 is-absolute-url: 4.0.1 is-online: 10.0.0 - open: 8.4.2 openapi-types: 12.1.3 ora: 6.3.1 socket.io: 4.7.5 @@ -2565,10 +2865,10 @@ snapshots: - typescript - utf-8-validate - '@mintlify/scraping@3.0.167(openapi-types@12.1.3)(react-dom@18.3.1(react@18.3.1))(react@18.3.1)': + '@mintlify/scraping@3.0.184(react-dom@18.3.1(react@18.3.1))(react@18.3.1)': dependencies: - '@apidevtools/swagger-parser': 10.1.0(openapi-types@12.1.3) - '@mintlify/common': 1.0.144(react-dom@18.3.1(react@18.3.1))(react@18.3.1) + '@mintlify/common': 1.0.161(react-dom@18.3.1(react@18.3.1))(react@18.3.1) + '@mintlify/openapi-parser': 0.0.0 axios: 1.7.7 cheerio: 1.0.0 fs-extra: 11.2.0 @@ -2579,6 +2879,27 @@ snapshots: transitivePeerDependencies: - bufferutil - debug + - react + - react-dom + - supports-color + - typescript + - utf-8-validate + + '@mintlify/scraping@3.0.92(openapi-types@12.1.3)(react-dom@18.3.1(react@18.3.1))(react@18.3.1)': + dependencies: + '@apidevtools/swagger-parser': 10.1.0(openapi-types@12.1.3) + '@mintlify/common': 1.0.76(react-dom@18.3.1(react@18.3.1))(react@18.3.1) + axios: 1.7.7 + cheerio: 0.22.0 + fs-extra: 11.2.0 + node-html-markdown: 1.3.0 + ora: 6.3.1 + puppeteer: 19.11.1 + yargs: 17.7.2 + transitivePeerDependencies: + - bufferutil + - debug + - encoding - openapi-types - react - react-dom @@ -2586,9 +2907,20 @@ snapshots: - typescript - utf-8-validate - '@mintlify/validation@0.1.189': + '@mintlify/validation@0.1.129': dependencies: - '@mintlify/models': 0.0.123 + '@mintlify/models': 0.0.72 + lcm: 0.0.3 + lodash: 4.17.21 + openapi-types: 12.1.3 + zod: 3.23.8 + zod-to-json-schema: 3.23.3(zod@3.23.8) + transitivePeerDependencies: + - debug + + '@mintlify/validation@0.1.205': + dependencies: + '@mintlify/models': 0.0.136 lcm: 0.0.3 lodash: 4.17.21 openapi-types: 12.1.3 @@ -2678,6 +3010,19 @@ snapshots: dependencies: '@octokit/openapi-types': 18.1.1 + '@puppeteer/browsers@0.5.0': + dependencies: + debug: 4.3.4 + extract-zip: 2.0.1 + https-proxy-agent: 5.0.1 + progress: 2.0.3 + proxy-from-env: 1.1.0 + tar-fs: 2.1.1 + unbzip2-stream: 1.4.3 + yargs: 17.7.1 + transitivePeerDependencies: + - supports-color + '@puppeteer/browsers@2.3.0': dependencies: debug: 4.3.7 @@ -2795,6 +3140,12 @@ snapshots: address@1.2.2: {} + agent-base@6.0.2: + dependencies: + debug: 4.3.7 + transitivePeerDependencies: + - supports-color + agent-base@7.1.1: dependencies: debug: 4.3.7 @@ -2810,6 +3161,10 @@ snapshots: optionalDependencies: ajv: 8.17.1 + ajv-formats@3.0.1(ajv@8.17.1): + optionalDependencies: + ajv: 8.17.1 + ajv@8.17.1: dependencies: fast-deep-equal: 3.1.3 @@ -2896,8 +3251,18 @@ snapshots: before-after-hook@2.2.3: {} + better-opn@3.0.2: + dependencies: + open: 8.4.2 + binary-extensions@2.3.0: {} + bl@4.1.0: + dependencies: + buffer: 5.7.1 + inherits: 2.0.4 + readable-stream: 3.6.2 + bl@5.1.0: dependencies: buffer: 6.0.3 @@ -2992,6 +3357,25 @@ snapshots: domhandler: 5.0.3 domutils: 3.1.0 + cheerio@0.22.0: + dependencies: + css-select: 1.2.0 + dom-serializer: 0.1.1 + entities: 1.1.2 + htmlparser2: 3.10.1 + lodash.assignin: 4.2.0 + lodash.bind: 4.2.1 + lodash.defaults: 4.2.0 + lodash.filter: 4.6.0 + lodash.flatten: 4.4.0 + lodash.foreach: 4.5.0 + lodash.map: 4.6.0 + lodash.merge: 4.6.2 + lodash.pick: 4.4.0 + lodash.reduce: 4.6.0 + lodash.reject: 4.6.0 + lodash.some: 4.6.0 + cheerio@1.0.0: dependencies: cheerio-select: 2.1.0 @@ -3018,8 +3402,15 @@ snapshots: optionalDependencies: fsevents: 2.3.3 + chownr@1.1.4: {} + chownr@2.0.0: {} + chromium-bidi@0.4.7(devtools-protocol@0.0.1107588): + dependencies: + devtools-protocol: 0.0.1107588 + mitt: 3.0.0 + chromium-bidi@0.6.3(devtools-protocol@0.0.1312386): dependencies: devtools-protocol: 0.0.1312386 @@ -3092,6 +3483,13 @@ snapshots: object-assign: 4.1.1 vary: 1.1.2 + cosmiconfig@8.1.3: + dependencies: + import-fresh: 3.3.0 + js-yaml: 4.1.0 + parse-json: 5.2.0 + path-type: 4.0.0 + cosmiconfig@9.0.0: dependencies: env-paths: 2.2.1 @@ -3099,6 +3497,19 @@ snapshots: js-yaml: 4.1.0 parse-json: 5.2.0 + cross-fetch@3.1.5: + dependencies: + node-fetch: 2.6.7 + transitivePeerDependencies: + - encoding + + css-select@1.2.0: + dependencies: + boolbase: 1.0.0 + css-what: 2.1.3 + domutils: 1.5.1 + nth-check: 1.0.2 + css-select@5.1.0: dependencies: boolbase: 1.0.0 @@ -3107,6 +3518,8 @@ snapshots: domutils: 3.1.0 nth-check: 2.1.1 + css-what@2.1.3: {} + css-what@6.1.0: {} csstype@3.1.3: {} @@ -3117,6 +3530,10 @@ snapshots: dependencies: ms: 2.0.0 + debug@4.3.4: + dependencies: + ms: 2.1.2 + debug@4.3.7: dependencies: ms: 2.1.3 @@ -3172,6 +3589,8 @@ snapshots: dependencies: dequal: 2.0.3 + devtools-protocol@0.0.1107588: {} + devtools-protocol@0.0.1312386: {} diff@5.2.0: {} @@ -3184,18 +3603,39 @@ snapshots: dependencies: dns-packet: 5.6.1 + dom-serializer@0.1.1: + dependencies: + domelementtype: 1.3.1 + entities: 1.1.2 + dom-serializer@2.0.0: dependencies: domelementtype: 2.3.0 domhandler: 5.0.3 entities: 4.5.0 + domelementtype@1.3.1: {} + domelementtype@2.3.0: {} + domhandler@2.4.2: + dependencies: + domelementtype: 1.3.1 + domhandler@5.0.3: dependencies: domelementtype: 2.3.0 + domutils@1.5.1: + dependencies: + dom-serializer: 0.1.1 + domelementtype: 1.3.1 + + domutils@1.7.0: + dependencies: + dom-serializer: 0.1.1 + domelementtype: 1.3.1 + domutils@3.1.0: dependencies: dom-serializer: 2.0.0 @@ -3238,6 +3678,8 @@ snapshots: - supports-color - utf-8-validate + entities@1.1.2: {} + entities@4.5.0: {} env-paths@2.2.1: {} @@ -3432,6 +3874,8 @@ snapshots: fresh@0.5.2: {} + fs-constants@1.0.0: {} + fs-extra@11.2.0: dependencies: graceful-fs: 4.2.11 @@ -3710,6 +4154,15 @@ snapshots: html-void-elements@2.0.1: {} + htmlparser2@3.10.1: + dependencies: + domelementtype: 1.3.1 + domhandler: 2.4.2 + domutils: 1.7.0 + entities: 1.1.2 + inherits: 2.0.4 + readable-stream: 3.6.2 + htmlparser2@9.1.0: dependencies: domelementtype: 2.3.0 @@ -3739,6 +4192,13 @@ snapshots: quick-lru: 5.1.1 resolve-alpn: 1.2.1 + https-proxy-agent@5.0.1: + dependencies: + agent-base: 6.0.2 + debug: 4.3.7 + transitivePeerDependencies: + - supports-color + https-proxy-agent@7.0.5: dependencies: agent-base: 7.1.1 @@ -3865,6 +4325,8 @@ snapshots: optionalDependencies: graceful-fs: 4.2.11 + jsonpointer@5.0.1: {} + katex@0.16.11: dependencies: commander: 8.3.0 @@ -3881,8 +4343,34 @@ snapshots: dependencies: gcd: 0.0.1 + leven@4.0.0: {} + lines-and-columns@1.2.4: {} + lodash.assignin@4.2.0: {} + + lodash.bind@4.2.1: {} + + lodash.defaults@4.2.0: {} + + lodash.filter@4.6.0: {} + + lodash.flatten@4.4.0: {} + + lodash.foreach@4.5.0: {} + + lodash.map@4.6.0: {} + + lodash.merge@4.6.2: {} + + lodash.pick@4.4.0: {} + + lodash.reduce@4.6.0: {} + + lodash.reject@4.6.0: {} + + lodash.some@4.6.0: {} + lodash@4.17.21: {} log-symbols@5.1.0: @@ -4382,28 +4870,33 @@ snapshots: minipass: 3.3.6 yallist: 4.0.0 - mintlify@4.0.222(openapi-types@12.1.3)(react-dom@18.3.1(react@18.3.1))(react@18.3.1): + mintlify@4.0.245(react-dom@18.3.1(react@18.3.1))(react@18.3.1): dependencies: - '@mintlify/cli': 4.0.222(openapi-types@12.1.3)(react-dom@18.3.1(react@18.3.1))(react@18.3.1) + '@mintlify/cli': 4.0.245(react-dom@18.3.1(react@18.3.1))(react@18.3.1) transitivePeerDependencies: - bufferutil - debug - encoding - - openapi-types - react - react-dom - supports-color - typescript - utf-8-validate + mitt@3.0.0: {} + mitt@3.0.1: {} + mkdirp-classic@0.5.3: {} + mkdirp@1.0.4: {} mri@1.2.0: {} ms@2.0.0: {} + ms@2.1.2: {} + ms@2.1.3: {} negotiator@0.6.3: {} @@ -4425,6 +4918,10 @@ snapshots: dependencies: '@types/nlcst': 1.0.4 + node-fetch@2.6.7: + dependencies: + whatwg-url: 5.0.0 + node-fetch@2.7.0: dependencies: whatwg-url: 5.0.0 @@ -4442,6 +4939,10 @@ snapshots: normalize-url@8.0.1: {} + nth-check@1.0.2: + dependencies: + boolbase: 1.0.0 + nth-check@2.1.1: dependencies: boolbase: 1.0.0 @@ -4561,6 +5062,8 @@ snapshots: path-to-regexp@0.1.10: {} + path-type@4.0.0: {} + pend@1.2.0: {} periscopic@3.1.0: @@ -4608,6 +5111,25 @@ snapshots: end-of-stream: 1.4.4 once: 1.4.0 + puppeteer-core@19.11.1: + dependencies: + '@puppeteer/browsers': 0.5.0 + chromium-bidi: 0.4.7(devtools-protocol@0.0.1107588) + cross-fetch: 3.1.5 + debug: 4.3.4 + devtools-protocol: 0.0.1107588 + extract-zip: 2.0.1 + https-proxy-agent: 5.0.1 + proxy-from-env: 1.1.0 + tar-fs: 2.1.1 + unbzip2-stream: 1.4.3 + ws: 8.13.0 + transitivePeerDependencies: + - bufferutil + - encoding + - supports-color + - utf-8-validate + puppeteer-core@22.15.0: dependencies: '@puppeteer/browsers': 2.3.0 @@ -4620,6 +5142,21 @@ snapshots: - supports-color - utf-8-validate + puppeteer@19.11.1: + dependencies: + '@puppeteer/browsers': 0.5.0 + cosmiconfig: 8.1.3 + https-proxy-agent: 5.0.1 + progress: 2.0.3 + proxy-from-env: 1.1.0 + puppeteer-core: 19.11.1 + transitivePeerDependencies: + - bufferutil + - encoding + - supports-color + - typescript + - utf-8-validate + puppeteer@22.15.0: dependencies: '@puppeteer/browsers': 2.3.0 @@ -4996,6 +5533,13 @@ snapshots: dependencies: has-flag: 3.0.0 + tar-fs@2.1.1: + dependencies: + chownr: 1.1.4 + mkdirp-classic: 0.5.3 + pump: 3.0.2 + tar-stream: 2.2.0 + tar-fs@3.0.6: dependencies: pump: 3.0.2 @@ -5004,6 +5548,14 @@ snapshots: bare-fs: 2.3.5 bare-path: 2.1.3 + tar-stream@2.2.0: + dependencies: + bl: 4.1.0 + end-of-stream: 1.4.4 + fs-constants: 1.0.0 + inherits: 2.0.4 + readable-stream: 3.6.2 + tar-stream@3.1.7: dependencies: b4a: 1.6.6 @@ -5246,6 +5798,8 @@ snapshots: wrappy@1.0.2: {} + ws@8.13.0: {} + ws@8.17.1: {} ws@8.18.0: {} @@ -5261,8 +5815,20 @@ snapshots: yallist@4.0.0: {} + yaml@2.6.0: {} + yargs-parser@21.1.1: {} + yargs@17.7.1: + dependencies: + cliui: 8.0.1 + escalade: 3.2.0 + get-caller-file: 2.0.5 + require-directory: 2.1.1 + string-width: 4.2.3 + y18n: 5.0.8 + yargs-parser: 21.1.1 + yargs@17.7.2: dependencies: cliui: 8.0.1 diff --git a/src/crud.py b/src/crud.py index b708acf7..ce691166 100644 --- a/src/crud.py +++ b/src/crud.py @@ -225,18 +225,7 @@ async def create_session( h_metadata=session.metadata, ) db.add(honcho_session) - # print("====== Testing State of ORM Object ====") - # print(honcho_session) - # print("=======================================") - # - # await db.flush() - # - # print("====== Testing State of ORM Object ====") - # print(honcho_session) - # print("=======================================") - await db.commit() - # await db.refresh(honcho_session) return honcho_session @@ -319,9 +308,6 @@ async def get_messages( reverse: Optional[bool] = False, filter: Optional[dict] = None, ) -> Select: - print("============") - print(filter) - print("============") stmt = ( select(models.Message) .join(models.Session, models.Session.public_id == models.Message.session_id) @@ -340,10 +326,6 @@ async def get_messages( else: stmt = stmt.order_by(models.Message.created_at) - print("============") - print(stmt) - print("============") - return stmt diff --git a/src/main.py b/src/main.py index 197f7cff..0077e826 100644 --- a/src/main.py +++ b/src/main.py @@ -74,11 +74,11 @@ router = APIRouter(prefix="/apps/{app_id}/users/{user_id}") add_pagination(app) -app.include_router(apps.router) -app.include_router(users.router) -app.include_router(sessions.router) -app.include_router(messages.router) -app.include_router(metamessages.router) -app.include_router(metamessages.router_user_level) -app.include_router(collections.router) -app.include_router(documents.router) +app.include_router(apps.router, prefix="/v1") +app.include_router(users.router, prefix="/v1") +app.include_router(sessions.router, prefix="/v1") +app.include_router(messages.router, prefix="/v1") +app.include_router(metamessages.router, prefix="/v1") +app.include_router(metamessages.router_user_level, prefix="/v1") +app.include_router(collections.router, prefix="/v1") +app.include_router(documents.router, prefix="/v1") diff --git a/tests/routes/test_apps.py b/tests/routes/test_apps.py index 1c8b1657..801d77f9 100644 --- a/tests/routes/test_apps.py +++ b/tests/routes/test_apps.py @@ -1,14 +1,11 @@ from nanoid import generate as generate_nanoid -import pytest -from sqlalchemy.ext.asyncio import AsyncSession - -from src import models # Import your SQLAlchemy models - def test_create_app(client): name = str(generate_nanoid()) - response = client.post("/apps", json={"name": name, "metadata": {"key": "value"}}) + response = client.post( + "/v1/apps", json={"name": name, "metadata": {"key": "value"}} + ) print(response) assert response.status_code == 200 data = response.json() @@ -22,9 +19,9 @@ def test_create_app(client): def test_get_or_create_app(client): name = str(generate_nanoid()) - response = client.get(f"/apps/name/{name}") + response = client.get(f"/v1/apps/name/{name}") assert response.status_code == 404 - response = client.get(f"/apps/get_or_create/{name}") + response = client.get(f"/v1/apps/get_or_create/{name}") assert response.status_code == 200 data = response.json() assert data["name"] == name @@ -33,12 +30,14 @@ def test_get_or_create_app(client): def test_get_or_create_existing_app(client): name = str(generate_nanoid()) - response = client.get(f"/apps/name/{name}") + response = client.get(f"/v1/apps/name/{name}") assert response.status_code == 404 - response = client.post("/apps", json={"name": name, "metadata": {"key": "value"}}) + response = client.post( + "/v1/apps", json={"name": name, "metadata": {"key": "value"}} + ) assert response.status_code == 200 app1 = response.json() - response = client.get(f"/apps/get_or_create/{name}") + response = client.get(f"/v1/apps/get_or_create/{name}") assert response.status_code == 200 app2 = response.json() assert app1["name"] == app2["name"] @@ -48,7 +47,7 @@ def test_get_or_create_existing_app(client): def test_get_app_by_id(client, sample_data): test_app, _ = sample_data - response = client.get(f"/apps/{test_app.public_id}") + response = client.get(f"/v1/apps/{test_app.public_id}") assert response.status_code == 200 data = response.json() assert data["name"] == test_app.name @@ -57,7 +56,7 @@ def test_get_app_by_id(client, sample_data): def test_get_app_by_name(client, sample_data): test_app, _ = sample_data - response = client.get(f"/apps/name/{test_app.name}") + response = client.get(f"/v1/apps/name/{test_app.name}") assert response.status_code == 200 data = response.json() assert data["name"] == test_app.name @@ -68,7 +67,7 @@ def test_update_app(client, sample_data): test_app, _ = sample_data new_name = str(generate_nanoid()) response = client.put( - f"/apps/{test_app.public_id}", + f"/v1/apps/{test_app.public_id}", json={"name": new_name, "metadata": {"new_key": "new_value"}}, ) assert response.status_code == 200 diff --git a/tests/routes/test_collections.py b/tests/routes/test_collections.py index f9662a7a..4be81670 100644 --- a/tests/routes/test_collections.py +++ b/tests/routes/test_collections.py @@ -4,7 +4,7 @@ from nanoid import generate as generate_nanoid def test_create_collection(client, sample_data) -> None: test_app, test_user = sample_data response = client.post( - f"/apps/{test_app.public_id}/users/{test_user.public_id}/collections", + f"/v1/apps/{test_app.public_id}/users/{test_user.public_id}/collections", json={"name": "test_collection", "metadata": {}}, ) assert response.status_code == 200 @@ -18,14 +18,14 @@ def test_get_collection_by_id(client, sample_data) -> None: test_app, test_user = sample_data # Make the collection response = client.post( - f"/apps/{test_app.public_id}/users/{test_user.public_id}/collections", + f"/v1/apps/{test_app.public_id}/users/{test_user.public_id}/collections", json={"name": "test_collection", "metadata": {}}, ) assert response.status_code == 200 data = response.json() # Get the collection response = client.get( - f"/apps/{test_app.public_id}/users/{test_user.public_id}/collections/{data['id']}" + f"/v1/apps/{test_app.public_id}/users/{test_user.public_id}/collections/{data['id']}" ) assert response.status_code == 200 data = response.json() @@ -38,14 +38,14 @@ def test_get_collection_by_name(client, sample_data) -> None: test_app, test_user = sample_data # Make the collection response = client.post( - f"/apps/{test_app.public_id}/users/{test_user.public_id}/collections", + f"/v1/apps/{test_app.public_id}/users/{test_user.public_id}/collections", json={"name": "test_collection", "metadata": {}}, ) assert response.status_code == 200 data = response.json() # Get the collection response = client.get( - f"/apps/{test_app.public_id}/users/{test_user.public_id}/collections/name/test_collection" + f"/v1/apps/{test_app.public_id}/users/{test_user.public_id}/collections/name/test_collection" ) assert response.status_code == 200 data = response.json() @@ -58,21 +58,21 @@ def test_get_collections(client, sample_data) -> None: test_app, test_user = sample_data # Make Sample Collections client.post( - f"/apps/{test_app.public_id}/users/{test_user.public_id}/collections", + f"/v1/apps/{test_app.public_id}/users/{test_user.public_id}/collections", json={"name": str(generate_nanoid()), "metadata": {"test": "key"}}, ) client.post( - f"/apps/{test_app.public_id}/users/{test_user.public_id}/collections", + f"/v1/apps/{test_app.public_id}/users/{test_user.public_id}/collections", json={"name": str(generate_nanoid()), "metadata": {"test": "key"}}, ) client.post( - f"/apps/{test_app.public_id}/users/{test_user.public_id}/collections", + f"/v1/apps/{test_app.public_id}/users/{test_user.public_id}/collections", json={"name": str(generate_nanoid()), "metadata": {"test": "key2"}}, ) # Get the Collections response = client.post( - f"/apps/{test_app.public_id}/users/{test_user.public_id}/collections/list", + f"/v1/apps/{test_app.public_id}/users/{test_user.public_id}/collections/list", json={}, ) assert response.status_code == 200 @@ -80,7 +80,7 @@ def test_get_collections(client, sample_data) -> None: assert len(data["items"]) == 3 response = client.post( - f"/apps/{test_app.public_id}/users/{test_user.public_id}/collections/list", + f"/v1/apps/{test_app.public_id}/users/{test_user.public_id}/collections/list", json={"filter": {"test": "key"}}, ) @@ -95,14 +95,14 @@ def test_update_collection(client, sample_data) -> None: test_app, test_user = sample_data # Make the collection response = client.post( - f"/apps/{test_app.public_id}/users/{test_user.public_id}/collections", + f"/v1/apps/{test_app.public_id}/users/{test_user.public_id}/collections", json={"name": "test_collection", "metadata": {}}, ) assert response.status_code == 200 data = response.json() # Update the collection response = client.put( - f"/apps/{test_app.public_id}/users/{test_user.public_id}/collections/{data['id']}", + f"/v1/apps/{test_app.public_id}/users/{test_user.public_id}/collections/{data['id']}", json={"name": "test_collection_updated", "metadata": {"new_key": "new_value"}}, ) assert response.status_code == 200 @@ -116,17 +116,17 @@ def test_delete_collection(client, sample_data) -> None: test_app, test_user = sample_data # Make the collection response = client.post( - f"/apps/{test_app.public_id}/users/{test_user.public_id}/collections", + f"/v1/apps/{test_app.public_id}/users/{test_user.public_id}/collections", json={"name": "test_collection", "metadata": {}}, ) assert response.status_code == 200 data = response.json() # Delete the collection response = client.delete( - f"/apps/{test_app.public_id}/users/{test_user.public_id}/collections/{data['id']}" + f"/v1/apps/{test_app.public_id}/users/{test_user.public_id}/collections/{data['id']}" ) assert response.status_code == 200 response = client.get( - f"/apps/{test_app.public_id}/users/{test_user.public_id}/collections/{data['id']}" + f"/v1/apps/{test_app.public_id}/users/{test_user.public_id}/collections/{data['id']}" ) assert response.status_code == 404 diff --git a/tests/routes/test_documents.py b/tests/routes/test_documents.py index a8aa4eef..129f2cc2 100644 --- a/tests/routes/test_documents.py +++ b/tests/routes/test_documents.py @@ -5,14 +5,14 @@ def test_create_document(client, sample_data): test_app, test_user = sample_data # Create a collection response = client.post( - f"/apps/{test_app.public_id}/users/{test_user.public_id}/collections", + f"/v1/apps/{test_app.public_id}/users/{test_user.public_id}/collections", json={"name": "test_collection", "metadata": {}}, ) assert response.status_code == 200 data = response.json() # Create a document response = client.post( - f"/apps/{test_app.public_id}/users/{test_user.public_id}/collections/{data['id']}/documents", + f"/v1/apps/{test_app.public_id}/users/{test_user.public_id}/collections/{data['id']}/documents", json={"content": "test_text", "metadata": {}}, ) assert response.status_code == 200 @@ -26,21 +26,21 @@ def test_get_document(client, sample_data): test_app, test_user = sample_data # Create a collection response = client.post( - f"/apps/{test_app.public_id}/users/{test_user.public_id}/collections", + f"/v1/apps/{test_app.public_id}/users/{test_user.public_id}/collections", json={"name": "test_collection", "metadata": {}}, ) assert response.status_code == 200 collection = response.json() # Create a document response = client.post( - f"/apps/{test_app.public_id}/users/{test_user.public_id}/collections/{collection['id']}/documents", + f"/v1/apps/{test_app.public_id}/users/{test_user.public_id}/collections/{collection['id']}/documents", json={"content": "test_text", "metadata": {}}, ) assert response.status_code == 200 document = response.json() # Get the document response = client.get( - f"/apps/{test_app.public_id}/users/{test_user.public_id}/collections/{collection['id']}/documents/{document['id']}" + f"/v1/apps/{test_app.public_id}/users/{test_user.public_id}/collections/{collection['id']}/documents/{document['id']}" ) assert response.status_code == 200 data = response.json() @@ -53,27 +53,27 @@ def test_get_documents(client, sample_data): test_app, test_user = sample_data # Create a collection response = client.post( - f"/apps/{test_app.public_id}/users/{test_user.public_id}/collections", + f"/v1/apps/{test_app.public_id}/users/{test_user.public_id}/collections", json={"name": str(generate_nanoid()), "metadata": {}}, ) assert response.status_code == 200 collection = response.json() # Create a document response = client.post( - f"/apps/{test_app.public_id}/users/{test_user.public_id}/collections/{collection['id']}/documents", + f"/v1/apps/{test_app.public_id}/users/{test_user.public_id}/collections/{collection['id']}/documents", json={"content": "test_text", "metadata": {"test": "key"}}, ) response = client.post( - f"/apps/{test_app.public_id}/users/{test_user.public_id}/collections/{collection['id']}/documents", + f"/v1/apps/{test_app.public_id}/users/{test_user.public_id}/collections/{collection['id']}/documents", json={"content": "test_text", "metadata": {"test": "key"}}, ) response = client.post( - f"/apps/{test_app.public_id}/users/{test_user.public_id}/collections/{collection['id']}/documents", + f"/v1/apps/{test_app.public_id}/users/{test_user.public_id}/collections/{collection['id']}/documents", json={"content": "test_text", "metadata": {"test": "key2"}}, ) # Get the documents response = client.post( - f"/apps/{test_app.public_id}/users/{test_user.public_id}/collections/{collection['id']}/documents/list", + f"/v1/apps/{test_app.public_id}/users/{test_user.public_id}/collections/{collection['id']}/documents/list", json={}, ) assert response.status_code == 200 @@ -81,7 +81,7 @@ def test_get_documents(client, sample_data): assert len(data["items"]) == 3 response = client.post( - f"/apps/{test_app.public_id}/users/{test_user.public_id}/collections/{collection['id']}/documents/list", + f"/v1/apps/{test_app.public_id}/users/{test_user.public_id}/collections/{collection['id']}/documents/list", json={"filter": {"test": "key"}}, ) assert response.status_code == 200 @@ -95,21 +95,21 @@ def test_update_document(client, sample_data): test_app, test_user = sample_data # Create a collection response = client.post( - f"/apps/{test_app.public_id}/users/{test_user.public_id}/collections", + f"/v1/apps/{test_app.public_id}/users/{test_user.public_id}/collections", json={"name": "test_collection", "metadata": {}}, ) assert response.status_code == 200 data = response.json() # Create a document response = client.post( - f"/apps/{test_app.public_id}/users/{test_user.public_id}/collections/{data['id']}/documents", + f"/v1/apps/{test_app.public_id}/users/{test_user.public_id}/collections/{data['id']}/documents", json={"content": "test_text", "metadata": {}}, ) assert response.status_code == 200 data = response.json() # Update the document response = client.put( - f"/apps/{test_app.public_id}/users/{test_user.public_id}/collections/{data['id']}/documents/{data['id']}", + f"/v1/apps/{test_app.public_id}/users/{test_user.public_id}/collections/{data['id']}/documents/{data['id']}", json={"content": "test_text_updated", "metadata": {"new_key": "new_value"}}, ) @@ -118,24 +118,24 @@ def test_delete_document(client, sample_data): test_app, test_user = sample_data # Create a collection response = client.post( - f"/apps/{test_app.public_id}/users/{test_user.public_id}/collections", + f"/v1/apps/{test_app.public_id}/users/{test_user.public_id}/collections", json={"name": "test_collection", "metadata": {}}, ) assert response.status_code == 200 collection = response.json() # Create a document response = client.post( - f"/apps/{test_app.public_id}/users/{test_user.public_id}/collections/{collection['id']}/documents", + f"/v1/apps/{test_app.public_id}/users/{test_user.public_id}/collections/{collection['id']}/documents", json={"content": "test_text", "metadata": {}}, ) assert response.status_code == 200 document = response.json() # Delete the document response = client.delete( - f"/apps/{test_app.public_id}/users/{test_user.public_id}/collections/{collection['id']}/documents/{document['id']}" + f"/v1/apps/{test_app.public_id}/users/{test_user.public_id}/collections/{collection['id']}/documents/{document['id']}" ) assert response.status_code == 200 response = client.get( - f"/apps/{test_app.public_id}/users/{test_user.public_id}/collections/{collection['id']}/documents/{document['id']}" + f"/v1/apps/{test_app.public_id}/users/{test_user.public_id}/collections/{collection['id']}/documents/{document['id']}" ) assert response.status_code == 404 diff --git a/tests/routes/test_messages.py b/tests/routes/test_messages.py index db213ee5..2bc8ee8d 100644 --- a/tests/routes/test_messages.py +++ b/tests/routes/test_messages.py @@ -12,7 +12,7 @@ async def test_create_message(client, db_session, sample_data): await db_session.commit() response = client.post( - f"/apps/{test_app.public_id}/users/{test_user.public_id}/sessions/{test_session.public_id}/messages", + f"/v1/apps/{test_app.public_id}/users/{test_user.public_id}/sessions/{test_session.public_id}/messages", json={ "content": "Test message", "is_user": True, @@ -41,7 +41,7 @@ async def test_get_messages(client, db_session, sample_data): await db_session.commit() response = client.post( - f"/apps/{test_app.public_id}/users/{test_user.public_id}/sessions/{test_session.public_id}/messages/list", + f"/v1/apps/{test_app.public_id}/users/{test_user.public_id}/sessions/{test_session.public_id}/messages/list", json={}, ) assert response.status_code == 200 @@ -77,7 +77,7 @@ async def test_get_filtered_messages(client, db_session, sample_data): await db_session.commit() response = client.post( - f"/apps/{test_app.public_id}/users/{test_user.public_id}/sessions/{test_session.public_id}/messages/list", + f"/v1/apps/{test_app.public_id}/users/{test_user.public_id}/sessions/{test_session.public_id}/messages/list", json={"filter": {"key": "value2"}}, ) assert response.status_code == 200 @@ -104,7 +104,7 @@ async def test_update_message(client, db_session, sample_data): await db_session.commit() response = client.put( - f"/apps/{test_app.public_id}/users/{test_user.public_id}/sessions/{test_session.public_id}/messages/{test_message.public_id}", + f"/v1/apps/{test_app.public_id}/users/{test_user.public_id}/sessions/{test_session.public_id}/messages/{test_message.public_id}", json={"metadata": {"new_key": "new_value"}}, ) assert response.status_code == 200 diff --git a/tests/routes/test_metamessages.py b/tests/routes/test_metamessages.py index 765eae46..3791b2cd 100644 --- a/tests/routes/test_metamessages.py +++ b/tests/routes/test_metamessages.py @@ -17,7 +17,7 @@ async def test_create_metamessage(client, db_session, sample_data): await db_session.commit() response = client.post( - f"/apps/{test_app.public_id}/users/{test_user.public_id}/sessions/{test_session.public_id}/metamessages", + f"/v1/apps/{test_app.public_id}/users/{test_user.public_id}/sessions/{test_session.public_id}/metamessages", json={ "message_id": str(test_message.public_id), "content": "Test Metamessage", @@ -55,7 +55,7 @@ async def test_get_metamessage(client, db_session, sample_data): await db_session.commit() response = client.get( - f"/apps/{test_app.public_id}/users/{test_user.public_id}/sessions/{test_session.public_id}/metamessages/{test_metamessage.public_id}/?message_id={test_message.public_id}" + f"/v1/apps/{test_app.public_id}/users/{test_user.public_id}/sessions/{test_session.public_id}/metamessages/{test_metamessage.public_id}/?message_id={test_message.public_id}" ) assert response.status_code == 200 data = response.json() @@ -108,7 +108,7 @@ async def test_get_metamessages(client, db_session, sample_data): await db_session.commit() response = client.post( - f"/apps/{test_app.public_id}/users/{test_user.public_id}/sessions/{test_session.public_id}/metamessages/list", + f"/v1/apps/{test_app.public_id}/users/{test_user.public_id}/sessions/{test_session.public_id}/metamessages/list", json={"metamessage_type": "test_type"}, ) @@ -181,7 +181,7 @@ async def test_get_metamessage_by_user(client, db_session, sample_data): await db_session.commit() response = client.post( - f"/apps/{test_app.public_id}/users/{test_user.public_id}/metamessages/list", + f"/v1/apps/{test_app.public_id}/users/{test_user.public_id}/metamessages/list", json={"metamessage_type": "test_type"}, ) assert response.status_code == 200 @@ -218,7 +218,7 @@ async def test_update_metamessage(client, db_session, sample_data): await db_session.commit() response = client.put( - f"/apps/{test_app.public_id}/users/{test_user.public_id}/sessions/{test_session.public_id}/metamessages/{test_metamessage.public_id}", + f"/v1/apps/{test_app.public_id}/users/{test_user.public_id}/sessions/{test_session.public_id}/metamessages/{test_metamessage.public_id}", json={ "message_id": str(test_message.public_id), "metadata": {"new_key": "new_value"}, diff --git a/tests/routes/test_sessions.py b/tests/routes/test_sessions.py index c554cfc6..08b8cbbd 100644 --- a/tests/routes/test_sessions.py +++ b/tests/routes/test_sessions.py @@ -6,7 +6,7 @@ from src import models # Import your SQLAlchemy models def test_create_session(client, sample_data): test_app, test_user = sample_data response = client.post( - f"/apps/{test_app.public_id}/users/{test_user.public_id}/sessions", + f"/v1/apps/{test_app.public_id}/users/{test_user.public_id}/sessions", json={}, ) assert response.status_code == 200 @@ -18,7 +18,7 @@ def test_create_session(client, sample_data): def test_create_session_with_metadata(client, sample_data): test_app, test_user = sample_data response = client.post( - f"/apps/{test_app.public_id}/users/{test_user.public_id}/sessions", + f"/v1/apps/{test_app.public_id}/users/{test_user.public_id}/sessions", json={ "metadata": {"session_key": "session_value"}, }, @@ -34,7 +34,7 @@ async def test_get_sessions(client, db_session, sample_data): test_app, test_user = sample_data # Create a test session response = client.post( - f"/apps/{test_app.public_id}/users/{test_user.public_id}/sessions", + f"/v1/apps/{test_app.public_id}/users/{test_user.public_id}/sessions", json={ "metadata": {"test_key": "test_value"}, }, @@ -45,7 +45,7 @@ async def test_get_sessions(client, db_session, sample_data): assert "id" in data response = client.post( - f"/apps/{test_app.public_id}/users/{test_user.public_id}/sessions/list", + f"/v1/apps/{test_app.public_id}/users/{test_user.public_id}/sessions/list", json={"filter": {"test_key": "test_value"}}, ) assert response.status_code == 200 @@ -64,7 +64,7 @@ async def test_empty_update_session(client, db_session, sample_data): await db_session.commit() response = client.put( - f"/apps/{test_app.public_id}/users/{test_user.public_id}/sessions/{test_session.public_id}", + f"/v1/apps/{test_app.public_id}/users/{test_user.public_id}/sessions/{test_session.public_id}", json={}, ) assert response.status_code == 400 @@ -81,7 +81,7 @@ async def test_update_delete_metadata(client, db_session, sample_data): await db_session.commit() response = client.put( - f"/apps/{test_app.public_id}/users/{test_user.public_id}/sessions/{test_session.public_id}", + f"/v1/apps/{test_app.public_id}/users/{test_user.public_id}/sessions/{test_session.public_id}", json={"metadata": {}}, ) assert response.status_code == 200 @@ -98,7 +98,7 @@ async def test_update_session(client, db_session, sample_data): await db_session.commit() response = client.put( - f"/apps/{test_app.public_id}/users/{test_user.public_id}/sessions/{test_session.public_id}", + f"/v1/apps/{test_app.public_id}/users/{test_user.public_id}/sessions/{test_session.public_id}", json={"metadata": {"new_key": "new_value"}}, ) assert response.status_code == 200 @@ -114,11 +114,11 @@ async def test_delete_session(client, db_session, sample_data): db_session.add(test_session) await db_session.commit() response = client.delete( - f"/apps/{test_app.public_id}/users/{test_user.public_id}/sessions/{test_session.public_id}" + f"/v1/apps/{test_app.public_id}/users/{test_user.public_id}/sessions/{test_session.public_id}" ) assert response.status_code == 200 response = client.get( - f"/apps/{test_app.public_id}/users/{test_user.public_id}/sessions/{test_session.public_id}" + f"/v1/apps/{test_app.public_id}/users/{test_user.public_id}/sessions/{test_session.public_id}" ) data = response.json() assert data["is_active"] is False diff --git a/tests/routes/test_users.py b/tests/routes/test_users.py index ecf06686..09726cd4 100644 --- a/tests/routes/test_users.py +++ b/tests/routes/test_users.py @@ -5,7 +5,7 @@ def test_create_user(client, sample_data): test_app, _ = sample_data name = str(generate_nanoid()) response = client.post( - f"/apps/{test_app.public_id}/users", + f"/v1/apps/{test_app.public_id}/users", json={"name": name, "metadata": {"user_key": "user_value"}}, ) assert response.status_code == 200 @@ -17,7 +17,7 @@ def test_create_user(client, sample_data): def test_get_user_by_id(client, sample_data): test_app, test_user = sample_data - response = client.get(f"/apps/{test_app.public_id}/users/{test_user.public_id}") + response = client.get(f"/v1/apps/{test_app.public_id}/users/{test_user.public_id}") assert response.status_code == 200 data = response.json() assert data["name"] == test_user.name @@ -26,7 +26,7 @@ def test_get_user_by_id(client, sample_data): def test_get_user_by_name(client, sample_data): test_app, test_user = sample_data - response = client.get(f"/apps/{test_app.public_id}/users/name/{test_user.name}") + response = client.get(f"/v1/apps/{test_app.public_id}/users/name/{test_user.name}") assert response.status_code == 200 data = response.json() assert data["name"] == test_user.name @@ -36,9 +36,9 @@ def test_get_user_by_name(client, sample_data): def test_get_or_create_user(client, sample_data): test_app, _ = sample_data name = str(generate_nanoid()) - response = client.get(f"/apps/{test_app.public_id}/users/name/{name}") + response = client.get(f"/v1/apps/{test_app.public_id}/users/name/{name}") assert response.status_code == 404 - response = client.get(f"/apps/{test_app.public_id}/users/get_or_create/{name}") + response = client.get(f"/v1/apps/{test_app.public_id}/users/get_or_create/{name}") assert response.status_code == 200 data = response.json() assert data["name"] == name @@ -48,19 +48,19 @@ def test_get_or_create_user(client, sample_data): def test_get_users(client, sample_data): test_app, _ = sample_data response = client.post( - f"/apps/{test_app.public_id}/users", + f"/v1/apps/{test_app.public_id}/users", json={"name": str(generate_nanoid()), "metadata": {"user_key": "user_value"}}, ) response = client.post( - f"/apps/{test_app.public_id}/users", + f"/v1/apps/{test_app.public_id}/users", json={"name": str(generate_nanoid()), "metadata": {"user_key": "user_value"}}, ) response = client.post( - f"/apps/{test_app.public_id}/users", + f"/v1/apps/{test_app.public_id}/users", json={"name": str(generate_nanoid()), "metadata": {"user_key": "user_value2"}}, ) response = client.post( - f"/apps/{test_app.public_id}/users/list", + f"/v1/apps/{test_app.public_id}/users/list", json={"filter": {"user_key": "user_value"}}, ) assert response.status_code == 200 @@ -75,7 +75,7 @@ def test_update_user(client, sample_data): test_app, test_user = sample_data new_name = str(generate_nanoid()) response = client.put( - f"/apps/{test_app.public_id}/users/{test_user.public_id}", + f"/v1/apps/{test_app.public_id}/users/{test_user.public_id}", json={"name": new_name, "metadata": {"new_key": "new_value"}}, ) assert response.status_code == 200