2026-08-16 22:46:48 +08:00
|
|
|
|
/*
|
|
|
|
|
|
* Copyright (c) 2025 SimcuTeam. All rights reserved.
|
|
|
|
|
|
* 移植自 C# 项目 SimApi(E:\simcu\simapi-net),遵循 MIT 许可证。
|
|
|
|
|
|
* AuthSDK 用到的 DTO(对齐 C# SimApiAuthCenterDto / SimApiAuthIamDto)。
|
2026-08-16 23:44:20 +08:00
|
|
|
|
*
|
|
|
|
|
|
* 说明:C# 中这些 DTO 是 SimApiAuthCenterDto / SimApiAuthIamDto 的嵌套类;
|
|
|
|
|
|
* 仓颉不支持在类体内声明嵌套类(unexpected class declaration in class body),
|
|
|
|
|
|
* 故拍平为顶层类,语义与字段保持一致。
|
2026-08-16 22:46:48 +08:00
|
|
|
|
*/
|
|
|
|
|
|
|
|
|
|
|
|
package simapi.authsdk
|
|
|
|
|
|
|
|
|
|
|
|
import std.collection.*
|
|
|
|
|
|
import stdx.encoding.json.*
|
|
|
|
|
|
import soulsoft_serialization.*
|
|
|
|
|
|
import soulsoft_serialization.macros.*
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
|
* 应用/Profile 通用项(对齐 C# AppAndProfileItem)。
|
|
|
|
|
|
*/
|
|
|
|
|
|
@Serialization
|
|
|
|
|
|
public class AppAndProfileItem {
|
|
|
|
|
|
public var _id: String = ""
|
|
|
|
|
|
public var _name: String = ""
|
|
|
|
|
|
public var _image: ?String = None
|
|
|
|
|
|
public var _description: ?String = None
|
|
|
|
|
|
|
|
|
|
|
|
public init() {}
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
|
* 安全确认响应(对齐 C# ConfirmResponse)。
|
2026-08-16 23:44:20 +08:00
|
|
|
|
* _data 用 ?JsonValue 对齐 C# Dictionary<string,object>?(任意 JSON 对象)。
|
2026-08-16 22:46:48 +08:00
|
|
|
|
*/
|
|
|
|
|
|
@Serialization
|
|
|
|
|
|
public class ConfirmResponse {
|
|
|
|
|
|
public var _applicationId: String = ""
|
|
|
|
|
|
public var _profileId: String = ""
|
|
|
|
|
|
public var _scene: ?String = None
|
|
|
|
|
|
public var _data: ?JsonValue = None
|
|
|
|
|
|
|
|
|
|
|
|
public init() {}
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
|
* 登录信息响应(对齐 C# LoginInfoResponse)。
|
|
|
|
|
|
*/
|
|
|
|
|
|
@Serialization
|
|
|
|
|
|
public class LoginInfoResponse {
|
|
|
|
|
|
public var _scene: ?String = None
|
|
|
|
|
|
public var _data: ?JsonValue = None
|
|
|
|
|
|
public var _profileId: String = ""
|
|
|
|
|
|
public var _name: String = ""
|
|
|
|
|
|
public var _image: ?String = None
|
|
|
|
|
|
public var _description: ?String = None
|
|
|
|
|
|
|
|
|
|
|
|
public init() {}
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
|
* 获取授权码响应(对齐 C# GetCodeResponse)。
|
|
|
|
|
|
*/
|
|
|
|
|
|
@Serialization
|
|
|
|
|
|
public class GetCodeResponse {
|
|
|
|
|
|
public var _code: String = ""
|
|
|
|
|
|
public var _server: String = ""
|
|
|
|
|
|
public var _fullUrl: String = ""
|
|
|
|
|
|
|
|
|
|
|
|
public init() {}
|
|
|
|
|
|
|
|
|
|
|
|
public init(code: String, server: String, fullUrl: String) {
|
|
|
|
|
|
this._code = code
|
|
|
|
|
|
this._server = server
|
|
|
|
|
|
this._fullUrl = fullUrl
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
|
* 群组关联项(对齐 C# GroupRelatedItem)。
|
|
|
|
|
|
*/
|
|
|
|
|
|
@Serialization
|
|
|
|
|
|
public class GroupRelatedItem {
|
|
|
|
|
|
public var _id: String = ""
|
|
|
|
|
|
public var _name: String = ""
|
|
|
|
|
|
public var _image: ?String = None
|
|
|
|
|
|
public var _description: ?String = None
|
|
|
|
|
|
public var _isOwner: Bool = false
|
|
|
|
|
|
public var _isAdmin: Bool = false
|
|
|
|
|
|
public var _isMember: Bool = false
|
|
|
|
|
|
|
|
|
|
|
|
public init() {}
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
|
* 群组详情树节点(对齐 C# GroupDetailTreeNode,children 递归)。
|
|
|
|
|
|
*/
|
|
|
|
|
|
@Serialization
|
|
|
|
|
|
public class GroupDetailTreeNode {
|
|
|
|
|
|
public var _id: String = ""
|
|
|
|
|
|
public var _name: String = ""
|
|
|
|
|
|
public var _image: ?String = None
|
|
|
|
|
|
public var _description: ?String = None
|
|
|
|
|
|
public var _sort: Int64 = 0
|
|
|
|
|
|
public var _children: Array<GroupDetailTreeNode> = []
|
|
|
|
|
|
|
|
|
|
|
|
public init() {}
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
|
* 权限项(对齐 C# PermissionItem)。
|
|
|
|
|
|
*/
|
|
|
|
|
|
@Serialization
|
|
|
|
|
|
public class PermissionItem {
|
|
|
|
|
|
public var _identifier: String = ""
|
|
|
|
|
|
public var _name: String = ""
|
|
|
|
|
|
public var _group: String = ""
|
|
|
|
|
|
public var _description: String = ""
|
|
|
|
|
|
|
|
|
|
|
|
public init() {}
|
|
|
|
|
|
|
|
|
|
|
|
public init(identifier: String, name: String, group: String, description: String) {
|
|
|
|
|
|
this._identifier = identifier
|
|
|
|
|
|
this._name = name
|
|
|
|
|
|
this._group = group
|
|
|
|
|
|
this._description = description
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|