diff --git a/authentication/authentication_client.go b/authentication/authentication_client.go
index c1b3d1c..d47e04b 100644
--- a/authentication/authentication_client.go
+++ b/authentication/authentication_client.go
@@ -919,61 +919,203 @@ func (client *AuthenticationClient) SignUpByUsernamePassword(username string, pa
}
// ==== AUTO GENERATED AUTHENTICATION METHODS BEGIN ====
+/*
+ * @summary 注册
+ * @description
+ * 此端点目前支持以下几种基于的注册方式:
+ *
+ * 1. 基于密码(PASSWORD):用户名 + 密码,邮箱 + 密码。
+ * 2. 基于一次性临时验证码(PASSCODE):手机号 + 验证码,邮箱 + 验证码。你需要先调用发送短信或者发送邮件接口获取验证码。
+ *
+ * 社会化登录等使用外部身份源“注册”请直接使用**登录**接口,我们会在其第一次登录的时候为其创建一个新账号。
+ *
+ * @returns UserSingleRespDto
+ */
+
+func (client *AuthenticationClient) SignUp (reqDto *dto.SignUpDto) *dto.UserSingleRespDto {
+ b, err := client.SendHttpRequest("/api/v3/signup", fasthttp.MethodPost, reqDto)
+ var response dto.UserSingleRespDto
+ if err != nil {
+ fmt.Println(err)
+ return nil
+ }
+ err = json.Unmarshal(b, &response)
+ if err != nil {
+ fmt.Println(err)
+ return nil
+ }
+ return &response
+}
+/*
+ * @summary 生成绑定外部身份源的链接
+ * @description
+ * 此接口用于生成绑定外部身份源的链接,生成之后可以引导用户进行跳转。
+ *
+ * @returns GenerateBindExtIdpLinkRespDto
+ */
+func (client *AuthenticationClient) GenerateLinkExtIdpUrl (reqDto *dto.GenerateLinkExtidpUrlDto) *dto.GenerateBindExtIdpLinkRespDto {
+ b, err := client.SendHttpRequest("/api/v3/generate-link-extidp-url", fasthttp.MethodGet, reqDto)
+ var response dto.GenerateBindExtIdpLinkRespDto
+ if err != nil {
+ fmt.Println(err)
+ return nil
+ }
+ err = json.Unmarshal(b, &response)
+ if err != nil {
+ fmt.Println(err)
+ return nil
+ }
+ return &response
+}
+/*
+ * @summary 解绑外部身份源
+ * @description 解绑外部身份源,此接口需要传递用户绑定的外部身份源 ID,**注意不是身份源连接 ID**。
+ * @returns CommonResponseDto
+ */
+
+func (client *AuthenticationClient) UnlinkExtIdp (reqDto *dto.UnlinkExtIdpDto) *dto.CommonResponseDto {
+ b, err := client.SendHttpRequest("/api/v3/unlink-extidp", fasthttp.MethodPost, reqDto)
+ var response dto.CommonResponseDto
+ if err != nil {
+ fmt.Println(err)
+ return nil
+ }
+ err = json.Unmarshal(b, &response)
+ if err != nil {
+ fmt.Println(err)
+ return nil
+ }
+ return &response
+}
+/*
+ * @summary 获取绑定的外部身份源
+ * @description
+ * 如在**介绍**部分中所描述的,一个外部身份源对应多个外部身份源连接,用户通过某个外部身份源连接绑定了某个外部身份源账号之后,
+ * 用户会建立一条与此外部身份源之间的关联关系。此接口用于获取此用户绑定的所有外部身份源。
+ *
+ * 取决于外部身份源的具体实现,一个用户在外部身份源中,可能会有多个身份 ID,比如在微信体系中会有 `openid` 和 `unionid`,在非书中有
+ * `open_id`、`union_id` 和 `user_id`。在 Authing 中,我们把这样的一条 `open_id` 或者 `unionid_` 叫做一条 `Identity`, 所以用户在一个身份源会有多条 `Identity` 记录。
+ *
+ * 以微信为例,如果用户使用微信登录或者绑定了微信账号,他的 `Identity` 信息如下所示:
+ *
+ * ```json
+ * [
+ * {
+ * "identityId": "62f20932xxxxbcc10d966ee5",
+ * "extIdpId": "62f209327xxxxcc10d966ee5",
+ * "provider": "wechat",
+ * "type": "openid",
+ * "userIdInIdp": "oH_5k5SflrwjGvk7wqpoBKq_cc6M",
+ * "originConnIds": ["62f2093244fa5cb19ff21ed3"]
+ * },
+ * {
+ * "identityId": "62f726239xxxxe3285d21c93",
+ * "extIdpId": "62f209327xxxxcc10d966ee5",
+ * "provider": "wechat",
+ * "type": "unionid",
+ * "userIdInIdp": "o9Nka5ibU-lUGQaeAHqu0nOZyJg0",
+ * "originConnIds": ["62f2093244fa5cb19ff21ed3"]
+ * }
+ * ]
+ * ```
+ *
+ *
+ * 可以看到他们的 `extIdpId` 是一样的,这个是你在 Authing 中创建的**身份源 ID**;`provider` 都是 `wechat`;
+ * 通过 `type` 可以区分出哪个是 `openid`,哪个是 `unionid`,以及具体的值(`userIdInIdp`);他们都来自于同一个身份源连接(`originConnIds`)。
+ *
+ *
+ *
+ * @returns GetIdentitiesRespDto
+ */
+func (client *AuthenticationClient) GetIdentities () *dto.GetIdentitiesRespDto {
+ b, err := client.SendHttpRequest("/api/v3/get-identities", fasthttp.MethodGet, nil)
+ var response dto.GetIdentitiesRespDto
+ if err != nil {
+ fmt.Println(err)
+ return nil
+ }
+ err = json.Unmarshal(b, &response)
+ if err != nil {
+ fmt.Println(err)
+ return nil
+ }
+ return &response
+}
+/*
+ * @summary 获取应用开启的外部身份源列表
+ * @description 获取应用开启的外部身份源列表,前端可以基于此渲染外部身份源按钮。
+ * @returns GetExtIdpsRespDto
+ */
+func (client *AuthenticationClient) GetApplicationEnabledExtIdps () *dto.GetExtIdpsRespDto {
+ b, err := client.SendHttpRequest("/api/v3/get-application-enabled-extidps", fasthttp.MethodGet, nil)
+ var response dto.GetExtIdpsRespDto
+ if err != nil {
+ fmt.Println(err)
+ return nil
+ }
+ err = json.Unmarshal(b, &response)
+ if err != nil {
+ fmt.Println(err)
+ return nil
+ }
+ return &response
+}
/*
* @summary 使用用户凭证登录
- * @description
+ * @description
* 此端点为基于直接 API 调用形式的登录端点,适用于你需要自建登录页面的场景。**此端点暂时不支持 MFA、信息补全、首次密码重置等流程,如有需要,请使用 OIDC 标准协议认证端点。**
- *
- *
+ *
+ *
* 注意事项:取决于你在 Authing 创建应用时选择的**应用类型**和应用配置的**换取 token 身份验证方式**,在调用此接口时需要对客户端的身份进行不同形式的验证。
- *
+ *
*
* 点击展开详情
- *
+ *
*
- *
+ *
* 你可以在 [Authing 控制台](https://console.authing.cn) 的**应用** - **自建应用** - **应用详情** - **应用配置** - **其他设置** - **授权配置**
* 中找到**换取 token 身份验证方式** 配置项:
- *
+ *
* > 单页 Web 应用和客户端应用隐藏,默认为 `none`,不允许修改;后端应用和标准 Web 应用可以修改此配置项。
- *
+ *
* ![](https://files.authing.co/api-explorer/tokenAuthMethod.jpg)
- *
+ *
* #### 换取 token 身份验证方式为 none 时
- *
+ *
* 调用此接口不需要进行额外操作。
- *
+ *
* #### 换取 token 身份验证方式为 client_secret_post 时
- *
+ *
* 调用此接口时必须在 body 中传递 `client_id` 和 `client_secret` 参数,作为验证客户端身份的条件。其中 `client_id` 为应用 ID、`client_secret` 为应用密钥。
- *
+ *
* #### 换取 token 身份验证方式为 client_secret_basic 时
- *
+ *
* 调用此接口时必须在 HTTP 请求头中携带 `authorization` 请求头,作为验证客户端身份的条件。`authorization` 请求头的格式如下(其中 `client_id` 为应用 ID、`client_secret` 为应用密钥。):
- *
+ *
* ```
* Basic base64(:)
* ```
- *
+ *
* 结果示例:
- *
+ *
* ```
* Basic NjA2M2ZiMmYzY3h4eHg2ZGY1NWYzOWViOjJmZTdjODdhODFmODY3eHh4eDAzMjRkZjEyZGFlZGM3
* ```
- *
+ *
* JS 代码示例:
- *
+ *
* ```js
* 'Basic ' + Buffer.from(client_id + ':' + client_secret).toString('base64');
* ```
- *
+ *
*
- *
- *
+ *
+ *
* @returns LoginTokenRespDto 成功认证
-*/
-func (client *AuthenticationClient) SignInByCredentials(reqDto *dto.SigninByCredentialsDto) *dto.LoginTokenRespDto {
- b, err := client.SendHttpRequest("/api/v3/signin", fasthttp.MethodPost, reqDto)
+ */
+
+func (client *AuthenticationClient) SignInByCredentials (reqDto *dto.SigninByCredentialsDto) *dto.LoginTokenRespDto {
+ b, err := client.SendHttpRequest("/api/v3/signin", fasthttp.MethodPost, reqDto)
var response dto.LoginTokenRespDto
if err != nil {
fmt.Println(err)
@@ -986,62 +1128,62 @@ func (client *AuthenticationClient) SignInByCredentials(reqDto *dto.SigninByCred
}
return &response
}
-
/*
* @summary 使用移动端社会化登录
- * @description
+ * @description
* 此端点为移动端社会化登录接口,使用第三方移动社会化登录返回的临时凭证登录,并换取用户的 `id_token` 和 `access_token`。请先阅读相应社会化登录的接入流程。
- *
- *
+ *
+ *
* 注意事项:取决于你在 Authing 创建应用时选择的**应用类型**和应用配置的**换取 token 身份验证方式**,在调用此接口时需要对客户端的身份进行不同形式的验证。
- *
+ *
*
* 点击展开详情
- *
+ *
*
- *
+ *
* 你可以在 [Authing 控制台](https://console.authing.cn) 的**应用** - **自建应用** - **应用详情** - **应用配置** - **其他设置** - **授权配置**
* 中找到**换取 token 身份验证方式** 配置项:
- *
+ *
* > 单页 Web 应用和客户端应用隐藏,默认为 `none`,不允许修改;后端应用和标准 Web 应用可以修改此配置项。
- *
+ *
* ![](https://files.authing.co/api-explorer/tokenAuthMethod.jpg)
- *
+ *
* #### 换取 token 身份验证方式为 none 时
- *
+ *
* 调用此接口不需要进行额外操作。
- *
+ *
* #### 换取 token 身份验证方式为 client_secret_post 时
- *
+ *
* 调用此接口时必须在 body 中传递 `client_id` 和 `client_secret` 参数,作为验证客户端身份的条件。其中 `client_id` 为应用 ID、`client_secret` 为应用密钥。
- *
+ *
* #### 换取 token 身份验证方式为 client_secret_basic 时
- *
+ *
* 调用此接口时必须在 HTTP 请求头中携带 `authorization` 请求头,作为验证客户端身份的条件。`authorization` 请求头的格式如下(其中 `client_id` 为应用 ID、`client_secret` 为应用密钥。):
- *
+ *
* ```
* Basic base64(:)
* ```
- *
+ *
* 结果示例:
- *
+ *
* ```
* Basic NjA2M2ZiMmYzY3h4eHg2ZGY1NWYzOWViOjJmZTdjODdhODFmODY3eHh4eDAzMjRkZjEyZGFlZGM3
* ```
- *
+ *
* JS 代码示例:
- *
+ *
* ```js
* 'Basic ' + Buffer.from(client_id + ':' + client_secret).toString('base64');
* ```
- *
+ *
*
- *
- *
- * @returns LoginTokenRespDto
-*/
-func (client *AuthenticationClient) SignInByMobile(reqDto *dto.SigninByMobileDto) *dto.LoginTokenRespDto {
- b, err := client.SendHttpRequest("/api/v3/signin-by-mobile", fasthttp.MethodPost, reqDto)
+ *
+ *
+ * @returns LoginTokenRespDto
+ */
+
+func (client *AuthenticationClient) SignInByMobile (reqDto *dto.SigninByMobileDto) *dto.LoginTokenRespDto {
+ b, err := client.SendHttpRequest("/api/v3/signin-by-mobile", fasthttp.MethodPost, reqDto)
var response dto.LoginTokenRespDto
if err != nil {
fmt.Println(err)
@@ -1054,14 +1196,33 @@ func (client *AuthenticationClient) SignInByMobile(reqDto *dto.SigninByMobileDto
}
return &response
}
+/*
+ * @summary 公共账号切换登录
+ * @description 允许个人账号与关联的公共账号间做切换登录,此端点要求账号已登录
+ * @returns LoginTokenRespDto
+ */
+func (client *AuthenticationClient) SwitchLoginByUser (reqDto *dto.PublicAccountSwitchLoginDto) *dto.LoginTokenRespDto {
+ b, err := client.SendHttpRequest("/api/v3/switch-login-by-user", fasthttp.MethodPost, reqDto)
+ var response dto.LoginTokenRespDto
+ if err != nil {
+ fmt.Println(err)
+ return nil
+ }
+ err = json.Unmarshal(b, &response)
+ if err != nil {
+ fmt.Println(err)
+ return nil
+ }
+ return &response
+}
/*
-* @summary 获取支付宝 AuthInfo
-* @description 此接口用于获取发起支付宝认证需要的[初始化参数 AuthInfo](https://opendocs.alipay.com/open/218/105325)。
-* @returns GetAlipayAuthInfoRespDto
- */
-func (client *AuthenticationClient) GetAlipayAuthInfo(reqDto *dto.GetAlipayAuthinfoDto) *dto.GetAlipayAuthInfoRespDto {
- b, err := client.SendHttpRequest("/api/v3/get-alipay-authinfo", fasthttp.MethodGet, reqDto)
+ * @summary 获取支付宝 AuthInfo
+ * @description 此接口用于获取发起支付宝认证需要的[初始化参数 AuthInfo](https://opendocs.alipay.com/open/218/105325)。
+ * @returns GetAlipayAuthInfoRespDto
+ */
+func (client *AuthenticationClient) GetAlipayAuthInfo (reqDto *dto.GetAlipayAuthinfoDto) *dto.GetAlipayAuthInfoRespDto {
+ b, err := client.SendHttpRequest("/api/v3/get-alipay-authinfo", fasthttp.MethodGet, reqDto)
var response dto.GetAlipayAuthInfoRespDto
if err != nil {
fmt.Println(err)
@@ -1074,14 +1235,14 @@ func (client *AuthenticationClient) GetAlipayAuthInfo(reqDto *dto.GetAlipayAuthi
}
return &response
}
-
/*
-* @summary 生成用于登录的二维码
-* @description 生成用于登录的二维码,目前支持生成微信公众号扫码登录、小程序扫码登录、自建移动 APP 扫码登录的二维码。
-* @returns GeneQRCodeRespDto
- */
-func (client *AuthenticationClient) GeneQrCode(reqDto *dto.GenerateQrcodeDto) *dto.GeneQRCodeRespDto {
- b, err := client.SendHttpRequest("/api/v3/gene-qrcode", fasthttp.MethodPost, reqDto)
+ * @summary 生成用于登录的二维码
+ * @description 生成用于登录的二维码,目前支持生成微信公众号扫码登录、小程序扫码登录、自建移动 APP 扫码登录的二维码。
+ * @returns GeneQRCodeRespDto
+ */
+
+func (client *AuthenticationClient) GeneQrCode (reqDto *dto.GenerateQrcodeDto) *dto.GeneQRCodeRespDto {
+ b, err := client.SendHttpRequest("/api/v3/gene-qrcode", fasthttp.MethodPost, reqDto)
var response dto.GeneQRCodeRespDto
if err != nil {
fmt.Println(err)
@@ -1094,14 +1255,13 @@ func (client *AuthenticationClient) GeneQrCode(reqDto *dto.GenerateQrcodeDto) *d
}
return &response
}
-
/*
-* @summary 查询二维码状态
-* @description 按照用户扫码顺序,共分为未扫码、已扫码等待用户确认、用户同意/取消授权、二维码过期以及未知错误六种状态,前端应该通过不同的状态给到用户不同的反馈。你可以通过下面这篇文章了解扫码登录详细的流程:https://docs.authing.cn/v2/concepts/how-qrcode-works.html.
-* @returns CheckQRCodeStatusRespDto
- */
-func (client *AuthenticationClient) CheckQrCodeStatus(reqDto *dto.CheckQrcodeStatusDto) *dto.CheckQRCodeStatusRespDto {
- b, err := client.SendHttpRequest("/api/v3/check-qrcode-status", fasthttp.MethodGet, reqDto)
+ * @summary 查询二维码状态
+ * @description 按照用户扫码顺序,共分为未扫码、已扫码等待用户确认、用户同意/取消授权、二维码过期以及未知错误六种状态,前端应该通过不同的状态给到用户不同的反馈。你可以通过下面这篇文章了解扫码登录详细的流程:https://docs.authing.cn/v2/concepts/how-qrcode-works.html.
+ * @returns CheckQRCodeStatusRespDto
+ */
+func (client *AuthenticationClient) CheckQrCodeStatus (reqDto *dto.CheckQrcodeStatusDto) *dto.CheckQRCodeStatusRespDto {
+ b, err := client.SendHttpRequest("/api/v3/check-qrcode-status", fasthttp.MethodGet, reqDto)
var response dto.CheckQRCodeStatusRespDto
if err != nil {
fmt.Println(err)
@@ -1114,62 +1274,62 @@ func (client *AuthenticationClient) CheckQrCodeStatus(reqDto *dto.CheckQrcodeSta
}
return &response
}
-
/*
* @summary 使用二维码 ticket 换取 TokenSet
- * @description
+ * @description
* 此端点为使用二维码的 ticket 换取用户的 `access_token` 和 `id_token`。
- *
- *
+ *
+ *
* 注意事项:取决于你在 Authing 创建应用时选择的**应用类型**和应用配置的**换取 token 身份验证方式**,在调用此接口时需要对客户端的身份进行不同形式的验证。
- *
+ *
*
* 点击展开详情
- *
+ *
*
- *
+ *
* 你可以在 [Authing 控制台](https://console.authing.cn) 的**应用** - **自建应用** - **应用详情** - **应用配置** - **其他设置** - **授权配置**
* 中找到**换取 token 身份验证方式** 配置项:
- *
+ *
* > 单页 Web 应用和客户端应用隐藏,默认为 `none`,不允许修改;后端应用和标准 Web 应用可以修改此配置项。
- *
+ *
* ![](https://files.authing.co/api-explorer/tokenAuthMethod.jpg)
- *
+ *
* #### 换取 token 身份验证方式为 none 时
- *
+ *
* 调用此接口不需要进行额外操作。
- *
+ *
* #### 换取 token 身份验证方式为 client_secret_post 时
- *
+ *
* 调用此接口时必须在 body 中传递 `client_id` 和 `client_secret` 参数,作为验证客户端身份的条件。其中 `client_id` 为应用 ID、`client_secret` 为应用密钥。
- *
+ *
* #### 换取 token 身份验证方式为 client_secret_basic 时
- *
+ *
* 调用此接口时必须在 HTTP 请求头中携带 `authorization` 请求头,作为验证客户端身份的条件。`authorization` 请求头的格式如下(其中 `client_id` 为应用 ID、`client_secret` 为应用密钥。):
- *
+ *
* ```
* Basic base64(:)
* ```
- *
+ *
* 结果示例:
- *
+ *
* ```
* Basic NjA2M2ZiMmYzY3h4eHg2ZGY1NWYzOWViOjJmZTdjODdhODFmODY3eHh4eDAzMjRkZjEyZGFlZGM3
* ```
- *
+ *
* JS 代码示例:
- *
+ *
* ```js
* 'Basic ' + Buffer.from(client_id + ':' + client_secret).toString('base64');
* ```
- *
+ *
*
- *
- *
- * @returns LoginTokenRespDto
-*/
-func (client *AuthenticationClient) ExchangeTokenSetWithQrCodeTicket(reqDto *dto.ExchangeTokenSetWithQRcodeTicketDto) *dto.LoginTokenRespDto {
- b, err := client.SendHttpRequest("/api/v3/exchange-tokenset-with-qrcode-ticket", fasthttp.MethodPost, reqDto)
+ *
+ *
+ * @returns LoginTokenRespDto
+ */
+
+func (client *AuthenticationClient) ExchangeTokenSetWithQrCodeTicket (reqDto *dto.ExchangeTokenSetWithQRcodeTicketDto) *dto.LoginTokenRespDto {
+ b, err := client.SendHttpRequest("/api/v3/exchange-tokenset-with-qrcode-ticket", fasthttp.MethodPost, reqDto)
var response dto.LoginTokenRespDto
if err != nil {
fmt.Println(err)
@@ -1182,14 +1342,525 @@ func (client *AuthenticationClient) ExchangeTokenSetWithQrCodeTicket(reqDto *dto
}
return &response
}
-
/*
-* @summary 自建 APP 扫码登录:APP 端修改二维码状态
-* @description 此端点用于在自建 APP 扫码登录中修改二维码状态,对应着在浏览器渲染出二维码之后,终端用户扫码、确认授权、取消授权的过程。**此接口要求具备用户的登录态**。
-* @returns CommonResponseDto
- */
-func (client *AuthenticationClient) ChangeQrCodeStatus(reqDto *dto.ChangeQRCodeStatusDto) *dto.CommonResponseDto {
- b, err := client.SendHttpRequest("/api/v3/change-qrcode-status", fasthttp.MethodPost, reqDto)
+ * @summary 自建 APP 扫码登录:APP 端修改二维码状态
+ * @description 此端点用于在自建 APP 扫码登录中修改二维码状态,对应着在浏览器渲染出二维码之后,终端用户扫码、确认授权、取消授权的过程。**此接口要求具备用户的登录态**。
+ * @returns CommonResponseDto
+ */
+
+func (client *AuthenticationClient) ChangeQrCodeStatus (reqDto *dto.ChangeQRCodeStatusDto) *dto.CommonResponseDto {
+ b, err := client.SendHttpRequest("/api/v3/change-qrcode-status", fasthttp.MethodPost, reqDto)
+ var response dto.CommonResponseDto
+ if err != nil {
+ fmt.Println(err)
+ return nil
+ }
+ err = json.Unmarshal(b, &response)
+ if err != nil {
+ fmt.Println(err)
+ return nil
+ }
+ return &response
+}
+/*
+ * @summary 推送登录
+ * @description 推送登录。
+ * @returns GenePushCodeRespDto
+ */
+
+func (client *AuthenticationClient) SignInByPush (reqDto *dto.SignInByPushDto) *dto.GenePushCodeRespDto {
+ b, err := client.SendHttpRequest("/api/v3/signin-by-push", fasthttp.MethodPost, reqDto)
+ var response dto.GenePushCodeRespDto
+ if err != nil {
+ fmt.Println(err)
+ return nil
+ }
+ err = json.Unmarshal(b, &response)
+ if err != nil {
+ fmt.Println(err)
+ return nil
+ }
+ return &response
+}
+/*
+ * @summary 查询推送码状态
+ * @description 按照推送码使用顺序,共分为已推送、等待用户 同意/取消 授权、推送码过期以及未知错误五种状态,前端应该通过不同的状态给到用户不同的反馈。
+ * @returns CheckPushCodeStatusRespDto
+ */
+func (client *AuthenticationClient) CheckPushCodeStatus (reqDto *dto.CheckPushcodeStatusDto) *dto.CheckPushCodeStatusRespDto {
+ b, err := client.SendHttpRequest("/api/v3/check-pushcode-status", fasthttp.MethodGet, reqDto)
+ var response dto.CheckPushCodeStatusRespDto
+ if err != nil {
+ fmt.Println(err)
+ return nil
+ }
+ err = json.Unmarshal(b, &response)
+ if err != nil {
+ fmt.Println(err)
+ return nil
+ }
+ return &response
+}
+/*
+ * @summary 推送登录:APP 端修改推送码状态
+ * @description 此端点用于在 Authing 令牌 APP 推送登录中修改推送码状态,对应着在浏览器使用推送登录,点击登录之后,终端用户收到推送登录信息,确认授权、取消授权的过程。**此接口要求具备用户的登录态**。
+ * @returns CommonResponseDto
+ */
+
+func (client *AuthenticationClient) ChangePushCodeStatus (reqDto *dto.ChangePushCodeStatusDto) *dto.CommonResponseDto {
+ b, err := client.SendHttpRequest("/api/v3/change-pushcode-status", fasthttp.MethodPost, reqDto)
+ var response dto.CommonResponseDto
+ if err != nil {
+ fmt.Println(err)
+ return nil
+ }
+ err = json.Unmarshal(b, &response)
+ if err != nil {
+ fmt.Println(err)
+ return nil
+ }
+ return &response
+}
+/*
+ * @summary 发送短信
+ * @description 发送短信时必须指定短信 Channel,每个手机号同一 Channel 在一分钟内只能发送一次。
+ * @returns SendSMSRespDto
+ */
+
+func (client *AuthenticationClient) SendSms (reqDto *dto.SendSMSDto) *dto.SendSMSRespDto {
+ b, err := client.SendHttpRequest("/api/v3/send-sms", fasthttp.MethodPost, reqDto)
+ var response dto.SendSMSRespDto
+ if err != nil {
+ fmt.Println(err)
+ return nil
+ }
+ err = json.Unmarshal(b, &response)
+ if err != nil {
+ fmt.Println(err)
+ return nil
+ }
+ return &response
+}
+/*
+ * @summary 发送邮件
+ * @description 发送邮件时必须指定邮件 Channel,每个邮箱同一 Channel 在一分钟内只能发送一次。
+ * @returns SendEmailRespDto
+ */
+
+func (client *AuthenticationClient) SendEmail (reqDto *dto.SendEmailDto) *dto.SendEmailRespDto {
+ b, err := client.SendHttpRequest("/api/v3/send-email", fasthttp.MethodPost, reqDto)
+ var response dto.SendEmailRespDto
+ if err != nil {
+ fmt.Println(err)
+ return nil
+ }
+ err = json.Unmarshal(b, &response)
+ if err != nil {
+ fmt.Println(err)
+ return nil
+ }
+ return &response
+}
+/*
+ * @summary 解密微信小程序数据
+ * @description 解密微信小程序数据
+ * @returns DecryptWechatMiniProgramDataRespDto
+ */
+
+func (client *AuthenticationClient) DecryptWechatMiniProgramData (reqDto *dto.DecryptWechatMiniProgramDataDto) *dto.DecryptWechatMiniProgramDataRespDto {
+ b, err := client.SendHttpRequest("/api/v3/decrypt-wechat-miniprogram-data", fasthttp.MethodPost, reqDto)
+ var response dto.DecryptWechatMiniProgramDataRespDto
+ if err != nil {
+ fmt.Println(err)
+ return nil
+ }
+ err = json.Unmarshal(b, &response)
+ if err != nil {
+ fmt.Println(err)
+ return nil
+ }
+ return &response
+}
+/*
+ * @deprecated
+ * @summary 获取微信小程序、公众号 Access Token
+ * @description 获取 Authing 服务器缓存的微信小程序、公众号 Access Token(废弃,请使用 /api/v3/get-wechat-access-token-info)
+ * @returns GetWechatAccessTokenRespDto
+ */
+
+func (client *AuthenticationClient) GetWechatMpAccessToken (reqDto *dto.GetWechatAccessTokenDto) *dto.GetWechatAccessTokenRespDto {
+ b, err := client.SendHttpRequest("/api/v3/get-wechat-access-token", fasthttp.MethodPost, reqDto)
+ var response dto.GetWechatAccessTokenRespDto
+ if err != nil {
+ fmt.Println(err)
+ return nil
+ }
+ err = json.Unmarshal(b, &response)
+ if err != nil {
+ fmt.Println(err)
+ return nil
+ }
+ return &response
+}
+/*
+ * @summary 获取微信小程序、公众号 Access Token
+ * @description 获取 Authing 服务器缓存的微信小程序、公众号 Access Token
+ * @returns GetWechatAccessTokenInfoRespDto
+ */
+
+func (client *AuthenticationClient) GetWechatMpAccessTokenInfo (reqDto *dto.GetWechatAccessTokenDto) *dto.GetWechatAccessTokenInfoRespDto {
+ b, err := client.SendHttpRequest("/api/v3/get-wechat-access-token-info", fasthttp.MethodPost, reqDto)
+ var response dto.GetWechatAccessTokenInfoRespDto
+ if err != nil {
+ fmt.Println(err)
+ return nil
+ }
+ err = json.Unmarshal(b, &response)
+ if err != nil {
+ fmt.Println(err)
+ return nil
+ }
+ return &response
+}
+/*
+ * @summary 获取登录日志
+ * @description 获取登录日志
+ * @returns GetLoginHistoryRespDto
+ */
+func (client *AuthenticationClient) GetLoginHistory (reqDto *dto.GetMyLoginHistoryDto) *dto.GetLoginHistoryRespDto {
+ b, err := client.SendHttpRequest("/api/v3/get-my-login-history", fasthttp.MethodGet, reqDto)
+ var response dto.GetLoginHistoryRespDto
+ if err != nil {
+ fmt.Println(err)
+ return nil
+ }
+ err = json.Unmarshal(b, &response)
+ if err != nil {
+ fmt.Println(err)
+ return nil
+ }
+ return &response
+}
+/*
+ * @summary 获取登录应用
+ * @description 获取登录应用
+ * @returns GetLoggedInAppsRespDto
+ */
+func (client *AuthenticationClient) GetLoggedInApps () *dto.GetLoggedInAppsRespDto {
+ b, err := client.SendHttpRequest("/api/v3/get-my-logged-in-apps", fasthttp.MethodGet, nil)
+ var response dto.GetLoggedInAppsRespDto
+ if err != nil {
+ fmt.Println(err)
+ return nil
+ }
+ err = json.Unmarshal(b, &response)
+ if err != nil {
+ fmt.Println(err)
+ return nil
+ }
+ return &response
+}
+/*
+ * @summary 获取具备访问权限的应用
+ * @description 获取具备访问权限的应用
+ * @returns GetAccessibleAppsRespDto
+ */
+func (client *AuthenticationClient) GetAccessibleApps () *dto.GetAccessibleAppsRespDto {
+ b, err := client.SendHttpRequest("/api/v3/get-my-accessible-apps", fasthttp.MethodGet, nil)
+ var response dto.GetAccessibleAppsRespDto
+ if err != nil {
+ fmt.Println(err)
+ return nil
+ }
+ err = json.Unmarshal(b, &response)
+ if err != nil {
+ fmt.Println(err)
+ return nil
+ }
+ return &response
+}
+/*
+ * @summary 获取租户列表
+ * @description 获取租户列表
+ * @returns GetTenantListRespDto
+ */
+func (client *AuthenticationClient) GetTenantList () *dto.GetTenantListRespDto {
+ b, err := client.SendHttpRequest("/api/v3/get-my-tenant-list", fasthttp.MethodGet, nil)
+ var response dto.GetTenantListRespDto
+ if err != nil {
+ fmt.Println(err)
+ return nil
+ }
+ err = json.Unmarshal(b, &response)
+ if err != nil {
+ fmt.Println(err)
+ return nil
+ }
+ return &response
+}
+/*
+ * @summary 获取角色列表
+ * @description 获取角色列表
+ * @returns RoleListRespDto
+ */
+func (client *AuthenticationClient) GetRoleList (reqDto *dto.GetMyRoleListDto) *dto.RoleListRespDto {
+ b, err := client.SendHttpRequest("/api/v3/get-my-role-list", fasthttp.MethodGet, reqDto)
+ var response dto.RoleListRespDto
+ if err != nil {
+ fmt.Println(err)
+ return nil
+ }
+ err = json.Unmarshal(b, &response)
+ if err != nil {
+ fmt.Println(err)
+ return nil
+ }
+ return &response
+}
+/*
+ * @summary 获取分组列表
+ * @description 获取分组列表
+ * @returns GroupListRespDto
+ */
+func (client *AuthenticationClient) GetGroupList () *dto.GroupListRespDto {
+ b, err := client.SendHttpRequest("/api/v3/get-my-group-list", fasthttp.MethodGet, nil)
+ var response dto.GroupListRespDto
+ if err != nil {
+ fmt.Println(err)
+ return nil
+ }
+ err = json.Unmarshal(b, &response)
+ if err != nil {
+ fmt.Println(err)
+ return nil
+ }
+ return &response
+}
+/*
+ * @summary 获取部门列表
+ * @description 此接口用于获取用户的部门列表,可根据一定排序规则进行排序。
+ * @returns UserDepartmentPaginatedRespDto
+ */
+func (client *AuthenticationClient) GetDepartmentList (reqDto *dto.GetMyDepartmentListDto) *dto.UserDepartmentPaginatedRespDto {
+ b, err := client.SendHttpRequest("/api/v3/get-my-department-list", fasthttp.MethodGet, reqDto)
+ var response dto.UserDepartmentPaginatedRespDto
+ if err != nil {
+ fmt.Println(err)
+ return nil
+ }
+ err = json.Unmarshal(b, &response)
+ if err != nil {
+ fmt.Println(err)
+ return nil
+ }
+ return &response
+}
+/*
+ * @summary 获取被授权的资源列表
+ * @description 此接口用于获取用户被授权的资源列表。
+ * @returns AuthorizedResourcePaginatedRespDto
+ */
+func (client *AuthenticationClient) GetAuthorizedResources (reqDto *dto.GetMyAuthorizedResourcesDto) *dto.AuthorizedResourcePaginatedRespDto {
+ b, err := client.SendHttpRequest("/api/v3/get-my-authorized-resources", fasthttp.MethodGet, reqDto)
+ var response dto.AuthorizedResourcePaginatedRespDto
+ if err != nil {
+ fmt.Println(err)
+ return nil
+ }
+ err = json.Unmarshal(b, &response)
+ if err != nil {
+ fmt.Println(err)
+ return nil
+ }
+ return &response
+}
+/*
+ * @summary 获取用户资料
+ * @description 此端点用户获取用户资料,需要在请求头中带上用户的 `access_token`,Authing 服务器会根据用户 `access_token` 中的 `scope` 返回对应的字段。
+ * @returns UserSingleRespDto
+ */
+func (client *AuthenticationClient) GetProfile (reqDto *dto.GetProfileDto) *dto.UserSingleRespDto {
+ b, err := client.SendHttpRequest("/api/v3/get-profile", fasthttp.MethodGet, reqDto)
+ var response dto.UserSingleRespDto
+ if err != nil {
+ fmt.Println(err)
+ return nil
+ }
+ err = json.Unmarshal(b, &response)
+ if err != nil {
+ fmt.Println(err)
+ return nil
+ }
+ return &response
+}
+/*
+ * @summary 修改用户资料
+ * @description 此接口用于修改用户的用户资料,包含用户的自定义数据。如果需要**修改邮箱**、**修改手机号**、**修改密码**,请使用对应的单独接口。
+ * @returns UserSingleRespDto
+ */
+
+func (client *AuthenticationClient) UpdateProfile (reqDto *dto.UpdateUserProfileDto) *dto.UserSingleRespDto {
+ b, err := client.SendHttpRequest("/api/v3/update-profile", fasthttp.MethodPost, reqDto)
+ var response dto.UserSingleRespDto
+ if err != nil {
+ fmt.Println(err)
+ return nil
+ }
+ err = json.Unmarshal(b, &response)
+ if err != nil {
+ fmt.Println(err)
+ return nil
+ }
+ return &response
+}
+/*
+ * @summary 绑定邮箱
+ * @description 如果用户还**没有绑定邮箱**,此接口可用于用户**自主**绑定邮箱。如果用户已经绑定邮箱想要修改邮箱,请使用**修改邮箱**接口。你需要先调用**发送邮件**接口发送邮箱验证码。
+ * @returns CommonResponseDto
+ */
+
+func (client *AuthenticationClient) BindEmail (reqDto *dto.BindEmailDto) *dto.CommonResponseDto {
+ b, err := client.SendHttpRequest("/api/v3/bind-email", fasthttp.MethodPost, reqDto)
+ var response dto.CommonResponseDto
+ if err != nil {
+ fmt.Println(err)
+ return nil
+ }
+ err = json.Unmarshal(b, &response)
+ if err != nil {
+ fmt.Println(err)
+ return nil
+ }
+ return &response
+}
+/*
+ * @summary 解绑邮箱
+ * @description 用户解绑邮箱,如果用户没有绑定其他登录方式(手机号、社会化登录账号),将无法解绑邮箱,会提示错误。
+ * @returns CommonResponseDto
+ */
+
+func (client *AuthenticationClient) UnbindEmail (reqDto *dto.UnbindEmailDto) *dto.CommonResponseDto {
+ b, err := client.SendHttpRequest("/api/v3/unbind-email", fasthttp.MethodPost, reqDto)
+ var response dto.CommonResponseDto
+ if err != nil {
+ fmt.Println(err)
+ return nil
+ }
+ err = json.Unmarshal(b, &response)
+ if err != nil {
+ fmt.Println(err)
+ return nil
+ }
+ return &response
+}
+/*
+ * @summary 绑定手机号
+ * @description 如果用户还**没有绑定手机号**,此接口可用于用户**自主**绑定手机号。如果用户已经绑定手机号想要修改手机号,请使用**修改手机号**接口。你需要先调用**发送短信**接口发送短信验证码。
+ * @returns CommonResponseDto
+ */
+
+func (client *AuthenticationClient) BindPhone (reqDto *dto.BindPhoneDto) *dto.CommonResponseDto {
+ b, err := client.SendHttpRequest("/api/v3/bind-phone", fasthttp.MethodPost, reqDto)
+ var response dto.CommonResponseDto
+ if err != nil {
+ fmt.Println(err)
+ return nil
+ }
+ err = json.Unmarshal(b, &response)
+ if err != nil {
+ fmt.Println(err)
+ return nil
+ }
+ return &response
+}
+/*
+ * @summary 解绑手机号
+ * @description 用户解绑手机号,如果用户没有绑定其他登录方式(邮箱、社会化登录账号),将无法解绑手机号,会提示错误。
+ * @returns CommonResponseDto
+ */
+
+func (client *AuthenticationClient) UnbindPhone (reqDto *dto.UnbindPhoneDto) *dto.CommonResponseDto {
+ b, err := client.SendHttpRequest("/api/v3/unbind-phone", fasthttp.MethodPost, reqDto)
+ var response dto.CommonResponseDto
+ if err != nil {
+ fmt.Println(err)
+ return nil
+ }
+ err = json.Unmarshal(b, &response)
+ if err != nil {
+ fmt.Println(err)
+ return nil
+ }
+ return &response
+}
+/*
+ * @summary 获取密码强度和账号安全等级评分
+ * @description 获取用户的密码强度和账号安全等级评分,需要在请求头中带上用户的 `access_token`。
+ * @returns GetSecurityInfoRespDto
+ */
+func (client *AuthenticationClient) GetSecurityLevel () *dto.GetSecurityInfoRespDto {
+ b, err := client.SendHttpRequest("/api/v3/get-security-info", fasthttp.MethodGet, nil)
+ var response dto.GetSecurityInfoRespDto
+ if err != nil {
+ fmt.Println(err)
+ return nil
+ }
+ err = json.Unmarshal(b, &response)
+ if err != nil {
+ fmt.Println(err)
+ return nil
+ }
+ return &response
+}
+/*
+ * @summary 修改密码
+ * @description 此端点用于用户自主修改密码,如果用户之前已经设置密码,需要提供用户的原始密码作为凭证。如果用户忘记了当前密码,请使用**忘记密码**接口。
+ * @returns CommonResponseDto
+ */
+
+func (client *AuthenticationClient) UpdatePassword (reqDto *dto.UpdatePasswordDto) *dto.CommonResponseDto {
+ b, err := client.SendHttpRequest("/api/v3/update-password", fasthttp.MethodPost, reqDto)
+ var response dto.CommonResponseDto
+ if err != nil {
+ fmt.Println(err)
+ return nil
+ }
+ err = json.Unmarshal(b, &response)
+ if err != nil {
+ fmt.Println(err)
+ return nil
+ }
+ return &response
+}
+/*
+ * @summary 发起修改邮箱的验证请求
+ * @description 终端用户自主修改邮箱时,需要提供相应的验证手段。此接口用于验证用户的修改邮箱请求是否合法。当前支持通过**邮箱验证码**的方式进行验证,你需要先调用发送邮件接口发送对应的邮件验证码。
+ * @returns VerifyUpdateEmailRequestRespDto
+ */
+
+func (client *AuthenticationClient) VerifyUpdateEmailRequest (reqDto *dto.VerifyUpdateEmailRequestDto) *dto.VerifyUpdateEmailRequestRespDto {
+ b, err := client.SendHttpRequest("/api/v3/verify-update-email-request", fasthttp.MethodPost, reqDto)
+ var response dto.VerifyUpdateEmailRequestRespDto
+ if err != nil {
+ fmt.Println(err)
+ return nil
+ }
+ err = json.Unmarshal(b, &response)
+ if err != nil {
+ fmt.Println(err)
+ return nil
+ }
+ return &response
+}
+/*
+ * @summary 修改邮箱
+ * @description 终端用户自主修改邮箱,需要提供相应的验证手段,见[发起修改邮箱的验证请求](#tag/用户资料/API%20列表/operation/ProfileV3Controller_verifyUpdateEmailRequest)。
+ * 此参数需要提供一次性临时凭证 `updateEmailToken`,此数据需要从**发起修改邮箱的验证请求**接口获取。
+ * @returns CommonResponseDto
+ */
+
+func (client *AuthenticationClient) UpdateEmail (reqDto *dto.UpdateEmailDto) *dto.CommonResponseDto {
+ b, err := client.SendHttpRequest("/api/v3/update-email", fasthttp.MethodPost, reqDto)
var response dto.CommonResponseDto
if err != nil {
fmt.Println(err)
@@ -1202,15 +1873,15 @@ func (client *AuthenticationClient) ChangeQrCodeStatus(reqDto *dto.ChangeQRCodeS
}
return &response
}
-
/*
-* @summary 发送短信
-* @description 发送短信时必须指定短信 Channel,每个手机号同一 Channel 在一分钟内只能发送一次。
-* @returns SendSMSRespDto
- */
-func (client *AuthenticationClient) SendSms(reqDto *dto.SendSMSDto) *dto.SendSMSRespDto {
- b, err := client.SendHttpRequest("/api/v3/send-sms", fasthttp.MethodPost, reqDto)
- var response dto.SendSMSRespDto
+ * @summary 发起修改手机号的验证请求
+ * @description 终端用户自主修改手机号时,需要提供相应的验证手段。此接口用于验证用户的修改手机号请求是否合法。当前支持通过**短信验证码**的方式进行验证,你需要先调用发送短信接口发送对应的短信验证码。
+ * @returns VerifyUpdatePhoneRequestRespDto
+ */
+
+func (client *AuthenticationClient) VerifyUpdatePhoneRequest (reqDto *dto.VerifyUpdatePhoneRequestDto) *dto.VerifyUpdatePhoneRequestRespDto {
+ b, err := client.SendHttpRequest("/api/v3/verify-update-phone-request", fasthttp.MethodPost, reqDto)
+ var response dto.VerifyUpdatePhoneRequestRespDto
if err != nil {
fmt.Println(err)
return nil
@@ -1222,15 +1893,16 @@ func (client *AuthenticationClient) SendSms(reqDto *dto.SendSMSDto) *dto.SendSMS
}
return &response
}
-
/*
-* @summary 发送邮件
-* @description 发送邮件时必须指定邮件 Channel,每个邮箱同一 Channel 在一分钟内只能发送一次。
-* @returns SendEmailRespDto
- */
-func (client *AuthenticationClient) SendEmail(reqDto *dto.SendEmailDto) *dto.SendEmailRespDto {
- b, err := client.SendHttpRequest("/api/v3/send-email", fasthttp.MethodPost, reqDto)
- var response dto.SendEmailRespDto
+ * @summary 修改手机号
+ * @description 终端用户自主修改手机号,需要提供相应的验证手段,见[发起修改手机号的验证请求](#tag/用户资料/API%20列表/operation/ProfileV3Controller_updatePhoneVerification)。
+ * 此参数需要提供一次性临时凭证 `updatePhoneToken`,此数据需要从**发起修改手机号的验证请求**接口获取。
+ * @returns CommonResponseDto
+ */
+
+func (client *AuthenticationClient) UpdatePhone (reqDto *dto.UpdatePhoneDto) *dto.CommonResponseDto {
+ b, err := client.SendHttpRequest("/api/v3/update-phone", fasthttp.MethodPost, reqDto)
+ var response dto.CommonResponseDto
if err != nil {
fmt.Println(err)
return nil
@@ -1242,15 +1914,15 @@ func (client *AuthenticationClient) SendEmail(reqDto *dto.SendEmailDto) *dto.Sen
}
return &response
}
-
/*
-* @summary 获取用户资料
-* @description 此端点用户获取用户资料,需要在请求头中带上用户的 `access_token`,Authing 服务器会根据用户 `access_token` 中的 `scope` 返回对应的字段。
-* @returns UserSingleRespDto
- */
-func (client *AuthenticationClient) GetProfile(reqDto *dto.GetProfileDto) *dto.UserSingleRespDto {
- b, err := client.SendHttpRequest("/api/v3/get-profile", fasthttp.MethodGet, reqDto)
- var response dto.UserSingleRespDto
+ * @summary 发起忘记密码请求
+ * @description 当用户忘记密码时,可以通过此端点找回密码。用户需要使用相关验证手段进行验证,目前支持**邮箱验证码**和**手机号验证码**两种验证手段。
+ * @returns PasswordResetVerifyResp
+ */
+
+func (client *AuthenticationClient) VerifyResetPasswordRequest (reqDto *dto.VerifyResetPasswordRequestDto) *dto.PasswordResetVerifyResp {
+ b, err := client.SendHttpRequest("/api/v3/verify-reset-password-request", fasthttp.MethodPost, reqDto)
+ var response dto.PasswordResetVerifyResp
if err != nil {
fmt.Println(err)
return nil
@@ -1262,15 +1934,15 @@ func (client *AuthenticationClient) GetProfile(reqDto *dto.GetProfileDto) *dto.U
}
return &response
}
-
/*
-* @summary 修改用户资料
-* @description 此接口用于修改用户的用户资料,包含用户的自定义数据。如果需要**修改邮箱**、**修改手机号**、**修改密码**,请使用对应的单独接口。
-* @returns UserSingleRespDto
- */
-func (client *AuthenticationClient) UpdateProfile(reqDto *dto.UpdateUserProfileDto) *dto.UserSingleRespDto {
- b, err := client.SendHttpRequest("/api/v3/update-profile", fasthttp.MethodPost, reqDto)
- var response dto.UserSingleRespDto
+ * @summary 忘记密码
+ * @description 此端点用于用户忘记密码之后,通过**手机号验证码**或者**邮箱验证码**的方式重置密码。此接口需要提供用于重置密码的临时凭证 `passwordResetToken`,此参数需要通过**发起忘记密码请求**接口获取。
+ * @returns IsSuccessRespDto
+ */
+
+func (client *AuthenticationClient) ResetPassword (reqDto *dto.ResetPasswordDto) *dto.IsSuccessRespDto {
+ b, err := client.SendHttpRequest("/api/v3/reset-password", fasthttp.MethodPost, reqDto)
+ var response dto.IsSuccessRespDto
if err != nil {
fmt.Println(err)
return nil
@@ -1282,15 +1954,15 @@ func (client *AuthenticationClient) UpdateProfile(reqDto *dto.UpdateUserProfileD
}
return &response
}
-
/*
-* @summary 绑定邮箱
-* @description 如果用户还**没有绑定邮箱**,此接口可用于用户**自主**绑定邮箱。如果用户已经绑定邮箱想要修改邮箱,请使用**修改邮箱**接口。你需要先调用**发送邮件**接口发送邮箱验证码。
-* @returns CommonResponseDto
- */
-func (client *AuthenticationClient) BindEmail(reqDto *dto.BindEmailDto) *dto.CommonResponseDto {
- b, err := client.SendHttpRequest("/api/v3/bind-email", fasthttp.MethodPost, reqDto)
- var response dto.CommonResponseDto
+ * @summary 发起注销账号请求
+ * @description 当用户希望注销账号时,需提供相应凭证,当前支持**使用邮箱验证码**、使用**手机验证码**、**使用密码**三种验证方式。
+ * @returns VerifyDeleteAccountRequestRespDto
+ */
+
+func (client *AuthenticationClient) VerifyDeleteAccountRequest (reqDto *dto.VerifyDeleteAccountRequestDto) *dto.VerifyDeleteAccountRequestRespDto {
+ b, err := client.SendHttpRequest("/api/v3/verify-delete-account-request", fasthttp.MethodPost, reqDto)
+ var response dto.VerifyDeleteAccountRequestRespDto
if err != nil {
fmt.Println(err)
return nil
@@ -1302,15 +1974,15 @@ func (client *AuthenticationClient) BindEmail(reqDto *dto.BindEmailDto) *dto.Com
}
return &response
}
-
/*
-* @summary 解绑邮箱
-* @description 用户解绑邮箱,如果用户没有绑定其他登录方式(手机号、社会化登录账号),将无法解绑邮箱,会提示错误。
-* @returns CommonResponseDto
- */
-func (client *AuthenticationClient) UnbindEmail(reqDto *dto.UnbindEmailDto) *dto.CommonResponseDto {
- b, err := client.SendHttpRequest("/api/v3/unbind-email", fasthttp.MethodPost, reqDto)
- var response dto.CommonResponseDto
+ * @summary 注销账户
+ * @description 此端点用于用户自主注销账号,需要提供用于注销账号的临时凭证 deleteAccountToken,此参数需要通过**发起注销账号请求**接口获取。
+ * @returns IsSuccessRespDto
+ */
+
+func (client *AuthenticationClient) DeleteAccount (reqDto *dto.DeleteAccounDto) *dto.IsSuccessRespDto {
+ b, err := client.SendHttpRequest("/api/v3/delete-account", fasthttp.MethodPost, reqDto)
+ var response dto.IsSuccessRespDto
if err != nil {
fmt.Println(err)
return nil
@@ -1322,15 +1994,14 @@ func (client *AuthenticationClient) UnbindEmail(reqDto *dto.UnbindEmailDto) *dto
}
return &response
}
-
/*
-* @summary 绑定手机号
-* @description 如果用户还**没有绑定手机号**,此接口可用于用户**自主**绑定手机号。如果用户已经绑定手机号想要修改手机号,请使用**修改手机号**接口。你需要先调用**发送短信**接口发送短信验证码。
-* @returns CommonResponseDto
- */
-func (client *AuthenticationClient) BindPhone(reqDto *dto.BindPhoneDto) *dto.CommonResponseDto {
- b, err := client.SendHttpRequest("/api/v3/bind-phone", fasthttp.MethodPost, reqDto)
- var response dto.CommonResponseDto
+ * @summary 查询当前登录用户可切换登录的公共账号列表
+ * @description 此端点用于查询当前登录用户可切换登录的公共账号列表,如果没有可切换登录的公共账号,则返回空数组。
+ * @returns GetPublicAccountDataRespDto
+ */
+func (client *AuthenticationClient) ListPublicAccountsForSwitchLoggedIn (reqDto *dto.GetUserSelectLoginPublicAccountsDto) *dto.GetPublicAccountDataRespDto {
+ b, err := client.SendHttpRequest("/api/v3/get-user-select-login-public-accounts", fasthttp.MethodGet, reqDto)
+ var response dto.GetPublicAccountDataRespDto
if err != nil {
fmt.Println(err)
return nil
@@ -1342,15 +2013,14 @@ func (client *AuthenticationClient) BindPhone(reqDto *dto.BindPhoneDto) *dto.Com
}
return &response
}
-
/*
-* @summary 解绑手机号
-* @description 用户解绑手机号,如果用户没有绑定其他登录方式(邮箱、社会化登录账号),将无法解绑手机号,会提示错误。
-* @returns CommonResponseDto
- */
-func (client *AuthenticationClient) UnbindPhone(reqDto *dto.UnbindPhoneDto) *dto.CommonResponseDto {
- b, err := client.SendHttpRequest("/api/v3/unbind-phone", fasthttp.MethodPost, reqDto)
- var response dto.CommonResponseDto
+ * @summary 获取服务器公开信息
+ * @description 可端点可获取服务器的公开信息,如 RSA256 公钥、SM2 公钥、Authing 服务版本号等。
+ * @returns SystemInfoResp
+ */
+func (client *AuthenticationClient) GetSystemInfo () *dto.SystemInfoResp {
+ b, err := client.SendHttpRequest("/api/v3/system", fasthttp.MethodGet, nil)
+ var response dto.SystemInfoResp
if err != nil {
fmt.Println(err)
return nil
@@ -1362,15 +2032,14 @@ func (client *AuthenticationClient) UnbindPhone(reqDto *dto.UnbindPhoneDto) *dto
}
return &response
}
-
/*
-* @summary 获取密码强度和账号安全等级评分
-* @description 获取用户的密码强度和账号安全等级评分,需要在请求头中带上用户的 `access_token`。
-* @returns GetSecurityInfoRespDto
- */
-func (client *AuthenticationClient) GetSecurityLevel() *dto.GetSecurityInfoRespDto {
- b, err := client.SendHttpRequest("/api/v3/get-security-info", fasthttp.MethodGet, nil)
- var response dto.GetSecurityInfoRespDto
+ * @summary 获取国家列表
+ * @description 动态获取国家列表,可以用于前端登录页面国家选择和国际短信输入框选择,以减少前端静态资源体积。
+ * @returns GetCountryListRespDto
+ */
+func (client *AuthenticationClient) GetCountryList () *dto.GetCountryListRespDto {
+ b, err := client.SendHttpRequest("/api/v3/get-country-list", fasthttp.MethodGet, nil)
+ var response dto.GetCountryListRespDto
if err != nil {
fmt.Println(err)
return nil
@@ -1382,15 +2051,15 @@ func (client *AuthenticationClient) GetSecurityLevel() *dto.GetSecurityInfoRespD
}
return &response
}
-
/*
-* @summary 修改密码
-* @description 此端点用于用户自主修改密码,如果用户之前已经设置密码,需要提供用户的原始密码作为凭证。如果用户忘记了当前密码,请使用**忘记密码**接口。
-* @returns CommonResponseDto
- */
-func (client *AuthenticationClient) UpdatePassword(reqDto *dto.UpdatePasswordDto) *dto.CommonResponseDto {
- b, err := client.SendHttpRequest("/api/v3/update-password", fasthttp.MethodPost, reqDto)
- var response dto.CommonResponseDto
+ * @summary 字符串类型资源鉴权
+ * @description 字符串类型资源鉴权,支持用户对一个或者多个字符串资源进行权限判断
+ * @returns CheckResourcePermissionsRespDto
+ */
+
+func (client *AuthenticationClient) CheckPermissionByStringResource (reqDto *dto.CheckPermissionStringResourceDto) *dto.CheckResourcePermissionsRespDto {
+ b, err := client.SendHttpRequest("/api/v3/check-permission-string-resource", fasthttp.MethodPost, reqDto)
+ var response dto.CheckResourcePermissionsRespDto
if err != nil {
fmt.Println(err)
return nil
@@ -1402,15 +2071,15 @@ func (client *AuthenticationClient) UpdatePassword(reqDto *dto.UpdatePasswordDto
}
return &response
}
-
/*
-* @summary 发起修改邮箱的验证请求
-* @description 终端用户自主修改邮箱时,需要提供相应的验证手段。此接口用于验证用户的修改邮箱请求是否合法。当前支持通过**邮箱验证码**的方式进行验证,你需要先调用发送邮件接口发送对应的邮件验证码。
-* @returns VerifyUpdateEmailRequestRespDto
- */
-func (client *AuthenticationClient) VerifyUpdateEmailRequest(reqDto *dto.VerifyUpdateEmailRequestDto) *dto.VerifyUpdateEmailRequestRespDto {
- b, err := client.SendHttpRequest("/api/v3/verify-update-email-request", fasthttp.MethodPost, reqDto)
- var response dto.VerifyUpdateEmailRequestRespDto
+ * @summary 数组类型资源鉴权
+ * @description 数组类型资源鉴权,支持用户对一个或者多个数组资源进行权限判断
+ * @returns CheckResourcePermissionsRespDto
+ */
+
+func (client *AuthenticationClient) CheckPermissionByArrayResource (reqDto *dto.CheckPermissionArrayResourceDto) *dto.CheckResourcePermissionsRespDto {
+ b, err := client.SendHttpRequest("/api/v3/check-permission-array-resource", fasthttp.MethodPost, reqDto)
+ var response dto.CheckResourcePermissionsRespDto
if err != nil {
fmt.Println(err)
return nil
@@ -1422,16 +2091,15 @@ func (client *AuthenticationClient) VerifyUpdateEmailRequest(reqDto *dto.VerifyU
}
return &response
}
-
/*
- * @summary 修改邮箱
- * @description 终端用户自主修改邮箱,需要提供相应的验证手段,见[发起修改邮箱的验证请求](#tag/用户资料/修改邮箱/operation/ProfileV3Controller_updateEmailVerification)。
- * 此参数需要提供一次性临时凭证 `updateEmailToken`,此数据需要从**发起修改邮箱的验证请求**接口获取。
- * @returns CommonResponseDto
-*/
-func (client *AuthenticationClient) UpdateEmail(reqDto *dto.UpdateEmailDto) *dto.CommonResponseDto {
- b, err := client.SendHttpRequest("/api/v3/update-email", fasthttp.MethodPost, reqDto)
- var response dto.CommonResponseDto
+ * @summary 树类型资源鉴权
+ * @description 树类型资源鉴权,支持用户对一个或者多个树资源进行权限判断
+ * @returns CheckResourcePermissionsRespDto
+ */
+
+func (client *AuthenticationClient) CheckPermissionByTreeResource (reqDto *dto.CheckPermissionTreeResourceDto) *dto.CheckResourcePermissionsRespDto {
+ b, err := client.SendHttpRequest("/api/v3/check-permission-tree-resource", fasthttp.MethodPost, reqDto)
+ var response dto.CheckResourcePermissionsRespDto
if err != nil {
fmt.Println(err)
return nil
@@ -1443,15 +2111,14 @@ func (client *AuthenticationClient) UpdateEmail(reqDto *dto.UpdateEmailDto) *dto
}
return &response
}
-
/*
-* @summary 发起修改手机号的验证请求
-* @description 终端用户自主修改手机号时,需要提供相应的验证手段。此接口用于验证用户的修改手机号请求是否合法。当前支持通过**短信验证码**的方式进行验证,你需要先调用发送短信接口发送对应的短信验证码。
-* @returns VerifyUpdatePhoneRequestRespDto
- */
-func (client *AuthenticationClient) VerifyUpdatePhoneRequest(reqDto *dto.VerifyUpdatePhoneRequestDto) *dto.VerifyUpdatePhoneRequestRespDto {
- b, err := client.SendHttpRequest("/api/v3/verify-update-phone-request", fasthttp.MethodPost, reqDto)
- var response dto.VerifyUpdatePhoneRequestRespDto
+ * @summary 获取用户在登录应用下被授权资源列表
+ * @description 获取用户指定资源权限列表,用户获取在某个应用下所拥有的资源列表。
+ * @returns GetUserAuthResourceListRespDto
+ */
+func (client *AuthenticationClient) GetUserAuthorizedResourcesList () *dto.GetUserAuthResourceListRespDto {
+ b, err := client.SendHttpRequest("/api/v3/get-user-auth-resource-list", fasthttp.MethodGet, nil)
+ var response dto.GetUserAuthResourceListRespDto
if err != nil {
fmt.Println(err)
return nil
@@ -1463,16 +2130,15 @@ func (client *AuthenticationClient) VerifyUpdatePhoneRequest(reqDto *dto.VerifyU
}
return &response
}
-
/*
- * @summary 修改手机号
- * @description 终端用户自主修改手机号,需要提供相应的验证手段,见[发起修改手机号的验证请求](#tag/用户资料/修改邮箱/operation/ProfileV3Controller_updatePhoneVerification)。
- * 此参数需要提供一次性临时凭证 `updatePhoneToken`,此数据需要从**发起修改手机号的验证请求**接口获取。
- * @returns CommonResponseDto
-*/
-func (client *AuthenticationClient) UpdatePhone(reqDto *dto.UpdatePhoneDto) *dto.CommonResponseDto {
- b, err := client.SendHttpRequest("/api/v3/update-phone", fasthttp.MethodPost, reqDto)
- var response dto.CommonResponseDto
+ * @summary 获取用户指定资源权限列表
+ * @description 获取用户指定资源的权限列表,用户获取某个应用下指定资源的权限列表。
+ * @returns GetUserAuthResourcePermissionListRespDto
+ */
+
+func (client *AuthenticationClient) GetUserAuthResourcePermissionList (reqDto *dto.GetUserAuthResourcePermissionListDto) *dto.GetUserAuthResourcePermissionListRespDto {
+ b, err := client.SendHttpRequest("/api/v3/get-user-auth-resource-permission-list", fasthttp.MethodPost, reqDto)
+ var response dto.GetUserAuthResourcePermissionListRespDto
if err != nil {
fmt.Println(err)
return nil
@@ -1484,15 +2150,15 @@ func (client *AuthenticationClient) UpdatePhone(reqDto *dto.UpdatePhoneDto) *dto
}
return &response
}
-
/*
-* @summary 发起忘记密码请求
-* @description 当用户忘记密码时,可以通过此端点找回密码。用户需要使用相关验证手段进行验证,目前支持**邮箱验证码**和**手机号验证码**两种验证手段。
-* @returns PasswordResetVerifyResp
- */
-func (client *AuthenticationClient) VerifyResetPasswordRequest(reqDto *dto.VerifyResetPasswordRequestDto) *dto.PasswordResetVerifyResp {
- b, err := client.SendHttpRequest("/api/v3/verify-reset-password-request", fasthttp.MethodPost, reqDto)
- var response dto.PasswordResetVerifyResp
+ * @summary 获取用户授权资源的结构列表
+ * @description 获取用户授权的资源列表,用户获取某个应用下的某个资源所授权的结构列表,通过不同的资源类型返回对应资源的授权列表。
+ * @returns GetUserAuthResourceStructRespDto
+ */
+
+func (client *AuthenticationClient) GetUserAuthResourceStruct (reqDto *dto.GetUserAuthResourceStructDto) *dto.GetUserAuthResourceStructRespDto {
+ b, err := client.SendHttpRequest("/api/v3/get-user-auth-resource-struct", fasthttp.MethodPost, reqDto)
+ var response dto.GetUserAuthResourceStructRespDto
if err != nil {
fmt.Println(err)
return nil
@@ -1504,15 +2170,14 @@ func (client *AuthenticationClient) VerifyResetPasswordRequest(reqDto *dto.Verif
}
return &response
}
-
/*
-* @summary 忘记密码
-* @description 此端点用于用户忘记密码之后,通过**手机号验证码**或者**邮箱验证码**的方式重置密码。此接口需要提供用于重置密码的临时凭证 `passwordResetToken`,此参数需要通过**发起忘记密码请求**接口获取。
-* @returns IsSuccessRespDto
- */
-func (client *AuthenticationClient) ResetPassword(reqDto *dto.ResetPasswordDto) *dto.IsSuccessRespDto {
- b, err := client.SendHttpRequest("/api/v3/reset-password", fasthttp.MethodPost, reqDto)
- var response dto.IsSuccessRespDto
+ * @summary 获取 WebAuthn 认证请求初始化参数
+ * @description 获取 WebAuthn 认证请求初始化参数
+ * @returns GetAuthenticationOptionsRespDto
+ */
+func (client *AuthenticationClient) InitAuthenticationOptions () *dto.GetAuthenticationOptionsRespDto {
+ b, err := client.SendHttpRequest("/api/v3/webauthn/authentication", fasthttp.MethodGet, nil)
+ var response dto.GetAuthenticationOptionsRespDto
if err != nil {
fmt.Println(err)
return nil
@@ -1524,15 +2189,15 @@ func (client *AuthenticationClient) ResetPassword(reqDto *dto.ResetPasswordDto)
}
return &response
}
-
/*
-* @summary 发起注销账号请求
-* @description 当用户希望注销账号时,需提供相应凭证,当前支持**使用邮箱验证码**、使用**手机验证码**、**使用密码**三种验证方式。
-* @returns VerifyDeleteAccountRequestRespDto
- */
-func (client *AuthenticationClient) VerifyDeleteAccountRequest(reqDto *dto.VerifyDeleteAccountRequestDto) *dto.VerifyDeleteAccountRequestRespDto {
- b, err := client.SendHttpRequest("/api/v3/verify-delete-account-request", fasthttp.MethodPost, reqDto)
- var response dto.VerifyDeleteAccountRequestRespDto
+ * @summary 验证 WebAuthn 认证请求凭证
+ * @description 验证 WebAuthn 认证请求凭证
+ * @returns VerifyAuthenticationResultRespDto
+ */
+
+func (client *AuthenticationClient) VerifyAuthentication (reqDto *dto.VerifyAuthenticationDto) *dto.VerifyAuthenticationResultRespDto {
+ b, err := client.SendHttpRequest("/api/v3/webauthn/authentication", fasthttp.MethodPost, reqDto)
+ var response dto.VerifyAuthenticationResultRespDto
if err != nil {
fmt.Println(err)
return nil
@@ -1544,15 +2209,14 @@ func (client *AuthenticationClient) VerifyDeleteAccountRequest(reqDto *dto.Verif
}
return &response
}
-
/*
-* @summary 注销账户
-* @description 此端点用于用户自主注销账号,需要提供用于注销账号的临时凭证 deleteAccountToken,此参数需要通过**发起注销账号请求**接口获取。
-* @returns IsSuccessRespDto
- */
-func (client *AuthenticationClient) DeleteAccount(reqDto *dto.DeleteAccounDto) *dto.IsSuccessRespDto {
- b, err := client.SendHttpRequest("/api/v3/delete-account", fasthttp.MethodPost, reqDto)
- var response dto.IsSuccessRespDto
+ * @summary 获取 webauthn 凭证创建初始化参数
+ * @description 获取 webauthn 凭证创建初始化参数。**此接口要求具备用户的登录态**
+ * @returns GetRegistrationOptionsRespDto
+ */
+func (client *AuthenticationClient) InitRegisterOptions () *dto.GetRegistrationOptionsRespDto {
+ b, err := client.SendHttpRequest("/api/v3/webauthn/registration", fasthttp.MethodGet, nil)
+ var response dto.GetRegistrationOptionsRespDto
if err != nil {
fmt.Println(err)
return nil
@@ -1564,15 +2228,15 @@ func (client *AuthenticationClient) DeleteAccount(reqDto *dto.DeleteAccounDto) *
}
return &response
}
-
/*
-* @summary 获取服务器公开信息
-* @description 可端点可获取服务器的公开信息,如 RSA256 公钥、SM2 公钥、Authing 服务版本号等。
-* @returns SystemInfoResp
- */
-func (client *AuthenticationClient) GetSystemInfo() *dto.SystemInfoResp {
- b, err := client.SendHttpRequest("/api/v3/system", fasthttp.MethodGet, nil)
- var response dto.SystemInfoResp
+ * @summary 验证 webauthn 绑定注册认证器凭证
+ * @description 验证 webauthn 绑定注册认证器凭证
+ * @returns VerifyRegistrationResultRespDto
+ */
+
+func (client *AuthenticationClient) VerifyRegister (reqDto *dto.VerifyRegistrationDto) *dto.VerifyRegistrationResultRespDto {
+ b, err := client.SendHttpRequest("/api/v3/webauthn/registration", fasthttp.MethodPost, reqDto)
+ var response dto.VerifyRegistrationResultRespDto
if err != nil {
fmt.Println(err)
return nil
@@ -1584,15 +2248,14 @@ func (client *AuthenticationClient) GetSystemInfo() *dto.SystemInfoResp {
}
return &response
}
-
/*
-* @summary 获取国家列表
-* @description 动态获取国家列表,可以用于前端登录页面国家选择和国际短信输入框选择,以减少前端静态资源体积。
-* @returns GetCountryListRespDto
- */
-func (client *AuthenticationClient) GetCountryList() *dto.GetCountryListRespDto {
- b, err := client.SendHttpRequest("/api/v3/get-country-list", fasthttp.MethodGet, nil)
- var response dto.GetCountryListRespDto
+ * @summary 我的设备列表
+ * @description 我登录过的设备列表。
+ * @returns TerminalSessionRespDto
+ */
+func (client *AuthenticationClient) List (reqDto *dto.ListDto) *dto.TerminalSessionRespDto {
+ b, err := client.SendHttpRequest("/api/v3/mydevices/list", fasthttp.MethodGet, reqDto)
+ var response dto.TerminalSessionRespDto
if err != nil {
fmt.Println(err)
return nil
@@ -1604,15 +2267,15 @@ func (client *AuthenticationClient) GetCountryList() *dto.GetCountryListRespDto
}
return &response
}
-
/*
-* @summary 预检验验证码是否正确
-* @description 预检测验证码是否有效,此检验不会使得验证码失效。
-* @returns PreCheckCodeRespDto
- */
-func (client *AuthenticationClient) PreCheckCode(reqDto *dto.PreCheckCodeDto) *dto.PreCheckCodeRespDto {
- b, err := client.SendHttpRequest("/api/v3/pre-check-code", fasthttp.MethodPost, reqDto)
- var response dto.PreCheckCodeRespDto
+ * @summary 移除设备
+ * @description 移除某个设备。
+ * @returns CommonResponseDto
+ */
+
+func (client *AuthenticationClient) Unbind (reqDto *dto.UnbindDeviceDto) *dto.CommonResponseDto {
+ b, err := client.SendHttpRequest("/api/v3/mydevices/unbind", fasthttp.MethodPost, reqDto)
+ var response dto.CommonResponseDto
if err != nil {
fmt.Println(err)
return nil
@@ -1624,15 +2287,15 @@ func (client *AuthenticationClient) PreCheckCode(reqDto *dto.PreCheckCodeDto) *d
}
return &response
}
-
/*
-* @summary 发起绑定 MFA 认证要素请求
-* @description 当用户未绑定某个 MFA 认证要素时,可以发起绑定 MFA 认证要素请求。不同类型的 MFA 认证要素绑定请求需要发送不同的参数,详细见 profile 参数。发起验证请求之后,Authing 服务器会根据相应的认证要素类型和传递的参数,使用不同的手段要求验证。此接口会返回 enrollmentToken,你需要在请求「绑定 MFA 认证要素」接口时带上此 enrollmentToken,并提供相应的凭证。
-* @returns SendEnrollFactorRequestRespDto
- */
-func (client *AuthenticationClient) SendEnrollFactorRequest(reqDto *dto.SendEnrollFactorRequestDto) *dto.SendEnrollFactorRequestRespDto {
- b, err := client.SendHttpRequest("/api/v3/send-enroll-factor-request", fasthttp.MethodPost, reqDto)
- var response dto.SendEnrollFactorRequestRespDto
+ * @summary 从设备上退出登录
+ * @description 移除某个已登录设备的登录态。
+ * @returns CommonResponseDto
+ */
+
+func (client *AuthenticationClient) Revoke (reqDto *dto.RevokeDeviceSessionDto) *dto.CommonResponseDto {
+ b, err := client.SendHttpRequest("/api/v3/mydevices/revoke-session", fasthttp.MethodPost, reqDto)
+ var response dto.CommonResponseDto
if err != nil {
fmt.Println(err)
return nil
@@ -1644,15 +2307,15 @@ func (client *AuthenticationClient) SendEnrollFactorRequest(reqDto *dto.SendEnro
}
return &response
}
-
/*
-* @summary 绑定 MFA 认证要素
-* @description 绑定 MFA 要素。
-* @returns EnrollFactorRespDto
- */
-func (client *AuthenticationClient) EnrollFactor(reqDto *dto.EnrollFactorDto) *dto.EnrollFactorRespDto {
- b, err := client.SendHttpRequest("/api/v3/enroll-factor", fasthttp.MethodPost, reqDto)
- var response dto.EnrollFactorRespDto
+ * @summary 微信移动端登录
+ * @description 移动端应用:使用微信作为外部身份源登录。
+ * @returns LoginTokenResponseDataDto
+ */
+
+func (client *AuthenticationClient) AuthByCodeIdentity (reqDto *dto.WechatMobileAuthByCodeIdentityInput) *dto.LoginTokenResponseDataDto {
+ b, err := client.SendHttpRequest("/api/v2/ecConn/wechatMobile/authByCodeIdentity", fasthttp.MethodPost, reqDto)
+ var response dto.LoginTokenResponseDataDto
if err != nil {
fmt.Println(err)
return nil
@@ -1664,15 +2327,15 @@ func (client *AuthenticationClient) EnrollFactor(reqDto *dto.EnrollFactorDto) *d
}
return &response
}
-
/*
-* @summary 解绑 MFA 认证要素
-* @description 根据 Factor ID 解绑用户绑定的某个 MFA 认证要素。
-* @returns ResetFactorRespDto
- */
-func (client *AuthenticationClient) ResetFactor(reqDto *dto.ResetFactorDto) *dto.ResetFactorRespDto {
- b, err := client.SendHttpRequest("/api/v3/reset-factor", fasthttp.MethodPost, reqDto)
- var response dto.ResetFactorRespDto
+ * @summary 微信移动端:使用身份源中用户信息
+ * @description 询问绑定开启时:绑定到外部身份源,根据外部身份源中的用户信息创建用户后绑定到当前身份源并登录。
+ * @returns WechatLoginTokenRespDto
+ */
+
+func (client *AuthenticationClient) RegisterNewUser (reqDto *dto.BindByRegiserInputApi) *dto.WechatLoginTokenRespDto {
+ b, err := client.SendHttpRequest("/api/v2/ecConn/wechatMobile/register", fasthttp.MethodPost, reqDto)
+ var response dto.WechatLoginTokenRespDto
if err != nil {
fmt.Println(err)
return nil
@@ -1684,15 +2347,15 @@ func (client *AuthenticationClient) ResetFactor(reqDto *dto.ResetFactorDto) *dto
}
return &response
}
-
/*
-* @summary 获取绑定的所有 MFA 认证要素
-* @description Authing 目前支持四种类型的 MFA 认证要素:手机短信、邮件验证码、OTP、人脸。
-* @returns ListEnrolledFactorsRespDto
- */
-func (client *AuthenticationClient) ListEnrolledFactors() *dto.ListEnrolledFactorsRespDto {
- b, err := client.SendHttpRequest("/api/v3/list-enrolled-factors", fasthttp.MethodGet, nil)
- var response dto.ListEnrolledFactorsRespDto
+ * @summary 微信移动端:邮箱验证码模式
+ * @description 询问绑定开启时:绑定到外部身份源,根据输入的邮箱验证用户信息,找到对应的用户后绑定到当前身份源并登录;找不到时报错“用户不存在”。
+ * @returns WechatLoginTokenRespDto
+ */
+
+func (client *AuthenticationClient) BindByEmailCode (reqDto *dto.BindByEmailCodeInputApi) *dto.WechatLoginTokenRespDto {
+ b, err := client.SendHttpRequest("/api/v2/ecConn/wechatMobile/byEmailCode", fasthttp.MethodPost, reqDto)
+ var response dto.WechatLoginTokenRespDto
if err != nil {
fmt.Println(err)
return nil
@@ -1704,15 +2367,15 @@ func (client *AuthenticationClient) ListEnrolledFactors() *dto.ListEnrolledFacto
}
return &response
}
-
/*
-* @summary 获取绑定的某个 MFA 认证要素
-* @description 根据 Factor ID 获取用户绑定的某个 MFA Factor 详情。
-* @returns GetFactorRespDto
- */
-func (client *AuthenticationClient) GetFactor(reqDto *dto.GetFactorDto) *dto.GetFactorRespDto {
- b, err := client.SendHttpRequest("/api/v3/get-factor", fasthttp.MethodGet, reqDto)
- var response dto.GetFactorRespDto
+ * @summary 微信移动端:手机号验证码模式
+ * @description 询问绑定开启时:绑定到外部身份源,根据输入的手机验证用户信息,找到对应的用户后绑定到当前身份源并登录;找不到时报错“用户不存在”。
+ * @returns WechatLoginTokenRespDto
+ */
+
+func (client *AuthenticationClient) BindByPhoneCode (reqDto *dto.BindByPhoneCodeInputApi) *dto.WechatLoginTokenRespDto {
+ b, err := client.SendHttpRequest("/api/v2/ecConn/wechatMobile/byPhoneCode", fasthttp.MethodPost, reqDto)
+ var response dto.WechatLoginTokenRespDto
if err != nil {
fmt.Println(err)
return nil
@@ -1724,15 +2387,15 @@ func (client *AuthenticationClient) GetFactor(reqDto *dto.GetFactorDto) *dto.Get
}
return &response
}
-
/*
-* @summary 获取可绑定的 MFA 认证要素
-* @description 获取所有应用已经开启、用户暂未绑定的 MFA 认证要素,用户可以从返回的列表中绑定新的 MFA 认证要素。
-* @returns ListFactorsToEnrollRespDto
- */
-func (client *AuthenticationClient) ListFactorsToEnroll() *dto.ListFactorsToEnrollRespDto {
- b, err := client.SendHttpRequest("/api/v3/list-factors-to-enroll", fasthttp.MethodGet, nil)
- var response dto.ListFactorsToEnrollRespDto
+ * @summary 微信移动端:账号密码模式
+ * @description 询问绑定开启时:绑定到外部身份源,根据输入的账号(用户名/手机号/邮箱)密码验证用户信息,找到对应的用户后绑定到当前身份源并登录;找不到时报错“用户不存在”。
+ * @returns WechatLoginTokenRespDto
+ */
+
+func (client *AuthenticationClient) BindByAccount (reqDto *dto.BindByAccountInputApi) *dto.WechatLoginTokenRespDto {
+ b, err := client.SendHttpRequest("/api/v2/ecConn/wechatMobile/byAccount", fasthttp.MethodPost, reqDto)
+ var response dto.WechatLoginTokenRespDto
if err != nil {
fmt.Println(err)
return nil
@@ -1744,15 +2407,15 @@ func (client *AuthenticationClient) ListFactorsToEnroll() *dto.ListFactorsToEnro
}
return &response
}
-
/*
-* @summary 校验用户 MFA 绑定的 OTP
-* @description 校验用户 MFA 绑定的 OTP。
-* @returns MfaOtpVerityRespDto
- */
-func (client *AuthenticationClient) MfaOtpVerify(reqDto *dto.MfaOtpVerityDto) *dto.MfaOtpVerityRespDto {
- b, err := client.SendHttpRequest("/api/v3/mfa-totp-verify", fasthttp.MethodPost, reqDto)
- var response dto.MfaOtpVerityRespDto
+ * @summary 微信移动端:多账号场景
+ * @description 询问绑定开启时:根据选择的账号绑定外部身份源,根据输入的账号 ID 验证用户信息,找到对应的用户后绑定到当前身份源并登录;找不到时报错“用户不存在”。
+ * @returns WechatLoginTokenRespDto
+ */
+
+func (client *AuthenticationClient) SelectAccount (reqDto *dto.BindByAccountsInputApi) *dto.WechatLoginTokenRespDto {
+ b, err := client.SendHttpRequest("/api/v2/ecConn/wechatMobile/select", fasthttp.MethodPost, reqDto)
+ var response dto.WechatLoginTokenRespDto
if err != nil {
fmt.Println(err)
return nil
@@ -1764,17 +2427,15 @@ func (client *AuthenticationClient) MfaOtpVerify(reqDto *dto.MfaOtpVerityDto) *d
}
return &response
}
-
/*
- * @summary 生成绑定外部身份源的链接
- * @description
- * 此接口用于生成绑定外部身份源的链接,生成之后可以引导用户进行跳转。
- *
- * @returns GenerateBindExtIdpLinkRespDto
-*/
-func (client *AuthenticationClient) GenerateLinkExtIdpUrl(reqDto *dto.GenerateLinkExtidpUrlDto) *dto.GenerateBindExtIdpLinkRespDto {
- b, err := client.SendHttpRequest("/api/v3/generate-link-extidp-url", fasthttp.MethodGet, reqDto)
- var response dto.GenerateBindExtIdpLinkRespDto
+ * @summary 微信移动端:账号 ID 模式
+ * @description 询问绑定开启时:绑定到外部身份源,根据输入的账号 ID 验证用户信息,找到对应的用户后绑定到当前身份源并登录;找不到时报错“用户不存在”。
+ * @returns WechatLoginTokenRespDto
+ */
+
+func (client *AuthenticationClient) BindByAccountId (reqDto *dto.BindByAccountIdInputApi) *dto.WechatLoginTokenRespDto {
+ b, err := client.SendHttpRequest("/api/v2/ecConn/wechatMobile/byAccountId", fasthttp.MethodPost, reqDto)
+ var response dto.WechatLoginTokenRespDto
if err != nil {
fmt.Println(err)
return nil
@@ -1786,15 +2447,15 @@ func (client *AuthenticationClient) GenerateLinkExtIdpUrl(reqDto *dto.GenerateLi
}
return &response
}
-
/*
-* @summary 解绑外部身份源
-* @description 解绑外部身份源,此接口需要传递用户绑定的外部身份源 ID,**注意不是身份源连接 ID**。
-* @returns CommonResponseDto
- */
-func (client *AuthenticationClient) UnlinkExtIdp(reqDto *dto.UnlinkExtIdpDto) *dto.CommonResponseDto {
- b, err := client.SendHttpRequest("/api/v3/unlink-extidp", fasthttp.MethodPost, reqDto)
- var response dto.CommonResponseDto
+ * @summary 获取推送登录请求关联的客户端应用
+ * @description 此端点用于在 Authing 令牌 APP 收到推送登录通知时,可检查当前用户登录的应用是否支持对推送登录请求进行授权。
+ * @returns GetPushCodeRelationAppsRespDto
+ */
+
+func (client *AuthenticationClient) GetPushLoginRelationApps (reqDto *dto.GetPushCodeRelationAppsDto) *dto.GetPushCodeRelationAppsRespDto {
+ b, err := client.SendHttpRequest("/api/v3/get-pushlogin-relation-apps", fasthttp.MethodPost, reqDto)
+ var response dto.GetPushCodeRelationAppsRespDto
if err != nil {
fmt.Println(err)
return nil
@@ -1806,50 +2467,15 @@ func (client *AuthenticationClient) UnlinkExtIdp(reqDto *dto.UnlinkExtIdpDto) *d
}
return &response
}
-
/*
- * @summary 获取绑定的外部身份源
- * @description
- * 如在**介绍**部分中所描述的,一个外部身份源对应多个外部身份源连接,用户通过某个外部身份源连接绑定了某个外部身份源账号之后,
- * 用户会建立一条与此外部身份源之间的关联关系。此接口用于获取此用户绑定的所有外部身份源。
- *
- * 取决于外部身份源的具体实现,一个用户在外部身份源中,可能会有多个身份 ID,比如在微信体系中会有 `openid` 和 `unionid`,在非书中有
- * `open_id`、`union_id` 和 `user_id`。在 Authing 中,我们把这样的一条 `open_id` 或者 `unionid_` 叫做一条 `Identity`, 所以用户在一个身份源会有多条 `Identity` 记录。
- *
- * 以微信为例,如果用户使用微信登录或者绑定了微信账号,他的 `Identity` 信息如下所示:
- *
- * ```json
- * [
- * {
- * "identityId": "62f20932xxxxbcc10d966ee5",
- * "extIdpId": "62f209327xxxxcc10d966ee5",
- * "provider": "wechat",
- * "type": "openid",
- * "userIdInIdp": "oH_5k5SflrwjGvk7wqpoBKq_cc6M",
- * "originConnIds": ["62f2093244fa5cb19ff21ed3"]
- * },
- * {
- * "identityId": "62f726239xxxxe3285d21c93",
- * "extIdpId": "62f209327xxxxcc10d966ee5",
- * "provider": "wechat",
- * "type": "unionid",
- * "userIdInIdp": "o9Nka5ibU-lUGQaeAHqu0nOZyJg0",
- * "originConnIds": ["62f2093244fa5cb19ff21ed3"]
- * }
- * ]
- * ```
- *
- *
- * 可以看到他们的 `extIdpId` 是一样的,这个是你在 Authing 中创建的**身份源 ID**;`provider` 都是 `wechat`;
- * 通过 `type` 可以区分出哪个是 `openid`,哪个是 `unionid`,以及具体的值(`userIdInIdp`);他们都来自于同一个身份源连接(`originConnIds`)。
- *
- *
- *
- * @returns GetIdentitiesRespDto
-*/
-func (client *AuthenticationClient) GetIdentities() *dto.GetIdentitiesRespDto {
- b, err := client.SendHttpRequest("/api/v3/get-identities", fasthttp.MethodGet, nil)
- var response dto.GetIdentitiesRespDto
+ * @summary 获取快速认证二维码数据
+ * @description 此端点用于在用户个人中心,获取快速认证参数生成二维码,可使用 Authing 令牌 APP 扫码,完成快速认证。**此接口要求具备用户的登录态**。
+ * @returns GeneFastpassQRCodeRespDto
+ */
+
+func (client *AuthenticationClient) GeneFastpassQrcodeInfo (reqDto *dto.SignInFastpassDto) *dto.GeneFastpassQRCodeRespDto {
+ b, err := client.SendHttpRequest("/api/v3/gene-fastpass-qrcode-info", fasthttp.MethodPost, reqDto)
+ var response dto.GeneFastpassQRCodeRespDto
if err != nil {
fmt.Println(err)
return nil
@@ -1861,15 +2487,14 @@ func (client *AuthenticationClient) GetIdentities() *dto.GetIdentitiesRespDto {
}
return &response
}
-
/*
-* @summary 获取应用开启的外部身份源列表
-* @description 获取应用开启的外部身份源列表,前端可以基于此渲染外部身份源按钮。
-* @returns GetExtIdpsRespDto
- */
-func (client *AuthenticationClient) GetApplicationEnabledExtIdps() *dto.GetExtIdpsRespDto {
- b, err := client.SendHttpRequest("/api/v3/get-application-enabled-extidps", fasthttp.MethodGet, nil)
- var response dto.GetExtIdpsRespDto
+ * @summary 获取快速认证的应用列表
+ * @description 此端点用于使用 Authing 令牌 APP 扫「用户个人中心」-「快速认证」二维码后,拉取可快速认证的客户端应用列表。
+ * @returns GetFastpassQRCodeRelationAppsRespDto
+ */
+func (client *AuthenticationClient) GetFastpassParams (reqDto *dto.GetFastpassClientAppsDto) *dto.GetFastpassQRCodeRelationAppsRespDto {
+ b, err := client.SendHttpRequest("/api/v3/get-fastpass-client-apps", fasthttp.MethodGet, reqDto)
+ var response dto.GetFastpassQRCodeRelationAppsRespDto
if err != nil {
fmt.Println(err)
return nil
@@ -1881,22 +2506,14 @@ func (client *AuthenticationClient) GetApplicationEnabledExtIdps() *dto.GetExtId
}
return &response
}
-
/*
- * @summary 注册
- * @description
- * 此端点目前支持以下几种基于的注册方式:
- *
- * 1. 基于密码(PASSWORD):用户名 + 密码,邮箱 + 密码。
- * 2. 基于一次性临时验证码(PASSCODE):手机号 + 验证码,邮箱 + 验证码。你需要先调用发送短信或者发送邮件接口获取验证码。
- *
- * 社会化登录等使用外部身份源“注册”请直接使用**登录**接口,我们会在其第一次登录的时候为其创建一个新账号。
- *
- * @returns UserSingleRespDto
-*/
-func (client *AuthenticationClient) SignUp(reqDto *dto.SignUpDto) *dto.UserSingleRespDto {
- b, err := client.SendHttpRequest("/api/v3/signup", fasthttp.MethodPost, reqDto)
- var response dto.UserSingleRespDto
+ * @summary 查询个人中心「快速认证二维码」的状态
+ * @description 按照用户扫码顺序,共分为未扫码、已扫码、已登录、二维码过期以及未知错误五种状态,前端应该通过不同的状态给到用户不同的反馈。
+ * @returns CheckQRCodeStatusRespDto
+ */
+func (client *AuthenticationClient) GetQrCodeStatus (reqDto *dto.GetAppLoginQrcodeStatusDto) *dto.CheckQRCodeStatusRespDto {
+ b, err := client.SendHttpRequest("/api/v3/get-app-login-qrcode-status", fasthttp.MethodGet, reqDto)
+ var response dto.CheckQRCodeStatusRespDto
if err != nil {
fmt.Println(err)
return nil
@@ -1908,15 +2525,15 @@ func (client *AuthenticationClient) SignUp(reqDto *dto.SignUpDto) *dto.UserSingl
}
return &response
}
-
/*
-* @summary 解密微信小程序数据
-* @description 解密微信小程序数据
-* @returns DecryptWechatMiniProgramDataRespDto
- */
-func (client *AuthenticationClient) DecryptWechatMiniProgramData(reqDto *dto.DecryptWechatMiniProgramDataDto) *dto.DecryptWechatMiniProgramDataRespDto {
- b, err := client.SendHttpRequest("/api/v3/decrypt-wechat-miniprogram-data", fasthttp.MethodPost, reqDto)
- var response dto.DecryptWechatMiniProgramDataRespDto
+ * @summary APP 端扫码登录
+ * @description 此端点用于在授权使 APP 成功扫码登录中,对应着在「个人中心」-「快速认证」页面渲染出二维码,终端用户扫码并成功登录的过程。
+ * @returns LoginTokenRespDto
+ */
+
+func (client *AuthenticationClient) QrCodeAppLogin (reqDto *dto.AppQRCodeLoginDto) *dto.LoginTokenRespDto {
+ b, err := client.SendHttpRequest("/api/v3/qrcode-app-login", fasthttp.MethodPost, reqDto)
+ var response dto.LoginTokenRespDto
if err != nil {
fmt.Println(err)
return nil
@@ -1928,15 +2545,15 @@ func (client *AuthenticationClient) DecryptWechatMiniProgramData(reqDto *dto.Dec
}
return &response
}
-
/*
-* @summary 获取微信小程序、公众号 Access Token
-* @description 获取 Authing 服务器缓存的微信小程序、公众号 Access Token
-* @returns GetWechatAccessTokenRespDto
- */
-func (client *AuthenticationClient) GetWechatMpAccessToken(reqDto *dto.GetWechatAccessTokenDto) *dto.GetWechatAccessTokenRespDto {
- b, err := client.SendHttpRequest("/api/v3/get-wechat-access-token", fasthttp.MethodPost, reqDto)
- var response dto.GetWechatAccessTokenRespDto
+ * @summary 预检验验证码是否正确
+ * @description 预检测验证码是否有效,此检验不会使得验证码失效。
+ * @returns PreCheckCodeRespDto
+ */
+
+func (client *AuthenticationClient) PreCheckCode (reqDto *dto.PreCheckCodeDto) *dto.PreCheckCodeRespDto {
+ b, err := client.SendHttpRequest("/api/v3/pre-check-code", fasthttp.MethodPost, reqDto)
+ var response dto.PreCheckCodeRespDto
if err != nil {
fmt.Println(err)
return nil
@@ -1948,15 +2565,13 @@ func (client *AuthenticationClient) GetWechatMpAccessToken(reqDto *dto.GetWechat
}
return &response
}
-
/*
-* @summary 获取登录日志
-* @description 获取登录日志
-* @returns GetLoginHistoryRespDto
- */
-func (client *AuthenticationClient) GetLoginHistory(reqDto *dto.GetMyLoginHistoryDto) *dto.GetLoginHistoryRespDto {
- b, err := client.SendHttpRequest("/api/v3/get-my-login-history", fasthttp.MethodGet, reqDto)
- var response dto.GetLoginHistoryRespDto
+ * @returns ListWebAuthnAuthenticatorDeviceDataDto
+ */
+
+func (client *AuthenticationClient) ListCredentialsByPage (reqDto *dto.ListDeviceCredentialDto) *dto.ListWebAuthnAuthenticatorDeviceDataDto {
+ b, err := client.SendHttpRequest("/api/v3/webauthn/page-authenticator-device", fasthttp.MethodPost, reqDto)
+ var response dto.ListWebAuthnAuthenticatorDeviceDataDto
if err != nil {
fmt.Println(err)
return nil
@@ -1968,15 +2583,13 @@ func (client *AuthenticationClient) GetLoginHistory(reqDto *dto.GetMyLoginHistor
}
return &response
}
-
/*
-* @summary 获取登录应用
-* @description 获取登录应用
-* @returns GetLoggedInAppsRespDto
- */
-func (client *AuthenticationClient) GetLoggedInApps() *dto.GetLoggedInAppsRespDto {
- b, err := client.SendHttpRequest("/api/v3/get-my-logged-in-apps", fasthttp.MethodGet, nil)
- var response dto.GetLoggedInAppsRespDto
+ * @returns WebAuthnCheckValidCredentialsByCredIdsRespDto
+ */
+
+func (client *AuthenticationClient) CheckValidCredentialsByCredIds (reqDto *dto.CheckDeviceCredentialIdDto) *dto.WebAuthnCheckValidCredentialsByCredIdsRespDto {
+ b, err := client.SendHttpRequest("/api/v3/webauthn/check-valid-credentials-by-credIds", fasthttp.MethodPost, reqDto)
+ var response dto.WebAuthnCheckValidCredentialsByCredIdsRespDto
if err != nil {
fmt.Println(err)
return nil
@@ -1988,15 +2601,13 @@ func (client *AuthenticationClient) GetLoggedInApps() *dto.GetLoggedInAppsRespDt
}
return &response
}
-
/*
-* @summary 获取具备访问权限的应用
-* @description 获取具备访问权限的应用
-* @returns GetAccessibleAppsRespDto
- */
-func (client *AuthenticationClient) GetAccessibleApps() *dto.GetAccessibleAppsRespDto {
- b, err := client.SendHttpRequest("/api/v3/get-my-accessible-apps", fasthttp.MethodGet, nil)
- var response dto.GetAccessibleAppsRespDto
+ * @returns IsSuccessRespDto
+ */
+
+func (client *AuthenticationClient) RemoveAllCredentials (reqDto *dto.RemoveDeviceCredentialDto) *dto.IsSuccessRespDto {
+ b, err := client.SendHttpRequest("/api/v3/webauthn/remove-credentials-by-authenticator-code", fasthttp.MethodPost, reqDto)
+ var response dto.IsSuccessRespDto
if err != nil {
fmt.Println(err)
return nil
@@ -2008,15 +2619,13 @@ func (client *AuthenticationClient) GetAccessibleApps() *dto.GetAccessibleAppsRe
}
return &response
}
-
/*
-* @summary 获取租户列表
-* @description 获取租户列表
-* @returns GetTenantListRespDto
- */
-func (client *AuthenticationClient) GetTenantList() *dto.GetTenantListRespDto {
- b, err := client.SendHttpRequest("/api/v3/get-my-tenant-list", fasthttp.MethodGet, nil)
- var response dto.GetTenantListRespDto
+ * @returns IsSuccessRespDto
+ */
+
+func (client *AuthenticationClient) RemoveCredential (reqDto *dto.WebAuthnRemoveCredentialDto) *dto.IsSuccessRespDto {
+ b, err := client.SendHttpRequest("/api/v3/webauthn/remove-credential/{credentialID}", fasthttp.MethodPost, reqDto)
+ var response dto.IsSuccessRespDto
if err != nil {
fmt.Println(err)
return nil
@@ -2028,15 +2637,15 @@ func (client *AuthenticationClient) GetTenantList() *dto.GetTenantListRespDto {
}
return &response
}
-
/*
-* @summary 获取角色列表
-* @description 获取角色列表
-* @returns RoleListRespDto
- */
-func (client *AuthenticationClient) GetRoleList(reqDto *dto.GetMyRoleListDto) *dto.RoleListRespDto {
- b, err := client.SendHttpRequest("/api/v3/get-my-role-list", fasthttp.MethodGet, reqDto)
- var response dto.RoleListRespDto
+ * @summary 验证 MFA Token
+ * @description 验证 MFA Token
+ * @returns MfaTokenIntrospectResponse
+ */
+
+func (client *AuthenticationClient) VerifyMfaToken (reqDto *dto.MfaTokenIntrospectEndpointParams) *dto.MfaTokenIntrospectResponse {
+ b, err := client.SendHttpRequest("/mfa/token/introspection", fasthttp.MethodPost, reqDto)
+ var response dto.MfaTokenIntrospectResponse
if err != nil {
fmt.Println(err)
return nil
@@ -2048,15 +2657,15 @@ func (client *AuthenticationClient) GetRoleList(reqDto *dto.GetMyRoleListDto) *d
}
return &response
}
-
/*
-* @summary 获取分组列表
-* @description 获取分组列表
-* @returns GroupListRespDto
- */
-func (client *AuthenticationClient) GetGroupList() *dto.GroupListRespDto {
- b, err := client.SendHttpRequest("/api/v3/get-my-group-list", fasthttp.MethodGet, nil)
- var response dto.GroupListRespDto
+ * @summary 发起绑定 MFA 认证要素请求
+ * @description 当用户未绑定某个 MFA 认证要素时,可以发起绑定 MFA 认证要素请求。不同类型的 MFA 认证要素绑定请求需要发送不同的参数,详细见 profile 参数。发起验证请求之后,Authing 服务器会根据相应的认证要素类型和传递的参数,使用不同的手段要求验证。此接口会返回 enrollmentToken,你需要在请求「绑定 MFA 认证要素」接口时带上此 enrollmentToken,并提供相应的凭证。
+ * @returns SendEnrollFactorRequestRespDto
+ */
+
+func (client *AuthenticationClient) SendEnrollFactorRequest (reqDto *dto.SendEnrollFactorRequestDto) *dto.SendEnrollFactorRequestRespDto {
+ b, err := client.SendHttpRequest("/api/v3/send-enroll-factor-request", fasthttp.MethodPost, reqDto)
+ var response dto.SendEnrollFactorRequestRespDto
if err != nil {
fmt.Println(err)
return nil
@@ -2068,15 +2677,15 @@ func (client *AuthenticationClient) GetGroupList() *dto.GroupListRespDto {
}
return &response
}
-
/*
-* @summary 获取部门列表
-* @description 此接口用于获取用户的部门列表,可根据一定排序规则进行排序。
-* @returns UserDepartmentPaginatedRespDto
- */
-func (client *AuthenticationClient) GetDepartmentList(reqDto *dto.GetMyDepartmentListDto) *dto.UserDepartmentPaginatedRespDto {
- b, err := client.SendHttpRequest("/api/v3/get-my-department-list", fasthttp.MethodGet, reqDto)
- var response dto.UserDepartmentPaginatedRespDto
+ * @summary 绑定 MFA 认证要素
+ * @description 绑定 MFA 要素。
+ * @returns EnrollFactorRespDto
+ */
+
+func (client *AuthenticationClient) EnrollFactor (reqDto *dto.EnrollFactorDto) *dto.EnrollFactorRespDto {
+ b, err := client.SendHttpRequest("/api/v3/enroll-factor", fasthttp.MethodPost, reqDto)
+ var response dto.EnrollFactorRespDto
if err != nil {
fmt.Println(err)
return nil
@@ -2088,15 +2697,15 @@ func (client *AuthenticationClient) GetDepartmentList(reqDto *dto.GetMyDepartmen
}
return &response
}
-
/*
-* @summary 获取被授权的资源列表
-* @description 此接口用于获取用户被授权的资源列表。
-* @returns AuthorizedResourcePaginatedRespDto
- */
-func (client *AuthenticationClient) GetAuthorizedResources(reqDto *dto.GetMyAuthorizedResourcesDto) *dto.AuthorizedResourcePaginatedRespDto {
- b, err := client.SendHttpRequest("/api/v3/get-my-authorized-resources", fasthttp.MethodGet, reqDto)
- var response dto.AuthorizedResourcePaginatedRespDto
+ * @summary 解绑 MFA 认证要素
+ * @description 根据 Factor ID 解绑用户绑定的某个 MFA 认证要素。
+ * @returns ResetFactorRespDto
+ */
+
+func (client *AuthenticationClient) ResetFactor (reqDto *dto.ResetFactorDto) *dto.ResetFactorRespDto {
+ b, err := client.SendHttpRequest("/api/v3/reset-factor", fasthttp.MethodPost, reqDto)
+ var response dto.ResetFactorRespDto
if err != nil {
fmt.Println(err)
return nil
@@ -2108,15 +2717,14 @@ func (client *AuthenticationClient) GetAuthorizedResources(reqDto *dto.GetMyAuth
}
return &response
}
-
/*
-* @summary 字符串类型资源鉴权
-* @description 字符串类型资源鉴权,支持用户对一个或者多个字符串资源进行权限判断
-* @returns CheckResourcePermissionsRespDto
- */
-func (client *AuthenticationClient) CheckPermissionByStringResource(reqDto *dto.CheckPermissionStringResourceDto) *dto.CheckResourcePermissionsRespDto {
- b, err := client.SendHttpRequest("/api/v3/check-permission-string-resource", fasthttp.MethodPost, reqDto)
- var response dto.CheckResourcePermissionsRespDto
+ * @summary 获取绑定的所有 MFA 认证要素
+ * @description Authing 目前支持四种类型的 MFA 认证要素:手机短信、邮件验证码、OTP、人脸。
+ * @returns ListEnrolledFactorsRespDto
+ */
+func (client *AuthenticationClient) ListEnrolledFactors () *dto.ListEnrolledFactorsRespDto {
+ b, err := client.SendHttpRequest("/api/v3/list-enrolled-factors", fasthttp.MethodGet, nil)
+ var response dto.ListEnrolledFactorsRespDto
if err != nil {
fmt.Println(err)
return nil
@@ -2128,15 +2736,14 @@ func (client *AuthenticationClient) CheckPermissionByStringResource(reqDto *dto.
}
return &response
}
-
/*
-* @summary 数组类型资源鉴权
-* @description 数组类型资源鉴权,支持用户对一个或者多个数组资源进行权限判断
-* @returns CheckResourcePermissionsRespDto
- */
-func (client *AuthenticationClient) CheckPermissionByArrayResource(reqDto *dto.CheckPermissionArrayResourceDto) *dto.CheckResourcePermissionsRespDto {
- b, err := client.SendHttpRequest("/api/v3/check-permission-array-resource", fasthttp.MethodPost, reqDto)
- var response dto.CheckResourcePermissionsRespDto
+ * @summary 获取绑定的某个 MFA 认证要素
+ * @description 根据 Factor ID 获取用户绑定的某个 MFA Factor 详情。
+ * @returns GetFactorRespDto
+ */
+func (client *AuthenticationClient) GetFactor (reqDto *dto.GetFactorDto) *dto.GetFactorRespDto {
+ b, err := client.SendHttpRequest("/api/v3/get-factor", fasthttp.MethodGet, reqDto)
+ var response dto.GetFactorRespDto
if err != nil {
fmt.Println(err)
return nil
@@ -2148,15 +2755,14 @@ func (client *AuthenticationClient) CheckPermissionByArrayResource(reqDto *dto.C
}
return &response
}
-
/*
-* @summary 树类型资源鉴权
-* @description 树类型资源鉴权,支持用户对一个或者多个树资源进行权限判断
-* @returns CheckResourcePermissionsRespDto
- */
-func (client *AuthenticationClient) CheckPermissionByTreeResource(reqDto *dto.CheckPermissionTreeResourceDto) *dto.CheckResourcePermissionsRespDto {
- b, err := client.SendHttpRequest("/api/v3/check-permission-tree-resource", fasthttp.MethodPost, reqDto)
- var response dto.CheckResourcePermissionsRespDto
+ * @summary 获取可绑定的 MFA 认证要素
+ * @description 获取所有应用已经开启、用户暂未绑定的 MFA 认证要素,用户可以从返回的列表中绑定新的 MFA 认证要素。
+ * @returns ListFactorsToEnrollRespDto
+ */
+func (client *AuthenticationClient) ListFactorsToEnroll () *dto.ListFactorsToEnrollRespDto {
+ b, err := client.SendHttpRequest("/api/v3/list-factors-to-enroll", fasthttp.MethodGet, nil)
+ var response dto.ListFactorsToEnrollRespDto
if err != nil {
fmt.Println(err)
return nil
@@ -2168,15 +2774,15 @@ func (client *AuthenticationClient) CheckPermissionByTreeResource(reqDto *dto.Ch
}
return &response
}
-
/*
-* @summary 获取用户在登录应用下被授权资源列表
-* @description 获取用户指定资源权限列表,用户获取在某个应用下所拥有的资源列表
-* @returns GetUserAuthResourceListRespDto
- */
-func (client *AuthenticationClient) GetUserAuthorizedResourcesList() *dto.GetUserAuthResourceListRespDto {
- b, err := client.SendHttpRequest("/api/v3/get-user-auth-resource-list", fasthttp.MethodGet, nil)
- var response dto.GetUserAuthResourceListRespDto
+ * @summary 校验用户 MFA 绑定的 OTP
+ * @description 校验用户 MFA 绑定的 OTP。
+ * @returns MfaOtpVerityRespDto
+ */
+
+func (client *AuthenticationClient) MfaOtpVerify (reqDto *dto.MfaOtpVerityDto) *dto.MfaOtpVerityRespDto {
+ b, err := client.SendHttpRequest("/api/v3/mfa-totp-verify", fasthttp.MethodPost, reqDto)
+ var response dto.MfaOtpVerityRespDto
if err != nil {
fmt.Println(err)
return nil
diff --git a/dto/AddDepartmentMembersReqDto.go b/dto/AddDepartmentMembersReqDto.go
index af8245c..e5c47b0 100644
--- a/dto/AddDepartmentMembersReqDto.go
+++ b/dto/AddDepartmentMembersReqDto.go
@@ -1,9 +1,11 @@
package dto
-type AddDepartmentMembersReqDto struct {
- UserIds []string `json:"userIds"`
- OrganizationCode string `json:"organizationCode"`
- DepartmentId string `json:"departmentId"`
- DepartmentIdType string `json:"departmentIdType,omitempty"`
- TenantId string `json:"tenantId,omitempty"`
+
+type AddDepartmentMembersReqDto struct{
+ UserIds []string `json:"userIds"`
+ OrganizationCode string `json:"organizationCode"`
+ DepartmentId string `json:"departmentId"`
+ DepartmentIdType string `json:"departmentIdType,omitempty"`
+ TenantId string `json:"tenantId,omitempty"`
}
+
diff --git a/dto/AddTenantDepartmentMembersReqDto.go b/dto/AddTenantDepartmentMembersReqDto.go
new file mode 100644
index 0000000..42808b0
--- /dev/null
+++ b/dto/AddTenantDepartmentMembersReqDto.go
@@ -0,0 +1,12 @@
+package dto
+
+
+type AddTenantDepartmentMembersReqDto struct{
+ OrganizationCode string `json:"organizationCode"`
+ DepartmentId string `json:"departmentId"`
+ DepartmentIdType string `json:"departmentIdType,omitempty"`
+ LinkUserIds []string `json:"linkUserIds,omitempty"`
+ MemberIds []string `json:"memberIds,omitempty"`
+ TenantId string `json:"tenantId,omitempty"`
+}
+
diff --git a/dto/AddWhitelistDto.go b/dto/AddWhitelistDto.go
new file mode 100644
index 0000000..a951360
--- /dev/null
+++ b/dto/AddWhitelistDto.go
@@ -0,0 +1,8 @@
+package dto
+
+
+type AddWhitelistDto struct{
+ Type string `json:"type"`
+ List []string `json:"list,omitempty"`
+}
+
diff --git a/dto/AllOperateDto.go b/dto/AllOperateDto.go
new file mode 100644
index 0000000..7ed50d8
--- /dev/null
+++ b/dto/AllOperateDto.go
@@ -0,0 +1,7 @@
+package dto
+
+
+type AllOperateDto struct{
+ ModelId string `json:"modelId,omitempty"`
+}
+
diff --git a/dto/AppQRCodeLoginDto.go b/dto/AppQRCodeLoginDto.go
new file mode 100644
index 0000000..d32a5d9
--- /dev/null
+++ b/dto/AppQRCodeLoginDto.go
@@ -0,0 +1,8 @@
+package dto
+
+
+type AppQRCodeLoginDto struct{
+ Action string `json:"action"`
+ QrcodeId string `json:"qrcodeId"`
+}
+
diff --git a/dto/ApplicationMfaDto.go b/dto/ApplicationMfaDto.go
new file mode 100644
index 0000000..1782825
--- /dev/null
+++ b/dto/ApplicationMfaDto.go
@@ -0,0 +1,9 @@
+package dto
+
+
+type ApplicationMfaDto struct{
+ MfaPolicy string `json:"mfaPolicy"`
+ Status int `json:"status"`
+ Sort int `json:"sort"`
+}
+
diff --git a/dto/ApplicationTabMethodsSortConfigDto.go b/dto/ApplicationTabMethodsSortConfigDto.go
new file mode 100644
index 0000000..f4aaec8
--- /dev/null
+++ b/dto/ApplicationTabMethodsSortConfigDto.go
@@ -0,0 +1,6 @@
+package dto
+
+
+type ApplicationTabMethodsSortConfigDto struct{
+}
+
diff --git a/dto/ArrResourceAuthAction.go b/dto/ArrResourceAuthAction.go
index 9896a85..8f46c8a 100644
--- a/dto/ArrResourceAuthAction.go
+++ b/dto/ArrResourceAuthAction.go
@@ -1,6 +1,8 @@
package dto
-type ArrResourceAuthAction struct {
- Values []string `json:"values,omitempty"`
- Actions []string `json:"actions,omitempty"`
+
+type ArrResourceAuthAction struct{
+ Values []string `json:"values,omitempty"`
+ Actions []string `json:"actions,omitempty"`
}
+
diff --git a/dto/AsaAccountSingleNullableRespDto.go b/dto/AsaAccountSingleNullableRespDto.go
index 3563238..aa76588 100644
--- a/dto/AsaAccountSingleNullableRespDto.go
+++ b/dto/AsaAccountSingleNullableRespDto.go
@@ -1,9 +1,11 @@
package dto
-type AsaAccountSingleNullableRespDto struct {
- StatusCode int `json:"statusCode"`
- Message string `json:"message"`
- ApiCode int `json:"apiCode,omitempty"`
- RequestId string `json:"requestId,omitempty"`
- Data AsaAccountDto `json:"data"`
+
+type AsaAccountSingleNullableRespDto struct{
+ StatusCode int `json:"statusCode"`
+ Message string `json:"message"`
+ ApiCode int `json:"apiCode,omitempty"`
+ RequestId string `json:"requestId,omitempty"`
+ Data AsaAccountDto `json:"data"`
}
+
diff --git a/dto/AssignRoleBatchDto.go b/dto/AssignRoleBatchDto.go
index e408b8f..728dbb7 100644
--- a/dto/AssignRoleBatchDto.go
+++ b/dto/AssignRoleBatchDto.go
@@ -1,6 +1,8 @@
package dto
-type AssignRoleBatchDto struct {
- Targets []TargetDto `json:"targets"`
- Roles []RoleCodeDto `json:"roles"`
+
+type AssignRoleBatchDto struct{
+ Targets []TargetDto `json:"targets"`
+ Roles []RoleCodeDto `json:"roles"`
}
+
diff --git a/dto/AssignRoleDto.go b/dto/AssignRoleDto.go
index 20736af..3725497 100644
--- a/dto/AssignRoleDto.go
+++ b/dto/AssignRoleDto.go
@@ -1,9 +1,11 @@
package dto
-type AssignRoleDto struct {
- Targets []TargetDto `json:"targets"`
- Code string `json:"code"`
- EndTime int `json:"endTime,omitempty"`
- EnableTime int `json:"enableTime,omitempty"`
- Namespace string `json:"namespace,omitempty"`
+
+type AssignRoleDto struct{
+ Targets []TargetDto `json:"targets"`
+ Code string `json:"code"`
+ EndTime int `json:"endTime,omitempty"`
+ EnableTime int `json:"enableTime,omitempty"`
+ Namespace string `json:"namespace,omitempty"`
}
+
diff --git a/dto/AssociateTenantResourceDto.go b/dto/AssociateTenantResourceDto.go
index d4a085b..67ea66c 100644
--- a/dto/AssociateTenantResourceDto.go
+++ b/dto/AssociateTenantResourceDto.go
@@ -1,8 +1,10 @@
package dto
-type AssociateTenantResourceDto struct {
- Code string `json:"code"`
- Association bool `json:"association"`
- AppId string `json:"appId"`
- TenantId string `json:"tenantId,omitempty"`
+
+type AssociateTenantResourceDto struct{
+ Code string `json:"code"`
+ Association bool `json:"association"`
+ AppId string `json:"appId"`
+ TenantId string `json:"tenantId,omitempty"`
}
+
diff --git a/dto/AuthEnvParams.go b/dto/AuthEnvParams.go
index 53fd5ed..80d62e1 100644
--- a/dto/AuthEnvParams.go
+++ b/dto/AuthEnvParams.go
@@ -1,12 +1,14 @@
package dto
-type AuthEnvParams struct {
- Ip string `json:"ip,omitempty"`
- City string `json:"city,omitempty"`
- Province string `json:"province,omitempty"`
- Country string `json:"country,omitempty"`
- DeviceType string `json:"deviceType,omitempty"`
- SystemType string `json:"systemType,omitempty"`
- BrowserType string `json:"browserType,omitempty"`
- RequestDate string `json:"requestDate,omitempty"`
+
+type AuthEnvParams struct{
+ Ip string `json:"ip,omitempty"`
+ City string `json:"city,omitempty"`
+ Province string `json:"province,omitempty"`
+ Country string `json:"country,omitempty"`
+ DeviceType string `json:"deviceType,omitempty"`
+ SystemType string `json:"systemType,omitempty"`
+ BrowserType string `json:"browserType,omitempty"`
+ RequestDate string `json:"requestDate,omitempty"`
}
+
diff --git a/dto/AuthenticationCredentialDto.go b/dto/AuthenticationCredentialDto.go
new file mode 100644
index 0000000..73babd9
--- /dev/null
+++ b/dto/AuthenticationCredentialDto.go
@@ -0,0 +1,10 @@
+package dto
+
+
+type AuthenticationCredentialDto struct{
+ Id string `json:"id"`
+ RawId string `json:"rawId"`
+ Response AuthenticatorAssertionResponseDto `json:"response"`
+ Type string `json:"type"`
+}
+
diff --git a/dto/AuthenticationOptionsDto.go b/dto/AuthenticationOptionsDto.go
new file mode 100644
index 0000000..cb4c83f
--- /dev/null
+++ b/dto/AuthenticationOptionsDto.go
@@ -0,0 +1,8 @@
+package dto
+
+
+type AuthenticationOptionsDto struct{
+ AuthenticationOptions PublicKeyCredentialRequestOptionsDto `json:"authenticationOptions"`
+ Ticket string `json:"ticket"`
+}
+
diff --git a/dto/AuthenticatorAssertionResponseDto.go b/dto/AuthenticatorAssertionResponseDto.go
new file mode 100644
index 0000000..8e2ea08
--- /dev/null
+++ b/dto/AuthenticatorAssertionResponseDto.go
@@ -0,0 +1,10 @@
+package dto
+
+
+type AuthenticatorAssertionResponseDto struct{
+ AuthenticatorData string `json:"authenticatorData"`
+ ClientDataJSON string `json:"clientDataJSON"`
+ Signature string `json:"signature"`
+ UserHandle string `json:"userHandle"`
+}
+
diff --git a/dto/AuthenticatorAttestationResponseDto.go b/dto/AuthenticatorAttestationResponseDto.go
new file mode 100644
index 0000000..1729bf2
--- /dev/null
+++ b/dto/AuthenticatorAttestationResponseDto.go
@@ -0,0 +1,8 @@
+package dto
+
+
+type AuthenticatorAttestationResponseDto struct{
+ AttestationObject string `json:"attestationObject"`
+ ClientDataJSON string `json:"clientDataJSON"`
+}
+
diff --git a/dto/AuthorizeApplicationAccessDto.go b/dto/AuthorizeApplicationAccessDto.go
index d77772a..876f503 100644
--- a/dto/AuthorizeApplicationAccessDto.go
+++ b/dto/AuthorizeApplicationAccessDto.go
@@ -1,6 +1,8 @@
package dto
-type AuthorizeApplicationAccessDto struct {
- AppId string `json:"appId"`
- List []ApplicationPermissionRecordItem `json:"list"`
+
+type AuthorizeApplicationAccessDto struct{
+ AppId string `json:"appId"`
+ List []ApplicationPermissionRecordItem `json:"list"`
}
+
diff --git a/dto/BindByAccountIdInputApi.go b/dto/BindByAccountIdInputApi.go
new file mode 100644
index 0000000..2fab022
--- /dev/null
+++ b/dto/BindByAccountIdInputApi.go
@@ -0,0 +1,9 @@
+package dto
+
+
+type BindByAccountIdInputApi struct{
+ Key string `json:"key"`
+ Action string `json:"action"`
+ AccountId string `json:"accountId"`
+}
+
diff --git a/dto/BindByAccountInputApi.go b/dto/BindByAccountInputApi.go
new file mode 100644
index 0000000..a95fff4
--- /dev/null
+++ b/dto/BindByAccountInputApi.go
@@ -0,0 +1,10 @@
+package dto
+
+
+type BindByAccountInputApi struct{
+ Key string `json:"key"`
+ Action string `json:"action"`
+ Password string `json:"password"`
+ Account string `json:"account"`
+}
+
diff --git a/dto/BindByAccountsInputApi.go b/dto/BindByAccountsInputApi.go
new file mode 100644
index 0000000..633ab97
--- /dev/null
+++ b/dto/BindByAccountsInputApi.go
@@ -0,0 +1,9 @@
+package dto
+
+
+type BindByAccountsInputApi struct{
+ Key string `json:"key"`
+ Action string `json:"action"`
+ Account string `json:"account"`
+}
+
diff --git a/dto/BindByEmailCodeInputApi.go b/dto/BindByEmailCodeInputApi.go
new file mode 100644
index 0000000..cd9d86c
--- /dev/null
+++ b/dto/BindByEmailCodeInputApi.go
@@ -0,0 +1,10 @@
+package dto
+
+
+type BindByEmailCodeInputApi struct{
+ Key string `json:"key"`
+ Action string `json:"action"`
+ Code string `json:"code"`
+ Email string `json:"email"`
+}
+
diff --git a/dto/BindByPhoneCodeInputApi.go b/dto/BindByPhoneCodeInputApi.go
new file mode 100644
index 0000000..15caf9b
--- /dev/null
+++ b/dto/BindByPhoneCodeInputApi.go
@@ -0,0 +1,11 @@
+package dto
+
+
+type BindByPhoneCodeInputApi struct{
+ Key string `json:"key"`
+ Action string `json:"action"`
+ Code string `json:"code"`
+ Phone string `json:"phone"`
+ PhoneCountryCode string `json:"phoneCountryCode,omitempty"`
+}
+
diff --git a/dto/BindByRegiserInputApi.go b/dto/BindByRegiserInputApi.go
new file mode 100644
index 0000000..00f9652
--- /dev/null
+++ b/dto/BindByRegiserInputApi.go
@@ -0,0 +1,8 @@
+package dto
+
+
+type BindByRegiserInputApi struct{
+ Key string `json:"key"`
+ Action string `json:"action"`
+}
+
diff --git a/dto/CellDto.go b/dto/CellDto.go
new file mode 100644
index 0000000..2fcfff9
--- /dev/null
+++ b/dto/CellDto.go
@@ -0,0 +1,8 @@
+package dto
+
+
+type CellDto struct{
+ FieldId string `json:"fieldId"`
+ Value interface{} `json:"value"`
+}
+
diff --git a/dto/ChangeExtIdpAssociationStateDto.go b/dto/ChangeExtIdpAssociationStateDto.go
index e3b71c1..2b42fcb 100644
--- a/dto/ChangeExtIdpAssociationStateDto.go
+++ b/dto/ChangeExtIdpAssociationStateDto.go
@@ -1,7 +1,9 @@
package dto
-type ChangeExtIdpAssociationStateDto struct {
- Id string `json:"id"`
- Association bool `json:"association"`
- TenantId string `json:"tenantId,omitempty"`
+
+type ChangeExtIdpAssociationStateDto struct{
+ Id string `json:"id"`
+ Association bool `json:"association"`
+ TenantId string `json:"tenantId,omitempty"`
}
+
diff --git a/dto/ChangeExtIdpConnStateDto.go b/dto/ChangeExtIdpConnStateDto.go
index f917c89..4887827 100644
--- a/dto/ChangeExtIdpConnStateDto.go
+++ b/dto/ChangeExtIdpConnStateDto.go
@@ -1,9 +1,11 @@
package dto
-type ChangeExtIdpConnStateDto struct {
- Id string `json:"id"`
- Enabled bool `json:"enabled"`
- AppId string `json:"appId"`
- TenantId string `json:"tenantId,omitempty"`
- AppIds []string `json:"appIds,omitempty"`
+
+type ChangeExtIdpConnStateDto struct{
+ Id string `json:"id"`
+ Enabled bool `json:"enabled"`
+ AppId string `json:"appId"`
+ TenantId string `json:"tenantId,omitempty"`
+ AppIds []string `json:"appIds,omitempty"`
}
+
diff --git a/dto/ChangePushCodeStatusDto.go b/dto/ChangePushCodeStatusDto.go
new file mode 100644
index 0000000..16ddf44
--- /dev/null
+++ b/dto/ChangePushCodeStatusDto.go
@@ -0,0 +1,8 @@
+package dto
+
+
+type ChangePushCodeStatusDto struct{
+ Action string `json:"action"`
+ PushCodeId string `json:"pushCodeId"`
+}
+
diff --git a/dto/ChangeUserPoolTenantExtIdpConnDto.go b/dto/ChangeUserPoolTenantExtIdpConnDto.go
index 568f055..4a7f085 100644
--- a/dto/ChangeUserPoolTenantExtIdpConnDto.go
+++ b/dto/ChangeUserPoolTenantExtIdpConnDto.go
@@ -1,6 +1,8 @@
package dto
-type ChangeUserPoolTenantExtIdpConnDto struct {
- Enabled bool `json:"enabled"`
- ConnIds []string `json:"connIds"`
+
+type ChangeUserPoolTenantExtIdpConnDto struct{
+ Enabled bool `json:"enabled"`
+ ConnIds []string `json:"connIds"`
}
+
diff --git a/dto/CheckDeviceCredentialIdDto.go b/dto/CheckDeviceCredentialIdDto.go
new file mode 100644
index 0000000..001dd15
--- /dev/null
+++ b/dto/CheckDeviceCredentialIdDto.go
@@ -0,0 +1,6 @@
+package dto
+
+
+type CheckDeviceCredentialIdDto struct{
+}
+
diff --git a/dto/CheckExternalUserPermissionDataDto.go b/dto/CheckExternalUserPermissionDataDto.go
index d16e45f..37aef93 100644
--- a/dto/CheckExternalUserPermissionDataDto.go
+++ b/dto/CheckExternalUserPermissionDataDto.go
@@ -1,5 +1,7 @@
package dto
-type CheckExternalUserPermissionDataDto struct {
- CheckResultList []CheckExternalUserPermissionsRespDto `json:"checkResultList"`
+
+type CheckExternalUserPermissionDataDto struct{
+ CheckResultList []CheckExternalUserPermissionsRespDto `json:"checkResultList"`
}
+
diff --git a/dto/CheckExternalUserPermissionDto.go b/dto/CheckExternalUserPermissionDto.go
index 1f54b8b..e431002 100644
--- a/dto/CheckExternalUserPermissionDto.go
+++ b/dto/CheckExternalUserPermissionDto.go
@@ -1,10 +1,12 @@
package dto
-type CheckExternalUserPermissionDto struct {
- Resources []string `json:"resources"`
- Action string `json:"action"`
- ExternalId string `json:"externalId"`
- NamespaceCode string `json:"namespaceCode"`
- JudgeConditionEnabled bool `json:"judgeConditionEnabled,omitempty"`
- AuthEnvParams AuthEnvParams `json:"authEnvParams,omitempty"`
+
+type CheckExternalUserPermissionDto struct{
+ Resources []string `json:"resources"`
+ Action string `json:"action"`
+ ExternalId string `json:"externalId"`
+ NamespaceCode string `json:"namespaceCode"`
+ JudgeConditionEnabled bool `json:"judgeConditionEnabled,omitempty"`
+ AuthEnvParams AuthEnvParams `json:"authEnvParams,omitempty"`
}
+
diff --git a/dto/CheckExternalUserPermissionRespDto.go b/dto/CheckExternalUserPermissionRespDto.go
index 646c3da..f825e3e 100644
--- a/dto/CheckExternalUserPermissionRespDto.go
+++ b/dto/CheckExternalUserPermissionRespDto.go
@@ -1,8 +1,10 @@
package dto
-type CheckExternalUserPermissionRespDto struct {
- StatusCode int `json:"statusCode"`
- Message string `json:"message"`
- ApiCode int `json:"apiCode,omitempty"`
- Data CheckExternalUserPermissionDataDto `json:"data"`
+
+type CheckExternalUserPermissionRespDto struct{
+ StatusCode int `json:"statusCode"`
+ Message string `json:"message"`
+ ApiCode int `json:"apiCode,omitempty"`
+ Data CheckExternalUserPermissionDataDto `json:"data"`
}
+
diff --git a/dto/CheckExternalUserPermissionsRespDto.go b/dto/CheckExternalUserPermissionsRespDto.go
index dcbd5e5..cb5d981 100644
--- a/dto/CheckExternalUserPermissionsRespDto.go
+++ b/dto/CheckExternalUserPermissionsRespDto.go
@@ -1,8 +1,10 @@
package dto
-type CheckExternalUserPermissionsRespDto struct {
- NamespaceCode string `json:"namespaceCode"`
- Action string `json:"action"`
- Resource string `json:"resource"`
- Enabled bool `json:"enabled"`
+
+type CheckExternalUserPermissionsRespDto struct{
+ NamespaceCode string `json:"namespaceCode"`
+ Action string `json:"action"`
+ Resource string `json:"resource"`
+ Enabled bool `json:"enabled"`
}
+
diff --git a/dto/CheckParamsDataPolicyRespDto.go b/dto/CheckParamsDataPolicyRespDto.go
index b138e0c..2052d33 100644
--- a/dto/CheckParamsDataPolicyRespDto.go
+++ b/dto/CheckParamsDataPolicyRespDto.go
@@ -1,6 +1,8 @@
package dto
-type CheckParamsDataPolicyRespDto struct {
- IsValid bool `json:"isValid"`
- Message string `json:"message,omitempty"`
+
+type CheckParamsDataPolicyRespDto struct{
+ IsValid bool `json:"isValid"`
+ Message string `json:"message,omitempty"`
}
+
diff --git a/dto/CheckPermissionArrayResourceDto.go b/dto/CheckPermissionArrayResourceDto.go
index 0155f77..50d5ee7 100644
--- a/dto/CheckPermissionArrayResourceDto.go
+++ b/dto/CheckPermissionArrayResourceDto.go
@@ -1,6 +1,8 @@
package dto
-type CheckPermissionArrayResourceDto struct {
- Resources []string `json:"resources"`
- Action string `json:"action"`
+
+type CheckPermissionArrayResourceDto struct{
+ Resources []string `json:"resources"`
+ Action string `json:"action"`
}
+
diff --git a/dto/CheckPermissionDto.go b/dto/CheckPermissionDto.go
index 8114c8f..39765f6 100644
--- a/dto/CheckPermissionDto.go
+++ b/dto/CheckPermissionDto.go
@@ -1,10 +1,12 @@
package dto
-type CheckPermissionDto struct {
- Resources []string `json:"resources"`
- Action string `json:"action"`
- UserId string `json:"userId"`
- NamespaceCode string `json:"namespaceCode"`
- JudgeConditionEnabled bool `json:"judgeConditionEnabled,omitempty"`
- AuthEnvParams AuthEnvParams `json:"authEnvParams,omitempty"`
+
+type CheckPermissionDto struct{
+ Resources []string `json:"resources"`
+ Action string `json:"action"`
+ UserId string `json:"userId"`
+ NamespaceCode string `json:"namespaceCode"`
+ JudgeConditionEnabled bool `json:"judgeConditionEnabled,omitempty"`
+ AuthEnvParams AuthEnvParams `json:"authEnvParams,omitempty"`
}
+
diff --git a/dto/CheckPermissionStringResourceDto.go b/dto/CheckPermissionStringResourceDto.go
index 32cfb10..c8a73ca 100644
--- a/dto/CheckPermissionStringResourceDto.go
+++ b/dto/CheckPermissionStringResourceDto.go
@@ -1,6 +1,8 @@
package dto
-type CheckPermissionStringResourceDto struct {
- Resources []string `json:"resources"`
- Action string `json:"action"`
+
+type CheckPermissionStringResourceDto struct{
+ Resources []string `json:"resources"`
+ Action string `json:"action"`
}
+
diff --git a/dto/CheckPermissionTreeResourceDto.go b/dto/CheckPermissionTreeResourceDto.go
index 77b11a6..b223d85 100644
--- a/dto/CheckPermissionTreeResourceDto.go
+++ b/dto/CheckPermissionTreeResourceDto.go
@@ -1,6 +1,8 @@
package dto
-type CheckPermissionTreeResourceDto struct {
- Resources []string `json:"resources"`
- Action string `json:"action"`
+
+type CheckPermissionTreeResourceDto struct{
+ Resources []string `json:"resources"`
+ Action string `json:"action"`
}
+
diff --git a/dto/CheckPushCodeStatusDataDto.go b/dto/CheckPushCodeStatusDataDto.go
new file mode 100644
index 0000000..abcfcf7
--- /dev/null
+++ b/dto/CheckPushCodeStatusDataDto.go
@@ -0,0 +1,8 @@
+package dto
+
+
+type CheckPushCodeStatusDataDto struct{
+ Status string `json:"status"`
+ TokenSet LoginTokenResponseDataDto `json:"tokenSet,omitempty"`
+}
+
diff --git a/dto/CheckPushCodeStatusRespDto.go b/dto/CheckPushCodeStatusRespDto.go
new file mode 100644
index 0000000..8625336
--- /dev/null
+++ b/dto/CheckPushCodeStatusRespDto.go
@@ -0,0 +1,11 @@
+package dto
+
+
+type CheckPushCodeStatusRespDto struct{
+ StatusCode int `json:"statusCode"`
+ Message string `json:"message"`
+ ApiCode int `json:"apiCode,omitempty"`
+ RequestId string `json:"requestId,omitempty"`
+ Data CheckPushCodeStatusDataDto `json:"data"`
+}
+
diff --git a/dto/CheckPushcodeStatusDto.go b/dto/CheckPushcodeStatusDto.go
new file mode 100644
index 0000000..993b306
--- /dev/null
+++ b/dto/CheckPushcodeStatusDto.go
@@ -0,0 +1,7 @@
+package dto
+
+
+type CheckPushcodeStatusDto struct{
+ PushCodeId string `json:"pushCodeId,omitempty"`
+}
+
diff --git a/dto/CheckResourcePermissionDataDto.go b/dto/CheckResourcePermissionDataDto.go
index 0a9bb19..9180352 100644
--- a/dto/CheckResourcePermissionDataDto.go
+++ b/dto/CheckResourcePermissionDataDto.go
@@ -1,5 +1,7 @@
package dto
-type CheckResourcePermissionDataDto struct {
- CheckResultList []CheckResourcePermissionRespDto `json:"checkResultList"`
+
+type CheckResourcePermissionDataDto struct{
+ CheckResultList []CheckResourcePermissionRespDto `json:"checkResultList"`
}
+
diff --git a/dto/CheckResourcePermissionRespDto.go b/dto/CheckResourcePermissionRespDto.go
index 1d3eaaf..5e0acec 100644
--- a/dto/CheckResourcePermissionRespDto.go
+++ b/dto/CheckResourcePermissionRespDto.go
@@ -1,8 +1,10 @@
package dto
-type CheckResourcePermissionRespDto struct {
- NamespaceCode string `json:"namespaceCode"`
- Action string `json:"action"`
- Resource string `json:"resource"`
- Enabled bool `json:"enabled"`
+
+type CheckResourcePermissionRespDto struct{
+ NamespaceCode string `json:"namespaceCode"`
+ Action string `json:"action"`
+ Resource string `json:"resource"`
+ Enabled bool `json:"enabled"`
}
+
diff --git a/dto/CheckResourcePermissionsRespDto.go b/dto/CheckResourcePermissionsRespDto.go
index ab40e1a..05b8ac3 100644
--- a/dto/CheckResourcePermissionsRespDto.go
+++ b/dto/CheckResourcePermissionsRespDto.go
@@ -1,8 +1,11 @@
package dto
-type CheckResourcePermissionsRespDto struct {
- StatusCode int `json:"statusCode"`
- Message string `json:"message"`
- ApiCode int `json:"apiCode,omitempty"`
- Data CheckResourcePermissionDataDto `json:"data"`
+
+type CheckResourcePermissionsRespDto struct{
+ StatusCode int `json:"statusCode"`
+ Message string `json:"message"`
+ ApiCode int `json:"apiCode,omitempty"`
+ RequestId string `json:"requestId,omitempty"`
+ Data CheckResourcePermissionDataDto `json:"data"`
}
+
diff --git a/dto/CheckUserSameLevelPermissionDto.go b/dto/CheckUserSameLevelPermissionDto.go
index 6711a9d..ba0831d 100644
--- a/dto/CheckUserSameLevelPermissionDto.go
+++ b/dto/CheckUserSameLevelPermissionDto.go
@@ -1,11 +1,13 @@
package dto
-type CheckUserSameLevelPermissionDto struct {
- ResourceNodeCodes []string `json:"resourceNodeCodes"`
- Resource string `json:"resource"`
- Action string `json:"action"`
- UserId string `json:"userId"`
- NamespaceCode string `json:"namespaceCode"`
- JudgeConditionEnabled bool `json:"judgeConditionEnabled,omitempty"`
- AuthEnvParams AuthEnvParams `json:"authEnvParams,omitempty"`
+
+type CheckUserSameLevelPermissionDto struct{
+ ResourceNodeCodes []string `json:"resourceNodeCodes"`
+ Resource string `json:"resource"`
+ Action string `json:"action"`
+ UserId string `json:"userId"`
+ NamespaceCode string `json:"namespaceCode"`
+ JudgeConditionEnabled bool `json:"judgeConditionEnabled,omitempty"`
+ AuthEnvParams AuthEnvParams `json:"authEnvParams,omitempty"`
}
+
diff --git a/dto/CheckUserSameLevelPermissionRespDto.go b/dto/CheckUserSameLevelPermissionRespDto.go
index f235afe..96841ca 100644
--- a/dto/CheckUserSameLevelPermissionRespDto.go
+++ b/dto/CheckUserSameLevelPermissionRespDto.go
@@ -1,7 +1,9 @@
package dto
-type CheckUserSameLevelPermissionRespDto struct {
- Action string `json:"action"`
- ResourceNodeCode string `json:"resourceNodeCode"`
- Enabled bool `json:"enabled"`
+
+type CheckUserSameLevelPermissionRespDto struct{
+ Action string `json:"action"`
+ ResourceNodeCode string `json:"resourceNodeCode"`
+ Enabled bool `json:"enabled"`
}
+
diff --git a/dto/ClickCostContactDto.go b/dto/ClickCostContactDto.go
new file mode 100644
index 0000000..7aab6fe
--- /dev/null
+++ b/dto/ClickCostContactDto.go
@@ -0,0 +1,6 @@
+package dto
+
+
+type ClickCostContactDto struct{
+}
+
diff --git a/dto/Condition.go b/dto/Condition.go
new file mode 100644
index 0000000..cd64108
--- /dev/null
+++ b/dto/Condition.go
@@ -0,0 +1,9 @@
+package dto
+
+
+type Condition struct{
+ Key string `json:"key"`
+ Value interface{} `json:"value"`
+ Operator string `json:"operator"`
+}
+
diff --git a/dto/CountCustomFieldsDto.go b/dto/CountCustomFieldsDto.go
new file mode 100644
index 0000000..5267aff
--- /dev/null
+++ b/dto/CountCustomFieldsDto.go
@@ -0,0 +1,9 @@
+package dto
+
+
+type CountCustomFieldsDto struct{
+ All int `json:"all"`
+ UserVisible int `json:"userVisible"`
+ AdminVisible int `json:"adminVisible"`
+}
+
diff --git a/dto/CreateAccessKeyDto.go b/dto/CreateAccessKeyDto.go
index 341901f..4490e93 100644
--- a/dto/CreateAccessKeyDto.go
+++ b/dto/CreateAccessKeyDto.go
@@ -1,7 +1,9 @@
package dto
-type CreateAccessKeyDto struct {
- Type string `json:"type"`
- UserId string `json:"userId,omitempty"`
- TenantId string `json:"tenantId,omitempty"`
+
+type CreateAccessKeyDto struct{
+ Type string `json:"type"`
+ UserId string `json:"userId,omitempty"`
+ TenantId string `json:"tenantId,omitempty"`
}
+
diff --git a/dto/CreateAccessKeyRespDto.go b/dto/CreateAccessKeyRespDto.go
index a83ce3f..a455389 100644
--- a/dto/CreateAccessKeyRespDto.go
+++ b/dto/CreateAccessKeyRespDto.go
@@ -1,12 +1,14 @@
package dto
-type CreateAccessKeyRespDto struct {
- AccessKeyId string `json:"accessKeyId"`
- AccessKeySecret string `json:"accessKeySecret"`
- UserId string `json:"userId"`
- CreatedAt string `json:"createdAt"`
- Status string `json:"status"`
- LastDate string `json:"lastDate"`
- UserPoolId string `json:"userPoolId"`
- Enable bool `json:"enable"`
+
+type CreateAccessKeyRespDto struct{
+ AccessKeyId string `json:"accessKeyId"`
+ AccessKeySecret string `json:"accessKeySecret"`
+ UserId string `json:"userId"`
+ CreatedAt string `json:"createdAt"`
+ Status string `json:"status"`
+ LastDate string `json:"lastDate"`
+ UserPoolId string `json:"userPoolId"`
+ Enable bool `json:"enable"`
}
+
diff --git a/dto/CreateAdminRoleDto.go b/dto/CreateAdminRoleDto.go
new file mode 100644
index 0000000..075280a
--- /dev/null
+++ b/dto/CreateAdminRoleDto.go
@@ -0,0 +1,9 @@
+package dto
+
+
+type CreateAdminRoleDto struct{
+ Name string `json:"name"`
+ Code string `json:"code"`
+ Description string `json:"description,omitempty"`
+}
+
diff --git a/dto/CreateApplicationRespDataDto.go b/dto/CreateApplicationRespDataDto.go
index 1fc1852..67ca8c5 100644
--- a/dto/CreateApplicationRespDataDto.go
+++ b/dto/CreateApplicationRespDataDto.go
@@ -1,31 +1,33 @@
package dto
-type CreateApplicationRespDataDto struct {
- AppId string `json:"appId"`
- AppIdentifier string `json:"appIdentifier"`
- AppName string `json:"appName"`
- AppLogo string `json:"appLogo"`
- AppDescription string `json:"appDescription,omitempty"`
- AppType string `json:"appType"`
- UserPoolId string `json:"userPoolId"`
- IsIntegrateApp bool `json:"isIntegrateApp"`
- DefaultProtocol string `json:"defaultProtocol"`
- RedirectUris []string `json:"redirectUris"`
- LogoutRedirectUris []string `json:"logoutRedirectUris"`
- InitLoginUri string `json:"initLoginUri"`
- SsoEnabled bool `json:"ssoEnabled"`
- SsoEnabledAt string `json:"ssoEnabledAt,omitempty"`
- LoginConfig ApplicationLoginConfigDto `json:"loginConfig"`
- RegisterConfig ApplicationRegisterConfig `json:"registerConfig"`
- BrandingConfig ApplicationBrandingConfig `json:"brandingConfig"`
- OidcConfig OIDCConfig `json:"oidcConfig"`
- SamlProviderEnabled bool `json:"samlProviderEnabled"`
- SamlConfig SamlIdpConfig `json:"samlConfig,omitempty"`
- OauthProviderEnabled bool `json:"oauthProviderEnabled"`
- OauthConfig OauthIdpConfig `json:"oauthConfig,omitempty"`
- CasProviderEnabled bool `json:"casProviderEnabled"`
- CasConfig CasIdPConfig `json:"casConfig,omitempty"`
- CustomBrandingEnabled bool `json:"customBrandingEnabled"`
- CustomSecurityEnabled bool `json:"customSecurityEnabled"`
- Template string `json:"template,omitempty"`
+
+type CreateApplicationRespDataDto struct{
+ AppId string `json:"appId"`
+ AppIdentifier string `json:"appIdentifier"`
+ AppName string `json:"appName"`
+ AppLogo string `json:"appLogo"`
+ AppDescription string `json:"appDescription,omitempty"`
+ AppType string `json:"appType"`
+ UserPoolId string `json:"userPoolId"`
+ IsIntegrateApp bool `json:"isIntegrateApp"`
+ DefaultProtocol string `json:"defaultProtocol"`
+ RedirectUris []string `json:"redirectUris"`
+ LogoutRedirectUris []string `json:"logoutRedirectUris"`
+ InitLoginUri string `json:"initLoginUri"`
+ SsoEnabled bool `json:"ssoEnabled"`
+ SsoEnabledAt string `json:"ssoEnabledAt,omitempty"`
+ LoginConfig ApplicationLoginConfigDto `json:"loginConfig"`
+ RegisterConfig ApplicationRegisterConfig `json:"registerConfig"`
+ BrandingConfig ApplicationBrandingConfig `json:"brandingConfig"`
+ OidcConfig OIDCConfig `json:"oidcConfig"`
+ SamlProviderEnabled bool `json:"samlProviderEnabled"`
+ SamlConfig SamlIdpConfig `json:"samlConfig,omitempty"`
+ OauthProviderEnabled bool `json:"oauthProviderEnabled"`
+ OauthConfig OauthIdpConfig `json:"oauthConfig,omitempty"`
+ CasProviderEnabled bool `json:"casProviderEnabled"`
+ CasConfig CasIdPConfig `json:"casConfig,omitempty"`
+ CustomBrandingEnabled bool `json:"customBrandingEnabled"`
+ CustomSecurityEnabled bool `json:"customSecurityEnabled"`
+ Template string `json:"template,omitempty"`
}
+
diff --git a/dto/CreateApplicationRespDto.go b/dto/CreateApplicationRespDto.go
index 9fd8e6b..8e8da8d 100644
--- a/dto/CreateApplicationRespDto.go
+++ b/dto/CreateApplicationRespDto.go
@@ -1,9 +1,11 @@
package dto
-type CreateApplicationRespDto struct {
- StatusCode int `json:"statusCode"`
- Message string `json:"message"`
- ApiCode int `json:"apiCode,omitempty"`
- RequestId string `json:"requestId,omitempty"`
- Data CreateApplicationRespDataDto `json:"data"`
+
+type CreateApplicationRespDto struct{
+ StatusCode int `json:"statusCode"`
+ Message string `json:"message"`
+ ApiCode int `json:"apiCode,omitempty"`
+ RequestId string `json:"requestId,omitempty"`
+ Data CreateApplicationRespDataDto `json:"data"`
}
+
diff --git a/dto/CreateDataResourceDto.go b/dto/CreateDataResourceDto.go
index 9419c15..7139f77 100644
--- a/dto/CreateDataResourceDto.go
+++ b/dto/CreateDataResourceDto.go
@@ -1,11 +1,13 @@
package dto
-type CreateDataResourceDto struct {
- Actions []string `json:"actions"`
- Struct interface{} `json:"struct"`
- Type string `json:"type"`
- ResourceCode string `json:"resourceCode"`
- ResourceName string `json:"resourceName"`
- NamespaceCode string `json:"namespaceCode"`
- Description string `json:"description,omitempty"`
+
+type CreateDataResourceDto struct{
+ Actions []string `json:"actions"`
+ Struct interface{} `json:"struct"`
+ Type string `json:"type"`
+ ResourceCode string `json:"resourceCode"`
+ ResourceName string `json:"resourceName"`
+ NamespaceCode string `json:"namespaceCode"`
+ Description string `json:"description,omitempty"`
}
+
diff --git a/dto/CreateDataResourceRespDto.go b/dto/CreateDataResourceRespDto.go
index 30483f3..c0ae4d4 100644
--- a/dto/CreateDataResourceRespDto.go
+++ b/dto/CreateDataResourceRespDto.go
@@ -1,10 +1,12 @@
package dto
-type CreateDataResourceRespDto struct {
- ResourceName string `json:"resourceName"`
- ResourceCode string `json:"resourceCode"`
- Type string `json:"type"`
- Description string `json:"description,omitempty"`
- Struct interface{} `json:"struct"`
- Actions []string `json:"actions"`
+
+type CreateDataResourceRespDto struct{
+ ResourceName string `json:"resourceName"`
+ ResourceCode string `json:"resourceCode"`
+ Type string `json:"type"`
+ Description string `json:"description,omitempty"`
+ Struct interface{} `json:"struct"`
+ Actions []string `json:"actions"`
}
+
diff --git a/dto/CreateDepartmentReqDto.go b/dto/CreateDepartmentReqDto.go
index 7ee36ff..c5f7a4b 100644
--- a/dto/CreateDepartmentReqDto.go
+++ b/dto/CreateDepartmentReqDto.go
@@ -1,15 +1,19 @@
package dto
-type CreateDepartmentReqDto struct {
- OrganizationCode string `json:"organizationCode"`
- Name string `json:"name"`
- ParentDepartmentId string `json:"parentDepartmentId"`
- OpenDepartmentId string `json:"openDepartmentId,omitempty"`
- Description string `json:"description,omitempty"`
- Code string `json:"code,omitempty"`
- IsVirtualNode bool `json:"isVirtualNode,omitempty"`
- I18n DepartmentI18nDto `json:"i18n,omitempty"`
- CustomData interface{} `json:"customData,omitempty"`
- DepartmentIdType string `json:"departmentIdType,omitempty"`
- TenantId string `json:"tenantId,omitempty"`
+
+type CreateDepartmentReqDto struct{
+ OrganizationCode string `json:"organizationCode"`
+ Name string `json:"name"`
+ ParentDepartmentId string `json:"parentDepartmentId"`
+ Metadata interface{} `json:"metadata"`
+ OpenDepartmentId string `json:"openDepartmentId,omitempty"`
+ Description string `json:"description,omitempty"`
+ Code string `json:"code,omitempty"`
+ IsVirtualNode bool `json:"isVirtualNode,omitempty"`
+ I18n DepartmentI18nDto `json:"i18n,omitempty"`
+ CustomData interface{} `json:"customData,omitempty"`
+ DepartmentIdType string `json:"departmentIdType,omitempty"`
+ PostIdList []string `json:"postIdList,omitempty"`
+ TenantId string `json:"tenantId,omitempty"`
}
+
diff --git a/dto/CreateDepartmentTreeReqDto.go b/dto/CreateDepartmentTreeReqDto.go
index 28f643f..347a5f8 100644
--- a/dto/CreateDepartmentTreeReqDto.go
+++ b/dto/CreateDepartmentTreeReqDto.go
@@ -1,8 +1,10 @@
package dto
-type CreateDepartmentTreeReqDto struct {
- Name string `json:"name"`
- Children []string `json:"children,omitempty"`
- Members UserInfoDto `json:"members,omitempty"`
- TenantId string `json:"tenantId,omitempty"`
+
+type CreateDepartmentTreeReqDto struct{
+ Name string `json:"name"`
+ Children []string `json:"children,omitempty"`
+ Members UserInfoDto `json:"members,omitempty"`
+ TenantId string `json:"tenantId,omitempty"`
}
+
diff --git a/dto/CreateDepartmentTreeRespDto.go b/dto/CreateDepartmentTreeRespDto.go
index 5216df3..6122002 100644
--- a/dto/CreateDepartmentTreeRespDto.go
+++ b/dto/CreateDepartmentTreeRespDto.go
@@ -1,9 +1,11 @@
package dto
-type CreateDepartmentTreeRespDto struct {
- StatusCode int `json:"statusCode"`
- Message string `json:"message"`
- ApiCode int `json:"apiCode,omitempty"`
- RequestId string `json:"requestId,omitempty"`
- Data Result `json:"data"`
+
+type CreateDepartmentTreeRespDto struct{
+ StatusCode int `json:"statusCode"`
+ Message string `json:"message"`
+ ApiCode int `json:"apiCode,omitempty"`
+ RequestId string `json:"requestId,omitempty"`
+ Data Result `json:"data"`
}
+
diff --git a/dto/CreateEventAppDto.go b/dto/CreateEventAppDto.go
new file mode 100644
index 0000000..a9fa2b6
--- /dev/null
+++ b/dto/CreateEventAppDto.go
@@ -0,0 +1,9 @@
+package dto
+
+
+type CreateEventAppDto struct{
+ Logo string `json:"logo"`
+ Name string `json:"name"`
+ Identifier string `json:"identifier"`
+}
+
diff --git a/dto/CreateExtIdpConnDto.go b/dto/CreateExtIdpConnDto.go
index f71abf3..ee16410 100644
--- a/dto/CreateExtIdpConnDto.go
+++ b/dto/CreateExtIdpConnDto.go
@@ -1,12 +1,14 @@
package dto
-type CreateExtIdpConnDto struct {
- ExtIdpId string `json:"extIdpId"`
- Type string `json:"type"`
- Identifier string `json:"identifier"`
- DisplayName string `json:"displayName"`
- Fields interface{} `json:"fields"`
- LoginOnly bool `json:"loginOnly,omitempty"`
- Logo string `json:"logo,omitempty"`
- TenantId string `json:"tenantId,omitempty"`
+
+type CreateExtIdpConnDto struct{
+ ExtIdpId string `json:"extIdpId"`
+ Type string `json:"type"`
+ Identifier string `json:"identifier"`
+ DisplayName string `json:"displayName"`
+ Fields interface{} `json:"fields"`
+ LoginOnly bool `json:"loginOnly,omitempty"`
+ Logo string `json:"logo,omitempty"`
+ TenantId string `json:"tenantId,omitempty"`
}
+
diff --git a/dto/CreateExtIdpDto.go b/dto/CreateExtIdpDto.go
index 17eec57..4fc1f94 100644
--- a/dto/CreateExtIdpDto.go
+++ b/dto/CreateExtIdpDto.go
@@ -1,7 +1,9 @@
package dto
-type CreateExtIdpDto struct {
- Name string `json:"name"`
- Type string `json:"type"`
- TenantId string `json:"tenantId,omitempty"`
+
+type CreateExtIdpDto struct{
+ Name string `json:"name"`
+ Type string `json:"type"`
+ TenantId string `json:"tenantId,omitempty"`
}
+
diff --git a/dto/CreateFunctionModelDto.go b/dto/CreateFunctionModelDto.go
new file mode 100644
index 0000000..9898c5b
--- /dev/null
+++ b/dto/CreateFunctionModelDto.go
@@ -0,0 +1,12 @@
+package dto
+
+
+type CreateFunctionModelDto struct{
+ ParentKey string `json:"parentKey"`
+ Enable bool `json:"enable"`
+ Type string `json:"type"`
+ Description string `json:"description"`
+ Name string `json:"name"`
+ DataType string `json:"dataType,omitempty"`
+}
+
diff --git a/dto/CreateFunctionModelFieldDto.go b/dto/CreateFunctionModelFieldDto.go
new file mode 100644
index 0000000..7b697ac
--- /dev/null
+++ b/dto/CreateFunctionModelFieldDto.go
@@ -0,0 +1,29 @@
+package dto
+
+
+type CreateFunctionModelFieldDto struct{
+ UserVisible bool `json:"userVisible"`
+ RelationOptionalRange Condition `json:"relationOptionalRange"`
+ RelationShowKey string `json:"relationShowKey"`
+ RelationMultiple bool `json:"relationMultiple"`
+ RelationType string `json:"relationType"`
+ ForLogin bool `json:"forLogin"`
+ FuzzySearch bool `json:"fuzzySearch"`
+ DropDown DropDownItemDto `json:"dropDown"`
+ Format int `json:"format"`
+ Regexp string `json:"regexp"`
+ Min int `json:"min"`
+ Max int `json:"max"`
+ MaxLength int `json:"maxLength"`
+ Unique bool `json:"unique"`
+ Require bool `json:"require"`
+ Default interface{} `json:"default"`
+ Help string `json:"help"`
+ Editable bool `json:"editable"`
+ Show bool `json:"show"`
+ Type string `json:"type"`
+ Key string `json:"key"`
+ Name string `json:"name"`
+ ModelId string `json:"modelId"`
+}
+
diff --git a/dto/CreateGroupReqDto.go b/dto/CreateGroupReqDto.go
index 31d9816..586e51b 100644
--- a/dto/CreateGroupReqDto.go
+++ b/dto/CreateGroupReqDto.go
@@ -6,5 +6,6 @@ type CreateGroupReqDto struct{
Description string `json:"description"`
Name string `json:"name"`
Code string `json:"code"`
+ CustomData interface{} `json:"customData,omitempty"`
}
diff --git a/dto/CreateIdentityDto.go b/dto/CreateIdentityDto.go
index daf7190..f6afafc 100644
--- a/dto/CreateIdentityDto.go
+++ b/dto/CreateIdentityDto.go
@@ -1,12 +1,14 @@
package dto
-type CreateIdentityDto struct {
- ExtIdpId string `json:"extIdpId"`
- Provider string `json:"provider"`
- Type string `json:"type"`
- UserIdInIdp string `json:"userIdInIdp"`
- UserInfoInIdp User `json:"userInfoInIdp"`
- AccessToken string `json:"accessToken,omitempty"`
- RefreshToken string `json:"refreshToken,omitempty"`
- OriginConnIds []string `json:"originConnIds"`
+
+type CreateIdentityDto struct{
+ ExtIdpId string `json:"extIdpId"`
+ Provider string `json:"provider"`
+ Type string `json:"type"`
+ UserIdInIdp string `json:"userIdInIdp"`
+ UserInfoInIdp interface{} `json:"userInfoInIdp"`
+ AccessToken string `json:"accessToken,omitempty"`
+ RefreshToken string `json:"refreshToken,omitempty"`
+ OriginConnIds []string `json:"originConnIds"`
}
+
diff --git a/dto/CreateMultipleTenantAdminDto.go b/dto/CreateMultipleTenantAdminDto.go
new file mode 100644
index 0000000..923d786
--- /dev/null
+++ b/dto/CreateMultipleTenantAdminDto.go
@@ -0,0 +1,11 @@
+package dto
+
+
+type CreateMultipleTenantAdminDto struct{
+ TenantIds []string `json:"tenantIds"`
+ UserId string `json:"userId"`
+ ApiAuthorized bool `json:"apiAuthorized,omitempty"`
+ SendPhoneNotification bool `json:"sendPhoneNotification,omitempty"`
+ SendEmailNotification bool `json:"sendEmailNotification,omitempty"`
+}
+
diff --git a/dto/CreateOperateModelDto.go b/dto/CreateOperateModelDto.go
new file mode 100644
index 0000000..f8c36c3
--- /dev/null
+++ b/dto/CreateOperateModelDto.go
@@ -0,0 +1,12 @@
+package dto
+
+
+type CreateOperateModelDto struct{
+ Show bool `json:"show"`
+ Icon string `json:"icon"`
+ Config interface{} `json:"config"`
+ OperateName string `json:"operateName"`
+ OperateKey string `json:"operateKey"`
+ ModelId string `json:"modelId"`
+}
+
diff --git a/dto/CreateOrUpdateGroupDataDto.go b/dto/CreateOrUpdateGroupDataDto.go
new file mode 100644
index 0000000..bab28fe
--- /dev/null
+++ b/dto/CreateOrUpdateGroupDataDto.go
@@ -0,0 +1,8 @@
+package dto
+
+
+type CreateOrUpdateGroupDataDto struct{
+ Created bool `json:"created"`
+ Data GroupDto `json:"data"`
+}
+
diff --git a/dto/CreateOrUpdateGroupReqDto.go b/dto/CreateOrUpdateGroupReqDto.go
new file mode 100644
index 0000000..b07b2b1
--- /dev/null
+++ b/dto/CreateOrUpdateGroupReqDto.go
@@ -0,0 +1,10 @@
+package dto
+
+
+type CreateOrUpdateGroupReqDto struct{
+ Type string `json:"type"`
+ Description string `json:"description"`
+ Name string `json:"name"`
+ Code string `json:"code"`
+}
+
diff --git a/dto/CreateOrUpdateGroupRespDto.go b/dto/CreateOrUpdateGroupRespDto.go
new file mode 100644
index 0000000..c9488dd
--- /dev/null
+++ b/dto/CreateOrUpdateGroupRespDto.go
@@ -0,0 +1,11 @@
+package dto
+
+
+type CreateOrUpdateGroupRespDto struct{
+ StatusCode int `json:"statusCode"`
+ Message string `json:"message"`
+ ApiCode int `json:"apiCode,omitempty"`
+ RequestId string `json:"requestId,omitempty"`
+ Data CreateOrUpdateGroupDataDto `json:"data"`
+}
+
diff --git a/dto/CreateOrganizationReqDto.go b/dto/CreateOrganizationReqDto.go
index bb36af9..5705738 100644
--- a/dto/CreateOrganizationReqDto.go
+++ b/dto/CreateOrganizationReqDto.go
@@ -1,10 +1,14 @@
package dto
-type CreateOrganizationReqDto struct {
- OrganizationName string `json:"organizationName"`
- OrganizationCode string `json:"organizationCode"`
- Description string `json:"description,omitempty"`
- OpenDepartmentId string `json:"openDepartmentId,omitempty"`
- I18n OrganizationNameI18nDto `json:"i18n,omitempty"`
- TenantId string `json:"tenantId,omitempty"`
+
+type CreateOrganizationReqDto struct{
+ Metadata interface{} `json:"metadata"`
+ OrganizationName string `json:"organizationName"`
+ OrganizationCode string `json:"organizationCode"`
+ Description string `json:"description,omitempty"`
+ OpenDepartmentId string `json:"openDepartmentId,omitempty"`
+ I18n OrganizationNameI18nDto `json:"i18n,omitempty"`
+ TenantId string `json:"tenantId,omitempty"`
+ PostIdList []string `json:"postIdList,omitempty"`
}
+
diff --git a/dto/CreatePostDto.go b/dto/CreatePostDto.go
new file mode 100644
index 0000000..94cd314
--- /dev/null
+++ b/dto/CreatePostDto.go
@@ -0,0 +1,10 @@
+package dto
+
+
+type CreatePostDto struct{
+ Code string `json:"code"`
+ Name string `json:"name"`
+ Description string `json:"description,omitempty"`
+ DepartmentIdList string `json:"departmentIdList,omitempty"`
+}
+
diff --git a/dto/CreatePostRespDto.go b/dto/CreatePostRespDto.go
new file mode 100644
index 0000000..afa565b
--- /dev/null
+++ b/dto/CreatePostRespDto.go
@@ -0,0 +1,11 @@
+package dto
+
+
+type CreatePostRespDto struct{
+ StatusCode int `json:"statusCode"`
+ Message string `json:"message"`
+ ApiCode int `json:"apiCode,omitempty"`
+ RequestId string `json:"requestId,omitempty"`
+ Data PostInfoDto `json:"data"`
+}
+
diff --git a/dto/CreatePublicAccountBatchReqDto.go b/dto/CreatePublicAccountBatchReqDto.go
new file mode 100644
index 0000000..18a7899
--- /dev/null
+++ b/dto/CreatePublicAccountBatchReqDto.go
@@ -0,0 +1,8 @@
+package dto
+
+
+type CreatePublicAccountBatchReqDto struct{
+ List []CreatePublicAccountReqDto `json:"list"`
+ Options CreatePublicAccountOptionsDto `json:"options,omitempty"`
+}
+
diff --git a/dto/CreatePublicAccountFromUserDto.go b/dto/CreatePublicAccountFromUserDto.go
new file mode 100644
index 0000000..aa15b44
--- /dev/null
+++ b/dto/CreatePublicAccountFromUserDto.go
@@ -0,0 +1,7 @@
+package dto
+
+
+type CreatePublicAccountFromUserDto struct{
+ UserId string `json:"userId"`
+}
+
diff --git a/dto/CreatePublicAccountOptionsDto.go b/dto/CreatePublicAccountOptionsDto.go
new file mode 100644
index 0000000..4343e79
--- /dev/null
+++ b/dto/CreatePublicAccountOptionsDto.go
@@ -0,0 +1,12 @@
+package dto
+
+
+type CreatePublicAccountOptionsDto struct{
+ KeepPassword bool `json:"keepPassword,omitempty"`
+ AutoGeneratePassword bool `json:"autoGeneratePassword,omitempty"`
+ ResetPasswordOnFirstLogin bool `json:"resetPasswordOnFirstLogin,omitempty"`
+ DepartmentIdType string `json:"departmentIdType,omitempty"`
+ SendNotification SendCreateAccountNotificationDto `json:"sendNotification,omitempty"`
+ PasswordEncryptType string `json:"passwordEncryptType,omitempty"`
+}
+
diff --git a/dto/CreatePublicAccountOtpDto.go b/dto/CreatePublicAccountOtpDto.go
new file mode 100644
index 0000000..8479dae
--- /dev/null
+++ b/dto/CreatePublicAccountOtpDto.go
@@ -0,0 +1,8 @@
+package dto
+
+
+type CreatePublicAccountOtpDto struct{
+ Secret string `json:"secret"`
+ RecoveryCode string `json:"recoveryCode,omitempty"`
+}
+
diff --git a/dto/CreatePublicAccountReqDto.go b/dto/CreatePublicAccountReqDto.go
new file mode 100644
index 0000000..d89ce85
--- /dev/null
+++ b/dto/CreatePublicAccountReqDto.go
@@ -0,0 +1,45 @@
+package dto
+
+
+type CreatePublicAccountReqDto struct{
+ Status string `json:"status,omitempty"`
+ Email string `json:"email,omitempty"`
+ Phone string `json:"phone,omitempty"`
+ PhoneCountryCode string `json:"phoneCountryCode,omitempty"`
+ Username string `json:"username,omitempty"`
+ ExternalId string `json:"externalId,omitempty"`
+ Name string `json:"name,omitempty"`
+ Nickname string `json:"nickname,omitempty"`
+ Photo string `json:"photo,omitempty"`
+ Gender string `json:"gender,omitempty"`
+ EmailVerified bool `json:"emailVerified,omitempty"`
+ PhoneVerified bool `json:"phoneVerified,omitempty"`
+ Birthdate string `json:"birthdate,omitempty"`
+ Country string `json:"country,omitempty"`
+ Province string `json:"province,omitempty"`
+ City string `json:"city,omitempty"`
+ Address string `json:"address,omitempty"`
+ StreetAddress string `json:"streetAddress,omitempty"`
+ PostalCode string `json:"postalCode,omitempty"`
+ Company string `json:"company,omitempty"`
+ Browser string `json:"browser,omitempty"`
+ Device string `json:"device,omitempty"`
+ GivenName string `json:"givenName,omitempty"`
+ FamilyName string `json:"familyName,omitempty"`
+ MiddleName string `json:"middleName,omitempty"`
+ Profile string `json:"profile,omitempty"`
+ PreferredUsername string `json:"preferredUsername,omitempty"`
+ Website string `json:"website,omitempty"`
+ Zoneinfo string `json:"zoneinfo,omitempty"`
+ Locale string `json:"locale,omitempty"`
+ Formatted string `json:"formatted,omitempty"`
+ Region string `json:"region,omitempty"`
+ Password string `json:"password,omitempty"`
+ Salt string `json:"salt,omitempty"`
+ Otp CreatePublicAccountOtpDto `json:"otp,omitempty"`
+ DepartmentIds []string `json:"departmentIds,omitempty"`
+ CustomData interface{} `json:"customData,omitempty"`
+ IdentityNumber string `json:"identityNumber,omitempty"`
+ Options CreatePublicAccountOptionsDto `json:"options,omitempty"`
+}
+
diff --git a/dto/CreateRelationValueDto.go b/dto/CreateRelationValueDto.go
new file mode 100644
index 0000000..a3f618e
--- /dev/null
+++ b/dto/CreateRelationValueDto.go
@@ -0,0 +1,10 @@
+package dto
+
+
+type CreateRelationValueDto struct{
+ ValueList []string `json:"valueList"`
+ RowId string `json:"rowId"`
+ FieldId string `json:"fieldId"`
+ ModelId string `json:"modelId"`
+}
+
diff --git a/dto/CreateRowDto.go b/dto/CreateRowDto.go
new file mode 100644
index 0000000..ecb6bd3
--- /dev/null
+++ b/dto/CreateRowDto.go
@@ -0,0 +1,9 @@
+package dto
+
+
+type CreateRowDto struct{
+ Data interface{} `json:"data"`
+ ModelId string `json:"modelId"`
+ RowId string `json:"rowId,omitempty"`
+}
+
diff --git a/dto/CreateTenantCooperatorDto.go b/dto/CreateTenantCooperatorDto.go
new file mode 100644
index 0000000..2a9da14
--- /dev/null
+++ b/dto/CreateTenantCooperatorDto.go
@@ -0,0 +1,11 @@
+package dto
+
+
+type CreateTenantCooperatorDto struct{
+ Policies []string `json:"policies"`
+ UserId string `json:"userId"`
+ ApiAuthorized bool `json:"apiAuthorized,omitempty"`
+ SendPhoneNotification bool `json:"sendPhoneNotification,omitempty"`
+ SendEmailNotification bool `json:"sendEmailNotification,omitempty"`
+}
+
diff --git a/dto/CreateTenantDto.go b/dto/CreateTenantDto.go
index ab21b98..4e468d9 100644
--- a/dto/CreateTenantDto.go
+++ b/dto/CreateTenantDto.go
@@ -2,10 +2,16 @@ package dto
type CreateTenantDto struct{
- RejectHint string `json:"rejectHint"`
- AppIds []string `json:"appIds"`
Name string `json:"name"`
+ AppIds []string `json:"appIds"`
Logo []string `json:"logo,omitempty"`
Description string `json:"description,omitempty"`
+ RejectHint string `json:"rejectHint,omitempty"`
+ SourceAppId string `json:"sourceAppId,omitempty"`
+ EnterpriseDomains []string `json:"enterpriseDomains,omitempty"`
+ ExpireTime string `json:"expireTime,omitempty"`
+ MauAmount int `json:"mauAmount,omitempty"`
+ MemberAmount int `json:"memberAmount,omitempty"`
+ AdminAmount int `json:"adminAmount,omitempty"`
}
diff --git a/dto/CreateTenantRespDto.go b/dto/CreateTenantRespDto.go
new file mode 100644
index 0000000..1164585
--- /dev/null
+++ b/dto/CreateTenantRespDto.go
@@ -0,0 +1,11 @@
+package dto
+
+
+type CreateTenantRespDto struct{
+ StatusCode int `json:"statusCode"`
+ Message string `json:"message"`
+ ApiCode int `json:"apiCode,omitempty"`
+ RequestId string `json:"requestId,omitempty"`
+ Data TenantDto `json:"data"`
+}
+
diff --git a/dto/CreateTenantUserOptionsDto.go b/dto/CreateTenantUserOptionsDto.go
new file mode 100644
index 0000000..9e9130a
--- /dev/null
+++ b/dto/CreateTenantUserOptionsDto.go
@@ -0,0 +1,10 @@
+package dto
+
+
+type CreateTenantUserOptionsDto struct{
+ KeepPassword bool `json:"keepPassword,omitempty"`
+ AutoGeneratePassword bool `json:"autoGeneratePassword,omitempty"`
+ ResetPasswordOnFirstLogin bool `json:"resetPasswordOnFirstLogin,omitempty"`
+ PasswordEncryptType string `json:"passwordEncryptType,omitempty"`
+}
+
diff --git a/dto/CreateTenantUserReqDto.go b/dto/CreateTenantUserReqDto.go
new file mode 100644
index 0000000..bb08275
--- /dev/null
+++ b/dto/CreateTenantUserReqDto.go
@@ -0,0 +1,29 @@
+package dto
+
+
+type CreateTenantUserReqDto struct{
+ TenantId string `json:"tenantId"`
+ Gender string `json:"gender"`
+ Email string `json:"email,omitempty"`
+ Phone string `json:"phone,omitempty"`
+ PhoneCountryCode string `json:"phoneCountryCode,omitempty"`
+ Username string `json:"username,omitempty"`
+ Name string `json:"name,omitempty"`
+ Nickname string `json:"nickname,omitempty"`
+ Photo string `json:"photo,omitempty"`
+ Birthdate string `json:"birthdate,omitempty"`
+ Country string `json:"country,omitempty"`
+ Province string `json:"province,omitempty"`
+ City string `json:"city,omitempty"`
+ Address string `json:"address,omitempty"`
+ StreetAddress string `json:"streetAddress,omitempty"`
+ PostalCode string `json:"postalCode,omitempty"`
+ GivenName string `json:"givenName,omitempty"`
+ FamilyName string `json:"familyName,omitempty"`
+ MiddleName string `json:"middleName,omitempty"`
+ PreferredUsername string `json:"preferredUsername,omitempty"`
+ Password string `json:"password,omitempty"`
+ Salt string `json:"salt,omitempty"`
+ Options CreateTenantUserOptionsDto `json:"options,omitempty"`
+}
+
diff --git a/dto/CreateTerminalDto.go b/dto/CreateTerminalDto.go
new file mode 100644
index 0000000..4b037a6
--- /dev/null
+++ b/dto/CreateTerminalDto.go
@@ -0,0 +1,24 @@
+package dto
+
+
+type CreateTerminalDto struct{
+ DeviceUniqueId string `json:"deviceUniqueId"`
+ Type string `json:"type"`
+ CustomData interface{} `json:"customData"`
+ Name string `json:"name,omitempty"`
+ Version string `json:"version,omitempty"`
+ Hks string `json:"hks,omitempty"`
+ Fde string `json:"fde,omitempty"`
+ Hor bool `json:"hor,omitempty"`
+ Sn string `json:"sn,omitempty"`
+ Producer string `json:"producer,omitempty"`
+ Mod string `json:"mod,omitempty"`
+ Os string `json:"os,omitempty"`
+ Imei string `json:"imei,omitempty"`
+ Meid string `json:"meid,omitempty"`
+ Description string `json:"description,omitempty"`
+ Language string `json:"language,omitempty"`
+ Cookie bool `json:"cookie,omitempty"`
+ UserAgent string `json:"userAgent,omitempty"`
+}
+
diff --git a/dto/CreateUEBADto.go b/dto/CreateUEBADto.go
new file mode 100644
index 0000000..074ae70
--- /dev/null
+++ b/dto/CreateUEBADto.go
@@ -0,0 +1,8 @@
+package dto
+
+
+type CreateUEBADto struct{
+ Data interface{} `json:"data"`
+ ModelId string `json:"modelId,omitempty"`
+}
+
diff --git a/dto/CreateUEBARespDto.go b/dto/CreateUEBARespDto.go
new file mode 100644
index 0000000..2198ae7
--- /dev/null
+++ b/dto/CreateUEBARespDto.go
@@ -0,0 +1,11 @@
+package dto
+
+
+type CreateUEBARespDto struct{
+ StatusCode int `json:"statusCode"`
+ Message string `json:"message"`
+ ApiCode int `json:"apiCode,omitempty"`
+ RequestId string `json:"requestId,omitempty"`
+ Data interface{} `json:"data"`
+}
+
diff --git a/dto/CreateUserInfoDto.go b/dto/CreateUserInfoDto.go
index 34ddeeb..cc38f64 100644
--- a/dto/CreateUserInfoDto.go
+++ b/dto/CreateUserInfoDto.go
@@ -40,6 +40,8 @@ type CreateUserInfoDto struct{
Otp CreateUserOtpDto `json:"otp,omitempty"`
DepartmentIds []string `json:"departmentIds,omitempty"`
CustomData interface{} `json:"customData,omitempty"`
+ MetadataSource interface{} `json:"metadataSource,omitempty"`
Identities []CreateIdentityDto `json:"identities,omitempty"`
+ IdentityNumber string `json:"identityNumber,omitempty"`
}
diff --git a/dto/CreateUserReqDto.go b/dto/CreateUserReqDto.go
index 167b5b4..fad7ea1 100644
--- a/dto/CreateUserReqDto.go
+++ b/dto/CreateUserReqDto.go
@@ -40,7 +40,9 @@ type CreateUserReqDto struct{
Otp CreateUserOtpDto `json:"otp,omitempty"`
DepartmentIds []string `json:"departmentIds,omitempty"`
CustomData interface{} `json:"customData,omitempty"`
+ MetadataSource interface{} `json:"metadataSource,omitempty"`
Identities []CreateIdentityDto `json:"identities,omitempty"`
+ IdentityNumber string `json:"identityNumber,omitempty"`
Options CreateUserOptionsDto `json:"options,omitempty"`
}
diff --git a/dto/DefineEventDto.go b/dto/DefineEventDto.go
new file mode 100644
index 0000000..ab85245
--- /dev/null
+++ b/dto/DefineEventDto.go
@@ -0,0 +1,8 @@
+package dto
+
+
+type DefineEventDto struct{
+ EventDescription string `json:"eventDescription"`
+ EventType string `json:"eventType"`
+}
+
diff --git a/dto/DeleteAdminRoleDto.go b/dto/DeleteAdminRoleDto.go
new file mode 100644
index 0000000..4753c52
--- /dev/null
+++ b/dto/DeleteAdminRoleDto.go
@@ -0,0 +1,7 @@
+package dto
+
+
+type DeleteAdminRoleDto struct{
+ CodeList []string `json:"codeList"`
+}
+
diff --git a/dto/DeleteCustomFieldDto.go b/dto/DeleteCustomFieldDto.go
new file mode 100644
index 0000000..4cee343
--- /dev/null
+++ b/dto/DeleteCustomFieldDto.go
@@ -0,0 +1,8 @@
+package dto
+
+
+type DeleteCustomFieldDto struct{
+ TargetType string `json:"targetType"`
+ Key string `json:"key"`
+}
+
diff --git a/dto/DeleteCustomFieldsReqDto.go b/dto/DeleteCustomFieldsReqDto.go
new file mode 100644
index 0000000..9e6601d
--- /dev/null
+++ b/dto/DeleteCustomFieldsReqDto.go
@@ -0,0 +1,8 @@
+package dto
+
+
+type DeleteCustomFieldsReqDto struct{
+ TenantId string `json:"tenantId"`
+ List []DeleteCustomFieldDto `json:"list"`
+}
+
diff --git a/dto/DeleteDepartmentReqDto.go b/dto/DeleteDepartmentReqDto.go
index fb963f9..39fba34 100644
--- a/dto/DeleteDepartmentReqDto.go
+++ b/dto/DeleteDepartmentReqDto.go
@@ -1,8 +1,10 @@
package dto
-type DeleteDepartmentReqDto struct {
- OrganizationCode string `json:"organizationCode"`
- DepartmentId string `json:"departmentId"`
- DepartmentIdType string `json:"departmentIdType,omitempty"`
- TenantId string `json:"tenantId,omitempty"`
+
+type DeleteDepartmentReqDto struct{
+ OrganizationCode string `json:"organizationCode"`
+ DepartmentId string `json:"departmentId"`
+ DepartmentIdType string `json:"departmentIdType,omitempty"`
+ TenantId string `json:"tenantId,omitempty"`
}
+
diff --git a/dto/DeleteDepartmentSyncRelationReqDto.go b/dto/DeleteDepartmentSyncRelationReqDto.go
new file mode 100644
index 0000000..9ba480f
--- /dev/null
+++ b/dto/DeleteDepartmentSyncRelationReqDto.go
@@ -0,0 +1,10 @@
+package dto
+
+
+type DeleteDepartmentSyncRelationReqDto struct{
+ Provider string `json:"provider"`
+ DepartmentId string `json:"departmentId"`
+ OrganizationCode string `json:"organizationCode"`
+ DepartmentIdType string `json:"departmentIdType,omitempty"`
+}
+
diff --git a/dto/DeleteExtIdpConnDto.go b/dto/DeleteExtIdpConnDto.go
index e3c91be..166b545 100644
--- a/dto/DeleteExtIdpConnDto.go
+++ b/dto/DeleteExtIdpConnDto.go
@@ -1,6 +1,8 @@
package dto
-type DeleteExtIdpConnDto struct {
- Id string `json:"id"`
- TenantId string `json:"tenantId,omitempty"`
+
+type DeleteExtIdpConnDto struct{
+ Id string `json:"id"`
+ TenantId string `json:"tenantId,omitempty"`
}
+
diff --git a/dto/DeleteExtIdpDto.go b/dto/DeleteExtIdpDto.go
index 2a194b0..1df7843 100644
--- a/dto/DeleteExtIdpDto.go
+++ b/dto/DeleteExtIdpDto.go
@@ -1,6 +1,8 @@
package dto
-type DeleteExtIdpDto struct {
- Id string `json:"id"`
- TenantId string `json:"tenantId,omitempty"`
+
+type DeleteExtIdpDto struct{
+ Id string `json:"id"`
+ TenantId string `json:"tenantId,omitempty"`
}
+
diff --git a/dto/DeleteMultipleTenantAdminBodyDto.go b/dto/DeleteMultipleTenantAdminBodyDto.go
new file mode 100644
index 0000000..4dffb82
--- /dev/null
+++ b/dto/DeleteMultipleTenantAdminBodyDto.go
@@ -0,0 +1,7 @@
+package dto
+
+
+type DeleteMultipleTenantAdminBodyDto struct{
+ UserId string `json:"userId"`
+}
+
diff --git a/dto/DeleteOrganizationReqDto.go b/dto/DeleteOrganizationReqDto.go
index 26eb9a8..05014c0 100644
--- a/dto/DeleteOrganizationReqDto.go
+++ b/dto/DeleteOrganizationReqDto.go
@@ -1,6 +1,8 @@
package dto
-type DeleteOrganizationReqDto struct {
- OrganizationCode string `json:"organizationCode"`
- TenantId string `json:"tenantId,omitempty"`
+
+type DeleteOrganizationReqDto struct{
+ OrganizationCode string `json:"organizationCode"`
+ TenantId string `json:"tenantId,omitempty"`
}
+
diff --git a/dto/DeletePublicAccountsBatchDto.go b/dto/DeletePublicAccountsBatchDto.go
new file mode 100644
index 0000000..e45e9b7
--- /dev/null
+++ b/dto/DeletePublicAccountsBatchDto.go
@@ -0,0 +1,8 @@
+package dto
+
+
+type DeletePublicAccountsBatchDto struct{
+ UserIds []string `json:"userIds"`
+ Options DeletePublicAccountsBatchOptionsDto `json:"options,omitempty"`
+}
+
diff --git a/dto/DeletePublicAccountsBatchOptionsDto.go b/dto/DeletePublicAccountsBatchOptionsDto.go
new file mode 100644
index 0000000..9b7a0b4
--- /dev/null
+++ b/dto/DeletePublicAccountsBatchOptionsDto.go
@@ -0,0 +1,7 @@
+package dto
+
+
+type DeletePublicAccountsBatchOptionsDto struct{
+ UserIdType string `json:"userIdType,omitempty"`
+}
+
diff --git a/dto/DeleteTenantCooperatorBodyDto.go b/dto/DeleteTenantCooperatorBodyDto.go
new file mode 100644
index 0000000..c2cabff
--- /dev/null
+++ b/dto/DeleteTenantCooperatorBodyDto.go
@@ -0,0 +1,7 @@
+package dto
+
+
+type DeleteTenantCooperatorBodyDto struct{
+ UserId string `json:"userId"`
+}
+
diff --git a/dto/DeleteTerminalDto.go b/dto/DeleteTerminalDto.go
new file mode 100644
index 0000000..0f39db9
--- /dev/null
+++ b/dto/DeleteTerminalDto.go
@@ -0,0 +1,7 @@
+package dto
+
+
+type DeleteTerminalDto struct{
+ Id string `json:"id"`
+}
+
diff --git a/dto/DeleteTerminalUserDto.go b/dto/DeleteTerminalUserDto.go
new file mode 100644
index 0000000..db30a5c
--- /dev/null
+++ b/dto/DeleteTerminalUserDto.go
@@ -0,0 +1,8 @@
+package dto
+
+
+type DeleteTerminalUserDto struct{
+ UserId string `json:"userId"`
+ Id string `json:"id"`
+}
+
diff --git a/dto/DeleteUserSyncRelationReqDto.go b/dto/DeleteUserSyncRelationReqDto.go
new file mode 100644
index 0000000..7252a75
--- /dev/null
+++ b/dto/DeleteUserSyncRelationReqDto.go
@@ -0,0 +1,9 @@
+package dto
+
+
+type DeleteUserSyncRelationReqDto struct{
+ Provider string `json:"provider"`
+ UserId string `json:"userId"`
+ UserIdType string `json:"userIdType,omitempty"`
+}
+
diff --git a/dto/DeleteWhitelistDto.go b/dto/DeleteWhitelistDto.go
new file mode 100644
index 0000000..1d5b9a7
--- /dev/null
+++ b/dto/DeleteWhitelistDto.go
@@ -0,0 +1,8 @@
+package dto
+
+
+type DeleteWhitelistDto struct{
+ Type string `json:"type"`
+ List []string `json:"list,omitempty"`
+}
+
diff --git a/dto/DepartmentDto.go b/dto/DepartmentDto.go
index 871380a..7f1ecb3 100644
--- a/dto/DepartmentDto.go
+++ b/dto/DepartmentDto.go
@@ -12,10 +12,15 @@ type DepartmentDto struct{
Description string `json:"description,omitempty"`
ParentDepartmentId string `json:"parentDepartmentId"`
Code string `json:"code,omitempty"`
+ ParentDepartmentCode string `json:"parentDepartmentCode"`
MembersCount int `json:"membersCount"`
HasChildren bool `json:"hasChildren"`
IsVirtualNode bool `json:"isVirtualNode,omitempty"`
I18n DepartmentI18nDto `json:"i18n,omitempty"`
CustomData interface{} `json:"customData,omitempty"`
+ Posts []string `json:"posts,omitempty"`
+ PostIdList []string `json:"postIdList,omitempty"`
+ Status bool `json:"status,omitempty"`
+ Allow string `json:"allow,omitempty"`
}
diff --git a/dto/DepartmentSortingDto.go b/dto/DepartmentSortingDto.go
new file mode 100644
index 0000000..c05edcf
--- /dev/null
+++ b/dto/DepartmentSortingDto.go
@@ -0,0 +1,8 @@
+package dto
+
+
+type DepartmentSortingDto struct{
+ Field string `json:"field"`
+ Order string `json:"order"`
+}
+
diff --git a/dto/DeviceInfo.go b/dto/DeviceInfo.go
new file mode 100644
index 0000000..e79de56
--- /dev/null
+++ b/dto/DeviceInfo.go
@@ -0,0 +1,14 @@
+package dto
+
+
+type DeviceInfo struct{
+ DeviceId string `json:"deviceId"`
+ Name string `json:"name,omitempty"`
+ Version string `json:"version,omitempty"`
+ Type string `json:"type"`
+ Mod string `json:"mod,omitempty"`
+ Os string `json:"os,omitempty"`
+ Status string `json:"status,omitempty"`
+ UserAgent string `json:"userAgent,omitempty"`
+}
+
diff --git a/dto/DeviceStatusRespDto.go b/dto/DeviceStatusRespDto.go
new file mode 100644
index 0000000..a6e4dfb
--- /dev/null
+++ b/dto/DeviceStatusRespDto.go
@@ -0,0 +1,11 @@
+package dto
+
+
+type DeviceStatusRespDto struct{
+ StatusCode int `json:"statusCode"`
+ Message string `json:"message"`
+ ApiCode int `json:"apiCode,omitempty"`
+ RequestId string `json:"requestId,omitempty"`
+ Data DeviceStatusResponseDataDto `json:"data,omitempty"`
+}
+
diff --git a/dto/DeviceStatusResponseDataDto.go b/dto/DeviceStatusResponseDataDto.go
new file mode 100644
index 0000000..d8064da
--- /dev/null
+++ b/dto/DeviceStatusResponseDataDto.go
@@ -0,0 +1,8 @@
+package dto
+
+
+type DeviceStatusResponseDataDto struct{
+ Status string `json:"status"`
+ DiffTime int `json:"diffTime,omitempty"`
+}
+
diff --git a/dto/DropDownItemDto.go b/dto/DropDownItemDto.go
new file mode 100644
index 0000000..d84dca2
--- /dev/null
+++ b/dto/DropDownItemDto.go
@@ -0,0 +1,8 @@
+package dto
+
+
+type DropDownItemDto struct{
+ Key string `json:"key"`
+ Label string `json:"label"`
+}
+
diff --git a/dto/EnrollFactorEnrollmentDataDto.go b/dto/EnrollFactorEnrollmentDataDto.go
index 6e909ec..4388c9d 100644
--- a/dto/EnrollFactorEnrollmentDataDto.go
+++ b/dto/EnrollFactorEnrollmentDataDto.go
@@ -1,7 +1,9 @@
package dto
-type EnrollFactorEnrollmentDataDto struct {
- PassCode string `json:"passCode,omitempty"`
- Photo string `json:"photo,omitempty"`
- IsExternalPhoto bool `json:"isExternalPhoto,omitempty"`
+
+type EnrollFactorEnrollmentDataDto struct{
+ PassCode string `json:"passCode,omitempty"`
+ Photo string `json:"photo,omitempty"`
+ IsExternalPhoto bool `json:"isExternalPhoto,omitempty"`
}
+
diff --git a/dto/EventAppDto.go b/dto/EventAppDto.go
new file mode 100644
index 0000000..676c882
--- /dev/null
+++ b/dto/EventAppDto.go
@@ -0,0 +1,9 @@
+package dto
+
+
+type EventAppDto struct{
+ Identifier string `json:"identifier"`
+ Name string `json:"name"`
+ Logo string `json:"logo"`
+}
+
diff --git a/dto/EventAppPaginatedRespDto.go b/dto/EventAppPaginatedRespDto.go
new file mode 100644
index 0000000..3a932d3
--- /dev/null
+++ b/dto/EventAppPaginatedRespDto.go
@@ -0,0 +1,11 @@
+package dto
+
+
+type EventAppPaginatedRespDto struct{
+ StatusCode int `json:"statusCode"`
+ Message string `json:"message"`
+ ApiCode int `json:"apiCode,omitempty"`
+ RequestId string `json:"requestId,omitempty"`
+ Data EventAppPagingDto `json:"data"`
+}
+
diff --git a/dto/EventAppPagingDto.go b/dto/EventAppPagingDto.go
new file mode 100644
index 0000000..81d813b
--- /dev/null
+++ b/dto/EventAppPagingDto.go
@@ -0,0 +1,8 @@
+package dto
+
+
+type EventAppPagingDto struct{
+ TotalCount int `json:"totalCount"`
+ List []EventAppDto `json:"list"`
+}
+
diff --git a/dto/Expand.go b/dto/Expand.go
new file mode 100644
index 0000000..2e3dba0
--- /dev/null
+++ b/dto/Expand.go
@@ -0,0 +1,8 @@
+package dto
+
+
+type Expand struct{
+ Field string `json:"field"`
+ Select []string `json:"select"`
+}
+
diff --git a/dto/ExportMetadataDto.go b/dto/ExportMetadataDto.go
new file mode 100644
index 0000000..7e497f7
--- /dev/null
+++ b/dto/ExportMetadataDto.go
@@ -0,0 +1,7 @@
+package dto
+
+
+type ExportMetadataDto struct{
+ ModelId string `json:"modelId"`
+}
+
diff --git a/dto/ExportModelDto.go b/dto/ExportModelDto.go
new file mode 100644
index 0000000..8c64b69
--- /dev/null
+++ b/dto/ExportModelDto.go
@@ -0,0 +1,8 @@
+package dto
+
+
+type ExportModelDto struct{
+ IdList []string `json:"idList"`
+ ModelId string `json:"modelId"`
+}
+
diff --git a/dto/FastpassQRCodeRelationAppDto.go b/dto/FastpassQRCodeRelationAppDto.go
new file mode 100644
index 0000000..1990191
--- /dev/null
+++ b/dto/FastpassQRCodeRelationAppDto.go
@@ -0,0 +1,9 @@
+package dto
+
+
+type FastpassQRCodeRelationAppDto struct{
+ Id string `json:"id"`
+ Name string `json:"name"`
+ Logo string `json:"logo,omitempty"`
+}
+
diff --git a/dto/FastpassUserInfoDto.go b/dto/FastpassUserInfoDto.go
new file mode 100644
index 0000000..6aa4b60
--- /dev/null
+++ b/dto/FastpassUserInfoDto.go
@@ -0,0 +1,9 @@
+package dto
+
+
+type FastpassUserInfoDto struct{
+ Id string `json:"id"`
+ DisplayName string `json:"displayName"`
+ Photo string `json:"photo"`
+}
+
diff --git a/dto/FilterDto.go b/dto/FilterDto.go
new file mode 100644
index 0000000..8c0bfee
--- /dev/null
+++ b/dto/FilterDto.go
@@ -0,0 +1,21 @@
+package dto
+
+
+type FilterDto struct{
+ ModelId string `json:"modelId"`
+ Keywords string `json:"keywords,omitempty"`
+ Conjunction string `json:"conjunction,omitempty"`
+ Conditions []Condition `json:"conditions,omitempty"`
+ Sort []interface{} `json:"sort,omitempty"`
+ Page int `json:"page,omitempty"`
+ Limit int `json:"limit,omitempty"`
+ FetchAll bool `json:"fetchAll,omitempty"`
+ WithPath bool `json:"withPath,omitempty"`
+ ShowFieldId bool `json:"showFieldId,omitempty"`
+ PreviewRelation bool `json:"previewRelation,omitempty"`
+ GetRelationFieldDetail bool `json:"getRelationFieldDetail,omitempty"`
+ Scope ScopeDto `json:"scope,omitempty"`
+ FilterRelation ScopeDto `json:"filterRelation,omitempty"`
+ Expand []Expand `json:"expand,omitempty"`
+}
+
diff --git a/dto/FunctionFieldListResDto.go b/dto/FunctionFieldListResDto.go
new file mode 100644
index 0000000..8463cc2
--- /dev/null
+++ b/dto/FunctionFieldListResDto.go
@@ -0,0 +1,11 @@
+package dto
+
+
+type FunctionFieldListResDto struct{
+ StatusCode int `json:"statusCode"`
+ Message string `json:"message"`
+ ApiCode int `json:"apiCode,omitempty"`
+ RequestId string `json:"requestId,omitempty"`
+ Data []FunctionModelFieldDto `json:"data"`
+}
+
diff --git a/dto/FunctionModelDto.go b/dto/FunctionModelDto.go
new file mode 100644
index 0000000..2dc679b
--- /dev/null
+++ b/dto/FunctionModelDto.go
@@ -0,0 +1,18 @@
+package dto
+
+
+type FunctionModelDto struct{
+ Id string `json:"id"`
+ UserPoolId string `json:"userPoolId"`
+ Name string `json:"name"`
+ Description string `json:"description"`
+ DataType string `json:"dataType"`
+ Enable bool `json:"enable"`
+ ParentKey string `json:"parentKey"`
+ CreatedAt string `json:"createdAt"`
+ UpdatedAt string `json:"updatedAt"`
+ Type string `json:"type"`
+ FieldOrder string `json:"fieldOrder"`
+ Config interface{} `json:"config"`
+}
+
diff --git a/dto/FunctionModelFieldDto.go b/dto/FunctionModelFieldDto.go
new file mode 100644
index 0000000..cc3bb3e
--- /dev/null
+++ b/dto/FunctionModelFieldDto.go
@@ -0,0 +1,28 @@
+package dto
+
+
+type FunctionModelFieldDto struct{
+ Id string `json:"id"`
+ ModelId string `json:"modelId"`
+ Name string `json:"name"`
+ Key string `json:"key"`
+ Type int `json:"type"`
+ Show bool `json:"show"`
+ Editable bool `json:"editable"`
+ Help string `json:"help"`
+ Default string `json:"default"`
+ Require bool `json:"require"`
+ Unique bool `json:"unique"`
+ MaxLength int `json:"maxLength"`
+ Max int `json:"max"`
+ Min int `json:"min"`
+ Regexp string `json:"regexp"`
+ Format int `json:"format"`
+ DropDown int `json:"dropDown"`
+ RelationType string `json:"relationType"`
+ RelationMultiple bool `json:"relationMultiple"`
+ RelationShowKey string `json:"relationShowKey"`
+ RelationOptionalRange RelationOptionalRange `json:"relationOptionalRange"`
+ UserVisible bool `json:"userVisible"`
+}
+
diff --git a/dto/FunctionModelFieldIdDto.go b/dto/FunctionModelFieldIdDto.go
new file mode 100644
index 0000000..2312a25
--- /dev/null
+++ b/dto/FunctionModelFieldIdDto.go
@@ -0,0 +1,8 @@
+package dto
+
+
+type FunctionModelFieldIdDto struct{
+ ModelId string `json:"modelId"`
+ Id string `json:"id"`
+}
+
diff --git a/dto/FunctionModelFieldResDto.go b/dto/FunctionModelFieldResDto.go
new file mode 100644
index 0000000..3c04a6f
--- /dev/null
+++ b/dto/FunctionModelFieldResDto.go
@@ -0,0 +1,11 @@
+package dto
+
+
+type FunctionModelFieldResDto struct{
+ StatusCode int `json:"statusCode"`
+ Message string `json:"message"`
+ ApiCode int `json:"apiCode,omitempty"`
+ RequestId string `json:"requestId,omitempty"`
+ Data FunctionModelFieldDto `json:"data"`
+}
+
diff --git a/dto/FunctionModelIdDto.go b/dto/FunctionModelIdDto.go
new file mode 100644
index 0000000..d705ec9
--- /dev/null
+++ b/dto/FunctionModelIdDto.go
@@ -0,0 +1,7 @@
+package dto
+
+
+type FunctionModelIdDto struct{
+ Id string `json:"id"`
+}
+
diff --git a/dto/FunctionModelListDto.go b/dto/FunctionModelListDto.go
new file mode 100644
index 0000000..a3589ab
--- /dev/null
+++ b/dto/FunctionModelListDto.go
@@ -0,0 +1,11 @@
+package dto
+
+
+type FunctionModelListDto struct{
+ StatusCode int `json:"statusCode"`
+ Message string `json:"message"`
+ ApiCode int `json:"apiCode,omitempty"`
+ RequestId string `json:"requestId,omitempty"`
+ List []FunctionModelDto `json:"list"`
+}
+
diff --git a/dto/FunctionModelOperateIdDto.go b/dto/FunctionModelOperateIdDto.go
new file mode 100644
index 0000000..b23e7ca
--- /dev/null
+++ b/dto/FunctionModelOperateIdDto.go
@@ -0,0 +1,9 @@
+package dto
+
+
+type FunctionModelOperateIdDto struct{
+ CustomConfig interface{} `json:"customConfig"`
+ ModelId string `json:"modelId"`
+ Id string `json:"id"`
+}
+
diff --git a/dto/FunctionModelResDto.go b/dto/FunctionModelResDto.go
new file mode 100644
index 0000000..8cb5ed8
--- /dev/null
+++ b/dto/FunctionModelResDto.go
@@ -0,0 +1,11 @@
+package dto
+
+
+type FunctionModelResDto struct{
+ StatusCode int `json:"statusCode"`
+ Message string `json:"message"`
+ ApiCode int `json:"apiCode,omitempty"`
+ RequestId string `json:"requestId,omitempty"`
+ Data FunctionModelDto `json:"data"`
+}
+
diff --git a/dto/FunctionModelValueListDto.go b/dto/FunctionModelValueListDto.go
new file mode 100644
index 0000000..915212e
--- /dev/null
+++ b/dto/FunctionModelValueListDto.go
@@ -0,0 +1,8 @@
+package dto
+
+
+type FunctionModelValueListDto struct{
+ TotalCount int `json:"totalCount"`
+ List []interface{} `json:"list"`
+}
+
diff --git a/dto/FunctionModelValueListResDto.go b/dto/FunctionModelValueListResDto.go
new file mode 100644
index 0000000..681cd42
--- /dev/null
+++ b/dto/FunctionModelValueListResDto.go
@@ -0,0 +1,10 @@
+package dto
+
+
+type FunctionModelValueListResDto struct{
+ StatusCode int `json:"statusCode"`
+ Message string `json:"message"`
+ ApiCode int `json:"apiCode,omitempty"`
+ Data FunctionModelValueListDto `json:"data"`
+}
+
diff --git a/dto/FunctionModelValueResDto.go b/dto/FunctionModelValueResDto.go
new file mode 100644
index 0000000..a0a5e1b
--- /dev/null
+++ b/dto/FunctionModelValueResDto.go
@@ -0,0 +1,10 @@
+package dto
+
+
+type FunctionModelValueResDto struct{
+ StatusCode int `json:"statusCode"`
+ Message string `json:"message"`
+ ApiCode int `json:"apiCode,omitempty"`
+ Data RowDto `json:"data"`
+}
+
diff --git a/dto/GeneFastpassQRCodeInfoDto.go b/dto/GeneFastpassQRCodeInfoDto.go
new file mode 100644
index 0000000..b92294f
--- /dev/null
+++ b/dto/GeneFastpassQRCodeInfoDto.go
@@ -0,0 +1,12 @@
+package dto
+
+
+type GeneFastpassQRCodeInfoDto struct{
+ Scene string `json:"scene"`
+ QrcodeId string `json:"qrcodeId"`
+ ApiHost string `json:"apiHost"`
+ User FastpassUserInfoDto `json:"user"`
+ AppId string `json:"appId"`
+ Userpool FastpassUserInfoDto `json:"userpool"`
+}
+
diff --git a/dto/GeneFastpassQRCodeRespDto.go b/dto/GeneFastpassQRCodeRespDto.go
new file mode 100644
index 0000000..4111831
--- /dev/null
+++ b/dto/GeneFastpassQRCodeRespDto.go
@@ -0,0 +1,11 @@
+package dto
+
+
+type GeneFastpassQRCodeRespDto struct{
+ StatusCode int `json:"statusCode"`
+ Message string `json:"message"`
+ ApiCode int `json:"apiCode,omitempty"`
+ RequestId string `json:"requestId,omitempty"`
+ Data GeneFastpassQRCodeInfoDto `json:"data,omitempty"`
+}
+
diff --git a/dto/GenePushCodeDataDto.go b/dto/GenePushCodeDataDto.go
new file mode 100644
index 0000000..ec14510
--- /dev/null
+++ b/dto/GenePushCodeDataDto.go
@@ -0,0 +1,8 @@
+package dto
+
+
+type GenePushCodeDataDto struct{
+ PushCodeId string `json:"pushCodeId"`
+ ExpireTime int `json:"expireTime"`
+}
+
diff --git a/dto/GenePushCodeRespDto.go b/dto/GenePushCodeRespDto.go
new file mode 100644
index 0000000..0a48e3b
--- /dev/null
+++ b/dto/GenePushCodeRespDto.go
@@ -0,0 +1,11 @@
+package dto
+
+
+type GenePushCodeRespDto struct{
+ StatusCode int `json:"statusCode"`
+ Message string `json:"message"`
+ ApiCode int `json:"apiCode,omitempty"`
+ RequestId string `json:"requestId,omitempty"`
+ Data GenePushCodeDataDto `json:"data"`
+}
+
diff --git a/dto/GenerateInviteTenantUserLink.go b/dto/GenerateInviteTenantUserLink.go
new file mode 100644
index 0000000..4662e86
--- /dev/null
+++ b/dto/GenerateInviteTenantUserLink.go
@@ -0,0 +1,10 @@
+package dto
+
+
+type GenerateInviteTenantUserLink struct{
+ ValidityTerm string `json:"validityTerm"`
+ Emails []string `json:"emails"`
+ AppId string `json:"appId"`
+ TenantId string `json:"tenantId,omitempty"`
+}
+
diff --git a/dto/GetAccessKeyRespDto.go b/dto/GetAccessKeyRespDto.go
index f144c4c..31feae5 100644
--- a/dto/GetAccessKeyRespDto.go
+++ b/dto/GetAccessKeyRespDto.go
@@ -1,12 +1,14 @@
package dto
-type GetAccessKeyRespDto struct {
- AccessKeyId string `json:"accessKeyId"`
- AccessKeySecret string `json:"accessKeySecret"`
- UserId string `json:"userId"`
- CreatedAt string `json:"createdAt"`
- Status string `json:"status"`
- LastDate string `json:"lastDate"`
- UserPoolId string `json:"userPoolId"`
- Enable bool `json:"enable"`
+
+type GetAccessKeyRespDto struct{
+ AccessKeyId string `json:"accessKeyId"`
+ AccessKeySecret string `json:"accessKeySecret"`
+ UserId string `json:"userId"`
+ CreatedAt string `json:"createdAt"`
+ Status string `json:"status"`
+ LastDate string `json:"lastDate"`
+ UserPoolId string `json:"userPoolId"`
+ Enable bool `json:"enable"`
}
+
diff --git a/dto/GetAllDepartmentsDto.go b/dto/GetAllDepartmentsDto.go
new file mode 100644
index 0000000..938b39d
--- /dev/null
+++ b/dto/GetAllDepartmentsDto.go
@@ -0,0 +1,10 @@
+package dto
+
+
+type GetAllDepartmentsDto struct{
+ OrganizationCode string `json:"organizationCode,omitempty"`
+ DepartmentId string `json:"departmentId,omitempty"`
+ DepartmentIdType string `json:"departmentIdType,omitempty"`
+ WithCustomData bool `json:"withCustomData,omitempty"`
+}
+
diff --git a/dto/GetAllGroupsDto.go b/dto/GetAllGroupsDto.go
new file mode 100644
index 0000000..a77c5a0
--- /dev/null
+++ b/dto/GetAllGroupsDto.go
@@ -0,0 +1,8 @@
+package dto
+
+
+type GetAllGroupsDto struct{
+ FetchMembers bool `json:"fetchMembers,omitempty"`
+ WithCustomData bool `json:"withCustomData,omitempty"`
+}
+
diff --git a/dto/GetAppLoginQrcodeStatusDto.go b/dto/GetAppLoginQrcodeStatusDto.go
new file mode 100644
index 0000000..0f76561
--- /dev/null
+++ b/dto/GetAppLoginQrcodeStatusDto.go
@@ -0,0 +1,7 @@
+package dto
+
+
+type GetAppLoginQrcodeStatusDto struct{
+ QrcodeId string `json:"qrcodeId,omitempty"`
+}
+
diff --git a/dto/GetAuthenticationOptionsRespDto.go b/dto/GetAuthenticationOptionsRespDto.go
new file mode 100644
index 0000000..d8c51f5
--- /dev/null
+++ b/dto/GetAuthenticationOptionsRespDto.go
@@ -0,0 +1,11 @@
+package dto
+
+
+type GetAuthenticationOptionsRespDto struct{
+ StatusCode int `json:"statusCode"`
+ Message string `json:"message"`
+ ApiCode int `json:"apiCode,omitempty"`
+ RequestId string `json:"requestId,omitempty"`
+ Data AuthenticationOptionsDto `json:"data"`
+}
+
diff --git a/dto/GetAuthorizedResourcesDto.go b/dto/GetAuthorizedResourcesDto.go
index 222f58d..7f2f58d 100644
--- a/dto/GetAuthorizedResourcesDto.go
+++ b/dto/GetAuthorizedResourcesDto.go
@@ -6,7 +6,7 @@ type GetAuthorizedResourcesDto struct{
TargetIdentifier string `json:"targetIdentifier,omitempty"`
Namespace string `json:"namespace,omitempty"`
ResourceType string `json:"resourceType,omitempty"`
- ResourceList string `json:"resourceList,omitempty"`
+ ResourceList []string `json:"resourceList,omitempty"`
WithDenied bool `json:"withDenied,omitempty"`
}
diff --git a/dto/GetCustomDataDto.go b/dto/GetCustomDataDto.go
index df64dac..972a4ac 100644
--- a/dto/GetCustomDataDto.go
+++ b/dto/GetCustomDataDto.go
@@ -2,6 +2,7 @@ package dto
type GetCustomDataDto struct{
+ TenantId string `json:"tenantId,omitempty"`
TargetType string `json:"targetType,omitempty"`
TargetIdentifier string `json:"targetIdentifier,omitempty"`
Namespace string `json:"namespace,omitempty"`
diff --git a/dto/GetCustomFieldsDto.go b/dto/GetCustomFieldsDto.go
index 64fda73..17636b1 100644
--- a/dto/GetCustomFieldsDto.go
+++ b/dto/GetCustomFieldsDto.go
@@ -3,5 +3,6 @@ package dto
type GetCustomFieldsDto struct{
TargetType string `json:"targetType,omitempty"`
+ TenantId string `json:"tenantId,omitempty"`
}
diff --git a/dto/GetDataResourceRespDto.go b/dto/GetDataResourceRespDto.go
index 72cb5f3..2121f37 100644
--- a/dto/GetDataResourceRespDto.go
+++ b/dto/GetDataResourceRespDto.go
@@ -1,11 +1,13 @@
package dto
-type GetDataResourceRespDto struct {
- ResourceName string `json:"resourceName"`
- ResourceCode string `json:"resourceCode"`
- Type string `json:"type"`
- Description string `json:"description,omitempty"`
- Struct interface{} `json:"struct"`
- NamespaceCode string `json:"namespaceCode"`
- Actions []string `json:"actions"`
+
+type GetDataResourceRespDto struct{
+ ResourceName string `json:"resourceName"`
+ ResourceCode string `json:"resourceCode"`
+ Type string `json:"type"`
+ Description string `json:"description,omitempty"`
+ Struct interface{} `json:"struct"`
+ NamespaceCode string `json:"namespaceCode"`
+ Actions []string `json:"actions"`
}
+
diff --git a/dto/GetDepartmentByIdDto.go b/dto/GetDepartmentByIdDto.go
index e6588d7..165b979 100644
--- a/dto/GetDepartmentByIdDto.go
+++ b/dto/GetDepartmentByIdDto.go
@@ -1,6 +1,9 @@
package dto
-type GetDepartmentByIdDto struct {
- DepartmentId string `json:"departmentId,omitempty"`
- TenantId string `json:"tenantId,omitempty"`
+
+type GetDepartmentByIdDto struct{
+ DepartmentId string `json:"departmentId,omitempty"`
+ TenantId string `json:"tenantId,omitempty"`
+ WithCustomData bool `json:"withCustomData,omitempty"`
}
+
diff --git a/dto/GetDepartmentDto.go b/dto/GetDepartmentDto.go
index 5be3791..4d42388 100644
--- a/dto/GetDepartmentDto.go
+++ b/dto/GetDepartmentDto.go
@@ -1,10 +1,13 @@
package dto
-type GetDepartmentDto struct {
- OrganizationCode string `json:"organizationCode,omitempty"`
- DepartmentId string `json:"departmentId,omitempty"`
- DepartmentCode string `json:"departmentCode,omitempty"`
- DepartmentIdType string `json:"departmentIdType,omitempty"`
- WithCustomData bool `json:"withCustomData,omitempty"`
- TenantId string `json:"tenantId,omitempty"`
+
+type GetDepartmentDto struct{
+ OrganizationCode string `json:"organizationCode,omitempty"`
+ DepartmentId string `json:"departmentId,omitempty"`
+ DepartmentCode string `json:"departmentCode,omitempty"`
+ DepartmentIdType string `json:"departmentIdType,omitempty"`
+ WithCustomData bool `json:"withCustomData,omitempty"`
+ FlatCustomData bool `json:"flatCustomData,omitempty"`
+ TenantId string `json:"tenantId,omitempty"`
}
+
diff --git a/dto/GetDepartmentSyncRelationsDto.go b/dto/GetDepartmentSyncRelationsDto.go
new file mode 100644
index 0000000..ec2ca04
--- /dev/null
+++ b/dto/GetDepartmentSyncRelationsDto.go
@@ -0,0 +1,11 @@
+package dto
+
+
+type GetDepartmentSyncRelationsDto struct{
+ OrganizationCode string `json:"organizationCode,omitempty"`
+ DepartmentId string `json:"departmentId,omitempty"`
+ DepartmentIdType string `json:"departmentIdType,omitempty"`
+ WithCustomData bool `json:"withCustomData,omitempty"`
+ TenantId string `json:"tenantId,omitempty"`
+}
+
diff --git a/dto/GetDepartmentsOfPublicAccountDto.go b/dto/GetDepartmentsOfPublicAccountDto.go
new file mode 100644
index 0000000..c7b1731
--- /dev/null
+++ b/dto/GetDepartmentsOfPublicAccountDto.go
@@ -0,0 +1,14 @@
+package dto
+
+
+type GetDepartmentsOfPublicAccountDto struct{
+ UserId string `json:"userId,omitempty"`
+ UserIdType string `json:"userIdType,omitempty"`
+ Page int `json:"page,omitempty"`
+ Limit int `json:"limit,omitempty"`
+ WithCustomData bool `json:"withCustomData,omitempty"`
+ WithDepartmentPaths bool `json:"withDepartmentPaths,omitempty"`
+ SortBy string `json:"sortBy,omitempty"`
+ OrderBy string `json:"orderBy,omitempty"`
+}
+
diff --git a/dto/GetExternalUserResourceStructDataDto.go b/dto/GetExternalUserResourceStructDataDto.go
index dd88151..31523d4 100644
--- a/dto/GetExternalUserResourceStructDataDto.go
+++ b/dto/GetExternalUserResourceStructDataDto.go
@@ -1,10 +1,12 @@
package dto
-type GetExternalUserResourceStructDataDto struct {
- NamespaceCode string `json:"namespaceCode"`
- ResourceCode string `json:"resourceCode"`
- ResourceType string `json:"resourceType"`
- StrResourceAuthAction StrResourceAuthAction `json:"strResourceAuthAction,omitempty"`
- ArrResourceAuthAction ArrResourceAuthAction `json:"arrResourceAuthAction,omitempty"`
- TreeResourceAuthAction TreeResourceAuthAction `json:"treeResourceAuthAction,omitempty"`
+
+type GetExternalUserResourceStructDataDto struct{
+ NamespaceCode string `json:"namespaceCode"`
+ ResourceCode string `json:"resourceCode"`
+ ResourceType string `json:"resourceType"`
+ StrResourceAuthAction StrResourceAuthAction `json:"strResourceAuthAction,omitempty"`
+ ArrResourceAuthAction ArrResourceAuthAction `json:"arrResourceAuthAction,omitempty"`
+ TreeResourceAuthAction TreeResourceAuthAction `json:"treeResourceAuthAction,omitempty"`
}
+
diff --git a/dto/GetExternalUserResourceStructDto.go b/dto/GetExternalUserResourceStructDto.go
index 4241650..bfbcc38 100644
--- a/dto/GetExternalUserResourceStructDto.go
+++ b/dto/GetExternalUserResourceStructDto.go
@@ -1,7 +1,9 @@
package dto
-type GetExternalUserResourceStructDto struct {
- ResourceCode string `json:"resourceCode"`
- ExternalId string `json:"externalId"`
- NamespaceCode string `json:"namespaceCode"`
+
+type GetExternalUserResourceStructDto struct{
+ ResourceCode string `json:"resourceCode"`
+ ExternalId string `json:"externalId"`
+ NamespaceCode string `json:"namespaceCode"`
}
+
diff --git a/dto/GetExternalUserResourceStructRespDto.go b/dto/GetExternalUserResourceStructRespDto.go
index f766cb9..f7b1b7c 100644
--- a/dto/GetExternalUserResourceStructRespDto.go
+++ b/dto/GetExternalUserResourceStructRespDto.go
@@ -1,9 +1,11 @@
package dto
-type GetExternalUserResourceStructRespDto struct {
- StatusCode int `json:"statusCode"`
- Message string `json:"message"`
- ApiCode int `json:"apiCode,omitempty"`
- RequestId string `json:"requestId,omitempty"`
- Data GetExternalUserResourceStructDataDto `json:"data"`
+
+type GetExternalUserResourceStructRespDto struct{
+ StatusCode int `json:"statusCode"`
+ Message string `json:"message"`
+ ApiCode int `json:"apiCode,omitempty"`
+ RequestId string `json:"requestId,omitempty"`
+ Data GetExternalUserResourceStructDataDto `json:"data"`
}
+
diff --git a/dto/GetFastpassClientAppsDto.go b/dto/GetFastpassClientAppsDto.go
new file mode 100644
index 0000000..450a923
--- /dev/null
+++ b/dto/GetFastpassClientAppsDto.go
@@ -0,0 +1,8 @@
+package dto
+
+
+type GetFastpassClientAppsDto struct{
+ QrcodeId string `json:"qrcodeId,omitempty"`
+ AppId string `json:"appId,omitempty"`
+}
+
diff --git a/dto/GetFastpassQRCodeRelationAppsDto.go b/dto/GetFastpassQRCodeRelationAppsDto.go
new file mode 100644
index 0000000..7ebc7cd
--- /dev/null
+++ b/dto/GetFastpassQRCodeRelationAppsDto.go
@@ -0,0 +1,7 @@
+package dto
+
+
+type GetFastpassQRCodeRelationAppsDto struct{
+ RelationApps []FastpassQRCodeRelationAppDto `json:"relationApps,omitempty"`
+}
+
diff --git a/dto/GetFastpassQRCodeRelationAppsRespDto.go b/dto/GetFastpassQRCodeRelationAppsRespDto.go
new file mode 100644
index 0000000..20821b0
--- /dev/null
+++ b/dto/GetFastpassQRCodeRelationAppsRespDto.go
@@ -0,0 +1,11 @@
+package dto
+
+
+type GetFastpassQRCodeRelationAppsRespDto struct{
+ StatusCode int `json:"statusCode"`
+ Message string `json:"message"`
+ ApiCode int `json:"apiCode,omitempty"`
+ RequestId string `json:"requestId,omitempty"`
+ Data GetFastpassQRCodeRelationAppsDto `json:"data"`
+}
+
diff --git a/dto/GetGroupDto.go b/dto/GetGroupDto.go
index 140169d..12e8ef8 100644
--- a/dto/GetGroupDto.go
+++ b/dto/GetGroupDto.go
@@ -3,5 +3,6 @@ package dto
type GetGroupDto struct{
Code string `json:"code,omitempty"`
+ WithCustomData bool `json:"withCustomData,omitempty"`
}
diff --git a/dto/GetGroupsOfPublicAccountDto.go b/dto/GetGroupsOfPublicAccountDto.go
new file mode 100644
index 0000000..9f1e167
--- /dev/null
+++ b/dto/GetGroupsOfPublicAccountDto.go
@@ -0,0 +1,8 @@
+package dto
+
+
+type GetGroupsOfPublicAccountDto struct{
+ UserId string `json:"userId,omitempty"`
+ UserIdType string `json:"userIdType,omitempty"`
+}
+
diff --git a/dto/GetImportTemplateDto.go b/dto/GetImportTemplateDto.go
new file mode 100644
index 0000000..fbc77d4
--- /dev/null
+++ b/dto/GetImportTemplateDto.go
@@ -0,0 +1,7 @@
+package dto
+
+
+type GetImportTemplateDto struct{
+ ModelId string `json:"modelId,omitempty"`
+}
+
diff --git a/dto/GetImportTemplateResDto.go b/dto/GetImportTemplateResDto.go
new file mode 100644
index 0000000..8092d6c
--- /dev/null
+++ b/dto/GetImportTemplateResDto.go
@@ -0,0 +1,10 @@
+package dto
+
+
+type GetImportTemplateResDto struct{
+ StatusCode int `json:"statusCode"`
+ Message string `json:"message"`
+ ApiCode int `json:"apiCode,omitempty"`
+ Data RowDto `json:"data"`
+}
+
diff --git a/dto/GetLdapServerLogDto.go b/dto/GetLdapServerLogDto.go
new file mode 100644
index 0000000..35c2da7
--- /dev/null
+++ b/dto/GetLdapServerLogDto.go
@@ -0,0 +1,15 @@
+package dto
+
+
+type GetLdapServerLogDto struct{
+ Type int `json:"type,omitempty"`
+ Page int `json:"page,omitempty"`
+ Limit int `json:"limit,omitempty"`
+ Connection int `json:"connection,omitempty"`
+ OperationNumber int `json:"operationNumber,omitempty"`
+ ErrorCode int `json:"errorCode,omitempty"`
+ Message string `json:"message,omitempty"`
+ StartTime int `json:"startTime,omitempty"`
+ EndTime int `json:"endTime,omitempty"`
+}
+
diff --git a/dto/GetLdapSubEntriesDto.go b/dto/GetLdapSubEntriesDto.go
new file mode 100644
index 0000000..f16ea01
--- /dev/null
+++ b/dto/GetLdapSubEntriesDto.go
@@ -0,0 +1,9 @@
+package dto
+
+
+type GetLdapSubEntriesDto struct{
+ Page int `json:"page,omitempty"`
+ Limit int `json:"limit,omitempty"`
+ Dn string `json:"dn,omitempty"`
+}
+
diff --git a/dto/GetMapInfoRespDto.go b/dto/GetMapInfoRespDto.go
new file mode 100644
index 0000000..86c8ad9
--- /dev/null
+++ b/dto/GetMapInfoRespDto.go
@@ -0,0 +1,11 @@
+package dto
+
+
+type GetMapInfoRespDto struct{
+ StatusCode int `json:"statusCode"`
+ Message string `json:"message"`
+ ApiCode int `json:"apiCode,omitempty"`
+ RequestId string `json:"requestId,omitempty"`
+ Data GetMfaInfoDataDto `json:"data"`
+}
+
diff --git a/dto/GetMfaInfoDataDto.go b/dto/GetMfaInfoDataDto.go
new file mode 100644
index 0000000..89a1b07
--- /dev/null
+++ b/dto/GetMfaInfoDataDto.go
@@ -0,0 +1,17 @@
+package dto
+
+
+type GetMfaInfoDataDto struct{
+ MfaToken string `json:"mfaToken"`
+ MfaPhone string `json:"mfaPhone,omitempty"`
+ MfaPhoneCountryCode string `json:"mfaPhoneCountryCode,omitempty"`
+ MfaEmail string `json:"mfaEmail,omitempty"`
+ Nickname string `json:"nickname,omitempty"`
+ Username string `json:"username,omitempty"`
+ Phone string `json:"phone,omitempty"`
+ PhoneCountryCode string `json:"phoneCountryCode,omitempty"`
+ FaceMfaEnabled bool `json:"faceMfaEnabled,omitempty"`
+ TotpMfaEnabled bool `json:"totpMfaEnabled,omitempty"`
+ ApplicationMfa []ApplicationMfaDto `json:"applicationMfa"`
+}
+
diff --git a/dto/GetMfaStatusDto.go b/dto/GetMfaStatusDto.go
new file mode 100644
index 0000000..fbf6462
--- /dev/null
+++ b/dto/GetMfaStatusDto.go
@@ -0,0 +1,8 @@
+package dto
+
+
+type GetMfaStatusDto struct{
+ UserId string `json:"userId,omitempty"`
+ UserIdType string `json:"userIdType,omitempty"`
+}
+
diff --git a/dto/GetMfaTriggerDataDto.go b/dto/GetMfaTriggerDataDto.go
new file mode 100644
index 0000000..cd1781c
--- /dev/null
+++ b/dto/GetMfaTriggerDataDto.go
@@ -0,0 +1,9 @@
+package dto
+
+
+type GetMfaTriggerDataDto struct{
+ AppId string `json:"appId,omitempty"`
+ UserId string `json:"userId,omitempty"`
+ UserIdType string `json:"userIdType,omitempty"`
+}
+
diff --git a/dto/GetModelDto.go b/dto/GetModelDto.go
new file mode 100644
index 0000000..2c71c1b
--- /dev/null
+++ b/dto/GetModelDto.go
@@ -0,0 +1,7 @@
+package dto
+
+
+type GetModelDto struct{
+ Id string `json:"id,omitempty"`
+}
+
diff --git a/dto/GetMultipleTenantAdminDto.go b/dto/GetMultipleTenantAdminDto.go
new file mode 100644
index 0000000..efda9f5
--- /dev/null
+++ b/dto/GetMultipleTenantAdminDto.go
@@ -0,0 +1,7 @@
+package dto
+
+
+type GetMultipleTenantAdminDto struct{
+ UserId string `json:"userId,omitempty"`
+}
+
diff --git a/dto/GetNamespacesBatchDto.go b/dto/GetNamespacesBatchDto.go
index c76d016..6ac18f6 100644
--- a/dto/GetNamespacesBatchDto.go
+++ b/dto/GetNamespacesBatchDto.go
@@ -2,6 +2,6 @@ package dto
type GetNamespacesBatchDto struct{
- CodeList string `json:"codeList,omitempty"`
+ CodeList []string `json:"codeList,omitempty"`
}
diff --git a/dto/GetOrganizationBatchDto.go b/dto/GetOrganizationBatchDto.go
index eb80fc8..8733831 100644
--- a/dto/GetOrganizationBatchDto.go
+++ b/dto/GetOrganizationBatchDto.go
@@ -1,7 +1,10 @@
package dto
-type GetOrganizationBatchDto struct {
- OrganizationCodeList string `json:"organizationCodeList,omitempty"`
- WithCustomData bool `json:"withCustomData,omitempty"`
- TenantId string `json:"tenantId,omitempty"`
+
+type GetOrganizationBatchDto struct{
+ OrganizationCodeList []string `json:"organizationCodeList,omitempty"`
+ WithCustomData bool `json:"withCustomData,omitempty"`
+ WithPost bool `json:"withPost,omitempty"`
+ TenantId string `json:"tenantId,omitempty"`
}
+
diff --git a/dto/GetOrganizationDto.go b/dto/GetOrganizationDto.go
index 6df84f0..dfd4b3b 100644
--- a/dto/GetOrganizationDto.go
+++ b/dto/GetOrganizationDto.go
@@ -1,7 +1,10 @@
package dto
-type GetOrganizationDto struct {
- OrganizationCode string `json:"organizationCode,omitempty"`
- WithCustomData bool `json:"withCustomData,omitempty"`
- TenantId string `json:"tenantId,omitempty"`
+
+type GetOrganizationDto struct{
+ OrganizationCode string `json:"organizationCode,omitempty"`
+ WithCustomData bool `json:"withCustomData,omitempty"`
+ WithPost bool `json:"withPost,omitempty"`
+ TenantId string `json:"tenantId,omitempty"`
}
+
diff --git a/dto/GetOtpSecretByUserDto.go b/dto/GetOtpSecretByUserDto.go
index be14cc5..5ee7a6d 100644
--- a/dto/GetOtpSecretByUserDto.go
+++ b/dto/GetOtpSecretByUserDto.go
@@ -1,6 +1,8 @@
package dto
-type GetOtpSecretByUserDto struct {
- UserId string `json:"userId,omitempty"`
- UserIdType string `json:"userIdType,omitempty"`
+
+type GetOtpSecretByUserDto struct{
+ UserId string `json:"userId,omitempty"`
+ UserIdType string `json:"userIdType,omitempty"`
}
+
diff --git a/dto/GetOtpSecretRespDto.go b/dto/GetOtpSecretRespDto.go
index ab18f0c..193f603 100644
--- a/dto/GetOtpSecretRespDto.go
+++ b/dto/GetOtpSecretRespDto.go
@@ -1,9 +1,11 @@
package dto
-type GetOtpSecretRespDto struct {
- StatusCode int `json:"statusCode"`
- Message string `json:"message"`
- ApiCode int `json:"apiCode,omitempty"`
- RequestId string `json:"requestId,omitempty"`
- Data OtpSecretRespDto `json:"data"`
+
+type GetOtpSecretRespDto struct{
+ StatusCode int `json:"statusCode"`
+ Message string `json:"message"`
+ ApiCode int `json:"apiCode,omitempty"`
+ RequestId string `json:"requestId,omitempty"`
+ Data OtpSecretRespDto `json:"data"`
}
+
diff --git a/dto/GetParentDepartmentDto.go b/dto/GetParentDepartmentDto.go
index 376228d..9e6b657 100644
--- a/dto/GetParentDepartmentDto.go
+++ b/dto/GetParentDepartmentDto.go
@@ -1,9 +1,11 @@
package dto
-type GetParentDepartmentDto struct {
- OrganizationCode string `json:"organizationCode,omitempty"`
- DepartmentId string `json:"departmentId,omitempty"`
- DepartmentIdType string `json:"departmentIdType,omitempty"`
- WithCustomData bool `json:"withCustomData,omitempty"`
- TenantId string `json:"tenantId,omitempty"`
+
+type GetParentDepartmentDto struct{
+ OrganizationCode string `json:"organizationCode,omitempty"`
+ DepartmentId string `json:"departmentId,omitempty"`
+ DepartmentIdType string `json:"departmentIdType,omitempty"`
+ WithCustomData bool `json:"withCustomData,omitempty"`
+ TenantId string `json:"tenantId,omitempty"`
}
+
diff --git a/dto/GetPermissionNamespacesBatchDto.go b/dto/GetPermissionNamespacesBatchDto.go
index 3bf8ecd..9d730c8 100644
--- a/dto/GetPermissionNamespacesBatchDto.go
+++ b/dto/GetPermissionNamespacesBatchDto.go
@@ -2,6 +2,6 @@ package dto
type GetPermissionNamespacesBatchDto struct{
- Codes string `json:"codes,omitempty"`
+ Codes []string `json:"codes,omitempty"`
}
diff --git a/dto/GetPostByIdListDto.go b/dto/GetPostByIdListDto.go
new file mode 100644
index 0000000..b505302
--- /dev/null
+++ b/dto/GetPostByIdListDto.go
@@ -0,0 +1,8 @@
+package dto
+
+
+type GetPostByIdListDto struct{
+ IdList string `json:"idList,omitempty"`
+ WithCustomData bool `json:"withCustomData,omitempty"`
+}
+
diff --git a/dto/GetPostDto.go b/dto/GetPostDto.go
new file mode 100644
index 0000000..7edc58d
--- /dev/null
+++ b/dto/GetPostDto.go
@@ -0,0 +1,8 @@
+package dto
+
+
+type GetPostDto struct{
+ Code string `json:"code,omitempty"`
+ WithCustomData bool `json:"withCustomData,omitempty"`
+}
+
diff --git a/dto/GetPostOfPublicAccountDto.go b/dto/GetPostOfPublicAccountDto.go
new file mode 100644
index 0000000..35ce3c0
--- /dev/null
+++ b/dto/GetPostOfPublicAccountDto.go
@@ -0,0 +1,7 @@
+package dto
+
+
+type GetPostOfPublicAccountDto struct{
+ UserId string `json:"userId,omitempty"`
+}
+
diff --git a/dto/GetPublicAccountBatchDto.go b/dto/GetPublicAccountBatchDto.go
new file mode 100644
index 0000000..b1b3af9
--- /dev/null
+++ b/dto/GetPublicAccountBatchDto.go
@@ -0,0 +1,10 @@
+package dto
+
+
+type GetPublicAccountBatchDto struct{
+ UserIds []string `json:"userIds,omitempty"`
+ UserIdType string `json:"userIdType,omitempty"`
+ WithCustomData bool `json:"withCustomData,omitempty"`
+ WithDepartmentIds bool `json:"withDepartmentIds,omitempty"`
+}
+
diff --git a/dto/GetPublicAccountDataRespDto.go b/dto/GetPublicAccountDataRespDto.go
new file mode 100644
index 0000000..6c623a7
--- /dev/null
+++ b/dto/GetPublicAccountDataRespDto.go
@@ -0,0 +1,11 @@
+package dto
+
+
+type GetPublicAccountDataRespDto struct{
+ StatusCode int `json:"statusCode"`
+ Message string `json:"message"`
+ ApiCode int `json:"apiCode,omitempty"`
+ RequestId string `json:"requestId,omitempty"`
+ Data []GetUserSelectLoginPublicAccountsDataDto `json:"data"`
+}
+
diff --git a/dto/GetPublicAccountDto.go b/dto/GetPublicAccountDto.go
new file mode 100644
index 0000000..fb42ed9
--- /dev/null
+++ b/dto/GetPublicAccountDto.go
@@ -0,0 +1,10 @@
+package dto
+
+
+type GetPublicAccountDto struct{
+ UserId string `json:"userId,omitempty"`
+ UserIdType string `json:"userIdType,omitempty"`
+ WithCustomData bool `json:"withCustomData,omitempty"`
+ WithDepartmentIds bool `json:"withDepartmentIds,omitempty"`
+}
+
diff --git a/dto/GetPublicAccountsOfDepartmentDto.go b/dto/GetPublicAccountsOfDepartmentDto.go
new file mode 100644
index 0000000..ca9afbc
--- /dev/null
+++ b/dto/GetPublicAccountsOfDepartmentDto.go
@@ -0,0 +1,7 @@
+package dto
+
+
+type GetPublicAccountsOfDepartmentDto struct{
+ DepartmentId string `json:"departmentId,omitempty"`
+}
+
diff --git a/dto/GetPublicAccountsOfGroupDto.go b/dto/GetPublicAccountsOfGroupDto.go
new file mode 100644
index 0000000..af975e7
--- /dev/null
+++ b/dto/GetPublicAccountsOfGroupDto.go
@@ -0,0 +1,7 @@
+package dto
+
+
+type GetPublicAccountsOfGroupDto struct{
+ GroupId string `json:"groupId,omitempty"`
+}
+
diff --git a/dto/GetPublicAccountsOfPostDto.go b/dto/GetPublicAccountsOfPostDto.go
new file mode 100644
index 0000000..46082c6
--- /dev/null
+++ b/dto/GetPublicAccountsOfPostDto.go
@@ -0,0 +1,7 @@
+package dto
+
+
+type GetPublicAccountsOfPostDto struct{
+ PostId string `json:"postId,omitempty"`
+}
+
diff --git a/dto/GetPublicAccountsOfRoleDto.go b/dto/GetPublicAccountsOfRoleDto.go
new file mode 100644
index 0000000..9c12f18
--- /dev/null
+++ b/dto/GetPublicAccountsOfRoleDto.go
@@ -0,0 +1,7 @@
+package dto
+
+
+type GetPublicAccountsOfRoleDto struct{
+ RoleId string `json:"roleId,omitempty"`
+}
+
diff --git a/dto/GetPublicAccountsOfUserDto.go b/dto/GetPublicAccountsOfUserDto.go
new file mode 100644
index 0000000..a677e7c
--- /dev/null
+++ b/dto/GetPublicAccountsOfUserDto.go
@@ -0,0 +1,7 @@
+package dto
+
+
+type GetPublicAccountsOfUserDto struct{
+ UserId string `json:"userId,omitempty"`
+}
+
diff --git a/dto/GetPushCodeRelationAppsDataDto.go b/dto/GetPushCodeRelationAppsDataDto.go
new file mode 100644
index 0000000..ecf65eb
--- /dev/null
+++ b/dto/GetPushCodeRelationAppsDataDto.go
@@ -0,0 +1,7 @@
+package dto
+
+
+type GetPushCodeRelationAppsDataDto struct{
+ AppIds []string `json:"appIds,omitempty"`
+}
+
diff --git a/dto/GetPushCodeRelationAppsDto.go b/dto/GetPushCodeRelationAppsDto.go
new file mode 100644
index 0000000..a0c0430
--- /dev/null
+++ b/dto/GetPushCodeRelationAppsDto.go
@@ -0,0 +1,8 @@
+package dto
+
+
+type GetPushCodeRelationAppsDto struct{
+ AppId string `json:"appId"`
+ PushCodeId string `json:"pushCodeId"`
+}
+
diff --git a/dto/GetPushCodeRelationAppsRespDto.go b/dto/GetPushCodeRelationAppsRespDto.go
new file mode 100644
index 0000000..50d872c
--- /dev/null
+++ b/dto/GetPushCodeRelationAppsRespDto.go
@@ -0,0 +1,11 @@
+package dto
+
+
+type GetPushCodeRelationAppsRespDto struct{
+ StatusCode int `json:"statusCode"`
+ Message string `json:"message"`
+ ApiCode int `json:"apiCode,omitempty"`
+ RequestId string `json:"requestId,omitempty"`
+ Data GetPushCodeRelationAppsDataDto `json:"data"`
+}
+
diff --git a/dto/GetRegistrationOptionsRespDto.go b/dto/GetRegistrationOptionsRespDto.go
new file mode 100644
index 0000000..c744719
--- /dev/null
+++ b/dto/GetRegistrationOptionsRespDto.go
@@ -0,0 +1,11 @@
+package dto
+
+
+type GetRegistrationOptionsRespDto struct{
+ StatusCode int `json:"statusCode"`
+ Message string `json:"message"`
+ ApiCode int `json:"apiCode,omitempty"`
+ RequestId string `json:"requestId,omitempty"`
+ Data RegistrationOptionsDto `json:"data"`
+}
+
diff --git a/dto/GetRelationInfoDto.go b/dto/GetRelationInfoDto.go
new file mode 100644
index 0000000..bd4ab82
--- /dev/null
+++ b/dto/GetRelationInfoDto.go
@@ -0,0 +1,8 @@
+package dto
+
+
+type GetRelationInfoDto struct{
+ IdList []string `json:"idList"`
+ ModelId string `json:"modelId"`
+}
+
diff --git a/dto/GetResourcesBatchDto.go b/dto/GetResourcesBatchDto.go
index fdbef32..1806c83 100644
--- a/dto/GetResourcesBatchDto.go
+++ b/dto/GetResourcesBatchDto.go
@@ -2,7 +2,7 @@ package dto
type GetResourcesBatchDto struct{
- CodeList string `json:"codeList,omitempty"`
+ CodeList []string `json:"codeList,omitempty"`
Namespace string `json:"namespace,omitempty"`
}
diff --git a/dto/GetRolesOfPublicAccountDto.go b/dto/GetRolesOfPublicAccountDto.go
new file mode 100644
index 0000000..a9d1dad
--- /dev/null
+++ b/dto/GetRolesOfPublicAccountDto.go
@@ -0,0 +1,9 @@
+package dto
+
+
+type GetRolesOfPublicAccountDto struct{
+ UserId string `json:"userId,omitempty"`
+ UserIdType string `json:"userIdType,omitempty"`
+ Namespace string `json:"namespace,omitempty"`
+}
+
diff --git a/dto/GetRowBatchDto.go b/dto/GetRowBatchDto.go
new file mode 100644
index 0000000..eb8ca0a
--- /dev/null
+++ b/dto/GetRowBatchDto.go
@@ -0,0 +1,8 @@
+package dto
+
+
+type GetRowBatchDto struct{
+ RowIds []string `json:"rowIds"`
+ ModelId string `json:"modelId"`
+}
+
diff --git a/dto/GetRowByValueDto.go b/dto/GetRowByValueDto.go
new file mode 100644
index 0000000..c709ed2
--- /dev/null
+++ b/dto/GetRowByValueDto.go
@@ -0,0 +1,10 @@
+package dto
+
+
+type GetRowByValueDto struct{
+ ModelId string `json:"modelId,omitempty"`
+ Key string `json:"key,omitempty"`
+ Value string `json:"value,omitempty"`
+ ShowFieldId string `json:"showFieldId,omitempty"`
+}
+
diff --git a/dto/GetRowDto.go b/dto/GetRowDto.go
new file mode 100644
index 0000000..7c6ec09
--- /dev/null
+++ b/dto/GetRowDto.go
@@ -0,0 +1,9 @@
+package dto
+
+
+type GetRowDto struct{
+ ModelId string `json:"modelId,omitempty"`
+ RowId string `json:"rowId,omitempty"`
+ ShowFieldId string `json:"showFieldId,omitempty"`
+}
+
diff --git a/dto/GetRowRelationDto.go b/dto/GetRowRelationDto.go
new file mode 100644
index 0000000..4360402
--- /dev/null
+++ b/dto/GetRowRelationDto.go
@@ -0,0 +1,11 @@
+package dto
+
+
+type GetRowRelationDto struct{
+ ModelId string `json:"modelId,omitempty"`
+ FieldId string `json:"fieldId,omitempty"`
+ RowId string `json:"rowId,omitempty"`
+ Page int `json:"page,omitempty"`
+ Limit int `json:"limit,omitempty"`
+}
+
diff --git a/dto/GetSubjectAuthDataDto.go b/dto/GetSubjectAuthDataDto.go
new file mode 100644
index 0000000..d207c38
--- /dev/null
+++ b/dto/GetSubjectAuthDataDto.go
@@ -0,0 +1,14 @@
+package dto
+
+
+type GetSubjectAuthDataDto struct{
+ AppId string `json:"appId"`
+ AppName string `json:"appName"`
+ ReqTargetId string `json:"reqTargetId"`
+ ReqTargetName string `json:"reqTargetName"`
+ ReqTargetType string `json:"reqTargetType"`
+ TargetType string `json:"targetType"`
+ TargetName string `json:"targetName"`
+ AuthType string `json:"authType"`
+}
+
diff --git a/dto/GetSubjectAuthDetailDto.go b/dto/GetSubjectAuthDetailDto.go
new file mode 100644
index 0000000..c7aabb3
--- /dev/null
+++ b/dto/GetSubjectAuthDetailDto.go
@@ -0,0 +1,9 @@
+package dto
+
+
+type GetSubjectAuthDetailDto struct{
+ TargetId string `json:"targetId,omitempty"`
+ TargetType string `json:"targetType,omitempty"`
+ AppId string `json:"appId,omitempty"`
+}
+
diff --git a/dto/GetSubjectAuthRespDto.go b/dto/GetSubjectAuthRespDto.go
new file mode 100644
index 0000000..412803c
--- /dev/null
+++ b/dto/GetSubjectAuthRespDto.go
@@ -0,0 +1,11 @@
+package dto
+
+
+type GetSubjectAuthRespDto struct{
+ StatusCode int `json:"statusCode"`
+ Message string `json:"message"`
+ ApiCode int `json:"apiCode,omitempty"`
+ RequestId string `json:"requestId,omitempty"`
+ Data GetSubjectAuthDataDto `json:"data"`
+}
+
diff --git a/dto/GetTenantByCodeDto.go b/dto/GetTenantByCodeDto.go
new file mode 100644
index 0000000..057c413
--- /dev/null
+++ b/dto/GetTenantByCodeDto.go
@@ -0,0 +1,7 @@
+package dto
+
+
+type GetTenantByCodeDto struct{
+ Code string `json:"code,omitempty"`
+}
+
diff --git a/dto/GetTenantCooperatorDto.go b/dto/GetTenantCooperatorDto.go
new file mode 100644
index 0000000..5640b25
--- /dev/null
+++ b/dto/GetTenantCooperatorDto.go
@@ -0,0 +1,7 @@
+package dto
+
+
+type GetTenantCooperatorDto struct{
+ UserId string `json:"userId,omitempty"`
+}
+
diff --git a/dto/GetTenantCooperatorMenuDto.go b/dto/GetTenantCooperatorMenuDto.go
new file mode 100644
index 0000000..ae69c9a
--- /dev/null
+++ b/dto/GetTenantCooperatorMenuDto.go
@@ -0,0 +1,7 @@
+package dto
+
+
+type GetTenantCooperatorMenuDto struct{
+ UserId string `json:"userId,omitempty"`
+}
+
diff --git a/dto/GetTenantDto.go b/dto/GetTenantDto.go
index d49962e..9a0cd02 100644
--- a/dto/GetTenantDto.go
+++ b/dto/GetTenantDto.go
@@ -5,5 +5,7 @@ type GetTenantDto struct{
TenantId string `json:"tenantId,omitempty"`
WithMembersCount bool `json:"withMembersCount,omitempty"`
WithAppDetail bool `json:"withAppDetail,omitempty"`
+ WithCreatorDetail bool `json:"withCreatorDetail,omitempty"`
+ WithSourceAppDetail bool `json:"withSourceAppDetail,omitempty"`
}
diff --git a/dto/GetTenantLittleInfoDto.go b/dto/GetTenantLittleInfoDto.go
new file mode 100644
index 0000000..ba5fe9d
--- /dev/null
+++ b/dto/GetTenantLittleInfoDto.go
@@ -0,0 +1,11 @@
+package dto
+
+
+type GetTenantLittleInfoDto struct{
+ TenantId string `json:"tenantId,omitempty"`
+ WithMembersCount bool `json:"withMembersCount,omitempty"`
+ WithAppDetail bool `json:"withAppDetail,omitempty"`
+ WithCreatorDetail bool `json:"withCreatorDetail,omitempty"`
+ WithSourceAppDetail bool `json:"withSourceAppDetail,omitempty"`
+}
+
diff --git a/dto/GetUserAuthResourceListDataDto.go b/dto/GetUserAuthResourceListDataDto.go
index 40aaf66..2ee9d1d 100644
--- a/dto/GetUserAuthResourceListDataDto.go
+++ b/dto/GetUserAuthResourceListDataDto.go
@@ -1,5 +1,7 @@
package dto
-type GetUserAuthResourceListDataDto struct {
- UserPermissionList []UserAuthResourceListDto `json:"userPermissionList"`
+
+type GetUserAuthResourceListDataDto struct{
+ UserPermissionList []UserAuthResourceListDto `json:"userPermissionList"`
}
+
diff --git a/dto/GetUserAuthResourceListRespDto.go b/dto/GetUserAuthResourceListRespDto.go
index 95eb228..82fde63 100644
--- a/dto/GetUserAuthResourceListRespDto.go
+++ b/dto/GetUserAuthResourceListRespDto.go
@@ -1,8 +1,11 @@
package dto
-type GetUserAuthResourceListRespDto struct {
- StatusCode int `json:"statusCode"`
- Message string `json:"message"`
- ApiCode int `json:"apiCode,omitempty"`
- Data GetUserAuthResourceListDataDto `json:"data"`
+
+type GetUserAuthResourceListRespDto struct{
+ StatusCode int `json:"statusCode"`
+ Message string `json:"message"`
+ ApiCode int `json:"apiCode,omitempty"`
+ RequestId string `json:"requestId,omitempty"`
+ Data GetUserAuthResourceListDataDto `json:"data"`
}
+
diff --git a/dto/GetUserAuthResourcePermissionList.go b/dto/GetUserAuthResourcePermissionList.go
index dc0b3e1..4c98acb 100644
--- a/dto/GetUserAuthResourcePermissionList.go
+++ b/dto/GetUserAuthResourcePermissionList.go
@@ -1,7 +1,9 @@
package dto
-type GetUserAuthResourcePermissionList struct {
- NamespaceCode string `json:"namespaceCode"`
- Actions []string `json:"actions"`
- Resource string `json:"resource"`
+
+type GetUserAuthResourcePermissionList struct{
+ NamespaceCode string `json:"namespaceCode"`
+ Actions []string `json:"actions"`
+ Resource string `json:"resource"`
}
+
diff --git a/dto/GetUserAuthResourcePermissionListDataDto.go b/dto/GetUserAuthResourcePermissionListDataDto.go
index 776310e..615719e 100644
--- a/dto/GetUserAuthResourcePermissionListDataDto.go
+++ b/dto/GetUserAuthResourcePermissionListDataDto.go
@@ -1,5 +1,7 @@
package dto
-type GetUserAuthResourcePermissionListDataDto struct {
- PermissionList []GetUserAuthResourcePermissionList `json:"permissionList"`
+
+type GetUserAuthResourcePermissionListDataDto struct{
+ PermissionList []GetUserAuthResourcePermissionList `json:"permissionList"`
}
+
diff --git a/dto/GetUserAuthResourcePermissionListDto.go b/dto/GetUserAuthResourcePermissionListDto.go
index 3ac59c6..fcb8207 100644
--- a/dto/GetUserAuthResourcePermissionListDto.go
+++ b/dto/GetUserAuthResourcePermissionListDto.go
@@ -1,5 +1,7 @@
package dto
-type GetUserAuthResourcePermissionListDto struct {
- Resources []string `json:"resources"`
+
+type GetUserAuthResourcePermissionListDto struct{
+ Resources []string `json:"resources"`
}
+
diff --git a/dto/GetUserAuthResourcePermissionListRespDto.go b/dto/GetUserAuthResourcePermissionListRespDto.go
index 368c52d..68b5b19 100644
--- a/dto/GetUserAuthResourcePermissionListRespDto.go
+++ b/dto/GetUserAuthResourcePermissionListRespDto.go
@@ -1,9 +1,11 @@
package dto
-type GetUserAuthResourcePermissionListRespDto struct {
- StatusCode int `json:"statusCode"`
- Message string `json:"message"`
- ApiCode int `json:"apiCode,omitempty"`
- RequestId string `json:"requestId,omitempty"`
- Data GetUserAuthResourcePermissionListDataDto `json:"data"`
+
+type GetUserAuthResourcePermissionListRespDto struct{
+ StatusCode int `json:"statusCode"`
+ Message string `json:"message"`
+ ApiCode int `json:"apiCode,omitempty"`
+ RequestId string `json:"requestId,omitempty"`
+ Data GetUserAuthResourcePermissionListDataDto `json:"data"`
}
+
diff --git a/dto/GetUserAuthResourceStructDataDto.go b/dto/GetUserAuthResourceStructDataDto.go
index 86334ca..9a80c72 100644
--- a/dto/GetUserAuthResourceStructDataDto.go
+++ b/dto/GetUserAuthResourceStructDataDto.go
@@ -1,10 +1,12 @@
package dto
-type GetUserAuthResourceStructDataDto struct {
- NamespaceCode string `json:"namespaceCode"`
- ResourceCode string `json:"resourceCode"`
- ResourceType string `json:"resourceType"`
- StrResourceAuthAction StrResourceAuthAction `json:"strResourceAuthAction,omitempty"`
- ArrResourceAuthAction ArrResourceAuthAction `json:"arrResourceAuthAction,omitempty"`
- TreeResourceAuthAction TreeResourceAuthAction `json:"treeResourceAuthAction,omitempty"`
+
+type GetUserAuthResourceStructDataDto struct{
+ NamespaceCode string `json:"namespaceCode"`
+ ResourceCode string `json:"resourceCode"`
+ ResourceType string `json:"resourceType"`
+ StrResourceAuthAction StrResourceAuthAction `json:"strResourceAuthAction,omitempty"`
+ ArrResourceAuthAction ArrResourceAuthAction `json:"arrResourceAuthAction,omitempty"`
+ TreeResourceAuthAction TreeResourceAuthAction `json:"treeResourceAuthAction,omitempty"`
}
+
diff --git a/dto/GetUserAuthResourceStructDto.go b/dto/GetUserAuthResourceStructDto.go
index cc744bf..406e4af 100644
--- a/dto/GetUserAuthResourceStructDto.go
+++ b/dto/GetUserAuthResourceStructDto.go
@@ -1,5 +1,7 @@
package dto
-type GetUserAuthResourceStructDto struct {
- Resource string `json:"resource"`
+
+type GetUserAuthResourceStructDto struct{
+ Resource string `json:"resource"`
}
+
diff --git a/dto/GetUserAuthResourceStructRespDto.go b/dto/GetUserAuthResourceStructRespDto.go
index 14aa97e..66946ac 100644
--- a/dto/GetUserAuthResourceStructRespDto.go
+++ b/dto/GetUserAuthResourceStructRespDto.go
@@ -1,9 +1,11 @@
package dto
-type GetUserAuthResourceStructRespDto struct {
- StatusCode int `json:"statusCode"`
- Message string `json:"message"`
- ApiCode int `json:"apiCode,omitempty"`
- RequestId string `json:"requestId,omitempty"`
- Data GetUserAuthResourceStructDataDto `json:"data"`
+
+type GetUserAuthResourceStructRespDto struct{
+ StatusCode int `json:"statusCode"`
+ Message string `json:"message"`
+ ApiCode int `json:"apiCode,omitempty"`
+ RequestId string `json:"requestId,omitempty"`
+ Data GetUserAuthResourceStructDataDto `json:"data"`
}
+
diff --git a/dto/GetUserBatchDto.go b/dto/GetUserBatchDto.go
index 6150ffb..83cb77e 100644
--- a/dto/GetUserBatchDto.go
+++ b/dto/GetUserBatchDto.go
@@ -2,9 +2,10 @@ package dto
type GetUserBatchDto struct{
- UserIds string `json:"userIds,omitempty"`
+ UserIds []string `json:"userIds,omitempty"`
UserIdType string `json:"userIdType,omitempty"`
WithCustomData bool `json:"withCustomData,omitempty"`
+ FlatCustomData bool `json:"flatCustomData,omitempty"`
WithIdentities bool `json:"withIdentities,omitempty"`
WithDepartmentIds bool `json:"withDepartmentIds,omitempty"`
}
diff --git a/dto/GetUserDto.go b/dto/GetUserDto.go
index f8530fc..e24de13 100644
--- a/dto/GetUserDto.go
+++ b/dto/GetUserDto.go
@@ -4,7 +4,9 @@ package dto
type GetUserDto struct{
UserId string `json:"userId,omitempty"`
UserIdType string `json:"userIdType,omitempty"`
+ FlatCustomData bool `json:"flatCustomData,omitempty"`
WithCustomData bool `json:"withCustomData,omitempty"`
+ WithPost bool `json:"withPost,omitempty"`
WithIdentities bool `json:"withIdentities,omitempty"`
WithDepartmentIds bool `json:"withDepartmentIds,omitempty"`
}
diff --git a/dto/GetUserPasswordCiphertextDataDto.go b/dto/GetUserPasswordCiphertextDataDto.go
new file mode 100644
index 0000000..c7d72f6
--- /dev/null
+++ b/dto/GetUserPasswordCiphertextDataDto.go
@@ -0,0 +1,7 @@
+package dto
+
+
+type GetUserPasswordCiphertextDataDto struct{
+ Ciphertext string `json:"ciphertext"`
+}
+
diff --git a/dto/GetUserPasswordCiphertextDto.go b/dto/GetUserPasswordCiphertextDto.go
new file mode 100644
index 0000000..47a4bbd
--- /dev/null
+++ b/dto/GetUserPasswordCiphertextDto.go
@@ -0,0 +1,8 @@
+package dto
+
+
+type GetUserPasswordCiphertextDto struct{
+ UserId string `json:"userId"`
+ UserIdType string `json:"userIdType,omitempty"`
+}
+
diff --git a/dto/GetUserPasswordCiphertextRespDto.go b/dto/GetUserPasswordCiphertextRespDto.go
new file mode 100644
index 0000000..31f232a
--- /dev/null
+++ b/dto/GetUserPasswordCiphertextRespDto.go
@@ -0,0 +1,11 @@
+package dto
+
+
+type GetUserPasswordCiphertextRespDto struct{
+ StatusCode int `json:"statusCode"`
+ Message string `json:"message"`
+ ApiCode int `json:"apiCode,omitempty"`
+ RequestId string `json:"requestId,omitempty"`
+ Data GetUserPasswordCiphertextDataDto `json:"data"`
+}
+
diff --git a/dto/GetUserPostDto.go b/dto/GetUserPostDto.go
new file mode 100644
index 0000000..b6a20b0
--- /dev/null
+++ b/dto/GetUserPostDto.go
@@ -0,0 +1,8 @@
+package dto
+
+
+type GetUserPostDto struct{
+ UserId string `json:"userId,omitempty"`
+ WithCustomData bool `json:"withCustomData,omitempty"`
+}
+
diff --git a/dto/GetUserPostsDto.go b/dto/GetUserPostsDto.go
new file mode 100644
index 0000000..a3114d0
--- /dev/null
+++ b/dto/GetUserPostsDto.go
@@ -0,0 +1,8 @@
+package dto
+
+
+type GetUserPostsDto struct{
+ UserId string `json:"userId,omitempty"`
+ WithCustomData bool `json:"withCustomData,omitempty"`
+}
+
diff --git a/dto/GetUserResourceStructDataDto.go b/dto/GetUserResourceStructDataDto.go
index a5a06bb..2609b08 100644
--- a/dto/GetUserResourceStructDataDto.go
+++ b/dto/GetUserResourceStructDataDto.go
@@ -1,10 +1,12 @@
package dto
-type GetUserResourceStructDataDto struct {
- NamespaceCode string `json:"namespaceCode"`
- ResourceCode string `json:"resourceCode"`
- ResourceType string `json:"resourceType"`
- StrResourceAuthAction StrResourceAuthAction `json:"strResourceAuthAction,omitempty"`
- ArrResourceAuthAction ArrResourceAuthAction `json:"arrResourceAuthAction,omitempty"`
- TreeResourceAuthAction TreeResourceAuthAction `json:"treeResourceAuthAction,omitempty"`
+
+type GetUserResourceStructDataDto struct{
+ NamespaceCode string `json:"namespaceCode"`
+ ResourceCode string `json:"resourceCode"`
+ ResourceType string `json:"resourceType"`
+ StrResourceAuthAction StrResourceAuthAction `json:"strResourceAuthAction,omitempty"`
+ ArrResourceAuthAction ArrResourceAuthAction `json:"arrResourceAuthAction,omitempty"`
+ TreeResourceAuthAction TreeResourceAuthAction `json:"treeResourceAuthAction,omitempty"`
}
+
diff --git a/dto/GetUserResourceStructDto.go b/dto/GetUserResourceStructDto.go
index 42054dd..b676c64 100644
--- a/dto/GetUserResourceStructDto.go
+++ b/dto/GetUserResourceStructDto.go
@@ -1,7 +1,9 @@
package dto
-type GetUserResourceStructDto struct {
- ResourceCode string `json:"resourceCode"`
- UserId string `json:"userId"`
- NamespaceCode string `json:"namespaceCode"`
+
+type GetUserResourceStructDto struct{
+ ResourceCode string `json:"resourceCode"`
+ UserId string `json:"userId"`
+ NamespaceCode string `json:"namespaceCode"`
}
+
diff --git a/dto/GetUserResourceStructRespDto.go b/dto/GetUserResourceStructRespDto.go
index 57e8951..247e02a 100644
--- a/dto/GetUserResourceStructRespDto.go
+++ b/dto/GetUserResourceStructRespDto.go
@@ -1,9 +1,11 @@
package dto
-type GetUserResourceStructRespDto struct {
- StatusCode int `json:"statusCode"`
- Message string `json:"message"`
- ApiCode int `json:"apiCode,omitempty"`
- RequestId string `json:"requestId,omitempty"`
- Data GetUserResourceStructDataDto `json:"data"`
+
+type GetUserResourceStructRespDto struct{
+ StatusCode int `json:"statusCode"`
+ Message string `json:"message"`
+ ApiCode int `json:"apiCode,omitempty"`
+ RequestId string `json:"requestId,omitempty"`
+ Data GetUserResourceStructDataDto `json:"data"`
}
+
diff --git a/dto/GetUserSelectLoginPublicAccountsDataDto.go b/dto/GetUserSelectLoginPublicAccountsDataDto.go
new file mode 100644
index 0000000..f80e05d
--- /dev/null
+++ b/dto/GetUserSelectLoginPublicAccountsDataDto.go
@@ -0,0 +1,8 @@
+package dto
+
+
+type GetUserSelectLoginPublicAccountsDataDto struct{
+ PublicAccounts []ListPublicAccountDataDto `json:"publicAccounts"`
+ OriginUser GetUserSelectLoginPublicAccountsOriginUserDto `json:"originUser,omitempty"`
+}
+
diff --git a/dto/GetUserSelectLoginPublicAccountsDto.go b/dto/GetUserSelectLoginPublicAccountsDto.go
new file mode 100644
index 0000000..c0fb417
--- /dev/null
+++ b/dto/GetUserSelectLoginPublicAccountsDto.go
@@ -0,0 +1,7 @@
+package dto
+
+
+type GetUserSelectLoginPublicAccountsDto struct{
+ WithOriginUser bool `json:"withOriginUser,omitempty"`
+}
+
diff --git a/dto/GetUserSelectLoginPublicAccountsOriginUserDto.go b/dto/GetUserSelectLoginPublicAccountsOriginUserDto.go
new file mode 100644
index 0000000..a0e262c
--- /dev/null
+++ b/dto/GetUserSelectLoginPublicAccountsOriginUserDto.go
@@ -0,0 +1,10 @@
+package dto
+
+
+type GetUserSelectLoginPublicAccountsOriginUserDto struct{
+ UserId string `json:"userId"`
+ Avatar string `json:"avatar,omitempty"`
+ DisplayName string `json:"displayName,omitempty"`
+ Usertype string `json:"usertype,omitempty"`
+}
+
diff --git a/dto/GetUserSyncRelationsDto.go b/dto/GetUserSyncRelationsDto.go
new file mode 100644
index 0000000..9a47a06
--- /dev/null
+++ b/dto/GetUserSyncRelationsDto.go
@@ -0,0 +1,8 @@
+package dto
+
+
+type GetUserSyncRelationsDto struct{
+ UserId string `json:"userId,omitempty"`
+ UserIdType string `json:"userIdType,omitempty"`
+}
+
diff --git a/dto/GetUsersOfPublicAccountDto.go b/dto/GetUsersOfPublicAccountDto.go
new file mode 100644
index 0000000..69adecc
--- /dev/null
+++ b/dto/GetUsersOfPublicAccountDto.go
@@ -0,0 +1,7 @@
+package dto
+
+
+type GetUsersOfPublicAccountDto struct{
+ PublicAccountId string `json:"publicAccountId,omitempty"`
+}
+
diff --git a/dto/GetWechatAccessTokenDataDto.go b/dto/GetWechatAccessTokenDataDto.go
index 790a352..19aa497 100644
--- a/dto/GetWechatAccessTokenDataDto.go
+++ b/dto/GetWechatAccessTokenDataDto.go
@@ -3,6 +3,6 @@ package dto
type GetWechatAccessTokenDataDto struct{
AccessToken string `json:"accessToken"`
- ExpiresAt int `json:"expiresAt"`
+ ExpiresAt string `json:"expiresAt"`
}
diff --git a/dto/GetWechatAccessTokenDto.go b/dto/GetWechatAccessTokenDto.go
index 0a5898a..ef311ab 100644
--- a/dto/GetWechatAccessTokenDto.go
+++ b/dto/GetWechatAccessTokenDto.go
@@ -2,7 +2,7 @@ package dto
type GetWechatAccessTokenDto struct{
- AppSecret string `json:"appSecret"`
AppId string `json:"appId"`
+ AppSecret string `json:"appSecret"`
}
diff --git a/dto/GetWechatAccessTokenInfoRespDto.go b/dto/GetWechatAccessTokenInfoRespDto.go
new file mode 100644
index 0000000..d9e6f4f
--- /dev/null
+++ b/dto/GetWechatAccessTokenInfoRespDto.go
@@ -0,0 +1,11 @@
+package dto
+
+
+type GetWechatAccessTokenInfoRespDto struct{
+ StatusCode int `json:"statusCode"`
+ Message string `json:"message"`
+ ApiCode int `json:"apiCode,omitempty"`
+ RequestId string `json:"requestId,omitempty"`
+ Data GetWechatAccessTokenDataDto `json:"data"`
+}
+
diff --git a/dto/GroupBo.go b/dto/GroupBo.go
new file mode 100644
index 0000000..3df4518
--- /dev/null
+++ b/dto/GroupBo.go
@@ -0,0 +1,9 @@
+package dto
+
+
+type GroupBo struct{
+ GroupId string `json:"groupId"`
+ GroupName string `json:"groupName"`
+ GroupCode string `json:"groupCode"`
+}
+
diff --git a/dto/GroupDto.go b/dto/GroupDto.go
index 7f10102..4537376 100644
--- a/dto/GroupDto.go
+++ b/dto/GroupDto.go
@@ -1,9 +1,13 @@
package dto
-type GroupDto struct {
- Id string `json:"id"`
- Code string `json:"code"`
- Name string `json:"name"`
- Description string `json:"description"`
- Type string `json:"type"`
+
+type GroupDto struct{
+ Id string `json:"id"`
+ Code string `json:"code"`
+ Name string `json:"name"`
+ Description string `json:"description"`
+ Type string `json:"type"`
+ MetadataSource []string `json:"metadataSource"`
+ Members []UserDto `json:"members"`
}
+
diff --git a/dto/ISsoPageCustomizationSettingsDto.go b/dto/ISsoPageCustomizationSettingsDto.go
index d1ab88a..aa32e32 100644
--- a/dto/ISsoPageCustomizationSettingsDto.go
+++ b/dto/ISsoPageCustomizationSettingsDto.go
@@ -1,4 +1,6 @@
package dto
-type ISsoPageCustomizationSettingsDto struct {
+
+type ISsoPageCustomizationSettingsDto struct{
}
+
diff --git a/dto/IdentityDto.go b/dto/IdentityDto.go
index 05fea0c..0035f45 100644
--- a/dto/IdentityDto.go
+++ b/dto/IdentityDto.go
@@ -1,13 +1,15 @@
package dto
-type IdentityDto struct {
- IdentityId string `json:"identityId"`
- ExtIdpId string `json:"extIdpId"`
- Provider string `json:"provider"`
- Type string `json:"type"`
- UserIdInIdp string `json:"userIdInIdp"`
- UserInfoInIdp User `json:"userInfoInIdp"`
- AccessToken string `json:"accessToken,omitempty"`
- RefreshToken string `json:"refreshToken,omitempty"`
- OriginConnIds []string `json:"originConnIds"`
+
+type IdentityDto struct{
+ IdentityId string `json:"identityId"`
+ ExtIdpId string `json:"extIdpId"`
+ Provider string `json:"provider"`
+ Type string `json:"type"`
+ UserIdInIdp string `json:"userIdInIdp"`
+ UserInfoInIdp interface{} `json:"userInfoInIdp"`
+ AccessToken string `json:"accessToken,omitempty"`
+ RefreshToken string `json:"refreshToken,omitempty"`
+ OriginConnIds []string `json:"originConnIds"`
}
+
diff --git a/dto/ImportMetadataDto.go b/dto/ImportMetadataDto.go
new file mode 100644
index 0000000..ceaa8b5
--- /dev/null
+++ b/dto/ImportMetadataDto.go
@@ -0,0 +1,7 @@
+package dto
+
+
+type ImportMetadataDto struct{
+ File string `json:"file"`
+}
+
diff --git a/dto/ImportModelDto.go b/dto/ImportModelDto.go
new file mode 100644
index 0000000..ad5bbc1
--- /dev/null
+++ b/dto/ImportModelDto.go
@@ -0,0 +1,8 @@
+package dto
+
+
+type ImportModelDto struct{
+ File string `json:"file"`
+ ModelId string `json:"modelId"`
+}
+
diff --git a/dto/ImportTenantDataDto.go b/dto/ImportTenantDataDto.go
new file mode 100644
index 0000000..6b1b86f
--- /dev/null
+++ b/dto/ImportTenantDataDto.go
@@ -0,0 +1,7 @@
+package dto
+
+
+type ImportTenantDataDto struct{
+ Success bool `json:"success"`
+}
+
diff --git a/dto/ImportTenantDto.go b/dto/ImportTenantDto.go
new file mode 100644
index 0000000..0ebb7b1
--- /dev/null
+++ b/dto/ImportTenantDto.go
@@ -0,0 +1,7 @@
+package dto
+
+
+type ImportTenantDto struct{
+ ExcelUrl string `json:"excelUrl"`
+}
+
diff --git a/dto/ImportTenantHistoryDataDto.go b/dto/ImportTenantHistoryDataDto.go
new file mode 100644
index 0000000..75c802f
--- /dev/null
+++ b/dto/ImportTenantHistoryDataDto.go
@@ -0,0 +1,8 @@
+package dto
+
+
+type ImportTenantHistoryDataDto struct{
+ TotalCount int `json:"totalCount"`
+ List []interface{} `json:"list"`
+}
+
diff --git a/dto/ImportTenantHistoryDto.go b/dto/ImportTenantHistoryDto.go
new file mode 100644
index 0000000..48243c4
--- /dev/null
+++ b/dto/ImportTenantHistoryDto.go
@@ -0,0 +1,8 @@
+package dto
+
+
+type ImportTenantHistoryDto struct{
+ Page string `json:"page,omitempty"`
+ Limit string `json:"limit,omitempty"`
+}
+
diff --git a/dto/ImportTenantHistoryRespDto.go b/dto/ImportTenantHistoryRespDto.go
new file mode 100644
index 0000000..8d79e06
--- /dev/null
+++ b/dto/ImportTenantHistoryRespDto.go
@@ -0,0 +1,11 @@
+package dto
+
+
+type ImportTenantHistoryRespDto struct{
+ StatusCode int `json:"statusCode"`
+ Message string `json:"message"`
+ ApiCode int `json:"apiCode,omitempty"`
+ RequestId string `json:"requestId,omitempty"`
+ Data ImportTenantHistoryDataDto `json:"data"`
+}
+
diff --git a/dto/ImportTenantNotifyUseDataDto.go b/dto/ImportTenantNotifyUseDataDto.go
new file mode 100644
index 0000000..ddcddab
--- /dev/null
+++ b/dto/ImportTenantNotifyUseDataDto.go
@@ -0,0 +1,8 @@
+package dto
+
+
+type ImportTenantNotifyUseDataDto struct{
+ TotalCount int `json:"totalCount"`
+ List []interface{} `json:"list"`
+}
+
diff --git a/dto/ImportTenantNotifyUserDto.go b/dto/ImportTenantNotifyUserDto.go
new file mode 100644
index 0000000..d5b079b
--- /dev/null
+++ b/dto/ImportTenantNotifyUserDto.go
@@ -0,0 +1,9 @@
+package dto
+
+
+type ImportTenantNotifyUserDto struct{
+ ImportId string `json:"importId,omitempty"`
+ Page string `json:"page,omitempty"`
+ Limit string `json:"limit,omitempty"`
+}
+
diff --git a/dto/ImportTenantNotifyUserRespDto.go b/dto/ImportTenantNotifyUserRespDto.go
new file mode 100644
index 0000000..08a34b9
--- /dev/null
+++ b/dto/ImportTenantNotifyUserRespDto.go
@@ -0,0 +1,11 @@
+package dto
+
+
+type ImportTenantNotifyUserRespDto struct{
+ StatusCode int `json:"statusCode"`
+ Message string `json:"message"`
+ ApiCode int `json:"apiCode,omitempty"`
+ RequestId string `json:"requestId,omitempty"`
+ Data ImportTenantNotifyUseDataDto `json:"data"`
+}
+
diff --git a/dto/ImportTenantRespDto.go b/dto/ImportTenantRespDto.go
new file mode 100644
index 0000000..6811889
--- /dev/null
+++ b/dto/ImportTenantRespDto.go
@@ -0,0 +1,11 @@
+package dto
+
+
+type ImportTenantRespDto struct{
+ StatusCode int `json:"statusCode"`
+ Message string `json:"message"`
+ ApiCode int `json:"apiCode,omitempty"`
+ RequestId string `json:"requestId,omitempty"`
+ Data ImportTenantDataDto `json:"data"`
+}
+
diff --git a/dto/InviteTenantUserRecord.go b/dto/InviteTenantUserRecord.go
new file mode 100644
index 0000000..cd96eb4
--- /dev/null
+++ b/dto/InviteTenantUserRecord.go
@@ -0,0 +1,12 @@
+package dto
+
+
+type InviteTenantUserRecord struct{
+ RecordId int `json:"recordId"`
+ InviteAccount string `json:"inviteAccount"`
+ VerifiedStatus string `json:"verifiedStatus"`
+ InviteLink string `json:"inviteLink"`
+ CreatedAt string `json:"createdAt"`
+ ActivatedAt string `json:"activatedAt"`
+}
+
diff --git a/dto/InviteTenantUserRecordListDto.go b/dto/InviteTenantUserRecordListDto.go
new file mode 100644
index 0000000..d22980c
--- /dev/null
+++ b/dto/InviteTenantUserRecordListDto.go
@@ -0,0 +1,8 @@
+package dto
+
+
+type InviteTenantUserRecordListDto struct{
+ TotalCount int `json:"totalCount"`
+ List []InviteTenantUserRecord `json:"list"`
+}
+
diff --git a/dto/InviteTenantUserRecordListRespDto.go b/dto/InviteTenantUserRecordListRespDto.go
new file mode 100644
index 0000000..7ff750f
--- /dev/null
+++ b/dto/InviteTenantUserRecordListRespDto.go
@@ -0,0 +1,11 @@
+package dto
+
+
+type InviteTenantUserRecordListRespDto struct{
+ StatusCode int `json:"statusCode"`
+ Message string `json:"message"`
+ ApiCode int `json:"apiCode,omitempty"`
+ RequestId string `json:"requestId,omitempty"`
+ Data InviteTenantUserRecordListDto `json:"data"`
+}
+
diff --git a/dto/InviteTenantUsersDto.go b/dto/InviteTenantUsersDto.go
new file mode 100644
index 0000000..09981ff
--- /dev/null
+++ b/dto/InviteTenantUsersDto.go
@@ -0,0 +1,8 @@
+package dto
+
+
+type InviteTenantUsersDto struct{
+ ErrMsgs []errorEmailMsg `json:"errMsgs"`
+ List []InviteTenantUserRecord `json:"list"`
+}
+
diff --git a/dto/InviteTenantUsersRespDto.go b/dto/InviteTenantUsersRespDto.go
new file mode 100644
index 0000000..81d34f9
--- /dev/null
+++ b/dto/InviteTenantUsersRespDto.go
@@ -0,0 +1,11 @@
+package dto
+
+
+type InviteTenantUsersRespDto struct{
+ StatusCode int `json:"statusCode"`
+ Message string `json:"message"`
+ ApiCode int `json:"apiCode,omitempty"`
+ RequestId string `json:"requestId,omitempty"`
+ Data InviteTenantUsersDto `json:"data"`
+}
+
diff --git a/dto/IpListCreateDto.go b/dto/IpListCreateDto.go
new file mode 100644
index 0000000..5c48981
--- /dev/null
+++ b/dto/IpListCreateDto.go
@@ -0,0 +1,12 @@
+package dto
+
+
+type IpListCreateDto struct{
+ ExpireAt string `json:"expireAt"`
+ LimitList []string `json:"limitList"`
+ RemoveType string `json:"removeType"`
+ AddType string `json:"addType"`
+ IpType string `json:"ipType"`
+ Ips string `json:"ips"`
+}
+
diff --git a/dto/IpListDto.go b/dto/IpListDto.go
new file mode 100644
index 0000000..77a6ceb
--- /dev/null
+++ b/dto/IpListDto.go
@@ -0,0 +1,9 @@
+package dto
+
+
+type IpListDto struct{
+ IpType string `json:"ipType,omitempty"`
+ Page int `json:"page,omitempty"`
+ Limit int `json:"limit,omitempty"`
+}
+
diff --git a/dto/IpListPaginatedRespDto.go b/dto/IpListPaginatedRespDto.go
new file mode 100644
index 0000000..c7a7bf8
--- /dev/null
+++ b/dto/IpListPaginatedRespDto.go
@@ -0,0 +1,11 @@
+package dto
+
+
+type IpListPaginatedRespDto struct{
+ StatusCode int `json:"statusCode"`
+ Message string `json:"message"`
+ ApiCode int `json:"apiCode,omitempty"`
+ RequestId string `json:"requestId,omitempty"`
+ Data IpListPagingDto `json:"data"`
+}
+
diff --git a/dto/IpListPagingDto.go b/dto/IpListPagingDto.go
new file mode 100644
index 0000000..1c91790
--- /dev/null
+++ b/dto/IpListPagingDto.go
@@ -0,0 +1,8 @@
+package dto
+
+
+type IpListPagingDto struct{
+ TotalCount int `json:"totalCount"`
+ List []IpListRespDto `json:"list"`
+}
+
diff --git a/dto/IpListRespDto.go b/dto/IpListRespDto.go
new file mode 100644
index 0000000..1f85dcd
--- /dev/null
+++ b/dto/IpListRespDto.go
@@ -0,0 +1,12 @@
+package dto
+
+
+type IpListRespDto struct{
+ Id string `json:"id"`
+ Ip string `json:"ip"`
+ IpType string `json:"ipType"`
+ AddType string `json:"addType"`
+ RemoveType string `json:"removeType"`
+ LimitList []string `json:"limitList"`
+}
+
diff --git a/dto/IsActionAllowedDto.go b/dto/IsActionAllowedDto.go
index af59870..1085c12 100644
--- a/dto/IsActionAllowedDto.go
+++ b/dto/IsActionAllowedDto.go
@@ -1,8 +1,10 @@
package dto
-type IsActionAllowedDto struct {
- UserId string `json:"userId"`
- Action string `json:"action"`
- Resource string `json:"resource"`
- Namespace string `json:"namespace,omitempty"`
+
+type IsActionAllowedDto struct{
+ UserId string `json:"userId"`
+ Action string `json:"action"`
+ Resource string `json:"resource"`
+ Namespace string `json:"namespace,omitempty"`
}
+
diff --git a/dto/IsUserInDepartmentDto.go b/dto/IsUserInDepartmentDto.go
index a281915..e75beb5 100644
--- a/dto/IsUserInDepartmentDto.go
+++ b/dto/IsUserInDepartmentDto.go
@@ -1,10 +1,12 @@
package dto
-type IsUserInDepartmentDto struct {
- UserId string `json:"userId,omitempty"`
- OrganizationCode string `json:"organizationCode,omitempty"`
- DepartmentId string `json:"departmentId,omitempty"`
- DepartmentIdType string `json:"departmentIdType,omitempty"`
- IncludeChildrenDepartments bool `json:"includeChildrenDepartments,omitempty"`
- TenantId string `json:"tenantId,omitempty"`
+
+type IsUserInDepartmentDto struct{
+ UserId string `json:"userId,omitempty"`
+ OrganizationCode string `json:"organizationCode,omitempty"`
+ DepartmentId string `json:"departmentId,omitempty"`
+ DepartmentIdType string `json:"departmentIdType,omitempty"`
+ IncludeChildrenDepartments bool `json:"includeChildrenDepartments,omitempty"`
+ TenantId string `json:"tenantId,omitempty"`
}
+
diff --git a/dto/KickPublicAccountsDto.go b/dto/KickPublicAccountsDto.go
new file mode 100644
index 0000000..f10dbd8
--- /dev/null
+++ b/dto/KickPublicAccountsDto.go
@@ -0,0 +1,9 @@
+package dto
+
+
+type KickPublicAccountsDto struct{
+ AppIds []string `json:"appIds"`
+ UserId string `json:"userId"`
+ Options KickPublicAccountsOptionsDto `json:"options,omitempty"`
+}
+
diff --git a/dto/KickPublicAccountsOptionsDto.go b/dto/KickPublicAccountsOptionsDto.go
new file mode 100644
index 0000000..cdf711b
--- /dev/null
+++ b/dto/KickPublicAccountsOptionsDto.go
@@ -0,0 +1,7 @@
+package dto
+
+
+type KickPublicAccountsOptionsDto struct{
+ UserIdType string `json:"userIdType,omitempty"`
+}
+
diff --git a/dto/LangObject.go b/dto/LangObject.go
index c39fd57..e57b96a 100644
--- a/dto/LangObject.go
+++ b/dto/LangObject.go
@@ -1,8 +1,8 @@
package dto
type LangObject struct {
- zhCN LangUnit `json:"zh-CN"`
- enUS LangUnit `json:"en-US"`
- zhTW LangUnit `json:"zh-TW"`
- jaJP LangUnit `json:"ja-JP"`
+ zhCN LangUnit `json:"zh-CN"`
+ enUS LangUnit `json:"en-US"`
+ zhTW LangUnit `json:"zh-TW"`
+ jaJP LangUnit `json:"ja-JP"`
}
diff --git a/dto/LanguageCoinfigDto.go b/dto/LanguageCoinfigDto.go
index ad33d47..590af39 100644
--- a/dto/LanguageCoinfigDto.go
+++ b/dto/LanguageCoinfigDto.go
@@ -1,5 +1,7 @@
package dto
-type LanguageCoinfigDto struct {
- Global LanguageCoinfigGlobalDto `json:"global"`
+
+type LanguageCoinfigDto struct{
+ Global LanguageCoinfigGlobalDto `json:"global"`
}
+
diff --git a/dto/LanguageCoinfigGlobalDto.go b/dto/LanguageCoinfigGlobalDto.go
index 06e1614..42c811e 100644
--- a/dto/LanguageCoinfigGlobalDto.go
+++ b/dto/LanguageCoinfigGlobalDto.go
@@ -1,4 +1,6 @@
package dto
-type LanguageCoinfigGlobalDto struct {
+
+type LanguageCoinfigGlobalDto struct{
}
+
diff --git a/dto/LdapConfigInfoDto.go b/dto/LdapConfigInfoDto.go
new file mode 100644
index 0000000..3729c25
--- /dev/null
+++ b/dto/LdapConfigInfoDto.go
@@ -0,0 +1,20 @@
+package dto
+
+
+type LdapConfigInfoDto struct{
+ Id string `json:"id,omitempty"`
+ Enabled int `json:"enabled"`
+ UserPoolId string `json:"userPoolId"`
+ LinkUrl string `json:"linkUrl"`
+ LdapsLinkUrl string `json:"ldapsLinkUrl"`
+ EnablePrivatization int `json:"enablePrivatization"`
+ BindDn string `json:"bindDn"`
+ LdapDomain string `json:"ldapDomain"`
+ EnableSsl int `json:"enableSsl,omitempty"`
+ BaseDn string `json:"baseDn"`
+ BindPwd string `json:"bindPwd"`
+ VisibleOrgNodes interface{} `json:"visibleOrgNodes"`
+ VisibleFields interface{} `json:"visibleFields"`
+ UdfMapping interface{} `json:"udfMapping"`
+}
+
diff --git a/dto/LdapConfigInfoRespDto.go b/dto/LdapConfigInfoRespDto.go
new file mode 100644
index 0000000..c06fd47
--- /dev/null
+++ b/dto/LdapConfigInfoRespDto.go
@@ -0,0 +1,11 @@
+package dto
+
+
+type LdapConfigInfoRespDto struct{
+ StatusCode int `json:"statusCode"`
+ Message string `json:"message"`
+ ApiCode int `json:"apiCode,omitempty"`
+ RequestId string `json:"requestId,omitempty"`
+ Data LdapConfigInfoDto `json:"data"`
+}
+
diff --git a/dto/LdapGetBindPwdRespDto.go b/dto/LdapGetBindPwdRespDto.go
new file mode 100644
index 0000000..5ba9479
--- /dev/null
+++ b/dto/LdapGetBindPwdRespDto.go
@@ -0,0 +1,11 @@
+package dto
+
+
+type LdapGetBindPwdRespDto struct{
+ StatusCode int `json:"statusCode"`
+ Message string `json:"message"`
+ ApiCode int `json:"apiCode,omitempty"`
+ RequestId string `json:"requestId,omitempty"`
+ Data string `json:"data"`
+}
+
diff --git a/dto/LdapLogDto.go b/dto/LdapLogDto.go
new file mode 100644
index 0000000..dc77592
--- /dev/null
+++ b/dto/LdapLogDto.go
@@ -0,0 +1,8 @@
+package dto
+
+
+type LdapLogDto struct{
+ TotalCount int `json:"totalCount"`
+ List interface{} `json:"list"`
+}
+
diff --git a/dto/LdapLogRespDto.go b/dto/LdapLogRespDto.go
new file mode 100644
index 0000000..eb72310
--- /dev/null
+++ b/dto/LdapLogRespDto.go
@@ -0,0 +1,11 @@
+package dto
+
+
+type LdapLogRespDto struct{
+ StatusCode int `json:"statusCode"`
+ Message string `json:"message"`
+ ApiCode int `json:"apiCode,omitempty"`
+ RequestId string `json:"requestId,omitempty"`
+ Data LdapLogDto `json:"data"`
+}
+
diff --git a/dto/LdapOperateRespDto.go b/dto/LdapOperateRespDto.go
new file mode 100644
index 0000000..d1c3416
--- /dev/null
+++ b/dto/LdapOperateRespDto.go
@@ -0,0 +1,11 @@
+package dto
+
+
+type LdapOperateRespDto struct{
+ StatusCode int `json:"statusCode"`
+ Message string `json:"message"`
+ ApiCode int `json:"apiCode,omitempty"`
+ RequestId string `json:"requestId,omitempty"`
+ Data bool `json:"data"`
+}
+
diff --git a/dto/LdapSaveDto.go b/dto/LdapSaveDto.go
new file mode 100644
index 0000000..a1f8b22
--- /dev/null
+++ b/dto/LdapSaveDto.go
@@ -0,0 +1,8 @@
+package dto
+
+
+type LdapSaveDto struct{
+ LdapDomain string `json:"ldapDomain"`
+ LinkUrl string `json:"linkUrl,omitempty"`
+}
+
diff --git a/dto/LdapSetEnabledFlagDto.go b/dto/LdapSetEnabledFlagDto.go
new file mode 100644
index 0000000..12e2983
--- /dev/null
+++ b/dto/LdapSetEnabledFlagDto.go
@@ -0,0 +1,7 @@
+package dto
+
+
+type LdapSetEnabledFlagDto struct{
+ Enabled bool `json:"enabled"`
+}
+
diff --git a/dto/LdapUpdateDto.go b/dto/LdapUpdateDto.go
new file mode 100644
index 0000000..af06e29
--- /dev/null
+++ b/dto/LdapUpdateDto.go
@@ -0,0 +1,7 @@
+package dto
+
+
+type LdapUpdateDto struct{
+ BindPwd string `json:"bindPwd,omitempty"`
+}
+
diff --git a/dto/LinkIdentityDataDto.go b/dto/LinkIdentityDataDto.go
new file mode 100644
index 0000000..3d55de3
--- /dev/null
+++ b/dto/LinkIdentityDataDto.go
@@ -0,0 +1,7 @@
+package dto
+
+
+type LinkIdentityDataDto struct{
+ Success bool `json:"success"`
+}
+
diff --git a/dto/LinkIdentityDto.go b/dto/LinkIdentityDto.go
new file mode 100644
index 0000000..632c919
--- /dev/null
+++ b/dto/LinkIdentityDto.go
@@ -0,0 +1,11 @@
+package dto
+
+
+type LinkIdentityDto struct{
+ UserIdInIdp string `json:"userIdInIdp"`
+ UserId string `json:"userId"`
+ ExtIdpId string `json:"extIdpId"`
+ Type string `json:"type,omitempty"`
+ IsSocial bool `json:"isSocial,omitempty"`
+}
+
diff --git a/dto/LinkIdentityResDto.go b/dto/LinkIdentityResDto.go
new file mode 100644
index 0000000..9af962e
--- /dev/null
+++ b/dto/LinkIdentityResDto.go
@@ -0,0 +1,11 @@
+package dto
+
+
+type LinkIdentityResDto struct{
+ StatusCode int `json:"statusCode"`
+ Message string `json:"message"`
+ ApiCode int `json:"apiCode,omitempty"`
+ RequestId string `json:"requestId,omitempty"`
+ Data LinkIdentityDataDto `json:"data"`
+}
+
diff --git a/dto/ListAccessKeyDto.go b/dto/ListAccessKeyDto.go
index 3d77a8c..005ebef 100644
--- a/dto/ListAccessKeyDto.go
+++ b/dto/ListAccessKeyDto.go
@@ -1,8 +1,10 @@
package dto
-type ListAccessKeyDto struct {
- UserId string `json:"userId,omitempty"`
- TenantId string `json:"tenantId,omitempty"`
- Type string `json:"type,omitempty"`
- Status string `json:"status,omitempty"`
+
+type ListAccessKeyDto struct{
+ UserId string `json:"userId,omitempty"`
+ TenantId string `json:"tenantId,omitempty"`
+ Type string `json:"type,omitempty"`
+ Status []string `json:"status,omitempty"`
}
+
diff --git a/dto/ListAccessKeyRespDto.go b/dto/ListAccessKeyRespDto.go
index 52274bf..7b6cd26 100644
--- a/dto/ListAccessKeyRespDto.go
+++ b/dto/ListAccessKeyRespDto.go
@@ -1,12 +1,14 @@
package dto
-type ListAccessKeyRespDto struct {
- AccessKeyId string `json:"accessKeyId"`
- AccessKeySecret string `json:"accessKeySecret"`
- UserId string `json:"userId"`
- CreatedAt string `json:"createdAt"`
- Status string `json:"status"`
- LastDate string `json:"lastDate"`
- UserPoolId string `json:"userPoolId"`
- Enable bool `json:"enable"`
+
+type ListAccessKeyRespDto struct{
+ AccessKeyId string `json:"accessKeyId"`
+ AccessKeySecret string `json:"accessKeySecret"`
+ UserId string `json:"userId"`
+ CreatedAt string `json:"createdAt"`
+ Status string `json:"status"`
+ LastDate string `json:"lastDate"`
+ UserPoolId string `json:"userPoolId"`
+ Enable bool `json:"enable"`
}
+
diff --git a/dto/ListApplicationAuthDataDto.go b/dto/ListApplicationAuthDataDto.go
new file mode 100644
index 0000000..4ce1df1
--- /dev/null
+++ b/dto/ListApplicationAuthDataDto.go
@@ -0,0 +1,13 @@
+package dto
+
+
+type ListApplicationAuthDataDto struct{
+ Id string `json:"id"`
+ TargetId string `json:"targetId"`
+ TargetName string `json:"targetName"`
+ TargetType string `json:"targetType"`
+ Effect string `json:"effect"`
+ Enabled bool `json:"enabled"`
+ PermissionType string `json:"permissionType"`
+}
+
diff --git a/dto/ListApplicationAuthDto.go b/dto/ListApplicationAuthDto.go
new file mode 100644
index 0000000..a0d21df
--- /dev/null
+++ b/dto/ListApplicationAuthDto.go
@@ -0,0 +1,13 @@
+package dto
+
+
+type ListApplicationAuthDto struct{
+ AppId string `json:"appId"`
+ Page int `json:"page,omitempty"`
+ Limit int `json:"limit,omitempty"`
+ TargetName string `json:"targetName,omitempty"`
+ TargetTypeList []string `json:"targetTypeList,omitempty"`
+ Effect string `json:"effect,omitempty"`
+ Enabled bool `json:"enabled,omitempty"`
+}
+
diff --git a/dto/ListApplicationAuthPaginatedDataDto.go b/dto/ListApplicationAuthPaginatedDataDto.go
new file mode 100644
index 0000000..7520b65
--- /dev/null
+++ b/dto/ListApplicationAuthPaginatedDataDto.go
@@ -0,0 +1,8 @@
+package dto
+
+
+type ListApplicationAuthPaginatedDataDto struct{
+ List []ListApplicationAuthDataDto `json:"list"`
+ TotalCount int `json:"totalCount"`
+}
+
diff --git a/dto/ListApplicationAuthPaginatedRespDto.go b/dto/ListApplicationAuthPaginatedRespDto.go
new file mode 100644
index 0000000..15ffd69
--- /dev/null
+++ b/dto/ListApplicationAuthPaginatedRespDto.go
@@ -0,0 +1,11 @@
+package dto
+
+
+type ListApplicationAuthPaginatedRespDto struct{
+ StatusCode int `json:"statusCode"`
+ Message string `json:"message"`
+ ApiCode int `json:"apiCode,omitempty"`
+ RequestId string `json:"requestId,omitempty"`
+ Data ListApplicationAuthPaginatedDataDto `json:"data"`
+}
+
diff --git a/dto/ListApplicationSubjectDataDto.go b/dto/ListApplicationSubjectDataDto.go
new file mode 100644
index 0000000..2dea6c2
--- /dev/null
+++ b/dto/ListApplicationSubjectDataDto.go
@@ -0,0 +1,12 @@
+package dto
+
+
+type ListApplicationSubjectDataDto struct{
+ AppId string `json:"appId"`
+ Logo string `json:"logo"`
+ Ext string `json:"ext"`
+ Template string `json:"template"`
+ AppType string `json:"appType"`
+ Effect string `json:"effect"`
+}
+
diff --git a/dto/ListApplicationSubjectDataListDto.go b/dto/ListApplicationSubjectDataListDto.go
new file mode 100644
index 0000000..a5c2d7b
--- /dev/null
+++ b/dto/ListApplicationSubjectDataListDto.go
@@ -0,0 +1,7 @@
+package dto
+
+
+type ListApplicationSubjectDataListDto struct{
+ List []ListApplicationSubjectDataDto `json:"list"`
+}
+
diff --git a/dto/ListApplicationSubjectRespDto.go b/dto/ListApplicationSubjectRespDto.go
new file mode 100644
index 0000000..ffeb232
--- /dev/null
+++ b/dto/ListApplicationSubjectRespDto.go
@@ -0,0 +1,11 @@
+package dto
+
+
+type ListApplicationSubjectRespDto struct{
+ StatusCode int `json:"statusCode"`
+ Message string `json:"message"`
+ ApiCode int `json:"apiCode,omitempty"`
+ RequestId string `json:"requestId,omitempty"`
+ Data ListApplicationSubjectDataListDto `json:"data"`
+}
+
diff --git a/dto/ListApplicationsDto.go b/dto/ListApplicationsDto.go
index 2821539..91fbc7f 100644
--- a/dto/ListApplicationsDto.go
+++ b/dto/ListApplicationsDto.go
@@ -8,5 +8,6 @@ type ListApplicationsDto struct{
IsSelfBuiltApp bool `json:"isSelfBuiltApp,omitempty"`
SsoEnabled bool `json:"ssoEnabled,omitempty"`
Keywords string `json:"keywords,omitempty"`
+ All bool `json:"all,omitempty"`
}
diff --git a/dto/ListAuthSubjectDto.go b/dto/ListAuthSubjectDto.go
new file mode 100644
index 0000000..490daa3
--- /dev/null
+++ b/dto/ListAuthSubjectDto.go
@@ -0,0 +1,12 @@
+package dto
+
+
+type ListAuthSubjectDto struct{
+ TargetType string `json:"targetType"`
+ TargetId string `json:"targetId"`
+ AppName string `json:"appName,omitempty"`
+ AppTypeList []string `json:"appTypeList,omitempty"`
+ Effect []string `json:"effect,omitempty"`
+ Enabled bool `json:"enabled,omitempty"`
+}
+
diff --git a/dto/ListChildrenDepartmentsDto.go b/dto/ListChildrenDepartmentsDto.go
index d938aa0..cbc49f1 100644
--- a/dto/ListChildrenDepartmentsDto.go
+++ b/dto/ListChildrenDepartmentsDto.go
@@ -1,11 +1,14 @@
package dto
-type ListChildrenDepartmentsDto struct {
- OrganizationCode string `json:"organizationCode,omitempty"`
- DepartmentId string `json:"departmentId,omitempty"`
- DepartmentIdType string `json:"departmentIdType,omitempty"`
- ExcludeVirtualNode bool `json:"excludeVirtualNode,omitempty"`
- OnlyVirtualNode bool `json:"onlyVirtualNode,omitempty"`
- WithCustomData bool `json:"withCustomData,omitempty"`
- TenantId string `json:"tenantId,omitempty"`
+
+type ListChildrenDepartmentsDto struct{
+ OrganizationCode string `json:"organizationCode,omitempty"`
+ DepartmentId string `json:"departmentId,omitempty"`
+ Status bool `json:"status,omitempty"`
+ DepartmentIdType string `json:"departmentIdType,omitempty"`
+ ExcludeVirtualNode bool `json:"excludeVirtualNode,omitempty"`
+ OnlyVirtualNode bool `json:"onlyVirtualNode,omitempty"`
+ WithCustomData bool `json:"withCustomData,omitempty"`
+ TenantId string `json:"tenantId,omitempty"`
}
+
diff --git a/dto/ListCistomFieldsResDto.go b/dto/ListCistomFieldsResDto.go
new file mode 100644
index 0000000..67a6255
--- /dev/null
+++ b/dto/ListCistomFieldsResDto.go
@@ -0,0 +1,11 @@
+package dto
+
+
+type ListCistomFieldsResDto struct{
+ StatusCode int `json:"statusCode"`
+ Message string `json:"message"`
+ ApiCode int `json:"apiCode,omitempty"`
+ RequestId string `json:"requestId,omitempty"`
+ Data ListCustomFieldsDto `json:"data"`
+}
+
diff --git a/dto/ListCustomFieldsDto.go b/dto/ListCustomFieldsDto.go
new file mode 100644
index 0000000..e53ae34
--- /dev/null
+++ b/dto/ListCustomFieldsDto.go
@@ -0,0 +1,16 @@
+package dto
+
+
+type ListCustomFieldsDto struct{
+ TargetType string `json:"targetType,omitempty"`
+ DataType string `json:"dataType,omitempty"`
+ TenantId string `json:"tenantId,omitempty"`
+ Page int `json:"page,omitempty"`
+ Limit int `json:"limit,omitempty"`
+ UserVisible bool `json:"userVisible,omitempty"`
+ AdminVisible bool `json:"adminVisible,omitempty"`
+ AccessControl bool `json:"accessControl,omitempty"`
+ Keyword string `json:"keyword,omitempty"`
+ Lang string `json:"lang,omitempty"`
+}
+
diff --git a/dto/ListDataPolicyTargetsDto.go b/dto/ListDataPolicyTargetsDto.go
index fd389d3..cfc8927 100644
--- a/dto/ListDataPolicyTargetsDto.go
+++ b/dto/ListDataPolicyTargetsDto.go
@@ -6,6 +6,6 @@ type ListDataPolicyTargetsDto struct{
Page int `json:"page,omitempty"`
Limit int `json:"limit,omitempty"`
Query string `json:"query,omitempty"`
- TargetType string `json:"targetType,omitempty"`
+ TargetType []string `json:"targetType,omitempty"`
}
diff --git a/dto/ListDataResourcesDto.go b/dto/ListDataResourcesDto.go
index 3ca32e9..f7cf6cc 100644
--- a/dto/ListDataResourcesDto.go
+++ b/dto/ListDataResourcesDto.go
@@ -5,6 +5,6 @@ type ListDataResourcesDto struct{
Page int `json:"page,omitempty"`
Limit int `json:"limit,omitempty"`
Query string `json:"query,omitempty"`
- NamespaceCodes string `json:"namespaceCodes,omitempty"`
+ NamespaceCodes []string `json:"namespaceCodes,omitempty"`
}
diff --git a/dto/ListDepartmentMemberIdsDto.go b/dto/ListDepartmentMemberIdsDto.go
index a900e62..ab9ffc8 100644
--- a/dto/ListDepartmentMemberIdsDto.go
+++ b/dto/ListDepartmentMemberIdsDto.go
@@ -1,8 +1,10 @@
package dto
-type ListDepartmentMemberIdsDto struct {
- OrganizationCode string `json:"organizationCode,omitempty"`
- DepartmentId string `json:"departmentId,omitempty"`
- DepartmentIdType string `json:"departmentIdType,omitempty"`
- TenantId string `json:"tenantId,omitempty"`
+
+type ListDepartmentMemberIdsDto struct{
+ OrganizationCode string `json:"organizationCode,omitempty"`
+ DepartmentId string `json:"departmentId,omitempty"`
+ DepartmentIdType string `json:"departmentIdType,omitempty"`
+ TenantId string `json:"tenantId,omitempty"`
}
+
diff --git a/dto/ListDepartmentMembersDto.go b/dto/ListDepartmentMembersDto.go
index 5af04c1..8f80159 100644
--- a/dto/ListDepartmentMembersDto.go
+++ b/dto/ListDepartmentMembersDto.go
@@ -1,16 +1,18 @@
package dto
-type ListDepartmentMembersDto struct {
- OrganizationCode string `json:"organizationCode,omitempty"`
- DepartmentId string `json:"departmentId,omitempty"`
- SortBy string `json:"sortBy,omitempty"`
- OrderBy string `json:"orderBy,omitempty"`
- DepartmentIdType string `json:"departmentIdType,omitempty"`
- IncludeChildrenDepartments bool `json:"includeChildrenDepartments,omitempty"`
- Page int `json:"page,omitempty"`
- Limit int `json:"limit,omitempty"`
- WithCustomData bool `json:"withCustomData,omitempty"`
- WithIdentities bool `json:"withIdentities,omitempty"`
- WithDepartmentIds bool `json:"withDepartmentIds,omitempty"`
- TenantId string `json:"tenantId,omitempty"`
+
+type ListDepartmentMembersDto struct{
+ OrganizationCode string `json:"organizationCode,omitempty"`
+ DepartmentId string `json:"departmentId,omitempty"`
+ SortBy string `json:"sortBy,omitempty"`
+ OrderBy string `json:"orderBy,omitempty"`
+ DepartmentIdType string `json:"departmentIdType,omitempty"`
+ IncludeChildrenDepartments bool `json:"includeChildrenDepartments,omitempty"`
+ Page int `json:"page,omitempty"`
+ Limit int `json:"limit,omitempty"`
+ WithCustomData bool `json:"withCustomData,omitempty"`
+ WithIdentities bool `json:"withIdentities,omitempty"`
+ WithDepartmentIds bool `json:"withDepartmentIds,omitempty"`
+ TenantId string `json:"tenantId,omitempty"`
}
+
diff --git a/dto/ListDeviceCredentialDto.go b/dto/ListDeviceCredentialDto.go
new file mode 100644
index 0000000..6af06a1
--- /dev/null
+++ b/dto/ListDeviceCredentialDto.go
@@ -0,0 +1,6 @@
+package dto
+
+
+type ListDeviceCredentialDto struct{
+}
+
diff --git a/dto/ListDto.go b/dto/ListDto.go
new file mode 100644
index 0000000..babf8bc
--- /dev/null
+++ b/dto/ListDto.go
@@ -0,0 +1,8 @@
+package dto
+
+
+type ListDto struct{
+ Page int `json:"page,omitempty"`
+ Limit int `json:"limit,omitempty"`
+}
+
diff --git a/dto/ListEventsDto.go b/dto/ListEventsDto.go
new file mode 100644
index 0000000..54b36a7
--- /dev/null
+++ b/dto/ListEventsDto.go
@@ -0,0 +1,9 @@
+package dto
+
+
+type ListEventsDto struct{
+ Page int `json:"page,omitempty"`
+ Limit int `json:"limit,omitempty"`
+ App string `json:"app,omitempty"`
+}
+
diff --git a/dto/ListFieldDto.go b/dto/ListFieldDto.go
new file mode 100644
index 0000000..eaf90ca
--- /dev/null
+++ b/dto/ListFieldDto.go
@@ -0,0 +1,7 @@
+package dto
+
+
+type ListFieldDto struct{
+ ModelId string `json:"modelId,omitempty"`
+}
+
diff --git a/dto/ListGroupsDto.go b/dto/ListGroupsDto.go
index 3874b6b..cc64f17 100644
--- a/dto/ListGroupsDto.go
+++ b/dto/ListGroupsDto.go
@@ -5,5 +5,8 @@ type ListGroupsDto struct{
Keywords string `json:"keywords,omitempty"`
Page int `json:"page,omitempty"`
Limit int `json:"limit,omitempty"`
+ WithMetadata bool `json:"withMetadata,omitempty"`
+ WithCustomData bool `json:"withCustomData,omitempty"`
+ FlatCustomData bool `json:"flatCustomData,omitempty"`
}
diff --git a/dto/ListInviteTenantUserRecordsDto.go b/dto/ListInviteTenantUserRecordsDto.go
new file mode 100644
index 0000000..656f975
--- /dev/null
+++ b/dto/ListInviteTenantUserRecordsDto.go
@@ -0,0 +1,9 @@
+package dto
+
+
+type ListInviteTenantUserRecordsDto struct{
+ Keywords string `json:"keywords,omitempty"`
+ Page string `json:"page,omitempty"`
+ Limit string `json:"limit,omitempty"`
+}
+
diff --git a/dto/ListMultipleTenantAdminsDto.go b/dto/ListMultipleTenantAdminsDto.go
new file mode 100644
index 0000000..45d638e
--- /dev/null
+++ b/dto/ListMultipleTenantAdminsDto.go
@@ -0,0 +1,9 @@
+package dto
+
+
+type ListMultipleTenantAdminsDto struct{
+ Keywords string `json:"keywords,omitempty"`
+ Page string `json:"page,omitempty"`
+ Limit string `json:"limit,omitempty"`
+}
+
diff --git a/dto/ListOperateDto.go b/dto/ListOperateDto.go
new file mode 100644
index 0000000..e691d60
--- /dev/null
+++ b/dto/ListOperateDto.go
@@ -0,0 +1,10 @@
+package dto
+
+
+type ListOperateDto struct{
+ ModelId string `json:"modelId,omitempty"`
+ Keywords string `json:"keywords,omitempty"`
+ Page int `json:"page,omitempty"`
+ Limit int `json:"limit,omitempty"`
+}
+
diff --git a/dto/ListOrganizationsDto.go b/dto/ListOrganizationsDto.go
index 771621f..692acbb 100644
--- a/dto/ListOrganizationsDto.go
+++ b/dto/ListOrganizationsDto.go
@@ -1,9 +1,13 @@
package dto
-type ListOrganizationsDto struct {
- Page int `json:"page,omitempty"`
- Limit int `json:"limit,omitempty"`
- FetchAll bool `json:"fetchAll,omitempty"`
- WithCustomData bool `json:"withCustomData,omitempty"`
- TenantId string `json:"tenantId,omitempty"`
+
+type ListOrganizationsDto struct{
+ Page int `json:"page,omitempty"`
+ Limit int `json:"limit,omitempty"`
+ FetchAll bool `json:"fetchAll,omitempty"`
+ WithCustomData bool `json:"withCustomData,omitempty"`
+ WithPost bool `json:"withPost,omitempty"`
+ TenantId string `json:"tenantId,omitempty"`
+ Status bool `json:"status,omitempty"`
}
+
diff --git a/dto/ListPermissionViewDto.go b/dto/ListPermissionViewDto.go
new file mode 100644
index 0000000..ce9fc20
--- /dev/null
+++ b/dto/ListPermissionViewDto.go
@@ -0,0 +1,9 @@
+package dto
+
+
+type ListPermissionViewDto struct{
+ Page int `json:"page,omitempty"`
+ Limit int `json:"limit,omitempty"`
+ Keyword string `json:"keyword,omitempty"`
+}
+
diff --git a/dto/ListPermissionViewPaginatedRespDto.go b/dto/ListPermissionViewPaginatedRespDto.go
new file mode 100644
index 0000000..420baa1
--- /dev/null
+++ b/dto/ListPermissionViewPaginatedRespDto.go
@@ -0,0 +1,8 @@
+package dto
+
+
+type ListPermissionViewPaginatedRespDto struct{
+ TotalCount int `json:"totalCount"`
+ List []ListPermissionViewRespDto `json:"list"`
+}
+
diff --git a/dto/ListPermissionViewRespDto.go b/dto/ListPermissionViewRespDto.go
new file mode 100644
index 0000000..8498e44
--- /dev/null
+++ b/dto/ListPermissionViewRespDto.go
@@ -0,0 +1,18 @@
+package dto
+
+
+type ListPermissionViewRespDto struct{
+ UserId string `json:"userId"`
+ Username string `json:"username,omitempty"`
+ NamespaceId string `json:"namespaceId"`
+ NamespaceCode string `json:"namespaceCode"`
+ NamespaceName string `json:"namespaceName"`
+ DataResourceId string `json:"dataResourceId"`
+ DataResourceCode string `json:"dataResourceCode"`
+ DataResourceName string `json:"dataResourceName"`
+ DataPolicyList []PolicyBo `json:"dataPolicyList"`
+ RoleList []RoleBo `json:"roleList"`
+ GroupList []GroupBo `json:"groupList"`
+ NodeList []NodeBo `json:"nodeList"`
+}
+
diff --git a/dto/ListPermissionViewResponseDto.go b/dto/ListPermissionViewResponseDto.go
new file mode 100644
index 0000000..ddde216
--- /dev/null
+++ b/dto/ListPermissionViewResponseDto.go
@@ -0,0 +1,11 @@
+package dto
+
+
+type ListPermissionViewResponseDto struct{
+ StatusCode int `json:"statusCode"`
+ Message string `json:"message"`
+ ApiCode int `json:"apiCode,omitempty"`
+ RequestId string `json:"requestId,omitempty"`
+ Data ListPermissionViewPaginatedRespDto `json:"data"`
+}
+
diff --git a/dto/ListPostDto.go b/dto/ListPostDto.go
new file mode 100644
index 0000000..4dcffc0
--- /dev/null
+++ b/dto/ListPostDto.go
@@ -0,0 +1,13 @@
+package dto
+
+
+type ListPostDto struct{
+ Keywords string `json:"keywords,omitempty"`
+ SkipCount bool `json:"skipCount,omitempty"`
+ Page int `json:"page,omitempty"`
+ Limit int `json:"limit,omitempty"`
+ WithMetadata bool `json:"withMetadata,omitempty"`
+ WithCustomData bool `json:"withCustomData,omitempty"`
+ FlatCustomData bool `json:"flatCustomData,omitempty"`
+}
+
diff --git a/dto/ListPublicAccountDataDto.go b/dto/ListPublicAccountDataDto.go
new file mode 100644
index 0000000..cfe3f07
--- /dev/null
+++ b/dto/ListPublicAccountDataDto.go
@@ -0,0 +1,10 @@
+package dto
+
+
+type ListPublicAccountDataDto struct{
+ UserId string `json:"userId"`
+ Avatar string `json:"avatar,omitempty"`
+ DisplayName string `json:"displayName,omitempty"`
+ Usertype string `json:"usertype,omitempty"`
+}
+
diff --git a/dto/ListPublicAccountsAdvancedFilterItemDto.go b/dto/ListPublicAccountsAdvancedFilterItemDto.go
new file mode 100644
index 0000000..4f5fd1b
--- /dev/null
+++ b/dto/ListPublicAccountsAdvancedFilterItemDto.go
@@ -0,0 +1,9 @@
+package dto
+
+
+type ListPublicAccountsAdvancedFilterItemDto struct{
+ Field string `json:"field"`
+ Operator string `json:"operator"`
+ Value interface{} `json:"value,omitempty"`
+}
+
diff --git a/dto/ListPublicAccountsOptionsDto.go b/dto/ListPublicAccountsOptionsDto.go
new file mode 100644
index 0000000..a1945bd
--- /dev/null
+++ b/dto/ListPublicAccountsOptionsDto.go
@@ -0,0 +1,11 @@
+package dto
+
+
+type ListPublicAccountsOptionsDto struct{
+ Pagination PaginationDto `json:"pagination,omitempty"`
+ Sort []SortingDto `json:"sort,omitempty"`
+ FuzzySearchOn []string `json:"fuzzySearchOn,omitempty"`
+ WithCustomData bool `json:"withCustomData,omitempty"`
+ WithDepartmentIds bool `json:"withDepartmentIds,omitempty"`
+}
+
diff --git a/dto/ListPublicAccountsRequestDto.go b/dto/ListPublicAccountsRequestDto.go
new file mode 100644
index 0000000..abdb81e
--- /dev/null
+++ b/dto/ListPublicAccountsRequestDto.go
@@ -0,0 +1,10 @@
+package dto
+
+
+type ListPublicAccountsRequestDto struct{
+ Keywords string `json:"keywords,omitempty"`
+ AdvancedFilter []ListPublicAccountsAdvancedFilterItemDto `json:"advancedFilter,omitempty"`
+ SearchQuery interface{} `json:"searchQuery,omitempty"`
+ Options ListPublicAccountsOptionsDto `json:"options,omitempty"`
+}
+
diff --git a/dto/ListResourceTargetsDataDto.go b/dto/ListResourceTargetsDataDto.go
index d7c4f3d..ea7b207 100644
--- a/dto/ListResourceTargetsDataDto.go
+++ b/dto/ListResourceTargetsDataDto.go
@@ -1,5 +1,7 @@
package dto
-type ListResourceTargetsDataDto struct {
- AuthUserList []ListResourceTargetsDtoResp `json:"authUserList"`
+
+type ListResourceTargetsDataDto struct{
+ AuthUserList []ListResourceTargetsDtoResp `json:"authUserList"`
}
+
diff --git a/dto/ListResourceTargetsDto.go b/dto/ListResourceTargetsDto.go
index 7c1a96f..24800bf 100644
--- a/dto/ListResourceTargetsDto.go
+++ b/dto/ListResourceTargetsDto.go
@@ -1,7 +1,9 @@
package dto
-type ListResourceTargetsDto struct {
- Resources []string `json:"resources"`
- Actions []string `json:"actions"`
- NamespaceCode string `json:"namespaceCode"`
+
+type ListResourceTargetsDto struct{
+ Resources []string `json:"resources"`
+ Actions []string `json:"actions"`
+ NamespaceCode string `json:"namespaceCode"`
}
+
diff --git a/dto/ListResourceTargetsDtoResp.go b/dto/ListResourceTargetsDtoResp.go
index 668c3ff..7b11b7d 100644
--- a/dto/ListResourceTargetsDtoResp.go
+++ b/dto/ListResourceTargetsDtoResp.go
@@ -1,6 +1,8 @@
package dto
-type ListResourceTargetsDtoResp struct {
- Resource string `json:"resource"`
- ActionAuthList []ActionAuth `json:"actionAuthList"`
+
+type ListResourceTargetsDtoResp struct{
+ Resource string `json:"resource"`
+ ActionAuthList []ActionAuth `json:"actionAuthList"`
}
+
diff --git a/dto/ListRoleAssignmentsDto.go b/dto/ListRoleAssignmentsDto.go
index 0ff5914..e9d47ff 100644
--- a/dto/ListRoleAssignmentsDto.go
+++ b/dto/ListRoleAssignmentsDto.go
@@ -1,5 +1,12 @@
package dto
-type ListRoleAssignmentsDto struct {
- RequestBody interface{} `json:"requestBody,omitempty"`
+
+type ListRoleAssignmentsDto struct{
+ RoleCode string `json:"roleCode,omitempty"`
+ Page int `json:"page,omitempty"`
+ Limit int `json:"limit,omitempty"`
+ Query string `json:"query,omitempty"`
+ NamespaceCode string `json:"namespaceCode,omitempty"`
+ TargetType []string `json:"targetType,omitempty"`
}
+
diff --git a/dto/ListSyncRiskOperationsDto.go b/dto/ListSyncRiskOperationsDto.go
index 6f08681..eb58c2f 100644
--- a/dto/ListSyncRiskOperationsDto.go
+++ b/dto/ListSyncRiskOperationsDto.go
@@ -5,7 +5,7 @@ type ListSyncRiskOperationsDto struct{
SyncTaskId int `json:"syncTaskId,omitempty"`
Page int `json:"page,omitempty"`
Limit int `json:"limit,omitempty"`
- Status string `json:"status,omitempty"`
- ObjectType string `json:"objectType,omitempty"`
+ Status []string `json:"status,omitempty"`
+ ObjectType []string `json:"objectType,omitempty"`
}
diff --git a/dto/ListTenantAdminDto.go b/dto/ListTenantAdminDto.go
new file mode 100644
index 0000000..d2308ac
--- /dev/null
+++ b/dto/ListTenantAdminDto.go
@@ -0,0 +1,10 @@
+package dto
+
+
+type ListTenantAdminDto struct{
+ TenantId string `json:"tenantId"`
+ Keywords string `json:"keywords,omitempty"`
+ Page string `json:"page,omitempty"`
+ Limit string `json:"limit,omitempty"`
+}
+
diff --git a/dto/ListTenantApplicationsDto.go b/dto/ListTenantApplicationsDto.go
index 4e01d9e..331e8e6 100644
--- a/dto/ListTenantApplicationsDto.go
+++ b/dto/ListTenantApplicationsDto.go
@@ -1,8 +1,10 @@
package dto
-type ListTenantApplicationsDto struct {
- Page string `json:"page,omitempty"`
- Limit string `json:"limit,omitempty"`
- Keywords string `json:"keywords,omitempty"`
- SsoEnabled bool `json:"sso_enabled,omitempty"`
+
+type ListTenantApplicationsDto struct{
+ Page string `json:"page,omitempty"`
+ Limit string `json:"limit,omitempty"`
+ Keywords string `json:"keywords,omitempty"`
+ SsoEnabled bool `json:"sso_enabled,omitempty"`
}
+
diff --git a/dto/ListTenantCooperatorsDto.go b/dto/ListTenantCooperatorsDto.go
new file mode 100644
index 0000000..1bdced9
--- /dev/null
+++ b/dto/ListTenantCooperatorsDto.go
@@ -0,0 +1,10 @@
+package dto
+
+
+type ListTenantCooperatorsDto struct{
+ Keywords string `json:"keywords,omitempty"`
+ External bool `json:"external,omitempty"`
+ Page string `json:"page,omitempty"`
+ Limit string `json:"limit,omitempty"`
+}
+
diff --git a/dto/ListTenantUserDto.go b/dto/ListTenantUserDto.go
index 2925ce7..769bf75 100644
--- a/dto/ListTenantUserDto.go
+++ b/dto/ListTenantUserDto.go
@@ -4,10 +4,6 @@ package dto
type ListTenantUserDto struct{
TenantId string `json:"tenantId"`
Keywords string `json:"keywords,omitempty"`
- Page string `json:"page,omitempty"`
- Limit string `json:"limit,omitempty"`
- WithCustomData bool `json:"withCustomData,omitempty"`
- WithIdentities bool `json:"withIdentities,omitempty"`
- WithDepartmentIds bool `json:"withDepartmentIds,omitempty"`
+ Options ListTenantUsersOptionsDto `json:"options,omitempty"`
}
diff --git a/dto/ListTenantUsersOptionsDto.go b/dto/ListTenantUsersOptionsDto.go
new file mode 100644
index 0000000..09a408d
--- /dev/null
+++ b/dto/ListTenantUsersOptionsDto.go
@@ -0,0 +1,7 @@
+package dto
+
+
+type ListTenantUsersOptionsDto struct{
+ Pagination PaginationDto `json:"pagination,omitempty"`
+}
+
diff --git a/dto/ListTenantsDto.go b/dto/ListTenantsDto.go
index 9a5254a..74fd85a 100644
--- a/dto/ListTenantsDto.go
+++ b/dto/ListTenantsDto.go
@@ -5,7 +5,10 @@ type ListTenantsDto struct{
Keywords string `json:"keywords,omitempty"`
WithMembersCount bool `json:"withMembersCount,omitempty"`
WithAppDetail bool `json:"withAppDetail,omitempty"`
+ WithCreatorDetail bool `json:"withCreatorDetail,omitempty"`
+ WithSourceAppDetail bool `json:"withSourceAppDetail,omitempty"`
Page string `json:"page,omitempty"`
Limit string `json:"limit,omitempty"`
+ Source interface{} `json:"source,omitempty"`
}
diff --git a/dto/ListUserBaseFieldsDto.go b/dto/ListUserBaseFieldsDto.go
new file mode 100644
index 0000000..74b6362
--- /dev/null
+++ b/dto/ListUserBaseFieldsDto.go
@@ -0,0 +1,16 @@
+package dto
+
+
+type ListUserBaseFieldsDto struct{
+ TargetType string `json:"targetType,omitempty"`
+ DataType string `json:"dataType,omitempty"`
+ TenantId string `json:"tenantId,omitempty"`
+ Page int `json:"page,omitempty"`
+ Limit int `json:"limit,omitempty"`
+ UserVisible bool `json:"userVisible,omitempty"`
+ AdminVisible bool `json:"adminVisible,omitempty"`
+ AccessControl bool `json:"accessControl,omitempty"`
+ Keyword string `json:"keyword,omitempty"`
+ Lang string `json:"lang,omitempty"`
+}
+
diff --git a/dto/ListUsersDto.go b/dto/ListUsersDto.go
index 060ebf1..32808f6 100644
--- a/dto/ListUsersDto.go
+++ b/dto/ListUsersDto.go
@@ -8,6 +8,7 @@ type ListUsersDto struct{
UpdatedAtStart int `json:"updatedAtStart,omitempty"`
UpdatedAtEnd int `json:"updatedAtEnd,omitempty"`
WithCustomData bool `json:"withCustomData,omitempty"`
+ WithPost bool `json:"withPost,omitempty"`
WithIdentities bool `json:"withIdentities,omitempty"`
WithDepartmentIds bool `json:"withDepartmentIds,omitempty"`
}
diff --git a/dto/ListUsersOptionsDto.go b/dto/ListUsersOptionsDto.go
index 3b34e6e..eef5234 100644
--- a/dto/ListUsersOptionsDto.go
+++ b/dto/ListUsersOptionsDto.go
@@ -6,7 +6,9 @@ type ListUsersOptionsDto struct{
Sort []SortingDto `json:"sort,omitempty"`
FuzzySearchOn []string `json:"fuzzySearchOn,omitempty"`
WithCustomData bool `json:"withCustomData,omitempty"`
+ WithPost bool `json:"withPost,omitempty"`
WithIdentities bool `json:"withIdentities,omitempty"`
WithDepartmentIds bool `json:"withDepartmentIds,omitempty"`
+ FlatCustomData bool `json:"flatCustomData,omitempty"`
}
diff --git a/dto/ListUsersRequestDto.go b/dto/ListUsersRequestDto.go
index b478702..1498ff5 100644
--- a/dto/ListUsersRequestDto.go
+++ b/dto/ListUsersRequestDto.go
@@ -4,6 +4,7 @@ package dto
type ListUsersRequestDto struct{
Keywords string `json:"keywords,omitempty"`
AdvancedFilter []ListUsersAdvancedFilterItemDto `json:"advancedFilter,omitempty"`
+ SearchQuery interface{} `json:"searchQuery,omitempty"`
Options ListUsersOptionsDto `json:"options,omitempty"`
}
diff --git a/dto/ListWebAuthnAuthenticatorDeviceDataDto.go b/dto/ListWebAuthnAuthenticatorDeviceDataDto.go
new file mode 100644
index 0000000..bdd7774
--- /dev/null
+++ b/dto/ListWebAuthnAuthenticatorDeviceDataDto.go
@@ -0,0 +1,8 @@
+package dto
+
+
+type ListWebAuthnAuthenticatorDeviceDataDto struct{
+ TotalCount int `json:"totalCount"`
+ List []interface{} `json:"list"`
+}
+
diff --git a/dto/ListWhitelistDto.go b/dto/ListWhitelistDto.go
new file mode 100644
index 0000000..ebd7cc5
--- /dev/null
+++ b/dto/ListWhitelistDto.go
@@ -0,0 +1,7 @@
+package dto
+
+
+type ListWhitelistDto struct{
+ Type string `json:"type,omitempty"`
+}
+
diff --git a/dto/LoginAnomalyDetectionConfigDto.go b/dto/LoginAnomalyDetectionConfigDto.go
index b30c181..e29cf4d 100644
--- a/dto/LoginAnomalyDetectionConfigDto.go
+++ b/dto/LoginAnomalyDetectionConfigDto.go
@@ -1,14 +1,16 @@
package dto
-type LoginAnomalyDetectionConfigDto struct {
- LoginFailStrategy string `json:"loginFailStrategy"`
- RobotVerify string `json:"robotVerify"`
- AccountLock string `json:"accountLock"`
- LoginFailCheck LoginFailCheckConfigDto `json:"loginFailCheck"`
- LoginPasswordFailCheck LoginPassowrdFailCheckConfigDto `json:"loginPasswordFailCheck"`
- AccountLockLoginPasswordFailCheck LoginPassowrdFailCheckConfigDto `json:"accountLockLoginPasswordFailCheck,omitempty"`
- RobotVerifyLoginPasswordFailCheck LoginPassowrdFailCheckConfigDto `json:"robotVerifyLoginPasswordFailCheck"`
- RobotVerifyLoginIpWhitelistCheck LoginIpWhitelistCheckConfigDto `json:"robotVerifyLoginIpWhitelistCheck"`
- RobotVerifyLoginTimeCheckEnable bool `json:"robotVerifyLoginTimeCheckEnable"`
- RobotVerifyloginWeekStartEndTime []string `json:"robotVerifyloginWeekStartEndTime"`
+
+type LoginAnomalyDetectionConfigDto struct{
+ LoginFailStrategy string `json:"loginFailStrategy"`
+ RobotVerify string `json:"robotVerify"`
+ AccountLock string `json:"accountLock"`
+ LoginFailCheck LoginFailCheckConfigDto `json:"loginFailCheck"`
+ LoginPasswordFailCheck LoginPassowrdFailCheckConfigDto `json:"loginPasswordFailCheck"`
+ AccountLockLoginPasswordFailCheck LoginPassowrdFailCheckConfigDto `json:"accountLockLoginPasswordFailCheck,omitempty"`
+ RobotVerifyLoginPasswordFailCheck LoginPassowrdFailCheckConfigDto `json:"robotVerifyLoginPasswordFailCheck"`
+ RobotVerifyLoginIpWhitelistCheck LoginIpWhitelistCheckConfigDto `json:"robotVerifyLoginIpWhitelistCheck"`
+ RobotVerifyLoginTimeCheckEnable bool `json:"robotVerifyLoginTimeCheckEnable"`
+ RobotVerifyloginWeekStartEndTime []string `json:"robotVerifyloginWeekStartEndTime"`
}
+
diff --git a/dto/LoginHistoryDto.go b/dto/LoginHistoryDto.go
index b101b20..9476fe4 100644
--- a/dto/LoginHistoryDto.go
+++ b/dto/LoginHistoryDto.go
@@ -15,5 +15,6 @@ type LoginHistoryDto struct{
ParsedUserAgent ParsedUserAgent `json:"parsedUserAgent"`
LoginMethod string `json:"loginMethod"`
Geoip GeoIp `json:"geoip"`
+ TenantId string `json:"tenantId,omitempty"`
}
diff --git a/dto/LoginIpWhitelistCheckConfigDto.go b/dto/LoginIpWhitelistCheckConfigDto.go
index 6a8cd44..3635ea5 100644
--- a/dto/LoginIpWhitelistCheckConfigDto.go
+++ b/dto/LoginIpWhitelistCheckConfigDto.go
@@ -1,6 +1,8 @@
package dto
-type LoginIpWhitelistCheckConfigDto struct {
- Enabled bool `json:"enabled"`
- IpWhitelist string `json:"ipWhitelist"`
+
+type LoginIpWhitelistCheckConfigDto struct{
+ Enabled bool `json:"enabled"`
+ IpWhitelist string `json:"ipWhitelist"`
}
+
diff --git a/dto/MetadataListResDto.go b/dto/MetadataListResDto.go
new file mode 100644
index 0000000..88f6a60
--- /dev/null
+++ b/dto/MetadataListResDto.go
@@ -0,0 +1,10 @@
+package dto
+
+
+type MetadataListResDto struct{
+ StatusCode int `json:"statusCode"`
+ Message string `json:"message"`
+ ApiCode int `json:"apiCode,omitempty"`
+ Data []RowDto `json:"data"`
+}
+
diff --git a/dto/MfaOtpVerityDto.go b/dto/MfaOtpVerityDto.go
index dde0e59..34047a9 100644
--- a/dto/MfaOtpVerityDto.go
+++ b/dto/MfaOtpVerityDto.go
@@ -1,5 +1,7 @@
package dto
-type MfaOtpVerityDto struct {
- Totp string `json:"totp"`
+
+type MfaOtpVerityDto struct{
+ Totp string `json:"totp"`
}
+
diff --git a/dto/MfaOtpVerityRespDto.go b/dto/MfaOtpVerityRespDto.go
index a58e801..889f321 100644
--- a/dto/MfaOtpVerityRespDto.go
+++ b/dto/MfaOtpVerityRespDto.go
@@ -1,9 +1,11 @@
package dto
-type MfaOtpVerityRespDto struct {
- StatusCode int `json:"statusCode"`
- Message string `json:"message"`
- ApiCode int `json:"apiCode,omitempty"`
- RequestId string `json:"requestId,omitempty"`
- Data OtpVerityRespDto `json:"data"`
+
+type MfaOtpVerityRespDto struct{
+ StatusCode int `json:"statusCode"`
+ Message string `json:"message"`
+ ApiCode int `json:"apiCode,omitempty"`
+ RequestId string `json:"requestId,omitempty"`
+ Data OtpVerityRespDto `json:"data"`
}
+
diff --git a/dto/MfaTokenIntrospectEndpointParams.go b/dto/MfaTokenIntrospectEndpointParams.go
new file mode 100644
index 0000000..62ed9e4
--- /dev/null
+++ b/dto/MfaTokenIntrospectEndpointParams.go
@@ -0,0 +1,7 @@
+package dto
+
+
+type MfaTokenIntrospectEndpointParams struct{
+ Token string `json:"token"`
+}
+
diff --git a/dto/MfaTokenIntrospectResponse.go b/dto/MfaTokenIntrospectResponse.go
new file mode 100644
index 0000000..302e3a6
--- /dev/null
+++ b/dto/MfaTokenIntrospectResponse.go
@@ -0,0 +1,11 @@
+package dto
+
+
+type MfaTokenIntrospectResponse struct{
+ Active bool `json:"active"`
+ UserPoolId string `json:"userPoolId,omitempty"`
+ UserId string `json:"userId,omitempty"`
+ Exp int `json:"exp,omitempty"`
+ Iat int `json:"iat,omitempty"`
+}
+
diff --git a/dto/MultipleTenantAdminDto.go b/dto/MultipleTenantAdminDto.go
new file mode 100644
index 0000000..3aee1b8
--- /dev/null
+++ b/dto/MultipleTenantAdminDto.go
@@ -0,0 +1,12 @@
+package dto
+
+
+type MultipleTenantAdminDto struct{
+ UserId string `json:"userId"`
+ Name string `json:"name"`
+ Phone string `json:"phone"`
+ Email string `json:"email"`
+ ApiAuthorized bool `json:"apiAuthorized,omitempty"`
+ LastLogin string `json:"lastLogin"`
+}
+
diff --git a/dto/MultipleTenantAdminListPagingDto.go b/dto/MultipleTenantAdminListPagingDto.go
new file mode 100644
index 0000000..1844470
--- /dev/null
+++ b/dto/MultipleTenantAdminListPagingDto.go
@@ -0,0 +1,8 @@
+package dto
+
+
+type MultipleTenantAdminListPagingDto struct{
+ TotalCount int `json:"totalCount"`
+ List []MultipleTenantAdminDto `json:"list"`
+}
+
diff --git a/dto/MultipleTenantAdminPaginatedRespDto.go b/dto/MultipleTenantAdminPaginatedRespDto.go
new file mode 100644
index 0000000..bde4517
--- /dev/null
+++ b/dto/MultipleTenantAdminPaginatedRespDto.go
@@ -0,0 +1,11 @@
+package dto
+
+
+type MultipleTenantAdminPaginatedRespDto struct{
+ StatusCode int `json:"statusCode"`
+ Message string `json:"message"`
+ ApiCode int `json:"apiCode,omitempty"`
+ RequestId string `json:"requestId,omitempty"`
+ Data MultipleTenantAdminListPagingDto `json:"data"`
+}
+
diff --git a/dto/Node.go b/dto/Node.go
new file mode 100644
index 0000000..79820f9
--- /dev/null
+++ b/dto/Node.go
@@ -0,0 +1,6 @@
+package dto
+
+
+type Node struct{
+}
+
diff --git a/dto/NodeBo.go b/dto/NodeBo.go
new file mode 100644
index 0000000..a40ec45
--- /dev/null
+++ b/dto/NodeBo.go
@@ -0,0 +1,9 @@
+package dto
+
+
+type NodeBo struct{
+ NodeId string `json:"nodeId"`
+ NodeName string `json:"nodeName"`
+ NodeCode string `json:"nodeCode"`
+}
+
diff --git a/dto/OpenEventDto.go b/dto/OpenEventDto.go
new file mode 100644
index 0000000..58ce040
--- /dev/null
+++ b/dto/OpenEventDto.go
@@ -0,0 +1,11 @@
+package dto
+
+
+type OpenEventDto struct{
+ Id string `json:"id"`
+ Code string `json:"code"`
+ Topic string `json:"topic"`
+ Name string `json:"name"`
+ Desc string `json:"desc"`
+}
+
diff --git a/dto/OpenEventPaginatedRespDto.go b/dto/OpenEventPaginatedRespDto.go
new file mode 100644
index 0000000..59ad1d1
--- /dev/null
+++ b/dto/OpenEventPaginatedRespDto.go
@@ -0,0 +1,11 @@
+package dto
+
+
+type OpenEventPaginatedRespDto struct{
+ StatusCode int `json:"statusCode"`
+ Message string `json:"message"`
+ ApiCode int `json:"apiCode,omitempty"`
+ RequestId string `json:"requestId,omitempty"`
+ Data OpenEventPagingDto `json:"data"`
+}
+
diff --git a/dto/OpenEventPagingDto.go b/dto/OpenEventPagingDto.go
new file mode 100644
index 0000000..634fc26
--- /dev/null
+++ b/dto/OpenEventPagingDto.go
@@ -0,0 +1,8 @@
+package dto
+
+
+type OpenEventPagingDto struct{
+ TotalCount int `json:"totalCount"`
+ List []OpenEventDto `json:"list"`
+}
+
diff --git a/dto/OpenResource.go b/dto/OpenResource.go
index cb8dddc..ddafef6 100644
--- a/dto/OpenResource.go
+++ b/dto/OpenResource.go
@@ -1,9 +1,11 @@
package dto
-type OpenResource struct {
- ResourceCode string `json:"resourceCode"`
- ResourceType string `json:"resourceType"`
- StrAuthorize StrAuthorize `json:"strAuthorize,omitempty"`
- ArrAuthorize ArrayAuthorize `json:"arrAuthorize,omitempty"`
- TreeAuthorize TreeAuthorize `json:"treeAuthorize,omitempty"`
+
+type OpenResource struct{
+ ResourceCode string `json:"resourceCode"`
+ ResourceType string `json:"resourceType"`
+ StrAuthorize StrAuthorize `json:"strAuthorize,omitempty"`
+ ArrAuthorize ArrayAuthorize `json:"arrAuthorize,omitempty"`
+ TreeAuthorize TreeAuthorize `json:"treeAuthorize,omitempty"`
}
+
diff --git a/dto/OperateModelDto.go b/dto/OperateModelDto.go
new file mode 100644
index 0000000..a2718f6
--- /dev/null
+++ b/dto/OperateModelDto.go
@@ -0,0 +1,15 @@
+package dto
+
+
+type OperateModelDto struct{
+ Id string `json:"id"`
+ UserPoolId string `json:"userPoolId"`
+ ModelId string `json:"modelId"`
+ OperateName string `json:"operateName"`
+ OperateKey string `json:"operateKey"`
+ Show bool `json:"show"`
+ IsDefault bool `json:"isDefault"`
+ CreatedAt string `json:"createdAt"`
+ UpdatedAt string `json:"updatedAt"`
+}
+
diff --git a/dto/OrganizationDto.go b/dto/OrganizationDto.go
index db41337..8514e0c 100644
--- a/dto/OrganizationDto.go
+++ b/dto/OrganizationDto.go
@@ -1,18 +1,23 @@
package dto
-type OrganizationDto struct {
- OrganizationCode string `json:"organizationCode"`
- OrganizationName string `json:"organizationName"`
- Description string `json:"description,omitempty"`
- CreatedAt string `json:"createdAt,omitempty"`
- UpdatedAt string `json:"updatedAt,omitempty"`
- DepartmentId string `json:"departmentId"`
- OpenDepartmentId string `json:"openDepartmentId,omitempty"`
- HasChildren bool `json:"hasChildren"`
- LeaderUserIds []string `json:"leaderUserIds,omitempty"`
- MembersCount int `json:"membersCount"`
- IsVirtualNode bool `json:"isVirtualNode"`
- I18n OrganizationNameI18nDto `json:"i18n,omitempty"`
- CustomData interface{} `json:"customData,omitempty"`
- TenantId string `json:"tenantId,omitempty"`
+
+type OrganizationDto struct{
+ OrganizationCode string `json:"organizationCode"`
+ OrganizationName string `json:"organizationName"`
+ Description string `json:"description,omitempty"`
+ CreatedAt string `json:"createdAt,omitempty"`
+ UpdatedAt string `json:"updatedAt,omitempty"`
+ DepartmentId string `json:"departmentId"`
+ OpenDepartmentId string `json:"openDepartmentId,omitempty"`
+ HasChildren bool `json:"hasChildren"`
+ LeaderUserIds []string `json:"leaderUserIds,omitempty"`
+ MembersCount int `json:"membersCount"`
+ IsVirtualNode bool `json:"isVirtualNode"`
+ I18n OrganizationNameI18nDto `json:"i18n,omitempty"`
+ CustomData interface{} `json:"customData,omitempty"`
+ TenantId string `json:"tenantId,omitempty"`
+ PostIdList []string `json:"postIdList,omitempty"`
+ Status string `json:"status,omitempty"`
+ Allow string `json:"allow,omitempty"`
}
+
diff --git a/dto/OtpSecretRespDto.go b/dto/OtpSecretRespDto.go
index 0c606d4..0995efe 100644
--- a/dto/OtpSecretRespDto.go
+++ b/dto/OtpSecretRespDto.go
@@ -1,5 +1,7 @@
package dto
-type OtpSecretRespDto struct {
- Secret string `json:"secret"`
+
+type OtpSecretRespDto struct{
+ Secret string `json:"secret"`
}
+
diff --git a/dto/OtpVerityRespDto.go b/dto/OtpVerityRespDto.go
index 6120516..da238ca 100644
--- a/dto/OtpVerityRespDto.go
+++ b/dto/OtpVerityRespDto.go
@@ -1,5 +1,7 @@
package dto
-type OtpVerityRespDto struct {
- Verified bool `json:"verified"`
+
+type OtpVerityRespDto struct{
+ Verified bool `json:"verified"`
}
+
diff --git a/dto/PolicyBo.go b/dto/PolicyBo.go
new file mode 100644
index 0000000..80a3d49
--- /dev/null
+++ b/dto/PolicyBo.go
@@ -0,0 +1,8 @@
+package dto
+
+
+type PolicyBo struct{
+ DataPolicyId string `json:"dataPolicyId"`
+ DataPolicyName string `json:"dataPolicyName"`
+}
+
diff --git a/dto/PostDto.go b/dto/PostDto.go
new file mode 100644
index 0000000..5753fc2
--- /dev/null
+++ b/dto/PostDto.go
@@ -0,0 +1,9 @@
+package dto
+
+
+type PostDto struct{
+ Code string `json:"code"`
+ Name string `json:"name"`
+ Description string `json:"description,omitempty"`
+}
+
diff --git a/dto/PostInfoDto.go b/dto/PostInfoDto.go
new file mode 100644
index 0000000..c462948
--- /dev/null
+++ b/dto/PostInfoDto.go
@@ -0,0 +1,10 @@
+package dto
+
+
+type PostInfoDto struct{
+ Code string `json:"code"`
+ Name string `json:"name"`
+ Description string `json:"description,omitempty"`
+ DepartmentIdList []string `json:"departmentIdList"`
+}
+
diff --git a/dto/PostItemDto.go b/dto/PostItemDto.go
new file mode 100644
index 0000000..b5abdd8
--- /dev/null
+++ b/dto/PostItemDto.go
@@ -0,0 +1,12 @@
+package dto
+
+
+type PostItemDto struct{
+ Code string `json:"code"`
+ Name string `json:"name"`
+ Description string `json:"description,omitempty"`
+ UserCount int `json:"userCount"`
+ DepartmentCount int `json:"departmentCount"`
+ MetadataSource []string `json:"metadataSource"`
+}
+
diff --git a/dto/PostListRespDto.go b/dto/PostListRespDto.go
new file mode 100644
index 0000000..4278e7a
--- /dev/null
+++ b/dto/PostListRespDto.go
@@ -0,0 +1,11 @@
+package dto
+
+
+type PostListRespDto struct{
+ StatusCode int `json:"statusCode"`
+ Message string `json:"message"`
+ ApiCode int `json:"apiCode,omitempty"`
+ RequestId string `json:"requestId,omitempty"`
+ Data []PostDto `json:"data"`
+}
+
diff --git a/dto/PostPaginatedRespDto.go b/dto/PostPaginatedRespDto.go
new file mode 100644
index 0000000..7af2498
--- /dev/null
+++ b/dto/PostPaginatedRespDto.go
@@ -0,0 +1,11 @@
+package dto
+
+
+type PostPaginatedRespDto struct{
+ StatusCode int `json:"statusCode"`
+ Message string `json:"message"`
+ ApiCode int `json:"apiCode,omitempty"`
+ RequestId string `json:"requestId,omitempty"`
+ Data PostPagingDto `json:"data"`
+}
+
diff --git a/dto/PostPagingDto.go b/dto/PostPagingDto.go
new file mode 100644
index 0000000..9ef4b30
--- /dev/null
+++ b/dto/PostPagingDto.go
@@ -0,0 +1,8 @@
+package dto
+
+
+type PostPagingDto struct{
+ TotalCount int `json:"totalCount"`
+ List []PostItemDto `json:"list"`
+}
+
diff --git a/dto/PostRespDto.go b/dto/PostRespDto.go
new file mode 100644
index 0000000..655f026
--- /dev/null
+++ b/dto/PostRespDto.go
@@ -0,0 +1,11 @@
+package dto
+
+
+type PostRespDto struct{
+ StatusCode int `json:"statusCode"`
+ Message string `json:"message"`
+ ApiCode int `json:"apiCode,omitempty"`
+ RequestId string `json:"requestId,omitempty"`
+ Data PostDto `json:"data"`
+}
+
diff --git a/dto/PubEventDto.go b/dto/PubEventDto.go
new file mode 100644
index 0000000..8b25532
--- /dev/null
+++ b/dto/PubEventDto.go
@@ -0,0 +1,8 @@
+package dto
+
+
+type PubEventDto struct{
+ EventType string `json:"eventType"`
+ EventData interface{} `json:"eventData"`
+}
+
diff --git a/dto/PubEventRespDataDto.go b/dto/PubEventRespDataDto.go
new file mode 100644
index 0000000..81b8d38
--- /dev/null
+++ b/dto/PubEventRespDataDto.go
@@ -0,0 +1,8 @@
+package dto
+
+
+type PubEventRespDataDto struct{
+ Success bool `json:"success"`
+ ErrMsg bool `json:"errMsg,omitempty"`
+}
+
diff --git a/dto/PubEventRespDto.go b/dto/PubEventRespDto.go
new file mode 100644
index 0000000..571eda4
--- /dev/null
+++ b/dto/PubEventRespDto.go
@@ -0,0 +1,11 @@
+package dto
+
+
+type PubEventRespDto struct{
+ StatusCode int `json:"statusCode"`
+ Message string `json:"message"`
+ ApiCode int `json:"apiCode,omitempty"`
+ RequestId string `json:"requestId,omitempty"`
+ Data PubEventRespDataDto `json:"data"`
+}
+
diff --git a/dto/PublicAccountDto.go b/dto/PublicAccountDto.go
new file mode 100644
index 0000000..5656bd8
--- /dev/null
+++ b/dto/PublicAccountDto.go
@@ -0,0 +1,59 @@
+package dto
+
+
+type PublicAccountDto struct{
+ UserId string `json:"userId"`
+ CreatedAt string `json:"createdAt"`
+ UpdatedAt string `json:"updatedAt"`
+ Status string `json:"status"`
+ WorkStatus string `json:"workStatus"`
+ ExternalId string `json:"externalId,omitempty"`
+ Email string `json:"email,omitempty"`
+ Phone string `json:"phone,omitempty"`
+ PhoneCountryCode string `json:"phoneCountryCode,omitempty"`
+ Username string `json:"username,omitempty"`
+ Name string `json:"name,omitempty"`
+ Nickname string `json:"nickname,omitempty"`
+ Photo string `json:"photo,omitempty"`
+ LoginsCount int `json:"loginsCount,omitempty"`
+ LastLogin string `json:"lastLogin,omitempty"`
+ LastIp string `json:"lastIp,omitempty"`
+ Gender string `json:"gender"`
+ EmailVerified bool `json:"emailVerified"`
+ PhoneVerified bool `json:"phoneVerified"`
+ PasswordLastSetAt string `json:"passwordLastSetAt,omitempty"`
+ Birthdate string `json:"birthdate,omitempty"`
+ Country string `json:"country,omitempty"`
+ Province string `json:"province,omitempty"`
+ City string `json:"city,omitempty"`
+ Address string `json:"address,omitempty"`
+ StreetAddress string `json:"streetAddress,omitempty"`
+ PostalCode string `json:"postalCode,omitempty"`
+ Company string `json:"company,omitempty"`
+ Browser string `json:"browser,omitempty"`
+ Device string `json:"device,omitempty"`
+ GivenName string `json:"givenName,omitempty"`
+ FamilyName string `json:"familyName,omitempty"`
+ MiddleName string `json:"middleName,omitempty"`
+ Profile string `json:"profile,omitempty"`
+ PreferredUsername string `json:"preferredUsername,omitempty"`
+ Website string `json:"website,omitempty"`
+ Zoneinfo string `json:"zoneinfo,omitempty"`
+ Locale string `json:"locale,omitempty"`
+ Formatted string `json:"formatted,omitempty"`
+ Region string `json:"region,omitempty"`
+ UserSourceType string `json:"userSourceType"`
+ UserSourceId string `json:"userSourceId,omitempty"`
+ LastLoginApp string `json:"lastLoginApp,omitempty"`
+ MainDepartmentId string `json:"mainDepartmentId,omitempty"`
+ LastMfaTime string `json:"lastMfaTime,omitempty"`
+ PasswordSecurityLevel int `json:"passwordSecurityLevel,omitempty"`
+ ResetPasswordOnNextLogin bool `json:"resetPasswordOnNextLogin,omitempty"`
+ RegisterSource []string `json:"registerSource,omitempty"`
+ DepartmentIds []string `json:"departmentIds,omitempty"`
+ IdentityNumber string `json:"identityNumber,omitempty"`
+ CustomData interface{} `json:"customData,omitempty"`
+ StatusChangedAt string `json:"statusChangedAt,omitempty"`
+ TenantId string `json:"tenantId,omitempty"`
+}
+
diff --git a/dto/PublicAccountListRespDto.go b/dto/PublicAccountListRespDto.go
new file mode 100644
index 0000000..342c024
--- /dev/null
+++ b/dto/PublicAccountListRespDto.go
@@ -0,0 +1,11 @@
+package dto
+
+
+type PublicAccountListRespDto struct{
+ StatusCode int `json:"statusCode"`
+ Message string `json:"message"`
+ ApiCode int `json:"apiCode,omitempty"`
+ RequestId string `json:"requestId,omitempty"`
+ Data []PublicAccountDto `json:"data"`
+}
+
diff --git a/dto/PublicAccountPaginatedRespDto.go b/dto/PublicAccountPaginatedRespDto.go
new file mode 100644
index 0000000..5c0744d
--- /dev/null
+++ b/dto/PublicAccountPaginatedRespDto.go
@@ -0,0 +1,11 @@
+package dto
+
+
+type PublicAccountPaginatedRespDto struct{
+ StatusCode int `json:"statusCode"`
+ Message string `json:"message"`
+ ApiCode int `json:"apiCode,omitempty"`
+ RequestId string `json:"requestId,omitempty"`
+ Data PublicAccountPagingDto `json:"data"`
+}
+
diff --git a/dto/PublicAccountPagingDto.go b/dto/PublicAccountPagingDto.go
new file mode 100644
index 0000000..8af9291
--- /dev/null
+++ b/dto/PublicAccountPagingDto.go
@@ -0,0 +1,8 @@
+package dto
+
+
+type PublicAccountPagingDto struct{
+ TotalCount int `json:"totalCount"`
+ List []PublicAccountDto `json:"list"`
+}
+
diff --git a/dto/PublicAccountSingleRespDto.go b/dto/PublicAccountSingleRespDto.go
new file mode 100644
index 0000000..7ccf4fd
--- /dev/null
+++ b/dto/PublicAccountSingleRespDto.go
@@ -0,0 +1,11 @@
+package dto
+
+
+type PublicAccountSingleRespDto struct{
+ StatusCode int `json:"statusCode"`
+ Message string `json:"message"`
+ ApiCode int `json:"apiCode,omitempty"`
+ RequestId string `json:"requestId,omitempty"`
+ Data PublicAccountDto `json:"data"`
+}
+
diff --git a/dto/PublicAccountSwitchLoginDto.go b/dto/PublicAccountSwitchLoginDto.go
new file mode 100644
index 0000000..bd2a526
--- /dev/null
+++ b/dto/PublicAccountSwitchLoginDto.go
@@ -0,0 +1,8 @@
+package dto
+
+
+type PublicAccountSwitchLoginDto struct{
+ TargetUserId string `json:"targetUserId"`
+ Options SignInBySwitchOptionsDto `json:"options,omitempty"`
+}
+
diff --git a/dto/PublicKeyCredentialCreationOptionsDto.go b/dto/PublicKeyCredentialCreationOptionsDto.go
new file mode 100644
index 0000000..7ddafb0
--- /dev/null
+++ b/dto/PublicKeyCredentialCreationOptionsDto.go
@@ -0,0 +1,12 @@
+package dto
+
+
+type PublicKeyCredentialCreationOptionsDto struct{
+ Challenge string `json:"challenge"`
+ ExcludeCredentials []PublicKeyCredentialDescriptorDto `json:"excludeCredentials"`
+ PubKeyCredParams []PublicKeyCredentialParametersDto `json:"pubKeyCredParams"`
+ Rp PublicKeyCredentialRpEntityDto `json:"rp"`
+ Timeout int `json:"timeout"`
+ User PublicKeyCredentialUserEntityDto `json:"user"`
+}
+
diff --git a/dto/PublicKeyCredentialDescriptorDto.go b/dto/PublicKeyCredentialDescriptorDto.go
new file mode 100644
index 0000000..48dc01d
--- /dev/null
+++ b/dto/PublicKeyCredentialDescriptorDto.go
@@ -0,0 +1,9 @@
+package dto
+
+
+type PublicKeyCredentialDescriptorDto struct{
+ Id string `json:"id"`
+ Transports []string `json:"transports"`
+ Type string `json:"type"`
+}
+
diff --git a/dto/PublicKeyCredentialParametersDto.go b/dto/PublicKeyCredentialParametersDto.go
new file mode 100644
index 0000000..787f0c4
--- /dev/null
+++ b/dto/PublicKeyCredentialParametersDto.go
@@ -0,0 +1,8 @@
+package dto
+
+
+type PublicKeyCredentialParametersDto struct{
+ Alg int `json:"alg"`
+ Type string `json:"type"`
+}
+
diff --git a/dto/PublicKeyCredentialRequestOptionsDto.go b/dto/PublicKeyCredentialRequestOptionsDto.go
new file mode 100644
index 0000000..1f6de81
--- /dev/null
+++ b/dto/PublicKeyCredentialRequestOptionsDto.go
@@ -0,0 +1,10 @@
+package dto
+
+
+type PublicKeyCredentialRequestOptionsDto struct{
+ Challenge string `json:"challenge"`
+ AllowCredentials []PublicKeyCredentialDescriptorDto `json:"allowCredentials,omitempty"`
+ RpId string `json:"rpId"`
+ Timeout int `json:"timeout"`
+}
+
diff --git a/dto/PublicKeyCredentialRpEntityDto.go b/dto/PublicKeyCredentialRpEntityDto.go
new file mode 100644
index 0000000..3c1a7d2
--- /dev/null
+++ b/dto/PublicKeyCredentialRpEntityDto.go
@@ -0,0 +1,8 @@
+package dto
+
+
+type PublicKeyCredentialRpEntityDto struct{
+ Id string `json:"id"`
+ Name string `json:"name"`
+}
+
diff --git a/dto/PublicKeyCredentialUserEntityDto.go b/dto/PublicKeyCredentialUserEntityDto.go
new file mode 100644
index 0000000..a3e7bfd
--- /dev/null
+++ b/dto/PublicKeyCredentialUserEntityDto.go
@@ -0,0 +1,9 @@
+package dto
+
+
+type PublicKeyCredentialUserEntityDto struct{
+ Id string `json:"id"`
+ Name string `json:"name"`
+ DisplayName string `json:"displayName"`
+}
+
diff --git a/dto/QueryTerminalAppsDto.go b/dto/QueryTerminalAppsDto.go
new file mode 100644
index 0000000..2fe0215
--- /dev/null
+++ b/dto/QueryTerminalAppsDto.go
@@ -0,0 +1,8 @@
+package dto
+
+
+type QueryTerminalAppsDto struct{
+ DeviceIds []string `json:"deviceIds"`
+ UserId string `json:"userId,omitempty"`
+}
+
diff --git a/dto/RegistrationCredentialDto.go b/dto/RegistrationCredentialDto.go
new file mode 100644
index 0000000..ab9a364
--- /dev/null
+++ b/dto/RegistrationCredentialDto.go
@@ -0,0 +1,11 @@
+package dto
+
+
+type RegistrationCredentialDto struct{
+ Id string `json:"id"`
+ RawId string `json:"rawId"`
+ Response AuthenticatorAttestationResponseDto `json:"response"`
+ Transports []string `json:"transports,omitempty"`
+ Type string `json:"type"`
+}
+
diff --git a/dto/RegistrationOptionsDto.go b/dto/RegistrationOptionsDto.go
new file mode 100644
index 0000000..0598c8a
--- /dev/null
+++ b/dto/RegistrationOptionsDto.go
@@ -0,0 +1,8 @@
+package dto
+
+
+type RegistrationOptionsDto struct{
+ RegistrationOptions PublicKeyCredentialCreationOptionsDto `json:"registrationOptions"`
+ Ticket string `json:"ticket"`
+}
+
diff --git a/dto/RelationOptionalRange.go b/dto/RelationOptionalRange.go
new file mode 100644
index 0000000..4e14cef
--- /dev/null
+++ b/dto/RelationOptionalRange.go
@@ -0,0 +1,8 @@
+package dto
+
+
+type RelationOptionalRange struct{
+ Conjunction string `json:"conjunction"`
+ Conditions Condition `json:"conditions"`
+}
+
diff --git a/dto/RelationValueListDto.go b/dto/RelationValueListDto.go
new file mode 100644
index 0000000..59c5a8a
--- /dev/null
+++ b/dto/RelationValueListDto.go
@@ -0,0 +1,8 @@
+package dto
+
+
+type RelationValueListDto struct{
+ TotalCount int `json:"totalCount"`
+ List []string `json:"list"`
+}
+
diff --git a/dto/RelationValueListResDto.go b/dto/RelationValueListResDto.go
new file mode 100644
index 0000000..6df9d1f
--- /dev/null
+++ b/dto/RelationValueListResDto.go
@@ -0,0 +1,11 @@
+package dto
+
+
+type RelationValueListResDto struct{
+ StatusCode int `json:"statusCode"`
+ Message string `json:"message"`
+ ApiCode int `json:"apiCode,omitempty"`
+ RequestId string `json:"requestId,omitempty"`
+ Data RelationValueListDto `json:"data"`
+}
+
diff --git a/dto/RemoveDepartmentMembersReqDto.go b/dto/RemoveDepartmentMembersReqDto.go
index 13243e2..ca89cc3 100644
--- a/dto/RemoveDepartmentMembersReqDto.go
+++ b/dto/RemoveDepartmentMembersReqDto.go
@@ -1,9 +1,11 @@
package dto
-type RemoveDepartmentMembersReqDto struct {
- UserIds []string `json:"userIds"`
- OrganizationCode string `json:"organizationCode"`
- DepartmentId string `json:"departmentId"`
- DepartmentIdType string `json:"departmentIdType,omitempty"`
- TenantId string `json:"tenantId,omitempty"`
+
+type RemoveDepartmentMembersReqDto struct{
+ UserIds []string `json:"userIds"`
+ OrganizationCode string `json:"organizationCode"`
+ DepartmentId string `json:"departmentId"`
+ DepartmentIdType string `json:"departmentIdType,omitempty"`
+ TenantId string `json:"tenantId,omitempty"`
}
+
diff --git a/dto/RemoveDeviceCredentialDto.go b/dto/RemoveDeviceCredentialDto.go
new file mode 100644
index 0000000..ddb3e5c
--- /dev/null
+++ b/dto/RemoveDeviceCredentialDto.go
@@ -0,0 +1,6 @@
+package dto
+
+
+type RemoveDeviceCredentialDto struct{
+}
+
diff --git a/dto/RemovePostDto.go b/dto/RemovePostDto.go
new file mode 100644
index 0000000..e0404c4
--- /dev/null
+++ b/dto/RemovePostDto.go
@@ -0,0 +1,7 @@
+package dto
+
+
+type RemovePostDto struct{
+ Code string `json:"code"`
+}
+
diff --git a/dto/RemoveRelationValueDto.go b/dto/RemoveRelationValueDto.go
new file mode 100644
index 0000000..16b64e1
--- /dev/null
+++ b/dto/RemoveRelationValueDto.go
@@ -0,0 +1,10 @@
+package dto
+
+
+type RemoveRelationValueDto struct{
+ Value string `json:"value"`
+ FieldIds []string `json:"fieldIds"`
+ RowId string `json:"rowId"`
+ ModelId string `json:"modelId"`
+}
+
diff --git a/dto/RemoveRowDto.go b/dto/RemoveRowDto.go
new file mode 100644
index 0000000..d3fcf58
--- /dev/null
+++ b/dto/RemoveRowDto.go
@@ -0,0 +1,9 @@
+package dto
+
+
+type RemoveRowDto struct{
+ RowIdList []string `json:"rowIdList"`
+ ModelId string `json:"modelId"`
+ Recursive bool `json:"recursive,omitempty"`
+}
+
diff --git a/dto/RemoveTenantDepartmentMembersReqDto.go b/dto/RemoveTenantDepartmentMembersReqDto.go
new file mode 100644
index 0000000..1116462
--- /dev/null
+++ b/dto/RemoveTenantDepartmentMembersReqDto.go
@@ -0,0 +1,12 @@
+package dto
+
+
+type RemoveTenantDepartmentMembersReqDto struct{
+ OrganizationCode string `json:"organizationCode"`
+ DepartmentId string `json:"departmentId"`
+ DepartmentIdType string `json:"departmentIdType,omitempty"`
+ LinkUserIds []string `json:"linkUserIds,omitempty"`
+ MemberIds []string `json:"memberIds,omitempty"`
+ TenantId string `json:"tenantId,omitempty"`
+}
+
diff --git a/dto/RemoveTenantUsersDto.go b/dto/RemoveTenantUsersDto.go
new file mode 100644
index 0000000..a7e89b5
--- /dev/null
+++ b/dto/RemoveTenantUsersDto.go
@@ -0,0 +1,9 @@
+package dto
+
+
+type RemoveTenantUsersDto struct{
+ TenantId string `json:"tenantId"`
+ LinkUserIds []string `json:"linkUserIds,omitempty"`
+ MemberIds []string `json:"memberIds,omitempty"`
+}
+
diff --git a/dto/ResGroupDto.go b/dto/ResGroupDto.go
index 7a43011..16c6a66 100644
--- a/dto/ResGroupDto.go
+++ b/dto/ResGroupDto.go
@@ -1,9 +1,13 @@
package dto
-type ResGroupDto struct {
- Id string `json:"id"`
- Code string `json:"code"`
- Name string `json:"name"`
- Description string `json:"description"`
- Type string `json:"type"`
+
+type ResGroupDto struct{
+ Id string `json:"id"`
+ Code string `json:"code"`
+ Name string `json:"name"`
+ Description string `json:"description"`
+ Type string `json:"type"`
+ MetadataSource []string `json:"metadataSource"`
+ Members []UserDto `json:"members"`
}
+
diff --git a/dto/Result.go b/dto/Result.go
index 6be2819..51da0fc 100644
--- a/dto/Result.go
+++ b/dto/Result.go
@@ -1,8 +1,10 @@
package dto
-type Result struct {
- AddUser int `json:"addUser"`
- UpdateUser int `json:"updateUser"`
- AddDepartment int `json:"addDepartment"`
- UpdateDepartment int `json:"updateDepartment"`
+
+type Result struct{
+ AddUser int `json:"addUser"`
+ UpdateUser int `json:"updateUser"`
+ AddDepartment int `json:"addDepartment"`
+ UpdateDepartment int `json:"updateDepartment"`
}
+
diff --git a/dto/RevokeApplicationAccessDto.go b/dto/RevokeApplicationAccessDto.go
index 60f3398..af52e4a 100644
--- a/dto/RevokeApplicationAccessDto.go
+++ b/dto/RevokeApplicationAccessDto.go
@@ -1,6 +1,8 @@
package dto
-type RevokeApplicationAccessDto struct {
- AppId string `json:"appId"`
- List []DeleteApplicationPermissionRecordItem `json:"list"`
+
+type RevokeApplicationAccessDto struct{
+ AppId string `json:"appId"`
+ List []DeleteApplicationPermissionRecordItem `json:"list"`
}
+
diff --git a/dto/RevokeDeviceSessionDto.go b/dto/RevokeDeviceSessionDto.go
new file mode 100644
index 0000000..957dd97
--- /dev/null
+++ b/dto/RevokeDeviceSessionDto.go
@@ -0,0 +1,7 @@
+package dto
+
+
+type RevokeDeviceSessionDto struct{
+ DeviceId string `json:"deviceId"`
+}
+
diff --git a/dto/RevokeRoleBatchDto.go b/dto/RevokeRoleBatchDto.go
index 0ea7d4c..6e5c843 100644
--- a/dto/RevokeRoleBatchDto.go
+++ b/dto/RevokeRoleBatchDto.go
@@ -1,6 +1,8 @@
package dto
-type RevokeRoleBatchDto struct {
- Targets []TargetDto `json:"targets"`
- Roles []RoleCodeDto `json:"roles"`
+
+type RevokeRoleBatchDto struct{
+ Targets []TargetDto `json:"targets"`
+ Roles []RoleCodeDto `json:"roles"`
}
+
diff --git a/dto/RiskListItemDto.go b/dto/RiskListItemDto.go
new file mode 100644
index 0000000..b499d60
--- /dev/null
+++ b/dto/RiskListItemDto.go
@@ -0,0 +1,13 @@
+package dto
+
+
+type RiskListItemDto struct{
+ Id string `json:"id"`
+ UserId string `json:"userId"`
+ AddType string `json:"addType"`
+ UserListType string `json:"userListType"`
+ RemoveType string `json:"removeType"`
+ LimitList []string `json:"limitList"`
+ AddAt string `json:"addAt"`
+}
+
diff --git a/dto/RiskListPolicyCreateDto.go b/dto/RiskListPolicyCreateDto.go
new file mode 100644
index 0000000..59a64cb
--- /dev/null
+++ b/dto/RiskListPolicyCreateDto.go
@@ -0,0 +1,17 @@
+package dto
+
+
+type RiskListPolicyCreateDto struct{
+ LimitList string `json:"limitList"`
+ Action string `json:"action"`
+ RemoveType string `json:"removeType"`
+ EventStateType string `json:"eventStateType"`
+ CountThr int `json:"countThr"`
+ TimeRange int `json:"timeRange"`
+ UserCond string `json:"userCond"`
+ IpCond string `json:"ipCond"`
+ UserRange string `json:"userRange"`
+ IpRange string `json:"ipRange"`
+ OptObject string `json:"optObject"`
+}
+
diff --git a/dto/RiskListPolicyDto.go b/dto/RiskListPolicyDto.go
new file mode 100644
index 0000000..c3a2b3d
--- /dev/null
+++ b/dto/RiskListPolicyDto.go
@@ -0,0 +1,9 @@
+package dto
+
+
+type RiskListPolicyDto struct{
+ OptObject string `json:"optObject,omitempty"`
+ Page int `json:"page,omitempty"`
+ Limit int `json:"limit,omitempty"`
+}
+
diff --git a/dto/RiskListPolicyPagingDto.go b/dto/RiskListPolicyPagingDto.go
new file mode 100644
index 0000000..8c268f9
--- /dev/null
+++ b/dto/RiskListPolicyPagingDto.go
@@ -0,0 +1,8 @@
+package dto
+
+
+type RiskListPolicyPagingDto struct{
+ TotalCount int `json:"totalCount"`
+ List []RiskListPolicyRespDto `json:"list"`
+}
+
diff --git a/dto/RiskListPolicyRespDto.go b/dto/RiskListPolicyRespDto.go
new file mode 100644
index 0000000..583c15e
--- /dev/null
+++ b/dto/RiskListPolicyRespDto.go
@@ -0,0 +1,19 @@
+package dto
+
+
+type RiskListPolicyRespDto struct{
+ Id string `json:"id"`
+ OptObject string `json:"optObject"`
+ IpRange string `json:"ipRange"`
+ UserRange string `json:"userRange"`
+ IpCond string `json:"ipCond"`
+ UserCond string `json:"userCond"`
+ TimeRange int `json:"timeRange"`
+ CountThr int `json:"countThr"`
+ EventStateType string `json:"eventStateType"`
+ RemoveType string `json:"removeType"`
+ Action string `json:"action"`
+ LimitList string `json:"limitList"`
+ CreatedAt string `json:"createdAt"`
+}
+
diff --git a/dto/RoleBo.go b/dto/RoleBo.go
new file mode 100644
index 0000000..5357eb2
--- /dev/null
+++ b/dto/RoleBo.go
@@ -0,0 +1,9 @@
+package dto
+
+
+type RoleBo struct{
+ RoleId string `json:"roleId"`
+ RoleName string `json:"roleName"`
+ RoleCode string `json:"roleCode"`
+}
+
diff --git a/dto/RoleCodeDto.go b/dto/RoleCodeDto.go
index 6e7190f..5f027aa 100644
--- a/dto/RoleCodeDto.go
+++ b/dto/RoleCodeDto.go
@@ -1,6 +1,8 @@
package dto
-type RoleCodeDto struct {
- Code string `json:"code"`
- Namespace string `json:"namespace,omitempty"`
+
+type RoleCodeDto struct{
+ Code string `json:"code"`
+ Namespace string `json:"namespace,omitempty"`
}
+
diff --git a/dto/RoleDto.go b/dto/RoleDto.go
index 834b323..ce4f97c 100644
--- a/dto/RoleDto.go
+++ b/dto/RoleDto.go
@@ -1,12 +1,14 @@
package dto
-type RoleDto struct {
- Id string `json:"id"`
- Code string `json:"code"`
- Name string `json:"name"`
- Description string `json:"description"`
- Namespace string `json:"namespace"`
- NamespaceName string `json:"namespaceName"`
- Status string `json:"status,omitempty"`
- DisableTime int `json:"disableTime,omitempty"`
+
+type RoleDto struct{
+ Id string `json:"id"`
+ Code string `json:"code"`
+ Name string `json:"name"`
+ Description string `json:"description"`
+ Namespace string `json:"namespace"`
+ NamespaceName string `json:"namespaceName"`
+ Status string `json:"status,omitempty"`
+ DisableTime int `json:"disableTime,omitempty"`
}
+
diff --git a/dto/RolePermissionListDto.go b/dto/RolePermissionListDto.go
index aeace43..b6f5ecd 100644
--- a/dto/RolePermissionListDto.go
+++ b/dto/RolePermissionListDto.go
@@ -1,14 +1,16 @@
package dto
-type RolePermissionListDto struct {
- RoleId string `json:"roleId"`
- Status string `json:"status"`
- EnableTime int `json:"enableTime,omitempty"`
- EndTime int `json:"endTime,omitempty"`
- UserPoolId string `json:"userPoolId"`
- RoleName string `json:"roleName"`
- RoleCode string `json:"roleCode"`
- Description string `json:"description,omitempty"`
- CreatedAt string `json:"createdAt"`
- UpdatedAt string `json:"updatedAt"`
+
+type RolePermissionListDto struct{
+ RoleId string `json:"roleId"`
+ Status string `json:"status"`
+ EnableTime int `json:"enableTime,omitempty"`
+ EndTime int `json:"endTime,omitempty"`
+ UserPoolId string `json:"userPoolId"`
+ RoleName string `json:"roleName"`
+ RoleCode string `json:"roleCode"`
+ Description string `json:"description,omitempty"`
+ CreatedAt string `json:"createdAt"`
+ UpdatedAt string `json:"updatedAt"`
}
+
diff --git a/dto/RowDto.go b/dto/RowDto.go
new file mode 100644
index 0000000..071c0aa
--- /dev/null
+++ b/dto/RowDto.go
@@ -0,0 +1,8 @@
+package dto
+
+
+type RowDto struct{
+ RowId string `json:"rowId"`
+ CellList []CellDto `json:"cellList"`
+}
+
diff --git a/dto/ScopeDto.go b/dto/ScopeDto.go
new file mode 100644
index 0000000..3d7e27b
--- /dev/null
+++ b/dto/ScopeDto.go
@@ -0,0 +1,9 @@
+package dto
+
+
+type ScopeDto struct{
+ ModelId string `json:"modelId"`
+ Id string `json:"id"`
+ FieldId string `json:"fieldId"`
+}
+
diff --git a/dto/SearchDepartmentMembersDto.go b/dto/SearchDepartmentMembersDto.go
index aea657d..33dd137 100644
--- a/dto/SearchDepartmentMembersDto.go
+++ b/dto/SearchDepartmentMembersDto.go
@@ -1,15 +1,17 @@
package dto
-type SearchDepartmentMembersDto struct {
- OrganizationCode string `json:"organizationCode,omitempty"`
- DepartmentId string `json:"departmentId,omitempty"`
- Keywords string `json:"keywords,omitempty"`
- Page int `json:"page,omitempty"`
- Limit int `json:"limit,omitempty"`
- DepartmentIdType string `json:"departmentIdType,omitempty"`
- IncludeChildrenDepartments bool `json:"includeChildrenDepartments,omitempty"`
- WithCustomData bool `json:"withCustomData,omitempty"`
- WithIdentities bool `json:"withIdentities,omitempty"`
- WithDepartmentIds bool `json:"withDepartmentIds,omitempty"`
- TenantId string `json:"tenantId,omitempty"`
+
+type SearchDepartmentMembersDto struct{
+ OrganizationCode string `json:"organizationCode,omitempty"`
+ DepartmentId string `json:"departmentId,omitempty"`
+ Keywords string `json:"keywords,omitempty"`
+ Page int `json:"page,omitempty"`
+ Limit int `json:"limit,omitempty"`
+ DepartmentIdType string `json:"departmentIdType,omitempty"`
+ IncludeChildrenDepartments bool `json:"includeChildrenDepartments,omitempty"`
+ WithCustomData bool `json:"withCustomData,omitempty"`
+ WithIdentities bool `json:"withIdentities,omitempty"`
+ WithDepartmentIds bool `json:"withDepartmentIds,omitempty"`
+ TenantId string `json:"tenantId,omitempty"`
}
+
diff --git a/dto/SearchDepartmentsListReqDto.go b/dto/SearchDepartmentsListReqDto.go
index bd7e3d6..5a6e194 100644
--- a/dto/SearchDepartmentsListReqDto.go
+++ b/dto/SearchDepartmentsListReqDto.go
@@ -1,12 +1,16 @@
package dto
-type SearchDepartmentsListReqDto struct {
- OrganizationCode string `json:"organizationCode"`
- WithCustomData bool `json:"withCustomData,omitempty"`
- Page int `json:"page,omitempty"`
- Limit int `json:"limit,omitempty"`
- AdvancedFilter []SearchDepartmentsFilterItemDto `json:"advancedFilter,omitempty"`
- SortBy string `json:"sortBy,omitempty"`
- OrderBy string `json:"orderBy,omitempty"`
- TenantId string `json:"tenantId,omitempty"`
+
+type SearchDepartmentsListReqDto struct{
+ OrganizationCode string `json:"organizationCode"`
+ WithCustomData bool `json:"withCustomData,omitempty"`
+ WithPost bool `json:"withPost,omitempty"`
+ Page int `json:"page,omitempty"`
+ Limit int `json:"limit,omitempty"`
+ AdvancedFilter []SearchDepartmentsFilterItemDto `json:"advancedFilter,omitempty"`
+ SortBy string `json:"sortBy,omitempty"`
+ OrderBy string `json:"orderBy,omitempty"`
+ Sort []DepartmentSortingDto `json:"sort,omitempty"`
+ TenantId string `json:"tenantId,omitempty"`
}
+
diff --git a/dto/SearchDepartmentsReqDto.go b/dto/SearchDepartmentsReqDto.go
index c4d05b1..2f18c8f 100644
--- a/dto/SearchDepartmentsReqDto.go
+++ b/dto/SearchDepartmentsReqDto.go
@@ -1,8 +1,10 @@
package dto
-type SearchDepartmentsReqDto struct {
- Keywords string `json:"keywords"`
- OrganizationCode string `json:"organizationCode"`
- WithCustomData bool `json:"withCustomData,omitempty"`
- TenantId string `json:"tenantId,omitempty"`
+
+type SearchDepartmentsReqDto struct{
+ Keywords string `json:"keywords"`
+ OrganizationCode string `json:"organizationCode"`
+ WithCustomData bool `json:"withCustomData,omitempty"`
+ TenantId string `json:"tenantId,omitempty"`
}
+
diff --git a/dto/SearchOrganizationsDto.go b/dto/SearchOrganizationsDto.go
index 84a23d9..3f54d12 100644
--- a/dto/SearchOrganizationsDto.go
+++ b/dto/SearchOrganizationsDto.go
@@ -1,9 +1,11 @@
package dto
-type SearchOrganizationsDto struct {
- Keywords string `json:"keywords,omitempty"`
- Page int `json:"page,omitempty"`
- Limit int `json:"limit,omitempty"`
- WithCustomData bool `json:"withCustomData,omitempty"`
- TenantId string `json:"tenantId,omitempty"`
+
+type SearchOrganizationsDto struct{
+ Keywords string `json:"keywords,omitempty"`
+ Page int `json:"page,omitempty"`
+ Limit int `json:"limit,omitempty"`
+ WithCustomData bool `json:"withCustomData,omitempty"`
+ TenantId string `json:"tenantId,omitempty"`
}
+
diff --git a/dto/SendEmailBatchDataDto.go b/dto/SendEmailBatchDataDto.go
new file mode 100644
index 0000000..790101b
--- /dev/null
+++ b/dto/SendEmailBatchDataDto.go
@@ -0,0 +1,7 @@
+package dto
+
+
+type SendEmailBatchDataDto struct{
+ Success bool `json:"success"`
+}
+
diff --git a/dto/SendInviteTenantUserEmailDto.go b/dto/SendInviteTenantUserEmailDto.go
new file mode 100644
index 0000000..54b4e21
--- /dev/null
+++ b/dto/SendInviteTenantUserEmailDto.go
@@ -0,0 +1,6 @@
+package dto
+
+
+type SendInviteTenantUserEmailDto struct{
+}
+
diff --git a/dto/SendManyTenantEmailDto.go b/dto/SendManyTenantEmailDto.go
new file mode 100644
index 0000000..4dffa96
--- /dev/null
+++ b/dto/SendManyTenantEmailDto.go
@@ -0,0 +1,9 @@
+package dto
+
+
+type SendManyTenantEmailDto struct{
+ AdminName string `json:"adminName"`
+ ImportId int `json:"importId"`
+ Users []SendTenantEmailDto `json:"users"`
+}
+
diff --git a/dto/SendManyTenantSmsDto.go b/dto/SendManyTenantSmsDto.go
new file mode 100644
index 0000000..b17cb64
--- /dev/null
+++ b/dto/SendManyTenantSmsDto.go
@@ -0,0 +1,9 @@
+package dto
+
+
+type SendManyTenantSmsDto struct{
+ AdminName string `json:"adminName"`
+ ImportId int `json:"importId"`
+ Users []SendTenantSmsDto `json:"users"`
+}
+
diff --git a/dto/SendSmsBatchDataDto.go b/dto/SendSmsBatchDataDto.go
new file mode 100644
index 0000000..626dff2
--- /dev/null
+++ b/dto/SendSmsBatchDataDto.go
@@ -0,0 +1,7 @@
+package dto
+
+
+type SendSmsBatchDataDto struct{
+ Success bool `json:"success"`
+}
+
diff --git a/dto/SendSmsBatchRespDto.go b/dto/SendSmsBatchRespDto.go
new file mode 100644
index 0000000..d17bf82
--- /dev/null
+++ b/dto/SendSmsBatchRespDto.go
@@ -0,0 +1,11 @@
+package dto
+
+
+type SendSmsBatchRespDto struct{
+ StatusCode int `json:"statusCode"`
+ Message string `json:"message"`
+ ApiCode int `json:"apiCode,omitempty"`
+ RequestId string `json:"requestId,omitempty"`
+ Data SendSmsBatchDataDto `json:"data"`
+}
+
diff --git a/dto/SendTenantEmailDto.go b/dto/SendTenantEmailDto.go
new file mode 100644
index 0000000..278bc45
--- /dev/null
+++ b/dto/SendTenantEmailDto.go
@@ -0,0 +1,12 @@
+package dto
+
+
+type SendTenantEmailDto struct{
+ AdminName string `json:"adminName"`
+ UserName string `json:"userName"`
+ Email string `json:"email"`
+ Identifier string `json:"identifier"`
+ TenantId string `json:"tenantId"`
+ TenantName string `json:"tenantName"`
+}
+
diff --git a/dto/SendTenantSmsDto.go b/dto/SendTenantSmsDto.go
new file mode 100644
index 0000000..ca41cf6
--- /dev/null
+++ b/dto/SendTenantSmsDto.go
@@ -0,0 +1,13 @@
+package dto
+
+
+type SendTenantSmsDto struct{
+ AdminName string `json:"adminName"`
+ UserName string `json:"userName"`
+ Identifier string `json:"identifier"`
+ Phone string `json:"phone"`
+ PhoneCountryCode string `json:"phoneCountryCode"`
+ TenantId string `json:"tenantId"`
+ TenantName string `json:"tenantName"`
+}
+
diff --git a/dto/SetCustomDataDto.go b/dto/SetCustomDataDto.go
index bad810e..1ec76d7 100644
--- a/dto/SetCustomDataDto.go
+++ b/dto/SetCustomDataDto.go
@@ -2,6 +2,7 @@ package dto
type SetCustomDataDto struct{
+ TenantId string `json:"tenantId,omitempty"`
Key string `json:"key"`
Value string `json:"value"`
}
diff --git a/dto/SetCustomDataReqDto.go b/dto/SetCustomDataReqDto.go
index 2173b74..966780e 100644
--- a/dto/SetCustomDataReqDto.go
+++ b/dto/SetCustomDataReqDto.go
@@ -5,6 +5,7 @@ type SetCustomDataReqDto struct{
List []SetCustomDataDto `json:"list"`
TargetIdentifier string `json:"targetIdentifier"`
TargetType string `json:"targetType"`
+ TenantId string `json:"tenantId,omitempty"`
Namespace string `json:"namespace,omitempty"`
}
diff --git a/dto/SetCustomFieldDto.go b/dto/SetCustomFieldDto.go
index 66c14f4..7951031 100644
--- a/dto/SetCustomFieldDto.go
+++ b/dto/SetCustomFieldDto.go
@@ -12,6 +12,9 @@ type SetCustomFieldDto struct{
UserEditable bool `json:"userEditable,omitempty"`
VisibleInAdminConsole bool `json:"visibleInAdminConsole,omitempty"`
VisibleInUserCenter bool `json:"visibleInUserCenter,omitempty"`
+ ValidateRules interface{} `json:"validateRules,omitempty"`
+ AppIds []string `json:"appIds,omitempty"`
+ Desensitization bool `json:"desensitization,omitempty"`
Options []CustomFieldSelectOption `json:"options,omitempty"`
I18n CustomFieldI18n `json:"i18n,omitempty"`
}
diff --git a/dto/SetCustomFieldsReqDto.go b/dto/SetCustomFieldsReqDto.go
index d931960..ed43ecb 100644
--- a/dto/SetCustomFieldsReqDto.go
+++ b/dto/SetCustomFieldsReqDto.go
@@ -3,5 +3,6 @@ package dto
type SetCustomFieldsReqDto struct{
List []SetCustomFieldDto `json:"list"`
+ TenantId string `json:"tenantId,omitempty"`
}
diff --git a/dto/SetMfaStatusDto.go b/dto/SetMfaStatusDto.go
new file mode 100644
index 0000000..94238b6
--- /dev/null
+++ b/dto/SetMfaStatusDto.go
@@ -0,0 +1,9 @@
+package dto
+
+
+type SetMfaStatusDto struct{
+ MfaTriggerData GetMfaInfoDataDto `json:"mfaTriggerData"`
+ UserId string `json:"userId"`
+ UserIdType string `json:"userIdType,omitempty"`
+}
+
diff --git a/dto/SetPublicAccountBatchReqDto.go b/dto/SetPublicAccountBatchReqDto.go
new file mode 100644
index 0000000..a5331ba
--- /dev/null
+++ b/dto/SetPublicAccountBatchReqDto.go
@@ -0,0 +1,8 @@
+package dto
+
+
+type SetPublicAccountBatchReqDto struct{
+ PublicAccountId string `json:"publicAccountId"`
+ UserIds []string `json:"userIds"`
+}
+
diff --git a/dto/SetUserDepartmentsDto.go b/dto/SetUserDepartmentsDto.go
index 0720136..e45c63e 100644
--- a/dto/SetUserDepartmentsDto.go
+++ b/dto/SetUserDepartmentsDto.go
@@ -2,8 +2,8 @@ package dto
type SetUserDepartmentsDto struct{
- Departments []SetUserDepartmentDto `json:"departments"`
UserId string `json:"userId"`
+ Departments []SetUserDepartmentDto `json:"departments"`
Options SetUserDepartmentsOptionsDto `json:"options,omitempty"`
}
diff --git a/dto/SetUserGroupsDto.go b/dto/SetUserGroupsDto.go
new file mode 100644
index 0000000..cd79ba8
--- /dev/null
+++ b/dto/SetUserGroupsDto.go
@@ -0,0 +1,8 @@
+package dto
+
+
+type SetUserGroupsDto struct{
+ GroupIds []string `json:"groupIds"`
+ UserId string `json:"userId"`
+}
+
diff --git a/dto/SetUserOfPublicAccountBatchReqDto.go b/dto/SetUserOfPublicAccountBatchReqDto.go
new file mode 100644
index 0000000..d5139e1
--- /dev/null
+++ b/dto/SetUserOfPublicAccountBatchReqDto.go
@@ -0,0 +1,8 @@
+package dto
+
+
+type SetUserOfPublicAccountBatchReqDto struct{
+ UserId string `json:"userId"`
+ PublicAccountIds []string `json:"publicAccountIds"`
+}
+
diff --git a/dto/SetUserPostsDto.go b/dto/SetUserPostsDto.go
new file mode 100644
index 0000000..8d18f29
--- /dev/null
+++ b/dto/SetUserPostsDto.go
@@ -0,0 +1,8 @@
+package dto
+
+
+type SetUserPostsDto struct{
+ PostIds []string `json:"postIds"`
+ UserId string `json:"userId"`
+}
+
diff --git a/dto/SetUserRolesDto.go b/dto/SetUserRolesDto.go
new file mode 100644
index 0000000..2ec2d16
--- /dev/null
+++ b/dto/SetUserRolesDto.go
@@ -0,0 +1,8 @@
+package dto
+
+
+type SetUserRolesDto struct{
+ RoleIds []string `json:"roleIds"`
+ UserId string `json:"userId"`
+}
+
diff --git a/dto/SignInByAmazonPayloadDto.go b/dto/SignInByAmazonPayloadDto.go
new file mode 100644
index 0000000..3fc9190
--- /dev/null
+++ b/dto/SignInByAmazonPayloadDto.go
@@ -0,0 +1,7 @@
+package dto
+
+
+type SignInByAmazonPayloadDto struct{
+ AccessToken string `json:"access_token"`
+}
+
diff --git a/dto/SignInByBaiduPayloadDto.go b/dto/SignInByBaiduPayloadDto.go
new file mode 100644
index 0000000..0ae4532
--- /dev/null
+++ b/dto/SignInByBaiduPayloadDto.go
@@ -0,0 +1,8 @@
+package dto
+
+
+type SignInByBaiduPayloadDto struct{
+ Code string `json:"code,omitempty"`
+ AccessToken string `json:"access_token,omitempty"`
+}
+
diff --git a/dto/SignInByDingTalkPayloadDto.go b/dto/SignInByDingTalkPayloadDto.go
new file mode 100644
index 0000000..3fa07a5
--- /dev/null
+++ b/dto/SignInByDingTalkPayloadDto.go
@@ -0,0 +1,8 @@
+package dto
+
+
+type SignInByDingTalkPayloadDto struct{
+ Code string `json:"code"`
+ IsSnsCode bool `json:"isSnsCode,omitempty"`
+}
+
diff --git a/dto/SignInByDouyinPayloadDto.go b/dto/SignInByDouyinPayloadDto.go
new file mode 100644
index 0000000..0ffa33b
--- /dev/null
+++ b/dto/SignInByDouyinPayloadDto.go
@@ -0,0 +1,7 @@
+package dto
+
+
+type SignInByDouyinPayloadDto struct{
+ Code string `json:"code"`
+}
+
diff --git a/dto/SignInByFacebookPayloadDto.go b/dto/SignInByFacebookPayloadDto.go
new file mode 100644
index 0000000..937fc2e
--- /dev/null
+++ b/dto/SignInByFacebookPayloadDto.go
@@ -0,0 +1,7 @@
+package dto
+
+
+type SignInByFacebookPayloadDto struct{
+ AccessToken string `json:"access_token"`
+}
+
diff --git a/dto/SignInByGiteePayloadDto.go b/dto/SignInByGiteePayloadDto.go
new file mode 100644
index 0000000..8407b3e
--- /dev/null
+++ b/dto/SignInByGiteePayloadDto.go
@@ -0,0 +1,7 @@
+package dto
+
+
+type SignInByGiteePayloadDto struct{
+ Code string `json:"code"`
+}
+
diff --git a/dto/SignInByGithubPayloadDto.go b/dto/SignInByGithubPayloadDto.go
new file mode 100644
index 0000000..182fcd0
--- /dev/null
+++ b/dto/SignInByGithubPayloadDto.go
@@ -0,0 +1,7 @@
+package dto
+
+
+type SignInByGithubPayloadDto struct{
+ Code string `json:"code"`
+}
+
diff --git a/dto/SignInByGitlabPayloadDto.go b/dto/SignInByGitlabPayloadDto.go
new file mode 100644
index 0000000..76f9d6f
--- /dev/null
+++ b/dto/SignInByGitlabPayloadDto.go
@@ -0,0 +1,7 @@
+package dto
+
+
+type SignInByGitlabPayloadDto struct{
+ Code string `json:"code"`
+}
+
diff --git a/dto/SignInByHuaweiPayloadDto.go b/dto/SignInByHuaweiPayloadDto.go
new file mode 100644
index 0000000..32b0dad
--- /dev/null
+++ b/dto/SignInByHuaweiPayloadDto.go
@@ -0,0 +1,7 @@
+package dto
+
+
+type SignInByHuaweiPayloadDto struct{
+ Code string `json:"code"`
+}
+
diff --git a/dto/SignInByKuaishouPayloadDto.go b/dto/SignInByKuaishouPayloadDto.go
new file mode 100644
index 0000000..6f0dfd5
--- /dev/null
+++ b/dto/SignInByKuaishouPayloadDto.go
@@ -0,0 +1,7 @@
+package dto
+
+
+type SignInByKuaishouPayloadDto struct{
+ Code string `json:"code"`
+}
+
diff --git a/dto/SignInByLarkBlockPayloadDto.go b/dto/SignInByLarkBlockPayloadDto.go
new file mode 100644
index 0000000..36ab2e5
--- /dev/null
+++ b/dto/SignInByLarkBlockPayloadDto.go
@@ -0,0 +1,7 @@
+package dto
+
+
+type SignInByLarkBlockPayloadDto struct{
+ Code string `json:"code,omitempty"`
+}
+
diff --git a/dto/SignInByLinePayloadDto.go b/dto/SignInByLinePayloadDto.go
new file mode 100644
index 0000000..3357b6b
--- /dev/null
+++ b/dto/SignInByLinePayloadDto.go
@@ -0,0 +1,8 @@
+package dto
+
+
+type SignInByLinePayloadDto struct{
+ AccessToken string `json:"access_token"`
+ IdToken string `json:"id_token,omitempty"`
+}
+
diff --git a/dto/SignInByLinkedInPayloadDto.go b/dto/SignInByLinkedInPayloadDto.go
new file mode 100644
index 0000000..57428f4
--- /dev/null
+++ b/dto/SignInByLinkedInPayloadDto.go
@@ -0,0 +1,7 @@
+package dto
+
+
+type SignInByLinkedInPayloadDto struct{
+ Code string `json:"code"`
+}
+
diff --git a/dto/SignInByMobileOptionsDto.go b/dto/SignInByMobileOptionsDto.go
index 1c938f0..bd0dcc4 100644
--- a/dto/SignInByMobileOptionsDto.go
+++ b/dto/SignInByMobileOptionsDto.go
@@ -3,7 +3,7 @@ package dto
type SignInByMobileOptionsDto struct{
Scope string `json:"scope,omitempty"`
- Context string `json:"context,omitempty"`
+ Context interface{} `json:"context,omitempty"`
TenantId string `json:"tenantId,omitempty"`
CustomData interface{} `json:"customData,omitempty"`
}
diff --git a/dto/SignInByOPPOPayloadDto.go b/dto/SignInByOPPOPayloadDto.go
new file mode 100644
index 0000000..e28f33e
--- /dev/null
+++ b/dto/SignInByOPPOPayloadDto.go
@@ -0,0 +1,7 @@
+package dto
+
+
+type SignInByOPPOPayloadDto struct{
+ Code string `json:"code"`
+}
+
diff --git a/dto/SignInByPushDto.go b/dto/SignInByPushDto.go
new file mode 100644
index 0000000..c8c3c94
--- /dev/null
+++ b/dto/SignInByPushDto.go
@@ -0,0 +1,8 @@
+package dto
+
+
+type SignInByPushDto struct{
+ Account string `json:"account"`
+ Options SignInByPushOptionsDto `json:"options,omitempty"`
+}
+
diff --git a/dto/SignInByPushOptionsDto.go b/dto/SignInByPushOptionsDto.go
new file mode 100644
index 0000000..5ecfb24
--- /dev/null
+++ b/dto/SignInByPushOptionsDto.go
@@ -0,0 +1,9 @@
+package dto
+
+
+type SignInByPushOptionsDto struct{
+ Scope string `json:"scope,omitempty"`
+ Context string `json:"context,omitempty"`
+ CustomData interface{} `json:"customData,omitempty"`
+}
+
diff --git a/dto/SignInByQQPayloadDto.go b/dto/SignInByQQPayloadDto.go
new file mode 100644
index 0000000..7f77f8e
--- /dev/null
+++ b/dto/SignInByQQPayloadDto.go
@@ -0,0 +1,7 @@
+package dto
+
+
+type SignInByQQPayloadDto struct{
+ AccessToken string `json:"access_token"`
+}
+
diff --git a/dto/SignInBySlackPayloadDto.go b/dto/SignInBySlackPayloadDto.go
new file mode 100644
index 0000000..da93381
--- /dev/null
+++ b/dto/SignInBySlackPayloadDto.go
@@ -0,0 +1,7 @@
+package dto
+
+
+type SignInBySlackPayloadDto struct{
+ Code string `json:"code"`
+}
+
diff --git a/dto/SignInBySwitchOptionsDto.go b/dto/SignInBySwitchOptionsDto.go
new file mode 100644
index 0000000..caaafaf
--- /dev/null
+++ b/dto/SignInBySwitchOptionsDto.go
@@ -0,0 +1,9 @@
+package dto
+
+
+type SignInBySwitchOptionsDto struct{
+ Scope string `json:"scope,omitempty"`
+ Context interface{} `json:"context,omitempty"`
+ CustomData interface{} `json:"customData,omitempty"`
+}
+
diff --git a/dto/SignInByWebAuthnOptionsDto.go b/dto/SignInByWebAuthnOptionsDto.go
new file mode 100644
index 0000000..3e3fd7e
--- /dev/null
+++ b/dto/SignInByWebAuthnOptionsDto.go
@@ -0,0 +1,9 @@
+package dto
+
+
+type SignInByWebAuthnOptionsDto struct{
+ Scope string `json:"scope,omitempty"`
+ Context interface{} `json:"context,omitempty"`
+ CustomData interface{} `json:"customData,omitempty"`
+}
+
diff --git a/dto/SignInByWechatMiniProgramCodeAndPhonePayloadDto.go b/dto/SignInByWechatMiniProgramCodeAndPhonePayloadDto.go
new file mode 100644
index 0000000..86d1a43
--- /dev/null
+++ b/dto/SignInByWechatMiniProgramCodeAndPhonePayloadDto.go
@@ -0,0 +1,8 @@
+package dto
+
+
+type SignInByWechatMiniProgramCodeAndPhonePayloadDto struct{
+ WxLoginInfo SignInByWechatMiniProgramCodePayloadDto `json:"wxLoginInfo"`
+ WxPhoneInfo SignInByWechatMiniProgramPhoneInfoPayloadDto `json:"wxPhoneInfo"`
+}
+
diff --git a/dto/SignInByWechatMiniProgramCodePayloadDto.go b/dto/SignInByWechatMiniProgramCodePayloadDto.go
index 8c1a2bf..23db67d 100644
--- a/dto/SignInByWechatMiniProgramCodePayloadDto.go
+++ b/dto/SignInByWechatMiniProgramCodePayloadDto.go
@@ -2,8 +2,8 @@ package dto
type SignInByWechatMiniProgramCodePayloadDto struct{
- EncryptedData string `json:"encryptedData"`
- Iv string `json:"iv"`
+ EncryptedData string `json:"encryptedData,omitempty"`
+ Iv string `json:"iv,omitempty"`
Code string `json:"code"`
}
diff --git a/dto/SignInByWechatMiniProgramPhoneInfoPayloadDto.go b/dto/SignInByWechatMiniProgramPhoneInfoPayloadDto.go
new file mode 100644
index 0000000..8ce6db0
--- /dev/null
+++ b/dto/SignInByWechatMiniProgramPhoneInfoPayloadDto.go
@@ -0,0 +1,7 @@
+package dto
+
+
+type SignInByWechatMiniProgramPhoneInfoPayloadDto struct{
+ Code string `json:"code"`
+}
+
diff --git a/dto/SignInByWeiboPayloadDto.go b/dto/SignInByWeiboPayloadDto.go
new file mode 100644
index 0000000..ee090f4
--- /dev/null
+++ b/dto/SignInByWeiboPayloadDto.go
@@ -0,0 +1,7 @@
+package dto
+
+
+type SignInByWeiboPayloadDto struct{
+ AccessToken string `json:"access_token"`
+}
+
diff --git a/dto/SignInByXiaomiPayloadDto.go b/dto/SignInByXiaomiPayloadDto.go
new file mode 100644
index 0000000..31e1190
--- /dev/null
+++ b/dto/SignInByXiaomiPayloadDto.go
@@ -0,0 +1,7 @@
+package dto
+
+
+type SignInByXiaomiPayloadDto struct{
+ Code string `json:"code"`
+}
+
diff --git a/dto/SignInFastpassDto.go b/dto/SignInFastpassDto.go
new file mode 100644
index 0000000..6b5737f
--- /dev/null
+++ b/dto/SignInFastpassDto.go
@@ -0,0 +1,7 @@
+package dto
+
+
+type SignInFastpassDto struct{
+ Options SignInFastpassOptionsDto `json:"options,omitempty"`
+}
+
diff --git a/dto/SignInFastpassOptionsDto.go b/dto/SignInFastpassOptionsDto.go
new file mode 100644
index 0000000..23d728c
--- /dev/null
+++ b/dto/SignInFastpassOptionsDto.go
@@ -0,0 +1,9 @@
+package dto
+
+
+type SignInFastpassOptionsDto struct{
+ Scope string `json:"scope,omitempty"`
+ Context interface{} `json:"context,omitempty"`
+ CustomData interface{} `json:"customData,omitempty"`
+}
+
diff --git a/dto/SignInOptionsDto.go b/dto/SignInOptionsDto.go
index 3d1a141..3866375 100644
--- a/dto/SignInOptionsDto.go
+++ b/dto/SignInOptionsDto.go
@@ -4,7 +4,7 @@ package dto
type SignInOptionsDto struct{
Scope string `json:"scope,omitempty"`
ClientIp string `json:"clientIp,omitempty"`
- Context string `json:"context,omitempty"`
+ Context interface{} `json:"context,omitempty"`
TenantId string `json:"tenantId,omitempty"`
CustomData interface{} `json:"customData,omitempty"`
AutoRegister bool `json:"autoRegister,omitempty"`
diff --git a/dto/SigninByMobileDto.go b/dto/SigninByMobileDto.go
index 4b27387..ef7e575 100644
--- a/dto/SigninByMobileDto.go
+++ b/dto/SigninByMobileDto.go
@@ -11,10 +11,29 @@ type SigninByMobileDto struct{
WechatworkAgencyPayload SignInByWechatworkAgencyPayloadDto `json:"wechatworkAgencyPayload,omitempty"`
LarkPublicPayload SignInByLarkPublicPayloadDto `json:"larkPublicPayload,omitempty"`
LarkInternalPayload SignInByLarkInternalPayloadDto `json:"larkInternalPayload,omitempty"`
+ LarkBlockPayload SignInByLarkBlockPayloadDto `json:"larkBlockPayload,omitempty"`
YidunPayload SignInByYidunPayloadDto `json:"yidunPayload,omitempty"`
WechatMiniProgramCodePayload SignInByWechatMiniProgramCodePayloadDto `json:"wechatMiniProgramCodePayload,omitempty"`
WechatMiniProgramPhonePayload SignInByWechatMiniProgramPhonePayloadDto `json:"wechatMiniProgramPhonePayload,omitempty"`
+ WechatMiniProgramCodeAndPhonePayload SignInByWechatMiniProgramCodeAndPhonePayloadDto `json:"wechatMiniProgramCodeAndPhonePayload,omitempty"`
GooglePayload SignInByGooglePayloadDto `json:"googlePayload,omitempty"`
+ FacebookPayload SignInByFacebookPayloadDto `json:"facebookPayload,omitempty"`
+ QqPayload SignInByQQPayloadDto `json:"qqPayload,omitempty"`
+ WeiboPayload SignInByWeiboPayloadDto `json:"weiboPayload,omitempty"`
+ BaiduPayload SignInByBaiduPayloadDto `json:"baiduPayload,omitempty"`
+ LinkedInPayload SignInByLinkedInPayloadDto `json:"linkedInPayload,omitempty"`
+ DingTalkPayload SignInByDingTalkPayloadDto `json:"dingTalkPayload,omitempty"`
+ GithubPayload SignInByGithubPayloadDto `json:"githubPayload,omitempty"`
+ GiteePayload SignInByGiteePayloadDto `json:"giteePayload,omitempty"`
+ GitlabPayload SignInByGitlabPayloadDto `json:"gitlabPayload,omitempty"`
+ DouyinPayload SignInByDouyinPayloadDto `json:"douyinPayload,omitempty"`
+ KuaishouPayload SignInByKuaishouPayloadDto `json:"kuaishouPayload,omitempty"`
+ XiaomiPayload SignInByXiaomiPayloadDto `json:"xiaomiPayload,omitempty"`
+ LinePayload SignInByLinePayloadDto `json:"linePayload,omitempty"`
+ SlackPayload SignInBySlackPayloadDto `json:"slackPayload,omitempty"`
+ OppoPayload SignInByOPPOPayloadDto `json:"oppoPayload,omitempty"`
+ HuaweiPayload SignInByHuaweiPayloadDto `json:"huaweiPayload,omitempty"`
+ AmazonPayload SignInByAmazonPayloadDto `json:"amazonPayload,omitempty"`
Options SignInByMobileOptionsDto `json:"options,omitempty"`
ClientId string `json:"client_id,omitempty"`
ClientSecret string `json:"client_secret,omitempty"`
diff --git a/dto/StrResourceAuthAction.go b/dto/StrResourceAuthAction.go
index 0d196fd..7757e88 100644
--- a/dto/StrResourceAuthAction.go
+++ b/dto/StrResourceAuthAction.go
@@ -1,6 +1,8 @@
package dto
-type StrResourceAuthAction struct {
- Value string `json:"value,omitempty"`
- Actions []string `json:"actions,omitempty"`
+
+type StrResourceAuthAction struct{
+ Value string `json:"value,omitempty"`
+ Actions []string `json:"actions,omitempty"`
}
+
diff --git a/dto/SuspendTerminalDto.go b/dto/SuspendTerminalDto.go
new file mode 100644
index 0000000..07073b4
--- /dev/null
+++ b/dto/SuspendTerminalDto.go
@@ -0,0 +1,8 @@
+package dto
+
+
+type SuspendTerminalDto struct{
+ EndTime int `json:"endTime"`
+ Id string `json:"id"`
+}
+
diff --git a/dto/SuspendTerminalUserDto.go b/dto/SuspendTerminalUserDto.go
new file mode 100644
index 0000000..05b0219
--- /dev/null
+++ b/dto/SuspendTerminalUserDto.go
@@ -0,0 +1,9 @@
+package dto
+
+
+type SuspendTerminalUserDto struct{
+ EndTime string `json:"endTime"`
+ UserId string `json:"userId"`
+ Id string `json:"id"`
+}
+
diff --git a/dto/SyncRelationListRespDto.go b/dto/SyncRelationListRespDto.go
new file mode 100644
index 0000000..4fe97e7
--- /dev/null
+++ b/dto/SyncRelationListRespDto.go
@@ -0,0 +1,11 @@
+package dto
+
+
+type SyncRelationListRespDto struct{
+ StatusCode int `json:"statusCode"`
+ Message string `json:"message"`
+ ApiCode int `json:"apiCode,omitempty"`
+ RequestId string `json:"requestId,omitempty"`
+ Data []UserSyncRelationDto `json:"data"`
+}
+
diff --git a/dto/TabConfigDto.go b/dto/TabConfigDto.go
index eb515f9..3455e18 100644
--- a/dto/TabConfigDto.go
+++ b/dto/TabConfigDto.go
@@ -1,4 +1,6 @@
package dto
-type TabConfigDto struct {
+
+type TabConfigDto struct{
}
+
diff --git a/dto/TenantApplicationDto.go b/dto/TenantApplicationDto.go
index 77aefa7..b6f1f69 100644
--- a/dto/TenantApplicationDto.go
+++ b/dto/TenantApplicationDto.go
@@ -1,12 +1,14 @@
package dto
-type TenantApplicationDto struct {
- UserPoolId string `json:"userPoolId"`
- TenantAppId string `json:"tenantAppId"`
- Name string `json:"name"`
- Description string `json:"description,omitempty"`
- Logo string `json:"logo"`
- ApplicationType string `json:"applicationType"`
- SsoEnabled bool `json:"ssoEnabled"`
- AppId string `json:"appId"`
+
+type TenantApplicationDto struct{
+ UserPoolId string `json:"userPoolId"`
+ TenantAppId string `json:"tenantAppId"`
+ Name string `json:"name"`
+ Description string `json:"description,omitempty"`
+ Logo string `json:"logo"`
+ ApplicationType string `json:"applicationType"`
+ SsoEnabled bool `json:"ssoEnabled"`
+ AppId string `json:"appId"`
}
+
diff --git a/dto/TenantApplicationListPaginatedRespDto.go b/dto/TenantApplicationListPaginatedRespDto.go
index f339331..380a288 100644
--- a/dto/TenantApplicationListPaginatedRespDto.go
+++ b/dto/TenantApplicationListPaginatedRespDto.go
@@ -1,9 +1,11 @@
package dto
-type TenantApplicationListPaginatedRespDto struct {
- StatusCode int `json:"statusCode"`
- Message string `json:"message"`
- ApiCode int `json:"apiCode,omitempty"`
- RequestId string `json:"requestId,omitempty"`
- Data TenantApplicationListPagingDto `json:"data"`
+
+type TenantApplicationListPaginatedRespDto struct{
+ StatusCode int `json:"statusCode"`
+ Message string `json:"message"`
+ ApiCode int `json:"apiCode,omitempty"`
+ RequestId string `json:"requestId,omitempty"`
+ Data TenantApplicationListPagingDto `json:"data"`
}
+
diff --git a/dto/TenantApplicationListPagingDto.go b/dto/TenantApplicationListPagingDto.go
index 7a0680c..b15757e 100644
--- a/dto/TenantApplicationListPagingDto.go
+++ b/dto/TenantApplicationListPagingDto.go
@@ -1,6 +1,8 @@
package dto
-type TenantApplicationListPagingDto struct {
- TotalCount int `json:"totalCount"`
- List []TenantApplicationDto `json:"list"`
+
+type TenantApplicationListPagingDto struct{
+ TotalCount int `json:"totalCount"`
+ List []TenantApplicationDto `json:"list"`
}
+
diff --git a/dto/TenantCooperatorDto.go b/dto/TenantCooperatorDto.go
new file mode 100644
index 0000000..badaee9
--- /dev/null
+++ b/dto/TenantCooperatorDto.go
@@ -0,0 +1,11 @@
+package dto
+
+
+type TenantCooperatorDto struct{
+ UserId string `json:"userId"`
+ Type string `json:"type"`
+ External bool `json:"external"`
+ User UserDto `json:"user"`
+ TenantUser TenantUserDto `json:"tenantUser,omitempty"`
+}
+
diff --git a/dto/TenantCooperatorListPagingDto.go b/dto/TenantCooperatorListPagingDto.go
new file mode 100644
index 0000000..b40632d
--- /dev/null
+++ b/dto/TenantCooperatorListPagingDto.go
@@ -0,0 +1,8 @@
+package dto
+
+
+type TenantCooperatorListPagingDto struct{
+ TotalCount int `json:"totalCount"`
+ List []TenantCooperatorDto `json:"list"`
+}
+
diff --git a/dto/TenantCooperatorPaginatedRespDto.go b/dto/TenantCooperatorPaginatedRespDto.go
new file mode 100644
index 0000000..89b6cdf
--- /dev/null
+++ b/dto/TenantCooperatorPaginatedRespDto.go
@@ -0,0 +1,11 @@
+package dto
+
+
+type TenantCooperatorPaginatedRespDto struct{
+ StatusCode int `json:"statusCode"`
+ Message string `json:"message"`
+ ApiCode int `json:"apiCode,omitempty"`
+ RequestId string `json:"requestId,omitempty"`
+ Data TenantCooperatorListPagingDto `json:"data"`
+}
+
diff --git a/dto/TenantCooperatorSingleDto.go b/dto/TenantCooperatorSingleDto.go
new file mode 100644
index 0000000..afb66b3
--- /dev/null
+++ b/dto/TenantCooperatorSingleDto.go
@@ -0,0 +1,8 @@
+package dto
+
+
+type TenantCooperatorSingleDto struct{
+ List []string `json:"list"`
+ AuthorizedPoliciesCode []string `json:"authorizedPoliciesCode"`
+}
+
diff --git a/dto/TenantCooperatorSingleRespDto.go b/dto/TenantCooperatorSingleRespDto.go
new file mode 100644
index 0000000..f669257
--- /dev/null
+++ b/dto/TenantCooperatorSingleRespDto.go
@@ -0,0 +1,11 @@
+package dto
+
+
+type TenantCooperatorSingleRespDto struct{
+ StatusCode int `json:"statusCode"`
+ Message string `json:"message"`
+ ApiCode int `json:"apiCode,omitempty"`
+ RequestId string `json:"requestId,omitempty"`
+ Data TenantCooperatorSingleDto `json:"data"`
+}
+
diff --git a/dto/TenantDto.go b/dto/TenantDto.go
new file mode 100644
index 0000000..65b4a5a
--- /dev/null
+++ b/dto/TenantDto.go
@@ -0,0 +1,18 @@
+package dto
+
+
+type TenantDto struct{
+ TenantId string `json:"tenantId"`
+ UserPoolId string `json:"userPoolId"`
+ Name string `json:"name"`
+ Description string `json:"description,omitempty"`
+ Logo []string `json:"logo"`
+ RejectHint string `json:"rejectHint,omitempty"`
+ AppIds []string `json:"appIds"`
+ Creator string `json:"creator"`
+ SourceAppId string `json:"sourceAppId"`
+ Source string `json:"source"`
+ Code string `json:"code"`
+ EnterpriseDomains string `json:"enterpriseDomains"`
+}
+
diff --git a/dto/TenantListPagingDto.go b/dto/TenantListPagingDto.go
index 8e85543..8fafcc0 100644
--- a/dto/TenantListPagingDto.go
+++ b/dto/TenantListPagingDto.go
@@ -3,6 +3,6 @@ package dto
type TenantListPagingDto struct{
TotalCount int `json:"totalCount"`
- List []UpdateTenantDto `json:"list"`
+ List []TenantRespDto `json:"list"`
}
diff --git a/dto/TenantRespDto.go b/dto/TenantRespDto.go
new file mode 100644
index 0000000..316e505
--- /dev/null
+++ b/dto/TenantRespDto.go
@@ -0,0 +1,20 @@
+package dto
+
+
+type TenantRespDto struct{
+ TenantId string `json:"tenantId"`
+ UserPoolId string `json:"userPoolId"`
+ Name string `json:"name"`
+ Description string `json:"description,omitempty"`
+ Logo []string `json:"logo"`
+ RejectHint string `json:"rejectHint,omitempty"`
+ AppIds []string `json:"appIds"`
+ Creator string `json:"creator"`
+ SourceAppId string `json:"sourceAppId"`
+ Source string `json:"source"`
+ Code string `json:"code"`
+ EnterpriseDomains string `json:"enterpriseDomains"`
+ CreatorDetail interface{} `json:"creatorDetail,omitempty"`
+ SourceAppDetail interface{} `json:"sourceAppDetail,omitempty"`
+}
+
diff --git a/dto/TenantSingleRespDto.go b/dto/TenantSingleRespDto.go
index b68bb17..fecf133 100644
--- a/dto/TenantSingleRespDto.go
+++ b/dto/TenantSingleRespDto.go
@@ -6,6 +6,6 @@ type TenantSingleRespDto struct{
Message string `json:"message"`
ApiCode int `json:"apiCode,omitempty"`
RequestId string `json:"requestId,omitempty"`
- Data UpdateTenantDto `json:"data"`
+ Data TenantRespDto `json:"data"`
}
diff --git a/dto/TenantUserDto.go b/dto/TenantUserDto.go
index 28e7256..b1d727d 100644
--- a/dto/TenantUserDto.go
+++ b/dto/TenantUserDto.go
@@ -2,23 +2,34 @@ package dto
type TenantUserDto struct{
- TenantId string `json:"tenantId"`
+ Email string `json:"email,omitempty"`
+ Phone string `json:"phone,omitempty"`
+ PhoneCountryCode string `json:"phoneCountryCode,omitempty"`
+ Username string `json:"username,omitempty"`
+ Name string `json:"name,omitempty"`
+ Nickname string `json:"nickname,omitempty"`
+ Photo string `json:"photo,omitempty"`
+ LoginsCount int `json:"loginsCount,omitempty"`
+ LastIp string `json:"lastIp,omitempty"`
+ Gender string `json:"gender"`
+ Birthdate string `json:"birthdate,omitempty"`
+ Country string `json:"country,omitempty"`
+ Province string `json:"province,omitempty"`
+ City string `json:"city,omitempty"`
+ Address string `json:"address,omitempty"`
+ StreetAddress string `json:"streetAddress,omitempty"`
+ PostalCode string `json:"postalCode,omitempty"`
+ GivenName string `json:"givenName,omitempty"`
+ FamilyName string `json:"familyName,omitempty"`
+ MiddleName string `json:"middleName,omitempty"`
+ PreferredUsername string `json:"preferredUsername,omitempty"`
+ LastLoginApp string `json:"lastLoginApp,omitempty"`
UserPoolId string `json:"userPoolId"`
- Username string `json:"username"`
- Name string `json:"name"`
- Nickname string `json:"nickname"`
- Email string `json:"email"`
- Phone string `json:"phone"`
- Address string `json:"address"`
- Birthdate string `json:"birthdate"`
- Blocked bool `json:"blocked"`
- IsTenantAdmin bool `json:"isTenantAdmin"`
- LastIP string `json:"lastIP"`
- LastLoginApp string `json:"lastLoginApp"`
- LastLoginAppLogo string `json:"lastLoginAppLogo"`
- LastLoginAppName string `json:"lastLoginAppName"`
- LoginsCount int `json:"loginsCount"`
+ TenantId string `json:"tenantId"`
MemberId string `json:"memberId"`
LinkUserId string `json:"linkUserId"`
+ IsTenantAdmin bool `json:"isTenantAdmin"`
+ Password string `json:"password,omitempty"`
+ Salt string `json:"salt,omitempty"`
}
diff --git a/dto/TerminalBaseDto.go b/dto/TerminalBaseDto.go
new file mode 100644
index 0000000..24a79c3
--- /dev/null
+++ b/dto/TerminalBaseDto.go
@@ -0,0 +1,7 @@
+package dto
+
+
+type TerminalBaseDto struct{
+ Id string `json:"id"`
+}
+
diff --git a/dto/TerminalInfoDto.go b/dto/TerminalInfoDto.go
new file mode 100644
index 0000000..72e9a6e
--- /dev/null
+++ b/dto/TerminalInfoDto.go
@@ -0,0 +1,8 @@
+package dto
+
+
+type TerminalInfoDto struct{
+ Id string `json:"id"`
+ DeviceUniqueId string `json:"deviceUniqueId"`
+}
+
diff --git a/dto/TerminalInfoRespDto.go b/dto/TerminalInfoRespDto.go
new file mode 100644
index 0000000..83d673f
--- /dev/null
+++ b/dto/TerminalInfoRespDto.go
@@ -0,0 +1,11 @@
+package dto
+
+
+type TerminalInfoRespDto struct{
+ StatusCode int `json:"statusCode"`
+ Message string `json:"message"`
+ ApiCode int `json:"apiCode,omitempty"`
+ RequestId string `json:"requestId,omitempty"`
+ Data TerminalInfoDto `json:"data"`
+}
+
diff --git a/dto/TerminalSessionDto.go b/dto/TerminalSessionDto.go
new file mode 100644
index 0000000..47fbef0
--- /dev/null
+++ b/dto/TerminalSessionDto.go
@@ -0,0 +1,10 @@
+package dto
+
+
+type TerminalSessionDto struct{
+ Device DeviceInfo `json:"device"`
+ LastLoginTime string `json:"lastLoginTime"`
+ LastIp string `json:"lastIp,omitempty"`
+ Online bool `json:"online"`
+}
+
diff --git a/dto/TerminalSessionRespDto.go b/dto/TerminalSessionRespDto.go
new file mode 100644
index 0000000..2ae6f37
--- /dev/null
+++ b/dto/TerminalSessionRespDto.go
@@ -0,0 +1,11 @@
+package dto
+
+
+type TerminalSessionRespDto struct{
+ StatusCode int `json:"statusCode"`
+ Message string `json:"message"`
+ ApiCode int `json:"apiCode,omitempty"`
+ RequestId string `json:"requestId,omitempty"`
+ Data []TerminalSessionDto `json:"data"`
+}
+
diff --git a/dto/TreeResourceAuthAction.go b/dto/TreeResourceAuthAction.go
index fe1cfb4..c47edb5 100644
--- a/dto/TreeResourceAuthAction.go
+++ b/dto/TreeResourceAuthAction.go
@@ -1,5 +1,7 @@
package dto
-type TreeResourceAuthAction struct {
- NodeAuthActionList []TreeStructs `json:"nodeAuthActionList,omitempty"`
+
+type TreeResourceAuthAction struct{
+ NodeAuthActionList []TreeStructs `json:"nodeAuthActionList,omitempty"`
}
+
diff --git a/dto/TreeStructs.go b/dto/TreeStructs.go
index 8e741e8..71d2d8c 100644
--- a/dto/TreeStructs.go
+++ b/dto/TreeStructs.go
@@ -1,9 +1,11 @@
package dto
-type TreeStructs struct {
- Code string `json:"code"`
- Name string `json:"name"`
- Value string `json:"value,omitempty"`
- Actions []string `json:"actions,omitempty"`
- Children []TreeStructs `json:"children,omitempty"`
+
+type TreeStructs struct{
+ Code string `json:"code"`
+ Name string `json:"name"`
+ Value string `json:"value,omitempty"`
+ Actions []string `json:"actions,omitempty"`
+ Children []TreeStructs `json:"children,omitempty"`
}
+
diff --git a/dto/UnbindDeviceDto.go b/dto/UnbindDeviceDto.go
new file mode 100644
index 0000000..4ac5b8c
--- /dev/null
+++ b/dto/UnbindDeviceDto.go
@@ -0,0 +1,7 @@
+package dto
+
+
+type UnbindDeviceDto struct{
+ DeviceId string `json:"deviceId"`
+}
+
diff --git a/dto/UnbindPublicAccountBatchReqDto.go b/dto/UnbindPublicAccountBatchReqDto.go
new file mode 100644
index 0000000..f71bc0d
--- /dev/null
+++ b/dto/UnbindPublicAccountBatchReqDto.go
@@ -0,0 +1,8 @@
+package dto
+
+
+type UnbindPublicAccountBatchReqDto struct{
+ UserId string `json:"userId"`
+ PublicAccountId string `json:"publicAccountId"`
+}
+
diff --git a/dto/UnlinkIdentity.go b/dto/UnlinkIdentity.go
new file mode 100644
index 0000000..1a12d35
--- /dev/null
+++ b/dto/UnlinkIdentity.go
@@ -0,0 +1,10 @@
+package dto
+
+
+type UnlinkIdentity struct{
+ UserId string `json:"userId"`
+ ExtIdpId string `json:"extIdpId"`
+ Type string `json:"type,omitempty"`
+ IsSocial bool `json:"isSocial,omitempty"`
+}
+
diff --git a/dto/UnlinkIdentityDataDto.go b/dto/UnlinkIdentityDataDto.go
new file mode 100644
index 0000000..13b9a4e
--- /dev/null
+++ b/dto/UnlinkIdentityDataDto.go
@@ -0,0 +1,7 @@
+package dto
+
+
+type UnlinkIdentityDataDto struct{
+ Success bool `json:"success"`
+}
+
diff --git a/dto/UnlinkIdentityResDto.go b/dto/UnlinkIdentityResDto.go
new file mode 100644
index 0000000..289dc7b
--- /dev/null
+++ b/dto/UnlinkIdentityResDto.go
@@ -0,0 +1,11 @@
+package dto
+
+
+type UnlinkIdentityResDto struct{
+ StatusCode int `json:"statusCode"`
+ Message string `json:"message"`
+ ApiCode int `json:"apiCode,omitempty"`
+ RequestId string `json:"requestId,omitempty"`
+ Data UnlinkIdentityDataDto `json:"data"`
+}
+
diff --git a/dto/UpdateAccessKeyDto.go b/dto/UpdateAccessKeyDto.go
index 302ae4f..c1646dd 100644
--- a/dto/UpdateAccessKeyDto.go
+++ b/dto/UpdateAccessKeyDto.go
@@ -1,6 +1,8 @@
package dto
-type UpdateAccessKeyDto struct {
- Enable bool `json:"enable"`
- AccessKeyId string `json:"accessKeyId"`
+
+type UpdateAccessKeyDto struct{
+ Enable bool `json:"enable"`
+ AccessKeyId string `json:"accessKeyId"`
}
+
diff --git a/dto/UpdateApplicationMfaSettingsDto.go b/dto/UpdateApplicationMfaSettingsDto.go
new file mode 100644
index 0000000..4755f8b
--- /dev/null
+++ b/dto/UpdateApplicationMfaSettingsDto.go
@@ -0,0 +1,9 @@
+package dto
+
+
+type UpdateApplicationMfaSettingsDto struct{
+ AppId string `json:"appId"`
+ EnabledFactors []string `json:"enabledFactors,omitempty"`
+ DisabledFactors []string `json:"disabledFactors,omitempty"`
+}
+
diff --git a/dto/UpdateAuthEnabledDto.go b/dto/UpdateAuthEnabledDto.go
new file mode 100644
index 0000000..be06c87
--- /dev/null
+++ b/dto/UpdateAuthEnabledDto.go
@@ -0,0 +1,8 @@
+package dto
+
+
+type UpdateAuthEnabledDto struct{
+ Enabled bool `json:"enabled"`
+ Id string `json:"id"`
+}
+
diff --git a/dto/UpdateDataResourceDto.go b/dto/UpdateDataResourceDto.go
index ad38b6b..3ffba7d 100644
--- a/dto/UpdateDataResourceDto.go
+++ b/dto/UpdateDataResourceDto.go
@@ -1,10 +1,12 @@
package dto
-type UpdateDataResourceDto struct {
- ResourceCode string `json:"resourceCode"`
- NamespaceCode string `json:"namespaceCode"`
- ResourceName string `json:"resourceName,omitempty"`
- Description string `json:"description,omitempty"`
- Struct interface{} `json:"struct,omitempty"`
- Actions []string `json:"actions,omitempty"`
+
+type UpdateDataResourceDto struct{
+ ResourceCode string `json:"resourceCode"`
+ NamespaceCode string `json:"namespaceCode"`
+ ResourceName string `json:"resourceName,omitempty"`
+ Description string `json:"description,omitempty"`
+ Struct interface{} `json:"struct,omitempty"`
+ Actions []string `json:"actions,omitempty"`
}
+
diff --git a/dto/UpdateDataResourceRespDto.go b/dto/UpdateDataResourceRespDto.go
index f1da3ac..9a6e11a 100644
--- a/dto/UpdateDataResourceRespDto.go
+++ b/dto/UpdateDataResourceRespDto.go
@@ -1,10 +1,12 @@
package dto
-type UpdateDataResourceRespDto struct {
- ResourceName string `json:"resourceName"`
- ResourceCode string `json:"resourceCode"`
- Type string `json:"type"`
- Description string `json:"description,omitempty"`
- Struct interface{} `json:"struct"`
- Actions []string `json:"actions"`
+
+type UpdateDataResourceRespDto struct{
+ ResourceName string `json:"resourceName"`
+ ResourceCode string `json:"resourceCode"`
+ Type string `json:"type"`
+ Description string `json:"description,omitempty"`
+ Struct interface{} `json:"struct"`
+ Actions []string `json:"actions"`
}
+
diff --git a/dto/UpdateDepartmentReqDto.go b/dto/UpdateDepartmentReqDto.go
index 5b1bd97..083f1c5 100644
--- a/dto/UpdateDepartmentReqDto.go
+++ b/dto/UpdateDepartmentReqDto.go
@@ -1,15 +1,19 @@
package dto
-type UpdateDepartmentReqDto struct {
- OrganizationCode string `json:"organizationCode"`
- DepartmentId string `json:"departmentId"`
- LeaderUserIds []string `json:"leaderUserIds,omitempty"`
- Description string `json:"description,omitempty"`
- Code string `json:"code,omitempty"`
- I18n DepartmentI18nDto `json:"i18n,omitempty"`
- Name string `json:"name,omitempty"`
- DepartmentIdType string `json:"departmentIdType,omitempty"`
- ParentDepartmentId string `json:"parentDepartmentId,omitempty"`
- CustomData interface{} `json:"customData,omitempty"`
- TenantId string `json:"tenantId,omitempty"`
+
+type UpdateDepartmentReqDto struct{
+ OrganizationCode string `json:"organizationCode"`
+ DepartmentId string `json:"departmentId"`
+ LeaderUserIds []string `json:"leaderUserIds,omitempty"`
+ Description string `json:"description,omitempty"`
+ Code string `json:"code,omitempty"`
+ I18n DepartmentI18nDto `json:"i18n,omitempty"`
+ Status bool `json:"status,omitempty"`
+ Name string `json:"name,omitempty"`
+ DepartmentIdType string `json:"departmentIdType,omitempty"`
+ ParentDepartmentId string `json:"parentDepartmentId,omitempty"`
+ CustomData interface{} `json:"customData,omitempty"`
+ PostIdList []string `json:"postIdList,omitempty"`
+ TenantId string `json:"tenantId,omitempty"`
}
+
diff --git a/dto/UpdateDepartmentStatusReqDto.go b/dto/UpdateDepartmentStatusReqDto.go
new file mode 100644
index 0000000..49380d1
--- /dev/null
+++ b/dto/UpdateDepartmentStatusReqDto.go
@@ -0,0 +1,8 @@
+package dto
+
+
+type UpdateDepartmentStatusReqDto struct{
+ Status bool `json:"status"`
+ DepartmentId string `json:"departmentId"`
+}
+
diff --git a/dto/UpdateExtIdpConnDto.go b/dto/UpdateExtIdpConnDto.go
index 3dda39e..a09e742 100644
--- a/dto/UpdateExtIdpConnDto.go
+++ b/dto/UpdateExtIdpConnDto.go
@@ -1,10 +1,12 @@
package dto
-type UpdateExtIdpConnDto struct {
- Id string `json:"id"`
- DisplayName string `json:"displayName"`
- Fields interface{} `json:"fields"`
- Logo string `json:"logo,omitempty"`
- LoginOnly bool `json:"loginOnly,omitempty"`
- TenantId string `json:"tenantId,omitempty"`
+
+type UpdateExtIdpConnDto struct{
+ Id string `json:"id"`
+ DisplayName string `json:"displayName"`
+ Fields interface{} `json:"fields"`
+ Logo string `json:"logo,omitempty"`
+ LoginOnly bool `json:"loginOnly,omitempty"`
+ TenantId string `json:"tenantId,omitempty"`
}
+
diff --git a/dto/UpdateExtIdpDto.go b/dto/UpdateExtIdpDto.go
index 7b0b51e..672eb5e 100644
--- a/dto/UpdateExtIdpDto.go
+++ b/dto/UpdateExtIdpDto.go
@@ -1,7 +1,9 @@
package dto
-type UpdateExtIdpDto struct {
- Name string `json:"name"`
- Id string `json:"id"`
- TenantId string `json:"tenantId,omitempty"`
+
+type UpdateExtIdpDto struct{
+ Name string `json:"name"`
+ Id string `json:"id"`
+ TenantId string `json:"tenantId,omitempty"`
}
+
diff --git a/dto/UpdateFunctionModelDto.go b/dto/UpdateFunctionModelDto.go
new file mode 100644
index 0000000..f1a02c3
--- /dev/null
+++ b/dto/UpdateFunctionModelDto.go
@@ -0,0 +1,14 @@
+package dto
+
+
+type UpdateFunctionModelDto struct{
+ Config interface{} `json:"config"`
+ FieldOrder string `json:"fieldOrder"`
+ Type string `json:"type"`
+ ParentKey string `json:"parentKey"`
+ Enable bool `json:"enable"`
+ Description string `json:"description"`
+ Name string `json:"name"`
+ Id string `json:"id"`
+}
+
diff --git a/dto/UpdateFunctionModelFieldDto.go b/dto/UpdateFunctionModelFieldDto.go
new file mode 100644
index 0000000..e15078d
--- /dev/null
+++ b/dto/UpdateFunctionModelFieldDto.go
@@ -0,0 +1,26 @@
+package dto
+
+
+type UpdateFunctionModelFieldDto struct{
+ UserVisible bool `json:"userVisible"`
+ RelationOptionalRange RelationOptionalRange `json:"relationOptionalRange"`
+ RelationShowKey string `json:"relationShowKey"`
+ ForLogin bool `json:"forLogin"`
+ FuzzySearch bool `json:"fuzzySearch"`
+ DropDown []string `json:"dropDown"`
+ Format int `json:"format"`
+ Regexp string `json:"regexp"`
+ Min int `json:"min"`
+ Max int `json:"max"`
+ MaxLength int `json:"maxLength"`
+ Unique bool `json:"unique"`
+ Require bool `json:"require"`
+ Default interface{} `json:"default"`
+ Help string `json:"help"`
+ Editable bool `json:"editable"`
+ Show bool `json:"show"`
+ Name string `json:"name"`
+ ModelId string `json:"modelId"`
+ Id string `json:"id"`
+}
+
diff --git a/dto/UpdateGroupReqDto.go b/dto/UpdateGroupReqDto.go
index 72223d3..ed02d69 100644
--- a/dto/UpdateGroupReqDto.go
+++ b/dto/UpdateGroupReqDto.go
@@ -6,5 +6,6 @@ type UpdateGroupReqDto struct{
Code string `json:"code"`
Name string `json:"name,omitempty"`
NewCode string `json:"newCode,omitempty"`
+ CustomData interface{} `json:"customData,omitempty"`
}
diff --git a/dto/UpdateLoginConfig.go b/dto/UpdateLoginConfig.go
index d87f8f9..2d0f8c9 100644
--- a/dto/UpdateLoginConfig.go
+++ b/dto/UpdateLoginConfig.go
@@ -1,8 +1,18 @@
package dto
-type UpdateLoginConfig struct {
- SsoPageCustomizationSettings ISsoPageCustomizationSettingsDto `json:"ssoPageCustomizationSettings"`
- PasswordTabConfig TabConfigDto `json:"passwordTabConfig"`
- VerifyCodeTabConfig TabConfigDto `json:"verifyCodeTabConfig"`
- Config LanguageCoinfigDto `json:"config"`
+
+type UpdateLoginConfig struct{
+ TabMethodsSortConfig ApplicationTabMethodsSortConfigDto `json:"tabMethodsSortConfig"`
+ QrCodeSortConfig ApplicationTabMethodsSortConfigDto `json:"qrCodeSortConfig"`
+ SsoPageCustomizationSettings ISsoPageCustomizationSettingsDto `json:"ssoPageCustomizationSettings"`
+ PasswordTabConfig TabConfigDto `json:"passwordTabConfig"`
+ VerifyCodeTabConfig TabConfigDto `json:"verifyCodeTabConfig"`
+ Config LanguageCoinfigDto `json:"config"`
+ EnableCreateTenant bool `json:"enableCreateTenant"`
+ CreateTenantScenes []string `json:"createTenantScenes"`
+ EnableJoinTenant bool `json:"enableJoinTenant"`
+ JoinTenantScenes []string `json:"joinTenantScenes"`
+ EnableVerifyDomain bool `json:"enableVerifyDomain"`
+ VerifyDomainScenes []string `json:"verifyDomainScenes"`
}
+
diff --git a/dto/UpdateLoginConfigDto.go b/dto/UpdateLoginConfigDto.go
index 48f0641..b50b30c 100644
--- a/dto/UpdateLoginConfigDto.go
+++ b/dto/UpdateLoginConfigDto.go
@@ -1,5 +1,7 @@
package dto
-type UpdateLoginConfigDto struct {
- Update UpdateLoginConfig `json:"update"`
+
+type UpdateLoginConfigDto struct{
+ Update UpdateLoginConfig `json:"update"`
}
+
diff --git a/dto/UpdateMultipleTenantAdminDto.go b/dto/UpdateMultipleTenantAdminDto.go
new file mode 100644
index 0000000..5f72277
--- /dev/null
+++ b/dto/UpdateMultipleTenantAdminDto.go
@@ -0,0 +1,8 @@
+package dto
+
+
+type UpdateMultipleTenantAdminDto struct{
+ TenantIds []string `json:"tenantIds"`
+ ApiAuthorized bool `json:"apiAuthorized,omitempty"`
+}
+
diff --git a/dto/UpdateOperateModelDto.go b/dto/UpdateOperateModelDto.go
new file mode 100644
index 0000000..5cf6d75
--- /dev/null
+++ b/dto/UpdateOperateModelDto.go
@@ -0,0 +1,13 @@
+package dto
+
+
+type UpdateOperateModelDto struct{
+ Icon string `json:"icon"`
+ Config interface{} `json:"config"`
+ OperateName string `json:"operateName"`
+ OperateKey string `json:"operateKey"`
+ Show bool `json:"show"`
+ ModelId string `json:"modelId"`
+ Id string `json:"id"`
+}
+
diff --git a/dto/UpdateOrganizationReqDto.go b/dto/UpdateOrganizationReqDto.go
index e829212..4ff2c7c 100644
--- a/dto/UpdateOrganizationReqDto.go
+++ b/dto/UpdateOrganizationReqDto.go
@@ -1,12 +1,15 @@
package dto
-type UpdateOrganizationReqDto struct {
- OrganizationCode string `json:"organizationCode"`
- Description string `json:"description,omitempty"`
- OpenDepartmentId string `json:"openDepartmentId,omitempty"`
- LeaderUserIds []string `json:"leaderUserIds,omitempty"`
- I18n OrganizationNameI18nDto `json:"i18n,omitempty"`
- TenantId string `json:"tenantId,omitempty"`
- OrganizationNewCode string `json:"organizationNewCode,omitempty"`
- OrganizationName string `json:"organizationName,omitempty"`
+
+type UpdateOrganizationReqDto struct{
+ OrganizationCode string `json:"organizationCode"`
+ Description string `json:"description,omitempty"`
+ OpenDepartmentId string `json:"openDepartmentId,omitempty"`
+ LeaderUserIds []string `json:"leaderUserIds,omitempty"`
+ I18n OrganizationNameI18nDto `json:"i18n,omitempty"`
+ TenantId string `json:"tenantId,omitempty"`
+ OrganizationNewCode string `json:"organizationNewCode,omitempty"`
+ OrganizationName string `json:"organizationName,omitempty"`
+ PostIdList []string `json:"postIdList,omitempty"`
}
+
diff --git a/dto/UpdateOrganizationStatusReqDto.go b/dto/UpdateOrganizationStatusReqDto.go
new file mode 100644
index 0000000..d6cef43
--- /dev/null
+++ b/dto/UpdateOrganizationStatusReqDto.go
@@ -0,0 +1,8 @@
+package dto
+
+
+type UpdateOrganizationStatusReqDto struct{
+ RootNodeId string `json:"rootNodeId"`
+ Status string `json:"status,omitempty"`
+}
+
diff --git a/dto/UpdatePublicAccountBatchOptionsDto.go b/dto/UpdatePublicAccountBatchOptionsDto.go
new file mode 100644
index 0000000..63be36b
--- /dev/null
+++ b/dto/UpdatePublicAccountBatchOptionsDto.go
@@ -0,0 +1,10 @@
+package dto
+
+
+type UpdatePublicAccountBatchOptionsDto struct{
+ ResetPasswordOnNextLogin bool `json:"resetPasswordOnNextLogin,omitempty"`
+ PasswordEncryptType string `json:"passwordEncryptType,omitempty"`
+ AutoGeneratePassword bool `json:"autoGeneratePassword,omitempty"`
+ SendPasswordResetedNotification SendResetPasswordNotificationDto `json:"sendPasswordResetedNotification,omitempty"`
+}
+
diff --git a/dto/UpdatePublicAccountBatchReqDto.go b/dto/UpdatePublicAccountBatchReqDto.go
new file mode 100644
index 0000000..31ac7bb
--- /dev/null
+++ b/dto/UpdatePublicAccountBatchReqDto.go
@@ -0,0 +1,8 @@
+package dto
+
+
+type UpdatePublicAccountBatchReqDto struct{
+ List []UpdatePublicAccountInfoDto `json:"list"`
+ Options UpdatePublicAccountBatchOptionsDto `json:"options,omitempty"`
+}
+
diff --git a/dto/UpdatePublicAccountInfoDto.go b/dto/UpdatePublicAccountInfoDto.go
new file mode 100644
index 0000000..78a6e45
--- /dev/null
+++ b/dto/UpdatePublicAccountInfoDto.go
@@ -0,0 +1,42 @@
+package dto
+
+
+type UpdatePublicAccountInfoDto struct{
+ UserId string `json:"userId"`
+ PhoneCountryCode string `json:"phoneCountryCode,omitempty"`
+ Name string `json:"name,omitempty"`
+ Nickname string `json:"nickname,omitempty"`
+ Photo string `json:"photo,omitempty"`
+ ExternalId string `json:"externalId,omitempty"`
+ Status string `json:"status,omitempty"`
+ EmailVerified bool `json:"emailVerified,omitempty"`
+ PhoneVerified bool `json:"phoneVerified,omitempty"`
+ Birthdate string `json:"birthdate,omitempty"`
+ Country string `json:"country,omitempty"`
+ Province string `json:"province,omitempty"`
+ City string `json:"city,omitempty"`
+ Address string `json:"address,omitempty"`
+ StreetAddress string `json:"streetAddress,omitempty"`
+ PostalCode string `json:"postalCode,omitempty"`
+ Gender string `json:"gender,omitempty"`
+ Username string `json:"username,omitempty"`
+ Email string `json:"email,omitempty"`
+ Phone string `json:"phone,omitempty"`
+ Password string `json:"password,omitempty"`
+ Company string `json:"company,omitempty"`
+ Browser string `json:"browser,omitempty"`
+ Device string `json:"device,omitempty"`
+ GivenName string `json:"givenName,omitempty"`
+ FamilyName string `json:"familyName,omitempty"`
+ MiddleName string `json:"middleName,omitempty"`
+ Profile string `json:"profile,omitempty"`
+ PreferredUsername string `json:"preferredUsername,omitempty"`
+ Website string `json:"website,omitempty"`
+ Zoneinfo string `json:"zoneinfo,omitempty"`
+ Locale string `json:"locale,omitempty"`
+ Formatted string `json:"formatted,omitempty"`
+ Region string `json:"region,omitempty"`
+ IdentityNumber string `json:"identityNumber,omitempty"`
+ CustomData interface{} `json:"customData,omitempty"`
+}
+
diff --git a/dto/UpdatePublicAccountOptionsDto.go b/dto/UpdatePublicAccountOptionsDto.go
new file mode 100644
index 0000000..654d1f3
--- /dev/null
+++ b/dto/UpdatePublicAccountOptionsDto.go
@@ -0,0 +1,12 @@
+package dto
+
+
+type UpdatePublicAccountOptionsDto struct{
+ UserIdType string `json:"userIdType,omitempty"`
+ ResetPasswordOnFirstLogin bool `json:"resetPasswordOnFirstLogin,omitempty"`
+ ResetPasswordOnNextLogin bool `json:"resetPasswordOnNextLogin,omitempty"`
+ PasswordEncryptType string `json:"passwordEncryptType,omitempty"`
+ AutoGeneratePassword bool `json:"autoGeneratePassword,omitempty"`
+ SendPasswordResetedNotification SendResetPasswordNotificationDto `json:"sendPasswordResetedNotification,omitempty"`
+}
+
diff --git a/dto/UpdatePublicAccountReqDto.go b/dto/UpdatePublicAccountReqDto.go
new file mode 100644
index 0000000..e3314fc
--- /dev/null
+++ b/dto/UpdatePublicAccountReqDto.go
@@ -0,0 +1,43 @@
+package dto
+
+
+type UpdatePublicAccountReqDto struct{
+ UserId string `json:"userId"`
+ PhoneCountryCode string `json:"phoneCountryCode,omitempty"`
+ Name string `json:"name,omitempty"`
+ Nickname string `json:"nickname,omitempty"`
+ Photo string `json:"photo,omitempty"`
+ ExternalId string `json:"externalId,omitempty"`
+ Status string `json:"status,omitempty"`
+ EmailVerified bool `json:"emailVerified,omitempty"`
+ PhoneVerified bool `json:"phoneVerified,omitempty"`
+ Birthdate string `json:"birthdate,omitempty"`
+ Country string `json:"country,omitempty"`
+ Province string `json:"province,omitempty"`
+ City string `json:"city,omitempty"`
+ Address string `json:"address,omitempty"`
+ StreetAddress string `json:"streetAddress,omitempty"`
+ PostalCode string `json:"postalCode,omitempty"`
+ Gender string `json:"gender,omitempty"`
+ Username string `json:"username,omitempty"`
+ Email string `json:"email,omitempty"`
+ Phone string `json:"phone,omitempty"`
+ Password string `json:"password,omitempty"`
+ Company string `json:"company,omitempty"`
+ Browser string `json:"browser,omitempty"`
+ Device string `json:"device,omitempty"`
+ GivenName string `json:"givenName,omitempty"`
+ FamilyName string `json:"familyName,omitempty"`
+ MiddleName string `json:"middleName,omitempty"`
+ Profile string `json:"profile,omitempty"`
+ PreferredUsername string `json:"preferredUsername,omitempty"`
+ Website string `json:"website,omitempty"`
+ Zoneinfo string `json:"zoneinfo,omitempty"`
+ Locale string `json:"locale,omitempty"`
+ Formatted string `json:"formatted,omitempty"`
+ Region string `json:"region,omitempty"`
+ IdentityNumber string `json:"identityNumber,omitempty"`
+ CustomData interface{} `json:"customData,omitempty"`
+ Options UpdatePublicAccountOptionsDto `json:"options,omitempty"`
+}
+
diff --git a/dto/UpdateRowDto.go b/dto/UpdateRowDto.go
new file mode 100644
index 0000000..762ac29
--- /dev/null
+++ b/dto/UpdateRowDto.go
@@ -0,0 +1,10 @@
+package dto
+
+
+type UpdateRowDto struct{
+ Data interface{} `json:"data"`
+ RowId string `json:"rowId"`
+ ModelId string `json:"modelId"`
+ ShowFieldId bool `json:"showFieldId,omitempty"`
+}
+
diff --git a/dto/UpdateTenantAppqrcodeState.go b/dto/UpdateTenantAppqrcodeState.go
new file mode 100644
index 0000000..fbc9fbf
--- /dev/null
+++ b/dto/UpdateTenantAppqrcodeState.go
@@ -0,0 +1,7 @@
+package dto
+
+
+type UpdateTenantAppqrcodeState struct{
+ Enabled bool `json:"enabled"`
+}
+
diff --git a/dto/UpdateTenantCooperatorDto.go b/dto/UpdateTenantCooperatorDto.go
new file mode 100644
index 0000000..8eafbc4
--- /dev/null
+++ b/dto/UpdateTenantCooperatorDto.go
@@ -0,0 +1,8 @@
+package dto
+
+
+type UpdateTenantCooperatorDto struct{
+ ApiAuthorized bool `json:"apiAuthorized"`
+ Policies []string `json:"policies"`
+}
+
diff --git a/dto/UpdateTenantDto.go b/dto/UpdateTenantDto.go
index a11001c..ddcd2fd 100644
--- a/dto/UpdateTenantDto.go
+++ b/dto/UpdateTenantDto.go
@@ -2,16 +2,12 @@ package dto
type UpdateTenantDto struct{
- SsoPageCustomizationSettings string `json:"ssoPageCustomizationSettings"`
- ExtendsFields string `json:"extendsFields"`
- RegisterTabs string `json:"registerTabs"`
- LoginTabs string `json:"loginTabs"`
- PasswordTabConfig string `json:"passwordTabConfig"`
- DefaultRegisterTab string `json:"defaultRegisterTab"`
- DefaultLoginTab string `json:"defaultLoginTab"`
- Css string `json:"css"`
- AppIds []string `json:"appIds"`
- Name string `json:"name"`
TenantId string `json:"tenantId"`
+ Name string `json:"name,omitempty"`
+ AppIds []string `json:"appIds,omitempty"`
+ Logo []string `json:"logo,omitempty"`
+ Description string `json:"description,omitempty"`
+ RejectHint string `json:"rejectHint,omitempty"`
+ SourceAppId string `json:"sourceAppId,omitempty"`
}
diff --git a/dto/UpdateTerminalDto.go b/dto/UpdateTerminalDto.go
new file mode 100644
index 0000000..0d2dadb
--- /dev/null
+++ b/dto/UpdateTerminalDto.go
@@ -0,0 +1,7 @@
+package dto
+
+
+type UpdateTerminalDto struct{
+ Id string `json:"id"`
+}
+
diff --git a/dto/UpdateTerminalUserDto.go b/dto/UpdateTerminalUserDto.go
new file mode 100644
index 0000000..cb86fc8
--- /dev/null
+++ b/dto/UpdateTerminalUserDto.go
@@ -0,0 +1,8 @@
+package dto
+
+
+type UpdateTerminalUserDto struct{
+ Id string `json:"id"`
+ UserId string `json:"userId"`
+}
+
diff --git a/dto/UpdateUserInfoDto.go b/dto/UpdateUserInfoDto.go
index 02b8a7b..a9842df 100644
--- a/dto/UpdateUserInfoDto.go
+++ b/dto/UpdateUserInfoDto.go
@@ -36,6 +36,7 @@ type UpdateUserInfoDto struct{
Locale string `json:"locale,omitempty"`
Formatted string `json:"formatted,omitempty"`
Region string `json:"region,omitempty"`
+ IdentityNumber string `json:"identityNumber,omitempty"`
CustomData interface{} `json:"customData,omitempty"`
}
diff --git a/dto/UpdateUserOptionsDto.go b/dto/UpdateUserOptionsDto.go
index 9cf4a55..dc03e51 100644
--- a/dto/UpdateUserOptionsDto.go
+++ b/dto/UpdateUserOptionsDto.go
@@ -3,6 +3,7 @@ package dto
type UpdateUserOptionsDto struct{
UserIdType string `json:"userIdType,omitempty"`
+ ResetPasswordOnFirstLogin bool `json:"resetPasswordOnFirstLogin,omitempty"`
ResetPasswordOnNextLogin bool `json:"resetPasswordOnNextLogin,omitempty"`
PasswordEncryptType string `json:"passwordEncryptType,omitempty"`
AutoGeneratePassword bool `json:"autoGeneratePassword,omitempty"`
diff --git a/dto/UpdateUserPoolTenantLoginConfigDto.go b/dto/UpdateUserPoolTenantLoginConfigDto.go
index bf73eda..f92847a 100644
--- a/dto/UpdateUserPoolTenantLoginConfigDto.go
+++ b/dto/UpdateUserPoolTenantLoginConfigDto.go
@@ -1,5 +1,7 @@
package dto
-type UpdateUserPoolTenantLoginConfigDto struct {
- Update UpdateLoginConfig `json:"update"`
+
+type UpdateUserPoolTenantLoginConfigDto struct{
+ Update UpdateLoginConfig `json:"update"`
}
+
diff --git a/dto/UpdateUserProfileDto.go b/dto/UpdateUserProfileDto.go
index e75508c..a8deee7 100644
--- a/dto/UpdateUserProfileDto.go
+++ b/dto/UpdateUserProfileDto.go
@@ -17,5 +17,6 @@ type UpdateUserProfileDto struct{
Username string `json:"username,omitempty"`
Company string `json:"company,omitempty"`
CustomData interface{} `json:"customData,omitempty"`
+ IdentityNumber string `json:"identityNumber,omitempty"`
}
diff --git a/dto/UpdateUserReqDto.go b/dto/UpdateUserReqDto.go
index ee5521f..1d47689 100644
--- a/dto/UpdateUserReqDto.go
+++ b/dto/UpdateUserReqDto.go
@@ -36,6 +36,7 @@ type UpdateUserReqDto struct{
Locale string `json:"locale,omitempty"`
Formatted string `json:"formatted,omitempty"`
Region string `json:"region,omitempty"`
+ IdentityNumber string `json:"identityNumber,omitempty"`
CustomData interface{} `json:"customData,omitempty"`
Options UpdateUserOptionsDto `json:"options,omitempty"`
}
diff --git a/dto/User.go b/dto/User.go
index 1b08e66..0e2e338 100644
--- a/dto/User.go
+++ b/dto/User.go
@@ -1,4 +1,6 @@
package dto
-type User struct {
+
+type User struct{
}
+
diff --git a/dto/UserAuthResourceListDto.go b/dto/UserAuthResourceListDto.go
index 57e68ed..2e5e22b 100644
--- a/dto/UserAuthResourceListDto.go
+++ b/dto/UserAuthResourceListDto.go
@@ -1,7 +1,9 @@
package dto
-type UserAuthResourceListDto struct {
- UserId string `json:"userId"`
- NamespaceCode string `json:"namespaceCode"`
- ResourceList []OpenResource `json:"resourceList,omitempty"`
+
+type UserAuthResourceListDto struct{
+ UserId string `json:"userId"`
+ NamespaceCode string `json:"namespaceCode"`
+ ResourceList []OpenResource `json:"resourceList,omitempty"`
}
+
diff --git a/dto/UserConnectionPostDto.go b/dto/UserConnectionPostDto.go
new file mode 100644
index 0000000..26eaffa
--- /dev/null
+++ b/dto/UserConnectionPostDto.go
@@ -0,0 +1,8 @@
+package dto
+
+
+type UserConnectionPostDto struct{
+ UserId string `json:"userId"`
+ PostId string `json:"postId"`
+}
+
diff --git a/dto/UserDepartmentRespDto.go b/dto/UserDepartmentRespDto.go
index 1f37e2e..d1dc842 100644
--- a/dto/UserDepartmentRespDto.go
+++ b/dto/UserDepartmentRespDto.go
@@ -4,6 +4,7 @@ package dto
type UserDepartmentRespDto struct{
OrganizationCode string `json:"organizationCode"`
DepartmentId string `json:"departmentId"`
+ IsRoot bool `json:"isRoot"`
CreatedAt string `json:"createdAt"`
Name string `json:"name"`
Description string `json:"description"`
diff --git a/dto/UserDto.go b/dto/UserDto.go
index d964bdc..0181247 100644
--- a/dto/UserDto.go
+++ b/dto/UserDto.go
@@ -1,56 +1,61 @@
package dto
-type UserDto struct {
- UserId string `json:"userId"`
- CreatedAt string `json:"createdAt"`
- UpdatedAt string `json:"updatedAt"`
- Status string `json:"status"`
- WorkStatus string `json:"workStatus"`
- ExternalId string `json:"externalId,omitempty"`
- Email string `json:"email,omitempty"`
- Phone string `json:"phone,omitempty"`
- PhoneCountryCode string `json:"phoneCountryCode,omitempty"`
- Username string `json:"username,omitempty"`
- Name string `json:"name,omitempty"`
- Nickname string `json:"nickname,omitempty"`
- Photo string `json:"photo,omitempty"`
- LoginsCount int `json:"loginsCount,omitempty"`
- LastLogin string `json:"lastLogin,omitempty"`
- LastIp string `json:"lastIp,omitempty"`
- Gender string `json:"gender"`
- EmailVerified bool `json:"emailVerified"`
- PhoneVerified bool `json:"phoneVerified"`
- PasswordLastSetAt string `json:"passwordLastSetAt,omitempty"`
- Birthdate string `json:"birthdate,omitempty"`
- Country string `json:"country,omitempty"`
- Province string `json:"province,omitempty"`
- City string `json:"city,omitempty"`
- Address string `json:"address,omitempty"`
- StreetAddress string `json:"streetAddress,omitempty"`
- PostalCode string `json:"postalCode,omitempty"`
- Company string `json:"company,omitempty"`
- Browser string `json:"browser,omitempty"`
- Device string `json:"device,omitempty"`
- GivenName string `json:"givenName,omitempty"`
- FamilyName string `json:"familyName,omitempty"`
- MiddleName string `json:"middleName,omitempty"`
- Profile string `json:"profile,omitempty"`
- PreferredUsername string `json:"preferredUsername,omitempty"`
- Website string `json:"website,omitempty"`
- Zoneinfo string `json:"zoneinfo,omitempty"`
- Locale string `json:"locale,omitempty"`
- Formatted string `json:"formatted,omitempty"`
- Region string `json:"region,omitempty"`
- UserSourceType string `json:"userSourceType"`
- UserSourceId string `json:"userSourceId,omitempty"`
- LastLoginApp string `json:"lastLoginApp,omitempty"`
- MainDepartmentId string `json:"mainDepartmentId,omitempty"`
- LastMfaTime string `json:"lastMfaTime,omitempty"`
- PasswordSecurityLevel int `json:"passwordSecurityLevel,omitempty"`
- ResetPasswordOnNextLogin bool `json:"resetPasswordOnNextLogin,omitempty"`
- DepartmentIds []string `json:"departmentIds,omitempty"`
- Identities []IdentityDto `json:"identities,omitempty"`
- CustomData interface{} `json:"customData,omitempty"`
- StatusChangedAt string `json:"statusChangedAt,omitempty"`
- TenantId string `json:"tenantId,omitempty"`
+
+type UserDto struct{
+ UserId string `json:"userId"`
+ CreatedAt string `json:"createdAt"`
+ UpdatedAt string `json:"updatedAt"`
+ Status string `json:"status"`
+ WorkStatus string `json:"workStatus"`
+ ExternalId string `json:"externalId,omitempty"`
+ Email string `json:"email,omitempty"`
+ Phone string `json:"phone,omitempty"`
+ PhoneCountryCode string `json:"phoneCountryCode,omitempty"`
+ Username string `json:"username,omitempty"`
+ Name string `json:"name,omitempty"`
+ Nickname string `json:"nickname,omitempty"`
+ Photo string `json:"photo,omitempty"`
+ LoginsCount int `json:"loginsCount,omitempty"`
+ LastLogin string `json:"lastLogin,omitempty"`
+ LastIp string `json:"lastIp,omitempty"`
+ Gender string `json:"gender"`
+ EmailVerified bool `json:"emailVerified"`
+ PhoneVerified bool `json:"phoneVerified"`
+ PasswordLastSetAt string `json:"passwordLastSetAt,omitempty"`
+ Birthdate string `json:"birthdate,omitempty"`
+ Country string `json:"country,omitempty"`
+ Province string `json:"province,omitempty"`
+ City string `json:"city,omitempty"`
+ Address string `json:"address,omitempty"`
+ StreetAddress string `json:"streetAddress,omitempty"`
+ PostalCode string `json:"postalCode,omitempty"`
+ Company string `json:"company,omitempty"`
+ Browser string `json:"browser,omitempty"`
+ Device string `json:"device,omitempty"`
+ GivenName string `json:"givenName,omitempty"`
+ FamilyName string `json:"familyName,omitempty"`
+ MiddleName string `json:"middleName,omitempty"`
+ Profile string `json:"profile,omitempty"`
+ PreferredUsername string `json:"preferredUsername,omitempty"`
+ Website string `json:"website,omitempty"`
+ Zoneinfo string `json:"zoneinfo,omitempty"`
+ Locale string `json:"locale,omitempty"`
+ Formatted string `json:"formatted,omitempty"`
+ Region string `json:"region,omitempty"`
+ UserSourceType string `json:"userSourceType"`
+ UserSourceId string `json:"userSourceId,omitempty"`
+ LastLoginApp string `json:"lastLoginApp,omitempty"`
+ MainDepartmentId string `json:"mainDepartmentId,omitempty"`
+ LastMfaTime string `json:"lastMfaTime,omitempty"`
+ PasswordSecurityLevel int `json:"passwordSecurityLevel,omitempty"`
+ ResetPasswordOnNextLogin bool `json:"resetPasswordOnNextLogin,omitempty"`
+ RegisterSource []string `json:"registerSource,omitempty"`
+ DepartmentIds []string `json:"departmentIds,omitempty"`
+ Identities []IdentityDto `json:"identities,omitempty"`
+ IdentityNumber string `json:"identityNumber,omitempty"`
+ CustomData interface{} `json:"customData,omitempty"`
+ PostIdList []string `json:"postIdList,omitempty"`
+ StatusChangedAt string `json:"statusChangedAt,omitempty"`
+ TenantId string `json:"tenantId,omitempty"`
}
+
diff --git a/dto/UserFieldDecryptReqDto.go b/dto/UserFieldDecryptReqDto.go
new file mode 100644
index 0000000..6e6881b
--- /dev/null
+++ b/dto/UserFieldDecryptReqDto.go
@@ -0,0 +1,8 @@
+package dto
+
+
+type UserFieldDecryptReqDto struct{
+ Data []UserFieldDecryptReqItemDto `json:"data"`
+ PrivateKey string `json:"privateKey"`
+}
+
diff --git a/dto/UserFieldDecryptReqItemDto.go b/dto/UserFieldDecryptReqItemDto.go
new file mode 100644
index 0000000..fe0b4a5
--- /dev/null
+++ b/dto/UserFieldDecryptReqItemDto.go
@@ -0,0 +1,9 @@
+package dto
+
+
+type UserFieldDecryptReqItemDto struct{
+ UserId string `json:"userId,omitempty"`
+ FieldName string `json:"fieldName,omitempty"`
+ EncryptedContent string `json:"encryptedContent"`
+}
+
diff --git a/dto/UserFieldDecryptRespDto.go b/dto/UserFieldDecryptRespDto.go
new file mode 100644
index 0000000..4616985
--- /dev/null
+++ b/dto/UserFieldDecryptRespDto.go
@@ -0,0 +1,11 @@
+package dto
+
+
+type UserFieldDecryptRespDto struct{
+ StatusCode int `json:"statusCode"`
+ Message string `json:"message"`
+ ApiCode int `json:"apiCode,omitempty"`
+ RequestId string `json:"requestId,omitempty"`
+ Data []UserFieldDecryptRespItemDto `json:"data"`
+}
+
diff --git a/dto/UserFieldDecryptRespItemDto.go b/dto/UserFieldDecryptRespItemDto.go
new file mode 100644
index 0000000..7b23d33
--- /dev/null
+++ b/dto/UserFieldDecryptRespItemDto.go
@@ -0,0 +1,9 @@
+package dto
+
+
+type UserFieldDecryptRespItemDto struct{
+ UserId string `json:"userId,omitempty"`
+ FieldName string `json:"fieldName,omitempty"`
+ DecryptedContent string `json:"decryptedContent"`
+}
+
diff --git a/dto/UserInfoDto.go b/dto/UserInfoDto.go
index 1ed16a2..ca45256 100644
--- a/dto/UserInfoDto.go
+++ b/dto/UserInfoDto.go
@@ -1,13 +1,15 @@
package dto
-type UserInfoDto struct {
- Username string `json:"username,omitempty"`
- Email string `json:"email,omitempty"`
- Phone string `json:"phone,omitempty"`
- PhoneCountryCode string `json:"phoneCountryCode,omitempty"`
- Name string `json:"name,omitempty"`
- Gender string `json:"gender,omitempty"`
- Country string `json:"country,omitempty"`
- Province string `json:"province,omitempty"`
- City string `json:"city,omitempty"`
+
+type UserInfoDto struct{
+ Username string `json:"username,omitempty"`
+ Email string `json:"email,omitempty"`
+ Phone string `json:"phone,omitempty"`
+ PhoneCountryCode string `json:"phoneCountryCode,omitempty"`
+ Name string `json:"name,omitempty"`
+ Gender string `json:"gender,omitempty"`
+ Country string `json:"country,omitempty"`
+ Province string `json:"province,omitempty"`
+ City string `json:"city,omitempty"`
}
+
diff --git a/dto/UserListCreateDto.go b/dto/UserListCreateDto.go
new file mode 100644
index 0000000..1340eb3
--- /dev/null
+++ b/dto/UserListCreateDto.go
@@ -0,0 +1,12 @@
+package dto
+
+
+type UserListCreateDto struct{
+ ExpireAt int `json:"expireAt"`
+ LimitList []string `json:"limitList"`
+ RemoveType string `json:"removeType"`
+ AddType string `json:"addType"`
+ UserListType string `json:"userListType"`
+ UserIds []string `json:"userIds"`
+}
+
diff --git a/dto/UserListDto.go b/dto/UserListDto.go
new file mode 100644
index 0000000..60147f9
--- /dev/null
+++ b/dto/UserListDto.go
@@ -0,0 +1,9 @@
+package dto
+
+
+type UserListDto struct{
+ UserListType string `json:"userListType,omitempty"`
+ Page int `json:"page,omitempty"`
+ Limit int `json:"limit,omitempty"`
+}
+
diff --git a/dto/UserListPaginatedRespDto.go b/dto/UserListPaginatedRespDto.go
new file mode 100644
index 0000000..0765e24
--- /dev/null
+++ b/dto/UserListPaginatedRespDto.go
@@ -0,0 +1,11 @@
+package dto
+
+
+type UserListPaginatedRespDto struct{
+ StatusCode int `json:"statusCode"`
+ Message string `json:"message"`
+ ApiCode int `json:"apiCode,omitempty"`
+ RequestId string `json:"requestId,omitempty"`
+ Data UserListPagingDto `json:"data"`
+}
+
diff --git a/dto/UserListPagingDto.go b/dto/UserListPagingDto.go
new file mode 100644
index 0000000..71d73e4
--- /dev/null
+++ b/dto/UserListPagingDto.go
@@ -0,0 +1,8 @@
+package dto
+
+
+type UserListPagingDto struct{
+ TotalCount int `json:"totalCount"`
+ List []RiskListItemDto `json:"list"`
+}
+
diff --git a/dto/UserListPolicyPaginatedRespDto.go b/dto/UserListPolicyPaginatedRespDto.go
new file mode 100644
index 0000000..6af6b34
--- /dev/null
+++ b/dto/UserListPolicyPaginatedRespDto.go
@@ -0,0 +1,11 @@
+package dto
+
+
+type UserListPolicyPaginatedRespDto struct{
+ StatusCode int `json:"statusCode"`
+ Message string `json:"message"`
+ ApiCode int `json:"apiCode,omitempty"`
+ RequestId string `json:"requestId,omitempty"`
+ Data RiskListPolicyPagingDto `json:"data"`
+}
+
diff --git a/dto/UserLoggedInIdentitiesDto.go b/dto/UserLoggedInIdentitiesDto.go
index e9bfd16..a160ed7 100644
--- a/dto/UserLoggedInIdentitiesDto.go
+++ b/dto/UserLoggedInIdentitiesDto.go
@@ -6,5 +6,6 @@ type UserLoggedInIdentitiesDto struct{
IdpName string `json:"idpName"`
IdpNameEn string `json:"idpNameEn"`
IdpLogo string `json:"idpLogo"`
+ IdpId string `json:"idpId"`
}
diff --git a/dto/UserPoolTenantConfigDto.go b/dto/UserPoolTenantConfigDto.go
index cada9c7..dadf991 100644
--- a/dto/UserPoolTenantConfigDto.go
+++ b/dto/UserPoolTenantConfigDto.go
@@ -1,16 +1,24 @@
package dto
-type UserPoolTenantConfigDto struct {
- UserPoolId string `json:"userPoolId"`
- IsUserPoolAsTenant bool `json:"isUserPoolAsTenant"`
- EnableSwitchType string `json:"enableSwitchType"`
- Css string `json:"css"`
- CssEnabled bool `json:"cssEnabled"`
- CustomLoading string `json:"customLoading"`
- EnableGuardVersionSwitch bool `json:"enableGuardVersionSwitch"`
- GuardVersion string `json:"guardVersion"`
- LoadingBackground string `json:"loadingBackground"`
- SsoPageCustomizationSettings ISsoPageCustomizationSettingsDto `json:"ssoPageCustomizationSettings"`
- EnableMultipleTenantPortal bool `json:"enableMultipleTenantPortal"`
- LoginConfig ApplicationLoginConfigDto `json:"loginConfig"`
+
+type UserPoolTenantConfigDto struct{
+ UserPoolId string `json:"userPoolId"`
+ IsUserPoolAsTenant bool `json:"isUserPoolAsTenant"`
+ EnableSwitchType string `json:"enableSwitchType"`
+ Css string `json:"css"`
+ CssEnabled bool `json:"cssEnabled"`
+ CustomLoading string `json:"customLoading"`
+ EnableGuardVersionSwitch bool `json:"enableGuardVersionSwitch"`
+ GuardVersion string `json:"guardVersion"`
+ LoadingBackground string `json:"loadingBackground"`
+ EnableCreateTenant bool `json:"enableCreateTenant"`
+ CreateTenantScenes []string `json:"createTenantScenes"`
+ EnableJoinTenant bool `json:"enableJoinTenant"`
+ JoinTenantScenes []string `json:"joinTenantScenes"`
+ EnableVerifyDomain bool `json:"enableVerifyDomain"`
+ VerifyDomainScenes []string `json:"verifyDomainScenes"`
+ SsoPageCustomizationSettings ISsoPageCustomizationSettingsDto `json:"ssoPageCustomizationSettings"`
+ EnableMultipleTenantPortal bool `json:"enableMultipleTenantPortal"`
+ LoginConfig ApplicationLoginConfigDto `json:"loginConfig"`
}
+
diff --git a/dto/UserPoolTenantConfigDtoRespDto.go b/dto/UserPoolTenantConfigDtoRespDto.go
index 698ffe7..b001f68 100644
--- a/dto/UserPoolTenantConfigDtoRespDto.go
+++ b/dto/UserPoolTenantConfigDtoRespDto.go
@@ -1,8 +1,10 @@
package dto
-type UserPoolTenantConfigDtoRespDto struct {
- StatusCode int `json:"statusCode"`
- Message string `json:"message"`
- ApiCode int `json:"apiCode,omitempty"`
- Data UserPoolTenantConfigDto `json:"data"`
+
+type UserPoolTenantConfigDtoRespDto struct{
+ StatusCode int `json:"statusCode"`
+ Message string `json:"message"`
+ ApiCode int `json:"apiCode,omitempty"`
+ Data UserPoolTenantConfigDto `json:"data"`
}
+
diff --git a/dto/UserSyncRelationDto.go b/dto/UserSyncRelationDto.go
new file mode 100644
index 0000000..af6b3f2
--- /dev/null
+++ b/dto/UserSyncRelationDto.go
@@ -0,0 +1,9 @@
+package dto
+
+
+type UserSyncRelationDto struct{
+ Provider string `json:"provider"`
+ UserIdInIdp string `json:"userIdInIdp"`
+ UserInfoInIdp User `json:"userInfoInIdp"`
+}
+
diff --git a/dto/VerifyAuthenticationDto.go b/dto/VerifyAuthenticationDto.go
new file mode 100644
index 0000000..3c0a19c
--- /dev/null
+++ b/dto/VerifyAuthenticationDto.go
@@ -0,0 +1,9 @@
+package dto
+
+
+type VerifyAuthenticationDto struct{
+ Ticket string `json:"ticket"`
+ AuthenticationCredential AuthenticationCredentialDto `json:"authenticationCredential"`
+ Options SignInByWebAuthnOptionsDto `json:"options,omitempty"`
+}
+
diff --git a/dto/VerifyAuthenticationResultDto.go b/dto/VerifyAuthenticationResultDto.go
new file mode 100644
index 0000000..d091a1c
--- /dev/null
+++ b/dto/VerifyAuthenticationResultDto.go
@@ -0,0 +1,8 @@
+package dto
+
+
+type VerifyAuthenticationResultDto struct{
+ Verified bool `json:"verified"`
+ TokenSet LoginTokenResponseDataDto `json:"tokenSet,omitempty"`
+}
+
diff --git a/dto/VerifyAuthenticationResultRespDto.go b/dto/VerifyAuthenticationResultRespDto.go
new file mode 100644
index 0000000..08f3ade
--- /dev/null
+++ b/dto/VerifyAuthenticationResultRespDto.go
@@ -0,0 +1,11 @@
+package dto
+
+
+type VerifyAuthenticationResultRespDto struct{
+ StatusCode int `json:"statusCode"`
+ Message string `json:"message"`
+ ApiCode int `json:"apiCode,omitempty"`
+ RequestId string `json:"requestId,omitempty"`
+ Data VerifyAuthenticationResultDto `json:"data"`
+}
+
diff --git a/dto/VerifyConfigAppDto.go b/dto/VerifyConfigAppDto.go
new file mode 100644
index 0000000..0b92fc0
--- /dev/null
+++ b/dto/VerifyConfigAppDto.go
@@ -0,0 +1,7 @@
+package dto
+
+
+type VerifyConfigAppDto struct{
+ Keywords string `json:"keywords,omitempty"`
+}
+
diff --git a/dto/VerifyConfigDataDto.go b/dto/VerifyConfigDataDto.go
new file mode 100644
index 0000000..b827fda
--- /dev/null
+++ b/dto/VerifyConfigDataDto.go
@@ -0,0 +1,15 @@
+package dto
+
+
+type VerifyConfigDataDto struct{
+ Id string `json:"id"`
+ AppId string `json:"appId"`
+ IsWinLogin bool `json:"isWinLogin,omitempty"`
+ IsWinChangePwd bool `json:"isWinChangePwd,omitempty"`
+ AppSecret string `json:"appSecret"`
+ PublicKey string `json:"publicKey"`
+ AuthAddress string `json:"authAddress"`
+ Logo string `json:"logo"`
+ Name string `json:"name"`
+}
+
diff --git a/dto/VerifyConfigInfoRespDto.go b/dto/VerifyConfigInfoRespDto.go
new file mode 100644
index 0000000..81d23e3
--- /dev/null
+++ b/dto/VerifyConfigInfoRespDto.go
@@ -0,0 +1,11 @@
+package dto
+
+
+type VerifyConfigInfoRespDto struct{
+ StatusCode int `json:"statusCode"`
+ Message string `json:"message"`
+ ApiCode int `json:"apiCode,omitempty"`
+ RequestId string `json:"requestId,omitempty"`
+ Data VerifyConfigDataDto `json:"data"`
+}
+
diff --git a/dto/VerifyRegistrationDto.go b/dto/VerifyRegistrationDto.go
new file mode 100644
index 0000000..c009f71
--- /dev/null
+++ b/dto/VerifyRegistrationDto.go
@@ -0,0 +1,9 @@
+package dto
+
+
+type VerifyRegistrationDto struct{
+ Ticket string `json:"ticket"`
+ RegistrationCredential RegistrationCredentialDto `json:"registrationCredential"`
+ AuthenticatorCode string `json:"authenticatorCode,omitempty"`
+}
+
diff --git a/dto/VerifyRegistrationResultDto.go b/dto/VerifyRegistrationResultDto.go
new file mode 100644
index 0000000..8e799bb
--- /dev/null
+++ b/dto/VerifyRegistrationResultDto.go
@@ -0,0 +1,7 @@
+package dto
+
+
+type VerifyRegistrationResultDto struct{
+ Verified bool `json:"verified"`
+}
+
diff --git a/dto/VerifyRegistrationResultRespDto.go b/dto/VerifyRegistrationResultRespDto.go
new file mode 100644
index 0000000..2ba6d0c
--- /dev/null
+++ b/dto/VerifyRegistrationResultRespDto.go
@@ -0,0 +1,11 @@
+package dto
+
+
+type VerifyRegistrationResultRespDto struct{
+ StatusCode int `json:"statusCode"`
+ Message string `json:"message"`
+ ApiCode int `json:"apiCode,omitempty"`
+ RequestId string `json:"requestId,omitempty"`
+ Data VerifyRegistrationResultDto `json:"data"`
+}
+
diff --git a/dto/WebAuthnCheckValidCredentialsByCredIdsRespDto.go b/dto/WebAuthnCheckValidCredentialsByCredIdsRespDto.go
new file mode 100644
index 0000000..487b0e5
--- /dev/null
+++ b/dto/WebAuthnCheckValidCredentialsByCredIdsRespDto.go
@@ -0,0 +1,11 @@
+package dto
+
+
+type WebAuthnCheckValidCredentialsByCredIdsRespDto struct{
+ StatusCode int `json:"statusCode"`
+ Message string `json:"message"`
+ ApiCode int `json:"apiCode,omitempty"`
+ RequestId string `json:"requestId,omitempty"`
+ Data []interface{} `json:"data"`
+}
+
diff --git a/dto/WebAuthnRemoveCredentialDto.go b/dto/WebAuthnRemoveCredentialDto.go
new file mode 100644
index 0000000..68fafe4
--- /dev/null
+++ b/dto/WebAuthnRemoveCredentialDto.go
@@ -0,0 +1,6 @@
+package dto
+
+
+type WebAuthnRemoveCredentialDto struct{
+}
+
diff --git a/dto/WechatIdentityResolveRespDataDto.go b/dto/WechatIdentityResolveRespDataDto.go
new file mode 100644
index 0000000..b7ee05d
--- /dev/null
+++ b/dto/WechatIdentityResolveRespDataDto.go
@@ -0,0 +1,9 @@
+package dto
+
+
+type WechatIdentityResolveRespDataDto struct{
+ Methods []string `json:"methods,omitempty"`
+ Accounts []string `json:"accounts,omitempty"`
+ Key string `json:"key"`
+}
+
diff --git a/dto/WechatIdentityResolveRespDto.go b/dto/WechatIdentityResolveRespDto.go
new file mode 100644
index 0000000..0b5ff1f
--- /dev/null
+++ b/dto/WechatIdentityResolveRespDto.go
@@ -0,0 +1,12 @@
+package dto
+
+
+type WechatIdentityResolveRespDto struct{
+ UniqueId string `json:"uniqueId,omitempty"`
+ Code int `json:"code,omitempty"`
+ StatusCode int `json:"statusCode"`
+ ApiCode int `json:"apiCode,omitempty"`
+ Message string `json:"message"`
+ Data WechatIdentityResolveRespDataDto `json:"data"`
+}
+
diff --git a/dto/WechatLoginTokenRespDto.go b/dto/WechatLoginTokenRespDto.go
new file mode 100644
index 0000000..7d80018
--- /dev/null
+++ b/dto/WechatLoginTokenRespDto.go
@@ -0,0 +1,12 @@
+package dto
+
+
+type WechatLoginTokenRespDto struct{
+ AccessToken string `json:"access_token,omitempty"`
+ IdToken string `json:"id_token,omitempty"`
+ RefreshToken string `json:"refresh_token,omitempty"`
+ TokenType string `json:"token_type"`
+ ExpireIn int `json:"expire_in"`
+ Scope string `json:"scope"`
+}
+
diff --git a/dto/WechatMobileAuthByCodeIdentityInput.go b/dto/WechatMobileAuthByCodeIdentityInput.go
new file mode 100644
index 0000000..d2b13d2
--- /dev/null
+++ b/dto/WechatMobileAuthByCodeIdentityInput.go
@@ -0,0 +1,10 @@
+package dto
+
+
+type WechatMobileAuthByCodeIdentityInput struct{
+ Code string `json:"code"`
+ AppId string `json:"appId,omitempty"`
+ ConnId string `json:"connId,omitempty"`
+ Options SignInOptionsDto `json:"options,omitempty"`
+}
+
diff --git a/dto/WechatMobileAuthByCodeInput.go b/dto/WechatMobileAuthByCodeInput.go
new file mode 100644
index 0000000..3e4f91e
--- /dev/null
+++ b/dto/WechatMobileAuthByCodeInput.go
@@ -0,0 +1,9 @@
+package dto
+
+
+type WechatMobileAuthByCodeInput struct{
+ Code string `json:"code"`
+ AppId string `json:"appId,omitempty"`
+ ConnId string `json:"connId,omitempty"`
+}
+
diff --git a/dto/WhitelistListRespDto.go b/dto/WhitelistListRespDto.go
new file mode 100644
index 0000000..f4a3f58
--- /dev/null
+++ b/dto/WhitelistListRespDto.go
@@ -0,0 +1,11 @@
+package dto
+
+
+type WhitelistListRespDto struct{
+ StatusCode int `json:"statusCode"`
+ Message string `json:"message"`
+ ApiCode int `json:"apiCode,omitempty"`
+ RequestId string `json:"requestId,omitempty"`
+ Data WhitelistRespDto `json:"data"`
+}
+
diff --git a/dto/WhitelistRespDto.go b/dto/WhitelistRespDto.go
new file mode 100644
index 0000000..5814fd5
--- /dev/null
+++ b/dto/WhitelistRespDto.go
@@ -0,0 +1,8 @@
+package dto
+
+
+type WhitelistRespDto struct{
+ Value string `json:"value"`
+ CreatedAt string `json:"createdAt"`
+}
+
diff --git a/dto/errorEmailMsg.go b/dto/errorEmailMsg.go
new file mode 100644
index 0000000..3f24bad
--- /dev/null
+++ b/dto/errorEmailMsg.go
@@ -0,0 +1,8 @@
+package dto
+
+
+type errorEmailMsg struct{
+ Email string `json:"email"`
+ Message string `json:"message"`
+}
+
diff --git a/management/management_client.go b/management/management_client.go
index 351ba49..42bb7b7 100644
--- a/management/management_client.go
+++ b/management/management_client.go
@@ -10,187 +10,14 @@ import (
)
/*
- * @summary 获取/搜索用户列表
- * @description
- * 此接口用于获取用户列表,支持模糊搜索,以及通过用户基础字段、用户自定义字段、用户所在部门、用户历史登录应用等维度筛选用户。
- *
- * ### 模糊搜素示例
- *
- * 模糊搜索默认会从 `phone`, `email`, `name`, `username`, `nickname` 五个字段对用户进行模糊搜索,你也可以通过设置 `options.fuzzySearchOn`
- * 决定模糊匹配的字段范围:
- *
- * ```json
- * {
- * "keywords": "北京",
- * "options": {
- * "fuzzySearchOn": [
- * "address"
- * ]
- * }
- * }
- * ```
- *
- * ### 高级搜索示例
- *
- * 你可以通过 `advancedFilter` 进行高级搜索,高级搜索支持通过用户的基础信息、自定义数据、所在部门、用户来源、登录应用、外部身份源信息等维度对用户进行筛选。
- * **且这些筛选条件可以任意组合。**
- *
- * #### 筛选状态为禁用的用户
- *
- * 用户状态(`status`)为字符串类型,可选值为 `Activated` 和 `Suspended`:
- *
- * ```json
- * {
- * "advancedFilter": [
- * {
- * "field": "status",
- * "operator": "EQUAL",
- * "value": "Suspended"
- * }
- * ]
- * }
- * ```
- *
- * #### 筛选邮箱中包含 `@example.com` 的用户
- *
- * 用户邮箱(`email`)为字符串类型,可以进行模糊搜索:
- *
- * ```json
- * {
- * "advancedFilter": [
- * {
- * "field": "email",
- * "operator": "CONTAINS",
- * "value": "@example.com"
- * }
- * ]
- * }
- * ```
- *
- * #### 根据用户的任意扩展字段进行搜索
- *
- * ```json
- * {
- * "advancedFilter": [
- * {
- * "field": "some-custom-key",
- * "operator": "EQUAL",
- * "value": "some-value"
- * }
- * ]
- * }
- * ```
- *
- * #### 根据用户登录次数筛选
- *
- * 筛选登录次数大于 10 的用户:
- *
- * ```json
- * {
- * "advancedFilter": [
- * {
- * "field": "loginsCount",
- * "operator": "GREATER",
- * "value": 10
- * }
- * ]
- * }
- * ```
- *
- * 筛选登录次数在 10 - 100 次的用户:
- *
- * ```json
- * {
- * "advancedFilter": [
- * {
- * "field": "loginsCount",
- * "operator": "BETWEEN",
- * "value": [10, 100]
- * }
- * ]
- * }
- * ```
- *
- * #### 根据用户上次登录时间进行筛选
- *
- * 筛选最近 7 天内登录过的用户:
- *
- * ```json
- * {
- * "advancedFilter": [
- * {
- * "field": "lastLoginTime",
- * "operator": "GREATER",
- * "value": new Date(Date.now() - 7 * 24 * 60 * 60 * 1000)
- * }
- * ]
- * }
- * ```
- *
- * 筛选在某一段时间内登录过的用户:
- *
- * ```json
- * {
- * "advancedFilter": [
- * {
- * "field": "lastLoginTime",
- * "operator": "BETWEEN",
- * "value": [
- * new Date(Date.now() - 14 * 24 * 60 * 60 * 1000),
- * new Date(Date.now() - 7 * 24 * 60 * 60 * 1000)
- * ]
- * }
- * ]
- * }
- * ```
- *
- * #### 根据用户曾经登录过的应用筛选
- *
- * 筛选出曾经登录过应用 `appId1` 或者 `appId2` 的用户:
- *
- * ```json
- * {
- * "advancedFilter": [
- * {
- * "field": "loggedInApps",
- * "operator": "IN",
- * "value": [
- * "appId1",
- * "appId2"
- * ]
- * }
- * ]
- * }
- * ```
- *
- * #### 根据用户所在部门进行筛选
- *
- * ```json
- * {
- * "advancedFilter": [
- * {
- * "field": "department",
- * "operator": "IN",
- * "value": [
- * {
- * "organizationCode": "steamory",
- * "departmentId": "root",
- * "departmentIdType": "department_id",
- * "includeChildrenDepartments": true
- * }
- * ]
- * }
- * ]
- * }
- * ```
- *
- *
- * @param requestBody
- * @returns UserPaginatedRespDto
-*/
-func (client *ManagementClient) ListUsers(reqDto *dto.ListUsersRequestDto) *dto.UserPaginatedRespDto {
- b, err := client.SendHttpRequest("/api/v3/list-users", fasthttp.MethodPost, reqDto)
- var response dto.UserPaginatedRespDto
+* @summary 数据对象高级搜索
+* @description 数据对象高级搜索
+* @param requestBody
+* @returns FunctionModelValueListResDto
+ */
+func (client *ManagementClient) ListRow(reqDto *dto.FilterDto) *dto.FunctionModelValueListResDto {
+ b, err := client.SendHttpRequest("/api/v3/metadata/filter", fasthttp.MethodPost, reqDto)
+ var response dto.FunctionModelValueListResDto
if err != nil {
fmt.Println(err)
return nil
@@ -204,22 +31,16 @@ func (client *ManagementClient) ListUsers(reqDto *dto.ListUsersRequestDto) *dto.
}
/*
- * @deprecated
- * @summary 获取用户列表
- * @description 获取用户列表接口,支持分页,可以选择获取自定义数据、identities 等。
- * @param page 当前页数,从 1 开始
- * @param limit 每页数目,最大不能超过 50,默认为 10
- * @param status 账户当前状态,如 已停用、已离职、正常状态、已归档
- * @param updatedAtStart 用户创建、修改开始时间,为精确到秒的 UNIX 时间戳;支持获取从某一段时间之后的增量数据
- * @param updatedAtEnd 用户创建、修改终止时间,为精确到秒的 UNIX 时间戳;支持获取某一段时间内的增量数据。默认为当前时间
- * @param withCustomData 是否获取自定义数据
- * @param withIdentities 是否获取 identities
- * @param withDepartmentIds 是否获取部门 ID 列表
- * @returns UserPaginatedRespDto
+* @summary 获取数据对象行信息
+* @description 获取数据对象行信息
+* @param modelId 功能 id
+* @param rowId 行 id
+* @param showFieldId 返回结果中是否使用字段 id 作为 key
+* @returns FunctionModelValueResDto
*/
-func (client *ManagementClient) ListUsersLegacy(reqDto *dto.ListUsersDto) *dto.UserPaginatedRespDto {
- b, err := client.SendHttpRequest("/api/v3/list-users", fasthttp.MethodGet, reqDto)
- var response dto.UserPaginatedRespDto
+func (client *ManagementClient) GetRow(reqDto *dto.GetRowDto) *dto.FunctionModelValueResDto {
+ b, err := client.SendHttpRequest("/api/v3/metadata/get-row", fasthttp.MethodGet, reqDto)
+ var response dto.FunctionModelValueResDto
if err != nil {
fmt.Println(err)
return nil
@@ -233,26 +54,17 @@ func (client *ManagementClient) ListUsersLegacy(reqDto *dto.ListUsersDto) *dto.U
}
/*
- * @summary 获取用户信息
- * @description 通过用户 ID,获取用户详情,可以选择获取自定义数据、identities、选择指定用户 ID 类型等。
- * @param userId 用户 ID
- * @param userIdType 用户 ID 类型,默认值为 `user_id`,可选值为:
- * - `user_id`: Authing 用户 ID,如 `6319a1504f3xxxxf214dd5b7`
- * - `phone`: 用户手机号
- * - `email`: 用户邮箱
- * - `username`: 用户名
- * - `external_id`: 用户在外部系统的 ID,对应 Authing 用户信息的 `externalId` 字段
- * - `identity`: 用户的外部身份源信息,格式为 `:`,其中 `` 为 Authing 身份源的 ID,`` 为用户在外部身份源的 ID。
- * 示例值:`62f20932716fbcc10d966ee5:ou_8bae746eac07cd2564654140d2a9ac61`。
- *
- * @param withCustomData 是否获取自定义数据
- * @param withIdentities 是否获取 identities
- * @param withDepartmentIds 是否获取部门 ID 列表
- * @returns UserSingleRespDto
+* @summary 根据属性值获取数据对象行信息
+* @description 根据属性值获取数据对象行信息,只允许通过唯一性字段进行精确查询。
+* @param modelId 功能 id
+* @param key 字段 key
+* @param value 字段值
+* @param showFieldId 返回结果中是否使用字段 id 作为 key
+* @returns FunctionModelValueResDto
*/
-func (client *ManagementClient) GetUser(reqDto *dto.GetUserDto) *dto.UserSingleRespDto {
- b, err := client.SendHttpRequest("/api/v3/get-user", fasthttp.MethodGet, reqDto)
- var response dto.UserSingleRespDto
+func (client *ManagementClient) GetRowByValue(reqDto *dto.GetRowByValueDto) *dto.FunctionModelValueResDto {
+ b, err := client.SendHttpRequest("/api/v3/metadata/get-row-by-value", fasthttp.MethodGet, reqDto)
+ var response dto.FunctionModelValueResDto
if err != nil {
fmt.Println(err)
return nil
@@ -266,26 +78,14 @@ func (client *ManagementClient) GetUser(reqDto *dto.GetUserDto) *dto.UserSingleR
}
/*
- * @summary 批量获取用户信息
- * @description 通过用户 ID 列表,批量获取用户信息,可以选择获取自定义数据、identities、选择指定用户 ID 类型等。
- * @param userIds 用户 ID 数组
- * @param userIdType 用户 ID 类型,默认值为 `user_id`,可选值为:
- * - `user_id`: Authing 用户 ID,如 `6319a1504f3xxxxf214dd5b7`
- * - `phone`: 用户手机号
- * - `email`: 用户邮箱
- * - `username`: 用户名
- * - `external_id`: 用户在外部系统的 ID,对应 Authing 用户信息的 `externalId` 字段
- * - `identity`: 用户的外部身份源信息,格式为 `:`,其中 `` 为 Authing 身份源的 ID,`` 为用户在外部身份源的 ID。
- * 示例值:`62f20932716fbcc10d966ee5:ou_8bae746eac07cd2564654140d2a9ac61`。
- *
- * @param withCustomData 是否获取自定义数据
- * @param withIdentities 是否获取 identities
- * @param withDepartmentIds 是否获取部门 ID 列表
- * @returns UserListRespDto
+* @summary 批量获取行信息
+* @description 批量获取行信息
+* @param requestBody
+* @returns MetadataListResDto
*/
-func (client *ManagementClient) GetUserBatch(reqDto *dto.GetUserBatchDto) *dto.UserListRespDto {
- b, err := client.SendHttpRequest("/api/v3/get-user-batch", fasthttp.MethodGet, reqDto)
- var response dto.UserListRespDto
+func (client *ManagementClient) GetRowBatch(reqDto *dto.GetRowBatchDto) *dto.MetadataListResDto {
+ b, err := client.SendHttpRequest("/get-row-batch", fasthttp.MethodPost, reqDto)
+ var response dto.MetadataListResDto
if err != nil {
fmt.Println(err)
return nil
@@ -299,14 +99,14 @@ func (client *ManagementClient) GetUserBatch(reqDto *dto.GetUserBatchDto) *dto.U
}
/*
- * @summary 创建用户
- * @description 创建用户,邮箱、手机号、用户名必须包含其中一个,邮箱、手机号、用户名、externalId 用户池内唯一,此接口将以管理员身份创建用户因此不需要进行手机号验证码检验等安全检测。
- * @param requestBody
- * @returns UserSingleRespDto
+* @summary 添加行
+* @description 添加行
+* @param requestBody
+* @returns FunctionModelValueResDto
*/
-func (client *ManagementClient) CreateUser(reqDto *dto.CreateUserReqDto) *dto.UserSingleRespDto {
- b, err := client.SendHttpRequest("/api/v3/create-user", fasthttp.MethodPost, reqDto)
- var response dto.UserSingleRespDto
+func (client *ManagementClient) CreateRow(reqDto *dto.CreateRowDto) *dto.FunctionModelValueResDto {
+ b, err := client.SendHttpRequest("/api/v3/metadata/create-row", fasthttp.MethodPost, reqDto)
+ var response dto.FunctionModelValueResDto
if err != nil {
fmt.Println(err)
return nil
@@ -320,14 +120,14 @@ func (client *ManagementClient) CreateUser(reqDto *dto.CreateUserReqDto) *dto.Us
}
/*
- * @summary 批量创建用户
- * @description 批量创建用户,邮箱、手机号、用户名必须包含其中一个,邮箱、手机号、用户名、externalId 用户池内唯一,此接口将以管理员身份创建用户因此不需要进行手机号验证码检验等安全检测。
- * @param requestBody
- * @returns UserListRespDto
+* @summary 更新行
+* @description 更新行
+* @param requestBody
+* @returns FunctionModelValueResDto
*/
-func (client *ManagementClient) CreateUsersBatch(reqDto *dto.CreateUserBatchReqDto) *dto.UserListRespDto {
- b, err := client.SendHttpRequest("/api/v3/create-users-batch", fasthttp.MethodPost, reqDto)
- var response dto.UserListRespDto
+func (client *ManagementClient) UpdateRow(reqDto *dto.UpdateRowDto) *dto.FunctionModelValueResDto {
+ b, err := client.SendHttpRequest("/api/v3/metadata/update-row", fasthttp.MethodPost, reqDto)
+ var response dto.FunctionModelValueResDto
if err != nil {
fmt.Println(err)
return nil
@@ -341,14 +141,14 @@ func (client *ManagementClient) CreateUsersBatch(reqDto *dto.CreateUserBatchReqD
}
/*
- * @summary 修改用户资料
- * @description 通过用户 ID,修改用户资料,邮箱、手机号、用户名、externalId 用户池内唯一,此接口将以管理员身份修改用户资料因此不需要进行手机号验证码检验等安全检测。
- * @param requestBody
- * @returns UserSingleRespDto
+* @summary 删除行
+* @description 删除行
+* @param requestBody
+* @returns CommonResponseDto
*/
-func (client *ManagementClient) UpdateUser(reqDto *dto.UpdateUserReqDto) *dto.UserSingleRespDto {
- b, err := client.SendHttpRequest("/api/v3/update-user", fasthttp.MethodPost, reqDto)
- var response dto.UserSingleRespDto
+func (client *ManagementClient) RemoveRow(reqDto *dto.RemoveRowDto) *dto.CommonResponseDto {
+ b, err := client.SendHttpRequest("/api/v3/metadata/remove-row", fasthttp.MethodPost, reqDto)
+ var response dto.CommonResponseDto
if err != nil {
fmt.Println(err)
return nil
@@ -362,14 +162,14 @@ func (client *ManagementClient) UpdateUser(reqDto *dto.UpdateUserReqDto) *dto.Us
}
/*
- * @summary 批量修改用户资料
- * @description 批量修改用户资料,邮箱、手机号、用户名、externalId 用户池内唯一,此接口将以管理员身份修改用户资料因此不需要进行手机号验证码检验等安全检测。
- * @param requestBody
- * @returns UserListRespDto
+* @summary 创建数据对象
+* @description 利用此接口可以创建一个自定义的数据对象,定义数据对象的基本信息
+* @param requestBody
+* @returns FunctionModelResDto
*/
-func (client *ManagementClient) UpdateUserBatch(reqDto *dto.UpdateUserBatchReqDto) *dto.UserListRespDto {
- b, err := client.SendHttpRequest("/api/v3/update-user-batch", fasthttp.MethodPost, reqDto)
- var response dto.UserListRespDto
+func (client *ManagementClient) CreateModel(reqDto *dto.CreateFunctionModelDto) *dto.FunctionModelResDto {
+ b, err := client.SendHttpRequest("/api/v3/metadata/create-model", fasthttp.MethodPost, reqDto)
+ var response dto.FunctionModelResDto
if err != nil {
fmt.Println(err)
return nil
@@ -383,14 +183,14 @@ func (client *ManagementClient) UpdateUserBatch(reqDto *dto.UpdateUserBatchReqDt
}
/*
- * @summary 删除用户
- * @description 通过用户 ID 列表,删除用户,支持批量删除,可以选择指定用户 ID 类型等。
- * @param requestBody
- * @returns IsSuccessRespDto
+* @summary 获取数据对象详情
+* @description 利用功能 id ,获取数据对象的详细信息
+* @param id 功能 id 可以从控制台页面获取
+* @returns FunctionModelResDto
*/
-func (client *ManagementClient) DeleteUsersBatch(reqDto *dto.DeleteUsersBatchDto) *dto.IsSuccessRespDto {
- b, err := client.SendHttpRequest("/api/v3/delete-users-batch", fasthttp.MethodPost, reqDto)
- var response dto.IsSuccessRespDto
+func (client *ManagementClient) GetModel(reqDto *dto.GetModelDto) *dto.FunctionModelResDto {
+ b, err := client.SendHttpRequest("/api/v3/metadata/get-model", fasthttp.MethodGet, reqDto)
+ var response dto.FunctionModelResDto
if err != nil {
fmt.Println(err)
return nil
@@ -404,23 +204,13 @@ func (client *ManagementClient) DeleteUsersBatch(reqDto *dto.DeleteUsersBatchDto
}
/*
- * @summary 获取用户的外部身份源
- * @description 通过用户 ID,获取用户的外部身份源、选择指定用户 ID 类型。
- * @param userId 用户唯一标志,可以是用户 ID、用户名、邮箱、手机号、外部 ID、在外部身份源的 ID。
- * @param userIdType 用户 ID 类型,默认值为 `user_id`,可选值为:
- * - `user_id`: Authing 用户 ID,如 `6319a1504f3xxxxf214dd5b7`
- * - `phone`: 用户手机号
- * - `email`: 用户邮箱
- * - `username`: 用户名
- * - `external_id`: 用户在外部系统的 ID,对应 Authing 用户信息的 `externalId` 字段
- * - `identity`: 用户的外部身份源信息,格式为 `:`,其中 `` 为 Authing 身份源的 ID,`` 为用户在外部身份源的 ID。
- * 示例值:`62f20932716fbcc10d966ee5:ou_8bae746eac07cd2564654140d2a9ac61`。
- *
- * @returns IdentityListRespDto
+* @summary 获取数据对象列表
+* @description 获取数据对象列表
+* @returns FunctionModelListDto
*/
-func (client *ManagementClient) GetUserIdentities(reqDto *dto.GetUserIdentitiesDto) *dto.IdentityListRespDto {
- b, err := client.SendHttpRequest("/api/v3/get-user-identities", fasthttp.MethodGet, reqDto)
- var response dto.IdentityListRespDto
+func (client *ManagementClient) ListModel() *dto.FunctionModelListDto {
+ b, err := client.SendHttpRequest("/api/v3/metadata/list-model", fasthttp.MethodGet, nil)
+ var response dto.FunctionModelListDto
if err != nil {
fmt.Println(err)
return nil
@@ -434,24 +224,14 @@ func (client *ManagementClient) GetUserIdentities(reqDto *dto.GetUserIdentitiesD
}
/*
- * @summary 获取用户角色列表
- * @description 通过用户 ID,获取用户角色列表,可以选择所属权限分组 code、选择指定用户 ID 类型等。
- * @param userId 用户唯一标志,可以是用户 ID、用户名、邮箱、手机号、外部 ID、在外部身份源的 ID。
- * @param userIdType 用户 ID 类型,默认值为 `user_id`,可选值为:
- * - `user_id`: Authing 用户 ID,如 `6319a1504f3xxxxf214dd5b7`
- * - `phone`: 用户手机号
- * - `email`: 用户邮箱
- * - `username`: 用户名
- * - `external_id`: 用户在外部系统的 ID,对应 Authing 用户信息的 `externalId` 字段
- * - `identity`: 用户的外部身份源信息,格式为 `:`,其中 `` 为 Authing 身份源的 ID,`` 为用户在外部身份源的 ID。
- * 示例值:`62f20932716fbcc10d966ee5:ou_8bae746eac07cd2564654140d2a9ac61`。
- *
- * @param namespace 所属权限分组(权限空间)的 Code
- * @returns RolePaginatedRespDto
+* @summary 删除数据对象
+* @description 根据请求的功能 id ,删除对应的数据对象
+* @param requestBody
+* @returns CommonResponseDto
*/
-func (client *ManagementClient) GetUserRoles(reqDto *dto.GetUserRolesDto) *dto.RolePaginatedRespDto {
- b, err := client.SendHttpRequest("/api/v3/get-user-roles", fasthttp.MethodGet, reqDto)
- var response dto.RolePaginatedRespDto
+func (client *ManagementClient) RemoveModel(reqDto *dto.FunctionModelIdDto) *dto.CommonResponseDto {
+ b, err := client.SendHttpRequest("/api/v3/metadata/remove-model", fasthttp.MethodPost, reqDto)
+ var response dto.CommonResponseDto
if err != nil {
fmt.Println(err)
return nil
@@ -465,23 +245,14 @@ func (client *ManagementClient) GetUserRoles(reqDto *dto.GetUserRolesDto) *dto.R
}
/*
- * @summary 获取用户实名认证信息
- * @description 通过用户 ID,获取用户实名认证信息,可以选择指定用户 ID 类型。
- * @param userId 用户唯一标志,可以是用户 ID、用户名、邮箱、手机号、外部 ID、在外部身份源的 ID。
- * @param userIdType 用户 ID 类型,默认值为 `user_id`,可选值为:
- * - `user_id`: Authing 用户 ID,如 `6319a1504f3xxxxf214dd5b7`
- * - `phone`: 用户手机号
- * - `email`: 用户邮箱
- * - `username`: 用户名
- * - `external_id`: 用户在外部系统的 ID,对应 Authing 用户信息的 `externalId` 字段
- * - `identity`: 用户的外部身份源信息,格式为 `:`,其中 `` 为 Authing 身份源的 ID,`` 为用户在外部身份源的 ID。
- * 示例值:`62f20932716fbcc10d966ee5:ou_8bae746eac07cd2564654140d2a9ac61`。
- *
- * @returns PrincipalAuthenticationInfoPaginatedRespDto
+* @summary 更新数据对象
+* @description 更新对应功能 id 的数据对象信息
+* @param requestBody
+* @returns FunctionModelResDto
*/
-func (client *ManagementClient) GetUserPrincipalAuthenticationInfo(reqDto *dto.GetUserPrincipalAuthenticationInfoDto) *dto.PrincipalAuthenticationInfoPaginatedRespDto {
- b, err := client.SendHttpRequest("/api/v3/get-user-principal-authentication-info", fasthttp.MethodGet, reqDto)
- var response dto.PrincipalAuthenticationInfoPaginatedRespDto
+func (client *ManagementClient) UpdateModel(reqDto *dto.UpdateFunctionModelDto) *dto.FunctionModelResDto {
+ b, err := client.SendHttpRequest("/api/v3/metadata/update-model", fasthttp.MethodPost, reqDto)
+ var response dto.FunctionModelResDto
if err != nil {
fmt.Println(err)
return nil
@@ -495,14 +266,14 @@ func (client *ManagementClient) GetUserPrincipalAuthenticationInfo(reqDto *dto.G
}
/*
- * @summary 删除用户实名认证信息
- * @description 通过用户 ID,删除用户实名认证信息,可以选择指定用户 ID 类型等。
- * @param requestBody
- * @returns IsSuccessRespDto
+* @summary 创建数据对象的字段
+* @description 创建相关数据对象的字段,配置字段信息及基本校验规则
+* @param requestBody
+* @returns FunctionModelFieldResDto
*/
-func (client *ManagementClient) ResetUserPrincipalAuthenticationInfo(reqDto *dto.ResetUserPrincipalAuthenticationInfoDto) *dto.IsSuccessRespDto {
- b, err := client.SendHttpRequest("/api/v3/reset-user-principal-authentication-info", fasthttp.MethodPost, reqDto)
- var response dto.IsSuccessRespDto
+func (client *ManagementClient) CreateField(reqDto *dto.CreateFunctionModelFieldDto) *dto.FunctionModelFieldResDto {
+ b, err := client.SendHttpRequest("/api/v3/metadata/create-field", fasthttp.MethodPost, reqDto)
+ var response dto.FunctionModelFieldResDto
if err != nil {
fmt.Println(err)
return nil
@@ -516,29 +287,14 @@ func (client *ManagementClient) ResetUserPrincipalAuthenticationInfo(reqDto *dto
}
/*
- * @summary 获取用户部门列表
- * @description 通过用户 ID,获取用户部门列表,支持分页,可以选择获取自定义数据、选择指定用户 ID 类型、增序或降序等。
- * @param userId 用户唯一标志,可以是用户 ID、用户名、邮箱、手机号、外部 ID、在外部身份源的 ID。
- * @param userIdType 用户 ID 类型,默认值为 `user_id`,可选值为:
- * - `user_id`: Authing 用户 ID,如 `6319a1504f3xxxxf214dd5b7`
- * - `phone`: 用户手机号
- * - `email`: 用户邮箱
- * - `username`: 用户名
- * - `external_id`: 用户在外部系统的 ID,对应 Authing 用户信息的 `externalId` 字段
- * - `identity`: 用户的外部身份源信息,格式为 `:`,其中 `` 为 Authing 身份源的 ID,`` 为用户在外部身份源的 ID。
- * 示例值:`62f20932716fbcc10d966ee5:ou_8bae746eac07cd2564654140d2a9ac61`。
- *
- * @param page 当前页数,从 1 开始
- * @param limit 每页数目,最大不能超过 50,默认为 10
- * @param withCustomData 是否获取自定义数据
- * @param withDepartmentPaths 是否获取部门路径
- * @param sortBy 排序依据,如 部门创建时间、加入部门时间、部门名称、部门标志符
- * @param orderBy 增序或降序
- * @returns UserDepartmentPaginatedRespDto
+* @summary 更新数据对象的字段
+* @description 更新相关数据对象的字段信息及基本校验规则
+* @param requestBody
+* @returns FunctionModelFieldResDto
*/
-func (client *ManagementClient) GetUserDepartments(reqDto *dto.GetUserDepartmentsDto) *dto.UserDepartmentPaginatedRespDto {
- b, err := client.SendHttpRequest("/api/v3/get-user-departments", fasthttp.MethodGet, reqDto)
- var response dto.UserDepartmentPaginatedRespDto
+func (client *ManagementClient) UpdateField(reqDto *dto.UpdateFunctionModelFieldDto) *dto.FunctionModelFieldResDto {
+ b, err := client.SendHttpRequest("/api/v3/metadata/update-field", fasthttp.MethodPost, reqDto)
+ var response dto.FunctionModelFieldResDto
if err != nil {
fmt.Println(err)
return nil
@@ -552,14 +308,14 @@ func (client *ManagementClient) GetUserDepartments(reqDto *dto.GetUserDepartment
}
/*
- * @summary 设置用户所在部门
- * @description 通过用户 ID,设置用户所在部门,可以选择指定用户 ID 类型等。
- * @param requestBody
- * @returns IsSuccessRespDto
+* @summary 删除数据对象的字段
+* @description 根据功能字段 id 、功能 id 、字段属性名删除对应的字段
+* @param requestBody
+* @returns CommonResponseDto
*/
-func (client *ManagementClient) SetUserDepartments(reqDto *dto.SetUserDepartmentsDto) *dto.IsSuccessRespDto {
- b, err := client.SendHttpRequest("/api/v3/set-user-departments", fasthttp.MethodPost, reqDto)
- var response dto.IsSuccessRespDto
+func (client *ManagementClient) RemoteField(reqDto *dto.FunctionModelFieldIdDto) *dto.CommonResponseDto {
+ b, err := client.SendHttpRequest("/api/v3/metadata/remove-field", fasthttp.MethodPost, reqDto)
+ var response dto.CommonResponseDto
if err != nil {
fmt.Println(err)
return nil
@@ -573,23 +329,14 @@ func (client *ManagementClient) SetUserDepartments(reqDto *dto.SetUserDepartment
}
/*
- * @summary 获取用户分组列表
- * @description 通过用户 ID,获取用户分组列表,可以选择指定用户 ID 类型等。
- * @param userId 用户唯一标志,可以是用户 ID、用户名、邮箱、手机号、外部 ID、在外部身份源的 ID。
- * @param userIdType 用户 ID 类型,默认值为 `user_id`,可选值为:
- * - `user_id`: Authing 用户 ID,如 `6319a1504f3xxxxf214dd5b7`
- * - `phone`: 用户手机号
- * - `email`: 用户邮箱
- * - `username`: 用户名
- * - `external_id`: 用户在外部系统的 ID,对应 Authing 用户信息的 `externalId` 字段
- * - `identity`: 用户的外部身份源信息,格式为 `:`,其中 `` 为 Authing 身份源的 ID,`` 为用户在外部身份源的 ID。
- * 示例值:`62f20932716fbcc10d966ee5:ou_8bae746eac07cd2564654140d2a9ac61`。
- *
- * @returns GroupPaginatedRespDto
+* @summary 获取数据对象字段列表
+* @description 获取数据对象字段列表
+* @param modelId 功能 id
+* @returns FunctionFieldListResDto
*/
-func (client *ManagementClient) GetUserGroups(reqDto *dto.GetUserGroupsDto) *dto.GroupPaginatedRespDto {
- b, err := client.SendHttpRequest("/api/v3/get-user-groups", fasthttp.MethodGet, reqDto)
- var response dto.GroupPaginatedRespDto
+func (client *ManagementClient) ListField(reqDto *dto.ListFieldDto) *dto.FunctionFieldListResDto {
+ b, err := client.SendHttpRequest("/api/v3/metadata/list-field", fasthttp.MethodGet, reqDto)
+ var response dto.FunctionFieldListResDto
if err != nil {
fmt.Println(err)
return nil
@@ -603,23 +350,14 @@ func (client *ManagementClient) GetUserGroups(reqDto *dto.GetUserGroupsDto) *dto
}
/*
- * @summary 获取用户 MFA 绑定信息
- * @description 通过用户 ID,获取用户 MFA 绑定信息,可以选择指定用户 ID 类型等。
- * @param userId 用户唯一标志,可以是用户 ID、用户名、邮箱、手机号、外部 ID、在外部身份源的 ID。
- * @param userIdType 用户 ID 类型,默认值为 `user_id`,可选值为:
- * - `user_id`: Authing 用户 ID,如 `6319a1504f3xxxxf214dd5b7`
- * - `phone`: 用户手机号
- * - `email`: 用户邮箱
- * - `username`: 用户名
- * - `external_id`: 用户在外部系统的 ID,对应 Authing 用户信息的 `externalId` 字段
- * - `identity`: 用户的外部身份源信息,格式为 `:`,其中 `` 为 Authing 身份源的 ID,`` 为用户在外部身份源的 ID。
- * 示例值:`62f20932716fbcc10d966ee5:ou_8bae746eac07cd2564654140d2a9ac61`。
- *
- * @returns UserMfaSingleRespDto
+* @summary 导出全部数据
+* @description 导出全部数据
+* @param requestBody
+* @returns CommonResponseDto
*/
-func (client *ManagementClient) GetUserMfaInfo(reqDto *dto.GetUserMfaInfoDto) *dto.UserMfaSingleRespDto {
- b, err := client.SendHttpRequest("/api/v3/get-user-mfa-info", fasthttp.MethodGet, reqDto)
- var response dto.UserMfaSingleRespDto
+func (client *ManagementClient) Export(reqDto *dto.ExportModelDto) *dto.CommonResponseDto {
+ b, err := client.SendHttpRequest("/api/v3/metadata/export", fasthttp.MethodPost, reqDto)
+ var response dto.CommonResponseDto
if err != nil {
fmt.Println(err)
return nil
@@ -633,16 +371,14 @@ func (client *ManagementClient) GetUserMfaInfo(reqDto *dto.GetUserMfaInfoDto) *d
}
/*
- * @summary 获取已归档的用户列表
- * @description 获取已归档的用户列表,支持分页,可以筛选开始时间等。
- * @param page 当前页数,从 1 开始
- * @param limit 每页数目,最大不能超过 50,默认为 10
- * @param startAt 开始时间,为精确到秒的 UNIX 时间戳,默认不指定
- * @returns ListArchivedUsersSingleRespDto
+* @summary 导入数据
+* @description 导入数据
+* @param requestBody
+* @returns CommonResponseDto
*/
-func (client *ManagementClient) ListArchivedUsers(reqDto *dto.ListArchivedUsersDto) *dto.ListArchivedUsersSingleRespDto {
- b, err := client.SendHttpRequest("/api/v3/list-archived-users", fasthttp.MethodGet, reqDto)
- var response dto.ListArchivedUsersSingleRespDto
+func (client *ManagementClient) Import(reqDto *dto.ImportModelDto) *dto.CommonResponseDto {
+ b, err := client.SendHttpRequest("/api/v3/metadata/import", fasthttp.MethodPost, reqDto)
+ var response dto.CommonResponseDto
if err != nil {
fmt.Println(err)
return nil
@@ -656,14 +392,14 @@ func (client *ManagementClient) ListArchivedUsers(reqDto *dto.ListArchivedUsersD
}
/*
- * @summary 强制下线用户
- * @description 通过用户 ID、App ID 列表,强制让用户下线,可以选择指定用户 ID 类型等。
- * @param requestBody
- * @returns IsSuccessRespDto
+* @summary 获取导入模板
+* @description 获取导入模板
+* @param modelId 功能 id
+* @returns GetImportTemplateResDto
*/
-func (client *ManagementClient) KickUsers(reqDto *dto.KickUsersDto) *dto.IsSuccessRespDto {
- b, err := client.SendHttpRequest("/api/v3/kick-users", fasthttp.MethodPost, reqDto)
- var response dto.IsSuccessRespDto
+func (client *ManagementClient) GetImportTemplate(reqDto *dto.GetImportTemplateDto) *dto.GetImportTemplateResDto {
+ b, err := client.SendHttpRequest("/api/v3/metadata/get-import-template", fasthttp.MethodGet, reqDto)
+ var response dto.GetImportTemplateResDto
if err != nil {
fmt.Println(err)
return nil
@@ -677,14 +413,14 @@ func (client *ManagementClient) KickUsers(reqDto *dto.KickUsersDto) *dto.IsSucce
}
/*
- * @summary 判断用户是否存在
- * @description 根据条件判断用户是否存在,可以筛选用户名、邮箱、手机号、第三方外部 ID 等。
- * @param requestBody
- * @returns IsUserExistsRespDto
+* @summary 创建自定义操作
+* @description 创建自定义操作
+* @param requestBody
+* @returns CommonResponseDto
*/
-func (client *ManagementClient) IsUserExists(reqDto *dto.IsUserExistsReqDto) *dto.IsUserExistsRespDto {
- b, err := client.SendHttpRequest("/api/v3/is-user-exists", fasthttp.MethodPost, reqDto)
- var response dto.IsUserExistsRespDto
+func (client *ManagementClient) CreateOperate(reqDto *dto.CreateOperateModelDto) *dto.CommonResponseDto {
+ b, err := client.SendHttpRequest("/api/v3/metadata/create-operate", fasthttp.MethodPost, reqDto)
+ var response dto.CommonResponseDto
if err != nil {
fmt.Println(err)
return nil
@@ -698,23 +434,14 @@ func (client *ManagementClient) IsUserExists(reqDto *dto.IsUserExistsReqDto) *dt
}
/*
- * @summary 获取用户可访问的应用
- * @description 通过用户 ID,获取用户可访问的应用,可以选择指定用户 ID 类型等。
- * @param userId 用户唯一标志,可以是用户 ID、用户名、邮箱、手机号、外部 ID、在外部身份源的 ID。
- * @param userIdType 用户 ID 类型,默认值为 `user_id`,可选值为:
- * - `user_id`: Authing 用户 ID,如 `6319a1504f3xxxxf214dd5b7`
- * - `phone`: 用户手机号
- * - `email`: 用户邮箱
- * - `username`: 用户名
- * - `external_id`: 用户在外部系统的 ID,对应 Authing 用户信息的 `externalId` 字段
- * - `identity`: 用户的外部身份源信息,格式为 `:`,其中 `` 为 Authing 身份源的 ID,`` 为用户在外部身份源的 ID。
- * 示例值:`62f20932716fbcc10d966ee5:ou_8bae746eac07cd2564654140d2a9ac61`。
- *
- * @returns AppListRespDto
+* @summary 移除自定义操作
+* @description 移除自定义操作
+* @param requestBody
+* @returns CommonResponseDto
*/
-func (client *ManagementClient) GetUserAccessibleApps(reqDto *dto.GetUserAccessibleAppsDto) *dto.AppListRespDto {
- b, err := client.SendHttpRequest("/api/v3/get-user-accessible-apps", fasthttp.MethodGet, reqDto)
- var response dto.AppListRespDto
+func (client *ManagementClient) RemoveOperate(reqDto *dto.FunctionModelOperateIdDto) *dto.CommonResponseDto {
+ b, err := client.SendHttpRequest("/api/v3/metadata/remove-operate", fasthttp.MethodPost, reqDto)
+ var response dto.CommonResponseDto
if err != nil {
fmt.Println(err)
return nil
@@ -728,23 +455,14 @@ func (client *ManagementClient) GetUserAccessibleApps(reqDto *dto.GetUserAccessi
}
/*
- * @summary 获取用户授权的应用
- * @description 通过用户 ID,获取用户授权的应用,可以选择指定用户 ID 类型等。
- * @param userId 用户唯一标志,可以是用户 ID、用户名、邮箱、手机号、外部 ID、在外部身份源的 ID。
- * @param userIdType 用户 ID 类型,默认值为 `user_id`,可选值为:
- * - `user_id`: Authing 用户 ID,如 `6319a1504f3xxxxf214dd5b7`
- * - `phone`: 用户手机号
- * - `email`: 用户邮箱
- * - `username`: 用户名
- * - `external_id`: 用户在外部系统的 ID,对应 Authing 用户信息的 `externalId` 字段
- * - `identity`: 用户的外部身份源信息,格式为 `:`,其中 `` 为 Authing 身份源的 ID,`` 为用户在外部身份源的 ID。
- * 示例值:`62f20932716fbcc10d966ee5:ou_8bae746eac07cd2564654140d2a9ac61`。
- *
- * @returns AppListRespDto
+* @summary 执行自定义操作
+* @description 执行自定义操作
+* @param requestBody
+* @returns CommonResponseDto
*/
-func (client *ManagementClient) GetUserAuthorizedApps(reqDto *dto.GetUserAuthorizedAppsDto) *dto.AppListRespDto {
- b, err := client.SendHttpRequest("/api/v3/get-user-authorized-apps", fasthttp.MethodGet, reqDto)
- var response dto.AppListRespDto
+func (client *ManagementClient) ExecuteOperate(reqDto *dto.FunctionModelOperateIdDto) *dto.CommonResponseDto {
+ b, err := client.SendHttpRequest("/api/v3/metadata/execute-operate", fasthttp.MethodPost, reqDto)
+ var response dto.CommonResponseDto
if err != nil {
fmt.Println(err)
return nil
@@ -758,14 +476,14 @@ func (client *ManagementClient) GetUserAuthorizedApps(reqDto *dto.GetUserAuthori
}
/*
- * @summary 判断用户是否有某个角色
- * @description 通过用户 ID,判断用户是否有某个角色,支持传入多个角色,可以选择指定用户 ID 类型等。
- * @param requestBody
- * @returns HasAnyRoleRespDto
+* @summary 复制自定义操作
+* @description 复制自定义操作
+* @param requestBody
+* @returns CommonResponseDto
*/
-func (client *ManagementClient) HasAnyRole(reqDto *dto.HasAnyRoleReqDto) *dto.HasAnyRoleRespDto {
- b, err := client.SendHttpRequest("/api/v3/has-any-role", fasthttp.MethodPost, reqDto)
- var response dto.HasAnyRoleRespDto
+func (client *ManagementClient) CopyOperate(reqDto *dto.FunctionModelOperateIdDto) *dto.CommonResponseDto {
+ b, err := client.SendHttpRequest("/api/v3/metadata/copy-operate", fasthttp.MethodPost, reqDto)
+ var response dto.CommonResponseDto
if err != nil {
fmt.Println(err)
return nil
@@ -779,29 +497,17 @@ func (client *ManagementClient) HasAnyRole(reqDto *dto.HasAnyRoleReqDto) *dto.Ha
}
/*
- * @summary 获取用户的登录历史记录
- * @description 通过用户 ID,获取用户登录历史记录,支持分页,可以选择指定用户 ID 类型、应用 ID、开始与结束时间戳等。
- * @param userId 用户唯一标志,可以是用户 ID、用户名、邮箱、手机号、外部 ID、在外部身份源的 ID。
- * @param userIdType 用户 ID 类型,默认值为 `user_id`,可选值为:
- * - `user_id`: Authing 用户 ID,如 `6319a1504f3xxxxf214dd5b7`
- * - `phone`: 用户手机号
- * - `email`: 用户邮箱
- * - `username`: 用户名
- * - `external_id`: 用户在外部系统的 ID,对应 Authing 用户信息的 `externalId` 字段
- * - `identity`: 用户的外部身份源信息,格式为 `:`,其中 `` 为 Authing 身份源的 ID,`` 为用户在外部身份源的 ID。
- * 示例值:`62f20932716fbcc10d966ee5:ou_8bae746eac07cd2564654140d2a9ac61`。
- *
- * @param appId 应用 ID
- * @param clientIp 客户端 IP
- * @param start 开始时间戳(毫秒)
- * @param end 结束时间戳(毫秒)
- * @param page 当前页数,从 1 开始
- * @param limit 每页数目,最大不能超过 50,默认为 10
- * @returns UserLoginHistoryPaginatedRespDto
+* @summary 操作管理列表(分页)
+* @description 操作管理列表(分页)
+* @param modelId model Id
+* @param keywords 搜索功能名称
+* @param page 当前页数,从 1 开始
+* @param limit 每页数目,最大不能超过 50,默认为 10
+* @returns OperateModelDto
*/
-func (client *ManagementClient) GetUserLoginHistory(reqDto *dto.GetUserLoginHistoryDto) *dto.UserLoginHistoryPaginatedRespDto {
- b, err := client.SendHttpRequest("/api/v3/get-user-login-history", fasthttp.MethodGet, reqDto)
- var response dto.UserLoginHistoryPaginatedRespDto
+func (client *ManagementClient) ListOperate(reqDto *dto.ListOperateDto) *dto.OperateModelDto {
+ b, err := client.SendHttpRequest("/api/v3/metadata/list-operate", fasthttp.MethodGet, reqDto)
+ var response dto.OperateModelDto
if err != nil {
fmt.Println(err)
return nil
@@ -815,23 +521,14 @@ func (client *ManagementClient) GetUserLoginHistory(reqDto *dto.GetUserLoginHist
}
/*
- * @summary 获取用户曾经登录过的应用
- * @description 通过用户 ID,获取用户曾经登录过的应用,可以选择指定用户 ID 类型等。
- * @param userId 用户唯一标志,可以是用户 ID、用户名、邮箱、手机号、外部 ID、在外部身份源的 ID。
- * @param userIdType 用户 ID 类型,默认值为 `user_id`,可选值为:
- * - `user_id`: Authing 用户 ID,如 `6319a1504f3xxxxf214dd5b7`
- * - `phone`: 用户手机号
- * - `email`: 用户邮箱
- * - `username`: 用户名
- * - `external_id`: 用户在外部系统的 ID,对应 Authing 用户信息的 `externalId` 字段
- * - `identity`: 用户的外部身份源信息,格式为 `:`,其中 `` 为 Authing 身份源的 ID,`` 为用户在外部身份源的 ID。
- * 示例值:`62f20932716fbcc10d966ee5:ou_8bae746eac07cd2564654140d2a9ac61`。
- *
- * @returns UserLoggedInAppsListRespDto
+* @summary 全部操作管理列表
+* @description 全部操作管理列表
+* @param modelId model Id
+* @returns OperateModelDto
*/
-func (client *ManagementClient) GetUserLoggedinApps(reqDto *dto.GetUserLoggedinAppsDto) *dto.UserLoggedInAppsListRespDto {
- b, err := client.SendHttpRequest("/api/v3/get-user-loggedin-apps", fasthttp.MethodGet, reqDto)
- var response dto.UserLoggedInAppsListRespDto
+func (client *ManagementClient) ListOperateAll(reqDto *dto.AllOperateDto) *dto.OperateModelDto {
+ b, err := client.SendHttpRequest("/api/v3/metadata/all-operate", fasthttp.MethodGet, reqDto)
+ var response dto.OperateModelDto
if err != nil {
fmt.Println(err)
return nil
@@ -845,23 +542,14 @@ func (client *ManagementClient) GetUserLoggedinApps(reqDto *dto.GetUserLoggedinA
}
/*
- * @summary 获取用户曾经登录过的身份源
- * @description 通过用户 ID,获取用户曾经登录过的身份源,可以选择指定用户 ID 类型等。
- * @param userId 用户唯一标志,可以是用户 ID、用户名、邮箱、手机号、外部 ID、在外部身份源的 ID。
- * @param userIdType 用户 ID 类型,默认值为 `user_id`,可选值为:
- * - `user_id`: Authing 用户 ID,如 `6319a1504f3xxxxf214dd5b7`
- * - `phone`: 用户手机号
- * - `email`: 用户邮箱
- * - `username`: 用户名
- * - `external_id`: 用户在外部系统的 ID,对应 Authing 用户信息的 `externalId` 字段
- * - `identity`: 用户的外部身份源信息,格式为 `:`,其中 `` 为 Authing 身份源的 ID,`` 为用户在外部身份源的 ID。
- * 示例值:`62f20932716fbcc10d966ee5:ou_8bae746eac07cd2564654140d2a9ac61`。
- *
- * @returns UserLoggedInIdentitiesRespDto
+* @summary 更新操作管理
+* @description 更新操作管理
+* @param requestBody
+* @returns CommonResponseDto
*/
-func (client *ManagementClient) GetUserLoggedinIdentities(reqDto *dto.GetUserLoggedInIdentitiesDto) *dto.UserLoggedInIdentitiesRespDto {
- b, err := client.SendHttpRequest("/api/v3/get-user-logged-in-identities", fasthttp.MethodGet, reqDto)
- var response dto.UserLoggedInIdentitiesRespDto
+func (client *ManagementClient) UpdateOperate(reqDto *dto.UpdateOperateModelDto) *dto.CommonResponseDto {
+ b, err := client.SendHttpRequest("/api/v3/metadata/update-operate", fasthttp.MethodPost, reqDto)
+ var response dto.CommonResponseDto
if err != nil {
fmt.Println(err)
return nil
@@ -875,14 +563,14 @@ func (client *ManagementClient) GetUserLoggedinIdentities(reqDto *dto.GetUserLog
}
/*
- * @summary 用户离职
- * @description 通过用户 ID,对用户进行离职操作
- * @param requestBody
- * @returns ResignUserRespDto
+* @summary 获取关联数据详情
+* @description 获取关联数据详情
+* @param requestBody
+* @returns CommonResponseDto
*/
-func (client *ManagementClient) ResignUser(reqDto *dto.ResignUserReqDto) *dto.ResignUserRespDto {
- b, err := client.SendHttpRequest("/api/v3/resign-user", fasthttp.MethodPost, reqDto)
- var response dto.ResignUserRespDto
+func (client *ManagementClient) GetRelationInfo(reqDto *dto.GetRelationInfoDto) *dto.CommonResponseDto {
+ b, err := client.SendHttpRequest("/api/v3/metadata/get-relation-info", fasthttp.MethodPost, reqDto)
+ var response dto.CommonResponseDto
if err != nil {
fmt.Println(err)
return nil
@@ -896,14 +584,14 @@ func (client *ManagementClient) ResignUser(reqDto *dto.ResignUserReqDto) *dto.Re
}
/*
- * @summary 批量用户离职
- * @description 通过用户 ID,对用户进行离职操作
- * @param requestBody
- * @returns ResignUserRespDto
+* @summary 创建行关联数据
+* @description 创建行关联数据
+* @param requestBody
+* @returns CommonResponseDto
*/
-func (client *ManagementClient) ResignUserBatch(reqDto *dto.ResignUserBatchReqDto) *dto.ResignUserRespDto {
- b, err := client.SendHttpRequest("/api/v3/resign-user-batch", fasthttp.MethodPost, reqDto)
- var response dto.ResignUserRespDto
+func (client *ManagementClient) CreateRowRelation(reqDto *dto.CreateRelationValueDto) *dto.CommonResponseDto {
+ b, err := client.SendHttpRequest("/api/v3/metadata/create-row-relation", fasthttp.MethodPost, reqDto)
+ var response dto.CommonResponseDto
if err != nil {
fmt.Println(err)
return nil
@@ -917,25 +605,18 @@ func (client *ManagementClient) ResignUserBatch(reqDto *dto.ResignUserBatchReqDt
}
/*
- * @summary 获取用户被授权的所有资源
- * @description 通过用户 ID,获取用户被授权的所有资源,可以选择指定用户 ID 类型等,用户被授权的资源是用户自身被授予、通过分组继承、通过角色继承、通过组织机构继承的集合。
- * @param userId 用户唯一标志,可以是用户 ID、用户名、邮箱、手机号、外部 ID、在外部身份源的 ID。
- * @param userIdType 用户 ID 类型,默认值为 `user_id`,可选值为:
- * - `user_id`: Authing 用户 ID,如 `6319a1504f3xxxxf214dd5b7`
- * - `phone`: 用户手机号
- * - `email`: 用户邮箱
- * - `username`: 用户名
- * - `external_id`: 用户在外部系统的 ID,对应 Authing 用户信息的 `externalId` 字段
- * - `identity`: 用户的外部身份源信息,格式为 `:`,其中 `` 为 Authing 身份源的 ID,`` 为用户在外部身份源的 ID。
- * 示例值:`62f20932716fbcc10d966ee5:ou_8bae746eac07cd2564654140d2a9ac61`。
- *
- * @param namespace 所属权限分组(权限空间)的 Code
- * @param resourceType 资源类型,如 数据、API、菜单、按钮
- * @returns AuthorizedResourcePaginatedRespDto
+* @summary 获取行关联数据
+* @description 获取行关联数据
+* @param modelId 功能 id
+* @param fieldId 字段 id
+* @param rowId 行 id
+* @param page 当前页数,从 1 开始
+* @param limit 每页数目,最大不能超过 50,默认为 10
+* @returns RelationValueListResDto
*/
-func (client *ManagementClient) GetUserAuthorizedResources(reqDto *dto.GetUserAuthorizedResourcesDto) *dto.AuthorizedResourcePaginatedRespDto {
- b, err := client.SendHttpRequest("/api/v3/get-user-authorized-resources", fasthttp.MethodGet, reqDto)
- var response dto.AuthorizedResourcePaginatedRespDto
+func (client *ManagementClient) GetRelationValue(reqDto *dto.GetRowRelationDto) *dto.RelationValueListResDto {
+ b, err := client.SendHttpRequest("/api/v3/metadata/get-row-relation", fasthttp.MethodGet, reqDto)
+ var response dto.RelationValueListResDto
if err != nil {
fmt.Println(err)
return nil
@@ -949,14 +630,14 @@ func (client *ManagementClient) GetUserAuthorizedResources(reqDto *dto.GetUserAu
}
/*
- * @summary 检查某个用户在应用下是否具备 Session 登录态
- * @description 检查某个用户在应用下是否具备 Session 登录态
- * @param requestBody
- * @returns CheckSessionStatusRespDto
+* @summary 删除行关联数据
+* @description 删除行关联数据
+* @param requestBody
+* @returns CommonResponseDto
*/
-func (client *ManagementClient) CheckSessionStatus(reqDto *dto.CheckSessionStatusDto) *dto.CheckSessionStatusRespDto {
- b, err := client.SendHttpRequest("/api/v3/check-session-status", fasthttp.MethodPost, reqDto)
- var response dto.CheckSessionStatusRespDto
+func (client *ManagementClient) RemoveRelationValue(reqDto *dto.RemoveRelationValueDto) *dto.CommonResponseDto {
+ b, err := client.SendHttpRequest("/api/v3/metadata/remove-row-relation", fasthttp.MethodPost, reqDto)
+ var response dto.CommonResponseDto
if err != nil {
fmt.Println(err)
return nil
@@ -970,13 +651,13 @@ func (client *ManagementClient) CheckSessionStatus(reqDto *dto.CheckSessionStatu
}
/*
- * @summary 导入用户的 OTP
- * @description 导入用户的 OTP
- * @param requestBody
- * @returns CommonResponseDto
+* @summary 导出数据对象
+* @description 导出数据对象
+* @param requestBody
+* @returns CommonResponseDto
*/
-func (client *ManagementClient) ImportOtp(reqDto *dto.ImportOtpReqDto) *dto.CommonResponseDto {
- b, err := client.SendHttpRequest("/api/v3/import-otp", fasthttp.MethodPost, reqDto)
+func (client *ManagementClient) ExportModel(reqDto *dto.ExportMetadataDto) *dto.CommonResponseDto {
+ b, err := client.SendHttpRequest("/api/v3/metadata/export/model", fasthttp.MethodPost, reqDto)
var response dto.CommonResponseDto
if err != nil {
fmt.Println(err)
@@ -991,23 +672,14 @@ func (client *ManagementClient) ImportOtp(reqDto *dto.ImportOtpReqDto) *dto.Comm
}
/*
- * @summary 获取用户绑定 OTP 的秘钥
- * @description 通过用户 ID,获取用户绑定 OTP 的秘钥。可以选择指定用户 ID 类型等。
- * @param userId 用户 ID
- * @param userIdType 用户 ID 类型,默认值为 `user_id`,可选值为:
- * - `user_id`: Authing 用户 ID,如 `6319a1504f3xxxxf214dd5b7`
- * - `phone`: 用户手机号
- * - `email`: 用户邮箱
- * - `username`: 用户名
- * - `external_id`: 用户在外部系统的 ID,对应 Authing 用户信息的 `externalId` 字段
- * - `identity`: 用户的外部身份源信息,格式为 `:`,其中 `` 为 Authing 身份源的 ID,`` 为用户在外部身份源的 ID。
- * 示例值:`62f20932716fbcc10d966ee5:ou_8bae746eac07cd2564654140d2a9ac61`。
- *
- * @returns GetOtpSecretRespDto
+* @summary 导入数据对象
+* @description 导入数据对象
+* @param requestBody
+* @returns CommonResponseDto
*/
-func (client *ManagementClient) GetOtpSecretByUser(reqDto *dto.GetOtpSecretByUserDto) *dto.GetOtpSecretRespDto {
- b, err := client.SendHttpRequest("/api/v3/get-otp-secret-by-user", fasthttp.MethodGet, reqDto)
- var response dto.GetOtpSecretRespDto
+func (client *ManagementClient) ImportModel(reqDto *dto.ImportMetadataDto) *dto.CommonResponseDto {
+ b, err := client.SendHttpRequest("/api/v3/metadata/import/model", fasthttp.MethodPost, reqDto)
+ var response dto.CommonResponseDto
if err != nil {
fmt.Println(err)
return nil
@@ -1021,16 +693,14 @@ func (client *ManagementClient) GetOtpSecretByUser(reqDto *dto.GetOtpSecretByUse
}
/*
- * @summary 获取组织机构详情
- * @description 获取组织机构详情
- * @param organizationCode 组织 Code(organizationCode)
- * @param withCustomData 是否获取自定义数据
- * @param tenantId 租户 ID
- * @returns OrganizationSingleRespDto
+* @summary UEBA 上传
+* @description UEBA 上传
+* @param requestBody
+* @returns CreateUEBARespDto
*/
-func (client *ManagementClient) GetOrganization(reqDto *dto.GetOrganizationDto) *dto.OrganizationSingleRespDto {
- b, err := client.SendHttpRequest("/api/v3/get-organization", fasthttp.MethodGet, reqDto)
- var response dto.OrganizationSingleRespDto
+func (client *ManagementClient) Capture(reqDto *dto.CreateUEBADto) *dto.CreateUEBARespDto {
+ b, err := client.SendHttpRequest("/api/v3/metadata/ueba/capture", fasthttp.MethodPost, reqDto)
+ var response dto.CreateUEBARespDto
if err != nil {
fmt.Println(err)
return nil
@@ -1044,16 +714,20 @@ func (client *ManagementClient) GetOrganization(reqDto *dto.GetOrganizationDto)
}
/*
- * @summary 批量获取组织机构详情
- * @description 批量获取组织机构详情
- * @param organizationCodeList 组织 Code(organizationCode)列表
- * @param withCustomData 是否获取自定义数据
- * @param tenantId 租户 ID
- * @returns OrganizationListRespDto
+* @summary 岗位列表
+* @description 岗位列表
+* @param keywords 搜索岗位 code 或名称
+* @param skipCount 是否统计岗位关联的部门数和用户数
+* @param page 当前页数,从 1 开始
+* @param limit 每页数目,最大不能超过 50,默认为 10
+* @param withMetadata 是否展示元数据内容
+* @param withCustomData 是否获取自定义数据
+* @param flatCustomData 是否拍平扩展字段
+* @returns PostPaginatedRespDto
*/
-func (client *ManagementClient) GetOrganizationsBatch(reqDto *dto.GetOrganizationBatchDto) *dto.OrganizationListRespDto {
- b, err := client.SendHttpRequest("/api/v3/get-organization-batch", fasthttp.MethodGet, reqDto)
- var response dto.OrganizationListRespDto
+func (client *ManagementClient) PostList(reqDto *dto.ListPostDto) *dto.PostPaginatedRespDto {
+ b, err := client.SendHttpRequest("/api/v3/list-post", fasthttp.MethodGet, reqDto)
+ var response dto.PostPaginatedRespDto
if err != nil {
fmt.Println(err)
return nil
@@ -1067,18 +741,15 @@ func (client *ManagementClient) GetOrganizationsBatch(reqDto *dto.GetOrganizatio
}
/*
- * @summary 获取组织机构列表
- * @description 获取组织机构列表,支持分页。
- * @param page 当前页数,从 1 开始
- * @param limit 每页数目,最大不能超过 50,默认为 10
- * @param fetchAll 拉取所有
- * @param withCustomData 是否获取自定义数据
- * @param tenantId 租户 ID
- * @returns OrganizationPaginatedRespDto
+* @summary 获取岗位
+* @description 获取岗位
+* @param code 岗位 code
+* @param withCustomData 是否获取自定义数据
+* @returns CreatePostDto
*/
-func (client *ManagementClient) ListOrganizations(reqDto *dto.ListOrganizationsDto) *dto.OrganizationPaginatedRespDto {
- b, err := client.SendHttpRequest("/api/v3/list-organizations", fasthttp.MethodGet, reqDto)
- var response dto.OrganizationPaginatedRespDto
+func (client *ManagementClient) GetPost(reqDto *dto.GetPostDto) *dto.CreatePostDto {
+ b, err := client.SendHttpRequest("/api/v3/get-post", fasthttp.MethodGet, reqDto)
+ var response dto.CreatePostDto
if err != nil {
fmt.Println(err)
return nil
@@ -1092,14 +763,16 @@ func (client *ManagementClient) ListOrganizations(reqDto *dto.ListOrganizationsD
}
/*
- * @summary 创建组织机构
- * @description 创建组织机构,会创建一个只有一个节点的组织机构,可以选择组织描述信息、根节点自定义 ID、多语言等。
- * @param requestBody
- * @returns OrganizationSingleRespDto
+* @deprecated
+* @summary 获取用户关联岗位
+* @description 获取用户关联的所有岗位
+* @param userId 用户 id
+* @param withCustomData 是否获取自定义数据
+* @returns PostListRespDto
*/
-func (client *ManagementClient) CreateOrganization(reqDto *dto.CreateOrganizationReqDto) *dto.OrganizationSingleRespDto {
- b, err := client.SendHttpRequest("/api/v3/create-organization", fasthttp.MethodPost, reqDto)
- var response dto.OrganizationSingleRespDto
+func (client *ManagementClient) GetUserPosts(reqDto *dto.GetUserPostsDto) *dto.PostListRespDto {
+ b, err := client.SendHttpRequest("/api/v3/get-user-posts", fasthttp.MethodGet, reqDto)
+ var response dto.PostListRespDto
if err != nil {
fmt.Println(err)
return nil
@@ -1113,14 +786,16 @@ func (client *ManagementClient) CreateOrganization(reqDto *dto.CreateOrganizatio
}
/*
- * @summary 修改组织机构
- * @description 通过组织 code,修改组织机构,可以选择部门描述、新组织 code、组织名称等。
- * @param requestBody
- * @returns OrganizationSingleRespDto
+* @deprecated
+* @summary 获取用户关联岗位
+* @description 此接口只会返回一个岗位,已废弃,请使用 /api/v3/get-user-posts 接口
+* @param userId 用户 id
+* @param withCustomData 是否获取自定义数据
+* @returns CreatePostDto
*/
-func (client *ManagementClient) UpdateOrganization(reqDto *dto.UpdateOrganizationReqDto) *dto.OrganizationSingleRespDto {
- b, err := client.SendHttpRequest("/api/v3/update-organization", fasthttp.MethodPost, reqDto)
- var response dto.OrganizationSingleRespDto
+func (client *ManagementClient) GetUserPost(reqDto *dto.GetUserPostDto) *dto.CreatePostDto {
+ b, err := client.SendHttpRequest("/api/v3/get-user-post", fasthttp.MethodGet, reqDto)
+ var response dto.CreatePostDto
if err != nil {
fmt.Println(err)
return nil
@@ -1134,14 +809,14 @@ func (client *ManagementClient) UpdateOrganization(reqDto *dto.UpdateOrganizatio
}
/*
- * @summary 删除组织机构
- * @description 通过组织 code,删除组织机构树。
- * @param requestBody
- * @returns IsSuccessRespDto
+* @summary 获取岗位信息
+* @description 根据岗位 id 获取岗位详情
+* @param requestBody
+* @returns PostRespDto
*/
-func (client *ManagementClient) DeleteOrganization(reqDto *dto.DeleteOrganizationReqDto) *dto.IsSuccessRespDto {
- b, err := client.SendHttpRequest("/api/v3/delete-organization", fasthttp.MethodPost, reqDto)
- var response dto.IsSuccessRespDto
+func (client *ManagementClient) GetPostById(reqDto *dto.GetPostByIdListDto) *dto.PostRespDto {
+ b, err := client.SendHttpRequest("/api/v3/get-post-by-id", fasthttp.MethodPost, reqDto)
+ var response dto.PostRespDto
if err != nil {
fmt.Println(err)
return nil
@@ -1155,18 +830,14 @@ func (client *ManagementClient) DeleteOrganization(reqDto *dto.DeleteOrganizatio
}
/*
- * @summary 搜索组织机构列表
- * @description 通过搜索关键词,搜索组织机构列表,支持分页。
- * @param keywords 搜索关键词,如组织机构名称
- * @param page 当前页数,从 1 开始
- * @param limit 每页数目,最大不能超过 50,默认为 10
- * @param withCustomData 是否获取自定义数据
- * @param tenantId 租户 ID
- * @returns OrganizationPaginatedRespDto
+* @summary 创建岗位
+* @description 创建岗位
+* @param requestBody
+* @returns CreatePostRespDto
*/
-func (client *ManagementClient) SearchOrganizations(reqDto *dto.SearchOrganizationsDto) *dto.OrganizationPaginatedRespDto {
- b, err := client.SendHttpRequest("/api/v3/search-organizations", fasthttp.MethodGet, reqDto)
- var response dto.OrganizationPaginatedRespDto
+func (client *ManagementClient) CreatePost(reqDto *dto.CreatePostDto) *dto.CreatePostRespDto {
+ b, err := client.SendHttpRequest("/api/v3/create-post", fasthttp.MethodPost, reqDto)
+ var response dto.CreatePostRespDto
if err != nil {
fmt.Println(err)
return nil
@@ -1180,19 +851,14 @@ func (client *ManagementClient) SearchOrganizations(reqDto *dto.SearchOrganizati
}
/*
- * @summary 获取部门信息
- * @description 通过组织 code 以及 部门 ID 或 部门 code,获取部门信息,可以获取自定义数据。
- * @param organizationCode 组织 code
- * @param departmentId 部门 ID,根部门传 `root`。departmentId 和 departmentCode 必传其一。
- * @param departmentCode 部门 code。departmentId 和 departmentCode 必传其一。
- * @param departmentIdType 此次调用中使用的部门 ID 的类型
- * @param withCustomData 是否获取自定义数据
- * @param tenantId 租户 ID
- * @returns DepartmentSingleRespDto
+* @summary 更新岗位信息
+* @description 更新岗位信息
+* @param requestBody
+* @returns CreatePostRespDto
*/
-func (client *ManagementClient) GetDepartment(reqDto *dto.GetDepartmentDto) *dto.DepartmentSingleRespDto {
- b, err := client.SendHttpRequest("/api/v3/get-department", fasthttp.MethodGet, reqDto)
- var response dto.DepartmentSingleRespDto
+func (client *ManagementClient) UpdatePost(reqDto *dto.CreatePostDto) *dto.CreatePostRespDto {
+ b, err := client.SendHttpRequest("/api/v3/update-post", fasthttp.MethodPost, reqDto)
+ var response dto.CreatePostRespDto
if err != nil {
fmt.Println(err)
return nil
@@ -1206,14 +872,14 @@ func (client *ManagementClient) GetDepartment(reqDto *dto.GetDepartmentDto) *dto
}
/*
- * @summary 创建部门
- * @description 通过组织 code、部门名称、父部门 ID,创建部门,可以设置多种参数。
- * @param requestBody
- * @returns DepartmentSingleRespDto
+* @summary 删除岗位
+* @description 删除岗位
+* @param requestBody
+* @returns CommonResponseDto
*/
-func (client *ManagementClient) CreateDepartment(reqDto *dto.CreateDepartmentReqDto) *dto.DepartmentSingleRespDto {
- b, err := client.SendHttpRequest("/api/v3/create-department", fasthttp.MethodPost, reqDto)
- var response dto.DepartmentSingleRespDto
+func (client *ManagementClient) RemovePost(reqDto *dto.RemovePostDto) *dto.CommonResponseDto {
+ b, err := client.SendHttpRequest("/api/v3/remove-post", fasthttp.MethodPost, reqDto)
+ var response dto.CommonResponseDto
if err != nil {
fmt.Println(err)
return nil
@@ -1227,14 +893,14 @@ func (client *ManagementClient) CreateDepartment(reqDto *dto.CreateDepartmentReq
}
/*
- * @summary 修改部门
- * @description 通过组织 code、部门 ID,修改部门,可以设置多种参数。
- * @param requestBody
- * @returns DepartmentSingleRespDto
+* @summary 用户设置岗位
+* @description 一次性给用户设置岗位:如果之前的岗位不在传入的列表中,会进行移除;如果有新增的岗位,会加入到新的岗位;如果不变,则不进行任何操作。
+* @param requestBody
+* @returns CommonResponseDto
*/
-func (client *ManagementClient) UpdateDepartment(reqDto *dto.UpdateDepartmentReqDto) *dto.DepartmentSingleRespDto {
- b, err := client.SendHttpRequest("/api/v3/update-department", fasthttp.MethodPost, reqDto)
- var response dto.DepartmentSingleRespDto
+func (client *ManagementClient) SetUserPosts(reqDto *dto.SetUserPostsDto) *dto.CommonResponseDto {
+ b, err := client.SendHttpRequest("/api/v3/set-user-posts", fasthttp.MethodPost, reqDto)
+ var response dto.CommonResponseDto
if err != nil {
fmt.Println(err)
return nil
@@ -1248,14 +914,14 @@ func (client *ManagementClient) UpdateDepartment(reqDto *dto.UpdateDepartmentReq
}
/*
- * @summary 删除部门
- * @description 通过组织 code、部门 ID,删除部门。
- * @param requestBody
- * @returns IsSuccessRespDto
+* @summary 用户关联岗位
+* @description 用户关联岗位
+* @param requestBody
+* @returns CommonResponseDto
*/
-func (client *ManagementClient) DeleteDepartment(reqDto *dto.DeleteDepartmentReqDto) *dto.IsSuccessRespDto {
- b, err := client.SendHttpRequest("/api/v3/delete-department", fasthttp.MethodPost, reqDto)
- var response dto.IsSuccessRespDto
+func (client *ManagementClient) UserConnectionPost(reqDto *dto.UserConnectionPostDto) *dto.CommonResponseDto {
+ b, err := client.SendHttpRequest("/api/v3/user-connection-post", fasthttp.MethodPost, reqDto)
+ var response dto.CommonResponseDto
if err != nil {
fmt.Println(err)
return nil
@@ -1269,15 +935,14 @@ func (client *ManagementClient) DeleteDepartment(reqDto *dto.DeleteDepartmentReq
}
/*
- * @deprecated
- * @summary 搜索部门
- * @description 通过组织 code、搜索关键词,搜索部门,可以搜索组织名称等。
- * @param requestBody
- * @returns DepartmentListRespDto
+* @summary 移除绑定(用户详情页)
+* @description 移除绑定(用户详情页)。
+* @param requestBody
+* @returns CommonResponseDto
*/
-func (client *ManagementClient) SearchDepartments(reqDto *dto.SearchDepartmentsReqDto) *dto.DepartmentListRespDto {
- b, err := client.SendHttpRequest("/api/v3/search-departments", fasthttp.MethodPost, reqDto)
- var response dto.DepartmentListRespDto
+func (client *ManagementClient) DeleteDevice(reqDto *dto.DeleteTerminalUserDto) *dto.CommonResponseDto {
+ b, err := client.SendHttpRequest("/api/v3/delete-device-by-user", fasthttp.MethodPost, reqDto)
+ var response dto.CommonResponseDto
if err != nil {
fmt.Println(err)
return nil
@@ -1291,14 +956,14 @@ func (client *ManagementClient) SearchDepartments(reqDto *dto.SearchDepartmentsR
}
/*
- * @summary 搜索部门
- * @description 通过组织 code、搜索关键词,搜索部门,可以搜索组织名称等。
- * @param requestBody
- * @returns DepartmentListRespDto
+* @summary 挂起设备(用户详情页)
+* @description 挂起设备(用户详情页)。
+* @param requestBody
+* @returns CommonResponseDto
*/
-func (client *ManagementClient) SearchDepartmentsList(reqDto *dto.SearchDepartmentsListReqDto) *dto.DepartmentListRespDto {
- b, err := client.SendHttpRequest("/api/v3/search-departments-list", fasthttp.MethodPost, reqDto)
- var response dto.DepartmentListRespDto
+func (client *ManagementClient) SuspendDevice(reqDto *dto.SuspendTerminalUserDto) *dto.CommonResponseDto {
+ b, err := client.SendHttpRequest("/api/v3/suspend-device-by-user", fasthttp.MethodPost, reqDto)
+ var response dto.CommonResponseDto
if err != nil {
fmt.Println(err)
return nil
@@ -1312,20 +977,14 @@ func (client *ManagementClient) SearchDepartmentsList(reqDto *dto.SearchDepartme
}
/*
- * @summary 获取子部门列表
- * @description 通过组织 code、部门 ID,获取子部门列表,可以选择获取自定义数据、虚拟组织等。
- * @param organizationCode 组织 code
- * @param departmentId 需要获取的部门 ID
- * @param departmentIdType 此次调用中使用的部门 ID 的类型
- * @param excludeVirtualNode 是否要排除虚拟组织
- * @param onlyVirtualNode 是否只包含虚拟组织
- * @param withCustomData 是否获取自定义数据
- * @param tenantId 租户 ID
- * @returns DepartmentPaginatedRespDto
+* @summary 停用设备(用户详情页)
+* @description 停用设备(用户详情页)。
+* @param requestBody
+* @returns CommonResponseDto
*/
-func (client *ManagementClient) ListChildrenDepartments(reqDto *dto.ListChildrenDepartmentsDto) *dto.DepartmentPaginatedRespDto {
- b, err := client.SendHttpRequest("/api/v3/list-children-departments", fasthttp.MethodGet, reqDto)
- var response dto.DepartmentPaginatedRespDto
+func (client *ManagementClient) DisableDevice(reqDto *dto.UpdateTerminalUserDto) *dto.CommonResponseDto {
+ b, err := client.SendHttpRequest("/api/v3/disable-device-by-user", fasthttp.MethodPost, reqDto)
+ var response dto.CommonResponseDto
if err != nil {
fmt.Println(err)
return nil
@@ -1339,25 +998,14 @@ func (client *ManagementClient) ListChildrenDepartments(reqDto *dto.ListChildren
}
/*
- * @summary 获取部门成员列表
- * @description 通过组织 code、部门 ID、排序,获取部门成员列表,支持分页,可以选择获取自定义数据、identities 等。
- * @param organizationCode 组织 code
- * @param departmentId 部门 ID,根部门传 `root`
- * @param sortBy 排序依据
- * @param orderBy 增序还是倒序
- * @param departmentIdType 此次调用中使用的部门 ID 的类型
- * @param includeChildrenDepartments 是否包含子部门的成员
- * @param page 当前页数,从 1 开始
- * @param limit 每页数目,最大不能超过 50,默认为 10
- * @param withCustomData 是否获取自定义数据
- * @param withIdentities 是否获取 identities
- * @param withDepartmentIds 是否获取部门 ID 列表
- * @param tenantId 租户 ID
- * @returns UserPaginatedRespDto
+* @summary 启用设备(用户详情页)
+* @description 启用设备(用户详情页)。
+* @param requestBody
+* @returns CommonResponseDto
*/
-func (client *ManagementClient) ListDepartmentMembers(reqDto *dto.ListDepartmentMembersDto) *dto.UserPaginatedRespDto {
- b, err := client.SendHttpRequest("/api/v3/list-department-members", fasthttp.MethodGet, reqDto)
- var response dto.UserPaginatedRespDto
+func (client *ManagementClient) EnableDevice(reqDto *dto.UpdateTerminalUserDto) *dto.CommonResponseDto {
+ b, err := client.SendHttpRequest("/api/v3/enable-device-by-user", fasthttp.MethodPost, reqDto)
+ var response dto.CommonResponseDto
if err != nil {
fmt.Println(err)
return nil
@@ -1371,17 +1019,14 @@ func (client *ManagementClient) ListDepartmentMembers(reqDto *dto.ListDepartment
}
/*
- * @summary 获取部门直属成员 ID 列表
- * @description 通过组织 code、部门 ID,获取部门直属成员 ID 列表。
- * @param organizationCode 组织 code
- * @param departmentId 部门 ID,根部门传 `root`
- * @param departmentIdType 此次调用中使用的部门 ID 的类型
- * @param tenantId 租户 ID
- * @returns UserIdListRespDto
+* @summary 获取设备状态
+* @description 获取设备状态。
+* @param requestBody
+* @returns DeviceStatusRespDto
*/
-func (client *ManagementClient) ListDepartmentMemberIds(reqDto *dto.ListDepartmentMemberIdsDto) *dto.UserIdListRespDto {
- b, err := client.SendHttpRequest("/api/v3/list-department-member-ids", fasthttp.MethodGet, reqDto)
- var response dto.UserIdListRespDto
+func (client *ManagementClient) GetDeviceStatus(reqDto *dto.TerminalBaseDto) *dto.DeviceStatusRespDto {
+ b, err := client.SendHttpRequest("/api/v3/device-status", fasthttp.MethodPost, reqDto)
+ var response dto.DeviceStatusRespDto
if err != nil {
fmt.Println(err)
return nil
@@ -1395,24 +1040,187 @@ func (client *ManagementClient) ListDepartmentMemberIds(reqDto *dto.ListDepartme
}
/*
- * @summary 搜索部门下的成员
- * @description 通过组织 code、部门 ID、搜索关键词,搜索部门下的成员,支持分页,可以选择获取自定义数据、identities 等。
- * @param organizationCode 组织 code
- * @param departmentId 部门 ID,根部门传 `root`
- * @param keywords 搜索关键词,如成员名称
- * @param page 当前页数,从 1 开始
- * @param limit 每页数目,最大不能超过 50,默认为 10
- * @param departmentIdType 此次调用中使用的部门 ID 的类型
- * @param includeChildrenDepartments 是否包含子部门的成员
- * @param withCustomData 是否获取自定义数据
- * @param withIdentities 是否获取 identities
- * @param withDepartmentIds 是否获取部门 ID 列表
- * @param tenantId 租户 ID
- * @returns UserPaginatedRespDto
- */
-func (client *ManagementClient) SearchDepartmentMembers(reqDto *dto.SearchDepartmentMembersDto) *dto.UserPaginatedRespDto {
- b, err := client.SendHttpRequest("/api/v3/search-department-members", fasthttp.MethodGet, reqDto)
- var response dto.UserPaginatedRespDto
+ * @summary 获取/搜索公共账号列表
+ * @description
+ * 此接口用于获取用户列表,支持模糊搜索,以及通过用户基础字段、用户自定义字段、用户所在部门、用户历史登录应用等维度筛选用户。
+ *
+ * ### 模糊搜素示例
+ *
+ * 模糊搜索默认会从 `phone`, `email`, `name`, `username`, `nickname` 五个字段对用户进行模糊搜索,你也可以通过设置 `options.fuzzySearchOn`
+ * 决定模糊匹配的字段范围:
+ *
+ * ```json
+ * {
+ * "keywords": "北京",
+ * "options": {
+ * "fuzzySearchOn": [
+ * "address"
+ * ]
+ * }
+ * }
+ * ```
+ *
+ * ### 高级搜索示例
+ *
+ * 你可以通过 `advancedFilter` 进行高级搜索,高级搜索支持通过用户的基础信息、自定义数据、所在部门、用户来源、登录应用、外部身份源信息等维度对用户进行筛选。
+ * **且这些筛选条件可以任意组合。**
+ *
+ * #### 筛选状态为禁用的用户
+ *
+ * 用户状态(`status`)为字符串类型,可选值为 `Activated` 和 `Suspended`:
+ *
+ * ```json
+ * {
+ * "advancedFilter": [
+ * {
+ * "field": "status",
+ * "operator": "EQUAL",
+ * "value": "Suspended"
+ * }
+ * ]
+ * }
+ * ```
+ *
+ * #### 筛选邮箱中包含 `@example.com` 的用户
+ *
+ * 用户邮箱(`email`)为字符串类型,可以进行模糊搜索:
+ *
+ * ```json
+ * {
+ * "advancedFilter": [
+ * {
+ * "field": "email",
+ * "operator": "CONTAINS",
+ * "value": "@example.com"
+ * }
+ * ]
+ * }
+ * ```
+ *
+ * #### 根据用户的任意扩展字段进行搜索
+ *
+ * ```json
+ * {
+ * "advancedFilter": [
+ * {
+ * "field": "some-custom-key",
+ * "operator": "EQUAL",
+ * "value": "some-value"
+ * }
+ * ]
+ * }
+ * ```
+ *
+ * #### 根据用户登录次数筛选
+ *
+ * 筛选登录次数大于 10 的用户:
+ *
+ * ```json
+ * {
+ * "advancedFilter": [
+ * {
+ * "field": "loginsCount",
+ * "operator": "GREATER",
+ * "value": 10
+ * }
+ * ]
+ * }
+ * ```
+ *
+ * 筛选登录次数在 10 - 100 次的用户:
+ *
+ * ```json
+ * {
+ * "advancedFilter": [
+ * {
+ * "field": "loginsCount",
+ * "operator": "BETWEEN",
+ * "value": [10, 100]
+ * }
+ * ]
+ * }
+ * ```
+ *
+ * #### 根据用户上次登录时间进行筛选
+ *
+ * 筛选最近 7 天内登录过的用户:
+ *
+ * ```json
+ * {
+ * "advancedFilter": [
+ * {
+ * "field": "lastLoginTime",
+ * "operator": "GREATER",
+ * "value": new Date(Date.now() - 7 * 24 * 60 * 60 * 1000)
+ * }
+ * ]
+ * }
+ * ```
+ *
+ * 筛选在某一段时间内登录过的用户:
+ *
+ * ```json
+ * {
+ * "advancedFilter": [
+ * {
+ * "field": "lastLogin",
+ * "operator": "BETWEEN",
+ * "value": [
+ * Date.now() - 14 * 24 * 60 * 60 * 1000,
+ * Date.now() - 7 * 24 * 60 * 60 * 1000
+ * ]
+ * }
+ * ]
+ * }
+ * ```
+ *
+ * #### 根据用户曾经登录过的应用筛选
+ *
+ * 筛选出曾经登录过应用 `appId1` 或者 `appId2` 的用户:
+ *
+ * ```json
+ * {
+ * "advancedFilter": [
+ * {
+ * "field": "loggedInApps",
+ * "operator": "IN",
+ * "value": [
+ * "appId1",
+ * "appId2"
+ * ]
+ * }
+ * ]
+ * }
+ * ```
+ *
+ * #### 根据用户所在部门进行筛选
+ *
+ * ```json
+ * {
+ * "advancedFilter": [
+ * {
+ * "field": "department",
+ * "operator": "IN",
+ * "value": [
+ * {
+ * "organizationCode": "steamory",
+ * "departmentId": "root",
+ * "departmentIdType": "department_id",
+ * "includeChildrenDepartments": true
+ * }
+ * ]
+ * }
+ * ]
+ * }
+ * ```
+ *
+ *
+ * @param requestBody
+ * @returns PublicAccountPaginatedRespDto
+*/
+func (client *ManagementClient) ListPublicAccounts(reqDto *dto.ListPublicAccountsRequestDto) *dto.PublicAccountPaginatedRespDto {
+ b, err := client.SendHttpRequest("/api/v3/list-public-accounts", fasthttp.MethodPost, reqDto)
+ var response dto.PublicAccountPaginatedRespDto
if err != nil {
fmt.Println(err)
return nil
@@ -1426,14 +1234,23 @@ func (client *ManagementClient) SearchDepartmentMembers(reqDto *dto.SearchDepart
}
/*
- * @summary 部门下添加成员
- * @description 通过部门 ID、组织 code,添加部门下成员。
- * @param requestBody
- * @returns IsSuccessRespDto
- */
-func (client *ManagementClient) AddDepartmentMembers(reqDto *dto.AddDepartmentMembersReqDto) *dto.IsSuccessRespDto {
- b, err := client.SendHttpRequest("/api/v3/add-department-members", fasthttp.MethodPost, reqDto)
- var response dto.IsSuccessRespDto
+ * @summary 获取公共账号信息
+ * @description 通过公共账号用户 ID,获取公共账号详情,可以选择获取自定义数据、选择指定用户 ID 类型等。
+ * @param userId 公共账号用户 ID
+ * @param userIdType 用户 ID 类型,默认值为 `user_id`,可选值为:
+ * - `user_id`: Authing 用户 ID,如 `6319a1504f3xxxxf214dd5b7`
+ * - `phone`: 用户手机号
+ * - `email`: 用户邮箱
+ * - `username`: 用户名
+ * - `external_id`: 用户在外部系统的 ID,对应 Authing 用户信息的 `externalId` 字段
+ *
+ * @param withCustomData 是否获取自定义数据
+ * @param withDepartmentIds 是否获取部门 ID 列表
+ * @returns PublicAccountSingleRespDto
+*/
+func (client *ManagementClient) GetPublicAccount(reqDto *dto.GetPublicAccountDto) *dto.PublicAccountSingleRespDto {
+ b, err := client.SendHttpRequest("/api/v3/get-public-account", fasthttp.MethodGet, reqDto)
+ var response dto.PublicAccountSingleRespDto
if err != nil {
fmt.Println(err)
return nil
@@ -1447,14 +1264,23 @@ func (client *ManagementClient) AddDepartmentMembers(reqDto *dto.AddDepartmentMe
}
/*
- * @summary 部门下删除成员
- * @description 通过部门 ID、组织 code,删除部门下成员。
- * @param requestBody
- * @returns IsSuccessRespDto
- */
-func (client *ManagementClient) RemoveDepartmentMembers(reqDto *dto.RemoveDepartmentMembersReqDto) *dto.IsSuccessRespDto {
- b, err := client.SendHttpRequest("/api/v3/remove-department-members", fasthttp.MethodPost, reqDto)
- var response dto.IsSuccessRespDto
+ * @summary 批量获取公共账号信息
+ * @description 通过公共账号用户 ID 列表,批量获取公共账号信息,可以选择获取自定义数据、选择指定用户 ID 类型等。
+ * @param userIds 公共账号用户 ID 数组
+ * @param userIdType 用户 ID 类型,默认值为 `user_id`,可选值为:
+ * - `user_id`: Authing 用户 ID,如 `6319a1504f3xxxxf214dd5b7`
+ * - `phone`: 用户手机号
+ * - `email`: 用户邮箱
+ * - `username`: 用户名
+ * - `external_id`: 用户在外部系统的 ID,对应 Authing 用户信息的 `externalId` 字段
+ *
+ * @param withCustomData 是否获取自定义数据
+ * @param withDepartmentIds 是否获取部门 ID 列表
+ * @returns PublicAccountListRespDto
+*/
+func (client *ManagementClient) GetPublicAccountBatch(reqDto *dto.GetPublicAccountBatchDto) *dto.PublicAccountListRespDto {
+ b, err := client.SendHttpRequest("/api/v3/get-public-account-batch", fasthttp.MethodGet, reqDto)
+ var response dto.PublicAccountListRespDto
if err != nil {
fmt.Println(err)
return nil
@@ -1468,18 +1294,14 @@ func (client *ManagementClient) RemoveDepartmentMembers(reqDto *dto.RemoveDepart
}
/*
- * @summary 获取父部门信息
- * @description 通过组织 code、部门 ID,获取父部门信息,可以选择获取自定义数据等。
- * @param organizationCode 组织 code
- * @param departmentId 部门 ID
- * @param departmentIdType 此次调用中使用的部门 ID 的类型
- * @param withCustomData 是否获取自定义数据
- * @param tenantId 租户 ID
- * @returns DepartmentSingleRespDto
+* @summary 创建公共账号
+* @description 创建公共账号,邮箱、手机号、用户名必须包含其中一个,邮箱、手机号、用户名、externalId 用户池内唯一,此接口将以管理员身份创建公共账号用户因此不需要进行手机号验证码检验等安全检测。
+* @param requestBody
+* @returns PublicAccountSingleRespDto
*/
-func (client *ManagementClient) GetParentDepartment(reqDto *dto.GetParentDepartmentDto) *dto.DepartmentSingleRespDto {
- b, err := client.SendHttpRequest("/api/v3/get-parent-department", fasthttp.MethodGet, reqDto)
- var response dto.DepartmentSingleRespDto
+func (client *ManagementClient) CreatePublicAccount(reqDto *dto.CreatePublicAccountReqDto) *dto.PublicAccountSingleRespDto {
+ b, err := client.SendHttpRequest("/api/v3/create-public-account", fasthttp.MethodPost, reqDto)
+ var response dto.PublicAccountSingleRespDto
if err != nil {
fmt.Println(err)
return nil
@@ -1493,19 +1315,14 @@ func (client *ManagementClient) GetParentDepartment(reqDto *dto.GetParentDepartm
}
/*
- * @summary 判断用户是否在某个部门下
- * @description 通过组织 code、部门 ID,判断用户是否在某个部门下,可以选择包含子部门。
- * @param userId 用户唯一标志,可以是用户 ID、用户名、邮箱、手机号、外部 ID、在外部身份源的 ID。
- * @param organizationCode 组织 code
- * @param departmentId 部门 ID,根部门传 `root`。departmentId 和 departmentCode 必传其一。
- * @param departmentIdType 此次调用中使用的部门 ID 的类型
- * @param includeChildrenDepartments 是否包含子部门
- * @param tenantId 租户 ID
- * @returns IsUserInDepartmentRespDto
+* @summary 批量创建公共账号
+* @description 批量创建公共账号,邮箱、手机号、用户名必须包含其中一个,邮箱、手机号、用户名、externalId 用户池内唯一,此接口将以管理员身份创建公共账号用户因此不需要进行手机号验证码检验等安全检测。
+* @param requestBody
+* @returns PublicAccountListRespDto
*/
-func (client *ManagementClient) IsUserInDepartment(reqDto *dto.IsUserInDepartmentDto) *dto.IsUserInDepartmentRespDto {
- b, err := client.SendHttpRequest("/api/v3/is-user-in-department", fasthttp.MethodGet, reqDto)
- var response dto.IsUserInDepartmentRespDto
+func (client *ManagementClient) CreatePublicAccountsBatch(reqDto *dto.CreatePublicAccountBatchReqDto) *dto.PublicAccountListRespDto {
+ b, err := client.SendHttpRequest("/api/v3/create-public-accounts-batch", fasthttp.MethodPost, reqDto)
+ var response dto.PublicAccountListRespDto
if err != nil {
fmt.Println(err)
return nil
@@ -1519,15 +1336,14 @@ func (client *ManagementClient) IsUserInDepartment(reqDto *dto.IsUserInDepartmen
}
/*
- * @summary 根据部门id查询部门
- * @description 根据部门id查询部门
- * @param departmentId 部门 ID
- * @param tenantId 租户 ID
- * @returns DepartmentSingleRespDto
+* @summary 修改公共账号资料
+* @description 通过公共账号用户 ID,修改公共账号资料,邮箱、手机号、用户名、externalId 用户池内唯一,此接口将以管理员身份修改公共账号资料因此不需要进行手机号验证码检验等安全检测。
+* @param requestBody
+* @returns PublicAccountSingleRespDto
*/
-func (client *ManagementClient) GetDepartmentById(reqDto *dto.GetDepartmentByIdDto) *dto.DepartmentSingleRespDto {
- b, err := client.SendHttpRequest("/api/v3/get-department-by-id", fasthttp.MethodGet, reqDto)
- var response dto.DepartmentSingleRespDto
+func (client *ManagementClient) UpdatePublicAccount(reqDto *dto.UpdatePublicAccountReqDto) *dto.PublicAccountSingleRespDto {
+ b, err := client.SendHttpRequest("/api/v3/update-public-account", fasthttp.MethodPost, reqDto)
+ var response dto.PublicAccountSingleRespDto
if err != nil {
fmt.Println(err)
return nil
@@ -1541,14 +1357,14 @@ func (client *ManagementClient) GetDepartmentById(reqDto *dto.GetDepartmentByIdD
}
/*
- * @summary 根据组织树批量创建部门
- * @description 根据组织树批量创建部门,部门名称不存在时会自动创建
- * @param requestBody
- * @returns CreateDepartmentTreeRespDto
+* @summary 批量修改公共账号资料
+* @description 批量修改公共账号资料,邮箱、手机号、用户名、externalId 用户池内唯一,此接口将以管理员身份修改公共账号资料因此不需要进行手机号验证码检验等安全检测。
+* @param requestBody
+* @returns PublicAccountListRespDto
*/
-func (client *ManagementClient) CreateDepartmentTree(reqDto *dto.CreateDepartmentTreeReqDto) *dto.CreateDepartmentTreeRespDto {
- b, err := client.SendHttpRequest("/api/v3/create-department-tree", fasthttp.MethodPost, reqDto)
- var response dto.CreateDepartmentTreeRespDto
+func (client *ManagementClient) UpdatePublicAccountBatch(reqDto *dto.UpdatePublicAccountBatchReqDto) *dto.PublicAccountListRespDto {
+ b, err := client.SendHttpRequest("/api/v3/update-public-account-batch", fasthttp.MethodPost, reqDto)
+ var response dto.PublicAccountListRespDto
if err != nil {
fmt.Println(err)
return nil
@@ -1562,14 +1378,14 @@ func (client *ManagementClient) CreateDepartmentTree(reqDto *dto.CreateDepartmen
}
/*
- * @summary 获取分组详情
- * @description 通过分组 code,获取分组详情。
- * @param code 分组 code
- * @returns GroupSingleRespDto
+* @summary 批量删除公共账号
+* @description 通过公共账号 ID 列表,删除公共账号,支持批量删除,可以选择指定用户 ID 类型等。
+* @param requestBody
+* @returns IsSuccessRespDto
*/
-func (client *ManagementClient) GetGroup(reqDto *dto.GetGroupDto) *dto.GroupSingleRespDto {
- b, err := client.SendHttpRequest("/api/v3/get-group", fasthttp.MethodGet, reqDto)
- var response dto.GroupSingleRespDto
+func (client *ManagementClient) DeletePublicAccountsBatch(reqDto *dto.DeletePublicAccountsBatchDto) *dto.IsSuccessRespDto {
+ b, err := client.SendHttpRequest("/api/v3/delete-public-accounts-batch", fasthttp.MethodPost, reqDto)
+ var response dto.IsSuccessRespDto
if err != nil {
fmt.Println(err)
return nil
@@ -1583,16 +1399,14 @@ func (client *ManagementClient) GetGroup(reqDto *dto.GetGroupDto) *dto.GroupSing
}
/*
- * @summary 获取分组列表
- * @description 获取分组列表,支持分页。
- * @param keywords 搜索分组 code 或分组名称
- * @param page 当前页数,从 1 开始
- * @param limit 每页数目,最大不能超过 50,默认为 10
- * @returns GroupPaginatedRespDto
+* @summary 强制下线公共账号
+* @description 通过公共账号 ID、App ID 列表,强制让公共账号下线,可以选择指定公共账号 ID 类型等。
+* @param requestBody
+* @returns IsSuccessRespDto
*/
-func (client *ManagementClient) ListGroups(reqDto *dto.ListGroupsDto) *dto.GroupPaginatedRespDto {
- b, err := client.SendHttpRequest("/api/v3/list-groups", fasthttp.MethodGet, reqDto)
- var response dto.GroupPaginatedRespDto
+func (client *ManagementClient) KickPublicAccounts(reqDto *dto.KickPublicAccountsDto) *dto.IsSuccessRespDto {
+ b, err := client.SendHttpRequest("/api/v3/kick-public-accounts", fasthttp.MethodPost, reqDto)
+ var response dto.IsSuccessRespDto
if err != nil {
fmt.Println(err)
return nil
@@ -1606,14 +1420,14 @@ func (client *ManagementClient) ListGroups(reqDto *dto.ListGroupsDto) *dto.Group
}
/*
- * @summary 创建分组
- * @description 创建分组,一个分组必须包含分组名称与唯一标志符 code,且必须为一个合法的英文标志符,如 developers。
- * @param requestBody
- * @returns GroupSingleRespDto
+* @summary 个人账号转换为公共账号
+* @description 通过用户 ID,把个人账号转换为公共账号。
+* @param requestBody
+* @returns CommonResponseDto
*/
-func (client *ManagementClient) CreateGroup(reqDto *dto.CreateGroupReqDto) *dto.GroupSingleRespDto {
- b, err := client.SendHttpRequest("/api/v3/create-group", fasthttp.MethodPost, reqDto)
- var response dto.GroupSingleRespDto
+func (client *ManagementClient) ChangeIntoPublicAccount(reqDto *dto.CreatePublicAccountFromUserDto) *dto.CommonResponseDto {
+ b, err := client.SendHttpRequest("/api/v3/transfer-into-public-account", fasthttp.MethodPost, reqDto)
+ var response dto.CommonResponseDto
if err != nil {
fmt.Println(err)
return nil
@@ -1627,14 +1441,14 @@ func (client *ManagementClient) CreateGroup(reqDto *dto.CreateGroupReqDto) *dto.
}
/*
- * @summary 批量创建分组
- * @description 批量创建分组,一个分组必须包含分组名称与唯一标志符 code,且必须为一个合法的英文标志符,如 developers。
- * @param requestBody
- * @returns GroupListRespDto
+* @summary 获取用户的公共账号列表
+* @description 通过用户 ID,获取用户的公共账号列表。
+* @param userId 用户 ID
+* @returns PublicAccountPaginatedRespDto
*/
-func (client *ManagementClient) CreateGroupsBatch(reqDto *dto.CreateGroupBatchReqDto) *dto.GroupListRespDto {
- b, err := client.SendHttpRequest("/api/v3/create-groups-batch", fasthttp.MethodPost, reqDto)
- var response dto.GroupListRespDto
+func (client *ManagementClient) GetPublicAccountsOfUser(reqDto *dto.GetPublicAccountsOfUserDto) *dto.PublicAccountPaginatedRespDto {
+ b, err := client.SendHttpRequest("/api/v3/get-public-accounts-of-user", fasthttp.MethodGet, reqDto)
+ var response dto.PublicAccountPaginatedRespDto
if err != nil {
fmt.Println(err)
return nil
@@ -1648,14 +1462,14 @@ func (client *ManagementClient) CreateGroupsBatch(reqDto *dto.CreateGroupBatchRe
}
/*
- * @summary 修改分组
- * @description 通过分组 code,修改分组,可以修改此分组的 code。
- * @param requestBody
- * @returns GroupSingleRespDto
+* @summary 公共账号的用户列表
+* @description 通过公共账号 ID,获取用户列表。
+* @param publicAccountId 公共账号 ID
+* @returns PublicAccountPaginatedRespDto
*/
-func (client *ManagementClient) UpdateGroup(reqDto *dto.UpdateGroupReqDto) *dto.GroupSingleRespDto {
- b, err := client.SendHttpRequest("/api/v3/update-group", fasthttp.MethodPost, reqDto)
- var response dto.GroupSingleRespDto
+func (client *ManagementClient) GetUsersOfPublicAccount(reqDto *dto.GetUsersOfPublicAccountDto) *dto.PublicAccountPaginatedRespDto {
+ b, err := client.SendHttpRequest("/api/v3/get-users-of-public-account", fasthttp.MethodGet, reqDto)
+ var response dto.PublicAccountPaginatedRespDto
if err != nil {
fmt.Println(err)
return nil
@@ -1669,13 +1483,13 @@ func (client *ManagementClient) UpdateGroup(reqDto *dto.UpdateGroupReqDto) *dto.
}
/*
- * @summary 批量删除分组
- * @description 通过分组 code,批量删除分组。
- * @param requestBody
- * @returns IsSuccessRespDto
+* @summary 公共账号绑定批量用户
+* @description 使用公共账号绑定批量用户
+* @param requestBody
+* @returns IsSuccessRespDto
*/
-func (client *ManagementClient) DeleteGroupsBatch(reqDto *dto.DeleteGroupsReqDto) *dto.IsSuccessRespDto {
- b, err := client.SendHttpRequest("/api/v3/delete-groups-batch", fasthttp.MethodPost, reqDto)
+func (client *ManagementClient) BindUsersPublicAccount(reqDto *dto.SetPublicAccountBatchReqDto) *dto.IsSuccessRespDto {
+ b, err := client.SendHttpRequest("/api/v3/set-public-account-of-users", fasthttp.MethodPost, reqDto)
var response dto.IsSuccessRespDto
if err != nil {
fmt.Println(err)
@@ -1690,13 +1504,13 @@ func (client *ManagementClient) DeleteGroupsBatch(reqDto *dto.DeleteGroupsReqDto
}
/*
- * @summary 添加分组成员
- * @description 添加分组成员,成员以用户 ID 数组形式传递。
- * @param requestBody
- * @returns IsSuccessRespDto
+* @summary 用户绑定批量公共账号
+* @description 用户绑定批量公共账号
+* @param requestBody
+* @returns IsSuccessRespDto
*/
-func (client *ManagementClient) AddGroupMembers(reqDto *dto.AddGroupMembersReqDto) *dto.IsSuccessRespDto {
- b, err := client.SendHttpRequest("/api/v3/add-group-members", fasthttp.MethodPost, reqDto)
+func (client *ManagementClient) SetuserOfPublicAccount(reqDto *dto.SetUserOfPublicAccountBatchReqDto) *dto.IsSuccessRespDto {
+ b, err := client.SendHttpRequest("/api/v3/set-user-of-public-accounts", fasthttp.MethodPost, reqDto)
var response dto.IsSuccessRespDto
if err != nil {
fmt.Println(err)
@@ -1711,13 +1525,13 @@ func (client *ManagementClient) AddGroupMembers(reqDto *dto.AddGroupMembersReqDt
}
/*
- * @summary 批量移除分组成员
- * @description 批量移除分组成员,成员以用户 ID 数组形式传递。
- * @param requestBody
- * @returns IsSuccessRespDto
+* @summary 公共账号解绑用户
+* @description 公共账号解绑用户
+* @param requestBody
+* @returns IsSuccessRespDto
*/
-func (client *ManagementClient) RemoveGroupMembers(reqDto *dto.RemoveGroupMembersReqDto) *dto.IsSuccessRespDto {
- b, err := client.SendHttpRequest("/api/v3/remove-group-members", fasthttp.MethodPost, reqDto)
+func (client *ManagementClient) UnbindUsersPublicAccount(reqDto *dto.UnbindPublicAccountBatchReqDto) *dto.IsSuccessRespDto {
+ b, err := client.SendHttpRequest("/api/v3/unbind-public-account-of-user", fasthttp.MethodPost, reqDto)
var response dto.IsSuccessRespDto
if err != nil {
fmt.Println(err)
@@ -1732,19 +1546,17 @@ func (client *ManagementClient) RemoveGroupMembers(reqDto *dto.RemoveGroupMember
}
/*
- * @summary 获取分组成员列表
- * @description 通过分组 code,获取分组成员列表,支持分页,可以获取自定义数据、identities、部门 ID 列表。
- * @param code 分组 code
- * @param page 当前页数,从 1 开始
- * @param limit 每页数目,最大不能超过 50,默认为 10
- * @param withCustomData 是否获取自定义数据
- * @param withIdentities 是否获取 identities
- * @param withDepartmentIds 是否获取部门 ID 列表
- * @returns UserPaginatedRespDto
+* @summary 获取组织机构详情
+* @description 获取组织机构详情
+* @param organizationCode 组织 Code(organizationCode)
+* @param withCustomData 是否获取自定义数据
+* @param withPost 是否获取 部门信息
+* @param tenantId 租户 ID
+* @returns OrganizationSingleRespDto
*/
-func (client *ManagementClient) ListGroupMembers(reqDto *dto.ListGroupMembersDto) *dto.UserPaginatedRespDto {
- b, err := client.SendHttpRequest("/api/v3/list-group-members", fasthttp.MethodGet, reqDto)
- var response dto.UserPaginatedRespDto
+func (client *ManagementClient) GetOrganization(reqDto *dto.GetOrganizationDto) *dto.OrganizationSingleRespDto {
+ b, err := client.SendHttpRequest("/api/v3/get-organization", fasthttp.MethodGet, reqDto)
+ var response dto.OrganizationSingleRespDto
if err != nil {
fmt.Println(err)
return nil
@@ -1758,16 +1570,17 @@ func (client *ManagementClient) ListGroupMembers(reqDto *dto.ListGroupMembersDto
}
/*
- * @summary 获取分组被授权的资源列表
- * @description 通过分组 code,获取分组被授权的资源列表,可以通过资源类型、权限分组 code 筛选。
- * @param code 分组 code
- * @param namespace 所属权限分组(权限空间)的 Code
- * @param resourceType 资源类型
- * @returns AuthorizedResourceListRespDto
+* @summary 批量获取组织机构详情
+* @description 批量获取组织机构详情
+* @param organizationCodeList 组织 Code(organizationCode)列表
+* @param withCustomData 是否获取自定义数据
+* @param withPost 是否获取 部门信息
+* @param tenantId 租户 ID
+* @returns OrganizationListRespDto
*/
-func (client *ManagementClient) GetGroupAuthorizedResources(reqDto *dto.GetGroupAuthorizedResourcesDto) *dto.AuthorizedResourceListRespDto {
- b, err := client.SendHttpRequest("/api/v3/get-group-authorized-resources", fasthttp.MethodGet, reqDto)
- var response dto.AuthorizedResourceListRespDto
+func (client *ManagementClient) GetOrganizationsBatch(reqDto *dto.GetOrganizationBatchDto) *dto.OrganizationListRespDto {
+ b, err := client.SendHttpRequest("/api/v3/get-organization-batch", fasthttp.MethodGet, reqDto)
+ var response dto.OrganizationListRespDto
if err != nil {
fmt.Println(err)
return nil
@@ -1781,15 +1594,20 @@ func (client *ManagementClient) GetGroupAuthorizedResources(reqDto *dto.GetGroup
}
/*
- * @summary 获取角色详情
- * @description 通过权限分组内角色 code,获取角色详情。
- * @param code 权限分组(权限空间)内角色的唯一标识符
- * @param namespace 所属权限分组(权限空间)的 Code
- * @returns RoleSingleRespDto
+* @summary 获取组织机构列表
+* @description 获取组织机构列表,支持分页。
+* @param page 当前页数,从 1 开始
+* @param limit 每页数目,最大不能超过 50,默认为 10
+* @param fetchAll 拉取所有
+* @param withCustomData 是否获取自定义数据
+* @param withPost 是否获取 部门信息
+* @param tenantId 租户 ID
+* @param status 组织的状态
+* @returns OrganizationPaginatedRespDto
*/
-func (client *ManagementClient) GetRole(reqDto *dto.GetRoleDto) *dto.RoleSingleRespDto {
- b, err := client.SendHttpRequest("/api/v3/get-role", fasthttp.MethodGet, reqDto)
- var response dto.RoleSingleRespDto
+func (client *ManagementClient) ListOrganizations(reqDto *dto.ListOrganizationsDto) *dto.OrganizationPaginatedRespDto {
+ b, err := client.SendHttpRequest("/api/v3/list-organizations", fasthttp.MethodGet, reqDto)
+ var response dto.OrganizationPaginatedRespDto
if err != nil {
fmt.Println(err)
return nil
@@ -1803,14 +1621,14 @@ func (client *ManagementClient) GetRole(reqDto *dto.GetRoleDto) *dto.RoleSingleR
}
/*
- * @summary 分配角色
- * @description 通过权限分组内角色 code,分配角色,被分配者可以是用户或部门。
- * @param requestBody
- * @returns IsSuccessRespDto
+* @summary 创建组织机构
+* @description 创建组织机构,会创建一个只有一个节点的组织机构,可以选择组织描述信息、根节点自定义 ID、多语言等。
+* @param requestBody
+* @returns OrganizationSingleRespDto
*/
-func (client *ManagementClient) AssignRole(reqDto *dto.AssignRoleDto) *dto.IsSuccessRespDto {
- b, err := client.SendHttpRequest("/api/v3/assign-role", fasthttp.MethodPost, reqDto)
- var response dto.IsSuccessRespDto
+func (client *ManagementClient) CreateOrganization(reqDto *dto.CreateOrganizationReqDto) *dto.OrganizationSingleRespDto {
+ b, err := client.SendHttpRequest("/api/v3/create-organization", fasthttp.MethodPost, reqDto)
+ var response dto.OrganizationSingleRespDto
if err != nil {
fmt.Println(err)
return nil
@@ -1824,14 +1642,14 @@ func (client *ManagementClient) AssignRole(reqDto *dto.AssignRoleDto) *dto.IsSuc
}
/*
- * @summary 移除分配的角色
- * @description 通过权限分组内角色 code,移除分配的角色,被分配者可以是用户或部门。
- * @param requestBody
- * @returns IsSuccessRespDto
+* @summary 修改组织机构
+* @description 通过组织 code,修改组织机构,可以选择部门描述、新组织 code、组织名称等。
+* @param requestBody
+* @returns OrganizationSingleRespDto
*/
-func (client *ManagementClient) RevokeRole(reqDto *dto.RevokeRoleDto) *dto.IsSuccessRespDto {
- b, err := client.SendHttpRequest("/api/v3/revoke-role", fasthttp.MethodPost, reqDto)
- var response dto.IsSuccessRespDto
+func (client *ManagementClient) UpdateOrganization(reqDto *dto.UpdateOrganizationReqDto) *dto.OrganizationSingleRespDto {
+ b, err := client.SendHttpRequest("/api/v3/update-organization", fasthttp.MethodPost, reqDto)
+ var response dto.OrganizationSingleRespDto
if err != nil {
fmt.Println(err)
return nil
@@ -1845,16 +1663,14 @@ func (client *ManagementClient) RevokeRole(reqDto *dto.RevokeRoleDto) *dto.IsSuc
}
/*
- * @summary 获取角色被授权的资源列表
- * @description 通过权限分组内角色 code,获取角色被授权的资源列表。
- * @param code 权限分组内角色的唯一标识符
- * @param namespace 所属权限分组的 code
- * @param resourceType 资源类型,如 数据、API、按钮、菜单
- * @returns RoleAuthorizedResourcePaginatedRespDto
+* @summary 删除组织机构
+* @description 通过组织 code,删除组织机构树。
+* @param requestBody
+* @returns IsSuccessRespDto
*/
-func (client *ManagementClient) GetRoleAuthorizedResources(reqDto *dto.GetRoleAuthorizedResourcesDto) *dto.RoleAuthorizedResourcePaginatedRespDto {
- b, err := client.SendHttpRequest("/api/v3/get-role-authorized-resources", fasthttp.MethodGet, reqDto)
- var response dto.RoleAuthorizedResourcePaginatedRespDto
+func (client *ManagementClient) DeleteOrganization(reqDto *dto.DeleteOrganizationReqDto) *dto.IsSuccessRespDto {
+ b, err := client.SendHttpRequest("/api/v3/delete-organization", fasthttp.MethodPost, reqDto)
+ var response dto.IsSuccessRespDto
if err != nil {
fmt.Println(err)
return nil
@@ -1868,20 +1684,18 @@ func (client *ManagementClient) GetRoleAuthorizedResources(reqDto *dto.GetRoleAu
}
/*
- * @summary 获取角色成员列表
- * @description 通过权限分组内内角色 code,获取角色成员列表,支持分页,可以选择或获取自定义数据、identities 等。
- * @param code 权限分组内角色的唯一标识符
- * @param page 当前页数,从 1 开始
- * @param limit 每页数目,最大不能超过 50,默认为 10
- * @param withCustomData 是否获取自定义数据
- * @param withIdentities 是否获取 identities
- * @param withDepartmentIds 是否获取部门 ID 列表
- * @param namespace 所属权限分组的 code
- * @returns UserPaginatedRespDto
+* @summary 搜索组织机构列表
+* @description 通过搜索关键词,搜索组织机构列表,支持分页。
+* @param keywords 搜索关键词,如组织机构名称
+* @param page 当前页数,从 1 开始
+* @param limit 每页数目,最大不能超过 50,默认为 10
+* @param withCustomData 是否获取自定义数据
+* @param tenantId 租户 ID
+* @returns OrganizationPaginatedRespDto
*/
-func (client *ManagementClient) ListRoleMembers(reqDto *dto.ListRoleMembersDto) *dto.UserPaginatedRespDto {
- b, err := client.SendHttpRequest("/api/v3/list-role-members", fasthttp.MethodGet, reqDto)
- var response dto.UserPaginatedRespDto
+func (client *ManagementClient) SearchOrganizations(reqDto *dto.SearchOrganizationsDto) *dto.OrganizationPaginatedRespDto {
+ b, err := client.SendHttpRequest("/api/v3/search-organizations", fasthttp.MethodGet, reqDto)
+ var response dto.OrganizationPaginatedRespDto
if err != nil {
fmt.Println(err)
return nil
@@ -1895,17 +1709,13 @@ func (client *ManagementClient) ListRoleMembers(reqDto *dto.ListRoleMembersDto)
}
/*
- * @summary 获取角色的部门列表
- * @description 通过权限分组内角色 code,获取角色的部门列表,支持分页。
- * @param code 权限分组内角色的唯一标识符
- * @param namespace 所属权限分组的 code
- * @param page 当前页数,从 1 开始
- * @param limit 每页数目,最大不能超过 50,默认为 10
- * @returns RoleDepartmentListPaginatedRespDto
+* @summary 更新组织机构状态
+* @param requestBody
+* @returns IsSuccessRespDto
*/
-func (client *ManagementClient) ListRoleDepartments(reqDto *dto.ListRoleDepartmentsDto) *dto.RoleDepartmentListPaginatedRespDto {
- b, err := client.SendHttpRequest("/api/v3/list-role-departments", fasthttp.MethodGet, reqDto)
- var response dto.RoleDepartmentListPaginatedRespDto
+func (client *ManagementClient) UpdateOrganizationStatus(reqDto *dto.UpdateOrganizationStatusReqDto) *dto.IsSuccessRespDto {
+ b, err := client.SendHttpRequest("/api/v3/update-organization-status", fasthttp.MethodPost, reqDto)
+ var response dto.IsSuccessRespDto
if err != nil {
fmt.Println(err)
return nil
@@ -1919,14 +1729,20 @@ func (client *ManagementClient) ListRoleDepartments(reqDto *dto.ListRoleDepartme
}
/*
- * @summary 创建角色
- * @description 通过权限分组(权限空间)内角色 code,创建角色,可以选择权限分组、角色描述、角色名称等。
- * @param requestBody
- * @returns RoleSingleRespDto
+* @summary 获取部门信息
+* @description 通过组织 code 以及 部门 ID 或 部门 code,获取部门信息,可以获取自定义数据。
+* @param organizationCode 组织 code
+* @param departmentId 部门 ID,根部门传 `root`。departmentId 和 departmentCode 必传其一。
+* @param departmentCode 部门 code。departmentId 和 departmentCode 必传其一。
+* @param departmentIdType 此次调用中使用的部门 ID 的类型
+* @param withCustomData 是否获取自定义数据
+* @param flatCustomData 是否拍平扩展字段
+* @param tenantId 租户 ID
+* @returns DepartmentSingleRespDto
*/
-func (client *ManagementClient) CreateRole(reqDto *dto.CreateRoleDto) *dto.RoleSingleRespDto {
- b, err := client.SendHttpRequest("/api/v3/create-role", fasthttp.MethodPost, reqDto)
- var response dto.RoleSingleRespDto
+func (client *ManagementClient) GetDepartment(reqDto *dto.GetDepartmentDto) *dto.DepartmentSingleRespDto {
+ b, err := client.SendHttpRequest("/api/v3/get-department", fasthttp.MethodGet, reqDto)
+ var response dto.DepartmentSingleRespDto
if err != nil {
fmt.Println(err)
return nil
@@ -1940,17 +1756,14 @@ func (client *ManagementClient) CreateRole(reqDto *dto.CreateRoleDto) *dto.RoleS
}
/*
- * @summary 获取角色列表
- * @description 获取角色列表,支持分页、支持根据权限分组(权限空间)筛选
- * @param page 当前页数,从 1 开始
- * @param limit 每页数目,最大不能超过 50,默认为 10
- * @param keywords 用于根据角色的 code 或者名称进行模糊搜索,可选。
- * @param namespace 所属权限分组(权限空间)的 code
- * @returns RolePaginatedRespDto
+* @summary 创建部门
+* @description 通过组织 code、部门名称、父部门 ID,创建部门,可以设置多种参数。
+* @param requestBody
+* @returns DepartmentSingleRespDto
*/
-func (client *ManagementClient) ListRoles(reqDto *dto.ListRolesDto) *dto.RolePaginatedRespDto {
- b, err := client.SendHttpRequest("/api/v3/list-roles", fasthttp.MethodGet, reqDto)
- var response dto.RolePaginatedRespDto
+func (client *ManagementClient) CreateDepartment(reqDto *dto.CreateDepartmentReqDto) *dto.DepartmentSingleRespDto {
+ b, err := client.SendHttpRequest("/api/v3/create-department", fasthttp.MethodPost, reqDto)
+ var response dto.DepartmentSingleRespDto
if err != nil {
fmt.Println(err)
return nil
@@ -1964,14 +1777,14 @@ func (client *ManagementClient) ListRoles(reqDto *dto.ListRolesDto) *dto.RolePag
}
/*
- * @summary 单个权限分组(权限空间)内删除角色
- * @description 单个权限分组(权限空间)内删除角色,可以批量删除。
- * @param requestBody
- * @returns IsSuccessRespDto
+* @summary 修改部门
+* @description 通过组织 code、部门 ID,修改部门,可以设置多种参数。
+* @param requestBody
+* @returns DepartmentSingleRespDto
*/
-func (client *ManagementClient) DeleteRolesBatch(reqDto *dto.DeleteRoleDto) *dto.IsSuccessRespDto {
- b, err := client.SendHttpRequest("/api/v3/delete-roles-batch", fasthttp.MethodPost, reqDto)
- var response dto.IsSuccessRespDto
+func (client *ManagementClient) UpdateDepartment(reqDto *dto.UpdateDepartmentReqDto) *dto.DepartmentSingleRespDto {
+ b, err := client.SendHttpRequest("/api/v3/update-department", fasthttp.MethodPost, reqDto)
+ var response dto.DepartmentSingleRespDto
if err != nil {
fmt.Println(err)
return nil
@@ -1985,13 +1798,13 @@ func (client *ManagementClient) DeleteRolesBatch(reqDto *dto.DeleteRoleDto) *dto
}
/*
- * @summary 批量创建角色
- * @description 批量创建角色,可以选择权限分组、角色描述等。
- * @param requestBody
- * @returns IsSuccessRespDto
+* @summary 删除部门
+* @description 通过组织 code、部门 ID,删除部门。
+* @param requestBody
+* @returns IsSuccessRespDto
*/
-func (client *ManagementClient) CreateRolesBatch(reqDto *dto.CreateRolesBatch) *dto.IsSuccessRespDto {
- b, err := client.SendHttpRequest("/api/v3/create-roles-batch", fasthttp.MethodPost, reqDto)
+func (client *ManagementClient) DeleteDepartment(reqDto *dto.DeleteDepartmentReqDto) *dto.IsSuccessRespDto {
+ b, err := client.SendHttpRequest("/api/v3/delete-department", fasthttp.MethodPost, reqDto)
var response dto.IsSuccessRespDto
if err != nil {
fmt.Println(err)
@@ -2006,14 +1819,15 @@ func (client *ManagementClient) CreateRolesBatch(reqDto *dto.CreateRolesBatch) *
}
/*
- * @summary 修改角色
- * @description 通过权限分组(权限空间)内角色新旧 Code,修改角色,可以选择角色名称、角色描述等。
- * @param requestBody
- * @returns IsSuccessRespDto
+* @deprecated
+* @summary 搜索部门
+* @description 通过组织 code、搜索关键词,搜索部门,可以搜索组织名称等。
+* @param requestBody
+* @returns DepartmentListRespDto
*/
-func (client *ManagementClient) UpdateRole(reqDto *dto.UpdateRoleDto) *dto.IsSuccessRespDto {
- b, err := client.SendHttpRequest("/api/v3/update-role", fasthttp.MethodPost, reqDto)
- var response dto.IsSuccessRespDto
+func (client *ManagementClient) SearchDepartments(reqDto *dto.SearchDepartmentsReqDto) *dto.DepartmentListRespDto {
+ b, err := client.SendHttpRequest("/api/v3/search-departments", fasthttp.MethodPost, reqDto)
+ var response dto.DepartmentListRespDto
if err != nil {
fmt.Println(err)
return nil
@@ -2027,14 +1841,14 @@ func (client *ManagementClient) UpdateRole(reqDto *dto.UpdateRoleDto) *dto.IsSuc
}
/*
- * @summary 跨权限分组(空间)删除角色
- * @description 跨权限分组(空间)删除角色,可以批量删除。
- * @param requestBody
- * @returns IsSuccessRespDto
+* @summary 搜索部门
+* @description 通过组织 code、搜索关键词,搜索部门,可以搜索组织名称等。
+* @param requestBody
+* @returns DepartmentListRespDto
*/
-func (client *ManagementClient) DeleteRoles(reqDto *dto.DeleteRoleBatchDto) *dto.IsSuccessRespDto {
- b, err := client.SendHttpRequest("/api/v3/multiple-namespace-delete-roles-batch", fasthttp.MethodPost, reqDto)
- var response dto.IsSuccessRespDto
+func (client *ManagementClient) SearchDepartmentsList(reqDto *dto.SearchDepartmentsListReqDto) *dto.DepartmentListRespDto {
+ b, err := client.SendHttpRequest("/api/v3/search-departments-list", fasthttp.MethodPost, reqDto)
+ var response dto.DepartmentListRespDto
if err != nil {
fmt.Println(err)
return nil
@@ -2048,14 +1862,21 @@ func (client *ManagementClient) DeleteRoles(reqDto *dto.DeleteRoleBatchDto) *dto
}
/*
- * @summary 校验角色 Code 或者名称是否可用
- * @description 通过用户池 ID、权限空间 Code和角色 Code,或者用户池 ID、权限空间名称和角色名称查询是否可用。
- * @param requestBody
- * @returns RoleCheckParamsRespDto
+* @summary 获取子部门列表
+* @description 通过组织 code、部门 ID,获取子部门列表,可以选择获取自定义数据、虚拟组织等。
+* @param organizationCode 组织 code
+* @param departmentId 需要获取的部门 ID
+* @param status 部门的状态
+* @param departmentIdType 此次调用中使用的部门 ID 的类型
+* @param excludeVirtualNode 是否要排除虚拟组织
+* @param onlyVirtualNode 是否只包含虚拟组织
+* @param withCustomData 是否获取自定义数据
+* @param tenantId 租户 ID
+* @returns DepartmentPaginatedRespDto
*/
-func (client *ManagementClient) CheckParamsNamespace(reqDto *dto.CheckRoleParamsDto) *dto.RoleCheckParamsRespDto {
- b, err := client.SendHttpRequest("/api/v3/check-role-params", fasthttp.MethodPost, reqDto)
- var response dto.RoleCheckParamsRespDto
+func (client *ManagementClient) ListChildrenDepartments(reqDto *dto.ListChildrenDepartmentsDto) *dto.DepartmentPaginatedRespDto {
+ b, err := client.SendHttpRequest("/api/v3/list-children-departments", fasthttp.MethodGet, reqDto)
+ var response dto.DepartmentPaginatedRespDto
if err != nil {
fmt.Println(err)
return nil
@@ -2069,14 +1890,17 @@ func (client *ManagementClient) CheckParamsNamespace(reqDto *dto.CheckRoleParams
}
/*
- * @summary 获取角色授权列表
- * @description 获取角色授权列表。
- * @param requestBody
- * @returns RoleListPageRespDto
+* @summary 获取所有部门列表
+* @description 获取所有部门列表,可以用于获取某个组织下的所有部门列表。
+* @param organizationCode 组织 code
+* @param departmentId 部门 ID,不填写默认为 `root` 根部门 ID
+* @param departmentIdType 此次调用中使用的部门 ID 的类型
+* @param withCustomData 是否获取自定义数据
+* @returns DepartmentPaginatedRespDto
*/
-func (client *ManagementClient) ListRoleAssignments(reqDto *dto.ListRoleAssignmentsDto) *dto.RoleListPageRespDto {
- b, err := client.SendHttpRequest("/api/v3/list-role-assignments", fasthttp.MethodGet, reqDto)
- var response dto.RoleListPageRespDto
+func (client *ManagementClient) GetAllDepartments(reqDto *dto.GetAllDepartmentsDto) *dto.DepartmentPaginatedRespDto {
+ b, err := client.SendHttpRequest("/api/v3/get-all-departments", fasthttp.MethodGet, reqDto)
+ var response dto.DepartmentPaginatedRespDto
if err != nil {
fmt.Println(err)
return nil
@@ -2090,15 +1914,25 @@ func (client *ManagementClient) ListRoleAssignments(reqDto *dto.ListRoleAssignme
}
/*
- * @summary 获取身份源列表
- * @description 获取身份源列表,可以指定 租户 ID 筛选。
- * @param tenantId 租户 ID
- * @param appId 应用 ID
- * @returns ExtIdpListPaginatedRespDto
+* @summary 获取部门成员列表
+* @description 通过组织 code、部门 ID、排序,获取部门成员列表,支持分页,可以选择获取自定义数据、identities 等。
+* @param organizationCode 组织 code
+* @param departmentId 部门 ID,根部门传 `root`
+* @param sortBy 排序依据
+* @param orderBy 增序还是倒序
+* @param departmentIdType 此次调用中使用的部门 ID 的类型
+* @param includeChildrenDepartments 是否包含子部门的成员
+* @param page 当前页数,从 1 开始
+* @param limit 每页数目,最大不能超过 50,默认为 10
+* @param withCustomData 是否获取自定义数据
+* @param withIdentities 是否获取 identities
+* @param withDepartmentIds 是否获取部门 ID 列表
+* @param tenantId 租户 ID
+* @returns UserPaginatedRespDto
*/
-func (client *ManagementClient) ListExtIdp(reqDto *dto.ListExtIdpDto) *dto.ExtIdpListPaginatedRespDto {
- b, err := client.SendHttpRequest("/api/v3/list-ext-idp", fasthttp.MethodGet, reqDto)
- var response dto.ExtIdpListPaginatedRespDto
+func (client *ManagementClient) ListDepartmentMembers(reqDto *dto.ListDepartmentMembersDto) *dto.UserPaginatedRespDto {
+ b, err := client.SendHttpRequest("/api/v3/list-department-members", fasthttp.MethodGet, reqDto)
+ var response dto.UserPaginatedRespDto
if err != nil {
fmt.Println(err)
return nil
@@ -2112,17 +1946,17 @@ func (client *ManagementClient) ListExtIdp(reqDto *dto.ListExtIdpDto) *dto.ExtId
}
/*
- * @summary 获取身份源详情
- * @description 通过 身份源 ID,获取身份源详情,可以指定 租户 ID 筛选。
- * @param id 身份源 ID
- * @param tenantId 租户 ID
- * @param appId 应用 ID
- * @param type 身份源类型
- * @returns ExtIdpDetailSingleRespDto
+* @summary 获取部门直属成员 ID 列表
+* @description 通过组织 code、部门 ID,获取部门直属成员 ID 列表。
+* @param organizationCode 组织 code
+* @param departmentId 部门 ID,根部门传 `root`
+* @param departmentIdType 此次调用中使用的部门 ID 的类型
+* @param tenantId 租户 ID
+* @returns UserIdListRespDto
*/
-func (client *ManagementClient) GetExtIdp(reqDto *dto.GetExtIdpDto) *dto.ExtIdpDetailSingleRespDto {
- b, err := client.SendHttpRequest("/api/v3/get-ext-idp", fasthttp.MethodGet, reqDto)
- var response dto.ExtIdpDetailSingleRespDto
+func (client *ManagementClient) ListDepartmentMemberIds(reqDto *dto.ListDepartmentMemberIdsDto) *dto.UserIdListRespDto {
+ b, err := client.SendHttpRequest("/api/v3/list-department-member-ids", fasthttp.MethodGet, reqDto)
+ var response dto.UserIdListRespDto
if err != nil {
fmt.Println(err)
return nil
@@ -2136,14 +1970,24 @@ func (client *ManagementClient) GetExtIdp(reqDto *dto.GetExtIdpDto) *dto.ExtIdpD
}
/*
- * @summary 创建身份源
- * @description 创建身份源,可以设置身份源名称、连接类型、租户 ID 等。
- * @param requestBody
- * @returns ExtIdpSingleRespDto
+* @summary 搜索部门下的成员
+* @description 通过组织 code、部门 ID、搜索关键词,搜索部门下的成员,支持分页,可以选择获取自定义数据、identities 等。
+* @param organizationCode 组织 code
+* @param departmentId 部门 ID,根部门传 `root`
+* @param keywords 搜索关键词,如成员名称
+* @param page 当前页数,从 1 开始
+* @param limit 每页数目,最大不能超过 50,默认为 10
+* @param departmentIdType 此次调用中使用的部门 ID 的类型
+* @param includeChildrenDepartments 是否包含子部门的成员
+* @param withCustomData 是否获取自定义数据
+* @param withIdentities 是否获取 identities
+* @param withDepartmentIds 是否获取部门 ID 列表
+* @param tenantId 租户 ID
+* @returns UserPaginatedRespDto
*/
-func (client *ManagementClient) CreateExtIdp(reqDto *dto.CreateExtIdpDto) *dto.ExtIdpSingleRespDto {
- b, err := client.SendHttpRequest("/api/v3/create-ext-idp", fasthttp.MethodPost, reqDto)
- var response dto.ExtIdpSingleRespDto
+func (client *ManagementClient) SearchDepartmentMembers(reqDto *dto.SearchDepartmentMembersDto) *dto.UserPaginatedRespDto {
+ b, err := client.SendHttpRequest("/api/v3/search-department-members", fasthttp.MethodGet, reqDto)
+ var response dto.UserPaginatedRespDto
if err != nil {
fmt.Println(err)
return nil
@@ -2157,14 +2001,14 @@ func (client *ManagementClient) CreateExtIdp(reqDto *dto.CreateExtIdpDto) *dto.E
}
/*
- * @summary 更新身份源配置
- * @description 更新身份源配置,可以设置身份源 ID 与 名称。
- * @param requestBody
- * @returns ExtIdpSingleRespDto
+* @summary 部门下添加成员
+* @description 通过部门 ID、组织 code,添加部门下成员。
+* @param requestBody
+* @returns IsSuccessRespDto
*/
-func (client *ManagementClient) UpdateExtIdp(reqDto *dto.UpdateExtIdpDto) *dto.ExtIdpSingleRespDto {
- b, err := client.SendHttpRequest("/api/v3/update-ext-idp", fasthttp.MethodPost, reqDto)
- var response dto.ExtIdpSingleRespDto
+func (client *ManagementClient) AddDepartmentMembers(reqDto *dto.AddDepartmentMembersReqDto) *dto.IsSuccessRespDto {
+ b, err := client.SendHttpRequest("/api/v3/add-department-members", fasthttp.MethodPost, reqDto)
+ var response dto.IsSuccessRespDto
if err != nil {
fmt.Println(err)
return nil
@@ -2178,13 +2022,13 @@ func (client *ManagementClient) UpdateExtIdp(reqDto *dto.UpdateExtIdpDto) *dto.E
}
/*
- * @summary 删除身份源
- * @description 通过身份源 ID,删除身份源。
- * @param requestBody
- * @returns IsSuccessRespDto
+* @summary 部门下删除成员
+* @description 通过部门 ID、组织 code,删除部门下成员。
+* @param requestBody
+* @returns IsSuccessRespDto
*/
-func (client *ManagementClient) DeleteExtIdp(reqDto *dto.DeleteExtIdpDto) *dto.IsSuccessRespDto {
- b, err := client.SendHttpRequest("/api/v3/delete-ext-idp", fasthttp.MethodPost, reqDto)
+func (client *ManagementClient) RemoveDepartmentMembers(reqDto *dto.RemoveDepartmentMembersReqDto) *dto.IsSuccessRespDto {
+ b, err := client.SendHttpRequest("/api/v3/remove-department-members", fasthttp.MethodPost, reqDto)
var response dto.IsSuccessRespDto
if err != nil {
fmt.Println(err)
@@ -2199,14 +2043,18 @@ func (client *ManagementClient) DeleteExtIdp(reqDto *dto.DeleteExtIdpDto) *dto.I
}
/*
- * @summary 在某个已有身份源下创建新连接
- * @description 在某个已有身份源下创建新连接,可以设置身份源图标、是否只支持登录等。
- * @param requestBody
- * @returns ExtIdpConnDetailSingleRespDto
+* @summary 获取父部门信息
+* @description 通过组织 code、部门 ID,获取父部门信息,可以选择获取自定义数据等。
+* @param organizationCode 组织 code
+* @param departmentId 部门 ID
+* @param departmentIdType 此次调用中使用的部门 ID 的类型
+* @param withCustomData 是否获取自定义数据
+* @param tenantId 租户 ID
+* @returns DepartmentSingleRespDto
*/
-func (client *ManagementClient) CreateExtIdpConn(reqDto *dto.CreateExtIdpConnDto) *dto.ExtIdpConnDetailSingleRespDto {
- b, err := client.SendHttpRequest("/api/v3/create-ext-idp-conn", fasthttp.MethodPost, reqDto)
- var response dto.ExtIdpConnDetailSingleRespDto
+func (client *ManagementClient) GetParentDepartment(reqDto *dto.GetParentDepartmentDto) *dto.DepartmentSingleRespDto {
+ b, err := client.SendHttpRequest("/api/v3/get-parent-department", fasthttp.MethodGet, reqDto)
+ var response dto.DepartmentSingleRespDto
if err != nil {
fmt.Println(err)
return nil
@@ -2220,14 +2068,19 @@ func (client *ManagementClient) CreateExtIdpConn(reqDto *dto.CreateExtIdpConnDto
}
/*
- * @summary 更新身份源连接
- * @description 更新身份源连接,可以设置身份源图标、是否只支持登录等。
- * @param requestBody
- * @returns ExtIdpConnDetailSingleRespDto
+* @summary 判断用户是否在某个部门下
+* @description 通过组织 code、部门 ID,判断用户是否在某个部门下,可以选择包含子部门。
+* @param userId 用户唯一标志,可以是用户 ID、用户名、邮箱、手机号、外部 ID、在外部身份源的 ID。
+* @param organizationCode 组织 code
+* @param departmentId 部门 ID,根部门传 `root`。departmentId 和 departmentCode 必传其一。
+* @param departmentIdType 此次调用中使用的部门 ID 的类型
+* @param includeChildrenDepartments 是否包含子部门
+* @param tenantId 租户 ID
+* @returns IsUserInDepartmentRespDto
*/
-func (client *ManagementClient) UpdateExtIdpConn(reqDto *dto.UpdateExtIdpConnDto) *dto.ExtIdpConnDetailSingleRespDto {
- b, err := client.SendHttpRequest("/api/v3/update-ext-idp-conn", fasthttp.MethodPost, reqDto)
- var response dto.ExtIdpConnDetailSingleRespDto
+func (client *ManagementClient) IsUserInDepartment(reqDto *dto.IsUserInDepartmentDto) *dto.IsUserInDepartmentRespDto {
+ b, err := client.SendHttpRequest("/api/v3/is-user-in-department", fasthttp.MethodGet, reqDto)
+ var response dto.IsUserInDepartmentRespDto
if err != nil {
fmt.Println(err)
return nil
@@ -2241,14 +2094,16 @@ func (client *ManagementClient) UpdateExtIdpConn(reqDto *dto.UpdateExtIdpConnDto
}
/*
- * @summary 删除身份源连接
- * @description 通过身份源连接 ID,删除身份源连接。
- * @param requestBody
- * @returns IsSuccessRespDto
+* @summary 根据部门id查询部门
+* @description 根据部门id查询部门
+* @param departmentId 部门 ID
+* @param tenantId 租户 ID
+* @param withCustomData 是否获取自定义数据
+* @returns DepartmentSingleRespDto
*/
-func (client *ManagementClient) DeleteExtIdpConn(reqDto *dto.DeleteExtIdpConnDto) *dto.IsSuccessRespDto {
- b, err := client.SendHttpRequest("/api/v3/delete-ext-idp-conn", fasthttp.MethodPost, reqDto)
- var response dto.IsSuccessRespDto
+func (client *ManagementClient) GetDepartmentById(reqDto *dto.GetDepartmentByIdDto) *dto.DepartmentSingleRespDto {
+ b, err := client.SendHttpRequest("/api/v3/get-department-by-id", fasthttp.MethodGet, reqDto)
+ var response dto.DepartmentSingleRespDto
if err != nil {
fmt.Println(err)
return nil
@@ -2262,14 +2117,14 @@ func (client *ManagementClient) DeleteExtIdpConn(reqDto *dto.DeleteExtIdpConnDto
}
/*
- * @summary 身份源连接开关
- * @description 身份源连接开关,可以打开或关闭身份源连接。
- * @param requestBody
- * @returns IsSuccessRespDto
+* @summary 根据组织树批量创建部门
+* @description 根据组织树批量创建部门,部门名称不存在时会自动创建
+* @param requestBody
+* @returns CreateDepartmentTreeRespDto
*/
-func (client *ManagementClient) ChangeExtIdpConnState(reqDto *dto.ChangeExtIdpConnStateDto) *dto.IsSuccessRespDto {
- b, err := client.SendHttpRequest("/api/v3/change-ext-idp-conn-state", fasthttp.MethodPost, reqDto)
- var response dto.IsSuccessRespDto
+func (client *ManagementClient) CreateDepartmentTree(reqDto *dto.CreateDepartmentTreeReqDto) *dto.CreateDepartmentTreeRespDto {
+ b, err := client.SendHttpRequest("/api/v3/create-department-tree", fasthttp.MethodPost, reqDto)
+ var response dto.CreateDepartmentTreeRespDto
if err != nil {
fmt.Println(err)
return nil
@@ -2283,14 +2138,18 @@ func (client *ManagementClient) ChangeExtIdpConnState(reqDto *dto.ChangeExtIdpCo
}
/*
- * @summary 租户关联身份源
- * @description 租户可以关联或取消关联身份源连接。
- * @param requestBody
- * @returns IsSuccessRespDto
+* @summary 获取部门绑定的第三方同步关系
+* @description 如果在 Authing 中的部门进行了上下游同步,此接口可以用于查询出在第三方的关联用户信息
+* @param organizationCode 组织 code
+* @param departmentId 部门 ID,根部门传 `root`。departmentId 和 departmentCode 必传其一。
+* @param departmentIdType 此次调用中使用的部门 ID 的类型
+* @param withCustomData 是否获取自定义数据
+* @param tenantId 租户 ID
+* @returns SyncRelationListRespDto
*/
-func (client *ManagementClient) ChangeExtIdpConnAssociationState(reqDto *dto.ChangeExtIdpAssociationStateDto) *dto.IsSuccessRespDto {
- b, err := client.SendHttpRequest("/api/v3/change-ext-idp-conn-association-state", fasthttp.MethodPost, reqDto)
- var response dto.IsSuccessRespDto
+func (client *ManagementClient) GetDepartmentSyncRelations(reqDto *dto.GetDepartmentSyncRelationsDto) *dto.SyncRelationListRespDto {
+ b, err := client.SendHttpRequest("/api/v3/get-department-sync-relations", fasthttp.MethodGet, reqDto)
+ var response dto.SyncRelationListRespDto
if err != nil {
fmt.Println(err)
return nil
@@ -2304,18 +2163,14 @@ func (client *ManagementClient) ChangeExtIdpConnAssociationState(reqDto *dto.Cha
}
/*
- * @summary 租户控制台获取身份源列表
- * @description 在租户控制台内获取身份源列表,可以根据 应用 ID 筛选。
- * @param tenantId 租户 ID
- * @param appId 应用 ID
- * @param type 身份源类型
- * @param page 当前页数,从 1 开始
- * @param limit 每页数目,最大不能超过 50,默认为 10
- * @returns ExtIdpListPaginatedRespDto
+* @summary 删除部门同步关联关系
+* @description 如果在 Authing 中的部门进行了上下游同步,此接口可以用于删除某个部门在指定身份源下的关联关系。
+* @param requestBody
+* @returns IsSuccessRespDto
*/
-func (client *ManagementClient) ListTenantExtIdp(reqDto *dto.ListTenantExtIdpDto) *dto.ExtIdpListPaginatedRespDto {
- b, err := client.SendHttpRequest("/api/v3/list-tenant-ext-idp", fasthttp.MethodGet, reqDto)
- var response dto.ExtIdpListPaginatedRespDto
+func (client *ManagementClient) DeleteDepartmentSyncRelations(reqDto *dto.DeleteDepartmentSyncRelationReqDto) *dto.IsSuccessRespDto {
+ b, err := client.SendHttpRequest("/api/v3/delete-department-sync-relations", fasthttp.MethodPost, reqDto)
+ var response dto.IsSuccessRespDto
if err != nil {
fmt.Println(err)
return nil
@@ -2329,17 +2184,14 @@ func (client *ManagementClient) ListTenantExtIdp(reqDto *dto.ListTenantExtIdpDto
}
/*
- * @summary 身份源下应用的连接详情
- * @description 在身份源详情页获取应用的连接情况
- * @param id 身份源 ID
- * @param tenantId 租户 ID
- * @param appId 应用 ID
- * @param type 身份源类型
- * @returns ExtIdpListPaginatedRespDto
+* @summary 更新部门状态
+* @description 启用和禁用部门
+* @param requestBody
+* @returns Node
*/
-func (client *ManagementClient) ExtIdpConnStateByApps(reqDto *dto.ExtIdpConnAppsDto) *dto.ExtIdpListPaginatedRespDto {
- b, err := client.SendHttpRequest("/api/v3/ext-idp-conn-apps", fasthttp.MethodGet, reqDto)
- var response dto.ExtIdpListPaginatedRespDto
+func (client *ManagementClient) UpdateNodeStatus(reqDto *dto.UpdateDepartmentStatusReqDto) *dto.Node {
+ b, err := client.SendHttpRequest("/api/v3/update-department-status", fasthttp.MethodPost, reqDto)
+ var response dto.Node
if err != nil {
fmt.Println(err)
return nil
@@ -2353,13 +2205,187 @@ func (client *ManagementClient) ExtIdpConnStateByApps(reqDto *dto.ExtIdpConnApps
}
/*
- * @summary 获取用户内置字段列表
- * @description 获取用户内置的字段列表
- * @returns CustomFieldListRespDto
- */
-func (client *ManagementClient) GetUserBaseFields() *dto.CustomFieldListRespDto {
- b, err := client.SendHttpRequest("/api/v3/get-user-base-fields", fasthttp.MethodGet, nil)
- var response dto.CustomFieldListRespDto
+ * @summary 获取/搜索用户列表
+ * @description
+ * 此接口用于获取用户列表,支持模糊搜索,以及通过用户基础字段、用户自定义字段、用户所在部门、用户历史登录应用等维度筛选用户。
+ *
+ * ### 模糊搜素示例
+ *
+ * 模糊搜索默认会从 `phone`, `email`, `name`, `username`, `nickname` 五个字段对用户进行模糊搜索,你也可以通过设置 `options.fuzzySearchOn`
+ * 决定模糊匹配的字段范围:
+ *
+ * ```json
+ * {
+ * "keywords": "北京",
+ * "options": {
+ * "fuzzySearchOn": [
+ * "address"
+ * ]
+ * }
+ * }
+ * ```
+ *
+ * ### 高级搜索示例
+ *
+ * 你可以通过 `advancedFilter` 进行高级搜索,高级搜索支持通过用户的基础信息、自定义数据、所在部门、用户来源、登录应用、外部身份源信息等维度对用户进行筛选。
+ * **且这些筛选条件可以任意组合。**
+ *
+ * #### 筛选状态为禁用的用户
+ *
+ * 用户状态(`status`)为字符串类型,可选值为 `Activated` 和 `Suspended`:
+ *
+ * ```json
+ * {
+ * "advancedFilter": [
+ * {
+ * "field": "status",
+ * "operator": "EQUAL",
+ * "value": "Suspended"
+ * }
+ * ]
+ * }
+ * ```
+ *
+ * #### 筛选邮箱中包含 `@example.com` 的用户
+ *
+ * 用户邮箱(`email`)为字符串类型,可以进行模糊搜索:
+ *
+ * ```json
+ * {
+ * "advancedFilter": [
+ * {
+ * "field": "email",
+ * "operator": "CONTAINS",
+ * "value": "@example.com"
+ * }
+ * ]
+ * }
+ * ```
+ *
+ * #### 根据用户的任意扩展字段进行搜索
+ *
+ * ```json
+ * {
+ * "advancedFilter": [
+ * {
+ * "field": "some-custom-key",
+ * "operator": "EQUAL",
+ * "value": "some-value"
+ * }
+ * ]
+ * }
+ * ```
+ *
+ * #### 根据用户登录次数筛选
+ *
+ * 筛选登录次数大于 10 的用户:
+ *
+ * ```json
+ * {
+ * "advancedFilter": [
+ * {
+ * "field": "loginsCount",
+ * "operator": "GREATER",
+ * "value": 10
+ * }
+ * ]
+ * }
+ * ```
+ *
+ * 筛选登录次数在 10 - 100 次的用户:
+ *
+ * ```json
+ * {
+ * "advancedFilter": [
+ * {
+ * "field": "loginsCount",
+ * "operator": "BETWEEN",
+ * "value": [10, 100]
+ * }
+ * ]
+ * }
+ * ```
+ *
+ * #### 根据用户上次登录时间进行筛选
+ *
+ * 筛选最近 7 天内登录过的用户:
+ *
+ * ```json
+ * {
+ * "advancedFilter": [
+ * {
+ * "field": "lastLoginTime",
+ * "operator": "GREATER",
+ * "value": new Date(Date.now() - 7 * 24 * 60 * 60 * 1000)
+ * }
+ * ]
+ * }
+ * ```
+ *
+ * 筛选在某一段时间内登录过的用户:
+ *
+ * ```json
+ * {
+ * "advancedFilter": [
+ * {
+ * "field": "lastLogin",
+ * "operator": "BETWEEN",
+ * "value": [
+ * Date.now() - 14 * 24 * 60 * 60 * 1000,
+ * Date.now() - 7 * 24 * 60 * 60 * 1000
+ * ]
+ * }
+ * ]
+ * }
+ * ```
+ *
+ * #### 根据用户曾经登录过的应用筛选
+ *
+ * 筛选出曾经登录过应用 `appId1` 或者 `appId2` 的用户:
+ *
+ * ```json
+ * {
+ * "advancedFilter": [
+ * {
+ * "field": "loggedInApps",
+ * "operator": "IN",
+ * "value": [
+ * "appId1",
+ * "appId2"
+ * ]
+ * }
+ * ]
+ * }
+ * ```
+ *
+ * #### 根据用户所在部门进行筛选
+ *
+ * ```json
+ * {
+ * "advancedFilter": [
+ * {
+ * "field": "department",
+ * "operator": "IN",
+ * "value": [
+ * {
+ * "organizationCode": "steamory",
+ * "departmentId": "root",
+ * "departmentIdType": "department_id",
+ * "includeChildrenDepartments": true
+ * }
+ * ]
+ * }
+ * ]
+ * }
+ * ```
+ *
+ *
+ * @param requestBody
+ * @returns UserPaginatedRespDto
+*/
+func (client *ManagementClient) ListUsers(reqDto *dto.ListUsersRequestDto) *dto.UserPaginatedRespDto {
+ b, err := client.SendHttpRequest("/api/v3/list-users", fasthttp.MethodPost, reqDto)
+ var response dto.UserPaginatedRespDto
if err != nil {
fmt.Println(err)
return nil
@@ -2373,14 +2399,23 @@ func (client *ManagementClient) GetUserBaseFields() *dto.CustomFieldListRespDto
}
/*
- * @summary 修改用户内置字段配置
- * @description 修改用户内置字段配置,内置字段不允许修改数据类型、唯一性。
- * @param requestBody
- * @returns CustomFieldListRespDto
+* @deprecated
+* @summary 获取用户列表
+* @description 获取用户列表接口,支持分页,可以选择获取自定义数据、identities 等。
+* @param page 当前页数,从 1 开始
+* @param limit 每页数目,最大不能超过 50,默认为 10
+* @param status 账户当前状态,如 已停用、已离职、正常状态、已归档
+* @param updatedAtStart 用户创建、修改开始时间,为精确到秒的 UNIX 时间戳;支持获取从某一段时间之后的增量数据
+* @param updatedAtEnd 用户创建、修改终止时间,为精确到秒的 UNIX 时间戳;支持获取某一段时间内的增量数据。默认为当前时间
+* @param withCustomData 是否获取自定义数据
+* @param withPost 是否获取 部门信息
+* @param withIdentities 是否获取 identities
+* @param withDepartmentIds 是否获取部门 ID 列表
+* @returns UserPaginatedRespDto
*/
-func (client *ManagementClient) SetUserBaseFields(reqDto *dto.SetUserBaseFieldsReqDto) *dto.CustomFieldListRespDto {
- b, err := client.SendHttpRequest("/api/v3/set-user-base-fields", fasthttp.MethodPost, reqDto)
- var response dto.CustomFieldListRespDto
+func (client *ManagementClient) ListUsersLegacy(reqDto *dto.ListUsersDto) *dto.UserPaginatedRespDto {
+ b, err := client.SendHttpRequest("/api/v3/list-users", fasthttp.MethodGet, reqDto)
+ var response dto.UserPaginatedRespDto
if err != nil {
fmt.Println(err)
return nil
@@ -2394,19 +2429,30 @@ func (client *ManagementClient) SetUserBaseFields(reqDto *dto.SetUserBaseFieldsR
}
/*
- * @summary 获取自定义字段列表
- * @description 通过主体类型,获取用户、部门或角色的自定义字段列表。
- * @param targetType 目标对象类型:
- * - `USER`: 用户
- * - `ROLE`: 角色
- * - `GROUP`: 分组
- * - `DEPARTMENT`: 部门
- * ;该接口暂不支持分组(GROUP)
- * @returns CustomFieldListRespDto
- */
-func (client *ManagementClient) GetCustomFields(reqDto *dto.GetCustomFieldsDto) *dto.CustomFieldListRespDto {
- b, err := client.SendHttpRequest("/api/v3/get-custom-fields", fasthttp.MethodGet, reqDto)
- var response dto.CustomFieldListRespDto
+ * @summary 获取用户信息
+ * @description 通过用户 ID,获取用户详情,可以选择获取自定义数据、identities、选择指定用户 ID 类型等。
+ * @param userId 用户 ID
+ * @param userIdType 用户 ID 类型,默认值为 `user_id`,可选值为:
+ * - `user_id`: Authing 用户 ID,如 `6319a1504f3xxxxf214dd5b7`
+ * - `phone`: 用户手机号
+ * - `email`: 用户邮箱
+ * - `username`: 用户名
+ * - `external_id`: 用户在外部系统的 ID,对应 Authing 用户信息的 `externalId` 字段
+ * - `identity`: 用户的外部身份源信息,格式为 `:`,其中 `` 为 Authing 身份源的 ID,`` 为用户在外部身份源的 ID。
+ * 示例值:`62f20932716fbcc10d966ee5:ou_8bae746eac07cd2564654140d2a9ac61`。
+ * - `sync_relation`: 用户的外部身份源信息,格式为 `:`,其中 `` 为同步身份源类型,如 wechatwork, lark;`` 为用户在外部身份源的 ID。
+ * 示例值:`lark:ou_8bae746eac07cd2564654140d2a9ac61`。
+ *
+ * @param flatCustomData 是否拍平扩展字段
+ * @param withCustomData 是否获取自定义数据
+ * @param withPost 是否获取 部门信息
+ * @param withIdentities 是否获取 identities
+ * @param withDepartmentIds 是否获取部门 ID 列表
+ * @returns UserSingleRespDto
+*/
+func (client *ManagementClient) GetUser(reqDto *dto.GetUserDto) *dto.UserSingleRespDto {
+ b, err := client.SendHttpRequest("/api/v3/get-user", fasthttp.MethodGet, reqDto)
+ var response dto.UserSingleRespDto
if err != nil {
fmt.Println(err)
return nil
@@ -2420,14 +2466,29 @@ func (client *ManagementClient) GetCustomFields(reqDto *dto.GetCustomFieldsDto)
}
/*
- * @summary 创建/修改自定义字段定义
- * @description 创建/修改用户、部门或角色自定义字段定义,如果传入的 key 不存在则创建,存在则更新。
- * @param requestBody
- * @returns CustomFieldListRespDto
- */
-func (client *ManagementClient) SetCustomFields(reqDto *dto.SetCustomFieldsReqDto) *dto.CustomFieldListRespDto {
- b, err := client.SendHttpRequest("/api/v3/set-custom-fields", fasthttp.MethodPost, reqDto)
- var response dto.CustomFieldListRespDto
+ * @summary 批量获取用户信息
+ * @description 通过用户 ID 列表,批量获取用户信息,可以选择获取自定义数据、identities、选择指定用户 ID 类型等。
+ * @param userIds 用户 ID 数组
+ * @param userIdType 用户 ID 类型,默认值为 `user_id`,可选值为:
+ * - `user_id`: Authing 用户 ID,如 `6319a1504f3xxxxf214dd5b7`
+ * - `phone`: 用户手机号
+ * - `email`: 用户邮箱
+ * - `username`: 用户名
+ * - `external_id`: 用户在外部系统的 ID,对应 Authing 用户信息的 `externalId` 字段
+ * - `identity`: 用户的外部身份源信息,格式为 `:`,其中 `` 为 Authing 身份源的 ID,`` 为用户在外部身份源的 ID。
+ * 示例值:`62f20932716fbcc10d966ee5:ou_8bae746eac07cd2564654140d2a9ac61`。
+ * - `sync_relation`: 用户的外部身份源信息,格式为 `:`,其中 `` 为同步身份源类型,如 wechatwork, lark;`` 为用户在外部身份源的 ID。
+ * 示例值:`lark:ou_8bae746eac07cd2564654140d2a9ac61`。
+ *
+ * @param withCustomData 是否获取自定义数据
+ * @param flatCustomData 是否拍平扩展字段
+ * @param withIdentities 是否获取 identities
+ * @param withDepartmentIds 是否获取部门 ID 列表
+ * @returns UserListRespDto
+*/
+func (client *ManagementClient) GetUserBatch(reqDto *dto.GetUserBatchDto) *dto.UserListRespDto {
+ b, err := client.SendHttpRequest("/api/v3/get-user-batch", fasthttp.MethodGet, reqDto)
+ var response dto.UserListRespDto
if err != nil {
fmt.Println(err)
return nil
@@ -2441,14 +2502,14 @@ func (client *ManagementClient) SetCustomFields(reqDto *dto.SetCustomFieldsReqDt
}
/*
- * @summary 设置自定义字段的值
- * @description 给用户、角色或部门设置自定义字段的值,如果存在则更新,不存在则创建。
- * @param requestBody
- * @returns IsSuccessRespDto
+* @summary 用户属性解密
+* @description 接口接收加密信息,返回解密信息
+* @param requestBody
+* @returns UserFieldDecryptRespDto
*/
-func (client *ManagementClient) SetCustomData(reqDto *dto.SetCustomDataReqDto) *dto.IsSuccessRespDto {
- b, err := client.SendHttpRequest("/api/v3/set-custom-data", fasthttp.MethodPost, reqDto)
- var response dto.IsSuccessRespDto
+func (client *ManagementClient) UserFieldDecrypt(reqDto *dto.UserFieldDecryptReqDto) *dto.UserFieldDecryptRespDto {
+ b, err := client.SendHttpRequest("/api/v3/users/field/decrypt", fasthttp.MethodPost, reqDto)
+ var response dto.UserFieldDecryptRespDto
if err != nil {
fmt.Println(err)
return nil
@@ -2462,26 +2523,14 @@ func (client *ManagementClient) SetCustomData(reqDto *dto.SetCustomDataReqDto) *
}
/*
- * @summary 获取用户、分组、角色、组织机构的自定义字段值
- * @description 通过筛选条件,获取用户、分组、角色、组织机构的自定义字段值。
- * @param targetType 目标对象类型:
- * - `USER`: 用户
- * - `ROLE`: 角色
- * - `GROUP`: 分组
- * - `DEPARTMENT`: 部门
- *
- * @param targetIdentifier 目标对象的唯一标志符:
- * - 如果是用户,为用户的 ID,如 `6343b98b7cfxxx9366e9b7c`
- * - 如果是角色,为角色的 code,如 `admin`
- * - 如果是分组,为分组的 code,如 `developer`
- * - 如果是部门,为部门的 ID,如 `6343bafc019xxxx889206c4c`
- *
- * @param namespace 所属权限分组的 code,当 targetType 为角色的时候需要填写,否则可以忽略
- * @returns GetCustomDataRespDto
+* @summary 创建用户
+* @description 创建用户,邮箱、手机号、用户名必须包含其中一个,邮箱、手机号、用户名、externalId 用户池内唯一,此接口将以管理员身份创建用户因此不需要进行手机号验证码检验等安全检测。
+* @param requestBody
+* @returns UserSingleRespDto
*/
-func (client *ManagementClient) GetCustomData(reqDto *dto.GetCustomDataDto) *dto.GetCustomDataRespDto {
- b, err := client.SendHttpRequest("/api/v3/get-custom-data", fasthttp.MethodGet, reqDto)
- var response dto.GetCustomDataRespDto
+func (client *ManagementClient) CreateUser(reqDto *dto.CreateUserReqDto) *dto.UserSingleRespDto {
+ b, err := client.SendHttpRequest("/api/v3/create-user", fasthttp.MethodPost, reqDto)
+ var response dto.UserSingleRespDto
if err != nil {
fmt.Println(err)
return nil
@@ -2495,14 +2544,14 @@ func (client *ManagementClient) GetCustomData(reqDto *dto.GetCustomDataDto) *dto
}
/*
- * @summary 创建资源
- * @description 创建资源,可以设置资源的描述、定义的操作类型、URL 标识等。
- * @param requestBody
- * @returns ResourceRespDto
+* @summary 批量创建用户
+* @description 批量创建用户,邮箱、手机号、用户名必须包含其中一个,邮箱、手机号、用户名、externalId 用户池内唯一,此接口将以管理员身份创建用户因此不需要进行手机号验证码检验等安全检测。
+* @param requestBody
+* @returns UserListRespDto
*/
-func (client *ManagementClient) CreateResource(reqDto *dto.CreateResourceDto) *dto.ResourceRespDto {
- b, err := client.SendHttpRequest("/api/v3/create-resource", fasthttp.MethodPost, reqDto)
- var response dto.ResourceRespDto
+func (client *ManagementClient) CreateUsersBatch(reqDto *dto.CreateUserBatchReqDto) *dto.UserListRespDto {
+ b, err := client.SendHttpRequest("/api/v3/create-users-batch", fasthttp.MethodPost, reqDto)
+ var response dto.UserListRespDto
if err != nil {
fmt.Println(err)
return nil
@@ -2516,14 +2565,14 @@ func (client *ManagementClient) CreateResource(reqDto *dto.CreateResourceDto) *d
}
/*
- * @summary 批量创建资源
- * @description 批量创建资源,可以设置资源的描述、定义的操作类型、URL 标识等。
- * @param requestBody
- * @returns IsSuccessRespDto
+* @summary 修改用户资料
+* @description 通过用户 ID,修改用户资料,邮箱、手机号、用户名、externalId 用户池内唯一,此接口将以管理员身份修改用户资料因此不需要进行手机号验证码检验等安全检测。
+* @param requestBody
+* @returns UserSingleRespDto
*/
-func (client *ManagementClient) CreateResourcesBatch(reqDto *dto.CreateResourcesBatchDto) *dto.IsSuccessRespDto {
- b, err := client.SendHttpRequest("/api/v3/create-resources-batch", fasthttp.MethodPost, reqDto)
- var response dto.IsSuccessRespDto
+func (client *ManagementClient) UpdateUser(reqDto *dto.UpdateUserReqDto) *dto.UserSingleRespDto {
+ b, err := client.SendHttpRequest("/api/v3/update-user", fasthttp.MethodPost, reqDto)
+ var response dto.UserSingleRespDto
if err != nil {
fmt.Println(err)
return nil
@@ -2537,15 +2586,14 @@ func (client *ManagementClient) CreateResourcesBatch(reqDto *dto.CreateResources
}
/*
- * @summary 获取资源详情
- * @description 根据筛选条件,获取资源详情。
- * @param code 资源唯一标志符
- * @param namespace 所属权限分组(权限空间)的 Code
- * @returns ResourceRespDto
+* @summary 批量修改用户资料
+* @description 批量修改用户资料,邮箱、手机号、用户名、externalId 用户池内唯一,此接口将以管理员身份修改用户资料因此不需要进行手机号验证码检验等安全检测。
+* @param requestBody
+* @returns UserListRespDto
*/
-func (client *ManagementClient) GetResource(reqDto *dto.GetResourceDto) *dto.ResourceRespDto {
- b, err := client.SendHttpRequest("/api/v3/get-resource", fasthttp.MethodGet, reqDto)
- var response dto.ResourceRespDto
+func (client *ManagementClient) UpdateUserBatch(reqDto *dto.UpdateUserBatchReqDto) *dto.UserListRespDto {
+ b, err := client.SendHttpRequest("/api/v3/update-user-batch", fasthttp.MethodPost, reqDto)
+ var response dto.UserListRespDto
if err != nil {
fmt.Println(err)
return nil
@@ -2559,15 +2607,14 @@ func (client *ManagementClient) GetResource(reqDto *dto.GetResourceDto) *dto.Res
}
/*
- * @summary 批量获取资源详情
- * @description 根据筛选条件,批量获取资源详情。
- * @param codeList 资源 code 列表,批量可以使用逗号分隔
- * @param namespace 所属权限分组(权限空间)的 Code
- * @returns ResourceListRespDto
+* @summary 批量删除用户
+* @description 通过用户 ID 列表,删除用户,支持批量删除,可以选择指定用户 ID 类型等。
+* @param requestBody
+* @returns IsSuccessRespDto
*/
-func (client *ManagementClient) GetResourcesBatch(reqDto *dto.GetResourcesBatchDto) *dto.ResourceListRespDto {
- b, err := client.SendHttpRequest("/api/v3/get-resources-batch", fasthttp.MethodGet, reqDto)
- var response dto.ResourceListRespDto
+func (client *ManagementClient) DeleteUsersBatch(reqDto *dto.DeleteUsersBatchDto) *dto.IsSuccessRespDto {
+ b, err := client.SendHttpRequest("/api/v3/delete-users-batch", fasthttp.MethodPost, reqDto)
+ var response dto.IsSuccessRespDto
if err != nil {
fmt.Println(err)
return nil
@@ -2581,17 +2628,25 @@ func (client *ManagementClient) GetResourcesBatch(reqDto *dto.GetResourcesBatchD
}
/*
- * @summary 分页获取常规资源列表
- * @description 根据筛选条件,分页获取常规资源详情列表。
- * @param page 当前页数,从 1 开始
- * @param limit 每页数目,最大不能超过 50,默认为 10
- * @param keyword 查询条件
- * @param namespaceCodeList 权限空间列表
- * @returns CommonResourcePaginatedRespDto
- */
-func (client *ManagementClient) ListCommonResource(reqDto *dto.ListCommonResourceDto) *dto.CommonResourcePaginatedRespDto {
- b, err := client.SendHttpRequest("/api/v3/list-common-resource", fasthttp.MethodGet, reqDto)
- var response dto.CommonResourcePaginatedRespDto
+ * @summary 获取用户的外部身份源
+ * @description 通过用户 ID,获取用户的外部身份源、选择指定用户 ID 类型。
+ * @param userId 用户唯一标志,可以是用户 ID、用户名、邮箱、手机号、外部 ID、在外部身份源的 ID。
+ * @param userIdType 用户 ID 类型,默认值为 `user_id`,可选值为:
+ * - `user_id`: Authing 用户 ID,如 `6319a1504f3xxxxf214dd5b7`
+ * - `phone`: 用户手机号
+ * - `email`: 用户邮箱
+ * - `username`: 用户名
+ * - `external_id`: 用户在外部系统的 ID,对应 Authing 用户信息的 `externalId` 字段
+ * - `identity`: 用户的外部身份源信息,格式为 `:`,其中 `` 为 Authing 身份源的 ID,`` 为用户在外部身份源的 ID。
+ * 示例值:`62f20932716fbcc10d966ee5:ou_8bae746eac07cd2564654140d2a9ac61`。
+ * - `sync_relation`: 用户的外部身份源信息,格式为 `:`,其中 `` 为同步身份源类型,如 wechatwork, lark;`` 为用户在外部身份源的 ID。
+ * 示例值:`lark:ou_8bae746eac07cd2564654140d2a9ac61`。
+ *
+ * @returns IdentityListRespDto
+*/
+func (client *ManagementClient) GetUserIdentities(reqDto *dto.GetUserIdentitiesDto) *dto.IdentityListRespDto {
+ b, err := client.SendHttpRequest("/api/v3/get-user-identities", fasthttp.MethodGet, reqDto)
+ var response dto.IdentityListRespDto
if err != nil {
fmt.Println(err)
return nil
@@ -2605,17 +2660,26 @@ func (client *ManagementClient) ListCommonResource(reqDto *dto.ListCommonResourc
}
/*
- * @summary 分页获取资源列表
- * @description 根据筛选条件,分页获取资源详情列表。
- * @param namespace 所属权限分组(权限空间)的 Code
- * @param type 资源类型
- * @param page 当前页数,从 1 开始
- * @param limit 每页数目,最大不能超过 50,默认为 10
- * @returns ResourcePaginatedRespDto
- */
-func (client *ManagementClient) ListResources(reqDto *dto.ListResourcesDto) *dto.ResourcePaginatedRespDto {
- b, err := client.SendHttpRequest("/api/v3/list-resources", fasthttp.MethodGet, reqDto)
- var response dto.ResourcePaginatedRespDto
+ * @summary 获取用户角色列表
+ * @description 通过用户 ID,获取用户角色列表,可以选择所属权限分组 code、选择指定用户 ID 类型等。
+ * @param userId 用户唯一标志,可以是用户 ID、用户名、邮箱、手机号、外部 ID、在外部身份源的 ID。
+ * @param userIdType 用户 ID 类型,默认值为 `user_id`,可选值为:
+ * - `user_id`: Authing 用户 ID,如 `6319a1504f3xxxxf214dd5b7`
+ * - `phone`: 用户手机号
+ * - `email`: 用户邮箱
+ * - `username`: 用户名
+ * - `external_id`: 用户在外部系统的 ID,对应 Authing 用户信息的 `externalId` 字段
+ * - `identity`: 用户的外部身份源信息,格式为 `:`,其中 `` 为 Authing 身份源的 ID,`` 为用户在外部身份源的 ID。
+ * 示例值:`62f20932716fbcc10d966ee5:ou_8bae746eac07cd2564654140d2a9ac61`。
+ * - `sync_relation`: 用户的外部身份源信息,格式为 `:`,其中 `` 为同步身份源类型,如 wechatwork, lark;`` 为用户在外部身份源的 ID。
+ * 示例值:`lark:ou_8bae746eac07cd2564654140d2a9ac61`。
+ *
+ * @param namespace 所属权限分组(权限空间)的 Code
+ * @returns RolePaginatedRespDto
+*/
+func (client *ManagementClient) GetUserRoles(reqDto *dto.GetUserRolesDto) *dto.RolePaginatedRespDto {
+ b, err := client.SendHttpRequest("/api/v3/get-user-roles", fasthttp.MethodGet, reqDto)
+ var response dto.RolePaginatedRespDto
if err != nil {
fmt.Println(err)
return nil
@@ -2629,14 +2693,25 @@ func (client *ManagementClient) ListResources(reqDto *dto.ListResourcesDto) *dto
}
/*
- * @summary 修改资源
- * @description 修改资源,可以设置资源的描述、定义的操作类型、URL 标识等。
- * @param requestBody
- * @returns ResourceRespDto
- */
-func (client *ManagementClient) UpdateResource(reqDto *dto.UpdateResourceDto) *dto.ResourceRespDto {
- b, err := client.SendHttpRequest("/api/v3/update-resource", fasthttp.MethodPost, reqDto)
- var response dto.ResourceRespDto
+ * @summary 获取用户实名认证信息
+ * @description 通过用户 ID,获取用户实名认证信息,可以选择指定用户 ID 类型。
+ * @param userId 用户唯一标志,可以是用户 ID、用户名、邮箱、手机号、外部 ID、在外部身份源的 ID。
+ * @param userIdType 用户 ID 类型,默认值为 `user_id`,可选值为:
+ * - `user_id`: Authing 用户 ID,如 `6319a1504f3xxxxf214dd5b7`
+ * - `phone`: 用户手机号
+ * - `email`: 用户邮箱
+ * - `username`: 用户名
+ * - `external_id`: 用户在外部系统的 ID,对应 Authing 用户信息的 `externalId` 字段
+ * - `identity`: 用户的外部身份源信息,格式为 `:`,其中 `` 为 Authing 身份源的 ID,`` 为用户在外部身份源的 ID。
+ * 示例值:`62f20932716fbcc10d966ee5:ou_8bae746eac07cd2564654140d2a9ac61`。
+ * - `sync_relation`: 用户的外部身份源信息,格式为 `:`,其中 `` 为同步身份源类型,如 wechatwork, lark;`` 为用户在外部身份源的 ID。
+ * 示例值:`lark:ou_8bae746eac07cd2564654140d2a9ac61`。
+ *
+ * @returns PrincipalAuthenticationInfoPaginatedRespDto
+*/
+func (client *ManagementClient) GetUserPrincipalAuthenticationInfo(reqDto *dto.GetUserPrincipalAuthenticationInfoDto) *dto.PrincipalAuthenticationInfoPaginatedRespDto {
+ b, err := client.SendHttpRequest("/api/v3/get-user-principal-authentication-info", fasthttp.MethodGet, reqDto)
+ var response dto.PrincipalAuthenticationInfoPaginatedRespDto
if err != nil {
fmt.Println(err)
return nil
@@ -2650,13 +2725,13 @@ func (client *ManagementClient) UpdateResource(reqDto *dto.UpdateResourceDto) *d
}
/*
- * @summary 删除资源
- * @description 通过资源唯一标志符以及所属权限分组,删除资源。
- * @param requestBody
- * @returns IsSuccessRespDto
+* @summary 删除用户实名认证信息
+* @description 通过用户 ID,删除用户实名认证信息,可以选择指定用户 ID 类型等。
+* @param requestBody
+* @returns IsSuccessRespDto
*/
-func (client *ManagementClient) DeleteResource(reqDto *dto.DeleteResourceDto) *dto.IsSuccessRespDto {
- b, err := client.SendHttpRequest("/api/v3/delete-resource", fasthttp.MethodPost, reqDto)
+func (client *ManagementClient) ResetUserPrincipalAuthenticationInfo(reqDto *dto.ResetUserPrincipalAuthenticationInfoDto) *dto.IsSuccessRespDto {
+ b, err := client.SendHttpRequest("/api/v3/reset-user-principal-authentication-info", fasthttp.MethodPost, reqDto)
var response dto.IsSuccessRespDto
if err != nil {
fmt.Println(err)
@@ -2671,14 +2746,31 @@ func (client *ManagementClient) DeleteResource(reqDto *dto.DeleteResourceDto) *d
}
/*
- * @summary 批量删除资源
- * @description 批量删除资源,允许通过资源 Id 列表进行批量删除,同时允许权限空间加资源 Code 列表进行批量删除,资源 Id 列表和资源 Code 列表同时必须存在一个,如果两个都存在,则以资源 Id 列表为主
- * @param requestBody
- * @returns IsSuccessRespDto
- */
-func (client *ManagementClient) DeleteResourcesBatch(reqDto *dto.DeleteResourcesBatchDto) *dto.IsSuccessRespDto {
- b, err := client.SendHttpRequest("/api/v3/delete-resources-batch", fasthttp.MethodPost, reqDto)
- var response dto.IsSuccessRespDto
+ * @summary 获取用户部门列表
+ * @description 通过用户 ID,获取用户部门列表,支持分页,可以选择获取自定义数据、选择指定用户 ID 类型、增序或降序等。
+ * @param userId 用户唯一标志,可以是用户 ID、用户名、邮箱、手机号、外部 ID、在外部身份源的 ID。
+ * @param userIdType 用户 ID 类型,默认值为 `user_id`,可选值为:
+ * - `user_id`: Authing 用户 ID,如 `6319a1504f3xxxxf214dd5b7`
+ * - `phone`: 用户手机号
+ * - `email`: 用户邮箱
+ * - `username`: 用户名
+ * - `external_id`: 用户在外部系统的 ID,对应 Authing 用户信息的 `externalId` 字段
+ * - `identity`: 用户的外部身份源信息,格式为 `:`,其中 `` 为 Authing 身份源的 ID,`` 为用户在外部身份源的 ID。
+ * 示例值:`62f20932716fbcc10d966ee5:ou_8bae746eac07cd2564654140d2a9ac61`。
+ * - `sync_relation`: 用户的外部身份源信息,格式为 `:`,其中 `` 为同步身份源类型,如 wechatwork, lark;`` 为用户在外部身份源的 ID。
+ * 示例值:`lark:ou_8bae746eac07cd2564654140d2a9ac61`。
+ *
+ * @param page 当前页数,从 1 开始
+ * @param limit 每页数目,最大不能超过 50,默认为 10
+ * @param withCustomData 是否获取自定义数据
+ * @param withDepartmentPaths 是否获取部门路径
+ * @param sortBy 排序依据,如 部门创建时间、加入部门时间、部门名称、部门标志符
+ * @param orderBy 增序或降序
+ * @returns UserDepartmentPaginatedRespDto
+*/
+func (client *ManagementClient) GetUserDepartments(reqDto *dto.GetUserDepartmentsDto) *dto.UserDepartmentPaginatedRespDto {
+ b, err := client.SendHttpRequest("/api/v3/get-user-departments", fasthttp.MethodGet, reqDto)
+ var response dto.UserDepartmentPaginatedRespDto
if err != nil {
fmt.Println(err)
return nil
@@ -2692,14 +2784,13 @@ func (client *ManagementClient) DeleteResourcesBatch(reqDto *dto.DeleteResources
}
/*
- * @deprecated
- * @summary 批量删除资源
- * @description 批量删除资源,通过资源 Id 进行批量删除。
- * @param requestBody
- * @returns IsSuccessRespDto
+* @summary 设置用户所在部门
+* @description 通过用户 ID,设置用户所在部门,可以选择指定用户 ID 类型等。
+* @param requestBody
+* @returns IsSuccessRespDto
*/
-func (client *ManagementClient) DeleteResourcesByIdBatch(reqDto *dto.DeleteCommonResourcesBatchDto) *dto.IsSuccessRespDto {
- b, err := client.SendHttpRequest("/api/v3/delete-common-resources-batch", fasthttp.MethodPost, reqDto)
+func (client *ManagementClient) SetUserDepartments(reqDto *dto.SetUserDepartmentsDto) *dto.IsSuccessRespDto {
+ b, err := client.SendHttpRequest("/api/v3/set-user-departments", fasthttp.MethodPost, reqDto)
var response dto.IsSuccessRespDto
if err != nil {
fmt.Println(err)
@@ -2714,14 +2805,25 @@ func (client *ManagementClient) DeleteResourcesByIdBatch(reqDto *dto.DeleteCommo
}
/*
- * @summary 关联/取消关联应用资源到租户
- * @description 通过资源唯一标识以及权限分组,关联或取消关联资源到租户
- * @param requestBody
- * @returns IsSuccessRespDto
- */
-func (client *ManagementClient) AssociateTenantResource(reqDto *dto.AssociateTenantResourceDto) *dto.IsSuccessRespDto {
- b, err := client.SendHttpRequest("/api/v3/associate-tenant-resource", fasthttp.MethodPost, reqDto)
- var response dto.IsSuccessRespDto
+ * @summary 获取用户分组列表
+ * @description 通过用户 ID,获取用户分组列表,可以选择指定用户 ID 类型等。
+ * @param userId 用户唯一标志,可以是用户 ID、用户名、邮箱、手机号、外部 ID、在外部身份源的 ID。
+ * @param userIdType 用户 ID 类型,默认值为 `user_id`,可选值为:
+ * - `user_id`: Authing 用户 ID,如 `6319a1504f3xxxxf214dd5b7`
+ * - `phone`: 用户手机号
+ * - `email`: 用户邮箱
+ * - `username`: 用户名
+ * - `external_id`: 用户在外部系统的 ID,对应 Authing 用户信息的 `externalId` 字段
+ * - `identity`: 用户的外部身份源信息,格式为 `:`,其中 `` 为 Authing 身份源的 ID,`` 为用户在外部身份源的 ID。
+ * 示例值:`62f20932716fbcc10d966ee5:ou_8bae746eac07cd2564654140d2a9ac61`。
+ * - `sync_relation`: 用户的外部身份源信息,格式为 `:`,其中 `` 为同步身份源类型,如 wechatwork, lark;`` 为用户在外部身份源的 ID。
+ * 示例值:`lark:ou_8bae746eac07cd2564654140d2a9ac61`。
+ *
+ * @returns GroupPaginatedRespDto
+*/
+func (client *ManagementClient) GetUserGroups(reqDto *dto.GetUserGroupsDto) *dto.GroupPaginatedRespDto {
+ b, err := client.SendHttpRequest("/api/v3/get-user-groups", fasthttp.MethodGet, reqDto)
+ var response dto.GroupPaginatedRespDto
if err != nil {
fmt.Println(err)
return nil
@@ -2735,14 +2837,25 @@ func (client *ManagementClient) AssociateTenantResource(reqDto *dto.AssociateTen
}
/*
- * @summary 创建权限分组
- * @description 创建权限分组,可以设置权限分组名称、Code 和描述信息。
- * @param requestBody
- * @returns NamespaceRespDto
- */
-func (client *ManagementClient) CreateNamespace(reqDto *dto.CreateNamespaceDto) *dto.NamespaceRespDto {
- b, err := client.SendHttpRequest("/api/v3/create-namespace", fasthttp.MethodPost, reqDto)
- var response dto.NamespaceRespDto
+ * @summary 获取用户 MFA 绑定信息
+ * @description 通过用户 ID,获取用户 MFA 绑定信息,可以选择指定用户 ID 类型等。
+ * @param userId 用户唯一标志,可以是用户 ID、用户名、邮箱、手机号、外部 ID、在外部身份源的 ID。
+ * @param userIdType 用户 ID 类型,默认值为 `user_id`,可选值为:
+ * - `user_id`: Authing 用户 ID,如 `6319a1504f3xxxxf214dd5b7`
+ * - `phone`: 用户手机号
+ * - `email`: 用户邮箱
+ * - `username`: 用户名
+ * - `external_id`: 用户在外部系统的 ID,对应 Authing 用户信息的 `externalId` 字段
+ * - `identity`: 用户的外部身份源信息,格式为 `:`,其中 `` 为 Authing 身份源的 ID,`` 为用户在外部身份源的 ID。
+ * 示例值:`62f20932716fbcc10d966ee5:ou_8bae746eac07cd2564654140d2a9ac61`。
+ * - `sync_relation`: 用户的外部身份源信息,格式为 `:`,其中 `` 为同步身份源类型,如 wechatwork, lark;`` 为用户在外部身份源的 ID。
+ * 示例值:`lark:ou_8bae746eac07cd2564654140d2a9ac61`。
+ *
+ * @returns UserMfaSingleRespDto
+*/
+func (client *ManagementClient) GetUserMfaInfo(reqDto *dto.GetUserMfaInfoDto) *dto.UserMfaSingleRespDto {
+ b, err := client.SendHttpRequest("/api/v3/get-user-mfa-info", fasthttp.MethodGet, reqDto)
+ var response dto.UserMfaSingleRespDto
if err != nil {
fmt.Println(err)
return nil
@@ -2756,14 +2869,16 @@ func (client *ManagementClient) CreateNamespace(reqDto *dto.CreateNamespaceDto)
}
/*
- * @summary 批量创建权限分组
- * @description 批量创建权限分组,可以分别设置权限分组名称、Code 和描述信息。
- * @param requestBody
- * @returns IsSuccessRespDto
+* @summary 获取已归档的用户列表
+* @description 获取已归档的用户列表,支持分页,可以筛选开始时间等。
+* @param page 当前页数,从 1 开始
+* @param limit 每页数目,最大不能超过 50,默认为 10
+* @param startAt 开始时间,为精确到秒的 UNIX 时间戳,默认不指定
+* @returns ListArchivedUsersSingleRespDto
*/
-func (client *ManagementClient) CreateNamespacesBatch(reqDto *dto.CreateNamespacesBatchDto) *dto.IsSuccessRespDto {
- b, err := client.SendHttpRequest("/api/v3/create-namespaces-batch", fasthttp.MethodPost, reqDto)
- var response dto.IsSuccessRespDto
+func (client *ManagementClient) ListArchivedUsers(reqDto *dto.ListArchivedUsersDto) *dto.ListArchivedUsersSingleRespDto {
+ b, err := client.SendHttpRequest("/api/v3/list-archived-users", fasthttp.MethodGet, reqDto)
+ var response dto.ListArchivedUsersSingleRespDto
if err != nil {
fmt.Println(err)
return nil
@@ -2777,14 +2892,14 @@ func (client *ManagementClient) CreateNamespacesBatch(reqDto *dto.CreateNamespac
}
/*
- * @summary 获取权限分组详情
- * @description 通过权限分组唯一标志符(Code),获取权限分组详情。
- * @param code 权限分组唯一标志符
- * @returns NamespaceRespDto
+* @summary 强制下线用户
+* @description 通过用户 ID、App ID 列表,强制让用户下线,可以选择指定用户 ID 类型等。
+* @param requestBody
+* @returns IsSuccessRespDto
*/
-func (client *ManagementClient) GetNamespace(reqDto *dto.GetNamespaceDto) *dto.NamespaceRespDto {
- b, err := client.SendHttpRequest("/api/v3/get-namespace", fasthttp.MethodGet, reqDto)
- var response dto.NamespaceRespDto
+func (client *ManagementClient) KickUsers(reqDto *dto.KickUsersDto) *dto.IsSuccessRespDto {
+ b, err := client.SendHttpRequest("/api/v3/kick-users", fasthttp.MethodPost, reqDto)
+ var response dto.IsSuccessRespDto
if err != nil {
fmt.Println(err)
return nil
@@ -2798,14 +2913,14 @@ func (client *ManagementClient) GetNamespace(reqDto *dto.GetNamespaceDto) *dto.N
}
/*
- * @summary 批量获取权限分组详情
- * @description 分别通过权限分组唯一标志符(Code),批量获取权限分组详情。
- * @param codeList 权限分组 code 列表,批量可以使用逗号分隔
- * @returns NamespaceListRespDto
+* @summary 判断用户是否存在
+* @description 根据条件判断用户是否存在,可以筛选用户名、邮箱、手机号、第三方外部 ID 等。
+* @param requestBody
+* @returns IsUserExistsRespDto
*/
-func (client *ManagementClient) GetNamespacesBatch(reqDto *dto.GetNamespacesBatchDto) *dto.NamespaceListRespDto {
- b, err := client.SendHttpRequest("/api/v3/get-namespaces-batch", fasthttp.MethodGet, reqDto)
- var response dto.NamespaceListRespDto
+func (client *ManagementClient) IsUserExists(reqDto *dto.IsUserExistsReqDto) *dto.IsUserExistsRespDto {
+ b, err := client.SendHttpRequest("/api/v3/is-user-exists", fasthttp.MethodPost, reqDto)
+ var response dto.IsUserExistsRespDto
if err != nil {
fmt.Println(err)
return nil
@@ -2819,14 +2934,25 @@ func (client *ManagementClient) GetNamespacesBatch(reqDto *dto.GetNamespacesBatc
}
/*
- * @summary 修改权限分组信息
- * @description 修改权限分组信息,可以修改名称、描述信息以及新的唯一标志符(NewCode)。
- * @param requestBody
- * @returns UpdateNamespaceRespDto
- */
-func (client *ManagementClient) UpdateNamespace(reqDto *dto.UpdateNamespaceDto) *dto.UpdateNamespaceRespDto {
- b, err := client.SendHttpRequest("/api/v3/update-namespace", fasthttp.MethodPost, reqDto)
- var response dto.UpdateNamespaceRespDto
+ * @summary 获取用户可访问的应用
+ * @description 通过用户 ID,获取用户可访问的应用,可以选择指定用户 ID 类型等。
+ * @param userId 用户唯一标志,可以是用户 ID、用户名、邮箱、手机号、外部 ID、在外部身份源的 ID。
+ * @param userIdType 用户 ID 类型,默认值为 `user_id`,可选值为:
+ * - `user_id`: Authing 用户 ID,如 `6319a1504f3xxxxf214dd5b7`
+ * - `phone`: 用户手机号
+ * - `email`: 用户邮箱
+ * - `username`: 用户名
+ * - `external_id`: 用户在外部系统的 ID,对应 Authing 用户信息的 `externalId` 字段
+ * - `identity`: 用户的外部身份源信息,格式为 `:`,其中 `` 为 Authing 身份源的 ID,`` 为用户在外部身份源的 ID。
+ * 示例值:`62f20932716fbcc10d966ee5:ou_8bae746eac07cd2564654140d2a9ac61`。
+ * - `sync_relation`: 用户的外部身份源信息,格式为 `:`,其中 `` 为同步身份源类型,如 wechatwork, lark;`` 为用户在外部身份源的 ID。
+ * 示例值:`lark:ou_8bae746eac07cd2564654140d2a9ac61`。
+ *
+ * @returns AppListRespDto
+*/
+func (client *ManagementClient) GetUserAccessibleApps(reqDto *dto.GetUserAccessibleAppsDto) *dto.AppListRespDto {
+ b, err := client.SendHttpRequest("/api/v3/get-user-accessible-apps", fasthttp.MethodGet, reqDto)
+ var response dto.AppListRespDto
if err != nil {
fmt.Println(err)
return nil
@@ -2840,14 +2966,25 @@ func (client *ManagementClient) UpdateNamespace(reqDto *dto.UpdateNamespaceDto)
}
/*
- * @summary 删除权限分组信息
- * @description 通过权限分组唯一标志符(Code),删除权限分组信息。
- * @param requestBody
- * @returns IsSuccessRespDto
- */
-func (client *ManagementClient) DeleteNamespace(reqDto *dto.DeleteNamespaceDto) *dto.IsSuccessRespDto {
- b, err := client.SendHttpRequest("/api/v3/delete-namespace", fasthttp.MethodPost, reqDto)
- var response dto.IsSuccessRespDto
+ * @summary 获取用户授权的应用
+ * @description 通过用户 ID,获取用户授权的应用,可以选择指定用户 ID 类型等。
+ * @param userId 用户唯一标志,可以是用户 ID、用户名、邮箱、手机号、外部 ID、在外部身份源的 ID。
+ * @param userIdType 用户 ID 类型,默认值为 `user_id`,可选值为:
+ * - `user_id`: Authing 用户 ID,如 `6319a1504f3xxxxf214dd5b7`
+ * - `phone`: 用户手机号
+ * - `email`: 用户邮箱
+ * - `username`: 用户名
+ * - `external_id`: 用户在外部系统的 ID,对应 Authing 用户信息的 `externalId` 字段
+ * - `identity`: 用户的外部身份源信息,格式为 `:`,其中 `` 为 Authing 身份源的 ID,`` 为用户在外部身份源的 ID。
+ * 示例值:`62f20932716fbcc10d966ee5:ou_8bae746eac07cd2564654140d2a9ac61`。
+ * - `sync_relation`: 用户的外部身份源信息,格式为 `:`,其中 `` 为同步身份源类型,如 wechatwork, lark;`` 为用户在外部身份源的 ID。
+ * 示例值:`lark:ou_8bae746eac07cd2564654140d2a9ac61`。
+ *
+ * @returns AppListRespDto
+*/
+func (client *ManagementClient) GetUserAuthorizedApps(reqDto *dto.GetUserAuthorizedAppsDto) *dto.AppListRespDto {
+ b, err := client.SendHttpRequest("/api/v3/get-user-authorized-apps", fasthttp.MethodGet, reqDto)
+ var response dto.AppListRespDto
if err != nil {
fmt.Println(err)
return nil
@@ -2861,14 +2998,14 @@ func (client *ManagementClient) DeleteNamespace(reqDto *dto.DeleteNamespaceDto)
}
/*
- * @summary 批量删除权限分组
- * @description 分别通过权限分组唯一标志符(Code),批量删除权限分组。
- * @param requestBody
- * @returns IsSuccessRespDto
+* @summary 判断用户是否有某个角色
+* @description 通过用户 ID,判断用户是否有某个角色,支持传入多个角色,可以选择指定用户 ID 类型等。
+* @param requestBody
+* @returns HasAnyRoleRespDto
*/
-func (client *ManagementClient) DeleteNamespacesBatch(reqDto *dto.DeleteNamespacesBatchDto) *dto.IsSuccessRespDto {
- b, err := client.SendHttpRequest("/api/v3/delete-namespaces-batch", fasthttp.MethodPost, reqDto)
- var response dto.IsSuccessRespDto
+func (client *ManagementClient) HasAnyRole(reqDto *dto.HasAnyRoleReqDto) *dto.HasAnyRoleRespDto {
+ b, err := client.SendHttpRequest("/api/v3/has-any-role", fasthttp.MethodPost, reqDto)
+ var response dto.HasAnyRoleRespDto
if err != nil {
fmt.Println(err)
return nil
@@ -2882,16 +3019,31 @@ func (client *ManagementClient) DeleteNamespacesBatch(reqDto *dto.DeleteNamespac
}
/*
- * @summary 分页获取权限分组列表
- * @description 根据筛选条件,分页获取权限分组列表。
- * @param page 当前页数,从 1 开始
- * @param limit 每页数目,最大不能超过 50,默认为 10
- * @param keywords 搜索权限分组 Code
- * @returns NamespaceListPaginatedRespDto
- */
-func (client *ManagementClient) ListNamespaces(reqDto *dto.ListNamespacesDto) *dto.NamespaceListPaginatedRespDto {
- b, err := client.SendHttpRequest("/api/v3/list-namespaces", fasthttp.MethodGet, reqDto)
- var response dto.NamespaceListPaginatedRespDto
+ * @summary 获取用户的登录历史记录
+ * @description 通过用户 ID,获取用户登录历史记录,支持分页,可以选择指定用户 ID 类型、应用 ID、开始与结束时间戳等。
+ * @param userId 用户唯一标志,可以是用户 ID、用户名、邮箱、手机号、外部 ID、在外部身份源的 ID。
+ * @param userIdType 用户 ID 类型,默认值为 `user_id`,可选值为:
+ * - `user_id`: Authing 用户 ID,如 `6319a1504f3xxxxf214dd5b7`
+ * - `phone`: 用户手机号
+ * - `email`: 用户邮箱
+ * - `username`: 用户名
+ * - `external_id`: 用户在外部系统的 ID,对应 Authing 用户信息的 `externalId` 字段
+ * - `identity`: 用户的外部身份源信息,格式为 `:`,其中 `` 为 Authing 身份源的 ID,`` 为用户在外部身份源的 ID。
+ * 示例值:`62f20932716fbcc10d966ee5:ou_8bae746eac07cd2564654140d2a9ac61`。
+ * - `sync_relation`: 用户的外部身份源信息,格式为 `:`,其中 `` 为同步身份源类型,如 wechatwork, lark;`` 为用户在外部身份源的 ID。
+ * 示例值:`lark:ou_8bae746eac07cd2564654140d2a9ac61`。
+ *
+ * @param appId 应用 ID
+ * @param clientIp 客户端 IP
+ * @param start 开始时间戳(毫秒)
+ * @param end 结束时间戳(毫秒)
+ * @param page 当前页数,从 1 开始
+ * @param limit 每页数目,最大不能超过 50,默认为 10
+ * @returns UserLoginHistoryPaginatedRespDto
+*/
+func (client *ManagementClient) GetUserLoginHistory(reqDto *dto.GetUserLoginHistoryDto) *dto.UserLoginHistoryPaginatedRespDto {
+ b, err := client.SendHttpRequest("/api/v3/get-user-login-history", fasthttp.MethodGet, reqDto)
+ var response dto.UserLoginHistoryPaginatedRespDto
if err != nil {
fmt.Println(err)
return nil
@@ -2905,17 +3057,25 @@ func (client *ManagementClient) ListNamespaces(reqDto *dto.ListNamespacesDto) *d
}
/*
- * @summary 分页权限分组下所有的角色列表
- * @description 根据筛选条件,分页获取权限分组下所有的角色列表。
- * @param code 权限分组唯一标志符
- * @param page 当前页数,从 1 开始
- * @param limit 每页数目,最大不能超过 50,默认为 10
- * @param keywords 角色 Code 或者名称
- * @returns NamespaceRolesListPaginatedRespDto
- */
-func (client *ManagementClient) ListNamespaceRoles(reqDto *dto.ListNamespaceRolesDto) *dto.NamespaceRolesListPaginatedRespDto {
- b, err := client.SendHttpRequest("/api/v3/list-namespace-roles", fasthttp.MethodGet, reqDto)
- var response dto.NamespaceRolesListPaginatedRespDto
+ * @summary 获取用户曾经登录过的应用
+ * @description 通过用户 ID,获取用户曾经登录过的应用,可以选择指定用户 ID 类型等。
+ * @param userId 用户唯一标志,可以是用户 ID、用户名、邮箱、手机号、外部 ID、在外部身份源的 ID。
+ * @param userIdType 用户 ID 类型,默认值为 `user_id`,可选值为:
+ * - `user_id`: Authing 用户 ID,如 `6319a1504f3xxxxf214dd5b7`
+ * - `phone`: 用户手机号
+ * - `email`: 用户邮箱
+ * - `username`: 用户名
+ * - `external_id`: 用户在外部系统的 ID,对应 Authing 用户信息的 `externalId` 字段
+ * - `identity`: 用户的外部身份源信息,格式为 `:`,其中 `` 为 Authing 身份源的 ID,`` 为用户在外部身份源的 ID。
+ * 示例值:`62f20932716fbcc10d966ee5:ou_8bae746eac07cd2564654140d2a9ac61`。
+ * - `sync_relation`: 用户的外部身份源信息,格式为 `:`,其中 `` 为同步身份源类型,如 wechatwork, lark;`` 为用户在外部身份源的 ID。
+ * 示例值:`lark:ou_8bae746eac07cd2564654140d2a9ac61`。
+ *
+ * @returns UserLoggedInAppsListRespDto
+*/
+func (client *ManagementClient) GetUserLoggedinApps(reqDto *dto.GetUserLoggedinAppsDto) *dto.UserLoggedInAppsListRespDto {
+ b, err := client.SendHttpRequest("/api/v3/get-user-loggedin-apps", fasthttp.MethodGet, reqDto)
+ var response dto.UserLoggedInAppsListRespDto
if err != nil {
fmt.Println(err)
return nil
@@ -2929,14 +3089,25 @@ func (client *ManagementClient) ListNamespaceRoles(reqDto *dto.ListNamespaceRole
}
/*
- * @summary 授权资源
- * @description 将一个/多个资源授权给用户、角色、分组、组织机构等主体,且可以分别指定不同的操作权限。
- * @param requestBody
- * @returns IsSuccessRespDto
- */
-func (client *ManagementClient) AuthorizeResources(reqDto *dto.AuthorizeResourcesDto) *dto.IsSuccessRespDto {
- b, err := client.SendHttpRequest("/api/v3/authorize-resources", fasthttp.MethodPost, reqDto)
- var response dto.IsSuccessRespDto
+ * @summary 获取用户曾经登录过的身份源
+ * @description 通过用户 ID,获取用户曾经登录过的身份源,可以选择指定用户 ID 类型等。
+ * @param userId 用户唯一标志,可以是用户 ID、用户名、邮箱、手机号、外部 ID、在外部身份源的 ID。
+ * @param userIdType 用户 ID 类型,默认值为 `user_id`,可选值为:
+ * - `user_id`: Authing 用户 ID,如 `6319a1504f3xxxxf214dd5b7`
+ * - `phone`: 用户手机号
+ * - `email`: 用户邮箱
+ * - `username`: 用户名
+ * - `external_id`: 用户在外部系统的 ID,对应 Authing 用户信息的 `externalId` 字段
+ * - `identity`: 用户的外部身份源信息,格式为 `:`,其中 `` 为 Authing 身份源的 ID,`` 为用户在外部身份源的 ID。
+ * 示例值:`62f20932716fbcc10d966ee5:ou_8bae746eac07cd2564654140d2a9ac61`。
+ * - `sync_relation`: 用户的外部身份源信息,格式为 `:`,其中 `` 为同步身份源类型,如 wechatwork, lark;`` 为用户在外部身份源的 ID。
+ * 示例值:`lark:ou_8bae746eac07cd2564654140d2a9ac61`。
+ *
+ * @returns UserLoggedInIdentitiesRespDto
+*/
+func (client *ManagementClient) GetUserLoggedinIdentities(reqDto *dto.GetUserLoggedInIdentitiesDto) *dto.UserLoggedInIdentitiesRespDto {
+ b, err := client.SendHttpRequest("/api/v3/get-user-logged-in-identities", fasthttp.MethodGet, reqDto)
+ var response dto.UserLoggedInIdentitiesRespDto
if err != nil {
fmt.Println(err)
return nil
@@ -2950,29 +3121,20 @@ func (client *ManagementClient) AuthorizeResources(reqDto *dto.AuthorizeResource
}
/*
- * @summary 获取某个主体被授权的资源列表
- * @description 根据筛选条件,获取某个主体被授权的资源列表。
- * @param targetType 目标对象类型:
- * - `USER`: 用户
- * - `ROLE`: 角色
- * - `GROUP`: 分组
- * - `DEPARTMENT`: 部门
+ * @summary 离职用户
+ * @description 离职用户。离职操作会进行以下操作:
*
- * @param targetIdentifier 目标对象的唯一标志符:
- * - 如果是用户,为用户的 ID,如 `6343b98b7cfxxx9366e9b7c`
- * - 如果是角色,为角色的 code,如 `admin`
- * - 如果是分组,为分组的 code,如 `developer`
- * - 如果是部门,为部门的 ID,如 `6343bafc019xxxx889206c4c`
+ * - 离职后该成员授权、部门、角色、分组、岗位关系将被删除;
+ * - 离职后将保留用户基本信息,同时账号将被禁用,无法登录应用;如果需要彻底删除账号,请调用删除接口。
*
- * @param namespace 所属权限分组(权限空间)的 Code
- * @param resourceType 限定资源类型,如数据、API、按钮、菜单
- * @param resourceList 限定查询的资源列表,如果指定,只会返回所指定的资源列表。
- * @param withDenied 是否获取被拒绝的资源
- * @returns AuthorizedResourcePaginatedRespDto
- */
-func (client *ManagementClient) GetAuthorizedResources(reqDto *dto.GetAuthorizedResourcesDto) *dto.AuthorizedResourcePaginatedRespDto {
- b, err := client.SendHttpRequest("/api/v3/get-authorized-resources", fasthttp.MethodGet, reqDto)
- var response dto.AuthorizedResourcePaginatedRespDto
+ * 该操作不可恢复,请谨慎操作!
+ *
+ * @param requestBody
+ * @returns ResignUserRespDto
+*/
+func (client *ManagementClient) ResignUser(reqDto *dto.ResignUserReqDto) *dto.ResignUserRespDto {
+ b, err := client.SendHttpRequest("/api/v3/resign-user", fasthttp.MethodPost, reqDto)
+ var response dto.ResignUserRespDto
if err != nil {
fmt.Println(err)
return nil
@@ -2986,14 +3148,20 @@ func (client *ManagementClient) GetAuthorizedResources(reqDto *dto.GetAuthorized
}
/*
- * @summary 判断用户是否对某个资源的某个操作有权限
- * @description 判断用户是否对某个资源的某个操作有权限。
- * @param requestBody
- * @returns IsActionAllowedRespDtp
- */
-func (client *ManagementClient) IsActionAllowed(reqDto *dto.IsActionAllowedDto) *dto.IsActionAllowedRespDtp {
- b, err := client.SendHttpRequest("/api/v3/is-action-allowed", fasthttp.MethodPost, reqDto)
- var response dto.IsActionAllowedRespDtp
+ * @summary 批量离职用户
+ * @description 批量离职用户。离职操作会进行以下操作:
+ *
+ * - 离职后该成员授权、部门、角色、分组、岗位关系将被删除;
+ * - 离职后将保留用户基本信息,同时账号将被禁用,无法登录应用;如果需要彻底删除账号,请调用删除接口。
+ *
+ * 该操作不可恢复,请谨慎操作!
+ *
+ * @param requestBody
+ * @returns ResignUserRespDto
+*/
+func (client *ManagementClient) ResignUserBatch(reqDto *dto.ResignUserBatchReqDto) *dto.ResignUserRespDto {
+ b, err := client.SendHttpRequest("/api/v3/resign-user-batch", fasthttp.MethodPost, reqDto)
+ var response dto.ResignUserRespDto
if err != nil {
fmt.Println(err)
return nil
@@ -3007,14 +3175,27 @@ func (client *ManagementClient) IsActionAllowed(reqDto *dto.IsActionAllowedDto)
}
/*
- * @summary 获取资源被授权的主体
- * @description 获取资源被授权的主体
- * @param requestBody
- * @returns GetResourceAuthorizedTargetRespDto
- */
-func (client *ManagementClient) GetResourceAuthorizedTargets(reqDto *dto.GetResourceAuthorizedTargetsDto) *dto.GetResourceAuthorizedTargetRespDto {
- b, err := client.SendHttpRequest("/api/v3/get-resource-authorized-targets", fasthttp.MethodPost, reqDto)
- var response dto.GetResourceAuthorizedTargetRespDto
+ * @summary 获取用户被授权的所有资源
+ * @description 通过用户 ID,获取用户被授权的所有资源,可以选择指定用户 ID 类型等,用户被授权的资源是用户自身被授予、通过分组继承、通过角色继承、通过组织机构继承的集合。
+ * @param userId 用户唯一标志,可以是用户 ID、用户名、邮箱、手机号、外部 ID、在外部身份源的 ID。
+ * @param userIdType 用户 ID 类型,默认值为 `user_id`,可选值为:
+ * - `user_id`: Authing 用户 ID,如 `6319a1504f3xxxxf214dd5b7`
+ * - `phone`: 用户手机号
+ * - `email`: 用户邮箱
+ * - `username`: 用户名
+ * - `external_id`: 用户在外部系统的 ID,对应 Authing 用户信息的 `externalId` 字段
+ * - `identity`: 用户的外部身份源信息,格式为 `:`,其中 `` 为 Authing 身份源的 ID,`` 为用户在外部身份源的 ID。
+ * 示例值:`62f20932716fbcc10d966ee5:ou_8bae746eac07cd2564654140d2a9ac61`。
+ * - `sync_relation`: 用户的外部身份源信息,格式为 `:`,其中 `` 为同步身份源类型,如 wechatwork, lark;`` 为用户在外部身份源的 ID。
+ * 示例值:`lark:ou_8bae746eac07cd2564654140d2a9ac61`。
+ *
+ * @param namespace 所属权限分组(权限空间)的 Code
+ * @param resourceType 资源类型,如 数据、API、菜单、按钮
+ * @returns AuthorizedResourcePaginatedRespDto
+*/
+func (client *ManagementClient) GetUserAuthorizedResources(reqDto *dto.GetUserAuthorizedResourcesDto) *dto.AuthorizedResourcePaginatedRespDto {
+ b, err := client.SendHttpRequest("/api/v3/get-user-authorized-resources", fasthttp.MethodGet, reqDto)
+ var response dto.AuthorizedResourcePaginatedRespDto
if err != nil {
fmt.Println(err)
return nil
@@ -3028,14 +3209,14 @@ func (client *ManagementClient) GetResourceAuthorizedTargets(reqDto *dto.GetReso
}
/*
- * @summary 获取同步任务详情
- * @description 获取同步任务详情
- * @param syncTaskId 同步任务 ID
- * @returns SyncTaskSingleRespDto
+* @summary 检查某个用户在应用下是否具备 Session 登录态
+* @description 检查某个用户在应用下是否具备 Session 登录态
+* @param requestBody
+* @returns CheckSessionStatusRespDto
*/
-func (client *ManagementClient) GetSyncTask(reqDto *dto.GetSyncTaskDto) *dto.SyncTaskSingleRespDto {
- b, err := client.SendHttpRequest("/api/v3/get-sync-task", fasthttp.MethodGet, reqDto)
- var response dto.SyncTaskSingleRespDto
+func (client *ManagementClient) CheckSessionStatus(reqDto *dto.CheckSessionStatusDto) *dto.CheckSessionStatusRespDto {
+ b, err := client.SendHttpRequest("/api/v3/check-session-status", fasthttp.MethodPost, reqDto)
+ var response dto.CheckSessionStatusRespDto
if err != nil {
fmt.Println(err)
return nil
@@ -3049,15 +3230,14 @@ func (client *ManagementClient) GetSyncTask(reqDto *dto.GetSyncTaskDto) *dto.Syn
}
/*
- * @summary 获取同步任务列表
- * @description 获取同步任务列表
- * @param page 当前页数,从 1 开始
- * @param limit 每页数目,最大不能超过 50,默认为 10
- * @returns SyncTaskPaginatedRespDto
+* @summary 导入用户的 OTP
+* @description 导入用户的 OTP
+* @param requestBody
+* @returns CommonResponseDto
*/
-func (client *ManagementClient) ListSyncTasks(reqDto *dto.ListSyncTasksDto) *dto.SyncTaskPaginatedRespDto {
- b, err := client.SendHttpRequest("/api/v3/list-sync-tasks", fasthttp.MethodGet, reqDto)
- var response dto.SyncTaskPaginatedRespDto
+func (client *ManagementClient) ImportOtp(reqDto *dto.ImportOtpReqDto) *dto.CommonResponseDto {
+ b, err := client.SendHttpRequest("/api/v3/import-otp", fasthttp.MethodPost, reqDto)
+ var response dto.CommonResponseDto
if err != nil {
fmt.Println(err)
return nil
@@ -3071,14 +3251,25 @@ func (client *ManagementClient) ListSyncTasks(reqDto *dto.ListSyncTasksDto) *dto
}
/*
- * @summary 创建同步任务
- * @description 创建同步任务
- * @param requestBody
- * @returns SyncTaskPaginatedRespDto
- */
-func (client *ManagementClient) CreateSyncTask(reqDto *dto.CreateSyncTaskDto) *dto.SyncTaskPaginatedRespDto {
- b, err := client.SendHttpRequest("/api/v3/create-sync-task", fasthttp.MethodPost, reqDto)
- var response dto.SyncTaskPaginatedRespDto
+ * @summary 获取用户绑定 OTP 的秘钥
+ * @description 通过用户 ID,获取用户绑定 OTP 的秘钥。可以选择指定用户 ID 类型等。
+ * @param userId 用户 ID
+ * @param userIdType 用户 ID 类型,默认值为 `user_id`,可选值为:
+ * - `user_id`: Authing 用户 ID,如 `6319a1504f3xxxxf214dd5b7`
+ * - `phone`: 用户手机号
+ * - `email`: 用户邮箱
+ * - `username`: 用户名
+ * - `external_id`: 用户在外部系统的 ID,对应 Authing 用户信息的 `externalId` 字段
+ * - `identity`: 用户的外部身份源信息,格式为 `:`,其中 `` 为 Authing 身份源的 ID,`` 为用户在外部身份源的 ID。
+ * 示例值:`62f20932716fbcc10d966ee5:ou_8bae746eac07cd2564654140d2a9ac61`。
+ * - `sync_relation`: 用户的外部身份源信息,格式为 `:`,其中 `` 为同步身份源类型,如 wechatwork, lark;`` 为用户在外部身份源的 ID。
+ * 示例值:`lark:ou_8bae746eac07cd2564654140d2a9ac61`。
+ *
+ * @returns GetOtpSecretRespDto
+*/
+func (client *ManagementClient) GetOtpSecretByUser(reqDto *dto.GetOtpSecretByUserDto) *dto.GetOtpSecretRespDto {
+ b, err := client.SendHttpRequest("/api/v3/get-otp-secret-by-user", fasthttp.MethodGet, reqDto)
+ var response dto.GetOtpSecretRespDto
if err != nil {
fmt.Println(err)
return nil
@@ -3092,14 +3283,14 @@ func (client *ManagementClient) CreateSyncTask(reqDto *dto.CreateSyncTaskDto) *d
}
/*
- * @summary 修改同步任务
- * @description 修改同步任务
- * @param requestBody
- * @returns SyncTaskPaginatedRespDto
+* @summary 获取用户自定义加密的密码
+* @description 此功能主要是用户在控制台配置加基于 RSA、SM2 等加密的密钥后,加密用户的密码。
+* @param requestBody
+* @returns GetUserPasswordCiphertextRespDto
*/
-func (client *ManagementClient) UpdateSyncTask(reqDto *dto.UpdateSyncTaskDto) *dto.SyncTaskPaginatedRespDto {
- b, err := client.SendHttpRequest("/api/v3/update-sync-task", fasthttp.MethodPost, reqDto)
- var response dto.SyncTaskPaginatedRespDto
+func (client *ManagementClient) GetUserPasswordCiphertext(reqDto *dto.GetUserPasswordCiphertextDto) *dto.GetUserPasswordCiphertextRespDto {
+ b, err := client.SendHttpRequest("/api/v3/get-user-password-ciphertext", fasthttp.MethodPost, reqDto)
+ var response dto.GetUserPasswordCiphertextRespDto
if err != nil {
fmt.Println(err)
return nil
@@ -3113,14 +3304,14 @@ func (client *ManagementClient) UpdateSyncTask(reqDto *dto.UpdateSyncTaskDto) *d
}
/*
- * @summary 执行同步任务
- * @description 执行同步任务
- * @param requestBody
- * @returns TriggerSyncTaskRespDto
+* @summary 给用户绑定一个身份信息
+* @description 用户池管理员手动将来自外部身份源的身份信息绑定到用户上。绑定完成后,可以用执行过绑定操作的身份源登录到对应的 Authing 用户。
+* @param requestBody
+* @returns LinkIdentityResDto
*/
-func (client *ManagementClient) TriggerSyncTask(reqDto *dto.TriggerSyncTaskDto) *dto.TriggerSyncTaskRespDto {
- b, err := client.SendHttpRequest("/api/v3/trigger-sync-task", fasthttp.MethodPost, reqDto)
- var response dto.TriggerSyncTaskRespDto
+func (client *ManagementClient) LinkIdentity(reqDto *dto.LinkIdentityDto) *dto.LinkIdentityResDto {
+ b, err := client.SendHttpRequest("/api/v3/link-identity", fasthttp.MethodPost, reqDto)
+ var response dto.LinkIdentityResDto
if err != nil {
fmt.Println(err)
return nil
@@ -3134,14 +3325,14 @@ func (client *ManagementClient) TriggerSyncTask(reqDto *dto.TriggerSyncTaskDto)
}
/*
- * @summary 获取同步作业详情
- * @description 获取同步作业详情
- * @param syncJobId 同步作业 ID
- * @returns SyncJobSingleRespDto
+* @summary 解除绑定用户在身份源下的所有身份信息
+* @description 解除绑定用户在某个身份源下的所有身份信息。解绑后,将无法使用执行过解绑操作的身份源登录到对应的 Authing 用户,除非重新绑定身份信息。
+* @param requestBody
+* @returns UnlinkIdentityResDto
*/
-func (client *ManagementClient) GetSyncJob(reqDto *dto.GetSyncJobDto) *dto.SyncJobSingleRespDto {
- b, err := client.SendHttpRequest("/api/v3/get-sync-job", fasthttp.MethodGet, reqDto)
- var response dto.SyncJobSingleRespDto
+func (client *ManagementClient) UnlinkIdentity(reqDto *dto.UnlinkIdentity) *dto.UnlinkIdentityResDto {
+ b, err := client.SendHttpRequest("/api/v3/unlink-identity", fasthttp.MethodPost, reqDto)
+ var response dto.UnlinkIdentityResDto
if err != nil {
fmt.Println(err)
return nil
@@ -3155,21 +3346,14 @@ func (client *ManagementClient) GetSyncJob(reqDto *dto.GetSyncJobDto) *dto.SyncJ
}
/*
- * @summary 获取同步作业详情
- * @description 获取同步作业详情
- * @param syncTaskId 同步任务 ID
- * @param page 当前页数,从 1 开始
- * @param limit 每页数目,最大不能超过 50,默认为 10
- * @param syncTrigger 同步任务触发类型:
- * - `manually`: 手动触发执行
- * - `timed`: 定时触发
- * - `automatic`: 根据事件自动触发
- *
- * @returns SyncJobPaginatedRespDto
+* @summary 设置用户 MFA 状态
+* @description 设置用户 MFA 状态,即 MFA 触发数据。
+* @param requestBody
+* @returns IsSuccessRespDto
*/
-func (client *ManagementClient) ListSyncJobs(reqDto *dto.ListSyncJobsDto) *dto.SyncJobPaginatedRespDto {
- b, err := client.SendHttpRequest("/api/v3/list-sync-jobs", fasthttp.MethodGet, reqDto)
- var response dto.SyncJobPaginatedRespDto
+func (client *ManagementClient) SetUsersMfaStatus(reqDto *dto.SetMfaStatusDto) *dto.IsSuccessRespDto {
+ b, err := client.SendHttpRequest("/api/v3/set-mfa-status", fasthttp.MethodPost, reqDto)
+ var response dto.IsSuccessRespDto
if err != nil {
fmt.Println(err)
return nil
@@ -3183,37 +3367,25 @@ func (client *ManagementClient) ListSyncJobs(reqDto *dto.ListSyncJobsDto) *dto.S
}
/*
- * @summary 获取同步作业详情
- * @description 获取同步作业详情
- * @param syncJobId 同步作业 ID
- * @param page 当前页数,从 1 开始
- * @param limit 每页数目,最大不能超过 50,默认为 10
- * @param success 根据是否操作成功进行筛选
- * @param action 根据操作类型进行筛选:
- * - `CreateUser`: 创建用户
- * - `UpdateUser`: 修改用户信息
- * - `DeleteUser`: 删除用户
- * - `UpdateUserIdentifier`: 修改用户唯一标志符
- * - `ChangeUserDepartment`: 修改用户部门
- * - `CreateDepartment`: 创建部门
- * - `UpdateDepartment`: 修改部门信息
- * - `DeleteDepartment`: 删除部门
- * - `MoveDepartment`: 移动部门
- * - `UpdateDepartmentLeader`: 同步部门负责人
- * - `CreateGroup`: 创建分组
- * - `UpdateGroup`: 修改分组
- * - `DeleteGroup`: 删除分组
- * - `Updateless`: 无更新
- *
- * @param objectType 操作对象类型:
- * - `department`: 部门
- * - `user`: 用户
+ * @summary 获取用户 MFA 状态
+ * @description 获取用户 MFA 状态,即 MFA 触发数据。
+ * @param userId 用户唯一标志,可以是用户 ID、用户名、邮箱、手机号、外部 ID、在外部身份源的 ID。
+ * @param userIdType 用户 ID 类型,默认值为 `user_id`,可选值为:
+ * - `user_id`: Authing 用户 ID,如 `6319a1504f3xxxxf214dd5b7`
+ * - `phone`: 用户手机号
+ * - `email`: 用户邮箱
+ * - `username`: 用户名
+ * - `external_id`: 用户在外部系统的 ID,对应 Authing 用户信息的 `externalId` 字段
+ * - `identity`: 用户的外部身份源信息,格式为 `:`,其中 `` 为 Authing 身份源的 ID,`` 为用户在外部身份源的 ID。
+ * 示例值:`62f20932716fbcc10d966ee5:ou_8bae746eac07cd2564654140d2a9ac61`。
+ * - `sync_relation`: 用户的外部身份源信息,格式为 `:`,其中 `` 为同步身份源类型,如 wechatwork, lark;`` 为用户在外部身份源的 ID。
+ * 示例值:`lark:ou_8bae746eac07cd2564654140d2a9ac61`。
*
- * @returns TriggerSyncTaskRespDto
- */
-func (client *ManagementClient) ListSyncJobLogs(reqDto *dto.ListSyncJobLogsDto) *dto.TriggerSyncTaskRespDto {
- b, err := client.SendHttpRequest("/api/v3/list-sync-job-logs", fasthttp.MethodGet, reqDto)
- var response dto.TriggerSyncTaskRespDto
+ * @returns GetMapInfoRespDto
+*/
+func (client *ManagementClient) GetUserMfaStatus(reqDto *dto.GetMfaStatusDto) *dto.GetMapInfoRespDto {
+ b, err := client.SendHttpRequest("/api/v3/get-mfa-status", fasthttp.MethodGet, reqDto)
+ var response dto.GetMapInfoRespDto
if err != nil {
fmt.Println(err)
return nil
@@ -3227,21 +3399,25 @@ func (client *ManagementClient) ListSyncJobLogs(reqDto *dto.ListSyncJobLogsDto)
}
/*
- * @summary 获取同步风险操作列表
- * @description 获取同步风险操作列表
- * @param syncTaskId 同步任务 ID
- * @param page 当前页数,从 1 开始
- * @param limit 每页数目,最大不能超过 50,默认为 10
- * @param status 根据执行状态筛选
- * @param objectType 根据操作对象类型,默认获取所有类型的记录:
- * - `department`: 部门
- * - `user`: 用户
+ * @summary 获取用户绑定的第三方同步关系
+ * @description 如果在 Authing 中的用户进行了上下游同步,此接口可以用于查询出在第三方的关联用户信息
+ * @param userId 用户唯一标志,可以是用户 ID、用户名、邮箱、手机号、外部 ID、在外部身份源的 ID。
+ * @param userIdType 用户 ID 类型,默认值为 `user_id`,可选值为:
+ * - `user_id`: Authing 用户 ID,如 `6319a1504f3xxxxf214dd5b7`
+ * - `phone`: 用户手机号
+ * - `email`: 用户邮箱
+ * - `username`: 用户名
+ * - `external_id`: 用户在外部系统的 ID,对应 Authing 用户信息的 `externalId` 字段
+ * - `identity`: 用户的外部身份源信息,格式为 `:`,其中 `` 为 Authing 身份源的 ID,`` 为用户在外部身份源的 ID。
+ * 示例值:`62f20932716fbcc10d966ee5:ou_8bae746eac07cd2564654140d2a9ac61`。
+ * - `sync_relation`: 用户的外部身份源信息,格式为 `:`,其中 `` 为同步身份源类型,如 wechatwork, lark;`` 为用户在外部身份源的 ID。
+ * 示例值:`lark:ou_8bae746eac07cd2564654140d2a9ac61`。
*
- * @returns SyncRiskOperationPaginatedRespDto
- */
-func (client *ManagementClient) ListSyncRiskOperations(reqDto *dto.ListSyncRiskOperationsDto) *dto.SyncRiskOperationPaginatedRespDto {
- b, err := client.SendHttpRequest("/api/v3/list-sync-risk-operations", fasthttp.MethodGet, reqDto)
- var response dto.SyncRiskOperationPaginatedRespDto
+ * @returns SyncRelationListRespDto
+*/
+func (client *ManagementClient) GetUserSyncRelations(reqDto *dto.GetUserSyncRelationsDto) *dto.SyncRelationListRespDto {
+ b, err := client.SendHttpRequest("/api/v3/get-user-sync-relations", fasthttp.MethodGet, reqDto)
+ var response dto.SyncRelationListRespDto
if err != nil {
fmt.Println(err)
return nil
@@ -3255,14 +3431,14 @@ func (client *ManagementClient) ListSyncRiskOperations(reqDto *dto.ListSyncRiskO
}
/*
- * @summary 执行同步风险操作
- * @description 执行同步风险操作
- * @param requestBody
- * @returns TriggerSyncRiskOperationsRespDto
+* @summary 删除用户同步关联关系
+* @description 如果在 Authing 中的用户进行了上下游同步,此接口可以用于删除某个用户在指定身份源下的关联关系。
+* @param requestBody
+* @returns IsSuccessRespDto
*/
-func (client *ManagementClient) TriggerSyncRiskOperations(reqDto *dto.TriggerSyncRiskOperationDto) *dto.TriggerSyncRiskOperationsRespDto {
- b, err := client.SendHttpRequest("/api/v3/trigger-sync-risk-operations", fasthttp.MethodPost, reqDto)
- var response dto.TriggerSyncRiskOperationsRespDto
+func (client *ManagementClient) DeleteUserSyncRelations(reqDto *dto.DeleteUserSyncRelationReqDto) *dto.IsSuccessRespDto {
+ b, err := client.SendHttpRequest("/api/v3/delete-user-sync-relations", fasthttp.MethodPost, reqDto)
+ var response dto.IsSuccessRespDto
if err != nil {
fmt.Println(err)
return nil
@@ -3276,14 +3452,26 @@ func (client *ManagementClient) TriggerSyncRiskOperations(reqDto *dto.TriggerSyn
}
/*
- * @summary 取消同步风险操作
- * @description 取消同步风险操作
- * @param requestBody
- * @returns CancelSyncRiskOperationsRespDto
- */
-func (client *ManagementClient) CancelSyncRiskOperation(reqDto *dto.CancelSyncRiskOperationDto) *dto.CancelSyncRiskOperationsRespDto {
- b, err := client.SendHttpRequest("/api/v3/cancel-sync-risk-operation", fasthttp.MethodPost, reqDto)
- var response dto.CancelSyncRiskOperationsRespDto
+ * @summary 获取公共账号的角色列表
+ * @description 通过用户 ID,获取用户角色列表,可以选择所属权限分组 code、选择指定用户 ID 类型等。
+ * @param userId 用户唯一标志,可以是用户 ID、用户名、邮箱、手机号、外部 ID、在外部身份源的 ID。
+ * @param userIdType 用户 ID 类型,默认值为 `user_id`,可选值为:
+ * - `user_id`: Authing 用户 ID,如 `6319a1504f3xxxxf214dd5b7`
+ * - `phone`: 用户手机号
+ * - `email`: 用户邮箱
+ * - `username`: 用户名
+ * - `external_id`: 用户在外部系统的 ID,对应 Authing 用户信息的 `externalId` 字段
+ * - `identity`: 用户的外部身份源信息,格式为 `:`,其中 `` 为 Authing 身份源的 ID,`` 为用户在外部身份源的 ID。
+ * 示例值:`62f20932716fbcc10d966ee5:ou_8bae746eac07cd2564654140d2a9ac61`。
+ * - `sync_relation`: 用户的外部身份源信息,格式为 `:`,其中 `` 为同步身份源类型,如 wechatwork, lark;`` 为用户在外部身份源的 ID。
+ * 示例值:`lark:ou_8bae746eac07cd2564654140d2a9ac61`。
+ *
+ * @param namespace 所属权限分组(权限空间)的 code
+ * @returns PublicAccountPaginatedRespDto
+*/
+func (client *ManagementClient) GetPublicAccountRoles(reqDto *dto.GetRolesOfPublicAccountDto) *dto.PublicAccountPaginatedRespDto {
+ b, err := client.SendHttpRequest("/api/v3/get-roles-of-public-account", fasthttp.MethodGet, reqDto)
+ var response dto.PublicAccountPaginatedRespDto
if err != nil {
fmt.Println(err)
return nil
@@ -3297,14 +3485,14 @@ func (client *ManagementClient) CancelSyncRiskOperation(reqDto *dto.CancelSyncRi
}
/*
- * @summary 获取用户行为日志
- * @description 可以选择请求 ID、客户端 IP、用户 ID、应用 ID、开始时间戳、请求是否成功、分页参数来获取用户行为日志
- * @param requestBody
- * @returns UserActionLogRespDto
+* @summary 获取角色的公共账号列表
+* @description 通过角色 ID,获取用户的公共账号列表。
+* @param roleId 角色 ID
+* @returns PublicAccountPaginatedRespDto
*/
-func (client *ManagementClient) GetUserActionLogs(reqDto *dto.GetUserActionLogsDto) *dto.UserActionLogRespDto {
- b, err := client.SendHttpRequest("/api/v3/get-user-action-logs", fasthttp.MethodPost, reqDto)
- var response dto.UserActionLogRespDto
+func (client *ManagementClient) GetPublicAccountsOfRole(reqDto *dto.GetPublicAccountsOfRoleDto) *dto.PublicAccountPaginatedRespDto {
+ b, err := client.SendHttpRequest("/api/v3/get-public-accounts-of-role", fasthttp.MethodGet, reqDto)
+ var response dto.PublicAccountPaginatedRespDto
if err != nil {
fmt.Println(err)
return nil
@@ -3318,14 +3506,14 @@ func (client *ManagementClient) GetUserActionLogs(reqDto *dto.GetUserActionLogsD
}
/*
- * @summary 获取管理员操作日志
- * @description 可以选择请求 ID、客户端 IP、操作类型、资源类型、管理员用户 ID、请求是否成功、开始时间戳、结束时间戳、分页来获取管理员操作日志接口
- * @param requestBody
- * @returns AdminAuditLogRespDto
+* @summary 公共账号绑定批量角色
+* @description 公共账号绑定批量角色
+* @param requestBody
+* @returns IsSuccessRespDto
*/
-func (client *ManagementClient) GetAdminAuditLogs(reqDto *dto.GetAdminAuditLogsDto) *dto.AdminAuditLogRespDto {
- b, err := client.SendHttpRequest("/api/v3/get-admin-audit-logs", fasthttp.MethodPost, reqDto)
- var response dto.AdminAuditLogRespDto
+func (client *ManagementClient) BindPublicAccountOfRoles(reqDto *dto.SetUserRolesDto) *dto.IsSuccessRespDto {
+ b, err := client.SendHttpRequest("/api/v3/set-public-account-of-roles", fasthttp.MethodPost, reqDto)
+ var response dto.IsSuccessRespDto
if err != nil {
fmt.Println(err)
return nil
@@ -3339,13 +3527,14 @@ func (client *ManagementClient) GetAdminAuditLogs(reqDto *dto.GetAdminAuditLogsD
}
/*
- * @summary 获取邮件模版列表
- * @description 获取邮件模版列表
- * @returns GetEmailTemplatesRespDto
+* @summary 获取分组的公共账号列表
+* @description 通过分组 ID,获取用户的公共账号列表。
+* @param groupId 分组 ID
+* @returns PublicAccountPaginatedRespDto
*/
-func (client *ManagementClient) GetEmailTemplates() *dto.GetEmailTemplatesRespDto {
- b, err := client.SendHttpRequest("/api/v3/get-email-templates", fasthttp.MethodGet, nil)
- var response dto.GetEmailTemplatesRespDto
+func (client *ManagementClient) GetPublicAccountsOfGroup(reqDto *dto.GetPublicAccountsOfGroupDto) *dto.PublicAccountPaginatedRespDto {
+ b, err := client.SendHttpRequest("/api/v3/get-public-accounts-of-group", fasthttp.MethodGet, reqDto)
+ var response dto.PublicAccountPaginatedRespDto
if err != nil {
fmt.Println(err)
return nil
@@ -3359,14 +3548,25 @@ func (client *ManagementClient) GetEmailTemplates() *dto.GetEmailTemplatesRespDt
}
/*
- * @summary 修改邮件模版
- * @description 修改邮件模版
- * @param requestBody
- * @returns EmailTemplateSingleItemRespDto
- */
-func (client *ManagementClient) UpdateEmailTemplate(reqDto *dto.UpdateEmailTemplateDto) *dto.EmailTemplateSingleItemRespDto {
- b, err := client.SendHttpRequest("/api/v3/update-email-template", fasthttp.MethodPost, reqDto)
- var response dto.EmailTemplateSingleItemRespDto
+ * @summary 获取公共账号分组列表
+ * @description 通过公共账号 ID,获取公共账号分组列表,可以选择指定用户 ID 类型等。
+ * @param userId 用户唯一标志,可以是用户 ID、用户名、邮箱、手机号、外部 ID、在外部身份源的 ID。
+ * @param userIdType 用户 ID 类型,默认值为 `user_id`,可选值为:
+ * - `user_id`: Authing 用户 ID,如 `6319a1504f3xxxxf214dd5b7`
+ * - `phone`: 用户手机号
+ * - `email`: 用户邮箱
+ * - `username`: 用户名
+ * - `external_id`: 用户在外部系统的 ID,对应 Authing 用户信息的 `externalId` 字段
+ * - `identity`: 用户的外部身份源信息,格式为 `:`,其中 `` 为 Authing 身份源的 ID,`` 为用户在外部身份源的 ID。
+ * 示例值:`62f20932716fbcc10d966ee5:ou_8bae746eac07cd2564654140d2a9ac61`。
+ * - `sync_relation`: 用户的外部身份源信息,格式为 `:`,其中 `` 为同步身份源类型,如 wechatwork, lark;`` 为用户在外部身份源的 ID。
+ * 示例值:`lark:ou_8bae746eac07cd2564654140d2a9ac61`。
+ *
+ * @returns GroupPaginatedRespDto
+*/
+func (client *ManagementClient) GetGroupsOfPublicAccount(reqDto *dto.GetGroupsOfPublicAccountDto) *dto.GroupPaginatedRespDto {
+ b, err := client.SendHttpRequest("/api/v3/get-groups-of-public-account", fasthttp.MethodGet, reqDto)
+ var response dto.GroupPaginatedRespDto
if err != nil {
fmt.Println(err)
return nil
@@ -3380,14 +3580,14 @@ func (client *ManagementClient) UpdateEmailTemplate(reqDto *dto.UpdateEmailTempl
}
/*
- * @summary 预览邮件模版
- * @description 预览邮件模版
- * @param requestBody
- * @returns PreviewEmailTemplateRespDto
+* @summary 公共账号添加批量分组
+* @description 公共账号通过分组 ID 添加批量分组
+* @param requestBody
+* @returns IsSuccessRespDto
*/
-func (client *ManagementClient) PreviewEmailTemplate(reqDto *dto.PreviewEmailTemplateDto) *dto.PreviewEmailTemplateRespDto {
- b, err := client.SendHttpRequest("/api/v3/preview-email-template", fasthttp.MethodPost, reqDto)
- var response dto.PreviewEmailTemplateRespDto
+func (client *ManagementClient) GetPublicAccountOfGroups(reqDto *dto.SetUserGroupsDto) *dto.IsSuccessRespDto {
+ b, err := client.SendHttpRequest("/api/v3/set-public-account-of-groups", fasthttp.MethodPost, reqDto)
+ var response dto.IsSuccessRespDto
if err != nil {
fmt.Println(err)
return nil
@@ -3401,13 +3601,14 @@ func (client *ManagementClient) PreviewEmailTemplate(reqDto *dto.PreviewEmailTem
}
/*
- * @summary 获取第三方邮件服务配置
- * @description 获取第三方邮件服务配置
- * @returns EmailProviderRespDto
+* @summary 获取部门的公共账号列表
+* @description 通过部门 ID,获取用户的公共账号列表。
+* @param departmentId 部门 ID
+* @returns PublicAccountPaginatedRespDto
*/
-func (client *ManagementClient) GetEmailProvider() *dto.EmailProviderRespDto {
- b, err := client.SendHttpRequest("/api/v3/get-email-provider", fasthttp.MethodGet, nil)
- var response dto.EmailProviderRespDto
+func (client *ManagementClient) GetPublicAccountsOfDepartment(reqDto *dto.GetPublicAccountsOfDepartmentDto) *dto.PublicAccountPaginatedRespDto {
+ b, err := client.SendHttpRequest("/api/v3/get-public-accounts-of-department", fasthttp.MethodGet, reqDto)
+ var response dto.PublicAccountPaginatedRespDto
if err != nil {
fmt.Println(err)
return nil
@@ -3421,14 +3622,31 @@ func (client *ManagementClient) GetEmailProvider() *dto.EmailProviderRespDto {
}
/*
- * @summary 配置第三方邮件服务
- * @description 配置第三方邮件服务
- * @param requestBody
- * @returns EmailProviderRespDto
- */
-func (client *ManagementClient) ConfigEmailProvider(reqDto *dto.ConfigEmailProviderDto) *dto.EmailProviderRespDto {
- b, err := client.SendHttpRequest("/api/v3/config-email-provider", fasthttp.MethodPost, reqDto)
- var response dto.EmailProviderRespDto
+ * @summary 获取公共账号的部门列表
+ * @description 通过用户 ID,获取用户部门列表,支持分页,可以选择获取自定义数据、选择指定用户 ID 类型、增序或降序等。
+ * @param userId 用户唯一标志,可以是用户 ID、用户名、邮箱、手机号、外部 ID、在外部身份源的 ID。
+ * @param userIdType 用户 ID 类型,默认值为 `user_id`,可选值为:
+ * - `user_id`: Authing 用户 ID,如 `6319a1504f3xxxxf214dd5b7`
+ * - `phone`: 用户手机号
+ * - `email`: 用户邮箱
+ * - `username`: 用户名
+ * - `external_id`: 用户在外部系统的 ID,对应 Authing 用户信息的 `externalId` 字段
+ * - `identity`: 用户的外部身份源信息,格式为 `:`,其中 `` 为 Authing 身份源的 ID,`` 为用户在外部身份源的 ID。
+ * 示例值:`62f20932716fbcc10d966ee5:ou_8bae746eac07cd2564654140d2a9ac61`。
+ * - `sync_relation`: 用户的外部身份源信息,格式为 `:`,其中 `` 为同步身份源类型,如 wechatwork, lark;`` 为用户在外部身份源的 ID。
+ * 示例值:`lark:ou_8bae746eac07cd2564654140d2a9ac61`。
+ *
+ * @param page 当前页数,从 1 开始
+ * @param limit 每页数目,最大不能超过 50,默认为 10
+ * @param withCustomData 是否获取自定义数据
+ * @param withDepartmentPaths 是否获取部门路径
+ * @param sortBy 排序依据,如 部门创建时间、加入部门时间、部门名称、部门标志符
+ * @param orderBy 增序或降序
+ * @returns UserDepartmentPaginatedRespDto
+*/
+func (client *ManagementClient) GetPublicAccountDepartments(reqDto *dto.GetDepartmentsOfPublicAccountDto) *dto.UserDepartmentPaginatedRespDto {
+ b, err := client.SendHttpRequest("/api/v3/get-departments-of-public-account", fasthttp.MethodGet, reqDto)
+ var response dto.UserDepartmentPaginatedRespDto
if err != nil {
fmt.Println(err)
return nil
@@ -3442,14 +3660,14 @@ func (client *ManagementClient) ConfigEmailProvider(reqDto *dto.ConfigEmailProvi
}
/*
- * @summary 获取应用详情
- * @description 通过应用 ID,获取应用详情。
- * @param appId 应用 ID
- * @returns ApplicationSingleRespDto
+* @summary 设置公共账号所在部门
+* @description 设置公共账号所在部门。
+* @param requestBody
+* @returns IsSuccessRespDto
*/
-func (client *ManagementClient) GetApplication(reqDto *dto.GetApplicationDto) *dto.ApplicationSingleRespDto {
- b, err := client.SendHttpRequest("/api/v3/get-application", fasthttp.MethodGet, reqDto)
- var response dto.ApplicationSingleRespDto
+func (client *ManagementClient) SetPublicAccountOfDepartments(reqDto *dto.SetUserDepartmentsDto) *dto.IsSuccessRespDto {
+ b, err := client.SendHttpRequest("/api/v3/set-public-account-of-departments", fasthttp.MethodPost, reqDto)
+ var response dto.IsSuccessRespDto
if err != nil {
fmt.Println(err)
return nil
@@ -3463,19 +3681,20 @@ func (client *ManagementClient) GetApplication(reqDto *dto.GetApplicationDto) *d
}
/*
- * @summary 获取应用列表
- * @description 获取应用列表
- * @param page 当前页数,从 1 开始
- * @param limit 每页数目,最大不能超过 50,默认为 10
- * @param isIntegrateApp 是否为集成应用
- * @param isSelfBuiltApp 是否为自建应用
- * @param ssoEnabled 是否开启单点登录
- * @param keywords 模糊搜索字符串
- * @returns ApplicationPaginatedRespDto
- */
-func (client *ManagementClient) ListApplications(reqDto *dto.ListApplicationsDto) *dto.ApplicationPaginatedRespDto {
- b, err := client.SendHttpRequest("/api/v3/list-applications", fasthttp.MethodGet, reqDto)
- var response dto.ApplicationPaginatedRespDto
+ * @summary 批量离职用户
+ * @description 批量离职用户。离职操作会进行以下操作:
+ *
+ * - 离职后该成员授权、部门、角色、分组、岗位关系将被删除;
+ * - 离职后将保留用户基本信息,同时账号将被禁用,无法登录应用;如果需要彻底删除账号,请调用删除接口。
+ *
+ * 该操作不可恢复,请谨慎操作!
+ *
+ * @param requestBody
+ * @returns ResignUserRespDto
+*/
+func (client *ManagementClient) ResignPublicAccountBatch(reqDto *dto.ResignUserBatchReqDto) *dto.ResignUserRespDto {
+ b, err := client.SendHttpRequest("/api/v3/resign-public-account-batch", fasthttp.MethodPost, reqDto)
+ var response dto.ResignUserRespDto
if err != nil {
fmt.Println(err)
return nil
@@ -3489,14 +3708,14 @@ func (client *ManagementClient) ListApplications(reqDto *dto.ListApplicationsDto
}
/*
- * @summary 获取应用简单信息
- * @description 通过应用 ID,获取应用简单信息。
- * @param appId 应用 ID
- * @returns ApplicationSimpleInfoSingleRespDto
+* @summary 获取公共账号的岗位
+* @description 获取公共账号的岗位
+* @param userId 用户 id
+* @returns CreatePostDto
*/
-func (client *ManagementClient) GetApplicationSimpleInfo(reqDto *dto.GetApplicationSimpleInfoDto) *dto.ApplicationSimpleInfoSingleRespDto {
- b, err := client.SendHttpRequest("/api/v3/get-application-simple-info", fasthttp.MethodGet, reqDto)
- var response dto.ApplicationSimpleInfoSingleRespDto
+func (client *ManagementClient) GetPostOfPublicUser(reqDto *dto.GetPostOfPublicAccountDto) *dto.CreatePostDto {
+ b, err := client.SendHttpRequest("/api/v3/get-post-of-public-account", fasthttp.MethodGet, reqDto)
+ var response dto.CreatePostDto
if err != nil {
fmt.Println(err)
return nil
@@ -3510,19 +3729,14 @@ func (client *ManagementClient) GetApplicationSimpleInfo(reqDto *dto.GetApplicat
}
/*
- * @summary 获取应用简单信息列表
- * @description 获取应用简单信息列表
- * @param page 当前页数,从 1 开始
- * @param limit 每页数目,最大不能超过 50,默认为 10
- * @param isIntegrateApp 是否为集成应用
- * @param isSelfBuiltApp 是否为自建应用
- * @param ssoEnabled 是否开启单点登录
- * @param keywords 模糊搜索字符串
- * @returns ApplicationSimpleInfoPaginatedRespDto
+* @summary 获取岗位的公共账号列表
+* @description 通过岗位 ID,获取用户的公共账号列表。
+* @param postId 岗位 ID
+* @returns PublicAccountPaginatedRespDto
*/
-func (client *ManagementClient) ListApplicationSimpleInfo(reqDto *dto.ListApplicationSimpleInfoDto) *dto.ApplicationSimpleInfoPaginatedRespDto {
- b, err := client.SendHttpRequest("/api/v3/list-application-simple-info", fasthttp.MethodGet, reqDto)
- var response dto.ApplicationSimpleInfoPaginatedRespDto
+func (client *ManagementClient) GetPublicAccountsOfPost(reqDto *dto.GetPublicAccountsOfPostDto) *dto.PublicAccountPaginatedRespDto {
+ b, err := client.SendHttpRequest("/api/v3/get-public-accounts-of-post", fasthttp.MethodGet, reqDto)
+ var response dto.PublicAccountPaginatedRespDto
if err != nil {
fmt.Println(err)
return nil
@@ -3536,14 +3750,14 @@ func (client *ManagementClient) ListApplicationSimpleInfo(reqDto *dto.ListApplic
}
/*
- * @summary 创建应用
- * @description 创建应用
- * @param requestBody
- * @returns CreateApplicationRespDto
+* @summary 设置公共账号的岗位
+* @description 设置公共账号关联的岗位
+* @param requestBody
+* @returns CommonResponseDto
*/
-func (client *ManagementClient) CreateApplication(reqDto *dto.CreateApplicationDto) *dto.CreateApplicationRespDto {
- b, err := client.SendHttpRequest("/api/v3/create-application", fasthttp.MethodPost, reqDto)
- var response dto.CreateApplicationRespDto
+func (client *ManagementClient) SetPublicAccountOfnPost(reqDto *dto.UserConnectionPostDto) *dto.CommonResponseDto {
+ b, err := client.SendHttpRequest("/api/v3/set-public-account-of-post", fasthttp.MethodPost, reqDto)
+ var response dto.CommonResponseDto
if err != nil {
fmt.Println(err)
return nil
@@ -3557,13 +3771,13 @@ func (client *ManagementClient) CreateApplication(reqDto *dto.CreateApplicationD
}
/*
- * @summary 删除应用
- * @description 通过应用 ID,删除应用。
- * @param requestBody
- * @returns IsSuccessRespDto
+* @summary 解绑公共账号关联岗位
+* @description 解绑公共账号关联岗位
+* @param requestBody
+* @returns IsSuccessRespDto
*/
-func (client *ManagementClient) DeleteApplication(reqDto *dto.DeleteApplicationDto) *dto.IsSuccessRespDto {
- b, err := client.SendHttpRequest("/api/v3/delete-application", fasthttp.MethodPost, reqDto)
+func (client *ManagementClient) UnbindPublicAccountOfPost(reqDto *dto.UserConnectionPostDto) *dto.IsSuccessRespDto {
+ b, err := client.SendHttpRequest("/api/v3/unbind-public-account-of-post", fasthttp.MethodPost, reqDto)
var response dto.IsSuccessRespDto
if err != nil {
fmt.Println(err)
@@ -3578,14 +3792,14 @@ func (client *ManagementClient) DeleteApplication(reqDto *dto.DeleteApplicationD
}
/*
- * @summary 获取应用密钥
- * @description 获取应用密钥
- * @param appId 应用 ID
- * @returns GetApplicationSecretRespDto
+* @summary 获取同步任务详情
+* @description 获取同步任务详情
+* @param syncTaskId 同步任务 ID
+* @returns SyncTaskSingleRespDto
*/
-func (client *ManagementClient) GetApplicationSecret(reqDto *dto.GetApplicationSecretDto) *dto.GetApplicationSecretRespDto {
- b, err := client.SendHttpRequest("/api/v3/get-application-secret", fasthttp.MethodGet, reqDto)
- var response dto.GetApplicationSecretRespDto
+func (client *ManagementClient) GetSyncTask(reqDto *dto.GetSyncTaskDto) *dto.SyncTaskSingleRespDto {
+ b, err := client.SendHttpRequest("/api/v3/get-sync-task", fasthttp.MethodGet, reqDto)
+ var response dto.SyncTaskSingleRespDto
if err != nil {
fmt.Println(err)
return nil
@@ -3599,14 +3813,15 @@ func (client *ManagementClient) GetApplicationSecret(reqDto *dto.GetApplicationS
}
/*
- * @summary 刷新应用密钥
- * @description 刷新应用密钥
- * @param requestBody
- * @returns RefreshApplicationSecretRespDto
+* @summary 获取同步任务列表
+* @description 获取同步任务列表
+* @param page 当前页数,从 1 开始
+* @param limit 每页数目,最大不能超过 50,默认为 10
+* @returns SyncTaskPaginatedRespDto
*/
-func (client *ManagementClient) RefreshApplicationSecret(reqDto *dto.RefreshApplicationSecretDto) *dto.RefreshApplicationSecretRespDto {
- b, err := client.SendHttpRequest("/api/v3/refresh-application-secret", fasthttp.MethodPost, reqDto)
- var response dto.RefreshApplicationSecretRespDto
+func (client *ManagementClient) ListSyncTasks(reqDto *dto.ListSyncTasksDto) *dto.SyncTaskPaginatedRespDto {
+ b, err := client.SendHttpRequest("/api/v3/list-sync-tasks", fasthttp.MethodGet, reqDto)
+ var response dto.SyncTaskPaginatedRespDto
if err != nil {
fmt.Println(err)
return nil
@@ -3620,14 +3835,14 @@ func (client *ManagementClient) RefreshApplicationSecret(reqDto *dto.RefreshAppl
}
/*
- * @summary 获取应用当前登录用户
- * @description 获取应用当前处于登录状态的用户
- * @param requestBody
- * @returns UserPaginatedRespDto
+* @summary 创建同步任务
+* @description 创建同步任务
+* @param requestBody
+* @returns SyncTaskPaginatedRespDto
*/
-func (client *ManagementClient) ListApplicationActiveUsers(reqDto *dto.ListApplicationActiveUsersDto) *dto.UserPaginatedRespDto {
- b, err := client.SendHttpRequest("/api/v3/list-application-active-users", fasthttp.MethodPost, reqDto)
- var response dto.UserPaginatedRespDto
+func (client *ManagementClient) CreateSyncTask(reqDto *dto.CreateSyncTaskDto) *dto.SyncTaskPaginatedRespDto {
+ b, err := client.SendHttpRequest("/api/v3/create-sync-task", fasthttp.MethodPost, reqDto)
+ var response dto.SyncTaskPaginatedRespDto
if err != nil {
fmt.Println(err)
return nil
@@ -3641,14 +3856,14 @@ func (client *ManagementClient) ListApplicationActiveUsers(reqDto *dto.ListAppli
}
/*
- * @summary 获取应用默认访问授权策略
- * @description 获取应用默认访问授权策略
- * @param appId 应用 ID
- * @returns GetApplicationPermissionStrategyRespDto
+* @summary 修改同步任务
+* @description 修改同步任务
+* @param requestBody
+* @returns SyncTaskPaginatedRespDto
*/
-func (client *ManagementClient) GetApplicationPermissionStrategy(reqDto *dto.GetApplicationPermissionStrategyDto) *dto.GetApplicationPermissionStrategyRespDto {
- b, err := client.SendHttpRequest("/api/v3/get-application-permission-strategy", fasthttp.MethodGet, reqDto)
- var response dto.GetApplicationPermissionStrategyRespDto
+func (client *ManagementClient) UpdateSyncTask(reqDto *dto.UpdateSyncTaskDto) *dto.SyncTaskPaginatedRespDto {
+ b, err := client.SendHttpRequest("/api/v3/update-sync-task", fasthttp.MethodPost, reqDto)
+ var response dto.SyncTaskPaginatedRespDto
if err != nil {
fmt.Println(err)
return nil
@@ -3662,14 +3877,14 @@ func (client *ManagementClient) GetApplicationPermissionStrategy(reqDto *dto.Get
}
/*
- * @summary 更新应用默认访问授权策略
- * @description 更新应用默认访问授权策略
- * @param requestBody
- * @returns IsSuccessRespDto
+* @summary 执行同步任务
+* @description 执行同步任务
+* @param requestBody
+* @returns TriggerSyncTaskRespDto
*/
-func (client *ManagementClient) UpdateApplicationPermissionStrategy(reqDto *dto.UpdateApplicationPermissionStrategyDataDto) *dto.IsSuccessRespDto {
- b, err := client.SendHttpRequest("/api/v3/update-application-permission-strategy", fasthttp.MethodPost, reqDto)
- var response dto.IsSuccessRespDto
+func (client *ManagementClient) TriggerSyncTask(reqDto *dto.TriggerSyncTaskDto) *dto.TriggerSyncTaskRespDto {
+ b, err := client.SendHttpRequest("/api/v3/trigger-sync-task", fasthttp.MethodPost, reqDto)
+ var response dto.TriggerSyncTaskRespDto
if err != nil {
fmt.Println(err)
return nil
@@ -3683,14 +3898,14 @@ func (client *ManagementClient) UpdateApplicationPermissionStrategy(reqDto *dto.
}
/*
- * @summary 授权应用访问权限
- * @description 给用户、分组、组织或角色授权应用访问权限,如果用户、分组、组织或角色不存在,则跳过,进行下一步授权,不返回报错
- * @param requestBody
- * @returns IsSuccessRespDto
+* @summary 获取同步作业详情
+* @description 获取同步作业详情
+* @param syncJobId 同步作业 ID
+* @returns SyncJobSingleRespDto
*/
-func (client *ManagementClient) AuthorizeApplicationAccess(reqDto *dto.AuthorizeApplicationAccessDto) *dto.IsSuccessRespDto {
- b, err := client.SendHttpRequest("/api/v3/authorize-application-access", fasthttp.MethodPost, reqDto)
- var response dto.IsSuccessRespDto
+func (client *ManagementClient) GetSyncJob(reqDto *dto.GetSyncJobDto) *dto.SyncJobSingleRespDto {
+ b, err := client.SendHttpRequest("/api/v3/get-sync-job", fasthttp.MethodGet, reqDto)
+ var response dto.SyncJobSingleRespDto
if err != nil {
fmt.Println(err)
return nil
@@ -3704,14 +3919,21 @@ func (client *ManagementClient) AuthorizeApplicationAccess(reqDto *dto.Authorize
}
/*
- * @summary 删除应用访问授权记录
- * @description 取消给用户、分组、组织或角色的应用访问权限授权,如果传入数据不存在,则返回数据不报错处理。
- * @param requestBody
- * @returns IsSuccessRespDto
- */
-func (client *ManagementClient) RevokeApplicationAccess(reqDto *dto.RevokeApplicationAccessDto) *dto.IsSuccessRespDto {
- b, err := client.SendHttpRequest("/api/v3/revoke-application-access", fasthttp.MethodPost, reqDto)
- var response dto.IsSuccessRespDto
+ * @summary 获取同步作业详情
+ * @description 获取同步作业详情
+ * @param syncTaskId 同步任务 ID
+ * @param page 当前页数,从 1 开始
+ * @param limit 每页数目,最大不能超过 50,默认为 10
+ * @param syncTrigger 同步任务触发类型:
+ * - `manually`: 手动触发执行
+ * - `timed`: 定时触发
+ * - `automatic`: 根据事件自动触发
+ *
+ * @returns SyncJobPaginatedRespDto
+*/
+func (client *ManagementClient) ListSyncJobs(reqDto *dto.ListSyncJobsDto) *dto.SyncJobPaginatedRespDto {
+ b, err := client.SendHttpRequest("/api/v3/list-sync-jobs", fasthttp.MethodGet, reqDto)
+ var response dto.SyncJobPaginatedRespDto
if err != nil {
fmt.Println(err)
return nil
@@ -3725,14 +3947,37 @@ func (client *ManagementClient) RevokeApplicationAccess(reqDto *dto.RevokeApplic
}
/*
- * @summary 检测域名是否可用
- * @description 检测域名是否可用于创建新应用或更新应用域名
- * @param requestBody
- * @returns CheckDomainAvailableSecretRespDto
- */
-func (client *ManagementClient) CheckDomainAvailable(reqDto *dto.CheckDomainAvailable) *dto.CheckDomainAvailableSecretRespDto {
- b, err := client.SendHttpRequest("/api/v3/check-domain-available", fasthttp.MethodPost, reqDto)
- var response dto.CheckDomainAvailableSecretRespDto
+ * @summary 获取同步作业详情
+ * @description 获取同步作业详情
+ * @param syncJobId 同步作业 ID
+ * @param page 当前页数,从 1 开始
+ * @param limit 每页数目,最大不能超过 50,默认为 10
+ * @param success 根据是否操作成功进行筛选
+ * @param action 根据操作类型进行筛选:
+ * - `CreateUser`: 创建用户
+ * - `UpdateUser`: 修改用户信息
+ * - `DeleteUser`: 删除用户
+ * - `UpdateUserIdentifier`: 修改用户唯一标志符
+ * - `ChangeUserDepartment`: 修改用户部门
+ * - `CreateDepartment`: 创建部门
+ * - `UpdateDepartment`: 修改部门信息
+ * - `DeleteDepartment`: 删除部门
+ * - `MoveDepartment`: 移动部门
+ * - `UpdateDepartmentLeader`: 同步部门负责人
+ * - `CreateGroup`: 创建分组
+ * - `UpdateGroup`: 修改分组
+ * - `DeleteGroup`: 删除分组
+ * - `Updateless`: 无更新
+ *
+ * @param objectType 操作对象类型:
+ * - `department`: 部门
+ * - `user`: 用户
+ *
+ * @returns TriggerSyncTaskRespDto
+*/
+func (client *ManagementClient) ListSyncJobLogs(reqDto *dto.ListSyncJobLogsDto) *dto.TriggerSyncTaskRespDto {
+ b, err := client.SendHttpRequest("/api/v3/list-sync-job-logs", fasthttp.MethodGet, reqDto)
+ var response dto.TriggerSyncTaskRespDto
if err != nil {
fmt.Println(err)
return nil
@@ -3746,17 +3991,21 @@ func (client *ManagementClient) CheckDomainAvailable(reqDto *dto.CheckDomainAvai
}
/*
- * @summary 获取租户应用列表
- * @description 获取应用列表,可以指定 租户 ID 筛选。
- * @param page 获取应用列表的页码
- * @param limit 每页获取的应用数量
- * @param keywords 搜索关键字
- * @param ssoEnabled 应用是否加入单点登录
- * @returns TenantApplicationListPaginatedRespDto
- */
-func (client *ManagementClient) ListTenantApplications(reqDto *dto.ListTenantApplicationsDto) *dto.TenantApplicationListPaginatedRespDto {
- b, err := client.SendHttpRequest("/api/v3/list-tenant-applications", fasthttp.MethodGet, reqDto)
- var response dto.TenantApplicationListPaginatedRespDto
+ * @summary 获取同步风险操作列表
+ * @description 获取同步风险操作列表
+ * @param syncTaskId 同步任务 ID
+ * @param page 当前页数,从 1 开始
+ * @param limit 每页数目,最大不能超过 50,默认为 10
+ * @param status 根据执行状态筛选
+ * @param objectType 根据操作对象类型,默认获取所有类型的记录:
+ * - `department`: 部门
+ * - `user`: 用户
+ *
+ * @returns SyncRiskOperationPaginatedRespDto
+*/
+func (client *ManagementClient) ListSyncRiskOperations(reqDto *dto.ListSyncRiskOperationsDto) *dto.SyncRiskOperationPaginatedRespDto {
+ b, err := client.SendHttpRequest("/api/v3/list-sync-risk-operations", fasthttp.MethodGet, reqDto)
+ var response dto.SyncRiskOperationPaginatedRespDto
if err != nil {
fmt.Println(err)
return nil
@@ -3770,14 +4019,14 @@ func (client *ManagementClient) ListTenantApplications(reqDto *dto.ListTenantApp
}
/*
- * @summary 更新应用登录页配置
- * @description 通过应用 ID 更新登录页配置。
- * @param requestBody
- * @returns IsSuccessRespDto
+* @summary 执行同步风险操作
+* @description 执行同步风险操作
+* @param requestBody
+* @returns TriggerSyncRiskOperationsRespDto
*/
-func (client *ManagementClient) UpdateLoginPageConfig(reqDto *dto.UpdateLoginConfigDto) *dto.IsSuccessRespDto {
- b, err := client.SendHttpRequest("/api/v3/update-login-page-config", fasthttp.MethodPost, reqDto)
- var response dto.IsSuccessRespDto
+func (client *ManagementClient) TriggerSyncRiskOperations(reqDto *dto.TriggerSyncRiskOperationDto) *dto.TriggerSyncRiskOperationsRespDto {
+ b, err := client.SendHttpRequest("/api/v3/trigger-sync-risk-operations", fasthttp.MethodPost, reqDto)
+ var response dto.TriggerSyncRiskOperationsRespDto
if err != nil {
fmt.Println(err)
return nil
@@ -3791,13 +4040,14 @@ func (client *ManagementClient) UpdateLoginPageConfig(reqDto *dto.UpdateLoginCon
}
/*
- * @summary 获取用户池租户配置信息
- * @description 根据用户池 ID 获取用户池多租户配置信息
- * @returns UserPoolTenantConfigDtoRespDto
+* @summary 取消同步风险操作
+* @description 取消同步风险操作
+* @param requestBody
+* @returns CancelSyncRiskOperationsRespDto
*/
-func (client *ManagementClient) UserpollTenantConfig() *dto.UserPoolTenantConfigDtoRespDto {
- b, err := client.SendHttpRequest("/api/v3/userpool-tenant-config", fasthttp.MethodGet, nil)
- var response dto.UserPoolTenantConfigDtoRespDto
+func (client *ManagementClient) CancelSyncRiskOperation(reqDto *dto.CancelSyncRiskOperationDto) *dto.CancelSyncRiskOperationsRespDto {
+ b, err := client.SendHttpRequest("/api/v3/cancel-sync-risk-operation", fasthttp.MethodPost, reqDto)
+ var response dto.CancelSyncRiskOperationsRespDto
if err != nil {
fmt.Println(err)
return nil
@@ -3811,14 +4061,15 @@ func (client *ManagementClient) UserpollTenantConfig() *dto.UserPoolTenantConfig
}
/*
- * @summary 更新用户池租户配置信息
- * @description 更新用户池多租户配置内登录信息
- * @param requestBody
- * @returns IsSuccessRespDto
+* @summary 获取分组详情
+* @description 通过分组 code,获取分组详情。
+* @param code 分组 code
+* @param withCustomData 是否获取自定义数据
+* @returns GroupSingleRespDto
*/
-func (client *ManagementClient) UpdateUserPoolTenantConfig(reqDto *dto.UpdateUserPoolTenantLoginConfigDto) *dto.IsSuccessRespDto {
- b, err := client.SendHttpRequest("/api/v3/update-userpool-tenant-config", fasthttp.MethodPost, reqDto)
- var response dto.IsSuccessRespDto
+func (client *ManagementClient) GetGroup(reqDto *dto.GetGroupDto) *dto.GroupSingleRespDto {
+ b, err := client.SendHttpRequest("/api/v3/get-group", fasthttp.MethodGet, reqDto)
+ var response dto.GroupSingleRespDto
if err != nil {
fmt.Println(err)
return nil
@@ -3832,14 +4083,19 @@ func (client *ManagementClient) UpdateUserPoolTenantConfig(reqDto *dto.UpdateUse
}
/*
- * @summary 设置用户池多租户身份源连接
- * @description 设置用户池多租户身份源连接,支持同时设置多个身份源连接,支持设置连接和取消连接
- * @param requestBody
- * @returns IsSuccessRespDto
+* @summary 获取分组列表
+* @description 获取分组列表,支持分页。
+* @param keywords 搜索分组 code 或分组名称
+* @param page 当前页数,从 1 开始
+* @param limit 每页数目,最大不能超过 50,默认为 10
+* @param withMetadata 是否展示元数据内容
+* @param withCustomData 是否获取自定义数据
+* @param flatCustomData 是否拍平扩展字段
+* @returns GroupPaginatedRespDto
*/
-func (client *ManagementClient) ChangeUserpoolTenanExtIdpConnState(reqDto *dto.ChangeUserPoolTenantExtIdpConnDto) *dto.IsSuccessRespDto {
- b, err := client.SendHttpRequest("/api/v3/change-userpool-tenant-ext-idp-conn-state", fasthttp.MethodPost, reqDto)
- var response dto.IsSuccessRespDto
+func (client *ManagementClient) ListGroups(reqDto *dto.ListGroupsDto) *dto.GroupPaginatedRespDto {
+ b, err := client.SendHttpRequest("/api/v3/list-groups", fasthttp.MethodGet, reqDto)
+ var response dto.GroupPaginatedRespDto
if err != nil {
fmt.Println(err)
return nil
@@ -3853,14 +4109,15 @@ func (client *ManagementClient) ChangeUserpoolTenanExtIdpConnState(reqDto *dto.C
}
/*
- * @summary 创建 ASA 账号
- * @description 在某一应用下创建 ASA 账号
- * @param requestBody
- * @returns AsaAccountSingleRespDto
+* @summary 获取所有分组
+* @description 获取所有分组
+* @param fetchMembers 是否获取成员列表
+* @param withCustomData 是否获取自定义数据
+* @returns GroupListRespDto
*/
-func (client *ManagementClient) CreateAsaAccount(reqDto *dto.CreateAsaAccountDto) *dto.AsaAccountSingleRespDto {
- b, err := client.SendHttpRequest("/api/v3/create-asa-account", fasthttp.MethodPost, reqDto)
- var response dto.AsaAccountSingleRespDto
+func (client *ManagementClient) GetAllGroups(reqDto *dto.GetAllGroupsDto) *dto.GroupListRespDto {
+ b, err := client.SendHttpRequest("/api/v3/get-all-groups", fasthttp.MethodGet, reqDto)
+ var response dto.GroupListRespDto
if err != nil {
fmt.Println(err)
return nil
@@ -3874,14 +4131,14 @@ func (client *ManagementClient) CreateAsaAccount(reqDto *dto.CreateAsaAccountDto
}
/*
- * @summary 批量创建 ASA 账号
- * @description 在某一应用下批量创建 ASA 账号
- * @param requestBody
- * @returns IsSuccessRespDto
+* @summary 创建分组
+* @description 创建分组,一个分组必须包含分组名称与唯一标志符 code,且必须为一个合法的英文标志符,如 developers。
+* @param requestBody
+* @returns GroupSingleRespDto
*/
-func (client *ManagementClient) CreateAsaAccountBatch(reqDto *dto.CreateAsaAccountsBatchDto) *dto.IsSuccessRespDto {
- b, err := client.SendHttpRequest("/api/v3/create-asa-accounts-batch", fasthttp.MethodPost, reqDto)
- var response dto.IsSuccessRespDto
+func (client *ManagementClient) CreateGroup(reqDto *dto.CreateGroupReqDto) *dto.GroupSingleRespDto {
+ b, err := client.SendHttpRequest("/api/v3/create-group", fasthttp.MethodPost, reqDto)
+ var response dto.GroupSingleRespDto
if err != nil {
fmt.Println(err)
return nil
@@ -3895,14 +4152,14 @@ func (client *ManagementClient) CreateAsaAccountBatch(reqDto *dto.CreateAsaAccou
}
/*
- * @summary 更新 ASA 账号
- * @description 更新某个 ASA 账号信息
- * @param requestBody
- * @returns AsaAccountSingleRespDto
+* @summary 创建或修改分组
+* @description 不存在时则创建,存在时则进行更新。
+* @param requestBody
+* @returns CreateOrUpdateGroupRespDto
*/
-func (client *ManagementClient) UpdateAsaAccount(reqDto *dto.UpdateAsaAccountDto) *dto.AsaAccountSingleRespDto {
- b, err := client.SendHttpRequest("/api/v3/update-asa-account", fasthttp.MethodPost, reqDto)
- var response dto.AsaAccountSingleRespDto
+func (client *ManagementClient) CreateOrUpdateGroup(reqDto *dto.CreateOrUpdateGroupReqDto) *dto.CreateOrUpdateGroupRespDto {
+ b, err := client.SendHttpRequest("/api/v3/create-or-update-group", fasthttp.MethodPost, reqDto)
+ var response dto.CreateOrUpdateGroupRespDto
if err != nil {
fmt.Println(err)
return nil
@@ -3916,16 +4173,14 @@ func (client *ManagementClient) UpdateAsaAccount(reqDto *dto.UpdateAsaAccountDto
}
/*
- * @summary 获取 ASA 账号列表
- * @description 分页获取某一应用下的 ASA 账号列表
- * @param appId 所属应用 ID
- * @param page 当前页数,从 1 开始
- * @param limit 每页数目,最大不能超过 50,默认为 10
- * @returns AsaAccountPaginatedRespDto
+* @summary 批量创建分组
+* @description 批量创建分组,一个分组必须包含分组名称与唯一标志符 code,且必须为一个合法的英文标志符,如 developers。
+* @param requestBody
+* @returns GroupListRespDto
*/
-func (client *ManagementClient) ListAsaAccount(reqDto *dto.ListAsaAccountsDto) *dto.AsaAccountPaginatedRespDto {
- b, err := client.SendHttpRequest("/api/v3/list-asa-accounts", fasthttp.MethodGet, reqDto)
- var response dto.AsaAccountPaginatedRespDto
+func (client *ManagementClient) CreateGroupsBatch(reqDto *dto.CreateGroupBatchReqDto) *dto.GroupListRespDto {
+ b, err := client.SendHttpRequest("/api/v3/create-groups-batch", fasthttp.MethodPost, reqDto)
+ var response dto.GroupListRespDto
if err != nil {
fmt.Println(err)
return nil
@@ -3939,15 +4194,14 @@ func (client *ManagementClient) ListAsaAccount(reqDto *dto.ListAsaAccountsDto) *
}
/*
- * @summary 获取 ASA 账号
- * @description 根据 ASA 账号 ID 获取账号详细信息
- * @param appId 所属应用 ID
- * @param accountId ASA 账号 ID
- * @returns AsaAccountSingleRespDto
+* @summary 修改分组
+* @description 通过分组 code,修改分组,可以修改此分组的 code。
+* @param requestBody
+* @returns GroupSingleRespDto
*/
-func (client *ManagementClient) GetAsaAccount(reqDto *dto.GetAsaAccountDto) *dto.AsaAccountSingleRespDto {
- b, err := client.SendHttpRequest("/api/v3/get-asa-account", fasthttp.MethodGet, reqDto)
- var response dto.AsaAccountSingleRespDto
+func (client *ManagementClient) UpdateGroup(reqDto *dto.UpdateGroupReqDto) *dto.GroupSingleRespDto {
+ b, err := client.SendHttpRequest("/api/v3/update-group", fasthttp.MethodPost, reqDto)
+ var response dto.GroupSingleRespDto
if err != nil {
fmt.Println(err)
return nil
@@ -3961,14 +4215,14 @@ func (client *ManagementClient) GetAsaAccount(reqDto *dto.GetAsaAccountDto) *dto
}
/*
- * @summary 批量获取 ASA 账号
- * @description 根据 ASA 账号 ID 列表批量获取账号详细信息
- * @param requestBody
- * @returns AsaAccountListRespDto
+* @summary 批量删除分组
+* @description 通过分组 code,批量删除分组。
+* @param requestBody
+* @returns IsSuccessRespDto
*/
-func (client *ManagementClient) GetAsaAccountBatch(reqDto *dto.GetAsaAccountBatchDto) *dto.AsaAccountListRespDto {
- b, err := client.SendHttpRequest("/api/v3/get-asa-accounts-batch", fasthttp.MethodPost, reqDto)
- var response dto.AsaAccountListRespDto
+func (client *ManagementClient) DeleteGroupsBatch(reqDto *dto.DeleteGroupsReqDto) *dto.IsSuccessRespDto {
+ b, err := client.SendHttpRequest("/api/v3/delete-groups-batch", fasthttp.MethodPost, reqDto)
+ var response dto.IsSuccessRespDto
if err != nil {
fmt.Println(err)
return nil
@@ -3982,13 +4236,13 @@ func (client *ManagementClient) GetAsaAccountBatch(reqDto *dto.GetAsaAccountBatc
}
/*
- * @summary 删除 ASA 账号
- * @description 通过 ASA 账号 ID 删除 ASA 账号
- * @param requestBody
- * @returns IsSuccessRespDto
+* @summary 添加分组成员
+* @description 添加分组成员,成员以用户 ID 数组形式传递。
+* @param requestBody
+* @returns IsSuccessRespDto
*/
-func (client *ManagementClient) DeleteAsaAccount(reqDto *dto.DeleteAsaAccountDto) *dto.IsSuccessRespDto {
- b, err := client.SendHttpRequest("/api/v3/delete-asa-account", fasthttp.MethodPost, reqDto)
+func (client *ManagementClient) AddGroupMembers(reqDto *dto.AddGroupMembersReqDto) *dto.IsSuccessRespDto {
+ b, err := client.SendHttpRequest("/api/v3/add-group-members", fasthttp.MethodPost, reqDto)
var response dto.IsSuccessRespDto
if err != nil {
fmt.Println(err)
@@ -4003,13 +4257,13 @@ func (client *ManagementClient) DeleteAsaAccount(reqDto *dto.DeleteAsaAccountDto
}
/*
- * @summary 批量删除 ASA 账号
- * @description 通过 ASA 账号 ID 批量删除 ASA 账号
- * @param requestBody
- * @returns IsSuccessRespDto
+* @summary 批量移除分组成员
+* @description 批量移除分组成员,成员以用户 ID 数组形式传递。
+* @param requestBody
+* @returns IsSuccessRespDto
*/
-func (client *ManagementClient) DeleteAsaAccountBatch(reqDto *dto.DeleteAsaAccountBatchDto) *dto.IsSuccessRespDto {
- b, err := client.SendHttpRequest("/api/v3/delete-asa-accounts-batch", fasthttp.MethodPost, reqDto)
+func (client *ManagementClient) RemoveGroupMembers(reqDto *dto.RemoveGroupMembersReqDto) *dto.IsSuccessRespDto {
+ b, err := client.SendHttpRequest("/api/v3/remove-group-members", fasthttp.MethodPost, reqDto)
var response dto.IsSuccessRespDto
if err != nil {
fmt.Println(err)
@@ -4024,13 +4278,84 @@ func (client *ManagementClient) DeleteAsaAccountBatch(reqDto *dto.DeleteAsaAccou
}
/*
- * @summary 分配 ASA 账号
- * @description 分配 ASA 账号给用户、组织、分组或角色
- * @param requestBody
- * @returns IsSuccessRespDto
+* @summary 获取分组成员列表
+* @description 通过分组 code,获取分组成员列表,支持分页,可以获取自定义数据、identities、部门 ID 列表。
+* @param code 分组 code
+* @param page 当前页数,从 1 开始
+* @param limit 每页数目,最大不能超过 50,默认为 10
+* @param withCustomData 是否获取自定义数据
+* @param withIdentities 是否获取 identities
+* @param withDepartmentIds 是否获取部门 ID 列表
+* @returns UserPaginatedRespDto
*/
-func (client *ManagementClient) AssignAsaAccount(reqDto *dto.AssignAsaAccountsDto) *dto.IsSuccessRespDto {
- b, err := client.SendHttpRequest("/api/v3/assign-asa-account", fasthttp.MethodPost, reqDto)
+func (client *ManagementClient) ListGroupMembers(reqDto *dto.ListGroupMembersDto) *dto.UserPaginatedRespDto {
+ b, err := client.SendHttpRequest("/api/v3/list-group-members", fasthttp.MethodGet, reqDto)
+ var response dto.UserPaginatedRespDto
+ if err != nil {
+ fmt.Println(err)
+ return nil
+ }
+ err = json.Unmarshal(b, &response)
+ if err != nil {
+ fmt.Println(err)
+ return nil
+ }
+ return &response
+}
+
+/*
+* @summary 获取分组被授权的资源列表
+* @description 通过分组 code,获取分组被授权的资源列表,可以通过资源类型、权限分组 code 筛选。
+* @param code 分组 code
+* @param namespace 所属权限分组(权限空间)的 Code
+* @param resourceType 资源类型
+* @returns AuthorizedResourceListRespDto
+ */
+func (client *ManagementClient) GetGroupAuthorizedResources(reqDto *dto.GetGroupAuthorizedResourcesDto) *dto.AuthorizedResourceListRespDto {
+ b, err := client.SendHttpRequest("/api/v3/get-group-authorized-resources", fasthttp.MethodGet, reqDto)
+ var response dto.AuthorizedResourceListRespDto
+ if err != nil {
+ fmt.Println(err)
+ return nil
+ }
+ err = json.Unmarshal(b, &response)
+ if err != nil {
+ fmt.Println(err)
+ return nil
+ }
+ return &response
+}
+
+/*
+* @summary 获取角色详情
+* @description 通过权限分组内角色 code,获取角色详情。
+* @param code 权限分组(权限空间)内角色的唯一标识符
+* @param namespace 所属权限分组(权限空间)的 Code
+* @returns RoleSingleRespDto
+ */
+func (client *ManagementClient) GetRole(reqDto *dto.GetRoleDto) *dto.RoleSingleRespDto {
+ b, err := client.SendHttpRequest("/api/v3/get-role", fasthttp.MethodGet, reqDto)
+ var response dto.RoleSingleRespDto
+ if err != nil {
+ fmt.Println(err)
+ return nil
+ }
+ err = json.Unmarshal(b, &response)
+ if err != nil {
+ fmt.Println(err)
+ return nil
+ }
+ return &response
+}
+
+/*
+* @summary 单个角色批量授权
+* @description 通过权限分组内角色 code,分配角色,被分配者可以是用户或部门。
+* @param requestBody
+* @returns IsSuccessRespDto
+ */
+func (client *ManagementClient) AssignRole(reqDto *dto.AssignRoleDto) *dto.IsSuccessRespDto {
+ b, err := client.SendHttpRequest("/api/v3/assign-role", fasthttp.MethodPost, reqDto)
var response dto.IsSuccessRespDto
if err != nil {
fmt.Println(err)
@@ -4045,13 +4370,13 @@ func (client *ManagementClient) AssignAsaAccount(reqDto *dto.AssignAsaAccountsDt
}
/*
- * @summary 取消分配 ASA 账号
- * @description 取消分配给用户、组织、分组或角色的 ASA 账号
- * @param requestBody
- * @returns IsSuccessRespDto
+* @summary 批量分配角色
+* @description 批量分配角色,被分配者可以是用户,可以是部门
+* @param requestBody
+* @returns IsSuccessRespDto
*/
-func (client *ManagementClient) UnassignAsaAccount(reqDto *dto.AssignAsaAccountsDto) *dto.IsSuccessRespDto {
- b, err := client.SendHttpRequest("/api/v3/unassign-asa-account", fasthttp.MethodPost, reqDto)
+func (client *ManagementClient) AssignRoleBatch(reqDto *dto.AssignRoleBatchDto) *dto.IsSuccessRespDto {
+ b, err := client.SendHttpRequest("/api/v3/assign-role-batch", fasthttp.MethodPost, reqDto)
var response dto.IsSuccessRespDto
if err != nil {
fmt.Println(err)
@@ -4066,17 +4391,14 @@ func (client *ManagementClient) UnassignAsaAccount(reqDto *dto.AssignAsaAccounts
}
/*
- * @summary 获取 ASA 账号分配的主体列表
- * @description 根据 ASA 账号 ID 分页获取账号被分配的主体列表
- * @param appId 所属应用 ID
- * @param accountId ASA 账号 ID
- * @param page 当前页数,从 1 开始
- * @param limit 每页数目,最大不能超过 50,默认为 10
- * @returns GetAsaAccountAssignedTargetRespDto
+* @summary 移除分配的角色
+* @description 通过权限分组内角色 code,移除分配的角色,被分配者可以是用户或部门。
+* @param requestBody
+* @returns IsSuccessRespDto
*/
-func (client *ManagementClient) GetAsaAccountAssignedTargets(reqDto *dto.GetAsaAccountAssignedTargetsDto) *dto.GetAsaAccountAssignedTargetRespDto {
- b, err := client.SendHttpRequest("/api/v3/get-asa-account-assigned-targets", fasthttp.MethodGet, reqDto)
- var response dto.GetAsaAccountAssignedTargetRespDto
+func (client *ManagementClient) RevokeRole(reqDto *dto.RevokeRoleDto) *dto.IsSuccessRespDto {
+ b, err := client.SendHttpRequest("/api/v3/revoke-role", fasthttp.MethodPost, reqDto)
+ var response dto.IsSuccessRespDto
if err != nil {
fmt.Println(err)
return nil
@@ -4090,26 +4412,14 @@ func (client *ManagementClient) GetAsaAccountAssignedTargets(reqDto *dto.GetAsaA
}
/*
- * @summary 获取主体被分配的 ASA 账号
- * @description 根据主体类型和标识获取直接分配给主体的 ASA 账号
- * @param appId 所属应用 ID
- * @param targetType 目标对象类型:
- * - `USER`: 用户
- * - `ROLE`: 角色
- * - `GROUP`: 分组
- * - `DEPARTMENT`: 部门
- *
- * @param targetIdentifier 目标对象的唯一标志符:
- * - 如果是用户,为用户的 ID,如 `6343b98b7cfxxx9366e9b7c`
- * - 如果是角色,为角色的 code,如 `admin`
- * - 如果是分组,为分组的 code,如 `developer`
- * - 如果是部门,为部门的 ID,如 `6343bafc019xxxx889206c4c`
- *
- * @returns AsaAccountSingleNullableRespDto
+* @summary 批量移除分配的角色
+* @description 批量移除分配的角色,被分配者可以是用户,可以是部门
+* @param requestBody
+* @returns IsSuccessRespDto
*/
-func (client *ManagementClient) GetAssignedAccount(reqDto *dto.GetAssignedAccountDto) *dto.AsaAccountSingleNullableRespDto {
- b, err := client.SendHttpRequest("/api/v3/get-assigned-account", fasthttp.MethodGet, reqDto)
- var response dto.AsaAccountSingleNullableRespDto
+func (client *ManagementClient) RevokeRoleBatch(reqDto *dto.RevokeRoleBatchDto) *dto.IsSuccessRespDto {
+ b, err := client.SendHttpRequest("/api/v3/revoke-role-batch", fasthttp.MethodPost, reqDto)
+ var response dto.IsSuccessRespDto
if err != nil {
fmt.Println(err)
return nil
@@ -4123,13 +4433,16 @@ func (client *ManagementClient) GetAssignedAccount(reqDto *dto.GetAssignedAccoun
}
/*
- * @summary 获取安全配置
- * @description 无需传参获取安全配置
- * @returns SecuritySettingsRespDto
+* @summary 获取角色被授权的资源列表
+* @description 通过权限分组内角色 code,获取角色被授权的资源列表。
+* @param code 权限分组内角色的唯一标识符
+* @param namespace 所属权限分组的 code
+* @param resourceType 资源类型,如 数据、API、按钮、菜单
+* @returns RoleAuthorizedResourcePaginatedRespDto
*/
-func (client *ManagementClient) GetSecuritySettings() *dto.SecuritySettingsRespDto {
- b, err := client.SendHttpRequest("/api/v3/get-security-settings", fasthttp.MethodGet, nil)
- var response dto.SecuritySettingsRespDto
+func (client *ManagementClient) GetRoleAuthorizedResources(reqDto *dto.GetRoleAuthorizedResourcesDto) *dto.RoleAuthorizedResourcePaginatedRespDto {
+ b, err := client.SendHttpRequest("/api/v3/get-role-authorized-resources", fasthttp.MethodGet, reqDto)
+ var response dto.RoleAuthorizedResourcePaginatedRespDto
if err != nil {
fmt.Println(err)
return nil
@@ -4143,14 +4456,20 @@ func (client *ManagementClient) GetSecuritySettings() *dto.SecuritySettingsRespD
}
/*
- * @summary 修改安全配置
- * @description 可选安全域、Authing Token 有效时间(秒)、验证码长度、验证码尝试次数、用户修改邮箱的安全策略、用户修改手机号的安全策略、Cookie 过期时间设置、是否禁止用户注册、频繁注册检测配置、验证码注册后是否要求用户设置密码、未验证的邮箱登录时是否禁止登录并发送认证邮件、用户自助解锁配置、Authing 登录页面是否开启登录账号选择、APP 扫码登录安全配置进行修改安全配置
- * @param requestBody
- * @returns SecuritySettingsRespDto
+* @summary 获取角色成员列表
+* @description 通过权限分组内内角色 code,获取角色成员列表,支持分页,可以选择或获取自定义数据、identities 等。
+* @param code 权限分组内角色的唯一标识符
+* @param page 当前页数,从 1 开始
+* @param limit 每页数目,最大不能超过 50,默认为 10
+* @param withCustomData 是否获取自定义数据
+* @param withIdentities 是否获取 identities
+* @param withDepartmentIds 是否获取部门 ID 列表
+* @param namespace 所属权限分组的 code
+* @returns UserPaginatedRespDto
*/
-func (client *ManagementClient) UpdateSecuritySettings(reqDto *dto.UpdateSecuritySettingsDto) *dto.SecuritySettingsRespDto {
- b, err := client.SendHttpRequest("/api/v3/update-security-settings", fasthttp.MethodPost, reqDto)
- var response dto.SecuritySettingsRespDto
+func (client *ManagementClient) ListRoleMembers(reqDto *dto.ListRoleMembersDto) *dto.UserPaginatedRespDto {
+ b, err := client.SendHttpRequest("/api/v3/list-role-members", fasthttp.MethodGet, reqDto)
+ var response dto.UserPaginatedRespDto
if err != nil {
fmt.Println(err)
return nil
@@ -4164,13 +4483,17 @@ func (client *ManagementClient) UpdateSecuritySettings(reqDto *dto.UpdateSecurit
}
/*
- * @summary 获取全局多因素认证配置
- * @description 无需传参获取全局多因素认证配置
- * @returns MFASettingsRespDto
+* @summary 获取角色的部门列表
+* @description 通过权限分组内角色 code,获取角色的部门列表,支持分页。
+* @param code 权限分组内角色的唯一标识符
+* @param namespace 所属权限分组的 code
+* @param page 当前页数,从 1 开始
+* @param limit 每页数目,最大不能超过 50,默认为 10
+* @returns RoleDepartmentListPaginatedRespDto
*/
-func (client *ManagementClient) GetGlobalMfaSettings() *dto.MFASettingsRespDto {
- b, err := client.SendHttpRequest("/api/v3/get-global-mfa-settings", fasthttp.MethodGet, nil)
- var response dto.MFASettingsRespDto
+func (client *ManagementClient) ListRoleDepartments(reqDto *dto.ListRoleDepartmentsDto) *dto.RoleDepartmentListPaginatedRespDto {
+ b, err := client.SendHttpRequest("/api/v3/list-role-departments", fasthttp.MethodGet, reqDto)
+ var response dto.RoleDepartmentListPaginatedRespDto
if err != nil {
fmt.Println(err)
return nil
@@ -4184,14 +4507,14 @@ func (client *ManagementClient) GetGlobalMfaSettings() *dto.MFASettingsRespDto {
}
/*
- * @summary 修改全局多因素认证配置
- * @description 传入 MFA 认证因素列表进行开启,
- * @param requestBody
- * @returns MFASettingsRespDto
+* @summary 创建角色
+* @description 通过权限分组(权限空间)内角色 code,创建角色,可以选择权限分组、角色描述、角色名称等。
+* @param requestBody
+* @returns RoleSingleRespDto
*/
-func (client *ManagementClient) UpdateGlobalMfaSettings(reqDto *dto.MFASettingsDto) *dto.MFASettingsRespDto {
- b, err := client.SendHttpRequest("/api/v3/update-global-mfa-settings", fasthttp.MethodPost, reqDto)
- var response dto.MFASettingsRespDto
+func (client *ManagementClient) CreateRole(reqDto *dto.CreateRoleDto) *dto.RoleSingleRespDto {
+ b, err := client.SendHttpRequest("/api/v3/create-role", fasthttp.MethodPost, reqDto)
+ var response dto.RoleSingleRespDto
if err != nil {
fmt.Println(err)
return nil
@@ -4205,14 +4528,17 @@ func (client *ManagementClient) UpdateGlobalMfaSettings(reqDto *dto.MFASettingsD
}
/*
- * @summary 创建权限空间
- * @description 创建权限空间,可以设置权限空间名称、Code 和描述信息。
- * @param requestBody
- * @returns CreatePermissionNamespaceResponseDto
+* @summary 获取角色列表
+* @description 获取角色列表,支持分页、支持根据权限分组(权限空间)筛选
+* @param page 当前页数,从 1 开始
+* @param limit 每页数目,最大不能超过 50,默认为 10
+* @param keywords 用于根据角色的 code 或者名称进行模糊搜索,可选。
+* @param namespace 所属权限分组(权限空间)的 code
+* @returns RolePaginatedRespDto
*/
-func (client *ManagementClient) CreatePermissionNamespace(reqDto *dto.CreatePermissionNamespaceDto) *dto.CreatePermissionNamespaceResponseDto {
- b, err := client.SendHttpRequest("/api/v3/create-permission-namespace", fasthttp.MethodPost, reqDto)
- var response dto.CreatePermissionNamespaceResponseDto
+func (client *ManagementClient) ListRoles(reqDto *dto.ListRolesDto) *dto.RolePaginatedRespDto {
+ b, err := client.SendHttpRequest("/api/v3/list-roles", fasthttp.MethodGet, reqDto)
+ var response dto.RolePaginatedRespDto
if err != nil {
fmt.Println(err)
return nil
@@ -4226,13 +4552,13 @@ func (client *ManagementClient) CreatePermissionNamespace(reqDto *dto.CreatePerm
}
/*
- * @summary 批量创建权限空间
- * @description 批量创建权限空间,可以分别设置权限空间名称、Code 和描述信息。
- * @param requestBody
- * @returns IsSuccessRespDto
+* @summary 单个权限分组(权限空间)内删除角色
+* @description 单个权限分组(权限空间)内删除角色,可以批量删除。
+* @param requestBody
+* @returns IsSuccessRespDto
*/
-func (client *ManagementClient) CreatePermissionNamespacesBatch(reqDto *dto.CreatePermissionNamespacesBatchDto) *dto.IsSuccessRespDto {
- b, err := client.SendHttpRequest("/api/v3/create-permission-namespaces-batch", fasthttp.MethodPost, reqDto)
+func (client *ManagementClient) DeleteRolesBatch(reqDto *dto.DeleteRoleDto) *dto.IsSuccessRespDto {
+ b, err := client.SendHttpRequest("/api/v3/delete-roles-batch", fasthttp.MethodPost, reqDto)
var response dto.IsSuccessRespDto
if err != nil {
fmt.Println(err)
@@ -4247,14 +4573,14 @@ func (client *ManagementClient) CreatePermissionNamespacesBatch(reqDto *dto.Crea
}
/*
- * @summary 获取权限空间详情
- * @description 通过权限空间唯一标志符(Code),获取权限空间详情。
- * @param code 权限空间 Code
- * @returns GetPermissionNamespaceResponseDto
+* @summary 批量创建角色
+* @description 批量创建角色,可以选择权限分组、角色描述等。
+* @param requestBody
+* @returns IsSuccessRespDto
*/
-func (client *ManagementClient) GetPermissionNamespace(reqDto *dto.GetPermissionNamespaceDto) *dto.GetPermissionNamespaceResponseDto {
- b, err := client.SendHttpRequest("/api/v3/get-permission-namespace", fasthttp.MethodGet, reqDto)
- var response dto.GetPermissionNamespaceResponseDto
+func (client *ManagementClient) CreateRolesBatch(reqDto *dto.CreateRolesBatch) *dto.IsSuccessRespDto {
+ b, err := client.SendHttpRequest("/api/v3/create-roles-batch", fasthttp.MethodPost, reqDto)
+ var response dto.IsSuccessRespDto
if err != nil {
fmt.Println(err)
return nil
@@ -4268,14 +4594,14 @@ func (client *ManagementClient) GetPermissionNamespace(reqDto *dto.GetPermission
}
/*
- * @summary 批量获取权限空间详情列表
- * @description 分别通过权限空间唯一标志符(Code),获取权限空间详情。
- * @param codes 权限空间 code 列表,批量可以使用逗号分隔
- * @returns GetPermissionNamespaceListResponseDto
+* @summary 修改角色
+* @description 通过权限分组(权限空间)内角色新旧 Code,修改角色,可以选择角色名称、角色描述等。
+* @param requestBody
+* @returns IsSuccessRespDto
*/
-func (client *ManagementClient) GetPermissionNamespacesBatch(reqDto *dto.GetPermissionNamespacesBatchDto) *dto.GetPermissionNamespaceListResponseDto {
- b, err := client.SendHttpRequest("/api/v3/get-permission-namespaces-batch", fasthttp.MethodGet, reqDto)
- var response dto.GetPermissionNamespaceListResponseDto
+func (client *ManagementClient) UpdateRole(reqDto *dto.UpdateRoleDto) *dto.IsSuccessRespDto {
+ b, err := client.SendHttpRequest("/api/v3/update-role", fasthttp.MethodPost, reqDto)
+ var response dto.IsSuccessRespDto
if err != nil {
fmt.Println(err)
return nil
@@ -4289,16 +4615,14 @@ func (client *ManagementClient) GetPermissionNamespacesBatch(reqDto *dto.GetPerm
}
/*
- * @summary 分页获取权限空间列表
- * @description 分页获取权限空间列表。
- * @param page 当前页数,从 1 开始
- * @param limit 每页数目,最大不能超过 50,默认为 10
- * @param query 权限空间 name
- * @returns PermissionNamespaceListPaginatedRespDto
+* @summary 跨权限分组(空间)删除角色
+* @description 跨权限分组(空间)删除角色,可以批量删除。
+* @param requestBody
+* @returns IsSuccessRespDto
*/
-func (client *ManagementClient) ListPermissionNamespaces(reqDto *dto.ListPermissionNamespacesDto) *dto.PermissionNamespaceListPaginatedRespDto {
- b, err := client.SendHttpRequest("/api/v3/list-permission-namespaces", fasthttp.MethodGet, reqDto)
- var response dto.PermissionNamespaceListPaginatedRespDto
+func (client *ManagementClient) DeleteRoles(reqDto *dto.DeleteRoleBatchDto) *dto.IsSuccessRespDto {
+ b, err := client.SendHttpRequest("/api/v3/multiple-namespace-delete-roles-batch", fasthttp.MethodPost, reqDto)
+ var response dto.IsSuccessRespDto
if err != nil {
fmt.Println(err)
return nil
@@ -4312,14 +4636,14 @@ func (client *ManagementClient) ListPermissionNamespaces(reqDto *dto.ListPermiss
}
/*
- * @summary 修改权限空间
- * @description 修改权限空间,可以修改权限空间名称、权限空间描述信息以及权限空间新的唯一标志符(Code)。
- * @param requestBody
- * @returns UpdatePermissionNamespaceResponseDto
+* @summary 校验角色 Code 或者名称是否可用
+* @description 通过用户池 ID、权限空间 Code和角色 Code,或者用户池 ID、权限空间名称和角色名称查询是否可用。
+* @param requestBody
+* @returns RoleCheckParamsRespDto
*/
-func (client *ManagementClient) UpdatePermissionNamespace(reqDto *dto.UpdatePermissionNamespaceDto) *dto.UpdatePermissionNamespaceResponseDto {
- b, err := client.SendHttpRequest("/api/v3/update-permission-namespace", fasthttp.MethodPost, reqDto)
- var response dto.UpdatePermissionNamespaceResponseDto
+func (client *ManagementClient) CheckParamsNamespace(reqDto *dto.CheckRoleParamsDto) *dto.RoleCheckParamsRespDto {
+ b, err := client.SendHttpRequest("/api/v3/check-role-params", fasthttp.MethodPost, reqDto)
+ var response dto.RoleCheckParamsRespDto
if err != nil {
fmt.Println(err)
return nil
@@ -4333,14 +4657,19 @@ func (client *ManagementClient) UpdatePermissionNamespace(reqDto *dto.UpdatePerm
}
/*
- * @summary 删除权限空间
- * @description 通过权限空间唯一标志符(Code),删除权限空间信息。
- * @param requestBody
- * @returns IsSuccessRespDto
+* @summary 获取角色授权列表
+* @description 获取角色授权列表。
+* @param roleCode 角色 code,只能使用字母、数字和 -_,最多 50 字符
+* @param page 当前页数,从 1 开始
+* @param limit 每页数目,最大不能超过 50,默认为 10
+* @param query 按角色 Code 或者角色名称查询
+* @param namespaceCode 权限空间code
+* @param targetType 目标类型,接受用户,部门
+* @returns RoleListPageRespDto
*/
-func (client *ManagementClient) DeletePermissionNamespace(reqDto *dto.DeletePermissionNamespaceDto) *dto.IsSuccessRespDto {
- b, err := client.SendHttpRequest("/api/v3/delete-permission-namespace", fasthttp.MethodPost, reqDto)
- var response dto.IsSuccessRespDto
+func (client *ManagementClient) ListRoleAssignments(reqDto *dto.ListRoleAssignmentsDto) *dto.RoleListPageRespDto {
+ b, err := client.SendHttpRequest("/api/v3/list-role-assignments", fasthttp.MethodGet, reqDto)
+ var response dto.RoleListPageRespDto
if err != nil {
fmt.Println(err)
return nil
@@ -4354,13 +4683,34 @@ func (client *ManagementClient) DeletePermissionNamespace(reqDto *dto.DeletePerm
}
/*
- * @summary 批量删除权限空间
- * @description 分别通过权限空间唯一标志符(Code),批量删除权限空间信息。
- * @param requestBody
- * @returns IsSuccessRespDto
+* @summary 创建管理员角色
+* @description 通过角色 code、角色名称进行创建管理员角色,可以选择角色描述
+* @param requestBody
+* @returns RoleCheckParamsRespDto
*/
-func (client *ManagementClient) DeletePermissionNamespacesBatch(reqDto *dto.DeletePermissionNamespacesBatchDto) *dto.IsSuccessRespDto {
- b, err := client.SendHttpRequest("/api/v3/delete-permission-namespaces-batch", fasthttp.MethodPost, reqDto)
+func (client *ManagementClient) CreateAdminRole(reqDto *dto.CreateAdminRoleDto) *dto.RoleCheckParamsRespDto {
+ b, err := client.SendHttpRequest("/api/v3/create-admin-role", fasthttp.MethodPost, reqDto)
+ var response dto.RoleCheckParamsRespDto
+ if err != nil {
+ fmt.Println(err)
+ return nil
+ }
+ err = json.Unmarshal(b, &response)
+ if err != nil {
+ fmt.Println(err)
+ return nil
+ }
+ return &response
+}
+
+/*
+* @summary 删除管理员自定义角色
+* @description 删除管理员自定义角色,支持批量删除。
+* @param requestBody
+* @returns IsSuccessRespDto
+ */
+func (client *ManagementClient) DeleteAdminRolesBatch(reqDto *dto.DeleteAdminRoleDto) *dto.IsSuccessRespDto {
+ b, err := client.SendHttpRequest("/api/v3/delete-admin-roles", fasthttp.MethodPost, reqDto)
var response dto.IsSuccessRespDto
if err != nil {
fmt.Println(err)
@@ -4375,14 +4725,15 @@ func (client *ManagementClient) DeletePermissionNamespacesBatch(reqDto *dto.Dele
}
/*
- * @summary 校验权限空间 Code 或者名称是否可用
- * @description 通过用户池 ID 和权限空间 Code,或者用户池 ID 和权限空间名称查询是否可用。
- * @param requestBody
- * @returns PermissionNamespaceCheckExistsRespDto
+* @summary 获取身份源列表
+* @description 获取身份源列表,可以指定 租户 ID 筛选。
+* @param tenantId 租户 ID
+* @param appId 应用 ID
+* @returns ExtIdpListPaginatedRespDto
*/
-func (client *ManagementClient) CheckPermissionNamespaceExists(reqDto *dto.CheckPermissionNamespaceExistsDto) *dto.PermissionNamespaceCheckExistsRespDto {
- b, err := client.SendHttpRequest("/api/v3/check-permission-namespace-exists", fasthttp.MethodPost, reqDto)
- var response dto.PermissionNamespaceCheckExistsRespDto
+func (client *ManagementClient) ListExtIdp(reqDto *dto.ListExtIdpDto) *dto.ExtIdpListPaginatedRespDto {
+ b, err := client.SendHttpRequest("/api/v3/list-ext-idp", fasthttp.MethodGet, reqDto)
+ var response dto.ExtIdpListPaginatedRespDto
if err != nil {
fmt.Println(err)
return nil
@@ -4396,17 +4747,17 @@ func (client *ManagementClient) CheckPermissionNamespaceExists(reqDto *dto.Check
}
/*
- * @summary 分页查询权限空间下所有的角色列表
- * @description 分页查询权限空间下所有的角色列表,分页获取权限空间下所有的角色列表。
- * @param code 权限分组唯一标志符 Code
- * @param page 当前页数,从 1 开始
- * @param limit 每页数目,最大不能超过 50,默认为 10
- * @param query 角色 Code 或者名称
- * @returns PermissionNamespaceRolesListPaginatedRespDto
+* @summary 获取身份源详情
+* @description 通过 身份源 ID,获取身份源详情,可以指定 租户 ID 筛选。
+* @param id 身份源 ID
+* @param tenantId 租户 ID
+* @param appId 应用 ID
+* @param type 身份源类型
+* @returns ExtIdpDetailSingleRespDto
*/
-func (client *ManagementClient) ListPermissionNamespaceRoles(reqDto *dto.ListPermissionNamespaceRolesDto) *dto.PermissionNamespaceRolesListPaginatedRespDto {
- b, err := client.SendHttpRequest("/api/v3/list-permission-namespace-roles", fasthttp.MethodGet, reqDto)
- var response dto.PermissionNamespaceRolesListPaginatedRespDto
+func (client *ManagementClient) GetExtIdp(reqDto *dto.GetExtIdpDto) *dto.ExtIdpDetailSingleRespDto {
+ b, err := client.SendHttpRequest("/api/v3/get-ext-idp", fasthttp.MethodGet, reqDto)
+ var response dto.ExtIdpDetailSingleRespDto
if err != nil {
fmt.Println(err)
return nil
@@ -4420,72 +4771,14 @@ func (client *ManagementClient) ListPermissionNamespaceRoles(reqDto *dto.ListPer
}
/*
- * @summary 创建数据资源
- * @description 该接口用于创建数据资源,通过数据资源所属权限空间 Code、数据资源名称、数据资源 Code、数据资源类型(STRING、ARRAY、TREE)以及数据操作列表进行创建,
- * 通过不同的数据资源类型适配不同的场景。
- *
- * ### 创建数据资源字符串类型示例
- *
- * ```json
- * {
- * "namespaceCode": "examplePermissionNamespace",
- * "resourceName": "字符串资源1",
- * "resourceCode": "str1",
- * "type": "STRING",
- * "description": "这是一个数据资源字符串类型创建",
- * "struct":"str1",
- * "actions": ["get","read","update"]
- * }
- * ```
- *
- * ### 创建数据资源数组类型示例
- *
- * ```json
- * {
- * "namespaceCode": "examplePermissionNamespace",
- * "resourceName": "数组资源1",
- * "resourceCode": "array1",
- * "description": "这是一个数据资源数组类型创建",
- * "type": "ARRAY",
- * "struct":["array1", "array2", "array3"],
- * "actions": ["get","read","update"]
- * }
- * ```
- *
- * ### 创建数据资源树类型示例
- *
- * ```json
- * {
- * "namespaceCode": "examplePermissionNamespace",
- * "resourceName": "树资源1",
- * "resourceCode": "tree1",
- * "description": "这是一个数据资源树类型创建",
- * "type": "TREE",
- * "struct":[{
- * "code": "tree1",
- * "name": "tree1",
- * "value": "tree1",
- * "children": [{
- * "code": "tree2",
- * "name": "tree2",
- * "value": "tree2",
- * "children": [{
- * "code": "tree3",
- * "name": "tree3",
- * "value": "tree3"
- * }]
- * }]
- * }],
- * "actions": ["get","read","update"]
- * }
- * ```
- *
- * @param requestBody
- * @returns CreateDataResourceResponseDto
-*/
-func (client *ManagementClient) CreateDataResource(reqDto *dto.CreateDataResourceDto) *dto.CreateDataResourceResponseDto {
- b, err := client.SendHttpRequest("/api/v3/create-data-resource", fasthttp.MethodPost, reqDto)
- var response dto.CreateDataResourceResponseDto
+* @summary 创建身份源
+* @description 创建身份源,可以设置身份源名称、连接类型、租户 ID 等。
+* @param requestBody
+* @returns ExtIdpSingleRespDto
+ */
+func (client *ManagementClient) CreateExtIdp(reqDto *dto.CreateExtIdpDto) *dto.ExtIdpSingleRespDto {
+ b, err := client.SendHttpRequest("/api/v3/create-ext-idp", fasthttp.MethodPost, reqDto)
+ var response dto.ExtIdpSingleRespDto
if err != nil {
fmt.Println(err)
return nil
@@ -4499,14 +4792,14 @@ func (client *ManagementClient) CreateDataResource(reqDto *dto.CreateDataResourc
}
/*
- * @summary 创建字符串数据资源
- * @description 创建字符串数据资源,通过数据资源所属权限空间 Code、数据资源名称、数据资源 Code、数据资源节点和数据资源权限操作等字段进行创建
- * @param requestBody
- * @returns CreateStringDataResourceResponseDto
+* @summary 更新身份源配置
+* @description 更新身份源配置,可以设置身份源 ID 与 名称。
+* @param requestBody
+* @returns ExtIdpSingleRespDto
*/
-func (client *ManagementClient) CreateDataResourceByString(reqDto *dto.CreateStringDataResourceDto) *dto.CreateStringDataResourceResponseDto {
- b, err := client.SendHttpRequest("/api/v3/create-string-data-resource", fasthttp.MethodPost, reqDto)
- var response dto.CreateStringDataResourceResponseDto
+func (client *ManagementClient) UpdateExtIdp(reqDto *dto.UpdateExtIdpDto) *dto.ExtIdpSingleRespDto {
+ b, err := client.SendHttpRequest("/api/v3/update-ext-idp", fasthttp.MethodPost, reqDto)
+ var response dto.ExtIdpSingleRespDto
if err != nil {
fmt.Println(err)
return nil
@@ -4520,14 +4813,14 @@ func (client *ManagementClient) CreateDataResourceByString(reqDto *dto.CreateStr
}
/*
- * @summary 创建数组数据资源
- * @description 创建字符串数据资源,通过数据资源所属权限空间 Code、数据资源名称、数据资源 Code、数据资源节点和数据资源权限操作等字段进行创建
- * @param requestBody
- * @returns CreateArrayDataResourceResponseDto
+* @summary 删除身份源
+* @description 通过身份源 ID,删除身份源。
+* @param requestBody
+* @returns IsSuccessRespDto
*/
-func (client *ManagementClient) CreateDataResourceByArray(reqDto *dto.CreateArrayDataResourceDto) *dto.CreateArrayDataResourceResponseDto {
- b, err := client.SendHttpRequest("/api/v3/create-array-data-resource", fasthttp.MethodPost, reqDto)
- var response dto.CreateArrayDataResourceResponseDto
+func (client *ManagementClient) DeleteExtIdp(reqDto *dto.DeleteExtIdpDto) *dto.IsSuccessRespDto {
+ b, err := client.SendHttpRequest("/api/v3/delete-ext-idp", fasthttp.MethodPost, reqDto)
+ var response dto.IsSuccessRespDto
if err != nil {
fmt.Println(err)
return nil
@@ -4541,14 +4834,14 @@ func (client *ManagementClient) CreateDataResourceByArray(reqDto *dto.CreateArra
}
/*
- * @summary 创建树数据资源
- * @description 创建树数据资源,通过数据资源所属权限空间 Code、数据资源名称、数据资源 Code、数据资源节点和数据资源权限操作等字段进行创建
- * @param requestBody
- * @returns CreateTreeDataResourceResponseDto
+* @summary 在某个已有身份源下创建新连接
+* @description 在某个已有身份源下创建新连接,可以设置身份源图标、是否只支持登录等。
+* @param requestBody
+* @returns ExtIdpConnDetailSingleRespDto
*/
-func (client *ManagementClient) CreateDataResourceByTree(reqDto *dto.CreateTreeDataResourceDto) *dto.CreateTreeDataResourceResponseDto {
- b, err := client.SendHttpRequest("/api/v3/create-tree-data-resource", fasthttp.MethodPost, reqDto)
- var response dto.CreateTreeDataResourceResponseDto
+func (client *ManagementClient) CreateExtIdpConn(reqDto *dto.CreateExtIdpConnDto) *dto.ExtIdpConnDetailSingleRespDto {
+ b, err := client.SendHttpRequest("/api/v3/create-ext-idp-conn", fasthttp.MethodPost, reqDto)
+ var response dto.ExtIdpConnDetailSingleRespDto
if err != nil {
fmt.Println(err)
return nil
@@ -4562,17 +4855,14 @@ func (client *ManagementClient) CreateDataResourceByTree(reqDto *dto.CreateTreeD
}
/*
- * @summary 获取数据资源列表
- * @description 获取数据资源列表,可通过数据资源名称、数据资源 Code 和数据资源所属权限空间 Code 列表进行指定筛选。
- * @param page 当前页数,从 1 开始
- * @param limit 每页数目,最大不能超过 50,默认为 10
- * @param query 关键字搜索,可以是数据资源名称或者数据资源 Code
- * @param namespaceCodes 权限数据所属权限空间 Code 列表
- * @returns ListDataResourcesPaginatedRespDto
+* @summary 更新身份源连接
+* @description 更新身份源连接,可以设置身份源图标、是否只支持登录等。
+* @param requestBody
+* @returns ExtIdpConnDetailSingleRespDto
*/
-func (client *ManagementClient) ListDataResources(reqDto *dto.ListDataResourcesDto) *dto.ListDataResourcesPaginatedRespDto {
- b, err := client.SendHttpRequest("/api/v3/list-data-resources", fasthttp.MethodGet, reqDto)
- var response dto.ListDataResourcesPaginatedRespDto
+func (client *ManagementClient) UpdateExtIdpConn(reqDto *dto.UpdateExtIdpConnDto) *dto.ExtIdpConnDetailSingleRespDto {
+ b, err := client.SendHttpRequest("/api/v3/update-ext-idp-conn", fasthttp.MethodPost, reqDto)
+ var response dto.ExtIdpConnDetailSingleRespDto
if err != nil {
fmt.Println(err)
return nil
@@ -4586,15 +4876,14 @@ func (client *ManagementClient) ListDataResources(reqDto *dto.ListDataResourcesD
}
/*
- * @summary 获取数据资源信息
- * @description 获取数据资源,通过数据资源 ID 查询对应的数据资源信息,包含数据资源名称、数据资源 Code、数据资源类型(TREE、STRING、ARRAY)、数据资源所属权限空间 ID、数据资源所属权限空间 Code 以及数据资源操作列表等基本信息。
- * @param namespaceCode 数据资源所属的权限空间 Code
- * @param resourceCode 数据资源 Code,权限空间内唯一
- * @returns GetDataResourceResponseDto
+* @summary 删除身份源连接
+* @description 通过身份源连接 ID,删除身份源连接。
+* @param requestBody
+* @returns IsSuccessRespDto
*/
-func (client *ManagementClient) GetDataResource(reqDto *dto.GetDataResourceDto) *dto.GetDataResourceResponseDto {
- b, err := client.SendHttpRequest("/api/v3/get-data-resource", fasthttp.MethodGet, reqDto)
- var response dto.GetDataResourceResponseDto
+func (client *ManagementClient) DeleteExtIdpConn(reqDto *dto.DeleteExtIdpConnDto) *dto.IsSuccessRespDto {
+ b, err := client.SendHttpRequest("/api/v3/delete-ext-idp-conn", fasthttp.MethodPost, reqDto)
+ var response dto.IsSuccessRespDto
if err != nil {
fmt.Println(err)
return nil
@@ -4608,14 +4897,14 @@ func (client *ManagementClient) GetDataResource(reqDto *dto.GetDataResourceDto)
}
/*
- * @summary 修改数据资源
- * @description 修改数据资源,根据权限空间 Code 和数据资源 Code 查询原始信息,只允许修改数据资源名称、描述和数据资源节点。
- * @param requestBody
- * @returns UpdateDataResourceResponseDto
+* @summary 身份源连接开关
+* @description 身份源连接开关,可以打开或关闭身份源连接。
+* @param requestBody
+* @returns IsSuccessRespDto
*/
-func (client *ManagementClient) UpdateDataResource(reqDto *dto.UpdateDataResourceDto) *dto.UpdateDataResourceResponseDto {
- b, err := client.SendHttpRequest("/api/v3/update-data-resource", fasthttp.MethodPost, reqDto)
- var response dto.UpdateDataResourceResponseDto
+func (client *ManagementClient) ChangeExtIdpConnState(reqDto *dto.ChangeExtIdpConnStateDto) *dto.IsSuccessRespDto {
+ b, err := client.SendHttpRequest("/api/v3/change-ext-idp-conn-state", fasthttp.MethodPost, reqDto)
+ var response dto.IsSuccessRespDto
if err != nil {
fmt.Println(err)
return nil
@@ -4629,14 +4918,14 @@ func (client *ManagementClient) UpdateDataResource(reqDto *dto.UpdateDataResourc
}
/*
- * @summary 删除数据资源
- * @description 删除数据资源,根据数据资源 ID 删除对应的数据资源信息。
- * @param requestBody
- * @returns CommonResponseDto
+* @summary 租户关联身份源
+* @description 租户可以关联或取消关联身份源连接。
+* @param requestBody
+* @returns IsSuccessRespDto
*/
-func (client *ManagementClient) DeleteDataResource(reqDto *dto.DeleteDataResourceDto) *dto.CommonResponseDto {
- b, err := client.SendHttpRequest("/api/v3/delete-data-resource", fasthttp.MethodPost, reqDto)
- var response dto.CommonResponseDto
+func (client *ManagementClient) ChangeExtIdpConnAssociationState(reqDto *dto.ChangeExtIdpAssociationStateDto) *dto.IsSuccessRespDto {
+ b, err := client.SendHttpRequest("/api/v3/change-ext-idp-conn-association-state", fasthttp.MethodPost, reqDto)
+ var response dto.IsSuccessRespDto
if err != nil {
fmt.Println(err)
return nil
@@ -4650,91 +4939,4746 @@ func (client *ManagementClient) DeleteDataResource(reqDto *dto.DeleteDataResourc
}
/*
- * @summary 检查数据资源名称或者 Code 是否可用
- * @description 检查数据资源名称或者 Code 在权限空间内是否有效,通过数据资源名称或者数据资源 Code 以及所属权限空间 Code,判断在指定的权限空间内是否可用。
- *
- * ### 数据资源 Code 有效示例
- *
- * - 入参
- *
- * ```json
- * {
- * "namespaceCode": "examplePermissionNamespace",
- * "resourceCode": "test"
- * }
- * ```
- *
- * - 出参
- *
- * ```json
- * {
- * "statusCode": 200,
- * "message": "操作成功",
- * "apiCode": 0,
- * "data": {
- * "isValid": "true"
- * }
- * }
- * ```
- *
- * ### 数据资源名称有效示例
- *
- * - 入参
- *
- * ```json
- * {
- * "namespaceCode": "examplePermissionNamespace",
- * "resourceName": "test"
- * }
- * ```
- *
- * - 出参
- *
- * ```json
- * {
- * "statusCode": 200,
- * "message": "操作成功",
- * "apiCode": 0,
- * "data": {
- * "isValid": "true"
- * }
- * }
- * ```
- *
- * ### 数据资源 Code 无效示例
- *
- * - 入参
- *
- * ```json
- * {
- * "namespaceCode": "examplePermissionNamespace",
- * "resourceCode": "test"
- * }
- * ```
- *
- * - 出参
- *
- * ```json
- * {
- * "statusCode": 200,
- * "message": "操作成功",
- * "apiCode": 0,
- * "requestId": "934108e5-9fbf-4d24-8da1-c330328abd6c",
- * "data": {
- * "isValid": "false",
- * "message": "data resource code already exist"
- * }
- * }
- * ```
- *
- * @param namespaceCode 数据资源所属的权限空间 Code
- * @param resourceName 数据资源名称,权限空间内唯一
- * @param resourceCode 数据资源 Code,权限空间内唯一
- * @returns CheckParamsDataResourceResponseDto
-*/
-func (client *ManagementClient) CheckDataResourceExists(reqDto *dto.CheckDataResourceExistsDto) *dto.CheckParamsDataResourceResponseDto {
- b, err := client.SendHttpRequest("/api/v3/check-data-resource-exists", fasthttp.MethodGet, reqDto)
- var response dto.CheckParamsDataResourceResponseDto
+* @summary 租户控制台获取身份源列表
+* @description 在租户控制台内获取身份源列表,可以根据 应用 ID 筛选。
+* @param tenantId 租户 ID
+* @param appId 应用 ID
+* @param type 身份源类型
+* @param page 当前页数,从 1 开始
+* @param limit 每页数目,最大不能超过 50,默认为 10
+* @returns ExtIdpListPaginatedRespDto
+ */
+func (client *ManagementClient) ListTenantExtIdp(reqDto *dto.ListTenantExtIdpDto) *dto.ExtIdpListPaginatedRespDto {
+ b, err := client.SendHttpRequest("/api/v3/list-tenant-ext-idp", fasthttp.MethodGet, reqDto)
+ var response dto.ExtIdpListPaginatedRespDto
+ if err != nil {
+ fmt.Println(err)
+ return nil
+ }
+ err = json.Unmarshal(b, &response)
+ if err != nil {
+ fmt.Println(err)
+ return nil
+ }
+ return &response
+}
+
+/*
+* @summary 身份源下应用的连接详情
+* @description 在身份源详情页获取应用的连接情况
+* @param id 身份源 ID
+* @param tenantId 租户 ID
+* @param appId 应用 ID
+* @param type 身份源类型
+* @returns ExtIdpListPaginatedRespDto
+ */
+func (client *ManagementClient) ExtIdpConnStateByApps(reqDto *dto.ExtIdpConnAppsDto) *dto.ExtIdpListPaginatedRespDto {
+ b, err := client.SendHttpRequest("/api/v3/ext-idp-conn-apps", fasthttp.MethodGet, reqDto)
+ var response dto.ExtIdpListPaginatedRespDto
+ if err != nil {
+ fmt.Println(err)
+ return nil
+ }
+ err = json.Unmarshal(b, &response)
+ if err != nil {
+ fmt.Println(err)
+ return nil
+ }
+ return &response
+}
+
+/*
+* @summary 获取用户内置字段列表
+* @description 获取用户内置的字段列表
+* @returns CustomFieldListRespDto
+ */
+func (client *ManagementClient) GetUserBaseFields() *dto.CustomFieldListRespDto {
+ b, err := client.SendHttpRequest("/api/v3/get-user-base-fields", fasthttp.MethodGet, nil)
+ var response dto.CustomFieldListRespDto
+ if err != nil {
+ fmt.Println(err)
+ return nil
+ }
+ err = json.Unmarshal(b, &response)
+ if err != nil {
+ fmt.Println(err)
+ return nil
+ }
+ return &response
+}
+
+/*
+ * @summary 获取用户内置字段列表
+ * @description 获取用户内置的字段列表
+ * @param targetType 目标对象类型:
+ * - `USER`: 用户
+ * - `ROLE`: 角色
+ * - `GROUP`: 分组
+ * - `DEPARTMENT`: 部门
+ * ;该接口暂不支持分组(GROUP)
+ * @param dataType 字段类型
+ * @param tenantId 租户 ID
+ * @param page 当前页数,从 1 开始
+ * @param limit 每页数目,最大不能超过 50,默认为 10
+ * @param userVisible 用户是否可见
+ * @param adminVisible 管理员是否可见
+ * @param accessControl 访问控制
+ * @param keyword 搜索关键词
+ * @param lang 搜索语言
+ * @returns ListCistomFieldsResDto
+*/
+func (client *ManagementClient) ListUserBaseFields(reqDto *dto.ListUserBaseFieldsDto) *dto.ListCistomFieldsResDto {
+ b, err := client.SendHttpRequest("/api/v3/list-user-base-fields", fasthttp.MethodGet, reqDto)
+ var response dto.ListCistomFieldsResDto
+ if err != nil {
+ fmt.Println(err)
+ return nil
+ }
+ err = json.Unmarshal(b, &response)
+ if err != nil {
+ fmt.Println(err)
+ return nil
+ }
+ return &response
+}
+
+/*
+* @summary 修改用户内置字段配置
+* @description 修改用户内置字段配置,内置字段不允许修改数据类型、唯一性。
+* @param requestBody
+* @returns CustomFieldListRespDto
+ */
+func (client *ManagementClient) SetUserBaseFields(reqDto *dto.SetUserBaseFieldsReqDto) *dto.CustomFieldListRespDto {
+ b, err := client.SendHttpRequest("/api/v3/set-user-base-fields", fasthttp.MethodPost, reqDto)
+ var response dto.CustomFieldListRespDto
+ if err != nil {
+ fmt.Println(err)
+ return nil
+ }
+ err = json.Unmarshal(b, &response)
+ if err != nil {
+ fmt.Println(err)
+ return nil
+ }
+ return &response
+}
+
+/*
+ * @summary 获取自定义字段列表
+ * @description 通过主体类型,获取用户、部门或角色的自定义字段列表。
+ * @param targetType 目标对象类型:
+ * - `USER`: 用户
+ * - `ROLE`: 角色
+ * - `GROUP`: 分组
+ * - `DEPARTMENT`: 部门
+ * ;该接口暂不支持分组(GROUP)
+ * @param tenantId 租户 ID
+ * @returns CustomFieldListRespDto
+*/
+func (client *ManagementClient) GetCustomFields(reqDto *dto.GetCustomFieldsDto) *dto.CustomFieldListRespDto {
+ b, err := client.SendHttpRequest("/api/v3/get-custom-fields", fasthttp.MethodGet, reqDto)
+ var response dto.CustomFieldListRespDto
+ if err != nil {
+ fmt.Println(err)
+ return nil
+ }
+ err = json.Unmarshal(b, &response)
+ if err != nil {
+ fmt.Println(err)
+ return nil
+ }
+ return &response
+}
+
+/*
+ * @summary 获取自定义字段列表
+ * @description 通过主体类型,获取用户、部门或角色的自定义字段列表。
+ * @param targetType 目标对象类型:
+ * - `USER`: 用户
+ * - `ROLE`: 角色
+ * - `GROUP`: 分组
+ * - `DEPARTMENT`: 部门
+ * ;该接口暂不支持分组(GROUP)
+ * @param dataType 字段类型
+ * @param tenantId 租户 ID
+ * @param page 当前页数,从 1 开始
+ * @param limit 每页数目,最大不能超过 50,默认为 10
+ * @param userVisible 用户是否可见
+ * @param adminVisible 管理员是否可见
+ * @param accessControl 访问控制
+ * @param keyword 搜索关键词
+ * @param lang 搜索语言
+ * @returns ListCistomFieldsResDto
+*/
+func (client *ManagementClient) ListCustFields(reqDto *dto.ListCustomFieldsDto) *dto.ListCistomFieldsResDto {
+ b, err := client.SendHttpRequest("/api/v3/list-custom-fields", fasthttp.MethodGet, reqDto)
+ var response dto.ListCistomFieldsResDto
+ if err != nil {
+ fmt.Println(err)
+ return nil
+ }
+ err = json.Unmarshal(b, &response)
+ if err != nil {
+ fmt.Println(err)
+ return nil
+ }
+ return &response
+}
+
+/*
+* @summary 创建/修改自定义字段定义
+* @description 创建/修改用户、部门或角色自定义字段定义,如果传入的 key 不存在则创建,存在则更新。
+* @param requestBody
+* @returns CustomFieldListRespDto
+ */
+func (client *ManagementClient) SetCustomFields(reqDto *dto.SetCustomFieldsReqDto) *dto.CustomFieldListRespDto {
+ b, err := client.SendHttpRequest("/api/v3/set-custom-fields", fasthttp.MethodPost, reqDto)
+ var response dto.CustomFieldListRespDto
+ if err != nil {
+ fmt.Println(err)
+ return nil
+ }
+ err = json.Unmarshal(b, &response)
+ if err != nil {
+ fmt.Println(err)
+ return nil
+ }
+ return &response
+}
+
+/*
+* @summary 删除自定义字段定义
+* @description 删除用户、部门或角色自定义字段定义。
+* @param requestBody
+* @returns IsSuccessRespDto
+ */
+func (client *ManagementClient) DeleteCustomFields(reqDto *dto.DeleteCustomFieldsReqDto) *dto.IsSuccessRespDto {
+ b, err := client.SendHttpRequest("/api/v3/delete-custom-fields", fasthttp.MethodPost, reqDto)
+ var response dto.IsSuccessRespDto
+ if err != nil {
+ fmt.Println(err)
+ return nil
+ }
+ err = json.Unmarshal(b, &response)
+ if err != nil {
+ fmt.Println(err)
+ return nil
+ }
+ return &response
+}
+
+/*
+* @summary 设置自定义字段的值
+* @description 给用户、角色或部门设置自定义字段的值,如果存在则更新,不存在则创建。
+* @param requestBody
+* @returns IsSuccessRespDto
+ */
+func (client *ManagementClient) SetCustomData(reqDto *dto.SetCustomDataReqDto) *dto.IsSuccessRespDto {
+ b, err := client.SendHttpRequest("/api/v3/set-custom-data", fasthttp.MethodPost, reqDto)
+ var response dto.IsSuccessRespDto
+ if err != nil {
+ fmt.Println(err)
+ return nil
+ }
+ err = json.Unmarshal(b, &response)
+ if err != nil {
+ fmt.Println(err)
+ return nil
+ }
+ return &response
+}
+
+/*
+ * @summary 获取用户、分组、角色、组织机构的自定义字段值
+ * @description 通过筛选条件,获取用户、分组、角色、组织机构的自定义字段值。
+ * @param tenantId 租户 ID
+ * @param targetType 目标对象类型:
+ * - `USER`: 用户
+ * - `ROLE`: 角色
+ * - `GROUP`: 分组
+ * - `DEPARTMENT`: 部门
+ *
+ * @param targetIdentifier 目标对象的唯一标志符:
+ * - 如果是用户,为用户的 ID,如 `6343b98b7cfxxx9366e9b7c`
+ * - 如果是角色,为角色的 code,如 `admin`
+ * - 如果是分组,为分组的 code,如 `developer`
+ * - 如果是部门,为部门的 ID,如 `6343bafc019xxxx889206c4c`
+ *
+ * @param namespace 所属权限分组的 code,当 targetType 为角色的时候需要填写,否则可以忽略
+ * @returns GetCustomDataRespDto
+*/
+func (client *ManagementClient) GetCustomData(reqDto *dto.GetCustomDataDto) *dto.GetCustomDataRespDto {
+ b, err := client.SendHttpRequest("/api/v3/get-custom-data", fasthttp.MethodGet, reqDto)
+ var response dto.GetCustomDataRespDto
+ if err != nil {
+ fmt.Println(err)
+ return nil
+ }
+ err = json.Unmarshal(b, &response)
+ if err != nil {
+ fmt.Println(err)
+ return nil
+ }
+ return &response
+}
+
+/*
+* @summary 创建资源
+* @description 创建资源,可以设置资源的描述、定义的操作类型、URL 标识等。
+* @param requestBody
+* @returns ResourceRespDto
+ */
+func (client *ManagementClient) CreateResource(reqDto *dto.CreateResourceDto) *dto.ResourceRespDto {
+ b, err := client.SendHttpRequest("/api/v3/create-resource", fasthttp.MethodPost, reqDto)
+ var response dto.ResourceRespDto
+ if err != nil {
+ fmt.Println(err)
+ return nil
+ }
+ err = json.Unmarshal(b, &response)
+ if err != nil {
+ fmt.Println(err)
+ return nil
+ }
+ return &response
+}
+
+/*
+* @summary 批量创建资源
+* @description 批量创建资源,可以设置资源的描述、定义的操作类型、URL 标识等。
+* @param requestBody
+* @returns IsSuccessRespDto
+ */
+func (client *ManagementClient) CreateResourcesBatch(reqDto *dto.CreateResourcesBatchDto) *dto.IsSuccessRespDto {
+ b, err := client.SendHttpRequest("/api/v3/create-resources-batch", fasthttp.MethodPost, reqDto)
+ var response dto.IsSuccessRespDto
+ if err != nil {
+ fmt.Println(err)
+ return nil
+ }
+ err = json.Unmarshal(b, &response)
+ if err != nil {
+ fmt.Println(err)
+ return nil
+ }
+ return &response
+}
+
+/*
+* @summary 获取资源详情
+* @description 根据筛选条件,获取资源详情。
+* @param code 资源唯一标志符
+* @param namespace 所属权限分组(权限空间)的 Code
+* @returns ResourceRespDto
+ */
+func (client *ManagementClient) GetResource(reqDto *dto.GetResourceDto) *dto.ResourceRespDto {
+ b, err := client.SendHttpRequest("/api/v3/get-resource", fasthttp.MethodGet, reqDto)
+ var response dto.ResourceRespDto
+ if err != nil {
+ fmt.Println(err)
+ return nil
+ }
+ err = json.Unmarshal(b, &response)
+ if err != nil {
+ fmt.Println(err)
+ return nil
+ }
+ return &response
+}
+
+/*
+* @summary 批量获取资源详情
+* @description 根据筛选条件,批量获取资源详情。
+* @param codeList 资源 code 列表,批量可以使用逗号分隔
+* @param namespace 所属权限分组(权限空间)的 Code
+* @returns ResourceListRespDto
+ */
+func (client *ManagementClient) GetResourcesBatch(reqDto *dto.GetResourcesBatchDto) *dto.ResourceListRespDto {
+ b, err := client.SendHttpRequest("/api/v3/get-resources-batch", fasthttp.MethodGet, reqDto)
+ var response dto.ResourceListRespDto
+ if err != nil {
+ fmt.Println(err)
+ return nil
+ }
+ err = json.Unmarshal(b, &response)
+ if err != nil {
+ fmt.Println(err)
+ return nil
+ }
+ return &response
+}
+
+/*
+* @summary 分页获取常规资源列表
+* @description 根据筛选条件,分页获取常规资源详情列表。
+* @param page 当前页数,从 1 开始
+* @param limit 每页数目,最大不能超过 50,默认为 10
+* @param keyword 查询条件
+* @param namespaceCodeList 权限空间列表
+* @returns CommonResourcePaginatedRespDto
+ */
+func (client *ManagementClient) ListCommonResource(reqDto *dto.ListCommonResourceDto) *dto.CommonResourcePaginatedRespDto {
+ b, err := client.SendHttpRequest("/api/v3/list-common-resource", fasthttp.MethodGet, reqDto)
+ var response dto.CommonResourcePaginatedRespDto
+ if err != nil {
+ fmt.Println(err)
+ return nil
+ }
+ err = json.Unmarshal(b, &response)
+ if err != nil {
+ fmt.Println(err)
+ return nil
+ }
+ return &response
+}
+
+/*
+* @summary 分页获取资源列表
+* @description 根据筛选条件,分页获取资源详情列表。
+* @param namespace 所属权限分组(权限空间)的 Code
+* @param type 资源类型
+* @param page 当前页数,从 1 开始
+* @param limit 每页数目,最大不能超过 50,默认为 10
+* @returns ResourcePaginatedRespDto
+ */
+func (client *ManagementClient) ListResources(reqDto *dto.ListResourcesDto) *dto.ResourcePaginatedRespDto {
+ b, err := client.SendHttpRequest("/api/v3/list-resources", fasthttp.MethodGet, reqDto)
+ var response dto.ResourcePaginatedRespDto
+ if err != nil {
+ fmt.Println(err)
+ return nil
+ }
+ err = json.Unmarshal(b, &response)
+ if err != nil {
+ fmt.Println(err)
+ return nil
+ }
+ return &response
+}
+
+/*
+* @summary 修改资源
+* @description 修改资源,可以设置资源的描述、定义的操作类型、URL 标识等。
+* @param requestBody
+* @returns ResourceRespDto
+ */
+func (client *ManagementClient) UpdateResource(reqDto *dto.UpdateResourceDto) *dto.ResourceRespDto {
+ b, err := client.SendHttpRequest("/api/v3/update-resource", fasthttp.MethodPost, reqDto)
+ var response dto.ResourceRespDto
+ if err != nil {
+ fmt.Println(err)
+ return nil
+ }
+ err = json.Unmarshal(b, &response)
+ if err != nil {
+ fmt.Println(err)
+ return nil
+ }
+ return &response
+}
+
+/*
+* @summary 删除资源
+* @description 通过资源唯一标志符以及所属权限分组,删除资源。
+* @param requestBody
+* @returns IsSuccessRespDto
+ */
+func (client *ManagementClient) DeleteResource(reqDto *dto.DeleteResourceDto) *dto.IsSuccessRespDto {
+ b, err := client.SendHttpRequest("/api/v3/delete-resource", fasthttp.MethodPost, reqDto)
+ var response dto.IsSuccessRespDto
+ if err != nil {
+ fmt.Println(err)
+ return nil
+ }
+ err = json.Unmarshal(b, &response)
+ if err != nil {
+ fmt.Println(err)
+ return nil
+ }
+ return &response
+}
+
+/*
+* @summary 批量删除资源
+* @description 通过资源唯一标志符以及所属权限分组,批量删除资源
+* @param requestBody
+* @returns IsSuccessRespDto
+ */
+func (client *ManagementClient) DeleteResourcesBatch(reqDto *dto.DeleteResourcesBatchDto) *dto.IsSuccessRespDto {
+ b, err := client.SendHttpRequest("/api/v3/delete-resources-batch", fasthttp.MethodPost, reqDto)
+ var response dto.IsSuccessRespDto
+ if err != nil {
+ fmt.Println(err)
+ return nil
+ }
+ err = json.Unmarshal(b, &response)
+ if err != nil {
+ fmt.Println(err)
+ return nil
+ }
+ return &response
+}
+
+/*
+* @summary 批量删除资源
+* @description 通过资源id批量删除资源
+* @param requestBody
+* @returns IsSuccessRespDto
+ */
+func (client *ManagementClient) BatchDeleteCommonResource(reqDto *dto.DeleteCommonResourcesBatchDto) *dto.IsSuccessRespDto {
+ b, err := client.SendHttpRequest("/api/v3/delete-common-resources-batch", fasthttp.MethodPost, reqDto)
+ var response dto.IsSuccessRespDto
+ if err != nil {
+ fmt.Println(err)
+ return nil
+ }
+ err = json.Unmarshal(b, &response)
+ if err != nil {
+ fmt.Println(err)
+ return nil
+ }
+ return &response
+}
+
+/*
+* @summary 关联/取消关联应用资源到租户
+* @description 通过资源唯一标识以及权限分组,关联或取消关联资源到租户
+* @param requestBody
+* @returns IsSuccessRespDto
+ */
+func (client *ManagementClient) AssociateTenantResource(reqDto *dto.AssociateTenantResourceDto) *dto.IsSuccessRespDto {
+ b, err := client.SendHttpRequest("/api/v3/associate-tenant-resource", fasthttp.MethodPost, reqDto)
+ var response dto.IsSuccessRespDto
+ if err != nil {
+ fmt.Println(err)
+ return nil
+ }
+ err = json.Unmarshal(b, &response)
+ if err != nil {
+ fmt.Println(err)
+ return nil
+ }
+ return &response
+}
+
+/*
+* @summary 创建权限分组
+* @description 创建权限分组,可以设置权限分组名称、Code 和描述信息。
+* @param requestBody
+* @returns NamespaceRespDto
+ */
+func (client *ManagementClient) CreateNamespace(reqDto *dto.CreateNamespaceDto) *dto.NamespaceRespDto {
+ b, err := client.SendHttpRequest("/api/v3/create-namespace", fasthttp.MethodPost, reqDto)
+ var response dto.NamespaceRespDto
+ if err != nil {
+ fmt.Println(err)
+ return nil
+ }
+ err = json.Unmarshal(b, &response)
+ if err != nil {
+ fmt.Println(err)
+ return nil
+ }
+ return &response
+}
+
+/*
+* @summary 批量创建权限分组
+* @description 批量创建权限分组,可以分别设置权限分组名称、Code 和描述信息。
+* @param requestBody
+* @returns IsSuccessRespDto
+ */
+func (client *ManagementClient) CreateNamespacesBatch(reqDto *dto.CreateNamespacesBatchDto) *dto.IsSuccessRespDto {
+ b, err := client.SendHttpRequest("/api/v3/create-namespaces-batch", fasthttp.MethodPost, reqDto)
+ var response dto.IsSuccessRespDto
+ if err != nil {
+ fmt.Println(err)
+ return nil
+ }
+ err = json.Unmarshal(b, &response)
+ if err != nil {
+ fmt.Println(err)
+ return nil
+ }
+ return &response
+}
+
+/*
+* @summary 获取权限分组详情
+* @description 通过权限分组唯一标志符(Code),获取权限分组详情。
+* @param code 权限分组唯一标志符
+* @returns NamespaceRespDto
+ */
+func (client *ManagementClient) GetNamespace(reqDto *dto.GetNamespaceDto) *dto.NamespaceRespDto {
+ b, err := client.SendHttpRequest("/api/v3/get-namespace", fasthttp.MethodGet, reqDto)
+ var response dto.NamespaceRespDto
+ if err != nil {
+ fmt.Println(err)
+ return nil
+ }
+ err = json.Unmarshal(b, &response)
+ if err != nil {
+ fmt.Println(err)
+ return nil
+ }
+ return &response
+}
+
+/*
+* @summary 批量获取权限分组详情
+* @description 分别通过权限分组唯一标志符(Code),批量获取权限分组详情。
+* @param codeList 权限分组 code 列表,批量可以使用逗号分隔
+* @returns NamespaceListRespDto
+ */
+func (client *ManagementClient) GetNamespacesBatch(reqDto *dto.GetNamespacesBatchDto) *dto.NamespaceListRespDto {
+ b, err := client.SendHttpRequest("/api/v3/get-namespaces-batch", fasthttp.MethodGet, reqDto)
+ var response dto.NamespaceListRespDto
+ if err != nil {
+ fmt.Println(err)
+ return nil
+ }
+ err = json.Unmarshal(b, &response)
+ if err != nil {
+ fmt.Println(err)
+ return nil
+ }
+ return &response
+}
+
+/*
+* @summary 修改权限分组信息
+* @description 修改权限分组信息,可以修改名称、描述信息以及新的唯一标志符(NewCode)。
+* @param requestBody
+* @returns UpdateNamespaceRespDto
+ */
+func (client *ManagementClient) UpdateNamespace(reqDto *dto.UpdateNamespaceDto) *dto.UpdateNamespaceRespDto {
+ b, err := client.SendHttpRequest("/api/v3/update-namespace", fasthttp.MethodPost, reqDto)
+ var response dto.UpdateNamespaceRespDto
+ if err != nil {
+ fmt.Println(err)
+ return nil
+ }
+ err = json.Unmarshal(b, &response)
+ if err != nil {
+ fmt.Println(err)
+ return nil
+ }
+ return &response
+}
+
+/*
+* @summary 删除权限分组信息
+* @description 通过权限分组唯一标志符(Code),删除权限分组信息。
+* @param requestBody
+* @returns IsSuccessRespDto
+ */
+func (client *ManagementClient) DeleteNamespace(reqDto *dto.DeleteNamespaceDto) *dto.IsSuccessRespDto {
+ b, err := client.SendHttpRequest("/api/v3/delete-namespace", fasthttp.MethodPost, reqDto)
+ var response dto.IsSuccessRespDto
+ if err != nil {
+ fmt.Println(err)
+ return nil
+ }
+ err = json.Unmarshal(b, &response)
+ if err != nil {
+ fmt.Println(err)
+ return nil
+ }
+ return &response
+}
+
+/*
+* @summary 批量删除权限分组
+* @description 分别通过权限分组唯一标志符(Code),批量删除权限分组。
+* @param requestBody
+* @returns IsSuccessRespDto
+ */
+func (client *ManagementClient) DeleteNamespacesBatch(reqDto *dto.DeleteNamespacesBatchDto) *dto.IsSuccessRespDto {
+ b, err := client.SendHttpRequest("/api/v3/delete-namespaces-batch", fasthttp.MethodPost, reqDto)
+ var response dto.IsSuccessRespDto
+ if err != nil {
+ fmt.Println(err)
+ return nil
+ }
+ err = json.Unmarshal(b, &response)
+ if err != nil {
+ fmt.Println(err)
+ return nil
+ }
+ return &response
+}
+
+/*
+* @summary 分页获取权限分组列表
+* @description 根据筛选条件,分页获取权限分组列表。
+* @param page 当前页数,从 1 开始
+* @param limit 每页数目,最大不能超过 50,默认为 10
+* @param keywords 搜索权限分组 Code
+* @returns NamespaceListPaginatedRespDto
+ */
+func (client *ManagementClient) ListNamespaces(reqDto *dto.ListNamespacesDto) *dto.NamespaceListPaginatedRespDto {
+ b, err := client.SendHttpRequest("/api/v3/list-namespaces", fasthttp.MethodGet, reqDto)
+ var response dto.NamespaceListPaginatedRespDto
+ if err != nil {
+ fmt.Println(err)
+ return nil
+ }
+ err = json.Unmarshal(b, &response)
+ if err != nil {
+ fmt.Println(err)
+ return nil
+ }
+ return &response
+}
+
+/*
+* @summary 分页权限分组下所有的角色列表
+* @description 根据筛选条件,分页获取权限分组下所有的角色列表。
+* @param code 权限分组唯一标志符
+* @param page 当前页数,从 1 开始
+* @param limit 每页数目,最大不能超过 50,默认为 10
+* @param keywords 角色 Code 或者名称
+* @returns NamespaceRolesListPaginatedRespDto
+ */
+func (client *ManagementClient) ListNamespaceRoles(reqDto *dto.ListNamespaceRolesDto) *dto.NamespaceRolesListPaginatedRespDto {
+ b, err := client.SendHttpRequest("/api/v3/list-namespace-roles", fasthttp.MethodGet, reqDto)
+ var response dto.NamespaceRolesListPaginatedRespDto
+ if err != nil {
+ fmt.Println(err)
+ return nil
+ }
+ err = json.Unmarshal(b, &response)
+ if err != nil {
+ fmt.Println(err)
+ return nil
+ }
+ return &response
+}
+
+/*
+* @summary 授权资源
+* @description 将一个/多个资源授权给用户、角色、分组、组织机构等主体,且可以分别指定不同的操作权限。
+* @param requestBody
+* @returns IsSuccessRespDto
+ */
+func (client *ManagementClient) AuthorizeResources(reqDto *dto.AuthorizeResourcesDto) *dto.IsSuccessRespDto {
+ b, err := client.SendHttpRequest("/api/v3/authorize-resources", fasthttp.MethodPost, reqDto)
+ var response dto.IsSuccessRespDto
+ if err != nil {
+ fmt.Println(err)
+ return nil
+ }
+ err = json.Unmarshal(b, &response)
+ if err != nil {
+ fmt.Println(err)
+ return nil
+ }
+ return &response
+}
+
+/*
+ * @summary 获取某个主体被授权的资源列表
+ * @description 根据筛选条件,获取某个主体被授权的资源列表。
+ * @param targetType 目标对象类型:
+ * - `USER`: 用户
+ * - `ROLE`: 角色
+ * - `GROUP`: 分组
+ * - `DEPARTMENT`: 部门
+ *
+ * @param targetIdentifier 目标对象的唯一标志符:
+ * - 如果是用户,为用户的 ID,如 `6343b98b7cfxxx9366e9b7c`
+ * - 如果是角色,为角色的 code,如 `admin`
+ * - 如果是分组,为分组的 code,如 `developer`
+ * - 如果是部门,为部门的 ID,如 `6343bafc019xxxx889206c4c`
+ *
+ * @param namespace 所属权限分组(权限空间)的 Code
+ * @param resourceType 限定资源类型,如数据、API、按钮、菜单
+ * @param resourceList 限定查询的资源列表,如果指定,只会返回所指定的资源列表。
+ * @param withDenied 是否获取被拒绝的资源
+ * @returns AuthorizedResourcePaginatedRespDto
+*/
+func (client *ManagementClient) GetAuthorizedResources(reqDto *dto.GetAuthorizedResourcesDto) *dto.AuthorizedResourcePaginatedRespDto {
+ b, err := client.SendHttpRequest("/api/v3/get-authorized-resources", fasthttp.MethodGet, reqDto)
+ var response dto.AuthorizedResourcePaginatedRespDto
+ if err != nil {
+ fmt.Println(err)
+ return nil
+ }
+ err = json.Unmarshal(b, &response)
+ if err != nil {
+ fmt.Println(err)
+ return nil
+ }
+ return &response
+}
+
+/*
+* @summary 判断用户是否对某个资源的某个操作有权限
+* @description 判断用户是否对某个资源的某个操作有权限。
+* @param requestBody
+* @returns IsActionAllowedRespDtp
+ */
+func (client *ManagementClient) IsActionAllowed(reqDto *dto.IsActionAllowedDto) *dto.IsActionAllowedRespDtp {
+ b, err := client.SendHttpRequest("/api/v3/is-action-allowed", fasthttp.MethodPost, reqDto)
+ var response dto.IsActionAllowedRespDtp
+ if err != nil {
+ fmt.Println(err)
+ return nil
+ }
+ err = json.Unmarshal(b, &response)
+ if err != nil {
+ fmt.Println(err)
+ return nil
+ }
+ return &response
+}
+
+/*
+* @summary 获取资源被授权的主体
+* @description 获取资源被授权的主体
+* @param requestBody
+* @returns GetResourceAuthorizedTargetRespDto
+ */
+func (client *ManagementClient) GetResourceAuthorizedTargets(reqDto *dto.GetResourceAuthorizedTargetsDto) *dto.GetResourceAuthorizedTargetRespDto {
+ b, err := client.SendHttpRequest("/api/v3/get-resource-authorized-targets", fasthttp.MethodPost, reqDto)
+ var response dto.GetResourceAuthorizedTargetRespDto
+ if err != nil {
+ fmt.Println(err)
+ return nil
+ }
+ err = json.Unmarshal(b, &response)
+ if err != nil {
+ fmt.Println(err)
+ return nil
+ }
+ return &response
+}
+
+/*
+* @summary 获取用户行为日志
+* @description 可以选择请求 ID、客户端 IP、用户 ID、应用 ID、开始时间戳、请求是否成功、分页参数来获取用户行为日志
+* @param requestBody
+* @returns UserActionLogRespDto
+ */
+func (client *ManagementClient) GetUserActionLogs(reqDto *dto.GetUserActionLogsDto) *dto.UserActionLogRespDto {
+ b, err := client.SendHttpRequest("/api/v3/get-user-action-logs", fasthttp.MethodPost, reqDto)
+ var response dto.UserActionLogRespDto
+ if err != nil {
+ fmt.Println(err)
+ return nil
+ }
+ err = json.Unmarshal(b, &response)
+ if err != nil {
+ fmt.Println(err)
+ return nil
+ }
+ return &response
+}
+
+/*
+* @summary 获取管理员操作日志
+* @description 可以选择请求 ID、客户端 IP、操作类型、资源类型、管理员用户 ID、请求是否成功、开始时间戳、结束时间戳、分页来获取管理员操作日志接口
+* @param requestBody
+* @returns AdminAuditLogRespDto
+ */
+func (client *ManagementClient) GetAdminAuditLogs(reqDto *dto.GetAdminAuditLogsDto) *dto.AdminAuditLogRespDto {
+ b, err := client.SendHttpRequest("/api/v3/get-admin-audit-logs", fasthttp.MethodPost, reqDto)
+ var response dto.AdminAuditLogRespDto
+ if err != nil {
+ fmt.Println(err)
+ return nil
+ }
+ err = json.Unmarshal(b, &response)
+ if err != nil {
+ fmt.Println(err)
+ return nil
+ }
+ return &response
+}
+
+/*
+* @summary 获取邮件模版列表
+* @description 获取邮件模版列表
+* @returns GetEmailTemplatesRespDto
+ */
+func (client *ManagementClient) GetEmailTemplates() *dto.GetEmailTemplatesRespDto {
+ b, err := client.SendHttpRequest("/api/v3/get-email-templates", fasthttp.MethodGet, nil)
+ var response dto.GetEmailTemplatesRespDto
+ if err != nil {
+ fmt.Println(err)
+ return nil
+ }
+ err = json.Unmarshal(b, &response)
+ if err != nil {
+ fmt.Println(err)
+ return nil
+ }
+ return &response
+}
+
+/*
+* @summary 修改邮件模版
+* @description 修改邮件模版
+* @param requestBody
+* @returns EmailTemplateSingleItemRespDto
+ */
+func (client *ManagementClient) UpdateEmailTemplate(reqDto *dto.UpdateEmailTemplateDto) *dto.EmailTemplateSingleItemRespDto {
+ b, err := client.SendHttpRequest("/api/v3/update-email-template", fasthttp.MethodPost, reqDto)
+ var response dto.EmailTemplateSingleItemRespDto
+ if err != nil {
+ fmt.Println(err)
+ return nil
+ }
+ err = json.Unmarshal(b, &response)
+ if err != nil {
+ fmt.Println(err)
+ return nil
+ }
+ return &response
+}
+
+/*
+* @summary 预览邮件模版
+* @description 预览邮件模版
+* @param requestBody
+* @returns PreviewEmailTemplateRespDto
+ */
+func (client *ManagementClient) PreviewEmailTemplate(reqDto *dto.PreviewEmailTemplateDto) *dto.PreviewEmailTemplateRespDto {
+ b, err := client.SendHttpRequest("/api/v3/preview-email-template", fasthttp.MethodPost, reqDto)
+ var response dto.PreviewEmailTemplateRespDto
+ if err != nil {
+ fmt.Println(err)
+ return nil
+ }
+ err = json.Unmarshal(b, &response)
+ if err != nil {
+ fmt.Println(err)
+ return nil
+ }
+ return &response
+}
+
+/*
+* @summary 获取第三方邮件服务配置
+* @description 获取第三方邮件服务配置
+* @returns EmailProviderRespDto
+ */
+func (client *ManagementClient) GetEmailProvider() *dto.EmailProviderRespDto {
+ b, err := client.SendHttpRequest("/api/v3/get-email-provider", fasthttp.MethodGet, nil)
+ var response dto.EmailProviderRespDto
+ if err != nil {
+ fmt.Println(err)
+ return nil
+ }
+ err = json.Unmarshal(b, &response)
+ if err != nil {
+ fmt.Println(err)
+ return nil
+ }
+ return &response
+}
+
+/*
+* @summary 配置第三方邮件服务
+* @description 配置第三方邮件服务
+* @param requestBody
+* @returns EmailProviderRespDto
+ */
+func (client *ManagementClient) ConfigEmailProvider(reqDto *dto.ConfigEmailProviderDto) *dto.EmailProviderRespDto {
+ b, err := client.SendHttpRequest("/api/v3/config-email-provider", fasthttp.MethodPost, reqDto)
+ var response dto.EmailProviderRespDto
+ if err != nil {
+ fmt.Println(err)
+ return nil
+ }
+ err = json.Unmarshal(b, &response)
+ if err != nil {
+ fmt.Println(err)
+ return nil
+ }
+ return &response
+}
+
+/*
+* @summary 获取应用详情
+* @description 通过应用 ID,获取应用详情。
+* @param appId 应用 ID
+* @returns ApplicationSingleRespDto
+ */
+func (client *ManagementClient) GetApplication(reqDto *dto.GetApplicationDto) *dto.ApplicationSingleRespDto {
+ b, err := client.SendHttpRequest("/api/v3/get-application", fasthttp.MethodGet, reqDto)
+ var response dto.ApplicationSingleRespDto
+ if err != nil {
+ fmt.Println(err)
+ return nil
+ }
+ err = json.Unmarshal(b, &response)
+ if err != nil {
+ fmt.Println(err)
+ return nil
+ }
+ return &response
+}
+
+/*
+* @summary 主体授权详情
+* @description 主体授权详情
+* @param targetId 主体 id
+* @param targetType 主体类型
+* @param appId 应用 ID
+* @returns GetSubjectAuthRespDto
+ */
+func (client *ManagementClient) DetailAuthSubject(reqDto *dto.GetSubjectAuthDetailDto) *dto.GetSubjectAuthRespDto {
+ b, err := client.SendHttpRequest("/api/v3/get-subject-auth-detail", fasthttp.MethodGet, reqDto)
+ var response dto.GetSubjectAuthRespDto
+ if err != nil {
+ fmt.Println(err)
+ return nil
+ }
+ err = json.Unmarshal(b, &response)
+ if err != nil {
+ fmt.Println(err)
+ return nil
+ }
+ return &response
+}
+
+/*
+* @summary 主体授权列表
+* @description 主体授权列表
+* @param requestBody
+* @returns ListApplicationSubjectRespDto
+ */
+func (client *ManagementClient) ListAuthSubject(reqDto *dto.ListAuthSubjectDto) *dto.ListApplicationSubjectRespDto {
+ b, err := client.SendHttpRequest("/api/v3/list-subject-auth", fasthttp.MethodPost, reqDto)
+ var response dto.ListApplicationSubjectRespDto
+ if err != nil {
+ fmt.Println(err)
+ return nil
+ }
+ err = json.Unmarshal(b, &response)
+ if err != nil {
+ fmt.Println(err)
+ return nil
+ }
+ return &response
+}
+
+/*
+* @summary 应用授权列表
+* @description 应用授权列表
+* @param requestBody
+* @returns ListApplicationAuthPaginatedRespDto
+ */
+func (client *ManagementClient) ListAuthApplication(reqDto *dto.ListApplicationAuthDto) *dto.ListApplicationAuthPaginatedRespDto {
+ b, err := client.SendHttpRequest("/api/v3/list-applications-auth", fasthttp.MethodPost, reqDto)
+ var response dto.ListApplicationAuthPaginatedRespDto
+ if err != nil {
+ fmt.Println(err)
+ return nil
+ }
+ err = json.Unmarshal(b, &response)
+ if err != nil {
+ fmt.Println(err)
+ return nil
+ }
+ return &response
+}
+
+/*
+* @summary 更新授权开关
+* @description 更新授权开关
+* @param requestBody
+* @returns IsSuccessRespDto
+ */
+func (client *ManagementClient) EnabledAuth(reqDto *dto.UpdateAuthEnabledDto) *dto.IsSuccessRespDto {
+ b, err := client.SendHttpRequest("/api/v3/update-auth-enabled", fasthttp.MethodPost, reqDto)
+ var response dto.IsSuccessRespDto
+ if err != nil {
+ fmt.Println(err)
+ return nil
+ }
+ err = json.Unmarshal(b, &response)
+ if err != nil {
+ fmt.Println(err)
+ return nil
+ }
+ return &response
+}
+
+/*
+* @summary 批量删除应用授权
+* @description 批量删除应用授权
+* @param authIds 授权 ID
+* @returns IsSuccessRespDto
+ */
+/*
+* @summary 获取应用列表
+* @description 获取应用列表
+* @param page 当前页数,从 1 开始
+* @param limit 每页数目,最大不能超过 50,默认为 10
+* @param isIntegrateApp 是否为集成应用
+* @param isSelfBuiltApp 是否为自建应用
+* @param ssoEnabled 是否开启单点登录
+* @param keywords 模糊搜索字符串
+* @param all 搜索应用,true:搜索所有应用, 默认为 false
+* @returns ApplicationPaginatedRespDto
+ */
+func (client *ManagementClient) ListApplications(reqDto *dto.ListApplicationsDto) *dto.ApplicationPaginatedRespDto {
+ b, err := client.SendHttpRequest("/api/v3/list-applications", fasthttp.MethodGet, reqDto)
+ var response dto.ApplicationPaginatedRespDto
+ if err != nil {
+ fmt.Println(err)
+ return nil
+ }
+ err = json.Unmarshal(b, &response)
+ if err != nil {
+ fmt.Println(err)
+ return nil
+ }
+ return &response
+}
+
+/*
+* @summary 获取应用简单信息
+* @description 通过应用 ID,获取应用简单信息。
+* @param appId 应用 ID
+* @returns ApplicationSimpleInfoSingleRespDto
+ */
+func (client *ManagementClient) GetApplicationSimpleInfo(reqDto *dto.GetApplicationSimpleInfoDto) *dto.ApplicationSimpleInfoSingleRespDto {
+ b, err := client.SendHttpRequest("/api/v3/get-application-simple-info", fasthttp.MethodGet, reqDto)
+ var response dto.ApplicationSimpleInfoSingleRespDto
+ if err != nil {
+ fmt.Println(err)
+ return nil
+ }
+ err = json.Unmarshal(b, &response)
+ if err != nil {
+ fmt.Println(err)
+ return nil
+ }
+ return &response
+}
+
+/*
+* @summary 获取应用简单信息列表
+* @description 获取应用简单信息列表
+* @param page 当前页数,从 1 开始
+* @param limit 每页数目,最大不能超过 50,默认为 10
+* @param isIntegrateApp 是否为集成应用
+* @param isSelfBuiltApp 是否为自建应用
+* @param ssoEnabled 是否开启单点登录
+* @param keywords 模糊搜索字符串
+* @returns ApplicationSimpleInfoPaginatedRespDto
+ */
+func (client *ManagementClient) ListApplicationSimpleInfo(reqDto *dto.ListApplicationSimpleInfoDto) *dto.ApplicationSimpleInfoPaginatedRespDto {
+ b, err := client.SendHttpRequest("/api/v3/list-application-simple-info", fasthttp.MethodGet, reqDto)
+ var response dto.ApplicationSimpleInfoPaginatedRespDto
+ if err != nil {
+ fmt.Println(err)
+ return nil
+ }
+ err = json.Unmarshal(b, &response)
+ if err != nil {
+ fmt.Println(err)
+ return nil
+ }
+ return &response
+}
+
+/*
+* @summary 创建应用
+* @description 创建应用
+* @param requestBody
+* @returns CreateApplicationRespDto
+ */
+func (client *ManagementClient) CreateApplication(reqDto *dto.CreateApplicationDto) *dto.CreateApplicationRespDto {
+ b, err := client.SendHttpRequest("/api/v3/create-application", fasthttp.MethodPost, reqDto)
+ var response dto.CreateApplicationRespDto
+ if err != nil {
+ fmt.Println(err)
+ return nil
+ }
+ err = json.Unmarshal(b, &response)
+ if err != nil {
+ fmt.Println(err)
+ return nil
+ }
+ return &response
+}
+
+/*
+* @summary 删除应用
+* @description 通过应用 ID,删除应用。
+* @param requestBody
+* @returns IsSuccessRespDto
+ */
+func (client *ManagementClient) DeleteApplication(reqDto *dto.DeleteApplicationDto) *dto.IsSuccessRespDto {
+ b, err := client.SendHttpRequest("/api/v3/delete-application", fasthttp.MethodPost, reqDto)
+ var response dto.IsSuccessRespDto
+ if err != nil {
+ fmt.Println(err)
+ return nil
+ }
+ err = json.Unmarshal(b, &response)
+ if err != nil {
+ fmt.Println(err)
+ return nil
+ }
+ return &response
+}
+
+/*
+* @summary 获取应用密钥
+* @description 获取应用密钥
+* @param appId 应用 ID
+* @returns GetApplicationSecretRespDto
+ */
+func (client *ManagementClient) GetApplicationSecret(reqDto *dto.GetApplicationSecretDto) *dto.GetApplicationSecretRespDto {
+ b, err := client.SendHttpRequest("/api/v3/get-application-secret", fasthttp.MethodGet, reqDto)
+ var response dto.GetApplicationSecretRespDto
+ if err != nil {
+ fmt.Println(err)
+ return nil
+ }
+ err = json.Unmarshal(b, &response)
+ if err != nil {
+ fmt.Println(err)
+ return nil
+ }
+ return &response
+}
+
+/*
+* @summary 刷新应用密钥
+* @description 刷新应用密钥
+* @param requestBody
+* @returns RefreshApplicationSecretRespDto
+ */
+func (client *ManagementClient) RefreshApplicationSecret(reqDto *dto.RefreshApplicationSecretDto) *dto.RefreshApplicationSecretRespDto {
+ b, err := client.SendHttpRequest("/api/v3/refresh-application-secret", fasthttp.MethodPost, reqDto)
+ var response dto.RefreshApplicationSecretRespDto
+ if err != nil {
+ fmt.Println(err)
+ return nil
+ }
+ err = json.Unmarshal(b, &response)
+ if err != nil {
+ fmt.Println(err)
+ return nil
+ }
+ return &response
+}
+
+/*
+* @summary 获取应用当前登录用户
+* @description 获取应用当前处于登录状态的用户
+* @param requestBody
+* @returns UserPaginatedRespDto
+ */
+func (client *ManagementClient) ListApplicationActiveUsers(reqDto *dto.ListApplicationActiveUsersDto) *dto.UserPaginatedRespDto {
+ b, err := client.SendHttpRequest("/api/v3/list-application-active-users", fasthttp.MethodPost, reqDto)
+ var response dto.UserPaginatedRespDto
+ if err != nil {
+ fmt.Println(err)
+ return nil
+ }
+ err = json.Unmarshal(b, &response)
+ if err != nil {
+ fmt.Println(err)
+ return nil
+ }
+ return &response
+}
+
+/*
+* @summary 获取应用默认访问授权策略
+* @description 获取应用默认访问授权策略
+* @param appId 应用 ID
+* @returns GetApplicationPermissionStrategyRespDto
+ */
+func (client *ManagementClient) GetApplicationPermissionStrategy(reqDto *dto.GetApplicationPermissionStrategyDto) *dto.GetApplicationPermissionStrategyRespDto {
+ b, err := client.SendHttpRequest("/api/v3/get-application-permission-strategy", fasthttp.MethodGet, reqDto)
+ var response dto.GetApplicationPermissionStrategyRespDto
+ if err != nil {
+ fmt.Println(err)
+ return nil
+ }
+ err = json.Unmarshal(b, &response)
+ if err != nil {
+ fmt.Println(err)
+ return nil
+ }
+ return &response
+}
+
+/*
+* @summary 更新应用默认访问授权策略
+* @description 更新应用默认访问授权策略
+* @param requestBody
+* @returns IsSuccessRespDto
+ */
+func (client *ManagementClient) UpdateApplicationPermissionStrategy(reqDto *dto.UpdateApplicationPermissionStrategyDataDto) *dto.IsSuccessRespDto {
+ b, err := client.SendHttpRequest("/api/v3/update-application-permission-strategy", fasthttp.MethodPost, reqDto)
+ var response dto.IsSuccessRespDto
+ if err != nil {
+ fmt.Println(err)
+ return nil
+ }
+ err = json.Unmarshal(b, &response)
+ if err != nil {
+ fmt.Println(err)
+ return nil
+ }
+ return &response
+}
+
+/*
+* @summary 授权应用访问权限
+* @description 给用户、分组、组织或角色授权应用访问权限,如果用户、分组、组织或角色不存在,则跳过,进行下一步授权,不返回报错
+* @param requestBody
+* @returns IsSuccessRespDto
+ */
+func (client *ManagementClient) AuthorizeApplicationAccess(reqDto *dto.AuthorizeApplicationAccessDto) *dto.IsSuccessRespDto {
+ b, err := client.SendHttpRequest("/api/v3/authorize-application-access", fasthttp.MethodPost, reqDto)
+ var response dto.IsSuccessRespDto
+ if err != nil {
+ fmt.Println(err)
+ return nil
+ }
+ err = json.Unmarshal(b, &response)
+ if err != nil {
+ fmt.Println(err)
+ return nil
+ }
+ return &response
+}
+
+/*
+* @summary 删除应用访问授权记录
+* @description 取消给用户、分组、组织或角色的应用访问权限授权,如果传入数据不存在,则返回数据不报错处理。
+* @param requestBody
+* @returns IsSuccessRespDto
+ */
+func (client *ManagementClient) RevokeApplicationAccess(reqDto *dto.RevokeApplicationAccessDto) *dto.IsSuccessRespDto {
+ b, err := client.SendHttpRequest("/api/v3/revoke-application-access", fasthttp.MethodPost, reqDto)
+ var response dto.IsSuccessRespDto
+ if err != nil {
+ fmt.Println(err)
+ return nil
+ }
+ err = json.Unmarshal(b, &response)
+ if err != nil {
+ fmt.Println(err)
+ return nil
+ }
+ return &response
+}
+
+/*
+* @summary 检测域名是否可用
+* @description 检测域名是否可用于创建新应用或更新应用域名
+* @param requestBody
+* @returns CheckDomainAvailableSecretRespDto
+ */
+func (client *ManagementClient) CheckDomainAvailable(reqDto *dto.CheckDomainAvailable) *dto.CheckDomainAvailableSecretRespDto {
+ b, err := client.SendHttpRequest("/api/v3/check-domain-available", fasthttp.MethodPost, reqDto)
+ var response dto.CheckDomainAvailableSecretRespDto
+ if err != nil {
+ fmt.Println(err)
+ return nil
+ }
+ err = json.Unmarshal(b, &response)
+ if err != nil {
+ fmt.Println(err)
+ return nil
+ }
+ return &response
+}
+
+/*
+* @summary 获取租户应用列表
+* @description 获取应用列表,可以指定 租户 ID 筛选。
+* @param page 获取应用列表的页码
+* @param limit 每页获取的应用数量
+* @param keywords 搜索关键字
+* @param ssoEnabled 应用是否加入单点登录
+* @returns TenantApplicationListPaginatedRespDto
+ */
+func (client *ManagementClient) ListTenantApplications(reqDto *dto.ListTenantApplicationsDto) *dto.TenantApplicationListPaginatedRespDto {
+ b, err := client.SendHttpRequest("/api/v3/list-tenant-applications", fasthttp.MethodGet, reqDto)
+ var response dto.TenantApplicationListPaginatedRespDto
+ if err != nil {
+ fmt.Println(err)
+ return nil
+ }
+ err = json.Unmarshal(b, &response)
+ if err != nil {
+ fmt.Println(err)
+ return nil
+ }
+ return &response
+}
+
+/*
+* @summary 更新应用登录页配置
+* @description 通过应用 ID 更新登录页配置。
+* @param requestBody
+* @returns IsSuccessRespDto
+ */
+func (client *ManagementClient) UpdateLoginPageConfig(reqDto *dto.UpdateLoginConfigDto) *dto.IsSuccessRespDto {
+ b, err := client.SendHttpRequest("/api/v3/update-login-page-config", fasthttp.MethodPost, reqDto)
+ var response dto.IsSuccessRespDto
+ if err != nil {
+ fmt.Println(err)
+ return nil
+ }
+ err = json.Unmarshal(b, &response)
+ if err != nil {
+ fmt.Println(err)
+ return nil
+ }
+ return &response
+}
+
+/*
+* @summary 获取用户池租户配置信息
+* @description 根据用户池 ID 获取用户池多租户配置信息
+* @returns UserPoolTenantConfigDtoRespDto
+ */
+func (client *ManagementClient) UserpollTenantConfig() *dto.UserPoolTenantConfigDtoRespDto {
+ b, err := client.SendHttpRequest("/api/v3/userpool-tenant-config", fasthttp.MethodGet, nil)
+ var response dto.UserPoolTenantConfigDtoRespDto
+ if err != nil {
+ fmt.Println(err)
+ return nil
+ }
+ err = json.Unmarshal(b, &response)
+ if err != nil {
+ fmt.Println(err)
+ return nil
+ }
+ return &response
+}
+
+/*
+* @summary 更新用户池租户配置信息
+* @description 更新用户池多租户配置内登录信息
+* @param requestBody
+* @returns IsSuccessRespDto
+ */
+func (client *ManagementClient) UpdateUserPoolTenantConfig(reqDto *dto.UpdateUserPoolTenantLoginConfigDto) *dto.IsSuccessRespDto {
+ b, err := client.SendHttpRequest("/api/v3/update-userpool-tenant-config", fasthttp.MethodPost, reqDto)
+ var response dto.IsSuccessRespDto
+ if err != nil {
+ fmt.Println(err)
+ return nil
+ }
+ err = json.Unmarshal(b, &response)
+ if err != nil {
+ fmt.Println(err)
+ return nil
+ }
+ return &response
+}
+
+/*
+* @summary 更新租户控制台扫码登录状态
+* @description 更新租户控制台扫码登录状态
+* @param requestBody
+* @returns IsSuccessRespDto
+ */
+func (client *ManagementClient) UpdateTenantQrCodeState(reqDto *dto.UpdateTenantAppqrcodeState) *dto.IsSuccessRespDto {
+ b, err := client.SendHttpRequest("/api/v3/update-userpool-tenant-appqrcode-state", fasthttp.MethodPost, reqDto)
+ var response dto.IsSuccessRespDto
+ if err != nil {
+ fmt.Println(err)
+ return nil
+ }
+ err = json.Unmarshal(b, &response)
+ if err != nil {
+ fmt.Println(err)
+ return nil
+ }
+ return &response
+}
+
+/*
+* @summary 设置用户池多租户身份源连接
+* @description 设置用户池多租户身份源连接,支持同时设置多个身份源连接,支持设置连接和取消连接
+* @param requestBody
+* @returns IsSuccessRespDto
+ */
+func (client *ManagementClient) ChangeUserpoolTenanExtIdpConnState(reqDto *dto.ChangeUserPoolTenantExtIdpConnDto) *dto.IsSuccessRespDto {
+ b, err := client.SendHttpRequest("/api/v3/change-userpool-tenant-ext-idp-conn-state", fasthttp.MethodPost, reqDto)
+ var response dto.IsSuccessRespDto
+ if err != nil {
+ fmt.Println(err)
+ return nil
+ }
+ err = json.Unmarshal(b, &response)
+ if err != nil {
+ fmt.Println(err)
+ return nil
+ }
+ return &response
+}
+
+/*
+* @summary 修改应用多因素认证配置
+* @description 传入 MFA 认证因素列表进行开启或关闭
+* @param requestBody
+* @returns MFASettingsRespDto
+ */
+func (client *ManagementClient) UpdateApplicationMfaSettings(reqDto *dto.UpdateApplicationMfaSettingsDto) *dto.MFASettingsRespDto {
+ b, err := client.SendHttpRequest("/api/v3/update-application-mfa-settings", fasthttp.MethodPost, reqDto)
+ var response dto.MFASettingsRespDto
+ if err != nil {
+ fmt.Println(err)
+ return nil
+ }
+ err = json.Unmarshal(b, &response)
+ if err != nil {
+ fmt.Println(err)
+ return nil
+ }
+ return &response
+}
+
+/*
+ * @summary 获取应用下用户 MFA 触发数据
+ * @description 获取应用下用户 MFA 触发数据。
+ * @param appId 所属应用 ID
+ * @param userId 用户唯一标志,可以是用户 ID、用户名、邮箱、手机号、外部 ID、在外部身份源的 ID。
+ * @param userIdType 用户 ID 类型,默认值为 `user_id`,可选值为:
+ * - `user_id`: Authing 用户 ID,如 `6319a1504f3xxxxf214dd5b7`
+ * - `phone`: 用户手机号
+ * - `email`: 用户邮箱
+ * - `username`: 用户名
+ * - `external_id`: 用户在外部系统的 ID,对应 Authing 用户信息的 `externalId` 字段
+ * - `identity`: 用户的外部身份源信息,格式为 `:`,其中 `` 为 Authing 身份源的 ID,`` 为用户在外部身份源的 ID。
+ * 示例值:`62f20932716fbcc10d966ee5:ou_8bae746eac07cd2564654140d2a9ac61`。
+ * - `sync_relation`: 用户的外部身份源信息,格式为 `:`,其中 `` 为同步身份源类型,如 wechatwork, lark;`` 为用户在外部身份源的 ID。
+ * 示例值:`lark:ou_8bae746eac07cd2564654140d2a9ac61`。
+ *
+ * @returns GetMapInfoRespDto
+*/
+func (client *ManagementClient) GetMfaTriggerData(reqDto *dto.GetMfaTriggerDataDto) *dto.GetMapInfoRespDto {
+ b, err := client.SendHttpRequest("/api/v3/get-mfa-trigger-data", fasthttp.MethodGet, reqDto)
+ var response dto.GetMapInfoRespDto
+ if err != nil {
+ fmt.Println(err)
+ return nil
+ }
+ err = json.Unmarshal(b, &response)
+ if err != nil {
+ fmt.Println(err)
+ return nil
+ }
+ return &response
+}
+
+/*
+* @summary 创建 ASA 账号
+* @description 在某一应用下创建 ASA 账号
+* @param requestBody
+* @returns AsaAccountSingleRespDto
+ */
+func (client *ManagementClient) CreateAsaAccount(reqDto *dto.CreateAsaAccountDto) *dto.AsaAccountSingleRespDto {
+ b, err := client.SendHttpRequest("/api/v3/create-asa-account", fasthttp.MethodPost, reqDto)
+ var response dto.AsaAccountSingleRespDto
+ if err != nil {
+ fmt.Println(err)
+ return nil
+ }
+ err = json.Unmarshal(b, &response)
+ if err != nil {
+ fmt.Println(err)
+ return nil
+ }
+ return &response
+}
+
+/*
+* @summary 批量创建 ASA 账号
+* @description 在某一应用下批量创建 ASA 账号
+* @param requestBody
+* @returns IsSuccessRespDto
+ */
+func (client *ManagementClient) CreateAsaAccountBatch(reqDto *dto.CreateAsaAccountsBatchDto) *dto.IsSuccessRespDto {
+ b, err := client.SendHttpRequest("/api/v3/create-asa-accounts-batch", fasthttp.MethodPost, reqDto)
+ var response dto.IsSuccessRespDto
+ if err != nil {
+ fmt.Println(err)
+ return nil
+ }
+ err = json.Unmarshal(b, &response)
+ if err != nil {
+ fmt.Println(err)
+ return nil
+ }
+ return &response
+}
+
+/*
+* @summary 更新 ASA 账号
+* @description 更新某个 ASA 账号信息
+* @param requestBody
+* @returns AsaAccountSingleRespDto
+ */
+func (client *ManagementClient) UpdateAsaAccount(reqDto *dto.UpdateAsaAccountDto) *dto.AsaAccountSingleRespDto {
+ b, err := client.SendHttpRequest("/api/v3/update-asa-account", fasthttp.MethodPost, reqDto)
+ var response dto.AsaAccountSingleRespDto
+ if err != nil {
+ fmt.Println(err)
+ return nil
+ }
+ err = json.Unmarshal(b, &response)
+ if err != nil {
+ fmt.Println(err)
+ return nil
+ }
+ return &response
+}
+
+/*
+* @summary 获取 ASA 账号列表
+* @description 分页获取某一应用下的 ASA 账号列表
+* @param appId 所属应用 ID
+* @param page 当前页数,从 1 开始
+* @param limit 每页数目,最大不能超过 50,默认为 10
+* @returns AsaAccountPaginatedRespDto
+ */
+func (client *ManagementClient) ListAsaAccount(reqDto *dto.ListAsaAccountsDto) *dto.AsaAccountPaginatedRespDto {
+ b, err := client.SendHttpRequest("/api/v3/list-asa-accounts", fasthttp.MethodGet, reqDto)
+ var response dto.AsaAccountPaginatedRespDto
+ if err != nil {
+ fmt.Println(err)
+ return nil
+ }
+ err = json.Unmarshal(b, &response)
+ if err != nil {
+ fmt.Println(err)
+ return nil
+ }
+ return &response
+}
+
+/*
+* @summary 获取 ASA 账号
+* @description 根据 ASA 账号 ID 获取账号详细信息
+* @param appId 所属应用 ID
+* @param accountId ASA 账号 ID
+* @returns AsaAccountSingleRespDto
+ */
+func (client *ManagementClient) GetAsaAccount(reqDto *dto.GetAsaAccountDto) *dto.AsaAccountSingleRespDto {
+ b, err := client.SendHttpRequest("/api/v3/get-asa-account", fasthttp.MethodGet, reqDto)
+ var response dto.AsaAccountSingleRespDto
+ if err != nil {
+ fmt.Println(err)
+ return nil
+ }
+ err = json.Unmarshal(b, &response)
+ if err != nil {
+ fmt.Println(err)
+ return nil
+ }
+ return &response
+}
+
+/*
+* @summary 批量获取 ASA 账号
+* @description 根据 ASA 账号 ID 列表批量获取账号详细信息
+* @param requestBody
+* @returns AsaAccountListRespDto
+ */
+func (client *ManagementClient) GetAsaAccountBatch(reqDto *dto.GetAsaAccountBatchDto) *dto.AsaAccountListRespDto {
+ b, err := client.SendHttpRequest("/api/v3/get-asa-accounts-batch", fasthttp.MethodPost, reqDto)
+ var response dto.AsaAccountListRespDto
+ if err != nil {
+ fmt.Println(err)
+ return nil
+ }
+ err = json.Unmarshal(b, &response)
+ if err != nil {
+ fmt.Println(err)
+ return nil
+ }
+ return &response
+}
+
+/*
+* @summary 删除 ASA 账号
+* @description 通过 ASA 账号 ID 删除 ASA 账号
+* @param requestBody
+* @returns IsSuccessRespDto
+ */
+func (client *ManagementClient) DeleteAsaAccount(reqDto *dto.DeleteAsaAccountDto) *dto.IsSuccessRespDto {
+ b, err := client.SendHttpRequest("/api/v3/delete-asa-account", fasthttp.MethodPost, reqDto)
+ var response dto.IsSuccessRespDto
+ if err != nil {
+ fmt.Println(err)
+ return nil
+ }
+ err = json.Unmarshal(b, &response)
+ if err != nil {
+ fmt.Println(err)
+ return nil
+ }
+ return &response
+}
+
+/*
+* @summary 批量删除 ASA 账号
+* @description 通过 ASA 账号 ID 批量删除 ASA 账号
+* @param requestBody
+* @returns IsSuccessRespDto
+ */
+func (client *ManagementClient) DeleteAsaAccountBatch(reqDto *dto.DeleteAsaAccountBatchDto) *dto.IsSuccessRespDto {
+ b, err := client.SendHttpRequest("/api/v3/delete-asa-accounts-batch", fasthttp.MethodPost, reqDto)
+ var response dto.IsSuccessRespDto
+ if err != nil {
+ fmt.Println(err)
+ return nil
+ }
+ err = json.Unmarshal(b, &response)
+ if err != nil {
+ fmt.Println(err)
+ return nil
+ }
+ return &response
+}
+
+/*
+* @summary 分配 ASA 账号
+* @description 分配 ASA 账号给用户、组织、分组或角色
+* @param requestBody
+* @returns IsSuccessRespDto
+ */
+func (client *ManagementClient) AssignAsaAccount(reqDto *dto.AssignAsaAccountsDto) *dto.IsSuccessRespDto {
+ b, err := client.SendHttpRequest("/api/v3/assign-asa-account", fasthttp.MethodPost, reqDto)
+ var response dto.IsSuccessRespDto
+ if err != nil {
+ fmt.Println(err)
+ return nil
+ }
+ err = json.Unmarshal(b, &response)
+ if err != nil {
+ fmt.Println(err)
+ return nil
+ }
+ return &response
+}
+
+/*
+* @summary 取消分配 ASA 账号
+* @description 取消分配给用户、组织、分组或角色的 ASA 账号
+* @param requestBody
+* @returns IsSuccessRespDto
+ */
+func (client *ManagementClient) UnassignAsaAccount(reqDto *dto.AssignAsaAccountsDto) *dto.IsSuccessRespDto {
+ b, err := client.SendHttpRequest("/api/v3/unassign-asa-account", fasthttp.MethodPost, reqDto)
+ var response dto.IsSuccessRespDto
+ if err != nil {
+ fmt.Println(err)
+ return nil
+ }
+ err = json.Unmarshal(b, &response)
+ if err != nil {
+ fmt.Println(err)
+ return nil
+ }
+ return &response
+}
+
+/*
+* @summary 获取 ASA 账号分配的主体列表
+* @description 根据 ASA 账号 ID 分页获取账号被分配的主体列表
+* @param appId 所属应用 ID
+* @param accountId ASA 账号 ID
+* @param page 当前页数,从 1 开始
+* @param limit 每页数目,最大不能超过 50,默认为 10
+* @returns GetAsaAccountAssignedTargetRespDto
+ */
+func (client *ManagementClient) GetAsaAccountAssignedTargets(reqDto *dto.GetAsaAccountAssignedTargetsDto) *dto.GetAsaAccountAssignedTargetRespDto {
+ b, err := client.SendHttpRequest("/api/v3/get-asa-account-assigned-targets", fasthttp.MethodGet, reqDto)
+ var response dto.GetAsaAccountAssignedTargetRespDto
+ if err != nil {
+ fmt.Println(err)
+ return nil
+ }
+ err = json.Unmarshal(b, &response)
+ if err != nil {
+ fmt.Println(err)
+ return nil
+ }
+ return &response
+}
+
+/*
+ * @summary 获取主体被分配的 ASA 账号
+ * @description 根据主体类型和标识获取直接分配给主体的 ASA 账号
+ * @param appId 所属应用 ID
+ * @param targetType 目标对象类型:
+ * - `USER`: 用户
+ * - `ROLE`: 角色
+ * - `GROUP`: 分组
+ * - `DEPARTMENT`: 部门
+ *
+ * @param targetIdentifier 目标对象的唯一标志符:
+ * - 如果是用户,为用户的 ID,如 `6343b98b7cfxxx9366e9b7c`
+ * - 如果是角色,为角色的 code,如 `admin`
+ * - 如果是分组,为分组的 code,如 `developer`
+ * - 如果是部门,为部门的 ID,如 `6343bafc019xxxx889206c4c`
+ *
+ * @returns AsaAccountSingleNullableRespDto
+*/
+func (client *ManagementClient) GetAssignedAccount(reqDto *dto.GetAssignedAccountDto) *dto.AsaAccountSingleNullableRespDto {
+ b, err := client.SendHttpRequest("/api/v3/get-assigned-account", fasthttp.MethodGet, reqDto)
+ var response dto.AsaAccountSingleNullableRespDto
+ if err != nil {
+ fmt.Println(err)
+ return nil
+ }
+ err = json.Unmarshal(b, &response)
+ if err != nil {
+ fmt.Println(err)
+ return nil
+ }
+ return &response
+}
+
+/*
+* @summary 获取安全配置
+* @description 无需传参获取安全配置
+* @returns SecuritySettingsRespDto
+ */
+func (client *ManagementClient) GetSecuritySettings() *dto.SecuritySettingsRespDto {
+ b, err := client.SendHttpRequest("/api/v3/get-security-settings", fasthttp.MethodGet, nil)
+ var response dto.SecuritySettingsRespDto
+ if err != nil {
+ fmt.Println(err)
+ return nil
+ }
+ err = json.Unmarshal(b, &response)
+ if err != nil {
+ fmt.Println(err)
+ return nil
+ }
+ return &response
+}
+
+/*
+* @summary 修改安全配置
+* @description 可选安全域、Authing Token 有效时间(秒)、验证码长度、验证码尝试次数、用户修改邮箱的安全策略、用户修改手机号的安全策略、Cookie 过期时间设置、是否禁止用户注册、频繁注册检测配置、验证码注册后是否要求用户设置密码、未验证的邮箱登录时是否禁止登录并发送认证邮件、用户自助解锁配置、Authing 登录页面是否开启登录账号选择、APP 扫码登录安全配置进行修改安全配置
+* @param requestBody
+* @returns SecuritySettingsRespDto
+ */
+func (client *ManagementClient) UpdateSecuritySettings(reqDto *dto.UpdateSecuritySettingsDto) *dto.SecuritySettingsRespDto {
+ b, err := client.SendHttpRequest("/api/v3/update-security-settings", fasthttp.MethodPost, reqDto)
+ var response dto.SecuritySettingsRespDto
+ if err != nil {
+ fmt.Println(err)
+ return nil
+ }
+ err = json.Unmarshal(b, &response)
+ if err != nil {
+ fmt.Println(err)
+ return nil
+ }
+ return &response
+}
+
+/*
+* @summary 获取全局多因素认证配置
+* @description 无需传参获取全局多因素认证配置
+* @returns MFASettingsRespDto
+ */
+func (client *ManagementClient) GetGlobalMfaSettings() *dto.MFASettingsRespDto {
+ b, err := client.SendHttpRequest("/api/v3/get-global-mfa-settings", fasthttp.MethodGet, nil)
+ var response dto.MFASettingsRespDto
+ if err != nil {
+ fmt.Println(err)
+ return nil
+ }
+ err = json.Unmarshal(b, &response)
+ if err != nil {
+ fmt.Println(err)
+ return nil
+ }
+ return &response
+}
+
+/*
+* @summary 修改全局多因素认证配置
+* @description 传入 MFA 认证因素列表进行开启,
+* @param requestBody
+* @returns MFASettingsRespDto
+ */
+func (client *ManagementClient) UpdateGlobalMfaSettings(reqDto *dto.MFASettingsDto) *dto.MFASettingsRespDto {
+ b, err := client.SendHttpRequest("/api/v3/update-global-mfa-settings", fasthttp.MethodPost, reqDto)
+ var response dto.MFASettingsRespDto
+ if err != nil {
+ fmt.Println(err)
+ return nil
+ }
+ err = json.Unmarshal(b, &response)
+ if err != nil {
+ fmt.Println(err)
+ return nil
+ }
+ return &response
+}
+
+/*
+* @summary 创建租户
+* @param requestBody
+* @returns CreateTenantRespDto
+ */
+func (client *ManagementClient) CreateTenant(reqDto *dto.CreateTenantDto) *dto.CreateTenantRespDto {
+ b, err := client.SendHttpRequest("/api/v3/create-tenant", fasthttp.MethodPost, reqDto)
+ var response dto.CreateTenantRespDto
+ if err != nil {
+ fmt.Println(err)
+ return nil
+ }
+ err = json.Unmarshal(b, &response)
+ if err != nil {
+ fmt.Println(err)
+ return nil
+ }
+ return &response
+}
+
+/*
+* @summary 更新租户数据
+* @description 此接口用于更新租户基本信息。
+* @param requestBody
+* @returns IsSuccessRespDto
+ */
+func (client *ManagementClient) UpdateTenant(reqDto *dto.UpdateTenantDto) *dto.IsSuccessRespDto {
+ b, err := client.SendHttpRequest("/api/v3/update-tenant", fasthttp.MethodPost, reqDto)
+ var response dto.IsSuccessRespDto
+ if err != nil {
+ fmt.Println(err)
+ return nil
+ }
+ err = json.Unmarshal(b, &response)
+ if err != nil {
+ fmt.Println(err)
+ return nil
+ }
+ return &response
+}
+
+/*
+* @summary 删除租户
+* @description 此接口用于删除租户。
+* @param requestBody
+* @returns IsSuccessRespDto
+ */
+func (client *ManagementClient) DeleteTenant(reqDto *dto.DeleteTenantDto) *dto.IsSuccessRespDto {
+ b, err := client.SendHttpRequest("/api/v3/delete-tenant", fasthttp.MethodPost, reqDto)
+ var response dto.IsSuccessRespDto
+ if err != nil {
+ fmt.Println(err)
+ return nil
+ }
+ err = json.Unmarshal(b, &response)
+ if err != nil {
+ fmt.Println(err)
+ return nil
+ }
+ return &response
+}
+
+/*
+* @summary 获取/搜索租户列表
+* @description 此接口用于获取租户列表,支持模糊搜索。
+* @param keywords 搜索关键字
+* @param withMembersCount 是否增加返回租户成员统计
+* @param withAppDetail 增加返回租户下 app 简单信息
+* @param withCreatorDetail 增加返回租户下创建者简单信息
+* @param withSourceAppDetail 增加返回租户下来源 app 简单信息
+* @param page 页码
+* @param limit 每页获取的数据量
+* @param source 租户来源
+* @returns TenantListPaginatedRespDto
+ */
+func (client *ManagementClient) ListTenants(reqDto *dto.ListTenantsDto) *dto.TenantListPaginatedRespDto {
+ b, err := client.SendHttpRequest("/api/v3/list-tenants", fasthttp.MethodGet, reqDto)
+ var response dto.TenantListPaginatedRespDto
+ if err != nil {
+ fmt.Println(err)
+ return nil
+ }
+ err = json.Unmarshal(b, &response)
+ if err != nil {
+ fmt.Println(err)
+ return nil
+ }
+ return &response
+}
+
+/*
+* @summary 获取租户一点点的信息
+* @description 根据租户 ID 获取租户一点点的详情
+* @param tenantId 租户 ID
+* @param withMembersCount 是否增加返回租户成员统计
+* @param withAppDetail 增加返回租户关联应用简单信息
+* @param withCreatorDetail 增加返回租户下创建者简单信息
+* @param withSourceAppDetail 增加返回租户来源应用简单信息
+* @returns TenantSingleRespDto
+ */
+func (client *ManagementClient) GetTenantLittleInfo(reqDto *dto.GetTenantLittleInfoDto) *dto.TenantSingleRespDto {
+ b, err := client.SendHttpRequest("/api/v3/get-tenant-little-info", fasthttp.MethodGet, reqDto)
+ var response dto.TenantSingleRespDto
+ if err != nil {
+ fmt.Println(err)
+ return nil
+ }
+ err = json.Unmarshal(b, &response)
+ if err != nil {
+ fmt.Println(err)
+ return nil
+ }
+ return &response
+}
+
+/*
+* @summary 获取租户详情
+* @description 根据租户 ID 获取租户详情
+* @param tenantId 租户 ID
+* @param withMembersCount 是否增加返回租户成员统计
+* @param withAppDetail 增加返回租户关联应用简单信息
+* @param withCreatorDetail 增加返回租户下创建者简单信息
+* @param withSourceAppDetail 增加返回租户来源应用简单信息
+* @returns TenantSingleRespDto
+ */
+func (client *ManagementClient) GetTenant(reqDto *dto.GetTenantDto) *dto.TenantSingleRespDto {
+ b, err := client.SendHttpRequest("/api/v3/get-tenant", fasthttp.MethodGet, reqDto)
+ var response dto.TenantSingleRespDto
+ if err != nil {
+ fmt.Println(err)
+ return nil
+ }
+ err = json.Unmarshal(b, &response)
+ if err != nil {
+ fmt.Println(err)
+ return nil
+ }
+ return &response
+}
+
+/*
+* @summary 导入租户
+* @description 此接口用于 Excel 导入租户。
+* @param requestBody
+* @returns ImportTenantRespDto
+ */
+func (client *ManagementClient) ImportTenant(reqDto *dto.ImportTenantDto) *dto.ImportTenantRespDto {
+ b, err := client.SendHttpRequest("/api/v3/import-tenant", fasthttp.MethodPost, reqDto)
+ var response dto.ImportTenantRespDto
+ if err != nil {
+ fmt.Println(err)
+ return nil
+ }
+ err = json.Unmarshal(b, &response)
+ if err != nil {
+ fmt.Println(err)
+ return nil
+ }
+ return &response
+}
+
+/*
+* @summary 导入租户历史
+* @description 此接口用于 Excel 导入租户的历史查询。
+* @param page 页码
+* @param limit 每页获取的数据量
+* @returns ImportTenantHistoryRespDto
+ */
+func (client *ManagementClient) ImportTenantHistory(reqDto *dto.ImportTenantHistoryDto) *dto.ImportTenantHistoryRespDto {
+ b, err := client.SendHttpRequest("/api/v3/import-tenant-history", fasthttp.MethodGet, reqDto)
+ var response dto.ImportTenantHistoryRespDto
+ if err != nil {
+ fmt.Println(err)
+ return nil
+ }
+ err = json.Unmarshal(b, &response)
+ if err != nil {
+ fmt.Println(err)
+ return nil
+ }
+ return &response
+}
+
+/*
+* @summary 导入租户通知用户列表
+* @description 此接口用于查询导入租户通知用户列表。
+* @param importId 导入记录 id
+* @param page 页码
+* @param limit 每页获取的数据量
+* @returns ImportTenantNotifyUserRespDto
+ */
+func (client *ManagementClient) ImportTenantNotifyUser(reqDto *dto.ImportTenantNotifyUserDto) *dto.ImportTenantNotifyUserRespDto {
+ b, err := client.SendHttpRequest("/api/v3/import-tenant-notify-user", fasthttp.MethodGet, reqDto)
+ var response dto.ImportTenantNotifyUserRespDto
+ if err != nil {
+ fmt.Println(err)
+ return nil
+ }
+ err = json.Unmarshal(b, &response)
+ if err != nil {
+ fmt.Println(err)
+ return nil
+ }
+ return &response
+}
+
+/*
+* @summary 导入租户通知邮箱用户
+* @description 此接口用于批量发送邮件通知。
+* @param requestBody
+* @returns SendEmailBatchDataDto
+ */
+func (client *ManagementClient) SendEmailBatch(reqDto *dto.SendManyTenantEmailDto) *dto.SendEmailBatchDataDto {
+ b, err := client.SendHttpRequest("/api/v3/send-email-batch", fasthttp.MethodPost, reqDto)
+ var response dto.SendEmailBatchDataDto
+ if err != nil {
+ fmt.Println(err)
+ return nil
+ }
+ err = json.Unmarshal(b, &response)
+ if err != nil {
+ fmt.Println(err)
+ return nil
+ }
+ return &response
+}
+
+/*
+* @summary 导入租户短信通知用户
+* @description 此接口用于批量发送短信通知。
+* @param requestBody
+* @returns SendSmsBatchRespDto
+ */
+func (client *ManagementClient) SendSmsBatch(reqDto *dto.SendManyTenantSmsDto) *dto.SendSmsBatchRespDto {
+ b, err := client.SendHttpRequest("/api/v3/send-sms-batch", fasthttp.MethodPost, reqDto)
+ var response dto.SendSmsBatchRespDto
+ if err != nil {
+ fmt.Println(err)
+ return nil
+ }
+ err = json.Unmarshal(b, &response)
+ if err != nil {
+ fmt.Println(err)
+ return nil
+ }
+ return &response
+}
+
+/*
+* @summary 获取租户管理员列表
+* @description 此接口用于获取租户成员列表,支持模糊搜索。
+* @param requestBody
+* @returns TenantUserListPaginatedRespDto
+ */
+func (client *ManagementClient) ListTenantAdmin(reqDto *dto.ListTenantAdminDto) *dto.TenantUserListPaginatedRespDto {
+ b, err := client.SendHttpRequest("/api/v3/list-tenant-admin", fasthttp.MethodPost, reqDto)
+ var response dto.TenantUserListPaginatedRespDto
+ if err != nil {
+ fmt.Println(err)
+ return nil
+ }
+ err = json.Unmarshal(b, &response)
+ if err != nil {
+ fmt.Println(err)
+ return nil
+ }
+ return &response
+}
+
+/*
+* @summary 设置租户管理员
+* @description 此接口用于根据用户 ID 或租户成员 ID 设置租户管理员。
+* @param requestBody
+* @returns CommonResponseDto
+ */
+func (client *ManagementClient) SetTenantAdmin(reqDto *dto.RemoveTenantUsersDto) *dto.CommonResponseDto {
+ b, err := client.SendHttpRequest("/api/v3/set-tenant-admin", fasthttp.MethodPost, reqDto)
+ var response dto.CommonResponseDto
+ if err != nil {
+ fmt.Println(err)
+ return nil
+ }
+ err = json.Unmarshal(b, &response)
+ if err != nil {
+ fmt.Println(err)
+ return nil
+ }
+ return &response
+}
+
+/*
+* @summary 取消设置租户管理员
+* @description 此接口用于根据用户 ID 或租户成员 ID 取消设置租户管理员。
+* @param requestBody
+* @returns CommonResponseDto
+ */
+func (client *ManagementClient) DeleteTenantAdmin(reqDto *dto.GetTenantUserDto) *dto.CommonResponseDto {
+ b, err := client.SendHttpRequest("/api/v3/delete-tenant-admin", fasthttp.MethodPost, reqDto)
+ var response dto.CommonResponseDto
+ if err != nil {
+ fmt.Println(err)
+ return nil
+ }
+ err = json.Unmarshal(b, &response)
+ if err != nil {
+ fmt.Println(err)
+ return nil
+ }
+ return &response
+}
+
+/*
+* @summary 批量移除租户成员
+* @description 此接口用于根据用户 ID 或租户成员 ID 批量移除租户成员。
+* @param requestBody
+* @returns CommonResponseDto
+ */
+func (client *ManagementClient) DeleteTenantUser(reqDto *dto.RemoveTenantUsersDto) *dto.CommonResponseDto {
+ b, err := client.SendHttpRequest("/api/v3/delete-tenant-user", fasthttp.MethodPost, reqDto)
+ var response dto.CommonResponseDto
+ if err != nil {
+ fmt.Println(err)
+ return nil
+ }
+ err = json.Unmarshal(b, &response)
+ if err != nil {
+ fmt.Println(err)
+ return nil
+ }
+ return &response
+}
+
+/*
+* @summary 生成一个邀请租户成员的链接
+* @description 此接口用于生成一个邀请租户成员的链接。appId 为用户注册成功后要访问的应用 ID
+* @param requestBody
+* @returns InviteTenantUsersRespDto
+ */
+func (client *ManagementClient) GenerateInviteTenantUserLink(reqDto *dto.GenerateInviteTenantUserLink) *dto.InviteTenantUsersRespDto {
+ b, err := client.SendHttpRequest("/api/v3/generate-invite-tenant-user-link", fasthttp.MethodPost, reqDto)
+ var response dto.InviteTenantUsersRespDto
+ if err != nil {
+ fmt.Println(err)
+ return nil
+ }
+ err = json.Unmarshal(b, &response)
+ if err != nil {
+ fmt.Println(err)
+ return nil
+ }
+ return &response
+}
+
+/*
+* @summary 获取可访问的租户控制台列表
+* @description 根据用户 ID 获取可访问的租户控制台列表
+* @param keywords 搜索关键字
+* @param page 页码
+* @param limit 每页获取的数据量
+* @returns InviteTenantUserRecordListRespDto
+ */
+func (client *ManagementClient) ListInviteTennatUserRecords(reqDto *dto.ListInviteTenantUserRecordsDto) *dto.InviteTenantUserRecordListRespDto {
+ b, err := client.SendHttpRequest("/api/v3/list-invite-tenant-user-records", fasthttp.MethodGet, reqDto)
+ var response dto.InviteTenantUserRecordListRespDto
+ if err != nil {
+ fmt.Println(err)
+ return nil
+ }
+ err = json.Unmarshal(b, &response)
+ if err != nil {
+ fmt.Println(err)
+ return nil
+ }
+ return &response
+}
+
+/*
+* @summary 获取多租户管理员用户列表
+* @description 根据用户池 ID 获取某个用户池内拥有多租户管理权限的用户列表
+* @param keywords 搜索关键字
+* @param page 页码
+* @param limit 每页获取的数据量
+* @returns MultipleTenantAdminPaginatedRespDto
+ */
+func (client *ManagementClient) ListMultipleTenantAdmin(reqDto *dto.ListMultipleTenantAdminsDto) *dto.MultipleTenantAdminPaginatedRespDto {
+ b, err := client.SendHttpRequest("/api/v3/list-multiple-tenant-admins", fasthttp.MethodGet, reqDto)
+ var response dto.MultipleTenantAdminPaginatedRespDto
+ if err != nil {
+ fmt.Println(err)
+ return nil
+ }
+ err = json.Unmarshal(b, &response)
+ if err != nil {
+ fmt.Println(err)
+ return nil
+ }
+ return &response
+}
+
+/*
+* @summary 创建多租户管理员用户
+* @description 根据用户 ID 创建一个用户池内拥有多租户管理权限的用户
+* @param requestBody
+* @returns CommonResponseDto
+ */
+func (client *ManagementClient) CreateMultipleTenantAdmin(reqDto *dto.CreateMultipleTenantAdminDto) *dto.CommonResponseDto {
+ b, err := client.SendHttpRequest("/api/v3/create-multiple-tenant-admin", fasthttp.MethodPost, reqDto)
+ var response dto.CommonResponseDto
+ if err != nil {
+ fmt.Println(err)
+ return nil
+ }
+ err = json.Unmarshal(b, &response)
+ if err != nil {
+ fmt.Println(err)
+ return nil
+ }
+ return &response
+}
+
+/*
+* @summary 获取多租户管理员用户列表
+* @description 根据用户池 ID 获取某个用户池内拥有多租户管理权限的用户列表
+* @param userId 用户 ID
+* @returns MultipleTenantAdminPaginatedRespDto
+ */
+func (client *ManagementClient) GetMultipleTenantAdmin(reqDto *dto.GetMultipleTenantAdminDto) *dto.MultipleTenantAdminPaginatedRespDto {
+ b, err := client.SendHttpRequest("/api/v3/get-multiple-tenant-admin", fasthttp.MethodGet, reqDto)
+ var response dto.MultipleTenantAdminPaginatedRespDto
+ if err != nil {
+ fmt.Println(err)
+ return nil
+ }
+ err = json.Unmarshal(b, &response)
+ if err != nil {
+ fmt.Println(err)
+ return nil
+ }
+ return &response
+}
+
+/*
+* @summary 更新多租户管理员用户
+* @description 根据用户 ID 更新一个用户池内拥有多租户管理权限的用户的信息
+* @param userId 用户 ID
+* @param requestBody
+* @returns CommonResponseDto
+ */
+func (client *ManagementClient) UpdateMultipleTenantAdmin(reqDto *dto.UpdateMultipleTenantAdminDto) *dto.CommonResponseDto {
+ b, err := client.SendHttpRequest("/api/v3/update-multiple-tenant-admin", fasthttp.MethodPost, reqDto)
+ var response dto.CommonResponseDto
+ if err != nil {
+ fmt.Println(err)
+ return nil
+ }
+ err = json.Unmarshal(b, &response)
+ if err != nil {
+ fmt.Println(err)
+ return nil
+ }
+ return &response
+}
+
+/*
+* @summary 删除多租户管理员用户
+* @description 根据用户 ID 删除一个用户池内拥有多租户管理权限的用户
+* @param requestBody
+* @param userId 用户 ID(请使用 body 中的 userId)
+* @returns CommonResponseDto
+ */
+func (client *ManagementClient) DeleteMultipleTenantAdmin(reqDto *dto.DeleteMultipleTenantAdminBodyDto) *dto.CommonResponseDto {
+ b, err := client.SendHttpRequest("/api/v3/delete-multiple-tenant-admin", fasthttp.MethodPost, reqDto)
+ var response dto.CommonResponseDto
+ if err != nil {
+ fmt.Println(err)
+ return nil
+ }
+ err = json.Unmarshal(b, &response)
+ if err != nil {
+ fmt.Println(err)
+ return nil
+ }
+ return &response
+}
+
+/*
+* @summary 获取协作管理员用户列表
+* @description 根据用户池 ID 获取某个用户池内拥有协作管理员能力的用户列表
+* @param keywords 搜索关键字
+* @param external 是否外部
+* @param page 页码
+* @param limit 每页获取的数据量
+* @returns TenantCooperatorPaginatedRespDto
+ */
+func (client *ManagementClient) ListTenantCooperators(reqDto *dto.ListTenantCooperatorsDto) *dto.TenantCooperatorPaginatedRespDto {
+ b, err := client.SendHttpRequest("/api/v3/list-tenant-cooperators", fasthttp.MethodGet, reqDto)
+ var response dto.TenantCooperatorPaginatedRespDto
+ if err != nil {
+ fmt.Println(err)
+ return nil
+ }
+ err = json.Unmarshal(b, &response)
+ if err != nil {
+ fmt.Println(err)
+ return nil
+ }
+ return &response
+}
+
+/*
+* @summary 获取一个协调管理员
+* @description 根据用户池 ID 获取某个协调管理员的列表
+* @param userId 用户 ID
+* @returns TenantCooperatorSingleRespDto
+ */
+func (client *ManagementClient) GetTenantCooperator(reqDto *dto.GetTenantCooperatorDto) *dto.TenantCooperatorSingleRespDto {
+ b, err := client.SendHttpRequest("/api/v3/get-tenant-cooperator", fasthttp.MethodGet, reqDto)
+ var response dto.TenantCooperatorSingleRespDto
+ if err != nil {
+ fmt.Println(err)
+ return nil
+ }
+ err = json.Unmarshal(b, &response)
+ if err != nil {
+ fmt.Println(err)
+ return nil
+ }
+ return &response
+}
+
+/*
+* @summary 获取一个协调管理员拥有的列表
+* @description 根据用户池 ID 获取某个协调管理员的列表
+* @param userId 用户 ID
+* @returns TenantCooperatorSingleRespDto
+ */
+func (client *ManagementClient) GetTenantCooperatorMenu(reqDto *dto.GetTenantCooperatorMenuDto) *dto.TenantCooperatorSingleRespDto {
+ b, err := client.SendHttpRequest("/api/v3/get-tenant-cooperator-menu", fasthttp.MethodGet, reqDto)
+ var response dto.TenantCooperatorSingleRespDto
+ if err != nil {
+ fmt.Println(err)
+ return nil
+ }
+ err = json.Unmarshal(b, &response)
+ if err != nil {
+ fmt.Println(err)
+ return nil
+ }
+ return &response
+}
+
+/*
+* @summary 创建协调管理员
+* @description 创建一个协调管理员
+* @param requestBody
+* @returns CommonResponseDto
+ */
+func (client *ManagementClient) CreateTenantCooperator(reqDto *dto.CreateTenantCooperatorDto) *dto.CommonResponseDto {
+ b, err := client.SendHttpRequest("/api/v3/create-tenant-cooperator", fasthttp.MethodPost, reqDto)
+ var response dto.CommonResponseDto
+ if err != nil {
+ fmt.Println(err)
+ return nil
+ }
+ err = json.Unmarshal(b, &response)
+ if err != nil {
+ fmt.Println(err)
+ return nil
+ }
+ return &response
+}
+
+/*
+* @summary 更新协调管理员
+* @description 根据用户 ID 更新一个协调管理员
+* @param userId 用户 ID
+* @param requestBody
+* @returns CommonResponseDto
+ */
+func (client *ManagementClient) UpdateTenantCooperator(reqDto *dto.UpdateTenantCooperatorDto) *dto.CommonResponseDto {
+ b, err := client.SendHttpRequest("/api/v3/update-tenant-cooperator", fasthttp.MethodPost, reqDto)
+ var response dto.CommonResponseDto
+ if err != nil {
+ fmt.Println(err)
+ return nil
+ }
+ err = json.Unmarshal(b, &response)
+ if err != nil {
+ fmt.Println(err)
+ return nil
+ }
+ return &response
+}
+
+/*
+* @summary 删除协调管理员
+* @description 使用用户 ID 删除一个协调管理员
+* @param requestBody
+* @param userId 用户 ID(请使用 body 中的 userId)
+* @returns CommonResponseDto
+ */
+func (client *ManagementClient) DeleteTenantCooperator(reqDto *dto.DeleteTenantCooperatorBodyDto) *dto.CommonResponseDto {
+ b, err := client.SendHttpRequest("/api/v3/delete-tenant-cooperator", fasthttp.MethodPost, reqDto)
+ var response dto.CommonResponseDto
+ if err != nil {
+ fmt.Println(err)
+ return nil
+ }
+ err = json.Unmarshal(b, &response)
+ if err != nil {
+ fmt.Println(err)
+ return nil
+ }
+ return &response
+}
+
+/*
+* @summary 获取租户详情
+* @description 根据租户 Code 获取租户详情
+* @param code 租户 Code
+* @returns TenantSingleRespDto
+ */
+func (client *ManagementClient) GetTenantByCode(reqDto *dto.GetTenantByCodeDto) *dto.TenantSingleRespDto {
+ b, err := client.SendHttpRequest("/api/v3/get-tenant-by-code", fasthttp.MethodGet, reqDto)
+ var response dto.TenantSingleRespDto
+ if err != nil {
+ fmt.Println(err)
+ return nil
+ }
+ err = json.Unmarshal(b, &response)
+ if err != nil {
+ fmt.Println(err)
+ return nil
+ }
+ return &response
+}
+
+/*
+* @summary 发送邀请租户用户邮件
+* @description 向多个邮箱发送邀请成为租户用户的邮件
+* @param requestBody
+* @returns CommonResponseDto
+ */
+func (client *ManagementClient) SendInviteTenantUserEmail(reqDto *dto.SendInviteTenantUserEmailDto) *dto.CommonResponseDto {
+ b, err := client.SendHttpRequest("/api/v3/send-invite-tenant-user-email", fasthttp.MethodPost, reqDto)
+ var response dto.CommonResponseDto
+ if err != nil {
+ fmt.Println(err)
+ return nil
+ }
+ err = json.Unmarshal(b, &response)
+ if err != nil {
+ fmt.Println(err)
+ return nil
+ }
+ return &response
+}
+
+/*
+* @summary 添加租户成员
+* @description 根据用户 ID 批量添加租户成员
+* @param requestBody
+* @returns CommonResponseDto
+ */
+func (client *ManagementClient) AddTenantUsers(reqDto *dto.AddTenantUsersDto) *dto.CommonResponseDto {
+ b, err := client.SendHttpRequest("/api/v3/add-tenant-users", fasthttp.MethodPost, reqDto)
+ var response dto.CommonResponseDto
+ if err != nil {
+ fmt.Println(err)
+ return nil
+ }
+ err = json.Unmarshal(b, &response)
+ if err != nil {
+ fmt.Println(err)
+ return nil
+ }
+ return &response
+}
+
+/*
+* @summary 批量移除租户成员
+* @description 此接口用于根据用户 ID 或租户成员 ID 批量移除租户成员。
+* @param requestBody
+* @returns CommonResponseDto
+ */
+func (client *ManagementClient) RemoveTenantUsers(reqDto *dto.RemoveTenantUsersDto) *dto.CommonResponseDto {
+ b, err := client.SendHttpRequest("/api/v3/remove-tenant-users", fasthttp.MethodPost, reqDto)
+ var response dto.CommonResponseDto
+ if err != nil {
+ fmt.Println(err)
+ return nil
+ }
+ err = json.Unmarshal(b, &response)
+ if err != nil {
+ fmt.Println(err)
+ return nil
+ }
+ return &response
+}
+
+/*
+* @summary 更新租户成员
+* @description 此接口用于根据用户 ID 或租户成员 ID 更新租户成员。
+* @param requestBody
+* @returns CommonResponseDto
+ */
+func (client *ManagementClient) UpdateTenantUser(reqDto *dto.UpdateTenantUserDto) *dto.CommonResponseDto {
+ b, err := client.SendHttpRequest("/api/v3/update-tenant-user", fasthttp.MethodPost, reqDto)
+ var response dto.CommonResponseDto
+ if err != nil {
+ fmt.Println(err)
+ return nil
+ }
+ err = json.Unmarshal(b, &response)
+ if err != nil {
+ fmt.Println(err)
+ return nil
+ }
+ return &response
+}
+
+/*
+* @summary 创建租户成员
+* @description 创建租户成员,邮箱、手机号、用户名必须包含其中一个,邮箱、手机号、用户名、externalId 用户池内唯一,此接口将以管理员身份创建用户因此不需要进行手机号验证码检验等安全检测。
+* @param requestBody
+* @returns TenantUserDto
+ */
+func (client *ManagementClient) CreateTenantUser(reqDto *dto.CreateTenantUserReqDto) *dto.TenantUserDto {
+ b, err := client.SendHttpRequest("/api/v3/create-tenant-user", fasthttp.MethodPost, reqDto)
+ var response dto.TenantUserDto
+ if err != nil {
+ fmt.Println(err)
+ return nil
+ }
+ err = json.Unmarshal(b, &response)
+ if err != nil {
+ fmt.Println(err)
+ return nil
+ }
+ return &response
+}
+
+/*
+ * @summary 获取/搜索租户成员列表
+ * @description
+ * 此接口用于获取用户列表,支持模糊搜索,以及通过用户基础字段、用户自定义字段、用户所在部门、用户历史登录应用等维度筛选用户。
+ *
+ * ### 模糊搜素示例
+ *
+ * 模糊搜索默认会从 `phone`, `email`, `name`, `username`, `nickname` 五个字段对用户进行模糊搜索,你也可以通过设置 `options.fuzzySearchOn`
+ * 决定模糊匹配的字段范围:
+ *
+ * ```json
+ * {
+ * "keywords": "北京",
+ * "options": {
+ * "fuzzySearchOn": [
+ * "address"
+ * ]
+ * }
+ * }
+ * ```
+ *
+ * ### 高级搜索示例
+ *
+ * 你可以通过 `advancedFilter` 进行高级搜索,高级搜索支持通过用户的基础信息、自定义数据、所在部门、用户来源、登录应用、外部身份源信息等维度对用户进行筛选。
+ * **且这些筛选条件可以任意组合。**
+ *
+ * #### 筛选邮箱中包含 `@example.com` 的用户
+ *
+ * 用户邮箱(`email`)为字符串类型,可以进行模糊搜索:
+ *
+ * ```json
+ * {
+ * "advancedFilter": [
+ * {
+ * "field": "email",
+ * "operator": "CONTAINS",
+ * "value": "@example.com"
+ * }
+ * ]
+ * }
+ * ```
+ *
+ *
+ * #### 根据用户登录次数筛选
+ *
+ * 筛选登录次数大于 10 的用户:
+ *
+ * ```json
+ * {
+ * "advancedFilter": [
+ * {
+ * "field": "loginsCount",
+ * "operator": "GREATER",
+ * "value": 10
+ * }
+ * ]
+ * }
+ * ```
+ *
+ * 筛选登录次数在 10 - 100 次的用户:
+ *
+ * ```json
+ * {
+ * "advancedFilter": [
+ * {
+ * "field": "loginsCount",
+ * "operator": "BETWEEN",
+ * "value": [10, 100]
+ * }
+ * ]
+ * }
+ * ```
+ *
+ * #### 根据用户上次登录时间进行筛选
+ *
+ * 筛选最近 7 天内登录过的用户:
+ *
+ * ```json
+ * {
+ * "advancedFilter": [
+ * {
+ * "field": "lastLoginTime",
+ * "operator": "GREATER",
+ * "value": new Date(Date.now() - 7 * 24 * 60 * 60 * 1000)
+ * }
+ * ]
+ * }
+ * ```
+ *
+ * 筛选在某一段时间内登录过的用户:
+ *
+ * ```json
+ * {
+ * "advancedFilter": [
+ * {
+ * "field": "lastLoginTime",
+ * "operator": "BETWEEN",
+ * "value": [
+ * Date.now() - 14 * 24 * 60 * 60 * 1000,
+ * Date.now() - 7 * 24 * 60 * 60 * 1000
+ * ]
+ * }
+ * ]
+ * }
+ * ```
+ *
+ * #### 根据用户曾经登录过的应用筛选
+ *
+ * 筛选出曾经登录过应用 `appId1` 或者 `appId2` 的用户:
+ *
+ * ```json
+ * {
+ * "advancedFilter": [
+ * {
+ * "field": "loggedInApps",
+ * "operator": "IN",
+ * "value": [
+ * "appId1",
+ * "appId2"
+ * ]
+ * }
+ * ]
+ * }
+ * ```
+ *
+ * #### 根据用户所在部门进行筛选
+ *
+ * ```json
+ * {
+ * "advancedFilter": [
+ * {
+ * "field": "department",
+ * "operator": "IN",
+ * "value": [
+ * {
+ * "organizationCode": "steamory",
+ * "departmentId": "root",
+ * "departmentIdType": "department_id",
+ * "includeChildrenDepartments": true
+ * }
+ * ]
+ * }
+ * ]
+ * }
+ * ```
+ *
+ *
+ * @param requestBody
+ * @returns TenantUserListPaginatedRespDto
+*/
+func (client *ManagementClient) ListTenantUsers(reqDto *dto.ListTenantUserDto) *dto.TenantUserListPaginatedRespDto {
+ b, err := client.SendHttpRequest("/api/v3/list-tenant-users", fasthttp.MethodPost, reqDto)
+ var response dto.TenantUserListPaginatedRespDto
+ if err != nil {
+ fmt.Println(err)
+ return nil
+ }
+ err = json.Unmarshal(b, &response)
+ if err != nil {
+ fmt.Println(err)
+ return nil
+ }
+ return &response
+}
+
+/*
+* @summary 获取单个租户成员
+* @description 根据用户 ID 或租户成员 ID 获取租户成员信息
+* @param tenantId 租户 ID
+* @param linkUserId 关联的用户池级别的用户 ID
+* @param memberId 租户成员 ID
+* @returns TenantUserSingleRespDto
+ */
+func (client *ManagementClient) GetTenantUser(reqDto *dto.GetTenantUserDto) *dto.TenantUserSingleRespDto {
+ b, err := client.SendHttpRequest("/api/v3/get-tenant-user", fasthttp.MethodGet, reqDto)
+ var response dto.TenantUserSingleRespDto
+ if err != nil {
+ fmt.Println(err)
+ return nil
+ }
+ err = json.Unmarshal(b, &response)
+ if err != nil {
+ fmt.Println(err)
+ return nil
+ }
+ return &response
+}
+
+/*
+* @summary 租户部门下添加成员
+* @description 通过部门 ID、组织 code,添加部门下成员。
+* @param requestBody
+* @returns IsSuccessRespDto
+ */
+func (client *ManagementClient) AddTenantDepartmentMembers(reqDto *dto.AddTenantDepartmentMembersReqDto) *dto.IsSuccessRespDto {
+ b, err := client.SendHttpRequest("/api/v3/add-tenant-department-members", fasthttp.MethodPost, reqDto)
+ var response dto.IsSuccessRespDto
+ if err != nil {
+ fmt.Println(err)
+ return nil
+ }
+ err = json.Unmarshal(b, &response)
+ if err != nil {
+ fmt.Println(err)
+ return nil
+ }
+ return &response
+}
+
+/*
+* @summary 租户部门下删除成员
+* @description 通过部门 ID、组织 code,删除部门下成员。
+* @param requestBody
+* @returns IsSuccessRespDto
+ */
+func (client *ManagementClient) RemoveTenantDepartmentMembers(reqDto *dto.RemoveTenantDepartmentMembersReqDto) *dto.IsSuccessRespDto {
+ b, err := client.SendHttpRequest("/api/v3/remove-tenant-department-members", fasthttp.MethodPost, reqDto)
+ var response dto.IsSuccessRespDto
+ if err != nil {
+ fmt.Println(err)
+ return nil
+ }
+ err = json.Unmarshal(b, &response)
+ if err != nil {
+ fmt.Println(err)
+ return nil
+ }
+ return &response
+}
+
+/*
+* @summary 创建权限空间
+* @description 创建权限空间,可以设置权限空间名称、Code 和描述信息。
+* @param requestBody
+* @returns CreatePermissionNamespaceResponseDto
+ */
+func (client *ManagementClient) CreatePermissionNamespace(reqDto *dto.CreatePermissionNamespaceDto) *dto.CreatePermissionNamespaceResponseDto {
+ b, err := client.SendHttpRequest("/api/v3/create-permission-namespace", fasthttp.MethodPost, reqDto)
+ var response dto.CreatePermissionNamespaceResponseDto
+ if err != nil {
+ fmt.Println(err)
+ return nil
+ }
+ err = json.Unmarshal(b, &response)
+ if err != nil {
+ fmt.Println(err)
+ return nil
+ }
+ return &response
+}
+
+/*
+* @summary 批量创建权限空间
+* @description 批量创建权限空间,可以分别设置权限空间名称、Code 和描述信息。
+* @param requestBody
+* @returns IsSuccessRespDto
+ */
+func (client *ManagementClient) CreatePermissionNamespacesBatch(reqDto *dto.CreatePermissionNamespacesBatchDto) *dto.IsSuccessRespDto {
+ b, err := client.SendHttpRequest("/api/v3/create-permission-namespaces-batch", fasthttp.MethodPost, reqDto)
+ var response dto.IsSuccessRespDto
+ if err != nil {
+ fmt.Println(err)
+ return nil
+ }
+ err = json.Unmarshal(b, &response)
+ if err != nil {
+ fmt.Println(err)
+ return nil
+ }
+ return &response
+}
+
+/*
+* @summary 获取权限空间详情
+* @description 通过权限空间唯一标志符(Code),获取权限空间详情。
+* @param code 权限空间 Code
+* @returns GetPermissionNamespaceResponseDto
+ */
+func (client *ManagementClient) GetPermissionNamespace(reqDto *dto.GetPermissionNamespaceDto) *dto.GetPermissionNamespaceResponseDto {
+ b, err := client.SendHttpRequest("/api/v3/get-permission-namespace", fasthttp.MethodGet, reqDto)
+ var response dto.GetPermissionNamespaceResponseDto
+ if err != nil {
+ fmt.Println(err)
+ return nil
+ }
+ err = json.Unmarshal(b, &response)
+ if err != nil {
+ fmt.Println(err)
+ return nil
+ }
+ return &response
+}
+
+/*
+* @summary 批量获取权限空间详情列表
+* @description 分别通过权限空间唯一标志符(Code),获取权限空间详情。
+* @param codes 权限空间 code 列表,批量可以使用逗号分隔
+* @returns GetPermissionNamespaceListResponseDto
+ */
+func (client *ManagementClient) GetPermissionNamespacesBatch(reqDto *dto.GetPermissionNamespacesBatchDto) *dto.GetPermissionNamespaceListResponseDto {
+ b, err := client.SendHttpRequest("/api/v3/get-permission-namespaces-batch", fasthttp.MethodGet, reqDto)
+ var response dto.GetPermissionNamespaceListResponseDto
+ if err != nil {
+ fmt.Println(err)
+ return nil
+ }
+ err = json.Unmarshal(b, &response)
+ if err != nil {
+ fmt.Println(err)
+ return nil
+ }
+ return &response
+}
+
+/*
+* @summary 分页获取权限空间列表
+* @description 分页获取权限空间列表。
+* @param page 当前页数,从 1 开始
+* @param limit 每页数目,最大不能超过 50,默认为 10
+* @param query 权限空间 name
+* @returns PermissionNamespaceListPaginatedRespDto
+ */
+func (client *ManagementClient) ListPermissionNamespaces(reqDto *dto.ListPermissionNamespacesDto) *dto.PermissionNamespaceListPaginatedRespDto {
+ b, err := client.SendHttpRequest("/api/v3/list-permission-namespaces", fasthttp.MethodGet, reqDto)
+ var response dto.PermissionNamespaceListPaginatedRespDto
+ if err != nil {
+ fmt.Println(err)
+ return nil
+ }
+ err = json.Unmarshal(b, &response)
+ if err != nil {
+ fmt.Println(err)
+ return nil
+ }
+ return &response
+}
+
+/*
+* @summary 修改权限空间
+* @description 修改权限空间,可以修改权限空间名称、权限空间描述信息以及权限空间新的唯一标志符(Code)。
+* @param requestBody
+* @returns UpdatePermissionNamespaceResponseDto
+ */
+func (client *ManagementClient) UpdatePermissionNamespace(reqDto *dto.UpdatePermissionNamespaceDto) *dto.UpdatePermissionNamespaceResponseDto {
+ b, err := client.SendHttpRequest("/api/v3/update-permission-namespace", fasthttp.MethodPost, reqDto)
+ var response dto.UpdatePermissionNamespaceResponseDto
+ if err != nil {
+ fmt.Println(err)
+ return nil
+ }
+ err = json.Unmarshal(b, &response)
+ if err != nil {
+ fmt.Println(err)
+ return nil
+ }
+ return &response
+}
+
+/*
+* @summary 删除权限空间
+* @description 通过权限空间唯一标志符(Code),删除权限空间信息。
+* @param requestBody
+* @returns IsSuccessRespDto
+ */
+func (client *ManagementClient) DeletePermissionNamespace(reqDto *dto.DeletePermissionNamespaceDto) *dto.IsSuccessRespDto {
+ b, err := client.SendHttpRequest("/api/v3/delete-permission-namespace", fasthttp.MethodPost, reqDto)
+ var response dto.IsSuccessRespDto
+ if err != nil {
+ fmt.Println(err)
+ return nil
+ }
+ err = json.Unmarshal(b, &response)
+ if err != nil {
+ fmt.Println(err)
+ return nil
+ }
+ return &response
+}
+
+/*
+* @summary 批量删除权限空间
+* @description 分别通过权限空间唯一标志符(Code),批量删除权限空间信息。
+* @param requestBody
+* @returns IsSuccessRespDto
+ */
+func (client *ManagementClient) DeletePermissionNamespacesBatch(reqDto *dto.DeletePermissionNamespacesBatchDto) *dto.IsSuccessRespDto {
+ b, err := client.SendHttpRequest("/api/v3/delete-permission-namespaces-batch", fasthttp.MethodPost, reqDto)
+ var response dto.IsSuccessRespDto
+ if err != nil {
+ fmt.Println(err)
+ return nil
+ }
+ err = json.Unmarshal(b, &response)
+ if err != nil {
+ fmt.Println(err)
+ return nil
+ }
+ return &response
+}
+
+/*
+* @summary 校验权限空间 Code 或者名称是否可用
+* @description 通过用户池 ID 和权限空间 Code,或者用户池 ID 和权限空间名称查询是否可用。
+* @param requestBody
+* @returns PermissionNamespaceCheckExistsRespDto
+ */
+func (client *ManagementClient) CheckPermissionNamespaceExists(reqDto *dto.CheckPermissionNamespaceExistsDto) *dto.PermissionNamespaceCheckExistsRespDto {
+ b, err := client.SendHttpRequest("/api/v3/check-permission-namespace-exists", fasthttp.MethodPost, reqDto)
+ var response dto.PermissionNamespaceCheckExistsRespDto
+ if err != nil {
+ fmt.Println(err)
+ return nil
+ }
+ err = json.Unmarshal(b, &response)
+ if err != nil {
+ fmt.Println(err)
+ return nil
+ }
+ return &response
+}
+
+/*
+* @summary 分页查询权限空间下所有的角色列表
+* @description 分页查询权限空间下所有的角色列表,分页获取权限空间下所有的角色列表。
+* @param code 权限分组唯一标志符 Code
+* @param page 当前页数,从 1 开始
+* @param limit 每页数目,最大不能超过 50,默认为 10
+* @param query 角色 Code 或者名称
+* @returns PermissionNamespaceRolesListPaginatedRespDto
+ */
+func (client *ManagementClient) ListPermissionNamespaceRoles(reqDto *dto.ListPermissionNamespaceRolesDto) *dto.PermissionNamespaceRolesListPaginatedRespDto {
+ b, err := client.SendHttpRequest("/api/v3/list-permission-namespace-roles", fasthttp.MethodGet, reqDto)
+ var response dto.PermissionNamespaceRolesListPaginatedRespDto
+ if err != nil {
+ fmt.Println(err)
+ return nil
+ }
+ err = json.Unmarshal(b, &response)
+ if err != nil {
+ fmt.Println(err)
+ return nil
+ }
+ return &response
+}
+
+/*
+ * @summary 创建数据资源(推荐、重点)
+ * @description
+ * ## 描述
+ * 该接口用于创建数据资源,当你存在需要被设置权限的数据,根据它们的数据类型,创建对应类型的数据资源,目前我们支持:字符串、数组、树三种类型。
+ * ## 注意
+ * 请求体中的 `struct` 字段需要根据不同的资源类型传入不同的数据结构,具体请参考下面的示例
+ * ## 请求示例
+ * ### 创建字符串类型数据资源示例
+ * 当你的数据仅用一个字符串就可以表示时,可以使用此类型,例如:一个 API、一个用户 ID 等。
+ * 以下是创建一个表示 '/resource/create' API 的数据资源示例:
+ * ```json
+ * {
+ * "namespaceCode": "examplePermissionNamespace",
+ * "resourceName": "createResource API",
+ * "description": "这是 createResource API",
+ * "resourceCode": "createResourceAPI",
+ * "type": "STRING",
+ * "struct": "/resource/create",
+ * "actions": ["access"]
+ * }
+ * ```
+ *
+ * ### 创建数组类型数据资源示例
+ * 当你的数据是一组同类型的数据时,可以使用此类型,例如:一组文档链接、一组门禁卡号等。
+ * 以下是创建一个表示一组门禁卡号的数据资源示例:
+ * ```json
+ * {
+ * "namespaceCode": "examplePermissionNamespace",
+ * "resourceName": "一组门禁卡号",
+ * "description": "这是一组门禁卡号",
+ * "resourceCode": "accessCardNumber",
+ * "type": "ARRAY",
+ * "struct": ["accessCardNumber1", "accessCardNumber2", "accessCardNumber3"],
+ * "actions": ["get", "update"]
+ * }
+ * ```
+ *
+ * ### 创建树类型数据资源示例
+ * 当你的数据是具备层级关系时,可以使用此类型,例如:组织架构、文件夹结构等。
+ * 以下是创建一个表示公司组织架构的数据资源示例:
+ * ```json
+ * {
+ * "namespaceCode": "examplePermissionNamespace",
+ * "resourceName": "Authing",
+ * "description": "这是 Authing 的组织架构",
+ * "resourceCode": "authing",
+ * "type": "TREE",
+ * "struct": [
+ * {
+ * "name": "产品",
+ * "code": "product",
+ * "value": "product",
+ * "children": [
+ * {
+ * "name": "产品经理",
+ * "code": "productManager",
+ * "value": "pm"
+ * },
+ * {
+ * "name": "设计",
+ * "code": "design",
+ * "value": "ui"
+ * }
+ * ]
+ * },
+ * {
+ * "name": "研发",
+ * "code": "researchAndDevelopment",
+ * "value": "rd"
+ * }
+ * ],
+ * "actions": ["get", "update", "delete"]
+ * }
+ * ```
+ *
+ * @param requestBody
+ * @returns CreateDataResourceResponseDto
+*/
+func (client *ManagementClient) CreateDataResource(reqDto *dto.CreateDataResourceDto) *dto.CreateDataResourceResponseDto {
+ b, err := client.SendHttpRequest("/api/v3/create-data-resource", fasthttp.MethodPost, reqDto)
+ var response dto.CreateDataResourceResponseDto
+ if err != nil {
+ fmt.Println(err)
+ return nil
+ }
+ err = json.Unmarshal(b, &response)
+ if err != nil {
+ fmt.Println(err)
+ return nil
+ }
+ return &response
+}
+
+/*
+* @summary 创建字符串数据资源
+* @description 当你仅需要创建字符串类型数据资源时,可以使用此 API,我们固定了数据资源类型,你无需在传入 `type` 字符段,注意:`struct` 字段只能够传入字符串类型数据。
+* @param requestBody
+* @returns CreateStringDataResourceResponseDto
+ */
+func (client *ManagementClient) CreateDataResourceByString(reqDto *dto.CreateStringDataResourceDto) *dto.CreateStringDataResourceResponseDto {
+ b, err := client.SendHttpRequest("/api/v3/create-string-data-resource", fasthttp.MethodPost, reqDto)
+ var response dto.CreateStringDataResourceResponseDto
+ if err != nil {
+ fmt.Println(err)
+ return nil
+ }
+ err = json.Unmarshal(b, &response)
+ if err != nil {
+ fmt.Println(err)
+ return nil
+ }
+ return &response
+}
+
+/*
+* @summary 创建数组数据资源
+* @description 当你仅需要创建数组类型数据资源时,可以使用此 API,我们固定了数据资源类型,你无需在传入 `type` 字符段,注意:`struct` 字段只能够传入数组类型数据。
+* @param requestBody
+* @returns CreateArrayDataResourceResponseDto
+ */
+func (client *ManagementClient) CreateDataResourceByArray(reqDto *dto.CreateArrayDataResourceDto) *dto.CreateArrayDataResourceResponseDto {
+ b, err := client.SendHttpRequest("/api/v3/create-array-data-resource", fasthttp.MethodPost, reqDto)
+ var response dto.CreateArrayDataResourceResponseDto
+ if err != nil {
+ fmt.Println(err)
+ return nil
+ }
+ err = json.Unmarshal(b, &response)
+ if err != nil {
+ fmt.Println(err)
+ return nil
+ }
+ return &response
+}
+
+/*
+* @summary 创建树数据资源
+* @description 当你仅需要创建树类型数据资源时,可以使用此 API,我们固定了数据资源类型,你无需在传入 `type` 字符段,注意:`struct` 要按照树类型数据资源结构进行传入,请参考示例。
+* @param requestBody
+* @returns CreateTreeDataResourceResponseDto
+ */
+func (client *ManagementClient) CreateDataResourceByTree(reqDto *dto.CreateTreeDataResourceDto) *dto.CreateTreeDataResourceResponseDto {
+ b, err := client.SendHttpRequest("/api/v3/create-tree-data-resource", fasthttp.MethodPost, reqDto)
+ var response dto.CreateTreeDataResourceResponseDto
+ if err != nil {
+ fmt.Println(err)
+ return nil
+ }
+ err = json.Unmarshal(b, &response)
+ if err != nil {
+ fmt.Println(err)
+ return nil
+ }
+ return &response
+}
+
+/*
+* @summary 获取数据资源列表
+* @description 获取数据资源列表,可通过数据资源名称、数据资源 Code 和数据资源所属权限空间 Code 列表进行指定筛选。
+* @param page 当前页数,从 1 开始
+* @param limit 每页数目,最大不能超过 50,默认为 10
+* @param query 关键字搜索,可以是数据资源名称或者数据资源 Code
+* @param namespaceCodes 权限数据所属权限空间 Code 列表
+* @returns ListDataResourcesPaginatedRespDto
+ */
+func (client *ManagementClient) ListDataResources(reqDto *dto.ListDataResourcesDto) *dto.ListDataResourcesPaginatedRespDto {
+ b, err := client.SendHttpRequest("/api/v3/list-data-resources", fasthttp.MethodGet, reqDto)
+ var response dto.ListDataResourcesPaginatedRespDto
+ if err != nil {
+ fmt.Println(err)
+ return nil
+ }
+ err = json.Unmarshal(b, &response)
+ if err != nil {
+ fmt.Println(err)
+ return nil
+ }
+ return &response
+}
+
+/*
+* @summary 获取数据资源信息
+* @description 获取数据资源,通过数据资源 ID 查询对应的数据资源信息,包含数据资源名称、数据资源 Code、数据资源类型(TREE、STRING、ARRAY)、数据资源所属权限空间 ID、数据资源所属权限空间 Code 以及数据资源操作列表等基本信息。
+* @param namespaceCode 数据资源所属的权限空间 Code
+* @param resourceCode 数据资源 Code, 权限空间内唯一
+* @returns GetDataResourceResponseDto
+ */
+func (client *ManagementClient) GetDataResource(reqDto *dto.GetDataResourceDto) *dto.GetDataResourceResponseDto {
+ b, err := client.SendHttpRequest("/api/v3/get-data-resource", fasthttp.MethodGet, reqDto)
+ var response dto.GetDataResourceResponseDto
+ if err != nil {
+ fmt.Println(err)
+ return nil
+ }
+ err = json.Unmarshal(b, &response)
+ if err != nil {
+ fmt.Println(err)
+ return nil
+ }
+ return &response
+}
+
+/*
+* @summary 修改数据资源
+* @description 修改数据资源,根据权限空间 Code 和数据资源 Code 查询原始信息,只允许修改数据资源名称、描述和数据资源节点。
+* @param requestBody
+* @returns UpdateDataResourceResponseDto
+ */
+func (client *ManagementClient) UpdateDataResource(reqDto *dto.UpdateDataResourceDto) *dto.UpdateDataResourceResponseDto {
+ b, err := client.SendHttpRequest("/api/v3/update-data-resource", fasthttp.MethodPost, reqDto)
+ var response dto.UpdateDataResourceResponseDto
+ if err != nil {
+ fmt.Println(err)
+ return nil
+ }
+ err = json.Unmarshal(b, &response)
+ if err != nil {
+ fmt.Println(err)
+ return nil
+ }
+ return &response
+}
+
+/*
+* @summary 删除数据资源
+* @description 删除数据资源,根据数据资源 ID 删除对应的数据资源信息。
+* @param requestBody
+* @returns CommonResponseDto
+ */
+func (client *ManagementClient) DeleteDataResource(reqDto *dto.DeleteDataResourceDto) *dto.CommonResponseDto {
+ b, err := client.SendHttpRequest("/api/v3/delete-data-resource", fasthttp.MethodPost, reqDto)
+ var response dto.CommonResponseDto
+ if err != nil {
+ fmt.Println(err)
+ return nil
+ }
+ err = json.Unmarshal(b, &response)
+ if err != nil {
+ fmt.Println(err)
+ return nil
+ }
+ return &response
+}
+
+/*
+ * @summary 检查数据资源名称或者 Code 是否可用
+ * @description 检查数据资源名称或者 Code 在权限空间内是否有效,通过数据资源名称或者数据资源 Code 以及所属权限空间 Code,判断在指定的权限空间内是否可用。
+ *
+ * ### 数据资源 Code 有效示例
+ *
+ * - 入参
+ *
+ * ```json
+ * {
+ * "namespaceCode": "examplePermissionNamespace",
+ * "resourceCode": "test"
+ * }
+ * ```
+ *
+ * - 出参
+ *
+ * ```json
+ * {
+ * "statusCode": 200,
+ * "message": "操作成功",
+ * "apiCode": 0,
+ * "data": {
+ * "isValid": "true"
+ * }
+ * }
+ * ```
+ *
+ * ### 数据资源名称有效示例
+ *
+ * - 入参
+ *
+ * ```json
+ * {
+ * "namespaceCode": "examplePermissionNamespace",
+ * "resourceName": "test"
+ * }
+ * ```
+ *
+ * - 出参
+ *
+ * ```json
+ * {
+ * "statusCode": 200,
+ * "message": "操作成功",
+ * "apiCode": 0,
+ * "data": {
+ * "isValid": "true"
+ * }
+ * }
+ * ```
+ *
+ * ### 数据资源 Code 无效示例
+ *
+ * - 入参
+ *
+ * ```json
+ * {
+ * "namespaceCode": "examplePermissionNamespace",
+ * "resourceCode": "test"
+ * }
+ * ```
+ *
+ * - 出参
+ *
+ * ```json
+ * {
+ * "statusCode": 200,
+ * "message": "操作成功",
+ * "apiCode": 0,
+ * "requestId": "934108e5-9fbf-4d24-8da1-c330328abd6c",
+ * "data": {
+ * "isValid": "false",
+ * "message": "data resource code already exist"
+ * }
+ * }
+ * ```
+ *
+ * @param namespaceCode 数据资源所属的权限空间 Code
+ * @param resourceName 数据资源名称, 权限空间内唯一
+ * @param resourceCode 数据资源 Code, 权限空间内唯一
+ * @returns CheckParamsDataResourceResponseDto
+*/
+func (client *ManagementClient) CheckDataResourceExists(reqDto *dto.CheckDataResourceExistsDto) *dto.CheckParamsDataResourceResponseDto {
+ b, err := client.SendHttpRequest("/api/v3/check-data-resource-exists", fasthttp.MethodGet, reqDto)
+ var response dto.CheckParamsDataResourceResponseDto
+ if err != nil {
+ fmt.Println(err)
+ return nil
+ }
+ err = json.Unmarshal(b, &response)
+ if err != nil {
+ fmt.Println(err)
+ return nil
+ }
+ return &response
+}
+
+/*
+ * @summary 创建数据策略(重点)
+ * @description
+ * ## 描述
+ * 该接口用于创建数据策略,通过数据策略你可以将一组数据资源及其指定的操作进行绑定到一起,共同授权给主体。
+ * ## 注意
+ * 为了方便使用,`permissions` 字段我们基于路径的方式提供了快捷的写法,如:
+ * - 数组、字符串资源:权限空间 code/数据资源 code/数据资源某一 action(如果表示所有操作,则使用`*`替代action)
+ * - 树类型资源:权限空间 code/数据资源 code/node code 1/node code 1_1/.../数据资源某一 action
+ *
+ * ## 请求示例
+ * 假设我们要对一名研发人员进行授权,首先创建 3 个数据资源如下:
+ * ```json
+ * {
+ * "namespaceCode": "examplePermissionNamespace",
+ * "resourceName": "服务器",
+ * "resourceCode": "server_2023",
+ * "type": "STRING",
+ * "struct": "server_2023",
+ * "actions": ["read", "write"]
+ * }
+ * ```
+ * ```json
+ * {
+ * "namespaceCode": "examplePermissionNamespace",
+ * "resourceName": "研发知识库",
+ * "description": "",
+ * "resourceCode": "rd_document",
+ * "type": "STRING",
+ * "struct": "https://www.authing.com/rd_document",
+ * "actions": ["read", "write", "share"]
+ * }
+ * ```
+ * ```json
+ * {
+ * "namespaceCode": "examplePermissionNamespace",
+ * "resourceName": "研发内部平台菜单",
+ * "description": "这是研发使用的内部平台菜单",
+ * "resourceCode": "rd_internal_platform",
+ * "type": "TREE",
+ * "struct": [
+ * {
+ * "name": "部署",
+ * "code": "deploy",
+ * "children": [
+ * {
+ * "name": "生产环境",
+ * "code": "prod"
+ * },
+ * {
+ * "name": "测试环境",
+ * "code": "test"
+ * }
+ * ]
+ * },
+ * {
+ * "name": "数据库",
+ * "code": "db"
+ * "children": [
+ * {
+ * "name": "查询",
+ * "code": "query"
+ * },
+ * {
+ * "name": "导出",
+ * "code": "export"
+ * }
+ * ]
+ * }
+ * ],
+ * "actions": ["access", "execute"]
+ * }
+ * ```
+ * 我们分配一台服务器:server_2023 给他使用,他可以在上面进行任意操作,同时他可以阅读、编辑研发知识库,最后他可以在研发内部平台中进行部署测试环境,但是不能够导出数据库数据。
+ * ```json
+ * {
+ * "policyName": "研发人员策略",
+ * "description": "这是一个示例数据策略",
+ * "statementList": [
+ * {
+ * "effect": "ALLOW",
+ * "permissions": [
+ * "examplePermissionNamespaceCode/server_2023*",
+ * "examplePermissionNamespaceCode/rd_document/read",
+ * "examplePermissionNamespaceCode/rd_document/write",
+ * "examplePermissionNamespaceCode/rd_internal_platform/deploy/test/execute"
+ * ]
+ * },
+ * {
+ * "effect": "DENY",
+ * "permissions": [
+ * "examplePermissionNamespaceCode/rd_internal_platform/db/export/execute"
+ * ]
+ * }
+ * ]
+ * }
+ * ```
+ *
+ * @param requestBody
+ * @returns CreateDataPolicyResponseDto
+*/
+func (client *ManagementClient) CreateDataPolicy(reqDto *dto.CreateDataPolicyDto) *dto.CreateDataPolicyResponseDto {
+ b, err := client.SendHttpRequest("/api/v3/create-data-policy", fasthttp.MethodPost, reqDto)
+ var response dto.CreateDataPolicyResponseDto
+ if err != nil {
+ fmt.Println(err)
+ return nil
+ }
+ err = json.Unmarshal(b, &response)
+ if err != nil {
+ fmt.Println(err)
+ return nil
+ }
+ return &response
+}
+
+/*
+* @summary 获取数据策略列表
+* @description 分页查询数据策略列表,也可通过关键字搜索数据策略名称或者数据策略 Code 进行模糊查找。
+* @param page 当前页数,从 1 开始
+* @param limit 每页数目,最大不能超过 50,默认为 10
+* @param query 数据策略名称关键字搜索
+* @returns ListDataPoliciesPaginatedRespDto
+ */
+func (client *ManagementClient) ListDataPolices(reqDto *dto.ListDataPoliciesDto) *dto.ListDataPoliciesPaginatedRespDto {
+ b, err := client.SendHttpRequest("/api/v3/list-data-policies", fasthttp.MethodGet, reqDto)
+ var response dto.ListDataPoliciesPaginatedRespDto
+ if err != nil {
+ fmt.Println(err)
+ return nil
+ }
+ err = json.Unmarshal(b, &response)
+ if err != nil {
+ fmt.Println(err)
+ return nil
+ }
+ return &response
+}
+
+/*
+* @summary 获取数据策略简略信息列表
+* @description 分页获取数据策略简略信息列表,通过关键字搜索数据策略名称或者数据策略 Code 进行模糊查找出数据策略 ID、数据策略名称和数据策略描述信息。
+* @param page 当前页数,从 1 开始
+* @param limit 每页数目,最大不能超过 50,默认为 10
+* @param query 数据策略名称关键字搜索
+* @returns ListSimpleDataPoliciesPaginatedRespDto
+ */
+func (client *ManagementClient) ListSimpleDataPolices(reqDto *dto.ListSimpleDataPoliciesDto) *dto.ListSimpleDataPoliciesPaginatedRespDto {
+ b, err := client.SendHttpRequest("/api/v3/list-simple-data-policies", fasthttp.MethodGet, reqDto)
+ var response dto.ListSimpleDataPoliciesPaginatedRespDto
+ if err != nil {
+ fmt.Println(err)
+ return nil
+ }
+ err = json.Unmarshal(b, &response)
+ if err != nil {
+ fmt.Println(err)
+ return nil
+ }
+ return &response
+}
+
+/*
+* @summary 获取数据策略信息
+* @description 获取数据策略信息,通过数据策略 ID 获取对应数据策略信息,包含数据策略 ID、数据策略名称、数据策略描述、数据策略下所有的数据权限列表等信息。
+* @param policyId 数据策略 ID
+* @returns GetDataPolicyResponseDto
+ */
+func (client *ManagementClient) GetDataPolicy(reqDto *dto.GetDataPolicyDto) *dto.GetDataPolicyResponseDto {
+ b, err := client.SendHttpRequest("/api/v3/get-data-policy", fasthttp.MethodGet, reqDto)
+ var response dto.GetDataPolicyResponseDto
+ if err != nil {
+ fmt.Println(err)
+ return nil
+ }
+ err = json.Unmarshal(b, &response)
+ if err != nil {
+ fmt.Println(err)
+ return nil
+ }
+ return &response
+}
+
+/*
+* @summary 修改数据策略
+* @description 修改数据策略,通过数据策略名称、数据策略描述和相关的数据资源等字段修改数据策略信息。
+* @param requestBody
+* @returns UpdateDataPolicyResponseDto
+ */
+func (client *ManagementClient) UpdateDataPolicy(reqDto *dto.UpdateDataPolicyDto) *dto.UpdateDataPolicyResponseDto {
+ b, err := client.SendHttpRequest("/api/v3/update-data-policy", fasthttp.MethodPost, reqDto)
+ var response dto.UpdateDataPolicyResponseDto
+ if err != nil {
+ fmt.Println(err)
+ return nil
+ }
+ err = json.Unmarshal(b, &response)
+ if err != nil {
+ fmt.Println(err)
+ return nil
+ }
+ return &response
+}
+
+/*
+* @summary 删除数据策略
+* @description 删除数据策略,通过数据策略 ID 删除对应的策略,同时也删除数据策略和对应的数据资源等关系数据。
+* @param requestBody
+* @returns CommonResponseDto
+ */
+func (client *ManagementClient) DeleteDataPolicy(reqDto *dto.DeleteDataPolicyDto) *dto.CommonResponseDto {
+ b, err := client.SendHttpRequest("/api/v3/delete-data-policy", fasthttp.MethodPost, reqDto)
+ var response dto.CommonResponseDto
+ if err != nil {
+ fmt.Println(err)
+ return nil
+ }
+ err = json.Unmarshal(b, &response)
+ if err != nil {
+ fmt.Println(err)
+ return nil
+ }
+ return &response
+}
+
+/*
+* @summary 校验数据策略名称是否有效
+* @description 通过数据策略名称查询用户池内是否有效。
+* @param policyName 数据策略名称,用户池唯一
+* @returns CheckParamsDataPolicyResponseDto
+ */
+func (client *ManagementClient) CheckDataPolicyExists(reqDto *dto.CheckDataPolicyExistsDto) *dto.CheckParamsDataPolicyResponseDto {
+ b, err := client.SendHttpRequest("/api/v3/check-data-policy-exists", fasthttp.MethodGet, reqDto)
+ var response dto.CheckParamsDataPolicyResponseDto
+ if err != nil {
+ fmt.Println(err)
+ return nil
+ }
+ err = json.Unmarshal(b, &response)
+ if err != nil {
+ fmt.Println(err)
+ return nil
+ }
+ return &response
+}
+
+/*
+* @summary 获取数据策略下所有的授权主体的信息
+* @description 获取数据策略下所有的授权主体的信息,通过授权主体类型、数据策略 ID 和数据资源 ID 查找授权主体列表。
+* @param policyId 数据策略 ID
+* @param page 当前页数,从 1 开始
+* @param limit 每页数目,最大不能超过 50,默认为 10
+* @param query 主体名称
+* @param targetType 主体类型,包括 USER、GROUP、ROLE、ORG 四种类型
+* @returns ListDataPolicySubjectPaginatedRespDto
+ */
+func (client *ManagementClient) ListDataPolicyTargets(reqDto *dto.ListDataPolicyTargetsDto) *dto.ListDataPolicySubjectPaginatedRespDto {
+ b, err := client.SendHttpRequest("/api/v3/list-data-policy-targets", fasthttp.MethodGet, reqDto)
+ var response dto.ListDataPolicySubjectPaginatedRespDto
+ if err != nil {
+ fmt.Println(err)
+ return nil
+ }
+ err = json.Unmarshal(b, &response)
+ if err != nil {
+ fmt.Println(err)
+ return nil
+ }
+ return &response
+}
+
+/*
+* @summary 授权数据策略
+* @description 数据策略创建主体授权,通过授权主体和数据策略进行相互授权。
+* @param requestBody
+* @returns CommonResponseDto
+ */
+func (client *ManagementClient) AuthorizeDataPolicies(reqDto *dto.CreateAuthorizeDataPolicyDto) *dto.CommonResponseDto {
+ b, err := client.SendHttpRequest("/api/v3/authorize-data-policies", fasthttp.MethodPost, reqDto)
+ var response dto.CommonResponseDto
+ if err != nil {
+ fmt.Println(err)
+ return nil
+ }
+ err = json.Unmarshal(b, &response)
+ if err != nil {
+ fmt.Println(err)
+ return nil
+ }
+ return &response
+}
+
+/*
+* @summary 撤销数据策略
+* @description 删除数据策略相关的主体授权,通过授权主体 ID、授权主体类型和数据策略 ID 进行删除。
+* @param requestBody
+* @returns CommonResponseDto
+ */
+func (client *ManagementClient) RevokeDataPolicy(reqDto *dto.DeleteAuthorizeDataPolicyDto) *dto.CommonResponseDto {
+ b, err := client.SendHttpRequest("/api/v3/revoke-data-policy", fasthttp.MethodPost, reqDto)
+ var response dto.CommonResponseDto
+ if err != nil {
+ fmt.Println(err)
+ return nil
+ }
+ err = json.Unmarshal(b, &response)
+ if err != nil {
+ fmt.Println(err)
+ return nil
+ }
+ return &response
+}
+
+/*
+ * @summary 获取用户权限列表
+ * @description
+ * ## 描述
+ * 该接口用于查询某些用户在某些权限空间的数据资源的权限数据。
+ * 我们的鉴权接口针对不同的鉴权场景有多种,区别在于在所处的场景下能够传递的参数列表以及不同形式的出参,**当你需要查询某些用户的所有权限时**可以使用此接口,
+ * ## 注意
+ * 接口提供了两个数组类型的入参`userIds`和`namespaceCodes`来支持批量查询(注意:namespaceCodes 是可选的)。
+ * ## 场景举例
+ * 假如你的业务场景是用户登录后能看到他所有可以访问或者进行其他操作的文档、人员信息、设备信息等资源,那么你可以在用户登录后调用此接口查询用户的所有权限。
+ * ## 请求示例
+ * ### 查询单个用户权限列表示例
+ * 注意:在此接口的返回参数中,树类型的数据资源权限返回是按照**路径**的方式返回的
+ * - 入参
+ *
+ * ```json
+ * {
+ * "userIds": [
+ * "6301ceaxxxxxxxxxxx27478"
+ * ]
+ * }
+ * ```
+ *
+ * - 出参
+ *
+ * ```json
+ * {
+ * "statusCode": 200,
+ * "message": "操作成功",
+ * "apiCode": 20001,
+ * "data": {
+ * "userPermissionList": [
+ * {
+ * "userId": "6301ceaxxxxxxxxxxx27478",
+ * "namespaceCode": "examplePermissionNamespace",
+ * "resourceList": [
+ * {
+ * "resourceCode": "strCode",
+ * "resourceType": "STRING",
+ * "strAuthorize": {
+ * "value": "示例字符串资源",
+ * "actions": [
+ * "read",
+ * "post",
+ * "get",
+ * "write"
+ * ]
+ * }
+ * },
+ * {
+ * "resourceCode": "arrayCode",
+ * "resourceType": "ARRAY",
+ * "arrAuthorize": {
+ * "values": [
+ * "示例数据资源1",
+ * "示例数据资源2"
+ * ],
+ * "actions": [
+ * "read",
+ * "post",
+ * "get",
+ * "write"
+ * ]
+ * }
+ * },
+ * {
+ * "resourceCode": "treeCode",
+ * "resourceType": "TREE",
+ * "treeAuthorize": {
+ * "authList": [
+ * {
+ * "nodePath": "/treeChildrenCode/treeChildrenCode1",
+ * "nodeActions": [
+ * "read",
+ * "get"
+ * ],
+ * "nodeName": "treeChildrenName1",
+ * "nodeValue": "treeChildrenValue1"
+ * },
+ * {
+ * "nodePath": "/treeChildrenCode/treeChildrenCode2",
+ * "nodeActions": [
+ * "read",
+ * "get"
+ * ],
+ * "nodeName": "treeChildrenName2",
+ * "nodeValue": "treeChildrenValue2"
+ * },
+ * {
+ * "nodePath": "/treeChildrenCode/treeChildrenCode3",
+ * "nodeActions": [
+ * "read"
+ * ],
+ * "nodeName": "treeChildrenName3",
+ * "nodeValue": "treeChildrenValue3"
+ * }
+ * ]
+ * }
+ * }
+ * ]
+ * }
+ * ]
+ * }
+ * }
+ * ```
+ *
+ * ### 查询多个用户权限列表示例
+ *
+ * - 入参
+ *
+ * ```json
+ * {
+ * "userIds": [
+ * "6301ceaxxxxxxxxxxx27478",
+ * "6121ceaxxxxxxxxxxx27312"
+ * ]
+ * }
+ * ```
+ *
+ * - 出参
+ *
+ * ```json
+ * {
+ * "statusCode": 200,
+ * "message": "操作成功",
+ * "apiCode": 20001,
+ * "data": {
+ * "userPermissionList": [
+ * {
+ * "userId": "6301ceaxxxxxxxxxxx27478",
+ * "namespaceCode": "examplePermissionNamespace1",
+ * "resourceList": [
+ * {
+ * "resourceCode": "strCode",
+ * "resourceType": "STRING",
+ * "strAuthorize": {
+ * "value": "示例字符串资源",
+ * "actions": [
+ * "read",
+ * "post",
+ * "get",
+ * "write"
+ * ]
+ * }
+ * }
+ * ]
+ * },
+ * {
+ * "userId": "6121ceaxxxxxxxxxxx27312",
+ * "namespaceCode": "examplePermissionNamespace2",
+ * "resourceList": [
+ * {
+ * "resourceCode": "arrayCode",
+ * "resourceType": "ARRAY",
+ * "arrAuthorize": {
+ * "values": [
+ * "示例数组资源1",
+ * "示例数组资源2"
+ * ],
+ * "actions": [
+ * "read",
+ * "post",
+ * "get",
+ * "write"
+ * ]
+ * }
+ * }
+ * ]
+ * }
+ * ]
+ * }
+ * }
+ * ```
+ *
+ * ### 查询多个用户在多个权限空间下权限列表示例
+ *
+ * - 入参
+ *
+ * ```json
+ * {
+ * "userIds": [
+ * "6301ceaxxxxxxxxxxx27478",
+ * "6121ceaxxxxxxxxxxx27312"
+ * ],
+ * "namespaceCodes": [
+ * "examplePermissionNamespace1",
+ * "examplePermissionNamespace2"
+ * ]
+ * }
+ * ```
+ *
+ * - 出参
+ *
+ * ```json
+ * {
+ * "statusCode": 200,
+ * "message": "操作成功",
+ * "apiCode": 20001,
+ * "data": {
+ * "userPermissionList": [
+ * {
+ * "userId": "6301ceaxxxxxxxxxxx27478",
+ * "namespaceCode": "examplePermissionNamespace1",
+ * "resourceList": [
+ * {
+ * "resourceCode": "strCode1",
+ * "resourceType": "STRING",
+ * "strAuthorize": {
+ * "value": "示例字符串资源",
+ * "actions": [
+ * "read",
+ * "post",
+ * "get",
+ * "write"
+ * ]
+ * }
+ * }
+ * ]
+ * },
+ * {
+ * "userId": "6121ceaxxxxxxxxxxx27312",
+ * "namespaceCode": "examplePermissionNamespace2",
+ * "resourceList": [
+ * {
+ * "resourceCode": "arrayCode",
+ * "resourceType": "ARRAY",
+ * "arrAuthorize": {
+ * "values": [
+ * "示例数组资源1",
+ * "示例数组资源2"
+ * ],
+ * "actions": [
+ * "read",
+ * "post",
+ * "get",
+ * "write"
+ * ]
+ * }
+ * }
+ * ]
+ * }
+ * ]
+ * }
+ * }
+ * ```
+ *
+ * @param requestBody
+ * @returns GetUserPermissionListRespDto
+*/
+func (client *ManagementClient) GetUserPermissionList(reqDto *dto.GetUserPermissionListDto) *dto.GetUserPermissionListRespDto {
+ b, err := client.SendHttpRequest("/api/v3/get-user-permission-list", fasthttp.MethodPost, reqDto)
+ var response dto.GetUserPermissionListRespDto
+ if err != nil {
+ fmt.Println(err)
+ return nil
+ }
+ err = json.Unmarshal(b, &response)
+ if err != nil {
+ fmt.Println(err)
+ return nil
+ }
+ return &response
+}
+
+/*
+ * @summary 判断用户权限(重点)
+ * @description
+ * ## 描述
+ * 当你需要判断用户是否拥有某些资源的指定权限时可以使用此接口
+ * ## 注意
+ * - 该接口通过传递资源 code 定位对应的数据资源(如果是树类型,则需要传递节点的完整 code 路径)。
+ * - 如果你在配置数据策略时配置了**环境属性**的条件判断,那么需要设置参数`judgeConditionEnabled`为`true`(默认为 false),并且通过参数`authEnvParams`传递请求时所处的环境信息(如 IP、设备类型、系统类型等),否则条件判断会不生效,导致数据策略不生效。
+ *
+ * ## 场景举例
+ * 用户在删除某条数据时,需要判断他是否拥有此资源的删除权限,则可以使用此接口。
+ *
+ * ## 请求示例
+ * ### 判断用户对字符串和数组资源权限示例(无条件判断)
+ *
+ * - 入参
+ *
+ * ```json
+ * {
+ * "namespaceCode": "examplePermissionNamespace",
+ * "userId": "63721xxxxxxxxxxxxdde14a3",
+ * "action": "get",
+ * "resources":["strResourceCode1", "arrayResourceCode1"]
+ * }
+ * ```
+ *
+ * - 出参
+ *
+ * ```json
+ * {
+ * "statusCode": 200,
+ * "message": "操作成功",
+ * "apiCode": 20001,
+ * "data": {
+ * "checkResultList": [
+ * {
+ * "namespaceCode": "examplePermissionNamespace",
+ * "resource": "strResourceCode1",
+ * "action": "get",
+ * "enabled": true
+ * },
+ * {
+ * "namespaceCode": "examplePermissionNamespace",
+ * "resource": "arrayResourceCode1",
+ * "action": "get",
+ * "enabled": true
+ * }
+ * ]
+ * }
+ * }
+ * ```
+ *
+ * ### 判断用户对字符串和数组资源权限示例(开启条件判断)
+ *
+ * - 入参
+ *
+ * ```json
+ * {
+ * "namespaceCode": "examplePermissionNamespace",
+ * "userId": "63721xxxxxxxxxxxxdde14a3",
+ * "action": "get",
+ * "resources": ["strResourceCode1", "arrayResourceCode1"],
+ * "judgeConditionEnabled": true,
+ * "authEnvParams":{
+ * "ip":"110.96.0.0",
+ * "city":"北京",
+ * "province":"北京",
+ * "country":"中国",
+ * "deviceType":"PC",
+ * "systemType":"ios",
+ * "browserType":"IE",
+ * "requestDate":"2022-12-26 17:40:00"
+ * }
+ * }
+ * ```
+ *
+ * - 出参
+ *
+ * ```json
+ * {
+ * "statusCode": 200,
+ * "message": "操作成功",
+ * "apiCode": 20001,
+ * "data": {
+ * "checkResultList": [
+ * {
+ * "namespaceCode": "examplePermissionNamespace",
+ * "resource": "strResourceCode1",
+ * "action": "get",
+ * "enabled": false
+ * },
+ * {
+ * "namespaceCode": "examplePermissionNamespace",
+ * "resource": "arrayResourceCode1",
+ * "action": "get",
+ * "enabled": false
+ * }
+ * ]
+ * }
+ * }
+ * ```
+ *
+ * ### 判断用户对树资源权限示例
+ *
+ * - 入参
+ *
+ * ```json
+ * {
+ * "namespaceCode": "examplePermissionNamespace",
+ * "userId": "63721xxxxxxxxxxxxdde14a3",
+ * "action": "get",
+ * "resources":["treeResourceCode1/StructCode1/resourceStructChildrenCode1", "treeResourceCode2/StructCode1/resourceStructChildrenCode1"]
+ * }
+ * ```
+ *
+ * - 出参
+ *
+ * ```json
+ * {
+ * "statusCode": 200,
+ * "message": "操作成功",
+ * "apiCode": 20001,
+ * "data":{
+ * "checkResultList": [{
+ * "namespaceCode": "examplePermissionNamespace",
+ * "action": "get",
+ * "resource": "treeResourceCode1/StructCode1/resourceStructChildrenCode1",
+ * "enabled": true
+ * },{
+ * "namespaceCode": "examplePermissionNamespace",
+ * "action": "get",
+ * "resource": "treeResourceCode2/StructCode1/resourceStructChildrenCode1",
+ * "enabled": true
+ * }]
+ * }
+ * }
+ * ```
+ *
+ * @param requestBody
+ * @returns CheckPermissionRespDto
+*/
+func (client *ManagementClient) CheckPermission(reqDto *dto.CheckPermissionDto) *dto.CheckPermissionRespDto {
+ b, err := client.SendHttpRequest("/api/v3/check-permission", fasthttp.MethodPost, reqDto)
+ var response dto.CheckPermissionRespDto
+ if err != nil {
+ fmt.Println(err)
+ return nil
+ }
+ err = json.Unmarshal(b, &response)
+ if err != nil {
+ fmt.Println(err)
+ return nil
+ }
+ return &response
+}
+
+/*
+ * @summary 判断外部用户权限
+ * @description
+ * ## 描述
+ * 当你的用户是外部用户,需要判断其是否拥有某资源的某一权限时,可以使用此接口,通过`externalId`来传递用户的 ID
+ *
+ * @param requestBody
+ * @returns CheckExternalUserPermissionRespDto
+*/
+func (client *ManagementClient) CheckExternalUserPermission(reqDto *dto.CheckExternalUserPermissionDto) *dto.CheckExternalUserPermissionRespDto {
+ b, err := client.SendHttpRequest("/api/v3/check-external-user-permission", fasthttp.MethodPost, reqDto)
+ var response dto.CheckExternalUserPermissionRespDto
+ if err != nil {
+ fmt.Println(err)
+ return nil
+ }
+ err = json.Unmarshal(b, &response)
+ if err != nil {
+ fmt.Println(err)
+ return nil
+ }
+ return &response
+}
+
+/*
+ * @summary 获取用户指定资源权限列表(推荐)
+ * @description
+ * ## 描述
+ * 当你需要查询某一用户拥有指定的资源列表的权限时,可以使用此接口。
+ * ## 注意
+ * 该接口需要你传递指定的资源 code(如果是树类型资源则需要传递节点的完整 code 路径),此接口性能更佳,推荐使用。
+ * ## 请求示例
+ * ### 获取用户字符串和数组资源权限示例
+ *
+ * - 入参
+ *
+ * ```json
+ * {
+ * "namespaceCode": "examplePermissionNamespace",
+ * "userId": "63721xxxxxxxxxxxxdde14a3",
+ * "resources":["strResourceCode1", "arrayResourceCode1"]
+ * }
+ * ```
+ *
+ * - 出参
+ *
+ * ```json
+ * {
+ *
+ * "statusCode": 200,
+ * "message": "操作成功",
+ * "apiCode": 20001,
+ * "data":{
+ * "permissionList": [{
+ * "namespaceCode": "examplePermissionNamespace",
+ * "actions": ["read","get"],
+ * "resource": "strResourceCode1"
+ * },{
+ * "namespaceCode": "examplePermissionNamespace",
+ * "actions": ["read","update","delete"],
+ * "resource": "arrayResourceCode1"
+ * }]
+ * }
+ * }
+ * ```
+ *
+ * ### 获取用户树资源权限示例
+ *
+ * - 入参
+ *
+ * ```json
+ * {
+ * "namespaceCode": "examplePermissionNamespace",
+ * "userId": "63721xxxxxxxxxxxxdde14a3",
+ * "resources":["treeResourceCode1/StructCode1/resourceStructChildrenCode1", "treeResourceCode2/StructCode1/resourceStructChildrenCode1"]
+ * }
+ * ```
+ *
+ * - 出参
+ *
+ * ```json
+ * {
+ * "statusCode": 200,
+ * "message": "操作成功",
+ * "apiCode": 20001,
+ * "data":{
+ * "permissionList": [{
+ * "namespaceCode": "examplePermissionNamespace",
+ * "actions": ["read", "update", "delete"],
+ * "resource": "treeResourceCode1/StructCode1/resourceStructChildrenCode1"
+ * },{
+ * "namespaceCode": "examplePermissionNamespace",
+ * "actions": ["read", "get", "delete"],
+ * "resource": "treeResourceCode2/StructCode1/resourceStructChildrenCode1"
+ * }]
+ * }
+ * }
+ * ```
+ *
+ * @param requestBody
+ * @returns GetUserResourcePermissionListRespDto
+*/
+func (client *ManagementClient) GetUserResourcePermissionList(reqDto *dto.GetUserResourcePermissionListDto) *dto.GetUserResourcePermissionListRespDto {
+ b, err := client.SendHttpRequest("/api/v3/get-user-resource-permission-list", fasthttp.MethodPost, reqDto)
+ var response dto.GetUserResourcePermissionListRespDto
+ if err != nil {
+ fmt.Println(err)
+ return nil
+ }
+ err = json.Unmarshal(b, &response)
+ if err != nil {
+ fmt.Println(err)
+ return nil
+ }
+ return &response
+}
+
+/*
+ * @summary 获取资源被授权的用户列表
+ * @description
+ * ## 描述
+ * 当你需要获取拥有指定资源的权限的用户时,可以使用此接口。
+ * ## 场景举例
+ * 假如你的业务场景是:想看看当前文档能够编辑的用户列表,那么你可以使用此接口。
+ * ## 请求示例
+ * ### 获取字符串和数组资源被授权的用户列表示例
+ *
+ * - 入参
+ *
+ * ```json
+ * {
+ * "namespaceCode": "examplePermissionNamespace",
+ * "actions": ["get", "update", "read"],
+ * "resources":["strResourceCode1", "arrayResourceCode1"]
+ * }
+ * ```
+ *
+ * - 出参
+ *
+ * ```json
+ * {
+ * "statusCode": 200,
+ * "message": "操作成功",
+ * "apiCode": 20001,
+ * "data":{
+ * "authUserList": [{
+ * "resource": "strResourceCode1",
+ * "actionAuthList": [{
+ * "userIds": ["63721xxxxxxxxxxxxdde14a3"],
+ * "action": "get"
+ * },{
+ * "userIds": ["63721xxxxxxxxxxxxdde14a3"],
+ * "action": "update"
+ * },{
+ * "userIds": ["63721xxxxxxxxxxxxdde14a3"],
+ * "action": "read"
+ * }]
+ * },{
+ * "resource": "arrayResourceCode1",
+ * "actionAuthList": [{
+ * "userIds": ["63721xxxxxxxxxxxxdde14a3"],
+ * "action": "get"
+ * },{
+ * "userIds": ["63721xxxxxxxxxxxxdde14a3"],
+ * "action": "update"
+ * },{
+ * "userIds": ["63721xxxxxxxxxxxxdde14a3"],
+ * "action": "read"
+ * }]
+ * }]
+ * }
+ * }
+ * ```
+ *
+ * ### 获取树资源被授权的用户列表示例
+ *
+ * - 入参
+ *
+ * ```json
+ * {
+ * "namespaceCode": "examplePermissionNamespace",
+ * "actions": ["get", "update", "delete"],
+ * "resources":["treeResourceCode1/StructCode1/resourceStructChildrenCode1", "treeResourceCode2/StructCode1/resourceStructChildrenCode1"]
+ * }
+ * ```
+ *
+ * - 出参
+ *
+ * ```json
+ * {
+ * "statusCode": 200,
+ * "message": "操作成功",
+ * "apiCode": 20001,
+ * "data":{
+ * "authUserList": [{
+ * "resource": "treeResourceCode1/StructCode1/resourceStructChildrenCode1",
+ * "actionAuthList": [{
+ * "userIds": ["63721xxxxxxxxxxxxdde14a3"],
+ * "action": "get"
+ * },{
+ * "userIds": ["63721xxxxxxxxxxxxdde14a3"],
+ * "action": "update"
+ * },{
+ * "userIds": ["63721xxxxxxxxxxxxdde14a3"],
+ * "action": "delete"
+ * }]
+ * },{
+ * "resource": "treeResourceCode2/StructCode1/resourceStructChildrenCode1",
+ * "actionAuthList": [{
+ * "userIds": ["63721xxxxxxxxxxxxdde14a3"],
+ * "action": "get"
+ * },{
+ * "userIds": ["63721xxxxxxxxxxxxdde14a3"],
+ * "action": "update"
+ * },{
+ * "userIds": ["63721xxxxxxxxxxxxdde14a3"],
+ * "action": "delete"
+ * }]
+ * }]
+ * }
+ * }
+ * ```
+ *
+ * @param requestBody
+ * @returns ListResourceTargetsRespDto
+*/
+func (client *ManagementClient) ListResourceTargets(reqDto *dto.ListResourceTargetsDto) *dto.ListResourceTargetsRespDto {
+ b, err := client.SendHttpRequest("/api/v3/list-resource-targets", fasthttp.MethodPost, reqDto)
+ var response dto.ListResourceTargetsRespDto
+ if err != nil {
+ fmt.Println(err)
+ return nil
+ }
+ err = json.Unmarshal(b, &response)
+ if err != nil {
+ fmt.Println(err)
+ return nil
+ }
+ return &response
+}
+
+/*
+ * @summary 获取用户授权资源的结构列表
+ * @description
+ * ## 描述
+ * 当你需要获取用户拥有某一资源的权限并且需要这个资源的结构信息(树类型资源返回树结构,数组类型资源返回数组、字符串类型返回字符串)则可以使用此接口。
+ * ## 注意
+ * 由于其他接口对树类型资源的返回参数格式是按照路径的方式返回的,所以我们提供此此接口,按照完整的树结构形式返回。
+ * ## 请求示例
+ * ### 获取用户授权字符串数据资源示例
+ *
+ * - 入参
+ *
+ * ```json
+ * {
+ * "namespaceCode": "examplePermissionNamespace",
+ * "userId": "63721xxxxxxxxxxxxdde14a3",
+ * "resourceCode": "exampleStrResourceCode"
+ * }
+ * ```
+ *
+ * - 出参
+ *
+ * ```json
+ * {
+ * "statusCode": 200,
+ * "message": "操作成功",
+ * "apiCode": 20001,
+ * "data":{
+ * "namespaceCode": "exampleNamespaceCode",
+ * "resourceCode": "exampleStrResourceCode",
+ * "resourceType": "STRING",
+ * "strResourceAuthAction":{
+ * "value": "strTestValue",
+ * "actions": ["get","delete"]
+ * }
+ * }
+ * }
+ * ```
+ *
+ *
+ * ### 获取用户授权数据数组资源示例
+ *
+ * - 入参
+ *
+ * ```json
+ * {
+ * "namespaceCode": "examplePermissionNamespace",
+ * "userId": "63721xxxxxxxxxxxxdde14a3",
+ * "resourceCode": "exampleArrResourceCode"
+ * }
+ * ```
+ *
+ * - 出参
+ *
+ * ```json
+ * {
+ * "statusCode": 200,
+ * "message": "操作成功",
+ * "apiCode": 20001,
+ * "data":{
+ * "namespaceCode": "exampleNamespaceCode",
+ * "resourceCode": "exampleArrResourceCode",
+ * "resourceType": "ARRAY",
+ * "arrResourceAuthAction":{
+ * "values": ["arrTestValue1","arrTestValue2","arrTestValue3"],
+ * "actions": ["get","delete"]
+ * }
+ * }
+ * }
+ * ```
+ *
+ *
+ * ### 获取用户授权树数据资源示例
+ *
+ * - 入参
+ *
+ * ```json
+ * {
+ * "namespaceCode": "examplePermissionNamespace",
+ * "userId": "63721xxxxxxxxxxxxdde14a3",
+ * "resourceCode": "exampleArrResourceCode"
+ * }
+ * ```
+ *
+ * - 出参
+ *
+ * ```json
+ * {
+ * "statusCode": 200,
+ * "message": "操作成功",
+ * "apiCode": 20001,
+ * "data":{
+ * "namespaceCode": "exampleNamespaceCode",
+ * "resourceCode": "exampleArrResourceCode",
+ * "resourceType": "TREE",
+ * "treeResourceAuthAction":{
+ * "nodeAuthActionList":[{
+ * "code": "tree11",
+ * "name": "tree11",
+ * "value": "test11Value",
+ * "actions": ["get","delete"],
+ * "children": [{
+ * "code": "tree111",
+ * "name": "tree111",
+ * "value": "test111Value",
+ * "actions": ["update","read"],
+ * }]
+ * },{
+ * "code": "tree22",
+ * "name": "tree22",
+ * "value": "test22Value",
+ * "actions": ["get","delete"]
+ * }]
+ * }
+ * }
+ * }
+ * ```
+ *
+ * @param requestBody
+ * @returns GetUserResourceStructRespDto
+*/
+func (client *ManagementClient) GetUserResourceStruct(reqDto *dto.GetUserResourceStructDto) *dto.GetUserResourceStructRespDto {
+ b, err := client.SendHttpRequest("/api/v3/get-user-resource-struct", fasthttp.MethodPost, reqDto)
+ var response dto.GetUserResourceStructRespDto
+ if err != nil {
+ fmt.Println(err)
+ return nil
+ }
+ err = json.Unmarshal(b, &response)
+ if err != nil {
+ fmt.Println(err)
+ return nil
+ }
+ return &response
+}
+
+/*
+ * @summary 获取外部用户授权资源的结构列表
+ * @description
+ * ## 描述
+ * 当你需要获取外部用户(通过参数`externalId`参数传递外部用户 ID)拥有某一资源的权限并且需要这个资源的结构信息(树类型资源返回树结构,数组类型资源返回数组、字符串类型返回字符串)则可以使用此接口。
+ * ## 请求示例
+ * ### 获取用户授权字符串数据资源示例
+ *
+ * - 入参
+ *
+ * ```json
+ * {
+ * "namespaceCode": "examplePermissionNamespace",
+ * "externalId": "63721xxxxxxxxxxxxdde14a3",
+ * "resourceCode": "exampleStrResourceCode"
+ * }
+ * ```
+ *
+ * - 出参
+ *
+ * ```json
+ * {
+ * "statusCode": 200,
+ * "message": "操作成功",
+ * "apiCode": 20001,
+ * "data":{
+ * "namespaceCode": "exampleNamespaceCode",
+ * "resourceCode": "exampleStrResourceCode",
+ * "resourceType": "STRING",
+ * "strResourceAuthAction":{
+ * "value": "strTestValue",
+ * "actions": ["get","delete"]
+ * }
+ * }
+ * }
+ * ```
+ *
+ *
+ * ### 获取用户授权数据数组资源示例
+ *
+ * - 入参
+ *
+ * ```json
+ * {
+ * "namespaceCode": "examplePermissionNamespace",
+ * "externalId": "63721xxxxxxxxxxxxdde14a3",
+ * "resourceCode": "exampleArrResourceCode"
+ * }
+ * ```
+ *
+ * - 出参
+ *
+ * ```json
+ * {
+ * "statusCode": 200,
+ * "message": "操作成功",
+ * "apiCode": 20001,
+ * "data":{
+ * "namespaceCode": "exampleNamespaceCode",
+ * "resourceCode": "exampleArrResourceCode",
+ * "resourceType": "ARRAY",
+ * "arrResourceAuthAction":{
+ * "values": ["arrTestValue1","arrTestValue2","arrTestValue3"],
+ * "actions": ["get","delete"]
+ * }
+ * }
+ * }
+ * ```
+ *
+ *
+ * ### 获取用户授权树数据资源示例
+ *
+ * - 入参
+ *
+ * ```json
+ * {
+ * "namespaceCode": "examplePermissionNamespace",
+ * "externalId": "63721xxxxxxxxxxxxdde14a3",
+ * "resourceCode": "exampleArrResourceCode"
+ * }
+ * ```
+ *
+ * - 出参
+ *
+ * ```json
+ * {
+ * "statusCode": 200,
+ * "message": "操作成功",
+ * "apiCode": 20001,
+ * "data":{
+ * "namespaceCode": "exampleNamespaceCode",
+ * "resourceCode": "exampleArrResourceCode",
+ * "resourceType": "TREE",
+ * "treeResourceAuthAction":{
+ * "nodeAuthActionList":[{
+ * "code": "tree11",
+ * "name": "tree11",
+ * "value": "test11Value",
+ * "actions": ["get","delete"],
+ * "children": [{
+ * "code": "tree111",
+ * "name": "tree111",
+ * "value": "test111Value",
+ * "actions": ["update","read"],
+ * }]
+ * },{
+ * "code": "tree22",
+ * "name": "tree22",
+ * "value": "test22Value",
+ * "actions": ["get","delete"]
+ * }]
+ * }
+ * }
+ * }
+ * ```
+ *
+ * @param requestBody
+ * @returns GetExternalUserResourceStructRespDto
+*/
+func (client *ManagementClient) GetExternalUserResourceStruct(reqDto *dto.GetExternalUserResourceStructDto) *dto.GetExternalUserResourceStructRespDto {
+ b, err := client.SendHttpRequest("/api/v3/get-external-user-resource-struct", fasthttp.MethodPost, reqDto)
+ var response dto.GetExternalUserResourceStructRespDto
+ if err != nil {
+ fmt.Println(err)
+ return nil
+ }
+ err = json.Unmarshal(b, &response)
+ if err != nil {
+ fmt.Println(err)
+ return nil
+ }
+ return &response
+}
+
+/*
+ * @summary 判断用户在树资源同层级下的权限(推荐)
+ * @description
+ * ## 描述
+ * 此接口用于判断用户是否拥有某一树资源的**同层级下**部分的节点的某种权限。由于树类型资源比较常用,所以我们基于“判断用户是否拥有资源权限”的业务场景,新增了针对判断树这种类型资源节点权限的接口。
+ * ## 注意
+ * 我们通过`resource`参数定位到树类型数据资源的某一层级(所以该参数是按照`资源 code/节点 code 路径`格式进行传递的),并通过`resourceNodeCodes`参数定位到是当前曾经的哪些节点。
+ * ## 场景举例
+ * 假如你的业务场景是:当在一个文件系统中,用户在删除某一文件夹下某些文件,需要判断他是否拥有这些文件的删除权限,则可以使用此接口。
+ * ## 请求示例
+ * ### 判断用户在树资源同层级权限示例(无条件判断)
+ *
+ * ```json
+ * {
+ * "namespaceCode": "examplePermissionNamespace",
+ * "userId": "63721xxxxxxxxxxxxdde14a3",
+ * "action": "read",
+ * "resource": "treeResourceCode/structCode",
+ * "resourceNodeCodes": ["resourceStructChildrenCode1","resourceStructChildrenCode2","resourceStructChildrenCode3"]
+ * }
+ * ```
+ *
+ * ### 判断用户在树资源同层级权限示例(开启条件判断)
+ *
+ * ```json
+ * {
+ * "namespaceCode": "examplePermissionNamespace",
+ * "userId": "63721xxxxxxxxxxxxdde14a3",
+ * "action": "read",
+ * "resource": "treeResourceCode/structCode",
+ * "resourceNodeCodes": ["resourceStructChildrenCode1","resourceStructChildrenCode2","resourceStructChildrenCode3"],
+ * "judgeConditionEnabled": true,
+ * "authEnvParams":{
+ * "ip":"110.96.0.0",
+ * "city":"北京",
+ * "province":"北京",
+ * "country":"中国",
+ * "deviceType":"PC",
+ * "systemType":"ios",
+ * "browserType":"IE",
+ * "requestDate":"2022-12-26 17:40:00"
+ * }
+ * }
+ * ```
+ *
+ * @param requestBody
+ * @returns CheckUserSameLevelPermissionResponseDto
+*/
+func (client *ManagementClient) CheckUserSameLevelPermission(reqDto *dto.CheckUserSameLevelPermissionDto) *dto.CheckUserSameLevelPermissionResponseDto {
+ b, err := client.SendHttpRequest("/api/v3/check-user-same-level-permission", fasthttp.MethodPost, reqDto)
+ var response dto.CheckUserSameLevelPermissionResponseDto
+ if err != nil {
+ fmt.Println(err)
+ return nil
+ }
+ err = json.Unmarshal(b, &response)
+ if err != nil {
+ fmt.Println(err)
+ return nil
+ }
+ return &response
+}
+
+/*
+ * @summary 获取权限视图数据列表
+ * @description
+ * ## 描述
+ * 此接口用于导出菜单:权限管理 -> 数据权限 -> 权限试图列表数据,如果你需要拉取我们数据权限的授权数据(所有用户拥有的所有资源的所有权限),则可以使用此接口。
+ *
+ * @param requestBody
+ * @returns ListPermissionViewResponseDto
+*/
+func (client *ManagementClient) ListPermissionView(reqDto *dto.ListPermissionViewDto) *dto.ListPermissionViewResponseDto {
+ b, err := client.SendHttpRequest("/api/v3/list-permission-view/data", fasthttp.MethodPost, reqDto)
+ var response dto.ListPermissionViewResponseDto
if err != nil {
fmt.Println(err)
return nil
@@ -4748,41 +9692,13 @@ func (client *ManagementClient) CheckDataResourceExists(reqDto *dto.CheckDataRes
}
/*
- * @summary 创建数据策略
- * @description
- * 创建数据策略,通过数据策略名称、数据策略描述以及资源节点列表进行创建,数据策略支持跨多个权限空间进行数据资源创建,并且支持创建时设置数据资源是否具有操作权限。
- *
- * ```json
- * {
- * "policyName": "示例数据策略",
- * "description": "这是一个示例数据策略",
- * "statementList": [
- * {
- * "effect": "ALLOW",
- * "permissions": [
- * "examplePermissionNamespaceCode/strResourceCode/exampleAction",
- * "examplePermissionNamespaceCode/arrResourceCode/exampleAction",
- * "examplePermissionNamespaceCode/treeResourceCode/strutCode1/exampleAction"
- * ]
- * },
- * {
- * "effect": "DENY",
- * "permissions": [
- * "examplePermissionNamespaceCode/strResourceCode1/exampleAction",
- * "examplePermissionNamespaceCode/arrResourceCode1/exampleAction",
- * "examplePermissionNamespaceCode/treeResourceCode1/strutCode1/exampleAction"
- * ]
- * }
- * ]
- * }
- * ```
- *
- * @param requestBody
- * @returns CreateDataPolicyResponseDto
-*/
-func (client *ManagementClient) CreateDataPolicy(reqDto *dto.CreateDataPolicyDto) *dto.CreateDataPolicyResponseDto {
- b, err := client.SendHttpRequest("/api/v3/create-data-policy", fasthttp.MethodPost, reqDto)
- var response dto.CreateDataPolicyResponseDto
+* @summary 获取套餐详情
+* @description 获取当前用户池套餐详情。
+* @returns CostGetCurrentPackageRespDto
+ */
+func (client *ManagementClient) GetCurrentPackageInfo() *dto.CostGetCurrentPackageRespDto {
+ b, err := client.SendHttpRequest("/api/v3/get-current-package-info", fasthttp.MethodGet, nil)
+ var response dto.CostGetCurrentPackageRespDto
if err != nil {
fmt.Println(err)
return nil
@@ -4796,16 +9712,13 @@ func (client *ManagementClient) CreateDataPolicy(reqDto *dto.CreateDataPolicyDto
}
/*
- * @summary 获取数据策略列表
- * @description 分页查询数据策略列表,也可通过关键字搜索数据策略名称或者数据策略 Code 进行模糊查找。
- * @param page 当前页数,从 1 开始
- * @param limit 每页数目,最大不能超过 50,默认为 10
- * @param query 数据策略名称关键字搜索
- * @returns ListDataPoliciesPaginatedRespDto
+* @summary 获取用量详情
+* @description 获取当前用户池用量详情。
+* @returns CostGetCurrentUsageRespDto
*/
-func (client *ManagementClient) ListDataPolices(reqDto *dto.ListDataPoliciesDto) *dto.ListDataPoliciesPaginatedRespDto {
- b, err := client.SendHttpRequest("/api/v3/list-data-policies", fasthttp.MethodGet, reqDto)
- var response dto.ListDataPoliciesPaginatedRespDto
+func (client *ManagementClient) GetUsageInfo() *dto.CostGetCurrentUsageRespDto {
+ b, err := client.SendHttpRequest("/api/v3/get-usage-info", fasthttp.MethodGet, nil)
+ var response dto.CostGetCurrentUsageRespDto
if err != nil {
fmt.Println(err)
return nil
@@ -4819,16 +9732,15 @@ func (client *ManagementClient) ListDataPolices(reqDto *dto.ListDataPoliciesDto)
}
/*
- * @summary 获取数据策略简略信息列表
- * @description 分页获取数据策略简略信息列表,通过关键字搜索数据策略名称或者数据策略 Code 进行模糊查找出数据策略 ID、数据策略名称和数据策略描述信息。
- * @param page 当前页数,从 1 开始
- * @param limit 每页数目,最大不能超过 50,默认为 10
- * @param query 数据策略名称关键字搜索
- * @returns ListSimpleDataPoliciesPaginatedRespDto
+* @summary 获取 MAU 使用记录
+* @description 获取当前用户池 MAU 使用记录
+* @param startTime 起始时间(年月日)
+* @param endTime 截止时间(年月日)
+* @returns CostGetMauPeriodUsageHistoryRespDto
*/
-func (client *ManagementClient) ListSimpleDataPolices(reqDto *dto.ListSimpleDataPoliciesDto) *dto.ListSimpleDataPoliciesPaginatedRespDto {
- b, err := client.SendHttpRequest("/api/v3/list-simple-data-policies", fasthttp.MethodGet, reqDto)
- var response dto.ListSimpleDataPoliciesPaginatedRespDto
+func (client *ManagementClient) GetMauPeriodUsageHistory(reqDto *dto.GetMauPeriodUsageHistoryDto) *dto.CostGetMauPeriodUsageHistoryRespDto {
+ b, err := client.SendHttpRequest("/api/v3/get-mau-period-usage-history", fasthttp.MethodGet, reqDto)
+ var response dto.CostGetMauPeriodUsageHistoryRespDto
if err != nil {
fmt.Println(err)
return nil
@@ -4842,14 +9754,13 @@ func (client *ManagementClient) ListSimpleDataPolices(reqDto *dto.ListSimpleData
}
/*
- * @summary 获取数据策略信息
- * @description 获取数据策略信息,通过数据策略 ID 获取对应数据策略信息,包含数据策略 ID、数据策略名称、数据策略描述、数据策略下所有的数据权限列表等信息。
- * @param policyId 数据策略 ID
- * @returns GetDataPolicyResponseDto
+* @summary 获取所有权益
+* @description 获取当前用户池所有权益
+* @returns CostGetAllRightItemRespDto
*/
-func (client *ManagementClient) GetDataPolicy(reqDto *dto.GetDataPolicyDto) *dto.GetDataPolicyResponseDto {
- b, err := client.SendHttpRequest("/api/v3/get-data-policy", fasthttp.MethodGet, reqDto)
- var response dto.GetDataPolicyResponseDto
+func (client *ManagementClient) GetAllRightsItem() *dto.CostGetAllRightItemRespDto {
+ b, err := client.SendHttpRequest("/api/v3/get-all-rights-items", fasthttp.MethodGet, nil)
+ var response dto.CostGetAllRightItemRespDto
if err != nil {
fmt.Println(err)
return nil
@@ -4863,14 +9774,15 @@ func (client *ManagementClient) GetDataPolicy(reqDto *dto.GetDataPolicyDto) *dto
}
/*
- * @summary 修改数据策略
- * @description 修改数据策略,通过数据策略名称、数据策略描述和相关的数据资源等字段修改数据策略信息。
- * @param requestBody
- * @returns UpdateDataPolicyResponseDto
+* @summary 获取订单列表
+* @description 获取当前用户池订单列表
+* @param page 当前页数,从 1 开始
+* @param limit 每页数目,最大不能超过 50,默认为 10
+* @returns CostGetOrdersRespDto
*/
-func (client *ManagementClient) UpdateDataPolicy(reqDto *dto.UpdateDataPolicyDto) *dto.UpdateDataPolicyResponseDto {
- b, err := client.SendHttpRequest("/api/v3/update-data-policy", fasthttp.MethodPost, reqDto)
- var response dto.UpdateDataPolicyResponseDto
+func (client *ManagementClient) GetOrders(reqDto *dto.GetOrdersDto) *dto.CostGetOrdersRespDto {
+ b, err := client.SendHttpRequest("/api/v3/get-orders", fasthttp.MethodGet, reqDto)
+ var response dto.CostGetOrdersRespDto
if err != nil {
fmt.Println(err)
return nil
@@ -4884,14 +9796,14 @@ func (client *ManagementClient) UpdateDataPolicy(reqDto *dto.UpdateDataPolicyDto
}
/*
- * @summary 删除数据策略
- * @description 删除数据策略,通过数据策略 ID 删除对应的策略,同时也删除数据策略和对应的数据资源等关系数据。
- * @param requestBody
- * @returns CommonResponseDto
+* @summary 获取订单详情
+* @description 获取当前用户池订单详情
+* @param orderNo 订单号
+* @returns CostGetOrderDetailRespDto
*/
-func (client *ManagementClient) DeleteDataPolicy(reqDto *dto.DeleteDataPolicyDto) *dto.CommonResponseDto {
- b, err := client.SendHttpRequest("/api/v3/delete-data-policy", fasthttp.MethodPost, reqDto)
- var response dto.CommonResponseDto
+func (client *ManagementClient) GetOrderDetail(reqDto *dto.GetOrderDetailDto) *dto.CostGetOrderDetailRespDto {
+ b, err := client.SendHttpRequest("/api/v3/get-order-detail", fasthttp.MethodGet, reqDto)
+ var response dto.CostGetOrderDetailRespDto
if err != nil {
fmt.Println(err)
return nil
@@ -4905,14 +9817,14 @@ func (client *ManagementClient) DeleteDataPolicy(reqDto *dto.DeleteDataPolicyDto
}
/*
- * @summary 校验数据策略名称是否存在
- * @description 通过数据策略名称查询用户池内是否存在。
- * @param policyName 数据策略名称,用户池唯一
- * @returns CheckParamsDataPolicyResponseDto
+* @summary 获取订单支付明细
+* @description 获取当前用户池订单支付明细
+* @param orderNo 订单号
+* @returns CostGetOrderPayDetailRespDto
*/
-func (client *ManagementClient) CheckDataPolicyExists(reqDto *dto.CheckDataPolicyExistsDto) *dto.CheckParamsDataPolicyResponseDto {
- b, err := client.SendHttpRequest("/api/v3/check-data-policy-exists", fasthttp.MethodGet, reqDto)
- var response dto.CheckParamsDataPolicyResponseDto
+func (client *ManagementClient) GetOrderPayDetail(reqDto *dto.GetOrderPayDetailDto) *dto.CostGetOrderPayDetailRespDto {
+ b, err := client.SendHttpRequest("/api/v3/get-order-pay-detail", fasthttp.MethodGet, reqDto)
+ var response dto.CostGetOrderPayDetailRespDto
if err != nil {
fmt.Println(err)
return nil
@@ -4926,18 +9838,14 @@ func (client *ManagementClient) CheckDataPolicyExists(reqDto *dto.CheckDataPolic
}
/*
- * @summary 获取数据策略下所有的授权主体的信息
- * @description 获取数据策略下所有的授权主体的信息,通过授权主体类型、数据策略 ID 和数据资源 ID 查找授权主体列表。
- * @param policyId 数据策略 ID
- * @param page 当前页数,从 1 开始
- * @param limit 每页数目,最大不能超过 50,默认为 10
- * @param query 主体名称
- * @param targetType 主体类型,包括 USER、GROUP、ROLE、ORG 四种类型
- * @returns ListDataPolicySubjectPaginatedRespDto
+* @summary 创建自定义事件应用
+* @description 创建自定义事件应用
+* @param requestBody
+* @returns CommonResponseDto
*/
-func (client *ManagementClient) ListDataPolicyTargets(reqDto *dto.ListDataPolicyTargetsDto) *dto.ListDataPolicySubjectPaginatedRespDto {
- b, err := client.SendHttpRequest("/api/v3/list-data-policy-targets", fasthttp.MethodGet, reqDto)
- var response dto.ListDataPolicySubjectPaginatedRespDto
+func (client *ManagementClient) CreateEventApp(reqDto *dto.CreateEventAppDto) *dto.CommonResponseDto {
+ b, err := client.SendHttpRequest("/api/v3/create-event-app", fasthttp.MethodPost, reqDto)
+ var response dto.CommonResponseDto
if err != nil {
fmt.Println(err)
return nil
@@ -4951,14 +9859,13 @@ func (client *ManagementClient) ListDataPolicyTargets(reqDto *dto.ListDataPolicy
}
/*
- * @summary 授权数据策略
- * @description 数据策略创建主体授权,通过授权主体和数据策略进行相互授权。
- * @param requestBody
- * @returns CommonResponseDto
+* @summary 获取事件应用列表
+* @description 获取事件应用列表
+* @returns EventAppPaginatedRespDto
*/
-func (client *ManagementClient) AuthorizeDataPolicies(reqDto *dto.CreateAuthorizeDataPolicyDto) *dto.CommonResponseDto {
- b, err := client.SendHttpRequest("/api/v3/authorize-data-policies", fasthttp.MethodPost, reqDto)
- var response dto.CommonResponseDto
+func (client *ManagementClient) ListEventApps() *dto.EventAppPaginatedRespDto {
+ b, err := client.SendHttpRequest("/api/v3/list-event-apps", fasthttp.MethodGet, nil)
+ var response dto.EventAppPaginatedRespDto
if err != nil {
fmt.Println(err)
return nil
@@ -4972,14 +9879,16 @@ func (client *ManagementClient) AuthorizeDataPolicies(reqDto *dto.CreateAuthoriz
}
/*
- * @summary 撤销数据策略
- * @description 删除数据策略相关的主体授权,通过授权主体 ID、授权主体类型和数据策略 ID 进行删除。
- * @param requestBody
- * @returns CommonResponseDto
+* @summary 获取事件列表
+* @description 获取 Authing 服务支持的所有事件列表
+* @param page 当前页数,从 1 开始
+* @param limit 每页数目,最大不能超过 50,默认为 10
+* @param app 应用类型
+* @returns OpenEventPaginatedRespDto
*/
-func (client *ManagementClient) RevokeDataPolicy(reqDto *dto.DeleteAuthorizeDataPolicyDto) *dto.CommonResponseDto {
- b, err := client.SendHttpRequest("/api/v3/revoke-data-policy", fasthttp.MethodPost, reqDto)
- var response dto.CommonResponseDto
+func (client *ManagementClient) ListEvents(reqDto *dto.ListEventsDto) *dto.OpenEventPaginatedRespDto {
+ b, err := client.SendHttpRequest("/api/v3/list-events", fasthttp.MethodGet, reqDto)
+ var response dto.OpenEventPaginatedRespDto
if err != nil {
fmt.Println(err)
return nil
@@ -4993,250 +9902,14 @@ func (client *ManagementClient) RevokeDataPolicy(reqDto *dto.DeleteAuthorizeData
}
/*
- * @summary 获取用户权限列表
- * @description 该接口用于用户列表权限查询,可以通过用户 ID 列表进行批量查询权限,也可以通过查询多个用户在同一个权限空间的权限,不同数据资源类型返回相应的资源结果。
- *
- * ### 查询一个用户拥有的数组资源、字符串资源和树资源权限列表示例
- *
- * - 入参
- *
- * ```json
- * {
- * "userIds": [
- * "6301ceaxxxxxxxxxxx27478"
- * ]
- * }
- * ```
- *
- * - 出参
- *
- * ```json
- * {
- * "statusCode": 200,
- * "message": "操作成功",
- * "apiCode": 20001,
- * "data": {
- * "userPermissionList": [
- * {
- * "userId": "6301ceaxxxxxxxxxxx27478",
- * "namespaceCode": "examplePermissionNamespace",
- * "resourceList": [
- * {
- * "resourceCode": "strCode",
- * "resourceType": "STRING",
- * "strAuthorize": {
- * "value": "示例字符串资源",
- * "actions": [
- * "read",
- * "post",
- * "get",
- * "write"
- * ]
- * }
- * },
- * {
- * "resourceCode": "arrayCode",
- * "resourceType": "ARRAY",
- * "arrAuthorize": {
- * "values": [
- * "示例数据资源1",
- * "示例数据资源2"
- * ],
- * "actions": [
- * "read",
- * "post",
- * "get",
- * "write"
- * ]
- * }
- * },
- * {
- * "resourceCode": "treeCode",
- * "resourceType": "TREE",
- * "treeAuthorize": {
- * "authList": [
- * {
- * "nodePath": "/treeChildrenCode/treeChildrenCode1",
- * "nodeActions": [
- * "read",
- * "get"
- * ],
- * "nodeName": "treeChildrenName1",
- * "nodeValue": "treeChildrenValue1"
- * },
- * {
- * "nodePath": "/treeChildrenCode/treeChildrenCode2",
- * "nodeActions": [
- * "read",
- * "get"
- * ],
- * "nodeName": "treeChildrenName2",
- * "nodeValue": "treeChildrenValue2"
- * },
- * {
- * "nodePath": "/treeChildrenCode/treeChildrenCode3",
- * "nodeActions": [
- * "read"
- * ],
- * "nodeName": "treeChildrenName3",
- * "nodeValue": "treeChildrenValue3"
- * }
- * ]
- * }
- * }
- * ]
- * }
- * ]
- * }
- * }
- * ```
- *
- * ### 查询多个用户权限列表示例
- *
- * - 入参
- *
- * ```json
- * {
- * "userIds": [
- * "6301ceaxxxxxxxxxxx27478",
- * "6121ceaxxxxxxxxxxx27312"
- * ]
- * }
- * ```
- *
- * - 出参
- *
- * ```json
- * {
- * "statusCode": 200,
- * "message": "操作成功",
- * "apiCode": 20001,
- * "data": {
- * "userPermissionList": [
- * {
- * "userId": "6301ceaxxxxxxxxxxx27478",
- * "namespaceCode": "examplePermissionNamespace1",
- * "resourceList": [
- * {
- * "resourceCode": "strCode",
- * "resourceType": "STRING",
- * "strAuthorize": {
- * "value": "示例字符串资源",
- * "actions": [
- * "read",
- * "post",
- * "get",
- * "write"
- * ]
- * }
- * }
- * ]
- * },
- * {
- * "userId": "6121ceaxxxxxxxxxxx27312",
- * "namespaceCode": "examplePermissionNamespace2",
- * "resourceList": [
- * {
- * "resourceCode": "arrayCode",
- * "resourceType": "ARRAY",
- * "arrAuthorize": {
- * "values": [
- * "示例数组资源1",
- * "示例数组资源2"
- * ],
- * "actions": [
- * "read",
- * "post",
- * "get",
- * "write"
- * ]
- * }
- * }
- * ]
- * }
- * ]
- * }
- * }
- * ```
- *
- * ### 查询多个用户在多个权限空间下权限列表示例
- *
- * - 入参
- *
- * ```json
- * {
- * "userIds": [
- * "6301ceaxxxxxxxxxxx27478",
- * "6121ceaxxxxxxxxxxx27312"
- * ],
- * "namespaceCodes": [
- * "examplePermissionNamespace1",
- * "examplePermissionNamespace2"
- * ]
- * }
- * ```
- *
- * - 出参
- *
- * ```json
- * {
- * "statusCode": 200,
- * "message": "操作成功",
- * "apiCode": 20001,
- * "data": {
- * "userPermissionList": [
- * {
- * "userId": "6301ceaxxxxxxxxxxx27478",
- * "namespaceCode": "examplePermissionNamespace1",
- * "resourceList": [
- * {
- * "resourceCode": "strCode1",
- * "resourceType": "STRING",
- * "strAuthorize": {
- * "value": "示例字符串资源",
- * "actions": [
- * "read",
- * "post",
- * "get",
- * "write"
- * ]
- * }
- * }
- * ]
- * },
- * {
- * "userId": "6121ceaxxxxxxxxxxx27312",
- * "namespaceCode": "examplePermissionNamespace2",
- * "resourceList": [
- * {
- * "resourceCode": "arrayCode",
- * "resourceType": "ARRAY",
- * "arrAuthorize": {
- * "values": [
- * "示例数组资源1",
- * "示例数组资源2"
- * ],
- * "actions": [
- * "read",
- * "post",
- * "get",
- * "write"
- * ]
- * }
- * }
- * ]
- * }
- * ]
- * }
- * }
- * ```
- *
- * @param requestBody
- * @returns GetUserPermissionListRespDto
-*/
-func (client *ManagementClient) GetUserPermissionList(reqDto *dto.GetUserPermissionListDto) *dto.GetUserPermissionListRespDto {
- b, err := client.SendHttpRequest("/api/v3/get-user-permission-list", fasthttp.MethodPost, reqDto)
- var response dto.GetUserPermissionListRespDto
+* @summary 定义自定义事件
+* @description 在 Authing 事件中心定义自定义事件
+* @param requestBody
+* @returns CommonResponseDto
+ */
+func (client *ManagementClient) DefineEvent(reqDto *dto.DefineEventDto) *dto.CommonResponseDto {
+ b, err := client.SendHttpRequest("/api/v3/define-event", fasthttp.MethodPost, reqDto)
+ var response dto.CommonResponseDto
if err != nil {
fmt.Println(err)
return nil
@@ -5250,140 +9923,14 @@ func (client *ManagementClient) GetUserPermissionList(reqDto *dto.GetUserPermiss
}
/*
- * @summary 判断用户权限
- * @description 该接口用于判断用户权限,通过权限空间 Code、用户 ID、资源操作以及资源列表来判断用户是否对资源拥有操作权限。可选传条件属性参数,默认不开启条件判断。
- *
- * ### 判断用户对字符串和数组资源权限示例(无条件判断)
- *
- * - 入参
- *
- * ```json
- * {
- * "namespaceCode": "examplePermissionNamespace",
- * "userId": "63721xxxxxxxxxxxxdde14a3",
- * "action": "get",
- * "resources":["strResourceCode1", "arrayResourceCode1"]
- * }
- * ```
- *
- * - 出参
- *
- * ```json
- * {
- * "statusCode": 200,
- * "message": "操作成功",
- * "apiCode": 20001,
- * "data": {
- * "checkResultList": [
- * {
- * "namespaceCode": "examplePermissionNamespace",
- * "resource": "strResourceCode1",
- * "action": "get",
- * "enabled": true
- * },
- * {
- * "namespaceCode": "examplePermissionNamespace",
- * "resource": "arrayResourceCode1",
- * "action": "get",
- * "enabled": true
- * }
- * ]
- * }
- * }
- * ```
- *
- * ### 判断用户对字符串和数组资源权限示例(开启条件判断)
- *
- * - 入参
- *
- * ```json
- * {
- * "namespaceCode": "examplePermissionNamespace",
- * "userId": "63721xxxxxxxxxxxxdde14a3",
- * "action": "get",
- * "resources": ["strResourceCode1", "arrayResourceCode1"],
- * "judgeConditionEnabled": true,
- * "authEnvParams":{
- * "ip":"110.96.0.0",
- * "city":"北京",
- * "province":"北京",
- * "country":"中国",
- * "deviceType":"PC",
- * "systemType":"ios",
- * "browserType":"IE",
- * "requestDate":"2022-12-26 17:40:00"
- * }
- * }
- * ```
- *
- * - 出参
- *
- * ```json
- * {
- * "statusCode": 200,
- * "message": "操作成功",
- * "apiCode": 20001,
- * "data": {
- * "checkResultList": [
- * {
- * "namespaceCode": "examplePermissionNamespace",
- * "resource": "strResourceCode1",
- * "action": "get",
- * "enabled": false
- * },
- * {
- * "namespaceCode": "examplePermissionNamespace",
- * "resource": "arrayResourceCode1",
- * "action": "get",
- * "enabled": false
- * }
- * ]
- * }
- * }
- * ```
- *
- * ### 判断用户对树资源权限示例
- *
- * - 入参
- *
- * ```json
- * {
- * "namespaceCode": "examplePermissionNamespace",
- * "userId": "63721xxxxxxxxxxxxdde14a3",
- * "action": "get"
- * "resources":["treeResourceCode1/StructCode1/resourceStructChildrenCode1", "treeResourceCode2/StructCode1/resourceStructChildrenCode1"]
- * }
- * ```
- *
- * - 出参
- *
- * ```json
- * {
- * "statusCode": 200,
- * "message": "操作成功",
- * "apiCode": 20001,
- * "data":{
- * "checkResultList": [{
- * "namespaceCode": "examplePermissionNamespace",
- * "action": "get",
- * "resource": "treeResourceCode1/StructCode1/resourceStructChildrenCode1",
- * "enabled": true
- * },{
- * "namespaceCode": "examplePermissionNamespace",
- * "action": "get",
- * "resource": "treeResourceCode2/StructCode1/resourceStructChildrenCode1",
- * "enabled": true
- * }]
- * }
- * }
- * ```
- *
- * @param requestBody
- * @returns CheckPermissionRespDto
-*/
-func (client *ManagementClient) CheckPermission(reqDto *dto.CheckPermissionDto) *dto.CheckPermissionRespDto {
- b, err := client.SendHttpRequest("/api/v3/check-permission", fasthttp.MethodPost, reqDto)
- var response dto.CheckPermissionRespDto
+* @summary 推送自定义事件
+* @description 向 Authing 事件中心推送自定义事件
+* @param requestBody
+* @returns PubEventRespDto
+ */
+func (client *ManagementClient) VerifyEvent(reqDto *dto.PubEventDto) *dto.PubEventRespDto {
+ b, err := client.SendHttpRequest("/api/v3/pub-event", fasthttp.MethodPost, reqDto)
+ var response dto.PubEventRespDto
if err != nil {
fmt.Println(err)
return nil
@@ -5397,14 +9944,14 @@ func (client *ManagementClient) CheckPermission(reqDto *dto.CheckPermissionDto)
}
/*
- * @summary 判断外部用户权限
- * @description 判断外部用户权限
- * @param requestBody
- * @returns CheckExternalUserPermissionRespDto
+* @summary 认证端推送自定义事件
+* @description 认证端向 Authing 事件中心推送自定义事件
+* @param requestBody
+* @returns PubEventRespDto
*/
-func (client *ManagementClient) CheckExternalUserPermission(reqDto *dto.CheckExternalUserPermissionDto) *dto.CheckExternalUserPermissionRespDto {
- b, err := client.SendHttpRequest("/api/v3/check-external-user-permission", fasthttp.MethodPost, reqDto)
- var response dto.CheckExternalUserPermissionRespDto
+func (client *ManagementClient) PubUserEvent(reqDto *dto.PubEventDto) *dto.PubEventRespDto {
+ b, err := client.SendHttpRequest("/api/v3/pub-userEvent", fasthttp.MethodPost, reqDto)
+ var response dto.PubEventRespDto
if err != nil {
fmt.Println(err)
return nil
@@ -5418,82 +9965,14 @@ func (client *ManagementClient) CheckExternalUserPermission(reqDto *dto.CheckExt
}
/*
- * @summary 获取用户指定资源权限列表
- * @description 该接口主要用于获取用户指定资源的权限列表,通过权限空间 Code、用户 ID 以及资源列表查询所有权限。
- *
- * ### 获取用户字符串和数组资源权限示例
- *
- * - 入参
- *
- * ```json
- * {
- * "namespaceCode": "examplePermissionNamespace",
- * "userId": "63721xxxxxxxxxxxxdde14a3",
- * "resources":["strResourceCode1", "arrayResourceCode1"]
- * }
- * ```
- *
- * - 出参
- *
- * ```json
- * {
- *
- * "statusCode": 200,
- * "message": "操作成功",
- * "apiCode": 20001,
- * "data":{
- * "permissionList": [{
- * "namespaceCode": "examplePermissionNamespace",
- * "actionList": ["read","get"],
- * "resource": "strResourceCode1"
- * },{
- * "namespaceCode": "examplePermissionNamespace",
- * "actionList": ["read","update","delete"],
- * "resource": "arrayResourceCode1"
- * }]
- * }
- * }
- * ```
- *
- * ### 获取用户树资源权限示例
- *
- * - 入参
- *
- * ```json
- * {
- * "namespaceCode": "examplePermissionNamespace",
- * "userId": "63721xxxxxxxxxxxxdde14a3",
- * "resources":["treeResourceCode1/StructCode1/resourceStructChildrenCode1", "treeResourceCode2/StructCode1/resourceStructChildrenCode1"]
- * }
- * ```
- *
- * - 出参
- *
- * ```json
- * {
- * "statusCode": 200,
- * "message": "操作成功",
- * "apiCode": 20001,
- * "data":{
- * "permissionList": [{
- * "namespaceCode": "examplePermissionNamespace",
- * "actionList": ["read", "update", "delete"],
- * "resource": "treeResourceCode1/StructCode1/resourceStructChildrenCode1"
- * },{
- * "namespaceCode": "examplePermissionNamespace",
- * "actionList": ["read", "get", "delete"],
- * "resource": "treeResourceCode2/StructCode1/resourceStructChildrenCode1"
- * }]
- * }
- * }
- * ```
- *
- * @param requestBody
- * @returns GetUserResourcePermissionListRespDto
-*/
-func (client *ManagementClient) GetUserResourcePermissionList(reqDto *dto.GetUserResourcePermissionListDto) *dto.GetUserResourcePermissionListRespDto {
- b, err := client.SendHttpRequest("/api/v3/get-user-resource-permission-list", fasthttp.MethodPost, reqDto)
- var response dto.GetUserResourcePermissionListRespDto
+* @summary 创建注册白名单
+* @description 你需要指定注册白名单类型以及数据,来进行创建
+* @param requestBody
+* @returns WhitelistListRespDto
+ */
+func (client *ManagementClient) AddWhitelist(reqDto *dto.AddWhitelistDto) *dto.WhitelistListRespDto {
+ b, err := client.SendHttpRequest("/api/v3/add-whitelist", fasthttp.MethodPost, reqDto)
+ var response dto.WhitelistListRespDto
if err != nil {
fmt.Println(err)
return nil
@@ -5507,113 +9986,14 @@ func (client *ManagementClient) GetUserResourcePermissionList(reqDto *dto.GetUse
}
/*
- * @summary 获取资源被授权的用户列表
- * @description 该接口主要用于获取资源被授权的用户列表,通过权限空间 Code 、资源操作列表以及资源列表查询有权限的用户列表。
- *
- * ### 获取字符串和数组资源被授权的用户列表示例
- *
- * - 入参
- *
- * ```json
- * {
- * "namespaceCode": "examplePermissionNamespace",
- * "actions": ["get", "update", "read"],
- * "resources":["strResourceCode1", "arrayResourceCode1"]
- * }
- * ```
- *
- * - 出参
- *
- * ```json
- * {
- * "statusCode": 200,
- * "message": "操作成功",
- * "apiCode": 20001,
- * "data":{
- * "authUserList": [{
- * "resource": "strResourceCode1",
- * "actionAuthList": [{
- * "userIds": ["63721xxxxxxxxxxxxdde14a3"],
- * "action": "get"
- * },{
- * "userIds": ["63721xxxxxxxxxxxxdde14a3"],
- * "action": "update"
- * },{
- * "userIds": ["63721xxxxxxxxxxxxdde14a3"],
- * "action": "read"
- * }]
- * },{
- * "resource": "arrayResourceCode1",
- * "actionAuthList": [{
- * "userIds": ["63721xxxxxxxxxxxxdde14a3"],
- * "action": "get"
- * },{
- * "userIds": ["63721xxxxxxxxxxxxdde14a3"],
- * "action": "update"
- * },{
- * "userIds": ["63721xxxxxxxxxxxxdde14a3"],
- * "action": "read"
- * }]
- * }]
- * }
- * }
- * ```
- *
- * ### 获取树资源被授权的用户列表示例
- *
- * - 入参
- *
- * ```json
- * {
- * "namespaceCode": "examplePermissionNamespace",
- * "actions": ["get", "update", "delete"],
- * "resources":["treeResourceCode1/StructCode1/resourceStructChildrenCode1", "treeResourceCode2/StructCode1/resourceStructChildrenCode1"]
- * }
- * ```
- *
- * - 出参
- *
- * ```json
- * {
- * "statusCode": 200,
- * "message": "操作成功",
- * "apiCode": 20001,
- * "data":{
- * "authUserList": [{
- * "resource": "treeResourceCode1/StructCode1/resourceStructChildrenCode1",
- * "actionAuthList": [{
- * "userIds": ["63721xxxxxxxxxxxxdde14a3"],
- * "action": "get"
- * },{
- * "userIds": ["63721xxxxxxxxxxxxdde14a3"],
- * "action": "update"
- * },{
- * "userIds": ["63721xxxxxxxxxxxxdde14a3"],
- * "action": "delete"
- * }]
- * },{
- * "resource": "treeResourceCode2/StructCode1/resourceStructChildrenCode1",
- * "actionAuthList": [{
- * "userIds": ["63721xxxxxxxxxxxxdde14a3"],
- * "action": "get"
- * },{
- * "userIds": ["63721xxxxxxxxxxxxdde14a3"],
- * "action": "update"
- * },{
- * "userIds": ["63721xxxxxxxxxxxxdde14a3"],
- * "action": "delete"
- * }]
- * }]
- * }
- * }
- * ```
- *
- * @param requestBody
- * @returns ListResourceTargetsRespDto
-*/
-func (client *ManagementClient) ListResourceTargets(reqDto *dto.ListResourceTargetsDto) *dto.ListResourceTargetsRespDto {
- b, err := client.SendHttpRequest("/api/v3/list-resource-targets", fasthttp.MethodPost, reqDto)
- var response dto.ListResourceTargetsRespDto
+* @summary 获取注册白名单列表
+* @description 获取注册白名单列表,可选页数、分页大小来获取
+* @param type 白名单类型
+* @returns WhitelistListRespDto
+ */
+func (client *ManagementClient) ListWhitelists(reqDto *dto.ListWhitelistDto) *dto.WhitelistListRespDto {
+ b, err := client.SendHttpRequest("/api/v3/list-whitelist", fasthttp.MethodGet, reqDto)
+ var response dto.WhitelistListRespDto
if err != nil {
fmt.Println(err)
return nil
@@ -5627,125 +10007,14 @@ func (client *ManagementClient) ListResourceTargets(reqDto *dto.ListResourceTarg
}
/*
- * @summary 获取用户授权资源的结构列表
- * @description 该接口主要用于获取用户授权的资源列表,通过权限空间 Code、用户 Id、资源 Code 获取用户资源的授权列表,通过不同的资源类型返回对应资源的授权。
- *
- * ### 获取用户授权字符串数据资源示例
- *
- * - 入参
- *
- * ```json
- * {
- * "namespaceCode": "examplePermissionNamespace",
- * "userId": "63721xxxxxxxxxxxxdde14a3",
- * "resourceCode": "exampleStrResourceCode"
- * }
- * ```
- *
- * - 出参
- *
- * ```json
- * {
- * "statusCode": 200,
- * "message": "操作成功",
- * "apiCode": 20001,
- * "data":{
- * "namespaceCode": "exampleNamespaceCode",
- * "resourceCode": "exampleStrResourceCode",
- * "resourceType": "STRING",
- * "strResourceAuthAction":{
- * "value": "strTestValue",
- * "actions": ["get","delete"]
- * }
- * }
- * }
- * ```
- *
- *
- * ### 获取用户授权数据数组资源示例
- *
- * - 入参
- *
- * ```json
- * {
- * "namespaceCode": "examplePermissionNamespace",
- * "userId": "63721xxxxxxxxxxxxdde14a3",
- * "resourceCode": "exampleArrResourceCode"
- * }
- * ```
- *
- * - 出参
- *
- * ```json
- * {
- * "statusCode": 200,
- * "message": "操作成功",
- * "apiCode": 20001,
- * "data":{
- * "namespaceCode": "exampleNamespaceCode",
- * "resourceCode": "exampleArrResourceCode",
- * "resourceType": "ARRAY",
- * "arrResourceAuthAction":{
- * "values": ["arrTestValue1","arrTestValue2","arrTestValue3"],
- * "actions": ["get","delete"]
- * }
- * }
- * }
- * ```
- *
- *
- * ### 获取用户授权树数据资源示例
- *
- * - 入参
- *
- * ```json
- * {
- * "namespaceCode": "examplePermissionNamespace",
- * "userId": "63721xxxxxxxxxxxxdde14a3",
- * "resourceCode": "exampleArrResourceCode"
- * }
- * ```
- *
- * - 出参
- *
- * ```json
- * {
- * "statusCode": 200,
- * "message": "操作成功",
- * "apiCode": 20001,
- * "data":{
- * "namespaceCode": "exampleNamespaceCode",
- * "resourceCode": "exampleArrResourceCode",
- * "resourceType": "TREE",
- * "treeResourceAuthAction":{
- * "nodeAuthActionList":[{
- * "code": "tree11",
- * "name": "tree11",
- * "value": "test11Value",
- * "actions": ["get","delete"],
- * "children": [{
- * "code": "tree111",
- * "name": "tree111",
- * "value": "test111Value",
- * "actions": ["update","read"],
- * }]
- * },{
- * "code": "tree22",
- * "name": "tree22",
- * "value": "test22Value",
- * "actions": ["get","delete"],
- * }]
- * }
- * }
- * }
- * ```
- *
- * @param requestBody
- * @returns GetUserResourceStructRespDto
-*/
-func (client *ManagementClient) GetUserResourceStruct(reqDto *dto.GetUserResourceStructDto) *dto.GetUserResourceStructRespDto {
- b, err := client.SendHttpRequest("/api/v3/get-user-resource-struct", fasthttp.MethodPost, reqDto)
- var response dto.GetUserResourceStructRespDto
+* @summary 删除注册白名单
+* @description 通过指定多个注册白名单数据,以数组的形式进行注册白名单的删除
+* @param requestBody
+* @returns IsSuccessDto
+ */
+func (client *ManagementClient) DeleteWhitelist(reqDto *dto.DeleteWhitelistDto) *dto.IsSuccessDto {
+ b, err := client.SendHttpRequest("/api/v3/delete-whitelist", fasthttp.MethodPost, reqDto)
+ var response dto.IsSuccessDto
if err != nil {
fmt.Println(err)
return nil
@@ -5759,126 +10028,16 @@ func (client *ManagementClient) GetUserResourceStruct(reqDto *dto.GetUserResourc
}
/*
- * @summary 获取外部用户授权资源的结构列表
- * @description 该接口主要用于获取外部用户授权的资源列表,通过权限空间 Code、外部用户 Id、资源 Code 获取外部用户资源的授权列表,通过不同的资源类型返回对应资源的授权。
- *
- *
- * ### 获取用户授权字符串数据资源示例
- *
- * - 入参
- *
- * ```json
- * {
- * "namespaceCode": "examplePermissionNamespace",
- * "externalId": "63721xxxxxxxxxxxxdde14a3",
- * "resourceCode": "exampleStrResourceCode"
- * }
- * ```
- *
- * - 出参
- *
- * ```json
- * {
- * "statusCode": 200,
- * "message": "操作成功",
- * "apiCode": 20001,
- * "data":{
- * "namespaceCode": "exampleNamespaceCode",
- * "resourceCode": "exampleStrResourceCode",
- * "resourceType": "STRING",
- * "strResourceAuthAction":{
- * "value": "strTestValue",
- * "actions": ["get","delete"]
- * }
- * }
- * }
- * ```
- *
- *
- * ### 获取用户授权数据数组资源示例
- *
- * - 入参
- *
- * ```json
- * {
- * "namespaceCode": "examplePermissionNamespace",
- * "externalId": "63721xxxxxxxxxxxxdde14a3",
- * "resourceCode": "exampleArrResourceCode"
- * }
- * ```
- *
- * - 出参
- *
- * ```json
- * {
- * "statusCode": 200,
- * "message": "操作成功",
- * "apiCode": 20001,
- * "data":{
- * "namespaceCode": "exampleNamespaceCode",
- * "resourceCode": "exampleArrResourceCode",
- * "resourceType": "ARRAY",
- * "arrResourceAuthAction":{
- * "values": ["arrTestValue1","arrTestValue2","arrTestValue3"],
- * "actions": ["get","delete"]
- * }
- * }
- * }
- * ```
- *
- *
- * ### 获取用户授权树数据资源示例
- *
- * - 入参
- *
- * ```json
- * {
- * "namespaceCode": "examplePermissionNamespace",
- * "externalId": "63721xxxxxxxxxxxxdde14a3",
- * "resourceCode": "exampleArrResourceCode"
- * }
- * ```
- *
- * - 出参
- *
- * ```json
- * {
- * "statusCode": 200,
- * "message": "操作成功",
- * "apiCode": 20001,
- * "data":{
- * "namespaceCode": "exampleNamespaceCode",
- * "resourceCode": "exampleArrResourceCode",
- * "resourceType": "TREE",
- * "treeResourceAuthAction":{
- * "nodeAuthActionList":[{
- * "code": "tree11",
- * "name": "tree11",
- * "value": "test11Value",
- * "actions": ["get","delete"],
- * "children": [{
- * "code": "tree111",
- * "name": "tree111",
- * "value": "test111Value",
- * "actions": ["update","read"],
- * }]
- * },{
- * "code": "tree22",
- * "name": "tree22",
- * "value": "test22Value",
- * "actions": ["get","delete"],
- * }]
- * }
- * }
- * }
- * ```
- *
- * @param requestBody
- * @returns GetExternalUserResourceStructRespDto
-*/
-func (client *ManagementClient) GetExternalUserResourceStruct(reqDto *dto.GetExternalUserResourceStructDto) *dto.GetExternalUserResourceStructRespDto {
- b, err := client.SendHttpRequest("/api/v3/get-external-user-resource-struct", fasthttp.MethodPost, reqDto)
- var response dto.GetExternalUserResourceStructRespDto
+* @summary 获取 ip 列表
+* @description 分页获取 ip 列表
+* @param ipType IP 类型
+* @param page 当前页数,从 1 开始
+* @param limit 每页数目,最大不能超过 50,默认为 10
+* @returns IpListPaginatedRespDto
+ */
+func (client *ManagementClient) FindIpList(reqDto *dto.IpListDto) *dto.IpListPaginatedRespDto {
+ b, err := client.SendHttpRequest("/api/v3/ip-list", fasthttp.MethodGet, reqDto)
+ var response dto.IpListPaginatedRespDto
if err != nil {
fmt.Println(err)
return nil
@@ -5892,51 +10051,14 @@ func (client *ManagementClient) GetExternalUserResourceStruct(reqDto *dto.GetExt
}
/*
- * @summary 判断用户在树资源同层级下的权限
- * @description 该接口主要用于判断用户在树资源同层级下的权限,通过权限空间 Code 、用户 ID、资源操作、资源或资源子节点查询用户是否有该树资源同级路径的权限。可选传条件属性参数,默认不开启条件判断。
- *
- *
- * ### 判断用户在树资源同层级权限示例(无条件判断)
- *
- * ```json
- * {
- * "namespaceCode": "examplePermissionNamespace",
- * "userId": "63721xxxxxxxxxxxxdde14a3",
- * "action": "read",
- * "resource": "treeResourceCode/structCode",
- * "resourceNodeCodes": ["resourceStructChildrenCode1","resourceStructChildrenCode2","resourceStructChildrenCode3"]
- * }
- * ```
- *
- * ### 判断用户在树资源同层级权限示例(开启条件判断)
- *
- * ```json
- * {
- * "namespaceCode": "examplePermissionNamespace",
- * "userId": "63721xxxxxxxxxxxxdde14a3",
- * "action": "read",
- * "resource": "treeResourceCode/structCode",
- * "resourceNodeCodes": ["resourceStructChildrenCode1","resourceStructChildrenCode2","resourceStructChildrenCode3"],
- * "judgeConditionEnabled": true,
- * "authEnvParams":{
- * "ip":"110.96.0.0",
- * "city":"北京",
- * "province":"北京",
- * "country":"中国",
- * "deviceType":"PC",
- * "systemType":"ios",
- * "browserType":"IE",
- * "requestDate":"2022-12-26 17:40:00"
- * }
- * }
- * ```
- *
- * @param requestBody
- * @returns CheckUserSameLevelPermissionResponseDto
-*/
-func (client *ManagementClient) CheckUserSameLevelPermission(reqDto *dto.CheckUserSameLevelPermissionDto) *dto.CheckUserSameLevelPermissionResponseDto {
- b, err := client.SendHttpRequest("/api/v3/check-user-same-level-permission", fasthttp.MethodPost, reqDto)
- var response dto.CheckUserSameLevelPermissionResponseDto
+* @summary 创建 ip 名单
+* @description 创建 ip 名单
+* @param requestBody
+* @returns CommonResponseDto
+ */
+func (client *ManagementClient) Add(reqDto *dto.IpListCreateDto) *dto.CommonResponseDto {
+ b, err := client.SendHttpRequest("/api/v3/ip-list", fasthttp.MethodPost, reqDto)
+ var response dto.CommonResponseDto
if err != nil {
fmt.Println(err)
return nil
@@ -5950,13 +10072,22 @@ func (client *ManagementClient) CheckUserSameLevelPermission(reqDto *dto.CheckUs
}
/*
- * @summary 获取套餐详情
- * @description 获取当前用户池套餐详情。
- * @returns CostGetCurrentPackageRespDto
+* @summary 删除 ip 名单
+* @description 删除 ip 名单
+* @param id
+* @returns CommonResponseDto
*/
-func (client *ManagementClient) GetCurrentPackageInfo() *dto.CostGetCurrentPackageRespDto {
- b, err := client.SendHttpRequest("/api/v3/get-current-package-info", fasthttp.MethodGet, nil)
- var response dto.CostGetCurrentPackageRespDto
+/*
+* @summary 获取用户列表
+* @description 分页获取用户列表
+* @param userListType IP 类型
+* @param page 当前页数,从 1 开始
+* @param limit 每页数目,最大不能超过 50,默认为 10
+* @returns UserListPaginatedRespDto
+ */
+func (client *ManagementClient) FindUserList(reqDto *dto.UserListDto) *dto.UserListPaginatedRespDto {
+ b, err := client.SendHttpRequest("/api/v3/user-list", fasthttp.MethodGet, reqDto)
+ var response dto.UserListPaginatedRespDto
if err != nil {
fmt.Println(err)
return nil
@@ -5970,13 +10101,14 @@ func (client *ManagementClient) GetCurrentPackageInfo() *dto.CostGetCurrentPacka
}
/*
- * @summary 获取用量详情
- * @description 获取当前用户池用量详情。
- * @returns CostGetCurrentUsageRespDto
+* @summary 创建用户名单
+* @description 创建用户名单
+* @param requestBody
+* @returns CommonResponseDto
*/
-func (client *ManagementClient) GetUsageInfo() *dto.CostGetCurrentUsageRespDto {
- b, err := client.SendHttpRequest("/api/v3/get-usage-info", fasthttp.MethodGet, nil)
- var response dto.CostGetCurrentUsageRespDto
+func (client *ManagementClient) AddUser(reqDto *dto.UserListCreateDto) *dto.CommonResponseDto {
+ b, err := client.SendHttpRequest("/api/v3/user-list", fasthttp.MethodPost, reqDto)
+ var response dto.CommonResponseDto
if err != nil {
fmt.Println(err)
return nil
@@ -5990,15 +10122,22 @@ func (client *ManagementClient) GetUsageInfo() *dto.CostGetCurrentUsageRespDto {
}
/*
- * @summary 获取 MAU 使用记录
- * @description 获取当前用户池 MAU 使用记录
- * @param startTime 起始时间(年月日)
- * @param endTime 截止时间(年月日)
- * @returns CostGetMauPeriodUsageHistoryRespDto
+* @summary 删除用户名单
+* @description 删除用户 名单
+* @param id
+* @returns CommonResponseDto
*/
-func (client *ManagementClient) GetMauPeriodUsageHistory(reqDto *dto.GetMauPeriodUsageHistoryDto) *dto.CostGetMauPeriodUsageHistoryRespDto {
- b, err := client.SendHttpRequest("/api/v3/get-mau-period-usage-history", fasthttp.MethodGet, reqDto)
- var response dto.CostGetMauPeriodUsageHistoryRespDto
+/*
+* @summary 获取风险策略列表
+* @description 分页获取风险策略列表
+* @param optObject 策略操作对象,目前只有 ip
+* @param page 当前页数,从 1 开始
+* @param limit 每页数目,最大不能超过 50,默认为 10
+* @returns UserListPolicyPaginatedRespDto
+ */
+func (client *ManagementClient) FindRiskListPolicy(reqDto *dto.RiskListPolicyDto) *dto.UserListPolicyPaginatedRespDto {
+ b, err := client.SendHttpRequest("/api/v3/risk-list-policy", fasthttp.MethodGet, reqDto)
+ var response dto.UserListPolicyPaginatedRespDto
if err != nil {
fmt.Println(err)
return nil
@@ -6012,13 +10151,14 @@ func (client *ManagementClient) GetMauPeriodUsageHistory(reqDto *dto.GetMauPerio
}
/*
- * @summary 获取所有权益
- * @description 获取当前用户池所有权益
- * @returns CostGetAllRightItemRespDto
+* @summary 创建风险策略
+* @description 创建风险策略
+* @param requestBody
+* @returns CommonResponseDto
*/
-func (client *ManagementClient) GetAllRightsItem() *dto.CostGetAllRightItemRespDto {
- b, err := client.SendHttpRequest("/api/v3/get-all-rights-items", fasthttp.MethodGet, nil)
- var response dto.CostGetAllRightItemRespDto
+func (client *ManagementClient) AddRiskListPolicy(reqDto *dto.RiskListPolicyCreateDto) *dto.CommonResponseDto {
+ b, err := client.SendHttpRequest("/api/v3/risk-list-policy", fasthttp.MethodPost, reqDto)
+ var response dto.CommonResponseDto
if err != nil {
fmt.Println(err)
return nil
@@ -6032,15 +10172,20 @@ func (client *ManagementClient) GetAllRightsItem() *dto.CostGetAllRightItemRespD
}
/*
- * @summary 获取订单列表
- * @description 获取当前用户池订单列表
- * @param page 当前页数,从 1 开始
- * @param limit 每页数目,最大不能超过 50,默认为 10
- * @returns CostGetOrdersRespDto
+* @summary 删除风险策略
+* @description 删除风险策略
+* @param id
+* @returns CommonResponseDto
*/
-func (client *ManagementClient) GetOrders(reqDto *dto.GetOrdersDto) *dto.CostGetOrdersRespDto {
- b, err := client.SendHttpRequest("/api/v3/get-orders", fasthttp.MethodGet, reqDto)
- var response dto.CostGetOrdersRespDto
+/*
+* @summary 新增设备
+* @description 创建新设备。
+* @param requestBody
+* @returns TerminalInfoRespDto
+ */
+func (client *ManagementClient) CreateDevice(reqDto *dto.CreateTerminalDto) *dto.TerminalInfoRespDto {
+ b, err := client.SendHttpRequest("/api/v3/create-device", fasthttp.MethodPost, reqDto)
+ var response dto.TerminalInfoRespDto
if err != nil {
fmt.Println(err)
return nil
@@ -6054,14 +10199,14 @@ func (client *ManagementClient) GetOrders(reqDto *dto.GetOrdersDto) *dto.CostGet
}
/*
- * @summary 获取订单详情
- * @description 获取当前用户池订单详情
- * @param orderNo 订单号
- * @returns CostGetOrderDetailRespDto
+* @summary 最近登录应用
+* @description 根据设备唯一标识获取最近登录的应用列表。
+* @param requestBody
+* @returns CommonResponseDto
*/
-func (client *ManagementClient) GetOrderDetail(reqDto *dto.GetOrderDetailDto) *dto.CostGetOrderDetailRespDto {
- b, err := client.SendHttpRequest("/api/v3/get-order-detail", fasthttp.MethodGet, reqDto)
- var response dto.CostGetOrderDetailRespDto
+func (client *ManagementClient) FindLastLoginAppsByDeviceIds(reqDto *dto.QueryTerminalAppsDto) *dto.CommonResponseDto {
+ b, err := client.SendHttpRequest("/api/v3/get-last-login-apps-by-deviceIds", fasthttp.MethodPost, reqDto)
+ var response dto.CommonResponseDto
if err != nil {
fmt.Println(err)
return nil
@@ -6075,14 +10220,14 @@ func (client *ManagementClient) GetOrderDetail(reqDto *dto.GetOrderDetailDto) *d
}
/*
- * @summary 获取订单支付明细
- * @description 获取当前用户池订单支付明细
- * @param orderNo 订单号
- * @returns CostGetOrderPayDetailRespDto
+* @summary 新增 verify 设备
+* @description 创建 verify 新设备。
+* @param requestBody
+* @returns TerminalInfoRespDto
*/
-func (client *ManagementClient) GetOrderPayDetail(reqDto *dto.GetOrderPayDetailDto) *dto.CostGetOrderPayDetailRespDto {
- b, err := client.SendHttpRequest("/api/v3/get-order-pay-detail", fasthttp.MethodGet, reqDto)
- var response dto.CostGetOrderPayDetailRespDto
+func (client *ManagementClient) CreateVerifyDevice(reqDto *dto.CreateTerminalDto) *dto.TerminalInfoRespDto {
+ b, err := client.SendHttpRequest("/api/v3/authing-verify/create-device", fasthttp.MethodPost, reqDto)
+ var response dto.TerminalInfoRespDto
if err != nil {
fmt.Println(err)
return nil
@@ -6096,10 +10241,10 @@ func (client *ManagementClient) GetOrderPayDetail(reqDto *dto.GetOrderPayDetailD
}
/*
- * @summary 创建 Pipeline 函数
- * @description 创建 Pipeline 函数
- * @param requestBody
- * @returns PipelineFunctionSingleRespDto
+* @summary 创建 Pipeline 函数
+* @description 创建 Pipeline 函数
+* @param requestBody
+* @returns PipelineFunctionSingleRespDto
*/
func (client *ManagementClient) CreatePipelineFunction(reqDto *dto.CreatePipelineFunctionDto) *dto.PipelineFunctionSingleRespDto {
b, err := client.SendHttpRequest("/api/v3/create-pipeline-function", fasthttp.MethodPost, reqDto)
@@ -6117,10 +10262,10 @@ func (client *ManagementClient) CreatePipelineFunction(reqDto *dto.CreatePipelin
}
/*
- * @summary 获取 Pipeline 函数详情
- * @description 获取 Pipeline 函数详情
- * @param funcId Pipeline 函数 ID
- * @returns PipelineFunctionSingleRespDto
+* @summary 获取 Pipeline 函数详情
+* @description 获取 Pipeline 函数详情
+* @param funcId Pipeline 函数 ID
+* @returns PipelineFunctionSingleRespDto
*/
func (client *ManagementClient) GetPipelineFunction(reqDto *dto.GetPipelineFunctionDto) *dto.PipelineFunctionSingleRespDto {
b, err := client.SendHttpRequest("/api/v3/get-pipeline-function", fasthttp.MethodGet, reqDto)
@@ -6138,10 +10283,10 @@ func (client *ManagementClient) GetPipelineFunction(reqDto *dto.GetPipelineFunct
}
/*
- * @summary 重新上传 Pipeline 函数
- * @description 当 Pipeline 函数上传失败时,重新上传 Pipeline 函数
- * @param requestBody
- * @returns PipelineFunctionSingleRespDto
+* @summary 重新上传 Pipeline 函数
+* @description 当 Pipeline 函数上传失败时,重新上传 Pipeline 函数
+* @param requestBody
+* @returns PipelineFunctionSingleRespDto
*/
func (client *ManagementClient) ReuploadPipelineFunction(reqDto *dto.ReUploadPipelineFunctionDto) *dto.PipelineFunctionSingleRespDto {
b, err := client.SendHttpRequest("/api/v3/reupload-pipeline-function", fasthttp.MethodPost, reqDto)
@@ -6159,10 +10304,10 @@ func (client *ManagementClient) ReuploadPipelineFunction(reqDto *dto.ReUploadPip
}
/*
- * @summary 修改 Pipeline 函数
- * @description 修改 Pipeline 函数
- * @param requestBody
- * @returns PipelineFunctionSingleRespDto
+* @summary 修改 Pipeline 函数
+* @description 修改 Pipeline 函数
+* @param requestBody
+* @returns PipelineFunctionSingleRespDto
*/
func (client *ManagementClient) UpdatePipelineFunction(reqDto *dto.UpdatePipelineFunctionDto) *dto.PipelineFunctionSingleRespDto {
b, err := client.SendHttpRequest("/api/v3/update-pipeline-function", fasthttp.MethodPost, reqDto)
@@ -6180,10 +10325,10 @@ func (client *ManagementClient) UpdatePipelineFunction(reqDto *dto.UpdatePipelin
}
/*
- * @summary 修改 Pipeline 函数顺序
- * @description 修改 Pipeline 函数顺序
- * @param requestBody
- * @returns CommonResponseDto
+* @summary 修改 Pipeline 函数顺序
+* @description 修改 Pipeline 函数顺序
+* @param requestBody
+* @returns CommonResponseDto
*/
func (client *ManagementClient) UpdatePipelineOrder(reqDto *dto.UpdatePipelineOrderDto) *dto.CommonResponseDto {
b, err := client.SendHttpRequest("/api/v3/update-pipeline-order", fasthttp.MethodPost, reqDto)
@@ -6201,10 +10346,10 @@ func (client *ManagementClient) UpdatePipelineOrder(reqDto *dto.UpdatePipelineOr
}
/*
- * @summary 删除 Pipeline 函数
- * @description 删除 Pipeline 函数
- * @param requestBody
- * @returns CommonResponseDto
+* @summary 删除 Pipeline 函数
+* @description 删除 Pipeline 函数
+* @param requestBody
+* @returns CommonResponseDto
*/
func (client *ManagementClient) DeletePipelineFunction(reqDto *dto.DeletePipelineFunctionDto) *dto.CommonResponseDto {
b, err := client.SendHttpRequest("/api/v3/delete-pipeline-function", fasthttp.MethodPost, reqDto)
@@ -6222,9 +10367,9 @@ func (client *ManagementClient) DeletePipelineFunction(reqDto *dto.DeletePipelin
}
/*
- * @summary 获取 Pipeline 函数列表
- * @description 获取 Pipeline 函数列表
- * @param scene 通过函数的触发场景进行筛选(可选,默认返回所有):
+ * @summary 获取 Pipeline 函数列表
+ * @description 获取 Pipeline 函数列表
+ * @param scene 通过函数的触发场景进行筛选(可选,默认返回所有):
* - `PRE_REGISTER`: 注册前
* - `POST_REGISTER`: 注册后
* - `PRE_AUTHENTICATION`: 认证前
@@ -6233,8 +10378,8 @@ func (client *ManagementClient) DeletePipelineFunction(reqDto *dto.DeletePipelin
* - `PRE_OIDC_ACCESS_TOKEN_ISSUED`: OIDC Access Token 签发前
* - `PRE_COMPLETE_USER_INFO`: 补全用户信息前
*
- * @returns PipelineFunctionPaginatedRespDto
- */
+ * @returns PipelineFunctionPaginatedRespDto
+*/
func (client *ManagementClient) ListPipelineFunctions(reqDto *dto.ListPipelineFunctionsDto) *dto.PipelineFunctionPaginatedRespDto {
b, err := client.SendHttpRequest("/api/v3/list-pipeline-functions", fasthttp.MethodGet, reqDto)
var response dto.PipelineFunctionPaginatedRespDto
@@ -6251,12 +10396,12 @@ func (client *ManagementClient) ListPipelineFunctions(reqDto *dto.ListPipelineFu
}
/*
- * @summary 获取 Pipeline 日志
- * @description 获取 Pipeline
- * @param funcId Pipeline 函数 ID
- * @param page 当前页数,从 1 开始
- * @param limit 每页数目,最大不能超过 50,默认为 10
- * @returns PipelineFunctionPaginatedRespDto
+* @summary 获取 Pipeline 日志
+* @description 获取 Pipeline
+* @param funcId Pipeline 函数 ID
+* @param page 当前页数,从 1 开始
+* @param limit 每页数目,最大不能超过 50,默认为 10
+* @returns PipelineFunctionPaginatedRespDto
*/
func (client *ManagementClient) GetPipelineLogs(reqDto *dto.GetPipelineLogsDto) *dto.PipelineFunctionPaginatedRespDto {
b, err := client.SendHttpRequest("/api/v3/get-pipeline-logs", fasthttp.MethodGet, reqDto)
@@ -6274,10 +10419,10 @@ func (client *ManagementClient) GetPipelineLogs(reqDto *dto.GetPipelineLogsDto)
}
/*
- * @summary 创建 Webhook
- * @description 你需要指定 Webhook 名称、Webhook 回调地址、请求数据格式、用户真实名称来创建 Webhook。还可选是否启用、请求密钥进行创建
- * @param requestBody
- * @returns CreateWebhookRespDto
+* @summary 创建 Webhook
+* @description 你需要指定 Webhook 名称、Webhook 回调地址、请求数据格式、用户真实名称来创建 Webhook。还可选是否启用、请求密钥进行创建
+* @param requestBody
+* @returns CreateWebhookRespDto
*/
func (client *ManagementClient) CreateWebhook(reqDto *dto.CreateWebhookDto) *dto.CreateWebhookRespDto {
b, err := client.SendHttpRequest("/api/v3/create-webhook", fasthttp.MethodPost, reqDto)
@@ -6295,11 +10440,11 @@ func (client *ManagementClient) CreateWebhook(reqDto *dto.CreateWebhookDto) *dto
}
/*
- * @summary 获取 Webhook 列表
- * @description 获取 Webhook 列表,可选页数、分页大小来获取
- * @param page 当前页数,从 1 开始
- * @param limit 每页数目,最大不能超过 50,默认为 10
- * @returns GetWebhooksRespDto
+* @summary 获取 Webhook 列表
+* @description 获取 Webhook 列表,可选页数、分页大小来获取
+* @param page 当前页数,从 1 开始
+* @param limit 每页数目,最大不能超过 50,默认为 10
+* @returns GetWebhooksRespDto
*/
func (client *ManagementClient) ListWebhooks(reqDto *dto.ListWebhooksDto) *dto.GetWebhooksRespDto {
b, err := client.SendHttpRequest("/api/v3/list-webhooks", fasthttp.MethodGet, reqDto)
@@ -6317,10 +10462,10 @@ func (client *ManagementClient) ListWebhooks(reqDto *dto.ListWebhooksDto) *dto.G
}
/*
- * @summary 修改 Webhook 配置
- * @description 需要指定 webhookId,可选 Webhook 名称、Webhook 回调地址、请求数据格式、用户真实名称、是否启用、请求密钥参数进行修改 webhook
- * @param requestBody
- * @returns UpdateWebhooksRespDto
+* @summary 修改 Webhook 配置
+* @description 需要指定 webhookId,可选 Webhook 名称、Webhook 回调地址、请求数据格式、用户真实名称、是否启用、请求密钥参数进行修改 webhook
+* @param requestBody
+* @returns UpdateWebhooksRespDto
*/
func (client *ManagementClient) UpdateWebhook(reqDto *dto.UpdateWebhookDto) *dto.UpdateWebhooksRespDto {
b, err := client.SendHttpRequest("/api/v3/update-webhook", fasthttp.MethodPost, reqDto)
@@ -6338,10 +10483,10 @@ func (client *ManagementClient) UpdateWebhook(reqDto *dto.UpdateWebhookDto) *dto
}
/*
- * @summary 删除 Webhook
- * @description 通过指定多个 webhookId,以数组的形式进行 webhook 的删除,如果 webhookId 不存在,不提示报错
- * @param requestBody
- * @returns DeleteWebhookRespDto
+* @summary 删除 Webhook
+* @description 通过指定多个 webhookId,以数组的形式进行 webhook 的删除,如果 webhookId 不存在,不提示报错
+* @param requestBody
+* @returns DeleteWebhookRespDto
*/
func (client *ManagementClient) DeleteWebhook(reqDto *dto.DeleteWebhookDto) *dto.DeleteWebhookRespDto {
b, err := client.SendHttpRequest("/api/v3/delete-webhook", fasthttp.MethodPost, reqDto)
@@ -6359,10 +10504,10 @@ func (client *ManagementClient) DeleteWebhook(reqDto *dto.DeleteWebhookDto) *dto
}
/*
- * @summary 获取 Webhook 日志
- * @description 通过指定 webhookId,可选 page 和 limit 来获取 webhook 日志,如果 webhookId 不存在,不返回报错信息
- * @param requestBody
- * @returns ListWebhookLogsRespDto
+* @summary 获取 Webhook 日志
+* @description 通过指定 webhookId,可选 page 和 limit 来获取 webhook 日志,如果 webhookId 不存在,不返回报错信息
+* @param requestBody
+* @returns ListWebhookLogsRespDto
*/
func (client *ManagementClient) GetWebhookLogs(reqDto *dto.ListWebhookLogs) *dto.ListWebhookLogsRespDto {
b, err := client.SendHttpRequest("/api/v3/get-webhook-logs", fasthttp.MethodPost, reqDto)
@@ -6380,10 +10525,10 @@ func (client *ManagementClient) GetWebhookLogs(reqDto *dto.ListWebhookLogs) *dto
}
/*
- * @summary 手动触发 Webhook 执行
- * @description 通过指定 webhookId,可选请求头和请求体进行手动触发 webhook 执行
- * @param requestBody
- * @returns TriggerWebhookRespDto
+* @summary 手动触发 Webhook 执行
+* @description 通过指定 webhookId,可选请求头和请求体进行手动触发 webhook 执行
+* @param requestBody
+* @returns TriggerWebhookRespDto
*/
func (client *ManagementClient) TriggerWebhook(reqDto *dto.TriggerWebhookDto) *dto.TriggerWebhookRespDto {
b, err := client.SendHttpRequest("/api/v3/trigger-webhook", fasthttp.MethodPost, reqDto)
@@ -6401,10 +10546,10 @@ func (client *ManagementClient) TriggerWebhook(reqDto *dto.TriggerWebhookDto) *d
}
/*
- * @summary 获取 Webhook 详情
- * @description 根据指定的 webhookId 获取 webhook 详情
- * @param webhookId Webhook ID
- * @returns GetWebhookRespDto
+* @summary 获取 Webhook 详情
+* @description 根据指定的 webhookId 获取 webhook 详情
+* @param webhookId Webhook ID
+* @returns GetWebhookRespDto
*/
func (client *ManagementClient) GetWebhook(reqDto *dto.GetWebhookDto) *dto.GetWebhookRespDto {
b, err := client.SendHttpRequest("/api/v3/get-webhook", fasthttp.MethodGet, reqDto)
@@ -6422,9 +10567,9 @@ func (client *ManagementClient) GetWebhook(reqDto *dto.GetWebhookDto) *dto.GetWe
}
/*
- * @summary 获取 Webhook 事件列表
- * @description 返回事件列表和分类列表
- * @returns WebhookEventListRespDto
+* @summary 获取 Webhook 事件列表
+* @description 返回事件列表和分类列表
+* @returns WebhookEventListRespDto
*/
func (client *ManagementClient) GetWebhookEventList() *dto.WebhookEventListRespDto {
b, err := client.SendHttpRequest("/api/v3/get-webhook-event-list", fasthttp.MethodGet, nil)
@@ -6442,13 +10587,168 @@ func (client *ManagementClient) GetWebhookEventList() *dto.WebhookEventListRespD
}
/*
- * @summary 获取协作管理员 AK/SK 列表
- * @description 根据协作管理员 Id 获取协作管理员下所有的 AK/SK 列表
- * @param userId 密钥所属用户 ID
- * @param tenantId 密钥所属租户 ID
- * @param type 密钥类型
- * @param status AccessKey 状态,activated:已激活,staging:分级(可轮换),revoked:已撤销
- * @returns ListAccessKeyResponseDto
+* @summary 生成 LDAP Server 管理员密码
+* @description 生成 LDAP Server 管理员密码
+* @returns LdapGetBindPwdRespDto
+ */
+func (client *ManagementClient) GetBindPwd() *dto.LdapGetBindPwdRespDto {
+ b, err := client.SendHttpRequest("/api/v3/get-ldap-server-random-pwd", fasthttp.MethodGet, nil)
+ var response dto.LdapGetBindPwdRespDto
+ if err != nil {
+ fmt.Println(err)
+ return nil
+ }
+ err = json.Unmarshal(b, &response)
+ if err != nil {
+ fmt.Println(err)
+ return nil
+ }
+ return &response
+}
+
+/*
+* @summary 获取 LDAP server 配置信息
+* @description 获取 LDAP server 配置信息
+* @returns LdapConfigInfoRespDto
+ */
+func (client *ManagementClient) QueryLdapConfigInfo() *dto.LdapConfigInfoRespDto {
+ b, err := client.SendHttpRequest("/api/v3/get-ldap-server-config", fasthttp.MethodGet, nil)
+ var response dto.LdapConfigInfoRespDto
+ if err != nil {
+ fmt.Println(err)
+ return nil
+ }
+ err = json.Unmarshal(b, &response)
+ if err != nil {
+ fmt.Println(err)
+ return nil
+ }
+ return &response
+}
+
+/*
+* @summary 更新 LDAP server 配置信息
+* @description 更新 LDAP server 配置信息
+* @param requestBody
+* @returns LdapOperateRespDto
+ */
+func (client *ManagementClient) UpdateLdapConfigInfo(reqDto *dto.LdapUpdateDto) *dto.LdapOperateRespDto {
+ b, err := client.SendHttpRequest("/api/v3/update-ldap-server-config", fasthttp.MethodPost, reqDto)
+ var response dto.LdapOperateRespDto
+ if err != nil {
+ fmt.Println(err)
+ return nil
+ }
+ err = json.Unmarshal(b, &response)
+ if err != nil {
+ fmt.Println(err)
+ return nil
+ }
+ return &response
+}
+
+/*
+* @summary 初始化/重启 LDAP server
+* @description 初始化/重启 LDAP server
+* @param requestBody
+* @returns LdapOperateRespDto
+ */
+func (client *ManagementClient) SaveLdapConfigInfo(reqDto *dto.LdapSaveDto) *dto.LdapOperateRespDto {
+ b, err := client.SendHttpRequest("/api/v3/enable-ldap-server", fasthttp.MethodPost, reqDto)
+ var response dto.LdapOperateRespDto
+ if err != nil {
+ fmt.Println(err)
+ return nil
+ }
+ err = json.Unmarshal(b, &response)
+ if err != nil {
+ fmt.Println(err)
+ return nil
+ }
+ return &response
+}
+
+/*
+* @summary 关闭 LDAP server 服务,关闭前必须先初始化
+* @description 关闭 LDAP server 服务,关闭前必须先初始化
+* @param requestBody
+* @returns LdapOperateRespDto
+ */
+func (client *ManagementClient) DisableLdapServer(reqDto *dto.LdapSetEnabledFlagDto) *dto.LdapOperateRespDto {
+ b, err := client.SendHttpRequest("/api/v3/disable-ldap-server", fasthttp.MethodPost, reqDto)
+ var response dto.LdapOperateRespDto
+ if err != nil {
+ fmt.Println(err)
+ return nil
+ }
+ err = json.Unmarshal(b, &response)
+ if err != nil {
+ fmt.Println(err)
+ return nil
+ }
+ return &response
+}
+
+/*
+* @summary LDAP server 日志查询
+* @description LDAP server 日志查询
+* @param type 类型:1 访问日志,2 错误日志
+* @param page 当前页,从 1 开始
+* @param limit 每页条数
+* @param connection 连接标识
+* @param operationNumber 操作码
+* @param errorCode 错误码
+* @param message 消息内容
+* @param startTime 开始时间-时间戳
+* @param endTime 结束时间-时间戳
+* @returns LdapLogRespDto
+ */
+func (client *ManagementClient) QueryLdapLog(reqDto *dto.GetLdapServerLogDto) *dto.LdapLogRespDto {
+ b, err := client.SendHttpRequest("/api/v3/get-ldap-server-log", fasthttp.MethodGet, reqDto)
+ var response dto.LdapLogRespDto
+ if err != nil {
+ fmt.Println(err)
+ return nil
+ }
+ err = json.Unmarshal(b, &response)
+ if err != nil {
+ fmt.Println(err)
+ return nil
+ }
+ return &response
+}
+
+/*
+* @summary LDAP server 根据 DN 查询下一级
+* @description LDAP server 根据 DN 查询下一级
+* @param page 当前页,从 1 开始
+* @param limit 每页条数
+* @param dn 当前 DN
+* @returns LdapLogRespDto
+ */
+func (client *ManagementClient) QueryLdapSubEntries(reqDto *dto.GetLdapSubEntriesDto) *dto.LdapLogRespDto {
+ b, err := client.SendHttpRequest("/api/v3/get-ldap-sub-entries", fasthttp.MethodGet, reqDto)
+ var response dto.LdapLogRespDto
+ if err != nil {
+ fmt.Println(err)
+ return nil
+ }
+ err = json.Unmarshal(b, &response)
+ if err != nil {
+ fmt.Println(err)
+ return nil
+ }
+ return &response
+}
+
+/*
+* @summary 获取协作管理员 AK/SK 列表
+* @description 根据协作管理员 Id 获取协作管理员下所有的 AK/SK 列表
+* @param userId 密钥所属用户 ID
+* @param tenantId 密钥所属租户 ID
+* @param type 密钥类型
+* @param status AccessKey 状态,activated:已激活,staging:分级(可轮换),revoked:已撤销
+* @returns ListAccessKeyResponseDto
*/
func (client *ManagementClient) GetAccessKeyList(reqDto *dto.ListAccessKeyDto) *dto.ListAccessKeyResponseDto {
b, err := client.SendHttpRequest("/api/v3/list-access-key", fasthttp.MethodGet, reqDto)
@@ -6466,11 +10766,11 @@ func (client *ManagementClient) GetAccessKeyList(reqDto *dto.ListAccessKeyDto) *
}
/*
- * @summary 获取协作管理员 AK/SK 详细信息
- * @description 获取协作管理员 AK/SK 详细信息,根据协作管理员 ID 和 accessKeyId 获取对应 AK/SK 的详细信息。
- * @param userId 用户 ID
- * @param accessKeyId accessKeyId
- * @returns GetAccessKeyResponseDto
+* @summary 获取协作管理员 AK/SK 详细信息
+* @description 获取协作管理员 AK/SK 详细信息,根据协作管理员 ID 和 accessKeyId 获取对应 AK/SK 的详细信息。
+* @param userId 用户 ID
+* @param accessKeyId accessKeyId
+* @returns GetAccessKeyResponseDto
*/
func (client *ManagementClient) GetAccessKey(reqDto *dto.GetAccessKeyDto) *dto.GetAccessKeyResponseDto {
b, err := client.SendHttpRequest("/api/v3/get-access-key", fasthttp.MethodGet, reqDto)
@@ -6488,10 +10788,10 @@ func (client *ManagementClient) GetAccessKey(reqDto *dto.GetAccessKeyDto) *dto.G
}
/*
- * @summary 创建协作管理员的 AK/SK
- * @description 创建协作管理员的 AK/SK,根据协作管理员 ID 生成指定的 AK/SK。
- * @param requestBody
- * @returns CreateAccessKeyResponseDto
+* @summary 创建协作管理员的 AK/SK
+* @description 创建协作管理员的 AK/SK,根据协作管理员 ID 生成指定的 AK/SK。
+* @param requestBody
+* @returns CreateAccessKeyResponseDto
*/
func (client *ManagementClient) CreateAccessKey(reqDto *dto.CreateAccessKeyDto) *dto.CreateAccessKeyResponseDto {
b, err := client.SendHttpRequest("/api/v3/create-access-key", fasthttp.MethodPost, reqDto)
@@ -6509,10 +10809,10 @@ func (client *ManagementClient) CreateAccessKey(reqDto *dto.CreateAccessKeyDto)
}
/*
- * @summary 删除协作管理员的 AK/SK
- * @description 删除协作管理员的 AK/SK,根据所选择的 AK/SK 的 accessKeyId 进行指定删除。
- * @param requestBody
- * @returns CommonResponseDto
+* @summary 删除协作管理员的 AK/SK
+* @description 删除协作管理员的 AK/SK,根据所选择的 AK/SK 的 accessKeyId 进行指定删除。
+* @param requestBody
+* @returns CommonResponseDto
*/
func (client *ManagementClient) DeleteAccessKey(reqDto *dto.DeleteAccessKeyDto) *dto.CommonResponseDto {
b, err := client.SendHttpRequest("/api/v3/delete-access-key", fasthttp.MethodPost, reqDto)
@@ -6530,10 +10830,10 @@ func (client *ManagementClient) DeleteAccessKey(reqDto *dto.DeleteAccessKeyDto)
}
/*
- * @summary 更新一个管理员 AccessKey
- * @description 根据 AccessKeyId 更新一个管理员 AccessKey,目前只支持更新 status,status 支持 activated / revoked
- * @param requestBody
- * @returns IsSuccessRespDto
+* @summary 更新一个管理员 AccessKey
+* @description 根据 AccessKeyId 更新一个管理员 AccessKey,目前只支持更新 status,status 支持 activated / revoked
+* @param requestBody
+* @returns IsSuccessRespDto
*/
func (client *ManagementClient) UpdateAccessKey(reqDto *dto.UpdateAccessKeyDto) *dto.IsSuccessRespDto {
b, err := client.SendHttpRequest("/api/v3/update-access-key", fasthttp.MethodPost, reqDto)
@@ -6551,11 +10851,58 @@ func (client *ManagementClient) UpdateAccessKey(reqDto *dto.UpdateAccessKeyDto)
}
/*
- * @summary 事件发布
- * @description 根据事件编码发布一个自定义事件
- * @param eventCode 事件编码
- * @param body 事件消息
- * @returns IsSuccessRespDto
+* @summary 获取 verify-config 配置
+* @description 获取 verify-config 配置
+* @returns VerifyConfigInfoRespDto
+ */
+func (client *ManagementClient) GetVerifyConfig() *dto.VerifyConfigInfoRespDto {
+ b, err := client.SendHttpRequest("/api/v3/verify-config", fasthttp.MethodGet, nil)
+ var response dto.VerifyConfigInfoRespDto
+ if err != nil {
+ fmt.Println(err)
+ return nil
+ }
+ err = json.Unmarshal(b, &response)
+ if err != nil {
+ fmt.Println(err)
+ return nil
+ }
+ return &response
+}
+
+/*
+* @summary 修改 verify-config 配置
+* @description 修改 verify-config 配置
+* @param requestBody
+* @returns VerifyConfigDataDto
+ */
+/*
+* @summary 获取 verify-config-app 列表
+* @description 获取 verify-config-app 列表
+* @param keywords 搜索关键字
+* @returns ApplicationDto
+ */
+func (client *ManagementClient) GetVerifyConfigApp(reqDto *dto.VerifyConfigAppDto) *dto.ApplicationDto {
+ b, err := client.SendHttpRequest("/api/v3/verify-config-app", fasthttp.MethodGet, reqDto)
+ var response dto.ApplicationDto
+ if err != nil {
+ fmt.Println(err)
+ return nil
+ }
+ err = json.Unmarshal(b, &response)
+ if err != nil {
+ fmt.Println(err)
+ return nil
+ }
+ return &response
+}
+
+/*
+* @summary 事件发布
+* @description 根据事件编码发布一个自定义事件
+* @param eventCode 事件编码
+* @param body 事件消息
+* @returns IsSuccessRespDto
*/
func (client *ManagementClient) PubEvent(eventCode string, data interface{}) *dto.IsSuccessRespDto {
var reqDto = dto.NewEventReqDto(eventCode, data)
@@ -6574,11 +10921,11 @@ func (client *ManagementClient) PubEvent(eventCode string, data interface{}) *dt
}
/*
- * @summary 事件订阅
- * @description 根据事件编码订阅一个自定义事件
- * @param eventCode 事件编码
- * @param onSuccess 成功的消息
- * @param onError 失败处理
+* @summary 事件订阅
+* @description 根据事件编码订阅一个自定义事件
+* @param eventCode 事件编码
+* @param onSuccess 成功的消息
+* @param onError 失败处理
*/
func (client *ManagementClient) SubEvent(eventCode string, onSuccess func(msg []byte), onError func(err error)) {
var options = client.options
@@ -6595,10 +10942,10 @@ func (client *ManagementClient) SubEvent(eventCode string, onSuccess func(msg []
}
/*
- * @summary 事件订阅
- * @description 根据事件编码订阅一个自定义事件
- * @param eventCode 事件编码
- * @param receiver 消息处理器
+* @summary 事件订阅
+* @description 根据事件编码订阅一个自定义事件
+* @param eventCode 事件编码
+* @param receiver 消息处理器
*/
func (client *ManagementClient) SubEventByReceiver(eventCode string, receiver util.EventReceiver) {
client.SubEvent(eventCode, receiver.OnSuccess, receiver.OnError)
diff --git a/management/management_client_test.go b/management/management_client_test.go
index 51b2a9f..b315e8c 100644
--- a/management/management_client_test.go
+++ b/management/management_client_test.go
@@ -13,9 +13,9 @@ func init() {
//AccessKeyId: "YOUR_ACCESS_KEY_ID",
//AccessKeySecret: "YOUR_ACCESS_KEY_SECRET",
//Host: "YOUR_HOST",
- AccessKeyId: "",
- AccessKeySecret: "",
- Host: "https://.authing.cn/",
+ AccessKeyId: "6536110be436e5c4254b7621",
+ AccessKeySecret: "f0b6bc038c53fcb6b362ed1087eb36d0",
+ Host: "http://localhost:3888",
//WssHost: "ws://127.0.0.1:88",
//ReadTimeout: 5 * time.Second,
}
@@ -32,7 +32,7 @@ func TestClient_ListUsers(t *testing.T) {
request := dto.ListUsersRequestDto{
Options: dto.ListUsersOptionsDto{
Pagination: dto.PaginationDto{
- Page: 2,
+ Page: 1,
Limit: 10,
},
},
@@ -130,11 +130,14 @@ func TestClient_GetUser(t *testing.T) {
}
func TestClient_GetUserBatch(t *testing.T) {
+ userIds := []string{"6536110de75e505de7effd76", "6536110de75e505de7effd71"}
request := dto.GetUserBatchDto{
- UserIds: "611a149db64310ca4764ab15,61bc4e94fc5809256b7c0333",
+ //UserIds: "6536110de75e505de7effd76",
+ UserIds: userIds,
WithCustomData: false,
WithIdentities: false,
WithDepartmentIds: false,
+ UserIdType: "user_id",
}
response := client.GetUserBatch(&request)
fmt.Println(response)
@@ -323,15 +326,15 @@ func TestClient_DeleteDepartment(t *testing.T) {
}
-func TestClient_GetResourcesBatch(t *testing.T) {
- request := dto.GetResourcesBatchDto{
- CodeList: "codeList_1627",
- Namespace: "namespace_2983",
- }
- response := client.GetResourcesBatch(&request)
- fmt.Println(response)
-
-}
+//func TestClient_GetResourcesBatch(t *testing.T) {
+// request := dto.GetResourcesBatchDto{
+// CodeList: "codeList_1627",
+// Namespace: "namespace_2983",
+// }
+// response := client.GetResourcesBatch(&request)
+// fmt.Println(response)
+//
+//}
func TestClient_CreateRole(t *testing.T) {
request := dto.CreateRoleDto{
@@ -344,14 +347,14 @@ func TestClient_CreateRole(t *testing.T) {
}
-func TestClient_GetNamespacesBatch(t *testing.T) {
- request := dto.GetNamespacesBatchDto{
- CodeList: "codeList_1740",
- }
- response := client.GetNamespacesBatch(&request)
- fmt.Println(response)
-
-}
+//func TestClient_GetNamespacesBatch(t *testing.T) {
+// request := dto.GetNamespacesBatchDto{
+// CodeList: "codeList_1740",
+// }
+// response := client.GetNamespacesBatch(&request)
+// fmt.Println(response)
+//
+//}
func TestClient_ListResources(t *testing.T) {
request := dto.ListResourcesDto{
@@ -1166,13 +1169,13 @@ func TestClient_GetPermissionNamespace(t *testing.T) {
}
// 批量获取权限空间详情
-func TestClient_GetPermissionNamespacesBatch(t *testing.T) {
- request := dto.GetPermissionNamespacesBatchDto{
- Codes: "examplePermissionNamespace1,examplePermissionNamespace2",
- }
- response := client.GetPermissionNamespacesBatch(&request)
- fmt.Println(response)
-}
+//func TestClient_GetPermissionNamespacesBatch(t *testing.T) {
+// request := dto.GetPermissionNamespacesBatchDto{
+// Codes: "examplePermissionNamespace1,examplePermissionNamespace2",
+// }
+// response := client.GetPermissionNamespacesBatch(&request)
+// fmt.Println(response)
+//}
// 更新权限空间
func TestClient_UpdatePermissionNamespace(t *testing.T) {
@@ -1231,34 +1234,34 @@ func TestClient_ListPermissionNamespaceRoles(t *testing.T) {
}
// 创建字符串数据资源
-func TestClient_CreateStringDataResource(t *testing.T) {
- request := dto.CreateDataResourceDto{
- Actions: []string{"read", "get"},
- Struct: "test",
- Type: "STRING",
- ResourceCode: "stringResourceCode",
- ResourceName: "示例字符串数据资源",
- NamespaceCode: "exampleNewPermissionNamespace",
- Description: "示例字符串数据资源描述",
- }
- response := client.CreateDataResource(&request)
- fmt.Println(response)
-}
+//func TestClient_CreateStringDataResource(t *testing.T) {
+// request := dto.CreateDataResourceDto{
+// Actions: []string{"read", "get"},
+// Struct: "test",
+// Type: "STRING",
+// ResourceCode: "stringResourceCode",
+// ResourceName: "示例字符串数据资源",
+// NamespaceCode: "exampleNewPermissionNamespace",
+// Description: "示例字符串数据资源描述",
+// }
+// response := client.CreateDataResource(&request)
+// fmt.Println(response)
+//}
// 创建数组数据资源
-func TestClient_CreateArrayDataResource(t *testing.T) {
- request := dto.CreateDataResourceDto{
- Actions: []string{"read", "get"},
- Struct: []string{"exampleArrayStruct1", "exampleArrayStruct2"},
- Type: "ARRAY",
- ResourceCode: "arrayResourceCode1",
- ResourceName: "示例数组数据资源1",
- NamespaceCode: "examplePermissionNamespace",
- Description: "示例数组数据资源描述",
- }
- response := client.CreateDataResource(&request)
- fmt.Println(response)
-}
+//func TestClient_CreateArrayDataResource(t *testing.T) {
+// request := dto.CreateDataResourceDto{
+// Actions: []string{"read", "get"},
+// Struct: []string{"exampleArrayStruct1", "exampleArrayStruct2"},
+// Type: "ARRAY",
+// ResourceCode: "arrayResourceCode1",
+// ResourceName: "示例数组数据资源1",
+// NamespaceCode: "examplePermissionNamespace",
+// Description: "示例数组数据资源描述",
+// }
+// response := client.CreateDataResource(&request)
+// fmt.Println(response)
+//}
// 创建数数据资源
func TestClient_CreateTreeDataResource(t *testing.T) {
@@ -1380,18 +1383,18 @@ func TestClient_DeleteDataResource(t *testing.T) {
}
// 更新数据资源
-func TestClient_UpdateDataResource(t *testing.T) {
- request := dto.UpdateDataResourceDto{
- ResourceCode: "stringResourceCode",
- ResourceName: "示例新字符串数据资源",
- NamespaceCode: "examplePermissionNamespace",
- Description: "示例数据资源新描述",
- Actions: []string{"read", "get", "update"},
- Struct: "test",
- }
- response := client.UpdateDataResource(&request)
- fmt.Println(response)
-}
+//func TestClient_UpdateDataResource(t *testing.T) {
+// request := dto.UpdateDataResourceDto{
+// ResourceCode: "stringResourceCode",
+// ResourceName: "示例新字符串数据资源",
+// NamespaceCode: "examplePermissionNamespace",
+// Description: "示例数据资源新描述",
+// Actions: []string{"read", "get", "update"},
+// Struct: "test",
+// }
+// response := client.UpdateDataResource(&request)
+// fmt.Println(response)
+//}
// 获取数据资源详情
func TestClient_GetDataResource(t *testing.T) {
@@ -1404,16 +1407,16 @@ func TestClient_GetDataResource(t *testing.T) {
}
// 数据资源列表
-func TestClient_ListDataResources(t *testing.T) {
- request := dto.ListDataResourcesDto{
- Page: 1,
- Limit: 10,
- Query: "stringResourceCode",
- NamespaceCodes: "examplePermissionNamespace,exampleNewPermissionNamespace",
- }
- response := client.ListDataResources(&request)
- fmt.Println(response)
-}
+//func TestClient_ListDataResources(t *testing.T) {
+// request := dto.ListDataResourcesDto{
+// Page: 1,
+// Limit: 10,
+// Query: "stringResourceCode",
+// NamespaceCodes: "examplePermissionNamespace,exampleNewPermissionNamespace",
+// }
+// response := client.ListDataResources(&request)
+// fmt.Println(response)
+//}
// 校验数据资源名称或者 code 是否有效
func TestClient_CheckDataResourceExists(t *testing.T) {
diff --git a/util/string_utils.go b/util/string_utils.go
index e19c785..34021f4 100644
--- a/util/string_utils.go
+++ b/util/string_utils.go
@@ -3,6 +3,7 @@ package util
import (
"github.com/Authing/authing-golang-sdk/v3/constant"
"math/rand"
+ "reflect"
"sort"
)
@@ -56,3 +57,13 @@ func StringContains(s []string, searchTerm string) bool {
i := sort.SearchStrings(s, searchTerm)
return i < len(s) && s[i] == searchTerm
}
+
+func IsString(value interface{}) bool {
+ _, isString := value.(string)
+ return isString
+}
+
+func IsArray(value interface{}) bool {
+ valueType := reflect.TypeOf(value)
+ return valueType.Kind() == reflect.Array || valueType.Kind() == reflect.Slice
+}