2023-05-15 08:51:32 +08:00
|
|
|
from flask import Blueprint
|
2025-08-27 16:05:22 +08:00
|
|
|
from flask_restx import Namespace
|
2024-04-18 20:24:05 +08:00
|
|
|
|
2023-05-15 08:51:32 +08:00
|
|
|
from libs.external_api import ExternalApi
|
|
|
|
|
|
2024-08-26 15:29:10 +08:00
|
|
|
bp = Blueprint("web", __name__, url_prefix="/api")
|
2023-05-15 08:51:32 +08:00
|
|
|
|
2025-08-27 16:05:22 +08:00
|
|
|
api = ExternalApi(
|
|
|
|
|
bp,
|
|
|
|
|
version="1.0",
|
|
|
|
|
title="Web API",
|
|
|
|
|
description="Public APIs for web applications including file uploads, chat interactions, and app management",
|
|
|
|
|
)
|
2024-11-01 15:51:22 +08:00
|
|
|
|
2025-08-27 16:05:22 +08:00
|
|
|
# Create namespace
|
|
|
|
|
web_ns = Namespace("web", description="Web application API operations", path="/")
|
2023-05-15 08:51:32 +08:00
|
|
|
|
2025-06-09 17:19:53 +09:00
|
|
|
from . import (
|
2025-09-15 07:15:35 +05:30
|
|
|
app,
|
|
|
|
|
audio,
|
|
|
|
|
completion,
|
|
|
|
|
conversation,
|
|
|
|
|
feature,
|
|
|
|
|
files,
|
|
|
|
|
forgot_password,
|
|
|
|
|
login,
|
|
|
|
|
message,
|
|
|
|
|
passport,
|
|
|
|
|
remote_files,
|
|
|
|
|
saved_message,
|
|
|
|
|
site,
|
|
|
|
|
workflow,
|
2025-06-09 17:19:53 +09:00
|
|
|
)
|
2025-08-27 16:05:22 +08:00
|
|
|
|
|
|
|
|
api.add_namespace(web_ns)
|
2025-09-15 07:15:35 +05:30
|
|
|
|
|
|
|
|
__all__ = [
|
|
|
|
|
"api",
|
|
|
|
|
"app",
|
|
|
|
|
"audio",
|
|
|
|
|
"bp",
|
|
|
|
|
"completion",
|
|
|
|
|
"conversation",
|
|
|
|
|
"feature",
|
|
|
|
|
"files",
|
|
|
|
|
"forgot_password",
|
|
|
|
|
"login",
|
|
|
|
|
"message",
|
|
|
|
|
"passport",
|
|
|
|
|
"remote_files",
|
|
|
|
|
"saved_message",
|
|
|
|
|
"site",
|
|
|
|
|
"web_ns",
|
|
|
|
|
"workflow",
|
|
|
|
|
]
|