topfans/backend/swagger/proto/user.swagger.json
2026-04-07 22:29:48 +08:00

1521 lines
38 KiB
JSON
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

{
"swagger": "2.0",
"info": {
"title": "proto/user.proto",
"version": "version not set"
},
"tags": [
{
"name": "UserSocialService"
}
],
"consumes": [
"application/json"
],
"produces": [
"application/json"
],
"paths": {
"/api/v1/auth/login": {
"post": {
"summary": "用户认证相关",
"operationId": "UserSocialService_Login",
"responses": {
"200": {
"description": "A successful response.",
"schema": {
"$ref": "#/definitions/userLoginResponse"
}
},
"default": {
"description": "An unexpected error response.",
"schema": {
"$ref": "#/definitions/rpcStatus"
}
}
},
"parameters": [
{
"name": "body",
"in": "body",
"required": true,
"schema": {
"$ref": "#/definitions/userLoginRequest"
}
}
],
"tags": [
"UserSocialService"
]
}
},
"/api/v1/auth/logout": {
"post": {
"operationId": "UserSocialService_Logout",
"responses": {
"200": {
"description": "A successful response.",
"schema": {
"$ref": "#/definitions/userLogoutResponse"
}
},
"default": {
"description": "An unexpected error response.",
"schema": {
"$ref": "#/definitions/rpcStatus"
}
}
},
"parameters": [
{
"name": "body",
"in": "body",
"required": true,
"schema": {
"$ref": "#/definitions/userLogoutRequest"
}
}
],
"tags": [
"UserSocialService"
]
}
},
"/api/v1/auth/refresh": {
"post": {
"operationId": "UserSocialService_RefreshToken",
"responses": {
"200": {
"description": "A successful response.",
"schema": {
"$ref": "#/definitions/userRefreshTokenResponse"
}
},
"default": {
"description": "An unexpected error response.",
"schema": {
"$ref": "#/definitions/rpcStatus"
}
}
},
"parameters": [
{
"name": "body",
"in": "body",
"required": true,
"schema": {
"$ref": "#/definitions/userRefreshTokenRequest"
}
}
],
"tags": [
"UserSocialService"
]
}
},
"/api/v1/auth/validate": {
"post": {
"operationId": "UserSocialService_ValidateToken",
"responses": {
"200": {
"description": "A successful response.",
"schema": {
"$ref": "#/definitions/userValidateTokenResponse"
}
},
"default": {
"description": "An unexpected error response.",
"schema": {
"$ref": "#/definitions/rpcStatus"
}
}
},
"parameters": [
{
"name": "body",
"in": "body",
"required": true,
"schema": {
"$ref": "#/definitions/userValidateTokenRequest"
}
}
],
"tags": [
"UserSocialService"
]
}
},
"/api/v1/exhibitions/booths/{host_profile_id}": {
"get": {
"operationId": "UserSocialService_GetBoothSlots",
"responses": {
"200": {
"description": "A successful response.",
"schema": {
"$ref": "#/definitions/userGetBoothSlotsResponse"
}
},
"default": {
"description": "An unexpected error response.",
"schema": {
"$ref": "#/definitions/rpcStatus"
}
}
},
"parameters": [
{
"name": "host_profile_id",
"description": "展馆主体ID",
"in": "path",
"required": true,
"type": "string",
"format": "int64"
},
{
"name": "star_id",
"in": "query",
"required": false,
"type": "string",
"format": "int64"
}
],
"tags": [
"UserSocialService"
]
}
},
"/api/v1/exhibitions/grab-slot": {
"post": {
"summary": "展位相关",
"operationId": "UserSocialService_GrabSlot",
"responses": {
"200": {
"description": "A successful response.",
"schema": {
"$ref": "#/definitions/userGrabSlotResponse"
}
},
"default": {
"description": "An unexpected error response.",
"schema": {
"$ref": "#/definitions/rpcStatus"
}
}
},
"parameters": [
{
"name": "body",
"in": "body",
"required": true,
"schema": {
"$ref": "#/definitions/userGrabSlotRequest"
}
}
],
"tags": [
"UserSocialService"
]
}
},
"/api/v1/exhibitions/{asset_id}": {
"delete": {
"operationId": "UserSocialService_UnExhibit",
"responses": {
"200": {
"description": "A successful response.",
"schema": {
"$ref": "#/definitions/userUnExhibitResponse"
}
},
"default": {
"description": "An unexpected error response.",
"schema": {
"$ref": "#/definitions/rpcStatus"
}
}
},
"parameters": [
{
"name": "asset_id",
"in": "path",
"required": true,
"type": "string",
"format": "int64"
},
{
"name": "user_id",
"in": "query",
"required": false,
"type": "string",
"format": "int64"
},
{
"name": "star_id",
"in": "query",
"required": false,
"type": "string",
"format": "int64"
}
],
"tags": [
"UserSocialService"
]
}
},
"/api/v1/friends": {
"get": {
"operationId": "UserSocialService_GetFriendList",
"responses": {
"200": {
"description": "A successful response.",
"schema": {
"$ref": "#/definitions/userGetFriendListResponse"
}
},
"default": {
"description": "An unexpected error response.",
"schema": {
"$ref": "#/definitions/rpcStatus"
}
}
},
"parameters": [
{
"name": "user_id",
"in": "query",
"required": false,
"type": "string",
"format": "int64"
},
{
"name": "star_id",
"in": "query",
"required": false,
"type": "string",
"format": "int64"
},
{
"name": "page.page",
"description": "页码从1开始",
"in": "query",
"required": false,
"type": "integer",
"format": "int32"
},
{
"name": "page.page_size",
"description": "每页数量",
"in": "query",
"required": false,
"type": "integer",
"format": "int32"
}
],
"tags": [
"UserSocialService"
]
},
"post": {
"summary": "社交相关",
"operationId": "UserSocialService_AddFriend",
"responses": {
"200": {
"description": "A successful response.",
"schema": {
"$ref": "#/definitions/userAddFriendResponse"
}
},
"default": {
"description": "An unexpected error response.",
"schema": {
"$ref": "#/definitions/rpcStatus"
}
}
},
"parameters": [
{
"name": "body",
"in": "body",
"required": true,
"schema": {
"$ref": "#/definitions/userAddFriendRequest"
}
}
],
"tags": [
"UserSocialService"
]
}
},
"/api/v1/tasks": {
"get": {
"summary": "任务相关(与用户行为紧密相关,放在用户服务中)",
"operationId": "UserSocialService_GetTaskList",
"responses": {
"200": {
"description": "A successful response.",
"schema": {
"$ref": "#/definitions/userGetTaskListResponse"
}
},
"default": {
"description": "An unexpected error response.",
"schema": {
"$ref": "#/definitions/rpcStatus"
}
}
},
"parameters": [
{
"name": "user_id",
"in": "query",
"required": false,
"type": "string",
"format": "int64"
},
{
"name": "star_id",
"in": "query",
"required": false,
"type": "string",
"format": "int64"
},
{
"name": "task_type",
"description": "可选筛选任务类型0=全部)\n\n - TASK_TYPE_DAILY: 日常任务\n - TASK_TYPE_WEEKLY: 周常任务\n - TASK_TYPE_ACHIEVEMENT: 成就任务\n - TASK_TYPE_EVENT: 活动任务",
"in": "query",
"required": false,
"type": "string",
"enum": [
"TASK_TYPE_UNSPECIFIED",
"TASK_TYPE_DAILY",
"TASK_TYPE_WEEKLY",
"TASK_TYPE_ACHIEVEMENT",
"TASK_TYPE_EVENT"
],
"default": "TASK_TYPE_UNSPECIFIED"
},
{
"name": "status",
"description": "可选筛选任务状态0=全部)\n\n - TASK_STATUS_NOT_STARTED: 未开始\n - TASK_STATUS_IN_PROGRESS: 进行中\n - TASK_STATUS_COMPLETED: 已完成\n - TASK_STATUS_CLAIMED: 已领取奖励",
"in": "query",
"required": false,
"type": "string",
"enum": [
"TASK_STATUS_UNSPECIFIED",
"TASK_STATUS_NOT_STARTED",
"TASK_STATUS_IN_PROGRESS",
"TASK_STATUS_COMPLETED",
"TASK_STATUS_CLAIMED"
],
"default": "TASK_STATUS_UNSPECIFIED"
},
{
"name": "page.page",
"description": "页码从1开始",
"in": "query",
"required": false,
"type": "integer",
"format": "int32"
},
{
"name": "page.page_size",
"description": "每页数量",
"in": "query",
"required": false,
"type": "integer",
"format": "int32"
}
],
"tags": [
"UserSocialService"
]
}
},
"/api/v1/tasks/progress": {
"post": {
"operationId": "UserSocialService_UpdateTaskProgress",
"responses": {
"200": {
"description": "A successful response.",
"schema": {
"$ref": "#/definitions/userUpdateTaskProgressResponse"
}
},
"default": {
"description": "An unexpected error response.",
"schema": {
"$ref": "#/definitions/rpcStatus"
}
}
},
"parameters": [
{
"name": "body",
"in": "body",
"required": true,
"schema": {
"$ref": "#/definitions/userUpdateTaskProgressRequest"
}
}
],
"tags": [
"UserSocialService"
]
}
},
"/api/v1/tasks/{task_id}": {
"get": {
"operationId": "UserSocialService_GetTaskDetail",
"responses": {
"200": {
"description": "A successful response.",
"schema": {
"$ref": "#/definitions/userGetTaskDetailResponse"
}
},
"default": {
"description": "An unexpected error response.",
"schema": {
"$ref": "#/definitions/rpcStatus"
}
}
},
"parameters": [
{
"name": "task_id",
"in": "path",
"required": true,
"type": "string",
"format": "int64"
},
{
"name": "user_id",
"in": "query",
"required": false,
"type": "string",
"format": "int64"
},
{
"name": "star_id",
"in": "query",
"required": false,
"type": "string",
"format": "int64"
}
],
"tags": [
"UserSocialService"
]
}
},
"/api/v1/tasks/{task_id}/claim": {
"post": {
"operationId": "UserSocialService_ClaimTaskReward",
"responses": {
"200": {
"description": "A successful response.",
"schema": {
"$ref": "#/definitions/userClaimTaskRewardResponse"
}
},
"default": {
"description": "An unexpected error response.",
"schema": {
"$ref": "#/definitions/rpcStatus"
}
}
},
"parameters": [
{
"name": "task_id",
"in": "path",
"required": true,
"type": "string",
"format": "int64"
},
{
"name": "body",
"in": "body",
"required": true,
"schema": {
"$ref": "#/definitions/UserSocialServiceClaimTaskRewardBody"
}
}
],
"tags": [
"UserSocialService"
]
}
},
"/api/v1/users/{user_id}": {
"get": {
"summary": "用户信息相关",
"operationId": "UserSocialService_GetUser",
"responses": {
"200": {
"description": "A successful response.",
"schema": {
"$ref": "#/definitions/userGetUserResponse"
}
},
"default": {
"description": "An unexpected error response.",
"schema": {
"$ref": "#/definitions/rpcStatus"
}
}
},
"parameters": [
{
"name": "user_id",
"in": "path",
"required": true,
"type": "string",
"format": "int64"
}
],
"tags": [
"UserSocialService"
]
}
},
"/api/v1/users/{user_id}/fan-profiles/{star_id}": {
"get": {
"operationId": "UserSocialService_GetFanProfile",
"responses": {
"200": {
"description": "A successful response.",
"schema": {
"$ref": "#/definitions/userGetFanProfileResponse"
}
},
"default": {
"description": "An unexpected error response.",
"schema": {
"$ref": "#/definitions/rpcStatus"
}
}
},
"parameters": [
{
"name": "user_id",
"in": "path",
"required": true,
"type": "string",
"format": "int64"
},
{
"name": "star_id",
"in": "path",
"required": true,
"type": "string",
"format": "int64"
}
],
"tags": [
"UserSocialService"
]
}
}
},
"definitions": {
"UserSocialServiceClaimTaskRewardBody": {
"type": "object",
"properties": {
"user_id": {
"type": "string",
"format": "int64"
},
"star_id": {
"type": "string",
"format": "int64"
}
},
"title": "领取任务奖励请求"
},
"commonBaseResponse": {
"type": "object",
"properties": {
"code": {
"$ref": "#/definitions/commonStatusCode"
},
"message": {
"type": "string"
},
"timestamp": {
"type": "string",
"format": "int64",
"title": "Unix时间戳毫秒"
}
},
"title": "通用响应结构"
},
"commonPageRequest": {
"type": "object",
"properties": {
"page": {
"type": "integer",
"format": "int32",
"title": "页码从1开始"
},
"page_size": {
"type": "integer",
"format": "int32",
"title": "每页数量"
}
},
"title": "分页请求"
},
"commonPageResponse": {
"type": "object",
"properties": {
"page": {
"type": "integer",
"format": "int32"
},
"page_size": {
"type": "integer",
"format": "int32"
},
"total": {
"type": "string",
"format": "int64",
"title": "总记录数"
},
"total_pages": {
"type": "integer",
"format": "int32",
"title": "总页数"
}
},
"title": "分页响应"
},
"commonStatusCode": {
"type": "string",
"enum": [
"STATUS_UNSPECIFIED",
"STATUS_OK",
"STATUS_BAD_REQUEST",
"STATUS_UNAUTHORIZED",
"STATUS_FORBIDDEN",
"STATUS_NOT_FOUND",
"STATUS_INTERNAL_ERROR"
],
"default": "STATUS_UNSPECIFIED",
"title": "通用响应状态码"
},
"protobufAny": {
"type": "object",
"properties": {
"@type": {
"type": "string"
}
},
"additionalProperties": {}
},
"rpcStatus": {
"type": "object",
"properties": {
"code": {
"type": "integer",
"format": "int32"
},
"message": {
"type": "string"
},
"details": {
"type": "array",
"items": {
"type": "object",
"$ref": "#/definitions/protobufAny"
}
}
}
},
"userAddFriendRequest": {
"type": "object",
"properties": {
"from_user_id": {
"type": "string",
"format": "int64"
},
"to_user_id": {
"type": "string",
"format": "int64"
},
"star_id": {
"type": "string",
"format": "int64"
}
},
"title": "添加好友请求"
},
"userAddFriendResponse": {
"type": "object",
"properties": {
"base": {
"$ref": "#/definitions/commonBaseResponse"
},
"relation": {
"$ref": "#/definitions/userSocialRelation"
}
},
"title": "添加好友响应"
},
"userBoothSlot": {
"type": "object",
"properties": {
"id": {
"type": "string",
"format": "int64"
},
"host_profile_id": {
"type": "string",
"format": "int64",
"title": "展馆主体ID"
},
"star_id": {
"type": "string",
"format": "int64",
"title": "核心隔离键"
},
"slot_index": {
"type": "integer",
"format": "int32",
"title": "槽位序号"
},
"visibility": {
"$ref": "#/definitions/userSlotVisibility",
"title": "可见性"
},
"is_enabled": {
"type": "boolean",
"title": "是否启用"
},
"version": {
"type": "string",
"format": "int64",
"title": "乐观锁版本号"
},
"created_at": {
"type": "string",
"format": "int64"
}
},
"title": "展馆槽位"
},
"userClaimTaskRewardResponse": {
"type": "object",
"properties": {
"base": {
"$ref": "#/definitions/commonBaseResponse"
},
"rewards": {
"type": "array",
"items": {
"type": "object",
"$ref": "#/definitions/userReward"
},
"title": "获得的奖励列表"
}
},
"title": "领取任务奖励响应"
},
"userCurrentExhibition": {
"type": "object",
"properties": {
"asset_id": {
"type": "string",
"format": "int64",
"title": "资产ID主键"
},
"star_id": {
"type": "string",
"format": "int64",
"title": "核心隔离键"
},
"owner_uid": {
"type": "string",
"format": "int64",
"title": "持有者用户ID"
},
"host_profile_id": {
"type": "string",
"format": "int64",
"title": "展馆主体ID"
},
"slot_id": {
"type": "string",
"format": "int64",
"title": "槽位ID"
},
"start_time": {
"type": "string",
"format": "int64",
"title": "上架时间Unix时间戳毫秒"
},
"expire_at": {
"type": "string",
"format": "int64",
"title": "到期时间Unix时间戳毫秒0表示不过期"
},
"version": {
"type": "string",
"format": "int64",
"title": "乐观锁版本号"
},
"updated_at": {
"type": "string",
"format": "int64"
}
},
"title": "当前展出信息"
},
"userFanProfile": {
"type": "object",
"properties": {
"id": {
"type": "string",
"format": "int64"
},
"user_id": {
"type": "string",
"format": "int64"
},
"star_id": {
"type": "string",
"format": "int64",
"title": "核心隔离键"
},
"nickname": {
"type": "string",
"title": "星球专属昵称"
},
"level": {
"type": "integer",
"format": "int32",
"title": "等级"
},
"times": {
"type": "integer",
"format": "int32",
"title": "剩余铸造次数"
},
"social": {
"type": "integer",
"format": "int32",
"title": "好友个数"
},
"experience": {
"type": "string",
"format": "int64",
"title": "经验值"
},
"coin_balance": {
"type": "string",
"format": "int64",
"title": "游戏币余额"
},
"tags": {
"type": "array",
"items": {
"type": "string"
},
"title": "标签数组"
},
"created_at": {
"type": "string",
"format": "int64"
}
},
"title": "粉丝档案(星球内身份)"
},
"userFriendStatus": {
"type": "string",
"enum": [
"FRIEND_STATUS_UNSPECIFIED",
"FRIEND_STATUS_PENDING",
"FRIEND_STATUS_ACCEPTED"
],
"default": "FRIEND_STATUS_UNSPECIFIED",
"description": "- FRIEND_STATUS_PENDING: 申请中\n - FRIEND_STATUS_ACCEPTED: 已接受",
"title": "好友关系状态"
},
"userGetBoothSlotsResponse": {
"type": "object",
"properties": {
"base": {
"$ref": "#/definitions/commonBaseResponse"
},
"slots": {
"type": "array",
"items": {
"type": "object",
"$ref": "#/definitions/userBoothSlot"
}
},
"exhibitions": {
"type": "array",
"items": {
"type": "object",
"$ref": "#/definitions/userCurrentExhibition"
},
"title": "当前展出信息"
}
},
"title": "获取展馆槽位列表响应"
},
"userGetFanProfileResponse": {
"type": "object",
"properties": {
"base": {
"$ref": "#/definitions/commonBaseResponse"
},
"profile": {
"$ref": "#/definitions/userFanProfile"
}
},
"title": "获取粉丝档案响应"
},
"userGetFriendListResponse": {
"type": "object",
"properties": {
"base": {
"$ref": "#/definitions/commonBaseResponse"
},
"friends": {
"type": "array",
"items": {
"type": "object",
"$ref": "#/definitions/userSocialRelation"
}
},
"page": {
"$ref": "#/definitions/commonPageResponse"
}
},
"title": "获取好友列表响应"
},
"userGetTaskDetailResponse": {
"type": "object",
"properties": {
"base": {
"$ref": "#/definitions/commonBaseResponse"
},
"user_task": {
"$ref": "#/definitions/userUserTask"
},
"task_definition": {
"$ref": "#/definitions/userTask"
}
},
"title": "获取任务详情响应"
},
"userGetTaskListResponse": {
"type": "object",
"properties": {
"base": {
"$ref": "#/definitions/commonBaseResponse"
},
"user_tasks": {
"type": "array",
"items": {
"type": "object",
"$ref": "#/definitions/userUserTask"
},
"title": "用户任务进度(包含任务详情)"
},
"task_definitions": {
"type": "array",
"items": {
"type": "object",
"$ref": "#/definitions/userTask"
},
"title": "任务定义详情(用于展示任务描述)"
},
"page": {
"$ref": "#/definitions/commonPageResponse"
}
},
"title": "获取任务列表响应"
},
"userGetUserResponse": {
"type": "object",
"properties": {
"base": {
"$ref": "#/definitions/commonBaseResponse"
},
"user": {
"$ref": "#/definitions/userUser"
}
},
"title": "获取用户信息响应"
},
"userGrabSlotRequest": {
"type": "object",
"properties": {
"user_id": {
"type": "string",
"format": "int64"
},
"friend_uid": {
"type": "string",
"format": "int64",
"title": "好友的用户ID目标展馆"
},
"star_id": {
"type": "string",
"format": "int64"
},
"slot_index": {
"type": "integer",
"format": "int32",
"title": "要抢占的槽位序号"
},
"asset_id": {
"type": "string",
"format": "int64",
"title": "要展出的资产ID"
}
},
"title": "抢车位请求"
},
"userGrabSlotResponse": {
"type": "object",
"properties": {
"base": {
"$ref": "#/definitions/commonBaseResponse"
},
"exhibition": {
"$ref": "#/definitions/userCurrentExhibition"
}
},
"title": "抢车位响应"
},
"userLoginRequest": {
"type": "object",
"properties": {
"mobile": {
"type": "string"
},
"password": {
"type": "string"
}
},
"title": "登录请求"
},
"userLoginResponse": {
"type": "object",
"properties": {
"base": {
"$ref": "#/definitions/commonBaseResponse"
},
"access_token": {
"type": "string",
"title": "JWT Access Token短期有效如15分钟"
},
"refresh_token": {
"type": "string",
"title": "Refresh Token长期有效如7天"
},
"expires_in": {
"type": "string",
"format": "int64",
"title": "Access Token 过期时间(秒)"
},
"user": {
"$ref": "#/definitions/userUser"
}
},
"title": "登录响应"
},
"userLogoutRequest": {
"type": "object",
"properties": {
"access_token": {
"type": "string",
"title": "可选服务端可以主动使Token失效"
}
},
"title": "登出请求"
},
"userLogoutResponse": {
"type": "object",
"properties": {
"base": {
"$ref": "#/definitions/commonBaseResponse"
}
},
"title": "登出响应"
},
"userRefreshTokenRequest": {
"type": "object",
"properties": {
"refresh_token": {
"type": "string"
}
},
"title": "刷新Token请求"
},
"userRefreshTokenResponse": {
"type": "object",
"properties": {
"base": {
"$ref": "#/definitions/commonBaseResponse"
},
"access_token": {
"type": "string",
"title": "新的 Access Token"
},
"refresh_token": {
"type": "string",
"title": "新的 Refresh Token可选支持Token轮换"
},
"expires_in": {
"type": "string",
"format": "int64",
"title": "Access Token 过期时间(秒)"
}
},
"title": "刷新Token响应"
},
"userReward": {
"type": "object",
"properties": {
"type": {
"$ref": "#/definitions/userRewardType"
},
"amount": {
"type": "string",
"format": "int64"
},
"description": {
"type": "string",
"title": "奖励描述(如:\"100经验值\""
}
},
"title": "奖励信息"
},
"userRewardType": {
"type": "string",
"enum": [
"REWARD_TYPE_UNSPECIFIED",
"REWARD_TYPE_EXP",
"REWARD_TYPE_CRYSTAL",
"REWARD_TYPE_COIN"
],
"default": "REWARD_TYPE_UNSPECIFIED",
"description": "- REWARD_TYPE_EXP: 经验值\n - REWARD_TYPE_CRYSTAL: 顶粉水晶\n - REWARD_TYPE_COIN: 游戏币",
"title": "奖励类型"
},
"userSlotVisibility": {
"type": "string",
"enum": [
"SLOT_VISIBILITY_UNSPECIFIED",
"SLOT_VISIBILITY_PUBLIC",
"SLOT_VISIBILITY_FRIENDS",
"SLOT_VISIBILITY_PRIVATE"
],
"default": "SLOT_VISIBILITY_UNSPECIFIED",
"description": "- SLOT_VISIBILITY_PUBLIC: 公开\n - SLOT_VISIBILITY_FRIENDS: 好友可见\n - SLOT_VISIBILITY_PRIVATE: 私有",
"title": "槽位可见性"
},
"userSocialRelation": {
"type": "object",
"properties": {
"id": {
"type": "string",
"format": "int64"
},
"user_a": {
"type": "string",
"format": "int64",
"title": "发起方"
},
"user_b": {
"type": "string",
"format": "int64",
"title": "接受方"
},
"star_id": {
"type": "string",
"format": "int64",
"title": "核心隔离键"
},
"status": {
"$ref": "#/definitions/userFriendStatus"
},
"created_at": {
"type": "string",
"format": "int64"
}
},
"title": "好友关系"
},
"userTask": {
"type": "object",
"properties": {
"id": {
"type": "string",
"format": "int64"
},
"star_id": {
"type": "string",
"format": "int64",
"title": "0=全局任务,\u003e0=星球任务"
},
"task_type": {
"$ref": "#/definitions/userTaskType",
"title": "任务类型"
},
"title": {
"type": "string",
"title": "任务标题"
},
"description": {
"type": "string",
"title": "任务描述"
},
"trigger_type": {
"$ref": "#/definitions/userTriggerType",
"title": "触发类型"
},
"condition": {
"type": "string",
"title": "完成条件JSON字符串{\"action\":\"login\",\"count\":3}"
},
"reward_type": {
"$ref": "#/definitions/userRewardType",
"title": "奖励类型"
},
"reward_amount": {
"type": "string",
"format": "int64",
"title": "奖励数量"
},
"is_active": {
"type": "boolean",
"title": "是否启用"
},
"start_time": {
"type": "string",
"format": "int64",
"title": "生效时间Unix时间戳毫秒"
},
"end_time": {
"type": "string",
"format": "int64",
"title": "失效时间Unix时间戳毫秒"
},
"created_at": {
"type": "string",
"format": "int64"
}
},
"title": "任务定义(配置表)"
},
"userTaskStatus": {
"type": "string",
"enum": [
"TASK_STATUS_UNSPECIFIED",
"TASK_STATUS_NOT_STARTED",
"TASK_STATUS_IN_PROGRESS",
"TASK_STATUS_COMPLETED",
"TASK_STATUS_CLAIMED"
],
"default": "TASK_STATUS_UNSPECIFIED",
"description": "- TASK_STATUS_NOT_STARTED: 未开始\n - TASK_STATUS_IN_PROGRESS: 进行中\n - TASK_STATUS_COMPLETED: 已完成\n - TASK_STATUS_CLAIMED: 已领取奖励",
"title": "任务状态"
},
"userTaskType": {
"type": "string",
"enum": [
"TASK_TYPE_UNSPECIFIED",
"TASK_TYPE_DAILY",
"TASK_TYPE_WEEKLY",
"TASK_TYPE_ACHIEVEMENT",
"TASK_TYPE_EVENT"
],
"default": "TASK_TYPE_UNSPECIFIED",
"description": "- TASK_TYPE_DAILY: 日常任务\n - TASK_TYPE_WEEKLY: 周常任务\n - TASK_TYPE_ACHIEVEMENT: 成就任务\n - TASK_TYPE_EVENT: 活动任务",
"title": "任务类型"
},
"userTriggerType": {
"type": "string",
"enum": [
"TRIGGER_TYPE_UNSPECIFIED",
"TRIGGER_TYPE_COUNT",
"TRIGGER_TYPE_CONDITION",
"TRIGGER_TYPE_ONE_TIME"
],
"default": "TRIGGER_TYPE_UNSPECIFIED",
"description": "- TRIGGER_TYPE_COUNT: 行为计数登录3次\n - TRIGGER_TYPE_CONDITION: 条件达成达到5级\n - TRIGGER_TYPE_ONE_TIME: 一次性任务",
"title": "触发类型"
},
"userUnExhibitResponse": {
"type": "object",
"properties": {
"base": {
"$ref": "#/definitions/commonBaseResponse"
}
},
"title": "下架展品响应"
},
"userUpdateTaskProgressRequest": {
"type": "object",
"properties": {
"user_id": {
"type": "string",
"format": "int64"
},
"star_id": {
"type": "string",
"format": "int64"
},
"action": {
"type": "string",
"title": "行为类型(如:\"login\", \"mint\", \"exhibit\""
},
"amount": {
"type": "string",
"format": "int64",
"title": "行为数量默认1"
}
},
"title": "更新任务进度请求(内部使用,通过用户行为触发)"
},
"userUpdateTaskProgressResponse": {
"type": "object",
"properties": {
"base": {
"$ref": "#/definitions/commonBaseResponse"
},
"completed_task_ids": {
"type": "array",
"items": {
"type": "string",
"format": "int64"
},
"title": "完成的任务ID列表"
}
},
"title": "更新任务进度响应(内部使用)"
},
"userUser": {
"type": "object",
"properties": {
"id": {
"type": "string",
"format": "int64"
},
"mobile": {
"type": "string"
},
"avatar_url": {
"type": "string"
},
"global_wallet_address": {
"type": "string"
},
"is_active": {
"type": "boolean"
},
"created_at": {
"type": "string",
"format": "int64"
}
},
"title": "用户基本信息"
},
"userUserTask": {
"type": "object",
"properties": {
"id": {
"type": "string",
"format": "int64"
},
"user_id": {
"type": "string",
"format": "int64"
},
"star_id": {
"type": "string",
"format": "int64",
"title": "核心隔离键"
},
"task_id": {
"type": "string",
"format": "int64",
"title": "任务定义ID"
},
"status": {
"$ref": "#/definitions/userTaskStatus",
"title": "当前状态"
},
"progress": {
"type": "string",
"format": "int64",
"title": "当前进度"
},
"target": {
"type": "string",
"format": "int64",
"title": "目标进度(冗余,便于查询)"
},
"completed_at": {
"type": "string",
"format": "int64",
"title": "完成时间Unix时间戳毫秒"
},
"claimed_at": {
"type": "string",
"format": "int64",
"title": "领奖时间Unix时间戳毫秒"
},
"created_at": {
"type": "string",
"format": "int64"
},
"updated_at": {
"type": "string",
"format": "int64"
}
},
"title": "用户任务进度"
},
"userValidateTokenRequest": {
"type": "object",
"properties": {
"access_token": {
"type": "string"
}
},
"title": "验证Token请求可选用于服务端验证Token有效性"
},
"userValidateTokenResponse": {
"type": "object",
"properties": {
"base": {
"$ref": "#/definitions/commonBaseResponse"
},
"user_id": {
"type": "string",
"format": "int64",
"title": "Token关联的用户ID"
},
"is_valid": {
"type": "boolean",
"title": "Token是否有效"
},
"expires_at": {
"type": "string",
"format": "int64",
"title": "Token过期时间戳毫秒"
}
},
"title": "验证Token响应"
}
}
}