diff --git a/aspnet-core/Delete-BIN-OBJ-Folders.bat b/aspnet-core/Delete-BIN-OBJ-Folders.bat new file mode 100644 index 00000000..02cfaa5e --- /dev/null +++ b/aspnet-core/Delete-BIN-OBJ-Folders.bat @@ -0,0 +1,20 @@ +@ECHO off +cls + +ECHO Deleting all BIN and OBJ folders... +ECHO. + +FOR /d /r . %%d in (bin,obj) DO ( + IF EXIST "%%d" ( + ECHO %%d | FIND /I "\node_modules\" > Nul && ( + ECHO.Skipping: %%d + ) || ( + ECHO.Deleting: %%d + rd /s/q "%%d" + ) + ) +) + +ECHO. +ECHO.BIN and OBJ folders have been successfully deleted. Press any key to exit. +pause > nul \ No newline at end of file diff --git a/aspnet-core/services/host/Lion.AbpPro.HttpApi.Host/appsettings.Staging.json b/aspnet-core/services/host/Lion.AbpPro.HttpApi.Host/appsettings.Staging.json new file mode 100644 index 00000000..2b4e393d --- /dev/null +++ b/aspnet-core/services/host/Lion.AbpPro.HttpApi.Host/appsettings.Staging.json @@ -0,0 +1,66 @@ +{ + "App": { + "SelfUrl": "http://localhost:44315", + "CorsOrigins": "https://*.AbpPro.com,http://localhost:4200,http://localhost:3100" + }, + "ConnectionStrings": { + "Default": "Data Source=120.24.194.14;Database=LionAbpProDB;uid=root;pwd=1q2w3E*;charset=utf8mb4;Allow User Variables=true;AllowLoadLocalInfile=true" + }, + "Redis": { + "Configuration": "localhost,password=mypassword,defaultdatabase=1" + }, + "Jwt": { + "Audience": "http://localhost:5010", + "SecurityKey": "dzehzRz9a8asdfasfdadfasdfasdfafsdadfasbasdf=", + "Issuer": "YHWmsOperationApiGateway", + "ExpirationTime": 30 + }, + "Cap": { + "Enabled": "true", + "RabbitMq": { + "HostName": "localhost", + "UserName": "admin", + "Password": "admin" + } + }, + "ElasticSearch": { + "Enabled": "false", + "Url": "http://es.cn", + "IndexFormat": "Lion.AbpPro.development.{0:yyyy.MM.dd}", + "UserName": "elastic", + "Password": "aVVhjQ95RP7nbwNy", + "SearchIndexFormat": "Lion.AbpPro.development*" + }, + "HttpClient": { + "Sts": { + "Name": "Sts", + "Url": "http://localhost:44354" + }, + "Github": { + "Name": "Github", + "Url": "https://github.com", + "ClientId": "127fc528f611879fba03", + "ClientSecret": "fd0914e9e8e28b51dd5efe381121429279e43973" + }, + "GithubApi": { + "Name": "GithubApi", + "Url": "https://api.github.com", + "ClientName": "AbpPro" + } + }, + "Consul": { + "Enabled": false, + "Host": "http://localhost:8500", + "Service": "Project-Service" + }, + "AliYun": { + "OSS": { + "AccessKeyId": "LTAI5tLkt3vvScGPVZ5qKJDc1S", + "AccessKeySecret": "BixV8vP5uPrbsdwjYzzsEXOPjkxPST2S", + "Endpoint": "oss-cn-shenzhen.aliyuncs.com", + "ContainerName": "lion-abp-pro", + "RegionId": "oss-cn-shenzhen", + "RoleArn": "acs:ram::1846393972471789:role/ramosstestst" + } + } +} \ No newline at end of file diff --git a/aspnet-core/services/host/Lion.AbpPro.HttpApi.Host/appsettings.json b/aspnet-core/services/host/Lion.AbpPro.HttpApi.Host/appsettings.json index e8367f87..fef601db 100644 --- a/aspnet-core/services/host/Lion.AbpPro.HttpApi.Host/appsettings.json +++ b/aspnet-core/services/host/Lion.AbpPro.HttpApi.Host/appsettings.json @@ -1,4 +1,5 @@ { + "Serilog1": "12", "Serilog": { "Using": [ "Serilog.Sinks.Console", @@ -33,7 +34,7 @@ "CorsOrigins": "https://*.AbpPro.com,http://localhost:4200,http://localhost:3100" }, "ConnectionStrings": { - "Default": "Data Source=localhost;Database=LionAbpProDB;uid=root;pwd=1q2w3E*;charset=utf8mb4;Allow User Variables=true;AllowLoadLocalInfile=true" + "Default": "Data Source=120.24.194.14;Database=LionAbpProDB;uid=root;pwd=1q2w3E*;charset=utf8mb4;Allow User Variables=true;AllowLoadLocalInfile=true" }, "Redis": { "Configuration": "localhost,password=mypassword,defaultdatabase=1" diff --git a/aspnet-core/services/src/Lion.AbpPro.Application.Contracts/OrganizationUnits/Dto/AddRoleToOrganizationUnitInput.cs b/aspnet-core/services/src/Lion.AbpPro.Application.Contracts/OrganizationUnits/Dto/AddRoleToOrganizationUnitInput.cs new file mode 100644 index 00000000..5499b839 --- /dev/null +++ b/aspnet-core/services/src/Lion.AbpPro.Application.Contracts/OrganizationUnits/Dto/AddRoleToOrganizationUnitInput.cs @@ -0,0 +1,11 @@ +using System; +using System.Collections.Generic; + +namespace Lion.AbpPro.OrganizationUnits.Dto; + +public class AddRoleToOrganizationUnitInput +{ + public List RoleId { get; set; } + + public Guid OrganizationUnitId { get; set; } +} \ No newline at end of file diff --git a/aspnet-core/services/src/Lion.AbpPro.Application.Contracts/OrganizationUnits/Dto/AddUserToOrganizationUnitInput.cs b/aspnet-core/services/src/Lion.AbpPro.Application.Contracts/OrganizationUnits/Dto/AddUserToOrganizationUnitInput.cs new file mode 100644 index 00000000..a7f7c6c9 --- /dev/null +++ b/aspnet-core/services/src/Lion.AbpPro.Application.Contracts/OrganizationUnits/Dto/AddUserToOrganizationUnitInput.cs @@ -0,0 +1,11 @@ +using System; +using System.Collections.Generic; + +namespace Lion.AbpPro.OrganizationUnits.Dto; + +public class AddUserToOrganizationUnitInput +{ + public List UserId { get; set; } + + public Guid OrganizationUnitId { get; set; } +} \ No newline at end of file diff --git a/aspnet-core/services/src/Lion.AbpPro.Application.Contracts/OrganizationUnits/Dto/CreateOrganizationUnitInput.cs b/aspnet-core/services/src/Lion.AbpPro.Application.Contracts/OrganizationUnits/Dto/CreateOrganizationUnitInput.cs new file mode 100644 index 00000000..d3707fa9 --- /dev/null +++ b/aspnet-core/services/src/Lion.AbpPro.Application.Contracts/OrganizationUnits/Dto/CreateOrganizationUnitInput.cs @@ -0,0 +1,11 @@ +using System; +using System.ComponentModel.DataAnnotations; + +namespace Lion.AbpPro.OrganizationUnits.Dto; + +public class CreateOrganizationUnitInput +{ + [Required] public string DisplayName { get; set; } + + public Guid? ParentId { get; set; } +} \ No newline at end of file diff --git a/aspnet-core/services/src/Lion.AbpPro.Application.Contracts/OrganizationUnits/Dto/GetOrganizationUnitRoleInput.cs b/aspnet-core/services/src/Lion.AbpPro.Application.Contracts/OrganizationUnits/Dto/GetOrganizationUnitRoleInput.cs new file mode 100644 index 00000000..80376390 --- /dev/null +++ b/aspnet-core/services/src/Lion.AbpPro.Application.Contracts/OrganizationUnits/Dto/GetOrganizationUnitRoleInput.cs @@ -0,0 +1,10 @@ +using System; +using Lion.AbpPro.Extension.Customs.Dtos; + +namespace Lion.AbpPro.OrganizationUnits.Dto; + +public class GetOrganizationUnitRoleInput : PagingBase +{ + public Guid OrganizationUnitId { get; set; } + +} \ No newline at end of file diff --git a/aspnet-core/services/src/Lion.AbpPro.Application.Contracts/OrganizationUnits/Dto/GetOrganizationUnitRoleOutput.cs b/aspnet-core/services/src/Lion.AbpPro.Application.Contracts/OrganizationUnits/Dto/GetOrganizationUnitRoleOutput.cs new file mode 100644 index 00000000..ce741503 --- /dev/null +++ b/aspnet-core/services/src/Lion.AbpPro.Application.Contracts/OrganizationUnits/Dto/GetOrganizationUnitRoleOutput.cs @@ -0,0 +1,11 @@ +using System; +using Lion.AbpPro.Extension.Customs.Dtos; + +namespace Lion.AbpPro.OrganizationUnits.Dto; + +public class GetOrganizationUnitRoleOutput +{ + public Guid Id { get; set; } + + public string Name { get; set; } +} \ No newline at end of file diff --git a/aspnet-core/services/src/Lion.AbpPro.Application.Contracts/OrganizationUnits/Dto/GetOrganizationUnitUserInput.cs b/aspnet-core/services/src/Lion.AbpPro.Application.Contracts/OrganizationUnits/Dto/GetOrganizationUnitUserInput.cs new file mode 100644 index 00000000..838dee23 --- /dev/null +++ b/aspnet-core/services/src/Lion.AbpPro.Application.Contracts/OrganizationUnits/Dto/GetOrganizationUnitUserInput.cs @@ -0,0 +1,11 @@ +using System; +using Lion.AbpPro.Extension.Customs.Dtos; + +namespace Lion.AbpPro.OrganizationUnits.Dto; + +public class GetOrganizationUnitUserInput : PagingBase +{ + public Guid OrganizationUnitId { get; set; } + + public string Filter { get; set; } +} \ No newline at end of file diff --git a/aspnet-core/services/src/Lion.AbpPro.Application.Contracts/OrganizationUnits/Dto/GetOrganizationUnitUserOutput.cs b/aspnet-core/services/src/Lion.AbpPro.Application.Contracts/OrganizationUnits/Dto/GetOrganizationUnitUserOutput.cs new file mode 100644 index 00000000..7ca19109 --- /dev/null +++ b/aspnet-core/services/src/Lion.AbpPro.Application.Contracts/OrganizationUnits/Dto/GetOrganizationUnitUserOutput.cs @@ -0,0 +1,13 @@ +using System; +using Lion.AbpPro.Extension.Customs.Dtos; + +namespace Lion.AbpPro.OrganizationUnits.Dto; + +public class GetOrganizationUnitUserOutput +{ + public Guid Id { get; set; } + + public string UserName { get; set; } + + public string Email { get; set; } +} \ No newline at end of file diff --git a/aspnet-core/services/src/Lion.AbpPro.Application.Contracts/OrganizationUnits/Dto/GetUnAddRoleInput.cs b/aspnet-core/services/src/Lion.AbpPro.Application.Contracts/OrganizationUnits/Dto/GetUnAddRoleInput.cs new file mode 100644 index 00000000..3c1e5c9c --- /dev/null +++ b/aspnet-core/services/src/Lion.AbpPro.Application.Contracts/OrganizationUnits/Dto/GetUnAddRoleInput.cs @@ -0,0 +1,11 @@ +using System; +using Lion.AbpPro.Extension.Customs.Dtos; + +namespace Lion.AbpPro.OrganizationUnits.Dto; + +public class GetUnAddRoleInput : PagingBase +{ + public Guid OrganizationUnitId { get; set; } + + public string Filter { get; set; } +} \ No newline at end of file diff --git a/aspnet-core/services/src/Lion.AbpPro.Application.Contracts/OrganizationUnits/Dto/GetUnAddRoleOutput.cs b/aspnet-core/services/src/Lion.AbpPro.Application.Contracts/OrganizationUnits/Dto/GetUnAddRoleOutput.cs new file mode 100644 index 00000000..7ecc5064 --- /dev/null +++ b/aspnet-core/services/src/Lion.AbpPro.Application.Contracts/OrganizationUnits/Dto/GetUnAddRoleOutput.cs @@ -0,0 +1,10 @@ +using System; + +namespace Lion.AbpPro.OrganizationUnits.Dto; + +public class GetUnAddRoleOutput +{ + public Guid Id { get; set; } + + public string Name { get; set; } +} \ No newline at end of file diff --git a/aspnet-core/services/src/Lion.AbpPro.Application.Contracts/OrganizationUnits/Dto/GetUnAddUserInput.cs b/aspnet-core/services/src/Lion.AbpPro.Application.Contracts/OrganizationUnits/Dto/GetUnAddUserInput.cs new file mode 100644 index 00000000..fd3ddf6a --- /dev/null +++ b/aspnet-core/services/src/Lion.AbpPro.Application.Contracts/OrganizationUnits/Dto/GetUnAddUserInput.cs @@ -0,0 +1,11 @@ +using System; +using Lion.AbpPro.Extension.Customs.Dtos; + +namespace Lion.AbpPro.OrganizationUnits.Dto; + +public class GetUnAddUserInput : PagingBase +{ + public Guid OrganizationUnitId { get; set; } + + public string Filter { get; set; } +} \ No newline at end of file diff --git a/aspnet-core/services/src/Lion.AbpPro.Application.Contracts/OrganizationUnits/Dto/GetUnAddUserOutput.cs b/aspnet-core/services/src/Lion.AbpPro.Application.Contracts/OrganizationUnits/Dto/GetUnAddUserOutput.cs new file mode 100644 index 00000000..075be06d --- /dev/null +++ b/aspnet-core/services/src/Lion.AbpPro.Application.Contracts/OrganizationUnits/Dto/GetUnAddUserOutput.cs @@ -0,0 +1,12 @@ +using System; + +namespace Lion.AbpPro.OrganizationUnits.Dto; + +public class GetUnAddUserOutput +{ + public Guid Id { get; set; } + + public string UserName { get; set; } + + public string Email { get; set; } +} \ No newline at end of file diff --git a/aspnet-core/services/src/Lion.AbpPro.Application.Contracts/OrganizationUnits/Dto/OrganizationUnitDto.cs b/aspnet-core/services/src/Lion.AbpPro.Application.Contracts/OrganizationUnits/Dto/OrganizationUnitDto.cs new file mode 100644 index 00000000..0d9c2cf9 --- /dev/null +++ b/aspnet-core/services/src/Lion.AbpPro.Application.Contracts/OrganizationUnits/Dto/OrganizationUnitDto.cs @@ -0,0 +1,16 @@ +using System; + +namespace Lion.AbpPro.OrganizationUnits.Dto; + +public class OrganizationUnitDto +{ + public Guid Id { get; set; } + + public Guid? TenantId { get; set; } + + public string Code { get; set; } + + public string DisplayName { get; set; } + + public Guid? ParentId { get; set; } +} \ No newline at end of file diff --git a/aspnet-core/services/src/Lion.AbpPro.Application.Contracts/OrganizationUnits/Dto/RemoveRoleToOrganizationUnitInput.cs b/aspnet-core/services/src/Lion.AbpPro.Application.Contracts/OrganizationUnits/Dto/RemoveRoleToOrganizationUnitInput.cs new file mode 100644 index 00000000..fff35537 --- /dev/null +++ b/aspnet-core/services/src/Lion.AbpPro.Application.Contracts/OrganizationUnits/Dto/RemoveRoleToOrganizationUnitInput.cs @@ -0,0 +1,10 @@ +using System; + +namespace Lion.AbpPro.OrganizationUnits.Dto; + +public class RemoveRoleToOrganizationUnitInput +{ + public Guid RoleId { get; set; } + + public Guid OrganizationUnitId { get; set; } +} \ No newline at end of file diff --git a/aspnet-core/services/src/Lion.AbpPro.Application.Contracts/OrganizationUnits/Dto/RemoveUserToOrganizationUnitInput.cs b/aspnet-core/services/src/Lion.AbpPro.Application.Contracts/OrganizationUnits/Dto/RemoveUserToOrganizationUnitInput.cs new file mode 100644 index 00000000..19b5956d --- /dev/null +++ b/aspnet-core/services/src/Lion.AbpPro.Application.Contracts/OrganizationUnits/Dto/RemoveUserToOrganizationUnitInput.cs @@ -0,0 +1,10 @@ +using System; + +namespace Lion.AbpPro.OrganizationUnits.Dto; + +public class RemoveUserToOrganizationUnitInput +{ + public Guid UserId { get; set; } + + public Guid OrganizationUnitId { get; set; } +} \ No newline at end of file diff --git a/aspnet-core/services/src/Lion.AbpPro.Application.Contracts/OrganizationUnits/Dto/TreeOutput.cs b/aspnet-core/services/src/Lion.AbpPro.Application.Contracts/OrganizationUnits/Dto/TreeOutput.cs new file mode 100644 index 00000000..856144f3 --- /dev/null +++ b/aspnet-core/services/src/Lion.AbpPro.Application.Contracts/OrganizationUnits/Dto/TreeOutput.cs @@ -0,0 +1,13 @@ +using System; +using System.Collections.Generic; + +namespace Lion.AbpPro.OrganizationUnits.Dto; + +public class TreeOutput +{ + public string Title { get; set; } + + public Guid Key { get; set; } + + public List Children { get; set; } +} \ No newline at end of file diff --git a/aspnet-core/services/src/Lion.AbpPro.Application.Contracts/OrganizationUnits/Dto/UpdateOrganizationUnitInput.cs b/aspnet-core/services/src/Lion.AbpPro.Application.Contracts/OrganizationUnits/Dto/UpdateOrganizationUnitInput.cs new file mode 100644 index 00000000..ae9e8ce3 --- /dev/null +++ b/aspnet-core/services/src/Lion.AbpPro.Application.Contracts/OrganizationUnits/Dto/UpdateOrganizationUnitInput.cs @@ -0,0 +1,11 @@ +using System; +using System.ComponentModel.DataAnnotations; + +namespace Lion.AbpPro.OrganizationUnits.Dto; + +public class UpdateOrganizationUnitInput +{ + [Required] public string DisplayName { get; set; } + + public Guid Id { get; set; } +} \ No newline at end of file diff --git a/aspnet-core/services/src/Lion.AbpPro.Application.Contracts/OrganizationUnits/IOrganizationUnitAppService.cs b/aspnet-core/services/src/Lion.AbpPro.Application.Contracts/OrganizationUnits/IOrganizationUnitAppService.cs new file mode 100644 index 00000000..badcf6e6 --- /dev/null +++ b/aspnet-core/services/src/Lion.AbpPro.Application.Contracts/OrganizationUnits/IOrganizationUnitAppService.cs @@ -0,0 +1,73 @@ +using System.Collections.Generic; +using System.Threading.Tasks; +using Lion.AbpPro.Extension.Customs.Dtos; +using Lion.AbpPro.OrganizationUnits.Dto; +using Volo.Abp.Application.Dtos; +using Volo.Abp.Application.Services; + +namespace Lion.AbpPro.OrganizationUnits; + +public interface IOrganizationUnitAppService : IApplicationService +{ + /// + /// 获取组织机构树结构 + /// + /// + Task> GetTreeAsync(); + + /// + /// 创建组织机构 + /// + Task CreateAsync(CreateOrganizationUnitInput input); + + /// + /// 删除组织机构 + /// + Task DeleteAsync(IdInput input); + + /// + /// 编辑组织机构 + /// + Task UpdateAsync(UpdateOrganizationUnitInput input); + + /// + /// 向组织机构添加角色 + /// + Task AddRoleToOrganizationUnitAsync(AddRoleToOrganizationUnitInput input); + + /// + /// 向组织机构删除角色 + /// + Task RemoveRoleFromOrganizationUnitAsync(RemoveRoleToOrganizationUnitInput input); + + /// + /// 向组织机构添加用户 + /// + Task AddUserToOrganizationUnitAsync(AddUserToOrganizationUnitInput input); + + /// + /// 向组织机构删除用户 + /// + Task RemoveUserFromOrganizationUnitAsync(RemoveUserToOrganizationUnitInput input); + + /// + /// 分页获取组织机构下用户 + /// + Task> GetUsersAsync(GetOrganizationUnitUserInput input); + + + /// + /// 分页获取组织机构下角色 + /// + Task> GetRolesAsync(GetOrganizationUnitRoleInput input); + + /// + /// 获取不在组织机构的用户 + /// + Task> GetUnAddUsersAsync(GetUnAddUserInput input); + + /// + /// 获取不在组织机构的角色 + /// + Task> GetUnAddRolessAsync(GetUnAddRoleInput input); +} \ No newline at end of file diff --git a/aspnet-core/services/src/Lion.AbpPro.Application/AbpProApplicationAutoMapperProfile.cs b/aspnet-core/services/src/Lion.AbpPro.Application/AbpProApplicationAutoMapperProfile.cs index c9dd574e..d8964450 100644 --- a/aspnet-core/services/src/Lion.AbpPro.Application/AbpProApplicationAutoMapperProfile.cs +++ b/aspnet-core/services/src/Lion.AbpPro.Application/AbpProApplicationAutoMapperProfile.cs @@ -1,4 +1,5 @@ using AutoMapper; +using Lion.AbpPro.OrganizationUnits.Dto; using Lion.AbpPro.Users.Dtos; using Volo.Abp.Identity; @@ -14,6 +15,11 @@ namespace Lion.AbpPro CreateMap() .ForMember(e => e.CreationTimeFormat, opt => opt.Ignore()) .ForMember(e => e.Status, opt => opt.Ignore()); + CreateMap(); + CreateMap(); + CreateMap(); + CreateMap(); + CreateMap(); } } } diff --git a/aspnet-core/services/src/Lion.AbpPro.Application/OrganizationUnits/OrganizationUnitAppService.cs b/aspnet-core/services/src/Lion.AbpPro.Application/OrganizationUnits/OrganizationUnitAppService.cs new file mode 100644 index 00000000..f19ae7c8 --- /dev/null +++ b/aspnet-core/services/src/Lion.AbpPro.Application/OrganizationUnits/OrganizationUnitAppService.cs @@ -0,0 +1,199 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Threading.Tasks; +using Lion.AbpPro.Extension.Customs.Dtos; +using Lion.AbpPro.IdentityServers.ApiResources.Dtos; +using Lion.AbpPro.OrganizationUnits.Dto; +using Volo.Abp; +using Volo.Abp.Application.Dtos; +using Volo.Abp.Identity; + +namespace Lion.AbpPro.OrganizationUnits; + +public class OrganizationUnitAppService : AbpProAppService, IOrganizationUnitAppService +{ + private readonly OrganizationUnitManager _organizationUnitManager; + private readonly IdentityUserManager _identityUserManager; + private readonly IOrganizationUnitRepository _organizationUnitRepository; + + public OrganizationUnitAppService( + OrganizationUnitManager OrganizationUnitManager, + IdentityUserManager identityUserManager, + IOrganizationUnitRepository organizationUnitRepository) + { + _organizationUnitManager = OrganizationUnitManager; + _identityUserManager = identityUserManager; + _organizationUnitRepository = organizationUnitRepository; + } + + public async Task> GetTreeAsync() + { + var organizationUnits = await _organizationUnitRepository.GetListAsync(); + var organizationUnitDtos = ObjectMapper.Map, List>(organizationUnits); + return ConvertToTree(organizationUnitDtos); + } + + public async Task CreateAsync(CreateOrganizationUnitInput input) + { + var entity = new OrganizationUnit + ( + GuidGenerator.Create(), + input.DisplayName, + input.ParentId, + CurrentTenant.Id + ); + await _organizationUnitManager.CreateAsync(entity); + } + + public Task DeleteAsync(IdInput input) + { + return _organizationUnitManager.DeleteAsync(input.Id); + } + + public async Task UpdateAsync(UpdateOrganizationUnitInput input) + { + var entity = await _organizationUnitRepository.FindAsync(input.Id); + if (entity != null) + { + entity.DisplayName = input.DisplayName; + await _organizationUnitManager.UpdateAsync(entity); + } + } + + public async Task AddRoleToOrganizationUnitAsync(AddRoleToOrganizationUnitInput input) + { + foreach (var roleId in input.RoleId) + { + await _organizationUnitManager.AddRoleToOrganizationUnitAsync(roleId, input.OrganizationUnitId); + } + } + + public async Task RemoveRoleFromOrganizationUnitAsync(RemoveRoleToOrganizationUnitInput input) + { + await _organizationUnitManager.RemoveRoleFromOrganizationUnitAsync(input.RoleId, input.OrganizationUnitId); + } + + public async Task AddUserToOrganizationUnitAsync(AddUserToOrganizationUnitInput input) + { + foreach (var userId in input.UserId) + { + await _identityUserManager.AddToOrganizationUnitAsync(userId, input.OrganizationUnitId); + } + } + + public async Task RemoveUserFromOrganizationUnitAsync(RemoveUserToOrganizationUnitInput input) + { + await _identityUserManager.RemoveFromOrganizationUnitAsync(input.UserId, input.OrganizationUnitId); + } + + public async Task> GetUsersAsync(GetOrganizationUnitUserInput input) + { + var listResult = new List(); + var organizationUnit = await _organizationUnitRepository.FindAsync(input.OrganizationUnitId); + if (organizationUnit == null) throw new UserFriendlyException("组织机构不存在"); + + var count = await _organizationUnitRepository.GetMembersCountAsync(organizationUnit, filter: input.Filter); + if (count > 0) + { + var list = await _organizationUnitRepository.GetMembersAsync + ( + organizationUnit, + maxResultCount: input.PageSize, + skipCount: input.SkipCount, + filter: input.Filter + ); + listResult = ObjectMapper.Map, List>(list); + } + + return new PagedResultDto(count, listResult); + } + + public async Task> GetUnAddUsersAsync(GetUnAddUserInput input) + { + var listResult = new List(); + var organizationUnit = await _organizationUnitRepository.FindAsync(input.OrganizationUnitId); + if (organizationUnit == null) throw new UserFriendlyException("组织机构不存在"); + var count = await _organizationUnitRepository.GetUnaddedUsersCountAsync(organizationUnit, input.Filter); + if (count > 0) + { + var users = await _organizationUnitRepository.GetUnaddedUsersAsync + ( + organizationUnit, + maxResultCount: input.PageSize, + skipCount: input.SkipCount, + filter: input.Filter + ); + listResult = ObjectMapper.Map, List>(users); + } + + return new PagedResultDto(count, listResult); + } + + public async Task> GetRolesAsync(GetOrganizationUnitRoleInput input) + { + var listResult = new List(); + var organizationUnit = await _organizationUnitRepository.FindAsync(input.OrganizationUnitId); + if (organizationUnit == null) throw new UserFriendlyException("组织机构不存在"); + + var count = await _organizationUnitRepository.GetRolesCountAsync(organizationUnit); + if (count > 0) + { + var list = await _organizationUnitRepository.GetRolesAsync(organizationUnit, maxResultCount: input.PageSize, skipCount: input.SkipCount); + listResult = ObjectMapper.Map, List>(list); + } + + return new PagedResultDto(count, listResult); + } + + public async Task> GetUnAddRolessAsync(GetUnAddRoleInput input) + { + var listResult = new List(); + var organizationUnit = await _organizationUnitRepository.FindAsync(input.OrganizationUnitId); + if (organizationUnit == null) throw new UserFriendlyException("组织机构不存在"); + var count = await _organizationUnitRepository.GetUnaddedRolesCountAsync(organizationUnit, input.Filter); + if (count > 0) + { + var roles = await _organizationUnitRepository.GetUnaddedRolesAsync + ( + organizationUnit, + maxResultCount: input.PageSize, + skipCount: input.SkipCount, + filter: input.Filter + ); + listResult = ObjectMapper.Map, List>(roles); + } + + return new PagedResultDto(count, listResult); + } + + #region 私有方法 + + private List ConvertToTree(List list, + Guid? Id = null) + { + var result = new List(); + var childList = Children(list, Id); + foreach (var item in childList) + { + var tree = new TreeOutput + { + Key = item.Id, + Title = item.DisplayName, + Children = ConvertToTree(list, item.Id) + }; + result.Add(tree); + } + + return result; + } + + private List Children(List list, + Guid? Id) + { + var childList = list.Where(x => x.ParentId == Id).ToList(); + return childList; + } + + #endregion +} \ No newline at end of file diff --git a/aspnet-core/services/src/Lion.AbpPro.Application/Users/AccountAppService.cs b/aspnet-core/services/src/Lion.AbpPro.Application/Users/AccountAppService.cs index 464f5dda..004121d5 100644 --- a/aspnet-core/services/src/Lion.AbpPro.Application/Users/AccountAppService.cs +++ b/aspnet-core/services/src/Lion.AbpPro.Application/Users/AccountAppService.cs @@ -27,7 +27,6 @@ namespace Lion.AbpPro.Users private readonly Microsoft.AspNetCore.Identity.SignInManager _signInManager; private readonly IHttpClientFactory _httpClientFactory; private readonly IConfiguration _configuretion; - private readonly Volo.Abp.Domain.Repositories.IRepository _identityRoleRepository; public AccountAppService( diff --git a/aspnet-core/services/src/Lion.AbpPro.DbMigrator/DbMigratorHostedService.cs b/aspnet-core/services/src/Lion.AbpPro.DbMigrator/DbMigratorHostedService.cs index 38f9c105..3f12abb3 100644 --- a/aspnet-core/services/src/Lion.AbpPro.DbMigrator/DbMigratorHostedService.cs +++ b/aspnet-core/services/src/Lion.AbpPro.DbMigrator/DbMigratorHostedService.cs @@ -3,6 +3,7 @@ using System.Threading.Tasks; using Microsoft.Extensions.DependencyInjection; using Microsoft.Extensions.Hosting; using Lion.AbpPro.Data; +using Microsoft.Extensions.Configuration; using Serilog; using Volo.Abp; @@ -11,28 +12,32 @@ namespace Lion.AbpPro.DbMigrator public class DbMigratorHostedService : IHostedService { private readonly IHostApplicationLifetime _hostApplicationLifetime; - - public DbMigratorHostedService(IHostApplicationLifetime hostApplicationLifetime) + private readonly IConfigurationRoot _configurationRoot; + public DbMigratorHostedService(IHostApplicationLifetime hostApplicationLifetime, + IConfigurationRoot configurationRoot) { _hostApplicationLifetime = hostApplicationLifetime; + _configurationRoot = configurationRoot; } public async Task StartAsync(CancellationToken cancellationToken) { - using (var application = AbpApplicationFactory.Create(options => - { - options.UseAutofac(); - options.Services.AddLogging(c => c.AddSerilog()); - })) + using (var application = await AbpApplicationFactory.CreateAsync(options => + { + options.UseAutofac(); + options.Services.AddLogging(c => c.AddSerilog()); + })) { - application.Initialize(); + + var s = _configurationRoot.GetValue("ConnectionStrings:Default"); + await application.InitializeAsync(); await application .ServiceProvider .GetRequiredService() .MigrateAsync(); - application.Shutdown(); + await application.ShutdownAsync(); _hostApplicationLifetime.StopApplication(); } diff --git a/aspnet-core/services/src/Lion.AbpPro.DbMigrator/Lion.AbpPro.DbMigrator.csproj b/aspnet-core/services/src/Lion.AbpPro.DbMigrator/Lion.AbpPro.DbMigrator.csproj index 134e29d2..de86759a 100644 --- a/aspnet-core/services/src/Lion.AbpPro.DbMigrator/Lion.AbpPro.DbMigrator.csproj +++ b/aspnet-core/services/src/Lion.AbpPro.DbMigrator/Lion.AbpPro.DbMigrator.csproj @@ -12,7 +12,12 @@ - + + + PreserveNewest + Always + + PreserveNewest Always diff --git a/aspnet-core/services/src/Lion.AbpPro.DbMigrator/Program.cs b/aspnet-core/services/src/Lion.AbpPro.DbMigrator/Program.cs index 7534d956..85dd454f 100644 --- a/aspnet-core/services/src/Lion.AbpPro.DbMigrator/Program.cs +++ b/aspnet-core/services/src/Lion.AbpPro.DbMigrator/Program.cs @@ -1,5 +1,7 @@ +using System; using System.IO; using System.Threading.Tasks; +using Microsoft.Extensions.Configuration; using Microsoft.Extensions.DependencyInjection; using Microsoft.Extensions.Hosting; using Microsoft.Extensions.Logging; @@ -32,8 +34,21 @@ namespace Lion.AbpPro.DbMigrator public static IHostBuilder CreateHostBuilder(string[] args) => Host.CreateDefaultBuilder(args) .ConfigureLogging((context, logging) => logging.ClearProviders()) + .ConfigureAppConfiguration(otpions => + { + var environment = Environment.GetEnvironmentVariable("ASPNETCORE_ENVIRONMENT"); + Console.WriteLine($"ASPNETCORE_ENVIRONMENT:{environment}"); + var appSettingFileName = "appsettings.json"; + if (!environment.IsNullOrWhiteSpace()) + appSettingFileName = $"appsettings.{environment}.json"; + Console.WriteLine($"appSettingFileName:{appSettingFileName}"); + otpions.AddJsonFile(appSettingFileName,optional:false); + }) .ConfigureServices((hostContext, services) => { + var s = hostContext.HostingEnvironment; + var _configurationRoot= services.GetRequiredService(); + var ss = _configurationRoot.GetValue("ConnectionStrings:Default"); services.AddHostedService(); }); } diff --git a/aspnet-core/services/src/Lion.AbpPro.DbMigrator/appsettings.Production.json b/aspnet-core/services/src/Lion.AbpPro.DbMigrator/appsettings.Production.json new file mode 100644 index 00000000..11f3bb83 --- /dev/null +++ b/aspnet-core/services/src/Lion.AbpPro.DbMigrator/appsettings.Production.json @@ -0,0 +1,5 @@ +{ + "ConnectionStrings": { + "Default": "Data Source=localhost;Database=LionAbpProDB123123;uid=root;pwd=1q2w3E*;charset=utf8mb4;Allow User Variables=true;AllowLoadLocalInfile=true" + } +} \ No newline at end of file diff --git a/aspnet-core/services/src/Lion.AbpPro.DbMigrator/appsettings.Staging.json b/aspnet-core/services/src/Lion.AbpPro.DbMigrator/appsettings.Staging.json new file mode 100644 index 00000000..53365434 --- /dev/null +++ b/aspnet-core/services/src/Lion.AbpPro.DbMigrator/appsettings.Staging.json @@ -0,0 +1,5 @@ +{ + "ConnectionStrings": { + "Default": "Data Source=localhost;Database=LionAbpProDB123123Staging;uid=root;pwd=1q2w3E*;charset=utf8mb4;Allow User Variables=true;AllowLoadLocalInfile=true" + } +} \ No newline at end of file diff --git a/aspnet-core/services/src/Lion.AbpPro.DbMigrator/appsettings.json b/aspnet-core/services/src/Lion.AbpPro.DbMigrator/appsettings1.json similarity index 100% rename from aspnet-core/services/src/Lion.AbpPro.DbMigrator/appsettings.json rename to aspnet-core/services/src/Lion.AbpPro.DbMigrator/appsettings1.json diff --git a/aspnet-core/services/src/Lion.AbpPro.Domain/AbpProDomainModule.cs b/aspnet-core/services/src/Lion.AbpPro.Domain/AbpProDomainModule.cs index 0431b72e..c873c159 100644 --- a/aspnet-core/services/src/Lion.AbpPro.Domain/AbpProDomainModule.cs +++ b/aspnet-core/services/src/Lion.AbpPro.Domain/AbpProDomainModule.cs @@ -5,6 +5,7 @@ using Microsoft.Extensions.DependencyInjection.Extensions; using Lion.AbpPro.MultiTenancy; using Lion.AbpPro.NotificationManagement; using Volo.Abp.AuditLogging; +using Volo.Abp.AutoMapper; using Volo.Abp.BackgroundJobs; using Volo.Abp.Emailing; using Volo.Abp.FeatureManagement; @@ -43,7 +44,10 @@ namespace Lion.AbpPro { options.IsEnabled = MultiTenancyConsts.IsEnabled; }); - + Configure(options => + { + options.AddMaps(); + }); #if DEBUG context.Services.Replace(ServiceDescriptor.Singleton()); #endif diff --git a/aspnet-core/services/src/Lion.AbpPro.Domain/Data/AbpProDbMigrationService.cs b/aspnet-core/services/src/Lion.AbpPro.Domain/Data/AbpProDbMigrationService.cs index 41ce37ff..b843baaa 100644 --- a/aspnet-core/services/src/Lion.AbpPro.Domain/Data/AbpProDbMigrationService.cs +++ b/aspnet-core/services/src/Lion.AbpPro.Domain/Data/AbpProDbMigrationService.cs @@ -1,4 +1,4 @@ -using System; +using System; using System.Collections.Generic; using System.Diagnostics; using System.IO; @@ -13,208 +13,207 @@ using Volo.Abp.Identity; using Volo.Abp.MultiTenancy; using Volo.Abp.TenantManagement; -namespace Lion.AbpPro.Data +namespace Lion.AbpPro.Data; + +public class AbpProDbMigrationService : ITransientDependency { - public class AbpProDbMigrationService : ITransientDependency + public ILogger Logger { get; set; } + + private readonly IDataSeeder _dataSeeder; + private readonly IEnumerable _dbSchemaMigrators; + private readonly ITenantRepository _tenantRepository; + private readonly ICurrentTenant _currentTenant; + + public AbpProDbMigrationService( + IDataSeeder dataSeeder, + IEnumerable dbSchemaMigrators, + ITenantRepository tenantRepository, + ICurrentTenant currentTenant) { - public ILogger Logger { get; set; } - - private readonly IDataSeeder _dataSeeder; - private readonly IEnumerable _dbSchemaMigrators; - private readonly ITenantRepository _tenantRepository; - private readonly ICurrentTenant _currentTenant; - - public AbpProDbMigrationService( - IDataSeeder dataSeeder, - IEnumerable dbSchemaMigrators, - ITenantRepository tenantRepository, - ICurrentTenant currentTenant) - { - _dataSeeder = dataSeeder; - _dbSchemaMigrators = dbSchemaMigrators; - _tenantRepository = tenantRepository; - _currentTenant = currentTenant; + _dataSeeder = dataSeeder; + _dbSchemaMigrators = dbSchemaMigrators; + _tenantRepository = tenantRepository; + _currentTenant = currentTenant; - Logger = NullLogger.Instance; - } + Logger = NullLogger.Instance; + } - public async Task MigrateAsync() - { - var initialMigrationAdded = AddInitialMigrationIfNotExist(); + public async Task MigrateAsync() + { + var initialMigrationAdded = AddInitialMigrationIfNotExist(); - if (initialMigrationAdded) - { - return; - } + if (initialMigrationAdded) + { + return; + } - Logger.LogInformation("Started database migrations..."); + Logger.LogInformation("Started database migrations..."); - await MigrateDatabaseSchemaAsync(); - await SeedDataAsync(); + await MigrateDatabaseSchemaAsync(); + await SeedDataAsync(); - Logger.LogInformation($"Successfully completed host database migrations."); + Logger.LogInformation($"Successfully completed host database migrations."); - var tenants = await _tenantRepository.GetListAsync(includeDetails: true); + var tenants = await _tenantRepository.GetListAsync(includeDetails: true); - var migratedDatabaseSchemas = new HashSet(); - foreach (var tenant in tenants) + var migratedDatabaseSchemas = new HashSet(); + foreach (var tenant in tenants) + { + using (_currentTenant.Change(tenant.Id)) { - using (_currentTenant.Change(tenant.Id)) + if (tenant.ConnectionStrings.Any()) { - if (tenant.ConnectionStrings.Any()) - { - var tenantConnectionStrings = tenant.ConnectionStrings - .Select(x => x.Value) - .ToList(); + var tenantConnectionStrings = tenant.ConnectionStrings + .Select(x => x.Value) + .ToList(); - if (!migratedDatabaseSchemas.IsSupersetOf(tenantConnectionStrings)) - { - await MigrateDatabaseSchemaAsync(tenant); + if (!migratedDatabaseSchemas.IsSupersetOf(tenantConnectionStrings)) + { + await MigrateDatabaseSchemaAsync(tenant); - migratedDatabaseSchemas.AddIfNotContains(tenantConnectionStrings); - } + migratedDatabaseSchemas.AddIfNotContains(tenantConnectionStrings); } - - await SeedDataAsync(tenant); } - Logger.LogInformation($"Successfully completed {tenant.Name} tenant database migrations."); + await SeedDataAsync(tenant); } - Logger.LogInformation("Successfully completed all database migrations."); - Logger.LogInformation("You can safely end this process..."); + Logger.LogInformation($"Successfully completed {tenant.Name} tenant database migrations."); } - private async Task MigrateDatabaseSchemaAsync(Tenant tenant = null) - { - Logger.LogInformation( - $"Migrating schema for {(tenant == null ? "host" : tenant.Name + " tenant")} database..."); + Logger.LogInformation("Successfully completed all database migrations."); + Logger.LogInformation("You can safely end this process..."); + } - foreach (var migrator in _dbSchemaMigrators) - { - await migrator.MigrateAsync(); - } - } + private async Task MigrateDatabaseSchemaAsync(Tenant tenant = null) + { + Logger.LogInformation( + $"Migrating schema for {(tenant == null ? "host" : tenant.Name + " tenant")} database..."); - private async Task SeedDataAsync(Tenant tenant = null) + foreach (var migrator in _dbSchemaMigrators) { - Logger.LogInformation($"Executing {(tenant == null ? "host" : tenant.Name + " tenant")} database seed..."); - - await _dataSeeder.SeedAsync(new DataSeedContext(tenant?.Id) - .WithProperty(IdentityDataSeedContributor.AdminEmailPropertyName, IdentityDataSeedContributor.AdminEmailDefaultValue) - .WithProperty(IdentityDataSeedContributor.AdminPasswordPropertyName, IdentityDataSeedContributor.AdminPasswordDefaultValue) - ); + await migrator.MigrateAsync(); } + } + + private async Task SeedDataAsync(Tenant tenant = null) + { + Logger.LogInformation($"Executing {(tenant == null ? "host" : tenant.Name + " tenant")} database seed..."); - private bool AddInitialMigrationIfNotExist() + await _dataSeeder.SeedAsync(new DataSeedContext(tenant?.Id) + .WithProperty(IdentityDataSeedContributor.AdminEmailPropertyName, IdentityDataSeedContributor.AdminEmailDefaultValue) + .WithProperty(IdentityDataSeedContributor.AdminPasswordPropertyName, IdentityDataSeedContributor.AdminPasswordDefaultValue) + ); + } + + private bool AddInitialMigrationIfNotExist() + { + try { - try - { - if (!DbMigrationsProjectExists()) - { - return false; - } - } - catch (Exception) + if (!DbMigrationsProjectExists()) { return false; } + } + catch (Exception) + { + return false; + } - try + try + { + if (!MigrationsFolderExists()) { - if (!MigrationsFolderExists()) - { - AddInitialMigration(); - return true; - } - else - { - return false; - } + AddInitialMigration(); + return true; } - catch (Exception e) + else { - Logger.LogWarning("Couldn't determinate if any migrations exist : " + e.Message); return false; } } - - private bool DbMigrationsProjectExists() + catch (Exception e) { - var dbMigrationsProjectFolder = GetDbMigrationsProjectFolderPath(); - - return dbMigrationsProjectFolder != null; + Logger.LogWarning("Couldn't determinate if any migrations exist : " + e.Message); + return false; } + } - private bool MigrationsFolderExists() - { - var dbMigrationsProjectFolder = GetDbMigrationsProjectFolderPath(); + private bool DbMigrationsProjectExists() + { + var dbMigrationsProjectFolder = GetEntityFrameworkCoreProjectFolderPath(); - return Directory.Exists(Path.Combine(dbMigrationsProjectFolder, "EntityFrameworkCore")); - } + return dbMigrationsProjectFolder != null; + } - private void AddInitialMigration() - { - Logger.LogInformation("Creating initial migration..."); + private bool MigrationsFolderExists() + { + var dbMigrationsProjectFolder = GetEntityFrameworkCoreProjectFolderPath(); - string argumentPrefix; - string fileName; + return Directory.Exists(Path.Combine(dbMigrationsProjectFolder, "Migrations")); + } - if (RuntimeInformation.IsOSPlatform(OSPlatform.OSX) || RuntimeInformation.IsOSPlatform(OSPlatform.Linux)) - { - argumentPrefix = "-c"; - fileName = "/bin/bash"; - } - else - { - argumentPrefix = "/C"; - fileName = "cmd.exe"; - } + private void AddInitialMigration() + { + Logger.LogInformation("Creating initial migration..."); - var procStartInfo = new ProcessStartInfo(fileName, - $"{argumentPrefix} \"abp create-migration-and-run-migrator \"{GetDbMigrationsProjectFolderPath()}\"\"" - ); + string argumentPrefix; + string fileName; - try - { - Process.Start(procStartInfo); - } - catch (Exception) - { - throw new Exception("Couldn't run ABP CLI..."); - } + if (RuntimeInformation.IsOSPlatform(OSPlatform.OSX) || RuntimeInformation.IsOSPlatform(OSPlatform.Linux)) + { + argumentPrefix = "-c"; + fileName = "/bin/bash"; } - - private string GetDbMigrationsProjectFolderPath() + else { - var slnDirectoryPath = GetSolutionDirectoryPath(); + argumentPrefix = "/C"; + fileName = "cmd.exe"; + } - if (slnDirectoryPath == null) - { - throw new Exception("Solution folder not found!"); - } + var procStartInfo = new ProcessStartInfo(fileName, + $"{argumentPrefix} \"abp create-migration-and-run-migrator \"{GetEntityFrameworkCoreProjectFolderPath()}\"\"" + ); + + try + { + Process.Start(procStartInfo); + } + catch (Exception) + { + throw new Exception("Couldn't run ABP CLI..."); + } + } - var srcDirectoryPath = Path.Combine(slnDirectoryPath, "src"); + private string GetEntityFrameworkCoreProjectFolderPath() + { + var slnDirectoryPath = GetSolutionDirectoryPath(); - return Directory.GetDirectories(srcDirectoryPath) - .FirstOrDefault(d => d.EndsWith(".DbMigrations")); + if (slnDirectoryPath == null) + { + throw new Exception("Solution folder not found!"); } - private string GetSolutionDirectoryPath() + var srcDirectoryPath = Path.Combine(slnDirectoryPath, "src"); + + return Directory.GetDirectories(srcDirectoryPath) + .FirstOrDefault(d => d.EndsWith(".EntityFrameworkCore")); + } + + private string GetSolutionDirectoryPath() + { + var currentDirectory = new DirectoryInfo(Directory.GetCurrentDirectory()); + + while (Directory.GetParent(currentDirectory.FullName) != null) { - var currentDirectory = new DirectoryInfo(Directory.GetCurrentDirectory()); + currentDirectory = Directory.GetParent(currentDirectory.FullName); - while (Directory.GetParent(currentDirectory.FullName) != null) + if (Directory.GetFiles(currentDirectory.FullName).FirstOrDefault(f => f.EndsWith(".sln")) != null) { - currentDirectory = Directory.GetParent(currentDirectory.FullName); - - if (Directory.GetFiles(currentDirectory.FullName).FirstOrDefault(f => f.EndsWith(".sln")) != null) - { - return currentDirectory.FullName; - } + return currentDirectory.FullName; } - - return null; } + + return null; } } diff --git a/aspnet-core/services/src/Lion.AbpPro.Domain/Data/IAbpProDbSchemaMigrator.cs b/aspnet-core/services/src/Lion.AbpPro.Domain/Data/IAbpProDbSchemaMigrator.cs index 597ec597..3232bf1c 100644 --- a/aspnet-core/services/src/Lion.AbpPro.Domain/Data/IAbpProDbSchemaMigrator.cs +++ b/aspnet-core/services/src/Lion.AbpPro.Domain/Data/IAbpProDbSchemaMigrator.cs @@ -1,9 +1,8 @@ -using System.Threading.Tasks; +using System.Threading.Tasks; -namespace Lion.AbpPro.Data +namespace Lion.AbpPro.Data; + +public interface IAbpProDbSchemaMigrator { - public interface IAbpProDbSchemaMigrator - { - Task MigrateAsync(); - } + Task MigrateAsync(); } diff --git a/aspnet-core/services/src/Lion.AbpPro.Domain/Data/NullAbpProDbSchemaMigrator.cs b/aspnet-core/services/src/Lion.AbpPro.Domain/Data/NullAbpProDbSchemaMigrator.cs index 41e46a79..13ef91b9 100644 --- a/aspnet-core/services/src/Lion.AbpPro.Domain/Data/NullAbpProDbSchemaMigrator.cs +++ b/aspnet-core/services/src/Lion.AbpPro.Domain/Data/NullAbpProDbSchemaMigrator.cs @@ -1,16 +1,15 @@ -using System.Threading.Tasks; +using System.Threading.Tasks; using Volo.Abp.DependencyInjection; -namespace Lion.AbpPro.Data +namespace Lion.AbpPro.Data; + +/* This is used if database provider does't define + * IAbpProDbSchemaMigrator implementation. + */ +public class NullAbpProDbSchemaMigrator : IAbpProDbSchemaMigrator, ITransientDependency { - /* This is used if database provider does't define - * IAbpProDbSchemaMigrator implementation. - */ - public class NullAbpProDbSchemaMigrator : IAbpProDbSchemaMigrator, ITransientDependency + public Task MigrateAsync() { - public Task MigrateAsync() - { - return Task.CompletedTask; - } + return Task.CompletedTask; } -} \ No newline at end of file +} diff --git a/aspnet-core/services/src/Lion.AbpPro.EntityFrameworkCore/EntityFrameworkCore/AbpProMigrationsDbContextFactory.cs b/aspnet-core/services/src/Lion.AbpPro.EntityFrameworkCore/EntityFrameworkCore/AbpProMigrationsDbContextFactory.cs index e5270e67..ba11db38 100644 --- a/aspnet-core/services/src/Lion.AbpPro.EntityFrameworkCore/EntityFrameworkCore/AbpProMigrationsDbContextFactory.cs +++ b/aspnet-core/services/src/Lion.AbpPro.EntityFrameworkCore/EntityFrameworkCore/AbpProMigrationsDbContextFactory.cs @@ -1,3 +1,4 @@ +using System; using System.IO; using Microsoft.EntityFrameworkCore; using Microsoft.EntityFrameworkCore.Design; @@ -23,11 +24,28 @@ namespace Lion.AbpPro.EntityFrameworkCore private static IConfigurationRoot BuildConfiguration() { + var environment = Environment.GetEnvironmentVariable("ASPNETCORE_ENVIRONMENT"); + var appSettingFileName = "appsettings.json"; + if (!environment.IsNullOrWhiteSpace()) + appSettingFileName = $"appsettings.{environment}.json"; + + var builder = new ConfigurationBuilder() - .SetBasePath(Path.Combine(Directory.GetCurrentDirectory(), "../Lion.AbpPro.DbMigrator/")) - .AddJsonFile("appsettings.json", optional: false); + .SetBasePath + ( + Path.Combine + ( + Directory.GetCurrentDirectory(), + "../Lion.AbpPro.DbMigrator/" + ) + ) + .AddJsonFile + ( + appSettingFileName, + false + ); return builder.Build(); } } -} +} \ No newline at end of file diff --git a/aspnet-core/services/src/Lion.AbpPro.HttpApi/Controllers/Systems/OrganizationUnitController.cs b/aspnet-core/services/src/Lion.AbpPro.HttpApi/Controllers/Systems/OrganizationUnitController.cs new file mode 100644 index 00000000..e0c26695 --- /dev/null +++ b/aspnet-core/services/src/Lion.AbpPro.HttpApi/Controllers/Systems/OrganizationUnitController.cs @@ -0,0 +1,105 @@ +using System.Collections.Generic; +using System.Threading.Tasks; +using Lion.AbpPro.Extension.Customs.Dtos; +using Lion.AbpPro.OrganizationUnits; +using Lion.AbpPro.OrganizationUnits.Dto; +using Microsoft.AspNetCore.Mvc; +using Swashbuckle.AspNetCore.Annotations; +using Volo.Abp.Application.Dtos; + +namespace Lion.AbpPro.Controllers.Systems; + +[Route("OrganizationUnits")] +public class OrganizationUnitController : AbpProController, IOrganizationUnitAppService +{ + private readonly IOrganizationUnitAppService _organizationUnitAppService; + + public OrganizationUnitController(IOrganizationUnitAppService organizationUnitAppService) + { + _organizationUnitAppService = organizationUnitAppService; + } + + [HttpPost("tree")] + [SwaggerOperation(summary: "获取组织机构树", Tags = new[] { "OrganizationUnits" })] + public Task> GetTreeAsync() + { + return _organizationUnitAppService.GetTreeAsync(); + } + + [HttpPost("create")] + [SwaggerOperation(summary: "创建组织机构", Tags = new[] { "OrganizationUnits" })] + public Task CreateAsync(CreateOrganizationUnitInput input) + { + return _organizationUnitAppService.CreateAsync(input); + } + + [HttpPost("delete")] + [SwaggerOperation(summary: "删除组织机构", Tags = new[] { "OrganizationUnits" })] + public Task DeleteAsync(IdInput input) + { + return _organizationUnitAppService.DeleteAsync(input); + } + + [HttpPost("update")] + [SwaggerOperation(summary: "编辑组织机构", Tags = new[] { "OrganizationUnits" })] + public Task UpdateAsync(UpdateOrganizationUnitInput input) + { + return _organizationUnitAppService.UpdateAsync(input); + } + + [HttpPost("addRoleToOrganizationUnitAsync")] + [SwaggerOperation(summary: "向组织机构添加角色", Tags = new[] { "OrganizationUnits" })] + public Task AddRoleToOrganizationUnitAsync(AddRoleToOrganizationUnitInput input) + { + return _organizationUnitAppService.AddRoleToOrganizationUnitAsync(input); + } + + [HttpPost("removeRoleFromOrganizationUnitAsync")] + [SwaggerOperation(summary: "向组织机构删除角色", Tags = new[] { "OrganizationUnits" })] + public Task RemoveRoleFromOrganizationUnitAsync(RemoveRoleToOrganizationUnitInput input) + { + return _organizationUnitAppService.RemoveRoleFromOrganizationUnitAsync(input); + } + + [HttpPost("addUserToOrganizationUnit")] + [SwaggerOperation(summary: "向组织机构添加用户", Tags = new[] { "OrganizationUnits" })] + public Task AddUserToOrganizationUnitAsync(AddUserToOrganizationUnitInput input) + { + return _organizationUnitAppService.AddUserToOrganizationUnitAsync(input); + } + + [HttpPost("removeUserFromOrganizationUnit")] + [SwaggerOperation(summary: "向组织机构删除用户", Tags = new[] { "OrganizationUnits" })] + public Task RemoveUserFromOrganizationUnitAsync(RemoveUserToOrganizationUnitInput input) + { + return _organizationUnitAppService.RemoveUserFromOrganizationUnitAsync(input); + } + + [HttpPost("getUsers")] + [SwaggerOperation(summary: "分页获取组织机构下用户", Tags = new[] { "OrganizationUnits" })] + public Task> GetUsersAsync(GetOrganizationUnitUserInput input) + { + return _organizationUnitAppService.GetUsersAsync(input); + } + + [HttpPost("getRoles")] + [SwaggerOperation(summary: "分页获取组织机构下角色", Tags = new[] { "OrganizationUnits" })] + public Task> GetRolesAsync(GetOrganizationUnitRoleInput input) + { + return _organizationUnitAppService.GetRolesAsync(input); + } + + [HttpPost("getUnAddUsers")] + [SwaggerOperation(summary: "获取不在组织机构的用户", Tags = new[] { "OrganizationUnits" })] + public Task> GetUnAddUsersAsync(GetUnAddUserInput input) + { + return _organizationUnitAppService.GetUnAddUsersAsync(input); + } + + [HttpPost("getUnAddRoles")] + [SwaggerOperation(summary: "获取不在组织机构的角色", Tags = new[] { "OrganizationUnits" })] + public Task> GetUnAddRolessAsync(GetUnAddRoleInput input) + { + return _organizationUnitAppService.GetUnAddRolessAsync(input); + } +} \ No newline at end of file diff --git a/aspnet-core/shared/Lion.AbpPro.Shared.Hosting.Microservices/Swaggers/HiddenAbpDefaultApiFilter.cs b/aspnet-core/shared/Lion.AbpPro.Shared.Hosting.Microservices/Swaggers/HiddenAbpDefaultApiFilter.cs index 50a74af7..0549210b 100644 --- a/aspnet-core/shared/Lion.AbpPro.Shared.Hosting.Microservices/Swaggers/HiddenAbpDefaultApiFilter.cs +++ b/aspnet-core/shared/Lion.AbpPro.Shared.Hosting.Microservices/Swaggers/HiddenAbpDefaultApiFilter.cs @@ -46,7 +46,9 @@ namespace Lion.AbpPro.Shared.Hosting.Microservices.Swaggers "/api/identity/my-profile", "/api/identity", "/api/multi-tenancy/tenants", - "/api/setting-management/emailing" + "/api/setting-management/emailing", + "/configuration", + "/outputcache" }; } } diff --git a/vben271/src/locales/lang/en/routes/admin.ts b/vben271/src/locales/lang/en/routes/admin.ts index 6e864c2d..8e3b136e 100644 --- a/vben271/src/locales/lang/en/routes/admin.ts +++ b/vben271/src/locales/lang/en/routes/admin.ts @@ -29,7 +29,7 @@ export default { audit_httpMethod: 'HttpMethod', audit_httpStatusCode: 'HttpStatusCode', audit_httpRequest: 'HttpRequest', - audit_ipAdrress: 'IP Address', + audit_ipAddress: 'IP Address', audit_time: 'Time', audit_duration: 'Execution Duration(ms)', audit_url: 'URL', @@ -68,4 +68,11 @@ export default { editPasswordMessage: 'The passwords entered twice are inconsistent. Procedure', executionTime: 'ExecutionTime', executionDuration: 'ExecutionDuration(Millisecond)', + organizationUnitName: 'Name', + parentOrganizationUnitName: 'ParentOrganizationUnit', + organizationUnitManagement: 'OrganizationUnitManagement', + createRootOrganizationUnit: 'CreateRootOrganizationUnit', + organizationUnit: 'OrganizationUnit', + member: 'Member', + role: 'Role', }; diff --git a/vben271/src/locales/lang/zh-CN/routes/admin.ts b/vben271/src/locales/lang/zh-CN/routes/admin.ts index 67ed6afe..291cc7c6 100644 --- a/vben271/src/locales/lang/zh-CN/routes/admin.ts +++ b/vben271/src/locales/lang/zh-CN/routes/admin.ts @@ -26,7 +26,7 @@ export default { audit_httpMethod: 'Http方法', audit_httpStatusCode: 'Http状态码', audit_httpRequest: 'Http请求', - audit_ipAdrress: 'IP地址', + audit_ipAddress: 'IP地址', audit_time: '时间', audit_duration: '持续时间(ms)', audit_url: 'Url地址', @@ -67,5 +67,11 @@ export default { editPasswordMessage: '输入的2次密码不一致', executionTime: '执行时间', executionDuration: '响应时间(毫秒)', - + organizationUnitName: '名称', + parentOrganizationUnitName: '上级组织机构', + organizationUnitManagement: '组织机构管理', + createRootOrganizationUnit: '新增根机构', + organizationUnit: '组织机构', + member: '成员', + role: '角色', }; diff --git a/vben271/src/router/index.ts b/vben271/src/router/index.ts index fa5b4aec..96decf09 100644 --- a/vben271/src/router/index.ts +++ b/vben271/src/router/index.ts @@ -1,7 +1,7 @@ import { createWebHistory, RouteRecordRaw } from "vue-router"; import type { App } from "vue"; -import { createRouter, createWebHashHistory } from "vue-router"; +import { createRouter } from "vue-router"; import { basicRoutes } from "./routes"; // 白名单应该包含基本静态路由 diff --git a/vben271/src/router/routes/modules/admin.ts b/vben271/src/router/routes/modules/admin.ts index 0be6e4b5..2948e212 100644 --- a/vben271/src/router/routes/modules/admin.ts +++ b/vben271/src/router/routes/modules/admin.ts @@ -83,6 +83,16 @@ const admin: AppRouteModule = { policy: 'System.FileManagement', }, }, + { + path: 'organizationUnit', + name: 'organizationUnit', + component: () => import('/@/views/admin/organizationUnits/OrganizationUnit.vue'), + meta: { + title: t('routes.admin.organizationUnitManagement'), + icon: 'ant-design:snippets-outlined', + policy: 'System.FileManagement', + }, + }, ], }; diff --git a/vben271/src/services/ServiceProxies.ts b/vben271/src/services/ServiceProxies.ts index d65062fe..b289227e 100644 --- a/vben271/src/services/ServiceProxies.ts +++ b/vben271/src/services/ServiceProxies.ts @@ -4052,121 +4052,6 @@ export class FilesServiceProxy extends ServiceProxyBase { } } -export class FileConfigurationServiceProxy extends ServiceProxyBase { - private instance: AxiosInstance; - private baseUrl: string; - protected jsonParseReviver: ((key: string, value: any) => any) | undefined = undefined; - - constructor(baseUrl?: string, instance?: AxiosInstance) { - super(); - this.instance = instance ? instance : axios.create(); - this.baseUrl = baseUrl !== undefined && baseUrl !== null ? baseUrl : ""; - } - - /** - * @return Success - */ - configurationGet( cancelToken?: CancelToken | undefined): Promise { - let url_ = this.baseUrl + "/configuration"; - url_ = url_.replace(/[?&]$/, ""); - - let options_ = { - method: "GET", - url: url_, - headers: { - }, - cancelToken - }; - - return this.transformOptions(options_).then(transformedOptions_ => { - return this.instance.request(transformedOptions_); - }).catch((_error: any) => { - if (isAxiosError(_error) && _error.response) { - return _error.response; - } else { - throw _error; - } - }).then((_response: AxiosResponse) => { - return this.transformResult(url_, _response, (_response: AxiosResponse) => this.processConfigurationGet(_response)); - }); - } - - protected processConfigurationGet(response: AxiosResponse): Promise { - const status = response.status; - let _headers: any = {}; - if (response.headers && typeof response.headers === "object") { - for (let k in response.headers) { - if (response.headers.hasOwnProperty(k)) { - _headers[k] = response.headers[k]; - } - } - } - if (status === 200) { - const _responseText = response.data; - return Promise.resolve(null); - - } else if (status !== 200 && status !== 204) { - const _responseText = response.data; - return throwException("An unexpected server error occurred.", status, _responseText, _headers); - } - return Promise.resolve(null); - } - - /** - * @param body (optional) - * @return Success - */ - configurationPost(body: FileConfiguration | undefined , cancelToken?: CancelToken | undefined): Promise { - let url_ = this.baseUrl + "/configuration"; - url_ = url_.replace(/[?&]$/, ""); - - const content_ = JSON.stringify(body); - - let options_ = { - data: content_, - method: "POST", - url: url_, - headers: { - "Content-Type": "application/json", - }, - cancelToken - }; - - return this.transformOptions(options_).then(transformedOptions_ => { - return this.instance.request(transformedOptions_); - }).catch((_error: any) => { - if (isAxiosError(_error) && _error.response) { - return _error.response; - } else { - throw _error; - } - }).then((_response: AxiosResponse) => { - return this.transformResult(url_, _response, (_response: AxiosResponse) => this.processConfigurationPost(_response)); - }); - } - - protected processConfigurationPost(response: AxiosResponse): Promise { - const status = response.status; - let _headers: any = {}; - if (response.headers && typeof response.headers === "object") { - for (let k in response.headers) { - if (response.headers.hasOwnProperty(k)) { - _headers[k] = response.headers[k]; - } - } - } - if (status === 200) { - const _responseText = response.data; - return Promise.resolve(null); - - } else if (status !== 200 && status !== 204) { - const _responseText = response.data; - return throwException("An unexpected server error occurred.", status, _responseText, _headers); - } - return Promise.resolve(null); - } -} - export class IdentityResourceServiceProxy extends ServiceProxyBase { private instance: AxiosInstance; private baseUrl: string; @@ -5307,7 +5192,7 @@ export class NotificationServiceProxy extends ServiceProxyBase { } } -export class OutputCacheServiceProxy extends ServiceProxyBase { +export class OrganizationUnitsServiceProxy extends ServiceProxyBase { private instance: AxiosInstance; private baseUrl: string; protected jsonParseReviver: ((key: string, value: any) => any) | undefined = undefined; @@ -5319,19 +5204,18 @@ export class OutputCacheServiceProxy extends ServiceProxyBase { } /** + * 获取组织机构树 * @return Success */ - outputcache(region: string , cancelToken?: CancelToken | undefined): Promise { - let url_ = this.baseUrl + "/outputcache/{region}"; - if (region === undefined || region === null) - throw new Error("The parameter 'region' must be defined."); - url_ = url_.replace("{region}", encodeURIComponent("" + region)); + tree( cancelToken?: CancelToken | undefined): Promise { + let url_ = this.baseUrl + "/OrganizationUnits/tree"; url_ = url_.replace(/[?&]$/, ""); let options_ = { - method: "DELETE", + method: "POST", url: url_, headers: { + "Accept": "text/plain" }, cancelToken }; @@ -5345,11 +5229,11 @@ export class OutputCacheServiceProxy extends ServiceProxyBase { throw _error; } }).then((_response: AxiosResponse) => { - return this.transformResult(url_, _response, (_response: AxiosResponse) => this.processOutputcache(_response)); + return this.transformResult(url_, _response, (_response: AxiosResponse) => this.processTree(_response)); }); } - protected processOutputcache(response: AxiosResponse): Promise { + protected processTree(response: AxiosResponse): Promise { const status = response.status; let _headers: any = {}; if (response.headers && typeof response.headers === "object") { @@ -5361,34 +5245,74 @@ export class OutputCacheServiceProxy extends ServiceProxyBase { } if (status === 200) { const _responseText = response.data; - return Promise.resolve(null); + let result200: any = null; + let resultData200 = _responseText; + if (Array.isArray(resultData200)) { + result200 = [] as any; + for (let item of resultData200) + result200!.push(TreeOutput.fromJS(item)); + } + else { + result200 = null; + } + return Promise.resolve(result200); + + } else if (status === 403) { + const _responseText = response.data; + let result403: any = null; + let resultData403 = _responseText; + result403 = RemoteServiceErrorResponse.fromJS(resultData403); + return throwException("Forbidden", status, _responseText, _headers, result403); + + } else if (status === 401) { + const _responseText = response.data; + let result401: any = null; + let resultData401 = _responseText; + result401 = RemoteServiceErrorResponse.fromJS(resultData401); + return throwException("Unauthorized", status, _responseText, _headers, result401); + + } else if (status === 400) { + const _responseText = response.data; + let result400: any = null; + let resultData400 = _responseText; + result400 = RemoteServiceErrorResponse.fromJS(resultData400); + return throwException("Bad Request", status, _responseText, _headers, result400); + + } else if (status === 404) { + const _responseText = response.data; + let result404: any = null; + let resultData404 = _responseText; + result404 = RemoteServiceErrorResponse.fromJS(resultData404); + return throwException("Not Found", status, _responseText, _headers, result404); + + } else if (status === 501) { + const _responseText = response.data; + let result501: any = null; + let resultData501 = _responseText; + result501 = RemoteServiceErrorResponse.fromJS(resultData501); + return throwException("Server Error", status, _responseText, _headers, result501); + + } else if (status === 500) { + const _responseText = response.data; + let result500: any = null; + let resultData500 = _responseText; + result500 = RemoteServiceErrorResponse.fromJS(resultData500); + return throwException("Server Error", status, _responseText, _headers, result500); } else if (status !== 200 && status !== 204) { const _responseText = response.data; return throwException("An unexpected server error occurred.", status, _responseText, _headers); } - return Promise.resolve(null); - } -} - -export class PermissionsServiceProxy extends ServiceProxyBase { - private instance: AxiosInstance; - private baseUrl: string; - protected jsonParseReviver: ((key: string, value: any) => any) | undefined = undefined; - - constructor(baseUrl?: string, instance?: AxiosInstance) { - super(); - this.instance = instance ? instance : axios.create(); - this.baseUrl = baseUrl !== undefined && baseUrl !== null ? baseUrl : ""; + return Promise.resolve(null); } /** - * 获取角色权限 + * 创建组织机构 * @param body (optional) * @return Success */ - tree(body: GetPermissionInput | undefined , cancelToken?: CancelToken | undefined): Promise { - let url_ = this.baseUrl + "/Permissions/tree"; + create(body: CreateOrganizationUnitInput | undefined , cancelToken?: CancelToken | undefined): Promise { + let url_ = this.baseUrl + "/OrganizationUnits/create"; url_ = url_.replace(/[?&]$/, ""); const content_ = JSON.stringify(body); @@ -5399,7 +5323,6 @@ export class PermissionsServiceProxy extends ServiceProxyBase { url: url_, headers: { "Content-Type": "application/json", - "Accept": "text/plain" }, cancelToken }; @@ -5413,11 +5336,11 @@ export class PermissionsServiceProxy extends ServiceProxyBase { throw _error; } }).then((_response: AxiosResponse) => { - return this.transformResult(url_, _response, (_response: AxiosResponse) => this.processTree(_response)); + return this.transformResult(url_, _response, (_response: AxiosResponse) => this.processCreate(_response)); }); } - protected processTree(response: AxiosResponse): Promise { + protected processCreate(response: AxiosResponse): Promise { const status = response.status; let _headers: any = {}; if (response.headers && typeof response.headers === "object") { @@ -5429,10 +5352,7 @@ export class PermissionsServiceProxy extends ServiceProxyBase { } if (status === 200) { const _responseText = response.data; - let result200: any = null; - let resultData200 = _responseText; - result200 = PermissionOutput.fromJS(resultData200); - return Promise.resolve(result200); + return Promise.resolve(null); } else if (status === 403) { const _responseText = response.data; @@ -5480,16 +5400,16 @@ export class PermissionsServiceProxy extends ServiceProxyBase { const _responseText = response.data; return throwException("An unexpected server error occurred.", status, _responseText, _headers); } - return Promise.resolve(null); + return Promise.resolve(null); } /** - * 更新角色 + * 删除组织机构 * @param body (optional) * @return Success */ - update(body: UpdateRolePermissionsInput | undefined , cancelToken?: CancelToken | undefined): Promise { - let url_ = this.baseUrl + "/Permissions/update"; + delete(body: IdInput | undefined , cancelToken?: CancelToken | undefined): Promise { + let url_ = this.baseUrl + "/OrganizationUnits/delete"; url_ = url_.replace(/[?&]$/, ""); const content_ = JSON.stringify(body); @@ -5513,11 +5433,11 @@ export class PermissionsServiceProxy extends ServiceProxyBase { throw _error; } }).then((_response: AxiosResponse) => { - return this.transformResult(url_, _response, (_response: AxiosResponse) => this.processUpdate(_response)); + return this.transformResult(url_, _response, (_response: AxiosResponse) => this.processDelete(_response)); }); } - protected processUpdate(response: AxiosResponse): Promise { + protected processDelete(response: AxiosResponse): Promise { const status = response.status; let _headers: any = {}; if (response.headers && typeof response.headers === "object") { @@ -5579,32 +5499,24 @@ export class PermissionsServiceProxy extends ServiceProxyBase { } return Promise.resolve(null); } -} - -export class RolesServiceProxy extends ServiceProxyBase { - private instance: AxiosInstance; - private baseUrl: string; - protected jsonParseReviver: ((key: string, value: any) => any) | undefined = undefined; - - constructor(baseUrl?: string, instance?: AxiosInstance) { - super(); - this.instance = instance ? instance : axios.create(); - this.baseUrl = baseUrl !== undefined && baseUrl !== null ? baseUrl : ""; - } /** - * 获取所有角色 + * 编辑组织机构 + * @param body (optional) * @return Success */ - all( cancelToken?: CancelToken | undefined): Promise { - let url_ = this.baseUrl + "/Roles/all"; + update(body: UpdateOrganizationUnitInput | undefined , cancelToken?: CancelToken | undefined): Promise { + let url_ = this.baseUrl + "/OrganizationUnits/update"; url_ = url_.replace(/[?&]$/, ""); + const content_ = JSON.stringify(body); + let options_ = { + data: content_, method: "POST", url: url_, headers: { - "Accept": "text/plain" + "Content-Type": "application/json", }, cancelToken }; @@ -5618,11 +5530,11 @@ export class RolesServiceProxy extends ServiceProxyBase { throw _error; } }).then((_response: AxiosResponse) => { - return this.transformResult(url_, _response, (_response: AxiosResponse) => this.processAll(_response)); + return this.transformResult(url_, _response, (_response: AxiosResponse) => this.processUpdate(_response)); }); } - protected processAll(response: AxiosResponse): Promise { + protected processUpdate(response: AxiosResponse): Promise { const status = response.status; let _headers: any = {}; if (response.headers && typeof response.headers === "object") { @@ -5634,10 +5546,7 @@ export class RolesServiceProxy extends ServiceProxyBase { } if (status === 200) { const _responseText = response.data; - let result200: any = null; - let resultData200 = _responseText; - result200 = IdentityRoleDtoListResultDto.fromJS(resultData200); - return Promise.resolve(result200); + return Promise.resolve(null); } else if (status === 403) { const _responseText = response.data; @@ -5685,16 +5594,16 @@ export class RolesServiceProxy extends ServiceProxyBase { const _responseText = response.data; return throwException("An unexpected server error occurred.", status, _responseText, _headers); } - return Promise.resolve(null); + return Promise.resolve(null); } /** - * 分页获取角色 + * 向组织机构添加角色 * @param body (optional) * @return Success */ - page(body: PagingRoleListInput | undefined , cancelToken?: CancelToken | undefined): Promise { - let url_ = this.baseUrl + "/Roles/page"; + addRoleToOrganizationUnit(body: AddRoleToOrganizationUnitInput | undefined , cancelToken?: CancelToken | undefined): Promise { + let url_ = this.baseUrl + "/OrganizationUnits/addRoleToOrganizationUnitAsync"; url_ = url_.replace(/[?&]$/, ""); const content_ = JSON.stringify(body); @@ -5705,7 +5614,6 @@ export class RolesServiceProxy extends ServiceProxyBase { url: url_, headers: { "Content-Type": "application/json", - "Accept": "text/plain" }, cancelToken }; @@ -5719,11 +5627,11 @@ export class RolesServiceProxy extends ServiceProxyBase { throw _error; } }).then((_response: AxiosResponse) => { - return this.transformResult(url_, _response, (_response: AxiosResponse) => this.processPage(_response)); + return this.transformResult(url_, _response, (_response: AxiosResponse) => this.processAddRoleToOrganizationUnit(_response)); }); } - protected processPage(response: AxiosResponse): Promise { + protected processAddRoleToOrganizationUnit(response: AxiosResponse): Promise { const status = response.status; let _headers: any = {}; if (response.headers && typeof response.headers === "object") { @@ -5735,10 +5643,7 @@ export class RolesServiceProxy extends ServiceProxyBase { } if (status === 200) { const _responseText = response.data; - let result200: any = null; - let resultData200 = _responseText; - result200 = IdentityRoleDtoPagedResultDto.fromJS(resultData200); - return Promise.resolve(result200); + return Promise.resolve(null); } else if (status === 403) { const _responseText = response.data; @@ -5786,16 +5691,16 @@ export class RolesServiceProxy extends ServiceProxyBase { const _responseText = response.data; return throwException("An unexpected server error occurred.", status, _responseText, _headers); } - return Promise.resolve(null); + return Promise.resolve(null); } /** - * 创建角色 + * 向组织机构删除角色 * @param body (optional) * @return Success */ - create(body: IdentityRoleCreateDto | undefined , cancelToken?: CancelToken | undefined): Promise { - let url_ = this.baseUrl + "/Roles/create"; + removeRoleFromOrganizationUnit(body: RemoveRoleToOrganizationUnitInput | undefined , cancelToken?: CancelToken | undefined): Promise { + let url_ = this.baseUrl + "/OrganizationUnits/removeRoleFromOrganizationUnitAsync"; url_ = url_.replace(/[?&]$/, ""); const content_ = JSON.stringify(body); @@ -5806,7 +5711,6 @@ export class RolesServiceProxy extends ServiceProxyBase { url: url_, headers: { "Content-Type": "application/json", - "Accept": "text/plain" }, cancelToken }; @@ -5820,11 +5724,11 @@ export class RolesServiceProxy extends ServiceProxyBase { throw _error; } }).then((_response: AxiosResponse) => { - return this.transformResult(url_, _response, (_response: AxiosResponse) => this.processCreate(_response)); + return this.transformResult(url_, _response, (_response: AxiosResponse) => this.processRemoveRoleFromOrganizationUnit(_response)); }); } - protected processCreate(response: AxiosResponse): Promise { + protected processRemoveRoleFromOrganizationUnit(response: AxiosResponse): Promise { const status = response.status; let _headers: any = {}; if (response.headers && typeof response.headers === "object") { @@ -5836,10 +5740,7 @@ export class RolesServiceProxy extends ServiceProxyBase { } if (status === 200) { const _responseText = response.data; - let result200: any = null; - let resultData200 = _responseText; - result200 = IdentityRoleDto.fromJS(resultData200); - return Promise.resolve(result200); + return Promise.resolve(null); } else if (status === 403) { const _responseText = response.data; @@ -5887,16 +5788,16 @@ export class RolesServiceProxy extends ServiceProxyBase { const _responseText = response.data; return throwException("An unexpected server error occurred.", status, _responseText, _headers); } - return Promise.resolve(null); + return Promise.resolve(null); } /** - * 更新角色 + * 向组织机构添加用户 * @param body (optional) * @return Success */ - update(body: UpdateRoleInput | undefined , cancelToken?: CancelToken | undefined): Promise { - let url_ = this.baseUrl + "/Roles/update"; + addUserToOrganizationUnit(body: AddUserToOrganizationUnitInput | undefined , cancelToken?: CancelToken | undefined): Promise { + let url_ = this.baseUrl + "/OrganizationUnits/addUserToOrganizationUnit"; url_ = url_.replace(/[?&]$/, ""); const content_ = JSON.stringify(body); @@ -5907,7 +5808,6 @@ export class RolesServiceProxy extends ServiceProxyBase { url: url_, headers: { "Content-Type": "application/json", - "Accept": "text/plain" }, cancelToken }; @@ -5921,11 +5821,11 @@ export class RolesServiceProxy extends ServiceProxyBase { throw _error; } }).then((_response: AxiosResponse) => { - return this.transformResult(url_, _response, (_response: AxiosResponse) => this.processUpdate(_response)); + return this.transformResult(url_, _response, (_response: AxiosResponse) => this.processAddUserToOrganizationUnit(_response)); }); } - protected processUpdate(response: AxiosResponse): Promise { + protected processAddUserToOrganizationUnit(response: AxiosResponse): Promise { const status = response.status; let _headers: any = {}; if (response.headers && typeof response.headers === "object") { @@ -5937,10 +5837,7 @@ export class RolesServiceProxy extends ServiceProxyBase { } if (status === 200) { const _responseText = response.data; - let result200: any = null; - let resultData200 = _responseText; - result200 = IdentityRoleDto.fromJS(resultData200); - return Promise.resolve(result200); + return Promise.resolve(null); } else if (status === 403) { const _responseText = response.data; @@ -5988,16 +5885,16 @@ export class RolesServiceProxy extends ServiceProxyBase { const _responseText = response.data; return throwException("An unexpected server error occurred.", status, _responseText, _headers); } - return Promise.resolve(null); + return Promise.resolve(null); } /** - * 删除角色 + * 向组织机构删除用户 * @param body (optional) * @return Success */ - delete(body: IdInput | undefined , cancelToken?: CancelToken | undefined): Promise { - let url_ = this.baseUrl + "/Roles/delete"; + removeUserFromOrganizationUnit(body: RemoveUserToOrganizationUnitInput | undefined , cancelToken?: CancelToken | undefined): Promise { + let url_ = this.baseUrl + "/OrganizationUnits/removeUserFromOrganizationUnit"; url_ = url_.replace(/[?&]$/, ""); const content_ = JSON.stringify(body); @@ -6021,11 +5918,11 @@ export class RolesServiceProxy extends ServiceProxyBase { throw _error; } }).then((_response: AxiosResponse) => { - return this.transformResult(url_, _response, (_response: AxiosResponse) => this.processDelete(_response)); + return this.transformResult(url_, _response, (_response: AxiosResponse) => this.processRemoveUserFromOrganizationUnit(_response)); }); } - protected processDelete(response: AxiosResponse): Promise { + protected processRemoveUserFromOrganizationUnit(response: AxiosResponse): Promise { const status = response.status; let _headers: any = {}; if (response.headers && typeof response.headers === "object") { @@ -6087,30 +5984,24 @@ export class RolesServiceProxy extends ServiceProxyBase { } return Promise.resolve(null); } -} - -export class SampleServiceProxy extends ServiceProxyBase { - private instance: AxiosInstance; - private baseUrl: string; - protected jsonParseReviver: ((key: string, value: any) => any) | undefined = undefined; - - constructor(baseUrl?: string, instance?: AxiosInstance) { - super(); - this.instance = instance ? instance : axios.create(); - this.baseUrl = baseUrl !== undefined && baseUrl !== null ? baseUrl : ""; - } /** + * 分页获取组织机构下用户 + * @param body (optional) * @return Success */ - sample( cancelToken?: CancelToken | undefined): Promise { - let url_ = this.baseUrl + "/api/FileManagement/sample"; + getUsers(body: GetOrganizationUnitUserInput | undefined , cancelToken?: CancelToken | undefined): Promise { + let url_ = this.baseUrl + "/OrganizationUnits/getUsers"; url_ = url_.replace(/[?&]$/, ""); + const content_ = JSON.stringify(body); + let options_ = { - method: "GET", + data: content_, + method: "POST", url: url_, headers: { + "Content-Type": "application/json", "Accept": "text/plain" }, cancelToken @@ -6125,11 +6016,11 @@ export class SampleServiceProxy extends ServiceProxyBase { throw _error; } }).then((_response: AxiosResponse) => { - return this.transformResult(url_, _response, (_response: AxiosResponse) => this.processSample(_response)); + return this.transformResult(url_, _response, (_response: AxiosResponse) => this.processGetUsers(_response)); }); } - protected processSample(response: AxiosResponse): Promise { + protected processGetUsers(response: AxiosResponse): Promise { const status = response.status; let _headers: any = {}; if (response.headers && typeof response.headers === "object") { @@ -6143,8 +6034,8 @@ export class SampleServiceProxy extends ServiceProxyBase { const _responseText = response.data; let result200: any = null; let resultData200 = _responseText; - result200 = SampleDto.fromJS(resultData200); - return Promise.resolve(result200); + result200 = GetOrganizationUnitUserOutputPagedResultDto.fromJS(resultData200); + return Promise.resolve(result200); } else if (status === 403) { const _responseText = response.data; @@ -6192,20 +6083,26 @@ export class SampleServiceProxy extends ServiceProxyBase { const _responseText = response.data; return throwException("An unexpected server error occurred.", status, _responseText, _headers); } - return Promise.resolve(null); + return Promise.resolve(null); } /** + * 分页获取组织机构下角色 + * @param body (optional) * @return Success */ - authorized( cancelToken?: CancelToken | undefined): Promise { - let url_ = this.baseUrl + "/api/FileManagement/sample/authorized"; + getRoles(body: GetOrganizationUnitRoleInput | undefined , cancelToken?: CancelToken | undefined): Promise { + let url_ = this.baseUrl + "/OrganizationUnits/getRoles"; url_ = url_.replace(/[?&]$/, ""); + const content_ = JSON.stringify(body); + let options_ = { - method: "GET", + data: content_, + method: "POST", url: url_, headers: { + "Content-Type": "application/json", "Accept": "text/plain" }, cancelToken @@ -6220,11 +6117,11 @@ export class SampleServiceProxy extends ServiceProxyBase { throw _error; } }).then((_response: AxiosResponse) => { - return this.transformResult(url_, _response, (_response: AxiosResponse) => this.processAuthorized(_response)); + return this.transformResult(url_, _response, (_response: AxiosResponse) => this.processGetRoles(_response)); }); } - protected processAuthorized(response: AxiosResponse): Promise { + protected processGetRoles(response: AxiosResponse): Promise { const status = response.status; let _headers: any = {}; if (response.headers && typeof response.headers === "object") { @@ -6238,8 +6135,8 @@ export class SampleServiceProxy extends ServiceProxyBase { const _responseText = response.data; let result200: any = null; let resultData200 = _responseText; - result200 = SampleDto.fromJS(resultData200); - return Promise.resolve(result200); + result200 = GetOrganizationUnitRoleOutputPagedResultDto.fromJS(resultData200); + return Promise.resolve(result200); } else if (status === 403) { const _responseText = response.data; @@ -6287,33 +6184,26 @@ export class SampleServiceProxy extends ServiceProxyBase { const _responseText = response.data; return throwException("An unexpected server error occurred.", status, _responseText, _headers); } - return Promise.resolve(null); - } -} - -export class SettingsServiceProxy extends ServiceProxyBase { - private instance: AxiosInstance; - private baseUrl: string; - protected jsonParseReviver: ((key: string, value: any) => any) | undefined = undefined; - - constructor(baseUrl?: string, instance?: AxiosInstance) { - super(); - this.instance = instance ? instance : axios.create(); - this.baseUrl = baseUrl !== undefined && baseUrl !== null ? baseUrl : ""; + return Promise.resolve(null); } /** - * 获取所有Setting + * 获取不在组织机构的用户 + * @param body (optional) * @return Success */ - all( cancelToken?: CancelToken | undefined): Promise { - let url_ = this.baseUrl + "/Settings/all"; + getUnAddUsers(body: GetUnAddUserInput | undefined , cancelToken?: CancelToken | undefined): Promise { + let url_ = this.baseUrl + "/OrganizationUnits/getUnAddUsers"; url_ = url_.replace(/[?&]$/, ""); + const content_ = JSON.stringify(body); + let options_ = { + data: content_, method: "POST", url: url_, headers: { + "Content-Type": "application/json", "Accept": "text/plain" }, cancelToken @@ -6328,11 +6218,11 @@ export class SettingsServiceProxy extends ServiceProxyBase { throw _error; } }).then((_response: AxiosResponse) => { - return this.transformResult(url_, _response, (_response: AxiosResponse) => this.processAll(_response)); + return this.transformResult(url_, _response, (_response: AxiosResponse) => this.processGetUnAddUsers(_response)); }); } - protected processAll(response: AxiosResponse): Promise { + protected processGetUnAddUsers(response: AxiosResponse): Promise { const status = response.status; let _headers: any = {}; if (response.headers && typeof response.headers === "object") { @@ -6346,15 +6236,8 @@ export class SettingsServiceProxy extends ServiceProxyBase { const _responseText = response.data; let result200: any = null; let resultData200 = _responseText; - if (Array.isArray(resultData200)) { - result200 = [] as any; - for (let item of resultData200) - result200!.push(SettingOutput.fromJS(item)); - } - else { - result200 = null; - } - return Promise.resolve(result200); + result200 = GetUnAddUserOutputPagedResultDto.fromJS(resultData200); + return Promise.resolve(result200); } else if (status === 403) { const _responseText = response.data; @@ -6402,16 +6285,16 @@ export class SettingsServiceProxy extends ServiceProxyBase { const _responseText = response.data; return throwException("An unexpected server error occurred.", status, _responseText, _headers); } - return Promise.resolve(null); + return Promise.resolve(null); } /** - * 更新Setting + * 获取不在组织机构的角色 * @param body (optional) * @return Success */ - update(body: UpdateSettingInput | undefined , cancelToken?: CancelToken | undefined): Promise { - let url_ = this.baseUrl + "/Settings/update"; + getUnAddRoles(body: GetUnAddRoleInput | undefined , cancelToken?: CancelToken | undefined): Promise { + let url_ = this.baseUrl + "/OrganizationUnits/getUnAddRoles"; url_ = url_.replace(/[?&]$/, ""); const content_ = JSON.stringify(body); @@ -6422,6 +6305,7 @@ export class SettingsServiceProxy extends ServiceProxyBase { url: url_, headers: { "Content-Type": "application/json", + "Accept": "text/plain" }, cancelToken }; @@ -6435,11 +6319,11 @@ export class SettingsServiceProxy extends ServiceProxyBase { throw _error; } }).then((_response: AxiosResponse) => { - return this.transformResult(url_, _response, (_response: AxiosResponse) => this.processUpdate(_response)); + return this.transformResult(url_, _response, (_response: AxiosResponse) => this.processGetUnAddRoles(_response)); }); } - protected processUpdate(response: AxiosResponse): Promise { + protected processGetUnAddRoles(response: AxiosResponse): Promise { const status = response.status; let _headers: any = {}; if (response.headers && typeof response.headers === "object") { @@ -6451,7 +6335,10 @@ export class SettingsServiceProxy extends ServiceProxyBase { } if (status === 200) { const _responseText = response.data; - return Promise.resolve(null); + let result200: any = null; + let resultData200 = _responseText; + result200 = GetUnAddRoleOutputPagedResultDto.fromJS(resultData200); + return Promise.resolve(result200); } else if (status === 403) { const _responseText = response.data; @@ -6499,11 +6386,11 @@ export class SettingsServiceProxy extends ServiceProxyBase { const _responseText = response.data; return throwException("An unexpected server error occurred.", status, _responseText, _headers); } - return Promise.resolve(null); + return Promise.resolve(null); } } -export class TenantsServiceProxy extends ServiceProxyBase { +export class PermissionsServiceProxy extends ServiceProxyBase { private instance: AxiosInstance; private baseUrl: string; protected jsonParseReviver: ((key: string, value: any) => any) | undefined = undefined; @@ -6515,12 +6402,12 @@ export class TenantsServiceProxy extends ServiceProxyBase { } /** - * 通过名称获取租户信息 + * 获取角色权限 * @param body (optional) * @return Success */ - find(body: FindTenantByNameInput | undefined , cancelToken?: CancelToken | undefined): Promise { - let url_ = this.baseUrl + "/Tenants/find"; + tree(body: GetPermissionInput | undefined , cancelToken?: CancelToken | undefined): Promise { + let url_ = this.baseUrl + "/Permissions/tree"; url_ = url_.replace(/[?&]$/, ""); const content_ = JSON.stringify(body); @@ -6545,11 +6432,11 @@ export class TenantsServiceProxy extends ServiceProxyBase { throw _error; } }).then((_response: AxiosResponse) => { - return this.transformResult(url_, _response, (_response: AxiosResponse) => this.processFind(_response)); + return this.transformResult(url_, _response, (_response: AxiosResponse) => this.processTree(_response)); }); } - protected processFind(response: AxiosResponse): Promise { + protected processTree(response: AxiosResponse): Promise { const status = response.status; let _headers: any = {}; if (response.headers && typeof response.headers === "object") { @@ -6563,8 +6450,8 @@ export class TenantsServiceProxy extends ServiceProxyBase { const _responseText = response.data; let result200: any = null; let resultData200 = _responseText; - result200 = FindTenantResultDto.fromJS(resultData200); - return Promise.resolve(result200); + result200 = PermissionOutput.fromJS(resultData200); + return Promise.resolve(result200); } else if (status === 403) { const _responseText = response.data; @@ -6612,16 +6499,16 @@ export class TenantsServiceProxy extends ServiceProxyBase { const _responseText = response.data; return throwException("An unexpected server error occurred.", status, _responseText, _headers); } - return Promise.resolve(null); + return Promise.resolve(null); } /** - * 分页获取租户信息 + * 更新角色 * @param body (optional) * @return Success */ - page(body: PagingTenantInput | undefined , cancelToken?: CancelToken | undefined): Promise { - let url_ = this.baseUrl + "/Tenants/page"; + update(body: UpdateRolePermissionsInput | undefined , cancelToken?: CancelToken | undefined): Promise { + let url_ = this.baseUrl + "/Permissions/update"; url_ = url_.replace(/[?&]$/, ""); const content_ = JSON.stringify(body); @@ -6632,7 +6519,6 @@ export class TenantsServiceProxy extends ServiceProxyBase { url: url_, headers: { "Content-Type": "application/json", - "Accept": "text/plain" }, cancelToken }; @@ -6646,11 +6532,11 @@ export class TenantsServiceProxy extends ServiceProxyBase { throw _error; } }).then((_response: AxiosResponse) => { - return this.transformResult(url_, _response, (_response: AxiosResponse) => this.processPage(_response)); + return this.transformResult(url_, _response, (_response: AxiosResponse) => this.processUpdate(_response)); }); } - protected processPage(response: AxiosResponse): Promise { + protected processUpdate(response: AxiosResponse): Promise { const status = response.status; let _headers: any = {}; if (response.headers && typeof response.headers === "object") { @@ -6662,10 +6548,7 @@ export class TenantsServiceProxy extends ServiceProxyBase { } if (status === 200) { const _responseText = response.data; - let result200: any = null; - let resultData200 = _responseText; - result200 = TenantDtoPagedResultDto.fromJS(resultData200); - return Promise.resolve(result200); + return Promise.resolve(null); } else if (status === 403) { const _responseText = response.data; @@ -6713,26 +6596,33 @@ export class TenantsServiceProxy extends ServiceProxyBase { const _responseText = response.data; return throwException("An unexpected server error occurred.", status, _responseText, _headers); } - return Promise.resolve(null); + return Promise.resolve(null); + } +} + +export class RolesServiceProxy extends ServiceProxyBase { + private instance: AxiosInstance; + private baseUrl: string; + protected jsonParseReviver: ((key: string, value: any) => any) | undefined = undefined; + + constructor(baseUrl?: string, instance?: AxiosInstance) { + super(); + this.instance = instance ? instance : axios.create(); + this.baseUrl = baseUrl !== undefined && baseUrl !== null ? baseUrl : ""; } /** - * 创建租户 - * @param body (optional) + * 获取所有角色 * @return Success */ - create(body: TenantCreateDto | undefined , cancelToken?: CancelToken | undefined): Promise { - let url_ = this.baseUrl + "/Tenants/create"; + all( cancelToken?: CancelToken | undefined): Promise { + let url_ = this.baseUrl + "/Roles/all"; url_ = url_.replace(/[?&]$/, ""); - const content_ = JSON.stringify(body); - let options_ = { - data: content_, method: "POST", url: url_, headers: { - "Content-Type": "application/json", "Accept": "text/plain" }, cancelToken @@ -6747,11 +6637,11 @@ export class TenantsServiceProxy extends ServiceProxyBase { throw _error; } }).then((_response: AxiosResponse) => { - return this.transformResult(url_, _response, (_response: AxiosResponse) => this.processCreate(_response)); + return this.transformResult(url_, _response, (_response: AxiosResponse) => this.processAll(_response)); }); } - protected processCreate(response: AxiosResponse): Promise { + protected processAll(response: AxiosResponse): Promise { const status = response.status; let _headers: any = {}; if (response.headers && typeof response.headers === "object") { @@ -6765,8 +6655,8 @@ export class TenantsServiceProxy extends ServiceProxyBase { const _responseText = response.data; let result200: any = null; let resultData200 = _responseText; - result200 = TenantDto.fromJS(resultData200); - return Promise.resolve(result200); + result200 = IdentityRoleDtoListResultDto.fromJS(resultData200); + return Promise.resolve(result200); } else if (status === 403) { const _responseText = response.data; @@ -6814,16 +6704,16 @@ export class TenantsServiceProxy extends ServiceProxyBase { const _responseText = response.data; return throwException("An unexpected server error occurred.", status, _responseText, _headers); } - return Promise.resolve(null); + return Promise.resolve(null); } /** - * 更新租户 + * 分页获取角色 * @param body (optional) * @return Success */ - update(body: UpdateTenantInput | undefined , cancelToken?: CancelToken | undefined): Promise { - let url_ = this.baseUrl + "/Tenants/update"; + page(body: PagingRoleListInput | undefined , cancelToken?: CancelToken | undefined): Promise { + let url_ = this.baseUrl + "/Roles/page"; url_ = url_.replace(/[?&]$/, ""); const content_ = JSON.stringify(body); @@ -6848,11 +6738,11 @@ export class TenantsServiceProxy extends ServiceProxyBase { throw _error; } }).then((_response: AxiosResponse) => { - return this.transformResult(url_, _response, (_response: AxiosResponse) => this.processUpdate(_response)); + return this.transformResult(url_, _response, (_response: AxiosResponse) => this.processPage(_response)); }); } - protected processUpdate(response: AxiosResponse): Promise { + protected processPage(response: AxiosResponse): Promise { const status = response.status; let _headers: any = {}; if (response.headers && typeof response.headers === "object") { @@ -6866,8 +6756,8 @@ export class TenantsServiceProxy extends ServiceProxyBase { const _responseText = response.data; let result200: any = null; let resultData200 = _responseText; - result200 = TenantDto.fromJS(resultData200); - return Promise.resolve(result200); + result200 = IdentityRoleDtoPagedResultDto.fromJS(resultData200); + return Promise.resolve(result200); } else if (status === 403) { const _responseText = response.data; @@ -6915,16 +6805,16 @@ export class TenantsServiceProxy extends ServiceProxyBase { const _responseText = response.data; return throwException("An unexpected server error occurred.", status, _responseText, _headers); } - return Promise.resolve(null); + return Promise.resolve(null); } /** - * 删除租户 + * 创建角色 * @param body (optional) * @return Success */ - delete(body: IdInput | undefined , cancelToken?: CancelToken | undefined): Promise { - let url_ = this.baseUrl + "/Tenants/delete"; + create(body: IdentityRoleCreateDto | undefined , cancelToken?: CancelToken | undefined): Promise { + let url_ = this.baseUrl + "/Roles/create"; url_ = url_.replace(/[?&]$/, ""); const content_ = JSON.stringify(body); @@ -6935,6 +6825,7 @@ export class TenantsServiceProxy extends ServiceProxyBase { url: url_, headers: { "Content-Type": "application/json", + "Accept": "text/plain" }, cancelToken }; @@ -6948,11 +6839,11 @@ export class TenantsServiceProxy extends ServiceProxyBase { throw _error; } }).then((_response: AxiosResponse) => { - return this.transformResult(url_, _response, (_response: AxiosResponse) => this.processDelete(_response)); + return this.transformResult(url_, _response, (_response: AxiosResponse) => this.processCreate(_response)); }); } - protected processDelete(response: AxiosResponse): Promise { + protected processCreate(response: AxiosResponse): Promise { const status = response.status; let _headers: any = {}; if (response.headers && typeof response.headers === "object") { @@ -6964,7 +6855,10 @@ export class TenantsServiceProxy extends ServiceProxyBase { } if (status === 200) { const _responseText = response.data; - return Promise.resolve(null); + let result200: any = null; + let resultData200 = _responseText; + result200 = IdentityRoleDto.fromJS(resultData200); + return Promise.resolve(result200); } else if (status === 403) { const _responseText = response.data; @@ -7012,16 +6906,16 @@ export class TenantsServiceProxy extends ServiceProxyBase { const _responseText = response.data; return throwException("An unexpected server error occurred.", status, _responseText, _headers); } - return Promise.resolve(null); + return Promise.resolve(null); } /** - * 获取租户连接字符串 + * 更新角色 * @param body (optional) * @return Success */ - getConnectionString(body: IdInput | undefined , cancelToken?: CancelToken | undefined): Promise { - let url_ = this.baseUrl + "/Tenants/getConnectionString"; + update(body: UpdateRoleInput | undefined , cancelToken?: CancelToken | undefined): Promise { + let url_ = this.baseUrl + "/Roles/update"; url_ = url_.replace(/[?&]$/, ""); const content_ = JSON.stringify(body); @@ -7046,11 +6940,11 @@ export class TenantsServiceProxy extends ServiceProxyBase { throw _error; } }).then((_response: AxiosResponse) => { - return this.transformResult(url_, _response, (_response: AxiosResponse) => this.processGetConnectionString(_response)); + return this.transformResult(url_, _response, (_response: AxiosResponse) => this.processUpdate(_response)); }); } - protected processGetConnectionString(response: AxiosResponse): Promise { + protected processUpdate(response: AxiosResponse): Promise { const status = response.status; let _headers: any = {}; if (response.headers && typeof response.headers === "object") { @@ -7064,9 +6958,8 @@ export class TenantsServiceProxy extends ServiceProxyBase { const _responseText = response.data; let result200: any = null; let resultData200 = _responseText; - result200 = resultData200 !== undefined ? resultData200 : null; - - return Promise.resolve(result200); + result200 = IdentityRoleDto.fromJS(resultData200); + return Promise.resolve(result200); } else if (status === 403) { const _responseText = response.data; @@ -7114,16 +7007,16 @@ export class TenantsServiceProxy extends ServiceProxyBase { const _responseText = response.data; return throwException("An unexpected server error occurred.", status, _responseText, _headers); } - return Promise.resolve(null); + return Promise.resolve(null); } /** - * 更新租户连接字符串 + * 删除角色 * @param body (optional) * @return Success */ - updateConnectionString(body: UpdateConnectionStringInput | undefined , cancelToken?: CancelToken | undefined): Promise { - let url_ = this.baseUrl + "/Tenants/updateConnectionString"; + delete(body: IdInput | undefined , cancelToken?: CancelToken | undefined): Promise { + let url_ = this.baseUrl + "/Roles/delete"; url_ = url_.replace(/[?&]$/, ""); const content_ = JSON.stringify(body); @@ -7147,11 +7040,11 @@ export class TenantsServiceProxy extends ServiceProxyBase { throw _error; } }).then((_response: AxiosResponse) => { - return this.transformResult(url_, _response, (_response: AxiosResponse) => this.processUpdateConnectionString(_response)); + return this.transformResult(url_, _response, (_response: AxiosResponse) => this.processDelete(_response)); }); } - protected processUpdateConnectionString(response: AxiosResponse): Promise { + protected processDelete(response: AxiosResponse): Promise { const status = response.status; let _headers: any = {}; if (response.headers && typeof response.headers === "object") { @@ -7213,24 +7106,31 @@ export class TenantsServiceProxy extends ServiceProxyBase { } return Promise.resolve(null); } +} + +export class SampleServiceProxy extends ServiceProxyBase { + private instance: AxiosInstance; + private baseUrl: string; + protected jsonParseReviver: ((key: string, value: any) => any) | undefined = undefined; + + constructor(baseUrl?: string, instance?: AxiosInstance) { + super(); + this.instance = instance ? instance : axios.create(); + this.baseUrl = baseUrl !== undefined && baseUrl !== null ? baseUrl : ""; + } /** - * 删除租户连接字符串 - * @param body (optional) * @return Success */ - deleteConnectionString(body: IdInput | undefined , cancelToken?: CancelToken | undefined): Promise { - let url_ = this.baseUrl + "/Tenants/deleteConnectionString"; + sample( cancelToken?: CancelToken | undefined): Promise { + let url_ = this.baseUrl + "/api/FileManagement/sample"; url_ = url_.replace(/[?&]$/, ""); - const content_ = JSON.stringify(body); - let options_ = { - data: content_, - method: "POST", + method: "GET", url: url_, headers: { - "Content-Type": "application/json", + "Accept": "text/plain" }, cancelToken }; @@ -7244,11 +7144,11 @@ export class TenantsServiceProxy extends ServiceProxyBase { throw _error; } }).then((_response: AxiosResponse) => { - return this.transformResult(url_, _response, (_response: AxiosResponse) => this.processDeleteConnectionString(_response)); + return this.transformResult(url_, _response, (_response: AxiosResponse) => this.processSample(_response)); }); } - protected processDeleteConnectionString(response: AxiosResponse): Promise { + protected processSample(response: AxiosResponse): Promise { const status = response.status; let _headers: any = {}; if (response.headers && typeof response.headers === "object") { @@ -7260,7 +7160,10 @@ export class TenantsServiceProxy extends ServiceProxyBase { } if (status === 200) { const _responseText = response.data; - return Promise.resolve(null); + let result200: any = null; + let resultData200 = _responseText; + result200 = SampleDto.fromJS(resultData200); + return Promise.resolve(result200); } else if (status === 403) { const _responseText = response.data; @@ -7308,38 +7211,20 @@ export class TenantsServiceProxy extends ServiceProxyBase { const _responseText = response.data; return throwException("An unexpected server error occurred.", status, _responseText, _headers); } - return Promise.resolve(null); - } -} - -export class UsersServiceProxy extends ServiceProxyBase { - private instance: AxiosInstance; - private baseUrl: string; - protected jsonParseReviver: ((key: string, value: any) => any) | undefined = undefined; - - constructor(baseUrl?: string, instance?: AxiosInstance) { - super(); - this.instance = instance ? instance : axios.create(); - this.baseUrl = baseUrl !== undefined && baseUrl !== null ? baseUrl : ""; + return Promise.resolve(null); } /** - * 分页获取用户信息 - * @param body (optional) * @return Success */ - page(body: PagingUserListInput | undefined , cancelToken?: CancelToken | undefined): Promise { - let url_ = this.baseUrl + "/Users/page"; + authorized( cancelToken?: CancelToken | undefined): Promise { + let url_ = this.baseUrl + "/api/FileManagement/sample/authorized"; url_ = url_.replace(/[?&]$/, ""); - const content_ = JSON.stringify(body); - let options_ = { - data: content_, - method: "POST", + method: "GET", url: url_, headers: { - "Content-Type": "application/json", "Accept": "text/plain" }, cancelToken @@ -7354,11 +7239,11 @@ export class UsersServiceProxy extends ServiceProxyBase { throw _error; } }).then((_response: AxiosResponse) => { - return this.transformResult(url_, _response, (_response: AxiosResponse) => this.processPage(_response)); + return this.transformResult(url_, _response, (_response: AxiosResponse) => this.processAuthorized(_response)); }); } - protected processPage(response: AxiosResponse): Promise { + protected processAuthorized(response: AxiosResponse): Promise { const status = response.status; let _headers: any = {}; if (response.headers && typeof response.headers === "object") { @@ -7372,8 +7257,8 @@ export class UsersServiceProxy extends ServiceProxyBase { const _responseText = response.data; let result200: any = null; let resultData200 = _responseText; - result200 = IdentityUserDtoPagedResultDto.fromJS(resultData200); - return Promise.resolve(result200); + result200 = SampleDto.fromJS(resultData200); + return Promise.resolve(result200); } else if (status === 403) { const _responseText = response.data; @@ -7421,27 +7306,33 @@ export class UsersServiceProxy extends ServiceProxyBase { const _responseText = response.data; return throwException("An unexpected server error occurred.", status, _responseText, _headers); } - return Promise.resolve(null); + return Promise.resolve(null); + } +} + +export class SettingsServiceProxy extends ServiceProxyBase { + private instance: AxiosInstance; + private baseUrl: string; + protected jsonParseReviver: ((key: string, value: any) => any) | undefined = undefined; + + constructor(baseUrl?: string, instance?: AxiosInstance) { + super(); + this.instance = instance ? instance : axios.create(); + this.baseUrl = baseUrl !== undefined && baseUrl !== null ? baseUrl : ""; } /** - * 导出用户列表 - * @param body (optional) + * 获取所有Setting * @return Success */ - export(body: PagingUserListInput | undefined , cancelToken?: CancelToken | undefined): Promise { - let url_ = this.baseUrl + "/Users/export"; + all( cancelToken?: CancelToken | undefined): Promise { + let url_ = this.baseUrl + "/Settings/all"; url_ = url_.replace(/[?&]$/, ""); - const content_ = JSON.stringify(body); - let options_ = { - data: content_, - responseType: "blob", method: "POST", url: url_, headers: { - "Content-Type": "application/json", "Accept": "text/plain" }, cancelToken @@ -7456,11 +7347,11 @@ export class UsersServiceProxy extends ServiceProxyBase { throw _error; } }).then((_response: AxiosResponse) => { - return this.transformResult(url_, _response, (_response: AxiosResponse) => this.processExport(_response)); + return this.transformResult(url_, _response, (_response: AxiosResponse) => this.processAll(_response)); }); } - protected processExport(response: AxiosResponse): Promise { + protected processAll(response: AxiosResponse): Promise { const status = response.status; let _headers: any = {}; if (response.headers && typeof response.headers === "object") { @@ -7470,11 +7361,20 @@ export class UsersServiceProxy extends ServiceProxyBase { } } } - if (status === 200 || status === 206) { - const contentDisposition = response.headers ? response.headers["content-disposition"] : undefined; - const fileNameMatch = contentDisposition ? /filename="?([^"]*?)"?(;|$)/g.exec(contentDisposition) : undefined; - const fileName = fileNameMatch && fileNameMatch.length > 1 ? fileNameMatch[1] : undefined; - return Promise.resolve({ fileName: fileName, status: status, data: new Blob([response.data]), headers: _headers }); + if (status === 200) { + const _responseText = response.data; + let result200: any = null; + let resultData200 = _responseText; + if (Array.isArray(resultData200)) { + result200 = [] as any; + for (let item of resultData200) + result200!.push(SettingOutput.fromJS(item)); + } + else { + result200 = null; + } + return Promise.resolve(result200); + } else if (status === 403) { const _responseText = response.data; let result403: any = null; @@ -7521,16 +7421,16 @@ export class UsersServiceProxy extends ServiceProxyBase { const _responseText = response.data; return throwException("An unexpected server error occurred.", status, _responseText, _headers); } - return Promise.resolve(null); + return Promise.resolve(null); } /** - * 创建用户 + * 更新Setting * @param body (optional) * @return Success */ - create(body: IdentityUserCreateDto | undefined , cancelToken?: CancelToken | undefined): Promise { - let url_ = this.baseUrl + "/Users/create"; + update(body: UpdateSettingInput | undefined , cancelToken?: CancelToken | undefined): Promise { + let url_ = this.baseUrl + "/Settings/update"; url_ = url_.replace(/[?&]$/, ""); const content_ = JSON.stringify(body); @@ -7541,7 +7441,6 @@ export class UsersServiceProxy extends ServiceProxyBase { url: url_, headers: { "Content-Type": "application/json", - "Accept": "text/plain" }, cancelToken }; @@ -7555,11 +7454,11 @@ export class UsersServiceProxy extends ServiceProxyBase { throw _error; } }).then((_response: AxiosResponse) => { - return this.transformResult(url_, _response, (_response: AxiosResponse) => this.processCreate(_response)); + return this.transformResult(url_, _response, (_response: AxiosResponse) => this.processUpdate(_response)); }); } - protected processCreate(response: AxiosResponse): Promise { + protected processUpdate(response: AxiosResponse): Promise { const status = response.status; let _headers: any = {}; if (response.headers && typeof response.headers === "object") { @@ -7571,10 +7470,7 @@ export class UsersServiceProxy extends ServiceProxyBase { } if (status === 200) { const _responseText = response.data; - let result200: any = null; - let resultData200 = _responseText; - result200 = IdentityUserDto.fromJS(resultData200); - return Promise.resolve(result200); + return Promise.resolve(null); } else if (status === 403) { const _responseText = response.data; @@ -7622,16 +7518,28 @@ export class UsersServiceProxy extends ServiceProxyBase { const _responseText = response.data; return throwException("An unexpected server error occurred.", status, _responseText, _headers); } - return Promise.resolve(null); + return Promise.resolve(null); + } +} + +export class TenantsServiceProxy extends ServiceProxyBase { + private instance: AxiosInstance; + private baseUrl: string; + protected jsonParseReviver: ((key: string, value: any) => any) | undefined = undefined; + + constructor(baseUrl?: string, instance?: AxiosInstance) { + super(); + this.instance = instance ? instance : axios.create(); + this.baseUrl = baseUrl !== undefined && baseUrl !== null ? baseUrl : ""; } /** - * 编辑用户 + * 通过名称获取租户信息 * @param body (optional) * @return Success */ - update(body: UpdateUserInput | undefined , cancelToken?: CancelToken | undefined): Promise { - let url_ = this.baseUrl + "/Users/update"; + find(body: FindTenantByNameInput | undefined , cancelToken?: CancelToken | undefined): Promise { + let url_ = this.baseUrl + "/Tenants/find"; url_ = url_.replace(/[?&]$/, ""); const content_ = JSON.stringify(body); @@ -7656,11 +7564,11 @@ export class UsersServiceProxy extends ServiceProxyBase { throw _error; } }).then((_response: AxiosResponse) => { - return this.transformResult(url_, _response, (_response: AxiosResponse) => this.processUpdate(_response)); + return this.transformResult(url_, _response, (_response: AxiosResponse) => this.processFind(_response)); }); } - protected processUpdate(response: AxiosResponse): Promise { + protected processFind(response: AxiosResponse): Promise { const status = response.status; let _headers: any = {}; if (response.headers && typeof response.headers === "object") { @@ -7674,8 +7582,8 @@ export class UsersServiceProxy extends ServiceProxyBase { const _responseText = response.data; let result200: any = null; let resultData200 = _responseText; - result200 = IdentityUserDto.fromJS(resultData200); - return Promise.resolve(result200); + result200 = FindTenantResultDto.fromJS(resultData200); + return Promise.resolve(result200); } else if (status === 403) { const _responseText = response.data; @@ -7723,16 +7631,16 @@ export class UsersServiceProxy extends ServiceProxyBase { const _responseText = response.data; return throwException("An unexpected server error occurred.", status, _responseText, _headers); } - return Promise.resolve(null); + return Promise.resolve(null); } /** - * 删除用户 + * 分页获取租户信息 * @param body (optional) * @return Success */ - delete(body: IdInput | undefined , cancelToken?: CancelToken | undefined): Promise { - let url_ = this.baseUrl + "/Users/delete"; + page(body: PagingTenantInput | undefined , cancelToken?: CancelToken | undefined): Promise { + let url_ = this.baseUrl + "/Tenants/page"; url_ = url_.replace(/[?&]$/, ""); const content_ = JSON.stringify(body); @@ -7743,6 +7651,7 @@ export class UsersServiceProxy extends ServiceProxyBase { url: url_, headers: { "Content-Type": "application/json", + "Accept": "text/plain" }, cancelToken }; @@ -7756,11 +7665,11 @@ export class UsersServiceProxy extends ServiceProxyBase { throw _error; } }).then((_response: AxiosResponse) => { - return this.transformResult(url_, _response, (_response: AxiosResponse) => this.processDelete(_response)); + return this.transformResult(url_, _response, (_response: AxiosResponse) => this.processPage(_response)); }); } - protected processDelete(response: AxiosResponse): Promise { + protected processPage(response: AxiosResponse): Promise { const status = response.status; let _headers: any = {}; if (response.headers && typeof response.headers === "object") { @@ -7772,7 +7681,10 @@ export class UsersServiceProxy extends ServiceProxyBase { } if (status === 200) { const _responseText = response.data; - return Promise.resolve(null); + let result200: any = null; + let resultData200 = _responseText; + result200 = TenantDtoPagedResultDto.fromJS(resultData200); + return Promise.resolve(result200); } else if (status === 403) { const _responseText = response.data; @@ -7820,16 +7732,16 @@ export class UsersServiceProxy extends ServiceProxyBase { const _responseText = response.data; return throwException("An unexpected server error occurred.", status, _responseText, _headers); } - return Promise.resolve(null); + return Promise.resolve(null); } /** - * 获取用户角色信息 + * 创建租户 * @param body (optional) * @return Success */ - role(body: IdInput | undefined , cancelToken?: CancelToken | undefined): Promise { - let url_ = this.baseUrl + "/Users/role"; + create(body: TenantCreateDto | undefined , cancelToken?: CancelToken | undefined): Promise { + let url_ = this.baseUrl + "/Tenants/create"; url_ = url_.replace(/[?&]$/, ""); const content_ = JSON.stringify(body); @@ -7854,11 +7766,11 @@ export class UsersServiceProxy extends ServiceProxyBase { throw _error; } }).then((_response: AxiosResponse) => { - return this.transformResult(url_, _response, (_response: AxiosResponse) => this.processRole(_response)); + return this.transformResult(url_, _response, (_response: AxiosResponse) => this.processCreate(_response)); }); } - protected processRole(response: AxiosResponse): Promise { + protected processCreate(response: AxiosResponse): Promise { const status = response.status; let _headers: any = {}; if (response.headers && typeof response.headers === "object") { @@ -7872,8 +7784,8 @@ export class UsersServiceProxy extends ServiceProxyBase { const _responseText = response.data; let result200: any = null; let resultData200 = _responseText; - result200 = IdentityRoleDtoListResultDto.fromJS(resultData200); - return Promise.resolve(result200); + result200 = TenantDto.fromJS(resultData200); + return Promise.resolve(result200); } else if (status === 403) { const _responseText = response.data; @@ -7921,16 +7833,16 @@ export class UsersServiceProxy extends ServiceProxyBase { const _responseText = response.data; return throwException("An unexpected server error occurred.", status, _responseText, _headers); } - return Promise.resolve(null); + return Promise.resolve(null); } /** - * 修改当前用户密码 + * 更新租户 * @param body (optional) * @return Success */ - changePassword(body: ChangePasswordInput | undefined , cancelToken?: CancelToken | undefined): Promise { - let url_ = this.baseUrl + "/Users/changePassword"; + update(body: UpdateTenantInput | undefined , cancelToken?: CancelToken | undefined): Promise { + let url_ = this.baseUrl + "/Tenants/update"; url_ = url_.replace(/[?&]$/, ""); const content_ = JSON.stringify(body); @@ -7955,11 +7867,11 @@ export class UsersServiceProxy extends ServiceProxyBase { throw _error; } }).then((_response: AxiosResponse) => { - return this.transformResult(url_, _response, (_response: AxiosResponse) => this.processChangePassword(_response)); + return this.transformResult(url_, _response, (_response: AxiosResponse) => this.processUpdate(_response)); }); } - protected processChangePassword(response: AxiosResponse): Promise { + protected processUpdate(response: AxiosResponse): Promise { const status = response.status; let _headers: any = {}; if (response.headers && typeof response.headers === "object") { @@ -7973,9 +7885,8 @@ export class UsersServiceProxy extends ServiceProxyBase { const _responseText = response.data; let result200: any = null; let resultData200 = _responseText; - result200 = resultData200 !== undefined ? resultData200 : null; - - return Promise.resolve(result200); + result200 = TenantDto.fromJS(resultData200); + return Promise.resolve(result200); } else if (status === 403) { const _responseText = response.data; @@ -8023,16 +7934,16 @@ export class UsersServiceProxy extends ServiceProxyBase { const _responseText = response.data; return throwException("An unexpected server error occurred.", status, _responseText, _headers); } - return Promise.resolve(null); + return Promise.resolve(null); } /** - * 锁定用户 + * 删除租户 * @param body (optional) * @return Success */ - lock(body: LockUserInput | undefined , cancelToken?: CancelToken | undefined): Promise { - let url_ = this.baseUrl + "/Users/lock"; + delete(body: IdInput | undefined , cancelToken?: CancelToken | undefined): Promise { + let url_ = this.baseUrl + "/Tenants/delete"; url_ = url_.replace(/[?&]$/, ""); const content_ = JSON.stringify(body); @@ -8056,11 +7967,11 @@ export class UsersServiceProxy extends ServiceProxyBase { throw _error; } }).then((_response: AxiosResponse) => { - return this.transformResult(url_, _response, (_response: AxiosResponse) => this.processLock(_response)); + return this.transformResult(url_, _response, (_response: AxiosResponse) => this.processDelete(_response)); }); } - protected processLock(response: AxiosResponse): Promise { + protected processDelete(response: AxiosResponse): Promise { const status = response.status; let _headers: any = {}; if (response.headers && typeof response.headers === "object") { @@ -8122,61 +8033,1760 @@ export class UsersServiceProxy extends ServiceProxyBase { } return Promise.resolve(null); } -} -export class AbpLoginResult implements IAbpLoginResult { - result!: LoginResultType; - readonly description!: string | undefined; + /** + * 获取租户连接字符串 + * @param body (optional) + * @return Success + */ + getConnectionString(body: IdInput | undefined , cancelToken?: CancelToken | undefined): Promise { + let url_ = this.baseUrl + "/Tenants/getConnectionString"; + url_ = url_.replace(/[?&]$/, ""); - constructor(data?: IAbpLoginResult) { - if (data) { - for (var property in data) { - if (data.hasOwnProperty(property)) - (this)[property] = (data)[property]; - } - } - } + const content_ = JSON.stringify(body); - init(_data?: any) { - if (_data) { - this.result = _data["result"]; - (this).description = _data["description"]; - } - } + let options_ = { + data: content_, + method: "POST", + url: url_, + headers: { + "Content-Type": "application/json", + "Accept": "text/plain" + }, + cancelToken + }; - static fromJS(data: any): AbpLoginResult { - data = typeof data === 'object' ? data : {}; - let result = new AbpLoginResult(); - result.init(data); - return result; + return this.transformOptions(options_).then(transformedOptions_ => { + return this.instance.request(transformedOptions_); + }).catch((_error: any) => { + if (isAxiosError(_error) && _error.response) { + return _error.response; + } else { + throw _error; + } + }).then((_response: AxiosResponse) => { + return this.transformResult(url_, _response, (_response: AxiosResponse) => this.processGetConnectionString(_response)); + }); } - toJSON(data?: any) { - data = typeof data === 'object' ? data : {}; - data["result"] = this.result; - data["description"] = this.description; + protected processGetConnectionString(response: AxiosResponse): Promise { + const status = response.status; + let _headers: any = {}; + if (response.headers && typeof response.headers === "object") { + for (let k in response.headers) { + if (response.headers.hasOwnProperty(k)) { + _headers[k] = response.headers[k]; + } + } + } + if (status === 200) { + const _responseText = response.data; + let result200: any = null; + let resultData200 = _responseText; + result200 = resultData200 !== undefined ? resultData200 : null; + + return Promise.resolve(result200); + + } else if (status === 403) { + const _responseText = response.data; + let result403: any = null; + let resultData403 = _responseText; + result403 = RemoteServiceErrorResponse.fromJS(resultData403); + return throwException("Forbidden", status, _responseText, _headers, result403); + + } else if (status === 401) { + const _responseText = response.data; + let result401: any = null; + let resultData401 = _responseText; + result401 = RemoteServiceErrorResponse.fromJS(resultData401); + return throwException("Unauthorized", status, _responseText, _headers, result401); + + } else if (status === 400) { + const _responseText = response.data; + let result400: any = null; + let resultData400 = _responseText; + result400 = RemoteServiceErrorResponse.fromJS(resultData400); + return throwException("Bad Request", status, _responseText, _headers, result400); + + } else if (status === 404) { + const _responseText = response.data; + let result404: any = null; + let resultData404 = _responseText; + result404 = RemoteServiceErrorResponse.fromJS(resultData404); + return throwException("Not Found", status, _responseText, _headers, result404); + + } else if (status === 501) { + const _responseText = response.data; + let result501: any = null; + let resultData501 = _responseText; + result501 = RemoteServiceErrorResponse.fromJS(resultData501); + return throwException("Server Error", status, _responseText, _headers, result501); + + } else if (status === 500) { + const _responseText = response.data; + let result500: any = null; + let resultData500 = _responseText; + result500 = RemoteServiceErrorResponse.fromJS(resultData500); + return throwException("Server Error", status, _responseText, _headers, result500); + + } else if (status !== 200 && status !== 204) { + const _responseText = response.data; + return throwException("An unexpected server error occurred.", status, _responseText, _headers); + } + return Promise.resolve(null); + } + + /** + * 更新租户连接字符串 + * @param body (optional) + * @return Success + */ + updateConnectionString(body: UpdateConnectionStringInput | undefined , cancelToken?: CancelToken | undefined): Promise { + let url_ = this.baseUrl + "/Tenants/updateConnectionString"; + url_ = url_.replace(/[?&]$/, ""); + + const content_ = JSON.stringify(body); + + let options_ = { + data: content_, + method: "POST", + url: url_, + headers: { + "Content-Type": "application/json", + }, + cancelToken + }; + + return this.transformOptions(options_).then(transformedOptions_ => { + return this.instance.request(transformedOptions_); + }).catch((_error: any) => { + if (isAxiosError(_error) && _error.response) { + return _error.response; + } else { + throw _error; + } + }).then((_response: AxiosResponse) => { + return this.transformResult(url_, _response, (_response: AxiosResponse) => this.processUpdateConnectionString(_response)); + }); + } + + protected processUpdateConnectionString(response: AxiosResponse): Promise { + const status = response.status; + let _headers: any = {}; + if (response.headers && typeof response.headers === "object") { + for (let k in response.headers) { + if (response.headers.hasOwnProperty(k)) { + _headers[k] = response.headers[k]; + } + } + } + if (status === 200) { + const _responseText = response.data; + return Promise.resolve(null); + + } else if (status === 403) { + const _responseText = response.data; + let result403: any = null; + let resultData403 = _responseText; + result403 = RemoteServiceErrorResponse.fromJS(resultData403); + return throwException("Forbidden", status, _responseText, _headers, result403); + + } else if (status === 401) { + const _responseText = response.data; + let result401: any = null; + let resultData401 = _responseText; + result401 = RemoteServiceErrorResponse.fromJS(resultData401); + return throwException("Unauthorized", status, _responseText, _headers, result401); + + } else if (status === 400) { + const _responseText = response.data; + let result400: any = null; + let resultData400 = _responseText; + result400 = RemoteServiceErrorResponse.fromJS(resultData400); + return throwException("Bad Request", status, _responseText, _headers, result400); + + } else if (status === 404) { + const _responseText = response.data; + let result404: any = null; + let resultData404 = _responseText; + result404 = RemoteServiceErrorResponse.fromJS(resultData404); + return throwException("Not Found", status, _responseText, _headers, result404); + + } else if (status === 501) { + const _responseText = response.data; + let result501: any = null; + let resultData501 = _responseText; + result501 = RemoteServiceErrorResponse.fromJS(resultData501); + return throwException("Server Error", status, _responseText, _headers, result501); + + } else if (status === 500) { + const _responseText = response.data; + let result500: any = null; + let resultData500 = _responseText; + result500 = RemoteServiceErrorResponse.fromJS(resultData500); + return throwException("Server Error", status, _responseText, _headers, result500); + + } else if (status !== 200 && status !== 204) { + const _responseText = response.data; + return throwException("An unexpected server error occurred.", status, _responseText, _headers); + } + return Promise.resolve(null); + } + + /** + * 删除租户连接字符串 + * @param body (optional) + * @return Success + */ + deleteConnectionString(body: IdInput | undefined , cancelToken?: CancelToken | undefined): Promise { + let url_ = this.baseUrl + "/Tenants/deleteConnectionString"; + url_ = url_.replace(/[?&]$/, ""); + + const content_ = JSON.stringify(body); + + let options_ = { + data: content_, + method: "POST", + url: url_, + headers: { + "Content-Type": "application/json", + }, + cancelToken + }; + + return this.transformOptions(options_).then(transformedOptions_ => { + return this.instance.request(transformedOptions_); + }).catch((_error: any) => { + if (isAxiosError(_error) && _error.response) { + return _error.response; + } else { + throw _error; + } + }).then((_response: AxiosResponse) => { + return this.transformResult(url_, _response, (_response: AxiosResponse) => this.processDeleteConnectionString(_response)); + }); + } + + protected processDeleteConnectionString(response: AxiosResponse): Promise { + const status = response.status; + let _headers: any = {}; + if (response.headers && typeof response.headers === "object") { + for (let k in response.headers) { + if (response.headers.hasOwnProperty(k)) { + _headers[k] = response.headers[k]; + } + } + } + if (status === 200) { + const _responseText = response.data; + return Promise.resolve(null); + + } else if (status === 403) { + const _responseText = response.data; + let result403: any = null; + let resultData403 = _responseText; + result403 = RemoteServiceErrorResponse.fromJS(resultData403); + return throwException("Forbidden", status, _responseText, _headers, result403); + + } else if (status === 401) { + const _responseText = response.data; + let result401: any = null; + let resultData401 = _responseText; + result401 = RemoteServiceErrorResponse.fromJS(resultData401); + return throwException("Unauthorized", status, _responseText, _headers, result401); + + } else if (status === 400) { + const _responseText = response.data; + let result400: any = null; + let resultData400 = _responseText; + result400 = RemoteServiceErrorResponse.fromJS(resultData400); + return throwException("Bad Request", status, _responseText, _headers, result400); + + } else if (status === 404) { + const _responseText = response.data; + let result404: any = null; + let resultData404 = _responseText; + result404 = RemoteServiceErrorResponse.fromJS(resultData404); + return throwException("Not Found", status, _responseText, _headers, result404); + + } else if (status === 501) { + const _responseText = response.data; + let result501: any = null; + let resultData501 = _responseText; + result501 = RemoteServiceErrorResponse.fromJS(resultData501); + return throwException("Server Error", status, _responseText, _headers, result501); + + } else if (status === 500) { + const _responseText = response.data; + let result500: any = null; + let resultData500 = _responseText; + result500 = RemoteServiceErrorResponse.fromJS(resultData500); + return throwException("Server Error", status, _responseText, _headers, result500); + + } else if (status !== 200 && status !== 204) { + const _responseText = response.data; + return throwException("An unexpected server error occurred.", status, _responseText, _headers); + } + return Promise.resolve(null); + } +} + +export class UsersServiceProxy extends ServiceProxyBase { + private instance: AxiosInstance; + private baseUrl: string; + protected jsonParseReviver: ((key: string, value: any) => any) | undefined = undefined; + + constructor(baseUrl?: string, instance?: AxiosInstance) { + super(); + this.instance = instance ? instance : axios.create(); + this.baseUrl = baseUrl !== undefined && baseUrl !== null ? baseUrl : ""; + } + + /** + * 分页获取用户信息 + * @param body (optional) + * @return Success + */ + page(body: PagingUserListInput | undefined , cancelToken?: CancelToken | undefined): Promise { + let url_ = this.baseUrl + "/Users/page"; + url_ = url_.replace(/[?&]$/, ""); + + const content_ = JSON.stringify(body); + + let options_ = { + data: content_, + method: "POST", + url: url_, + headers: { + "Content-Type": "application/json", + "Accept": "text/plain" + }, + cancelToken + }; + + return this.transformOptions(options_).then(transformedOptions_ => { + return this.instance.request(transformedOptions_); + }).catch((_error: any) => { + if (isAxiosError(_error) && _error.response) { + return _error.response; + } else { + throw _error; + } + }).then((_response: AxiosResponse) => { + return this.transformResult(url_, _response, (_response: AxiosResponse) => this.processPage(_response)); + }); + } + + protected processPage(response: AxiosResponse): Promise { + const status = response.status; + let _headers: any = {}; + if (response.headers && typeof response.headers === "object") { + for (let k in response.headers) { + if (response.headers.hasOwnProperty(k)) { + _headers[k] = response.headers[k]; + } + } + } + if (status === 200) { + const _responseText = response.data; + let result200: any = null; + let resultData200 = _responseText; + result200 = IdentityUserDtoPagedResultDto.fromJS(resultData200); + return Promise.resolve(result200); + + } else if (status === 403) { + const _responseText = response.data; + let result403: any = null; + let resultData403 = _responseText; + result403 = RemoteServiceErrorResponse.fromJS(resultData403); + return throwException("Forbidden", status, _responseText, _headers, result403); + + } else if (status === 401) { + const _responseText = response.data; + let result401: any = null; + let resultData401 = _responseText; + result401 = RemoteServiceErrorResponse.fromJS(resultData401); + return throwException("Unauthorized", status, _responseText, _headers, result401); + + } else if (status === 400) { + const _responseText = response.data; + let result400: any = null; + let resultData400 = _responseText; + result400 = RemoteServiceErrorResponse.fromJS(resultData400); + return throwException("Bad Request", status, _responseText, _headers, result400); + + } else if (status === 404) { + const _responseText = response.data; + let result404: any = null; + let resultData404 = _responseText; + result404 = RemoteServiceErrorResponse.fromJS(resultData404); + return throwException("Not Found", status, _responseText, _headers, result404); + + } else if (status === 501) { + const _responseText = response.data; + let result501: any = null; + let resultData501 = _responseText; + result501 = RemoteServiceErrorResponse.fromJS(resultData501); + return throwException("Server Error", status, _responseText, _headers, result501); + + } else if (status === 500) { + const _responseText = response.data; + let result500: any = null; + let resultData500 = _responseText; + result500 = RemoteServiceErrorResponse.fromJS(resultData500); + return throwException("Server Error", status, _responseText, _headers, result500); + + } else if (status !== 200 && status !== 204) { + const _responseText = response.data; + return throwException("An unexpected server error occurred.", status, _responseText, _headers); + } + return Promise.resolve(null); + } + + /** + * 导出用户列表 + * @param body (optional) + * @return Success + */ + export(body: PagingUserListInput | undefined , cancelToken?: CancelToken | undefined): Promise { + let url_ = this.baseUrl + "/Users/export"; + url_ = url_.replace(/[?&]$/, ""); + + const content_ = JSON.stringify(body); + + let options_ = { + data: content_, + responseType: "blob", + method: "POST", + url: url_, + headers: { + "Content-Type": "application/json", + "Accept": "text/plain" + }, + cancelToken + }; + + return this.transformOptions(options_).then(transformedOptions_ => { + return this.instance.request(transformedOptions_); + }).catch((_error: any) => { + if (isAxiosError(_error) && _error.response) { + return _error.response; + } else { + throw _error; + } + }).then((_response: AxiosResponse) => { + return this.transformResult(url_, _response, (_response: AxiosResponse) => this.processExport(_response)); + }); + } + + protected processExport(response: AxiosResponse): Promise { + const status = response.status; + let _headers: any = {}; + if (response.headers && typeof response.headers === "object") { + for (let k in response.headers) { + if (response.headers.hasOwnProperty(k)) { + _headers[k] = response.headers[k]; + } + } + } + if (status === 200 || status === 206) { + const contentDisposition = response.headers ? response.headers["content-disposition"] : undefined; + const fileNameMatch = contentDisposition ? /filename="?([^"]*?)"?(;|$)/g.exec(contentDisposition) : undefined; + const fileName = fileNameMatch && fileNameMatch.length > 1 ? fileNameMatch[1] : undefined; + return Promise.resolve({ fileName: fileName, status: status, data: new Blob([response.data]), headers: _headers }); + } else if (status === 403) { + const _responseText = response.data; + let result403: any = null; + let resultData403 = _responseText; + result403 = RemoteServiceErrorResponse.fromJS(resultData403); + return throwException("Forbidden", status, _responseText, _headers, result403); + + } else if (status === 401) { + const _responseText = response.data; + let result401: any = null; + let resultData401 = _responseText; + result401 = RemoteServiceErrorResponse.fromJS(resultData401); + return throwException("Unauthorized", status, _responseText, _headers, result401); + + } else if (status === 400) { + const _responseText = response.data; + let result400: any = null; + let resultData400 = _responseText; + result400 = RemoteServiceErrorResponse.fromJS(resultData400); + return throwException("Bad Request", status, _responseText, _headers, result400); + + } else if (status === 404) { + const _responseText = response.data; + let result404: any = null; + let resultData404 = _responseText; + result404 = RemoteServiceErrorResponse.fromJS(resultData404); + return throwException("Not Found", status, _responseText, _headers, result404); + + } else if (status === 501) { + const _responseText = response.data; + let result501: any = null; + let resultData501 = _responseText; + result501 = RemoteServiceErrorResponse.fromJS(resultData501); + return throwException("Server Error", status, _responseText, _headers, result501); + + } else if (status === 500) { + const _responseText = response.data; + let result500: any = null; + let resultData500 = _responseText; + result500 = RemoteServiceErrorResponse.fromJS(resultData500); + return throwException("Server Error", status, _responseText, _headers, result500); + + } else if (status !== 200 && status !== 204) { + const _responseText = response.data; + return throwException("An unexpected server error occurred.", status, _responseText, _headers); + } + return Promise.resolve(null); + } + + /** + * 创建用户 + * @param body (optional) + * @return Success + */ + create(body: IdentityUserCreateDto | undefined , cancelToken?: CancelToken | undefined): Promise { + let url_ = this.baseUrl + "/Users/create"; + url_ = url_.replace(/[?&]$/, ""); + + const content_ = JSON.stringify(body); + + let options_ = { + data: content_, + method: "POST", + url: url_, + headers: { + "Content-Type": "application/json", + "Accept": "text/plain" + }, + cancelToken + }; + + return this.transformOptions(options_).then(transformedOptions_ => { + return this.instance.request(transformedOptions_); + }).catch((_error: any) => { + if (isAxiosError(_error) && _error.response) { + return _error.response; + } else { + throw _error; + } + }).then((_response: AxiosResponse) => { + return this.transformResult(url_, _response, (_response: AxiosResponse) => this.processCreate(_response)); + }); + } + + protected processCreate(response: AxiosResponse): Promise { + const status = response.status; + let _headers: any = {}; + if (response.headers && typeof response.headers === "object") { + for (let k in response.headers) { + if (response.headers.hasOwnProperty(k)) { + _headers[k] = response.headers[k]; + } + } + } + if (status === 200) { + const _responseText = response.data; + let result200: any = null; + let resultData200 = _responseText; + result200 = IdentityUserDto.fromJS(resultData200); + return Promise.resolve(result200); + + } else if (status === 403) { + const _responseText = response.data; + let result403: any = null; + let resultData403 = _responseText; + result403 = RemoteServiceErrorResponse.fromJS(resultData403); + return throwException("Forbidden", status, _responseText, _headers, result403); + + } else if (status === 401) { + const _responseText = response.data; + let result401: any = null; + let resultData401 = _responseText; + result401 = RemoteServiceErrorResponse.fromJS(resultData401); + return throwException("Unauthorized", status, _responseText, _headers, result401); + + } else if (status === 400) { + const _responseText = response.data; + let result400: any = null; + let resultData400 = _responseText; + result400 = RemoteServiceErrorResponse.fromJS(resultData400); + return throwException("Bad Request", status, _responseText, _headers, result400); + + } else if (status === 404) { + const _responseText = response.data; + let result404: any = null; + let resultData404 = _responseText; + result404 = RemoteServiceErrorResponse.fromJS(resultData404); + return throwException("Not Found", status, _responseText, _headers, result404); + + } else if (status === 501) { + const _responseText = response.data; + let result501: any = null; + let resultData501 = _responseText; + result501 = RemoteServiceErrorResponse.fromJS(resultData501); + return throwException("Server Error", status, _responseText, _headers, result501); + + } else if (status === 500) { + const _responseText = response.data; + let result500: any = null; + let resultData500 = _responseText; + result500 = RemoteServiceErrorResponse.fromJS(resultData500); + return throwException("Server Error", status, _responseText, _headers, result500); + + } else if (status !== 200 && status !== 204) { + const _responseText = response.data; + return throwException("An unexpected server error occurred.", status, _responseText, _headers); + } + return Promise.resolve(null); + } + + /** + * 编辑用户 + * @param body (optional) + * @return Success + */ + update(body: UpdateUserInput | undefined , cancelToken?: CancelToken | undefined): Promise { + let url_ = this.baseUrl + "/Users/update"; + url_ = url_.replace(/[?&]$/, ""); + + const content_ = JSON.stringify(body); + + let options_ = { + data: content_, + method: "POST", + url: url_, + headers: { + "Content-Type": "application/json", + "Accept": "text/plain" + }, + cancelToken + }; + + return this.transformOptions(options_).then(transformedOptions_ => { + return this.instance.request(transformedOptions_); + }).catch((_error: any) => { + if (isAxiosError(_error) && _error.response) { + return _error.response; + } else { + throw _error; + } + }).then((_response: AxiosResponse) => { + return this.transformResult(url_, _response, (_response: AxiosResponse) => this.processUpdate(_response)); + }); + } + + protected processUpdate(response: AxiosResponse): Promise { + const status = response.status; + let _headers: any = {}; + if (response.headers && typeof response.headers === "object") { + for (let k in response.headers) { + if (response.headers.hasOwnProperty(k)) { + _headers[k] = response.headers[k]; + } + } + } + if (status === 200) { + const _responseText = response.data; + let result200: any = null; + let resultData200 = _responseText; + result200 = IdentityUserDto.fromJS(resultData200); + return Promise.resolve(result200); + + } else if (status === 403) { + const _responseText = response.data; + let result403: any = null; + let resultData403 = _responseText; + result403 = RemoteServiceErrorResponse.fromJS(resultData403); + return throwException("Forbidden", status, _responseText, _headers, result403); + + } else if (status === 401) { + const _responseText = response.data; + let result401: any = null; + let resultData401 = _responseText; + result401 = RemoteServiceErrorResponse.fromJS(resultData401); + return throwException("Unauthorized", status, _responseText, _headers, result401); + + } else if (status === 400) { + const _responseText = response.data; + let result400: any = null; + let resultData400 = _responseText; + result400 = RemoteServiceErrorResponse.fromJS(resultData400); + return throwException("Bad Request", status, _responseText, _headers, result400); + + } else if (status === 404) { + const _responseText = response.data; + let result404: any = null; + let resultData404 = _responseText; + result404 = RemoteServiceErrorResponse.fromJS(resultData404); + return throwException("Not Found", status, _responseText, _headers, result404); + + } else if (status === 501) { + const _responseText = response.data; + let result501: any = null; + let resultData501 = _responseText; + result501 = RemoteServiceErrorResponse.fromJS(resultData501); + return throwException("Server Error", status, _responseText, _headers, result501); + + } else if (status === 500) { + const _responseText = response.data; + let result500: any = null; + let resultData500 = _responseText; + result500 = RemoteServiceErrorResponse.fromJS(resultData500); + return throwException("Server Error", status, _responseText, _headers, result500); + + } else if (status !== 200 && status !== 204) { + const _responseText = response.data; + return throwException("An unexpected server error occurred.", status, _responseText, _headers); + } + return Promise.resolve(null); + } + + /** + * 删除用户 + * @param body (optional) + * @return Success + */ + delete(body: IdInput | undefined , cancelToken?: CancelToken | undefined): Promise { + let url_ = this.baseUrl + "/Users/delete"; + url_ = url_.replace(/[?&]$/, ""); + + const content_ = JSON.stringify(body); + + let options_ = { + data: content_, + method: "POST", + url: url_, + headers: { + "Content-Type": "application/json", + }, + cancelToken + }; + + return this.transformOptions(options_).then(transformedOptions_ => { + return this.instance.request(transformedOptions_); + }).catch((_error: any) => { + if (isAxiosError(_error) && _error.response) { + return _error.response; + } else { + throw _error; + } + }).then((_response: AxiosResponse) => { + return this.transformResult(url_, _response, (_response: AxiosResponse) => this.processDelete(_response)); + }); + } + + protected processDelete(response: AxiosResponse): Promise { + const status = response.status; + let _headers: any = {}; + if (response.headers && typeof response.headers === "object") { + for (let k in response.headers) { + if (response.headers.hasOwnProperty(k)) { + _headers[k] = response.headers[k]; + } + } + } + if (status === 200) { + const _responseText = response.data; + return Promise.resolve(null); + + } else if (status === 403) { + const _responseText = response.data; + let result403: any = null; + let resultData403 = _responseText; + result403 = RemoteServiceErrorResponse.fromJS(resultData403); + return throwException("Forbidden", status, _responseText, _headers, result403); + + } else if (status === 401) { + const _responseText = response.data; + let result401: any = null; + let resultData401 = _responseText; + result401 = RemoteServiceErrorResponse.fromJS(resultData401); + return throwException("Unauthorized", status, _responseText, _headers, result401); + + } else if (status === 400) { + const _responseText = response.data; + let result400: any = null; + let resultData400 = _responseText; + result400 = RemoteServiceErrorResponse.fromJS(resultData400); + return throwException("Bad Request", status, _responseText, _headers, result400); + + } else if (status === 404) { + const _responseText = response.data; + let result404: any = null; + let resultData404 = _responseText; + result404 = RemoteServiceErrorResponse.fromJS(resultData404); + return throwException("Not Found", status, _responseText, _headers, result404); + + } else if (status === 501) { + const _responseText = response.data; + let result501: any = null; + let resultData501 = _responseText; + result501 = RemoteServiceErrorResponse.fromJS(resultData501); + return throwException("Server Error", status, _responseText, _headers, result501); + + } else if (status === 500) { + const _responseText = response.data; + let result500: any = null; + let resultData500 = _responseText; + result500 = RemoteServiceErrorResponse.fromJS(resultData500); + return throwException("Server Error", status, _responseText, _headers, result500); + + } else if (status !== 200 && status !== 204) { + const _responseText = response.data; + return throwException("An unexpected server error occurred.", status, _responseText, _headers); + } + return Promise.resolve(null); + } + + /** + * 获取用户角色信息 + * @param body (optional) + * @return Success + */ + role(body: IdInput | undefined , cancelToken?: CancelToken | undefined): Promise { + let url_ = this.baseUrl + "/Users/role"; + url_ = url_.replace(/[?&]$/, ""); + + const content_ = JSON.stringify(body); + + let options_ = { + data: content_, + method: "POST", + url: url_, + headers: { + "Content-Type": "application/json", + "Accept": "text/plain" + }, + cancelToken + }; + + return this.transformOptions(options_).then(transformedOptions_ => { + return this.instance.request(transformedOptions_); + }).catch((_error: any) => { + if (isAxiosError(_error) && _error.response) { + return _error.response; + } else { + throw _error; + } + }).then((_response: AxiosResponse) => { + return this.transformResult(url_, _response, (_response: AxiosResponse) => this.processRole(_response)); + }); + } + + protected processRole(response: AxiosResponse): Promise { + const status = response.status; + let _headers: any = {}; + if (response.headers && typeof response.headers === "object") { + for (let k in response.headers) { + if (response.headers.hasOwnProperty(k)) { + _headers[k] = response.headers[k]; + } + } + } + if (status === 200) { + const _responseText = response.data; + let result200: any = null; + let resultData200 = _responseText; + result200 = IdentityRoleDtoListResultDto.fromJS(resultData200); + return Promise.resolve(result200); + + } else if (status === 403) { + const _responseText = response.data; + let result403: any = null; + let resultData403 = _responseText; + result403 = RemoteServiceErrorResponse.fromJS(resultData403); + return throwException("Forbidden", status, _responseText, _headers, result403); + + } else if (status === 401) { + const _responseText = response.data; + let result401: any = null; + let resultData401 = _responseText; + result401 = RemoteServiceErrorResponse.fromJS(resultData401); + return throwException("Unauthorized", status, _responseText, _headers, result401); + + } else if (status === 400) { + const _responseText = response.data; + let result400: any = null; + let resultData400 = _responseText; + result400 = RemoteServiceErrorResponse.fromJS(resultData400); + return throwException("Bad Request", status, _responseText, _headers, result400); + + } else if (status === 404) { + const _responseText = response.data; + let result404: any = null; + let resultData404 = _responseText; + result404 = RemoteServiceErrorResponse.fromJS(resultData404); + return throwException("Not Found", status, _responseText, _headers, result404); + + } else if (status === 501) { + const _responseText = response.data; + let result501: any = null; + let resultData501 = _responseText; + result501 = RemoteServiceErrorResponse.fromJS(resultData501); + return throwException("Server Error", status, _responseText, _headers, result501); + + } else if (status === 500) { + const _responseText = response.data; + let result500: any = null; + let resultData500 = _responseText; + result500 = RemoteServiceErrorResponse.fromJS(resultData500); + return throwException("Server Error", status, _responseText, _headers, result500); + + } else if (status !== 200 && status !== 204) { + const _responseText = response.data; + return throwException("An unexpected server error occurred.", status, _responseText, _headers); + } + return Promise.resolve(null); + } + + /** + * 修改当前用户密码 + * @param body (optional) + * @return Success + */ + changePassword(body: ChangePasswordInput | undefined , cancelToken?: CancelToken | undefined): Promise { + let url_ = this.baseUrl + "/Users/changePassword"; + url_ = url_.replace(/[?&]$/, ""); + + const content_ = JSON.stringify(body); + + let options_ = { + data: content_, + method: "POST", + url: url_, + headers: { + "Content-Type": "application/json", + "Accept": "text/plain" + }, + cancelToken + }; + + return this.transformOptions(options_).then(transformedOptions_ => { + return this.instance.request(transformedOptions_); + }).catch((_error: any) => { + if (isAxiosError(_error) && _error.response) { + return _error.response; + } else { + throw _error; + } + }).then((_response: AxiosResponse) => { + return this.transformResult(url_, _response, (_response: AxiosResponse) => this.processChangePassword(_response)); + }); + } + + protected processChangePassword(response: AxiosResponse): Promise { + const status = response.status; + let _headers: any = {}; + if (response.headers && typeof response.headers === "object") { + for (let k in response.headers) { + if (response.headers.hasOwnProperty(k)) { + _headers[k] = response.headers[k]; + } + } + } + if (status === 200) { + const _responseText = response.data; + let result200: any = null; + let resultData200 = _responseText; + result200 = resultData200 !== undefined ? resultData200 : null; + + return Promise.resolve(result200); + + } else if (status === 403) { + const _responseText = response.data; + let result403: any = null; + let resultData403 = _responseText; + result403 = RemoteServiceErrorResponse.fromJS(resultData403); + return throwException("Forbidden", status, _responseText, _headers, result403); + + } else if (status === 401) { + const _responseText = response.data; + let result401: any = null; + let resultData401 = _responseText; + result401 = RemoteServiceErrorResponse.fromJS(resultData401); + return throwException("Unauthorized", status, _responseText, _headers, result401); + + } else if (status === 400) { + const _responseText = response.data; + let result400: any = null; + let resultData400 = _responseText; + result400 = RemoteServiceErrorResponse.fromJS(resultData400); + return throwException("Bad Request", status, _responseText, _headers, result400); + + } else if (status === 404) { + const _responseText = response.data; + let result404: any = null; + let resultData404 = _responseText; + result404 = RemoteServiceErrorResponse.fromJS(resultData404); + return throwException("Not Found", status, _responseText, _headers, result404); + + } else if (status === 501) { + const _responseText = response.data; + let result501: any = null; + let resultData501 = _responseText; + result501 = RemoteServiceErrorResponse.fromJS(resultData501); + return throwException("Server Error", status, _responseText, _headers, result501); + + } else if (status === 500) { + const _responseText = response.data; + let result500: any = null; + let resultData500 = _responseText; + result500 = RemoteServiceErrorResponse.fromJS(resultData500); + return throwException("Server Error", status, _responseText, _headers, result500); + + } else if (status !== 200 && status !== 204) { + const _responseText = response.data; + return throwException("An unexpected server error occurred.", status, _responseText, _headers); + } + return Promise.resolve(null); + } + + /** + * 锁定用户 + * @param body (optional) + * @return Success + */ + lock(body: LockUserInput | undefined , cancelToken?: CancelToken | undefined): Promise { + let url_ = this.baseUrl + "/Users/lock"; + url_ = url_.replace(/[?&]$/, ""); + + const content_ = JSON.stringify(body); + + let options_ = { + data: content_, + method: "POST", + url: url_, + headers: { + "Content-Type": "application/json", + }, + cancelToken + }; + + return this.transformOptions(options_).then(transformedOptions_ => { + return this.instance.request(transformedOptions_); + }).catch((_error: any) => { + if (isAxiosError(_error) && _error.response) { + return _error.response; + } else { + throw _error; + } + }).then((_response: AxiosResponse) => { + return this.transformResult(url_, _response, (_response: AxiosResponse) => this.processLock(_response)); + }); + } + + protected processLock(response: AxiosResponse): Promise { + const status = response.status; + let _headers: any = {}; + if (response.headers && typeof response.headers === "object") { + for (let k in response.headers) { + if (response.headers.hasOwnProperty(k)) { + _headers[k] = response.headers[k]; + } + } + } + if (status === 200) { + const _responseText = response.data; + return Promise.resolve(null); + + } else if (status === 403) { + const _responseText = response.data; + let result403: any = null; + let resultData403 = _responseText; + result403 = RemoteServiceErrorResponse.fromJS(resultData403); + return throwException("Forbidden", status, _responseText, _headers, result403); + + } else if (status === 401) { + const _responseText = response.data; + let result401: any = null; + let resultData401 = _responseText; + result401 = RemoteServiceErrorResponse.fromJS(resultData401); + return throwException("Unauthorized", status, _responseText, _headers, result401); + + } else if (status === 400) { + const _responseText = response.data; + let result400: any = null; + let resultData400 = _responseText; + result400 = RemoteServiceErrorResponse.fromJS(resultData400); + return throwException("Bad Request", status, _responseText, _headers, result400); + + } else if (status === 404) { + const _responseText = response.data; + let result404: any = null; + let resultData404 = _responseText; + result404 = RemoteServiceErrorResponse.fromJS(resultData404); + return throwException("Not Found", status, _responseText, _headers, result404); + + } else if (status === 501) { + const _responseText = response.data; + let result501: any = null; + let resultData501 = _responseText; + result501 = RemoteServiceErrorResponse.fromJS(resultData501); + return throwException("Server Error", status, _responseText, _headers, result501); + + } else if (status === 500) { + const _responseText = response.data; + let result500: any = null; + let resultData500 = _responseText; + result500 = RemoteServiceErrorResponse.fromJS(resultData500); + return throwException("Server Error", status, _responseText, _headers, result500); + + } else if (status !== 200 && status !== 204) { + const _responseText = response.data; + return throwException("An unexpected server error occurred.", status, _responseText, _headers); + } + return Promise.resolve(null); + } +} + +export class AbpLoginResult implements IAbpLoginResult { + result!: LoginResultType; + readonly description!: string | undefined; + + constructor(data?: IAbpLoginResult) { + if (data) { + for (var property in data) { + if (data.hasOwnProperty(property)) + (this)[property] = (data)[property]; + } + } + } + + init(_data?: any) { + if (_data) { + this.result = _data["result"]; + (this).description = _data["description"]; + } + } + + static fromJS(data: any): AbpLoginResult { + data = typeof data === 'object' ? data : {}; + let result = new AbpLoginResult(); + result.init(data); + return result; + } + + toJSON(data?: any) { + data = typeof data === 'object' ? data : {}; + data["result"] = this.result; + data["description"] = this.description; + return data; + } +} + +export interface IAbpLoginResult { + result: LoginResultType; + description: string | undefined; +} + +export class ActionApiDescriptionModel implements IActionApiDescriptionModel { + uniqueName!: string | undefined; + name!: string | undefined; + httpMethod!: string | undefined; + url!: string | undefined; + supportedVersions!: string[] | undefined; + parametersOnMethod!: MethodParameterApiDescriptionModel[] | undefined; + parameters!: ParameterApiDescriptionModel[] | undefined; + returnValue!: ReturnValueApiDescriptionModel; + allowAnonymous!: boolean | undefined; + implementFrom!: string | undefined; + + constructor(data?: IActionApiDescriptionModel) { + if (data) { + for (var property in data) { + if (data.hasOwnProperty(property)) + (this)[property] = (data)[property]; + } + } + } + + init(_data?: any) { + if (_data) { + this.uniqueName = _data["uniqueName"]; + this.name = _data["name"]; + this.httpMethod = _data["httpMethod"]; + this.url = _data["url"]; + if (Array.isArray(_data["supportedVersions"])) { + this.supportedVersions = [] as any; + for (let item of _data["supportedVersions"]) + this.supportedVersions!.push(item); + } + if (Array.isArray(_data["parametersOnMethod"])) { + this.parametersOnMethod = [] as any; + for (let item of _data["parametersOnMethod"]) + this.parametersOnMethod!.push(MethodParameterApiDescriptionModel.fromJS(item)); + } + if (Array.isArray(_data["parameters"])) { + this.parameters = [] as any; + for (let item of _data["parameters"]) + this.parameters!.push(ParameterApiDescriptionModel.fromJS(item)); + } + this.returnValue = _data["returnValue"] ? ReturnValueApiDescriptionModel.fromJS(_data["returnValue"]) : undefined; + this.allowAnonymous = _data["allowAnonymous"]; + this.implementFrom = _data["implementFrom"]; + } + } + + static fromJS(data: any): ActionApiDescriptionModel { + data = typeof data === 'object' ? data : {}; + let result = new ActionApiDescriptionModel(); + result.init(data); + return result; + } + + toJSON(data?: any) { + data = typeof data === 'object' ? data : {}; + data["uniqueName"] = this.uniqueName; + data["name"] = this.name; + data["httpMethod"] = this.httpMethod; + data["url"] = this.url; + if (Array.isArray(this.supportedVersions)) { + data["supportedVersions"] = []; + for (let item of this.supportedVersions) + data["supportedVersions"].push(item); + } + if (Array.isArray(this.parametersOnMethod)) { + data["parametersOnMethod"] = []; + for (let item of this.parametersOnMethod) + data["parametersOnMethod"].push(item.toJSON()); + } + if (Array.isArray(this.parameters)) { + data["parameters"] = []; + for (let item of this.parameters) + data["parameters"].push(item.toJSON()); + } + data["returnValue"] = this.returnValue ? this.returnValue.toJSON() : undefined; + data["allowAnonymous"] = this.allowAnonymous; + data["implementFrom"] = this.implementFrom; + return data; + } +} + +export interface IActionApiDescriptionModel { + uniqueName: string | undefined; + name: string | undefined; + httpMethod: string | undefined; + url: string | undefined; + supportedVersions: string[] | undefined; + parametersOnMethod: MethodParameterApiDescriptionModel[] | undefined; + parameters: ParameterApiDescriptionModel[] | undefined; + returnValue: ReturnValueApiDescriptionModel; + allowAnonymous: boolean | undefined; + implementFrom: string | undefined; +} + +export class AddCorsInput implements IAddCorsInput { + clientId!: string; + origin!: string; + + constructor(data?: IAddCorsInput) { + if (data) { + for (var property in data) { + if (data.hasOwnProperty(property)) + (this)[property] = (data)[property]; + } + } + } + + init(_data?: any) { + if (_data) { + this.clientId = _data["clientId"]; + this.origin = _data["origin"]; + } + } + + static fromJS(data: any): AddCorsInput { + data = typeof data === 'object' ? data : {}; + let result = new AddCorsInput(); + result.init(data); + return result; + } + + toJSON(data?: any) { + data = typeof data === 'object' ? data : {}; + data["clientId"] = this.clientId; + data["origin"] = this.origin; + return data; + } +} + +export interface IAddCorsInput { + clientId: string; + origin: string; +} + +export class AddRedirectUriInput implements IAddRedirectUriInput { + clientId!: string; + uri!: string; + + constructor(data?: IAddRedirectUriInput) { + if (data) { + for (var property in data) { + if (data.hasOwnProperty(property)) + (this)[property] = (data)[property]; + } + } + } + + init(_data?: any) { + if (_data) { + this.clientId = _data["clientId"]; + this.uri = _data["uri"]; + } + } + + static fromJS(data: any): AddRedirectUriInput { + data = typeof data === 'object' ? data : {}; + let result = new AddRedirectUriInput(); + result.init(data); + return result; + } + + toJSON(data?: any) { + data = typeof data === 'object' ? data : {}; + data["clientId"] = this.clientId; + data["uri"] = this.uri; + return data; + } +} + +export interface IAddRedirectUriInput { + clientId: string; + uri: string; +} + +export class AddRoleToOrganizationUnitInput implements IAddRoleToOrganizationUnitInput { + roleId!: string[] | undefined; + organizationUnitId!: string; + + constructor(data?: IAddRoleToOrganizationUnitInput) { + if (data) { + for (var property in data) { + if (data.hasOwnProperty(property)) + (this)[property] = (data)[property]; + } + } + } + + init(_data?: any) { + if (_data) { + if (Array.isArray(_data["roleId"])) { + this.roleId = [] as any; + for (let item of _data["roleId"]) + this.roleId!.push(item); + } + this.organizationUnitId = _data["organizationUnitId"]; + } + } + + static fromJS(data: any): AddRoleToOrganizationUnitInput { + data = typeof data === 'object' ? data : {}; + let result = new AddRoleToOrganizationUnitInput(); + result.init(data); + return result; + } + + toJSON(data?: any) { + data = typeof data === 'object' ? data : {}; + if (Array.isArray(this.roleId)) { + data["roleId"] = []; + for (let item of this.roleId) + data["roleId"].push(item); + } + data["organizationUnitId"] = this.organizationUnitId; + return data; + } +} + +export interface IAddRoleToOrganizationUnitInput { + roleId: string[] | undefined; + organizationUnitId: string; +} + +export class AddUserToOrganizationUnitInput implements IAddUserToOrganizationUnitInput { + userId!: string[] | undefined; + organizationUnitId!: string; + + constructor(data?: IAddUserToOrganizationUnitInput) { + if (data) { + for (var property in data) { + if (data.hasOwnProperty(property)) + (this)[property] = (data)[property]; + } + } + } + + init(_data?: any) { + if (_data) { + if (Array.isArray(_data["userId"])) { + this.userId = [] as any; + for (let item of _data["userId"]) + this.userId!.push(item); + } + this.organizationUnitId = _data["organizationUnitId"]; + } + } + + static fromJS(data: any): AddUserToOrganizationUnitInput { + data = typeof data === 'object' ? data : {}; + let result = new AddUserToOrganizationUnitInput(); + result.init(data); + return result; + } + + toJSON(data?: any) { + data = typeof data === 'object' ? data : {}; + if (Array.isArray(this.userId)) { + data["userId"] = []; + for (let item of this.userId) + data["userId"].push(item); + } + data["organizationUnitId"] = this.organizationUnitId; + return data; + } +} + +export interface IAddUserToOrganizationUnitInput { + userId: string[] | undefined; + organizationUnitId: string; +} + +export class AggregateRouteConfig implements IAggregateRouteConfig { + routeKey!: string | undefined; + parameter!: string | undefined; + jsonPath!: string | undefined; + + constructor(data?: IAggregateRouteConfig) { + if (data) { + for (var property in data) { + if (data.hasOwnProperty(property)) + (this)[property] = (data)[property]; + } + } + } + + init(_data?: any) { + if (_data) { + this.routeKey = _data["routeKey"]; + this.parameter = _data["parameter"]; + this.jsonPath = _data["jsonPath"]; + } + } + + static fromJS(data: any): AggregateRouteConfig { + data = typeof data === 'object' ? data : {}; + let result = new AggregateRouteConfig(); + result.init(data); + return result; + } + + toJSON(data?: any) { + data = typeof data === 'object' ? data : {}; + data["routeKey"] = this.routeKey; + data["parameter"] = this.parameter; + data["jsonPath"] = this.jsonPath; + return data; + } +} + +export interface IAggregateRouteConfig { + routeKey: string | undefined; + parameter: string | undefined; + jsonPath: string | undefined; +} + +export class ApiResourceClaimOutput implements IApiResourceClaimOutput { + apiResourceId!: string; + type!: string | undefined; + + constructor(data?: IApiResourceClaimOutput) { + if (data) { + for (var property in data) { + if (data.hasOwnProperty(property)) + (this)[property] = (data)[property]; + } + } + } + + init(_data?: any) { + if (_data) { + this.apiResourceId = _data["apiResourceId"]; + this.type = _data["type"]; + } + } + + static fromJS(data: any): ApiResourceClaimOutput { + data = typeof data === 'object' ? data : {}; + let result = new ApiResourceClaimOutput(); + result.init(data); + return result; + } + + toJSON(data?: any) { + data = typeof data === 'object' ? data : {}; + data["apiResourceId"] = this.apiResourceId; + data["type"] = this.type; + return data; + } +} + +export interface IApiResourceClaimOutput { + apiResourceId: string; + type: string | undefined; +} + +export class ApiResourceOutput implements IApiResourceOutput { + id!: string; + name!: string | undefined; + displayName!: string | undefined; + description!: string | undefined; + enabled!: boolean; + allowedAccessTokenSigningAlgorithms!: string | undefined; + showInDiscoveryDocument!: boolean; + secrets!: ApiResourceSecretOutput[] | undefined; + scopes!: ApiResourceScopeOutput[] | undefined; + userClaims!: ApiResourceClaimOutput[] | undefined; + properties!: ApiResourcePropertyOutput[] | undefined; + + constructor(data?: IApiResourceOutput) { + if (data) { + for (var property in data) { + if (data.hasOwnProperty(property)) + (this)[property] = (data)[property]; + } + } + } + + init(_data?: any) { + if (_data) { + this.id = _data["id"]; + this.name = _data["name"]; + this.displayName = _data["displayName"]; + this.description = _data["description"]; + this.enabled = _data["enabled"]; + this.allowedAccessTokenSigningAlgorithms = _data["allowedAccessTokenSigningAlgorithms"]; + this.showInDiscoveryDocument = _data["showInDiscoveryDocument"]; + if (Array.isArray(_data["secrets"])) { + this.secrets = [] as any; + for (let item of _data["secrets"]) + this.secrets!.push(ApiResourceSecretOutput.fromJS(item)); + } + if (Array.isArray(_data["scopes"])) { + this.scopes = [] as any; + for (let item of _data["scopes"]) + this.scopes!.push(ApiResourceScopeOutput.fromJS(item)); + } + if (Array.isArray(_data["userClaims"])) { + this.userClaims = [] as any; + for (let item of _data["userClaims"]) + this.userClaims!.push(ApiResourceClaimOutput.fromJS(item)); + } + if (Array.isArray(_data["properties"])) { + this.properties = [] as any; + for (let item of _data["properties"]) + this.properties!.push(ApiResourcePropertyOutput.fromJS(item)); + } + } + } + + static fromJS(data: any): ApiResourceOutput { + data = typeof data === 'object' ? data : {}; + let result = new ApiResourceOutput(); + result.init(data); + return result; + } + + toJSON(data?: any) { + data = typeof data === 'object' ? data : {}; + data["id"] = this.id; + data["name"] = this.name; + data["displayName"] = this.displayName; + data["description"] = this.description; + data["enabled"] = this.enabled; + data["allowedAccessTokenSigningAlgorithms"] = this.allowedAccessTokenSigningAlgorithms; + data["showInDiscoveryDocument"] = this.showInDiscoveryDocument; + if (Array.isArray(this.secrets)) { + data["secrets"] = []; + for (let item of this.secrets) + data["secrets"].push(item.toJSON()); + } + if (Array.isArray(this.scopes)) { + data["scopes"] = []; + for (let item of this.scopes) + data["scopes"].push(item.toJSON()); + } + if (Array.isArray(this.userClaims)) { + data["userClaims"] = []; + for (let item of this.userClaims) + data["userClaims"].push(item.toJSON()); + } + if (Array.isArray(this.properties)) { + data["properties"] = []; + for (let item of this.properties) + data["properties"].push(item.toJSON()); + } + return data; + } +} + +export interface IApiResourceOutput { + id: string; + name: string | undefined; + displayName: string | undefined; + description: string | undefined; + enabled: boolean; + allowedAccessTokenSigningAlgorithms: string | undefined; + showInDiscoveryDocument: boolean; + secrets: ApiResourceSecretOutput[] | undefined; + scopes: ApiResourceScopeOutput[] | undefined; + userClaims: ApiResourceClaimOutput[] | undefined; + properties: ApiResourcePropertyOutput[] | undefined; +} + +export class ApiResourceOutputPagedResultDto implements IApiResourceOutputPagedResultDto { + items!: ApiResourceOutput[] | undefined; + totalCount!: number; + + constructor(data?: IApiResourceOutputPagedResultDto) { + if (data) { + for (var property in data) { + if (data.hasOwnProperty(property)) + (this)[property] = (data)[property]; + } + } + } + + init(_data?: any) { + if (_data) { + if (Array.isArray(_data["items"])) { + this.items = [] as any; + for (let item of _data["items"]) + this.items!.push(ApiResourceOutput.fromJS(item)); + } + this.totalCount = _data["totalCount"]; + } + } + + static fromJS(data: any): ApiResourceOutputPagedResultDto { + data = typeof data === 'object' ? data : {}; + let result = new ApiResourceOutputPagedResultDto(); + result.init(data); + return result; + } + + toJSON(data?: any) { + data = typeof data === 'object' ? data : {}; + if (Array.isArray(this.items)) { + data["items"] = []; + for (let item of this.items) + data["items"].push(item.toJSON()); + } + data["totalCount"] = this.totalCount; + return data; + } +} + +export interface IApiResourceOutputPagedResultDto { + items: ApiResourceOutput[] | undefined; + totalCount: number; +} + +export class ApiResourcePropertyOutput implements IApiResourcePropertyOutput { + apiResourceId!: string; + key!: string | undefined; + value!: string | undefined; + + constructor(data?: IApiResourcePropertyOutput) { + if (data) { + for (var property in data) { + if (data.hasOwnProperty(property)) + (this)[property] = (data)[property]; + } + } + } + + init(_data?: any) { + if (_data) { + this.apiResourceId = _data["apiResourceId"]; + this.key = _data["key"]; + this.value = _data["value"]; + } + } + + static fromJS(data: any): ApiResourcePropertyOutput { + data = typeof data === 'object' ? data : {}; + let result = new ApiResourcePropertyOutput(); + result.init(data); + return result; + } + + toJSON(data?: any) { + data = typeof data === 'object' ? data : {}; + data["apiResourceId"] = this.apiResourceId; + data["key"] = this.key; + data["value"] = this.value; + return data; + } +} + +export interface IApiResourcePropertyOutput { + apiResourceId: string; + key: string | undefined; + value: string | undefined; +} + +export class ApiResourceScopeOutput implements IApiResourceScopeOutput { + apiResourceId!: string; + scope!: string | undefined; + + constructor(data?: IApiResourceScopeOutput) { + if (data) { + for (var property in data) { + if (data.hasOwnProperty(property)) + (this)[property] = (data)[property]; + } + } + } + + init(_data?: any) { + if (_data) { + this.apiResourceId = _data["apiResourceId"]; + this.scope = _data["scope"]; + } + } + + static fromJS(data: any): ApiResourceScopeOutput { + data = typeof data === 'object' ? data : {}; + let result = new ApiResourceScopeOutput(); + result.init(data); + return result; + } + + toJSON(data?: any) { + data = typeof data === 'object' ? data : {}; + data["apiResourceId"] = this.apiResourceId; + data["scope"] = this.scope; return data; } } -export interface IAbpLoginResult { - result: LoginResultType; - description: string | undefined; +export interface IApiResourceScopeOutput { + apiResourceId: string; + scope: string | undefined; } -export class ActionApiDescriptionModel implements IActionApiDescriptionModel { - uniqueName!: string | undefined; - name!: string | undefined; - httpMethod!: string | undefined; - url!: string | undefined; - supportedVersions!: string[] | undefined; - parametersOnMethod!: MethodParameterApiDescriptionModel[] | undefined; - parameters!: ParameterApiDescriptionModel[] | undefined; - returnValue!: ReturnValueApiDescriptionModel; - allowAnonymous!: boolean | undefined; - implementFrom!: string | undefined; +export class ApiResourceSecretOutput implements IApiResourceSecretOutput { + apiResourceId!: string; + type!: string | undefined; + value!: string | undefined; + description!: string | undefined; + expiration!: moment.Moment | undefined; - constructor(data?: IActionApiDescriptionModel) { + constructor(data?: IApiResourceSecretOutput) { if (data) { for (var property in data) { if (data.hasOwnProperty(property)) @@ -8187,84 +9797,109 @@ export class ActionApiDescriptionModel implements IActionApiDescriptionModel { init(_data?: any) { if (_data) { - this.uniqueName = _data["uniqueName"]; - this.name = _data["name"]; - this.httpMethod = _data["httpMethod"]; - this.url = _data["url"]; - if (Array.isArray(_data["supportedVersions"])) { - this.supportedVersions = [] as any; - for (let item of _data["supportedVersions"]) - this.supportedVersions!.push(item); + this.apiResourceId = _data["apiResourceId"]; + this.type = _data["type"]; + this.value = _data["value"]; + this.description = _data["description"]; + this.expiration = _data["expiration"] ? moment(_data["expiration"].toString()) : undefined; + } + } + + static fromJS(data: any): ApiResourceSecretOutput { + data = typeof data === 'object' ? data : {}; + let result = new ApiResourceSecretOutput(); + result.init(data); + return result; + } + + toJSON(data?: any) { + data = typeof data === 'object' ? data : {}; + data["apiResourceId"] = this.apiResourceId; + data["type"] = this.type; + data["value"] = this.value; + data["description"] = this.description; + data["expiration"] = this.expiration ? this.expiration.toISOString() : undefined; + return data; + } +} + +export interface IApiResourceSecretOutput { + apiResourceId: string; + type: string | undefined; + value: string | undefined; + description: string | undefined; + expiration: moment.Moment | undefined; +} + +export class ApplicationApiDescriptionModel implements IApplicationApiDescriptionModel { + modules!: { [key: string]: ModuleApiDescriptionModel; } | undefined; + types!: { [key: string]: TypeApiDescriptionModel; } | undefined; + + constructor(data?: IApplicationApiDescriptionModel) { + if (data) { + for (var property in data) { + if (data.hasOwnProperty(property)) + (this)[property] = (data)[property]; } - if (Array.isArray(_data["parametersOnMethod"])) { - this.parametersOnMethod = [] as any; - for (let item of _data["parametersOnMethod"]) - this.parametersOnMethod!.push(MethodParameterApiDescriptionModel.fromJS(item)); + } + } + + init(_data?: any) { + if (_data) { + if (_data["modules"]) { + this.modules = {} as any; + for (let key in _data["modules"]) { + if (_data["modules"].hasOwnProperty(key)) + (this.modules)![key] = _data["modules"][key] ? ModuleApiDescriptionModel.fromJS(_data["modules"][key]) : new ModuleApiDescriptionModel(); + } } - if (Array.isArray(_data["parameters"])) { - this.parameters = [] as any; - for (let item of _data["parameters"]) - this.parameters!.push(ParameterApiDescriptionModel.fromJS(item)); + if (_data["types"]) { + this.types = {} as any; + for (let key in _data["types"]) { + if (_data["types"].hasOwnProperty(key)) + (this.types)![key] = _data["types"][key] ? TypeApiDescriptionModel.fromJS(_data["types"][key]) : new TypeApiDescriptionModel(); + } } - this.returnValue = _data["returnValue"] ? ReturnValueApiDescriptionModel.fromJS(_data["returnValue"]) : undefined; - this.allowAnonymous = _data["allowAnonymous"]; - this.implementFrom = _data["implementFrom"]; } } - static fromJS(data: any): ActionApiDescriptionModel { + static fromJS(data: any): ApplicationApiDescriptionModel { data = typeof data === 'object' ? data : {}; - let result = new ActionApiDescriptionModel(); + let result = new ApplicationApiDescriptionModel(); result.init(data); return result; } toJSON(data?: any) { data = typeof data === 'object' ? data : {}; - data["uniqueName"] = this.uniqueName; - data["name"] = this.name; - data["httpMethod"] = this.httpMethod; - data["url"] = this.url; - if (Array.isArray(this.supportedVersions)) { - data["supportedVersions"] = []; - for (let item of this.supportedVersions) - data["supportedVersions"].push(item); - } - if (Array.isArray(this.parametersOnMethod)) { - data["parametersOnMethod"] = []; - for (let item of this.parametersOnMethod) - data["parametersOnMethod"].push(item.toJSON()); + if (this.modules) { + data["modules"] = {}; + for (let key in this.modules) { + if (this.modules.hasOwnProperty(key)) + (data["modules"])[key] = this.modules[key] ? this.modules[key].toJSON() : undefined; + } } - if (Array.isArray(this.parameters)) { - data["parameters"] = []; - for (let item of this.parameters) - data["parameters"].push(item.toJSON()); + if (this.types) { + data["types"] = {}; + for (let key in this.types) { + if (this.types.hasOwnProperty(key)) + (data["types"])[key] = this.types[key] ? this.types[key].toJSON() : undefined; + } } - data["returnValue"] = this.returnValue ? this.returnValue.toJSON() : undefined; - data["allowAnonymous"] = this.allowAnonymous; - data["implementFrom"] = this.implementFrom; return data; } } -export interface IActionApiDescriptionModel { - uniqueName: string | undefined; - name: string | undefined; - httpMethod: string | undefined; - url: string | undefined; - supportedVersions: string[] | undefined; - parametersOnMethod: MethodParameterApiDescriptionModel[] | undefined; - parameters: ParameterApiDescriptionModel[] | undefined; - returnValue: ReturnValueApiDescriptionModel; - allowAnonymous: boolean | undefined; - implementFrom: string | undefined; +export interface IApplicationApiDescriptionModel { + modules: { [key: string]: ModuleApiDescriptionModel; } | undefined; + types: { [key: string]: TypeApiDescriptionModel; } | undefined; } -export class AddCorsInput implements IAddCorsInput { - clientId!: string; - origin!: string; +export class ApplicationAuthConfigurationDto implements IApplicationAuthConfigurationDto { + policies!: { [key: string]: boolean; } | undefined; + grantedPolicies!: { [key: string]: boolean; } | undefined; - constructor(data?: IAddCorsInput) { + constructor(data?: IApplicationAuthConfigurationDto) { if (data) { for (var property in data) { if (data.hasOwnProperty(property)) @@ -8275,36 +9910,68 @@ export class AddCorsInput implements IAddCorsInput { init(_data?: any) { if (_data) { - this.clientId = _data["clientId"]; - this.origin = _data["origin"]; + if (_data["policies"]) { + this.policies = {} as any; + for (let key in _data["policies"]) { + if (_data["policies"].hasOwnProperty(key)) + (this.policies)![key] = _data["policies"][key]; + } + } + if (_data["grantedPolicies"]) { + this.grantedPolicies = {} as any; + for (let key in _data["grantedPolicies"]) { + if (_data["grantedPolicies"].hasOwnProperty(key)) + (this.grantedPolicies)![key] = _data["grantedPolicies"][key]; + } + } } } - static fromJS(data: any): AddCorsInput { + static fromJS(data: any): ApplicationAuthConfigurationDto { data = typeof data === 'object' ? data : {}; - let result = new AddCorsInput(); + let result = new ApplicationAuthConfigurationDto(); result.init(data); return result; } toJSON(data?: any) { data = typeof data === 'object' ? data : {}; - data["clientId"] = this.clientId; - data["origin"] = this.origin; + if (this.policies) { + data["policies"] = {}; + for (let key in this.policies) { + if (this.policies.hasOwnProperty(key)) + (data["policies"])[key] = this.policies[key]; + } + } + if (this.grantedPolicies) { + data["grantedPolicies"] = {}; + for (let key in this.grantedPolicies) { + if (this.grantedPolicies.hasOwnProperty(key)) + (data["grantedPolicies"])[key] = this.grantedPolicies[key]; + } + } return data; } } -export interface IAddCorsInput { - clientId: string; - origin: string; +export interface IApplicationAuthConfigurationDto { + policies: { [key: string]: boolean; } | undefined; + grantedPolicies: { [key: string]: boolean; } | undefined; } -export class AddRedirectUriInput implements IAddRedirectUriInput { - clientId!: string; - uri!: string; +export class ApplicationConfigurationDto implements IApplicationConfigurationDto { + localization!: ApplicationLocalizationConfigurationDto; + auth!: ApplicationAuthConfigurationDto; + setting!: ApplicationSettingConfigurationDto; + currentUser!: CurrentUserDto; + features!: ApplicationFeatureConfigurationDto; + multiTenancy!: MultiTenancyInfoDto; + currentTenant!: CurrentTenantDto; + timing!: TimingDto; + clock!: ClockDto; + objectExtensions!: ObjectExtensionsDto; - constructor(data?: IAddRedirectUriInput) { + constructor(data?: IApplicationConfigurationDto) { if (data) { for (var property in data) { if (data.hasOwnProperty(property)) @@ -8315,37 +9982,59 @@ export class AddRedirectUriInput implements IAddRedirectUriInput { init(_data?: any) { if (_data) { - this.clientId = _data["clientId"]; - this.uri = _data["uri"]; + this.localization = _data["localization"] ? ApplicationLocalizationConfigurationDto.fromJS(_data["localization"]) : undefined; + this.auth = _data["auth"] ? ApplicationAuthConfigurationDto.fromJS(_data["auth"]) : undefined; + this.setting = _data["setting"] ? ApplicationSettingConfigurationDto.fromJS(_data["setting"]) : undefined; + this.currentUser = _data["currentUser"] ? CurrentUserDto.fromJS(_data["currentUser"]) : undefined; + this.features = _data["features"] ? ApplicationFeatureConfigurationDto.fromJS(_data["features"]) : undefined; + this.multiTenancy = _data["multiTenancy"] ? MultiTenancyInfoDto.fromJS(_data["multiTenancy"]) : undefined; + this.currentTenant = _data["currentTenant"] ? CurrentTenantDto.fromJS(_data["currentTenant"]) : undefined; + this.timing = _data["timing"] ? TimingDto.fromJS(_data["timing"]) : undefined; + this.clock = _data["clock"] ? ClockDto.fromJS(_data["clock"]) : undefined; + this.objectExtensions = _data["objectExtensions"] ? ObjectExtensionsDto.fromJS(_data["objectExtensions"]) : undefined; } } - static fromJS(data: any): AddRedirectUriInput { + static fromJS(data: any): ApplicationConfigurationDto { data = typeof data === 'object' ? data : {}; - let result = new AddRedirectUriInput(); + let result = new ApplicationConfigurationDto(); result.init(data); return result; } toJSON(data?: any) { data = typeof data === 'object' ? data : {}; - data["clientId"] = this.clientId; - data["uri"] = this.uri; + data["localization"] = this.localization ? this.localization.toJSON() : undefined; + data["auth"] = this.auth ? this.auth.toJSON() : undefined; + data["setting"] = this.setting ? this.setting.toJSON() : undefined; + data["currentUser"] = this.currentUser ? this.currentUser.toJSON() : undefined; + data["features"] = this.features ? this.features.toJSON() : undefined; + data["multiTenancy"] = this.multiTenancy ? this.multiTenancy.toJSON() : undefined; + data["currentTenant"] = this.currentTenant ? this.currentTenant.toJSON() : undefined; + data["timing"] = this.timing ? this.timing.toJSON() : undefined; + data["clock"] = this.clock ? this.clock.toJSON() : undefined; + data["objectExtensions"] = this.objectExtensions ? this.objectExtensions.toJSON() : undefined; return data; } } -export interface IAddRedirectUriInput { - clientId: string; - uri: string; +export interface IApplicationConfigurationDto { + localization: ApplicationLocalizationConfigurationDto; + auth: ApplicationAuthConfigurationDto; + setting: ApplicationSettingConfigurationDto; + currentUser: CurrentUserDto; + features: ApplicationFeatureConfigurationDto; + multiTenancy: MultiTenancyInfoDto; + currentTenant: CurrentTenantDto; + timing: TimingDto; + clock: ClockDto; + objectExtensions: ObjectExtensionsDto; } -export class AggregateRouteConfig implements IAggregateRouteConfig { - routeKey!: string | undefined; - parameter!: string | undefined; - jsonPath!: string | undefined; +export class ApplicationFeatureConfigurationDto implements IApplicationFeatureConfigurationDto { + values!: { [key: string]: string; } | undefined; - constructor(data?: IAggregateRouteConfig) { + constructor(data?: IApplicationFeatureConfigurationDto) { if (data) { for (var property in data) { if (data.hasOwnProperty(property)) @@ -8356,39 +10045,49 @@ export class AggregateRouteConfig implements IAggregateRouteConfig { init(_data?: any) { if (_data) { - this.routeKey = _data["routeKey"]; - this.parameter = _data["parameter"]; - this.jsonPath = _data["jsonPath"]; + if (_data["values"]) { + this.values = {} as any; + for (let key in _data["values"]) { + if (_data["values"].hasOwnProperty(key)) + (this.values)![key] = _data["values"][key]; + } + } } } - static fromJS(data: any): AggregateRouteConfig { + static fromJS(data: any): ApplicationFeatureConfigurationDto { data = typeof data === 'object' ? data : {}; - let result = new AggregateRouteConfig(); + let result = new ApplicationFeatureConfigurationDto(); result.init(data); return result; } toJSON(data?: any) { data = typeof data === 'object' ? data : {}; - data["routeKey"] = this.routeKey; - data["parameter"] = this.parameter; - data["jsonPath"] = this.jsonPath; + if (this.values) { + data["values"] = {}; + for (let key in this.values) { + if (this.values.hasOwnProperty(key)) + (data["values"])[key] = this.values[key]; + } + } return data; } } -export interface IAggregateRouteConfig { - routeKey: string | undefined; - parameter: string | undefined; - jsonPath: string | undefined; +export interface IApplicationFeatureConfigurationDto { + values: { [key: string]: string; } | undefined; } -export class ApiResourceClaimOutput implements IApiResourceClaimOutput { - apiResourceId!: string; - type!: string | undefined; +export class ApplicationLocalizationConfigurationDto implements IApplicationLocalizationConfigurationDto { + values!: { [key: string]: { [key: string]: string; }; } | undefined; + languages!: LanguageInfo[] | undefined; + currentCulture!: CurrentCultureDto; + defaultResourceName!: string | undefined; + languagesMap!: { [key: string]: NameValue[]; } | undefined; + languageFilesMap!: { [key: string]: NameValue[]; } | undefined; - constructor(data?: IApiResourceClaimOutput) { + constructor(data?: IApplicationLocalizationConfigurationDto) { if (data) { for (var property in data) { if (data.hasOwnProperty(property)) @@ -8399,45 +10098,91 @@ export class ApiResourceClaimOutput implements IApiResourceClaimOutput { init(_data?: any) { if (_data) { - this.apiResourceId = _data["apiResourceId"]; - this.type = _data["type"]; + if (_data["values"]) { + this.values = {} as any; + for (let key in _data["values"]) { + if (_data["values"].hasOwnProperty(key)) + (this.values)![key] = _data["values"][key] !== undefined ? _data["values"][key] : {}; + } + } + if (Array.isArray(_data["languages"])) { + this.languages = [] as any; + for (let item of _data["languages"]) + this.languages!.push(LanguageInfo.fromJS(item)); + } + this.currentCulture = _data["currentCulture"] ? CurrentCultureDto.fromJS(_data["currentCulture"]) : undefined; + this.defaultResourceName = _data["defaultResourceName"]; + if (_data["languagesMap"]) { + this.languagesMap = {} as any; + for (let key in _data["languagesMap"]) { + if (_data["languagesMap"].hasOwnProperty(key)) + (this.languagesMap)![key] = _data["languagesMap"][key] ? _data["languagesMap"][key].map((i: any) => NameValue.fromJS(i)) : []; + } + } + if (_data["languageFilesMap"]) { + this.languageFilesMap = {} as any; + for (let key in _data["languageFilesMap"]) { + if (_data["languageFilesMap"].hasOwnProperty(key)) + (this.languageFilesMap)![key] = _data["languageFilesMap"][key] ? _data["languageFilesMap"][key].map((i: any) => NameValue.fromJS(i)) : []; + } + } } } - static fromJS(data: any): ApiResourceClaimOutput { + static fromJS(data: any): ApplicationLocalizationConfigurationDto { data = typeof data === 'object' ? data : {}; - let result = new ApiResourceClaimOutput(); + let result = new ApplicationLocalizationConfigurationDto(); result.init(data); return result; } toJSON(data?: any) { data = typeof data === 'object' ? data : {}; - data["apiResourceId"] = this.apiResourceId; - data["type"] = this.type; + if (this.values) { + data["values"] = {}; + for (let key in this.values) { + if (this.values.hasOwnProperty(key)) + (data["values"])[key] = this.values[key]; + } + } + if (Array.isArray(this.languages)) { + data["languages"] = []; + for (let item of this.languages) + data["languages"].push(item.toJSON()); + } + data["currentCulture"] = this.currentCulture ? this.currentCulture.toJSON() : undefined; + data["defaultResourceName"] = this.defaultResourceName; + if (this.languagesMap) { + data["languagesMap"] = {}; + for (let key in this.languagesMap) { + if (this.languagesMap.hasOwnProperty(key)) + (data["languagesMap"])[key] = this.languagesMap[key]; + } + } + if (this.languageFilesMap) { + data["languageFilesMap"] = {}; + for (let key in this.languageFilesMap) { + if (this.languageFilesMap.hasOwnProperty(key)) + (data["languageFilesMap"])[key] = this.languageFilesMap[key]; + } + } return data; } } -export interface IApiResourceClaimOutput { - apiResourceId: string; - type: string | undefined; +export interface IApplicationLocalizationConfigurationDto { + values: { [key: string]: { [key: string]: string; }; } | undefined; + languages: LanguageInfo[] | undefined; + currentCulture: CurrentCultureDto; + defaultResourceName: string | undefined; + languagesMap: { [key: string]: NameValue[]; } | undefined; + languageFilesMap: { [key: string]: NameValue[]; } | undefined; } -export class ApiResourceOutput implements IApiResourceOutput { - id!: string; - name!: string | undefined; - displayName!: string | undefined; - description!: string | undefined; - enabled!: boolean; - allowedAccessTokenSigningAlgorithms!: string | undefined; - showInDiscoveryDocument!: boolean; - secrets!: ApiResourceSecretOutput[] | undefined; - scopes!: ApiResourceScopeOutput[] | undefined; - userClaims!: ApiResourceClaimOutput[] | undefined; - properties!: ApiResourcePropertyOutput[] | undefined; +export class ApplicationSettingConfigurationDto implements IApplicationSettingConfigurationDto { + values!: { [key: string]: string; } | undefined; - constructor(data?: IApiResourceOutput) { + constructor(data?: IApplicationSettingConfigurationDto) { if (data) { for (var property in data) { if (data.hasOwnProperty(property)) @@ -8448,95 +10193,45 @@ export class ApiResourceOutput implements IApiResourceOutput { init(_data?: any) { if (_data) { - this.id = _data["id"]; - this.name = _data["name"]; - this.displayName = _data["displayName"]; - this.description = _data["description"]; - this.enabled = _data["enabled"]; - this.allowedAccessTokenSigningAlgorithms = _data["allowedAccessTokenSigningAlgorithms"]; - this.showInDiscoveryDocument = _data["showInDiscoveryDocument"]; - if (Array.isArray(_data["secrets"])) { - this.secrets = [] as any; - for (let item of _data["secrets"]) - this.secrets!.push(ApiResourceSecretOutput.fromJS(item)); - } - if (Array.isArray(_data["scopes"])) { - this.scopes = [] as any; - for (let item of _data["scopes"]) - this.scopes!.push(ApiResourceScopeOutput.fromJS(item)); - } - if (Array.isArray(_data["userClaims"])) { - this.userClaims = [] as any; - for (let item of _data["userClaims"]) - this.userClaims!.push(ApiResourceClaimOutput.fromJS(item)); - } - if (Array.isArray(_data["properties"])) { - this.properties = [] as any; - for (let item of _data["properties"]) - this.properties!.push(ApiResourcePropertyOutput.fromJS(item)); + if (_data["values"]) { + this.values = {} as any; + for (let key in _data["values"]) { + if (_data["values"].hasOwnProperty(key)) + (this.values)![key] = _data["values"][key]; + } } } } - static fromJS(data: any): ApiResourceOutput { + static fromJS(data: any): ApplicationSettingConfigurationDto { data = typeof data === 'object' ? data : {}; - let result = new ApiResourceOutput(); + let result = new ApplicationSettingConfigurationDto(); result.init(data); return result; } toJSON(data?: any) { data = typeof data === 'object' ? data : {}; - data["id"] = this.id; - data["name"] = this.name; - data["displayName"] = this.displayName; - data["description"] = this.description; - data["enabled"] = this.enabled; - data["allowedAccessTokenSigningAlgorithms"] = this.allowedAccessTokenSigningAlgorithms; - data["showInDiscoveryDocument"] = this.showInDiscoveryDocument; - if (Array.isArray(this.secrets)) { - data["secrets"] = []; - for (let item of this.secrets) - data["secrets"].push(item.toJSON()); - } - if (Array.isArray(this.scopes)) { - data["scopes"] = []; - for (let item of this.scopes) - data["scopes"].push(item.toJSON()); - } - if (Array.isArray(this.userClaims)) { - data["userClaims"] = []; - for (let item of this.userClaims) - data["userClaims"].push(item.toJSON()); - } - if (Array.isArray(this.properties)) { - data["properties"] = []; - for (let item of this.properties) - data["properties"].push(item.toJSON()); + if (this.values) { + data["values"] = {}; + for (let key in this.values) { + if (this.values.hasOwnProperty(key)) + (data["values"])[key] = this.values[key]; + } } return data; } } -export interface IApiResourceOutput { - id: string; - name: string | undefined; - displayName: string | undefined; - description: string | undefined; - enabled: boolean; - allowedAccessTokenSigningAlgorithms: string | undefined; - showInDiscoveryDocument: boolean; - secrets: ApiResourceSecretOutput[] | undefined; - scopes: ApiResourceScopeOutput[] | undefined; - userClaims: ApiResourceClaimOutput[] | undefined; - properties: ApiResourcePropertyOutput[] | undefined; +export interface IApplicationSettingConfigurationDto { + values: { [key: string]: string; } | undefined; } -export class ApiResourceOutputPagedResultDto implements IApiResourceOutputPagedResultDto { - items!: ApiResourceOutput[] | undefined; - totalCount!: number; +export class ChangePasswordInput implements IChangePasswordInput { + currentPassword!: string | undefined; + newPassword!: string; - constructor(data?: IApiResourceOutputPagedResultDto) { + constructor(data?: IChangePasswordInput) { if (data) { for (var property in data) { if (data.hasOwnProperty(property)) @@ -8547,45 +10242,37 @@ export class ApiResourceOutputPagedResultDto implements IApiResourceOutputPagedR init(_data?: any) { if (_data) { - if (Array.isArray(_data["items"])) { - this.items = [] as any; - for (let item of _data["items"]) - this.items!.push(ApiResourceOutput.fromJS(item)); - } - this.totalCount = _data["totalCount"]; + this.currentPassword = _data["currentPassword"]; + this.newPassword = _data["newPassword"]; } } - static fromJS(data: any): ApiResourceOutputPagedResultDto { + static fromJS(data: any): ChangePasswordInput { data = typeof data === 'object' ? data : {}; - let result = new ApiResourceOutputPagedResultDto(); + let result = new ChangePasswordInput(); result.init(data); return result; } toJSON(data?: any) { data = typeof data === 'object' ? data : {}; - if (Array.isArray(this.items)) { - data["items"] = []; - for (let item of this.items) - data["items"].push(item.toJSON()); - } - data["totalCount"] = this.totalCount; + data["currentPassword"] = this.currentPassword; + data["newPassword"] = this.newPassword; return data; } } -export interface IApiResourceOutputPagedResultDto { - items: ApiResourceOutput[] | undefined; - totalCount: number; +export interface IChangePasswordInput { + currentPassword: string | undefined; + newPassword: string; } -export class ApiResourcePropertyOutput implements IApiResourcePropertyOutput { - apiResourceId!: string; - key!: string | undefined; +export class ClientClaimOutput implements IClientClaimOutput { + clientId!: string; + type!: string | undefined; value!: string | undefined; - constructor(data?: IApiResourcePropertyOutput) { + constructor(data?: IClientClaimOutput) { if (data) { for (var property in data) { if (data.hasOwnProperty(property)) @@ -8596,39 +10283,39 @@ export class ApiResourcePropertyOutput implements IApiResourcePropertyOutput { init(_data?: any) { if (_data) { - this.apiResourceId = _data["apiResourceId"]; - this.key = _data["key"]; + this.clientId = _data["clientId"]; + this.type = _data["type"]; this.value = _data["value"]; } } - static fromJS(data: any): ApiResourcePropertyOutput { + static fromJS(data: any): ClientClaimOutput { data = typeof data === 'object' ? data : {}; - let result = new ApiResourcePropertyOutput(); + let result = new ClientClaimOutput(); result.init(data); return result; } toJSON(data?: any) { data = typeof data === 'object' ? data : {}; - data["apiResourceId"] = this.apiResourceId; - data["key"] = this.key; + data["clientId"] = this.clientId; + data["type"] = this.type; data["value"] = this.value; return data; } } -export interface IApiResourcePropertyOutput { - apiResourceId: string; - key: string | undefined; +export interface IClientClaimOutput { + clientId: string; + type: string | undefined; value: string | undefined; } -export class ApiResourceScopeOutput implements IApiResourceScopeOutput { - apiResourceId!: string; - scope!: string | undefined; +export class ClientCorsOriginOutput implements IClientCorsOriginOutput { + clientId!: string; + origin!: string | undefined; - constructor(data?: IApiResourceScopeOutput) { + constructor(data?: IClientCorsOriginOutput) { if (data) { for (var property in data) { if (data.hasOwnProperty(property)) @@ -8639,39 +10326,36 @@ export class ApiResourceScopeOutput implements IApiResourceScopeOutput { init(_data?: any) { if (_data) { - this.apiResourceId = _data["apiResourceId"]; - this.scope = _data["scope"]; + this.clientId = _data["clientId"]; + this.origin = _data["origin"]; } } - static fromJS(data: any): ApiResourceScopeOutput { + static fromJS(data: any): ClientCorsOriginOutput { data = typeof data === 'object' ? data : {}; - let result = new ApiResourceScopeOutput(); + let result = new ClientCorsOriginOutput(); result.init(data); return result; } toJSON(data?: any) { data = typeof data === 'object' ? data : {}; - data["apiResourceId"] = this.apiResourceId; - data["scope"] = this.scope; + data["clientId"] = this.clientId; + data["origin"] = this.origin; return data; } } -export interface IApiResourceScopeOutput { - apiResourceId: string; - scope: string | undefined; +export interface IClientCorsOriginOutput { + clientId: string; + origin: string | undefined; } -export class ApiResourceSecretOutput implements IApiResourceSecretOutput { - apiResourceId!: string; - type!: string | undefined; - value!: string | undefined; - description!: string | undefined; - expiration!: moment.Moment | undefined; +export class ClientGrantTypeOutput implements IClientGrantTypeOutput { + clientId!: string; + grantType!: string | undefined; - constructor(data?: IApiResourceSecretOutput) { + constructor(data?: IClientGrantTypeOutput) { if (data) { for (var property in data) { if (data.hasOwnProperty(property)) @@ -8682,45 +10366,36 @@ export class ApiResourceSecretOutput implements IApiResourceSecretOutput { init(_data?: any) { if (_data) { - this.apiResourceId = _data["apiResourceId"]; - this.type = _data["type"]; - this.value = _data["value"]; - this.description = _data["description"]; - this.expiration = _data["expiration"] ? moment(_data["expiration"].toString()) : undefined; + this.clientId = _data["clientId"]; + this.grantType = _data["grantType"]; } } - static fromJS(data: any): ApiResourceSecretOutput { + static fromJS(data: any): ClientGrantTypeOutput { data = typeof data === 'object' ? data : {}; - let result = new ApiResourceSecretOutput(); + let result = new ClientGrantTypeOutput(); result.init(data); return result; } toJSON(data?: any) { data = typeof data === 'object' ? data : {}; - data["apiResourceId"] = this.apiResourceId; - data["type"] = this.type; - data["value"] = this.value; - data["description"] = this.description; - data["expiration"] = this.expiration ? this.expiration.toISOString() : undefined; + data["clientId"] = this.clientId; + data["grantType"] = this.grantType; return data; } } -export interface IApiResourceSecretOutput { - apiResourceId: string; - type: string | undefined; - value: string | undefined; - description: string | undefined; - expiration: moment.Moment | undefined; +export interface IClientGrantTypeOutput { + clientId: string; + grantType: string | undefined; } -export class ApplicationApiDescriptionModel implements IApplicationApiDescriptionModel { - modules!: { [key: string]: ModuleApiDescriptionModel; } | undefined; - types!: { [key: string]: TypeApiDescriptionModel; } | undefined; +export class ClientIdPRestrictionOutput implements IClientIdPRestrictionOutput { + clientId!: string; + provider!: string | undefined; - constructor(data?: IApplicationApiDescriptionModel) { + constructor(data?: IClientIdPRestrictionOutput) { if (data) { for (var property in data) { if (data.hasOwnProperty(property)) @@ -8731,60 +10406,36 @@ export class ApplicationApiDescriptionModel implements IApplicationApiDescriptio init(_data?: any) { if (_data) { - if (_data["modules"]) { - this.modules = {} as any; - for (let key in _data["modules"]) { - if (_data["modules"].hasOwnProperty(key)) - (this.modules)![key] = _data["modules"][key] ? ModuleApiDescriptionModel.fromJS(_data["modules"][key]) : new ModuleApiDescriptionModel(); - } - } - if (_data["types"]) { - this.types = {} as any; - for (let key in _data["types"]) { - if (_data["types"].hasOwnProperty(key)) - (this.types)![key] = _data["types"][key] ? TypeApiDescriptionModel.fromJS(_data["types"][key]) : new TypeApiDescriptionModel(); - } - } + this.clientId = _data["clientId"]; + this.provider = _data["provider"]; } } - static fromJS(data: any): ApplicationApiDescriptionModel { + static fromJS(data: any): ClientIdPRestrictionOutput { data = typeof data === 'object' ? data : {}; - let result = new ApplicationApiDescriptionModel(); + let result = new ClientIdPRestrictionOutput(); result.init(data); return result; } toJSON(data?: any) { data = typeof data === 'object' ? data : {}; - if (this.modules) { - data["modules"] = {}; - for (let key in this.modules) { - if (this.modules.hasOwnProperty(key)) - (data["modules"])[key] = this.modules[key] ? this.modules[key].toJSON() : undefined; - } - } - if (this.types) { - data["types"] = {}; - for (let key in this.types) { - if (this.types.hasOwnProperty(key)) - (data["types"])[key] = this.types[key] ? this.types[key].toJSON() : undefined; - } - } + data["clientId"] = this.clientId; + data["provider"] = this.provider; return data; } } -export interface IApplicationApiDescriptionModel { - modules: { [key: string]: ModuleApiDescriptionModel; } | undefined; - types: { [key: string]: TypeApiDescriptionModel; } | undefined; +export interface IClientIdPRestrictionOutput { + clientId: string; + provider: string | undefined; } -export class ApplicationAuthConfigurationDto implements IApplicationAuthConfigurationDto { - policies!: { [key: string]: boolean; } | undefined; - grantedPolicies!: { [key: string]: boolean; } | undefined; +export class ClientPostLogoutRedirectUriOutput implements IClientPostLogoutRedirectUriOutput { + clientId!: string; + postLogoutRedirectUri!: string | undefined; - constructor(data?: IApplicationAuthConfigurationDto) { + constructor(data?: IClientPostLogoutRedirectUriOutput) { if (data) { for (var property in data) { if (data.hasOwnProperty(property)) @@ -8795,68 +10446,80 @@ export class ApplicationAuthConfigurationDto implements IApplicationAuthConfigur init(_data?: any) { if (_data) { - if (_data["policies"]) { - this.policies = {} as any; - for (let key in _data["policies"]) { - if (_data["policies"].hasOwnProperty(key)) - (this.policies)![key] = _data["policies"][key]; - } - } - if (_data["grantedPolicies"]) { - this.grantedPolicies = {} as any; - for (let key in _data["grantedPolicies"]) { - if (_data["grantedPolicies"].hasOwnProperty(key)) - (this.grantedPolicies)![key] = _data["grantedPolicies"][key]; - } - } + this.clientId = _data["clientId"]; + this.postLogoutRedirectUri = _data["postLogoutRedirectUri"]; } } - static fromJS(data: any): ApplicationAuthConfigurationDto { + static fromJS(data: any): ClientPostLogoutRedirectUriOutput { data = typeof data === 'object' ? data : {}; - let result = new ApplicationAuthConfigurationDto(); + let result = new ClientPostLogoutRedirectUriOutput(); result.init(data); return result; } toJSON(data?: any) { data = typeof data === 'object' ? data : {}; - if (this.policies) { - data["policies"] = {}; - for (let key in this.policies) { - if (this.policies.hasOwnProperty(key)) - (data["policies"])[key] = this.policies[key]; + data["clientId"] = this.clientId; + data["postLogoutRedirectUri"] = this.postLogoutRedirectUri; + return data; + } +} + +export interface IClientPostLogoutRedirectUriOutput { + clientId: string; + postLogoutRedirectUri: string | undefined; +} + +export class ClientPropertyOutput implements IClientPropertyOutput { + clientId!: string; + key!: string | undefined; + value!: string | undefined; + + constructor(data?: IClientPropertyOutput) { + if (data) { + for (var property in data) { + if (data.hasOwnProperty(property)) + (this)[property] = (data)[property]; } } - if (this.grantedPolicies) { - data["grantedPolicies"] = {}; - for (let key in this.grantedPolicies) { - if (this.grantedPolicies.hasOwnProperty(key)) - (data["grantedPolicies"])[key] = this.grantedPolicies[key]; - } + } + + init(_data?: any) { + if (_data) { + this.clientId = _data["clientId"]; + this.key = _data["key"]; + this.value = _data["value"]; } - return data; } -} -export interface IApplicationAuthConfigurationDto { - policies: { [key: string]: boolean; } | undefined; - grantedPolicies: { [key: string]: boolean; } | undefined; + static fromJS(data: any): ClientPropertyOutput { + data = typeof data === 'object' ? data : {}; + let result = new ClientPropertyOutput(); + result.init(data); + return result; + } + + toJSON(data?: any) { + data = typeof data === 'object' ? data : {}; + data["clientId"] = this.clientId; + data["key"] = this.key; + data["value"] = this.value; + return data; + } } -export class ApplicationConfigurationDto implements IApplicationConfigurationDto { - localization!: ApplicationLocalizationConfigurationDto; - auth!: ApplicationAuthConfigurationDto; - setting!: ApplicationSettingConfigurationDto; - currentUser!: CurrentUserDto; - features!: ApplicationFeatureConfigurationDto; - multiTenancy!: MultiTenancyInfoDto; - currentTenant!: CurrentTenantDto; - timing!: TimingDto; - clock!: ClockDto; - objectExtensions!: ObjectExtensionsDto; +export interface IClientPropertyOutput { + clientId: string; + key: string | undefined; + value: string | undefined; +} - constructor(data?: IApplicationConfigurationDto) { +export class ClientRedirectUriOutput implements IClientRedirectUriOutput { + clientId!: string; + redirectUri!: string | undefined; + + constructor(data?: IClientRedirectUriOutput) { if (data) { for (var property in data) { if (data.hasOwnProperty(property)) @@ -8867,59 +10530,36 @@ export class ApplicationConfigurationDto implements IApplicationConfigurationDto init(_data?: any) { if (_data) { - this.localization = _data["localization"] ? ApplicationLocalizationConfigurationDto.fromJS(_data["localization"]) : undefined; - this.auth = _data["auth"] ? ApplicationAuthConfigurationDto.fromJS(_data["auth"]) : undefined; - this.setting = _data["setting"] ? ApplicationSettingConfigurationDto.fromJS(_data["setting"]) : undefined; - this.currentUser = _data["currentUser"] ? CurrentUserDto.fromJS(_data["currentUser"]) : undefined; - this.features = _data["features"] ? ApplicationFeatureConfigurationDto.fromJS(_data["features"]) : undefined; - this.multiTenancy = _data["multiTenancy"] ? MultiTenancyInfoDto.fromJS(_data["multiTenancy"]) : undefined; - this.currentTenant = _data["currentTenant"] ? CurrentTenantDto.fromJS(_data["currentTenant"]) : undefined; - this.timing = _data["timing"] ? TimingDto.fromJS(_data["timing"]) : undefined; - this.clock = _data["clock"] ? ClockDto.fromJS(_data["clock"]) : undefined; - this.objectExtensions = _data["objectExtensions"] ? ObjectExtensionsDto.fromJS(_data["objectExtensions"]) : undefined; + this.clientId = _data["clientId"]; + this.redirectUri = _data["redirectUri"]; } } - static fromJS(data: any): ApplicationConfigurationDto { + static fromJS(data: any): ClientRedirectUriOutput { data = typeof data === 'object' ? data : {}; - let result = new ApplicationConfigurationDto(); + let result = new ClientRedirectUriOutput(); result.init(data); return result; } toJSON(data?: any) { data = typeof data === 'object' ? data : {}; - data["localization"] = this.localization ? this.localization.toJSON() : undefined; - data["auth"] = this.auth ? this.auth.toJSON() : undefined; - data["setting"] = this.setting ? this.setting.toJSON() : undefined; - data["currentUser"] = this.currentUser ? this.currentUser.toJSON() : undefined; - data["features"] = this.features ? this.features.toJSON() : undefined; - data["multiTenancy"] = this.multiTenancy ? this.multiTenancy.toJSON() : undefined; - data["currentTenant"] = this.currentTenant ? this.currentTenant.toJSON() : undefined; - data["timing"] = this.timing ? this.timing.toJSON() : undefined; - data["clock"] = this.clock ? this.clock.toJSON() : undefined; - data["objectExtensions"] = this.objectExtensions ? this.objectExtensions.toJSON() : undefined; + data["clientId"] = this.clientId; + data["redirectUri"] = this.redirectUri; return data; } } -export interface IApplicationConfigurationDto { - localization: ApplicationLocalizationConfigurationDto; - auth: ApplicationAuthConfigurationDto; - setting: ApplicationSettingConfigurationDto; - currentUser: CurrentUserDto; - features: ApplicationFeatureConfigurationDto; - multiTenancy: MultiTenancyInfoDto; - currentTenant: CurrentTenantDto; - timing: TimingDto; - clock: ClockDto; - objectExtensions: ObjectExtensionsDto; +export interface IClientRedirectUriOutput { + clientId: string; + redirectUri: string | undefined; } -export class ApplicationFeatureConfigurationDto implements IApplicationFeatureConfigurationDto { - values!: { [key: string]: string; } | undefined; +export class ClientScopeOutput implements IClientScopeOutput { + clientId!: string; + scope!: string | undefined; - constructor(data?: IApplicationFeatureConfigurationDto) { + constructor(data?: IClientScopeOutput) { if (data) { for (var property in data) { if (data.hasOwnProperty(property)) @@ -8930,49 +10570,38 @@ export class ApplicationFeatureConfigurationDto implements IApplicationFeatureCo init(_data?: any) { if (_data) { - if (_data["values"]) { - this.values = {} as any; - for (let key in _data["values"]) { - if (_data["values"].hasOwnProperty(key)) - (this.values)![key] = _data["values"][key]; - } - } + this.clientId = _data["clientId"]; + this.scope = _data["scope"]; } } - static fromJS(data: any): ApplicationFeatureConfigurationDto { + static fromJS(data: any): ClientScopeOutput { data = typeof data === 'object' ? data : {}; - let result = new ApplicationFeatureConfigurationDto(); + let result = new ClientScopeOutput(); result.init(data); return result; } toJSON(data?: any) { data = typeof data === 'object' ? data : {}; - if (this.values) { - data["values"] = {}; - for (let key in this.values) { - if (this.values.hasOwnProperty(key)) - (data["values"])[key] = this.values[key]; - } - } + data["clientId"] = this.clientId; + data["scope"] = this.scope; return data; } } -export interface IApplicationFeatureConfigurationDto { - values: { [key: string]: string; } | undefined; +export interface IClientScopeOutput { + clientId: string; + scope: string | undefined; } -export class ApplicationLocalizationConfigurationDto implements IApplicationLocalizationConfigurationDto { - values!: { [key: string]: { [key: string]: string; }; } | undefined; - languages!: LanguageInfo[] | undefined; - currentCulture!: CurrentCultureDto; - defaultResourceName!: string | undefined; - languagesMap!: { [key: string]: NameValue[]; } | undefined; - languageFilesMap!: { [key: string]: NameValue[]; } | undefined; +export class ClientSecretOutput implements IClientSecretOutput { + type!: string | undefined; + value!: string | undefined; + description!: string | undefined; + expiration!: moment.Moment | undefined; - constructor(data?: IApplicationLocalizationConfigurationDto) { + constructor(data?: IClientSecretOutput) { if (data) { for (var property in data) { if (data.hasOwnProperty(property)) @@ -8983,91 +10612,41 @@ export class ApplicationLocalizationConfigurationDto implements IApplicationLoca init(_data?: any) { if (_data) { - if (_data["values"]) { - this.values = {} as any; - for (let key in _data["values"]) { - if (_data["values"].hasOwnProperty(key)) - (this.values)![key] = _data["values"][key] !== undefined ? _data["values"][key] : {}; - } - } - if (Array.isArray(_data["languages"])) { - this.languages = [] as any; - for (let item of _data["languages"]) - this.languages!.push(LanguageInfo.fromJS(item)); - } - this.currentCulture = _data["currentCulture"] ? CurrentCultureDto.fromJS(_data["currentCulture"]) : undefined; - this.defaultResourceName = _data["defaultResourceName"]; - if (_data["languagesMap"]) { - this.languagesMap = {} as any; - for (let key in _data["languagesMap"]) { - if (_data["languagesMap"].hasOwnProperty(key)) - (this.languagesMap)![key] = _data["languagesMap"][key] ? _data["languagesMap"][key].map((i: any) => NameValue.fromJS(i)) : []; - } - } - if (_data["languageFilesMap"]) { - this.languageFilesMap = {} as any; - for (let key in _data["languageFilesMap"]) { - if (_data["languageFilesMap"].hasOwnProperty(key)) - (this.languageFilesMap)![key] = _data["languageFilesMap"][key] ? _data["languageFilesMap"][key].map((i: any) => NameValue.fromJS(i)) : []; - } - } + this.type = _data["type"]; + this.value = _data["value"]; + this.description = _data["description"]; + this.expiration = _data["expiration"] ? moment(_data["expiration"].toString()) : undefined; } } - static fromJS(data: any): ApplicationLocalizationConfigurationDto { + static fromJS(data: any): ClientSecretOutput { data = typeof data === 'object' ? data : {}; - let result = new ApplicationLocalizationConfigurationDto(); + let result = new ClientSecretOutput(); result.init(data); return result; } toJSON(data?: any) { data = typeof data === 'object' ? data : {}; - if (this.values) { - data["values"] = {}; - for (let key in this.values) { - if (this.values.hasOwnProperty(key)) - (data["values"])[key] = this.values[key]; - } - } - if (Array.isArray(this.languages)) { - data["languages"] = []; - for (let item of this.languages) - data["languages"].push(item.toJSON()); - } - data["currentCulture"] = this.currentCulture ? this.currentCulture.toJSON() : undefined; - data["defaultResourceName"] = this.defaultResourceName; - if (this.languagesMap) { - data["languagesMap"] = {}; - for (let key in this.languagesMap) { - if (this.languagesMap.hasOwnProperty(key)) - (data["languagesMap"])[key] = this.languagesMap[key]; - } - } - if (this.languageFilesMap) { - data["languageFilesMap"] = {}; - for (let key in this.languageFilesMap) { - if (this.languageFilesMap.hasOwnProperty(key)) - (data["languageFilesMap"])[key] = this.languageFilesMap[key]; - } - } + data["type"] = this.type; + data["value"] = this.value; + data["description"] = this.description; + data["expiration"] = this.expiration ? this.expiration.toISOString() : undefined; return data; } } -export interface IApplicationLocalizationConfigurationDto { - values: { [key: string]: { [key: string]: string; }; } | undefined; - languages: LanguageInfo[] | undefined; - currentCulture: CurrentCultureDto; - defaultResourceName: string | undefined; - languagesMap: { [key: string]: NameValue[]; } | undefined; - languageFilesMap: { [key: string]: NameValue[]; } | undefined; +export interface IClientSecretOutput { + type: string | undefined; + value: string | undefined; + description: string | undefined; + expiration: moment.Moment | undefined; } -export class ApplicationSettingConfigurationDto implements IApplicationSettingConfigurationDto { - values!: { [key: string]: string; } | undefined; +export class ClockDto implements IClockDto { + kind!: string | undefined; - constructor(data?: IApplicationSettingConfigurationDto) { + constructor(data?: IClockDto) { if (data) { for (var property in data) { if (data.hasOwnProperty(property)) @@ -9078,45 +10657,38 @@ export class ApplicationSettingConfigurationDto implements IApplicationSettingCo init(_data?: any) { if (_data) { - if (_data["values"]) { - this.values = {} as any; - for (let key in _data["values"]) { - if (_data["values"].hasOwnProperty(key)) - (this.values)![key] = _data["values"][key]; - } - } + this.kind = _data["kind"]; } } - static fromJS(data: any): ApplicationSettingConfigurationDto { + static fromJS(data: any): ClockDto { data = typeof data === 'object' ? data : {}; - let result = new ApplicationSettingConfigurationDto(); + let result = new ClockDto(); result.init(data); return result; } toJSON(data?: any) { data = typeof data === 'object' ? data : {}; - if (this.values) { - data["values"] = {}; - for (let key in this.values) { - if (this.values.hasOwnProperty(key)) - (data["values"])[key] = this.values[key]; - } - } + data["kind"] = this.kind; return data; } } -export interface IApplicationSettingConfigurationDto { - values: { [key: string]: string; } | undefined; +export interface IClockDto { + kind: string | undefined; } -export class ChangePasswordInput implements IChangePasswordInput { - currentPassword!: string | undefined; - newPassword!: string; +export class ControllerApiDescriptionModel implements IControllerApiDescriptionModel { + controllerName!: string | undefined; + controllerGroupName!: string | undefined; + isRemoteService!: boolean; + apiVersion!: string | undefined; + type!: string | undefined; + interfaces!: ControllerInterfaceApiDescriptionModel[] | undefined; + actions!: { [key: string]: ActionApiDescriptionModel; } | undefined; - constructor(data?: IChangePasswordInput) { + constructor(data?: IControllerApiDescriptionModel) { if (data) { for (var property in data) { if (data.hasOwnProperty(property)) @@ -9125,39 +10697,72 @@ export class ChangePasswordInput implements IChangePasswordInput { } } - init(_data?: any) { - if (_data) { - this.currentPassword = _data["currentPassword"]; - this.newPassword = _data["newPassword"]; - } - } - - static fromJS(data: any): ChangePasswordInput { + init(_data?: any) { + if (_data) { + this.controllerName = _data["controllerName"]; + this.controllerGroupName = _data["controllerGroupName"]; + this.isRemoteService = _data["isRemoteService"]; + this.apiVersion = _data["apiVersion"]; + this.type = _data["type"]; + if (Array.isArray(_data["interfaces"])) { + this.interfaces = [] as any; + for (let item of _data["interfaces"]) + this.interfaces!.push(ControllerInterfaceApiDescriptionModel.fromJS(item)); + } + if (_data["actions"]) { + this.actions = {} as any; + for (let key in _data["actions"]) { + if (_data["actions"].hasOwnProperty(key)) + (this.actions)![key] = _data["actions"][key] ? ActionApiDescriptionModel.fromJS(_data["actions"][key]) : new ActionApiDescriptionModel(); + } + } + } + } + + static fromJS(data: any): ControllerApiDescriptionModel { data = typeof data === 'object' ? data : {}; - let result = new ChangePasswordInput(); + let result = new ControllerApiDescriptionModel(); result.init(data); return result; } toJSON(data?: any) { data = typeof data === 'object' ? data : {}; - data["currentPassword"] = this.currentPassword; - data["newPassword"] = this.newPassword; + data["controllerName"] = this.controllerName; + data["controllerGroupName"] = this.controllerGroupName; + data["isRemoteService"] = this.isRemoteService; + data["apiVersion"] = this.apiVersion; + data["type"] = this.type; + if (Array.isArray(this.interfaces)) { + data["interfaces"] = []; + for (let item of this.interfaces) + data["interfaces"].push(item.toJSON()); + } + if (this.actions) { + data["actions"] = {}; + for (let key in this.actions) { + if (this.actions.hasOwnProperty(key)) + (data["actions"])[key] = this.actions[key] ? this.actions[key].toJSON() : undefined; + } + } return data; } } -export interface IChangePasswordInput { - currentPassword: string | undefined; - newPassword: string; +export interface IControllerApiDescriptionModel { + controllerName: string | undefined; + controllerGroupName: string | undefined; + isRemoteService: boolean; + apiVersion: string | undefined; + type: string | undefined; + interfaces: ControllerInterfaceApiDescriptionModel[] | undefined; + actions: { [key: string]: ActionApiDescriptionModel; } | undefined; } -export class ClientClaimOutput implements IClientClaimOutput { - clientId!: string; +export class ControllerInterfaceApiDescriptionModel implements IControllerInterfaceApiDescriptionModel { type!: string | undefined; - value!: string | undefined; - constructor(data?: IClientClaimOutput) { + constructor(data?: IControllerInterfaceApiDescriptionModel) { if (data) { for (var property in data) { if (data.hasOwnProperty(property)) @@ -9168,39 +10773,38 @@ export class ClientClaimOutput implements IClientClaimOutput { init(_data?: any) { if (_data) { - this.clientId = _data["clientId"]; this.type = _data["type"]; - this.value = _data["value"]; } } - static fromJS(data: any): ClientClaimOutput { + static fromJS(data: any): ControllerInterfaceApiDescriptionModel { data = typeof data === 'object' ? data : {}; - let result = new ClientClaimOutput(); + let result = new ControllerInterfaceApiDescriptionModel(); result.init(data); return result; } toJSON(data?: any) { data = typeof data === 'object' ? data : {}; - data["clientId"] = this.clientId; data["type"] = this.type; - data["value"] = this.value; return data; } } -export interface IClientClaimOutput { - clientId: string; +export interface IControllerInterfaceApiDescriptionModel { type: string | undefined; - value: string | undefined; } -export class ClientCorsOriginOutput implements IClientCorsOriginOutput { - clientId!: string; - origin!: string | undefined; +export class CreateApiResourceInput implements ICreateApiResourceInput { + name!: string | undefined; + displayName!: string | undefined; + description!: string | undefined; + enabled!: boolean; + allowedAccessTokenSigningAlgorithms!: string | undefined; + showInDiscoveryDocument!: boolean; + secret!: string | undefined; - constructor(data?: IClientCorsOriginOutput) { + constructor(data?: ICreateApiResourceInput) { if (data) { for (var property in data) { if (data.hasOwnProperty(property)) @@ -9211,36 +10815,56 @@ export class ClientCorsOriginOutput implements IClientCorsOriginOutput { init(_data?: any) { if (_data) { - this.clientId = _data["clientId"]; - this.origin = _data["origin"]; + this.name = _data["name"]; + this.displayName = _data["displayName"]; + this.description = _data["description"]; + this.enabled = _data["enabled"]; + this.allowedAccessTokenSigningAlgorithms = _data["allowedAccessTokenSigningAlgorithms"]; + this.showInDiscoveryDocument = _data["showInDiscoveryDocument"]; + this.secret = _data["secret"]; } } - static fromJS(data: any): ClientCorsOriginOutput { + static fromJS(data: any): CreateApiResourceInput { data = typeof data === 'object' ? data : {}; - let result = new ClientCorsOriginOutput(); + let result = new CreateApiResourceInput(); result.init(data); return result; } toJSON(data?: any) { data = typeof data === 'object' ? data : {}; - data["clientId"] = this.clientId; - data["origin"] = this.origin; + data["name"] = this.name; + data["displayName"] = this.displayName; + data["description"] = this.description; + data["enabled"] = this.enabled; + data["allowedAccessTokenSigningAlgorithms"] = this.allowedAccessTokenSigningAlgorithms; + data["showInDiscoveryDocument"] = this.showInDiscoveryDocument; + data["secret"] = this.secret; return data; } } -export interface IClientCorsOriginOutput { - clientId: string; - origin: string | undefined; +export interface ICreateApiResourceInput { + name: string | undefined; + displayName: string | undefined; + description: string | undefined; + enabled: boolean; + allowedAccessTokenSigningAlgorithms: string | undefined; + showInDiscoveryDocument: boolean; + secret: string | undefined; } -export class ClientGrantTypeOutput implements IClientGrantTypeOutput { - clientId!: string; - grantType!: string | undefined; +export class CreateApiScopeInput implements ICreateApiScopeInput { + enabled!: boolean; + name!: string | undefined; + displayName!: string | undefined; + description!: string | undefined; + required!: boolean; + emphasize!: boolean; + showInDiscoveryDocument!: boolean; - constructor(data?: IClientGrantTypeOutput) { + constructor(data?: ICreateApiScopeInput) { if (data) { for (var property in data) { if (data.hasOwnProperty(property)) @@ -9251,36 +10875,53 @@ export class ClientGrantTypeOutput implements IClientGrantTypeOutput { init(_data?: any) { if (_data) { - this.clientId = _data["clientId"]; - this.grantType = _data["grantType"]; + this.enabled = _data["enabled"]; + this.name = _data["name"]; + this.displayName = _data["displayName"]; + this.description = _data["description"]; + this.required = _data["required"]; + this.emphasize = _data["emphasize"]; + this.showInDiscoveryDocument = _data["showInDiscoveryDocument"]; } } - static fromJS(data: any): ClientGrantTypeOutput { + static fromJS(data: any): CreateApiScopeInput { data = typeof data === 'object' ? data : {}; - let result = new ClientGrantTypeOutput(); + let result = new CreateApiScopeInput(); result.init(data); return result; } toJSON(data?: any) { data = typeof data === 'object' ? data : {}; - data["clientId"] = this.clientId; - data["grantType"] = this.grantType; + data["enabled"] = this.enabled; + data["name"] = this.name; + data["displayName"] = this.displayName; + data["description"] = this.description; + data["required"] = this.required; + data["emphasize"] = this.emphasize; + data["showInDiscoveryDocument"] = this.showInDiscoveryDocument; return data; } } -export interface IClientGrantTypeOutput { - clientId: string; - grantType: string | undefined; +export interface ICreateApiScopeInput { + enabled: boolean; + name: string | undefined; + displayName: string | undefined; + description: string | undefined; + required: boolean; + emphasize: boolean; + showInDiscoveryDocument: boolean; } -export class ClientIdPRestrictionOutput implements IClientIdPRestrictionOutput { +export class CreateClientInput implements ICreateClientInput { clientId!: string; - provider!: string | undefined; + clientName!: string; + description!: string | undefined; + allowedGrantTypes!: string | undefined; - constructor(data?: IClientIdPRestrictionOutput) { + constructor(data?: ICreateClientInput) { if (data) { for (var property in data) { if (data.hasOwnProperty(property)) @@ -9292,13 +10933,15 @@ export class ClientIdPRestrictionOutput implements IClientIdPRestrictionOutput { init(_data?: any) { if (_data) { this.clientId = _data["clientId"]; - this.provider = _data["provider"]; + this.clientName = _data["clientName"]; + this.description = _data["description"]; + this.allowedGrantTypes = _data["allowedGrantTypes"]; } } - static fromJS(data: any): ClientIdPRestrictionOutput { + static fromJS(data: any): CreateClientInput { data = typeof data === 'object' ? data : {}; - let result = new ClientIdPRestrictionOutput(); + let result = new CreateClientInput(); result.init(data); return result; } @@ -9306,21 +10949,28 @@ export class ClientIdPRestrictionOutput implements IClientIdPRestrictionOutput { toJSON(data?: any) { data = typeof data === 'object' ? data : {}; data["clientId"] = this.clientId; - data["provider"] = this.provider; + data["clientName"] = this.clientName; + data["description"] = this.description; + data["allowedGrantTypes"] = this.allowedGrantTypes; return data; } } -export interface IClientIdPRestrictionOutput { +export interface ICreateClientInput { clientId: string; - provider: string | undefined; + clientName: string; + description: string | undefined; + allowedGrantTypes: string | undefined; } -export class ClientPostLogoutRedirectUriOutput implements IClientPostLogoutRedirectUriOutput { - clientId!: string; - postLogoutRedirectUri!: string | undefined; +export class CreateDataDictinaryDetailInput implements ICreateDataDictinaryDetailInput { + id!: string; + code!: string; + displayText!: string; + description!: string | undefined; + order!: number; - constructor(data?: IClientPostLogoutRedirectUriOutput) { + constructor(data?: ICreateDataDictinaryDetailInput) { if (data) { for (var property in data) { if (data.hasOwnProperty(property)) @@ -9331,37 +10981,46 @@ export class ClientPostLogoutRedirectUriOutput implements IClientPostLogoutRedir init(_data?: any) { if (_data) { - this.clientId = _data["clientId"]; - this.postLogoutRedirectUri = _data["postLogoutRedirectUri"]; + this.id = _data["id"]; + this.code = _data["code"]; + this.displayText = _data["displayText"]; + this.description = _data["description"]; + this.order = _data["order"]; } } - static fromJS(data: any): ClientPostLogoutRedirectUriOutput { + static fromJS(data: any): CreateDataDictinaryDetailInput { data = typeof data === 'object' ? data : {}; - let result = new ClientPostLogoutRedirectUriOutput(); + let result = new CreateDataDictinaryDetailInput(); result.init(data); return result; } toJSON(data?: any) { data = typeof data === 'object' ? data : {}; - data["clientId"] = this.clientId; - data["postLogoutRedirectUri"] = this.postLogoutRedirectUri; + data["id"] = this.id; + data["code"] = this.code; + data["displayText"] = this.displayText; + data["description"] = this.description; + data["order"] = this.order; return data; } } -export interface IClientPostLogoutRedirectUriOutput { - clientId: string; - postLogoutRedirectUri: string | undefined; +export interface ICreateDataDictinaryDetailInput { + id: string; + code: string; + displayText: string; + description: string | undefined; + order: number; } -export class ClientPropertyOutput implements IClientPropertyOutput { - clientId!: string; - key!: string | undefined; - value!: string | undefined; +export class CreateDataDictinaryInput implements ICreateDataDictinaryInput { + code!: string; + displayText!: string; + description!: string | undefined; - constructor(data?: IClientPropertyOutput) { + constructor(data?: ICreateDataDictinaryInput) { if (data) { for (var property in data) { if (data.hasOwnProperty(property)) @@ -9372,39 +11031,39 @@ export class ClientPropertyOutput implements IClientPropertyOutput { init(_data?: any) { if (_data) { - this.clientId = _data["clientId"]; - this.key = _data["key"]; - this.value = _data["value"]; + this.code = _data["code"]; + this.displayText = _data["displayText"]; + this.description = _data["description"]; } } - static fromJS(data: any): ClientPropertyOutput { + static fromJS(data: any): CreateDataDictinaryInput { data = typeof data === 'object' ? data : {}; - let result = new ClientPropertyOutput(); + let result = new CreateDataDictinaryInput(); result.init(data); return result; } toJSON(data?: any) { data = typeof data === 'object' ? data : {}; - data["clientId"] = this.clientId; - data["key"] = this.key; - data["value"] = this.value; + data["code"] = this.code; + data["displayText"] = this.displayText; + data["description"] = this.description; return data; } } -export interface IClientPropertyOutput { - clientId: string; - key: string | undefined; - value: string | undefined; +export interface ICreateDataDictinaryInput { + code: string; + displayText: string; + description: string | undefined; } -export class ClientRedirectUriOutput implements IClientRedirectUriOutput { - clientId!: string; - redirectUri!: string | undefined; +export class CreateFileInput implements ICreateFileInput { + fileName!: string; + filePath!: string; - constructor(data?: IClientRedirectUriOutput) { + constructor(data?: ICreateFileInput) { if (data) { for (var property in data) { if (data.hasOwnProperty(property)) @@ -9415,36 +11074,41 @@ export class ClientRedirectUriOutput implements IClientRedirectUriOutput { init(_data?: any) { if (_data) { - this.clientId = _data["clientId"]; - this.redirectUri = _data["redirectUri"]; + this.fileName = _data["fileName"]; + this.filePath = _data["filePath"]; } } - static fromJS(data: any): ClientRedirectUriOutput { + static fromJS(data: any): CreateFileInput { data = typeof data === 'object' ? data : {}; - let result = new ClientRedirectUriOutput(); + let result = new CreateFileInput(); result.init(data); return result; } toJSON(data?: any) { data = typeof data === 'object' ? data : {}; - data["clientId"] = this.clientId; - data["redirectUri"] = this.redirectUri; + data["fileName"] = this.fileName; + data["filePath"] = this.filePath; return data; } } -export interface IClientRedirectUriOutput { - clientId: string; - redirectUri: string | undefined; +export interface ICreateFileInput { + fileName: string; + filePath: string; } -export class ClientScopeOutput implements IClientScopeOutput { - clientId!: string; - scope!: string | undefined; +export class CreateIdentityResourceInput implements ICreateIdentityResourceInput { + name!: string | undefined; + displayName!: string | undefined; + description!: string | undefined; + enabled!: boolean; + required!: boolean; + emphasize!: boolean; + showInDiscoveryDocument!: boolean; - constructor(data?: IClientScopeOutput) { + constructor(data?: ICreateIdentityResourceInput) { if (data) { for (var property in data) { if (data.hasOwnProperty(property)) @@ -9455,38 +11119,57 @@ export class ClientScopeOutput implements IClientScopeOutput { init(_data?: any) { if (_data) { - this.clientId = _data["clientId"]; - this.scope = _data["scope"]; + this.name = _data["name"]; + this.displayName = _data["displayName"]; + this.description = _data["description"]; + this.enabled = _data["enabled"]; + this.required = _data["required"]; + this.emphasize = _data["emphasize"]; + this.showInDiscoveryDocument = _data["showInDiscoveryDocument"]; } } - static fromJS(data: any): ClientScopeOutput { + static fromJS(data: any): CreateIdentityResourceInput { data = typeof data === 'object' ? data : {}; - let result = new ClientScopeOutput(); + let result = new CreateIdentityResourceInput(); result.init(data); return result; } toJSON(data?: any) { data = typeof data === 'object' ? data : {}; - data["clientId"] = this.clientId; - data["scope"] = this.scope; + data["name"] = this.name; + data["displayName"] = this.displayName; + data["description"] = this.description; + data["enabled"] = this.enabled; + data["required"] = this.required; + data["emphasize"] = this.emphasize; + data["showInDiscoveryDocument"] = this.showInDiscoveryDocument; return data; } } -export interface IClientScopeOutput { - clientId: string; - scope: string | undefined; +export interface ICreateIdentityResourceInput { + name: string | undefined; + displayName: string | undefined; + description: string | undefined; + enabled: boolean; + required: boolean; + emphasize: boolean; + showInDiscoveryDocument: boolean; } -export class ClientSecretOutput implements IClientSecretOutput { - type!: string | undefined; - value!: string | undefined; - description!: string | undefined; - expiration!: moment.Moment | undefined; +export class CreateNotificationInput implements ICreateNotificationInput { + /** 消息标题 */ + title!: string | undefined; + /** 消息内容 */ + content!: string | undefined; + messageType!: MessageType; + /** 接收人 +如果消息类型是广播消息,接收人字段为空 */ + receiveIds!: string[] | undefined; - constructor(data?: IClientSecretOutput) { + constructor(data?: ICreateNotificationInput) { if (data) { for (var property in data) { if (data.hasOwnProperty(property)) @@ -9497,41 +11180,54 @@ export class ClientSecretOutput implements IClientSecretOutput { init(_data?: any) { if (_data) { - this.type = _data["type"]; - this.value = _data["value"]; - this.description = _data["description"]; - this.expiration = _data["expiration"] ? moment(_data["expiration"].toString()) : undefined; + this.title = _data["title"]; + this.content = _data["content"]; + this.messageType = _data["messageType"]; + if (Array.isArray(_data["receiveIds"])) { + this.receiveIds = [] as any; + for (let item of _data["receiveIds"]) + this.receiveIds!.push(item); + } } } - static fromJS(data: any): ClientSecretOutput { + static fromJS(data: any): CreateNotificationInput { data = typeof data === 'object' ? data : {}; - let result = new ClientSecretOutput(); + let result = new CreateNotificationInput(); result.init(data); return result; } toJSON(data?: any) { data = typeof data === 'object' ? data : {}; - data["type"] = this.type; - data["value"] = this.value; - data["description"] = this.description; - data["expiration"] = this.expiration ? this.expiration.toISOString() : undefined; + data["title"] = this.title; + data["content"] = this.content; + data["messageType"] = this.messageType; + if (Array.isArray(this.receiveIds)) { + data["receiveIds"] = []; + for (let item of this.receiveIds) + data["receiveIds"].push(item); + } return data; } } -export interface IClientSecretOutput { - type: string | undefined; - value: string | undefined; - description: string | undefined; - expiration: moment.Moment | undefined; +export interface ICreateNotificationInput { + /** 消息标题 */ + title: string | undefined; + /** 消息内容 */ + content: string | undefined; + messageType: MessageType; + /** 接收人 +如果消息类型是广播消息,接收人字段为空 */ + receiveIds: string[] | undefined; } -export class ClockDto implements IClockDto { - kind!: string | undefined; +export class CreateOrganizationUnitInput implements ICreateOrganizationUnitInput { + displayName!: string; + parentId!: string | undefined; - constructor(data?: IClockDto) { + constructor(data?: ICreateOrganizationUnitInput) { if (data) { for (var property in data) { if (data.hasOwnProperty(property)) @@ -9542,38 +11238,43 @@ export class ClockDto implements IClockDto { init(_data?: any) { if (_data) { - this.kind = _data["kind"]; + this.displayName = _data["displayName"]; + this.parentId = _data["parentId"]; } } - static fromJS(data: any): ClockDto { + static fromJS(data: any): CreateOrganizationUnitInput { data = typeof data === 'object' ? data : {}; - let result = new ClockDto(); + let result = new CreateOrganizationUnitInput(); result.init(data); return result; } toJSON(data?: any) { data = typeof data === 'object' ? data : {}; - data["kind"] = this.kind; + data["displayName"] = this.displayName; + data["parentId"] = this.parentId; return data; } } -export interface IClockDto { - kind: string | undefined; +export interface ICreateOrganizationUnitInput { + displayName: string; + parentId: string | undefined; } -export class ControllerApiDescriptionModel implements IControllerApiDescriptionModel { - controllerName!: string | undefined; - controllerGroupName!: string | undefined; - isRemoteService!: boolean; - apiVersion!: string | undefined; - type!: string | undefined; - interfaces!: ControllerInterfaceApiDescriptionModel[] | undefined; - actions!: { [key: string]: ActionApiDescriptionModel; } | undefined; +export class CurrentCultureDto implements ICurrentCultureDto { + displayName!: string | undefined; + englishName!: string | undefined; + threeLetterIsoLanguageName!: string | undefined; + twoLetterIsoLanguageName!: string | undefined; + isRightToLeft!: boolean; + cultureName!: string | undefined; + name!: string | undefined; + nativeName!: string | undefined; + dateTimeFormat!: DateTimeFormatDto; - constructor(data?: IControllerApiDescriptionModel) { + constructor(data?: ICurrentCultureDto) { if (data) { for (var property in data) { if (data.hasOwnProperty(property)) @@ -9584,70 +11285,58 @@ export class ControllerApiDescriptionModel implements IControllerApiDescriptionM init(_data?: any) { if (_data) { - this.controllerName = _data["controllerName"]; - this.controllerGroupName = _data["controllerGroupName"]; - this.isRemoteService = _data["isRemoteService"]; - this.apiVersion = _data["apiVersion"]; - this.type = _data["type"]; - if (Array.isArray(_data["interfaces"])) { - this.interfaces = [] as any; - for (let item of _data["interfaces"]) - this.interfaces!.push(ControllerInterfaceApiDescriptionModel.fromJS(item)); - } - if (_data["actions"]) { - this.actions = {} as any; - for (let key in _data["actions"]) { - if (_data["actions"].hasOwnProperty(key)) - (this.actions)![key] = _data["actions"][key] ? ActionApiDescriptionModel.fromJS(_data["actions"][key]) : new ActionApiDescriptionModel(); - } - } + this.displayName = _data["displayName"]; + this.englishName = _data["englishName"]; + this.threeLetterIsoLanguageName = _data["threeLetterIsoLanguageName"]; + this.twoLetterIsoLanguageName = _data["twoLetterIsoLanguageName"]; + this.isRightToLeft = _data["isRightToLeft"]; + this.cultureName = _data["cultureName"]; + this.name = _data["name"]; + this.nativeName = _data["nativeName"]; + this.dateTimeFormat = _data["dateTimeFormat"] ? DateTimeFormatDto.fromJS(_data["dateTimeFormat"]) : undefined; } } - static fromJS(data: any): ControllerApiDescriptionModel { + static fromJS(data: any): CurrentCultureDto { data = typeof data === 'object' ? data : {}; - let result = new ControllerApiDescriptionModel(); + let result = new CurrentCultureDto(); result.init(data); return result; } toJSON(data?: any) { data = typeof data === 'object' ? data : {}; - data["controllerName"] = this.controllerName; - data["controllerGroupName"] = this.controllerGroupName; - data["isRemoteService"] = this.isRemoteService; - data["apiVersion"] = this.apiVersion; - data["type"] = this.type; - if (Array.isArray(this.interfaces)) { - data["interfaces"] = []; - for (let item of this.interfaces) - data["interfaces"].push(item.toJSON()); - } - if (this.actions) { - data["actions"] = {}; - for (let key in this.actions) { - if (this.actions.hasOwnProperty(key)) - (data["actions"])[key] = this.actions[key] ? this.actions[key].toJSON() : undefined; - } - } + data["displayName"] = this.displayName; + data["englishName"] = this.englishName; + data["threeLetterIsoLanguageName"] = this.threeLetterIsoLanguageName; + data["twoLetterIsoLanguageName"] = this.twoLetterIsoLanguageName; + data["isRightToLeft"] = this.isRightToLeft; + data["cultureName"] = this.cultureName; + data["name"] = this.name; + data["nativeName"] = this.nativeName; + data["dateTimeFormat"] = this.dateTimeFormat ? this.dateTimeFormat.toJSON() : undefined; return data; } } -export interface IControllerApiDescriptionModel { - controllerName: string | undefined; - controllerGroupName: string | undefined; - isRemoteService: boolean; - apiVersion: string | undefined; - type: string | undefined; - interfaces: ControllerInterfaceApiDescriptionModel[] | undefined; - actions: { [key: string]: ActionApiDescriptionModel; } | undefined; +export interface ICurrentCultureDto { + displayName: string | undefined; + englishName: string | undefined; + threeLetterIsoLanguageName: string | undefined; + twoLetterIsoLanguageName: string | undefined; + isRightToLeft: boolean; + cultureName: string | undefined; + name: string | undefined; + nativeName: string | undefined; + dateTimeFormat: DateTimeFormatDto; } -export class ControllerInterfaceApiDescriptionModel implements IControllerInterfaceApiDescriptionModel { - type!: string | undefined; +export class CurrentTenantDto implements ICurrentTenantDto { + id!: string | undefined; + name!: string | undefined; + isAvailable!: boolean; - constructor(data?: IControllerInterfaceApiDescriptionModel) { + constructor(data?: ICurrentTenantDto) { if (data) { for (var property in data) { if (data.hasOwnProperty(property)) @@ -9658,38 +11347,52 @@ export class ControllerInterfaceApiDescriptionModel implements IControllerInterf init(_data?: any) { if (_data) { - this.type = _data["type"]; + this.id = _data["id"]; + this.name = _data["name"]; + this.isAvailable = _data["isAvailable"]; } } - static fromJS(data: any): ControllerInterfaceApiDescriptionModel { + static fromJS(data: any): CurrentTenantDto { data = typeof data === 'object' ? data : {}; - let result = new ControllerInterfaceApiDescriptionModel(); + let result = new CurrentTenantDto(); result.init(data); return result; } toJSON(data?: any) { data = typeof data === 'object' ? data : {}; - data["type"] = this.type; + data["id"] = this.id; + data["name"] = this.name; + data["isAvailable"] = this.isAvailable; return data; } } -export interface IControllerInterfaceApiDescriptionModel { - type: string | undefined; +export interface ICurrentTenantDto { + id: string | undefined; + name: string | undefined; + isAvailable: boolean; } -export class CreateApiResourceInput implements ICreateApiResourceInput { +export class CurrentUserDto implements ICurrentUserDto { + isAuthenticated!: boolean; + id!: string | undefined; + tenantId!: string | undefined; + impersonatorUserId!: string | undefined; + impersonatorTenantId!: string | undefined; + impersonatorUserName!: string | undefined; + impersonatorTenantName!: string | undefined; + userName!: string | undefined; name!: string | undefined; - displayName!: string | undefined; - description!: string | undefined; - enabled!: boolean; - allowedAccessTokenSigningAlgorithms!: string | undefined; - showInDiscoveryDocument!: boolean; - secret!: string | undefined; + surName!: string | undefined; + email!: string | undefined; + emailVerified!: boolean; + phoneNumber!: string | undefined; + phoneNumberVerified!: boolean; + roles!: string[] | undefined; - constructor(data?: ICreateApiResourceInput) { + constructor(data?: ICurrentUserDto) { if (data) { for (var property in data) { if (data.hasOwnProperty(property)) @@ -9700,56 +11403,88 @@ export class CreateApiResourceInput implements ICreateApiResourceInput { init(_data?: any) { if (_data) { + this.isAuthenticated = _data["isAuthenticated"]; + this.id = _data["id"]; + this.tenantId = _data["tenantId"]; + this.impersonatorUserId = _data["impersonatorUserId"]; + this.impersonatorTenantId = _data["impersonatorTenantId"]; + this.impersonatorUserName = _data["impersonatorUserName"]; + this.impersonatorTenantName = _data["impersonatorTenantName"]; + this.userName = _data["userName"]; this.name = _data["name"]; - this.displayName = _data["displayName"]; - this.description = _data["description"]; - this.enabled = _data["enabled"]; - this.allowedAccessTokenSigningAlgorithms = _data["allowedAccessTokenSigningAlgorithms"]; - this.showInDiscoveryDocument = _data["showInDiscoveryDocument"]; - this.secret = _data["secret"]; + this.surName = _data["surName"]; + this.email = _data["email"]; + this.emailVerified = _data["emailVerified"]; + this.phoneNumber = _data["phoneNumber"]; + this.phoneNumberVerified = _data["phoneNumberVerified"]; + if (Array.isArray(_data["roles"])) { + this.roles = [] as any; + for (let item of _data["roles"]) + this.roles!.push(item); + } } } - static fromJS(data: any): CreateApiResourceInput { + static fromJS(data: any): CurrentUserDto { data = typeof data === 'object' ? data : {}; - let result = new CreateApiResourceInput(); + let result = new CurrentUserDto(); result.init(data); return result; } toJSON(data?: any) { data = typeof data === 'object' ? data : {}; + data["isAuthenticated"] = this.isAuthenticated; + data["id"] = this.id; + data["tenantId"] = this.tenantId; + data["impersonatorUserId"] = this.impersonatorUserId; + data["impersonatorTenantId"] = this.impersonatorTenantId; + data["impersonatorUserName"] = this.impersonatorUserName; + data["impersonatorTenantName"] = this.impersonatorTenantName; + data["userName"] = this.userName; data["name"] = this.name; - data["displayName"] = this.displayName; - data["description"] = this.description; - data["enabled"] = this.enabled; - data["allowedAccessTokenSigningAlgorithms"] = this.allowedAccessTokenSigningAlgorithms; - data["showInDiscoveryDocument"] = this.showInDiscoveryDocument; - data["secret"] = this.secret; + data["surName"] = this.surName; + data["email"] = this.email; + data["emailVerified"] = this.emailVerified; + data["phoneNumber"] = this.phoneNumber; + data["phoneNumberVerified"] = this.phoneNumberVerified; + if (Array.isArray(this.roles)) { + data["roles"] = []; + for (let item of this.roles) + data["roles"].push(item); + } return data; } } -export interface ICreateApiResourceInput { +export interface ICurrentUserDto { + isAuthenticated: boolean; + id: string | undefined; + tenantId: string | undefined; + impersonatorUserId: string | undefined; + impersonatorTenantId: string | undefined; + impersonatorUserName: string | undefined; + impersonatorTenantName: string | undefined; + userName: string | undefined; name: string | undefined; - displayName: string | undefined; - description: string | undefined; - enabled: boolean; - allowedAccessTokenSigningAlgorithms: string | undefined; - showInDiscoveryDocument: boolean; - secret: string | undefined; + surName: string | undefined; + email: string | undefined; + emailVerified: boolean; + phoneNumber: string | undefined; + phoneNumberVerified: boolean; + roles: string[] | undefined; } -export class CreateApiScopeInput implements ICreateApiScopeInput { - enabled!: boolean; - name!: string | undefined; - displayName!: string | undefined; - description!: string | undefined; - required!: boolean; - emphasize!: boolean; - showInDiscoveryDocument!: boolean; +export class DateTimeFormatDto implements IDateTimeFormatDto { + calendarAlgorithmType!: string | undefined; + dateTimeFormatLong!: string | undefined; + shortDatePattern!: string | undefined; + fullDateTimePattern!: string | undefined; + dateSeparator!: string | undefined; + shortTimePattern!: string | undefined; + longTimePattern!: string | undefined; - constructor(data?: ICreateApiScopeInput) { + constructor(data?: IDateTimeFormatDto) { if (data) { for (var property in data) { if (data.hasOwnProperty(property)) @@ -9760,53 +11495,51 @@ export class CreateApiScopeInput implements ICreateApiScopeInput { init(_data?: any) { if (_data) { - this.enabled = _data["enabled"]; - this.name = _data["name"]; - this.displayName = _data["displayName"]; - this.description = _data["description"]; - this.required = _data["required"]; - this.emphasize = _data["emphasize"]; - this.showInDiscoveryDocument = _data["showInDiscoveryDocument"]; + this.calendarAlgorithmType = _data["calendarAlgorithmType"]; + this.dateTimeFormatLong = _data["dateTimeFormatLong"]; + this.shortDatePattern = _data["shortDatePattern"]; + this.fullDateTimePattern = _data["fullDateTimePattern"]; + this.dateSeparator = _data["dateSeparator"]; + this.shortTimePattern = _data["shortTimePattern"]; + this.longTimePattern = _data["longTimePattern"]; } } - static fromJS(data: any): CreateApiScopeInput { + static fromJS(data: any): DateTimeFormatDto { data = typeof data === 'object' ? data : {}; - let result = new CreateApiScopeInput(); + let result = new DateTimeFormatDto(); result.init(data); return result; } toJSON(data?: any) { data = typeof data === 'object' ? data : {}; - data["enabled"] = this.enabled; - data["name"] = this.name; - data["displayName"] = this.displayName; - data["description"] = this.description; - data["required"] = this.required; - data["emphasize"] = this.emphasize; - data["showInDiscoveryDocument"] = this.showInDiscoveryDocument; + data["calendarAlgorithmType"] = this.calendarAlgorithmType; + data["dateTimeFormatLong"] = this.dateTimeFormatLong; + data["shortDatePattern"] = this.shortDatePattern; + data["fullDateTimePattern"] = this.fullDateTimePattern; + data["dateSeparator"] = this.dateSeparator; + data["shortTimePattern"] = this.shortTimePattern; + data["longTimePattern"] = this.longTimePattern; return data; } } -export interface ICreateApiScopeInput { - enabled: boolean; - name: string | undefined; - displayName: string | undefined; - description: string | undefined; - required: boolean; - emphasize: boolean; - showInDiscoveryDocument: boolean; +export interface IDateTimeFormatDto { + calendarAlgorithmType: string | undefined; + dateTimeFormatLong: string | undefined; + shortDatePattern: string | undefined; + fullDateTimePattern: string | undefined; + dateSeparator: string | undefined; + shortTimePattern: string | undefined; + longTimePattern: string | undefined; } -export class CreateClientInput implements ICreateClientInput { - clientId!: string; - clientName!: string; - description!: string | undefined; - allowedGrantTypes!: string | undefined; +export class DeleteDataDictionaryDetailInput implements IDeleteDataDictionaryDetailInput { + dataDictionaryId!: string; + dataDictionayDetailId!: string; - constructor(data?: ICreateClientInput) { + constructor(data?: IDeleteDataDictionaryDetailInput) { if (data) { for (var property in data) { if (data.hasOwnProperty(property)) @@ -9817,45 +11550,43 @@ export class CreateClientInput implements ICreateClientInput { init(_data?: any) { if (_data) { - this.clientId = _data["clientId"]; - this.clientName = _data["clientName"]; - this.description = _data["description"]; - this.allowedGrantTypes = _data["allowedGrantTypes"]; + this.dataDictionaryId = _data["dataDictionaryId"]; + this.dataDictionayDetailId = _data["dataDictionayDetailId"]; } } - static fromJS(data: any): CreateClientInput { + static fromJS(data: any): DeleteDataDictionaryDetailInput { data = typeof data === 'object' ? data : {}; - let result = new CreateClientInput(); + let result = new DeleteDataDictionaryDetailInput(); result.init(data); return result; } toJSON(data?: any) { data = typeof data === 'object' ? data : {}; - data["clientId"] = this.clientId; - data["clientName"] = this.clientName; - data["description"] = this.description; - data["allowedGrantTypes"] = this.allowedGrantTypes; + data["dataDictionaryId"] = this.dataDictionaryId; + data["dataDictionayDetailId"] = this.dataDictionayDetailId; return data; } } -export interface ICreateClientInput { - clientId: string; - clientName: string; - description: string | undefined; - allowedGrantTypes: string | undefined; +export interface IDeleteDataDictionaryDetailInput { + dataDictionaryId: string; + dataDictionayDetailId: string; } -export class CreateDataDictinaryDetailInput implements ICreateDataDictinaryDetailInput { - id!: string; - code!: string; - displayText!: string; - description!: string | undefined; - order!: number; +export class EmailSettingsDto implements IEmailSettingsDto { + smtpHost!: string | undefined; + smtpPort!: number; + smtpUserName!: string | undefined; + smtpPassword!: string | undefined; + smtpDomain!: string | undefined; + smtpEnableSsl!: boolean; + smtpUseDefaultCredentials!: boolean; + defaultFromAddress!: string | undefined; + defaultFromDisplayName!: string | undefined; - constructor(data?: ICreateDataDictinaryDetailInput) { + constructor(data?: IEmailSettingsDto) { if (data) { for (var property in data) { if (data.hasOwnProperty(property)) @@ -9866,46 +11597,57 @@ export class CreateDataDictinaryDetailInput implements ICreateDataDictinaryDetai init(_data?: any) { if (_data) { - this.id = _data["id"]; - this.code = _data["code"]; - this.displayText = _data["displayText"]; - this.description = _data["description"]; - this.order = _data["order"]; + this.smtpHost = _data["smtpHost"]; + this.smtpPort = _data["smtpPort"]; + this.smtpUserName = _data["smtpUserName"]; + this.smtpPassword = _data["smtpPassword"]; + this.smtpDomain = _data["smtpDomain"]; + this.smtpEnableSsl = _data["smtpEnableSsl"]; + this.smtpUseDefaultCredentials = _data["smtpUseDefaultCredentials"]; + this.defaultFromAddress = _data["defaultFromAddress"]; + this.defaultFromDisplayName = _data["defaultFromDisplayName"]; } } - static fromJS(data: any): CreateDataDictinaryDetailInput { + static fromJS(data: any): EmailSettingsDto { data = typeof data === 'object' ? data : {}; - let result = new CreateDataDictinaryDetailInput(); + let result = new EmailSettingsDto(); result.init(data); return result; } toJSON(data?: any) { data = typeof data === 'object' ? data : {}; - data["id"] = this.id; - data["code"] = this.code; - data["displayText"] = this.displayText; - data["description"] = this.description; - data["order"] = this.order; - return data; - } -} - -export interface ICreateDataDictinaryDetailInput { - id: string; - code: string; - displayText: string; - description: string | undefined; - order: number; + data["smtpHost"] = this.smtpHost; + data["smtpPort"] = this.smtpPort; + data["smtpUserName"] = this.smtpUserName; + data["smtpPassword"] = this.smtpPassword; + data["smtpDomain"] = this.smtpDomain; + data["smtpEnableSsl"] = this.smtpEnableSsl; + data["smtpUseDefaultCredentials"] = this.smtpUseDefaultCredentials; + data["defaultFromAddress"] = this.defaultFromAddress; + data["defaultFromDisplayName"] = this.defaultFromDisplayName; + return data; + } } -export class CreateDataDictinaryInput implements ICreateDataDictinaryInput { - code!: string; - displayText!: string; - description!: string | undefined; +export interface IEmailSettingsDto { + smtpHost: string | undefined; + smtpPort: number; + smtpUserName: string | undefined; + smtpPassword: string | undefined; + smtpDomain: string | undefined; + smtpEnableSsl: boolean; + smtpUseDefaultCredentials: boolean; + defaultFromAddress: string | undefined; + defaultFromDisplayName: string | undefined; +} - constructor(data?: ICreateDataDictinaryInput) { +export class EnabledInput implements IEnabledInput { + clientId!: string; + enabled!: boolean; + + constructor(data?: IEnabledInput) { if (data) { for (var property in data) { if (data.hasOwnProperty(property)) @@ -9916,39 +11658,36 @@ export class CreateDataDictinaryInput implements ICreateDataDictinaryInput { init(_data?: any) { if (_data) { - this.code = _data["code"]; - this.displayText = _data["displayText"]; - this.description = _data["description"]; + this.clientId = _data["clientId"]; + this.enabled = _data["enabled"]; } } - static fromJS(data: any): CreateDataDictinaryInput { + static fromJS(data: any): EnabledInput { data = typeof data === 'object' ? data : {}; - let result = new CreateDataDictinaryInput(); + let result = new EnabledInput(); result.init(data); return result; } toJSON(data?: any) { data = typeof data === 'object' ? data : {}; - data["code"] = this.code; - data["displayText"] = this.displayText; - data["description"] = this.description; + data["clientId"] = this.clientId; + data["enabled"] = this.enabled; return data; } } -export interface ICreateDataDictinaryInput { - code: string; - displayText: string; - description: string | undefined; +export interface IEnabledInput { + clientId: string; + enabled: boolean; } -export class CreateFileInput implements ICreateFileInput { - fileName!: string; - filePath!: string; +export class EntityExtensionDto implements IEntityExtensionDto { + properties!: { [key: string]: ExtensionPropertyDto; } | undefined; + configuration!: { [key: string]: any; } | undefined; - constructor(data?: ICreateFileInput) { + constructor(data?: IEntityExtensionDto) { if (data) { for (var property in data) { if (data.hasOwnProperty(property)) @@ -9959,41 +11698,60 @@ export class CreateFileInput implements ICreateFileInput { init(_data?: any) { if (_data) { - this.fileName = _data["fileName"]; - this.filePath = _data["filePath"]; + if (_data["properties"]) { + this.properties = {} as any; + for (let key in _data["properties"]) { + if (_data["properties"].hasOwnProperty(key)) + (this.properties)![key] = _data["properties"][key] ? ExtensionPropertyDto.fromJS(_data["properties"][key]) : new ExtensionPropertyDto(); + } + } + if (_data["configuration"]) { + this.configuration = {} as any; + for (let key in _data["configuration"]) { + if (_data["configuration"].hasOwnProperty(key)) + (this.configuration)![key] = _data["configuration"][key]; + } + } } } - static fromJS(data: any): CreateFileInput { + static fromJS(data: any): EntityExtensionDto { data = typeof data === 'object' ? data : {}; - let result = new CreateFileInput(); + let result = new EntityExtensionDto(); result.init(data); return result; } toJSON(data?: any) { data = typeof data === 'object' ? data : {}; - data["fileName"] = this.fileName; - data["filePath"] = this.filePath; + if (this.properties) { + data["properties"] = {}; + for (let key in this.properties) { + if (this.properties.hasOwnProperty(key)) + (data["properties"])[key] = this.properties[key] ? this.properties[key].toJSON() : undefined; + } + } + if (this.configuration) { + data["configuration"] = {}; + for (let key in this.configuration) { + if (this.configuration.hasOwnProperty(key)) + (data["configuration"])[key] = this.configuration[key]; + } + } return data; } } -export interface ICreateFileInput { - fileName: string; - filePath: string; +export interface IEntityExtensionDto { + properties: { [key: string]: ExtensionPropertyDto; } | undefined; + configuration: { [key: string]: any; } | undefined; } -export class CreateIdentityResourceInput implements ICreateIdentityResourceInput { - name!: string | undefined; - displayName!: string | undefined; - description!: string | undefined; - enabled!: boolean; - required!: boolean; - emphasize!: boolean; - showInDiscoveryDocument!: boolean; +export class ExtensionEnumDto implements IExtensionEnumDto { + fields!: ExtensionEnumFieldDto[] | undefined; + localizationResource!: string | undefined; - constructor(data?: ICreateIdentityResourceInput) { + constructor(data?: IExtensionEnumDto) { if (data) { for (var property in data) { if (data.hasOwnProperty(property)) @@ -10004,57 +11762,44 @@ export class CreateIdentityResourceInput implements ICreateIdentityResourceInput init(_data?: any) { if (_data) { - this.name = _data["name"]; - this.displayName = _data["displayName"]; - this.description = _data["description"]; - this.enabled = _data["enabled"]; - this.required = _data["required"]; - this.emphasize = _data["emphasize"]; - this.showInDiscoveryDocument = _data["showInDiscoveryDocument"]; + if (Array.isArray(_data["fields"])) { + this.fields = [] as any; + for (let item of _data["fields"]) + this.fields!.push(ExtensionEnumFieldDto.fromJS(item)); + } + this.localizationResource = _data["localizationResource"]; } } - static fromJS(data: any): CreateIdentityResourceInput { + static fromJS(data: any): ExtensionEnumDto { data = typeof data === 'object' ? data : {}; - let result = new CreateIdentityResourceInput(); + let result = new ExtensionEnumDto(); result.init(data); return result; } toJSON(data?: any) { data = typeof data === 'object' ? data : {}; - data["name"] = this.name; - data["displayName"] = this.displayName; - data["description"] = this.description; - data["enabled"] = this.enabled; - data["required"] = this.required; - data["emphasize"] = this.emphasize; - data["showInDiscoveryDocument"] = this.showInDiscoveryDocument; + if (Array.isArray(this.fields)) { + data["fields"] = []; + for (let item of this.fields) + data["fields"].push(item.toJSON()); + } + data["localizationResource"] = this.localizationResource; return data; } } -export interface ICreateIdentityResourceInput { - name: string | undefined; - displayName: string | undefined; - description: string | undefined; - enabled: boolean; - required: boolean; - emphasize: boolean; - showInDiscoveryDocument: boolean; +export interface IExtensionEnumDto { + fields: ExtensionEnumFieldDto[] | undefined; + localizationResource: string | undefined; } -export class CreateNotificationInput implements ICreateNotificationInput { - /** 消息标题 */ - title!: string | undefined; - /** 消息内容 */ - content!: string | undefined; - messageType!: MessageType; - /** 接收人 -如果消息类型是广播消息,接收人字段为空 */ - receiveIds!: string[] | undefined; +export class ExtensionEnumFieldDto implements IExtensionEnumFieldDto { + name!: string | undefined; + value!: any | undefined; - constructor(data?: ICreateNotificationInput) { + constructor(data?: IExtensionEnumFieldDto) { if (data) { for (var property in data) { if (data.hasOwnProperty(property)) @@ -10065,61 +11810,35 @@ export class CreateNotificationInput implements ICreateNotificationInput { init(_data?: any) { if (_data) { - this.title = _data["title"]; - this.content = _data["content"]; - this.messageType = _data["messageType"]; - if (Array.isArray(_data["receiveIds"])) { - this.receiveIds = [] as any; - for (let item of _data["receiveIds"]) - this.receiveIds!.push(item); - } + this.name = _data["name"]; + this.value = _data["value"]; } } - static fromJS(data: any): CreateNotificationInput { + static fromJS(data: any): ExtensionEnumFieldDto { data = typeof data === 'object' ? data : {}; - let result = new CreateNotificationInput(); + let result = new ExtensionEnumFieldDto(); result.init(data); return result; } toJSON(data?: any) { data = typeof data === 'object' ? data : {}; - data["title"] = this.title; - data["content"] = this.content; - data["messageType"] = this.messageType; - if (Array.isArray(this.receiveIds)) { - data["receiveIds"] = []; - for (let item of this.receiveIds) - data["receiveIds"].push(item); - } + data["name"] = this.name; + data["value"] = this.value; return data; } } -export interface ICreateNotificationInput { - /** 消息标题 */ - title: string | undefined; - /** 消息内容 */ - content: string | undefined; - messageType: MessageType; - /** 接收人 -如果消息类型是广播消息,接收人字段为空 */ - receiveIds: string[] | undefined; +export interface IExtensionEnumFieldDto { + name: string | undefined; + value: any | undefined; } -export class CurrentCultureDto implements ICurrentCultureDto { - displayName!: string | undefined; - englishName!: string | undefined; - threeLetterIsoLanguageName!: string | undefined; - twoLetterIsoLanguageName!: string | undefined; - isRightToLeft!: boolean; - cultureName!: string | undefined; - name!: string | undefined; - nativeName!: string | undefined; - dateTimeFormat!: DateTimeFormatDto; +export class ExtensionPropertyApiCreateDto implements IExtensionPropertyApiCreateDto { + isAvailable!: boolean; - constructor(data?: ICurrentCultureDto) { + constructor(data?: IExtensionPropertyApiCreateDto) { if (data) { for (var property in data) { if (data.hasOwnProperty(property)) @@ -10130,58 +11849,34 @@ export class CurrentCultureDto implements ICurrentCultureDto { init(_data?: any) { if (_data) { - this.displayName = _data["displayName"]; - this.englishName = _data["englishName"]; - this.threeLetterIsoLanguageName = _data["threeLetterIsoLanguageName"]; - this.twoLetterIsoLanguageName = _data["twoLetterIsoLanguageName"]; - this.isRightToLeft = _data["isRightToLeft"]; - this.cultureName = _data["cultureName"]; - this.name = _data["name"]; - this.nativeName = _data["nativeName"]; - this.dateTimeFormat = _data["dateTimeFormat"] ? DateTimeFormatDto.fromJS(_data["dateTimeFormat"]) : undefined; + this.isAvailable = _data["isAvailable"]; } } - static fromJS(data: any): CurrentCultureDto { + static fromJS(data: any): ExtensionPropertyApiCreateDto { data = typeof data === 'object' ? data : {}; - let result = new CurrentCultureDto(); + let result = new ExtensionPropertyApiCreateDto(); result.init(data); return result; } toJSON(data?: any) { data = typeof data === 'object' ? data : {}; - data["displayName"] = this.displayName; - data["englishName"] = this.englishName; - data["threeLetterIsoLanguageName"] = this.threeLetterIsoLanguageName; - data["twoLetterIsoLanguageName"] = this.twoLetterIsoLanguageName; - data["isRightToLeft"] = this.isRightToLeft; - data["cultureName"] = this.cultureName; - data["name"] = this.name; - data["nativeName"] = this.nativeName; - data["dateTimeFormat"] = this.dateTimeFormat ? this.dateTimeFormat.toJSON() : undefined; + data["isAvailable"] = this.isAvailable; return data; } } -export interface ICurrentCultureDto { - displayName: string | undefined; - englishName: string | undefined; - threeLetterIsoLanguageName: string | undefined; - twoLetterIsoLanguageName: string | undefined; - isRightToLeft: boolean; - cultureName: string | undefined; - name: string | undefined; - nativeName: string | undefined; - dateTimeFormat: DateTimeFormatDto; +export interface IExtensionPropertyApiCreateDto { + isAvailable: boolean; } -export class CurrentTenantDto implements ICurrentTenantDto { - id!: string | undefined; - name!: string | undefined; - isAvailable!: boolean; +export class ExtensionPropertyApiDto implements IExtensionPropertyApiDto { + onGet!: ExtensionPropertyApiGetDto; + onCreate!: ExtensionPropertyApiCreateDto; + onUpdate!: ExtensionPropertyApiUpdateDto; - constructor(data?: ICurrentTenantDto) { + constructor(data?: IExtensionPropertyApiDto) { if (data) { for (var property in data) { if (data.hasOwnProperty(property)) @@ -10192,52 +11887,38 @@ export class CurrentTenantDto implements ICurrentTenantDto { init(_data?: any) { if (_data) { - this.id = _data["id"]; - this.name = _data["name"]; - this.isAvailable = _data["isAvailable"]; + this.onGet = _data["onGet"] ? ExtensionPropertyApiGetDto.fromJS(_data["onGet"]) : undefined; + this.onCreate = _data["onCreate"] ? ExtensionPropertyApiCreateDto.fromJS(_data["onCreate"]) : undefined; + this.onUpdate = _data["onUpdate"] ? ExtensionPropertyApiUpdateDto.fromJS(_data["onUpdate"]) : undefined; } } - static fromJS(data: any): CurrentTenantDto { + static fromJS(data: any): ExtensionPropertyApiDto { data = typeof data === 'object' ? data : {}; - let result = new CurrentTenantDto(); + let result = new ExtensionPropertyApiDto(); result.init(data); return result; } toJSON(data?: any) { data = typeof data === 'object' ? data : {}; - data["id"] = this.id; - data["name"] = this.name; - data["isAvailable"] = this.isAvailable; + data["onGet"] = this.onGet ? this.onGet.toJSON() : undefined; + data["onCreate"] = this.onCreate ? this.onCreate.toJSON() : undefined; + data["onUpdate"] = this.onUpdate ? this.onUpdate.toJSON() : undefined; return data; } } -export interface ICurrentTenantDto { - id: string | undefined; - name: string | undefined; - isAvailable: boolean; +export interface IExtensionPropertyApiDto { + onGet: ExtensionPropertyApiGetDto; + onCreate: ExtensionPropertyApiCreateDto; + onUpdate: ExtensionPropertyApiUpdateDto; } -export class CurrentUserDto implements ICurrentUserDto { - isAuthenticated!: boolean; - id!: string | undefined; - tenantId!: string | undefined; - impersonatorUserId!: string | undefined; - impersonatorTenantId!: string | undefined; - impersonatorUserName!: string | undefined; - impersonatorTenantName!: string | undefined; - userName!: string | undefined; - name!: string | undefined; - surName!: string | undefined; - email!: string | undefined; - emailVerified!: boolean; - phoneNumber!: string | undefined; - phoneNumberVerified!: boolean; - roles!: string[] | undefined; +export class ExtensionPropertyApiGetDto implements IExtensionPropertyApiGetDto { + isAvailable!: boolean; - constructor(data?: ICurrentUserDto) { + constructor(data?: IExtensionPropertyApiGetDto) { if (data) { for (var property in data) { if (data.hasOwnProperty(property)) @@ -10248,88 +11929,32 @@ export class CurrentUserDto implements ICurrentUserDto { init(_data?: any) { if (_data) { - this.isAuthenticated = _data["isAuthenticated"]; - this.id = _data["id"]; - this.tenantId = _data["tenantId"]; - this.impersonatorUserId = _data["impersonatorUserId"]; - this.impersonatorTenantId = _data["impersonatorTenantId"]; - this.impersonatorUserName = _data["impersonatorUserName"]; - this.impersonatorTenantName = _data["impersonatorTenantName"]; - this.userName = _data["userName"]; - this.name = _data["name"]; - this.surName = _data["surName"]; - this.email = _data["email"]; - this.emailVerified = _data["emailVerified"]; - this.phoneNumber = _data["phoneNumber"]; - this.phoneNumberVerified = _data["phoneNumberVerified"]; - if (Array.isArray(_data["roles"])) { - this.roles = [] as any; - for (let item of _data["roles"]) - this.roles!.push(item); - } + this.isAvailable = _data["isAvailable"]; } } - static fromJS(data: any): CurrentUserDto { + static fromJS(data: any): ExtensionPropertyApiGetDto { data = typeof data === 'object' ? data : {}; - let result = new CurrentUserDto(); + let result = new ExtensionPropertyApiGetDto(); result.init(data); return result; } toJSON(data?: any) { data = typeof data === 'object' ? data : {}; - data["isAuthenticated"] = this.isAuthenticated; - data["id"] = this.id; - data["tenantId"] = this.tenantId; - data["impersonatorUserId"] = this.impersonatorUserId; - data["impersonatorTenantId"] = this.impersonatorTenantId; - data["impersonatorUserName"] = this.impersonatorUserName; - data["impersonatorTenantName"] = this.impersonatorTenantName; - data["userName"] = this.userName; - data["name"] = this.name; - data["surName"] = this.surName; - data["email"] = this.email; - data["emailVerified"] = this.emailVerified; - data["phoneNumber"] = this.phoneNumber; - data["phoneNumberVerified"] = this.phoneNumberVerified; - if (Array.isArray(this.roles)) { - data["roles"] = []; - for (let item of this.roles) - data["roles"].push(item); - } + data["isAvailable"] = this.isAvailable; return data; } } -export interface ICurrentUserDto { - isAuthenticated: boolean; - id: string | undefined; - tenantId: string | undefined; - impersonatorUserId: string | undefined; - impersonatorTenantId: string | undefined; - impersonatorUserName: string | undefined; - impersonatorTenantName: string | undefined; - userName: string | undefined; - name: string | undefined; - surName: string | undefined; - email: string | undefined; - emailVerified: boolean; - phoneNumber: string | undefined; - phoneNumberVerified: boolean; - roles: string[] | undefined; +export interface IExtensionPropertyApiGetDto { + isAvailable: boolean; } -export class DateTimeFormatDto implements IDateTimeFormatDto { - calendarAlgorithmType!: string | undefined; - dateTimeFormatLong!: string | undefined; - shortDatePattern!: string | undefined; - fullDateTimePattern!: string | undefined; - dateSeparator!: string | undefined; - shortTimePattern!: string | undefined; - longTimePattern!: string | undefined; +export class ExtensionPropertyApiUpdateDto implements IExtensionPropertyApiUpdateDto { + isAvailable!: boolean; - constructor(data?: IDateTimeFormatDto) { + constructor(data?: IExtensionPropertyApiUpdateDto) { if (data) { for (var property in data) { if (data.hasOwnProperty(property)) @@ -10340,51 +11965,33 @@ export class DateTimeFormatDto implements IDateTimeFormatDto { init(_data?: any) { if (_data) { - this.calendarAlgorithmType = _data["calendarAlgorithmType"]; - this.dateTimeFormatLong = _data["dateTimeFormatLong"]; - this.shortDatePattern = _data["shortDatePattern"]; - this.fullDateTimePattern = _data["fullDateTimePattern"]; - this.dateSeparator = _data["dateSeparator"]; - this.shortTimePattern = _data["shortTimePattern"]; - this.longTimePattern = _data["longTimePattern"]; + this.isAvailable = _data["isAvailable"]; } } - static fromJS(data: any): DateTimeFormatDto { + static fromJS(data: any): ExtensionPropertyApiUpdateDto { data = typeof data === 'object' ? data : {}; - let result = new DateTimeFormatDto(); + let result = new ExtensionPropertyApiUpdateDto(); result.init(data); return result; } toJSON(data?: any) { data = typeof data === 'object' ? data : {}; - data["calendarAlgorithmType"] = this.calendarAlgorithmType; - data["dateTimeFormatLong"] = this.dateTimeFormatLong; - data["shortDatePattern"] = this.shortDatePattern; - data["fullDateTimePattern"] = this.fullDateTimePattern; - data["dateSeparator"] = this.dateSeparator; - data["shortTimePattern"] = this.shortTimePattern; - data["longTimePattern"] = this.longTimePattern; + data["isAvailable"] = this.isAvailable; return data; } } -export interface IDateTimeFormatDto { - calendarAlgorithmType: string | undefined; - dateTimeFormatLong: string | undefined; - shortDatePattern: string | undefined; - fullDateTimePattern: string | undefined; - dateSeparator: string | undefined; - shortTimePattern: string | undefined; - longTimePattern: string | undefined; +export interface IExtensionPropertyApiUpdateDto { + isAvailable: boolean; } -export class DeleteDataDictionaryDetailInput implements IDeleteDataDictionaryDetailInput { - dataDictionaryId!: string; - dataDictionayDetailId!: string; +export class ExtensionPropertyAttributeDto implements IExtensionPropertyAttributeDto { + typeSimple!: string | undefined; + config!: { [key: string]: any; } | undefined; - constructor(data?: IDeleteDataDictionaryDetailInput) { + constructor(data?: IExtensionPropertyAttributeDto) { if (data) { for (var property in data) { if (data.hasOwnProperty(property)) @@ -10395,43 +12002,54 @@ export class DeleteDataDictionaryDetailInput implements IDeleteDataDictionaryDet init(_data?: any) { if (_data) { - this.dataDictionaryId = _data["dataDictionaryId"]; - this.dataDictionayDetailId = _data["dataDictionayDetailId"]; + this.typeSimple = _data["typeSimple"]; + if (_data["config"]) { + this.config = {} as any; + for (let key in _data["config"]) { + if (_data["config"].hasOwnProperty(key)) + (this.config)![key] = _data["config"][key]; + } + } } } - static fromJS(data: any): DeleteDataDictionaryDetailInput { + static fromJS(data: any): ExtensionPropertyAttributeDto { data = typeof data === 'object' ? data : {}; - let result = new DeleteDataDictionaryDetailInput(); + let result = new ExtensionPropertyAttributeDto(); result.init(data); return result; } toJSON(data?: any) { data = typeof data === 'object' ? data : {}; - data["dataDictionaryId"] = this.dataDictionaryId; - data["dataDictionayDetailId"] = this.dataDictionayDetailId; + data["typeSimple"] = this.typeSimple; + if (this.config) { + data["config"] = {}; + for (let key in this.config) { + if (this.config.hasOwnProperty(key)) + (data["config"])[key] = this.config[key]; + } + } return data; } } -export interface IDeleteDataDictionaryDetailInput { - dataDictionaryId: string; - dataDictionayDetailId: string; +export interface IExtensionPropertyAttributeDto { + typeSimple: string | undefined; + config: { [key: string]: any; } | undefined; } -export class EmailSettingsDto implements IEmailSettingsDto { - smtpHost!: string | undefined; - smtpPort!: number; - smtpUserName!: string | undefined; - smtpPassword!: string | undefined; - smtpDomain!: string | undefined; - smtpEnableSsl!: boolean; - smtpUseDefaultCredentials!: boolean; - defaultFromAddress!: string | undefined; - defaultFromDisplayName!: string | undefined; +export class ExtensionPropertyDto implements IExtensionPropertyDto { + type!: string | undefined; + typeSimple!: string | undefined; + displayName!: LocalizableStringDto; + api!: ExtensionPropertyApiDto; + ui!: ExtensionPropertyUiDto; + attributes!: ExtensionPropertyAttributeDto[] | undefined; + configuration!: { [key: string]: any; } | undefined; + defaultValue!: any | undefined; - constructor(data?: IEmailSettingsDto) { + constructor(data?: IExtensionPropertyDto) { if (data) { for (var property in data) { if (data.hasOwnProperty(property)) @@ -10442,57 +12060,76 @@ export class EmailSettingsDto implements IEmailSettingsDto { init(_data?: any) { if (_data) { - this.smtpHost = _data["smtpHost"]; - this.smtpPort = _data["smtpPort"]; - this.smtpUserName = _data["smtpUserName"]; - this.smtpPassword = _data["smtpPassword"]; - this.smtpDomain = _data["smtpDomain"]; - this.smtpEnableSsl = _data["smtpEnableSsl"]; - this.smtpUseDefaultCredentials = _data["smtpUseDefaultCredentials"]; - this.defaultFromAddress = _data["defaultFromAddress"]; - this.defaultFromDisplayName = _data["defaultFromDisplayName"]; + this.type = _data["type"]; + this.typeSimple = _data["typeSimple"]; + this.displayName = _data["displayName"] ? LocalizableStringDto.fromJS(_data["displayName"]) : undefined; + this.api = _data["api"] ? ExtensionPropertyApiDto.fromJS(_data["api"]) : undefined; + this.ui = _data["ui"] ? ExtensionPropertyUiDto.fromJS(_data["ui"]) : undefined; + if (Array.isArray(_data["attributes"])) { + this.attributes = [] as any; + for (let item of _data["attributes"]) + this.attributes!.push(ExtensionPropertyAttributeDto.fromJS(item)); + } + if (_data["configuration"]) { + this.configuration = {} as any; + for (let key in _data["configuration"]) { + if (_data["configuration"].hasOwnProperty(key)) + (this.configuration)![key] = _data["configuration"][key]; + } + } + this.defaultValue = _data["defaultValue"]; } } - static fromJS(data: any): EmailSettingsDto { + static fromJS(data: any): ExtensionPropertyDto { data = typeof data === 'object' ? data : {}; - let result = new EmailSettingsDto(); + let result = new ExtensionPropertyDto(); result.init(data); return result; } toJSON(data?: any) { data = typeof data === 'object' ? data : {}; - data["smtpHost"] = this.smtpHost; - data["smtpPort"] = this.smtpPort; - data["smtpUserName"] = this.smtpUserName; - data["smtpPassword"] = this.smtpPassword; - data["smtpDomain"] = this.smtpDomain; - data["smtpEnableSsl"] = this.smtpEnableSsl; - data["smtpUseDefaultCredentials"] = this.smtpUseDefaultCredentials; - data["defaultFromAddress"] = this.defaultFromAddress; - data["defaultFromDisplayName"] = this.defaultFromDisplayName; + data["type"] = this.type; + data["typeSimple"] = this.typeSimple; + data["displayName"] = this.displayName ? this.displayName.toJSON() : undefined; + data["api"] = this.api ? this.api.toJSON() : undefined; + data["ui"] = this.ui ? this.ui.toJSON() : undefined; + if (Array.isArray(this.attributes)) { + data["attributes"] = []; + for (let item of this.attributes) + data["attributes"].push(item.toJSON()); + } + if (this.configuration) { + data["configuration"] = {}; + for (let key in this.configuration) { + if (this.configuration.hasOwnProperty(key)) + (data["configuration"])[key] = this.configuration[key]; + } + } + data["defaultValue"] = this.defaultValue; return data; } } -export interface IEmailSettingsDto { - smtpHost: string | undefined; - smtpPort: number; - smtpUserName: string | undefined; - smtpPassword: string | undefined; - smtpDomain: string | undefined; - smtpEnableSsl: boolean; - smtpUseDefaultCredentials: boolean; - defaultFromAddress: string | undefined; - defaultFromDisplayName: string | undefined; +export interface IExtensionPropertyDto { + type: string | undefined; + typeSimple: string | undefined; + displayName: LocalizableStringDto; + api: ExtensionPropertyApiDto; + ui: ExtensionPropertyUiDto; + attributes: ExtensionPropertyAttributeDto[] | undefined; + configuration: { [key: string]: any; } | undefined; + defaultValue: any | undefined; } -export class EnabledInput implements IEnabledInput { - clientId!: string; - enabled!: boolean; +export class ExtensionPropertyUiDto implements IExtensionPropertyUiDto { + onTable!: ExtensionPropertyUiTableDto; + onCreateForm!: ExtensionPropertyUiFormDto; + onEditForm!: ExtensionPropertyUiFormDto; + lookup!: ExtensionPropertyUiLookupDto; - constructor(data?: IEnabledInput) { + constructor(data?: IExtensionPropertyUiDto) { if (data) { for (var property in data) { if (data.hasOwnProperty(property)) @@ -10503,36 +12140,41 @@ export class EnabledInput implements IEnabledInput { init(_data?: any) { if (_data) { - this.clientId = _data["clientId"]; - this.enabled = _data["enabled"]; + this.onTable = _data["onTable"] ? ExtensionPropertyUiTableDto.fromJS(_data["onTable"]) : undefined; + this.onCreateForm = _data["onCreateForm"] ? ExtensionPropertyUiFormDto.fromJS(_data["onCreateForm"]) : undefined; + this.onEditForm = _data["onEditForm"] ? ExtensionPropertyUiFormDto.fromJS(_data["onEditForm"]) : undefined; + this.lookup = _data["lookup"] ? ExtensionPropertyUiLookupDto.fromJS(_data["lookup"]) : undefined; } } - static fromJS(data: any): EnabledInput { + static fromJS(data: any): ExtensionPropertyUiDto { data = typeof data === 'object' ? data : {}; - let result = new EnabledInput(); + let result = new ExtensionPropertyUiDto(); result.init(data); return result; } toJSON(data?: any) { data = typeof data === 'object' ? data : {}; - data["clientId"] = this.clientId; - data["enabled"] = this.enabled; + data["onTable"] = this.onTable ? this.onTable.toJSON() : undefined; + data["onCreateForm"] = this.onCreateForm ? this.onCreateForm.toJSON() : undefined; + data["onEditForm"] = this.onEditForm ? this.onEditForm.toJSON() : undefined; + data["lookup"] = this.lookup ? this.lookup.toJSON() : undefined; return data; } } -export interface IEnabledInput { - clientId: string; - enabled: boolean; +export interface IExtensionPropertyUiDto { + onTable: ExtensionPropertyUiTableDto; + onCreateForm: ExtensionPropertyUiFormDto; + onEditForm: ExtensionPropertyUiFormDto; + lookup: ExtensionPropertyUiLookupDto; } -export class EntityExtensionDto implements IEntityExtensionDto { - properties!: { [key: string]: ExtensionPropertyDto; } | undefined; - configuration!: { [key: string]: any; } | undefined; +export class ExtensionPropertyUiFormDto implements IExtensionPropertyUiFormDto { + isVisible!: boolean; - constructor(data?: IEntityExtensionDto) { + constructor(data?: IExtensionPropertyUiFormDto) { if (data) { for (var property in data) { if (data.hasOwnProperty(property)) @@ -10543,60 +12185,36 @@ export class EntityExtensionDto implements IEntityExtensionDto { init(_data?: any) { if (_data) { - if (_data["properties"]) { - this.properties = {} as any; - for (let key in _data["properties"]) { - if (_data["properties"].hasOwnProperty(key)) - (this.properties)![key] = _data["properties"][key] ? ExtensionPropertyDto.fromJS(_data["properties"][key]) : new ExtensionPropertyDto(); - } - } - if (_data["configuration"]) { - this.configuration = {} as any; - for (let key in _data["configuration"]) { - if (_data["configuration"].hasOwnProperty(key)) - (this.configuration)![key] = _data["configuration"][key]; - } - } + this.isVisible = _data["isVisible"]; } } - static fromJS(data: any): EntityExtensionDto { + static fromJS(data: any): ExtensionPropertyUiFormDto { data = typeof data === 'object' ? data : {}; - let result = new EntityExtensionDto(); + let result = new ExtensionPropertyUiFormDto(); result.init(data); return result; } toJSON(data?: any) { data = typeof data === 'object' ? data : {}; - if (this.properties) { - data["properties"] = {}; - for (let key in this.properties) { - if (this.properties.hasOwnProperty(key)) - (data["properties"])[key] = this.properties[key] ? this.properties[key].toJSON() : undefined; - } - } - if (this.configuration) { - data["configuration"] = {}; - for (let key in this.configuration) { - if (this.configuration.hasOwnProperty(key)) - (data["configuration"])[key] = this.configuration[key]; - } - } + data["isVisible"] = this.isVisible; return data; } } -export interface IEntityExtensionDto { - properties: { [key: string]: ExtensionPropertyDto; } | undefined; - configuration: { [key: string]: any; } | undefined; +export interface IExtensionPropertyUiFormDto { + isVisible: boolean; } -export class ExtensionEnumDto implements IExtensionEnumDto { - fields!: ExtensionEnumFieldDto[] | undefined; - localizationResource!: string | undefined; +export class ExtensionPropertyUiLookupDto implements IExtensionPropertyUiLookupDto { + url!: string | undefined; + resultListPropertyName!: string | undefined; + displayPropertyName!: string | undefined; + valuePropertyName!: string | undefined; + filterParamName!: string | undefined; - constructor(data?: IExtensionEnumDto) { + constructor(data?: IExtensionPropertyUiLookupDto) { if (data) { for (var property in data) { if (data.hasOwnProperty(property)) @@ -10607,44 +12225,44 @@ export class ExtensionEnumDto implements IExtensionEnumDto { init(_data?: any) { if (_data) { - if (Array.isArray(_data["fields"])) { - this.fields = [] as any; - for (let item of _data["fields"]) - this.fields!.push(ExtensionEnumFieldDto.fromJS(item)); - } - this.localizationResource = _data["localizationResource"]; + this.url = _data["url"]; + this.resultListPropertyName = _data["resultListPropertyName"]; + this.displayPropertyName = _data["displayPropertyName"]; + this.valuePropertyName = _data["valuePropertyName"]; + this.filterParamName = _data["filterParamName"]; } } - static fromJS(data: any): ExtensionEnumDto { + static fromJS(data: any): ExtensionPropertyUiLookupDto { data = typeof data === 'object' ? data : {}; - let result = new ExtensionEnumDto(); + let result = new ExtensionPropertyUiLookupDto(); result.init(data); return result; } toJSON(data?: any) { data = typeof data === 'object' ? data : {}; - if (Array.isArray(this.fields)) { - data["fields"] = []; - for (let item of this.fields) - data["fields"].push(item.toJSON()); - } - data["localizationResource"] = this.localizationResource; + data["url"] = this.url; + data["resultListPropertyName"] = this.resultListPropertyName; + data["displayPropertyName"] = this.displayPropertyName; + data["valuePropertyName"] = this.valuePropertyName; + data["filterParamName"] = this.filterParamName; return data; } } -export interface IExtensionEnumDto { - fields: ExtensionEnumFieldDto[] | undefined; - localizationResource: string | undefined; +export interface IExtensionPropertyUiLookupDto { + url: string | undefined; + resultListPropertyName: string | undefined; + displayPropertyName: string | undefined; + valuePropertyName: string | undefined; + filterParamName: string | undefined; } -export class ExtensionEnumFieldDto implements IExtensionEnumFieldDto { - name!: string | undefined; - value!: any | undefined; +export class ExtensionPropertyUiTableDto implements IExtensionPropertyUiTableDto { + isVisible!: boolean; - constructor(data?: IExtensionEnumFieldDto) { + constructor(data?: IExtensionPropertyUiTableDto) { if (data) { for (var property in data) { if (data.hasOwnProperty(property)) @@ -10655,35 +12273,39 @@ export class ExtensionEnumFieldDto implements IExtensionEnumFieldDto { init(_data?: any) { if (_data) { - this.name = _data["name"]; - this.value = _data["value"]; + this.isVisible = _data["isVisible"]; } } - static fromJS(data: any): ExtensionEnumFieldDto { + static fromJS(data: any): ExtensionPropertyUiTableDto { data = typeof data === 'object' ? data : {}; - let result = new ExtensionEnumFieldDto(); + let result = new ExtensionPropertyUiTableDto(); result.init(data); return result; } toJSON(data?: any) { data = typeof data === 'object' ? data : {}; - data["name"] = this.name; - data["value"] = this.value; + data["isVisible"] = this.isVisible; return data; } } -export interface IExtensionEnumFieldDto { - name: string | undefined; - value: any | undefined; +export interface IExtensionPropertyUiTableDto { + isVisible: boolean; } -export class ExtensionPropertyApiCreateDto implements IExtensionPropertyApiCreateDto { - isAvailable!: boolean; +export class FeatureDto implements IFeatureDto { + name!: string | undefined; + displayName!: string | undefined; + value!: string | undefined; + provider!: FeatureProviderDto; + description!: string | undefined; + valueType!: IStringValueType; + depth!: number; + parentName!: string | undefined; - constructor(data?: IExtensionPropertyApiCreateDto) { + constructor(data?: IFeatureDto) { if (data) { for (var property in data) { if (data.hasOwnProperty(property)) @@ -10694,34 +12316,55 @@ export class ExtensionPropertyApiCreateDto implements IExtensionPropertyApiCreat init(_data?: any) { if (_data) { - this.isAvailable = _data["isAvailable"]; + this.name = _data["name"]; + this.displayName = _data["displayName"]; + this.value = _data["value"]; + this.provider = _data["provider"] ? FeatureProviderDto.fromJS(_data["provider"]) : undefined; + this.description = _data["description"]; + this.valueType = _data["valueType"] ? IStringValueType.fromJS(_data["valueType"]) : undefined; + this.depth = _data["depth"]; + this.parentName = _data["parentName"]; } } - static fromJS(data: any): ExtensionPropertyApiCreateDto { + static fromJS(data: any): FeatureDto { data = typeof data === 'object' ? data : {}; - let result = new ExtensionPropertyApiCreateDto(); + let result = new FeatureDto(); result.init(data); return result; } toJSON(data?: any) { data = typeof data === 'object' ? data : {}; - data["isAvailable"] = this.isAvailable; + data["name"] = this.name; + data["displayName"] = this.displayName; + data["value"] = this.value; + data["provider"] = this.provider ? this.provider.toJSON() : undefined; + data["description"] = this.description; + data["valueType"] = this.valueType ? this.valueType.toJSON() : undefined; + data["depth"] = this.depth; + data["parentName"] = this.parentName; return data; } } -export interface IExtensionPropertyApiCreateDto { - isAvailable: boolean; +export interface IFeatureDto { + name: string | undefined; + displayName: string | undefined; + value: string | undefined; + provider: FeatureProviderDto; + description: string | undefined; + valueType: IStringValueType; + depth: number; + parentName: string | undefined; } -export class ExtensionPropertyApiDto implements IExtensionPropertyApiDto { - onGet!: ExtensionPropertyApiGetDto; - onCreate!: ExtensionPropertyApiCreateDto; - onUpdate!: ExtensionPropertyApiUpdateDto; +export class FeatureGroupDto implements IFeatureGroupDto { + name!: string | undefined; + displayName!: string | undefined; + features!: FeatureDto[] | undefined; - constructor(data?: IExtensionPropertyApiDto) { + constructor(data?: IFeatureGroupDto) { if (data) { for (var property in data) { if (data.hasOwnProperty(property)) @@ -10732,38 +12375,47 @@ export class ExtensionPropertyApiDto implements IExtensionPropertyApiDto { init(_data?: any) { if (_data) { - this.onGet = _data["onGet"] ? ExtensionPropertyApiGetDto.fromJS(_data["onGet"]) : undefined; - this.onCreate = _data["onCreate"] ? ExtensionPropertyApiCreateDto.fromJS(_data["onCreate"]) : undefined; - this.onUpdate = _data["onUpdate"] ? ExtensionPropertyApiUpdateDto.fromJS(_data["onUpdate"]) : undefined; + this.name = _data["name"]; + this.displayName = _data["displayName"]; + if (Array.isArray(_data["features"])) { + this.features = [] as any; + for (let item of _data["features"]) + this.features!.push(FeatureDto.fromJS(item)); + } } } - static fromJS(data: any): ExtensionPropertyApiDto { + static fromJS(data: any): FeatureGroupDto { data = typeof data === 'object' ? data : {}; - let result = new ExtensionPropertyApiDto(); + let result = new FeatureGroupDto(); result.init(data); return result; } toJSON(data?: any) { data = typeof data === 'object' ? data : {}; - data["onGet"] = this.onGet ? this.onGet.toJSON() : undefined; - data["onCreate"] = this.onCreate ? this.onCreate.toJSON() : undefined; - data["onUpdate"] = this.onUpdate ? this.onUpdate.toJSON() : undefined; + data["name"] = this.name; + data["displayName"] = this.displayName; + if (Array.isArray(this.features)) { + data["features"] = []; + for (let item of this.features) + data["features"].push(item.toJSON()); + } return data; } } -export interface IExtensionPropertyApiDto { - onGet: ExtensionPropertyApiGetDto; - onCreate: ExtensionPropertyApiCreateDto; - onUpdate: ExtensionPropertyApiUpdateDto; +export interface IFeatureGroupDto { + name: string | undefined; + displayName: string | undefined; + features: FeatureDto[] | undefined; } -export class ExtensionPropertyApiGetDto implements IExtensionPropertyApiGetDto { - isAvailable!: boolean; +export class FeatureProviderDto implements IFeatureProviderDto { + name!: string | undefined; + key!: string | undefined; - constructor(data?: IExtensionPropertyApiGetDto) { + constructor(data?: IFeatureProviderDto) { if (data) { for (var property in data) { if (data.hasOwnProperty(property)) @@ -10774,32 +12426,42 @@ export class ExtensionPropertyApiGetDto implements IExtensionPropertyApiGetDto { init(_data?: any) { if (_data) { - this.isAvailable = _data["isAvailable"]; + this.name = _data["name"]; + this.key = _data["key"]; } } - static fromJS(data: any): ExtensionPropertyApiGetDto { + static fromJS(data: any): FeatureProviderDto { data = typeof data === 'object' ? data : {}; - let result = new ExtensionPropertyApiGetDto(); + let result = new FeatureProviderDto(); result.init(data); return result; } toJSON(data?: any) { data = typeof data === 'object' ? data : {}; - data["isAvailable"] = this.isAvailable; + data["name"] = this.name; + data["key"] = this.key; return data; } } -export interface IExtensionPropertyApiGetDto { - isAvailable: boolean; +export interface IFeatureProviderDto { + name: string | undefined; + key: string | undefined; } -export class ExtensionPropertyApiUpdateDto implements IExtensionPropertyApiUpdateDto { - isAvailable!: boolean; +export class FileAggregateRoute implements IFileAggregateRoute { + routeKeys!: string[] | undefined; + routeKeysConfig!: AggregateRouteConfig[] | undefined; + upstreamPathTemplate!: string | undefined; + upstreamHost!: string | undefined; + routeIsCaseSensitive!: boolean; + aggregator!: string | undefined; + readonly upstreamHttpMethod!: string[] | undefined; + priority!: number; - constructor(data?: IExtensionPropertyApiUpdateDto) { + constructor(data?: IFileAggregateRoute) { if (data) { for (var property in data) { if (data.hasOwnProperty(property)) @@ -10810,33 +12472,78 @@ export class ExtensionPropertyApiUpdateDto implements IExtensionPropertyApiUpdat init(_data?: any) { if (_data) { - this.isAvailable = _data["isAvailable"]; + if (Array.isArray(_data["routeKeys"])) { + this.routeKeys = [] as any; + for (let item of _data["routeKeys"]) + this.routeKeys!.push(item); + } + if (Array.isArray(_data["routeKeysConfig"])) { + this.routeKeysConfig = [] as any; + for (let item of _data["routeKeysConfig"]) + this.routeKeysConfig!.push(AggregateRouteConfig.fromJS(item)); + } + this.upstreamPathTemplate = _data["upstreamPathTemplate"]; + this.upstreamHost = _data["upstreamHost"]; + this.routeIsCaseSensitive = _data["routeIsCaseSensitive"]; + this.aggregator = _data["aggregator"]; + if (Array.isArray(_data["upstreamHttpMethod"])) { + (this).upstreamHttpMethod = [] as any; + for (let item of _data["upstreamHttpMethod"]) + (this).upstreamHttpMethod!.push(item); + } + this.priority = _data["priority"]; } } - static fromJS(data: any): ExtensionPropertyApiUpdateDto { + static fromJS(data: any): FileAggregateRoute { data = typeof data === 'object' ? data : {}; - let result = new ExtensionPropertyApiUpdateDto(); + let result = new FileAggregateRoute(); result.init(data); return result; } toJSON(data?: any) { data = typeof data === 'object' ? data : {}; - data["isAvailable"] = this.isAvailable; + if (Array.isArray(this.routeKeys)) { + data["routeKeys"] = []; + for (let item of this.routeKeys) + data["routeKeys"].push(item); + } + if (Array.isArray(this.routeKeysConfig)) { + data["routeKeysConfig"] = []; + for (let item of this.routeKeysConfig) + data["routeKeysConfig"].push(item.toJSON()); + } + data["upstreamPathTemplate"] = this.upstreamPathTemplate; + data["upstreamHost"] = this.upstreamHost; + data["routeIsCaseSensitive"] = this.routeIsCaseSensitive; + data["aggregator"] = this.aggregator; + if (Array.isArray(this.upstreamHttpMethod)) { + data["upstreamHttpMethod"] = []; + for (let item of this.upstreamHttpMethod) + data["upstreamHttpMethod"].push(item); + } + data["priority"] = this.priority; return data; } } -export interface IExtensionPropertyApiUpdateDto { - isAvailable: boolean; +export interface IFileAggregateRoute { + routeKeys: string[] | undefined; + routeKeysConfig: AggregateRouteConfig[] | undefined; + upstreamPathTemplate: string | undefined; + upstreamHost: string | undefined; + routeIsCaseSensitive: boolean; + aggregator: string | undefined; + upstreamHttpMethod: string[] | undefined; + priority: number; } -export class ExtensionPropertyAttributeDto implements IExtensionPropertyAttributeDto { - typeSimple!: string | undefined; - config!: { [key: string]: any; } | undefined; +export class FileAuthenticationOptions implements IFileAuthenticationOptions { + authenticationProviderKey!: string | undefined; + allowedScopes!: string[] | undefined; - constructor(data?: IExtensionPropertyAttributeDto) { + constructor(data?: IFileAuthenticationOptions) { if (data) { for (var property in data) { if (data.hasOwnProperty(property)) @@ -10847,54 +12554,44 @@ export class ExtensionPropertyAttributeDto implements IExtensionPropertyAttribut init(_data?: any) { if (_data) { - this.typeSimple = _data["typeSimple"]; - if (_data["config"]) { - this.config = {} as any; - for (let key in _data["config"]) { - if (_data["config"].hasOwnProperty(key)) - (this.config)![key] = _data["config"][key]; - } + this.authenticationProviderKey = _data["authenticationProviderKey"]; + if (Array.isArray(_data["allowedScopes"])) { + this.allowedScopes = [] as any; + for (let item of _data["allowedScopes"]) + this.allowedScopes!.push(item); } } } - static fromJS(data: any): ExtensionPropertyAttributeDto { + static fromJS(data: any): FileAuthenticationOptions { data = typeof data === 'object' ? data : {}; - let result = new ExtensionPropertyAttributeDto(); + let result = new FileAuthenticationOptions(); result.init(data); return result; } toJSON(data?: any) { data = typeof data === 'object' ? data : {}; - data["typeSimple"] = this.typeSimple; - if (this.config) { - data["config"] = {}; - for (let key in this.config) { - if (this.config.hasOwnProperty(key)) - (data["config"])[key] = this.config[key]; - } + data["authenticationProviderKey"] = this.authenticationProviderKey; + if (Array.isArray(this.allowedScopes)) { + data["allowedScopes"] = []; + for (let item of this.allowedScopes) + data["allowedScopes"].push(item); } return data; } } -export interface IExtensionPropertyAttributeDto { - typeSimple: string | undefined; - config: { [key: string]: any; } | undefined; +export interface IFileAuthenticationOptions { + authenticationProviderKey: string | undefined; + allowedScopes: string[] | undefined; } -export class ExtensionPropertyDto implements IExtensionPropertyDto { - type!: string | undefined; - typeSimple!: string | undefined; - displayName!: LocalizableStringDto; - api!: ExtensionPropertyApiDto; - ui!: ExtensionPropertyUiDto; - attributes!: ExtensionPropertyAttributeDto[] | undefined; - configuration!: { [key: string]: any; } | undefined; - defaultValue!: any | undefined; +export class FileCacheOptions implements IFileCacheOptions { + ttlSeconds!: number; + region!: string | undefined; - constructor(data?: IExtensionPropertyDto) { + constructor(data?: IFileCacheOptions) { if (data) { for (var property in data) { if (data.hasOwnProperty(property)) @@ -10905,76 +12602,38 @@ export class ExtensionPropertyDto implements IExtensionPropertyDto { init(_data?: any) { if (_data) { - this.type = _data["type"]; - this.typeSimple = _data["typeSimple"]; - this.displayName = _data["displayName"] ? LocalizableStringDto.fromJS(_data["displayName"]) : undefined; - this.api = _data["api"] ? ExtensionPropertyApiDto.fromJS(_data["api"]) : undefined; - this.ui = _data["ui"] ? ExtensionPropertyUiDto.fromJS(_data["ui"]) : undefined; - if (Array.isArray(_data["attributes"])) { - this.attributes = [] as any; - for (let item of _data["attributes"]) - this.attributes!.push(ExtensionPropertyAttributeDto.fromJS(item)); - } - if (_data["configuration"]) { - this.configuration = {} as any; - for (let key in _data["configuration"]) { - if (_data["configuration"].hasOwnProperty(key)) - (this.configuration)![key] = _data["configuration"][key]; - } - } - this.defaultValue = _data["defaultValue"]; + this.ttlSeconds = _data["ttlSeconds"]; + this.region = _data["region"]; } } - static fromJS(data: any): ExtensionPropertyDto { + static fromJS(data: any): FileCacheOptions { data = typeof data === 'object' ? data : {}; - let result = new ExtensionPropertyDto(); + let result = new FileCacheOptions(); result.init(data); return result; } toJSON(data?: any) { data = typeof data === 'object' ? data : {}; - data["type"] = this.type; - data["typeSimple"] = this.typeSimple; - data["displayName"] = this.displayName ? this.displayName.toJSON() : undefined; - data["api"] = this.api ? this.api.toJSON() : undefined; - data["ui"] = this.ui ? this.ui.toJSON() : undefined; - if (Array.isArray(this.attributes)) { - data["attributes"] = []; - for (let item of this.attributes) - data["attributes"].push(item.toJSON()); - } - if (this.configuration) { - data["configuration"] = {}; - for (let key in this.configuration) { - if (this.configuration.hasOwnProperty(key)) - (data["configuration"])[key] = this.configuration[key]; - } - } - data["defaultValue"] = this.defaultValue; + data["ttlSeconds"] = this.ttlSeconds; + data["region"] = this.region; return data; } } -export interface IExtensionPropertyDto { - type: string | undefined; - typeSimple: string | undefined; - displayName: LocalizableStringDto; - api: ExtensionPropertyApiDto; - ui: ExtensionPropertyUiDto; - attributes: ExtensionPropertyAttributeDto[] | undefined; - configuration: { [key: string]: any; } | undefined; - defaultValue: any | undefined; +export interface IFileCacheOptions { + ttlSeconds: number; + region: string | undefined; } -export class ExtensionPropertyUiDto implements IExtensionPropertyUiDto { - onTable!: ExtensionPropertyUiTableDto; - onCreateForm!: ExtensionPropertyUiFormDto; - onEditForm!: ExtensionPropertyUiFormDto; - lookup!: ExtensionPropertyUiLookupDto; +export class FileConfiguration implements IFileConfiguration { + routes!: FileRoute[] | undefined; + dynamicRoutes!: FileDynamicRoute[] | undefined; + aggregates!: FileAggregateRoute[] | undefined; + globalConfiguration!: FileGlobalConfiguration; - constructor(data?: IExtensionPropertyUiDto) { + constructor(data?: IFileConfiguration) { if (data) { for (var property in data) { if (data.hasOwnProperty(property)) @@ -10985,41 +12644,67 @@ export class ExtensionPropertyUiDto implements IExtensionPropertyUiDto { init(_data?: any) { if (_data) { - this.onTable = _data["onTable"] ? ExtensionPropertyUiTableDto.fromJS(_data["onTable"]) : undefined; - this.onCreateForm = _data["onCreateForm"] ? ExtensionPropertyUiFormDto.fromJS(_data["onCreateForm"]) : undefined; - this.onEditForm = _data["onEditForm"] ? ExtensionPropertyUiFormDto.fromJS(_data["onEditForm"]) : undefined; - this.lookup = _data["lookup"] ? ExtensionPropertyUiLookupDto.fromJS(_data["lookup"]) : undefined; + if (Array.isArray(_data["routes"])) { + this.routes = [] as any; + for (let item of _data["routes"]) + this.routes!.push(FileRoute.fromJS(item)); + } + if (Array.isArray(_data["dynamicRoutes"])) { + this.dynamicRoutes = [] as any; + for (let item of _data["dynamicRoutes"]) + this.dynamicRoutes!.push(FileDynamicRoute.fromJS(item)); + } + if (Array.isArray(_data["aggregates"])) { + this.aggregates = [] as any; + for (let item of _data["aggregates"]) + this.aggregates!.push(FileAggregateRoute.fromJS(item)); + } + this.globalConfiguration = _data["globalConfiguration"] ? FileGlobalConfiguration.fromJS(_data["globalConfiguration"]) : undefined; } } - static fromJS(data: any): ExtensionPropertyUiDto { + static fromJS(data: any): FileConfiguration { data = typeof data === 'object' ? data : {}; - let result = new ExtensionPropertyUiDto(); + let result = new FileConfiguration(); result.init(data); return result; } toJSON(data?: any) { data = typeof data === 'object' ? data : {}; - data["onTable"] = this.onTable ? this.onTable.toJSON() : undefined; - data["onCreateForm"] = this.onCreateForm ? this.onCreateForm.toJSON() : undefined; - data["onEditForm"] = this.onEditForm ? this.onEditForm.toJSON() : undefined; - data["lookup"] = this.lookup ? this.lookup.toJSON() : undefined; + if (Array.isArray(this.routes)) { + data["routes"] = []; + for (let item of this.routes) + data["routes"].push(item.toJSON()); + } + if (Array.isArray(this.dynamicRoutes)) { + data["dynamicRoutes"] = []; + for (let item of this.dynamicRoutes) + data["dynamicRoutes"].push(item.toJSON()); + } + if (Array.isArray(this.aggregates)) { + data["aggregates"] = []; + for (let item of this.aggregates) + data["aggregates"].push(item.toJSON()); + } + data["globalConfiguration"] = this.globalConfiguration ? this.globalConfiguration.toJSON() : undefined; return data; } } -export interface IExtensionPropertyUiDto { - onTable: ExtensionPropertyUiTableDto; - onCreateForm: ExtensionPropertyUiFormDto; - onEditForm: ExtensionPropertyUiFormDto; - lookup: ExtensionPropertyUiLookupDto; +export interface IFileConfiguration { + routes: FileRoute[] | undefined; + dynamicRoutes: FileDynamicRoute[] | undefined; + aggregates: FileAggregateRoute[] | undefined; + globalConfiguration: FileGlobalConfiguration; } -export class ExtensionPropertyUiFormDto implements IExtensionPropertyUiFormDto { - isVisible!: boolean; +export class FileDynamicRoute implements IFileDynamicRoute { + serviceName!: string | undefined; + rateLimitRule!: FileRateLimitRule; + downstreamHttpVersion!: string | undefined; - constructor(data?: IExtensionPropertyUiFormDto) { + constructor(data?: IFileDynamicRoute) { if (data) { for (var property in data) { if (data.hasOwnProperty(property)) @@ -11030,36 +12715,46 @@ export class ExtensionPropertyUiFormDto implements IExtensionPropertyUiFormDto { init(_data?: any) { if (_data) { - this.isVisible = _data["isVisible"]; + this.serviceName = _data["serviceName"]; + this.rateLimitRule = _data["rateLimitRule"] ? FileRateLimitRule.fromJS(_data["rateLimitRule"]) : undefined; + this.downstreamHttpVersion = _data["downstreamHttpVersion"]; } } - static fromJS(data: any): ExtensionPropertyUiFormDto { + static fromJS(data: any): FileDynamicRoute { data = typeof data === 'object' ? data : {}; - let result = new ExtensionPropertyUiFormDto(); + let result = new FileDynamicRoute(); result.init(data); return result; } toJSON(data?: any) { data = typeof data === 'object' ? data : {}; - data["isVisible"] = this.isVisible; + data["serviceName"] = this.serviceName; + data["rateLimitRule"] = this.rateLimitRule ? this.rateLimitRule.toJSON() : undefined; + data["downstreamHttpVersion"] = this.downstreamHttpVersion; return data; } } -export interface IExtensionPropertyUiFormDto { - isVisible: boolean; +export interface IFileDynamicRoute { + serviceName: string | undefined; + rateLimitRule: FileRateLimitRule; + downstreamHttpVersion: string | undefined; } -export class ExtensionPropertyUiLookupDto implements IExtensionPropertyUiLookupDto { - url!: string | undefined; - resultListPropertyName!: string | undefined; - displayPropertyName!: string | undefined; - valuePropertyName!: string | undefined; - filterParamName!: string | undefined; +export class FileGlobalConfiguration implements IFileGlobalConfiguration { + requestIdKey!: string | undefined; + serviceDiscoveryProvider!: FileServiceDiscoveryProvider; + rateLimitOptions!: FileRateLimitOptions; + qoSOptions!: FileQoSOptions; + baseUrl!: string | undefined; + loadBalancerOptions!: FileLoadBalancerOptions; + downstreamScheme!: string | undefined; + httpHandlerOptions!: FileHttpHandlerOptions; + downstreamHttpVersion!: string | undefined; - constructor(data?: IExtensionPropertyUiLookupDto) { + constructor(data?: IFileGlobalConfiguration) { if (data) { for (var property in data) { if (data.hasOwnProperty(property)) @@ -11070,44 +12765,57 @@ export class ExtensionPropertyUiLookupDto implements IExtensionPropertyUiLookupD init(_data?: any) { if (_data) { - this.url = _data["url"]; - this.resultListPropertyName = _data["resultListPropertyName"]; - this.displayPropertyName = _data["displayPropertyName"]; - this.valuePropertyName = _data["valuePropertyName"]; - this.filterParamName = _data["filterParamName"]; + this.requestIdKey = _data["requestIdKey"]; + this.serviceDiscoveryProvider = _data["serviceDiscoveryProvider"] ? FileServiceDiscoveryProvider.fromJS(_data["serviceDiscoveryProvider"]) : undefined; + this.rateLimitOptions = _data["rateLimitOptions"] ? FileRateLimitOptions.fromJS(_data["rateLimitOptions"]) : undefined; + this.qoSOptions = _data["qoSOptions"] ? FileQoSOptions.fromJS(_data["qoSOptions"]) : undefined; + this.baseUrl = _data["baseUrl"]; + this.loadBalancerOptions = _data["loadBalancerOptions"] ? FileLoadBalancerOptions.fromJS(_data["loadBalancerOptions"]) : undefined; + this.downstreamScheme = _data["downstreamScheme"]; + this.httpHandlerOptions = _data["httpHandlerOptions"] ? FileHttpHandlerOptions.fromJS(_data["httpHandlerOptions"]) : undefined; + this.downstreamHttpVersion = _data["downstreamHttpVersion"]; } } - static fromJS(data: any): ExtensionPropertyUiLookupDto { + static fromJS(data: any): FileGlobalConfiguration { data = typeof data === 'object' ? data : {}; - let result = new ExtensionPropertyUiLookupDto(); + let result = new FileGlobalConfiguration(); result.init(data); return result; } toJSON(data?: any) { data = typeof data === 'object' ? data : {}; - data["url"] = this.url; - data["resultListPropertyName"] = this.resultListPropertyName; - data["displayPropertyName"] = this.displayPropertyName; - data["valuePropertyName"] = this.valuePropertyName; - data["filterParamName"] = this.filterParamName; + data["requestIdKey"] = this.requestIdKey; + data["serviceDiscoveryProvider"] = this.serviceDiscoveryProvider ? this.serviceDiscoveryProvider.toJSON() : undefined; + data["rateLimitOptions"] = this.rateLimitOptions ? this.rateLimitOptions.toJSON() : undefined; + data["qoSOptions"] = this.qoSOptions ? this.qoSOptions.toJSON() : undefined; + data["baseUrl"] = this.baseUrl; + data["loadBalancerOptions"] = this.loadBalancerOptions ? this.loadBalancerOptions.toJSON() : undefined; + data["downstreamScheme"] = this.downstreamScheme; + data["httpHandlerOptions"] = this.httpHandlerOptions ? this.httpHandlerOptions.toJSON() : undefined; + data["downstreamHttpVersion"] = this.downstreamHttpVersion; return data; } } -export interface IExtensionPropertyUiLookupDto { - url: string | undefined; - resultListPropertyName: string | undefined; - displayPropertyName: string | undefined; - valuePropertyName: string | undefined; - filterParamName: string | undefined; +export interface IFileGlobalConfiguration { + requestIdKey: string | undefined; + serviceDiscoveryProvider: FileServiceDiscoveryProvider; + rateLimitOptions: FileRateLimitOptions; + qoSOptions: FileQoSOptions; + baseUrl: string | undefined; + loadBalancerOptions: FileLoadBalancerOptions; + downstreamScheme: string | undefined; + httpHandlerOptions: FileHttpHandlerOptions; + downstreamHttpVersion: string | undefined; } -export class ExtensionPropertyUiTableDto implements IExtensionPropertyUiTableDto { - isVisible!: boolean; +export class FileHostAndPort implements IFileHostAndPort { + host!: string | undefined; + port!: number; - constructor(data?: IExtensionPropertyUiTableDto) { + constructor(data?: IFileHostAndPort) { if (data) { for (var property in data) { if (data.hasOwnProperty(property)) @@ -11118,39 +12826,39 @@ export class ExtensionPropertyUiTableDto implements IExtensionPropertyUiTableDto init(_data?: any) { if (_data) { - this.isVisible = _data["isVisible"]; + this.host = _data["host"]; + this.port = _data["port"]; } } - static fromJS(data: any): ExtensionPropertyUiTableDto { + static fromJS(data: any): FileHostAndPort { data = typeof data === 'object' ? data : {}; - let result = new ExtensionPropertyUiTableDto(); + let result = new FileHostAndPort(); result.init(data); return result; } toJSON(data?: any) { data = typeof data === 'object' ? data : {}; - data["isVisible"] = this.isVisible; + data["host"] = this.host; + data["port"] = this.port; return data; } } -export interface IExtensionPropertyUiTableDto { - isVisible: boolean; +export interface IFileHostAndPort { + host: string | undefined; + port: number; } -export class FeatureDto implements IFeatureDto { - name!: string | undefined; - displayName!: string | undefined; - value!: string | undefined; - provider!: FeatureProviderDto; - description!: string | undefined; - valueType!: IStringValueType; - depth!: number; - parentName!: string | undefined; +export class FileHttpHandlerOptions implements IFileHttpHandlerOptions { + allowAutoRedirect!: boolean; + useCookieContainer!: boolean; + useTracing!: boolean; + useProxy!: boolean; + maxConnectionsPerServer!: number; - constructor(data?: IFeatureDto) { + constructor(data?: IFileHttpHandlerOptions) { if (data) { for (var property in data) { if (data.hasOwnProperty(property)) @@ -11161,55 +12869,46 @@ export class FeatureDto implements IFeatureDto { init(_data?: any) { if (_data) { - this.name = _data["name"]; - this.displayName = _data["displayName"]; - this.value = _data["value"]; - this.provider = _data["provider"] ? FeatureProviderDto.fromJS(_data["provider"]) : undefined; - this.description = _data["description"]; - this.valueType = _data["valueType"] ? IStringValueType.fromJS(_data["valueType"]) : undefined; - this.depth = _data["depth"]; - this.parentName = _data["parentName"]; + this.allowAutoRedirect = _data["allowAutoRedirect"]; + this.useCookieContainer = _data["useCookieContainer"]; + this.useTracing = _data["useTracing"]; + this.useProxy = _data["useProxy"]; + this.maxConnectionsPerServer = _data["maxConnectionsPerServer"]; } } - static fromJS(data: any): FeatureDto { + static fromJS(data: any): FileHttpHandlerOptions { data = typeof data === 'object' ? data : {}; - let result = new FeatureDto(); + let result = new FileHttpHandlerOptions(); result.init(data); return result; } toJSON(data?: any) { data = typeof data === 'object' ? data : {}; - data["name"] = this.name; - data["displayName"] = this.displayName; - data["value"] = this.value; - data["provider"] = this.provider ? this.provider.toJSON() : undefined; - data["description"] = this.description; - data["valueType"] = this.valueType ? this.valueType.toJSON() : undefined; - data["depth"] = this.depth; - data["parentName"] = this.parentName; + data["allowAutoRedirect"] = this.allowAutoRedirect; + data["useCookieContainer"] = this.useCookieContainer; + data["useTracing"] = this.useTracing; + data["useProxy"] = this.useProxy; + data["maxConnectionsPerServer"] = this.maxConnectionsPerServer; return data; } } -export interface IFeatureDto { - name: string | undefined; - displayName: string | undefined; - value: string | undefined; - provider: FeatureProviderDto; - description: string | undefined; - valueType: IStringValueType; - depth: number; - parentName: string | undefined; +export interface IFileHttpHandlerOptions { + allowAutoRedirect: boolean; + useCookieContainer: boolean; + useTracing: boolean; + useProxy: boolean; + maxConnectionsPerServer: number; } -export class FeatureGroupDto implements IFeatureGroupDto { - name!: string | undefined; - displayName!: string | undefined; - features!: FeatureDto[] | undefined; +export class FileLoadBalancerOptions implements IFileLoadBalancerOptions { + type!: string | undefined; + key!: string | undefined; + expiry!: number; - constructor(data?: IFeatureGroupDto) { + constructor(data?: IFileLoadBalancerOptions) { if (data) { for (var property in data) { if (data.hasOwnProperty(property)) @@ -11220,47 +12919,40 @@ export class FeatureGroupDto implements IFeatureGroupDto { init(_data?: any) { if (_data) { - this.name = _data["name"]; - this.displayName = _data["displayName"]; - if (Array.isArray(_data["features"])) { - this.features = [] as any; - for (let item of _data["features"]) - this.features!.push(FeatureDto.fromJS(item)); - } + this.type = _data["type"]; + this.key = _data["key"]; + this.expiry = _data["expiry"]; } } - static fromJS(data: any): FeatureGroupDto { + static fromJS(data: any): FileLoadBalancerOptions { data = typeof data === 'object' ? data : {}; - let result = new FeatureGroupDto(); + let result = new FileLoadBalancerOptions(); result.init(data); return result; } toJSON(data?: any) { data = typeof data === 'object' ? data : {}; - data["name"] = this.name; - data["displayName"] = this.displayName; - if (Array.isArray(this.features)) { - data["features"] = []; - for (let item of this.features) - data["features"].push(item.toJSON()); - } + data["type"] = this.type; + data["key"] = this.key; + data["expiry"] = this.expiry; return data; } } -export interface IFeatureGroupDto { - name: string | undefined; - displayName: string | undefined; - features: FeatureDto[] | undefined; +export interface IFileLoadBalancerOptions { + type: string | undefined; + key: string | undefined; + expiry: number; } -export class FeatureProviderDto implements IFeatureProviderDto { - name!: string | undefined; - key!: string | undefined; +export class FileQoSOptions implements IFileQoSOptions { + exceptionsAllowedBeforeBreaking!: number; + durationOfBreak!: number; + timeoutValue!: number; - constructor(data?: IFeatureProviderDto) { + constructor(data?: IFileQoSOptions) { if (data) { for (var property in data) { if (data.hasOwnProperty(property)) @@ -11271,42 +12963,42 @@ export class FeatureProviderDto implements IFeatureProviderDto { init(_data?: any) { if (_data) { - this.name = _data["name"]; - this.key = _data["key"]; + this.exceptionsAllowedBeforeBreaking = _data["exceptionsAllowedBeforeBreaking"]; + this.durationOfBreak = _data["durationOfBreak"]; + this.timeoutValue = _data["timeoutValue"]; } } - static fromJS(data: any): FeatureProviderDto { + static fromJS(data: any): FileQoSOptions { data = typeof data === 'object' ? data : {}; - let result = new FeatureProviderDto(); + let result = new FileQoSOptions(); result.init(data); return result; } toJSON(data?: any) { data = typeof data === 'object' ? data : {}; - data["name"] = this.name; - data["key"] = this.key; + data["exceptionsAllowedBeforeBreaking"] = this.exceptionsAllowedBeforeBreaking; + data["durationOfBreak"] = this.durationOfBreak; + data["timeoutValue"] = this.timeoutValue; return data; } } -export interface IFeatureProviderDto { - name: string | undefined; - key: string | undefined; +export interface IFileQoSOptions { + exceptionsAllowedBeforeBreaking: number; + durationOfBreak: number; + timeoutValue: number; } -export class FileAggregateRoute implements IFileAggregateRoute { - routeKeys!: string[] | undefined; - routeKeysConfig!: AggregateRouteConfig[] | undefined; - upstreamPathTemplate!: string | undefined; - upstreamHost!: string | undefined; - routeIsCaseSensitive!: boolean; - aggregator!: string | undefined; - readonly upstreamHttpMethod!: string[] | undefined; - priority!: number; +export class FileRateLimitOptions implements IFileRateLimitOptions { + clientIdHeader!: string | undefined; + quotaExceededMessage!: string | undefined; + rateLimitCounterPrefix!: string | undefined; + disableRateLimitHeaders!: boolean; + httpStatusCode!: number; - constructor(data?: IFileAggregateRoute) { + constructor(data?: IFileRateLimitOptions) { if (data) { for (var property in data) { if (data.hasOwnProperty(property)) @@ -11317,78 +13009,48 @@ export class FileAggregateRoute implements IFileAggregateRoute { init(_data?: any) { if (_data) { - if (Array.isArray(_data["routeKeys"])) { - this.routeKeys = [] as any; - for (let item of _data["routeKeys"]) - this.routeKeys!.push(item); - } - if (Array.isArray(_data["routeKeysConfig"])) { - this.routeKeysConfig = [] as any; - for (let item of _data["routeKeysConfig"]) - this.routeKeysConfig!.push(AggregateRouteConfig.fromJS(item)); - } - this.upstreamPathTemplate = _data["upstreamPathTemplate"]; - this.upstreamHost = _data["upstreamHost"]; - this.routeIsCaseSensitive = _data["routeIsCaseSensitive"]; - this.aggregator = _data["aggregator"]; - if (Array.isArray(_data["upstreamHttpMethod"])) { - (this).upstreamHttpMethod = [] as any; - for (let item of _data["upstreamHttpMethod"]) - (this).upstreamHttpMethod!.push(item); - } - this.priority = _data["priority"]; + this.clientIdHeader = _data["clientIdHeader"]; + this.quotaExceededMessage = _data["quotaExceededMessage"]; + this.rateLimitCounterPrefix = _data["rateLimitCounterPrefix"]; + this.disableRateLimitHeaders = _data["disableRateLimitHeaders"]; + this.httpStatusCode = _data["httpStatusCode"]; } } - static fromJS(data: any): FileAggregateRoute { + static fromJS(data: any): FileRateLimitOptions { data = typeof data === 'object' ? data : {}; - let result = new FileAggregateRoute(); + let result = new FileRateLimitOptions(); result.init(data); return result; } toJSON(data?: any) { data = typeof data === 'object' ? data : {}; - if (Array.isArray(this.routeKeys)) { - data["routeKeys"] = []; - for (let item of this.routeKeys) - data["routeKeys"].push(item); - } - if (Array.isArray(this.routeKeysConfig)) { - data["routeKeysConfig"] = []; - for (let item of this.routeKeysConfig) - data["routeKeysConfig"].push(item.toJSON()); - } - data["upstreamPathTemplate"] = this.upstreamPathTemplate; - data["upstreamHost"] = this.upstreamHost; - data["routeIsCaseSensitive"] = this.routeIsCaseSensitive; - data["aggregator"] = this.aggregator; - if (Array.isArray(this.upstreamHttpMethod)) { - data["upstreamHttpMethod"] = []; - for (let item of this.upstreamHttpMethod) - data["upstreamHttpMethod"].push(item); - } - data["priority"] = this.priority; + data["clientIdHeader"] = this.clientIdHeader; + data["quotaExceededMessage"] = this.quotaExceededMessage; + data["rateLimitCounterPrefix"] = this.rateLimitCounterPrefix; + data["disableRateLimitHeaders"] = this.disableRateLimitHeaders; + data["httpStatusCode"] = this.httpStatusCode; return data; } } -export interface IFileAggregateRoute { - routeKeys: string[] | undefined; - routeKeysConfig: AggregateRouteConfig[] | undefined; - upstreamPathTemplate: string | undefined; - upstreamHost: string | undefined; - routeIsCaseSensitive: boolean; - aggregator: string | undefined; - upstreamHttpMethod: string[] | undefined; - priority: number; +export interface IFileRateLimitOptions { + clientIdHeader: string | undefined; + quotaExceededMessage: string | undefined; + rateLimitCounterPrefix: string | undefined; + disableRateLimitHeaders: boolean; + httpStatusCode: number; } -export class FileAuthenticationOptions implements IFileAuthenticationOptions { - authenticationProviderKey!: string | undefined; - allowedScopes!: string[] | undefined; +export class FileRateLimitRule implements IFileRateLimitRule { + clientWhitelist!: string[] | undefined; + enableRateLimiting!: boolean; + period!: string | undefined; + periodTimespan!: number; + limit!: number; - constructor(data?: IFileAuthenticationOptions) { + constructor(data?: IFileRateLimitRule) { if (data) { for (var property in data) { if (data.hasOwnProperty(property)) @@ -11399,44 +13061,82 @@ export class FileAuthenticationOptions implements IFileAuthenticationOptions { init(_data?: any) { if (_data) { - this.authenticationProviderKey = _data["authenticationProviderKey"]; - if (Array.isArray(_data["allowedScopes"])) { - this.allowedScopes = [] as any; - for (let item of _data["allowedScopes"]) - this.allowedScopes!.push(item); + if (Array.isArray(_data["clientWhitelist"])) { + this.clientWhitelist = [] as any; + for (let item of _data["clientWhitelist"]) + this.clientWhitelist!.push(item); } + this.enableRateLimiting = _data["enableRateLimiting"]; + this.period = _data["period"]; + this.periodTimespan = _data["periodTimespan"]; + this.limit = _data["limit"]; } } - static fromJS(data: any): FileAuthenticationOptions { + static fromJS(data: any): FileRateLimitRule { data = typeof data === 'object' ? data : {}; - let result = new FileAuthenticationOptions(); + let result = new FileRateLimitRule(); result.init(data); return result; } toJSON(data?: any) { data = typeof data === 'object' ? data : {}; - data["authenticationProviderKey"] = this.authenticationProviderKey; - if (Array.isArray(this.allowedScopes)) { - data["allowedScopes"] = []; - for (let item of this.allowedScopes) - data["allowedScopes"].push(item); + if (Array.isArray(this.clientWhitelist)) { + data["clientWhitelist"] = []; + for (let item of this.clientWhitelist) + data["clientWhitelist"].push(item); } + data["enableRateLimiting"] = this.enableRateLimiting; + data["period"] = this.period; + data["periodTimespan"] = this.periodTimespan; + data["limit"] = this.limit; return data; } } -export interface IFileAuthenticationOptions { - authenticationProviderKey: string | undefined; - allowedScopes: string[] | undefined; +export interface IFileRateLimitRule { + clientWhitelist: string[] | undefined; + enableRateLimiting: boolean; + period: string | undefined; + periodTimespan: number; + limit: number; } -export class FileCacheOptions implements IFileCacheOptions { - ttlSeconds!: number; - region!: string | undefined; +export class FileRoute implements IFileRoute { + downstreamPathTemplate!: string | undefined; + upstreamPathTemplate!: string | undefined; + upstreamHttpMethod!: string[] | undefined; + downstreamHttpMethod!: string | undefined; + addHeadersToRequest!: { [key: string]: string; } | undefined; + upstreamHeaderTransform!: { [key: string]: string; } | undefined; + downstreamHeaderTransform!: { [key: string]: string; } | undefined; + addClaimsToRequest!: { [key: string]: string; } | undefined; + routeClaimsRequirement!: { [key: string]: string; } | undefined; + addQueriesToRequest!: { [key: string]: string; } | undefined; + changeDownstreamPathTemplate!: { [key: string]: string; } | undefined; + requestIdKey!: string | undefined; + fileCacheOptions!: FileCacheOptions; + routeIsCaseSensitive!: boolean; + serviceName!: string | undefined; + serviceNamespace!: string | undefined; + downstreamScheme!: string | undefined; + qoSOptions!: FileQoSOptions; + loadBalancerOptions!: FileLoadBalancerOptions; + rateLimitOptions!: FileRateLimitRule; + authenticationOptions!: FileAuthenticationOptions; + httpHandlerOptions!: FileHttpHandlerOptions; + downstreamHostAndPorts!: FileHostAndPort[] | undefined; + upstreamHost!: string | undefined; + key!: string | undefined; + delegatingHandlers!: string[] | undefined; + priority!: number; + timeout!: number; + dangerousAcceptAnyServerCertificateValidator!: boolean; + securityOptions!: FileSecurityOptions; + downstreamHttpVersion!: string | undefined; - constructor(data?: IFileCacheOptions) { + constructor(data?: IFileRoute) { if (data) { for (var property in data) { if (data.hasOwnProperty(property)) @@ -11445,40 +13145,233 @@ export class FileCacheOptions implements IFileCacheOptions { } } - init(_data?: any) { - if (_data) { - this.ttlSeconds = _data["ttlSeconds"]; - this.region = _data["region"]; - } - } - - static fromJS(data: any): FileCacheOptions { + init(_data?: any) { + if (_data) { + this.downstreamPathTemplate = _data["downstreamPathTemplate"]; + this.upstreamPathTemplate = _data["upstreamPathTemplate"]; + if (Array.isArray(_data["upstreamHttpMethod"])) { + this.upstreamHttpMethod = [] as any; + for (let item of _data["upstreamHttpMethod"]) + this.upstreamHttpMethod!.push(item); + } + this.downstreamHttpMethod = _data["downstreamHttpMethod"]; + if (_data["addHeadersToRequest"]) { + this.addHeadersToRequest = {} as any; + for (let key in _data["addHeadersToRequest"]) { + if (_data["addHeadersToRequest"].hasOwnProperty(key)) + (this.addHeadersToRequest)![key] = _data["addHeadersToRequest"][key]; + } + } + if (_data["upstreamHeaderTransform"]) { + this.upstreamHeaderTransform = {} as any; + for (let key in _data["upstreamHeaderTransform"]) { + if (_data["upstreamHeaderTransform"].hasOwnProperty(key)) + (this.upstreamHeaderTransform)![key] = _data["upstreamHeaderTransform"][key]; + } + } + if (_data["downstreamHeaderTransform"]) { + this.downstreamHeaderTransform = {} as any; + for (let key in _data["downstreamHeaderTransform"]) { + if (_data["downstreamHeaderTransform"].hasOwnProperty(key)) + (this.downstreamHeaderTransform)![key] = _data["downstreamHeaderTransform"][key]; + } + } + if (_data["addClaimsToRequest"]) { + this.addClaimsToRequest = {} as any; + for (let key in _data["addClaimsToRequest"]) { + if (_data["addClaimsToRequest"].hasOwnProperty(key)) + (this.addClaimsToRequest)![key] = _data["addClaimsToRequest"][key]; + } + } + if (_data["routeClaimsRequirement"]) { + this.routeClaimsRequirement = {} as any; + for (let key in _data["routeClaimsRequirement"]) { + if (_data["routeClaimsRequirement"].hasOwnProperty(key)) + (this.routeClaimsRequirement)![key] = _data["routeClaimsRequirement"][key]; + } + } + if (_data["addQueriesToRequest"]) { + this.addQueriesToRequest = {} as any; + for (let key in _data["addQueriesToRequest"]) { + if (_data["addQueriesToRequest"].hasOwnProperty(key)) + (this.addQueriesToRequest)![key] = _data["addQueriesToRequest"][key]; + } + } + if (_data["changeDownstreamPathTemplate"]) { + this.changeDownstreamPathTemplate = {} as any; + for (let key in _data["changeDownstreamPathTemplate"]) { + if (_data["changeDownstreamPathTemplate"].hasOwnProperty(key)) + (this.changeDownstreamPathTemplate)![key] = _data["changeDownstreamPathTemplate"][key]; + } + } + this.requestIdKey = _data["requestIdKey"]; + this.fileCacheOptions = _data["fileCacheOptions"] ? FileCacheOptions.fromJS(_data["fileCacheOptions"]) : undefined; + this.routeIsCaseSensitive = _data["routeIsCaseSensitive"]; + this.serviceName = _data["serviceName"]; + this.serviceNamespace = _data["serviceNamespace"]; + this.downstreamScheme = _data["downstreamScheme"]; + this.qoSOptions = _data["qoSOptions"] ? FileQoSOptions.fromJS(_data["qoSOptions"]) : undefined; + this.loadBalancerOptions = _data["loadBalancerOptions"] ? FileLoadBalancerOptions.fromJS(_data["loadBalancerOptions"]) : undefined; + this.rateLimitOptions = _data["rateLimitOptions"] ? FileRateLimitRule.fromJS(_data["rateLimitOptions"]) : undefined; + this.authenticationOptions = _data["authenticationOptions"] ? FileAuthenticationOptions.fromJS(_data["authenticationOptions"]) : undefined; + this.httpHandlerOptions = _data["httpHandlerOptions"] ? FileHttpHandlerOptions.fromJS(_data["httpHandlerOptions"]) : undefined; + if (Array.isArray(_data["downstreamHostAndPorts"])) { + this.downstreamHostAndPorts = [] as any; + for (let item of _data["downstreamHostAndPorts"]) + this.downstreamHostAndPorts!.push(FileHostAndPort.fromJS(item)); + } + this.upstreamHost = _data["upstreamHost"]; + this.key = _data["key"]; + if (Array.isArray(_data["delegatingHandlers"])) { + this.delegatingHandlers = [] as any; + for (let item of _data["delegatingHandlers"]) + this.delegatingHandlers!.push(item); + } + this.priority = _data["priority"]; + this.timeout = _data["timeout"]; + this.dangerousAcceptAnyServerCertificateValidator = _data["dangerousAcceptAnyServerCertificateValidator"]; + this.securityOptions = _data["securityOptions"] ? FileSecurityOptions.fromJS(_data["securityOptions"]) : undefined; + this.downstreamHttpVersion = _data["downstreamHttpVersion"]; + } + } + + static fromJS(data: any): FileRoute { data = typeof data === 'object' ? data : {}; - let result = new FileCacheOptions(); + let result = new FileRoute(); result.init(data); return result; } toJSON(data?: any) { data = typeof data === 'object' ? data : {}; - data["ttlSeconds"] = this.ttlSeconds; - data["region"] = this.region; + data["downstreamPathTemplate"] = this.downstreamPathTemplate; + data["upstreamPathTemplate"] = this.upstreamPathTemplate; + if (Array.isArray(this.upstreamHttpMethod)) { + data["upstreamHttpMethod"] = []; + for (let item of this.upstreamHttpMethod) + data["upstreamHttpMethod"].push(item); + } + data["downstreamHttpMethod"] = this.downstreamHttpMethod; + if (this.addHeadersToRequest) { + data["addHeadersToRequest"] = {}; + for (let key in this.addHeadersToRequest) { + if (this.addHeadersToRequest.hasOwnProperty(key)) + (data["addHeadersToRequest"])[key] = this.addHeadersToRequest[key]; + } + } + if (this.upstreamHeaderTransform) { + data["upstreamHeaderTransform"] = {}; + for (let key in this.upstreamHeaderTransform) { + if (this.upstreamHeaderTransform.hasOwnProperty(key)) + (data["upstreamHeaderTransform"])[key] = this.upstreamHeaderTransform[key]; + } + } + if (this.downstreamHeaderTransform) { + data["downstreamHeaderTransform"] = {}; + for (let key in this.downstreamHeaderTransform) { + if (this.downstreamHeaderTransform.hasOwnProperty(key)) + (data["downstreamHeaderTransform"])[key] = this.downstreamHeaderTransform[key]; + } + } + if (this.addClaimsToRequest) { + data["addClaimsToRequest"] = {}; + for (let key in this.addClaimsToRequest) { + if (this.addClaimsToRequest.hasOwnProperty(key)) + (data["addClaimsToRequest"])[key] = this.addClaimsToRequest[key]; + } + } + if (this.routeClaimsRequirement) { + data["routeClaimsRequirement"] = {}; + for (let key in this.routeClaimsRequirement) { + if (this.routeClaimsRequirement.hasOwnProperty(key)) + (data["routeClaimsRequirement"])[key] = this.routeClaimsRequirement[key]; + } + } + if (this.addQueriesToRequest) { + data["addQueriesToRequest"] = {}; + for (let key in this.addQueriesToRequest) { + if (this.addQueriesToRequest.hasOwnProperty(key)) + (data["addQueriesToRequest"])[key] = this.addQueriesToRequest[key]; + } + } + if (this.changeDownstreamPathTemplate) { + data["changeDownstreamPathTemplate"] = {}; + for (let key in this.changeDownstreamPathTemplate) { + if (this.changeDownstreamPathTemplate.hasOwnProperty(key)) + (data["changeDownstreamPathTemplate"])[key] = this.changeDownstreamPathTemplate[key]; + } + } + data["requestIdKey"] = this.requestIdKey; + data["fileCacheOptions"] = this.fileCacheOptions ? this.fileCacheOptions.toJSON() : undefined; + data["routeIsCaseSensitive"] = this.routeIsCaseSensitive; + data["serviceName"] = this.serviceName; + data["serviceNamespace"] = this.serviceNamespace; + data["downstreamScheme"] = this.downstreamScheme; + data["qoSOptions"] = this.qoSOptions ? this.qoSOptions.toJSON() : undefined; + data["loadBalancerOptions"] = this.loadBalancerOptions ? this.loadBalancerOptions.toJSON() : undefined; + data["rateLimitOptions"] = this.rateLimitOptions ? this.rateLimitOptions.toJSON() : undefined; + data["authenticationOptions"] = this.authenticationOptions ? this.authenticationOptions.toJSON() : undefined; + data["httpHandlerOptions"] = this.httpHandlerOptions ? this.httpHandlerOptions.toJSON() : undefined; + if (Array.isArray(this.downstreamHostAndPorts)) { + data["downstreamHostAndPorts"] = []; + for (let item of this.downstreamHostAndPorts) + data["downstreamHostAndPorts"].push(item.toJSON()); + } + data["upstreamHost"] = this.upstreamHost; + data["key"] = this.key; + if (Array.isArray(this.delegatingHandlers)) { + data["delegatingHandlers"] = []; + for (let item of this.delegatingHandlers) + data["delegatingHandlers"].push(item); + } + data["priority"] = this.priority; + data["timeout"] = this.timeout; + data["dangerousAcceptAnyServerCertificateValidator"] = this.dangerousAcceptAnyServerCertificateValidator; + data["securityOptions"] = this.securityOptions ? this.securityOptions.toJSON() : undefined; + data["downstreamHttpVersion"] = this.downstreamHttpVersion; return data; } } -export interface IFileCacheOptions { - ttlSeconds: number; - region: string | undefined; +export interface IFileRoute { + downstreamPathTemplate: string | undefined; + upstreamPathTemplate: string | undefined; + upstreamHttpMethod: string[] | undefined; + downstreamHttpMethod: string | undefined; + addHeadersToRequest: { [key: string]: string; } | undefined; + upstreamHeaderTransform: { [key: string]: string; } | undefined; + downstreamHeaderTransform: { [key: string]: string; } | undefined; + addClaimsToRequest: { [key: string]: string; } | undefined; + routeClaimsRequirement: { [key: string]: string; } | undefined; + addQueriesToRequest: { [key: string]: string; } | undefined; + changeDownstreamPathTemplate: { [key: string]: string; } | undefined; + requestIdKey: string | undefined; + fileCacheOptions: FileCacheOptions; + routeIsCaseSensitive: boolean; + serviceName: string | undefined; + serviceNamespace: string | undefined; + downstreamScheme: string | undefined; + qoSOptions: FileQoSOptions; + loadBalancerOptions: FileLoadBalancerOptions; + rateLimitOptions: FileRateLimitRule; + authenticationOptions: FileAuthenticationOptions; + httpHandlerOptions: FileHttpHandlerOptions; + downstreamHostAndPorts: FileHostAndPort[] | undefined; + upstreamHost: string | undefined; + key: string | undefined; + delegatingHandlers: string[] | undefined; + priority: number; + timeout: number; + dangerousAcceptAnyServerCertificateValidator: boolean; + securityOptions: FileSecurityOptions; + downstreamHttpVersion: string | undefined; } -export class FileConfiguration implements IFileConfiguration { - routes!: FileRoute[] | undefined; - dynamicRoutes!: FileDynamicRoute[] | undefined; - aggregates!: FileAggregateRoute[] | undefined; - globalConfiguration!: FileGlobalConfiguration; +export class FileSecurityOptions implements IFileSecurityOptions { + ipAllowedList!: string[] | undefined; + ipBlockedList!: string[] | undefined; - constructor(data?: IFileConfiguration) { + constructor(data?: IFileSecurityOptions) { if (data) { for (var property in data) { if (data.hasOwnProperty(property)) @@ -11489,67 +13382,58 @@ export class FileConfiguration implements IFileConfiguration { init(_data?: any) { if (_data) { - if (Array.isArray(_data["routes"])) { - this.routes = [] as any; - for (let item of _data["routes"]) - this.routes!.push(FileRoute.fromJS(item)); - } - if (Array.isArray(_data["dynamicRoutes"])) { - this.dynamicRoutes = [] as any; - for (let item of _data["dynamicRoutes"]) - this.dynamicRoutes!.push(FileDynamicRoute.fromJS(item)); + if (Array.isArray(_data["ipAllowedList"])) { + this.ipAllowedList = [] as any; + for (let item of _data["ipAllowedList"]) + this.ipAllowedList!.push(item); } - if (Array.isArray(_data["aggregates"])) { - this.aggregates = [] as any; - for (let item of _data["aggregates"]) - this.aggregates!.push(FileAggregateRoute.fromJS(item)); + if (Array.isArray(_data["ipBlockedList"])) { + this.ipBlockedList = [] as any; + for (let item of _data["ipBlockedList"]) + this.ipBlockedList!.push(item); } - this.globalConfiguration = _data["globalConfiguration"] ? FileGlobalConfiguration.fromJS(_data["globalConfiguration"]) : undefined; } } - static fromJS(data: any): FileConfiguration { + static fromJS(data: any): FileSecurityOptions { data = typeof data === 'object' ? data : {}; - let result = new FileConfiguration(); + let result = new FileSecurityOptions(); result.init(data); return result; } toJSON(data?: any) { data = typeof data === 'object' ? data : {}; - if (Array.isArray(this.routes)) { - data["routes"] = []; - for (let item of this.routes) - data["routes"].push(item.toJSON()); - } - if (Array.isArray(this.dynamicRoutes)) { - data["dynamicRoutes"] = []; - for (let item of this.dynamicRoutes) - data["dynamicRoutes"].push(item.toJSON()); + if (Array.isArray(this.ipAllowedList)) { + data["ipAllowedList"] = []; + for (let item of this.ipAllowedList) + data["ipAllowedList"].push(item); } - if (Array.isArray(this.aggregates)) { - data["aggregates"] = []; - for (let item of this.aggregates) - data["aggregates"].push(item.toJSON()); + if (Array.isArray(this.ipBlockedList)) { + data["ipBlockedList"] = []; + for (let item of this.ipBlockedList) + data["ipBlockedList"].push(item); } - data["globalConfiguration"] = this.globalConfiguration ? this.globalConfiguration.toJSON() : undefined; return data; } } -export interface IFileConfiguration { - routes: FileRoute[] | undefined; - dynamicRoutes: FileDynamicRoute[] | undefined; - aggregates: FileAggregateRoute[] | undefined; - globalConfiguration: FileGlobalConfiguration; +export interface IFileSecurityOptions { + ipAllowedList: string[] | undefined; + ipBlockedList: string[] | undefined; } -export class FileDynamicRoute implements IFileDynamicRoute { - serviceName!: string | undefined; - rateLimitRule!: FileRateLimitRule; - downstreamHttpVersion!: string | undefined; +export class FileServiceDiscoveryProvider implements IFileServiceDiscoveryProvider { + scheme!: string | undefined; + host!: string | undefined; + port!: number; + type!: string | undefined; + token!: string | undefined; + configurationKey!: string | undefined; + pollingInterval!: number; + namespace!: string | undefined; - constructor(data?: IFileDynamicRoute) { + constructor(data?: IFileServiceDiscoveryProvider) { if (data) { for (var property in data) { if (data.hasOwnProperty(property)) @@ -11560,46 +13444,59 @@ export class FileDynamicRoute implements IFileDynamicRoute { init(_data?: any) { if (_data) { - this.serviceName = _data["serviceName"]; - this.rateLimitRule = _data["rateLimitRule"] ? FileRateLimitRule.fromJS(_data["rateLimitRule"]) : undefined; - this.downstreamHttpVersion = _data["downstreamHttpVersion"]; + this.scheme = _data["scheme"]; + this.host = _data["host"]; + this.port = _data["port"]; + this.type = _data["type"]; + this.token = _data["token"]; + this.configurationKey = _data["configurationKey"]; + this.pollingInterval = _data["pollingInterval"]; + this.namespace = _data["namespace"]; } } - static fromJS(data: any): FileDynamicRoute { + static fromJS(data: any): FileServiceDiscoveryProvider { data = typeof data === 'object' ? data : {}; - let result = new FileDynamicRoute(); + let result = new FileServiceDiscoveryProvider(); result.init(data); return result; } toJSON(data?: any) { data = typeof data === 'object' ? data : {}; - data["serviceName"] = this.serviceName; - data["rateLimitRule"] = this.rateLimitRule ? this.rateLimitRule.toJSON() : undefined; - data["downstreamHttpVersion"] = this.downstreamHttpVersion; + data["scheme"] = this.scheme; + data["host"] = this.host; + data["port"] = this.port; + data["type"] = this.type; + data["token"] = this.token; + data["configurationKey"] = this.configurationKey; + data["pollingInterval"] = this.pollingInterval; + data["namespace"] = this.namespace; return data; } } -export interface IFileDynamicRoute { - serviceName: string | undefined; - rateLimitRule: FileRateLimitRule; - downstreamHttpVersion: string | undefined; +export interface IFileServiceDiscoveryProvider { + scheme: string | undefined; + host: string | undefined; + port: number; + type: string | undefined; + token: string | undefined; + configurationKey: string | undefined; + pollingInterval: number; + namespace: string | undefined; } -export class FileGlobalConfiguration implements IFileGlobalConfiguration { - requestIdKey!: string | undefined; - serviceDiscoveryProvider!: FileServiceDiscoveryProvider; - rateLimitOptions!: FileRateLimitOptions; - qoSOptions!: FileQoSOptions; - baseUrl!: string | undefined; - loadBalancerOptions!: FileLoadBalancerOptions; - downstreamScheme!: string | undefined; - httpHandlerOptions!: FileHttpHandlerOptions; - downstreamHttpVersion!: string | undefined; +export class FileTokenOutput implements IFileTokenOutput { + accessKeyId!: string | undefined; + accessKeySecret!: string | undefined; + token!: string | undefined; + /** 过期时间 */ + expiration!: string | undefined; + bucket!: string | undefined; + region!: string | undefined; - constructor(data?: IFileGlobalConfiguration) { + constructor(data?: IFileTokenOutput) { if (data) { for (var property in data) { if (data.hasOwnProperty(property)) @@ -11610,57 +13507,48 @@ export class FileGlobalConfiguration implements IFileGlobalConfiguration { init(_data?: any) { if (_data) { - this.requestIdKey = _data["requestIdKey"]; - this.serviceDiscoveryProvider = _data["serviceDiscoveryProvider"] ? FileServiceDiscoveryProvider.fromJS(_data["serviceDiscoveryProvider"]) : undefined; - this.rateLimitOptions = _data["rateLimitOptions"] ? FileRateLimitOptions.fromJS(_data["rateLimitOptions"]) : undefined; - this.qoSOptions = _data["qoSOptions"] ? FileQoSOptions.fromJS(_data["qoSOptions"]) : undefined; - this.baseUrl = _data["baseUrl"]; - this.loadBalancerOptions = _data["loadBalancerOptions"] ? FileLoadBalancerOptions.fromJS(_data["loadBalancerOptions"]) : undefined; - this.downstreamScheme = _data["downstreamScheme"]; - this.httpHandlerOptions = _data["httpHandlerOptions"] ? FileHttpHandlerOptions.fromJS(_data["httpHandlerOptions"]) : undefined; - this.downstreamHttpVersion = _data["downstreamHttpVersion"]; + this.accessKeyId = _data["accessKeyId"]; + this.accessKeySecret = _data["accessKeySecret"]; + this.token = _data["token"]; + this.expiration = _data["expiration"]; + this.bucket = _data["bucket"]; + this.region = _data["region"]; } } - static fromJS(data: any): FileGlobalConfiguration { + static fromJS(data: any): FileTokenOutput { data = typeof data === 'object' ? data : {}; - let result = new FileGlobalConfiguration(); + let result = new FileTokenOutput(); result.init(data); return result; } toJSON(data?: any) { data = typeof data === 'object' ? data : {}; - data["requestIdKey"] = this.requestIdKey; - data["serviceDiscoveryProvider"] = this.serviceDiscoveryProvider ? this.serviceDiscoveryProvider.toJSON() : undefined; - data["rateLimitOptions"] = this.rateLimitOptions ? this.rateLimitOptions.toJSON() : undefined; - data["qoSOptions"] = this.qoSOptions ? this.qoSOptions.toJSON() : undefined; - data["baseUrl"] = this.baseUrl; - data["loadBalancerOptions"] = this.loadBalancerOptions ? this.loadBalancerOptions.toJSON() : undefined; - data["downstreamScheme"] = this.downstreamScheme; - data["httpHandlerOptions"] = this.httpHandlerOptions ? this.httpHandlerOptions.toJSON() : undefined; - data["downstreamHttpVersion"] = this.downstreamHttpVersion; + data["accessKeyId"] = this.accessKeyId; + data["accessKeySecret"] = this.accessKeySecret; + data["token"] = this.token; + data["expiration"] = this.expiration; + data["bucket"] = this.bucket; + data["region"] = this.region; return data; } } -export interface IFileGlobalConfiguration { - requestIdKey: string | undefined; - serviceDiscoveryProvider: FileServiceDiscoveryProvider; - rateLimitOptions: FileRateLimitOptions; - qoSOptions: FileQoSOptions; - baseUrl: string | undefined; - loadBalancerOptions: FileLoadBalancerOptions; - downstreamScheme: string | undefined; - httpHandlerOptions: FileHttpHandlerOptions; - downstreamHttpVersion: string | undefined; +export interface IFileTokenOutput { + accessKeyId: string | undefined; + accessKeySecret: string | undefined; + token: string | undefined; + /** 过期时间 */ + expiration: string | undefined; + bucket: string | undefined; + region: string | undefined; } -export class FileHostAndPort implements IFileHostAndPort { - host!: string | undefined; - port!: number; +export class FindTenantByNameInput implements IFindTenantByNameInput { + name!: string | undefined; - constructor(data?: IFileHostAndPort) { + constructor(data?: IFindTenantByNameInput) { if (data) { for (var property in data) { if (data.hasOwnProperty(property)) @@ -11671,39 +13559,35 @@ export class FileHostAndPort implements IFileHostAndPort { init(_data?: any) { if (_data) { - this.host = _data["host"]; - this.port = _data["port"]; + this.name = _data["name"]; } } - static fromJS(data: any): FileHostAndPort { + static fromJS(data: any): FindTenantByNameInput { data = typeof data === 'object' ? data : {}; - let result = new FileHostAndPort(); + let result = new FindTenantByNameInput(); result.init(data); return result; } toJSON(data?: any) { data = typeof data === 'object' ? data : {}; - data["host"] = this.host; - data["port"] = this.port; + data["name"] = this.name; return data; } } -export interface IFileHostAndPort { - host: string | undefined; - port: number; +export interface IFindTenantByNameInput { + name: string | undefined; } -export class FileHttpHandlerOptions implements IFileHttpHandlerOptions { - allowAutoRedirect!: boolean; - useCookieContainer!: boolean; - useTracing!: boolean; - useProxy!: boolean; - maxConnectionsPerServer!: number; +export class FindTenantResultDto implements IFindTenantResultDto { + success!: boolean; + tenantId!: string | undefined; + name!: string | undefined; + isActive!: boolean; - constructor(data?: IFileHttpHandlerOptions) { + constructor(data?: IFindTenantResultDto) { if (data) { for (var property in data) { if (data.hasOwnProperty(property)) @@ -11714,46 +13598,59 @@ export class FileHttpHandlerOptions implements IFileHttpHandlerOptions { init(_data?: any) { if (_data) { - this.allowAutoRedirect = _data["allowAutoRedirect"]; - this.useCookieContainer = _data["useCookieContainer"]; - this.useTracing = _data["useTracing"]; - this.useProxy = _data["useProxy"]; - this.maxConnectionsPerServer = _data["maxConnectionsPerServer"]; + this.success = _data["success"]; + this.tenantId = _data["tenantId"]; + this.name = _data["name"]; + this.isActive = _data["isActive"]; } } - static fromJS(data: any): FileHttpHandlerOptions { + static fromJS(data: any): FindTenantResultDto { data = typeof data === 'object' ? data : {}; - let result = new FileHttpHandlerOptions(); + let result = new FindTenantResultDto(); result.init(data); return result; } toJSON(data?: any) { data = typeof data === 'object' ? data : {}; - data["allowAutoRedirect"] = this.allowAutoRedirect; - data["useCookieContainer"] = this.useCookieContainer; - data["useTracing"] = this.useTracing; - data["useProxy"] = this.useProxy; - data["maxConnectionsPerServer"] = this.maxConnectionsPerServer; + data["success"] = this.success; + data["tenantId"] = this.tenantId; + data["name"] = this.name; + data["isActive"] = this.isActive; return data; } } -export interface IFileHttpHandlerOptions { - allowAutoRedirect: boolean; - useCookieContainer: boolean; - useTracing: boolean; - useProxy: boolean; - maxConnectionsPerServer: number; +export interface IFindTenantResultDto { + success: boolean; + tenantId: string | undefined; + name: string | undefined; + isActive: boolean; } -export class FileLoadBalancerOptions implements IFileLoadBalancerOptions { - type!: string | undefined; - key!: string | undefined; - expiry!: number; +export class GetAuditLogPageListOutput implements IGetAuditLogPageListOutput { + applicationName!: string | undefined; + userId!: string | undefined; + userName!: string | undefined; + tenantId!: string | undefined; + tenantName!: string | undefined; + impersonatorUserId!: string | undefined; + impersonatorTenantId!: string | undefined; + executionTime!: moment.Moment; + executionDuration!: number; + clientIpAddress!: string | undefined; + clientName!: string | undefined; + clientId!: string | undefined; + correlationId!: string | undefined; + browserInfo!: string | undefined; + httpMethod!: string | undefined; + url!: string | undefined; + exceptions!: string | undefined; + comments!: string | undefined; + httpStatusCode!: number | undefined; - constructor(data?: IFileLoadBalancerOptions) { + constructor(data?: IGetAuditLogPageListOutput) { if (data) { for (var property in data) { if (data.hasOwnProperty(property)) @@ -11764,40 +13661,87 @@ export class FileLoadBalancerOptions implements IFileLoadBalancerOptions { init(_data?: any) { if (_data) { - this.type = _data["type"]; - this.key = _data["key"]; - this.expiry = _data["expiry"]; + this.applicationName = _data["applicationName"]; + this.userId = _data["userId"]; + this.userName = _data["userName"]; + this.tenantId = _data["tenantId"]; + this.tenantName = _data["tenantName"]; + this.impersonatorUserId = _data["impersonatorUserId"]; + this.impersonatorTenantId = _data["impersonatorTenantId"]; + this.executionTime = _data["executionTime"] ? moment(_data["executionTime"].toString()) : undefined; + this.executionDuration = _data["executionDuration"]; + this.clientIpAddress = _data["clientIpAddress"]; + this.clientName = _data["clientName"]; + this.clientId = _data["clientId"]; + this.correlationId = _data["correlationId"]; + this.browserInfo = _data["browserInfo"]; + this.httpMethod = _data["httpMethod"]; + this.url = _data["url"]; + this.exceptions = _data["exceptions"]; + this.comments = _data["comments"]; + this.httpStatusCode = _data["httpStatusCode"]; } } - static fromJS(data: any): FileLoadBalancerOptions { + static fromJS(data: any): GetAuditLogPageListOutput { data = typeof data === 'object' ? data : {}; - let result = new FileLoadBalancerOptions(); + let result = new GetAuditLogPageListOutput(); result.init(data); return result; } toJSON(data?: any) { data = typeof data === 'object' ? data : {}; - data["type"] = this.type; - data["key"] = this.key; - data["expiry"] = this.expiry; + data["applicationName"] = this.applicationName; + data["userId"] = this.userId; + data["userName"] = this.userName; + data["tenantId"] = this.tenantId; + data["tenantName"] = this.tenantName; + data["impersonatorUserId"] = this.impersonatorUserId; + data["impersonatorTenantId"] = this.impersonatorTenantId; + data["executionTime"] = this.executionTime ? this.executionTime.toISOString() : undefined; + data["executionDuration"] = this.executionDuration; + data["clientIpAddress"] = this.clientIpAddress; + data["clientName"] = this.clientName; + data["clientId"] = this.clientId; + data["correlationId"] = this.correlationId; + data["browserInfo"] = this.browserInfo; + data["httpMethod"] = this.httpMethod; + data["url"] = this.url; + data["exceptions"] = this.exceptions; + data["comments"] = this.comments; + data["httpStatusCode"] = this.httpStatusCode; return data; } } -export interface IFileLoadBalancerOptions { - type: string | undefined; - key: string | undefined; - expiry: number; +export interface IGetAuditLogPageListOutput { + applicationName: string | undefined; + userId: string | undefined; + userName: string | undefined; + tenantId: string | undefined; + tenantName: string | undefined; + impersonatorUserId: string | undefined; + impersonatorTenantId: string | undefined; + executionTime: moment.Moment; + executionDuration: number; + clientIpAddress: string | undefined; + clientName: string | undefined; + clientId: string | undefined; + correlationId: string | undefined; + browserInfo: string | undefined; + httpMethod: string | undefined; + url: string | undefined; + exceptions: string | undefined; + comments: string | undefined; + httpStatusCode: number | undefined; } -export class FileQoSOptions implements IFileQoSOptions { - exceptionsAllowedBeforeBreaking!: number; - durationOfBreak!: number; - timeoutValue!: number; +export class GetAuditLogPageListOutputPagedResultDto implements IGetAuditLogPageListOutputPagedResultDto { + items!: GetAuditLogPageListOutput[] | undefined; + totalCount!: number; - constructor(data?: IFileQoSOptions) { + constructor(data?: IGetAuditLogPageListOutputPagedResultDto) { if (data) { for (var property in data) { if (data.hasOwnProperty(property)) @@ -11808,42 +13752,43 @@ export class FileQoSOptions implements IFileQoSOptions { init(_data?: any) { if (_data) { - this.exceptionsAllowedBeforeBreaking = _data["exceptionsAllowedBeforeBreaking"]; - this.durationOfBreak = _data["durationOfBreak"]; - this.timeoutValue = _data["timeoutValue"]; + if (Array.isArray(_data["items"])) { + this.items = [] as any; + for (let item of _data["items"]) + this.items!.push(GetAuditLogPageListOutput.fromJS(item)); + } + this.totalCount = _data["totalCount"]; } } - static fromJS(data: any): FileQoSOptions { + static fromJS(data: any): GetAuditLogPageListOutputPagedResultDto { data = typeof data === 'object' ? data : {}; - let result = new FileQoSOptions(); + let result = new GetAuditLogPageListOutputPagedResultDto(); result.init(data); return result; } toJSON(data?: any) { data = typeof data === 'object' ? data : {}; - data["exceptionsAllowedBeforeBreaking"] = this.exceptionsAllowedBeforeBreaking; - data["durationOfBreak"] = this.durationOfBreak; - data["timeoutValue"] = this.timeoutValue; + if (Array.isArray(this.items)) { + data["items"] = []; + for (let item of this.items) + data["items"].push(item.toJSON()); + } + data["totalCount"] = this.totalCount; return data; } } -export interface IFileQoSOptions { - exceptionsAllowedBeforeBreaking: number; - durationOfBreak: number; - timeoutValue: number; +export interface IGetAuditLogPageListOutputPagedResultDto { + items: GetAuditLogPageListOutput[] | undefined; + totalCount: number; } -export class FileRateLimitOptions implements IFileRateLimitOptions { - clientIdHeader!: string | undefined; - quotaExceededMessage!: string | undefined; - rateLimitCounterPrefix!: string | undefined; - disableRateLimitHeaders!: boolean; - httpStatusCode!: number; +export class GetFeatureListResultDto implements IGetFeatureListResultDto { + groups!: FeatureGroupDto[] | undefined; - constructor(data?: IFileRateLimitOptions) { + constructor(data?: IGetFeatureListResultDto) { if (data) { for (var property in data) { if (data.hasOwnProperty(property)) @@ -11854,48 +13799,46 @@ export class FileRateLimitOptions implements IFileRateLimitOptions { init(_data?: any) { if (_data) { - this.clientIdHeader = _data["clientIdHeader"]; - this.quotaExceededMessage = _data["quotaExceededMessage"]; - this.rateLimitCounterPrefix = _data["rateLimitCounterPrefix"]; - this.disableRateLimitHeaders = _data["disableRateLimitHeaders"]; - this.httpStatusCode = _data["httpStatusCode"]; + if (Array.isArray(_data["groups"])) { + this.groups = [] as any; + for (let item of _data["groups"]) + this.groups!.push(FeatureGroupDto.fromJS(item)); + } } } - static fromJS(data: any): FileRateLimitOptions { + static fromJS(data: any): GetFeatureListResultDto { data = typeof data === 'object' ? data : {}; - let result = new FileRateLimitOptions(); + let result = new GetFeatureListResultDto(); result.init(data); return result; } toJSON(data?: any) { data = typeof data === 'object' ? data : {}; - data["clientIdHeader"] = this.clientIdHeader; - data["quotaExceededMessage"] = this.quotaExceededMessage; - data["rateLimitCounterPrefix"] = this.rateLimitCounterPrefix; - data["disableRateLimitHeaders"] = this.disableRateLimitHeaders; - data["httpStatusCode"] = this.httpStatusCode; + if (Array.isArray(this.groups)) { + data["groups"] = []; + for (let item of this.groups) + data["groups"].push(item.toJSON()); + } return data; } } -export interface IFileRateLimitOptions { - clientIdHeader: string | undefined; - quotaExceededMessage: string | undefined; - rateLimitCounterPrefix: string | undefined; - disableRateLimitHeaders: boolean; - httpStatusCode: number; +export interface IGetFeatureListResultDto { + groups: FeatureGroupDto[] | undefined; } -export class FileRateLimitRule implements IFileRateLimitRule { - clientWhitelist!: string[] | undefined; - enableRateLimiting!: boolean; - period!: string | undefined; - periodTimespan!: number; - limit!: number; +export class GetOrganizationUnitRoleInput implements IGetOrganizationUnitRoleInput { + /** 当前页面.默认从1开始 */ + pageIndex!: number; + /** 每页多少条.每页显示多少记录 */ + pageSize!: number; + /** 跳过多少条 */ + readonly skipCount!: number; + organizationUnitId!: string; - constructor(data?: IFileRateLimitRule) { + constructor(data?: IGetOrganizationUnitRoleInput) { if (data) { for (var property in data) { if (data.hasOwnProperty(property)) @@ -11906,317 +13849,139 @@ export class FileRateLimitRule implements IFileRateLimitRule { init(_data?: any) { if (_data) { - if (Array.isArray(_data["clientWhitelist"])) { - this.clientWhitelist = [] as any; - for (let item of _data["clientWhitelist"]) - this.clientWhitelist!.push(item); - } - this.enableRateLimiting = _data["enableRateLimiting"]; - this.period = _data["period"]; - this.periodTimespan = _data["periodTimespan"]; - this.limit = _data["limit"]; + this.pageIndex = _data["pageIndex"]; + this.pageSize = _data["pageSize"]; + (this).skipCount = _data["skipCount"]; + this.organizationUnitId = _data["organizationUnitId"]; } } - static fromJS(data: any): FileRateLimitRule { + static fromJS(data: any): GetOrganizationUnitRoleInput { data = typeof data === 'object' ? data : {}; - let result = new FileRateLimitRule(); + let result = new GetOrganizationUnitRoleInput(); result.init(data); return result; } toJSON(data?: any) { data = typeof data === 'object' ? data : {}; - if (Array.isArray(this.clientWhitelist)) { - data["clientWhitelist"] = []; - for (let item of this.clientWhitelist) - data["clientWhitelist"].push(item); - } - data["enableRateLimiting"] = this.enableRateLimiting; - data["period"] = this.period; - data["periodTimespan"] = this.periodTimespan; - data["limit"] = this.limit; + data["pageIndex"] = this.pageIndex; + data["pageSize"] = this.pageSize; + data["skipCount"] = this.skipCount; + data["organizationUnitId"] = this.organizationUnitId; return data; - } -} - -export interface IFileRateLimitRule { - clientWhitelist: string[] | undefined; - enableRateLimiting: boolean; - period: string | undefined; - periodTimespan: number; - limit: number; -} - -export class FileRoute implements IFileRoute { - downstreamPathTemplate!: string | undefined; - upstreamPathTemplate!: string | undefined; - upstreamHttpMethod!: string[] | undefined; - downstreamHttpMethod!: string | undefined; - addHeadersToRequest!: { [key: string]: string; } | undefined; - upstreamHeaderTransform!: { [key: string]: string; } | undefined; - downstreamHeaderTransform!: { [key: string]: string; } | undefined; - addClaimsToRequest!: { [key: string]: string; } | undefined; - routeClaimsRequirement!: { [key: string]: string; } | undefined; - addQueriesToRequest!: { [key: string]: string; } | undefined; - changeDownstreamPathTemplate!: { [key: string]: string; } | undefined; - requestIdKey!: string | undefined; - fileCacheOptions!: FileCacheOptions; - routeIsCaseSensitive!: boolean; - serviceName!: string | undefined; - serviceNamespace!: string | undefined; - downstreamScheme!: string | undefined; - qoSOptions!: FileQoSOptions; - loadBalancerOptions!: FileLoadBalancerOptions; - rateLimitOptions!: FileRateLimitRule; - authenticationOptions!: FileAuthenticationOptions; - httpHandlerOptions!: FileHttpHandlerOptions; - downstreamHostAndPorts!: FileHostAndPort[] | undefined; - upstreamHost!: string | undefined; - key!: string | undefined; - delegatingHandlers!: string[] | undefined; - priority!: number; - timeout!: number; - dangerousAcceptAnyServerCertificateValidator!: boolean; - securityOptions!: FileSecurityOptions; - downstreamHttpVersion!: string | undefined; - - constructor(data?: IFileRoute) { - if (data) { - for (var property in data) { - if (data.hasOwnProperty(property)) - (this)[property] = (data)[property]; - } - } - } - - init(_data?: any) { - if (_data) { - this.downstreamPathTemplate = _data["downstreamPathTemplate"]; - this.upstreamPathTemplate = _data["upstreamPathTemplate"]; - if (Array.isArray(_data["upstreamHttpMethod"])) { - this.upstreamHttpMethod = [] as any; - for (let item of _data["upstreamHttpMethod"]) - this.upstreamHttpMethod!.push(item); - } - this.downstreamHttpMethod = _data["downstreamHttpMethod"]; - if (_data["addHeadersToRequest"]) { - this.addHeadersToRequest = {} as any; - for (let key in _data["addHeadersToRequest"]) { - if (_data["addHeadersToRequest"].hasOwnProperty(key)) - (this.addHeadersToRequest)![key] = _data["addHeadersToRequest"][key]; - } - } - if (_data["upstreamHeaderTransform"]) { - this.upstreamHeaderTransform = {} as any; - for (let key in _data["upstreamHeaderTransform"]) { - if (_data["upstreamHeaderTransform"].hasOwnProperty(key)) - (this.upstreamHeaderTransform)![key] = _data["upstreamHeaderTransform"][key]; - } - } - if (_data["downstreamHeaderTransform"]) { - this.downstreamHeaderTransform = {} as any; - for (let key in _data["downstreamHeaderTransform"]) { - if (_data["downstreamHeaderTransform"].hasOwnProperty(key)) - (this.downstreamHeaderTransform)![key] = _data["downstreamHeaderTransform"][key]; - } - } - if (_data["addClaimsToRequest"]) { - this.addClaimsToRequest = {} as any; - for (let key in _data["addClaimsToRequest"]) { - if (_data["addClaimsToRequest"].hasOwnProperty(key)) - (this.addClaimsToRequest)![key] = _data["addClaimsToRequest"][key]; - } - } - if (_data["routeClaimsRequirement"]) { - this.routeClaimsRequirement = {} as any; - for (let key in _data["routeClaimsRequirement"]) { - if (_data["routeClaimsRequirement"].hasOwnProperty(key)) - (this.routeClaimsRequirement)![key] = _data["routeClaimsRequirement"][key]; - } - } - if (_data["addQueriesToRequest"]) { - this.addQueriesToRequest = {} as any; - for (let key in _data["addQueriesToRequest"]) { - if (_data["addQueriesToRequest"].hasOwnProperty(key)) - (this.addQueriesToRequest)![key] = _data["addQueriesToRequest"][key]; - } - } - if (_data["changeDownstreamPathTemplate"]) { - this.changeDownstreamPathTemplate = {} as any; - for (let key in _data["changeDownstreamPathTemplate"]) { - if (_data["changeDownstreamPathTemplate"].hasOwnProperty(key)) - (this.changeDownstreamPathTemplate)![key] = _data["changeDownstreamPathTemplate"][key]; - } - } - this.requestIdKey = _data["requestIdKey"]; - this.fileCacheOptions = _data["fileCacheOptions"] ? FileCacheOptions.fromJS(_data["fileCacheOptions"]) : undefined; - this.routeIsCaseSensitive = _data["routeIsCaseSensitive"]; - this.serviceName = _data["serviceName"]; - this.serviceNamespace = _data["serviceNamespace"]; - this.downstreamScheme = _data["downstreamScheme"]; - this.qoSOptions = _data["qoSOptions"] ? FileQoSOptions.fromJS(_data["qoSOptions"]) : undefined; - this.loadBalancerOptions = _data["loadBalancerOptions"] ? FileLoadBalancerOptions.fromJS(_data["loadBalancerOptions"]) : undefined; - this.rateLimitOptions = _data["rateLimitOptions"] ? FileRateLimitRule.fromJS(_data["rateLimitOptions"]) : undefined; - this.authenticationOptions = _data["authenticationOptions"] ? FileAuthenticationOptions.fromJS(_data["authenticationOptions"]) : undefined; - this.httpHandlerOptions = _data["httpHandlerOptions"] ? FileHttpHandlerOptions.fromJS(_data["httpHandlerOptions"]) : undefined; - if (Array.isArray(_data["downstreamHostAndPorts"])) { - this.downstreamHostAndPorts = [] as any; - for (let item of _data["downstreamHostAndPorts"]) - this.downstreamHostAndPorts!.push(FileHostAndPort.fromJS(item)); - } - this.upstreamHost = _data["upstreamHost"]; - this.key = _data["key"]; - if (Array.isArray(_data["delegatingHandlers"])) { - this.delegatingHandlers = [] as any; - for (let item of _data["delegatingHandlers"]) - this.delegatingHandlers!.push(item); + } +} + +export interface IGetOrganizationUnitRoleInput { + /** 当前页面.默认从1开始 */ + pageIndex: number; + /** 每页多少条.每页显示多少记录 */ + pageSize: number; + /** 跳过多少条 */ + skipCount: number; + organizationUnitId: string; +} + +export class GetOrganizationUnitRoleOutput implements IGetOrganizationUnitRoleOutput { + id!: string; + name!: string | undefined; + + constructor(data?: IGetOrganizationUnitRoleOutput) { + if (data) { + for (var property in data) { + if (data.hasOwnProperty(property)) + (this)[property] = (data)[property]; } - this.priority = _data["priority"]; - this.timeout = _data["timeout"]; - this.dangerousAcceptAnyServerCertificateValidator = _data["dangerousAcceptAnyServerCertificateValidator"]; - this.securityOptions = _data["securityOptions"] ? FileSecurityOptions.fromJS(_data["securityOptions"]) : undefined; - this.downstreamHttpVersion = _data["downstreamHttpVersion"]; } } - static fromJS(data: any): FileRoute { + init(_data?: any) { + if (_data) { + this.id = _data["id"]; + this.name = _data["name"]; + } + } + + static fromJS(data: any): GetOrganizationUnitRoleOutput { data = typeof data === 'object' ? data : {}; - let result = new FileRoute(); + let result = new GetOrganizationUnitRoleOutput(); result.init(data); return result; } toJSON(data?: any) { data = typeof data === 'object' ? data : {}; - data["downstreamPathTemplate"] = this.downstreamPathTemplate; - data["upstreamPathTemplate"] = this.upstreamPathTemplate; - if (Array.isArray(this.upstreamHttpMethod)) { - data["upstreamHttpMethod"] = []; - for (let item of this.upstreamHttpMethod) - data["upstreamHttpMethod"].push(item); - } - data["downstreamHttpMethod"] = this.downstreamHttpMethod; - if (this.addHeadersToRequest) { - data["addHeadersToRequest"] = {}; - for (let key in this.addHeadersToRequest) { - if (this.addHeadersToRequest.hasOwnProperty(key)) - (data["addHeadersToRequest"])[key] = this.addHeadersToRequest[key]; - } - } - if (this.upstreamHeaderTransform) { - data["upstreamHeaderTransform"] = {}; - for (let key in this.upstreamHeaderTransform) { - if (this.upstreamHeaderTransform.hasOwnProperty(key)) - (data["upstreamHeaderTransform"])[key] = this.upstreamHeaderTransform[key]; - } - } - if (this.downstreamHeaderTransform) { - data["downstreamHeaderTransform"] = {}; - for (let key in this.downstreamHeaderTransform) { - if (this.downstreamHeaderTransform.hasOwnProperty(key)) - (data["downstreamHeaderTransform"])[key] = this.downstreamHeaderTransform[key]; - } - } - if (this.addClaimsToRequest) { - data["addClaimsToRequest"] = {}; - for (let key in this.addClaimsToRequest) { - if (this.addClaimsToRequest.hasOwnProperty(key)) - (data["addClaimsToRequest"])[key] = this.addClaimsToRequest[key]; - } - } - if (this.routeClaimsRequirement) { - data["routeClaimsRequirement"] = {}; - for (let key in this.routeClaimsRequirement) { - if (this.routeClaimsRequirement.hasOwnProperty(key)) - (data["routeClaimsRequirement"])[key] = this.routeClaimsRequirement[key]; - } - } - if (this.addQueriesToRequest) { - data["addQueriesToRequest"] = {}; - for (let key in this.addQueriesToRequest) { - if (this.addQueriesToRequest.hasOwnProperty(key)) - (data["addQueriesToRequest"])[key] = this.addQueriesToRequest[key]; + data["id"] = this.id; + data["name"] = this.name; + return data; + } +} + +export interface IGetOrganizationUnitRoleOutput { + id: string; + name: string | undefined; +} + +export class GetOrganizationUnitRoleOutputPagedResultDto implements IGetOrganizationUnitRoleOutputPagedResultDto { + items!: GetOrganizationUnitRoleOutput[] | undefined; + totalCount!: number; + + constructor(data?: IGetOrganizationUnitRoleOutputPagedResultDto) { + if (data) { + for (var property in data) { + if (data.hasOwnProperty(property)) + (this)[property] = (data)[property]; } } - if (this.changeDownstreamPathTemplate) { - data["changeDownstreamPathTemplate"] = {}; - for (let key in this.changeDownstreamPathTemplate) { - if (this.changeDownstreamPathTemplate.hasOwnProperty(key)) - (data["changeDownstreamPathTemplate"])[key] = this.changeDownstreamPathTemplate[key]; + } + + init(_data?: any) { + if (_data) { + if (Array.isArray(_data["items"])) { + this.items = [] as any; + for (let item of _data["items"]) + this.items!.push(GetOrganizationUnitRoleOutput.fromJS(item)); } + this.totalCount = _data["totalCount"]; } - data["requestIdKey"] = this.requestIdKey; - data["fileCacheOptions"] = this.fileCacheOptions ? this.fileCacheOptions.toJSON() : undefined; - data["routeIsCaseSensitive"] = this.routeIsCaseSensitive; - data["serviceName"] = this.serviceName; - data["serviceNamespace"] = this.serviceNamespace; - data["downstreamScheme"] = this.downstreamScheme; - data["qoSOptions"] = this.qoSOptions ? this.qoSOptions.toJSON() : undefined; - data["loadBalancerOptions"] = this.loadBalancerOptions ? this.loadBalancerOptions.toJSON() : undefined; - data["rateLimitOptions"] = this.rateLimitOptions ? this.rateLimitOptions.toJSON() : undefined; - data["authenticationOptions"] = this.authenticationOptions ? this.authenticationOptions.toJSON() : undefined; - data["httpHandlerOptions"] = this.httpHandlerOptions ? this.httpHandlerOptions.toJSON() : undefined; - if (Array.isArray(this.downstreamHostAndPorts)) { - data["downstreamHostAndPorts"] = []; - for (let item of this.downstreamHostAndPorts) - data["downstreamHostAndPorts"].push(item.toJSON()); - } - data["upstreamHost"] = this.upstreamHost; - data["key"] = this.key; - if (Array.isArray(this.delegatingHandlers)) { - data["delegatingHandlers"] = []; - for (let item of this.delegatingHandlers) - data["delegatingHandlers"].push(item); + } + + static fromJS(data: any): GetOrganizationUnitRoleOutputPagedResultDto { + data = typeof data === 'object' ? data : {}; + let result = new GetOrganizationUnitRoleOutputPagedResultDto(); + result.init(data); + return result; + } + + toJSON(data?: any) { + data = typeof data === 'object' ? data : {}; + if (Array.isArray(this.items)) { + data["items"] = []; + for (let item of this.items) + data["items"].push(item.toJSON()); } - data["priority"] = this.priority; - data["timeout"] = this.timeout; - data["dangerousAcceptAnyServerCertificateValidator"] = this.dangerousAcceptAnyServerCertificateValidator; - data["securityOptions"] = this.securityOptions ? this.securityOptions.toJSON() : undefined; - data["downstreamHttpVersion"] = this.downstreamHttpVersion; + data["totalCount"] = this.totalCount; return data; } } -export interface IFileRoute { - downstreamPathTemplate: string | undefined; - upstreamPathTemplate: string | undefined; - upstreamHttpMethod: string[] | undefined; - downstreamHttpMethod: string | undefined; - addHeadersToRequest: { [key: string]: string; } | undefined; - upstreamHeaderTransform: { [key: string]: string; } | undefined; - downstreamHeaderTransform: { [key: string]: string; } | undefined; - addClaimsToRequest: { [key: string]: string; } | undefined; - routeClaimsRequirement: { [key: string]: string; } | undefined; - addQueriesToRequest: { [key: string]: string; } | undefined; - changeDownstreamPathTemplate: { [key: string]: string; } | undefined; - requestIdKey: string | undefined; - fileCacheOptions: FileCacheOptions; - routeIsCaseSensitive: boolean; - serviceName: string | undefined; - serviceNamespace: string | undefined; - downstreamScheme: string | undefined; - qoSOptions: FileQoSOptions; - loadBalancerOptions: FileLoadBalancerOptions; - rateLimitOptions: FileRateLimitRule; - authenticationOptions: FileAuthenticationOptions; - httpHandlerOptions: FileHttpHandlerOptions; - downstreamHostAndPorts: FileHostAndPort[] | undefined; - upstreamHost: string | undefined; - key: string | undefined; - delegatingHandlers: string[] | undefined; - priority: number; - timeout: number; - dangerousAcceptAnyServerCertificateValidator: boolean; - securityOptions: FileSecurityOptions; - downstreamHttpVersion: string | undefined; +export interface IGetOrganizationUnitRoleOutputPagedResultDto { + items: GetOrganizationUnitRoleOutput[] | undefined; + totalCount: number; } -export class FileSecurityOptions implements IFileSecurityOptions { - ipAllowedList!: string[] | undefined; - ipBlockedList!: string[] | undefined; +export class GetOrganizationUnitUserInput implements IGetOrganizationUnitUserInput { + /** 当前页面.默认从1开始 */ + pageIndex!: number; + /** 每页多少条.每页显示多少记录 */ + pageSize!: number; + /** 跳过多少条 */ + readonly skipCount!: number; + organizationUnitId!: string; + filter!: string | undefined; - constructor(data?: IFileSecurityOptions) { + constructor(data?: IGetOrganizationUnitUserInput) { if (data) { for (var property in data) { if (data.hasOwnProperty(property)) @@ -12227,58 +13992,49 @@ export class FileSecurityOptions implements IFileSecurityOptions { init(_data?: any) { if (_data) { - if (Array.isArray(_data["ipAllowedList"])) { - this.ipAllowedList = [] as any; - for (let item of _data["ipAllowedList"]) - this.ipAllowedList!.push(item); - } - if (Array.isArray(_data["ipBlockedList"])) { - this.ipBlockedList = [] as any; - for (let item of _data["ipBlockedList"]) - this.ipBlockedList!.push(item); - } + this.pageIndex = _data["pageIndex"]; + this.pageSize = _data["pageSize"]; + (this).skipCount = _data["skipCount"]; + this.organizationUnitId = _data["organizationUnitId"]; + this.filter = _data["filter"]; } } - static fromJS(data: any): FileSecurityOptions { + static fromJS(data: any): GetOrganizationUnitUserInput { data = typeof data === 'object' ? data : {}; - let result = new FileSecurityOptions(); + let result = new GetOrganizationUnitUserInput(); result.init(data); return result; } toJSON(data?: any) { data = typeof data === 'object' ? data : {}; - if (Array.isArray(this.ipAllowedList)) { - data["ipAllowedList"] = []; - for (let item of this.ipAllowedList) - data["ipAllowedList"].push(item); - } - if (Array.isArray(this.ipBlockedList)) { - data["ipBlockedList"] = []; - for (let item of this.ipBlockedList) - data["ipBlockedList"].push(item); - } + data["pageIndex"] = this.pageIndex; + data["pageSize"] = this.pageSize; + data["skipCount"] = this.skipCount; + data["organizationUnitId"] = this.organizationUnitId; + data["filter"] = this.filter; return data; } } -export interface IFileSecurityOptions { - ipAllowedList: string[] | undefined; - ipBlockedList: string[] | undefined; +export interface IGetOrganizationUnitUserInput { + /** 当前页面.默认从1开始 */ + pageIndex: number; + /** 每页多少条.每页显示多少记录 */ + pageSize: number; + /** 跳过多少条 */ + skipCount: number; + organizationUnitId: string; + filter: string | undefined; } -export class FileServiceDiscoveryProvider implements IFileServiceDiscoveryProvider { - scheme!: string | undefined; - host!: string | undefined; - port!: number; - type!: string | undefined; - token!: string | undefined; - configurationKey!: string | undefined; - pollingInterval!: number; - namespace!: string | undefined; +export class GetOrganizationUnitUserOutput implements IGetOrganizationUnitUserOutput { + id!: string; + userName!: string | undefined; + email!: string | undefined; - constructor(data?: IFileServiceDiscoveryProvider) { + constructor(data?: IGetOrganizationUnitUserOutput) { if (data) { for (var property in data) { if (data.hasOwnProperty(property)) @@ -12289,59 +14045,39 @@ export class FileServiceDiscoveryProvider implements IFileServiceDiscoveryProvid init(_data?: any) { if (_data) { - this.scheme = _data["scheme"]; - this.host = _data["host"]; - this.port = _data["port"]; - this.type = _data["type"]; - this.token = _data["token"]; - this.configurationKey = _data["configurationKey"]; - this.pollingInterval = _data["pollingInterval"]; - this.namespace = _data["namespace"]; + this.id = _data["id"]; + this.userName = _data["userName"]; + this.email = _data["email"]; } } - static fromJS(data: any): FileServiceDiscoveryProvider { + static fromJS(data: any): GetOrganizationUnitUserOutput { data = typeof data === 'object' ? data : {}; - let result = new FileServiceDiscoveryProvider(); + let result = new GetOrganizationUnitUserOutput(); result.init(data); return result; } toJSON(data?: any) { data = typeof data === 'object' ? data : {}; - data["scheme"] = this.scheme; - data["host"] = this.host; - data["port"] = this.port; - data["type"] = this.type; - data["token"] = this.token; - data["configurationKey"] = this.configurationKey; - data["pollingInterval"] = this.pollingInterval; - data["namespace"] = this.namespace; + data["id"] = this.id; + data["userName"] = this.userName; + data["email"] = this.email; return data; } } -export interface IFileServiceDiscoveryProvider { - scheme: string | undefined; - host: string | undefined; - port: number; - type: string | undefined; - token: string | undefined; - configurationKey: string | undefined; - pollingInterval: number; - namespace: string | undefined; +export interface IGetOrganizationUnitUserOutput { + id: string; + userName: string | undefined; + email: string | undefined; } -export class FileTokenOutput implements IFileTokenOutput { - accessKeyId!: string | undefined; - accessKeySecret!: string | undefined; - token!: string | undefined; - /** 过期时间 */ - expiration!: string | undefined; - bucket!: string | undefined; - region!: string | undefined; +export class GetOrganizationUnitUserOutputPagedResultDto implements IGetOrganizationUnitUserOutputPagedResultDto { + items!: GetOrganizationUnitUserOutput[] | undefined; + totalCount!: number; - constructor(data?: IFileTokenOutput) { + constructor(data?: IGetOrganizationUnitUserOutputPagedResultDto) { if (data) { for (var property in data) { if (data.hasOwnProperty(property)) @@ -12352,48 +14088,44 @@ export class FileTokenOutput implements IFileTokenOutput { init(_data?: any) { if (_data) { - this.accessKeyId = _data["accessKeyId"]; - this.accessKeySecret = _data["accessKeySecret"]; - this.token = _data["token"]; - this.expiration = _data["expiration"]; - this.bucket = _data["bucket"]; - this.region = _data["region"]; + if (Array.isArray(_data["items"])) { + this.items = [] as any; + for (let item of _data["items"]) + this.items!.push(GetOrganizationUnitUserOutput.fromJS(item)); + } + this.totalCount = _data["totalCount"]; } } - static fromJS(data: any): FileTokenOutput { + static fromJS(data: any): GetOrganizationUnitUserOutputPagedResultDto { data = typeof data === 'object' ? data : {}; - let result = new FileTokenOutput(); + let result = new GetOrganizationUnitUserOutputPagedResultDto(); result.init(data); return result; } toJSON(data?: any) { data = typeof data === 'object' ? data : {}; - data["accessKeyId"] = this.accessKeyId; - data["accessKeySecret"] = this.accessKeySecret; - data["token"] = this.token; - data["expiration"] = this.expiration; - data["bucket"] = this.bucket; - data["region"] = this.region; + if (Array.isArray(this.items)) { + data["items"] = []; + for (let item of this.items) + data["items"].push(item.toJSON()); + } + data["totalCount"] = this.totalCount; return data; } } -export interface IFileTokenOutput { - accessKeyId: string | undefined; - accessKeySecret: string | undefined; - token: string | undefined; - /** 过期时间 */ - expiration: string | undefined; - bucket: string | undefined; - region: string | undefined; +export interface IGetOrganizationUnitUserOutputPagedResultDto { + items: GetOrganizationUnitUserOutput[] | undefined; + totalCount: number; } -export class FindTenantByNameInput implements IFindTenantByNameInput { - name!: string | undefined; +export class GetPermissionInput implements IGetPermissionInput { + providerName!: string; + providerKey!: string; - constructor(data?: IFindTenantByNameInput) { + constructor(data?: IGetPermissionInput) { if (data) { for (var property in data) { if (data.hasOwnProperty(property)) @@ -12404,35 +14136,36 @@ export class FindTenantByNameInput implements IFindTenantByNameInput { init(_data?: any) { if (_data) { - this.name = _data["name"]; + this.providerName = _data["providerName"]; + this.providerKey = _data["providerKey"]; } } - static fromJS(data: any): FindTenantByNameInput { + static fromJS(data: any): GetPermissionInput { data = typeof data === 'object' ? data : {}; - let result = new FindTenantByNameInput(); + let result = new GetPermissionInput(); result.init(data); return result; } toJSON(data?: any) { data = typeof data === 'object' ? data : {}; - data["name"] = this.name; + data["providerName"] = this.providerName; + data["providerKey"] = this.providerKey; return data; } } -export interface IFindTenantByNameInput { - name: string | undefined; +export interface IGetPermissionInput { + providerName: string; + providerKey: string; } -export class FindTenantResultDto implements IFindTenantResultDto { - success!: boolean; - tenantId!: string | undefined; - name!: string | undefined; - isActive!: boolean; +export class GetPermissionListResultDto implements IGetPermissionListResultDto { + entityDisplayName!: string | undefined; + groups!: PermissionGroupDto[] | undefined; - constructor(data?: IFindTenantResultDto) { + constructor(data?: IGetPermissionListResultDto) { if (data) { for (var property in data) { if (data.hasOwnProperty(property)) @@ -12443,59 +14176,50 @@ export class FindTenantResultDto implements IFindTenantResultDto { init(_data?: any) { if (_data) { - this.success = _data["success"]; - this.tenantId = _data["tenantId"]; - this.name = _data["name"]; - this.isActive = _data["isActive"]; + this.entityDisplayName = _data["entityDisplayName"]; + if (Array.isArray(_data["groups"])) { + this.groups = [] as any; + for (let item of _data["groups"]) + this.groups!.push(PermissionGroupDto.fromJS(item)); + } } } - static fromJS(data: any): FindTenantResultDto { + static fromJS(data: any): GetPermissionListResultDto { data = typeof data === 'object' ? data : {}; - let result = new FindTenantResultDto(); + let result = new GetPermissionListResultDto(); result.init(data); return result; } toJSON(data?: any) { data = typeof data === 'object' ? data : {}; - data["success"] = this.success; - data["tenantId"] = this.tenantId; - data["name"] = this.name; - data["isActive"] = this.isActive; + data["entityDisplayName"] = this.entityDisplayName; + if (Array.isArray(this.groups)) { + data["groups"] = []; + for (let item of this.groups) + data["groups"].push(item.toJSON()); + } return data; } } -export interface IFindTenantResultDto { - success: boolean; - tenantId: string | undefined; - name: string | undefined; - isActive: boolean; +export interface IGetPermissionListResultDto { + entityDisplayName: string | undefined; + groups: PermissionGroupDto[] | undefined; } -export class GetAuditLogPageListOutput implements IGetAuditLogPageListOutput { - applicationName!: string | undefined; - userId!: string | undefined; - userName!: string | undefined; - tenantId!: string | undefined; - tenantName!: string | undefined; - impersonatorUserId!: string | undefined; - impersonatorTenantId!: string | undefined; - executionTime!: moment.Moment; - executionDuration!: number; - clientIpAddress!: string | undefined; - clientName!: string | undefined; - clientId!: string | undefined; - correlationId!: string | undefined; - browserInfo!: string | undefined; - httpMethod!: string | undefined; - url!: string | undefined; - exceptions!: string | undefined; - comments!: string | undefined; - httpStatusCode!: number | undefined; +export class GetUnAddRoleInput implements IGetUnAddRoleInput { + /** 当前页面.默认从1开始 */ + pageIndex!: number; + /** 每页多少条.每页显示多少记录 */ + pageSize!: number; + /** 跳过多少条 */ + readonly skipCount!: number; + organizationUnitId!: string; + filter!: string | undefined; - constructor(data?: IGetAuditLogPageListOutput) { + constructor(data?: IGetUnAddRoleInput) { if (data) { for (var property in data) { if (data.hasOwnProperty(property)) @@ -12506,87 +14230,88 @@ export class GetAuditLogPageListOutput implements IGetAuditLogPageListOutput { init(_data?: any) { if (_data) { - this.applicationName = _data["applicationName"]; - this.userId = _data["userId"]; - this.userName = _data["userName"]; - this.tenantId = _data["tenantId"]; - this.tenantName = _data["tenantName"]; - this.impersonatorUserId = _data["impersonatorUserId"]; - this.impersonatorTenantId = _data["impersonatorTenantId"]; - this.executionTime = _data["executionTime"] ? moment(_data["executionTime"].toString()) : undefined; - this.executionDuration = _data["executionDuration"]; - this.clientIpAddress = _data["clientIpAddress"]; - this.clientName = _data["clientName"]; - this.clientId = _data["clientId"]; - this.correlationId = _data["correlationId"]; - this.browserInfo = _data["browserInfo"]; - this.httpMethod = _data["httpMethod"]; - this.url = _data["url"]; - this.exceptions = _data["exceptions"]; - this.comments = _data["comments"]; - this.httpStatusCode = _data["httpStatusCode"]; + this.pageIndex = _data["pageIndex"]; + this.pageSize = _data["pageSize"]; + (this).skipCount = _data["skipCount"]; + this.organizationUnitId = _data["organizationUnitId"]; + this.filter = _data["filter"]; } } - static fromJS(data: any): GetAuditLogPageListOutput { + static fromJS(data: any): GetUnAddRoleInput { data = typeof data === 'object' ? data : {}; - let result = new GetAuditLogPageListOutput(); + let result = new GetUnAddRoleInput(); result.init(data); return result; } toJSON(data?: any) { data = typeof data === 'object' ? data : {}; - data["applicationName"] = this.applicationName; - data["userId"] = this.userId; - data["userName"] = this.userName; - data["tenantId"] = this.tenantId; - data["tenantName"] = this.tenantName; - data["impersonatorUserId"] = this.impersonatorUserId; - data["impersonatorTenantId"] = this.impersonatorTenantId; - data["executionTime"] = this.executionTime ? this.executionTime.toISOString() : undefined; - data["executionDuration"] = this.executionDuration; - data["clientIpAddress"] = this.clientIpAddress; - data["clientName"] = this.clientName; - data["clientId"] = this.clientId; - data["correlationId"] = this.correlationId; - data["browserInfo"] = this.browserInfo; - data["httpMethod"] = this.httpMethod; - data["url"] = this.url; - data["exceptions"] = this.exceptions; - data["comments"] = this.comments; - data["httpStatusCode"] = this.httpStatusCode; + data["pageIndex"] = this.pageIndex; + data["pageSize"] = this.pageSize; + data["skipCount"] = this.skipCount; + data["organizationUnitId"] = this.organizationUnitId; + data["filter"] = this.filter; return data; } } -export interface IGetAuditLogPageListOutput { - applicationName: string | undefined; - userId: string | undefined; - userName: string | undefined; - tenantId: string | undefined; - tenantName: string | undefined; - impersonatorUserId: string | undefined; - impersonatorTenantId: string | undefined; - executionTime: moment.Moment; - executionDuration: number; - clientIpAddress: string | undefined; - clientName: string | undefined; - clientId: string | undefined; - correlationId: string | undefined; - browserInfo: string | undefined; - httpMethod: string | undefined; - url: string | undefined; - exceptions: string | undefined; - comments: string | undefined; - httpStatusCode: number | undefined; +export interface IGetUnAddRoleInput { + /** 当前页面.默认从1开始 */ + pageIndex: number; + /** 每页多少条.每页显示多少记录 */ + pageSize: number; + /** 跳过多少条 */ + skipCount: number; + organizationUnitId: string; + filter: string | undefined; +} + +export class GetUnAddRoleOutput implements IGetUnAddRoleOutput { + id!: string; + name!: string | undefined; + + constructor(data?: IGetUnAddRoleOutput) { + if (data) { + for (var property in data) { + if (data.hasOwnProperty(property)) + (this)[property] = (data)[property]; + } + } + } + + init(_data?: any) { + if (_data) { + this.id = _data["id"]; + this.name = _data["name"]; + } + } + + static fromJS(data: any): GetUnAddRoleOutput { + data = typeof data === 'object' ? data : {}; + let result = new GetUnAddRoleOutput(); + result.init(data); + return result; + } + + toJSON(data?: any) { + data = typeof data === 'object' ? data : {}; + data["id"] = this.id; + data["name"] = this.name; + return data; + } } -export class GetAuditLogPageListOutputPagedResultDto implements IGetAuditLogPageListOutputPagedResultDto { - items!: GetAuditLogPageListOutput[] | undefined; +export interface IGetUnAddRoleOutput { + id: string; + name: string | undefined; +} + +export class GetUnAddRoleOutputPagedResultDto implements IGetUnAddRoleOutputPagedResultDto { + items!: GetUnAddRoleOutput[] | undefined; totalCount!: number; - constructor(data?: IGetAuditLogPageListOutputPagedResultDto) { + constructor(data?: IGetUnAddRoleOutputPagedResultDto) { if (data) { for (var property in data) { if (data.hasOwnProperty(property)) @@ -12600,15 +14325,15 @@ export class GetAuditLogPageListOutputPagedResultDto implements IGetAuditLogPage if (Array.isArray(_data["items"])) { this.items = [] as any; for (let item of _data["items"]) - this.items!.push(GetAuditLogPageListOutput.fromJS(item)); + this.items!.push(GetUnAddRoleOutput.fromJS(item)); } this.totalCount = _data["totalCount"]; } } - static fromJS(data: any): GetAuditLogPageListOutputPagedResultDto { + static fromJS(data: any): GetUnAddRoleOutputPagedResultDto { data = typeof data === 'object' ? data : {}; - let result = new GetAuditLogPageListOutputPagedResultDto(); + let result = new GetUnAddRoleOutputPagedResultDto(); result.init(data); return result; } @@ -12625,15 +14350,22 @@ export class GetAuditLogPageListOutputPagedResultDto implements IGetAuditLogPage } } -export interface IGetAuditLogPageListOutputPagedResultDto { - items: GetAuditLogPageListOutput[] | undefined; +export interface IGetUnAddRoleOutputPagedResultDto { + items: GetUnAddRoleOutput[] | undefined; totalCount: number; } -export class GetFeatureListResultDto implements IGetFeatureListResultDto { - groups!: FeatureGroupDto[] | undefined; +export class GetUnAddUserInput implements IGetUnAddUserInput { + /** 当前页面.默认从1开始 */ + pageIndex!: number; + /** 每页多少条.每页显示多少记录 */ + pageSize!: number; + /** 跳过多少条 */ + readonly skipCount!: number; + organizationUnitId!: string; + filter!: string | undefined; - constructor(data?: IGetFeatureListResultDto) { + constructor(data?: IGetUnAddUserInput) { if (data) { for (var property in data) { if (data.hasOwnProperty(property)) @@ -12644,41 +14376,49 @@ export class GetFeatureListResultDto implements IGetFeatureListResultDto { init(_data?: any) { if (_data) { - if (Array.isArray(_data["groups"])) { - this.groups = [] as any; - for (let item of _data["groups"]) - this.groups!.push(FeatureGroupDto.fromJS(item)); - } + this.pageIndex = _data["pageIndex"]; + this.pageSize = _data["pageSize"]; + (this).skipCount = _data["skipCount"]; + this.organizationUnitId = _data["organizationUnitId"]; + this.filter = _data["filter"]; } } - static fromJS(data: any): GetFeatureListResultDto { + static fromJS(data: any): GetUnAddUserInput { data = typeof data === 'object' ? data : {}; - let result = new GetFeatureListResultDto(); + let result = new GetUnAddUserInput(); result.init(data); return result; } toJSON(data?: any) { data = typeof data === 'object' ? data : {}; - if (Array.isArray(this.groups)) { - data["groups"] = []; - for (let item of this.groups) - data["groups"].push(item.toJSON()); - } + data["pageIndex"] = this.pageIndex; + data["pageSize"] = this.pageSize; + data["skipCount"] = this.skipCount; + data["organizationUnitId"] = this.organizationUnitId; + data["filter"] = this.filter; return data; } } -export interface IGetFeatureListResultDto { - groups: FeatureGroupDto[] | undefined; +export interface IGetUnAddUserInput { + /** 当前页面.默认从1开始 */ + pageIndex: number; + /** 每页多少条.每页显示多少记录 */ + pageSize: number; + /** 跳过多少条 */ + skipCount: number; + organizationUnitId: string; + filter: string | undefined; } -export class GetPermissionInput implements IGetPermissionInput { - providerName!: string; - providerKey!: string; +export class GetUnAddUserOutput implements IGetUnAddUserOutput { + id!: string; + userName!: string | undefined; + email!: string | undefined; - constructor(data?: IGetPermissionInput) { + constructor(data?: IGetUnAddUserOutput) { if (data) { for (var property in data) { if (data.hasOwnProperty(property)) @@ -12689,36 +14429,39 @@ export class GetPermissionInput implements IGetPermissionInput { init(_data?: any) { if (_data) { - this.providerName = _data["providerName"]; - this.providerKey = _data["providerKey"]; + this.id = _data["id"]; + this.userName = _data["userName"]; + this.email = _data["email"]; } } - static fromJS(data: any): GetPermissionInput { + static fromJS(data: any): GetUnAddUserOutput { data = typeof data === 'object' ? data : {}; - let result = new GetPermissionInput(); + let result = new GetUnAddUserOutput(); result.init(data); return result; } toJSON(data?: any) { data = typeof data === 'object' ? data : {}; - data["providerName"] = this.providerName; - data["providerKey"] = this.providerKey; + data["id"] = this.id; + data["userName"] = this.userName; + data["email"] = this.email; return data; } } -export interface IGetPermissionInput { - providerName: string; - providerKey: string; +export interface IGetUnAddUserOutput { + id: string; + userName: string | undefined; + email: string | undefined; } -export class GetPermissionListResultDto implements IGetPermissionListResultDto { - entityDisplayName!: string | undefined; - groups!: PermissionGroupDto[] | undefined; +export class GetUnAddUserOutputPagedResultDto implements IGetUnAddUserOutputPagedResultDto { + items!: GetUnAddUserOutput[] | undefined; + totalCount!: number; - constructor(data?: IGetPermissionListResultDto) { + constructor(data?: IGetUnAddUserOutputPagedResultDto) { if (data) { for (var property in data) { if (data.hasOwnProperty(property)) @@ -12729,37 +14472,37 @@ export class GetPermissionListResultDto implements IGetPermissionListResultDto { init(_data?: any) { if (_data) { - this.entityDisplayName = _data["entityDisplayName"]; - if (Array.isArray(_data["groups"])) { - this.groups = [] as any; - for (let item of _data["groups"]) - this.groups!.push(PermissionGroupDto.fromJS(item)); + if (Array.isArray(_data["items"])) { + this.items = [] as any; + for (let item of _data["items"]) + this.items!.push(GetUnAddUserOutput.fromJS(item)); } + this.totalCount = _data["totalCount"]; } } - static fromJS(data: any): GetPermissionListResultDto { + static fromJS(data: any): GetUnAddUserOutputPagedResultDto { data = typeof data === 'object' ? data : {}; - let result = new GetPermissionListResultDto(); + let result = new GetUnAddUserOutputPagedResultDto(); result.init(data); return result; } toJSON(data?: any) { data = typeof data === 'object' ? data : {}; - data["entityDisplayName"] = this.entityDisplayName; - if (Array.isArray(this.groups)) { - data["groups"] = []; - for (let item of this.groups) - data["groups"].push(item.toJSON()); + if (Array.isArray(this.items)) { + data["items"] = []; + for (let item of this.items) + data["items"].push(item.toJSON()); } + data["totalCount"] = this.totalCount; return data; } } -export interface IGetPermissionListResultDto { - entityDisplayName: string | undefined; - groups: PermissionGroupDto[] | undefined; +export interface IGetUnAddUserOutputPagedResultDto { + items: GetUnAddUserOutput[] | undefined; + totalCount: number; } export enum HttpStatusCode { @@ -16913,6 +18656,86 @@ export interface IRemoveRedirectUriInput { uri: string; } +export class RemoveRoleToOrganizationUnitInput implements IRemoveRoleToOrganizationUnitInput { + roleId!: string; + organizationUnitId!: string; + + constructor(data?: IRemoveRoleToOrganizationUnitInput) { + if (data) { + for (var property in data) { + if (data.hasOwnProperty(property)) + (this)[property] = (data)[property]; + } + } + } + + init(_data?: any) { + if (_data) { + this.roleId = _data["roleId"]; + this.organizationUnitId = _data["organizationUnitId"]; + } + } + + static fromJS(data: any): RemoveRoleToOrganizationUnitInput { + data = typeof data === 'object' ? data : {}; + let result = new RemoveRoleToOrganizationUnitInput(); + result.init(data); + return result; + } + + toJSON(data?: any) { + data = typeof data === 'object' ? data : {}; + data["roleId"] = this.roleId; + data["organizationUnitId"] = this.organizationUnitId; + return data; + } +} + +export interface IRemoveRoleToOrganizationUnitInput { + roleId: string; + organizationUnitId: string; +} + +export class RemoveUserToOrganizationUnitInput implements IRemoveUserToOrganizationUnitInput { + userId!: string; + organizationUnitId!: string; + + constructor(data?: IRemoveUserToOrganizationUnitInput) { + if (data) { + for (var property in data) { + if (data.hasOwnProperty(property)) + (this)[property] = (data)[property]; + } + } + } + + init(_data?: any) { + if (_data) { + this.userId = _data["userId"]; + this.organizationUnitId = _data["organizationUnitId"]; + } + } + + static fromJS(data: any): RemoveUserToOrganizationUnitInput { + data = typeof data === 'object' ? data : {}; + let result = new RemoveUserToOrganizationUnitInput(); + result.init(data); + return result; + } + + toJSON(data?: any) { + data = typeof data === 'object' ? data : {}; + data["userId"] = this.userId; + data["organizationUnitId"] = this.organizationUnitId; + return data; + } +} + +export interface IRemoveUserToOrganizationUnitInput { + userId: string; + organizationUnitId: string; +} + export class ResetPasswordDto implements IResetPasswordDto { userId!: string; resetToken!: string; @@ -17623,6 +19446,58 @@ export interface ITimingDto { timeZone: TimeZone; } +export class TreeOutput implements ITreeOutput { + title!: string | undefined; + key!: string; + children!: TreeOutput[] | undefined; + + constructor(data?: ITreeOutput) { + if (data) { + for (var property in data) { + if (data.hasOwnProperty(property)) + (this)[property] = (data)[property]; + } + } + } + + init(_data?: any) { + if (_data) { + this.title = _data["title"]; + this.key = _data["key"]; + if (Array.isArray(_data["children"])) { + this.children = [] as any; + for (let item of _data["children"]) + this.children!.push(TreeOutput.fromJS(item)); + } + } + } + + static fromJS(data: any): TreeOutput { + data = typeof data === 'object' ? data : {}; + let result = new TreeOutput(); + result.init(data); + return result; + } + + toJSON(data?: any) { + data = typeof data === 'object' ? data : {}; + data["title"] = this.title; + data["key"] = this.key; + if (Array.isArray(this.children)) { + data["children"] = []; + for (let item of this.children) + data["children"].push(item.toJSON()); + } + return data; + } +} + +export interface ITreeOutput { + title: string | undefined; + key: string; + children: TreeOutput[] | undefined; +} + export class TypeApiDescriptionModel implements ITypeApiDescriptionModel { baseType!: string | undefined; isEnum!: boolean; @@ -18399,6 +20274,46 @@ export interface IUpdateIdentityResourceInput { showInDiscoveryDocument: boolean; } +export class UpdateOrganizationUnitInput implements IUpdateOrganizationUnitInput { + displayName!: string; + id!: string; + + constructor(data?: IUpdateOrganizationUnitInput) { + if (data) { + for (var property in data) { + if (data.hasOwnProperty(property)) + (this)[property] = (data)[property]; + } + } + } + + init(_data?: any) { + if (_data) { + this.displayName = _data["displayName"]; + this.id = _data["id"]; + } + } + + static fromJS(data: any): UpdateOrganizationUnitInput { + data = typeof data === 'object' ? data : {}; + let result = new UpdateOrganizationUnitInput(); + result.init(data); + return result; + } + + toJSON(data?: any) { + data = typeof data === 'object' ? data : {}; + data["displayName"] = this.displayName; + data["id"] = this.id; + return data; + } +} + +export interface IUpdateOrganizationUnitInput { + displayName: string; + id: string; +} + export class UpdatePermissionDto implements IUpdatePermissionDto { name!: string | undefined; isGranted!: boolean; diff --git a/vben271/src/views/admin/dictionary/AbpDictionary.ts b/vben271/src/views/admin/dictionary/AbpDictionary.ts index 29928a2c..cce7cd11 100644 --- a/vben271/src/views/admin/dictionary/AbpDictionary.ts +++ b/vben271/src/views/admin/dictionary/AbpDictionary.ts @@ -1,39 +1,39 @@ -import { FormSchema } from "/@/components/Table"; -import { BasicColumn } from "/@/components/Table"; -import { message } from "ant-design-vue"; -import { useI18n } from "/@/hooks/web/useI18n"; +import { FormSchema } from '/@/components/Table'; +import { BasicColumn } from '/@/components/Table'; +import { message } from 'ant-design-vue'; +import { useI18n } from '/@/hooks/web/useI18n'; import { PagingDataDictionaryInput, DataDictionaryServiceProxy, SetDataDictinaryDetailInput, DeleteDataDictionaryDetailInput, - IdInput -} from "/@/services/ServiceProxies"; -import { h } from "vue"; -import { Switch } from "ant-design-vue"; + IdInput, +} from '/@/services/ServiceProxies'; +import { h } from 'vue'; +import { Switch } from 'ant-design-vue'; const { t } = useI18n(); export const tableColumns: BasicColumn[] = [ { - title: t("routes.admin.dictionaryCode"), - dataIndex: "code" + title: t('routes.admin.dictionaryCode'), + dataIndex: 'code', }, { - title: t("routes.admin.dictionaryDisplayText"), - dataIndex: "displayText" + title: t('routes.admin.dictionaryDisplayText'), + dataIndex: 'displayText', }, { - title: t("routes.admin.dictionaryOrder"), - dataIndex: "order" + title: t('routes.admin.dictionaryOrder'), + dataIndex: 'order', }, { - title: t("common.status"), - dataIndex: "isEnabled", + title: t('common.status'), + dataIndex: 'isEnabled', customRender: ({ record }) => { return h(Switch, { checked: record.isEnabled, - checkedChildren: "是", - unCheckedChildren: "否", + checkedChildren: '是', + unCheckedChildren: '否', onChange(checked: boolean) { const request = new SetDataDictinaryDetailInput(); request.dataDictionaryId = record.dataDictionaryId; @@ -42,103 +42,102 @@ export const tableColumns: BasicColumn[] = [ enableDictionaryAsync(request) .then(() => { record.isEnabled = checked; - message.success(t("common.operationSuccess")); + message.success(t('common.operationSuccess')); }) .catch(() => { - message.error(t("common.operationFail")); + message.error(t('common.operationFail')); }); - } + }, }); - } + }, }, { - dataIndex: "description", - title: t("routes.admin.dictionaryDescription") - } + dataIndex: 'description', + title: t('routes.admin.dictionaryDescription'), + }, ]; //字典类型表格 export const dictionaryTypeTableColumns: BasicColumn[] = [ { - title: t("routes.admin.dictionaryCode") + "|" + t("routes.admin.dictionaryDisplayText"), - dataIndex: "text", - align: "left", + title: t('routes.admin.dictionaryCode') + '|' + t('routes.admin.dictionaryDisplayText'), + dataIndex: 'text', + align: 'left', slots: { - customRender: "text" - } - } - + customRender: 'text', + }, + }, ]; //字典项查询 export const searchFormSchema: FormSchema[] = [ { - field: "filter", - label: "", - component: "Input", + field: 'filter', + label: '', + component: 'Input', colProps: { - span: 6 - } - } + span: 6, + }, + }, ]; //字典类型查询 export const searchDictionaryFormSchema: FormSchema[] = [ { - field: "filter", - label: "", - component: "Input", + field: 'filter', + label: '', + component: 'Input', colProps: { - span: 18 - } - } + span: 18, + }, + }, ]; //新增字典项 export const createFormSchema: FormSchema[] = [ { - field: "id", - label: "", + field: 'id', + label: '', ifShow: false, - component: "Input", + component: 'Input', colProps: { - span: 18 - } + span: 18, + }, }, { - field: "typeDisplayText", - label: t("routes.admin.dictionaryTypeName"), - component: "Input", + field: 'typeDisplayText', + label: t('routes.admin.dictionaryTypeName'), + component: 'Input', colProps: { - span: 18 + span: 18, }, componentProps: { - disabled: true - } + disabled: true, + }, }, { - field: "code", - label: t("routes.admin.dictionaryCode"), + field: 'code', + label: t('routes.admin.dictionaryCode'), required: true, - component: "Input", + component: 'Input', colProps: { - span: 18 - } + span: 18, + }, }, { - field: "displayText", - label: t("routes.admin.dictionaryDisplayText"), - component: "Input", + field: 'displayText', + label: t('routes.admin.dictionaryDisplayText'), + component: 'Input', required: true, colProps: { - span: 18 - } + span: 18, + }, }, { - field: "order", - label: t("routes.admin.dictionaryOrder"), + field: 'order', + label: t('routes.admin.dictionaryOrder'), required: true, - component: "InputNumber", + component: 'InputNumber', colProps: { - span: 18 + span: 18, }, dynamicRules: () => { return [ @@ -149,69 +148,69 @@ export const createFormSchema: FormSchema[] = [ if (regNull.test(value)) { return Promise.resolve(); } - return Promise.reject(t("routes.admin.nonZeroMessage")); - } - } + return Promise.reject(t('routes.admin.nonZeroMessage')); + }, + }, ]; - } + }, }, { - field: "description", - label: t("routes.admin.dictionaryDescription"), - component: "InputTextArea", + field: 'description', + label: t('routes.admin.dictionaryDescription'), + component: 'InputTextArea', colProps: { - span: 18 - } - } + span: 18, + }, + }, ]; //编辑字典项 export const editFormSchema: FormSchema[] = [ { - field: "dataDictionaryId", - label: "", + field: 'dataDictionaryId', + label: '', ifShow: false, - component: "Input", + component: 'Input', colProps: { - span: 18 - } + span: 18, + }, }, { - field: "id", - label: "", + field: 'id', + label: '', ifShow: false, - component: "Input", + component: 'Input', colProps: { - span: 18 - } + span: 18, + }, }, { - field: "code", - label: t("routes.admin.dictionaryCode"), + field: 'code', + label: t('routes.admin.dictionaryCode'), required: true, - component: "Input", + component: 'Input', colProps: { - span: 18 + span: 18, }, componentProps: { - disabled: true - } + disabled: true, + }, }, { - field: "displayText", - label: t("routes.admin.dictionaryDisplayText"), - component: "Input", + field: 'displayText', + label: t('routes.admin.dictionaryDisplayText'), + component: 'Input', required: true, colProps: { - span: 18 - } + span: 18, + }, }, { - field: "order", - label: t("routes.admin.dictionaryOrder"), + field: 'order', + label: t('routes.admin.dictionaryOrder'), required: true, - component: "InputNumber", + component: 'InputNumber', colProps: { - span: 18 + span: 18, }, dynamicRules: () => { return [ @@ -222,99 +221,99 @@ export const editFormSchema: FormSchema[] = [ if (regNull.test(value)) { return Promise.resolve(); } - return Promise.reject(t("routes.admin.nonZeroMessage")); - } - } + return Promise.reject(t('routes.admin.nonZeroMessage')); + }, + }, ]; - } + }, }, { - field: "description", - label: t("routes.admin.dictionaryDescription"), - component: "InputTextArea", + field: 'description', + label: t('routes.admin.dictionaryDescription'), + component: 'InputTextArea', colProps: { - span: 18 - } - } + span: 18, + }, + }, ]; //新增字典类型 export const createDictionaryTypeFormSchema: FormSchema[] = [ { - field: "code", - label: t("routes.admin.dictionaryCode"), - component: "Input", + field: 'code', + label: t('routes.admin.dictionaryCode'), + component: 'Input', required: true, colProps: { - span: 22 - } + span: 22, + }, }, { - field: "displayText", - label: t("routes.admin.dictionaryDisplayText"), - component: "Input", + field: 'displayText', + label: t('routes.admin.dictionaryDisplayText'), + component: 'Input', required: true, colProps: { - span: 22 - } + span: 22, + }, }, { - field: "description", - label: t("routes.admin.dictionaryDescription"), - component: "InputTextArea", + field: 'description', + label: t('routes.admin.dictionaryDescription'), + component: 'InputTextArea', colProps: { - span: 22 - } - } + span: 22, + }, + }, ]; //编辑字典类型 export const editDictionaryTypeFormSchema: FormSchema[] = [ { - field: "code", - label: t("routes.admin.dictionaryCode"), - component: "Input", + field: 'code', + label: t('routes.admin.dictionaryCode'), + component: 'Input', required: true, colProps: { - span: 22 + span: 22, }, componentProps: { - disabled: true - } + disabled: true, + }, }, { - field: "displayText", - label: t("routes.admin.dictionaryDisplayText"), - component: "Input", + field: 'displayText', + label: t('routes.admin.dictionaryDisplayText'), + component: 'Input', required: true, colProps: { - span: 22 - } + span: 22, + }, }, { - field: "description", - label: t("routes.admin.dictionaryDescription"), - component: "InputTextArea", + field: 'description', + label: t('routes.admin.dictionaryDescription'), + component: 'InputTextArea', colProps: { - span: 22 - } + span: 22, + }, }, { - field: "key", - label: "", + field: 'key', + label: '', ifShow: false, - component: "Input", + component: 'Input', colProps: { - span: 18 - } + span: 18, + }, }, { - field: "id", - label: "", + field: 'id', + label: '', ifShow: false, - component: "Input", + component: 'Input', colProps: { - span: 18 - } - } + span: 18, + }, + }, ]; /** @@ -330,17 +329,17 @@ export async function getDictionaryTypeAsync(params: PagingDataDictionaryInput) //新建字典类型 export async function createDictionaryTypeAsync({ - request, - changeOkLoading, - closeModal, - validate, - resetFields - }) { + request, + changeOkLoading, + closeModal, + validate, + resetFields, +}) { changeOkLoading(true); await validate(); const _dataDictionaryServiceProxy = new DataDictionaryServiceProxy(); await _dataDictionaryServiceProxy.create(request); - message.success(t("common.operationSuccess")); + message.success(t('common.operationSuccess')); resetFields(); changeOkLoading(false); closeModal(); @@ -352,7 +351,7 @@ export async function editDictionaryTypeAsync({ request, changeOkLoading, valida await validate(); const _dataDictionaryServiceProxy = new DataDictionaryServiceProxy(); await _dataDictionaryServiceProxy.update(request); - message.success(t("common.operationSuccess")); + message.success(t('common.operationSuccess')); changeOkLoading(false); closeModal(); } @@ -365,17 +364,17 @@ export async function enableDictionaryAsync(input: SetDataDictinaryDetailInput) //创建数据详情字典 export async function createDetailsDictionaryAsync({ - request, - changeOkLoading, - validate, - resetFields, - closeModal - }) { + request, + changeOkLoading, + validate, + resetFields, + closeModal, +}) { changeOkLoading(true); await validate(); const _dataDictionaryServiceProxy = new DataDictionaryServiceProxy(); await _dataDictionaryServiceProxy.createDetail(request); - message.success(t("common.operationSuccess")); + message.success(t('common.operationSuccess')); resetFields(); changeOkLoading(false); closeModal(); @@ -390,16 +389,16 @@ export async function getDictionaryDetailsAsync({ params }) { //编辑数据字典 export async function editDetailsDictionaryAsync({ - request, - changeOkLoading, - validate, - closeModal - }) { + request, + changeOkLoading, + validate, + closeModal, +}) { changeOkLoading(true); await validate(); const _dataDictionaryServiceProxy = new DataDictionaryServiceProxy(); await _dataDictionaryServiceProxy.updateDetail(request); - message.success(t("common.operationSuccess")); + message.success(t('common.operationSuccess')); changeOkLoading(false); closeModal(); } diff --git a/vben271/src/views/admin/organizationUnits/AddRoleToOrganizationUnit.vue b/vben271/src/views/admin/organizationUnits/AddRoleToOrganizationUnit.vue new file mode 100644 index 00000000..98ff9818 --- /dev/null +++ b/vben271/src/views/admin/organizationUnits/AddRoleToOrganizationUnit.vue @@ -0,0 +1,84 @@ + + + + + diff --git a/vben271/src/views/admin/organizationUnits/CreateOrganizationUnit.vue b/vben271/src/views/admin/organizationUnits/CreateOrganizationUnit.vue new file mode 100644 index 00000000..8337643d --- /dev/null +++ b/vben271/src/views/admin/organizationUnits/CreateOrganizationUnit.vue @@ -0,0 +1,89 @@ + + + + + diff --git a/vben271/src/views/admin/organizationUnits/EditOrganizationUnit.vue b/vben271/src/views/admin/organizationUnits/EditOrganizationUnit.vue new file mode 100644 index 00000000..bd44beb2 --- /dev/null +++ b/vben271/src/views/admin/organizationUnits/EditOrganizationUnit.vue @@ -0,0 +1,75 @@ + + + + + diff --git a/vben271/src/views/admin/organizationUnits/OrganizationUnit.ts b/vben271/src/views/admin/organizationUnits/OrganizationUnit.ts new file mode 100644 index 00000000..7c60d79b --- /dev/null +++ b/vben271/src/views/admin/organizationUnits/OrganizationUnit.ts @@ -0,0 +1,234 @@ +import { + OrganizationUnitsServiceProxy, + IdInput, + GetOrganizationUnitUserInput, + GetOrganizationUnitRoleInput, + RemoveUserToOrganizationUnitInput, + RemoveRoleToOrganizationUnitInput, + AddRoleToOrganizationUnitInput, + AddUserToOrganizationUnitInput, + GetUnAddRoleInput, + GetUnAddUserInput +} from "/@/services/ServiceProxies"; +import { FormSchema } from '/@/components/Table'; +import { BasicColumn } from '/@/components/Table'; +import { useI18n } from '/@/hooks/web/useI18n'; +const { t } = useI18n(); + +export const createOrganizationUnitFormSchema: FormSchema[] = [ + { + field: 'parentDisplayName', + label: t('routes.admin.parentOrganizationUnitName'), + component: 'Input', + componentProps: { + disabled: true, + }, + colProps: { + span: 18, + }, + }, + { + field: 'displayName', + label: t('routes.admin.organizationUnitName'), + component: 'Input', + colProps: { + span: 18, + }, + }, + { + field: 'parentId', + label: '', + component: 'Input', + colProps: { + span: 18, + }, + ifShow: false, + }, +]; + +export const editOrganizationUnitFormSchema: FormSchema[] = [ + { + field: 'displayName', + label: t('routes.admin.organizationUnitName'), + component: 'Input', + colProps: { + span: 18, + }, + }, + { + field: 'id', + label: '', + component: 'Input', + colProps: { + span: 18, + }, + ifShow: false, + }, +]; +export const addRoleToOrganizationUnitFormSchema: FormSchema[] = [ + { + field: 'displayName', + label: t('routes.admin.organizationUnitName'), + component: 'Input', + colProps: { + span: 18, + }, + }, + { + field: 'organizationUnitId', + label: '', + component: 'Input', + colProps: { + span: 18, + }, + ifShow: false, + }, +]; +export const userTableColumns: BasicColumn[] = [ + { + title: t('routes.admin.userManagement_userName'), + dataIndex: 'userName', + }, + { + title: t('routes.admin.userManagement_email'), + dataIndex: 'email', + } +]; + +export const addUserTableColumns: BasicColumn[] = [ + { + title: t('routes.admin.userManagement_userName'), + dataIndex: 'userName', + }, + { + title: t('routes.admin.userManagement_email'), + dataIndex: 'email', + } +]; + +export const roleTableColumns: BasicColumn[] = [ + { + title: t('routes.admin.userManagement_roleName'), + dataIndex: 'name', + } +]; +export const addRoleTableColumns: BasicColumn[] = [ + { + title: t('routes.admin.userManagement_roleName'), + dataIndex: 'name', + } +]; +export const searchAddRoleFormSchema: FormSchema[] = [ + { + field: 'filter', + label: t('routes.admin.userManagement_roleName'), + component: 'Input', + colProps: { span: 8 }, + }, + { + field: 'organizationUnitId', + label: '', + component: 'Input', + ifShow:false, + colProps: { span: 8 }, + } +]; + +export const searchUserFormSchema: FormSchema[] = [ + { + field: 'filter', + label: t('routes.admin.userManagement_userName'), + component: 'Input', + colProps: { span: 8 }, + }, + { + field: 'organizationUnitId', + label: '', + component: 'Input', + ifShow:false, + colProps: { span: 8 }, + } +]; +export async function getTreeAsync() { + const _organizationUnitsServiceProxy = new OrganizationUnitsServiceProxy(); + return await _organizationUnitsServiceProxy.tree(); +} +export async function deleteTreeNodeAsync({ id }) { + const _organizationUnitsServiceProxy = new OrganizationUnitsServiceProxy(); + const request = new IdInput(); + request.id = id; + return await _organizationUnitsServiceProxy.delete(request); +} +export async function createOrganizationUnitAsync({ + request, + changeOkLoading, + closeModal, + validate, + resetFields, +}) { + changeOkLoading(true); + await validate(); + const _organizationUnitsServiceProxy = new OrganizationUnitsServiceProxy(); + await _organizationUnitsServiceProxy.create(request); + resetFields(); + changeOkLoading(false); + closeModal(); +} + +export async function editOrganizationUnitAsync({ + request, + changeOkLoading, + closeModal, + validate, +}) { + changeOkLoading(true); + await validate(); + const _organizationUnitsServiceProxy = new OrganizationUnitsServiceProxy(); + await _organizationUnitsServiceProxy.update(request); + changeOkLoading(false); + closeModal(); +} + +export async function getUserTableListAsync(params: GetOrganizationUnitUserInput) { + const _organizationUnitsServiceProxy = new OrganizationUnitsServiceProxy(); + return _organizationUnitsServiceProxy.getUsers(params); +} +export async function getRoleTableListAsync(params: GetOrganizationUnitRoleInput) { + const _organizationUnitsServiceProxy = new OrganizationUnitsServiceProxy(); + return _organizationUnitsServiceProxy.getRoles(params); +} + + +export async function removeUserFromOrganizationUnitAsync(params:RemoveUserToOrganizationUnitInput) +{ + const _organizationUnitsServiceProxy = new OrganizationUnitsServiceProxy(); + return _organizationUnitsServiceProxy.removeUserFromOrganizationUnit(params); +} +export async function removeRoleFromOrganizationUnitAsync(params:RemoveRoleToOrganizationUnitInput) +{ + const _organizationUnitsServiceProxy = new OrganizationUnitsServiceProxy(); + return _organizationUnitsServiceProxy.removeRoleFromOrganizationUnit(params); +} +export async function addRoleToOrganizationUnitAsync(params:AddRoleToOrganizationUnitInput) +{ + const _organizationUnitsServiceProxy = new OrganizationUnitsServiceProxy(); + return _organizationUnitsServiceProxy.addRoleToOrganizationUnit(params); +} +export async function addUserToOrganizationUnitAsync(params:AddUserToOrganizationUnitInput) +{ + const _organizationUnitsServiceProxy = new OrganizationUnitsServiceProxy(); + return _organizationUnitsServiceProxy.addUserToOrganizationUnit(params); +} + +export async function GetUnAddUserAsync(params:GetUnAddUserInput) +{ + const _organizationUnitsServiceProxy = new OrganizationUnitsServiceProxy(); + return _organizationUnitsServiceProxy.getUnAddUsers(params); +} + + +export async function getUnAddRolesAsync(params:GetUnAddRoleInput) +{ + const _organizationUnitsServiceProxy = new OrganizationUnitsServiceProxy(); + return _organizationUnitsServiceProxy.getUnAddRoles(params); +} diff --git a/vben271/src/views/admin/organizationUnits/OrganizationUnit.vue b/vben271/src/views/admin/organizationUnits/OrganizationUnit.vue new file mode 100644 index 00000000..f485b8a1 --- /dev/null +++ b/vben271/src/views/admin/organizationUnits/OrganizationUnit.vue @@ -0,0 +1,344 @@ + + + + diff --git a/vben271/src/views/sys/login/useLogin.ts b/vben271/src/views/sys/login/useLogin.ts index 8c1e20fe..3c198fef 100644 --- a/vben271/src/views/sys/login/useLogin.ts +++ b/vben271/src/views/sys/login/useLogin.ts @@ -135,6 +135,7 @@ function getOidcSettings() { export function useOidcLogin() { const settings = getOidcSettings(); + mgr.getUser() const mgr = new Oidc.UserManager(settings); mgr.signinRedirect(); }