backend/gateway.json

2931 lines
85 KiB
JSON

{
"info": {
"contact": {
"email": "igs170911@gmail.com",
"name": "Daniel Wang"
},
"description": "This is Digimon Platform ",
"title": "Digimon Platform API Gateway",
"version": "v1"
},
"openapi": "3.0.3",
"paths": {
"/api/v1/account/bind": {
"post": {
"description": "將帳號綁定到指定的用戶 UID",
"operationId": "accountBindAccount",
"requestBody": {
"content": {
"application/json": {
"schema": {
"properties": {
"login_id": {
"type": "string"
},
"type": {
"type": "integer"
},
"uid": {
"type": "string"
}
},
"required": [
"uid",
"login_id",
"type"
],
"type": "object"
}
}
},
"required": true
},
"responses": {
"200": {
"content": {
"application/json": {
"schema": {
"properties": {
"login_id": {
"type": "string"
},
"type": {
"type": "integer"
},
"uid": {
"type": "string"
}
},
"type": "object"
}
}
},
"description": "// 綁定成功"
},
"400": {
"content": {
"application/json": {
"schema": {
"oneOf": [
{
"$ref": "#/components/schemas/ErrorResp"
},
{
"$ref": "#/components/schemas/ErrorResp"
},
{
"$ref": "#/components/schemas/ErrorResp"
}
]
}
}
},
"description": "客戶端錯誤\n\nPossible errors:\n40004: ErrorResp - 參數驗證失敗\n40005: ErrorResp - UID 格式錯誤\n40001: ErrorResp - 帳號格式錯誤"
},
"404": {
"content": {
"application/json": {
"schema": {
"properties": {
"code": {
"type": "integer"
},
"details": {
"type": "string"
},
"error": {
"description": "可選的錯誤信息"
},
"msg": {
"type": "string"
}
},
"type": "object"
}
}
},
"description": "// 帳號不存在"
},
"409": {
"content": {
"application/json": {
"schema": {
"properties": {
"code": {
"type": "integer"
},
"details": {
"type": "string"
},
"error": {
"description": "可選的錯誤信息"
},
"msg": {
"type": "string"
}
},
"type": "object"
}
}
},
"description": "// 帳號已綁定"
},
"500": {
"content": {
"application/json": {
"schema": {
"properties": {
"code": {
"type": "integer"
},
"details": {
"type": "string"
},
"error": {
"description": "可選的錯誤信息"
},
"msg": {
"type": "string"
}
},
"type": "object"
}
}
},
"description": "// 服務器錯誤"
}
},
"summary": "綁定帳號"
}
},
"/api/v1/account/bind-email": {
"post": {
"description": "綁定並驗證用戶的 Email 地址",
"operationId": "accountBindVerifyEmail",
"requestBody": {
"content": {
"application/json": {
"schema": {
"properties": {
"email": {
"type": "string"
},
"uid": {
"type": "string"
}
},
"required": [
"uid",
"email"
],
"type": "object"
}
}
},
"required": true
},
"responses": {
"200": {
"content": {
"application/json": {
"schema": {
"properties": {
"code": {
"type": "integer"
},
"data": {},
"msg": {
"type": "string"
}
},
"type": "object"
}
}
},
"description": "// 綁定成功"
},
"400": {
"content": {
"application/json": {
"schema": {
"oneOf": [
{
"$ref": "#/components/schemas/ErrorResp"
},
{
"$ref": "#/components/schemas/ErrorResp"
}
]
}
}
},
"description": "客戶端錯誤\n\nPossible errors:\n40005: ErrorResp - UID 格式錯誤\n40006: ErrorResp - 郵箱格式錯誤"
},
"404": {
"content": {
"application/json": {
"schema": {
"properties": {
"code": {
"type": "integer"
},
"details": {
"type": "string"
},
"error": {
"description": "可選的錯誤信息"
},
"msg": {
"type": "string"
}
},
"type": "object"
}
}
},
"description": "// 用戶不存在"
},
"409": {
"content": {
"application/json": {
"schema": {
"properties": {
"code": {
"type": "integer"
},
"details": {
"type": "string"
},
"error": {
"description": "可選的錯誤信息"
},
"msg": {
"type": "string"
}
},
"type": "object"
}
}
},
"description": "// 郵箱已綁定"
},
"422": {
"content": {
"application/json": {
"schema": {
"properties": {
"code": {
"type": "integer"
},
"details": {
"type": "string"
},
"error": {
"description": "可選的錯誤信息"
},
"msg": {
"type": "string"
}
},
"type": "object"
}
}
},
"description": "// 郵箱未驗證"
},
"500": {
"content": {
"application/json": {
"schema": {
"properties": {
"code": {
"type": "integer"
},
"details": {
"type": "string"
},
"error": {
"description": "可選的錯誤信息"
},
"msg": {
"type": "string"
}
},
"type": "object"
}
}
},
"description": "// 服務器錯誤"
}
},
"summary": "綁定驗證 Email"
}
},
"/api/v1/account/bind-info": {
"post": {
"description": "初次綁定用戶的詳細資料",
"operationId": "accountBindUserInfo",
"requestBody": {
"content": {
"application/json": {
"schema": {
"properties": {
"address": {
"type": "string"
},
"alarm_type": {
"type": "integer"
},
"avatar": {
"type": "string"
},
"birthdate": {
"type": "integer"
},
"currency": {
"type": "string"
},
"email": {
"type": "string"
},
"full_name": {
"type": "string"
},
"gender": {
"type": "integer"
},
"language": {
"type": "string"
},
"nick_name": {
"type": "string"
},
"phone_number": {
"type": "string"
},
"status": {
"type": "integer"
},
"uid": {
"type": "string"
}
},
"required": [
"uid",
"alarm_type",
"status",
"language",
"currency",
"avatar",
"nick_name",
"full_name",
"gender",
"birthdate",
"phone_number",
"email",
"address"
],
"type": "object"
}
}
},
"required": true
},
"responses": {
"200": {
"content": {
"application/json": {
"schema": {
"properties": {
"code": {
"type": "integer"
},
"data": {},
"msg": {
"type": "string"
}
},
"type": "object"
}
}
},
"description": "// 綁定成功"
},
"400": {
"content": {
"application/json": {
"schema": {
"oneOf": [
{
"$ref": "#/components/schemas/ErrorResp"
},
{
"$ref": "#/components/schemas/ErrorResp"
},
{
"$ref": "#/components/schemas/ErrorResp"
},
{
"$ref": "#/components/schemas/ErrorResp"
}
]
}
}
},
"description": "客戶端錯誤\n\nPossible errors:\n40004: ErrorResp - 參數驗證失敗\n40005: ErrorResp - UID 格式錯誤\n40006: ErrorResp - 郵箱格式錯誤\n40007: ErrorResp - 電話格式錯誤"
},
"404": {
"content": {
"application/json": {
"schema": {
"properties": {
"code": {
"type": "integer"
},
"details": {
"type": "string"
},
"error": {
"description": "可選的錯誤信息"
},
"msg": {
"type": "string"
}
},
"type": "object"
}
}
},
"description": "// 用戶不存在"
},
"409": {
"content": {
"application/json": {
"schema": {
"properties": {
"code": {
"type": "integer"
},
"details": {
"type": "string"
},
"error": {
"description": "可選的錯誤信息"
},
"msg": {
"type": "string"
}
},
"type": "object"
}
}
},
"description": "// 用戶資料已存在"
},
"422": {
"content": {
"application/json": {
"schema": {
"properties": {
"code": {
"type": "integer"
},
"details": {
"type": "string"
},
"error": {
"description": "可選的錯誤信息"
},
"msg": {
"type": "string"
}
},
"type": "object"
}
}
},
"description": "// 用戶資料不完整"
},
"500": {
"content": {
"application/json": {
"schema": {
"properties": {
"code": {
"type": "integer"
},
"details": {
"type": "string"
},
"error": {
"description": "可選的錯誤信息"
},
"msg": {
"type": "string"
}
},
"type": "object"
}
}
},
"description": "// 服務器錯誤"
}
},
"summary": "綁定用戶資料"
}
},
"/api/v1/account/bind-phone": {
"post": {
"description": "綁定並驗證用戶的電話號碼",
"operationId": "accountBindVerifyPhone",
"requestBody": {
"content": {
"application/json": {
"schema": {
"properties": {
"phone": {
"type": "string"
},
"uid": {
"type": "string"
}
},
"required": [
"uid",
"phone"
],
"type": "object"
}
}
},
"required": true
},
"responses": {
"200": {
"content": {
"application/json": {
"schema": {
"properties": {
"code": {
"type": "integer"
},
"data": {},
"msg": {
"type": "string"
}
},
"type": "object"
}
}
},
"description": "// 綁定成功"
},
"400": {
"content": {
"application/json": {
"schema": {
"oneOf": [
{
"$ref": "#/components/schemas/ErrorResp"
},
{
"$ref": "#/components/schemas/ErrorResp"
}
]
}
}
},
"description": "客戶端錯誤\n\nPossible errors:\n40005: ErrorResp - UID 格式錯誤\n40007: ErrorResp - 電話格式錯誤"
},
"404": {
"content": {
"application/json": {
"schema": {
"properties": {
"code": {
"type": "integer"
},
"details": {
"type": "string"
},
"error": {
"description": "可選的錯誤信息"
},
"msg": {
"type": "string"
}
},
"type": "object"
}
}
},
"description": "// 用戶不存在"
},
"409": {
"content": {
"application/json": {
"schema": {
"properties": {
"code": {
"type": "integer"
},
"details": {
"type": "string"
},
"error": {
"description": "可選的錯誤信息"
},
"msg": {
"type": "string"
}
},
"type": "object"
}
}
},
"description": "// 電話已綁定"
},
"422": {
"content": {
"application/json": {
"schema": {
"properties": {
"code": {
"type": "integer"
},
"details": {
"type": "string"
},
"error": {
"description": "可選的錯誤信息"
},
"msg": {
"type": "string"
}
},
"type": "object"
}
}
},
"description": "// 電話未驗證"
},
"500": {
"content": {
"application/json": {
"schema": {
"properties": {
"code": {
"type": "integer"
},
"details": {
"type": "string"
},
"error": {
"description": "可選的錯誤信息"
},
"msg": {
"type": "string"
}
},
"type": "object"
}
}
},
"description": "// 服務器錯誤"
}
},
"summary": "綁定驗證 Phone"
}
},
"/api/v1/account/check-code": {
"post": {
"description": "檢查驗證碼是否正確,但不刪除驗證碼",
"operationId": "accountCheckRefreshCode",
"requestBody": {
"content": {
"application/json": {
"schema": {
"properties": {
"account": {
"type": "string"
},
"code_type": {
"type": "integer"
},
"verify_code": {
"type": "string"
}
},
"required": [
"account",
"code_type",
"verify_code"
],
"type": "object"
}
}
},
"required": true
},
"responses": {
"200": {
"content": {
"application/json": {
"schema": {
"properties": {
"code": {
"type": "integer"
},
"data": {},
"msg": {
"type": "string"
}
},
"type": "object"
}
}
},
"description": "// 檢查成功"
},
"400": {
"content": {
"application/json": {
"schema": {
"oneOf": [
{
"$ref": "#/components/schemas/ErrorResp"
},
{
"$ref": "#/components/schemas/ErrorResp"
},
{
"$ref": "#/components/schemas/ErrorResp"
},
{
"$ref": "#/components/schemas/ErrorResp"
}
]
}
}
},
"description": "客戶端錯誤\n\nPossible errors:\n40010: ErrorResp - 驗證碼類型無效\n40011: ErrorResp - 驗證碼格式錯誤\n40001: ErrorResp - 帳號格式錯誤\n40004: ErrorResp - 參數驗證失敗"
},
"404": {
"content": {
"application/json": {
"schema": {
"properties": {
"code": {
"type": "integer"
},
"details": {
"type": "string"
},
"error": {
"description": "可選的錯誤信息"
},
"msg": {
"type": "string"
}
},
"type": "object"
}
}
},
"description": "// 驗證碼不存在"
},
"422": {
"content": {
"application/json": {
"schema": {
"properties": {
"code": {
"type": "integer"
},
"details": {
"type": "string"
},
"error": {
"description": "可選的錯誤信息"
},
"msg": {
"type": "string"
}
},
"type": "object"
}
}
},
"description": "// 驗證碼無效或已過期"
},
"500": {
"content": {
"application/json": {
"schema": {
"properties": {
"code": {
"type": "integer"
},
"details": {
"type": "string"
},
"error": {
"description": "可選的錯誤信息"
},
"msg": {
"type": "string"
}
},
"type": "object"
}
}
},
"description": "// 服務器錯誤"
}
},
"summary": "檢查驗證碼"
}
},
"/api/v1/account/create": {
"post": {
"description": "創建新的用戶帳號,支援多平台登入",
"operationId": "accountCreateUserAccount",
"requestBody": {
"content": {
"application/json": {
"schema": {
"properties": {
"login_id": {
"type": "string"
},
"platform": {
"type": "integer"
},
"token": {
"type": "string"
}
},
"required": [
"login_id",
"platform",
"token"
],
"type": "object"
}
}
},
"required": true
},
"responses": {
"200": {
"content": {
"application/json": {
"schema": {
"properties": {
"code": {
"type": "integer"
},
"data": {},
"msg": {
"type": "string"
}
},
"type": "object"
}
}
},
"description": "// 創建成功"
},
"400": {
"content": {
"application/json": {
"schema": {
"oneOf": [
{
"$ref": "#/components/schemas/ErrorResp"
},
{
"$ref": "#/components/schemas/ErrorResp"
},
{
"$ref": "#/components/schemas/ErrorResp"
}
]
}
}
},
"description": "客戶端錯誤\n\nPossible errors:\n40001: ErrorResp - 帳號格式錯誤\n40002: ErrorResp - 密碼強度不足\n40003: ErrorResp - 平台類型無效"
},
"409": {
"content": {
"application/json": {
"schema": {
"properties": {
"code": {
"type": "integer"
},
"details": {
"type": "string"
},
"error": {
"description": "可選的錯誤信息"
},
"msg": {
"type": "string"
}
},
"type": "object"
}
}
},
"description": "// 帳號已存在"
},
"422": {
"content": {
"application/json": {
"schema": {
"properties": {
"code": {
"type": "integer"
},
"details": {
"type": "string"
},
"error": {
"description": "可選的錯誤信息"
},
"msg": {
"type": "string"
}
},
"type": "object"
}
}
},
"description": "// 請求格式正確但語義錯誤"
},
"500": {
"content": {
"application/json": {
"schema": {
"properties": {
"code": {
"type": "integer"
},
"details": {
"type": "string"
},
"error": {
"description": "可選的錯誤信息"
},
"msg": {
"type": "string"
}
},
"type": "object"
}
}
},
"description": "// 服務器錯誤"
}
},
"summary": "創建用戶帳號"
}
},
"/api/v1/account/generate-code": {
"post": {
"description": "為指定帳號生成驗證碼,用於忘記密碼等功能",
"operationId": "accountGenerateRefreshCode",
"requestBody": {
"content": {
"application/json": {
"schema": {
"properties": {
"account": {
"type": "string"
},
"code_type": {
"type": "integer"
}
},
"required": [
"account",
"code_type"
],
"type": "object"
}
}
},
"required": true
},
"responses": {
"200": {
"content": {
"application/json": {
"schema": {
"properties": {
"data": {
"properties": {
"verify_code": {
"type": "string"
}
},
"required": [
"verify_code"
],
"type": "object"
}
},
"type": "object"
}
}
},
"description": "// 生成成功"
},
"400": {
"content": {
"application/json": {
"schema": {
"oneOf": [
{
"$ref": "#/components/schemas/ErrorResp"
},
{
"$ref": "#/components/schemas/ErrorResp"
},
{
"$ref": "#/components/schemas/ErrorResp"
}
]
}
}
},
"description": "客戶端錯誤\n\nPossible errors:\n40001: ErrorResp - 帳號格式錯誤\n40004: ErrorResp - 參數驗證失敗\n40010: ErrorResp - 驗證碼類型無效"
},
"404": {
"content": {
"application/json": {
"schema": {
"properties": {
"code": {
"type": "integer"
},
"details": {
"type": "string"
},
"error": {
"description": "可選的錯誤信息"
},
"msg": {
"type": "string"
}
},
"type": "object"
}
}
},
"description": "// 帳號不存在"
},
"429": {
"content": {
"application/json": {
"schema": {
"properties": {
"code": {
"type": "integer"
},
"details": {
"type": "string"
},
"error": {
"description": "可選的錯誤信息"
},
"msg": {
"type": "string"
}
},
"type": "object"
}
}
},
"description": "// 請求過於頻繁"
},
"500": {
"content": {
"application/json": {
"schema": {
"properties": {
"code": {
"type": "integer"
},
"details": {
"type": "string"
},
"error": {
"description": "可選的錯誤信息"
},
"msg": {
"type": "string"
}
},
"type": "object"
}
}
},
"description": "// 服務器錯誤"
}
},
"summary": "生成驗證碼"
}
},
"/api/v1/account/info": {
"post": {
"description": "根據帳號獲取用戶的帳號資訊",
"operationId": "accountGetUserAccountInfo",
"requestBody": {
"content": {
"application/json": {
"schema": {
"properties": {
"account": {
"type": "string"
}
},
"required": [
"account"
],
"type": "object"
}
}
},
"required": true
},
"responses": {
"200": {
"content": {
"application/json": {
"schema": {
"properties": {
"data": {
"properties": {
"login_id": {
"type": "string"
},
"platform": {
"type": "integer"
},
"token": {
"type": "string"
}
},
"required": [
"login_id",
"platform",
"token"
],
"type": "object"
}
},
"type": "object"
}
}
},
"description": "// 獲取成功"
},
"400": {
"content": {
"application/json": {
"schema": {
"oneOf": [
{
"$ref": "#/components/schemas/ErrorResp"
},
{
"$ref": "#/components/schemas/ErrorResp"
}
]
}
}
},
"description": "客戶端錯誤\n\nPossible errors:\n40001: ErrorResp - 帳號格式錯誤\n40004: ErrorResp - 參數驗證失敗"
},
"404": {
"content": {
"application/json": {
"schema": {
"properties": {
"code": {
"type": "integer"
},
"details": {
"type": "string"
},
"error": {
"description": "可選的錯誤信息"
},
"msg": {
"type": "string"
}
},
"type": "object"
}
}
},
"description": "// 帳號不存在"
},
"500": {
"content": {
"application/json": {
"schema": {
"properties": {
"code": {
"type": "integer"
},
"details": {
"type": "string"
},
"error": {
"description": "可選的錯誤信息"
},
"msg": {
"type": "string"
}
},
"type": "object"
}
}
},
"description": "// 服務器錯誤"
}
},
"summary": "獲取帳號資訊"
}
},
"/api/v1/account/line/profile": {
"post": {
"description": "使用 LINE Access Token 獲取用戶資料",
"operationId": "accountLineGetProfileByAccessToken",
"requestBody": {
"content": {
"application/json": {
"schema": {
"properties": {
"token": {
"type": "string"
}
},
"required": [
"token"
],
"type": "object"
}
}
},
"required": true
},
"responses": {
"200": {
"content": {
"application/json": {
"schema": {
"properties": {
"display_name": {
"type": "string"
},
"picture_url": {
"type": "string"
},
"status_message": {
"type": "string"
},
"user_id": {
"type": "string"
}
},
"type": "object"
}
}
},
"description": "// 獲取成功"
},
"400": {
"content": {
"application/json": {
"schema": {
"oneOf": [
{
"$ref": "#/components/schemas/ErrorResp"
},
{
"$ref": "#/components/schemas/ErrorResp"
}
]
}
}
},
"description": "客戶端錯誤\n\nPossible errors:\n40004: ErrorResp - 參數驗證失敗\n40012: ErrorResp - Token 格式錯誤"
},
"401": {
"content": {
"application/json": {
"schema": {
"properties": {
"code": {
"type": "integer"
},
"details": {
"type": "string"
},
"error": {
"description": "可選的錯誤信息"
},
"msg": {
"type": "string"
}
},
"type": "object"
}
}
},
"description": "// Token 無效或過期"
},
"422": {
"content": {
"application/json": {
"schema": {
"properties": {
"code": {
"type": "integer"
},
"details": {
"type": "string"
},
"error": {
"description": "可選的錯誤信息"
},
"msg": {
"type": "string"
}
},
"type": "object"
}
}
},
"description": "// LINE 用戶資料獲取失敗"
},
"500": {
"content": {
"application/json": {
"schema": {
"properties": {
"code": {
"type": "integer"
},
"details": {
"type": "string"
},
"error": {
"description": "可選的錯誤信息"
},
"msg": {
"type": "string"
}
},
"type": "object"
}
}
},
"description": "// 服務器錯誤"
}
},
"summary": "LINE 獲取用戶資料"
}
},
"/api/v1/account/line/token": {
"post": {
"description": "使用 LINE 授權碼獲取 Access Token",
"operationId": "accountLineCodeToAccessToken",
"requestBody": {
"content": {
"application/json": {
"schema": {
"properties": {
"code": {
"type": "string"
}
},
"required": [
"code"
],
"type": "object"
}
}
},
"required": true
},
"responses": {
"200": {
"content": {
"application/json": {
"schema": {
"properties": {
"token": {
"type": "string"
}
},
"type": "object"
}
}
},
"description": "// 獲取成功"
},
"400": {
"content": {
"application/json": {
"schema": {
"oneOf": [
{
"$ref": "#/components/schemas/ErrorResp"
},
{
"$ref": "#/components/schemas/ErrorResp"
}
]
}
}
},
"description": "客戶端錯誤\n\nPossible errors:\n40004: ErrorResp - 參數驗證失敗\n40013: ErrorResp - 授權碼格式錯誤"
},
"401": {
"content": {
"application/json": {
"schema": {
"properties": {
"code": {
"type": "integer"
},
"details": {
"type": "string"
},
"error": {
"description": "可選的錯誤信息"
},
"msg": {
"type": "string"
}
},
"type": "object"
}
}
},
"description": "// 授權碼無效或過期"
},
"422": {
"content": {
"application/json": {
"schema": {
"properties": {
"code": {
"type": "integer"
},
"details": {
"type": "string"
},
"error": {
"description": "可選的錯誤信息"
},
"msg": {
"type": "string"
}
},
"type": "object"
}
}
},
"description": "// LINE 認證失敗"
},
"500": {
"content": {
"application/json": {
"schema": {
"properties": {
"code": {
"type": "integer"
},
"details": {
"type": "string"
},
"error": {
"description": "可選的錯誤信息"
},
"msg": {
"type": "string"
}
},
"type": "object"
}
}
},
"description": "// 服務器錯誤"
}
},
"summary": "LINE 獲取 Access Token"
}
},
"/api/v1/account/list": {
"post": {
"description": "分頁獲取用戶列表,支援篩選條件",
"operationId": "accountListMember",
"requestBody": {
"content": {
"application/json": {
"schema": {
"properties": {
"alarm_type": {
"type": "integer"
},
"create_end_time": {
"type": "integer"
},
"create_start_time": {
"type": "integer"
},
"page_index": {
"type": "integer"
},
"page_size": {
"type": "integer"
},
"status": {
"type": "integer"
}
},
"required": [
"alarm_type",
"status",
"create_start_time",
"create_end_time",
"page_size",
"page_index"
],
"type": "object"
}
}
},
"required": true
},
"responses": {
"200": {
"content": {
"application/json": {
"schema": {
"properties": {
"data": {
"items": {
"properties": {
"address": {
"type": "string"
},
"alarm_type": {
"type": "integer"
},
"avatar_url": {
"type": "string"
},
"birthday": {
"type": "integer"
},
"create_time": {
"type": "integer"
},
"currency": {
"type": "string"
},
"email": {
"type": "string"
},
"full_name": {
"type": "string"
},
"gender_code": {
"type": "integer"
},
"language": {
"type": "string"
},
"nick_name": {
"type": "string"
},
"phone": {
"type": "string"
},
"status": {
"type": "integer"
},
"uid": {
"type": "string"
},
"update_time": {
"type": "integer"
}
},
"required": [
"uid",
"avatar_url",
"full_name",
"nick_name",
"gender_code",
"birthday",
"phone",
"email",
"address",
"alarm_type",
"status",
"language",
"currency",
"create_time",
"update_time"
],
"type": "object"
},
"type": "array"
},
"pager": {
"properties": {
"index": {
"type": "integer"
},
"size": {
"type": "integer"
},
"total": {
"type": "integer"
}
},
"required": [
"total",
"size",
"index"
],
"type": "object"
}
},
"type": "object"
}
}
},
"description": "// 獲取成功"
},
"400": {
"content": {
"application/json": {
"schema": {
"oneOf": [
{
"$ref": "#/components/schemas/ErrorResp"
},
{
"$ref": "#/components/schemas/ErrorResp"
}
]
}
}
},
"description": "客戶端錯誤\n\nPossible errors:\n40004: ErrorResp - 參數驗證失敗\n40009: ErrorResp - 分頁參數無效"
},
"500": {
"content": {
"application/json": {
"schema": {
"properties": {
"code": {
"type": "integer"
},
"details": {
"type": "string"
},
"error": {
"description": "可選的錯誤信息"
},
"msg": {
"type": "string"
}
},
"type": "object"
}
}
},
"description": "// 服務器錯誤"
}
},
"summary": "獲取用戶列表"
}
},
"/api/v1/account/uid": {
"post": {
"description": "根據帳號獲取對應的用戶 UID",
"operationId": "accountGetUIDByAccount",
"requestBody": {
"content": {
"application/json": {
"schema": {
"properties": {
"account": {
"type": "string"
}
},
"required": [
"account"
],
"type": "object"
}
}
},
"required": true
},
"responses": {
"200": {
"content": {
"application/json": {
"schema": {
"properties": {
"account": {
"type": "string"
},
"uid": {
"type": "string"
}
},
"type": "object"
}
}
},
"description": "// 獲取成功"
},
"400": {
"content": {
"application/json": {
"schema": {
"oneOf": [
{
"$ref": "#/components/schemas/ErrorResp"
},
{
"$ref": "#/components/schemas/ErrorResp"
}
]
}
}
},
"description": "客戶端錯誤\n\nPossible errors:\n40004: ErrorResp - 參數驗證失敗\n40001: ErrorResp - 帳號格式錯誤"
},
"404": {
"content": {
"application/json": {
"schema": {
"properties": {
"code": {
"type": "integer"
},
"details": {
"type": "string"
},
"error": {
"description": "可選的錯誤信息"
},
"msg": {
"type": "string"
}
},
"type": "object"
}
}
},
"description": "// 帳號不存在"
},
"500": {
"content": {
"application/json": {
"schema": {
"properties": {
"code": {
"type": "integer"
},
"details": {
"type": "string"
},
"error": {
"description": "可選的錯誤信息"
},
"msg": {
"type": "string"
}
},
"type": "object"
}
}
},
"description": "// 服務器錯誤"
}
},
"summary": "獲取用戶 UID"
}
},
"/api/v1/account/update-info": {
"post": {
"description": "更新用戶的個人資料資訊",
"operationId": "accountUpdateUserInfo",
"requestBody": {
"content": {
"application/json": {
"schema": {
"properties": {
"address": {
"type": "string"
},
"alarm_type": {
"type": "integer"
},
"avatar": {
"type": "string"
},
"birthdate": {
"type": "integer"
},
"currency": {
"type": "string"
},
"full_name": {
"type": "string"
},
"gender": {
"type": "integer"
},
"language": {
"type": "string"
},
"nick_name": {
"type": "string"
},
"status": {
"type": "integer"
},
"uid": {
"type": "string"
}
},
"required": [
"uid",
"language",
"currency",
"nick_name",
"avatar",
"alarm_type",
"status",
"full_name",
"gender",
"birthdate",
"address"
],
"type": "object"
}
}
},
"required": true
},
"responses": {
"200": {
"content": {
"application/json": {
"schema": {
"properties": {
"code": {
"type": "integer"
},
"data": {},
"msg": {
"type": "string"
}
},
"type": "object"
}
}
},
"description": "// 更新成功"
},
"400": {
"content": {
"application/json": {
"schema": {
"oneOf": [
{
"$ref": "#/components/schemas/ErrorResp"
},
{
"$ref": "#/components/schemas/ErrorResp"
},
{
"$ref": "#/components/schemas/ErrorResp"
},
{
"$ref": "#/components/schemas/ErrorResp"
}
]
}
}
},
"description": "客戶端錯誤\n\nPossible errors:\n40006: ErrorResp - 郵箱格式錯誤\n40007: ErrorResp - 電話格式錯誤\n40004: ErrorResp - 參數驗證失敗\n40005: ErrorResp - UID 格式錯誤"
},
"404": {
"content": {
"application/json": {
"schema": {
"properties": {
"code": {
"type": "integer"
},
"details": {
"type": "string"
},
"error": {
"description": "可選的錯誤信息"
},
"msg": {
"type": "string"
}
},
"type": "object"
}
}
},
"description": "// 用戶不存在"
},
"422": {
"content": {
"application/json": {
"schema": {
"properties": {
"code": {
"type": "integer"
},
"details": {
"type": "string"
},
"error": {
"description": "可選的錯誤信息"
},
"msg": {
"type": "string"
}
},
"type": "object"
}
}
},
"description": "// 用戶資料無效"
},
"500": {
"content": {
"application/json": {
"schema": {
"properties": {
"code": {
"type": "integer"
},
"details": {
"type": "string"
},
"error": {
"description": "可選的錯誤信息"
},
"msg": {
"type": "string"
}
},
"type": "object"
}
}
},
"description": "// 服務器錯誤"
}
},
"summary": "更新用戶資料"
}
},
"/api/v1/account/update-status": {
"post": {
"description": "更新用戶的帳號狀態",
"operationId": "accountUpdateStatus",
"requestBody": {
"content": {
"application/json": {
"schema": {
"properties": {
"status": {
"type": "integer"
},
"uid": {
"type": "string"
}
},
"required": [
"uid",
"status"
],
"type": "object"
}
}
},
"required": true
},
"responses": {
"200": {
"content": {
"application/json": {
"schema": {
"properties": {
"code": {
"type": "integer"
},
"data": {},
"msg": {
"type": "string"
}
},
"type": "object"
}
}
},
"description": "// 更新成功"
},
"400": {
"content": {
"application/json": {
"schema": {
"oneOf": [
{
"$ref": "#/components/schemas/ErrorResp"
},
{
"$ref": "#/components/schemas/ErrorResp"
},
{
"$ref": "#/components/schemas/ErrorResp"
}
]
}
}
},
"description": "客戶端錯誤\n\nPossible errors:\n40004: ErrorResp - 參數驗證失敗\n40005: ErrorResp - UID 格式錯誤\n40008: ErrorResp - 狀態值無效"
},
"404": {
"content": {
"application/json": {
"schema": {
"properties": {
"code": {
"type": "integer"
},
"details": {
"type": "string"
},
"error": {
"description": "可選的錯誤信息"
},
"msg": {
"type": "string"
}
},
"type": "object"
}
}
},
"description": "// 用戶不存在"
},
"422": {
"content": {
"application/json": {
"schema": {
"properties": {
"code": {
"type": "integer"
},
"details": {
"type": "string"
},
"error": {
"description": "可選的錯誤信息"
},
"msg": {
"type": "string"
}
},
"type": "object"
}
}
},
"description": "// 狀態更新無效"
},
"500": {
"content": {
"application/json": {
"schema": {
"properties": {
"code": {
"type": "integer"
},
"details": {
"type": "string"
},
"error": {
"description": "可選的錯誤信息"
},
"msg": {
"type": "string"
}
},
"type": "object"
}
}
},
"description": "// 服務器錯誤"
}
},
"summary": "更新用戶狀態"
}
},
"/api/v1/account/update-token": {
"post": {
"description": "更新指定帳號的密碼",
"operationId": "accountUpdateUserToken",
"requestBody": {
"content": {
"application/json": {
"schema": {
"properties": {
"account": {
"type": "string"
},
"platform": {
"type": "integer"
},
"token": {
"type": "string"
}
},
"required": [
"account",
"token",
"platform"
],
"type": "object"
}
}
},
"required": true
},
"responses": {
"200": {
"content": {
"application/json": {
"schema": {
"properties": {
"code": {
"type": "integer"
},
"data": {},
"msg": {
"type": "string"
}
},
"type": "object"
}
}
},
"description": "// 更新成功"
},
"400": {
"content": {
"application/json": {
"schema": {
"oneOf": [
{
"$ref": "#/components/schemas/ErrorResp"
},
{
"$ref": "#/components/schemas/ErrorResp"
},
{
"$ref": "#/components/schemas/ErrorResp"
}
]
}
}
},
"description": "客戶端錯誤\n\nPossible errors:\n40003: ErrorResp - 平台類型無效\n40001: ErrorResp - 帳號格式錯誤\n40002: ErrorResp - 密碼強度不足"
},
"404": {
"content": {
"application/json": {
"schema": {
"properties": {
"code": {
"type": "integer"
},
"details": {
"type": "string"
},
"error": {
"description": "可選的錯誤信息"
},
"msg": {
"type": "string"
}
},
"type": "object"
}
}
},
"description": "// 帳號不存在"
},
"500": {
"content": {
"application/json": {
"schema": {
"properties": {
"code": {
"type": "integer"
},
"details": {
"type": "string"
},
"error": {
"description": "可選的錯誤信息"
},
"msg": {
"type": "string"
}
},
"type": "object"
}
}
},
"description": "// 服務器錯誤"
}
},
"summary": "更新用戶密碼"
}
},
"/api/v1/account/user-info": {
"post": {
"description": "根據 UID 或暱稱獲取用戶詳細資訊",
"operationId": "accountGetUserInfo",
"requestBody": {
"content": {
"application/json": {
"schema": {
"properties": {
"nick_name": {
"type": "string"
},
"uid": {
"type": "string"
}
},
"required": [
"uid",
"nick_name"
],
"type": "object"
}
}
},
"required": true
},
"responses": {
"200": {
"content": {
"application/json": {
"schema": {
"properties": {
"data": {
"properties": {
"address": {
"type": "string"
},
"alarm_type": {
"type": "integer"
},
"avatar_url": {
"type": "string"
},
"birthday": {
"type": "integer"
},
"create_time": {
"type": "integer"
},
"currency": {
"type": "string"
},
"email": {
"type": "string"
},
"full_name": {
"type": "string"
},
"gender_code": {
"type": "integer"
},
"language": {
"type": "string"
},
"nick_name": {
"type": "string"
},
"phone": {
"type": "string"
},
"status": {
"type": "integer"
},
"uid": {
"type": "string"
},
"update_time": {
"type": "integer"
}
},
"required": [
"uid",
"avatar_url",
"full_name",
"nick_name",
"gender_code",
"birthday",
"phone",
"email",
"address",
"alarm_type",
"status",
"language",
"currency",
"create_time",
"update_time"
],
"type": "object"
}
},
"type": "object"
}
}
},
"description": "// 獲取成功"
},
"400": {
"content": {
"application/json": {
"schema": {
"oneOf": [
{
"$ref": "#/components/schemas/ErrorResp"
},
{
"$ref": "#/components/schemas/ErrorResp"
}
]
}
}
},
"description": "客戶端錯誤\n\nPossible errors:\n40004: ErrorResp - 參數驗證失敗\n40005: ErrorResp - UID 格式錯誤"
},
"404": {
"content": {
"application/json": {
"schema": {
"properties": {
"code": {
"type": "integer"
},
"details": {
"type": "string"
},
"error": {
"description": "可選的錯誤信息"
},
"msg": {
"type": "string"
}
},
"type": "object"
}
}
},
"description": "// 用戶不存在"
},
"500": {
"content": {
"application/json": {
"schema": {
"properties": {
"code": {
"type": "integer"
},
"details": {
"type": "string"
},
"error": {
"description": "可選的錯誤信息"
},
"msg": {
"type": "string"
}
},
"type": "object"
}
}
},
"description": "// 服務器錯誤"
}
},
"summary": "獲取用戶資訊"
}
},
"/api/v1/account/verify-code": {
"post": {
"description": "驗證並使用驗證碼,驗證後會刪除驗證碼",
"operationId": "accountVerifyRefreshCode",
"requestBody": {
"content": {
"application/json": {
"schema": {
"properties": {
"account": {
"type": "string"
},
"code_type": {
"type": "integer"
},
"verify_code": {
"type": "string"
}
},
"required": [
"account",
"code_type",
"verify_code"
],
"type": "object"
}
}
},
"required": true
},
"responses": {
"200": {
"content": {
"application/json": {
"schema": {
"properties": {
"code": {
"type": "integer"
},
"data": {},
"msg": {
"type": "string"
}
},
"type": "object"
}
}
},
"description": "// 驗證成功"
},
"400": {
"content": {
"application/json": {
"schema": {
"oneOf": [
{
"$ref": "#/components/schemas/ErrorResp"
},
{
"$ref": "#/components/schemas/ErrorResp"
},
{
"$ref": "#/components/schemas/ErrorResp"
},
{
"$ref": "#/components/schemas/ErrorResp"
}
]
}
}
},
"description": "客戶端錯誤\n\nPossible errors:\n40001: ErrorResp - 帳號格式錯誤\n40004: ErrorResp - 參數驗證失敗\n40010: ErrorResp - 驗證碼類型無效\n40011: ErrorResp - 驗證碼格式錯誤"
},
"404": {
"content": {
"application/json": {
"schema": {
"properties": {
"code": {
"type": "integer"
},
"details": {
"type": "string"
},
"error": {
"description": "可選的錯誤信息"
},
"msg": {
"type": "string"
}
},
"type": "object"
}
}
},
"description": "// 驗證碼不存在"
},
"422": {
"content": {
"application/json": {
"schema": {
"properties": {
"code": {
"type": "integer"
},
"details": {
"type": "string"
},
"error": {
"description": "可選的錯誤信息"
},
"msg": {
"type": "string"
}
},
"type": "object"
}
}
},
"description": "// 驗證碼無效或已過期"
},
"500": {
"content": {
"application/json": {
"schema": {
"properties": {
"code": {
"type": "integer"
},
"details": {
"type": "string"
},
"error": {
"description": "可選的錯誤信息"
},
"msg": {
"type": "string"
}
},
"type": "object"
}
}
},
"description": "// 服務器錯誤"
}
},
"summary": "驗證驗證碼"
}
},
"/api/v1/account/verify-google": {
"post": {
"description": "驗證 Google OAuth 登入是否有效",
"operationId": "accountVerifyGoogleAuthResult",
"requestBody": {
"content": {
"application/json": {
"schema": {
"properties": {
"account": {
"type": "string"
},
"token": {
"type": "string"
}
},
"required": [
"token",
"account"
],
"type": "object"
}
}
},
"required": true
},
"responses": {
"200": {
"content": {
"application/json": {
"schema": {
"properties": {
"aud": {
"type": "string"
},
"email": {
"type": "string"
},
"email_verified": {
"type": "string"
},
"exp": {
"type": "string"
},
"iat": {
"type": "string"
},
"iss": {
"type": "string"
},
"name": {
"type": "string"
},
"picture": {
"type": "string"
},
"status": {
"type": "boolean"
},
"sub": {
"type": "string"
}
},
"type": "object"
}
}
},
"description": "// 驗證成功"
},
"400": {
"content": {
"application/json": {
"schema": {
"oneOf": [
{
"$ref": "#/components/schemas/ErrorResp"
},
{
"$ref": "#/components/schemas/ErrorResp"
}
]
}
}
},
"description": "客戶端錯誤\n\nPossible errors:\n40012: ErrorResp - Token 格式錯誤\n40004: ErrorResp - 參數驗證失敗"
},
"401": {
"content": {
"application/json": {
"schema": {
"properties": {
"code": {
"type": "integer"
},
"details": {
"type": "string"
},
"error": {
"description": "可選的錯誤信息"
},
"msg": {
"type": "string"
}
},
"type": "object"
}
}
},
"description": "// Token 無效或過期"
},
"422": {
"content": {
"application/json": {
"schema": {
"properties": {
"code": {
"type": "integer"
},
"details": {
"type": "string"
},
"error": {
"description": "可選的錯誤信息"
},
"msg": {
"type": "string"
}
},
"type": "object"
}
}
},
"description": "// Google 認證失敗"
},
"500": {
"content": {
"application/json": {
"schema": {
"properties": {
"code": {
"type": "integer"
},
"details": {
"type": "string"
},
"error": {
"description": "可選的錯誤信息"
},
"msg": {
"type": "string"
}
},
"type": "object"
}
}
},
"description": "// 服務器錯誤"
}
},
"summary": "驗證 Google 認證"
}
},
"/api/v1/account/verify-platform": {
"post": {
"description": "驗證平台登入認證是否有效",
"operationId": "accountVerifyPlatformAuthResult",
"requestBody": {
"content": {
"application/json": {
"schema": {
"properties": {
"account": {
"type": "string"
},
"token": {
"type": "string"
}
},
"required": [
"token",
"account"
],
"type": "object"
}
}
},
"required": true
},
"responses": {
"200": {
"content": {
"application/json": {
"schema": {
"properties": {
"status": {
"type": "boolean"
}
},
"type": "object"
}
}
},
"description": "// 驗證成功"
},
"400": {
"content": {
"application/json": {
"schema": {
"oneOf": [
{
"$ref": "#/components/schemas/ErrorResp"
},
{
"$ref": "#/components/schemas/ErrorResp"
}
]
}
}
},
"description": "客戶端錯誤\n\nPossible errors:\n40004: ErrorResp - 參數驗證失敗\n40012: ErrorResp - Token 格式錯誤"
},
"401": {
"content": {
"application/json": {
"schema": {
"properties": {
"code": {
"type": "integer"
},
"details": {
"type": "string"
},
"error": {
"description": "可選的錯誤信息"
},
"msg": {
"type": "string"
}
},
"type": "object"
}
}
},
"description": "// Token 無效或過期"
},
"422": {
"content": {
"application/json": {
"schema": {
"properties": {
"code": {
"type": "integer"
},
"details": {
"type": "string"
},
"error": {
"description": "可選的錯誤信息"
},
"msg": {
"type": "string"
}
},
"type": "object"
}
}
},
"description": "// 平台認證失敗"
},
"500": {
"content": {
"application/json": {
"schema": {
"properties": {
"code": {
"type": "integer"
},
"details": {
"type": "string"
},
"error": {
"description": "可選的錯誤信息"
},
"msg": {
"type": "string"
}
},
"type": "object"
}
}
},
"description": "// 服務器錯誤"
}
},
"summary": "驗證平台認證"
}
},
"/api/v1/health": {
"get": {
"description": "檢查系統服務狀態,用於監控和負載均衡器健康檢查。返回系統運行狀態信息。",
"operationId": "pingPing",
"responses": {
"200": {
"content": {
"application/json": {
"schema": {}
}
},
"description": ""
}
},
"summary": "系統健康檢查"
}
}
},
"servers": [
{
"url": "http://127.0.0.1:8888"
},
{
"url": "https://127.0.0.1:8888"
}
],
"x-date": "2025-10-01 00:43:58",
"x-description": "This is a go-doc generated swagger file.",
"x-generator": "go-doc",
"x-github": "https://github.com/danielchan-25/go-doc",
"x-source": "go-zero API specification"
}