Skip to content

Commit

Permalink
feat: 组织和认证等接口新增字段
Browse files Browse the repository at this point in the history
  • Loading branch information
luojielin committed Aug 4, 2022
1 parent 2aac359 commit 56db9b2
Show file tree
Hide file tree
Showing 67 changed files with 585 additions and 273 deletions.
2 changes: 0 additions & 2 deletions dto/AccessTokenDto.go
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
package dto

type AccessTokenDto struct {
AccessToken string `json:"access_token"`
ExpiresIn int `json:"expires_in"`
}
6 changes: 6 additions & 0 deletions dto/AccessTokenResDto.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
package dto

type AccessTokenResDto struct {
AccessToken string `json:"access_token"`
ExpiresIn int `json:"expires_in"`
}
18 changes: 10 additions & 8 deletions dto/CreateDepartmentReqDto.go
Original file line number Diff line number Diff line change
@@ -1,12 +1,14 @@
package dto

type CreateDepartmentReqDto struct {
OrganizationCode string `json:"organizationCode"`
ParentDepartmentId string `json:"parentDepartmentId"`
Name string `json:"name"`
OpenDepartmentId string `json:"openDepartmentId,omitempty"`
Description string `json:"description,omitempty"`
Code string `json:"code,omitempty"`
I18n I18nDto `json:"i18n,omitempty"`
DepartmentIdType string `json:"departmentIdType,omitempty"`
ParentDepartmentId string `json:"parentDepartmentId"`
Name string `json:"name"`
OrganizationCode string `json:"organizationCode"`
OpenDepartmentId string `json:"openDepartmentId,omitempty"`
Description string `json:"description,omitempty"`
Code string `json:"code,omitempty"`
IsVirtualNode bool `json:"isVirtualNode,omitempty"`
I18n I18nDto `json:"i18n,omitempty"`
CustomData interface{} `json:"customData,omitempty"`
DepartmentIdType string `json:"departmentIdType,omitempty"`
}
9 changes: 5 additions & 4 deletions dto/CreateIdentityDto.go
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
package dto

type CreateIdentityDto struct {
ExtIdpId string `json:"extIdpId"`
Provider string `json:"provider"`
Type string `json:"type"`
UserIdInIdp string `json:"userIdInIdp"`
ExtIdpId string `json:"extIdpId"`
Provider string `json:"provider"`
Type string `json:"type"`
UserIdInIdp string `json:"userIdInIdp"`
OriginConnIds []string `json:"originConnIds"`
}
8 changes: 5 additions & 3 deletions dto/CreateUserOptionsDto.go
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@
package dto

type CreateUserOptionsDto struct {
KeepPassword bool `json:"keepPassword,omitempty"`
ResetPasswordOnFirstLogin bool `json:"resetPasswordOnFirstLogin,omitempty"`
DepartmentIdType string `json:"departmentIdType,omitempty"`
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"`
}
2 changes: 1 addition & 1 deletion dto/DeleteDepartmentReqDto.go
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package dto

type DeleteDepartmentReqDto struct {
OrganizationCode string `json:"organizationCode"`
DepartmentId string `json:"departmentId"`
OrganizationCode string `json:"organizationCode"`
DepartmentIdType string `json:"departmentIdType,omitempty"`
}
3 changes: 2 additions & 1 deletion dto/DeleteUsersBatchDto.go
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
package dto

type DeleteUsersBatchDto struct {
UserIds []string `json:"userIds"`
UserIds []string `json:"userIds"`
Options DeleteUsersBatchOptionsDto `json:"options,omitempty"`
}
5 changes: 5 additions & 0 deletions dto/DeleteUsersBatchOptionsDto.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
package dto

type DeleteUsersBatchOptionsDto struct {
UserIdType string `json:"userIdType,omitempty"`
}
24 changes: 14 additions & 10 deletions dto/DepartmentDto.go
Original file line number Diff line number Diff line change
@@ -1,14 +1,18 @@
package dto

