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/frameworks/Extensions/src/Lion.AbpPro.Extension/System/DateTimeExtensions.cs b/aspnet-core/frameworks/Extensions/src/Lion.AbpPro.Extension/System/DateTimeExtensions.cs index 99b1bef9..1d23b6c2 100644 --- a/aspnet-core/frameworks/Extensions/src/Lion.AbpPro.Extension/System/DateTimeExtensions.cs +++ b/aspnet-core/frameworks/Extensions/src/Lion.AbpPro.Extension/System/DateTimeExtensions.cs @@ -75,5 +75,30 @@ namespace Lion.AbpPro.Extension.System var result = length == 10 ? start.AddSeconds(jsTime) : start.AddMilliseconds(jsTime); return result.ToUniversalTime(); } + + /// + /// 获取指定日期 当天的最大时间 + /// 例如 2021-09-10 11:22:33.123456 转换后 2021-09-10 23:59:59.9999999 + /// + public static DateTime? ToCurrentDateMaxDateTime(this DateTime? dateTime) + { + return dateTime?.Date.AddDays(1).AddTicks(-1); + } + + /// + /// 获取指定时间的下一秒 + /// 例如 2021-09-10 11:11:11.1234567 转换后 2021-09-10 11:11:12.0000000 + /// + public static DateTime? ToNextSecondDateTime(this DateTime? dateTime) + { + if (!dateTime.HasValue) + { + return null; + } + + return new DateTime(dateTime.Value.Year, dateTime.Value.Month, dateTime.Value.Day, dateTime.Value.Hour, + dateTime.Value.Minute, dateTime.Value.Second) + .AddSeconds(1); + } } } \ No newline at end of file diff --git a/aspnet-core/modules/DataDictionaryManagement/src/Lion.AbpPro.DataDictionaryManagement.Domain.Shared/DataDictionaries/DataDictionaryDomainException.cs b/aspnet-core/modules/DataDictionaryManagement/src/Lion.AbpPro.DataDictionaryManagement.Domain.Shared/DataDictionaries/DataDictionaryDomainException.cs index 8a4d320a..555d5eaa 100644 --- a/aspnet-core/modules/DataDictionaryManagement/src/Lion.AbpPro.DataDictionaryManagement.Domain.Shared/DataDictionaries/DataDictionaryDomainException.cs +++ b/aspnet-core/modules/DataDictionaryManagement/src/Lion.AbpPro.DataDictionaryManagement.Domain.Shared/DataDictionaries/DataDictionaryDomainException.cs @@ -5,16 +5,17 @@ using Volo.Abp; namespace Lion.AbpPro.DataDictionaryManagement.DataDictionaries { - public class DataDictionaryDomainException : UserFriendlyException + public class DataDictionaryDomainException : BusinessException { - public DataDictionaryDomainException(string message, string code = null, string details = null, - Exception innerException = null, LogLevel logLevel = LogLevel.Warning) : base(message, code, details, - innerException, logLevel) + public DataDictionaryDomainException(string code = null, string message = null, string details = null, Exception innerException = null, + LogLevel logLevel = LogLevel.Warning) : base(code, message, details, + innerException, + logLevel + ) { } - public DataDictionaryDomainException(SerializationInfo serializationInfo, StreamingContext context) : base( - serializationInfo, context) + public DataDictionaryDomainException(SerializationInfo serializationInfo, StreamingContext context) : base(serializationInfo, context) { } } diff --git a/aspnet-core/modules/DataDictionaryManagement/src/Lion.AbpPro.DataDictionaryManagement.Domain.Shared/DataDictionaryManagementConsts.cs b/aspnet-core/modules/DataDictionaryManagement/src/Lion.AbpPro.DataDictionaryManagement.Domain.Shared/DataDictionaryManagementConsts.cs index 63e08e03..044e7116 100644 --- a/aspnet-core/modules/DataDictionaryManagement/src/Lion.AbpPro.DataDictionaryManagement.Domain.Shared/DataDictionaryManagementConsts.cs +++ b/aspnet-core/modules/DataDictionaryManagement/src/Lion.AbpPro.DataDictionaryManagement.Domain.Shared/DataDictionaryManagementConsts.cs @@ -5,5 +5,10 @@ namespace Lion.AbpPro.DataDictionaryManagement public class DataDictionaryManagementConsts { public static Guid SeedDataDictionaryId = new Guid("39fdb236-a90e-e4b5-02a0-2866a8cf9821"); + + /// 名称空间 + public const string NameSpace = "Lion.AbpPro.DataDictionaryManagement"; + /// 默认语言 + public const string DefaultCultureName = "zh-Hans"; } } \ No newline at end of file diff --git a/aspnet-core/modules/DataDictionaryManagement/src/Lion.AbpPro.DataDictionaryManagement.Domain.Shared/DataDictionaryManagementDomainSharedModule.cs b/aspnet-core/modules/DataDictionaryManagement/src/Lion.AbpPro.DataDictionaryManagement.Domain.Shared/DataDictionaryManagementDomainSharedModule.cs index af6ac4ba..d61879cb 100644 --- a/aspnet-core/modules/DataDictionaryManagement/src/Lion.AbpPro.DataDictionaryManagement.Domain.Shared/DataDictionaryManagementDomainSharedModule.cs +++ b/aspnet-core/modules/DataDictionaryManagement/src/Lion.AbpPro.DataDictionaryManagement.Domain.Shared/DataDictionaryManagementDomainSharedModule.cs @@ -23,14 +23,14 @@ namespace Lion.AbpPro.DataDictionaryManagement Configure(options => { options.Resources - .Add("en") + .Add(DataDictionaryManagementConsts.DefaultCultureName) .AddBaseTypes(typeof(AbpValidationResource)) .AddVirtualJson("/Localization/DataDictionaryManagement"); }); Configure(options => { - options.MapCodeNamespace("DataDictionaryManagement", typeof(DataDictionaryManagementResource)); + options.MapCodeNamespace(DataDictionaryManagementConsts.NameSpace, typeof(DataDictionaryManagementResource)); }); } } diff --git a/aspnet-core/modules/DataDictionaryManagement/src/Lion.AbpPro.DataDictionaryManagement.Domain.Shared/DataDictionaryManagementErrorCodes.cs b/aspnet-core/modules/DataDictionaryManagement/src/Lion.AbpPro.DataDictionaryManagement.Domain.Shared/DataDictionaryManagementErrorCodes.cs index d5dfaa24..d38c19c1 100644 --- a/aspnet-core/modules/DataDictionaryManagement/src/Lion.AbpPro.DataDictionaryManagement.Domain.Shared/DataDictionaryManagementErrorCodes.cs +++ b/aspnet-core/modules/DataDictionaryManagement/src/Lion.AbpPro.DataDictionaryManagement.Domain.Shared/DataDictionaryManagementErrorCodes.cs @@ -2,6 +2,9 @@ namespace Lion.AbpPro.DataDictionaryManagement { public static class DataDictionaryManagementErrorCodes { - //Add your business exception error codes here... + public const string DataDictionaryExist =DataDictionaryManagementConsts.NameSpace+ ":100001"; + public const string DataDictionaryNotExist =DataDictionaryManagementConsts.NameSpace+ ":100002"; + public const string DataDictionaryDetailExist =DataDictionaryManagementConsts.NameSpace+ ":100003"; + public const string DataDictionaryDetailNotExist =DataDictionaryManagementConsts.NameSpace+ ":100004"; } } diff --git a/aspnet-core/modules/DataDictionaryManagement/src/Lion.AbpPro.DataDictionaryManagement.Domain.Shared/Localization/DataDictionaryManagement/en.json b/aspnet-core/modules/DataDictionaryManagement/src/Lion.AbpPro.DataDictionaryManagement.Domain.Shared/Localization/DataDictionaryManagement/en.json index c2224548..bc54b8fc 100644 --- a/aspnet-core/modules/DataDictionaryManagement/src/Lion.AbpPro.DataDictionaryManagement.Domain.Shared/Localization/DataDictionaryManagement/en.json +++ b/aspnet-core/modules/DataDictionaryManagement/src/Lion.AbpPro.DataDictionaryManagement.Domain.Shared/Localization/DataDictionaryManagement/en.json @@ -6,6 +6,12 @@ "Permission:DataDictionaryManagement": "DataDictionaryManagement", "Permission:Create": "Create", "Permission:Update": "Update", - "Permission:Delete": "Delete" + "Permission:Delete": "Delete", + + "Lion.AbpPro.DataDictionaryManagement:100001": "DataDictionary Exist", + "Lion.AbpPro.DataDictionaryManagement:100002": "DataDictionary Not Exist", + "Lion.AbpPro.DataDictionaryManagement:100003": "DataDictionaryDetail Exist", + "Lion.AbpPro.DataDictionaryManagement:100004": "DataDictionaryDetail Not Exist" + } } \ No newline at end of file diff --git a/aspnet-core/modules/DataDictionaryManagement/src/Lion.AbpPro.DataDictionaryManagement.Domain.Shared/Localization/DataDictionaryManagement/zh-Hans.json b/aspnet-core/modules/DataDictionaryManagement/src/Lion.AbpPro.DataDictionaryManagement.Domain.Shared/Localization/DataDictionaryManagement/zh-Hans.json index f463a7e2..5037b4f5 100644 --- a/aspnet-core/modules/DataDictionaryManagement/src/Lion.AbpPro.DataDictionaryManagement.Domain.Shared/Localization/DataDictionaryManagement/zh-Hans.json +++ b/aspnet-core/modules/DataDictionaryManagement/src/Lion.AbpPro.DataDictionaryManagement.Domain.Shared/Localization/DataDictionaryManagement/zh-Hans.json @@ -6,6 +6,11 @@ "Permission:DataDictionaryManagement": "数据字典", "Permission:Create": "创建", "Permission:Update": "编辑", - "Permission:Delete": "删除" + "Permission:Delete": "删除", + + "Lion.AbpPro.DataDictionaryManagement:100001": "数据字典已存在", + "Lion.AbpPro.DataDictionaryManagement:100002": "数据字典不存在", + "Lion.AbpPro.DataDictionaryManagement:100003": "数据字典明细已存在", + "Lion.AbpPro.DataDictionaryManagement:100004": "数据字典明细不存在" } } \ No newline at end of file diff --git a/aspnet-core/modules/DataDictionaryManagement/src/Lion.AbpPro.DataDictionaryManagement.Domain/DataDictionaries/DataDictionaryManager.cs b/aspnet-core/modules/DataDictionaryManagement/src/Lion.AbpPro.DataDictionaryManagement.Domain/DataDictionaries/DataDictionaryManager.cs index 6f44c722..e9810dca 100644 --- a/aspnet-core/modules/DataDictionaryManagement/src/Lion.AbpPro.DataDictionaryManagement.Domain/DataDictionaries/DataDictionaryManager.cs +++ b/aspnet-core/modules/DataDictionaryManagement/src/Lion.AbpPro.DataDictionaryManagement.Domain/DataDictionaries/DataDictionaryManager.cs @@ -4,8 +4,8 @@ using System.Threading; using System.Threading.Tasks; using Lion.AbpPro.DataDictionaryManagement.DataDictionaries.Aggregates; using Lion.AbpPro.DataDictionaryManagement.DataDictionaries.Dto; +using Volo.Abp; using Volo.Abp.Caching; -using Volo.Abp.Domain.Services; namespace Lion.AbpPro.DataDictionaryManagement.DataDictionaries { @@ -22,22 +22,28 @@ namespace Lion.AbpPro.DataDictionaryManagement.DataDictionaries _cache = cache; } - - - + public async Task FindByIdAsync( Guid id, CancellationToken cancellationToken = default) { var cacheKey = DataDictionaryDto.CalculateCacheKey(id, null); - return await _cache.GetOrAddAsync(cacheKey, + return await _cache.GetOrAddAsync + ( + cacheKey, async () => { var entity = - await _dataDictionaryRepository.FindByIdAsync(id, true, - cancellationToken); + await _dataDictionaryRepository.FindByIdAsync + ( + id, + true, + cancellationToken + ); return ObjectMapper.Map(entity); - }, token: cancellationToken); + }, + token: cancellationToken + ); } public async Task FindByCodeAsync( @@ -45,14 +51,22 @@ namespace Lion.AbpPro.DataDictionaryManagement.DataDictionaries CancellationToken cancellationToken = default) { var cacheKey = DataDictionaryDto.CalculateCacheKey(null, code); - return await _cache.GetOrAddAsync(cacheKey, + return await _cache.GetOrAddAsync + ( + cacheKey, async () => { var entity = - await _dataDictionaryRepository.FindByCodeAsync(code, true, - cancellationToken); + await _dataDictionaryRepository.FindByCodeAsync + ( + code, + true, + cancellationToken + ); return ObjectMapper.Map(entity); - }, token: cancellationToken); + }, + token: cancellationToken + ); } @@ -62,10 +76,21 @@ namespace Lion.AbpPro.DataDictionaryManagement.DataDictionaries /// /// /// - public Task CreateAsync(string code, string displayText, string description) + public async Task CreateAsync(string code, string displayText, string description) { - var entity = new DataDictionary(GuidGenerator.Create(), code, displayText, description); - return _dataDictionaryRepository.InsertAsync(entity); + Check.NotNullOrWhiteSpace(code, nameof(code)); + var entity = await _dataDictionaryRepository.FindByCodeAsync(code); + if (entity != null) throw new DataDictionaryDomainException(DataDictionaryManagementErrorCodes.DataDictionaryExist); + + entity = new DataDictionary + ( + GuidGenerator.Create(), + code, + displayText, + description + ); + + return await _dataDictionaryRepository.InsertAsync(entity); } /// @@ -77,36 +102,47 @@ namespace Lion.AbpPro.DataDictionaryManagement.DataDictionaries /// /// /// - public async Task CreateDetailAsync(Guid dataDictionaryId, string code, + public async Task CreateDetailAsync( + Guid dataDictionaryId, + string code, string displayText, string description, int order) { var entity = await _dataDictionaryRepository.FindByIdAsync(dataDictionaryId); if (entity == null) - throw new DataDictionaryDomainException(message: "数据字典不存在"); + throw new DataDictionaryDomainException(DataDictionaryManagementErrorCodes.DataDictionaryNotExist); if (entity.Details.Any(e => e.Code == code.Trim())) { - throw new DataDictionaryDomainException(message: $"字典项{code}已存在"); + throw new DataDictionaryDomainException(DataDictionaryManagementErrorCodes.DataDictionaryDetailExist); } - entity.AddDetail(GuidGenerator.Create(), code, displayText, order, description); + entity.AddDetail + ( + GuidGenerator.Create(), + code, + displayText, + order, + description + ); return await _dataDictionaryRepository.UpdateAsync(entity); } /// /// 设置字典明细状态 /// - public async Task SetStatus(Guid dataDictionaryId, - Guid dataDictionayDetailId, bool isEnabled) + public async Task SetStatus( + Guid dataDictionaryId, + Guid dataDictionayDetailId, + bool isEnabled) { var entity = await _dataDictionaryRepository.FindByIdAsync(dataDictionaryId); if (entity == null) - throw new DataDictionaryDomainException(message: "数据字典不存在"); + throw new DataDictionaryDomainException(DataDictionaryManagementErrorCodes.DataDictionaryNotExist); var detail = entity.Details.FirstOrDefault(e => e.Id == dataDictionayDetailId); if (null == detail) { - throw new DataDictionaryDomainException(message: $"字典项不存在"); + throw new DataDictionaryDomainException(DataDictionaryManagementErrorCodes.DataDictionaryDetailExist); } detail.SetIsEnabled(isEnabled); @@ -125,14 +161,20 @@ namespace Lion.AbpPro.DataDictionaryManagement.DataDictionaries { var entity = await _dataDictionaryRepository.FindByIdAsync(dataDictionaryId); if (entity == null) - throw new DataDictionaryDomainException(message: "数据字典不存在"); + throw new DataDictionaryDomainException(DataDictionaryManagementErrorCodes.DataDictionaryNotExist); var detail = entity.Details.FirstOrDefault(e => e.Id == dataDictionayDetailId); if (null == detail) { - throw new DataDictionaryDomainException(message: $"字典项不存在"); + throw new DataDictionaryDomainException(DataDictionaryManagementErrorCodes.DataDictionaryDetailNotExist); } - detail.UpdateDetail(dataDictionayDetailId, displayText, description, order); + detail.UpdateDetail + ( + dataDictionayDetailId, + displayText, + description, + order + ); return await _dataDictionaryRepository.UpdateAsync(entity); } @@ -140,27 +182,29 @@ namespace Lion.AbpPro.DataDictionaryManagement.DataDictionaries { var entity = await _dataDictionaryRepository.FindByIdAsync(dataDictionaryId); if (entity == null) - throw new DataDictionaryDomainException(message: "数据字典不存在"); + throw new DataDictionaryDomainException(DataDictionaryManagementErrorCodes.DataDictionaryNotExist); var detail = entity.Details.FirstOrDefault(e => e.Id == dataDictionayDetailId); if (null == detail) { - throw new DataDictionaryDomainException(message: $"字典项不存在"); + throw new DataDictionaryDomainException(DataDictionaryManagementErrorCodes.DataDictionaryDetailNotExist); } entity.Details.Remove(detail); await _dataDictionaryRepository.UpdateAsync(entity); } - public async Task UpdateAsync(Guid dataDictionaryId, + + public async Task UpdateAsync( + Guid dataDictionaryId, string displayText, string description) { var entity = await _dataDictionaryRepository.FindByIdAsync(dataDictionaryId); if (entity == null) - throw new DataDictionaryDomainException(message: "数据字典不存在"); - entity.Update(dataDictionaryId,displayText,description); + throw new DataDictionaryDomainException(DataDictionaryManagementErrorCodes.DataDictionaryNotExist); + entity.Update(dataDictionaryId, displayText, description); return await _dataDictionaryRepository.UpdateAsync(entity); - } + /// /// 删除字典类型 /// @@ -170,13 +214,14 @@ namespace Lion.AbpPro.DataDictionaryManagement.DataDictionaries { var entity = await _dataDictionaryRepository.FindByIdAsync(id); if (entity == null) - throw new DataDictionaryDomainException(message: "数据字典不存在"); + throw new DataDictionaryDomainException(DataDictionaryManagementErrorCodes.DataDictionaryNotExist); var detail = entity.Details.FirstOrDefault(e => e.DataDictionaryId == id); - if (detail !=null ) + if (detail != null) { entity.Details.Remove(detail); await _dataDictionaryRepository.UpdateAsync(entity); } + await _dataDictionaryRepository.DeleteAsync(id); } } diff --git a/aspnet-core/modules/FileManagement/host/Lion.AbpPro.FileManagement.HttpApi.Host/appsettings.json b/aspnet-core/modules/FileManagement/host/Lion.AbpPro.FileManagement.HttpApi.Host/appsettings.json index 5b227b43..8b9c4f55 100644 --- a/aspnet-core/modules/FileManagement/host/Lion.AbpPro.FileManagement.HttpApi.Host/appsettings.json +++ b/aspnet-core/modules/FileManagement/host/Lion.AbpPro.FileManagement.HttpApi.Host/appsettings.json @@ -18,9 +18,4 @@ "RoleArn": "acs:ram::1846393972471789:role/ramosstest" } } -} - -//用户登录名称 lion.abp@1846393972471789.onaliyun.com -//AccessKey ID LTAI5tLkt3vvScGPVZ5qKJDc -//AccessKey Secret BixV8vP5uPrbsdwjYzzsEXOPjkxPST -//acs:ram::1846393972471789:role/ramosstest \ No newline at end of file +} \ No newline at end of file diff --git a/aspnet-core/modules/NotificationManagement/src/Lion.AbpPro.NotificationManagement.Application/Notifications/NotificationAppService.cs b/aspnet-core/modules/NotificationManagement/src/Lion.AbpPro.NotificationManagement.Application/Notifications/NotificationAppService.cs index 38336347..c289bb57 100644 --- a/aspnet-core/modules/NotificationManagement/src/Lion.AbpPro.NotificationManagement.Application/Notifications/NotificationAppService.cs +++ b/aspnet-core/modules/NotificationManagement/src/Lion.AbpPro.NotificationManagement.Application/Notifications/NotificationAppService.cs @@ -55,7 +55,7 @@ namespace Lion.AbpPro.NotificationManagement.Notifications await SendMessageToAllClientAsync(new SendNotificationDto(title, content, messageType)); break; default: - throw new UserFriendlyException("未知的消息类型"); + throw new BusinessException(NotificationManagementErrorCodes.MessageTypeUnknown); } } diff --git a/aspnet-core/modules/NotificationManagement/src/Lion.AbpPro.NotificationManagement.Domain.Shared/Localization/NotificationManagement/en.json b/aspnet-core/modules/NotificationManagement/src/Lion.AbpPro.NotificationManagement.Domain.Shared/Localization/NotificationManagement/en.json index f39af7fc..04b81cc4 100644 --- a/aspnet-core/modules/NotificationManagement/src/Lion.AbpPro.NotificationManagement.Domain.Shared/Localization/NotificationManagement/en.json +++ b/aspnet-core/modules/NotificationManagement/src/Lion.AbpPro.NotificationManagement.Domain.Shared/Localization/NotificationManagement/en.json @@ -2,6 +2,10 @@ "culture": "en", "texts": { "ManageYourProfile": "Manage your profile", - "SamplePageMessage": "A sample page for the NotificationManagement module" + "SamplePageMessage": "A sample page for the NotificationManagement module", + "Lion.AbpPro.NotificationManagement:100001": "ReceiverNotNull", + "Lion.AbpPro.NotificationManagement:100002": "MessageNotExist", + "Lion.AbpPro.NotificationManagement:100003": "MessageTypeUnknown", + "Lion.AbpPro.NotificationManagement:100004": "UserUnSubscription" } } \ No newline at end of file diff --git a/aspnet-core/modules/NotificationManagement/src/Lion.AbpPro.NotificationManagement.Domain.Shared/Localization/NotificationManagement/zh-Hans.json b/aspnet-core/modules/NotificationManagement/src/Lion.AbpPro.NotificationManagement.Domain.Shared/Localization/NotificationManagement/zh-Hans.json index 01c3e18d..9ceaf7fb 100644 --- a/aspnet-core/modules/NotificationManagement/src/Lion.AbpPro.NotificationManagement.Domain.Shared/Localization/NotificationManagement/zh-Hans.json +++ b/aspnet-core/modules/NotificationManagement/src/Lion.AbpPro.NotificationManagement.Domain.Shared/Localization/NotificationManagement/zh-Hans.json @@ -2,6 +2,11 @@ "culture": "zh-Hans", "texts": { "ManageYourProfile": "管理个人资料", - "SamplePageMessage": "NotificationManagement模块的示例页面" + "SamplePageMessage": "NotificationManagement模块的示例页面", + + "Lion.AbpPro.NotificationManagement:100001": "接收人不能为空", + "Lion.AbpPro.NotificationManagement:100002": "消息不存在", + "Lion.AbpPro.NotificationManagement:100003": "未知的消息类型", + "Lion.AbpPro.NotificationManagement:100004": "当前用户未订阅消息" } } \ No newline at end of file diff --git a/aspnet-core/modules/NotificationManagement/src/Lion.AbpPro.NotificationManagement.Domain.Shared/NotificationManagementConsts.cs b/aspnet-core/modules/NotificationManagement/src/Lion.AbpPro.NotificationManagement.Domain.Shared/NotificationManagementConsts.cs new file mode 100644 index 00000000..27c6d065 --- /dev/null +++ b/aspnet-core/modules/NotificationManagement/src/Lion.AbpPro.NotificationManagement.Domain.Shared/NotificationManagementConsts.cs @@ -0,0 +1,9 @@ +namespace Lion.AbpPro.NotificationManagement; + +public class NotificationManagementConsts +{ + /// 名称空间 + public const string NameSpace = "Lion.AbpPro.NotificationManagementConsts"; + /// 默认语言 + public const string DefaultCultureName = "zh-Hans"; +} \ No newline at end of file diff --git a/aspnet-core/modules/NotificationManagement/src/Lion.AbpPro.NotificationManagement.Domain.Shared/NotificationManagementDomainSharedModule.cs b/aspnet-core/modules/NotificationManagement/src/Lion.AbpPro.NotificationManagement.Domain.Shared/NotificationManagementDomainSharedModule.cs index 2dd1958b..1fc8fba3 100644 --- a/aspnet-core/modules/NotificationManagement/src/Lion.AbpPro.NotificationManagement.Domain.Shared/NotificationManagementDomainSharedModule.cs +++ b/aspnet-core/modules/NotificationManagement/src/Lion.AbpPro.NotificationManagement.Domain.Shared/NotificationManagementDomainSharedModule.cs @@ -23,14 +23,14 @@ namespace Lion.AbpPro.NotificationManagement Configure(options => { options.Resources - .Add("en") + .Add(NotificationManagementConsts.DefaultCultureName) .AddBaseTypes(typeof(AbpValidationResource)) .AddVirtualJson("/Localization/NotificationManagement"); }); Configure(options => { - options.MapCodeNamespace("NotificationManagement", typeof(NotificationManagementResource)); + options.MapCodeNamespace(NotificationManagementConsts.NameSpace, typeof(NotificationManagementResource)); }); } } diff --git a/aspnet-core/modules/NotificationManagement/src/Lion.AbpPro.NotificationManagement.Domain.Shared/NotificationManagementErrorCodes.cs b/aspnet-core/modules/NotificationManagement/src/Lion.AbpPro.NotificationManagement.Domain.Shared/NotificationManagementErrorCodes.cs index e70b6c6d..0ac823e0 100644 --- a/aspnet-core/modules/NotificationManagement/src/Lion.AbpPro.NotificationManagement.Domain.Shared/NotificationManagementErrorCodes.cs +++ b/aspnet-core/modules/NotificationManagement/src/Lion.AbpPro.NotificationManagement.Domain.Shared/NotificationManagementErrorCodes.cs @@ -2,6 +2,9 @@ namespace Lion.AbpPro.NotificationManagement { public static class NotificationManagementErrorCodes { - //Add your business exception error codes here... + public const string ReceiverNotNull =NotificationManagementConsts.NameSpace+ ":100001"; + public const string MessageNotExist =NotificationManagementConsts.NameSpace+ ":100002"; + public const string MessageTypeUnknown =NotificationManagementConsts.NameSpace+ ":100003"; + public const string UserUnSubscription =NotificationManagementConsts.NameSpace+ ":100004"; } } diff --git a/aspnet-core/modules/NotificationManagement/src/Lion.AbpPro.NotificationManagement.Domain/NotificationManagementDomainException.cs b/aspnet-core/modules/NotificationManagement/src/Lion.AbpPro.NotificationManagement.Domain/NotificationManagementDomainException.cs index 4b4fd22f..671ad3ea 100644 --- a/aspnet-core/modules/NotificationManagement/src/Lion.AbpPro.NotificationManagement.Domain/NotificationManagementDomainException.cs +++ b/aspnet-core/modules/NotificationManagement/src/Lion.AbpPro.NotificationManagement.Domain/NotificationManagementDomainException.cs @@ -5,16 +5,17 @@ using Volo.Abp; namespace Lion.AbpPro.NotificationManagement { - public class NotificationManagementDomainException : UserFriendlyException + public class NotificationManagementDomainException : BusinessException { - public NotificationManagementDomainException(string message, string code = null, string details = null, - Exception innerException = null, LogLevel logLevel = LogLevel.Warning) : base(message, code, details, - innerException, logLevel) + public NotificationManagementDomainException(string code = null, string message = null, string details = null, Exception innerException = null, + LogLevel logLevel = LogLevel.Warning) : base(code, message, details, + innerException, + logLevel + ) { } - public NotificationManagementDomainException(SerializationInfo serializationInfo, StreamingContext context) : - base(serializationInfo, context) + public NotificationManagementDomainException(SerializationInfo serializationInfo, StreamingContext context) : base(serializationInfo, context) { } } diff --git a/aspnet-core/modules/NotificationManagement/src/Lion.AbpPro.NotificationManagement.Domain/Notifications/NotificationManager.cs b/aspnet-core/modules/NotificationManagement/src/Lion.AbpPro.NotificationManagement.Domain/Notifications/NotificationManager.cs index 4239bff7..22a10b79 100644 --- a/aspnet-core/modules/NotificationManagement/src/Lion.AbpPro.NotificationManagement.Domain/Notifications/NotificationManager.cs +++ b/aspnet-core/modules/NotificationManagement/src/Lion.AbpPro.NotificationManagement.Domain/Notifications/NotificationManager.cs @@ -32,7 +32,7 @@ namespace Lion.AbpPro.NotificationManagement.Notifications { if (receiveIds is {Count: 0}) { - throw new NotificationManagementDomainException("消息接收人不能为空"); + throw new NotificationManagementDomainException(NotificationManagementErrorCodes.ReceiverNotNull); } var senderId = Guid.Empty; @@ -113,7 +113,7 @@ namespace Lion.AbpPro.NotificationManagement.Notifications public async Task SetReadAsync(Guid id, Guid receiveId) { var notification = await _notificationRepository.FindByIdAsync(id); - if (notification == null) throw new NotificationManagementDomainException(message: "消息不存在"); + if (notification == null) throw new NotificationManagementDomainException(NotificationManagementErrorCodes.MessageNotExist); if (notification.MessageType == MessageType.BroadCast) { // 如果类型是广播消息,用户设置为已读,在插入一条数据 @@ -124,7 +124,7 @@ namespace Lion.AbpPro.NotificationManagement.Notifications var notificationSubscription = notification.NotificationSubscriptions.FirstOrDefault(e => e.ReceiveId == receiveId); if (notificationSubscription == null) - throw new NotificationManagementDomainException(message: "当前用户未订阅该消息"); + throw new NotificationManagementDomainException(NotificationManagementErrorCodes.UserUnSubscription); notificationSubscription.SetRead(); } diff --git a/aspnet-core/services/host/Lion.AbpPro.HttpApi.Host/AbpProHttpApiHostModule.cs b/aspnet-core/services/host/Lion.AbpPro.HttpApi.Host/AbpProHttpApiHostModule.cs index e3259b75..c24cef6d 100644 --- a/aspnet-core/services/host/Lion.AbpPro.HttpApi.Host/AbpProHttpApiHostModule.cs +++ b/aspnet-core/services/host/Lion.AbpPro.HttpApi.Host/AbpProHttpApiHostModule.cs @@ -135,9 +135,6 @@ namespace Lion.AbpPro /// private void ConfigureAbpExceptions(ServiceConfigurationContext context) { - //开启后通过ErrorCode抛本地化异常,message不会显示本地化词条 - var SendExceptionsDetails = context.Services.GetHostingEnvironment().IsDevelopment(); - context.Services.Configure(options => { options.SendExceptionsDetailsToClients = SendExceptionsDetails; }); context.Services.AddMvc(options => { options.Filters.Add(typeof(ResultExceptionFilter)); }); } 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..bb8f32cf 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", @@ -12,7 +13,7 @@ "Hangfire": "Information", "DotNetCore.CAP": "Information", "Serilog.AspNetCore": "Information", - "Microsoft.EntityFrameworkCore": "Information" + "Microsoft.EntityFrameworkCore": "Warning" } }, "WriteTo": [ @@ -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=localhost;Port=3306;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.Contracts/Permissions/AbpProPermissionDefinitionProvider.cs b/aspnet-core/services/src/Lion.AbpPro.Application.Contracts/Permissions/AbpProPermissionDefinitionProvider.cs index 756d17f6..a40863bc 100644 --- a/aspnet-core/services/src/Lion.AbpPro.Application.Contracts/Permissions/AbpProPermissionDefinitionProvider.cs +++ b/aspnet-core/services/src/Lion.AbpPro.Application.Contracts/Permissions/AbpProPermissionDefinitionProvider.cs @@ -19,55 +19,141 @@ namespace Lion.AbpPro.Permissions abpIdentityGroup.AddPermission(AbpProPermissions.SystemManagement.AuditLog, L("Permission:AuditLogManagement")); var esManagement = abpIdentityGroup.AddPermission(AbpProPermissions.SystemManagement.ES, L("Permission:ESManagement")); var settingManagement = abpIdentityGroup.AddPermission(AbpProPermissions.SystemManagement.Setting, L("Permission:SettingManagement")); + var organizationUnitManagement = abpIdentityGroup.AddPermission(AbpProPermissions.SystemManagement.OrganizationUnit, L("Permission:OrganizationUnitManagement")); + organizationUnitManagement.AddChild + ( + AbpProPermissions.SystemManagement.OrganizationUnitManagement.Create, + L("Permission:Create") + ); + organizationUnitManagement.AddChild + ( + AbpProPermissions.SystemManagement.OrganizationUnitManagement.Update, + L("Permission:Update") + ); + organizationUnitManagement.AddChild + ( + AbpProPermissions.SystemManagement.OrganizationUnitManagement.Delete, + L("Permission:Delete") + ); #region IdentityServer // multiTenancySide: MultiTenancySides.Host 只有host租户才有权限 var identityServerManagementGroup = - context.AddGroup(AbpProPermissions.IdentityServer.IdentityServerManagement, L("Permission:IdentityServerManagement"), - multiTenancySide: MultiTenancySides.Host); + context.AddGroup + ( + AbpProPermissions.IdentityServer.IdentityServerManagement, + L("Permission:IdentityServerManagement"), + multiTenancySide: MultiTenancySides.Host + ); - var clientManagment = identityServerManagementGroup.AddPermission(AbpProPermissions.IdentityServer.Client.Default, - L("Permission:IdentityServerManagement:Client"),multiTenancySide: MultiTenancySides.Host); - clientManagment.AddChild(AbpProPermissions.IdentityServer.Client.Create, - L("Permission:Create"),multiTenancySide: MultiTenancySides.Host); - clientManagment.AddChild(AbpProPermissions.IdentityServer.Client.Update, - L("Permission:Update"),multiTenancySide: MultiTenancySides.Host); - clientManagment.AddChild(AbpProPermissions.IdentityServer.Client.Delete, - L("Permission:Delete"),multiTenancySide: MultiTenancySides.Host); - clientManagment.AddChild(AbpProPermissions.IdentityServer.Client.Enable, - L("Permission:Enable"),multiTenancySide: MultiTenancySides.Host); + var clientManagment = identityServerManagementGroup.AddPermission + ( + AbpProPermissions.IdentityServer.Client.Default, + L("Permission:IdentityServerManagement:Client"), + multiTenancySide: MultiTenancySides.Host + ); + clientManagment.AddChild + ( + AbpProPermissions.IdentityServer.Client.Create, + L("Permission:Create"), + multiTenancySide: MultiTenancySides.Host + ); + clientManagment.AddChild + ( + AbpProPermissions.IdentityServer.Client.Update, + L("Permission:Update"), + multiTenancySide: MultiTenancySides.Host + ); + clientManagment.AddChild + ( + AbpProPermissions.IdentityServer.Client.Delete, + L("Permission:Delete"), + multiTenancySide: MultiTenancySides.Host + ); + clientManagment.AddChild + ( + AbpProPermissions.IdentityServer.Client.Enable, + L("Permission:Enable"), + multiTenancySide: MultiTenancySides.Host + ); - var apiResourceManagment = identityServerManagementGroup.AddPermission( + var apiResourceManagment = identityServerManagementGroup.AddPermission + ( AbpProPermissions.IdentityServer.ApiResource.Default, - L("Permission:IdentityServerManagement:ApiResource"),multiTenancySide: MultiTenancySides.Host); - apiResourceManagment.AddChild(AbpProPermissions.IdentityServer.ApiResource.Create, - L("Permission:Create"),multiTenancySide: MultiTenancySides.Host); - apiResourceManagment.AddChild(AbpProPermissions.IdentityServer.ApiResource.Update, - L("Permission:Update"),multiTenancySide: MultiTenancySides.Host); - apiResourceManagment.AddChild(AbpProPermissions.IdentityServer.ApiResource.Delete, - L("Permission:Delete"),multiTenancySide: MultiTenancySides.Host); + L("Permission:IdentityServerManagement:ApiResource"), + multiTenancySide: MultiTenancySides.Host + ); + apiResourceManagment.AddChild + ( + AbpProPermissions.IdentityServer.ApiResource.Create, + L("Permission:Create"), + multiTenancySide: MultiTenancySides.Host + ); + apiResourceManagment.AddChild + ( + AbpProPermissions.IdentityServer.ApiResource.Update, + L("Permission:Update"), + multiTenancySide: MultiTenancySides.Host + ); + apiResourceManagment.AddChild + ( + AbpProPermissions.IdentityServer.ApiResource.Delete, + L("Permission:Delete"), + multiTenancySide: MultiTenancySides.Host + ); - var apiScopeManagment = identityServerManagementGroup.AddPermission(AbpProPermissions.IdentityServer.ApiScope.Default, - L("Permission:IdentityServerManagement:ApiScope"),multiTenancySide: MultiTenancySides.Host); - apiScopeManagment.AddChild(AbpProPermissions.IdentityServer.ApiScope.Create, - L("Permission:Create"),multiTenancySide: MultiTenancySides.Host); - apiScopeManagment.AddChild(AbpProPermissions.IdentityServer.ApiScope.Update, - L("Permission:Update"),multiTenancySide: MultiTenancySides.Host); - apiScopeManagment.AddChild(AbpProPermissions.IdentityServer.ApiScope.Delete, - L("Permission:Delete"),multiTenancySide: MultiTenancySides.Host); + var apiScopeManagment = identityServerManagementGroup.AddPermission + ( + AbpProPermissions.IdentityServer.ApiScope.Default, + L("Permission:IdentityServerManagement:ApiScope"), + multiTenancySide: MultiTenancySides.Host + ); + apiScopeManagment.AddChild + ( + AbpProPermissions.IdentityServer.ApiScope.Create, + L("Permission:Create"), + multiTenancySide: MultiTenancySides.Host + ); + apiScopeManagment.AddChild + ( + AbpProPermissions.IdentityServer.ApiScope.Update, + L("Permission:Update"), + multiTenancySide: MultiTenancySides.Host + ); + apiScopeManagment.AddChild + ( + AbpProPermissions.IdentityServer.ApiScope.Delete, + L("Permission:Delete"), + multiTenancySide: MultiTenancySides.Host + ); - var identityResourcesManagment = identityServerManagementGroup.AddPermission( + var identityResourcesManagment = identityServerManagementGroup.AddPermission + ( AbpProPermissions.IdentityServer.IdentityResources.Default, - L("Permission:IdentityServerManagement:IdentityResources"),multiTenancySide: MultiTenancySides.Host); - identityResourcesManagment.AddChild(AbpProPermissions.IdentityServer.IdentityResources.Create, - L("Permission:Create"),multiTenancySide: MultiTenancySides.Host); - identityResourcesManagment.AddChild(AbpProPermissions.IdentityServer.IdentityResources.Update, - L("Permission:Update"),multiTenancySide: MultiTenancySides.Host); - identityResourcesManagment.AddChild(AbpProPermissions.IdentityServer.IdentityResources.Delete, - L("Permission:Delete"),multiTenancySide: MultiTenancySides.Host); + L("Permission:IdentityServerManagement:IdentityResources"), + multiTenancySide: MultiTenancySides.Host + ); + identityResourcesManagment.AddChild + ( + AbpProPermissions.IdentityServer.IdentityResources.Create, + L("Permission:Create"), + multiTenancySide: MultiTenancySides.Host + ); + identityResourcesManagment.AddChild + ( + AbpProPermissions.IdentityServer.IdentityResources.Update, + L("Permission:Update"), + multiTenancySide: MultiTenancySides.Host + ); + identityResourcesManagment.AddChild + ( + AbpProPermissions.IdentityServer.IdentityResources.Delete, + L("Permission:Delete"), + multiTenancySide: MultiTenancySides.Host + ); #endregion } diff --git a/aspnet-core/services/src/Lion.AbpPro.Application.Contracts/Permissions/AbpProPermissions.cs b/aspnet-core/services/src/Lion.AbpPro.Application.Contracts/Permissions/AbpProPermissions.cs index 7ef55704..2c873c8a 100644 --- a/aspnet-core/services/src/Lion.AbpPro.Application.Contracts/Permissions/AbpProPermissions.cs +++ b/aspnet-core/services/src/Lion.AbpPro.Application.Contracts/Permissions/AbpProPermissions.cs @@ -15,6 +15,14 @@ namespace Lion.AbpPro.Permissions public const string AuditLog = Default + ".AuditLog"; public const string ES = Default + ".ES"; public const string Setting = Default + ".Setting"; + public const string OrganizationUnit = Default + ".OrganizationUnitManagement"; + public static class OrganizationUnitManagement + { + public const string Default = SystemManagement.Default + ".OrganizationUnitManagement"; + public const string Create = Default + ".Create"; + public const string Update = Default + ".Update"; + public const string Delete = Default + ".Delete"; + } } 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/ElasticSearchs/LionAbpProLogAppService.cs b/aspnet-core/services/src/Lion.AbpPro.Application/ElasticSearchs/LionAbpProLogAppService.cs index 8d143f51..08b44e16 100644 --- a/aspnet-core/services/src/Lion.AbpPro.Application/ElasticSearchs/LionAbpProLogAppService.cs +++ b/aspnet-core/services/src/Lion.AbpPro.Application/ElasticSearchs/LionAbpProLogAppService.cs @@ -5,6 +5,7 @@ using System.Threading.Tasks; using Lion.AbpPro.ElasticSearchs.Dto; using Lion.AbpPro.ElasticSearchs.Providers; using Lion.AbpPro.Extension.Customs.Dtos; +using Lion.AbpPro.Extension.System; using Lion.AbpPro.Permissions; using Microsoft.AspNetCore.Authorization; using Microsoft.Extensions.Configuration; @@ -13,11 +14,11 @@ using Nest; namespace Lion.AbpPro.ElasticSearchs { [Authorize(Policy = AbpProPermissions.SystemManagement.ES)] - public class LionAbpProLogAppService : ElasticsearchBasicService, - ILionAbpProLogAppService + public class LionAbpProLogAppService : ElasticsearchBasicService,ILionAbpProLogAppService { private readonly IConfiguration _configuration; - + // 时区 + private const string TimeZone = "Asia/Shanghai"; public LionAbpProLogAppService( IElasticsearchProvider elasticsearchProvider, IConfiguration configuration) : base(elasticsearchProvider) @@ -25,49 +26,54 @@ namespace Lion.AbpPro.ElasticSearchs _configuration = configuration; } - public async Task> PaingAsync( - PagingElasticSearchLogInput input) + public async Task> PaingAsync(PagingElasticSearchLogInput input) { - var IndexName = - _configuration.GetValue("ElasticSearch:SearchIndexFormat"); + var IndexName = _configuration.GetValue("ElasticSearch:SearchIndexFormat"); // 默认查询当天 - input.StartCreationTime = input.StartCreationTime?.AddMilliseconds(-1) ?? - DateTime.Now.Date.AddMilliseconds(-1); - input.EndCreationTime = - input.EndCreationTime?.AddDays(1).AddMilliseconds(-1) ?? - DateTime.Now.Date.AddDays(1).AddMilliseconds(-1); - var mustFilters = - new List, - QueryContainer>> - { - t => t.DateRange(f => - f.Field(fd => fd.CreationTime).TimeZone("Asia/Shanghai") - .GreaterThanOrEquals(input.StartCreationTime.Value)), - t => t.DateRange( - f => f.Field(fd => fd.CreationTime).TimeZone("Asia/Shanghai") - .LessThanOrEquals(input.EndCreationTime.Value)) - }; + input.StartCreationTime = input.StartCreationTime?.AddMilliseconds(-1) ??DateTime.Now.Date.AddMilliseconds(-1); + input.EndCreationTime =input.EndCreationTime?.AddDays(1).AddMilliseconds(-1) ??DateTime.Now.Date.AddDays(1).AddMilliseconds(-1); + var mustFilters = new List, QueryContainer>>(); + if (input.StartCreationTime.HasValue) + { + input.StartCreationTime = input.StartCreationTime.ToCurrentDateMaxDateTime(); + mustFilters.Add(e => e.DateRange(f => f.Field(fd => fd.CreationTime).TimeZone(TimeZone).GreaterThanOrEquals(input.StartCreationTime))); + } + + if (input.EndCreationTime.HasValue) + { + input.EndCreationTime = input.EndCreationTime.ToNextSecondDateTime(); + mustFilters.Add(e => e.DateRange(f => f.Field(fd => fd.CreationTime).TimeZone(TimeZone).LessThanOrEquals(input.EndCreationTime))); + } if (!string.IsNullOrWhiteSpace(input.Filter)) { - mustFilters.Add(t => - t.MatchPhrase(f => f.Field(fd => fd.Message).Query(input.Filter.Trim()))); + mustFilters.Add + ( + t =>t.MatchPhrase(f => f.Field(fd => fd.Message).Query(input.Filter.Trim())) + ); } - var result = await Client.SearchAsync(e => e - .Index(IndexName) - .From(input.SkipCount) - .Size(input.PageSize) - .Sort(s => s.Descending(sd => sd.CreationTime)) - .Query(q => q.Bool(qb => qb.Filter(mustFilters)))); + var result = await Client.SearchAsync + ( + e => e + .Index(IndexName) + .From(input.SkipCount) + .Size(input.PageSize) + .Sort(s => s.Descending(sd => sd.CreationTime)) + .Query(q => q.Bool(qb => qb.Filter(mustFilters))) + ); if (result.HitsMetadata != null) { - return new CustomePagedResultDto( + return new CustomePagedResultDto + ( result.HitsMetadata.Total.Value, ObjectMapper - .Map, List>( - result.Documents.ToList())); + .Map, List> + ( + result.Documents.ToList() + ) + ); } return null; 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..56f4bc33 --- /dev/null +++ b/aspnet-core/services/src/Lion.AbpPro.Application/OrganizationUnits/OrganizationUnitAppService.cs @@ -0,0 +1,210 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Threading.Tasks; +using Lion.AbpPro.Extension.Customs.Dtos; +using Lion.AbpPro.OrganizationUnits.Dto; +using Lion.AbpPro.Permissions; +using Microsoft.AspNetCore.Authorization; +using Volo.Abp; +using Volo.Abp.Application.Dtos; +using Volo.Abp.Identity; + +namespace Lion.AbpPro.OrganizationUnits; + +[Authorize(AbpProPermissions.SystemManagement.OrganizationUnitManagement.Default)] +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); + } + + [Authorize(AbpProPermissions.SystemManagement.OrganizationUnitManagement.Create)] + public async Task CreateAsync(CreateOrganizationUnitInput input) + { + var entity = new OrganizationUnit + ( + GuidGenerator.Create(), + input.DisplayName, + input.ParentId, + CurrentTenant.Id + ); + await _organizationUnitManager.CreateAsync(entity); + } + + [Authorize(AbpProPermissions.SystemManagement.OrganizationUnitManagement.Delete)] + public Task DeleteAsync(IdInput input) + { + return _organizationUnitManager.DeleteAsync(input.Id); + } + + [Authorize(AbpProPermissions.SystemManagement.OrganizationUnitManagement.Update)] + public async Task UpdateAsync(UpdateOrganizationUnitInput input) + { + var entity = await _organizationUnitRepository.FindAsync(input.Id); + if (entity != null) + { + entity.DisplayName = input.DisplayName; + await _organizationUnitManager.UpdateAsync(entity); + } + } + + [Authorize(AbpProPermissions.SystemManagement.OrganizationUnitManagement.Create)] + public async Task AddRoleToOrganizationUnitAsync(AddRoleToOrganizationUnitInput input) + { + foreach (var roleId in input.RoleId) + { + await _organizationUnitManager.AddRoleToOrganizationUnitAsync(roleId, input.OrganizationUnitId); + } + } + + [Authorize(AbpProPermissions.SystemManagement.OrganizationUnitManagement.Delete)] + public async Task RemoveRoleFromOrganizationUnitAsync(RemoveRoleToOrganizationUnitInput input) + { + await _organizationUnitManager.RemoveRoleFromOrganizationUnitAsync(input.RoleId, input.OrganizationUnitId); + } + + [Authorize(AbpProPermissions.SystemManagement.OrganizationUnitManagement.Create)] + public async Task AddUserToOrganizationUnitAsync(AddUserToOrganizationUnitInput input) + { + foreach (var userId in input.UserId) + { + await _identityUserManager.AddToOrganizationUnitAsync(userId, input.OrganizationUnitId); + } + } + + [Authorize(AbpProPermissions.SystemManagement.OrganizationUnitManagement.Delete)] + 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 BusinessException(AbpProDomainErrorCodes.OrganizationUnitNotExist); + + 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 BusinessException(AbpProDomainErrorCodes.OrganizationUnitNotExist); + 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 BusinessException(AbpProDomainErrorCodes.OrganizationUnitNotExist); + + 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 BusinessException(AbpProDomainErrorCodes.OrganizationUnitNotExist); + 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..d7c448aa 100644 --- a/aspnet-core/services/src/Lion.AbpPro.Application/Users/AccountAppService.cs +++ b/aspnet-core/services/src/Lion.AbpPro.Application/Users/AccountAppService.cs @@ -10,10 +10,12 @@ using Lion.AbpPro.ConfigurationOptions; using Lion.AbpPro.Users.Dtos; using IdentityModel; using Lion.AbpPro.Extension.Customs.Http; +using Lion.AbpPro.NotificationManagement.Notifications; using Microsoft.Extensions.Configuration; using Microsoft.Extensions.Options; using Microsoft.IdentityModel.Tokens; using Volo.Abp; +using Volo.Abp.Authorization; using Volo.Abp.Identity; using Volo.Abp.Security.Claims; @@ -27,9 +29,8 @@ 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( IdentityUserManager userManager, IOptionsSnapshot jwtOptions, @@ -52,12 +53,12 @@ namespace Lion.AbpPro.Users var result = await _signInManager.PasswordSignInAsync(input.Name, input.Password, false, true); if (result.IsNotAllowed) { - throw new UserFriendlyException("当前用户已锁定"); + throw new BusinessException(AbpProDomainErrorCodes.UserLockedOut); } if (!result.Succeeded) { - throw new UserFriendlyException("用户名或者密码错误"); + throw new BusinessException(AbpProDomainErrorCodes.UserOrPasswordMismatch); } var user = await _userManager.FindByNameAsync(input.Name); @@ -77,7 +78,7 @@ namespace Lion.AbpPro.Users var user = await _userManager.FindByNameAsync(response.name); if (!user.IsActive) { - throw new UserFriendlyException("当前用户已锁定"); + throw new BusinessException(AbpProDomainErrorCodes.UserLockedOut); } return await BuildResult(user); @@ -116,7 +117,7 @@ namespace Lion.AbpPro.Users { var result = new LoginOutput(); var roles = await _identityRoleRepository.GetListAsync(e => e.IsDefault); - if (roles == null || roles.Count == 0) throw new UserFriendlyException("系统未配置默认角色"); + if (roles == null || roles.Count == 0) throw new AbpAuthorizationException(); var userId = GuidGenerator.Create(); var user = new IdentityUser(userId, userName, email) @@ -139,9 +140,9 @@ namespace Lion.AbpPro.Users private async Task BuildResult(IdentityUser user) { - if (!user.IsActive) throw new UserFriendlyException("当前用户已被锁定"); + if (!user.IsActive) throw new BusinessException(AbpProDomainErrorCodes.UserLockedOut); var roles = await _userManager.GetRolesAsync(user); - if (roles == null || roles.Count == 0) throw new UserFriendlyException("当前用户未分配角色"); + if (roles == null || roles.Count == 0) throw new AbpAuthorizationException(); var token = GenerateJwt(user.Id, user.UserName, user.Name, user.Email, user.TenantId.ToString(), roles.ToList()); var loginOutput = ObjectMapper.Map(user); diff --git a/aspnet-core/services/src/Lion.AbpPro.Application/Users/UserAppService.cs b/aspnet-core/services/src/Lion.AbpPro.Application/Users/UserAppService.cs index 3125eb4f..bcee144c 100644 --- a/aspnet-core/services/src/Lion.AbpPro.Application/Users/UserAppService.cs +++ b/aspnet-core/services/src/Lion.AbpPro.Application/Users/UserAppService.cs @@ -4,6 +4,7 @@ using System.Linq; using System.Threading.Tasks; using Lion.AbpPro.Users.Dtos; using Lion.AbpPro.Extension.Customs.Dtos; +using Lion.AbpPro.NotificationManagement.Notifications; using Lion.AbpPro.Permissions; using Magicodes.ExporterAndImporter.Excel; using Magicodes.ExporterAndImporter.Excel.AspNetCore; @@ -27,13 +28,13 @@ namespace Lion.AbpPro.Users private readonly IIdentityUserRepository _identityUserRepository; private readonly IExcelExporter _excelExporter; private readonly IOptions _options; - public UserAppService( IIdentityUserAppService identityUserAppService, IdentityUserManager userManager, IIdentityUserRepository userRepository, IExcelExporter excelExporter, - IOptions options) + IOptions options, + NotificationManager notificationManager) { _identityUserAppService = identityUserAppService; _userManager = userManager; diff --git a/aspnet-core/services/src/Lion.AbpPro.DbMigrator/DbMigratorHostedService.cs b/aspnet-core/services/src/Lion.AbpPro.DbMigrator/DbMigratorHostedService.cs index 38f9c105..689ff0e0 100644 --- a/aspnet-core/services/src/Lion.AbpPro.DbMigrator/DbMigratorHostedService.cs +++ b/aspnet-core/services/src/Lion.AbpPro.DbMigrator/DbMigratorHostedService.cs @@ -1,8 +1,10 @@ +using System; using System.Threading; 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 +13,31 @@ namespace Lion.AbpPro.DbMigrator public class DbMigratorHostedService : IHostedService { private readonly IHostApplicationLifetime _hostApplicationLifetime; - - public DbMigratorHostedService(IHostApplicationLifetime hostApplicationLifetime) + private readonly IConfiguration _configuration; + public DbMigratorHostedService(IHostApplicationLifetime hostApplicationLifetime, + IConfiguration configuration) { _hostApplicationLifetime = hostApplicationLifetime; + _configuration = configuration; } 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.Services.ReplaceConfiguration(_configuration); + options.UseAutofac(); + options.Services.AddLogging(c => c.AddSerilog()); + })) { - application.Initialize(); + 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..2d02cec6 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 @@ -7,17 +7,6 @@ net6.0 - - - - - - - PreserveNewest - Always - - - @@ -37,6 +26,9 @@ + + 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..d150c21b 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; diff --git a/aspnet-core/services/src/Lion.AbpPro.DbMigrator/appsettings.json b/aspnet-core/services/src/Lion.AbpPro.DbMigrator/appsettings.json index 738a223d..e711c4f8 100644 --- a/aspnet-core/services/src/Lion.AbpPro.DbMigrator/appsettings.json +++ b/aspnet-core/services/src/Lion.AbpPro.DbMigrator/appsettings.json @@ -1,5 +1,5 @@ { "ConnectionStrings": { - "Default": "Data Source=localhost;Database=LionAbpProDB;uid=root;pwd=1q2w3E*;charset=utf8mb4;Allow User Variables=true;AllowLoadLocalInfile=true" + "Default": "Data Source=localhost;Port=3306;Database=LionAbpProDB;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.Domain.Shared/AbpProDomainErrorCodes.cs b/aspnet-core/services/src/Lion.AbpPro.Domain.Shared/AbpProDomainErrorCodes.cs index 0cbc67aa..4c1890f9 100644 --- a/aspnet-core/services/src/Lion.AbpPro.Domain.Shared/AbpProDomainErrorCodes.cs +++ b/aspnet-core/services/src/Lion.AbpPro.Domain.Shared/AbpProDomainErrorCodes.cs @@ -2,6 +2,16 @@ namespace Lion.AbpPro { public static class AbpProDomainErrorCodes { - /* You can add your business exception error codes here, as constants */ + public const string OrganizationUnitNotExist =AbpProDomainSharedConsts.NameSpace+ ":100001"; + public const string UserLockedOut =AbpProDomainSharedConsts.NameSpace+ ":100002"; + public const string UserOrPasswordMismatch =AbpProDomainSharedConsts.NameSpace+ ":100003"; + public const string ApiResourceNotExist =AbpProDomainSharedConsts.NameSpace+ ":100004"; + public const string ApiResourceExist =AbpProDomainSharedConsts.NameSpace+ ":100005"; + public const string ApiScopeNotExist =AbpProDomainSharedConsts.NameSpace+ ":100006"; + public const string ApiScopeExist =AbpProDomainSharedConsts.NameSpace+ ":100007"; + public const string ApiClientNotExist =AbpProDomainSharedConsts.NameSpace+ ":100008"; + public const string ApiClientExist =AbpProDomainSharedConsts.NameSpace+ ":100009"; + public const string IdentityResourceNotExist =AbpProDomainSharedConsts.NameSpace+ ":100010"; + public const string IdentityResourceExist =AbpProDomainSharedConsts.NameSpace+ ":100011"; } } diff --git a/aspnet-core/services/src/Lion.AbpPro.Domain.Shared/AbpProDomainSharedConsts.cs b/aspnet-core/services/src/Lion.AbpPro.Domain.Shared/AbpProDomainSharedConsts.cs new file mode 100644 index 00000000..7d139a66 --- /dev/null +++ b/aspnet-core/services/src/Lion.AbpPro.Domain.Shared/AbpProDomainSharedConsts.cs @@ -0,0 +1,9 @@ +namespace Lion.AbpPro; + +public class AbpProDomainSharedConsts +{ + /// 名称空间 + public const string NameSpace = "Lion.AbpPro"; + /// 默认语言 + public const string DefaultCultureName = "zh-Hans"; +} \ No newline at end of file diff --git a/aspnet-core/services/src/Lion.AbpPro.Domain.Shared/AbpProDomainSharedModule.cs b/aspnet-core/services/src/Lion.AbpPro.Domain.Shared/AbpProDomainSharedModule.cs index 42ae4d33..be744054 100644 --- a/aspnet-core/services/src/Lion.AbpPro.Domain.Shared/AbpProDomainSharedModule.cs +++ b/aspnet-core/services/src/Lion.AbpPro.Domain.Shared/AbpProDomainSharedModule.cs @@ -51,13 +51,13 @@ namespace Lion.AbpPro { Configure(options => { - options.FileSets.AddEmbedded("Lion.AbpPro"); + options.FileSets.AddEmbedded(AbpProDomainSharedConsts.NameSpace); }); Configure(options => { options.Resources - .Add("zh-Hans") + .Add(AbpProDomainSharedConsts.DefaultCultureName) .AddVirtualJson("/Localization/AbpPro") .AddBaseTypes(typeof(IdentityResource)) .AddBaseTypes(typeof(AbpValidationResource)) @@ -70,7 +70,7 @@ namespace Lion.AbpPro Configure(options => { - options.MapCodeNamespace("AbpPro", typeof(AbpProResource)); + options.MapCodeNamespace(AbpProDomainSharedConsts.NameSpace, typeof(AbpProResource)); }); } diff --git a/aspnet-core/services/src/Lion.AbpPro.Domain.Shared/Localization/AbpPro/en.json b/aspnet-core/services/src/Lion.AbpPro.Domain.Shared/Localization/AbpPro/en.json index 4805147c..0adde08d 100644 --- a/aspnet-core/services/src/Lion.AbpPro.Domain.Shared/Localization/AbpPro/en.json +++ b/aspnet-core/services/src/Lion.AbpPro.Domain.Shared/Localization/AbpPro/en.json @@ -17,6 +17,7 @@ "Permission:CapManagement": "IntegratedEvent", "Permission:ESManagement": "ESManagement", "Permission:SettingManagement": "SettingManagement", + "Permission:OrganizationUnitManagement": "OrganizationUnitManagement", "Permission:IdentityServerManagement": "IdentityServer", "Permission:IdentityServerManagement:Client": "Client", "Permission:IdentityServerManagement:ApiResource": "ApiResource", @@ -28,6 +29,19 @@ "Description:Setting.Group.Other.Github": "Github", "Enum:TestType:Created:1":"Created", "Enum:TestType:Cancel:1":"Cancel", - "Enum:TestType:Delete:1":"Delete" + "Enum:TestType:Delete:1":"Delete", + + "Lion.AbpPro:100001": "OrganizationUnit Not Exist", + "Lion.AbpPro:100002": "UserLockedOut", + "Lion.AbpPro:100003": "UserOrPasswordMismatch", + "Lion.AbpPro:100004": "ApiResource Not Exist", + "Lion.AbpPro:100005": "ApiResource Exist", + "Lion.AbpPro:100006": "ApiScope Not Exist", + "Lion.AbpPro:100007": "ApiScope Exist", + "Lion.AbpPro:100008": "ApiClient Not Exist", + "Lion.AbpPro:100009": "ApiClient Exist", + "Lion.AbpPro:100010": "IdentityResource Not Exist", + "Lion.AbpPro:100011": "IdentityResource Exist" + } } diff --git a/aspnet-core/services/src/Lion.AbpPro.Domain.Shared/Localization/AbpPro/zh-Hans.json b/aspnet-core/services/src/Lion.AbpPro.Domain.Shared/Localization/AbpPro/zh-Hans.json index cf7cc496..86321fcd 100644 --- a/aspnet-core/services/src/Lion.AbpPro.Domain.Shared/Localization/AbpPro/zh-Hans.json +++ b/aspnet-core/services/src/Lion.AbpPro.Domain.Shared/Localization/AbpPro/zh-Hans.json @@ -17,6 +17,7 @@ "Permission:CapManagement": "集成事件", "Permission:ESManagement": "ES日志", "Permission:SettingManagement": "设置管理", + "Permission:OrganizationUnitManagement": "组织结构管理", "Permission:IdentityServerManagement": "IdentityServer", "Permission:IdentityServerManagement:Client": "客户端", "Permission:IdentityServerManagement:ApiResource": "Api资源", @@ -28,6 +29,18 @@ "Description:Setting.Group.Other.Github": "Github", "Enum:TestType:Created:1":"创建", "Enum:TestType:Cancel:1":"取消", - "Enum:TestType:Delete:1":"删除" + "Enum:TestType:Delete:1":"删除", + + "Lion.AbpPro:100001": "组织机构不存在", + "Lion.AbpPro:100002": "用户被锁定", + "Lion.AbpPro:100003": "用户名或者密码错误", + "Lion.AbpPro:100004": "ApiResource不存在", + "Lion.AbpPro:100005": "ApiResource 已存在", + "Lion.AbpPro:100006": "ApiScope 不存在", + "Lion.AbpPro:100007": "ApiScope 已存在", + "Lion.AbpPro:100008": "ApiClient 不存在", + "Lion.AbpPro:100009": "ApiClient 已存在", + "Lion.AbpPro:100010": "IdentityResource 不存在", + "Lion.AbpPro:100011": "IdentityResource 已存在" } } \ No newline at end of file diff --git a/aspnet-core/services/src/Lion.AbpPro.Domain.Shared/Localization/AbpProResource.cs b/aspnet-core/services/src/Lion.AbpPro.Domain.Shared/Localization/AbpProResource.cs index 5b29cf44..3f420a8b 100644 --- a/aspnet-core/services/src/Lion.AbpPro.Domain.Shared/Localization/AbpProResource.cs +++ b/aspnet-core/services/src/Lion.AbpPro.Domain.Shared/Localization/AbpProResource.cs @@ -1,6 +1,6 @@ using Volo.Abp.Localization; -namespace Lion.AbpPro.Localization +namespace Lion.AbpPro { [LocalizationResourceName("AbpPro")] public class AbpProResource 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/IdentityServer/IdenityServerApiResourceManager.cs b/aspnet-core/services/src/Lion.AbpPro.Domain/IdentityServer/IdenityServerApiResourceManager.cs index a0f3609c..04a548ed 100644 --- a/aspnet-core/services/src/Lion.AbpPro.Domain/IdentityServer/IdenityServerApiResourceManager.cs +++ b/aspnet-core/services/src/Lion.AbpPro.Domain/IdentityServer/IdenityServerApiResourceManager.cs @@ -26,17 +26,26 @@ namespace Lion.AbpPro.IdentityServer bool includeDetails = false, CancellationToken cancellationToken = default) { - return _apiResourceRepository.GetListAsync("CreationTime desc", skipCount, - maxResultCount, filter, + return _apiResourceRepository.GetListAsync + ( + "CreationTime desc", + skipCount, + maxResultCount, + filter, includeDetails, - cancellationToken); + cancellationToken + ); } - public Task GetCountAsync(string filter = null, + public Task GetCountAsync( + string filter = null, CancellationToken cancellationToken = default) { - return _apiResourceRepository.GetCountAsync(filter, - cancellationToken); + return _apiResourceRepository.GetCountAsync + ( + filter, + cancellationToken + ); } /// @@ -65,10 +74,16 @@ namespace Lion.AbpPro.IdentityServer await _apiResourceRepository.FindByNameAsync(name.Trim(), false, cancellationToken); if (null != apiResource) { - throw new UserFriendlyException(message: "ApiResource已存在"); + throw new BusinessException(AbpProDomainErrorCodes.ApiResourceExist); } - apiResource = new ApiResource(id, name, displayName, description) + apiResource = new ApiResource + ( + id, + name, + displayName, + description + ) { AllowedAccessTokenSigningAlgorithms = allowedAccessTokenSigningAlgorithms, ShowInDiscoveryDocument = showInDiscoveryDocument, @@ -83,8 +98,11 @@ namespace Lion.AbpPro.IdentityServer // // properties?.Distinct().ToList().ForEach(item => { apiResource.AddProperty(item.Key, item.Value); }); - return await _apiResourceRepository.InsertAsync(apiResource, - cancellationToken: cancellationToken); + return await _apiResourceRepository.InsertAsync + ( + apiResource, + cancellationToken: cancellationToken + ); } public async Task DeleteAsync( @@ -104,14 +122,13 @@ namespace Lion.AbpPro.IdentityServer bool showInDiscoveryDocument, string secret, List scopes, - CancellationToken cancellationToken = default - ) + CancellationToken cancellationToken = default) { var apiResource = await _apiResourceRepository.FindByNameAsync(name.Trim(), true, cancellationToken); if (null == apiResource) { - throw new UserFriendlyException(message: "ApiResource不存在"); + throw new BusinessException(AbpProDomainErrorCodes.ApiResourceNotExist); } apiResource.DisplayName = displayName; @@ -148,8 +165,11 @@ namespace Lion.AbpPro.IdentityServer } - return await _apiResourceRepository.UpdateAsync(apiResource, - cancellationToken: cancellationToken); + return await _apiResourceRepository.UpdateAsync + ( + apiResource, + cancellationToken: cancellationToken + ); } } } \ No newline at end of file diff --git a/aspnet-core/services/src/Lion.AbpPro.Domain/IdentityServer/IdenityServerApiScopeManager.cs b/aspnet-core/services/src/Lion.AbpPro.Domain/IdentityServer/IdenityServerApiScopeManager.cs index 37c77b36..082c2712 100644 --- a/aspnet-core/services/src/Lion.AbpPro.Domain/IdentityServer/IdenityServerApiScopeManager.cs +++ b/aspnet-core/services/src/Lion.AbpPro.Domain/IdentityServer/IdenityServerApiScopeManager.cs @@ -23,16 +23,19 @@ namespace Lion.AbpPro.IdentityServer bool includeDetails = false, CancellationToken cancellationToken = default) { - return _apiScopeRepository.GetListAsync( + return _apiScopeRepository.GetListAsync + ( "CreationTime desc", skipCount, maxResultCount, filter, includeDetails, - cancellationToken); + cancellationToken + ); } - public Task GetCountAsync(string filter = null, + public Task GetCountAsync( + string filter = null, CancellationToken cancellationToken = default) { return _apiScopeRepository.GetCountAsync(filter, cancellationToken); @@ -48,11 +51,19 @@ namespace Lion.AbpPro.IdentityServer bool showInDiscoveryDocument) { var apiScopes = await _apiScopeRepository.GetListByNameAsync(new[] { name }, false); - if (apiScopes.Count > 0) throw new UserFriendlyException(message: $"{name}已存在"); + if (apiScopes.Count > 0) throw new BusinessException(AbpProDomainErrorCodes.ApiScopeExist); - var scope = new ApiScope(GuidGenerator.Create(), name, displayName, description, - required, emphasize, - showInDiscoveryDocument, enabled); + var scope = new ApiScope + ( + GuidGenerator.Create(), + name, + displayName, + description, + required, + emphasize, + showInDiscoveryDocument, + enabled + ); return await _apiScopeRepository.InsertAsync(scope); } @@ -67,7 +78,7 @@ namespace Lion.AbpPro.IdentityServer bool showInDiscoveryDocument) { var apiScope = await _apiScopeRepository.FindAsync(id, false); - if (null == apiScope) throw new UserFriendlyException(message: $"{name}不存在"); + if (null == apiScope) throw new BusinessException(AbpProDomainErrorCodes.ApiScopeNotExist); apiScope.DisplayName = displayName; apiScope.Description = description; apiScope.Enabled = enabled; @@ -77,18 +88,25 @@ namespace Lion.AbpPro.IdentityServer return await _apiScopeRepository.UpdateAsync(apiScope); } - public Task DeleteAsync(Guid id, bool autoSave = false, + public Task DeleteAsync( + Guid id, + bool autoSave = false, CancellationToken cancellationToken = default) { return _apiScopeRepository.DeleteAsync(id, autoSave, cancellationToken); } - public async Task> FindAllAsync( - CancellationToken cancellationToken = default) + public async Task> FindAllAsync(CancellationToken cancellationToken = default) { - return await _apiScopeRepository.GetListAsync("CreationTime desc", 0, Int32.MaxValue, - null, false, - cancellationToken); + return await _apiScopeRepository.GetListAsync + ( + "CreationTime desc", + 0, + Int32.MaxValue, + null, + false, + cancellationToken + ); } } } \ No newline at end of file diff --git a/aspnet-core/services/src/Lion.AbpPro.Domain/IdentityServer/IdenityServerClientManager.cs b/aspnet-core/services/src/Lion.AbpPro.Domain/IdentityServer/IdenityServerClientManager.cs index ae0fdc7d..08805b75 100644 --- a/aspnet-core/services/src/Lion.AbpPro.Domain/IdentityServer/IdenityServerClientManager.cs +++ b/aspnet-core/services/src/Lion.AbpPro.Domain/IdentityServer/IdenityServerClientManager.cs @@ -50,7 +50,7 @@ namespace Lion.AbpPro.IdentityServer string description, string allowedGrantTypes) { var entity = await _clientRepository.FindByClientIdAsync(clientId); - if (null != entity) throw new UserFriendlyException(message: "当前ClientId已存在"); + if (null != entity) throw new BusinessException(AbpProDomainErrorCodes.ApiClientExist); entity = new Client(GuidGenerator.Create(), clientId) { ClientName = clientName, Description = description, @@ -108,7 +108,7 @@ namespace Lion.AbpPro.IdentityServer var client = await _clientRepository.FindByClientIdAsync(clientId); if (client == null) { - throw new UserFriendlyException(message: $"{clientId}不存在"); + throw new BusinessException(AbpProDomainErrorCodes.ApiClientNotExist); } client.ClientName = clientName; @@ -180,7 +180,7 @@ namespace Lion.AbpPro.IdentityServer public async Task UpdateScopesAsync(string clientId, List scopes) { var client = await _clientRepository.FindByClientIdAsync(clientId); - if (client == null) throw new UserFriendlyException(message: $"{clientId}不存在"); + if (client == null) throw new BusinessException(AbpProDomainErrorCodes.ApiClientNotExist); client.RemoveAllScopes(); foreach (var item in scopes.Distinct()) @@ -201,7 +201,7 @@ namespace Lion.AbpPro.IdentityServer { uri = uri.Trim(); var client = await _clientRepository.FindByClientIdAsync(clientId); - if (client == null) throw new UserFriendlyException(message: $"{clientId}不存在"); + if (client == null) throw new BusinessException(AbpProDomainErrorCodes.ApiClientNotExist); if (client.RedirectUris.Any(e => e.RedirectUri == uri.Trim())) { return client; @@ -220,7 +220,7 @@ namespace Lion.AbpPro.IdentityServer { uri = uri.Trim(); var client = await _clientRepository.FindByClientIdAsync(clientId); - if (client == null) throw new UserFriendlyException(message: $"{clientId}不存在"); + if (client == null) throw new BusinessException(AbpProDomainErrorCodes.ApiClientNotExist); if (client.RedirectUris.Any(e => e.RedirectUri == uri.Trim())) { client.RemoveRedirectUri(uri); @@ -239,7 +239,7 @@ namespace Lion.AbpPro.IdentityServer { uri = uri.Trim(); var client = await _clientRepository.FindByClientIdAsync(clientId); - if (client == null) throw new UserFriendlyException(message: $"{clientId}不存在"); + if (client == null) throw new BusinessException(AbpProDomainErrorCodes.ApiClientNotExist); if (client.PostLogoutRedirectUris.Any(e => e.PostLogoutRedirectUri == uri)) { return client; @@ -256,7 +256,7 @@ namespace Lion.AbpPro.IdentityServer { uri = uri.Trim(); var client = await _clientRepository.FindByClientIdAsync(clientId); - if (client == null) throw new UserFriendlyException(message: $"{clientId}不存在"); + if (client == null) throw new BusinessException(AbpProDomainErrorCodes.ApiClientNotExist); if (client.PostLogoutRedirectUris.Any(e => e.PostLogoutRedirectUri == uri)) { client.RemovePostLogoutRedirectUri(uri); @@ -273,7 +273,7 @@ namespace Lion.AbpPro.IdentityServer { origin = origin.Trim(); var client = await _clientRepository.FindByClientIdAsync(clientId); - if (client == null) throw new UserFriendlyException(message: $"{clientId}不存在"); + if (client == null) throw new BusinessException(AbpProDomainErrorCodes.ApiClientNotExist); if (client.AllowedCorsOrigins.Any(e => e.Origin == origin)) { return client; @@ -292,7 +292,7 @@ namespace Lion.AbpPro.IdentityServer { origin = origin.Trim(); var client = await _clientRepository.FindByClientIdAsync(clientId); - if (client == null) throw new UserFriendlyException(message: $"{clientId}不存在"); + if (client == null) throw new BusinessException(AbpProDomainErrorCodes.ApiClientNotExist); if (client.AllowedCorsOrigins.Any(e => e.Origin == origin)) { client.RemoveCorsOrigin(origin); @@ -305,7 +305,7 @@ namespace Lion.AbpPro.IdentityServer public async Task EnabledAsync(string clientId, bool enabled) { var client = await _clientRepository.FindByClientIdAsync(clientId); - if (client == null) throw new UserFriendlyException(message: $"{clientId}不存在"); + if (client == null) throw new BusinessException(AbpProDomainErrorCodes.ApiClientNotExist); client.Enabled = enabled; return await _clientRepository.UpdateAsync(client); } diff --git a/aspnet-core/services/src/Lion.AbpPro.Domain/IdentityServer/IdentityResourceManager.cs b/aspnet-core/services/src/Lion.AbpPro.Domain/IdentityServer/IdentityResourceManager.cs index 3f6fb1fc..6453c284 100644 --- a/aspnet-core/services/src/Lion.AbpPro.Domain/IdentityServer/IdentityResourceManager.cs +++ b/aspnet-core/services/src/Lion.AbpPro.Domain/IdentityServer/IdentityResourceManager.cs @@ -56,7 +56,7 @@ namespace Lion.AbpPro.IdentityServer bool showInDiscoveryDocument) { var identityResource = await _identityResourceRepository.FindByNameAsync(name, false); - if (null != identityResource) throw new UserFriendlyException(message: $"{name}已存在"); + if (null != identityResource) throw new BusinessException(AbpProDomainErrorCodes.IdentityResourceExist); identityResource = new IdentityResource(GuidGenerator.Create(), name, displayName, description, enabled, required, @@ -74,7 +74,7 @@ namespace Lion.AbpPro.IdentityServer bool showInDiscoveryDocument) { var identityResource = await _identityResourceRepository.FindByNameAsync(name, false); - if (null == identityResource) throw new UserFriendlyException(message: $"{name}不存在"); + if (null == identityResource) throw new BusinessException(AbpProDomainErrorCodes.IdentityResourceNotExist); identityResource.DisplayName = displayName; identityResource.Description = description; identityResource.Enabled = enabled; diff --git a/aspnet-core/services/src/Lion.AbpPro.EntityFrameworkCore/EntityFrameworkCore/AbpProEntityFrameworkCoreModule.cs b/aspnet-core/services/src/Lion.AbpPro.EntityFrameworkCore/EntityFrameworkCore/AbpProEntityFrameworkCoreModule.cs index 0088f421..06d05d2f 100644 --- a/aspnet-core/services/src/Lion.AbpPro.EntityFrameworkCore/EntityFrameworkCore/AbpProEntityFrameworkCoreModule.cs +++ b/aspnet-core/services/src/Lion.AbpPro.EntityFrameworkCore/EntityFrameworkCore/AbpProEntityFrameworkCoreModule.cs @@ -52,11 +52,12 @@ namespace Lion.AbpPro.EntityFrameworkCore { /* The main point to change your DBMS. * See also AbpProMigrationsDbContextFactory for EF Core tooling. */ + options.UseMySQL(); options.PreConfigure(options => { options.DbContextOptions.UseBatchEF_MySQLPomelo(); }); - options.UseMySQL(); + }); } } 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..c8213b13 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; @@ -24,10 +25,21 @@ namespace Lion.AbpPro.EntityFrameworkCore private static IConfigurationRoot BuildConfiguration() { 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 + ( + "appsettings.json", + false + ); return builder.Build(); } } -} +} \ No newline at end of file diff --git a/aspnet-core/services/src/Lion.AbpPro.EntityFrameworkCore/EntityFrameworkCore/EntityFrameworkCoreAbpProDbSchemaMigrator.cs b/aspnet-core/services/src/Lion.AbpPro.EntityFrameworkCore/EntityFrameworkCore/EntityFrameworkCoreAbpProDbSchemaMigrator.cs index d3c8f1d8..9cb3547f 100644 --- a/aspnet-core/services/src/Lion.AbpPro.EntityFrameworkCore/EntityFrameworkCore/EntityFrameworkCoreAbpProDbSchemaMigrator.cs +++ b/aspnet-core/services/src/Lion.AbpPro.EntityFrameworkCore/EntityFrameworkCore/EntityFrameworkCoreAbpProDbSchemaMigrator.cs @@ -12,8 +12,7 @@ namespace Lion.AbpPro.EntityFrameworkCore { private readonly IServiceProvider _serviceProvider; - public EntityFrameworkCoreAbpProDbSchemaMigrator( - IServiceProvider serviceProvider) + public EntityFrameworkCoreAbpProDbSchemaMigrator(IServiceProvider serviceProvider) { _serviceProvider = serviceProvider; } 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/services/test/Lion.AbpPro.Domain.Tests/IdentityServer/IdenityServerApiResourceManager_Tests.cs b/aspnet-core/services/test/Lion.AbpPro.Domain.Tests/IdentityServer/IdenityServerApiResourceManager_Tests.cs index cca9b243..ae1b8e34 100644 --- a/aspnet-core/services/test/Lion.AbpPro.Domain.Tests/IdentityServer/IdenityServerApiResourceManager_Tests.cs +++ b/aspnet-core/services/test/Lion.AbpPro.Domain.Tests/IdentityServer/IdenityServerApiResourceManager_Tests.cs @@ -61,11 +61,11 @@ namespace Lion.AbpPro.IdentityServer [Fact] public async Task Shuold_CreateAsync_Name_Repetition_Exception() { - (await Should.ThrowAsync(async () => + (await Should.ThrowAsync(async () => { var result = await _idenityServerApiResourceManager.CreateAsync(Guid.NewGuid(), "ApiResource_Test", "单元测试创建", "Xunit", true, "", false, "1q2w3E*"); - })).Message.ShouldBe("ApiResource已存在"); + })).Code.ShouldBe(AbpProDomainErrorCodes.ApiResourceExist); } diff --git a/aspnet-core/services/test/Lion.AbpPro.Domain.Tests/IdentityServer/IdenityServerApiScopeManager_Tests.cs b/aspnet-core/services/test/Lion.AbpPro.Domain.Tests/IdentityServer/IdenityServerApiScopeManager_Tests.cs index 8ef230c3..8e63b289 100644 --- a/aspnet-core/services/test/Lion.AbpPro.Domain.Tests/IdentityServer/IdenityServerApiScopeManager_Tests.cs +++ b/aspnet-core/services/test/Lion.AbpPro.Domain.Tests/IdentityServer/IdenityServerApiScopeManager_Tests.cs @@ -59,11 +59,11 @@ namespace Lion.AbpPro.IdentityServer [Fact] public async Task Shuold_CreateAsync_Name_Repetition_Exception() { - (await Should.ThrowAsync(async () => + (await Should.ThrowAsync(async () => { var result = await _idenityServerApiScopeManager.CreateAsync( "ApiScope_Test", "单元测试创建", "Xunit", true, false, false, true); - })).Message.ShouldBe("ApiScope_Test已存在"); + })).Code.ShouldBe(AbpProDomainErrorCodes.ApiScopeExist); } // [Fact] diff --git a/aspnet-core/services/test/Lion.AbpPro.Domain.Tests/IdentityServer/IdenityServerClientManager_Tests.cs b/aspnet-core/services/test/Lion.AbpPro.Domain.Tests/IdentityServer/IdenityServerClientManager_Tests.cs index 76a3faff..a9f4d341 100644 --- a/aspnet-core/services/test/Lion.AbpPro.Domain.Tests/IdentityServer/IdenityServerClientManager_Tests.cs +++ b/aspnet-core/services/test/Lion.AbpPro.Domain.Tests/IdentityServer/IdenityServerClientManager_Tests.cs @@ -60,12 +60,12 @@ namespace Lion.AbpPro.IdentityServer [Fact] public async Task Shuold_CreateAsync_Name_Repetition_Exception() { - (await Should.ThrowAsync(async () => + (await Should.ThrowAsync(async () => { var result = await _idenityServerClientManager.CreateAsync("Test_Client", "XunitName", "desc", "test"); - })).Message.ShouldBe("当前ClientId已存在"); + })).Code.ShouldBe(AbpProDomainErrorCodes.ApiClientExist); } [Fact] diff --git a/aspnet-core/services/test/Lion.AbpPro.Domain.Tests/IdentityServer/IdentityResourceManager_Tests.cs b/aspnet-core/services/test/Lion.AbpPro.Domain.Tests/IdentityServer/IdentityResourceManager_Tests.cs index d929f294..c5c33753 100644 --- a/aspnet-core/services/test/Lion.AbpPro.Domain.Tests/IdentityServer/IdentityResourceManager_Tests.cs +++ b/aspnet-core/services/test/Lion.AbpPro.Domain.Tests/IdentityServer/IdentityResourceManager_Tests.cs @@ -63,13 +63,13 @@ namespace Lion.AbpPro.IdentityServer [Fact] public async Task Shuold_CreateAsync_Name_Repetition_Exception() { - (await Should.ThrowAsync(async () => + (await Should.ThrowAsync(async () => { var result = await _identityResourceManager.CreateAsync("openid", "单元测试", "desc", true, false, false, false); - })).Message.ShouldBe("openid已存在"); + })).Code.ShouldBe(AbpProDomainErrorCodes.IdentityResourceExist); } 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..9da424c6 100644 --- a/vben271/src/router/routes/modules/admin.ts +++ b/vben271/src/router/routes/modules/admin.ts @@ -33,6 +33,16 @@ const admin: AppRouteModule = { icon: 'ant-design:lock-outlined', }, }, + { + path: 'organizationUnit', + name: 'organizationUnit', + component: () => import('/@/views/admin/organizationUnits/OrganizationUnit.vue'), + meta: { + title: t('routes.admin.organizationUnitManagement'), + icon: 'ant-design:gold-outlined', + policy: 'System.OrganizationUnitManagement', + }, + }, { path: 'settings', name: 'Settings', 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/services/ServiceProxyBase.ts b/vben271/src/services/ServiceProxyBase.ts index e57b6768..527997e8 100644 --- a/vben271/src/services/ServiceProxyBase.ts +++ b/vben271/src/services/ServiceProxyBase.ts @@ -11,13 +11,12 @@ export class ServiceProxyBase { options.baseURL = import.meta.env.VITE_API_URL as string; const guard: boolean = this.urlGuard(options.url as string); const userStore = useUserStoreWithOut(); - + const { token, language } = this.buildRequestMessage(); if (!guard) { if (userStore.checkUserLoginExpire) { router.replace(PageEnum.BASE_LOGIN); return; } - const { token, language } = this.buildRequestMessage(); // 添加header options.headers = { 'accept-language': language, @@ -29,6 +28,7 @@ export class ServiceProxyBase { options.headers = { 'Content-Type': 'application/json', __tenant: userStore.tenantId, + 'accept-language': language, }; } diff --git a/vben271/src/views/admin/auditLog/AuditLog.ts b/vben271/src/views/admin/auditLog/AuditLog.ts index 7140e7f1..fc747c97 100644 --- a/vben271/src/views/admin/auditLog/AuditLog.ts +++ b/vben271/src/views/admin/auditLog/AuditLog.ts @@ -1,25 +1,26 @@ -import { FormSchema } from '/@/components/Table'; -import { BasicColumn } from '/@/components/Table'; -import { useI18n } from '/@/hooks/web/useI18n'; +import { FormSchema } from "/@/components/Table"; +import { BasicColumn } from "/@/components/Table"; +import { useI18n } from "/@/hooks/web/useI18n"; const { t } = useI18n(); -import moment from 'moment'; -import { AuditLogsServiceProxy, PagingAuditLogListInput } from '/@/services/ServiceProxies'; +import moment from "moment"; +import { AuditLogsServiceProxy, PagingAuditLogListInput } from "/@/services/ServiceProxies"; + export const searchFormSchema: FormSchema[] = [ { - field: 'userName', - label: t('routes.admin.userManagement_userName'), - component: 'Input', - colProps: { span: 8 }, + field: "userName", + label: t("routes.admin.userManagement_userName"), + component: "Input", + colProps: { span: 8 } }, { - field: 'time', - component: 'RangePicker', - label: t('routes.admin.audit_executeTime'), + field: "time", + component: "RangePicker", + label: t("routes.admin.audit_executeTime"), colProps: { - span: 6, - }, - }, + span: 6 + } + } ]; export const tableColumns: BasicColumn[] = [ @@ -29,37 +30,38 @@ export const tableColumns: BasicColumn[] = [ // width: 100, // }, { - title: 'Url', - dataIndex: 'url', + title: "Url", + dataIndex: "url", width: 350, slots: { - customRender: 'url', + customRender: "url" }, - align: 'left', + align: "left" }, { - title: t('routes.admin.userManagement_userName'), - dataIndex: 'userName', - width: 100, + title: t("routes.admin.userManagement_userName"), + dataIndex: "userName", + width: 100 }, { - title: t('routes.admin.executionTime'), - dataIndex: 'executionTime', + title: t("routes.admin.executionTime"), + dataIndex: "executionTime", width: 200, customRender: ({ text }) => { - return moment(text).format('YYYY-MM-DD HH:mm:ss'); - }, + return moment(text).format("YYYY-MM-DD HH:mm:ss"); + } }, { - title: t('routes.admin.executionDuration'), - dataIndex: 'executionDuration', - width: 150, + title: t("routes.admin.executionDuration"), + dataIndex: "executionDuration", + width: 150 }, { - title: 'Exceptions', - dataIndex: 'exceptions', - }, + title: "Exceptions", + dataIndex: "exceptions" + } ]; + /** * 分页列表 * @param params @@ -69,42 +71,44 @@ export async function getTableListAsync(params: PagingAuditLogListInput) { const _auditLogsServiceProxy = new AuditLogsServiceProxy(); return _auditLogsServiceProxy.page(params); } + export function httpStatusCodeColor(statusCode?: number) { if (!statusCode) { - return ''; + return ""; } if (statusCode >= 200 && statusCode < 300) { - return '#87d068'; + return "#87d068"; } if (statusCode >= 300 && statusCode < 400) { - return '#108ee9'; + return "#108ee9"; } if (statusCode >= 400 && statusCode < 500) { - return 'orange'; + return "orange"; } if (statusCode >= 500) { - return 'red'; + return "red"; } - return 'cyan'; + return "cyan"; } + export function httpMethodColor(method?: string) { - if (method == 'GET') { - return 'blue'; + if (method == "GET") { + return "blue"; } - if (method == 'POST') { - return 'blue'; + if (method == "POST") { + return "blue"; } - if (method == 'PUT') { - return 'orange'; + if (method == "PUT") { + return "orange"; } - if (method == 'DELETE') { - return 'red'; + if (method == "DELETE") { + return "red"; } - if (method == 'OPTIONS') { - return 'cyan'; + if (method == "OPTIONS") { + return "cyan"; } - if (method == 'PATCH') { - return 'pink'; + if (method == "PATCH") { + return "pink"; } - return 'cyan'; + return "cyan"; } diff --git a/vben271/src/views/admin/auditLog/AuditLog.vue b/vben271/src/views/admin/auditLog/AuditLog.vue index c5e1e892..a6279494 100644 --- a/vben271/src/views/admin/auditLog/AuditLog.vue +++ b/vben271/src/views/admin/auditLog/AuditLog.vue @@ -3,9 +3,9 @@ @@ -13,46 +13,47 @@ diff --git a/vben271/src/views/admin/dictionary/AbpDictionary.ts b/vben271/src/views/admin/dictionary/AbpDictionary.ts index 29928a2c..8363b897 100644 --- a/vben271/src/views/admin/dictionary/AbpDictionary.ts +++ b/vben271/src/views/admin/dictionary/AbpDictionary.ts @@ -66,7 +66,6 @@ export const dictionaryTypeTableColumns: BasicColumn[] = [ customRender: "text" } } - ]; //字典项查询 export const searchFormSchema: FormSchema[] = [ @@ -330,12 +329,12 @@ 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(); @@ -365,12 +364,12 @@ 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(); @@ -390,11 +389,11 @@ 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(); diff --git a/vben271/src/views/admin/dictionary/AbpDictionary.vue b/vben271/src/views/admin/dictionary/AbpDictionary.vue index 67565546..56220743 100644 --- a/vben271/src/views/admin/dictionary/AbpDictionary.vue +++ b/vben271/src/views/admin/dictionary/AbpDictionary.vue @@ -9,8 +9,8 @@ :clickToRowSelect="false" > @@ -78,184 +80,187 @@ diff --git a/vben271/src/views/admin/dictionary/CreateAbpDictionary.vue b/vben271/src/views/admin/dictionary/CreateAbpDictionary.vue index 88d03b98..6c1b963a 100644 --- a/vben271/src/views/admin/dictionary/CreateAbpDictionary.vue +++ b/vben271/src/views/admin/dictionary/CreateAbpDictionary.vue @@ -14,64 +14,64 @@ diff --git a/vben271/src/views/admin/dictionary/CreateAbpDictionaryType.vue b/vben271/src/views/admin/dictionary/CreateAbpDictionaryType.vue index 1124ff2d..4375d7f2 100644 --- a/vben271/src/views/admin/dictionary/CreateAbpDictionaryType.vue +++ b/vben271/src/views/admin/dictionary/CreateAbpDictionaryType.vue @@ -14,56 +14,57 @@ diff --git a/vben271/src/views/admin/dictionary/EditAbpDictionary.vue b/vben271/src/views/admin/dictionary/EditAbpDictionary.vue index 633361d0..6f183fd6 100644 --- a/vben271/src/views/admin/dictionary/EditAbpDictionary.vue +++ b/vben271/src/views/admin/dictionary/EditAbpDictionary.vue @@ -14,61 +14,61 @@ diff --git a/vben271/src/views/admin/dictionary/EditAbpDictionaryType.vue b/vben271/src/views/admin/dictionary/EditAbpDictionaryType.vue index 08c8da0b..1a5c4c85 100644 --- a/vben271/src/views/admin/dictionary/EditAbpDictionaryType.vue +++ b/vben271/src/views/admin/dictionary/EditAbpDictionaryType.vue @@ -14,59 +14,60 @@ diff --git a/vben271/src/views/admin/elasticSearch/ElasticSearch.ts b/vben271/src/views/admin/elasticSearch/ElasticSearch.ts index e088b7d6..c828f8d0 100644 --- a/vben271/src/views/admin/elasticSearch/ElasticSearch.ts +++ b/vben271/src/views/admin/elasticSearch/ElasticSearch.ts @@ -1,50 +1,52 @@ -import { FormSchema } from '/@/components/Table'; -import { BasicColumn } from '/@/components/Table'; -import { useI18n } from '/@/hooks/web/useI18n'; +import { FormSchema } from "/@/components/Table"; +import { BasicColumn } from "/@/components/Table"; +import { useI18n } from "/@/hooks/web/useI18n"; + const { t } = useI18n(); -import moment from 'moment'; +import moment from "moment"; import { EsLogServiceProxy, PagingElasticSearchLogInput, - PagingElasticSearchLogOutputCustomePagedResultDto, -} from '/@/services/ServiceProxies'; + PagingElasticSearchLogOutputCustomePagedResultDto +} from "/@/services/ServiceProxies"; + export const searchFormSchema: FormSchema[] = [ { - field: 'filter', - component: 'Input', - label: t('common.key'), + field: "filter", + component: "Input", + label: t("common.key"), labelWidth: 80, colProps: { - span: 6, - }, + span: 6 + } }, { - field: 'time', - component: 'RangePicker', - label: '创建时间:', + field: "time", + component: "RangePicker", + label: "创建时间:", labelWidth: 80, colProps: { span: 6 }, - defaultValue: [moment().subtract(0, 'days'), moment().add(1, 'days')], - }, + defaultValue: [moment().subtract(0, "days"), moment().add(1, "days")] + } ]; export const tableColumns: BasicColumn[] = [ { - title: t('routes.admin.logLevel'), - dataIndex: 'level', - width: 200, + title: t("routes.admin.logLevel"), + dataIndex: "level", + width: 200 }, { - title: t('common.creationTime'), - dataIndex: 'creationTime', + title: t("common.creationTime"), + dataIndex: "creationTime", customRender: ({ text }) => { - return moment(text).format('YYYY-MM-DD HH:mm:ss'); + return moment(text).format("YYYY-MM-DD HH:mm:ss"); }, - width: 200, + width: 200 }, { - title: t('routes.admin.logContent'), - dataIndex: 'message', - }, + title: t("routes.admin.logContent"), + dataIndex: "message" + } ]; /** diff --git a/vben271/src/views/admin/elasticSearch/ElasticSearch.vue b/vben271/src/views/admin/elasticSearch/ElasticSearch.vue index 1c8ca3d9..c52d4bc2 100644 --- a/vben271/src/views/admin/elasticSearch/ElasticSearch.vue +++ b/vben271/src/views/admin/elasticSearch/ElasticSearch.vue @@ -2,9 +2,9 @@
@@ -14,64 +14,65 @@ diff --git a/vben271/src/views/admin/files/File.ts b/vben271/src/views/admin/files/File.ts index a411cab9..ef068386 100644 --- a/vben271/src/views/admin/files/File.ts +++ b/vben271/src/views/admin/files/File.ts @@ -1,31 +1,32 @@ -import { FormSchema } from '/@/components/Table'; -import { BasicColumn } from '/@/components/Table'; -import moment from 'moment'; -import { FilesServiceProxy, PagingFileInput } from '/@/services/ServiceProxies'; -import { useI18n } from '/@/hooks/web/useI18n'; +import { FormSchema } from "/@/components/Table"; +import { BasicColumn } from "/@/components/Table"; +import moment from "moment"; +import { FilesServiceProxy, PagingFileInput } from "/@/services/ServiceProxies"; +import { useI18n } from "/@/hooks/web/useI18n"; + const { t } = useI18n(); export const searchFormSchema: FormSchema[] = [ { - field: 'filter', - label: t('routes.admin.fileName'), - component: 'Input', - colProps: { span: 8 }, - }, + field: "filter", + label: t("routes.admin.fileName"), + component: "Input", + colProps: { span: 8 } + } ]; export const tableColumns: BasicColumn[] = [ { - title: t('routes.admin.fileName'), - dataIndex: 'fileName', + title: t("routes.admin.fileName"), + dataIndex: "fileName" }, { - title: t('routes.admin.userManagement_createTime'), - dataIndex: 'creationTime', + title: t("routes.admin.userManagement_createTime"), + dataIndex: "creationTime", customRender: ({ text }) => { - return moment(text).format('YYYY-MM-DD HH:mm:ss'); - }, - }, + return moment(text).format("YYYY-MM-DD HH:mm:ss"); + } + } ]; /** diff --git a/vben271/src/views/admin/files/File.vue b/vben271/src/views/admin/files/File.vue index c389eed3..0e09b7d9 100644 --- a/vben271/src/views/admin/files/File.vue +++ b/vben271/src/views/admin/files/File.vue @@ -32,81 +32,83 @@ diff --git a/vben271/src/views/admin/files/UploadOss.ts b/vben271/src/views/admin/files/UploadOss.ts index 5b88cb09..917cd6d8 100644 --- a/vben271/src/views/admin/files/UploadOss.ts +++ b/vben271/src/views/admin/files/UploadOss.ts @@ -1,6 +1,6 @@ -import { FilesServiceProxy, FileTokenOutput } from '/@/services/ServiceProxies'; -import OSS from 'ali-oss'; -import moment from 'moment'; +import { FilesServiceProxy, FileTokenOutput } from "/@/services/ServiceProxies"; +import OSS from "ali-oss"; +import moment from "moment"; export async function importFileAsync({ request }) { const _filesServiceProxy = new FilesServiceProxy(); @@ -10,20 +10,20 @@ export async function importFileAsync({ request }) { async function getFileTokenAsync() { const _filesServiceProxy = new FilesServiceProxy(); const result = await _filesServiceProxy.getFileToken(); - sessionStorage.setItem('oss', JSON.stringify(result)); + sessionStorage.setItem("oss", JSON.stringify(result)); return result; } export async function getOSSClient(): Promise { let fileToken = new FileTokenOutput(); try { - let oss = sessionStorage.getItem('oss'); + let oss = sessionStorage.getItem("oss"); if (!oss) { fileToken = await getFileTokenAsync(); } else { fileToken = JSON.parse(oss); - let expiration = moment(fileToken.expiration).format('YYYY-MM-DD HH:mm:ss'); + let expiration = moment(fileToken.expiration).format("YYYY-MM-DD HH:mm:ss"); debugger; if (expiration < formatDate(moment.now())) { fileToken = await getFileTokenAsync(); @@ -34,36 +34,36 @@ export async function getOSSClient(): Promise { accessKeyId: fileToken.accessKeyId, accessKeySecret: fileToken.accessKeySecret, bucket: fileToken.bucket, - stsToken: fileToken.token as string, + stsToken: fileToken.token as string }; return Promise.resolve(new OSS(request)); } catch (error) { - console.error('获取oss Client失败'); + console.error("获取oss Client失败"); } } export async function downLoadFile(fileName) { let oss = await getOSSClient(); const response = { - 'content-disposition': `attachment; filename=${encodeURIComponent(fileName)}`, + "content-disposition": `attachment; filename=${encodeURIComponent(fileName)}` }; const url = (oss as OSS).signatureUrl(fileName, { response }); - let link = document.createElement('a'); //创建a标签 - link.style.display = 'none'; //使其隐藏 + let link = document.createElement("a"); //创建a标签 + link.style.display = "none"; //使其隐藏 link.href = url; //赋予文件下载地址 - link.setAttribute('download', fileName); //设置下载属性 以及文件名 + link.setAttribute("download", fileName); //设置下载属性 以及文件名 document.body.appendChild(link); //a标签插至页面中 link.click(); //强制触发a标签事件 } function formatDate(dateTime) { const date = new Date(dateTime); - const YY = date.getFullYear() + '-'; - const MM = (date.getMonth() + 1 < 10 ? '0' + (date.getMonth() + 1) : date.getMonth() + 1) + '-'; - const DD = date.getDate() < 10 ? '0' + date.getDate() : date.getDate(); - const hh = date.getHours() + ':'; - const mm = date.getMinutes() + ':'; + const YY = date.getFullYear() + "-"; + const MM = (date.getMonth() + 1 < 10 ? "0" + (date.getMonth() + 1) : date.getMonth() + 1) + "-"; + const DD = date.getDate() < 10 ? "0" + date.getDate() : date.getDate(); + const hh = date.getHours() + ":"; + const mm = date.getMinutes() + ":"; const ss = date.getSeconds(); - return YY + MM + DD + ' ' + hh + mm + ss; + return YY + MM + DD + " " + hh + mm + ss; } diff --git a/vben271/src/views/admin/organizationUnits/AddRoleToOrganizationUnit.vue b/vben271/src/views/admin/organizationUnits/AddRoleToOrganizationUnit.vue new file mode 100644 index 00000000..181ca3fc --- /dev/null +++ b/vben271/src/views/admin/organizationUnits/AddRoleToOrganizationUnit.vue @@ -0,0 +1,104 @@ + + + + + diff --git a/vben271/src/views/admin/organizationUnits/AddUserToOrganizationUnit.vue b/vben271/src/views/admin/organizationUnits/AddUserToOrganizationUnit.vue new file mode 100644 index 00000000..20a80fa9 --- /dev/null +++ b/vben271/src/views/admin/organizationUnits/AddUserToOrganizationUnit.vue @@ -0,0 +1,111 @@ + + + + + diff --git a/vben271/src/views/admin/organizationUnits/CreateOrganizationUnit.vue b/vben271/src/views/admin/organizationUnits/CreateOrganizationUnit.vue new file mode 100644 index 00000000..11998c07 --- /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..e90d8e66 --- /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..07755a20 --- /dev/null +++ b/vben271/src/views/admin/organizationUnits/OrganizationUnit.ts @@ -0,0 +1,236 @@ +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: 10 } + }, + { + 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..c0004171 --- /dev/null +++ b/vben271/src/views/admin/organizationUnits/OrganizationUnit.vue @@ -0,0 +1,375 @@ + + + + diff --git a/vben271/src/views/admin/roles/AbpRole.ts b/vben271/src/views/admin/roles/AbpRole.ts index 6b8a17df..61d8213e 100644 --- a/vben271/src/views/admin/roles/AbpRole.ts +++ b/vben271/src/views/admin/roles/AbpRole.ts @@ -1,5 +1,5 @@ -import { FormSchema } from '/@/components/Table'; -import { BasicColumn } from '/@/components/Table'; +import { FormSchema } from "/@/components/Table"; +import { BasicColumn } from "/@/components/Table"; import { RolesServiceProxy, PagingRoleListInput, @@ -7,98 +7,99 @@ import { IdentityRoleCreateDto, PermissionsServiceProxy, IdInput, - GetPermissionInput, -} from '/@/services/ServiceProxies'; -import { message } from 'ant-design-vue'; -import { useLoading } from '/@/components/Loading'; + GetPermissionInput +} from "/@/services/ServiceProxies"; +import { message } from "ant-design-vue"; +import { useLoading } from "/@/components/Loading"; + +import { useI18n } from "/@/hooks/web/useI18n"; -import { useI18n } from '/@/hooks/web/useI18n'; const { t } = useI18n(); const [openFullLoading, closeFullLoading] = useLoading({ - tip: 'Loading...', + tip: "Loading..." }); export const tableColumns: BasicColumn[] = [ { - title: t('routes.admin.userManagement_roleName'), - dataIndex: 'name', + title: t("routes.admin.userManagement_roleName"), + dataIndex: "name" }, { - title: t('routes.admin.roleManagement_default'), - dataIndex: 'isDefault', - slots: { customRender: 'category' }, - }, + title: t("routes.admin.roleManagement_default"), + dataIndex: "isDefault", + slots: { customRender: "category" } + } ]; export const searchFormSchema: FormSchema[] = [ { - field: 'filter', - label: t('routes.admin.userManagement_roleName'), - component: 'Input', - colProps: { span: 8 }, - }, + field: "filter", + label: t("routes.admin.userManagement_roleName"), + component: "Input", + colProps: { span: 8 } + } ]; export const createFormSchema: FormSchema[] = [ { - field: 'name', - label: t('routes.admin.userManagement_roleName'), - component: 'Input', + field: "name", + label: t("routes.admin.userManagement_roleName"), + component: "Input", required: true, - colProps: { span: 18 }, + colProps: { span: 18 } }, { - field: 'isDefault', - component: 'RadioGroup', - label: t('routes.admin.roleManagement_default'), + field: "isDefault", + component: "RadioGroup", + label: t("routes.admin.roleManagement_default"), required: true, colProps: { - span: 18, + span: 18 }, - defaultValue: '0', + defaultValue: "0", componentProps: { options: [ { - label: t('common.true'), - value: '1', + label: t("common.true"), + value: "1" }, { - label: t('common.false'), - value: '0', - }, - ], - }, - }, + label: t("common.false"), + value: "0" + } + ] + } + } ]; export const editFormSchema: FormSchema[] = [ { - field: 'name', - label: t('routes.admin.userManagement_roleName'), - component: 'Input', + field: "name", + label: t("routes.admin.userManagement_roleName"), + component: "Input", required: true, - colProps: { span: 18 }, + colProps: { span: 18 } }, { - field: 'isDefault', - component: 'RadioGroup', - label: t('routes.admin.roleManagement_default'), + field: "isDefault", + component: "RadioGroup", + label: t("routes.admin.roleManagement_default"), required: true, colProps: { - span: 18, + span: 18 }, componentProps: { options: [ { - label: t('common.true'), - value: '1', + label: t("common.true"), + value: "1" }, { - label: t('common.false'), - value: '0', - }, - ], - }, - }, + label: t("common.false"), + value: "0" + } + ] + } + } ]; /** @@ -123,7 +124,7 @@ export async function deleteRoleAsync({ roleId, reload }) { request.id = roleId; await _roleServiceProxy.delete(request); closeFullLoading(); - message.success(t('common.operationSuccess')); + message.success(t("common.operationSuccess")); reload(); } catch (error) { closeFullLoading(); @@ -139,11 +140,11 @@ export async function createRoleAsync({ request, changeOkLoading, validate, clos await validate(); let requestBody: IdentityRoleCreateDto = new IdentityRoleCreateDto(); requestBody.name = request.name; - request.isDefault == '1' ? (requestBody.isDefault = true) : (requestBody.isDefault = false); + request.isDefault == "1" ? (requestBody.isDefault = true) : (requestBody.isDefault = false); const _roleServiceProxy = new RolesServiceProxy(); await _roleServiceProxy.create(requestBody); changeOkLoading(false); - message.success(t('common.operationSuccess')); + message.success(t("common.operationSuccess")); closeModal(); } @@ -155,7 +156,7 @@ export async function createRoleAsync({ request, changeOkLoading, validate, clos export async function getRolePermissionAsync(roleName: string) { const _permissionsServiceProxy = new PermissionsServiceProxy(); const request = new GetPermissionInput(); - request.providerName = 'R'; + request.providerName = "R"; request.providerKey = roleName; return await _permissionsServiceProxy.tree(request); } diff --git a/vben271/src/views/admin/roles/AbpRole.vue b/vben271/src/views/admin/roles/AbpRole.vue index 673e43a3..706f6ca6 100644 --- a/vben271/src/views/admin/roles/AbpRole.vue +++ b/vben271/src/views/admin/roles/AbpRole.vue @@ -3,7 +3,7 @@ @@ -14,7 +14,7 @@ @click="openCreateAbpRoleModal" v-auth="'AbpIdentity.Roles.Create'" > - {{ t('common.createText') }} + {{ t("common.createText") }} @@ -65,101 +65,102 @@ diff --git a/vben271/src/views/admin/roles/CreateAbpRole.vue b/vben271/src/views/admin/roles/CreateAbpRole.vue index 1faa2189..a29cb405 100644 --- a/vben271/src/views/admin/roles/CreateAbpRole.vue +++ b/vben271/src/views/admin/roles/CreateAbpRole.vue @@ -11,58 +11,58 @@ diff --git a/vben271/src/views/admin/roles/EditAbpRole.vue b/vben271/src/views/admin/roles/EditAbpRole.vue index b4a7f74f..4ac782cc 100644 --- a/vben271/src/views/admin/roles/EditAbpRole.vue +++ b/vben271/src/views/admin/roles/EditAbpRole.vue @@ -10,70 +10,70 @@ diff --git a/vben271/src/views/admin/settings/Setting.ts b/vben271/src/views/admin/settings/Setting.ts index 46fe2c1e..2238f909 100644 --- a/vben271/src/views/admin/settings/Setting.ts +++ b/vben271/src/views/admin/settings/Setting.ts @@ -1,4 +1,4 @@ -import { SettingsServiceProxy } from '/@/services/ServiceProxies'; +import { SettingsServiceProxy } from "/@/services/ServiceProxies"; /** * 获取所有settings diff --git a/vben271/src/views/admin/users/AbpUser.ts b/vben271/src/views/admin/users/AbpUser.ts index a9b2021b..9f7c1422 100644 --- a/vben271/src/views/admin/users/AbpUser.ts +++ b/vben271/src/views/admin/users/AbpUser.ts @@ -1,6 +1,6 @@ -import { FormSchema } from '/@/components/Table'; -import { BasicColumn } from '/@/components/Table'; -import moment from 'moment'; +import { FormSchema } from "/@/components/Table"; +import { BasicColumn } from "/@/components/Table"; +import moment from "moment"; import { PagingUserListInput, UsersServiceProxy, @@ -8,198 +8,199 @@ import { IdentityRoleDtoListResultDto, RolesServiceProxy, LockUserInput, - IdInput, -} from '/@/services/ServiceProxies'; -import { message } from 'ant-design-vue'; -import { useLoading } from '/@/components/Loading'; + IdInput +} from "/@/services/ServiceProxies"; +import { message } from "ant-design-vue"; +import { useLoading } from "/@/components/Loading"; + +import { useI18n } from "/@/hooks/web/useI18n"; -import { useI18n } from '/@/hooks/web/useI18n'; const { t } = useI18n(); const [openFullLoading, closeFullLoading] = useLoading({ - tip: 'Loading...', + tip: "Loading..." }); export const tableColumns: BasicColumn[] = [ { - title: t('routes.admin.userManagement_userName'), - dataIndex: 'userName', + title: t("routes.admin.userManagement_userName"), + dataIndex: "userName" }, { - title: t('routes.admin.userManagement_name'), - dataIndex: 'name', + title: t("routes.admin.userManagement_name"), + dataIndex: "name" }, { - title: t('routes.admin.userManagement_email'), - dataIndex: 'email', + title: t("routes.admin.userManagement_email"), + dataIndex: "email" }, { - title: t('routes.admin.userManagement_phone'), - dataIndex: 'phoneNumber', + title: t("routes.admin.userManagement_phone"), + dataIndex: "phoneNumber" }, { - title: t('common.status'), - dataIndex: 'isActive', - slots: { customRender: 'isActive' }, + title: t("common.status"), + dataIndex: "isActive", + slots: { customRender: "isActive" } }, { - title: t('routes.admin.userManagement_createTime'), - dataIndex: 'creationTime', + title: t("routes.admin.userManagement_createTime"), + dataIndex: "creationTime", customRender: ({ text }) => { - return moment(text).format('YYYY-MM-DD HH:mm:ss'); - }, - }, + return moment(text).format("YYYY-MM-DD HH:mm:ss"); + } + } ]; export const searchFormSchema: FormSchema[] = [ { - field: 'filter', - label: t('routes.admin.userManagement_userName'), - component: 'Input', - colProps: { span: 8 }, - }, + field: "filter", + label: t("routes.admin.userManagement_userName"), + component: "Input", + colProps: { span: 8 } + } ]; export const createFormSchema: FormSchema[] = [ { - field: 'userName', - component: 'Input', - label: t('routes.admin.userManagement_userName'), + field: "userName", + component: "Input", + label: t("routes.admin.userManagement_userName"), labelWidth: 85, required: true, colProps: { - span: 12, + span: 12 }, componentProps: { - autocomplete: 'off', - }, + autocomplete: "off" + } }, { - field: 'name', - component: 'Input', - label: t('routes.admin.roleManagement_name'), + field: "name", + component: "Input", + label: t("routes.admin.roleManagement_name"), labelWidth: 130, required: true, colProps: { - span: 12, + span: 12 }, componentProps: { - autocomplete: 'off', - }, + autocomplete: "off" + } }, { - field: 'email', - component: 'Input', - label: t('routes.admin.userManagement_email'), + field: "email", + component: "Input", + label: t("routes.admin.userManagement_email"), required: true, labelWidth: 85, colProps: { - span: 12, - }, + span: 12 + } }, { - field: 'phoneNumber', - component: 'Input', - label: t('routes.admin.userManagement_phone'), + field: "phoneNumber", + component: "Input", + label: t("routes.admin.userManagement_phone"), required: false, labelWidth: 130, colProps: { - span: 12, - }, + span: 12 + } }, { - field: 'password', - component: 'InputPassword', - label: t('routes.admin.userManagement_password'), + field: "password", + component: "InputPassword", + label: t("routes.admin.userManagement_password"), required: true, labelWidth: 85, colProps: { - span: 12, + span: 12 }, componentProps: { - autocomplete: 'off', - }, + autocomplete: "off" + } }, { - field: 'confirmPassword', - component: 'InputPassword', + field: "confirmPassword", + component: "InputPassword", componentProps: { - autocomplete: 'off', + autocomplete: "off" }, - label: t('routes.admin.userManagement_confirm_password'), + label: t("routes.admin.userManagement_confirm_password"), required: true, labelWidth: 130, colProps: { - span: 12, - }, - }, + span: 12 + } + } ]; export const editFormSchema: FormSchema[] = [ { - field: 'userName', - component: 'Input', - label: t('routes.admin.userManagement_userName'), + field: "userName", + component: "Input", + label: t("routes.admin.userManagement_userName"), labelWidth: 85, required: true, colProps: { - span: 12, + span: 12 }, componentProps: { - autocomplete: 'off', - disabled: true, - }, + autocomplete: "off", + disabled: true + } }, { - field: 'name', - component: 'Input', - label: t('routes.admin.userManagement_name'), + field: "name", + component: "Input", + label: t("routes.admin.userManagement_name"), labelWidth: 130, required: true, colProps: { - span: 12, - }, + span: 12 + } }, { - field: 'email', - component: 'Input', - label: t('routes.admin.userManagement_email'), + field: "email", + component: "Input", + label: t("routes.admin.userManagement_email"), required: true, labelWidth: 85, colProps: { - span: 12, - }, + span: 12 + } }, { - field: 'phoneNumber', - component: 'Input', - label: t('routes.admin.userManagement_phone'), + field: "phoneNumber", + component: "Input", + label: t("routes.admin.userManagement_phone"), required: false, labelWidth: 130, colProps: { - span: 12, - }, + span: 12 + } }, { - field: 'password', - component: 'InputPassword', - label: t('routes.admin.userManagement_password'), + field: "password", + component: "InputPassword", + label: t("routes.admin.userManagement_password"), required: false, labelWidth: 85, colProps: { - span: 12, - }, + span: 12 + } }, { - field: 'confirmPassword', - component: 'InputPassword', - label: t('routes.admin.userManagement_confirm_password'), + field: "confirmPassword", + component: "InputPassword", + label: t("routes.admin.userManagement_confirm_password"), required: false, labelWidth: 130, colProps: { - span: 12, - }, - }, + span: 12 + } + } ]; /** @@ -219,16 +220,16 @@ export async function getTableListAsync( * @param params * @returns */ - export function exportAsync({request}) { +export function exportAsync({ request }) { openFullLoading(); const _userServiceProxy = new UsersServiceProxy(); - _userServiceProxy.export(request).then(res=>{ - const a = document.createElement('a'); - a.href = URL.createObjectURL(res.data); - a.download = '用户列表导出.xlsx'; - a.click(); - closeFullLoading(); - }); + _userServiceProxy.export(request).then(res => { + const a = document.createElement("a"); + a.href = URL.createObjectURL(res.data); + a.download = "用户列表导出.xlsx"; + a.click(); + closeFullLoading(); + }); } /** @@ -261,18 +262,18 @@ export async function createUserAsync({ changeOkLoading, validate, closeModal, - resetFields, + resetFields }) { changeOkLoading(true); await validate(); if (request.password != request.confirmPassword) { - message.error('两次密码输入不一致'); - throw new Error('两次密码输入不一致'); + message.error("两次密码输入不一致"); + throw new Error("两次密码输入不一致"); } const _userServiceProxy = new UsersServiceProxy(); await _userServiceProxy.create(request); changeOkLoading(false); - message.success(t('common.operationSuccess')); + message.success(t("common.operationSuccess")); resetFields(); closeModal(); } @@ -289,7 +290,7 @@ export async function deleteUserAsync({ userId, reload }) { request.id = userId; await _userServiceProxy.delete(request); closeFullLoading(); - message.success(t('common.operationSuccess')); + message.success(t("common.operationSuccess")); reload(); } catch (error) { closeFullLoading(); @@ -305,7 +306,7 @@ export async function updateUserAsync({ changeOkLoading, validate, closeModal, - resetFields, + resetFields }) { changeOkLoading(true); await validate(); @@ -314,7 +315,7 @@ export async function updateUserAsync({ await _userServiceProxy.update(request); changeOkLoading(false); resetFields(); - message.success(t('common.operationSuccess')); + message.success(t("common.operationSuccess")); closeModal(); } diff --git a/vben271/src/views/admin/users/CreateAbpUser.vue b/vben271/src/views/admin/users/CreateAbpUser.vue index 2a95a94e..a0e4949b 100644 --- a/vben271/src/views/admin/users/CreateAbpUser.vue +++ b/vben271/src/views/admin/users/CreateAbpUser.vue @@ -25,7 +25,7 @@ v-for="(item, index) in itemRolesRef" :key="index" :value="item.name" - >{{ item.name }} + >{{ item.name }} @@ -37,88 +37,88 @@ diff --git a/vben271/src/views/admin/users/EditAbpUser.vue b/vben271/src/views/admin/users/EditAbpUser.vue index 4e71ec6c..c9a733ea 100644 --- a/vben271/src/views/admin/users/EditAbpUser.vue +++ b/vben271/src/views/admin/users/EditAbpUser.vue @@ -25,7 +25,9 @@ v-for="(item, index) in rolesRef" :key="index" :value="item.name" - >{{ item.name }} + {{ item.name }} + @@ -37,128 +39,129 @@ 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(); }