184 lines
7.0 KiB
Go
184 lines
7.0 KiB
Go
package imconfiginternal
|
|
|
|
import "github.com/gogf/gf/v2/frame/g"
|
|
|
|
type TenantReq struct {
|
|
g.Meta `path:"/internal/im-config/tenants/by-code/{code}" method:"get" tags:"IM内部配置" summary:"按编码获取IM租户"`
|
|
Code string `json:"code" in:"path" dc:"租户编码"`
|
|
}
|
|
|
|
type TenantByIDReq struct {
|
|
g.Meta `path:"/internal/im-config/tenants/by-id/{id}" method:"get" tags:"IM内部配置" summary:"按ID获取IM租户"`
|
|
Id int64 `json:"id" in:"path" dc:"租户ID"`
|
|
}
|
|
|
|
type TenantListReq struct {
|
|
g.Meta `path:"/internal/im-config/tenants" method:"get" tags:"IM内部配置" summary:"获取IM租户列表"`
|
|
State string `json:"state" dc:"状态"`
|
|
Limit int `json:"limit" dc:"数量"`
|
|
}
|
|
|
|
type TenantRes struct {
|
|
*TenantModel
|
|
}
|
|
|
|
type TenantListRes struct {
|
|
Items []*TenantModel `json:"items" dc:"租户列表"`
|
|
}
|
|
|
|
type TenantModel struct {
|
|
ID int64 `json:"id"`
|
|
Code string `json:"code"`
|
|
Name string `json:"name"`
|
|
TenantDesc *string `json:"tenant_desc,omitempty"`
|
|
DBName string `json:"db_name"`
|
|
DBDSN string `json:"db_dsn"`
|
|
State int `json:"state"`
|
|
CreatedAt string `json:"created_at"`
|
|
CreatedBy int64 `json:"created_by"`
|
|
UpdatedAt string `json:"updated_at"`
|
|
UpdatedBy int64 `json:"updated_by"`
|
|
}
|
|
|
|
type RegistrationSmsReq struct {
|
|
g.Meta `path:"/internal/im-config/registration/sms" method:"get" tags:"IM内部配置" summary:"获取注册短信开关"`
|
|
}
|
|
|
|
type RegistrationSmsRes struct {
|
|
Enabled bool `json:"enabled" dc:"是否开启"`
|
|
}
|
|
|
|
type ThirdPartyReq struct {
|
|
g.Meta `path:"/internal/im-config/third-party/{group}" method:"get" tags:"IM内部配置" summary:"获取第三方配置"`
|
|
Group string `json:"group" in:"path" dc:"配置组"`
|
|
Keys string `json:"keys" dc:"配置键,逗号分隔"`
|
|
}
|
|
|
|
type ThirdPartyRes struct {
|
|
Values map[string]string `json:"values" dc:"配置值"`
|
|
}
|
|
|
|
type ModerationProviderReq struct {
|
|
g.Meta `path:"/internal/im-config/moderation/provider" method:"get" tags:"IM内部配置" summary:"获取内容审核服务配置"`
|
|
}
|
|
|
|
type ModerationProviderRes struct {
|
|
Provider string `json:"provider"`
|
|
Endpoint string `json:"endpoint"`
|
|
Enabled bool `json:"enabled"`
|
|
RegionID string `json:"region_id"`
|
|
NicknameService string `json:"nickname_service"`
|
|
ChatService string `json:"chat_service"`
|
|
TimeoutMS int `json:"timeout_ms"`
|
|
FailureMode string `json:"failure_mode"`
|
|
AccessKeyID string `json:"access_key_id"`
|
|
AccessKeySecret string `json:"access_key_secret"`
|
|
}
|
|
|
|
type ModerationPolicyReq struct {
|
|
g.Meta `path:"/internal/im-config/tenants/{code}/moderation-policy" method:"get" tags:"IM内部配置" summary:"获取商户内容审核策略"`
|
|
Code string `json:"code" in:"path" dc:"商户编码"`
|
|
}
|
|
|
|
type ModerationPolicyRes struct {
|
|
TenantID int64 `json:"tenant_id"`
|
|
TenantCode string `json:"tenant_code"`
|
|
PolicyVersion uint `json:"policy_version"`
|
|
Enabled bool `json:"enabled"`
|
|
AliyunEnabled bool `json:"aliyun_enabled"`
|
|
LocalWordsEnabled bool `json:"local_words_enabled"`
|
|
Scenes map[string]bool `json:"scenes"`
|
|
RiskActions map[string]string `json:"risk_actions"`
|
|
FailureMode string `json:"failure_mode"`
|
|
BlockMessage string `json:"block_message"`
|
|
}
|
|
|
|
type SecurityPolicyReq struct {
|
|
g.Meta `path:"/internal/im-config/tenants/{code}/security-policy" method:"get" tags:"IM内部配置" summary:"获取商户安全策略"`
|
|
Code string `json:"code" in:"path" dc:"商户编码"`
|
|
}
|
|
|
|
type SecurityPolicyRes struct {
|
|
TenantID int64 `json:"tenant_id"`
|
|
TenantCode string `json:"tenant_code"`
|
|
PolicyVersion uint `json:"policy_version"`
|
|
GlobalFriendEnabled bool `json:"global_friend_enabled"`
|
|
FriendDisabledPolicy map[string]interface{} `json:"friend_disabled_policy"`
|
|
MessageCurfewEnabled bool `json:"message_curfew_enabled"`
|
|
CurfewRules []*SecurityCurfewRuleRes `json:"curfew_rules"`
|
|
}
|
|
|
|
type SecurityCurfewRuleRes struct {
|
|
RuleCode string `json:"rule_code"`
|
|
RuleName string `json:"rule_name"`
|
|
DateType string `json:"date_type"`
|
|
CustomDates []string `json:"custom_dates"`
|
|
Weekdays []int `json:"weekdays"`
|
|
Timezone string `json:"timezone"`
|
|
StartTime string `json:"start_time"`
|
|
EndTime string `json:"end_time"`
|
|
Scope string `json:"scope"`
|
|
WhitelistUserIds []string `json:"whitelist_user_ids"`
|
|
WhitelistGroupIds []string `json:"whitelist_group_ids"`
|
|
Message string `json:"message"`
|
|
Status int `json:"status"`
|
|
Sort int `json:"sort"`
|
|
}
|
|
|
|
type SensitiveWordsReq struct {
|
|
g.Meta `path:"/internal/im-config/tenants/{code}/sensitive-words" method:"get" tags:"IM内部配置" summary:"获取商户有效敏感词"`
|
|
Code string `json:"code" in:"path" dc:"商户编码"`
|
|
}
|
|
|
|
type SensitiveWordsRes struct {
|
|
TenantID int64 `json:"tenant_id"`
|
|
TenantCode string `json:"tenant_code"`
|
|
Version int64 `json:"version"`
|
|
Items []*SensitiveWordModel `json:"items"`
|
|
}
|
|
|
|
type SensitiveWordModel struct {
|
|
ID int64 `json:"id"`
|
|
Word string `json:"word"`
|
|
MatchType string `json:"match_type"`
|
|
Scenes []string `json:"scenes"`
|
|
Action string `json:"action"`
|
|
Replacement string `json:"replacement"`
|
|
RiskLevel string `json:"risk_level"`
|
|
Priority int `json:"priority"`
|
|
}
|
|
|
|
type TenantLoginIPWhitelistReq struct {
|
|
g.Meta `path:"/internal/im-config/tenants/by-id/{id}/login-ip-whitelist" method:"get" tags:"IM内部配置" summary:"获取租户渠道登录IP白名单"`
|
|
Id int64 `json:"id" in:"path" dc:"租户ID"`
|
|
}
|
|
|
|
type TenantLoginIPWhitelistRes struct {
|
|
TenantId int64 `json:"tenant_id" dc:"租户ID"`
|
|
AppList []string `json:"app_list" dc:"APP登录IP白名单"`
|
|
WebList []string `json:"web_list" dc:"Web登录IP白名单"`
|
|
}
|
|
|
|
type AppReleaseLatestReq struct {
|
|
g.Meta `path:"/internal/im-config/app/releases/latest" method:"get" tags:"IM内部配置" summary:"获取客户端最新版本策略"`
|
|
Platform string `json:"platform" v:"required#平台不能为空" dc:"平台"`
|
|
Channel string `json:"channel" dc:"渠道"`
|
|
}
|
|
|
|
type AppReleaseLatestRes struct {
|
|
ID int64 `json:"id"`
|
|
Platform string `json:"platform"`
|
|
Channel string `json:"channel"`
|
|
LatestVersion string `json:"latest_version"`
|
|
MinSupportedVersion string `json:"min_supported_version"`
|
|
UpdateType string `json:"update_type"`
|
|
ReleaseNotes string `json:"release_notes"`
|
|
StoreURL string `json:"store_url"`
|
|
PackageURL string `json:"package_url"`
|
|
Checksum string `json:"checksum"`
|
|
RemindAfterSeconds int `json:"remind_after_seconds"`
|
|
PublishedAt string `json:"published_at"`
|
|
CreatedAt string `json:"created_at"`
|
|
UpdatedAt string `json:"updated_at"`
|
|
}
|