type DepartmentDto struct {
DepartmentId string `json:"departmentId"`
OpenDepartmentId string `json:"openDepartmentId,omitempty"`
Name string `json:"name"`
LeaderUserIds []string `json:"leaderUserIds,omitempty"`
Description string `json:"description,omitempty"`
ParentDepartmentId string `json:"parentDepartmentId"`
Code string `json:"code,omitempty"`
MembersCount int `json:"membersCount"`
HasChildren bool `json:"hasChildren"`
I18n I18nDto `json:"i18n,omitempty"`
OrganizationCode string `json:"organizationCode"`
DepartmentId string `json:"departmentId"`
CreatedAt string `json:"createdAt"`
OpenDepartmentId string `json:"openDepartmentId,omitempty"`
Name string `json:"name"`
LeaderUserIds []string `json:"leaderUserIds,omitempty"`
Description string `json:"description,omitempty"`
ParentDepartmentId string `json:"parentDepartmentId"`
Code string `json:"code,omitempty"`
MembersCount int `json:"membersCount"`
HasChildren bool `json:"hasChildren"`
IsVirtualNode bool `json:"isVirtualNode,omitempty"`
I18n I18nDto `json:"i18n,omitempty"`
CustomData interface{} `json:"customData,omitempty"`
}
1 change: 1 addition & 0 deletions dto/GetAuthorizedResourcesDto.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,5 +5,6 @@ type GetAuthorizedResourcesDto struct {
TargetIdentifier string `json:"targetIdentifier,omitempty"`
Namespace string `json:"namespace,omitempty"`
ResourceType string `json:"resourceType,omitempty"`
ResourceList string `json:"resourceList,omitempty"`
WithDenied bool `json:"withDenied,omitempty"`
}
2 changes: 2 additions & 0 deletions dto/GetDepartmentDto.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,5 +3,7 @@ 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"`
}
8 changes: 4 additions & 4 deletions dto/GetManagementTokenRespDto.go
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
package dto

type GetManagementTokenRespDto struct {
StatusCode int `json:"statusCode"`
Message string `json:"message"`
ApiCode int `json:"apiCode,omitempty"`
Data AccessTokenDto `json:"data"`
StatusCode int `json:"statusCode"`
Message string `json:"message"`
ApiCode int `json:"apiCode,omitempty"`
Data AccessTokenResDto `json:"data"`
}
1 change: 1 addition & 0 deletions dto/GetParentDepartmentDto.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,5 @@ type GetParentDepartmentDto struct {
OrganizationCode string `json:"organizationCode,omitempty"`
DepartmentId string `json:"departmentId,omitempty"`
DepartmentIdType string `json:"departmentIdType,omitempty"`
WithCustomData bool `json:"withCustomData,omitempty"`
}
3 changes: 2 additions & 1 deletion dto/GetUserAccessibleAppsDto.go
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
package dto

type GetUserAccessibleAppsDto struct {
UserId string `json:"userId,omitempty"`
UserId string `json:"userId,omitempty"`
UserIdType string `json:"userIdType,omitempty"`
}
3 changes: 2 additions & 1 deletion dto/GetUserAuthorizedAppsDto.go
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
package dto

type GetUserAuthorizedAppsDto struct {
UserId string `json:"userId,omitempty"`
UserId string `json:"userId,omitempty"`
UserIdType string `json:"userIdType,omitempty"`
}
1 change: 1 addition & 0 deletions dto/GetUserAuthorizedResourcesDto.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ package dto

type GetUserAuthorizedResourcesDto struct {
UserId string `json:"userId,omitempty"`
UserIdType string `json:"userIdType,omitempty"`
Namespace string `json:"namespace,omitempty"`
ResourceType string `json:"resourceType,omitempty"`
}
1 change: 1 addition & 0 deletions dto/GetUserBatchDto.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ package dto

