syntax = "v1"

info (
	title:   "APP服务"
	desc:    "APP服务"
	version: "v1"
)

@server (
	prefix: api/v1
	group:  app
)
service main {
	@doc (
		summary: "心跳检测接口"
	)
	@handler healthCheck
	get /health/check returns (HealthCheckResp)

	@handler getAppVersion
	get /app/version returns (getAppVersionResp)

	@handler getAppConfig
	get /app/config returns (getAppConfigResp)
}

type (
	// 心跳检测响应
	HealthCheckResp {
		Status  string `json:"status"` // 服务状态
		Message string `json:"message"` // 状态信息
	}
)

type (
	getAppVersionResp {
		Version string `json:"version"`
		WgtUrl  string `json:"wgtUrl"`
	}
)

type (
	getAppConfigResp {
		QueryRetentionDays   int64 `json:"query_retention_days"`
		WechatH5LoginEnabled bool  `json:"wechat_h5_login_enabled"` // 微信公众号登录是否启用
	}
)

