diff --git a/.gitignore b/.gitignore index b9090b7..24c7a81 100644 --- a/.gitignore +++ b/.gitignore @@ -1 +1,3 @@ -myenv \ No newline at end of file +myenv +.env +.pytest_cache \ No newline at end of file diff --git a/OpenAPI/openapi.json b/OpenAPI/openapi.json new file mode 100644 index 0000000..63bdd02 --- /dev/null +++ b/OpenAPI/openapi.json @@ -0,0 +1,20657 @@ +{ + "openapi": "3.0.2", + "info": + { + "title": "customgpt", + "description": "API Documentation for CustomGPT.ai.", + "contact": + { + "name": "CustomGPT.ai", + "url": "https://app.customgpt.ai", + "email": "hello@customgpt.ai" + }, + "version": "1.0.0" + }, + "servers": + [ + { + "url": "https://app.customgpt.ai", + "description": "API Version 1" + } + ], + "paths": + { + "/api/v1/projects": + { + "get": + { + "tags": + [ + "Projects" + ], + "summary": "List all projects.", + "operationId": "list_projects", + "description": "Returns a list of your projects. The projects are returned sorted by creation date, with the most recent projects appearing first. It is a paginated API and you can use the page parameter to fetch the next page of projects. The default page size is 10.\n\nHere is an example to list projects: using [API](https://github.com/Poll-The-People/customgpt-cookbook/blob/main/examples/List_all_projects_for_an_account_with_pagination.ipynb) and using our python [SDK](https://github.com/Poll-The-People/customgpt-cookbook/blob/main/examples/SDK_List_all_projects_using_pagination.ipynb).", + "parameters": + [ + { + "name": "page", + "in": "query", + "description": "Page number to return", + "required": false, + "schema": + { + "default": 1, + "type": "integer", + "example": 1 + } + }, + { + "name": "duration", + "in": "query", + "description": "The duration of the projects to list.", + "required": false, + "schema": + { + "type": "integer" + }, + "example": 90 + }, + { + "name": "order", + "in": "query", + "description": "The order of the projects to list. Defaults to desc.", + "required": false, + "schema": + { + "enum": + [ + "asc", + "desc" + ], + "default": "desc", + "type": "string", + "example": "desc" + } + }, + { + "name": "orderBy", + "in": "query", + "description": "The orderBy to sort the results by given field", + "required": false, + "schema": + { + "enum": + [ + "id", + "created_at" + ], + "default": "id", + "type": "string", + "example": "id" + } + }, + { + "name": "width", + "in": "query", + "description": "The width of the embed code. Defaults to 100%.", + "required": false, + "schema": + { + "default": "100%", + "type": "string", + "example": "50rem" + } + }, + { + "name": "height", + "in": "query", + "description": "The height of the embed code. Defaults to 100%.", + "required": false, + "schema": + { + "default": "auto", + "type": "string", + "example": "50rem" + } + }, + { + "name": "name", + "in": "query", + "description": "Filter the results by project name", + "required": false, + "schema": + { + "type": "string", + "example": "Sample project" + } + } + ], + "responses": + { + "200": + { + "description": "Successfully retrieved list of projects that belong to the user.", + "content": + { + "application/json": + { + "schema": + { + "type": "object", + "properties": + { + "status": + { + "description": "The status of the response", + "enum": + [ + "error", + "success" + ], + "type": "string", + "example": "success" + }, + "data": + { + "type": "object", + "properties": + { + "current_page": + { + "description": "The current page number", + "type": "integer", + "example": 1 + }, + "data": + { + "type": "array", + "items": + { + "type": "object", + "properties": + { + "id": + { + "description": "Project ID", + "type": "integer", + "example": 1 + }, + "project_name": + { + "description": "Project name", + "type": "string", + "example": "My Project" + }, + "sitemap_path": + { + "description": "Project sitemap", + "type": "string", + "example": "https://www.example.com/sitemap.xml" + }, + "is_chat_active": + { + "description": "Whether the chat bot is active or not", + "default": false, + "type": "boolean", + "example": true + }, + "user_id": + { + "description": "User ID of the project owner", + "type": "integer", + "example": 1 + }, + "team_id": + { + "description": "Team ID of the project owner", + "type": "integer", + "example": 1 + }, + "created_at": + { + "description": "Date and time when the project was created", + "default": "2023-05-08 13:06:55", + "format": "date-time", + "type": "string", + "example": "2021-01-01 00:00:00" + }, + "updated_at": + { + "description": "Date and time when the project was last updated", + "default": "2023-05-08 13:06:55", + "format": "date-time", + "type": "string", + "example": "2021-01-01 00:00:00" + }, + "type": + { + "description": "Project type", + "enum": + [ + "SITEMAP", + "URL" + ], + "default": "SITEMAP", + "type": "string", + "example": "SITEMAP" + }, + "is_shared": + { + "description": "Whether the project is shared or not", + "default": false, + "type": "boolean", + "example": true + }, + "shareable_slug": + { + "description": "Shareable slug that can be used to share the project", + "format": "md5", + "type": "string", + "nullable": true, + "example": "1234567890abcdef1234567890abcdef" + }, + "shareable_link": + { + "description": "Shareable link that can be used to share the project", + "format": "url", + "type": "string", + "nullable": true + }, + "embed_code": + { + "description": "Embed code that can be used to embed the project", + "format": "html", + "type": "string", + "nullable": true + }, + "live_chat_code": + { + "description": "Live chat code that can be used to embed the live chat", + "format": "html", + "type": "string", + "nullable": true + } + } + } + }, + "first_page_url": + { + "description": "The first page url", + "type": "string", + "example": "https://app.customgpt.ai/api/v1/users?page=1" + }, + "from": + { + "description": "The first item number of the current page", + "type": "integer", + "example": 1 + }, + "last_page": + { + "description": "The last page number", + "type": "integer", + "example": 1 + }, + "last_page_url": + { + "description": "The last page url", + "type": "string", + "example": "https://app.customgpt.ai/api/v1/users?page=1" + }, + "next_page_url": + { + "description": "The next page url", + "type": "string", + "example": "https://app.customgpt.ai/api/v1/users?page=1" + }, + "path": + { + "description": "The current page url", + "type": "string", + "example": "https://app.customgpt.ai/api/v1/users?page=1" + }, + "per_page": + { + "description": "The number of items per page", + "type": "integer", + "example": 10 + }, + "prev_page_url": + { + "description": "The previous page url", + "type": "string", + "example": "https://app.customgpt.ai/api/v1/users?page=1" + }, + "to": + { + "description": "The last item number of the current page", + "type": "integer", + "example": 1 + }, + "total": + { + "description": "The total number of items", + "type": "integer", + "example": 1 + } + } + } + } + } + } + } + }, + "401": + { + "description": "API Token is either missing or invalid", + "content": + { + "application/json": + { + "schema": + { + "type": "object", + "properties": + { + "status": + { + "description": "The status of the response", + "enum": + [ + "error", + "success" + ], + "type": "string", + "example": "error" + }, + "url": + { + "description": "The URL of the request", + "type": "string", + "example": "https://app.customgpt.ai/api/v1/projects/1" + }, + "data": + { + "type": "object", + "properties": + { + "code": + { + "description": "The error status code", + "enum": + [ + 400, + 401, + 403, + 404, + 500, + 503 + ], + "type": "integer", + "example": 401 + }, + "message": + { + "type": "string", + "example": "API Token is either missing or invalid" + } + } + } + } + } + } + } + }, + "500": + { + "description": "Internal Server Error", + "content": + { + "application/json": + { + "schema": + { + "type": "object", + "properties": + { + "status": + { + "description": "The status of the response", + "enum": + [ + "error", + "success" + ], + "type": "string", + "example": "error" + }, + "url": + { + "description": "The URL of the request", + "type": "string", + "example": "https://app.customgpt.ai/api/v1/projects/1" + }, + "data": + { + "type": "object", + "properties": + { + "code": + { + "description": "The error status code", + "enum": + [ + 400, + 401, + 403, + 404, + 500, + 503 + ], + "type": "integer", + "example": 500 + }, + "message": + { + "type": "string", + "example": "Internal Server Error" + } + } + } + } + } + } + } + } + }, + "security": + [ + { + "BearerToken": + [] + } + ] + }, + "post": + { + "tags": + [ + "Projects" + ], + "summary": "Create a new project.", + "operationId": "create_project", + "description": "Create a new project by importing data either from a sitemap or an uploaded file. This endpoint enables you to initiate the creation of a new project by supplying the necessary project data that will be used as the context. You can choose to import the project structure and content from a sitemap url or upload a specific file format that contains the context can be any text, audio or video format. The system will process the provided data and generate a new project based on the imported or uploaded information.\nHere is an example to create a bot using a sitemap: [API](https://github.com/Poll-The-People/customgpt-cookbook/blob/main/examples/Create_Bot_By_Sitemap.ipynb) [SDK](https://github.com/Poll-The-People/customgpt-cookbook/blob/main/examples/SDK_Create_Bot_By_Sitemap.ipynb).", + "requestBody": + { + "description": "Create a new project from a sitemap or a file", + "content": + { + "multipart/form-data": + { + "schema": + { + "type": "object", + "properties": + { + "project_name": + { + "description": "Project name", + "type": "string", + "example": "My project" + }, + "sitemap_path": + { + "description": "The sitemap path", + "type": "string", + "example": "https://example.com/sitemap.xml" + }, + "file_data_retension": + { + "description": "File data retension", + "type": "boolean", + "example": true + }, + "is_ocr_enabled": + { + "description": "OCR enabled", + "type": "boolean", + "example": false + }, + "is_anonymized": + { + "description": "Anonymized", + "type": "boolean", + "example": false + }, + "file": + { + "description": "The submitted file.", + "format": "binary", + "type": "string", + "example": "file.pdf" + } + } + } + } + } + }, + "responses": + { + "201": + { + "description": "Project has been created", + "content": + { + "application/json": + { + "schema": + { + "type": "object", + "properties": + { + "status": + { + "description": "The status of the response", + "enum": + [ + "error", + "success" + ], + "type": "string", + "example": "success" + }, + "data": + { + "type": "object", + "properties": + { + "id": + { + "description": "Project ID", + "type": "integer", + "example": 1 + }, + "project_name": + { + "description": "Project name", + "type": "string", + "example": "My Project" + }, + "sitemap_path": + { + "description": "Project sitemap", + "type": "string", + "example": "https://www.example.com/sitemap.xml" + }, + "is_chat_active": + { + "description": "Whether the chat bot is active or not", + "default": false, + "type": "boolean", + "example": true + }, + "user_id": + { + "description": "User ID of the project owner", + "type": "integer", + "example": 1 + }, + "team_id": + { + "description": "Team ID of the project owner", + "type": "integer", + "example": 1 + }, + "created_at": + { + "description": "Date and time when the project was created", + "default": "2023-05-08 13:06:55", + "format": "date-time", + "type": "string", + "example": "2021-01-01 00:00:00" + }, + "updated_at": + { + "description": "Date and time when the project was last updated", + "default": "2023-05-08 13:06:55", + "format": "date-time", + "type": "string", + "example": "2021-01-01 00:00:00" + }, + "type": + { + "description": "Project type", + "enum": + [ + "SITEMAP", + "URL" + ], + "default": "SITEMAP", + "type": "string", + "example": "SITEMAP" + }, + "is_shared": + { + "description": "Whether the project is shared or not", + "default": false, + "type": "boolean", + "example": true + }, + "shareable_slug": + { + "description": "Shareable slug that can be used to share the project", + "format": "md5", + "type": "string", + "nullable": true, + "example": "1234567890abcdef1234567890abcdef" + }, + "shareable_link": + { + "description": "Shareable link that can be used to share the project", + "format": "url", + "type": "string", + "nullable": true + }, + "embed_code": + { + "description": "Embed code that can be used to embed the project", + "format": "html", + "type": "string", + "nullable": true + }, + "live_chat_code": + { + "description": "Live chat code that can be used to embed the live chat", + "format": "html", + "type": "string", + "nullable": true + } + } + } + } + } + } + } + }, + "400": + { + "description": "Project creation failed", + "content": + { + "application/json": + { + "schema": + { + "type": "object", + "properties": + { + "status": + { + "description": "The status of the response", + "enum": + [ + "error", + "success" + ], + "type": "string", + "example": "error" + }, + "url": + { + "description": "The URL of the request", + "type": "string", + "example": "https://app.customgpt.ai/api/v1/projects/1" + }, + "data": + { + "type": "object", + "properties": + { + "code": + { + "description": "The error status code", + "enum": + [ + 400, + 401, + 403, + 404, + 500, + 503 + ], + "type": "integer", + "example": 400 + }, + "message": + { + "description": "The error message", + "enum": + [ + "Project name can't be empty", + "Sitemap path can't be empty", + "You have reached your monthly project limit" + ], + "type": "string", + "example": "Project name can't be empty" + } + } + } + } + } + } + } + }, + "401": + { + "description": "API Token is either missing or invalid", + "content": + { + "application/json": + { + "schema": + { + "type": "object", + "properties": + { + "status": + { + "description": "The status of the response", + "enum": + [ + "error", + "success" + ], + "type": "string", + "example": "error" + }, + "url": + { + "description": "The URL of the request", + "type": "string", + "example": "https://app.customgpt.ai/api/v1/projects/1" + }, + "data": + { + "type": "object", + "properties": + { + "code": + { + "description": "The error status code", + "enum": + [ + 400, + 401, + 403, + 404, + 500, + 503 + ], + "type": "integer", + "example": 401 + }, + "message": + { + "type": "string", + "example": "API Token is either missing or invalid" + } + } + } + } + } + } + } + }, + "500": + { + "description": "Internal Server Error", + "content": + { + "application/json": + { + "schema": + { + "type": "object", + "properties": + { + "status": + { + "description": "The status of the response", + "enum": + [ + "error", + "success" + ], + "type": "string", + "example": "error" + }, + "url": + { + "description": "The URL of the request", + "type": "string", + "example": "https://app.customgpt.ai/api/v1/projects/1" + }, + "data": + { + "type": "object", + "properties": + { + "code": + { + "description": "The error status code", + "enum": + [ + 400, + 401, + 403, + 404, + 500, + 503 + ], + "type": "integer", + "example": 500 + }, + "message": + { + "type": "string", + "example": "Internal Server Error" + } + } + } + } + } + } + } + } + }, + "security": + [ + { + "BearerToken": + [] + } + ] + } + }, + "/api/v1/projects/{projectId}": + { + "get": + { + "tags": + [ + "Projects" + ], + "summary": "Show a certain project.", + "operationId": "get_project", + "description": "Retrieve details of a project based on its unique project ID. This endpoint allows you to fetch specific information about a project.", + "parameters": + [ + { + "name": "projectId", + "in": "path", + "description": "The unique project identifier.", + "required": true, + "schema": + { + "type": "integer", + "example": 1 + } + }, + { + "name": "width", + "in": "query", + "description": "The width of the embed code. Defaults to 100%.", + "required": false, + "schema": + { + "default": "100%", + "type": "string", + "example": "50rem" + } + }, + { + "name": "height", + "in": "query", + "description": "The height of the embed code. Defaults to 100%.", + "required": false, + "schema": + { + "default": "auto", + "type": "string", + "example": "50rem" + } + } + ], + "responses": + { + "200": + { + "description": "Retrieve certain project that belongs to the user", + "content": + { + "application/json": + { + "schema": + { + "type": "object", + "properties": + { + "status": + { + "description": "The status of the response", + "enum": + [ + "error", + "success" + ], + "type": "string", + "example": "success" + }, + "data": + { + "type": "object", + "properties": + { + "id": + { + "description": "Project ID", + "type": "integer", + "example": 1 + }, + "project_name": + { + "description": "Project name", + "type": "string", + "example": "My Project" + }, + "sitemap_path": + { + "description": "Project sitemap", + "type": "string", + "example": "https://www.example.com/sitemap.xml" + }, + "is_chat_active": + { + "description": "Whether the chat bot is active or not", + "default": false, + "type": "boolean", + "example": true + }, + "user_id": + { + "description": "User ID of the project owner", + "type": "integer", + "example": 1 + }, + "team_id": + { + "description": "Team ID of the project owner", + "type": "integer", + "example": 1 + }, + "created_at": + { + "description": "Date and time when the project was created", + "default": "2023-05-08 13:06:55", + "format": "date-time", + "type": "string", + "example": "2021-01-01 00:00:00" + }, + "updated_at": + { + "description": "Date and time when the project was last updated", + "default": "2023-05-08 13:06:55", + "format": "date-time", + "type": "string", + "example": "2021-01-01 00:00:00" + }, + "type": + { + "description": "Project type", + "enum": + [ + "SITEMAP", + "URL" + ], + "default": "SITEMAP", + "type": "string", + "example": "SITEMAP" + }, + "is_shared": + { + "description": "Whether the project is shared or not", + "default": false, + "type": "boolean", + "example": true + }, + "shareable_slug": + { + "description": "Shareable slug that can be used to share the project", + "format": "md5", + "type": "string", + "nullable": true, + "example": "1234567890abcdef1234567890abcdef" + }, + "shareable_link": + { + "description": "Shareable link that can be used to share the project", + "format": "url", + "type": "string", + "nullable": true + }, + "embed_code": + { + "description": "Embed code that can be used to embed the project", + "format": "html", + "type": "string", + "nullable": true + }, + "live_chat_code": + { + "description": "Live chat code that can be used to embed the live chat", + "format": "html", + "type": "string", + "nullable": true + } + } + } + } + } + } + } + }, + "400": + { + "description": "Bad Argument", + "content": + { + "application/json": + { + "schema": + { + "type": "object", + "properties": + { + "status": + { + "description": "The status of the response", + "enum": + [ + "error", + "success" + ], + "type": "string", + "example": "error" + }, + "url": + { + "description": "The URL of the request", + "type": "string", + "example": "https://app.customgpt.ai/api/v1/projects/1" + }, + "data": + { + "type": "object", + "properties": + { + "code": + { + "description": "The error status code", + "enum": + [ + 400, + 401, + 403, + 404, + 500, + 503 + ], + "type": "integer", + "example": 400 + }, + "message": + { + "description": "The error message", + "type": "string", + "example": "Project id must be integer" + } + } + } + } + } + } + } + }, + "401": + { + "description": "API Token is either missing or invalid", + "content": + { + "application/json": + { + "schema": + { + "type": "object", + "properties": + { + "status": + { + "description": "The status of the response", + "enum": + [ + "error", + "success" + ], + "type": "string", + "example": "error" + }, + "url": + { + "description": "The URL of the request", + "type": "string", + "example": "https://app.customgpt.ai/api/v1/projects/1" + }, + "data": + { + "type": "object", + "properties": + { + "code": + { + "description": "The error status code", + "enum": + [ + 400, + 401, + 403, + 404, + 500, + 503 + ], + "type": "integer", + "example": 401 + }, + "message": + { + "type": "string", + "example": "API Token is either missing or invalid" + } + } + } + } + } + } + } + }, + "404": + { + "description": "Project not found", + "content": + { + "application/json": + { + "schema": + { + "type": "object", + "properties": + { + "status": + { + "description": "The status of the response", + "enum": + [ + "error", + "success" + ], + "type": "string", + "example": "error" + }, + "url": + { + "description": "The URL of the request", + "type": "string", + "example": "https://app.customgpt.ai/api/v1/projects/1" + }, + "data": + { + "type": "object", + "properties": + { + "code": + { + "description": "The error status code", + "enum": + [ + 400, + 401, + 403, + 404, + 500, + 503 + ], + "type": "integer", + "example": 404 + }, + "message": + { + "description": "The error message", + "enum": + [ + "Project id is required", + "Project with id {projectId} not found" + ], + "type": "string", + "example": "Project with id 1 not found" + } + } + } + } + } + } + } + }, + "500": + { + "description": "Internal Server Error", + "content": + { + "application/json": + { + "schema": + { + "type": "object", + "properties": + { + "status": + { + "description": "The status of the response", + "enum": + [ + "error", + "success" + ], + "type": "string", + "example": "error" + }, + "url": + { + "description": "The URL of the request", + "type": "string", + "example": "https://app.customgpt.ai/api/v1/projects/1" + }, + "data": + { + "type": "object", + "properties": + { + "code": + { + "description": "The error status code", + "enum": + [ + 400, + 401, + 403, + 404, + 500, + 503 + ], + "type": "integer", + "example": 500 + }, + "message": + { + "type": "string", + "example": "Internal Server Error" + } + } + } + } + } + } + } + } + }, + "security": + [ + { + "BearerToken": + [] + } + ] + }, + "post": + { + "tags": + [ + "Projects" + ], + "summary": "Update a certain project.", + "operationId": "update_project", + "description": "Update a project with specific details based on its unique projectId. This endpoint allows you to modify and revise the information associated with a particular project\nHere is an example to a update a specific object: [API](https://github.com/Poll-The-People/customgpt-cookbook/blob/main/examples/Update%20a%20project%20name.ipynb) [SDK](https://github.com/Poll-The-People/customgpt-cookbook/blob/main/examples/SDK_Update_a_project_name.ipynb).", + "parameters": + [ + { + "name": "projectId", + "in": "path", + "description": "The unique identifier of a project.", + "required": true, + "schema": + { + "type": "integer" + } + } + ], + "requestBody": + { + "description": "Update a project", + "content": + { + "multipart/form-data": + { + "schema": + { + "type": "object", + "properties": + { + "project_name": + { + "description": "Project name", + "type": "string", + "example": "My project" + }, + "is_shared": + { + "description": "Whether the project is shared or not", + "type": "boolean", + "example": true + }, + "sitemap_path": + { + "description": "Sitemap path", + "type": "string", + "example": "https://example.com/sitemap.xml" + }, + "file_data_retension": + { + "description": "File data retension", + "type": "boolean", + "example": true + }, + "is_ocr_enabled": + { + "description": "OCR enabled", + "type": "boolean", + "example": false + }, + "is_anonymized": + { + "description": "Anonymized", + "type": "boolean", + "example": false + }, + "file": + { + "description": "File", + "format": "binary", + "type": "string", + "example": "file.pdf" + } + } + } + } + } + }, + "responses": + { + "200": + { + "description": "Project has been updated", + "content": + { + "application/json": + { + "schema": + { + "type": "object", + "properties": + { + "status": + { + "description": "The status of the response", + "enum": + [ + "error", + "success" + ], + "type": "string", + "example": "success" + }, + "data": + { + "type": "object", + "properties": + { + "id": + { + "description": "Project ID", + "type": "integer", + "example": 1 + }, + "project_name": + { + "description": "Project name", + "type": "string", + "example": "My Project" + }, + "sitemap_path": + { + "description": "Project sitemap", + "type": "string", + "example": "https://www.example.com/sitemap.xml" + }, + "is_chat_active": + { + "description": "Whether the chat bot is active or not", + "default": false, + "type": "boolean", + "example": true + }, + "user_id": + { + "description": "User ID of the project owner", + "type": "integer", + "example": 1 + }, + "team_id": + { + "description": "Team ID of the project owner", + "type": "integer", + "example": 1 + }, + "created_at": + { + "description": "Date and time when the project was created", + "default": "2023-05-08 13:06:55", + "format": "date-time", + "type": "string", + "example": "2021-01-01 00:00:00" + }, + "updated_at": + { + "description": "Date and time when the project was last updated", + "default": "2023-05-08 13:06:55", + "format": "date-time", + "type": "string", + "example": "2021-01-01 00:00:00" + }, + "type": + { + "description": "Project type", + "enum": + [ + "SITEMAP", + "URL" + ], + "default": "SITEMAP", + "type": "string", + "example": "SITEMAP" + }, + "is_shared": + { + "description": "Whether the project is shared or not", + "default": false, + "type": "boolean", + "example": true + }, + "shareable_slug": + { + "description": "Shareable slug that can be used to share the project", + "format": "md5", + "type": "string", + "nullable": true, + "example": "1234567890abcdef1234567890abcdef" + }, + "shareable_link": + { + "description": "Shareable link that can be used to share the project", + "format": "url", + "type": "string", + "nullable": true + }, + "embed_code": + { + "description": "Embed code that can be used to embed the project", + "format": "html", + "type": "string", + "nullable": true + }, + "live_chat_code": + { + "description": "Live chat code that can be used to embed the live chat", + "format": "html", + "type": "string", + "nullable": true + } + } + } + } + } + } + } + }, + "400": + { + "description": "Bad Argument", + "content": + { + "application/json": + { + "schema": + { + "type": "object", + "properties": + { + "status": + { + "description": "The status of the response", + "enum": + [ + "error", + "success" + ], + "type": "string", + "example": "error" + }, + "url": + { + "description": "The URL of the request", + "type": "string", + "example": "https://app.customgpt.ai/api/v1/projects/1" + }, + "data": + { + "type": "object", + "properties": + { + "code": + { + "description": "The error status code", + "enum": + [ + 400, + 401, + 403, + 404, + 500, + 503 + ], + "type": "integer", + "example": 400 + }, + "message": + { + "description": "The error message", + "type": "string", + "example": "Project id must be integer" + } + } + } + } + } + } + } + }, + "401": + { + "description": "API Token is either missing or invalid", + "content": + { + "application/json": + { + "schema": + { + "type": "object", + "properties": + { + "status": + { + "description": "The status of the response", + "enum": + [ + "error", + "success" + ], + "type": "string", + "example": "error" + }, + "url": + { + "description": "The URL of the request", + "type": "string", + "example": "https://app.customgpt.ai/api/v1/projects/1" + }, + "data": + { + "type": "object", + "properties": + { + "code": + { + "description": "The error status code", + "enum": + [ + 400, + 401, + 403, + 404, + 500, + 503 + ], + "type": "integer", + "example": 401 + }, + "message": + { + "type": "string", + "example": "API Token is either missing or invalid" + } + } + } + } + } + } + } + }, + "404": + { + "description": "Project not found", + "content": + { + "application/json": + { + "schema": + { + "type": "object", + "properties": + { + "status": + { + "description": "The status of the response", + "enum": + [ + "error", + "success" + ], + "type": "string", + "example": "error" + }, + "url": + { + "description": "The URL of the request", + "type": "string", + "example": "https://app.customgpt.ai/api/v1/projects/1" + }, + "data": + { + "type": "object", + "properties": + { + "code": + { + "description": "The error status code", + "enum": + [ + 400, + 401, + 403, + 404, + 500, + 503 + ], + "type": "integer", + "example": 404 + }, + "message": + { + "description": "The error message", + "enum": + [ + "Project id is required", + "Project with id {projectId} not found" + ], + "type": "string", + "example": "Project with id 1 not found" + } + } + } + } + } + } + } + }, + "500": + { + "description": "Internal Server Error", + "content": + { + "application/json": + { + "schema": + { + "type": "object", + "properties": + { + "status": + { + "description": "The status of the response", + "enum": + [ + "error", + "success" + ], + "type": "string", + "example": "error" + }, + "url": + { + "description": "The URL of the request", + "type": "string", + "example": "https://app.customgpt.ai/api/v1/projects/1" + }, + "data": + { + "type": "object", + "properties": + { + "code": + { + "description": "The error status code", + "enum": + [ + 400, + 401, + 403, + 404, + 500, + 503 + ], + "type": "integer", + "example": 500 + }, + "message": + { + "type": "string", + "example": "Internal Server Error" + } + } + } + } + } + } + } + } + }, + "security": + [ + { + "BearerToken": + [] + } + ] + }, + "delete": + { + "tags": + [ + "Projects" + ], + "summary": "Delete a certain project.", + "operationId": "delete_project", + "description": "Delete a project by its unique project ID. This endpoint allows you to remove an existing project from the system based on its ID.\nHere is an example to delete a project: [API](https://github.com/Poll-The-People/customgpt-cookbook/blob/main/examples/Delete_a_project.ipynb) [SDK](https://github.com/Poll-The-People/customgpt-cookbook/blob/main/examples/SDK_Delete_a_project.ipynb).", + "parameters": + [ + { + "name": "projectId", + "in": "path", + "description": "The unique identifier of a project.", + "required": true, + "schema": + { + "type": "integer" + } + } + ], + "responses": + { + "200": + { + "description": "Project deleted successfully", + "content": + { + "application/json": + { + "schema": + { + "type": "object", + "properties": + { + "status": + { + "description": "The status of the response", + "enum": + [ + "error", + "success" + ], + "type": "string", + "example": "success" + }, + "data": + { + "type": "object", + "properties": + { + "deleted": + { + "description": "Whether the project was deleted successfully or not", + "type": "boolean", + "example": true + } + } + } + } + } + } + } + }, + "400": + { + "description": "Bad Argument", + "content": + { + "application/json": + { + "schema": + { + "type": "object", + "properties": + { + "status": + { + "description": "The status of the response", + "enum": + [ + "error", + "success" + ], + "type": "string", + "example": "error" + }, + "url": + { + "description": "The URL of the request", + "type": "string", + "example": "https://app.customgpt.ai/api/v1/projects/1" + }, + "data": + { + "type": "object", + "properties": + { + "code": + { + "description": "The error status code", + "enum": + [ + 400, + 401, + 403, + 404, + 500, + 503 + ], + "type": "integer", + "example": 400 + }, + "message": + { + "description": "The error message", + "type": "string", + "example": "Project id must be integer" + } + } + } + } + } + } + } + }, + "401": + { + "description": "API Token is either missing or invalid", + "content": + { + "application/json": + { + "schema": + { + "type": "object", + "properties": + { + "status": + { + "description": "The status of the response", + "enum": + [ + "error", + "success" + ], + "type": "string", + "example": "error" + }, + "url": + { + "description": "The URL of the request", + "type": "string", + "example": "https://app.customgpt.ai/api/v1/projects/1" + }, + "data": + { + "type": "object", + "properties": + { + "code": + { + "description": "The error status code", + "enum": + [ + 400, + 401, + 403, + 404, + 500, + 503 + ], + "type": "integer", + "example": 401 + }, + "message": + { + "type": "string", + "example": "API Token is either missing or invalid" + } + } + } + } + } + } + } + }, + "404": + { + "description": "Project not found", + "content": + { + "application/json": + { + "schema": + { + "type": "object", + "properties": + { + "status": + { + "description": "The status of the response", + "enum": + [ + "error", + "success" + ], + "type": "string", + "example": "error" + }, + "url": + { + "description": "The URL of the request", + "type": "string", + "example": "https://app.customgpt.ai/api/v1/projects/1" + }, + "data": + { + "type": "object", + "properties": + { + "code": + { + "description": "The error status code", + "enum": + [ + 400, + 401, + 403, + 404, + 500, + 503 + ], + "type": "integer", + "example": 404 + }, + "message": + { + "description": "The error message", + "enum": + [ + "Project id is required", + "Project with id {projectId} not found" + ], + "type": "string", + "example": "Project with id 1 not found" + } + } + } + } + } + } + } + }, + "500": + { + "description": "Internal Server Error", + "content": + { + "application/json": + { + "schema": + { + "type": "object", + "properties": + { + "status": + { + "description": "The status of the response", + "enum": + [ + "error", + "success" + ], + "type": "string", + "example": "error" + }, + "url": + { + "description": "The URL of the request", + "type": "string", + "example": "https://app.customgpt.ai/api/v1/projects/1" + }, + "data": + { + "type": "object", + "properties": + { + "code": + { + "description": "The error status code", + "enum": + [ + 400, + 401, + 403, + 404, + 500, + 503 + ], + "type": "integer", + "example": 500 + }, + "message": + { + "type": "string", + "example": "Internal Server Error" + } + } + } + } + } + } + } + } + }, + "security": + [ + { + "BearerToken": + [] + } + ] + } + }, + "/api/v1/projects/{projectId}/replicate": + { + "post": + { + "tags": + [ + "Projects" + ], + "summary": "Replicate project by given Project ID.", + "operationId": "replicate_project", + "description": "Create a copy pf project by replicating project info, settings, sitemap sources and uploaded files. This endpoint enables you to initiate the replication of a project by supplying the necessary project id value. The system will process the replicated data and generate a new project based on the information of existing project.", + "parameters": + [ + { + "name": "projectId", + "in": "path", + "description": "The unique project identifier.", + "required": true, + "schema": + { + "type": "integer", + "example": 1 + } + } + ], + "responses": + { + "201": + { + "description": "Project has been created", + "content": + { + "application/json": + { + "schema": + { + "type": "object", + "properties": + { + "status": + { + "description": "The status of the response", + "enum": + [ + "error", + "success" + ], + "type": "string", + "example": "success" + }, + "data": + { + "type": "object", + "properties": + { + "id": + { + "description": "Project ID", + "type": "integer", + "example": 1 + }, + "project_name": + { + "description": "Project name", + "type": "string", + "example": "My Project" + }, + "sitemap_path": + { + "description": "Project sitemap", + "type": "string", + "example": "https://www.example.com/sitemap.xml" + }, + "is_chat_active": + { + "description": "Whether the chat bot is active or not", + "default": false, + "type": "boolean", + "example": true + }, + "user_id": + { + "description": "User ID of the project owner", + "type": "integer", + "example": 1 + }, + "team_id": + { + "description": "Team ID of the project owner", + "type": "integer", + "example": 1 + }, + "created_at": + { + "description": "Date and time when the project was created", + "default": "2023-05-08 13:06:55", + "format": "date-time", + "type": "string", + "example": "2021-01-01 00:00:00" + }, + "updated_at": + { + "description": "Date and time when the project was last updated", + "default": "2023-05-08 13:06:55", + "format": "date-time", + "type": "string", + "example": "2021-01-01 00:00:00" + }, + "type": + { + "description": "Project type", + "enum": + [ + "SITEMAP", + "URL" + ], + "default": "SITEMAP", + "type": "string", + "example": "SITEMAP" + }, + "is_shared": + { + "description": "Whether the project is shared or not", + "default": false, + "type": "boolean", + "example": true + }, + "shareable_slug": + { + "description": "Shareable slug that can be used to share the project", + "format": "md5", + "type": "string", + "nullable": true, + "example": "1234567890abcdef1234567890abcdef" + }, + "shareable_link": + { + "description": "Shareable link that can be used to share the project", + "format": "url", + "type": "string", + "nullable": true + }, + "embed_code": + { + "description": "Embed code that can be used to embed the project", + "format": "html", + "type": "string", + "nullable": true + }, + "live_chat_code": + { + "description": "Live chat code that can be used to embed the live chat", + "format": "html", + "type": "string", + "nullable": true + } + } + } + } + } + } + } + }, + "400": + { + "description": "Project creation failed", + "content": + { + "application/json": + { + "schema": + { + "type": "object", + "properties": + { + "status": + { + "description": "The status of the response", + "enum": + [ + "error", + "success" + ], + "type": "string", + "example": "error" + }, + "url": + { + "description": "The URL of the request", + "type": "string", + "example": "https://app.customgpt.ai/api/v1/projects/1" + }, + "data": + { + "type": "object", + "properties": + { + "code": + { + "description": "The error status code", + "enum": + [ + 400, + 401, + 403, + 404, + 500, + 503 + ], + "type": "integer", + "example": 400 + }, + "message": + { + "description": "The error message", + "enum": + [ + "Project name can't be empty", + "Sitemap path can't be empty", + "You have reached your monthly project limit" + ], + "type": "string", + "example": "Project name can't be empty" + } + } + } + } + } + } + } + }, + "401": + { + "description": "API Token is either missing or invalid", + "content": + { + "application/json": + { + "schema": + { + "type": "object", + "properties": + { + "status": + { + "description": "The status of the response", + "enum": + [ + "error", + "success" + ], + "type": "string", + "example": "error" + }, + "url": + { + "description": "The URL of the request", + "type": "string", + "example": "https://app.customgpt.ai/api/v1/projects/1" + }, + "data": + { + "type": "object", + "properties": + { + "code": + { + "description": "The error status code", + "enum": + [ + 400, + 401, + 403, + 404, + 500, + 503 + ], + "type": "integer", + "example": 401 + }, + "message": + { + "type": "string", + "example": "API Token is either missing or invalid" + } + } + } + } + } + } + } + }, + "500": + { + "description": "Internal Server Error", + "content": + { + "application/json": + { + "schema": + { + "type": "object", + "properties": + { + "status": + { + "description": "The status of the response", + "enum": + [ + "error", + "success" + ], + "type": "string", + "example": "error" + }, + "url": + { + "description": "The URL of the request", + "type": "string", + "example": "https://app.customgpt.ai/api/v1/projects/1" + }, + "data": + { + "type": "object", + "properties": + { + "code": + { + "description": "The error status code", + "enum": + [ + 400, + 401, + 403, + 404, + 500, + 503 + ], + "type": "integer", + "example": 500 + }, + "message": + { + "type": "string", + "example": "Internal Server Error" + } + } + } + } + } + } + } + } + }, + "security": + [ + { + "BearerToken": + [] + } + ] + } + }, + "/api/v1/projects/{projectId}/stats": + { + "get": + { + "tags": + [ + "Projects" + ], + "summary": "Get the stats for a certain project.", + "operationId": "stats_project", + "description": "Retrieve statistical data for a project using its unique projectId. This endpoint provides extensive statistics about the project's performance, activity, or other relevant metrics.\nHere is an example to a specific object stats: [API](https://github.com/Poll-The-People/customgpt-cookbook/blob/main/examples/Get_Project_Stats.ipynb) [SDK](https://github.com/Poll-The-People/customgpt-cookbook/blob/main/examples/SDK_Get_Project_Stats.ipynb).", + "parameters": + [ + { + "name": "projectId", + "in": "path", + "description": "The unique identifier of a project.", + "required": true, + "schema": + { + "type": "integer" + } + } + ], + "responses": + { + "200": + { + "description": "Project stats", + "content": + { + "application/json": + { + "schema": + { + "type": "object", + "properties": + { + "status": + { + "description": "The status of the response", + "enum": + [ + "error", + "success" + ], + "type": "string", + "example": "success" + }, + "data": + { + "type": "object", + "properties": + { + "pages_found": + { + "description": "Number of pages found for the project", + "type": "integer", + "example": 100 + }, + "pages_crawled": + { + "description": "Number of pages crawled for the project", + "type": "integer", + "example": 100 + }, + "pages_indexed": + { + "description": "Number of pages indexed for the project", + "type": "integer", + "example": 100 + }, + "crawl_credits_used": + { + "description": "Number of crawl credits used for the project", + "type": "integer", + "example": 100 + }, + "query_credits_used": + { + "description": "Number of query credits used for the project", + "type": "integer", + "example": 100 + }, + "total_queries": + { + "description": "Number of queries used for the project", + "type": "integer", + "example": 100 + }, + "total_words_indexed": + { + "description": "Number of index credits used for the project", + "type": "integer", + "example": 100 + }, + "total_storage_credits_used": + { + "description": "Number of words stored for the project", + "type": "integer", + "example": 100 + } + } + } + } + } + } + } + }, + "400": + { + "description": "Bad Argument", + "content": + { + "application/json": + { + "schema": + { + "type": "object", + "properties": + { + "status": + { + "description": "The status of the response", + "enum": + [ + "error", + "success" + ], + "type": "string", + "example": "error" + }, + "url": + { + "description": "The URL of the request", + "type": "string", + "example": "https://app.customgpt.ai/api/v1/projects/1" + }, + "data": + { + "type": "object", + "properties": + { + "code": + { + "description": "The error status code", + "enum": + [ + 400, + 401, + 403, + 404, + 500, + 503 + ], + "type": "integer", + "example": 400 + }, + "message": + { + "description": "The error message", + "type": "string", + "example": "Project id must be integer" + } + } + } + } + } + } + } + }, + "401": + { + "description": "API Token is either missing or invalid", + "content": + { + "application/json": + { + "schema": + { + "type": "object", + "properties": + { + "status": + { + "description": "The status of the response", + "enum": + [ + "error", + "success" + ], + "type": "string", + "example": "error" + }, + "url": + { + "description": "The URL of the request", + "type": "string", + "example": "https://app.customgpt.ai/api/v1/projects/1" + }, + "data": + { + "type": "object", + "properties": + { + "code": + { + "description": "The error status code", + "enum": + [ + 400, + 401, + 403, + 404, + 500, + 503 + ], + "type": "integer", + "example": 401 + }, + "message": + { + "type": "string", + "example": "API Token is either missing or invalid" + } + } + } + } + } + } + } + }, + "404": + { + "description": "Project not found", + "content": + { + "application/json": + { + "schema": + { + "type": "object", + "properties": + { + "status": + { + "description": "The status of the response", + "enum": + [ + "error", + "success" + ], + "type": "string", + "example": "error" + }, + "url": + { + "description": "The URL of the request", + "type": "string", + "example": "https://app.customgpt.ai/api/v1/projects/1" + }, + "data": + { + "type": "object", + "properties": + { + "code": + { + "description": "The error status code", + "enum": + [ + 400, + 401, + 403, + 404, + 500, + 503 + ], + "type": "integer", + "example": 404 + }, + "message": + { + "description": "The error message", + "enum": + [ + "Project id is required", + "Project with id {projectId} not found" + ], + "type": "string", + "example": "Project with id 1 not found" + } + } + } + } + } + } + } + }, + "500": + { + "description": "Internal Server Error", + "content": + { + "application/json": + { + "schema": + { + "type": "object", + "properties": + { + "status": + { + "description": "The status of the response", + "enum": + [ + "error", + "success" + ], + "type": "string", + "example": "error" + }, + "url": + { + "description": "The URL of the request", + "type": "string", + "example": "https://app.customgpt.ai/api/v1/projects/1" + }, + "data": + { + "type": "object", + "properties": + { + "code": + { + "description": "The error status code", + "enum": + [ + 400, + 401, + 403, + 404, + 500, + 503 + ], + "type": "integer", + "example": 500 + }, + "message": + { + "type": "string", + "example": "Internal Server Error" + } + } + } + } + } + } + } + } + }, + "security": + [ + { + "BearerToken": + [] + } + ] + } + }, + "/api/v1/projects/{projectId}/pages": + { + "get": + { + "tags": + [ + "Pages" + ], + "summary": "List all pages that belong to a project.", + "operationId": "get_pages", + "description": "Retrieve a list of all pages associated with a project. This endpoint allows you to fetch project details and a collection of pages that belong to a specific project. Each page object includes information such as the page ID, URL, hash of the URL, project ID, crawl status, index status, file details (if applicable), creation and update timestamps, and other relevant attributes.\nHere is an example to list all pages belonging to project: [API](https://github.com/Poll-The-People/customgpt-cookbook/blob/main/examples/List_all_pages_of_a_project.ipynb) [SDK](https://github.com/Poll-The-People/customgpt-cookbook/blob/main/examples/SDK_List_all_pages_belonging_to_a_project.ipynb).", + "parameters": + [ + { + "name": "projectId", + "in": "path", + "description": "The unique project identifier.", + "required": true, + "schema": + { + "type": "integer", + "example": 1 + } + }, + { + "name": "page", + "in": "query", + "description": "Page number to return", + "required": false, + "schema": + { + "default": 1, + "type": "integer" + } + }, + { + "name": "duration", + "in": "query", + "description": "The duration of the projects to list. Defaults to 90 days.", + "required": false, + "schema": + { + "default": 90, + "type": "integer" + } + }, + { + "name": "order", + "in": "query", + "description": "The order of the projects to list. Defaults to desc.", + "required": false, + "schema": + { + "enum": + [ + "asc", + "desc" + ], + "default": "desc", + "type": "string" + } + } + ], + "responses": + { + "200": + { + "description": "List of pages successfully retrieved.", + "content": + { + "application/json": + { + "schema": + { + "type": "object", + "properties": + { + "status": + { + "description": "The status of the response", + "enum": + [ + "error", + "success" + ], + "type": "string", + "example": "success" + }, + "data": + { + "type": "object", + "properties": + { + "project": + { + "type": "object", + "properties": + { + "id": + { + "description": "Project ID", + "type": "integer", + "example": 1 + }, + "project_name": + { + "description": "Project name", + "type": "string", + "example": "My Project" + }, + "sitemap_path": + { + "description": "Project sitemap", + "type": "string", + "example": "https://www.example.com/sitemap.xml" + }, + "is_chat_active": + { + "description": "Whether the chat bot is active or not", + "default": false, + "type": "boolean", + "example": true + }, + "user_id": + { + "description": "User ID of the project owner", + "type": "integer", + "example": 1 + }, + "team_id": + { + "description": "Team ID of the project owner", + "type": "integer", + "example": 1 + }, + "created_at": + { + "description": "Date and time when the project was created", + "default": "2023-05-08 13:06:55", + "format": "date-time", + "type": "string", + "example": "2021-01-01 00:00:00" + }, + "updated_at": + { + "description": "Date and time when the project was last updated", + "default": "2023-05-08 13:06:55", + "format": "date-time", + "type": "string", + "example": "2021-01-01 00:00:00" + }, + "type": + { + "description": "Project type", + "enum": + [ + "SITEMAP", + "URL" + ], + "default": "SITEMAP", + "type": "string", + "example": "SITEMAP" + }, + "is_shared": + { + "description": "Whether the project is shared or not", + "default": false, + "type": "boolean", + "example": true + }, + "shareable_slug": + { + "description": "Shareable slug that can be used to share the project", + "format": "md5", + "type": "string", + "nullable": true, + "example": "1234567890abcdef1234567890abcdef" + }, + "shareable_link": + { + "description": "Shareable link that can be used to share the project", + "format": "url", + "type": "string", + "nullable": true + }, + "embed_code": + { + "description": "Embed code that can be used to embed the project", + "format": "html", + "type": "string", + "nullable": true + }, + "live_chat_code": + { + "description": "Live chat code that can be used to embed the live chat", + "format": "html", + "type": "string", + "nullable": true + } + } + }, + "pages": + { + "type": "object", + "properties": + { + "current_page": + { + "description": "The current page number", + "type": "integer", + "example": 1 + }, + "data": + { + "type": "array", + "items": + { + "type": "object", + "properties": + { + "id": + { + "description": "Page ID", + "type": "integer", + "example": 1 + }, + "page_url": + { + "description": "URL of the page or file", + "type": "string", + "example": "https://example.com" + }, + "page_url_hash": + { + "description": "Hash of the URL of the page or file", + "format": "md5", + "type": "string", + "example": "d41d8cd98f00b204e9800998ecf8427e" + }, + "project_id": + { + "description": "Project ID", + "type": "integer", + "example": 1 + }, + "s3_path": + { + "description": "This is the path where the page is stored in S3.\\nNote: This is omitted in the response if the page is not a file", + "type": "string", + "nullable": true, + "example": "project-1/page-1/file.pdf" + }, + "crawl_status": + { + "description": "Crawl status of the page", + "enum": + [ + "ok", + "queued", + "failed", + "n/a", + "limited" + ], + "default": "queued", + "type": "string", + "example": "queued" + }, + "index_status": + { + "description": "Index status of the page", + "enum": + [ + "ok", + "queued", + "failed", + "n/a", + "limited" + ], + "default": "queued", + "type": "string", + "example": "queued" + }, + "is_file": + { + "description": "Whether the page is a file or not", + "default": false, + "type": "boolean", + "example": true + }, + "is_refreshable": + { + "description": "Whether the page can be refreshed or not", + "default": false, + "type": "boolean", + "example": true + }, + "is_file_kept": + { + "description": "Whether the file is kept after processing or not.\\nNote: This is omitted in the response if the page is not a file", + "default": true, + "type": "boolean", + "example": true + }, + "filename": + { + "description": "Filename of the page.\\nNote: This is omitted in the response if the page is not a file", + "type": "string", + "nullable": true, + "example": "file.pdf" + }, + "filesize": + { + "description": "Filesize of the page.\\nNote: This is omitted in the response if the page is not a file", + "type": "integer", + "nullable": true, + "example": 100 + }, + "created_at": + { + "description": "Date and time when the page was created", + "format": "date-time", + "type": "string", + "example": "2021-01-01 00:00:00" + }, + "updated_at": + { + "description": "Date and time when the page was updated", + "format": "date-time", + "type": "string", + "example": "2021-01-01 00:00:00" + } + } + } + }, + "first_page_url": + { + "description": "The first page url", + "type": "string", + "example": "https://app.customgpt.ai/api/v1/users?page=1" + }, + "from": + { + "description": "The first item number of the current page", + "type": "integer", + "example": 1 + }, + "last_page": + { + "description": "The last page number", + "type": "integer", + "example": 1 + }, + "last_page_url": + { + "description": "The last page url", + "type": "string", + "example": "https://app.customgpt.ai/api/v1/users?page=1" + }, + "next_page_url": + { + "description": "The next page url", + "type": "string", + "example": "https://app.customgpt.ai/api/v1/users?page=1" + }, + "path": + { + "description": "The current page url", + "type": "string", + "example": "https://app.customgpt.ai/api/v1/users?page=1" + }, + "per_page": + { + "description": "The number of items per page", + "type": "integer", + "example": 10 + }, + "prev_page_url": + { + "description": "The previous page url", + "type": "string", + "example": "https://app.customgpt.ai/api/v1/users?page=1" + }, + "to": + { + "description": "The last item number of the current page", + "type": "integer", + "example": 1 + }, + "total": + { + "description": "The total number of items", + "type": "integer", + "example": 1 + } + } + } + } + } + } + } + } + } + }, + "400": + { + "description": "Bad Argument", + "content": + { + "application/json": + { + "schema": + { + "type": "object", + "properties": + { + "status": + { + "description": "The status of the response", + "enum": + [ + "error", + "success" + ], + "type": "string", + "example": "error" + }, + "url": + { + "description": "The URL of the request", + "type": "string", + "example": "https://app.customgpt.ai/api/v1/projects/1" + }, + "data": + { + "type": "object", + "properties": + { + "code": + { + "description": "The error status code", + "enum": + [ + 400, + 401, + 403, + 404, + 500, + 503 + ], + "type": "integer", + "example": 400 + }, + "message": + { + "description": "The error message", + "type": "string", + "example": "Project id must be integer" + } + } + } + } + } + } + } + }, + "401": + { + "description": "API Token is either missing or invalid", + "content": + { + "application/json": + { + "schema": + { + "type": "object", + "properties": + { + "status": + { + "description": "The status of the response", + "enum": + [ + "error", + "success" + ], + "type": "string", + "example": "error" + }, + "url": + { + "description": "The URL of the request", + "type": "string", + "example": "https://app.customgpt.ai/api/v1/projects/1" + }, + "data": + { + "type": "object", + "properties": + { + "code": + { + "description": "The error status code", + "enum": + [ + 400, + 401, + 403, + 404, + 500, + 503 + ], + "type": "integer", + "example": 401 + }, + "message": + { + "type": "string", + "example": "API Token is either missing or invalid" + } + } + } + } + } + } + } + }, + "404": + { + "description": "Project not found", + "content": + { + "application/json": + { + "schema": + { + "type": "object", + "properties": + { + "status": + { + "description": "The status of the response", + "enum": + [ + "error", + "success" + ], + "type": "string", + "example": "error" + }, + "url": + { + "description": "The URL of the request", + "type": "string", + "example": "https://app.customgpt.ai/api/v1/projects/1" + }, + "data": + { + "type": "object", + "properties": + { + "code": + { + "description": "The error status code", + "enum": + [ + 400, + 401, + 403, + 404, + 500, + 503 + ], + "type": "integer", + "example": 404 + }, + "message": + { + "description": "The error message", + "enum": + [ + "Project id is required", + "Project with id {projectId} not found" + ], + "type": "string", + "example": "Project with id 1 not found" + } + } + } + } + } + } + } + }, + "500": + { + "description": "Internal Server Error", + "content": + { + "application/json": + { + "schema": + { + "type": "object", + "properties": + { + "status": + { + "description": "The status of the response", + "enum": + [ + "error", + "success" + ], + "type": "string", + "example": "error" + }, + "url": + { + "description": "The URL of the request", + "type": "string", + "example": "https://app.customgpt.ai/api/v1/projects/1" + }, + "data": + { + "type": "object", + "properties": + { + "code": + { + "description": "The error status code", + "enum": + [ + 400, + 401, + 403, + 404, + 500, + 503 + ], + "type": "integer", + "example": 500 + }, + "message": + { + "type": "string", + "example": "Internal Server Error" + } + } + } + } + } + } + } + } + }, + "security": + [ + { + "BearerToken": + [] + } + ] + } + }, + "/api/v1/projects/{projectId}/pages/{pageId}": + { + "delete": + { + "tags": + [ + "Pages" + ], + "summary": "Delete a certain page that belongs to a certain project.", + "operationId": "delete_page", + "description": "Delete a specific page within a project based on its unique projectId and pageId. This endpoint allows you to remove a particular page from the project, permanently deleting its associated context.\nHere is an example to delete a certain page: [API](https://github.com/Poll-The-People/customgpt-cookbook/blob/main/examples/Delete_a_page_from_the_project.ipynb) [SDK](https://github.com/Poll-The-People/customgpt-cookbook/blob/main/examples/SDK_Delete_a_project_page.ipynb).", + "parameters": + [ + { + "name": "projectId", + "in": "path", + "description": "The unique project identifier.", + "required": true, + "schema": + { + "type": "integer" + } + }, + { + "name": "pageId", + "in": "path", + "description": "The page id", + "required": true, + "schema": + { + "type": "integer" + } + } + ], + "responses": + { + "200": + { + "description": "Project deleted successfully", + "content": + { + "application/json": + { + "schema": + { + "type": "object", + "properties": + { + "status": + { + "description": "The status of the response", + "enum": + [ + "error", + "success" + ], + "type": "string", + "example": "success" + }, + "data": + { + "type": "object", + "properties": + { + "deleted": + { + "description": "Whether the project was deleted successfully or not", + "type": "boolean", + "example": true + } + } + } + } + } + } + } + }, + "400": + { + "description": "Bad Argument", + "content": + { + "application/json": + { + "schema": + { + "type": "object", + "properties": + { + "status": + { + "description": "The status of the response", + "enum": + [ + "error", + "success" + ], + "type": "string", + "example": "error" + }, + "url": + { + "description": "The URL of the request", + "type": "string", + "example": "https://app.customgpt.ai/api/v1/projects/1" + }, + "data": + { + "type": "object", + "properties": + { + "code": + { + "description": "The error status code", + "enum": + [ + 400, + 401, + 403, + 404, + 500, + 503 + ], + "type": "integer", + "example": 400 + }, + "message": + { + "description": "The error message", + "type": "string", + "example": "Project id must be integer" + } + } + } + } + } + } + } + }, + "401": + { + "description": "API Token is either missing or invalid", + "content": + { + "application/json": + { + "schema": + { + "type": "object", + "properties": + { + "status": + { + "description": "The status of the response", + "enum": + [ + "error", + "success" + ], + "type": "string", + "example": "error" + }, + "url": + { + "description": "The URL of the request", + "type": "string", + "example": "https://app.customgpt.ai/api/v1/projects/1" + }, + "data": + { + "type": "object", + "properties": + { + "code": + { + "description": "The error status code", + "enum": + [ + 400, + 401, + 403, + 404, + 500, + 503 + ], + "type": "integer", + "example": 401 + }, + "message": + { + "type": "string", + "example": "API Token is either missing or invalid" + } + } + } + } + } + } + } + }, + "404": + { + "description": "Project not found", + "content": + { + "application/json": + { + "schema": + { + "type": "object", + "properties": + { + "status": + { + "description": "The status of the response", + "enum": + [ + "error", + "success" + ], + "type": "string", + "example": "error" + }, + "url": + { + "description": "The URL of the request", + "type": "string", + "example": "https://app.customgpt.ai/api/v1/projects/1" + }, + "data": + { + "type": "object", + "properties": + { + "code": + { + "description": "The error status code", + "enum": + [ + 400, + 401, + 403, + 404, + 500, + 503 + ], + "type": "integer", + "example": 404 + }, + "message": + { + "description": "The error message", + "enum": + [ + "Project id is required", + "Project with id {projectId} not found" + ], + "type": "string", + "example": "Project with id 1 not found" + } + } + } + } + } + } + } + }, + "500": + { + "description": "Internal Server Error", + "content": + { + "application/json": + { + "schema": + { + "type": "object", + "properties": + { + "status": + { + "description": "The status of the response", + "enum": + [ + "error", + "success" + ], + "type": "string", + "example": "error" + }, + "url": + { + "description": "The URL of the request", + "type": "string", + "example": "https://app.customgpt.ai/api/v1/projects/1" + }, + "data": + { + "type": "object", + "properties": + { + "code": + { + "description": "The error status code", + "enum": + [ + 400, + 401, + 403, + 404, + 500, + 503 + ], + "type": "integer", + "example": 500 + }, + "message": + { + "type": "string", + "example": "Internal Server Error" + } + } + } + } + } + } + } + } + }, + "security": + [ + { + "BearerToken": + [] + } + ] + } + }, + "/api/v1/projects/{projectId}/pages/{pageId}/reindex": + { + "post": + { + "tags": + [ + "Pages" + ], + "summary": "Reindex a certain page that belongs to a certain project.", + "operationId": "reindex_page", + "description": "Reindex a specific page within a project based on its unique projectId and pageId. This endpoint allows you to refresh a particular page from the project. Our system will crawl and index page content newly.", + "parameters": + [ + { + "name": "projectId", + "in": "path", + "description": "The unique project identifier.", + "required": true, + "schema": + { + "type": "integer" + } + }, + { + "name": "pageId", + "in": "path", + "description": "The page id", + "required": true, + "schema": + { + "type": "integer" + } + } + ], + "responses": + { + "200": + { + "description": "Page reindex process start successfully", + "content": + { + "application/json": + { + "schema": + { + "type": "object", + "properties": + { + "status": + { + "description": "The status of the response", + "enum": + [ + "error", + "success" + ], + "type": "string", + "example": "success" + }, + "data": + { + "type": "object", + "properties": + { + "updated": + { + "description": "Whether the page start reindex process successfully or not", + "type": "boolean", + "example": true + } + } + } + } + } + } + } + }, + "400": + { + "description": "Bad Argument", + "content": + { + "application/json": + { + "schema": + { + "type": "object", + "properties": + { + "status": + { + "description": "The status of the response", + "enum": + [ + "error", + "success" + ], + "type": "string", + "example": "error" + }, + "url": + { + "description": "The URL of the request", + "type": "string", + "example": "https://app.customgpt.ai/api/v1/projects/1" + }, + "data": + { + "type": "object", + "properties": + { + "code": + { + "description": "The error status code", + "enum": + [ + 400, + 401, + 403, + 404, + 500, + 503 + ], + "type": "integer", + "example": 400 + }, + "message": + { + "description": "The error message", + "type": "string", + "example": "Project id must be integer" + } + } + } + } + } + } + } + }, + "401": + { + "description": "API Token is either missing or invalid", + "content": + { + "application/json": + { + "schema": + { + "type": "object", + "properties": + { + "status": + { + "description": "The status of the response", + "enum": + [ + "error", + "success" + ], + "type": "string", + "example": "error" + }, + "url": + { + "description": "The URL of the request", + "type": "string", + "example": "https://app.customgpt.ai/api/v1/projects/1" + }, + "data": + { + "type": "object", + "properties": + { + "code": + { + "description": "The error status code", + "enum": + [ + 400, + 401, + 403, + 404, + 500, + 503 + ], + "type": "integer", + "example": 401 + }, + "message": + { + "type": "string", + "example": "API Token is either missing or invalid" + } + } + } + } + } + } + } + }, + "403": + { + "description": "Page cannot be reindexed", + "content": + { + "application/json": + { + "schema": + { + "type": "object", + "properties": + { + "status": + { + "description": "The status of the response", + "enum": + [ + "error", + "success" + ], + "type": "string", + "example": "error" + }, + "url": + { + "description": "The URL of the request", + "type": "string", + "example": "https://app.customgpt.ai/api/v1/projects/1" + }, + "data": + { + "type": "object", + "properties": + { + "code": + { + "description": "The error status code", + "enum": + [ + 400, + 401, + 403, + 404, + 500, + 503 + ], + "type": "integer", + "example": 400 + }, + "message": + { + "description": "The error message", + "enum": + [ + "Page with id {pageId} cannot be reindexed" + ], + "type": "string", + "example": "Page with id 1 cannot be reindexed" + } + } + } + } + } + } + } + }, + "500": + { + "description": "Internal Server Error", + "content": + { + "application/json": + { + "schema": + { + "type": "object", + "properties": + { + "status": + { + "description": "The status of the response", + "enum": + [ + "error", + "success" + ], + "type": "string", + "example": "error" + }, + "url": + { + "description": "The URL of the request", + "type": "string", + "example": "https://app.customgpt.ai/api/v1/projects/1" + }, + "data": + { + "type": "object", + "properties": + { + "code": + { + "description": "The error status code", + "enum": + [ + 400, + 401, + 403, + 404, + 500, + 503 + ], + "type": "integer", + "example": 500 + }, + "message": + { + "type": "string", + "example": "Internal Server Error" + } + } + } + } + } + } + } + } + }, + "security": + [ + { + "BearerToken": + [] + } + ] + } + }, + "/api/v1/projects/{projectId}/pages/{pageId}/metadata": + { + "get": + { + "tags": + [ + "Page Metadata" + ], + "summary": "Get the Metadata for a certain page.", + "operationId": "get_metadata", + "description": "Retrieve the Metadata for a page based on its unique identifier. This endpoint allows you to fetch the metadata associated with a specific page.", + "parameters": + [ + { + "name": "projectId", + "in": "path", + "description": "The unique identifier of the project.", + "required": true, + "schema": + { + "type": "integer" + } + }, + { + "name": "pageId", + "in": "path", + "description": "The unique identifier of the page.", + "required": true, + "schema": + { + "type": "string" + } + } + ], + "responses": + { + "200": + { + "description": "Get the Page metadata data for a citation", + "content": + { + "application/json": + { + "schema": + { + "type": "object", + "properties": + { + "status": + { + "description": "The status of the response", + "enum": + [ + "error", + "success" + ], + "type": "string", + "example": "success" + }, + "data": + { + "type": "object", + "properties": + { + "id": + { + "description": "The unique identifier of the page", + "type": "integer", + "example": 1 + }, + "url": + { + "description": "The URL of the page", + "type": "string", + "nullable": true, + "example": "https://www.example.com" + }, + "title": + { + "description": "The title of the page", + "type": "string", + "nullable": true, + "example": "Example Domain" + }, + "description": + { + "description": "The description of the page", + "type": "string", + "nullable": true, + "example": "This domain is for use in illustrative examples in documents. You may use this domain in literature without prior coordination or asking for permission." + }, + "image": + { + "description": "The image of the page", + "type": "string", + "nullable": true, + "example": "https://www.example.com/image.png" + } + } + } + } + } + } + } + }, + "400": + { + "description": "Create page metadata failed", + "content": + { + "application/json": + { + "schema": + { + "type": "object", + "properties": + { + "status": + { + "description": "The status of the response", + "enum": + [ + "error", + "success" + ], + "type": "string", + "example": "error" + }, + "url": + { + "description": "The URL of the request", + "type": "string", + "example": "https://app.customgpt.ai/api/v1/projects/1" + }, + "data": + { + "type": "object", + "properties": + { + "code": + { + "description": "The error status code", + "enum": + [ + 400, + 401, + 403, + 404, + 500, + 503 + ], + "type": "integer", + "example": 400 + }, + "message": + { + "description": "The error message", + "type": "string", + "example": "Something went wrong." + } + } + } + } + } + } + } + }, + "401": + { + "description": "API Token is either missing or invalid", + "content": + { + "application/json": + { + "schema": + { + "type": "object", + "properties": + { + "status": + { + "description": "The status of the response", + "enum": + [ + "error", + "success" + ], + "type": "string", + "example": "error" + }, + "url": + { + "description": "The URL of the request", + "type": "string", + "example": "https://app.customgpt.ai/api/v1/projects/1" + }, + "data": + { + "type": "object", + "properties": + { + "code": + { + "description": "The error status code", + "enum": + [ + 400, + 401, + 403, + 404, + 500, + 503 + ], + "type": "integer", + "example": 401 + }, + "message": + { + "type": "string", + "example": "API Token is either missing or invalid" + } + } + } + } + } + } + } + }, + "404": + { + "description": "Page not found", + "content": + { + "application/json": + { + "schema": + { + "type": "object", + "properties": + { + "status": + { + "description": "The status of the response", + "enum": + [ + "error", + "success" + ], + "type": "string", + "example": "error" + }, + "url": + { + "description": "The URL of the request", + "type": "string", + "example": "https://app.customgpt.ai/api/v1/projects/1" + }, + "data": + { + "type": "object", + "properties": + { + "code": + { + "description": "The error status code", + "enum": + [ + 400, + 401, + 403, + 404, + 500, + 503 + ], + "type": "integer", + "example": 404 + }, + "message": + { + "description": "The error message", + "enum": + [ + "Page id is required", + "Page with id {pageId} not found" + ], + "type": "string", + "example": "Page with id 1 not found" + } + } + } + } + } + } + } + } + }, + "security": + [ + { + "BearerToken": + [] + } + ] + }, + "put": + { + "tags": + [ + "Page Metadata" + ], + "summary": "Update metadata for a certain page.", + "operationId": "update_metadata", + "description": "Update the metadata for a specific page identified by its unique pageId. This endpoint allows you to update the associated metadata of the page.", + "parameters": + [ + { + "name": "projectId", + "in": "path", + "description": "The id of a project in which page is stored.", + "required": true, + "schema": + { + "type": "integer" + } + }, + { + "name": "pageId", + "in": "path", + "description": "The id of a page in which metadata will be updated.", + "required": true, + "schema": + { + "type": "integer" + } + } + ], + "requestBody": + { + "description": "Update a page metadata", + "content": + { + "application/json": + { + "schema": + { + "type": "object", + "properties": + { + "title": + { + "description": "The title of the page used in citations", + "type": "string", + "maxLength": 255, + "nullable": true, + "example": "Title" + }, + "url": + { + "description": "The url of the page used in citations", + "type": "string", + "maxLength": 2000, + "nullable": true, + "example": "https://example.com/" + }, + "description": + { + "description": "The description of the page used in citations", + "type": "string", + "maxLength": 500, + "nullable": true, + "example": "One to two sentences." + }, + "image": + { + "description": "The url of the image used in citations", + "type": "string", + "maxLength": 2000, + "nullable": true, + "example": "https://example.com/image.png" + } + } + } + } + } + }, + "responses": + { + "200": + { + "description": "Get the Page metadata data for a citation", + "content": + { + "application/json": + { + "schema": + { + "type": "object", + "properties": + { + "status": + { + "description": "The status of the response", + "enum": + [ + "error", + "success" + ], + "type": "string", + "example": "success" + }, + "data": + { + "type": "object", + "properties": + { + "id": + { + "description": "The unique identifier of the page", + "type": "integer", + "example": 1 + }, + "url": + { + "description": "The URL of the page", + "type": "string", + "nullable": true, + "example": "https://www.example.com" + }, + "title": + { + "description": "The title of the page", + "type": "string", + "nullable": true, + "example": "Example Domain" + }, + "description": + { + "description": "The description of the page", + "type": "string", + "nullable": true, + "example": "This domain is for use in illustrative examples in documents. You may use this domain in literature without prior coordination or asking for permission." + }, + "image": + { + "description": "The image of the page", + "type": "string", + "nullable": true, + "example": "https://www.example.com/image.png" + } + } + } + } + } + } + } + }, + "400": + { + "description": "Bad Argument", + "content": + { + "application/json": + { + "schema": + { + "type": "object", + "properties": + { + "status": + { + "description": "The status of the response", + "enum": + [ + "error", + "success" + ], + "type": "string", + "example": "error" + }, + "url": + { + "description": "The URL of the request", + "type": "string", + "example": "https://app.customgpt.ai/api/v1/projects/1" + }, + "data": + { + "type": "object", + "properties": + { + "code": + { + "description": "The error status code", + "enum": + [ + 400, + 401, + 403, + 404, + 500, + 503 + ], + "type": "integer", + "example": 400 + }, + "message": + { + "description": "The error message", + "type": "string", + "example": "Project id must be integer" + } + } + } + } + } + } + } + }, + "401": + { + "description": "API Token is either missing or invalid", + "content": + { + "application/json": + { + "schema": + { + "type": "object", + "properties": + { + "status": + { + "description": "The status of the response", + "enum": + [ + "error", + "success" + ], + "type": "string", + "example": "error" + }, + "url": + { + "description": "The URL of the request", + "type": "string", + "example": "https://app.customgpt.ai/api/v1/projects/1" + }, + "data": + { + "type": "object", + "properties": + { + "code": + { + "description": "The error status code", + "enum": + [ + 400, + 401, + 403, + 404, + 500, + 503 + ], + "type": "integer", + "example": 401 + }, + "message": + { + "type": "string", + "example": "API Token is either missing or invalid" + } + } + } + } + } + } + } + }, + "404": + { + "description": "Page not found", + "content": + { + "application/json": + { + "schema": + { + "type": "object", + "properties": + { + "status": + { + "description": "The status of the response", + "enum": + [ + "error", + "success" + ], + "type": "string", + "example": "error" + }, + "url": + { + "description": "The URL of the request", + "type": "string", + "example": "https://app.customgpt.ai/api/v1/projects/1" + }, + "data": + { + "type": "object", + "properties": + { + "code": + { + "description": "The error status code", + "enum": + [ + 400, + 401, + 403, + 404, + 500, + 503 + ], + "type": "integer", + "example": 404 + }, + "message": + { + "description": "The error message", + "enum": + [ + "Page id is required", + "Page with id {pageId} not found" + ], + "type": "string", + "example": "Page with id 1 not found" + } + } + } + } + } + } + } + }, + "500": + { + "description": "Internal Server Error", + "content": + { + "application/json": + { + "schema": + { + "type": "object", + "properties": + { + "status": + { + "description": "The status of the response", + "enum": + [ + "error", + "success" + ], + "type": "string", + "example": "error" + }, + "url": + { + "description": "The URL of the request", + "type": "string", + "example": "https://app.customgpt.ai/api/v1/projects/1" + }, + "data": + { + "type": "object", + "properties": + { + "code": + { + "description": "The error status code", + "enum": + [ + 400, + 401, + 403, + 404, + 500, + 503 + ], + "type": "integer", + "example": 500 + }, + "message": + { + "type": "string", + "example": "Internal Server Error" + } + } + } + } + } + } + } + } + }, + "security": + [ + { + "BearerToken": + [] + } + ] + } + }, + "/api/v1/projects/{projectId}/settings": + { + "get": + { + "tags": + [ + "Project Settings" + ], + "summary": "Get project settings.", + "operationId": "get_project_settings", + "description": "Retrieve the project settings for a specific project. This endpoint allows you to fetch the configuration and settings associated with the project.\nHere is an example to get a project settings: [API](https://github.com/Poll-The-People/customgpt-cookbook/blob/main/examples/Get_Settings_for_a_particular_project.ipynb) [SDK](https://github.com/Poll-The-People/customgpt-cookbook/blob/main/examples/SDK_Get_settings_for_a_particular_project.ipynb).", + "parameters": + [ + { + "name": "projectId", + "in": "path", + "description": "The unique project identifier.", + "required": true, + "schema": + { + "type": "integer" + } + } + ], + "responses": + { + "200": + { + "description": "Project settings that belong to a certain project", + "content": + { + "application/json": + { + "schema": + { + "type": "object", + "properties": + { + "status": + { + "description": "The status of the response", + "enum": + [ + "error", + "success" + ], + "type": "string", + "example": "success" + }, + "data": + { + "type": "object", + "properties": + { + "chatbot_avatar": + { + "description": "This is the avatar that is shown in the bot response. You can make it a profile picture or your company logo.", + "type": "string", + "example": "https://example.com/chatbot_avatar.png" + }, + "chatbot_background": + { + "description": "This is the background image shown in the bot conversations widget. You can change it to a company logo or background image.", + "type": "string", + "example": "https://example.com/chatbot_background.png" + }, + "default_prompt": + { + "description": "This is the default prompt shown to the user. You can customize this for your company or client.", + "type": "string", + "example": "How can I help you?" + }, + "example_questions": + { + "description": "These are example questions shown to guide the bot users. You can create customized questions to suit your company or client needs.", + "type": "array", + "items": + { + "type": "string", + "example": "How do I get started?" + }, + "example": + [ + "How do I get started?" + ] + }, + "response_source": + { + "description": "By default, we ask ChatGPT to use only your content in its response (recommended). If you wish ChatGPT to improvise and use its own knowledgebase as well, you can select \"My Content + ChatGPT\"", + "enum": + [ + "default", + "own_content", + "openai_content" + ], + "type": "string", + "example": "own_content" + }, + "chatbot_msg_lang": + { + "description": "By default, the chatbot messages like 'Ask Me Anything' are in English. You can customize this to your preferred language. Please note: This setting does not control what language ChatGPT responds in. That is controlled by the user's question. So a user asking in Portuguese, will most likely get a response from ChatGPT in Portuguese.", + "type": "string", + "example": "en" + }, + "chatbot_color": + { + "description": "Color of the chatbot in hex format", + "type": "string", + "example": "#000000" + }, + "chatbot_toolbar_color": + { + "description": "Color of the chatbot toolbar in hex format", + "type": "string", + "example": "#000000" + }, + "persona_instructions": + { + "description": "Customize your chatbot behavior by adjusting the system parameter to control its personality traits and role.", + "type": "string", + "nullable": true, + "example": "You are a custom chatbot assistant called CustomGPT.ai, a friendly lawyer who answers questions based on the given context." + }, + "citations_answer_source_label_msg": + { + "description": "This is the message shown to indicate where the response came from. You can customize this message based on your business or language.", + "type": "string", + "nullable": true, + "example": "Where did this answer come from?" + }, + "citations_sources_label_msg": + { + "description": "This is the message shown for the Sources label. You can customize this message based on your business or language.", + "type": "string", + "nullable": true, + "example": "Sources" + }, + "hang_in_there_msg": + { + "description": "This is the message shown when the bot is thinking and waiting to answer. You can customize this message based on your tone, personality or language.", + "type": "string", + "nullable": true, + "example": "Hang in there! I'm thinking.." + }, + "chatbot_siesta_msg": + { + "description": "This is the message shown when the bot has encountered a problem or error. You can customize this message based on your tone, personality or language.", + "type": "string", + "nullable": true, + "example": "Oops! The chat bot is taking a siesta. This usually happens when OpenAI is down! Please try again later." + }, + "is_loading_indicator_enabled": + { + "description": "Show animated loading indicator while waiting for a response from the chatbot", + "default": true, + "type": "boolean", + "nullable": true, + "example": true + }, + "enable_citations": + { + "description": "Each chatbot response shows an option for the user to see the sources/citations from your content from which the response was generated.", + "enum": + [ + 0, + 1, + 2, + 3 + ], + "default": 3, + "type": "integer", + "nullable": true, + "example": 3 + }, + "enable_feedbacks": + { + "description": "Each chatbot response shows an thumbs up/down for the user to left own feedback.", + "default": true, + "type": "boolean", + "nullable": true, + "example": true + }, + "citations_view_type": + { + "description": "Control how citations are shown. By default, the user can initiate to see the citations. You can choose to have it \"Auto Shown\" or \"Auto Hide\"", + "enum": + [ + "user", + "show", + "hide" + ], + "default": "user", + "type": "string", + "nullable": true, + "example": "user" + }, + "no_answer_message": + { + "description": "This is the message shown when the bot cannot answer. You can customize it to a message asking the user to contact customer support or leave their email / phone.", + "default": "I'm sorry, I don't know the answer", + "type": "string", + "nullable": true, + "example": "Sorry, I don't have an answer for that." + }, + "ending_message": + { + "description": "You can instruct ChatGPT to end every response with some text like asking \"Please email us for further support\" (Not recommended for most use cases)", + "type": "string", + "nullable": true, + "example": "Please email us for further support" + }, + "remove_branding": + { + "description": "Controls what branding is shown at the bottom of the chatbot.", + "default": false, + "type": "boolean", + "nullable": true, + "example": false + }, + "enable_recaptcha_for_public_chatbots": + { + "description": "Should we check messages from guests with Recaptcha when your chatbot is publicly available (i.e. shared or embedded).", + "default": false, + "type": "boolean", + "nullable": true, + "example": false + }, + "chatbot_model": + { + "description": "This is the model used by the chatbot. You can choose a different model to suit your needs.", + "enum": + [ + "gpt-4", + "gpt-3.5-turbo", + "gpt-4-turbo", + "gpt-4-o" + ], + "default": "gpt-4", + "type": "string", + "nullable": true, + "example": "gpt-4" + }, + "is_selling_enabled": + { + "description": "Enable selling of chatbot for monetization", + "default": false, + "type": "boolean", + "nullable": true, + "example": false + }, + "license_slug": + { + "description": "License slug used for monetization", + "type": "boolean", + "nullable": true, + "readOnly": true + }, + "selling_url": + { + "description": "Selling URL used for monetization", + "type": "string", + "nullable": true, + "readOnly": true + } + } + } + } + } + } + } + }, + "400": + { + "description": "Bad Argument", + "content": + { + "application/json": + { + "schema": + { + "type": "object", + "properties": + { + "status": + { + "description": "The status of the response", + "enum": + [ + "error", + "success" + ], + "type": "string", + "example": "error" + }, + "url": + { + "description": "The URL of the request", + "type": "string", + "example": "https://app.customgpt.ai/api/v1/projects/1" + }, + "data": + { + "type": "object", + "properties": + { + "code": + { + "description": "The error status code", + "enum": + [ + 400, + 401, + 403, + 404, + 500, + 503 + ], + "type": "integer", + "example": 400 + }, + "message": + { + "description": "The error message", + "type": "string", + "example": "Project id must be integer" + } + } + } + } + } + } + } + }, + "401": + { + "description": "API Token is either missing or invalid", + "content": + { + "application/json": + { + "schema": + { + "type": "object", + "properties": + { + "status": + { + "description": "The status of the response", + "enum": + [ + "error", + "success" + ], + "type": "string", + "example": "error" + }, + "url": + { + "description": "The URL of the request", + "type": "string", + "example": "https://app.customgpt.ai/api/v1/projects/1" + }, + "data": + { + "type": "object", + "properties": + { + "code": + { + "description": "The error status code", + "enum": + [ + 400, + 401, + 403, + 404, + 500, + 503 + ], + "type": "integer", + "example": 401 + }, + "message": + { + "type": "string", + "example": "API Token is either missing or invalid" + } + } + } + } + } + } + } + }, + "404": + { + "description": "Project not found", + "content": + { + "application/json": + { + "schema": + { + "type": "object", + "properties": + { + "status": + { + "description": "The status of the response", + "enum": + [ + "error", + "success" + ], + "type": "string", + "example": "error" + }, + "url": + { + "description": "The URL of the request", + "type": "string", + "example": "https://app.customgpt.ai/api/v1/projects/1" + }, + "data": + { + "type": "object", + "properties": + { + "code": + { + "description": "The error status code", + "enum": + [ + 400, + 401, + 403, + 404, + 500, + 503 + ], + "type": "integer", + "example": 404 + }, + "message": + { + "description": "The error message", + "enum": + [ + "Project id is required", + "Project with id {projectId} not found" + ], + "type": "string", + "example": "Project with id 1 not found" + } + } + } + } + } + } + } + }, + "500": + { + "description": "Internal Server Error", + "content": + { + "application/json": + { + "schema": + { + "type": "object", + "properties": + { + "status": + { + "description": "The status of the response", + "enum": + [ + "error", + "success" + ], + "type": "string", + "example": "error" + }, + "url": + { + "description": "The URL of the request", + "type": "string", + "example": "https://app.customgpt.ai/api/v1/projects/1" + }, + "data": + { + "type": "object", + "properties": + { + "code": + { + "description": "The error status code", + "enum": + [ + 400, + 401, + 403, + 404, + 500, + 503 + ], + "type": "integer", + "example": 500 + }, + "message": + { + "type": "string", + "example": "Internal Server Error" + } + } + } + } + } + } + } + } + }, + "security": + [ + { + "BearerToken": + [] + } + ] + }, + "post": + { + "tags": + [ + "Project Settings" + ], + "summary": "Update project settings.", + "operationId": "update_project_settings", + "description": "Update the project settings for a specific project. This endpoint allows you to update the configuration and settings associated with the project.\nHere is an example to get a project settings: [API](https://github.com/Poll-The-People/customgpt-cookbook/blob/main/examples/Update_settings_for_a_particular_project.ipynb) [SDK](https://github.com/Poll-The-People/customgpt-cookbook/blob/main/examples/SDK_Update_project_settings.ipynb).", + "parameters": + [ + { + "name": "projectId", + "in": "path", + "description": "The unique project identifier.", + "required": true, + "schema": + { + "type": "integer" + } + } + ], + "requestBody": + { + "description": "Update project settings", + "content": + { + "multipart/form-data": + { + "schema": + { + "properties": + { + "chat_bot_avatar": + { + "description": "This is the avatar that is shown in the bot response. You can make it a profile picture or your company logo.", + "format": "binary", + "type": "string", + "example": "avatar.png" + }, + "chat_bot_bg": + { + "description": "This is the background image shown in the bot conversations widget. You can change it to a company logo or background image.", + "format": "binary", + "type": "string", + "example": "bg.png" + }, + "default_prompt": + { + "description": "This is the default prompt shown to the user. You can customize this for your company or client.", + "type": "string", + "maxLength": 255, + "example": "How can I help you?" + }, + "example_questions": + { + "description": "These are example questions shown to guide the bot users. You can create customized questions to suit your company or client needs.", + "type": "array", + "items": + { + "type": "string", + "example": "How can I help you?" + } + }, + "response_source": + { + "description": "By default, we ask ChatGPT to use only your content in its response (recommended). If you wish ChatGPT to improvise and use its own knowledgebase as well, you can select \"My Content + ChatGPT\"", + "enum": + [ + "default", + "own_content", + "openai_content" + ], + "type": "string", + "maxLength": 255, + "example": "own_content" + }, + "chatbot_msg_lang": + { + "description": "By default, the chatbot messages like 'Ask Me Anything' are in English. You can customize this to your preferred language. Please note: This setting does not control what language ChatGPT responds in. That is controlled by the user's question. So a user asking in Portuguese, will most likely get a response from ChatGPT in Portuguese.", + "enum": + [ + "sq", + "ar", + "hy", + "az", + "ba", + "eu", + "be", + "bn", + "bh", + "bs", + "pt-BR", + "bg", + "yue", + "ca", + "hne", + "hr", + "cs", + "da", + "doi", + "nl", + "en", + "et", + "fo", + "fi", + "fr", + "gl", + "ka", + "de", + "el", + "gu", + "hry", + "he", + "hi", + "hu", + "id", + "ga", + "it", + "ja", + "jv", + "kn", + "ks", + "kk", + "kok", + "ko", + "ky", + "lv", + "lt", + "mk", + "mai", + "ms", + "mt", + "cmn", + "mr", + "mwr", + "nan", + "mo", + "mn", + "me", + "ne", + "no", + "or", + "ps", + "fa", + "pl", + "pt", + "pa", + "raj", + "ro", + "ru", + "sa", + "sat", + "sr", + "sd", + "si", + "sk", + "sl", + "es", + "sw", + "sv", + "tg", + "ta", + "tt", + "te", + "th", + "tr", + "tk", + "uk", + "ur", + "uz", + "vi", + "cy", + "wuu" + ], + "type": "string", + "maxLength": 255, + "example": "en" + }, + "chatbot_color": + { + "description": "Color of the chatbot in hex format", + "type": "string", + "maxLength": 9, + "example": "#000000" + }, + "chatbot_toolbar_color": + { + "description": "Color of the chatbot toolbar in hex format", + "type": "string", + "maxLength": 9, + "example": "#000000" + }, + "persona_instructions": + { + "description": "Customize your chatbot behavior by adjusting the system parameter to control its personality traits and role.", + "type": "string", + "maxLength": 12000, + "nullable": true, + "example": "You are a custom chatbot assistant called CustomGPT.ai, a friendly lawyer who answers questions based on the given context." + }, + "citations_answer_source_label_msg": + { + "description": "This is the message shown to indicate where the response came from. You can customize this message based on your business or language.", + "type": "string", + "maxLength": 255, + "nullable": true, + "example": "Where did this answer come from?" + }, + "citations_sources_label_msg": + { + "description": "This is the message shown for the Sources label. You can customize this message based on your business or language.", + "type": "string", + "maxLength": 255, + "nullable": true, + "example": "Sources" + }, + "hang_in_there_msg": + { + "description": "This is the message shown when the bot is thinking and waiting to answer. You can customize this message based on your tone, personality or language.", + "type": "string", + "maxLength": 255, + "nullable": true, + "example": "Hang in there! I'm thinking.." + }, + "chatbot_siesta_msg": + { + "description": "This is the message shown when the bot has encountered a problem or error. You can customize this message based on your tone, personality or language.", + "type": "string", + "maxLength": 255, + "nullable": true, + "example": "Oops! The chat bot is taking a siesta. This usually happens when OpenAI is down! Please try again later." + }, + "is_loading_indicator_enabled": + { + "description": "Show animated loading indicator while waiting for a response from the chatbot", + "default": true, + "type": "boolean", + "nullable": true, + "example": true + }, + "enable_citations": + { + "description": "Each chatbot response shows an option for the user to see the sources/citations from your content from which the response was generated.", + "enum": + [ + 0, + 1, + 2, + 3 + ], + "default": 3, + "type": "integer", + "nullable": true, + "example": 3 + }, + "enable_feedbacks": + { + "description": "Each chatbot response shows an thumbs up/down for the user to left own feedback.", + "default": true, + "type": "boolean", + "nullable": true, + "example": true + }, + "citations_view_type": + { + "description": "Control how citations are shown. By default, the user can initiate to see the citations. You can choose to have it \"Auto Shown\" or \"Auto Hide\"", + "enum": + [ + "user", + "show", + "hide" + ], + "default": "user", + "type": "string", + "nullable": true, + "example": "user" + }, + "no_answer_message": + { + "description": "This is the message shown when the bot cannot answer. You can customize it to a message asking the user to contact customer support or leave their email / phone.", + "default": "I'm sorry, I don't know the answer", + "type": "string", + "maxLength": 1000, + "nullable": true, + "example": "Sorry, I don't have an answer for that." + }, + "ending_message": + { + "description": "You can instruct ChatGPT to end every response with some text like asking \"Please email us for further support\" (Not recommended for most use cases)", + "type": "string", + "maxLength": 1000, + "nullable": true, + "example": "Please email us for further support" + }, + "remove_branding": + { + "description": "Controls what branding is shown at the bottom of the chatbot.", + "default": false, + "type": "boolean", + "nullable": true, + "example": false + }, + "enable_recaptcha_for_public_chatbots": + { + "description": "Should we check messages from guests with Recaptcha when your chatbot is publicly available (i.e. shared or embedded).", + "default": false, + "type": "boolean", + "nullable": true, + "example": false + }, + "chatbot_model": + { + "description": "This is the model used by the chatbot. You can choose a different model to suit your needs.", + "enum": + [ + "gpt-4", + "gpt-3.5-turbo", + "gpt-4-turbo", + "gpt-4-o" + ], + "type": "string", + "nullable": true, + "example": "gpt-4" + }, + "is_selling_enabled": + { + "description": "Enable selling of chatbot for monetization", + "default": false, + "type": "boolean", + "nullable": true, + "example": false + } + } + } + } + } + }, + "responses": + { + "200": + { + "description": "Project settings have been updated", + "content": + { + "application/json": + { + "schema": + { + "type": "object", + "properties": + { + "status": + { + "description": "The status of the response", + "enum": + [ + "error", + "success" + ], + "type": "string", + "example": "success" + }, + "data": + { + "type": "object", + "properties": + { + "updated": + { + "description": "Whether the project was updated successfully or not", + "type": "boolean", + "example": true + } + } + } + } + } + } + } + }, + "400": + { + "description": "Update project settings failed", + "content": + { + "application/json": + { + "schema": + { + "type": "object", + "properties": + { + "status": + { + "description": "The status of the response", + "enum": + [ + "error", + "success" + ], + "type": "string", + "example": "error" + }, + "url": + { + "description": "The URL of the request", + "type": "string", + "example": "https://app.customgpt.ai/api/v1/projects/1" + }, + "data": + { + "type": "object", + "properties": + { + "code": + { + "description": "The error status code", + "enum": + [ + 400, + 401, + 403, + 404, + 500, + 503 + ], + "type": "integer", + "example": 400 + }, + "message": + { + "description": "The error message", + "enum": + [ + "Please upload a valid image file for avatar", + "Please upload a valid image file for background", + "Language Proficiency is required." + ], + "type": "string", + "example": "Please upload a valid image file for avatar" + } + } + } + } + } + } + } + }, + "401": + { + "description": "API Token is either missing or invalid", + "content": + { + "application/json": + { + "schema": + { + "type": "object", + "properties": + { + "status": + { + "description": "The status of the response", + "enum": + [ + "error", + "success" + ], + "type": "string", + "example": "error" + }, + "url": + { + "description": "The URL of the request", + "type": "string", + "example": "https://app.customgpt.ai/api/v1/projects/1" + }, + "data": + { + "type": "object", + "properties": + { + "code": + { + "description": "The error status code", + "enum": + [ + 400, + 401, + 403, + 404, + 500, + 503 + ], + "type": "integer", + "example": 401 + }, + "message": + { + "type": "string", + "example": "API Token is either missing or invalid" + } + } + } + } + } + } + } + }, + "500": + { + "description": "Internal Server Error", + "content": + { + "application/json": + { + "schema": + { + "type": "object", + "properties": + { + "status": + { + "description": "The status of the response", + "enum": + [ + "error", + "success" + ], + "type": "string", + "example": "error" + }, + "url": + { + "description": "The URL of the request", + "type": "string", + "example": "https://app.customgpt.ai/api/v1/projects/1" + }, + "data": + { + "type": "object", + "properties": + { + "code": + { + "description": "The error status code", + "enum": + [ + 400, + 401, + 403, + 404, + 500, + 503 + ], + "type": "integer", + "example": 500 + }, + "message": + { + "type": "string", + "example": "Internal Server Error" + } + } + } + } + } + } + } + } + }, + "security": + [ + { + "BearerToken": + [] + } + ] + } + }, + "/api/v1/projects/{projectId}/plugins": + { + "get": + { + "tags": + [ + "Project Plugins" + ], + "summary": "Show a certain project plugin.", + "operationId": "get_plugin", + "description": "Retrieve the plugin details associated with a project. This endpoint provides information about the project plugin.", + "parameters": + [ + { + "name": "projectId", + "in": "path", + "description": "The unique project id.", + "required": true, + "schema": + { + "type": "integer", + "example": 1 + } + } + ], + "responses": + { + "200": + { + "description": "Project plugin that belong to a certain project", + "content": + { + "application/json": + { + "schema": + { + "type": "object", + "properties": + { + "status": + { + "description": "The status of the response", + "enum": + [ + "error", + "success" + ], + "type": "string", + "example": "success" + }, + "data": + { + "type": "object", + "properties": + { + "model_name": + { + "description": "Model Name", + "type": "string", + "example": "IndoorPlants" + }, + "human_name": + { + "description": "Name For Human", + "type": "string", + "example": "The Indoor Plants Channel" + }, + "keywords": + { + "description": "Keywords For Model", + "type": "string", + "example": "Indoor plants, Gardening, Trusted information." + }, + "description": + { + "description": "Description For Human", + "type": "string", + "example": "Trusted information about indoor plants and gardening." + }, + "logo": + { + "description": "Project plugin logo", + "type": "string", + "example": "https://app.customgpt.ai/logo.svg" + }, + "is_active": + { + "description": "Whether the project plugin is active or not", + "default": false, + "type": "boolean", + "example": true + } + } + } + } + } + } + } + }, + "400": + { + "description": "Bad Argument", + "content": + { + "application/json": + { + "schema": + { + "type": "object", + "properties": + { + "status": + { + "description": "The status of the response", + "enum": + [ + "error", + "success" + ], + "type": "string", + "example": "error" + }, + "url": + { + "description": "The URL of the request", + "type": "string", + "example": "https://app.customgpt.ai/api/v1/projects/1" + }, + "data": + { + "type": "object", + "properties": + { + "code": + { + "description": "The error status code", + "enum": + [ + 400, + 401, + 403, + 404, + 500, + 503 + ], + "type": "integer", + "example": 400 + }, + "message": + { + "description": "The error message", + "type": "string", + "example": "Project id must be integer" + } + } + } + } + } + } + } + }, + "401": + { + "description": "API Token is either missing or invalid", + "content": + { + "application/json": + { + "schema": + { + "type": "object", + "properties": + { + "status": + { + "description": "The status of the response", + "enum": + [ + "error", + "success" + ], + "type": "string", + "example": "error" + }, + "url": + { + "description": "The URL of the request", + "type": "string", + "example": "https://app.customgpt.ai/api/v1/projects/1" + }, + "data": + { + "type": "object", + "properties": + { + "code": + { + "description": "The error status code", + "enum": + [ + 400, + 401, + 403, + 404, + 500, + 503 + ], + "type": "integer", + "example": 401 + }, + "message": + { + "type": "string", + "example": "API Token is either missing or invalid" + } + } + } + } + } + } + } + }, + "404": + { + "description": "Project plugin not found", + "content": + { + "application/json": + { + "schema": + { + "type": "object", + "properties": + { + "status": + { + "description": "The status of the response", + "enum": + [ + "error", + "success" + ], + "type": "string", + "example": "error" + }, + "url": + { + "description": "The URL of the request", + "type": "string", + "example": "https://app.customgpt.ai/api/v1/projects/1" + }, + "data": + { + "type": "object", + "properties": + { + "code": + { + "description": "The error status code", + "enum": + [ + 400, + 401, + 403, + 404, + 500, + 503 + ], + "type": "integer", + "example": 404 + }, + "message": + { + "description": "The error message", + "enum": + [ + "Project plugin id is required", + "Project plugin with id {pluginId} not found", + "Plugin for project with id {projectId} not found" + ], + "type": "string", + "example": "Project plugin with id 1 not found" + } + } + } + } + } + } + } + }, + "500": + { + "description": "Internal Server Error", + "content": + { + "application/json": + { + "schema": + { + "type": "object", + "properties": + { + "status": + { + "description": "The status of the response", + "enum": + [ + "error", + "success" + ], + "type": "string", + "example": "error" + }, + "url": + { + "description": "The URL of the request", + "type": "string", + "example": "https://app.customgpt.ai/api/v1/projects/1" + }, + "data": + { + "type": "object", + "properties": + { + "code": + { + "description": "The error status code", + "enum": + [ + 400, + 401, + 403, + 404, + 500, + 503 + ], + "type": "integer", + "example": 500 + }, + "message": + { + "type": "string", + "example": "Internal Server Error" + } + } + } + } + } + } + } + } + }, + "security": + [ + { + "BearerToken": + [] + } + ] + }, + "post": + { + "tags": + [ + "Project Plugins" + ], + "summary": "Create a plugin.", + "operationId": "create_plugin", + "description": "Create a new plugin for a specific project identified by its unique projectId. This endpoint enables you to create a custom plugin for the project. Which allows you to share the custom chatbot as openai plugin to be shared globally.", + "parameters": + [ + { + "name": "projectId", + "in": "path", + "description": "The id of a project in which plugin will be stored.", + "required": true, + "schema": + { + "type": "integer" + } + } + ], + "requestBody": + { + "description": "Create a project plugin", + "content": + { + "application/json": + { + "schema": + { + "type": "object", + "properties": + { + "model_name": + { + "description": "Model Name", + "type": "string", + "example": "IndoorPlants" + }, + "human_name": + { + "description": "Name For Human", + "type": "string", + "example": "The Indoor Plants Channel" + }, + "keywords": + { + "description": "Keywords For Model", + "type": "string", + "example": "Indoor plants, Gardening, Trusted information." + }, + "description": + { + "description": "Description For Human", + "type": "string", + "example": "Trusted information about indoor plants and gardening." + }, + "is_active": + { + "description": "Whether the project plugin is active or not", + "default": false, + "type": "boolean", + "example": true + } + } + } + } + } + }, + "responses": + { + "201": + { + "description": "Project plugin have been created", + "content": + { + "application/json": + { + "schema": + { + "type": "object", + "properties": + { + "status": + { + "description": "The status of the response", + "enum": + [ + "error", + "success" + ], + "type": "string", + "example": "success" + }, + "data": + { + "type": "object", + "properties": + { + "model_name": + { + "description": "Model Name", + "type": "string", + "example": "IndoorPlants" + }, + "human_name": + { + "description": "Name For Human", + "type": "string", + "example": "The Indoor Plants Channel" + }, + "keywords": + { + "description": "Keywords For Model", + "type": "string", + "example": "Indoor plants, Gardening, Trusted information." + }, + "description": + { + "description": "Description For Human", + "type": "string", + "example": "Trusted information about indoor plants and gardening." + }, + "logo": + { + "description": "Project plugin logo", + "type": "string", + "example": "https://app.customgpt.ai/logo.svg" + }, + "is_active": + { + "description": "Whether the project plugin is active or not", + "default": false, + "type": "boolean", + "example": true + } + } + } + } + } + } + } + }, + "400": + { + "description": "Bad Argument", + "content": + { + "application/json": + { + "schema": + { + "type": "object", + "properties": + { + "status": + { + "description": "The status of the response", + "enum": + [ + "error", + "success" + ], + "type": "string", + "example": "error" + }, + "url": + { + "description": "The URL of the request", + "type": "string", + "example": "https://app.customgpt.ai/api/v1/projects/1" + }, + "data": + { + "type": "object", + "properties": + { + "code": + { + "description": "The error status code", + "enum": + [ + 400, + 401, + 403, + 404, + 500, + 503 + ], + "type": "integer", + "example": 400 + }, + "message": + { + "description": "The error message", + "type": "string", + "example": "Project id must be integer" + } + } + } + } + } + } + } + }, + "401": + { + "description": "API Token is either missing or invalid", + "content": + { + "application/json": + { + "schema": + { + "type": "object", + "properties": + { + "status": + { + "description": "The status of the response", + "enum": + [ + "error", + "success" + ], + "type": "string", + "example": "error" + }, + "url": + { + "description": "The URL of the request", + "type": "string", + "example": "https://app.customgpt.ai/api/v1/projects/1" + }, + "data": + { + "type": "object", + "properties": + { + "code": + { + "description": "The error status code", + "enum": + [ + 400, + 401, + 403, + 404, + 500, + 503 + ], + "type": "integer", + "example": 401 + }, + "message": + { + "type": "string", + "example": "API Token is either missing or invalid" + } + } + } + } + } + } + } + }, + "404": + { + "description": "Project not found", + "content": + { + "application/json": + { + "schema": + { + "type": "object", + "properties": + { + "status": + { + "description": "The status of the response", + "enum": + [ + "error", + "success" + ], + "type": "string", + "example": "error" + }, + "url": + { + "description": "The URL of the request", + "type": "string", + "example": "https://app.customgpt.ai/api/v1/projects/1" + }, + "data": + { + "type": "object", + "properties": + { + "code": + { + "description": "The error status code", + "enum": + [ + 400, + 401, + 403, + 404, + 500, + 503 + ], + "type": "integer", + "example": 404 + }, + "message": + { + "description": "The error message", + "enum": + [ + "Project id is required", + "Project with id {projectId} not found" + ], + "type": "string", + "example": "Project with id 1 not found" + } + } + } + } + } + } + } + }, + "500": + { + "description": "Internal Server Error", + "content": + { + "application/json": + { + "schema": + { + "type": "object", + "properties": + { + "status": + { + "description": "The status of the response", + "enum": + [ + "error", + "success" + ], + "type": "string", + "example": "error" + }, + "url": + { + "description": "The URL of the request", + "type": "string", + "example": "https://app.customgpt.ai/api/v1/projects/1" + }, + "data": + { + "type": "object", + "properties": + { + "code": + { + "description": "The error status code", + "enum": + [ + 400, + 401, + 403, + 404, + 500, + 503 + ], + "type": "integer", + "example": 500 + }, + "message": + { + "type": "string", + "example": "Internal Server Error" + } + } + } + } + } + } + } + } + }, + "security": + [ + { + "BearerToken": + [] + } + ] + }, + "put": + { + "tags": + [ + "Project Plugins" + ], + "summary": "Update a plugin.", + "operationId": "update_plugin", + "description": "Update the plugin configuration for a specific project identified by its unique projectId. This endpoint allows you to update the associated attributes of the plugin.", + "parameters": + [ + { + "name": "projectId", + "in": "path", + "description": "The id of a project in which plugin will be stored.", + "required": true, + "schema": + { + "type": "integer" + } + } + ], + "requestBody": + { + "description": "Update a project plugin", + "content": + { + "application/json": + { + "schema": + { + "type": "object", + "properties": + { + "model_name": + { + "description": "Model Name", + "type": "string", + "example": "IndoorPlants" + }, + "human_name": + { + "description": "Name For Human", + "type": "string", + "example": "The Indoor Plants Channel" + }, + "keywords": + { + "description": "Keywords For Model", + "type": "string", + "example": "Indoor plants, Gardening, Trusted information." + }, + "description": + { + "description": "Description For Human", + "type": "string", + "example": "Trusted information about indoor plants and gardening." + }, + "is_active": + { + "description": "Whether the project plugin is active or not", + "default": false, + "type": "boolean", + "example": true + } + } + } + } + } + }, + "responses": + { + "200": + { + "description": "Project plugin have been updated", + "content": + { + "application/json": + { + "schema": + { + "type": "object", + "properties": + { + "status": + { + "description": "The status of the response", + "enum": + [ + "error", + "success" + ], + "type": "string", + "example": "success" + }, + "data": + { + "type": "object", + "properties": + { + "model_name": + { + "description": "Model Name", + "type": "string", + "example": "IndoorPlants" + }, + "human_name": + { + "description": "Name For Human", + "type": "string", + "example": "The Indoor Plants Channel" + }, + "keywords": + { + "description": "Keywords For Model", + "type": "string", + "example": "Indoor plants, Gardening, Trusted information." + }, + "description": + { + "description": "Description For Human", + "type": "string", + "example": "Trusted information about indoor plants and gardening." + }, + "logo": + { + "description": "Project plugin logo", + "type": "string", + "example": "https://app.customgpt.ai/logo.svg" + }, + "is_active": + { + "description": "Whether the project plugin is active or not", + "default": false, + "type": "boolean", + "example": true + } + } + } + } + } + } + } + }, + "400": + { + "description": "Bad Argument", + "content": + { + "application/json": + { + "schema": + { + "type": "object", + "properties": + { + "status": + { + "description": "The status of the response", + "enum": + [ + "error", + "success" + ], + "type": "string", + "example": "error" + }, + "url": + { + "description": "The URL of the request", + "type": "string", + "example": "https://app.customgpt.ai/api/v1/projects/1" + }, + "data": + { + "type": "object", + "properties": + { + "code": + { + "description": "The error status code", + "enum": + [ + 400, + 401, + 403, + 404, + 500, + 503 + ], + "type": "integer", + "example": 400 + }, + "message": + { + "description": "The error message", + "type": "string", + "example": "Project id must be integer" + } + } + } + } + } + } + } + }, + "401": + { + "description": "API Token is either missing or invalid", + "content": + { + "application/json": + { + "schema": + { + "type": "object", + "properties": + { + "status": + { + "description": "The status of the response", + "enum": + [ + "error", + "success" + ], + "type": "string", + "example": "error" + }, + "url": + { + "description": "The URL of the request", + "type": "string", + "example": "https://app.customgpt.ai/api/v1/projects/1" + }, + "data": + { + "type": "object", + "properties": + { + "code": + { + "description": "The error status code", + "enum": + [ + 400, + 401, + 403, + 404, + 500, + 503 + ], + "type": "integer", + "example": 401 + }, + "message": + { + "type": "string", + "example": "API Token is either missing or invalid" + } + } + } + } + } + } + } + }, + "404": + { + "description": "Project plugin not found", + "content": + { + "application/json": + { + "schema": + { + "type": "object", + "properties": + { + "status": + { + "description": "The status of the response", + "enum": + [ + "error", + "success" + ], + "type": "string", + "example": "error" + }, + "url": + { + "description": "The URL of the request", + "type": "string", + "example": "https://app.customgpt.ai/api/v1/projects/1" + }, + "data": + { + "type": "object", + "properties": + { + "code": + { + "description": "The error status code", + "enum": + [ + 400, + 401, + 403, + 404, + 500, + 503 + ], + "type": "integer", + "example": 404 + }, + "message": + { + "description": "The error message", + "enum": + [ + "Project plugin id is required", + "Project plugin with id {pluginId} not found", + "Plugin for project with id {projectId} not found" + ], + "type": "string", + "example": "Project plugin with id 1 not found" + } + } + } + } + } + } + } + }, + "500": + { + "description": "Internal Server Error", + "content": + { + "application/json": + { + "schema": + { + "type": "object", + "properties": + { + "status": + { + "description": "The status of the response", + "enum": + [ + "error", + "success" + ], + "type": "string", + "example": "error" + }, + "url": + { + "description": "The URL of the request", + "type": "string", + "example": "https://app.customgpt.ai/api/v1/projects/1" + }, + "data": + { + "type": "object", + "properties": + { + "code": + { + "description": "The error status code", + "enum": + [ + 400, + 401, + 403, + 404, + 500, + 503 + ], + "type": "integer", + "example": 500 + }, + "message": + { + "type": "string", + "example": "Internal Server Error" + } + } + } + } + } + } + } + } + }, + "security": + [ + { + "BearerToken": + [] + } + ] + } + }, + "/api/v1/projects/{projectId}/conversations": + { + "get": + { + "tags": + [ + "Conversations" + ], + "summary": "List all conversations for a project.", + "operationId": "get_conversations", + "description": "Retrieve all conversations associated with a project based on its unique projectId. This endpoint allows you to fetch a collection of conversations related to a specific project.", + "parameters": + [ + { + "name": "projectId", + "in": "path", + "description": "The ID of the project to get the conversations for", + "required": true, + "schema": + { + "type": "integer", + "example": 1 + } + }, + { + "name": "page", + "in": "query", + "description": "Page number to return", + "required": false, + "schema": + { + "default": 1, + "type": "integer" + } + }, + { + "name": "order", + "in": "query", + "description": "The order to sort the results in given direction", + "required": false, + "schema": + { + "enum": + [ + "asc", + "desc" + ], + "default": "desc", + "type": "string", + "example": "desc" + } + }, + { + "name": "orderBy", + "in": "query", + "description": "The orderBy to sort the results by given field", + "required": false, + "schema": + { + "enum": + [ + "id", + "created_at" + ], + "default": "id", + "type": "string", + "example": "id" + } + }, + { + "name": "userFilter", + "in": "query", + "description": "Filter the results by the user that created the conversation", + "required": false, + "schema": + { + "enum": + [ + "all", + "anonymous", + "team_member" + ], + "default": "all", + "type": "string", + "example": "all" + } + }, + { + "name": "name", + "in": "query", + "description": "Filter the results by conversation name", + "required": false, + "schema": + { + "type": "string", + "example": "Ask me anything" + } + } + ], + "responses": + { + "200": + { + "description": "List of conversations for a project", + "content": + { + "application/json": + { + "schema": + { + "type": "object", + "properties": + { + "status": + { + "description": "The status of the response", + "enum": + [ + "error", + "success" + ], + "type": "string", + "example": "success" + }, + "data": + { + "type": "object", + "properties": + { + "current_page": + { + "description": "The current page number", + "type": "integer", + "example": 1 + }, + "data": + { + "type": "array", + "items": + { + "type": "object", + "properties": + { + "created_at": + { + "description": "When was this conversation created?", + "format": "date-time", + "type": "string", + "example": "2023-04-30 16:43:53" + }, + "updated_at": + { + "description": "When was this conversation updated?", + "format": "date-time", + "type": "string", + "example": "2023-04-30 16:43:53" + }, + "id": + { + "description": "Conversation ID", + "type": "integer", + "example": 1 + }, + "name": + { + "description": "Conversation name", + "type": "string", + "example": "Conversation 1" + }, + "project_id": + { + "description": "Project ID for this conversation", + "type": "string", + "example": 1 + }, + "created_by": + { + "description": "User ID for the user who created this conversation", + "type": "string", + "example": 1 + }, + "session_id": + { + "description": "Session ID for this conversation", + "format": "uuid", + "type": "string", + "example": "f1b9aaf0-5e4e-11eb-ae93-0242ac130002" + } + } + } + }, + "first_page_url": + { + "description": "The first page url", + "type": "string", + "example": "https://app.customgpt.ai/api/v1/users?page=1" + }, + "from": + { + "description": "The first item number of the current page", + "type": "integer", + "example": 1 + }, + "last_page": + { + "description": "The last page number", + "type": "integer", + "example": 1 + }, + "last_page_url": + { + "description": "The last page url", + "type": "string", + "example": "https://app.customgpt.ai/api/v1/users?page=1" + }, + "next_page_url": + { + "description": "The next page url", + "type": "string", + "example": "https://app.customgpt.ai/api/v1/users?page=1" + }, + "path": + { + "description": "The current page url", + "type": "string", + "example": "https://app.customgpt.ai/api/v1/users?page=1" + }, + "per_page": + { + "description": "The number of items per page", + "type": "integer", + "example": 10 + }, + "prev_page_url": + { + "description": "The previous page url", + "type": "string", + "example": "https://app.customgpt.ai/api/v1/users?page=1" + }, + "to": + { + "description": "The last item number of the current page", + "type": "integer", + "example": 1 + }, + "total": + { + "description": "The total number of items", + "type": "integer", + "example": 1 + } + } + } + } + } + } + } + }, + "400": + { + "description": "Bad Argument", + "content": + { + "application/json": + { + "schema": + { + "type": "object", + "properties": + { + "status": + { + "description": "The status of the response", + "enum": + [ + "error", + "success" + ], + "type": "string", + "example": "error" + }, + "url": + { + "description": "The URL of the request", + "type": "string", + "example": "https://app.customgpt.ai/api/v1/projects/1" + }, + "data": + { + "type": "object", + "properties": + { + "code": + { + "description": "The error status code", + "enum": + [ + 400, + 401, + 403, + 404, + 500, + 503 + ], + "type": "integer", + "example": 400 + }, + "message": + { + "description": "The error message", + "type": "string", + "example": "Project id must be integer" + } + } + } + } + } + } + } + }, + "401": + { + "description": "API Token is either missing or invalid", + "content": + { + "application/json": + { + "schema": + { + "type": "object", + "properties": + { + "status": + { + "description": "The status of the response", + "enum": + [ + "error", + "success" + ], + "type": "string", + "example": "error" + }, + "url": + { + "description": "The URL of the request", + "type": "string", + "example": "https://app.customgpt.ai/api/v1/projects/1" + }, + "data": + { + "type": "object", + "properties": + { + "code": + { + "description": "The error status code", + "enum": + [ + 400, + 401, + 403, + 404, + 500, + 503 + ], + "type": "integer", + "example": 401 + }, + "message": + { + "type": "string", + "example": "API Token is either missing or invalid" + } + } + } + } + } + } + } + }, + "404": + { + "description": "Project not found", + "content": + { + "application/json": + { + "schema": + { + "type": "object", + "properties": + { + "status": + { + "description": "The status of the response", + "enum": + [ + "error", + "success" + ], + "type": "string", + "example": "error" + }, + "url": + { + "description": "The URL of the request", + "type": "string", + "example": "https://app.customgpt.ai/api/v1/projects/1" + }, + "data": + { + "type": "object", + "properties": + { + "code": + { + "description": "The error status code", + "enum": + [ + 400, + 401, + 403, + 404, + 500, + 503 + ], + "type": "integer", + "example": 404 + }, + "message": + { + "description": "The error message", + "enum": + [ + "Project id is required", + "Project with id {projectId} not found" + ], + "type": "string", + "example": "Project with id 1 not found" + } + } + } + } + } + } + } + }, + "500": + { + "description": "Internal Server Error", + "content": + { + "application/json": + { + "schema": + { + "type": "object", + "properties": + { + "status": + { + "description": "The status of the response", + "enum": + [ + "error", + "success" + ], + "type": "string", + "example": "error" + }, + "url": + { + "description": "The URL of the request", + "type": "string", + "example": "https://app.customgpt.ai/api/v1/projects/1" + }, + "data": + { + "type": "object", + "properties": + { + "code": + { + "description": "The error status code", + "enum": + [ + 400, + 401, + 403, + 404, + 500, + 503 + ], + "type": "integer", + "example": 500 + }, + "message": + { + "type": "string", + "example": "Internal Server Error" + } + } + } + } + } + } + } + } + }, + "security": + [ + { + "BearerToken": + [] + } + ] + }, + "post": + { + "tags": + [ + "Conversations" + ], + "summary": "Create a new conversation.", + "operationId": "create_conversation", + "description": "Create a new conversation for a project identified by its unique projectId. This endpoint allows you to initiate a new conversation within a specific project. A conversation serves as a platform for users to exchange messages regarding project-related matters. By providing the projectId, you can establish a conversation within the context of the project allowing you to seamlessly communicate with it.\nHere is an example to create a conversation: [API](https://github.com/Poll-The-People/customgpt-cookbook/blob/main/examples/Create_a_new_conversation_and_send_a_message_to_the_conversation.ipynb) [SDK](https://github.com/Poll-The-People/customgpt-cookbook/blob/main/examples/SDK_Create_a_new_conversation_and_send_a_message_to_the_conversation.ipynb).", + "parameters": + [ + { + "name": "projectId", + "in": "path", + "description": "The unique project identifier.", + "required": true, + "schema": + { + "type": "integer" + } + } + ], + "requestBody": + { + "description": "Create a new conversation", + "content": + { + "application/json": + { + "schema": + { + "type": "object", + "properties": + { + "name": + { + "description": "Conversation name", + "type": "string", + "maxLength": 255, + "example": "My conversation" + } + } + } + } + } + }, + "responses": + { + "201": + { + "description": "Create a new conversation", + "content": + { + "application/json": + { + "schema": + { + "type": "object", + "properties": + { + "status": + { + "description": "The status of the response", + "enum": + [ + "error", + "success" + ], + "type": "string", + "example": "success" + }, + "data": + { + "type": "object", + "properties": + { + "created_at": + { + "description": "When was this conversation created?", + "format": "date-time", + "type": "string", + "example": "2023-04-30 16:43:53" + }, + "updated_at": + { + "description": "When was this conversation updated?", + "format": "date-time", + "type": "string", + "example": "2023-04-30 16:43:53" + }, + "id": + { + "description": "Conversation ID", + "type": "integer", + "example": 1 + }, + "name": + { + "description": "Conversation name", + "type": "string", + "example": "Conversation 1" + }, + "project_id": + { + "description": "Project ID for this conversation", + "type": "string", + "example": 1 + }, + "created_by": + { + "description": "User ID for the user who created this conversation", + "type": "string", + "example": 1 + }, + "session_id": + { + "description": "Session ID for this conversation", + "format": "uuid", + "type": "string", + "example": "f1b9aaf0-5e4e-11eb-ae93-0242ac130002" + } + } + } + } + } + } + } + }, + "400": + { + "description": "Bad Argument", + "content": + { + "application/json": + { + "schema": + { + "type": "object", + "properties": + { + "status": + { + "description": "The status of the response", + "enum": + [ + "error", + "success" + ], + "type": "string", + "example": "error" + }, + "url": + { + "description": "The URL of the request", + "type": "string", + "example": "https://app.customgpt.ai/api/v1/projects/1" + }, + "data": + { + "type": "object", + "properties": + { + "code": + { + "description": "The error status code", + "enum": + [ + 400, + 401, + 403, + 404, + 500, + 503 + ], + "type": "integer", + "example": 400 + }, + "message": + { + "description": "The error message", + "type": "string", + "example": "Project id must be integer" + } + } + } + } + } + } + } + }, + "401": + { + "description": "API Token is either missing or invalid", + "content": + { + "application/json": + { + "schema": + { + "type": "object", + "properties": + { + "status": + { + "description": "The status of the response", + "enum": + [ + "error", + "success" + ], + "type": "string", + "example": "error" + }, + "url": + { + "description": "The URL of the request", + "type": "string", + "example": "https://app.customgpt.ai/api/v1/projects/1" + }, + "data": + { + "type": "object", + "properties": + { + "code": + { + "description": "The error status code", + "enum": + [ + 400, + 401, + 403, + 404, + 500, + 503 + ], + "type": "integer", + "example": 401 + }, + "message": + { + "type": "string", + "example": "API Token is either missing or invalid" + } + } + } + } + } + } + } + }, + "404": + { + "description": "Project not found", + "content": + { + "application/json": + { + "schema": + { + "type": "object", + "properties": + { + "status": + { + "description": "The status of the response", + "enum": + [ + "error", + "success" + ], + "type": "string", + "example": "error" + }, + "url": + { + "description": "The URL of the request", + "type": "string", + "example": "https://app.customgpt.ai/api/v1/projects/1" + }, + "data": + { + "type": "object", + "properties": + { + "code": + { + "description": "The error status code", + "enum": + [ + 400, + 401, + 403, + 404, + 500, + 503 + ], + "type": "integer", + "example": 404 + }, + "message": + { + "description": "The error message", + "enum": + [ + "Project id is required", + "Project with id {projectId} not found" + ], + "type": "string", + "example": "Project with id 1 not found" + } + } + } + } + } + } + } + }, + "500": + { + "description": "Internal Server Error", + "content": + { + "application/json": + { + "schema": + { + "type": "object", + "properties": + { + "status": + { + "description": "The status of the response", + "enum": + [ + "error", + "success" + ], + "type": "string", + "example": "error" + }, + "url": + { + "description": "The URL of the request", + "type": "string", + "example": "https://app.customgpt.ai/api/v1/projects/1" + }, + "data": + { + "type": "object", + "properties": + { + "code": + { + "description": "The error status code", + "enum": + [ + 400, + 401, + 403, + 404, + 500, + 503 + ], + "type": "integer", + "example": 500 + }, + "message": + { + "type": "string", + "example": "Internal Server Error" + } + } + } + } + } + } + } + } + }, + "security": + [ + { + "BearerToken": + [] + } + ] + } + }, + "/api/v1/projects/{projectId}/conversations/{sessionId}": + { + "put": + { + "tags": + [ + "Conversations" + ], + "summary": "Update a conversation.", + "operationId": "update_conversation", + "description": "Update a conversation within a project identified by its unique projectId and sessionId. This endpoint allows you to modify and update the properties of a specific conversation. By providing the projectId and sessionId, you can target the desired conversation and make changes to its attributes.\nHere is an example to update a conversation: [API](https://github.com/Poll-The-People/customgpt-cookbook/blob/main/examples/Update_Delete_a_conversation.ipynb) [SDK](https://github.com/Poll-The-People/customgpt-cookbook/blob/main/examples/SDK_Update_Delete_a_conversation.ipynb).", + "parameters": + [ + { + "name": "projectId", + "in": "path", + "description": "The unique project identifier.", + "required": true, + "schema": + { + "type": "integer" + } + }, + { + "name": "sessionId", + "in": "path", + "description": "The unique session identifier.", + "required": true, + "schema": + { + "type": "string" + } + } + ], + "requestBody": + { + "description": "Update a conversation", + "content": + { + "application/json": + { + "schema": + { + "type": "object", + "properties": + { + "name": + { + "description": "The new name of the conversation", + "type": "string", + "example": "My new conversation name" + } + } + } + } + } + }, + "responses": + { + "200": + { + "description": "Update conversation information", + "content": + { + "application/json": + { + "schema": + { + "type": "object", + "properties": + { + "status": + { + "description": "The status of the response", + "enum": + [ + "error", + "success" + ], + "type": "string", + "example": "success" + }, + "data": + { + "type": "object", + "properties": + { + "created_at": + { + "description": "When was this conversation created?", + "format": "date-time", + "type": "string", + "example": "2023-04-30 16:43:53" + }, + "updated_at": + { + "description": "When was this conversation updated?", + "format": "date-time", + "type": "string", + "example": "2023-04-30 16:43:53" + }, + "id": + { + "description": "Conversation ID", + "type": "integer", + "example": 1 + }, + "name": + { + "description": "Conversation name", + "type": "string", + "example": "Conversation 1" + }, + "project_id": + { + "description": "Project ID for this conversation", + "type": "string", + "example": 1 + }, + "created_by": + { + "description": "User ID for the user who created this conversation", + "type": "string", + "example": 1 + }, + "session_id": + { + "description": "Session ID for this conversation", + "format": "uuid", + "type": "string", + "example": "f1b9aaf0-5e4e-11eb-ae93-0242ac130002" + } + } + } + } + } + } + } + }, + "400": + { + "description": "Bad Argument", + "content": + { + "application/json": + { + "schema": + { + "type": "object", + "properties": + { + "status": + { + "description": "The status of the response", + "enum": + [ + "error", + "success" + ], + "type": "string", + "example": "error" + }, + "url": + { + "description": "The URL of the request", + "type": "string", + "example": "https://app.customgpt.ai/api/v1/projects/1" + }, + "data": + { + "type": "object", + "properties": + { + "code": + { + "description": "The error status code", + "enum": + [ + 400, + 401, + 403, + 404, + 500, + 503 + ], + "type": "integer", + "example": 400 + }, + "message": + { + "description": "The error message", + "type": "string", + "example": "Project id must be integer" + } + } + } + } + } + } + } + }, + "401": + { + "description": "API Token is either missing or invalid", + "content": + { + "application/json": + { + "schema": + { + "type": "object", + "properties": + { + "status": + { + "description": "The status of the response", + "enum": + [ + "error", + "success" + ], + "type": "string", + "example": "error" + }, + "url": + { + "description": "The URL of the request", + "type": "string", + "example": "https://app.customgpt.ai/api/v1/projects/1" + }, + "data": + { + "type": "object", + "properties": + { + "code": + { + "description": "The error status code", + "enum": + [ + 400, + 401, + 403, + 404, + 500, + 503 + ], + "type": "integer", + "example": 401 + }, + "message": + { + "type": "string", + "example": "API Token is either missing or invalid" + } + } + } + } + } + } + } + }, + "404": + { + "description": "Project not found", + "content": + { + "application/json": + { + "schema": + { + "type": "object", + "properties": + { + "status": + { + "description": "The status of the response", + "enum": + [ + "error", + "success" + ], + "type": "string", + "example": "error" + }, + "url": + { + "description": "The URL of the request", + "type": "string", + "example": "https://app.customgpt.ai/api/v1/projects/1" + }, + "data": + { + "type": "object", + "properties": + { + "code": + { + "description": "The error status code", + "enum": + [ + 400, + 401, + 403, + 404, + 500, + 503 + ], + "type": "integer", + "example": 404 + }, + "message": + { + "description": "The error message", + "enum": + [ + "Project id is required", + "Project with id {projectId} not found" + ], + "type": "string", + "example": "Project with id 1 not found" + } + } + } + } + } + } + } + }, + "500": + { + "description": "Internal Server Error", + "content": + { + "application/json": + { + "schema": + { + "type": "object", + "properties": + { + "status": + { + "description": "The status of the response", + "enum": + [ + "error", + "success" + ], + "type": "string", + "example": "error" + }, + "url": + { + "description": "The URL of the request", + "type": "string", + "example": "https://app.customgpt.ai/api/v1/projects/1" + }, + "data": + { + "type": "object", + "properties": + { + "code": + { + "description": "The error status code", + "enum": + [ + 400, + 401, + 403, + 404, + 500, + 503 + ], + "type": "integer", + "example": 500 + }, + "message": + { + "type": "string", + "example": "Internal Server Error" + } + } + } + } + } + } + } + } + }, + "security": + [ + { + "BearerToken": + [] + } + ] + }, + "delete": + { + "tags": + [ + "Conversations" + ], + "summary": "Delete a conversation.", + "operationId": "delete_conversation", + "description": "Delete a conversation within a project identified by its unique projectId and sessionId. This endpoint allows you to remove a specific conversation from the project, permanently deleting all associated messages. By providing the projectId and sessionId, you can target the conversation to be deleted, ensuring the removal of all conversation-related data.\nHere is an example to delete a conversation: [API](https://github.com/Poll-The-People/customgpt-cookbook/blob/main/examples/Update_Delete_a_conversation.ipynb) [SDK](https://github.com/Poll-The-People/customgpt-cookbook/blob/main/examples/SDK_Update_Delete_a_conversation.ipynb).", + "parameters": + [ + { + "name": "projectId", + "in": "path", + "description": "The unique project identifier.", + "required": true, + "schema": + { + "type": "integer" + } + }, + { + "name": "sessionId", + "in": "path", + "description": "The unique session identifier.", + "required": true, + "schema": + { + "type": "string" + } + } + ], + "responses": + { + "200": + { + "description": "Project deleted successfully", + "content": + { + "application/json": + { + "schema": + { + "type": "object", + "properties": + { + "status": + { + "description": "The status of the response", + "enum": + [ + "error", + "success" + ], + "type": "string", + "example": "success" + }, + "data": + { + "type": "object", + "properties": + { + "deleted": + { + "description": "Whether the project was deleted successfully or not", + "type": "boolean", + "example": true + } + } + } + } + } + } + } + }, + "400": + { + "description": "Bad Argument", + "content": + { + "application/json": + { + "schema": + { + "type": "object", + "properties": + { + "status": + { + "description": "The status of the response", + "enum": + [ + "error", + "success" + ], + "type": "string", + "example": "error" + }, + "url": + { + "description": "The URL of the request", + "type": "string", + "example": "https://app.customgpt.ai/api/v1/projects/1" + }, + "data": + { + "type": "object", + "properties": + { + "code": + { + "description": "The error status code", + "enum": + [ + 400, + 401, + 403, + 404, + 500, + 503 + ], + "type": "integer", + "example": 400 + }, + "message": + { + "description": "The error message", + "type": "string", + "example": "Project id must be integer" + } + } + } + } + } + } + } + }, + "401": + { + "description": "API Token is either missing or invalid", + "content": + { + "application/json": + { + "schema": + { + "type": "object", + "properties": + { + "status": + { + "description": "The status of the response", + "enum": + [ + "error", + "success" + ], + "type": "string", + "example": "error" + }, + "url": + { + "description": "The URL of the request", + "type": "string", + "example": "https://app.customgpt.ai/api/v1/projects/1" + }, + "data": + { + "type": "object", + "properties": + { + "code": + { + "description": "The error status code", + "enum": + [ + 400, + 401, + 403, + 404, + 500, + 503 + ], + "type": "integer", + "example": 401 + }, + "message": + { + "type": "string", + "example": "API Token is either missing or invalid" + } + } + } + } + } + } + } + }, + "404": + { + "description": "Project not found", + "content": + { + "application/json": + { + "schema": + { + "type": "object", + "properties": + { + "status": + { + "description": "The status of the response", + "enum": + [ + "error", + "success" + ], + "type": "string", + "example": "error" + }, + "url": + { + "description": "The URL of the request", + "type": "string", + "example": "https://app.customgpt.ai/api/v1/projects/1" + }, + "data": + { + "type": "object", + "properties": + { + "code": + { + "description": "The error status code", + "enum": + [ + 400, + 401, + 403, + 404, + 500, + 503 + ], + "type": "integer", + "example": 404 + }, + "message": + { + "description": "The error message", + "enum": + [ + "Project id is required", + "Project with id {projectId} not found" + ], + "type": "string", + "example": "Project with id 1 not found" + } + } + } + } + } + } + } + }, + "500": + { + "description": "Internal Server Error", + "content": + { + "application/json": + { + "schema": + { + "type": "object", + "properties": + { + "status": + { + "description": "The status of the response", + "enum": + [ + "error", + "success" + ], + "type": "string", + "example": "error" + }, + "url": + { + "description": "The URL of the request", + "type": "string", + "example": "https://app.customgpt.ai/api/v1/projects/1" + }, + "data": + { + "type": "object", + "properties": + { + "code": + { + "description": "The error status code", + "enum": + [ + 400, + 401, + 403, + 404, + 500, + 503 + ], + "type": "integer", + "example": 500 + }, + "message": + { + "type": "string", + "example": "Internal Server Error" + } + } + } + } + } + } + } + } + }, + "security": + [ + { + "BearerToken": + [] + } + ] + } + }, + "/api/v1/projects/{projectId}/conversations/{sessionId}/messages": + { + "get": + { + "tags": + [ + "Conversations" + ], + "summary": "Retrieve messages that have been sent in a conversation.", + "operationId": "messages_conversation", + "description": "Retrieve all messages sent within a conversation of a project identified by its unique projectId and sessionId. This endpoint allows you to retrieve a collection of messages exchanged in a specific conversation. Messages contain the content, timestamps, and other relevant information shared during the course of the conversation. By providing the projectId and sessionId, you can access all the messages associated with that particular conversation within the project context.\nHere is an example to retrieve messages of a conversation: [API](https://github.com/Poll-The-People/customgpt-cookbook/blob/main/examples/Retrieve_messages_for_a_conversation.ipynb) [SDK](https://github.com/Poll-The-People/customgpt-cookbook/blob/main/examples/SDK_Retrieve_Messages_of_conversation.ipynb).", + "parameters": + [ + { + "name": "projectId", + "in": "path", + "description": "The ID of the project to get the messages for", + "required": true, + "schema": + { + "type": "integer", + "example": 1 + } + }, + { + "name": "sessionId", + "in": "path", + "description": "The session ID of the converstaions to get the messages for", + "required": true, + "schema": + { + "type": "string", + "example": "1" + } + }, + { + "name": "page", + "in": "query", + "description": "Page number to return", + "required": false, + "schema": + { + "default": 1, + "type": "integer" + } + }, + { + "name": "order", + "in": "query", + "description": "The order to sort the results by", + "required": false, + "schema": + { + "enum": + [ + "asc", + "desc" + ], + "default": "desc", + "type": "string", + "example": "desc" + } + } + ], + "responses": + { + "200": + { + "description": "List all messages in a conversation", + "content": + { + "application/json": + { + "schema": + { + "type": "object", + "properties": + { + "status": + { + "description": "The status of the response", + "enum": + [ + "error", + "success" + ], + "type": "string", + "example": "success" + }, + "data": + { + "type": "object", + "properties": + { + "conversation": + { + "type": "object", + "properties": + { + "created_at": + { + "description": "When was this conversation created?", + "format": "date-time", + "type": "string", + "example": "2023-04-30 16:43:53" + }, + "updated_at": + { + "description": "When was this conversation updated?", + "format": "date-time", + "type": "string", + "example": "2023-04-30 16:43:53" + }, + "id": + { + "description": "Conversation ID", + "type": "integer", + "example": 1 + }, + "name": + { + "description": "Conversation name", + "type": "string", + "example": "Conversation 1" + }, + "project_id": + { + "description": "Project ID for this conversation", + "type": "string", + "example": 1 + }, + "created_by": + { + "description": "User ID for the user who created this conversation", + "type": "string", + "example": 1 + }, + "session_id": + { + "description": "Session ID for this conversation", + "format": "uuid", + "type": "string", + "example": "f1b9aaf0-5e4e-11eb-ae93-0242ac130002" + } + } + }, + "messages": + { + "type": "object", + "properties": + { + "current_page": + { + "description": "The current page number", + "type": "integer", + "example": 1 + }, + "data": + { + "type": "array", + "items": + { + "type": "object", + "properties": + { + "id": + { + "description": "The unique identifier of the prompt history.", + "type": "integer", + "example": 1 + }, + "user_id": + { + "description": "The unique identifier of the user.", + "type": "integer", + "example": 1 + }, + "user_query": + { + "description": "The user prompt query.", + "type": "string", + "example": "What is the meaning of life?" + }, + "openai_response": + { + "description": "The OpenAI response to the user prompt query.", + "type": "string", + "example": "The meaning of life is to be happy." + }, + "created_at": + { + "description": "The date and time the prompt history was created.", + "format": "date-time", + "type": "string", + "example": "2021-01-01 00:00:00" + }, + "updated_at": + { + "description": "The date and time the prompt history was last updated.", + "format": "date-time", + "type": "string", + "example": "2021-01-01 00:00:00" + }, + "conversation_id": + { + "description": "The unique identifier of the conversation.", + "type": "integer", + "example": 1 + }, + "citations": + { + "description": "The citations for the prompt history.", + "default": + [], + "type": "array", + "items": + { + "type": "integer", + "example": 1 + }, + "example": + [ + 1, + 2, + 3 + ] + }, + "metadata": + { + "type": "object", + "properties": + { + "user_ip": + { + "description": "The IP address of the user.", + "type": "string", + "example": "127.0.0.1" + }, + "user_agent": + { + "description": "The user agent of the user.", + "type": "string", + "example": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko)" + }, + "external_id": + { + "description": "The external ID of the prompt history.", + "type": "string", + "maxLength": 128, + "example": "ext_id_1234567890" + }, + "request_source": + { + "description": "The source of the request.", + "type": "string", + "example": "web" + } + }, + "example": + { + "user_ip": "127.0.0.1", + "user_agent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko)", + "external_id": "ext_id_1234567890", + "request_source": "web" + } + } + } + } + }, + "first_page_url": + { + "description": "The first page url", + "type": "string", + "example": "https://app.customgpt.ai/api/v1/users?page=1" + }, + "from": + { + "description": "The first item number of the current page", + "type": "integer", + "example": 1 + }, + "last_page": + { + "description": "The last page number", + "type": "integer", + "example": 1 + }, + "last_page_url": + { + "description": "The last page url", + "type": "string", + "example": "https://app.customgpt.ai/api/v1/users?page=1" + }, + "next_page_url": + { + "description": "The next page url", + "type": "string", + "example": "https://app.customgpt.ai/api/v1/users?page=1" + }, + "path": + { + "description": "The current page url", + "type": "string", + "example": "https://app.customgpt.ai/api/v1/users?page=1" + }, + "per_page": + { + "description": "The number of items per page", + "type": "integer", + "example": 10 + }, + "prev_page_url": + { + "description": "The previous page url", + "type": "string", + "example": "https://app.customgpt.ai/api/v1/users?page=1" + }, + "to": + { + "description": "The last item number of the current page", + "type": "integer", + "example": 1 + }, + "total": + { + "description": "The total number of items", + "type": "integer", + "example": 1 + } + } + } + } + } + } + } + } + } + }, + "400": + { + "description": "Bad Argument", + "content": + { + "application/json": + { + "schema": + { + "type": "object", + "properties": + { + "status": + { + "description": "The status of the response", + "enum": + [ + "error", + "success" + ], + "type": "string", + "example": "error" + }, + "url": + { + "description": "The URL of the request", + "type": "string", + "example": "https://app.customgpt.ai/api/v1/projects/1" + }, + "data": + { + "type": "object", + "properties": + { + "code": + { + "description": "The error status code", + "enum": + [ + 400, + 401, + 403, + 404, + 500, + 503 + ], + "type": "integer", + "example": 400 + }, + "message": + { + "description": "The error message", + "type": "string", + "example": "Project id must be integer" + } + } + } + } + } + } + } + }, + "401": + { + "description": "API Token is either missing or invalid", + "content": + { + "application/json": + { + "schema": + { + "type": "object", + "properties": + { + "status": + { + "description": "The status of the response", + "enum": + [ + "error", + "success" + ], + "type": "string", + "example": "error" + }, + "url": + { + "description": "The URL of the request", + "type": "string", + "example": "https://app.customgpt.ai/api/v1/projects/1" + }, + "data": + { + "type": "object", + "properties": + { + "code": + { + "description": "The error status code", + "enum": + [ + 400, + 401, + 403, + 404, + 500, + 503 + ], + "type": "integer", + "example": 401 + }, + "message": + { + "type": "string", + "example": "API Token is either missing or invalid" + } + } + } + } + } + } + } + }, + "404": + { + "description": "Project not found", + "content": + { + "application/json": + { + "schema": + { + "type": "object", + "properties": + { + "status": + { + "description": "The status of the response", + "enum": + [ + "error", + "success" + ], + "type": "string", + "example": "error" + }, + "url": + { + "description": "The URL of the request", + "type": "string", + "example": "https://app.customgpt.ai/api/v1/projects/1" + }, + "data": + { + "type": "object", + "properties": + { + "code": + { + "description": "The error status code", + "enum": + [ + 400, + 401, + 403, + 404, + 500, + 503 + ], + "type": "integer", + "example": 404 + }, + "message": + { + "description": "The error message", + "enum": + [ + "Project id is required", + "Project with id {projectId} not found" + ], + "type": "string", + "example": "Project with id 1 not found" + } + } + } + } + } + } + } + }, + "500": + { + "description": "Internal Server Error", + "content": + { + "application/json": + { + "schema": + { + "type": "object", + "properties": + { + "status": + { + "description": "The status of the response", + "enum": + [ + "error", + "success" + ], + "type": "string", + "example": "error" + }, + "url": + { + "description": "The URL of the request", + "type": "string", + "example": "https://app.customgpt.ai/api/v1/projects/1" + }, + "data": + { + "type": "object", + "properties": + { + "code": + { + "description": "The error status code", + "enum": + [ + 400, + 401, + 403, + 404, + 500, + 503 + ], + "type": "integer", + "example": 500 + }, + "message": + { + "type": "string", + "example": "Internal Server Error" + } + } + } + } + } + } + } + } + }, + "security": + [ + { + "BearerToken": + [] + } + ] + }, + "post": + { + "tags": + [ + "Conversations" + ], + "summary": "Send a message to a conversation.", + "operationId": "send_message", + "description": "Send a message to a conversation within a project identified by its unique projectId and sessionId. This endpoint enables you to send a new message to a specific conversation, facilitating seamless communication and collaboration within the project. By providing the projectId and sessionId, you can target the desired conversation and contribute to the ongoing discussion. This API endpoint supports real-time streaming, allowing for instant message delivery and dynamic updates which enables efficient and interactive communication between the user and chatbot.\nHere is an example to send a message to a conversation: [API](https://github.com/Poll-The-People/customgpt-cookbook/blob/main/examples/Create_a_new_conversation_and_send_a_message_to_the_conversation.ipynb) [SDK](https://github.com/Poll-The-People/customgpt-cookbook/blob/main/examples/SDK_Create_a_new_conversation_and_send_a_message_to_the_conversation.ipynb).", + "parameters": + [ + { + "name": "projectId", + "in": "path", + "description": "The ID of the project to get the messages for", + "required": true, + "schema": + { + "type": "integer", + "example": 1 + } + }, + { + "name": "sessionId", + "in": "path", + "description": "The session ID of the converstaions to get the messages for", + "required": true, + "schema": + { + "type": "string", + "example": "1" + } + }, + { + "name": "stream", + "in": "query", + "description": "Whether to stream the response or not, if stream the responses will be sent as data-only server-sent events as they become available, with the stream terminated by a `status: \"finish\"` message. [Example Python code](https://github.com/Poll-The-People/customgpt-cookbook/blob/main/examples/SDK_Create_a_new_conversation_and_send_a_message_to_the_conversation.ipynb).", + "required": false, + "schema": + { + "default": false, + "type": "boolean" + } + }, + { + "name": "lang", + "in": "query", + "description": "The language to use for the prompt", + "required": false, + "schema": + { + "default": "en", + "type": "string" + } + }, + { + "name": "external_id", + "in": "query", + "description": "The external ID of the prompt history.", + "required": false, + "schema": + { + "type": "string", + "maxLength": 128 + } + }, + { + "name": "Cache-Control", + "in": "header", + "description": "With this header set to `no-cache`, if the prompt has already been generated, a fresh response will be generated. Otherwise, the cached response will be returned.", + "required": false, + "schema": + { + "enum": + [ + "no-cache" + ], + "type": "string", + "nullable": true + } + } + ], + "requestBody": + { + "description": "Send a message to a conversation.", + "content": + { + "application/json": + { + "schema": + { + "type": "object", + "properties": + { + "prompt": + { + "description": "Prompt to send to OpenAI", + "type": "string", + "example": "Write me hello world program in C" + }, + "custom_persona": + { + "description": "Custom persona to use for the conversation", + "type": "string", + "nullable": true, + "example": "You are a custom chatbot assistant called *bot name*, a friendly *bot role* who works for *organization* and answers questions based on the given context. Be as helpful as possible. Always prioritize the customer. Escalate complex issues. Stay on topic. Use appropriate language, Acknowledge limitations." + }, + "chatbot_model": + { + "description": "Chatbot model to use for the conversation", + "enum": + [ + "gpt-4", + "gpt-3.5-turbo", + "gpt-4-turbo", + "gpt-4-o" + ], + "type": "string", + "nullable": true, + "example": "gpt-4" + }, + "response_source": + { + "description": "By default, we ask ChatGPT to use only your content in its response (recommended). If you wish ChatGPT to improvise and use its own knowledgebase as well, you can set this to \"openai_content\".", + "enum": + [ + "default", + "own_content", + "openai_content" + ], + "default": "default", + "type": "string", + "nullable": true, + "example": "default" + } + } + } + } + } + }, + "responses": + { + "200": + { + "description": "Send a message to a conversation", + "content": + { + "application/json": + { + "schema": + { + "type": "object", + "properties": + { + "status": + { + "description": "The status of the response", + "enum": + [ + "error", + "success" + ], + "type": "string", + "example": "success" + }, + "data": + { + "type": "object", + "properties": + { + "id": + { + "description": "The unique identifier of the prompt history.", + "type": "integer", + "example": 1 + }, + "user_id": + { + "description": "The unique identifier of the user.", + "type": "integer", + "example": 1 + }, + "user_query": + { + "description": "The user prompt query.", + "type": "string", + "example": "What is the meaning of life?" + }, + "openai_response": + { + "description": "The OpenAI response to the user prompt query.", + "type": "string", + "example": "The meaning of life is to be happy." + }, + "created_at": + { + "description": "The date and time the prompt history was created.", + "format": "date-time", + "type": "string", + "example": "2021-01-01 00:00:00" + }, + "updated_at": + { + "description": "The date and time the prompt history was last updated.", + "format": "date-time", + "type": "string", + "example": "2021-01-01 00:00:00" + }, + "conversation_id": + { + "description": "The unique identifier of the conversation.", + "type": "integer", + "example": 1 + }, + "citations": + { + "description": "The citations for the prompt history.", + "default": + [], + "type": "array", + "items": + { + "type": "integer", + "example": 1 + }, + "example": + [ + 1, + 2, + 3 + ] + }, + "metadata": + { + "type": "object", + "properties": + { + "user_ip": + { + "description": "The IP address of the user.", + "type": "string", + "example": "127.0.0.1" + }, + "user_agent": + { + "description": "The user agent of the user.", + "type": "string", + "example": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko)" + }, + "external_id": + { + "description": "The external ID of the prompt history.", + "type": "string", + "maxLength": 128, + "example": "ext_id_1234567890" + }, + "request_source": + { + "description": "The source of the request.", + "type": "string", + "example": "web" + } + }, + "example": + { + "user_ip": "127.0.0.1", + "user_agent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko)", + "external_id": "ext_id_1234567890", + "request_source": "web" + } + } + } + } + } + } + } + } + }, + "400": + { + "description": "Bad Argument", + "content": + { + "application/json": + { + "schema": + { + "type": "object", + "properties": + { + "status": + { + "description": "The status of the response", + "enum": + [ + "error", + "success" + ], + "type": "string", + "example": "error" + }, + "url": + { + "description": "The URL of the request", + "type": "string", + "example": "https://app.customgpt.ai/api/v1/projects/1" + }, + "data": + { + "type": "object", + "properties": + { + "code": + { + "description": "The error status code", + "enum": + [ + 400, + 401, + 403, + 404, + 500, + 503 + ], + "type": "integer", + "example": 400 + }, + "message": + { + "description": "The error message", + "type": "string", + "example": "Project id must be integer" + } + } + } + } + } + } + } + }, + "401": + { + "description": "API Token is either missing or invalid", + "content": + { + "application/json": + { + "schema": + { + "type": "object", + "properties": + { + "status": + { + "description": "The status of the response", + "enum": + [ + "error", + "success" + ], + "type": "string", + "example": "error" + }, + "url": + { + "description": "The URL of the request", + "type": "string", + "example": "https://app.customgpt.ai/api/v1/projects/1" + }, + "data": + { + "type": "object", + "properties": + { + "code": + { + "description": "The error status code", + "enum": + [ + 400, + 401, + 403, + 404, + 500, + 503 + ], + "type": "integer", + "example": 401 + }, + "message": + { + "type": "string", + "example": "API Token is either missing or invalid" + } + } + } + } + } + } + } + }, + "404": + { + "description": "Project not found", + "content": + { + "application/json": + { + "schema": + { + "type": "object", + "properties": + { + "status": + { + "description": "The status of the response", + "enum": + [ + "error", + "success" + ], + "type": "string", + "example": "error" + }, + "url": + { + "description": "The URL of the request", + "type": "string", + "example": "https://app.customgpt.ai/api/v1/projects/1" + }, + "data": + { + "type": "object", + "properties": + { + "code": + { + "description": "The error status code", + "enum": + [ + 400, + 401, + 403, + 404, + 500, + 503 + ], + "type": "integer", + "example": 404 + }, + "message": + { + "description": "The error message", + "enum": + [ + "Project id is required", + "Project with id {projectId} not found" + ], + "type": "string", + "example": "Project with id 1 not found" + } + } + } + } + } + } + } + }, + "429": + { + "description": "Resource Exhausted when sending a message to a conversation", + "content": + { + "application/json": + { + "schema": + { + "type": "object", + "properties": + { + "status": + { + "description": "The status of the response", + "enum": + [ + "error", + "success" + ], + "type": "string", + "example": "error" + }, + "url": + { + "description": "The URL of the request", + "type": "string", + "example": "https://app.customgpt.ai/api/v1/projects/1" + }, + "data": + { + "type": "object", + "properties": + { + "code": + { + "description": "The error status code", + "enum": + [ + 400, + 401, + 403, + 404, + 500, + 503 + ], + "type": "integer", + "example": 429 + }, + "message": + { + "description": "The error message", + "type": "string", + "example": "You have exhausted your current query credits. Please contact hello@customgpt.ai for further assistance." + } + } + } + } + } + } + } + }, + "500": + { + "description": "Internal Server Error", + "content": + { + "application/json": + { + "schema": + { + "type": "object", + "properties": + { + "status": + { + "description": "The status of the response", + "enum": + [ + "error", + "success" + ], + "type": "string", + "example": "error" + }, + "url": + { + "description": "The URL of the request", + "type": "string", + "example": "https://app.customgpt.ai/api/v1/projects/1" + }, + "data": + { + "type": "object", + "properties": + { + "code": + { + "description": "The error status code", + "enum": + [ + 400, + 401, + 403, + 404, + 500, + 503 + ], + "type": "integer", + "example": 500 + }, + "message": + { + "type": "string", + "example": "Internal Server Error" + } + } + } + } + } + } + } + } + }, + "security": + [ + { + "BearerToken": + [] + } + ] + } + }, + "/api/v1/projects/{projectId}/citations/{citationId}": + { + "get": + { + "tags": + [ + "Citations" + ], + "summary": "Get the Open Graph data for a citation.", + "operationId": "get_citation", + "description": "Retrieve the Open Graph data for a citation based on its unique identifier. This endpoint allows you to fetch the Open Graph metadata associated with a specific citation.\nHere is an example to get citation detail: [API](https://github.com/Poll-The-People/customgpt-cookbook/blob/main/examples/Get_citation_details.ipynb) [SDK](https://github.com/Poll-The-People/customgpt-cookbook/blob/main/examples/SDK_Get_Citation_Details.ipynb).", + "parameters": + [ + { + "name": "projectId", + "in": "path", + "description": "The unique project identifier.", + "required": true, + "schema": + { + "type": "integer", + "example": 1 + } + }, + { + "name": "citationId", + "in": "path", + "description": "The unique citation identifier.", + "required": true, + "schema": + { + "type": "integer", + "example": 1 + } + } + ], + "responses": + { + "200": + { + "description": "Get the Page metadata data for a citation", + "content": + { + "application/json": + { + "schema": + { + "type": "object", + "properties": + { + "status": + { + "description": "The status of the response", + "enum": + [ + "error", + "success" + ], + "type": "string", + "example": "success" + }, + "data": + { + "type": "object", + "properties": + { + "id": + { + "description": "The unique identifier of the page", + "type": "integer", + "example": 1 + }, + "url": + { + "description": "The URL of the page", + "type": "string", + "nullable": true, + "example": "https://www.example.com" + }, + "title": + { + "description": "The title of the page", + "type": "string", + "nullable": true, + "example": "Example Domain" + }, + "description": + { + "description": "The description of the page", + "type": "string", + "nullable": true, + "example": "This domain is for use in illustrative examples in documents. You may use this domain in literature without prior coordination or asking for permission." + }, + "image": + { + "description": "The image of the page", + "type": "string", + "nullable": true, + "example": "https://www.example.com/image.png" + } + } + } + } + } + } + } + }, + "400": + { + "description": "Bad Argument", + "content": + { + "application/json": + { + "schema": + { + "type": "object", + "properties": + { + "status": + { + "description": "The status of the response", + "enum": + [ + "error", + "success" + ], + "type": "string", + "example": "error" + }, + "url": + { + "description": "The URL of the request", + "type": "string", + "example": "https://app.customgpt.ai/api/v1/projects/1" + }, + "data": + { + "type": "object", + "properties": + { + "code": + { + "description": "The error status code", + "enum": + [ + 400, + 401, + 403, + 404, + 500, + 503 + ], + "type": "integer", + "example": 400 + }, + "message": + { + "description": "The error message", + "type": "string", + "example": "Project id must be integer" + } + } + } + } + } + } + } + }, + "401": + { + "description": "API Token is either missing or invalid", + "content": + { + "application/json": + { + "schema": + { + "type": "object", + "properties": + { + "status": + { + "description": "The status of the response", + "enum": + [ + "error", + "success" + ], + "type": "string", + "example": "error" + }, + "url": + { + "description": "The URL of the request", + "type": "string", + "example": "https://app.customgpt.ai/api/v1/projects/1" + }, + "data": + { + "type": "object", + "properties": + { + "code": + { + "description": "The error status code", + "enum": + [ + 400, + 401, + 403, + 404, + 500, + 503 + ], + "type": "integer", + "example": 401 + }, + "message": + { + "type": "string", + "example": "API Token is either missing or invalid" + } + } + } + } + } + } + } + }, + "404": + { + "description": "Page not found", + "content": + { + "application/json": + { + "schema": + { + "type": "object", + "properties": + { + "status": + { + "description": "The status of the response", + "enum": + [ + "error", + "success" + ], + "type": "string", + "example": "error" + }, + "url": + { + "description": "The URL of the request", + "type": "string", + "example": "https://app.customgpt.ai/api/v1/projects/1" + }, + "data": + { + "type": "object", + "properties": + { + "code": + { + "description": "The error status code", + "enum": + [ + 400, + 401, + 403, + 404, + 500, + 503 + ], + "type": "integer", + "example": 404 + }, + "message": + { + "description": "The error message", + "enum": + [ + "Page id is required", + "Page with id {pageId} not found" + ], + "type": "string", + "example": "Page with id 1 not found" + } + } + } + } + } + } + } + } + }, + "security": + [ + { + "BearerToken": + [] + } + ] + } + }, + "/api/v1/projects/{projectId}/sources": + { + "get": + { + "tags": + [ + "Sources" + ], + "summary": "List a certain project's sources.", + "operationId": "list_sources", + "description": "Retrieve a list of all sources associated with a given project. This endpoint provides a collection of sources that are linked to a specific project. Sources serve as references or contexts for the project.", + "parameters": + [ + { + "name": "projectId", + "in": "path", + "description": "The unique identifier of a project.", + "required": true, + "schema": + { + "type": "integer" + } + } + ], + "responses": + { + "200": + { + "description": "Successfully retrieved list of sources that belong to a project.", + "content": + { + "application/json": + { + "schema": + { + "type": "object", + "properties": + { + "status": + { + "description": "The status of the response", + "enum": + [ + "error", + "success" + ], + "type": "string", + "example": "success" + }, + "data": + { + "type": "object", + "properties": + { + "sitemaps": + { + "type": "array", + "items": + { + "type": "object", + "properties": + { + "id": + { + "description": "The project source ID", + "type": "integer", + "example": 1 + }, + "created_at": + { + "description": "The project source creation date", + "format": "date-time", + "type": "string", + "example": "2021-01-01 00:00:00" + }, + "updated_at": + { + "description": "The project source update date", + "format": "date-time", + "type": "string", + "example": "2021-01-01 00:00:00" + }, + "type": + { + "description": "The project source type", + "enum": + [ + "sitemap", + "upload" + ], + "type": "string", + "example": "sitemap" + }, + "settings": + { + "description": "The project source settings", + "type": "object", + "properties": + { + "executive_js": + { + "description": "Whether the project source should execute JavaScript", + "default": true, + "type": "boolean", + "example": true + }, + "data_refresh_frequency": + { + "description": "The project source data refresh frequency", + "enum": + [ + "never", + "daily", + "weekly", + "monthly", + "advanced" + ], + "default": "never", + "type": "string", + "example": "never" + }, + "create_new_pages": + { + "description": "Add new pages to project automatically during refresh project source", + "default": true, + "type": "boolean", + "example": true + }, + "remove_unexist_pages": + { + "description": "Remove pages from project automatically during refresh project source", + "default": true, + "type": "boolean", + "example": false + }, + "refresh_existing_pages": + { + "description": "Refresh existing page during refresh project source", + "enum": + [ + "never", + "always", + "if_updated" + ], + "default": "never", + "type": "string", + "example": "never" + }, + "sitemap_path": + { + "description": "The project source sitemap path", + "type": "string", + "example": "https://example.com/sitemap.xml" + } + } + }, + "pages": + { + "description": "The project source pages", + "type": "array", + "items": + { + "type": "object", + "properties": + { + "id": + { + "description": "Page ID", + "type": "integer", + "example": 1 + }, + "page_url": + { + "description": "URL of the page or file", + "type": "string", + "example": "https://example.com" + }, + "page_url_hash": + { + "description": "Hash of the URL of the page or file", + "format": "md5", + "type": "string", + "example": "d41d8cd98f00b204e9800998ecf8427e" + }, + "project_id": + { + "description": "Project ID", + "type": "integer", + "example": 1 + }, + "s3_path": + { + "description": "This is the path where the page is stored in S3.\\nNote: This is omitted in the response if the page is not a file", + "type": "string", + "nullable": true, + "example": "project-1/page-1/file.pdf" + }, + "crawl_status": + { + "description": "Crawl status of the page", + "enum": + [ + "ok", + "queued", + "failed", + "n/a", + "limited" + ], + "default": "queued", + "type": "string", + "example": "queued" + }, + "index_status": + { + "description": "Index status of the page", + "enum": + [ + "ok", + "queued", + "failed", + "n/a", + "limited" + ], + "default": "queued", + "type": "string", + "example": "queued" + }, + "is_file": + { + "description": "Whether the page is a file or not", + "default": false, + "type": "boolean", + "example": true + }, + "is_refreshable": + { + "description": "Whether the page can be refreshed or not", + "default": false, + "type": "boolean", + "example": true + }, + "is_file_kept": + { + "description": "Whether the file is kept after processing or not.\\nNote: This is omitted in the response if the page is not a file", + "default": true, + "type": "boolean", + "example": true + }, + "filename": + { + "description": "Filename of the page.\\nNote: This is omitted in the response if the page is not a file", + "type": "string", + "nullable": true, + "example": "file.pdf" + }, + "filesize": + { + "description": "Filesize of the page.\\nNote: This is omitted in the response if the page is not a file", + "type": "integer", + "nullable": true, + "example": 100 + }, + "created_at": + { + "description": "Date and time when the page was created", + "format": "date-time", + "type": "string", + "example": "2021-01-01 00:00:00" + }, + "updated_at": + { + "description": "Date and time when the page was updated", + "format": "date-time", + "type": "string", + "example": "2021-01-01 00:00:00" + } + } + }, + "nullable": true + } + } + } + }, + "uploads": + { + "type": "object", + "properties": + { + "id": + { + "description": "The project source ID", + "type": "integer", + "example": 1 + }, + "created_at": + { + "description": "The project source creation date", + "format": "date-time", + "type": "string", + "example": "2021-01-01 00:00:00" + }, + "updated_at": + { + "description": "The project source update date", + "format": "date-time", + "type": "string", + "example": "2021-01-01 00:00:00" + }, + "type": + { + "description": "The project source type", + "enum": + [ + "sitemap", + "upload" + ], + "type": "string", + "example": "sitemap" + }, + "settings": + { + "description": "The project source settings", + "type": "object", + "properties": + { + "executive_js": + { + "description": "Whether the project source should execute JavaScript", + "default": true, + "type": "boolean", + "example": true + }, + "data_refresh_frequency": + { + "description": "The project source data refresh frequency", + "enum": + [ + "never", + "daily", + "weekly", + "monthly", + "advanced" + ], + "default": "never", + "type": "string", + "example": "never" + }, + "create_new_pages": + { + "description": "Add new pages to project automatically during refresh project source", + "default": true, + "type": "boolean", + "example": true + }, + "remove_unexist_pages": + { + "description": "Remove pages from project automatically during refresh project source", + "default": true, + "type": "boolean", + "example": false + }, + "refresh_existing_pages": + { + "description": "Refresh existing page during refresh project source", + "enum": + [ + "never", + "always", + "if_updated" + ], + "default": "never", + "type": "string", + "example": "never" + }, + "sitemap_path": + { + "description": "The project source sitemap path", + "type": "string", + "example": "https://example.com/sitemap.xml" + } + } + }, + "pages": + { + "description": "The project source pages", + "type": "array", + "items": + { + "type": "object", + "properties": + { + "id": + { + "description": "Page ID", + "type": "integer", + "example": 1 + }, + "page_url": + { + "description": "URL of the page or file", + "type": "string", + "example": "https://example.com" + }, + "page_url_hash": + { + "description": "Hash of the URL of the page or file", + "format": "md5", + "type": "string", + "example": "d41d8cd98f00b204e9800998ecf8427e" + }, + "project_id": + { + "description": "Project ID", + "type": "integer", + "example": 1 + }, + "s3_path": + { + "description": "This is the path where the page is stored in S3.\\nNote: This is omitted in the response if the page is not a file", + "type": "string", + "nullable": true, + "example": "project-1/page-1/file.pdf" + }, + "crawl_status": + { + "description": "Crawl status of the page", + "enum": + [ + "ok", + "queued", + "failed", + "n/a", + "limited" + ], + "default": "queued", + "type": "string", + "example": "queued" + }, + "index_status": + { + "description": "Index status of the page", + "enum": + [ + "ok", + "queued", + "failed", + "n/a", + "limited" + ], + "default": "queued", + "type": "string", + "example": "queued" + }, + "is_file": + { + "description": "Whether the page is a file or not", + "default": false, + "type": "boolean", + "example": true + }, + "is_refreshable": + { + "description": "Whether the page can be refreshed or not", + "default": false, + "type": "boolean", + "example": true + }, + "is_file_kept": + { + "description": "Whether the file is kept after processing or not.\\nNote: This is omitted in the response if the page is not a file", + "default": true, + "type": "boolean", + "example": true + }, + "filename": + { + "description": "Filename of the page.\\nNote: This is omitted in the response if the page is not a file", + "type": "string", + "nullable": true, + "example": "file.pdf" + }, + "filesize": + { + "description": "Filesize of the page.\\nNote: This is omitted in the response if the page is not a file", + "type": "integer", + "nullable": true, + "example": 100 + }, + "created_at": + { + "description": "Date and time when the page was created", + "format": "date-time", + "type": "string", + "example": "2021-01-01 00:00:00" + }, + "updated_at": + { + "description": "Date and time when the page was updated", + "format": "date-time", + "type": "string", + "example": "2021-01-01 00:00:00" + } + } + }, + "nullable": true + } + } + } + } + } + } + } + } + } + }, + "401": + { + "description": "API Token is either missing or invalid", + "content": + { + "application/json": + { + "schema": + { + "type": "object", + "properties": + { + "status": + { + "description": "The status of the response", + "enum": + [ + "error", + "success" + ], + "type": "string", + "example": "error" + }, + "url": + { + "description": "The URL of the request", + "type": "string", + "example": "https://app.customgpt.ai/api/v1/projects/1" + }, + "data": + { + "type": "object", + "properties": + { + "code": + { + "description": "The error status code", + "enum": + [ + 400, + 401, + 403, + 404, + 500, + 503 + ], + "type": "integer", + "example": 401 + }, + "message": + { + "type": "string", + "example": "API Token is either missing or invalid" + } + } + } + } + } + } + } + }, + "500": + { + "description": "Internal Server Error", + "content": + { + "application/json": + { + "schema": + { + "type": "object", + "properties": + { + "status": + { + "description": "The status of the response", + "enum": + [ + "error", + "success" + ], + "type": "string", + "example": "error" + }, + "url": + { + "description": "The URL of the request", + "type": "string", + "example": "https://app.customgpt.ai/api/v1/projects/1" + }, + "data": + { + "type": "object", + "properties": + { + "code": + { + "description": "The error status code", + "enum": + [ + 400, + 401, + 403, + 404, + 500, + 503 + ], + "type": "integer", + "example": 500 + }, + "message": + { + "type": "string", + "example": "Internal Server Error" + } + } + } + } + } + } + } + } + }, + "security": + [ + { + "BearerToken": + [] + } + ] + }, + "post": + { + "tags": + [ + "Sources" + ], + "summary": "Create a new project source.", + "operationId": "create_source", + "description": "Create a new data source for a given project, allowing you to add additional context by specifying a sitemap URL or uploading a file. This endpoint enables you to enrich the project's information by incorporating relevant data sources.\nHere is an example to add a new source to project: [API](https://github.com/Poll-The-People/customgpt-cookbook/blob/main/examples/Add_a_sitemap_to_an_existing_project.ipynb) [SDK](https://github.com/Poll-The-People/customgpt-cookbook/blob/main/examples/SDK_Add_a_Sitemap_to_project.ipynb).", + "parameters": + [ + { + "name": "projectId", + "in": "path", + "description": "The unique identifier of a project.", + "required": true, + "schema": + { + "type": "integer" + } + } + ], + "requestBody": + { + "description": "Create a new project source from a sitemap or a file", + "content": + { + "multipart/form-data": + { + "schema": + { + "type": "object", + "properties": + { + "sitemap_path": + { + "description": "The sitemap path", + "type": "string", + "example": "https://example.com/sitemap.xml" + }, + "file_data_retension": + { + "description": "File data retension", + "type": "boolean", + "example": true + }, + "is_ocr_enabled": + { + "description": "OCR enabled", + "type": "boolean", + "example": false + }, + "is_anonymized": + { + "description": "Anonymized", + "type": "boolean", + "example": false + }, + "file": + { + "description": "The submitted file.", + "format": "binary", + "type": "string", + "example": "file.pdf" + } + } + } + } + } + }, + "responses": + { + "201": + { + "description": "Successfully created a new project source.", + "content": + { + "application/json": + { + "schema": + { + "type": "object", + "properties": + { + "status": + { + "description": "The status of the response", + "enum": + [ + "error", + "success" + ], + "type": "string", + "example": "success" + }, + "data": + { + "type": "object", + "properties": + { + "id": + { + "description": "The project source ID", + "type": "integer", + "example": 1 + }, + "created_at": + { + "description": "The project source creation date", + "format": "date-time", + "type": "string", + "example": "2021-01-01 00:00:00" + }, + "updated_at": + { + "description": "The project source update date", + "format": "date-time", + "type": "string", + "example": "2021-01-01 00:00:00" + }, + "type": + { + "description": "The project source type", + "enum": + [ + "sitemap", + "upload" + ], + "type": "string", + "example": "sitemap" + }, + "settings": + { + "description": "The project source settings", + "type": "object", + "properties": + { + "executive_js": + { + "description": "Whether the project source should execute JavaScript", + "default": true, + "type": "boolean", + "example": true + }, + "data_refresh_frequency": + { + "description": "The project source data refresh frequency", + "enum": + [ + "never", + "daily", + "weekly", + "monthly", + "advanced" + ], + "default": "never", + "type": "string", + "example": "never" + }, + "create_new_pages": + { + "description": "Add new pages to project automatically during refresh project source", + "default": true, + "type": "boolean", + "example": true + }, + "remove_unexist_pages": + { + "description": "Remove pages from project automatically during refresh project source", + "default": true, + "type": "boolean", + "example": false + }, + "refresh_existing_pages": + { + "description": "Refresh existing page during refresh project source", + "enum": + [ + "never", + "always", + "if_updated" + ], + "default": "never", + "type": "string", + "example": "never" + }, + "sitemap_path": + { + "description": "The project source sitemap path", + "type": "string", + "example": "https://example.com/sitemap.xml" + } + } + }, + "pages": + { + "description": "The project source pages", + "type": "array", + "items": + { + "type": "object", + "properties": + { + "id": + { + "description": "Page ID", + "type": "integer", + "example": 1 + }, + "page_url": + { + "description": "URL of the page or file", + "type": "string", + "example": "https://example.com" + }, + "page_url_hash": + { + "description": "Hash of the URL of the page or file", + "format": "md5", + "type": "string", + "example": "d41d8cd98f00b204e9800998ecf8427e" + }, + "project_id": + { + "description": "Project ID", + "type": "integer", + "example": 1 + }, + "s3_path": + { + "description": "This is the path where the page is stored in S3.\\nNote: This is omitted in the response if the page is not a file", + "type": "string", + "nullable": true, + "example": "project-1/page-1/file.pdf" + }, + "crawl_status": + { + "description": "Crawl status of the page", + "enum": + [ + "ok", + "queued", + "failed", + "n/a", + "limited" + ], + "default": "queued", + "type": "string", + "example": "queued" + }, + "index_status": + { + "description": "Index status of the page", + "enum": + [ + "ok", + "queued", + "failed", + "n/a", + "limited" + ], + "default": "queued", + "type": "string", + "example": "queued" + }, + "is_file": + { + "description": "Whether the page is a file or not", + "default": false, + "type": "boolean", + "example": true + }, + "is_refreshable": + { + "description": "Whether the page can be refreshed or not", + "default": false, + "type": "boolean", + "example": true + }, + "is_file_kept": + { + "description": "Whether the file is kept after processing or not.\\nNote: This is omitted in the response if the page is not a file", + "default": true, + "type": "boolean", + "example": true + }, + "filename": + { + "description": "Filename of the page.\\nNote: This is omitted in the response if the page is not a file", + "type": "string", + "nullable": true, + "example": "file.pdf" + }, + "filesize": + { + "description": "Filesize of the page.\\nNote: This is omitted in the response if the page is not a file", + "type": "integer", + "nullable": true, + "example": 100 + }, + "created_at": + { + "description": "Date and time when the page was created", + "format": "date-time", + "type": "string", + "example": "2021-01-01 00:00:00" + }, + "updated_at": + { + "description": "Date and time when the page was updated", + "format": "date-time", + "type": "string", + "example": "2021-01-01 00:00:00" + } + } + }, + "nullable": true + } + } + } + } + } + } + } + }, + "400": + { + "description": "Service unavailable", + "content": + { + "application/json": + { + "schema": + { + "type": "object", + "properties": + { + "status": + { + "description": "The status of the response", + "enum": + [ + "error", + "success" + ], + "type": "string", + "example": "error" + }, + "url": + { + "description": "The URL of the request", + "type": "string", + "example": "https://app.customgpt.ai/api/v1/projects/1" + }, + "data": + { + "type": "object", + "properties": + { + "code": + { + "description": "The error status code", + "enum": + [ + 400, + 401, + 403, + 404, + 500, + 503 + ], + "type": "integer", + "example": 400 + }, + "message": + { + "description": "The error message", + "type": "string", + "example": "Sitemap URL is empty" + } + } + } + } + } + } + } + }, + "401": + { + "description": "API Token is either missing or invalid", + "content": + { + "application/json": + { + "schema": + { + "type": "object", + "properties": + { + "status": + { + "description": "The status of the response", + "enum": + [ + "error", + "success" + ], + "type": "string", + "example": "error" + }, + "url": + { + "description": "The URL of the request", + "type": "string", + "example": "https://app.customgpt.ai/api/v1/projects/1" + }, + "data": + { + "type": "object", + "properties": + { + "code": + { + "description": "The error status code", + "enum": + [ + 400, + 401, + 403, + 404, + 500, + 503 + ], + "type": "integer", + "example": 401 + }, + "message": + { + "type": "string", + "example": "API Token is either missing or invalid" + } + } + } + } + } + } + } + }, + "404": + { + "description": "Project not found", + "content": + { + "application/json": + { + "schema": + { + "type": "object", + "properties": + { + "status": + { + "description": "The status of the response", + "enum": + [ + "error", + "success" + ], + "type": "string", + "example": "error" + }, + "url": + { + "description": "The URL of the request", + "type": "string", + "example": "https://app.customgpt.ai/api/v1/projects/1" + }, + "data": + { + "type": "object", + "properties": + { + "code": + { + "description": "The error status code", + "enum": + [ + 400, + 401, + 403, + 404, + 500, + 503 + ], + "type": "integer", + "example": 404 + }, + "message": + { + "description": "The error message", + "enum": + [ + "Project id is required", + "Project with id {projectId} not found" + ], + "type": "string", + "example": "Project with id 1 not found" + } + } + } + } + } + } + } + }, + "500": + { + "description": "Internal Server Error", + "content": + { + "application/json": + { + "schema": + { + "type": "object", + "properties": + { + "status": + { + "description": "The status of the response", + "enum": + [ + "error", + "success" + ], + "type": "string", + "example": "error" + }, + "url": + { + "description": "The URL of the request", + "type": "string", + "example": "https://app.customgpt.ai/api/v1/projects/1" + }, + "data": + { + "type": "object", + "properties": + { + "code": + { + "description": "The error status code", + "enum": + [ + 400, + 401, + 403, + 404, + 500, + 503 + ], + "type": "integer", + "example": 500 + }, + "message": + { + "type": "string", + "example": "Internal Server Error" + } + } + } + } + } + } + } + } + }, + "security": + [ + { + "BearerToken": + [] + } + ] + } + }, + "/api/v1/projects/{projectId}/sources/{sourceId}": + { + "put": + { + "tags": + [ + "Sources" + ], + "summary": "Update project source settings.", + "operationId": "update_source", + "description": "Update a data source settings, allowing you to change additional settings.", + "parameters": + [ + { + "name": "projectId", + "in": "path", + "description": "The unique identifier of a project.", + "required": true, + "schema": + { + "type": "integer" + } + }, + { + "name": "sourceId", + "in": "path", + "required": true, + "schema": + { + "type": "integer" + } + } + ], + "requestBody": + { + "description": "Update a project source", + "content": + { + "application/json": + { + "schema": + { + "type": "object", + "properties": + { + "executive_js": + { + "description": "Whether the project source should execute JavaScript", + "default": true, + "type": "boolean", + "example": true + }, + "data_refresh_frequency": + { + "description": "The project source data refresh frequency", + "enum": + [ + "never", + "daily", + "weekly", + "monthly", + "advanced" + ], + "default": "never", + "type": "string", + "example": "never" + }, + "create_new_pages": + { + "description": "Add new pages to project automatically during refresh project source", + "default": true, + "type": "boolean", + "example": true + }, + "remove_unexist_pages": + { + "description": "Remove pages from project automatically during refresh project source", + "default": true, + "type": "boolean", + "example": false + }, + "refresh_existing_pages": + { + "description": "Refresh existing page during refresh project source", + "enum": + [ + "never", + "always", + "if_updated" + ], + "default": "never", + "type": "string", + "example": "never" + }, + "refresh_schedule": + { + "description": "Custom schedule for advanced data frequency", + "default": + [], + "type": "array", + "items": + { + "type": "object", + "properties": + { + "days": + { + "description": "Index of days in which sitemap should be refreshed. Starts from 0 (Sunday) to 6 (Saturday).", + "type": "array", + "items": + { + "type": "integer", + "example": 0 + }, + "example": + [ + 0, + 1, + 4, + 6 + ] + }, + "hours": + { + "description": "List of times in which sitemap should be refreshed. Must be in HH:MM format.", + "type": "array", + "items": + { + "type": "string", + "example": "23:45" + }, + "example": + [ + "00:00", + "08:00", + "23:45" + ] + } + } + }, + "nullable": true, + "example": + { + "days": + [ + 1, + 3, + 5 + ], + "hours": + [ + "08:00", + "23:59" + ] + } + } + } + } + } + } + }, + "responses": + { + "201": + { + "description": "Successfully updated project source.", + "content": + { + "application/json": + { + "schema": + { + "type": "object", + "properties": + { + "status": + { + "description": "The status of the response", + "enum": + [ + "error", + "success" + ], + "type": "string", + "example": "success" + }, + "data": + { + "type": "object", + "properties": + { + "id": + { + "description": "The project source ID", + "type": "integer", + "example": 1 + }, + "created_at": + { + "description": "The project source creation date", + "format": "date-time", + "type": "string", + "example": "2021-01-01 00:00:00" + }, + "updated_at": + { + "description": "The project source update date", + "format": "date-time", + "type": "string", + "example": "2021-01-01 00:00:00" + }, + "type": + { + "description": "The project source type", + "enum": + [ + "sitemap", + "upload" + ], + "type": "string", + "example": "sitemap" + }, + "settings": + { + "description": "The project source settings", + "type": "object", + "properties": + { + "executive_js": + { + "description": "Whether the project source should execute JavaScript", + "default": true, + "type": "boolean", + "example": true + }, + "data_refresh_frequency": + { + "description": "The project source data refresh frequency", + "enum": + [ + "never", + "daily", + "weekly", + "monthly", + "advanced" + ], + "default": "never", + "type": "string", + "example": "never" + }, + "create_new_pages": + { + "description": "Add new pages to project automatically during refresh project source", + "default": true, + "type": "boolean", + "example": true + }, + "remove_unexist_pages": + { + "description": "Remove pages from project automatically during refresh project source", + "default": true, + "type": "boolean", + "example": false + }, + "refresh_existing_pages": + { + "description": "Refresh existing page during refresh project source", + "enum": + [ + "never", + "always", + "if_updated" + ], + "default": "never", + "type": "string", + "example": "never" + }, + "sitemap_path": + { + "description": "The project source sitemap path", + "type": "string", + "example": "https://example.com/sitemap.xml" + } + } + }, + "pages": + { + "description": "The project source pages", + "type": "array", + "items": + { + "type": "object", + "properties": + { + "id": + { + "description": "Page ID", + "type": "integer", + "example": 1 + }, + "page_url": + { + "description": "URL of the page or file", + "type": "string", + "example": "https://example.com" + }, + "page_url_hash": + { + "description": "Hash of the URL of the page or file", + "format": "md5", + "type": "string", + "example": "d41d8cd98f00b204e9800998ecf8427e" + }, + "project_id": + { + "description": "Project ID", + "type": "integer", + "example": 1 + }, + "s3_path": + { + "description": "This is the path where the page is stored in S3.\\nNote: This is omitted in the response if the page is not a file", + "type": "string", + "nullable": true, + "example": "project-1/page-1/file.pdf" + }, + "crawl_status": + { + "description": "Crawl status of the page", + "enum": + [ + "ok", + "queued", + "failed", + "n/a", + "limited" + ], + "default": "queued", + "type": "string", + "example": "queued" + }, + "index_status": + { + "description": "Index status of the page", + "enum": + [ + "ok", + "queued", + "failed", + "n/a", + "limited" + ], + "default": "queued", + "type": "string", + "example": "queued" + }, + "is_file": + { + "description": "Whether the page is a file or not", + "default": false, + "type": "boolean", + "example": true + }, + "is_refreshable": + { + "description": "Whether the page can be refreshed or not", + "default": false, + "type": "boolean", + "example": true + }, + "is_file_kept": + { + "description": "Whether the file is kept after processing or not.\\nNote: This is omitted in the response if the page is not a file", + "default": true, + "type": "boolean", + "example": true + }, + "filename": + { + "description": "Filename of the page.\\nNote: This is omitted in the response if the page is not a file", + "type": "string", + "nullable": true, + "example": "file.pdf" + }, + "filesize": + { + "description": "Filesize of the page.\\nNote: This is omitted in the response if the page is not a file", + "type": "integer", + "nullable": true, + "example": 100 + }, + "created_at": + { + "description": "Date and time when the page was created", + "format": "date-time", + "type": "string", + "example": "2021-01-01 00:00:00" + }, + "updated_at": + { + "description": "Date and time when the page was updated", + "format": "date-time", + "type": "string", + "example": "2021-01-01 00:00:00" + } + } + }, + "nullable": true + } + } + } + } + } + } + } + }, + "400": + { + "description": "Bad Argument", + "content": + { + "application/json": + { + "schema": + { + "type": "object", + "properties": + { + "status": + { + "description": "The status of the response", + "enum": + [ + "error", + "success" + ], + "type": "string", + "example": "error" + }, + "url": + { + "description": "The URL of the request", + "type": "string", + "example": "https://app.customgpt.ai/api/v1/projects/1" + }, + "data": + { + "type": "object", + "properties": + { + "code": + { + "description": "The error status code", + "enum": + [ + 400, + 401, + 403, + 404, + 500, + 503 + ], + "type": "integer", + "example": 400 + }, + "message": + { + "description": "The error message", + "type": "string", + "example": "Project id must be integer" + } + } + } + } + } + } + } + }, + "401": + { + "description": "API Token is either missing or invalid", + "content": + { + "application/json": + { + "schema": + { + "type": "object", + "properties": + { + "status": + { + "description": "The status of the response", + "enum": + [ + "error", + "success" + ], + "type": "string", + "example": "error" + }, + "url": + { + "description": "The URL of the request", + "type": "string", + "example": "https://app.customgpt.ai/api/v1/projects/1" + }, + "data": + { + "type": "object", + "properties": + { + "code": + { + "description": "The error status code", + "enum": + [ + 400, + 401, + 403, + 404, + 500, + 503 + ], + "type": "integer", + "example": 401 + }, + "message": + { + "type": "string", + "example": "API Token is either missing or invalid" + } + } + } + } + } + } + } + }, + "404": + { + "description": "Project source not found", + "content": + { + "application/json": + { + "schema": + { + "type": "object", + "properties": + { + "status": + { + "description": "The status of the response", + "enum": + [ + "error", + "success" + ], + "type": "string", + "example": "error" + }, + "url": + { + "description": "The URL of the request", + "type": "string", + "example": "https://app.customgpt.ai/api/v1/projects/1" + }, + "data": + { + "type": "object", + "properties": + { + "code": + { + "description": "The error status code", + "enum": + [ + 400, + 401, + 403, + 404, + 500, + 503 + ], + "type": "integer", + "example": 404 + }, + "message": + { + "description": "The error message", + "enum": + [ + "Project source id is required", + "Project source with id {sourceId} not found" + ], + "type": "string", + "example": "Project source with id 1 not found" + } + } + } + } + } + } + } + }, + "500": + { + "description": "Internal Server Error", + "content": + { + "application/json": + { + "schema": + { + "type": "object", + "properties": + { + "status": + { + "description": "The status of the response", + "enum": + [ + "error", + "success" + ], + "type": "string", + "example": "error" + }, + "url": + { + "description": "The URL of the request", + "type": "string", + "example": "https://app.customgpt.ai/api/v1/projects/1" + }, + "data": + { + "type": "object", + "properties": + { + "code": + { + "description": "The error status code", + "enum": + [ + 400, + 401, + 403, + 404, + 500, + 503 + ], + "type": "integer", + "example": 500 + }, + "message": + { + "type": "string", + "example": "Internal Server Error" + } + } + } + } + } + } + } + } + }, + "security": + [ + { + "BearerToken": + [] + } + ] + }, + "delete": + { + "tags": + [ + "Sources" + ], + "summary": "Delete a project source.", + "operationId": "delete_source", + "description": "Delete a source for a given project.", + "parameters": + [ + { + "name": "projectId", + "in": "path", + "description": "The unique identifier of a project.", + "required": true, + "schema": + { + "type": "integer" + } + }, + { + "name": "sourceId", + "in": "path", + "description": "The unique identifier of a source.", + "required": true, + "schema": + { + "type": "integer" + } + } + ], + "responses": + { + "200": + { + "description": "Project source deleted successfully", + "content": + { + "application/json": + { + "schema": + { + "type": "object", + "properties": + { + "status": + { + "description": "The status of the response", + "enum": + [ + "error", + "success" + ], + "type": "string", + "example": "success" + }, + "data": + { + "type": "object", + "properties": + { + "deleted": + { + "description": "Whether the project source was deleted successfully or not", + "type": "boolean", + "example": true + } + } + } + } + } + } + } + }, + "400": + { + "description": "Bad Argument", + "content": + { + "application/json": + { + "schema": + { + "type": "object", + "properties": + { + "status": + { + "description": "The status of the response", + "enum": + [ + "error", + "success" + ], + "type": "string", + "example": "error" + }, + "url": + { + "description": "The URL of the request", + "type": "string", + "example": "https://app.customgpt.ai/api/v1/projects/1" + }, + "data": + { + "type": "object", + "properties": + { + "code": + { + "description": "The error status code", + "enum": + [ + 400, + 401, + 403, + 404, + 500, + 503 + ], + "type": "integer", + "example": 400 + }, + "message": + { + "description": "The error message", + "type": "string", + "example": "Project id must be integer" + } + } + } + } + } + } + } + }, + "401": + { + "description": "API Token is either missing or invalid", + "content": + { + "application/json": + { + "schema": + { + "type": "object", + "properties": + { + "status": + { + "description": "The status of the response", + "enum": + [ + "error", + "success" + ], + "type": "string", + "example": "error" + }, + "url": + { + "description": "The URL of the request", + "type": "string", + "example": "https://app.customgpt.ai/api/v1/projects/1" + }, + "data": + { + "type": "object", + "properties": + { + "code": + { + "description": "The error status code", + "enum": + [ + 400, + 401, + 403, + 404, + 500, + 503 + ], + "type": "integer", + "example": 401 + }, + "message": + { + "type": "string", + "example": "API Token is either missing or invalid" + } + } + } + } + } + } + } + }, + "404": + { + "description": "Project not found", + "content": + { + "application/json": + { + "schema": + { + "type": "object", + "properties": + { + "status": + { + "description": "The status of the response", + "enum": + [ + "error", + "success" + ], + "type": "string", + "example": "error" + }, + "url": + { + "description": "The URL of the request", + "type": "string", + "example": "https://app.customgpt.ai/api/v1/projects/1" + }, + "data": + { + "type": "object", + "properties": + { + "code": + { + "description": "The error status code", + "enum": + [ + 400, + 401, + 403, + 404, + 500, + 503 + ], + "type": "integer", + "example": 404 + }, + "message": + { + "description": "The error message", + "enum": + [ + "Project id is required", + "Project with id {projectId} not found" + ], + "type": "string", + "example": "Project with id 1 not found" + } + } + } + } + } + } + } + }, + "500": + { + "description": "Internal Server Error", + "content": + { + "application/json": + { + "schema": + { + "type": "object", + "properties": + { + "status": + { + "description": "The status of the response", + "enum": + [ + "error", + "success" + ], + "type": "string", + "example": "error" + }, + "url": + { + "description": "The URL of the request", + "type": "string", + "example": "https://app.customgpt.ai/api/v1/projects/1" + }, + "data": + { + "type": "object", + "properties": + { + "code": + { + "description": "The error status code", + "enum": + [ + 400, + 401, + 403, + 404, + 500, + 503 + ], + "type": "integer", + "example": 500 + }, + "message": + { + "type": "string", + "example": "Internal Server Error" + } + } + } + } + } + } + } + } + }, + "security": + [ + { + "BearerToken": + [] + } + ] + } + }, + "/api/v1/projects/{projectId}/sources/{sourceId}/instant-sync": + { + "put": + { + "tags": + [ + "Sources" + ], + "summary": "Instant sync the specified sitemap", + "operationId": "synchronize_source", + "parameters": + [ + { + "name": "projectId", + "in": "path", + "required": true, + "schema": + { + "type": "integer" + } + }, + { + "name": "sourceId", + "in": "path", + "description": "The source id", + "required": true, + "schema": + { + "type": "integer" + } + } + ], + "responses": + { + "201": + { + "description": "Project source sync started.", + "content": + { + "application/json": + { + "schema": + { + "type": "object", + "properties": + { + "status": + { + "description": "The status of the response", + "enum": + [ + "error", + "success" + ], + "type": "string", + "example": "success" + }, + "data": + { + "type": "object", + "properties": + { + "id": + { + "description": "The project source ID", + "type": "integer", + "example": 1 + }, + "created_at": + { + "description": "The project source creation date", + "format": "date-time", + "type": "string", + "example": "2021-01-01 00:00:00" + }, + "updated_at": + { + "description": "The project source update date", + "format": "date-time", + "type": "string", + "example": "2021-01-01 00:00:00" + }, + "type": + { + "description": "The project source type", + "enum": + [ + "sitemap", + "upload" + ], + "type": "string", + "example": "sitemap" + }, + "settings": + { + "description": "The project source settings", + "type": "object", + "properties": + { + "executive_js": + { + "description": "Whether the project source should execute JavaScript", + "default": true, + "type": "boolean", + "example": true + }, + "data_refresh_frequency": + { + "description": "The project source data refresh frequency", + "enum": + [ + "never", + "daily", + "weekly", + "monthly", + "advanced" + ], + "default": "never", + "type": "string", + "example": "never" + }, + "create_new_pages": + { + "description": "Add new pages to project automatically during refresh project source", + "default": true, + "type": "boolean", + "example": true + }, + "remove_unexist_pages": + { + "description": "Remove pages from project automatically during refresh project source", + "default": true, + "type": "boolean", + "example": false + }, + "refresh_existing_pages": + { + "description": "Refresh existing page during refresh project source", + "enum": + [ + "never", + "always", + "if_updated" + ], + "default": "never", + "type": "string", + "example": "never" + }, + "sitemap_path": + { + "description": "The project source sitemap path", + "type": "string", + "example": "https://example.com/sitemap.xml" + } + } + }, + "pages": + { + "description": "The project source pages", + "type": "array", + "items": + { + "type": "object", + "properties": + { + "id": + { + "description": "Page ID", + "type": "integer", + "example": 1 + }, + "page_url": + { + "description": "URL of the page or file", + "type": "string", + "example": "https://example.com" + }, + "page_url_hash": + { + "description": "Hash of the URL of the page or file", + "format": "md5", + "type": "string", + "example": "d41d8cd98f00b204e9800998ecf8427e" + }, + "project_id": + { + "description": "Project ID", + "type": "integer", + "example": 1 + }, + "s3_path": + { + "description": "This is the path where the page is stored in S3.\\nNote: This is omitted in the response if the page is not a file", + "type": "string", + "nullable": true, + "example": "project-1/page-1/file.pdf" + }, + "crawl_status": + { + "description": "Crawl status of the page", + "enum": + [ + "ok", + "queued", + "failed", + "n/a", + "limited" + ], + "default": "queued", + "type": "string", + "example": "queued" + }, + "index_status": + { + "description": "Index status of the page", + "enum": + [ + "ok", + "queued", + "failed", + "n/a", + "limited" + ], + "default": "queued", + "type": "string", + "example": "queued" + }, + "is_file": + { + "description": "Whether the page is a file or not", + "default": false, + "type": "boolean", + "example": true + }, + "is_refreshable": + { + "description": "Whether the page can be refreshed or not", + "default": false, + "type": "boolean", + "example": true + }, + "is_file_kept": + { + "description": "Whether the file is kept after processing or not.\\nNote: This is omitted in the response if the page is not a file", + "default": true, + "type": "boolean", + "example": true + }, + "filename": + { + "description": "Filename of the page.\\nNote: This is omitted in the response if the page is not a file", + "type": "string", + "nullable": true, + "example": "file.pdf" + }, + "filesize": + { + "description": "Filesize of the page.\\nNote: This is omitted in the response if the page is not a file", + "type": "integer", + "nullable": true, + "example": 100 + }, + "created_at": + { + "description": "Date and time when the page was created", + "format": "date-time", + "type": "string", + "example": "2021-01-01 00:00:00" + }, + "updated_at": + { + "description": "Date and time when the page was updated", + "format": "date-time", + "type": "string", + "example": "2021-01-01 00:00:00" + } + } + }, + "nullable": true + } + } + } + } + } + } + } + }, + "400": + { + "description": "Bad Argument", + "content": + { + "application/json": + { + "schema": + { + "type": "object", + "properties": + { + "status": + { + "description": "The status of the response", + "enum": + [ + "error", + "success" + ], + "type": "string", + "example": "error" + }, + "url": + { + "description": "The URL of the request", + "type": "string", + "example": "https://app.customgpt.ai/api/v1/projects/1" + }, + "data": + { + "type": "object", + "properties": + { + "code": + { + "description": "The error status code", + "enum": + [ + 400, + 401, + 403, + 404, + 500, + 503 + ], + "type": "integer", + "example": 400 + }, + "message": + { + "description": "The error message", + "type": "string", + "example": "Project id must be integer" + } + } + } + } + } + } + } + }, + "401": + { + "description": "API Token is either missing or invalid", + "content": + { + "application/json": + { + "schema": + { + "type": "object", + "properties": + { + "status": + { + "description": "The status of the response", + "enum": + [ + "error", + "success" + ], + "type": "string", + "example": "error" + }, + "url": + { + "description": "The URL of the request", + "type": "string", + "example": "https://app.customgpt.ai/api/v1/projects/1" + }, + "data": + { + "type": "object", + "properties": + { + "code": + { + "description": "The error status code", + "enum": + [ + 400, + 401, + 403, + 404, + 500, + 503 + ], + "type": "integer", + "example": 401 + }, + "message": + { + "type": "string", + "example": "API Token is either missing or invalid" + } + } + } + } + } + } + } + }, + "403": + { + "description": "Source sync failed", + "content": + { + "application/json": + { + "schema": + { + "type": "object", + "properties": + { + "status": + { + "description": "The status of the response", + "enum": + [ + "error", + "success" + ], + "type": "string", + "example": "error" + }, + "url": + { + "description": "The URL of the request", + "type": "string", + "example": "https://app.customgpt.ai/api/v1/projects/1" + }, + "data": + { + "type": "object", + "properties": + { + "code": + { + "description": "The error status code", + "enum": + [ + 400, + 401, + 403, + 404, + 500, + 503 + ], + "type": "integer", + "example": 403 + }, + "message": + { + "description": "The error message", + "enum": + [ + "Your plan not eligible for instant sync", + "Next instant sync will be available in \\{seconds\\} seconds", + "Project source can't be synced" + ], + "type": "string", + "example": "Subscription not eligible for instant sync" + } + } + } + } + } + } + } + }, + "404": + { + "description": "Project source not found", + "content": + { + "application/json": + { + "schema": + { + "type": "object", + "properties": + { + "status": + { + "description": "The status of the response", + "enum": + [ + "error", + "success" + ], + "type": "string", + "example": "error" + }, + "url": + { + "description": "The URL of the request", + "type": "string", + "example": "https://app.customgpt.ai/api/v1/projects/1" + }, + "data": + { + "type": "object", + "properties": + { + "code": + { + "description": "The error status code", + "enum": + [ + 400, + 401, + 403, + 404, + 500, + 503 + ], + "type": "integer", + "example": 404 + }, + "message": + { + "description": "The error message", + "enum": + [ + "Project source id is required", + "Project source with id {sourceId} not found" + ], + "type": "string", + "example": "Project source with id 1 not found" + } + } + } + } + } + } + } + }, + "500": + { + "description": "Internal Server Error", + "content": + { + "application/json": + { + "schema": + { + "type": "object", + "properties": + { + "status": + { + "description": "The status of the response", + "enum": + [ + "error", + "success" + ], + "type": "string", + "example": "error" + }, + "url": + { + "description": "The URL of the request", + "type": "string", + "example": "https://app.customgpt.ai/api/v1/projects/1" + }, + "data": + { + "type": "object", + "properties": + { + "code": + { + "description": "The error status code", + "enum": + [ + 400, + 401, + 403, + 404, + 500, + 503 + ], + "type": "integer", + "example": 500 + }, + "message": + { + "type": "string", + "example": "Internal Server Error" + } + } + } + } + } + } + } + } + }, + "security": + [ + { + "BearerToken": + [] + } + ] + } + }, + "/api/v1/projects/{projectId}/reports/traffic": + { + "get": + { + "tags": + [ + "Reports & Analytics" + ], + "summary": "Provide summary of various metrics of users interactions with the application.", + "operationId": "traffic_reports", + "description": "Provide summary of various metrics of users interactions with the application such as the users number (both named and anonymous),\ntheir geographical locations, the browsers they use, and the sources from which they arrived at the application.", + "parameters": + [ + { + "name": "projectId", + "in": "path", + "description": "The ID of the project to get traffic for", + "required": true, + "schema": + { + "type": "integer", + "example": 1 + } + }, + { + "name": "filters", + "in": "query", + "description": "Filters to return traffic metrics for.", + "required": true, + "style": "form", + "schema": + { + "type": "array", + "items": + { + "enum": + [ + "sources" + ], + "type": "string" + } + } + } + ], + "responses": + { + "200": + { + "description": "Get the traffic metrics for a project", + "content": + { + "application/json": + { + "schema": + { + "type": "object", + "properties": + { + "status": + { + "description": "The status of the response", + "enum": + [ + "error", + "success" + ], + "type": "string", + "example": "success" + }, + "data": + { + "type": "object", + "properties": + { + "sources": + { + "type": "array", + "items": + { + "type": "object", + "properties": + { + "request_source": + { + "enum": + [ + "web", + "api", + "embed", + "livechat", + "sge", + "ai-assistant", + "instant-viewer" + ], + "type": "string", + "example": "web" + }, + "request_source_number": + { + "type": "integer", + "example": 20 + } + } + } + } + } + } + } + } + } + } + }, + "400": + { + "description": "Bad Argument", + "content": + { + "application/json": + { + "schema": + { + "type": "object", + "properties": + { + "status": + { + "description": "The status of the response", + "enum": + [ + "error", + "success" + ], + "type": "string", + "example": "error" + }, + "url": + { + "description": "The URL of the request", + "type": "string", + "example": "https://app.customgpt.ai/api/v1/projects/1" + }, + "data": + { + "type": "object", + "properties": + { + "code": + { + "description": "The error status code", + "enum": + [ + 400, + 401, + 403, + 404, + 500, + 503 + ], + "type": "integer", + "example": 400 + }, + "message": + { + "description": "The error message", + "type": "string", + "example": "Project id must be integer" + } + } + } + } + } + } + } + }, + "401": + { + "description": "API Token is either missing or invalid", + "content": + { + "application/json": + { + "schema": + { + "type": "object", + "properties": + { + "status": + { + "description": "The status of the response", + "enum": + [ + "error", + "success" + ], + "type": "string", + "example": "error" + }, + "url": + { + "description": "The URL of the request", + "type": "string", + "example": "https://app.customgpt.ai/api/v1/projects/1" + }, + "data": + { + "type": "object", + "properties": + { + "code": + { + "description": "The error status code", + "enum": + [ + 400, + 401, + 403, + 404, + 500, + 503 + ], + "type": "integer", + "example": 401 + }, + "message": + { + "type": "string", + "example": "API Token is either missing or invalid" + } + } + } + } + } + } + } + }, + "404": + { + "description": "Project not found", + "content": + { + "application/json": + { + "schema": + { + "type": "object", + "properties": + { + "status": + { + "description": "The status of the response", + "enum": + [ + "error", + "success" + ], + "type": "string", + "example": "error" + }, + "url": + { + "description": "The URL of the request", + "type": "string", + "example": "https://app.customgpt.ai/api/v1/projects/1" + }, + "data": + { + "type": "object", + "properties": + { + "code": + { + "description": "The error status code", + "enum": + [ + 400, + 401, + 403, + 404, + 500, + 503 + ], + "type": "integer", + "example": 404 + }, + "message": + { + "description": "The error message", + "enum": + [ + "Project id is required", + "Project with id {projectId} not found" + ], + "type": "string", + "example": "Project with id 1 not found" + } + } + } + } + } + } + } + }, + "500": + { + "description": "Internal Server Error", + "content": + { + "application/json": + { + "schema": + { + "type": "object", + "properties": + { + "status": + { + "description": "The status of the response", + "enum": + [ + "error", + "success" + ], + "type": "string", + "example": "error" + }, + "url": + { + "description": "The URL of the request", + "type": "string", + "example": "https://app.customgpt.ai/api/v1/projects/1" + }, + "data": + { + "type": "object", + "properties": + { + "code": + { + "description": "The error status code", + "enum": + [ + 400, + 401, + 403, + 404, + 500, + 503 + ], + "type": "integer", + "example": 500 + }, + "message": + { + "type": "string", + "example": "Internal Server Error" + } + } + } + } + } + } + } + } + }, + "security": + [ + { + "BearerToken": + [] + } + ] + } + }, + "/api/v1/projects/{projectId}/reports/queries": + { + "get": + { + "tags": + [ + "Reports & Analytics" + ], + "summary": "Provide summary of overall query metrics accross all conversations.", + "operationId": "queries_reports", + "parameters": + [ + { + "name": "projectId", + "in": "path", + "description": "The ID of the project to get queries for", + "required": true, + "schema": + { + "type": "integer", + "example": 1 + } + }, + { + "name": "filters", + "in": "query", + "description": "Filters to return queries metrics for.", + "required": true, + "style": "form", + "schema": + { + "type": "array", + "items": + { + "enum": + [ + "total", + "query_status" + ], + "type": "string" + } + } + } + ], + "responses": + { + "200": + { + "description": "Get the query metrics for a project", + "content": + { + "application/json": + { + "schema": + { + "type": "object", + "properties": + { + "status": + { + "description": "The status of the response", + "enum": + [ + "error", + "success" + ], + "type": "string", + "example": "success" + }, + "data": + { + "type": "object", + "properties": + { + "total": + { + "description": "Total number of queries over all conversations", + "type": "integer", + "example": 10 + }, + "query_status": + { + "description": "Number of successful and failed queries over all conversations", + "type": "array", + "items": + { + "type": "object", + "properties": + { + "status": + { + "enum": + [ + "failed", + "success" + ], + "type": "string" + }, + "count": + { + "type": "integer", + "example": 2 + } + } + } + } + } + } + } + } + } + } + }, + "400": + { + "description": "Bad Argument", + "content": + { + "application/json": + { + "schema": + { + "type": "object", + "properties": + { + "status": + { + "description": "The status of the response", + "enum": + [ + "error", + "success" + ], + "type": "string", + "example": "error" + }, + "url": + { + "description": "The URL of the request", + "type": "string", + "example": "https://app.customgpt.ai/api/v1/projects/1" + }, + "data": + { + "type": "object", + "properties": + { + "code": + { + "description": "The error status code", + "enum": + [ + 400, + 401, + 403, + 404, + 500, + 503 + ], + "type": "integer", + "example": 400 + }, + "message": + { + "description": "The error message", + "type": "string", + "example": "Project id must be integer" + } + } + } + } + } + } + } + }, + "401": + { + "description": "API Token is either missing or invalid", + "content": + { + "application/json": + { + "schema": + { + "type": "object", + "properties": + { + "status": + { + "description": "The status of the response", + "enum": + [ + "error", + "success" + ], + "type": "string", + "example": "error" + }, + "url": + { + "description": "The URL of the request", + "type": "string", + "example": "https://app.customgpt.ai/api/v1/projects/1" + }, + "data": + { + "type": "object", + "properties": + { + "code": + { + "description": "The error status code", + "enum": + [ + 400, + 401, + 403, + 404, + 500, + 503 + ], + "type": "integer", + "example": 401 + }, + "message": + { + "type": "string", + "example": "API Token is either missing or invalid" + } + } + } + } + } + } + } + }, + "404": + { + "description": "Project not found", + "content": + { + "application/json": + { + "schema": + { + "type": "object", + "properties": + { + "status": + { + "description": "The status of the response", + "enum": + [ + "error", + "success" + ], + "type": "string", + "example": "error" + }, + "url": + { + "description": "The URL of the request", + "type": "string", + "example": "https://app.customgpt.ai/api/v1/projects/1" + }, + "data": + { + "type": "object", + "properties": + { + "code": + { + "description": "The error status code", + "enum": + [ + 400, + 401, + 403, + 404, + 500, + 503 + ], + "type": "integer", + "example": 404 + }, + "message": + { + "description": "The error message", + "enum": + [ + "Project id is required", + "Project with id {projectId} not found" + ], + "type": "string", + "example": "Project with id 1 not found" + } + } + } + } + } + } + } + }, + "500": + { + "description": "Internal Server Error", + "content": + { + "application/json": + { + "schema": + { + "type": "object", + "properties": + { + "status": + { + "description": "The status of the response", + "enum": + [ + "error", + "success" + ], + "type": "string", + "example": "error" + }, + "url": + { + "description": "The URL of the request", + "type": "string", + "example": "https://app.customgpt.ai/api/v1/projects/1" + }, + "data": + { + "type": "object", + "properties": + { + "code": + { + "description": "The error status code", + "enum": + [ + 400, + 401, + 403, + 404, + 500, + 503 + ], + "type": "integer", + "example": 500 + }, + "message": + { + "type": "string", + "example": "Internal Server Error" + } + } + } + } + } + } + } + } + }, + "security": + [ + { + "BearerToken": + [] + } + ] + } + }, + "/api/v1/projects/{projectId}/reports/conversations": + { + "get": + { + "tags": + [ + "Reports & Analytics" + ], + "summary": "Provide summary of overall conversation metrics.", + "operationId": "conversations_reports", + "parameters": + [ + { + "name": "projectId", + "in": "path", + "description": "The ID of the project to get conversations for", + "required": true, + "schema": + { + "type": "integer", + "example": 1 + } + }, + { + "name": "filters", + "in": "query", + "description": "Filters to return conversations metrics for.", + "required": true, + "style": "form", + "schema": + { + "type": "array", + "items": + { + "enum": + [ + "total", + "average_queries_per_conversation" + ], + "type": "string" + } + } + } + ], + "responses": + { + "200": + { + "description": "Get the conversation metrics data for a project", + "content": + { + "application/json": + { + "schema": + { + "type": "object", + "properties": + { + "status": + { + "description": "The status of the response", + "enum": + [ + "error", + "success" + ], + "type": "string", + "example": "success" + }, + "data": + { + "type": "object", + "properties": + { + "total": + { + "description": "Total number of conversations", + "type": "integer", + "example": 10 + }, + "average_queries_per_conversation": + { + "description": "Average number of queries per conversations", + "type": "integer", + "example": 1.2 + } + } + } + } + } + } + } + }, + "400": + { + "description": "Bad Argument", + "content": + { + "application/json": + { + "schema": + { + "type": "object", + "properties": + { + "status": + { + "description": "The status of the response", + "enum": + [ + "error", + "success" + ], + "type": "string", + "example": "error" + }, + "url": + { + "description": "The URL of the request", + "type": "string", + "example": "https://app.customgpt.ai/api/v1/projects/1" + }, + "data": + { + "type": "object", + "properties": + { + "code": + { + "description": "The error status code", + "enum": + [ + 400, + 401, + 403, + 404, + 500, + 503 + ], + "type": "integer", + "example": 400 + }, + "message": + { + "description": "The error message", + "type": "string", + "example": "Project id must be integer" + } + } + } + } + } + } + } + }, + "401": + { + "description": "API Token is either missing or invalid", + "content": + { + "application/json": + { + "schema": + { + "type": "object", + "properties": + { + "status": + { + "description": "The status of the response", + "enum": + [ + "error", + "success" + ], + "type": "string", + "example": "error" + }, + "url": + { + "description": "The URL of the request", + "type": "string", + "example": "https://app.customgpt.ai/api/v1/projects/1" + }, + "data": + { + "type": "object", + "properties": + { + "code": + { + "description": "The error status code", + "enum": + [ + 400, + 401, + 403, + 404, + 500, + 503 + ], + "type": "integer", + "example": 401 + }, + "message": + { + "type": "string", + "example": "API Token is either missing or invalid" + } + } + } + } + } + } + } + }, + "404": + { + "description": "Project not found", + "content": + { + "application/json": + { + "schema": + { + "type": "object", + "properties": + { + "status": + { + "description": "The status of the response", + "enum": + [ + "error", + "success" + ], + "type": "string", + "example": "error" + }, + "url": + { + "description": "The URL of the request", + "type": "string", + "example": "https://app.customgpt.ai/api/v1/projects/1" + }, + "data": + { + "type": "object", + "properties": + { + "code": + { + "description": "The error status code", + "enum": + [ + 400, + 401, + 403, + 404, + 500, + 503 + ], + "type": "integer", + "example": 404 + }, + "message": + { + "description": "The error message", + "enum": + [ + "Project id is required", + "Project with id {projectId} not found" + ], + "type": "string", + "example": "Project with id 1 not found" + } + } + } + } + } + } + } + }, + "500": + { + "description": "Internal Server Error", + "content": + { + "application/json": + { + "schema": + { + "type": "object", + "properties": + { + "status": + { + "description": "The status of the response", + "enum": + [ + "error", + "success" + ], + "type": "string", + "example": "error" + }, + "url": + { + "description": "The URL of the request", + "type": "string", + "example": "https://app.customgpt.ai/api/v1/projects/1" + }, + "data": + { + "type": "object", + "properties": + { + "code": + { + "description": "The error status code", + "enum": + [ + 400, + 401, + 403, + 404, + 500, + 503 + ], + "type": "integer", + "example": 500 + }, + "message": + { + "type": "string", + "example": "Internal Server Error" + } + } + } + } + } + } + } + } + }, + "security": + [ + { + "BearerToken": + [] + } + ] + } + }, + "/api/v1/projects/{projectId}/reports/analysis": + { + "get": + { + "tags": + [ + "Reports & Analytics" + ], + "summary": "Provide graph-ready analysis data of various metrics.", + "operationId": "analysis_reports", + "parameters": + [ + { + "name": "projectId", + "in": "path", + "description": "The ID of the project to get analysis for", + "required": true, + "schema": + { + "type": "integer", + "example": 1 + } + }, + { + "name": "filters", + "in": "query", + "description": "Filters to return graph-ready analysis data for.", + "required": true, + "style": "form", + "schema": + { + "type": "array", + "items": + { + "enum": + [ + "queries", + "conversations", + "queries_per_conversation" + ], + "type": "string" + } + } + }, + { + "name": "interval", + "in": "query", + "description": "Interval to return graph-ready analysis data inbetween.", + "required": false, + "schema": + { + "enum": + [ + "daily", + "weekly" + ], + "default": "weekly", + "type": "string" + } + } + ], + "responses": + { + "200": + { + "description": "Get the graph-ready data analysis for a project", + "content": + { + "application/json": + { + "schema": + { + "type": "object", + "properties": + { + "status": + { + "description": "The status of the response", + "enum": + [ + "error", + "success" + ], + "type": "string", + "example": "success" + }, + "data": + { + "type": "object", + "properties": + { + "queries": + { + "type": "array", + "items": + { + "type": "object", + "properties": + { + "queries_number": + { + "type": "integer", + "example": 5 + }, + "created_at_interval": + { + "type": "string", + "example": "Sat" + } + } + } + }, + "conversations": + { + "type": "array", + "items": + { + "type": "object", + "properties": + { + "queries_number": + { + "type": "integer", + "example": 5 + }, + "created_at_interval": + { + "type": "string", + "example": "Sat" + } + } + } + }, + "queries_per_conversation": + { + "type": "array", + "items": + { + "type": "object", + "properties": + { + "queries_number": + { + "type": "integer", + "example": 1.5 + }, + "created_at_interval": + { + "type": "string", + "example": "Sat" + } + } + } + } + } + } + } + } + } + } + }, + "400": + { + "description": "Bad Argument", + "content": + { + "application/json": + { + "schema": + { + "type": "object", + "properties": + { + "status": + { + "description": "The status of the response", + "enum": + [ + "error", + "success" + ], + "type": "string", + "example": "error" + }, + "url": + { + "description": "The URL of the request", + "type": "string", + "example": "https://app.customgpt.ai/api/v1/projects/1" + }, + "data": + { + "type": "object", + "properties": + { + "code": + { + "description": "The error status code", + "enum": + [ + 400, + 401, + 403, + 404, + 500, + 503 + ], + "type": "integer", + "example": 400 + }, + "message": + { + "description": "The error message", + "type": "string", + "example": "Project id must be integer" + } + } + } + } + } + } + } + }, + "401": + { + "description": "API Token is either missing or invalid", + "content": + { + "application/json": + { + "schema": + { + "type": "object", + "properties": + { + "status": + { + "description": "The status of the response", + "enum": + [ + "error", + "success" + ], + "type": "string", + "example": "error" + }, + "url": + { + "description": "The URL of the request", + "type": "string", + "example": "https://app.customgpt.ai/api/v1/projects/1" + }, + "data": + { + "type": "object", + "properties": + { + "code": + { + "description": "The error status code", + "enum": + [ + 400, + 401, + 403, + 404, + 500, + 503 + ], + "type": "integer", + "example": 401 + }, + "message": + { + "type": "string", + "example": "API Token is either missing or invalid" + } + } + } + } + } + } + } + }, + "404": + { + "description": "Project not found", + "content": + { + "application/json": + { + "schema": + { + "type": "object", + "properties": + { + "status": + { + "description": "The status of the response", + "enum": + [ + "error", + "success" + ], + "type": "string", + "example": "error" + }, + "url": + { + "description": "The URL of the request", + "type": "string", + "example": "https://app.customgpt.ai/api/v1/projects/1" + }, + "data": + { + "type": "object", + "properties": + { + "code": + { + "description": "The error status code", + "enum": + [ + 400, + 401, + 403, + 404, + 500, + 503 + ], + "type": "integer", + "example": 404 + }, + "message": + { + "description": "The error message", + "enum": + [ + "Project id is required", + "Project with id {projectId} not found" + ], + "type": "string", + "example": "Project with id 1 not found" + } + } + } + } + } + } + } + }, + "500": + { + "description": "Internal Server Error", + "content": + { + "application/json": + { + "schema": + { + "type": "object", + "properties": + { + "status": + { + "description": "The status of the response", + "enum": + [ + "error", + "success" + ], + "type": "string", + "example": "error" + }, + "url": + { + "description": "The URL of the request", + "type": "string", + "example": "https://app.customgpt.ai/api/v1/projects/1" + }, + "data": + { + "type": "object", + "properties": + { + "code": + { + "description": "The error status code", + "enum": + [ + 400, + 401, + 403, + 404, + 500, + 503 + ], + "type": "integer", + "example": 500 + }, + "message": + { + "type": "string", + "example": "Internal Server Error" + } + } + } + } + } + } + } + } + }, + "security": + [ + { + "BearerToken": + [] + } + ] + } + }, + "/api/v1/preview/{id}": + { + "get": + { + "tags": + [ + "Pages" + ], + "summary": "Preview file from citation.", + "operationId": "preview_citation", + "parameters": + [ + { + "name": "id", + "in": "path", + "required": true, + "schema": + { + "type": "string" + } + } + ], + "responses": + { + "400": + { + "description": "Bad Argument", + "content": + { + "application/json": + { + "schema": + { + "type": "object", + "properties": + { + "status": + { + "description": "The status of the response", + "enum": + [ + "error", + "success" + ], + "type": "string", + "example": "error" + }, + "url": + { + "description": "The URL of the request", + "type": "string", + "example": "https://app.customgpt.ai/api/v1/projects/1" + }, + "data": + { + "type": "object", + "properties": + { + "code": + { + "description": "The error status code", + "enum": + [ + 400, + 401, + 403, + 404, + 500, + 503 + ], + "type": "integer", + "example": 400 + }, + "message": + { + "description": "The error message", + "type": "string", + "example": "Project id must be integer" + } + } + } + } + } + } + } + }, + "401": + { + "description": "API Token is either missing or invalid", + "content": + { + "application/json": + { + "schema": + { + "type": "object", + "properties": + { + "status": + { + "description": "The status of the response", + "enum": + [ + "error", + "success" + ], + "type": "string", + "example": "error" + }, + "url": + { + "description": "The URL of the request", + "type": "string", + "example": "https://app.customgpt.ai/api/v1/projects/1" + }, + "data": + { + "type": "object", + "properties": + { + "code": + { + "description": "The error status code", + "enum": + [ + 400, + 401, + 403, + 404, + 500, + 503 + ], + "type": "integer", + "example": 401 + }, + "message": + { + "type": "string", + "example": "API Token is either missing or invalid" + } + } + } + } + } + } + } + }, + "404": + { + "description": "Page not found", + "content": + { + "application/json": + { + "schema": + { + "type": "object", + "properties": + { + "status": + { + "description": "The status of the response", + "enum": + [ + "error", + "success" + ], + "type": "string", + "example": "error" + }, + "url": + { + "description": "The URL of the request", + "type": "string", + "example": "https://app.customgpt.ai/api/v1/projects/1" + }, + "data": + { + "type": "object", + "properties": + { + "code": + { + "description": "The error status code", + "enum": + [ + 400, + 401, + 403, + 404, + 500, + 503 + ], + "type": "integer", + "example": 404 + }, + "message": + { + "description": "The error message", + "enum": + [ + "Page id is required", + "Page with id {pageId} not found" + ], + "type": "string", + "example": "Page with id 1 not found" + } + } + } + } + } + } + } + }, + "500": + { + "description": "Internal Server Error", + "content": + { + "application/json": + { + "schema": + { + "type": "object", + "properties": + { + "status": + { + "description": "The status of the response", + "enum": + [ + "error", + "success" + ], + "type": "string", + "example": "error" + }, + "url": + { + "description": "The URL of the request", + "type": "string", + "example": "https://app.customgpt.ai/api/v1/projects/1" + }, + "data": + { + "type": "object", + "properties": + { + "code": + { + "description": "The error status code", + "enum": + [ + 400, + 401, + 403, + 404, + 500, + 503 + ], + "type": "integer", + "example": 500 + }, + "message": + { + "type": "string", + "example": "Internal Server Error" + } + } + } + } + } + } + } + } + }, + "security": + [ + { + "BearerToken": + [] + } + ] + } + }, + "/api/v1/user": + { + "get": + { + "tags": + [ + "Users" + ], + "summary": "Show the user's profile.", + "operationId": "get_user", + "description": "Retrieve the profile information of the current user. This endpoint allows you to fetch the details and attributes associated with the user's profile, providing valuable information about the user's account and preferences.", + "responses": + { + "200": + { + "description": "Retrieve user account info", + "content": + { + "application/json": + { + "schema": + { + "type": "object", + "properties": + { + "status": + { + "description": "The status of the response", + "enum": + [ + "error", + "success" + ], + "type": "string", + "example": "success" + }, + "data": + { + "type": "object", + "properties": + { + "created_at": + { + "description": "When was this user created?", + "format": "date-time", + "type": "string", + "example": "2023-04-30 16:43:53" + }, + "email": + { + "description": "User email", + "format": "email", + "type": "string", + "example": "user@domain.com" + }, + "id": + { + "description": "User ID", + "type": "integer", + "example": 1 + }, + "current_team_id": + { + "description": "User currently active team ID", + "type": "integer", + "example": 1 + }, + "name": + { + "description": "User name", + "type": "string", + "example": "John Doe" + }, + "profile_photo_url": + { + "description": "User profile photo URL", + "format": "url", + "type": "string", + "example": "https://app.customgpt.ai/user/1/profile_photo_url" + }, + "updated_at": + { + "description": "When was this user updated?", + "format": "date-time", + "type": "string", + "example": "2023-04-30 16:43:53" + } + } + } + } + } + } + } + }, + "401": + { + "description": "API Token is either missing or invalid", + "content": + { + "application/json": + { + "schema": + { + "type": "object", + "properties": + { + "status": + { + "description": "The status of the response", + "enum": + [ + "error", + "success" + ], + "type": "string", + "example": "error" + }, + "url": + { + "description": "The URL of the request", + "type": "string", + "example": "https://app.customgpt.ai/api/v1/projects/1" + }, + "data": + { + "type": "object", + "properties": + { + "code": + { + "description": "The error status code", + "enum": + [ + 400, + 401, + 403, + 404, + 500, + 503 + ], + "type": "integer", + "example": 401 + }, + "message": + { + "type": "string", + "example": "API Token is either missing or invalid" + } + } + } + } + } + } + } + }, + "500": + { + "description": "Internal Server Error", + "content": + { + "application/json": + { + "schema": + { + "type": "object", + "properties": + { + "status": + { + "description": "The status of the response", + "enum": + [ + "error", + "success" + ], + "type": "string", + "example": "error" + }, + "url": + { + "description": "The URL of the request", + "type": "string", + "example": "https://app.customgpt.ai/api/v1/projects/1" + }, + "data": + { + "type": "object", + "properties": + { + "code": + { + "description": "The error status code", + "enum": + [ + 400, + 401, + 403, + 404, + 500, + 503 + ], + "type": "integer", + "example": 500 + }, + "message": + { + "type": "string", + "example": "Internal Server Error" + } + } + } + } + } + } + } + } + }, + "security": + [ + { + "BearerToken": + [] + } + ] + }, + "post": + { + "tags": + [ + "Users" + ], + "summary": "Update the user's profile.", + "operationId": "update_user", + "description": "Update the profile of the current user. This endpoint allows the user to modify and update their profile information and preferences within the application or system.", + "requestBody": + { + "description": "Update user account info", + "content": + { + "multipart/form-data": + { + "schema": + { + "properties": + { + "profile_photo": + { + "description": "User profile photo", + "format": "binary", + "type": "string", + "example": "avatar.png" + }, + "name": + { + "description": "User name", + "type": "string", + "maxLength": 255, + "example": "John Doe" + } + } + } + } + } + }, + "responses": + { + "200": + { + "description": "Update user account info", + "content": + { + "application/json": + { + "schema": + { + "type": "object", + "properties": + { + "status": + { + "description": "The status of the response", + "enum": + [ + "error", + "success" + ], + "type": "string", + "example": "success" + }, + "data": + { + "type": "object", + "properties": + { + "created_at": + { + "description": "When was this user created?", + "format": "date-time", + "type": "string", + "example": "2023-04-30 16:43:53" + }, + "email": + { + "description": "User email", + "format": "email", + "type": "string", + "example": "user@domain.com" + }, + "id": + { + "description": "User ID", + "type": "integer", + "example": 1 + }, + "current_team_id": + { + "description": "User currently active team ID", + "type": "integer", + "example": 1 + }, + "name": + { + "description": "User name", + "type": "string", + "example": "John Doe" + }, + "profile_photo_url": + { + "description": "User profile photo URL", + "format": "url", + "type": "string", + "example": "https://app.customgpt.ai/user/1/profile_photo_url" + }, + "updated_at": + { + "description": "When was this user updated?", + "format": "date-time", + "type": "string", + "example": "2023-04-30 16:43:53" + } + } + } + } + } + } + } + }, + "401": + { + "description": "API Token is either missing or invalid", + "content": + { + "application/json": + { + "schema": + { + "type": "object", + "properties": + { + "status": + { + "description": "The status of the response", + "enum": + [ + "error", + "success" + ], + "type": "string", + "example": "error" + }, + "url": + { + "description": "The URL of the request", + "type": "string", + "example": "https://app.customgpt.ai/api/v1/projects/1" + }, + "data": + { + "type": "object", + "properties": + { + "code": + { + "description": "The error status code", + "enum": + [ + 400, + 401, + 403, + 404, + 500, + 503 + ], + "type": "integer", + "example": 401 + }, + "message": + { + "type": "string", + "example": "API Token is either missing or invalid" + } + } + } + } + } + } + } + }, + "500": + { + "description": "Internal Server Error", + "content": + { + "application/json": + { + "schema": + { + "type": "object", + "properties": + { + "status": + { + "description": "The status of the response", + "enum": + [ + "error", + "success" + ], + "type": "string", + "example": "error" + }, + "url": + { + "description": "The URL of the request", + "type": "string", + "example": "https://app.customgpt.ai/api/v1/projects/1" + }, + "data": + { + "type": "object", + "properties": + { + "code": + { + "description": "The error status code", + "enum": + [ + 400, + 401, + 403, + 404, + 500, + 503 + ], + "type": "integer", + "example": 500 + }, + "message": + { + "type": "string", + "example": "Internal Server Error" + } + } + } + } + } + } + } + } + }, + "security": + [ + { + "BearerToken": + [] + } + ] + } + }, + "\/api\/v1\/limits\/usage": { + "get": { + "operation_name": "get_usage_limits", + "tags": [ + "Limits" + ], + "summary": "Get user projects, words and queries limit.", + "responses": { + "200": { + "description": "Retrieve user usage limits", + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "status": { + "description": "The status of the response", + "enum": [ + "error", + "success" + ], + "type": "string", + "example": "success" + }, + "data": { + "type": "object", + "properties": { + "max_projects_num": { + "description": "The maximum number of projects allowed for this team.", + "type": "integer", + "example": 10 + }, + "current_projects_num": { + "description": "The total number of projects currently belonging to this team.", + "type": "integer", + "example": 10 + }, + "max_total_storage_credits": { + "description": "The maximum number of storage credits allowed for this team.", + "type": "integer", + "example": 10 + }, + "current_total_storage_credits": { + "description": "The amount of storage credits currently in use.", + "type": "integer", + "example": 10 + }, + "max_queries": { + "description": "The maximum number of queries allowed per billing cycle for this team.", + "type": "integer", + "example": 10 + }, + "current_queries": { + "description": "The number of queries used in the current billing cycle.", + "type": "integer", + "example": 10 + } + } + } + } + } + } + } + }, + "401": { + "description": "API Token is either missing or invalid", + "content": + { + "application/json": + { + "schema": + { + "type": "object", + "properties": + { + "status": + { + "description": "The status of the response", + "enum": + [ + "error", + "success" + ], + "type": "string", + "example": "error" + }, + "url": + { + "description": "The URL of the request", + "type": "string", + "example": "https://app.customgpt.ai/api/v1/projects/1" + }, + "data": + { + "type": "object", + "properties": + { + "code": + { + "description": "The error status code", + "enum": + [ + 400, + 401, + 403, + 404, + 500, + 503 + ], + "type": "integer", + "example": 401 + }, + "message": + { + "type": "string", + "example": "API Token is either missing or invalid" + } + } + } + } + } + } + } + }, + "500": { + "description": "Internal Server Error", + "content": + { + "application/json": + { + "schema": + { + "type": "object", + "properties": + { + "status": + { + "description": "The status of the response", + "enum": + [ + "error", + "success" + ], + "type": "string", + "example": "error" + }, + "url": + { + "description": "The URL of the request", + "type": "string", + "example": "https://app.customgpt.ai/api/v1/projects/1" + }, + "data": + { + "type": "object", + "properties": + { + "code": + { + "description": "The error status code", + "enum": + [ + 400, + 401, + 403, + 404, + 500, + 503 + ], + "type": "integer", + "example": 500 + }, + "message": + { + "type": "string", + "example": "Internal Server Error" + } + } + } + } + } + } + } + } + }, + "security": [ + { + "BearerToken": [] + } + ] + } + } + }, + "components": + { + "schemas": + { + "Time": + { + "type": "object", + "properties": + { + "days": + { + "description": "Index of days in which sitemap should be refreshed. Starts from 0 (Sunday) to 6 (Saturday).", + "type": "array", + "items": + { + "type": "integer", + "example": 0 + }, + "example": + [ + 0, + 1, + 4, + 6 + ] + }, + "hours": + { + "description": "List of times in which sitemap should be refreshed. Must be in HH:MM format.", + "type": "array", + "items": + { + "type": "string", + "example": "23:45" + }, + "example": + [ + "00:00", + "08:00", + "23:45" + ] + } + } + }, + "Conversation": + { + "type": "object", + "properties": + { + "created_at": + { + "description": "When was this conversation created?", + "format": "date-time", + "type": "string", + "example": "2023-04-30 16:43:53" + }, + "updated_at": + { + "description": "When was this conversation updated?", + "format": "date-time", + "type": "string", + "example": "2023-04-30 16:43:53" + }, + "id": + { + "description": "Conversation ID", + "type": "integer", + "example": 1 + }, + "name": + { + "description": "Conversation name", + "type": "string", + "example": "Conversation 1" + }, + "project_id": + { + "description": "Project ID for this conversation", + "type": "string", + "example": 1 + }, + "created_by": + { + "description": "User ID for the user who created this conversation", + "type": "string", + "example": 1 + }, + "session_id": + { + "description": "Session ID for this conversation", + "format": "uuid", + "type": "string", + "example": "f1b9aaf0-5e4e-11eb-ae93-0242ac130002" + } + } + }, + "ProjectSettings": + { + "type": "object", + "properties": + { + "chatbot_avatar": + { + "description": "This is the avatar that is shown in the bot response. You can make it a profile picture or your company logo.", + "type": "string", + "example": "https://example.com/chatbot_avatar.png" + }, + "chatbot_background": + { + "description": "This is the background image shown in the bot conversations widget. You can change it to a company logo or background image.", + "type": "string", + "example": "https://example.com/chatbot_background.png" + }, + "default_prompt": + { + "description": "This is the default prompt shown to the user. You can customize this for your company or client.", + "type": "string", + "example": "How can I help you?" + }, + "example_questions": + { + "description": "These are example questions shown to guide the bot users. You can create customized questions to suit your company or client needs.", + "type": "array", + "items": + { + "type": "string", + "example": "How do I get started?" + }, + "example": + [ + "How do I get started?" + ] + }, + "response_source": + { + "description": "By default, we ask ChatGPT to use only your content in its response (recommended). If you wish ChatGPT to improvise and use its own knowledgebase as well, you can select \"My Content + ChatGPT\"", + "enum": + [ + "default", + "own_content", + "openai_content" + ], + "type": "string", + "example": "own_content" + }, + "chatbot_msg_lang": + { + "description": "By default, the chatbot messages like 'Ask Me Anything' are in English. You can customize this to your preferred language. Please note: This setting does not control what language ChatGPT responds in. That is controlled by the user's question. So a user asking in Portuguese, will most likely get a response from ChatGPT in Portuguese.", + "type": "string", + "example": "en" + }, + "chatbot_color": + { + "description": "Color of the chatbot in hex format", + "type": "string", + "example": "#000000" + }, + "chatbot_toolbar_color": + { + "description": "Color of the chatbot toolbar in hex format", + "type": "string", + "example": "#000000" + }, + "persona_instructions": + { + "description": "Customize your chatbot behavior by adjusting the system parameter to control its personality traits and role.", + "type": "string", + "nullable": true, + "example": "You are a custom chatbot assistant called CustomGPT.ai, a friendly lawyer who answers questions based on the given context." + }, + "citations_answer_source_label_msg": + { + "description": "This is the message shown to indicate where the response came from. You can customize this message based on your business or language.", + "type": "string", + "nullable": true, + "example": "Where did this answer come from?" + }, + "citations_sources_label_msg": + { + "description": "This is the message shown for the Sources label. You can customize this message based on your business or language.", + "type": "string", + "nullable": true, + "example": "Sources" + }, + "hang_in_there_msg": + { + "description": "This is the message shown when the bot is thinking and waiting to answer. You can customize this message based on your tone, personality or language.", + "type": "string", + "nullable": true, + "example": "Hang in there! I'm thinking.." + }, + "chatbot_siesta_msg": + { + "description": "This is the message shown when the bot has encountered a problem or error. You can customize this message based on your tone, personality or language.", + "type": "string", + "nullable": true, + "example": "Oops! The chat bot is taking a siesta. This usually happens when OpenAI is down! Please try again later." + }, + "is_loading_indicator_enabled": + { + "description": "Show animated loading indicator while waiting for a response from the chatbot", + "default": true, + "type": "boolean", + "nullable": true, + "example": true + }, + "enable_citations": + { + "description": "Each chatbot response shows an option for the user to see the sources/citations from your content from which the response was generated.", + "enum": + [ + 0, + 1, + 2, + 3 + ], + "default": 3, + "type": "integer", + "nullable": true, + "example": 3 + }, + "enable_feedbacks": + { + "description": "Each chatbot response shows an thumbs up/down for the user to left own feedback.", + "default": true, + "type": "boolean", + "nullable": true, + "example": true + }, + "citations_view_type": + { + "description": "Control how citations are shown. By default, the user can initiate to see the citations. You can choose to have it \"Auto Shown\" or \"Auto Hide\"", + "enum": + [ + "user", + "show", + "hide" + ], + "default": "user", + "type": "string", + "nullable": true, + "example": "user" + }, + "no_answer_message": + { + "description": "This is the message shown when the bot cannot answer. You can customize it to a message asking the user to contact customer support or leave their email / phone.", + "default": "I'm sorry, I don't know the answer", + "type": "string", + "nullable": true, + "example": "Sorry, I don't have an answer for that." + }, + "ending_message": + { + "description": "You can instruct ChatGPT to end every response with some text like asking \"Please email us for further support\" (Not recommended for most use cases)", + "type": "string", + "nullable": true, + "example": "Please email us for further support" + }, + "remove_branding": + { + "description": "Controls what branding is shown at the bottom of the chatbot.", + "default": false, + "type": "boolean", + "nullable": true, + "example": false + }, + "enable_recaptcha_for_public_chatbots": + { + "description": "Should we check messages from guests with Recaptcha when your chatbot is publicly available (i.e. shared or embedded).", + "default": false, + "type": "boolean", + "nullable": true, + "example": false + }, + "chatbot_model": + { + "description": "This is the model used by the chatbot. You can choose a different model to suit your needs.", + "enum": + [ + "gpt-4", + "gpt-3.5-turbo", + "gpt-4-turbo", + "gpt-4-o" + ], + "default": "gpt-4", + "type": "string", + "nullable": true, + "example": "gpt-4" + }, + "is_selling_enabled": + { + "description": "Enable selling of chatbot for monetization", + "default": false, + "type": "boolean", + "nullable": true, + "example": false + }, + "license_slug": + { + "description": "License slug used for monetization", + "type": "boolean", + "nullable": true, + "readOnly": true + }, + "selling_url": + { + "description": "Selling URL used for monetization", + "type": "string", + "nullable": true, + "readOnly": true + } + } + }, + "ProjectPlugin": + { + "type": "object", + "properties": + { + "model_name": + { + "description": "Model Name", + "type": "string", + "example": "IndoorPlants" + }, + "human_name": + { + "description": "Name For Human", + "type": "string", + "example": "The Indoor Plants Channel" + }, + "keywords": + { + "description": "Keywords For Model", + "type": "string", + "example": "Indoor plants, Gardening, Trusted information." + }, + "description": + { + "description": "Description For Human", + "type": "string", + "example": "Trusted information about indoor plants and gardening." + }, + "logo": + { + "description": "Project plugin logo", + "type": "string", + "example": "https://app.customgpt.ai/logo.svg" + }, + "is_active": + { + "description": "Whether the project plugin is active or not", + "default": false, + "type": "boolean", + "example": true + } + } + }, + "Project": + { + "type": "object", + "properties": + { + "id": + { + "description": "Project ID", + "type": "integer", + "example": 1 + }, + "project_name": + { + "description": "Project name", + "type": "string", + "example": "My Project" + }, + "sitemap_path": + { + "description": "Project sitemap", + "type": "string", + "example": "https://www.example.com/sitemap.xml" + }, + "is_chat_active": + { + "description": "Whether the chat bot is active or not", + "default": false, + "type": "boolean", + "example": true + }, + "user_id": + { + "description": "User ID of the project owner", + "type": "integer", + "example": 1 + }, + "team_id": + { + "description": "Team ID of the project owner", + "type": "integer", + "example": 1 + }, + "created_at": + { + "description": "Date and time when the project was created", + "default": "2023-05-08 13:06:55", + "format": "date-time", + "type": "string", + "example": "2021-01-01 00:00:00" + }, + "updated_at": + { + "description": "Date and time when the project was last updated", + "default": "2023-05-08 13:06:55", + "format": "date-time", + "type": "string", + "example": "2021-01-01 00:00:00" + }, + "type": + { + "description": "Project type", + "enum": + [ + "SITEMAP", + "URL" + ], + "default": "SITEMAP", + "type": "string", + "example": "SITEMAP" + }, + "is_shared": + { + "description": "Whether the project is shared or not", + "default": false, + "type": "boolean", + "example": true + }, + "shareable_slug": + { + "description": "Shareable slug that can be used to share the project", + "format": "md5", + "type": "string", + "nullable": true, + "example": "1234567890abcdef1234567890abcdef" + }, + "shareable_link": + { + "description": "Shareable link that can be used to share the project", + "format": "url", + "type": "string", + "nullable": true + }, + "embed_code": + { + "description": "Embed code that can be used to embed the project", + "format": "html", + "type": "string", + "nullable": true + }, + "live_chat_code": + { + "description": "Live chat code that can be used to embed the live chat", + "format": "html", + "type": "string", + "nullable": true + } + } + }, + "PromptHistory": + { + "type": "object", + "properties": + { + "id": + { + "description": "The unique identifier of the prompt history.", + "type": "integer", + "example": 1 + }, + "user_id": + { + "description": "The unique identifier of the user.", + "type": "integer", + "example": 1 + }, + "user_query": + { + "description": "The user prompt query.", + "type": "string", + "example": "What is the meaning of life?" + }, + "openai_response": + { + "description": "The OpenAI response to the user prompt query.", + "type": "string", + "example": "The meaning of life is to be happy." + }, + "created_at": + { + "description": "The date and time the prompt history was created.", + "format": "date-time", + "type": "string", + "example": "2021-01-01 00:00:00" + }, + "updated_at": + { + "description": "The date and time the prompt history was last updated.", + "format": "date-time", + "type": "string", + "example": "2021-01-01 00:00:00" + }, + "conversation_id": + { + "description": "The unique identifier of the conversation.", + "type": "integer", + "example": 1 + }, + "citations": + { + "description": "The citations for the prompt history.", + "default": + [], + "type": "array", + "items": + { + "type": "integer", + "example": 1 + }, + "example": + [ + 1, + 2, + 3 + ] + }, + "metadata": + { + "type": "object", + "properties": + { + "user_ip": + { + "description": "The IP address of the user.", + "type": "string", + "example": "127.0.0.1" + }, + "user_agent": + { + "description": "The user agent of the user.", + "type": "string", + "example": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko)" + }, + "external_id": + { + "description": "The external ID of the prompt history.", + "type": "string", + "maxLength": 128, + "example": "ext_id_1234567890" + }, + "request_source": + { + "description": "The source of the request.", + "type": "string", + "example": "web" + } + }, + "example": + { + "user_ip": "127.0.0.1", + "user_agent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko)", + "external_id": "ext_id_1234567890", + "request_source": "web" + } + } + } + }, + "User": + { + "type": "object", + "properties": + { + "created_at": + { + "description": "When was this user created?", + "format": "date-time", + "type": "string", + "example": "2023-04-30 16:43:53" + }, + "email": + { + "description": "User email", + "format": "email", + "type": "string", + "example": "user@domain.com" + }, + "id": + { + "description": "User ID", + "type": "integer", + "example": 1 + }, + "current_team_id": + { + "description": "User currently active team ID", + "type": "integer", + "example": 1 + }, + "name": + { + "description": "User name", + "type": "string", + "example": "John Doe" + }, + "profile_photo_url": + { + "description": "User profile photo URL", + "format": "url", + "type": "string", + "example": "https://app.customgpt.ai/user/1/profile_photo_url" + }, + "updated_at": + { + "description": "When was this user updated?", + "format": "date-time", + "type": "string", + "example": "2023-04-30 16:43:53" + } + } + }, + "ProjectSource": + { + "type": "object", + "properties": + { + "id": + { + "description": "The project source ID", + "type": "integer", + "example": 1 + }, + "created_at": + { + "description": "The project source creation date", + "format": "date-time", + "type": "string", + "example": "2021-01-01 00:00:00" + }, + "updated_at": + { + "description": "The project source update date", + "format": "date-time", + "type": "string", + "example": "2021-01-01 00:00:00" + }, + "type": + { + "description": "The project source type", + "enum": + [ + "sitemap", + "upload" + ], + "type": "string", + "example": "sitemap" + }, + "settings": + { + "description": "The project source settings", + "type": "object", + "properties": + { + "executive_js": + { + "description": "Whether the project source should execute JavaScript", + "default": true, + "type": "boolean", + "example": true + }, + "data_refresh_frequency": + { + "description": "The project source data refresh frequency", + "enum": + [ + "never", + "daily", + "weekly", + "monthly", + "advanced" + ], + "default": "never", + "type": "string", + "example": "never" + }, + "create_new_pages": + { + "description": "Add new pages to project automatically during refresh project source", + "default": true, + "type": "boolean", + "example": true + }, + "remove_unexist_pages": + { + "description": "Remove pages from project automatically during refresh project source", + "default": true, + "type": "boolean", + "example": false + }, + "refresh_existing_pages": + { + "description": "Refresh existing page during refresh project source", + "enum": + [ + "never", + "always", + "if_updated" + ], + "default": "never", + "type": "string", + "example": "never" + }, + "sitemap_path": + { + "description": "The project source sitemap path", + "type": "string", + "example": "https://example.com/sitemap.xml" + } + } + }, + "pages": + { + "description": "The project source pages", + "type": "array", + "items": + { + "type": "object", + "properties": + { + "id": + { + "description": "Page ID", + "type": "integer", + "example": 1 + }, + "page_url": + { + "description": "URL of the page or file", + "type": "string", + "example": "https://example.com" + }, + "page_url_hash": + { + "description": "Hash of the URL of the page or file", + "format": "md5", + "type": "string", + "example": "d41d8cd98f00b204e9800998ecf8427e" + }, + "project_id": + { + "description": "Project ID", + "type": "integer", + "example": 1 + }, + "s3_path": + { + "description": "This is the path where the page is stored in S3.\\nNote: This is omitted in the response if the page is not a file", + "type": "string", + "nullable": true, + "example": "project-1/page-1/file.pdf" + }, + "crawl_status": + { + "description": "Crawl status of the page", + "enum": + [ + "ok", + "queued", + "failed", + "n/a", + "limited" + ], + "default": "queued", + "type": "string", + "example": "queued" + }, + "index_status": + { + "description": "Index status of the page", + "enum": + [ + "ok", + "queued", + "failed", + "n/a", + "limited" + ], + "default": "queued", + "type": "string", + "example": "queued" + }, + "is_file": + { + "description": "Whether the page is a file or not", + "default": false, + "type": "boolean", + "example": true + }, + "is_refreshable": + { + "description": "Whether the page can be refreshed or not", + "default": false, + "type": "boolean", + "example": true + }, + "is_file_kept": + { + "description": "Whether the file is kept after processing or not.\\nNote: This is omitted in the response if the page is not a file", + "default": true, + "type": "boolean", + "example": true + }, + "filename": + { + "description": "Filename of the page.\\nNote: This is omitted in the response if the page is not a file", + "type": "string", + "nullable": true, + "example": "file.pdf" + }, + "filesize": + { + "description": "Filesize of the page.\\nNote: This is omitted in the response if the page is not a file", + "type": "integer", + "nullable": true, + "example": 100 + }, + "created_at": + { + "description": "Date and time when the page was created", + "format": "date-time", + "type": "string", + "example": "2021-01-01 00:00:00" + }, + "updated_at": + { + "description": "Date and time when the page was updated", + "format": "date-time", + "type": "string", + "example": "2021-01-01 00:00:00" + } + } + }, + "nullable": true + } + } + }, + "ProjectAnalyticsQuery": + { + "type": "object", + "properties": + { + "total": + { + "description": "Total number of queries over all conversations", + "type": "integer", + "example": 10 + }, + "query_status": + { + "description": "Number of successful and failed queries over all conversations", + "type": "array", + "items": + { + "type": "object", + "properties": + { + "status": + { + "enum": + [ + "failed", + "success" + ], + "type": "string" + }, + "count": + { + "type": "integer", + "example": 2 + } + } + } + } + } + }, + "ProjectAnalyticsConversation": + { + "type": "object", + "properties": + { + "total": + { + "description": "Total number of conversations", + "type": "integer", + "example": 10 + }, + "average_queries_per_conversation": + { + "description": "Average number of queries per conversations", + "type": "integer", + "example": 1.2 + } + } + }, + "ProjectAnalyticsAnalysis": + { + "type": "object", + "properties": + { + "queries": + { + "type": "array", + "items": + { + "type": "object", + "properties": + { + "queries_number": + { + "type": "integer", + "example": 5 + }, + "created_at_interval": + { + "type": "string", + "example": "Sat" + } + } + } + }, + "conversations": + { + "type": "array", + "items": + { + "type": "object", + "properties": + { + "queries_number": + { + "type": "integer", + "example": 5 + }, + "created_at_interval": + { + "type": "string", + "example": "Sat" + } + } + } + }, + "queries_per_conversation": + { + "type": "array", + "items": + { + "type": "object", + "properties": + { + "queries_number": + { + "type": "integer", + "example": 1.5 + }, + "created_at_interval": + { + "type": "string", + "example": "Sat" + } + } + } + } + } + }, + "ProjectAnalyticsTraffic": + { + "type": "object", + "properties": + { + "sources": + { + "type": "array", + "items": + { + "type": "object", + "properties": + { + "request_source": + { + "enum": + [ + "web", + "api", + "embed", + "livechat", + "sge", + "ai-assistant", + "instant-viewer" + ], + "type": "string", + "example": "web" + }, + "request_source_number": + { + "type": "integer", + "example": 20 + } + } + } + } + } + }, + "Page": + { + "type": "object", + "properties": + { + "id": + { + "description": "Page ID", + "type": "integer", + "example": 1 + }, + "page_url": + { + "description": "URL of the page or file", + "type": "string", + "example": "https://example.com" + }, + "page_url_hash": + { + "description": "Hash of the URL of the page or file", + "format": "md5", + "type": "string", + "example": "d41d8cd98f00b204e9800998ecf8427e" + }, + "project_id": + { + "description": "Project ID", + "type": "integer", + "example": 1 + }, + "s3_path": + { + "description": "This is the path where the page is stored in S3.\\nNote: This is omitted in the response if the page is not a file", + "type": "string", + "nullable": true, + "example": "project-1/page-1/file.pdf" + }, + "crawl_status": + { + "description": "Crawl status of the page", + "enum": + [ + "ok", + "queued", + "failed", + "n/a", + "limited" + ], + "default": "queued", + "type": "string", + "example": "queued" + }, + "index_status": + { + "description": "Index status of the page", + "enum": + [ + "ok", + "queued", + "failed", + "n/a", + "limited" + ], + "default": "queued", + "type": "string", + "example": "queued" + }, + "is_file": + { + "description": "Whether the page is a file or not", + "default": false, + "type": "boolean", + "example": true + }, + "is_refreshable": + { + "description": "Whether the page can be refreshed or not", + "default": false, + "type": "boolean", + "example": true + }, + "is_file_kept": + { + "description": "Whether the file is kept after processing or not.\\nNote: This is omitted in the response if the page is not a file", + "default": true, + "type": "boolean", + "example": true + }, + "filename": + { + "description": "Filename of the page.\\nNote: This is omitted in the response if the page is not a file", + "type": "string", + "nullable": true, + "example": "file.pdf" + }, + "filesize": + { + "description": "Filesize of the page.\\nNote: This is omitted in the response if the page is not a file", + "type": "integer", + "nullable": true, + "example": 100 + }, + "created_at": + { + "description": "Date and time when the page was created", + "format": "date-time", + "type": "string", + "example": "2021-01-01 00:00:00" + }, + "updated_at": + { + "description": "Date and time when the page was updated", + "format": "date-time", + "type": "string", + "example": "2021-01-01 00:00:00" + } + } + }, + "PageMetadata": + { + "type": "object", + "properties": + { + "id": + { + "description": "The unique identifier of the page", + "type": "integer", + "example": 1 + }, + "url": + { + "description": "The URL of the page", + "type": "string", + "nullable": true, + "example": "https://www.example.com" + }, + "title": + { + "description": "The title of the page", + "type": "string", + "nullable": true, + "example": "Example Domain" + }, + "description": + { + "description": "The description of the page", + "type": "string", + "nullable": true, + "example": "This domain is for use in illustrative examples in documents. You may use this domain in literature without prior coordination or asking for permission." + }, + "image": + { + "description": "The image of the page", + "type": "string", + "nullable": true, + "example": "https://www.example.com/image.png" + } + } + } + }, + "responses": + { + "InternalServerErrorResponse": + { + "description": "Internal Server Error", + "content": + { + "application/json": + { + "schema": + { + "type": "object", + "properties": + { + "status": + { + "description": "The status of the response", + "enum": + [ + "error", + "success" + ], + "type": "string", + "example": "error" + }, + "url": + { + "description": "The URL of the request", + "type": "string", + "example": "https://app.customgpt.ai/api/v1/projects/1" + }, + "data": + { + "type": "object", + "properties": + { + "code": + { + "description": "The error status code", + "enum": + [ + 400, + 401, + 403, + 404, + 500, + 503 + ], + "type": "integer", + "example": 500 + }, + "message": + { + "type": "string", + "example": "Internal Server Error" + } + } + } + } + } + } + } + }, + "ListProjectsResponse": + { + "description": "Successfully retrieved list of sources that belong to a project.", + "content": + { + "application/json": + { + "schema": + { + "type": "object", + "properties": + { + "status": + { + "description": "The status of the response", + "enum": + [ + "error", + "success" + ], + "type": "string", + "example": "success" + }, + "data": + { + "type": "object", + "properties": + { + "sitemaps": + { + "type": "array", + "items": + { + "type": "object", + "properties": + { + "id": + { + "description": "The project source ID", + "type": "integer", + "example": 1 + }, + "created_at": + { + "description": "The project source creation date", + "format": "date-time", + "type": "string", + "example": "2021-01-01 00:00:00" + }, + "updated_at": + { + "description": "The project source update date", + "format": "date-time", + "type": "string", + "example": "2021-01-01 00:00:00" + }, + "type": + { + "description": "The project source type", + "enum": + [ + "sitemap", + "upload" + ], + "type": "string", + "example": "sitemap" + }, + "settings": + { + "description": "The project source settings", + "type": "object", + "properties": + { + "executive_js": + { + "description": "Whether the project source should execute JavaScript", + "default": true, + "type": "boolean", + "example": true + }, + "data_refresh_frequency": + { + "description": "The project source data refresh frequency", + "enum": + [ + "never", + "daily", + "weekly", + "monthly", + "advanced" + ], + "default": "never", + "type": "string", + "example": "never" + }, + "create_new_pages": + { + "description": "Add new pages to project automatically during refresh project source", + "default": true, + "type": "boolean", + "example": true + }, + "remove_unexist_pages": + { + "description": "Remove pages from project automatically during refresh project source", + "default": true, + "type": "boolean", + "example": false + }, + "refresh_existing_pages": + { + "description": "Refresh existing page during refresh project source", + "enum": + [ + "never", + "always", + "if_updated" + ], + "default": "never", + "type": "string", + "example": "never" + }, + "sitemap_path": + { + "description": "The project source sitemap path", + "type": "string", + "example": "https://example.com/sitemap.xml" + } + } + }, + "pages": + { + "description": "The project source pages", + "type": "array", + "items": + { + "type": "object", + "properties": + { + "id": + { + "description": "Page ID", + "type": "integer", + "example": 1 + }, + "page_url": + { + "description": "URL of the page or file", + "type": "string", + "example": "https://example.com" + }, + "page_url_hash": + { + "description": "Hash of the URL of the page or file", + "format": "md5", + "type": "string", + "example": "d41d8cd98f00b204e9800998ecf8427e" + }, + "project_id": + { + "description": "Project ID", + "type": "integer", + "example": 1 + }, + "s3_path": + { + "description": "This is the path where the page is stored in S3.\\nNote: This is omitted in the response if the page is not a file", + "type": "string", + "nullable": true, + "example": "project-1/page-1/file.pdf" + }, + "crawl_status": + { + "description": "Crawl status of the page", + "enum": + [ + "ok", + "queued", + "failed", + "n/a", + "limited" + ], + "default": "queued", + "type": "string", + "example": "queued" + }, + "index_status": + { + "description": "Index status of the page", + "enum": + [ + "ok", + "queued", + "failed", + "n/a", + "limited" + ], + "default": "queued", + "type": "string", + "example": "queued" + }, + "is_file": + { + "description": "Whether the page is a file or not", + "default": false, + "type": "boolean", + "example": true + }, + "is_refreshable": + { + "description": "Whether the page can be refreshed or not", + "default": false, + "type": "boolean", + "example": true + }, + "is_file_kept": + { + "description": "Whether the file is kept after processing or not.\\nNote: This is omitted in the response if the page is not a file", + "default": true, + "type": "boolean", + "example": true + }, + "filename": + { + "description": "Filename of the page.\\nNote: This is omitted in the response if the page is not a file", + "type": "string", + "nullable": true, + "example": "file.pdf" + }, + "filesize": + { + "description": "Filesize of the page.\\nNote: This is omitted in the response if the page is not a file", + "type": "integer", + "nullable": true, + "example": 100 + }, + "created_at": + { + "description": "Date and time when the page was created", + "format": "date-time", + "type": "string", + "example": "2021-01-01 00:00:00" + }, + "updated_at": + { + "description": "Date and time when the page was updated", + "format": "date-time", + "type": "string", + "example": "2021-01-01 00:00:00" + } + } + }, + "nullable": true + } + } + } + }, + "uploads": + { + "type": "object", + "properties": + { + "id": + { + "description": "The project source ID", + "type": "integer", + "example": 1 + }, + "created_at": + { + "description": "The project source creation date", + "format": "date-time", + "type": "string", + "example": "2021-01-01 00:00:00" + }, + "updated_at": + { + "description": "The project source update date", + "format": "date-time", + "type": "string", + "example": "2021-01-01 00:00:00" + }, + "type": + { + "description": "The project source type", + "enum": + [ + "sitemap", + "upload" + ], + "type": "string", + "example": "sitemap" + }, + "settings": + { + "description": "The project source settings", + "type": "object", + "properties": + { + "executive_js": + { + "description": "Whether the project source should execute JavaScript", + "default": true, + "type": "boolean", + "example": true + }, + "data_refresh_frequency": + { + "description": "The project source data refresh frequency", + "enum": + [ + "never", + "daily", + "weekly", + "monthly", + "advanced" + ], + "default": "never", + "type": "string", + "example": "never" + }, + "create_new_pages": + { + "description": "Add new pages to project automatically during refresh project source", + "default": true, + "type": "boolean", + "example": true + }, + "remove_unexist_pages": + { + "description": "Remove pages from project automatically during refresh project source", + "default": true, + "type": "boolean", + "example": false + }, + "refresh_existing_pages": + { + "description": "Refresh existing page during refresh project source", + "enum": + [ + "never", + "always", + "if_updated" + ], + "default": "never", + "type": "string", + "example": "never" + }, + "sitemap_path": + { + "description": "The project source sitemap path", + "type": "string", + "example": "https://example.com/sitemap.xml" + } + } + }, + "pages": + { + "description": "The project source pages", + "type": "array", + "items": + { + "type": "object", + "properties": + { + "id": + { + "description": "Page ID", + "type": "integer", + "example": 1 + }, + "page_url": + { + "description": "URL of the page or file", + "type": "string", + "example": "https://example.com" + }, + "page_url_hash": + { + "description": "Hash of the URL of the page or file", + "format": "md5", + "type": "string", + "example": "d41d8cd98f00b204e9800998ecf8427e" + }, + "project_id": + { + "description": "Project ID", + "type": "integer", + "example": 1 + }, + "s3_path": + { + "description": "This is the path where the page is stored in S3.\\nNote: This is omitted in the response if the page is not a file", + "type": "string", + "nullable": true, + "example": "project-1/page-1/file.pdf" + }, + "crawl_status": + { + "description": "Crawl status of the page", + "enum": + [ + "ok", + "queued", + "failed", + "n/a", + "limited" + ], + "default": "queued", + "type": "string", + "example": "queued" + }, + "index_status": + { + "description": "Index status of the page", + "enum": + [ + "ok", + "queued", + "failed", + "n/a", + "limited" + ], + "default": "queued", + "type": "string", + "example": "queued" + }, + "is_file": + { + "description": "Whether the page is a file or not", + "default": false, + "type": "boolean", + "example": true + }, + "is_refreshable": + { + "description": "Whether the page can be refreshed or not", + "default": false, + "type": "boolean", + "example": true + }, + "is_file_kept": + { + "description": "Whether the file is kept after processing or not.\\nNote: This is omitted in the response if the page is not a file", + "default": true, + "type": "boolean", + "example": true + }, + "filename": + { + "description": "Filename of the page.\\nNote: This is omitted in the response if the page is not a file", + "type": "string", + "nullable": true, + "example": "file.pdf" + }, + "filesize": + { + "description": "Filesize of the page.\\nNote: This is omitted in the response if the page is not a file", + "type": "integer", + "nullable": true, + "example": 100 + }, + "created_at": + { + "description": "Date and time when the page was created", + "format": "date-time", + "type": "string", + "example": "2021-01-01 00:00:00" + }, + "updated_at": + { + "description": "Date and time when the page was updated", + "format": "date-time", + "type": "string", + "example": "2021-01-01 00:00:00" + } + } + }, + "nullable": true + } + } + } + } + } + } + } + } + } + }, + "ProjectNotFoundErrorResponse": + { + "description": "Project not found", + "content": + { + "application/json": + { + "schema": + { + "type": "object", + "properties": + { + "status": + { + "description": "The status of the response", + "enum": + [ + "error", + "success" + ], + "type": "string", + "example": "error" + }, + "url": + { + "description": "The URL of the request", + "type": "string", + "example": "https://app.customgpt.ai/api/v1/projects/1" + }, + "data": + { + "type": "object", + "properties": + { + "code": + { + "description": "The error status code", + "enum": + [ + 400, + 401, + 403, + 404, + 500, + 503 + ], + "type": "integer", + "example": 404 + }, + "message": + { + "description": "The error message", + "enum": + [ + "Project id is required", + "Project with id {projectId} not found" + ], + "type": "string", + "example": "Project with id 1 not found" + } + } + } + } + } + } + } + }, + "SyncSourceErrorResponse": + { + "description": "Source sync failed", + "content": + { + "application/json": + { + "schema": + { + "type": "object", + "properties": + { + "status": + { + "description": "The status of the response", + "enum": + [ + "error", + "success" + ], + "type": "string", + "example": "error" + }, + "url": + { + "description": "The URL of the request", + "type": "string", + "example": "https://app.customgpt.ai/api/v1/projects/1" + }, + "data": + { + "type": "object", + "properties": + { + "code": + { + "description": "The error status code", + "enum": + [ + 400, + 401, + 403, + 404, + 500, + 503 + ], + "type": "integer", + "example": 403 + }, + "message": + { + "description": "The error message", + "enum": + [ + "Your plan not eligible for instant sync", + "Next instant sync will be available in \\{seconds\\} seconds", + "Project source can't be synced" + ], + "type": "string", + "example": "Subscription not eligible for instant sync" + } + } + } + } + } + } + } + }, + "UpdatePageMetadataErrorResponse": + { + "description": "Update page metadata failed", + "content": + { + "application/json": + { + "schema": + { + "type": "object", + "properties": + { + "status": + { + "description": "The status of the response", + "enum": + [ + "error", + "success" + ], + "type": "string", + "example": "error" + }, + "url": + { + "description": "The URL of the request", + "type": "string", + "example": "https://app.customgpt.ai/api/v1/projects/1" + }, + "data": + { + "type": "object", + "properties": + { + "code": + { + "description": "The error status code", + "enum": + [ + 400, + 401, + 403, + 404, + 500, + 503 + ], + "type": "integer", + "example": 400 + }, + "message": + { + "description": "The error message", + "type": "string", + "example": "Image must be valid url." + } + } + } + } + } + } + } + }, + "UpdateProjectSettingsResponse": + { + "description": "Project settings have been updated", + "content": + { + "application/json": + { + "schema": + { + "type": "object", + "properties": + { + "status": + { + "description": "The status of the response", + "enum": + [ + "error", + "success" + ], + "type": "string", + "example": "success" + }, + "data": + { + "type": "object", + "properties": + { + "updated": + { + "description": "Whether the project was updated successfully or not", + "type": "boolean", + "example": true + } + } + } + } + } + } + } + }, + "ProjectPluginNotFoundErrorResponse": + { + "description": "Project plugin not found", + "content": + { + "application/json": + { + "schema": + { + "type": "object", + "properties": + { + "status": + { + "description": "The status of the response", + "enum": + [ + "error", + "success" + ], + "type": "string", + "example": "error" + }, + "url": + { + "description": "The URL of the request", + "type": "string", + "example": "https://app.customgpt.ai/api/v1/projects/1" + }, + "data": + { + "type": "object", + "properties": + { + "code": + { + "description": "The error status code", + "enum": + [ + 400, + 401, + 403, + 404, + 500, + 503 + ], + "type": "integer", + "example": 404 + }, + "message": + { + "description": "The error message", + "enum": + [ + "Project plugin id is required", + "Project plugin with id {pluginId} not found", + "Plugin for project with id {projectId} not found" + ], + "type": "string", + "example": "Project plugin with id 1 not found" + } + } + } + } + } + } + } + }, + "ListProjectResponse": + { + "description": "Retrieve certain project that belongs to the user", + "content": + { + "application/json": + { + "schema": + { + "type": "object", + "properties": + { + "status": + { + "description": "The status of the response", + "enum": + [ + "error", + "success" + ], + "type": "string", + "example": "success" + }, + "data": + { + "type": "object", + "properties": + { + "id": + { + "description": "Project ID", + "type": "integer", + "example": 1 + }, + "project_name": + { + "description": "Project name", + "type": "string", + "example": "My Project" + }, + "sitemap_path": + { + "description": "Project sitemap", + "type": "string", + "example": "https://www.example.com/sitemap.xml" + }, + "is_chat_active": + { + "description": "Whether the chat bot is active or not", + "default": false, + "type": "boolean", + "example": true + }, + "user_id": + { + "description": "User ID of the project owner", + "type": "integer", + "example": 1 + }, + "team_id": + { + "description": "Team ID of the project owner", + "type": "integer", + "example": 1 + }, + "created_at": + { + "description": "Date and time when the project was created", + "default": "2023-05-08 13:06:55", + "format": "date-time", + "type": "string", + "example": "2021-01-01 00:00:00" + }, + "updated_at": + { + "description": "Date and time when the project was last updated", + "default": "2023-05-08 13:06:55", + "format": "date-time", + "type": "string", + "example": "2021-01-01 00:00:00" + }, + "type": + { + "description": "Project type", + "enum": + [ + "SITEMAP", + "URL" + ], + "default": "SITEMAP", + "type": "string", + "example": "SITEMAP" + }, + "is_shared": + { + "description": "Whether the project is shared or not", + "default": false, + "type": "boolean", + "example": true + }, + "shareable_slug": + { + "description": "Shareable slug that can be used to share the project", + "format": "md5", + "type": "string", + "nullable": true, + "example": "1234567890abcdef1234567890abcdef" + }, + "shareable_link": + { + "description": "Shareable link that can be used to share the project", + "format": "url", + "type": "string", + "nullable": true + }, + "embed_code": + { + "description": "Embed code that can be used to embed the project", + "format": "html", + "type": "string", + "nullable": true + }, + "live_chat_code": + { + "description": "Live chat code that can be used to embed the live chat", + "format": "html", + "type": "string", + "nullable": true + } + } + } + } + } + } + } + }, + "DeleteProjectResponse": + { + "description": "Project deleted successfully", + "content": + { + "application/json": + { + "schema": + { + "type": "object", + "properties": + { + "status": + { + "description": "The status of the response", + "enum": + [ + "error", + "success" + ], + "type": "string", + "example": "success" + }, + "data": + { + "type": "object", + "properties": + { + "deleted": + { + "description": "Whether the project was deleted successfully or not", + "type": "boolean", + "example": true + } + } + } + } + } + } + } + }, + "ProjectSourceNotFoundErrorResponse": + { + "description": "Project source not found", + "content": + { + "application/json": + { + "schema": + { + "type": "object", + "properties": + { + "status": + { + "description": "The status of the response", + "enum": + [ + "error", + "success" + ], + "type": "string", + "example": "error" + }, + "url": + { + "description": "The URL of the request", + "type": "string", + "example": "https://app.customgpt.ai/api/v1/projects/1" + }, + "data": + { + "type": "object", + "properties": + { + "code": + { + "description": "The error status code", + "enum": + [ + 400, + 401, + 403, + 404, + 500, + 503 + ], + "type": "integer", + "example": 404 + }, + "message": + { + "description": "The error message", + "enum": + [ + "Project source id is required", + "Project source with id {sourceId} not found" + ], + "type": "string", + "example": "Project source with id 1 not found" + } + } + } + } + } + } + } + }, + "ProjectCreatedResponse": + { + "description": "Project has been created", + "content": + { + "application/json": + { + "schema": + { + "type": "object", + "properties": + { + "status": + { + "description": "The status of the response", + "enum": + [ + "error", + "success" + ], + "type": "string", + "example": "success" + }, + "data": + { + "type": "object", + "properties": + { + "id": + { + "description": "Project ID", + "type": "integer", + "example": 1 + }, + "project_name": + { + "description": "Project name", + "type": "string", + "example": "My Project" + }, + "sitemap_path": + { + "description": "Project sitemap", + "type": "string", + "example": "https://www.example.com/sitemap.xml" + }, + "is_chat_active": + { + "description": "Whether the chat bot is active or not", + "default": false, + "type": "boolean", + "example": true + }, + "user_id": + { + "description": "User ID of the project owner", + "type": "integer", + "example": 1 + }, + "team_id": + { + "description": "Team ID of the project owner", + "type": "integer", + "example": 1 + }, + "created_at": + { + "description": "Date and time when the project was created", + "default": "2023-05-08 13:06:55", + "format": "date-time", + "type": "string", + "example": "2021-01-01 00:00:00" + }, + "updated_at": + { + "description": "Date and time when the project was last updated", + "default": "2023-05-08 13:06:55", + "format": "date-time", + "type": "string", + "example": "2021-01-01 00:00:00" + }, + "type": + { + "description": "Project type", + "enum": + [ + "SITEMAP", + "URL" + ], + "default": "SITEMAP", + "type": "string", + "example": "SITEMAP" + }, + "is_shared": + { + "description": "Whether the project is shared or not", + "default": false, + "type": "boolean", + "example": true + }, + "shareable_slug": + { + "description": "Shareable slug that can be used to share the project", + "format": "md5", + "type": "string", + "nullable": true, + "example": "1234567890abcdef1234567890abcdef" + }, + "shareable_link": + { + "description": "Shareable link that can be used to share the project", + "format": "url", + "type": "string", + "nullable": true + }, + "embed_code": + { + "description": "Embed code that can be used to embed the project", + "format": "html", + "type": "string", + "nullable": true + }, + "live_chat_code": + { + "description": "Live chat code that can be used to embed the live chat", + "format": "html", + "type": "string", + "nullable": true + } + } + } + } + } + } + } + }, + "PageNotFoundErrorResponse": + { + "description": "Page not found", + "content": + { + "application/json": + { + "schema": + { + "type": "object", + "properties": + { + "status": + { + "description": "The status of the response", + "enum": + [ + "error", + "success" + ], + "type": "string", + "example": "error" + }, + "url": + { + "description": "The URL of the request", + "type": "string", + "example": "https://app.customgpt.ai/api/v1/projects/1" + }, + "data": + { + "type": "object", + "properties": + { + "code": + { + "description": "The error status code", + "enum": + [ + 400, + 401, + 403, + 404, + 500, + 503 + ], + "type": "integer", + "example": 404 + }, + "message": + { + "description": "The error message", + "enum": + [ + "Page id is required", + "Page with id {pageId} not found" + ], + "type": "string", + "example": "Page with id 1 not found" + } + } + } + } + } + } + } + }, + "ConversationMessageListResponse": + { + "description": "List all messages in a conversation", + "content": + { + "application/json": + { + "schema": + { + "type": "object", + "properties": + { + "status": + { + "description": "The status of the response", + "enum": + [ + "error", + "success" + ], + "type": "string", + "example": "success" + }, + "data": + { + "type": "object", + "properties": + { + "conversation": + { + "type": "object", + "properties": + { + "created_at": + { + "description": "When was this conversation created?", + "format": "date-time", + "type": "string", + "example": "2023-04-30 16:43:53" + }, + "updated_at": + { + "description": "When was this conversation updated?", + "format": "date-time", + "type": "string", + "example": "2023-04-30 16:43:53" + }, + "id": + { + "description": "Conversation ID", + "type": "integer", + "example": 1 + }, + "name": + { + "description": "Conversation name", + "type": "string", + "example": "Conversation 1" + }, + "project_id": + { + "description": "Project ID for this conversation", + "type": "string", + "example": 1 + }, + "created_by": + { + "description": "User ID for the user who created this conversation", + "type": "string", + "example": 1 + }, + "session_id": + { + "description": "Session ID for this conversation", + "format": "uuid", + "type": "string", + "example": "f1b9aaf0-5e4e-11eb-ae93-0242ac130002" + } + } + }, + "messages": + { + "type": "object", + "properties": + { + "current_page": + { + "description": "The current page number", + "type": "integer", + "example": 1 + }, + "data": + { + "type": "array", + "items": + { + "type": "object", + "properties": + { + "id": + { + "description": "The unique identifier of the prompt history.", + "type": "integer", + "example": 1 + }, + "user_id": + { + "description": "The unique identifier of the user.", + "type": "integer", + "example": 1 + }, + "user_query": + { + "description": "The user prompt query.", + "type": "string", + "example": "What is the meaning of life?" + }, + "openai_response": + { + "description": "The OpenAI response to the user prompt query.", + "type": "string", + "example": "The meaning of life is to be happy." + }, + "created_at": + { + "description": "The date and time the prompt history was created.", + "format": "date-time", + "type": "string", + "example": "2021-01-01 00:00:00" + }, + "updated_at": + { + "description": "The date and time the prompt history was last updated.", + "format": "date-time", + "type": "string", + "example": "2021-01-01 00:00:00" + }, + "conversation_id": + { + "description": "The unique identifier of the conversation.", + "type": "integer", + "example": 1 + }, + "citations": + { + "description": "The citations for the prompt history.", + "default": + [], + "type": "array", + "items": + { + "type": "integer", + "example": 1 + }, + "example": + [ + 1, + 2, + 3 + ] + }, + "metadata": + { + "type": "object", + "properties": + { + "user_ip": + { + "description": "The IP address of the user.", + "type": "string", + "example": "127.0.0.1" + }, + "user_agent": + { + "description": "The user agent of the user.", + "type": "string", + "example": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko)" + }, + "external_id": + { + "description": "The external ID of the prompt history.", + "type": "string", + "maxLength": 128, + "example": "ext_id_1234567890" + }, + "request_source": + { + "description": "The source of the request.", + "type": "string", + "example": "web" + } + }, + "example": + { + "user_ip": "127.0.0.1", + "user_agent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko)", + "external_id": "ext_id_1234567890", + "request_source": "web" + } + } + } + } + }, + "first_page_url": + { + "description": "The first page url", + "type": "string", + "example": "https://app.customgpt.ai/api/v1/users?page=1" + }, + "from": + { + "description": "The first item number of the current page", + "type": "integer", + "example": 1 + }, + "last_page": + { + "description": "The last page number", + "type": "integer", + "example": 1 + }, + "last_page_url": + { + "description": "The last page url", + "type": "string", + "example": "https://app.customgpt.ai/api/v1/users?page=1" + }, + "next_page_url": + { + "description": "The next page url", + "type": "string", + "example": "https://app.customgpt.ai/api/v1/users?page=1" + }, + "path": + { + "description": "The current page url", + "type": "string", + "example": "https://app.customgpt.ai/api/v1/users?page=1" + }, + "per_page": + { + "description": "The number of items per page", + "type": "integer", + "example": 10 + }, + "prev_page_url": + { + "description": "The previous page url", + "type": "string", + "example": "https://app.customgpt.ai/api/v1/users?page=1" + }, + "to": + { + "description": "The last item number of the current page", + "type": "integer", + "example": 1 + }, + "total": + { + "description": "The total number of items", + "type": "integer", + "example": 1 + } + } + } + } + } + } + } + } + } + }, + "CreateProjectErrorResponse": + { + "description": "Project creation failed", + "content": + { + "application/json": + { + "schema": + { + "type": "object", + "properties": + { + "status": + { + "description": "The status of the response", + "enum": + [ + "error", + "success" + ], + "type": "string", + "example": "error" + }, + "url": + { + "description": "The URL of the request", + "type": "string", + "example": "https://app.customgpt.ai/api/v1/projects/1" + }, + "data": + { + "type": "object", + "properties": + { + "code": + { + "description": "The error status code", + "enum": + [ + 400, + 401, + 403, + 404, + 500, + 503 + ], + "type": "integer", + "example": 400 + }, + "message": + { + "description": "The error message", + "enum": + [ + "Project name can't be empty", + "Sitemap path can't be empty", + "You have reached your monthly project limit" + ], + "type": "string", + "example": "Project name can't be empty" + } + } + } + } + } + } + } + }, + "UpdateProjectResponse": + { + "description": "Project has been updated", + "content": + { + "application/json": + { + "schema": + { + "type": "object", + "properties": + { + "status": + { + "description": "The status of the response", + "enum": + [ + "error", + "success" + ], + "type": "string", + "example": "success" + }, + "data": + { + "type": "object", + "properties": + { + "id": + { + "description": "Project ID", + "type": "integer", + "example": 1 + }, + "project_name": + { + "description": "Project name", + "type": "string", + "example": "My Project" + }, + "sitemap_path": + { + "description": "Project sitemap", + "type": "string", + "example": "https://www.example.com/sitemap.xml" + }, + "is_chat_active": + { + "description": "Whether the chat bot is active or not", + "default": false, + "type": "boolean", + "example": true + }, + "user_id": + { + "description": "User ID of the project owner", + "type": "integer", + "example": 1 + }, + "team_id": + { + "description": "Team ID of the project owner", + "type": "integer", + "example": 1 + }, + "created_at": + { + "description": "Date and time when the project was created", + "default": "2023-05-08 13:06:55", + "format": "date-time", + "type": "string", + "example": "2021-01-01 00:00:00" + }, + "updated_at": + { + "description": "Date and time when the project was last updated", + "default": "2023-05-08 13:06:55", + "format": "date-time", + "type": "string", + "example": "2021-01-01 00:00:00" + }, + "type": + { + "description": "Project type", + "enum": + [ + "SITEMAP", + "URL" + ], + "default": "SITEMAP", + "type": "string", + "example": "SITEMAP" + }, + "is_shared": + { + "description": "Whether the project is shared or not", + "default": false, + "type": "boolean", + "example": true + }, + "shareable_slug": + { + "description": "Shareable slug that can be used to share the project", + "format": "md5", + "type": "string", + "nullable": true, + "example": "1234567890abcdef1234567890abcdef" + }, + "shareable_link": + { + "description": "Shareable link that can be used to share the project", + "format": "url", + "type": "string", + "nullable": true + }, + "embed_code": + { + "description": "Embed code that can be used to embed the project", + "format": "html", + "type": "string", + "nullable": true + }, + "live_chat_code": + { + "description": "Live chat code that can be used to embed the live chat", + "format": "html", + "type": "string", + "nullable": true + } + } + } + } + } + } + } + }, + "CreateProjectSourceResponse": + { + "description": "Successfully created a new project source.", + "content": + { + "application/json": + { + "schema": + { + "type": "object", + "properties": + { + "status": + { + "description": "The status of the response", + "enum": + [ + "error", + "success" + ], + "type": "string", + "example": "success" + }, + "data": + { + "type": "object", + "properties": + { + "id": + { + "description": "The project source ID", + "type": "integer", + "example": 1 + }, + "created_at": + { + "description": "The project source creation date", + "format": "date-time", + "type": "string", + "example": "2021-01-01 00:00:00" + }, + "updated_at": + { + "description": "The project source update date", + "format": "date-time", + "type": "string", + "example": "2021-01-01 00:00:00" + }, + "type": + { + "description": "The project source type", + "enum": + [ + "sitemap", + "upload" + ], + "type": "string", + "example": "sitemap" + }, + "settings": + { + "description": "The project source settings", + "type": "object", + "properties": + { + "executive_js": + { + "description": "Whether the project source should execute JavaScript", + "default": true, + "type": "boolean", + "example": true + }, + "data_refresh_frequency": + { + "description": "The project source data refresh frequency", + "enum": + [ + "never", + "daily", + "weekly", + "monthly", + "advanced" + ], + "default": "never", + "type": "string", + "example": "never" + }, + "create_new_pages": + { + "description": "Add new pages to project automatically during refresh project source", + "default": true, + "type": "boolean", + "example": true + }, + "remove_unexist_pages": + { + "description": "Remove pages from project automatically during refresh project source", + "default": true, + "type": "boolean", + "example": false + }, + "refresh_existing_pages": + { + "description": "Refresh existing page during refresh project source", + "enum": + [ + "never", + "always", + "if_updated" + ], + "default": "never", + "type": "string", + "example": "never" + }, + "sitemap_path": + { + "description": "The project source sitemap path", + "type": "string", + "example": "https://example.com/sitemap.xml" + } + } + }, + "pages": + { + "description": "The project source pages", + "type": "array", + "items": + { + "type": "object", + "properties": + { + "id": + { + "description": "Page ID", + "type": "integer", + "example": 1 + }, + "page_url": + { + "description": "URL of the page or file", + "type": "string", + "example": "https://example.com" + }, + "page_url_hash": + { + "description": "Hash of the URL of the page or file", + "format": "md5", + "type": "string", + "example": "d41d8cd98f00b204e9800998ecf8427e" + }, + "project_id": + { + "description": "Project ID", + "type": "integer", + "example": 1 + }, + "s3_path": + { + "description": "This is the path where the page is stored in S3.\\nNote: This is omitted in the response if the page is not a file", + "type": "string", + "nullable": true, + "example": "project-1/page-1/file.pdf" + }, + "crawl_status": + { + "description": "Crawl status of the page", + "enum": + [ + "ok", + "queued", + "failed", + "n/a", + "limited" + ], + "default": "queued", + "type": "string", + "example": "queued" + }, + "index_status": + { + "description": "Index status of the page", + "enum": + [ + "ok", + "queued", + "failed", + "n/a", + "limited" + ], + "default": "queued", + "type": "string", + "example": "queued" + }, + "is_file": + { + "description": "Whether the page is a file or not", + "default": false, + "type": "boolean", + "example": true + }, + "is_refreshable": + { + "description": "Whether the page can be refreshed or not", + "default": false, + "type": "boolean", + "example": true + }, + "is_file_kept": + { + "description": "Whether the file is kept after processing or not.\\nNote: This is omitted in the response if the page is not a file", + "default": true, + "type": "boolean", + "example": true + }, + "filename": + { + "description": "Filename of the page.\\nNote: This is omitted in the response if the page is not a file", + "type": "string", + "nullable": true, + "example": "file.pdf" + }, + "filesize": + { + "description": "Filesize of the page.\\nNote: This is omitted in the response if the page is not a file", + "type": "integer", + "nullable": true, + "example": 100 + }, + "created_at": + { + "description": "Date and time when the page was created", + "format": "date-time", + "type": "string", + "example": "2021-01-01 00:00:00" + }, + "updated_at": + { + "description": "Date and time when the page was updated", + "format": "date-time", + "type": "string", + "example": "2021-01-01 00:00:00" + } + } + }, + "nullable": true + } + } + } + } + } + } + } + }, + "PageReindexErrorResponse": + { + "description": "Page cannot be reindexed", + "content": + { + "application/json": + { + "schema": + { + "type": "object", + "properties": + { + "status": + { + "description": "The status of the response", + "enum": + [ + "error", + "success" + ], + "type": "string", + "example": "error" + }, + "url": + { + "description": "The URL of the request", + "type": "string", + "example": "https://app.customgpt.ai/api/v1/projects/1" + }, + "data": + { + "type": "object", + "properties": + { + "code": + { + "description": "The error status code", + "enum": + [ + 400, + 401, + 403, + 404, + 500, + 503 + ], + "type": "integer", + "example": 400 + }, + "message": + { + "description": "The error message", + "enum": + [ + "Page with id {pageId} cannot be reindexed" + ], + "type": "string", + "example": "Page with id 1 cannot be reindexed" + } + } + } + } + } + } + } + }, + "ListProjectSettingsResponse": + { + "description": "Project settings that belong to a certain project", + "content": + { + "application/json": + { + "schema": + { + "type": "object", + "properties": + { + "status": + { + "description": "The status of the response", + "enum": + [ + "error", + "success" + ], + "type": "string", + "example": "success" + }, + "data": + { + "type": "object", + "properties": + { + "chatbot_avatar": + { + "description": "This is the avatar that is shown in the bot response. You can make it a profile picture or your company logo.", + "type": "string", + "example": "https://example.com/chatbot_avatar.png" + }, + "chatbot_background": + { + "description": "This is the background image shown in the bot conversations widget. You can change it to a company logo or background image.", + "type": "string", + "example": "https://example.com/chatbot_background.png" + }, + "default_prompt": + { + "description": "This is the default prompt shown to the user. You can customize this for your company or client.", + "type": "string", + "example": "How can I help you?" + }, + "example_questions": + { + "description": "These are example questions shown to guide the bot users. You can create customized questions to suit your company or client needs.", + "type": "array", + "items": + { + "type": "string", + "example": "How do I get started?" + }, + "example": + [ + "How do I get started?" + ] + }, + "response_source": + { + "description": "By default, we ask ChatGPT to use only your content in its response (recommended). If you wish ChatGPT to improvise and use its own knowledgebase as well, you can select \"My Content + ChatGPT\"", + "enum": + [ + "default", + "own_content", + "openai_content" + ], + "type": "string", + "example": "own_content" + }, + "chatbot_msg_lang": + { + "description": "By default, the chatbot messages like 'Ask Me Anything' are in English. You can customize this to your preferred language. Please note: This setting does not control what language ChatGPT responds in. That is controlled by the user's question. So a user asking in Portuguese, will most likely get a response from ChatGPT in Portuguese.", + "type": "string", + "example": "en" + }, + "chatbot_color": + { + "description": "Color of the chatbot in hex format", + "type": "string", + "example": "#000000" + }, + "chatbot_toolbar_color": + { + "description": "Color of the chatbot toolbar in hex format", + "type": "string", + "example": "#000000" + }, + "persona_instructions": + { + "description": "Customize your chatbot behavior by adjusting the system parameter to control its personality traits and role.", + "type": "string", + "nullable": true, + "example": "You are a custom chatbot assistant called CustomGPT.ai, a friendly lawyer who answers questions based on the given context." + }, + "citations_answer_source_label_msg": + { + "description": "This is the message shown to indicate where the response came from. You can customize this message based on your business or language.", + "type": "string", + "nullable": true, + "example": "Where did this answer come from?" + }, + "citations_sources_label_msg": + { + "description": "This is the message shown for the Sources label. You can customize this message based on your business or language.", + "type": "string", + "nullable": true, + "example": "Sources" + }, + "hang_in_there_msg": + { + "description": "This is the message shown when the bot is thinking and waiting to answer. You can customize this message based on your tone, personality or language.", + "type": "string", + "nullable": true, + "example": "Hang in there! I'm thinking.." + }, + "chatbot_siesta_msg": + { + "description": "This is the message shown when the bot has encountered a problem or error. You can customize this message based on your tone, personality or language.", + "type": "string", + "nullable": true, + "example": "Oops! The chat bot is taking a siesta. This usually happens when OpenAI is down! Please try again later." + }, + "is_loading_indicator_enabled": + { + "description": "Show animated loading indicator while waiting for a response from the chatbot", + "default": true, + "type": "boolean", + "nullable": true, + "example": true + }, + "enable_citations": + { + "description": "Each chatbot response shows an option for the user to see the sources/citations from your content from which the response was generated.", + "enum": + [ + 0, + 1, + 2, + 3 + ], + "default": 3, + "type": "integer", + "nullable": true, + "example": 3 + }, + "enable_feedbacks": + { + "description": "Each chatbot response shows an thumbs up/down for the user to left own feedback.", + "default": true, + "type": "boolean", + "nullable": true, + "example": true + }, + "citations_view_type": + { + "description": "Control how citations are shown. By default, the user can initiate to see the citations. You can choose to have it \"Auto Shown\" or \"Auto Hide\"", + "enum": + [ + "user", + "show", + "hide" + ], + "default": "user", + "type": "string", + "nullable": true, + "example": "user" + }, + "no_answer_message": + { + "description": "This is the message shown when the bot cannot answer. You can customize it to a message asking the user to contact customer support or leave their email / phone.", + "default": "I'm sorry, I don't know the answer", + "type": "string", + "nullable": true, + "example": "Sorry, I don't have an answer for that." + }, + "ending_message": + { + "description": "You can instruct ChatGPT to end every response with some text like asking \"Please email us for further support\" (Not recommended for most use cases)", + "type": "string", + "nullable": true, + "example": "Please email us for further support" + }, + "remove_branding": + { + "description": "Controls what branding is shown at the bottom of the chatbot.", + "default": false, + "type": "boolean", + "nullable": true, + "example": false + }, + "enable_recaptcha_for_public_chatbots": + { + "description": "Should we check messages from guests with Recaptcha when your chatbot is publicly available (i.e. shared or embedded).", + "default": false, + "type": "boolean", + "nullable": true, + "example": false + }, + "chatbot_model": + { + "description": "This is the model used by the chatbot. You can choose a different model to suit your needs.", + "enum": + [ + "gpt-4", + "gpt-3.5-turbo", + "gpt-4-turbo", + "gpt-4-o" + ], + "default": "gpt-4", + "type": "string", + "nullable": true, + "example": "gpt-4" + }, + "is_selling_enabled": + { + "description": "Enable selling of chatbot for monetization", + "default": false, + "type": "boolean", + "nullable": true, + "example": false + }, + "license_slug": + { + "description": "License slug used for monetization", + "type": "boolean", + "nullable": true, + "readOnly": true + }, + "selling_url": + { + "description": "Selling URL used for monetization", + "type": "string", + "nullable": true, + "readOnly": true + } + } + } + } + } + } + } + }, + "CreatePageMetadataErrorResponse": + { + "description": "Create page metadata failed", + "content": + { + "application/json": + { + "schema": + { + "type": "object", + "properties": + { + "status": + { + "description": "The status of the response", + "enum": + [ + "error", + "success" + ], + "type": "string", + "example": "error" + }, + "url": + { + "description": "The URL of the request", + "type": "string", + "example": "https://app.customgpt.ai/api/v1/projects/1" + }, + "data": + { + "type": "object", + "properties": + { + "code": + { + "description": "The error status code", + "enum": + [ + 400, + 401, + 403, + 404, + 500, + 503 + ], + "type": "integer", + "example": 400 + }, + "message": + { + "description": "The error message", + "type": "string", + "example": "Something went wrong." + } + } + } + } + } + } + } + }, + "SendConversationResponse": + { + "description": "Send a message to a conversation", + "content": + { + "application/json": + { + "schema": + { + "type": "object", + "properties": + { + "status": + { + "description": "The status of the response", + "enum": + [ + "error", + "success" + ], + "type": "string", + "example": "success" + }, + "data": + { + "type": "object", + "properties": + { + "id": + { + "description": "The unique identifier of the prompt history.", + "type": "integer", + "example": 1 + }, + "user_id": + { + "description": "The unique identifier of the user.", + "type": "integer", + "example": 1 + }, + "user_query": + { + "description": "The user prompt query.", + "type": "string", + "example": "What is the meaning of life?" + }, + "openai_response": + { + "description": "The OpenAI response to the user prompt query.", + "type": "string", + "example": "The meaning of life is to be happy." + }, + "created_at": + { + "description": "The date and time the prompt history was created.", + "format": "date-time", + "type": "string", + "example": "2021-01-01 00:00:00" + }, + "updated_at": + { + "description": "The date and time the prompt history was last updated.", + "format": "date-time", + "type": "string", + "example": "2021-01-01 00:00:00" + }, + "conversation_id": + { + "description": "The unique identifier of the conversation.", + "type": "integer", + "example": 1 + }, + "citations": + { + "description": "The citations for the prompt history.", + "default": + [], + "type": "array", + "items": + { + "type": "integer", + "example": 1 + }, + "example": + [ + 1, + 2, + 3 + ] + }, + "metadata": + { + "type": "object", + "properties": + { + "user_ip": + { + "description": "The IP address of the user.", + "type": "string", + "example": "127.0.0.1" + }, + "user_agent": + { + "description": "The user agent of the user.", + "type": "string", + "example": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko)" + }, + "external_id": + { + "description": "The external ID of the prompt history.", + "type": "string", + "maxLength": 128, + "example": "ext_id_1234567890" + }, + "request_source": + { + "description": "The source of the request.", + "type": "string", + "example": "web" + } + }, + "example": + { + "user_ip": "127.0.0.1", + "user_agent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko)", + "external_id": "ext_id_1234567890", + "request_source": "web" + } + } + } + } + } + } + } + } + }, + "UpdateProjectPluginResponse": + { + "description": "Project plugin have been updated", + "content": + { + "application/json": + { + "schema": + { + "type": "object", + "properties": + { + "status": + { + "description": "The status of the response", + "enum": + [ + "error", + "success" + ], + "type": "string", + "example": "success" + }, + "data": + { + "type": "object", + "properties": + { + "model_name": + { + "description": "Model Name", + "type": "string", + "example": "IndoorPlants" + }, + "human_name": + { + "description": "Name For Human", + "type": "string", + "example": "The Indoor Plants Channel" + }, + "keywords": + { + "description": "Keywords For Model", + "type": "string", + "example": "Indoor plants, Gardening, Trusted information." + }, + "description": + { + "description": "Description For Human", + "type": "string", + "example": "Trusted information about indoor plants and gardening." + }, + "logo": + { + "description": "Project plugin logo", + "type": "string", + "example": "https://app.customgpt.ai/logo.svg" + }, + "is_active": + { + "description": "Whether the project plugin is active or not", + "default": false, + "type": "boolean", + "example": true + } + } + } + } + } + } + } + }, + "UpdateProjectSettingsErrorResponse": + { + "description": "Update project settings failed", + "content": + { + "application/json": + { + "schema": + { + "type": "object", + "properties": + { + "status": + { + "description": "The status of the response", + "enum": + [ + "error", + "success" + ], + "type": "string", + "example": "error" + }, + "url": + { + "description": "The URL of the request", + "type": "string", + "example": "https://app.customgpt.ai/api/v1/projects/1" + }, + "data": + { + "type": "object", + "properties": + { + "code": + { + "description": "The error status code", + "enum": + [ + 400, + 401, + 403, + 404, + 500, + 503 + ], + "type": "integer", + "example": 400 + }, + "message": + { + "description": "The error message", + "enum": + [ + "Please upload a valid image file for avatar", + "Please upload a valid image file for background", + "Language Proficiency is required." + ], + "type": "string", + "example": "Please upload a valid image file for avatar" + } + } + } + } + } + } + } + }, + "BadArgumentErrorResponse": + { + "description": "Bad Argument", + "content": + { + "application/json": + { + "schema": + { + "type": "object", + "properties": + { + "status": + { + "description": "The status of the response", + "enum": + [ + "error", + "success" + ], + "type": "string", + "example": "error" + }, + "url": + { + "description": "The URL of the request", + "type": "string", + "example": "https://app.customgpt.ai/api/v1/projects/1" + }, + "data": + { + "type": "object", + "properties": + { + "code": + { + "description": "The error status code", + "enum": + [ + 400, + 401, + 403, + 404, + 500, + 503 + ], + "type": "integer", + "example": 400 + }, + "message": + { + "description": "The error message", + "type": "string", + "example": "Project id must be integer" + } + } + } + } + } + } + } + }, + "UpdateProjectSourceResponse": + { + "description": "Successfully updated project source.", + "content": + { + "application/json": + { + "schema": + { + "type": "object", + "properties": + { + "status": + { + "description": "The status of the response", + "enum": + [ + "error", + "success" + ], + "type": "string", + "example": "success" + }, + "data": + { + "type": "object", + "properties": + { + "id": + { + "description": "The project source ID", + "type": "integer", + "example": 1 + }, + "created_at": + { + "description": "The project source creation date", + "format": "date-time", + "type": "string", + "example": "2021-01-01 00:00:00" + }, + "updated_at": + { + "description": "The project source update date", + "format": "date-time", + "type": "string", + "example": "2021-01-01 00:00:00" + }, + "type": + { + "description": "The project source type", + "enum": + [ + "sitemap", + "upload" + ], + "type": "string", + "example": "sitemap" + }, + "settings": + { + "description": "The project source settings", + "type": "object", + "properties": + { + "executive_js": + { + "description": "Whether the project source should execute JavaScript", + "default": true, + "type": "boolean", + "example": true + }, + "data_refresh_frequency": + { + "description": "The project source data refresh frequency", + "enum": + [ + "never", + "daily", + "weekly", + "monthly", + "advanced" + ], + "default": "never", + "type": "string", + "example": "never" + }, + "create_new_pages": + { + "description": "Add new pages to project automatically during refresh project source", + "default": true, + "type": "boolean", + "example": true + }, + "remove_unexist_pages": + { + "description": "Remove pages from project automatically during refresh project source", + "default": true, + "type": "boolean", + "example": false + }, + "refresh_existing_pages": + { + "description": "Refresh existing page during refresh project source", + "enum": + [ + "never", + "always", + "if_updated" + ], + "default": "never", + "type": "string", + "example": "never" + }, + "sitemap_path": + { + "description": "The project source sitemap path", + "type": "string", + "example": "https://example.com/sitemap.xml" + } + } + }, + "pages": + { + "description": "The project source pages", + "type": "array", + "items": + { + "type": "object", + "properties": + { + "id": + { + "description": "Page ID", + "type": "integer", + "example": 1 + }, + "page_url": + { + "description": "URL of the page or file", + "type": "string", + "example": "https://example.com" + }, + "page_url_hash": + { + "description": "Hash of the URL of the page or file", + "format": "md5", + "type": "string", + "example": "d41d8cd98f00b204e9800998ecf8427e" + }, + "project_id": + { + "description": "Project ID", + "type": "integer", + "example": 1 + }, + "s3_path": + { + "description": "This is the path where the page is stored in S3.\\nNote: This is omitted in the response if the page is not a file", + "type": "string", + "nullable": true, + "example": "project-1/page-1/file.pdf" + }, + "crawl_status": + { + "description": "Crawl status of the page", + "enum": + [ + "ok", + "queued", + "failed", + "n/a", + "limited" + ], + "default": "queued", + "type": "string", + "example": "queued" + }, + "index_status": + { + "description": "Index status of the page", + "enum": + [ + "ok", + "queued", + "failed", + "n/a", + "limited" + ], + "default": "queued", + "type": "string", + "example": "queued" + }, + "is_file": + { + "description": "Whether the page is a file or not", + "default": false, + "type": "boolean", + "example": true + }, + "is_refreshable": + { + "description": "Whether the page can be refreshed or not", + "default": false, + "type": "boolean", + "example": true + }, + "is_file_kept": + { + "description": "Whether the file is kept after processing or not.\\nNote: This is omitted in the response if the page is not a file", + "default": true, + "type": "boolean", + "example": true + }, + "filename": + { + "description": "Filename of the page.\\nNote: This is omitted in the response if the page is not a file", + "type": "string", + "nullable": true, + "example": "file.pdf" + }, + "filesize": + { + "description": "Filesize of the page.\\nNote: This is omitted in the response if the page is not a file", + "type": "integer", + "nullable": true, + "example": 100 + }, + "created_at": + { + "description": "Date and time when the page was created", + "format": "date-time", + "type": "string", + "example": "2021-01-01 00:00:00" + }, + "updated_at": + { + "description": "Date and time when the page was updated", + "format": "date-time", + "type": "string", + "example": "2021-01-01 00:00:00" + } + } + }, + "nullable": true + } + } + } + } + } + } + } + }, + "ListProjectPluginResponse": + { + "description": "Project plugin that belong to a certain project", + "content": + { + "application/json": + { + "schema": + { + "type": "object", + "properties": + { + "status": + { + "description": "The status of the response", + "enum": + [ + "error", + "success" + ], + "type": "string", + "example": "success" + }, + "data": + { + "type": "object", + "properties": + { + "model_name": + { + "description": "Model Name", + "type": "string", + "example": "IndoorPlants" + }, + "human_name": + { + "description": "Name For Human", + "type": "string", + "example": "The Indoor Plants Channel" + }, + "keywords": + { + "description": "Keywords For Model", + "type": "string", + "example": "Indoor plants, Gardening, Trusted information." + }, + "description": + { + "description": "Description For Human", + "type": "string", + "example": "Trusted information about indoor plants and gardening." + }, + "logo": + { + "description": "Project plugin logo", + "type": "string", + "example": "https://app.customgpt.ai/logo.svg" + }, + "is_active": + { + "description": "Whether the project plugin is active or not", + "default": false, + "type": "boolean", + "example": true + } + } + } + } + } + } + } + }, + "FlaskServiceErrorResponse": + { + "description": "Service unavailable", + "content": + { + "application/json": + { + "schema": + { + "type": "object", + "properties": + { + "status": + { + "description": "The status of the response", + "enum": + [ + "error", + "success" + ], + "type": "string", + "example": "error" + }, + "url": + { + "description": "The URL of the request", + "type": "string", + "example": "https://app.customgpt.ai/api/v1/projects/1" + }, + "data": + { + "type": "object", + "properties": + { + "code": + { + "description": "The error status code", + "enum": + [ + 400, + 401, + 403, + 404, + 500, + 503 + ], + "type": "integer", + "example": 400 + }, + "message": + { + "description": "The error message", + "type": "string", + "example": "Sitemap URL is empty" + } + } + } + } + } + } + } + }, + "SendMessageResourceExhaustedErrorResponse": + { + "description": "Resource Exhausted when sending a message to a conversation", + "content": + { + "application/json": + { + "schema": + { + "type": "object", + "properties": + { + "status": + { + "description": "The status of the response", + "enum": + [ + "error", + "success" + ], + "type": "string", + "example": "error" + }, + "url": + { + "description": "The URL of the request", + "type": "string", + "example": "https://app.customgpt.ai/api/v1/projects/1" + }, + "data": + { + "type": "object", + "properties": + { + "code": + { + "description": "The error status code", + "enum": + [ + 400, + 401, + 403, + 404, + 500, + 503 + ], + "type": "integer", + "example": 429 + }, + "message": + { + "description": "The error message", + "type": "string", + "example": "You have exhausted your current query credits. Please contact hello@customgpt.ai for further assistance." + } + } + } + } + } + } + } + }, + "SyncProjectSourceResponse": + { + "description": "Project source sync started.", + "content": + { + "application/json": + { + "schema": + { + "type": "object", + "properties": + { + "status": + { + "description": "The status of the response", + "enum": + [ + "error", + "success" + ], + "type": "string", + "example": "success" + }, + "data": + { + "type": "object", + "properties": + { + "id": + { + "description": "The project source ID", + "type": "integer", + "example": 1 + }, + "created_at": + { + "description": "The project source creation date", + "format": "date-time", + "type": "string", + "example": "2021-01-01 00:00:00" + }, + "updated_at": + { + "description": "The project source update date", + "format": "date-time", + "type": "string", + "example": "2021-01-01 00:00:00" + }, + "type": + { + "description": "The project source type", + "enum": + [ + "sitemap", + "upload" + ], + "type": "string", + "example": "sitemap" + }, + "settings": + { + "description": "The project source settings", + "type": "object", + "properties": + { + "executive_js": + { + "description": "Whether the project source should execute JavaScript", + "default": true, + "type": "boolean", + "example": true + }, + "data_refresh_frequency": + { + "description": "The project source data refresh frequency", + "enum": + [ + "never", + "daily", + "weekly", + "monthly", + "advanced" + ], + "default": "never", + "type": "string", + "example": "never" + }, + "create_new_pages": + { + "description": "Add new pages to project automatically during refresh project source", + "default": true, + "type": "boolean", + "example": true + }, + "remove_unexist_pages": + { + "description": "Remove pages from project automatically during refresh project source", + "default": true, + "type": "boolean", + "example": false + }, + "refresh_existing_pages": + { + "description": "Refresh existing page during refresh project source", + "enum": + [ + "never", + "always", + "if_updated" + ], + "default": "never", + "type": "string", + "example": "never" + }, + "sitemap_path": + { + "description": "The project source sitemap path", + "type": "string", + "example": "https://example.com/sitemap.xml" + } + } + }, + "pages": + { + "description": "The project source pages", + "type": "array", + "items": + { + "type": "object", + "properties": + { + "id": + { + "description": "Page ID", + "type": "integer", + "example": 1 + }, + "page_url": + { + "description": "URL of the page or file", + "type": "string", + "example": "https://example.com" + }, + "page_url_hash": + { + "description": "Hash of the URL of the page or file", + "format": "md5", + "type": "string", + "example": "d41d8cd98f00b204e9800998ecf8427e" + }, + "project_id": + { + "description": "Project ID", + "type": "integer", + "example": 1 + }, + "s3_path": + { + "description": "This is the path where the page is stored in S3.\\nNote: This is omitted in the response if the page is not a file", + "type": "string", + "nullable": true, + "example": "project-1/page-1/file.pdf" + }, + "crawl_status": + { + "description": "Crawl status of the page", + "enum": + [ + "ok", + "queued", + "failed", + "n/a", + "limited" + ], + "default": "queued", + "type": "string", + "example": "queued" + }, + "index_status": + { + "description": "Index status of the page", + "enum": + [ + "ok", + "queued", + "failed", + "n/a", + "limited" + ], + "default": "queued", + "type": "string", + "example": "queued" + }, + "is_file": + { + "description": "Whether the page is a file or not", + "default": false, + "type": "boolean", + "example": true + }, + "is_refreshable": + { + "description": "Whether the page can be refreshed or not", + "default": false, + "type": "boolean", + "example": true + }, + "is_file_kept": + { + "description": "Whether the file is kept after processing or not.\\nNote: This is omitted in the response if the page is not a file", + "default": true, + "type": "boolean", + "example": true + }, + "filename": + { + "description": "Filename of the page.\\nNote: This is omitted in the response if the page is not a file", + "type": "string", + "nullable": true, + "example": "file.pdf" + }, + "filesize": + { + "description": "Filesize of the page.\\nNote: This is omitted in the response if the page is not a file", + "type": "integer", + "nullable": true, + "example": 100 + }, + "created_at": + { + "description": "Date and time when the page was created", + "format": "date-time", + "type": "string", + "example": "2021-01-01 00:00:00" + }, + "updated_at": + { + "description": "Date and time when the page was updated", + "format": "date-time", + "type": "string", + "example": "2021-01-01 00:00:00" + } + } + }, + "nullable": true + } + } + } + } + } + } + } + }, + "ApiTokenValidationErrorResponse": + { + "description": "API Token is either missing or invalid", + "content": + { + "application/json": + { + "schema": + { + "type": "object", + "properties": + { + "status": + { + "description": "The status of the response", + "enum": + [ + "error", + "success" + ], + "type": "string", + "example": "error" + }, + "url": + { + "description": "The URL of the request", + "type": "string", + "example": "https://app.customgpt.ai/api/v1/projects/1" + }, + "data": + { + "type": "object", + "properties": + { + "code": + { + "description": "The error status code", + "enum": + [ + 400, + 401, + 403, + 404, + 500, + 503 + ], + "type": "integer", + "example": 401 + }, + "message": + { + "type": "string", + "example": "API Token is either missing or invalid" + } + } + } + } + } + } + } + }, + "CreateProjectPluginResponse": + { + "description": "Project plugin have been created", + "content": + { + "application/json": + { + "schema": + { + "type": "object", + "properties": + { + "status": + { + "description": "The status of the response", + "enum": + [ + "error", + "success" + ], + "type": "string", + "example": "success" + }, + "data": + { + "type": "object", + "properties": + { + "model_name": + { + "description": "Model Name", + "type": "string", + "example": "IndoorPlants" + }, + "human_name": + { + "description": "Name For Human", + "type": "string", + "example": "The Indoor Plants Channel" + }, + "keywords": + { + "description": "Keywords For Model", + "type": "string", + "example": "Indoor plants, Gardening, Trusted information." + }, + "description": + { + "description": "Description For Human", + "type": "string", + "example": "Trusted information about indoor plants and gardening." + }, + "logo": + { + "description": "Project plugin logo", + "type": "string", + "example": "https://app.customgpt.ai/logo.svg" + }, + "is_active": + { + "description": "Whether the project plugin is active or not", + "default": false, + "type": "boolean", + "example": true + } + } + } + } + } + } + } + }, + "ProjectStatsResponse": + { + "description": "Project stats", + "content": + { + "application/json": + { + "schema": + { + "type": "object", + "properties": + { + "status": + { + "description": "The status of the response", + "enum": + [ + "error", + "success" + ], + "type": "string", + "example": "success" + }, + "data": + { + "type": "object", + "properties": + { + "pages_found": + { + "description": "Number of pages found for the project", + "type": "integer", + "example": 100 + }, + "pages_crawled": + { + "description": "Number of pages crawled for the project", + "type": "integer", + "example": 100 + }, + "pages_indexed": + { + "description": "Number of pages indexed for the project", + "type": "integer", + "example": 100 + }, + "crawl_credits_used": + { + "description": "Number of crawl credits used for the project", + "type": "integer", + "example": 100 + }, + "query_credits_used": + { + "description": "Number of query credits used for the project", + "type": "integer", + "example": 100 + }, + "total_queries": + { + "description": "Number of queries used for the project", + "type": "integer", + "example": 100 + }, + "total_words_indexed": + { + "description": "Number of index credits used for the project", + "type": "integer", + "example": 100 + }, + "total_storage_credits_used": + { + "description": "Number of words stored for the project", + "type": "integer", + "example": 100 + } + } + } + } + } + } + } + }, + "CreateConversationResponse": + { + "description": "Create a new conversation", + "content": + { + "application/json": + { + "schema": + { + "type": "object", + "properties": + { + "status": + { + "description": "The status of the response", + "enum": + [ + "error", + "success" + ], + "type": "string", + "example": "success" + }, + "data": + { + "type": "object", + "properties": + { + "created_at": + { + "description": "When was this conversation created?", + "format": "date-time", + "type": "string", + "example": "2023-04-30 16:43:53" + }, + "updated_at": + { + "description": "When was this conversation updated?", + "format": "date-time", + "type": "string", + "example": "2023-04-30 16:43:53" + }, + "id": + { + "description": "Conversation ID", + "type": "integer", + "example": 1 + }, + "name": + { + "description": "Conversation name", + "type": "string", + "example": "Conversation 1" + }, + "project_id": + { + "description": "Project ID for this conversation", + "type": "string", + "example": 1 + }, + "created_by": + { + "description": "User ID for the user who created this conversation", + "type": "string", + "example": 1 + }, + "session_id": + { + "description": "Session ID for this conversation", + "format": "uuid", + "type": "string", + "example": "f1b9aaf0-5e4e-11eb-ae93-0242ac130002" + } + } + } + } + } + } + } + } + }, + "securitySchemes": + { + "BearerToken": + { + "type": "http", + "scheme": "bearer", + "bearerFormat": "JWT" + } + } + }, + "tags": + [ + { + "name": "Projects", + "description": "API Endpoints for Projects" + }, + { + "name": "Pages", + "description": "API Endpoints for Pages" + }, + { + "name": "Users", + "description": "API Endpoints for Users" + }, + { + "name": "Project Settings", + "description": "API Endpoints for Project Settings" + }, + { + "name": "Project Plugins", + "description": "API Endpoints for Project Plugins" + }, + { + "name": "Conversations", + "description": "API Endpoints for Conversations" + }, + { + "name": "Citations", + "description": "API Endpoints for Citations" + } + ], + "x-readme": + { + "explorer-enabled": true, + "proxy-enabled": true, + "samples-enabled": true + } +} \ No newline at end of file diff --git a/customgpt-client/customgpt_client/__init__.py b/customgpt-client/customgpt_client/__init__.py index 66a0fcc..1df3422 100644 --- a/customgpt-client/customgpt_client/__init__.py +++ b/customgpt-client/customgpt_client/__init__.py @@ -1,4 +1,5 @@ """ A client library for accessing customgpt """ + from .client import CustomGPT __all__ = ("CustomGPT",) diff --git a/customgpt-client/customgpt_client/api/citations/get_citation.py b/customgpt-client/customgpt_client/api/citations/get_citation.py index 07a57d5..eabe4a1 100644 --- a/customgpt-client/customgpt_client/api/citations/get_citation.py +++ b/customgpt-client/customgpt_client/api/citations/get_citation.py @@ -87,8 +87,8 @@ def sync_detailed( People/customgpt-cookbook/blob/main/examples/SDK_Get_Citation_Details.ipynb). Args: - project_id (int): - citation_id (int): + project_id (int): Example: 1. + citation_id (int): Example: 1. Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. @@ -126,8 +126,8 @@ def sync( People/customgpt-cookbook/blob/main/examples/SDK_Get_Citation_Details.ipynb). Args: - project_id (int): - citation_id (int): + project_id (int): Example: 1. + citation_id (int): Example: 1. Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. @@ -150,6 +150,7 @@ async def asyncio_detailed( *, client: {}, ) -> Response[Union[GetCitationResponse200, GetCitationResponse400, GetCitationResponse401, GetCitationResponse404]]: + kwargs = _get_kwargs( project_id=project_id, citation_id=citation_id, @@ -178,8 +179,8 @@ async def asyncio( People/customgpt-cookbook/blob/main/examples/SDK_Get_Citation_Details.ipynb). Args: - project_id (int): - citation_id (int): + project_id (int): Example: 1. + citation_id (int): Example: 1. Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. diff --git a/customgpt-client/customgpt_client/api/conversations/create_conversation.py b/customgpt-client/customgpt_client/api/conversations/create_conversation.py index feff345..2bae199 100644 --- a/customgpt-client/customgpt_client/api/conversations/create_conversation.py +++ b/customgpt-client/customgpt_client/api/conversations/create_conversation.py @@ -38,9 +38,7 @@ def _get_kwargs( } -def _parse_response( - *, client: {}, response: None -) -> Optional[ +def _parse_response(*, client: {}, response: None) -> Optional[ Union[ CreateConversationResponse201, CreateConversationResponse400, @@ -75,9 +73,7 @@ def _parse_response( return None -def _build_response( - *, client: {}, response: None, content: Optional[bytes] = None -) -> Response[ +def _build_response(*, client: {}, response: None, content: Optional[bytes] = None) -> Response[ Union[ CreateConversationResponse201, CreateConversationResponse400, @@ -197,6 +193,7 @@ async def asyncio_detailed( CreateConversationResponse500, ] ]: + kwargs = _get_kwargs( project_id=project_id, client=client, diff --git a/customgpt-client/customgpt_client/api/conversations/delete_conversation.py b/customgpt-client/customgpt_client/api/conversations/delete_conversation.py index 5133935..a4c80fa 100644 --- a/customgpt-client/customgpt_client/api/conversations/delete_conversation.py +++ b/customgpt-client/customgpt_client/api/conversations/delete_conversation.py @@ -36,9 +36,7 @@ def _get_kwargs( } -def _parse_response( - *, client: {}, response: None -) -> Optional[ +def _parse_response(*, client: {}, response: None) -> Optional[ Union[ DeleteConversationResponse200, DeleteConversationResponse400, @@ -73,9 +71,7 @@ def _parse_response( return None -def _build_response( - *, client: {}, response: None, content: Optional[bytes] = None -) -> Response[ +def _build_response(*, client: {}, response: None, content: Optional[bytes] = None) -> Response[ Union[ DeleteConversationResponse200, DeleteConversationResponse400, @@ -191,6 +187,7 @@ async def asyncio_detailed( DeleteConversationResponse500, ] ]: + kwargs = _get_kwargs( project_id=project_id, session_id=session_id, diff --git a/customgpt-client/customgpt_client/api/conversations/get_conversations.py b/customgpt-client/customgpt_client/api/conversations/get_conversations.py index 822db91..e0cfacd 100644 --- a/customgpt-client/customgpt_client/api/conversations/get_conversations.py +++ b/customgpt-client/customgpt_client/api/conversations/get_conversations.py @@ -6,6 +6,7 @@ from ... import errors from ...models.get_conversations_order import GetConversationsOrder +from ...models.get_conversations_order_by import GetConversationsOrderBy from ...models.get_conversations_response_200 import GetConversationsResponse200 from ...models.get_conversations_response_400 import GetConversationsResponse400 from ...models.get_conversations_response_401 import GetConversationsResponse401 @@ -21,7 +22,9 @@ def _get_kwargs( client: {}, page: Union[Unset, None, int] = 1, order: Union[Unset, None, GetConversationsOrder] = GetConversationsOrder.DESC, + order_by: Union[Unset, None, GetConversationsOrderBy] = GetConversationsOrderBy.ID, user_filter: Union[Unset, None, GetConversationsUserFilter] = GetConversationsUserFilter.ALL, + name: Union[Unset, None, str] = UNSET, ) -> Dict[str, Any]: url = "{}/api/v1/projects/{projectId}/conversations".format(client.base_url, projectId=project_id) @@ -37,12 +40,20 @@ def _get_kwargs( params["order"] = json_order + json_order_by: Union[Unset, None, str] = UNSET + if not isinstance(order_by, Unset): + json_order_by = order_by if order_by else None + + params["orderBy"] = json_order_by + json_user_filter: Union[Unset, None, str] = UNSET if not isinstance(user_filter, Unset): json_user_filter = user_filter if user_filter else None params["userFilter"] = json_user_filter + params["name"] = name + params = {k: v for k, v in params.items() if v is not UNSET and v is not None} return { @@ -56,9 +67,7 @@ def _get_kwargs( } -def _parse_response( - *, client: {}, response: None -) -> Optional[ +def _parse_response(*, client: {}, response: None) -> Optional[ Union[ GetConversationsResponse200, GetConversationsResponse400, @@ -93,9 +102,7 @@ def _parse_response( return None -def _build_response( - *, client: {}, response: None, content: Optional[bytes] = None -) -> Response[ +def _build_response(*, client: {}, response: None, content: Optional[bytes] = None) -> Response[ Union[ GetConversationsResponse200, GetConversationsResponse400, @@ -119,7 +126,9 @@ def sync_detailed( client: {}, page: Union[Unset, None, int] = 1, order: Union[Unset, None, GetConversationsOrder] = GetConversationsOrder.DESC, + order_by: Union[Unset, None, GetConversationsOrderBy] = GetConversationsOrderBy.ID, user_filter: Union[Unset, None, GetConversationsUserFilter] = GetConversationsUserFilter.ALL, + name: Union[Unset, None, str] = UNSET, ): """List all conversations for a project. @@ -131,8 +140,11 @@ def sync_detailed( page (Union[Unset, None, int]): Default: 1. order (Union[Unset, None, GetConversationsOrder]): Default: GetConversationsOrder.DESC. Example: desc. + order_by (Union[Unset, None, GetConversationsOrderBy]): Default: + GetConversationsOrderBy.ID. Example: id. user_filter (Union[Unset, None, GetConversationsUserFilter]): Default: GetConversationsUserFilter.ALL. Example: all. + name (Union[Unset, None, str]): Example: Ask me anything. Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. @@ -147,7 +159,9 @@ def sync_detailed( client=client, page=page, order=order, + order_by=order_by, user_filter=user_filter, + name=name, ) response = requests.request( @@ -163,7 +177,9 @@ def sync( client: {}, page: Union[Unset, None, int] = 1, order: Union[Unset, None, GetConversationsOrder] = GetConversationsOrder.DESC, + order_by: Union[Unset, None, GetConversationsOrderBy] = GetConversationsOrderBy.ID, user_filter: Union[Unset, None, GetConversationsUserFilter] = GetConversationsUserFilter.ALL, + name: Union[Unset, None, str] = UNSET, ) -> Optional[ Union[ GetConversationsResponse200, @@ -183,8 +199,11 @@ def sync( page (Union[Unset, None, int]): Default: 1. order (Union[Unset, None, GetConversationsOrder]): Default: GetConversationsOrder.DESC. Example: desc. + order_by (Union[Unset, None, GetConversationsOrderBy]): Default: + GetConversationsOrderBy.ID. Example: id. user_filter (Union[Unset, None, GetConversationsUserFilter]): Default: GetConversationsUserFilter.ALL. Example: all. + name (Union[Unset, None, str]): Example: Ask me anything. Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. @@ -199,7 +218,9 @@ def sync( client=client, page=page, order=order, + order_by=order_by, user_filter=user_filter, + name=name, ).parsed @@ -209,7 +230,9 @@ async def asyncio_detailed( client: {}, page: Union[Unset, None, int] = 1, order: Union[Unset, None, GetConversationsOrder] = GetConversationsOrder.DESC, + order_by: Union[Unset, None, GetConversationsOrderBy] = GetConversationsOrderBy.ID, user_filter: Union[Unset, None, GetConversationsUserFilter] = GetConversationsUserFilter.ALL, + name: Union[Unset, None, str] = UNSET, ) -> Response[ Union[ GetConversationsResponse200, @@ -219,12 +242,15 @@ async def asyncio_detailed( GetConversationsResponse500, ] ]: + kwargs = _get_kwargs( project_id=project_id, client=client, page=page, order=order, + order_by=order_by, user_filter=user_filter, + name=name, ) response = requests.request( @@ -240,7 +266,9 @@ async def asyncio( client: {}, page: Union[Unset, None, int] = 1, order: Union[Unset, None, GetConversationsOrder] = GetConversationsOrder.DESC, + order_by: Union[Unset, None, GetConversationsOrderBy] = GetConversationsOrderBy.ID, user_filter: Union[Unset, None, GetConversationsUserFilter] = GetConversationsUserFilter.ALL, + name: Union[Unset, None, str] = UNSET, ) -> Optional[ Union[ GetConversationsResponse200, @@ -260,8 +288,11 @@ async def asyncio( page (Union[Unset, None, int]): Default: 1. order (Union[Unset, None, GetConversationsOrder]): Default: GetConversationsOrder.DESC. Example: desc. + order_by (Union[Unset, None, GetConversationsOrderBy]): Default: + GetConversationsOrderBy.ID. Example: id. user_filter (Union[Unset, None, GetConversationsUserFilter]): Default: GetConversationsUserFilter.ALL. Example: all. + name (Union[Unset, None, str]): Example: Ask me anything. Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. @@ -277,6 +308,8 @@ async def asyncio( client=client, page=page, order=order, + order_by=order_by, user_filter=user_filter, + name=name, ) ).parsed diff --git a/customgpt-client/customgpt_client/api/conversations/messages_conversation.py b/customgpt-client/customgpt_client/api/conversations/messages_conversation.py index 7a40e2f..c70a4b1 100644 --- a/customgpt-client/customgpt_client/api/conversations/messages_conversation.py +++ b/customgpt-client/customgpt_client/api/conversations/messages_conversation.py @@ -51,9 +51,7 @@ def _get_kwargs( } -def _parse_response( - *, client: {}, response: None -) -> Optional[ +def _parse_response(*, client: {}, response: None) -> Optional[ Union[ MessagesConversationResponse200, MessagesConversationResponse400, @@ -88,9 +86,7 @@ def _parse_response( return None -def _build_response( - *, client: {}, response: None, content: Optional[bytes] = None -) -> Response[ +def _build_response(*, client: {}, response: None, content: Optional[bytes] = None) -> Response[ Union[ MessagesConversationResponse200, MessagesConversationResponse400, @@ -226,6 +222,7 @@ async def asyncio_detailed( MessagesConversationResponse500, ] ]: + kwargs = _get_kwargs( project_id=project_id, session_id=session_id, diff --git a/customgpt-client/customgpt_client/api/conversations/send_message.py b/customgpt-client/customgpt_client/api/conversations/send_message.py index fc1f947..41ffe15 100644 --- a/customgpt-client/customgpt_client/api/conversations/send_message.py +++ b/customgpt-client/customgpt_client/api/conversations/send_message.py @@ -6,11 +6,13 @@ from sseclient import SSEClient from ... import errors +from ...models.send_message_cache_control import SendMessageCacheControl from ...models.send_message_json_body import SendMessageJsonBody from ...models.send_message_response_200 import SendMessageResponse200 from ...models.send_message_response_400 import SendMessageResponse400 from ...models.send_message_response_401 import SendMessageResponse401 from ...models.send_message_response_404 import SendMessageResponse404 +from ...models.send_message_response_429 import SendMessageResponse429 from ...models.send_message_response_500 import SendMessageResponse500 from ...types import UNSET, Response, Unset @@ -23,6 +25,8 @@ def _get_kwargs( json_body: SendMessageJsonBody, stream: Union[Unset, None, bool] = False, lang: Union[Unset, None, str] = "en", + external_id: Union[Unset, None, str] = UNSET, + cache_control: Union[Unset, None, SendMessageCacheControl] = UNSET, ) -> Dict[str, Any]: url = "{}/api/v1/projects/{projectId}/conversations/{sessionId}/messages".format( client.base_url, projectId=project_id, sessionId=session_id @@ -30,12 +34,18 @@ def _get_kwargs( headers: Dict[str, str] = client.get_headers() cookies: Dict[str, Any] = client.get_cookies() + if not isinstance(cache_control, Unset) and cache_control is not None: + headers["Cache-Control"] = str(cache_control) params: Dict[str, Any] = {} + True if stream else False + params["stream"] = 1 if stream else 0 params["lang"] = lang + params["external_id"] = external_id + params = {k: v for k, v in params.items() if v is not UNSET and v is not None} json_json_body = json_body.to_dict() @@ -56,14 +66,13 @@ def _get_kwargs( } -def _parse_response( - *, client: {}, response: None -) -> Optional[ +def _parse_response(*, client: {}, response: None) -> Optional[ Union[ SendMessageResponse200, SendMessageResponse400, SendMessageResponse401, SendMessageResponse404, + SendMessageResponse429, SendMessageResponse500, ] ]: @@ -83,6 +92,10 @@ def _parse_response( response_404 = SendMessageResponse404.from_dict(json.loads(response.text)) return response_404 + if response.status_code == HTTPStatus.TOO_MANY_REQUESTS: + response_429 = SendMessageResponse429.from_dict(json.loads(response.text)) + + return response_429 if response.status_code == HTTPStatus.INTERNAL_SERVER_ERROR: response_500 = SendMessageResponse500.from_dict(json.loads(response.text)) @@ -93,14 +106,13 @@ def _parse_response( return None -def _build_response( - *, client: {}, response: None, content: Optional[bytes] = None -) -> Response[ +def _build_response(*, client: {}, response: None, content: Optional[bytes] = None) -> Response[ Union[ SendMessageResponse200, SendMessageResponse400, SendMessageResponse401, SendMessageResponse404, + SendMessageResponse429, SendMessageResponse500, ] ]: @@ -121,6 +133,8 @@ def sync_detailed( json_body: SendMessageJsonBody, stream: Union[Unset, None, bool] = False, lang: Union[Unset, None, str] = "en", + external_id: Union[Unset, None, str] = UNSET, + cache_control: Union[Unset, None, SendMessageCacheControl] = UNSET, ): """Send a message to a conversation. @@ -141,6 +155,8 @@ def sync_detailed( session_id (str): Example: 1. stream (Union[Unset, None, bool]): lang (Union[Unset, None, str]): Default: 'en'. + external_id (Union[Unset, None, str]): + cache_control (Union[Unset, None, SendMessageCacheControl]): json_body (SendMessageJsonBody): Raises: @@ -148,7 +164,7 @@ def sync_detailed( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Response[Union[SendMessageResponse200, SendMessageResponse400, SendMessageResponse401, SendMessageResponse404, SendMessageResponse500]] + Response[Union[SendMessageResponse200, SendMessageResponse400, SendMessageResponse401, SendMessageResponse404, SendMessageResponse429, SendMessageResponse500]] """ kwargs = _get_kwargs( @@ -158,6 +174,8 @@ def sync_detailed( json_body=json_body, stream=stream, lang=lang, + external_id=external_id, + cache_control=cache_control, ) response = requests.request( @@ -178,12 +196,15 @@ def sync( json_body: SendMessageJsonBody, stream: Union[Unset, None, bool] = False, lang: Union[Unset, None, str] = "en", + external_id: Union[Unset, None, str] = UNSET, + cache_control: Union[Unset, None, SendMessageCacheControl] = UNSET, ) -> Optional[ Union[ SendMessageResponse200, SendMessageResponse400, SendMessageResponse401, SendMessageResponse404, + SendMessageResponse429, SendMessageResponse500, ] ]: @@ -206,6 +227,8 @@ def sync( session_id (str): Example: 1. stream (Union[Unset, None, bool]): lang (Union[Unset, None, str]): Default: 'en'. + external_id (Union[Unset, None, str]): + cache_control (Union[Unset, None, SendMessageCacheControl]): json_body (SendMessageJsonBody): Raises: @@ -213,7 +236,7 @@ def sync( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Union[SendMessageResponse200, SendMessageResponse400, SendMessageResponse401, SendMessageResponse404, SendMessageResponse500] + Union[SendMessageResponse200, SendMessageResponse400, SendMessageResponse401, SendMessageResponse404, SendMessageResponse429, SendMessageResponse500] """ return sync_detailed( @@ -223,6 +246,8 @@ def sync( json_body=json_body, stream=stream, lang=lang, + external_id=external_id, + cache_control=cache_control, ).parsed @@ -234,12 +259,15 @@ async def asyncio_detailed( json_body: SendMessageJsonBody, stream: Union[Unset, None, bool] = False, lang: Union[Unset, None, str] = "en", + external_id: Union[Unset, None, str] = UNSET, + cache_control: Union[Unset, None, SendMessageCacheControl] = UNSET, ) -> Response[ Union[ SendMessageResponse200, SendMessageResponse400, SendMessageResponse401, SendMessageResponse404, + SendMessageResponse429, SendMessageResponse500, ] ]: @@ -250,6 +278,8 @@ async def asyncio_detailed( json_body=json_body, stream=stream, lang=lang, + external_id=external_id, + cache_control=cache_control, ) response = requests.request( @@ -270,12 +300,15 @@ async def asyncio( json_body: SendMessageJsonBody, stream: Union[Unset, None, bool] = False, lang: Union[Unset, None, str] = "en", + external_id: Union[Unset, None, str] = UNSET, + cache_control: Union[Unset, None, SendMessageCacheControl] = UNSET, ) -> Optional[ Union[ SendMessageResponse200, SendMessageResponse400, SendMessageResponse401, SendMessageResponse404, + SendMessageResponse429, SendMessageResponse500, ] ]: @@ -298,6 +331,8 @@ async def asyncio( session_id (str): Example: 1. stream (Union[Unset, None, bool]): lang (Union[Unset, None, str]): Default: 'en'. + external_id (Union[Unset, None, str]): + cache_control (Union[Unset, None, SendMessageCacheControl]): json_body (SendMessageJsonBody): Raises: @@ -305,7 +340,7 @@ async def asyncio( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Union[SendMessageResponse200, SendMessageResponse400, SendMessageResponse401, SendMessageResponse404, SendMessageResponse500] + Union[SendMessageResponse200, SendMessageResponse400, SendMessageResponse401, SendMessageResponse404, SendMessageResponse429, SendMessageResponse500] """ return ( @@ -316,5 +351,7 @@ async def asyncio( json_body=json_body, stream=stream, lang=lang, + external_id=external_id, + cache_control=cache_control, ) ).parsed diff --git a/customgpt-client/customgpt_client/api/conversations/update_conversation.py b/customgpt-client/customgpt_client/api/conversations/update_conversation.py index b12d0b9..c8c0805 100644 --- a/customgpt-client/customgpt_client/api/conversations/update_conversation.py +++ b/customgpt-client/customgpt_client/api/conversations/update_conversation.py @@ -41,9 +41,7 @@ def _get_kwargs( } -def _parse_response( - *, client: {}, response: None -) -> Optional[ +def _parse_response(*, client: {}, response: None) -> Optional[ Union[ UpdateConversationResponse200, UpdateConversationResponse400, @@ -78,9 +76,7 @@ def _parse_response( return None -def _build_response( - *, client: {}, response: None, content: Optional[bytes] = None -) -> Response[ +def _build_response(*, client: {}, response: None, content: Optional[bytes] = None) -> Response[ Union[ UpdateConversationResponse200, UpdateConversationResponse400, @@ -201,6 +197,7 @@ async def asyncio_detailed( UpdateConversationResponse500, ] ]: + kwargs = _get_kwargs( project_id=project_id, session_id=session_id, diff --git a/customgpt-client/customgpt_client/api/limits/__init__.py b/customgpt-client/customgpt_client/api/limits/__init__.py new file mode 100644 index 0000000..e69de29 diff --git a/customgpt-client/customgpt_client/api/limits/get_api_v1_limits_usage.py b/customgpt-client/customgpt_client/api/limits/get_api_v1_limits_usage.py new file mode 100644 index 0000000..f5b042e --- /dev/null +++ b/customgpt-client/customgpt_client/api/limits/get_api_v1_limits_usage.py @@ -0,0 +1,144 @@ +import json +from http import HTTPStatus +from typing import Any, Dict, Optional, Union + +import requests + +from ... import errors +from ...models.get_api_v1_limits_usage_response_200 import GetApiV1LimitsUsageResponse200 +from ...models.get_api_v1_limits_usage_response_401 import GetApiV1LimitsUsageResponse401 +from ...models.get_api_v1_limits_usage_response_500 import GetApiV1LimitsUsageResponse500 +from ...types import Response + + +def _get_kwargs( + *, + client: {}, +) -> Dict[str, Any]: + url = "{}/api/v1/limits/usage".format(client.base_url) + + headers: Dict[str, str] = client.get_headers() + cookies: Dict[str, Any] = client.get_cookies() + + return { + "method": "get", + "url": url, + "headers": headers, + "cookies": cookies, + "timeout": client.get_timeout(), + "allow_redirects": client.follow_redirects, + } + + +def _parse_response( + *, client: {}, response: None +) -> Optional[Union[GetApiV1LimitsUsageResponse200, GetApiV1LimitsUsageResponse401, GetApiV1LimitsUsageResponse500]]: + if response.status_code == HTTPStatus.OK: + response_200 = GetApiV1LimitsUsageResponse200.from_dict(json.loads(response.text)) + + return response_200 + if response.status_code == HTTPStatus.UNAUTHORIZED: + response_401 = GetApiV1LimitsUsageResponse401.from_dict(json.loads(response.text)) + + return response_401 + if response.status_code == HTTPStatus.INTERNAL_SERVER_ERROR: + response_500 = GetApiV1LimitsUsageResponse500.from_dict(json.loads(response.text)) + + return response_500 + if client.raise_on_unexpected_status: + raise errors.UnexpectedStatus(response.status_code, response.content) + else: + return None + + +def _build_response( + *, client: {}, response: None, content: Optional[bytes] = None +) -> Response[Union[GetApiV1LimitsUsageResponse200, GetApiV1LimitsUsageResponse401, GetApiV1LimitsUsageResponse500]]: + parse = _parse_response(client=client, response=response) + return Response( + status_code=HTTPStatus(response.status_code), + content=response.content if content is None else content, + headers=response.headers, + parsed=parse, + ) + + +def sync_detailed( + *, + client: {}, +): + """Get user projects, words and queries limit. + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[Union[GetApiV1LimitsUsageResponse200, GetApiV1LimitsUsageResponse401, GetApiV1LimitsUsageResponse500]] + """ + + kwargs = _get_kwargs( + client=client, + ) + + response = requests.request( + **kwargs, + ) + + return _build_response(client=client, response=response) + + +def sync( + *, + client: {}, +) -> Optional[Union[GetApiV1LimitsUsageResponse200, GetApiV1LimitsUsageResponse401, GetApiV1LimitsUsageResponse500]]: + """Get user projects, words and queries limit. + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Union[GetApiV1LimitsUsageResponse200, GetApiV1LimitsUsageResponse401, GetApiV1LimitsUsageResponse500] + """ + + return sync_detailed( + client=client, + ).parsed + + +async def asyncio_detailed( + *, + client: {}, +) -> Response[Union[GetApiV1LimitsUsageResponse200, GetApiV1LimitsUsageResponse401, GetApiV1LimitsUsageResponse500]]: + + kwargs = _get_kwargs( + client=client, + ) + + response = requests.request( + **kwargs, + ) + + return _build_response(client=client, response=response) + + +async def asyncio( + *, + client: {}, +) -> Optional[Union[GetApiV1LimitsUsageResponse200, GetApiV1LimitsUsageResponse401, GetApiV1LimitsUsageResponse500]]: + """Get user projects, words and queries limit. + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Union[GetApiV1LimitsUsageResponse200, GetApiV1LimitsUsageResponse401, GetApiV1LimitsUsageResponse500] + """ + + return ( + await asyncio_detailed( + client=client, + ) + ).parsed diff --git a/customgpt-client/customgpt_client/api/page_metadata/get_page_metadata.py b/customgpt-client/customgpt_client/api/page_metadata/get_metadata.py similarity index 69% rename from customgpt-client/customgpt_client/api/page_metadata/get_page_metadata.py rename to customgpt-client/customgpt_client/api/page_metadata/get_metadata.py index 5341dc8..453885a 100644 --- a/customgpt-client/customgpt_client/api/page_metadata/get_page_metadata.py +++ b/customgpt-client/customgpt_client/api/page_metadata/get_metadata.py @@ -5,10 +5,10 @@ import requests from ... import errors -from ...models.get_page_metadata_response_200 import GetPageMetadataResponse200 -from ...models.get_page_metadata_response_400 import GetPageMetadataResponse400 -from ...models.get_page_metadata_response_401 import GetPageMetadataResponse401 -from ...models.get_page_metadata_response_404 import GetPageMetadataResponse404 +from ...models.get_metadata_response_200 import GetMetadataResponse200 +from ...models.get_metadata_response_400 import GetMetadataResponse400 +from ...models.get_metadata_response_401 import GetMetadataResponse401 +from ...models.get_metadata_response_404 import GetMetadataResponse404 from ...types import Response @@ -37,25 +37,21 @@ def _get_kwargs( def _parse_response( *, client: {}, response: None -) -> Optional[ - Union[ - GetPageMetadataResponse200, GetPageMetadataResponse400, GetPageMetadataResponse401, GetPageMetadataResponse404 - ] -]: +) -> Optional[Union[GetMetadataResponse200, GetMetadataResponse400, GetMetadataResponse401, GetMetadataResponse404]]: if response.status_code == HTTPStatus.OK: - response_200 = GetPageMetadataResponse200.from_dict(json.loads(response.text)) + response_200 = GetMetadataResponse200.from_dict(json.loads(response.text)) return response_200 if response.status_code == HTTPStatus.BAD_REQUEST: - response_400 = GetPageMetadataResponse400.from_dict(json.loads(response.text)) + response_400 = GetMetadataResponse400.from_dict(json.loads(response.text)) return response_400 if response.status_code == HTTPStatus.UNAUTHORIZED: - response_401 = GetPageMetadataResponse401.from_dict(json.loads(response.text)) + response_401 = GetMetadataResponse401.from_dict(json.loads(response.text)) return response_401 if response.status_code == HTTPStatus.NOT_FOUND: - response_404 = GetPageMetadataResponse404.from_dict(json.loads(response.text)) + response_404 = GetMetadataResponse404.from_dict(json.loads(response.text)) return response_404 if client.raise_on_unexpected_status: @@ -66,11 +62,7 @@ def _parse_response( def _build_response( *, client: {}, response: None, content: Optional[bytes] = None -) -> Response[ - Union[ - GetPageMetadataResponse200, GetPageMetadataResponse400, GetPageMetadataResponse401, GetPageMetadataResponse404 - ] -]: +) -> Response[Union[GetMetadataResponse200, GetMetadataResponse400, GetMetadataResponse401, GetMetadataResponse404]]: parse = _parse_response(client=client, response=response) return Response( status_code=HTTPStatus(response.status_code), @@ -100,7 +92,7 @@ def sync_detailed( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Response[Union[GetPageMetadataResponse200, GetPageMetadataResponse400, GetPageMetadataResponse401, GetPageMetadataResponse404]] + Response[Union[GetMetadataResponse200, GetMetadataResponse400, GetMetadataResponse401, GetMetadataResponse404]] """ kwargs = _get_kwargs( @@ -121,11 +113,7 @@ def sync( page_id: str, *, client: {}, -) -> Optional[ - Union[ - GetPageMetadataResponse200, GetPageMetadataResponse400, GetPageMetadataResponse401, GetPageMetadataResponse404 - ] -]: +) -> Optional[Union[GetMetadataResponse200, GetMetadataResponse400, GetMetadataResponse401, GetMetadataResponse404]]: """Get the Metadata for a certain page. Retrieve the Metadata for a page based on its unique identifier. This endpoint allows you to fetch @@ -140,7 +128,7 @@ def sync( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Union[GetPageMetadataResponse200, GetPageMetadataResponse400, GetPageMetadataResponse401, GetPageMetadataResponse404] + Union[GetMetadataResponse200, GetMetadataResponse400, GetMetadataResponse401, GetMetadataResponse404] """ return sync_detailed( @@ -155,11 +143,8 @@ async def asyncio_detailed( page_id: str, *, client: {}, -) -> Response[ - Union[ - GetPageMetadataResponse200, GetPageMetadataResponse400, GetPageMetadataResponse401, GetPageMetadataResponse404 - ] -]: +) -> Response[Union[GetMetadataResponse200, GetMetadataResponse400, GetMetadataResponse401, GetMetadataResponse404]]: + kwargs = _get_kwargs( project_id=project_id, page_id=page_id, @@ -178,11 +163,7 @@ async def asyncio( page_id: str, *, client: {}, -) -> Optional[ - Union[ - GetPageMetadataResponse200, GetPageMetadataResponse400, GetPageMetadataResponse401, GetPageMetadataResponse404 - ] -]: +) -> Optional[Union[GetMetadataResponse200, GetMetadataResponse400, GetMetadataResponse401, GetMetadataResponse404]]: """Get the Metadata for a certain page. Retrieve the Metadata for a page based on its unique identifier. This endpoint allows you to fetch @@ -197,7 +178,7 @@ async def asyncio( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Union[GetPageMetadataResponse200, GetPageMetadataResponse400, GetPageMetadataResponse401, GetPageMetadataResponse404] + Union[GetMetadataResponse200, GetMetadataResponse400, GetMetadataResponse401, GetMetadataResponse404] """ return ( diff --git a/customgpt-client/customgpt_client/api/page_metadata/update_page_metadata.py b/customgpt-client/customgpt_client/api/page_metadata/update_metadata.py similarity index 60% rename from customgpt-client/customgpt_client/api/page_metadata/update_page_metadata.py rename to customgpt-client/customgpt_client/api/page_metadata/update_metadata.py index 6150672..eb48b14 100644 --- a/customgpt-client/customgpt_client/api/page_metadata/update_page_metadata.py +++ b/customgpt-client/customgpt_client/api/page_metadata/update_metadata.py @@ -5,12 +5,12 @@ import requests from ... import errors -from ...models.update_page_metadata_json_body import UpdatePageMetadataJsonBody -from ...models.update_page_metadata_response_200 import UpdatePageMetadataResponse200 -from ...models.update_page_metadata_response_400 import UpdatePageMetadataResponse400 -from ...models.update_page_metadata_response_401 import UpdatePageMetadataResponse401 -from ...models.update_page_metadata_response_404 import UpdatePageMetadataResponse404 -from ...models.update_page_metadata_response_500 import UpdatePageMetadataResponse500 +from ...models.update_metadata_json_body import UpdateMetadataJsonBody +from ...models.update_metadata_response_200 import UpdateMetadataResponse200 +from ...models.update_metadata_response_400 import UpdateMetadataResponse400 +from ...models.update_metadata_response_401 import UpdateMetadataResponse401 +from ...models.update_metadata_response_404 import UpdateMetadataResponse404 +from ...models.update_metadata_response_500 import UpdateMetadataResponse500 from ...types import Response @@ -19,7 +19,7 @@ def _get_kwargs( page_id: int, *, client: {}, - json_body: UpdatePageMetadataJsonBody, + json_body: UpdateMetadataJsonBody, ) -> Dict[str, Any]: url = "{}/api/v1/projects/{projectId}/pages/{pageId}/metadata".format( client.base_url, projectId=project_id, pageId=page_id @@ -41,35 +41,33 @@ def _get_kwargs( } -def _parse_response( - *, client: {}, response: None -) -> Optional[ +def _parse_response(*, client: {}, response: None) -> Optional[ Union[ - UpdatePageMetadataResponse200, - UpdatePageMetadataResponse400, - UpdatePageMetadataResponse401, - UpdatePageMetadataResponse404, - UpdatePageMetadataResponse500, + UpdateMetadataResponse200, + UpdateMetadataResponse400, + UpdateMetadataResponse401, + UpdateMetadataResponse404, + UpdateMetadataResponse500, ] ]: if response.status_code == HTTPStatus.OK: - response_200 = UpdatePageMetadataResponse200.from_dict(json.loads(response.text)) + response_200 = UpdateMetadataResponse200.from_dict(json.loads(response.text)) return response_200 if response.status_code == HTTPStatus.BAD_REQUEST: - response_400 = UpdatePageMetadataResponse400.from_dict(json.loads(response.text)) + response_400 = UpdateMetadataResponse400.from_dict(json.loads(response.text)) return response_400 if response.status_code == HTTPStatus.UNAUTHORIZED: - response_401 = UpdatePageMetadataResponse401.from_dict(json.loads(response.text)) + response_401 = UpdateMetadataResponse401.from_dict(json.loads(response.text)) return response_401 if response.status_code == HTTPStatus.NOT_FOUND: - response_404 = UpdatePageMetadataResponse404.from_dict(json.loads(response.text)) + response_404 = UpdateMetadataResponse404.from_dict(json.loads(response.text)) return response_404 if response.status_code == HTTPStatus.INTERNAL_SERVER_ERROR: - response_500 = UpdatePageMetadataResponse500.from_dict(json.loads(response.text)) + response_500 = UpdateMetadataResponse500.from_dict(json.loads(response.text)) return response_500 if client.raise_on_unexpected_status: @@ -78,15 +76,13 @@ def _parse_response( return None -def _build_response( - *, client: {}, response: None, content: Optional[bytes] = None -) -> Response[ +def _build_response(*, client: {}, response: None, content: Optional[bytes] = None) -> Response[ Union[ - UpdatePageMetadataResponse200, - UpdatePageMetadataResponse400, - UpdatePageMetadataResponse401, - UpdatePageMetadataResponse404, - UpdatePageMetadataResponse500, + UpdateMetadataResponse200, + UpdateMetadataResponse400, + UpdateMetadataResponse401, + UpdateMetadataResponse404, + UpdateMetadataResponse500, ] ]: parse = _parse_response(client=client, response=response) @@ -103,7 +99,7 @@ def sync_detailed( page_id: int, *, client: {}, - json_body: UpdatePageMetadataJsonBody, + json_body: UpdateMetadataJsonBody, ): """Update metadata for a certain page. @@ -113,14 +109,14 @@ def sync_detailed( Args: project_id (int): page_id (int): - json_body (UpdatePageMetadataJsonBody): + json_body (UpdateMetadataJsonBody): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Response[Union[UpdatePageMetadataResponse200, UpdatePageMetadataResponse400, UpdatePageMetadataResponse401, UpdatePageMetadataResponse404, UpdatePageMetadataResponse500]] + Response[Union[UpdateMetadataResponse200, UpdateMetadataResponse400, UpdateMetadataResponse401, UpdateMetadataResponse404, UpdateMetadataResponse500]] """ kwargs = _get_kwargs( @@ -142,14 +138,14 @@ def sync( page_id: int, *, client: {}, - json_body: UpdatePageMetadataJsonBody, + json_body: UpdateMetadataJsonBody, ) -> Optional[ Union[ - UpdatePageMetadataResponse200, - UpdatePageMetadataResponse400, - UpdatePageMetadataResponse401, - UpdatePageMetadataResponse404, - UpdatePageMetadataResponse500, + UpdateMetadataResponse200, + UpdateMetadataResponse400, + UpdateMetadataResponse401, + UpdateMetadataResponse404, + UpdateMetadataResponse500, ] ]: """Update metadata for a certain page. @@ -160,14 +156,14 @@ def sync( Args: project_id (int): page_id (int): - json_body (UpdatePageMetadataJsonBody): + json_body (UpdateMetadataJsonBody): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Union[UpdatePageMetadataResponse200, UpdatePageMetadataResponse400, UpdatePageMetadataResponse401, UpdatePageMetadataResponse404, UpdatePageMetadataResponse500] + Union[UpdateMetadataResponse200, UpdateMetadataResponse400, UpdateMetadataResponse401, UpdateMetadataResponse404, UpdateMetadataResponse500] """ return sync_detailed( @@ -183,16 +179,17 @@ async def asyncio_detailed( page_id: int, *, client: {}, - json_body: UpdatePageMetadataJsonBody, + json_body: UpdateMetadataJsonBody, ) -> Response[ Union[ - UpdatePageMetadataResponse200, - UpdatePageMetadataResponse400, - UpdatePageMetadataResponse401, - UpdatePageMetadataResponse404, - UpdatePageMetadataResponse500, + UpdateMetadataResponse200, + UpdateMetadataResponse400, + UpdateMetadataResponse401, + UpdateMetadataResponse404, + UpdateMetadataResponse500, ] ]: + kwargs = _get_kwargs( project_id=project_id, page_id=page_id, @@ -212,14 +209,14 @@ async def asyncio( page_id: int, *, client: {}, - json_body: UpdatePageMetadataJsonBody, + json_body: UpdateMetadataJsonBody, ) -> Optional[ Union[ - UpdatePageMetadataResponse200, - UpdatePageMetadataResponse400, - UpdatePageMetadataResponse401, - UpdatePageMetadataResponse404, - UpdatePageMetadataResponse500, + UpdateMetadataResponse200, + UpdateMetadataResponse400, + UpdateMetadataResponse401, + UpdateMetadataResponse404, + UpdateMetadataResponse500, ] ]: """Update metadata for a certain page. @@ -230,14 +227,14 @@ async def asyncio( Args: project_id (int): page_id (int): - json_body (UpdatePageMetadataJsonBody): + json_body (UpdateMetadataJsonBody): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Union[UpdatePageMetadataResponse200, UpdatePageMetadataResponse400, UpdatePageMetadataResponse401, UpdatePageMetadataResponse404, UpdatePageMetadataResponse500] + Union[UpdateMetadataResponse200, UpdateMetadataResponse400, UpdateMetadataResponse401, UpdateMetadataResponse404, UpdateMetadataResponse500] """ return ( diff --git a/customgpt-client/customgpt_client/api/pages/delete_page.py b/customgpt-client/customgpt_client/api/pages/delete_page.py index 12c5cbd..d6a55f2 100644 --- a/customgpt-client/customgpt_client/api/pages/delete_page.py +++ b/customgpt-client/customgpt_client/api/pages/delete_page.py @@ -34,9 +34,7 @@ def _get_kwargs( } -def _parse_response( - *, client: {}, response: None -) -> Optional[ +def _parse_response(*, client: {}, response: None) -> Optional[ Union[ DeletePageResponse200, DeletePageResponse400, @@ -71,9 +69,7 @@ def _parse_response( return None -def _build_response( - *, client: {}, response: None, content: Optional[bytes] = None -) -> Response[ +def _build_response(*, client: {}, response: None, content: Optional[bytes] = None) -> Response[ Union[ DeletePageResponse200, DeletePageResponse400, @@ -187,6 +183,7 @@ async def asyncio_detailed( DeletePageResponse500, ] ]: + kwargs = _get_kwargs( project_id=project_id, page_id=page_id, diff --git a/customgpt-client/customgpt_client/api/pages/get_pages.py b/customgpt-client/customgpt_client/api/pages/get_pages.py index 143b0df..be82967 100644 --- a/customgpt-client/customgpt_client/api/pages/get_pages.py +++ b/customgpt-client/customgpt_client/api/pages/get_pages.py @@ -198,6 +198,7 @@ async def asyncio_detailed( ) -> Response[ Union[GetPagesResponse200, GetPagesResponse400, GetPagesResponse401, GetPagesResponse404, GetPagesResponse500] ]: + kwargs = _get_kwargs( project_id=project_id, client=client, diff --git a/customgpt-client/customgpt_client/api/pages/preview_citation.py b/customgpt-client/customgpt_client/api/pages/preview_citation.py index 3540197..2bd9d1b 100644 --- a/customgpt-client/customgpt_client/api/pages/preview_citation.py +++ b/customgpt-client/customgpt_client/api/pages/preview_citation.py @@ -144,6 +144,7 @@ async def asyncio_detailed( PreviewCitationResponse400, PreviewCitationResponse401, PreviewCitationResponse404, PreviewCitationResponse500 ] ]: + kwargs = _get_kwargs( id=id, client=client, diff --git a/customgpt-client/customgpt_client/api/pages/reindex_page.py b/customgpt-client/customgpt_client/api/pages/reindex_page.py index e66c2f2..29c2c4c 100644 --- a/customgpt-client/customgpt_client/api/pages/reindex_page.py +++ b/customgpt-client/customgpt_client/api/pages/reindex_page.py @@ -36,9 +36,7 @@ def _get_kwargs( } -def _parse_response( - *, client: {}, response: None -) -> Optional[ +def _parse_response(*, client: {}, response: None) -> Optional[ Union[ ReindexPageResponse200, ReindexPageResponse400, @@ -73,9 +71,7 @@ def _parse_response( return None -def _build_response( - *, client: {}, response: None, content: Optional[bytes] = None -) -> Response[ +def _build_response(*, client: {}, response: None, content: Optional[bytes] = None) -> Response[ Union[ ReindexPageResponse200, ReindexPageResponse400, @@ -183,6 +179,7 @@ async def asyncio_detailed( ReindexPageResponse500, ] ]: + kwargs = _get_kwargs( project_id=project_id, page_id=page_id, diff --git a/customgpt-client/customgpt_client/api/project_plugins/create_plugin.py b/customgpt-client/customgpt_client/api/project_plugins/create_plugin.py index bf1a726..646c601 100644 --- a/customgpt-client/customgpt_client/api/project_plugins/create_plugin.py +++ b/customgpt-client/customgpt_client/api/project_plugins/create_plugin.py @@ -38,9 +38,7 @@ def _get_kwargs( } -def _parse_response( - *, client: {}, response: None -) -> Optional[ +def _parse_response(*, client: {}, response: None) -> Optional[ Union[ CreatePluginResponse201, CreatePluginResponse400, @@ -75,9 +73,7 @@ def _parse_response( return None -def _build_response( - *, client: {}, response: None, content: Optional[bytes] = None -) -> Response[ +def _build_response(*, client: {}, response: None, content: Optional[bytes] = None) -> Response[ Union[ CreatePluginResponse201, CreatePluginResponse400, @@ -185,6 +181,7 @@ async def asyncio_detailed( CreatePluginResponse500, ] ]: + kwargs = _get_kwargs( project_id=project_id, client=client, diff --git a/customgpt-client/customgpt_client/api/project_plugins/get_plugin.py b/customgpt-client/customgpt_client/api/project_plugins/get_plugin.py index 0942d7a..42cebc2 100644 --- a/customgpt-client/customgpt_client/api/project_plugins/get_plugin.py +++ b/customgpt-client/customgpt_client/api/project_plugins/get_plugin.py @@ -147,6 +147,7 @@ async def asyncio_detailed( ) -> Response[ Union[GetPluginResponse200, GetPluginResponse400, GetPluginResponse401, GetPluginResponse404, GetPluginResponse500] ]: + kwargs = _get_kwargs( project_id=project_id, client=client, diff --git a/customgpt-client/customgpt_client/api/project_plugins/update_plugin.py b/customgpt-client/customgpt_client/api/project_plugins/update_plugin.py index dd818d7..8175773 100644 --- a/customgpt-client/customgpt_client/api/project_plugins/update_plugin.py +++ b/customgpt-client/customgpt_client/api/project_plugins/update_plugin.py @@ -38,9 +38,7 @@ def _get_kwargs( } -def _parse_response( - *, client: {}, response: None -) -> Optional[ +def _parse_response(*, client: {}, response: None) -> Optional[ Union[ UpdatePluginResponse200, UpdatePluginResponse400, @@ -75,9 +73,7 @@ def _parse_response( return None -def _build_response( - *, client: {}, response: None, content: Optional[bytes] = None -) -> Response[ +def _build_response(*, client: {}, response: None, content: Optional[bytes] = None) -> Response[ Union[ UpdatePluginResponse200, UpdatePluginResponse400, @@ -183,6 +179,7 @@ async def asyncio_detailed( UpdatePluginResponse500, ] ]: + kwargs = _get_kwargs( project_id=project_id, client=client, diff --git a/customgpt-client/customgpt_client/api/project_settings/get_settings.py b/customgpt-client/customgpt_client/api/project_settings/get_project_settings.py similarity index 65% rename from customgpt-client/customgpt_client/api/project_settings/get_settings.py rename to customgpt-client/customgpt_client/api/project_settings/get_project_settings.py index 2ab60d5..7c001c1 100644 --- a/customgpt-client/customgpt_client/api/project_settings/get_settings.py +++ b/customgpt-client/customgpt_client/api/project_settings/get_project_settings.py @@ -5,11 +5,11 @@ import requests from ... import errors -from ...models.get_settings_response_200 import GetSettingsResponse200 -from ...models.get_settings_response_400 import GetSettingsResponse400 -from ...models.get_settings_response_401 import GetSettingsResponse401 -from ...models.get_settings_response_404 import GetSettingsResponse404 -from ...models.get_settings_response_500 import GetSettingsResponse500 +from ...models.get_project_settings_response_200 import GetProjectSettingsResponse200 +from ...models.get_project_settings_response_400 import GetProjectSettingsResponse400 +from ...models.get_project_settings_response_401 import GetProjectSettingsResponse401 +from ...models.get_project_settings_response_404 import GetProjectSettingsResponse404 +from ...models.get_project_settings_response_500 import GetProjectSettingsResponse500 from ...types import Response @@ -33,35 +33,33 @@ def _get_kwargs( } -def _parse_response( - *, client: {}, response: None -) -> Optional[ +def _parse_response(*, client: {}, response: None) -> Optional[ Union[ - GetSettingsResponse200, - GetSettingsResponse400, - GetSettingsResponse401, - GetSettingsResponse404, - GetSettingsResponse500, + GetProjectSettingsResponse200, + GetProjectSettingsResponse400, + GetProjectSettingsResponse401, + GetProjectSettingsResponse404, + GetProjectSettingsResponse500, ] ]: if response.status_code == HTTPStatus.OK: - response_200 = GetSettingsResponse200.from_dict(json.loads(response.text)) + response_200 = GetProjectSettingsResponse200.from_dict(json.loads(response.text)) return response_200 if response.status_code == HTTPStatus.BAD_REQUEST: - response_400 = GetSettingsResponse400.from_dict(json.loads(response.text)) + response_400 = GetProjectSettingsResponse400.from_dict(json.loads(response.text)) return response_400 if response.status_code == HTTPStatus.UNAUTHORIZED: - response_401 = GetSettingsResponse401.from_dict(json.loads(response.text)) + response_401 = GetProjectSettingsResponse401.from_dict(json.loads(response.text)) return response_401 if response.status_code == HTTPStatus.NOT_FOUND: - response_404 = GetSettingsResponse404.from_dict(json.loads(response.text)) + response_404 = GetProjectSettingsResponse404.from_dict(json.loads(response.text)) return response_404 if response.status_code == HTTPStatus.INTERNAL_SERVER_ERROR: - response_500 = GetSettingsResponse500.from_dict(json.loads(response.text)) + response_500 = GetProjectSettingsResponse500.from_dict(json.loads(response.text)) return response_500 if client.raise_on_unexpected_status: @@ -70,15 +68,13 @@ def _parse_response( return None -def _build_response( - *, client: {}, response: None, content: Optional[bytes] = None -) -> Response[ +def _build_response(*, client: {}, response: None, content: Optional[bytes] = None) -> Response[ Union[ - GetSettingsResponse200, - GetSettingsResponse400, - GetSettingsResponse401, - GetSettingsResponse404, - GetSettingsResponse500, + GetProjectSettingsResponse200, + GetProjectSettingsResponse400, + GetProjectSettingsResponse401, + GetProjectSettingsResponse404, + GetProjectSettingsResponse500, ] ]: parse = _parse_response(client=client, response=response) @@ -112,7 +108,7 @@ def sync_detailed( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Response[Union[GetSettingsResponse200, GetSettingsResponse400, GetSettingsResponse401, GetSettingsResponse404, GetSettingsResponse500]] + Response[Union[GetProjectSettingsResponse200, GetProjectSettingsResponse400, GetProjectSettingsResponse401, GetProjectSettingsResponse404, GetProjectSettingsResponse500]] """ kwargs = _get_kwargs( @@ -133,11 +129,11 @@ def sync( client: {}, ) -> Optional[ Union[ - GetSettingsResponse200, - GetSettingsResponse400, - GetSettingsResponse401, - GetSettingsResponse404, - GetSettingsResponse500, + GetProjectSettingsResponse200, + GetProjectSettingsResponse400, + GetProjectSettingsResponse401, + GetProjectSettingsResponse404, + GetProjectSettingsResponse500, ] ]: """Get project settings. @@ -157,7 +153,7 @@ def sync( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Union[GetSettingsResponse200, GetSettingsResponse400, GetSettingsResponse401, GetSettingsResponse404, GetSettingsResponse500] + Union[GetProjectSettingsResponse200, GetProjectSettingsResponse400, GetProjectSettingsResponse401, GetProjectSettingsResponse404, GetProjectSettingsResponse500] """ return sync_detailed( @@ -172,13 +168,14 @@ async def asyncio_detailed( client: {}, ) -> Response[ Union[ - GetSettingsResponse200, - GetSettingsResponse400, - GetSettingsResponse401, - GetSettingsResponse404, - GetSettingsResponse500, + GetProjectSettingsResponse200, + GetProjectSettingsResponse400, + GetProjectSettingsResponse401, + GetProjectSettingsResponse404, + GetProjectSettingsResponse500, ] ]: + kwargs = _get_kwargs( project_id=project_id, client=client, @@ -197,11 +194,11 @@ async def asyncio( client: {}, ) -> Optional[ Union[ - GetSettingsResponse200, - GetSettingsResponse400, - GetSettingsResponse401, - GetSettingsResponse404, - GetSettingsResponse500, + GetProjectSettingsResponse200, + GetProjectSettingsResponse400, + GetProjectSettingsResponse401, + GetProjectSettingsResponse404, + GetProjectSettingsResponse500, ] ]: """Get project settings. @@ -221,7 +218,7 @@ async def asyncio( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Union[GetSettingsResponse200, GetSettingsResponse400, GetSettingsResponse401, GetSettingsResponse404, GetSettingsResponse500] + Union[GetProjectSettingsResponse200, GetProjectSettingsResponse400, GetProjectSettingsResponse401, GetProjectSettingsResponse404, GetProjectSettingsResponse500] """ return ( diff --git a/customgpt-client/customgpt_client/api/project_settings/update_settings.py b/customgpt-client/customgpt_client/api/project_settings/update_project_settings.py similarity index 63% rename from customgpt-client/customgpt_client/api/project_settings/update_settings.py rename to customgpt-client/customgpt_client/api/project_settings/update_project_settings.py index b93482f..169afee 100644 --- a/customgpt-client/customgpt_client/api/project_settings/update_settings.py +++ b/customgpt-client/customgpt_client/api/project_settings/update_project_settings.py @@ -5,11 +5,11 @@ import requests from ... import errors -from ...models.update_settings_multipart_data import UpdateSettingsMultipartData -from ...models.update_settings_response_200 import UpdateSettingsResponse200 -from ...models.update_settings_response_400 import UpdateSettingsResponse400 -from ...models.update_settings_response_401 import UpdateSettingsResponse401 -from ...models.update_settings_response_500 import UpdateSettingsResponse500 +from ...models.update_project_settings_multipart_data import UpdateProjectSettingsMultipartData +from ...models.update_project_settings_response_200 import UpdateProjectSettingsResponse200 +from ...models.update_project_settings_response_400 import UpdateProjectSettingsResponse400 +from ...models.update_project_settings_response_401 import UpdateProjectSettingsResponse401 +from ...models.update_project_settings_response_500 import UpdateProjectSettingsResponse500 from ...types import Response @@ -17,7 +17,7 @@ def _get_kwargs( project_id: int, *, client: {}, - multipart_data: UpdateSettingsMultipartData, + multipart_data: UpdateProjectSettingsMultipartData, ) -> Dict[str, Any]: url = "{}/api/v1/projects/{projectId}/settings".format(client.base_url, projectId=project_id) @@ -37,25 +37,28 @@ def _get_kwargs( } -def _parse_response( - *, client: {}, response: None -) -> Optional[ - Union[UpdateSettingsResponse200, UpdateSettingsResponse400, UpdateSettingsResponse401, UpdateSettingsResponse500] +def _parse_response(*, client: {}, response: None) -> Optional[ + Union[ + UpdateProjectSettingsResponse200, + UpdateProjectSettingsResponse400, + UpdateProjectSettingsResponse401, + UpdateProjectSettingsResponse500, + ] ]: if response.status_code == HTTPStatus.OK: - response_200 = UpdateSettingsResponse200.from_dict(json.loads(response.text)) + response_200 = UpdateProjectSettingsResponse200.from_dict(json.loads(response.text)) return response_200 if response.status_code == HTTPStatus.BAD_REQUEST: - response_400 = UpdateSettingsResponse400.from_dict(json.loads(response.text)) + response_400 = UpdateProjectSettingsResponse400.from_dict(json.loads(response.text)) return response_400 if response.status_code == HTTPStatus.UNAUTHORIZED: - response_401 = UpdateSettingsResponse401.from_dict(json.loads(response.text)) + response_401 = UpdateProjectSettingsResponse401.from_dict(json.loads(response.text)) return response_401 if response.status_code == HTTPStatus.INTERNAL_SERVER_ERROR: - response_500 = UpdateSettingsResponse500.from_dict(json.loads(response.text)) + response_500 = UpdateProjectSettingsResponse500.from_dict(json.loads(response.text)) return response_500 if client.raise_on_unexpected_status: @@ -64,10 +67,13 @@ def _parse_response( return None -def _build_response( - *, client: {}, response: None, content: Optional[bytes] = None -) -> Response[ - Union[UpdateSettingsResponse200, UpdateSettingsResponse400, UpdateSettingsResponse401, UpdateSettingsResponse500] +def _build_response(*, client: {}, response: None, content: Optional[bytes] = None) -> Response[ + Union[ + UpdateProjectSettingsResponse200, + UpdateProjectSettingsResponse400, + UpdateProjectSettingsResponse401, + UpdateProjectSettingsResponse500, + ] ]: parse = _parse_response(client=client, response=response) return Response( @@ -82,7 +88,7 @@ def sync_detailed( project_id: int, *, client: {}, - multipart_data: UpdateSettingsMultipartData, + multipart_data: UpdateProjectSettingsMultipartData, ): """Update project settings. @@ -95,14 +101,14 @@ def sync_detailed( Args: project_id (int): - multipart_data (UpdateSettingsMultipartData): + multipart_data (UpdateProjectSettingsMultipartData): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Response[Union[UpdateSettingsResponse200, UpdateSettingsResponse400, UpdateSettingsResponse401, UpdateSettingsResponse500]] + Response[Union[UpdateProjectSettingsResponse200, UpdateProjectSettingsResponse400, UpdateProjectSettingsResponse401, UpdateProjectSettingsResponse500]] """ kwargs = _get_kwargs( @@ -122,9 +128,14 @@ def sync( project_id: int, *, client: {}, - multipart_data: UpdateSettingsMultipartData, + multipart_data: UpdateProjectSettingsMultipartData, ) -> Optional[ - Union[UpdateSettingsResponse200, UpdateSettingsResponse400, UpdateSettingsResponse401, UpdateSettingsResponse500] + Union[ + UpdateProjectSettingsResponse200, + UpdateProjectSettingsResponse400, + UpdateProjectSettingsResponse401, + UpdateProjectSettingsResponse500, + ] ]: """Update project settings. @@ -137,14 +148,14 @@ def sync( Args: project_id (int): - multipart_data (UpdateSettingsMultipartData): + multipart_data (UpdateProjectSettingsMultipartData): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Union[UpdateSettingsResponse200, UpdateSettingsResponse400, UpdateSettingsResponse401, UpdateSettingsResponse500] + Union[UpdateProjectSettingsResponse200, UpdateProjectSettingsResponse400, UpdateProjectSettingsResponse401, UpdateProjectSettingsResponse500] """ return sync_detailed( @@ -158,10 +169,16 @@ async def asyncio_detailed( project_id: int, *, client: {}, - multipart_data: UpdateSettingsMultipartData, + multipart_data: UpdateProjectSettingsMultipartData, ) -> Response[ - Union[UpdateSettingsResponse200, UpdateSettingsResponse400, UpdateSettingsResponse401, UpdateSettingsResponse500] + Union[ + UpdateProjectSettingsResponse200, + UpdateProjectSettingsResponse400, + UpdateProjectSettingsResponse401, + UpdateProjectSettingsResponse500, + ] ]: + kwargs = _get_kwargs( project_id=project_id, client=client, @@ -179,9 +196,14 @@ async def asyncio( project_id: int, *, client: {}, - multipart_data: UpdateSettingsMultipartData, + multipart_data: UpdateProjectSettingsMultipartData, ) -> Optional[ - Union[UpdateSettingsResponse200, UpdateSettingsResponse400, UpdateSettingsResponse401, UpdateSettingsResponse500] + Union[ + UpdateProjectSettingsResponse200, + UpdateProjectSettingsResponse400, + UpdateProjectSettingsResponse401, + UpdateProjectSettingsResponse500, + ] ]: """Update project settings. @@ -194,14 +216,14 @@ async def asyncio( Args: project_id (int): - multipart_data (UpdateSettingsMultipartData): + multipart_data (UpdateProjectSettingsMultipartData): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Union[UpdateSettingsResponse200, UpdateSettingsResponse400, UpdateSettingsResponse401, UpdateSettingsResponse500] + Union[UpdateProjectSettingsResponse200, UpdateProjectSettingsResponse400, UpdateProjectSettingsResponse401, UpdateProjectSettingsResponse500] """ return ( diff --git a/customgpt-client/customgpt_client/api/projects/create_project.py b/customgpt-client/customgpt_client/api/projects/create_project.py index 11b87ce..3badbfb 100644 --- a/customgpt-client/customgpt_client/api/projects/create_project.py +++ b/customgpt-client/customgpt_client/api/projects/create_project.py @@ -162,6 +162,7 @@ async def asyncio_detailed( ) -> Response[ Union[CreateProjectResponse201, CreateProjectResponse400, CreateProjectResponse401, CreateProjectResponse500] ]: + kwargs = _get_kwargs( client=client, multipart_data=multipart_data, diff --git a/customgpt-client/customgpt_client/api/projects/delete_project.py b/customgpt-client/customgpt_client/api/projects/delete_project.py index bc8c4f7..44bd94b 100644 --- a/customgpt-client/customgpt_client/api/projects/delete_project.py +++ b/customgpt-client/customgpt_client/api/projects/delete_project.py @@ -33,9 +33,7 @@ def _get_kwargs( } -def _parse_response( - *, client: {}, response: None -) -> Optional[ +def _parse_response(*, client: {}, response: None) -> Optional[ Union[ DeleteProjectResponse200, DeleteProjectResponse400, @@ -70,9 +68,7 @@ def _parse_response( return None -def _build_response( - *, client: {}, response: None, content: Optional[bytes] = None -) -> Response[ +def _build_response(*, client: {}, response: None, content: Optional[bytes] = None) -> Response[ Union[ DeleteProjectResponse200, DeleteProjectResponse400, @@ -177,6 +173,7 @@ async def asyncio_detailed( DeleteProjectResponse500, ] ]: + kwargs = _get_kwargs( project_id=project_id, client=client, diff --git a/customgpt-client/customgpt_client/api/projects/get_project.py b/customgpt-client/customgpt_client/api/projects/get_project.py index f45eb33..8f07074 100644 --- a/customgpt-client/customgpt_client/api/projects/get_project.py +++ b/customgpt-client/customgpt_client/api/projects/get_project.py @@ -43,9 +43,7 @@ def _get_kwargs( } -def _parse_response( - *, client: {}, response: None -) -> Optional[ +def _parse_response(*, client: {}, response: None) -> Optional[ Union[ GetProjectResponse200, GetProjectResponse400, @@ -80,9 +78,7 @@ def _parse_response( return None -def _build_response( - *, client: {}, response: None, content: Optional[bytes] = None -) -> Response[ +def _build_response(*, client: {}, response: None, content: Optional[bytes] = None) -> Response[ Union[ GetProjectResponse200, GetProjectResponse400, @@ -195,6 +191,7 @@ async def asyncio_detailed( GetProjectResponse500, ] ]: + kwargs = _get_kwargs( project_id=project_id, client=client, diff --git a/customgpt-client/customgpt_client/api/projects/list_projects.py b/customgpt-client/customgpt_client/api/projects/list_projects.py index 5f8741b..0dede7d 100644 --- a/customgpt-client/customgpt_client/api/projects/list_projects.py +++ b/customgpt-client/customgpt_client/api/projects/list_projects.py @@ -6,6 +6,7 @@ from ... import errors from ...models.list_projects_order import ListProjectsOrder +from ...models.list_projects_order_by import ListProjectsOrderBy from ...models.list_projects_response_200 import ListProjectsResponse200 from ...models.list_projects_response_401 import ListProjectsResponse401 from ...models.list_projects_response_500 import ListProjectsResponse500 @@ -18,8 +19,10 @@ def _get_kwargs( page: Union[Unset, None, int] = 1, duration: Union[Unset, None, int] = UNSET, order: Union[Unset, None, ListProjectsOrder] = ListProjectsOrder.DESC, + order_by: Union[Unset, None, ListProjectsOrderBy] = ListProjectsOrderBy.ID, width: Union[Unset, None, str] = "100%", height: Union[Unset, None, str] = "auto", + name: Union[Unset, None, str] = UNSET, ) -> Dict[str, Any]: url = "{}/api/v1/projects".format(client.base_url) @@ -37,10 +40,18 @@ def _get_kwargs( params["order"] = json_order + json_order_by: Union[Unset, None, str] = UNSET + if not isinstance(order_by, Unset): + json_order_by = order_by if order_by else None + + params["orderBy"] = json_order_by + params["width"] = width params["height"] = height + params["name"] = name + params = {k: v for k, v in params.items() if v is not UNSET and v is not None} return { @@ -93,8 +104,10 @@ def sync_detailed( page: Union[Unset, None, int] = 1, duration: Union[Unset, None, int] = UNSET, order: Union[Unset, None, ListProjectsOrder] = ListProjectsOrder.DESC, + order_by: Union[Unset, None, ListProjectsOrderBy] = ListProjectsOrderBy.ID, width: Union[Unset, None, str] = "100%", height: Union[Unset, None, str] = "auto", + name: Union[Unset, None, str] = UNSET, ): """List all projects. @@ -110,9 +123,13 @@ def sync_detailed( Args: page (Union[Unset, None, int]): Default: 1. Example: 1. duration (Union[Unset, None, int]): - order (Union[Unset, None, ListProjectsOrder]): Default: ListProjectsOrder.DESC. + order (Union[Unset, None, ListProjectsOrder]): Default: ListProjectsOrder.DESC. Example: + desc. + order_by (Union[Unset, None, ListProjectsOrderBy]): Default: ListProjectsOrderBy.ID. + Example: id. width (Union[Unset, None, str]): Default: '100%'. Example: 50rem. height (Union[Unset, None, str]): Default: 'auto'. Example: 50rem. + name (Union[Unset, None, str]): Example: Sample project. Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. @@ -127,8 +144,10 @@ def sync_detailed( page=page, duration=duration, order=order, + order_by=order_by, width=width, height=height, + name=name, ) response = requests.request( @@ -144,8 +163,10 @@ def sync( page: Union[Unset, None, int] = 1, duration: Union[Unset, None, int] = UNSET, order: Union[Unset, None, ListProjectsOrder] = ListProjectsOrder.DESC, + order_by: Union[Unset, None, ListProjectsOrderBy] = ListProjectsOrderBy.ID, width: Union[Unset, None, str] = "100%", height: Union[Unset, None, str] = "auto", + name: Union[Unset, None, str] = UNSET, ) -> Optional[Union[ListProjectsResponse200, ListProjectsResponse401, ListProjectsResponse500]]: """List all projects. @@ -161,9 +182,13 @@ def sync( Args: page (Union[Unset, None, int]): Default: 1. Example: 1. duration (Union[Unset, None, int]): - order (Union[Unset, None, ListProjectsOrder]): Default: ListProjectsOrder.DESC. + order (Union[Unset, None, ListProjectsOrder]): Default: ListProjectsOrder.DESC. Example: + desc. + order_by (Union[Unset, None, ListProjectsOrderBy]): Default: ListProjectsOrderBy.ID. + Example: id. width (Union[Unset, None, str]): Default: '100%'. Example: 50rem. height (Union[Unset, None, str]): Default: 'auto'. Example: 50rem. + name (Union[Unset, None, str]): Example: Sample project. Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. @@ -178,8 +203,10 @@ def sync( page=page, duration=duration, order=order, + order_by=order_by, width=width, height=height, + name=name, ).parsed @@ -189,16 +216,21 @@ async def asyncio_detailed( page: Union[Unset, None, int] = 1, duration: Union[Unset, None, int] = UNSET, order: Union[Unset, None, ListProjectsOrder] = ListProjectsOrder.DESC, + order_by: Union[Unset, None, ListProjectsOrderBy] = ListProjectsOrderBy.ID, width: Union[Unset, None, str] = "100%", height: Union[Unset, None, str] = "auto", + name: Union[Unset, None, str] = UNSET, ) -> Response[Union[ListProjectsResponse200, ListProjectsResponse401, ListProjectsResponse500]]: + kwargs = _get_kwargs( client=client, page=page, duration=duration, order=order, + order_by=order_by, width=width, height=height, + name=name, ) response = requests.request( @@ -214,8 +246,10 @@ async def asyncio( page: Union[Unset, None, int] = 1, duration: Union[Unset, None, int] = UNSET, order: Union[Unset, None, ListProjectsOrder] = ListProjectsOrder.DESC, + order_by: Union[Unset, None, ListProjectsOrderBy] = ListProjectsOrderBy.ID, width: Union[Unset, None, str] = "100%", height: Union[Unset, None, str] = "auto", + name: Union[Unset, None, str] = UNSET, ) -> Optional[Union[ListProjectsResponse200, ListProjectsResponse401, ListProjectsResponse500]]: """List all projects. @@ -231,9 +265,13 @@ async def asyncio( Args: page (Union[Unset, None, int]): Default: 1. Example: 1. duration (Union[Unset, None, int]): - order (Union[Unset, None, ListProjectsOrder]): Default: ListProjectsOrder.DESC. + order (Union[Unset, None, ListProjectsOrder]): Default: ListProjectsOrder.DESC. Example: + desc. + order_by (Union[Unset, None, ListProjectsOrderBy]): Default: ListProjectsOrderBy.ID. + Example: id. width (Union[Unset, None, str]): Default: '100%'. Example: 50rem. height (Union[Unset, None, str]): Default: 'auto'. Example: 50rem. + name (Union[Unset, None, str]): Example: Sample project. Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. @@ -249,7 +287,9 @@ async def asyncio( page=page, duration=duration, order=order, + order_by=order_by, width=width, height=height, + name=name, ) ).parsed diff --git a/customgpt-client/customgpt_client/api/projects/replicate_project.py b/customgpt-client/customgpt_client/api/projects/replicate_project.py new file mode 100644 index 0000000..34dadbb --- /dev/null +++ b/customgpt-client/customgpt_client/api/projects/replicate_project.py @@ -0,0 +1,213 @@ +import json +from http import HTTPStatus +from typing import Any, Dict, Optional, Union + +import requests + +from ... import errors +from ...models.replicate_project_response_201 import ReplicateProjectResponse201 +from ...models.replicate_project_response_400 import ReplicateProjectResponse400 +from ...models.replicate_project_response_401 import ReplicateProjectResponse401 +from ...models.replicate_project_response_500 import ReplicateProjectResponse500 +from ...types import Response + + +def _get_kwargs( + project_id: int, + *, + client: {}, +) -> Dict[str, Any]: + url = "{}/api/v1/projects/{projectId}/replicate".format(client.base_url, projectId=project_id) + + headers: Dict[str, str] = client.get_headers() + cookies: Dict[str, Any] = client.get_cookies() + + return { + "method": "post", + "url": url, + "headers": headers, + "cookies": cookies, + "timeout": client.get_timeout(), + "allow_redirects": client.follow_redirects, + } + + +def _parse_response(*, client: {}, response: None) -> Optional[ + Union[ + ReplicateProjectResponse201, + ReplicateProjectResponse400, + ReplicateProjectResponse401, + ReplicateProjectResponse500, + ] +]: + if response.status_code == HTTPStatus.CREATED: + response_201 = ReplicateProjectResponse201.from_dict(json.loads(response.text)) + + return response_201 + if response.status_code == HTTPStatus.BAD_REQUEST: + response_400 = ReplicateProjectResponse400.from_dict(json.loads(response.text)) + + return response_400 + if response.status_code == HTTPStatus.UNAUTHORIZED: + response_401 = ReplicateProjectResponse401.from_dict(json.loads(response.text)) + + return response_401 + if response.status_code == HTTPStatus.INTERNAL_SERVER_ERROR: + response_500 = ReplicateProjectResponse500.from_dict(json.loads(response.text)) + + return response_500 + if client.raise_on_unexpected_status: + raise errors.UnexpectedStatus(response.status_code, response.content) + else: + return None + + +def _build_response(*, client: {}, response: None, content: Optional[bytes] = None) -> Response[ + Union[ + ReplicateProjectResponse201, + ReplicateProjectResponse400, + ReplicateProjectResponse401, + ReplicateProjectResponse500, + ] +]: + parse = _parse_response(client=client, response=response) + return Response( + status_code=HTTPStatus(response.status_code), + content=response.content if content is None else content, + headers=response.headers, + parsed=parse, + ) + + +def sync_detailed( + project_id: int, + *, + client: {}, +): + """Replicate project by given Project ID. + + Create a copy pf project by replicating project info, settings, sitemap sources and uploaded files. + This endpoint enables you to initiate the replication of a project by supplying the necessary + project id value. The system will process the replicated data and generate a new project based on + the information of existing project. + + Args: + project_id (int): Example: 1. + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[Union[ReplicateProjectResponse201, ReplicateProjectResponse400, ReplicateProjectResponse401, ReplicateProjectResponse500]] + """ + + kwargs = _get_kwargs( + project_id=project_id, + client=client, + ) + + response = requests.request( + **kwargs, + ) + + return _build_response(client=client, response=response) + + +def sync( + project_id: int, + *, + client: {}, +) -> Optional[ + Union[ + ReplicateProjectResponse201, + ReplicateProjectResponse400, + ReplicateProjectResponse401, + ReplicateProjectResponse500, + ] +]: + """Replicate project by given Project ID. + + Create a copy pf project by replicating project info, settings, sitemap sources and uploaded files. + This endpoint enables you to initiate the replication of a project by supplying the necessary + project id value. The system will process the replicated data and generate a new project based on + the information of existing project. + + Args: + project_id (int): Example: 1. + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Union[ReplicateProjectResponse201, ReplicateProjectResponse400, ReplicateProjectResponse401, ReplicateProjectResponse500] + """ + + return sync_detailed( + project_id=project_id, + client=client, + ).parsed + + +async def asyncio_detailed( + project_id: int, + *, + client: {}, +) -> Response[ + Union[ + ReplicateProjectResponse201, + ReplicateProjectResponse400, + ReplicateProjectResponse401, + ReplicateProjectResponse500, + ] +]: + + kwargs = _get_kwargs( + project_id=project_id, + client=client, + ) + + response = requests.request( + **kwargs, + ) + + return _build_response(client=client, response=response) + + +async def asyncio( + project_id: int, + *, + client: {}, +) -> Optional[ + Union[ + ReplicateProjectResponse201, + ReplicateProjectResponse400, + ReplicateProjectResponse401, + ReplicateProjectResponse500, + ] +]: + """Replicate project by given Project ID. + + Create a copy pf project by replicating project info, settings, sitemap sources and uploaded files. + This endpoint enables you to initiate the replication of a project by supplying the necessary + project id value. The system will process the replicated data and generate a new project based on + the information of existing project. + + Args: + project_id (int): Example: 1. + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Union[ReplicateProjectResponse201, ReplicateProjectResponse400, ReplicateProjectResponse401, ReplicateProjectResponse500] + """ + + return ( + await asyncio_detailed( + project_id=project_id, + client=client, + ) + ).parsed diff --git a/customgpt-client/customgpt_client/api/projects/stats_project.py b/customgpt-client/customgpt_client/api/projects/stats_project.py index 3be3693..6356b8b 100644 --- a/customgpt-client/customgpt_client/api/projects/stats_project.py +++ b/customgpt-client/customgpt_client/api/projects/stats_project.py @@ -33,9 +33,7 @@ def _get_kwargs( } -def _parse_response( - *, client: {}, response: None -) -> Optional[ +def _parse_response(*, client: {}, response: None) -> Optional[ Union[ StatsProjectResponse200, StatsProjectResponse400, @@ -70,9 +68,7 @@ def _parse_response( return None -def _build_response( - *, client: {}, response: None, content: Optional[bytes] = None -) -> Response[ +def _build_response(*, client: {}, response: None, content: Optional[bytes] = None) -> Response[ Union[ StatsProjectResponse200, StatsProjectResponse400, @@ -177,6 +173,7 @@ async def asyncio_detailed( StatsProjectResponse500, ] ]: + kwargs = _get_kwargs( project_id=project_id, client=client, diff --git a/customgpt-client/customgpt_client/api/projects/update_project.py b/customgpt-client/customgpt_client/api/projects/update_project.py index 2112f8c..d681550 100644 --- a/customgpt-client/customgpt_client/api/projects/update_project.py +++ b/customgpt-client/customgpt_client/api/projects/update_project.py @@ -38,9 +38,7 @@ def _get_kwargs( } -def _parse_response( - *, client: {}, response: None -) -> Optional[ +def _parse_response(*, client: {}, response: None) -> Optional[ Union[ UpdateProjectResponse200, UpdateProjectResponse400, @@ -75,9 +73,7 @@ def _parse_response( return None -def _build_response( - *, client: {}, response: None, content: Optional[bytes] = None -) -> Response[ +def _build_response(*, client: {}, response: None, content: Optional[bytes] = None) -> Response[ Union[ UpdateProjectResponse200, UpdateProjectResponse400, @@ -191,6 +187,7 @@ async def asyncio_detailed( UpdateProjectResponse500, ] ]: + kwargs = _get_kwargs( project_id=project_id, client=client, diff --git a/customgpt-client/customgpt_client/api/reports_analytics/__init__.py b/customgpt-client/customgpt_client/api/reports_analytics/__init__.py new file mode 100644 index 0000000..e69de29 diff --git a/customgpt-client/customgpt_client/api/reports_analytics/analysis_reports.py b/customgpt-client/customgpt_client/api/reports_analytics/analysis_reports.py new file mode 100644 index 0000000..b8fd870 --- /dev/null +++ b/customgpt-client/customgpt_client/api/reports_analytics/analysis_reports.py @@ -0,0 +1,255 @@ +import json +from http import HTTPStatus +from typing import Any, Dict, List, Optional, Union + +import requests + +from ... import errors +from ...models.analysis_reports_filters_item import AnalysisReportsFiltersItem +from ...models.analysis_reports_interval import AnalysisReportsInterval +from ...models.analysis_reports_response_200 import AnalysisReportsResponse200 +from ...models.analysis_reports_response_400 import AnalysisReportsResponse400 +from ...models.analysis_reports_response_401 import AnalysisReportsResponse401 +from ...models.analysis_reports_response_404 import AnalysisReportsResponse404 +from ...models.analysis_reports_response_500 import AnalysisReportsResponse500 +from ...types import UNSET, Response, Unset + + +def _get_kwargs( + project_id: int, + *, + client: {}, + filters: List[AnalysisReportsFiltersItem], + interval: Union[Unset, None, AnalysisReportsInterval] = AnalysisReportsInterval.WEEKLY, +) -> Dict[str, Any]: + url = "{}/api/v1/projects/{projectId}/reports/analysis".format(client.base_url, projectId=project_id) + + headers: Dict[str, str] = client.get_headers() + cookies: Dict[str, Any] = client.get_cookies() + + params: Dict[str, Any] = {} + json_filters = [] + for filters_item_data in filters: + filters_item = filters_item_data + + json_filters.append(filters_item) + + params["filters"] = json_filters + + json_interval: Union[Unset, None, str] = UNSET + if not isinstance(interval, Unset): + json_interval = interval if interval else None + + params["interval"] = json_interval + + params = {k: v for k, v in params.items() if v is not UNSET and v is not None} + + return { + "method": "get", + "url": url, + "headers": headers, + "cookies": cookies, + "timeout": client.get_timeout(), + "allow_redirects": client.follow_redirects, + "params": params, + } + + +def _parse_response(*, client: {}, response: None) -> Optional[ + Union[ + AnalysisReportsResponse200, + AnalysisReportsResponse400, + AnalysisReportsResponse401, + AnalysisReportsResponse404, + AnalysisReportsResponse500, + ] +]: + if response.status_code == HTTPStatus.OK: + response_200 = AnalysisReportsResponse200.from_dict(json.loads(response.text)) + + return response_200 + if response.status_code == HTTPStatus.BAD_REQUEST: + response_400 = AnalysisReportsResponse400.from_dict(json.loads(response.text)) + + return response_400 + if response.status_code == HTTPStatus.UNAUTHORIZED: + response_401 = AnalysisReportsResponse401.from_dict(json.loads(response.text)) + + return response_401 + if response.status_code == HTTPStatus.NOT_FOUND: + response_404 = AnalysisReportsResponse404.from_dict(json.loads(response.text)) + + return response_404 + if response.status_code == HTTPStatus.INTERNAL_SERVER_ERROR: + response_500 = AnalysisReportsResponse500.from_dict(json.loads(response.text)) + + return response_500 + if client.raise_on_unexpected_status: + raise errors.UnexpectedStatus(response.status_code, response.content) + else: + return None + + +def _build_response(*, client: {}, response: None, content: Optional[bytes] = None) -> Response[ + Union[ + AnalysisReportsResponse200, + AnalysisReportsResponse400, + AnalysisReportsResponse401, + AnalysisReportsResponse404, + AnalysisReportsResponse500, + ] +]: + parse = _parse_response(client=client, response=response) + return Response( + status_code=HTTPStatus(response.status_code), + content=response.content if content is None else content, + headers=response.headers, + parsed=parse, + ) + + +def sync_detailed( + project_id: int, + *, + client: {}, + filters: List[AnalysisReportsFiltersItem], + interval: Union[Unset, None, AnalysisReportsInterval] = AnalysisReportsInterval.WEEKLY, +): + """Provide graph-ready analysis data of various metrics. + + Args: + project_id (int): Example: 1. + filters (List[AnalysisReportsFiltersItem]): + interval (Union[Unset, None, AnalysisReportsInterval]): Default: + AnalysisReportsInterval.WEEKLY. + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[Union[AnalysisReportsResponse200, AnalysisReportsResponse400, AnalysisReportsResponse401, AnalysisReportsResponse404, AnalysisReportsResponse500]] + """ + + kwargs = _get_kwargs( + project_id=project_id, + client=client, + filters=filters, + interval=interval, + ) + + response = requests.request( + **kwargs, + ) + + return _build_response(client=client, response=response) + + +def sync( + project_id: int, + *, + client: {}, + filters: List[AnalysisReportsFiltersItem], + interval: Union[Unset, None, AnalysisReportsInterval] = AnalysisReportsInterval.WEEKLY, +) -> Optional[ + Union[ + AnalysisReportsResponse200, + AnalysisReportsResponse400, + AnalysisReportsResponse401, + AnalysisReportsResponse404, + AnalysisReportsResponse500, + ] +]: + """Provide graph-ready analysis data of various metrics. + + Args: + project_id (int): Example: 1. + filters (List[AnalysisReportsFiltersItem]): + interval (Union[Unset, None, AnalysisReportsInterval]): Default: + AnalysisReportsInterval.WEEKLY. + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Union[AnalysisReportsResponse200, AnalysisReportsResponse400, AnalysisReportsResponse401, AnalysisReportsResponse404, AnalysisReportsResponse500] + """ + + return sync_detailed( + project_id=project_id, + client=client, + filters=filters, + interval=interval, + ).parsed + + +async def asyncio_detailed( + project_id: int, + *, + client: {}, + filters: List[AnalysisReportsFiltersItem], + interval: Union[Unset, None, AnalysisReportsInterval] = AnalysisReportsInterval.WEEKLY, +) -> Response[ + Union[ + AnalysisReportsResponse200, + AnalysisReportsResponse400, + AnalysisReportsResponse401, + AnalysisReportsResponse404, + AnalysisReportsResponse500, + ] +]: + + kwargs = _get_kwargs( + project_id=project_id, + client=client, + filters=filters, + interval=interval, + ) + + response = requests.request( + **kwargs, + ) + + return _build_response(client=client, response=response) + + +async def asyncio( + project_id: int, + *, + client: {}, + filters: List[AnalysisReportsFiltersItem], + interval: Union[Unset, None, AnalysisReportsInterval] = AnalysisReportsInterval.WEEKLY, +) -> Optional[ + Union[ + AnalysisReportsResponse200, + AnalysisReportsResponse400, + AnalysisReportsResponse401, + AnalysisReportsResponse404, + AnalysisReportsResponse500, + ] +]: + """Provide graph-ready analysis data of various metrics. + + Args: + project_id (int): Example: 1. + filters (List[AnalysisReportsFiltersItem]): + interval (Union[Unset, None, AnalysisReportsInterval]): Default: + AnalysisReportsInterval.WEEKLY. + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Union[AnalysisReportsResponse200, AnalysisReportsResponse400, AnalysisReportsResponse401, AnalysisReportsResponse404, AnalysisReportsResponse500] + """ + + return ( + await asyncio_detailed( + project_id=project_id, + client=client, + filters=filters, + interval=interval, + ) + ).parsed diff --git a/customgpt-client/customgpt_client/api/reports_analytics/conversations_reports.py b/customgpt-client/customgpt_client/api/reports_analytics/conversations_reports.py new file mode 100644 index 0000000..1ca232a --- /dev/null +++ b/customgpt-client/customgpt_client/api/reports_analytics/conversations_reports.py @@ -0,0 +1,233 @@ +import json +from http import HTTPStatus +from typing import Any, Dict, List, Optional, Union + +import requests + +from ... import errors +from ...models.conversations_reports_filters_item import ConversationsReportsFiltersItem +from ...models.conversations_reports_response_200 import ConversationsReportsResponse200 +from ...models.conversations_reports_response_400 import ConversationsReportsResponse400 +from ...models.conversations_reports_response_401 import ConversationsReportsResponse401 +from ...models.conversations_reports_response_404 import ConversationsReportsResponse404 +from ...models.conversations_reports_response_500 import ConversationsReportsResponse500 +from ...types import UNSET, Response + + +def _get_kwargs( + project_id: int, + *, + client: {}, + filters: List[ConversationsReportsFiltersItem], +) -> Dict[str, Any]: + url = "{}/api/v1/projects/{projectId}/reports/conversations".format(client.base_url, projectId=project_id) + + headers: Dict[str, str] = client.get_headers() + cookies: Dict[str, Any] = client.get_cookies() + + params: Dict[str, Any] = {} + json_filters = [] + for filters_item_data in filters: + filters_item = filters_item_data + + json_filters.append(filters_item) + + params["filters"] = json_filters + + params = {k: v for k, v in params.items() if v is not UNSET and v is not None} + + return { + "method": "get", + "url": url, + "headers": headers, + "cookies": cookies, + "timeout": client.get_timeout(), + "allow_redirects": client.follow_redirects, + "params": params, + } + + +def _parse_response(*, client: {}, response: None) -> Optional[ + Union[ + ConversationsReportsResponse200, + ConversationsReportsResponse400, + ConversationsReportsResponse401, + ConversationsReportsResponse404, + ConversationsReportsResponse500, + ] +]: + if response.status_code == HTTPStatus.OK: + response_200 = ConversationsReportsResponse200.from_dict(json.loads(response.text)) + + return response_200 + if response.status_code == HTTPStatus.BAD_REQUEST: + response_400 = ConversationsReportsResponse400.from_dict(json.loads(response.text)) + + return response_400 + if response.status_code == HTTPStatus.UNAUTHORIZED: + response_401 = ConversationsReportsResponse401.from_dict(json.loads(response.text)) + + return response_401 + if response.status_code == HTTPStatus.NOT_FOUND: + response_404 = ConversationsReportsResponse404.from_dict(json.loads(response.text)) + + return response_404 + if response.status_code == HTTPStatus.INTERNAL_SERVER_ERROR: + response_500 = ConversationsReportsResponse500.from_dict(json.loads(response.text)) + + return response_500 + if client.raise_on_unexpected_status: + raise errors.UnexpectedStatus(response.status_code, response.content) + else: + return None + + +def _build_response(*, client: {}, response: None, content: Optional[bytes] = None) -> Response[ + Union[ + ConversationsReportsResponse200, + ConversationsReportsResponse400, + ConversationsReportsResponse401, + ConversationsReportsResponse404, + ConversationsReportsResponse500, + ] +]: + parse = _parse_response(client=client, response=response) + return Response( + status_code=HTTPStatus(response.status_code), + content=response.content if content is None else content, + headers=response.headers, + parsed=parse, + ) + + +def sync_detailed( + project_id: int, + *, + client: {}, + filters: List[ConversationsReportsFiltersItem], +): + """Provide summary of overall conversation metrics. + + Args: + project_id (int): Example: 1. + filters (List[ConversationsReportsFiltersItem]): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[Union[ConversationsReportsResponse200, ConversationsReportsResponse400, ConversationsReportsResponse401, ConversationsReportsResponse404, ConversationsReportsResponse500]] + """ + + kwargs = _get_kwargs( + project_id=project_id, + client=client, + filters=filters, + ) + + response = requests.request( + **kwargs, + ) + + return _build_response(client=client, response=response) + + +def sync( + project_id: int, + *, + client: {}, + filters: List[ConversationsReportsFiltersItem], +) -> Optional[ + Union[ + ConversationsReportsResponse200, + ConversationsReportsResponse400, + ConversationsReportsResponse401, + ConversationsReportsResponse404, + ConversationsReportsResponse500, + ] +]: + """Provide summary of overall conversation metrics. + + Args: + project_id (int): Example: 1. + filters (List[ConversationsReportsFiltersItem]): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Union[ConversationsReportsResponse200, ConversationsReportsResponse400, ConversationsReportsResponse401, ConversationsReportsResponse404, ConversationsReportsResponse500] + """ + + return sync_detailed( + project_id=project_id, + client=client, + filters=filters, + ).parsed + + +async def asyncio_detailed( + project_id: int, + *, + client: {}, + filters: List[ConversationsReportsFiltersItem], +) -> Response[ + Union[ + ConversationsReportsResponse200, + ConversationsReportsResponse400, + ConversationsReportsResponse401, + ConversationsReportsResponse404, + ConversationsReportsResponse500, + ] +]: + + kwargs = _get_kwargs( + project_id=project_id, + client=client, + filters=filters, + ) + + response = requests.request( + **kwargs, + ) + + return _build_response(client=client, response=response) + + +async def asyncio( + project_id: int, + *, + client: {}, + filters: List[ConversationsReportsFiltersItem], +) -> Optional[ + Union[ + ConversationsReportsResponse200, + ConversationsReportsResponse400, + ConversationsReportsResponse401, + ConversationsReportsResponse404, + ConversationsReportsResponse500, + ] +]: + """Provide summary of overall conversation metrics. + + Args: + project_id (int): Example: 1. + filters (List[ConversationsReportsFiltersItem]): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Union[ConversationsReportsResponse200, ConversationsReportsResponse400, ConversationsReportsResponse401, ConversationsReportsResponse404, ConversationsReportsResponse500] + """ + + return ( + await asyncio_detailed( + project_id=project_id, + client=client, + filters=filters, + ) + ).parsed diff --git a/customgpt-client/customgpt_client/api/reports_analytics/queries_reports.py b/customgpt-client/customgpt_client/api/reports_analytics/queries_reports.py new file mode 100644 index 0000000..5cea212 --- /dev/null +++ b/customgpt-client/customgpt_client/api/reports_analytics/queries_reports.py @@ -0,0 +1,233 @@ +import json +from http import HTTPStatus +from typing import Any, Dict, List, Optional, Union + +import requests + +from ... import errors +from ...models.queries_reports_filters_item import QueriesReportsFiltersItem +from ...models.queries_reports_response_200 import QueriesReportsResponse200 +from ...models.queries_reports_response_400 import QueriesReportsResponse400 +from ...models.queries_reports_response_401 import QueriesReportsResponse401 +from ...models.queries_reports_response_404 import QueriesReportsResponse404 +from ...models.queries_reports_response_500 import QueriesReportsResponse500 +from ...types import UNSET, Response + + +def _get_kwargs( + project_id: int, + *, + client: {}, + filters: List[QueriesReportsFiltersItem], +) -> Dict[str, Any]: + url = "{}/api/v1/projects/{projectId}/reports/queries".format(client.base_url, projectId=project_id) + + headers: Dict[str, str] = client.get_headers() + cookies: Dict[str, Any] = client.get_cookies() + + params: Dict[str, Any] = {} + json_filters = [] + for filters_item_data in filters: + filters_item = filters_item_data + + json_filters.append(filters_item) + + params["filters"] = json_filters + + params = {k: v for k, v in params.items() if v is not UNSET and v is not None} + + return { + "method": "get", + "url": url, + "headers": headers, + "cookies": cookies, + "timeout": client.get_timeout(), + "allow_redirects": client.follow_redirects, + "params": params, + } + + +def _parse_response(*, client: {}, response: None) -> Optional[ + Union[ + QueriesReportsResponse200, + QueriesReportsResponse400, + QueriesReportsResponse401, + QueriesReportsResponse404, + QueriesReportsResponse500, + ] +]: + if response.status_code == HTTPStatus.OK: + response_200 = QueriesReportsResponse200.from_dict(json.loads(response.text)) + + return response_200 + if response.status_code == HTTPStatus.BAD_REQUEST: + response_400 = QueriesReportsResponse400.from_dict(json.loads(response.text)) + + return response_400 + if response.status_code == HTTPStatus.UNAUTHORIZED: + response_401 = QueriesReportsResponse401.from_dict(json.loads(response.text)) + + return response_401 + if response.status_code == HTTPStatus.NOT_FOUND: + response_404 = QueriesReportsResponse404.from_dict(json.loads(response.text)) + + return response_404 + if response.status_code == HTTPStatus.INTERNAL_SERVER_ERROR: + response_500 = QueriesReportsResponse500.from_dict(json.loads(response.text)) + + return response_500 + if client.raise_on_unexpected_status: + raise errors.UnexpectedStatus(response.status_code, response.content) + else: + return None + + +def _build_response(*, client: {}, response: None, content: Optional[bytes] = None) -> Response[ + Union[ + QueriesReportsResponse200, + QueriesReportsResponse400, + QueriesReportsResponse401, + QueriesReportsResponse404, + QueriesReportsResponse500, + ] +]: + parse = _parse_response(client=client, response=response) + return Response( + status_code=HTTPStatus(response.status_code), + content=response.content if content is None else content, + headers=response.headers, + parsed=parse, + ) + + +def sync_detailed( + project_id: int, + *, + client: {}, + filters: List[QueriesReportsFiltersItem], +): + """Provide summary of overall query metrics accross all conversations. + + Args: + project_id (int): Example: 1. + filters (List[QueriesReportsFiltersItem]): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[Union[QueriesReportsResponse200, QueriesReportsResponse400, QueriesReportsResponse401, QueriesReportsResponse404, QueriesReportsResponse500]] + """ + + kwargs = _get_kwargs( + project_id=project_id, + client=client, + filters=filters, + ) + + response = requests.request( + **kwargs, + ) + + return _build_response(client=client, response=response) + + +def sync( + project_id: int, + *, + client: {}, + filters: List[QueriesReportsFiltersItem], +) -> Optional[ + Union[ + QueriesReportsResponse200, + QueriesReportsResponse400, + QueriesReportsResponse401, + QueriesReportsResponse404, + QueriesReportsResponse500, + ] +]: + """Provide summary of overall query metrics accross all conversations. + + Args: + project_id (int): Example: 1. + filters (List[QueriesReportsFiltersItem]): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Union[QueriesReportsResponse200, QueriesReportsResponse400, QueriesReportsResponse401, QueriesReportsResponse404, QueriesReportsResponse500] + """ + + return sync_detailed( + project_id=project_id, + client=client, + filters=filters, + ).parsed + + +async def asyncio_detailed( + project_id: int, + *, + client: {}, + filters: List[QueriesReportsFiltersItem], +) -> Response[ + Union[ + QueriesReportsResponse200, + QueriesReportsResponse400, + QueriesReportsResponse401, + QueriesReportsResponse404, + QueriesReportsResponse500, + ] +]: + + kwargs = _get_kwargs( + project_id=project_id, + client=client, + filters=filters, + ) + + response = requests.request( + **kwargs, + ) + + return _build_response(client=client, response=response) + + +async def asyncio( + project_id: int, + *, + client: {}, + filters: List[QueriesReportsFiltersItem], +) -> Optional[ + Union[ + QueriesReportsResponse200, + QueriesReportsResponse400, + QueriesReportsResponse401, + QueriesReportsResponse404, + QueriesReportsResponse500, + ] +]: + """Provide summary of overall query metrics accross all conversations. + + Args: + project_id (int): Example: 1. + filters (List[QueriesReportsFiltersItem]): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Union[QueriesReportsResponse200, QueriesReportsResponse400, QueriesReportsResponse401, QueriesReportsResponse404, QueriesReportsResponse500] + """ + + return ( + await asyncio_detailed( + project_id=project_id, + client=client, + filters=filters, + ) + ).parsed diff --git a/customgpt-client/customgpt_client/api/reports_analytics/traffic_reports.py b/customgpt-client/customgpt_client/api/reports_analytics/traffic_reports.py new file mode 100644 index 0000000..975a9df --- /dev/null +++ b/customgpt-client/customgpt_client/api/reports_analytics/traffic_reports.py @@ -0,0 +1,248 @@ +import json +from http import HTTPStatus +from typing import Any, Dict, List, Optional, Union + +import requests + +from ... import errors +from ...models.traffic_reports_filters_item import TrafficReportsFiltersItem +from ...models.traffic_reports_response_200 import TrafficReportsResponse200 +from ...models.traffic_reports_response_400 import TrafficReportsResponse400 +from ...models.traffic_reports_response_401 import TrafficReportsResponse401 +from ...models.traffic_reports_response_404 import TrafficReportsResponse404 +from ...models.traffic_reports_response_500 import TrafficReportsResponse500 +from ...types import UNSET, Response + + +def _get_kwargs( + project_id: int, + *, + client: {}, + filters: List[TrafficReportsFiltersItem], +) -> Dict[str, Any]: + url = "{}/api/v1/projects/{projectId}/reports/traffic".format(client.base_url, projectId=project_id) + + headers: Dict[str, str] = client.get_headers() + cookies: Dict[str, Any] = client.get_cookies() + + params: Dict[str, Any] = {} + json_filters = [] + for filters_item_data in filters: + filters_item = filters_item_data + + json_filters.append(filters_item) + + params["filters"] = json_filters + + params = {k: v for k, v in params.items() if v is not UNSET and v is not None} + + return { + "method": "get", + "url": url, + "headers": headers, + "cookies": cookies, + "timeout": client.get_timeout(), + "allow_redirects": client.follow_redirects, + "params": params, + } + + +def _parse_response(*, client: {}, response: None) -> Optional[ + Union[ + TrafficReportsResponse200, + TrafficReportsResponse400, + TrafficReportsResponse401, + TrafficReportsResponse404, + TrafficReportsResponse500, + ] +]: + if response.status_code == HTTPStatus.OK: + response_200 = TrafficReportsResponse200.from_dict(json.loads(response.text)) + + return response_200 + if response.status_code == HTTPStatus.BAD_REQUEST: + response_400 = TrafficReportsResponse400.from_dict(json.loads(response.text)) + + return response_400 + if response.status_code == HTTPStatus.UNAUTHORIZED: + response_401 = TrafficReportsResponse401.from_dict(json.loads(response.text)) + + return response_401 + if response.status_code == HTTPStatus.NOT_FOUND: + response_404 = TrafficReportsResponse404.from_dict(json.loads(response.text)) + + return response_404 + if response.status_code == HTTPStatus.INTERNAL_SERVER_ERROR: + response_500 = TrafficReportsResponse500.from_dict(json.loads(response.text)) + + return response_500 + if client.raise_on_unexpected_status: + raise errors.UnexpectedStatus(response.status_code, response.content) + else: + return None + + +def _build_response(*, client: {}, response: None, content: Optional[bytes] = None) -> Response[ + Union[ + TrafficReportsResponse200, + TrafficReportsResponse400, + TrafficReportsResponse401, + TrafficReportsResponse404, + TrafficReportsResponse500, + ] +]: + parse = _parse_response(client=client, response=response) + return Response( + status_code=HTTPStatus(response.status_code), + content=response.content if content is None else content, + headers=response.headers, + parsed=parse, + ) + + +def sync_detailed( + project_id: int, + *, + client: {}, + filters: List[TrafficReportsFiltersItem], +): + """Provide summary of various metrics of users interactions with the application. + + Provide summary of various metrics of users interactions with the application such as the users + number (both named and anonymous), + their geographical locations, the browsers they use, and the sources from which they arrived at the + application. + + Args: + project_id (int): Example: 1. + filters (List[TrafficReportsFiltersItem]): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[Union[TrafficReportsResponse200, TrafficReportsResponse400, TrafficReportsResponse401, TrafficReportsResponse404, TrafficReportsResponse500]] + """ + + kwargs = _get_kwargs( + project_id=project_id, + client=client, + filters=filters, + ) + + response = requests.request( + **kwargs, + ) + + return _build_response(client=client, response=response) + + +def sync( + project_id: int, + *, + client: {}, + filters: List[TrafficReportsFiltersItem], +) -> Optional[ + Union[ + TrafficReportsResponse200, + TrafficReportsResponse400, + TrafficReportsResponse401, + TrafficReportsResponse404, + TrafficReportsResponse500, + ] +]: + """Provide summary of various metrics of users interactions with the application. + + Provide summary of various metrics of users interactions with the application such as the users + number (both named and anonymous), + their geographical locations, the browsers they use, and the sources from which they arrived at the + application. + + Args: + project_id (int): Example: 1. + filters (List[TrafficReportsFiltersItem]): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Union[TrafficReportsResponse200, TrafficReportsResponse400, TrafficReportsResponse401, TrafficReportsResponse404, TrafficReportsResponse500] + """ + + return sync_detailed( + project_id=project_id, + client=client, + filters=filters, + ).parsed + + +async def asyncio_detailed( + project_id: int, + *, + client: {}, + filters: List[TrafficReportsFiltersItem], +) -> Response[ + Union[ + TrafficReportsResponse200, + TrafficReportsResponse400, + TrafficReportsResponse401, + TrafficReportsResponse404, + TrafficReportsResponse500, + ] +]: + + kwargs = _get_kwargs( + project_id=project_id, + client=client, + filters=filters, + ) + + response = requests.request( + **kwargs, + ) + + return _build_response(client=client, response=response) + + +async def asyncio( + project_id: int, + *, + client: {}, + filters: List[TrafficReportsFiltersItem], +) -> Optional[ + Union[ + TrafficReportsResponse200, + TrafficReportsResponse400, + TrafficReportsResponse401, + TrafficReportsResponse404, + TrafficReportsResponse500, + ] +]: + """Provide summary of various metrics of users interactions with the application. + + Provide summary of various metrics of users interactions with the application such as the users + number (both named and anonymous), + their geographical locations, the browsers they use, and the sources from which they arrived at the + application. + + Args: + project_id (int): Example: 1. + filters (List[TrafficReportsFiltersItem]): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Union[TrafficReportsResponse200, TrafficReportsResponse400, TrafficReportsResponse401, TrafficReportsResponse404, TrafficReportsResponse500] + """ + + return ( + await asyncio_detailed( + project_id=project_id, + client=client, + filters=filters, + ) + ).parsed diff --git a/customgpt-client/customgpt_client/api/sources/create_source.py b/customgpt-client/customgpt_client/api/sources/create_source.py index ee159dc..7904d4a 100644 --- a/customgpt-client/customgpt_client/api/sources/create_source.py +++ b/customgpt-client/customgpt_client/api/sources/create_source.py @@ -38,9 +38,7 @@ def _get_kwargs( } -def _parse_response( - *, client: {}, response: None -) -> Optional[ +def _parse_response(*, client: {}, response: None) -> Optional[ Union[ CreateSourceResponse201, CreateSourceResponse400, @@ -75,9 +73,7 @@ def _parse_response( return None -def _build_response( - *, client: {}, response: None, content: Optional[bytes] = None -) -> Response[ +def _build_response(*, client: {}, response: None, content: Optional[bytes] = None) -> Response[ Union[ CreateSourceResponse201, CreateSourceResponse400, @@ -193,6 +189,7 @@ async def asyncio_detailed( CreateSourceResponse500, ] ]: + kwargs = _get_kwargs( project_id=project_id, client=client, diff --git a/customgpt-client/customgpt_client/api/sources/delete_source.py b/customgpt-client/customgpt_client/api/sources/delete_source.py index 3c7c877..cf47c75 100644 --- a/customgpt-client/customgpt_client/api/sources/delete_source.py +++ b/customgpt-client/customgpt_client/api/sources/delete_source.py @@ -36,9 +36,7 @@ def _get_kwargs( } -def _parse_response( - *, client: {}, response: None -) -> Optional[ +def _parse_response(*, client: {}, response: None) -> Optional[ Union[ DeleteSourceResponse200, DeleteSourceResponse400, @@ -73,9 +71,7 @@ def _parse_response( return None -def _build_response( - *, client: {}, response: None, content: Optional[bytes] = None -) -> Response[ +def _build_response(*, client: {}, response: None, content: Optional[bytes] = None) -> Response[ Union[ DeleteSourceResponse200, DeleteSourceResponse400, @@ -179,6 +175,7 @@ async def asyncio_detailed( DeleteSourceResponse500, ] ]: + kwargs = _get_kwargs( project_id=project_id, source_id=source_id, diff --git a/customgpt-client/customgpt_client/api/sources/list_sources.py b/customgpt-client/customgpt_client/api/sources/list_sources.py index c3239a8..0c19c60 100644 --- a/customgpt-client/customgpt_client/api/sources/list_sources.py +++ b/customgpt-client/customgpt_client/api/sources/list_sources.py @@ -6,9 +6,7 @@ from ... import errors from ...models.list_sources_response_200 import ListSourcesResponse200 -from ...models.list_sources_response_400 import ListSourcesResponse400 from ...models.list_sources_response_401 import ListSourcesResponse401 -from ...models.list_sources_response_404 import ListSourcesResponse404 from ...models.list_sources_response_500 import ListSourcesResponse500 from ...types import Response @@ -35,31 +33,15 @@ def _get_kwargs( def _parse_response( *, client: {}, response: None -) -> Optional[ - Union[ - ListSourcesResponse200, - ListSourcesResponse400, - ListSourcesResponse401, - ListSourcesResponse404, - ListSourcesResponse500, - ] -]: +) -> Optional[Union[ListSourcesResponse200, ListSourcesResponse401, ListSourcesResponse500]]: if response.status_code == HTTPStatus.OK: response_200 = ListSourcesResponse200.from_dict(json.loads(response.text)) return response_200 - if response.status_code == HTTPStatus.BAD_REQUEST: - response_400 = ListSourcesResponse400.from_dict(json.loads(response.text)) - - return response_400 if response.status_code == HTTPStatus.UNAUTHORIZED: response_401 = ListSourcesResponse401.from_dict(json.loads(response.text)) return response_401 - if response.status_code == HTTPStatus.NOT_FOUND: - response_404 = ListSourcesResponse404.from_dict(json.loads(response.text)) - - return response_404 if response.status_code == HTTPStatus.INTERNAL_SERVER_ERROR: response_500 = ListSourcesResponse500.from_dict(json.loads(response.text)) @@ -72,15 +54,7 @@ def _parse_response( def _build_response( *, client: {}, response: None, content: Optional[bytes] = None -) -> Response[ - Union[ - ListSourcesResponse200, - ListSourcesResponse400, - ListSourcesResponse401, - ListSourcesResponse404, - ListSourcesResponse500, - ] -]: +) -> Response[Union[ListSourcesResponse200, ListSourcesResponse401, ListSourcesResponse500]]: parse = _parse_response(client=client, response=response) return Response( status_code=HTTPStatus(response.status_code), @@ -109,7 +83,7 @@ def sync_detailed( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Response[Union[ListSourcesResponse200, ListSourcesResponse400, ListSourcesResponse401, ListSourcesResponse404, ListSourcesResponse500]] + Response[Union[ListSourcesResponse200, ListSourcesResponse401, ListSourcesResponse500]] """ kwargs = _get_kwargs( @@ -128,15 +102,7 @@ def sync( project_id: int, *, client: {}, -) -> Optional[ - Union[ - ListSourcesResponse200, - ListSourcesResponse400, - ListSourcesResponse401, - ListSourcesResponse404, - ListSourcesResponse500, - ] -]: +) -> Optional[Union[ListSourcesResponse200, ListSourcesResponse401, ListSourcesResponse500]]: """List a certain project's sources. Retrieve a list of all sources associated with a given project. This endpoint provides a collection @@ -151,7 +117,7 @@ def sync( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Union[ListSourcesResponse200, ListSourcesResponse400, ListSourcesResponse401, ListSourcesResponse404, ListSourcesResponse500] + Union[ListSourcesResponse200, ListSourcesResponse401, ListSourcesResponse500] """ return sync_detailed( @@ -164,15 +130,8 @@ async def asyncio_detailed( project_id: int, *, client: {}, -) -> Response[ - Union[ - ListSourcesResponse200, - ListSourcesResponse400, - ListSourcesResponse401, - ListSourcesResponse404, - ListSourcesResponse500, - ] -]: +) -> Response[Union[ListSourcesResponse200, ListSourcesResponse401, ListSourcesResponse500]]: + kwargs = _get_kwargs( project_id=project_id, client=client, @@ -189,15 +148,7 @@ async def asyncio( project_id: int, *, client: {}, -) -> Optional[ - Union[ - ListSourcesResponse200, - ListSourcesResponse400, - ListSourcesResponse401, - ListSourcesResponse404, - ListSourcesResponse500, - ] -]: +) -> Optional[Union[ListSourcesResponse200, ListSourcesResponse401, ListSourcesResponse500]]: """List a certain project's sources. Retrieve a list of all sources associated with a given project. This endpoint provides a collection @@ -212,7 +163,7 @@ async def asyncio( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Union[ListSourcesResponse200, ListSourcesResponse400, ListSourcesResponse401, ListSourcesResponse404, ListSourcesResponse500] + Union[ListSourcesResponse200, ListSourcesResponse401, ListSourcesResponse500] """ return ( diff --git a/customgpt-client/customgpt_client/api/sources/synchronize_source.py b/customgpt-client/customgpt_client/api/sources/synchronize_source.py new file mode 100644 index 0000000..1a67c7b --- /dev/null +++ b/customgpt-client/customgpt_client/api/sources/synchronize_source.py @@ -0,0 +1,232 @@ +import json +from http import HTTPStatus +from typing import Any, Dict, Optional, Union + +import requests + +from ... import errors +from ...models.synchronize_source_response_201 import SynchronizeSourceResponse201 +from ...models.synchronize_source_response_400 import SynchronizeSourceResponse400 +from ...models.synchronize_source_response_401 import SynchronizeSourceResponse401 +from ...models.synchronize_source_response_403 import SynchronizeSourceResponse403 +from ...models.synchronize_source_response_404 import SynchronizeSourceResponse404 +from ...models.synchronize_source_response_500 import SynchronizeSourceResponse500 +from ...types import Response + + +def _get_kwargs( + project_id: int, + source_id: int, + *, + client: {}, +) -> Dict[str, Any]: + url = "{}/api/v1/projects/{projectId}/sources/{sourceId}/instant-sync".format( + client.base_url, projectId=project_id, sourceId=source_id + ) + + headers: Dict[str, str] = client.get_headers() + cookies: Dict[str, Any] = client.get_cookies() + + return { + "method": "put", + "url": url, + "headers": headers, + "cookies": cookies, + "timeout": client.get_timeout(), + "allow_redirects": client.follow_redirects, + } + + +def _parse_response(*, client: {}, response: None) -> Optional[ + Union[ + SynchronizeSourceResponse201, + SynchronizeSourceResponse400, + SynchronizeSourceResponse401, + SynchronizeSourceResponse403, + SynchronizeSourceResponse404, + SynchronizeSourceResponse500, + ] +]: + if response.status_code == HTTPStatus.CREATED: + response_201 = SynchronizeSourceResponse201.from_dict(json.loads(response.text)) + + return response_201 + if response.status_code == HTTPStatus.BAD_REQUEST: + response_400 = SynchronizeSourceResponse400.from_dict(json.loads(response.text)) + + return response_400 + if response.status_code == HTTPStatus.UNAUTHORIZED: + response_401 = SynchronizeSourceResponse401.from_dict(json.loads(response.text)) + + return response_401 + if response.status_code == HTTPStatus.FORBIDDEN: + response_403 = SynchronizeSourceResponse403.from_dict(json.loads(response.text)) + + return response_403 + if response.status_code == HTTPStatus.NOT_FOUND: + response_404 = SynchronizeSourceResponse404.from_dict(json.loads(response.text)) + + return response_404 + if response.status_code == HTTPStatus.INTERNAL_SERVER_ERROR: + response_500 = SynchronizeSourceResponse500.from_dict(json.loads(response.text)) + + return response_500 + if client.raise_on_unexpected_status: + raise errors.UnexpectedStatus(response.status_code, response.content) + else: + return None + + +def _build_response(*, client: {}, response: None, content: Optional[bytes] = None) -> Response[ + Union[ + SynchronizeSourceResponse201, + SynchronizeSourceResponse400, + SynchronizeSourceResponse401, + SynchronizeSourceResponse403, + SynchronizeSourceResponse404, + SynchronizeSourceResponse500, + ] +]: + parse = _parse_response(client=client, response=response) + return Response( + status_code=HTTPStatus(response.status_code), + content=response.content if content is None else content, + headers=response.headers, + parsed=parse, + ) + + +def sync_detailed( + project_id: int, + source_id: int, + *, + client: {}, +): + """Instant sync the specified sitemap + + Args: + project_id (int): + source_id (int): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[Union[SynchronizeSourceResponse201, SynchronizeSourceResponse400, SynchronizeSourceResponse401, SynchronizeSourceResponse403, SynchronizeSourceResponse404, SynchronizeSourceResponse500]] + """ + + kwargs = _get_kwargs( + project_id=project_id, + source_id=source_id, + client=client, + ) + + response = requests.request( + **kwargs, + ) + + return _build_response(client=client, response=response) + + +def sync( + project_id: int, + source_id: int, + *, + client: {}, +) -> Optional[ + Union[ + SynchronizeSourceResponse201, + SynchronizeSourceResponse400, + SynchronizeSourceResponse401, + SynchronizeSourceResponse403, + SynchronizeSourceResponse404, + SynchronizeSourceResponse500, + ] +]: + """Instant sync the specified sitemap + + Args: + project_id (int): + source_id (int): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Union[SynchronizeSourceResponse201, SynchronizeSourceResponse400, SynchronizeSourceResponse401, SynchronizeSourceResponse403, SynchronizeSourceResponse404, SynchronizeSourceResponse500] + """ + + return sync_detailed( + project_id=project_id, + source_id=source_id, + client=client, + ).parsed + + +async def asyncio_detailed( + project_id: int, + source_id: int, + *, + client: {}, +) -> Response[ + Union[ + SynchronizeSourceResponse201, + SynchronizeSourceResponse400, + SynchronizeSourceResponse401, + SynchronizeSourceResponse403, + SynchronizeSourceResponse404, + SynchronizeSourceResponse500, + ] +]: + + kwargs = _get_kwargs( + project_id=project_id, + source_id=source_id, + client=client, + ) + + response = requests.request( + **kwargs, + ) + + return _build_response(client=client, response=response) + + +async def asyncio( + project_id: int, + source_id: int, + *, + client: {}, +) -> Optional[ + Union[ + SynchronizeSourceResponse201, + SynchronizeSourceResponse400, + SynchronizeSourceResponse401, + SynchronizeSourceResponse403, + SynchronizeSourceResponse404, + SynchronizeSourceResponse500, + ] +]: + """Instant sync the specified sitemap + + Args: + project_id (int): + source_id (int): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Union[SynchronizeSourceResponse201, SynchronizeSourceResponse400, SynchronizeSourceResponse401, SynchronizeSourceResponse403, SynchronizeSourceResponse404, SynchronizeSourceResponse500] + """ + + return ( + await asyncio_detailed( + project_id=project_id, + source_id=source_id, + client=client, + ) + ).parsed diff --git a/customgpt-client/customgpt_client/api/sources/update_source.py b/customgpt-client/customgpt_client/api/sources/update_source.py new file mode 100644 index 0000000..3be8d03 --- /dev/null +++ b/customgpt-client/customgpt_client/api/sources/update_source.py @@ -0,0 +1,244 @@ +import json +from http import HTTPStatus +from typing import Any, Dict, Optional, Union + +import requests + +from ... import errors +from ...models.update_source_json_body import UpdateSourceJsonBody +from ...models.update_source_response_201 import UpdateSourceResponse201 +from ...models.update_source_response_400 import UpdateSourceResponse400 +from ...models.update_source_response_401 import UpdateSourceResponse401 +from ...models.update_source_response_404 import UpdateSourceResponse404 +from ...models.update_source_response_500 import UpdateSourceResponse500 +from ...types import Response + + +def _get_kwargs( + project_id: int, + source_id: int, + *, + client: {}, + json_body: UpdateSourceJsonBody, +) -> Dict[str, Any]: + url = "{}/api/v1/projects/{projectId}/sources/{sourceId}".format( + client.base_url, projectId=project_id, sourceId=source_id + ) + + headers: Dict[str, str] = client.get_headers() + cookies: Dict[str, Any] = client.get_cookies() + + json_json_body = json_body.to_dict() + + return { + "method": "put", + "url": url, + "headers": headers, + "cookies": cookies, + "timeout": client.get_timeout(), + "allow_redirects": client.follow_redirects, + "json": json_json_body, + } + + +def _parse_response(*, client: {}, response: None) -> Optional[ + Union[ + UpdateSourceResponse201, + UpdateSourceResponse400, + UpdateSourceResponse401, + UpdateSourceResponse404, + UpdateSourceResponse500, + ] +]: + if response.status_code == HTTPStatus.CREATED: + response_201 = UpdateSourceResponse201.from_dict(json.loads(response.text)) + + return response_201 + if response.status_code == HTTPStatus.BAD_REQUEST: + response_400 = UpdateSourceResponse400.from_dict(json.loads(response.text)) + + return response_400 + if response.status_code == HTTPStatus.UNAUTHORIZED: + response_401 = UpdateSourceResponse401.from_dict(json.loads(response.text)) + + return response_401 + if response.status_code == HTTPStatus.NOT_FOUND: + response_404 = UpdateSourceResponse404.from_dict(json.loads(response.text)) + + return response_404 + if response.status_code == HTTPStatus.INTERNAL_SERVER_ERROR: + response_500 = UpdateSourceResponse500.from_dict(json.loads(response.text)) + + return response_500 + if client.raise_on_unexpected_status: + raise errors.UnexpectedStatus(response.status_code, response.content) + else: + return None + + +def _build_response(*, client: {}, response: None, content: Optional[bytes] = None) -> Response[ + Union[ + UpdateSourceResponse201, + UpdateSourceResponse400, + UpdateSourceResponse401, + UpdateSourceResponse404, + UpdateSourceResponse500, + ] +]: + parse = _parse_response(client=client, response=response) + return Response( + status_code=HTTPStatus(response.status_code), + content=response.content if content is None else content, + headers=response.headers, + parsed=parse, + ) + + +def sync_detailed( + project_id: int, + source_id: int, + *, + client: {}, + json_body: UpdateSourceJsonBody, +): + """Update project source settings. + + Update a data source settings, allowing you to change additional settings. + + Args: + project_id (int): + source_id (int): + json_body (UpdateSourceJsonBody): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[Union[UpdateSourceResponse201, UpdateSourceResponse400, UpdateSourceResponse401, UpdateSourceResponse404, UpdateSourceResponse500]] + """ + + kwargs = _get_kwargs( + project_id=project_id, + source_id=source_id, + client=client, + json_body=json_body, + ) + + response = requests.request( + **kwargs, + ) + + return _build_response(client=client, response=response) + + +def sync( + project_id: int, + source_id: int, + *, + client: {}, + json_body: UpdateSourceJsonBody, +) -> Optional[ + Union[ + UpdateSourceResponse201, + UpdateSourceResponse400, + UpdateSourceResponse401, + UpdateSourceResponse404, + UpdateSourceResponse500, + ] +]: + """Update project source settings. + + Update a data source settings, allowing you to change additional settings. + + Args: + project_id (int): + source_id (int): + json_body (UpdateSourceJsonBody): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Union[UpdateSourceResponse201, UpdateSourceResponse400, UpdateSourceResponse401, UpdateSourceResponse404, UpdateSourceResponse500] + """ + + return sync_detailed( + project_id=project_id, + source_id=source_id, + client=client, + json_body=json_body, + ).parsed + + +async def asyncio_detailed( + project_id: int, + source_id: int, + *, + client: {}, + json_body: UpdateSourceJsonBody, +) -> Response[ + Union[ + UpdateSourceResponse201, + UpdateSourceResponse400, + UpdateSourceResponse401, + UpdateSourceResponse404, + UpdateSourceResponse500, + ] +]: + + kwargs = _get_kwargs( + project_id=project_id, + source_id=source_id, + client=client, + json_body=json_body, + ) + + response = requests.request( + **kwargs, + ) + + return _build_response(client=client, response=response) + + +async def asyncio( + project_id: int, + source_id: int, + *, + client: {}, + json_body: UpdateSourceJsonBody, +) -> Optional[ + Union[ + UpdateSourceResponse201, + UpdateSourceResponse400, + UpdateSourceResponse401, + UpdateSourceResponse404, + UpdateSourceResponse500, + ] +]: + """Update project source settings. + + Update a data source settings, allowing you to change additional settings. + + Args: + project_id (int): + source_id (int): + json_body (UpdateSourceJsonBody): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Union[UpdateSourceResponse201, UpdateSourceResponse400, UpdateSourceResponse401, UpdateSourceResponse404, UpdateSourceResponse500] + """ + + return ( + await asyncio_detailed( + project_id=project_id, + source_id=source_id, + client=client, + json_body=json_body, + ) + ).parsed diff --git a/customgpt-client/customgpt_client/api/users/get_user.py b/customgpt-client/customgpt_client/api/users/get_user.py index 264f8e3..93c20b1 100644 --- a/customgpt-client/customgpt_client/api/users/get_user.py +++ b/customgpt-client/customgpt_client/api/users/get_user.py @@ -119,6 +119,7 @@ async def asyncio_detailed( *, client: {}, ) -> Response[Union[GetUserResponse200, GetUserResponse401, GetUserResponse500]]: + kwargs = _get_kwargs( client=client, ) diff --git a/customgpt-client/customgpt_client/api/users/update_user.py b/customgpt-client/customgpt_client/api/users/update_user.py index 6ab3299..8df59b5 100644 --- a/customgpt-client/customgpt_client/api/users/update_user.py +++ b/customgpt-client/customgpt_client/api/users/update_user.py @@ -133,6 +133,7 @@ async def asyncio_detailed( client: {}, multipart_data: UpdateUserMultipartData, ) -> Response[Union[UpdateUserResponse200, UpdateUserResponse401, UpdateUserResponse500]]: + kwargs = _get_kwargs( client=client, multipart_data=multipart_data, diff --git a/customgpt-client/customgpt_client/client.py b/customgpt-client/customgpt_client/client.py index 9f744b2..68d818b 100644 --- a/customgpt-client/customgpt_client/client.py +++ b/customgpt-client/customgpt_client/client.py @@ -1,5 +1,3 @@ -# Imports - import ssl from typing import Any, Dict, Union @@ -14,19 +12,27 @@ send_message, update_conversation, ) -from customgpt_client.api.page_metadata import get_page_metadata, update_page_metadata +from customgpt_client.api.limits import get_api_v1_limits_usage +from customgpt_client.api.page_metadata import get_metadata, update_metadata from customgpt_client.api.pages import delete_page, get_pages, preview_citation, reindex_page from customgpt_client.api.project_plugins import create_plugin, get_plugin, update_plugin -from customgpt_client.api.project_settings import get_settings, update_settings +from customgpt_client.api.project_settings import get_project_settings, update_project_settings from customgpt_client.api.projects import ( create_project, delete_project, get_project, list_projects, + replicate_project, stats_project, update_project, ) -from customgpt_client.api.sources import create_source, delete_source, list_sources +from customgpt_client.api.reports_analytics import ( + analysis_reports, + conversations_reports, + queries_reports, + traffic_reports, +) +from customgpt_client.api.sources import create_source, delete_source, list_sources, synchronize_source, update_source from customgpt_client.api.users import get_user, update_user from customgpt_client.models import ( CreateConversationJsonBody, @@ -35,22 +41,22 @@ CreateSourceMultipartData, SendMessageJsonBody, UpdateConversationJsonBody, - UpdatePageMetadataJsonBody, + UpdateMetadataJsonBody, UpdatePluginJsonBody, UpdateProjectMultipartData, - UpdateSettingsMultipartData, + UpdateProjectSettingsMultipartData, + UpdateSourceJsonBody, UpdateUserMultipartData, ) -# Initialize the client def set_client(): api_key = CustomGPT.api_key if hasattr(CustomGPT, "api_key") else "" base_url = CustomGPT.base_url if hasattr(CustomGPT, "base_url") else "https://app.customgpt.ai" timeout = CustomGPT.timeout if hasattr(CustomGPT, "timeout") else 100.0 - return CustomGPT(api_key=api_key, base_url=base_url, timeout=timeout) + headers = CustomGPT.headers if hasattr(CustomGPT, "headers") else {} + return CustomGPT(api_key=api_key, base_url=base_url, timeout=timeout, headers=headers) -# Function to retrieve data from kwargs def pluck_data(fields, kwargs): json = {} @@ -110,10 +116,6 @@ def get_headers(self) -> Dict[str, str]: auth_header_value = f"{self.prefix} {self.api_key}" if self.prefix else self.api_key return {self.auth_header_name: auth_header_value, **self.headers} -# Class for representing the Project object of the CustomGPT API -# The Project object contains methods for creating, updating, deleting, and listing projects, -# both synchronously and asynchronously - class Project: def list(*args: Any, **kwargs: Any): client = set_client() @@ -127,7 +129,7 @@ def alist(*args: Any, **kwargs: Any): def create(*args: Any, **kwargs: Any): client = set_client() - fields = ["project_name", "sitemap_path", "file_data_retension", "file"] + fields = ["project_name", "sitemap_path", "file_data_retension", "is_ocr_enabled", "is_anonymized", "file"] json = pluck_data(fields, kwargs) kwargs["multipart_data"] = CreateProjectMultipartData(**json) @@ -135,7 +137,7 @@ def create(*args: Any, **kwargs: Any): def acreate(*args: Any, **kwargs: Any): client = set_client() - fields = ["project_name", "sitemap_path", "file_data_retension", "file"] + fields = ["project_name", "sitemap_path", "file_data_retension", "is_ocr_enabled", "is_anonymized", "file"] json = pluck_data(fields, kwargs) kwargs["multipart_data"] = CreateProjectMultipartData(**json) @@ -153,7 +155,15 @@ def aget(*args: Any, **kwargs: Any): def update(*args: Any, **kwargs: Any): client = set_client() - fields = ["project_name", "is_shared", "sitemap_path", "file_data_retension", "file"] + fields = [ + "project_name", + "is_shared", + "sitemap_path", + "file_data_retension", + "is_ocr_enabled", + "is_anonymized", + "file", + ] json = pluck_data(fields, kwargs) kwargs["multipart_data"] = UpdateProjectMultipartData(**json) @@ -161,7 +171,15 @@ def update(*args: Any, **kwargs: Any): def aupdate(*args: Any, **kwargs: Any): client = set_client() - fields = ["project_name", "is_shared", "sitemap_path", "file_data_retension", "file"] + fields = [ + "project_name", + "is_shared", + "sitemap_path", + "file_data_retension", + "is_ocr_enabled", + "is_anonymized", + "file", + ] json = pluck_data(fields, kwargs) kwargs["multipart_data"] = UpdateProjectMultipartData(**json) @@ -177,6 +195,16 @@ def adelete(*args: Any, **kwargs: Any): return delete_project.asyncio_detailed(client=client, *args, **kwargs) + def replicate(*args: Any, **kwargs: Any): + client = set_client() + + return replicate_project.sync_detailed(client=client, *args, **kwargs) + + def areplicate(*args: Any, **kwargs: Any): + client = set_client() + + return replicate_project.asyncio_detailed(client=client, *args, **kwargs) + def stats(*args: Any, **kwargs: Any): client = set_client() @@ -187,10 +215,6 @@ def astats(*args: Any, **kwargs: Any): return stats_project.asyncio_detailed(client=client, *args, **kwargs) -# Class for representing the Page object of the CustomGPT API -# The Page object contains methods for getting, deleting, reindexing, and previewing pages, -# both synchronously and asynchronously - class Page: def get(*args: Any, **kwargs: Any): client = set_client() @@ -232,51 +256,43 @@ def apreview(*args: Any, **kwargs: Any): return preview_citation.asyncio_detailed(client=client, *args, **kwargs) -# Class for representing the PageMetadata object of the CustomGPT API -# The PageMetadata object contains methods for getting and updating page metadata, -# both synchronously and asynchronously - class PageMetadata: def get(*args: Any, **kwargs: Any): client = set_client() - return get_page_metadata.sync_detailed(client=client, *args, **kwargs) + return get_metadata.sync_detailed(client=client, *args, **kwargs) def aget(*args: Any, **kwargs: Any): client = set_client() - return get_page_metadata.asyncio_detailed(client=client, *args, **kwargs) + return get_metadata.asyncio_detailed(client=client, *args, **kwargs) def update(*args: Any, **kwargs: Any): client = set_client() fields = ["title", "url", "description", "image"] json = pluck_data(fields, kwargs) - kwargs["json_body"] = UpdatePageMetadataJsonBody(**json) + kwargs["json_body"] = UpdateMetadataJsonBody(**json) - return update_page_metadata.sync_detailed(client=client, *args, **kwargs) + return update_metadata.sync_detailed(client=client, *args, **kwargs) def aupdate(*args: Any, **kwargs: Any): client = set_client() fields = ["title", "url", "description", "image"] json = pluck_data(fields, kwargs) - kwargs["json_body"] = UpdatePageMetadataJsonBody(**json) - - return update_page_metadata.asyncio_detailed(client=client, *args, **kwargs) + kwargs["json_body"] = UpdateMetadataJsonBody(**json) -# Class for representing the ProjectSettings object of the CustomGPT API -# The ProjectSettings object contains methods for getting and updating project settings, -# both synchronously and asynchronously + return update_metadata.asyncio_detailed(client=client, *args, **kwargs) class ProjectSettings: def get(*args: Any, **kwargs: Any): client = set_client() - return get_settings.sync_detailed(client=client, *args, **kwargs) + return get_project_settings.sync_detailed(client=client, *args, **kwargs) def aget(*args: Any, **kwargs: Any): client = set_client() - return get_settings.asyncio_detailed(client=client, *args, **kwargs) + return get_project_settings.asyncio_detailed(client=client, *args, **kwargs) def update(*args: Any, **kwargs: Any): client = set_client() @@ -288,6 +304,7 @@ def update(*args: Any, **kwargs: Any): "response_source", "chatbot_msg_lang", "chatbot_color", + "chatbot_toolbar_color", "persona_instructions", "citations_answer_source_label_msg", "citations_sources_label_msg", @@ -295,15 +312,19 @@ def update(*args: Any, **kwargs: Any): "chatbot_siesta_msg", "is_loading_indicator_enabled", "enable_citations", + "enable_feedbacks", "citations_view_type", "no_answer_message", "ending_message", "remove_branding", + "enable_recaptcha_for_public_chatbots", + "chatbot_model", + "is_selling_enabled", ] json = pluck_data(fields, kwargs) - kwargs["multipart_data"] = UpdateSettingsMultipartData(**json) + kwargs["multipart_data"] = UpdateProjectSettingsMultipartData(**json) - return update_settings.sync_detailed(client=client, *args, **kwargs) + return update_project_settings.sync_detailed(client=client, *args, **kwargs) def aupdate(*args: Any, **kwargs: Any): client = set_client() @@ -315,6 +336,7 @@ def aupdate(*args: Any, **kwargs: Any): "response_source", "chatbot_msg_lang", "chatbot_color", + "chatbot_toolbar_color", "persona_instructions", "citations_answer_source_label_msg", "citations_sources_label_msg", @@ -322,20 +344,19 @@ def aupdate(*args: Any, **kwargs: Any): "chatbot_siesta_msg", "is_loading_indicator_enabled", "enable_citations", + "enable_feedbacks", "citations_view_type", "no_answer_message", "ending_message", "remove_branding", + "enable_recaptcha_for_public_chatbots", + "chatbot_model", + "is_selling_enabled", ] json = pluck_data(fields, kwargs) - kwargs["multipart_data"] = UpdateSettingsMultipartData(**json) + kwargs["multipart_data"] = UpdateProjectSettingsMultipartData(**json) - return update_settings.asyncio_detailed(client=client, *args, **kwargs) - -# Class for representing the ProjectPlugins object of the CustomGPT API -# The ProjectPlugins object contains methods for getting, updating, and creating project plugins, -# both synchronously and asynchronously -# Note: The ProjectPlugins object has been deprecated and will be removed soon + return update_project_settings.asyncio_detailed(client=client, *args, **kwargs) class ProjectPlugins: def get(*args: Any, **kwargs: Any): @@ -380,11 +401,6 @@ def acreate(*args: Any, **kwargs: Any): return create_plugin.asyncio_detailed(client=client, *args, **kwargs) -# Class for representing the Conversation object of the CustomGPT API -# The Conversation object contains methods for creating, updating, deleting, -# listing, and sending messages to conversations, -# both synchronously and asynchronously - class Conversation: def get(*args: Any, **kwargs: Any): client = set_client() @@ -450,7 +466,7 @@ def amessages(*args: Any, **kwargs: Any): def send(*args: Any, **kwargs: Any): client = set_client() - fields = ["prompt", "custom_persona"] + fields = ["prompt", "custom_persona", "chatbot_model", "response_source"] json = pluck_data(fields, kwargs) kwargs["json_body"] = SendMessageJsonBody(**json) @@ -458,15 +474,12 @@ def send(*args: Any, **kwargs: Any): def asend(*args: Any, **kwargs: Any): client = set_client() - fields = ["prompt", "custom_persona"] + fields = ["prompt", "custom_persona", "chatbot_model", "response_source"] json = pluck_data(fields, kwargs) kwargs["json_body"] = SendMessageJsonBody(**json) return send_message.asyncio_detailed(client=client, *args, **kwargs) -# Class for representing the Citation object of the CustomGPT API -# The Citation object contains methods for getting citations both synchronously and asynchronously - class Citation: def get(*args: Any, **kwargs: Any): client = set_client() @@ -478,10 +491,6 @@ def aget(*args: Any, **kwargs: Any): return get_citation.asyncio_detailed(client=client, *args, **kwargs) -# Class for representing the Source object of the CustomGPT API -# The Source object contains methods for creating, deleting, and listing sources, -# both synchronously and asynchronously - class Source: def list(*args: Any, **kwargs: Any): client = set_client() @@ -495,7 +504,7 @@ def alist(*args: Any, **kwargs: Any): def create(*args: Any, **kwargs: Any): client = set_client() - fields = ["sitemap_path", "file_data_retension", "file"] + fields = ["sitemap_path", "file_data_retension", "is_ocr_enabled", "is_anonymized", "file"] json = pluck_data(fields, kwargs) kwargs["multipart_data"] = CreateSourceMultipartData(**json) @@ -503,12 +512,42 @@ def create(*args: Any, **kwargs: Any): def acreate(*args: Any, **kwargs: Any): client = set_client() - fields = ["sitemap_path", "file_data_retension", "file"] + fields = ["sitemap_path", "file_data_retension", "is_ocr_enabled", "is_anonymized", "file"] json = pluck_data(fields, kwargs) kwargs["multipart_data"] = CreateSourceMultipartData(**json) return create_source.asyncio_detailed(client=client, *args, **kwargs) + def update(*args: Any, **kwargs: Any): + client = set_client() + fields = [ + "executive_js", + "data_refresh_frequency", + "create_new_pages", + "remove_unexist_pages", + "refresh_existing_pages", + "refresh_schedule", + ] + json = pluck_data(fields, kwargs) + kwargs["json_body"] = UpdateSourceJsonBody(**json) + + return update_source.sync_detailed(client=client, *args, **kwargs) + + def aupdate(*args: Any, **kwargs: Any): + client = set_client() + fields = [ + "executive_js", + "data_refresh_frequency", + "create_new_pages", + "remove_unexist_pages", + "refresh_existing_pages", + "refresh_schedule", + ] + json = pluck_data(fields, kwargs) + kwargs["json_body"] = UpdateSourceJsonBody(**json) + + return update_source.asyncio_detailed(client=client, *args, **kwargs) + def delete(*args: Any, **kwargs: Any): client = set_client() @@ -519,9 +558,56 @@ def adelete(*args: Any, **kwargs: Any): return delete_source.asyncio_detailed(client=client, *args, **kwargs) -# Class for representing the User object of the CustomGPT API -# The User object contains methods for getting and updating user information, -# both synchronously and asynchronously + def synchronize(*args: Any, **kwargs: Any): + client = set_client() + + return synchronize_source.sync_detailed(client=client, *args, **kwargs) + + def asynchronize(*args: Any, **kwargs: Any): + client = set_client() + + return synchronize_source.asyncio_detailed(client=client, *args, **kwargs) + + class ReportsAnalytics: + def traffic(*args: Any, **kwargs: Any): + client = set_client() + + return traffic_reports.sync_detailed(client=client, *args, **kwargs) + + def atraffic(*args: Any, **kwargs: Any): + client = set_client() + + return traffic_reports.asyncio_detailed(client=client, *args, **kwargs) + + def queries(*args: Any, **kwargs: Any): + client = set_client() + + return queries_reports.sync_detailed(client=client, *args, **kwargs) + + def aqueries(*args: Any, **kwargs: Any): + client = set_client() + + return queries_reports.asyncio_detailed(client=client, *args, **kwargs) + + def conversations(*args: Any, **kwargs: Any): + client = set_client() + + return conversations_reports.sync_detailed(client=client, *args, **kwargs) + + def aconversations(*args: Any, **kwargs: Any): + client = set_client() + + return conversations_reports.asyncio_detailed(client=client, *args, **kwargs) + + def analysis(*args: Any, **kwargs: Any): + client = set_client() + + return analysis_reports.sync_detailed(client=client, *args, **kwargs) + + def aanalysis(*args: Any, **kwargs: Any): + client = set_client() + + return analysis_reports.asyncio_detailed(client=client, *args, **kwargs) class User: def get(*args: Any, **kwargs: Any): @@ -549,3 +635,14 @@ def aupdate(*args: Any, **kwargs: Any): kwargs["multipart_data"] = UpdateUserMultipartData(**json) return update_user.asyncio_detailed(client=client, *args, **kwargs) + + class Limit: + def get(*args: Any, **kwargs: Any): + client = set_client() + + return get_api_v1_limits_usage.sync_detailed(client=client, *args, **kwargs) + + def aget(*args: Any, **kwargs: Any): + client = set_client() + + return get_api_v1_limits_usage.asyncio_detailed(client=client, *args, **kwargs) diff --git a/customgpt-client/customgpt_client/models/__init__.py b/customgpt-client/customgpt_client/models/__init__.py index e8ef764..b471021 100644 --- a/customgpt-client/customgpt_client/models/__init__.py +++ b/customgpt-client/customgpt_client/models/__init__.py @@ -1,6 +1,54 @@ """ Contains all the data models used in inputs/outputs """ +from .analysis_reports_filters_item import AnalysisReportsFiltersItem +from .analysis_reports_interval import AnalysisReportsInterval +from .analysis_reports_response_200 import AnalysisReportsResponse200 +from .analysis_reports_response_200_data import AnalysisReportsResponse200Data +from .analysis_reports_response_200_data_conversations_item import AnalysisReportsResponse200DataConversationsItem +from .analysis_reports_response_200_data_queries_item import AnalysisReportsResponse200DataQueriesItem +from .analysis_reports_response_200_data_queries_per_conversation_item import ( + AnalysisReportsResponse200DataQueriesPerConversationItem, +) +from .analysis_reports_response_200_status import AnalysisReportsResponse200Status +from .analysis_reports_response_400 import AnalysisReportsResponse400 +from .analysis_reports_response_400_data import AnalysisReportsResponse400Data +from .analysis_reports_response_400_data_code import AnalysisReportsResponse400DataCode +from .analysis_reports_response_400_status import AnalysisReportsResponse400Status +from .analysis_reports_response_401 import AnalysisReportsResponse401 +from .analysis_reports_response_401_data import AnalysisReportsResponse401Data +from .analysis_reports_response_401_data_code import AnalysisReportsResponse401DataCode +from .analysis_reports_response_401_status import AnalysisReportsResponse401Status +from .analysis_reports_response_404 import AnalysisReportsResponse404 +from .analysis_reports_response_404_data import AnalysisReportsResponse404Data +from .analysis_reports_response_404_data_code import AnalysisReportsResponse404DataCode +from .analysis_reports_response_404_data_message import AnalysisReportsResponse404DataMessage +from .analysis_reports_response_404_status import AnalysisReportsResponse404Status +from .analysis_reports_response_500 import AnalysisReportsResponse500 +from .analysis_reports_response_500_data import AnalysisReportsResponse500Data +from .analysis_reports_response_500_data_code import AnalysisReportsResponse500DataCode +from .analysis_reports_response_500_status import AnalysisReportsResponse500Status from .conversation import Conversation +from .conversations_reports_filters_item import ConversationsReportsFiltersItem +from .conversations_reports_response_200 import ConversationsReportsResponse200 +from .conversations_reports_response_200_data import ConversationsReportsResponse200Data +from .conversations_reports_response_200_status import ConversationsReportsResponse200Status +from .conversations_reports_response_400 import ConversationsReportsResponse400 +from .conversations_reports_response_400_data import ConversationsReportsResponse400Data +from .conversations_reports_response_400_data_code import ConversationsReportsResponse400DataCode +from .conversations_reports_response_400_status import ConversationsReportsResponse400Status +from .conversations_reports_response_401 import ConversationsReportsResponse401 +from .conversations_reports_response_401_data import ConversationsReportsResponse401Data +from .conversations_reports_response_401_data_code import ConversationsReportsResponse401DataCode +from .conversations_reports_response_401_status import ConversationsReportsResponse401Status +from .conversations_reports_response_404 import ConversationsReportsResponse404 +from .conversations_reports_response_404_data import ConversationsReportsResponse404Data +from .conversations_reports_response_404_data_code import ConversationsReportsResponse404DataCode +from .conversations_reports_response_404_data_message import ConversationsReportsResponse404DataMessage +from .conversations_reports_response_404_status import ConversationsReportsResponse404Status +from .conversations_reports_response_500 import ConversationsReportsResponse500 +from .conversations_reports_response_500_data import ConversationsReportsResponse500Data +from .conversations_reports_response_500_data_code import ConversationsReportsResponse500DataCode +from .conversations_reports_response_500_status import ConversationsReportsResponse500Status from .create_conversation_json_body import CreateConversationJsonBody from .create_conversation_response_201 import CreateConversationResponse201 from .create_conversation_response_201_data import CreateConversationResponse201Data @@ -68,12 +116,17 @@ from .create_source_response_201_data_pages_item_crawl_status import CreateSourceResponse201DataPagesItemCrawlStatus from .create_source_response_201_data_pages_item_index_status import CreateSourceResponse201DataPagesItemIndexStatus from .create_source_response_201_data_settings import CreateSourceResponse201DataSettings +from .create_source_response_201_data_settings_data_refresh_frequency import ( + CreateSourceResponse201DataSettingsDataRefreshFrequency, +) +from .create_source_response_201_data_settings_refresh_existing_pages import ( + CreateSourceResponse201DataSettingsRefreshExistingPages, +) from .create_source_response_201_data_type import CreateSourceResponse201DataType from .create_source_response_201_status import CreateSourceResponse201Status from .create_source_response_400 import CreateSourceResponse400 from .create_source_response_400_data import CreateSourceResponse400Data from .create_source_response_400_data_code import CreateSourceResponse400DataCode -from .create_source_response_400_data_message import CreateSourceResponse400DataMessage from .create_source_response_400_status import CreateSourceResponse400Status from .create_source_response_401 import CreateSourceResponse401 from .create_source_response_401_data import CreateSourceResponse401Data @@ -168,6 +221,17 @@ from .delete_source_response_500_data import DeleteSourceResponse500Data from .delete_source_response_500_data_code import DeleteSourceResponse500DataCode from .delete_source_response_500_status import DeleteSourceResponse500Status +from .get_api_v1_limits_usage_response_200 import GetApiV1LimitsUsageResponse200 +from .get_api_v1_limits_usage_response_200_data import GetApiV1LimitsUsageResponse200Data +from .get_api_v1_limits_usage_response_200_status import GetApiV1LimitsUsageResponse200Status +from .get_api_v1_limits_usage_response_401 import GetApiV1LimitsUsageResponse401 +from .get_api_v1_limits_usage_response_401_data import GetApiV1LimitsUsageResponse401Data +from .get_api_v1_limits_usage_response_401_data_code import GetApiV1LimitsUsageResponse401DataCode +from .get_api_v1_limits_usage_response_401_status import GetApiV1LimitsUsageResponse401Status +from .get_api_v1_limits_usage_response_500 import GetApiV1LimitsUsageResponse500 +from .get_api_v1_limits_usage_response_500_data import GetApiV1LimitsUsageResponse500Data +from .get_api_v1_limits_usage_response_500_data_code import GetApiV1LimitsUsageResponse500DataCode +from .get_api_v1_limits_usage_response_500_status import GetApiV1LimitsUsageResponse500Status from .get_citation_response_200 import GetCitationResponse200 from .get_citation_response_200_data import GetCitationResponse200Data from .get_citation_response_200_status import GetCitationResponse200Status @@ -185,6 +249,7 @@ from .get_citation_response_404_data_message import GetCitationResponse404DataMessage from .get_citation_response_404_status import GetCitationResponse404Status from .get_conversations_order import GetConversationsOrder +from .get_conversations_order_by import GetConversationsOrderBy from .get_conversations_response_200 import GetConversationsResponse200 from .get_conversations_response_200_data import GetConversationsResponse200Data from .get_conversations_response_200_data_data_item import GetConversationsResponse200DataDataItem @@ -207,22 +272,22 @@ from .get_conversations_response_500_data_code import GetConversationsResponse500DataCode from .get_conversations_response_500_status import GetConversationsResponse500Status from .get_conversations_user_filter import GetConversationsUserFilter -from .get_page_metadata_response_200 import GetPageMetadataResponse200 -from .get_page_metadata_response_200_data import GetPageMetadataResponse200Data -from .get_page_metadata_response_200_status import GetPageMetadataResponse200Status -from .get_page_metadata_response_400 import GetPageMetadataResponse400 -from .get_page_metadata_response_400_data import GetPageMetadataResponse400Data -from .get_page_metadata_response_400_data_code import GetPageMetadataResponse400DataCode -from .get_page_metadata_response_400_status import GetPageMetadataResponse400Status -from .get_page_metadata_response_401 import GetPageMetadataResponse401 -from .get_page_metadata_response_401_data import GetPageMetadataResponse401Data -from .get_page_metadata_response_401_data_code import GetPageMetadataResponse401DataCode -from .get_page_metadata_response_401_status import GetPageMetadataResponse401Status -from .get_page_metadata_response_404 import GetPageMetadataResponse404 -from .get_page_metadata_response_404_data import GetPageMetadataResponse404Data -from .get_page_metadata_response_404_data_code import GetPageMetadataResponse404DataCode -from .get_page_metadata_response_404_data_message import GetPageMetadataResponse404DataMessage -from .get_page_metadata_response_404_status import GetPageMetadataResponse404Status +from .get_metadata_response_200 import GetMetadataResponse200 +from .get_metadata_response_200_data import GetMetadataResponse200Data +from .get_metadata_response_200_status import GetMetadataResponse200Status +from .get_metadata_response_400 import GetMetadataResponse400 +from .get_metadata_response_400_data import GetMetadataResponse400Data +from .get_metadata_response_400_data_code import GetMetadataResponse400DataCode +from .get_metadata_response_400_status import GetMetadataResponse400Status +from .get_metadata_response_401 import GetMetadataResponse401 +from .get_metadata_response_401_data import GetMetadataResponse401Data +from .get_metadata_response_401_data_code import GetMetadataResponse401DataCode +from .get_metadata_response_401_status import GetMetadataResponse401Status +from .get_metadata_response_404 import GetMetadataResponse404 +from .get_metadata_response_404_data import GetMetadataResponse404Data +from .get_metadata_response_404_data_code import GetMetadataResponse404DataCode +from .get_metadata_response_404_data_message import GetMetadataResponse404DataMessage +from .get_metadata_response_404_status import GetMetadataResponse404Status from .get_pages_order import GetPagesOrder from .get_pages_response_200 import GetPagesResponse200 from .get_pages_response_200_data import GetPagesResponse200Data @@ -291,27 +356,32 @@ from .get_project_response_500_data import GetProjectResponse500Data from .get_project_response_500_data_code import GetProjectResponse500DataCode from .get_project_response_500_status import GetProjectResponse500Status -from .get_settings_response_200 import GetSettingsResponse200 -from .get_settings_response_200_data import GetSettingsResponse200Data -from .get_settings_response_200_data_citations_view_type import GetSettingsResponse200DataCitationsViewType -from .get_settings_response_200_status import GetSettingsResponse200Status -from .get_settings_response_400 import GetSettingsResponse400 -from .get_settings_response_400_data import GetSettingsResponse400Data -from .get_settings_response_400_data_code import GetSettingsResponse400DataCode -from .get_settings_response_400_status import GetSettingsResponse400Status -from .get_settings_response_401 import GetSettingsResponse401 -from .get_settings_response_401_data import GetSettingsResponse401Data -from .get_settings_response_401_data_code import GetSettingsResponse401DataCode -from .get_settings_response_401_status import GetSettingsResponse401Status -from .get_settings_response_404 import GetSettingsResponse404 -from .get_settings_response_404_data import GetSettingsResponse404Data -from .get_settings_response_404_data_code import GetSettingsResponse404DataCode -from .get_settings_response_404_data_message import GetSettingsResponse404DataMessage -from .get_settings_response_404_status import GetSettingsResponse404Status -from .get_settings_response_500 import GetSettingsResponse500 -from .get_settings_response_500_data import GetSettingsResponse500Data -from .get_settings_response_500_data_code import GetSettingsResponse500DataCode -from .get_settings_response_500_status import GetSettingsResponse500Status +from .get_project_settings_response_200 import GetProjectSettingsResponse200 +from .get_project_settings_response_200_data import GetProjectSettingsResponse200Data +from .get_project_settings_response_200_data_chatbot_model import GetProjectSettingsResponse200DataChatbotModel +from .get_project_settings_response_200_data_citations_view_type import ( + GetProjectSettingsResponse200DataCitationsViewType, +) +from .get_project_settings_response_200_data_enable_citations import GetProjectSettingsResponse200DataEnableCitations +from .get_project_settings_response_200_data_response_source import GetProjectSettingsResponse200DataResponseSource +from .get_project_settings_response_200_status import GetProjectSettingsResponse200Status +from .get_project_settings_response_400 import GetProjectSettingsResponse400 +from .get_project_settings_response_400_data import GetProjectSettingsResponse400Data +from .get_project_settings_response_400_data_code import GetProjectSettingsResponse400DataCode +from .get_project_settings_response_400_status import GetProjectSettingsResponse400Status +from .get_project_settings_response_401 import GetProjectSettingsResponse401 +from .get_project_settings_response_401_data import GetProjectSettingsResponse401Data +from .get_project_settings_response_401_data_code import GetProjectSettingsResponse401DataCode +from .get_project_settings_response_401_status import GetProjectSettingsResponse401Status +from .get_project_settings_response_404 import GetProjectSettingsResponse404 +from .get_project_settings_response_404_data import GetProjectSettingsResponse404Data +from .get_project_settings_response_404_data_code import GetProjectSettingsResponse404DataCode +from .get_project_settings_response_404_data_message import GetProjectSettingsResponse404DataMessage +from .get_project_settings_response_404_status import GetProjectSettingsResponse404Status +from .get_project_settings_response_500 import GetProjectSettingsResponse500 +from .get_project_settings_response_500_data import GetProjectSettingsResponse500Data +from .get_project_settings_response_500_data_code import GetProjectSettingsResponse500DataCode +from .get_project_settings_response_500_status import GetProjectSettingsResponse500Status from .get_user_response_200 import GetUserResponse200 from .get_user_response_200_data import GetUserResponse200Data from .get_user_response_200_status import GetUserResponse200Status @@ -324,6 +394,7 @@ from .get_user_response_500_data_code import GetUserResponse500DataCode from .get_user_response_500_status import GetUserResponse500Status from .list_projects_order import ListProjectsOrder +from .list_projects_order_by import ListProjectsOrderBy from .list_projects_response_200 import ListProjectsResponse200 from .list_projects_response_200_data import ListProjectsResponse200Data from .list_projects_response_200_data_data_item import ListProjectsResponse200DataDataItem @@ -348,6 +419,12 @@ ListSourcesResponse200DataSitemapsItemPagesItemIndexStatus, ) from .list_sources_response_200_data_sitemaps_item_settings import ListSourcesResponse200DataSitemapsItemSettings +from .list_sources_response_200_data_sitemaps_item_settings_data_refresh_frequency import ( + ListSourcesResponse200DataSitemapsItemSettingsDataRefreshFrequency, +) +from .list_sources_response_200_data_sitemaps_item_settings_refresh_existing_pages import ( + ListSourcesResponse200DataSitemapsItemSettingsRefreshExistingPages, +) from .list_sources_response_200_data_sitemaps_item_type import ListSourcesResponse200DataSitemapsItemType from .list_sources_response_200_data_uploads import ListSourcesResponse200DataUploads from .list_sources_response_200_data_uploads_pages_item import ListSourcesResponse200DataUploadsPagesItem @@ -358,21 +435,18 @@ ListSourcesResponse200DataUploadsPagesItemIndexStatus, ) from .list_sources_response_200_data_uploads_settings import ListSourcesResponse200DataUploadsSettings +from .list_sources_response_200_data_uploads_settings_data_refresh_frequency import ( + ListSourcesResponse200DataUploadsSettingsDataRefreshFrequency, +) +from .list_sources_response_200_data_uploads_settings_refresh_existing_pages import ( + ListSourcesResponse200DataUploadsSettingsRefreshExistingPages, +) from .list_sources_response_200_data_uploads_type import ListSourcesResponse200DataUploadsType from .list_sources_response_200_status import ListSourcesResponse200Status -from .list_sources_response_400 import ListSourcesResponse400 -from .list_sources_response_400_data import ListSourcesResponse400Data -from .list_sources_response_400_data_code import ListSourcesResponse400DataCode -from .list_sources_response_400_status import ListSourcesResponse400Status from .list_sources_response_401 import ListSourcesResponse401 from .list_sources_response_401_data import ListSourcesResponse401Data from .list_sources_response_401_data_code import ListSourcesResponse401DataCode from .list_sources_response_401_status import ListSourcesResponse401Status -from .list_sources_response_404 import ListSourcesResponse404 -from .list_sources_response_404_data import ListSourcesResponse404Data -from .list_sources_response_404_data_code import ListSourcesResponse404DataCode -from .list_sources_response_404_data_message import ListSourcesResponse404DataMessage -from .list_sources_response_404_status import ListSourcesResponse404Status from .list_sources_response_500 import ListSourcesResponse500 from .list_sources_response_500_data import ListSourcesResponse500Data from .list_sources_response_500_data_code import ListSourcesResponse500DataCode @@ -406,7 +480,6 @@ from .messages_conversation_response_500_data import MessagesConversationResponse500Data from .messages_conversation_response_500_data_code import MessagesConversationResponse500DataCode from .messages_conversation_response_500_status import MessagesConversationResponse500Status -from .open_graph_cache import OpenGraphCache from .page import Page from .page_crawl_status import PageCrawlStatus from .page_index_status import PageIndexStatus @@ -429,16 +502,59 @@ from .preview_citation_response_500_data_code import PreviewCitationResponse500DataCode from .preview_citation_response_500_status import PreviewCitationResponse500Status from .project import Project +from .project_analytics_analysis import ProjectAnalyticsAnalysis +from .project_analytics_analysis_conversations_item import ProjectAnalyticsAnalysisConversationsItem +from .project_analytics_analysis_queries_item import ProjectAnalyticsAnalysisQueriesItem +from .project_analytics_analysis_queries_per_conversation_item import ProjectAnalyticsAnalysisQueriesPerConversationItem +from .project_analytics_conversation import ProjectAnalyticsConversation +from .project_analytics_query import ProjectAnalyticsQuery +from .project_analytics_query_query_status_item import ProjectAnalyticsQueryQueryStatusItem +from .project_analytics_query_query_status_item_status import ProjectAnalyticsQueryQueryStatusItemStatus +from .project_analytics_traffic import ProjectAnalyticsTraffic +from .project_analytics_traffic_sources_item import ProjectAnalyticsTrafficSourcesItem +from .project_analytics_traffic_sources_item_request_source import ProjectAnalyticsTrafficSourcesItemRequestSource from .project_plugin import ProjectPlugin from .project_settings import ProjectSettings +from .project_settings_chatbot_model import ProjectSettingsChatbotModel from .project_settings_citations_view_type import ProjectSettingsCitationsViewType +from .project_settings_enable_citations import ProjectSettingsEnableCitations from .project_settings_response_source import ProjectSettingsResponseSource from .project_source import ProjectSource +from .project_source_pages_item import ProjectSourcePagesItem +from .project_source_pages_item_crawl_status import ProjectSourcePagesItemCrawlStatus +from .project_source_pages_item_index_status import ProjectSourcePagesItemIndexStatus from .project_source_settings import ProjectSourceSettings +from .project_source_settings_data_refresh_frequency import ProjectSourceSettingsDataRefreshFrequency +from .project_source_settings_refresh_existing_pages import ProjectSourceSettingsRefreshExistingPages from .project_source_type import ProjectSourceType from .project_type import ProjectType from .prompt_history import PromptHistory from .prompt_history_metadata import PromptHistoryMetadata +from .queries_reports_filters_item import QueriesReportsFiltersItem +from .queries_reports_response_200 import QueriesReportsResponse200 +from .queries_reports_response_200_data import QueriesReportsResponse200Data +from .queries_reports_response_200_data_query_status_item import QueriesReportsResponse200DataQueryStatusItem +from .queries_reports_response_200_data_query_status_item_status import ( + QueriesReportsResponse200DataQueryStatusItemStatus, +) +from .queries_reports_response_200_status import QueriesReportsResponse200Status +from .queries_reports_response_400 import QueriesReportsResponse400 +from .queries_reports_response_400_data import QueriesReportsResponse400Data +from .queries_reports_response_400_data_code import QueriesReportsResponse400DataCode +from .queries_reports_response_400_status import QueriesReportsResponse400Status +from .queries_reports_response_401 import QueriesReportsResponse401 +from .queries_reports_response_401_data import QueriesReportsResponse401Data +from .queries_reports_response_401_data_code import QueriesReportsResponse401DataCode +from .queries_reports_response_401_status import QueriesReportsResponse401Status +from .queries_reports_response_404 import QueriesReportsResponse404 +from .queries_reports_response_404_data import QueriesReportsResponse404Data +from .queries_reports_response_404_data_code import QueriesReportsResponse404DataCode +from .queries_reports_response_404_data_message import QueriesReportsResponse404DataMessage +from .queries_reports_response_404_status import QueriesReportsResponse404Status +from .queries_reports_response_500 import QueriesReportsResponse500 +from .queries_reports_response_500_data import QueriesReportsResponse500Data +from .queries_reports_response_500_data_code import QueriesReportsResponse500DataCode +from .queries_reports_response_500_status import QueriesReportsResponse500Status from .reindex_page_response_200 import ReindexPageResponse200 from .reindex_page_response_200_data import ReindexPageResponse200Data from .reindex_page_response_200_status import ReindexPageResponse200Status @@ -459,7 +575,27 @@ from .reindex_page_response_500_data import ReindexPageResponse500Data from .reindex_page_response_500_data_code import ReindexPageResponse500DataCode from .reindex_page_response_500_status import ReindexPageResponse500Status +from .replicate_project_response_201 import ReplicateProjectResponse201 +from .replicate_project_response_201_data import ReplicateProjectResponse201Data +from .replicate_project_response_201_data_type import ReplicateProjectResponse201DataType +from .replicate_project_response_201_status import ReplicateProjectResponse201Status +from .replicate_project_response_400 import ReplicateProjectResponse400 +from .replicate_project_response_400_data import ReplicateProjectResponse400Data +from .replicate_project_response_400_data_code import ReplicateProjectResponse400DataCode +from .replicate_project_response_400_data_message import ReplicateProjectResponse400DataMessage +from .replicate_project_response_400_status import ReplicateProjectResponse400Status +from .replicate_project_response_401 import ReplicateProjectResponse401 +from .replicate_project_response_401_data import ReplicateProjectResponse401Data +from .replicate_project_response_401_data_code import ReplicateProjectResponse401DataCode +from .replicate_project_response_401_status import ReplicateProjectResponse401Status +from .replicate_project_response_500 import ReplicateProjectResponse500 +from .replicate_project_response_500_data import ReplicateProjectResponse500Data +from .replicate_project_response_500_data_code import ReplicateProjectResponse500DataCode +from .replicate_project_response_500_status import ReplicateProjectResponse500Status +from .send_message_cache_control import SendMessageCacheControl from .send_message_json_body import SendMessageJsonBody +from .send_message_json_body_chatbot_model import SendMessageJsonBodyChatbotModel +from .send_message_json_body_response_source import SendMessageJsonBodyResponseSource from .send_message_response_200 import SendMessageResponse200 from .send_message_response_200_data import SendMessageResponse200Data from .send_message_response_200_data_metadata import SendMessageResponse200DataMetadata @@ -477,6 +613,10 @@ from .send_message_response_404_data_code import SendMessageResponse404DataCode from .send_message_response_404_data_message import SendMessageResponse404DataMessage from .send_message_response_404_status import SendMessageResponse404Status +from .send_message_response_429 import SendMessageResponse429 +from .send_message_response_429_data import SendMessageResponse429Data +from .send_message_response_429_data_code import SendMessageResponse429DataCode +from .send_message_response_429_status import SendMessageResponse429Status from .send_message_response_500 import SendMessageResponse500 from .send_message_response_500_data import SendMessageResponse500Data from .send_message_response_500_data_code import SendMessageResponse500DataCode @@ -501,6 +641,72 @@ from .stats_project_response_500_data import StatsProjectResponse500Data from .stats_project_response_500_data_code import StatsProjectResponse500DataCode from .stats_project_response_500_status import StatsProjectResponse500Status +from .synchronize_source_response_201 import SynchronizeSourceResponse201 +from .synchronize_source_response_201_data import SynchronizeSourceResponse201Data +from .synchronize_source_response_201_data_pages_item import SynchronizeSourceResponse201DataPagesItem +from .synchronize_source_response_201_data_pages_item_crawl_status import ( + SynchronizeSourceResponse201DataPagesItemCrawlStatus, +) +from .synchronize_source_response_201_data_pages_item_index_status import ( + SynchronizeSourceResponse201DataPagesItemIndexStatus, +) +from .synchronize_source_response_201_data_settings import SynchronizeSourceResponse201DataSettings +from .synchronize_source_response_201_data_settings_data_refresh_frequency import ( + SynchronizeSourceResponse201DataSettingsDataRefreshFrequency, +) +from .synchronize_source_response_201_data_settings_refresh_existing_pages import ( + SynchronizeSourceResponse201DataSettingsRefreshExistingPages, +) +from .synchronize_source_response_201_data_type import SynchronizeSourceResponse201DataType +from .synchronize_source_response_201_status import SynchronizeSourceResponse201Status +from .synchronize_source_response_400 import SynchronizeSourceResponse400 +from .synchronize_source_response_400_data import SynchronizeSourceResponse400Data +from .synchronize_source_response_400_data_code import SynchronizeSourceResponse400DataCode +from .synchronize_source_response_400_status import SynchronizeSourceResponse400Status +from .synchronize_source_response_401 import SynchronizeSourceResponse401 +from .synchronize_source_response_401_data import SynchronizeSourceResponse401Data +from .synchronize_source_response_401_data_code import SynchronizeSourceResponse401DataCode +from .synchronize_source_response_401_status import SynchronizeSourceResponse401Status +from .synchronize_source_response_403 import SynchronizeSourceResponse403 +from .synchronize_source_response_403_data import SynchronizeSourceResponse403Data +from .synchronize_source_response_403_data_code import SynchronizeSourceResponse403DataCode +from .synchronize_source_response_403_data_message import SynchronizeSourceResponse403DataMessage +from .synchronize_source_response_403_status import SynchronizeSourceResponse403Status +from .synchronize_source_response_404 import SynchronizeSourceResponse404 +from .synchronize_source_response_404_data import SynchronizeSourceResponse404Data +from .synchronize_source_response_404_data_code import SynchronizeSourceResponse404DataCode +from .synchronize_source_response_404_data_message import SynchronizeSourceResponse404DataMessage +from .synchronize_source_response_404_status import SynchronizeSourceResponse404Status +from .synchronize_source_response_500 import SynchronizeSourceResponse500 +from .synchronize_source_response_500_data import SynchronizeSourceResponse500Data +from .synchronize_source_response_500_data_code import SynchronizeSourceResponse500DataCode +from .synchronize_source_response_500_status import SynchronizeSourceResponse500Status +from .time import Time +from .traffic_reports_filters_item import TrafficReportsFiltersItem +from .traffic_reports_response_200 import TrafficReportsResponse200 +from .traffic_reports_response_200_data import TrafficReportsResponse200Data +from .traffic_reports_response_200_data_sources_item import TrafficReportsResponse200DataSourcesItem +from .traffic_reports_response_200_data_sources_item_request_source import ( + TrafficReportsResponse200DataSourcesItemRequestSource, +) +from .traffic_reports_response_200_status import TrafficReportsResponse200Status +from .traffic_reports_response_400 import TrafficReportsResponse400 +from .traffic_reports_response_400_data import TrafficReportsResponse400Data +from .traffic_reports_response_400_data_code import TrafficReportsResponse400DataCode +from .traffic_reports_response_400_status import TrafficReportsResponse400Status +from .traffic_reports_response_401 import TrafficReportsResponse401 +from .traffic_reports_response_401_data import TrafficReportsResponse401Data +from .traffic_reports_response_401_data_code import TrafficReportsResponse401DataCode +from .traffic_reports_response_401_status import TrafficReportsResponse401Status +from .traffic_reports_response_404 import TrafficReportsResponse404 +from .traffic_reports_response_404_data import TrafficReportsResponse404Data +from .traffic_reports_response_404_data_code import TrafficReportsResponse404DataCode +from .traffic_reports_response_404_data_message import TrafficReportsResponse404DataMessage +from .traffic_reports_response_404_status import TrafficReportsResponse404Status +from .traffic_reports_response_500 import TrafficReportsResponse500 +from .traffic_reports_response_500_data import TrafficReportsResponse500Data +from .traffic_reports_response_500_data_code import TrafficReportsResponse500DataCode +from .traffic_reports_response_500_status import TrafficReportsResponse500Status from .update_conversation_json_body import UpdateConversationJsonBody from .update_conversation_response_200 import UpdateConversationResponse200 from .update_conversation_response_200_data import UpdateConversationResponse200Data @@ -522,27 +728,27 @@ from .update_conversation_response_500_data import UpdateConversationResponse500Data from .update_conversation_response_500_data_code import UpdateConversationResponse500DataCode from .update_conversation_response_500_status import UpdateConversationResponse500Status -from .update_page_metadata_json_body import UpdatePageMetadataJsonBody -from .update_page_metadata_response_200 import UpdatePageMetadataResponse200 -from .update_page_metadata_response_200_data import UpdatePageMetadataResponse200Data -from .update_page_metadata_response_200_status import UpdatePageMetadataResponse200Status -from .update_page_metadata_response_400 import UpdatePageMetadataResponse400 -from .update_page_metadata_response_400_data import UpdatePageMetadataResponse400Data -from .update_page_metadata_response_400_data_code import UpdatePageMetadataResponse400DataCode -from .update_page_metadata_response_400_status import UpdatePageMetadataResponse400Status -from .update_page_metadata_response_401 import UpdatePageMetadataResponse401 -from .update_page_metadata_response_401_data import UpdatePageMetadataResponse401Data -from .update_page_metadata_response_401_data_code import UpdatePageMetadataResponse401DataCode -from .update_page_metadata_response_401_status import UpdatePageMetadataResponse401Status -from .update_page_metadata_response_404 import UpdatePageMetadataResponse404 -from .update_page_metadata_response_404_data import UpdatePageMetadataResponse404Data -from .update_page_metadata_response_404_data_code import UpdatePageMetadataResponse404DataCode -from .update_page_metadata_response_404_data_message import UpdatePageMetadataResponse404DataMessage -from .update_page_metadata_response_404_status import UpdatePageMetadataResponse404Status -from .update_page_metadata_response_500 import UpdatePageMetadataResponse500 -from .update_page_metadata_response_500_data import UpdatePageMetadataResponse500Data -from .update_page_metadata_response_500_data_code import UpdatePageMetadataResponse500DataCode -from .update_page_metadata_response_500_status import UpdatePageMetadataResponse500Status +from .update_metadata_json_body import UpdateMetadataJsonBody +from .update_metadata_response_200 import UpdateMetadataResponse200 +from .update_metadata_response_200_data import UpdateMetadataResponse200Data +from .update_metadata_response_200_status import UpdateMetadataResponse200Status +from .update_metadata_response_400 import UpdateMetadataResponse400 +from .update_metadata_response_400_data import UpdateMetadataResponse400Data +from .update_metadata_response_400_data_code import UpdateMetadataResponse400DataCode +from .update_metadata_response_400_status import UpdateMetadataResponse400Status +from .update_metadata_response_401 import UpdateMetadataResponse401 +from .update_metadata_response_401_data import UpdateMetadataResponse401Data +from .update_metadata_response_401_data_code import UpdateMetadataResponse401DataCode +from .update_metadata_response_401_status import UpdateMetadataResponse401Status +from .update_metadata_response_404 import UpdateMetadataResponse404 +from .update_metadata_response_404_data import UpdateMetadataResponse404Data +from .update_metadata_response_404_data_code import UpdateMetadataResponse404DataCode +from .update_metadata_response_404_data_message import UpdateMetadataResponse404DataMessage +from .update_metadata_response_404_status import UpdateMetadataResponse404Status +from .update_metadata_response_500 import UpdateMetadataResponse500 +from .update_metadata_response_500_data import UpdateMetadataResponse500Data +from .update_metadata_response_500_data_code import UpdateMetadataResponse500DataCode +from .update_metadata_response_500_status import UpdateMetadataResponse500Status from .update_plugin_json_body import UpdatePluginJsonBody from .update_plugin_response_200 import UpdatePluginResponse200 from .update_plugin_response_200_data import UpdatePluginResponse200Data @@ -586,24 +792,65 @@ from .update_project_response_500_data import UpdateProjectResponse500Data from .update_project_response_500_data_code import UpdateProjectResponse500DataCode from .update_project_response_500_status import UpdateProjectResponse500Status -from .update_settings_multipart_data import UpdateSettingsMultipartData -from .update_settings_multipart_data_citations_view_type import UpdateSettingsMultipartDataCitationsViewType -from .update_settings_response_200 import UpdateSettingsResponse200 -from .update_settings_response_200_data import UpdateSettingsResponse200Data -from .update_settings_response_200_status import UpdateSettingsResponse200Status -from .update_settings_response_400 import UpdateSettingsResponse400 -from .update_settings_response_400_data import UpdateSettingsResponse400Data -from .update_settings_response_400_data_code import UpdateSettingsResponse400DataCode -from .update_settings_response_400_data_message import UpdateSettingsResponse400DataMessage -from .update_settings_response_400_status import UpdateSettingsResponse400Status -from .update_settings_response_401 import UpdateSettingsResponse401 -from .update_settings_response_401_data import UpdateSettingsResponse401Data -from .update_settings_response_401_data_code import UpdateSettingsResponse401DataCode -from .update_settings_response_401_status import UpdateSettingsResponse401Status -from .update_settings_response_500 import UpdateSettingsResponse500 -from .update_settings_response_500_data import UpdateSettingsResponse500Data -from .update_settings_response_500_data_code import UpdateSettingsResponse500DataCode -from .update_settings_response_500_status import UpdateSettingsResponse500Status +from .update_project_settings_multipart_data import UpdateProjectSettingsMultipartData +from .update_project_settings_multipart_data_chatbot_model import UpdateProjectSettingsMultipartDataChatbotModel +from .update_project_settings_multipart_data_chatbot_msg_lang import UpdateProjectSettingsMultipartDataChatbotMsgLang +from .update_project_settings_multipart_data_citations_view_type import ( + UpdateProjectSettingsMultipartDataCitationsViewType, +) +from .update_project_settings_multipart_data_enable_citations import UpdateProjectSettingsMultipartDataEnableCitations +from .update_project_settings_multipart_data_response_source import UpdateProjectSettingsMultipartDataResponseSource +from .update_project_settings_response_200 import UpdateProjectSettingsResponse200 +from .update_project_settings_response_200_data import UpdateProjectSettingsResponse200Data +from .update_project_settings_response_200_status import UpdateProjectSettingsResponse200Status +from .update_project_settings_response_400 import UpdateProjectSettingsResponse400 +from .update_project_settings_response_400_data import UpdateProjectSettingsResponse400Data +from .update_project_settings_response_400_data_code import UpdateProjectSettingsResponse400DataCode +from .update_project_settings_response_400_data_message import UpdateProjectSettingsResponse400DataMessage +from .update_project_settings_response_400_status import UpdateProjectSettingsResponse400Status +from .update_project_settings_response_401 import UpdateProjectSettingsResponse401 +from .update_project_settings_response_401_data import UpdateProjectSettingsResponse401Data +from .update_project_settings_response_401_data_code import UpdateProjectSettingsResponse401DataCode +from .update_project_settings_response_401_status import UpdateProjectSettingsResponse401Status +from .update_project_settings_response_500 import UpdateProjectSettingsResponse500 +from .update_project_settings_response_500_data import UpdateProjectSettingsResponse500Data +from .update_project_settings_response_500_data_code import UpdateProjectSettingsResponse500DataCode +from .update_project_settings_response_500_status import UpdateProjectSettingsResponse500Status +from .update_source_json_body import UpdateSourceJsonBody +from .update_source_json_body_data_refresh_frequency import UpdateSourceJsonBodyDataRefreshFrequency +from .update_source_json_body_refresh_existing_pages import UpdateSourceJsonBodyRefreshExistingPages +from .update_source_json_body_refresh_schedule_item import UpdateSourceJsonBodyRefreshScheduleItem +from .update_source_response_201 import UpdateSourceResponse201 +from .update_source_response_201_data import UpdateSourceResponse201Data +from .update_source_response_201_data_pages_item import UpdateSourceResponse201DataPagesItem +from .update_source_response_201_data_pages_item_crawl_status import UpdateSourceResponse201DataPagesItemCrawlStatus +from .update_source_response_201_data_pages_item_index_status import UpdateSourceResponse201DataPagesItemIndexStatus +from .update_source_response_201_data_settings import UpdateSourceResponse201DataSettings +from .update_source_response_201_data_settings_data_refresh_frequency import ( + UpdateSourceResponse201DataSettingsDataRefreshFrequency, +) +from .update_source_response_201_data_settings_refresh_existing_pages import ( + UpdateSourceResponse201DataSettingsRefreshExistingPages, +) +from .update_source_response_201_data_type import UpdateSourceResponse201DataType +from .update_source_response_201_status import UpdateSourceResponse201Status +from .update_source_response_400 import UpdateSourceResponse400 +from .update_source_response_400_data import UpdateSourceResponse400Data +from .update_source_response_400_data_code import UpdateSourceResponse400DataCode +from .update_source_response_400_status import UpdateSourceResponse400Status +from .update_source_response_401 import UpdateSourceResponse401 +from .update_source_response_401_data import UpdateSourceResponse401Data +from .update_source_response_401_data_code import UpdateSourceResponse401DataCode +from .update_source_response_401_status import UpdateSourceResponse401Status +from .update_source_response_404 import UpdateSourceResponse404 +from .update_source_response_404_data import UpdateSourceResponse404Data +from .update_source_response_404_data_code import UpdateSourceResponse404DataCode +from .update_source_response_404_data_message import UpdateSourceResponse404DataMessage +from .update_source_response_404_status import UpdateSourceResponse404Status +from .update_source_response_500 import UpdateSourceResponse500 +from .update_source_response_500_data import UpdateSourceResponse500Data +from .update_source_response_500_data_code import UpdateSourceResponse500DataCode +from .update_source_response_500_status import UpdateSourceResponse500Status from .update_user_multipart_data import UpdateUserMultipartData from .update_user_response_200 import UpdateUserResponse200 from .update_user_response_200_data import UpdateUserResponse200Data @@ -619,7 +866,53 @@ from .user import User __all__ = ( + "AnalysisReportsFiltersItem", + "AnalysisReportsInterval", + "AnalysisReportsResponse200", + "AnalysisReportsResponse200Data", + "AnalysisReportsResponse200DataConversationsItem", + "AnalysisReportsResponse200DataQueriesItem", + "AnalysisReportsResponse200DataQueriesPerConversationItem", + "AnalysisReportsResponse200Status", + "AnalysisReportsResponse400", + "AnalysisReportsResponse400Data", + "AnalysisReportsResponse400DataCode", + "AnalysisReportsResponse400Status", + "AnalysisReportsResponse401", + "AnalysisReportsResponse401Data", + "AnalysisReportsResponse401DataCode", + "AnalysisReportsResponse401Status", + "AnalysisReportsResponse404", + "AnalysisReportsResponse404Data", + "AnalysisReportsResponse404DataCode", + "AnalysisReportsResponse404DataMessage", + "AnalysisReportsResponse404Status", + "AnalysisReportsResponse500", + "AnalysisReportsResponse500Data", + "AnalysisReportsResponse500DataCode", + "AnalysisReportsResponse500Status", "Conversation", + "ConversationsReportsFiltersItem", + "ConversationsReportsResponse200", + "ConversationsReportsResponse200Data", + "ConversationsReportsResponse200Status", + "ConversationsReportsResponse400", + "ConversationsReportsResponse400Data", + "ConversationsReportsResponse400DataCode", + "ConversationsReportsResponse400Status", + "ConversationsReportsResponse401", + "ConversationsReportsResponse401Data", + "ConversationsReportsResponse401DataCode", + "ConversationsReportsResponse401Status", + "ConversationsReportsResponse404", + "ConversationsReportsResponse404Data", + "ConversationsReportsResponse404DataCode", + "ConversationsReportsResponse404DataMessage", + "ConversationsReportsResponse404Status", + "ConversationsReportsResponse500", + "ConversationsReportsResponse500Data", + "ConversationsReportsResponse500DataCode", + "ConversationsReportsResponse500Status", "CreateConversationJsonBody", "CreateConversationResponse201", "CreateConversationResponse201Data", @@ -687,12 +980,13 @@ "CreateSourceResponse201DataPagesItemCrawlStatus", "CreateSourceResponse201DataPagesItemIndexStatus", "CreateSourceResponse201DataSettings", + "CreateSourceResponse201DataSettingsDataRefreshFrequency", + "CreateSourceResponse201DataSettingsRefreshExistingPages", "CreateSourceResponse201DataType", "CreateSourceResponse201Status", "CreateSourceResponse400", "CreateSourceResponse400Data", "CreateSourceResponse400DataCode", - "CreateSourceResponse400DataMessage", "CreateSourceResponse400Status", "CreateSourceResponse401", "CreateSourceResponse401Data", @@ -787,6 +1081,17 @@ "DeleteSourceResponse500Data", "DeleteSourceResponse500DataCode", "DeleteSourceResponse500Status", + "GetApiV1LimitsUsageResponse200", + "GetApiV1LimitsUsageResponse200Data", + "GetApiV1LimitsUsageResponse200Status", + "GetApiV1LimitsUsageResponse401", + "GetApiV1LimitsUsageResponse401Data", + "GetApiV1LimitsUsageResponse401DataCode", + "GetApiV1LimitsUsageResponse401Status", + "GetApiV1LimitsUsageResponse500", + "GetApiV1LimitsUsageResponse500Data", + "GetApiV1LimitsUsageResponse500DataCode", + "GetApiV1LimitsUsageResponse500Status", "GetCitationResponse200", "GetCitationResponse200Data", "GetCitationResponse200Status", @@ -804,6 +1109,7 @@ "GetCitationResponse404DataMessage", "GetCitationResponse404Status", "GetConversationsOrder", + "GetConversationsOrderBy", "GetConversationsResponse200", "GetConversationsResponse200Data", "GetConversationsResponse200DataDataItem", @@ -826,22 +1132,22 @@ "GetConversationsResponse500DataCode", "GetConversationsResponse500Status", "GetConversationsUserFilter", - "GetPageMetadataResponse200", - "GetPageMetadataResponse200Data", - "GetPageMetadataResponse200Status", - "GetPageMetadataResponse400", - "GetPageMetadataResponse400Data", - "GetPageMetadataResponse400DataCode", - "GetPageMetadataResponse400Status", - "GetPageMetadataResponse401", - "GetPageMetadataResponse401Data", - "GetPageMetadataResponse401DataCode", - "GetPageMetadataResponse401Status", - "GetPageMetadataResponse404", - "GetPageMetadataResponse404Data", - "GetPageMetadataResponse404DataCode", - "GetPageMetadataResponse404DataMessage", - "GetPageMetadataResponse404Status", + "GetMetadataResponse200", + "GetMetadataResponse200Data", + "GetMetadataResponse200Status", + "GetMetadataResponse400", + "GetMetadataResponse400Data", + "GetMetadataResponse400DataCode", + "GetMetadataResponse400Status", + "GetMetadataResponse401", + "GetMetadataResponse401Data", + "GetMetadataResponse401DataCode", + "GetMetadataResponse401Status", + "GetMetadataResponse404", + "GetMetadataResponse404Data", + "GetMetadataResponse404DataCode", + "GetMetadataResponse404DataMessage", + "GetMetadataResponse404Status", "GetPagesOrder", "GetPagesResponse200", "GetPagesResponse200Data", @@ -910,27 +1216,30 @@ "GetProjectResponse500Data", "GetProjectResponse500DataCode", "GetProjectResponse500Status", - "GetSettingsResponse200", - "GetSettingsResponse200Data", - "GetSettingsResponse200DataCitationsViewType", - "GetSettingsResponse200Status", - "GetSettingsResponse400", - "GetSettingsResponse400Data", - "GetSettingsResponse400DataCode", - "GetSettingsResponse400Status", - "GetSettingsResponse401", - "GetSettingsResponse401Data", - "GetSettingsResponse401DataCode", - "GetSettingsResponse401Status", - "GetSettingsResponse404", - "GetSettingsResponse404Data", - "GetSettingsResponse404DataCode", - "GetSettingsResponse404DataMessage", - "GetSettingsResponse404Status", - "GetSettingsResponse500", - "GetSettingsResponse500Data", - "GetSettingsResponse500DataCode", - "GetSettingsResponse500Status", + "GetProjectSettingsResponse200", + "GetProjectSettingsResponse200Data", + "GetProjectSettingsResponse200DataChatbotModel", + "GetProjectSettingsResponse200DataCitationsViewType", + "GetProjectSettingsResponse200DataEnableCitations", + "GetProjectSettingsResponse200DataResponseSource", + "GetProjectSettingsResponse200Status", + "GetProjectSettingsResponse400", + "GetProjectSettingsResponse400Data", + "GetProjectSettingsResponse400DataCode", + "GetProjectSettingsResponse400Status", + "GetProjectSettingsResponse401", + "GetProjectSettingsResponse401Data", + "GetProjectSettingsResponse401DataCode", + "GetProjectSettingsResponse401Status", + "GetProjectSettingsResponse404", + "GetProjectSettingsResponse404Data", + "GetProjectSettingsResponse404DataCode", + "GetProjectSettingsResponse404DataMessage", + "GetProjectSettingsResponse404Status", + "GetProjectSettingsResponse500", + "GetProjectSettingsResponse500Data", + "GetProjectSettingsResponse500DataCode", + "GetProjectSettingsResponse500Status", "GetUserResponse200", "GetUserResponse200Data", "GetUserResponse200Status", @@ -943,6 +1252,7 @@ "GetUserResponse500DataCode", "GetUserResponse500Status", "ListProjectsOrder", + "ListProjectsOrderBy", "ListProjectsResponse200", "ListProjectsResponse200Data", "ListProjectsResponse200DataDataItem", @@ -963,27 +1273,22 @@ "ListSourcesResponse200DataSitemapsItemPagesItemCrawlStatus", "ListSourcesResponse200DataSitemapsItemPagesItemIndexStatus", "ListSourcesResponse200DataSitemapsItemSettings", + "ListSourcesResponse200DataSitemapsItemSettingsDataRefreshFrequency", + "ListSourcesResponse200DataSitemapsItemSettingsRefreshExistingPages", "ListSourcesResponse200DataSitemapsItemType", "ListSourcesResponse200DataUploads", "ListSourcesResponse200DataUploadsPagesItem", "ListSourcesResponse200DataUploadsPagesItemCrawlStatus", "ListSourcesResponse200DataUploadsPagesItemIndexStatus", "ListSourcesResponse200DataUploadsSettings", + "ListSourcesResponse200DataUploadsSettingsDataRefreshFrequency", + "ListSourcesResponse200DataUploadsSettingsRefreshExistingPages", "ListSourcesResponse200DataUploadsType", "ListSourcesResponse200Status", - "ListSourcesResponse400", - "ListSourcesResponse400Data", - "ListSourcesResponse400DataCode", - "ListSourcesResponse400Status", "ListSourcesResponse401", "ListSourcesResponse401Data", "ListSourcesResponse401DataCode", "ListSourcesResponse401Status", - "ListSourcesResponse404", - "ListSourcesResponse404Data", - "ListSourcesResponse404DataCode", - "ListSourcesResponse404DataMessage", - "ListSourcesResponse404Status", "ListSourcesResponse500", "ListSourcesResponse500Data", "ListSourcesResponse500DataCode", @@ -1013,7 +1318,6 @@ "MessagesConversationResponse500Data", "MessagesConversationResponse500DataCode", "MessagesConversationResponse500Status", - "OpenGraphCache", "Page", "PageCrawlStatus", "PageIndexStatus", @@ -1036,16 +1340,57 @@ "PreviewCitationResponse500DataCode", "PreviewCitationResponse500Status", "Project", + "ProjectAnalyticsAnalysis", + "ProjectAnalyticsAnalysisConversationsItem", + "ProjectAnalyticsAnalysisQueriesItem", + "ProjectAnalyticsAnalysisQueriesPerConversationItem", + "ProjectAnalyticsConversation", + "ProjectAnalyticsQuery", + "ProjectAnalyticsQueryQueryStatusItem", + "ProjectAnalyticsQueryQueryStatusItemStatus", + "ProjectAnalyticsTraffic", + "ProjectAnalyticsTrafficSourcesItem", + "ProjectAnalyticsTrafficSourcesItemRequestSource", "ProjectPlugin", "ProjectSettings", + "ProjectSettingsChatbotModel", "ProjectSettingsCitationsViewType", + "ProjectSettingsEnableCitations", "ProjectSettingsResponseSource", "ProjectSource", + "ProjectSourcePagesItem", + "ProjectSourcePagesItemCrawlStatus", + "ProjectSourcePagesItemIndexStatus", "ProjectSourceSettings", + "ProjectSourceSettingsDataRefreshFrequency", + "ProjectSourceSettingsRefreshExistingPages", "ProjectSourceType", "ProjectType", "PromptHistory", "PromptHistoryMetadata", + "QueriesReportsFiltersItem", + "QueriesReportsResponse200", + "QueriesReportsResponse200Data", + "QueriesReportsResponse200DataQueryStatusItem", + "QueriesReportsResponse200DataQueryStatusItemStatus", + "QueriesReportsResponse200Status", + "QueriesReportsResponse400", + "QueriesReportsResponse400Data", + "QueriesReportsResponse400DataCode", + "QueriesReportsResponse400Status", + "QueriesReportsResponse401", + "QueriesReportsResponse401Data", + "QueriesReportsResponse401DataCode", + "QueriesReportsResponse401Status", + "QueriesReportsResponse404", + "QueriesReportsResponse404Data", + "QueriesReportsResponse404DataCode", + "QueriesReportsResponse404DataMessage", + "QueriesReportsResponse404Status", + "QueriesReportsResponse500", + "QueriesReportsResponse500Data", + "QueriesReportsResponse500DataCode", + "QueriesReportsResponse500Status", "ReindexPageResponse200", "ReindexPageResponse200Data", "ReindexPageResponse200Status", @@ -1066,7 +1411,27 @@ "ReindexPageResponse500Data", "ReindexPageResponse500DataCode", "ReindexPageResponse500Status", + "ReplicateProjectResponse201", + "ReplicateProjectResponse201Data", + "ReplicateProjectResponse201DataType", + "ReplicateProjectResponse201Status", + "ReplicateProjectResponse400", + "ReplicateProjectResponse400Data", + "ReplicateProjectResponse400DataCode", + "ReplicateProjectResponse400DataMessage", + "ReplicateProjectResponse400Status", + "ReplicateProjectResponse401", + "ReplicateProjectResponse401Data", + "ReplicateProjectResponse401DataCode", + "ReplicateProjectResponse401Status", + "ReplicateProjectResponse500", + "ReplicateProjectResponse500Data", + "ReplicateProjectResponse500DataCode", + "ReplicateProjectResponse500Status", + "SendMessageCacheControl", "SendMessageJsonBody", + "SendMessageJsonBodyChatbotModel", + "SendMessageJsonBodyResponseSource", "SendMessageResponse200", "SendMessageResponse200Data", "SendMessageResponse200DataMetadata", @@ -1084,6 +1449,10 @@ "SendMessageResponse404DataCode", "SendMessageResponse404DataMessage", "SendMessageResponse404Status", + "SendMessageResponse429", + "SendMessageResponse429Data", + "SendMessageResponse429DataCode", + "SendMessageResponse429Status", "SendMessageResponse500", "SendMessageResponse500Data", "SendMessageResponse500DataCode", @@ -1108,6 +1477,62 @@ "StatsProjectResponse500Data", "StatsProjectResponse500DataCode", "StatsProjectResponse500Status", + "SynchronizeSourceResponse201", + "SynchronizeSourceResponse201Data", + "SynchronizeSourceResponse201DataPagesItem", + "SynchronizeSourceResponse201DataPagesItemCrawlStatus", + "SynchronizeSourceResponse201DataPagesItemIndexStatus", + "SynchronizeSourceResponse201DataSettings", + "SynchronizeSourceResponse201DataSettingsDataRefreshFrequency", + "SynchronizeSourceResponse201DataSettingsRefreshExistingPages", + "SynchronizeSourceResponse201DataType", + "SynchronizeSourceResponse201Status", + "SynchronizeSourceResponse400", + "SynchronizeSourceResponse400Data", + "SynchronizeSourceResponse400DataCode", + "SynchronizeSourceResponse400Status", + "SynchronizeSourceResponse401", + "SynchronizeSourceResponse401Data", + "SynchronizeSourceResponse401DataCode", + "SynchronizeSourceResponse401Status", + "SynchronizeSourceResponse403", + "SynchronizeSourceResponse403Data", + "SynchronizeSourceResponse403DataCode", + "SynchronizeSourceResponse403DataMessage", + "SynchronizeSourceResponse403Status", + "SynchronizeSourceResponse404", + "SynchronizeSourceResponse404Data", + "SynchronizeSourceResponse404DataCode", + "SynchronizeSourceResponse404DataMessage", + "SynchronizeSourceResponse404Status", + "SynchronizeSourceResponse500", + "SynchronizeSourceResponse500Data", + "SynchronizeSourceResponse500DataCode", + "SynchronizeSourceResponse500Status", + "Time", + "TrafficReportsFiltersItem", + "TrafficReportsResponse200", + "TrafficReportsResponse200Data", + "TrafficReportsResponse200DataSourcesItem", + "TrafficReportsResponse200DataSourcesItemRequestSource", + "TrafficReportsResponse200Status", + "TrafficReportsResponse400", + "TrafficReportsResponse400Data", + "TrafficReportsResponse400DataCode", + "TrafficReportsResponse400Status", + "TrafficReportsResponse401", + "TrafficReportsResponse401Data", + "TrafficReportsResponse401DataCode", + "TrafficReportsResponse401Status", + "TrafficReportsResponse404", + "TrafficReportsResponse404Data", + "TrafficReportsResponse404DataCode", + "TrafficReportsResponse404DataMessage", + "TrafficReportsResponse404Status", + "TrafficReportsResponse500", + "TrafficReportsResponse500Data", + "TrafficReportsResponse500DataCode", + "TrafficReportsResponse500Status", "UpdateConversationJsonBody", "UpdateConversationResponse200", "UpdateConversationResponse200Data", @@ -1129,27 +1554,27 @@ "UpdateConversationResponse500Data", "UpdateConversationResponse500DataCode", "UpdateConversationResponse500Status", - "UpdatePageMetadataJsonBody", - "UpdatePageMetadataResponse200", - "UpdatePageMetadataResponse200Data", - "UpdatePageMetadataResponse200Status", - "UpdatePageMetadataResponse400", - "UpdatePageMetadataResponse400Data", - "UpdatePageMetadataResponse400DataCode", - "UpdatePageMetadataResponse400Status", - "UpdatePageMetadataResponse401", - "UpdatePageMetadataResponse401Data", - "UpdatePageMetadataResponse401DataCode", - "UpdatePageMetadataResponse401Status", - "UpdatePageMetadataResponse404", - "UpdatePageMetadataResponse404Data", - "UpdatePageMetadataResponse404DataCode", - "UpdatePageMetadataResponse404DataMessage", - "UpdatePageMetadataResponse404Status", - "UpdatePageMetadataResponse500", - "UpdatePageMetadataResponse500Data", - "UpdatePageMetadataResponse500DataCode", - "UpdatePageMetadataResponse500Status", + "UpdateMetadataJsonBody", + "UpdateMetadataResponse200", + "UpdateMetadataResponse200Data", + "UpdateMetadataResponse200Status", + "UpdateMetadataResponse400", + "UpdateMetadataResponse400Data", + "UpdateMetadataResponse400DataCode", + "UpdateMetadataResponse400Status", + "UpdateMetadataResponse401", + "UpdateMetadataResponse401Data", + "UpdateMetadataResponse401DataCode", + "UpdateMetadataResponse401Status", + "UpdateMetadataResponse404", + "UpdateMetadataResponse404Data", + "UpdateMetadataResponse404DataCode", + "UpdateMetadataResponse404DataMessage", + "UpdateMetadataResponse404Status", + "UpdateMetadataResponse500", + "UpdateMetadataResponse500Data", + "UpdateMetadataResponse500DataCode", + "UpdateMetadataResponse500Status", "UpdatePluginJsonBody", "UpdatePluginResponse200", "UpdatePluginResponse200Data", @@ -1193,24 +1618,59 @@ "UpdateProjectResponse500Data", "UpdateProjectResponse500DataCode", "UpdateProjectResponse500Status", - "UpdateSettingsMultipartData", - "UpdateSettingsMultipartDataCitationsViewType", - "UpdateSettingsResponse200", - "UpdateSettingsResponse200Data", - "UpdateSettingsResponse200Status", - "UpdateSettingsResponse400", - "UpdateSettingsResponse400Data", - "UpdateSettingsResponse400DataCode", - "UpdateSettingsResponse400DataMessage", - "UpdateSettingsResponse400Status", - "UpdateSettingsResponse401", - "UpdateSettingsResponse401Data", - "UpdateSettingsResponse401DataCode", - "UpdateSettingsResponse401Status", - "UpdateSettingsResponse500", - "UpdateSettingsResponse500Data", - "UpdateSettingsResponse500DataCode", - "UpdateSettingsResponse500Status", + "UpdateProjectSettingsMultipartData", + "UpdateProjectSettingsMultipartDataChatbotModel", + "UpdateProjectSettingsMultipartDataChatbotMsgLang", + "UpdateProjectSettingsMultipartDataCitationsViewType", + "UpdateProjectSettingsMultipartDataEnableCitations", + "UpdateProjectSettingsMultipartDataResponseSource", + "UpdateProjectSettingsResponse200", + "UpdateProjectSettingsResponse200Data", + "UpdateProjectSettingsResponse200Status", + "UpdateProjectSettingsResponse400", + "UpdateProjectSettingsResponse400Data", + "UpdateProjectSettingsResponse400DataCode", + "UpdateProjectSettingsResponse400DataMessage", + "UpdateProjectSettingsResponse400Status", + "UpdateProjectSettingsResponse401", + "UpdateProjectSettingsResponse401Data", + "UpdateProjectSettingsResponse401DataCode", + "UpdateProjectSettingsResponse401Status", + "UpdateProjectSettingsResponse500", + "UpdateProjectSettingsResponse500Data", + "UpdateProjectSettingsResponse500DataCode", + "UpdateProjectSettingsResponse500Status", + "UpdateSourceJsonBody", + "UpdateSourceJsonBodyDataRefreshFrequency", + "UpdateSourceJsonBodyRefreshExistingPages", + "UpdateSourceJsonBodyRefreshScheduleItem", + "UpdateSourceResponse201", + "UpdateSourceResponse201Data", + "UpdateSourceResponse201DataPagesItem", + "UpdateSourceResponse201DataPagesItemCrawlStatus", + "UpdateSourceResponse201DataPagesItemIndexStatus", + "UpdateSourceResponse201DataSettings", + "UpdateSourceResponse201DataSettingsDataRefreshFrequency", + "UpdateSourceResponse201DataSettingsRefreshExistingPages", + "UpdateSourceResponse201DataType", + "UpdateSourceResponse201Status", + "UpdateSourceResponse400", + "UpdateSourceResponse400Data", + "UpdateSourceResponse400DataCode", + "UpdateSourceResponse400Status", + "UpdateSourceResponse401", + "UpdateSourceResponse401Data", + "UpdateSourceResponse401DataCode", + "UpdateSourceResponse401Status", + "UpdateSourceResponse404", + "UpdateSourceResponse404Data", + "UpdateSourceResponse404DataCode", + "UpdateSourceResponse404DataMessage", + "UpdateSourceResponse404Status", + "UpdateSourceResponse500", + "UpdateSourceResponse500Data", + "UpdateSourceResponse500DataCode", + "UpdateSourceResponse500Status", "UpdateUserMultipartData", "UpdateUserResponse200", "UpdateUserResponse200Data", diff --git a/customgpt-client/customgpt_client/models/analysis_reports_filters_item.py b/customgpt-client/customgpt_client/models/analysis_reports_filters_item.py new file mode 100644 index 0000000..b3d7d20 --- /dev/null +++ b/customgpt-client/customgpt_client/models/analysis_reports_filters_item.py @@ -0,0 +1,10 @@ +from enum import Enum + + +class AnalysisReportsFiltersItem(str, Enum): + CONVERSATIONS = "conversations" + QUERIES = "queries" + QUERIES_PER_CONVERSATION = "queries_per_conversation" + + def __str__(self) -> str: + return str(self.value) diff --git a/customgpt-client/customgpt_client/models/analysis_reports_interval.py b/customgpt-client/customgpt_client/models/analysis_reports_interval.py new file mode 100644 index 0000000..c4d4421 --- /dev/null +++ b/customgpt-client/customgpt_client/models/analysis_reports_interval.py @@ -0,0 +1,9 @@ +from enum import Enum + + +class AnalysisReportsInterval(str, Enum): + DAILY = "daily" + WEEKLY = "weekly" + + def __str__(self) -> str: + return str(self.value) diff --git a/customgpt-client/customgpt_client/models/get_page_metadata_response_200.py b/customgpt-client/customgpt_client/models/analysis_reports_response_200.py similarity index 68% rename from customgpt-client/customgpt_client/models/get_page_metadata_response_200.py rename to customgpt-client/customgpt_client/models/analysis_reports_response_200.py index 93d4ede..5729b7c 100644 --- a/customgpt-client/customgpt_client/models/get_page_metadata_response_200.py +++ b/customgpt-client/customgpt_client/models/analysis_reports_response_200.py @@ -5,22 +5,22 @@ from ..types import UNSET, Unset if TYPE_CHECKING: - from ..models.get_page_metadata_response_200_data import GetPageMetadataResponse200Data + from ..models.analysis_reports_response_200_data import AnalysisReportsResponse200Data -T = TypeVar("T", bound="GetPageMetadataResponse200") +T = TypeVar("T", bound="AnalysisReportsResponse200") @attr.s(auto_attribs=True) -class GetPageMetadataResponse200: +class AnalysisReportsResponse200: """ Attributes: - status (Union[Unset, GetPageMetadataResponse200Status]): The status of the response Example: success. - data (Union[Unset, GetPageMetadataResponse200Data]): + status (Union[Unset, AnalysisReportsResponse200Status]): The status of the response Example: success. + data (Union[Unset, AnalysisReportsResponse200Data]): """ - status: Union[Unset, str] = "success" - data: Union[Unset, "GetPageMetadataResponse200Data"] = UNSET + status: Union[Unset, str] = UNSET + data: Union[Unset, "AnalysisReportsResponse200Data"] = UNSET additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) def to_dict(self) -> Dict[str, Any]: @@ -44,24 +44,24 @@ def to_dict(self) -> Dict[str, Any]: @classmethod def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: - from ..models.get_page_metadata_response_200_data import GetPageMetadataResponse200Data + from ..models.analysis_reports_response_200_data import AnalysisReportsResponse200Data status = src_dict.get("status") _data = src_dict.get("data") - data: Union[Unset, GetPageMetadataResponse200Data] + data: Union[Unset, AnalysisReportsResponse200Data] if isinstance(_data, Unset): data = UNSET else: - data = GetPageMetadataResponse200Data.from_dict(_data) + data = AnalysisReportsResponse200Data.from_dict(_data) - get_page_metadata_response_200 = cls( + analysis_reports_response_200 = cls( status=status, data=data, ) - get_page_metadata_response_200.additional_properties = src_dict - return get_page_metadata_response_200 + analysis_reports_response_200.additional_properties = src_dict + return analysis_reports_response_200 @property def additional_keys(self) -> List[str]: diff --git a/customgpt-client/customgpt_client/models/analysis_reports_response_200_data.py b/customgpt-client/customgpt_client/models/analysis_reports_response_200_data.py new file mode 100644 index 0000000..c4ea647 --- /dev/null +++ b/customgpt-client/customgpt_client/models/analysis_reports_response_200_data.py @@ -0,0 +1,130 @@ +from typing import TYPE_CHECKING, Any, Dict, List, Type, TypeVar, Union + +import attr + +from ..types import UNSET, Unset + +if TYPE_CHECKING: + from ..models.analysis_reports_response_200_data_conversations_item import ( + AnalysisReportsResponse200DataConversationsItem, + ) + from ..models.analysis_reports_response_200_data_queries_item import AnalysisReportsResponse200DataQueriesItem + from ..models.analysis_reports_response_200_data_queries_per_conversation_item import ( + AnalysisReportsResponse200DataQueriesPerConversationItem, + ) + + +T = TypeVar("T", bound="AnalysisReportsResponse200Data") + + +@attr.s(auto_attribs=True) +class AnalysisReportsResponse200Data: + """ + Attributes: + queries (Union[Unset, List['AnalysisReportsResponse200DataQueriesItem']]): + conversations (Union[Unset, List['AnalysisReportsResponse200DataConversationsItem']]): + queries_per_conversation (Union[Unset, List['AnalysisReportsResponse200DataQueriesPerConversationItem']]): + """ + + queries: Union[Unset, List["AnalysisReportsResponse200DataQueriesItem"]] = UNSET + conversations: Union[Unset, List["AnalysisReportsResponse200DataConversationsItem"]] = UNSET + queries_per_conversation: Union[Unset, List["AnalysisReportsResponse200DataQueriesPerConversationItem"]] = UNSET + additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + queries: Union[Unset, List[Dict[str, Any]]] = UNSET + if not isinstance(self.queries, Unset): + queries = [] + for queries_item_data in self.queries: + queries_item = queries_item_data.to_dict() + + queries.append(queries_item) + + conversations: Union[Unset, List[Dict[str, Any]]] = UNSET + if not isinstance(self.conversations, Unset): + conversations = [] + for conversations_item_data in self.conversations: + conversations_item = conversations_item_data.to_dict() + + conversations.append(conversations_item) + + queries_per_conversation: Union[Unset, List[Dict[str, Any]]] = UNSET + if not isinstance(self.queries_per_conversation, Unset): + queries_per_conversation = [] + for queries_per_conversation_item_data in self.queries_per_conversation: + queries_per_conversation_item = queries_per_conversation_item_data.to_dict() + + queries_per_conversation.append(queries_per_conversation_item) + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if queries is not UNSET: + for index, field_value in enumerate(queries): + field_dict[f"queries[{index}]"] = field_value + if conversations is not UNSET: + for index, field_value in enumerate(conversations): + field_dict[f"conversations[{index}]"] = field_value + if queries_per_conversation is not UNSET: + for index, field_value in enumerate(queries_per_conversation): + field_dict[f"queries_per_conversation[{index}]"] = field_value + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + from ..models.analysis_reports_response_200_data_conversations_item import ( + AnalysisReportsResponse200DataConversationsItem, + ) + from ..models.analysis_reports_response_200_data_queries_item import AnalysisReportsResponse200DataQueriesItem + from ..models.analysis_reports_response_200_data_queries_per_conversation_item import ( + AnalysisReportsResponse200DataQueriesPerConversationItem, + ) + + queries = [] + _queries = src_dict.get("queries") + for queries_item_data in _queries or []: + queries_item = AnalysisReportsResponse200DataQueriesItem.from_dict(queries_item_data) + + queries.append(queries_item) + + conversations = [] + _conversations = src_dict.get("conversations") + for conversations_item_data in _conversations or []: + conversations_item = AnalysisReportsResponse200DataConversationsItem.from_dict(conversations_item_data) + + conversations.append(conversations_item) + + queries_per_conversation = [] + _queries_per_conversation = src_dict.get("queries_per_conversation") + for queries_per_conversation_item_data in _queries_per_conversation or []: + queries_per_conversation_item = AnalysisReportsResponse200DataQueriesPerConversationItem.from_dict( + queries_per_conversation_item_data + ) + + queries_per_conversation.append(queries_per_conversation_item) + + analysis_reports_response_200_data = cls( + queries=queries, + conversations=conversations, + queries_per_conversation=queries_per_conversation, + ) + + analysis_reports_response_200_data.additional_properties = src_dict + return analysis_reports_response_200_data + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/customgpt-client/customgpt_client/models/analysis_reports_response_200_data_conversations_item.py b/customgpt-client/customgpt_client/models/analysis_reports_response_200_data_conversations_item.py new file mode 100644 index 0000000..17014c5 --- /dev/null +++ b/customgpt-client/customgpt_client/models/analysis_reports_response_200_data_conversations_item.py @@ -0,0 +1,64 @@ +from typing import Any, Dict, List, Type, TypeVar, Union + +import attr + +from ..types import UNSET, Unset + +T = TypeVar("T", bound="AnalysisReportsResponse200DataConversationsItem") + + +@attr.s(auto_attribs=True) +class AnalysisReportsResponse200DataConversationsItem: + """ + Attributes: + queries_number (Union[Unset, int]): Example: 5. + created_at_interval (Union[Unset, str]): Example: Sat. + """ + + queries_number: Union[Unset, int] = UNSET + created_at_interval: Union[Unset, str] = UNSET + additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + queries_number = self.queries_number + created_at_interval = self.created_at_interval + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if queries_number is not UNSET: + field_dict["queries_number"] = queries_number + if created_at_interval is not UNSET: + field_dict["created_at_interval"] = created_at_interval + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + queries_number = src_dict.get("queries_number") + + created_at_interval = src_dict.get("created_at_interval") + + analysis_reports_response_200_data_conversations_item = cls( + queries_number=queries_number, + created_at_interval=created_at_interval, + ) + + analysis_reports_response_200_data_conversations_item.additional_properties = src_dict + return analysis_reports_response_200_data_conversations_item + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/customgpt-client/customgpt_client/models/analysis_reports_response_200_data_queries_item.py b/customgpt-client/customgpt_client/models/analysis_reports_response_200_data_queries_item.py new file mode 100644 index 0000000..3821713 --- /dev/null +++ b/customgpt-client/customgpt_client/models/analysis_reports_response_200_data_queries_item.py @@ -0,0 +1,64 @@ +from typing import Any, Dict, List, Type, TypeVar, Union + +import attr + +from ..types import UNSET, Unset + +T = TypeVar("T", bound="AnalysisReportsResponse200DataQueriesItem") + + +@attr.s(auto_attribs=True) +class AnalysisReportsResponse200DataQueriesItem: + """ + Attributes: + queries_number (Union[Unset, int]): Example: 5. + created_at_interval (Union[Unset, str]): Example: Sat. + """ + + queries_number: Union[Unset, int] = UNSET + created_at_interval: Union[Unset, str] = UNSET + additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + queries_number = self.queries_number + created_at_interval = self.created_at_interval + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if queries_number is not UNSET: + field_dict["queries_number"] = queries_number + if created_at_interval is not UNSET: + field_dict["created_at_interval"] = created_at_interval + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + queries_number = src_dict.get("queries_number") + + created_at_interval = src_dict.get("created_at_interval") + + analysis_reports_response_200_data_queries_item = cls( + queries_number=queries_number, + created_at_interval=created_at_interval, + ) + + analysis_reports_response_200_data_queries_item.additional_properties = src_dict + return analysis_reports_response_200_data_queries_item + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/customgpt-client/customgpt_client/models/analysis_reports_response_200_data_queries_per_conversation_item.py b/customgpt-client/customgpt_client/models/analysis_reports_response_200_data_queries_per_conversation_item.py new file mode 100644 index 0000000..bfd9453 --- /dev/null +++ b/customgpt-client/customgpt_client/models/analysis_reports_response_200_data_queries_per_conversation_item.py @@ -0,0 +1,64 @@ +from typing import Any, Dict, List, Type, TypeVar, Union + +import attr + +from ..types import UNSET, Unset + +T = TypeVar("T", bound="AnalysisReportsResponse200DataQueriesPerConversationItem") + + +@attr.s(auto_attribs=True) +class AnalysisReportsResponse200DataQueriesPerConversationItem: + """ + Attributes: + queries_number (Union[Unset, int]): Example: 1.5. + created_at_interval (Union[Unset, str]): Example: Sat. + """ + + queries_number: Union[Unset, int] = UNSET + created_at_interval: Union[Unset, str] = UNSET + additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + queries_number = self.queries_number + created_at_interval = self.created_at_interval + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if queries_number is not UNSET: + field_dict["queries_number"] = queries_number + if created_at_interval is not UNSET: + field_dict["created_at_interval"] = created_at_interval + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + queries_number = src_dict.get("queries_number") + + created_at_interval = src_dict.get("created_at_interval") + + analysis_reports_response_200_data_queries_per_conversation_item = cls( + queries_number=queries_number, + created_at_interval=created_at_interval, + ) + + analysis_reports_response_200_data_queries_per_conversation_item.additional_properties = src_dict + return analysis_reports_response_200_data_queries_per_conversation_item + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/customgpt-client/customgpt_client/models/get_page_metadata_response_200_status.py b/customgpt-client/customgpt_client/models/analysis_reports_response_200_status.py similarity index 71% rename from customgpt-client/customgpt_client/models/get_page_metadata_response_200_status.py rename to customgpt-client/customgpt_client/models/analysis_reports_response_200_status.py index 9d01f08..203fab6 100644 --- a/customgpt-client/customgpt_client/models/get_page_metadata_response_200_status.py +++ b/customgpt-client/customgpt_client/models/analysis_reports_response_200_status.py @@ -1,7 +1,7 @@ from enum import Enum -class GetPageMetadataResponse200Status(str, Enum): +class AnalysisReportsResponse200Status(str, Enum): ERROR = "error" SUCCESS = "success" diff --git a/customgpt-client/customgpt_client/models/get_page_metadata_response_404.py b/customgpt-client/customgpt_client/models/analysis_reports_response_400.py similarity index 71% rename from customgpt-client/customgpt_client/models/get_page_metadata_response_404.py rename to customgpt-client/customgpt_client/models/analysis_reports_response_400.py index 94bcf05..39d2813 100644 --- a/customgpt-client/customgpt_client/models/get_page_metadata_response_404.py +++ b/customgpt-client/customgpt_client/models/analysis_reports_response_400.py @@ -5,24 +5,24 @@ from ..types import UNSET, Unset if TYPE_CHECKING: - from ..models.get_page_metadata_response_404_data import GetPageMetadataResponse404Data + from ..models.analysis_reports_response_400_data import AnalysisReportsResponse400Data -T = TypeVar("T", bound="GetPageMetadataResponse404") +T = TypeVar("T", bound="AnalysisReportsResponse400") @attr.s(auto_attribs=True) -class GetPageMetadataResponse404: +class AnalysisReportsResponse400: """ Attributes: - status (Union[Unset, GetPageMetadataResponse404Status]): The status of the response Example: error. + status (Union[Unset, AnalysisReportsResponse400Status]): The status of the response Example: error. url (Union[Unset, str]): The URL of the request Example: https://app.customgpt.ai/api/v1/projects/1. - data (Union[Unset, GetPageMetadataResponse404Data]): + data (Union[Unset, AnalysisReportsResponse400Data]): """ - status: Union[Unset, str] = "error" + status: Union[Unset, str] = UNSET url: Union[Unset, str] = UNSET - data: Union[Unset, "GetPageMetadataResponse404Data"] = UNSET + data: Union[Unset, "AnalysisReportsResponse400Data"] = UNSET additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) def to_dict(self) -> Dict[str, Any]: @@ -49,27 +49,27 @@ def to_dict(self) -> Dict[str, Any]: @classmethod def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: - from ..models.get_page_metadata_response_404_data import GetPageMetadataResponse404Data + from ..models.analysis_reports_response_400_data import AnalysisReportsResponse400Data status = src_dict.get("status") url = src_dict.get("url") _data = src_dict.get("data") - data: Union[Unset, GetPageMetadataResponse404Data] + data: Union[Unset, AnalysisReportsResponse400Data] if isinstance(_data, Unset): data = UNSET else: - data = GetPageMetadataResponse404Data.from_dict(_data) + data = AnalysisReportsResponse400Data.from_dict(_data) - get_page_metadata_response_404 = cls( + analysis_reports_response_400 = cls( status=status, url=url, data=data, ) - get_page_metadata_response_404.additional_properties = src_dict - return get_page_metadata_response_404 + analysis_reports_response_400.additional_properties = src_dict + return analysis_reports_response_400 @property def additional_keys(self) -> List[str]: diff --git a/customgpt-client/customgpt_client/models/analysis_reports_response_400_data.py b/customgpt-client/customgpt_client/models/analysis_reports_response_400_data.py new file mode 100644 index 0000000..7b99513 --- /dev/null +++ b/customgpt-client/customgpt_client/models/analysis_reports_response_400_data.py @@ -0,0 +1,67 @@ +from typing import Any, Dict, List, Type, TypeVar, Union + +import attr + +from ..types import UNSET, Unset + +T = TypeVar("T", bound="AnalysisReportsResponse400Data") + + +@attr.s(auto_attribs=True) +class AnalysisReportsResponse400Data: + """ + Attributes: + code (Union[Unset, AnalysisReportsResponse400DataCode]): The error status code Example: 400. + message (Union[Unset, str]): The error message Example: Project id must be integer. + """ + + code: Union[Unset, str] = UNSET + message: Union[Unset, str] = UNSET + additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + code: Union[Unset, int] = UNSET + if not isinstance(self.code, Unset): + code = self.code + + message = self.message + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if code is not UNSET: + field_dict["code"] = code + if message is not UNSET: + field_dict["message"] = message + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + code = src_dict.get("code") + + message = src_dict.get("message") + + analysis_reports_response_400_data = cls( + code=code, + message=message, + ) + + analysis_reports_response_400_data.additional_properties = src_dict + return analysis_reports_response_400_data + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/customgpt-client/customgpt_client/models/get_page_metadata_response_401_data_code.py b/customgpt-client/customgpt_client/models/analysis_reports_response_400_data_code.py similarity index 80% rename from customgpt-client/customgpt_client/models/get_page_metadata_response_401_data_code.py rename to customgpt-client/customgpt_client/models/analysis_reports_response_400_data_code.py index 2b89cb6..57dc3da 100644 --- a/customgpt-client/customgpt_client/models/get_page_metadata_response_401_data_code.py +++ b/customgpt-client/customgpt_client/models/analysis_reports_response_400_data_code.py @@ -1,7 +1,7 @@ from enum import IntEnum -class GetPageMetadataResponse401DataCode(IntEnum): +class AnalysisReportsResponse400DataCode(IntEnum): VALUE_400 = 400 VALUE_401 = 401 VALUE_403 = 403 diff --git a/customgpt-client/customgpt_client/models/get_page_metadata_response_401_status.py b/customgpt-client/customgpt_client/models/analysis_reports_response_400_status.py similarity index 71% rename from customgpt-client/customgpt_client/models/get_page_metadata_response_401_status.py rename to customgpt-client/customgpt_client/models/analysis_reports_response_400_status.py index ff3ca8b..c764a72 100644 --- a/customgpt-client/customgpt_client/models/get_page_metadata_response_401_status.py +++ b/customgpt-client/customgpt_client/models/analysis_reports_response_400_status.py @@ -1,7 +1,7 @@ from enum import Enum -class GetPageMetadataResponse401Status(str, Enum): +class AnalysisReportsResponse400Status(str, Enum): ERROR = "error" SUCCESS = "success" diff --git a/customgpt-client/customgpt_client/models/get_page_metadata_response_400.py b/customgpt-client/customgpt_client/models/analysis_reports_response_401.py similarity index 71% rename from customgpt-client/customgpt_client/models/get_page_metadata_response_400.py rename to customgpt-client/customgpt_client/models/analysis_reports_response_401.py index ad808e6..cdda1a3 100644 --- a/customgpt-client/customgpt_client/models/get_page_metadata_response_400.py +++ b/customgpt-client/customgpt_client/models/analysis_reports_response_401.py @@ -5,24 +5,24 @@ from ..types import UNSET, Unset if TYPE_CHECKING: - from ..models.get_page_metadata_response_400_data import GetPageMetadataResponse400Data + from ..models.analysis_reports_response_401_data import AnalysisReportsResponse401Data -T = TypeVar("T", bound="GetPageMetadataResponse400") +T = TypeVar("T", bound="AnalysisReportsResponse401") @attr.s(auto_attribs=True) -class GetPageMetadataResponse400: +class AnalysisReportsResponse401: """ Attributes: - status (Union[Unset, GetPageMetadataResponse400Status]): The status of the response Example: error. + status (Union[Unset, AnalysisReportsResponse401Status]): The status of the response Example: error. url (Union[Unset, str]): The URL of the request Example: https://app.customgpt.ai/api/v1/projects/1. - data (Union[Unset, GetPageMetadataResponse400Data]): + data (Union[Unset, AnalysisReportsResponse401Data]): """ - status: Union[Unset, str] = "error" + status: Union[Unset, str] = UNSET url: Union[Unset, str] = UNSET - data: Union[Unset, "GetPageMetadataResponse400Data"] = UNSET + data: Union[Unset, "AnalysisReportsResponse401Data"] = UNSET additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) def to_dict(self) -> Dict[str, Any]: @@ -49,27 +49,27 @@ def to_dict(self) -> Dict[str, Any]: @classmethod def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: - from ..models.get_page_metadata_response_400_data import GetPageMetadataResponse400Data + from ..models.analysis_reports_response_401_data import AnalysisReportsResponse401Data status = src_dict.get("status") url = src_dict.get("url") _data = src_dict.get("data") - data: Union[Unset, GetPageMetadataResponse400Data] + data: Union[Unset, AnalysisReportsResponse401Data] if isinstance(_data, Unset): data = UNSET else: - data = GetPageMetadataResponse400Data.from_dict(_data) + data = AnalysisReportsResponse401Data.from_dict(_data) - get_page_metadata_response_400 = cls( + analysis_reports_response_401 = cls( status=status, url=url, data=data, ) - get_page_metadata_response_400.additional_properties = src_dict - return get_page_metadata_response_400 + analysis_reports_response_401.additional_properties = src_dict + return analysis_reports_response_401 @property def additional_keys(self) -> List[str]: diff --git a/customgpt-client/customgpt_client/models/get_page_metadata_response_401_data.py b/customgpt-client/customgpt_client/models/analysis_reports_response_401_data.py similarity index 81% rename from customgpt-client/customgpt_client/models/get_page_metadata_response_401_data.py rename to customgpt-client/customgpt_client/models/analysis_reports_response_401_data.py index a2145a3..0c9bed5 100644 --- a/customgpt-client/customgpt_client/models/get_page_metadata_response_401_data.py +++ b/customgpt-client/customgpt_client/models/analysis_reports_response_401_data.py @@ -4,18 +4,18 @@ from ..types import UNSET, Unset -T = TypeVar("T", bound="GetPageMetadataResponse401Data") +T = TypeVar("T", bound="AnalysisReportsResponse401Data") @attr.s(auto_attribs=True) -class GetPageMetadataResponse401Data: +class AnalysisReportsResponse401Data: """ Attributes: - code (Union[Unset, GetPageMetadataResponse401DataCode]): The error status code Example: 401. + code (Union[Unset, AnalysisReportsResponse401DataCode]): The error status code Example: 401. message (Union[Unset, str]): Example: API Token is either missing or invalid. """ - code: Union[Unset, str] = "401" + code: Union[Unset, str] = UNSET message: Union[Unset, str] = UNSET additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) @@ -42,13 +42,13 @@ def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: message = src_dict.get("message") - get_page_metadata_response_401_data = cls( + analysis_reports_response_401_data = cls( code=code, message=message, ) - get_page_metadata_response_401_data.additional_properties = src_dict - return get_page_metadata_response_401_data + analysis_reports_response_401_data.additional_properties = src_dict + return analysis_reports_response_401_data @property def additional_keys(self) -> List[str]: diff --git a/customgpt-client/customgpt_client/models/get_page_metadata_response_404_data_code.py b/customgpt-client/customgpt_client/models/analysis_reports_response_401_data_code.py similarity index 80% rename from customgpt-client/customgpt_client/models/get_page_metadata_response_404_data_code.py rename to customgpt-client/customgpt_client/models/analysis_reports_response_401_data_code.py index a992f17..ec9f004 100644 --- a/customgpt-client/customgpt_client/models/get_page_metadata_response_404_data_code.py +++ b/customgpt-client/customgpt_client/models/analysis_reports_response_401_data_code.py @@ -1,7 +1,7 @@ from enum import IntEnum -class GetPageMetadataResponse404DataCode(IntEnum): +class AnalysisReportsResponse401DataCode(IntEnum): VALUE_400 = 400 VALUE_401 = 401 VALUE_403 = 403 diff --git a/customgpt-client/customgpt_client/models/get_page_metadata_response_400_status.py b/customgpt-client/customgpt_client/models/analysis_reports_response_401_status.py similarity index 71% rename from customgpt-client/customgpt_client/models/get_page_metadata_response_400_status.py rename to customgpt-client/customgpt_client/models/analysis_reports_response_401_status.py index 01ae682..f5b29e1 100644 --- a/customgpt-client/customgpt_client/models/get_page_metadata_response_400_status.py +++ b/customgpt-client/customgpt_client/models/analysis_reports_response_401_status.py @@ -1,7 +1,7 @@ from enum import Enum -class GetPageMetadataResponse400Status(str, Enum): +class AnalysisReportsResponse401Status(str, Enum): ERROR = "error" SUCCESS = "success" diff --git a/customgpt-client/customgpt_client/models/analysis_reports_response_404.py b/customgpt-client/customgpt_client/models/analysis_reports_response_404.py new file mode 100644 index 0000000..1d3e795 --- /dev/null +++ b/customgpt-client/customgpt_client/models/analysis_reports_response_404.py @@ -0,0 +1,88 @@ +from typing import TYPE_CHECKING, Any, Dict, List, Type, TypeVar, Union + +import attr + +from ..types import UNSET, Unset + +if TYPE_CHECKING: + from ..models.analysis_reports_response_404_data import AnalysisReportsResponse404Data + + +T = TypeVar("T", bound="AnalysisReportsResponse404") + + +@attr.s(auto_attribs=True) +class AnalysisReportsResponse404: + """ + Attributes: + status (Union[Unset, AnalysisReportsResponse404Status]): The status of the response Example: error. + url (Union[Unset, str]): The URL of the request Example: https://app.customgpt.ai/api/v1/projects/1. + data (Union[Unset, AnalysisReportsResponse404Data]): + """ + + status: Union[Unset, str] = UNSET + url: Union[Unset, str] = UNSET + data: Union[Unset, "AnalysisReportsResponse404Data"] = UNSET + additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + status: Union[Unset, str] = UNSET + if not isinstance(self.status, Unset): + status = self.status + + url = self.url + data: Union[Unset, Dict[str, Any]] = UNSET + if not isinstance(self.data, Unset): + data = self.data.to_dict() + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if status is not UNSET: + field_dict["status"] = status + if url is not UNSET: + field_dict["url"] = url + if data is not UNSET: + field_dict["data"] = data + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + from ..models.analysis_reports_response_404_data import AnalysisReportsResponse404Data + + status = src_dict.get("status") + + url = src_dict.get("url") + + _data = src_dict.get("data") + data: Union[Unset, AnalysisReportsResponse404Data] + if isinstance(_data, Unset): + data = UNSET + else: + data = AnalysisReportsResponse404Data.from_dict(_data) + + analysis_reports_response_404 = cls( + status=status, + url=url, + data=data, + ) + + analysis_reports_response_404.additional_properties = src_dict + return analysis_reports_response_404 + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/customgpt-client/customgpt_client/models/get_page_metadata_response_404_data.py b/customgpt-client/customgpt_client/models/analysis_reports_response_404_data.py similarity index 74% rename from customgpt-client/customgpt_client/models/get_page_metadata_response_404_data.py rename to customgpt-client/customgpt_client/models/analysis_reports_response_404_data.py index 67bcded..0e30a9a 100644 --- a/customgpt-client/customgpt_client/models/get_page_metadata_response_404_data.py +++ b/customgpt-client/customgpt_client/models/analysis_reports_response_404_data.py @@ -4,20 +4,20 @@ from ..types import UNSET, Unset -T = TypeVar("T", bound="GetPageMetadataResponse404Data") +T = TypeVar("T", bound="AnalysisReportsResponse404Data") @attr.s(auto_attribs=True) -class GetPageMetadataResponse404Data: +class AnalysisReportsResponse404Data: """ Attributes: - code (Union[Unset, GetPageMetadataResponse404DataCode]): The error status code Example: 404. - message (Union[Unset, GetPageMetadataResponse404DataMessage]): The error message Example: Page with id 1 not + code (Union[Unset, AnalysisReportsResponse404DataCode]): The error status code Example: 404. + message (Union[Unset, AnalysisReportsResponse404DataMessage]): The error message Example: Project with id 1 not found. """ - code: Union[Unset, str] = "404" - message: Union[Unset, str] = "Page with id 1 not found" + code: Union[Unset, str] = UNSET + message: Union[Unset, str] = UNSET additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) def to_dict(self) -> Dict[str, Any]: @@ -45,13 +45,13 @@ def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: message = src_dict.get("message") - get_page_metadata_response_404_data = cls( + analysis_reports_response_404_data = cls( code=code, message=message, ) - get_page_metadata_response_404_data.additional_properties = src_dict - return get_page_metadata_response_404_data + analysis_reports_response_404_data.additional_properties = src_dict + return analysis_reports_response_404_data @property def additional_keys(self) -> List[str]: diff --git a/customgpt-client/customgpt_client/models/get_page_metadata_response_400_data_code.py b/customgpt-client/customgpt_client/models/analysis_reports_response_404_data_code.py similarity index 80% rename from customgpt-client/customgpt_client/models/get_page_metadata_response_400_data_code.py rename to customgpt-client/customgpt_client/models/analysis_reports_response_404_data_code.py index 9303812..68306ea 100644 --- a/customgpt-client/customgpt_client/models/get_page_metadata_response_400_data_code.py +++ b/customgpt-client/customgpt_client/models/analysis_reports_response_404_data_code.py @@ -1,7 +1,7 @@ from enum import IntEnum -class GetPageMetadataResponse400DataCode(IntEnum): +class AnalysisReportsResponse404DataCode(IntEnum): VALUE_400 = 400 VALUE_401 = 401 VALUE_403 = 403 diff --git a/customgpt-client/customgpt_client/models/analysis_reports_response_404_data_message.py b/customgpt-client/customgpt_client/models/analysis_reports_response_404_data_message.py new file mode 100644 index 0000000..e57bbf2 --- /dev/null +++ b/customgpt-client/customgpt_client/models/analysis_reports_response_404_data_message.py @@ -0,0 +1,9 @@ +from enum import Enum + + +class AnalysisReportsResponse404DataMessage(str, Enum): + PROJECT_ID_IS_REQUIRED = "Project id is required" + PROJECT_WITH_ID_PROJECTID_NOT_FOUND = "Project with id {projectId} not found" + + def __str__(self) -> str: + return str(self.value) diff --git a/customgpt-client/customgpt_client/models/get_page_metadata_response_404_status.py b/customgpt-client/customgpt_client/models/analysis_reports_response_404_status.py similarity index 71% rename from customgpt-client/customgpt_client/models/get_page_metadata_response_404_status.py rename to customgpt-client/customgpt_client/models/analysis_reports_response_404_status.py index 072c5fc..7bddab3 100644 --- a/customgpt-client/customgpt_client/models/get_page_metadata_response_404_status.py +++ b/customgpt-client/customgpt_client/models/analysis_reports_response_404_status.py @@ -1,7 +1,7 @@ from enum import Enum -class GetPageMetadataResponse404Status(str, Enum): +class AnalysisReportsResponse404Status(str, Enum): ERROR = "error" SUCCESS = "success" diff --git a/customgpt-client/customgpt_client/models/analysis_reports_response_500.py b/customgpt-client/customgpt_client/models/analysis_reports_response_500.py new file mode 100644 index 0000000..121cdc2 --- /dev/null +++ b/customgpt-client/customgpt_client/models/analysis_reports_response_500.py @@ -0,0 +1,88 @@ +from typing import TYPE_CHECKING, Any, Dict, List, Type, TypeVar, Union + +import attr + +from ..types import UNSET, Unset + +if TYPE_CHECKING: + from ..models.analysis_reports_response_500_data import AnalysisReportsResponse500Data + + +T = TypeVar("T", bound="AnalysisReportsResponse500") + + +@attr.s(auto_attribs=True) +class AnalysisReportsResponse500: + """ + Attributes: + status (Union[Unset, AnalysisReportsResponse500Status]): The status of the response Example: error. + url (Union[Unset, str]): The URL of the request Example: https://app.customgpt.ai/api/v1/projects/1. + data (Union[Unset, AnalysisReportsResponse500Data]): + """ + + status: Union[Unset, str] = UNSET + url: Union[Unset, str] = UNSET + data: Union[Unset, "AnalysisReportsResponse500Data"] = UNSET + additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + status: Union[Unset, str] = UNSET + if not isinstance(self.status, Unset): + status = self.status + + url = self.url + data: Union[Unset, Dict[str, Any]] = UNSET + if not isinstance(self.data, Unset): + data = self.data.to_dict() + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if status is not UNSET: + field_dict["status"] = status + if url is not UNSET: + field_dict["url"] = url + if data is not UNSET: + field_dict["data"] = data + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + from ..models.analysis_reports_response_500_data import AnalysisReportsResponse500Data + + status = src_dict.get("status") + + url = src_dict.get("url") + + _data = src_dict.get("data") + data: Union[Unset, AnalysisReportsResponse500Data] + if isinstance(_data, Unset): + data = UNSET + else: + data = AnalysisReportsResponse500Data.from_dict(_data) + + analysis_reports_response_500 = cls( + status=status, + url=url, + data=data, + ) + + analysis_reports_response_500.additional_properties = src_dict + return analysis_reports_response_500 + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/customgpt-client/customgpt_client/models/analysis_reports_response_500_data.py b/customgpt-client/customgpt_client/models/analysis_reports_response_500_data.py new file mode 100644 index 0000000..01e1fd4 --- /dev/null +++ b/customgpt-client/customgpt_client/models/analysis_reports_response_500_data.py @@ -0,0 +1,67 @@ +from typing import Any, Dict, List, Type, TypeVar, Union + +import attr + +from ..types import UNSET, Unset + +T = TypeVar("T", bound="AnalysisReportsResponse500Data") + + +@attr.s(auto_attribs=True) +class AnalysisReportsResponse500Data: + """ + Attributes: + code (Union[Unset, AnalysisReportsResponse500DataCode]): The error status code Example: 500. + message (Union[Unset, str]): Example: Internal Server Error. + """ + + code: Union[Unset, str] = UNSET + message: Union[Unset, str] = UNSET + additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + code: Union[Unset, int] = UNSET + if not isinstance(self.code, Unset): + code = self.code + + message = self.message + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if code is not UNSET: + field_dict["code"] = code + if message is not UNSET: + field_dict["message"] = message + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + code = src_dict.get("code") + + message = src_dict.get("message") + + analysis_reports_response_500_data = cls( + code=code, + message=message, + ) + + analysis_reports_response_500_data.additional_properties = src_dict + return analysis_reports_response_500_data + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/customgpt-client/customgpt_client/models/analysis_reports_response_500_data_code.py b/customgpt-client/customgpt_client/models/analysis_reports_response_500_data_code.py new file mode 100644 index 0000000..3c4b05b --- /dev/null +++ b/customgpt-client/customgpt_client/models/analysis_reports_response_500_data_code.py @@ -0,0 +1,13 @@ +from enum import IntEnum + + +class AnalysisReportsResponse500DataCode(IntEnum): + VALUE_400 = 400 + VALUE_401 = 401 + VALUE_403 = 403 + VALUE_404 = 404 + VALUE_500 = 500 + VALUE_503 = 503 + + def __str__(self) -> str: + return str(self.value) diff --git a/customgpt-client/customgpt_client/models/analysis_reports_response_500_status.py b/customgpt-client/customgpt_client/models/analysis_reports_response_500_status.py new file mode 100644 index 0000000..0c2370c --- /dev/null +++ b/customgpt-client/customgpt_client/models/analysis_reports_response_500_status.py @@ -0,0 +1,9 @@ +from enum import Enum + + +class AnalysisReportsResponse500Status(str, Enum): + ERROR = "error" + SUCCESS = "success" + + def __str__(self) -> str: + return str(self.value) diff --git a/customgpt-client/customgpt_client/models/conversation.py b/customgpt-client/customgpt_client/models/conversation.py index 6f278c6..4372b77 100644 --- a/customgpt-client/customgpt_client/models/conversation.py +++ b/customgpt-client/customgpt_client/models/conversation.py @@ -15,7 +15,6 @@ class Conversation: Attributes: created_at (Union[Unset, datetime.datetime]): When was this conversation created? Example: 2023-04-30 16:43:53. updated_at (Union[Unset, datetime.datetime]): When was this conversation updated? Example: 2023-04-30 16:43:53. - deleted_at (Union[Unset, datetime.datetime]): When was this conversation deleted? Example: 2023-04-30 16:43:53. id (Union[Unset, int]): Conversation ID Example: 1. name (Union[Unset, str]): Conversation name Example: Conversation 1. project_id (Union[Unset, str]): Project ID for this conversation Example: 1. @@ -25,7 +24,6 @@ class Conversation: created_at: Union[Unset, datetime.datetime] = UNSET updated_at: Union[Unset, datetime.datetime] = UNSET - deleted_at: Union[Unset, datetime.datetime] = UNSET id: Union[Unset, int] = UNSET name: Union[Unset, str] = UNSET project_id: Union[Unset, str] = UNSET @@ -42,10 +40,6 @@ def to_dict(self) -> Dict[str, Any]: if not isinstance(self.updated_at, Unset): updated_at = self.updated_at.isoformat() - deleted_at: Union[Unset, str] = UNSET - if not isinstance(self.deleted_at, Unset): - deleted_at = self.deleted_at.isoformat() - id = self.id name = self.name project_id = self.project_id @@ -59,8 +53,6 @@ def to_dict(self) -> Dict[str, Any]: field_dict["created_at"] = created_at if updated_at is not UNSET: field_dict["updated_at"] = updated_at - if deleted_at is not UNSET: - field_dict["deleted_at"] = deleted_at if id is not UNSET: field_dict["id"] = id if name is not UNSET: @@ -90,13 +82,6 @@ def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: else: updated_at = isoparse(_updated_at) - _deleted_at = src_dict.get("deleted_at") - deleted_at: Union[Unset, datetime.datetime] - if isinstance(_deleted_at, Unset): - deleted_at = UNSET - else: - deleted_at = isoparse(_deleted_at) - id = src_dict.get("id") name = src_dict.get("name") @@ -110,7 +95,6 @@ def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: conversation = cls( created_at=created_at, updated_at=updated_at, - deleted_at=deleted_at, id=id, name=name, project_id=project_id, diff --git a/customgpt-client/customgpt_client/models/conversations_reports_filters_item.py b/customgpt-client/customgpt_client/models/conversations_reports_filters_item.py new file mode 100644 index 0000000..1a0e4cd --- /dev/null +++ b/customgpt-client/customgpt_client/models/conversations_reports_filters_item.py @@ -0,0 +1,9 @@ +from enum import Enum + + +class ConversationsReportsFiltersItem(str, Enum): + AVERAGE_QUERIES_PER_CONVERSATION = "average_queries_per_conversation" + TOTAL = "total" + + def __str__(self) -> str: + return str(self.value) diff --git a/customgpt-client/customgpt_client/models/conversations_reports_response_200.py b/customgpt-client/customgpt_client/models/conversations_reports_response_200.py new file mode 100644 index 0000000..4f4348b --- /dev/null +++ b/customgpt-client/customgpt_client/models/conversations_reports_response_200.py @@ -0,0 +1,80 @@ +from typing import TYPE_CHECKING, Any, Dict, List, Type, TypeVar, Union + +import attr + +from ..types import UNSET, Unset + +if TYPE_CHECKING: + from ..models.conversations_reports_response_200_data import ConversationsReportsResponse200Data + + +T = TypeVar("T", bound="ConversationsReportsResponse200") + + +@attr.s(auto_attribs=True) +class ConversationsReportsResponse200: + """ + Attributes: + status (Union[Unset, ConversationsReportsResponse200Status]): The status of the response Example: success. + data (Union[Unset, ConversationsReportsResponse200Data]): + """ + + status: Union[Unset, str] = UNSET + data: Union[Unset, "ConversationsReportsResponse200Data"] = UNSET + additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + status: Union[Unset, str] = UNSET + if not isinstance(self.status, Unset): + status = self.status + + data: Union[Unset, Dict[str, Any]] = UNSET + if not isinstance(self.data, Unset): + data = self.data.to_dict() + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if status is not UNSET: + field_dict["status"] = status + if data is not UNSET: + field_dict["data"] = data + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + from ..models.conversations_reports_response_200_data import ConversationsReportsResponse200Data + + status = src_dict.get("status") + + _data = src_dict.get("data") + data: Union[Unset, ConversationsReportsResponse200Data] + if isinstance(_data, Unset): + data = UNSET + else: + data = ConversationsReportsResponse200Data.from_dict(_data) + + conversations_reports_response_200 = cls( + status=status, + data=data, + ) + + conversations_reports_response_200.additional_properties = src_dict + return conversations_reports_response_200 + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/customgpt-client/customgpt_client/models/conversations_reports_response_200_data.py b/customgpt-client/customgpt_client/models/conversations_reports_response_200_data.py new file mode 100644 index 0000000..8ac347d --- /dev/null +++ b/customgpt-client/customgpt_client/models/conversations_reports_response_200_data.py @@ -0,0 +1,64 @@ +from typing import Any, Dict, List, Type, TypeVar, Union + +import attr + +from ..types import UNSET, Unset + +T = TypeVar("T", bound="ConversationsReportsResponse200Data") + + +@attr.s(auto_attribs=True) +class ConversationsReportsResponse200Data: + """ + Attributes: + total (Union[Unset, int]): Total number of conversations Example: 10. + average_queries_per_conversation (Union[Unset, int]): Average number of queries per conversations Example: 1.2. + """ + + total: Union[Unset, int] = UNSET + average_queries_per_conversation: Union[Unset, int] = UNSET + additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + total = self.total + average_queries_per_conversation = self.average_queries_per_conversation + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if total is not UNSET: + field_dict["total"] = total + if average_queries_per_conversation is not UNSET: + field_dict["average_queries_per_conversation"] = average_queries_per_conversation + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + total = src_dict.get("total") + + average_queries_per_conversation = src_dict.get("average_queries_per_conversation") + + conversations_reports_response_200_data = cls( + total=total, + average_queries_per_conversation=average_queries_per_conversation, + ) + + conversations_reports_response_200_data.additional_properties = src_dict + return conversations_reports_response_200_data + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/customgpt-client/customgpt_client/models/conversations_reports_response_200_status.py b/customgpt-client/customgpt_client/models/conversations_reports_response_200_status.py new file mode 100644 index 0000000..1821250 --- /dev/null +++ b/customgpt-client/customgpt_client/models/conversations_reports_response_200_status.py @@ -0,0 +1,9 @@ +from enum import Enum + + +class ConversationsReportsResponse200Status(str, Enum): + ERROR = "error" + SUCCESS = "success" + + def __str__(self) -> str: + return str(self.value) diff --git a/customgpt-client/customgpt_client/models/conversations_reports_response_400.py b/customgpt-client/customgpt_client/models/conversations_reports_response_400.py new file mode 100644 index 0000000..75d8565 --- /dev/null +++ b/customgpt-client/customgpt_client/models/conversations_reports_response_400.py @@ -0,0 +1,88 @@ +from typing import TYPE_CHECKING, Any, Dict, List, Type, TypeVar, Union + +import attr + +from ..types import UNSET, Unset + +if TYPE_CHECKING: + from ..models.conversations_reports_response_400_data import ConversationsReportsResponse400Data + + +T = TypeVar("T", bound="ConversationsReportsResponse400") + + +@attr.s(auto_attribs=True) +class ConversationsReportsResponse400: + """ + Attributes: + status (Union[Unset, ConversationsReportsResponse400Status]): The status of the response Example: error. + url (Union[Unset, str]): The URL of the request Example: https://app.customgpt.ai/api/v1/projects/1. + data (Union[Unset, ConversationsReportsResponse400Data]): + """ + + status: Union[Unset, str] = UNSET + url: Union[Unset, str] = UNSET + data: Union[Unset, "ConversationsReportsResponse400Data"] = UNSET + additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + status: Union[Unset, str] = UNSET + if not isinstance(self.status, Unset): + status = self.status + + url = self.url + data: Union[Unset, Dict[str, Any]] = UNSET + if not isinstance(self.data, Unset): + data = self.data.to_dict() + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if status is not UNSET: + field_dict["status"] = status + if url is not UNSET: + field_dict["url"] = url + if data is not UNSET: + field_dict["data"] = data + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + from ..models.conversations_reports_response_400_data import ConversationsReportsResponse400Data + + status = src_dict.get("status") + + url = src_dict.get("url") + + _data = src_dict.get("data") + data: Union[Unset, ConversationsReportsResponse400Data] + if isinstance(_data, Unset): + data = UNSET + else: + data = ConversationsReportsResponse400Data.from_dict(_data) + + conversations_reports_response_400 = cls( + status=status, + url=url, + data=data, + ) + + conversations_reports_response_400.additional_properties = src_dict + return conversations_reports_response_400 + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/customgpt-client/customgpt_client/models/conversations_reports_response_400_data.py b/customgpt-client/customgpt_client/models/conversations_reports_response_400_data.py new file mode 100644 index 0000000..246ea17 --- /dev/null +++ b/customgpt-client/customgpt_client/models/conversations_reports_response_400_data.py @@ -0,0 +1,67 @@ +from typing import Any, Dict, List, Type, TypeVar, Union + +import attr + +from ..types import UNSET, Unset + +T = TypeVar("T", bound="ConversationsReportsResponse400Data") + + +@attr.s(auto_attribs=True) +class ConversationsReportsResponse400Data: + """ + Attributes: + code (Union[Unset, ConversationsReportsResponse400DataCode]): The error status code Example: 400. + message (Union[Unset, str]): The error message Example: Project id must be integer. + """ + + code: Union[Unset, str] = UNSET + message: Union[Unset, str] = UNSET + additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + code: Union[Unset, int] = UNSET + if not isinstance(self.code, Unset): + code = self.code + + message = self.message + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if code is not UNSET: + field_dict["code"] = code + if message is not UNSET: + field_dict["message"] = message + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + code = src_dict.get("code") + + message = src_dict.get("message") + + conversations_reports_response_400_data = cls( + code=code, + message=message, + ) + + conversations_reports_response_400_data.additional_properties = src_dict + return conversations_reports_response_400_data + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/customgpt-client/customgpt_client/models/conversations_reports_response_400_data_code.py b/customgpt-client/customgpt_client/models/conversations_reports_response_400_data_code.py new file mode 100644 index 0000000..82a9a63 --- /dev/null +++ b/customgpt-client/customgpt_client/models/conversations_reports_response_400_data_code.py @@ -0,0 +1,13 @@ +from enum import IntEnum + + +class ConversationsReportsResponse400DataCode(IntEnum): + VALUE_400 = 400 + VALUE_401 = 401 + VALUE_403 = 403 + VALUE_404 = 404 + VALUE_500 = 500 + VALUE_503 = 503 + + def __str__(self) -> str: + return str(self.value) diff --git a/customgpt-client/customgpt_client/models/conversations_reports_response_400_status.py b/customgpt-client/customgpt_client/models/conversations_reports_response_400_status.py new file mode 100644 index 0000000..614187f --- /dev/null +++ b/customgpt-client/customgpt_client/models/conversations_reports_response_400_status.py @@ -0,0 +1,9 @@ +from enum import Enum + + +class ConversationsReportsResponse400Status(str, Enum): + ERROR = "error" + SUCCESS = "success" + + def __str__(self) -> str: + return str(self.value) diff --git a/customgpt-client/customgpt_client/models/conversations_reports_response_401.py b/customgpt-client/customgpt_client/models/conversations_reports_response_401.py new file mode 100644 index 0000000..c2317de --- /dev/null +++ b/customgpt-client/customgpt_client/models/conversations_reports_response_401.py @@ -0,0 +1,88 @@ +from typing import TYPE_CHECKING, Any, Dict, List, Type, TypeVar, Union + +import attr + +from ..types import UNSET, Unset + +if TYPE_CHECKING: + from ..models.conversations_reports_response_401_data import ConversationsReportsResponse401Data + + +T = TypeVar("T", bound="ConversationsReportsResponse401") + + +@attr.s(auto_attribs=True) +class ConversationsReportsResponse401: + """ + Attributes: + status (Union[Unset, ConversationsReportsResponse401Status]): The status of the response Example: error. + url (Union[Unset, str]): The URL of the request Example: https://app.customgpt.ai/api/v1/projects/1. + data (Union[Unset, ConversationsReportsResponse401Data]): + """ + + status: Union[Unset, str] = UNSET + url: Union[Unset, str] = UNSET + data: Union[Unset, "ConversationsReportsResponse401Data"] = UNSET + additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + status: Union[Unset, str] = UNSET + if not isinstance(self.status, Unset): + status = self.status + + url = self.url + data: Union[Unset, Dict[str, Any]] = UNSET + if not isinstance(self.data, Unset): + data = self.data.to_dict() + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if status is not UNSET: + field_dict["status"] = status + if url is not UNSET: + field_dict["url"] = url + if data is not UNSET: + field_dict["data"] = data + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + from ..models.conversations_reports_response_401_data import ConversationsReportsResponse401Data + + status = src_dict.get("status") + + url = src_dict.get("url") + + _data = src_dict.get("data") + data: Union[Unset, ConversationsReportsResponse401Data] + if isinstance(_data, Unset): + data = UNSET + else: + data = ConversationsReportsResponse401Data.from_dict(_data) + + conversations_reports_response_401 = cls( + status=status, + url=url, + data=data, + ) + + conversations_reports_response_401.additional_properties = src_dict + return conversations_reports_response_401 + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/customgpt-client/customgpt_client/models/conversations_reports_response_401_data.py b/customgpt-client/customgpt_client/models/conversations_reports_response_401_data.py new file mode 100644 index 0000000..b69f723 --- /dev/null +++ b/customgpt-client/customgpt_client/models/conversations_reports_response_401_data.py @@ -0,0 +1,67 @@ +from typing import Any, Dict, List, Type, TypeVar, Union + +import attr + +from ..types import UNSET, Unset + +T = TypeVar("T", bound="ConversationsReportsResponse401Data") + + +@attr.s(auto_attribs=True) +class ConversationsReportsResponse401Data: + """ + Attributes: + code (Union[Unset, ConversationsReportsResponse401DataCode]): The error status code Example: 401. + message (Union[Unset, str]): Example: API Token is either missing or invalid. + """ + + code: Union[Unset, str] = UNSET + message: Union[Unset, str] = UNSET + additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + code: Union[Unset, int] = UNSET + if not isinstance(self.code, Unset): + code = self.code + + message = self.message + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if code is not UNSET: + field_dict["code"] = code + if message is not UNSET: + field_dict["message"] = message + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + code = src_dict.get("code") + + message = src_dict.get("message") + + conversations_reports_response_401_data = cls( + code=code, + message=message, + ) + + conversations_reports_response_401_data.additional_properties = src_dict + return conversations_reports_response_401_data + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/customgpt-client/customgpt_client/models/conversations_reports_response_401_data_code.py b/customgpt-client/customgpt_client/models/conversations_reports_response_401_data_code.py new file mode 100644 index 0000000..ade1df9 --- /dev/null +++ b/customgpt-client/customgpt_client/models/conversations_reports_response_401_data_code.py @@ -0,0 +1,13 @@ +from enum import IntEnum + + +class ConversationsReportsResponse401DataCode(IntEnum): + VALUE_400 = 400 + VALUE_401 = 401 + VALUE_403 = 403 + VALUE_404 = 404 + VALUE_500 = 500 + VALUE_503 = 503 + + def __str__(self) -> str: + return str(self.value) diff --git a/customgpt-client/customgpt_client/models/conversations_reports_response_401_status.py b/customgpt-client/customgpt_client/models/conversations_reports_response_401_status.py new file mode 100644 index 0000000..0fcb0e7 --- /dev/null +++ b/customgpt-client/customgpt_client/models/conversations_reports_response_401_status.py @@ -0,0 +1,9 @@ +from enum import Enum + + +class ConversationsReportsResponse401Status(str, Enum): + ERROR = "error" + SUCCESS = "success" + + def __str__(self) -> str: + return str(self.value) diff --git a/customgpt-client/customgpt_client/models/conversations_reports_response_404.py b/customgpt-client/customgpt_client/models/conversations_reports_response_404.py new file mode 100644 index 0000000..b60f46c --- /dev/null +++ b/customgpt-client/customgpt_client/models/conversations_reports_response_404.py @@ -0,0 +1,88 @@ +from typing import TYPE_CHECKING, Any, Dict, List, Type, TypeVar, Union + +import attr + +from ..types import UNSET, Unset + +if TYPE_CHECKING: + from ..models.conversations_reports_response_404_data import ConversationsReportsResponse404Data + + +T = TypeVar("T", bound="ConversationsReportsResponse404") + + +@attr.s(auto_attribs=True) +class ConversationsReportsResponse404: + """ + Attributes: + status (Union[Unset, ConversationsReportsResponse404Status]): The status of the response Example: error. + url (Union[Unset, str]): The URL of the request Example: https://app.customgpt.ai/api/v1/projects/1. + data (Union[Unset, ConversationsReportsResponse404Data]): + """ + + status: Union[Unset, str] = UNSET + url: Union[Unset, str] = UNSET + data: Union[Unset, "ConversationsReportsResponse404Data"] = UNSET + additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + status: Union[Unset, str] = UNSET + if not isinstance(self.status, Unset): + status = self.status + + url = self.url + data: Union[Unset, Dict[str, Any]] = UNSET + if not isinstance(self.data, Unset): + data = self.data.to_dict() + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if status is not UNSET: + field_dict["status"] = status + if url is not UNSET: + field_dict["url"] = url + if data is not UNSET: + field_dict["data"] = data + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + from ..models.conversations_reports_response_404_data import ConversationsReportsResponse404Data + + status = src_dict.get("status") + + url = src_dict.get("url") + + _data = src_dict.get("data") + data: Union[Unset, ConversationsReportsResponse404Data] + if isinstance(_data, Unset): + data = UNSET + else: + data = ConversationsReportsResponse404Data.from_dict(_data) + + conversations_reports_response_404 = cls( + status=status, + url=url, + data=data, + ) + + conversations_reports_response_404.additional_properties = src_dict + return conversations_reports_response_404 + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/customgpt-client/customgpt_client/models/conversations_reports_response_404_data.py b/customgpt-client/customgpt_client/models/conversations_reports_response_404_data.py new file mode 100644 index 0000000..90f8938 --- /dev/null +++ b/customgpt-client/customgpt_client/models/conversations_reports_response_404_data.py @@ -0,0 +1,70 @@ +from typing import Any, Dict, List, Type, TypeVar, Union + +import attr + +from ..types import UNSET, Unset + +T = TypeVar("T", bound="ConversationsReportsResponse404Data") + + +@attr.s(auto_attribs=True) +class ConversationsReportsResponse404Data: + """ + Attributes: + code (Union[Unset, ConversationsReportsResponse404DataCode]): The error status code Example: 404. + message (Union[Unset, ConversationsReportsResponse404DataMessage]): The error message Example: Project with id 1 + not found. + """ + + code: Union[Unset, str] = UNSET + message: Union[Unset, str] = UNSET + additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + code: Union[Unset, int] = UNSET + if not isinstance(self.code, Unset): + code = self.code + + message: Union[Unset, str] = UNSET + if not isinstance(self.message, Unset): + message = self.message + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if code is not UNSET: + field_dict["code"] = code + if message is not UNSET: + field_dict["message"] = message + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + code = src_dict.get("code") + + message = src_dict.get("message") + + conversations_reports_response_404_data = cls( + code=code, + message=message, + ) + + conversations_reports_response_404_data.additional_properties = src_dict + return conversations_reports_response_404_data + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/customgpt-client/customgpt_client/models/conversations_reports_response_404_data_code.py b/customgpt-client/customgpt_client/models/conversations_reports_response_404_data_code.py new file mode 100644 index 0000000..5823d4e --- /dev/null +++ b/customgpt-client/customgpt_client/models/conversations_reports_response_404_data_code.py @@ -0,0 +1,13 @@ +from enum import IntEnum + + +class ConversationsReportsResponse404DataCode(IntEnum): + VALUE_400 = 400 + VALUE_401 = 401 + VALUE_403 = 403 + VALUE_404 = 404 + VALUE_500 = 500 + VALUE_503 = 503 + + def __str__(self) -> str: + return str(self.value) diff --git a/customgpt-client/customgpt_client/models/conversations_reports_response_404_data_message.py b/customgpt-client/customgpt_client/models/conversations_reports_response_404_data_message.py new file mode 100644 index 0000000..3a80807 --- /dev/null +++ b/customgpt-client/customgpt_client/models/conversations_reports_response_404_data_message.py @@ -0,0 +1,9 @@ +from enum import Enum + + +class ConversationsReportsResponse404DataMessage(str, Enum): + PROJECT_ID_IS_REQUIRED = "Project id is required" + PROJECT_WITH_ID_PROJECTID_NOT_FOUND = "Project with id {projectId} not found" + + def __str__(self) -> str: + return str(self.value) diff --git a/customgpt-client/customgpt_client/models/conversations_reports_response_404_status.py b/customgpt-client/customgpt_client/models/conversations_reports_response_404_status.py new file mode 100644 index 0000000..acb0252 --- /dev/null +++ b/customgpt-client/customgpt_client/models/conversations_reports_response_404_status.py @@ -0,0 +1,9 @@ +from enum import Enum + + +class ConversationsReportsResponse404Status(str, Enum): + ERROR = "error" + SUCCESS = "success" + + def __str__(self) -> str: + return str(self.value) diff --git a/customgpt-client/customgpt_client/models/conversations_reports_response_500.py b/customgpt-client/customgpt_client/models/conversations_reports_response_500.py new file mode 100644 index 0000000..794eba0 --- /dev/null +++ b/customgpt-client/customgpt_client/models/conversations_reports_response_500.py @@ -0,0 +1,88 @@ +from typing import TYPE_CHECKING, Any, Dict, List, Type, TypeVar, Union + +import attr + +from ..types import UNSET, Unset + +if TYPE_CHECKING: + from ..models.conversations_reports_response_500_data import ConversationsReportsResponse500Data + + +T = TypeVar("T", bound="ConversationsReportsResponse500") + + +@attr.s(auto_attribs=True) +class ConversationsReportsResponse500: + """ + Attributes: + status (Union[Unset, ConversationsReportsResponse500Status]): The status of the response Example: error. + url (Union[Unset, str]): The URL of the request Example: https://app.customgpt.ai/api/v1/projects/1. + data (Union[Unset, ConversationsReportsResponse500Data]): + """ + + status: Union[Unset, str] = UNSET + url: Union[Unset, str] = UNSET + data: Union[Unset, "ConversationsReportsResponse500Data"] = UNSET + additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + status: Union[Unset, str] = UNSET + if not isinstance(self.status, Unset): + status = self.status + + url = self.url + data: Union[Unset, Dict[str, Any]] = UNSET + if not isinstance(self.data, Unset): + data = self.data.to_dict() + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if status is not UNSET: + field_dict["status"] = status + if url is not UNSET: + field_dict["url"] = url + if data is not UNSET: + field_dict["data"] = data + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + from ..models.conversations_reports_response_500_data import ConversationsReportsResponse500Data + + status = src_dict.get("status") + + url = src_dict.get("url") + + _data = src_dict.get("data") + data: Union[Unset, ConversationsReportsResponse500Data] + if isinstance(_data, Unset): + data = UNSET + else: + data = ConversationsReportsResponse500Data.from_dict(_data) + + conversations_reports_response_500 = cls( + status=status, + url=url, + data=data, + ) + + conversations_reports_response_500.additional_properties = src_dict + return conversations_reports_response_500 + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/customgpt-client/customgpt_client/models/conversations_reports_response_500_data.py b/customgpt-client/customgpt_client/models/conversations_reports_response_500_data.py new file mode 100644 index 0000000..48058cb --- /dev/null +++ b/customgpt-client/customgpt_client/models/conversations_reports_response_500_data.py @@ -0,0 +1,67 @@ +from typing import Any, Dict, List, Type, TypeVar, Union + +import attr + +from ..types import UNSET, Unset + +T = TypeVar("T", bound="ConversationsReportsResponse500Data") + + +@attr.s(auto_attribs=True) +class ConversationsReportsResponse500Data: + """ + Attributes: + code (Union[Unset, ConversationsReportsResponse500DataCode]): The error status code Example: 500. + message (Union[Unset, str]): Example: Internal Server Error. + """ + + code: Union[Unset, str] = UNSET + message: Union[Unset, str] = UNSET + additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + code: Union[Unset, int] = UNSET + if not isinstance(self.code, Unset): + code = self.code + + message = self.message + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if code is not UNSET: + field_dict["code"] = code + if message is not UNSET: + field_dict["message"] = message + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + code = src_dict.get("code") + + message = src_dict.get("message") + + conversations_reports_response_500_data = cls( + code=code, + message=message, + ) + + conversations_reports_response_500_data.additional_properties = src_dict + return conversations_reports_response_500_data + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/customgpt-client/customgpt_client/models/conversations_reports_response_500_data_code.py b/customgpt-client/customgpt_client/models/conversations_reports_response_500_data_code.py new file mode 100644 index 0000000..05170fb --- /dev/null +++ b/customgpt-client/customgpt_client/models/conversations_reports_response_500_data_code.py @@ -0,0 +1,13 @@ +from enum import IntEnum + + +class ConversationsReportsResponse500DataCode(IntEnum): + VALUE_400 = 400 + VALUE_401 = 401 + VALUE_403 = 403 + VALUE_404 = 404 + VALUE_500 = 500 + VALUE_503 = 503 + + def __str__(self) -> str: + return str(self.value) diff --git a/customgpt-client/customgpt_client/models/conversations_reports_response_500_status.py b/customgpt-client/customgpt_client/models/conversations_reports_response_500_status.py new file mode 100644 index 0000000..6fe598c --- /dev/null +++ b/customgpt-client/customgpt_client/models/conversations_reports_response_500_status.py @@ -0,0 +1,9 @@ +from enum import Enum + + +class ConversationsReportsResponse500Status(str, Enum): + ERROR = "error" + SUCCESS = "success" + + def __str__(self) -> str: + return str(self.value) diff --git a/customgpt-client/customgpt_client/models/create_conversation_response_201.py b/customgpt-client/customgpt_client/models/create_conversation_response_201.py index 539bb9b..b19c5b0 100644 --- a/customgpt-client/customgpt_client/models/create_conversation_response_201.py +++ b/customgpt-client/customgpt_client/models/create_conversation_response_201.py @@ -19,7 +19,7 @@ class CreateConversationResponse201: data (Union[Unset, CreateConversationResponse201Data]): """ - status: Union[Unset, str] = "success" + status: Union[Unset, str] = UNSET data: Union[Unset, "CreateConversationResponse201Data"] = UNSET additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) diff --git a/customgpt-client/customgpt_client/models/create_conversation_response_201_data.py b/customgpt-client/customgpt_client/models/create_conversation_response_201_data.py index d6a4c87..42ee775 100644 --- a/customgpt-client/customgpt_client/models/create_conversation_response_201_data.py +++ b/customgpt-client/customgpt_client/models/create_conversation_response_201_data.py @@ -15,8 +15,6 @@ class CreateConversationResponse201Data: Attributes: created_at (Union[Unset, datetime.datetime]): When was this conversation created? Example: 2023-04-30 16:43:53. updated_at (Union[Unset, datetime.datetime]): When was this conversation updated? Example: 2023-04-30 16:43:53. - deleted_at (Union[Unset, None, datetime.datetime]): When was this conversation deleted? Example: 2023-04-30 - 16:43:53. id (Union[Unset, int]): Conversation ID Example: 1. name (Union[Unset, str]): Conversation name Example: Conversation 1. project_id (Union[Unset, str]): Project ID for this conversation Example: 1. @@ -26,7 +24,6 @@ class CreateConversationResponse201Data: created_at: Union[Unset, datetime.datetime] = UNSET updated_at: Union[Unset, datetime.datetime] = UNSET - deleted_at: Union[Unset, None, datetime.datetime] = UNSET id: Union[Unset, int] = UNSET name: Union[Unset, str] = UNSET project_id: Union[Unset, str] = UNSET @@ -43,10 +40,6 @@ def to_dict(self) -> Dict[str, Any]: if not isinstance(self.updated_at, Unset): updated_at = self.updated_at.isoformat() - deleted_at: Union[Unset, None, str] = UNSET - if not isinstance(self.deleted_at, Unset): - deleted_at = self.deleted_at.isoformat() if self.deleted_at else None - id = self.id name = self.name project_id = self.project_id @@ -60,8 +53,6 @@ def to_dict(self) -> Dict[str, Any]: field_dict["created_at"] = created_at if updated_at is not UNSET: field_dict["updated_at"] = updated_at - if deleted_at is not UNSET: - field_dict["deleted_at"] = deleted_at if id is not UNSET: field_dict["id"] = id if name is not UNSET: @@ -91,15 +82,6 @@ def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: else: updated_at = isoparse(_updated_at) - _deleted_at = src_dict.get("deleted_at") - deleted_at: Union[Unset, None, datetime.datetime] - if _deleted_at is None: - deleted_at = None - elif isinstance(_deleted_at, Unset): - deleted_at = UNSET - else: - deleted_at = isoparse(_deleted_at) - id = src_dict.get("id") name = src_dict.get("name") @@ -113,7 +95,6 @@ def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: create_conversation_response_201_data = cls( created_at=created_at, updated_at=updated_at, - deleted_at=deleted_at, id=id, name=name, project_id=project_id, diff --git a/customgpt-client/customgpt_client/models/create_conversation_response_400.py b/customgpt-client/customgpt_client/models/create_conversation_response_400.py index b91de86..dce594a 100644 --- a/customgpt-client/customgpt_client/models/create_conversation_response_400.py +++ b/customgpt-client/customgpt_client/models/create_conversation_response_400.py @@ -20,7 +20,7 @@ class CreateConversationResponse400: data (Union[Unset, CreateConversationResponse400Data]): """ - status: Union[Unset, str] = "error" + status: Union[Unset, str] = UNSET url: Union[Unset, str] = UNSET data: Union[Unset, "CreateConversationResponse400Data"] = UNSET additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) diff --git a/customgpt-client/customgpt_client/models/create_conversation_response_400_data.py b/customgpt-client/customgpt_client/models/create_conversation_response_400_data.py index c1ee7a2..b264588 100644 --- a/customgpt-client/customgpt_client/models/create_conversation_response_400_data.py +++ b/customgpt-client/customgpt_client/models/create_conversation_response_400_data.py @@ -15,7 +15,7 @@ class CreateConversationResponse400Data: message (Union[Unset, str]): The error message Example: Project id must be integer. """ - code: Union[Unset, str] = "400" + code: Union[Unset, str] = UNSET message: Union[Unset, str] = UNSET additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) diff --git a/customgpt-client/customgpt_client/models/create_conversation_response_401.py b/customgpt-client/customgpt_client/models/create_conversation_response_401.py index 0a61964..a4a5253 100644 --- a/customgpt-client/customgpt_client/models/create_conversation_response_401.py +++ b/customgpt-client/customgpt_client/models/create_conversation_response_401.py @@ -20,7 +20,7 @@ class CreateConversationResponse401: data (Union[Unset, CreateConversationResponse401Data]): """ - status: Union[Unset, str] = "error" + status: Union[Unset, str] = UNSET url: Union[Unset, str] = UNSET data: Union[Unset, "CreateConversationResponse401Data"] = UNSET additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) diff --git a/customgpt-client/customgpt_client/models/create_conversation_response_401_data.py b/customgpt-client/customgpt_client/models/create_conversation_response_401_data.py index 9776367..5648767 100644 --- a/customgpt-client/customgpt_client/models/create_conversation_response_401_data.py +++ b/customgpt-client/customgpt_client/models/create_conversation_response_401_data.py @@ -15,7 +15,7 @@ class CreateConversationResponse401Data: message (Union[Unset, str]): Example: API Token is either missing or invalid. """ - code: Union[Unset, str] = "401" + code: Union[Unset, str] = UNSET message: Union[Unset, str] = UNSET additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) diff --git a/customgpt-client/customgpt_client/models/create_conversation_response_404.py b/customgpt-client/customgpt_client/models/create_conversation_response_404.py index a55aec0..d27ee6f 100644 --- a/customgpt-client/customgpt_client/models/create_conversation_response_404.py +++ b/customgpt-client/customgpt_client/models/create_conversation_response_404.py @@ -20,7 +20,7 @@ class CreateConversationResponse404: data (Union[Unset, CreateConversationResponse404Data]): """ - status: Union[Unset, str] = "error" + status: Union[Unset, str] = UNSET url: Union[Unset, str] = UNSET data: Union[Unset, "CreateConversationResponse404Data"] = UNSET additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) diff --git a/customgpt-client/customgpt_client/models/create_conversation_response_404_data.py b/customgpt-client/customgpt_client/models/create_conversation_response_404_data.py index 12e73f5..72fa058 100644 --- a/customgpt-client/customgpt_client/models/create_conversation_response_404_data.py +++ b/customgpt-client/customgpt_client/models/create_conversation_response_404_data.py @@ -16,8 +16,8 @@ class CreateConversationResponse404Data: not found. """ - code: Union[Unset, str] = "404" - message: Union[Unset, str] = "Project with id 1 not found" + code: Union[Unset, str] = UNSET + message: Union[Unset, str] = UNSET additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) def to_dict(self) -> Dict[str, Any]: diff --git a/customgpt-client/customgpt_client/models/create_conversation_response_500.py b/customgpt-client/customgpt_client/models/create_conversation_response_500.py index 0ef1f83..8b9868d 100644 --- a/customgpt-client/customgpt_client/models/create_conversation_response_500.py +++ b/customgpt-client/customgpt_client/models/create_conversation_response_500.py @@ -20,7 +20,7 @@ class CreateConversationResponse500: data (Union[Unset, CreateConversationResponse500Data]): """ - status: Union[Unset, str] = "error" + status: Union[Unset, str] = UNSET url: Union[Unset, str] = UNSET data: Union[Unset, "CreateConversationResponse500Data"] = UNSET additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) diff --git a/customgpt-client/customgpt_client/models/create_conversation_response_500_data.py b/customgpt-client/customgpt_client/models/create_conversation_response_500_data.py index 99ab201..80461ee 100644 --- a/customgpt-client/customgpt_client/models/create_conversation_response_500_data.py +++ b/customgpt-client/customgpt_client/models/create_conversation_response_500_data.py @@ -15,7 +15,7 @@ class CreateConversationResponse500Data: message (Union[Unset, str]): Example: Internal Server Error. """ - code: Union[Unset, str] = "500" + code: Union[Unset, str] = UNSET message: Union[Unset, str] = UNSET additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) diff --git a/customgpt-client/customgpt_client/models/create_plugin_json_body.py b/customgpt-client/customgpt_client/models/create_plugin_json_body.py index 61fe603..da61888 100644 --- a/customgpt-client/customgpt_client/models/create_plugin_json_body.py +++ b/customgpt-client/customgpt_client/models/create_plugin_json_body.py @@ -31,7 +31,7 @@ def to_dict(self) -> Dict[str, Any]: human_name = self.human_name keywords = self.keywords description = self.description - is_active = self.is_active + is_active = True if self.is_active else False field_dict: Dict[str, Any] = {} field_dict.update(self.additional_properties) diff --git a/customgpt-client/customgpt_client/models/create_plugin_response_201.py b/customgpt-client/customgpt_client/models/create_plugin_response_201.py index 2d5f538..860515c 100644 --- a/customgpt-client/customgpt_client/models/create_plugin_response_201.py +++ b/customgpt-client/customgpt_client/models/create_plugin_response_201.py @@ -19,7 +19,7 @@ class CreatePluginResponse201: data (Union[Unset, CreatePluginResponse201Data]): """ - status: Union[Unset, str] = "success" + status: Union[Unset, str] = UNSET data: Union[Unset, "CreatePluginResponse201Data"] = UNSET additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) diff --git a/customgpt-client/customgpt_client/models/create_plugin_response_201_data.py b/customgpt-client/customgpt_client/models/create_plugin_response_201_data.py index 98869b4..ec1bd8f 100644 --- a/customgpt-client/customgpt_client/models/create_plugin_response_201_data.py +++ b/customgpt-client/customgpt_client/models/create_plugin_response_201_data.py @@ -34,7 +34,7 @@ def to_dict(self) -> Dict[str, Any]: keywords = self.keywords description = self.description logo = self.logo - is_active = self.is_active + is_active = True if self.is_active else False field_dict: Dict[str, Any] = {} field_dict.update(self.additional_properties) diff --git a/customgpt-client/customgpt_client/models/create_plugin_response_400.py b/customgpt-client/customgpt_client/models/create_plugin_response_400.py index 2561e27..c9e5f27 100644 --- a/customgpt-client/customgpt_client/models/create_plugin_response_400.py +++ b/customgpt-client/customgpt_client/models/create_plugin_response_400.py @@ -20,7 +20,7 @@ class CreatePluginResponse400: data (Union[Unset, CreatePluginResponse400Data]): """ - status: Union[Unset, str] = "error" + status: Union[Unset, str] = UNSET url: Union[Unset, str] = UNSET data: Union[Unset, "CreatePluginResponse400Data"] = UNSET additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) diff --git a/customgpt-client/customgpt_client/models/create_plugin_response_400_data.py b/customgpt-client/customgpt_client/models/create_plugin_response_400_data.py index f4bbfc9..3e304f3 100644 --- a/customgpt-client/customgpt_client/models/create_plugin_response_400_data.py +++ b/customgpt-client/customgpt_client/models/create_plugin_response_400_data.py @@ -15,7 +15,7 @@ class CreatePluginResponse400Data: message (Union[Unset, str]): The error message Example: Project id must be integer. """ - code: Union[Unset, str] = "400" + code: Union[Unset, str] = UNSET message: Union[Unset, str] = UNSET additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) diff --git a/customgpt-client/customgpt_client/models/create_plugin_response_401.py b/customgpt-client/customgpt_client/models/create_plugin_response_401.py index c313e2c..b15e684 100644 --- a/customgpt-client/customgpt_client/models/create_plugin_response_401.py +++ b/customgpt-client/customgpt_client/models/create_plugin_response_401.py @@ -20,7 +20,7 @@ class CreatePluginResponse401: data (Union[Unset, CreatePluginResponse401Data]): """ - status: Union[Unset, str] = "error" + status: Union[Unset, str] = UNSET url: Union[Unset, str] = UNSET data: Union[Unset, "CreatePluginResponse401Data"] = UNSET additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) diff --git a/customgpt-client/customgpt_client/models/create_plugin_response_401_data.py b/customgpt-client/customgpt_client/models/create_plugin_response_401_data.py index 23da538..e04f582 100644 --- a/customgpt-client/customgpt_client/models/create_plugin_response_401_data.py +++ b/customgpt-client/customgpt_client/models/create_plugin_response_401_data.py @@ -15,7 +15,7 @@ class CreatePluginResponse401Data: message (Union[Unset, str]): Example: API Token is either missing or invalid. """ - code: Union[Unset, str] = "401" + code: Union[Unset, str] = UNSET message: Union[Unset, str] = UNSET additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) diff --git a/customgpt-client/customgpt_client/models/create_plugin_response_404.py b/customgpt-client/customgpt_client/models/create_plugin_response_404.py index 4d888b8..c79d21f 100644 --- a/customgpt-client/customgpt_client/models/create_plugin_response_404.py +++ b/customgpt-client/customgpt_client/models/create_plugin_response_404.py @@ -20,7 +20,7 @@ class CreatePluginResponse404: data (Union[Unset, CreatePluginResponse404Data]): """ - status: Union[Unset, str] = "error" + status: Union[Unset, str] = UNSET url: Union[Unset, str] = UNSET data: Union[Unset, "CreatePluginResponse404Data"] = UNSET additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) diff --git a/customgpt-client/customgpt_client/models/create_plugin_response_404_data.py b/customgpt-client/customgpt_client/models/create_plugin_response_404_data.py index 53ce392..1f152a6 100644 --- a/customgpt-client/customgpt_client/models/create_plugin_response_404_data.py +++ b/customgpt-client/customgpt_client/models/create_plugin_response_404_data.py @@ -16,8 +16,8 @@ class CreatePluginResponse404Data: found. """ - code: Union[Unset, str] = "404" - message: Union[Unset, str] = "Project with id 1 not found" + code: Union[Unset, str] = UNSET + message: Union[Unset, str] = UNSET additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) def to_dict(self) -> Dict[str, Any]: diff --git a/customgpt-client/customgpt_client/models/create_plugin_response_500.py b/customgpt-client/customgpt_client/models/create_plugin_response_500.py index bb98ece..164a16c 100644 --- a/customgpt-client/customgpt_client/models/create_plugin_response_500.py +++ b/customgpt-client/customgpt_client/models/create_plugin_response_500.py @@ -20,7 +20,7 @@ class CreatePluginResponse500: data (Union[Unset, CreatePluginResponse500Data]): """ - status: Union[Unset, str] = "error" + status: Union[Unset, str] = UNSET url: Union[Unset, str] = UNSET data: Union[Unset, "CreatePluginResponse500Data"] = UNSET additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) diff --git a/customgpt-client/customgpt_client/models/create_plugin_response_500_data.py b/customgpt-client/customgpt_client/models/create_plugin_response_500_data.py index fbcd67f..4d14fe7 100644 --- a/customgpt-client/customgpt_client/models/create_plugin_response_500_data.py +++ b/customgpt-client/customgpt_client/models/create_plugin_response_500_data.py @@ -15,7 +15,7 @@ class CreatePluginResponse500Data: message (Union[Unset, str]): Example: Internal Server Error. """ - code: Union[Unset, str] = "500" + code: Union[Unset, str] = UNSET message: Union[Unset, str] = UNSET additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) diff --git a/customgpt-client/customgpt_client/models/create_project_multipart_data.py b/customgpt-client/customgpt_client/models/create_project_multipart_data.py index 564770e..d7c3507 100644 --- a/customgpt-client/customgpt_client/models/create_project_multipart_data.py +++ b/customgpt-client/customgpt_client/models/create_project_multipart_data.py @@ -15,19 +15,28 @@ class CreateProjectMultipartData: project_name (Union[Unset, str]): Project name Example: My project. sitemap_path (Union[Unset, str]): The sitemap path Example: https://example.com/sitemap.xml. file_data_retension (Union[Unset, bool]): File data retension Example: True. + is_ocr_enabled (Union[Unset, bool]): OCR enabled + is_anonymized (Union[Unset, bool]): Anonymized file (Union[Unset, File]): The submitted file. Example: file.pdf. """ project_name: Union[Unset, str] = UNSET sitemap_path: Union[Unset, str] = UNSET file_data_retension: Union[Unset, bool] = UNSET + is_ocr_enabled: Union[Unset, bool] = UNSET + is_anonymized: Union[Unset, bool] = UNSET file: Union[Unset, File] = UNSET additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) def to_dict(self) -> Dict[str, Any]: project_name = self.project_name sitemap_path = self.sitemap_path - file_data_retension = self.file_data_retension + file_data_retension = True if self.file_data_retension else False + + is_ocr_enabled = True if self.is_ocr_enabled else False + + is_anonymized = True if self.is_anonymized else False + file: Union[Unset, FileJsonType] = UNSET if not isinstance(self.file, Unset): file = self.file.to_tuple() @@ -41,6 +50,10 @@ def to_dict(self) -> Dict[str, Any]: field_dict["sitemap_path"] = sitemap_path if file_data_retension is not UNSET: field_dict["file_data_retension"] = file_data_retension + if is_ocr_enabled is not UNSET: + field_dict["is_ocr_enabled"] = is_ocr_enabled + if is_anonymized is not UNSET: + field_dict["is_anonymized"] = is_anonymized if file is not UNSET: field_dict["file"] = file @@ -62,6 +75,19 @@ def to_multipart(self) -> Dict[str, Any]: if isinstance(self.file_data_retension, Unset) else (None, str(self.file_data_retension).lower().encode(), "text/plain") ) + + is_ocr_enabled = ( + self.is_ocr_enabled + if isinstance(self.is_ocr_enabled, Unset) + else (None, str(self.is_ocr_enabled).lower().encode(), "text/plain") + ) + + is_anonymized = ( + self.is_anonymized + if isinstance(self.is_anonymized, Unset) + else (None, str(self.is_anonymized).lower().encode(), "text/plain") + ) + file: Union[Unset, FileJsonType] = UNSET if not isinstance(self.file, Unset): file = self.file.to_tuple() @@ -77,6 +103,10 @@ def to_multipart(self) -> Dict[str, Any]: field_dict["sitemap_path"] = sitemap_path if file_data_retension is not UNSET: field_dict["file_data_retension"] = file_data_retension + if is_ocr_enabled is not UNSET: + field_dict["is_ocr_enabled"] = is_ocr_enabled + if is_anonymized is not UNSET: + field_dict["is_anonymized"] = is_anonymized if file is not UNSET: field_dict["file"] = file @@ -90,6 +120,10 @@ def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: file_data_retension = src_dict.get("file_data_retension") + is_ocr_enabled = src_dict.get("is_ocr_enabled") + + is_anonymized = src_dict.get("is_anonymized") + _file = src_dict.get("file") file: Union[Unset, File] if isinstance(_file, Unset): @@ -101,6 +135,8 @@ def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: project_name=project_name, sitemap_path=sitemap_path, file_data_retension=file_data_retension, + is_ocr_enabled=is_ocr_enabled, + is_anonymized=is_anonymized, file=file, ) diff --git a/customgpt-client/customgpt_client/models/create_project_response_201.py b/customgpt-client/customgpt_client/models/create_project_response_201.py index 4f779cc..aae5701 100644 --- a/customgpt-client/customgpt_client/models/create_project_response_201.py +++ b/customgpt-client/customgpt_client/models/create_project_response_201.py @@ -19,7 +19,7 @@ class CreateProjectResponse201: data (Union[Unset, CreateProjectResponse201Data]): """ - status: Union[Unset, str] = "success" + status: Union[Unset, str] = UNSET data: Union[Unset, "CreateProjectResponse201Data"] = UNSET additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) diff --git a/customgpt-client/customgpt_client/models/create_project_response_201_data.py b/customgpt-client/customgpt_client/models/create_project_response_201_data.py index 3592b34..c63c483 100644 --- a/customgpt-client/customgpt_client/models/create_project_response_201_data.py +++ b/customgpt-client/customgpt_client/models/create_project_response_201_data.py @@ -18,12 +18,11 @@ class CreateProjectResponse201Data: sitemap_path (Union[Unset, str]): Project sitemap Example: https://www.example.com/sitemap.xml. is_chat_active (Union[Unset, bool]): Whether the chat bot is active or not Example: True. user_id (Union[Unset, int]): User ID of the project owner Example: 1. + team_id (Union[Unset, int]): Team ID of the project owner Example: 1. created_at (Union[Unset, datetime.datetime]): Date and time when the project was created Default: isoparse('2023-05-08 13:06:55'). Example: 2021-01-01 00:00:00. updated_at (Union[Unset, datetime.datetime]): Date and time when the project was last updated Default: isoparse('2023-05-08 13:06:55'). Example: 2021-01-01 00:00:00. - deleted_at (Union[Unset, None, datetime.datetime]): Date and time when the project was deleted Example: - 2021-01-01 00:00:00. type (Union[Unset, CreateProjectResponse201DataType]): Project type Default: CreateProjectResponse201DataType.SITEMAP. Example: SITEMAP. is_shared (Union[Unset, bool]): Whether the project is shared or not Example: True. @@ -39,10 +38,10 @@ class CreateProjectResponse201Data: sitemap_path: Union[Unset, str] = UNSET is_chat_active: Union[Unset, bool] = False user_id: Union[Unset, int] = UNSET + team_id: Union[Unset, int] = UNSET created_at: Union[Unset, datetime.datetime] = isoparse("2023-05-08 13:06:55") updated_at: Union[Unset, datetime.datetime] = isoparse("2023-05-08 13:06:55") - deleted_at: Union[Unset, None, datetime.datetime] = UNSET - type: Union[Unset, str] = "SITEMAP" + type: Union[Unset, str] = UNSET is_shared: Union[Unset, bool] = False shareable_slug: Union[Unset, None, str] = UNSET shareable_link: Union[Unset, None, str] = UNSET @@ -54,8 +53,10 @@ def to_dict(self) -> Dict[str, Any]: id = self.id project_name = self.project_name sitemap_path = self.sitemap_path - is_chat_active = self.is_chat_active + is_chat_active = True if self.is_chat_active else False + user_id = self.user_id + team_id = self.team_id created_at: Union[Unset, str] = UNSET if not isinstance(self.created_at, Unset): created_at = self.created_at.isoformat() @@ -64,15 +65,12 @@ def to_dict(self) -> Dict[str, Any]: if not isinstance(self.updated_at, Unset): updated_at = self.updated_at.isoformat() - deleted_at: Union[Unset, None, str] = UNSET - if not isinstance(self.deleted_at, Unset): - deleted_at = self.deleted_at.isoformat() if self.deleted_at else None - type: Union[Unset, str] = UNSET if not isinstance(self.type, Unset): type = self.type - is_shared = self.is_shared + is_shared = True if self.is_shared else False + shareable_slug = self.shareable_slug shareable_link = self.shareable_link embed_code = self.embed_code @@ -91,12 +89,12 @@ def to_dict(self) -> Dict[str, Any]: field_dict["is_chat_active"] = is_chat_active if user_id is not UNSET: field_dict["user_id"] = user_id + if team_id is not UNSET: + field_dict["team_id"] = team_id if created_at is not UNSET: field_dict["created_at"] = created_at if updated_at is not UNSET: field_dict["updated_at"] = updated_at - if deleted_at is not UNSET: - field_dict["deleted_at"] = deleted_at if type is not UNSET: field_dict["type"] = type if is_shared is not UNSET: @@ -124,6 +122,8 @@ def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: user_id = src_dict.get("user_id") + team_id = src_dict.get("team_id") + _created_at = src_dict.get("created_at") created_at: Union[Unset, datetime.datetime] if isinstance(_created_at, Unset): @@ -138,15 +138,6 @@ def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: else: updated_at = isoparse(_updated_at) - _deleted_at = src_dict.get("deleted_at") - deleted_at: Union[Unset, None, datetime.datetime] - if _deleted_at is None: - deleted_at = None - elif isinstance(_deleted_at, Unset): - deleted_at = UNSET - else: - deleted_at = isoparse(_deleted_at) - type = src_dict.get("type") is_shared = src_dict.get("is_shared") @@ -165,9 +156,9 @@ def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: sitemap_path=sitemap_path, is_chat_active=is_chat_active, user_id=user_id, + team_id=team_id, created_at=created_at, updated_at=updated_at, - deleted_at=deleted_at, type=type, is_shared=is_shared, shareable_slug=shareable_slug, diff --git a/customgpt-client/customgpt_client/models/create_project_response_400.py b/customgpt-client/customgpt_client/models/create_project_response_400.py index 6eeb23b..73a1c06 100644 --- a/customgpt-client/customgpt_client/models/create_project_response_400.py +++ b/customgpt-client/customgpt_client/models/create_project_response_400.py @@ -20,7 +20,7 @@ class CreateProjectResponse400: data (Union[Unset, CreateProjectResponse400Data]): """ - status: Union[Unset, str] = "error" + status: Union[Unset, str] = UNSET url: Union[Unset, str] = UNSET data: Union[Unset, "CreateProjectResponse400Data"] = UNSET additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) diff --git a/customgpt-client/customgpt_client/models/create_project_response_400_data.py b/customgpt-client/customgpt_client/models/create_project_response_400_data.py index b70b99a..38abe41 100644 --- a/customgpt-client/customgpt_client/models/create_project_response_400_data.py +++ b/customgpt-client/customgpt_client/models/create_project_response_400_data.py @@ -16,8 +16,8 @@ class CreateProjectResponse400Data: empty. """ - code: Union[Unset, str] = "400" - message: Union[Unset, str] = "Project name can't be empty" + code: Union[Unset, str] = UNSET + message: Union[Unset, str] = UNSET additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) def to_dict(self) -> Dict[str, Any]: diff --git a/customgpt-client/customgpt_client/models/create_project_response_401.py b/customgpt-client/customgpt_client/models/create_project_response_401.py index de0a3ef..f22d870 100644 --- a/customgpt-client/customgpt_client/models/create_project_response_401.py +++ b/customgpt-client/customgpt_client/models/create_project_response_401.py @@ -20,7 +20,7 @@ class CreateProjectResponse401: data (Union[Unset, CreateProjectResponse401Data]): """ - status: Union[Unset, str] = "error" + status: Union[Unset, str] = UNSET url: Union[Unset, str] = UNSET data: Union[Unset, "CreateProjectResponse401Data"] = UNSET additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) diff --git a/customgpt-client/customgpt_client/models/create_project_response_401_data.py b/customgpt-client/customgpt_client/models/create_project_response_401_data.py index 0997650..9482050 100644 --- a/customgpt-client/customgpt_client/models/create_project_response_401_data.py +++ b/customgpt-client/customgpt_client/models/create_project_response_401_data.py @@ -15,7 +15,7 @@ class CreateProjectResponse401Data: message (Union[Unset, str]): Example: API Token is either missing or invalid. """ - code: Union[Unset, str] = "401" + code: Union[Unset, str] = UNSET message: Union[Unset, str] = UNSET additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) diff --git a/customgpt-client/customgpt_client/models/create_project_response_500.py b/customgpt-client/customgpt_client/models/create_project_response_500.py index e6a7708..0363e3c 100644 --- a/customgpt-client/customgpt_client/models/create_project_response_500.py +++ b/customgpt-client/customgpt_client/models/create_project_response_500.py @@ -20,7 +20,7 @@ class CreateProjectResponse500: data (Union[Unset, CreateProjectResponse500Data]): """ - status: Union[Unset, str] = "error" + status: Union[Unset, str] = UNSET url: Union[Unset, str] = UNSET data: Union[Unset, "CreateProjectResponse500Data"] = UNSET additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) diff --git a/customgpt-client/customgpt_client/models/create_project_response_500_data.py b/customgpt-client/customgpt_client/models/create_project_response_500_data.py index 876da9a..e3651d3 100644 --- a/customgpt-client/customgpt_client/models/create_project_response_500_data.py +++ b/customgpt-client/customgpt_client/models/create_project_response_500_data.py @@ -15,7 +15,7 @@ class CreateProjectResponse500Data: message (Union[Unset, str]): Example: Internal Server Error. """ - code: Union[Unset, str] = "500" + code: Union[Unset, str] = UNSET message: Union[Unset, str] = UNSET additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) diff --git a/customgpt-client/customgpt_client/models/create_source_multipart_data.py b/customgpt-client/customgpt_client/models/create_source_multipart_data.py index 6058a07..d38b347 100644 --- a/customgpt-client/customgpt_client/models/create_source_multipart_data.py +++ b/customgpt-client/customgpt_client/models/create_source_multipart_data.py @@ -14,17 +14,26 @@ class CreateSourceMultipartData: Attributes: sitemap_path (Union[Unset, str]): The sitemap path Example: https://example.com/sitemap.xml. file_data_retension (Union[Unset, bool]): File data retension Example: True. + is_ocr_enabled (Union[Unset, bool]): OCR enabled + is_anonymized (Union[Unset, bool]): Anonymized file (Union[Unset, File]): The submitted file. Example: file.pdf. """ sitemap_path: Union[Unset, str] = UNSET file_data_retension: Union[Unset, bool] = UNSET + is_ocr_enabled: Union[Unset, bool] = UNSET + is_anonymized: Union[Unset, bool] = UNSET file: Union[Unset, File] = UNSET additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) def to_dict(self) -> Dict[str, Any]: sitemap_path = self.sitemap_path - file_data_retension = self.file_data_retension + file_data_retension = True if self.file_data_retension else False + + is_ocr_enabled = True if self.is_ocr_enabled else False + + is_anonymized = True if self.is_anonymized else False + file: Union[Unset, FileJsonType] = UNSET if not isinstance(self.file, Unset): file = self.file.to_tuple() @@ -36,6 +45,10 @@ def to_dict(self) -> Dict[str, Any]: field_dict["sitemap_path"] = sitemap_path if file_data_retension is not UNSET: field_dict["file_data_retension"] = file_data_retension + if is_ocr_enabled is not UNSET: + field_dict["is_ocr_enabled"] = is_ocr_enabled + if is_anonymized is not UNSET: + field_dict["is_anonymized"] = is_anonymized if file is not UNSET: field_dict["file"] = file @@ -52,6 +65,19 @@ def to_multipart(self) -> Dict[str, Any]: if isinstance(self.file_data_retension, Unset) else (None, str(self.file_data_retension).lower().encode(), "text/plain") ) + + is_ocr_enabled = ( + self.is_ocr_enabled + if isinstance(self.is_ocr_enabled, Unset) + else (None, str(self.is_ocr_enabled).lower().encode(), "text/plain") + ) + + is_anonymized = ( + self.is_anonymized + if isinstance(self.is_anonymized, Unset) + else (None, str(self.is_anonymized).lower().encode(), "text/plain") + ) + file: Union[Unset, FileJsonType] = UNSET if not isinstance(self.file, Unset): file = self.file.to_tuple() @@ -65,6 +91,10 @@ def to_multipart(self) -> Dict[str, Any]: field_dict["sitemap_path"] = sitemap_path if file_data_retension is not UNSET: field_dict["file_data_retension"] = file_data_retension + if is_ocr_enabled is not UNSET: + field_dict["is_ocr_enabled"] = is_ocr_enabled + if is_anonymized is not UNSET: + field_dict["is_anonymized"] = is_anonymized if file is not UNSET: field_dict["file"] = file @@ -76,6 +106,10 @@ def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: file_data_retension = src_dict.get("file_data_retension") + is_ocr_enabled = src_dict.get("is_ocr_enabled") + + is_anonymized = src_dict.get("is_anonymized") + _file = src_dict.get("file") file: Union[Unset, File] if isinstance(_file, Unset): @@ -86,6 +120,8 @@ def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: create_source_multipart_data = cls( sitemap_path=sitemap_path, file_data_retension=file_data_retension, + is_ocr_enabled=is_ocr_enabled, + is_anonymized=is_anonymized, file=file, ) diff --git a/customgpt-client/customgpt_client/models/create_source_response_201.py b/customgpt-client/customgpt_client/models/create_source_response_201.py index d23db80..a02867c 100644 --- a/customgpt-client/customgpt_client/models/create_source_response_201.py +++ b/customgpt-client/customgpt_client/models/create_source_response_201.py @@ -19,7 +19,7 @@ class CreateSourceResponse201: data (Union[Unset, CreateSourceResponse201Data]): """ - status: Union[Unset, str] = "success" + status: Union[Unset, str] = UNSET data: Union[Unset, "CreateSourceResponse201Data"] = UNSET additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) diff --git a/customgpt-client/customgpt_client/models/create_source_response_201_data.py b/customgpt-client/customgpt_client/models/create_source_response_201_data.py index 7932a89..74d9a8d 100644 --- a/customgpt-client/customgpt_client/models/create_source_response_201_data.py +++ b/customgpt-client/customgpt_client/models/create_source_response_201_data.py @@ -29,7 +29,7 @@ class CreateSourceResponse201Data: id: Union[Unset, int] = UNSET created_at: Union[Unset, datetime.datetime] = UNSET updated_at: Union[Unset, datetime.datetime] = UNSET - type: Union[Unset, str] = "sitemap" + type: Union[Unset, str] = UNSET settings: Union[Unset, "CreateSourceResponse201DataSettings"] = UNSET pages: Union[Unset, None, List["CreateSourceResponse201DataPagesItem"]] = UNSET additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) @@ -78,7 +78,7 @@ def to_dict(self) -> Dict[str, Any]: field_dict["settings"] = settings if pages is not UNSET: for index, field_value in enumerate(pages): - field_dict[f"pages[]"] = field_value + field_dict[f"pages[{index}]"] = field_value return field_dict diff --git a/customgpt-client/customgpt_client/models/create_source_response_201_data_pages_item.py b/customgpt-client/customgpt_client/models/create_source_response_201_data_pages_item.py index fb0a267..0547bcd 100644 --- a/customgpt-client/customgpt_client/models/create_source_response_201_data_pages_item.py +++ b/customgpt-client/customgpt_client/models/create_source_response_201_data_pages_item.py @@ -25,6 +25,7 @@ class CreateSourceResponse201DataPagesItem: index_status (Union[Unset, CreateSourceResponse201DataPagesItemIndexStatus]): Index status of the page Default: CreateSourceResponse201DataPagesItemIndexStatus.QUEUED. Example: queued. is_file (Union[Unset, bool]): Whether the page is a file or not Example: True. + is_refreshable (Union[Unset, bool]): Whether the page can be refreshed or not Example: True. is_file_kept (Union[Unset, bool]): Whether the file is kept after processing or not.\nNote: This is omitted in the response if the page is not a file Default: True. Example: True. filename (Union[Unset, None, str]): Filename of the page.\nNote: This is omitted in the response if the page is @@ -35,8 +36,6 @@ class CreateSourceResponse201DataPagesItem: 00:00:00. updated_at (Union[Unset, datetime.datetime]): Date and time when the page was updated Example: 2021-01-01 00:00:00. - deleted_at (Union[Unset, None, datetime.datetime]): Date and time when the page was deleted Example: 2021-01-01 - 00:00:00. """ id: Union[Unset, int] = UNSET @@ -44,15 +43,15 @@ class CreateSourceResponse201DataPagesItem: page_url_hash: Union[Unset, str] = UNSET project_id: Union[Unset, int] = UNSET s3_path: Union[Unset, None, str] = UNSET - crawl_status: Union[Unset, str] = "queued" - index_status: Union[Unset, str] = "queued" + crawl_status: Union[Unset, str] = UNSET + index_status: Union[Unset, str] = UNSET is_file: Union[Unset, bool] = False + is_refreshable: Union[Unset, bool] = False is_file_kept: Union[Unset, bool] = True filename: Union[Unset, None, str] = UNSET filesize: Union[Unset, None, int] = UNSET created_at: Union[Unset, datetime.datetime] = UNSET updated_at: Union[Unset, datetime.datetime] = UNSET - deleted_at: Union[Unset, None, datetime.datetime] = UNSET additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) def to_dict(self) -> Dict[str, Any]: @@ -69,8 +68,12 @@ def to_dict(self) -> Dict[str, Any]: if not isinstance(self.index_status, Unset): index_status = self.index_status - is_file = self.is_file - is_file_kept = self.is_file_kept + is_file = True if self.is_file else False + + is_refreshable = True if self.is_refreshable else False + + is_file_kept = True if self.is_file_kept else False + filename = self.filename filesize = self.filesize created_at: Union[Unset, str] = UNSET @@ -81,10 +84,6 @@ def to_dict(self) -> Dict[str, Any]: if not isinstance(self.updated_at, Unset): updated_at = self.updated_at.isoformat() - deleted_at: Union[Unset, None, str] = UNSET - if not isinstance(self.deleted_at, Unset): - deleted_at = self.deleted_at.isoformat() if self.deleted_at else None - field_dict: Dict[str, Any] = {} field_dict.update(self.additional_properties) field_dict.update({}) @@ -104,6 +103,8 @@ def to_dict(self) -> Dict[str, Any]: field_dict["index_status"] = index_status if is_file is not UNSET: field_dict["is_file"] = is_file + if is_refreshable is not UNSET: + field_dict["is_refreshable"] = is_refreshable if is_file_kept is not UNSET: field_dict["is_file_kept"] = is_file_kept if filename is not UNSET: @@ -114,8 +115,6 @@ def to_dict(self) -> Dict[str, Any]: field_dict["created_at"] = created_at if updated_at is not UNSET: field_dict["updated_at"] = updated_at - if deleted_at is not UNSET: - field_dict["deleted_at"] = deleted_at return field_dict @@ -137,6 +136,8 @@ def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: is_file = src_dict.get("is_file") + is_refreshable = src_dict.get("is_refreshable") + is_file_kept = src_dict.get("is_file_kept") filename = src_dict.get("filename") @@ -157,15 +158,6 @@ def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: else: updated_at = isoparse(_updated_at) - _deleted_at = src_dict.get("deleted_at") - deleted_at: Union[Unset, None, datetime.datetime] - if _deleted_at is None: - deleted_at = None - elif isinstance(_deleted_at, Unset): - deleted_at = UNSET - else: - deleted_at = isoparse(_deleted_at) - create_source_response_201_data_pages_item = cls( id=id, page_url=page_url, @@ -175,12 +167,12 @@ def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: crawl_status=crawl_status, index_status=index_status, is_file=is_file, + is_refreshable=is_refreshable, is_file_kept=is_file_kept, filename=filename, filesize=filesize, created_at=created_at, updated_at=updated_at, - deleted_at=deleted_at, ) create_source_response_201_data_pages_item.additional_properties = src_dict diff --git a/customgpt-client/customgpt_client/models/create_source_response_201_data_settings.py b/customgpt-client/customgpt_client/models/create_source_response_201_data_settings.py index 9580b13..69deba0 100644 --- a/customgpt-client/customgpt_client/models/create_source_response_201_data_settings.py +++ b/customgpt-client/customgpt_client/models/create_source_response_201_data_settings.py @@ -12,35 +12,59 @@ class CreateSourceResponse201DataSettings: """The project source settings Attributes: - data_refresh (Union[Unset, bool]): Whether the project source data should be refreshed Example: True. executive_js (Union[Unset, bool]): Whether the project source should execute JavaScript Default: True. Example: True. - data_refresh_frequency (Union[Unset, str]): The project source data refresh frequency Default: 'never'. Example: + data_refresh_frequency (Union[Unset, CreateSourceResponse201DataSettingsDataRefreshFrequency]): The project + source data refresh frequency Default: CreateSourceResponse201DataSettingsDataRefreshFrequency.NEVER. Example: never. + create_new_pages (Union[Unset, bool]): Add new pages to project automatically during refresh project source + Default: True. Example: True. + remove_unexist_pages (Union[Unset, bool]): Remove pages from project automatically during refresh project source + Default: True. + refresh_existing_pages (Union[Unset, CreateSourceResponse201DataSettingsRefreshExistingPages]): Refresh existing + page during refresh project source Default: CreateSourceResponse201DataSettingsRefreshExistingPages.NEVER. + Example: never. sitemap_path (Union[Unset, str]): The project source sitemap path Example: https://example.com/sitemap.xml. """ - data_refresh: Union[Unset, bool] = False executive_js: Union[Unset, bool] = True - data_refresh_frequency: Union[Unset, str] = "never" + data_refresh_frequency: Union[Unset, str] = UNSET + create_new_pages: Union[Unset, bool] = True + remove_unexist_pages: Union[Unset, bool] = True + refresh_existing_pages: Union[Unset, str] = UNSET sitemap_path: Union[Unset, str] = UNSET additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) def to_dict(self) -> Dict[str, Any]: - data_refresh = self.data_refresh - executive_js = self.executive_js - data_refresh_frequency = self.data_refresh_frequency + executive_js = True if self.executive_js else False + + data_refresh_frequency: Union[Unset, str] = UNSET + if not isinstance(self.data_refresh_frequency, Unset): + data_refresh_frequency = self.data_refresh_frequency + + create_new_pages = True if self.create_new_pages else False + + remove_unexist_pages = True if self.remove_unexist_pages else False + + refresh_existing_pages: Union[Unset, str] = UNSET + if not isinstance(self.refresh_existing_pages, Unset): + refresh_existing_pages = self.refresh_existing_pages + sitemap_path = self.sitemap_path field_dict: Dict[str, Any] = {} field_dict.update(self.additional_properties) field_dict.update({}) - if data_refresh is not UNSET: - field_dict["data_refresh"] = data_refresh if executive_js is not UNSET: field_dict["executive_js"] = executive_js if data_refresh_frequency is not UNSET: field_dict["data_refresh_frequency"] = data_refresh_frequency + if create_new_pages is not UNSET: + field_dict["create_new_pages"] = create_new_pages + if remove_unexist_pages is not UNSET: + field_dict["remove_unexist_pages"] = remove_unexist_pages + if refresh_existing_pages is not UNSET: + field_dict["refresh_existing_pages"] = refresh_existing_pages if sitemap_path is not UNSET: field_dict["sitemap_path"] = sitemap_path @@ -48,18 +72,24 @@ def to_dict(self) -> Dict[str, Any]: @classmethod def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: - data_refresh = src_dict.get("data_refresh") - executive_js = src_dict.get("executive_js") data_refresh_frequency = src_dict.get("data_refresh_frequency") + create_new_pages = src_dict.get("create_new_pages") + + remove_unexist_pages = src_dict.get("remove_unexist_pages") + + refresh_existing_pages = src_dict.get("refresh_existing_pages") + sitemap_path = src_dict.get("sitemap_path") create_source_response_201_data_settings = cls( - data_refresh=data_refresh, executive_js=executive_js, data_refresh_frequency=data_refresh_frequency, + create_new_pages=create_new_pages, + remove_unexist_pages=remove_unexist_pages, + refresh_existing_pages=refresh_existing_pages, sitemap_path=sitemap_path, ) diff --git a/customgpt-client/customgpt_client/models/create_source_response_201_data_settings_data_refresh_frequency.py b/customgpt-client/customgpt_client/models/create_source_response_201_data_settings_data_refresh_frequency.py new file mode 100644 index 0000000..ce2254e --- /dev/null +++ b/customgpt-client/customgpt_client/models/create_source_response_201_data_settings_data_refresh_frequency.py @@ -0,0 +1,12 @@ +from enum import Enum + + +class CreateSourceResponse201DataSettingsDataRefreshFrequency(str, Enum): + ADVANCED = "advanced" + DAILY = "daily" + MONTHLY = "monthly" + NEVER = "never" + WEEKLY = "weekly" + + def __str__(self) -> str: + return str(self.value) diff --git a/customgpt-client/customgpt_client/models/create_source_response_201_data_settings_refresh_existing_pages.py b/customgpt-client/customgpt_client/models/create_source_response_201_data_settings_refresh_existing_pages.py new file mode 100644 index 0000000..9500291 --- /dev/null +++ b/customgpt-client/customgpt_client/models/create_source_response_201_data_settings_refresh_existing_pages.py @@ -0,0 +1,10 @@ +from enum import Enum + + +class CreateSourceResponse201DataSettingsRefreshExistingPages(str, Enum): + ALWAYS = "always" + IF_UPDATED = "if_updated" + NEVER = "never" + + def __str__(self) -> str: + return str(self.value) diff --git a/customgpt-client/customgpt_client/models/create_source_response_400.py b/customgpt-client/customgpt_client/models/create_source_response_400.py index 4a27b5e..d5242a0 100644 --- a/customgpt-client/customgpt_client/models/create_source_response_400.py +++ b/customgpt-client/customgpt_client/models/create_source_response_400.py @@ -20,7 +20,7 @@ class CreateSourceResponse400: data (Union[Unset, CreateSourceResponse400Data]): """ - status: Union[Unset, str] = "error" + status: Union[Unset, str] = UNSET url: Union[Unset, str] = UNSET data: Union[Unset, "CreateSourceResponse400Data"] = UNSET additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) diff --git a/customgpt-client/customgpt_client/models/create_source_response_400_data.py b/customgpt-client/customgpt_client/models/create_source_response_400_data.py index 2cd6b78..17218e6 100644 --- a/customgpt-client/customgpt_client/models/create_source_response_400_data.py +++ b/customgpt-client/customgpt_client/models/create_source_response_400_data.py @@ -12,11 +12,11 @@ class CreateSourceResponse400Data: """ Attributes: code (Union[Unset, CreateSourceResponse400DataCode]): The error status code Example: 400. - message (Union[Unset, CreateSourceResponse400DataMessage]): The error message Example: Sitemap URL is empty. + message (Union[Unset, str]): The error message Example: Sitemap URL is empty. """ - code: Union[Unset, str] = "400" - message: Union[Unset, str] = "Sitemap URL is empty" + code: Union[Unset, str] = UNSET + message: Union[Unset, str] = UNSET additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) def to_dict(self) -> Dict[str, Any]: @@ -24,9 +24,7 @@ def to_dict(self) -> Dict[str, Any]: if not isinstance(self.code, Unset): code = self.code - message: Union[Unset, str] = UNSET - if not isinstance(self.message, Unset): - message = self.message + message = self.message field_dict: Dict[str, Any] = {} field_dict.update(self.additional_properties) diff --git a/customgpt-client/customgpt_client/models/create_source_response_400_data_message.py b/customgpt-client/customgpt_client/models/create_source_response_400_data_message.py deleted file mode 100644 index 412bc85..0000000 --- a/customgpt-client/customgpt_client/models/create_source_response_400_data_message.py +++ /dev/null @@ -1,10 +0,0 @@ -from enum import Enum - - -class CreateSourceResponse400DataMessage(str, Enum): - OUR_SYSTEM_COULD_NOT_DETECT_ANY_PAGES_IN_YOUR_SITEMAP = "Our system could not detect any pages in your sitemap" - OUR_SYSTEM_COULD_NOT_VALIDATE_YOUR_SITEMAP = "Our system could not validate your sitemap" - SITEMAP_URL_IS_EMPTY = "Sitemap URL is empty" - - def __str__(self) -> str: - return str(self.value) diff --git a/customgpt-client/customgpt_client/models/create_source_response_401.py b/customgpt-client/customgpt_client/models/create_source_response_401.py index f1ee93f..c85e247 100644 --- a/customgpt-client/customgpt_client/models/create_source_response_401.py +++ b/customgpt-client/customgpt_client/models/create_source_response_401.py @@ -20,7 +20,7 @@ class CreateSourceResponse401: data (Union[Unset, CreateSourceResponse401Data]): """ - status: Union[Unset, str] = "error" + status: Union[Unset, str] = UNSET url: Union[Unset, str] = UNSET data: Union[Unset, "CreateSourceResponse401Data"] = UNSET additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) diff --git a/customgpt-client/customgpt_client/models/create_source_response_401_data.py b/customgpt-client/customgpt_client/models/create_source_response_401_data.py index f0909fe..040258e 100644 --- a/customgpt-client/customgpt_client/models/create_source_response_401_data.py +++ b/customgpt-client/customgpt_client/models/create_source_response_401_data.py @@ -15,7 +15,7 @@ class CreateSourceResponse401Data: message (Union[Unset, str]): Example: API Token is either missing or invalid. """ - code: Union[Unset, str] = "401" + code: Union[Unset, str] = UNSET message: Union[Unset, str] = UNSET additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) diff --git a/customgpt-client/customgpt_client/models/create_source_response_404.py b/customgpt-client/customgpt_client/models/create_source_response_404.py index 6c1fdc4..cdce67c 100644 --- a/customgpt-client/customgpt_client/models/create_source_response_404.py +++ b/customgpt-client/customgpt_client/models/create_source_response_404.py @@ -20,7 +20,7 @@ class CreateSourceResponse404: data (Union[Unset, CreateSourceResponse404Data]): """ - status: Union[Unset, str] = "error" + status: Union[Unset, str] = UNSET url: Union[Unset, str] = UNSET data: Union[Unset, "CreateSourceResponse404Data"] = UNSET additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) diff --git a/customgpt-client/customgpt_client/models/create_source_response_404_data.py b/customgpt-client/customgpt_client/models/create_source_response_404_data.py index c52d4c5..ced539d 100644 --- a/customgpt-client/customgpt_client/models/create_source_response_404_data.py +++ b/customgpt-client/customgpt_client/models/create_source_response_404_data.py @@ -16,8 +16,8 @@ class CreateSourceResponse404Data: found. """ - code: Union[Unset, str] = "404" - message: Union[Unset, str] = "Project with id 1 not found" + code: Union[Unset, str] = UNSET + message: Union[Unset, str] = UNSET additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) def to_dict(self) -> Dict[str, Any]: diff --git a/customgpt-client/customgpt_client/models/create_source_response_500.py b/customgpt-client/customgpt_client/models/create_source_response_500.py index 2795c1b..4bd3ff6 100644 --- a/customgpt-client/customgpt_client/models/create_source_response_500.py +++ b/customgpt-client/customgpt_client/models/create_source_response_500.py @@ -20,7 +20,7 @@ class CreateSourceResponse500: data (Union[Unset, CreateSourceResponse500Data]): """ - status: Union[Unset, str] = "error" + status: Union[Unset, str] = UNSET url: Union[Unset, str] = UNSET data: Union[Unset, "CreateSourceResponse500Data"] = UNSET additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) diff --git a/customgpt-client/customgpt_client/models/create_source_response_500_data.py b/customgpt-client/customgpt_client/models/create_source_response_500_data.py index 2f25f50..79826f1 100644 --- a/customgpt-client/customgpt_client/models/create_source_response_500_data.py +++ b/customgpt-client/customgpt_client/models/create_source_response_500_data.py @@ -15,7 +15,7 @@ class CreateSourceResponse500Data: message (Union[Unset, str]): Example: Internal Server Error. """ - code: Union[Unset, str] = "500" + code: Union[Unset, str] = UNSET message: Union[Unset, str] = UNSET additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) diff --git a/customgpt-client/customgpt_client/models/delete_conversation_response_200.py b/customgpt-client/customgpt_client/models/delete_conversation_response_200.py index 104eeb2..7d63fe6 100644 --- a/customgpt-client/customgpt_client/models/delete_conversation_response_200.py +++ b/customgpt-client/customgpt_client/models/delete_conversation_response_200.py @@ -19,7 +19,7 @@ class DeleteConversationResponse200: data (Union[Unset, DeleteConversationResponse200Data]): """ - status: Union[Unset, str] = "success" + status: Union[Unset, str] = UNSET data: Union[Unset, "DeleteConversationResponse200Data"] = UNSET additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) diff --git a/customgpt-client/customgpt_client/models/delete_conversation_response_200_data.py b/customgpt-client/customgpt_client/models/delete_conversation_response_200_data.py index 0798a90..96d61ea 100644 --- a/customgpt-client/customgpt_client/models/delete_conversation_response_200_data.py +++ b/customgpt-client/customgpt_client/models/delete_conversation_response_200_data.py @@ -18,7 +18,7 @@ class DeleteConversationResponse200Data: additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) def to_dict(self) -> Dict[str, Any]: - deleted = self.deleted + deleted = True if self.deleted else False field_dict: Dict[str, Any] = {} field_dict.update(self.additional_properties) diff --git a/customgpt-client/customgpt_client/models/delete_conversation_response_400.py b/customgpt-client/customgpt_client/models/delete_conversation_response_400.py index 65c6fe0..c78a6b0 100644 --- a/customgpt-client/customgpt_client/models/delete_conversation_response_400.py +++ b/customgpt-client/customgpt_client/models/delete_conversation_response_400.py @@ -20,7 +20,7 @@ class DeleteConversationResponse400: data (Union[Unset, DeleteConversationResponse400Data]): """ - status: Union[Unset, str] = "error" + status: Union[Unset, str] = UNSET url: Union[Unset, str] = UNSET data: Union[Unset, "DeleteConversationResponse400Data"] = UNSET additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) diff --git a/customgpt-client/customgpt_client/models/delete_conversation_response_400_data.py b/customgpt-client/customgpt_client/models/delete_conversation_response_400_data.py index 46bda93..f0ec414 100644 --- a/customgpt-client/customgpt_client/models/delete_conversation_response_400_data.py +++ b/customgpt-client/customgpt_client/models/delete_conversation_response_400_data.py @@ -15,7 +15,7 @@ class DeleteConversationResponse400Data: message (Union[Unset, str]): The error message Example: Project id must be integer. """ - code: Union[Unset, str] = "400" + code: Union[Unset, str] = UNSET message: Union[Unset, str] = UNSET additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) diff --git a/customgpt-client/customgpt_client/models/delete_conversation_response_401.py b/customgpt-client/customgpt_client/models/delete_conversation_response_401.py index d4b7139..a535701 100644 --- a/customgpt-client/customgpt_client/models/delete_conversation_response_401.py +++ b/customgpt-client/customgpt_client/models/delete_conversation_response_401.py @@ -20,7 +20,7 @@ class DeleteConversationResponse401: data (Union[Unset, DeleteConversationResponse401Data]): """ - status: Union[Unset, str] = "error" + status: Union[Unset, str] = UNSET url: Union[Unset, str] = UNSET data: Union[Unset, "DeleteConversationResponse401Data"] = UNSET additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) diff --git a/customgpt-client/customgpt_client/models/delete_conversation_response_401_data.py b/customgpt-client/customgpt_client/models/delete_conversation_response_401_data.py index dba653c..7875153 100644 --- a/customgpt-client/customgpt_client/models/delete_conversation_response_401_data.py +++ b/customgpt-client/customgpt_client/models/delete_conversation_response_401_data.py @@ -15,7 +15,7 @@ class DeleteConversationResponse401Data: message (Union[Unset, str]): Example: API Token is either missing or invalid. """ - code: Union[Unset, str] = "401" + code: Union[Unset, str] = UNSET message: Union[Unset, str] = UNSET additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) diff --git a/customgpt-client/customgpt_client/models/delete_conversation_response_404.py b/customgpt-client/customgpt_client/models/delete_conversation_response_404.py index 43ff613..c03d4dc 100644 --- a/customgpt-client/customgpt_client/models/delete_conversation_response_404.py +++ b/customgpt-client/customgpt_client/models/delete_conversation_response_404.py @@ -20,7 +20,7 @@ class DeleteConversationResponse404: data (Union[Unset, DeleteConversationResponse404Data]): """ - status: Union[Unset, str] = "error" + status: Union[Unset, str] = UNSET url: Union[Unset, str] = UNSET data: Union[Unset, "DeleteConversationResponse404Data"] = UNSET additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) diff --git a/customgpt-client/customgpt_client/models/delete_conversation_response_404_data.py b/customgpt-client/customgpt_client/models/delete_conversation_response_404_data.py index 2826706..2ac3eda 100644 --- a/customgpt-client/customgpt_client/models/delete_conversation_response_404_data.py +++ b/customgpt-client/customgpt_client/models/delete_conversation_response_404_data.py @@ -16,8 +16,8 @@ class DeleteConversationResponse404Data: not found. """ - code: Union[Unset, str] = "404" - message: Union[Unset, str] = "Project with id 1 not found" + code: Union[Unset, str] = UNSET + message: Union[Unset, str] = UNSET additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) def to_dict(self) -> Dict[str, Any]: diff --git a/customgpt-client/customgpt_client/models/delete_conversation_response_500.py b/customgpt-client/customgpt_client/models/delete_conversation_response_500.py index 414773f..9481de9 100644 --- a/customgpt-client/customgpt_client/models/delete_conversation_response_500.py +++ b/customgpt-client/customgpt_client/models/delete_conversation_response_500.py @@ -20,7 +20,7 @@ class DeleteConversationResponse500: data (Union[Unset, DeleteConversationResponse500Data]): """ - status: Union[Unset, str] = "error" + status: Union[Unset, str] = UNSET url: Union[Unset, str] = UNSET data: Union[Unset, "DeleteConversationResponse500Data"] = UNSET additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) diff --git a/customgpt-client/customgpt_client/models/delete_conversation_response_500_data.py b/customgpt-client/customgpt_client/models/delete_conversation_response_500_data.py index 1914945..2607a23 100644 --- a/customgpt-client/customgpt_client/models/delete_conversation_response_500_data.py +++ b/customgpt-client/customgpt_client/models/delete_conversation_response_500_data.py @@ -15,7 +15,7 @@ class DeleteConversationResponse500Data: message (Union[Unset, str]): Example: Internal Server Error. """ - code: Union[Unset, str] = "500" + code: Union[Unset, str] = UNSET message: Union[Unset, str] = UNSET additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) diff --git a/customgpt-client/customgpt_client/models/delete_page_response_200.py b/customgpt-client/customgpt_client/models/delete_page_response_200.py index 22afcc5..2998551 100644 --- a/customgpt-client/customgpt_client/models/delete_page_response_200.py +++ b/customgpt-client/customgpt_client/models/delete_page_response_200.py @@ -19,7 +19,7 @@ class DeletePageResponse200: data (Union[Unset, DeletePageResponse200Data]): """ - status: Union[Unset, str] = "success" + status: Union[Unset, str] = UNSET data: Union[Unset, "DeletePageResponse200Data"] = UNSET additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) diff --git a/customgpt-client/customgpt_client/models/delete_page_response_200_data.py b/customgpt-client/customgpt_client/models/delete_page_response_200_data.py index fb27768..645f843 100644 --- a/customgpt-client/customgpt_client/models/delete_page_response_200_data.py +++ b/customgpt-client/customgpt_client/models/delete_page_response_200_data.py @@ -18,7 +18,7 @@ class DeletePageResponse200Data: additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) def to_dict(self) -> Dict[str, Any]: - deleted = self.deleted + deleted = True if self.deleted else False field_dict: Dict[str, Any] = {} field_dict.update(self.additional_properties) diff --git a/customgpt-client/customgpt_client/models/delete_page_response_400.py b/customgpt-client/customgpt_client/models/delete_page_response_400.py index 51b1d7b..5fcdea4 100644 --- a/customgpt-client/customgpt_client/models/delete_page_response_400.py +++ b/customgpt-client/customgpt_client/models/delete_page_response_400.py @@ -20,7 +20,7 @@ class DeletePageResponse400: data (Union[Unset, DeletePageResponse400Data]): """ - status: Union[Unset, str] = "error" + status: Union[Unset, str] = UNSET url: Union[Unset, str] = UNSET data: Union[Unset, "DeletePageResponse400Data"] = UNSET additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) diff --git a/customgpt-client/customgpt_client/models/delete_page_response_400_data.py b/customgpt-client/customgpt_client/models/delete_page_response_400_data.py index e28ee26..c8e5752 100644 --- a/customgpt-client/customgpt_client/models/delete_page_response_400_data.py +++ b/customgpt-client/customgpt_client/models/delete_page_response_400_data.py @@ -15,7 +15,7 @@ class DeletePageResponse400Data: message (Union[Unset, str]): The error message Example: Project id must be integer. """ - code: Union[Unset, str] = "400" + code: Union[Unset, str] = UNSET message: Union[Unset, str] = UNSET additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) diff --git a/customgpt-client/customgpt_client/models/delete_page_response_401.py b/customgpt-client/customgpt_client/models/delete_page_response_401.py index 45c2e6f..03dd622 100644 --- a/customgpt-client/customgpt_client/models/delete_page_response_401.py +++ b/customgpt-client/customgpt_client/models/delete_page_response_401.py @@ -20,7 +20,7 @@ class DeletePageResponse401: data (Union[Unset, DeletePageResponse401Data]): """ - status: Union[Unset, str] = "error" + status: Union[Unset, str] = UNSET url: Union[Unset, str] = UNSET data: Union[Unset, "DeletePageResponse401Data"] = UNSET additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) diff --git a/customgpt-client/customgpt_client/models/delete_page_response_401_data.py b/customgpt-client/customgpt_client/models/delete_page_response_401_data.py index db63a67..8ae4f11 100644 --- a/customgpt-client/customgpt_client/models/delete_page_response_401_data.py +++ b/customgpt-client/customgpt_client/models/delete_page_response_401_data.py @@ -15,7 +15,7 @@ class DeletePageResponse401Data: message (Union[Unset, str]): Example: API Token is either missing or invalid. """ - code: Union[Unset, str] = "401" + code: Union[Unset, str] = UNSET message: Union[Unset, str] = UNSET additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) diff --git a/customgpt-client/customgpt_client/models/delete_page_response_404.py b/customgpt-client/customgpt_client/models/delete_page_response_404.py index 79c59af..893f418 100644 --- a/customgpt-client/customgpt_client/models/delete_page_response_404.py +++ b/customgpt-client/customgpt_client/models/delete_page_response_404.py @@ -20,7 +20,7 @@ class DeletePageResponse404: data (Union[Unset, DeletePageResponse404Data]): """ - status: Union[Unset, str] = "error" + status: Union[Unset, str] = UNSET url: Union[Unset, str] = UNSET data: Union[Unset, "DeletePageResponse404Data"] = UNSET additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) diff --git a/customgpt-client/customgpt_client/models/delete_page_response_404_data.py b/customgpt-client/customgpt_client/models/delete_page_response_404_data.py index 6351228..63cd3dd 100644 --- a/customgpt-client/customgpt_client/models/delete_page_response_404_data.py +++ b/customgpt-client/customgpt_client/models/delete_page_response_404_data.py @@ -16,8 +16,8 @@ class DeletePageResponse404Data: found. """ - code: Union[Unset, str] = "404" - message: Union[Unset, str] = "Project with id 1 not found" + code: Union[Unset, str] = UNSET + message: Union[Unset, str] = UNSET additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) def to_dict(self) -> Dict[str, Any]: diff --git a/customgpt-client/customgpt_client/models/delete_page_response_500.py b/customgpt-client/customgpt_client/models/delete_page_response_500.py index 279b964..afad1b8 100644 --- a/customgpt-client/customgpt_client/models/delete_page_response_500.py +++ b/customgpt-client/customgpt_client/models/delete_page_response_500.py @@ -20,7 +20,7 @@ class DeletePageResponse500: data (Union[Unset, DeletePageResponse500Data]): """ - status: Union[Unset, str] = "error" + status: Union[Unset, str] = UNSET url: Union[Unset, str] = UNSET data: Union[Unset, "DeletePageResponse500Data"] = UNSET additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) diff --git a/customgpt-client/customgpt_client/models/delete_page_response_500_data.py b/customgpt-client/customgpt_client/models/delete_page_response_500_data.py index dc8f148..177c75f 100644 --- a/customgpt-client/customgpt_client/models/delete_page_response_500_data.py +++ b/customgpt-client/customgpt_client/models/delete_page_response_500_data.py @@ -15,7 +15,7 @@ class DeletePageResponse500Data: message (Union[Unset, str]): Example: Internal Server Error. """ - code: Union[Unset, str] = "500" + code: Union[Unset, str] = UNSET message: Union[Unset, str] = UNSET additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) diff --git a/customgpt-client/customgpt_client/models/delete_project_response_200.py b/customgpt-client/customgpt_client/models/delete_project_response_200.py index dc704df..ef81a45 100644 --- a/customgpt-client/customgpt_client/models/delete_project_response_200.py +++ b/customgpt-client/customgpt_client/models/delete_project_response_200.py @@ -19,7 +19,7 @@ class DeleteProjectResponse200: data (Union[Unset, DeleteProjectResponse200Data]): """ - status: Union[Unset, str] = "success" + status: Union[Unset, str] = UNSET data: Union[Unset, "DeleteProjectResponse200Data"] = UNSET additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) diff --git a/customgpt-client/customgpt_client/models/delete_project_response_200_data.py b/customgpt-client/customgpt_client/models/delete_project_response_200_data.py index 1de20e4..5937b28 100644 --- a/customgpt-client/customgpt_client/models/delete_project_response_200_data.py +++ b/customgpt-client/customgpt_client/models/delete_project_response_200_data.py @@ -18,7 +18,7 @@ class DeleteProjectResponse200Data: additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) def to_dict(self) -> Dict[str, Any]: - deleted = self.deleted + deleted = True if self.deleted else False field_dict: Dict[str, Any] = {} field_dict.update(self.additional_properties) diff --git a/customgpt-client/customgpt_client/models/delete_project_response_400.py b/customgpt-client/customgpt_client/models/delete_project_response_400.py index 928d3f2..88d1809 100644 --- a/customgpt-client/customgpt_client/models/delete_project_response_400.py +++ b/customgpt-client/customgpt_client/models/delete_project_response_400.py @@ -20,7 +20,7 @@ class DeleteProjectResponse400: data (Union[Unset, DeleteProjectResponse400Data]): """ - status: Union[Unset, str] = "error" + status: Union[Unset, str] = UNSET url: Union[Unset, str] = UNSET data: Union[Unset, "DeleteProjectResponse400Data"] = UNSET additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) diff --git a/customgpt-client/customgpt_client/models/delete_project_response_400_data.py b/customgpt-client/customgpt_client/models/delete_project_response_400_data.py index b8dee17..34ddbe2 100644 --- a/customgpt-client/customgpt_client/models/delete_project_response_400_data.py +++ b/customgpt-client/customgpt_client/models/delete_project_response_400_data.py @@ -15,7 +15,7 @@ class DeleteProjectResponse400Data: message (Union[Unset, str]): The error message Example: Project id must be integer. """ - code: Union[Unset, str] = "400" + code: Union[Unset, str] = UNSET message: Union[Unset, str] = UNSET additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) diff --git a/customgpt-client/customgpt_client/models/delete_project_response_401.py b/customgpt-client/customgpt_client/models/delete_project_response_401.py index b3d3d51..fb4fe39 100644 --- a/customgpt-client/customgpt_client/models/delete_project_response_401.py +++ b/customgpt-client/customgpt_client/models/delete_project_response_401.py @@ -20,7 +20,7 @@ class DeleteProjectResponse401: data (Union[Unset, DeleteProjectResponse401Data]): """ - status: Union[Unset, str] = "error" + status: Union[Unset, str] = UNSET url: Union[Unset, str] = UNSET data: Union[Unset, "DeleteProjectResponse401Data"] = UNSET additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) diff --git a/customgpt-client/customgpt_client/models/delete_project_response_401_data.py b/customgpt-client/customgpt_client/models/delete_project_response_401_data.py index e5da48a..3602855 100644 --- a/customgpt-client/customgpt_client/models/delete_project_response_401_data.py +++ b/customgpt-client/customgpt_client/models/delete_project_response_401_data.py @@ -15,7 +15,7 @@ class DeleteProjectResponse401Data: message (Union[Unset, str]): Example: API Token is either missing or invalid. """ - code: Union[Unset, str] = "401" + code: Union[Unset, str] = UNSET message: Union[Unset, str] = UNSET additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) diff --git a/customgpt-client/customgpt_client/models/delete_project_response_404.py b/customgpt-client/customgpt_client/models/delete_project_response_404.py index 055d1e9..bdd23fd 100644 --- a/customgpt-client/customgpt_client/models/delete_project_response_404.py +++ b/customgpt-client/customgpt_client/models/delete_project_response_404.py @@ -20,7 +20,7 @@ class DeleteProjectResponse404: data (Union[Unset, DeleteProjectResponse404Data]): """ - status: Union[Unset, str] = "error" + status: Union[Unset, str] = UNSET url: Union[Unset, str] = UNSET data: Union[Unset, "DeleteProjectResponse404Data"] = UNSET additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) diff --git a/customgpt-client/customgpt_client/models/delete_project_response_404_data.py b/customgpt-client/customgpt_client/models/delete_project_response_404_data.py index c9029f0..eb51f88 100644 --- a/customgpt-client/customgpt_client/models/delete_project_response_404_data.py +++ b/customgpt-client/customgpt_client/models/delete_project_response_404_data.py @@ -16,8 +16,8 @@ class DeleteProjectResponse404Data: found. """ - code: Union[Unset, str] = "404" - message: Union[Unset, str] = "Project with id 1 not found" + code: Union[Unset, str] = UNSET + message: Union[Unset, str] = UNSET additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) def to_dict(self) -> Dict[str, Any]: diff --git a/customgpt-client/customgpt_client/models/delete_project_response_500.py b/customgpt-client/customgpt_client/models/delete_project_response_500.py index 11c71f8..99711bd 100644 --- a/customgpt-client/customgpt_client/models/delete_project_response_500.py +++ b/customgpt-client/customgpt_client/models/delete_project_response_500.py @@ -20,7 +20,7 @@ class DeleteProjectResponse500: data (Union[Unset, DeleteProjectResponse500Data]): """ - status: Union[Unset, str] = "error" + status: Union[Unset, str] = UNSET url: Union[Unset, str] = UNSET data: Union[Unset, "DeleteProjectResponse500Data"] = UNSET additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) diff --git a/customgpt-client/customgpt_client/models/delete_project_response_500_data.py b/customgpt-client/customgpt_client/models/delete_project_response_500_data.py index a79a442..b724b6f 100644 --- a/customgpt-client/customgpt_client/models/delete_project_response_500_data.py +++ b/customgpt-client/customgpt_client/models/delete_project_response_500_data.py @@ -15,7 +15,7 @@ class DeleteProjectResponse500Data: message (Union[Unset, str]): Example: Internal Server Error. """ - code: Union[Unset, str] = "500" + code: Union[Unset, str] = UNSET message: Union[Unset, str] = UNSET additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) diff --git a/customgpt-client/customgpt_client/models/delete_source_response_200.py b/customgpt-client/customgpt_client/models/delete_source_response_200.py index b05394d..b30c854 100644 --- a/customgpt-client/customgpt_client/models/delete_source_response_200.py +++ b/customgpt-client/customgpt_client/models/delete_source_response_200.py @@ -19,7 +19,7 @@ class DeleteSourceResponse200: data (Union[Unset, DeleteSourceResponse200Data]): """ - status: Union[Unset, str] = "success" + status: Union[Unset, str] = UNSET data: Union[Unset, "DeleteSourceResponse200Data"] = UNSET additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) diff --git a/customgpt-client/customgpt_client/models/delete_source_response_200_data.py b/customgpt-client/customgpt_client/models/delete_source_response_200_data.py index 2c28a51..4b318d4 100644 --- a/customgpt-client/customgpt_client/models/delete_source_response_200_data.py +++ b/customgpt-client/customgpt_client/models/delete_source_response_200_data.py @@ -18,7 +18,7 @@ class DeleteSourceResponse200Data: additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) def to_dict(self) -> Dict[str, Any]: - deleted = self.deleted + deleted = True if self.deleted else False field_dict: Dict[str, Any] = {} field_dict.update(self.additional_properties) diff --git a/customgpt-client/customgpt_client/models/delete_source_response_400.py b/customgpt-client/customgpt_client/models/delete_source_response_400.py index eb56105..a6f1b14 100644 --- a/customgpt-client/customgpt_client/models/delete_source_response_400.py +++ b/customgpt-client/customgpt_client/models/delete_source_response_400.py @@ -20,7 +20,7 @@ class DeleteSourceResponse400: data (Union[Unset, DeleteSourceResponse400Data]): """ - status: Union[Unset, str] = "error" + status: Union[Unset, str] = UNSET url: Union[Unset, str] = UNSET data: Union[Unset, "DeleteSourceResponse400Data"] = UNSET additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) diff --git a/customgpt-client/customgpt_client/models/delete_source_response_400_data.py b/customgpt-client/customgpt_client/models/delete_source_response_400_data.py index 8f8aaf4..0024403 100644 --- a/customgpt-client/customgpt_client/models/delete_source_response_400_data.py +++ b/customgpt-client/customgpt_client/models/delete_source_response_400_data.py @@ -15,7 +15,7 @@ class DeleteSourceResponse400Data: message (Union[Unset, str]): The error message Example: Project id must be integer. """ - code: Union[Unset, str] = "400" + code: Union[Unset, str] = UNSET message: Union[Unset, str] = UNSET additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) diff --git a/customgpt-client/customgpt_client/models/delete_source_response_401.py b/customgpt-client/customgpt_client/models/delete_source_response_401.py index fdd9025..95982f0 100644 --- a/customgpt-client/customgpt_client/models/delete_source_response_401.py +++ b/customgpt-client/customgpt_client/models/delete_source_response_401.py @@ -20,7 +20,7 @@ class DeleteSourceResponse401: data (Union[Unset, DeleteSourceResponse401Data]): """ - status: Union[Unset, str] = "error" + status: Union[Unset, str] = UNSET url: Union[Unset, str] = UNSET data: Union[Unset, "DeleteSourceResponse401Data"] = UNSET additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) diff --git a/customgpt-client/customgpt_client/models/delete_source_response_401_data.py b/customgpt-client/customgpt_client/models/delete_source_response_401_data.py index 9033756..e122dbd 100644 --- a/customgpt-client/customgpt_client/models/delete_source_response_401_data.py +++ b/customgpt-client/customgpt_client/models/delete_source_response_401_data.py @@ -15,7 +15,7 @@ class DeleteSourceResponse401Data: message (Union[Unset, str]): Example: API Token is either missing or invalid. """ - code: Union[Unset, str] = "401" + code: Union[Unset, str] = UNSET message: Union[Unset, str] = UNSET additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) diff --git a/customgpt-client/customgpt_client/models/delete_source_response_404.py b/customgpt-client/customgpt_client/models/delete_source_response_404.py index 5c5903e..4e8f2fa 100644 --- a/customgpt-client/customgpt_client/models/delete_source_response_404.py +++ b/customgpt-client/customgpt_client/models/delete_source_response_404.py @@ -20,7 +20,7 @@ class DeleteSourceResponse404: data (Union[Unset, DeleteSourceResponse404Data]): """ - status: Union[Unset, str] = "error" + status: Union[Unset, str] = UNSET url: Union[Unset, str] = UNSET data: Union[Unset, "DeleteSourceResponse404Data"] = UNSET additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) diff --git a/customgpt-client/customgpt_client/models/delete_source_response_404_data.py b/customgpt-client/customgpt_client/models/delete_source_response_404_data.py index aec2a28..29c9c73 100644 --- a/customgpt-client/customgpt_client/models/delete_source_response_404_data.py +++ b/customgpt-client/customgpt_client/models/delete_source_response_404_data.py @@ -16,8 +16,8 @@ class DeleteSourceResponse404Data: found. """ - code: Union[Unset, str] = "404" - message: Union[Unset, str] = "Project with id 1 not found" + code: Union[Unset, str] = UNSET + message: Union[Unset, str] = UNSET additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) def to_dict(self) -> Dict[str, Any]: diff --git a/customgpt-client/customgpt_client/models/delete_source_response_500.py b/customgpt-client/customgpt_client/models/delete_source_response_500.py index 01ecffa..21b6491 100644 --- a/customgpt-client/customgpt_client/models/delete_source_response_500.py +++ b/customgpt-client/customgpt_client/models/delete_source_response_500.py @@ -20,7 +20,7 @@ class DeleteSourceResponse500: data (Union[Unset, DeleteSourceResponse500Data]): """ - status: Union[Unset, str] = "error" + status: Union[Unset, str] = UNSET url: Union[Unset, str] = UNSET data: Union[Unset, "DeleteSourceResponse500Data"] = UNSET additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) diff --git a/customgpt-client/customgpt_client/models/delete_source_response_500_data.py b/customgpt-client/customgpt_client/models/delete_source_response_500_data.py index e063319..e5aeaec 100644 --- a/customgpt-client/customgpt_client/models/delete_source_response_500_data.py +++ b/customgpt-client/customgpt_client/models/delete_source_response_500_data.py @@ -15,7 +15,7 @@ class DeleteSourceResponse500Data: message (Union[Unset, str]): Example: Internal Server Error. """ - code: Union[Unset, str] = "500" + code: Union[Unset, str] = UNSET message: Union[Unset, str] = UNSET additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) diff --git a/customgpt-client/customgpt_client/models/get_api_v1_limits_usage_response_200.py b/customgpt-client/customgpt_client/models/get_api_v1_limits_usage_response_200.py new file mode 100644 index 0000000..faf81e7 --- /dev/null +++ b/customgpt-client/customgpt_client/models/get_api_v1_limits_usage_response_200.py @@ -0,0 +1,80 @@ +from typing import TYPE_CHECKING, Any, Dict, List, Type, TypeVar, Union + +import attr + +from ..types import UNSET, Unset + +if TYPE_CHECKING: + from ..models.get_api_v1_limits_usage_response_200_data import GetApiV1LimitsUsageResponse200Data + + +T = TypeVar("T", bound="GetApiV1LimitsUsageResponse200") + + +@attr.s(auto_attribs=True) +class GetApiV1LimitsUsageResponse200: + """ + Attributes: + status (Union[Unset, GetApiV1LimitsUsageResponse200Status]): The status of the response Example: success. + data (Union[Unset, GetApiV1LimitsUsageResponse200Data]): + """ + + status: Union[Unset, str] = UNSET + data: Union[Unset, "GetApiV1LimitsUsageResponse200Data"] = UNSET + additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + status: Union[Unset, str] = UNSET + if not isinstance(self.status, Unset): + status = self.status + + data: Union[Unset, Dict[str, Any]] = UNSET + if not isinstance(self.data, Unset): + data = self.data.to_dict() + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if status is not UNSET: + field_dict["status"] = status + if data is not UNSET: + field_dict["data"] = data + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + from ..models.get_api_v1_limits_usage_response_200_data import GetApiV1LimitsUsageResponse200Data + + status = src_dict.get("status") + + _data = src_dict.get("data") + data: Union[Unset, GetApiV1LimitsUsageResponse200Data] + if isinstance(_data, Unset): + data = UNSET + else: + data = GetApiV1LimitsUsageResponse200Data.from_dict(_data) + + get_api_v1_limits_usage_response_200 = cls( + status=status, + data=data, + ) + + get_api_v1_limits_usage_response_200.additional_properties = src_dict + return get_api_v1_limits_usage_response_200 + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/customgpt-client/customgpt_client/models/get_api_v1_limits_usage_response_200_data.py b/customgpt-client/customgpt_client/models/get_api_v1_limits_usage_response_200_data.py new file mode 100644 index 0000000..513e0d7 --- /dev/null +++ b/customgpt-client/customgpt_client/models/get_api_v1_limits_usage_response_200_data.py @@ -0,0 +1,99 @@ +from typing import Any, Dict, List, Type, TypeVar, Union + +import attr + +from ..types import UNSET, Unset + +T = TypeVar("T", bound="GetApiV1LimitsUsageResponse200Data") + + +@attr.s(auto_attribs=True) +class GetApiV1LimitsUsageResponse200Data: + """ + Attributes: + max_projects_num (Union[Unset, int]): The maximum number of projects allowed for this team. Example: 10. + current_projects_num (Union[Unset, int]): The total number of projects currently belonging to this team. + Example: 10. + max_total_storage_credits (Union[Unset, int]): The maximum number of storage credits allowed for this team. + Example: 10. + current_total_storage_credits (Union[Unset, int]): The amount of storage credits currently in use. Example: 10. + max_queries (Union[Unset, int]): The maximum number of queries allowed per billing cycle for this team. Example: + 10. + current_queries (Union[Unset, int]): The number of queries used in the current billing cycle. Example: 10. + """ + + max_projects_num: Union[Unset, int] = UNSET + current_projects_num: Union[Unset, int] = UNSET + max_total_storage_credits: Union[Unset, int] = UNSET + current_total_storage_credits: Union[Unset, int] = UNSET + max_queries: Union[Unset, int] = UNSET + current_queries: Union[Unset, int] = UNSET + additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + max_projects_num = self.max_projects_num + current_projects_num = self.current_projects_num + max_total_storage_credits = self.max_total_storage_credits + current_total_storage_credits = self.current_total_storage_credits + max_queries = self.max_queries + current_queries = self.current_queries + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if max_projects_num is not UNSET: + field_dict["max_projects_num"] = max_projects_num + if current_projects_num is not UNSET: + field_dict["current_projects_num"] = current_projects_num + if max_total_storage_credits is not UNSET: + field_dict["max_total_storage_credits"] = max_total_storage_credits + if current_total_storage_credits is not UNSET: + field_dict["current_total_storage_credits"] = current_total_storage_credits + if max_queries is not UNSET: + field_dict["max_queries"] = max_queries + if current_queries is not UNSET: + field_dict["current_queries"] = current_queries + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + max_projects_num = src_dict.get("max_projects_num") + + current_projects_num = src_dict.get("current_projects_num") + + max_total_storage_credits = src_dict.get("max_total_storage_credits") + + current_total_storage_credits = src_dict.get("current_total_storage_credits") + + max_queries = src_dict.get("max_queries") + + current_queries = src_dict.get("current_queries") + + get_api_v1_limits_usage_response_200_data = cls( + max_projects_num=max_projects_num, + current_projects_num=current_projects_num, + max_total_storage_credits=max_total_storage_credits, + current_total_storage_credits=current_total_storage_credits, + max_queries=max_queries, + current_queries=current_queries, + ) + + get_api_v1_limits_usage_response_200_data.additional_properties = src_dict + return get_api_v1_limits_usage_response_200_data + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/customgpt-client/customgpt_client/models/get_api_v1_limits_usage_response_200_status.py b/customgpt-client/customgpt_client/models/get_api_v1_limits_usage_response_200_status.py new file mode 100644 index 0000000..ef069dd --- /dev/null +++ b/customgpt-client/customgpt_client/models/get_api_v1_limits_usage_response_200_status.py @@ -0,0 +1,9 @@ +from enum import Enum + + +class GetApiV1LimitsUsageResponse200Status(str, Enum): + ERROR = "error" + SUCCESS = "success" + + def __str__(self) -> str: + return str(self.value) diff --git a/customgpt-client/customgpt_client/models/get_api_v1_limits_usage_response_401.py b/customgpt-client/customgpt_client/models/get_api_v1_limits_usage_response_401.py new file mode 100644 index 0000000..2044745 --- /dev/null +++ b/customgpt-client/customgpt_client/models/get_api_v1_limits_usage_response_401.py @@ -0,0 +1,88 @@ +from typing import TYPE_CHECKING, Any, Dict, List, Type, TypeVar, Union + +import attr + +from ..types import UNSET, Unset + +if TYPE_CHECKING: + from ..models.get_api_v1_limits_usage_response_401_data import GetApiV1LimitsUsageResponse401Data + + +T = TypeVar("T", bound="GetApiV1LimitsUsageResponse401") + + +@attr.s(auto_attribs=True) +class GetApiV1LimitsUsageResponse401: + """ + Attributes: + status (Union[Unset, GetApiV1LimitsUsageResponse401Status]): The status of the response Example: error. + url (Union[Unset, str]): The URL of the request Example: https://app.customgpt.ai/api/v1/projects/1. + data (Union[Unset, GetApiV1LimitsUsageResponse401Data]): + """ + + status: Union[Unset, str] = UNSET + url: Union[Unset, str] = UNSET + data: Union[Unset, "GetApiV1LimitsUsageResponse401Data"] = UNSET + additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + status: Union[Unset, str] = UNSET + if not isinstance(self.status, Unset): + status = self.status + + url = self.url + data: Union[Unset, Dict[str, Any]] = UNSET + if not isinstance(self.data, Unset): + data = self.data.to_dict() + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if status is not UNSET: + field_dict["status"] = status + if url is not UNSET: + field_dict["url"] = url + if data is not UNSET: + field_dict["data"] = data + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + from ..models.get_api_v1_limits_usage_response_401_data import GetApiV1LimitsUsageResponse401Data + + status = src_dict.get("status") + + url = src_dict.get("url") + + _data = src_dict.get("data") + data: Union[Unset, GetApiV1LimitsUsageResponse401Data] + if isinstance(_data, Unset): + data = UNSET + else: + data = GetApiV1LimitsUsageResponse401Data.from_dict(_data) + + get_api_v1_limits_usage_response_401 = cls( + status=status, + url=url, + data=data, + ) + + get_api_v1_limits_usage_response_401.additional_properties = src_dict + return get_api_v1_limits_usage_response_401 + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/customgpt-client/customgpt_client/models/get_api_v1_limits_usage_response_401_data.py b/customgpt-client/customgpt_client/models/get_api_v1_limits_usage_response_401_data.py new file mode 100644 index 0000000..8500fb5 --- /dev/null +++ b/customgpt-client/customgpt_client/models/get_api_v1_limits_usage_response_401_data.py @@ -0,0 +1,67 @@ +from typing import Any, Dict, List, Type, TypeVar, Union + +import attr + +from ..types import UNSET, Unset + +T = TypeVar("T", bound="GetApiV1LimitsUsageResponse401Data") + + +@attr.s(auto_attribs=True) +class GetApiV1LimitsUsageResponse401Data: + """ + Attributes: + code (Union[Unset, GetApiV1LimitsUsageResponse401DataCode]): The error status code Example: 401. + message (Union[Unset, str]): Example: API Token is either missing or invalid. + """ + + code: Union[Unset, str] = UNSET + message: Union[Unset, str] = UNSET + additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + code: Union[Unset, int] = UNSET + if not isinstance(self.code, Unset): + code = self.code + + message = self.message + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if code is not UNSET: + field_dict["code"] = code + if message is not UNSET: + field_dict["message"] = message + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + code = src_dict.get("code") + + message = src_dict.get("message") + + get_api_v1_limits_usage_response_401_data = cls( + code=code, + message=message, + ) + + get_api_v1_limits_usage_response_401_data.additional_properties = src_dict + return get_api_v1_limits_usage_response_401_data + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/customgpt-client/customgpt_client/models/get_api_v1_limits_usage_response_401_data_code.py b/customgpt-client/customgpt_client/models/get_api_v1_limits_usage_response_401_data_code.py new file mode 100644 index 0000000..0834510 --- /dev/null +++ b/customgpt-client/customgpt_client/models/get_api_v1_limits_usage_response_401_data_code.py @@ -0,0 +1,13 @@ +from enum import IntEnum + + +class GetApiV1LimitsUsageResponse401DataCode(IntEnum): + VALUE_400 = 400 + VALUE_401 = 401 + VALUE_403 = 403 + VALUE_404 = 404 + VALUE_500 = 500 + VALUE_503 = 503 + + def __str__(self) -> str: + return str(self.value) diff --git a/customgpt-client/customgpt_client/models/get_api_v1_limits_usage_response_401_status.py b/customgpt-client/customgpt_client/models/get_api_v1_limits_usage_response_401_status.py new file mode 100644 index 0000000..a35e93b --- /dev/null +++ b/customgpt-client/customgpt_client/models/get_api_v1_limits_usage_response_401_status.py @@ -0,0 +1,9 @@ +from enum import Enum + + +class GetApiV1LimitsUsageResponse401Status(str, Enum): + ERROR = "error" + SUCCESS = "success" + + def __str__(self) -> str: + return str(self.value) diff --git a/customgpt-client/customgpt_client/models/get_api_v1_limits_usage_response_500.py b/customgpt-client/customgpt_client/models/get_api_v1_limits_usage_response_500.py new file mode 100644 index 0000000..51dd5f9 --- /dev/null +++ b/customgpt-client/customgpt_client/models/get_api_v1_limits_usage_response_500.py @@ -0,0 +1,88 @@ +from typing import TYPE_CHECKING, Any, Dict, List, Type, TypeVar, Union + +import attr + +from ..types import UNSET, Unset + +if TYPE_CHECKING: + from ..models.get_api_v1_limits_usage_response_500_data import GetApiV1LimitsUsageResponse500Data + + +T = TypeVar("T", bound="GetApiV1LimitsUsageResponse500") + + +@attr.s(auto_attribs=True) +class GetApiV1LimitsUsageResponse500: + """ + Attributes: + status (Union[Unset, GetApiV1LimitsUsageResponse500Status]): The status of the response Example: error. + url (Union[Unset, str]): The URL of the request Example: https://app.customgpt.ai/api/v1/projects/1. + data (Union[Unset, GetApiV1LimitsUsageResponse500Data]): + """ + + status: Union[Unset, str] = UNSET + url: Union[Unset, str] = UNSET + data: Union[Unset, "GetApiV1LimitsUsageResponse500Data"] = UNSET + additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + status: Union[Unset, str] = UNSET + if not isinstance(self.status, Unset): + status = self.status + + url = self.url + data: Union[Unset, Dict[str, Any]] = UNSET + if not isinstance(self.data, Unset): + data = self.data.to_dict() + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if status is not UNSET: + field_dict["status"] = status + if url is not UNSET: + field_dict["url"] = url + if data is not UNSET: + field_dict["data"] = data + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + from ..models.get_api_v1_limits_usage_response_500_data import GetApiV1LimitsUsageResponse500Data + + status = src_dict.get("status") + + url = src_dict.get("url") + + _data = src_dict.get("data") + data: Union[Unset, GetApiV1LimitsUsageResponse500Data] + if isinstance(_data, Unset): + data = UNSET + else: + data = GetApiV1LimitsUsageResponse500Data.from_dict(_data) + + get_api_v1_limits_usage_response_500 = cls( + status=status, + url=url, + data=data, + ) + + get_api_v1_limits_usage_response_500.additional_properties = src_dict + return get_api_v1_limits_usage_response_500 + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/customgpt-client/customgpt_client/models/get_api_v1_limits_usage_response_500_data.py b/customgpt-client/customgpt_client/models/get_api_v1_limits_usage_response_500_data.py new file mode 100644 index 0000000..9cdfd1f --- /dev/null +++ b/customgpt-client/customgpt_client/models/get_api_v1_limits_usage_response_500_data.py @@ -0,0 +1,67 @@ +from typing import Any, Dict, List, Type, TypeVar, Union + +import attr + +from ..types import UNSET, Unset + +T = TypeVar("T", bound="GetApiV1LimitsUsageResponse500Data") + + +@attr.s(auto_attribs=True) +class GetApiV1LimitsUsageResponse500Data: + """ + Attributes: + code (Union[Unset, GetApiV1LimitsUsageResponse500DataCode]): The error status code Example: 500. + message (Union[Unset, str]): Example: Internal Server Error. + """ + + code: Union[Unset, str] = UNSET + message: Union[Unset, str] = UNSET + additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + code: Union[Unset, int] = UNSET + if not isinstance(self.code, Unset): + code = self.code + + message = self.message + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if code is not UNSET: + field_dict["code"] = code + if message is not UNSET: + field_dict["message"] = message + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + code = src_dict.get("code") + + message = src_dict.get("message") + + get_api_v1_limits_usage_response_500_data = cls( + code=code, + message=message, + ) + + get_api_v1_limits_usage_response_500_data.additional_properties = src_dict + return get_api_v1_limits_usage_response_500_data + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/customgpt-client/customgpt_client/models/get_api_v1_limits_usage_response_500_data_code.py b/customgpt-client/customgpt_client/models/get_api_v1_limits_usage_response_500_data_code.py new file mode 100644 index 0000000..8c6d971 --- /dev/null +++ b/customgpt-client/customgpt_client/models/get_api_v1_limits_usage_response_500_data_code.py @@ -0,0 +1,13 @@ +from enum import IntEnum + + +class GetApiV1LimitsUsageResponse500DataCode(IntEnum): + VALUE_400 = 400 + VALUE_401 = 401 + VALUE_403 = 403 + VALUE_404 = 404 + VALUE_500 = 500 + VALUE_503 = 503 + + def __str__(self) -> str: + return str(self.value) diff --git a/customgpt-client/customgpt_client/models/get_api_v1_limits_usage_response_500_status.py b/customgpt-client/customgpt_client/models/get_api_v1_limits_usage_response_500_status.py new file mode 100644 index 0000000..98a05eb --- /dev/null +++ b/customgpt-client/customgpt_client/models/get_api_v1_limits_usage_response_500_status.py @@ -0,0 +1,9 @@ +from enum import Enum + + +class GetApiV1LimitsUsageResponse500Status(str, Enum): + ERROR = "error" + SUCCESS = "success" + + def __str__(self) -> str: + return str(self.value) diff --git a/customgpt-client/customgpt_client/models/get_citation_response_200.py b/customgpt-client/customgpt_client/models/get_citation_response_200.py index bf09709..e9d0690 100644 --- a/customgpt-client/customgpt_client/models/get_citation_response_200.py +++ b/customgpt-client/customgpt_client/models/get_citation_response_200.py @@ -19,7 +19,7 @@ class GetCitationResponse200: data (Union[Unset, GetCitationResponse200Data]): """ - status: Union[Unset, str] = "success" + status: Union[Unset, str] = UNSET data: Union[Unset, "GetCitationResponse200Data"] = UNSET additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) diff --git a/customgpt-client/customgpt_client/models/get_citation_response_200_data.py b/customgpt-client/customgpt_client/models/get_citation_response_200_data.py index 1f8e46f..5f95416 100644 --- a/customgpt-client/customgpt_client/models/get_citation_response_200_data.py +++ b/customgpt-client/customgpt_client/models/get_citation_response_200_data.py @@ -11,68 +11,50 @@ class GetCitationResponse200Data: """ Attributes: - page_url (Union[Unset, str]): The URL of the page Example: https://www.example.com. - title (Union[Unset, str]): The title of the page Example: Example Domain. - description (Union[Unset, str]): The description of the page Example: This domain is for use in illustrative - examples in documents. You may use this domain in literature without prior coordination or asking for - permission.. - image (Union[Unset, str]): The image of the page Example: https://www.example.com/image.png. - image_width (Union[Unset, int]): The width of the image of the page Example: 1200. - image_height (Union[Unset, int]): The height of the image of the page Example: 630. - url (Union[Unset, str]): The URL of the page Example: https://www.example.com. - favicon (Union[Unset, str]): The favicon of the page Example: https://www.example.com/favicon.ico. - site_name (Union[Unset, str]): The site name of the page Example: Example Domain. + id (Union[Unset, int]): The unique identifier of the page Example: 1. + url (Union[Unset, None, str]): The URL of the page Example: https://www.example.com. + title (Union[Unset, None, str]): The title of the page Example: Example Domain. + description (Union[Unset, None, str]): The description of the page Example: This domain is for use in + illustrative examples in documents. You may use this domain in literature without prior coordination or asking + for permission.. + image (Union[Unset, None, str]): The image of the page Example: https://www.example.com/image.png. """ - page_url: Union[Unset, str] = UNSET - title: Union[Unset, str] = UNSET - description: Union[Unset, str] = UNSET - image: Union[Unset, str] = UNSET - image_width: Union[Unset, int] = UNSET - image_height: Union[Unset, int] = UNSET - url: Union[Unset, str] = UNSET - favicon: Union[Unset, str] = UNSET - site_name: Union[Unset, str] = UNSET + id: Union[Unset, int] = UNSET + url: Union[Unset, None, str] = UNSET + title: Union[Unset, None, str] = UNSET + description: Union[Unset, None, str] = UNSET + image: Union[Unset, None, str] = UNSET additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) def to_dict(self) -> Dict[str, Any]: - page_url = self.page_url + id = self.id + url = self.url title = self.title description = self.description image = self.image - image_width = self.image_width - image_height = self.image_height - url = self.url - favicon = self.favicon - site_name = self.site_name field_dict: Dict[str, Any] = {} field_dict.update(self.additional_properties) field_dict.update({}) - if page_url is not UNSET: - field_dict["page_url"] = page_url + if id is not UNSET: + field_dict["id"] = id + if url is not UNSET: + field_dict["url"] = url if title is not UNSET: field_dict["title"] = title if description is not UNSET: field_dict["description"] = description if image is not UNSET: field_dict["image"] = image - if image_width is not UNSET: - field_dict["image_width"] = image_width - if image_height is not UNSET: - field_dict["image_height"] = image_height - if url is not UNSET: - field_dict["url"] = url - if favicon is not UNSET: - field_dict["favicon"] = favicon - if site_name is not UNSET: - field_dict["site_name"] = site_name return field_dict @classmethod def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: - page_url = src_dict.get("page_url") + id = src_dict.get("id") + + url = src_dict.get("url") title = src_dict.get("title") @@ -80,26 +62,12 @@ def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: image = src_dict.get("image") - image_width = src_dict.get("image_width") - - image_height = src_dict.get("image_height") - - url = src_dict.get("url") - - favicon = src_dict.get("favicon") - - site_name = src_dict.get("site_name") - get_citation_response_200_data = cls( - page_url=page_url, + id=id, + url=url, title=title, description=description, image=image, - image_width=image_width, - image_height=image_height, - url=url, - favicon=favicon, - site_name=site_name, ) get_citation_response_200_data.additional_properties = src_dict diff --git a/customgpt-client/customgpt_client/models/get_citation_response_400.py b/customgpt-client/customgpt_client/models/get_citation_response_400.py index c78415f..00bf6d4 100644 --- a/customgpt-client/customgpt_client/models/get_citation_response_400.py +++ b/customgpt-client/customgpt_client/models/get_citation_response_400.py @@ -20,7 +20,7 @@ class GetCitationResponse400: data (Union[Unset, GetCitationResponse400Data]): """ - status: Union[Unset, str] = "error" + status: Union[Unset, str] = UNSET url: Union[Unset, str] = UNSET data: Union[Unset, "GetCitationResponse400Data"] = UNSET additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) diff --git a/customgpt-client/customgpt_client/models/get_citation_response_400_data.py b/customgpt-client/customgpt_client/models/get_citation_response_400_data.py index 53f5898..54efc8e 100644 --- a/customgpt-client/customgpt_client/models/get_citation_response_400_data.py +++ b/customgpt-client/customgpt_client/models/get_citation_response_400_data.py @@ -15,7 +15,7 @@ class GetCitationResponse400Data: message (Union[Unset, str]): The error message Example: Project id must be integer. """ - code: Union[Unset, str] = "400" + code: Union[Unset, str] = UNSET message: Union[Unset, str] = UNSET additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) diff --git a/customgpt-client/customgpt_client/models/get_citation_response_401.py b/customgpt-client/customgpt_client/models/get_citation_response_401.py index 87428b4..2d18374 100644 --- a/customgpt-client/customgpt_client/models/get_citation_response_401.py +++ b/customgpt-client/customgpt_client/models/get_citation_response_401.py @@ -20,7 +20,7 @@ class GetCitationResponse401: data (Union[Unset, GetCitationResponse401Data]): """ - status: Union[Unset, str] = "error" + status: Union[Unset, str] = UNSET url: Union[Unset, str] = UNSET data: Union[Unset, "GetCitationResponse401Data"] = UNSET additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) diff --git a/customgpt-client/customgpt_client/models/get_citation_response_401_data.py b/customgpt-client/customgpt_client/models/get_citation_response_401_data.py index 12147c4..7346578 100644 --- a/customgpt-client/customgpt_client/models/get_citation_response_401_data.py +++ b/customgpt-client/customgpt_client/models/get_citation_response_401_data.py @@ -15,7 +15,7 @@ class GetCitationResponse401Data: message (Union[Unset, str]): Example: API Token is either missing or invalid. """ - code: Union[Unset, str] = "401" + code: Union[Unset, str] = UNSET message: Union[Unset, str] = UNSET additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) diff --git a/customgpt-client/customgpt_client/models/get_citation_response_404.py b/customgpt-client/customgpt_client/models/get_citation_response_404.py index 3c18847..e234cf4 100644 --- a/customgpt-client/customgpt_client/models/get_citation_response_404.py +++ b/customgpt-client/customgpt_client/models/get_citation_response_404.py @@ -20,7 +20,7 @@ class GetCitationResponse404: data (Union[Unset, GetCitationResponse404Data]): """ - status: Union[Unset, str] = "error" + status: Union[Unset, str] = UNSET url: Union[Unset, str] = UNSET data: Union[Unset, "GetCitationResponse404Data"] = UNSET additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) diff --git a/customgpt-client/customgpt_client/models/get_citation_response_404_data.py b/customgpt-client/customgpt_client/models/get_citation_response_404_data.py index 043bd7a..7482ee3 100644 --- a/customgpt-client/customgpt_client/models/get_citation_response_404_data.py +++ b/customgpt-client/customgpt_client/models/get_citation_response_404_data.py @@ -12,12 +12,11 @@ class GetCitationResponse404Data: """ Attributes: code (Union[Unset, GetCitationResponse404DataCode]): The error status code Example: 404. - message (Union[Unset, GetCitationResponse404DataMessage]): The error message Example: Project with id 1 not - found. + message (Union[Unset, GetCitationResponse404DataMessage]): The error message Example: Page with id 1 not found. """ - code: Union[Unset, str] = "404" - message: Union[Unset, str] = "Project with id 1 not found" + code: Union[Unset, str] = UNSET + message: Union[Unset, str] = UNSET additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) def to_dict(self) -> Dict[str, Any]: diff --git a/customgpt-client/customgpt_client/models/get_citation_response_404_data_message.py b/customgpt-client/customgpt_client/models/get_citation_response_404_data_message.py index f6f2e9c..874016a 100644 --- a/customgpt-client/customgpt_client/models/get_citation_response_404_data_message.py +++ b/customgpt-client/customgpt_client/models/get_citation_response_404_data_message.py @@ -2,8 +2,8 @@ class GetCitationResponse404DataMessage(str, Enum): - PROJECT_ID_IS_REQUIRED = "Project id is required" - PROJECT_WITH_ID_PROJECTID_NOT_FOUND = "Project with id {projectId} not found" + PAGE_ID_IS_REQUIRED = "Page id is required" + PAGE_WITH_ID_PAGEID_NOT_FOUND = "Page with id {pageId} not found" def __str__(self) -> str: return str(self.value) diff --git a/customgpt-client/customgpt_client/models/get_conversations_order_by.py b/customgpt-client/customgpt_client/models/get_conversations_order_by.py new file mode 100644 index 0000000..8389dc2 --- /dev/null +++ b/customgpt-client/customgpt_client/models/get_conversations_order_by.py @@ -0,0 +1,9 @@ +from enum import Enum + + +class GetConversationsOrderBy(str, Enum): + CREATED_AT = "created_at" + ID = "id" + + def __str__(self) -> str: + return str(self.value) diff --git a/customgpt-client/customgpt_client/models/get_conversations_response_200.py b/customgpt-client/customgpt_client/models/get_conversations_response_200.py index 000487d..d6027e2 100644 --- a/customgpt-client/customgpt_client/models/get_conversations_response_200.py +++ b/customgpt-client/customgpt_client/models/get_conversations_response_200.py @@ -19,7 +19,7 @@ class GetConversationsResponse200: data (Union[Unset, GetConversationsResponse200Data]): """ - status: Union[Unset, str] = "success" + status: Union[Unset, str] = UNSET data: Union[Unset, "GetConversationsResponse200Data"] = UNSET additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) diff --git a/customgpt-client/customgpt_client/models/get_conversations_response_200_data.py b/customgpt-client/customgpt_client/models/get_conversations_response_200_data.py index f194256..009de61 100644 --- a/customgpt-client/customgpt_client/models/get_conversations_response_200_data.py +++ b/customgpt-client/customgpt_client/models/get_conversations_response_200_data.py @@ -71,7 +71,7 @@ def to_dict(self) -> Dict[str, Any]: field_dict["current_page"] = current_page if data is not UNSET: for index, field_value in enumerate(data): - field_dict[f"data[]"] = field_value + field_dict[f"data[{index}]"] = field_value if first_page_url is not UNSET: field_dict["first_page_url"] = first_page_url if from_ is not UNSET: diff --git a/customgpt-client/customgpt_client/models/get_conversations_response_200_data_data_item.py b/customgpt-client/customgpt_client/models/get_conversations_response_200_data_data_item.py index 0dc2524..d8f47e3 100644 --- a/customgpt-client/customgpt_client/models/get_conversations_response_200_data_data_item.py +++ b/customgpt-client/customgpt_client/models/get_conversations_response_200_data_data_item.py @@ -15,8 +15,6 @@ class GetConversationsResponse200DataDataItem: Attributes: created_at (Union[Unset, datetime.datetime]): When was this conversation created? Example: 2023-04-30 16:43:53. updated_at (Union[Unset, datetime.datetime]): When was this conversation updated? Example: 2023-04-30 16:43:53. - deleted_at (Union[Unset, None, datetime.datetime]): When was this conversation deleted? Example: 2023-04-30 - 16:43:53. id (Union[Unset, int]): Conversation ID Example: 1. name (Union[Unset, str]): Conversation name Example: Conversation 1. project_id (Union[Unset, str]): Project ID for this conversation Example: 1. @@ -26,7 +24,6 @@ class GetConversationsResponse200DataDataItem: created_at: Union[Unset, datetime.datetime] = UNSET updated_at: Union[Unset, datetime.datetime] = UNSET - deleted_at: Union[Unset, None, datetime.datetime] = UNSET id: Union[Unset, int] = UNSET name: Union[Unset, str] = UNSET project_id: Union[Unset, str] = UNSET @@ -43,10 +40,6 @@ def to_dict(self) -> Dict[str, Any]: if not isinstance(self.updated_at, Unset): updated_at = self.updated_at.isoformat() - deleted_at: Union[Unset, None, str] = UNSET - if not isinstance(self.deleted_at, Unset): - deleted_at = self.deleted_at.isoformat() if self.deleted_at else None - id = self.id name = self.name project_id = self.project_id @@ -60,8 +53,6 @@ def to_dict(self) -> Dict[str, Any]: field_dict["created_at"] = created_at if updated_at is not UNSET: field_dict["updated_at"] = updated_at - if deleted_at is not UNSET: - field_dict["deleted_at"] = deleted_at if id is not UNSET: field_dict["id"] = id if name is not UNSET: @@ -91,15 +82,6 @@ def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: else: updated_at = isoparse(_updated_at) - _deleted_at = src_dict.get("deleted_at") - deleted_at: Union[Unset, None, datetime.datetime] - if _deleted_at is None: - deleted_at = None - elif isinstance(_deleted_at, Unset): - deleted_at = UNSET - else: - deleted_at = isoparse(_deleted_at) - id = src_dict.get("id") name = src_dict.get("name") @@ -113,7 +95,6 @@ def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: get_conversations_response_200_data_data_item = cls( created_at=created_at, updated_at=updated_at, - deleted_at=deleted_at, id=id, name=name, project_id=project_id, diff --git a/customgpt-client/customgpt_client/models/get_conversations_response_400.py b/customgpt-client/customgpt_client/models/get_conversations_response_400.py index 9145fc1..96f115e 100644 --- a/customgpt-client/customgpt_client/models/get_conversations_response_400.py +++ b/customgpt-client/customgpt_client/models/get_conversations_response_400.py @@ -20,7 +20,7 @@ class GetConversationsResponse400: data (Union[Unset, GetConversationsResponse400Data]): """ - status: Union[Unset, str] = "error" + status: Union[Unset, str] = UNSET url: Union[Unset, str] = UNSET data: Union[Unset, "GetConversationsResponse400Data"] = UNSET additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) diff --git a/customgpt-client/customgpt_client/models/get_conversations_response_400_data.py b/customgpt-client/customgpt_client/models/get_conversations_response_400_data.py index aabb476..120deb7 100644 --- a/customgpt-client/customgpt_client/models/get_conversations_response_400_data.py +++ b/customgpt-client/customgpt_client/models/get_conversations_response_400_data.py @@ -15,7 +15,7 @@ class GetConversationsResponse400Data: message (Union[Unset, str]): The error message Example: Project id must be integer. """ - code: Union[Unset, str] = "400" + code: Union[Unset, str] = UNSET message: Union[Unset, str] = UNSET additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) diff --git a/customgpt-client/customgpt_client/models/get_conversations_response_401.py b/customgpt-client/customgpt_client/models/get_conversations_response_401.py index a5654a1..327c663 100644 --- a/customgpt-client/customgpt_client/models/get_conversations_response_401.py +++ b/customgpt-client/customgpt_client/models/get_conversations_response_401.py @@ -20,7 +20,7 @@ class GetConversationsResponse401: data (Union[Unset, GetConversationsResponse401Data]): """ - status: Union[Unset, str] = "error" + status: Union[Unset, str] = UNSET url: Union[Unset, str] = UNSET data: Union[Unset, "GetConversationsResponse401Data"] = UNSET additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) diff --git a/customgpt-client/customgpt_client/models/get_conversations_response_401_data.py b/customgpt-client/customgpt_client/models/get_conversations_response_401_data.py index 362216c..ee6064a 100644 --- a/customgpt-client/customgpt_client/models/get_conversations_response_401_data.py +++ b/customgpt-client/customgpt_client/models/get_conversations_response_401_data.py @@ -15,7 +15,7 @@ class GetConversationsResponse401Data: message (Union[Unset, str]): Example: API Token is either missing or invalid. """ - code: Union[Unset, str] = "401" + code: Union[Unset, str] = UNSET message: Union[Unset, str] = UNSET additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) diff --git a/customgpt-client/customgpt_client/models/get_conversations_response_404.py b/customgpt-client/customgpt_client/models/get_conversations_response_404.py index c255f0e..feb5446 100644 --- a/customgpt-client/customgpt_client/models/get_conversations_response_404.py +++ b/customgpt-client/customgpt_client/models/get_conversations_response_404.py @@ -20,7 +20,7 @@ class GetConversationsResponse404: data (Union[Unset, GetConversationsResponse404Data]): """ - status: Union[Unset, str] = "error" + status: Union[Unset, str] = UNSET url: Union[Unset, str] = UNSET data: Union[Unset, "GetConversationsResponse404Data"] = UNSET additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) diff --git a/customgpt-client/customgpt_client/models/get_conversations_response_404_data.py b/customgpt-client/customgpt_client/models/get_conversations_response_404_data.py index aa24e0e..355e064 100644 --- a/customgpt-client/customgpt_client/models/get_conversations_response_404_data.py +++ b/customgpt-client/customgpt_client/models/get_conversations_response_404_data.py @@ -16,8 +16,8 @@ class GetConversationsResponse404Data: found. """ - code: Union[Unset, str] = "404" - message: Union[Unset, str] = "Project with id 1 not found" + code: Union[Unset, str] = UNSET + message: Union[Unset, str] = UNSET additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) def to_dict(self) -> Dict[str, Any]: diff --git a/customgpt-client/customgpt_client/models/get_conversations_response_500.py b/customgpt-client/customgpt_client/models/get_conversations_response_500.py index b254942..0ff712d 100644 --- a/customgpt-client/customgpt_client/models/get_conversations_response_500.py +++ b/customgpt-client/customgpt_client/models/get_conversations_response_500.py @@ -20,7 +20,7 @@ class GetConversationsResponse500: data (Union[Unset, GetConversationsResponse500Data]): """ - status: Union[Unset, str] = "error" + status: Union[Unset, str] = UNSET url: Union[Unset, str] = UNSET data: Union[Unset, "GetConversationsResponse500Data"] = UNSET additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) diff --git a/customgpt-client/customgpt_client/models/get_conversations_response_500_data.py b/customgpt-client/customgpt_client/models/get_conversations_response_500_data.py index c51d7fd..06d74e2 100644 --- a/customgpt-client/customgpt_client/models/get_conversations_response_500_data.py +++ b/customgpt-client/customgpt_client/models/get_conversations_response_500_data.py @@ -15,7 +15,7 @@ class GetConversationsResponse500Data: message (Union[Unset, str]): Example: Internal Server Error. """ - code: Union[Unset, str] = "500" + code: Union[Unset, str] = UNSET message: Union[Unset, str] = UNSET additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) diff --git a/customgpt-client/customgpt_client/models/get_settings_response_200.py b/customgpt-client/customgpt_client/models/get_metadata_response_200.py similarity index 69% rename from customgpt-client/customgpt_client/models/get_settings_response_200.py rename to customgpt-client/customgpt_client/models/get_metadata_response_200.py index b2e5837..727441a 100644 --- a/customgpt-client/customgpt_client/models/get_settings_response_200.py +++ b/customgpt-client/customgpt_client/models/get_metadata_response_200.py @@ -5,22 +5,22 @@ from ..types import UNSET, Unset if TYPE_CHECKING: - from ..models.get_settings_response_200_data import GetSettingsResponse200Data + from ..models.get_metadata_response_200_data import GetMetadataResponse200Data -T = TypeVar("T", bound="GetSettingsResponse200") +T = TypeVar("T", bound="GetMetadataResponse200") @attr.s(auto_attribs=True) -class GetSettingsResponse200: +class GetMetadataResponse200: """ Attributes: - status (Union[Unset, GetSettingsResponse200Status]): The status of the response Example: success. - data (Union[Unset, GetSettingsResponse200Data]): + status (Union[Unset, GetMetadataResponse200Status]): The status of the response Example: success. + data (Union[Unset, GetMetadataResponse200Data]): """ - status: Union[Unset, str] = "success" - data: Union[Unset, "GetSettingsResponse200Data"] = UNSET + status: Union[Unset, str] = UNSET + data: Union[Unset, "GetMetadataResponse200Data"] = UNSET additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) def to_dict(self) -> Dict[str, Any]: @@ -44,24 +44,24 @@ def to_dict(self) -> Dict[str, Any]: @classmethod def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: - from ..models.get_settings_response_200_data import GetSettingsResponse200Data + from ..models.get_metadata_response_200_data import GetMetadataResponse200Data status = src_dict.get("status") _data = src_dict.get("data") - data: Union[Unset, GetSettingsResponse200Data] + data: Union[Unset, GetMetadataResponse200Data] if isinstance(_data, Unset): data = UNSET else: - data = GetSettingsResponse200Data.from_dict(_data) + data = GetMetadataResponse200Data.from_dict(_data) - get_settings_response_200 = cls( + get_metadata_response_200 = cls( status=status, data=data, ) - get_settings_response_200.additional_properties = src_dict - return get_settings_response_200 + get_metadata_response_200.additional_properties = src_dict + return get_metadata_response_200 @property def additional_keys(self) -> List[str]: diff --git a/customgpt-client/customgpt_client/models/get_page_metadata_response_200_data.py b/customgpt-client/customgpt_client/models/get_metadata_response_200_data.py similarity index 58% rename from customgpt-client/customgpt_client/models/get_page_metadata_response_200_data.py rename to customgpt-client/customgpt_client/models/get_metadata_response_200_data.py index 0e74b00..121709b 100644 --- a/customgpt-client/customgpt_client/models/get_page_metadata_response_200_data.py +++ b/customgpt-client/customgpt_client/models/get_metadata_response_200_data.py @@ -4,28 +4,31 @@ from ..types import UNSET, Unset -T = TypeVar("T", bound="GetPageMetadataResponse200Data") +T = TypeVar("T", bound="GetMetadataResponse200Data") @attr.s(auto_attribs=True) -class GetPageMetadataResponse200Data: +class GetMetadataResponse200Data: """ Attributes: - url (Union[Unset, str]): The URL of the page Example: https://www.example.com. - title (Union[Unset, str]): The title of the page Example: Example Domain. - description (Union[Unset, str]): The description of the page Example: This domain is for use in illustrative - examples in documents. You may use this domain in literature without prior coordination or asking for - permission.. - image (Union[Unset, str]): The image of the page Example: https://www.example.com/image.png. + id (Union[Unset, int]): The unique identifier of the page Example: 1. + url (Union[Unset, None, str]): The URL of the page Example: https://www.example.com. + title (Union[Unset, None, str]): The title of the page Example: Example Domain. + description (Union[Unset, None, str]): The description of the page Example: This domain is for use in + illustrative examples in documents. You may use this domain in literature without prior coordination or asking + for permission.. + image (Union[Unset, None, str]): The image of the page Example: https://www.example.com/image.png. """ - url: Union[Unset, str] = UNSET - title: Union[Unset, str] = UNSET - description: Union[Unset, str] = UNSET - image: Union[Unset, str] = UNSET + id: Union[Unset, int] = UNSET + url: Union[Unset, None, str] = UNSET + title: Union[Unset, None, str] = UNSET + description: Union[Unset, None, str] = UNSET + image: Union[Unset, None, str] = UNSET additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) def to_dict(self) -> Dict[str, Any]: + id = self.id url = self.url title = self.title description = self.description @@ -34,6 +37,8 @@ def to_dict(self) -> Dict[str, Any]: field_dict: Dict[str, Any] = {} field_dict.update(self.additional_properties) field_dict.update({}) + if id is not UNSET: + field_dict["id"] = id if url is not UNSET: field_dict["url"] = url if title is not UNSET: @@ -47,6 +52,8 @@ def to_dict(self) -> Dict[str, Any]: @classmethod def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + id = src_dict.get("id") + url = src_dict.get("url") title = src_dict.get("title") @@ -55,15 +62,16 @@ def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: image = src_dict.get("image") - get_page_metadata_response_200_data = cls( + get_metadata_response_200_data = cls( + id=id, url=url, title=title, description=description, image=image, ) - get_page_metadata_response_200_data.additional_properties = src_dict - return get_page_metadata_response_200_data + get_metadata_response_200_data.additional_properties = src_dict + return get_metadata_response_200_data @property def additional_keys(self) -> List[str]: diff --git a/customgpt-client/customgpt_client/models/get_settings_response_200_status.py b/customgpt-client/customgpt_client/models/get_metadata_response_200_status.py similarity index 73% rename from customgpt-client/customgpt_client/models/get_settings_response_200_status.py rename to customgpt-client/customgpt_client/models/get_metadata_response_200_status.py index 6a5e36f..6ad235a 100644 --- a/customgpt-client/customgpt_client/models/get_settings_response_200_status.py +++ b/customgpt-client/customgpt_client/models/get_metadata_response_200_status.py @@ -1,7 +1,7 @@ from enum import Enum -class GetSettingsResponse200Status(str, Enum): +class GetMetadataResponse200Status(str, Enum): ERROR = "error" SUCCESS = "success" diff --git a/customgpt-client/customgpt_client/models/get_settings_response_400.py b/customgpt-client/customgpt_client/models/get_metadata_response_400.py similarity index 73% rename from customgpt-client/customgpt_client/models/get_settings_response_400.py rename to customgpt-client/customgpt_client/models/get_metadata_response_400.py index 3c034eb..0c9b83b 100644 --- a/customgpt-client/customgpt_client/models/get_settings_response_400.py +++ b/customgpt-client/customgpt_client/models/get_metadata_response_400.py @@ -5,24 +5,24 @@ from ..types import UNSET, Unset if TYPE_CHECKING: - from ..models.get_settings_response_400_data import GetSettingsResponse400Data + from ..models.get_metadata_response_400_data import GetMetadataResponse400Data -T = TypeVar("T", bound="GetSettingsResponse400") +T = TypeVar("T", bound="GetMetadataResponse400") @attr.s(auto_attribs=True) -class GetSettingsResponse400: +class GetMetadataResponse400: """ Attributes: - status (Union[Unset, GetSettingsResponse400Status]): The status of the response Example: error. + status (Union[Unset, GetMetadataResponse400Status]): The status of the response Example: error. url (Union[Unset, str]): The URL of the request Example: https://app.customgpt.ai/api/v1/projects/1. - data (Union[Unset, GetSettingsResponse400Data]): + data (Union[Unset, GetMetadataResponse400Data]): """ - status: Union[Unset, str] = "error" + status: Union[Unset, str] = UNSET url: Union[Unset, str] = UNSET - data: Union[Unset, "GetSettingsResponse400Data"] = UNSET + data: Union[Unset, "GetMetadataResponse400Data"] = UNSET additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) def to_dict(self) -> Dict[str, Any]: @@ -49,27 +49,27 @@ def to_dict(self) -> Dict[str, Any]: @classmethod def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: - from ..models.get_settings_response_400_data import GetSettingsResponse400Data + from ..models.get_metadata_response_400_data import GetMetadataResponse400Data status = src_dict.get("status") url = src_dict.get("url") _data = src_dict.get("data") - data: Union[Unset, GetSettingsResponse400Data] + data: Union[Unset, GetMetadataResponse400Data] if isinstance(_data, Unset): data = UNSET else: - data = GetSettingsResponse400Data.from_dict(_data) + data = GetMetadataResponse400Data.from_dict(_data) - get_settings_response_400 = cls( + get_metadata_response_400 = cls( status=status, url=url, data=data, ) - get_settings_response_400.additional_properties = src_dict - return get_settings_response_400 + get_metadata_response_400.additional_properties = src_dict + return get_metadata_response_400 @property def additional_keys(self) -> List[str]: diff --git a/customgpt-client/customgpt_client/models/get_settings_response_400_data.py b/customgpt-client/customgpt_client/models/get_metadata_response_400_data.py similarity index 81% rename from customgpt-client/customgpt_client/models/get_settings_response_400_data.py rename to customgpt-client/customgpt_client/models/get_metadata_response_400_data.py index 8bdb17a..65bfd85 100644 --- a/customgpt-client/customgpt_client/models/get_settings_response_400_data.py +++ b/customgpt-client/customgpt_client/models/get_metadata_response_400_data.py @@ -4,18 +4,18 @@ from ..types import UNSET, Unset -T = TypeVar("T", bound="GetSettingsResponse400Data") +T = TypeVar("T", bound="GetMetadataResponse400Data") @attr.s(auto_attribs=True) -class GetSettingsResponse400Data: +class GetMetadataResponse400Data: """ Attributes: - code (Union[Unset, GetSettingsResponse400DataCode]): The error status code Example: 400. - message (Union[Unset, str]): The error message Example: Project id must be integer. + code (Union[Unset, GetMetadataResponse400DataCode]): The error status code Example: 400. + message (Union[Unset, str]): The error message Example: Something went wrong.. """ - code: Union[Unset, str] = "400" + code: Union[Unset, str] = UNSET message: Union[Unset, str] = UNSET additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) @@ -42,13 +42,13 @@ def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: message = src_dict.get("message") - get_settings_response_400_data = cls( + get_metadata_response_400_data = cls( code=code, message=message, ) - get_settings_response_400_data.additional_properties = src_dict - return get_settings_response_400_data + get_metadata_response_400_data.additional_properties = src_dict + return get_metadata_response_400_data @property def additional_keys(self) -> List[str]: diff --git a/customgpt-client/customgpt_client/models/get_settings_response_401_data_code.py b/customgpt-client/customgpt_client/models/get_metadata_response_400_data_code.py similarity index 81% rename from customgpt-client/customgpt_client/models/get_settings_response_401_data_code.py rename to customgpt-client/customgpt_client/models/get_metadata_response_400_data_code.py index 20787e0..ac44def 100644 --- a/customgpt-client/customgpt_client/models/get_settings_response_401_data_code.py +++ b/customgpt-client/customgpt_client/models/get_metadata_response_400_data_code.py @@ -1,7 +1,7 @@ from enum import IntEnum -class GetSettingsResponse401DataCode(IntEnum): +class GetMetadataResponse400DataCode(IntEnum): VALUE_400 = 400 VALUE_401 = 401 VALUE_403 = 403 diff --git a/customgpt-client/customgpt_client/models/get_settings_response_400_status.py b/customgpt-client/customgpt_client/models/get_metadata_response_400_status.py similarity index 73% rename from customgpt-client/customgpt_client/models/get_settings_response_400_status.py rename to customgpt-client/customgpt_client/models/get_metadata_response_400_status.py index 6cd8e0d..291a347 100644 --- a/customgpt-client/customgpt_client/models/get_settings_response_400_status.py +++ b/customgpt-client/customgpt_client/models/get_metadata_response_400_status.py @@ -1,7 +1,7 @@ from enum import Enum -class GetSettingsResponse400Status(str, Enum): +class GetMetadataResponse400Status(str, Enum): ERROR = "error" SUCCESS = "success" diff --git a/customgpt-client/customgpt_client/models/get_settings_response_401.py b/customgpt-client/customgpt_client/models/get_metadata_response_401.py similarity index 73% rename from customgpt-client/customgpt_client/models/get_settings_response_401.py rename to customgpt-client/customgpt_client/models/get_metadata_response_401.py index d4d5faf..a8161d9 100644 --- a/customgpt-client/customgpt_client/models/get_settings_response_401.py +++ b/customgpt-client/customgpt_client/models/get_metadata_response_401.py @@ -5,24 +5,24 @@ from ..types import UNSET, Unset if TYPE_CHECKING: - from ..models.get_settings_response_401_data import GetSettingsResponse401Data + from ..models.get_metadata_response_401_data import GetMetadataResponse401Data -T = TypeVar("T", bound="GetSettingsResponse401") +T = TypeVar("T", bound="GetMetadataResponse401") @attr.s(auto_attribs=True) -class GetSettingsResponse401: +class GetMetadataResponse401: """ Attributes: - status (Union[Unset, GetSettingsResponse401Status]): The status of the response Example: error. + status (Union[Unset, GetMetadataResponse401Status]): The status of the response Example: error. url (Union[Unset, str]): The URL of the request Example: https://app.customgpt.ai/api/v1/projects/1. - data (Union[Unset, GetSettingsResponse401Data]): + data (Union[Unset, GetMetadataResponse401Data]): """ - status: Union[Unset, str] = "error" + status: Union[Unset, str] = UNSET url: Union[Unset, str] = UNSET - data: Union[Unset, "GetSettingsResponse401Data"] = UNSET + data: Union[Unset, "GetMetadataResponse401Data"] = UNSET additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) def to_dict(self) -> Dict[str, Any]: @@ -49,27 +49,27 @@ def to_dict(self) -> Dict[str, Any]: @classmethod def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: - from ..models.get_settings_response_401_data import GetSettingsResponse401Data + from ..models.get_metadata_response_401_data import GetMetadataResponse401Data status = src_dict.get("status") url = src_dict.get("url") _data = src_dict.get("data") - data: Union[Unset, GetSettingsResponse401Data] + data: Union[Unset, GetMetadataResponse401Data] if isinstance(_data, Unset): data = UNSET else: - data = GetSettingsResponse401Data.from_dict(_data) + data = GetMetadataResponse401Data.from_dict(_data) - get_settings_response_401 = cls( + get_metadata_response_401 = cls( status=status, url=url, data=data, ) - get_settings_response_401.additional_properties = src_dict - return get_settings_response_401 + get_metadata_response_401.additional_properties = src_dict + return get_metadata_response_401 @property def additional_keys(self) -> List[str]: diff --git a/customgpt-client/customgpt_client/models/get_settings_response_401_data.py b/customgpt-client/customgpt_client/models/get_metadata_response_401_data.py similarity index 82% rename from customgpt-client/customgpt_client/models/get_settings_response_401_data.py rename to customgpt-client/customgpt_client/models/get_metadata_response_401_data.py index 767f7a4..aad9576 100644 --- a/customgpt-client/customgpt_client/models/get_settings_response_401_data.py +++ b/customgpt-client/customgpt_client/models/get_metadata_response_401_data.py @@ -4,18 +4,18 @@ from ..types import UNSET, Unset -T = TypeVar("T", bound="GetSettingsResponse401Data") +T = TypeVar("T", bound="GetMetadataResponse401Data") @attr.s(auto_attribs=True) -class GetSettingsResponse401Data: +class GetMetadataResponse401Data: """ Attributes: - code (Union[Unset, GetSettingsResponse401DataCode]): The error status code Example: 401. + code (Union[Unset, GetMetadataResponse401DataCode]): The error status code Example: 401. message (Union[Unset, str]): Example: API Token is either missing or invalid. """ - code: Union[Unset, str] = "401" + code: Union[Unset, str] = UNSET message: Union[Unset, str] = UNSET additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) @@ -42,13 +42,13 @@ def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: message = src_dict.get("message") - get_settings_response_401_data = cls( + get_metadata_response_401_data = cls( code=code, message=message, ) - get_settings_response_401_data.additional_properties = src_dict - return get_settings_response_401_data + get_metadata_response_401_data.additional_properties = src_dict + return get_metadata_response_401_data @property def additional_keys(self) -> List[str]: diff --git a/customgpt-client/customgpt_client/models/get_settings_response_404_data_code.py b/customgpt-client/customgpt_client/models/get_metadata_response_401_data_code.py similarity index 81% rename from customgpt-client/customgpt_client/models/get_settings_response_404_data_code.py rename to customgpt-client/customgpt_client/models/get_metadata_response_401_data_code.py index 93c99b0..00ee629 100644 --- a/customgpt-client/customgpt_client/models/get_settings_response_404_data_code.py +++ b/customgpt-client/customgpt_client/models/get_metadata_response_401_data_code.py @@ -1,7 +1,7 @@ from enum import IntEnum -class GetSettingsResponse404DataCode(IntEnum): +class GetMetadataResponse401DataCode(IntEnum): VALUE_400 = 400 VALUE_401 = 401 VALUE_403 = 403 diff --git a/customgpt-client/customgpt_client/models/get_settings_response_401_status.py b/customgpt-client/customgpt_client/models/get_metadata_response_401_status.py similarity index 73% rename from customgpt-client/customgpt_client/models/get_settings_response_401_status.py rename to customgpt-client/customgpt_client/models/get_metadata_response_401_status.py index 41bff05..114db6f 100644 --- a/customgpt-client/customgpt_client/models/get_settings_response_401_status.py +++ b/customgpt-client/customgpt_client/models/get_metadata_response_401_status.py @@ -1,7 +1,7 @@ from enum import Enum -class GetSettingsResponse401Status(str, Enum): +class GetMetadataResponse401Status(str, Enum): ERROR = "error" SUCCESS = "success" diff --git a/customgpt-client/customgpt_client/models/get_settings_response_404.py b/customgpt-client/customgpt_client/models/get_metadata_response_404.py similarity index 73% rename from customgpt-client/customgpt_client/models/get_settings_response_404.py rename to customgpt-client/customgpt_client/models/get_metadata_response_404.py index 209f7ab..113b4a0 100644 --- a/customgpt-client/customgpt_client/models/get_settings_response_404.py +++ b/customgpt-client/customgpt_client/models/get_metadata_response_404.py @@ -5,24 +5,24 @@ from ..types import UNSET, Unset if TYPE_CHECKING: - from ..models.get_settings_response_404_data import GetSettingsResponse404Data + from ..models.get_metadata_response_404_data import GetMetadataResponse404Data -T = TypeVar("T", bound="GetSettingsResponse404") +T = TypeVar("T", bound="GetMetadataResponse404") @attr.s(auto_attribs=True) -class GetSettingsResponse404: +class GetMetadataResponse404: """ Attributes: - status (Union[Unset, GetSettingsResponse404Status]): The status of the response Example: error. + status (Union[Unset, GetMetadataResponse404Status]): The status of the response Example: error. url (Union[Unset, str]): The URL of the request Example: https://app.customgpt.ai/api/v1/projects/1. - data (Union[Unset, GetSettingsResponse404Data]): + data (Union[Unset, GetMetadataResponse404Data]): """ - status: Union[Unset, str] = "error" + status: Union[Unset, str] = UNSET url: Union[Unset, str] = UNSET - data: Union[Unset, "GetSettingsResponse404Data"] = UNSET + data: Union[Unset, "GetMetadataResponse404Data"] = UNSET additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) def to_dict(self) -> Dict[str, Any]: @@ -49,27 +49,27 @@ def to_dict(self) -> Dict[str, Any]: @classmethod def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: - from ..models.get_settings_response_404_data import GetSettingsResponse404Data + from ..models.get_metadata_response_404_data import GetMetadataResponse404Data status = src_dict.get("status") url = src_dict.get("url") _data = src_dict.get("data") - data: Union[Unset, GetSettingsResponse404Data] + data: Union[Unset, GetMetadataResponse404Data] if isinstance(_data, Unset): data = UNSET else: - data = GetSettingsResponse404Data.from_dict(_data) + data = GetMetadataResponse404Data.from_dict(_data) - get_settings_response_404 = cls( + get_metadata_response_404 = cls( status=status, url=url, data=data, ) - get_settings_response_404.additional_properties = src_dict - return get_settings_response_404 + get_metadata_response_404.additional_properties = src_dict + return get_metadata_response_404 @property def additional_keys(self) -> List[str]: diff --git a/customgpt-client/customgpt_client/models/list_sources_response_404_data.py b/customgpt-client/customgpt_client/models/get_metadata_response_404_data.py similarity index 74% rename from customgpt-client/customgpt_client/models/list_sources_response_404_data.py rename to customgpt-client/customgpt_client/models/get_metadata_response_404_data.py index fa08d8a..17b9002 100644 --- a/customgpt-client/customgpt_client/models/list_sources_response_404_data.py +++ b/customgpt-client/customgpt_client/models/get_metadata_response_404_data.py @@ -4,20 +4,19 @@ from ..types import UNSET, Unset -T = TypeVar("T", bound="ListSourcesResponse404Data") +T = TypeVar("T", bound="GetMetadataResponse404Data") @attr.s(auto_attribs=True) -class ListSourcesResponse404Data: +class GetMetadataResponse404Data: """ Attributes: - code (Union[Unset, ListSourcesResponse404DataCode]): The error status code Example: 404. - message (Union[Unset, ListSourcesResponse404DataMessage]): The error message Example: Project with id 1 not - found. + code (Union[Unset, GetMetadataResponse404DataCode]): The error status code Example: 404. + message (Union[Unset, GetMetadataResponse404DataMessage]): The error message Example: Page with id 1 not found. """ - code: Union[Unset, str] = "404" - message: Union[Unset, str] = "Project with id 1 not found" + code: Union[Unset, str] = UNSET + message: Union[Unset, str] = UNSET additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) def to_dict(self) -> Dict[str, Any]: @@ -45,13 +44,13 @@ def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: message = src_dict.get("message") - list_sources_response_404_data = cls( + get_metadata_response_404_data = cls( code=code, message=message, ) - list_sources_response_404_data.additional_properties = src_dict - return list_sources_response_404_data + get_metadata_response_404_data.additional_properties = src_dict + return get_metadata_response_404_data @property def additional_keys(self) -> List[str]: diff --git a/customgpt-client/customgpt_client/models/get_settings_response_500_data_code.py b/customgpt-client/customgpt_client/models/get_metadata_response_404_data_code.py similarity index 81% rename from customgpt-client/customgpt_client/models/get_settings_response_500_data_code.py rename to customgpt-client/customgpt_client/models/get_metadata_response_404_data_code.py index 0d5ae7a..951a345 100644 --- a/customgpt-client/customgpt_client/models/get_settings_response_500_data_code.py +++ b/customgpt-client/customgpt_client/models/get_metadata_response_404_data_code.py @@ -1,7 +1,7 @@ from enum import IntEnum -class GetSettingsResponse500DataCode(IntEnum): +class GetMetadataResponse404DataCode(IntEnum): VALUE_400 = 400 VALUE_401 = 401 VALUE_403 = 403 diff --git a/customgpt-client/customgpt_client/models/get_page_metadata_response_404_data_message.py b/customgpt-client/customgpt_client/models/get_metadata_response_404_data_message.py similarity index 78% rename from customgpt-client/customgpt_client/models/get_page_metadata_response_404_data_message.py rename to customgpt-client/customgpt_client/models/get_metadata_response_404_data_message.py index f8bceb5..3635818 100644 --- a/customgpt-client/customgpt_client/models/get_page_metadata_response_404_data_message.py +++ b/customgpt-client/customgpt_client/models/get_metadata_response_404_data_message.py @@ -1,7 +1,7 @@ from enum import Enum -class GetPageMetadataResponse404DataMessage(str, Enum): +class GetMetadataResponse404DataMessage(str, Enum): PAGE_ID_IS_REQUIRED = "Page id is required" PAGE_WITH_ID_PAGEID_NOT_FOUND = "Page with id {pageId} not found" diff --git a/customgpt-client/customgpt_client/models/get_settings_response_404_status.py b/customgpt-client/customgpt_client/models/get_metadata_response_404_status.py similarity index 73% rename from customgpt-client/customgpt_client/models/get_settings_response_404_status.py rename to customgpt-client/customgpt_client/models/get_metadata_response_404_status.py index a051622..798b9fd 100644 --- a/customgpt-client/customgpt_client/models/get_settings_response_404_status.py +++ b/customgpt-client/customgpt_client/models/get_metadata_response_404_status.py @@ -1,7 +1,7 @@ from enum import Enum -class GetSettingsResponse404Status(str, Enum): +class GetMetadataResponse404Status(str, Enum): ERROR = "error" SUCCESS = "success" diff --git a/customgpt-client/customgpt_client/models/get_pages_response_200.py b/customgpt-client/customgpt_client/models/get_pages_response_200.py index 0eb7bd9..a3a10e8 100644 --- a/customgpt-client/customgpt_client/models/get_pages_response_200.py +++ b/customgpt-client/customgpt_client/models/get_pages_response_200.py @@ -19,7 +19,7 @@ class GetPagesResponse200: data (Union[Unset, GetPagesResponse200Data]): """ - status: Union[Unset, str] = "success" + status: Union[Unset, str] = UNSET data: Union[Unset, "GetPagesResponse200Data"] = UNSET additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) diff --git a/customgpt-client/customgpt_client/models/get_pages_response_200_data_pages.py b/customgpt-client/customgpt_client/models/get_pages_response_200_data_pages.py index b28ed5c..341502f 100644 --- a/customgpt-client/customgpt_client/models/get_pages_response_200_data_pages.py +++ b/customgpt-client/customgpt_client/models/get_pages_response_200_data_pages.py @@ -71,7 +71,7 @@ def to_dict(self) -> Dict[str, Any]: field_dict["current_page"] = current_page if data is not UNSET: for index, field_value in enumerate(data): - field_dict[f"data[]"] = field_value + field_dict[f"data[{index}]"] = field_value if first_page_url is not UNSET: field_dict["first_page_url"] = first_page_url if from_ is not UNSET: diff --git a/customgpt-client/customgpt_client/models/get_pages_response_200_data_pages_data_item.py b/customgpt-client/customgpt_client/models/get_pages_response_200_data_pages_data_item.py index fe42dbe..3b3fd2a 100644 --- a/customgpt-client/customgpt_client/models/get_pages_response_200_data_pages_data_item.py +++ b/customgpt-client/customgpt_client/models/get_pages_response_200_data_pages_data_item.py @@ -25,6 +25,7 @@ class GetPagesResponse200DataPagesDataItem: index_status (Union[Unset, GetPagesResponse200DataPagesDataItemIndexStatus]): Index status of the page Default: GetPagesResponse200DataPagesDataItemIndexStatus.QUEUED. Example: queued. is_file (Union[Unset, bool]): Whether the page is a file or not Example: True. + is_refreshable (Union[Unset, bool]): Whether the page can be refreshed or not Example: True. is_file_kept (Union[Unset, bool]): Whether the file is kept after processing or not.\nNote: This is omitted in the response if the page is not a file Default: True. Example: True. filename (Union[Unset, None, str]): Filename of the page.\nNote: This is omitted in the response if the page is @@ -35,8 +36,6 @@ class GetPagesResponse200DataPagesDataItem: 00:00:00. updated_at (Union[Unset, datetime.datetime]): Date and time when the page was updated Example: 2021-01-01 00:00:00. - deleted_at (Union[Unset, None, datetime.datetime]): Date and time when the page was deleted Example: 2021-01-01 - 00:00:00. """ id: Union[Unset, int] = UNSET @@ -44,15 +43,15 @@ class GetPagesResponse200DataPagesDataItem: page_url_hash: Union[Unset, str] = UNSET project_id: Union[Unset, int] = UNSET s3_path: Union[Unset, None, str] = UNSET - crawl_status: Union[Unset, str] = "queued" - index_status: Union[Unset, str] = "queued" + crawl_status: Union[Unset, str] = UNSET + index_status: Union[Unset, str] = UNSET is_file: Union[Unset, bool] = False + is_refreshable: Union[Unset, bool] = False is_file_kept: Union[Unset, bool] = True filename: Union[Unset, None, str] = UNSET filesize: Union[Unset, None, int] = UNSET created_at: Union[Unset, datetime.datetime] = UNSET updated_at: Union[Unset, datetime.datetime] = UNSET - deleted_at: Union[Unset, None, datetime.datetime] = UNSET additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) def to_dict(self) -> Dict[str, Any]: @@ -69,8 +68,12 @@ def to_dict(self) -> Dict[str, Any]: if not isinstance(self.index_status, Unset): index_status = self.index_status - is_file = self.is_file - is_file_kept = self.is_file_kept + is_file = True if self.is_file else False + + is_refreshable = True if self.is_refreshable else False + + is_file_kept = True if self.is_file_kept else False + filename = self.filename filesize = self.filesize created_at: Union[Unset, str] = UNSET @@ -81,10 +84,6 @@ def to_dict(self) -> Dict[str, Any]: if not isinstance(self.updated_at, Unset): updated_at = self.updated_at.isoformat() - deleted_at: Union[Unset, None, str] = UNSET - if not isinstance(self.deleted_at, Unset): - deleted_at = self.deleted_at.isoformat() if self.deleted_at else None - field_dict: Dict[str, Any] = {} field_dict.update(self.additional_properties) field_dict.update({}) @@ -104,6 +103,8 @@ def to_dict(self) -> Dict[str, Any]: field_dict["index_status"] = index_status if is_file is not UNSET: field_dict["is_file"] = is_file + if is_refreshable is not UNSET: + field_dict["is_refreshable"] = is_refreshable if is_file_kept is not UNSET: field_dict["is_file_kept"] = is_file_kept if filename is not UNSET: @@ -114,8 +115,6 @@ def to_dict(self) -> Dict[str, Any]: field_dict["created_at"] = created_at if updated_at is not UNSET: field_dict["updated_at"] = updated_at - if deleted_at is not UNSET: - field_dict["deleted_at"] = deleted_at return field_dict @@ -137,6 +136,8 @@ def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: is_file = src_dict.get("is_file") + is_refreshable = src_dict.get("is_refreshable") + is_file_kept = src_dict.get("is_file_kept") filename = src_dict.get("filename") @@ -157,15 +158,6 @@ def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: else: updated_at = isoparse(_updated_at) - _deleted_at = src_dict.get("deleted_at") - deleted_at: Union[Unset, None, datetime.datetime] - if _deleted_at is None: - deleted_at = None - elif isinstance(_deleted_at, Unset): - deleted_at = UNSET - else: - deleted_at = isoparse(_deleted_at) - get_pages_response_200_data_pages_data_item = cls( id=id, page_url=page_url, @@ -175,12 +167,12 @@ def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: crawl_status=crawl_status, index_status=index_status, is_file=is_file, + is_refreshable=is_refreshable, is_file_kept=is_file_kept, filename=filename, filesize=filesize, created_at=created_at, updated_at=updated_at, - deleted_at=deleted_at, ) get_pages_response_200_data_pages_data_item.additional_properties = src_dict diff --git a/customgpt-client/customgpt_client/models/get_pages_response_200_data_project.py b/customgpt-client/customgpt_client/models/get_pages_response_200_data_project.py index a8dde46..c36dbb3 100644 --- a/customgpt-client/customgpt_client/models/get_pages_response_200_data_project.py +++ b/customgpt-client/customgpt_client/models/get_pages_response_200_data_project.py @@ -18,12 +18,11 @@ class GetPagesResponse200DataProject: sitemap_path (Union[Unset, str]): Project sitemap Example: https://www.example.com/sitemap.xml. is_chat_active (Union[Unset, bool]): Whether the chat bot is active or not Example: True. user_id (Union[Unset, int]): User ID of the project owner Example: 1. + team_id (Union[Unset, int]): Team ID of the project owner Example: 1. created_at (Union[Unset, datetime.datetime]): Date and time when the project was created Default: isoparse('2023-05-08 13:06:55'). Example: 2021-01-01 00:00:00. updated_at (Union[Unset, datetime.datetime]): Date and time when the project was last updated Default: isoparse('2023-05-08 13:06:55'). Example: 2021-01-01 00:00:00. - deleted_at (Union[Unset, None, datetime.datetime]): Date and time when the project was deleted Example: - 2021-01-01 00:00:00. type (Union[Unset, GetPagesResponse200DataProjectType]): Project type Default: GetPagesResponse200DataProjectType.SITEMAP. Example: SITEMAP. is_shared (Union[Unset, bool]): Whether the project is shared or not Example: True. @@ -39,10 +38,10 @@ class GetPagesResponse200DataProject: sitemap_path: Union[Unset, str] = UNSET is_chat_active: Union[Unset, bool] = False user_id: Union[Unset, int] = UNSET + team_id: Union[Unset, int] = UNSET created_at: Union[Unset, datetime.datetime] = isoparse("2023-05-08 13:06:55") updated_at: Union[Unset, datetime.datetime] = isoparse("2023-05-08 13:06:55") - deleted_at: Union[Unset, None, datetime.datetime] = UNSET - type: Union[Unset, str] = "SITEMAP" + type: Union[Unset, str] = UNSET is_shared: Union[Unset, bool] = False shareable_slug: Union[Unset, None, str] = UNSET shareable_link: Union[Unset, None, str] = UNSET @@ -54,8 +53,10 @@ def to_dict(self) -> Dict[str, Any]: id = self.id project_name = self.project_name sitemap_path = self.sitemap_path - is_chat_active = self.is_chat_active + is_chat_active = True if self.is_chat_active else False + user_id = self.user_id + team_id = self.team_id created_at: Union[Unset, str] = UNSET if not isinstance(self.created_at, Unset): created_at = self.created_at.isoformat() @@ -64,15 +65,12 @@ def to_dict(self) -> Dict[str, Any]: if not isinstance(self.updated_at, Unset): updated_at = self.updated_at.isoformat() - deleted_at: Union[Unset, None, str] = UNSET - if not isinstance(self.deleted_at, Unset): - deleted_at = self.deleted_at.isoformat() if self.deleted_at else None - type: Union[Unset, str] = UNSET if not isinstance(self.type, Unset): type = self.type - is_shared = self.is_shared + is_shared = True if self.is_shared else False + shareable_slug = self.shareable_slug shareable_link = self.shareable_link embed_code = self.embed_code @@ -91,12 +89,12 @@ def to_dict(self) -> Dict[str, Any]: field_dict["is_chat_active"] = is_chat_active if user_id is not UNSET: field_dict["user_id"] = user_id + if team_id is not UNSET: + field_dict["team_id"] = team_id if created_at is not UNSET: field_dict["created_at"] = created_at if updated_at is not UNSET: field_dict["updated_at"] = updated_at - if deleted_at is not UNSET: - field_dict["deleted_at"] = deleted_at if type is not UNSET: field_dict["type"] = type if is_shared is not UNSET: @@ -124,6 +122,8 @@ def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: user_id = src_dict.get("user_id") + team_id = src_dict.get("team_id") + _created_at = src_dict.get("created_at") created_at: Union[Unset, datetime.datetime] if isinstance(_created_at, Unset): @@ -138,15 +138,6 @@ def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: else: updated_at = isoparse(_updated_at) - _deleted_at = src_dict.get("deleted_at") - deleted_at: Union[Unset, None, datetime.datetime] - if _deleted_at is None: - deleted_at = None - elif isinstance(_deleted_at, Unset): - deleted_at = UNSET - else: - deleted_at = isoparse(_deleted_at) - type = src_dict.get("type") is_shared = src_dict.get("is_shared") @@ -165,9 +156,9 @@ def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: sitemap_path=sitemap_path, is_chat_active=is_chat_active, user_id=user_id, + team_id=team_id, created_at=created_at, updated_at=updated_at, - deleted_at=deleted_at, type=type, is_shared=is_shared, shareable_slug=shareable_slug, diff --git a/customgpt-client/customgpt_client/models/get_pages_response_400.py b/customgpt-client/customgpt_client/models/get_pages_response_400.py index 3a45cbc..210ac23 100644 --- a/customgpt-client/customgpt_client/models/get_pages_response_400.py +++ b/customgpt-client/customgpt_client/models/get_pages_response_400.py @@ -20,7 +20,7 @@ class GetPagesResponse400: data (Union[Unset, GetPagesResponse400Data]): """ - status: Union[Unset, str] = "error" + status: Union[Unset, str] = UNSET url: Union[Unset, str] = UNSET data: Union[Unset, "GetPagesResponse400Data"] = UNSET additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) diff --git a/customgpt-client/customgpt_client/models/get_pages_response_400_data.py b/customgpt-client/customgpt_client/models/get_pages_response_400_data.py index 76f840f..4b0f536 100644 --- a/customgpt-client/customgpt_client/models/get_pages_response_400_data.py +++ b/customgpt-client/customgpt_client/models/get_pages_response_400_data.py @@ -15,7 +15,7 @@ class GetPagesResponse400Data: message (Union[Unset, str]): The error message Example: Project id must be integer. """ - code: Union[Unset, str] = "400" + code: Union[Unset, str] = UNSET message: Union[Unset, str] = UNSET additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) diff --git a/customgpt-client/customgpt_client/models/get_pages_response_401.py b/customgpt-client/customgpt_client/models/get_pages_response_401.py index 78188ad..c36e117 100644 --- a/customgpt-client/customgpt_client/models/get_pages_response_401.py +++ b/customgpt-client/customgpt_client/models/get_pages_response_401.py @@ -20,7 +20,7 @@ class GetPagesResponse401: data (Union[Unset, GetPagesResponse401Data]): """ - status: Union[Unset, str] = "error" + status: Union[Unset, str] = UNSET url: Union[Unset, str] = UNSET data: Union[Unset, "GetPagesResponse401Data"] = UNSET additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) diff --git a/customgpt-client/customgpt_client/models/get_pages_response_401_data.py b/customgpt-client/customgpt_client/models/get_pages_response_401_data.py index f248f0b..08ef75f 100644 --- a/customgpt-client/customgpt_client/models/get_pages_response_401_data.py +++ b/customgpt-client/customgpt_client/models/get_pages_response_401_data.py @@ -15,7 +15,7 @@ class GetPagesResponse401Data: message (Union[Unset, str]): Example: API Token is either missing or invalid. """ - code: Union[Unset, str] = "401" + code: Union[Unset, str] = UNSET message: Union[Unset, str] = UNSET additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) diff --git a/customgpt-client/customgpt_client/models/get_pages_response_404.py b/customgpt-client/customgpt_client/models/get_pages_response_404.py index 4666a65..44e28e5 100644 --- a/customgpt-client/customgpt_client/models/get_pages_response_404.py +++ b/customgpt-client/customgpt_client/models/get_pages_response_404.py @@ -20,7 +20,7 @@ class GetPagesResponse404: data (Union[Unset, GetPagesResponse404Data]): """ - status: Union[Unset, str] = "error" + status: Union[Unset, str] = UNSET url: Union[Unset, str] = UNSET data: Union[Unset, "GetPagesResponse404Data"] = UNSET additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) diff --git a/customgpt-client/customgpt_client/models/get_pages_response_404_data.py b/customgpt-client/customgpt_client/models/get_pages_response_404_data.py index 6aecf3f..deae3d7 100644 --- a/customgpt-client/customgpt_client/models/get_pages_response_404_data.py +++ b/customgpt-client/customgpt_client/models/get_pages_response_404_data.py @@ -15,8 +15,8 @@ class GetPagesResponse404Data: message (Union[Unset, GetPagesResponse404DataMessage]): The error message Example: Project with id 1 not found. """ - code: Union[Unset, str] = "404" - message: Union[Unset, str] = "Project with id 1 not found" + code: Union[Unset, str] = UNSET + message: Union[Unset, str] = UNSET additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) def to_dict(self) -> Dict[str, Any]: diff --git a/customgpt-client/customgpt_client/models/get_pages_response_500.py b/customgpt-client/customgpt_client/models/get_pages_response_500.py index b8cb1c6..a65e424 100644 --- a/customgpt-client/customgpt_client/models/get_pages_response_500.py +++ b/customgpt-client/customgpt_client/models/get_pages_response_500.py @@ -20,7 +20,7 @@ class GetPagesResponse500: data (Union[Unset, GetPagesResponse500Data]): """ - status: Union[Unset, str] = "error" + status: Union[Unset, str] = UNSET url: Union[Unset, str] = UNSET data: Union[Unset, "GetPagesResponse500Data"] = UNSET additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) diff --git a/customgpt-client/customgpt_client/models/get_pages_response_500_data.py b/customgpt-client/customgpt_client/models/get_pages_response_500_data.py index 031ce2f..d64ab5b 100644 --- a/customgpt-client/customgpt_client/models/get_pages_response_500_data.py +++ b/customgpt-client/customgpt_client/models/get_pages_response_500_data.py @@ -15,7 +15,7 @@ class GetPagesResponse500Data: message (Union[Unset, str]): Example: Internal Server Error. """ - code: Union[Unset, str] = "500" + code: Union[Unset, str] = UNSET message: Union[Unset, str] = UNSET additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) diff --git a/customgpt-client/customgpt_client/models/get_plugin_response_200.py b/customgpt-client/customgpt_client/models/get_plugin_response_200.py index 501bad9..b8f44ab 100644 --- a/customgpt-client/customgpt_client/models/get_plugin_response_200.py +++ b/customgpt-client/customgpt_client/models/get_plugin_response_200.py @@ -19,7 +19,7 @@ class GetPluginResponse200: data (Union[Unset, GetPluginResponse200Data]): """ - status: Union[Unset, str] = "success" + status: Union[Unset, str] = UNSET data: Union[Unset, "GetPluginResponse200Data"] = UNSET additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) diff --git a/customgpt-client/customgpt_client/models/get_plugin_response_200_data.py b/customgpt-client/customgpt_client/models/get_plugin_response_200_data.py index 28e1d87..f42902d 100644 --- a/customgpt-client/customgpt_client/models/get_plugin_response_200_data.py +++ b/customgpt-client/customgpt_client/models/get_plugin_response_200_data.py @@ -34,7 +34,7 @@ def to_dict(self) -> Dict[str, Any]: keywords = self.keywords description = self.description logo = self.logo - is_active = self.is_active + is_active = True if self.is_active else False field_dict: Dict[str, Any] = {} field_dict.update(self.additional_properties) diff --git a/customgpt-client/customgpt_client/models/get_plugin_response_400.py b/customgpt-client/customgpt_client/models/get_plugin_response_400.py index df387c4..210ffa5 100644 --- a/customgpt-client/customgpt_client/models/get_plugin_response_400.py +++ b/customgpt-client/customgpt_client/models/get_plugin_response_400.py @@ -20,7 +20,7 @@ class GetPluginResponse400: data (Union[Unset, GetPluginResponse400Data]): """ - status: Union[Unset, str] = "error" + status: Union[Unset, str] = UNSET url: Union[Unset, str] = UNSET data: Union[Unset, "GetPluginResponse400Data"] = UNSET additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) diff --git a/customgpt-client/customgpt_client/models/get_plugin_response_400_data.py b/customgpt-client/customgpt_client/models/get_plugin_response_400_data.py index bdd3a1c..c4392ec 100644 --- a/customgpt-client/customgpt_client/models/get_plugin_response_400_data.py +++ b/customgpt-client/customgpt_client/models/get_plugin_response_400_data.py @@ -15,7 +15,7 @@ class GetPluginResponse400Data: message (Union[Unset, str]): The error message Example: Project id must be integer. """ - code: Union[Unset, str] = "400" + code: Union[Unset, str] = UNSET message: Union[Unset, str] = UNSET additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) diff --git a/customgpt-client/customgpt_client/models/get_plugin_response_401.py b/customgpt-client/customgpt_client/models/get_plugin_response_401.py index 42371ec..9198c4e 100644 --- a/customgpt-client/customgpt_client/models/get_plugin_response_401.py +++ b/customgpt-client/customgpt_client/models/get_plugin_response_401.py @@ -20,7 +20,7 @@ class GetPluginResponse401: data (Union[Unset, GetPluginResponse401Data]): """ - status: Union[Unset, str] = "error" + status: Union[Unset, str] = UNSET url: Union[Unset, str] = UNSET data: Union[Unset, "GetPluginResponse401Data"] = UNSET additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) diff --git a/customgpt-client/customgpt_client/models/get_plugin_response_401_data.py b/customgpt-client/customgpt_client/models/get_plugin_response_401_data.py index b43e095..aa91a08 100644 --- a/customgpt-client/customgpt_client/models/get_plugin_response_401_data.py +++ b/customgpt-client/customgpt_client/models/get_plugin_response_401_data.py @@ -15,7 +15,7 @@ class GetPluginResponse401Data: message (Union[Unset, str]): Example: API Token is either missing or invalid. """ - code: Union[Unset, str] = "401" + code: Union[Unset, str] = UNSET message: Union[Unset, str] = UNSET additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) diff --git a/customgpt-client/customgpt_client/models/get_plugin_response_404.py b/customgpt-client/customgpt_client/models/get_plugin_response_404.py index 14da170..f3828e2 100644 --- a/customgpt-client/customgpt_client/models/get_plugin_response_404.py +++ b/customgpt-client/customgpt_client/models/get_plugin_response_404.py @@ -20,7 +20,7 @@ class GetPluginResponse404: data (Union[Unset, GetPluginResponse404Data]): """ - status: Union[Unset, str] = "error" + status: Union[Unset, str] = UNSET url: Union[Unset, str] = UNSET data: Union[Unset, "GetPluginResponse404Data"] = UNSET additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) diff --git a/customgpt-client/customgpt_client/models/get_plugin_response_404_data.py b/customgpt-client/customgpt_client/models/get_plugin_response_404_data.py index e481d84..6520277 100644 --- a/customgpt-client/customgpt_client/models/get_plugin_response_404_data.py +++ b/customgpt-client/customgpt_client/models/get_plugin_response_404_data.py @@ -16,8 +16,8 @@ class GetPluginResponse404Data: found. """ - code: Union[Unset, str] = "404" - message: Union[Unset, str] = "Project plugin with id 1 not found" + code: Union[Unset, str] = UNSET + message: Union[Unset, str] = UNSET additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) def to_dict(self) -> Dict[str, Any]: diff --git a/customgpt-client/customgpt_client/models/get_plugin_response_500.py b/customgpt-client/customgpt_client/models/get_plugin_response_500.py index 8a77bc8..55ea964 100644 --- a/customgpt-client/customgpt_client/models/get_plugin_response_500.py +++ b/customgpt-client/customgpt_client/models/get_plugin_response_500.py @@ -20,7 +20,7 @@ class GetPluginResponse500: data (Union[Unset, GetPluginResponse500Data]): """ - status: Union[Unset, str] = "error" + status: Union[Unset, str] = UNSET url: Union[Unset, str] = UNSET data: Union[Unset, "GetPluginResponse500Data"] = UNSET additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) diff --git a/customgpt-client/customgpt_client/models/get_plugin_response_500_data.py b/customgpt-client/customgpt_client/models/get_plugin_response_500_data.py index d6be879..0e53983 100644 --- a/customgpt-client/customgpt_client/models/get_plugin_response_500_data.py +++ b/customgpt-client/customgpt_client/models/get_plugin_response_500_data.py @@ -15,7 +15,7 @@ class GetPluginResponse500Data: message (Union[Unset, str]): Example: Internal Server Error. """ - code: Union[Unset, str] = "500" + code: Union[Unset, str] = UNSET message: Union[Unset, str] = UNSET additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) diff --git a/customgpt-client/customgpt_client/models/get_project_response_200.py b/customgpt-client/customgpt_client/models/get_project_response_200.py index 68959d0..a334652 100644 --- a/customgpt-client/customgpt_client/models/get_project_response_200.py +++ b/customgpt-client/customgpt_client/models/get_project_response_200.py @@ -19,7 +19,7 @@ class GetProjectResponse200: data (Union[Unset, GetProjectResponse200Data]): """ - status: Union[Unset, str] = "success" + status: Union[Unset, str] = UNSET data: Union[Unset, "GetProjectResponse200Data"] = UNSET additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) diff --git a/customgpt-client/customgpt_client/models/get_project_response_200_data.py b/customgpt-client/customgpt_client/models/get_project_response_200_data.py index 118f8fe..c3b2d08 100644 --- a/customgpt-client/customgpt_client/models/get_project_response_200_data.py +++ b/customgpt-client/customgpt_client/models/get_project_response_200_data.py @@ -18,12 +18,11 @@ class GetProjectResponse200Data: sitemap_path (Union[Unset, str]): Project sitemap Example: https://www.example.com/sitemap.xml. is_chat_active (Union[Unset, bool]): Whether the chat bot is active or not Example: True. user_id (Union[Unset, int]): User ID of the project owner Example: 1. + team_id (Union[Unset, int]): Team ID of the project owner Example: 1. created_at (Union[Unset, datetime.datetime]): Date and time when the project was created Default: isoparse('2023-05-08 13:06:55'). Example: 2021-01-01 00:00:00. updated_at (Union[Unset, datetime.datetime]): Date and time when the project was last updated Default: isoparse('2023-05-08 13:06:55'). Example: 2021-01-01 00:00:00. - deleted_at (Union[Unset, None, datetime.datetime]): Date and time when the project was deleted Example: - 2021-01-01 00:00:00. type (Union[Unset, GetProjectResponse200DataType]): Project type Default: GetProjectResponse200DataType.SITEMAP. Example: SITEMAP. is_shared (Union[Unset, bool]): Whether the project is shared or not Example: True. @@ -39,10 +38,10 @@ class GetProjectResponse200Data: sitemap_path: Union[Unset, str] = UNSET is_chat_active: Union[Unset, bool] = False user_id: Union[Unset, int] = UNSET + team_id: Union[Unset, int] = UNSET created_at: Union[Unset, datetime.datetime] = isoparse("2023-05-08 13:06:55") updated_at: Union[Unset, datetime.datetime] = isoparse("2023-05-08 13:06:55") - deleted_at: Union[Unset, None, datetime.datetime] = UNSET - type: Union[Unset, str] = "SITEMAP" + type: Union[Unset, str] = UNSET is_shared: Union[Unset, bool] = False shareable_slug: Union[Unset, None, str] = UNSET shareable_link: Union[Unset, None, str] = UNSET @@ -54,8 +53,10 @@ def to_dict(self) -> Dict[str, Any]: id = self.id project_name = self.project_name sitemap_path = self.sitemap_path - is_chat_active = self.is_chat_active + is_chat_active = True if self.is_chat_active else False + user_id = self.user_id + team_id = self.team_id created_at: Union[Unset, str] = UNSET if not isinstance(self.created_at, Unset): created_at = self.created_at.isoformat() @@ -64,15 +65,12 @@ def to_dict(self) -> Dict[str, Any]: if not isinstance(self.updated_at, Unset): updated_at = self.updated_at.isoformat() - deleted_at: Union[Unset, None, str] = UNSET - if not isinstance(self.deleted_at, Unset): - deleted_at = self.deleted_at.isoformat() if self.deleted_at else None - type: Union[Unset, str] = UNSET if not isinstance(self.type, Unset): type = self.type - is_shared = self.is_shared + is_shared = True if self.is_shared else False + shareable_slug = self.shareable_slug shareable_link = self.shareable_link embed_code = self.embed_code @@ -91,12 +89,12 @@ def to_dict(self) -> Dict[str, Any]: field_dict["is_chat_active"] = is_chat_active if user_id is not UNSET: field_dict["user_id"] = user_id + if team_id is not UNSET: + field_dict["team_id"] = team_id if created_at is not UNSET: field_dict["created_at"] = created_at if updated_at is not UNSET: field_dict["updated_at"] = updated_at - if deleted_at is not UNSET: - field_dict["deleted_at"] = deleted_at if type is not UNSET: field_dict["type"] = type if is_shared is not UNSET: @@ -124,6 +122,8 @@ def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: user_id = src_dict.get("user_id") + team_id = src_dict.get("team_id") + _created_at = src_dict.get("created_at") created_at: Union[Unset, datetime.datetime] if isinstance(_created_at, Unset): @@ -138,15 +138,6 @@ def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: else: updated_at = isoparse(_updated_at) - _deleted_at = src_dict.get("deleted_at") - deleted_at: Union[Unset, None, datetime.datetime] - if _deleted_at is None: - deleted_at = None - elif isinstance(_deleted_at, Unset): - deleted_at = UNSET - else: - deleted_at = isoparse(_deleted_at) - type = src_dict.get("type") is_shared = src_dict.get("is_shared") @@ -165,9 +156,9 @@ def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: sitemap_path=sitemap_path, is_chat_active=is_chat_active, user_id=user_id, + team_id=team_id, created_at=created_at, updated_at=updated_at, - deleted_at=deleted_at, type=type, is_shared=is_shared, shareable_slug=shareable_slug, diff --git a/customgpt-client/customgpt_client/models/get_project_response_400.py b/customgpt-client/customgpt_client/models/get_project_response_400.py index c3a8925..88b7533 100644 --- a/customgpt-client/customgpt_client/models/get_project_response_400.py +++ b/customgpt-client/customgpt_client/models/get_project_response_400.py @@ -20,7 +20,7 @@ class GetProjectResponse400: data (Union[Unset, GetProjectResponse400Data]): """ - status: Union[Unset, str] = "error" + status: Union[Unset, str] = UNSET url: Union[Unset, str] = UNSET data: Union[Unset, "GetProjectResponse400Data"] = UNSET additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) diff --git a/customgpt-client/customgpt_client/models/get_project_response_400_data.py b/customgpt-client/customgpt_client/models/get_project_response_400_data.py index ed58e2d..8c14e70 100644 --- a/customgpt-client/customgpt_client/models/get_project_response_400_data.py +++ b/customgpt-client/customgpt_client/models/get_project_response_400_data.py @@ -15,7 +15,7 @@ class GetProjectResponse400Data: message (Union[Unset, str]): The error message Example: Project id must be integer. """ - code: Union[Unset, str] = "400" + code: Union[Unset, str] = UNSET message: Union[Unset, str] = UNSET additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) diff --git a/customgpt-client/customgpt_client/models/get_project_response_401.py b/customgpt-client/customgpt_client/models/get_project_response_401.py index c6982ef..eb272a1 100644 --- a/customgpt-client/customgpt_client/models/get_project_response_401.py +++ b/customgpt-client/customgpt_client/models/get_project_response_401.py @@ -20,7 +20,7 @@ class GetProjectResponse401: data (Union[Unset, GetProjectResponse401Data]): """ - status: Union[Unset, str] = "error" + status: Union[Unset, str] = UNSET url: Union[Unset, str] = UNSET data: Union[Unset, "GetProjectResponse401Data"] = UNSET additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) diff --git a/customgpt-client/customgpt_client/models/get_project_response_401_data.py b/customgpt-client/customgpt_client/models/get_project_response_401_data.py index 4db997c..96c90f7 100644 --- a/customgpt-client/customgpt_client/models/get_project_response_401_data.py +++ b/customgpt-client/customgpt_client/models/get_project_response_401_data.py @@ -15,7 +15,7 @@ class GetProjectResponse401Data: message (Union[Unset, str]): Example: API Token is either missing or invalid. """ - code: Union[Unset, str] = "401" + code: Union[Unset, str] = UNSET message: Union[Unset, str] = UNSET additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) diff --git a/customgpt-client/customgpt_client/models/get_project_response_404.py b/customgpt-client/customgpt_client/models/get_project_response_404.py index a952bc9..8848d74 100644 --- a/customgpt-client/customgpt_client/models/get_project_response_404.py +++ b/customgpt-client/customgpt_client/models/get_project_response_404.py @@ -20,7 +20,7 @@ class GetProjectResponse404: data (Union[Unset, GetProjectResponse404Data]): """ - status: Union[Unset, str] = "error" + status: Union[Unset, str] = UNSET url: Union[Unset, str] = UNSET data: Union[Unset, "GetProjectResponse404Data"] = UNSET additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) diff --git a/customgpt-client/customgpt_client/models/get_project_response_404_data.py b/customgpt-client/customgpt_client/models/get_project_response_404_data.py index fd736c6..7ad600d 100644 --- a/customgpt-client/customgpt_client/models/get_project_response_404_data.py +++ b/customgpt-client/customgpt_client/models/get_project_response_404_data.py @@ -16,8 +16,8 @@ class GetProjectResponse404Data: found. """ - code: Union[Unset, str] = "404" - message: Union[Unset, str] = "Project with id 1 not found" + code: Union[Unset, str] = UNSET + message: Union[Unset, str] = UNSET additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) def to_dict(self) -> Dict[str, Any]: diff --git a/customgpt-client/customgpt_client/models/get_project_response_500.py b/customgpt-client/customgpt_client/models/get_project_response_500.py index e418922..b24d15b 100644 --- a/customgpt-client/customgpt_client/models/get_project_response_500.py +++ b/customgpt-client/customgpt_client/models/get_project_response_500.py @@ -20,7 +20,7 @@ class GetProjectResponse500: data (Union[Unset, GetProjectResponse500Data]): """ - status: Union[Unset, str] = "error" + status: Union[Unset, str] = UNSET url: Union[Unset, str] = UNSET data: Union[Unset, "GetProjectResponse500Data"] = UNSET additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) diff --git a/customgpt-client/customgpt_client/models/get_project_response_500_data.py b/customgpt-client/customgpt_client/models/get_project_response_500_data.py index db7a07e..2af1163 100644 --- a/customgpt-client/customgpt_client/models/get_project_response_500_data.py +++ b/customgpt-client/customgpt_client/models/get_project_response_500_data.py @@ -15,7 +15,7 @@ class GetProjectResponse500Data: message (Union[Unset, str]): Example: Internal Server Error. """ - code: Union[Unset, str] = "500" + code: Union[Unset, str] = UNSET message: Union[Unset, str] = UNSET additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) diff --git a/customgpt-client/customgpt_client/models/update_page_metadata_response_200.py b/customgpt-client/customgpt_client/models/get_project_settings_response_200.py similarity index 68% rename from customgpt-client/customgpt_client/models/update_page_metadata_response_200.py rename to customgpt-client/customgpt_client/models/get_project_settings_response_200.py index 60ede61..737603a 100644 --- a/customgpt-client/customgpt_client/models/update_page_metadata_response_200.py +++ b/customgpt-client/customgpt_client/models/get_project_settings_response_200.py @@ -5,22 +5,22 @@ from ..types import UNSET, Unset if TYPE_CHECKING: - from ..models.update_page_metadata_response_200_data import UpdatePageMetadataResponse200Data + from ..models.get_project_settings_response_200_data import GetProjectSettingsResponse200Data -T = TypeVar("T", bound="UpdatePageMetadataResponse200") +T = TypeVar("T", bound="GetProjectSettingsResponse200") @attr.s(auto_attribs=True) -class UpdatePageMetadataResponse200: +class GetProjectSettingsResponse200: """ Attributes: - status (Union[Unset, UpdatePageMetadataResponse200Status]): The status of the response Example: success. - data (Union[Unset, UpdatePageMetadataResponse200Data]): + status (Union[Unset, GetProjectSettingsResponse200Status]): The status of the response Example: success. + data (Union[Unset, GetProjectSettingsResponse200Data]): """ - status: Union[Unset, str] = "success" - data: Union[Unset, "UpdatePageMetadataResponse200Data"] = UNSET + status: Union[Unset, str] = UNSET + data: Union[Unset, "GetProjectSettingsResponse200Data"] = UNSET additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) def to_dict(self) -> Dict[str, Any]: @@ -44,24 +44,24 @@ def to_dict(self) -> Dict[str, Any]: @classmethod def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: - from ..models.update_page_metadata_response_200_data import UpdatePageMetadataResponse200Data + from ..models.get_project_settings_response_200_data import GetProjectSettingsResponse200Data status = src_dict.get("status") _data = src_dict.get("data") - data: Union[Unset, UpdatePageMetadataResponse200Data] + data: Union[Unset, GetProjectSettingsResponse200Data] if isinstance(_data, Unset): data = UNSET else: - data = UpdatePageMetadataResponse200Data.from_dict(_data) + data = GetProjectSettingsResponse200Data.from_dict(_data) - update_page_metadata_response_200 = cls( + get_project_settings_response_200 = cls( status=status, data=data, ) - update_page_metadata_response_200.additional_properties = src_dict - return update_page_metadata_response_200 + get_project_settings_response_200.additional_properties = src_dict + return get_project_settings_response_200 @property def additional_keys(self) -> List[str]: diff --git a/customgpt-client/customgpt_client/models/get_settings_response_200_data.py b/customgpt-client/customgpt_client/models/get_project_settings_response_200_data.py similarity index 55% rename from customgpt-client/customgpt_client/models/get_settings_response_200_data.py rename to customgpt-client/customgpt_client/models/get_project_settings_response_200_data.py index d69e415..dfe21a8 100644 --- a/customgpt-client/customgpt_client/models/get_settings_response_200_data.py +++ b/customgpt-client/customgpt_client/models/get_project_settings_response_200_data.py @@ -1,36 +1,36 @@ -from io import BytesIO from typing import Any, Dict, List, Type, TypeVar, Union, cast import attr -from ..types import UNSET, File, FileJsonType, Unset +from ..types import UNSET, Unset -T = TypeVar("T", bound="GetSettingsResponse200Data") +T = TypeVar("T", bound="GetProjectSettingsResponse200Data") @attr.s(auto_attribs=True) -class GetSettingsResponse200Data: +class GetProjectSettingsResponse200Data: """ Attributes: - chat_bot_avatar (Union[Unset, File]): This is the avatar that is shown in the bot response. You can make it a - profile picture or your company logo. Example: avatar.png. - chat_bot_bg (Union[Unset, File]): This is the background image shown in the bot conversations widget. You can - change it to a company logo or background image. Example: bg.png. + chatbot_avatar (Union[Unset, str]): This is the avatar that is shown in the bot response. You can make it a + profile picture or your company logo. Example: https://example.com/chatbot_avatar.png. + chatbot_background (Union[Unset, str]): This is the background image shown in the bot conversations widget. You + can change it to a company logo or background image. Example: https://example.com/chatbot_background.png. default_prompt (Union[Unset, str]): This is the default prompt shown to the user. You can customize this for your company or client. Example: How can I help you?. example_questions (Union[Unset, List[str]]): These are example questions shown to guide the bot users. You can - create customized questions to suit your company or client needs. - response_source (Union[Unset, str]): By default, we ask ChatGPT to use only your content in its response - (recommended). If you wish ChatGPT to improvise and use its own knowledgebase as well, you can select "My - Content + ChatGPT" Example: own_content. + create customized questions to suit your company or client needs. Example: ['How do I get started?']. + response_source (Union[Unset, GetProjectSettingsResponse200DataResponseSource]): By default, we ask ChatGPT to + use only your content in its response (recommended). If you wish ChatGPT to improvise and use its own + knowledgebase as well, you can select "My Content + ChatGPT" Example: own_content. chatbot_msg_lang (Union[Unset, str]): By default, the chatbot messages like 'Ask Me Anything' are in English. You can customize this to your preferred language. Please note: This setting does not control what language ChatGPT responds in. That is controlled by the user's question. So a user asking in Portuguese, will most likely get a response from ChatGPT in Portuguese. Example: en. chatbot_color (Union[Unset, str]): Color of the chatbot in hex format Example: #000000. - persona_instructions (Union[Unset, None, str]): [Advanced Users] Customize your chatbot behavior by adjusting - the system parameter to control its personality traits and role. Example: You are a custom chatbot assistant - called CustomGPT, a friendly lawyer who answers questions based on the given context.. + chatbot_toolbar_color (Union[Unset, str]): Color of the chatbot toolbar in hex format Example: #000000. + persona_instructions (Union[Unset, None, str]): Customize your chatbot behavior by adjusting the system + parameter to control its personality traits and role. Example: You are a custom chatbot assistant called + CustomGPT.ai, a friendly lawyer who answers questions based on the given context.. citations_answer_source_label_msg (Union[Unset, None, str]): This is the message shown to indicate where the response came from. You can customize this message based on your business or language. Example: Where did this answer come from?. @@ -44,90 +44,126 @@ class GetSettingsResponse200Data: bot is taking a siesta. This usually happens when OpenAI is down! Please try again later.. is_loading_indicator_enabled (Union[Unset, None, bool]): Show animated loading indicator while waiting for a response from the chatbot Default: True. Example: True. - enable_citations (Union[Unset, None, bool]): Each chatbot response shows an option for the user to see the - sources/citations from your content from which the response was generated. Default: True. Example: True. - citations_view_type (Union[Unset, None, GetSettingsResponse200DataCitationsViewType]): Control how citations are - shown. By default, the user can initiate to see the citations. You can choose to have it "Auto Shown" or "Auto - Hide" Default: GetSettingsResponse200DataCitationsViewType.USER. Example: user. + enable_citations (Union[Unset, None, GetProjectSettingsResponse200DataEnableCitations]): Each chatbot response + shows an option for the user to see the sources/citations from your content from which the response was + generated. Default: GetProjectSettingsResponse200DataEnableCitations.VALUE_3. Example: 3. + enable_feedbacks (Union[Unset, None, bool]): Each chatbot response shows an thumbs up/down for the user to left + own feedback. Default: True. Example: True. + citations_view_type (Union[Unset, None, GetProjectSettingsResponse200DataCitationsViewType]): Control how + citations are shown. By default, the user can initiate to see the citations. You can choose to have it "Auto + Shown" or "Auto Hide" Default: GetProjectSettingsResponse200DataCitationsViewType.USER. Example: user. no_answer_message (Union[Unset, None, str]): This is the message shown when the bot cannot answer. You can - customize it to a message asking the user to contact customer support or leave their email / phone. Example: - Sorry, I don't have an answer for that.. + customize it to a message asking the user to contact customer support or leave their email / phone. Default: + "I'm sorry, I don't know the answer". Example: Sorry, I don't have an answer for that.. ending_message (Union[Unset, None, str]): You can instruct ChatGPT to end every response with some text like asking "Please email us for further support" (Not recommended for most use cases) Example: Please email us for further support. remove_branding (Union[Unset, None, bool]): Controls what branding is shown at the bottom of the chatbot. + enable_recaptcha_for_public_chatbots (Union[Unset, None, bool]): Should we check messages from guests with + Recaptcha when your chatbot is publicly available (i.e. shared or embedded). + chatbot_model (Union[Unset, None, GetProjectSettingsResponse200DataChatbotModel]): This is the model used by the + chatbot. You can choose a different model to suit your needs. Default: + GetProjectSettingsResponse200DataChatbotModel.GPT_4. Example: gpt-4. + is_selling_enabled (Union[Unset, None, bool]): Enable selling of chatbot for monetization + license_slug (Union[Unset, None, bool]): License slug used for monetization + selling_url (Union[Unset, None, str]): Selling URL used for monetization """ - chat_bot_avatar: Union[Unset, File] = UNSET - chat_bot_bg: Union[Unset, File] = UNSET + chatbot_avatar: Union[Unset, str] = UNSET + chatbot_background: Union[Unset, str] = UNSET default_prompt: Union[Unset, str] = UNSET example_questions: Union[Unset, List[str]] = UNSET response_source: Union[Unset, str] = UNSET chatbot_msg_lang: Union[Unset, str] = UNSET chatbot_color: Union[Unset, str] = UNSET + chatbot_toolbar_color: Union[Unset, str] = UNSET persona_instructions: Union[Unset, None, str] = UNSET citations_answer_source_label_msg: Union[Unset, None, str] = UNSET citations_sources_label_msg: Union[Unset, None, str] = UNSET hang_in_there_msg: Union[Unset, None, str] = UNSET chatbot_siesta_msg: Union[Unset, None, str] = UNSET is_loading_indicator_enabled: Union[Unset, None, bool] = True - enable_citations: Union[Unset, None, bool] = True - citations_view_type: Union[Unset, str] = "user" - no_answer_message: Union[Unset, None, str] = UNSET + enable_citations: Union[Unset, str] = UNSET + enable_feedbacks: Union[Unset, None, bool] = True + citations_view_type: Union[Unset, str] = UNSET + no_answer_message: Union[Unset, None, str] = "I'm sorry, I don't know the answer" ending_message: Union[Unset, None, str] = UNSET remove_branding: Union[Unset, None, bool] = False + enable_recaptcha_for_public_chatbots: Union[Unset, None, bool] = False + chatbot_model: Union[Unset, str] = UNSET + is_selling_enabled: Union[Unset, None, bool] = False + license_slug: Union[Unset, None, bool] = UNSET + selling_url: Union[Unset, None, str] = UNSET additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) def to_dict(self) -> Dict[str, Any]: - chat_bot_avatar: Union[Unset, FileJsonType] = UNSET - if not isinstance(self.chat_bot_avatar, Unset): - chat_bot_avatar = self.chat_bot_avatar.to_tuple() - - chat_bot_bg: Union[Unset, FileJsonType] = UNSET - if not isinstance(self.chat_bot_bg, Unset): - chat_bot_bg = self.chat_bot_bg.to_tuple() - + chatbot_avatar = self.chatbot_avatar + chatbot_background = self.chatbot_background default_prompt = self.default_prompt example_questions: Union[Unset, List[str]] = UNSET if not isinstance(self.example_questions, Unset): example_questions = self.example_questions - response_source = self.response_source + response_source: Union[Unset, str] = UNSET + if not isinstance(self.response_source, Unset): + response_source = self.response_source + chatbot_msg_lang = self.chatbot_msg_lang chatbot_color = self.chatbot_color + chatbot_toolbar_color = self.chatbot_toolbar_color persona_instructions = self.persona_instructions citations_answer_source_label_msg = self.citations_answer_source_label_msg citations_sources_label_msg = self.citations_sources_label_msg hang_in_there_msg = self.hang_in_there_msg chatbot_siesta_msg = self.chatbot_siesta_msg - is_loading_indicator_enabled = self.is_loading_indicator_enabled - enable_citations = self.enable_citations + is_loading_indicator_enabled = True if self.is_loading_indicator_enabled else False + + enable_citations: Union[Unset, None, int] = UNSET + if not isinstance(self.enable_citations, Unset): + enable_citations = self.enable_citations if self.enable_citations else None + + enable_feedbacks = True if self.enable_feedbacks else False + citations_view_type: Union[Unset, None, str] = UNSET if not isinstance(self.citations_view_type, Unset): citations_view_type = self.citations_view_type if self.citations_view_type else None no_answer_message = self.no_answer_message ending_message = self.ending_message - remove_branding = self.remove_branding + remove_branding = True if self.remove_branding else False + + enable_recaptcha_for_public_chatbots = True if self.enable_recaptcha_for_public_chatbots else False + + chatbot_model: Union[Unset, None, str] = UNSET + if not isinstance(self.chatbot_model, Unset): + chatbot_model = self.chatbot_model if self.chatbot_model else None + + is_selling_enabled = True if self.is_selling_enabled else False + + license_slug = True if self.license_slug else False + + selling_url = self.selling_url field_dict: Dict[str, Any] = {} field_dict.update(self.additional_properties) field_dict.update({}) - if chat_bot_avatar is not UNSET: - field_dict["chat_bot_avatar"] = chat_bot_avatar - if chat_bot_bg is not UNSET: - field_dict["chat_bot_bg"] = chat_bot_bg + if chatbot_avatar is not UNSET: + field_dict["chatbot_avatar"] = chatbot_avatar + if chatbot_background is not UNSET: + field_dict["chatbot_background"] = chatbot_background if default_prompt is not UNSET: field_dict["default_prompt"] = default_prompt if example_questions is not UNSET: for index, field_value in enumerate(example_questions): - field_dict[f"example_questions[]"] = field_value + field_dict[f"example_questions[{index}]"] = field_value if response_source is not UNSET: field_dict["response_source"] = response_source if chatbot_msg_lang is not UNSET: field_dict["chatbot_msg_lang"] = chatbot_msg_lang if chatbot_color is not UNSET: field_dict["chatbot_color"] = chatbot_color + if chatbot_toolbar_color is not UNSET: + field_dict["chatbot_toolbar_color"] = chatbot_toolbar_color if persona_instructions is not UNSET: field_dict["persona_instructions"] = persona_instructions if citations_answer_source_label_msg is not UNSET: @@ -142,6 +178,8 @@ def to_dict(self) -> Dict[str, Any]: field_dict["is_loading_indicator_enabled"] = is_loading_indicator_enabled if enable_citations is not UNSET: field_dict["enable_citations"] = enable_citations + if enable_feedbacks is not UNSET: + field_dict["enable_feedbacks"] = enable_feedbacks if citations_view_type is not UNSET: field_dict["citations_view_type"] = citations_view_type if no_answer_message is not UNSET: @@ -150,24 +188,24 @@ def to_dict(self) -> Dict[str, Any]: field_dict["ending_message"] = ending_message if remove_branding is not UNSET: field_dict["remove_branding"] = remove_branding + if enable_recaptcha_for_public_chatbots is not UNSET: + field_dict["enable_recaptcha_for_public_chatbots"] = enable_recaptcha_for_public_chatbots + if chatbot_model is not UNSET: + field_dict["chatbot_model"] = chatbot_model + if is_selling_enabled is not UNSET: + field_dict["is_selling_enabled"] = is_selling_enabled + if license_slug is not UNSET: + field_dict["license_slug"] = license_slug + if selling_url is not UNSET: + field_dict["selling_url"] = selling_url return field_dict @classmethod def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: - _chat_bot_avatar = src_dict.get("chat_bot_avatar") - chat_bot_avatar: Union[Unset, File] - if isinstance(_chat_bot_avatar, Unset): - chat_bot_avatar = UNSET - else: - chat_bot_avatar = File(payload=BytesIO(_chat_bot_avatar)) - - _chat_bot_bg = src_dict.get("chat_bot_bg") - chat_bot_bg: Union[Unset, File] - if isinstance(_chat_bot_bg, Unset): - chat_bot_bg = UNSET - else: - chat_bot_bg = File(payload=BytesIO(_chat_bot_bg)) + chatbot_avatar = src_dict.get("chatbot_avatar") + + chatbot_background = src_dict.get("chatbot_background") default_prompt = src_dict.get("default_prompt") @@ -179,6 +217,8 @@ def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: chatbot_color = src_dict.get("chatbot_color") + chatbot_toolbar_color = src_dict.get("chatbot_toolbar_color") + persona_instructions = src_dict.get("persona_instructions") citations_answer_source_label_msg = src_dict.get("citations_answer_source_label_msg") @@ -193,6 +233,8 @@ def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: enable_citations = src_dict.get("enable_citations") + enable_feedbacks = src_dict.get("enable_feedbacks") + citations_view_type = src_dict.get("citations_view_type") no_answer_message = src_dict.get("no_answer_message") @@ -201,14 +243,25 @@ def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: remove_branding = src_dict.get("remove_branding") - get_settings_response_200_data = cls( - chat_bot_avatar=chat_bot_avatar, - chat_bot_bg=chat_bot_bg, + enable_recaptcha_for_public_chatbots = src_dict.get("enable_recaptcha_for_public_chatbots") + + chatbot_model = src_dict.get("chatbot_model") + + is_selling_enabled = src_dict.get("is_selling_enabled") + + license_slug = src_dict.get("license_slug") + + selling_url = src_dict.get("selling_url") + + get_project_settings_response_200_data = cls( + chatbot_avatar=chatbot_avatar, + chatbot_background=chatbot_background, default_prompt=default_prompt, example_questions=example_questions, response_source=response_source, chatbot_msg_lang=chatbot_msg_lang, chatbot_color=chatbot_color, + chatbot_toolbar_color=chatbot_toolbar_color, persona_instructions=persona_instructions, citations_answer_source_label_msg=citations_answer_source_label_msg, citations_sources_label_msg=citations_sources_label_msg, @@ -216,14 +269,20 @@ def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: chatbot_siesta_msg=chatbot_siesta_msg, is_loading_indicator_enabled=is_loading_indicator_enabled, enable_citations=enable_citations, + enable_feedbacks=enable_feedbacks, citations_view_type=citations_view_type, no_answer_message=no_answer_message, ending_message=ending_message, remove_branding=remove_branding, + enable_recaptcha_for_public_chatbots=enable_recaptcha_for_public_chatbots, + chatbot_model=chatbot_model, + is_selling_enabled=is_selling_enabled, + license_slug=license_slug, + selling_url=selling_url, ) - get_settings_response_200_data.additional_properties = src_dict - return get_settings_response_200_data + get_project_settings_response_200_data.additional_properties = src_dict + return get_project_settings_response_200_data @property def additional_keys(self) -> List[str]: diff --git a/customgpt-client/customgpt_client/models/get_project_settings_response_200_data_chatbot_model.py b/customgpt-client/customgpt_client/models/get_project_settings_response_200_data_chatbot_model.py new file mode 100644 index 0000000..77d61fa --- /dev/null +++ b/customgpt-client/customgpt_client/models/get_project_settings_response_200_data_chatbot_model.py @@ -0,0 +1,11 @@ +from enum import Enum + + +class GetProjectSettingsResponse200DataChatbotModel(str, Enum): + GPT_3_5_TURBO = "gpt-3.5-turbo" + GPT_4 = "gpt-4" + GPT_4_O = "gpt-4-o" + GPT_4_TURBO = "gpt-4-turbo" + + def __str__(self) -> str: + return str(self.value) diff --git a/customgpt-client/customgpt_client/models/get_settings_response_200_data_citations_view_type.py b/customgpt-client/customgpt_client/models/get_project_settings_response_200_data_citations_view_type.py similarity index 66% rename from customgpt-client/customgpt_client/models/get_settings_response_200_data_citations_view_type.py rename to customgpt-client/customgpt_client/models/get_project_settings_response_200_data_citations_view_type.py index 8ed8334..fc490a5 100644 --- a/customgpt-client/customgpt_client/models/get_settings_response_200_data_citations_view_type.py +++ b/customgpt-client/customgpt_client/models/get_project_settings_response_200_data_citations_view_type.py @@ -1,7 +1,7 @@ from enum import Enum -class GetSettingsResponse200DataCitationsViewType(str, Enum): +class GetProjectSettingsResponse200DataCitationsViewType(str, Enum): HIDE = "hide" SHOW = "show" USER = "user" diff --git a/customgpt-client/customgpt_client/models/get_project_settings_response_200_data_enable_citations.py b/customgpt-client/customgpt_client/models/get_project_settings_response_200_data_enable_citations.py new file mode 100644 index 0000000..be73fd9 --- /dev/null +++ b/customgpt-client/customgpt_client/models/get_project_settings_response_200_data_enable_citations.py @@ -0,0 +1,11 @@ +from enum import IntEnum + + +class GetProjectSettingsResponse200DataEnableCitations(IntEnum): + VALUE_0 = 0 + VALUE_1 = 1 + VALUE_2 = 2 + VALUE_3 = 3 + + def __str__(self) -> str: + return str(self.value) diff --git a/customgpt-client/customgpt_client/models/get_project_settings_response_200_data_response_source.py b/customgpt-client/customgpt_client/models/get_project_settings_response_200_data_response_source.py new file mode 100644 index 0000000..77c32a5 --- /dev/null +++ b/customgpt-client/customgpt_client/models/get_project_settings_response_200_data_response_source.py @@ -0,0 +1,10 @@ +from enum import Enum + + +class GetProjectSettingsResponse200DataResponseSource(str, Enum): + DEFAULT = "default" + OPENAI_CONTENT = "openai_content" + OWN_CONTENT = "own_content" + + def __str__(self) -> str: + return str(self.value) diff --git a/customgpt-client/customgpt_client/models/get_project_settings_response_200_status.py b/customgpt-client/customgpt_client/models/get_project_settings_response_200_status.py new file mode 100644 index 0000000..d7e5cc1 --- /dev/null +++ b/customgpt-client/customgpt_client/models/get_project_settings_response_200_status.py @@ -0,0 +1,9 @@ +from enum import Enum + + +class GetProjectSettingsResponse200Status(str, Enum): + ERROR = "error" + SUCCESS = "success" + + def __str__(self) -> str: + return str(self.value) diff --git a/customgpt-client/customgpt_client/models/update_page_metadata_response_400.py b/customgpt-client/customgpt_client/models/get_project_settings_response_400.py similarity index 71% rename from customgpt-client/customgpt_client/models/update_page_metadata_response_400.py rename to customgpt-client/customgpt_client/models/get_project_settings_response_400.py index b2d0886..13f730e 100644 --- a/customgpt-client/customgpt_client/models/update_page_metadata_response_400.py +++ b/customgpt-client/customgpt_client/models/get_project_settings_response_400.py @@ -5,24 +5,24 @@ from ..types import UNSET, Unset if TYPE_CHECKING: - from ..models.update_page_metadata_response_400_data import UpdatePageMetadataResponse400Data + from ..models.get_project_settings_response_400_data import GetProjectSettingsResponse400Data -T = TypeVar("T", bound="UpdatePageMetadataResponse400") +T = TypeVar("T", bound="GetProjectSettingsResponse400") @attr.s(auto_attribs=True) -class UpdatePageMetadataResponse400: +class GetProjectSettingsResponse400: """ Attributes: - status (Union[Unset, UpdatePageMetadataResponse400Status]): The status of the response Example: error. + status (Union[Unset, GetProjectSettingsResponse400Status]): The status of the response Example: error. url (Union[Unset, str]): The URL of the request Example: https://app.customgpt.ai/api/v1/projects/1. - data (Union[Unset, UpdatePageMetadataResponse400Data]): + data (Union[Unset, GetProjectSettingsResponse400Data]): """ - status: Union[Unset, str] = "error" + status: Union[Unset, str] = UNSET url: Union[Unset, str] = UNSET - data: Union[Unset, "UpdatePageMetadataResponse400Data"] = UNSET + data: Union[Unset, "GetProjectSettingsResponse400Data"] = UNSET additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) def to_dict(self) -> Dict[str, Any]: @@ -49,27 +49,27 @@ def to_dict(self) -> Dict[str, Any]: @classmethod def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: - from ..models.update_page_metadata_response_400_data import UpdatePageMetadataResponse400Data + from ..models.get_project_settings_response_400_data import GetProjectSettingsResponse400Data status = src_dict.get("status") url = src_dict.get("url") _data = src_dict.get("data") - data: Union[Unset, UpdatePageMetadataResponse400Data] + data: Union[Unset, GetProjectSettingsResponse400Data] if isinstance(_data, Unset): data = UNSET else: - data = UpdatePageMetadataResponse400Data.from_dict(_data) + data = GetProjectSettingsResponse400Data.from_dict(_data) - update_page_metadata_response_400 = cls( + get_project_settings_response_400 = cls( status=status, url=url, data=data, ) - update_page_metadata_response_400.additional_properties = src_dict - return update_page_metadata_response_400 + get_project_settings_response_400.additional_properties = src_dict + return get_project_settings_response_400 @property def additional_keys(self) -> List[str]: diff --git a/customgpt-client/customgpt_client/models/update_page_metadata_response_400_data.py b/customgpt-client/customgpt_client/models/get_project_settings_response_400_data.py similarity index 81% rename from customgpt-client/customgpt_client/models/update_page_metadata_response_400_data.py rename to customgpt-client/customgpt_client/models/get_project_settings_response_400_data.py index 117249e..77a4ae4 100644 --- a/customgpt-client/customgpt_client/models/update_page_metadata_response_400_data.py +++ b/customgpt-client/customgpt_client/models/get_project_settings_response_400_data.py @@ -4,18 +4,18 @@ from ..types import UNSET, Unset -T = TypeVar("T", bound="UpdatePageMetadataResponse400Data") +T = TypeVar("T", bound="GetProjectSettingsResponse400Data") @attr.s(auto_attribs=True) -class UpdatePageMetadataResponse400Data: +class GetProjectSettingsResponse400Data: """ Attributes: - code (Union[Unset, UpdatePageMetadataResponse400DataCode]): The error status code Example: 400. + code (Union[Unset, GetProjectSettingsResponse400DataCode]): The error status code Example: 400. message (Union[Unset, str]): The error message Example: Project id must be integer. """ - code: Union[Unset, str] = "400" + code: Union[Unset, str] = UNSET message: Union[Unset, str] = UNSET additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) @@ -42,13 +42,13 @@ def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: message = src_dict.get("message") - update_page_metadata_response_400_data = cls( + get_project_settings_response_400_data = cls( code=code, message=message, ) - update_page_metadata_response_400_data.additional_properties = src_dict - return update_page_metadata_response_400_data + get_project_settings_response_400_data.additional_properties = src_dict + return get_project_settings_response_400_data @property def additional_keys(self) -> List[str]: diff --git a/customgpt-client/customgpt_client/models/get_project_settings_response_400_data_code.py b/customgpt-client/customgpt_client/models/get_project_settings_response_400_data_code.py new file mode 100644 index 0000000..cdd29b9 --- /dev/null +++ b/customgpt-client/customgpt_client/models/get_project_settings_response_400_data_code.py @@ -0,0 +1,13 @@ +from enum import IntEnum + + +class GetProjectSettingsResponse400DataCode(IntEnum): + VALUE_400 = 400 + VALUE_401 = 401 + VALUE_403 = 403 + VALUE_404 = 404 + VALUE_500 = 500 + VALUE_503 = 503 + + def __str__(self) -> str: + return str(self.value) diff --git a/customgpt-client/customgpt_client/models/get_project_settings_response_400_status.py b/customgpt-client/customgpt_client/models/get_project_settings_response_400_status.py new file mode 100644 index 0000000..18d8d34 --- /dev/null +++ b/customgpt-client/customgpt_client/models/get_project_settings_response_400_status.py @@ -0,0 +1,9 @@ +from enum import Enum + + +class GetProjectSettingsResponse400Status(str, Enum): + ERROR = "error" + SUCCESS = "success" + + def __str__(self) -> str: + return str(self.value) diff --git a/customgpt-client/customgpt_client/models/update_page_metadata_response_401.py b/customgpt-client/customgpt_client/models/get_project_settings_response_401.py similarity index 71% rename from customgpt-client/customgpt_client/models/update_page_metadata_response_401.py rename to customgpt-client/customgpt_client/models/get_project_settings_response_401.py index 5603101..f81f1d8 100644 --- a/customgpt-client/customgpt_client/models/update_page_metadata_response_401.py +++ b/customgpt-client/customgpt_client/models/get_project_settings_response_401.py @@ -5,24 +5,24 @@ from ..types import UNSET, Unset if TYPE_CHECKING: - from ..models.update_page_metadata_response_401_data import UpdatePageMetadataResponse401Data + from ..models.get_project_settings_response_401_data import GetProjectSettingsResponse401Data -T = TypeVar("T", bound="UpdatePageMetadataResponse401") +T = TypeVar("T", bound="GetProjectSettingsResponse401") @attr.s(auto_attribs=True) -class UpdatePageMetadataResponse401: +class GetProjectSettingsResponse401: """ Attributes: - status (Union[Unset, UpdatePageMetadataResponse401Status]): The status of the response Example: error. + status (Union[Unset, GetProjectSettingsResponse401Status]): The status of the response Example: error. url (Union[Unset, str]): The URL of the request Example: https://app.customgpt.ai/api/v1/projects/1. - data (Union[Unset, UpdatePageMetadataResponse401Data]): + data (Union[Unset, GetProjectSettingsResponse401Data]): """ - status: Union[Unset, str] = "error" + status: Union[Unset, str] = UNSET url: Union[Unset, str] = UNSET - data: Union[Unset, "UpdatePageMetadataResponse401Data"] = UNSET + data: Union[Unset, "GetProjectSettingsResponse401Data"] = UNSET additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) def to_dict(self) -> Dict[str, Any]: @@ -49,27 +49,27 @@ def to_dict(self) -> Dict[str, Any]: @classmethod def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: - from ..models.update_page_metadata_response_401_data import UpdatePageMetadataResponse401Data + from ..models.get_project_settings_response_401_data import GetProjectSettingsResponse401Data status = src_dict.get("status") url = src_dict.get("url") _data = src_dict.get("data") - data: Union[Unset, UpdatePageMetadataResponse401Data] + data: Union[Unset, GetProjectSettingsResponse401Data] if isinstance(_data, Unset): data = UNSET else: - data = UpdatePageMetadataResponse401Data.from_dict(_data) + data = GetProjectSettingsResponse401Data.from_dict(_data) - update_page_metadata_response_401 = cls( + get_project_settings_response_401 = cls( status=status, url=url, data=data, ) - update_page_metadata_response_401.additional_properties = src_dict - return update_page_metadata_response_401 + get_project_settings_response_401.additional_properties = src_dict + return get_project_settings_response_401 @property def additional_keys(self) -> List[str]: diff --git a/customgpt-client/customgpt_client/models/update_page_metadata_response_401_data.py b/customgpt-client/customgpt_client/models/get_project_settings_response_401_data.py similarity index 81% rename from customgpt-client/customgpt_client/models/update_page_metadata_response_401_data.py rename to customgpt-client/customgpt_client/models/get_project_settings_response_401_data.py index 95e2bfb..226e4ff 100644 --- a/customgpt-client/customgpt_client/models/update_page_metadata_response_401_data.py +++ b/customgpt-client/customgpt_client/models/get_project_settings_response_401_data.py @@ -4,18 +4,18 @@ from ..types import UNSET, Unset -T = TypeVar("T", bound="UpdatePageMetadataResponse401Data") +T = TypeVar("T", bound="GetProjectSettingsResponse401Data") @attr.s(auto_attribs=True) -class UpdatePageMetadataResponse401Data: +class GetProjectSettingsResponse401Data: """ Attributes: - code (Union[Unset, UpdatePageMetadataResponse401DataCode]): The error status code Example: 401. + code (Union[Unset, GetProjectSettingsResponse401DataCode]): The error status code Example: 401. message (Union[Unset, str]): Example: API Token is either missing or invalid. """ - code: Union[Unset, str] = "401" + code: Union[Unset, str] = UNSET message: Union[Unset, str] = UNSET additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) @@ -42,13 +42,13 @@ def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: message = src_dict.get("message") - update_page_metadata_response_401_data = cls( + get_project_settings_response_401_data = cls( code=code, message=message, ) - update_page_metadata_response_401_data.additional_properties = src_dict - return update_page_metadata_response_401_data + get_project_settings_response_401_data.additional_properties = src_dict + return get_project_settings_response_401_data @property def additional_keys(self) -> List[str]: diff --git a/customgpt-client/customgpt_client/models/get_project_settings_response_401_data_code.py b/customgpt-client/customgpt_client/models/get_project_settings_response_401_data_code.py new file mode 100644 index 0000000..ff2fabc --- /dev/null +++ b/customgpt-client/customgpt_client/models/get_project_settings_response_401_data_code.py @@ -0,0 +1,13 @@ +from enum import IntEnum + + +class GetProjectSettingsResponse401DataCode(IntEnum): + VALUE_400 = 400 + VALUE_401 = 401 + VALUE_403 = 403 + VALUE_404 = 404 + VALUE_500 = 500 + VALUE_503 = 503 + + def __str__(self) -> str: + return str(self.value) diff --git a/customgpt-client/customgpt_client/models/get_project_settings_response_401_status.py b/customgpt-client/customgpt_client/models/get_project_settings_response_401_status.py new file mode 100644 index 0000000..a29575e --- /dev/null +++ b/customgpt-client/customgpt_client/models/get_project_settings_response_401_status.py @@ -0,0 +1,9 @@ +from enum import Enum + + +class GetProjectSettingsResponse401Status(str, Enum): + ERROR = "error" + SUCCESS = "success" + + def __str__(self) -> str: + return str(self.value) diff --git a/customgpt-client/customgpt_client/models/update_page_metadata_response_404.py b/customgpt-client/customgpt_client/models/get_project_settings_response_404.py similarity index 71% rename from customgpt-client/customgpt_client/models/update_page_metadata_response_404.py rename to customgpt-client/customgpt_client/models/get_project_settings_response_404.py index 7adcde9..57822f8 100644 --- a/customgpt-client/customgpt_client/models/update_page_metadata_response_404.py +++ b/customgpt-client/customgpt_client/models/get_project_settings_response_404.py @@ -5,24 +5,24 @@ from ..types import UNSET, Unset if TYPE_CHECKING: - from ..models.update_page_metadata_response_404_data import UpdatePageMetadataResponse404Data + from ..models.get_project_settings_response_404_data import GetProjectSettingsResponse404Data -T = TypeVar("T", bound="UpdatePageMetadataResponse404") +T = TypeVar("T", bound="GetProjectSettingsResponse404") @attr.s(auto_attribs=True) -class UpdatePageMetadataResponse404: +class GetProjectSettingsResponse404: """ Attributes: - status (Union[Unset, UpdatePageMetadataResponse404Status]): The status of the response Example: error. + status (Union[Unset, GetProjectSettingsResponse404Status]): The status of the response Example: error. url (Union[Unset, str]): The URL of the request Example: https://app.customgpt.ai/api/v1/projects/1. - data (Union[Unset, UpdatePageMetadataResponse404Data]): + data (Union[Unset, GetProjectSettingsResponse404Data]): """ - status: Union[Unset, str] = "error" + status: Union[Unset, str] = UNSET url: Union[Unset, str] = UNSET - data: Union[Unset, "UpdatePageMetadataResponse404Data"] = UNSET + data: Union[Unset, "GetProjectSettingsResponse404Data"] = UNSET additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) def to_dict(self) -> Dict[str, Any]: @@ -49,27 +49,27 @@ def to_dict(self) -> Dict[str, Any]: @classmethod def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: - from ..models.update_page_metadata_response_404_data import UpdatePageMetadataResponse404Data + from ..models.get_project_settings_response_404_data import GetProjectSettingsResponse404Data status = src_dict.get("status") url = src_dict.get("url") _data = src_dict.get("data") - data: Union[Unset, UpdatePageMetadataResponse404Data] + data: Union[Unset, GetProjectSettingsResponse404Data] if isinstance(_data, Unset): data = UNSET else: - data = UpdatePageMetadataResponse404Data.from_dict(_data) + data = GetProjectSettingsResponse404Data.from_dict(_data) - update_page_metadata_response_404 = cls( + get_project_settings_response_404 = cls( status=status, url=url, data=data, ) - update_page_metadata_response_404.additional_properties = src_dict - return update_page_metadata_response_404 + get_project_settings_response_404.additional_properties = src_dict + return get_project_settings_response_404 @property def additional_keys(self) -> List[str]: diff --git a/customgpt-client/customgpt_client/models/update_page_metadata_response_404_data.py b/customgpt-client/customgpt_client/models/get_project_settings_response_404_data.py similarity index 73% rename from customgpt-client/customgpt_client/models/update_page_metadata_response_404_data.py rename to customgpt-client/customgpt_client/models/get_project_settings_response_404_data.py index c2b085a..1d006c8 100644 --- a/customgpt-client/customgpt_client/models/update_page_metadata_response_404_data.py +++ b/customgpt-client/customgpt_client/models/get_project_settings_response_404_data.py @@ -4,20 +4,20 @@ from ..types import UNSET, Unset -T = TypeVar("T", bound="UpdatePageMetadataResponse404Data") +T = TypeVar("T", bound="GetProjectSettingsResponse404Data") @attr.s(auto_attribs=True) -class UpdatePageMetadataResponse404Data: +class GetProjectSettingsResponse404Data: """ Attributes: - code (Union[Unset, UpdatePageMetadataResponse404DataCode]): The error status code Example: 404. - message (Union[Unset, UpdatePageMetadataResponse404DataMessage]): The error message Example: Page with id 1 not - found. + code (Union[Unset, GetProjectSettingsResponse404DataCode]): The error status code Example: 404. + message (Union[Unset, GetProjectSettingsResponse404DataMessage]): The error message Example: Project with id 1 + not found. """ - code: Union[Unset, str] = "404" - message: Union[Unset, str] = "Page with id 1 not found" + code: Union[Unset, str] = UNSET + message: Union[Unset, str] = UNSET additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) def to_dict(self) -> Dict[str, Any]: @@ -45,13 +45,13 @@ def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: message = src_dict.get("message") - update_page_metadata_response_404_data = cls( + get_project_settings_response_404_data = cls( code=code, message=message, ) - update_page_metadata_response_404_data.additional_properties = src_dict - return update_page_metadata_response_404_data + get_project_settings_response_404_data.additional_properties = src_dict + return get_project_settings_response_404_data @property def additional_keys(self) -> List[str]: diff --git a/customgpt-client/customgpt_client/models/get_project_settings_response_404_data_code.py b/customgpt-client/customgpt_client/models/get_project_settings_response_404_data_code.py new file mode 100644 index 0000000..3a52423 --- /dev/null +++ b/customgpt-client/customgpt_client/models/get_project_settings_response_404_data_code.py @@ -0,0 +1,13 @@ +from enum import IntEnum + + +class GetProjectSettingsResponse404DataCode(IntEnum): + VALUE_400 = 400 + VALUE_401 = 401 + VALUE_403 = 403 + VALUE_404 = 404 + VALUE_500 = 500 + VALUE_503 = 503 + + def __str__(self) -> str: + return str(self.value) diff --git a/customgpt-client/customgpt_client/models/get_project_settings_response_404_data_message.py b/customgpt-client/customgpt_client/models/get_project_settings_response_404_data_message.py new file mode 100644 index 0000000..2c51c87 --- /dev/null +++ b/customgpt-client/customgpt_client/models/get_project_settings_response_404_data_message.py @@ -0,0 +1,9 @@ +from enum import Enum + + +class GetProjectSettingsResponse404DataMessage(str, Enum): + PROJECT_ID_IS_REQUIRED = "Project id is required" + PROJECT_WITH_ID_PROJECTID_NOT_FOUND = "Project with id {projectId} not found" + + def __str__(self) -> str: + return str(self.value) diff --git a/customgpt-client/customgpt_client/models/get_project_settings_response_404_status.py b/customgpt-client/customgpt_client/models/get_project_settings_response_404_status.py new file mode 100644 index 0000000..08a9052 --- /dev/null +++ b/customgpt-client/customgpt_client/models/get_project_settings_response_404_status.py @@ -0,0 +1,9 @@ +from enum import Enum + + +class GetProjectSettingsResponse404Status(str, Enum): + ERROR = "error" + SUCCESS = "success" + + def __str__(self) -> str: + return str(self.value) diff --git a/customgpt-client/customgpt_client/models/update_page_metadata_response_500.py b/customgpt-client/customgpt_client/models/get_project_settings_response_500.py similarity index 71% rename from customgpt-client/customgpt_client/models/update_page_metadata_response_500.py rename to customgpt-client/customgpt_client/models/get_project_settings_response_500.py index 775bbb0..7c35d09 100644 --- a/customgpt-client/customgpt_client/models/update_page_metadata_response_500.py +++ b/customgpt-client/customgpt_client/models/get_project_settings_response_500.py @@ -5,24 +5,24 @@ from ..types import UNSET, Unset if TYPE_CHECKING: - from ..models.update_page_metadata_response_500_data import UpdatePageMetadataResponse500Data + from ..models.get_project_settings_response_500_data import GetProjectSettingsResponse500Data -T = TypeVar("T", bound="UpdatePageMetadataResponse500") +T = TypeVar("T", bound="GetProjectSettingsResponse500") @attr.s(auto_attribs=True) -class UpdatePageMetadataResponse500: +class GetProjectSettingsResponse500: """ Attributes: - status (Union[Unset, UpdatePageMetadataResponse500Status]): The status of the response Example: error. + status (Union[Unset, GetProjectSettingsResponse500Status]): The status of the response Example: error. url (Union[Unset, str]): The URL of the request Example: https://app.customgpt.ai/api/v1/projects/1. - data (Union[Unset, UpdatePageMetadataResponse500Data]): + data (Union[Unset, GetProjectSettingsResponse500Data]): """ - status: Union[Unset, str] = "error" + status: Union[Unset, str] = UNSET url: Union[Unset, str] = UNSET - data: Union[Unset, "UpdatePageMetadataResponse500Data"] = UNSET + data: Union[Unset, "GetProjectSettingsResponse500Data"] = UNSET additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) def to_dict(self) -> Dict[str, Any]: @@ -49,27 +49,27 @@ def to_dict(self) -> Dict[str, Any]: @classmethod def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: - from ..models.update_page_metadata_response_500_data import UpdatePageMetadataResponse500Data + from ..models.get_project_settings_response_500_data import GetProjectSettingsResponse500Data status = src_dict.get("status") url = src_dict.get("url") _data = src_dict.get("data") - data: Union[Unset, UpdatePageMetadataResponse500Data] + data: Union[Unset, GetProjectSettingsResponse500Data] if isinstance(_data, Unset): data = UNSET else: - data = UpdatePageMetadataResponse500Data.from_dict(_data) + data = GetProjectSettingsResponse500Data.from_dict(_data) - update_page_metadata_response_500 = cls( + get_project_settings_response_500 = cls( status=status, url=url, data=data, ) - update_page_metadata_response_500.additional_properties = src_dict - return update_page_metadata_response_500 + get_project_settings_response_500.additional_properties = src_dict + return get_project_settings_response_500 @property def additional_keys(self) -> List[str]: diff --git a/customgpt-client/customgpt_client/models/update_page_metadata_response_500_data.py b/customgpt-client/customgpt_client/models/get_project_settings_response_500_data.py similarity index 81% rename from customgpt-client/customgpt_client/models/update_page_metadata_response_500_data.py rename to customgpt-client/customgpt_client/models/get_project_settings_response_500_data.py index 5df223c..bea8cab 100644 --- a/customgpt-client/customgpt_client/models/update_page_metadata_response_500_data.py +++ b/customgpt-client/customgpt_client/models/get_project_settings_response_500_data.py @@ -4,18 +4,18 @@ from ..types import UNSET, Unset -T = TypeVar("T", bound="UpdatePageMetadataResponse500Data") +T = TypeVar("T", bound="GetProjectSettingsResponse500Data") @attr.s(auto_attribs=True) -class UpdatePageMetadataResponse500Data: +class GetProjectSettingsResponse500Data: """ Attributes: - code (Union[Unset, UpdatePageMetadataResponse500DataCode]): The error status code Example: 500. + code (Union[Unset, GetProjectSettingsResponse500DataCode]): The error status code Example: 500. message (Union[Unset, str]): Example: Internal Server Error. """ - code: Union[Unset, str] = "500" + code: Union[Unset, str] = UNSET message: Union[Unset, str] = UNSET additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) @@ -42,13 +42,13 @@ def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: message = src_dict.get("message") - update_page_metadata_response_500_data = cls( + get_project_settings_response_500_data = cls( code=code, message=message, ) - update_page_metadata_response_500_data.additional_properties = src_dict - return update_page_metadata_response_500_data + get_project_settings_response_500_data.additional_properties = src_dict + return get_project_settings_response_500_data @property def additional_keys(self) -> List[str]: diff --git a/customgpt-client/customgpt_client/models/get_project_settings_response_500_data_code.py b/customgpt-client/customgpt_client/models/get_project_settings_response_500_data_code.py new file mode 100644 index 0000000..bd5e498 --- /dev/null +++ b/customgpt-client/customgpt_client/models/get_project_settings_response_500_data_code.py @@ -0,0 +1,13 @@ +from enum import IntEnum + + +class GetProjectSettingsResponse500DataCode(IntEnum): + VALUE_400 = 400 + VALUE_401 = 401 + VALUE_403 = 403 + VALUE_404 = 404 + VALUE_500 = 500 + VALUE_503 = 503 + + def __str__(self) -> str: + return str(self.value) diff --git a/customgpt-client/customgpt_client/models/get_project_settings_response_500_status.py b/customgpt-client/customgpt_client/models/get_project_settings_response_500_status.py new file mode 100644 index 0000000..5e69444 --- /dev/null +++ b/customgpt-client/customgpt_client/models/get_project_settings_response_500_status.py @@ -0,0 +1,9 @@ +from enum import Enum + + +class GetProjectSettingsResponse500Status(str, Enum): + ERROR = "error" + SUCCESS = "success" + + def __str__(self) -> str: + return str(self.value) diff --git a/customgpt-client/customgpt_client/models/get_settings_response_500_status.py b/customgpt-client/customgpt_client/models/get_settings_response_500_status.py deleted file mode 100644 index 4d1573f..0000000 --- a/customgpt-client/customgpt_client/models/get_settings_response_500_status.py +++ /dev/null @@ -1,9 +0,0 @@ -from enum import Enum - - -class GetSettingsResponse500Status(str, Enum): - ERROR = "error" - SUCCESS = "success" - - def __str__(self) -> str: - return str(self.value) diff --git a/customgpt-client/customgpt_client/models/get_user_response_200.py b/customgpt-client/customgpt_client/models/get_user_response_200.py index dc1eb8a..5427bea 100644 --- a/customgpt-client/customgpt_client/models/get_user_response_200.py +++ b/customgpt-client/customgpt_client/models/get_user_response_200.py @@ -19,7 +19,7 @@ class GetUserResponse200: data (Union[Unset, GetUserResponse200Data]): """ - status: Union[Unset, str] = "success" + status: Union[Unset, str] = UNSET data: Union[Unset, "GetUserResponse200Data"] = UNSET additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) diff --git a/customgpt-client/customgpt_client/models/get_user_response_200_data.py b/customgpt-client/customgpt_client/models/get_user_response_200_data.py index ac283bf..14f2df1 100644 --- a/customgpt-client/customgpt_client/models/get_user_response_200_data.py +++ b/customgpt-client/customgpt_client/models/get_user_response_200_data.py @@ -16,6 +16,7 @@ class GetUserResponse200Data: created_at (Union[Unset, datetime.datetime]): When was this user created? Example: 2023-04-30 16:43:53. email (Union[Unset, str]): User email Example: user@domain.com. id (Union[Unset, int]): User ID Example: 1. + current_team_id (Union[Unset, int]): User currently active team ID Example: 1. name (Union[Unset, str]): User name Example: John Doe. profile_photo_url (Union[Unset, str]): User profile photo URL Example: https://app.customgpt.ai/user/1/profile_photo_url. @@ -25,6 +26,7 @@ class GetUserResponse200Data: created_at: Union[Unset, datetime.datetime] = UNSET email: Union[Unset, str] = UNSET id: Union[Unset, int] = UNSET + current_team_id: Union[Unset, int] = UNSET name: Union[Unset, str] = UNSET profile_photo_url: Union[Unset, str] = UNSET updated_at: Union[Unset, datetime.datetime] = UNSET @@ -37,6 +39,7 @@ def to_dict(self) -> Dict[str, Any]: email = self.email id = self.id + current_team_id = self.current_team_id name = self.name profile_photo_url = self.profile_photo_url updated_at: Union[Unset, str] = UNSET @@ -52,6 +55,8 @@ def to_dict(self) -> Dict[str, Any]: field_dict["email"] = email if id is not UNSET: field_dict["id"] = id + if current_team_id is not UNSET: + field_dict["current_team_id"] = current_team_id if name is not UNSET: field_dict["name"] = name if profile_photo_url is not UNSET: @@ -74,6 +79,8 @@ def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: id = src_dict.get("id") + current_team_id = src_dict.get("current_team_id") + name = src_dict.get("name") profile_photo_url = src_dict.get("profile_photo_url") @@ -89,6 +96,7 @@ def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: created_at=created_at, email=email, id=id, + current_team_id=current_team_id, name=name, profile_photo_url=profile_photo_url, updated_at=updated_at, diff --git a/customgpt-client/customgpt_client/models/get_user_response_401.py b/customgpt-client/customgpt_client/models/get_user_response_401.py index 155c99c..8dfe3fe 100644 --- a/customgpt-client/customgpt_client/models/get_user_response_401.py +++ b/customgpt-client/customgpt_client/models/get_user_response_401.py @@ -20,7 +20,7 @@ class GetUserResponse401: data (Union[Unset, GetUserResponse401Data]): """ - status: Union[Unset, str] = "error" + status: Union[Unset, str] = UNSET url: Union[Unset, str] = UNSET data: Union[Unset, "GetUserResponse401Data"] = UNSET additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) diff --git a/customgpt-client/customgpt_client/models/get_user_response_401_data.py b/customgpt-client/customgpt_client/models/get_user_response_401_data.py index 0c85e52..0659248 100644 --- a/customgpt-client/customgpt_client/models/get_user_response_401_data.py +++ b/customgpt-client/customgpt_client/models/get_user_response_401_data.py @@ -15,7 +15,7 @@ class GetUserResponse401Data: message (Union[Unset, str]): Example: API Token is either missing or invalid. """ - code: Union[Unset, str] = "401" + code: Union[Unset, str] = UNSET message: Union[Unset, str] = UNSET additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) diff --git a/customgpt-client/customgpt_client/models/get_user_response_500.py b/customgpt-client/customgpt_client/models/get_user_response_500.py index 021c36f..c5d809c 100644 --- a/customgpt-client/customgpt_client/models/get_user_response_500.py +++ b/customgpt-client/customgpt_client/models/get_user_response_500.py @@ -20,7 +20,7 @@ class GetUserResponse500: data (Union[Unset, GetUserResponse500Data]): """ - status: Union[Unset, str] = "error" + status: Union[Unset, str] = UNSET url: Union[Unset, str] = UNSET data: Union[Unset, "GetUserResponse500Data"] = UNSET additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) diff --git a/customgpt-client/customgpt_client/models/get_user_response_500_data.py b/customgpt-client/customgpt_client/models/get_user_response_500_data.py index 8590298..4bd254d 100644 --- a/customgpt-client/customgpt_client/models/get_user_response_500_data.py +++ b/customgpt-client/customgpt_client/models/get_user_response_500_data.py @@ -15,7 +15,7 @@ class GetUserResponse500Data: message (Union[Unset, str]): Example: Internal Server Error. """ - code: Union[Unset, str] = "500" + code: Union[Unset, str] = UNSET message: Union[Unset, str] = UNSET additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) diff --git a/customgpt-client/customgpt_client/models/list_projects_order_by.py b/customgpt-client/customgpt_client/models/list_projects_order_by.py new file mode 100644 index 0000000..5e97d70 --- /dev/null +++ b/customgpt-client/customgpt_client/models/list_projects_order_by.py @@ -0,0 +1,9 @@ +from enum import Enum + + +class ListProjectsOrderBy(str, Enum): + CREATED_AT = "created_at" + ID = "id" + + def __str__(self) -> str: + return str(self.value) diff --git a/customgpt-client/customgpt_client/models/list_projects_response_200.py b/customgpt-client/customgpt_client/models/list_projects_response_200.py index 2272613..fac51a2 100644 --- a/customgpt-client/customgpt_client/models/list_projects_response_200.py +++ b/customgpt-client/customgpt_client/models/list_projects_response_200.py @@ -19,7 +19,7 @@ class ListProjectsResponse200: data (Union[Unset, ListProjectsResponse200Data]): """ - status: Union[Unset, str] = "success" + status: Union[Unset, str] = UNSET data: Union[Unset, "ListProjectsResponse200Data"] = UNSET additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) diff --git a/customgpt-client/customgpt_client/models/list_projects_response_200_data.py b/customgpt-client/customgpt_client/models/list_projects_response_200_data.py index 5ed470a..d28f6d7 100644 --- a/customgpt-client/customgpt_client/models/list_projects_response_200_data.py +++ b/customgpt-client/customgpt_client/models/list_projects_response_200_data.py @@ -71,7 +71,7 @@ def to_dict(self) -> Dict[str, Any]: field_dict["current_page"] = current_page if data is not UNSET: for index, field_value in enumerate(data): - field_dict[f"data[]"] = field_value + field_dict[f"data[{index}]"] = field_value if first_page_url is not UNSET: field_dict["first_page_url"] = first_page_url if from_ is not UNSET: diff --git a/customgpt-client/customgpt_client/models/list_projects_response_200_data_data_item.py b/customgpt-client/customgpt_client/models/list_projects_response_200_data_data_item.py index 3420846..cac24d8 100644 --- a/customgpt-client/customgpt_client/models/list_projects_response_200_data_data_item.py +++ b/customgpt-client/customgpt_client/models/list_projects_response_200_data_data_item.py @@ -18,12 +18,11 @@ class ListProjectsResponse200DataDataItem: sitemap_path (Union[Unset, str]): Project sitemap Example: https://www.example.com/sitemap.xml. is_chat_active (Union[Unset, bool]): Whether the chat bot is active or not Example: True. user_id (Union[Unset, int]): User ID of the project owner Example: 1. + team_id (Union[Unset, int]): Team ID of the project owner Example: 1. created_at (Union[Unset, datetime.datetime]): Date and time when the project was created Default: isoparse('2023-05-08 13:06:55'). Example: 2021-01-01 00:00:00. updated_at (Union[Unset, datetime.datetime]): Date and time when the project was last updated Default: isoparse('2023-05-08 13:06:55'). Example: 2021-01-01 00:00:00. - deleted_at (Union[Unset, None, datetime.datetime]): Date and time when the project was deleted Example: - 2021-01-01 00:00:00. type (Union[Unset, ListProjectsResponse200DataDataItemType]): Project type Default: ListProjectsResponse200DataDataItemType.SITEMAP. Example: SITEMAP. is_shared (Union[Unset, bool]): Whether the project is shared or not Example: True. @@ -39,10 +38,10 @@ class ListProjectsResponse200DataDataItem: sitemap_path: Union[Unset, str] = UNSET is_chat_active: Union[Unset, bool] = False user_id: Union[Unset, int] = UNSET + team_id: Union[Unset, int] = UNSET created_at: Union[Unset, datetime.datetime] = isoparse("2023-05-08 13:06:55") updated_at: Union[Unset, datetime.datetime] = isoparse("2023-05-08 13:06:55") - deleted_at: Union[Unset, None, datetime.datetime] = UNSET - type: Union[Unset, str] = "SITEMAP" + type: Union[Unset, str] = UNSET is_shared: Union[Unset, bool] = False shareable_slug: Union[Unset, None, str] = UNSET shareable_link: Union[Unset, None, str] = UNSET @@ -54,8 +53,10 @@ def to_dict(self) -> Dict[str, Any]: id = self.id project_name = self.project_name sitemap_path = self.sitemap_path - is_chat_active = self.is_chat_active + is_chat_active = True if self.is_chat_active else False + user_id = self.user_id + team_id = self.team_id created_at: Union[Unset, str] = UNSET if not isinstance(self.created_at, Unset): created_at = self.created_at.isoformat() @@ -64,15 +65,12 @@ def to_dict(self) -> Dict[str, Any]: if not isinstance(self.updated_at, Unset): updated_at = self.updated_at.isoformat() - deleted_at: Union[Unset, None, str] = UNSET - if not isinstance(self.deleted_at, Unset): - deleted_at = self.deleted_at.isoformat() if self.deleted_at else None - type: Union[Unset, str] = UNSET if not isinstance(self.type, Unset): type = self.type - is_shared = self.is_shared + is_shared = True if self.is_shared else False + shareable_slug = self.shareable_slug shareable_link = self.shareable_link embed_code = self.embed_code @@ -91,12 +89,12 @@ def to_dict(self) -> Dict[str, Any]: field_dict["is_chat_active"] = is_chat_active if user_id is not UNSET: field_dict["user_id"] = user_id + if team_id is not UNSET: + field_dict["team_id"] = team_id if created_at is not UNSET: field_dict["created_at"] = created_at if updated_at is not UNSET: field_dict["updated_at"] = updated_at - if deleted_at is not UNSET: - field_dict["deleted_at"] = deleted_at if type is not UNSET: field_dict["type"] = type if is_shared is not UNSET: @@ -124,6 +122,8 @@ def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: user_id = src_dict.get("user_id") + team_id = src_dict.get("team_id") + _created_at = src_dict.get("created_at") created_at: Union[Unset, datetime.datetime] if isinstance(_created_at, Unset): @@ -138,15 +138,6 @@ def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: else: updated_at = isoparse(_updated_at) - _deleted_at = src_dict.get("deleted_at") - deleted_at: Union[Unset, None, datetime.datetime] - if _deleted_at is None: - deleted_at = None - elif isinstance(_deleted_at, Unset): - deleted_at = UNSET - else: - deleted_at = isoparse(_deleted_at) - type = src_dict.get("type") is_shared = src_dict.get("is_shared") @@ -165,9 +156,9 @@ def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: sitemap_path=sitemap_path, is_chat_active=is_chat_active, user_id=user_id, + team_id=team_id, created_at=created_at, updated_at=updated_at, - deleted_at=deleted_at, type=type, is_shared=is_shared, shareable_slug=shareable_slug, diff --git a/customgpt-client/customgpt_client/models/list_projects_response_401.py b/customgpt-client/customgpt_client/models/list_projects_response_401.py index db637f4..58e6da2 100644 --- a/customgpt-client/customgpt_client/models/list_projects_response_401.py +++ b/customgpt-client/customgpt_client/models/list_projects_response_401.py @@ -20,7 +20,7 @@ class ListProjectsResponse401: data (Union[Unset, ListProjectsResponse401Data]): """ - status: Union[Unset, str] = "error" + status: Union[Unset, str] = UNSET url: Union[Unset, str] = UNSET data: Union[Unset, "ListProjectsResponse401Data"] = UNSET additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) diff --git a/customgpt-client/customgpt_client/models/list_projects_response_401_data.py b/customgpt-client/customgpt_client/models/list_projects_response_401_data.py index 3f5306b..016cba2 100644 --- a/customgpt-client/customgpt_client/models/list_projects_response_401_data.py +++ b/customgpt-client/customgpt_client/models/list_projects_response_401_data.py @@ -15,7 +15,7 @@ class ListProjectsResponse401Data: message (Union[Unset, str]): Example: API Token is either missing or invalid. """ - code: Union[Unset, str] = "401" + code: Union[Unset, str] = UNSET message: Union[Unset, str] = UNSET additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) diff --git a/customgpt-client/customgpt_client/models/list_projects_response_500.py b/customgpt-client/customgpt_client/models/list_projects_response_500.py index 8c48fa1..230cc59 100644 --- a/customgpt-client/customgpt_client/models/list_projects_response_500.py +++ b/customgpt-client/customgpt_client/models/list_projects_response_500.py @@ -20,7 +20,7 @@ class ListProjectsResponse500: data (Union[Unset, ListProjectsResponse500Data]): """ - status: Union[Unset, str] = "error" + status: Union[Unset, str] = UNSET url: Union[Unset, str] = UNSET data: Union[Unset, "ListProjectsResponse500Data"] = UNSET additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) diff --git a/customgpt-client/customgpt_client/models/list_projects_response_500_data.py b/customgpt-client/customgpt_client/models/list_projects_response_500_data.py index 9655efe..af02bc7 100644 --- a/customgpt-client/customgpt_client/models/list_projects_response_500_data.py +++ b/customgpt-client/customgpt_client/models/list_projects_response_500_data.py @@ -15,7 +15,7 @@ class ListProjectsResponse500Data: message (Union[Unset, str]): Example: Internal Server Error. """ - code: Union[Unset, str] = "500" + code: Union[Unset, str] = UNSET message: Union[Unset, str] = UNSET additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) diff --git a/customgpt-client/customgpt_client/models/list_sources_response_200.py b/customgpt-client/customgpt_client/models/list_sources_response_200.py index 0eb40c8..4cfb3cb 100644 --- a/customgpt-client/customgpt_client/models/list_sources_response_200.py +++ b/customgpt-client/customgpt_client/models/list_sources_response_200.py @@ -19,7 +19,7 @@ class ListSourcesResponse200: data (Union[Unset, ListSourcesResponse200Data]): """ - status: Union[Unset, str] = "success" + status: Union[Unset, str] = UNSET data: Union[Unset, "ListSourcesResponse200Data"] = UNSET additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) diff --git a/customgpt-client/customgpt_client/models/list_sources_response_200_data.py b/customgpt-client/customgpt_client/models/list_sources_response_200_data.py index 2bc7b01..c280606 100644 --- a/customgpt-client/customgpt_client/models/list_sources_response_200_data.py +++ b/customgpt-client/customgpt_client/models/list_sources_response_200_data.py @@ -42,7 +42,7 @@ def to_dict(self) -> Dict[str, Any]: field_dict.update({}) if sitemaps is not UNSET: for index, field_value in enumerate(sitemaps): - field_dict[f"sitemaps[]"] = field_value + field_dict[f"sitemaps[{index}]"] = field_value if uploads is not UNSET: field_dict["uploads"] = uploads diff --git a/customgpt-client/customgpt_client/models/list_sources_response_200_data_sitemaps_item.py b/customgpt-client/customgpt_client/models/list_sources_response_200_data_sitemaps_item.py index 63ca032..c58d4a5 100644 --- a/customgpt-client/customgpt_client/models/list_sources_response_200_data_sitemaps_item.py +++ b/customgpt-client/customgpt_client/models/list_sources_response_200_data_sitemaps_item.py @@ -33,7 +33,7 @@ class ListSourcesResponse200DataSitemapsItem: id: Union[Unset, int] = UNSET created_at: Union[Unset, datetime.datetime] = UNSET updated_at: Union[Unset, datetime.datetime] = UNSET - type: Union[Unset, str] = "sitemap" + type: Union[Unset, str] = UNSET settings: Union[Unset, "ListSourcesResponse200DataSitemapsItemSettings"] = UNSET pages: Union[Unset, None, List["ListSourcesResponse200DataSitemapsItemPagesItem"]] = UNSET additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) @@ -82,7 +82,7 @@ def to_dict(self) -> Dict[str, Any]: field_dict["settings"] = settings if pages is not UNSET: for index, field_value in enumerate(pages): - field_dict[f"pages[]"] = field_value + field_dict[f"pages[{index}]"] = field_value return field_dict diff --git a/customgpt-client/customgpt_client/models/list_sources_response_200_data_sitemaps_item_pages_item.py b/customgpt-client/customgpt_client/models/list_sources_response_200_data_sitemaps_item_pages_item.py index b929368..dbfe301 100644 --- a/customgpt-client/customgpt_client/models/list_sources_response_200_data_sitemaps_item_pages_item.py +++ b/customgpt-client/customgpt_client/models/list_sources_response_200_data_sitemaps_item_pages_item.py @@ -25,6 +25,7 @@ class ListSourcesResponse200DataSitemapsItemPagesItem: index_status (Union[Unset, ListSourcesResponse200DataSitemapsItemPagesItemIndexStatus]): Index status of the page Default: ListSourcesResponse200DataSitemapsItemPagesItemIndexStatus.QUEUED. Example: queued. is_file (Union[Unset, bool]): Whether the page is a file or not Example: True. + is_refreshable (Union[Unset, bool]): Whether the page can be refreshed or not Example: True. is_file_kept (Union[Unset, bool]): Whether the file is kept after processing or not.\nNote: This is omitted in the response if the page is not a file Default: True. Example: True. filename (Union[Unset, None, str]): Filename of the page.\nNote: This is omitted in the response if the page is @@ -35,8 +36,6 @@ class ListSourcesResponse200DataSitemapsItemPagesItem: 00:00:00. updated_at (Union[Unset, datetime.datetime]): Date and time when the page was updated Example: 2021-01-01 00:00:00. - deleted_at (Union[Unset, None, datetime.datetime]): Date and time when the page was deleted Example: 2021-01-01 - 00:00:00. """ id: Union[Unset, int] = UNSET @@ -44,15 +43,15 @@ class ListSourcesResponse200DataSitemapsItemPagesItem: page_url_hash: Union[Unset, str] = UNSET project_id: Union[Unset, int] = UNSET s3_path: Union[Unset, None, str] = UNSET - crawl_status: Union[Unset, str] = "queued" - index_status: Union[Unset, str] = "queued" + crawl_status: Union[Unset, str] = UNSET + index_status: Union[Unset, str] = UNSET is_file: Union[Unset, bool] = False + is_refreshable: Union[Unset, bool] = False is_file_kept: Union[Unset, bool] = True filename: Union[Unset, None, str] = UNSET filesize: Union[Unset, None, int] = UNSET created_at: Union[Unset, datetime.datetime] = UNSET updated_at: Union[Unset, datetime.datetime] = UNSET - deleted_at: Union[Unset, None, datetime.datetime] = UNSET additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) def to_dict(self) -> Dict[str, Any]: @@ -69,8 +68,12 @@ def to_dict(self) -> Dict[str, Any]: if not isinstance(self.index_status, Unset): index_status = self.index_status - is_file = self.is_file - is_file_kept = self.is_file_kept + is_file = True if self.is_file else False + + is_refreshable = True if self.is_refreshable else False + + is_file_kept = True if self.is_file_kept else False + filename = self.filename filesize = self.filesize created_at: Union[Unset, str] = UNSET @@ -81,10 +84,6 @@ def to_dict(self) -> Dict[str, Any]: if not isinstance(self.updated_at, Unset): updated_at = self.updated_at.isoformat() - deleted_at: Union[Unset, None, str] = UNSET - if not isinstance(self.deleted_at, Unset): - deleted_at = self.deleted_at.isoformat() if self.deleted_at else None - field_dict: Dict[str, Any] = {} field_dict.update(self.additional_properties) field_dict.update({}) @@ -104,6 +103,8 @@ def to_dict(self) -> Dict[str, Any]: field_dict["index_status"] = index_status if is_file is not UNSET: field_dict["is_file"] = is_file + if is_refreshable is not UNSET: + field_dict["is_refreshable"] = is_refreshable if is_file_kept is not UNSET: field_dict["is_file_kept"] = is_file_kept if filename is not UNSET: @@ -114,8 +115,6 @@ def to_dict(self) -> Dict[str, Any]: field_dict["created_at"] = created_at if updated_at is not UNSET: field_dict["updated_at"] = updated_at - if deleted_at is not UNSET: - field_dict["deleted_at"] = deleted_at return field_dict @@ -137,6 +136,8 @@ def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: is_file = src_dict.get("is_file") + is_refreshable = src_dict.get("is_refreshable") + is_file_kept = src_dict.get("is_file_kept") filename = src_dict.get("filename") @@ -157,15 +158,6 @@ def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: else: updated_at = isoparse(_updated_at) - _deleted_at = src_dict.get("deleted_at") - deleted_at: Union[Unset, None, datetime.datetime] - if _deleted_at is None: - deleted_at = None - elif isinstance(_deleted_at, Unset): - deleted_at = UNSET - else: - deleted_at = isoparse(_deleted_at) - list_sources_response_200_data_sitemaps_item_pages_item = cls( id=id, page_url=page_url, @@ -175,12 +167,12 @@ def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: crawl_status=crawl_status, index_status=index_status, is_file=is_file, + is_refreshable=is_refreshable, is_file_kept=is_file_kept, filename=filename, filesize=filesize, created_at=created_at, updated_at=updated_at, - deleted_at=deleted_at, ) list_sources_response_200_data_sitemaps_item_pages_item.additional_properties = src_dict diff --git a/customgpt-client/customgpt_client/models/list_sources_response_200_data_sitemaps_item_settings.py b/customgpt-client/customgpt_client/models/list_sources_response_200_data_sitemaps_item_settings.py index 14b9d07..fac153e 100644 --- a/customgpt-client/customgpt_client/models/list_sources_response_200_data_sitemaps_item_settings.py +++ b/customgpt-client/customgpt_client/models/list_sources_response_200_data_sitemaps_item_settings.py @@ -12,35 +12,59 @@ class ListSourcesResponse200DataSitemapsItemSettings: """The project source settings Attributes: - data_refresh (Union[Unset, bool]): Whether the project source data should be refreshed Example: True. executive_js (Union[Unset, bool]): Whether the project source should execute JavaScript Default: True. Example: True. - data_refresh_frequency (Union[Unset, str]): The project source data refresh frequency Default: 'never'. Example: - never. + data_refresh_frequency (Union[Unset, ListSourcesResponse200DataSitemapsItemSettingsDataRefreshFrequency]): The + project source data refresh frequency Default: + ListSourcesResponse200DataSitemapsItemSettingsDataRefreshFrequency.NEVER. Example: never. + create_new_pages (Union[Unset, bool]): Add new pages to project automatically during refresh project source + Default: True. Example: True. + remove_unexist_pages (Union[Unset, bool]): Remove pages from project automatically during refresh project source + Default: True. + refresh_existing_pages (Union[Unset, ListSourcesResponse200DataSitemapsItemSettingsRefreshExistingPages]): + Refresh existing page during refresh project source Default: + ListSourcesResponse200DataSitemapsItemSettingsRefreshExistingPages.NEVER. Example: never. sitemap_path (Union[Unset, str]): The project source sitemap path Example: https://example.com/sitemap.xml. """ - data_refresh: Union[Unset, bool] = False executive_js: Union[Unset, bool] = True - data_refresh_frequency: Union[Unset, str] = "never" + data_refresh_frequency: Union[Unset, str] = UNSET + create_new_pages: Union[Unset, bool] = True + remove_unexist_pages: Union[Unset, bool] = True + refresh_existing_pages: Union[Unset, str] = UNSET sitemap_path: Union[Unset, str] = UNSET additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) def to_dict(self) -> Dict[str, Any]: - data_refresh = self.data_refresh - executive_js = self.executive_js - data_refresh_frequency = self.data_refresh_frequency + executive_js = True if self.executive_js else False + + data_refresh_frequency: Union[Unset, str] = UNSET + if not isinstance(self.data_refresh_frequency, Unset): + data_refresh_frequency = self.data_refresh_frequency + + create_new_pages = True if self.create_new_pages else False + + remove_unexist_pages = True if self.remove_unexist_pages else False + + refresh_existing_pages: Union[Unset, str] = UNSET + if not isinstance(self.refresh_existing_pages, Unset): + refresh_existing_pages = self.refresh_existing_pages + sitemap_path = self.sitemap_path field_dict: Dict[str, Any] = {} field_dict.update(self.additional_properties) field_dict.update({}) - if data_refresh is not UNSET: - field_dict["data_refresh"] = data_refresh if executive_js is not UNSET: field_dict["executive_js"] = executive_js if data_refresh_frequency is not UNSET: field_dict["data_refresh_frequency"] = data_refresh_frequency + if create_new_pages is not UNSET: + field_dict["create_new_pages"] = create_new_pages + if remove_unexist_pages is not UNSET: + field_dict["remove_unexist_pages"] = remove_unexist_pages + if refresh_existing_pages is not UNSET: + field_dict["refresh_existing_pages"] = refresh_existing_pages if sitemap_path is not UNSET: field_dict["sitemap_path"] = sitemap_path @@ -48,18 +72,24 @@ def to_dict(self) -> Dict[str, Any]: @classmethod def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: - data_refresh = src_dict.get("data_refresh") - executive_js = src_dict.get("executive_js") data_refresh_frequency = src_dict.get("data_refresh_frequency") + create_new_pages = src_dict.get("create_new_pages") + + remove_unexist_pages = src_dict.get("remove_unexist_pages") + + refresh_existing_pages = src_dict.get("refresh_existing_pages") + sitemap_path = src_dict.get("sitemap_path") list_sources_response_200_data_sitemaps_item_settings = cls( - data_refresh=data_refresh, executive_js=executive_js, data_refresh_frequency=data_refresh_frequency, + create_new_pages=create_new_pages, + remove_unexist_pages=remove_unexist_pages, + refresh_existing_pages=refresh_existing_pages, sitemap_path=sitemap_path, ) diff --git a/customgpt-client/customgpt_client/models/list_sources_response_200_data_sitemaps_item_settings_data_refresh_frequency.py b/customgpt-client/customgpt_client/models/list_sources_response_200_data_sitemaps_item_settings_data_refresh_frequency.py new file mode 100644 index 0000000..19babc2 --- /dev/null +++ b/customgpt-client/customgpt_client/models/list_sources_response_200_data_sitemaps_item_settings_data_refresh_frequency.py @@ -0,0 +1,12 @@ +from enum import Enum + + +class ListSourcesResponse200DataSitemapsItemSettingsDataRefreshFrequency(str, Enum): + ADVANCED = "advanced" + DAILY = "daily" + MONTHLY = "monthly" + NEVER = "never" + WEEKLY = "weekly" + + def __str__(self) -> str: + return str(self.value) diff --git a/customgpt-client/customgpt_client/models/list_sources_response_200_data_sitemaps_item_settings_refresh_existing_pages.py b/customgpt-client/customgpt_client/models/list_sources_response_200_data_sitemaps_item_settings_refresh_existing_pages.py new file mode 100644 index 0000000..c8d64c9 --- /dev/null +++ b/customgpt-client/customgpt_client/models/list_sources_response_200_data_sitemaps_item_settings_refresh_existing_pages.py @@ -0,0 +1,10 @@ +from enum import Enum + + +class ListSourcesResponse200DataSitemapsItemSettingsRefreshExistingPages(str, Enum): + ALWAYS = "always" + IF_UPDATED = "if_updated" + NEVER = "never" + + def __str__(self) -> str: + return str(self.value) diff --git a/customgpt-client/customgpt_client/models/list_sources_response_200_data_uploads.py b/customgpt-client/customgpt_client/models/list_sources_response_200_data_uploads.py index 15d42c9..ae9a9e2 100644 --- a/customgpt-client/customgpt_client/models/list_sources_response_200_data_uploads.py +++ b/customgpt-client/customgpt_client/models/list_sources_response_200_data_uploads.py @@ -29,7 +29,7 @@ class ListSourcesResponse200DataUploads: id: Union[Unset, int] = UNSET created_at: Union[Unset, datetime.datetime] = UNSET updated_at: Union[Unset, datetime.datetime] = UNSET - type: Union[Unset, str] = "sitemap" + type: Union[Unset, str] = UNSET settings: Union[Unset, "ListSourcesResponse200DataUploadsSettings"] = UNSET pages: Union[Unset, None, List["ListSourcesResponse200DataUploadsPagesItem"]] = UNSET additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) @@ -78,7 +78,7 @@ def to_dict(self) -> Dict[str, Any]: field_dict["settings"] = settings if pages is not UNSET: for index, field_value in enumerate(pages): - field_dict[f"pages[]"] = field_value + field_dict[f"pages[{index}]"] = field_value return field_dict diff --git a/customgpt-client/customgpt_client/models/list_sources_response_200_data_uploads_pages_item.py b/customgpt-client/customgpt_client/models/list_sources_response_200_data_uploads_pages_item.py index b8435c5..f89d3c3 100644 --- a/customgpt-client/customgpt_client/models/list_sources_response_200_data_uploads_pages_item.py +++ b/customgpt-client/customgpt_client/models/list_sources_response_200_data_uploads_pages_item.py @@ -25,6 +25,7 @@ class ListSourcesResponse200DataUploadsPagesItem: index_status (Union[Unset, ListSourcesResponse200DataUploadsPagesItemIndexStatus]): Index status of the page Default: ListSourcesResponse200DataUploadsPagesItemIndexStatus.QUEUED. Example: queued. is_file (Union[Unset, bool]): Whether the page is a file or not Example: True. + is_refreshable (Union[Unset, bool]): Whether the page can be refreshed or not Example: True. is_file_kept (Union[Unset, bool]): Whether the file is kept after processing or not.\nNote: This is omitted in the response if the page is not a file Default: True. Example: True. filename (Union[Unset, None, str]): Filename of the page.\nNote: This is omitted in the response if the page is @@ -35,8 +36,6 @@ class ListSourcesResponse200DataUploadsPagesItem: 00:00:00. updated_at (Union[Unset, datetime.datetime]): Date and time when the page was updated Example: 2021-01-01 00:00:00. - deleted_at (Union[Unset, None, datetime.datetime]): Date and time when the page was deleted Example: 2021-01-01 - 00:00:00. """ id: Union[Unset, int] = UNSET @@ -44,15 +43,15 @@ class ListSourcesResponse200DataUploadsPagesItem: page_url_hash: Union[Unset, str] = UNSET project_id: Union[Unset, int] = UNSET s3_path: Union[Unset, None, str] = UNSET - crawl_status: Union[Unset, str] = "queued" - index_status: Union[Unset, str] = "queued" + crawl_status: Union[Unset, str] = UNSET + index_status: Union[Unset, str] = UNSET is_file: Union[Unset, bool] = False + is_refreshable: Union[Unset, bool] = False is_file_kept: Union[Unset, bool] = True filename: Union[Unset, None, str] = UNSET filesize: Union[Unset, None, int] = UNSET created_at: Union[Unset, datetime.datetime] = UNSET updated_at: Union[Unset, datetime.datetime] = UNSET - deleted_at: Union[Unset, None, datetime.datetime] = UNSET additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) def to_dict(self) -> Dict[str, Any]: @@ -69,8 +68,12 @@ def to_dict(self) -> Dict[str, Any]: if not isinstance(self.index_status, Unset): index_status = self.index_status - is_file = self.is_file - is_file_kept = self.is_file_kept + is_file = True if self.is_file else False + + is_refreshable = True if self.is_refreshable else False + + is_file_kept = True if self.is_file_kept else False + filename = self.filename filesize = self.filesize created_at: Union[Unset, str] = UNSET @@ -81,10 +84,6 @@ def to_dict(self) -> Dict[str, Any]: if not isinstance(self.updated_at, Unset): updated_at = self.updated_at.isoformat() - deleted_at: Union[Unset, None, str] = UNSET - if not isinstance(self.deleted_at, Unset): - deleted_at = self.deleted_at.isoformat() if self.deleted_at else None - field_dict: Dict[str, Any] = {} field_dict.update(self.additional_properties) field_dict.update({}) @@ -104,6 +103,8 @@ def to_dict(self) -> Dict[str, Any]: field_dict["index_status"] = index_status if is_file is not UNSET: field_dict["is_file"] = is_file + if is_refreshable is not UNSET: + field_dict["is_refreshable"] = is_refreshable if is_file_kept is not UNSET: field_dict["is_file_kept"] = is_file_kept if filename is not UNSET: @@ -114,8 +115,6 @@ def to_dict(self) -> Dict[str, Any]: field_dict["created_at"] = created_at if updated_at is not UNSET: field_dict["updated_at"] = updated_at - if deleted_at is not UNSET: - field_dict["deleted_at"] = deleted_at return field_dict @@ -137,6 +136,8 @@ def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: is_file = src_dict.get("is_file") + is_refreshable = src_dict.get("is_refreshable") + is_file_kept = src_dict.get("is_file_kept") filename = src_dict.get("filename") @@ -157,15 +158,6 @@ def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: else: updated_at = isoparse(_updated_at) - _deleted_at = src_dict.get("deleted_at") - deleted_at: Union[Unset, None, datetime.datetime] - if _deleted_at is None: - deleted_at = None - elif isinstance(_deleted_at, Unset): - deleted_at = UNSET - else: - deleted_at = isoparse(_deleted_at) - list_sources_response_200_data_uploads_pages_item = cls( id=id, page_url=page_url, @@ -175,12 +167,12 @@ def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: crawl_status=crawl_status, index_status=index_status, is_file=is_file, + is_refreshable=is_refreshable, is_file_kept=is_file_kept, filename=filename, filesize=filesize, created_at=created_at, updated_at=updated_at, - deleted_at=deleted_at, ) list_sources_response_200_data_uploads_pages_item.additional_properties = src_dict diff --git a/customgpt-client/customgpt_client/models/list_sources_response_200_data_uploads_settings.py b/customgpt-client/customgpt_client/models/list_sources_response_200_data_uploads_settings.py index 3846be3..ec220db 100644 --- a/customgpt-client/customgpt_client/models/list_sources_response_200_data_uploads_settings.py +++ b/customgpt-client/customgpt_client/models/list_sources_response_200_data_uploads_settings.py @@ -12,35 +12,59 @@ class ListSourcesResponse200DataUploadsSettings: """The project source settings Attributes: - data_refresh (Union[Unset, bool]): Whether the project source data should be refreshed Example: True. executive_js (Union[Unset, bool]): Whether the project source should execute JavaScript Default: True. Example: True. - data_refresh_frequency (Union[Unset, str]): The project source data refresh frequency Default: 'never'. Example: - never. + data_refresh_frequency (Union[Unset, ListSourcesResponse200DataUploadsSettingsDataRefreshFrequency]): The + project source data refresh frequency Default: + ListSourcesResponse200DataUploadsSettingsDataRefreshFrequency.NEVER. Example: never. + create_new_pages (Union[Unset, bool]): Add new pages to project automatically during refresh project source + Default: True. Example: True. + remove_unexist_pages (Union[Unset, bool]): Remove pages from project automatically during refresh project source + Default: True. + refresh_existing_pages (Union[Unset, ListSourcesResponse200DataUploadsSettingsRefreshExistingPages]): Refresh + existing page during refresh project source Default: + ListSourcesResponse200DataUploadsSettingsRefreshExistingPages.NEVER. Example: never. sitemap_path (Union[Unset, str]): The project source sitemap path Example: https://example.com/sitemap.xml. """ - data_refresh: Union[Unset, bool] = False executive_js: Union[Unset, bool] = True - data_refresh_frequency: Union[Unset, str] = "never" + data_refresh_frequency: Union[Unset, str] = UNSET + create_new_pages: Union[Unset, bool] = True + remove_unexist_pages: Union[Unset, bool] = True + refresh_existing_pages: Union[Unset, str] = UNSET sitemap_path: Union[Unset, str] = UNSET additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) def to_dict(self) -> Dict[str, Any]: - data_refresh = self.data_refresh - executive_js = self.executive_js - data_refresh_frequency = self.data_refresh_frequency + executive_js = True if self.executive_js else False + + data_refresh_frequency: Union[Unset, str] = UNSET + if not isinstance(self.data_refresh_frequency, Unset): + data_refresh_frequency = self.data_refresh_frequency + + create_new_pages = True if self.create_new_pages else False + + remove_unexist_pages = True if self.remove_unexist_pages else False + + refresh_existing_pages: Union[Unset, str] = UNSET + if not isinstance(self.refresh_existing_pages, Unset): + refresh_existing_pages = self.refresh_existing_pages + sitemap_path = self.sitemap_path field_dict: Dict[str, Any] = {} field_dict.update(self.additional_properties) field_dict.update({}) - if data_refresh is not UNSET: - field_dict["data_refresh"] = data_refresh if executive_js is not UNSET: field_dict["executive_js"] = executive_js if data_refresh_frequency is not UNSET: field_dict["data_refresh_frequency"] = data_refresh_frequency + if create_new_pages is not UNSET: + field_dict["create_new_pages"] = create_new_pages + if remove_unexist_pages is not UNSET: + field_dict["remove_unexist_pages"] = remove_unexist_pages + if refresh_existing_pages is not UNSET: + field_dict["refresh_existing_pages"] = refresh_existing_pages if sitemap_path is not UNSET: field_dict["sitemap_path"] = sitemap_path @@ -48,18 +72,24 @@ def to_dict(self) -> Dict[str, Any]: @classmethod def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: - data_refresh = src_dict.get("data_refresh") - executive_js = src_dict.get("executive_js") data_refresh_frequency = src_dict.get("data_refresh_frequency") + create_new_pages = src_dict.get("create_new_pages") + + remove_unexist_pages = src_dict.get("remove_unexist_pages") + + refresh_existing_pages = src_dict.get("refresh_existing_pages") + sitemap_path = src_dict.get("sitemap_path") list_sources_response_200_data_uploads_settings = cls( - data_refresh=data_refresh, executive_js=executive_js, data_refresh_frequency=data_refresh_frequency, + create_new_pages=create_new_pages, + remove_unexist_pages=remove_unexist_pages, + refresh_existing_pages=refresh_existing_pages, sitemap_path=sitemap_path, ) diff --git a/customgpt-client/customgpt_client/models/list_sources_response_200_data_uploads_settings_data_refresh_frequency.py b/customgpt-client/customgpt_client/models/list_sources_response_200_data_uploads_settings_data_refresh_frequency.py new file mode 100644 index 0000000..ee447fe --- /dev/null +++ b/customgpt-client/customgpt_client/models/list_sources_response_200_data_uploads_settings_data_refresh_frequency.py @@ -0,0 +1,12 @@ +from enum import Enum + + +class ListSourcesResponse200DataUploadsSettingsDataRefreshFrequency(str, Enum): + ADVANCED = "advanced" + DAILY = "daily" + MONTHLY = "monthly" + NEVER = "never" + WEEKLY = "weekly" + + def __str__(self) -> str: + return str(self.value) diff --git a/customgpt-client/customgpt_client/models/list_sources_response_200_data_uploads_settings_refresh_existing_pages.py b/customgpt-client/customgpt_client/models/list_sources_response_200_data_uploads_settings_refresh_existing_pages.py new file mode 100644 index 0000000..d89d653 --- /dev/null +++ b/customgpt-client/customgpt_client/models/list_sources_response_200_data_uploads_settings_refresh_existing_pages.py @@ -0,0 +1,10 @@ +from enum import Enum + + +class ListSourcesResponse200DataUploadsSettingsRefreshExistingPages(str, Enum): + ALWAYS = "always" + IF_UPDATED = "if_updated" + NEVER = "never" + + def __str__(self) -> str: + return str(self.value) diff --git a/customgpt-client/customgpt_client/models/list_sources_response_400.py b/customgpt-client/customgpt_client/models/list_sources_response_400.py deleted file mode 100644 index a35afa4..0000000 --- a/customgpt-client/customgpt_client/models/list_sources_response_400.py +++ /dev/null @@ -1,88 +0,0 @@ -from typing import TYPE_CHECKING, Any, Dict, List, Type, TypeVar, Union - -import attr - -from ..types import UNSET, Unset - -if TYPE_CHECKING: - from ..models.list_sources_response_400_data import ListSourcesResponse400Data - - -T = TypeVar("T", bound="ListSourcesResponse400") - - -@attr.s(auto_attribs=True) -class ListSourcesResponse400: - """ - Attributes: - status (Union[Unset, ListSourcesResponse400Status]): The status of the response Example: error. - url (Union[Unset, str]): The URL of the request Example: https://app.customgpt.ai/api/v1/projects/1. - data (Union[Unset, ListSourcesResponse400Data]): - """ - - status: Union[Unset, str] = "error" - url: Union[Unset, str] = UNSET - data: Union[Unset, "ListSourcesResponse400Data"] = UNSET - additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) - - def to_dict(self) -> Dict[str, Any]: - status: Union[Unset, str] = UNSET - if not isinstance(self.status, Unset): - status = self.status - - url = self.url - data: Union[Unset, Dict[str, Any]] = UNSET - if not isinstance(self.data, Unset): - data = self.data.to_dict() - - field_dict: Dict[str, Any] = {} - field_dict.update(self.additional_properties) - field_dict.update({}) - if status is not UNSET: - field_dict["status"] = status - if url is not UNSET: - field_dict["url"] = url - if data is not UNSET: - field_dict["data"] = data - - return field_dict - - @classmethod - def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: - from ..models.list_sources_response_400_data import ListSourcesResponse400Data - - status = src_dict.get("status") - - url = src_dict.get("url") - - _data = src_dict.get("data") - data: Union[Unset, ListSourcesResponse400Data] - if isinstance(_data, Unset): - data = UNSET - else: - data = ListSourcesResponse400Data.from_dict(_data) - - list_sources_response_400 = cls( - status=status, - url=url, - data=data, - ) - - list_sources_response_400.additional_properties = src_dict - return list_sources_response_400 - - @property - def additional_keys(self) -> List[str]: - return list(self.additional_properties.keys()) - - def __getitem__(self, key: str) -> Any: - return self.additional_properties[key] - - def __setitem__(self, key: str, value: Any) -> None: - self.additional_properties[key] = value - - def __delitem__(self, key: str) -> None: - del self.additional_properties[key] - - def __contains__(self, key: str) -> bool: - return key in self.additional_properties diff --git a/customgpt-client/customgpt_client/models/list_sources_response_400_data_code.py b/customgpt-client/customgpt_client/models/list_sources_response_400_data_code.py deleted file mode 100644 index 9d25a8e..0000000 --- a/customgpt-client/customgpt_client/models/list_sources_response_400_data_code.py +++ /dev/null @@ -1,13 +0,0 @@ -from enum import IntEnum - - -class ListSourcesResponse400DataCode(IntEnum): - VALUE_400 = 400 - VALUE_401 = 401 - VALUE_403 = 403 - VALUE_404 = 404 - VALUE_500 = 500 - VALUE_503 = 503 - - def __str__(self) -> str: - return str(self.value) diff --git a/customgpt-client/customgpt_client/models/list_sources_response_400_status.py b/customgpt-client/customgpt_client/models/list_sources_response_400_status.py deleted file mode 100644 index dd45864..0000000 --- a/customgpt-client/customgpt_client/models/list_sources_response_400_status.py +++ /dev/null @@ -1,9 +0,0 @@ -from enum import Enum - - -class ListSourcesResponse400Status(str, Enum): - ERROR = "error" - SUCCESS = "success" - - def __str__(self) -> str: - return str(self.value) diff --git a/customgpt-client/customgpt_client/models/list_sources_response_401.py b/customgpt-client/customgpt_client/models/list_sources_response_401.py index ee3b35d..2584bb9 100644 --- a/customgpt-client/customgpt_client/models/list_sources_response_401.py +++ b/customgpt-client/customgpt_client/models/list_sources_response_401.py @@ -20,7 +20,7 @@ class ListSourcesResponse401: data (Union[Unset, ListSourcesResponse401Data]): """ - status: Union[Unset, str] = "error" + status: Union[Unset, str] = UNSET url: Union[Unset, str] = UNSET data: Union[Unset, "ListSourcesResponse401Data"] = UNSET additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) diff --git a/customgpt-client/customgpt_client/models/list_sources_response_401_data.py b/customgpt-client/customgpt_client/models/list_sources_response_401_data.py index 9ddaa11..30ef5fc 100644 --- a/customgpt-client/customgpt_client/models/list_sources_response_401_data.py +++ b/customgpt-client/customgpt_client/models/list_sources_response_401_data.py @@ -15,7 +15,7 @@ class ListSourcesResponse401Data: message (Union[Unset, str]): Example: API Token is either missing or invalid. """ - code: Union[Unset, str] = "401" + code: Union[Unset, str] = UNSET message: Union[Unset, str] = UNSET additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) diff --git a/customgpt-client/customgpt_client/models/list_sources_response_404.py b/customgpt-client/customgpt_client/models/list_sources_response_404.py deleted file mode 100644 index da92298..0000000 --- a/customgpt-client/customgpt_client/models/list_sources_response_404.py +++ /dev/null @@ -1,88 +0,0 @@ -from typing import TYPE_CHECKING, Any, Dict, List, Type, TypeVar, Union - -import attr - -from ..types import UNSET, Unset - -if TYPE_CHECKING: - from ..models.list_sources_response_404_data import ListSourcesResponse404Data - - -T = TypeVar("T", bound="ListSourcesResponse404") - - -@attr.s(auto_attribs=True) -class ListSourcesResponse404: - """ - Attributes: - status (Union[Unset, ListSourcesResponse404Status]): The status of the response Example: error. - url (Union[Unset, str]): The URL of the request Example: https://app.customgpt.ai/api/v1/projects/1. - data (Union[Unset, ListSourcesResponse404Data]): - """ - - status: Union[Unset, str] = "error" - url: Union[Unset, str] = UNSET - data: Union[Unset, "ListSourcesResponse404Data"] = UNSET - additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) - - def to_dict(self) -> Dict[str, Any]: - status: Union[Unset, str] = UNSET - if not isinstance(self.status, Unset): - status = self.status - - url = self.url - data: Union[Unset, Dict[str, Any]] = UNSET - if not isinstance(self.data, Unset): - data = self.data.to_dict() - - field_dict: Dict[str, Any] = {} - field_dict.update(self.additional_properties) - field_dict.update({}) - if status is not UNSET: - field_dict["status"] = status - if url is not UNSET: - field_dict["url"] = url - if data is not UNSET: - field_dict["data"] = data - - return field_dict - - @classmethod - def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: - from ..models.list_sources_response_404_data import ListSourcesResponse404Data - - status = src_dict.get("status") - - url = src_dict.get("url") - - _data = src_dict.get("data") - data: Union[Unset, ListSourcesResponse404Data] - if isinstance(_data, Unset): - data = UNSET - else: - data = ListSourcesResponse404Data.from_dict(_data) - - list_sources_response_404 = cls( - status=status, - url=url, - data=data, - ) - - list_sources_response_404.additional_properties = src_dict - return list_sources_response_404 - - @property - def additional_keys(self) -> List[str]: - return list(self.additional_properties.keys()) - - def __getitem__(self, key: str) -> Any: - return self.additional_properties[key] - - def __setitem__(self, key: str, value: Any) -> None: - self.additional_properties[key] = value - - def __delitem__(self, key: str) -> None: - del self.additional_properties[key] - - def __contains__(self, key: str) -> bool: - return key in self.additional_properties diff --git a/customgpt-client/customgpt_client/models/list_sources_response_404_data_code.py b/customgpt-client/customgpt_client/models/list_sources_response_404_data_code.py deleted file mode 100644 index c28e3ab..0000000 --- a/customgpt-client/customgpt_client/models/list_sources_response_404_data_code.py +++ /dev/null @@ -1,13 +0,0 @@ -from enum import IntEnum - - -class ListSourcesResponse404DataCode(IntEnum): - VALUE_400 = 400 - VALUE_401 = 401 - VALUE_403 = 403 - VALUE_404 = 404 - VALUE_500 = 500 - VALUE_503 = 503 - - def __str__(self) -> str: - return str(self.value) diff --git a/customgpt-client/customgpt_client/models/list_sources_response_404_status.py b/customgpt-client/customgpt_client/models/list_sources_response_404_status.py deleted file mode 100644 index a4b6b78..0000000 --- a/customgpt-client/customgpt_client/models/list_sources_response_404_status.py +++ /dev/null @@ -1,9 +0,0 @@ -from enum import Enum - - -class ListSourcesResponse404Status(str, Enum): - ERROR = "error" - SUCCESS = "success" - - def __str__(self) -> str: - return str(self.value) diff --git a/customgpt-client/customgpt_client/models/list_sources_response_500.py b/customgpt-client/customgpt_client/models/list_sources_response_500.py index ab9c522..54edee1 100644 --- a/customgpt-client/customgpt_client/models/list_sources_response_500.py +++ b/customgpt-client/customgpt_client/models/list_sources_response_500.py @@ -20,7 +20,7 @@ class ListSourcesResponse500: data (Union[Unset, ListSourcesResponse500Data]): """ - status: Union[Unset, str] = "error" + status: Union[Unset, str] = UNSET url: Union[Unset, str] = UNSET data: Union[Unset, "ListSourcesResponse500Data"] = UNSET additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) diff --git a/customgpt-client/customgpt_client/models/list_sources_response_500_data.py b/customgpt-client/customgpt_client/models/list_sources_response_500_data.py index 08b532d..c80f561 100644 --- a/customgpt-client/customgpt_client/models/list_sources_response_500_data.py +++ b/customgpt-client/customgpt_client/models/list_sources_response_500_data.py @@ -15,7 +15,7 @@ class ListSourcesResponse500Data: message (Union[Unset, str]): Example: Internal Server Error. """ - code: Union[Unset, str] = "500" + code: Union[Unset, str] = UNSET message: Union[Unset, str] = UNSET additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) diff --git a/customgpt-client/customgpt_client/models/messages_conversation_response_200.py b/customgpt-client/customgpt_client/models/messages_conversation_response_200.py index 700aef3..174f67b 100644 --- a/customgpt-client/customgpt_client/models/messages_conversation_response_200.py +++ b/customgpt-client/customgpt_client/models/messages_conversation_response_200.py @@ -19,7 +19,7 @@ class MessagesConversationResponse200: data (Union[Unset, MessagesConversationResponse200Data]): """ - status: Union[Unset, str] = "success" + status: Union[Unset, str] = UNSET data: Union[Unset, "MessagesConversationResponse200Data"] = UNSET additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) diff --git a/customgpt-client/customgpt_client/models/messages_conversation_response_200_data_conversation.py b/customgpt-client/customgpt_client/models/messages_conversation_response_200_data_conversation.py index c3f5108..fd32a0c 100644 --- a/customgpt-client/customgpt_client/models/messages_conversation_response_200_data_conversation.py +++ b/customgpt-client/customgpt_client/models/messages_conversation_response_200_data_conversation.py @@ -15,8 +15,6 @@ class MessagesConversationResponse200DataConversation: Attributes: created_at (Union[Unset, datetime.datetime]): When was this conversation created? Example: 2023-04-30 16:43:53. updated_at (Union[Unset, datetime.datetime]): When was this conversation updated? Example: 2023-04-30 16:43:53. - deleted_at (Union[Unset, None, datetime.datetime]): When was this conversation deleted? Example: 2023-04-30 - 16:43:53. id (Union[Unset, int]): Conversation ID Example: 1. name (Union[Unset, str]): Conversation name Example: Conversation 1. project_id (Union[Unset, str]): Project ID for this conversation Example: 1. @@ -26,7 +24,6 @@ class MessagesConversationResponse200DataConversation: created_at: Union[Unset, datetime.datetime] = UNSET updated_at: Union[Unset, datetime.datetime] = UNSET - deleted_at: Union[Unset, None, datetime.datetime] = UNSET id: Union[Unset, int] = UNSET name: Union[Unset, str] = UNSET project_id: Union[Unset, str] = UNSET @@ -43,10 +40,6 @@ def to_dict(self) -> Dict[str, Any]: if not isinstance(self.updated_at, Unset): updated_at = self.updated_at.isoformat() - deleted_at: Union[Unset, None, str] = UNSET - if not isinstance(self.deleted_at, Unset): - deleted_at = self.deleted_at.isoformat() if self.deleted_at else None - id = self.id name = self.name project_id = self.project_id @@ -60,8 +53,6 @@ def to_dict(self) -> Dict[str, Any]: field_dict["created_at"] = created_at if updated_at is not UNSET: field_dict["updated_at"] = updated_at - if deleted_at is not UNSET: - field_dict["deleted_at"] = deleted_at if id is not UNSET: field_dict["id"] = id if name is not UNSET: @@ -91,15 +82,6 @@ def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: else: updated_at = isoparse(_updated_at) - _deleted_at = src_dict.get("deleted_at") - deleted_at: Union[Unset, None, datetime.datetime] - if _deleted_at is None: - deleted_at = None - elif isinstance(_deleted_at, Unset): - deleted_at = UNSET - else: - deleted_at = isoparse(_deleted_at) - id = src_dict.get("id") name = src_dict.get("name") @@ -113,7 +95,6 @@ def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: messages_conversation_response_200_data_conversation = cls( created_at=created_at, updated_at=updated_at, - deleted_at=deleted_at, id=id, name=name, project_id=project_id, diff --git a/customgpt-client/customgpt_client/models/messages_conversation_response_200_data_messages.py b/customgpt-client/customgpt_client/models/messages_conversation_response_200_data_messages.py index 854cadd..5462e86 100644 --- a/customgpt-client/customgpt_client/models/messages_conversation_response_200_data_messages.py +++ b/customgpt-client/customgpt_client/models/messages_conversation_response_200_data_messages.py @@ -73,7 +73,7 @@ def to_dict(self) -> Dict[str, Any]: field_dict["current_page"] = current_page if data is not UNSET: for index, field_value in enumerate(data): - field_dict[f"data[]"] = field_value + field_dict[f"data[{index}]"] = field_value if first_page_url is not UNSET: field_dict["first_page_url"] = first_page_url if from_ is not UNSET: diff --git a/customgpt-client/customgpt_client/models/messages_conversation_response_200_data_messages_data_item.py b/customgpt-client/customgpt_client/models/messages_conversation_response_200_data_messages_data_item.py index eba5056..d537b39 100644 --- a/customgpt-client/customgpt_client/models/messages_conversation_response_200_data_messages_data_item.py +++ b/customgpt-client/customgpt_client/models/messages_conversation_response_200_data_messages_data_item.py @@ -87,7 +87,7 @@ def to_dict(self) -> Dict[str, Any]: field_dict["conversation_id"] = conversation_id if citations is not UNSET: for index, field_value in enumerate(citations): - field_dict[f"citations[]"] = field_value + field_dict[f"citations[{index}]"] = field_value if metadata is not UNSET: field_dict["metadata"] = metadata diff --git a/customgpt-client/customgpt_client/models/messages_conversation_response_400.py b/customgpt-client/customgpt_client/models/messages_conversation_response_400.py index 3d3b43f..e4a367d 100644 --- a/customgpt-client/customgpt_client/models/messages_conversation_response_400.py +++ b/customgpt-client/customgpt_client/models/messages_conversation_response_400.py @@ -20,7 +20,7 @@ class MessagesConversationResponse400: data (Union[Unset, MessagesConversationResponse400Data]): """ - status: Union[Unset, str] = "error" + status: Union[Unset, str] = UNSET url: Union[Unset, str] = UNSET data: Union[Unset, "MessagesConversationResponse400Data"] = UNSET additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) diff --git a/customgpt-client/customgpt_client/models/messages_conversation_response_400_data.py b/customgpt-client/customgpt_client/models/messages_conversation_response_400_data.py index cad46f5..d725f0e 100644 --- a/customgpt-client/customgpt_client/models/messages_conversation_response_400_data.py +++ b/customgpt-client/customgpt_client/models/messages_conversation_response_400_data.py @@ -15,7 +15,7 @@ class MessagesConversationResponse400Data: message (Union[Unset, str]): The error message Example: Project id must be integer. """ - code: Union[Unset, str] = "400" + code: Union[Unset, str] = UNSET message: Union[Unset, str] = UNSET additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) diff --git a/customgpt-client/customgpt_client/models/messages_conversation_response_401.py b/customgpt-client/customgpt_client/models/messages_conversation_response_401.py index 24bdc51..72e455f 100644 --- a/customgpt-client/customgpt_client/models/messages_conversation_response_401.py +++ b/customgpt-client/customgpt_client/models/messages_conversation_response_401.py @@ -20,7 +20,7 @@ class MessagesConversationResponse401: data (Union[Unset, MessagesConversationResponse401Data]): """ - status: Union[Unset, str] = "error" + status: Union[Unset, str] = UNSET url: Union[Unset, str] = UNSET data: Union[Unset, "MessagesConversationResponse401Data"] = UNSET additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) diff --git a/customgpt-client/customgpt_client/models/messages_conversation_response_401_data.py b/customgpt-client/customgpt_client/models/messages_conversation_response_401_data.py index 6abdc40..77587a5 100644 --- a/customgpt-client/customgpt_client/models/messages_conversation_response_401_data.py +++ b/customgpt-client/customgpt_client/models/messages_conversation_response_401_data.py @@ -15,7 +15,7 @@ class MessagesConversationResponse401Data: message (Union[Unset, str]): Example: API Token is either missing or invalid. """ - code: Union[Unset, str] = "401" + code: Union[Unset, str] = UNSET message: Union[Unset, str] = UNSET additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) diff --git a/customgpt-client/customgpt_client/models/messages_conversation_response_404.py b/customgpt-client/customgpt_client/models/messages_conversation_response_404.py index 37db0ee..ac78bdb 100644 --- a/customgpt-client/customgpt_client/models/messages_conversation_response_404.py +++ b/customgpt-client/customgpt_client/models/messages_conversation_response_404.py @@ -20,7 +20,7 @@ class MessagesConversationResponse404: data (Union[Unset, MessagesConversationResponse404Data]): """ - status: Union[Unset, str] = "error" + status: Union[Unset, str] = UNSET url: Union[Unset, str] = UNSET data: Union[Unset, "MessagesConversationResponse404Data"] = UNSET additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) diff --git a/customgpt-client/customgpt_client/models/messages_conversation_response_404_data.py b/customgpt-client/customgpt_client/models/messages_conversation_response_404_data.py index 18b8591..49fa075 100644 --- a/customgpt-client/customgpt_client/models/messages_conversation_response_404_data.py +++ b/customgpt-client/customgpt_client/models/messages_conversation_response_404_data.py @@ -16,8 +16,8 @@ class MessagesConversationResponse404Data: not found. """ - code: Union[Unset, str] = "404" - message: Union[Unset, str] = "Project with id 1 not found" + code: Union[Unset, str] = UNSET + message: Union[Unset, str] = UNSET additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) def to_dict(self) -> Dict[str, Any]: diff --git a/customgpt-client/customgpt_client/models/messages_conversation_response_500.py b/customgpt-client/customgpt_client/models/messages_conversation_response_500.py index 289fc69..80dd962 100644 --- a/customgpt-client/customgpt_client/models/messages_conversation_response_500.py +++ b/customgpt-client/customgpt_client/models/messages_conversation_response_500.py @@ -20,7 +20,7 @@ class MessagesConversationResponse500: data (Union[Unset, MessagesConversationResponse500Data]): """ - status: Union[Unset, str] = "error" + status: Union[Unset, str] = UNSET url: Union[Unset, str] = UNSET data: Union[Unset, "MessagesConversationResponse500Data"] = UNSET additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) diff --git a/customgpt-client/customgpt_client/models/messages_conversation_response_500_data.py b/customgpt-client/customgpt_client/models/messages_conversation_response_500_data.py index 8a34481..f52b058 100644 --- a/customgpt-client/customgpt_client/models/messages_conversation_response_500_data.py +++ b/customgpt-client/customgpt_client/models/messages_conversation_response_500_data.py @@ -15,7 +15,7 @@ class MessagesConversationResponse500Data: message (Union[Unset, str]): Example: Internal Server Error. """ - code: Union[Unset, str] = "500" + code: Union[Unset, str] = UNSET message: Union[Unset, str] = UNSET additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) diff --git a/customgpt-client/customgpt_client/models/open_graph_cache.py b/customgpt-client/customgpt_client/models/open_graph_cache.py deleted file mode 100644 index 14fc0b9..0000000 --- a/customgpt-client/customgpt_client/models/open_graph_cache.py +++ /dev/null @@ -1,130 +0,0 @@ -from typing import Any, Dict, List, Type, TypeVar, Union - -import attr - -from ..types import UNSET, Unset - -T = TypeVar("T", bound="OpenGraphCache") - - -@attr.s(auto_attribs=True) -class OpenGraphCache: - """ - Attributes: - id (Union[Unset, int]): The unique identifier of the citation Example: 1. - title (Union[Unset, str]): The title of the page Example: Example Domain. - page_url (Union[Unset, None, str]): The URL of the page Example: https://www.example.com. - description (Union[Unset, None, str]): The description of the page Example: This domain is for use in - illustrative examples in documents. You may use this domain in literature without prior coordination or asking - for permission.. - image (Union[Unset, None, str]): The image of the page Example: https://www.example.com/image.png. - image_width (Union[Unset, None, int]): The width of the image of the page Example: 1200. - image_height (Union[Unset, None, int]): The height of the image of the page Example: 630. - url (Union[Unset, None, str]): The URL of the page Example: https://www.example.com. - favicon (Union[Unset, None, str]): The favicon of the page Example: https://www.example.com/favicon.ico. - site_name (Union[Unset, None, str]): The site name of the page Example: Example Domain. - """ - - id: Union[Unset, int] = UNSET - title: Union[Unset, str] = UNSET - page_url: Union[Unset, None, str] = UNSET - description: Union[Unset, None, str] = UNSET - image: Union[Unset, None, str] = UNSET - image_width: Union[Unset, None, int] = UNSET - image_height: Union[Unset, None, int] = UNSET - url: Union[Unset, None, str] = UNSET - favicon: Union[Unset, None, str] = UNSET - site_name: Union[Unset, None, str] = UNSET - additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) - - def to_dict(self) -> Dict[str, Any]: - id = self.id - title = self.title - page_url = self.page_url - description = self.description - image = self.image - image_width = self.image_width - image_height = self.image_height - url = self.url - favicon = self.favicon - site_name = self.site_name - - field_dict: Dict[str, Any] = {} - field_dict.update(self.additional_properties) - field_dict.update({}) - if id is not UNSET: - field_dict["id"] = id - if title is not UNSET: - field_dict["title"] = title - if page_url is not UNSET: - field_dict["page_url"] = page_url - if description is not UNSET: - field_dict["description"] = description - if image is not UNSET: - field_dict["image"] = image - if image_width is not UNSET: - field_dict["image_width"] = image_width - if image_height is not UNSET: - field_dict["image_height"] = image_height - if url is not UNSET: - field_dict["url"] = url - if favicon is not UNSET: - field_dict["favicon"] = favicon - if site_name is not UNSET: - field_dict["site_name"] = site_name - - return field_dict - - @classmethod - def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: - id = src_dict.get("id") - - title = src_dict.get("title") - - page_url = src_dict.get("page_url") - - description = src_dict.get("description") - - image = src_dict.get("image") - - image_width = src_dict.get("image_width") - - image_height = src_dict.get("image_height") - - url = src_dict.get("url") - - favicon = src_dict.get("favicon") - - site_name = src_dict.get("site_name") - - open_graph_cache = cls( - id=id, - title=title, - page_url=page_url, - description=description, - image=image, - image_width=image_width, - image_height=image_height, - url=url, - favicon=favicon, - site_name=site_name, - ) - - open_graph_cache.additional_properties = src_dict - return open_graph_cache - - @property - def additional_keys(self) -> List[str]: - return list(self.additional_properties.keys()) - - def __getitem__(self, key: str) -> Any: - return self.additional_properties[key] - - def __setitem__(self, key: str, value: Any) -> None: - self.additional_properties[key] = value - - def __delitem__(self, key: str) -> None: - del self.additional_properties[key] - - def __contains__(self, key: str) -> bool: - return key in self.additional_properties diff --git a/customgpt-client/customgpt_client/models/page.py b/customgpt-client/customgpt_client/models/page.py index f415cb3..d06cb6f 100644 --- a/customgpt-client/customgpt_client/models/page.py +++ b/customgpt-client/customgpt_client/models/page.py @@ -25,6 +25,7 @@ class Page: index_status (Union[Unset, PageIndexStatus]): Index status of the page Default: PageIndexStatus.QUEUED. Example: queued. is_file (Union[Unset, bool]): Whether the page is a file or not Example: True. + is_refreshable (Union[Unset, bool]): Whether the page can be refreshed or not Example: True. is_file_kept (Union[Unset, bool]): Whether the file is kept after processing or not.\nNote: This is omitted in the response if the page is not a file Default: True. Example: True. filename (Union[Unset, None, str]): Filename of the page.\nNote: This is omitted in the response if the page is @@ -35,8 +36,6 @@ class Page: 00:00:00. updated_at (Union[Unset, datetime.datetime]): Date and time when the page was updated Example: 2021-01-01 00:00:00. - deleted_at (Union[Unset, datetime.datetime]): Date and time when the page was deleted Example: 2021-01-01 - 00:00:00. """ id: Union[Unset, int] = UNSET @@ -44,15 +43,15 @@ class Page: page_url_hash: Union[Unset, str] = UNSET project_id: Union[Unset, int] = UNSET s3_path: Union[Unset, None, str] = UNSET - crawl_status: Union[Unset, str] = "queued" - index_status: Union[Unset, str] = "queued" + crawl_status: Union[Unset, str] = UNSET + index_status: Union[Unset, str] = UNSET is_file: Union[Unset, bool] = False + is_refreshable: Union[Unset, bool] = False is_file_kept: Union[Unset, bool] = True filename: Union[Unset, None, str] = UNSET filesize: Union[Unset, None, int] = UNSET created_at: Union[Unset, datetime.datetime] = UNSET updated_at: Union[Unset, datetime.datetime] = UNSET - deleted_at: Union[Unset, datetime.datetime] = UNSET additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) def to_dict(self) -> Dict[str, Any]: @@ -69,8 +68,12 @@ def to_dict(self) -> Dict[str, Any]: if not isinstance(self.index_status, Unset): index_status = self.index_status - is_file = self.is_file - is_file_kept = self.is_file_kept + is_file = True if self.is_file else False + + is_refreshable = True if self.is_refreshable else False + + is_file_kept = True if self.is_file_kept else False + filename = self.filename filesize = self.filesize created_at: Union[Unset, str] = UNSET @@ -81,10 +84,6 @@ def to_dict(self) -> Dict[str, Any]: if not isinstance(self.updated_at, Unset): updated_at = self.updated_at.isoformat() - deleted_at: Union[Unset, str] = UNSET - if not isinstance(self.deleted_at, Unset): - deleted_at = self.deleted_at.isoformat() - field_dict: Dict[str, Any] = {} field_dict.update(self.additional_properties) field_dict.update({}) @@ -104,6 +103,8 @@ def to_dict(self) -> Dict[str, Any]: field_dict["index_status"] = index_status if is_file is not UNSET: field_dict["is_file"] = is_file + if is_refreshable is not UNSET: + field_dict["is_refreshable"] = is_refreshable if is_file_kept is not UNSET: field_dict["is_file_kept"] = is_file_kept if filename is not UNSET: @@ -114,8 +115,6 @@ def to_dict(self) -> Dict[str, Any]: field_dict["created_at"] = created_at if updated_at is not UNSET: field_dict["updated_at"] = updated_at - if deleted_at is not UNSET: - field_dict["deleted_at"] = deleted_at return field_dict @@ -137,6 +136,8 @@ def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: is_file = src_dict.get("is_file") + is_refreshable = src_dict.get("is_refreshable") + is_file_kept = src_dict.get("is_file_kept") filename = src_dict.get("filename") @@ -157,13 +158,6 @@ def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: else: updated_at = isoparse(_updated_at) - _deleted_at = src_dict.get("deleted_at") - deleted_at: Union[Unset, datetime.datetime] - if isinstance(_deleted_at, Unset): - deleted_at = UNSET - else: - deleted_at = isoparse(_deleted_at) - page = cls( id=id, page_url=page_url, @@ -173,12 +167,12 @@ def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: crawl_status=crawl_status, index_status=index_status, is_file=is_file, + is_refreshable=is_refreshable, is_file_kept=is_file_kept, filename=filename, filesize=filesize, created_at=created_at, updated_at=updated_at, - deleted_at=deleted_at, ) page.additional_properties = src_dict diff --git a/customgpt-client/customgpt_client/models/page_metadata.py b/customgpt-client/customgpt_client/models/page_metadata.py index 801aa51..3578d77 100644 --- a/customgpt-client/customgpt_client/models/page_metadata.py +++ b/customgpt-client/customgpt_client/models/page_metadata.py @@ -11,21 +11,24 @@ class PageMetadata: """ Attributes: - url (Union[Unset, str]): The URL of the page Example: https://www.example.com. - title (Union[Unset, str]): The title of the page Example: Example Domain. - description (Union[Unset, str]): The description of the page Example: This domain is for use in illustrative - examples in documents. You may use this domain in literature without prior coordination or asking for - permission.. - image (Union[Unset, str]): The image of the page Example: https://www.example.com/image.png. + id (Union[Unset, int]): The unique identifier of the page Example: 1. + url (Union[Unset, None, str]): The URL of the page Example: https://www.example.com. + title (Union[Unset, None, str]): The title of the page Example: Example Domain. + description (Union[Unset, None, str]): The description of the page Example: This domain is for use in + illustrative examples in documents. You may use this domain in literature without prior coordination or asking + for permission.. + image (Union[Unset, None, str]): The image of the page Example: https://www.example.com/image.png. """ - url: Union[Unset, str] = UNSET - title: Union[Unset, str] = UNSET - description: Union[Unset, str] = UNSET - image: Union[Unset, str] = UNSET + id: Union[Unset, int] = UNSET + url: Union[Unset, None, str] = UNSET + title: Union[Unset, None, str] = UNSET + description: Union[Unset, None, str] = UNSET + image: Union[Unset, None, str] = UNSET additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) def to_dict(self) -> Dict[str, Any]: + id = self.id url = self.url title = self.title description = self.description @@ -34,6 +37,8 @@ def to_dict(self) -> Dict[str, Any]: field_dict: Dict[str, Any] = {} field_dict.update(self.additional_properties) field_dict.update({}) + if id is not UNSET: + field_dict["id"] = id if url is not UNSET: field_dict["url"] = url if title is not UNSET: @@ -47,6 +52,8 @@ def to_dict(self) -> Dict[str, Any]: @classmethod def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + id = src_dict.get("id") + url = src_dict.get("url") title = src_dict.get("title") @@ -56,6 +63,7 @@ def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: image = src_dict.get("image") page_metadata = cls( + id=id, url=url, title=title, description=description, diff --git a/customgpt-client/customgpt_client/models/preview_citation_response_400.py b/customgpt-client/customgpt_client/models/preview_citation_response_400.py index 4f4ddf7..696548d 100644 --- a/customgpt-client/customgpt_client/models/preview_citation_response_400.py +++ b/customgpt-client/customgpt_client/models/preview_citation_response_400.py @@ -20,7 +20,7 @@ class PreviewCitationResponse400: data (Union[Unset, PreviewCitationResponse400Data]): """ - status: Union[Unset, str] = "error" + status: Union[Unset, str] = UNSET url: Union[Unset, str] = UNSET data: Union[Unset, "PreviewCitationResponse400Data"] = UNSET additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) diff --git a/customgpt-client/customgpt_client/models/preview_citation_response_400_data.py b/customgpt-client/customgpt_client/models/preview_citation_response_400_data.py index 6fef085..7a417b5 100644 --- a/customgpt-client/customgpt_client/models/preview_citation_response_400_data.py +++ b/customgpt-client/customgpt_client/models/preview_citation_response_400_data.py @@ -15,7 +15,7 @@ class PreviewCitationResponse400Data: message (Union[Unset, str]): The error message Example: Project id must be integer. """ - code: Union[Unset, str] = "400" + code: Union[Unset, str] = UNSET message: Union[Unset, str] = UNSET additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) diff --git a/customgpt-client/customgpt_client/models/preview_citation_response_401.py b/customgpt-client/customgpt_client/models/preview_citation_response_401.py index 2794460..66e5a43 100644 --- a/customgpt-client/customgpt_client/models/preview_citation_response_401.py +++ b/customgpt-client/customgpt_client/models/preview_citation_response_401.py @@ -20,7 +20,7 @@ class PreviewCitationResponse401: data (Union[Unset, PreviewCitationResponse401Data]): """ - status: Union[Unset, str] = "error" + status: Union[Unset, str] = UNSET url: Union[Unset, str] = UNSET data: Union[Unset, "PreviewCitationResponse401Data"] = UNSET additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) diff --git a/customgpt-client/customgpt_client/models/preview_citation_response_401_data.py b/customgpt-client/customgpt_client/models/preview_citation_response_401_data.py index c5f1692..c9eccf9 100644 --- a/customgpt-client/customgpt_client/models/preview_citation_response_401_data.py +++ b/customgpt-client/customgpt_client/models/preview_citation_response_401_data.py @@ -15,7 +15,7 @@ class PreviewCitationResponse401Data: message (Union[Unset, str]): Example: API Token is either missing or invalid. """ - code: Union[Unset, str] = "401" + code: Union[Unset, str] = UNSET message: Union[Unset, str] = UNSET additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) diff --git a/customgpt-client/customgpt_client/models/preview_citation_response_404.py b/customgpt-client/customgpt_client/models/preview_citation_response_404.py index 85da41a..50b1af9 100644 --- a/customgpt-client/customgpt_client/models/preview_citation_response_404.py +++ b/customgpt-client/customgpt_client/models/preview_citation_response_404.py @@ -20,7 +20,7 @@ class PreviewCitationResponse404: data (Union[Unset, PreviewCitationResponse404Data]): """ - status: Union[Unset, str] = "error" + status: Union[Unset, str] = UNSET url: Union[Unset, str] = UNSET data: Union[Unset, "PreviewCitationResponse404Data"] = UNSET additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) diff --git a/customgpt-client/customgpt_client/models/preview_citation_response_404_data.py b/customgpt-client/customgpt_client/models/preview_citation_response_404_data.py index 5f4fa3e..726db3d 100644 --- a/customgpt-client/customgpt_client/models/preview_citation_response_404_data.py +++ b/customgpt-client/customgpt_client/models/preview_citation_response_404_data.py @@ -16,8 +16,8 @@ class PreviewCitationResponse404Data: found. """ - code: Union[Unset, str] = "404" - message: Union[Unset, str] = "Page with id 1 not found" + code: Union[Unset, str] = UNSET + message: Union[Unset, str] = UNSET additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) def to_dict(self) -> Dict[str, Any]: diff --git a/customgpt-client/customgpt_client/models/preview_citation_response_500.py b/customgpt-client/customgpt_client/models/preview_citation_response_500.py index bd9014c..0189451 100644 --- a/customgpt-client/customgpt_client/models/preview_citation_response_500.py +++ b/customgpt-client/customgpt_client/models/preview_citation_response_500.py @@ -20,7 +20,7 @@ class PreviewCitationResponse500: data (Union[Unset, PreviewCitationResponse500Data]): """ - status: Union[Unset, str] = "error" + status: Union[Unset, str] = UNSET url: Union[Unset, str] = UNSET data: Union[Unset, "PreviewCitationResponse500Data"] = UNSET additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) diff --git a/customgpt-client/customgpt_client/models/preview_citation_response_500_data.py b/customgpt-client/customgpt_client/models/preview_citation_response_500_data.py index cbcf3ca..135a20d 100644 --- a/customgpt-client/customgpt_client/models/preview_citation_response_500_data.py +++ b/customgpt-client/customgpt_client/models/preview_citation_response_500_data.py @@ -15,7 +15,7 @@ class PreviewCitationResponse500Data: message (Union[Unset, str]): Example: Internal Server Error. """ - code: Union[Unset, str] = "500" + code: Union[Unset, str] = UNSET message: Union[Unset, str] = UNSET additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) diff --git a/customgpt-client/customgpt_client/models/project.py b/customgpt-client/customgpt_client/models/project.py index 7dc4e16..56edda8 100644 --- a/customgpt-client/customgpt_client/models/project.py +++ b/customgpt-client/customgpt_client/models/project.py @@ -18,12 +18,11 @@ class Project: sitemap_path (Union[Unset, str]): Project sitemap Example: https://www.example.com/sitemap.xml. is_chat_active (Union[Unset, bool]): Whether the chat bot is active or not Example: True. user_id (Union[Unset, int]): User ID of the project owner Example: 1. + team_id (Union[Unset, int]): Team ID of the project owner Example: 1. created_at (Union[Unset, datetime.datetime]): Date and time when the project was created Default: isoparse('2023-05-08 13:06:55'). Example: 2021-01-01 00:00:00. updated_at (Union[Unset, datetime.datetime]): Date and time when the project was last updated Default: isoparse('2023-05-08 13:06:55'). Example: 2021-01-01 00:00:00. - deleted_at (Union[Unset, None, datetime.datetime]): Date and time when the project was deleted Example: - 2021-01-01 00:00:00. type (Union[Unset, ProjectType]): Project type Default: ProjectType.SITEMAP. Example: SITEMAP. is_shared (Union[Unset, bool]): Whether the project is shared or not Example: True. shareable_slug (Union[Unset, None, str]): Shareable slug that can be used to share the project Example: @@ -38,10 +37,10 @@ class Project: sitemap_path: Union[Unset, str] = UNSET is_chat_active: Union[Unset, bool] = False user_id: Union[Unset, int] = UNSET + team_id: Union[Unset, int] = UNSET created_at: Union[Unset, datetime.datetime] = isoparse("2023-05-08 13:06:55") updated_at: Union[Unset, datetime.datetime] = isoparse("2023-05-08 13:06:55") - deleted_at: Union[Unset, None, datetime.datetime] = UNSET - type: Union[Unset, str] = "SITEMAP" + type: Union[Unset, str] = UNSET is_shared: Union[Unset, bool] = False shareable_slug: Union[Unset, None, str] = UNSET shareable_link: Union[Unset, None, str] = UNSET @@ -53,8 +52,10 @@ def to_dict(self) -> Dict[str, Any]: id = self.id project_name = self.project_name sitemap_path = self.sitemap_path - is_chat_active = self.is_chat_active + is_chat_active = True if self.is_chat_active else False + user_id = self.user_id + team_id = self.team_id created_at: Union[Unset, str] = UNSET if not isinstance(self.created_at, Unset): created_at = self.created_at.isoformat() @@ -63,15 +64,12 @@ def to_dict(self) -> Dict[str, Any]: if not isinstance(self.updated_at, Unset): updated_at = self.updated_at.isoformat() - deleted_at: Union[Unset, None, str] = UNSET - if not isinstance(self.deleted_at, Unset): - deleted_at = self.deleted_at.isoformat() if self.deleted_at else None - type: Union[Unset, str] = UNSET if not isinstance(self.type, Unset): type = self.type - is_shared = self.is_shared + is_shared = True if self.is_shared else False + shareable_slug = self.shareable_slug shareable_link = self.shareable_link embed_code = self.embed_code @@ -90,12 +88,12 @@ def to_dict(self) -> Dict[str, Any]: field_dict["is_chat_active"] = is_chat_active if user_id is not UNSET: field_dict["user_id"] = user_id + if team_id is not UNSET: + field_dict["team_id"] = team_id if created_at is not UNSET: field_dict["created_at"] = created_at if updated_at is not UNSET: field_dict["updated_at"] = updated_at - if deleted_at is not UNSET: - field_dict["deleted_at"] = deleted_at if type is not UNSET: field_dict["type"] = type if is_shared is not UNSET: @@ -123,6 +121,8 @@ def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: user_id = src_dict.get("user_id") + team_id = src_dict.get("team_id") + _created_at = src_dict.get("created_at") created_at: Union[Unset, datetime.datetime] if isinstance(_created_at, Unset): @@ -137,15 +137,6 @@ def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: else: updated_at = isoparse(_updated_at) - _deleted_at = src_dict.get("deleted_at") - deleted_at: Union[Unset, None, datetime.datetime] - if _deleted_at is None: - deleted_at = None - elif isinstance(_deleted_at, Unset): - deleted_at = UNSET - else: - deleted_at = isoparse(_deleted_at) - type = src_dict.get("type") is_shared = src_dict.get("is_shared") @@ -164,9 +155,9 @@ def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: sitemap_path=sitemap_path, is_chat_active=is_chat_active, user_id=user_id, + team_id=team_id, created_at=created_at, updated_at=updated_at, - deleted_at=deleted_at, type=type, is_shared=is_shared, shareable_slug=shareable_slug, diff --git a/customgpt-client/customgpt_client/models/project_analytics_analysis.py b/customgpt-client/customgpt_client/models/project_analytics_analysis.py new file mode 100644 index 0000000..22058cc --- /dev/null +++ b/customgpt-client/customgpt_client/models/project_analytics_analysis.py @@ -0,0 +1,126 @@ +from typing import TYPE_CHECKING, Any, Dict, List, Type, TypeVar, Union + +import attr + +from ..types import UNSET, Unset + +if TYPE_CHECKING: + from ..models.project_analytics_analysis_conversations_item import ProjectAnalyticsAnalysisConversationsItem + from ..models.project_analytics_analysis_queries_item import ProjectAnalyticsAnalysisQueriesItem + from ..models.project_analytics_analysis_queries_per_conversation_item import ( + ProjectAnalyticsAnalysisQueriesPerConversationItem, + ) + + +T = TypeVar("T", bound="ProjectAnalyticsAnalysis") + + +@attr.s(auto_attribs=True) +class ProjectAnalyticsAnalysis: + """ + Attributes: + queries (Union[Unset, List['ProjectAnalyticsAnalysisQueriesItem']]): + conversations (Union[Unset, List['ProjectAnalyticsAnalysisConversationsItem']]): + queries_per_conversation (Union[Unset, List['ProjectAnalyticsAnalysisQueriesPerConversationItem']]): + """ + + queries: Union[Unset, List["ProjectAnalyticsAnalysisQueriesItem"]] = UNSET + conversations: Union[Unset, List["ProjectAnalyticsAnalysisConversationsItem"]] = UNSET + queries_per_conversation: Union[Unset, List["ProjectAnalyticsAnalysisQueriesPerConversationItem"]] = UNSET + additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + queries: Union[Unset, List[Dict[str, Any]]] = UNSET + if not isinstance(self.queries, Unset): + queries = [] + for queries_item_data in self.queries: + queries_item = queries_item_data.to_dict() + + queries.append(queries_item) + + conversations: Union[Unset, List[Dict[str, Any]]] = UNSET + if not isinstance(self.conversations, Unset): + conversations = [] + for conversations_item_data in self.conversations: + conversations_item = conversations_item_data.to_dict() + + conversations.append(conversations_item) + + queries_per_conversation: Union[Unset, List[Dict[str, Any]]] = UNSET + if not isinstance(self.queries_per_conversation, Unset): + queries_per_conversation = [] + for queries_per_conversation_item_data in self.queries_per_conversation: + queries_per_conversation_item = queries_per_conversation_item_data.to_dict() + + queries_per_conversation.append(queries_per_conversation_item) + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if queries is not UNSET: + for index, field_value in enumerate(queries): + field_dict[f"queries[{index}]"] = field_value + if conversations is not UNSET: + for index, field_value in enumerate(conversations): + field_dict[f"conversations[{index}]"] = field_value + if queries_per_conversation is not UNSET: + for index, field_value in enumerate(queries_per_conversation): + field_dict[f"queries_per_conversation[{index}]"] = field_value + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + from ..models.project_analytics_analysis_conversations_item import ProjectAnalyticsAnalysisConversationsItem + from ..models.project_analytics_analysis_queries_item import ProjectAnalyticsAnalysisQueriesItem + from ..models.project_analytics_analysis_queries_per_conversation_item import ( + ProjectAnalyticsAnalysisQueriesPerConversationItem, + ) + + queries = [] + _queries = src_dict.get("queries") + for queries_item_data in _queries or []: + queries_item = ProjectAnalyticsAnalysisQueriesItem.from_dict(queries_item_data) + + queries.append(queries_item) + + conversations = [] + _conversations = src_dict.get("conversations") + for conversations_item_data in _conversations or []: + conversations_item = ProjectAnalyticsAnalysisConversationsItem.from_dict(conversations_item_data) + + conversations.append(conversations_item) + + queries_per_conversation = [] + _queries_per_conversation = src_dict.get("queries_per_conversation") + for queries_per_conversation_item_data in _queries_per_conversation or []: + queries_per_conversation_item = ProjectAnalyticsAnalysisQueriesPerConversationItem.from_dict( + queries_per_conversation_item_data + ) + + queries_per_conversation.append(queries_per_conversation_item) + + project_analytics_analysis = cls( + queries=queries, + conversations=conversations, + queries_per_conversation=queries_per_conversation, + ) + + project_analytics_analysis.additional_properties = src_dict + return project_analytics_analysis + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/customgpt-client/customgpt_client/models/project_analytics_analysis_conversations_item.py b/customgpt-client/customgpt_client/models/project_analytics_analysis_conversations_item.py new file mode 100644 index 0000000..0d316ae --- /dev/null +++ b/customgpt-client/customgpt_client/models/project_analytics_analysis_conversations_item.py @@ -0,0 +1,64 @@ +from typing import Any, Dict, List, Type, TypeVar, Union + +import attr + +from ..types import UNSET, Unset + +T = TypeVar("T", bound="ProjectAnalyticsAnalysisConversationsItem") + + +@attr.s(auto_attribs=True) +class ProjectAnalyticsAnalysisConversationsItem: + """ + Attributes: + queries_number (Union[Unset, int]): Example: 5. + created_at_interval (Union[Unset, str]): Example: Sat. + """ + + queries_number: Union[Unset, int] = UNSET + created_at_interval: Union[Unset, str] = UNSET + additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + queries_number = self.queries_number + created_at_interval = self.created_at_interval + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if queries_number is not UNSET: + field_dict["queries_number"] = queries_number + if created_at_interval is not UNSET: + field_dict["created_at_interval"] = created_at_interval + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + queries_number = src_dict.get("queries_number") + + created_at_interval = src_dict.get("created_at_interval") + + project_analytics_analysis_conversations_item = cls( + queries_number=queries_number, + created_at_interval=created_at_interval, + ) + + project_analytics_analysis_conversations_item.additional_properties = src_dict + return project_analytics_analysis_conversations_item + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/customgpt-client/customgpt_client/models/project_analytics_analysis_queries_item.py b/customgpt-client/customgpt_client/models/project_analytics_analysis_queries_item.py new file mode 100644 index 0000000..ce65aa7 --- /dev/null +++ b/customgpt-client/customgpt_client/models/project_analytics_analysis_queries_item.py @@ -0,0 +1,64 @@ +from typing import Any, Dict, List, Type, TypeVar, Union + +import attr + +from ..types import UNSET, Unset + +T = TypeVar("T", bound="ProjectAnalyticsAnalysisQueriesItem") + + +@attr.s(auto_attribs=True) +class ProjectAnalyticsAnalysisQueriesItem: + """ + Attributes: + queries_number (Union[Unset, int]): Example: 5. + created_at_interval (Union[Unset, str]): Example: Sat. + """ + + queries_number: Union[Unset, int] = UNSET + created_at_interval: Union[Unset, str] = UNSET + additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + queries_number = self.queries_number + created_at_interval = self.created_at_interval + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if queries_number is not UNSET: + field_dict["queries_number"] = queries_number + if created_at_interval is not UNSET: + field_dict["created_at_interval"] = created_at_interval + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + queries_number = src_dict.get("queries_number") + + created_at_interval = src_dict.get("created_at_interval") + + project_analytics_analysis_queries_item = cls( + queries_number=queries_number, + created_at_interval=created_at_interval, + ) + + project_analytics_analysis_queries_item.additional_properties = src_dict + return project_analytics_analysis_queries_item + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/customgpt-client/customgpt_client/models/project_analytics_analysis_queries_per_conversation_item.py b/customgpt-client/customgpt_client/models/project_analytics_analysis_queries_per_conversation_item.py new file mode 100644 index 0000000..f8d774f --- /dev/null +++ b/customgpt-client/customgpt_client/models/project_analytics_analysis_queries_per_conversation_item.py @@ -0,0 +1,64 @@ +from typing import Any, Dict, List, Type, TypeVar, Union + +import attr + +from ..types import UNSET, Unset + +T = TypeVar("T", bound="ProjectAnalyticsAnalysisQueriesPerConversationItem") + + +@attr.s(auto_attribs=True) +class ProjectAnalyticsAnalysisQueriesPerConversationItem: + """ + Attributes: + queries_number (Union[Unset, int]): Example: 1.5. + created_at_interval (Union[Unset, str]): Example: Sat. + """ + + queries_number: Union[Unset, int] = UNSET + created_at_interval: Union[Unset, str] = UNSET + additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + queries_number = self.queries_number + created_at_interval = self.created_at_interval + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if queries_number is not UNSET: + field_dict["queries_number"] = queries_number + if created_at_interval is not UNSET: + field_dict["created_at_interval"] = created_at_interval + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + queries_number = src_dict.get("queries_number") + + created_at_interval = src_dict.get("created_at_interval") + + project_analytics_analysis_queries_per_conversation_item = cls( + queries_number=queries_number, + created_at_interval=created_at_interval, + ) + + project_analytics_analysis_queries_per_conversation_item.additional_properties = src_dict + return project_analytics_analysis_queries_per_conversation_item + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/customgpt-client/customgpt_client/models/project_analytics_conversation.py b/customgpt-client/customgpt_client/models/project_analytics_conversation.py new file mode 100644 index 0000000..4040fe1 --- /dev/null +++ b/customgpt-client/customgpt_client/models/project_analytics_conversation.py @@ -0,0 +1,64 @@ +from typing import Any, Dict, List, Type, TypeVar, Union + +import attr + +from ..types import UNSET, Unset + +T = TypeVar("T", bound="ProjectAnalyticsConversation") + + +@attr.s(auto_attribs=True) +class ProjectAnalyticsConversation: + """ + Attributes: + total (Union[Unset, int]): Total number of conversations Example: 10. + average_queries_per_conversation (Union[Unset, int]): Average number of queries per conversations Example: 1.2. + """ + + total: Union[Unset, int] = UNSET + average_queries_per_conversation: Union[Unset, int] = UNSET + additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + total = self.total + average_queries_per_conversation = self.average_queries_per_conversation + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if total is not UNSET: + field_dict["total"] = total + if average_queries_per_conversation is not UNSET: + field_dict["average_queries_per_conversation"] = average_queries_per_conversation + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + total = src_dict.get("total") + + average_queries_per_conversation = src_dict.get("average_queries_per_conversation") + + project_analytics_conversation = cls( + total=total, + average_queries_per_conversation=average_queries_per_conversation, + ) + + project_analytics_conversation.additional_properties = src_dict + return project_analytics_conversation + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/customgpt-client/customgpt_client/models/project_analytics_query.py b/customgpt-client/customgpt_client/models/project_analytics_query.py new file mode 100644 index 0000000..ce20f8d --- /dev/null +++ b/customgpt-client/customgpt_client/models/project_analytics_query.py @@ -0,0 +1,83 @@ +from typing import TYPE_CHECKING, Any, Dict, List, Type, TypeVar, Union + +import attr + +from ..types import UNSET, Unset + +if TYPE_CHECKING: + from ..models.project_analytics_query_query_status_item import ProjectAnalyticsQueryQueryStatusItem + + +T = TypeVar("T", bound="ProjectAnalyticsQuery") + + +@attr.s(auto_attribs=True) +class ProjectAnalyticsQuery: + """ + Attributes: + total (Union[Unset, int]): Total number of queries over all conversations Example: 10. + query_status (Union[Unset, List['ProjectAnalyticsQueryQueryStatusItem']]): Number of successful and failed + queries over all conversations + """ + + total: Union[Unset, int] = UNSET + query_status: Union[Unset, List["ProjectAnalyticsQueryQueryStatusItem"]] = UNSET + additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + total = self.total + query_status: Union[Unset, List[Dict[str, Any]]] = UNSET + if not isinstance(self.query_status, Unset): + query_status = [] + for query_status_item_data in self.query_status: + query_status_item = query_status_item_data.to_dict() + + query_status.append(query_status_item) + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if total is not UNSET: + field_dict["total"] = total + if query_status is not UNSET: + for index, field_value in enumerate(query_status): + field_dict[f"query_status[{index}]"] = field_value + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + from ..models.project_analytics_query_query_status_item import ProjectAnalyticsQueryQueryStatusItem + + total = src_dict.get("total") + + query_status = [] + _query_status = src_dict.get("query_status") + for query_status_item_data in _query_status or []: + query_status_item = ProjectAnalyticsQueryQueryStatusItem.from_dict(query_status_item_data) + + query_status.append(query_status_item) + + project_analytics_query = cls( + total=total, + query_status=query_status, + ) + + project_analytics_query.additional_properties = src_dict + return project_analytics_query + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/customgpt-client/customgpt_client/models/project_analytics_query_query_status_item.py b/customgpt-client/customgpt_client/models/project_analytics_query_query_status_item.py new file mode 100644 index 0000000..148a47f --- /dev/null +++ b/customgpt-client/customgpt_client/models/project_analytics_query_query_status_item.py @@ -0,0 +1,67 @@ +from typing import Any, Dict, List, Type, TypeVar, Union + +import attr + +from ..types import UNSET, Unset + +T = TypeVar("T", bound="ProjectAnalyticsQueryQueryStatusItem") + + +@attr.s(auto_attribs=True) +class ProjectAnalyticsQueryQueryStatusItem: + """ + Attributes: + status (Union[Unset, ProjectAnalyticsQueryQueryStatusItemStatus]): + count (Union[Unset, int]): Example: 2. + """ + + status: Union[Unset, str] = UNSET + count: Union[Unset, int] = UNSET + additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + status: Union[Unset, str] = UNSET + if not isinstance(self.status, Unset): + status = self.status + + count = self.count + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if status is not UNSET: + field_dict["status"] = status + if count is not UNSET: + field_dict["count"] = count + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + status = src_dict.get("status") + + count = src_dict.get("count") + + project_analytics_query_query_status_item = cls( + status=status, + count=count, + ) + + project_analytics_query_query_status_item.additional_properties = src_dict + return project_analytics_query_query_status_item + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/customgpt-client/customgpt_client/models/project_analytics_query_query_status_item_status.py b/customgpt-client/customgpt_client/models/project_analytics_query_query_status_item_status.py new file mode 100644 index 0000000..52e4f36 --- /dev/null +++ b/customgpt-client/customgpt_client/models/project_analytics_query_query_status_item_status.py @@ -0,0 +1,9 @@ +from enum import Enum + + +class ProjectAnalyticsQueryQueryStatusItemStatus(str, Enum): + FAILED = "failed" + SUCCESS = "success" + + def __str__(self) -> str: + return str(self.value) diff --git a/customgpt-client/customgpt_client/models/project_analytics_traffic.py b/customgpt-client/customgpt_client/models/project_analytics_traffic.py new file mode 100644 index 0000000..044c37f --- /dev/null +++ b/customgpt-client/customgpt_client/models/project_analytics_traffic.py @@ -0,0 +1,74 @@ +from typing import TYPE_CHECKING, Any, Dict, List, Type, TypeVar, Union + +import attr + +from ..types import UNSET, Unset + +if TYPE_CHECKING: + from ..models.project_analytics_traffic_sources_item import ProjectAnalyticsTrafficSourcesItem + + +T = TypeVar("T", bound="ProjectAnalyticsTraffic") + + +@attr.s(auto_attribs=True) +class ProjectAnalyticsTraffic: + """ + Attributes: + sources (Union[Unset, List['ProjectAnalyticsTrafficSourcesItem']]): + """ + + sources: Union[Unset, List["ProjectAnalyticsTrafficSourcesItem"]] = UNSET + additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + sources: Union[Unset, List[Dict[str, Any]]] = UNSET + if not isinstance(self.sources, Unset): + sources = [] + for sources_item_data in self.sources: + sources_item = sources_item_data.to_dict() + + sources.append(sources_item) + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if sources is not UNSET: + for index, field_value in enumerate(sources): + field_dict[f"sources[{index}]"] = field_value + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + from ..models.project_analytics_traffic_sources_item import ProjectAnalyticsTrafficSourcesItem + + sources = [] + _sources = src_dict.get("sources") + for sources_item_data in _sources or []: + sources_item = ProjectAnalyticsTrafficSourcesItem.from_dict(sources_item_data) + + sources.append(sources_item) + + project_analytics_traffic = cls( + sources=sources, + ) + + project_analytics_traffic.additional_properties = src_dict + return project_analytics_traffic + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/customgpt-client/customgpt_client/models/project_analytics_traffic_sources_item.py b/customgpt-client/customgpt_client/models/project_analytics_traffic_sources_item.py new file mode 100644 index 0000000..efc4294 --- /dev/null +++ b/customgpt-client/customgpt_client/models/project_analytics_traffic_sources_item.py @@ -0,0 +1,67 @@ +from typing import Any, Dict, List, Type, TypeVar, Union + +import attr + +from ..types import UNSET, Unset + +T = TypeVar("T", bound="ProjectAnalyticsTrafficSourcesItem") + + +@attr.s(auto_attribs=True) +class ProjectAnalyticsTrafficSourcesItem: + """ + Attributes: + request_source (Union[Unset, ProjectAnalyticsTrafficSourcesItemRequestSource]): Example: web. + request_source_number (Union[Unset, int]): Example: 20. + """ + + request_source: Union[Unset, str] = UNSET + request_source_number: Union[Unset, int] = UNSET + additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + request_source: Union[Unset, str] = UNSET + if not isinstance(self.request_source, Unset): + request_source = self.request_source + + request_source_number = self.request_source_number + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if request_source is not UNSET: + field_dict["request_source"] = request_source + if request_source_number is not UNSET: + field_dict["request_source_number"] = request_source_number + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + request_source = src_dict.get("request_source") + + request_source_number = src_dict.get("request_source_number") + + project_analytics_traffic_sources_item = cls( + request_source=request_source, + request_source_number=request_source_number, + ) + + project_analytics_traffic_sources_item.additional_properties = src_dict + return project_analytics_traffic_sources_item + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/customgpt-client/customgpt_client/models/project_analytics_traffic_sources_item_request_source.py b/customgpt-client/customgpt_client/models/project_analytics_traffic_sources_item_request_source.py new file mode 100644 index 0000000..ea168d9 --- /dev/null +++ b/customgpt-client/customgpt_client/models/project_analytics_traffic_sources_item_request_source.py @@ -0,0 +1,14 @@ +from enum import Enum + + +class ProjectAnalyticsTrafficSourcesItemRequestSource(str, Enum): + AI_ASSISTANT = "ai-assistant" + API = "api" + EMBED = "embed" + INSTANT_VIEWER = "instant-viewer" + LIVECHAT = "livechat" + SGE = "sge" + WEB = "web" + + def __str__(self) -> str: + return str(self.value) diff --git a/customgpt-client/customgpt_client/models/project_plugin.py b/customgpt-client/customgpt_client/models/project_plugin.py index 5c26155..1e160f2 100644 --- a/customgpt-client/customgpt_client/models/project_plugin.py +++ b/customgpt-client/customgpt_client/models/project_plugin.py @@ -34,7 +34,7 @@ def to_dict(self) -> Dict[str, Any]: keywords = self.keywords description = self.description logo = self.logo - is_active = self.is_active + is_active = True if self.is_active else False field_dict: Dict[str, Any] = {} field_dict.update(self.additional_properties) diff --git a/customgpt-client/customgpt_client/models/project_settings.py b/customgpt-client/customgpt_client/models/project_settings.py index 96bc73f..f50c9b5 100644 --- a/customgpt-client/customgpt_client/models/project_settings.py +++ b/customgpt-client/customgpt_client/models/project_settings.py @@ -27,9 +27,10 @@ class ProjectSettings: ChatGPT responds in. That is controlled by the user's question. So a user asking in Portuguese, will most likely get a response from ChatGPT in Portuguese. Example: en. chatbot_color (Union[Unset, str]): Color of the chatbot in hex format Example: #000000. - persona_instructions (Union[Unset, None, str]): [Advanced Users] Customize your chatbot behavior by adjusting - the system parameter to control its personality traits and role. Example: You are a custom chatbot assistant - called CustomGPT, a friendly lawyer who answers questions based on the given context.. + chatbot_toolbar_color (Union[Unset, str]): Color of the chatbot toolbar in hex format Example: #000000. + persona_instructions (Union[Unset, None, str]): Customize your chatbot behavior by adjusting the system + parameter to control its personality traits and role. Example: You are a custom chatbot assistant called + CustomGPT.ai, a friendly lawyer who answers questions based on the given context.. citations_answer_source_label_msg (Union[Unset, None, str]): This is the message shown to indicate where the response came from. You can customize this message based on your business or language. Example: Where did this answer come from?. @@ -43,38 +44,55 @@ class ProjectSettings: bot is taking a siesta. This usually happens when OpenAI is down! Please try again later.. is_loading_indicator_enabled (Union[Unset, None, bool]): Show animated loading indicator while waiting for a response from the chatbot Default: True. Example: True. - enable_citations (Union[Unset, None, bool]): Each chatbot response shows an option for the user to see the - sources/citations from your content from which the response was generated. Default: True. Example: True. + enable_citations (Union[Unset, None, ProjectSettingsEnableCitations]): Each chatbot response shows an option for + the user to see the sources/citations from your content from which the response was generated. Default: + ProjectSettingsEnableCitations.VALUE_3. Example: 3. + enable_feedbacks (Union[Unset, None, bool]): Each chatbot response shows an thumbs up/down for the user to left + own feedback. Default: True. Example: True. citations_view_type (Union[Unset, None, ProjectSettingsCitationsViewType]): Control how citations are shown. By default, the user can initiate to see the citations. You can choose to have it "Auto Shown" or "Auto Hide" Default: ProjectSettingsCitationsViewType.USER. Example: user. no_answer_message (Union[Unset, None, str]): This is the message shown when the bot cannot answer. You can - customize it to a message asking the user to contact customer support or leave their email / phone. Example: - Sorry, I don't have an answer for that.. + customize it to a message asking the user to contact customer support or leave their email / phone. Default: + "I'm sorry, I don't know the answer". Example: Sorry, I don't have an answer for that.. ending_message (Union[Unset, None, str]): You can instruct ChatGPT to end every response with some text like asking "Please email us for further support" (Not recommended for most use cases) Example: Please email us for further support. remove_branding (Union[Unset, None, bool]): Controls what branding is shown at the bottom of the chatbot. + enable_recaptcha_for_public_chatbots (Union[Unset, None, bool]): Should we check messages from guests with + Recaptcha when your chatbot is publicly available (i.e. shared or embedded). + chatbot_model (Union[Unset, None, ProjectSettingsChatbotModel]): This is the model used by the chatbot. You can + choose a different model to suit your needs. Default: ProjectSettingsChatbotModel.GPT_4. Example: gpt-4. + is_selling_enabled (Union[Unset, None, bool]): Enable selling of chatbot for monetization + license_slug (Union[Unset, None, bool]): License slug used for monetization + selling_url (Union[Unset, None, str]): Selling URL used for monetization """ chatbot_avatar: Union[Unset, str] = UNSET chatbot_background: Union[Unset, str] = UNSET default_prompt: Union[Unset, str] = UNSET example_questions: Union[Unset, List[str]] = UNSET - response_source: Union[Unset, str] = "own_content" + response_source: Union[Unset, str] = UNSET chatbot_msg_lang: Union[Unset, str] = UNSET chatbot_color: Union[Unset, str] = UNSET + chatbot_toolbar_color: Union[Unset, str] = UNSET persona_instructions: Union[Unset, None, str] = UNSET citations_answer_source_label_msg: Union[Unset, None, str] = UNSET citations_sources_label_msg: Union[Unset, None, str] = UNSET hang_in_there_msg: Union[Unset, None, str] = UNSET chatbot_siesta_msg: Union[Unset, None, str] = UNSET is_loading_indicator_enabled: Union[Unset, None, bool] = True - enable_citations: Union[Unset, None, bool] = True - citations_view_type: Union[Unset, str] = "user" - no_answer_message: Union[Unset, None, str] = UNSET + enable_citations: Union[Unset, str] = UNSET + enable_feedbacks: Union[Unset, None, bool] = True + citations_view_type: Union[Unset, str] = UNSET + no_answer_message: Union[Unset, None, str] = "I'm sorry, I don't know the answer" ending_message: Union[Unset, None, str] = UNSET remove_branding: Union[Unset, None, bool] = False + enable_recaptcha_for_public_chatbots: Union[Unset, None, bool] = False + chatbot_model: Union[Unset, str] = UNSET + is_selling_enabled: Union[Unset, None, bool] = False + license_slug: Union[Unset, None, bool] = UNSET + selling_url: Union[Unset, None, str] = UNSET additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) def to_dict(self) -> Dict[str, Any]: @@ -91,20 +109,39 @@ def to_dict(self) -> Dict[str, Any]: chatbot_msg_lang = self.chatbot_msg_lang chatbot_color = self.chatbot_color + chatbot_toolbar_color = self.chatbot_toolbar_color persona_instructions = self.persona_instructions citations_answer_source_label_msg = self.citations_answer_source_label_msg citations_sources_label_msg = self.citations_sources_label_msg hang_in_there_msg = self.hang_in_there_msg chatbot_siesta_msg = self.chatbot_siesta_msg - is_loading_indicator_enabled = self.is_loading_indicator_enabled - enable_citations = self.enable_citations + is_loading_indicator_enabled = True if self.is_loading_indicator_enabled else False + + enable_citations: Union[Unset, None, int] = UNSET + if not isinstance(self.enable_citations, Unset): + enable_citations = self.enable_citations if self.enable_citations else None + + enable_feedbacks = True if self.enable_feedbacks else False + citations_view_type: Union[Unset, None, str] = UNSET if not isinstance(self.citations_view_type, Unset): citations_view_type = self.citations_view_type if self.citations_view_type else None no_answer_message = self.no_answer_message ending_message = self.ending_message - remove_branding = self.remove_branding + remove_branding = True if self.remove_branding else False + + enable_recaptcha_for_public_chatbots = True if self.enable_recaptcha_for_public_chatbots else False + + chatbot_model: Union[Unset, None, str] = UNSET + if not isinstance(self.chatbot_model, Unset): + chatbot_model = self.chatbot_model if self.chatbot_model else None + + is_selling_enabled = True if self.is_selling_enabled else False + + license_slug = True if self.license_slug else False + + selling_url = self.selling_url field_dict: Dict[str, Any] = {} field_dict.update(self.additional_properties) @@ -117,13 +154,15 @@ def to_dict(self) -> Dict[str, Any]: field_dict["default_prompt"] = default_prompt if example_questions is not UNSET: for index, field_value in enumerate(example_questions): - field_dict[f"example_questions[]"] = field_value + field_dict[f"example_questions[{index}]"] = field_value if response_source is not UNSET: field_dict["response_source"] = response_source if chatbot_msg_lang is not UNSET: field_dict["chatbot_msg_lang"] = chatbot_msg_lang if chatbot_color is not UNSET: field_dict["chatbot_color"] = chatbot_color + if chatbot_toolbar_color is not UNSET: + field_dict["chatbot_toolbar_color"] = chatbot_toolbar_color if persona_instructions is not UNSET: field_dict["persona_instructions"] = persona_instructions if citations_answer_source_label_msg is not UNSET: @@ -138,6 +177,8 @@ def to_dict(self) -> Dict[str, Any]: field_dict["is_loading_indicator_enabled"] = is_loading_indicator_enabled if enable_citations is not UNSET: field_dict["enable_citations"] = enable_citations + if enable_feedbacks is not UNSET: + field_dict["enable_feedbacks"] = enable_feedbacks if citations_view_type is not UNSET: field_dict["citations_view_type"] = citations_view_type if no_answer_message is not UNSET: @@ -146,6 +187,16 @@ def to_dict(self) -> Dict[str, Any]: field_dict["ending_message"] = ending_message if remove_branding is not UNSET: field_dict["remove_branding"] = remove_branding + if enable_recaptcha_for_public_chatbots is not UNSET: + field_dict["enable_recaptcha_for_public_chatbots"] = enable_recaptcha_for_public_chatbots + if chatbot_model is not UNSET: + field_dict["chatbot_model"] = chatbot_model + if is_selling_enabled is not UNSET: + field_dict["is_selling_enabled"] = is_selling_enabled + if license_slug is not UNSET: + field_dict["license_slug"] = license_slug + if selling_url is not UNSET: + field_dict["selling_url"] = selling_url return field_dict @@ -165,6 +216,8 @@ def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: chatbot_color = src_dict.get("chatbot_color") + chatbot_toolbar_color = src_dict.get("chatbot_toolbar_color") + persona_instructions = src_dict.get("persona_instructions") citations_answer_source_label_msg = src_dict.get("citations_answer_source_label_msg") @@ -179,6 +232,8 @@ def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: enable_citations = src_dict.get("enable_citations") + enable_feedbacks = src_dict.get("enable_feedbacks") + citations_view_type = src_dict.get("citations_view_type") no_answer_message = src_dict.get("no_answer_message") @@ -187,6 +242,16 @@ def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: remove_branding = src_dict.get("remove_branding") + enable_recaptcha_for_public_chatbots = src_dict.get("enable_recaptcha_for_public_chatbots") + + chatbot_model = src_dict.get("chatbot_model") + + is_selling_enabled = src_dict.get("is_selling_enabled") + + license_slug = src_dict.get("license_slug") + + selling_url = src_dict.get("selling_url") + project_settings = cls( chatbot_avatar=chatbot_avatar, chatbot_background=chatbot_background, @@ -195,6 +260,7 @@ def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: response_source=response_source, chatbot_msg_lang=chatbot_msg_lang, chatbot_color=chatbot_color, + chatbot_toolbar_color=chatbot_toolbar_color, persona_instructions=persona_instructions, citations_answer_source_label_msg=citations_answer_source_label_msg, citations_sources_label_msg=citations_sources_label_msg, @@ -202,10 +268,16 @@ def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: chatbot_siesta_msg=chatbot_siesta_msg, is_loading_indicator_enabled=is_loading_indicator_enabled, enable_citations=enable_citations, + enable_feedbacks=enable_feedbacks, citations_view_type=citations_view_type, no_answer_message=no_answer_message, ending_message=ending_message, remove_branding=remove_branding, + enable_recaptcha_for_public_chatbots=enable_recaptcha_for_public_chatbots, + chatbot_model=chatbot_model, + is_selling_enabled=is_selling_enabled, + license_slug=license_slug, + selling_url=selling_url, ) project_settings.additional_properties = src_dict diff --git a/customgpt-client/customgpt_client/models/project_settings_chatbot_model.py b/customgpt-client/customgpt_client/models/project_settings_chatbot_model.py new file mode 100644 index 0000000..4f54e8b --- /dev/null +++ b/customgpt-client/customgpt_client/models/project_settings_chatbot_model.py @@ -0,0 +1,11 @@ +from enum import Enum + + +class ProjectSettingsChatbotModel(str, Enum): + GPT_3_5_TURBO = "gpt-3.5-turbo" + GPT_4 = "gpt-4" + GPT_4_O = "gpt-4-o" + GPT_4_TURBO = "gpt-4-turbo" + + def __str__(self) -> str: + return str(self.value) diff --git a/customgpt-client/customgpt_client/models/project_settings_enable_citations.py b/customgpt-client/customgpt_client/models/project_settings_enable_citations.py new file mode 100644 index 0000000..ff53741 --- /dev/null +++ b/customgpt-client/customgpt_client/models/project_settings_enable_citations.py @@ -0,0 +1,11 @@ +from enum import IntEnum + + +class ProjectSettingsEnableCitations(IntEnum): + VALUE_0 = 0 + VALUE_1 = 1 + VALUE_2 = 2 + VALUE_3 = 3 + + def __str__(self) -> str: + return str(self.value) diff --git a/customgpt-client/customgpt_client/models/project_source.py b/customgpt-client/customgpt_client/models/project_source.py index 0ef0b63..db3621d 100644 --- a/customgpt-client/customgpt_client/models/project_source.py +++ b/customgpt-client/customgpt_client/models/project_source.py @@ -7,7 +7,7 @@ from ..types import UNSET, Unset if TYPE_CHECKING: - from ..models.page import Page + from ..models.project_source_pages_item import ProjectSourcePagesItem from ..models.project_source_settings import ProjectSourceSettings @@ -23,15 +23,15 @@ class ProjectSource: updated_at (Union[Unset, datetime.datetime]): The project source update date Example: 2021-01-01 00:00:00. type (Union[Unset, ProjectSourceType]): The project source type Example: sitemap. settings (Union[Unset, ProjectSourceSettings]): The project source settings - pages (Union[Unset, None, List['Page']]): The project source pages + pages (Union[Unset, None, List['ProjectSourcePagesItem']]): The project source pages """ id: Union[Unset, int] = UNSET created_at: Union[Unset, datetime.datetime] = UNSET updated_at: Union[Unset, datetime.datetime] = UNSET - type: Union[Unset, str] = "sitemap" + type: Union[Unset, str] = UNSET settings: Union[Unset, "ProjectSourceSettings"] = UNSET - pages: Union[Unset, None, List["Page"]] = UNSET + pages: Union[Unset, None, List["ProjectSourcePagesItem"]] = UNSET additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) def to_dict(self) -> Dict[str, Any]: @@ -78,13 +78,13 @@ def to_dict(self) -> Dict[str, Any]: field_dict["settings"] = settings if pages is not UNSET: for index, field_value in enumerate(pages): - field_dict[f"pages[]"] = field_value + field_dict[f"pages[{index}]"] = field_value return field_dict @classmethod def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: - from ..models.page import Page + from ..models.project_source_pages_item import ProjectSourcePagesItem from ..models.project_source_settings import ProjectSourceSettings id = src_dict.get("id") @@ -115,7 +115,7 @@ def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: pages = [] _pages = src_dict.get("pages") for pages_item_data in _pages or []: - pages_item = Page.from_dict(pages_item_data) + pages_item = ProjectSourcePagesItem.from_dict(pages_item_data) pages.append(pages_item) diff --git a/customgpt-client/customgpt_client/models/project_source_pages_item.py b/customgpt-client/customgpt_client/models/project_source_pages_item.py new file mode 100644 index 0000000..1075fa2 --- /dev/null +++ b/customgpt-client/customgpt_client/models/project_source_pages_item.py @@ -0,0 +1,195 @@ +import datetime +from typing import Any, Dict, List, Type, TypeVar, Union + +import attr +from dateutil.parser import isoparse + +from ..types import UNSET, Unset + +T = TypeVar("T", bound="ProjectSourcePagesItem") + + +@attr.s(auto_attribs=True) +class ProjectSourcePagesItem: + r""" + Attributes: + id (Union[Unset, int]): Page ID Example: 1. + page_url (Union[Unset, str]): URL of the page or file Example: https://example.com. + page_url_hash (Union[Unset, str]): Hash of the URL of the page or file Example: + d41d8cd98f00b204e9800998ecf8427e. + project_id (Union[Unset, int]): Project ID Example: 1. + s3_path (Union[Unset, None, str]): This is the path where the page is stored in S3.\nNote: This is omitted in + the response if the page is not a file Example: project-1/page-1/file.pdf. + crawl_status (Union[Unset, ProjectSourcePagesItemCrawlStatus]): Crawl status of the page Default: + ProjectSourcePagesItemCrawlStatus.QUEUED. Example: queued. + index_status (Union[Unset, ProjectSourcePagesItemIndexStatus]): Index status of the page Default: + ProjectSourcePagesItemIndexStatus.QUEUED. Example: queued. + is_file (Union[Unset, bool]): Whether the page is a file or not Example: True. + is_refreshable (Union[Unset, bool]): Whether the page can be refreshed or not Example: True. + is_file_kept (Union[Unset, bool]): Whether the file is kept after processing or not.\nNote: This is omitted in + the response if the page is not a file Default: True. Example: True. + filename (Union[Unset, None, str]): Filename of the page.\nNote: This is omitted in the response if the page is + not a file Example: file.pdf. + filesize (Union[Unset, None, int]): Filesize of the page.\nNote: This is omitted in the response if the page is + not a file Example: 100. + created_at (Union[Unset, datetime.datetime]): Date and time when the page was created Example: 2021-01-01 + 00:00:00. + updated_at (Union[Unset, datetime.datetime]): Date and time when the page was updated Example: 2021-01-01 + 00:00:00. + """ + + id: Union[Unset, int] = UNSET + page_url: Union[Unset, str] = UNSET + page_url_hash: Union[Unset, str] = UNSET + project_id: Union[Unset, int] = UNSET + s3_path: Union[Unset, None, str] = UNSET + crawl_status: Union[Unset, str] = UNSET + index_status: Union[Unset, str] = UNSET + is_file: Union[Unset, bool] = False + is_refreshable: Union[Unset, bool] = False + is_file_kept: Union[Unset, bool] = True + filename: Union[Unset, None, str] = UNSET + filesize: Union[Unset, None, int] = UNSET + created_at: Union[Unset, datetime.datetime] = UNSET + updated_at: Union[Unset, datetime.datetime] = UNSET + additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + id = self.id + page_url = self.page_url + page_url_hash = self.page_url_hash + project_id = self.project_id + s3_path = self.s3_path + crawl_status: Union[Unset, str] = UNSET + if not isinstance(self.crawl_status, Unset): + crawl_status = self.crawl_status + + index_status: Union[Unset, str] = UNSET + if not isinstance(self.index_status, Unset): + index_status = self.index_status + + is_file = True if self.is_file else False + + is_refreshable = True if self.is_refreshable else False + + is_file_kept = True if self.is_file_kept else False + + filename = self.filename + filesize = self.filesize + created_at: Union[Unset, str] = UNSET + if not isinstance(self.created_at, Unset): + created_at = self.created_at.isoformat() + + updated_at: Union[Unset, str] = UNSET + if not isinstance(self.updated_at, Unset): + updated_at = self.updated_at.isoformat() + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if id is not UNSET: + field_dict["id"] = id + if page_url is not UNSET: + field_dict["page_url"] = page_url + if page_url_hash is not UNSET: + field_dict["page_url_hash"] = page_url_hash + if project_id is not UNSET: + field_dict["project_id"] = project_id + if s3_path is not UNSET: + field_dict["s3_path"] = s3_path + if crawl_status is not UNSET: + field_dict["crawl_status"] = crawl_status + if index_status is not UNSET: + field_dict["index_status"] = index_status + if is_file is not UNSET: + field_dict["is_file"] = is_file + if is_refreshable is not UNSET: + field_dict["is_refreshable"] = is_refreshable + if is_file_kept is not UNSET: + field_dict["is_file_kept"] = is_file_kept + if filename is not UNSET: + field_dict["filename"] = filename + if filesize is not UNSET: + field_dict["filesize"] = filesize + if created_at is not UNSET: + field_dict["created_at"] = created_at + if updated_at is not UNSET: + field_dict["updated_at"] = updated_at + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + id = src_dict.get("id") + + page_url = src_dict.get("page_url") + + page_url_hash = src_dict.get("page_url_hash") + + project_id = src_dict.get("project_id") + + s3_path = src_dict.get("s3_path") + + crawl_status = src_dict.get("crawl_status") + + index_status = src_dict.get("index_status") + + is_file = src_dict.get("is_file") + + is_refreshable = src_dict.get("is_refreshable") + + is_file_kept = src_dict.get("is_file_kept") + + filename = src_dict.get("filename") + + filesize = src_dict.get("filesize") + + _created_at = src_dict.get("created_at") + created_at: Union[Unset, datetime.datetime] + if isinstance(_created_at, Unset): + created_at = UNSET + else: + created_at = isoparse(_created_at) + + _updated_at = src_dict.get("updated_at") + updated_at: Union[Unset, datetime.datetime] + if isinstance(_updated_at, Unset): + updated_at = UNSET + else: + updated_at = isoparse(_updated_at) + + project_source_pages_item = cls( + id=id, + page_url=page_url, + page_url_hash=page_url_hash, + project_id=project_id, + s3_path=s3_path, + crawl_status=crawl_status, + index_status=index_status, + is_file=is_file, + is_refreshable=is_refreshable, + is_file_kept=is_file_kept, + filename=filename, + filesize=filesize, + created_at=created_at, + updated_at=updated_at, + ) + + project_source_pages_item.additional_properties = src_dict + return project_source_pages_item + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/customgpt-client/customgpt_client/models/project_source_pages_item_crawl_status.py b/customgpt-client/customgpt_client/models/project_source_pages_item_crawl_status.py new file mode 100644 index 0000000..949a6fe --- /dev/null +++ b/customgpt-client/customgpt_client/models/project_source_pages_item_crawl_status.py @@ -0,0 +1,12 @@ +from enum import Enum + + +class ProjectSourcePagesItemCrawlStatus(str, Enum): + FAILED = "failed" + LIMITED = "limited" + NA = "n/a" + OK = "ok" + QUEUED = "queued" + + def __str__(self) -> str: + return str(self.value) diff --git a/customgpt-client/customgpt_client/models/project_source_pages_item_index_status.py b/customgpt-client/customgpt_client/models/project_source_pages_item_index_status.py new file mode 100644 index 0000000..142d35b --- /dev/null +++ b/customgpt-client/customgpt_client/models/project_source_pages_item_index_status.py @@ -0,0 +1,12 @@ +from enum import Enum + + +class ProjectSourcePagesItemIndexStatus(str, Enum): + FAILED = "failed" + LIMITED = "limited" + NA = "n/a" + OK = "ok" + QUEUED = "queued" + + def __str__(self) -> str: + return str(self.value) diff --git a/customgpt-client/customgpt_client/models/project_source_settings.py b/customgpt-client/customgpt_client/models/project_source_settings.py index 1054465..24707ac 100644 --- a/customgpt-client/customgpt_client/models/project_source_settings.py +++ b/customgpt-client/customgpt_client/models/project_source_settings.py @@ -12,35 +12,57 @@ class ProjectSourceSettings: """The project source settings Attributes: - data_refresh (Union[Unset, bool]): Whether the project source data should be refreshed Example: True. executive_js (Union[Unset, bool]): Whether the project source should execute JavaScript Default: True. Example: True. - data_refresh_frequency (Union[Unset, str]): The project source data refresh frequency Default: 'never'. Example: - never. + data_refresh_frequency (Union[Unset, ProjectSourceSettingsDataRefreshFrequency]): The project source data + refresh frequency Default: ProjectSourceSettingsDataRefreshFrequency.NEVER. Example: never. + create_new_pages (Union[Unset, bool]): Add new pages to project automatically during refresh project source + Default: True. Example: True. + remove_unexist_pages (Union[Unset, bool]): Remove pages from project automatically during refresh project source + Default: True. + refresh_existing_pages (Union[Unset, ProjectSourceSettingsRefreshExistingPages]): Refresh existing page during + refresh project source Default: ProjectSourceSettingsRefreshExistingPages.NEVER. Example: never. sitemap_path (Union[Unset, str]): The project source sitemap path Example: https://example.com/sitemap.xml. """ - data_refresh: Union[Unset, bool] = False executive_js: Union[Unset, bool] = True - data_refresh_frequency: Union[Unset, str] = "never" + data_refresh_frequency: Union[Unset, str] = UNSET + create_new_pages: Union[Unset, bool] = True + remove_unexist_pages: Union[Unset, bool] = True + refresh_existing_pages: Union[Unset, str] = UNSET sitemap_path: Union[Unset, str] = UNSET additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) def to_dict(self) -> Dict[str, Any]: - data_refresh = self.data_refresh - executive_js = self.executive_js - data_refresh_frequency = self.data_refresh_frequency + executive_js = True if self.executive_js else False + + data_refresh_frequency: Union[Unset, str] = UNSET + if not isinstance(self.data_refresh_frequency, Unset): + data_refresh_frequency = self.data_refresh_frequency + + create_new_pages = True if self.create_new_pages else False + + remove_unexist_pages = True if self.remove_unexist_pages else False + + refresh_existing_pages: Union[Unset, str] = UNSET + if not isinstance(self.refresh_existing_pages, Unset): + refresh_existing_pages = self.refresh_existing_pages + sitemap_path = self.sitemap_path field_dict: Dict[str, Any] = {} field_dict.update(self.additional_properties) field_dict.update({}) - if data_refresh is not UNSET: - field_dict["data_refresh"] = data_refresh if executive_js is not UNSET: field_dict["executive_js"] = executive_js if data_refresh_frequency is not UNSET: field_dict["data_refresh_frequency"] = data_refresh_frequency + if create_new_pages is not UNSET: + field_dict["create_new_pages"] = create_new_pages + if remove_unexist_pages is not UNSET: + field_dict["remove_unexist_pages"] = remove_unexist_pages + if refresh_existing_pages is not UNSET: + field_dict["refresh_existing_pages"] = refresh_existing_pages if sitemap_path is not UNSET: field_dict["sitemap_path"] = sitemap_path @@ -48,18 +70,24 @@ def to_dict(self) -> Dict[str, Any]: @classmethod def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: - data_refresh = src_dict.get("data_refresh") - executive_js = src_dict.get("executive_js") data_refresh_frequency = src_dict.get("data_refresh_frequency") + create_new_pages = src_dict.get("create_new_pages") + + remove_unexist_pages = src_dict.get("remove_unexist_pages") + + refresh_existing_pages = src_dict.get("refresh_existing_pages") + sitemap_path = src_dict.get("sitemap_path") project_source_settings = cls( - data_refresh=data_refresh, executive_js=executive_js, data_refresh_frequency=data_refresh_frequency, + create_new_pages=create_new_pages, + remove_unexist_pages=remove_unexist_pages, + refresh_existing_pages=refresh_existing_pages, sitemap_path=sitemap_path, ) diff --git a/customgpt-client/customgpt_client/models/project_source_settings_data_refresh_frequency.py b/customgpt-client/customgpt_client/models/project_source_settings_data_refresh_frequency.py new file mode 100644 index 0000000..140b3db --- /dev/null +++ b/customgpt-client/customgpt_client/models/project_source_settings_data_refresh_frequency.py @@ -0,0 +1,12 @@ +from enum import Enum + + +class ProjectSourceSettingsDataRefreshFrequency(str, Enum): + ADVANCED = "advanced" + DAILY = "daily" + MONTHLY = "monthly" + NEVER = "never" + WEEKLY = "weekly" + + def __str__(self) -> str: + return str(self.value) diff --git a/customgpt-client/customgpt_client/models/project_source_settings_refresh_existing_pages.py b/customgpt-client/customgpt_client/models/project_source_settings_refresh_existing_pages.py new file mode 100644 index 0000000..96cccf9 --- /dev/null +++ b/customgpt-client/customgpt_client/models/project_source_settings_refresh_existing_pages.py @@ -0,0 +1,10 @@ +from enum import Enum + + +class ProjectSourceSettingsRefreshExistingPages(str, Enum): + ALWAYS = "always" + IF_UPDATED = "if_updated" + NEVER = "never" + + def __str__(self) -> str: + return str(self.value) diff --git a/customgpt-client/customgpt_client/models/prompt_history.py b/customgpt-client/customgpt_client/models/prompt_history.py index 699713c..823c366 100644 --- a/customgpt-client/customgpt_client/models/prompt_history.py +++ b/customgpt-client/customgpt_client/models/prompt_history.py @@ -85,7 +85,7 @@ def to_dict(self) -> Dict[str, Any]: field_dict["conversation_id"] = conversation_id if citations is not UNSET: for index, field_value in enumerate(citations): - field_dict[f"citations[]"] = field_value + field_dict[f"citations[{index}]"] = field_value if metadata is not UNSET: field_dict["metadata"] = metadata diff --git a/customgpt-client/customgpt_client/models/queries_reports_filters_item.py b/customgpt-client/customgpt_client/models/queries_reports_filters_item.py new file mode 100644 index 0000000..a72bb43 --- /dev/null +++ b/customgpt-client/customgpt_client/models/queries_reports_filters_item.py @@ -0,0 +1,9 @@ +from enum import Enum + + +class QueriesReportsFiltersItem(str, Enum): + QUERY_STATUS = "query_status" + TOTAL = "total" + + def __str__(self) -> str: + return str(self.value) diff --git a/customgpt-client/customgpt_client/models/update_settings_response_200.py b/customgpt-client/customgpt_client/models/queries_reports_response_200.py similarity index 69% rename from customgpt-client/customgpt_client/models/update_settings_response_200.py rename to customgpt-client/customgpt_client/models/queries_reports_response_200.py index f603e94..02babf9 100644 --- a/customgpt-client/customgpt_client/models/update_settings_response_200.py +++ b/customgpt-client/customgpt_client/models/queries_reports_response_200.py @@ -5,22 +5,22 @@ from ..types import UNSET, Unset if TYPE_CHECKING: - from ..models.update_settings_response_200_data import UpdateSettingsResponse200Data + from ..models.queries_reports_response_200_data import QueriesReportsResponse200Data -T = TypeVar("T", bound="UpdateSettingsResponse200") +T = TypeVar("T", bound="QueriesReportsResponse200") @attr.s(auto_attribs=True) -class UpdateSettingsResponse200: +class QueriesReportsResponse200: """ Attributes: - status (Union[Unset, UpdateSettingsResponse200Status]): The status of the response Example: success. - data (Union[Unset, UpdateSettingsResponse200Data]): + status (Union[Unset, QueriesReportsResponse200Status]): The status of the response Example: success. + data (Union[Unset, QueriesReportsResponse200Data]): """ - status: Union[Unset, str] = "success" - data: Union[Unset, "UpdateSettingsResponse200Data"] = UNSET + status: Union[Unset, str] = UNSET + data: Union[Unset, "QueriesReportsResponse200Data"] = UNSET additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) def to_dict(self) -> Dict[str, Any]: @@ -44,24 +44,24 @@ def to_dict(self) -> Dict[str, Any]: @classmethod def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: - from ..models.update_settings_response_200_data import UpdateSettingsResponse200Data + from ..models.queries_reports_response_200_data import QueriesReportsResponse200Data status = src_dict.get("status") _data = src_dict.get("data") - data: Union[Unset, UpdateSettingsResponse200Data] + data: Union[Unset, QueriesReportsResponse200Data] if isinstance(_data, Unset): data = UNSET else: - data = UpdateSettingsResponse200Data.from_dict(_data) + data = QueriesReportsResponse200Data.from_dict(_data) - update_settings_response_200 = cls( + queries_reports_response_200 = cls( status=status, data=data, ) - update_settings_response_200.additional_properties = src_dict - return update_settings_response_200 + queries_reports_response_200.additional_properties = src_dict + return queries_reports_response_200 @property def additional_keys(self) -> List[str]: diff --git a/customgpt-client/customgpt_client/models/queries_reports_response_200_data.py b/customgpt-client/customgpt_client/models/queries_reports_response_200_data.py new file mode 100644 index 0000000..a1ef5cb --- /dev/null +++ b/customgpt-client/customgpt_client/models/queries_reports_response_200_data.py @@ -0,0 +1,87 @@ +from typing import TYPE_CHECKING, Any, Dict, List, Type, TypeVar, Union + +import attr + +from ..types import UNSET, Unset + +if TYPE_CHECKING: + from ..models.queries_reports_response_200_data_query_status_item import ( + QueriesReportsResponse200DataQueryStatusItem, + ) + + +T = TypeVar("T", bound="QueriesReportsResponse200Data") + + +@attr.s(auto_attribs=True) +class QueriesReportsResponse200Data: + """ + Attributes: + total (Union[Unset, int]): Total number of queries over all conversations Example: 10. + query_status (Union[Unset, List['QueriesReportsResponse200DataQueryStatusItem']]): Number of successful and + failed queries over all conversations + """ + + total: Union[Unset, int] = UNSET + query_status: Union[Unset, List["QueriesReportsResponse200DataQueryStatusItem"]] = UNSET + additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + total = self.total + query_status: Union[Unset, List[Dict[str, Any]]] = UNSET + if not isinstance(self.query_status, Unset): + query_status = [] + for query_status_item_data in self.query_status: + query_status_item = query_status_item_data.to_dict() + + query_status.append(query_status_item) + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if total is not UNSET: + field_dict["total"] = total + if query_status is not UNSET: + for index, field_value in enumerate(query_status): + field_dict[f"query_status[{index}]"] = field_value + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + from ..models.queries_reports_response_200_data_query_status_item import ( + QueriesReportsResponse200DataQueryStatusItem, + ) + + total = src_dict.get("total") + + query_status = [] + _query_status = src_dict.get("query_status") + for query_status_item_data in _query_status or []: + query_status_item = QueriesReportsResponse200DataQueryStatusItem.from_dict(query_status_item_data) + + query_status.append(query_status_item) + + queries_reports_response_200_data = cls( + total=total, + query_status=query_status, + ) + + queries_reports_response_200_data.additional_properties = src_dict + return queries_reports_response_200_data + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/customgpt-client/customgpt_client/models/queries_reports_response_200_data_query_status_item.py b/customgpt-client/customgpt_client/models/queries_reports_response_200_data_query_status_item.py new file mode 100644 index 0000000..94e73a9 --- /dev/null +++ b/customgpt-client/customgpt_client/models/queries_reports_response_200_data_query_status_item.py @@ -0,0 +1,67 @@ +from typing import Any, Dict, List, Type, TypeVar, Union + +import attr + +from ..types import UNSET, Unset + +T = TypeVar("T", bound="QueriesReportsResponse200DataQueryStatusItem") + + +@attr.s(auto_attribs=True) +class QueriesReportsResponse200DataQueryStatusItem: + """ + Attributes: + status (Union[Unset, QueriesReportsResponse200DataQueryStatusItemStatus]): + count (Union[Unset, int]): Example: 2. + """ + + status: Union[Unset, str] = UNSET + count: Union[Unset, int] = UNSET + additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + status: Union[Unset, str] = UNSET + if not isinstance(self.status, Unset): + status = self.status + + count = self.count + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if status is not UNSET: + field_dict["status"] = status + if count is not UNSET: + field_dict["count"] = count + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + status = src_dict.get("status") + + count = src_dict.get("count") + + queries_reports_response_200_data_query_status_item = cls( + status=status, + count=count, + ) + + queries_reports_response_200_data_query_status_item.additional_properties = src_dict + return queries_reports_response_200_data_query_status_item + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/customgpt-client/customgpt_client/models/queries_reports_response_200_data_query_status_item_status.py b/customgpt-client/customgpt_client/models/queries_reports_response_200_data_query_status_item_status.py new file mode 100644 index 0000000..5857d8d --- /dev/null +++ b/customgpt-client/customgpt_client/models/queries_reports_response_200_data_query_status_item_status.py @@ -0,0 +1,9 @@ +from enum import Enum + + +class QueriesReportsResponse200DataQueryStatusItemStatus(str, Enum): + FAILED = "failed" + SUCCESS = "success" + + def __str__(self) -> str: + return str(self.value) diff --git a/customgpt-client/customgpt_client/models/queries_reports_response_200_status.py b/customgpt-client/customgpt_client/models/queries_reports_response_200_status.py new file mode 100644 index 0000000..5794191 --- /dev/null +++ b/customgpt-client/customgpt_client/models/queries_reports_response_200_status.py @@ -0,0 +1,9 @@ +from enum import Enum + + +class QueriesReportsResponse200Status(str, Enum): + ERROR = "error" + SUCCESS = "success" + + def __str__(self) -> str: + return str(self.value) diff --git a/customgpt-client/customgpt_client/models/update_settings_response_401.py b/customgpt-client/customgpt_client/models/queries_reports_response_400.py similarity index 72% rename from customgpt-client/customgpt_client/models/update_settings_response_401.py rename to customgpt-client/customgpt_client/models/queries_reports_response_400.py index 40e2f22..ef80e2a 100644 --- a/customgpt-client/customgpt_client/models/update_settings_response_401.py +++ b/customgpt-client/customgpt_client/models/queries_reports_response_400.py @@ -5,24 +5,24 @@ from ..types import UNSET, Unset if TYPE_CHECKING: - from ..models.update_settings_response_401_data import UpdateSettingsResponse401Data + from ..models.queries_reports_response_400_data import QueriesReportsResponse400Data -T = TypeVar("T", bound="UpdateSettingsResponse401") +T = TypeVar("T", bound="QueriesReportsResponse400") @attr.s(auto_attribs=True) -class UpdateSettingsResponse401: +class QueriesReportsResponse400: """ Attributes: - status (Union[Unset, UpdateSettingsResponse401Status]): The status of the response Example: error. + status (Union[Unset, QueriesReportsResponse400Status]): The status of the response Example: error. url (Union[Unset, str]): The URL of the request Example: https://app.customgpt.ai/api/v1/projects/1. - data (Union[Unset, UpdateSettingsResponse401Data]): + data (Union[Unset, QueriesReportsResponse400Data]): """ - status: Union[Unset, str] = "error" + status: Union[Unset, str] = UNSET url: Union[Unset, str] = UNSET - data: Union[Unset, "UpdateSettingsResponse401Data"] = UNSET + data: Union[Unset, "QueriesReportsResponse400Data"] = UNSET additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) def to_dict(self) -> Dict[str, Any]: @@ -49,27 +49,27 @@ def to_dict(self) -> Dict[str, Any]: @classmethod def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: - from ..models.update_settings_response_401_data import UpdateSettingsResponse401Data + from ..models.queries_reports_response_400_data import QueriesReportsResponse400Data status = src_dict.get("status") url = src_dict.get("url") _data = src_dict.get("data") - data: Union[Unset, UpdateSettingsResponse401Data] + data: Union[Unset, QueriesReportsResponse400Data] if isinstance(_data, Unset): data = UNSET else: - data = UpdateSettingsResponse401Data.from_dict(_data) + data = QueriesReportsResponse400Data.from_dict(_data) - update_settings_response_401 = cls( + queries_reports_response_400 = cls( status=status, url=url, data=data, ) - update_settings_response_401.additional_properties = src_dict - return update_settings_response_401 + queries_reports_response_400.additional_properties = src_dict + return queries_reports_response_400 @property def additional_keys(self) -> List[str]: diff --git a/customgpt-client/customgpt_client/models/queries_reports_response_400_data.py b/customgpt-client/customgpt_client/models/queries_reports_response_400_data.py new file mode 100644 index 0000000..e05d760 --- /dev/null +++ b/customgpt-client/customgpt_client/models/queries_reports_response_400_data.py @@ -0,0 +1,67 @@ +from typing import Any, Dict, List, Type, TypeVar, Union + +import attr + +from ..types import UNSET, Unset + +T = TypeVar("T", bound="QueriesReportsResponse400Data") + + +@attr.s(auto_attribs=True) +class QueriesReportsResponse400Data: + """ + Attributes: + code (Union[Unset, QueriesReportsResponse400DataCode]): The error status code Example: 400. + message (Union[Unset, str]): The error message Example: Project id must be integer. + """ + + code: Union[Unset, str] = UNSET + message: Union[Unset, str] = UNSET + additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + code: Union[Unset, int] = UNSET + if not isinstance(self.code, Unset): + code = self.code + + message = self.message + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if code is not UNSET: + field_dict["code"] = code + if message is not UNSET: + field_dict["message"] = message + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + code = src_dict.get("code") + + message = src_dict.get("message") + + queries_reports_response_400_data = cls( + code=code, + message=message, + ) + + queries_reports_response_400_data.additional_properties = src_dict + return queries_reports_response_400_data + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/customgpt-client/customgpt_client/models/queries_reports_response_400_data_code.py b/customgpt-client/customgpt_client/models/queries_reports_response_400_data_code.py new file mode 100644 index 0000000..8aeca15 --- /dev/null +++ b/customgpt-client/customgpt_client/models/queries_reports_response_400_data_code.py @@ -0,0 +1,13 @@ +from enum import IntEnum + + +class QueriesReportsResponse400DataCode(IntEnum): + VALUE_400 = 400 + VALUE_401 = 401 + VALUE_403 = 403 + VALUE_404 = 404 + VALUE_500 = 500 + VALUE_503 = 503 + + def __str__(self) -> str: + return str(self.value) diff --git a/customgpt-client/customgpt_client/models/queries_reports_response_400_status.py b/customgpt-client/customgpt_client/models/queries_reports_response_400_status.py new file mode 100644 index 0000000..d540d81 --- /dev/null +++ b/customgpt-client/customgpt_client/models/queries_reports_response_400_status.py @@ -0,0 +1,9 @@ +from enum import Enum + + +class QueriesReportsResponse400Status(str, Enum): + ERROR = "error" + SUCCESS = "success" + + def __str__(self) -> str: + return str(self.value) diff --git a/customgpt-client/customgpt_client/models/update_settings_response_500.py b/customgpt-client/customgpt_client/models/queries_reports_response_401.py similarity index 72% rename from customgpt-client/customgpt_client/models/update_settings_response_500.py rename to customgpt-client/customgpt_client/models/queries_reports_response_401.py index 674b14c..2d92ebd 100644 --- a/customgpt-client/customgpt_client/models/update_settings_response_500.py +++ b/customgpt-client/customgpt_client/models/queries_reports_response_401.py @@ -5,24 +5,24 @@ from ..types import UNSET, Unset if TYPE_CHECKING: - from ..models.update_settings_response_500_data import UpdateSettingsResponse500Data + from ..models.queries_reports_response_401_data import QueriesReportsResponse401Data -T = TypeVar("T", bound="UpdateSettingsResponse500") +T = TypeVar("T", bound="QueriesReportsResponse401") @attr.s(auto_attribs=True) -class UpdateSettingsResponse500: +class QueriesReportsResponse401: """ Attributes: - status (Union[Unset, UpdateSettingsResponse500Status]): The status of the response Example: error. + status (Union[Unset, QueriesReportsResponse401Status]): The status of the response Example: error. url (Union[Unset, str]): The URL of the request Example: https://app.customgpt.ai/api/v1/projects/1. - data (Union[Unset, UpdateSettingsResponse500Data]): + data (Union[Unset, QueriesReportsResponse401Data]): """ - status: Union[Unset, str] = "error" + status: Union[Unset, str] = UNSET url: Union[Unset, str] = UNSET - data: Union[Unset, "UpdateSettingsResponse500Data"] = UNSET + data: Union[Unset, "QueriesReportsResponse401Data"] = UNSET additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) def to_dict(self) -> Dict[str, Any]: @@ -49,27 +49,27 @@ def to_dict(self) -> Dict[str, Any]: @classmethod def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: - from ..models.update_settings_response_500_data import UpdateSettingsResponse500Data + from ..models.queries_reports_response_401_data import QueriesReportsResponse401Data status = src_dict.get("status") url = src_dict.get("url") _data = src_dict.get("data") - data: Union[Unset, UpdateSettingsResponse500Data] + data: Union[Unset, QueriesReportsResponse401Data] if isinstance(_data, Unset): data = UNSET else: - data = UpdateSettingsResponse500Data.from_dict(_data) + data = QueriesReportsResponse401Data.from_dict(_data) - update_settings_response_500 = cls( + queries_reports_response_401 = cls( status=status, url=url, data=data, ) - update_settings_response_500.additional_properties = src_dict - return update_settings_response_500 + queries_reports_response_401.additional_properties = src_dict + return queries_reports_response_401 @property def additional_keys(self) -> List[str]: diff --git a/customgpt-client/customgpt_client/models/update_settings_response_401_data.py b/customgpt-client/customgpt_client/models/queries_reports_response_401_data.py similarity index 82% rename from customgpt-client/customgpt_client/models/update_settings_response_401_data.py rename to customgpt-client/customgpt_client/models/queries_reports_response_401_data.py index 013ee13..9776635 100644 --- a/customgpt-client/customgpt_client/models/update_settings_response_401_data.py +++ b/customgpt-client/customgpt_client/models/queries_reports_response_401_data.py @@ -4,18 +4,18 @@ from ..types import UNSET, Unset -T = TypeVar("T", bound="UpdateSettingsResponse401Data") +T = TypeVar("T", bound="QueriesReportsResponse401Data") @attr.s(auto_attribs=True) -class UpdateSettingsResponse401Data: +class QueriesReportsResponse401Data: """ Attributes: - code (Union[Unset, UpdateSettingsResponse401DataCode]): The error status code Example: 401. + code (Union[Unset, QueriesReportsResponse401DataCode]): The error status code Example: 401. message (Union[Unset, str]): Example: API Token is either missing or invalid. """ - code: Union[Unset, str] = "401" + code: Union[Unset, str] = UNSET message: Union[Unset, str] = UNSET additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) @@ -42,13 +42,13 @@ def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: message = src_dict.get("message") - update_settings_response_401_data = cls( + queries_reports_response_401_data = cls( code=code, message=message, ) - update_settings_response_401_data.additional_properties = src_dict - return update_settings_response_401_data + queries_reports_response_401_data.additional_properties = src_dict + return queries_reports_response_401_data @property def additional_keys(self) -> List[str]: diff --git a/customgpt-client/customgpt_client/models/queries_reports_response_401_data_code.py b/customgpt-client/customgpt_client/models/queries_reports_response_401_data_code.py new file mode 100644 index 0000000..fb66929 --- /dev/null +++ b/customgpt-client/customgpt_client/models/queries_reports_response_401_data_code.py @@ -0,0 +1,13 @@ +from enum import IntEnum + + +class QueriesReportsResponse401DataCode(IntEnum): + VALUE_400 = 400 + VALUE_401 = 401 + VALUE_403 = 403 + VALUE_404 = 404 + VALUE_500 = 500 + VALUE_503 = 503 + + def __str__(self) -> str: + return str(self.value) diff --git a/customgpt-client/customgpt_client/models/queries_reports_response_401_status.py b/customgpt-client/customgpt_client/models/queries_reports_response_401_status.py new file mode 100644 index 0000000..004b234 --- /dev/null +++ b/customgpt-client/customgpt_client/models/queries_reports_response_401_status.py @@ -0,0 +1,9 @@ +from enum import Enum + + +class QueriesReportsResponse401Status(str, Enum): + ERROR = "error" + SUCCESS = "success" + + def __str__(self) -> str: + return str(self.value) diff --git a/customgpt-client/customgpt_client/models/queries_reports_response_404.py b/customgpt-client/customgpt_client/models/queries_reports_response_404.py new file mode 100644 index 0000000..9f7d32d --- /dev/null +++ b/customgpt-client/customgpt_client/models/queries_reports_response_404.py @@ -0,0 +1,88 @@ +from typing import TYPE_CHECKING, Any, Dict, List, Type, TypeVar, Union + +import attr + +from ..types import UNSET, Unset + +if TYPE_CHECKING: + from ..models.queries_reports_response_404_data import QueriesReportsResponse404Data + + +T = TypeVar("T", bound="QueriesReportsResponse404") + + +@attr.s(auto_attribs=True) +class QueriesReportsResponse404: + """ + Attributes: + status (Union[Unset, QueriesReportsResponse404Status]): The status of the response Example: error. + url (Union[Unset, str]): The URL of the request Example: https://app.customgpt.ai/api/v1/projects/1. + data (Union[Unset, QueriesReportsResponse404Data]): + """ + + status: Union[Unset, str] = UNSET + url: Union[Unset, str] = UNSET + data: Union[Unset, "QueriesReportsResponse404Data"] = UNSET + additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + status: Union[Unset, str] = UNSET + if not isinstance(self.status, Unset): + status = self.status + + url = self.url + data: Union[Unset, Dict[str, Any]] = UNSET + if not isinstance(self.data, Unset): + data = self.data.to_dict() + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if status is not UNSET: + field_dict["status"] = status + if url is not UNSET: + field_dict["url"] = url + if data is not UNSET: + field_dict["data"] = data + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + from ..models.queries_reports_response_404_data import QueriesReportsResponse404Data + + status = src_dict.get("status") + + url = src_dict.get("url") + + _data = src_dict.get("data") + data: Union[Unset, QueriesReportsResponse404Data] + if isinstance(_data, Unset): + data = UNSET + else: + data = QueriesReportsResponse404Data.from_dict(_data) + + queries_reports_response_404 = cls( + status=status, + url=url, + data=data, + ) + + queries_reports_response_404.additional_properties = src_dict + return queries_reports_response_404 + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/customgpt-client/customgpt_client/models/get_settings_response_404_data.py b/customgpt-client/customgpt_client/models/queries_reports_response_404_data.py similarity index 73% rename from customgpt-client/customgpt_client/models/get_settings_response_404_data.py rename to customgpt-client/customgpt_client/models/queries_reports_response_404_data.py index 0ccb7a7..f2b1574 100644 --- a/customgpt-client/customgpt_client/models/get_settings_response_404_data.py +++ b/customgpt-client/customgpt_client/models/queries_reports_response_404_data.py @@ -4,20 +4,20 @@ from ..types import UNSET, Unset -T = TypeVar("T", bound="GetSettingsResponse404Data") +T = TypeVar("T", bound="QueriesReportsResponse404Data") @attr.s(auto_attribs=True) -class GetSettingsResponse404Data: +class QueriesReportsResponse404Data: """ Attributes: - code (Union[Unset, GetSettingsResponse404DataCode]): The error status code Example: 404. - message (Union[Unset, GetSettingsResponse404DataMessage]): The error message Example: Project with id 1 not + code (Union[Unset, QueriesReportsResponse404DataCode]): The error status code Example: 404. + message (Union[Unset, QueriesReportsResponse404DataMessage]): The error message Example: Project with id 1 not found. """ - code: Union[Unset, str] = "404" - message: Union[Unset, str] = "Project with id 1 not found" + code: Union[Unset, str] = UNSET + message: Union[Unset, str] = UNSET additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) def to_dict(self) -> Dict[str, Any]: @@ -45,13 +45,13 @@ def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: message = src_dict.get("message") - get_settings_response_404_data = cls( + queries_reports_response_404_data = cls( code=code, message=message, ) - get_settings_response_404_data.additional_properties = src_dict - return get_settings_response_404_data + queries_reports_response_404_data.additional_properties = src_dict + return queries_reports_response_404_data @property def additional_keys(self) -> List[str]: diff --git a/customgpt-client/customgpt_client/models/queries_reports_response_404_data_code.py b/customgpt-client/customgpt_client/models/queries_reports_response_404_data_code.py new file mode 100644 index 0000000..2c0f0a6 --- /dev/null +++ b/customgpt-client/customgpt_client/models/queries_reports_response_404_data_code.py @@ -0,0 +1,13 @@ +from enum import IntEnum + + +class QueriesReportsResponse404DataCode(IntEnum): + VALUE_400 = 400 + VALUE_401 = 401 + VALUE_403 = 403 + VALUE_404 = 404 + VALUE_500 = 500 + VALUE_503 = 503 + + def __str__(self) -> str: + return str(self.value) diff --git a/customgpt-client/customgpt_client/models/get_settings_response_404_data_message.py b/customgpt-client/customgpt_client/models/queries_reports_response_404_data_message.py similarity index 80% rename from customgpt-client/customgpt_client/models/get_settings_response_404_data_message.py rename to customgpt-client/customgpt_client/models/queries_reports_response_404_data_message.py index 838adc8..891c476 100644 --- a/customgpt-client/customgpt_client/models/get_settings_response_404_data_message.py +++ b/customgpt-client/customgpt_client/models/queries_reports_response_404_data_message.py @@ -1,7 +1,7 @@ from enum import Enum -class GetSettingsResponse404DataMessage(str, Enum): +class QueriesReportsResponse404DataMessage(str, Enum): PROJECT_ID_IS_REQUIRED = "Project id is required" PROJECT_WITH_ID_PROJECTID_NOT_FOUND = "Project with id {projectId} not found" diff --git a/customgpt-client/customgpt_client/models/queries_reports_response_404_status.py b/customgpt-client/customgpt_client/models/queries_reports_response_404_status.py new file mode 100644 index 0000000..8a83a7c --- /dev/null +++ b/customgpt-client/customgpt_client/models/queries_reports_response_404_status.py @@ -0,0 +1,9 @@ +from enum import Enum + + +class QueriesReportsResponse404Status(str, Enum): + ERROR = "error" + SUCCESS = "success" + + def __str__(self) -> str: + return str(self.value) diff --git a/customgpt-client/customgpt_client/models/queries_reports_response_500.py b/customgpt-client/customgpt_client/models/queries_reports_response_500.py new file mode 100644 index 0000000..b782c4c --- /dev/null +++ b/customgpt-client/customgpt_client/models/queries_reports_response_500.py @@ -0,0 +1,88 @@ +from typing import TYPE_CHECKING, Any, Dict, List, Type, TypeVar, Union + +import attr + +from ..types import UNSET, Unset + +if TYPE_CHECKING: + from ..models.queries_reports_response_500_data import QueriesReportsResponse500Data + + +T = TypeVar("T", bound="QueriesReportsResponse500") + + +@attr.s(auto_attribs=True) +class QueriesReportsResponse500: + """ + Attributes: + status (Union[Unset, QueriesReportsResponse500Status]): The status of the response Example: error. + url (Union[Unset, str]): The URL of the request Example: https://app.customgpt.ai/api/v1/projects/1. + data (Union[Unset, QueriesReportsResponse500Data]): + """ + + status: Union[Unset, str] = UNSET + url: Union[Unset, str] = UNSET + data: Union[Unset, "QueriesReportsResponse500Data"] = UNSET + additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + status: Union[Unset, str] = UNSET + if not isinstance(self.status, Unset): + status = self.status + + url = self.url + data: Union[Unset, Dict[str, Any]] = UNSET + if not isinstance(self.data, Unset): + data = self.data.to_dict() + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if status is not UNSET: + field_dict["status"] = status + if url is not UNSET: + field_dict["url"] = url + if data is not UNSET: + field_dict["data"] = data + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + from ..models.queries_reports_response_500_data import QueriesReportsResponse500Data + + status = src_dict.get("status") + + url = src_dict.get("url") + + _data = src_dict.get("data") + data: Union[Unset, QueriesReportsResponse500Data] + if isinstance(_data, Unset): + data = UNSET + else: + data = QueriesReportsResponse500Data.from_dict(_data) + + queries_reports_response_500 = cls( + status=status, + url=url, + data=data, + ) + + queries_reports_response_500.additional_properties = src_dict + return queries_reports_response_500 + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/customgpt-client/customgpt_client/models/update_settings_response_500_data.py b/customgpt-client/customgpt_client/models/queries_reports_response_500_data.py similarity index 81% rename from customgpt-client/customgpt_client/models/update_settings_response_500_data.py rename to customgpt-client/customgpt_client/models/queries_reports_response_500_data.py index 3b0b66c..dff04d3 100644 --- a/customgpt-client/customgpt_client/models/update_settings_response_500_data.py +++ b/customgpt-client/customgpt_client/models/queries_reports_response_500_data.py @@ -4,18 +4,18 @@ from ..types import UNSET, Unset -T = TypeVar("T", bound="UpdateSettingsResponse500Data") +T = TypeVar("T", bound="QueriesReportsResponse500Data") @attr.s(auto_attribs=True) -class UpdateSettingsResponse500Data: +class QueriesReportsResponse500Data: """ Attributes: - code (Union[Unset, UpdateSettingsResponse500DataCode]): The error status code Example: 500. + code (Union[Unset, QueriesReportsResponse500DataCode]): The error status code Example: 500. message (Union[Unset, str]): Example: Internal Server Error. """ - code: Union[Unset, str] = "500" + code: Union[Unset, str] = UNSET message: Union[Unset, str] = UNSET additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) @@ -42,13 +42,13 @@ def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: message = src_dict.get("message") - update_settings_response_500_data = cls( + queries_reports_response_500_data = cls( code=code, message=message, ) - update_settings_response_500_data.additional_properties = src_dict - return update_settings_response_500_data + queries_reports_response_500_data.additional_properties = src_dict + return queries_reports_response_500_data @property def additional_keys(self) -> List[str]: diff --git a/customgpt-client/customgpt_client/models/queries_reports_response_500_data_code.py b/customgpt-client/customgpt_client/models/queries_reports_response_500_data_code.py new file mode 100644 index 0000000..2982d8e --- /dev/null +++ b/customgpt-client/customgpt_client/models/queries_reports_response_500_data_code.py @@ -0,0 +1,13 @@ +from enum import IntEnum + + +class QueriesReportsResponse500DataCode(IntEnum): + VALUE_400 = 400 + VALUE_401 = 401 + VALUE_403 = 403 + VALUE_404 = 404 + VALUE_500 = 500 + VALUE_503 = 503 + + def __str__(self) -> str: + return str(self.value) diff --git a/customgpt-client/customgpt_client/models/queries_reports_response_500_status.py b/customgpt-client/customgpt_client/models/queries_reports_response_500_status.py new file mode 100644 index 0000000..2ea1562 --- /dev/null +++ b/customgpt-client/customgpt_client/models/queries_reports_response_500_status.py @@ -0,0 +1,9 @@ +from enum import Enum + + +class QueriesReportsResponse500Status(str, Enum): + ERROR = "error" + SUCCESS = "success" + + def __str__(self) -> str: + return str(self.value) diff --git a/customgpt-client/customgpt_client/models/reindex_page_response_200.py b/customgpt-client/customgpt_client/models/reindex_page_response_200.py index c9c5e7e..f72eaa9 100644 --- a/customgpt-client/customgpt_client/models/reindex_page_response_200.py +++ b/customgpt-client/customgpt_client/models/reindex_page_response_200.py @@ -19,7 +19,7 @@ class ReindexPageResponse200: data (Union[Unset, ReindexPageResponse200Data]): """ - status: Union[Unset, str] = "success" + status: Union[Unset, str] = UNSET data: Union[Unset, "ReindexPageResponse200Data"] = UNSET additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) diff --git a/customgpt-client/customgpt_client/models/reindex_page_response_200_data.py b/customgpt-client/customgpt_client/models/reindex_page_response_200_data.py index eca1815..ed09888 100644 --- a/customgpt-client/customgpt_client/models/reindex_page_response_200_data.py +++ b/customgpt-client/customgpt_client/models/reindex_page_response_200_data.py @@ -18,7 +18,7 @@ class ReindexPageResponse200Data: additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) def to_dict(self) -> Dict[str, Any]: - updated = self.updated + updated = True if self.updated else False field_dict: Dict[str, Any] = {} field_dict.update(self.additional_properties) diff --git a/customgpt-client/customgpt_client/models/reindex_page_response_400.py b/customgpt-client/customgpt_client/models/reindex_page_response_400.py index 23eb392..0500b64 100644 --- a/customgpt-client/customgpt_client/models/reindex_page_response_400.py +++ b/customgpt-client/customgpt_client/models/reindex_page_response_400.py @@ -20,7 +20,7 @@ class ReindexPageResponse400: data (Union[Unset, ReindexPageResponse400Data]): """ - status: Union[Unset, str] = "error" + status: Union[Unset, str] = UNSET url: Union[Unset, str] = UNSET data: Union[Unset, "ReindexPageResponse400Data"] = UNSET additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) diff --git a/customgpt-client/customgpt_client/models/reindex_page_response_400_data.py b/customgpt-client/customgpt_client/models/reindex_page_response_400_data.py index 1cb9a13..a358f27 100644 --- a/customgpt-client/customgpt_client/models/reindex_page_response_400_data.py +++ b/customgpt-client/customgpt_client/models/reindex_page_response_400_data.py @@ -15,7 +15,7 @@ class ReindexPageResponse400Data: message (Union[Unset, str]): The error message Example: Project id must be integer. """ - code: Union[Unset, str] = "400" + code: Union[Unset, str] = UNSET message: Union[Unset, str] = UNSET additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) diff --git a/customgpt-client/customgpt_client/models/reindex_page_response_401.py b/customgpt-client/customgpt_client/models/reindex_page_response_401.py index 0558ebf..02db091 100644 --- a/customgpt-client/customgpt_client/models/reindex_page_response_401.py +++ b/customgpt-client/customgpt_client/models/reindex_page_response_401.py @@ -20,7 +20,7 @@ class ReindexPageResponse401: data (Union[Unset, ReindexPageResponse401Data]): """ - status: Union[Unset, str] = "error" + status: Union[Unset, str] = UNSET url: Union[Unset, str] = UNSET data: Union[Unset, "ReindexPageResponse401Data"] = UNSET additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) diff --git a/customgpt-client/customgpt_client/models/reindex_page_response_401_data.py b/customgpt-client/customgpt_client/models/reindex_page_response_401_data.py index f27f739..2d417b5 100644 --- a/customgpt-client/customgpt_client/models/reindex_page_response_401_data.py +++ b/customgpt-client/customgpt_client/models/reindex_page_response_401_data.py @@ -15,7 +15,7 @@ class ReindexPageResponse401Data: message (Union[Unset, str]): Example: API Token is either missing or invalid. """ - code: Union[Unset, str] = "401" + code: Union[Unset, str] = UNSET message: Union[Unset, str] = UNSET additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) diff --git a/customgpt-client/customgpt_client/models/reindex_page_response_403.py b/customgpt-client/customgpt_client/models/reindex_page_response_403.py index c322ac1..169c5b3 100644 --- a/customgpt-client/customgpt_client/models/reindex_page_response_403.py +++ b/customgpt-client/customgpt_client/models/reindex_page_response_403.py @@ -20,7 +20,7 @@ class ReindexPageResponse403: data (Union[Unset, ReindexPageResponse403Data]): """ - status: Union[Unset, str] = "error" + status: Union[Unset, str] = UNSET url: Union[Unset, str] = UNSET data: Union[Unset, "ReindexPageResponse403Data"] = UNSET additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) diff --git a/customgpt-client/customgpt_client/models/reindex_page_response_403_data.py b/customgpt-client/customgpt_client/models/reindex_page_response_403_data.py index a0a98bf..3758929 100644 --- a/customgpt-client/customgpt_client/models/reindex_page_response_403_data.py +++ b/customgpt-client/customgpt_client/models/reindex_page_response_403_data.py @@ -16,8 +16,8 @@ class ReindexPageResponse403Data: reindexed. """ - code: Union[Unset, str] = "400" - message: Union[Unset, str] = "Page with id 1 cannot be reindexed" + code: Union[Unset, str] = UNSET + message: Union[Unset, str] = UNSET additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) def to_dict(self) -> Dict[str, Any]: diff --git a/customgpt-client/customgpt_client/models/reindex_page_response_500.py b/customgpt-client/customgpt_client/models/reindex_page_response_500.py index b8be171..5a18541 100644 --- a/customgpt-client/customgpt_client/models/reindex_page_response_500.py +++ b/customgpt-client/customgpt_client/models/reindex_page_response_500.py @@ -20,7 +20,7 @@ class ReindexPageResponse500: data (Union[Unset, ReindexPageResponse500Data]): """ - status: Union[Unset, str] = "error" + status: Union[Unset, str] = UNSET url: Union[Unset, str] = UNSET data: Union[Unset, "ReindexPageResponse500Data"] = UNSET additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) diff --git a/customgpt-client/customgpt_client/models/reindex_page_response_500_data.py b/customgpt-client/customgpt_client/models/reindex_page_response_500_data.py index 6f2aed4..76640d0 100644 --- a/customgpt-client/customgpt_client/models/reindex_page_response_500_data.py +++ b/customgpt-client/customgpt_client/models/reindex_page_response_500_data.py @@ -15,7 +15,7 @@ class ReindexPageResponse500Data: message (Union[Unset, str]): Example: Internal Server Error. """ - code: Union[Unset, str] = "500" + code: Union[Unset, str] = UNSET message: Union[Unset, str] = UNSET additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) diff --git a/customgpt-client/customgpt_client/models/replicate_project_response_201.py b/customgpt-client/customgpt_client/models/replicate_project_response_201.py new file mode 100644 index 0000000..a801eb2 --- /dev/null +++ b/customgpt-client/customgpt_client/models/replicate_project_response_201.py @@ -0,0 +1,80 @@ +from typing import TYPE_CHECKING, Any, Dict, List, Type, TypeVar, Union + +import attr + +from ..types import UNSET, Unset + +if TYPE_CHECKING: + from ..models.replicate_project_response_201_data import ReplicateProjectResponse201Data + + +T = TypeVar("T", bound="ReplicateProjectResponse201") + + +@attr.s(auto_attribs=True) +class ReplicateProjectResponse201: + """ + Attributes: + status (Union[Unset, ReplicateProjectResponse201Status]): The status of the response Example: success. + data (Union[Unset, ReplicateProjectResponse201Data]): + """ + + status: Union[Unset, str] = UNSET + data: Union[Unset, "ReplicateProjectResponse201Data"] = UNSET + additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + status: Union[Unset, str] = UNSET + if not isinstance(self.status, Unset): + status = self.status + + data: Union[Unset, Dict[str, Any]] = UNSET + if not isinstance(self.data, Unset): + data = self.data.to_dict() + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if status is not UNSET: + field_dict["status"] = status + if data is not UNSET: + field_dict["data"] = data + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + from ..models.replicate_project_response_201_data import ReplicateProjectResponse201Data + + status = src_dict.get("status") + + _data = src_dict.get("data") + data: Union[Unset, ReplicateProjectResponse201Data] + if isinstance(_data, Unset): + data = UNSET + else: + data = ReplicateProjectResponse201Data.from_dict(_data) + + replicate_project_response_201 = cls( + status=status, + data=data, + ) + + replicate_project_response_201.additional_properties = src_dict + return replicate_project_response_201 + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/customgpt-client/customgpt_client/models/replicate_project_response_201_data.py b/customgpt-client/customgpt_client/models/replicate_project_response_201_data.py new file mode 100644 index 0000000..8b83cd2 --- /dev/null +++ b/customgpt-client/customgpt_client/models/replicate_project_response_201_data.py @@ -0,0 +1,187 @@ +import datetime +from typing import Any, Dict, List, Type, TypeVar, Union + +import attr +from dateutil.parser import isoparse + +from ..types import UNSET, Unset + +T = TypeVar("T", bound="ReplicateProjectResponse201Data") + + +@attr.s(auto_attribs=True) +class ReplicateProjectResponse201Data: + """ + Attributes: + id (Union[Unset, int]): Project ID Example: 1. + project_name (Union[Unset, str]): Project name Example: My Project. + sitemap_path (Union[Unset, str]): Project sitemap Example: https://www.example.com/sitemap.xml. + is_chat_active (Union[Unset, bool]): Whether the chat bot is active or not Example: True. + user_id (Union[Unset, int]): User ID of the project owner Example: 1. + team_id (Union[Unset, int]): Team ID of the project owner Example: 1. + created_at (Union[Unset, datetime.datetime]): Date and time when the project was created Default: + isoparse('2023-05-08 13:06:55'). Example: 2021-01-01 00:00:00. + updated_at (Union[Unset, datetime.datetime]): Date and time when the project was last updated Default: + isoparse('2023-05-08 13:06:55'). Example: 2021-01-01 00:00:00. + type (Union[Unset, ReplicateProjectResponse201DataType]): Project type Default: + ReplicateProjectResponse201DataType.SITEMAP. Example: SITEMAP. + is_shared (Union[Unset, bool]): Whether the project is shared or not Example: True. + shareable_slug (Union[Unset, None, str]): Shareable slug that can be used to share the project Example: + 1234567890abcdef1234567890abcdef. + shareable_link (Union[Unset, None, str]): Shareable link that can be used to share the project + embed_code (Union[Unset, None, str]): Embed code that can be used to embed the project + live_chat_code (Union[Unset, None, str]): Live chat code that can be used to embed the live chat + """ + + id: Union[Unset, int] = UNSET + project_name: Union[Unset, str] = UNSET + sitemap_path: Union[Unset, str] = UNSET + is_chat_active: Union[Unset, bool] = False + user_id: Union[Unset, int] = UNSET + team_id: Union[Unset, int] = UNSET + created_at: Union[Unset, datetime.datetime] = isoparse("2023-05-08 13:06:55") + updated_at: Union[Unset, datetime.datetime] = isoparse("2023-05-08 13:06:55") + type: Union[Unset, str] = UNSET + is_shared: Union[Unset, bool] = False + shareable_slug: Union[Unset, None, str] = UNSET + shareable_link: Union[Unset, None, str] = UNSET + embed_code: Union[Unset, None, str] = UNSET + live_chat_code: Union[Unset, None, str] = UNSET + additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + id = self.id + project_name = self.project_name + sitemap_path = self.sitemap_path + is_chat_active = True if self.is_chat_active else False + + user_id = self.user_id + team_id = self.team_id + created_at: Union[Unset, str] = UNSET + if not isinstance(self.created_at, Unset): + created_at = self.created_at.isoformat() + + updated_at: Union[Unset, str] = UNSET + if not isinstance(self.updated_at, Unset): + updated_at = self.updated_at.isoformat() + + type: Union[Unset, str] = UNSET + if not isinstance(self.type, Unset): + type = self.type + + is_shared = True if self.is_shared else False + + shareable_slug = self.shareable_slug + shareable_link = self.shareable_link + embed_code = self.embed_code + live_chat_code = self.live_chat_code + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if id is not UNSET: + field_dict["id"] = id + if project_name is not UNSET: + field_dict["project_name"] = project_name + if sitemap_path is not UNSET: + field_dict["sitemap_path"] = sitemap_path + if is_chat_active is not UNSET: + field_dict["is_chat_active"] = is_chat_active + if user_id is not UNSET: + field_dict["user_id"] = user_id + if team_id is not UNSET: + field_dict["team_id"] = team_id + if created_at is not UNSET: + field_dict["created_at"] = created_at + if updated_at is not UNSET: + field_dict["updated_at"] = updated_at + if type is not UNSET: + field_dict["type"] = type + if is_shared is not UNSET: + field_dict["is_shared"] = is_shared + if shareable_slug is not UNSET: + field_dict["shareable_slug"] = shareable_slug + if shareable_link is not UNSET: + field_dict["shareable_link"] = shareable_link + if embed_code is not UNSET: + field_dict["embed_code"] = embed_code + if live_chat_code is not UNSET: + field_dict["live_chat_code"] = live_chat_code + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + id = src_dict.get("id") + + project_name = src_dict.get("project_name") + + sitemap_path = src_dict.get("sitemap_path") + + is_chat_active = src_dict.get("is_chat_active") + + user_id = src_dict.get("user_id") + + team_id = src_dict.get("team_id") + + _created_at = src_dict.get("created_at") + created_at: Union[Unset, datetime.datetime] + if isinstance(_created_at, Unset): + created_at = UNSET + else: + created_at = isoparse(_created_at) + + _updated_at = src_dict.get("updated_at") + updated_at: Union[Unset, datetime.datetime] + if isinstance(_updated_at, Unset): + updated_at = UNSET + else: + updated_at = isoparse(_updated_at) + + type = src_dict.get("type") + + is_shared = src_dict.get("is_shared") + + shareable_slug = src_dict.get("shareable_slug") + + shareable_link = src_dict.get("shareable_link") + + embed_code = src_dict.get("embed_code") + + live_chat_code = src_dict.get("live_chat_code") + + replicate_project_response_201_data = cls( + id=id, + project_name=project_name, + sitemap_path=sitemap_path, + is_chat_active=is_chat_active, + user_id=user_id, + team_id=team_id, + created_at=created_at, + updated_at=updated_at, + type=type, + is_shared=is_shared, + shareable_slug=shareable_slug, + shareable_link=shareable_link, + embed_code=embed_code, + live_chat_code=live_chat_code, + ) + + replicate_project_response_201_data.additional_properties = src_dict + return replicate_project_response_201_data + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/customgpt-client/customgpt_client/models/replicate_project_response_201_data_type.py b/customgpt-client/customgpt_client/models/replicate_project_response_201_data_type.py new file mode 100644 index 0000000..1370741 --- /dev/null +++ b/customgpt-client/customgpt_client/models/replicate_project_response_201_data_type.py @@ -0,0 +1,9 @@ +from enum import Enum + + +class ReplicateProjectResponse201DataType(str, Enum): + SITEMAP = "SITEMAP" + URL = "URL" + + def __str__(self) -> str: + return str(self.value) diff --git a/customgpt-client/customgpt_client/models/replicate_project_response_201_status.py b/customgpt-client/customgpt_client/models/replicate_project_response_201_status.py new file mode 100644 index 0000000..b226a5f --- /dev/null +++ b/customgpt-client/customgpt_client/models/replicate_project_response_201_status.py @@ -0,0 +1,9 @@ +from enum import Enum + + +class ReplicateProjectResponse201Status(str, Enum): + ERROR = "error" + SUCCESS = "success" + + def __str__(self) -> str: + return str(self.value) diff --git a/customgpt-client/customgpt_client/models/replicate_project_response_400.py b/customgpt-client/customgpt_client/models/replicate_project_response_400.py new file mode 100644 index 0000000..25de671 --- /dev/null +++ b/customgpt-client/customgpt_client/models/replicate_project_response_400.py @@ -0,0 +1,88 @@ +from typing import TYPE_CHECKING, Any, Dict, List, Type, TypeVar, Union + +import attr + +from ..types import UNSET, Unset + +if TYPE_CHECKING: + from ..models.replicate_project_response_400_data import ReplicateProjectResponse400Data + + +T = TypeVar("T", bound="ReplicateProjectResponse400") + + +@attr.s(auto_attribs=True) +class ReplicateProjectResponse400: + """ + Attributes: + status (Union[Unset, ReplicateProjectResponse400Status]): The status of the response Example: error. + url (Union[Unset, str]): The URL of the request Example: https://app.customgpt.ai/api/v1/projects/1. + data (Union[Unset, ReplicateProjectResponse400Data]): + """ + + status: Union[Unset, str] = UNSET + url: Union[Unset, str] = UNSET + data: Union[Unset, "ReplicateProjectResponse400Data"] = UNSET + additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + status: Union[Unset, str] = UNSET + if not isinstance(self.status, Unset): + status = self.status + + url = self.url + data: Union[Unset, Dict[str, Any]] = UNSET + if not isinstance(self.data, Unset): + data = self.data.to_dict() + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if status is not UNSET: + field_dict["status"] = status + if url is not UNSET: + field_dict["url"] = url + if data is not UNSET: + field_dict["data"] = data + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + from ..models.replicate_project_response_400_data import ReplicateProjectResponse400Data + + status = src_dict.get("status") + + url = src_dict.get("url") + + _data = src_dict.get("data") + data: Union[Unset, ReplicateProjectResponse400Data] + if isinstance(_data, Unset): + data = UNSET + else: + data = ReplicateProjectResponse400Data.from_dict(_data) + + replicate_project_response_400 = cls( + status=status, + url=url, + data=data, + ) + + replicate_project_response_400.additional_properties = src_dict + return replicate_project_response_400 + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/customgpt-client/customgpt_client/models/replicate_project_response_400_data.py b/customgpt-client/customgpt_client/models/replicate_project_response_400_data.py new file mode 100644 index 0000000..869e60d --- /dev/null +++ b/customgpt-client/customgpt_client/models/replicate_project_response_400_data.py @@ -0,0 +1,70 @@ +from typing import Any, Dict, List, Type, TypeVar, Union + +import attr + +from ..types import UNSET, Unset + +T = TypeVar("T", bound="ReplicateProjectResponse400Data") + + +@attr.s(auto_attribs=True) +class ReplicateProjectResponse400Data: + """ + Attributes: + code (Union[Unset, ReplicateProjectResponse400DataCode]): The error status code Example: 400. + message (Union[Unset, ReplicateProjectResponse400DataMessage]): The error message Example: Project name can't be + empty. + """ + + code: Union[Unset, str] = UNSET + message: Union[Unset, str] = UNSET + additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + code: Union[Unset, int] = UNSET + if not isinstance(self.code, Unset): + code = self.code + + message: Union[Unset, str] = UNSET + if not isinstance(self.message, Unset): + message = self.message + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if code is not UNSET: + field_dict["code"] = code + if message is not UNSET: + field_dict["message"] = message + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + code = src_dict.get("code") + + message = src_dict.get("message") + + replicate_project_response_400_data = cls( + code=code, + message=message, + ) + + replicate_project_response_400_data.additional_properties = src_dict + return replicate_project_response_400_data + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/customgpt-client/customgpt_client/models/replicate_project_response_400_data_code.py b/customgpt-client/customgpt_client/models/replicate_project_response_400_data_code.py new file mode 100644 index 0000000..243e43e --- /dev/null +++ b/customgpt-client/customgpt_client/models/replicate_project_response_400_data_code.py @@ -0,0 +1,13 @@ +from enum import IntEnum + + +class ReplicateProjectResponse400DataCode(IntEnum): + VALUE_400 = 400 + VALUE_401 = 401 + VALUE_403 = 403 + VALUE_404 = 404 + VALUE_500 = 500 + VALUE_503 = 503 + + def __str__(self) -> str: + return str(self.value) diff --git a/customgpt-client/customgpt_client/models/replicate_project_response_400_data_message.py b/customgpt-client/customgpt_client/models/replicate_project_response_400_data_message.py new file mode 100644 index 0000000..259a1b2 --- /dev/null +++ b/customgpt-client/customgpt_client/models/replicate_project_response_400_data_message.py @@ -0,0 +1,10 @@ +from enum import Enum + + +class ReplicateProjectResponse400DataMessage(str, Enum): + PROJECT_NAME_CANT_BE_EMPTY = "Project name can't be empty" + SITEMAP_PATH_CANT_BE_EMPTY = "Sitemap path can't be empty" + YOU_HAVE_REACHED_YOUR_MONTHLY_PROJECT_LIMIT = "You have reached your monthly project limit" + + def __str__(self) -> str: + return str(self.value) diff --git a/customgpt-client/customgpt_client/models/replicate_project_response_400_status.py b/customgpt-client/customgpt_client/models/replicate_project_response_400_status.py new file mode 100644 index 0000000..3f489c7 --- /dev/null +++ b/customgpt-client/customgpt_client/models/replicate_project_response_400_status.py @@ -0,0 +1,9 @@ +from enum import Enum + + +class ReplicateProjectResponse400Status(str, Enum): + ERROR = "error" + SUCCESS = "success" + + def __str__(self) -> str: + return str(self.value) diff --git a/customgpt-client/customgpt_client/models/replicate_project_response_401.py b/customgpt-client/customgpt_client/models/replicate_project_response_401.py new file mode 100644 index 0000000..21c3282 --- /dev/null +++ b/customgpt-client/customgpt_client/models/replicate_project_response_401.py @@ -0,0 +1,88 @@ +from typing import TYPE_CHECKING, Any, Dict, List, Type, TypeVar, Union + +import attr + +from ..types import UNSET, Unset + +if TYPE_CHECKING: + from ..models.replicate_project_response_401_data import ReplicateProjectResponse401Data + + +T = TypeVar("T", bound="ReplicateProjectResponse401") + + +@attr.s(auto_attribs=True) +class ReplicateProjectResponse401: + """ + Attributes: + status (Union[Unset, ReplicateProjectResponse401Status]): The status of the response Example: error. + url (Union[Unset, str]): The URL of the request Example: https://app.customgpt.ai/api/v1/projects/1. + data (Union[Unset, ReplicateProjectResponse401Data]): + """ + + status: Union[Unset, str] = UNSET + url: Union[Unset, str] = UNSET + data: Union[Unset, "ReplicateProjectResponse401Data"] = UNSET + additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + status: Union[Unset, str] = UNSET + if not isinstance(self.status, Unset): + status = self.status + + url = self.url + data: Union[Unset, Dict[str, Any]] = UNSET + if not isinstance(self.data, Unset): + data = self.data.to_dict() + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if status is not UNSET: + field_dict["status"] = status + if url is not UNSET: + field_dict["url"] = url + if data is not UNSET: + field_dict["data"] = data + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + from ..models.replicate_project_response_401_data import ReplicateProjectResponse401Data + + status = src_dict.get("status") + + url = src_dict.get("url") + + _data = src_dict.get("data") + data: Union[Unset, ReplicateProjectResponse401Data] + if isinstance(_data, Unset): + data = UNSET + else: + data = ReplicateProjectResponse401Data.from_dict(_data) + + replicate_project_response_401 = cls( + status=status, + url=url, + data=data, + ) + + replicate_project_response_401.additional_properties = src_dict + return replicate_project_response_401 + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/customgpt-client/customgpt_client/models/replicate_project_response_401_data.py b/customgpt-client/customgpt_client/models/replicate_project_response_401_data.py new file mode 100644 index 0000000..602bcb2 --- /dev/null +++ b/customgpt-client/customgpt_client/models/replicate_project_response_401_data.py @@ -0,0 +1,67 @@ +from typing import Any, Dict, List, Type, TypeVar, Union + +import attr + +from ..types import UNSET, Unset + +T = TypeVar("T", bound="ReplicateProjectResponse401Data") + + +@attr.s(auto_attribs=True) +class ReplicateProjectResponse401Data: + """ + Attributes: + code (Union[Unset, ReplicateProjectResponse401DataCode]): The error status code Example: 401. + message (Union[Unset, str]): Example: API Token is either missing or invalid. + """ + + code: Union[Unset, str] = UNSET + message: Union[Unset, str] = UNSET + additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + code: Union[Unset, int] = UNSET + if not isinstance(self.code, Unset): + code = self.code + + message = self.message + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if code is not UNSET: + field_dict["code"] = code + if message is not UNSET: + field_dict["message"] = message + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + code = src_dict.get("code") + + message = src_dict.get("message") + + replicate_project_response_401_data = cls( + code=code, + message=message, + ) + + replicate_project_response_401_data.additional_properties = src_dict + return replicate_project_response_401_data + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/customgpt-client/customgpt_client/models/replicate_project_response_401_data_code.py b/customgpt-client/customgpt_client/models/replicate_project_response_401_data_code.py new file mode 100644 index 0000000..066b3e3 --- /dev/null +++ b/customgpt-client/customgpt_client/models/replicate_project_response_401_data_code.py @@ -0,0 +1,13 @@ +from enum import IntEnum + + +class ReplicateProjectResponse401DataCode(IntEnum): + VALUE_400 = 400 + VALUE_401 = 401 + VALUE_403 = 403 + VALUE_404 = 404 + VALUE_500 = 500 + VALUE_503 = 503 + + def __str__(self) -> str: + return str(self.value) diff --git a/customgpt-client/customgpt_client/models/replicate_project_response_401_status.py b/customgpt-client/customgpt_client/models/replicate_project_response_401_status.py new file mode 100644 index 0000000..bfaf655 --- /dev/null +++ b/customgpt-client/customgpt_client/models/replicate_project_response_401_status.py @@ -0,0 +1,9 @@ +from enum import Enum + + +class ReplicateProjectResponse401Status(str, Enum): + ERROR = "error" + SUCCESS = "success" + + def __str__(self) -> str: + return str(self.value) diff --git a/customgpt-client/customgpt_client/models/replicate_project_response_500.py b/customgpt-client/customgpt_client/models/replicate_project_response_500.py new file mode 100644 index 0000000..98a0209 --- /dev/null +++ b/customgpt-client/customgpt_client/models/replicate_project_response_500.py @@ -0,0 +1,88 @@ +from typing import TYPE_CHECKING, Any, Dict, List, Type, TypeVar, Union + +import attr + +from ..types import UNSET, Unset + +if TYPE_CHECKING: + from ..models.replicate_project_response_500_data import ReplicateProjectResponse500Data + + +T = TypeVar("T", bound="ReplicateProjectResponse500") + + +@attr.s(auto_attribs=True) +class ReplicateProjectResponse500: + """ + Attributes: + status (Union[Unset, ReplicateProjectResponse500Status]): The status of the response Example: error. + url (Union[Unset, str]): The URL of the request Example: https://app.customgpt.ai/api/v1/projects/1. + data (Union[Unset, ReplicateProjectResponse500Data]): + """ + + status: Union[Unset, str] = UNSET + url: Union[Unset, str] = UNSET + data: Union[Unset, "ReplicateProjectResponse500Data"] = UNSET + additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + status: Union[Unset, str] = UNSET + if not isinstance(self.status, Unset): + status = self.status + + url = self.url + data: Union[Unset, Dict[str, Any]] = UNSET + if not isinstance(self.data, Unset): + data = self.data.to_dict() + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if status is not UNSET: + field_dict["status"] = status + if url is not UNSET: + field_dict["url"] = url + if data is not UNSET: + field_dict["data"] = data + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + from ..models.replicate_project_response_500_data import ReplicateProjectResponse500Data + + status = src_dict.get("status") + + url = src_dict.get("url") + + _data = src_dict.get("data") + data: Union[Unset, ReplicateProjectResponse500Data] + if isinstance(_data, Unset): + data = UNSET + else: + data = ReplicateProjectResponse500Data.from_dict(_data) + + replicate_project_response_500 = cls( + status=status, + url=url, + data=data, + ) + + replicate_project_response_500.additional_properties = src_dict + return replicate_project_response_500 + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/customgpt-client/customgpt_client/models/replicate_project_response_500_data.py b/customgpt-client/customgpt_client/models/replicate_project_response_500_data.py new file mode 100644 index 0000000..709f608 --- /dev/null +++ b/customgpt-client/customgpt_client/models/replicate_project_response_500_data.py @@ -0,0 +1,67 @@ +from typing import Any, Dict, List, Type, TypeVar, Union + +import attr + +from ..types import UNSET, Unset + +T = TypeVar("T", bound="ReplicateProjectResponse500Data") + + +@attr.s(auto_attribs=True) +class ReplicateProjectResponse500Data: + """ + Attributes: + code (Union[Unset, ReplicateProjectResponse500DataCode]): The error status code Example: 500. + message (Union[Unset, str]): Example: Internal Server Error. + """ + + code: Union[Unset, str] = UNSET + message: Union[Unset, str] = UNSET + additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + code: Union[Unset, int] = UNSET + if not isinstance(self.code, Unset): + code = self.code + + message = self.message + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if code is not UNSET: + field_dict["code"] = code + if message is not UNSET: + field_dict["message"] = message + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + code = src_dict.get("code") + + message = src_dict.get("message") + + replicate_project_response_500_data = cls( + code=code, + message=message, + ) + + replicate_project_response_500_data.additional_properties = src_dict + return replicate_project_response_500_data + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/customgpt-client/customgpt_client/models/replicate_project_response_500_data_code.py b/customgpt-client/customgpt_client/models/replicate_project_response_500_data_code.py new file mode 100644 index 0000000..5aa8262 --- /dev/null +++ b/customgpt-client/customgpt_client/models/replicate_project_response_500_data_code.py @@ -0,0 +1,13 @@ +from enum import IntEnum + + +class ReplicateProjectResponse500DataCode(IntEnum): + VALUE_400 = 400 + VALUE_401 = 401 + VALUE_403 = 403 + VALUE_404 = 404 + VALUE_500 = 500 + VALUE_503 = 503 + + def __str__(self) -> str: + return str(self.value) diff --git a/customgpt-client/customgpt_client/models/replicate_project_response_500_status.py b/customgpt-client/customgpt_client/models/replicate_project_response_500_status.py new file mode 100644 index 0000000..ddc8089 --- /dev/null +++ b/customgpt-client/customgpt_client/models/replicate_project_response_500_status.py @@ -0,0 +1,9 @@ +from enum import Enum + + +class ReplicateProjectResponse500Status(str, Enum): + ERROR = "error" + SUCCESS = "success" + + def __str__(self) -> str: + return str(self.value) diff --git a/customgpt-client/customgpt_client/models/send_message_cache_control.py b/customgpt-client/customgpt_client/models/send_message_cache_control.py new file mode 100644 index 0000000..1ddbd23 --- /dev/null +++ b/customgpt-client/customgpt_client/models/send_message_cache_control.py @@ -0,0 +1,8 @@ +from enum import Enum + + +class SendMessageCacheControl(str, Enum): + NO_CACHE = "no-cache" + + def __str__(self) -> str: + return str(self.value) diff --git a/customgpt-client/customgpt_client/models/send_message_json_body.py b/customgpt-client/customgpt_client/models/send_message_json_body.py index 314875f..bdb759b 100644 --- a/customgpt-client/customgpt_client/models/send_message_json_body.py +++ b/customgpt-client/customgpt_client/models/send_message_json_body.py @@ -16,15 +16,30 @@ class SendMessageJsonBody: chatbot assistant called *bot name*, a friendly *bot role* who works for *organization* and answers questions based on the given context. Be as helpful as possible. Always prioritize the customer. Escalate complex issues. Stay on topic. Use appropriate language, Acknowledge limitations.. + chatbot_model (Union[Unset, None, SendMessageJsonBodyChatbotModel]): Chatbot model to use for the conversation + Example: gpt-4. + response_source (Union[Unset, None, SendMessageJsonBodyResponseSource]): By default, we ask ChatGPT to use only + your content in its response (recommended). If you wish ChatGPT to improvise and use its own knowledgebase as + well, you can set this to "openai_content". Default: SendMessageJsonBodyResponseSource.DEFAULT. Example: + default. """ prompt: Union[Unset, str] = UNSET custom_persona: Union[Unset, None, str] = UNSET + chatbot_model: Union[Unset, str] = UNSET + response_source: Union[Unset, str] = UNSET additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) def to_dict(self) -> Dict[str, Any]: prompt = self.prompt custom_persona = self.custom_persona + chatbot_model: Union[Unset, None, str] = UNSET + if not isinstance(self.chatbot_model, Unset): + chatbot_model = self.chatbot_model if self.chatbot_model else None + + response_source: Union[Unset, None, str] = UNSET + if not isinstance(self.response_source, Unset): + response_source = self.response_source if self.response_source else None field_dict: Dict[str, Any] = {} field_dict.update(self.additional_properties) @@ -33,6 +48,10 @@ def to_dict(self) -> Dict[str, Any]: field_dict["prompt"] = prompt if custom_persona is not UNSET: field_dict["custom_persona"] = custom_persona + if chatbot_model is not UNSET: + field_dict["chatbot_model"] = chatbot_model + if response_source is not UNSET: + field_dict["response_source"] = response_source return field_dict @@ -42,9 +61,15 @@ def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: custom_persona = src_dict.get("custom_persona") + chatbot_model = src_dict.get("chatbot_model") + + response_source = src_dict.get("response_source") + send_message_json_body = cls( prompt=prompt, custom_persona=custom_persona, + chatbot_model=chatbot_model, + response_source=response_source, ) send_message_json_body.additional_properties = src_dict diff --git a/customgpt-client/customgpt_client/models/send_message_json_body_chatbot_model.py b/customgpt-client/customgpt_client/models/send_message_json_body_chatbot_model.py new file mode 100644 index 0000000..9e8dd3c --- /dev/null +++ b/customgpt-client/customgpt_client/models/send_message_json_body_chatbot_model.py @@ -0,0 +1,11 @@ +from enum import Enum + + +class SendMessageJsonBodyChatbotModel(str, Enum): + GPT_3_5_TURBO = "gpt-3.5-turbo" + GPT_4 = "gpt-4" + GPT_4_O = "gpt-4-o" + GPT_4_TURBO = "gpt-4-turbo" + + def __str__(self) -> str: + return str(self.value) diff --git a/customgpt-client/customgpt_client/models/send_message_json_body_response_source.py b/customgpt-client/customgpt_client/models/send_message_json_body_response_source.py new file mode 100644 index 0000000..f6585fd --- /dev/null +++ b/customgpt-client/customgpt_client/models/send_message_json_body_response_source.py @@ -0,0 +1,10 @@ +from enum import Enum + + +class SendMessageJsonBodyResponseSource(str, Enum): + DEFAULT = "default" + OPENAI_CONTENT = "openai_content" + OWN_CONTENT = "own_content" + + def __str__(self) -> str: + return str(self.value) diff --git a/customgpt-client/customgpt_client/models/send_message_response_200.py b/customgpt-client/customgpt_client/models/send_message_response_200.py index 0555e36..fb9fd66 100644 --- a/customgpt-client/customgpt_client/models/send_message_response_200.py +++ b/customgpt-client/customgpt_client/models/send_message_response_200.py @@ -19,7 +19,7 @@ class SendMessageResponse200: data (Union[Unset, SendMessageResponse200Data]): """ - status: Union[Unset, str] = "success" + status: Union[Unset, str] = UNSET data: Union[Unset, "SendMessageResponse200Data"] = UNSET additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) diff --git a/customgpt-client/customgpt_client/models/send_message_response_200_data.py b/customgpt-client/customgpt_client/models/send_message_response_200_data.py index eb540a5..53fe3be 100644 --- a/customgpt-client/customgpt_client/models/send_message_response_200_data.py +++ b/customgpt-client/customgpt_client/models/send_message_response_200_data.py @@ -85,7 +85,7 @@ def to_dict(self) -> Dict[str, Any]: field_dict["conversation_id"] = conversation_id if citations is not UNSET: for index, field_value in enumerate(citations): - field_dict[f"citations[]"] = field_value + field_dict[f"citations[{index}]"] = field_value if metadata is not UNSET: field_dict["metadata"] = metadata diff --git a/customgpt-client/customgpt_client/models/send_message_response_400.py b/customgpt-client/customgpt_client/models/send_message_response_400.py index ed6f376..95999f1 100644 --- a/customgpt-client/customgpt_client/models/send_message_response_400.py +++ b/customgpt-client/customgpt_client/models/send_message_response_400.py @@ -20,7 +20,7 @@ class SendMessageResponse400: data (Union[Unset, SendMessageResponse400Data]): """ - status: Union[Unset, str] = "error" + status: Union[Unset, str] = UNSET url: Union[Unset, str] = UNSET data: Union[Unset, "SendMessageResponse400Data"] = UNSET additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) diff --git a/customgpt-client/customgpt_client/models/send_message_response_400_data.py b/customgpt-client/customgpt_client/models/send_message_response_400_data.py index 0eec2a9..be1a14b 100644 --- a/customgpt-client/customgpt_client/models/send_message_response_400_data.py +++ b/customgpt-client/customgpt_client/models/send_message_response_400_data.py @@ -15,7 +15,7 @@ class SendMessageResponse400Data: message (Union[Unset, str]): The error message Example: Project id must be integer. """ - code: Union[Unset, str] = "400" + code: Union[Unset, str] = UNSET message: Union[Unset, str] = UNSET additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) diff --git a/customgpt-client/customgpt_client/models/send_message_response_401.py b/customgpt-client/customgpt_client/models/send_message_response_401.py index 40618aa..ff9a99a 100644 --- a/customgpt-client/customgpt_client/models/send_message_response_401.py +++ b/customgpt-client/customgpt_client/models/send_message_response_401.py @@ -20,7 +20,7 @@ class SendMessageResponse401: data (Union[Unset, SendMessageResponse401Data]): """ - status: Union[Unset, str] = "error" + status: Union[Unset, str] = UNSET url: Union[Unset, str] = UNSET data: Union[Unset, "SendMessageResponse401Data"] = UNSET additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) diff --git a/customgpt-client/customgpt_client/models/send_message_response_401_data.py b/customgpt-client/customgpt_client/models/send_message_response_401_data.py index 3020e11..0e7935c 100644 --- a/customgpt-client/customgpt_client/models/send_message_response_401_data.py +++ b/customgpt-client/customgpt_client/models/send_message_response_401_data.py @@ -15,7 +15,7 @@ class SendMessageResponse401Data: message (Union[Unset, str]): Example: API Token is either missing or invalid. """ - code: Union[Unset, str] = "401" + code: Union[Unset, str] = UNSET message: Union[Unset, str] = UNSET additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) diff --git a/customgpt-client/customgpt_client/models/send_message_response_404.py b/customgpt-client/customgpt_client/models/send_message_response_404.py index 7224b50..032b8b7 100644 --- a/customgpt-client/customgpt_client/models/send_message_response_404.py +++ b/customgpt-client/customgpt_client/models/send_message_response_404.py @@ -20,7 +20,7 @@ class SendMessageResponse404: data (Union[Unset, SendMessageResponse404Data]): """ - status: Union[Unset, str] = "error" + status: Union[Unset, str] = UNSET url: Union[Unset, str] = UNSET data: Union[Unset, "SendMessageResponse404Data"] = UNSET additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) diff --git a/customgpt-client/customgpt_client/models/send_message_response_404_data.py b/customgpt-client/customgpt_client/models/send_message_response_404_data.py index 19ef16f..2cbad93 100644 --- a/customgpt-client/customgpt_client/models/send_message_response_404_data.py +++ b/customgpt-client/customgpt_client/models/send_message_response_404_data.py @@ -16,8 +16,8 @@ class SendMessageResponse404Data: found. """ - code: Union[Unset, str] = "404" - message: Union[Unset, str] = "Project with id 1 not found" + code: Union[Unset, str] = UNSET + message: Union[Unset, str] = UNSET additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) def to_dict(self) -> Dict[str, Any]: diff --git a/customgpt-client/customgpt_client/models/get_settings_response_500.py b/customgpt-client/customgpt_client/models/send_message_response_429.py similarity index 73% rename from customgpt-client/customgpt_client/models/get_settings_response_500.py rename to customgpt-client/customgpt_client/models/send_message_response_429.py index d2dade9..2adc8a6 100644 --- a/customgpt-client/customgpt_client/models/get_settings_response_500.py +++ b/customgpt-client/customgpt_client/models/send_message_response_429.py @@ -5,24 +5,24 @@ from ..types import UNSET, Unset if TYPE_CHECKING: - from ..models.get_settings_response_500_data import GetSettingsResponse500Data + from ..models.send_message_response_429_data import SendMessageResponse429Data -T = TypeVar("T", bound="GetSettingsResponse500") +T = TypeVar("T", bound="SendMessageResponse429") @attr.s(auto_attribs=True) -class GetSettingsResponse500: +class SendMessageResponse429: """ Attributes: - status (Union[Unset, GetSettingsResponse500Status]): The status of the response Example: error. + status (Union[Unset, SendMessageResponse429Status]): The status of the response Example: error. url (Union[Unset, str]): The URL of the request Example: https://app.customgpt.ai/api/v1/projects/1. - data (Union[Unset, GetSettingsResponse500Data]): + data (Union[Unset, SendMessageResponse429Data]): """ - status: Union[Unset, str] = "error" + status: Union[Unset, str] = UNSET url: Union[Unset, str] = UNSET - data: Union[Unset, "GetSettingsResponse500Data"] = UNSET + data: Union[Unset, "SendMessageResponse429Data"] = UNSET additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) def to_dict(self) -> Dict[str, Any]: @@ -49,27 +49,27 @@ def to_dict(self) -> Dict[str, Any]: @classmethod def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: - from ..models.get_settings_response_500_data import GetSettingsResponse500Data + from ..models.send_message_response_429_data import SendMessageResponse429Data status = src_dict.get("status") url = src_dict.get("url") _data = src_dict.get("data") - data: Union[Unset, GetSettingsResponse500Data] + data: Union[Unset, SendMessageResponse429Data] if isinstance(_data, Unset): data = UNSET else: - data = GetSettingsResponse500Data.from_dict(_data) + data = SendMessageResponse429Data.from_dict(_data) - get_settings_response_500 = cls( + send_message_response_429 = cls( status=status, url=url, data=data, ) - get_settings_response_500.additional_properties = src_dict - return get_settings_response_500 + send_message_response_429.additional_properties = src_dict + return send_message_response_429 @property def additional_keys(self) -> List[str]: diff --git a/customgpt-client/customgpt_client/models/send_message_response_429_data.py b/customgpt-client/customgpt_client/models/send_message_response_429_data.py new file mode 100644 index 0000000..c9fc381 --- /dev/null +++ b/customgpt-client/customgpt_client/models/send_message_response_429_data.py @@ -0,0 +1,68 @@ +from typing import Any, Dict, List, Type, TypeVar, Union + +import attr + +from ..types import UNSET, Unset + +T = TypeVar("T", bound="SendMessageResponse429Data") + + +@attr.s(auto_attribs=True) +class SendMessageResponse429Data: + """ + Attributes: + code (Union[Unset, SendMessageResponse429DataCode]): The error status code Example: 429. + message (Union[Unset, str]): The error message Example: You have exhausted your current query credits. Please + contact hello@customgpt.ai for further assistance.. + """ + + code: Union[Unset, str] = UNSET + message: Union[Unset, str] = UNSET + additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + code: Union[Unset, int] = UNSET + if not isinstance(self.code, Unset): + code = self.code + + message = self.message + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if code is not UNSET: + field_dict["code"] = code + if message is not UNSET: + field_dict["message"] = message + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + code = src_dict.get("code") + + message = src_dict.get("message") + + send_message_response_429_data = cls( + code=code, + message=message, + ) + + send_message_response_429_data.additional_properties = src_dict + return send_message_response_429_data + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/customgpt-client/customgpt_client/models/get_settings_response_400_data_code.py b/customgpt-client/customgpt_client/models/send_message_response_429_data_code.py similarity index 81% rename from customgpt-client/customgpt_client/models/get_settings_response_400_data_code.py rename to customgpt-client/customgpt_client/models/send_message_response_429_data_code.py index a3a1861..58e0ffc 100644 --- a/customgpt-client/customgpt_client/models/get_settings_response_400_data_code.py +++ b/customgpt-client/customgpt_client/models/send_message_response_429_data_code.py @@ -1,7 +1,7 @@ from enum import IntEnum -class GetSettingsResponse400DataCode(IntEnum): +class SendMessageResponse429DataCode(IntEnum): VALUE_400 = 400 VALUE_401 = 401 VALUE_403 = 403 diff --git a/customgpt-client/customgpt_client/models/send_message_response_429_status.py b/customgpt-client/customgpt_client/models/send_message_response_429_status.py new file mode 100644 index 0000000..5507917 --- /dev/null +++ b/customgpt-client/customgpt_client/models/send_message_response_429_status.py @@ -0,0 +1,9 @@ +from enum import Enum + + +class SendMessageResponse429Status(str, Enum): + ERROR = "error" + SUCCESS = "success" + + def __str__(self) -> str: + return str(self.value) diff --git a/customgpt-client/customgpt_client/models/send_message_response_500.py b/customgpt-client/customgpt_client/models/send_message_response_500.py index cde5d5a..7d0343f 100644 --- a/customgpt-client/customgpt_client/models/send_message_response_500.py +++ b/customgpt-client/customgpt_client/models/send_message_response_500.py @@ -20,7 +20,7 @@ class SendMessageResponse500: data (Union[Unset, SendMessageResponse500Data]): """ - status: Union[Unset, str] = "error" + status: Union[Unset, str] = UNSET url: Union[Unset, str] = UNSET data: Union[Unset, "SendMessageResponse500Data"] = UNSET additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) diff --git a/customgpt-client/customgpt_client/models/send_message_response_500_data.py b/customgpt-client/customgpt_client/models/send_message_response_500_data.py index 9b8fccd..f530c1c 100644 --- a/customgpt-client/customgpt_client/models/send_message_response_500_data.py +++ b/customgpt-client/customgpt_client/models/send_message_response_500_data.py @@ -15,7 +15,7 @@ class SendMessageResponse500Data: message (Union[Unset, str]): Example: Internal Server Error. """ - code: Union[Unset, str] = "500" + code: Union[Unset, str] = UNSET message: Union[Unset, str] = UNSET additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) diff --git a/customgpt-client/customgpt_client/models/stats_project_response_200.py b/customgpt-client/customgpt_client/models/stats_project_response_200.py index ac00945..32fdf4e 100644 --- a/customgpt-client/customgpt_client/models/stats_project_response_200.py +++ b/customgpt-client/customgpt_client/models/stats_project_response_200.py @@ -19,7 +19,7 @@ class StatsProjectResponse200: data (Union[Unset, StatsProjectResponse200Data]): """ - status: Union[Unset, str] = "success" + status: Union[Unset, str] = UNSET data: Union[Unset, "StatsProjectResponse200Data"] = UNSET additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) diff --git a/customgpt-client/customgpt_client/models/stats_project_response_200_data.py b/customgpt-client/customgpt_client/models/stats_project_response_200_data.py index 22df8bd..d03176c 100644 --- a/customgpt-client/customgpt_client/models/stats_project_response_200_data.py +++ b/customgpt-client/customgpt_client/models/stats_project_response_200_data.py @@ -16,7 +16,9 @@ class StatsProjectResponse200Data: pages_indexed (Union[Unset, int]): Number of pages indexed for the project Example: 100. crawl_credits_used (Union[Unset, int]): Number of crawl credits used for the project Example: 100. query_credits_used (Union[Unset, int]): Number of query credits used for the project Example: 100. - index_credits_used (Union[Unset, int]): Number of index credits used for the project Example: 100. + total_queries (Union[Unset, int]): Number of queries used for the project Example: 100. + total_words_indexed (Union[Unset, int]): Number of index credits used for the project Example: 100. + total_storage_credits_used (Union[Unset, int]): Number of words stored for the project Example: 100. """ pages_found: Union[Unset, int] = UNSET @@ -24,7 +26,9 @@ class StatsProjectResponse200Data: pages_indexed: Union[Unset, int] = UNSET crawl_credits_used: Union[Unset, int] = UNSET query_credits_used: Union[Unset, int] = UNSET - index_credits_used: Union[Unset, int] = UNSET + total_queries: Union[Unset, int] = UNSET + total_words_indexed: Union[Unset, int] = UNSET + total_storage_credits_used: Union[Unset, int] = UNSET additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) def to_dict(self) -> Dict[str, Any]: @@ -33,7 +37,9 @@ def to_dict(self) -> Dict[str, Any]: pages_indexed = self.pages_indexed crawl_credits_used = self.crawl_credits_used query_credits_used = self.query_credits_used - index_credits_used = self.index_credits_used + total_queries = self.total_queries + total_words_indexed = self.total_words_indexed + total_storage_credits_used = self.total_storage_credits_used field_dict: Dict[str, Any] = {} field_dict.update(self.additional_properties) @@ -48,8 +54,12 @@ def to_dict(self) -> Dict[str, Any]: field_dict["crawl_credits_used"] = crawl_credits_used if query_credits_used is not UNSET: field_dict["query_credits_used"] = query_credits_used - if index_credits_used is not UNSET: - field_dict["index_credits_used"] = index_credits_used + if total_queries is not UNSET: + field_dict["total_queries"] = total_queries + if total_words_indexed is not UNSET: + field_dict["total_words_indexed"] = total_words_indexed + if total_storage_credits_used is not UNSET: + field_dict["total_storage_credits_used"] = total_storage_credits_used return field_dict @@ -65,7 +75,11 @@ def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: query_credits_used = src_dict.get("query_credits_used") - index_credits_used = src_dict.get("index_credits_used") + total_queries = src_dict.get("total_queries") + + total_words_indexed = src_dict.get("total_words_indexed") + + total_storage_credits_used = src_dict.get("total_storage_credits_used") stats_project_response_200_data = cls( pages_found=pages_found, @@ -73,7 +87,9 @@ def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: pages_indexed=pages_indexed, crawl_credits_used=crawl_credits_used, query_credits_used=query_credits_used, - index_credits_used=index_credits_used, + total_queries=total_queries, + total_words_indexed=total_words_indexed, + total_storage_credits_used=total_storage_credits_used, ) stats_project_response_200_data.additional_properties = src_dict diff --git a/customgpt-client/customgpt_client/models/stats_project_response_400.py b/customgpt-client/customgpt_client/models/stats_project_response_400.py index 12bc853..f219296 100644 --- a/customgpt-client/customgpt_client/models/stats_project_response_400.py +++ b/customgpt-client/customgpt_client/models/stats_project_response_400.py @@ -20,7 +20,7 @@ class StatsProjectResponse400: data (Union[Unset, StatsProjectResponse400Data]): """ - status: Union[Unset, str] = "error" + status: Union[Unset, str] = UNSET url: Union[Unset, str] = UNSET data: Union[Unset, "StatsProjectResponse400Data"] = UNSET additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) diff --git a/customgpt-client/customgpt_client/models/stats_project_response_400_data.py b/customgpt-client/customgpt_client/models/stats_project_response_400_data.py index 04f2b27..6bc5922 100644 --- a/customgpt-client/customgpt_client/models/stats_project_response_400_data.py +++ b/customgpt-client/customgpt_client/models/stats_project_response_400_data.py @@ -15,7 +15,7 @@ class StatsProjectResponse400Data: message (Union[Unset, str]): The error message Example: Project id must be integer. """ - code: Union[Unset, str] = "400" + code: Union[Unset, str] = UNSET message: Union[Unset, str] = UNSET additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) diff --git a/customgpt-client/customgpt_client/models/stats_project_response_401.py b/customgpt-client/customgpt_client/models/stats_project_response_401.py index 19992c2..6ce2b88 100644 --- a/customgpt-client/customgpt_client/models/stats_project_response_401.py +++ b/customgpt-client/customgpt_client/models/stats_project_response_401.py @@ -20,7 +20,7 @@ class StatsProjectResponse401: data (Union[Unset, StatsProjectResponse401Data]): """ - status: Union[Unset, str] = "error" + status: Union[Unset, str] = UNSET url: Union[Unset, str] = UNSET data: Union[Unset, "StatsProjectResponse401Data"] = UNSET additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) diff --git a/customgpt-client/customgpt_client/models/stats_project_response_401_data.py b/customgpt-client/customgpt_client/models/stats_project_response_401_data.py index 2f5b889..d0b7efb 100644 --- a/customgpt-client/customgpt_client/models/stats_project_response_401_data.py +++ b/customgpt-client/customgpt_client/models/stats_project_response_401_data.py @@ -15,7 +15,7 @@ class StatsProjectResponse401Data: message (Union[Unset, str]): Example: API Token is either missing or invalid. """ - code: Union[Unset, str] = "401" + code: Union[Unset, str] = UNSET message: Union[Unset, str] = UNSET additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) diff --git a/customgpt-client/customgpt_client/models/stats_project_response_404.py b/customgpt-client/customgpt_client/models/stats_project_response_404.py index 1f77e04..890e6cd 100644 --- a/customgpt-client/customgpt_client/models/stats_project_response_404.py +++ b/customgpt-client/customgpt_client/models/stats_project_response_404.py @@ -20,7 +20,7 @@ class StatsProjectResponse404: data (Union[Unset, StatsProjectResponse404Data]): """ - status: Union[Unset, str] = "error" + status: Union[Unset, str] = UNSET url: Union[Unset, str] = UNSET data: Union[Unset, "StatsProjectResponse404Data"] = UNSET additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) diff --git a/customgpt-client/customgpt_client/models/stats_project_response_404_data.py b/customgpt-client/customgpt_client/models/stats_project_response_404_data.py index 4bc68cc..786f8bb 100644 --- a/customgpt-client/customgpt_client/models/stats_project_response_404_data.py +++ b/customgpt-client/customgpt_client/models/stats_project_response_404_data.py @@ -16,8 +16,8 @@ class StatsProjectResponse404Data: found. """ - code: Union[Unset, str] = "404" - message: Union[Unset, str] = "Project with id 1 not found" + code: Union[Unset, str] = UNSET + message: Union[Unset, str] = UNSET additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) def to_dict(self) -> Dict[str, Any]: diff --git a/customgpt-client/customgpt_client/models/stats_project_response_500.py b/customgpt-client/customgpt_client/models/stats_project_response_500.py index 356552f..383d869 100644 --- a/customgpt-client/customgpt_client/models/stats_project_response_500.py +++ b/customgpt-client/customgpt_client/models/stats_project_response_500.py @@ -20,7 +20,7 @@ class StatsProjectResponse500: data (Union[Unset, StatsProjectResponse500Data]): """ - status: Union[Unset, str] = "error" + status: Union[Unset, str] = UNSET url: Union[Unset, str] = UNSET data: Union[Unset, "StatsProjectResponse500Data"] = UNSET additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) diff --git a/customgpt-client/customgpt_client/models/stats_project_response_500_data.py b/customgpt-client/customgpt_client/models/stats_project_response_500_data.py index 65bafb0..a33efc2 100644 --- a/customgpt-client/customgpt_client/models/stats_project_response_500_data.py +++ b/customgpt-client/customgpt_client/models/stats_project_response_500_data.py @@ -15,7 +15,7 @@ class StatsProjectResponse500Data: message (Union[Unset, str]): Example: Internal Server Error. """ - code: Union[Unset, str] = "500" + code: Union[Unset, str] = UNSET message: Union[Unset, str] = UNSET additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) diff --git a/customgpt-client/customgpt_client/models/synchronize_source_response_201.py b/customgpt-client/customgpt_client/models/synchronize_source_response_201.py new file mode 100644 index 0000000..5b92151 --- /dev/null +++ b/customgpt-client/customgpt_client/models/synchronize_source_response_201.py @@ -0,0 +1,80 @@ +from typing import TYPE_CHECKING, Any, Dict, List, Type, TypeVar, Union + +import attr + +from ..types import UNSET, Unset + +if TYPE_CHECKING: + from ..models.synchronize_source_response_201_data import SynchronizeSourceResponse201Data + + +T = TypeVar("T", bound="SynchronizeSourceResponse201") + + +@attr.s(auto_attribs=True) +class SynchronizeSourceResponse201: + """ + Attributes: + status (Union[Unset, SynchronizeSourceResponse201Status]): The status of the response Example: success. + data (Union[Unset, SynchronizeSourceResponse201Data]): + """ + + status: Union[Unset, str] = UNSET + data: Union[Unset, "SynchronizeSourceResponse201Data"] = UNSET + additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + status: Union[Unset, str] = UNSET + if not isinstance(self.status, Unset): + status = self.status + + data: Union[Unset, Dict[str, Any]] = UNSET + if not isinstance(self.data, Unset): + data = self.data.to_dict() + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if status is not UNSET: + field_dict["status"] = status + if data is not UNSET: + field_dict["data"] = data + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + from ..models.synchronize_source_response_201_data import SynchronizeSourceResponse201Data + + status = src_dict.get("status") + + _data = src_dict.get("data") + data: Union[Unset, SynchronizeSourceResponse201Data] + if isinstance(_data, Unset): + data = UNSET + else: + data = SynchronizeSourceResponse201Data.from_dict(_data) + + synchronize_source_response_201 = cls( + status=status, + data=data, + ) + + synchronize_source_response_201.additional_properties = src_dict + return synchronize_source_response_201 + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/customgpt-client/customgpt_client/models/synchronize_source_response_201_data.py b/customgpt-client/customgpt_client/models/synchronize_source_response_201_data.py new file mode 100644 index 0000000..17c94ac --- /dev/null +++ b/customgpt-client/customgpt_client/models/synchronize_source_response_201_data.py @@ -0,0 +1,148 @@ +import datetime +from typing import TYPE_CHECKING, Any, Dict, List, Type, TypeVar, Union + +import attr +from dateutil.parser import isoparse + +from ..types import UNSET, Unset + +if TYPE_CHECKING: + from ..models.synchronize_source_response_201_data_pages_item import SynchronizeSourceResponse201DataPagesItem + from ..models.synchronize_source_response_201_data_settings import SynchronizeSourceResponse201DataSettings + + +T = TypeVar("T", bound="SynchronizeSourceResponse201Data") + + +@attr.s(auto_attribs=True) +class SynchronizeSourceResponse201Data: + """ + Attributes: + id (Union[Unset, int]): The project source ID Example: 1. + created_at (Union[Unset, datetime.datetime]): The project source creation date Example: 2021-01-01 00:00:00. + updated_at (Union[Unset, datetime.datetime]): The project source update date Example: 2021-01-01 00:00:00. + type (Union[Unset, SynchronizeSourceResponse201DataType]): The project source type Example: sitemap. + settings (Union[Unset, SynchronizeSourceResponse201DataSettings]): The project source settings + pages (Union[Unset, None, List['SynchronizeSourceResponse201DataPagesItem']]): The project source pages + """ + + id: Union[Unset, int] = UNSET + created_at: Union[Unset, datetime.datetime] = UNSET + updated_at: Union[Unset, datetime.datetime] = UNSET + type: Union[Unset, str] = UNSET + settings: Union[Unset, "SynchronizeSourceResponse201DataSettings"] = UNSET + pages: Union[Unset, None, List["SynchronizeSourceResponse201DataPagesItem"]] = UNSET + additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + id = self.id + created_at: Union[Unset, str] = UNSET + if not isinstance(self.created_at, Unset): + created_at = self.created_at.isoformat() + + updated_at: Union[Unset, str] = UNSET + if not isinstance(self.updated_at, Unset): + updated_at = self.updated_at.isoformat() + + type: Union[Unset, str] = UNSET + if not isinstance(self.type, Unset): + type = self.type + + settings: Union[Unset, Dict[str, Any]] = UNSET + if not isinstance(self.settings, Unset): + settings = self.settings.to_dict() + + pages: Union[Unset, None, List[Dict[str, Any]]] = UNSET + if not isinstance(self.pages, Unset): + if self.pages is None: + pages = None + else: + pages = [] + for pages_item_data in self.pages: + pages_item = pages_item_data.to_dict() + + pages.append(pages_item) + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if id is not UNSET: + field_dict["id"] = id + if created_at is not UNSET: + field_dict["created_at"] = created_at + if updated_at is not UNSET: + field_dict["updated_at"] = updated_at + if type is not UNSET: + field_dict["type"] = type + if settings is not UNSET: + field_dict["settings"] = settings + if pages is not UNSET: + for index, field_value in enumerate(pages): + field_dict[f"pages[{index}]"] = field_value + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + from ..models.synchronize_source_response_201_data_pages_item import SynchronizeSourceResponse201DataPagesItem + from ..models.synchronize_source_response_201_data_settings import SynchronizeSourceResponse201DataSettings + + id = src_dict.get("id") + + _created_at = src_dict.get("created_at") + created_at: Union[Unset, datetime.datetime] + if isinstance(_created_at, Unset): + created_at = UNSET + else: + created_at = isoparse(_created_at) + + _updated_at = src_dict.get("updated_at") + updated_at: Union[Unset, datetime.datetime] + if isinstance(_updated_at, Unset): + updated_at = UNSET + else: + updated_at = isoparse(_updated_at) + + type = src_dict.get("type") + + _settings = src_dict.get("settings") + settings: Union[Unset, SynchronizeSourceResponse201DataSettings] + if isinstance(_settings, Unset): + settings = UNSET + else: + settings = SynchronizeSourceResponse201DataSettings.from_dict(_settings) + + pages = [] + _pages = src_dict.get("pages") + for pages_item_data in _pages or []: + pages_item = SynchronizeSourceResponse201DataPagesItem.from_dict(pages_item_data) + + pages.append(pages_item) + + synchronize_source_response_201_data = cls( + id=id, + created_at=created_at, + updated_at=updated_at, + type=type, + settings=settings, + pages=pages, + ) + + synchronize_source_response_201_data.additional_properties = src_dict + return synchronize_source_response_201_data + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/customgpt-client/customgpt_client/models/synchronize_source_response_201_data_pages_item.py b/customgpt-client/customgpt_client/models/synchronize_source_response_201_data_pages_item.py new file mode 100644 index 0000000..392cbce --- /dev/null +++ b/customgpt-client/customgpt_client/models/synchronize_source_response_201_data_pages_item.py @@ -0,0 +1,195 @@ +import datetime +from typing import Any, Dict, List, Type, TypeVar, Union + +import attr +from dateutil.parser import isoparse + +from ..types import UNSET, Unset + +T = TypeVar("T", bound="SynchronizeSourceResponse201DataPagesItem") + + +@attr.s(auto_attribs=True) +class SynchronizeSourceResponse201DataPagesItem: + r""" + Attributes: + id (Union[Unset, int]): Page ID Example: 1. + page_url (Union[Unset, str]): URL of the page or file Example: https://example.com. + page_url_hash (Union[Unset, str]): Hash of the URL of the page or file Example: + d41d8cd98f00b204e9800998ecf8427e. + project_id (Union[Unset, int]): Project ID Example: 1. + s3_path (Union[Unset, None, str]): This is the path where the page is stored in S3.\nNote: This is omitted in + the response if the page is not a file Example: project-1/page-1/file.pdf. + crawl_status (Union[Unset, SynchronizeSourceResponse201DataPagesItemCrawlStatus]): Crawl status of the page + Default: SynchronizeSourceResponse201DataPagesItemCrawlStatus.QUEUED. Example: queued. + index_status (Union[Unset, SynchronizeSourceResponse201DataPagesItemIndexStatus]): Index status of the page + Default: SynchronizeSourceResponse201DataPagesItemIndexStatus.QUEUED. Example: queued. + is_file (Union[Unset, bool]): Whether the page is a file or not Example: True. + is_refreshable (Union[Unset, bool]): Whether the page can be refreshed or not Example: True. + is_file_kept (Union[Unset, bool]): Whether the file is kept after processing or not.\nNote: This is omitted in + the response if the page is not a file Default: True. Example: True. + filename (Union[Unset, None, str]): Filename of the page.\nNote: This is omitted in the response if the page is + not a file Example: file.pdf. + filesize (Union[Unset, None, int]): Filesize of the page.\nNote: This is omitted in the response if the page is + not a file Example: 100. + created_at (Union[Unset, datetime.datetime]): Date and time when the page was created Example: 2021-01-01 + 00:00:00. + updated_at (Union[Unset, datetime.datetime]): Date and time when the page was updated Example: 2021-01-01 + 00:00:00. + """ + + id: Union[Unset, int] = UNSET + page_url: Union[Unset, str] = UNSET + page_url_hash: Union[Unset, str] = UNSET + project_id: Union[Unset, int] = UNSET + s3_path: Union[Unset, None, str] = UNSET + crawl_status: Union[Unset, str] = UNSET + index_status: Union[Unset, str] = UNSET + is_file: Union[Unset, bool] = False + is_refreshable: Union[Unset, bool] = False + is_file_kept: Union[Unset, bool] = True + filename: Union[Unset, None, str] = UNSET + filesize: Union[Unset, None, int] = UNSET + created_at: Union[Unset, datetime.datetime] = UNSET + updated_at: Union[Unset, datetime.datetime] = UNSET + additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + id = self.id + page_url = self.page_url + page_url_hash = self.page_url_hash + project_id = self.project_id + s3_path = self.s3_path + crawl_status: Union[Unset, str] = UNSET + if not isinstance(self.crawl_status, Unset): + crawl_status = self.crawl_status + + index_status: Union[Unset, str] = UNSET + if not isinstance(self.index_status, Unset): + index_status = self.index_status + + is_file = True if self.is_file else False + + is_refreshable = True if self.is_refreshable else False + + is_file_kept = True if self.is_file_kept else False + + filename = self.filename + filesize = self.filesize + created_at: Union[Unset, str] = UNSET + if not isinstance(self.created_at, Unset): + created_at = self.created_at.isoformat() + + updated_at: Union[Unset, str] = UNSET + if not isinstance(self.updated_at, Unset): + updated_at = self.updated_at.isoformat() + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if id is not UNSET: + field_dict["id"] = id + if page_url is not UNSET: + field_dict["page_url"] = page_url + if page_url_hash is not UNSET: + field_dict["page_url_hash"] = page_url_hash + if project_id is not UNSET: + field_dict["project_id"] = project_id + if s3_path is not UNSET: + field_dict["s3_path"] = s3_path + if crawl_status is not UNSET: + field_dict["crawl_status"] = crawl_status + if index_status is not UNSET: + field_dict["index_status"] = index_status + if is_file is not UNSET: + field_dict["is_file"] = is_file + if is_refreshable is not UNSET: + field_dict["is_refreshable"] = is_refreshable + if is_file_kept is not UNSET: + field_dict["is_file_kept"] = is_file_kept + if filename is not UNSET: + field_dict["filename"] = filename + if filesize is not UNSET: + field_dict["filesize"] = filesize + if created_at is not UNSET: + field_dict["created_at"] = created_at + if updated_at is not UNSET: + field_dict["updated_at"] = updated_at + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + id = src_dict.get("id") + + page_url = src_dict.get("page_url") + + page_url_hash = src_dict.get("page_url_hash") + + project_id = src_dict.get("project_id") + + s3_path = src_dict.get("s3_path") + + crawl_status = src_dict.get("crawl_status") + + index_status = src_dict.get("index_status") + + is_file = src_dict.get("is_file") + + is_refreshable = src_dict.get("is_refreshable") + + is_file_kept = src_dict.get("is_file_kept") + + filename = src_dict.get("filename") + + filesize = src_dict.get("filesize") + + _created_at = src_dict.get("created_at") + created_at: Union[Unset, datetime.datetime] + if isinstance(_created_at, Unset): + created_at = UNSET + else: + created_at = isoparse(_created_at) + + _updated_at = src_dict.get("updated_at") + updated_at: Union[Unset, datetime.datetime] + if isinstance(_updated_at, Unset): + updated_at = UNSET + else: + updated_at = isoparse(_updated_at) + + synchronize_source_response_201_data_pages_item = cls( + id=id, + page_url=page_url, + page_url_hash=page_url_hash, + project_id=project_id, + s3_path=s3_path, + crawl_status=crawl_status, + index_status=index_status, + is_file=is_file, + is_refreshable=is_refreshable, + is_file_kept=is_file_kept, + filename=filename, + filesize=filesize, + created_at=created_at, + updated_at=updated_at, + ) + + synchronize_source_response_201_data_pages_item.additional_properties = src_dict + return synchronize_source_response_201_data_pages_item + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/customgpt-client/customgpt_client/models/synchronize_source_response_201_data_pages_item_crawl_status.py b/customgpt-client/customgpt_client/models/synchronize_source_response_201_data_pages_item_crawl_status.py new file mode 100644 index 0000000..6b54bab --- /dev/null +++ b/customgpt-client/customgpt_client/models/synchronize_source_response_201_data_pages_item_crawl_status.py @@ -0,0 +1,12 @@ +from enum import Enum + + +class SynchronizeSourceResponse201DataPagesItemCrawlStatus(str, Enum): + FAILED = "failed" + LIMITED = "limited" + NA = "n/a" + OK = "ok" + QUEUED = "queued" + + def __str__(self) -> str: + return str(self.value) diff --git a/customgpt-client/customgpt_client/models/synchronize_source_response_201_data_pages_item_index_status.py b/customgpt-client/customgpt_client/models/synchronize_source_response_201_data_pages_item_index_status.py new file mode 100644 index 0000000..98634cc --- /dev/null +++ b/customgpt-client/customgpt_client/models/synchronize_source_response_201_data_pages_item_index_status.py @@ -0,0 +1,12 @@ +from enum import Enum + + +class SynchronizeSourceResponse201DataPagesItemIndexStatus(str, Enum): + FAILED = "failed" + LIMITED = "limited" + NA = "n/a" + OK = "ok" + QUEUED = "queued" + + def __str__(self) -> str: + return str(self.value) diff --git a/customgpt-client/customgpt_client/models/synchronize_source_response_201_data_settings.py b/customgpt-client/customgpt_client/models/synchronize_source_response_201_data_settings.py new file mode 100644 index 0000000..336c1bf --- /dev/null +++ b/customgpt-client/customgpt_client/models/synchronize_source_response_201_data_settings.py @@ -0,0 +1,113 @@ +from typing import Any, Dict, List, Type, TypeVar, Union + +import attr + +from ..types import UNSET, Unset + +T = TypeVar("T", bound="SynchronizeSourceResponse201DataSettings") + + +@attr.s(auto_attribs=True) +class SynchronizeSourceResponse201DataSettings: + """The project source settings + + Attributes: + executive_js (Union[Unset, bool]): Whether the project source should execute JavaScript Default: True. Example: + True. + data_refresh_frequency (Union[Unset, SynchronizeSourceResponse201DataSettingsDataRefreshFrequency]): The project + source data refresh frequency Default: SynchronizeSourceResponse201DataSettingsDataRefreshFrequency.NEVER. + Example: never. + create_new_pages (Union[Unset, bool]): Add new pages to project automatically during refresh project source + Default: True. Example: True. + remove_unexist_pages (Union[Unset, bool]): Remove pages from project automatically during refresh project source + Default: True. + refresh_existing_pages (Union[Unset, SynchronizeSourceResponse201DataSettingsRefreshExistingPages]): Refresh + existing page during refresh project source Default: + SynchronizeSourceResponse201DataSettingsRefreshExistingPages.NEVER. Example: never. + sitemap_path (Union[Unset, str]): The project source sitemap path Example: https://example.com/sitemap.xml. + """ + + executive_js: Union[Unset, bool] = True + data_refresh_frequency: Union[Unset, str] = UNSET + create_new_pages: Union[Unset, bool] = True + remove_unexist_pages: Union[Unset, bool] = True + refresh_existing_pages: Union[Unset, str] = UNSET + sitemap_path: Union[Unset, str] = UNSET + additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + executive_js = True if self.executive_js else False + + data_refresh_frequency: Union[Unset, str] = UNSET + if not isinstance(self.data_refresh_frequency, Unset): + data_refresh_frequency = self.data_refresh_frequency + + create_new_pages = True if self.create_new_pages else False + + remove_unexist_pages = True if self.remove_unexist_pages else False + + refresh_existing_pages: Union[Unset, str] = UNSET + if not isinstance(self.refresh_existing_pages, Unset): + refresh_existing_pages = self.refresh_existing_pages + + sitemap_path = self.sitemap_path + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if executive_js is not UNSET: + field_dict["executive_js"] = executive_js + if data_refresh_frequency is not UNSET: + field_dict["data_refresh_frequency"] = data_refresh_frequency + if create_new_pages is not UNSET: + field_dict["create_new_pages"] = create_new_pages + if remove_unexist_pages is not UNSET: + field_dict["remove_unexist_pages"] = remove_unexist_pages + if refresh_existing_pages is not UNSET: + field_dict["refresh_existing_pages"] = refresh_existing_pages + if sitemap_path is not UNSET: + field_dict["sitemap_path"] = sitemap_path + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + executive_js = src_dict.get("executive_js") + + data_refresh_frequency = src_dict.get("data_refresh_frequency") + + create_new_pages = src_dict.get("create_new_pages") + + remove_unexist_pages = src_dict.get("remove_unexist_pages") + + refresh_existing_pages = src_dict.get("refresh_existing_pages") + + sitemap_path = src_dict.get("sitemap_path") + + synchronize_source_response_201_data_settings = cls( + executive_js=executive_js, + data_refresh_frequency=data_refresh_frequency, + create_new_pages=create_new_pages, + remove_unexist_pages=remove_unexist_pages, + refresh_existing_pages=refresh_existing_pages, + sitemap_path=sitemap_path, + ) + + synchronize_source_response_201_data_settings.additional_properties = src_dict + return synchronize_source_response_201_data_settings + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/customgpt-client/customgpt_client/models/synchronize_source_response_201_data_settings_data_refresh_frequency.py b/customgpt-client/customgpt_client/models/synchronize_source_response_201_data_settings_data_refresh_frequency.py new file mode 100644 index 0000000..c807826 --- /dev/null +++ b/customgpt-client/customgpt_client/models/synchronize_source_response_201_data_settings_data_refresh_frequency.py @@ -0,0 +1,12 @@ +from enum import Enum + + +class SynchronizeSourceResponse201DataSettingsDataRefreshFrequency(str, Enum): + ADVANCED = "advanced" + DAILY = "daily" + MONTHLY = "monthly" + NEVER = "never" + WEEKLY = "weekly" + + def __str__(self) -> str: + return str(self.value) diff --git a/customgpt-client/customgpt_client/models/synchronize_source_response_201_data_settings_refresh_existing_pages.py b/customgpt-client/customgpt_client/models/synchronize_source_response_201_data_settings_refresh_existing_pages.py new file mode 100644 index 0000000..6cef038 --- /dev/null +++ b/customgpt-client/customgpt_client/models/synchronize_source_response_201_data_settings_refresh_existing_pages.py @@ -0,0 +1,10 @@ +from enum import Enum + + +class SynchronizeSourceResponse201DataSettingsRefreshExistingPages(str, Enum): + ALWAYS = "always" + IF_UPDATED = "if_updated" + NEVER = "never" + + def __str__(self) -> str: + return str(self.value) diff --git a/customgpt-client/customgpt_client/models/synchronize_source_response_201_data_type.py b/customgpt-client/customgpt_client/models/synchronize_source_response_201_data_type.py new file mode 100644 index 0000000..3876e5f --- /dev/null +++ b/customgpt-client/customgpt_client/models/synchronize_source_response_201_data_type.py @@ -0,0 +1,9 @@ +from enum import Enum + + +class SynchronizeSourceResponse201DataType(str, Enum): + SITEMAP = "sitemap" + UPLOAD = "upload" + + def __str__(self) -> str: + return str(self.value) diff --git a/customgpt-client/customgpt_client/models/synchronize_source_response_201_status.py b/customgpt-client/customgpt_client/models/synchronize_source_response_201_status.py new file mode 100644 index 0000000..7866b45 --- /dev/null +++ b/customgpt-client/customgpt_client/models/synchronize_source_response_201_status.py @@ -0,0 +1,9 @@ +from enum import Enum + + +class SynchronizeSourceResponse201Status(str, Enum): + ERROR = "error" + SUCCESS = "success" + + def __str__(self) -> str: + return str(self.value) diff --git a/customgpt-client/customgpt_client/models/synchronize_source_response_400.py b/customgpt-client/customgpt_client/models/synchronize_source_response_400.py new file mode 100644 index 0000000..e070015 --- /dev/null +++ b/customgpt-client/customgpt_client/models/synchronize_source_response_400.py @@ -0,0 +1,88 @@ +from typing import TYPE_CHECKING, Any, Dict, List, Type, TypeVar, Union + +import attr + +from ..types import UNSET, Unset + +if TYPE_CHECKING: + from ..models.synchronize_source_response_400_data import SynchronizeSourceResponse400Data + + +T = TypeVar("T", bound="SynchronizeSourceResponse400") + + +@attr.s(auto_attribs=True) +class SynchronizeSourceResponse400: + """ + Attributes: + status (Union[Unset, SynchronizeSourceResponse400Status]): The status of the response Example: error. + url (Union[Unset, str]): The URL of the request Example: https://app.customgpt.ai/api/v1/projects/1. + data (Union[Unset, SynchronizeSourceResponse400Data]): + """ + + status: Union[Unset, str] = UNSET + url: Union[Unset, str] = UNSET + data: Union[Unset, "SynchronizeSourceResponse400Data"] = UNSET + additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + status: Union[Unset, str] = UNSET + if not isinstance(self.status, Unset): + status = self.status + + url = self.url + data: Union[Unset, Dict[str, Any]] = UNSET + if not isinstance(self.data, Unset): + data = self.data.to_dict() + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if status is not UNSET: + field_dict["status"] = status + if url is not UNSET: + field_dict["url"] = url + if data is not UNSET: + field_dict["data"] = data + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + from ..models.synchronize_source_response_400_data import SynchronizeSourceResponse400Data + + status = src_dict.get("status") + + url = src_dict.get("url") + + _data = src_dict.get("data") + data: Union[Unset, SynchronizeSourceResponse400Data] + if isinstance(_data, Unset): + data = UNSET + else: + data = SynchronizeSourceResponse400Data.from_dict(_data) + + synchronize_source_response_400 = cls( + status=status, + url=url, + data=data, + ) + + synchronize_source_response_400.additional_properties = src_dict + return synchronize_source_response_400 + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/customgpt-client/customgpt_client/models/synchronize_source_response_400_data.py b/customgpt-client/customgpt_client/models/synchronize_source_response_400_data.py new file mode 100644 index 0000000..af2185a --- /dev/null +++ b/customgpt-client/customgpt_client/models/synchronize_source_response_400_data.py @@ -0,0 +1,67 @@ +from typing import Any, Dict, List, Type, TypeVar, Union + +import attr + +from ..types import UNSET, Unset + +T = TypeVar("T", bound="SynchronizeSourceResponse400Data") + + +@attr.s(auto_attribs=True) +class SynchronizeSourceResponse400Data: + """ + Attributes: + code (Union[Unset, SynchronizeSourceResponse400DataCode]): The error status code Example: 400. + message (Union[Unset, str]): The error message Example: Project id must be integer. + """ + + code: Union[Unset, str] = UNSET + message: Union[Unset, str] = UNSET + additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + code: Union[Unset, int] = UNSET + if not isinstance(self.code, Unset): + code = self.code + + message = self.message + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if code is not UNSET: + field_dict["code"] = code + if message is not UNSET: + field_dict["message"] = message + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + code = src_dict.get("code") + + message = src_dict.get("message") + + synchronize_source_response_400_data = cls( + code=code, + message=message, + ) + + synchronize_source_response_400_data.additional_properties = src_dict + return synchronize_source_response_400_data + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/customgpt-client/customgpt_client/models/synchronize_source_response_400_data_code.py b/customgpt-client/customgpt_client/models/synchronize_source_response_400_data_code.py new file mode 100644 index 0000000..9b7f84f --- /dev/null +++ b/customgpt-client/customgpt_client/models/synchronize_source_response_400_data_code.py @@ -0,0 +1,13 @@ +from enum import IntEnum + + +class SynchronizeSourceResponse400DataCode(IntEnum): + VALUE_400 = 400 + VALUE_401 = 401 + VALUE_403 = 403 + VALUE_404 = 404 + VALUE_500 = 500 + VALUE_503 = 503 + + def __str__(self) -> str: + return str(self.value) diff --git a/customgpt-client/customgpt_client/models/synchronize_source_response_400_status.py b/customgpt-client/customgpt_client/models/synchronize_source_response_400_status.py new file mode 100644 index 0000000..8a890c3 --- /dev/null +++ b/customgpt-client/customgpt_client/models/synchronize_source_response_400_status.py @@ -0,0 +1,9 @@ +from enum import Enum + + +class SynchronizeSourceResponse400Status(str, Enum): + ERROR = "error" + SUCCESS = "success" + + def __str__(self) -> str: + return str(self.value) diff --git a/customgpt-client/customgpt_client/models/synchronize_source_response_401.py b/customgpt-client/customgpt_client/models/synchronize_source_response_401.py new file mode 100644 index 0000000..806c103 --- /dev/null +++ b/customgpt-client/customgpt_client/models/synchronize_source_response_401.py @@ -0,0 +1,88 @@ +from typing import TYPE_CHECKING, Any, Dict, List, Type, TypeVar, Union + +import attr + +from ..types import UNSET, Unset + +if TYPE_CHECKING: + from ..models.synchronize_source_response_401_data import SynchronizeSourceResponse401Data + + +T = TypeVar("T", bound="SynchronizeSourceResponse401") + + +@attr.s(auto_attribs=True) +class SynchronizeSourceResponse401: + """ + Attributes: + status (Union[Unset, SynchronizeSourceResponse401Status]): The status of the response Example: error. + url (Union[Unset, str]): The URL of the request Example: https://app.customgpt.ai/api/v1/projects/1. + data (Union[Unset, SynchronizeSourceResponse401Data]): + """ + + status: Union[Unset, str] = UNSET + url: Union[Unset, str] = UNSET + data: Union[Unset, "SynchronizeSourceResponse401Data"] = UNSET + additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + status: Union[Unset, str] = UNSET + if not isinstance(self.status, Unset): + status = self.status + + url = self.url + data: Union[Unset, Dict[str, Any]] = UNSET + if not isinstance(self.data, Unset): + data = self.data.to_dict() + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if status is not UNSET: + field_dict["status"] = status + if url is not UNSET: + field_dict["url"] = url + if data is not UNSET: + field_dict["data"] = data + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + from ..models.synchronize_source_response_401_data import SynchronizeSourceResponse401Data + + status = src_dict.get("status") + + url = src_dict.get("url") + + _data = src_dict.get("data") + data: Union[Unset, SynchronizeSourceResponse401Data] + if isinstance(_data, Unset): + data = UNSET + else: + data = SynchronizeSourceResponse401Data.from_dict(_data) + + synchronize_source_response_401 = cls( + status=status, + url=url, + data=data, + ) + + synchronize_source_response_401.additional_properties = src_dict + return synchronize_source_response_401 + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/customgpt-client/customgpt_client/models/synchronize_source_response_401_data.py b/customgpt-client/customgpt_client/models/synchronize_source_response_401_data.py new file mode 100644 index 0000000..61b3266 --- /dev/null +++ b/customgpt-client/customgpt_client/models/synchronize_source_response_401_data.py @@ -0,0 +1,67 @@ +from typing import Any, Dict, List, Type, TypeVar, Union + +import attr + +from ..types import UNSET, Unset + +T = TypeVar("T", bound="SynchronizeSourceResponse401Data") + + +@attr.s(auto_attribs=True) +class SynchronizeSourceResponse401Data: + """ + Attributes: + code (Union[Unset, SynchronizeSourceResponse401DataCode]): The error status code Example: 401. + message (Union[Unset, str]): Example: API Token is either missing or invalid. + """ + + code: Union[Unset, str] = UNSET + message: Union[Unset, str] = UNSET + additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + code: Union[Unset, int] = UNSET + if not isinstance(self.code, Unset): + code = self.code + + message = self.message + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if code is not UNSET: + field_dict["code"] = code + if message is not UNSET: + field_dict["message"] = message + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + code = src_dict.get("code") + + message = src_dict.get("message") + + synchronize_source_response_401_data = cls( + code=code, + message=message, + ) + + synchronize_source_response_401_data.additional_properties = src_dict + return synchronize_source_response_401_data + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/customgpt-client/customgpt_client/models/synchronize_source_response_401_data_code.py b/customgpt-client/customgpt_client/models/synchronize_source_response_401_data_code.py new file mode 100644 index 0000000..0954453 --- /dev/null +++ b/customgpt-client/customgpt_client/models/synchronize_source_response_401_data_code.py @@ -0,0 +1,13 @@ +from enum import IntEnum + + +class SynchronizeSourceResponse401DataCode(IntEnum): + VALUE_400 = 400 + VALUE_401 = 401 + VALUE_403 = 403 + VALUE_404 = 404 + VALUE_500 = 500 + VALUE_503 = 503 + + def __str__(self) -> str: + return str(self.value) diff --git a/customgpt-client/customgpt_client/models/synchronize_source_response_401_status.py b/customgpt-client/customgpt_client/models/synchronize_source_response_401_status.py new file mode 100644 index 0000000..e3a76d1 --- /dev/null +++ b/customgpt-client/customgpt_client/models/synchronize_source_response_401_status.py @@ -0,0 +1,9 @@ +from enum import Enum + + +class SynchronizeSourceResponse401Status(str, Enum): + ERROR = "error" + SUCCESS = "success" + + def __str__(self) -> str: + return str(self.value) diff --git a/customgpt-client/customgpt_client/models/synchronize_source_response_403.py b/customgpt-client/customgpt_client/models/synchronize_source_response_403.py new file mode 100644 index 0000000..5fcb346 --- /dev/null +++ b/customgpt-client/customgpt_client/models/synchronize_source_response_403.py @@ -0,0 +1,88 @@ +from typing import TYPE_CHECKING, Any, Dict, List, Type, TypeVar, Union + +import attr + +from ..types import UNSET, Unset + +if TYPE_CHECKING: + from ..models.synchronize_source_response_403_data import SynchronizeSourceResponse403Data + + +T = TypeVar("T", bound="SynchronizeSourceResponse403") + + +@attr.s(auto_attribs=True) +class SynchronizeSourceResponse403: + """ + Attributes: + status (Union[Unset, SynchronizeSourceResponse403Status]): The status of the response Example: error. + url (Union[Unset, str]): The URL of the request Example: https://app.customgpt.ai/api/v1/projects/1. + data (Union[Unset, SynchronizeSourceResponse403Data]): + """ + + status: Union[Unset, str] = UNSET + url: Union[Unset, str] = UNSET + data: Union[Unset, "SynchronizeSourceResponse403Data"] = UNSET + additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + status: Union[Unset, str] = UNSET + if not isinstance(self.status, Unset): + status = self.status + + url = self.url + data: Union[Unset, Dict[str, Any]] = UNSET + if not isinstance(self.data, Unset): + data = self.data.to_dict() + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if status is not UNSET: + field_dict["status"] = status + if url is not UNSET: + field_dict["url"] = url + if data is not UNSET: + field_dict["data"] = data + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + from ..models.synchronize_source_response_403_data import SynchronizeSourceResponse403Data + + status = src_dict.get("status") + + url = src_dict.get("url") + + _data = src_dict.get("data") + data: Union[Unset, SynchronizeSourceResponse403Data] + if isinstance(_data, Unset): + data = UNSET + else: + data = SynchronizeSourceResponse403Data.from_dict(_data) + + synchronize_source_response_403 = cls( + status=status, + url=url, + data=data, + ) + + synchronize_source_response_403.additional_properties = src_dict + return synchronize_source_response_403 + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/customgpt-client/customgpt_client/models/synchronize_source_response_403_data.py b/customgpt-client/customgpt_client/models/synchronize_source_response_403_data.py new file mode 100644 index 0000000..dc3b75f --- /dev/null +++ b/customgpt-client/customgpt_client/models/synchronize_source_response_403_data.py @@ -0,0 +1,70 @@ +from typing import Any, Dict, List, Type, TypeVar, Union + +import attr + +from ..types import UNSET, Unset + +T = TypeVar("T", bound="SynchronizeSourceResponse403Data") + + +@attr.s(auto_attribs=True) +class SynchronizeSourceResponse403Data: + """ + Attributes: + code (Union[Unset, SynchronizeSourceResponse403DataCode]): The error status code Example: 403. + message (Union[Unset, SynchronizeSourceResponse403DataMessage]): The error message Example: Subscription not + eligible for instant sync. + """ + + code: Union[Unset, str] = UNSET + message: Union[Unset, str] = UNSET + additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + code: Union[Unset, int] = UNSET + if not isinstance(self.code, Unset): + code = self.code + + message: Union[Unset, str] = UNSET + if not isinstance(self.message, Unset): + message = self.message + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if code is not UNSET: + field_dict["code"] = code + if message is not UNSET: + field_dict["message"] = message + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + code = src_dict.get("code") + + message = src_dict.get("message") + + synchronize_source_response_403_data = cls( + code=code, + message=message, + ) + + synchronize_source_response_403_data.additional_properties = src_dict + return synchronize_source_response_403_data + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/customgpt-client/customgpt_client/models/synchronize_source_response_403_data_code.py b/customgpt-client/customgpt_client/models/synchronize_source_response_403_data_code.py new file mode 100644 index 0000000..523953b --- /dev/null +++ b/customgpt-client/customgpt_client/models/synchronize_source_response_403_data_code.py @@ -0,0 +1,13 @@ +from enum import IntEnum + + +class SynchronizeSourceResponse403DataCode(IntEnum): + VALUE_400 = 400 + VALUE_401 = 401 + VALUE_403 = 403 + VALUE_404 = 404 + VALUE_500 = 500 + VALUE_503 = 503 + + def __str__(self) -> str: + return str(self.value) diff --git a/customgpt-client/customgpt_client/models/synchronize_source_response_403_data_message.py b/customgpt-client/customgpt_client/models/synchronize_source_response_403_data_message.py new file mode 100644 index 0000000..21d78e9 --- /dev/null +++ b/customgpt-client/customgpt_client/models/synchronize_source_response_403_data_message.py @@ -0,0 +1,12 @@ +from enum import Enum + + +class SynchronizeSourceResponse403DataMessage(str, Enum): + NEXT_INSTANT_SYNC_WILL_BE_AVAILABLE_IN_SECONDS_SECONDS = ( + "Next instant sync will be available in \{seconds\} seconds" + ) + PROJECT_SOURCE_CANT_BE_SYNCED = "Project source can't be synced" + YOUR_PLAN_NOT_ELIGIBLE_FOR_INSTANT_SYNC = "Your plan not eligible for instant sync" + + def __str__(self) -> str: + return str(self.value) diff --git a/customgpt-client/customgpt_client/models/synchronize_source_response_403_status.py b/customgpt-client/customgpt_client/models/synchronize_source_response_403_status.py new file mode 100644 index 0000000..34ca627 --- /dev/null +++ b/customgpt-client/customgpt_client/models/synchronize_source_response_403_status.py @@ -0,0 +1,9 @@ +from enum import Enum + + +class SynchronizeSourceResponse403Status(str, Enum): + ERROR = "error" + SUCCESS = "success" + + def __str__(self) -> str: + return str(self.value) diff --git a/customgpt-client/customgpt_client/models/synchronize_source_response_404.py b/customgpt-client/customgpt_client/models/synchronize_source_response_404.py new file mode 100644 index 0000000..22595da --- /dev/null +++ b/customgpt-client/customgpt_client/models/synchronize_source_response_404.py @@ -0,0 +1,88 @@ +from typing import TYPE_CHECKING, Any, Dict, List, Type, TypeVar, Union + +import attr + +from ..types import UNSET, Unset + +if TYPE_CHECKING: + from ..models.synchronize_source_response_404_data import SynchronizeSourceResponse404Data + + +T = TypeVar("T", bound="SynchronizeSourceResponse404") + + +@attr.s(auto_attribs=True) +class SynchronizeSourceResponse404: + """ + Attributes: + status (Union[Unset, SynchronizeSourceResponse404Status]): The status of the response Example: error. + url (Union[Unset, str]): The URL of the request Example: https://app.customgpt.ai/api/v1/projects/1. + data (Union[Unset, SynchronizeSourceResponse404Data]): + """ + + status: Union[Unset, str] = UNSET + url: Union[Unset, str] = UNSET + data: Union[Unset, "SynchronizeSourceResponse404Data"] = UNSET + additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + status: Union[Unset, str] = UNSET + if not isinstance(self.status, Unset): + status = self.status + + url = self.url + data: Union[Unset, Dict[str, Any]] = UNSET + if not isinstance(self.data, Unset): + data = self.data.to_dict() + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if status is not UNSET: + field_dict["status"] = status + if url is not UNSET: + field_dict["url"] = url + if data is not UNSET: + field_dict["data"] = data + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + from ..models.synchronize_source_response_404_data import SynchronizeSourceResponse404Data + + status = src_dict.get("status") + + url = src_dict.get("url") + + _data = src_dict.get("data") + data: Union[Unset, SynchronizeSourceResponse404Data] + if isinstance(_data, Unset): + data = UNSET + else: + data = SynchronizeSourceResponse404Data.from_dict(_data) + + synchronize_source_response_404 = cls( + status=status, + url=url, + data=data, + ) + + synchronize_source_response_404.additional_properties = src_dict + return synchronize_source_response_404 + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/customgpt-client/customgpt_client/models/synchronize_source_response_404_data.py b/customgpt-client/customgpt_client/models/synchronize_source_response_404_data.py new file mode 100644 index 0000000..4fc968a --- /dev/null +++ b/customgpt-client/customgpt_client/models/synchronize_source_response_404_data.py @@ -0,0 +1,70 @@ +from typing import Any, Dict, List, Type, TypeVar, Union + +import attr + +from ..types import UNSET, Unset + +T = TypeVar("T", bound="SynchronizeSourceResponse404Data") + + +@attr.s(auto_attribs=True) +class SynchronizeSourceResponse404Data: + """ + Attributes: + code (Union[Unset, SynchronizeSourceResponse404DataCode]): The error status code Example: 404. + message (Union[Unset, SynchronizeSourceResponse404DataMessage]): The error message Example: Project source with + id 1 not found. + """ + + code: Union[Unset, str] = UNSET + message: Union[Unset, str] = UNSET + additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + code: Union[Unset, int] = UNSET + if not isinstance(self.code, Unset): + code = self.code + + message: Union[Unset, str] = UNSET + if not isinstance(self.message, Unset): + message = self.message + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if code is not UNSET: + field_dict["code"] = code + if message is not UNSET: + field_dict["message"] = message + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + code = src_dict.get("code") + + message = src_dict.get("message") + + synchronize_source_response_404_data = cls( + code=code, + message=message, + ) + + synchronize_source_response_404_data.additional_properties = src_dict + return synchronize_source_response_404_data + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/customgpt-client/customgpt_client/models/synchronize_source_response_404_data_code.py b/customgpt-client/customgpt_client/models/synchronize_source_response_404_data_code.py new file mode 100644 index 0000000..10342f2 --- /dev/null +++ b/customgpt-client/customgpt_client/models/synchronize_source_response_404_data_code.py @@ -0,0 +1,13 @@ +from enum import IntEnum + + +class SynchronizeSourceResponse404DataCode(IntEnum): + VALUE_400 = 400 + VALUE_401 = 401 + VALUE_403 = 403 + VALUE_404 = 404 + VALUE_500 = 500 + VALUE_503 = 503 + + def __str__(self) -> str: + return str(self.value) diff --git a/customgpt-client/customgpt_client/models/synchronize_source_response_404_data_message.py b/customgpt-client/customgpt_client/models/synchronize_source_response_404_data_message.py new file mode 100644 index 0000000..ebc195e --- /dev/null +++ b/customgpt-client/customgpt_client/models/synchronize_source_response_404_data_message.py @@ -0,0 +1,9 @@ +from enum import Enum + + +class SynchronizeSourceResponse404DataMessage(str, Enum): + PROJECT_SOURCE_ID_IS_REQUIRED = "Project source id is required" + PROJECT_SOURCE_WITH_ID_SOURCEID_NOT_FOUND = "Project source with id {sourceId} not found" + + def __str__(self) -> str: + return str(self.value) diff --git a/customgpt-client/customgpt_client/models/synchronize_source_response_404_status.py b/customgpt-client/customgpt_client/models/synchronize_source_response_404_status.py new file mode 100644 index 0000000..bdc6a99 --- /dev/null +++ b/customgpt-client/customgpt_client/models/synchronize_source_response_404_status.py @@ -0,0 +1,9 @@ +from enum import Enum + + +class SynchronizeSourceResponse404Status(str, Enum): + ERROR = "error" + SUCCESS = "success" + + def __str__(self) -> str: + return str(self.value) diff --git a/customgpt-client/customgpt_client/models/synchronize_source_response_500.py b/customgpt-client/customgpt_client/models/synchronize_source_response_500.py new file mode 100644 index 0000000..7a40afc --- /dev/null +++ b/customgpt-client/customgpt_client/models/synchronize_source_response_500.py @@ -0,0 +1,88 @@ +from typing import TYPE_CHECKING, Any, Dict, List, Type, TypeVar, Union + +import attr + +from ..types import UNSET, Unset + +if TYPE_CHECKING: + from ..models.synchronize_source_response_500_data import SynchronizeSourceResponse500Data + + +T = TypeVar("T", bound="SynchronizeSourceResponse500") + + +@attr.s(auto_attribs=True) +class SynchronizeSourceResponse500: + """ + Attributes: + status (Union[Unset, SynchronizeSourceResponse500Status]): The status of the response Example: error. + url (Union[Unset, str]): The URL of the request Example: https://app.customgpt.ai/api/v1/projects/1. + data (Union[Unset, SynchronizeSourceResponse500Data]): + """ + + status: Union[Unset, str] = UNSET + url: Union[Unset, str] = UNSET + data: Union[Unset, "SynchronizeSourceResponse500Data"] = UNSET + additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + status: Union[Unset, str] = UNSET + if not isinstance(self.status, Unset): + status = self.status + + url = self.url + data: Union[Unset, Dict[str, Any]] = UNSET + if not isinstance(self.data, Unset): + data = self.data.to_dict() + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if status is not UNSET: + field_dict["status"] = status + if url is not UNSET: + field_dict["url"] = url + if data is not UNSET: + field_dict["data"] = data + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + from ..models.synchronize_source_response_500_data import SynchronizeSourceResponse500Data + + status = src_dict.get("status") + + url = src_dict.get("url") + + _data = src_dict.get("data") + data: Union[Unset, SynchronizeSourceResponse500Data] + if isinstance(_data, Unset): + data = UNSET + else: + data = SynchronizeSourceResponse500Data.from_dict(_data) + + synchronize_source_response_500 = cls( + status=status, + url=url, + data=data, + ) + + synchronize_source_response_500.additional_properties = src_dict + return synchronize_source_response_500 + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/customgpt-client/customgpt_client/models/synchronize_source_response_500_data.py b/customgpt-client/customgpt_client/models/synchronize_source_response_500_data.py new file mode 100644 index 0000000..7a14f05 --- /dev/null +++ b/customgpt-client/customgpt_client/models/synchronize_source_response_500_data.py @@ -0,0 +1,67 @@ +from typing import Any, Dict, List, Type, TypeVar, Union + +import attr + +from ..types import UNSET, Unset + +T = TypeVar("T", bound="SynchronizeSourceResponse500Data") + + +@attr.s(auto_attribs=True) +class SynchronizeSourceResponse500Data: + """ + Attributes: + code (Union[Unset, SynchronizeSourceResponse500DataCode]): The error status code Example: 500. + message (Union[Unset, str]): Example: Internal Server Error. + """ + + code: Union[Unset, str] = UNSET + message: Union[Unset, str] = UNSET + additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + code: Union[Unset, int] = UNSET + if not isinstance(self.code, Unset): + code = self.code + + message = self.message + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if code is not UNSET: + field_dict["code"] = code + if message is not UNSET: + field_dict["message"] = message + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + code = src_dict.get("code") + + message = src_dict.get("message") + + synchronize_source_response_500_data = cls( + code=code, + message=message, + ) + + synchronize_source_response_500_data.additional_properties = src_dict + return synchronize_source_response_500_data + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/customgpt-client/customgpt_client/models/synchronize_source_response_500_data_code.py b/customgpt-client/customgpt_client/models/synchronize_source_response_500_data_code.py new file mode 100644 index 0000000..54212e8 --- /dev/null +++ b/customgpt-client/customgpt_client/models/synchronize_source_response_500_data_code.py @@ -0,0 +1,13 @@ +from enum import IntEnum + + +class SynchronizeSourceResponse500DataCode(IntEnum): + VALUE_400 = 400 + VALUE_401 = 401 + VALUE_403 = 403 + VALUE_404 = 404 + VALUE_500 = 500 + VALUE_503 = 503 + + def __str__(self) -> str: + return str(self.value) diff --git a/customgpt-client/customgpt_client/models/synchronize_source_response_500_status.py b/customgpt-client/customgpt_client/models/synchronize_source_response_500_status.py new file mode 100644 index 0000000..b9029fb --- /dev/null +++ b/customgpt-client/customgpt_client/models/synchronize_source_response_500_status.py @@ -0,0 +1,9 @@ +from enum import Enum + + +class SynchronizeSourceResponse500Status(str, Enum): + ERROR = "error" + SUCCESS = "success" + + def __str__(self) -> str: + return str(self.value) diff --git a/customgpt-client/customgpt_client/models/time.py b/customgpt-client/customgpt_client/models/time.py new file mode 100644 index 0000000..05428d8 --- /dev/null +++ b/customgpt-client/customgpt_client/models/time.py @@ -0,0 +1,73 @@ +from typing import Any, Dict, List, Type, TypeVar, Union, cast + +import attr + +from ..types import UNSET, Unset + +T = TypeVar("T", bound="Time") + + +@attr.s(auto_attribs=True) +class Time: + """ + Attributes: + days (Union[Unset, List[int]]): Index of days in which sitemap should be refreshed. Starts from 0 (Sunday) to 6 + (Saturday). Example: [0, 1, 4, 6]. + hours (Union[Unset, List[str]]): List of times in which sitemap should be refreshed. Must be in HH:MM format. + Example: ['00:00', '08:00', '23:45']. + """ + + days: Union[Unset, List[int]] = UNSET + hours: Union[Unset, List[str]] = UNSET + additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + days: Union[Unset, List[int]] = UNSET + if not isinstance(self.days, Unset): + days = self.days + + hours: Union[Unset, List[str]] = UNSET + if not isinstance(self.hours, Unset): + hours = self.hours + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if days is not UNSET: + for index, field_value in enumerate(days): + field_dict[f"days[{index}]"] = field_value + if hours is not UNSET: + for index, field_value in enumerate(hours): + field_dict[f"hours[{index}]"] = field_value + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + days = cast(List[int], src_dict.get("days")) + + hours = cast(List[str], src_dict.get("hours")) + + time = cls( + days=days, + hours=hours, + ) + + time.additional_properties = src_dict + return time + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/customgpt-client/customgpt_client/models/traffic_reports_filters_item.py b/customgpt-client/customgpt_client/models/traffic_reports_filters_item.py new file mode 100644 index 0000000..abb956e --- /dev/null +++ b/customgpt-client/customgpt_client/models/traffic_reports_filters_item.py @@ -0,0 +1,8 @@ +from enum import Enum + + +class TrafficReportsFiltersItem(str, Enum): + SOURCES = "sources" + + def __str__(self) -> str: + return str(self.value) diff --git a/customgpt-client/customgpt_client/models/traffic_reports_response_200.py b/customgpt-client/customgpt_client/models/traffic_reports_response_200.py new file mode 100644 index 0000000..80e0de0 --- /dev/null +++ b/customgpt-client/customgpt_client/models/traffic_reports_response_200.py @@ -0,0 +1,80 @@ +from typing import TYPE_CHECKING, Any, Dict, List, Type, TypeVar, Union + +import attr + +from ..types import UNSET, Unset + +if TYPE_CHECKING: + from ..models.traffic_reports_response_200_data import TrafficReportsResponse200Data + + +T = TypeVar("T", bound="TrafficReportsResponse200") + + +@attr.s(auto_attribs=True) +class TrafficReportsResponse200: + """ + Attributes: + status (Union[Unset, TrafficReportsResponse200Status]): The status of the response Example: success. + data (Union[Unset, TrafficReportsResponse200Data]): + """ + + status: Union[Unset, str] = UNSET + data: Union[Unset, "TrafficReportsResponse200Data"] = UNSET + additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + status: Union[Unset, str] = UNSET + if not isinstance(self.status, Unset): + status = self.status + + data: Union[Unset, Dict[str, Any]] = UNSET + if not isinstance(self.data, Unset): + data = self.data.to_dict() + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if status is not UNSET: + field_dict["status"] = status + if data is not UNSET: + field_dict["data"] = data + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + from ..models.traffic_reports_response_200_data import TrafficReportsResponse200Data + + status = src_dict.get("status") + + _data = src_dict.get("data") + data: Union[Unset, TrafficReportsResponse200Data] + if isinstance(_data, Unset): + data = UNSET + else: + data = TrafficReportsResponse200Data.from_dict(_data) + + traffic_reports_response_200 = cls( + status=status, + data=data, + ) + + traffic_reports_response_200.additional_properties = src_dict + return traffic_reports_response_200 + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/customgpt-client/customgpt_client/models/traffic_reports_response_200_data.py b/customgpt-client/customgpt_client/models/traffic_reports_response_200_data.py new file mode 100644 index 0000000..5dd9ccd --- /dev/null +++ b/customgpt-client/customgpt_client/models/traffic_reports_response_200_data.py @@ -0,0 +1,74 @@ +from typing import TYPE_CHECKING, Any, Dict, List, Type, TypeVar, Union + +import attr + +from ..types import UNSET, Unset + +if TYPE_CHECKING: + from ..models.traffic_reports_response_200_data_sources_item import TrafficReportsResponse200DataSourcesItem + + +T = TypeVar("T", bound="TrafficReportsResponse200Data") + + +@attr.s(auto_attribs=True) +class TrafficReportsResponse200Data: + """ + Attributes: + sources (Union[Unset, List['TrafficReportsResponse200DataSourcesItem']]): + """ + + sources: Union[Unset, List["TrafficReportsResponse200DataSourcesItem"]] = UNSET + additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + sources: Union[Unset, List[Dict[str, Any]]] = UNSET + if not isinstance(self.sources, Unset): + sources = [] + for sources_item_data in self.sources: + sources_item = sources_item_data.to_dict() + + sources.append(sources_item) + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if sources is not UNSET: + for index, field_value in enumerate(sources): + field_dict[f"sources[{index}]"] = field_value + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + from ..models.traffic_reports_response_200_data_sources_item import TrafficReportsResponse200DataSourcesItem + + sources = [] + _sources = src_dict.get("sources") + for sources_item_data in _sources or []: + sources_item = TrafficReportsResponse200DataSourcesItem.from_dict(sources_item_data) + + sources.append(sources_item) + + traffic_reports_response_200_data = cls( + sources=sources, + ) + + traffic_reports_response_200_data.additional_properties = src_dict + return traffic_reports_response_200_data + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/customgpt-client/customgpt_client/models/traffic_reports_response_200_data_sources_item.py b/customgpt-client/customgpt_client/models/traffic_reports_response_200_data_sources_item.py new file mode 100644 index 0000000..165b74a --- /dev/null +++ b/customgpt-client/customgpt_client/models/traffic_reports_response_200_data_sources_item.py @@ -0,0 +1,67 @@ +from typing import Any, Dict, List, Type, TypeVar, Union + +import attr + +from ..types import UNSET, Unset + +T = TypeVar("T", bound="TrafficReportsResponse200DataSourcesItem") + + +@attr.s(auto_attribs=True) +class TrafficReportsResponse200DataSourcesItem: + """ + Attributes: + request_source (Union[Unset, TrafficReportsResponse200DataSourcesItemRequestSource]): Example: web. + request_source_number (Union[Unset, int]): Example: 20. + """ + + request_source: Union[Unset, str] = UNSET + request_source_number: Union[Unset, int] = UNSET + additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + request_source: Union[Unset, str] = UNSET + if not isinstance(self.request_source, Unset): + request_source = self.request_source + + request_source_number = self.request_source_number + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if request_source is not UNSET: + field_dict["request_source"] = request_source + if request_source_number is not UNSET: + field_dict["request_source_number"] = request_source_number + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + request_source = src_dict.get("request_source") + + request_source_number = src_dict.get("request_source_number") + + traffic_reports_response_200_data_sources_item = cls( + request_source=request_source, + request_source_number=request_source_number, + ) + + traffic_reports_response_200_data_sources_item.additional_properties = src_dict + return traffic_reports_response_200_data_sources_item + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/customgpt-client/customgpt_client/models/traffic_reports_response_200_data_sources_item_request_source.py b/customgpt-client/customgpt_client/models/traffic_reports_response_200_data_sources_item_request_source.py new file mode 100644 index 0000000..783255a --- /dev/null +++ b/customgpt-client/customgpt_client/models/traffic_reports_response_200_data_sources_item_request_source.py @@ -0,0 +1,14 @@ +from enum import Enum + + +class TrafficReportsResponse200DataSourcesItemRequestSource(str, Enum): + AI_ASSISTANT = "ai-assistant" + API = "api" + EMBED = "embed" + INSTANT_VIEWER = "instant-viewer" + LIVECHAT = "livechat" + SGE = "sge" + WEB = "web" + + def __str__(self) -> str: + return str(self.value) diff --git a/customgpt-client/customgpt_client/models/traffic_reports_response_200_status.py b/customgpt-client/customgpt_client/models/traffic_reports_response_200_status.py new file mode 100644 index 0000000..d180149 --- /dev/null +++ b/customgpt-client/customgpt_client/models/traffic_reports_response_200_status.py @@ -0,0 +1,9 @@ +from enum import Enum + + +class TrafficReportsResponse200Status(str, Enum): + ERROR = "error" + SUCCESS = "success" + + def __str__(self) -> str: + return str(self.value) diff --git a/customgpt-client/customgpt_client/models/traffic_reports_response_400.py b/customgpt-client/customgpt_client/models/traffic_reports_response_400.py new file mode 100644 index 0000000..3eb5672 --- /dev/null +++ b/customgpt-client/customgpt_client/models/traffic_reports_response_400.py @@ -0,0 +1,88 @@ +from typing import TYPE_CHECKING, Any, Dict, List, Type, TypeVar, Union + +import attr + +from ..types import UNSET, Unset + +if TYPE_CHECKING: + from ..models.traffic_reports_response_400_data import TrafficReportsResponse400Data + + +T = TypeVar("T", bound="TrafficReportsResponse400") + + +@attr.s(auto_attribs=True) +class TrafficReportsResponse400: + """ + Attributes: + status (Union[Unset, TrafficReportsResponse400Status]): The status of the response Example: error. + url (Union[Unset, str]): The URL of the request Example: https://app.customgpt.ai/api/v1/projects/1. + data (Union[Unset, TrafficReportsResponse400Data]): + """ + + status: Union[Unset, str] = UNSET + url: Union[Unset, str] = UNSET + data: Union[Unset, "TrafficReportsResponse400Data"] = UNSET + additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + status: Union[Unset, str] = UNSET + if not isinstance(self.status, Unset): + status = self.status + + url = self.url + data: Union[Unset, Dict[str, Any]] = UNSET + if not isinstance(self.data, Unset): + data = self.data.to_dict() + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if status is not UNSET: + field_dict["status"] = status + if url is not UNSET: + field_dict["url"] = url + if data is not UNSET: + field_dict["data"] = data + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + from ..models.traffic_reports_response_400_data import TrafficReportsResponse400Data + + status = src_dict.get("status") + + url = src_dict.get("url") + + _data = src_dict.get("data") + data: Union[Unset, TrafficReportsResponse400Data] + if isinstance(_data, Unset): + data = UNSET + else: + data = TrafficReportsResponse400Data.from_dict(_data) + + traffic_reports_response_400 = cls( + status=status, + url=url, + data=data, + ) + + traffic_reports_response_400.additional_properties = src_dict + return traffic_reports_response_400 + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/customgpt-client/customgpt_client/models/traffic_reports_response_400_data.py b/customgpt-client/customgpt_client/models/traffic_reports_response_400_data.py new file mode 100644 index 0000000..cd1fefe --- /dev/null +++ b/customgpt-client/customgpt_client/models/traffic_reports_response_400_data.py @@ -0,0 +1,67 @@ +from typing import Any, Dict, List, Type, TypeVar, Union + +import attr + +from ..types import UNSET, Unset + +T = TypeVar("T", bound="TrafficReportsResponse400Data") + + +@attr.s(auto_attribs=True) +class TrafficReportsResponse400Data: + """ + Attributes: + code (Union[Unset, TrafficReportsResponse400DataCode]): The error status code Example: 400. + message (Union[Unset, str]): The error message Example: Project id must be integer. + """ + + code: Union[Unset, str] = UNSET + message: Union[Unset, str] = UNSET + additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + code: Union[Unset, int] = UNSET + if not isinstance(self.code, Unset): + code = self.code + + message = self.message + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if code is not UNSET: + field_dict["code"] = code + if message is not UNSET: + field_dict["message"] = message + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + code = src_dict.get("code") + + message = src_dict.get("message") + + traffic_reports_response_400_data = cls( + code=code, + message=message, + ) + + traffic_reports_response_400_data.additional_properties = src_dict + return traffic_reports_response_400_data + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/customgpt-client/customgpt_client/models/traffic_reports_response_400_data_code.py b/customgpt-client/customgpt_client/models/traffic_reports_response_400_data_code.py new file mode 100644 index 0000000..79cad2f --- /dev/null +++ b/customgpt-client/customgpt_client/models/traffic_reports_response_400_data_code.py @@ -0,0 +1,13 @@ +from enum import IntEnum + + +class TrafficReportsResponse400DataCode(IntEnum): + VALUE_400 = 400 + VALUE_401 = 401 + VALUE_403 = 403 + VALUE_404 = 404 + VALUE_500 = 500 + VALUE_503 = 503 + + def __str__(self) -> str: + return str(self.value) diff --git a/customgpt-client/customgpt_client/models/traffic_reports_response_400_status.py b/customgpt-client/customgpt_client/models/traffic_reports_response_400_status.py new file mode 100644 index 0000000..4e783ea --- /dev/null +++ b/customgpt-client/customgpt_client/models/traffic_reports_response_400_status.py @@ -0,0 +1,9 @@ +from enum import Enum + + +class TrafficReportsResponse400Status(str, Enum): + ERROR = "error" + SUCCESS = "success" + + def __str__(self) -> str: + return str(self.value) diff --git a/customgpt-client/customgpt_client/models/get_page_metadata_response_401.py b/customgpt-client/customgpt_client/models/traffic_reports_response_401.py similarity index 71% rename from customgpt-client/customgpt_client/models/get_page_metadata_response_401.py rename to customgpt-client/customgpt_client/models/traffic_reports_response_401.py index aec8140..3e17865 100644 --- a/customgpt-client/customgpt_client/models/get_page_metadata_response_401.py +++ b/customgpt-client/customgpt_client/models/traffic_reports_response_401.py @@ -5,24 +5,24 @@ from ..types import UNSET, Unset if TYPE_CHECKING: - from ..models.get_page_metadata_response_401_data import GetPageMetadataResponse401Data + from ..models.traffic_reports_response_401_data import TrafficReportsResponse401Data -T = TypeVar("T", bound="GetPageMetadataResponse401") +T = TypeVar("T", bound="TrafficReportsResponse401") @attr.s(auto_attribs=True) -class GetPageMetadataResponse401: +class TrafficReportsResponse401: """ Attributes: - status (Union[Unset, GetPageMetadataResponse401Status]): The status of the response Example: error. + status (Union[Unset, TrafficReportsResponse401Status]): The status of the response Example: error. url (Union[Unset, str]): The URL of the request Example: https://app.customgpt.ai/api/v1/projects/1. - data (Union[Unset, GetPageMetadataResponse401Data]): + data (Union[Unset, TrafficReportsResponse401Data]): """ - status: Union[Unset, str] = "error" + status: Union[Unset, str] = UNSET url: Union[Unset, str] = UNSET - data: Union[Unset, "GetPageMetadataResponse401Data"] = UNSET + data: Union[Unset, "TrafficReportsResponse401Data"] = UNSET additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) def to_dict(self) -> Dict[str, Any]: @@ -49,27 +49,27 @@ def to_dict(self) -> Dict[str, Any]: @classmethod def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: - from ..models.get_page_metadata_response_401_data import GetPageMetadataResponse401Data + from ..models.traffic_reports_response_401_data import TrafficReportsResponse401Data status = src_dict.get("status") url = src_dict.get("url") _data = src_dict.get("data") - data: Union[Unset, GetPageMetadataResponse401Data] + data: Union[Unset, TrafficReportsResponse401Data] if isinstance(_data, Unset): data = UNSET else: - data = GetPageMetadataResponse401Data.from_dict(_data) + data = TrafficReportsResponse401Data.from_dict(_data) - get_page_metadata_response_401 = cls( + traffic_reports_response_401 = cls( status=status, url=url, data=data, ) - get_page_metadata_response_401.additional_properties = src_dict - return get_page_metadata_response_401 + traffic_reports_response_401.additional_properties = src_dict + return traffic_reports_response_401 @property def additional_keys(self) -> List[str]: diff --git a/customgpt-client/customgpt_client/models/traffic_reports_response_401_data.py b/customgpt-client/customgpt_client/models/traffic_reports_response_401_data.py new file mode 100644 index 0000000..fc2abac --- /dev/null +++ b/customgpt-client/customgpt_client/models/traffic_reports_response_401_data.py @@ -0,0 +1,67 @@ +from typing import Any, Dict, List, Type, TypeVar, Union + +import attr + +from ..types import UNSET, Unset + +T = TypeVar("T", bound="TrafficReportsResponse401Data") + + +@attr.s(auto_attribs=True) +class TrafficReportsResponse401Data: + """ + Attributes: + code (Union[Unset, TrafficReportsResponse401DataCode]): The error status code Example: 401. + message (Union[Unset, str]): Example: API Token is either missing or invalid. + """ + + code: Union[Unset, str] = UNSET + message: Union[Unset, str] = UNSET + additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + code: Union[Unset, int] = UNSET + if not isinstance(self.code, Unset): + code = self.code + + message = self.message + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if code is not UNSET: + field_dict["code"] = code + if message is not UNSET: + field_dict["message"] = message + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + code = src_dict.get("code") + + message = src_dict.get("message") + + traffic_reports_response_401_data = cls( + code=code, + message=message, + ) + + traffic_reports_response_401_data.additional_properties = src_dict + return traffic_reports_response_401_data + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/customgpt-client/customgpt_client/models/traffic_reports_response_401_data_code.py b/customgpt-client/customgpt_client/models/traffic_reports_response_401_data_code.py new file mode 100644 index 0000000..7a74930 --- /dev/null +++ b/customgpt-client/customgpt_client/models/traffic_reports_response_401_data_code.py @@ -0,0 +1,13 @@ +from enum import IntEnum + + +class TrafficReportsResponse401DataCode(IntEnum): + VALUE_400 = 400 + VALUE_401 = 401 + VALUE_403 = 403 + VALUE_404 = 404 + VALUE_500 = 500 + VALUE_503 = 503 + + def __str__(self) -> str: + return str(self.value) diff --git a/customgpt-client/customgpt_client/models/traffic_reports_response_401_status.py b/customgpt-client/customgpt_client/models/traffic_reports_response_401_status.py new file mode 100644 index 0000000..e86b42c --- /dev/null +++ b/customgpt-client/customgpt_client/models/traffic_reports_response_401_status.py @@ -0,0 +1,9 @@ +from enum import Enum + + +class TrafficReportsResponse401Status(str, Enum): + ERROR = "error" + SUCCESS = "success" + + def __str__(self) -> str: + return str(self.value) diff --git a/customgpt-client/customgpt_client/models/traffic_reports_response_404.py b/customgpt-client/customgpt_client/models/traffic_reports_response_404.py new file mode 100644 index 0000000..3faf309 --- /dev/null +++ b/customgpt-client/customgpt_client/models/traffic_reports_response_404.py @@ -0,0 +1,88 @@ +from typing import TYPE_CHECKING, Any, Dict, List, Type, TypeVar, Union + +import attr + +from ..types import UNSET, Unset + +if TYPE_CHECKING: + from ..models.traffic_reports_response_404_data import TrafficReportsResponse404Data + + +T = TypeVar("T", bound="TrafficReportsResponse404") + + +@attr.s(auto_attribs=True) +class TrafficReportsResponse404: + """ + Attributes: + status (Union[Unset, TrafficReportsResponse404Status]): The status of the response Example: error. + url (Union[Unset, str]): The URL of the request Example: https://app.customgpt.ai/api/v1/projects/1. + data (Union[Unset, TrafficReportsResponse404Data]): + """ + + status: Union[Unset, str] = UNSET + url: Union[Unset, str] = UNSET + data: Union[Unset, "TrafficReportsResponse404Data"] = UNSET + additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + status: Union[Unset, str] = UNSET + if not isinstance(self.status, Unset): + status = self.status + + url = self.url + data: Union[Unset, Dict[str, Any]] = UNSET + if not isinstance(self.data, Unset): + data = self.data.to_dict() + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if status is not UNSET: + field_dict["status"] = status + if url is not UNSET: + field_dict["url"] = url + if data is not UNSET: + field_dict["data"] = data + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + from ..models.traffic_reports_response_404_data import TrafficReportsResponse404Data + + status = src_dict.get("status") + + url = src_dict.get("url") + + _data = src_dict.get("data") + data: Union[Unset, TrafficReportsResponse404Data] + if isinstance(_data, Unset): + data = UNSET + else: + data = TrafficReportsResponse404Data.from_dict(_data) + + traffic_reports_response_404 = cls( + status=status, + url=url, + data=data, + ) + + traffic_reports_response_404.additional_properties = src_dict + return traffic_reports_response_404 + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/customgpt-client/customgpt_client/models/traffic_reports_response_404_data.py b/customgpt-client/customgpt_client/models/traffic_reports_response_404_data.py new file mode 100644 index 0000000..feb65b5 --- /dev/null +++ b/customgpt-client/customgpt_client/models/traffic_reports_response_404_data.py @@ -0,0 +1,70 @@ +from typing import Any, Dict, List, Type, TypeVar, Union + +import attr + +from ..types import UNSET, Unset + +T = TypeVar("T", bound="TrafficReportsResponse404Data") + + +@attr.s(auto_attribs=True) +class TrafficReportsResponse404Data: + """ + Attributes: + code (Union[Unset, TrafficReportsResponse404DataCode]): The error status code Example: 404. + message (Union[Unset, TrafficReportsResponse404DataMessage]): The error message Example: Project with id 1 not + found. + """ + + code: Union[Unset, str] = UNSET + message: Union[Unset, str] = UNSET + additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + code: Union[Unset, int] = UNSET + if not isinstance(self.code, Unset): + code = self.code + + message: Union[Unset, str] = UNSET + if not isinstance(self.message, Unset): + message = self.message + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if code is not UNSET: + field_dict["code"] = code + if message is not UNSET: + field_dict["message"] = message + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + code = src_dict.get("code") + + message = src_dict.get("message") + + traffic_reports_response_404_data = cls( + code=code, + message=message, + ) + + traffic_reports_response_404_data.additional_properties = src_dict + return traffic_reports_response_404_data + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/customgpt-client/customgpt_client/models/traffic_reports_response_404_data_code.py b/customgpt-client/customgpt_client/models/traffic_reports_response_404_data_code.py new file mode 100644 index 0000000..c173370 --- /dev/null +++ b/customgpt-client/customgpt_client/models/traffic_reports_response_404_data_code.py @@ -0,0 +1,13 @@ +from enum import IntEnum + + +class TrafficReportsResponse404DataCode(IntEnum): + VALUE_400 = 400 + VALUE_401 = 401 + VALUE_403 = 403 + VALUE_404 = 404 + VALUE_500 = 500 + VALUE_503 = 503 + + def __str__(self) -> str: + return str(self.value) diff --git a/customgpt-client/customgpt_client/models/list_sources_response_404_data_message.py b/customgpt-client/customgpt_client/models/traffic_reports_response_404_data_message.py similarity index 80% rename from customgpt-client/customgpt_client/models/list_sources_response_404_data_message.py rename to customgpt-client/customgpt_client/models/traffic_reports_response_404_data_message.py index 14e80fe..476be1f 100644 --- a/customgpt-client/customgpt_client/models/list_sources_response_404_data_message.py +++ b/customgpt-client/customgpt_client/models/traffic_reports_response_404_data_message.py @@ -1,7 +1,7 @@ from enum import Enum -class ListSourcesResponse404DataMessage(str, Enum): +class TrafficReportsResponse404DataMessage(str, Enum): PROJECT_ID_IS_REQUIRED = "Project id is required" PROJECT_WITH_ID_PROJECTID_NOT_FOUND = "Project with id {projectId} not found" diff --git a/customgpt-client/customgpt_client/models/traffic_reports_response_404_status.py b/customgpt-client/customgpt_client/models/traffic_reports_response_404_status.py new file mode 100644 index 0000000..ee5bf4a --- /dev/null +++ b/customgpt-client/customgpt_client/models/traffic_reports_response_404_status.py @@ -0,0 +1,9 @@ +from enum import Enum + + +class TrafficReportsResponse404Status(str, Enum): + ERROR = "error" + SUCCESS = "success" + + def __str__(self) -> str: + return str(self.value) diff --git a/customgpt-client/customgpt_client/models/traffic_reports_response_500.py b/customgpt-client/customgpt_client/models/traffic_reports_response_500.py new file mode 100644 index 0000000..0f9a07d --- /dev/null +++ b/customgpt-client/customgpt_client/models/traffic_reports_response_500.py @@ -0,0 +1,88 @@ +from typing import TYPE_CHECKING, Any, Dict, List, Type, TypeVar, Union + +import attr + +from ..types import UNSET, Unset + +if TYPE_CHECKING: + from ..models.traffic_reports_response_500_data import TrafficReportsResponse500Data + + +T = TypeVar("T", bound="TrafficReportsResponse500") + + +@attr.s(auto_attribs=True) +class TrafficReportsResponse500: + """ + Attributes: + status (Union[Unset, TrafficReportsResponse500Status]): The status of the response Example: error. + url (Union[Unset, str]): The URL of the request Example: https://app.customgpt.ai/api/v1/projects/1. + data (Union[Unset, TrafficReportsResponse500Data]): + """ + + status: Union[Unset, str] = UNSET + url: Union[Unset, str] = UNSET + data: Union[Unset, "TrafficReportsResponse500Data"] = UNSET + additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + status: Union[Unset, str] = UNSET + if not isinstance(self.status, Unset): + status = self.status + + url = self.url + data: Union[Unset, Dict[str, Any]] = UNSET + if not isinstance(self.data, Unset): + data = self.data.to_dict() + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if status is not UNSET: + field_dict["status"] = status + if url is not UNSET: + field_dict["url"] = url + if data is not UNSET: + field_dict["data"] = data + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + from ..models.traffic_reports_response_500_data import TrafficReportsResponse500Data + + status = src_dict.get("status") + + url = src_dict.get("url") + + _data = src_dict.get("data") + data: Union[Unset, TrafficReportsResponse500Data] + if isinstance(_data, Unset): + data = UNSET + else: + data = TrafficReportsResponse500Data.from_dict(_data) + + traffic_reports_response_500 = cls( + status=status, + url=url, + data=data, + ) + + traffic_reports_response_500.additional_properties = src_dict + return traffic_reports_response_500 + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/customgpt-client/customgpt_client/models/traffic_reports_response_500_data.py b/customgpt-client/customgpt_client/models/traffic_reports_response_500_data.py new file mode 100644 index 0000000..24ef19a --- /dev/null +++ b/customgpt-client/customgpt_client/models/traffic_reports_response_500_data.py @@ -0,0 +1,67 @@ +from typing import Any, Dict, List, Type, TypeVar, Union + +import attr + +from ..types import UNSET, Unset + +T = TypeVar("T", bound="TrafficReportsResponse500Data") + + +@attr.s(auto_attribs=True) +class TrafficReportsResponse500Data: + """ + Attributes: + code (Union[Unset, TrafficReportsResponse500DataCode]): The error status code Example: 500. + message (Union[Unset, str]): Example: Internal Server Error. + """ + + code: Union[Unset, str] = UNSET + message: Union[Unset, str] = UNSET + additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + code: Union[Unset, int] = UNSET + if not isinstance(self.code, Unset): + code = self.code + + message = self.message + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if code is not UNSET: + field_dict["code"] = code + if message is not UNSET: + field_dict["message"] = message + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + code = src_dict.get("code") + + message = src_dict.get("message") + + traffic_reports_response_500_data = cls( + code=code, + message=message, + ) + + traffic_reports_response_500_data.additional_properties = src_dict + return traffic_reports_response_500_data + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/customgpt-client/customgpt_client/models/traffic_reports_response_500_data_code.py b/customgpt-client/customgpt_client/models/traffic_reports_response_500_data_code.py new file mode 100644 index 0000000..8ccc7ae --- /dev/null +++ b/customgpt-client/customgpt_client/models/traffic_reports_response_500_data_code.py @@ -0,0 +1,13 @@ +from enum import IntEnum + + +class TrafficReportsResponse500DataCode(IntEnum): + VALUE_400 = 400 + VALUE_401 = 401 + VALUE_403 = 403 + VALUE_404 = 404 + VALUE_500 = 500 + VALUE_503 = 503 + + def __str__(self) -> str: + return str(self.value) diff --git a/customgpt-client/customgpt_client/models/traffic_reports_response_500_status.py b/customgpt-client/customgpt_client/models/traffic_reports_response_500_status.py new file mode 100644 index 0000000..8e5adc2 --- /dev/null +++ b/customgpt-client/customgpt_client/models/traffic_reports_response_500_status.py @@ -0,0 +1,9 @@ +from enum import Enum + + +class TrafficReportsResponse500Status(str, Enum): + ERROR = "error" + SUCCESS = "success" + + def __str__(self) -> str: + return str(self.value) diff --git a/customgpt-client/customgpt_client/models/update_conversation_response_200.py b/customgpt-client/customgpt_client/models/update_conversation_response_200.py index 322c1a1..1af3a94 100644 --- a/customgpt-client/customgpt_client/models/update_conversation_response_200.py +++ b/customgpt-client/customgpt_client/models/update_conversation_response_200.py @@ -19,7 +19,7 @@ class UpdateConversationResponse200: data (Union[Unset, UpdateConversationResponse200Data]): """ - status: Union[Unset, str] = "success" + status: Union[Unset, str] = UNSET data: Union[Unset, "UpdateConversationResponse200Data"] = UNSET additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) diff --git a/customgpt-client/customgpt_client/models/update_conversation_response_200_data.py b/customgpt-client/customgpt_client/models/update_conversation_response_200_data.py index d160c34..de44554 100644 --- a/customgpt-client/customgpt_client/models/update_conversation_response_200_data.py +++ b/customgpt-client/customgpt_client/models/update_conversation_response_200_data.py @@ -15,8 +15,6 @@ class UpdateConversationResponse200Data: Attributes: created_at (Union[Unset, datetime.datetime]): When was this conversation created? Example: 2023-04-30 16:43:53. updated_at (Union[Unset, datetime.datetime]): When was this conversation updated? Example: 2023-04-30 16:43:53. - deleted_at (Union[Unset, None, datetime.datetime]): When was this conversation deleted? Example: 2023-04-30 - 16:43:53. id (Union[Unset, int]): Conversation ID Example: 1. name (Union[Unset, str]): Conversation name Example: Conversation 1. project_id (Union[Unset, str]): Project ID for this conversation Example: 1. @@ -26,7 +24,6 @@ class UpdateConversationResponse200Data: created_at: Union[Unset, datetime.datetime] = UNSET updated_at: Union[Unset, datetime.datetime] = UNSET - deleted_at: Union[Unset, None, datetime.datetime] = UNSET id: Union[Unset, int] = UNSET name: Union[Unset, str] = UNSET project_id: Union[Unset, str] = UNSET @@ -43,10 +40,6 @@ def to_dict(self) -> Dict[str, Any]: if not isinstance(self.updated_at, Unset): updated_at = self.updated_at.isoformat() - deleted_at: Union[Unset, None, str] = UNSET - if not isinstance(self.deleted_at, Unset): - deleted_at = self.deleted_at.isoformat() if self.deleted_at else None - id = self.id name = self.name project_id = self.project_id @@ -60,8 +53,6 @@ def to_dict(self) -> Dict[str, Any]: field_dict["created_at"] = created_at if updated_at is not UNSET: field_dict["updated_at"] = updated_at - if deleted_at is not UNSET: - field_dict["deleted_at"] = deleted_at if id is not UNSET: field_dict["id"] = id if name is not UNSET: @@ -91,15 +82,6 @@ def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: else: updated_at = isoparse(_updated_at) - _deleted_at = src_dict.get("deleted_at") - deleted_at: Union[Unset, None, datetime.datetime] - if _deleted_at is None: - deleted_at = None - elif isinstance(_deleted_at, Unset): - deleted_at = UNSET - else: - deleted_at = isoparse(_deleted_at) - id = src_dict.get("id") name = src_dict.get("name") @@ -113,7 +95,6 @@ def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: update_conversation_response_200_data = cls( created_at=created_at, updated_at=updated_at, - deleted_at=deleted_at, id=id, name=name, project_id=project_id, diff --git a/customgpt-client/customgpt_client/models/update_conversation_response_400.py b/customgpt-client/customgpt_client/models/update_conversation_response_400.py index cfb1669..3eca27f 100644 --- a/customgpt-client/customgpt_client/models/update_conversation_response_400.py +++ b/customgpt-client/customgpt_client/models/update_conversation_response_400.py @@ -20,7 +20,7 @@ class UpdateConversationResponse400: data (Union[Unset, UpdateConversationResponse400Data]): """ - status: Union[Unset, str] = "error" + status: Union[Unset, str] = UNSET url: Union[Unset, str] = UNSET data: Union[Unset, "UpdateConversationResponse400Data"] = UNSET additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) diff --git a/customgpt-client/customgpt_client/models/update_conversation_response_400_data.py b/customgpt-client/customgpt_client/models/update_conversation_response_400_data.py index deb6392..2403a60 100644 --- a/customgpt-client/customgpt_client/models/update_conversation_response_400_data.py +++ b/customgpt-client/customgpt_client/models/update_conversation_response_400_data.py @@ -15,7 +15,7 @@ class UpdateConversationResponse400Data: message (Union[Unset, str]): The error message Example: Project id must be integer. """ - code: Union[Unset, str] = "400" + code: Union[Unset, str] = UNSET message: Union[Unset, str] = UNSET additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) diff --git a/customgpt-client/customgpt_client/models/update_conversation_response_401.py b/customgpt-client/customgpt_client/models/update_conversation_response_401.py index 4552fcd..2d9c897 100644 --- a/customgpt-client/customgpt_client/models/update_conversation_response_401.py +++ b/customgpt-client/customgpt_client/models/update_conversation_response_401.py @@ -20,7 +20,7 @@ class UpdateConversationResponse401: data (Union[Unset, UpdateConversationResponse401Data]): """ - status: Union[Unset, str] = "error" + status: Union[Unset, str] = UNSET url: Union[Unset, str] = UNSET data: Union[Unset, "UpdateConversationResponse401Data"] = UNSET additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) diff --git a/customgpt-client/customgpt_client/models/update_conversation_response_401_data.py b/customgpt-client/customgpt_client/models/update_conversation_response_401_data.py index b648364..c548f2a 100644 --- a/customgpt-client/customgpt_client/models/update_conversation_response_401_data.py +++ b/customgpt-client/customgpt_client/models/update_conversation_response_401_data.py @@ -15,7 +15,7 @@ class UpdateConversationResponse401Data: message (Union[Unset, str]): Example: API Token is either missing or invalid. """ - code: Union[Unset, str] = "401" + code: Union[Unset, str] = UNSET message: Union[Unset, str] = UNSET additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) diff --git a/customgpt-client/customgpt_client/models/update_conversation_response_404.py b/customgpt-client/customgpt_client/models/update_conversation_response_404.py index fc74685..d3b583e 100644 --- a/customgpt-client/customgpt_client/models/update_conversation_response_404.py +++ b/customgpt-client/customgpt_client/models/update_conversation_response_404.py @@ -20,7 +20,7 @@ class UpdateConversationResponse404: data (Union[Unset, UpdateConversationResponse404Data]): """ - status: Union[Unset, str] = "error" + status: Union[Unset, str] = UNSET url: Union[Unset, str] = UNSET data: Union[Unset, "UpdateConversationResponse404Data"] = UNSET additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) diff --git a/customgpt-client/customgpt_client/models/update_conversation_response_404_data.py b/customgpt-client/customgpt_client/models/update_conversation_response_404_data.py index 1508b5c..b0e6325 100644 --- a/customgpt-client/customgpt_client/models/update_conversation_response_404_data.py +++ b/customgpt-client/customgpt_client/models/update_conversation_response_404_data.py @@ -16,8 +16,8 @@ class UpdateConversationResponse404Data: not found. """ - code: Union[Unset, str] = "404" - message: Union[Unset, str] = "Project with id 1 not found" + code: Union[Unset, str] = UNSET + message: Union[Unset, str] = UNSET additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) def to_dict(self) -> Dict[str, Any]: diff --git a/customgpt-client/customgpt_client/models/update_conversation_response_500.py b/customgpt-client/customgpt_client/models/update_conversation_response_500.py index 7ef1473..5afd913 100644 --- a/customgpt-client/customgpt_client/models/update_conversation_response_500.py +++ b/customgpt-client/customgpt_client/models/update_conversation_response_500.py @@ -20,7 +20,7 @@ class UpdateConversationResponse500: data (Union[Unset, UpdateConversationResponse500Data]): """ - status: Union[Unset, str] = "error" + status: Union[Unset, str] = UNSET url: Union[Unset, str] = UNSET data: Union[Unset, "UpdateConversationResponse500Data"] = UNSET additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) diff --git a/customgpt-client/customgpt_client/models/update_conversation_response_500_data.py b/customgpt-client/customgpt_client/models/update_conversation_response_500_data.py index 372b87e..a3c2903 100644 --- a/customgpt-client/customgpt_client/models/update_conversation_response_500_data.py +++ b/customgpt-client/customgpt_client/models/update_conversation_response_500_data.py @@ -15,7 +15,7 @@ class UpdateConversationResponse500Data: message (Union[Unset, str]): Example: Internal Server Error. """ - code: Union[Unset, str] = "500" + code: Union[Unset, str] = UNSET message: Union[Unset, str] = UNSET additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) diff --git a/customgpt-client/customgpt_client/models/update_page_metadata_json_body.py b/customgpt-client/customgpt_client/models/update_metadata_json_body.py similarity index 90% rename from customgpt-client/customgpt_client/models/update_page_metadata_json_body.py rename to customgpt-client/customgpt_client/models/update_metadata_json_body.py index 690ae95..dc6ee80 100644 --- a/customgpt-client/customgpt_client/models/update_page_metadata_json_body.py +++ b/customgpt-client/customgpt_client/models/update_metadata_json_body.py @@ -4,11 +4,11 @@ from ..types import UNSET, Unset -T = TypeVar("T", bound="UpdatePageMetadataJsonBody") +T = TypeVar("T", bound="UpdateMetadataJsonBody") @attr.s(auto_attribs=True) -class UpdatePageMetadataJsonBody: +class UpdateMetadataJsonBody: """ Attributes: title (Union[Unset, None, str]): The title of the page used in citations Example: Title. @@ -54,15 +54,15 @@ def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: image = src_dict.get("image") - update_page_metadata_json_body = cls( + update_metadata_json_body = cls( title=title, url=url, description=description, image=image, ) - update_page_metadata_json_body.additional_properties = src_dict - return update_page_metadata_json_body + update_metadata_json_body.additional_properties = src_dict + return update_metadata_json_body @property def additional_keys(self) -> List[str]: diff --git a/customgpt-client/customgpt_client/models/update_metadata_response_200.py b/customgpt-client/customgpt_client/models/update_metadata_response_200.py new file mode 100644 index 0000000..9581ecc --- /dev/null +++ b/customgpt-client/customgpt_client/models/update_metadata_response_200.py @@ -0,0 +1,80 @@ +from typing import TYPE_CHECKING, Any, Dict, List, Type, TypeVar, Union + +import attr + +from ..types import UNSET, Unset + +if TYPE_CHECKING: + from ..models.update_metadata_response_200_data import UpdateMetadataResponse200Data + + +T = TypeVar("T", bound="UpdateMetadataResponse200") + + +@attr.s(auto_attribs=True) +class UpdateMetadataResponse200: + """ + Attributes: + status (Union[Unset, UpdateMetadataResponse200Status]): The status of the response Example: success. + data (Union[Unset, UpdateMetadataResponse200Data]): + """ + + status: Union[Unset, str] = UNSET + data: Union[Unset, "UpdateMetadataResponse200Data"] = UNSET + additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + status: Union[Unset, str] = UNSET + if not isinstance(self.status, Unset): + status = self.status + + data: Union[Unset, Dict[str, Any]] = UNSET + if not isinstance(self.data, Unset): + data = self.data.to_dict() + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if status is not UNSET: + field_dict["status"] = status + if data is not UNSET: + field_dict["data"] = data + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + from ..models.update_metadata_response_200_data import UpdateMetadataResponse200Data + + status = src_dict.get("status") + + _data = src_dict.get("data") + data: Union[Unset, UpdateMetadataResponse200Data] + if isinstance(_data, Unset): + data = UNSET + else: + data = UpdateMetadataResponse200Data.from_dict(_data) + + update_metadata_response_200 = cls( + status=status, + data=data, + ) + + update_metadata_response_200.additional_properties = src_dict + return update_metadata_response_200 + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/customgpt-client/customgpt_client/models/update_page_metadata_response_200_data.py b/customgpt-client/customgpt_client/models/update_metadata_response_200_data.py similarity index 58% rename from customgpt-client/customgpt_client/models/update_page_metadata_response_200_data.py rename to customgpt-client/customgpt_client/models/update_metadata_response_200_data.py index bc634e0..aac679f 100644 --- a/customgpt-client/customgpt_client/models/update_page_metadata_response_200_data.py +++ b/customgpt-client/customgpt_client/models/update_metadata_response_200_data.py @@ -4,28 +4,31 @@ from ..types import UNSET, Unset -T = TypeVar("T", bound="UpdatePageMetadataResponse200Data") +T = TypeVar("T", bound="UpdateMetadataResponse200Data") @attr.s(auto_attribs=True) -class UpdatePageMetadataResponse200Data: +class UpdateMetadataResponse200Data: """ Attributes: - url (Union[Unset, str]): The URL of the page Example: https://www.example.com. - title (Union[Unset, str]): The title of the page Example: Example Domain. - description (Union[Unset, str]): The description of the page Example: This domain is for use in illustrative - examples in documents. You may use this domain in literature without prior coordination or asking for - permission.. - image (Union[Unset, str]): The image of the page Example: https://www.example.com/image.png. + id (Union[Unset, int]): The unique identifier of the page Example: 1. + url (Union[Unset, None, str]): The URL of the page Example: https://www.example.com. + title (Union[Unset, None, str]): The title of the page Example: Example Domain. + description (Union[Unset, None, str]): The description of the page Example: This domain is for use in + illustrative examples in documents. You may use this domain in literature without prior coordination or asking + for permission.. + image (Union[Unset, None, str]): The image of the page Example: https://www.example.com/image.png. """ - url: Union[Unset, str] = UNSET - title: Union[Unset, str] = UNSET - description: Union[Unset, str] = UNSET - image: Union[Unset, str] = UNSET + id: Union[Unset, int] = UNSET + url: Union[Unset, None, str] = UNSET + title: Union[Unset, None, str] = UNSET + description: Union[Unset, None, str] = UNSET + image: Union[Unset, None, str] = UNSET additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) def to_dict(self) -> Dict[str, Any]: + id = self.id url = self.url title = self.title description = self.description @@ -34,6 +37,8 @@ def to_dict(self) -> Dict[str, Any]: field_dict: Dict[str, Any] = {} field_dict.update(self.additional_properties) field_dict.update({}) + if id is not UNSET: + field_dict["id"] = id if url is not UNSET: field_dict["url"] = url if title is not UNSET: @@ -47,6 +52,8 @@ def to_dict(self) -> Dict[str, Any]: @classmethod def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + id = src_dict.get("id") + url = src_dict.get("url") title = src_dict.get("title") @@ -55,15 +62,16 @@ def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: image = src_dict.get("image") - update_page_metadata_response_200_data = cls( + update_metadata_response_200_data = cls( + id=id, url=url, title=title, description=description, image=image, ) - update_page_metadata_response_200_data.additional_properties = src_dict - return update_page_metadata_response_200_data + update_metadata_response_200_data.additional_properties = src_dict + return update_metadata_response_200_data @property def additional_keys(self) -> List[str]: diff --git a/customgpt-client/customgpt_client/models/update_metadata_response_200_status.py b/customgpt-client/customgpt_client/models/update_metadata_response_200_status.py new file mode 100644 index 0000000..b731259 --- /dev/null +++ b/customgpt-client/customgpt_client/models/update_metadata_response_200_status.py @@ -0,0 +1,9 @@ +from enum import Enum + + +class UpdateMetadataResponse200Status(str, Enum): + ERROR = "error" + SUCCESS = "success" + + def __str__(self) -> str: + return str(self.value) diff --git a/customgpt-client/customgpt_client/models/update_metadata_response_400.py b/customgpt-client/customgpt_client/models/update_metadata_response_400.py new file mode 100644 index 0000000..6f10c60 --- /dev/null +++ b/customgpt-client/customgpt_client/models/update_metadata_response_400.py @@ -0,0 +1,88 @@ +from typing import TYPE_CHECKING, Any, Dict, List, Type, TypeVar, Union + +import attr + +from ..types import UNSET, Unset + +if TYPE_CHECKING: + from ..models.update_metadata_response_400_data import UpdateMetadataResponse400Data + + +T = TypeVar("T", bound="UpdateMetadataResponse400") + + +@attr.s(auto_attribs=True) +class UpdateMetadataResponse400: + """ + Attributes: + status (Union[Unset, UpdateMetadataResponse400Status]): The status of the response Example: error. + url (Union[Unset, str]): The URL of the request Example: https://app.customgpt.ai/api/v1/projects/1. + data (Union[Unset, UpdateMetadataResponse400Data]): + """ + + status: Union[Unset, str] = UNSET + url: Union[Unset, str] = UNSET + data: Union[Unset, "UpdateMetadataResponse400Data"] = UNSET + additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + status: Union[Unset, str] = UNSET + if not isinstance(self.status, Unset): + status = self.status + + url = self.url + data: Union[Unset, Dict[str, Any]] = UNSET + if not isinstance(self.data, Unset): + data = self.data.to_dict() + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if status is not UNSET: + field_dict["status"] = status + if url is not UNSET: + field_dict["url"] = url + if data is not UNSET: + field_dict["data"] = data + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + from ..models.update_metadata_response_400_data import UpdateMetadataResponse400Data + + status = src_dict.get("status") + + url = src_dict.get("url") + + _data = src_dict.get("data") + data: Union[Unset, UpdateMetadataResponse400Data] + if isinstance(_data, Unset): + data = UNSET + else: + data = UpdateMetadataResponse400Data.from_dict(_data) + + update_metadata_response_400 = cls( + status=status, + url=url, + data=data, + ) + + update_metadata_response_400.additional_properties = src_dict + return update_metadata_response_400 + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/customgpt-client/customgpt_client/models/get_page_metadata_response_400_data.py b/customgpt-client/customgpt_client/models/update_metadata_response_400_data.py similarity index 80% rename from customgpt-client/customgpt_client/models/get_page_metadata_response_400_data.py rename to customgpt-client/customgpt_client/models/update_metadata_response_400_data.py index 0533147..0a24a55 100644 --- a/customgpt-client/customgpt_client/models/get_page_metadata_response_400_data.py +++ b/customgpt-client/customgpt_client/models/update_metadata_response_400_data.py @@ -4,18 +4,18 @@ from ..types import UNSET, Unset -T = TypeVar("T", bound="GetPageMetadataResponse400Data") +T = TypeVar("T", bound="UpdateMetadataResponse400Data") @attr.s(auto_attribs=True) -class GetPageMetadataResponse400Data: +class UpdateMetadataResponse400Data: """ Attributes: - code (Union[Unset, GetPageMetadataResponse400DataCode]): The error status code Example: 400. - message (Union[Unset, str]): The error message Example: Something went wrong.. + code (Union[Unset, UpdateMetadataResponse400DataCode]): The error status code Example: 400. + message (Union[Unset, str]): The error message Example: Project id must be integer. """ - code: Union[Unset, str] = "400" + code: Union[Unset, str] = UNSET message: Union[Unset, str] = UNSET additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) @@ -42,13 +42,13 @@ def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: message = src_dict.get("message") - get_page_metadata_response_400_data = cls( + update_metadata_response_400_data = cls( code=code, message=message, ) - get_page_metadata_response_400_data.additional_properties = src_dict - return get_page_metadata_response_400_data + update_metadata_response_400_data.additional_properties = src_dict + return update_metadata_response_400_data @property def additional_keys(self) -> List[str]: diff --git a/customgpt-client/customgpt_client/models/update_metadata_response_400_data_code.py b/customgpt-client/customgpt_client/models/update_metadata_response_400_data_code.py new file mode 100644 index 0000000..c2532eb --- /dev/null +++ b/customgpt-client/customgpt_client/models/update_metadata_response_400_data_code.py @@ -0,0 +1,13 @@ +from enum import IntEnum + + +class UpdateMetadataResponse400DataCode(IntEnum): + VALUE_400 = 400 + VALUE_401 = 401 + VALUE_403 = 403 + VALUE_404 = 404 + VALUE_500 = 500 + VALUE_503 = 503 + + def __str__(self) -> str: + return str(self.value) diff --git a/customgpt-client/customgpt_client/models/update_metadata_response_400_status.py b/customgpt-client/customgpt_client/models/update_metadata_response_400_status.py new file mode 100644 index 0000000..f3d6fb6 --- /dev/null +++ b/customgpt-client/customgpt_client/models/update_metadata_response_400_status.py @@ -0,0 +1,9 @@ +from enum import Enum + + +class UpdateMetadataResponse400Status(str, Enum): + ERROR = "error" + SUCCESS = "success" + + def __str__(self) -> str: + return str(self.value) diff --git a/customgpt-client/customgpt_client/models/update_metadata_response_401.py b/customgpt-client/customgpt_client/models/update_metadata_response_401.py new file mode 100644 index 0000000..91a226d --- /dev/null +++ b/customgpt-client/customgpt_client/models/update_metadata_response_401.py @@ -0,0 +1,88 @@ +from typing import TYPE_CHECKING, Any, Dict, List, Type, TypeVar, Union + +import attr + +from ..types import UNSET, Unset + +if TYPE_CHECKING: + from ..models.update_metadata_response_401_data import UpdateMetadataResponse401Data + + +T = TypeVar("T", bound="UpdateMetadataResponse401") + + +@attr.s(auto_attribs=True) +class UpdateMetadataResponse401: + """ + Attributes: + status (Union[Unset, UpdateMetadataResponse401Status]): The status of the response Example: error. + url (Union[Unset, str]): The URL of the request Example: https://app.customgpt.ai/api/v1/projects/1. + data (Union[Unset, UpdateMetadataResponse401Data]): + """ + + status: Union[Unset, str] = UNSET + url: Union[Unset, str] = UNSET + data: Union[Unset, "UpdateMetadataResponse401Data"] = UNSET + additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + status: Union[Unset, str] = UNSET + if not isinstance(self.status, Unset): + status = self.status + + url = self.url + data: Union[Unset, Dict[str, Any]] = UNSET + if not isinstance(self.data, Unset): + data = self.data.to_dict() + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if status is not UNSET: + field_dict["status"] = status + if url is not UNSET: + field_dict["url"] = url + if data is not UNSET: + field_dict["data"] = data + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + from ..models.update_metadata_response_401_data import UpdateMetadataResponse401Data + + status = src_dict.get("status") + + url = src_dict.get("url") + + _data = src_dict.get("data") + data: Union[Unset, UpdateMetadataResponse401Data] + if isinstance(_data, Unset): + data = UNSET + else: + data = UpdateMetadataResponse401Data.from_dict(_data) + + update_metadata_response_401 = cls( + status=status, + url=url, + data=data, + ) + + update_metadata_response_401.additional_properties = src_dict + return update_metadata_response_401 + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/customgpt-client/customgpt_client/models/update_metadata_response_401_data.py b/customgpt-client/customgpt_client/models/update_metadata_response_401_data.py new file mode 100644 index 0000000..56a8063 --- /dev/null +++ b/customgpt-client/customgpt_client/models/update_metadata_response_401_data.py @@ -0,0 +1,67 @@ +from typing import Any, Dict, List, Type, TypeVar, Union + +import attr + +from ..types import UNSET, Unset + +T = TypeVar("T", bound="UpdateMetadataResponse401Data") + + +@attr.s(auto_attribs=True) +class UpdateMetadataResponse401Data: + """ + Attributes: + code (Union[Unset, UpdateMetadataResponse401DataCode]): The error status code Example: 401. + message (Union[Unset, str]): Example: API Token is either missing or invalid. + """ + + code: Union[Unset, str] = UNSET + message: Union[Unset, str] = UNSET + additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + code: Union[Unset, int] = UNSET + if not isinstance(self.code, Unset): + code = self.code + + message = self.message + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if code is not UNSET: + field_dict["code"] = code + if message is not UNSET: + field_dict["message"] = message + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + code = src_dict.get("code") + + message = src_dict.get("message") + + update_metadata_response_401_data = cls( + code=code, + message=message, + ) + + update_metadata_response_401_data.additional_properties = src_dict + return update_metadata_response_401_data + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/customgpt-client/customgpt_client/models/update_metadata_response_401_data_code.py b/customgpt-client/customgpt_client/models/update_metadata_response_401_data_code.py new file mode 100644 index 0000000..8f4b016 --- /dev/null +++ b/customgpt-client/customgpt_client/models/update_metadata_response_401_data_code.py @@ -0,0 +1,13 @@ +from enum import IntEnum + + +class UpdateMetadataResponse401DataCode(IntEnum): + VALUE_400 = 400 + VALUE_401 = 401 + VALUE_403 = 403 + VALUE_404 = 404 + VALUE_500 = 500 + VALUE_503 = 503 + + def __str__(self) -> str: + return str(self.value) diff --git a/customgpt-client/customgpt_client/models/update_metadata_response_401_status.py b/customgpt-client/customgpt_client/models/update_metadata_response_401_status.py new file mode 100644 index 0000000..8e7d639 --- /dev/null +++ b/customgpt-client/customgpt_client/models/update_metadata_response_401_status.py @@ -0,0 +1,9 @@ +from enum import Enum + + +class UpdateMetadataResponse401Status(str, Enum): + ERROR = "error" + SUCCESS = "success" + + def __str__(self) -> str: + return str(self.value) diff --git a/customgpt-client/customgpt_client/models/update_metadata_response_404.py b/customgpt-client/customgpt_client/models/update_metadata_response_404.py new file mode 100644 index 0000000..c408c0c --- /dev/null +++ b/customgpt-client/customgpt_client/models/update_metadata_response_404.py @@ -0,0 +1,88 @@ +from typing import TYPE_CHECKING, Any, Dict, List, Type, TypeVar, Union + +import attr + +from ..types import UNSET, Unset + +if TYPE_CHECKING: + from ..models.update_metadata_response_404_data import UpdateMetadataResponse404Data + + +T = TypeVar("T", bound="UpdateMetadataResponse404") + + +@attr.s(auto_attribs=True) +class UpdateMetadataResponse404: + """ + Attributes: + status (Union[Unset, UpdateMetadataResponse404Status]): The status of the response Example: error. + url (Union[Unset, str]): The URL of the request Example: https://app.customgpt.ai/api/v1/projects/1. + data (Union[Unset, UpdateMetadataResponse404Data]): + """ + + status: Union[Unset, str] = UNSET + url: Union[Unset, str] = UNSET + data: Union[Unset, "UpdateMetadataResponse404Data"] = UNSET + additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + status: Union[Unset, str] = UNSET + if not isinstance(self.status, Unset): + status = self.status + + url = self.url + data: Union[Unset, Dict[str, Any]] = UNSET + if not isinstance(self.data, Unset): + data = self.data.to_dict() + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if status is not UNSET: + field_dict["status"] = status + if url is not UNSET: + field_dict["url"] = url + if data is not UNSET: + field_dict["data"] = data + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + from ..models.update_metadata_response_404_data import UpdateMetadataResponse404Data + + status = src_dict.get("status") + + url = src_dict.get("url") + + _data = src_dict.get("data") + data: Union[Unset, UpdateMetadataResponse404Data] + if isinstance(_data, Unset): + data = UNSET + else: + data = UpdateMetadataResponse404Data.from_dict(_data) + + update_metadata_response_404 = cls( + status=status, + url=url, + data=data, + ) + + update_metadata_response_404.additional_properties = src_dict + return update_metadata_response_404 + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/customgpt-client/customgpt_client/models/update_metadata_response_404_data.py b/customgpt-client/customgpt_client/models/update_metadata_response_404_data.py new file mode 100644 index 0000000..3974bfd --- /dev/null +++ b/customgpt-client/customgpt_client/models/update_metadata_response_404_data.py @@ -0,0 +1,70 @@ +from typing import Any, Dict, List, Type, TypeVar, Union + +import attr + +from ..types import UNSET, Unset + +T = TypeVar("T", bound="UpdateMetadataResponse404Data") + + +@attr.s(auto_attribs=True) +class UpdateMetadataResponse404Data: + """ + Attributes: + code (Union[Unset, UpdateMetadataResponse404DataCode]): The error status code Example: 404. + message (Union[Unset, UpdateMetadataResponse404DataMessage]): The error message Example: Page with id 1 not + found. + """ + + code: Union[Unset, str] = UNSET + message: Union[Unset, str] = UNSET + additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + code: Union[Unset, int] = UNSET + if not isinstance(self.code, Unset): + code = self.code + + message: Union[Unset, str] = UNSET + if not isinstance(self.message, Unset): + message = self.message + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if code is not UNSET: + field_dict["code"] = code + if message is not UNSET: + field_dict["message"] = message + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + code = src_dict.get("code") + + message = src_dict.get("message") + + update_metadata_response_404_data = cls( + code=code, + message=message, + ) + + update_metadata_response_404_data.additional_properties = src_dict + return update_metadata_response_404_data + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/customgpt-client/customgpt_client/models/update_metadata_response_404_data_code.py b/customgpt-client/customgpt_client/models/update_metadata_response_404_data_code.py new file mode 100644 index 0000000..02eaf95 --- /dev/null +++ b/customgpt-client/customgpt_client/models/update_metadata_response_404_data_code.py @@ -0,0 +1,13 @@ +from enum import IntEnum + + +class UpdateMetadataResponse404DataCode(IntEnum): + VALUE_400 = 400 + VALUE_401 = 401 + VALUE_403 = 403 + VALUE_404 = 404 + VALUE_500 = 500 + VALUE_503 = 503 + + def __str__(self) -> str: + return str(self.value) diff --git a/customgpt-client/customgpt_client/models/update_page_metadata_response_404_data_message.py b/customgpt-client/customgpt_client/models/update_metadata_response_404_data_message.py similarity index 77% rename from customgpt-client/customgpt_client/models/update_page_metadata_response_404_data_message.py rename to customgpt-client/customgpt_client/models/update_metadata_response_404_data_message.py index 63c96fc..803c278 100644 --- a/customgpt-client/customgpt_client/models/update_page_metadata_response_404_data_message.py +++ b/customgpt-client/customgpt_client/models/update_metadata_response_404_data_message.py @@ -1,7 +1,7 @@ from enum import Enum -class UpdatePageMetadataResponse404DataMessage(str, Enum): +class UpdateMetadataResponse404DataMessage(str, Enum): PAGE_ID_IS_REQUIRED = "Page id is required" PAGE_WITH_ID_PAGEID_NOT_FOUND = "Page with id {pageId} not found" diff --git a/customgpt-client/customgpt_client/models/update_metadata_response_404_status.py b/customgpt-client/customgpt_client/models/update_metadata_response_404_status.py new file mode 100644 index 0000000..7825e44 --- /dev/null +++ b/customgpt-client/customgpt_client/models/update_metadata_response_404_status.py @@ -0,0 +1,9 @@ +from enum import Enum + + +class UpdateMetadataResponse404Status(str, Enum): + ERROR = "error" + SUCCESS = "success" + + def __str__(self) -> str: + return str(self.value) diff --git a/customgpt-client/customgpt_client/models/update_settings_response_400.py b/customgpt-client/customgpt_client/models/update_metadata_response_500.py similarity index 73% rename from customgpt-client/customgpt_client/models/update_settings_response_400.py rename to customgpt-client/customgpt_client/models/update_metadata_response_500.py index fb9924a..af45f97 100644 --- a/customgpt-client/customgpt_client/models/update_settings_response_400.py +++ b/customgpt-client/customgpt_client/models/update_metadata_response_500.py @@ -5,24 +5,24 @@ from ..types import UNSET, Unset if TYPE_CHECKING: - from ..models.update_settings_response_400_data import UpdateSettingsResponse400Data + from ..models.update_metadata_response_500_data import UpdateMetadataResponse500Data -T = TypeVar("T", bound="UpdateSettingsResponse400") +T = TypeVar("T", bound="UpdateMetadataResponse500") @attr.s(auto_attribs=True) -class UpdateSettingsResponse400: +class UpdateMetadataResponse500: """ Attributes: - status (Union[Unset, UpdateSettingsResponse400Status]): The status of the response Example: error. + status (Union[Unset, UpdateMetadataResponse500Status]): The status of the response Example: error. url (Union[Unset, str]): The URL of the request Example: https://app.customgpt.ai/api/v1/projects/1. - data (Union[Unset, UpdateSettingsResponse400Data]): + data (Union[Unset, UpdateMetadataResponse500Data]): """ - status: Union[Unset, str] = "error" + status: Union[Unset, str] = UNSET url: Union[Unset, str] = UNSET - data: Union[Unset, "UpdateSettingsResponse400Data"] = UNSET + data: Union[Unset, "UpdateMetadataResponse500Data"] = UNSET additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) def to_dict(self) -> Dict[str, Any]: @@ -49,27 +49,27 @@ def to_dict(self) -> Dict[str, Any]: @classmethod def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: - from ..models.update_settings_response_400_data import UpdateSettingsResponse400Data + from ..models.update_metadata_response_500_data import UpdateMetadataResponse500Data status = src_dict.get("status") url = src_dict.get("url") _data = src_dict.get("data") - data: Union[Unset, UpdateSettingsResponse400Data] + data: Union[Unset, UpdateMetadataResponse500Data] if isinstance(_data, Unset): data = UNSET else: - data = UpdateSettingsResponse400Data.from_dict(_data) + data = UpdateMetadataResponse500Data.from_dict(_data) - update_settings_response_400 = cls( + update_metadata_response_500 = cls( status=status, url=url, data=data, ) - update_settings_response_400.additional_properties = src_dict - return update_settings_response_400 + update_metadata_response_500.additional_properties = src_dict + return update_metadata_response_500 @property def additional_keys(self) -> List[str]: diff --git a/customgpt-client/customgpt_client/models/update_metadata_response_500_data.py b/customgpt-client/customgpt_client/models/update_metadata_response_500_data.py new file mode 100644 index 0000000..9e97f96 --- /dev/null +++ b/customgpt-client/customgpt_client/models/update_metadata_response_500_data.py @@ -0,0 +1,67 @@ +from typing import Any, Dict, List, Type, TypeVar, Union + +import attr + +from ..types import UNSET, Unset + +T = TypeVar("T", bound="UpdateMetadataResponse500Data") + + +@attr.s(auto_attribs=True) +class UpdateMetadataResponse500Data: + """ + Attributes: + code (Union[Unset, UpdateMetadataResponse500DataCode]): The error status code Example: 500. + message (Union[Unset, str]): Example: Internal Server Error. + """ + + code: Union[Unset, str] = UNSET + message: Union[Unset, str] = UNSET + additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + code: Union[Unset, int] = UNSET + if not isinstance(self.code, Unset): + code = self.code + + message = self.message + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if code is not UNSET: + field_dict["code"] = code + if message is not UNSET: + field_dict["message"] = message + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + code = src_dict.get("code") + + message = src_dict.get("message") + + update_metadata_response_500_data = cls( + code=code, + message=message, + ) + + update_metadata_response_500_data.additional_properties = src_dict + return update_metadata_response_500_data + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/customgpt-client/customgpt_client/models/update_metadata_response_500_data_code.py b/customgpt-client/customgpt_client/models/update_metadata_response_500_data_code.py new file mode 100644 index 0000000..16a54c0 --- /dev/null +++ b/customgpt-client/customgpt_client/models/update_metadata_response_500_data_code.py @@ -0,0 +1,13 @@ +from enum import IntEnum + + +class UpdateMetadataResponse500DataCode(IntEnum): + VALUE_400 = 400 + VALUE_401 = 401 + VALUE_403 = 403 + VALUE_404 = 404 + VALUE_500 = 500 + VALUE_503 = 503 + + def __str__(self) -> str: + return str(self.value) diff --git a/customgpt-client/customgpt_client/models/update_metadata_response_500_status.py b/customgpt-client/customgpt_client/models/update_metadata_response_500_status.py new file mode 100644 index 0000000..50b2dea --- /dev/null +++ b/customgpt-client/customgpt_client/models/update_metadata_response_500_status.py @@ -0,0 +1,9 @@ +from enum import Enum + + +class UpdateMetadataResponse500Status(str, Enum): + ERROR = "error" + SUCCESS = "success" + + def __str__(self) -> str: + return str(self.value) diff --git a/customgpt-client/customgpt_client/models/update_page_metadata_response_200_status.py b/customgpt-client/customgpt_client/models/update_page_metadata_response_200_status.py deleted file mode 100644 index 33bc1cf..0000000 --- a/customgpt-client/customgpt_client/models/update_page_metadata_response_200_status.py +++ /dev/null @@ -1,9 +0,0 @@ -from enum import Enum - - -class UpdatePageMetadataResponse200Status(str, Enum): - ERROR = "error" - SUCCESS = "success" - - def __str__(self) -> str: - return str(self.value) diff --git a/customgpt-client/customgpt_client/models/update_page_metadata_response_400_data_code.py b/customgpt-client/customgpt_client/models/update_page_metadata_response_400_data_code.py deleted file mode 100644 index e477bcf..0000000 --- a/customgpt-client/customgpt_client/models/update_page_metadata_response_400_data_code.py +++ /dev/null @@ -1,13 +0,0 @@ -from enum import IntEnum - - -class UpdatePageMetadataResponse400DataCode(IntEnum): - VALUE_400 = 400 - VALUE_401 = 401 - VALUE_403 = 403 - VALUE_404 = 404 - VALUE_500 = 500 - VALUE_503 = 503 - - def __str__(self) -> str: - return str(self.value) diff --git a/customgpt-client/customgpt_client/models/update_page_metadata_response_400_status.py b/customgpt-client/customgpt_client/models/update_page_metadata_response_400_status.py deleted file mode 100644 index d0779ed..0000000 --- a/customgpt-client/customgpt_client/models/update_page_metadata_response_400_status.py +++ /dev/null @@ -1,9 +0,0 @@ -from enum import Enum - - -class UpdatePageMetadataResponse400Status(str, Enum): - ERROR = "error" - SUCCESS = "success" - - def __str__(self) -> str: - return str(self.value) diff --git a/customgpt-client/customgpt_client/models/update_page_metadata_response_401_data_code.py b/customgpt-client/customgpt_client/models/update_page_metadata_response_401_data_code.py deleted file mode 100644 index caa750e..0000000 --- a/customgpt-client/customgpt_client/models/update_page_metadata_response_401_data_code.py +++ /dev/null @@ -1,13 +0,0 @@ -from enum import IntEnum - - -class UpdatePageMetadataResponse401DataCode(IntEnum): - VALUE_400 = 400 - VALUE_401 = 401 - VALUE_403 = 403 - VALUE_404 = 404 - VALUE_500 = 500 - VALUE_503 = 503 - - def __str__(self) -> str: - return str(self.value) diff --git a/customgpt-client/customgpt_client/models/update_page_metadata_response_401_status.py b/customgpt-client/customgpt_client/models/update_page_metadata_response_401_status.py deleted file mode 100644 index 652b7d4..0000000 --- a/customgpt-client/customgpt_client/models/update_page_metadata_response_401_status.py +++ /dev/null @@ -1,9 +0,0 @@ -from enum import Enum - - -class UpdatePageMetadataResponse401Status(str, Enum): - ERROR = "error" - SUCCESS = "success" - - def __str__(self) -> str: - return str(self.value) diff --git a/customgpt-client/customgpt_client/models/update_page_metadata_response_404_data_code.py b/customgpt-client/customgpt_client/models/update_page_metadata_response_404_data_code.py deleted file mode 100644 index d59613c..0000000 --- a/customgpt-client/customgpt_client/models/update_page_metadata_response_404_data_code.py +++ /dev/null @@ -1,13 +0,0 @@ -from enum import IntEnum - - -class UpdatePageMetadataResponse404DataCode(IntEnum): - VALUE_400 = 400 - VALUE_401 = 401 - VALUE_403 = 403 - VALUE_404 = 404 - VALUE_500 = 500 - VALUE_503 = 503 - - def __str__(self) -> str: - return str(self.value) diff --git a/customgpt-client/customgpt_client/models/update_page_metadata_response_404_status.py b/customgpt-client/customgpt_client/models/update_page_metadata_response_404_status.py deleted file mode 100644 index 59b0a1e..0000000 --- a/customgpt-client/customgpt_client/models/update_page_metadata_response_404_status.py +++ /dev/null @@ -1,9 +0,0 @@ -from enum import Enum - - -class UpdatePageMetadataResponse404Status(str, Enum): - ERROR = "error" - SUCCESS = "success" - - def __str__(self) -> str: - return str(self.value) diff --git a/customgpt-client/customgpt_client/models/update_page_metadata_response_500_data_code.py b/customgpt-client/customgpt_client/models/update_page_metadata_response_500_data_code.py deleted file mode 100644 index 571f221..0000000 --- a/customgpt-client/customgpt_client/models/update_page_metadata_response_500_data_code.py +++ /dev/null @@ -1,13 +0,0 @@ -from enum import IntEnum - - -class UpdatePageMetadataResponse500DataCode(IntEnum): - VALUE_400 = 400 - VALUE_401 = 401 - VALUE_403 = 403 - VALUE_404 = 404 - VALUE_500 = 500 - VALUE_503 = 503 - - def __str__(self) -> str: - return str(self.value) diff --git a/customgpt-client/customgpt_client/models/update_page_metadata_response_500_status.py b/customgpt-client/customgpt_client/models/update_page_metadata_response_500_status.py deleted file mode 100644 index 409ec57..0000000 --- a/customgpt-client/customgpt_client/models/update_page_metadata_response_500_status.py +++ /dev/null @@ -1,9 +0,0 @@ -from enum import Enum - - -class UpdatePageMetadataResponse500Status(str, Enum): - ERROR = "error" - SUCCESS = "success" - - def __str__(self) -> str: - return str(self.value) diff --git a/customgpt-client/customgpt_client/models/update_plugin_json_body.py b/customgpt-client/customgpt_client/models/update_plugin_json_body.py index 4537e7b..6ec441e 100644 --- a/customgpt-client/customgpt_client/models/update_plugin_json_body.py +++ b/customgpt-client/customgpt_client/models/update_plugin_json_body.py @@ -31,7 +31,7 @@ def to_dict(self) -> Dict[str, Any]: human_name = self.human_name keywords = self.keywords description = self.description - is_active = self.is_active + is_active = True if self.is_active else False field_dict: Dict[str, Any] = {} field_dict.update(self.additional_properties) diff --git a/customgpt-client/customgpt_client/models/update_plugin_response_200.py b/customgpt-client/customgpt_client/models/update_plugin_response_200.py index d792daf..f80a2b0 100644 --- a/customgpt-client/customgpt_client/models/update_plugin_response_200.py +++ b/customgpt-client/customgpt_client/models/update_plugin_response_200.py @@ -19,7 +19,7 @@ class UpdatePluginResponse200: data (Union[Unset, UpdatePluginResponse200Data]): """ - status: Union[Unset, str] = "success" + status: Union[Unset, str] = UNSET data: Union[Unset, "UpdatePluginResponse200Data"] = UNSET additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) diff --git a/customgpt-client/customgpt_client/models/update_plugin_response_200_data.py b/customgpt-client/customgpt_client/models/update_plugin_response_200_data.py index 734ec92..fae3308 100644 --- a/customgpt-client/customgpt_client/models/update_plugin_response_200_data.py +++ b/customgpt-client/customgpt_client/models/update_plugin_response_200_data.py @@ -34,7 +34,7 @@ def to_dict(self) -> Dict[str, Any]: keywords = self.keywords description = self.description logo = self.logo - is_active = self.is_active + is_active = True if self.is_active else False field_dict: Dict[str, Any] = {} field_dict.update(self.additional_properties) diff --git a/customgpt-client/customgpt_client/models/update_plugin_response_400.py b/customgpt-client/customgpt_client/models/update_plugin_response_400.py index 3c2a5b9..c5077f7 100644 --- a/customgpt-client/customgpt_client/models/update_plugin_response_400.py +++ b/customgpt-client/customgpt_client/models/update_plugin_response_400.py @@ -20,7 +20,7 @@ class UpdatePluginResponse400: data (Union[Unset, UpdatePluginResponse400Data]): """ - status: Union[Unset, str] = "error" + status: Union[Unset, str] = UNSET url: Union[Unset, str] = UNSET data: Union[Unset, "UpdatePluginResponse400Data"] = UNSET additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) diff --git a/customgpt-client/customgpt_client/models/update_plugin_response_400_data.py b/customgpt-client/customgpt_client/models/update_plugin_response_400_data.py index dc41e48..5512da4 100644 --- a/customgpt-client/customgpt_client/models/update_plugin_response_400_data.py +++ b/customgpt-client/customgpt_client/models/update_plugin_response_400_data.py @@ -15,7 +15,7 @@ class UpdatePluginResponse400Data: message (Union[Unset, str]): The error message Example: Project id must be integer. """ - code: Union[Unset, str] = "400" + code: Union[Unset, str] = UNSET message: Union[Unset, str] = UNSET additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) diff --git a/customgpt-client/customgpt_client/models/update_plugin_response_401.py b/customgpt-client/customgpt_client/models/update_plugin_response_401.py index 8a0d172..ddad4b5 100644 --- a/customgpt-client/customgpt_client/models/update_plugin_response_401.py +++ b/customgpt-client/customgpt_client/models/update_plugin_response_401.py @@ -20,7 +20,7 @@ class UpdatePluginResponse401: data (Union[Unset, UpdatePluginResponse401Data]): """ - status: Union[Unset, str] = "error" + status: Union[Unset, str] = UNSET url: Union[Unset, str] = UNSET data: Union[Unset, "UpdatePluginResponse401Data"] = UNSET additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) diff --git a/customgpt-client/customgpt_client/models/update_plugin_response_401_data.py b/customgpt-client/customgpt_client/models/update_plugin_response_401_data.py index 9d6be51..d361134 100644 --- a/customgpt-client/customgpt_client/models/update_plugin_response_401_data.py +++ b/customgpt-client/customgpt_client/models/update_plugin_response_401_data.py @@ -15,7 +15,7 @@ class UpdatePluginResponse401Data: message (Union[Unset, str]): Example: API Token is either missing or invalid. """ - code: Union[Unset, str] = "401" + code: Union[Unset, str] = UNSET message: Union[Unset, str] = UNSET additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) diff --git a/customgpt-client/customgpt_client/models/update_plugin_response_404.py b/customgpt-client/customgpt_client/models/update_plugin_response_404.py index 4756212..12e3dfd 100644 --- a/customgpt-client/customgpt_client/models/update_plugin_response_404.py +++ b/customgpt-client/customgpt_client/models/update_plugin_response_404.py @@ -20,7 +20,7 @@ class UpdatePluginResponse404: data (Union[Unset, UpdatePluginResponse404Data]): """ - status: Union[Unset, str] = "error" + status: Union[Unset, str] = UNSET url: Union[Unset, str] = UNSET data: Union[Unset, "UpdatePluginResponse404Data"] = UNSET additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) diff --git a/customgpt-client/customgpt_client/models/update_plugin_response_404_data.py b/customgpt-client/customgpt_client/models/update_plugin_response_404_data.py index 20bd878..a755f2c 100644 --- a/customgpt-client/customgpt_client/models/update_plugin_response_404_data.py +++ b/customgpt-client/customgpt_client/models/update_plugin_response_404_data.py @@ -16,8 +16,8 @@ class UpdatePluginResponse404Data: not found. """ - code: Union[Unset, str] = "404" - message: Union[Unset, str] = "Project plugin with id 1 not found" + code: Union[Unset, str] = UNSET + message: Union[Unset, str] = UNSET additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) def to_dict(self) -> Dict[str, Any]: diff --git a/customgpt-client/customgpt_client/models/update_plugin_response_500.py b/customgpt-client/customgpt_client/models/update_plugin_response_500.py index 1d7e95d..9f9b4f9 100644 --- a/customgpt-client/customgpt_client/models/update_plugin_response_500.py +++ b/customgpt-client/customgpt_client/models/update_plugin_response_500.py @@ -20,7 +20,7 @@ class UpdatePluginResponse500: data (Union[Unset, UpdatePluginResponse500Data]): """ - status: Union[Unset, str] = "error" + status: Union[Unset, str] = UNSET url: Union[Unset, str] = UNSET data: Union[Unset, "UpdatePluginResponse500Data"] = UNSET additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) diff --git a/customgpt-client/customgpt_client/models/update_plugin_response_500_data.py b/customgpt-client/customgpt_client/models/update_plugin_response_500_data.py index 633b76c..0b4f3a2 100644 --- a/customgpt-client/customgpt_client/models/update_plugin_response_500_data.py +++ b/customgpt-client/customgpt_client/models/update_plugin_response_500_data.py @@ -15,7 +15,7 @@ class UpdatePluginResponse500Data: message (Union[Unset, str]): Example: Internal Server Error. """ - code: Union[Unset, str] = "500" + code: Union[Unset, str] = UNSET message: Union[Unset, str] = UNSET additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) diff --git a/customgpt-client/customgpt_client/models/update_project_multipart_data.py b/customgpt-client/customgpt_client/models/update_project_multipart_data.py index f0de55b..943eec3 100644 --- a/customgpt-client/customgpt_client/models/update_project_multipart_data.py +++ b/customgpt-client/customgpt_client/models/update_project_multipart_data.py @@ -16,6 +16,8 @@ class UpdateProjectMultipartData: is_shared (Union[Unset, bool]): Whether the project is shared or not Example: True. sitemap_path (Union[Unset, str]): Sitemap path Example: https://example.com/sitemap.xml. file_data_retension (Union[Unset, bool]): File data retension Example: True. + is_ocr_enabled (Union[Unset, bool]): OCR enabled + is_anonymized (Union[Unset, bool]): Anonymized file (Union[Unset, File]): File Example: file.pdf. """ @@ -23,14 +25,22 @@ class UpdateProjectMultipartData: is_shared: Union[Unset, bool] = UNSET sitemap_path: Union[Unset, str] = UNSET file_data_retension: Union[Unset, bool] = UNSET + is_ocr_enabled: Union[Unset, bool] = UNSET + is_anonymized: Union[Unset, bool] = UNSET file: Union[Unset, File] = UNSET additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) def to_dict(self) -> Dict[str, Any]: project_name = self.project_name - is_shared = self.is_shared + is_shared = True if self.is_shared else False + sitemap_path = self.sitemap_path - file_data_retension = self.file_data_retension + file_data_retension = True if self.file_data_retension else False + + is_ocr_enabled = True if self.is_ocr_enabled else False + + is_anonymized = True if self.is_anonymized else False + file: Union[Unset, FileJsonType] = UNSET if not isinstance(self.file, Unset): file = self.file.to_tuple() @@ -46,6 +56,10 @@ def to_dict(self) -> Dict[str, Any]: field_dict["sitemap_path"] = sitemap_path if file_data_retension is not UNSET: field_dict["file_data_retension"] = file_data_retension + if is_ocr_enabled is not UNSET: + field_dict["is_ocr_enabled"] = is_ocr_enabled + if is_anonymized is not UNSET: + field_dict["is_anonymized"] = is_anonymized if file is not UNSET: field_dict["file"] = file @@ -62,6 +76,7 @@ def to_multipart(self) -> Dict[str, Any]: if isinstance(self.is_shared, Unset) else (None, str(self.is_shared).lower().encode(), "text/plain") ) + sitemap_path = ( self.sitemap_path if isinstance(self.sitemap_path, Unset) @@ -72,6 +87,19 @@ def to_multipart(self) -> Dict[str, Any]: if isinstance(self.file_data_retension, Unset) else (None, str(self.file_data_retension).lower().encode(), "text/plain") ) + + is_ocr_enabled = ( + self.is_ocr_enabled + if isinstance(self.is_ocr_enabled, Unset) + else (None, str(self.is_ocr_enabled).lower().encode(), "text/plain") + ) + + is_anonymized = ( + self.is_anonymized + if isinstance(self.is_anonymized, Unset) + else (None, str(self.is_anonymized).lower().encode(), "text/plain") + ) + file: Union[Unset, FileJsonType] = UNSET if not isinstance(self.file, Unset): file = self.file.to_tuple() @@ -89,6 +117,10 @@ def to_multipart(self) -> Dict[str, Any]: field_dict["sitemap_path"] = sitemap_path if file_data_retension is not UNSET: field_dict["file_data_retension"] = file_data_retension + if is_ocr_enabled is not UNSET: + field_dict["is_ocr_enabled"] = is_ocr_enabled + if is_anonymized is not UNSET: + field_dict["is_anonymized"] = is_anonymized if file is not UNSET: field_dict["file"] = file @@ -104,6 +136,10 @@ def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: file_data_retension = src_dict.get("file_data_retension") + is_ocr_enabled = src_dict.get("is_ocr_enabled") + + is_anonymized = src_dict.get("is_anonymized") + _file = src_dict.get("file") file: Union[Unset, File] if isinstance(_file, Unset): @@ -116,6 +152,8 @@ def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: is_shared=is_shared, sitemap_path=sitemap_path, file_data_retension=file_data_retension, + is_ocr_enabled=is_ocr_enabled, + is_anonymized=is_anonymized, file=file, ) diff --git a/customgpt-client/customgpt_client/models/update_project_response_200.py b/customgpt-client/customgpt_client/models/update_project_response_200.py index 4f3cbe9..d4e7303 100644 --- a/customgpt-client/customgpt_client/models/update_project_response_200.py +++ b/customgpt-client/customgpt_client/models/update_project_response_200.py @@ -19,7 +19,7 @@ class UpdateProjectResponse200: data (Union[Unset, UpdateProjectResponse200Data]): """ - status: Union[Unset, str] = "success" + status: Union[Unset, str] = UNSET data: Union[Unset, "UpdateProjectResponse200Data"] = UNSET additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) diff --git a/customgpt-client/customgpt_client/models/update_project_response_200_data.py b/customgpt-client/customgpt_client/models/update_project_response_200_data.py index d9a0931..030bc79 100644 --- a/customgpt-client/customgpt_client/models/update_project_response_200_data.py +++ b/customgpt-client/customgpt_client/models/update_project_response_200_data.py @@ -18,12 +18,11 @@ class UpdateProjectResponse200Data: sitemap_path (Union[Unset, str]): Project sitemap Example: https://www.example.com/sitemap.xml. is_chat_active (Union[Unset, bool]): Whether the chat bot is active or not Example: True. user_id (Union[Unset, int]): User ID of the project owner Example: 1. + team_id (Union[Unset, int]): Team ID of the project owner Example: 1. created_at (Union[Unset, datetime.datetime]): Date and time when the project was created Default: isoparse('2023-05-08 13:06:55'). Example: 2021-01-01 00:00:00. updated_at (Union[Unset, datetime.datetime]): Date and time when the project was last updated Default: isoparse('2023-05-08 13:06:55'). Example: 2021-01-01 00:00:00. - deleted_at (Union[Unset, None, datetime.datetime]): Date and time when the project was deleted Example: - 2021-01-01 00:00:00. type (Union[Unset, UpdateProjectResponse200DataType]): Project type Default: UpdateProjectResponse200DataType.SITEMAP. Example: SITEMAP. is_shared (Union[Unset, bool]): Whether the project is shared or not Example: True. @@ -39,10 +38,10 @@ class UpdateProjectResponse200Data: sitemap_path: Union[Unset, str] = UNSET is_chat_active: Union[Unset, bool] = False user_id: Union[Unset, int] = UNSET + team_id: Union[Unset, int] = UNSET created_at: Union[Unset, datetime.datetime] = isoparse("2023-05-08 13:06:55") updated_at: Union[Unset, datetime.datetime] = isoparse("2023-05-08 13:06:55") - deleted_at: Union[Unset, None, datetime.datetime] = UNSET - type: Union[Unset, str] = "SITEMAP" + type: Union[Unset, str] = UNSET is_shared: Union[Unset, bool] = False shareable_slug: Union[Unset, None, str] = UNSET shareable_link: Union[Unset, None, str] = UNSET @@ -54,8 +53,10 @@ def to_dict(self) -> Dict[str, Any]: id = self.id project_name = self.project_name sitemap_path = self.sitemap_path - is_chat_active = self.is_chat_active + is_chat_active = True if self.is_chat_active else False + user_id = self.user_id + team_id = self.team_id created_at: Union[Unset, str] = UNSET if not isinstance(self.created_at, Unset): created_at = self.created_at.isoformat() @@ -64,15 +65,12 @@ def to_dict(self) -> Dict[str, Any]: if not isinstance(self.updated_at, Unset): updated_at = self.updated_at.isoformat() - deleted_at: Union[Unset, None, str] = UNSET - if not isinstance(self.deleted_at, Unset): - deleted_at = self.deleted_at.isoformat() if self.deleted_at else None - type: Union[Unset, str] = UNSET if not isinstance(self.type, Unset): type = self.type - is_shared = self.is_shared + is_shared = True if self.is_shared else False + shareable_slug = self.shareable_slug shareable_link = self.shareable_link embed_code = self.embed_code @@ -91,12 +89,12 @@ def to_dict(self) -> Dict[str, Any]: field_dict["is_chat_active"] = is_chat_active if user_id is not UNSET: field_dict["user_id"] = user_id + if team_id is not UNSET: + field_dict["team_id"] = team_id if created_at is not UNSET: field_dict["created_at"] = created_at if updated_at is not UNSET: field_dict["updated_at"] = updated_at - if deleted_at is not UNSET: - field_dict["deleted_at"] = deleted_at if type is not UNSET: field_dict["type"] = type if is_shared is not UNSET: @@ -124,6 +122,8 @@ def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: user_id = src_dict.get("user_id") + team_id = src_dict.get("team_id") + _created_at = src_dict.get("created_at") created_at: Union[Unset, datetime.datetime] if isinstance(_created_at, Unset): @@ -138,15 +138,6 @@ def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: else: updated_at = isoparse(_updated_at) - _deleted_at = src_dict.get("deleted_at") - deleted_at: Union[Unset, None, datetime.datetime] - if _deleted_at is None: - deleted_at = None - elif isinstance(_deleted_at, Unset): - deleted_at = UNSET - else: - deleted_at = isoparse(_deleted_at) - type = src_dict.get("type") is_shared = src_dict.get("is_shared") @@ -165,9 +156,9 @@ def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: sitemap_path=sitemap_path, is_chat_active=is_chat_active, user_id=user_id, + team_id=team_id, created_at=created_at, updated_at=updated_at, - deleted_at=deleted_at, type=type, is_shared=is_shared, shareable_slug=shareable_slug, diff --git a/customgpt-client/customgpt_client/models/update_project_response_400.py b/customgpt-client/customgpt_client/models/update_project_response_400.py index f89da34..a82c787 100644 --- a/customgpt-client/customgpt_client/models/update_project_response_400.py +++ b/customgpt-client/customgpt_client/models/update_project_response_400.py @@ -20,7 +20,7 @@ class UpdateProjectResponse400: data (Union[Unset, UpdateProjectResponse400Data]): """ - status: Union[Unset, str] = "error" + status: Union[Unset, str] = UNSET url: Union[Unset, str] = UNSET data: Union[Unset, "UpdateProjectResponse400Data"] = UNSET additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) diff --git a/customgpt-client/customgpt_client/models/update_project_response_400_data.py b/customgpt-client/customgpt_client/models/update_project_response_400_data.py index d6a1e2b..901d988 100644 --- a/customgpt-client/customgpt_client/models/update_project_response_400_data.py +++ b/customgpt-client/customgpt_client/models/update_project_response_400_data.py @@ -15,7 +15,7 @@ class UpdateProjectResponse400Data: message (Union[Unset, str]): The error message Example: Project id must be integer. """ - code: Union[Unset, str] = "400" + code: Union[Unset, str] = UNSET message: Union[Unset, str] = UNSET additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) diff --git a/customgpt-client/customgpt_client/models/update_project_response_401.py b/customgpt-client/customgpt_client/models/update_project_response_401.py index f949ab6..0dbf3d1 100644 --- a/customgpt-client/customgpt_client/models/update_project_response_401.py +++ b/customgpt-client/customgpt_client/models/update_project_response_401.py @@ -20,7 +20,7 @@ class UpdateProjectResponse401: data (Union[Unset, UpdateProjectResponse401Data]): """ - status: Union[Unset, str] = "error" + status: Union[Unset, str] = UNSET url: Union[Unset, str] = UNSET data: Union[Unset, "UpdateProjectResponse401Data"] = UNSET additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) diff --git a/customgpt-client/customgpt_client/models/update_project_response_401_data.py b/customgpt-client/customgpt_client/models/update_project_response_401_data.py index 492df49..e1c30d1 100644 --- a/customgpt-client/customgpt_client/models/update_project_response_401_data.py +++ b/customgpt-client/customgpt_client/models/update_project_response_401_data.py @@ -15,7 +15,7 @@ class UpdateProjectResponse401Data: message (Union[Unset, str]): Example: API Token is either missing or invalid. """ - code: Union[Unset, str] = "401" + code: Union[Unset, str] = UNSET message: Union[Unset, str] = UNSET additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) diff --git a/customgpt-client/customgpt_client/models/update_project_response_404.py b/customgpt-client/customgpt_client/models/update_project_response_404.py index 5bf0c1c..d95a56b 100644 --- a/customgpt-client/customgpt_client/models/update_project_response_404.py +++ b/customgpt-client/customgpt_client/models/update_project_response_404.py @@ -20,7 +20,7 @@ class UpdateProjectResponse404: data (Union[Unset, UpdateProjectResponse404Data]): """ - status: Union[Unset, str] = "error" + status: Union[Unset, str] = UNSET url: Union[Unset, str] = UNSET data: Union[Unset, "UpdateProjectResponse404Data"] = UNSET additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) diff --git a/customgpt-client/customgpt_client/models/update_project_response_404_data.py b/customgpt-client/customgpt_client/models/update_project_response_404_data.py index a9b3ed0..a1bc138 100644 --- a/customgpt-client/customgpt_client/models/update_project_response_404_data.py +++ b/customgpt-client/customgpt_client/models/update_project_response_404_data.py @@ -16,8 +16,8 @@ class UpdateProjectResponse404Data: found. """ - code: Union[Unset, str] = "404" - message: Union[Unset, str] = "Project with id 1 not found" + code: Union[Unset, str] = UNSET + message: Union[Unset, str] = UNSET additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) def to_dict(self) -> Dict[str, Any]: diff --git a/customgpt-client/customgpt_client/models/update_project_response_500.py b/customgpt-client/customgpt_client/models/update_project_response_500.py index c7debce..43243ae 100644 --- a/customgpt-client/customgpt_client/models/update_project_response_500.py +++ b/customgpt-client/customgpt_client/models/update_project_response_500.py @@ -20,7 +20,7 @@ class UpdateProjectResponse500: data (Union[Unset, UpdateProjectResponse500Data]): """ - status: Union[Unset, str] = "error" + status: Union[Unset, str] = UNSET url: Union[Unset, str] = UNSET data: Union[Unset, "UpdateProjectResponse500Data"] = UNSET additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) diff --git a/customgpt-client/customgpt_client/models/update_project_response_500_data.py b/customgpt-client/customgpt_client/models/update_project_response_500_data.py index 12691a2..d7160ee 100644 --- a/customgpt-client/customgpt_client/models/update_project_response_500_data.py +++ b/customgpt-client/customgpt_client/models/update_project_response_500_data.py @@ -15,7 +15,7 @@ class UpdateProjectResponse500Data: message (Union[Unset, str]): Example: Internal Server Error. """ - code: Union[Unset, str] = "500" + code: Union[Unset, str] = UNSET message: Union[Unset, str] = UNSET additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) diff --git a/customgpt-client/customgpt_client/models/update_settings_multipart_data.py b/customgpt-client/customgpt_client/models/update_project_settings_multipart_data.py similarity index 65% rename from customgpt-client/customgpt_client/models/update_settings_multipart_data.py rename to customgpt-client/customgpt_client/models/update_project_settings_multipart_data.py index 29fab03..6ad0be9 100644 --- a/customgpt-client/customgpt_client/models/update_settings_multipart_data.py +++ b/customgpt-client/customgpt_client/models/update_project_settings_multipart_data.py @@ -5,11 +5,11 @@ from ..types import UNSET, File, FileJsonType, Unset -T = TypeVar("T", bound="UpdateSettingsMultipartData") +T = TypeVar("T", bound="UpdateProjectSettingsMultipartData") @attr.s(auto_attribs=True) -class UpdateSettingsMultipartData: +class UpdateProjectSettingsMultipartData: """ Attributes: chat_bot_avatar (Union[Unset, File]): This is the avatar that is shown in the bot response. You can make it a @@ -20,17 +20,18 @@ class UpdateSettingsMultipartData: your company or client. Example: How can I help you?. example_questions (Union[Unset, List[str]]): These are example questions shown to guide the bot users. You can create customized questions to suit your company or client needs. - response_source (Union[Unset, str]): By default, we ask ChatGPT to use only your content in its response - (recommended). If you wish ChatGPT to improvise and use its own knowledgebase as well, you can select "My - Content + ChatGPT" Example: own_content. - chatbot_msg_lang (Union[Unset, str]): By default, the chatbot messages like 'Ask Me Anything' are in English. - You can customize this to your preferred language. Please note: This setting does not control what language - ChatGPT responds in. That is controlled by the user's question. So a user asking in Portuguese, will most likely - get a response from ChatGPT in Portuguese. Example: en. + response_source (Union[Unset, UpdateProjectSettingsMultipartDataResponseSource]): By default, we ask ChatGPT to + use only your content in its response (recommended). If you wish ChatGPT to improvise and use its own + knowledgebase as well, you can select "My Content + ChatGPT" Example: own_content. + chatbot_msg_lang (Union[Unset, UpdateProjectSettingsMultipartDataChatbotMsgLang]): By default, the chatbot + messages like 'Ask Me Anything' are in English. You can customize this to your preferred language. Please note: + This setting does not control what language ChatGPT responds in. That is controlled by the user's question. So a + user asking in Portuguese, will most likely get a response from ChatGPT in Portuguese. Example: en. chatbot_color (Union[Unset, str]): Color of the chatbot in hex format Example: #000000. - persona_instructions (Union[Unset, None, str]): [Advanced Users] Customize your chatbot behavior by adjusting - the system parameter to control its personality traits and role. Example: You are a custom chatbot assistant - called CustomGPT, a friendly lawyer who answers questions based on the given context.. + chatbot_toolbar_color (Union[Unset, str]): Color of the chatbot toolbar in hex format Example: #000000. + persona_instructions (Union[Unset, None, str]): Customize your chatbot behavior by adjusting the system + parameter to control its personality traits and role. Example: You are a custom chatbot assistant called + CustomGPT.ai, a friendly lawyer who answers questions based on the given context.. citations_answer_source_label_msg (Union[Unset, None, str]): This is the message shown to indicate where the response came from. You can customize this message based on your business or language. Example: Where did this answer come from?. @@ -44,18 +45,26 @@ class UpdateSettingsMultipartData: bot is taking a siesta. This usually happens when OpenAI is down! Please try again later.. is_loading_indicator_enabled (Union[Unset, None, bool]): Show animated loading indicator while waiting for a response from the chatbot Default: True. Example: True. - enable_citations (Union[Unset, None, bool]): Each chatbot response shows an option for the user to see the - sources/citations from your content from which the response was generated. Default: True. Example: True. - citations_view_type (Union[Unset, None, UpdateSettingsMultipartDataCitationsViewType]): Control how citations - are shown. By default, the user can initiate to see the citations. You can choose to have it "Auto Shown" or - "Auto Hide" Default: UpdateSettingsMultipartDataCitationsViewType.USER. Example: user. + enable_citations (Union[Unset, None, UpdateProjectSettingsMultipartDataEnableCitations]): Each chatbot response + shows an option for the user to see the sources/citations from your content from which the response was + generated. Default: UpdateProjectSettingsMultipartDataEnableCitations.VALUE_3. Example: 3. + enable_feedbacks (Union[Unset, None, bool]): Each chatbot response shows an thumbs up/down for the user to left + own feedback. Default: True. Example: True. + citations_view_type (Union[Unset, None, UpdateProjectSettingsMultipartDataCitationsViewType]): Control how + citations are shown. By default, the user can initiate to see the citations. You can choose to have it "Auto + Shown" or "Auto Hide" Default: UpdateProjectSettingsMultipartDataCitationsViewType.USER. Example: user. no_answer_message (Union[Unset, None, str]): This is the message shown when the bot cannot answer. You can - customize it to a message asking the user to contact customer support or leave their email / phone. Example: - Sorry, I don't have an answer for that.. + customize it to a message asking the user to contact customer support or leave their email / phone. Default: + "I'm sorry, I don't know the answer". Example: Sorry, I don't have an answer for that.. ending_message (Union[Unset, None, str]): You can instruct ChatGPT to end every response with some text like asking "Please email us for further support" (Not recommended for most use cases) Example: Please email us for further support. remove_branding (Union[Unset, None, bool]): Controls what branding is shown at the bottom of the chatbot. + enable_recaptcha_for_public_chatbots (Union[Unset, None, bool]): Should we check messages from guests with + Recaptcha when your chatbot is publicly available (i.e. shared or embedded). + chatbot_model (Union[Unset, None, UpdateProjectSettingsMultipartDataChatbotModel]): This is the model used by + the chatbot. You can choose a different model to suit your needs. Example: gpt-4. + is_selling_enabled (Union[Unset, None, bool]): Enable selling of chatbot for monetization """ chat_bot_avatar: Union[Unset, File] = UNSET @@ -65,17 +74,22 @@ class UpdateSettingsMultipartData: response_source: Union[Unset, str] = UNSET chatbot_msg_lang: Union[Unset, str] = UNSET chatbot_color: Union[Unset, str] = UNSET + chatbot_toolbar_color: Union[Unset, str] = UNSET persona_instructions: Union[Unset, None, str] = UNSET citations_answer_source_label_msg: Union[Unset, None, str] = UNSET citations_sources_label_msg: Union[Unset, None, str] = UNSET hang_in_there_msg: Union[Unset, None, str] = UNSET chatbot_siesta_msg: Union[Unset, None, str] = UNSET is_loading_indicator_enabled: Union[Unset, None, bool] = True - enable_citations: Union[Unset, None, bool] = True - citations_view_type: Union[Unset, str] = "user" - no_answer_message: Union[Unset, None, str] = UNSET + enable_citations: Union[Unset, str] = UNSET + enable_feedbacks: Union[Unset, None, bool] = True + citations_view_type: Union[Unset, str] = UNSET + no_answer_message: Union[Unset, None, str] = "I'm sorry, I don't know the answer" ending_message: Union[Unset, None, str] = UNSET remove_branding: Union[Unset, None, bool] = False + enable_recaptcha_for_public_chatbots: Union[Unset, None, bool] = False + chatbot_model: Union[Unset, str] = UNSET + is_selling_enabled: Union[Unset, None, bool] = False additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) def to_dict(self) -> Dict[str, Any]: @@ -92,23 +106,44 @@ def to_dict(self) -> Dict[str, Any]: if not isinstance(self.example_questions, Unset): example_questions = self.example_questions - response_source = self.response_source - chatbot_msg_lang = self.chatbot_msg_lang + response_source: Union[Unset, str] = UNSET + if not isinstance(self.response_source, Unset): + response_source = self.response_source + + chatbot_msg_lang: Union[Unset, str] = UNSET + if not isinstance(self.chatbot_msg_lang, Unset): + chatbot_msg_lang = self.chatbot_msg_lang + chatbot_color = self.chatbot_color + chatbot_toolbar_color = self.chatbot_toolbar_color persona_instructions = self.persona_instructions citations_answer_source_label_msg = self.citations_answer_source_label_msg citations_sources_label_msg = self.citations_sources_label_msg hang_in_there_msg = self.hang_in_there_msg chatbot_siesta_msg = self.chatbot_siesta_msg - is_loading_indicator_enabled = self.is_loading_indicator_enabled - enable_citations = self.enable_citations + is_loading_indicator_enabled = True if self.is_loading_indicator_enabled else False + + enable_citations: Union[Unset, None, int] = UNSET + if not isinstance(self.enable_citations, Unset): + enable_citations = self.enable_citations if self.enable_citations else None + + enable_feedbacks = True if self.enable_feedbacks else False + citations_view_type: Union[Unset, None, str] = UNSET if not isinstance(self.citations_view_type, Unset): citations_view_type = self.citations_view_type if self.citations_view_type else None no_answer_message = self.no_answer_message ending_message = self.ending_message - remove_branding = self.remove_branding + remove_branding = True if self.remove_branding else False + + enable_recaptcha_for_public_chatbots = True if self.enable_recaptcha_for_public_chatbots else False + + chatbot_model: Union[Unset, None, str] = UNSET + if not isinstance(self.chatbot_model, Unset): + chatbot_model = self.chatbot_model if self.chatbot_model else None + + is_selling_enabled = True if self.is_selling_enabled else False field_dict: Dict[str, Any] = {} field_dict.update(self.additional_properties) @@ -121,13 +156,15 @@ def to_dict(self) -> Dict[str, Any]: field_dict["default_prompt"] = default_prompt if example_questions is not UNSET: for index, field_value in enumerate(example_questions): - field_dict[f"example_questions[]"] = field_value + field_dict[f"example_questions[{index}]"] = field_value if response_source is not UNSET: field_dict["response_source"] = response_source if chatbot_msg_lang is not UNSET: field_dict["chatbot_msg_lang"] = chatbot_msg_lang if chatbot_color is not UNSET: field_dict["chatbot_color"] = chatbot_color + if chatbot_toolbar_color is not UNSET: + field_dict["chatbot_toolbar_color"] = chatbot_toolbar_color if persona_instructions is not UNSET: field_dict["persona_instructions"] = persona_instructions if citations_answer_source_label_msg is not UNSET: @@ -142,6 +179,8 @@ def to_dict(self) -> Dict[str, Any]: field_dict["is_loading_indicator_enabled"] = is_loading_indicator_enabled if enable_citations is not UNSET: field_dict["enable_citations"] = enable_citations + if enable_feedbacks is not UNSET: + field_dict["enable_feedbacks"] = enable_feedbacks if citations_view_type is not UNSET: field_dict["citations_view_type"] = citations_view_type if no_answer_message is not UNSET: @@ -150,6 +189,12 @@ def to_dict(self) -> Dict[str, Any]: field_dict["ending_message"] = ending_message if remove_branding is not UNSET: field_dict["remove_branding"] = remove_branding + if enable_recaptcha_for_public_chatbots is not UNSET: + field_dict["enable_recaptcha_for_public_chatbots"] = enable_recaptcha_for_public_chatbots + if chatbot_model is not UNSET: + field_dict["chatbot_model"] = chatbot_model + if is_selling_enabled is not UNSET: + field_dict["is_selling_enabled"] = is_selling_enabled return field_dict @@ -175,21 +220,24 @@ def to_multipart(self) -> Dict[str, Any]: field_value = (None, str(value).encode(), "text/plain") example_questions.append(field_value) - response_source = ( - self.response_source - if isinstance(self.response_source, Unset) - else (None, str(self.response_source).encode(), "text/plain") - ) - chatbot_msg_lang = ( - self.chatbot_msg_lang - if isinstance(self.chatbot_msg_lang, Unset) - else (None, str(self.chatbot_msg_lang).encode(), "text/plain") - ) + response_source: Union[Unset, Tuple[None, bytes, str]] = UNSET + if not isinstance(self.response_source, Unset): + response_source = (None, str(self.response_source).encode(), "text/plain") + + chatbot_msg_lang: Union[Unset, Tuple[None, bytes, str]] = UNSET + if not isinstance(self.chatbot_msg_lang, Unset): + chatbot_msg_lang = (None, str(self.chatbot_msg_lang).encode(), "text/plain") + chatbot_color = ( self.chatbot_color if isinstance(self.chatbot_color, Unset) else (None, str(self.chatbot_color).encode(), "text/plain") ) + chatbot_toolbar_color = ( + self.chatbot_toolbar_color + if isinstance(self.chatbot_toolbar_color, Unset) + else (None, str(self.chatbot_toolbar_color).encode(), "text/plain") + ) persona_instructions = ( self.persona_instructions if isinstance(self.persona_instructions, Unset) @@ -220,11 +268,19 @@ def to_multipart(self) -> Dict[str, Any]: if isinstance(self.is_loading_indicator_enabled, Unset) else (None, str(self.is_loading_indicator_enabled).lower().encode(), "text/plain") ) - enable_citations = ( - self.enable_citations - if isinstance(self.enable_citations, Unset) - else (None, str(self.enable_citations).lower().encode(), "text/plain") + + enable_citations: Union[Unset, Tuple[None, bytes, str]] = UNSET + if not isinstance(self.enable_citations, Unset): + enable_citations = ( + (None, str(self.enable_citations).encode(), "text/plain") if self.enable_citations else None + ) + + enable_feedbacks = ( + self.enable_feedbacks + if isinstance(self.enable_feedbacks, Unset) + else (None, str(self.enable_feedbacks).lower().encode(), "text/plain") ) + citations_view_type: Union[Unset, Tuple[None, bytes, str]] = UNSET if not isinstance(self.citations_view_type, Unset): citations_view_type = ( @@ -247,6 +303,22 @@ def to_multipart(self) -> Dict[str, Any]: else (None, str(self.remove_branding).lower().encode(), "text/plain") ) + enable_recaptcha_for_public_chatbots = ( + self.enable_recaptcha_for_public_chatbots + if isinstance(self.enable_recaptcha_for_public_chatbots, Unset) + else (None, str(self.enable_recaptcha_for_public_chatbots).lower().encode(), "text/plain") + ) + + chatbot_model: Union[Unset, Tuple[None, bytes, str]] = UNSET + if not isinstance(self.chatbot_model, Unset): + chatbot_model = (None, str(self.chatbot_model).encode(), "text/plain") if self.chatbot_model else None + + is_selling_enabled = ( + self.is_selling_enabled + if isinstance(self.is_selling_enabled, Unset) + else (None, str(self.is_selling_enabled).lower().encode(), "text/plain") + ) + field_dict: Dict[str, Any] = {} field_dict.update( {key: (None, str(value).encode(), "text/plain") for key, value in self.additional_properties.items()} @@ -260,13 +332,15 @@ def to_multipart(self) -> Dict[str, Any]: field_dict["default_prompt"] = default_prompt if example_questions is not UNSET: for index, field_value in enumerate(example_questions): - field_dict[f"example_questions[]"] = field_value + field_dict[f"example_questions[{index}]"] = field_value if response_source is not UNSET: field_dict["response_source"] = response_source if chatbot_msg_lang is not UNSET: field_dict["chatbot_msg_lang"] = chatbot_msg_lang if chatbot_color is not UNSET: field_dict["chatbot_color"] = chatbot_color + if chatbot_toolbar_color is not UNSET: + field_dict["chatbot_toolbar_color"] = chatbot_toolbar_color if persona_instructions is not UNSET: field_dict["persona_instructions"] = persona_instructions if citations_answer_source_label_msg is not UNSET: @@ -281,6 +355,8 @@ def to_multipart(self) -> Dict[str, Any]: field_dict["is_loading_indicator_enabled"] = is_loading_indicator_enabled if enable_citations is not UNSET: field_dict["enable_citations"] = enable_citations + if enable_feedbacks is not UNSET: + field_dict["enable_feedbacks"] = enable_feedbacks if citations_view_type is not UNSET: field_dict["citations_view_type"] = citations_view_type if no_answer_message is not UNSET: @@ -289,6 +365,12 @@ def to_multipart(self) -> Dict[str, Any]: field_dict["ending_message"] = ending_message if remove_branding is not UNSET: field_dict["remove_branding"] = remove_branding + if enable_recaptcha_for_public_chatbots is not UNSET: + field_dict["enable_recaptcha_for_public_chatbots"] = enable_recaptcha_for_public_chatbots + if chatbot_model is not UNSET: + field_dict["chatbot_model"] = chatbot_model + if is_selling_enabled is not UNSET: + field_dict["is_selling_enabled"] = is_selling_enabled return field_dict @@ -318,6 +400,8 @@ def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: chatbot_color = src_dict.get("chatbot_color") + chatbot_toolbar_color = src_dict.get("chatbot_toolbar_color") + persona_instructions = src_dict.get("persona_instructions") citations_answer_source_label_msg = src_dict.get("citations_answer_source_label_msg") @@ -332,6 +416,8 @@ def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: enable_citations = src_dict.get("enable_citations") + enable_feedbacks = src_dict.get("enable_feedbacks") + citations_view_type = src_dict.get("citations_view_type") no_answer_message = src_dict.get("no_answer_message") @@ -340,7 +426,13 @@ def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: remove_branding = src_dict.get("remove_branding") - update_settings_multipart_data = cls( + enable_recaptcha_for_public_chatbots = src_dict.get("enable_recaptcha_for_public_chatbots") + + chatbot_model = src_dict.get("chatbot_model") + + is_selling_enabled = src_dict.get("is_selling_enabled") + + update_project_settings_multipart_data = cls( chat_bot_avatar=chat_bot_avatar, chat_bot_bg=chat_bot_bg, default_prompt=default_prompt, @@ -348,6 +440,7 @@ def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: response_source=response_source, chatbot_msg_lang=chatbot_msg_lang, chatbot_color=chatbot_color, + chatbot_toolbar_color=chatbot_toolbar_color, persona_instructions=persona_instructions, citations_answer_source_label_msg=citations_answer_source_label_msg, citations_sources_label_msg=citations_sources_label_msg, @@ -355,14 +448,18 @@ def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: chatbot_siesta_msg=chatbot_siesta_msg, is_loading_indicator_enabled=is_loading_indicator_enabled, enable_citations=enable_citations, + enable_feedbacks=enable_feedbacks, citations_view_type=citations_view_type, no_answer_message=no_answer_message, ending_message=ending_message, remove_branding=remove_branding, + enable_recaptcha_for_public_chatbots=enable_recaptcha_for_public_chatbots, + chatbot_model=chatbot_model, + is_selling_enabled=is_selling_enabled, ) - update_settings_multipart_data.additional_properties = src_dict - return update_settings_multipart_data + update_project_settings_multipart_data.additional_properties = src_dict + return update_project_settings_multipart_data @property def additional_keys(self) -> List[str]: diff --git a/customgpt-client/customgpt_client/models/update_project_settings_multipart_data_chatbot_model.py b/customgpt-client/customgpt_client/models/update_project_settings_multipart_data_chatbot_model.py new file mode 100644 index 0000000..418a076 --- /dev/null +++ b/customgpt-client/customgpt_client/models/update_project_settings_multipart_data_chatbot_model.py @@ -0,0 +1,11 @@ +from enum import Enum + + +class UpdateProjectSettingsMultipartDataChatbotModel(str, Enum): + GPT_3_5_TURBO = "gpt-3.5-turbo" + GPT_4 = "gpt-4" + GPT_4_O = "gpt-4-o" + GPT_4_TURBO = "gpt-4-turbo" + + def __str__(self) -> str: + return str(self.value) diff --git a/customgpt-client/customgpt_client/models/update_project_settings_multipart_data_chatbot_msg_lang.py b/customgpt-client/customgpt_client/models/update_project_settings_multipart_data_chatbot_msg_lang.py new file mode 100644 index 0000000..9c391e0 --- /dev/null +++ b/customgpt-client/customgpt_client/models/update_project_settings_multipart_data_chatbot_msg_lang.py @@ -0,0 +1,99 @@ +from enum import Enum + + +class UpdateProjectSettingsMultipartDataChatbotMsgLang(str, Enum): + AR = "ar" + AZ = "az" + BA = "ba" + BE = "be" + BG = "bg" + BH = "bh" + BN = "bn" + BS = "bs" + CA = "ca" + CMN = "cmn" + CS = "cs" + CY = "cy" + DA = "da" + DE = "de" + DOI = "doi" + EL = "el" + EN = "en" + ES = "es" + ET = "et" + EU = "eu" + FA = "fa" + FI = "fi" + FO = "fo" + FR = "fr" + GA = "ga" + GL = "gl" + GU = "gu" + HE = "he" + HI = "hi" + HNE = "hne" + HR = "hr" + HRY = "hry" + HU = "hu" + HY = "hy" + ID = "id" + IT = "it" + JA = "ja" + JV = "jv" + KA = "ka" + KK = "kk" + KN = "kn" + KO = "ko" + KOK = "kok" + KS = "ks" + KY = "ky" + LT = "lt" + LV = "lv" + MAI = "mai" + ME = "me" + MK = "mk" + MN = "mn" + MO = "mo" + MR = "mr" + MS = "ms" + MT = "mt" + MWR = "mwr" + NAN = "nan" + NE = "ne" + NL = "nl" + NO = "no" + OR = "or" + PA = "pa" + PL = "pl" + PS = "ps" + PT = "pt" + PT_BR = "pt-BR" + RAJ = "raj" + RO = "ro" + RU = "ru" + SA = "sa" + SAT = "sat" + SD = "sd" + SI = "si" + SK = "sk" + SL = "sl" + SQ = "sq" + SR = "sr" + SV = "sv" + SW = "sw" + TA = "ta" + TE = "te" + TG = "tg" + TH = "th" + TK = "tk" + TR = "tr" + TT = "tt" + UK = "uk" + UR = "ur" + UZ = "uz" + VI = "vi" + WUU = "wuu" + YUE = "yue" + + def __str__(self) -> str: + return str(self.value) diff --git a/customgpt-client/customgpt_client/models/update_settings_multipart_data_citations_view_type.py b/customgpt-client/customgpt_client/models/update_project_settings_multipart_data_citations_view_type.py similarity index 66% rename from customgpt-client/customgpt_client/models/update_settings_multipart_data_citations_view_type.py rename to customgpt-client/customgpt_client/models/update_project_settings_multipart_data_citations_view_type.py index ecedf2a..03ee314 100644 --- a/customgpt-client/customgpt_client/models/update_settings_multipart_data_citations_view_type.py +++ b/customgpt-client/customgpt_client/models/update_project_settings_multipart_data_citations_view_type.py @@ -1,7 +1,7 @@ from enum import Enum -class UpdateSettingsMultipartDataCitationsViewType(str, Enum): +class UpdateProjectSettingsMultipartDataCitationsViewType(str, Enum): HIDE = "hide" SHOW = "show" USER = "user" diff --git a/customgpt-client/customgpt_client/models/update_project_settings_multipart_data_enable_citations.py b/customgpt-client/customgpt_client/models/update_project_settings_multipart_data_enable_citations.py new file mode 100644 index 0000000..7690e1d --- /dev/null +++ b/customgpt-client/customgpt_client/models/update_project_settings_multipart_data_enable_citations.py @@ -0,0 +1,11 @@ +from enum import IntEnum + + +class UpdateProjectSettingsMultipartDataEnableCitations(IntEnum): + VALUE_0 = 0 + VALUE_1 = 1 + VALUE_2 = 2 + VALUE_3 = 3 + + def __str__(self) -> str: + return str(self.value) diff --git a/customgpt-client/customgpt_client/models/update_project_settings_multipart_data_response_source.py b/customgpt-client/customgpt_client/models/update_project_settings_multipart_data_response_source.py new file mode 100644 index 0000000..e06b980 --- /dev/null +++ b/customgpt-client/customgpt_client/models/update_project_settings_multipart_data_response_source.py @@ -0,0 +1,10 @@ +from enum import Enum + + +class UpdateProjectSettingsMultipartDataResponseSource(str, Enum): + DEFAULT = "default" + OPENAI_CONTENT = "openai_content" + OWN_CONTENT = "own_content" + + def __str__(self) -> str: + return str(self.value) diff --git a/customgpt-client/customgpt_client/models/update_project_settings_response_200.py b/customgpt-client/customgpt_client/models/update_project_settings_response_200.py new file mode 100644 index 0000000..4026d63 --- /dev/null +++ b/customgpt-client/customgpt_client/models/update_project_settings_response_200.py @@ -0,0 +1,80 @@ +from typing import TYPE_CHECKING, Any, Dict, List, Type, TypeVar, Union + +import attr + +from ..types import UNSET, Unset + +if TYPE_CHECKING: + from ..models.update_project_settings_response_200_data import UpdateProjectSettingsResponse200Data + + +T = TypeVar("T", bound="UpdateProjectSettingsResponse200") + + +@attr.s(auto_attribs=True) +class UpdateProjectSettingsResponse200: + """ + Attributes: + status (Union[Unset, UpdateProjectSettingsResponse200Status]): The status of the response Example: success. + data (Union[Unset, UpdateProjectSettingsResponse200Data]): + """ + + status: Union[Unset, str] = UNSET + data: Union[Unset, "UpdateProjectSettingsResponse200Data"] = UNSET + additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + status: Union[Unset, str] = UNSET + if not isinstance(self.status, Unset): + status = self.status + + data: Union[Unset, Dict[str, Any]] = UNSET + if not isinstance(self.data, Unset): + data = self.data.to_dict() + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if status is not UNSET: + field_dict["status"] = status + if data is not UNSET: + field_dict["data"] = data + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + from ..models.update_project_settings_response_200_data import UpdateProjectSettingsResponse200Data + + status = src_dict.get("status") + + _data = src_dict.get("data") + data: Union[Unset, UpdateProjectSettingsResponse200Data] + if isinstance(_data, Unset): + data = UNSET + else: + data = UpdateProjectSettingsResponse200Data.from_dict(_data) + + update_project_settings_response_200 = cls( + status=status, + data=data, + ) + + update_project_settings_response_200.additional_properties = src_dict + return update_project_settings_response_200 + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/customgpt-client/customgpt_client/models/update_settings_response_200_data.py b/customgpt-client/customgpt_client/models/update_project_settings_response_200_data.py similarity index 78% rename from customgpt-client/customgpt_client/models/update_settings_response_200_data.py rename to customgpt-client/customgpt_client/models/update_project_settings_response_200_data.py index 744dd0b..7a2e15a 100644 --- a/customgpt-client/customgpt_client/models/update_settings_response_200_data.py +++ b/customgpt-client/customgpt_client/models/update_project_settings_response_200_data.py @@ -4,11 +4,11 @@ from ..types import UNSET, Unset -T = TypeVar("T", bound="UpdateSettingsResponse200Data") +T = TypeVar("T", bound="UpdateProjectSettingsResponse200Data") @attr.s(auto_attribs=True) -class UpdateSettingsResponse200Data: +class UpdateProjectSettingsResponse200Data: """ Attributes: updated (Union[Unset, bool]): Whether the project was updated successfully or not Example: True. @@ -18,7 +18,7 @@ class UpdateSettingsResponse200Data: additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) def to_dict(self) -> Dict[str, Any]: - updated = self.updated + updated = True if self.updated else False field_dict: Dict[str, Any] = {} field_dict.update(self.additional_properties) @@ -32,12 +32,12 @@ def to_dict(self) -> Dict[str, Any]: def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: updated = src_dict.get("updated") - update_settings_response_200_data = cls( + update_project_settings_response_200_data = cls( updated=updated, ) - update_settings_response_200_data.additional_properties = src_dict - return update_settings_response_200_data + update_project_settings_response_200_data.additional_properties = src_dict + return update_project_settings_response_200_data @property def additional_keys(self) -> List[str]: diff --git a/customgpt-client/customgpt_client/models/update_project_settings_response_200_status.py b/customgpt-client/customgpt_client/models/update_project_settings_response_200_status.py new file mode 100644 index 0000000..d158a08 --- /dev/null +++ b/customgpt-client/customgpt_client/models/update_project_settings_response_200_status.py @@ -0,0 +1,9 @@ +from enum import Enum + + +class UpdateProjectSettingsResponse200Status(str, Enum): + ERROR = "error" + SUCCESS = "success" + + def __str__(self) -> str: + return str(self.value) diff --git a/customgpt-client/customgpt_client/models/update_project_settings_response_400.py b/customgpt-client/customgpt_client/models/update_project_settings_response_400.py new file mode 100644 index 0000000..5d79903 --- /dev/null +++ b/customgpt-client/customgpt_client/models/update_project_settings_response_400.py @@ -0,0 +1,88 @@ +from typing import TYPE_CHECKING, Any, Dict, List, Type, TypeVar, Union + +import attr + +from ..types import UNSET, Unset + +if TYPE_CHECKING: + from ..models.update_project_settings_response_400_data import UpdateProjectSettingsResponse400Data + + +T = TypeVar("T", bound="UpdateProjectSettingsResponse400") + + +@attr.s(auto_attribs=True) +class UpdateProjectSettingsResponse400: + """ + Attributes: + status (Union[Unset, UpdateProjectSettingsResponse400Status]): The status of the response Example: error. + url (Union[Unset, str]): The URL of the request Example: https://app.customgpt.ai/api/v1/projects/1. + data (Union[Unset, UpdateProjectSettingsResponse400Data]): + """ + + status: Union[Unset, str] = UNSET + url: Union[Unset, str] = UNSET + data: Union[Unset, "UpdateProjectSettingsResponse400Data"] = UNSET + additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + status: Union[Unset, str] = UNSET + if not isinstance(self.status, Unset): + status = self.status + + url = self.url + data: Union[Unset, Dict[str, Any]] = UNSET + if not isinstance(self.data, Unset): + data = self.data.to_dict() + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if status is not UNSET: + field_dict["status"] = status + if url is not UNSET: + field_dict["url"] = url + if data is not UNSET: + field_dict["data"] = data + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + from ..models.update_project_settings_response_400_data import UpdateProjectSettingsResponse400Data + + status = src_dict.get("status") + + url = src_dict.get("url") + + _data = src_dict.get("data") + data: Union[Unset, UpdateProjectSettingsResponse400Data] + if isinstance(_data, Unset): + data = UNSET + else: + data = UpdateProjectSettingsResponse400Data.from_dict(_data) + + update_project_settings_response_400 = cls( + status=status, + url=url, + data=data, + ) + + update_project_settings_response_400.additional_properties = src_dict + return update_project_settings_response_400 + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/customgpt-client/customgpt_client/models/update_project_settings_response_400_data.py b/customgpt-client/customgpt_client/models/update_project_settings_response_400_data.py new file mode 100644 index 0000000..9e82b11 --- /dev/null +++ b/customgpt-client/customgpt_client/models/update_project_settings_response_400_data.py @@ -0,0 +1,70 @@ +from typing import Any, Dict, List, Type, TypeVar, Union + +import attr + +from ..types import UNSET, Unset + +T = TypeVar("T", bound="UpdateProjectSettingsResponse400Data") + + +@attr.s(auto_attribs=True) +class UpdateProjectSettingsResponse400Data: + """ + Attributes: + code (Union[Unset, UpdateProjectSettingsResponse400DataCode]): The error status code Example: 400. + message (Union[Unset, UpdateProjectSettingsResponse400DataMessage]): The error message Example: Please upload a + valid image file for avatar. + """ + + code: Union[Unset, str] = UNSET + message: Union[Unset, str] = UNSET + additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + code: Union[Unset, int] = UNSET + if not isinstance(self.code, Unset): + code = self.code + + message: Union[Unset, str] = UNSET + if not isinstance(self.message, Unset): + message = self.message + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if code is not UNSET: + field_dict["code"] = code + if message is not UNSET: + field_dict["message"] = message + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + code = src_dict.get("code") + + message = src_dict.get("message") + + update_project_settings_response_400_data = cls( + code=code, + message=message, + ) + + update_project_settings_response_400_data.additional_properties = src_dict + return update_project_settings_response_400_data + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/customgpt-client/customgpt_client/models/update_project_settings_response_400_data_code.py b/customgpt-client/customgpt_client/models/update_project_settings_response_400_data_code.py new file mode 100644 index 0000000..e0ea067 --- /dev/null +++ b/customgpt-client/customgpt_client/models/update_project_settings_response_400_data_code.py @@ -0,0 +1,13 @@ +from enum import IntEnum + + +class UpdateProjectSettingsResponse400DataCode(IntEnum): + VALUE_400 = 400 + VALUE_401 = 401 + VALUE_403 = 403 + VALUE_404 = 404 + VALUE_500 = 500 + VALUE_503 = 503 + + def __str__(self) -> str: + return str(self.value) diff --git a/customgpt-client/customgpt_client/models/update_settings_response_400_data_message.py b/customgpt-client/customgpt_client/models/update_project_settings_response_400_data_message.py similarity index 85% rename from customgpt-client/customgpt_client/models/update_settings_response_400_data_message.py rename to customgpt-client/customgpt_client/models/update_project_settings_response_400_data_message.py index c970edd..3159469 100644 --- a/customgpt-client/customgpt_client/models/update_settings_response_400_data_message.py +++ b/customgpt-client/customgpt_client/models/update_project_settings_response_400_data_message.py @@ -1,7 +1,7 @@ from enum import Enum -class UpdateSettingsResponse400DataMessage(str, Enum): +class UpdateProjectSettingsResponse400DataMessage(str, Enum): LANGUAGE_PROFICIENCY_IS_REQUIRED = "Language Proficiency is required." PLEASE_UPLOAD_A_VALID_IMAGE_FILE_FOR_AVATAR = "Please upload a valid image file for avatar" PLEASE_UPLOAD_A_VALID_IMAGE_FILE_FOR_BACKGROUND = "Please upload a valid image file for background" diff --git a/customgpt-client/customgpt_client/models/update_project_settings_response_400_status.py b/customgpt-client/customgpt_client/models/update_project_settings_response_400_status.py new file mode 100644 index 0000000..4cb7df5 --- /dev/null +++ b/customgpt-client/customgpt_client/models/update_project_settings_response_400_status.py @@ -0,0 +1,9 @@ +from enum import Enum + + +class UpdateProjectSettingsResponse400Status(str, Enum): + ERROR = "error" + SUCCESS = "success" + + def __str__(self) -> str: + return str(self.value) diff --git a/customgpt-client/customgpt_client/models/update_project_settings_response_401.py b/customgpt-client/customgpt_client/models/update_project_settings_response_401.py new file mode 100644 index 0000000..4a79458 --- /dev/null +++ b/customgpt-client/customgpt_client/models/update_project_settings_response_401.py @@ -0,0 +1,88 @@ +from typing import TYPE_CHECKING, Any, Dict, List, Type, TypeVar, Union + +import attr + +from ..types import UNSET, Unset + +if TYPE_CHECKING: + from ..models.update_project_settings_response_401_data import UpdateProjectSettingsResponse401Data + + +T = TypeVar("T", bound="UpdateProjectSettingsResponse401") + + +@attr.s(auto_attribs=True) +class UpdateProjectSettingsResponse401: + """ + Attributes: + status (Union[Unset, UpdateProjectSettingsResponse401Status]): The status of the response Example: error. + url (Union[Unset, str]): The URL of the request Example: https://app.customgpt.ai/api/v1/projects/1. + data (Union[Unset, UpdateProjectSettingsResponse401Data]): + """ + + status: Union[Unset, str] = UNSET + url: Union[Unset, str] = UNSET + data: Union[Unset, "UpdateProjectSettingsResponse401Data"] = UNSET + additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + status: Union[Unset, str] = UNSET + if not isinstance(self.status, Unset): + status = self.status + + url = self.url + data: Union[Unset, Dict[str, Any]] = UNSET + if not isinstance(self.data, Unset): + data = self.data.to_dict() + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if status is not UNSET: + field_dict["status"] = status + if url is not UNSET: + field_dict["url"] = url + if data is not UNSET: + field_dict["data"] = data + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + from ..models.update_project_settings_response_401_data import UpdateProjectSettingsResponse401Data + + status = src_dict.get("status") + + url = src_dict.get("url") + + _data = src_dict.get("data") + data: Union[Unset, UpdateProjectSettingsResponse401Data] + if isinstance(_data, Unset): + data = UNSET + else: + data = UpdateProjectSettingsResponse401Data.from_dict(_data) + + update_project_settings_response_401 = cls( + status=status, + url=url, + data=data, + ) + + update_project_settings_response_401.additional_properties = src_dict + return update_project_settings_response_401 + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/customgpt-client/customgpt_client/models/update_project_settings_response_401_data.py b/customgpt-client/customgpt_client/models/update_project_settings_response_401_data.py new file mode 100644 index 0000000..a5507ea --- /dev/null +++ b/customgpt-client/customgpt_client/models/update_project_settings_response_401_data.py @@ -0,0 +1,67 @@ +from typing import Any, Dict, List, Type, TypeVar, Union + +import attr + +from ..types import UNSET, Unset + +T = TypeVar("T", bound="UpdateProjectSettingsResponse401Data") + + +@attr.s(auto_attribs=True) +class UpdateProjectSettingsResponse401Data: + """ + Attributes: + code (Union[Unset, UpdateProjectSettingsResponse401DataCode]): The error status code Example: 401. + message (Union[Unset, str]): Example: API Token is either missing or invalid. + """ + + code: Union[Unset, str] = UNSET + message: Union[Unset, str] = UNSET + additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + code: Union[Unset, int] = UNSET + if not isinstance(self.code, Unset): + code = self.code + + message = self.message + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if code is not UNSET: + field_dict["code"] = code + if message is not UNSET: + field_dict["message"] = message + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + code = src_dict.get("code") + + message = src_dict.get("message") + + update_project_settings_response_401_data = cls( + code=code, + message=message, + ) + + update_project_settings_response_401_data.additional_properties = src_dict + return update_project_settings_response_401_data + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/customgpt-client/customgpt_client/models/update_project_settings_response_401_data_code.py b/customgpt-client/customgpt_client/models/update_project_settings_response_401_data_code.py new file mode 100644 index 0000000..a4c5b88 --- /dev/null +++ b/customgpt-client/customgpt_client/models/update_project_settings_response_401_data_code.py @@ -0,0 +1,13 @@ +from enum import IntEnum + + +class UpdateProjectSettingsResponse401DataCode(IntEnum): + VALUE_400 = 400 + VALUE_401 = 401 + VALUE_403 = 403 + VALUE_404 = 404 + VALUE_500 = 500 + VALUE_503 = 503 + + def __str__(self) -> str: + return str(self.value) diff --git a/customgpt-client/customgpt_client/models/update_project_settings_response_401_status.py b/customgpt-client/customgpt_client/models/update_project_settings_response_401_status.py new file mode 100644 index 0000000..805ab45 --- /dev/null +++ b/customgpt-client/customgpt_client/models/update_project_settings_response_401_status.py @@ -0,0 +1,9 @@ +from enum import Enum + + +class UpdateProjectSettingsResponse401Status(str, Enum): + ERROR = "error" + SUCCESS = "success" + + def __str__(self) -> str: + return str(self.value) diff --git a/customgpt-client/customgpt_client/models/update_project_settings_response_500.py b/customgpt-client/customgpt_client/models/update_project_settings_response_500.py new file mode 100644 index 0000000..54a8775 --- /dev/null +++ b/customgpt-client/customgpt_client/models/update_project_settings_response_500.py @@ -0,0 +1,88 @@ +from typing import TYPE_CHECKING, Any, Dict, List, Type, TypeVar, Union + +import attr + +from ..types import UNSET, Unset + +if TYPE_CHECKING: + from ..models.update_project_settings_response_500_data import UpdateProjectSettingsResponse500Data + + +T = TypeVar("T", bound="UpdateProjectSettingsResponse500") + + +@attr.s(auto_attribs=True) +class UpdateProjectSettingsResponse500: + """ + Attributes: + status (Union[Unset, UpdateProjectSettingsResponse500Status]): The status of the response Example: error. + url (Union[Unset, str]): The URL of the request Example: https://app.customgpt.ai/api/v1/projects/1. + data (Union[Unset, UpdateProjectSettingsResponse500Data]): + """ + + status: Union[Unset, str] = UNSET + url: Union[Unset, str] = UNSET + data: Union[Unset, "UpdateProjectSettingsResponse500Data"] = UNSET + additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + status: Union[Unset, str] = UNSET + if not isinstance(self.status, Unset): + status = self.status + + url = self.url + data: Union[Unset, Dict[str, Any]] = UNSET + if not isinstance(self.data, Unset): + data = self.data.to_dict() + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if status is not UNSET: + field_dict["status"] = status + if url is not UNSET: + field_dict["url"] = url + if data is not UNSET: + field_dict["data"] = data + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + from ..models.update_project_settings_response_500_data import UpdateProjectSettingsResponse500Data + + status = src_dict.get("status") + + url = src_dict.get("url") + + _data = src_dict.get("data") + data: Union[Unset, UpdateProjectSettingsResponse500Data] + if isinstance(_data, Unset): + data = UNSET + else: + data = UpdateProjectSettingsResponse500Data.from_dict(_data) + + update_project_settings_response_500 = cls( + status=status, + url=url, + data=data, + ) + + update_project_settings_response_500.additional_properties = src_dict + return update_project_settings_response_500 + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/customgpt-client/customgpt_client/models/update_project_settings_response_500_data.py b/customgpt-client/customgpt_client/models/update_project_settings_response_500_data.py new file mode 100644 index 0000000..c4a03f3 --- /dev/null +++ b/customgpt-client/customgpt_client/models/update_project_settings_response_500_data.py @@ -0,0 +1,67 @@ +from typing import Any, Dict, List, Type, TypeVar, Union + +import attr + +from ..types import UNSET, Unset + +T = TypeVar("T", bound="UpdateProjectSettingsResponse500Data") + + +@attr.s(auto_attribs=True) +class UpdateProjectSettingsResponse500Data: + """ + Attributes: + code (Union[Unset, UpdateProjectSettingsResponse500DataCode]): The error status code Example: 500. + message (Union[Unset, str]): Example: Internal Server Error. + """ + + code: Union[Unset, str] = UNSET + message: Union[Unset, str] = UNSET + additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + code: Union[Unset, int] = UNSET + if not isinstance(self.code, Unset): + code = self.code + + message = self.message + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if code is not UNSET: + field_dict["code"] = code + if message is not UNSET: + field_dict["message"] = message + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + code = src_dict.get("code") + + message = src_dict.get("message") + + update_project_settings_response_500_data = cls( + code=code, + message=message, + ) + + update_project_settings_response_500_data.additional_properties = src_dict + return update_project_settings_response_500_data + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/customgpt-client/customgpt_client/models/update_project_settings_response_500_data_code.py b/customgpt-client/customgpt_client/models/update_project_settings_response_500_data_code.py new file mode 100644 index 0000000..86390cb --- /dev/null +++ b/customgpt-client/customgpt_client/models/update_project_settings_response_500_data_code.py @@ -0,0 +1,13 @@ +from enum import IntEnum + + +class UpdateProjectSettingsResponse500DataCode(IntEnum): + VALUE_400 = 400 + VALUE_401 = 401 + VALUE_403 = 403 + VALUE_404 = 404 + VALUE_500 = 500 + VALUE_503 = 503 + + def __str__(self) -> str: + return str(self.value) diff --git a/customgpt-client/customgpt_client/models/update_project_settings_response_500_status.py b/customgpt-client/customgpt_client/models/update_project_settings_response_500_status.py new file mode 100644 index 0000000..19e1b42 --- /dev/null +++ b/customgpt-client/customgpt_client/models/update_project_settings_response_500_status.py @@ -0,0 +1,9 @@ +from enum import Enum + + +class UpdateProjectSettingsResponse500Status(str, Enum): + ERROR = "error" + SUCCESS = "success" + + def __str__(self) -> str: + return str(self.value) diff --git a/customgpt-client/customgpt_client/models/update_settings_response_200_status.py b/customgpt-client/customgpt_client/models/update_settings_response_200_status.py deleted file mode 100644 index 8d45e78..0000000 --- a/customgpt-client/customgpt_client/models/update_settings_response_200_status.py +++ /dev/null @@ -1,9 +0,0 @@ -from enum import Enum - - -class UpdateSettingsResponse200Status(str, Enum): - ERROR = "error" - SUCCESS = "success" - - def __str__(self) -> str: - return str(self.value) diff --git a/customgpt-client/customgpt_client/models/update_settings_response_400_data.py b/customgpt-client/customgpt_client/models/update_settings_response_400_data.py deleted file mode 100644 index e74d4c6..0000000 --- a/customgpt-client/customgpt_client/models/update_settings_response_400_data.py +++ /dev/null @@ -1,70 +0,0 @@ -from typing import Any, Dict, List, Type, TypeVar, Union - -import attr - -from ..types import UNSET, Unset - -T = TypeVar("T", bound="UpdateSettingsResponse400Data") - - -@attr.s(auto_attribs=True) -class UpdateSettingsResponse400Data: - """ - Attributes: - code (Union[Unset, UpdateSettingsResponse400DataCode]): The error status code Example: 400. - message (Union[Unset, UpdateSettingsResponse400DataMessage]): The error message Example: Please upload a valid - image file for avatar. - """ - - code: Union[Unset, str] = "400" - message: Union[Unset, str] = "Please upload a valid image file for avatar" - additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) - - def to_dict(self) -> Dict[str, Any]: - code: Union[Unset, int] = UNSET - if not isinstance(self.code, Unset): - code = self.code - - message: Union[Unset, str] = UNSET - if not isinstance(self.message, Unset): - message = self.message - - field_dict: Dict[str, Any] = {} - field_dict.update(self.additional_properties) - field_dict.update({}) - if code is not UNSET: - field_dict["code"] = code - if message is not UNSET: - field_dict["message"] = message - - return field_dict - - @classmethod - def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: - code = src_dict.get("code") - - message = src_dict.get("message") - - update_settings_response_400_data = cls( - code=code, - message=message, - ) - - update_settings_response_400_data.additional_properties = src_dict - return update_settings_response_400_data - - @property - def additional_keys(self) -> List[str]: - return list(self.additional_properties.keys()) - - def __getitem__(self, key: str) -> Any: - return self.additional_properties[key] - - def __setitem__(self, key: str, value: Any) -> None: - self.additional_properties[key] = value - - def __delitem__(self, key: str) -> None: - del self.additional_properties[key] - - def __contains__(self, key: str) -> bool: - return key in self.additional_properties diff --git a/customgpt-client/customgpt_client/models/update_settings_response_400_data_code.py b/customgpt-client/customgpt_client/models/update_settings_response_400_data_code.py deleted file mode 100644 index 2f46ac4..0000000 --- a/customgpt-client/customgpt_client/models/update_settings_response_400_data_code.py +++ /dev/null @@ -1,13 +0,0 @@ -from enum import IntEnum - - -class UpdateSettingsResponse400DataCode(IntEnum): - VALUE_400 = 400 - VALUE_401 = 401 - VALUE_403 = 403 - VALUE_404 = 404 - VALUE_500 = 500 - VALUE_503 = 503 - - def __str__(self) -> str: - return str(self.value) diff --git a/customgpt-client/customgpt_client/models/update_settings_response_400_status.py b/customgpt-client/customgpt_client/models/update_settings_response_400_status.py deleted file mode 100644 index 63b7d5f..0000000 --- a/customgpt-client/customgpt_client/models/update_settings_response_400_status.py +++ /dev/null @@ -1,9 +0,0 @@ -from enum import Enum - - -class UpdateSettingsResponse400Status(str, Enum): - ERROR = "error" - SUCCESS = "success" - - def __str__(self) -> str: - return str(self.value) diff --git a/customgpt-client/customgpt_client/models/update_settings_response_401_data_code.py b/customgpt-client/customgpt_client/models/update_settings_response_401_data_code.py deleted file mode 100644 index c0a8d93..0000000 --- a/customgpt-client/customgpt_client/models/update_settings_response_401_data_code.py +++ /dev/null @@ -1,13 +0,0 @@ -from enum import IntEnum - - -class UpdateSettingsResponse401DataCode(IntEnum): - VALUE_400 = 400 - VALUE_401 = 401 - VALUE_403 = 403 - VALUE_404 = 404 - VALUE_500 = 500 - VALUE_503 = 503 - - def __str__(self) -> str: - return str(self.value) diff --git a/customgpt-client/customgpt_client/models/update_settings_response_401_status.py b/customgpt-client/customgpt_client/models/update_settings_response_401_status.py deleted file mode 100644 index 601ff19..0000000 --- a/customgpt-client/customgpt_client/models/update_settings_response_401_status.py +++ /dev/null @@ -1,9 +0,0 @@ -from enum import Enum - - -class UpdateSettingsResponse401Status(str, Enum): - ERROR = "error" - SUCCESS = "success" - - def __str__(self) -> str: - return str(self.value) diff --git a/customgpt-client/customgpt_client/models/update_settings_response_500_data_code.py b/customgpt-client/customgpt_client/models/update_settings_response_500_data_code.py deleted file mode 100644 index 8ce87c8..0000000 --- a/customgpt-client/customgpt_client/models/update_settings_response_500_data_code.py +++ /dev/null @@ -1,13 +0,0 @@ -from enum import IntEnum - - -class UpdateSettingsResponse500DataCode(IntEnum): - VALUE_400 = 400 - VALUE_401 = 401 - VALUE_403 = 403 - VALUE_404 = 404 - VALUE_500 = 500 - VALUE_503 = 503 - - def __str__(self) -> str: - return str(self.value) diff --git a/customgpt-client/customgpt_client/models/update_settings_response_500_status.py b/customgpt-client/customgpt_client/models/update_settings_response_500_status.py deleted file mode 100644 index 63d4e80..0000000 --- a/customgpt-client/customgpt_client/models/update_settings_response_500_status.py +++ /dev/null @@ -1,9 +0,0 @@ -from enum import Enum - - -class UpdateSettingsResponse500Status(str, Enum): - ERROR = "error" - SUCCESS = "success" - - def __str__(self) -> str: - return str(self.value) diff --git a/customgpt-client/customgpt_client/models/update_source_json_body.py b/customgpt-client/customgpt_client/models/update_source_json_body.py new file mode 100644 index 0000000..f6c3f5f --- /dev/null +++ b/customgpt-client/customgpt_client/models/update_source_json_body.py @@ -0,0 +1,132 @@ +from typing import TYPE_CHECKING, Any, Dict, List, Type, TypeVar, Union + +import attr + +from ..types import UNSET, Unset + +if TYPE_CHECKING: + from ..models.update_source_json_body_refresh_schedule_item import UpdateSourceJsonBodyRefreshScheduleItem + + +T = TypeVar("T", bound="UpdateSourceJsonBody") + + +@attr.s(auto_attribs=True) +class UpdateSourceJsonBody: + """ + Attributes: + executive_js (Union[Unset, bool]): Whether the project source should execute JavaScript Default: True. Example: + True. + data_refresh_frequency (Union[Unset, UpdateSourceJsonBodyDataRefreshFrequency]): The project source data refresh + frequency Default: UpdateSourceJsonBodyDataRefreshFrequency.NEVER. Example: never. + create_new_pages (Union[Unset, bool]): Add new pages to project automatically during refresh project source + Default: True. Example: True. + remove_unexist_pages (Union[Unset, bool]): Remove pages from project automatically during refresh project source + Default: True. + refresh_existing_pages (Union[Unset, UpdateSourceJsonBodyRefreshExistingPages]): Refresh existing page during + refresh project source Default: UpdateSourceJsonBodyRefreshExistingPages.NEVER. Example: never. + refresh_schedule (Union[Unset, None, List['UpdateSourceJsonBodyRefreshScheduleItem']]): Custom schedule for + advanced data frequency Example: {'days': [1, 3, 5], 'hours': ['08:00', '23:59']}. + """ + + executive_js: Union[Unset, bool] = True + data_refresh_frequency: Union[Unset, str] = UNSET + create_new_pages: Union[Unset, bool] = True + remove_unexist_pages: Union[Unset, bool] = True + refresh_existing_pages: Union[Unset, str] = UNSET + refresh_schedule: Union[Unset, None, List["UpdateSourceJsonBodyRefreshScheduleItem"]] = UNSET + additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + executive_js = True if self.executive_js else False + + data_refresh_frequency: Union[Unset, str] = UNSET + if not isinstance(self.data_refresh_frequency, Unset): + data_refresh_frequency = self.data_refresh_frequency + + create_new_pages = True if self.create_new_pages else False + + remove_unexist_pages = True if self.remove_unexist_pages else False + + refresh_existing_pages: Union[Unset, str] = UNSET + if not isinstance(self.refresh_existing_pages, Unset): + refresh_existing_pages = self.refresh_existing_pages + + refresh_schedule: Union[Unset, None, List[Dict[str, Any]]] = UNSET + if not isinstance(self.refresh_schedule, Unset): + if self.refresh_schedule is None: + refresh_schedule = None + else: + refresh_schedule = [] + for refresh_schedule_item_data in self.refresh_schedule: + refresh_schedule_item = refresh_schedule_item_data.to_dict() + + refresh_schedule.append(refresh_schedule_item) + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if executive_js is not UNSET: + field_dict["executive_js"] = executive_js + if data_refresh_frequency is not UNSET: + field_dict["data_refresh_frequency"] = data_refresh_frequency + if create_new_pages is not UNSET: + field_dict["create_new_pages"] = create_new_pages + if remove_unexist_pages is not UNSET: + field_dict["remove_unexist_pages"] = remove_unexist_pages + if refresh_existing_pages is not UNSET: + field_dict["refresh_existing_pages"] = refresh_existing_pages + if refresh_schedule is not UNSET: + for index, field_value in enumerate(refresh_schedule): + field_dict[f"refresh_schedule[{index}]"] = field_value + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + from ..models.update_source_json_body_refresh_schedule_item import UpdateSourceJsonBodyRefreshScheduleItem + + executive_js = src_dict.get("executive_js") + + data_refresh_frequency = src_dict.get("data_refresh_frequency") + + create_new_pages = src_dict.get("create_new_pages") + + remove_unexist_pages = src_dict.get("remove_unexist_pages") + + refresh_existing_pages = src_dict.get("refresh_existing_pages") + + refresh_schedule = [] + _refresh_schedule = src_dict.get("refresh_schedule") + for refresh_schedule_item_data in _refresh_schedule or []: + refresh_schedule_item = UpdateSourceJsonBodyRefreshScheduleItem.from_dict(refresh_schedule_item_data) + + refresh_schedule.append(refresh_schedule_item) + + update_source_json_body = cls( + executive_js=executive_js, + data_refresh_frequency=data_refresh_frequency, + create_new_pages=create_new_pages, + remove_unexist_pages=remove_unexist_pages, + refresh_existing_pages=refresh_existing_pages, + refresh_schedule=refresh_schedule, + ) + + update_source_json_body.additional_properties = src_dict + return update_source_json_body + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/customgpt-client/customgpt_client/models/update_source_json_body_data_refresh_frequency.py b/customgpt-client/customgpt_client/models/update_source_json_body_data_refresh_frequency.py new file mode 100644 index 0000000..244c85c --- /dev/null +++ b/customgpt-client/customgpt_client/models/update_source_json_body_data_refresh_frequency.py @@ -0,0 +1,12 @@ +from enum import Enum + + +class UpdateSourceJsonBodyDataRefreshFrequency(str, Enum): + ADVANCED = "advanced" + DAILY = "daily" + MONTHLY = "monthly" + NEVER = "never" + WEEKLY = "weekly" + + def __str__(self) -> str: + return str(self.value) diff --git a/customgpt-client/customgpt_client/models/update_source_json_body_refresh_existing_pages.py b/customgpt-client/customgpt_client/models/update_source_json_body_refresh_existing_pages.py new file mode 100644 index 0000000..407dade --- /dev/null +++ b/customgpt-client/customgpt_client/models/update_source_json_body_refresh_existing_pages.py @@ -0,0 +1,10 @@ +from enum import Enum + + +class UpdateSourceJsonBodyRefreshExistingPages(str, Enum): + ALWAYS = "always" + IF_UPDATED = "if_updated" + NEVER = "never" + + def __str__(self) -> str: + return str(self.value) diff --git a/customgpt-client/customgpt_client/models/update_source_json_body_refresh_schedule_item.py b/customgpt-client/customgpt_client/models/update_source_json_body_refresh_schedule_item.py new file mode 100644 index 0000000..898eef7 --- /dev/null +++ b/customgpt-client/customgpt_client/models/update_source_json_body_refresh_schedule_item.py @@ -0,0 +1,73 @@ +from typing import Any, Dict, List, Type, TypeVar, Union, cast + +import attr + +from ..types import UNSET, Unset + +T = TypeVar("T", bound="UpdateSourceJsonBodyRefreshScheduleItem") + + +@attr.s(auto_attribs=True) +class UpdateSourceJsonBodyRefreshScheduleItem: + """ + Attributes: + days (Union[Unset, List[int]]): Index of days in which sitemap should be refreshed. Starts from 0 (Sunday) to 6 + (Saturday). Example: [0, 1, 4, 6]. + hours (Union[Unset, List[str]]): List of times in which sitemap should be refreshed. Must be in HH:MM format. + Example: ['00:00', '08:00', '23:45']. + """ + + days: Union[Unset, List[int]] = UNSET + hours: Union[Unset, List[str]] = UNSET + additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + days: Union[Unset, List[int]] = UNSET + if not isinstance(self.days, Unset): + days = self.days + + hours: Union[Unset, List[str]] = UNSET + if not isinstance(self.hours, Unset): + hours = self.hours + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if days is not UNSET: + for index, field_value in enumerate(days): + field_dict[f"days[{index}]"] = field_value + if hours is not UNSET: + for index, field_value in enumerate(hours): + field_dict[f"hours[{index}]"] = field_value + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + days = cast(List[int], src_dict.get("days")) + + hours = cast(List[str], src_dict.get("hours")) + + update_source_json_body_refresh_schedule_item = cls( + days=days, + hours=hours, + ) + + update_source_json_body_refresh_schedule_item.additional_properties = src_dict + return update_source_json_body_refresh_schedule_item + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/customgpt-client/customgpt_client/models/update_source_response_201.py b/customgpt-client/customgpt_client/models/update_source_response_201.py new file mode 100644 index 0000000..72d37e6 --- /dev/null +++ b/customgpt-client/customgpt_client/models/update_source_response_201.py @@ -0,0 +1,80 @@ +from typing import TYPE_CHECKING, Any, Dict, List, Type, TypeVar, Union + +import attr + +from ..types import UNSET, Unset + +if TYPE_CHECKING: + from ..models.update_source_response_201_data import UpdateSourceResponse201Data + + +T = TypeVar("T", bound="UpdateSourceResponse201") + + +@attr.s(auto_attribs=True) +class UpdateSourceResponse201: + """ + Attributes: + status (Union[Unset, UpdateSourceResponse201Status]): The status of the response Example: success. + data (Union[Unset, UpdateSourceResponse201Data]): + """ + + status: Union[Unset, str] = UNSET + data: Union[Unset, "UpdateSourceResponse201Data"] = UNSET + additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + status: Union[Unset, str] = UNSET + if not isinstance(self.status, Unset): + status = self.status + + data: Union[Unset, Dict[str, Any]] = UNSET + if not isinstance(self.data, Unset): + data = self.data.to_dict() + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if status is not UNSET: + field_dict["status"] = status + if data is not UNSET: + field_dict["data"] = data + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + from ..models.update_source_response_201_data import UpdateSourceResponse201Data + + status = src_dict.get("status") + + _data = src_dict.get("data") + data: Union[Unset, UpdateSourceResponse201Data] + if isinstance(_data, Unset): + data = UNSET + else: + data = UpdateSourceResponse201Data.from_dict(_data) + + update_source_response_201 = cls( + status=status, + data=data, + ) + + update_source_response_201.additional_properties = src_dict + return update_source_response_201 + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/customgpt-client/customgpt_client/models/update_source_response_201_data.py b/customgpt-client/customgpt_client/models/update_source_response_201_data.py new file mode 100644 index 0000000..4c95545 --- /dev/null +++ b/customgpt-client/customgpt_client/models/update_source_response_201_data.py @@ -0,0 +1,148 @@ +import datetime +from typing import TYPE_CHECKING, Any, Dict, List, Type, TypeVar, Union + +import attr +from dateutil.parser import isoparse + +from ..types import UNSET, Unset + +if TYPE_CHECKING: + from ..models.update_source_response_201_data_pages_item import UpdateSourceResponse201DataPagesItem + from ..models.update_source_response_201_data_settings import UpdateSourceResponse201DataSettings + + +T = TypeVar("T", bound="UpdateSourceResponse201Data") + + +@attr.s(auto_attribs=True) +class UpdateSourceResponse201Data: + """ + Attributes: + id (Union[Unset, int]): The project source ID Example: 1. + created_at (Union[Unset, datetime.datetime]): The project source creation date Example: 2021-01-01 00:00:00. + updated_at (Union[Unset, datetime.datetime]): The project source update date Example: 2021-01-01 00:00:00. + type (Union[Unset, UpdateSourceResponse201DataType]): The project source type Example: sitemap. + settings (Union[Unset, UpdateSourceResponse201DataSettings]): The project source settings + pages (Union[Unset, None, List['UpdateSourceResponse201DataPagesItem']]): The project source pages + """ + + id: Union[Unset, int] = UNSET + created_at: Union[Unset, datetime.datetime] = UNSET + updated_at: Union[Unset, datetime.datetime] = UNSET + type: Union[Unset, str] = UNSET + settings: Union[Unset, "UpdateSourceResponse201DataSettings"] = UNSET + pages: Union[Unset, None, List["UpdateSourceResponse201DataPagesItem"]] = UNSET + additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + id = self.id + created_at: Union[Unset, str] = UNSET + if not isinstance(self.created_at, Unset): + created_at = self.created_at.isoformat() + + updated_at: Union[Unset, str] = UNSET + if not isinstance(self.updated_at, Unset): + updated_at = self.updated_at.isoformat() + + type: Union[Unset, str] = UNSET + if not isinstance(self.type, Unset): + type = self.type + + settings: Union[Unset, Dict[str, Any]] = UNSET + if not isinstance(self.settings, Unset): + settings = self.settings.to_dict() + + pages: Union[Unset, None, List[Dict[str, Any]]] = UNSET + if not isinstance(self.pages, Unset): + if self.pages is None: + pages = None + else: + pages = [] + for pages_item_data in self.pages: + pages_item = pages_item_data.to_dict() + + pages.append(pages_item) + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if id is not UNSET: + field_dict["id"] = id + if created_at is not UNSET: + field_dict["created_at"] = created_at + if updated_at is not UNSET: + field_dict["updated_at"] = updated_at + if type is not UNSET: + field_dict["type"] = type + if settings is not UNSET: + field_dict["settings"] = settings + if pages is not UNSET: + for index, field_value in enumerate(pages): + field_dict[f"pages[{index}]"] = field_value + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + from ..models.update_source_response_201_data_pages_item import UpdateSourceResponse201DataPagesItem + from ..models.update_source_response_201_data_settings import UpdateSourceResponse201DataSettings + + id = src_dict.get("id") + + _created_at = src_dict.get("created_at") + created_at: Union[Unset, datetime.datetime] + if isinstance(_created_at, Unset): + created_at = UNSET + else: + created_at = isoparse(_created_at) + + _updated_at = src_dict.get("updated_at") + updated_at: Union[Unset, datetime.datetime] + if isinstance(_updated_at, Unset): + updated_at = UNSET + else: + updated_at = isoparse(_updated_at) + + type = src_dict.get("type") + + _settings = src_dict.get("settings") + settings: Union[Unset, UpdateSourceResponse201DataSettings] + if isinstance(_settings, Unset): + settings = UNSET + else: + settings = UpdateSourceResponse201DataSettings.from_dict(_settings) + + pages = [] + _pages = src_dict.get("pages") + for pages_item_data in _pages or []: + pages_item = UpdateSourceResponse201DataPagesItem.from_dict(pages_item_data) + + pages.append(pages_item) + + update_source_response_201_data = cls( + id=id, + created_at=created_at, + updated_at=updated_at, + type=type, + settings=settings, + pages=pages, + ) + + update_source_response_201_data.additional_properties = src_dict + return update_source_response_201_data + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/customgpt-client/customgpt_client/models/update_source_response_201_data_pages_item.py b/customgpt-client/customgpt_client/models/update_source_response_201_data_pages_item.py new file mode 100644 index 0000000..d0bce37 --- /dev/null +++ b/customgpt-client/customgpt_client/models/update_source_response_201_data_pages_item.py @@ -0,0 +1,195 @@ +import datetime +from typing import Any, Dict, List, Type, TypeVar, Union + +import attr +from dateutil.parser import isoparse + +from ..types import UNSET, Unset + +T = TypeVar("T", bound="UpdateSourceResponse201DataPagesItem") + + +@attr.s(auto_attribs=True) +class UpdateSourceResponse201DataPagesItem: + r""" + Attributes: + id (Union[Unset, int]): Page ID Example: 1. + page_url (Union[Unset, str]): URL of the page or file Example: https://example.com. + page_url_hash (Union[Unset, str]): Hash of the URL of the page or file Example: + d41d8cd98f00b204e9800998ecf8427e. + project_id (Union[Unset, int]): Project ID Example: 1. + s3_path (Union[Unset, None, str]): This is the path where the page is stored in S3.\nNote: This is omitted in + the response if the page is not a file Example: project-1/page-1/file.pdf. + crawl_status (Union[Unset, UpdateSourceResponse201DataPagesItemCrawlStatus]): Crawl status of the page Default: + UpdateSourceResponse201DataPagesItemCrawlStatus.QUEUED. Example: queued. + index_status (Union[Unset, UpdateSourceResponse201DataPagesItemIndexStatus]): Index status of the page Default: + UpdateSourceResponse201DataPagesItemIndexStatus.QUEUED. Example: queued. + is_file (Union[Unset, bool]): Whether the page is a file or not Example: True. + is_refreshable (Union[Unset, bool]): Whether the page can be refreshed or not Example: True. + is_file_kept (Union[Unset, bool]): Whether the file is kept after processing or not.\nNote: This is omitted in + the response if the page is not a file Default: True. Example: True. + filename (Union[Unset, None, str]): Filename of the page.\nNote: This is omitted in the response if the page is + not a file Example: file.pdf. + filesize (Union[Unset, None, int]): Filesize of the page.\nNote: This is omitted in the response if the page is + not a file Example: 100. + created_at (Union[Unset, datetime.datetime]): Date and time when the page was created Example: 2021-01-01 + 00:00:00. + updated_at (Union[Unset, datetime.datetime]): Date and time when the page was updated Example: 2021-01-01 + 00:00:00. + """ + + id: Union[Unset, int] = UNSET + page_url: Union[Unset, str] = UNSET + page_url_hash: Union[Unset, str] = UNSET + project_id: Union[Unset, int] = UNSET + s3_path: Union[Unset, None, str] = UNSET + crawl_status: Union[Unset, str] = UNSET + index_status: Union[Unset, str] = UNSET + is_file: Union[Unset, bool] = False + is_refreshable: Union[Unset, bool] = False + is_file_kept: Union[Unset, bool] = True + filename: Union[Unset, None, str] = UNSET + filesize: Union[Unset, None, int] = UNSET + created_at: Union[Unset, datetime.datetime] = UNSET + updated_at: Union[Unset, datetime.datetime] = UNSET + additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + id = self.id + page_url = self.page_url + page_url_hash = self.page_url_hash + project_id = self.project_id + s3_path = self.s3_path + crawl_status: Union[Unset, str] = UNSET + if not isinstance(self.crawl_status, Unset): + crawl_status = self.crawl_status + + index_status: Union[Unset, str] = UNSET + if not isinstance(self.index_status, Unset): + index_status = self.index_status + + is_file = True if self.is_file else False + + is_refreshable = True if self.is_refreshable else False + + is_file_kept = True if self.is_file_kept else False + + filename = self.filename + filesize = self.filesize + created_at: Union[Unset, str] = UNSET + if not isinstance(self.created_at, Unset): + created_at = self.created_at.isoformat() + + updated_at: Union[Unset, str] = UNSET + if not isinstance(self.updated_at, Unset): + updated_at = self.updated_at.isoformat() + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if id is not UNSET: + field_dict["id"] = id + if page_url is not UNSET: + field_dict["page_url"] = page_url + if page_url_hash is not UNSET: + field_dict["page_url_hash"] = page_url_hash + if project_id is not UNSET: + field_dict["project_id"] = project_id + if s3_path is not UNSET: + field_dict["s3_path"] = s3_path + if crawl_status is not UNSET: + field_dict["crawl_status"] = crawl_status + if index_status is not UNSET: + field_dict["index_status"] = index_status + if is_file is not UNSET: + field_dict["is_file"] = is_file + if is_refreshable is not UNSET: + field_dict["is_refreshable"] = is_refreshable + if is_file_kept is not UNSET: + field_dict["is_file_kept"] = is_file_kept + if filename is not UNSET: + field_dict["filename"] = filename + if filesize is not UNSET: + field_dict["filesize"] = filesize + if created_at is not UNSET: + field_dict["created_at"] = created_at + if updated_at is not UNSET: + field_dict["updated_at"] = updated_at + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + id = src_dict.get("id") + + page_url = src_dict.get("page_url") + + page_url_hash = src_dict.get("page_url_hash") + + project_id = src_dict.get("project_id") + + s3_path = src_dict.get("s3_path") + + crawl_status = src_dict.get("crawl_status") + + index_status = src_dict.get("index_status") + + is_file = src_dict.get("is_file") + + is_refreshable = src_dict.get("is_refreshable") + + is_file_kept = src_dict.get("is_file_kept") + + filename = src_dict.get("filename") + + filesize = src_dict.get("filesize") + + _created_at = src_dict.get("created_at") + created_at: Union[Unset, datetime.datetime] + if isinstance(_created_at, Unset): + created_at = UNSET + else: + created_at = isoparse(_created_at) + + _updated_at = src_dict.get("updated_at") + updated_at: Union[Unset, datetime.datetime] + if isinstance(_updated_at, Unset): + updated_at = UNSET + else: + updated_at = isoparse(_updated_at) + + update_source_response_201_data_pages_item = cls( + id=id, + page_url=page_url, + page_url_hash=page_url_hash, + project_id=project_id, + s3_path=s3_path, + crawl_status=crawl_status, + index_status=index_status, + is_file=is_file, + is_refreshable=is_refreshable, + is_file_kept=is_file_kept, + filename=filename, + filesize=filesize, + created_at=created_at, + updated_at=updated_at, + ) + + update_source_response_201_data_pages_item.additional_properties = src_dict + return update_source_response_201_data_pages_item + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/customgpt-client/customgpt_client/models/update_source_response_201_data_pages_item_crawl_status.py b/customgpt-client/customgpt_client/models/update_source_response_201_data_pages_item_crawl_status.py new file mode 100644 index 0000000..7b994db --- /dev/null +++ b/customgpt-client/customgpt_client/models/update_source_response_201_data_pages_item_crawl_status.py @@ -0,0 +1,12 @@ +from enum import Enum + + +class UpdateSourceResponse201DataPagesItemCrawlStatus(str, Enum): + FAILED = "failed" + LIMITED = "limited" + NA = "n/a" + OK = "ok" + QUEUED = "queued" + + def __str__(self) -> str: + return str(self.value) diff --git a/customgpt-client/customgpt_client/models/update_source_response_201_data_pages_item_index_status.py b/customgpt-client/customgpt_client/models/update_source_response_201_data_pages_item_index_status.py new file mode 100644 index 0000000..d9e9b59 --- /dev/null +++ b/customgpt-client/customgpt_client/models/update_source_response_201_data_pages_item_index_status.py @@ -0,0 +1,12 @@ +from enum import Enum + + +class UpdateSourceResponse201DataPagesItemIndexStatus(str, Enum): + FAILED = "failed" + LIMITED = "limited" + NA = "n/a" + OK = "ok" + QUEUED = "queued" + + def __str__(self) -> str: + return str(self.value) diff --git a/customgpt-client/customgpt_client/models/update_source_response_201_data_settings.py b/customgpt-client/customgpt_client/models/update_source_response_201_data_settings.py new file mode 100644 index 0000000..9310798 --- /dev/null +++ b/customgpt-client/customgpt_client/models/update_source_response_201_data_settings.py @@ -0,0 +1,113 @@ +from typing import Any, Dict, List, Type, TypeVar, Union + +import attr + +from ..types import UNSET, Unset + +T = TypeVar("T", bound="UpdateSourceResponse201DataSettings") + + +@attr.s(auto_attribs=True) +class UpdateSourceResponse201DataSettings: + """The project source settings + + Attributes: + executive_js (Union[Unset, bool]): Whether the project source should execute JavaScript Default: True. Example: + True. + data_refresh_frequency (Union[Unset, UpdateSourceResponse201DataSettingsDataRefreshFrequency]): The project + source data refresh frequency Default: UpdateSourceResponse201DataSettingsDataRefreshFrequency.NEVER. Example: + never. + create_new_pages (Union[Unset, bool]): Add new pages to project automatically during refresh project source + Default: True. Example: True. + remove_unexist_pages (Union[Unset, bool]): Remove pages from project automatically during refresh project source + Default: True. + refresh_existing_pages (Union[Unset, UpdateSourceResponse201DataSettingsRefreshExistingPages]): Refresh existing + page during refresh project source Default: UpdateSourceResponse201DataSettingsRefreshExistingPages.NEVER. + Example: never. + sitemap_path (Union[Unset, str]): The project source sitemap path Example: https://example.com/sitemap.xml. + """ + + executive_js: Union[Unset, bool] = True + data_refresh_frequency: Union[Unset, str] = UNSET + create_new_pages: Union[Unset, bool] = True + remove_unexist_pages: Union[Unset, bool] = True + refresh_existing_pages: Union[Unset, str] = UNSET + sitemap_path: Union[Unset, str] = UNSET + additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + executive_js = True if self.executive_js else False + + data_refresh_frequency: Union[Unset, str] = UNSET + if not isinstance(self.data_refresh_frequency, Unset): + data_refresh_frequency = self.data_refresh_frequency + + create_new_pages = True if self.create_new_pages else False + + remove_unexist_pages = True if self.remove_unexist_pages else False + + refresh_existing_pages: Union[Unset, str] = UNSET + if not isinstance(self.refresh_existing_pages, Unset): + refresh_existing_pages = self.refresh_existing_pages + + sitemap_path = self.sitemap_path + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if executive_js is not UNSET: + field_dict["executive_js"] = executive_js + if data_refresh_frequency is not UNSET: + field_dict["data_refresh_frequency"] = data_refresh_frequency + if create_new_pages is not UNSET: + field_dict["create_new_pages"] = create_new_pages + if remove_unexist_pages is not UNSET: + field_dict["remove_unexist_pages"] = remove_unexist_pages + if refresh_existing_pages is not UNSET: + field_dict["refresh_existing_pages"] = refresh_existing_pages + if sitemap_path is not UNSET: + field_dict["sitemap_path"] = sitemap_path + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + executive_js = src_dict.get("executive_js") + + data_refresh_frequency = src_dict.get("data_refresh_frequency") + + create_new_pages = src_dict.get("create_new_pages") + + remove_unexist_pages = src_dict.get("remove_unexist_pages") + + refresh_existing_pages = src_dict.get("refresh_existing_pages") + + sitemap_path = src_dict.get("sitemap_path") + + update_source_response_201_data_settings = cls( + executive_js=executive_js, + data_refresh_frequency=data_refresh_frequency, + create_new_pages=create_new_pages, + remove_unexist_pages=remove_unexist_pages, + refresh_existing_pages=refresh_existing_pages, + sitemap_path=sitemap_path, + ) + + update_source_response_201_data_settings.additional_properties = src_dict + return update_source_response_201_data_settings + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/customgpt-client/customgpt_client/models/update_source_response_201_data_settings_data_refresh_frequency.py b/customgpt-client/customgpt_client/models/update_source_response_201_data_settings_data_refresh_frequency.py new file mode 100644 index 0000000..fcaf691 --- /dev/null +++ b/customgpt-client/customgpt_client/models/update_source_response_201_data_settings_data_refresh_frequency.py @@ -0,0 +1,12 @@ +from enum import Enum + + +class UpdateSourceResponse201DataSettingsDataRefreshFrequency(str, Enum): + ADVANCED = "advanced" + DAILY = "daily" + MONTHLY = "monthly" + NEVER = "never" + WEEKLY = "weekly" + + def __str__(self) -> str: + return str(self.value) diff --git a/customgpt-client/customgpt_client/models/update_source_response_201_data_settings_refresh_existing_pages.py b/customgpt-client/customgpt_client/models/update_source_response_201_data_settings_refresh_existing_pages.py new file mode 100644 index 0000000..71824fd --- /dev/null +++ b/customgpt-client/customgpt_client/models/update_source_response_201_data_settings_refresh_existing_pages.py @@ -0,0 +1,10 @@ +from enum import Enum + + +class UpdateSourceResponse201DataSettingsRefreshExistingPages(str, Enum): + ALWAYS = "always" + IF_UPDATED = "if_updated" + NEVER = "never" + + def __str__(self) -> str: + return str(self.value) diff --git a/customgpt-client/customgpt_client/models/update_source_response_201_data_type.py b/customgpt-client/customgpt_client/models/update_source_response_201_data_type.py new file mode 100644 index 0000000..0bb62ea --- /dev/null +++ b/customgpt-client/customgpt_client/models/update_source_response_201_data_type.py @@ -0,0 +1,9 @@ +from enum import Enum + + +class UpdateSourceResponse201DataType(str, Enum): + SITEMAP = "sitemap" + UPLOAD = "upload" + + def __str__(self) -> str: + return str(self.value) diff --git a/customgpt-client/customgpt_client/models/update_source_response_201_status.py b/customgpt-client/customgpt_client/models/update_source_response_201_status.py new file mode 100644 index 0000000..5709e4e --- /dev/null +++ b/customgpt-client/customgpt_client/models/update_source_response_201_status.py @@ -0,0 +1,9 @@ +from enum import Enum + + +class UpdateSourceResponse201Status(str, Enum): + ERROR = "error" + SUCCESS = "success" + + def __str__(self) -> str: + return str(self.value) diff --git a/customgpt-client/customgpt_client/models/update_source_response_400.py b/customgpt-client/customgpt_client/models/update_source_response_400.py new file mode 100644 index 0000000..20fa686 --- /dev/null +++ b/customgpt-client/customgpt_client/models/update_source_response_400.py @@ -0,0 +1,88 @@ +from typing import TYPE_CHECKING, Any, Dict, List, Type, TypeVar, Union + +import attr + +from ..types import UNSET, Unset + +if TYPE_CHECKING: + from ..models.update_source_response_400_data import UpdateSourceResponse400Data + + +T = TypeVar("T", bound="UpdateSourceResponse400") + + +@attr.s(auto_attribs=True) +class UpdateSourceResponse400: + """ + Attributes: + status (Union[Unset, UpdateSourceResponse400Status]): The status of the response Example: error. + url (Union[Unset, str]): The URL of the request Example: https://app.customgpt.ai/api/v1/projects/1. + data (Union[Unset, UpdateSourceResponse400Data]): + """ + + status: Union[Unset, str] = UNSET + url: Union[Unset, str] = UNSET + data: Union[Unset, "UpdateSourceResponse400Data"] = UNSET + additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + status: Union[Unset, str] = UNSET + if not isinstance(self.status, Unset): + status = self.status + + url = self.url + data: Union[Unset, Dict[str, Any]] = UNSET + if not isinstance(self.data, Unset): + data = self.data.to_dict() + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if status is not UNSET: + field_dict["status"] = status + if url is not UNSET: + field_dict["url"] = url + if data is not UNSET: + field_dict["data"] = data + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + from ..models.update_source_response_400_data import UpdateSourceResponse400Data + + status = src_dict.get("status") + + url = src_dict.get("url") + + _data = src_dict.get("data") + data: Union[Unset, UpdateSourceResponse400Data] + if isinstance(_data, Unset): + data = UNSET + else: + data = UpdateSourceResponse400Data.from_dict(_data) + + update_source_response_400 = cls( + status=status, + url=url, + data=data, + ) + + update_source_response_400.additional_properties = src_dict + return update_source_response_400 + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/customgpt-client/customgpt_client/models/list_sources_response_400_data.py b/customgpt-client/customgpt_client/models/update_source_response_400_data.py similarity index 80% rename from customgpt-client/customgpt_client/models/list_sources_response_400_data.py rename to customgpt-client/customgpt_client/models/update_source_response_400_data.py index 6076a87..07ae619 100644 --- a/customgpt-client/customgpt_client/models/list_sources_response_400_data.py +++ b/customgpt-client/customgpt_client/models/update_source_response_400_data.py @@ -4,18 +4,18 @@ from ..types import UNSET, Unset -T = TypeVar("T", bound="ListSourcesResponse400Data") +T = TypeVar("T", bound="UpdateSourceResponse400Data") @attr.s(auto_attribs=True) -class ListSourcesResponse400Data: +class UpdateSourceResponse400Data: """ Attributes: - code (Union[Unset, ListSourcesResponse400DataCode]): The error status code Example: 400. + code (Union[Unset, UpdateSourceResponse400DataCode]): The error status code Example: 400. message (Union[Unset, str]): The error message Example: Project id must be integer. """ - code: Union[Unset, str] = "400" + code: Union[Unset, str] = UNSET message: Union[Unset, str] = UNSET additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) @@ -42,13 +42,13 @@ def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: message = src_dict.get("message") - list_sources_response_400_data = cls( + update_source_response_400_data = cls( code=code, message=message, ) - list_sources_response_400_data.additional_properties = src_dict - return list_sources_response_400_data + update_source_response_400_data.additional_properties = src_dict + return update_source_response_400_data @property def additional_keys(self) -> List[str]: diff --git a/customgpt-client/customgpt_client/models/update_source_response_400_data_code.py b/customgpt-client/customgpt_client/models/update_source_response_400_data_code.py new file mode 100644 index 0000000..01539d0 --- /dev/null +++ b/customgpt-client/customgpt_client/models/update_source_response_400_data_code.py @@ -0,0 +1,13 @@ +from enum import IntEnum + + +class UpdateSourceResponse400DataCode(IntEnum): + VALUE_400 = 400 + VALUE_401 = 401 + VALUE_403 = 403 + VALUE_404 = 404 + VALUE_500 = 500 + VALUE_503 = 503 + + def __str__(self) -> str: + return str(self.value) diff --git a/customgpt-client/customgpt_client/models/update_source_response_400_status.py b/customgpt-client/customgpt_client/models/update_source_response_400_status.py new file mode 100644 index 0000000..c9d1510 --- /dev/null +++ b/customgpt-client/customgpt_client/models/update_source_response_400_status.py @@ -0,0 +1,9 @@ +from enum import Enum + + +class UpdateSourceResponse400Status(str, Enum): + ERROR = "error" + SUCCESS = "success" + + def __str__(self) -> str: + return str(self.value) diff --git a/customgpt-client/customgpt_client/models/update_source_response_401.py b/customgpt-client/customgpt_client/models/update_source_response_401.py new file mode 100644 index 0000000..1e150aa --- /dev/null +++ b/customgpt-client/customgpt_client/models/update_source_response_401.py @@ -0,0 +1,88 @@ +from typing import TYPE_CHECKING, Any, Dict, List, Type, TypeVar, Union + +import attr + +from ..types import UNSET, Unset + +if TYPE_CHECKING: + from ..models.update_source_response_401_data import UpdateSourceResponse401Data + + +T = TypeVar("T", bound="UpdateSourceResponse401") + + +@attr.s(auto_attribs=True) +class UpdateSourceResponse401: + """ + Attributes: + status (Union[Unset, UpdateSourceResponse401Status]): The status of the response Example: error. + url (Union[Unset, str]): The URL of the request Example: https://app.customgpt.ai/api/v1/projects/1. + data (Union[Unset, UpdateSourceResponse401Data]): + """ + + status: Union[Unset, str] = UNSET + url: Union[Unset, str] = UNSET + data: Union[Unset, "UpdateSourceResponse401Data"] = UNSET + additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + status: Union[Unset, str] = UNSET + if not isinstance(self.status, Unset): + status = self.status + + url = self.url + data: Union[Unset, Dict[str, Any]] = UNSET + if not isinstance(self.data, Unset): + data = self.data.to_dict() + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if status is not UNSET: + field_dict["status"] = status + if url is not UNSET: + field_dict["url"] = url + if data is not UNSET: + field_dict["data"] = data + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + from ..models.update_source_response_401_data import UpdateSourceResponse401Data + + status = src_dict.get("status") + + url = src_dict.get("url") + + _data = src_dict.get("data") + data: Union[Unset, UpdateSourceResponse401Data] + if isinstance(_data, Unset): + data = UNSET + else: + data = UpdateSourceResponse401Data.from_dict(_data) + + update_source_response_401 = cls( + status=status, + url=url, + data=data, + ) + + update_source_response_401.additional_properties = src_dict + return update_source_response_401 + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/customgpt-client/customgpt_client/models/update_source_response_401_data.py b/customgpt-client/customgpt_client/models/update_source_response_401_data.py new file mode 100644 index 0000000..8e5ab26 --- /dev/null +++ b/customgpt-client/customgpt_client/models/update_source_response_401_data.py @@ -0,0 +1,67 @@ +from typing import Any, Dict, List, Type, TypeVar, Union + +import attr + +from ..types import UNSET, Unset + +T = TypeVar("T", bound="UpdateSourceResponse401Data") + + +@attr.s(auto_attribs=True) +class UpdateSourceResponse401Data: + """ + Attributes: + code (Union[Unset, UpdateSourceResponse401DataCode]): The error status code Example: 401. + message (Union[Unset, str]): Example: API Token is either missing or invalid. + """ + + code: Union[Unset, str] = UNSET + message: Union[Unset, str] = UNSET + additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + code: Union[Unset, int] = UNSET + if not isinstance(self.code, Unset): + code = self.code + + message = self.message + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if code is not UNSET: + field_dict["code"] = code + if message is not UNSET: + field_dict["message"] = message + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + code = src_dict.get("code") + + message = src_dict.get("message") + + update_source_response_401_data = cls( + code=code, + message=message, + ) + + update_source_response_401_data.additional_properties = src_dict + return update_source_response_401_data + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/customgpt-client/customgpt_client/models/update_source_response_401_data_code.py b/customgpt-client/customgpt_client/models/update_source_response_401_data_code.py new file mode 100644 index 0000000..c3b7c75 --- /dev/null +++ b/customgpt-client/customgpt_client/models/update_source_response_401_data_code.py @@ -0,0 +1,13 @@ +from enum import IntEnum + + +class UpdateSourceResponse401DataCode(IntEnum): + VALUE_400 = 400 + VALUE_401 = 401 + VALUE_403 = 403 + VALUE_404 = 404 + VALUE_500 = 500 + VALUE_503 = 503 + + def __str__(self) -> str: + return str(self.value) diff --git a/customgpt-client/customgpt_client/models/update_source_response_401_status.py b/customgpt-client/customgpt_client/models/update_source_response_401_status.py new file mode 100644 index 0000000..2c328ea --- /dev/null +++ b/customgpt-client/customgpt_client/models/update_source_response_401_status.py @@ -0,0 +1,9 @@ +from enum import Enum + + +class UpdateSourceResponse401Status(str, Enum): + ERROR = "error" + SUCCESS = "success" + + def __str__(self) -> str: + return str(self.value) diff --git a/customgpt-client/customgpt_client/models/update_source_response_404.py b/customgpt-client/customgpt_client/models/update_source_response_404.py new file mode 100644 index 0000000..97cf606 --- /dev/null +++ b/customgpt-client/customgpt_client/models/update_source_response_404.py @@ -0,0 +1,88 @@ +from typing import TYPE_CHECKING, Any, Dict, List, Type, TypeVar, Union + +import attr + +from ..types import UNSET, Unset + +if TYPE_CHECKING: + from ..models.update_source_response_404_data import UpdateSourceResponse404Data + + +T = TypeVar("T", bound="UpdateSourceResponse404") + + +@attr.s(auto_attribs=True) +class UpdateSourceResponse404: + """ + Attributes: + status (Union[Unset, UpdateSourceResponse404Status]): The status of the response Example: error. + url (Union[Unset, str]): The URL of the request Example: https://app.customgpt.ai/api/v1/projects/1. + data (Union[Unset, UpdateSourceResponse404Data]): + """ + + status: Union[Unset, str] = UNSET + url: Union[Unset, str] = UNSET + data: Union[Unset, "UpdateSourceResponse404Data"] = UNSET + additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + status: Union[Unset, str] = UNSET + if not isinstance(self.status, Unset): + status = self.status + + url = self.url + data: Union[Unset, Dict[str, Any]] = UNSET + if not isinstance(self.data, Unset): + data = self.data.to_dict() + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if status is not UNSET: + field_dict["status"] = status + if url is not UNSET: + field_dict["url"] = url + if data is not UNSET: + field_dict["data"] = data + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + from ..models.update_source_response_404_data import UpdateSourceResponse404Data + + status = src_dict.get("status") + + url = src_dict.get("url") + + _data = src_dict.get("data") + data: Union[Unset, UpdateSourceResponse404Data] + if isinstance(_data, Unset): + data = UNSET + else: + data = UpdateSourceResponse404Data.from_dict(_data) + + update_source_response_404 = cls( + status=status, + url=url, + data=data, + ) + + update_source_response_404.additional_properties = src_dict + return update_source_response_404 + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/customgpt-client/customgpt_client/models/update_source_response_404_data.py b/customgpt-client/customgpt_client/models/update_source_response_404_data.py new file mode 100644 index 0000000..5afb1a1 --- /dev/null +++ b/customgpt-client/customgpt_client/models/update_source_response_404_data.py @@ -0,0 +1,70 @@ +from typing import Any, Dict, List, Type, TypeVar, Union + +import attr + +from ..types import UNSET, Unset + +T = TypeVar("T", bound="UpdateSourceResponse404Data") + + +@attr.s(auto_attribs=True) +class UpdateSourceResponse404Data: + """ + Attributes: + code (Union[Unset, UpdateSourceResponse404DataCode]): The error status code Example: 404. + message (Union[Unset, UpdateSourceResponse404DataMessage]): The error message Example: Project source with id 1 + not found. + """ + + code: Union[Unset, str] = UNSET + message: Union[Unset, str] = UNSET + additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + code: Union[Unset, int] = UNSET + if not isinstance(self.code, Unset): + code = self.code + + message: Union[Unset, str] = UNSET + if not isinstance(self.message, Unset): + message = self.message + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if code is not UNSET: + field_dict["code"] = code + if message is not UNSET: + field_dict["message"] = message + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + code = src_dict.get("code") + + message = src_dict.get("message") + + update_source_response_404_data = cls( + code=code, + message=message, + ) + + update_source_response_404_data.additional_properties = src_dict + return update_source_response_404_data + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/customgpt-client/customgpt_client/models/update_source_response_404_data_code.py b/customgpt-client/customgpt_client/models/update_source_response_404_data_code.py new file mode 100644 index 0000000..d48f374 --- /dev/null +++ b/customgpt-client/customgpt_client/models/update_source_response_404_data_code.py @@ -0,0 +1,13 @@ +from enum import IntEnum + + +class UpdateSourceResponse404DataCode(IntEnum): + VALUE_400 = 400 + VALUE_401 = 401 + VALUE_403 = 403 + VALUE_404 = 404 + VALUE_500 = 500 + VALUE_503 = 503 + + def __str__(self) -> str: + return str(self.value) diff --git a/customgpt-client/customgpt_client/models/update_source_response_404_data_message.py b/customgpt-client/customgpt_client/models/update_source_response_404_data_message.py new file mode 100644 index 0000000..3398fc8 --- /dev/null +++ b/customgpt-client/customgpt_client/models/update_source_response_404_data_message.py @@ -0,0 +1,9 @@ +from enum import Enum + + +class UpdateSourceResponse404DataMessage(str, Enum): + PROJECT_SOURCE_ID_IS_REQUIRED = "Project source id is required" + PROJECT_SOURCE_WITH_ID_SOURCEID_NOT_FOUND = "Project source with id {sourceId} not found" + + def __str__(self) -> str: + return str(self.value) diff --git a/customgpt-client/customgpt_client/models/update_source_response_404_status.py b/customgpt-client/customgpt_client/models/update_source_response_404_status.py new file mode 100644 index 0000000..6b40c4a --- /dev/null +++ b/customgpt-client/customgpt_client/models/update_source_response_404_status.py @@ -0,0 +1,9 @@ +from enum import Enum + + +class UpdateSourceResponse404Status(str, Enum): + ERROR = "error" + SUCCESS = "success" + + def __str__(self) -> str: + return str(self.value) diff --git a/customgpt-client/customgpt_client/models/update_source_response_500.py b/customgpt-client/customgpt_client/models/update_source_response_500.py new file mode 100644 index 0000000..a5d5979 --- /dev/null +++ b/customgpt-client/customgpt_client/models/update_source_response_500.py @@ -0,0 +1,88 @@ +from typing import TYPE_CHECKING, Any, Dict, List, Type, TypeVar, Union + +import attr + +from ..types import UNSET, Unset + +if TYPE_CHECKING: + from ..models.update_source_response_500_data import UpdateSourceResponse500Data + + +T = TypeVar("T", bound="UpdateSourceResponse500") + + +@attr.s(auto_attribs=True) +class UpdateSourceResponse500: + """ + Attributes: + status (Union[Unset, UpdateSourceResponse500Status]): The status of the response Example: error. + url (Union[Unset, str]): The URL of the request Example: https://app.customgpt.ai/api/v1/projects/1. + data (Union[Unset, UpdateSourceResponse500Data]): + """ + + status: Union[Unset, str] = UNSET + url: Union[Unset, str] = UNSET + data: Union[Unset, "UpdateSourceResponse500Data"] = UNSET + additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + status: Union[Unset, str] = UNSET + if not isinstance(self.status, Unset): + status = self.status + + url = self.url + data: Union[Unset, Dict[str, Any]] = UNSET + if not isinstance(self.data, Unset): + data = self.data.to_dict() + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if status is not UNSET: + field_dict["status"] = status + if url is not UNSET: + field_dict["url"] = url + if data is not UNSET: + field_dict["data"] = data + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + from ..models.update_source_response_500_data import UpdateSourceResponse500Data + + status = src_dict.get("status") + + url = src_dict.get("url") + + _data = src_dict.get("data") + data: Union[Unset, UpdateSourceResponse500Data] + if isinstance(_data, Unset): + data = UNSET + else: + data = UpdateSourceResponse500Data.from_dict(_data) + + update_source_response_500 = cls( + status=status, + url=url, + data=data, + ) + + update_source_response_500.additional_properties = src_dict + return update_source_response_500 + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/customgpt-client/customgpt_client/models/get_settings_response_500_data.py b/customgpt-client/customgpt_client/models/update_source_response_500_data.py similarity index 80% rename from customgpt-client/customgpt_client/models/get_settings_response_500_data.py rename to customgpt-client/customgpt_client/models/update_source_response_500_data.py index e0b6a2b..74dcb17 100644 --- a/customgpt-client/customgpt_client/models/get_settings_response_500_data.py +++ b/customgpt-client/customgpt_client/models/update_source_response_500_data.py @@ -4,18 +4,18 @@ from ..types import UNSET, Unset -T = TypeVar("T", bound="GetSettingsResponse500Data") +T = TypeVar("T", bound="UpdateSourceResponse500Data") @attr.s(auto_attribs=True) -class GetSettingsResponse500Data: +class UpdateSourceResponse500Data: """ Attributes: - code (Union[Unset, GetSettingsResponse500DataCode]): The error status code Example: 500. + code (Union[Unset, UpdateSourceResponse500DataCode]): The error status code Example: 500. message (Union[Unset, str]): Example: Internal Server Error. """ - code: Union[Unset, str] = "500" + code: Union[Unset, str] = UNSET message: Union[Unset, str] = UNSET additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) @@ -42,13 +42,13 @@ def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: message = src_dict.get("message") - get_settings_response_500_data = cls( + update_source_response_500_data = cls( code=code, message=message, ) - get_settings_response_500_data.additional_properties = src_dict - return get_settings_response_500_data + update_source_response_500_data.additional_properties = src_dict + return update_source_response_500_data @property def additional_keys(self) -> List[str]: diff --git a/customgpt-client/customgpt_client/models/update_source_response_500_data_code.py b/customgpt-client/customgpt_client/models/update_source_response_500_data_code.py new file mode 100644 index 0000000..e385f4e --- /dev/null +++ b/customgpt-client/customgpt_client/models/update_source_response_500_data_code.py @@ -0,0 +1,13 @@ +from enum import IntEnum + + +class UpdateSourceResponse500DataCode(IntEnum): + VALUE_400 = 400 + VALUE_401 = 401 + VALUE_403 = 403 + VALUE_404 = 404 + VALUE_500 = 500 + VALUE_503 = 503 + + def __str__(self) -> str: + return str(self.value) diff --git a/customgpt-client/customgpt_client/models/update_source_response_500_status.py b/customgpt-client/customgpt_client/models/update_source_response_500_status.py new file mode 100644 index 0000000..87abd24 --- /dev/null +++ b/customgpt-client/customgpt_client/models/update_source_response_500_status.py @@ -0,0 +1,9 @@ +from enum import Enum + + +class UpdateSourceResponse500Status(str, Enum): + ERROR = "error" + SUCCESS = "success" + + def __str__(self) -> str: + return str(self.value) diff --git a/customgpt-client/customgpt_client/models/update_user_response_200.py b/customgpt-client/customgpt_client/models/update_user_response_200.py index 9ca06b9..b4765d8 100644 --- a/customgpt-client/customgpt_client/models/update_user_response_200.py +++ b/customgpt-client/customgpt_client/models/update_user_response_200.py @@ -19,7 +19,7 @@ class UpdateUserResponse200: data (Union[Unset, UpdateUserResponse200Data]): """ - status: Union[Unset, str] = "success" + status: Union[Unset, str] = UNSET data: Union[Unset, "UpdateUserResponse200Data"] = UNSET additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) diff --git a/customgpt-client/customgpt_client/models/update_user_response_200_data.py b/customgpt-client/customgpt_client/models/update_user_response_200_data.py index 93fa4c9..e68842f 100644 --- a/customgpt-client/customgpt_client/models/update_user_response_200_data.py +++ b/customgpt-client/customgpt_client/models/update_user_response_200_data.py @@ -16,6 +16,7 @@ class UpdateUserResponse200Data: created_at (Union[Unset, datetime.datetime]): When was this user created? Example: 2023-04-30 16:43:53. email (Union[Unset, str]): User email Example: user@domain.com. id (Union[Unset, int]): User ID Example: 1. + current_team_id (Union[Unset, int]): User currently active team ID Example: 1. name (Union[Unset, str]): User name Example: John Doe. profile_photo_url (Union[Unset, str]): User profile photo URL Example: https://app.customgpt.ai/user/1/profile_photo_url. @@ -25,6 +26,7 @@ class UpdateUserResponse200Data: created_at: Union[Unset, datetime.datetime] = UNSET email: Union[Unset, str] = UNSET id: Union[Unset, int] = UNSET + current_team_id: Union[Unset, int] = UNSET name: Union[Unset, str] = UNSET profile_photo_url: Union[Unset, str] = UNSET updated_at: Union[Unset, datetime.datetime] = UNSET @@ -37,6 +39,7 @@ def to_dict(self) -> Dict[str, Any]: email = self.email id = self.id + current_team_id = self.current_team_id name = self.name profile_photo_url = self.profile_photo_url updated_at: Union[Unset, str] = UNSET @@ -52,6 +55,8 @@ def to_dict(self) -> Dict[str, Any]: field_dict["email"] = email if id is not UNSET: field_dict["id"] = id + if current_team_id is not UNSET: + field_dict["current_team_id"] = current_team_id if name is not UNSET: field_dict["name"] = name if profile_photo_url is not UNSET: @@ -74,6 +79,8 @@ def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: id = src_dict.get("id") + current_team_id = src_dict.get("current_team_id") + name = src_dict.get("name") profile_photo_url = src_dict.get("profile_photo_url") @@ -89,6 +96,7 @@ def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: created_at=created_at, email=email, id=id, + current_team_id=current_team_id, name=name, profile_photo_url=profile_photo_url, updated_at=updated_at, diff --git a/customgpt-client/customgpt_client/models/update_user_response_401.py b/customgpt-client/customgpt_client/models/update_user_response_401.py index f9dc913..2e07f17 100644 --- a/customgpt-client/customgpt_client/models/update_user_response_401.py +++ b/customgpt-client/customgpt_client/models/update_user_response_401.py @@ -20,7 +20,7 @@ class UpdateUserResponse401: data (Union[Unset, UpdateUserResponse401Data]): """ - status: Union[Unset, str] = "error" + status: Union[Unset, str] = UNSET url: Union[Unset, str] = UNSET data: Union[Unset, "UpdateUserResponse401Data"] = UNSET additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) diff --git a/customgpt-client/customgpt_client/models/update_user_response_401_data.py b/customgpt-client/customgpt_client/models/update_user_response_401_data.py index 1e6f328..de4fae5 100644 --- a/customgpt-client/customgpt_client/models/update_user_response_401_data.py +++ b/customgpt-client/customgpt_client/models/update_user_response_401_data.py @@ -15,7 +15,7 @@ class UpdateUserResponse401Data: message (Union[Unset, str]): Example: API Token is either missing or invalid. """ - code: Union[Unset, str] = "401" + code: Union[Unset, str] = UNSET message: Union[Unset, str] = UNSET additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) diff --git a/customgpt-client/customgpt_client/models/update_user_response_500.py b/customgpt-client/customgpt_client/models/update_user_response_500.py index fcfff30..c089def 100644 --- a/customgpt-client/customgpt_client/models/update_user_response_500.py +++ b/customgpt-client/customgpt_client/models/update_user_response_500.py @@ -20,7 +20,7 @@ class UpdateUserResponse500: data (Union[Unset, UpdateUserResponse500Data]): """ - status: Union[Unset, str] = "error" + status: Union[Unset, str] = UNSET url: Union[Unset, str] = UNSET data: Union[Unset, "UpdateUserResponse500Data"] = UNSET additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) diff --git a/customgpt-client/customgpt_client/models/update_user_response_500_data.py b/customgpt-client/customgpt_client/models/update_user_response_500_data.py index 1f66f2d..a74bd2c 100644 --- a/customgpt-client/customgpt_client/models/update_user_response_500_data.py +++ b/customgpt-client/customgpt_client/models/update_user_response_500_data.py @@ -15,7 +15,7 @@ class UpdateUserResponse500Data: message (Union[Unset, str]): Example: Internal Server Error. """ - code: Union[Unset, str] = "500" + code: Union[Unset, str] = UNSET message: Union[Unset, str] = UNSET additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) diff --git a/customgpt-client/customgpt_client/models/user.py b/customgpt-client/customgpt_client/models/user.py index dd1754a..5aa9a4b 100644 --- a/customgpt-client/customgpt_client/models/user.py +++ b/customgpt-client/customgpt_client/models/user.py @@ -16,6 +16,7 @@ class User: created_at (Union[Unset, datetime.datetime]): When was this user created? Example: 2023-04-30 16:43:53. email (Union[Unset, str]): User email Example: user@domain.com. id (Union[Unset, int]): User ID Example: 1. + current_team_id (Union[Unset, int]): User currently active team ID Example: 1. name (Union[Unset, str]): User name Example: John Doe. profile_photo_url (Union[Unset, str]): User profile photo URL Example: https://app.customgpt.ai/user/1/profile_photo_url. @@ -25,6 +26,7 @@ class User: created_at: Union[Unset, datetime.datetime] = UNSET email: Union[Unset, str] = UNSET id: Union[Unset, int] = UNSET + current_team_id: Union[Unset, int] = UNSET name: Union[Unset, str] = UNSET profile_photo_url: Union[Unset, str] = UNSET updated_at: Union[Unset, datetime.datetime] = UNSET @@ -37,6 +39,7 @@ def to_dict(self) -> Dict[str, Any]: email = self.email id = self.id + current_team_id = self.current_team_id name = self.name profile_photo_url = self.profile_photo_url updated_at: Union[Unset, str] = UNSET @@ -52,6 +55,8 @@ def to_dict(self) -> Dict[str, Any]: field_dict["email"] = email if id is not UNSET: field_dict["id"] = id + if current_team_id is not UNSET: + field_dict["current_team_id"] = current_team_id if name is not UNSET: field_dict["name"] = name if profile_photo_url is not UNSET: @@ -74,6 +79,8 @@ def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: id = src_dict.get("id") + current_team_id = src_dict.get("current_team_id") + name = src_dict.get("name") profile_photo_url = src_dict.get("profile_photo_url") @@ -89,6 +96,7 @@ def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: created_at=created_at, email=email, id=id, + current_team_id=current_team_id, name=name, profile_photo_url=profile_photo_url, updated_at=updated_at, diff --git a/customgpt-client/customgpt_client/types.py b/customgpt-client/customgpt_client/types.py index 599eeb9..f218269 100644 --- a/customgpt-client/customgpt_client/types.py +++ b/customgpt-client/customgpt_client/types.py @@ -1,4 +1,5 @@ """ Contains some shared types for properties """ + from http import HTTPStatus from typing import BinaryIO, Generic, Literal, MutableMapping, Optional, Tuple, TypeVar diff --git a/customgpt-client/pyproject.toml b/customgpt-client/pyproject.toml index c843b2e..6b94c6d 100644 --- a/customgpt-client/pyproject.toml +++ b/customgpt-client/pyproject.toml @@ -1,6 +1,6 @@ [tool.poetry] name = "customgpt-client" -version = "1.2.2" +version = "1.2.8" description = "A client library for accessing customgpt" authors = [] diff --git a/customgpt-client/tests/test_citations.py b/customgpt-client/tests/test_citations.py index 29700c8..8369686 100644 --- a/customgpt-client/tests/test_citations.py +++ b/customgpt-client/tests/test_citations.py @@ -15,10 +15,8 @@ def test_sync_citations(): sitemap_path="https://adorosario.github.io/small-sitemap.xml", ) response_create = response.parsed - project_id = response_create.data["id"] - response = CustomGPT.Conversation.create( - project_id=project_id, name="test_converation" - ) + project_id = response_create.data.id + response = CustomGPT.Conversation.create(project_id=project_id, name="test_converation") response_create = response.parsed session_id = response_create.data["session_id"] assert response_create.data["name"] == "test_converation" @@ -50,15 +48,13 @@ async def test_async_citations(): CustomGPT.base_url, CustomGPT.api_key = credentials() CustomGPT.timeout = 10000 - response = await CustomGPT.Project.acreate( + response = CustomGPT.Project.create( project_name="test", sitemap_path="https://adorosario.github.io/small-sitemap.xml", ) response_create = response.parsed project_id = response_create.data.id - response = await CustomGPT.Conversation.acreate( - project_id=project_id, name="test_converation" - ) + response = await CustomGPT.Conversation.acreate(project_id=project_id, name="test_converation") response_create = response.parsed session_id = response_create.data.session_id assert response_create.data.name == "test_converation" @@ -81,7 +77,5 @@ async def test_async_citations(): ) citation_id = response.parsed.data.citations[0] - response = await CustomGPT.Citation.aget( - project_id=project_id, citation_id=citation_id - ) + response = await CustomGPT.Citation.aget(project_id=project_id, citation_id=citation_id) assert response.status_code == 200 diff --git a/customgpt-client/tests/test_conversations.py b/customgpt-client/tests/test_conversations.py index 8fdaa22..314e95c 100644 --- a/customgpt-client/tests/test_conversations.py +++ b/customgpt-client/tests/test_conversations.py @@ -8,7 +8,6 @@ def test_sync_conversations(): CustomGPT.base_url, CustomGPT.api_key = credentials() - CustomGPT.timeout = 10000 response = CustomGPT.Project.create( project_name="test", @@ -16,15 +15,13 @@ def test_sync_conversations(): ) response_create = response.parsed project_id = response_create.data.id - response = CustomGPT.Conversation.create( - project_id=project_id, name="test_converation" - ) + response = CustomGPT.Conversation.create(project_id=project_id, name="test_converation") response_create = response.parsed session_id = response_create.data.session_id assert response_create.data.name == "test_converation" assert response.status_code == 201 - # # wait for chat active + # wait for chat active is_chat_active = 0 json_project = {} while not is_chat_active: @@ -52,13 +49,11 @@ def test_sync_conversations(): assert response.status_code == 200 # Fetch Created project messages - response = CustomGPT.Conversation.messages( - project_id=project_id, session_id=session_id - ) + response = CustomGPT.Conversation.messages(project_id=project_id, session_id=session_id) response_messages = response.parsed assert response.status_code == 200 assert len(response_messages.data.messages.data) > 0 - # send message to conversation stream true + response = CustomGPT.Conversation.send( project_id=project_id, session_id=session_id, @@ -79,9 +74,7 @@ def test_sync_conversations(): assert response.status_code == 200 # Delete the project - response = CustomGPT.Conversation.delete( - project_id=project_id, session_id=session_id - ) + response = CustomGPT.Conversation.delete(project_id=project_id, session_id=session_id) assert response.status_code == 200 @@ -90,15 +83,13 @@ async def test_async_conversations(): CustomGPT.base_url, CustomGPT.api_key = credentials() CustomGPT.timeout = 10000 - response = await CustomGPT.Project.acreate( + response = CustomGPT.Project.create( project_name="test", sitemap_path="https://adorosario.github.io/small-sitemap.xml", ) response_create = response.parsed project_id = response_create.data.id - response = await CustomGPT.Conversation.acreate( - project_id=project_id, name="test_converation" - ) + response = await CustomGPT.Conversation.acreate(project_id=project_id, name="test_converation") response_create = response.parsed session_id = response_create.data.session_id assert response_create.data.name == "test_converation" @@ -137,13 +128,9 @@ async def test_async_conversations(): assert response.status_code == 200 # Fetch Created project messages - response = await CustomGPT.Conversation.amessages( - project_id=project_id, session_id=session_id - ) + response = await CustomGPT.Conversation.amessages(project_id=project_id, session_id=session_id) assert response.status_code == 200 # Delete the project - response = await CustomGPT.Conversation.adelete( - project_id=project_id, session_id=session_id - ) + response = await CustomGPT.Conversation.adelete(project_id=project_id, session_id=session_id) assert response.status_code == 200 diff --git a/customgpt-client/tests/test_limits.py b/customgpt-client/tests/test_limits.py new file mode 100644 index 0000000..fd2347c --- /dev/null +++ b/customgpt-client/tests/test_limits.py @@ -0,0 +1,19 @@ +import pytest + +from customgpt_client import CustomGPT +from tests.credentials import credentials + + +def test_sync_limits(): + CustomGPT.base_url, CustomGPT.api_key = credentials() + CustomGPT.timeout = 10000 + response = CustomGPT.Limit.get() + assert response.status_code == 200 + +@pytest.mark.asyncio +async def test_async_limits(): + CustomGPT.base_url, CustomGPT.api_key = credentials() + CustomGPT.timeout = 10000 + response = await CustomGPT.Limit.aget() + assert response.status_code == 200 + diff --git a/customgpt-client/tests/test_page_metadata.py b/customgpt-client/tests/test_page_metadata.py index 71e2a2e..2b68364 100644 --- a/customgpt-client/tests/test_page_metadata.py +++ b/customgpt-client/tests/test_page_metadata.py @@ -12,7 +12,7 @@ def test_sync_page_metadata(): sitemap_path="https://adorosario.github.io/small-sitemap.xml", ) response_create = response.parsed - project_id = response_create.data["id"] + project_id = response_create.data.id response = CustomGPT.Page.get(project_id=project_id) assert response.status_code == 200 response_page = response.parsed @@ -21,9 +21,7 @@ def test_sync_page_metadata(): metadata = CustomGPT.PageMetadata.get(project_id=project_id, page_id=page_id) assert metadata.status_code == 200 title = metadata.parsed.data.title - update_metadata = CustomGPT.PageMetadata.update( - project_id=project_id, page_id=page_id, title="test" - ) + update_metadata = CustomGPT.PageMetadata.update(project_id=project_id, page_id=page_id, title="test") assert update_metadata.status_code == 200 assert update_metadata.parsed.data.title != title response = CustomGPT.Page.delete(project_id=project_id, page_id=page_id) @@ -39,20 +37,16 @@ async def test_async_page_metadata(): sitemap_path="https://adorosario.github.io/small-sitemap.xml", ) response_create = response.parsed - project_id = response_create.data["id"] + project_id = response_create.data.id response = await CustomGPT.Page.aget(project_id=project_id) assert response.status_code == 200 response_page = response.parsed if len(response_page.data.pages.data) > 0: page_id = response_page.data.pages.data[0].id - metadata = await CustomGPT.PageMetadata.aget( - project_id=project_id, page_id=page_id - ) + metadata = await CustomGPT.PageMetadata.aget(project_id=project_id, page_id=page_id) assert metadata.status_code == 200 title = metadata.parsed.data.title - update_metadata = await CustomGPT.PageMetadata.aupdate( - project_id=project_id, page_id=page_id, title="test" - ) + update_metadata = await CustomGPT.PageMetadata.aupdate(project_id=project_id, page_id=page_id, title="test") assert update_metadata.status_code == 200 assert update_metadata.parsed.data.title != title response = await CustomGPT.Page.adelete(project_id=project_id, page_id=page_id) diff --git a/customgpt-client/tests/test_pages.py b/customgpt-client/tests/test_pages.py index 7aa83d9..e7e09c9 100644 --- a/customgpt-client/tests/test_pages.py +++ b/customgpt-client/tests/test_pages.py @@ -12,7 +12,7 @@ def test_sync_pages(): sitemap_path="https://adorosario.github.io/small-sitemap.xml", ) response_create = response.parsed - project_id = response_create.data["id"] + project_id = response_create.data.id response = CustomGPT.Page.get(project_id=project_id) assert response.status_code == 200 response_page = response.parsed diff --git a/customgpt-client/tests/test_plugins.py b/customgpt-client/tests/test_plugins.py index 565aebd..b99edd6 100644 --- a/customgpt-client/tests/test_plugins.py +++ b/customgpt-client/tests/test_plugins.py @@ -15,9 +15,9 @@ def test_sync_plugins(): project_name="test", sitemap_path="https://adorosario.github.io/small-sitemap.xml", ) - response_project = response.parsed + response_create = response.parsed + project_id = response_create.data.id assert response.status_code == 201 - project_id = response_project.data.id json_project = {} is_chat_active = 0 while not is_chat_active: @@ -68,9 +68,9 @@ async def test_async_plugins(): project_name="test", sitemap_path="https://adorosario.github.io/small-sitemap.xml", ) - response_project = response.parsed + response_create = response.parsed + project_id = response_create.data.id assert response.status_code == 201 - project_id = response_project.data.id json_project = {} is_chat_active = 0 while not is_chat_active: diff --git a/customgpt-client/tests/test_project_settings.py b/customgpt-client/tests/test_project_settings.py index 15edfed..5582da3 100644 --- a/customgpt-client/tests/test_project_settings.py +++ b/customgpt-client/tests/test_project_settings.py @@ -7,7 +7,6 @@ def test_sync_project_settings(): CustomGPT.base_url, CustomGPT.api_key = credentials() - CustomGPT.timeout = 10000 response = CustomGPT.Project.create( project_name="test", sitemap_path="https://adorosario.github.io/small-sitemap.xml", @@ -20,7 +19,7 @@ def test_sync_project_settings(): response_update = CustomGPT.ProjectSettings.update( project_id=project_id, default_prompt="Hello World", - example_questions=["Who are you?"], + example_questions=["Who are you?", "Hello?"], response_source="default", chatbot_msg_lang="ur", persona_instructions="You Are test chatbot created from a pytest", @@ -49,7 +48,7 @@ async def test_async_project_settings(): assert response.status_code == 200 response_update = await CustomGPT.ProjectSettings.aupdate( project_id=project_id, - default_prompt="Hello World", + default_prompt="Hello", example_questions=["Who are you?"], response_source="default", chatbot_msg_lang="ur", diff --git a/customgpt-client/tests/test_projects.py b/customgpt-client/tests/test_projects.py index fd6f4c4..bdf56cd 100644 --- a/customgpt-client/tests/test_projects.py +++ b/customgpt-client/tests/test_projects.py @@ -16,7 +16,7 @@ def test_sync_projects(): assert response.status_code == 201 response = CustomGPT.Project.update( - project_id=response.parsed.data.id, + project_id=response_create.data.id, project_name="test2", sitemap_path="https://adorosario.github.io/small-sitemap.xml", ) @@ -43,7 +43,7 @@ def test_sync_projects(): "query_credits_used", "total_queries", "total_words_indexed", - "index_credits_used", + "total_storage_credits_used", ] ) response = CustomGPT.Project.list() @@ -53,16 +53,12 @@ def test_sync_projects(): response = CustomGPT.Project.delete(project_id=response_create.data.id) assert response.status_code == 200 - -def test_error_projects(): - CustomGPT.base_url, CustomGPT.api_key = credentials() - response = CustomGPT.Project.update( - project_id=12334, + project_id=response_create.data.id, project_name="test2", sitemap_path="https://adorosario.github.io/small-sitemap.xml", ) - assert response.status_code == 403 + assert response.status_code == 404 @pytest.mark.asyncio @@ -106,7 +102,7 @@ async def test_async_projects(): "query_credits_used", "total_queries", "total_words_indexed", - "index_credits_used", + "total_storage_credits_used", ] ) response = await CustomGPT.Project.alist() diff --git a/customgpt-client/tests/test_reports_analytics.py b/customgpt-client/tests/test_reports_analytics.py new file mode 100644 index 0000000..14c8685 --- /dev/null +++ b/customgpt-client/tests/test_reports_analytics.py @@ -0,0 +1,95 @@ +import time + +import pytest + +from customgpt_client import CustomGPT +from tests.credentials import credentials + + +def test_sync_reports(): + CustomGPT.base_url, CustomGPT.api_key = credentials() + + response = CustomGPT.Project.create( + project_name="test", + sitemap_path="https://adorosario.github.io/small-sitemap.xml", + ) + response_create = response.parsed + project_id = response_create.data.id + response = CustomGPT.Conversation.create(project_id=project_id, name="test_converation") + response_create = response.parsed + session_id = response_create.data["session_id"] + assert response_create.data["name"] == "test_converation" + assert response.status_code == 201 + + # wait for chat active + is_chat_active = 0 + json_project = {} + while not is_chat_active: + response_project = CustomGPT.Project.get(project_id=project_id) + json_project = response_project.parsed + is_chat_active = json_project.data.is_chat_active + time.sleep(5) + + assert json_project.data.is_chat_active == 1 + response = CustomGPT.Conversation.send( + project_id=project_id, + session_id=session_id, + prompt="Who is Tom? I need a short answer in 10 words.", + ) + assert response.status_code == 200 + response = CustomGPT.ReportsAnalytics.analysis(project_id=project_id, filters=["sources"]) + assert response.status_code == 200 + + response = CustomGPT.ReportsAnalytics.conversations(project_id=project_id, filters=["sources"]) + assert response.status_code == 200 + + response = CustomGPT.ReportsAnalytics.queries(project_id=project_id, filters=["sources"]) + assert response.status_code == 200 + + response = CustomGPT.ReportsAnalytics.traffic(project_id=project_id, filters=["sources"]) + assert response.status_code == 200 + + +@pytest.mark.asyncio +async def test_async_reports(): + CustomGPT.base_url, CustomGPT.api_key = credentials() + + response = CustomGPT.Project.create( + project_name="test", + sitemap_path="https://adorosario.github.io/small-sitemap.xml", + ) + response_create = response.parsed + project_id = response_create.data.id + response = await CustomGPT.Conversation.acreate(project_id=project_id, name="test_converation") + response_create = response.parsed + session_id = response_create.data.session_id + assert response_create.data.name == "test_converation" + assert response.status_code == 201 + + # wait for chat active + is_chat_active = 0 + json_project = {} + while not is_chat_active: + response_project = await CustomGPT.Project.aget(project_id=project_id) + json_project = response_project.parsed + is_chat_active = json_project.data.is_chat_active + time.sleep(5) + + assert json_project.data.is_chat_active == 1 + response = await CustomGPT.Conversation.asend( + project_id=project_id, + session_id=session_id, + prompt="Who is Tom? I need a short answer in 10 words.", + ) + assert response.status_code == 200 + response = await CustomGPT.ReportsAnalytics.aanalysis(project_id=project_id, filters=["sources"]) + assert response.status_code == 200 + + response = await CustomGPT.ReportsAnalytics.aconversations(project_id=project_id, filters=["sources"]) + assert response.status_code == 200 + + response = await CustomGPT.ReportsAnalytics.aqueries(project_id=project_id, filters=["sources"]) + assert response.status_code == 200 + + response = await CustomGPT.ReportsAnalytics.atraffic(project_id=project_id, filters=["sources"]) + assert response.status_code == 200 diff --git a/customgpt-client/tests/test_sources.py b/customgpt-client/tests/test_sources.py index c909aa4..9eeb340 100644 --- a/customgpt-client/tests/test_sources.py +++ b/customgpt-client/tests/test_sources.py @@ -19,6 +19,7 @@ def test_sync_sources(): sitemap_path="https://adorosario.github.io/small-sitemap.xml", ) response_create = response.parsed + project_id = response_create.data.id assert response_create.data.project_name == "test" assert response.status_code == 201 json_project = {} @@ -31,9 +32,7 @@ def test_sync_sources(): # Add new sitemap to project using source api. new_sitemap_path = "https://adorosario.github.io/small-sitemap.xml" - create_source = CustomGPT.Source.create( - project_id=project_id, sitemap_path=new_sitemap_path - ) + create_source = CustomGPT.Source.create(project_id=project_id, sitemap_path=new_sitemap_path) data = create_source.parsed.data assert data.type == "sitemap" assert create_source.status_code == 201 @@ -69,8 +68,7 @@ async def test_async_sources(): sitemap_path="https://adorosario.github.io/small-sitemap.xml", ) response_create = response.parsed - assert response_create.data.project_name == "test" - assert response.status_code == 201 + project_id = response_create.data.id json_project = {} is_chat_active = 0 while not is_chat_active: @@ -81,9 +79,7 @@ async def test_async_sources(): # Add new sitemap to project using source api. new_sitemap_path = "https://adorosario.github.io/small-sitemap.xml" - create_source = await CustomGPT.Source.acreate( - project_id=project_id, sitemap_path=new_sitemap_path - ) + create_source = await CustomGPT.Source.acreate(project_id=project_id, sitemap_path=new_sitemap_path) data = create_source.parsed.data assert data.type == "sitemap" assert create_source.status_code == 201 @@ -107,7 +103,5 @@ async def test_async_sources(): # # Delete Source source_id = data.sitemaps[0].id - delete_source = await CustomGPT.Source.adelete( - project_id=project_id, source_id=source_id - ) + delete_source = await CustomGPT.Source.adelete(project_id=project_id, source_id=source_id) assert delete_source.status_code == 200 diff --git a/customgpt-client/tests/test_users.py b/customgpt-client/tests/test_users.py index 3f6e9b2..458802a 100644 --- a/customgpt-client/tests/test_users.py +++ b/customgpt-client/tests/test_users.py @@ -7,12 +7,6 @@ def test_sync_users(): CustomGPT.base_url, CustomGPT.api_key = credentials() CustomGPT.timeout = 10000 - response = CustomGPT.Project.create( - project_name="test", - sitemap_path="https://adorosario.github.io/small-sitemap.xml", - ) - response_create = response.parsed - response_create.data.id response = CustomGPT.User.get() assert response.status_code == 200 response = CustomGPT.User.update(name="Hamza 2") @@ -35,12 +29,6 @@ def test_error_users(): async def test_async_users(): CustomGPT.base_url, CustomGPT.api_key = credentials() CustomGPT.timeout = 10000 - response = await CustomGPT.Project.acreate( - project_name="test", - sitemap_path="https://adorosario.github.io/small-sitemap.xml", - ) - response_create = response.parsed - response_create.data.id response = await CustomGPT.User.aget() assert response.status_code == 200 response = await CustomGPT.User.aupdate(name="Hamza 3") diff --git a/requirement.txt b/requirement.txt deleted file mode 100644 index cb1805f..0000000 --- a/requirement.txt +++ /dev/null @@ -1 +0,0 @@ -openapi-python-client diff --git a/requirements.txt b/requirements.txt new file mode 100644 index 0000000..716c594 --- /dev/null +++ b/requirements.txt @@ -0,0 +1,2 @@ +openapi-python-client==0.13.2 +pytest-asyncio diff --git a/templates/client.py.jinja b/templates/client.py.jinja index 0187cfb..7f42c5d 100644 --- a/templates/client.py.jinja +++ b/templates/client.py.jinja @@ -20,7 +20,9 @@ def set_client(): api_key = CustomGPT.api_key if hasattr(CustomGPT, 'api_key') else "" base_url = CustomGPT.base_url if hasattr(CustomGPT, 'base_url') else "https://app.customgpt.ai" timeout = CustomGPT.timeout if hasattr(CustomGPT, 'timeout') else 100.0 - return CustomGPT(api_key=api_key, base_url=base_url, timeout=timeout) + headers = CustomGPT.headers if hasattr(CustomGPT, 'headers') else {} + return CustomGPT(api_key=api_key, base_url=base_url, timeout=timeout, headers=headers) + def pluck_data(fields, kwargs): json = {} for field in fields: diff --git a/templates/model.py.jinja b/templates/model.py.jinja index fd7ff21..381387f 100644 --- a/templates/model.py.jinja +++ b/templates/model.py.jinja @@ -64,7 +64,7 @@ class {{ class_name }}: {% for property in model.required_properties + model.optional_properties %} {% if property.default is none and property.required %} {% if property.__class__.__name__ == 'EnumProperty' %} - {{property.name}}: Union[Unset, str] = Unset + {{property.name}}: Union[Unset, str] = UNSET {% else %} {{ property.to_string() }} {% endif %} @@ -74,7 +74,7 @@ class {{ class_name }}: {% for property in model.required_properties + model.optional_properties %} {% if property.default is not none or not property.required %} {% if property.__class__.__name__ == 'EnumProperty' %} - {{property.name}}: Union[Unset, str] = Unset + {{property.name}}: Union[Unset, str] = UNSET {% else %} {{ property.to_string() }} {% endif %} @@ -131,7 +131,7 @@ field_dict.update({ if {{ property.python_name }} is not UNSET: {% if property.__class__.__name__ == 'ListProperty' %} for index, field_value in enumerate({{property.name}}): - field_dict[f"{{property.name}}[]"] = field_value + field_dict[f"{{property.name}}[{index}]"] = field_value {% else %} field_dict["{{ property.name }}"] = {{ property.python_name }} {% endif %} diff --git a/templates/property_templates/boolean_property.py.jinja b/templates/property_templates/boolean_property.py.jinja index a63639b..778aded 100644 --- a/templates/property_templates/boolean_property.py.jinja +++ b/templates/property_templates/boolean_property.py.jinja @@ -1,3 +1,15 @@ -{% macro transform_header(property, source, destination) %} -{{ destination }} = "true" if {{ source }} else "false" +{% macro transform_header(source) %} +"true" if {{ source }} else "false" {% endmacro %} + +{% macro transform(property, source, destination, multipart=multipart) %} +{% if multipart %} +{% if not property.required %} +{{ destination }} = {{source}} if isinstance({{source}}, Unset) else (None, str({{source}}).lower().encode(), "text/plain") +{% else %} +{{ destination }} = (None, str({{ source }}).lower().encode(), "text/plain") +{% endif %} +{% else %} +{{ destination }} = True if {{ source }} else False +{% endif %} +{% endmacro %} \ No newline at end of file diff --git a/templates/property_templates/enum_property.py.jinja b/templates/property_templates/enum_property.py.jinja index 52418a1..fbdd719 100644 --- a/templates/property_templates/enum_property.py.jinja +++ b/templates/property_templates/enum_property.py.jinja @@ -11,7 +11,7 @@ {% macro check_type_for_construct(property, source) %}isinstance({{ source }}, {{ property.value_type.__name__ }}){% endmacro %} {% macro transform(property, source, destination, declare_type=True, multipart=False) %} -{% set transformed = source + ".value" %} +{% set transformed = source %} {% set type_string = property.get_type_string(json=True) %} {% if multipart %} {% set transformed = "(None, str(" + transformed + ").encode(), \"text/plain\")" %}