type GetUserBatchDto struct {
UserIds string `json:"userIds,omitempty"`
UserIdType string `json:"userIdType,omitempty"`
WithCustomData bool `json:"withCustomData,omitempty"`
WithIdentities bool `json:"withIdentities,omitempty"`
WithDepartmentIds bool `json:"withDepartmentIds,omitempty"`
Expand Down
8 changes: 7 additions & 1 deletion dto/GetUserDepartmentsDto.go
Original file line number Diff line number Diff line change
@@ -1,5 +1,11 @@
package dto

type GetUserDepartmentsDto struct {
UserId string `json:"userId,omitempty"`
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"`
SortBy string `json:"sortBy,omitempty"`
OrderBy string `json:"orderBy,omitempty"`
}
5 changes: 1 addition & 4 deletions dto/GetUserDto.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,8 @@ package dto

type GetUserDto struct {
UserId string `json:"userId,omitempty"`
UserIdType string `json:"userIdType,omitempty"`
WithCustomData bool `json:"withCustomData,omitempty"`
WithIdentities bool `json:"withIdentities,omitempty"`
WithDepartmentIds bool `json:"withDepartmentIds,omitempty"`
Phone string `json:"phone,omitempty"`
Email string `json:"email,omitempty"`
Username string `json:"username,omitempty"`
ExternalId string `json:"externalId,omitempty"`
}
3 changes: 2 additions & 1 deletion dto/GetUserGroupsDto.go
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
package dto

type GetUserGroupsDto struct {
UserId string `json:"userId,omitempty"`
UserId string `json:"userId,omitempty"`
UserIdType string `json:"userIdType,omitempty"`
}
3 changes: 2 additions & 1 deletion dto/GetUserIdentitiesDto.go
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
package dto

type GetUserIdentitiesDto struct {
UserId string `json:"userId,omitempty"`
UserId string `json:"userId,omitempty"`
UserIdType string `json:"userIdType,omitempty"`
}
3 changes: 2 additions & 1 deletion dto/GetUserLoggedInIdentitiesDto.go
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
package dto

type GetUserLoggedInIdentitiesDto struct {
UserId string `json:"userId,omitempty"`
UserId string `json:"userId,omitempty"`
UserIdType string `json:"userIdType,omitempty"`
}
3 changes: 2 additions & 1 deletion dto/GetUserLoggedinAppsDto.go
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
package dto

type GetUserLoggedinAppsDto struct {
UserId string `json:"userId,omitempty"`
UserId string `json:"userId,omitempty"`
UserIdType string `json:"userIdType,omitempty"`
}
15 changes: 8 additions & 7 deletions dto/GetUserLoginHistoryDto.go
Original file line number Diff line number Diff line change
@@ -1,11 +1,12 @@
package dto

type GetUserLoginHistoryDto struct {
UserId string `json:"userId,omitempty"`
AppId string `json:"appId,omitempty"`
ClientIp string `json:"clientIp,omitempty"`
Start int `json:"start,omitempty"`
End int `json:"end,omitempty"`
Page int `json:"page,omitempty"`
Limit int `json:"limit,omitempty"`
UserId string `json:"userId,omitempty"`
UserIdType string `json:"userIdType,omitempty"`
AppId string `json:"appId,omitempty"`
ClientIp string `json:"clientIp,omitempty"`
Start int `json:"start,omitempty"`
End int `json:"end,omitempty"`
Page int `json:"page,omitempty"`
Limit int `json:"limit,omitempty"`
}
3 changes: 2 additions & 1 deletion dto/GetUserMfaInfoDto.go
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
package dto

type GetUserMfaInfoDto struct {
UserId string `json:"userId,omitempty"`
UserId string `json:"userId,omitempty"`
UserIdType string `json:"userIdType,omitempty"`
}
3 changes: 2 additions & 1 deletion dto/GetUserPrincipalAuthenticationInfoDto.go
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
package dto

type GetUserPrincipalAuthenticationInfoDto struct {
UserId string `json:"userId,omitempty"`
UserId string `json:"userId,omitempty"`
UserIdType string `json:"userIdType,omitempty"`
}
5 changes: 3 additions & 2 deletions dto/GetUserRolesDto.go
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
package dto

type GetUserRolesDto struct {
UserId string `json:"userId,omitempty"`
Namespace string `json:"namespace,omitempty"`
UserId string `json:"userId,omitempty"`
UserIdType string `json:"userIdType,omitempty"`
Namespace string `json:"namespace,omitempty"`
}
5 changes: 5 additions & 0 deletions dto/HasAnyRoleOptionsDto.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
package dto

type HasAnyRoleOptionsDto struct {
UserIdType string `json:"userIdType,omitempty"`
}
5 changes: 3 additions & 2 deletions dto/HasAnyRoleReqDto.go
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
package dto

type HasAnyRoleReqDto struct {
Roles []HasRoleRolesDto `json:"roles"`
UserId string `json:"userId"`
Roles []HasRoleRolesDto `json:"roles"`
UserId string `json:"userId"`
Options HasAnyRoleOptionsDto `json:"options,omitempty"`
}
2 changes: 1 addition & 1 deletion dto/I18nDto.go
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
package dto

type I18nDto struct {
Name string `json:"name"`
//Name LangObject `json:"name"`
}
11 changes: 6 additions & 5 deletions dto/IdentityDto.go
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@
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"`
IdentityId string `json:"identityId"`
ExtIdpId string `json:"extIdpId"`
Provider string `json:"provider"`
Type string `json:"type"`
UserIdInIdp string `json:"userIdInIdp"`
OriginConnIds []string `json:"originConnIds"`
}
5 changes: 5 additions & 0 deletions dto/IsActionAllowedDataDto.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
package dto

