File size: 124,294 Bytes
2ea495a | 1 | {"openapi": "3.1.0", "info": {"title": "My API", "description": "This is a very custom OpenAPI schema", "version": "1.0.0"}, "paths": {"/api/v1/users": {"get": {"tags": ["users"], "summary": "Users List", "description": "Get all users\n\nParameters:\n - response: The response object.\n - current_user: The current user object.\n\nReturns:\n - List[User]: A list of user objects.", "operationId": "users_list_api_v1_users_get", "responses": {"200": {"description": "Successful Response", "content": {"application/json": {"schema": {"items": {"$ref": "#/components/schemas/User"}, "type": "array", "title": "Response Users List Api V1 Users Get"}}}}}, "security": [{"OAuth2PasswordBearer": []}]}, "put": {"tags": ["users"], "summary": "User Edit", "description": "Update existing user\n\nParameters:\n - user: The updated user object.\n - current_user: The current user object.\n\nReturns:\n - UserSingupResponseSchema: The updated user signup response schema.", "operationId": "user_edit_api_v1_users_put", "requestBody": {"content": {"application/json": {"schema": {"$ref": "#/components/schemas/UserUpdateSchema"}}}, "required": true}, "responses": {"200": {"description": "Successful Response", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/UserSingupResponseSchema"}}}}, "422": {"description": "Validation Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/HTTPValidationError"}}}}}, "security": [{"OAuth2PasswordBearer": []}]}, "post": {"tags": ["users"], "summary": "User Create", "description": "Create a new user\n\nParameters:\n - user: The user object.\n - current_user: The current user object.\n\nReturns:\n - User: The created user object.", "operationId": "user_create_api_v1_users_post", "requestBody": {"content": {"application/json": {"schema": {"$ref": "#/components/schemas/UserCreate"}}}, "required": true}, "responses": {"200": {"description": "Successful Response", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/User"}}}}, "422": {"description": "Validation Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/HTTPValidationError"}}}}}, "security": [{"OAuth2PasswordBearer": []}]}}, "/api/v1/user": {"get": {"tags": ["users"], "summary": "User Me", "description": "Get own user\n\nParameters:\n - current_user: The current user object.\n - blob: A boolean indicating whether to include blob data.\n\nReturns:\n - UserSingupResponseSchema: The user signup response schema.", "operationId": "user_me_api_v1_user_get", "security": [{"OAuth2PasswordBearer": []}], "parameters": [{"name": "blob", "in": "query", "required": false, "schema": {"type": "boolean", "default": false, "title": "Blob"}}], "responses": {"200": {"description": "Successful Response", "content": {"application/json": {"schema": {}}}}, "422": {"description": "Validation Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/HTTPValidationError"}}}}}}}, "/api/v1/users/{user_id}": {"get": {"tags": ["users"], "summary": "User Details", "description": "Get any user details\n\nParameters:\n - user_id: The ID of the user.\n - current_user: The current user object.\n\nReturns:\n - User: The user object.", "operationId": "user_details_api_v1_users__user_id__get", "security": [{"OAuth2PasswordBearer": []}], "parameters": [{"name": "user_id", "in": "path", "required": true, "schema": {"type": "integer", "title": "User Id"}}], "responses": {"200": {"description": "Successful Response", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/User"}}}}, "422": {"description": "Validation Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/HTTPValidationError"}}}}}}, "delete": {"tags": ["users"], "summary": "User Delete", "description": "Delete existing user\n\nParameters:\n - user_id: The ID of the user to delete.\n - current_user: The current user object.\n\nReturns:\n - dict: A dictionary with a success message.", "operationId": "user_delete_api_v1_users__user_id__delete", "security": [{"OAuth2PasswordBearer": []}], "parameters": [{"name": "user_id", "in": "path", "required": true, "schema": {"type": "integer", "title": "User Id"}}], "responses": {"200": {"description": "Successful Response", "content": {"application/json": {"schema": {"type": "object", "title": "Response User Delete Api V1 Users User Id Delete"}}}}, "422": {"description": "Validation Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/HTTPValidationError"}}}}}}}, "/api/v1/users/admin": {"put": {"tags": ["users"], "summary": "User Update Admin", "description": "Update existing user\n\nParameters:\n - updated_user (User): The updated user object.\n - current_user (User, optional): The current user object. Defaults to Depends(get_current_active_superuser).\n\nRaises:\n - HTTPException: If the user doesn't exist or if the update request may corrupt the database.\n\nReturns:\n - UserSingupResponseSchema: The updated user signup response schema.", "operationId": "user_update_admin_api_v1_users_admin_put", "requestBody": {"content": {"application/json": {"schema": {"$ref": "#/components/schemas/User"}}}, "required": true}, "responses": {"200": {"description": "Successful Response", "content": {"application/json": {"schema": {}}}}, "422": {"description": "Validation Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/HTTPValidationError"}}}}}, "security": [{"OAuth2PasswordBearer": []}]}}, "/api/v1/users/{user_id}/redis/reset": {"get": {"tags": ["users"], "summary": "Reset Openai Usage", "description": "Reset user consumption\n\nParameters:\n - user_id: The ID of the user.\n - current_user: The current user object.\n\nReturns:\n - dict: A dictionary indicating success.", "operationId": "reset_openai_usage_api_v1_users__user_id__redis_reset_get", "security": [{"OAuth2PasswordBearer": []}], "parameters": [{"name": "user_id", "in": "path", "required": true, "schema": {"type": "integer", "title": "User Id"}}], "responses": {"200": {"description": "Successful Response", "content": {"application/json": {"schema": {}}}}, "422": {"description": "Validation Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/HTTPValidationError"}}}}}}}, "/api/v1/users/{user_id}/redis/ttl": {"get": {"tags": ["users"], "summary": "User Ttl", "description": "Get user TTL\n\nParameters:\n - user_id: The ID of the user.\n - current_user: The current user object.\n\nReturns:\n - dict: A dictionary with the user ID and TTL value.", "operationId": "user_ttl_api_v1_users__user_id__redis_ttl_get", "security": [{"OAuth2PasswordBearer": []}], "parameters": [{"name": "user_id", "in": "path", "required": true, "schema": {"type": "integer", "title": "User Id"}}], "responses": {"200": {"description": "Successful Response", "content": {"application/json": {"schema": {"type": "object", "title": "Response User Ttl Api V1 Users User Id Redis Ttl Get"}}}}, "422": {"description": "Validation Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/HTTPValidationError"}}}}}}}, "/api/v1/users/{user_id}/redis/get": {"get": {"tags": ["users"], "summary": "Redis Get", "description": "Get Redis data for a user\n\nParameters:\n - user_id: The ID of the user.\n - current_user: The current user object.\n\nReturns:\n - dict: A dictionary with the user ID, usage count, and TTL value.", "operationId": "redis_get_api_v1_users__user_id__redis_get_get", "security": [{"OAuth2PasswordBearer": []}], "parameters": [{"name": "user_id", "in": "path", "required": true, "schema": {"type": "integer", "title": "User Id"}}], "responses": {"200": {"description": "Successful Response", "content": {"application/json": {"schema": {"type": "object", "title": "Response Redis Get Api V1 Users User Id Redis Get Get"}}}}, "422": {"description": "Validation Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/HTTPValidationError"}}}}}}}, "/api/v1/users/redis/get": {"get": {"tags": ["users"], "summary": "Redis Get", "description": "Get Redis data for all users\n\nParameters:\n - current_user: The current user object.\n\nReturns:\n - List[dict]: A list of dictionaries with user ID, usage count, email, and name.", "operationId": "redis_get_api_v1_users_redis_get_get", "responses": {"200": {"description": "Successful Response", "content": {"application/json": {"schema": {}}}}}, "security": [{"OAuth2PasswordBearer": []}]}}, "/api/v1/apiToken/create": {"get": {"tags": ["users"], "summary": "Generate Api Token", "description": "Generate API token for the current user.\n\nArgs:\n current_user (User, optional): The current user. Defaults to Depends(get_current_active_user).\n\nReturns:\n dict: A dictionary containing the response schema for the generated API token.\n\nRaises:\n (Add information about any exceptions raised by the function here)\n\nExample:\n response = generate_api_token()", "operationId": "generate_api_token_api_v1_apiToken_create_get", "responses": {"200": {"description": "Successful Response", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/UserApiKeyResponseSchema"}}}}}, "security": [{"OAuth2PasswordBearer": []}]}}, "/api/v1/apiToken/get/all": {"get": {"tags": ["users"], "summary": "Get Api Token", "description": "Get API token for the current user.\n\nArgs:\n current_user (User, optional): The current user. Defaults to Depends(get_current_active_user).\n\nReturns:\n List: A list of API tokens for the current user.\n\nRaises:\n Exception: If there is an error while retrieving the API tokens.\n\nExample:\n Example usage:\n ```\n api_tokens = get_api_token()\n print(api_tokens)\n ```", "operationId": "get_api_token_api_v1_apiToken_get_all_get", "responses": {"200": {"description": "Successful Response", "content": {"application/json": {"schema": {"items": {"$ref": "#/components/schemas/UserApiKeyResponseSchema"}, "type": "array", "title": "Response Get Api Token Api V1 Apitoken Get All Get"}}}}}, "security": [{"OAuth2PasswordBearer": []}]}}, "/api/v1/apiToken/{id}/delete": {"get": {"tags": ["users"], "summary": "Delete Api Token", "description": "Delete API token for the given user.\n\nArgs:\n id (int): The ID of the API token to be deleted.\n current_user (User, optional): The current active user. Defaults to Depends(get_current_active_user).\n\nReturns:\n dict: Response schema for the deleted API token.\n\nRaises:\n Exception: If there is an error while deleting the API token.\n\nExample:\n resp = delete_api_token(123, current_user)", "operationId": "delete_api_token_api_v1_apiToken__id__delete_get", "security": [{"OAuth2PasswordBearer": []}], "parameters": [{"name": "id", "in": "path", "required": true, "schema": {"type": "integer", "title": "Id"}}], "responses": {"200": {"description": "Successful Response", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/UserApiKeyResponseSchema"}}}}, "422": {"description": "Validation Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/HTTPValidationError"}}}}}}}, "/api/v1/apiToken/{id}/toggle": {"get": {"tags": ["users"], "summary": "Toggle Api Token", "description": "Toggle the API token for the given user.\n\nArgs:\n id (int): The ID of the user.\n current_user (User, optional): The current active user. Defaults to Depends(get_current_active_user).\n\nReturns:\n dict: The response schema.\n\nRaises:\n (Exception): If an error occurs while toggling the API token.\n\nExample:\n resp = toggle_api_token(123, current_user)", "operationId": "toggle_api_token_api_v1_apiToken__id__toggle_get", "security": [{"OAuth2PasswordBearer": []}], "parameters": [{"name": "id", "in": "path", "required": true, "schema": {"type": "integer", "title": "Id"}}], "responses": {"200": {"description": "Successful Response", "content": {"application/json": {"schema": {}}}}, "422": {"description": "Validation Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/HTTPValidationError"}}}}}}}, "/api/v1/users/{id}/requestLog": {"get": {"tags": ["users"], "summary": "Request Log Api Token", "description": "Requests log API token for the given user ID.\n\nArgs:\n id (int): The user ID for which the log API token is requested.\n current_user (User, optional): The current user. Defaults to Depends(get_current_active_superuser).\n\nReturns:\n The response containing all requests of the user from Firebase.\n\nRaises:\n (Add information about any exceptions raised)\n\nExample:\n # Example usage\n resp = await request_log_api_token(123)", "operationId": "request_log_api_token_api_v1_users__id__requestLog_get", "security": [{"OAuth2PasswordBearer": []}], "parameters": [{"name": "id", "in": "path", "required": true, "schema": {"type": "integer", "title": "Id"}}], "responses": {"200": {"description": "Successful Response", "content": {"application/json": {"schema": {}}}}, "422": {"description": "Validation Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/HTTPValidationError"}}}}}}}, "/api/v1/user/referred": {"get": {"tags": ["users"], "summary": "Referred By", "description": "Update the current user's referral information.\n\nArgs:\n- user_id (int): The ID of the user who referred the current user.\n- current_user (User, optional): The current active user. Defaults to the result of get_current_active_user.\n\nRaises:\n- HTTPException: If the current user is already referred by someone.\n\nReturns:\n- dict: A dictionary containing the updated user signup response schema.\n\nExample:\nreferred_by(123, current_user)", "operationId": "referred_by_api_v1_user_referred_get", "security": [{"OAuth2PasswordBearer": []}], "parameters": [{"name": "user_id", "in": "query", "required": true, "schema": {"type": "integer", "title": "User Id"}}], "responses": {"200": {"description": "Successful Response", "content": {"application/json": {"schema": {}}}}, "422": {"description": "Validation Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/HTTPValidationError"}}}}}}}, "/api/v1/user/email/update/request": {"post": {"tags": ["users"], "summary": "Update Email", "description": "Update the current user's email.\n\nArgs:\n- email_details (UpdateEmailSchema): The new email details.\n- current_user (User, optional): The current active user. Defaults to the result of get_current_active_user.\n\nRaises:\n- HTTPException: If the new email address is already in use.\n\nReturns:\n- dict: A dictionary containing the updated user signup response schema.\n\nExample:\n```\n{\n \"success\": \"true\",\n \"message\": f\"OTP sent to your email - {email_details.email}. Please verify to update your email.\"\n}\n```", "operationId": "update_email_api_v1_user_email_update_request_post", "requestBody": {"content": {"application/json": {"schema": {"$ref": "#/components/schemas/UpdateEmailSchema"}}}, "required": true}, "responses": {"200": {"description": "Successful Response", "content": {"application/json": {"schema": {}}}}, "422": {"description": "Validation Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/HTTPValidationError"}}}}}, "security": [{"OAuth2PasswordBearer": []}]}}, "/api/v1/user/email/update/verify": {"post": {"tags": ["users"], "summary": "Update Email", "description": "Update the current user's email.\n\nArgs:\n securityCode (VerifySecurityCodeSchema): The security code schema containing the new email address and verification code.\n current_user (User, optional): The current active user. Defaults to the result of get_current_active_user.\n\nRaises:\n HTTPException: If the new email address is already in use.\n\nReturns:\n dict: A dictionary containing the updated user signup response schema.\n\nExample:\n ```\n response = await update_email(securityCode, current_user)\n ```", "operationId": "update_email_api_v1_user_email_update_verify_post", "requestBody": {"content": {"application/json": {"schema": {"$ref": "#/components/schemas/VerifySecurityCodeSchema"}}}, "required": true}, "responses": {"200": {"description": "Successful Response", "content": {"application/json": {"schema": {}}}}, "422": {"description": "Validation Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/HTTPValidationError"}}}}}, "security": [{"OAuth2PasswordBearer": []}]}}, "/api/login": {"post": {"tags": ["auth"], "summary": "Login", "operationId": "login_api_login_post", "requestBody": {"content": {"application/x-www-form-urlencoded": {"schema": {"$ref": "#/components/schemas/Body_login_api_login_post"}}}, "required": true}, "responses": {"200": {"description": "Successful Response", "content": {"application/json": {"schema": {}}}}, "422": {"description": "Validation Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/HTTPValidationError"}}}}}}}, "/api/refreshToken": {"get": {"tags": ["auth"], "summary": "Refresh Token", "description": "Refresh the access token for the given user.\n\nArgs:\n user (User, optional): The user for whom the access token needs to be refreshed. Defaults to Depends(validate_old_token).\n\nRaises:\n HTTPException: If the user is not authenticated, raises HTTP 401 Unauthorized exception with details.\n\nReturns:\n Response: The refreshed access token for the user.\n\nExample:\n user = User(username=\"example_user\", password=\"example_password\")\n try:\n refreshed_token = refresh_token(user)\n print(refreshed_token)\n except HTTPException as e:\n print(f\"Error: {e.status_code} - {e.detail}\")", "operationId": "refresh_token_api_refreshToken_get", "responses": {"200": {"description": "Successful Response", "content": {"application/json": {"schema": {}}}}}, "security": [{"OAuth2PasswordBearer": []}]}}, "/api/apiKey/get/token": {"get": {"tags": ["auth"], "summary": "Get Token From Api Key", "description": "Get token from API key.\n\nArgs:\n user (User, optional): The user obtained from the API key. Defaults to Depends(get_current_user_from_api_key).\n\nReturns:\n str: The generated response token.\n\nRaises:\n HTTPException: If the user is not found or the API key is incorrect.\n\nExample:\n >>> get_token_from_api_key(user)\n 'generated_response_token'", "operationId": "get_token_from_api_key_api_apiKey_get_token_get", "parameters": [{"name": "api-key", "in": "header", "required": false, "schema": {"type": "string", "default": "", "title": "Api-Key"}}], "responses": {"200": {"description": "Successful Response", "content": {"application/json": {"schema": {}}}}, "422": {"description": "Validation Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/HTTPValidationError"}}}}}}}, "/api/signup": {"post": {"tags": ["auth"], "summary": "Signup", "description": "Sign up a new user.\n\nArgs:\n signup_data (UserSignupRequestSchema): The user signup data.\n\nRaises:\n <Exception Type>: <Description of the exception raised>\n\nReturns:\n TokenResponseSchema: The token response for the signed up user.\n\nExample:\n signup_data = UserSignupRequestSchema(...)\n token_response = signup(signup_data)", "operationId": "signup_api_signup_post", "requestBody": {"content": {"application/json": {"schema": {"$ref": "#/components/schemas/UserSignupRequestSchema"}}}, "required": true}, "responses": {"200": {"description": "Successful Response", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/TokenResponseSchema"}}}}, "422": {"description": "Validation Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/HTTPValidationError"}}}}}}}, "/api/forgotPassword": {"post": {"tags": ["auth"], "summary": "Signup", "description": "Sign up a user and generate a forgot password token.\n\nArgs:\n forgotPasswordSchema (ForgotPasswordSchema): The schema containing user's email for forgot password.\n\nRaises:\n Any exceptions that may occur during the process.\n\nReturns:\n The generated forgot password token.\n\nExample:\n token = await signup(forgotPasswordSchema)", "operationId": "signup_api_forgotPassword_post", "requestBody": {"content": {"application/json": {"schema": {"$ref": "#/components/schemas/ForgotPasswordSchema"}}}, "required": true}, "responses": {"200": {"description": "Successful Response", "content": {"application/json": {"schema": {}}}}, "422": {"description": "Validation Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/HTTPValidationError"}}}}}}}, "/api/verifySecurityCode": {"post": {"tags": ["auth"], "summary": "Signup", "description": "Sign up a user after verifying the security code.\n\nArgs:\n securityCode (VerifySecurityCodeSchema): The security code schema containing email and code.\n\nReturns:\n dict: A dictionary containing the status of the security code verification and a message.\n\nRaises:\n Any exceptions that might occur during the verification process.\n\nExample:\n Example usage:\n ```\n result = signup(VerifySecurityCodeSchema(email=\"example@example.com\", code=\"123456\"))\n print(result)\n ```", "operationId": "signup_api_verifySecurityCode_post", "requestBody": {"content": {"application/json": {"schema": {"$ref": "#/components/schemas/VerifySecurityCodeSchema"}}}, "required": true}, "responses": {"200": {"description": "Successful Response", "content": {"application/json": {"schema": {}}}}, "422": {"description": "Validation Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/HTTPValidationError"}}}}}}}, "/api/setNewPassword": {"post": {"tags": ["auth"], "summary": "Signup", "description": "Sign up a user with a new password.\n\nArgs:\n newPasswordSchema (VerifyNewPasswordSchema): An instance of VerifyNewPasswordSchema containing user's email, security code, and new password.\n\nReturns:\n The result of the verification and password update process.\n\nRaises:\n Any exceptions raised by the verify_security_code_and_password function.\n\nExample:\n # Create an instance of VerifyNewPasswordSchema\n new_password_schema = VerifyNewPasswordSchema(email='user@example.com', code='123456', new_password='new_password')\n\n # Call the signup function\n result = signup(new_password_schema)", "operationId": "signup_api_setNewPassword_post", "requestBody": {"content": {"application/json": {"schema": {"$ref": "#/components/schemas/VerifyNewPasswordSchema"}}}, "required": true}, "responses": {"200": {"description": "Successful Response", "content": {"application/json": {"schema": {}}}}, "422": {"description": "Validation Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/HTTPValidationError"}}}}}}}, "/api/setNewPasswordFromOldPassword": {"post": {"tags": ["auth"], "summary": "Signup", "description": "Sign up a user with a new password.\n\nArgs:\n newPasswordSchema (VerifyNewPasswordWithOldPasswordSchema): The schema containing the new password and old password for verification.\n\nRaises:\n (Add specific exceptions here if applicable)\n\nReturns:\n (Add specific return type here if applicable)", "operationId": "signup_api_setNewPasswordFromOldPassword_post", "requestBody": {"content": {"application/json": {"schema": {"$ref": "#/components/schemas/VerifyNewPasswordWithOldPasswordSchema"}}}, "required": true}, "responses": {"200": {"description": "Successful Response", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/TokenResponseSchema"}}}}, "422": {"description": "Validation Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/HTTPValidationError"}}}}}}}, "/api/activate": {"get": {"tags": ["auth"], "summary": "Activate", "operationId": "activate_api_activate_get", "parameters": [{"name": "token", "in": "query", "required": true, "schema": {"type": "string", "title": "Token"}}], "responses": {"200": {"description": "Successful Response", "content": {"application/json": {"schema": {}}}}, "422": {"description": "Validation Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/HTTPValidationError"}}}}}}}, "/api/chetna/explain": {"post": {"tags": ["chetna"], "summary": "Explain The Code", "description": "Get response Chetna\n\n This endpoint takes an input text and returns an explanation of the code provided in the text.\n\n Parameters:\n - inputText: The input text containing the code to be explained.\n - current_user: The current authenticated user.\n\n Returns:\n - ChetnaResponse: The response containing the explanation of the code.\n\n Example:\n - Request:\n POST /chetna/explain\n {\n \"content\": \"struct Node {\n int data;\n struct Node* next;\n};\n\nvoid printList(struct Node* node) {\n while (node != NULL) {\n printf(\"%d \", node->data);\n node = node->next;\n }\n}\"\n }\n - Response:\n {\n \"content\": \"This code defines a struct called Node, which contains two fields: an integer called data and a pointer to another Node called next. The struct is used to create a linked list, where each Node in the list contains a value (stored in the data field) and a pointer to the next Node in the list (stored in the next field).\n\nThe function printList takes a pointer to a Node as its argument and prints out the contents of the linked list starting from that Node. The function uses a while loop to iterate through the list, printing out the data field of each Node and updating the pointer to the next Node until it reaches the end of the list (indicated by a NULL value in the next field).\n\nFor example, if we have a linked list with three Nodes containing the values 1, 2, and 3, respectively, and we call printList with a pointer to the first Node (containing the value 1), the function would print out \"1 2 3\".\n\nNote that this code is just an example and it is not complete. It is missing some important parts like creating and initializing the linked list. But it should give you an idea of how linked lists work and how this code can be used to print out their contents.\n\nAlso, this code is written in C programming language. If you are not familiar with C, you may want to learn more about it before trying to understand this code. Overall, this code is used to create a linked list and print out its contents. It's an example of how linked lists work and how they can be used to store and access data in a specific order. The struct Node is used to define the structure of each node in the linked list, and the function printList is used to iterate through the linked list and print out its contents. The while loop is used to traverse through the linked list until it reaches the end of the list. The printf statement is used to print out the data field of each node in the linked list.\"\n }", "operationId": "explain_the_code_api_chetna_explain_post", "requestBody": {"content": {"application/json": {"schema": {"$ref": "#/components/schemas/ChetnaRequest"}}}, "required": true}, "responses": {"200": {"description": "Successful Response", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ChetnaResponse"}}}}, "422": {"description": "Validation Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/HTTPValidationError"}}}}}, "security": [{"OAuth2PasswordBearer": []}]}}, "/api/oauth/google/login": {"get": {"tags": ["google_auth"], "summary": "Login", "description": "This function handles the login process by preparing the authorization URL and redirecting the user to it.\n\nArgs:\n request (Request): The request object containing query parameters.\n\nReturns:\n RedirectResponse: Redirects the user to the authorization URL.\n\nRaises:\n None\n\nExample:\n Example usage:\n ```\n from fastapi import Request\n from fastapi.responses import RedirectResponse\n\n request = Request(...)\n response = login(request)\n ```", "operationId": "login_api_oauth_google_login_get", "responses": {"200": {"description": "Successful Response", "content": {"application/json": {"schema": {}}}}}}}, "/api/oauth/google/callback": {"get": {"tags": ["google_auth"], "summary": "Callback", "operationId": "callback_api_oauth_google_callback_get", "responses": {"200": {"description": "Successful Response", "content": {"application/json": {"schema": {}}}}}}}, "/api/oauth/google/connect": {"get": {"tags": ["google_auth"], "summary": "Connect", "operationId": "connect_api_oauth_google_connect_get", "responses": {"200": {"description": "Successful Response", "content": {"application/json": {"schema": {}}}}}}}, "/api/oauth/github/login": {"get": {"tags": ["github_auth"], "summary": "Auth", "operationId": "auth_api_oauth_github_login_get", "responses": {"200": {"description": "Successful Response", "content": {"application/json": {"schema": {}}}}}}}, "/api/oauth/github/callback": {"get": {"tags": ["github_auth"], "summary": "Callback", "operationId": "callback_api_oauth_github_callback_get", "parameters": [{"name": "code", "in": "query", "required": false, "schema": {"type": "string", "title": "Code"}}, {"name": "state", "in": "query", "required": false, "schema": {"type": "string", "title": "State"}}], "responses": {"200": {"description": "Successful Response", "content": {"application/json": {"schema": {}}}}, "422": {"description": "Validation Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/HTTPValidationError"}}}}}}}, "/api/oauth/github/connect": {"get": {"tags": ["github_auth"], "summary": "Connect", "operationId": "connect_api_oauth_github_connect_get", "responses": {"200": {"description": "Successful Response", "content": {"application/json": {"schema": {}}}}}}}, "/api/oauth/github/install": {"get": {"tags": ["github_auth"], "summary": "Install", "description": "Handle GitHub webhook request.\n\nArgs:\n request (Request): The incoming request object.\n code (str?): The authorization code. Defaults to None.\n installation_id (str?): The installation ID. Defaults to None.\n\nReturns:\n Union[RedirectResponse, HTTPException]: If successful, returns a RedirectResponse with a token;\n otherwise, raises an HTTPException with an appropriate error message.\n\nRaises:\n HTTPException: If the authorization code is not found or if something goes wrong during the process.\n\nExamples:\n An example of using this function:\n ```\n response = github_webhook(request, code=\"example_code\", installation_id=\"example_id\")\n ```", "operationId": "install_api_oauth_github_install_get", "parameters": [{"name": "code", "in": "query", "required": false, "schema": {"type": "string", "title": "Code"}}, {"name": "installation_id", "in": "query", "required": false, "schema": {"type": "string", "title": "Installation Id"}}], "responses": {"200": {"description": "Successful Response", "content": {"application/json": {"schema": {}}}}, "422": {"description": "Validation Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/HTTPValidationError"}}}}}}}, "/api/oauth/github/user/create/admin": {"get": {"tags": ["github_auth"], "summary": "Create Admin", "description": "Process GitHub webhook and return user data.\n\nArgs:\n github_login_name (str): The GitHub login name.\n installation_id (str): The installation ID.\n super_user: The super user.\n\nRaises:\n HTTPException: If github_login_name or installation_id is not provided.\n\nReturns:\n dict: User data obtained from GitHub.", "operationId": "create_admin_api_oauth_github_user_create_admin_get", "security": [{"OAuth2PasswordBearer": []}], "parameters": [{"name": "github_login_name", "in": "query", "required": false, "schema": {"type": "string", "title": "Github Login Name"}}, {"name": "installation_id", "in": "query", "required": false, "schema": {"type": "string", "title": "Installation Id"}}], "responses": {"200": {"description": "Successful Response", "content": {"application/json": {"schema": {}}}}, "422": {"description": "Validation Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/HTTPValidationError"}}}}}}}, "/api/oauth/github/user/repo": {"get": {"tags": ["github_auth"], "summary": "Get User Repo", "description": "Process GitHub webhook and return user data.\n\nArgs:\n github_login_name (str): The GitHub login name of the user.\n installation_id (str): The installation ID.\n super_user: The super user.\n\nRaises:\n HTTPException: If github_login_name or installation_id is not provided.\n\nReturns:\n dict: User data obtained from GitHub.", "operationId": "get_user_repo_api_oauth_github_user_repo_get", "security": [{"OAuth2PasswordBearer": []}], "parameters": [{"name": "github_login_name", "in": "query", "required": false, "schema": {"type": "string", "title": "Github Login Name"}}, {"name": "installation_id", "in": "query", "required": false, "schema": {"type": "string", "title": "Installation Id"}}], "responses": {"200": {"description": "Successful Response", "content": {"application/json": {"schema": {}}}}, "422": {"description": "Validation Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/HTTPValidationError"}}}}}}}, "/api/oauth/github/experiment": {"get": {"tags": ["github_auth"], "summary": "Experiment", "description": "Process the GitHub webhook request and publish a message to RabbitMQ.\n\nArgs:\n request (Request): The request object containing the GitHub webhook data.\n\nRaises:\n Any exceptions that may occur during the processing of the webhook.\n\nReturns:\n dict: A dictionary indicating the success of the operation.\n\nExample:\n The function can be called as follows:\n ```\n result = experiment(request)\n print(result)\n ```", "operationId": "experiment_api_oauth_github_experiment_get", "responses": {"200": {"description": "Successful Response", "content": {"application/json": {"schema": {}}}}}}}, "/api/payment": {"get": {"tags": ["payment"], "summary": "Initiate Payment", "description": "Initiates a payment using Razorpay integration.\n\nArgs:\n request (Request): The request object containing information about the payment.\n\nReturns:\n TemplateResponse: A template response containing the pay.html template, request object, order ID, and amount.\n\nExamples:\n Example usage:\n ```\n from fastapi import Request\n from fastapi.responses import TemplateResponse\n \n request_obj = Request(...)\n response = initiate_payment(request_obj)\n print(response)\n ```", "operationId": "initiate_payment_api_payment_get", "responses": {"200": {"description": "Successful Response", "content": {"text/html": {"schema": {"type": "string"}}}}}}}, "/api/payment/callback": {"post": {"tags": ["payment"], "summary": "Handle Payment Callback", "description": "Handle payment callback from Razorpay.\n\nThis function handles the payment callback from Razorpay by verifying the payment signature,\nretrieving user information, creating user payment information, updating user plan type,\nand handling successful or failed payment logic.\n\nArgs:\n request (Request): The request object containing payment information.\n\nReturns:\n dict: A dictionary containing the status and message of the payment handling process.\n\nRaises:\n Exception: If an error occurs during the payment handling process.", "operationId": "handle_payment_callback_api_payment_callback_post", "responses": {"200": {"description": "Successful Response", "content": {"application/json": {"schema": {}}}}}}}, "/api/stripe/create-checkout-session": {"get": {"tags": ["payment"], "summary": "Create Checkout Session", "description": "Create a checkout session for the given user and product price ID.\n\nThis function creates a checkout session using the Stripe API for the specified user and product price ID.\n\nArgs:\n requested_user (models.User): The user for whom the checkout session is being created.\n product_price_id (str): The ID of the product price.\n\nReturns:\n RedirectResponse: A redirect response to the checkout session URL.\n\nRaises:\n Exception: If an error occurs during the creation of the checkout session.", "operationId": "create_checkout_session_api_stripe_create_checkout_session_get", "parameters": [{"name": "product_price_id", "in": "query", "required": false, "schema": {"type": "string", "title": "Product Price Id"}}, {"name": "token", "in": "query", "required": false, "schema": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Token"}}], "responses": {"200": {"description": "Successful Response", "content": {"text/html": {"schema": {"type": "string"}}}}, "422": {"description": "Validation Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/HTTPValidationError"}}}}}}}, "/api/stripe/checkout": {"get": {"tags": ["payment"], "summary": "Strip Success", "description": "Render the Stripe checkout template.\n\nArgs:\n request (Request): The request object.\n\nReturns:\n TemplateResponse: The rendered Stripe checkout template.", "operationId": "strip_success_api_stripe_checkout_get", "responses": {"200": {"description": "Successful Response", "content": {"text/html": {"schema": {"type": "string"}}}}}}}, "/api/stripe/success": {"get": {"tags": ["payment"], "summary": "Strip Success", "operationId": "strip_success_api_stripe_success_get", "responses": {"200": {"description": "Successful Response", "content": {"text/html": {"schema": {"type": "string"}}}}}}}, "/api/stripe/cancel": {"get": {"tags": ["payment"], "summary": "Strip Cancel", "operationId": "strip_cancel_api_stripe_cancel_get", "responses": {"200": {"description": "Successful Response", "content": {"text/html": {"schema": {"type": "string"}}}}}}}, "/api/stripe/fail": {"get": {"tags": ["payment"], "summary": "Strip Cancel", "operationId": "strip_cancel_api_stripe_fail_get", "responses": {"200": {"description": "Successful Response", "content": {"text/html": {"schema": {"type": "string"}}}}}}}, "/api/stripe/webhook": {"post": {"tags": ["payment"], "summary": "Webhook", "description": "Handle the incoming webhook request from Stripe and fulfill the purchase.\n\nThis function processes the incoming webhook request from Stripe, validates the signature, and handles the checkout.session.completed event to fulfill the purchase.\n\nArgs:\n request (Request): The incoming request object containing the payload and signature.\n\nReturns:\n JSONResponse: A JSON response indicating the success of the webhook handling.\n\nRaises:\n ValueError: If the payload is invalid.\n stripe.error.SignatureVerificationError: If the signature is invalid.", "operationId": "webhook_api_stripe_webhook_post", "responses": {"200": {"description": "Successful Response", "content": {"application/json": {"schema": {}}}}}}}, "/api/transactions": {"get": {"tags": ["payment"], "summary": "Get All Transactions", "description": "Get all transactions for the requested user.\n\nThis function retrieves all transactions associated with the requested user's email address.\n\nArgs:\n requested_user (models.User): The user for whom transactions are requested.\n\nReturns:\n List[schemas.PaymentInfo]: A list of payment information objects associated with the requested user.", "operationId": "get_all_transactions_api_transactions_get", "parameters": [{"name": "token", "in": "query", "required": false, "schema": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Token"}}], "responses": {"200": {"description": "Successful Response", "content": {"application/json": {"schema": {"type": "array", "items": {"$ref": "#/components/schemas/PaymentInfo"}, "title": "Response Get All Transactions Api Transactions Get"}}}}, "422": {"description": "Validation Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/HTTPValidationError"}}}}}}}, "/api/cashfree/checkout": {"get": {"tags": ["payment"], "summary": "Create Cashfree Checkout Session", "description": "Create a cashfree checkout session for the specified user and product.\n\nThis function creates a cashfree checkout session for the specified user and product, and optionally for a list of repository IDs.\n\nArgs:\n user (models.User): The user for whom the checkout session is being created.\n product_id (str?): The ID of the product for which the checkout session is being created.\n repo_ids (List[str]?): A list of repository IDs.\n\nReturns:\n dict: A dictionary containing the cashfree session ID.", "operationId": "create_cashfree_checkout_session_api_cashfree_checkout_get", "security": [{"OAuth2PasswordBearer": []}], "parameters": [{"name": "product_id", "in": "query", "required": false, "schema": {"type": "string", "title": "Product Id"}}, {"name": "repo_ids", "in": "query", "required": false, "schema": {"type": "array", "items": {"type": "string"}, "default": [], "title": "Repo Ids"}}], "responses": {"200": {"description": "Successful Response", "content": {"application/json": {"schema": {}}}}, "422": {"description": "Validation Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/HTTPValidationError"}}}}}}}, "/api/cashfree/subscription": {"get": {"tags": ["payment"], "summary": "Create Cashfree Checkout Session", "description": "Create a cashfree checkout session for a user.\n\nThis function creates a cashfree checkout session for a user by processing the payment request for a specific product and user.\n\nArgs:\n user (models.User): The user for whom the checkout session is being created.\n product_id (str?): The ID of the product for which the checkout session is being created. Defaults to None.\n repo_ids (List[str]?): A list of repository IDs. Defaults to an empty list.\n\nReturns:\n RedirectResponse: A redirect response to the created checkout session.", "operationId": "create_cashfree_checkout_session_api_cashfree_subscription_get", "security": [{"OAuth2PasswordBearer": []}], "parameters": [{"name": "product_id", "in": "query", "required": false, "schema": {"type": "string", "title": "Product Id"}}, {"name": "repo_ids", "in": "query", "required": false, "schema": {"type": "array", "items": {"type": "string"}, "default": [], "title": "Repo Ids"}}], "responses": {"200": {"description": "Successful Response", "content": {"application/json": {"schema": {}}}}, "422": {"description": "Validation Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/HTTPValidationError"}}}}}}}, "/api/cashfree/callback": {"get": {"tags": ["payment"], "summary": "Create Cashfree Callback", "description": "Callback URL for Cashfree payment gateway.\n\nThis endpoint is called by Cashfree after the payment is processed.\n\nArgs:\n cashfree_signature (schemas.CashfreeSignature): An instance of CashfreeSignature model.\n signature (str?): The signature string. Defaults to None.\n\nReturns:\n RedirectResponse: Redirects to the profile payments page on the frontend.", "operationId": "create_cashfree_callback_api_cashfree_callback_get", "parameters": [{"name": "signature", "in": "query", "required": false, "schema": {"type": "string", "title": "Signature"}}], "responses": {"200": {"description": "Successful Response", "content": {"application/json": {"schema": {}}}}, "422": {"description": "Validation Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/HTTPValidationError"}}}}}}}, "/api/cashfree/sub/callback": {"get": {"tags": ["payment"], "summary": "Create Cashfree Callback", "description": "Callback URL for Cashfree payment gateway.\n\nThis endpoint is called by Cashfree after the payment is processed", "operationId": "create_cashfree_callback_api_cashfree_sub_callback_get", "parameters": [{"name": "signature", "in": "query", "required": false, "schema": {"type": "string", "title": "Signature"}}], "responses": {"200": {"description": "Successful Response", "content": {"application/json": {"schema": {}}}}, "422": {"description": "Validation Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/HTTPValidationError"}}}}}}, "post": {"tags": ["payment"], "summary": "Create Cashfree Callback", "description": "Callback URL for Cashfree payment gateway.\n\nThis endpoint is called by Cashfree after the payment is processed", "operationId": "create_cashfree_callback_api_cashfree_sub_callback_post", "parameters": [{"name": "signature", "in": "query", "required": false, "schema": {"type": "string", "title": "Signature"}}], "responses": {"200": {"description": "Successful Response", "content": {"application/json": {"schema": {}}}}, "422": {"description": "Validation Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/HTTPValidationError"}}}}}}}, "/api/v1": {"get": {"tags": ["test"], "summary": "Root", "description": "This function returns a dictionary with a message \"Hello World\".\n\nArgs:\n request (Request): The request object containing headers.\n\nReturns:\n dict: A dictionary with a message \"Hello World\", account_id, email, and picture.\n\nExamples:\n >>> root()\n {'message': 'Hello World', 'account_id': 'dummy', 'email': 'dummy@gmail.com', 'picture': 'https://production-gateway.snorkell.ai/api/v1'}", "operationId": "root_api_v1_get", "responses": {"200": {"description": "Successful Response", "content": {"application/json": {"schema": {}}}}}}}, "/api/v1/health": {"get": {"tags": ["test"], "summary": "Root", "description": "This function returns a dictionary with the health status of various services.\n\nIt checks the health status of different services and returns a dictionary containing their status.\n\nReturns:\n dict: A dictionary containing the health status of various services.\n\nRaises:\n HTTPException: If there is an error while checking the health status of any service.", "operationId": "root_api_v1_health_get", "responses": {"200": {"description": "Successful Response", "content": {"application/json": {"schema": {}}}}}}}, "/api/like": {"get": {"tags": ["test"], "summary": "Root", "description": "This function is responsible for handling the root endpoint of the application.\n\nReturns:\n dict: A dictionary containing the message \"ok\".\n\nRaises:\n None: This function does not raise any exceptions.\n\nExample:\n >>> root()\n {'message': 'ok'}", "operationId": "root_api_like_get", "responses": {"200": {"description": "Successful Response", "content": {"application/json": {"schema": {}}}}}}}, "/api/dislike": {"get": {"tags": ["test"], "summary": "Root", "description": "Increment the \"dislike\" label and return a dictionary with the message \"ok\".\n\nReturns:\n dict: A dictionary with the message \"ok\".\n\nRaises:\n None\n\nExample:\n >>> root()\n {'message': 'ok'}", "operationId": "root_api_dislike_get", "responses": {"200": {"description": "Successful Response", "content": {"application/json": {"schema": {}}}}}}}, "/api/v2/db/init": {"get": {"tags": ["test"], "summary": "Root", "description": "This function initializes the database and data, and returns a dictionary with a message.\n\nReturns:\n dict: A dictionary with a message.\n\nRaises:\n Exception: If there is an error initializing the database or data.\n\nExample:\n >>> root()\n {'message': 'DB initialized'}", "operationId": "root_api_v2_db_init_get", "responses": {"200": {"description": "Successful Response", "content": {"application/json": {"schema": {}}}}}}}, "/api/contact": {"post": {"tags": ["test"], "summary": "Contact Us", "description": "Create a new user.\n\nArgs:\ncontactUs (ContactUsRequest): The contact information provided by the user.\n\nReturns:\ndict: A dictionary indicating the success of the operation.\n\nRaises:\n(if applicable)\n\nExample:\ncontact_info = ContactUsRequest(name=\"John Doe\", email=\"johndoe@example.com\", message=\"Hello\")\nresult = contact_us(contact_info)", "operationId": "contact_us_api_contact_post", "requestBody": {"content": {"application/json": {"schema": {"$ref": "#/components/schemas/ContactUsRequest"}}}, "required": true}, "responses": {"200": {"description": "Successful Response", "content": {"application/json": {"schema": {}}}}, "422": {"description": "Validation Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/HTTPValidationError"}}}}}}}, "/api/privacy-policy": {"get": {"tags": ["test"], "summary": "Privacy Policy", "description": "This function generates the privacy policy content.\n\nReturns:\n str: The privacy policy content.\n\nRaises:\n Exception: If there is an error while building the privacy policy.\n\nExample:\n >>> privacy_policy()\n 'This is the privacy policy content.'", "operationId": "privacy_policy_api_privacy_policy_get", "responses": {"200": {"description": "Successful Response", "content": {"text/html": {"schema": {"type": "string"}}}}}}}, "/api/toc": {"get": {"tags": ["test"], "summary": "Toc", "description": "This function generates the table of contents for the terms and conditions.\n\n Returns:\n str: The generated table of contents.\n\n Raises:\n Exception: If there is an error while building the terms and conditions.\n\n Example:\n >>> toc()\n 'Table of Contents:\n1. Introduction\n2. Terms of Service\n3. Privacy Policy\n...'", "operationId": "toc_api_toc_get", "responses": {"200": {"description": "Successful Response", "content": {"text/html": {"schema": {"type": "string"}}}}}}}, "/api/refund-policy": {"get": {"tags": ["test"], "summary": "Toc", "description": "This function generates a table of contents (TOC) for a refund policy.\n\n Returns:\n str: The generated table of contents.\n\n Example:\n >>> toc()\n '1. Introduction\n2. Refund Policy\n 2.1. Eligibility\n 2.2. Process\n 2.3. Timeframe\n3. Conclusion'", "operationId": "toc_api_refund_policy_get", "responses": {"200": {"description": "Successful Response", "content": {"text/html": {"schema": {"type": "string"}}}}}}}, "/api/v1/analytics/conversionRates": {"get": {"tags": ["analytics"], "summary": "Conversionrates", "description": "Get usage information for the current user.\n\nArgs:\n current_user (User, optional): The current user. Defaults to Depends(get_current_active_user).\n\nReturns:\n dict: A dictionary containing the usage information.\n\nRaises:\n (specific exceptions raised, if any)\n\nExample:\n usage = await usage(current_user)", "operationId": "conversionRates_api_v1_analytics_conversionRates_get", "responses": {"200": {"description": "Successful Response", "content": {"application/json": {"schema": {}}}}}}}, "/api/v1/analytics/usage": {"get": {"tags": ["analytics"], "summary": "Usage", "description": "Get usage information for the current user.\n\nArgs:\n current_user (User, optional): The current user. Defaults to Depends(get_current_active_user).\n\nReturns:\n dict: A dictionary containing the usage information.\n\nRaises:\n (specific exceptions raised, if any)\n\nExample:\n usage = await usage(current_user)", "operationId": "usage_api_v1_analytics_usage_get", "responses": {"200": {"description": "Successful Response", "content": {"application/json": {"schema": {}}}}}, "security": [{"OAuth2PasswordBearer": []}]}}, "/api/v1/analytics/usage/doc/gen": {"get": {"tags": ["analytics"], "summary": "Usage", "operationId": "usage_api_v1_analytics_usage_doc_gen_get", "responses": {"200": {"description": "Successful Response", "content": {"application/json": {"schema": {}}}}}, "security": [{"OAuth2PasswordBearer": []}]}}, "/api/v1/analytics/usage/admin/doc/gen": {"get": {"tags": ["analytics"], "summary": "Usage", "description": "Retrieve usage information for a user.\n\nArgs:\n- user_id (int): The ID of the user for whom the usage information is to be retrieved. Defaults to None.\n- current_user (User): The current active superuser.\n\nReturns:\n- Dict[str, Union[str, int, Dict[str, Any]]]: A dictionary containing the user's email, name, id, and usage information.\n\nRaises:\n- Exception: If user_id is not provided or if an error occurs while retrieving the usage information.\n\nExample:\nusage(\n user_id=123,\n current_user=User(id=456, email=\"test@example.com\", first_name=\"John\")\n)", "operationId": "usage_api_v1_analytics_usage_admin_doc_gen_get", "security": [{"OAuth2PasswordBearer": []}], "parameters": [{"name": "user_id", "in": "query", "required": false, "schema": {"type": "integer", "title": "User Id"}}], "responses": {"200": {"description": "Successful Response", "content": {"application/json": {"schema": {}}}}, "422": {"description": "Validation Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/HTTPValidationError"}}}}}}}, "/api/v1/analytics/usage/admin": {"get": {"tags": ["analytics"], "summary": "Usage Admin", "operationId": "usage_admin_api_v1_analytics_usage_admin_get", "security": [{"OAuth2PasswordBearer": []}], "parameters": [{"name": "user_id", "in": "query", "required": false, "schema": {"type": "integer", "title": "User Id"}}], "responses": {"200": {"description": "Successful Response", "content": {"application/json": {"schema": {}}}}, "422": {"description": "Validation Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/HTTPValidationError"}}}}}}}, "/api/v1/analytics/openai/toggle": {"get": {"tags": ["analytics"], "summary": "Open Ai Toggle", "operationId": "open_ai_toggle_api_v1_analytics_openai_toggle_get", "responses": {"200": {"description": "Successful Response", "content": {"application/json": {"schema": {}}}}}, "security": [{"OAuth2PasswordBearer": []}]}}, "/api/v1/analytics/report": {"post": {"tags": ["analytics"], "summary": "Report", "description": "Report the usage value to Firebase.\n\nArgs:\n current_user (User): The current active user.\n data (dict): The data to be reported.\n\nReturns:\n dict: A dictionary with the status of the report.\n\nRaises:\n (Add information about any exceptions raised)\n\nExample:\n usage_value = await post_error_to_firebase(current_user, data)\n return {\"status\": \"success\"}", "operationId": "report_api_v1_analytics_report_post", "requestBody": {"content": {"application/json": {"schema": {"type": "object", "title": "Data"}}}, "required": true}, "responses": {"200": {"description": "Successful Response", "content": {"application/json": {"schema": {}}}}, "422": {"description": "Validation Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/HTTPValidationError"}}}}}, "security": [{"OAuth2PasswordBearer": []}]}}, "/api/v1/analytics/redis/get": {"post": {"tags": ["analytics"], "summary": "Redis Get", "description": "Retrieve a value from the Redis database using the provided key.\n\nArgs:\n data (RedisSchema): The schema representing the data to be used for retrieving the value.\n current_user (User, optional): The current user. Defaults to Depends(get_current_active_superuser).\n\nReturns:\n The value retrieved from the Redis database.\n\nRaises:\n (Add information about any exceptions raised)\n\nExample:\n # Example usage of the redis_get function\n value = redis_get(data=some_redis_schema, current_user=some_user)", "operationId": "redis_get_api_v1_analytics_redis_get_post", "requestBody": {"content": {"application/json": {"schema": {"$ref": "#/components/schemas/RedisSchema"}}}, "required": true}, "responses": {"200": {"description": "Successful Response", "content": {"application/json": {"schema": {}}}}, "422": {"description": "Validation Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/HTTPValidationError"}}}}}, "security": [{"OAuth2PasswordBearer": []}]}}, "/api/v1/analytics/redis/set": {"post": {"tags": ["analytics"], "summary": "Redis Set", "description": "Reports the data to the system.\n\nArgs:\n data (RedisSchema): The data to be reported.\n current_user (User, optional): The current user. Defaults to Depends(get_current_active_superuser).\n\nRaises:\n None\n\nReturns:\n dict: A dictionary containing the status of the report.\n\nExample:\n data = FlagSchema(key=\"example_key\", value=\"example_value\", ttl=60)\n current_user = User(username=\"admin\", is_superuser=True)\n report(data, current_user)", "operationId": "redis_set_api_v1_analytics_redis_set_post", "requestBody": {"content": {"application/json": {"schema": {"$ref": "#/components/schemas/RedisSchema"}}}, "required": true}, "responses": {"200": {"description": "Successful Response", "content": {"application/json": {"schema": {}}}}, "422": {"description": "Validation Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/HTTPValidationError"}}}}}, "security": [{"OAuth2PasswordBearer": []}]}}, "/api/v1/analytics/flag/get": {"post": {"tags": ["analytics"], "summary": "Flag Get", "description": "Retrieve a value from the Redis database using the provided key.\n\nArgs:\n data (FlagSchema): The schema representing the data to be used for retrieving the value.\n current_user (User, optional): The current user. Defaults to Depends(get_current_active_superuser).\n\nReturns:\n The value retrieved from the Redis database.\n\nRaises:\n (Add information about any exceptions raised)\n\nExample:\n # Example usage of the flag_get function\n value = flag_get(data=some_flag_schema, current_user=some_user)", "operationId": "flag_get_api_v1_analytics_flag_get_post", "requestBody": {"content": {"application/json": {"schema": {"$ref": "#/components/schemas/FlagSchema"}}}, "required": true}, "responses": {"200": {"description": "Successful Response", "content": {"application/json": {"schema": {}}}}, "422": {"description": "Validation Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/HTTPValidationError"}}}}}, "security": [{"OAuth2PasswordBearer": []}]}}, "/api/v1/analytics/flag/set": {"post": {"tags": ["analytics"], "summary": "Flag Set", "description": "Reports the data to the system.\n\nArgs:\n data (FlagSchema): The data to be reported.\n current_user (User, optional): The current user. Defaults to Depends(get_current_active_superuser).\n\nRaises:\n None\n\nReturns:\n dict: A dictionary containing the status of the report.\n\nExample:\n data = FlagSchema(key=\"example_key\", value=\"example_value\", ttl=60)\n current_user = User(username=\"admin\", is_superuser=True)\n report(data, current_user)", "operationId": "flag_set_api_v1_analytics_flag_set_post", "requestBody": {"content": {"application/json": {"schema": {"$ref": "#/components/schemas/FlagSchema"}}}, "required": true}, "responses": {"200": {"description": "Successful Response", "content": {"application/json": {"schema": {}}}}, "422": {"description": "Validation Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/HTTPValidationError"}}}}}, "security": [{"OAuth2PasswordBearer": []}]}}, "/api/v1/analytics/flag/get/all": {"get": {"tags": ["analytics"], "summary": "Flag Set", "description": "Reports the data to the system.\n\nArgs:\n current_user (User, optional): The current user. Defaults to Depends(get_current_active_superuser).\n\nRaises:\n None\n\nReturns:\n dict: A dictionary containing the status of the report.\n\nExample:\n data = FlagSchema(key=\"example_key\", value=\"example_value\", ttl=60)\n current_user = User(username=\"admin\", is_superuser=True)\n report(data, current_user)", "operationId": "flag_set_api_v1_analytics_flag_get_all_get", "responses": {"200": {"description": "Successful Response", "content": {"application/json": {"schema": {}}}}}, "security": [{"OAuth2PasswordBearer": []}]}}, "/api/v1/analytics/usage/count": {"get": {"tags": ["analytics"], "summary": "Get User Count", "description": "Get the total count of users and repositories.\n\nThis function retrieves the total count of users and repositories from the data access layer.\nIf the count is not available in the Redis cache, it fetches the count from the respective services\nand stores it in the cache with a TTL of 60 minutes.\n\nReturns:\n dict: A dictionary containing the count of users and repositories.\n\nRaises:\n SomeException: An exception that may occur during the retrieval of user or repository count.\n\nExamples:\n Usage of get_user_count():\n >>> result = get_user_count()\n >>> print(result)\n {'users': 100, 'repos': 50}", "operationId": "get_user_count_api_v1_analytics_usage_count_get", "responses": {"200": {"description": "Successful Response", "content": {"application/json": {"schema": {}}}}}}}, "/api/v1/analytics/usage/reset": {"get": {"tags": ["analytics"], "summary": "Reset User Count", "description": "Get the total count of users and repositories.\n\nThis function retrieves the total count of users and repositories from the data access layer.\nIf the count is not available in the Redis cache, it fetches the count from the respective services\nand stores it in the cache with a TTL of 60 minutes.\n\nReturns:\n dict: A dictionary containing the count of users and repositories.\n\nRaises:\n SomeException: An exception that may occur during the retrieval of user or repository count.\n\nExamples:\n Usage of get_user_count():\n >>> result = get_user_count()\n >>> print(result)\n {'users': 100, 'repos': 50}", "operationId": "reset_user_count_api_v1_analytics_usage_reset_get", "responses": {"200": {"description": "Successful Response", "content": {"application/json": {"schema": {}}}}}, "security": [{"OAuth2PasswordBearer": []}]}}, "/api/v1/analytics/usage/githubApp": {"get": {"tags": ["analytics"], "summary": "Get Github Stats", "operationId": "get_github_stats_api_v1_analytics_usage_githubApp_get", "security": [{"OAuth2PasswordBearer": []}], "parameters": [{"name": "orgName", "in": "query", "required": false, "schema": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Orgname"}}, {"name": "repoName", "in": "query", "required": false, "schema": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Reponame"}}, {"name": "id", "in": "query", "required": false, "schema": {"anyOf": [{"type": "integer"}, {"type": "null"}], "title": "Id"}}], "responses": {"200": {"description": "Successful Response", "content": {"application/json": {"schema": {}}}}, "422": {"description": "Validation Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/HTTPValidationError"}}}}}}}, "/api/v1/generate/documentation": {"post": {"tags": ["doc_gen"], "summary": "Send Message", "description": "Send a message to the user.\n\nArgs:\n chetnaRequest (ChetnaRequest): The request object containing the message to be sent.\n current_user (User, optional): The current user sending the message. Defaults to Depends(get_current_user_from_api_key).\n\nReturns:\n StreamingResponse: A streaming response containing the message.\n\nRaises:\n (if applicable): Add information about any exceptions that may be raised.\n\nExample:\n Example usage of the send_message function:\n\n send_message(chetnaRequest, current_user)", "operationId": "send_message_api_v1_generate_documentation_post", "parameters": [{"name": "api-key", "in": "header", "required": false, "schema": {"type": "string", "default": "", "title": "Api-Key"}}], "requestBody": {"required": true, "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ChetnaRequest"}}}}, "responses": {"200": {"description": "Successful Response", "content": {"application/json": {"schema": {}}}}, "422": {"description": "Validation Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/HTTPValidationError"}}}}}}}, "/api/app/github/webhook": {"post": {"tags": ["github_app"], "summary": "Handle Webhook", "description": "Handles the webhook event from GitHub.\n\nArgs:\n request (Request): The HTTP request object containing the payload and headers.\n\nReturns:\n dict: A dictionary indicating the success of the operation.\n\nRaises:\n HTTPException: If the 'X-GitHub-Event' header is not found in the request.", "operationId": "handle_webhook_api_app_github_webhook_post", "responses": {"200": {"description": "Successful Response", "content": {"application/json": {"schema": {}}}}}}}, "/api/app/github/get/experimental": {"post": {"tags": ["github_app"], "summary": "Run Pubsub Experiment", "description": "Runs a pub/sub experiment.\n\nThis function runs a pub/sub experiment by setting the user and API token to the provided merged pull request\nand then starts a document generation process using the specified vendor strategy.\n\nArgs:\n merged_pull_request (MergedPullRequest): The merged pull request object.\n current_user (schemas.User?): The current active user. Defaults to Depends(get_current_user_from_api_key).\n snorkell_api_key (str?): The snorkell API key. Defaults to Header(default=None).", "operationId": "run_pubsub_experiment_api_app_github_get_experimental_post", "parameters": [{"name": "snorkell-api-key", "in": "header", "required": false, "schema": {"type": "string", "title": "Snorkell-Api-Key"}}, {"name": "api-key", "in": "header", "required": false, "schema": {"type": "string", "default": "", "title": "Api-Key"}}], "requestBody": {"required": true, "content": {"application/json": {"schema": {"$ref": "#/components/schemas/MergedPullRequest"}}}}, "responses": {"200": {"description": "Successful Response", "content": {"application/json": {"schema": {}}}}, "422": {"description": "Validation Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/HTTPValidationError"}}}}}}}, "/api/app/github/get/repositories": {"get": {"tags": ["github_app"], "summary": "Get All Repositories", "description": "Retrieves all repositories for the current user.\n\nArgs:\n current_user (schemas.User): The current user object obtained from the authentication.\n\nReturns:\n list: A list of repositories for the current user.\n\nRaises:\n This function does not raise any exceptions.\n\nExample:\n Example usage of get_all_repositories:\n\n repositories = get_all_repositories()", "operationId": "get_all_repositories_api_app_github_get_repositories_get", "responses": {"200": {"description": "Successful Response", "content": {"application/json": {"schema": {}}}}}, "security": [{"OAuth2PasswordBearer": []}]}}, "/api/app/github/get/repositories/admin": {"get": {"tags": ["github_app"], "summary": "Get All Repositories", "description": "Retrieves all repositories for the current user.\n\nArgs:\n current_user (schemas.User): The current user object obtained from the authentication.\n login_id (str, optional): The login ID of the user. Defaults to None.\n\nReturns:\n List[Repository]: A list of repositories for the current user.\n\nRaises:\n Exception: If there is an error retrieving the repositories.\n\nExample:\n repositories = get_all_repositories(current_user, login_id)", "operationId": "get_all_repositories_api_app_github_get_repositories_admin_get", "security": [{"OAuth2PasswordBearer": []}], "parameters": [{"name": "login_id", "in": "query", "required": false, "schema": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Login Id"}}], "responses": {"200": {"description": "Successful Response", "content": {"application/json": {"schema": {}}}}, "422": {"description": "Validation Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/HTTPValidationError"}}}}}}}, "/api/app/github/migrate/repositories/admin": {"post": {"tags": ["github_app"], "summary": "Get All Repositories", "description": "Retrieves all repositories for the current user.\n\nArgs:\n super_user (schemas.User, optional): The super user object obtained from the current active superuser. Defaults to Depends(get_current_active_superuser).\n\nReturns:\n List: A list of repositories for the current user.\n\nRaises:\n None\n\nExample:\n # Example usage:\n repositories = get_all_repositories(my_github_app, my_super_user)", "operationId": "get_all_repositories_api_app_github_migrate_repositories_admin_post", "responses": {"200": {"description": "Successful Response", "content": {"application/json": {"schema": {}}}}}, "security": [{"OAuth2PasswordBearer": []}]}}, "/api/app/github/install/repositories/admin": {"get": {"tags": ["github_app"], "summary": "Get All Repositories", "description": "Retrieves all repositories for the current user.\n\nArgs:\n current_user (schemas.User): The current user object obtained from the authentication.\n login_id (str): The login ID of the user.\n should_install (bool): A flag indicating whether to install the repositories.\n\nReturns:\n List[Repository]: A list of repositories for the current user.\n\nRaises:\n Exception: If an error occurs during the repository retrieval process.\n\nExample:\n Example usage of get_all_repositories:\n ```python\n repositories = get_all_repositories(current_user, login_id, should_install)\n for repository in repositories:\n print(repository.name)\n ```", "operationId": "get_all_repositories_api_app_github_install_repositories_admin_get", "security": [{"OAuth2PasswordBearer": []}], "parameters": [{"name": "login_id", "in": "query", "required": false, "schema": {"type": "string", "title": "Login Id"}}, {"name": "should_install", "in": "query", "required": false, "schema": {"type": "boolean", "default": false, "title": "Should Install"}}], "responses": {"200": {"description": "Successful Response", "content": {"application/json": {"schema": {}}}}, "422": {"description": "Validation Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/HTTPValidationError"}}}}}}}, "/api/app/github/install/selected/repository/admin": {"get": {"tags": ["github_app"], "summary": "Get All Repositories", "description": "Retrieves all repositories for the current user.\n\nArgs:\n org_name (str): Name of the organization.\n installation_id (str): The installation ID.\n repo_name (str): Name of the repository.\n user_github_login_id (str): The login ID of the user.\n current_user (schemas.User, optional): The current user object obtained from the authentication. Defaults to Depends(get_current_active_superuser).\n\nReturns:\n List[Repository]: A list of repositories for the current user.\n\nRaises:\n HTTPException: If mandatory parameters are not present or if an error occurs during the repository retrieval or installation process.", "operationId": "get_all_repositories_api_app_github_install_selected_repository_admin_get", "security": [{"OAuth2PasswordBearer": []}], "parameters": [{"name": "org_name", "in": "query", "required": false, "schema": {"type": "string", "title": "Org Name"}}, {"name": "installation_id", "in": "query", "required": false, "schema": {"type": "string", "title": "Installation Id"}}, {"name": "repo_name", "in": "query", "required": false, "schema": {"type": "string", "title": "Repo Name"}}, {"name": "user_github_login_id", "in": "query", "required": false, "schema": {"type": "string", "title": "User Github Login Id"}}], "responses": {"200": {"description": "Successful Response", "content": {"application/json": {"schema": {}}}}, "422": {"description": "Validation Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/HTTPValidationError"}}}}}}}, "/api/app/github/delete/repository": {"delete": {"tags": ["github_app"], "summary": "Get All Repositories", "description": "Retrieves all repositories for the current user.\n\nArgs:\n current_user (schemas.User): The current user object obtained from the authentication.\n id (int): The id of the repository to retrieve.\n\nReturns:\n List: A list of repositories for the current user.\n\nRaises:\n Exception: If there is an error while retrieving the repositories.\n\nExample:\n # Example usage of get_all_repositories\n repositories = get_all_repositories(current_user, 123)", "operationId": "get_all_repositories_api_app_github_delete_repository_delete", "security": [{"OAuth2PasswordBearer": []}], "parameters": [{"name": "id", "in": "query", "required": false, "schema": {"type": "integer", "title": "Id"}}], "responses": {"200": {"description": "Successful Response", "content": {"application/json": {"schema": {}}}}, "422": {"description": "Validation Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/HTTPValidationError"}}}}}}}, "/api/app/github/delete/repository/admin": {"delete": {"tags": ["github_app"], "summary": "Get All Repositories", "description": "Retrieves all repositories for the current user.\n\nArgs:\n current_user (schemas.User): The current user object obtained from the authentication.\n id (int): The id of the repository to retrieve.\n\nReturns:\n List: A list of repositories for the current user.\n\nRaises:\n Exception: If there is an error while retrieving the repositories.", "operationId": "get_all_repositories_api_app_github_delete_repository_admin_delete", "security": [{"OAuth2PasswordBearer": []}], "parameters": [{"name": "org_name", "in": "query", "required": false, "schema": {"type": "string", "title": "Org Name"}}, {"name": "installation_id", "in": "query", "required": false, "schema": {"type": "string", "title": "Installation Id"}}, {"name": "repo_name", "in": "query", "required": false, "schema": {"type": "string", "title": "Repo Name"}}], "responses": {"200": {"description": "Successful Response", "content": {"application/json": {"schema": {}}}}, "422": {"description": "Validation Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/HTTPValidationError"}}}}}}}, "/api/app/github/generate/documentation/status": {"post": {"tags": ["github_app"], "summary": "Get Status Of Documentation Gen", "operationId": "get_status_of_documentation_gen_api_app_github_generate_documentation_status_post", "parameters": [{"name": "api-key", "in": "header", "required": false, "schema": {"type": "string", "default": "", "title": "Api-Key"}}], "requestBody": {"required": true, "content": {"application/json": {"schema": {"$ref": "#/components/schemas/MergedPullRequest"}}}}, "responses": {"200": {"description": "Successful Response", "content": {"application/json": {"schema": {}}}}, "422": {"description": "Validation Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/HTTPValidationError"}}}}}}}, "/api/app/github/generate/documentation": {"post": {"tags": ["github_app"], "summary": "Get All Repositories", "description": "Generates documentation for a merged pull request.\n\nArgs:\n merged_pull_request (MergedPullRequest): The merged pull request object.\n current_user (schemas.User, optional): The current user object obtained from the API key. Defaults to Depends(get_current_user_from_api_key).\n response_class: The response class for streaming the generated documentation.\n\nReturns:\n StreamingResponse: A streaming response containing the generated documentation.\n\nRaises:\n Exception: If an error occurs during the documentation generation process.\n\nExample:\n merged_pull_request = MergedPullRequest(...)\n current_user = schemas.User(...)\n response = get_all_repositories(merged_pull_request, current_user)", "operationId": "get_all_repositories_api_app_github_generate_documentation_post", "parameters": [{"name": "response_class", "in": "query", "required": false, "schema": {"title": "Response Class"}}, {"name": "api-key", "in": "header", "required": false, "schema": {"type": "string", "default": "", "title": "Api-Key"}}], "requestBody": {"required": true, "content": {"application/json": {"schema": {"$ref": "#/components/schemas/MergedPullRequest"}}}}, "responses": {"200": {"description": "Successful Response", "content": {"application/json": {"schema": {}}}}, "422": {"description": "Validation Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/HTTPValidationError"}}}}}}}, "/api/app/github/modified-functions": {"get": {"tags": ["github_app"], "summary": "Get Modified Functions", "description": "Get modified functions.\n\nReturns:\n Awaitable: A coroutine that returns modified lines.\n\nRaises:\n This function does not raise any exceptions.\n\nExample:\n The following example demonstrates how to use get_modified_functions:\n\n ```python\n modified_lines = await get_modified_functions()\n ```", "operationId": "get_modified_functions_api_app_github_modified_functions_get", "responses": {"200": {"description": "Successful Response", "content": {"application/json": {"schema": {}}}}}}}, "/api/app/github/report/errors": {"post": {"tags": ["github_app"], "summary": "Get Modified Functions", "description": "Get modified functions.\n\nArgs:\n message (str): Error Message.\n repo_details (dict): Repo details.\n\nReturns:\n dict: A dictionary containing the message \"ok\".\n\nRaises:\n This function does not raise any exceptions.\n\nExample:\n get_modified_functions(\"Sample error message\", {\"repo_name\": \"example_repo\"})", "operationId": "get_modified_functions_api_app_github_report_errors_post", "requestBody": {"content": {"application/json": {"schema": {"$ref": "#/components/schemas/Body_get_modified_functions_api_app_github_report_errors_post"}}}, "required": true}, "responses": {"200": {"description": "Successful Response", "content": {"application/json": {"schema": {}}}}, "422": {"description": "Validation Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/HTTPValidationError"}}}}}}}, "/api/app/github/list": {"get": {"tags": ["github_app"], "summary": "Get User Count", "description": "Get the total count of users and repositories.\n\nThis function retrieves the total count of users and repositories from the data access layer.\nIf the count is not available in the Redis cache, it fetches the count from the respective services\nand stores it in the cache with a TTL of 60 minutes.\n\nArgs:\n org_name (str?): The name of the organization. Defaults to None.\n current_user (schemas.User): The current active user.\n\nReturns:\n dict: A dictionary containing the count of users and repositories.\n\nRaises:\n SomeException: An exception that may occur during the retrieval of user or repository count.\n\nExamples:\n Usage of get_user_count():\n >>> result = get_user_count()\n >>> print(result)\n {'users': 100, 'repos': 50}", "operationId": "get_user_count_api_app_github_list_get", "security": [{"OAuth2PasswordBearer": []}], "parameters": [{"name": "orgName", "in": "query", "required": false, "schema": {"type": "string", "title": "Orgname"}}], "responses": {"200": {"description": "Successful Response", "content": {"application/json": {"schema": {}}}}, "422": {"description": "Validation Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/HTTPValidationError"}}}}}}}, "/api/app/github/start/repo/documentation/admin": {"get": {"tags": ["github_app"], "summary": "Start Repo Documentation Admin", "description": "Retrieves all repositories for the current user.\n\nArgs:\n org_name (str): Name of the organization.\n installation_id (str): The installation ID.\n repo_name (str): Name of the repository.\n user_github_login_id (str): The login ID of the user.\n is_vpc_request (bool): A boolean indicating if the request is from a VPC.\n\nReturns:\n dict: A dictionary with a message indicating the status of the operation.\n\nRaises:\n HTTPException: If mandatory parameters are not present or if an error occurs during the repository retrieval or installation process.", "operationId": "start_repo_documentation_admin_api_app_github_start_repo_documentation_admin_get", "parameters": [{"name": "org_name", "in": "query", "required": false, "schema": {"type": "string", "title": "Org Name"}}, {"name": "installation_id", "in": "query", "required": false, "schema": {"type": "string", "title": "Installation Id"}}, {"name": "repo_name", "in": "query", "required": false, "schema": {"type": "string", "title": "Repo Name"}}, {"name": "user_github_login_id", "in": "query", "required": false, "schema": {"type": "string", "title": "User Github Login Id"}}, {"name": "request-source", "in": "header", "required": false, "schema": {"type": "string", "default": "", "title": "Request-Source"}}], "responses": {"200": {"description": "Successful Response", "content": {"application/json": {"schema": {}}}}, "422": {"description": "Validation Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/HTTPValidationError"}}}}}}}, "/api/app/github/start/repo/documentation": {"get": {"tags": ["github_app"], "summary": "Start Repo Documentation", "description": "Retrieves all repositories for the current user.\n\nArgs:\n org_name (str): Name of the organization.\n installation_id (str): The installation ID.\n repo_name (str): Name of the repository.\n current_user (schemas.User?): The current user object obtained from the authentication. Defaults to Depends(get_current_active_superuser).\n\nReturns:\n List[Repository]: A list of repositories for the current user.\n\nRaises:\n HTTPException: If mandatory parameters are not present or if an error occurs during the repository retrieval or installation process.", "operationId": "start_repo_documentation_api_app_github_start_repo_documentation_get", "security": [{"OAuth2PasswordBearer": []}], "parameters": [{"name": "org_name", "in": "query", "required": false, "schema": {"type": "string", "title": "Org Name"}}, {"name": "installation_id", "in": "query", "required": false, "schema": {"type": "string", "title": "Installation Id"}}, {"name": "repo_name", "in": "query", "required": false, "schema": {"type": "string", "title": "Repo Name"}}], "responses": {"200": {"description": "Successful Response", "content": {"application/json": {"schema": {}}}}, "422": {"description": "Validation Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/HTTPValidationError"}}}}}}}, "/api/app/github/status/repo/documentation": {"get": {"tags": ["github_app"], "summary": "Status Repo Documentation", "description": "Retrieves all repositories for the current user.\n\nArgs:\n org_name (str): Name of the organization.\n installation_id (str): The installation ID.\n repo_name (str): Name of the repository.\n user_github_login_id (str): The login ID of the user.\n current_user (schemas.User, optional): The current user object obtained from the authentication. Defaults to Depends(get_current_active_superuser).\n\nReturns:\n List[Repository]: A list of repositories for the current user.\n\nRaises:\n HTTPException: If mandatory parameters are not present or if an error occurs during the repository retrieval or installation process.", "operationId": "status_repo_documentation_api_app_github_status_repo_documentation_get", "security": [{"OAuth2PasswordBearer": []}], "parameters": [{"name": "org_name", "in": "query", "required": false, "schema": {"type": "string", "title": "Org Name"}}, {"name": "installation_id", "in": "query", "required": false, "schema": {"type": "string", "title": "Installation Id"}}, {"name": "repo_name", "in": "query", "required": false, "schema": {"type": "string", "title": "Repo Name"}}], "responses": {"200": {"description": "Successful Response", "content": {"application/json": {"schema": {}}}}, "422": {"description": "Validation Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/HTTPValidationError"}}}}}}}, "/api/app/azDevops/generate/diff/doc": {"post": {"tags": ["azure_devops"], "summary": "Generate Diff Docs", "description": "Generate documentation for the merged pull request.\n\nThis function generates documentation for the merged pull request by setting the user and vendor, encoding the API token, and creating and validating the repository. It then starts the documentation generation process and returns a dictionary containing a message about the documentation generation and the validity of the request.\n\nArgs:\n merged_pull_request (AzureDevopsDocGenRequest): The merged pull request for which documentation needs to be generated.\n current_user (schemas.User?): The current user. Defaults to Depends(get_current_user_from_api_key).\n\nReturns:\n Dict[str, Union[str, bool]]: A dictionary containing the message about documentation generation and the validity of the request.", "operationId": "generate_diff_docs_api_app_azDevops_generate_diff_doc_post", "parameters": [{"name": "api-key", "in": "header", "required": false, "schema": {"type": "string", "default": "", "title": "Api-Key"}}], "requestBody": {"required": true, "content": {"application/json": {"schema": {"$ref": "#/components/schemas/AzureDevopsDocGenRequest"}}}}, "responses": {"200": {"description": "Successful Response", "content": {"application/json": {"schema": {}}}}, "422": {"description": "Validation Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/HTTPValidationError"}}}}}}}, "/api/app/azDevops/status/diff/doc": {"post": {"tags": ["azure_devops"], "summary": "Status Diff Docs", "description": "Generate documentation for the merged pull request.\n\nThis function generates documentation for the merged pull request by utilizing the DocumentationGenerator class.\n\nArgs:\n merged_pull_request (AzureDevopsDocGenRequest): The merged pull request for which documentation needs to be generated.\n current_user (schemas.User?): The current user. Defaults to Depends(get_current_user_from_api_key).\n\nReturns:\n DocRunStatus: The status of the documentation run.", "operationId": "status_diff_docs_api_app_azDevops_status_diff_doc_post", "parameters": [{"name": "api-key", "in": "header", "required": false, "schema": {"type": "string", "default": "", "title": "Api-Key"}}], "requestBody": {"required": true, "content": {"application/json": {"schema": {"$ref": "#/components/schemas/AzureDevopsDocGenRequest"}}}}, "responses": {"200": {"description": "Successful Response", "content": {"application/json": {"schema": {}}}}, "422": {"description": "Validation Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/HTTPValidationError"}}}}}}}, "/api/app/azDevops/generate/html/doc": {"post": {"tags": ["azure_devops"], "summary": "Generate Html Docs", "description": "Generate HTML documentation for the merged pull request.\n\nThis function generates documentation for the merged pull request by setting the user and vendor, encoding the API token, and creating and validating the repository. It then starts the documentation generation process and returns a dictionary containing a message about the documentation generation and the validity of the request.\n\nArgs:\n merged_pull_request (AzureDevopsDocGenRequest): The merged pull request for which documentation needs to be generated.\n current_user (schemas.User?): The current user. Defaults to Depends(get_current_user_from_api_key).\n\nReturns:\n Dict[str, Union[str, bool]]: A dictionary containing the message about documentation generation and the validity of the request.", "operationId": "generate_html_docs_api_app_azDevops_generate_html_doc_post", "parameters": [{"name": "api-key", "in": "header", "required": false, "schema": {"type": "string", "default": "", "title": "Api-Key"}}], "requestBody": {"required": true, "content": {"application/json": {"schema": {"$ref": "#/components/schemas/RepoDocHTMLGenRequest"}}}}, "responses": {"200": {"description": "Successful Response", "content": {"application/json": {"schema": {}}}}, "422": {"description": "Validation Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/HTTPValidationError"}}}}}}}, "/api/app/azDevops/generate/html/doc/status": {"post": {"tags": ["azure_devops"], "summary": "Status Html Docs", "description": "Generate HTML documentation for the merged pull request.\n\nThis function generates documentation for the merged pull request by setting the user and vendor, encoding the API token, and creating and validating the repository. It then starts the documentation generation process and returns a dictionary containing a message about the documentation generation and the validity of the request.\n\nArgs:\n merged_pull_request (AzureDevopsDocGenRequest): The merged pull request for which documentation needs to be generated.\n current_user (schemas.User?): The current user. Defaults to Depends(get_current_user_from_api_key).\n\nReturns:\n Dict[str, Union[str, bool]]: A dictionary containing the message about documentation generation and the validity of the request.", "operationId": "status_html_docs_api_app_azDevops_generate_html_doc_status_post", "parameters": [{"name": "api-key", "in": "header", "required": false, "schema": {"type": "string", "default": "", "title": "Api-Key"}}], "requestBody": {"required": true, "content": {"application/json": {"schema": {"$ref": "#/components/schemas/RepoDocHTMLGenRequest"}}}}, "responses": {"200": {"description": "Successful Response", "content": {"application/json": {"schema": {}}}}, "422": {"description": "Validation Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/HTTPValidationError"}}}}}}}, "/api/app/azDevops/generate/repo/doc/admin": {"post": {"tags": ["azure_devops"], "summary": "Generate Docs Admin", "description": "Generate documentation for the merged pull request.\n\nThis function generates documentation for the merged pull request. It starts documenting the repository using the given request and returns a dictionary containing a message about documentation generation and the validity of the request.\n\nArgs:\n request (RepoDocStringGenRequest): The merged pull request for which documentation needs to be generated.\n is_vpc_request (bool?): A boolean indicating if the request is from a VPC. Defaults to Depends(is_request_from_vpc).\n\nReturns:\n Dict[str, Union[str, bool]]: A dictionary containing the message about documentation generation and the validity of the request.", "operationId": "generate_docs_admin_api_app_azDevops_generate_repo_doc_admin_post", "parameters": [{"name": "request-source", "in": "header", "required": false, "schema": {"type": "string", "default": "", "title": "Request-Source"}}], "requestBody": {"required": true, "content": {"application/json": {"schema": {"$ref": "#/components/schemas/RepoDocStringGenRequest"}}}}, "responses": {"200": {"description": "Successful Response", "content": {"application/json": {"schema": {}}}}, "422": {"description": "Validation Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/HTTPValidationError"}}}}}}}, "/api/app/azDevops/generate/repo/doc": {"post": {"tags": ["azure_devops"], "summary": "Generate Docs", "description": "Generate documentation for the merged pull request.\n\nThis function generates documentation for the merged pull request. It sets the current user and vendor, retrieves the git repository and app, validates the request, and triggers the repository documentation generation.\n\nArgs:\n request (RepoDocStringGenRequest): The merged pull request for which documentation needs to be generated.\n current_user (schemas.User?): The current user. Defaults to Depends(get_current_user_from_api_key).\n\nReturns:\n Dict[str, Union[str, bool]]: A dictionary containing the message about documentation generation and the validity of the request.\n\nRaises:\n HTTPException: If the Git App is not found for the repository, if the Git App token is not found for the repository, or if the Git App is not active, not installed, or deleted.", "operationId": "generate_docs_api_app_azDevops_generate_repo_doc_post", "requestBody": {"content": {"application/json": {"schema": {"$ref": "#/components/schemas/RepoDocStringGenRequest"}}}, "required": true}, "responses": {"200": {"description": "Successful Response", "content": {"application/json": {"schema": {}}}}, "422": {"description": "Validation Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/HTTPValidationError"}}}}}, "security": [{"OAuth2PasswordBearer": []}]}}, "/api/app/azDevops/status/repo/doc": {"post": {"tags": ["azure_devops"], "summary": "Status Docs", "description": "Generate documentation for the merged pull request.\n\nIt sets the current user and vendor for the request and then retrieves the repository run status.\n\nArgs:\n request (RepoDocStringGenRequest): The merged pull request for which documentation needs to be generated.\n current_user (schemas.User?): The current user. Defaults to Depends(get_current_user_from_api_key).\n\nReturns:\n Dict[str, Union[str, bool]]: A dictionary containing the message about documentation generation and the validity of the request.", "operationId": "status_docs_api_app_azDevops_status_repo_doc_post", "requestBody": {"content": {"application/json": {"schema": {"$ref": "#/components/schemas/RepoDocStringGenRequest"}}}, "required": true}, "responses": {"200": {"description": "Successful Response", "content": {"application/json": {"schema": {}}}}, "422": {"description": "Validation Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/HTTPValidationError"}}}}}, "security": [{"OAuth2PasswordBearer": []}]}}, "/api/v1/coupon/get/all": {"get": {"tags": ["coupon"], "summary": "Get Coupon", "description": "Get usage information for the current user.\n\nArgs:\n current_user (User, optional): The current user. Defaults to Depends(get_current_active_user).\n\nReturns:\n dict: A dictionary containing the usage information.\n\nRaises:\n (specific exceptions raised, if any)\n\nExample:\n usage = await usage(current_user)", "operationId": "get_coupon_api_v1_coupon_get_all_get", "responses": {"200": {"description": "Successful Response", "content": {"application/json": {"schema": {}}}}}, "security": [{"OAuth2PasswordBearer": []}]}}, "/api/v1/coupon/get/all/admin": {"get": {"tags": ["coupon"], "summary": "Get Coupon", "description": "Get usage information for the current user.\n\nArgs:\n super_user (User, optional): The super user. Defaults to Depends(get_current_active_superuser).\n\nReturns:\n dict: A dictionary containing the usage information.\n\nRaises:\n (specific exceptions raised, if any)\n\nExample:\n Get the list of all coupons:\n usage = await get_coupon(super_user)", "operationId": "get_coupon_api_v1_coupon_get_all_admin_get", "responses": {"200": {"description": "Successful Response", "content": {"application/json": {"schema": {}}}}}, "security": [{"OAuth2PasswordBearer": []}]}}, "/api/v1/coupon/create": {"post": {"tags": ["coupon"], "summary": "Create", "description": "Create a new coupon.\n\nArgs:\n coupon_data (Coupon): The data for the new coupon.\n super_user (User, optional): The super user creating the coupon. Defaults to Depends(get_current_active_superuser).\n\nReturns:\n Coupon: The newly created coupon.\n\nRaises:\n Exception: If an error occurs while creating the coupon.\n\nExample:\n coupon_data = Coupon(...)\n super_user = User(...)\n created_coupon = create(coupon_data, super_user)", "operationId": "create_api_v1_coupon_create_post", "requestBody": {"content": {"application/json": {"schema": {"$ref": "#/components/schemas/Coupon"}}}, "required": true}, "responses": {"200": {"description": "Successful Response", "content": {"application/json": {"schema": {}}}}, "422": {"description": "Validation Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/HTTPValidationError"}}}}}, "security": [{"OAuth2PasswordBearer": []}]}}, "/api/v1/coupon/update": {"post": {"tags": ["coupon"], "summary": "Create", "description": "Update the coupon data.\n\nArgs:\n- coupon_data (Coupon): The data for the coupon to be updated.\n- current_user (User, optional): The current user. Defaults to the result of get_current_active_superuser.\n\nReturns:\nCoupon: The updated coupon data.\n\nRaises:\n- Exception: If an error occurs during the update process.\n\nExample:\n```\nupdated_coupon = create(coupon_data, current_user)\n```", "operationId": "create_api_v1_coupon_update_post", "requestBody": {"content": {"application/json": {"schema": {"$ref": "#/components/schemas/Coupon"}}}, "required": true}, "responses": {"200": {"description": "Successful Response", "content": {"application/json": {"schema": {}}}}, "422": {"description": "Validation Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/HTTPValidationError"}}}}}, "security": [{"OAuth2PasswordBearer": []}]}}, "/api/v1/coupon/redeem": {"post": {"tags": ["coupon"], "summary": "Create", "description": "This function creates a coupon for the current user and sends a notification to Slack.\nIt retrieves the unused coupons for the user, converts them to a string representation, and sends the redeemed coupon details to Slack.\nFinally, it returns a dictionary with the status and a success message.\n\nArgs:\n current_user (User): The current active user.\n\nRaises:\n Exception: If there is an error in getting or redeeming the coupon.\n\nReturns:\n dict: A dictionary containing the status and message of the operation.\n\nExample:\n create(current_user)", "operationId": "create_api_v1_coupon_redeem_post", "requestBody": {"content": {"application/json": {"schema": {"$ref": "#/components/schemas/Body_create_api_v1_coupon_redeem_post"}}}, "required": true}, "responses": {"200": {"description": "Successful Response", "content": {"application/json": {"schema": {}}}}, "422": {"description": "Validation Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/HTTPValidationError"}}}}}, "security": [{"OAuth2PasswordBearer": []}]}}, "/.well-known/pki-validation/{filename}": {"get": {"summary": "Domain Verification", "description": "This function performs domain verification.\n\n Args:\n filename (str): The name of the file to be verified.\n\n Returns:\n PlainTextResponse: A response object containing the content of the file.\n\n Raises:\n None: This function does not raise any exceptions.\n\n Example:\n >>> domain_verification('example.txt')\n PlainTextResponse(content='''C22A9052AAB5D5F5F21D2286C4A7A73990498E1D8781CA3555977221E87C246C\ncomodoca.com\ne78b59daef60d35\n''')\n\n Note:\n - This function assumes that the file exists and is accessible.\n - The content of the file should be in plain text format.", "operationId": "domain_verification__well_known_pki_validation__filename__get", "parameters": [{"name": "filename", "in": "path", "required": true, "schema": {"type": "string", "title": "Filename"}}], "responses": {"200": {"description": "Successful Response", "content": {"application/json": {"schema": {}}}}, "422": {"description": "Validation Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/HTTPValidationError"}}}}}}}, "/metrics": {"get": {"summary": "Metrics", "description": "Endpoint that serves Prometheus metrics.", "operationId": "metrics_metrics_get", "responses": {"200": {"description": "Successful Response", "content": {"application/json": {"schema": {}}}}}}}}, "components": {"schemas": {"AzureDevopsDocGenRequest": {"properties": {"base_branch": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Base Branch"}, "commit_sha": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Commit Sha"}, "head_branch": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Head Branch"}, "head_branch_details": {"anyOf": [{"$ref": "#/components/schemas/GitBranchDetails"}, {"type": "null"}]}, "api_token": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Api Token"}, "git_repo": {"$ref": "#/components/schemas/GitRepo"}, "installation_id": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Installation Id"}, "organization_name": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Organization Name"}, "repo_name": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Repo Name"}, "full_repo_name": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Full Repo Name"}, "user": {"anyOf": [{"$ref": "#/components/schemas/User"}, {"type": "null"}]}, "commit_message": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Commit Message"}, "vendor": {"anyOf": [{"$ref": "#/components/schemas/GitVendor"}, {"type": "null"}], "default": "GITHUB"}, "git_app": {"anyOf": [{"$ref": "#/components/schemas/GithubApp"}, {"type": "null"}]}}, "type": "object", "required": ["git_repo"], "title": "AzureDevopsDocGenRequest"}, "Body_create_api_v1_coupon_redeem_post": {"properties": {"redeem_type": {"type": "string", "title": "Redeem Type", "description": "Redeem Type of the coupon. Valid values are: AMAZON, INDIA_UPI"}, "redeem_id": {"type": "string", "title": "Redeem Id", "description": "The code of the coupon to be redeemed. Empty for Amazon coupons."}}, "type": "object", "required": ["redeem_type", "redeem_id"], "title": "Body_create_api_v1_coupon_redeem_post"}, "Body_get_modified_functions_api_app_github_report_errors_post": {"properties": {"message": {"type": "string", "title": "Message", "description": "Error Message"}, "repo_details": {"type": "object", "title": "Repo Details", "description": "Repo details"}}, "type": "object", "required": ["message", "repo_details"], "title": "Body_get_modified_functions_api_app_github_report_errors_post"}, "Body_login_api_login_post": {"properties": {"grant_type": {"anyOf": [{"type": "string", "pattern": "password"}, {"type": "null"}], "title": "Grant Type"}, "username": {"type": "string", "title": "Username"}, "password": {"type": "string", "title": "Password"}, "scope": {"type": "string", "title": "Scope", "default": ""}, "client_id": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Client Id"}, "client_secret": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Client Secret"}}, "type": "object", "required": ["username", "password"], "title": "Body_login_api_login_post"}, "ChetnaRequest": {"properties": {"content": {"type": "string", "title": "Content"}, "fileType": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Filetype"}, "contentList": {"anyOf": [{"items": {"$ref": "#/components/schemas/Context"}, "type": "array"}, {"type": "null"}], "title": "Contentlist", "default": []}}, "type": "object", "required": ["content"], "title": "ChetnaRequest"}, "ChetnaResponse": {"properties": {"content": {"title": "Content"}}, "type": "object", "required": ["content"], "title": "ChetnaResponse"}, "ContactUsRequest": {"properties": {"email": {"type": "string", "title": "Email", "default": ""}, "name": {"type": "string", "title": "Name", "default": ""}, "message": {"type": "string", "title": "Message", "default": ""}}, "type": "object", "title": "ContactUsRequest"}, "Context": {"properties": {"id": {"type": "string", "title": "Id"}, "content": {"anyOf": [{"type": "string"}, {"type": "object"}], "title": "Content"}, "role": {"$ref": "#/components/schemas/Role"}}, "type": "object", "required": ["id", "content", "role"], "title": "Context"}, "Coupon": {"properties": {"id": {"anyOf": [{"type": "integer"}, {"type": "null"}], "title": "Id"}, "user_id": {"type": "integer", "title": "User Id"}, "coupon_code": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Coupon Code"}, "is_active": {"type": "boolean", "title": "Is Active", "default": true}, "is_deleted": {"type": "boolean", "title": "Is Deleted", "default": false}, "is_used": {"type": "boolean", "title": "Is Used", "default": false}, "used_at": {"anyOf": [{"type": "string", "format": "date"}, {"type": "null"}], "title": "Used At"}, "amount": {"type": "number", "title": "Amount", "default": 0.0}, "used_source": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Used Source"}, "currency": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Currency", "default": "USD"}, "coupon_type": {"allOf": [{"$ref": "#/components/schemas/CouponType"}], "default": "JOINING"}, "coupon_state": {"anyOf": [{"$ref": "#/components/schemas/CouponState"}, {"type": "null"}], "default": "PAYMENT_ACTIVE"}}, "type": "object", "required": ["user_id"], "title": "Coupon"}, "CouponState": {"type": "string", "enum": ["PAYMENT_ACTIVE", "PAYMENT_PENDING", "PAYMENT_COMPLETE", "PAYMENT_FAILED"], "title": "CouponState"}, "CouponType": {"type": "string", "enum": ["REFERRAL", "PROMOTIONAL", "JOINING"], "title": "CouponType"}, "EmailResponseSchema": {"properties": {"name": {"type": "string", "title": "Name"}, "verified": {"type": "boolean", "title": "Verified"}}, "type": "object", "required": ["name", "verified"], "title": "EmailResponseSchema"}, "FF": {"type": "string", "enum": ["EMPTY_REPO_CHECK", "FETCH_GITHUB_TOKEN_FROM_REDIS", "INSTALL_FROM_PULL_REQUEST", "INSTALL_ATTEMPT_COUNT_CHECK"], "title": "FF"}, "FlagSchema": {"properties": {"key": {"$ref": "#/components/schemas/FF"}, "value": {"anyOf": [{"type": "boolean"}, {"type": "null"}], "title": "Value"}, "ttl": {"anyOf": [{"type": "integer"}, {"type": "null"}], "title": "Ttl", "default": 525600}}, "type": "object", "required": ["key"], "title": "FlagSchema"}, "ForgotPasswordSchema": {"properties": {"email": {"type": "string", "title": "Email"}}, "type": "object", "required": ["email"], "title": "ForgotPasswordSchema"}, "GitBranchDetails": {"properties": {"name": {"type": "string", "title": "Name"}, "sha": {"type": "string", "title": "Sha"}}, "type": "object", "required": ["name", "sha"], "title": "GitBranchDetails"}, "GitRepo": {"properties": {"project_id": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Project Id"}, "org_name": {"type": "string", "title": "Org Name"}, "repo_name": {"type": "string", "title": "Repo Name"}, "repo_url_with_token": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Repo Url With Token"}}, "type": "object", "required": ["org_name", "repo_name"], "title": "GitRepo"}, "GitVendor": {"type": "string", "enum": ["GITHUB", "GITLAB", "BITBUCKET", "AZUREDEVOPS"], "title": "GitVendor"}, "GithubApp": {"properties": {"id": {"anyOf": [{"type": "integer"}, {"type": "null"}], "title": "Id"}, "github_login_id": {"type": "string", "title": "Github Login Id"}, "installation_id": {"type": "string", "title": "Installation Id"}, "organization_name": {"type": "string", "title": "Organization Name"}, "organization_id": {"type": "string", "title": "Organization Id"}, "repo_name": {"type": "string", "title": "Repo Name"}, "repo_id": {"type": "string", "title": "Repo Id"}, "is_active": {"type": "boolean", "title": "Is Active", "default": true}, "is_private": {"type": "boolean", "title": "Is Private"}, "is_installed": {"type": "boolean", "title": "Is Installed", "default": true}, "is_deleted": {"type": "boolean", "title": "Is Deleted", "default": false}, "time_created": {"anyOf": [{"type": "string", "format": "date-time"}, {"type": "null"}], "title": "Time Created"}, "vendor": {"allOf": [{"$ref": "#/components/schemas/GitVendor"}], "default": "GITHUB"}, "time_updated": {"anyOf": [{"type": "string", "format": "date-time"}, {"type": "null"}], "title": "Time Updated"}, "user_id": {"anyOf": [{"type": "integer"}, {"type": "null"}], "title": "User Id"}, "token": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Token"}, "plan_type": {"anyOf": [{"$ref": "#/components/schemas/PlanType"}, {"type": "null"}], "default": "FREE"}, "netlify": {"anyOf": [{"type": "object"}, {"type": "null"}], "title": "Netlify"}}, "type": "object", "required": ["github_login_id", "installation_id", "organization_name", "organization_id", "repo_name", "repo_id", "is_private"], "title": "GithubApp"}, "HTTPValidationError": {"properties": {"detail": {"items": {"$ref": "#/components/schemas/ValidationError"}, "type": "array", "title": "Detail"}}, "type": "object", "title": "HTTPValidationError"}, "MergedPullRequest": {"properties": {"base_branch": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Base Branch"}, "commit_sha": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Commit Sha"}, "head_branch": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Head Branch"}, "head_branch_details": {"anyOf": [{"$ref": "#/components/schemas/GitBranchDetails"}, {"type": "null"}]}, "api_token": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Api Token"}, "git_repo": {"anyOf": [{"$ref": "#/components/schemas/GitRepo"}, {"type": "null"}]}, "installation_id": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Installation Id"}, "organization_name": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Organization Name"}, "repo_name": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Repo Name"}, "full_repo_name": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Full Repo Name"}, "user": {"anyOf": [{"$ref": "#/components/schemas/User"}, {"type": "null"}]}, "commit_message": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Commit Message"}, "vendor": {"anyOf": [{"$ref": "#/components/schemas/GitVendor"}, {"type": "null"}], "default": "GITHUB"}, "git_app": {"anyOf": [{"$ref": "#/components/schemas/GithubApp"}, {"type": "null"}]}}, "type": "object", "title": "MergedPullRequest"}, "PaymentInfo": {"properties": {"user_id": {"type": "string", "title": "User Id"}, "order_id": {"type": "string", "title": "Order Id"}, "payment_id": {"type": "string", "title": "Payment Id"}, "signature": {"type": "string", "title": "Signature"}, "vendor": {"type": "string", "title": "Vendor"}, "status": {"type": "string", "title": "Status"}}, "type": "object", "title": "PaymentInfo"}, "PlanType": {"type": "string", "enum": ["FREE", "PREMIUM"], "title": "PlanType"}, "RedisSchema": {"properties": {"key": {"type": "string", "title": "Key"}, "value": {"anyOf": [{"type": "string"}, {"type": "integer"}, {"type": "number"}, {"type": "boolean"}, {"type": "null"}], "title": "Value"}, "ttl": {"anyOf": [{"type": "integer"}, {"type": "null"}], "title": "Ttl"}}, "type": "object", "required": ["key"], "title": "RedisSchema"}, "RepoDocHTMLGenRequest": {"properties": {"base_branch": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Base Branch"}, "commit_sha": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Commit Sha"}, "head_branch": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Head Branch"}, "head_branch_details": {"anyOf": [{"$ref": "#/components/schemas/GitBranchDetails"}, {"type": "null"}]}, "api_token": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Api Token"}, "git_repo": {"$ref": "#/components/schemas/GitRepo"}, "installation_id": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Installation Id"}, "organization_name": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Organization Name"}, "repo_name": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Repo Name"}, "full_repo_name": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Full Repo Name"}, "user": {"anyOf": [{"$ref": "#/components/schemas/User"}, {"type": "null"}]}, "commit_message": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Commit Message"}, "vendor": {"allOf": [{"$ref": "#/components/schemas/GitVendor"}], "default": "GITHUB"}, "git_app": {"anyOf": [{"$ref": "#/components/schemas/GithubApp"}, {"type": "null"}]}, "main_language": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Main Language"}}, "type": "object", "required": ["git_repo"], "title": "RepoDocHTMLGenRequest"}, "RepoDocStringGenRequest": {"properties": {"base_branch": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Base Branch"}, "commit_sha": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Commit Sha"}, "head_branch": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Head Branch"}, "head_branch_details": {"anyOf": [{"$ref": "#/components/schemas/GitBranchDetails"}, {"type": "null"}]}, "api_token": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Api Token"}, "git_repo": {"$ref": "#/components/schemas/GitRepo"}, "installation_id": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Installation Id"}, "organization_name": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Organization Name"}, "repo_name": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Repo Name"}, "full_repo_name": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Full Repo Name"}, "user": {"anyOf": [{"$ref": "#/components/schemas/User"}, {"type": "null"}]}, "commit_message": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Commit Message"}, "vendor": {"allOf": [{"$ref": "#/components/schemas/GitVendor"}], "default": "GITHUB"}, "git_app": {"anyOf": [{"$ref": "#/components/schemas/GithubApp"}, {"type": "null"}]}}, "type": "object", "required": ["git_repo"], "title": "RepoDocStringGenRequest"}, "Role": {"type": "string", "enum": ["USER", "ASSISTANT"], "title": "Role"}, "TokenResponseSchema": {"properties": {"token": {"type": "string", "title": "Token"}, "token_type": {"type": "string", "title": "Token Type", "default": "bearer"}, "user": {"$ref": "#/components/schemas/UserSingupResponseSchema"}}, "type": "object", "required": ["token", "user"], "title": "TokenResponseSchema"}, "UpdateEmailSchema": {"properties": {"email": {"type": "string", "title": "Email"}}, "type": "object", "required": ["email"], "title": "UpdateEmailSchema"}, "User": {"properties": {"email": {"type": "string", "title": "Email"}, "first_name": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "First Name"}, "last_name": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Last Name"}, "is_active": {"type": "boolean", "title": "Is Active", "default": true}, "user_role": {"allOf": [{"$ref": "#/components/schemas/UserRole"}], "default": "VIEWER"}, "github_login_id": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Github Login Id"}, "google_login_id": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Google Login Id"}, "img_url": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Img Url"}, "phone": {"anyOf": [{"type": "object"}, {"type": "null"}], "title": "Phone"}, "birthdate": {"anyOf": [{"type": "string", "format": "date"}, {"type": "null"}], "title": "Birthdate"}, "gender": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Gender"}, "address": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Address"}, "zip_code": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Zip Code"}, "city": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "City"}, "country": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Country"}, "lang": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Lang"}, "onboarding_channel": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Onboarding Channel"}, "referred_by": {"anyOf": [{"type": "integer"}, {"type": "null"}], "title": "Referred By"}, "github_login_name": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Github Login Name"}, "count_repo_gen": {"type": "integer", "title": "Count Repo Gen", "default": 0}, "id": {"type": "integer", "title": "Id"}, "password": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Password"}}, "type": "object", "required": ["email", "id"], "title": "User"}, "UserApiKeyResponseSchema": {"properties": {"id": {"type": "integer", "title": "Id"}, "email": {"type": "string", "title": "Email"}, "key": {"type": "string", "title": "Key"}, "isActive": {"type": "boolean", "title": "Isactive"}, "createdAt": {"type": "string", "format": "date-time", "title": "Createdat"}, "keyRole": {"type": "string", "title": "Keyrole"}}, "type": "object", "required": ["id", "email", "key", "isActive", "createdAt", "keyRole"], "title": "UserApiKeyResponseSchema"}, "UserCreate": {"properties": {"email": {"type": "string", "title": "Email"}, "first_name": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "First Name"}, "last_name": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Last Name"}, "is_active": {"type": "boolean", "title": "Is Active", "default": true}, "user_role": {"allOf": [{"$ref": "#/components/schemas/UserRole"}], "default": "VIEWER"}, "github_login_id": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Github Login Id"}, "google_login_id": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Google Login Id"}, "img_url": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Img Url"}, "phone": {"anyOf": [{"type": "object"}, {"type": "null"}], "title": "Phone"}, "birthdate": {"anyOf": [{"type": "string", "format": "date"}, {"type": "null"}], "title": "Birthdate"}, "gender": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Gender"}, "address": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Address"}, "zip_code": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Zip Code"}, "city": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "City"}, "country": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Country"}, "lang": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Lang"}, "onboarding_channel": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Onboarding Channel"}, "referred_by": {"anyOf": [{"type": "integer"}, {"type": "null"}], "title": "Referred By"}, "github_login_name": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Github Login Name"}, "count_repo_gen": {"type": "integer", "title": "Count Repo Gen", "default": 0}, "password": {"type": "string", "title": "Password"}}, "type": "object", "required": ["email", "password"], "title": "UserCreate"}, "UserRole": {"type": "string", "enum": ["SUPERUSER", "ADMIN", "VIEWER"], "title": "UserRole"}, "UserSignupRequestSchema": {"properties": {"email": {"type": "string", "title": "Email"}, "firstName": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Firstname"}, "lastName": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Lastname"}, "is_active": {"type": "boolean", "title": "Is Active", "default": true}, "user_role": {"allOf": [{"$ref": "#/components/schemas/UserRole"}], "default": "VIEWER"}, "github_login_id": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Github Login Id"}, "google_login_id": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Google Login Id"}, "img_url": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Img Url"}, "phone": {"anyOf": [{"type": "object"}, {"type": "null"}], "title": "Phone"}, "birthdate": {"anyOf": [{"type": "string", "format": "date"}, {"type": "null"}], "title": "Birthdate"}, "gender": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Gender"}, "address": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Address"}, "zip_code": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Zip Code"}, "city": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "City"}, "country": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Country"}, "lang": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Lang"}, "onboarding_channel": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Onboarding Channel"}, "referred_by": {"anyOf": [{"type": "integer"}, {"type": "null"}], "title": "Referred By"}, "github_login_name": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Github Login Name"}, "count_repo_gen": {"type": "integer", "title": "Count Repo Gen", "default": 0}, "password": {"type": "string", "title": "Password"}}, "type": "object", "required": ["email", "firstName", "lastName", "password"], "title": "UserSignupRequestSchema"}, "UserSingupResponseSchema": {"properties": {"id": {"type": "integer", "title": "Id"}, "email": {"$ref": "#/components/schemas/EmailResponseSchema"}, "firstName": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Firstname"}, "lastName": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Lastname"}, "phone": {"anyOf": [{"type": "object"}, {"type": "null"}], "title": "Phone"}, "birthday": {"anyOf": [{"type": "string", "format": "date"}, {"type": "null"}], "title": "Birthday"}, "gender": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Gender"}, "address": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Address"}, "zipcode": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Zipcode"}, "city": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "City"}, "country": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Country"}, "lang": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Lang"}, "imgUrl": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Imgurl"}, "userRole": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Userrole"}, "githubLoginId": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Githubloginid"}, "googleLoginId": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Googleloginid"}, "referredBy": {"anyOf": [{"type": "integer"}, {"type": "null"}], "title": "Referredby"}, "countRepoGen": {"type": "integer", "title": "Countrepogen"}}, "type": "object", "required": ["id", "email", "firstName", "lastName", "phone"], "title": "UserSingupResponseSchema"}, "UserUpdateSchema": {"properties": {"id": {"type": "integer", "title": "Id"}, "email": {"type": "string", "title": "Email"}, "firstName": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Firstname"}, "lastName": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Lastname"}, "birthday": {"anyOf": [{"type": "string", "format": "date"}, {"type": "null"}], "title": "Birthday"}, "gender": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Gender"}, "address": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Address"}, "zipcode": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Zipcode"}, "city": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "City"}, "country": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Country"}, "lang": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Lang"}, "imgUrl": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Imgurl"}}, "type": "object", "required": ["id", "email"], "title": "UserUpdateSchema"}, "ValidationError": {"properties": {"loc": {"items": {"anyOf": [{"type": "string"}, {"type": "integer"}]}, "type": "array", "title": "Location"}, "msg": {"type": "string", "title": "Message"}, "type": {"type": "string", "title": "Error Type"}}, "type": "object", "required": ["loc", "msg", "type"], "title": "ValidationError"}, "VerifyNewPasswordSchema": {"properties": {"code": {"type": "string", "title": "Code"}, "email": {"type": "string", "title": "Email"}, "newPassword": {"type": "string", "title": "Newpassword"}}, "type": "object", "required": ["code", "email", "newPassword"], "title": "VerifyNewPasswordSchema"}, "VerifyNewPasswordWithOldPasswordSchema": {"properties": {"password": {"type": "string", "title": "Password"}, "email": {"type": "string", "title": "Email"}, "newPassword": {"type": "string", "title": "Newpassword"}}, "type": "object", "required": ["password", "email", "newPassword"], "title": "VerifyNewPasswordWithOldPasswordSchema"}, "VerifySecurityCodeSchema": {"properties": {"code": {"type": "string", "title": "Code"}, "email": {"type": "string", "title": "Email"}}, "type": "object", "required": ["code", "email"], "title": "VerifySecurityCodeSchema"}}, "securitySchemes": {"OAuth2PasswordBearer": {"type": "oauth2", "flows": {"password": {"scopes": {}, "tokenUrl": "/api/token"}}}}}} |