2023-09-27 16:06:32 +08:00
|
|
|
from flask_restful import fields
|
2024-02-06 13:21:13 +08:00
|
|
|
|
2024-08-19 09:16:33 +08:00
|
|
|
from libs.helper import AppIconUrlField, TimestampField
|
2023-09-27 16:06:32 +08:00
|
|
|
|
|
|
|
app_fields = {
|
2024-08-15 12:54:05 +08:00
|
|
|
"id": fields.String,
|
|
|
|
"name": fields.String,
|
|
|
|
"mode": fields.String,
|
2024-08-19 09:16:33 +08:00
|
|
|
"icon_type": fields.String,
|
2024-08-15 12:54:05 +08:00
|
|
|
"icon": fields.String,
|
|
|
|
"icon_background": fields.String,
|
2024-08-19 09:16:33 +08:00
|
|
|
"icon_url": AppIconUrlField,
|
2024-09-02 20:00:41 +08:00
|
|
|
"use_icon_as_answer_icon": fields.Boolean,
|
2023-09-27 16:06:32 +08:00
|
|
|
}
|
|
|
|
|
|
|
|
installed_app_fields = {
|
2024-08-15 12:54:05 +08:00
|
|
|
"id": fields.String,
|
|
|
|
"app": fields.Nested(app_fields),
|
|
|
|
"app_owner_tenant_id": fields.String,
|
|
|
|
"is_pinned": fields.Boolean,
|
|
|
|
"last_used_at": TimestampField,
|
|
|
|
"editable": fields.Boolean,
|
|
|
|
"uninstallable": fields.Boolean,
|
2023-09-27 16:06:32 +08:00
|
|
|
}
|
|
|
|
|
2024-08-15 12:54:05 +08:00
|
|
|
installed_app_list_fields = {"installed_apps": fields.List(fields.Nested(installed_app_fields))}
|