type IsActionAllowedDataDto struct {
Allowed bool `json:"allowed"`
}
8 changes: 8 additions & 0 deletions dto/IsActionAllowedDto.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
package dto

type IsActionAllowedDto struct {
Action string `json:"action"`
Resource string `json:"resource"`
UserId string `json:"userId"`
Namespace string `json:"namespace,omitempty"`
}
8 changes: 8 additions & 0 deletions dto/IsActionAllowedRespDtp.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
package dto

type IsActionAllowedRespDtp struct {
StatusCode int `json:"statusCode"`
Message string `json:"message"`
ApiCode int `json:"apiCode,omitempty"`
Data IsActionAllowedDataDto `json:"data"`
}
5 changes: 5 additions & 0 deletions dto/IsUserInDepartmentDataDto.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
package dto

type IsUserInDepartmentDataDto struct {
InDepartment bool `json:"inDepartment"`
}
9 changes: 9 additions & 0 deletions dto/IsUserInDepartmentDto.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
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"`
}
8 changes: 8 additions & 0 deletions dto/IsUserInDepartmentRespDto.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
package dto

type IsUserInDepartmentRespDto struct {
StatusCode int `json:"statusCode"`
Message string `json:"message"`
ApiCode int `json:"apiCode,omitempty"`
Data IsUserInDepartmentDataDto `json:"data"`
}
5 changes: 3 additions & 2 deletions dto/KickUsersDto.go
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
package dto

type KickUsersDto struct {
AppIds []string `json:"appIds"`
UserId string `json:"userId"`
AppIds []string `json:"appIds"`
UserId string `json:"userId"`
Options KickUsersOptionsDto `json:"options,omitempty"`
}
5 changes: 5 additions & 0 deletions dto/KickUsersOptionsDto.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
package dto

type KickUsersOptionsDto struct {
UserIdType string `json:"userIdType,omitempty"`
}
6 changes: 6 additions & 0 deletions dto/LangObject.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
package dto

//type LangObject struct{
// 'zh-CN' LangUnit `json:"'zh-CN'"`
// 'en-US' LangUnit `json:"'en-US'"`
//}
Loading

0 comments on commit 56db9b2

Please sign in to comment.