From 9dbd0a626c7cc747af2fef4185365ad74837df66 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=8E=8B=E5=86=9B?= <510423039@qq.com> Date: Fri, 13 Jan 2023 22:14:45 +0800 Subject: [PATCH] =?UTF-8?q?chore:=20=E5=8D=87=E7=BA=A7abp7.0.0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- aspnet-core/Directory.Build.Microsoft.targets | 33 +- aspnet-core/Directory.Build.Volo.targets | 175 +- aspnet-core/Directory.Build.targets | 21 +- aspnet-core/Lion.AbpPro.sln | 7 - .../Lion.AbpPro.CAP/Lion.AbpPro.CAP.csproj | 2 +- .../Lion.AbpPro.Core.Tests.csproj | 2 +- .../Lion.AbpPro.Localization.Tests.csproj | 2 +- .../Lion.AbpPro.WebGateway.csproj | 2 +- aspnet-core/global.json | 2 +- ...AbpPro.BasicManagement.HttpApi.Host.csproj | 2 +- .../Users/Dtos/GithubAccessTokenResponse.cs | 24 - ...onAbpApplicationConfigurationAppService.cs | 62 +- ....AbpPro.BasicManagement.Application.csproj | 2 +- .../Lion.AbpPro.BasicManagement.Domain.csproj | 2 +- .../BasicManagementDbContext.cs | 5 +- ...BasicManagement.EntityFrameworkCore.csproj | 2 +- ...Lion.AbpPro.BasicManagement.HttpApi.csproj | 2 +- ...o.BasicManagement.Application.Tests.csproj | 2 +- ...AbpPro.BasicManagement.Domain.Tests.csproj | 2 +- ...anagement.EntityFrameworkCore.Tests.csproj | 2 +- .../BasicManagementConsoleApiClientModule.cs | 15 - .../ClientDemoService.cs | 24 - .../ConsoleTestAppHostedService.cs | 40 - ....HttpApi.Client.ConsoleTestApp.abppkg.json | 1 - ...ement.HttpApi.Client.ConsoleTestApp.csproj | 32 - .../Program.cs | 22 - .../appsettings.json | 21 - .../appsettings.secrets.json | 2 - ...ion.AbpPro.BasicManagement.TestBase.csproj | 2 +- ...taDictionaryManagement.HttpApi.Host.csproj | 2 +- ...ataDictionaryManagement.Application.csproj | 2 +- ...Pro.DataDictionaryManagement.Domain.csproj | 2 +- ...onaryManagement.EntityFrameworkCore.csproj | 2 +- ...ro.DataDictionaryManagement.HttpApi.csproj | 2 +- ...tionaryManagement.Application.Tests.csproj | 2 +- ...taDictionaryManagement.Domain.Tests.csproj | 2 +- ...anagement.EntityFrameworkCore.Tests.csproj | 2 +- ...o.DataDictionaryManagement.TestBase.csproj | 2 +- ....AbpPro.FileManagement.HttpApi.Host.csproj | 2 +- ...n.AbpPro.FileManagement.Application.csproj | 2 +- .../Lion.AbpPro.FileManagement.Domain.csproj | 2 +- ....FileManagement.EntityFrameworkCore.csproj | 2 +- .../Lion.AbpPro.FileManagement.HttpApi.csproj | 2 +- ...ro.FileManagement.Application.Tests.csproj | 2 +- ....AbpPro.FileManagement.Domain.Tests.csproj | 2 +- ...anagement.EntityFrameworkCore.Tests.csproj | 2 +- ...Lion.AbpPro.FileManagement.TestBase.csproj | 2 +- ...NotificationManagement.HttpApi.Host.csproj | 2 +- .../GlobalUsings.cs | 1 - .../Hubs/NotificationHubAppService.cs | 16 +- ....NotificationManagement.Application.csproj | 2 +- ...bpPro.NotificationManagement.Domain.csproj | 2 +- ...ationManagement.EntityFrameworkCore.csproj | 2 +- ...pPro.NotificationManagement.HttpApi.csproj | 2 +- ...icationManagement.Application.Tests.csproj | 2 +- ...NotificationManagement.Domain.Tests.csproj | 2 +- ...anagement.EntityFrameworkCore.Tests.csproj | 2 +- ...Pro.NotificationManagement.TestBase.csproj | 2 +- .../Lion.AbpPro.HttpApi.Host.csproj | 2 +- .../Lion.AbpPro.Application.csproj | 2 +- .../Lion.AbpPro.DbMigrator.csproj | 2 +- .../Lion.AbpPro.Domain.csproj | 2 +- .../EntityFrameworkCore/AbpProDbContext.cs | 4 + .../Lion.AbpPro.EntityFrameworkCore.csproj | 2 +- ...230113040449_UpdateToAbpVnext7.Designer.cs | 1712 + .../20230113040449_UpdateToAbpVnext7.cs | 161 + .../AbpProDbContextModelSnapshot.cs | 171 +- .../Lion.AbpPro.FreeSqlRepository.csproj | 2 +- .../Lion.AbpPro.HttpApi.csproj | 2 +- .../Lion.AbpPro.Application.Tests.csproj | 2 +- .../Lion.AbpPro.Domain.Tests.csproj | 2 +- ...on.AbpPro.EntityFrameworkCore.Tests.csproj | 2 +- ...Lion.AbpPro.FreeSqlRepository.Tests.csproj | 2 +- ...bpPro.HttpApi.Client.ConsoleTestApp.csproj | 2 +- .../Lion.AbpPro.TestBase.csproj | 2 +- ...Lion.AbpPro.Shared.Hosting.Gateways.csproj | 2 +- .../GlobalUsings.cs | 1 - ...AbpPro.Shared.Hosting.Microservices.csproj | 2 +- .../Mvc/Filters/LionResultFilter.cs | 11 +- vben28/.env.development | 2 +- vben28/.env.production | 2 +- vben28/nswag/nswag.json | 2 +- vben28/package.json | 5 +- vben28/pnpm-lock.yaml | 56 +- vben28/src/hooks/web/useSignalR.ts | 72 +- vben28/src/services/ServiceProxies.ts | 26043 ++++++++-------- .../views/admin/dictionary/AbpDictionary.ts | 325 +- .../views/admin/dictionary/AbpDictionary.vue | 367 +- vben28/src/views/admin/settings/Setting.vue | 7 +- 89 files changed, 16027 insertions(+), 13527 deletions(-) delete mode 100644 aspnet-core/modules/BasicManagement/src/Lion.AbpPro.BasicManagement.Application.Contracts/Users/Dtos/GithubAccessTokenResponse.cs delete mode 100644 aspnet-core/modules/BasicManagement/test/Lion.AbpPro.BasicManagement.HttpApi.Client.ConsoleTestApp/BasicManagementConsoleApiClientModule.cs delete mode 100644 aspnet-core/modules/BasicManagement/test/Lion.AbpPro.BasicManagement.HttpApi.Client.ConsoleTestApp/ClientDemoService.cs delete mode 100644 aspnet-core/modules/BasicManagement/test/Lion.AbpPro.BasicManagement.HttpApi.Client.ConsoleTestApp/ConsoleTestAppHostedService.cs delete mode 100644 aspnet-core/modules/BasicManagement/test/Lion.AbpPro.BasicManagement.HttpApi.Client.ConsoleTestApp/Lion.AbpPro.BasicManagement.HttpApi.Client.ConsoleTestApp.abppkg.json delete mode 100644 aspnet-core/modules/BasicManagement/test/Lion.AbpPro.BasicManagement.HttpApi.Client.ConsoleTestApp/Lion.AbpPro.BasicManagement.HttpApi.Client.ConsoleTestApp.csproj delete mode 100644 aspnet-core/modules/BasicManagement/test/Lion.AbpPro.BasicManagement.HttpApi.Client.ConsoleTestApp/Program.cs delete mode 100644 aspnet-core/modules/BasicManagement/test/Lion.AbpPro.BasicManagement.HttpApi.Client.ConsoleTestApp/appsettings.json delete mode 100644 aspnet-core/modules/BasicManagement/test/Lion.AbpPro.BasicManagement.HttpApi.Client.ConsoleTestApp/appsettings.secrets.json create mode 100644 aspnet-core/services/src/Lion.AbpPro.EntityFrameworkCore/Migrations/20230113040449_UpdateToAbpVnext7.Designer.cs create mode 100644 aspnet-core/services/src/Lion.AbpPro.EntityFrameworkCore/Migrations/20230113040449_UpdateToAbpVnext7.cs diff --git a/aspnet-core/Directory.Build.Microsoft.targets b/aspnet-core/Directory.Build.Microsoft.targets index 8f24d1c5..1050fd89 100644 --- a/aspnet-core/Directory.Build.Microsoft.targets +++ b/aspnet-core/Directory.Build.Microsoft.targets @@ -1,23 +1,24 @@  - - + + + + + + + + + + + + + + + + - - - - - - - - - - - - - - + \ No newline at end of file diff --git a/aspnet-core/Directory.Build.Volo.targets b/aspnet-core/Directory.Build.Volo.targets index 6aa7628c..3b60efe8 100644 --- a/aspnet-core/Directory.Build.Volo.targets +++ b/aspnet-core/Directory.Build.Volo.targets @@ -1,91 +1,92 @@  - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/aspnet-core/Directory.Build.targets b/aspnet-core/Directory.Build.targets index 53ef2d19..3a1ffe2a 100644 --- a/aspnet-core/Directory.Build.targets +++ b/aspnet-core/Directory.Build.targets @@ -38,17 +38,16 @@ - - + + - - - - - - - + + + + + + @@ -66,7 +65,7 @@ - + @@ -81,8 +80,6 @@ - - diff --git a/aspnet-core/Lion.AbpPro.sln b/aspnet-core/Lion.AbpPro.sln index c777b7c3..68bddd1f 100644 --- a/aspnet-core/Lion.AbpPro.sln +++ b/aspnet-core/Lion.AbpPro.sln @@ -186,8 +186,6 @@ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Lion.AbpPro.BasicManagement EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Lion.AbpPro.BasicManagement.TestBase", "modules\BasicManagement\test\Lion.AbpPro.BasicManagement.TestBase\Lion.AbpPro.BasicManagement.TestBase.csproj", "{47F2E236-E6BE-4F52-8389-5CF03BDC9B78}" EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Lion.AbpPro.BasicManagement.HttpApi.Client.ConsoleTestApp", "modules\BasicManagement\test\Lion.AbpPro.BasicManagement.HttpApi.Client.ConsoleTestApp\Lion.AbpPro.BasicManagement.HttpApi.Client.ConsoleTestApp.csproj", "{1368FE7F-E1A7-4FD5-AF05-CFA59C0E0E69}" -EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Lion.AbpPro.BasicManagement.EntityFrameworkCore.Tests", "modules\BasicManagement\test\Lion.AbpPro.BasicManagement.EntityFrameworkCore.Tests\Lion.AbpPro.BasicManagement.EntityFrameworkCore.Tests.csproj", "{9ECCC0EC-CC5A-4E49-96BE-3F2B15CCD94D}" EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Lion.AbpPro.BasicManagement.Domain.Tests", "modules\BasicManagement\test\Lion.AbpPro.BasicManagement.Domain.Tests\Lion.AbpPro.BasicManagement.Domain.Tests.csproj", "{2BACB63E-2830-4371-AEBB-E8089E3EB316}" @@ -468,10 +466,6 @@ Global {47F2E236-E6BE-4F52-8389-5CF03BDC9B78}.Debug|Any CPU.Build.0 = Debug|Any CPU {47F2E236-E6BE-4F52-8389-5CF03BDC9B78}.Release|Any CPU.ActiveCfg = Release|Any CPU {47F2E236-E6BE-4F52-8389-5CF03BDC9B78}.Release|Any CPU.Build.0 = Release|Any CPU - {1368FE7F-E1A7-4FD5-AF05-CFA59C0E0E69}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {1368FE7F-E1A7-4FD5-AF05-CFA59C0E0E69}.Debug|Any CPU.Build.0 = Debug|Any CPU - {1368FE7F-E1A7-4FD5-AF05-CFA59C0E0E69}.Release|Any CPU.ActiveCfg = Release|Any CPU - {1368FE7F-E1A7-4FD5-AF05-CFA59C0E0E69}.Release|Any CPU.Build.0 = Release|Any CPU {9ECCC0EC-CC5A-4E49-96BE-3F2B15CCD94D}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {9ECCC0EC-CC5A-4E49-96BE-3F2B15CCD94D}.Debug|Any CPU.Build.0 = Debug|Any CPU {9ECCC0EC-CC5A-4E49-96BE-3F2B15CCD94D}.Release|Any CPU.ActiveCfg = Release|Any CPU @@ -595,7 +589,6 @@ Global {4D808FF7-C204-40F1-881D-21B27D8D290E} = {AF419621-2F14-45CE-AF1B-B688E1B21BCB} {354E0590-F6B2-43F5-A563-F543C498F3EA} = {AF419621-2F14-45CE-AF1B-B688E1B21BCB} {47F2E236-E6BE-4F52-8389-5CF03BDC9B78} = {6464122A-1DC2-45E8-B599-4B5C32FBC85B} - {1368FE7F-E1A7-4FD5-AF05-CFA59C0E0E69} = {6464122A-1DC2-45E8-B599-4B5C32FBC85B} {9ECCC0EC-CC5A-4E49-96BE-3F2B15CCD94D} = {6464122A-1DC2-45E8-B599-4B5C32FBC85B} {2BACB63E-2830-4371-AEBB-E8089E3EB316} = {6464122A-1DC2-45E8-B599-4B5C32FBC85B} {19A28EF9-A5AE-4EC5-851C-D2547E5FE29C} = {6464122A-1DC2-45E8-B599-4B5C32FBC85B} diff --git a/aspnet-core/frameworks/src/Lion.AbpPro.CAP/Lion.AbpPro.CAP.csproj b/aspnet-core/frameworks/src/Lion.AbpPro.CAP/Lion.AbpPro.CAP.csproj index 9ed054df..30696b60 100644 --- a/aspnet-core/frameworks/src/Lion.AbpPro.CAP/Lion.AbpPro.CAP.csproj +++ b/aspnet-core/frameworks/src/Lion.AbpPro.CAP/Lion.AbpPro.CAP.csproj @@ -1,7 +1,7 @@ - netstandard2.1 + net7.0 Lion.AbpPro.CAP diff --git a/aspnet-core/frameworks/test/Lion.AbpPro.Core.Tests/Lion.AbpPro.Core.Tests.csproj b/aspnet-core/frameworks/test/Lion.AbpPro.Core.Tests/Lion.AbpPro.Core.Tests.csproj index dc443d4a..ecbb40f1 100644 --- a/aspnet-core/frameworks/test/Lion.AbpPro.Core.Tests/Lion.AbpPro.Core.Tests.csproj +++ b/aspnet-core/frameworks/test/Lion.AbpPro.Core.Tests/Lion.AbpPro.Core.Tests.csproj @@ -1,7 +1,7 @@ - net6.0 + net7.0 enable false diff --git a/aspnet-core/frameworks/test/Lion.AbpPro.Localization.Tests/Lion.AbpPro.Localization.Tests.csproj b/aspnet-core/frameworks/test/Lion.AbpPro.Localization.Tests/Lion.AbpPro.Localization.Tests.csproj index 9ecd3ffc..40cfad70 100644 --- a/aspnet-core/frameworks/test/Lion.AbpPro.Localization.Tests/Lion.AbpPro.Localization.Tests.csproj +++ b/aspnet-core/frameworks/test/Lion.AbpPro.Localization.Tests/Lion.AbpPro.Localization.Tests.csproj @@ -1,7 +1,7 @@ - net6.0 + net7.0 enable false diff --git a/aspnet-core/gateways/Lion.AbpPro.WebGateway/Lion.AbpPro.WebGateway.csproj b/aspnet-core/gateways/Lion.AbpPro.WebGateway/Lion.AbpPro.WebGateway.csproj index 9b740752..0c90498c 100644 --- a/aspnet-core/gateways/Lion.AbpPro.WebGateway/Lion.AbpPro.WebGateway.csproj +++ b/aspnet-core/gateways/Lion.AbpPro.WebGateway/Lion.AbpPro.WebGateway.csproj @@ -1,7 +1,7 @@ - net6.0 + net7.0 diff --git a/aspnet-core/global.json b/aspnet-core/global.json index 1deca079..b6ff0a69 100644 --- a/aspnet-core/global.json +++ b/aspnet-core/global.json @@ -1,6 +1,6 @@ { "sdk": { - "version": "6.0.202", + "version": "7.0.102", "rollForward": "latestFeature" } } diff --git a/aspnet-core/modules/BasicManagement/host/Lion.AbpPro.BasicManagement.HttpApi.Host/Lion.AbpPro.BasicManagement.HttpApi.Host.csproj b/aspnet-core/modules/BasicManagement/host/Lion.AbpPro.BasicManagement.HttpApi.Host/Lion.AbpPro.BasicManagement.HttpApi.Host.csproj index babbab88..af84b2e9 100644 --- a/aspnet-core/modules/BasicManagement/host/Lion.AbpPro.BasicManagement.HttpApi.Host/Lion.AbpPro.BasicManagement.HttpApi.Host.csproj +++ b/aspnet-core/modules/BasicManagement/host/Lion.AbpPro.BasicManagement.HttpApi.Host/Lion.AbpPro.BasicManagement.HttpApi.Host.csproj @@ -1,7 +1,7 @@ - net6.0 + net7.0 Lion.AbpPro.BasicManagement true Lion.AbpPro.BasicManagement-c2d31439-b723-48e2-b061-5ebd7aeb6010 diff --git a/aspnet-core/modules/BasicManagement/src/Lion.AbpPro.BasicManagement.Application.Contracts/Users/Dtos/GithubAccessTokenResponse.cs b/aspnet-core/modules/BasicManagement/src/Lion.AbpPro.BasicManagement.Application.Contracts/Users/Dtos/GithubAccessTokenResponse.cs deleted file mode 100644 index 62b2299b..00000000 --- a/aspnet-core/modules/BasicManagement/src/Lion.AbpPro.BasicManagement.Application.Contracts/Users/Dtos/GithubAccessTokenResponse.cs +++ /dev/null @@ -1,24 +0,0 @@ -using Newtonsoft.Json; - -namespace Lion.AbpPro.BasicManagement.Users.Dtos; - -public class GithubAccessTokenResponse -{ - /// - /// access_token - /// - [JsonProperty("access_token")] - public string Access_token { get; set; } - - /// - /// scope - /// - [JsonProperty("scope")] - public string Scope { get; set; } - - /// - /// token_type - /// - [JsonProperty("token_type")] - public string TokenType { get; set; } -} \ No newline at end of file diff --git a/aspnet-core/modules/BasicManagement/src/Lion.AbpPro.BasicManagement.Application/ApplicationConfigurations/LionAbpApplicationConfigurationAppService.cs b/aspnet-core/modules/BasicManagement/src/Lion.AbpPro.BasicManagement.Application/ApplicationConfigurations/LionAbpApplicationConfigurationAppService.cs index ad9b9338..4994df34 100644 --- a/aspnet-core/modules/BasicManagement/src/Lion.AbpPro.BasicManagement.Application/ApplicationConfigurations/LionAbpApplicationConfigurationAppService.cs +++ b/aspnet-core/modules/BasicManagement/src/Lion.AbpPro.BasicManagement.Application/ApplicationConfigurations/LionAbpApplicationConfigurationAppService.cs @@ -1,11 +1,12 @@ -namespace Lion.AbpPro.BasicManagement.ApplicationConfigurations; +using Volo.Abp.Localization.External; + +namespace Lion.AbpPro.BasicManagement.ApplicationConfigurations; [Dependency(ReplaceServices = true)] public class LionAbpApplicationConfigurationAppService : ApplicationService, IAbpApplicationConfigurationAppService { private readonly AbpLocalizationOptions _localizationOptions; private readonly AbpMultiTenancyOptions _multiTenancyOptions; - private readonly IServiceProvider _serviceProvider; private readonly IAbpAuthorizationPolicyProvider _abpAuthorizationPolicyProvider; private readonly IPermissionDefinitionManager _permissionDefinitionManager; private readonly DefaultAuthorizationPolicyProvider _defaultAuthorizationPolicyProvider; @@ -23,7 +24,6 @@ public class LionAbpApplicationConfigurationAppService : ApplicationService, IAb public LionAbpApplicationConfigurationAppService( IOptions localizationOptions, IOptions multiTenancyOptions, - IServiceProvider serviceProvider, IAbpAuthorizationPolicyProvider abpAuthorizationPolicyProvider, IPermissionDefinitionManager permissionDefinitionManager, DefaultAuthorizationPolicyProvider defaultAuthorizationPolicyProvider, @@ -38,7 +38,6 @@ public class LionAbpApplicationConfigurationAppService : ApplicationService, IAb IOptions abpClockOptions, ICachedObjectExtensionsDtoService cachedObjectExtensionsDtoService) { - _serviceProvider = serviceProvider; _abpAuthorizationPolicyProvider = abpAuthorizationPolicyProvider; _permissionDefinitionManager = permissionDefinitionManager; _defaultAuthorizationPolicyProvider = defaultAuthorizationPolicyProvider; @@ -56,7 +55,7 @@ public class LionAbpApplicationConfigurationAppService : ApplicationService, IAb _multiTenancyOptions = multiTenancyOptions.Value; } - public virtual async Task GetAsync() + public virtual async Task GetAsync(ApplicationConfigurationRequestOptions options) { //TODO: Optimize & cache..? @@ -66,7 +65,7 @@ public class LionAbpApplicationConfigurationAppService : ApplicationService, IAb { Auth = await GetAuthConfigAsync(), Features = await GetFeaturesConfigAsync(), - Localization = await GetLocalizationConfigAsync(), + //Localization = await GetLocalizationConfigAsync(), CurrentUser = GetCurrentUser(), Setting = await GetSettingConfigAsync(), MultiTenancy = GetMultiTenancy(), @@ -76,6 +75,11 @@ public class LionAbpApplicationConfigurationAppService : ApplicationService, IAb ObjectExtensions = _cachedObjectExtensionsDtoService.Get() }; + if (options.IncludeLocalizationResources) + { + result.Localization = await GetLocalizationConfigAsync(options); + } + Logger.LogDebug("Executed AbpApplicationConfigurationAppService.GetAsync()."); return result; @@ -129,7 +133,7 @@ public class LionAbpApplicationConfigurationAppService : ApplicationService, IAb foreach (var policyName in policyNames) { - if (await _defaultAuthorizationPolicyProvider.GetPolicyAsync(policyName) == null && _permissionDefinitionManager.GetOrNull(policyName) != null) + if (await _defaultAuthorizationPolicyProvider.GetPolicyAsync(policyName) == null && _permissionDefinitionManager.GetOrNullAsync(policyName) != null) { abpPolicyNames.Add(policyName); } @@ -141,7 +145,7 @@ public class LionAbpApplicationConfigurationAppService : ApplicationService, IAb foreach (var policyName in otherPolicyNames) { - authConfig.Policies[policyName] = true; + //authConfig.Policies[policyName] = true; if (await _authorizationService.IsGrantedAsync(policyName)) { @@ -152,7 +156,7 @@ public class LionAbpApplicationConfigurationAppService : ApplicationService, IAb var result = await _permissionChecker.IsGrantedAsync(abpPolicyNames.ToArray()); foreach (var (key, value) in result.Result) { - authConfig.Policies[key] = true; + //authConfig.Policies[key] = true; if (value == PermissionGrantResult.Granted) { authConfig.GrantedPolicies[key] = true; @@ -208,26 +212,42 @@ public class LionAbpApplicationConfigurationAppService : ApplicationService, IAb } - protected virtual async Task GetLocalizationConfigAsync() + protected virtual async Task GetLocalizationConfigAsync( + ApplicationConfigurationRequestOptions options) { var localizationConfig = new ApplicationLocalizationConfigurationDto(); localizationConfig.Languages.AddRange(await _languageProvider.GetLanguagesAsync()); - foreach (var resource in _localizationOptions.Resources.Values) + if (options.IncludeLocalizationResources) { - var dictionary = new Dictionary(); + var resourceNames = _localizationOptions + .Resources + .Values + .Select(x => x.ResourceName) + .Union( + await LazyServiceProvider + .LazyGetRequiredService() + .GetResourceNamesAsync() + ); + + foreach (var resourceName in resourceNames) + { + var dictionary = new Dictionary(); - var localizer = _serviceProvider.GetRequiredService( - typeof(IStringLocalizer<>).MakeGenericType(resource.ResourceType) - ) as IStringLocalizer; + var localizer = await StringLocalizerFactory + .CreateByResourceNameOrNullAsync(resourceName); - foreach (var localizedString in localizer.GetAllStrings()) - { - dictionary[localizedString.Name] = localizedString.Value; - } + if (localizer != null) + { + foreach (var localizedString in await localizer.GetAllStringsAsync()) + { + dictionary[localizedString.Name] = localizedString.Value; + } + } - localizationConfig.Values[resource.ResourceName] = dictionary; + localizationConfig.Values[resourceName] = dictionary; + } } localizationConfig.CurrentCulture = GetCurrentCultureInfo(); @@ -294,7 +314,7 @@ public class LionAbpApplicationConfigurationAppService : ApplicationService, IAb { var result = new ApplicationFeatureConfigurationDto(); - foreach (var featureDefinition in _featureDefinitionManager.GetAll()) + foreach (var featureDefinition in await _featureDefinitionManager.GetAllAsync()) { if (!featureDefinition.IsVisibleToClients) { diff --git a/aspnet-core/modules/BasicManagement/src/Lion.AbpPro.BasicManagement.Application/Lion.AbpPro.BasicManagement.Application.csproj b/aspnet-core/modules/BasicManagement/src/Lion.AbpPro.BasicManagement.Application/Lion.AbpPro.BasicManagement.Application.csproj index 69be1ccf..d989a156 100644 --- a/aspnet-core/modules/BasicManagement/src/Lion.AbpPro.BasicManagement.Application/Lion.AbpPro.BasicManagement.Application.csproj +++ b/aspnet-core/modules/BasicManagement/src/Lion.AbpPro.BasicManagement.Application/Lion.AbpPro.BasicManagement.Application.csproj @@ -1,7 +1,7 @@ - net6.0 + net7.0 Lion.AbpPro.BasicManagement diff --git a/aspnet-core/modules/BasicManagement/src/Lion.AbpPro.BasicManagement.Domain/Lion.AbpPro.BasicManagement.Domain.csproj b/aspnet-core/modules/BasicManagement/src/Lion.AbpPro.BasicManagement.Domain/Lion.AbpPro.BasicManagement.Domain.csproj index 0cc0075d..b12c4cff 100644 --- a/aspnet-core/modules/BasicManagement/src/Lion.AbpPro.BasicManagement.Domain/Lion.AbpPro.BasicManagement.Domain.csproj +++ b/aspnet-core/modules/BasicManagement/src/Lion.AbpPro.BasicManagement.Domain/Lion.AbpPro.BasicManagement.Domain.csproj @@ -1,7 +1,7 @@ - net6.0 + net7.0 Lion.AbpPro.BasicManagement diff --git a/aspnet-core/modules/BasicManagement/src/Lion.AbpPro.BasicManagement.EntityFrameworkCore/EntityFrameworkCore/BasicManagementDbContext.cs b/aspnet-core/modules/BasicManagement/src/Lion.AbpPro.BasicManagement.EntityFrameworkCore/EntityFrameworkCore/BasicManagementDbContext.cs index 37b6c8d4..cffe1d87 100644 --- a/aspnet-core/modules/BasicManagement/src/Lion.AbpPro.BasicManagement.EntityFrameworkCore/EntityFrameworkCore/BasicManagementDbContext.cs +++ b/aspnet-core/modules/BasicManagement/src/Lion.AbpPro.BasicManagement.EntityFrameworkCore/EntityFrameworkCore/BasicManagementDbContext.cs @@ -3,7 +3,8 @@ [ConnectionStringName(BasicManagementDbProperties.ConnectionStringName)] public class BasicManagementDbContext : AbpDbContext, IBasicManagementDbContext { - + public DbSet FeatureGroups { get; set; } + public DbSet Features { get; set; } public DbSet FeatureValues { get; set; } public DbSet Users { get; set; } public DbSet Roles { get; set; } @@ -11,6 +12,8 @@ public class BasicManagementDbContext : AbpDbContext, public DbSet OrganizationUnits { get; set; } public DbSet SecurityLogs { get; set; } public DbSet LinkUsers { get; set; } + public DbSet PermissionGroups { get; set; } + public DbSet Permissions { get; set; } public DbSet PermissionGrants { get; set; } public DbSet Settings { get; set; } public DbSet Tenants { get; set; } diff --git a/aspnet-core/modules/BasicManagement/src/Lion.AbpPro.BasicManagement.EntityFrameworkCore/Lion.AbpPro.BasicManagement.EntityFrameworkCore.csproj b/aspnet-core/modules/BasicManagement/src/Lion.AbpPro.BasicManagement.EntityFrameworkCore/Lion.AbpPro.BasicManagement.EntityFrameworkCore.csproj index 1e9a6187..f1dd41c2 100644 --- a/aspnet-core/modules/BasicManagement/src/Lion.AbpPro.BasicManagement.EntityFrameworkCore/Lion.AbpPro.BasicManagement.EntityFrameworkCore.csproj +++ b/aspnet-core/modules/BasicManagement/src/Lion.AbpPro.BasicManagement.EntityFrameworkCore/Lion.AbpPro.BasicManagement.EntityFrameworkCore.csproj @@ -1,7 +1,7 @@ - net6.0 + net7.0 Lion.AbpPro.BasicManagement diff --git a/aspnet-core/modules/BasicManagement/src/Lion.AbpPro.BasicManagement.HttpApi/Lion.AbpPro.BasicManagement.HttpApi.csproj b/aspnet-core/modules/BasicManagement/src/Lion.AbpPro.BasicManagement.HttpApi/Lion.AbpPro.BasicManagement.HttpApi.csproj index 578798d1..b2291973 100644 --- a/aspnet-core/modules/BasicManagement/src/Lion.AbpPro.BasicManagement.HttpApi/Lion.AbpPro.BasicManagement.HttpApi.csproj +++ b/aspnet-core/modules/BasicManagement/src/Lion.AbpPro.BasicManagement.HttpApi/Lion.AbpPro.BasicManagement.HttpApi.csproj @@ -1,7 +1,7 @@ - net6.0 + net7.0 Lion.AbpPro.BasicManagement diff --git a/aspnet-core/modules/BasicManagement/test/Lion.AbpPro.BasicManagement.Application.Tests/Lion.AbpPro.BasicManagement.Application.Tests.csproj b/aspnet-core/modules/BasicManagement/test/Lion.AbpPro.BasicManagement.Application.Tests/Lion.AbpPro.BasicManagement.Application.Tests.csproj index 4ef91a81..551972be 100644 --- a/aspnet-core/modules/BasicManagement/test/Lion.AbpPro.BasicManagement.Application.Tests/Lion.AbpPro.BasicManagement.Application.Tests.csproj +++ b/aspnet-core/modules/BasicManagement/test/Lion.AbpPro.BasicManagement.Application.Tests/Lion.AbpPro.BasicManagement.Application.Tests.csproj @@ -1,7 +1,7 @@ - net6.0 + net7.0 Lion.AbpPro.BasicManagement diff --git a/aspnet-core/modules/BasicManagement/test/Lion.AbpPro.BasicManagement.Domain.Tests/Lion.AbpPro.BasicManagement.Domain.Tests.csproj b/aspnet-core/modules/BasicManagement/test/Lion.AbpPro.BasicManagement.Domain.Tests/Lion.AbpPro.BasicManagement.Domain.Tests.csproj index c7b54f0d..873cefe8 100644 --- a/aspnet-core/modules/BasicManagement/test/Lion.AbpPro.BasicManagement.Domain.Tests/Lion.AbpPro.BasicManagement.Domain.Tests.csproj +++ b/aspnet-core/modules/BasicManagement/test/Lion.AbpPro.BasicManagement.Domain.Tests/Lion.AbpPro.BasicManagement.Domain.Tests.csproj @@ -1,7 +1,7 @@ - net6.0 + net7.0 Lion.AbpPro.BasicManagement diff --git a/aspnet-core/modules/BasicManagement/test/Lion.AbpPro.BasicManagement.EntityFrameworkCore.Tests/Lion.AbpPro.BasicManagement.EntityFrameworkCore.Tests.csproj b/aspnet-core/modules/BasicManagement/test/Lion.AbpPro.BasicManagement.EntityFrameworkCore.Tests/Lion.AbpPro.BasicManagement.EntityFrameworkCore.Tests.csproj index 9c8dac5a..98072691 100644 --- a/aspnet-core/modules/BasicManagement/test/Lion.AbpPro.BasicManagement.EntityFrameworkCore.Tests/Lion.AbpPro.BasicManagement.EntityFrameworkCore.Tests.csproj +++ b/aspnet-core/modules/BasicManagement/test/Lion.AbpPro.BasicManagement.EntityFrameworkCore.Tests/Lion.AbpPro.BasicManagement.EntityFrameworkCore.Tests.csproj @@ -1,7 +1,7 @@ - net6.0 + net7.0 Lion.AbpPro.BasicManagement diff --git a/aspnet-core/modules/BasicManagement/test/Lion.AbpPro.BasicManagement.HttpApi.Client.ConsoleTestApp/BasicManagementConsoleApiClientModule.cs b/aspnet-core/modules/BasicManagement/test/Lion.AbpPro.BasicManagement.HttpApi.Client.ConsoleTestApp/BasicManagementConsoleApiClientModule.cs deleted file mode 100644 index 28e899f4..00000000 --- a/aspnet-core/modules/BasicManagement/test/Lion.AbpPro.BasicManagement.HttpApi.Client.ConsoleTestApp/BasicManagementConsoleApiClientModule.cs +++ /dev/null @@ -1,15 +0,0 @@ -using Volo.Abp.Autofac; -using Volo.Abp.Http.Client.IdentityModel; -using Volo.Abp.Modularity; - -namespace Lion.AbpPro.BasicManagement; - -[DependsOn( - typeof(AbpAutofacModule), - typeof(BasicManagementHttpApiClientModule), - typeof(AbpHttpClientIdentityModelModule) - )] -public class BasicManagementConsoleApiClientModule : AbpModule -{ - -} diff --git a/aspnet-core/modules/BasicManagement/test/Lion.AbpPro.BasicManagement.HttpApi.Client.ConsoleTestApp/ClientDemoService.cs b/aspnet-core/modules/BasicManagement/test/Lion.AbpPro.BasicManagement.HttpApi.Client.ConsoleTestApp/ClientDemoService.cs deleted file mode 100644 index 8a82d2d9..00000000 --- a/aspnet-core/modules/BasicManagement/test/Lion.AbpPro.BasicManagement.HttpApi.Client.ConsoleTestApp/ClientDemoService.cs +++ /dev/null @@ -1,24 +0,0 @@ -using Microsoft.Extensions.Configuration; -using Volo.Abp.DependencyInjection; -using Volo.Abp.IdentityModel; - -namespace Lion.AbpPro.BasicManagement; - -public class ClientDemoService : ITransientDependency -{ - private readonly IIdentityModelAuthenticationService _authenticationService; - private readonly IConfiguration _configuration; - - public ClientDemoService( - IIdentityModelAuthenticationService authenticationService, - IConfiguration configuration) - { - _authenticationService = authenticationService; - _configuration = configuration; - } - - public async Task RunAsync() - { - await Task.CompletedTask; - } -} \ No newline at end of file diff --git a/aspnet-core/modules/BasicManagement/test/Lion.AbpPro.BasicManagement.HttpApi.Client.ConsoleTestApp/ConsoleTestAppHostedService.cs b/aspnet-core/modules/BasicManagement/test/Lion.AbpPro.BasicManagement.HttpApi.Client.ConsoleTestApp/ConsoleTestAppHostedService.cs deleted file mode 100644 index 24fe7a73..00000000 --- a/aspnet-core/modules/BasicManagement/test/Lion.AbpPro.BasicManagement.HttpApi.Client.ConsoleTestApp/ConsoleTestAppHostedService.cs +++ /dev/null @@ -1,40 +0,0 @@ -using Microsoft.Extensions.Hosting; -using System.Threading; -using System.Threading.Tasks; -using Microsoft.Extensions.Configuration; -using Microsoft.Extensions.DependencyInjection; -using Volo.Abp; - -namespace Lion.AbpPro.BasicManagement.HttpApi.Client.ConsoleTestApp; - -public class ConsoleTestAppHostedService : IHostedService -{ - private readonly IConfiguration _configuration; - - public ConsoleTestAppHostedService(IConfiguration configuration) - { - _configuration = configuration; - } - - public async Task StartAsync(CancellationToken cancellationToken) - { - using (var application = await AbpApplicationFactory.CreateAsync(options => - { - options.Services.ReplaceConfiguration(_configuration); - options.UseAutofac(); - })) - { - await application.InitializeAsync(); - - var demo = application.ServiceProvider.GetRequiredService(); - await demo.RunAsync(); - - await application.ShutdownAsync(); - } - } - - public Task StopAsync(CancellationToken cancellationToken) - { - return Task.CompletedTask; - } -} diff --git a/aspnet-core/modules/BasicManagement/test/Lion.AbpPro.BasicManagement.HttpApi.Client.ConsoleTestApp/Lion.AbpPro.BasicManagement.HttpApi.Client.ConsoleTestApp.abppkg.json b/aspnet-core/modules/BasicManagement/test/Lion.AbpPro.BasicManagement.HttpApi.Client.ConsoleTestApp/Lion.AbpPro.BasicManagement.HttpApi.Client.ConsoleTestApp.abppkg.json deleted file mode 100644 index 9e26dfee..00000000 --- a/aspnet-core/modules/BasicManagement/test/Lion.AbpPro.BasicManagement.HttpApi.Client.ConsoleTestApp/Lion.AbpPro.BasicManagement.HttpApi.Client.ConsoleTestApp.abppkg.json +++ /dev/null @@ -1 +0,0 @@ -{} \ No newline at end of file diff --git a/aspnet-core/modules/BasicManagement/test/Lion.AbpPro.BasicManagement.HttpApi.Client.ConsoleTestApp/Lion.AbpPro.BasicManagement.HttpApi.Client.ConsoleTestApp.csproj b/aspnet-core/modules/BasicManagement/test/Lion.AbpPro.BasicManagement.HttpApi.Client.ConsoleTestApp/Lion.AbpPro.BasicManagement.HttpApi.Client.ConsoleTestApp.csproj deleted file mode 100644 index 019f66db..00000000 --- a/aspnet-core/modules/BasicManagement/test/Lion.AbpPro.BasicManagement.HttpApi.Client.ConsoleTestApp/Lion.AbpPro.BasicManagement.HttpApi.Client.ConsoleTestApp.csproj +++ /dev/null @@ -1,32 +0,0 @@ - - - - Exe - net6.0 - Lion.AbpPro.BasicManagement - - - - - - - - - - - - PreserveNewest - Always - - - - PreserveNewest - Always - - - - - - - - diff --git a/aspnet-core/modules/BasicManagement/test/Lion.AbpPro.BasicManagement.HttpApi.Client.ConsoleTestApp/Program.cs b/aspnet-core/modules/BasicManagement/test/Lion.AbpPro.BasicManagement.HttpApi.Client.ConsoleTestApp/Program.cs deleted file mode 100644 index aa51b4f8..00000000 --- a/aspnet-core/modules/BasicManagement/test/Lion.AbpPro.BasicManagement.HttpApi.Client.ConsoleTestApp/Program.cs +++ /dev/null @@ -1,22 +0,0 @@ -using System.Threading.Tasks; -using Microsoft.Extensions.Configuration; -using Microsoft.Extensions.DependencyInjection; -using Microsoft.Extensions.Hosting; - -namespace Lion.AbpPro.BasicManagement.HttpApi.Client.ConsoleTestApp; - -class Program -{ - static async Task Main(string[] args) - { - await CreateHostBuilder(args).RunConsoleAsync(); - } - - public static IHostBuilder CreateHostBuilder(string[] args) => - Host.CreateDefaultBuilder(args) - .AddAppSettingsSecretsJson() - .ConfigureServices((hostContext, services) => - { - services.AddHostedService(); - }); -} diff --git a/aspnet-core/modules/BasicManagement/test/Lion.AbpPro.BasicManagement.HttpApi.Client.ConsoleTestApp/appsettings.json b/aspnet-core/modules/BasicManagement/test/Lion.AbpPro.BasicManagement.HttpApi.Client.ConsoleTestApp/appsettings.json deleted file mode 100644 index d5defdcb..00000000 --- a/aspnet-core/modules/BasicManagement/test/Lion.AbpPro.BasicManagement.HttpApi.Client.ConsoleTestApp/appsettings.json +++ /dev/null @@ -1,21 +0,0 @@ -{ - "RemoteServices": { - "Default": { - "BaseUrl": "https://localhost:44342/" - }, - "BasicManagement": { - "BaseUrl": "https://localhost:44324/" - } - }, - "IdentityClients": { - "Default": { - "GrantType": "password", - "ClientId": "BasicManagement_App", - "ClientSecret": "1q2w3e*", - "UserName": "admin", - "UserPassword": "1q2w3E*", - "Authority": "https://localhost:44342/", - "Scope": "BasicManagement" - } - } -} diff --git a/aspnet-core/modules/BasicManagement/test/Lion.AbpPro.BasicManagement.HttpApi.Client.ConsoleTestApp/appsettings.secrets.json b/aspnet-core/modules/BasicManagement/test/Lion.AbpPro.BasicManagement.HttpApi.Client.ConsoleTestApp/appsettings.secrets.json deleted file mode 100644 index 7a73a41b..00000000 --- a/aspnet-core/modules/BasicManagement/test/Lion.AbpPro.BasicManagement.HttpApi.Client.ConsoleTestApp/appsettings.secrets.json +++ /dev/null @@ -1,2 +0,0 @@ -{ -} \ No newline at end of file diff --git a/aspnet-core/modules/BasicManagement/test/Lion.AbpPro.BasicManagement.TestBase/Lion.AbpPro.BasicManagement.TestBase.csproj b/aspnet-core/modules/BasicManagement/test/Lion.AbpPro.BasicManagement.TestBase/Lion.AbpPro.BasicManagement.TestBase.csproj index 345cd965..a06efd37 100644 --- a/aspnet-core/modules/BasicManagement/test/Lion.AbpPro.BasicManagement.TestBase/Lion.AbpPro.BasicManagement.TestBase.csproj +++ b/aspnet-core/modules/BasicManagement/test/Lion.AbpPro.BasicManagement.TestBase/Lion.AbpPro.BasicManagement.TestBase.csproj @@ -1,7 +1,7 @@ - net6.0 + net7.0 Lion.AbpPro.BasicManagement diff --git a/aspnet-core/modules/DataDictionaryManagement/host/Lion.AbpPro.DataDictionaryManagement.HttpApi.Host/Lion.AbpPro.DataDictionaryManagement.HttpApi.Host.csproj b/aspnet-core/modules/DataDictionaryManagement/host/Lion.AbpPro.DataDictionaryManagement.HttpApi.Host/Lion.AbpPro.DataDictionaryManagement.HttpApi.Host.csproj index b730ddbe..f3c00529 100644 --- a/aspnet-core/modules/DataDictionaryManagement/host/Lion.AbpPro.DataDictionaryManagement.HttpApi.Host/Lion.AbpPro.DataDictionaryManagement.HttpApi.Host.csproj +++ b/aspnet-core/modules/DataDictionaryManagement/host/Lion.AbpPro.DataDictionaryManagement.HttpApi.Host/Lion.AbpPro.DataDictionaryManagement.HttpApi.Host.csproj @@ -2,7 +2,7 @@ - net6.0 + net7.0 Lion.AbpPro.DataDictionaryManagement true Lion.AbpPro.DataDictionaryManagement-c2d31439-b723-48e2-b061-5ebd7aeb6010 diff --git a/aspnet-core/modules/DataDictionaryManagement/src/Lion.AbpPro.DataDictionaryManagement.Application/Lion.AbpPro.DataDictionaryManagement.Application.csproj b/aspnet-core/modules/DataDictionaryManagement/src/Lion.AbpPro.DataDictionaryManagement.Application/Lion.AbpPro.DataDictionaryManagement.Application.csproj index 343aeba0..88ac50f0 100644 --- a/aspnet-core/modules/DataDictionaryManagement/src/Lion.AbpPro.DataDictionaryManagement.Application/Lion.AbpPro.DataDictionaryManagement.Application.csproj +++ b/aspnet-core/modules/DataDictionaryManagement/src/Lion.AbpPro.DataDictionaryManagement.Application/Lion.AbpPro.DataDictionaryManagement.Application.csproj @@ -1,7 +1,7 @@ - net6.0 + net7.0 Lion.AbpPro.DataDictionaryManagement diff --git a/aspnet-core/modules/DataDictionaryManagement/src/Lion.AbpPro.DataDictionaryManagement.Domain/Lion.AbpPro.DataDictionaryManagement.Domain.csproj b/aspnet-core/modules/DataDictionaryManagement/src/Lion.AbpPro.DataDictionaryManagement.Domain/Lion.AbpPro.DataDictionaryManagement.Domain.csproj index 1defd52d..e5becc45 100644 --- a/aspnet-core/modules/DataDictionaryManagement/src/Lion.AbpPro.DataDictionaryManagement.Domain/Lion.AbpPro.DataDictionaryManagement.Domain.csproj +++ b/aspnet-core/modules/DataDictionaryManagement/src/Lion.AbpPro.DataDictionaryManagement.Domain/Lion.AbpPro.DataDictionaryManagement.Domain.csproj @@ -1,7 +1,7 @@ - net6.0 + net7.0 Lion.AbpPro.DataDictionaryManagement diff --git a/aspnet-core/modules/DataDictionaryManagement/src/Lion.AbpPro.DataDictionaryManagement.EntityFrameworkCore/Lion.AbpPro.DataDictionaryManagement.EntityFrameworkCore.csproj b/aspnet-core/modules/DataDictionaryManagement/src/Lion.AbpPro.DataDictionaryManagement.EntityFrameworkCore/Lion.AbpPro.DataDictionaryManagement.EntityFrameworkCore.csproj index db555206..f5a1cb76 100644 --- a/aspnet-core/modules/DataDictionaryManagement/src/Lion.AbpPro.DataDictionaryManagement.EntityFrameworkCore/Lion.AbpPro.DataDictionaryManagement.EntityFrameworkCore.csproj +++ b/aspnet-core/modules/DataDictionaryManagement/src/Lion.AbpPro.DataDictionaryManagement.EntityFrameworkCore/Lion.AbpPro.DataDictionaryManagement.EntityFrameworkCore.csproj @@ -1,7 +1,7 @@ - net6.0 + net7.0 Lion.AbpPro.DataDictionaryManagement diff --git a/aspnet-core/modules/DataDictionaryManagement/src/Lion.AbpPro.DataDictionaryManagement.HttpApi/Lion.AbpPro.DataDictionaryManagement.HttpApi.csproj b/aspnet-core/modules/DataDictionaryManagement/src/Lion.AbpPro.DataDictionaryManagement.HttpApi/Lion.AbpPro.DataDictionaryManagement.HttpApi.csproj index 737ac116..695db021 100644 --- a/aspnet-core/modules/DataDictionaryManagement/src/Lion.AbpPro.DataDictionaryManagement.HttpApi/Lion.AbpPro.DataDictionaryManagement.HttpApi.csproj +++ b/aspnet-core/modules/DataDictionaryManagement/src/Lion.AbpPro.DataDictionaryManagement.HttpApi/Lion.AbpPro.DataDictionaryManagement.HttpApi.csproj @@ -1,7 +1,7 @@ - net6.0 + net7.0 Lion.AbpPro.DataDictionaryManagement diff --git a/aspnet-core/modules/DataDictionaryManagement/test/Lion.AbpPro.DataDictionaryManagement.Application.Tests/Lion.AbpPro.DataDictionaryManagement.Application.Tests.csproj b/aspnet-core/modules/DataDictionaryManagement/test/Lion.AbpPro.DataDictionaryManagement.Application.Tests/Lion.AbpPro.DataDictionaryManagement.Application.Tests.csproj index b60bf3e4..b91d8304 100644 --- a/aspnet-core/modules/DataDictionaryManagement/test/Lion.AbpPro.DataDictionaryManagement.Application.Tests/Lion.AbpPro.DataDictionaryManagement.Application.Tests.csproj +++ b/aspnet-core/modules/DataDictionaryManagement/test/Lion.AbpPro.DataDictionaryManagement.Application.Tests/Lion.AbpPro.DataDictionaryManagement.Application.Tests.csproj @@ -2,7 +2,7 @@ - net6.0 + net7.0 Lion.AbpPro.DataDictionaryManagement false diff --git a/aspnet-core/modules/DataDictionaryManagement/test/Lion.AbpPro.DataDictionaryManagement.Domain.Tests/Lion.AbpPro.DataDictionaryManagement.Domain.Tests.csproj b/aspnet-core/modules/DataDictionaryManagement/test/Lion.AbpPro.DataDictionaryManagement.Domain.Tests/Lion.AbpPro.DataDictionaryManagement.Domain.Tests.csproj index 8c6e3c69..7a5bf6e2 100644 --- a/aspnet-core/modules/DataDictionaryManagement/test/Lion.AbpPro.DataDictionaryManagement.Domain.Tests/Lion.AbpPro.DataDictionaryManagement.Domain.Tests.csproj +++ b/aspnet-core/modules/DataDictionaryManagement/test/Lion.AbpPro.DataDictionaryManagement.Domain.Tests/Lion.AbpPro.DataDictionaryManagement.Domain.Tests.csproj @@ -2,7 +2,7 @@ - net6.0 + net7.0 Lion.AbpPro.DataDictionaryManagement false diff --git a/aspnet-core/modules/DataDictionaryManagement/test/Lion.AbpPro.DataDictionaryManagement.EntityFrameworkCore.Tests/Lion.AbpPro.DataDictionaryManagement.EntityFrameworkCore.Tests.csproj b/aspnet-core/modules/DataDictionaryManagement/test/Lion.AbpPro.DataDictionaryManagement.EntityFrameworkCore.Tests/Lion.AbpPro.DataDictionaryManagement.EntityFrameworkCore.Tests.csproj index f64f5879..164384f7 100644 --- a/aspnet-core/modules/DataDictionaryManagement/test/Lion.AbpPro.DataDictionaryManagement.EntityFrameworkCore.Tests/Lion.AbpPro.DataDictionaryManagement.EntityFrameworkCore.Tests.csproj +++ b/aspnet-core/modules/DataDictionaryManagement/test/Lion.AbpPro.DataDictionaryManagement.EntityFrameworkCore.Tests/Lion.AbpPro.DataDictionaryManagement.EntityFrameworkCore.Tests.csproj @@ -2,7 +2,7 @@ - net6.0 + net7.0 Lion.AbpPro.DataDictionaryManagement false diff --git a/aspnet-core/modules/DataDictionaryManagement/test/Lion.AbpPro.DataDictionaryManagement.TestBase/Lion.AbpPro.DataDictionaryManagement.TestBase.csproj b/aspnet-core/modules/DataDictionaryManagement/test/Lion.AbpPro.DataDictionaryManagement.TestBase/Lion.AbpPro.DataDictionaryManagement.TestBase.csproj index 987f7ca9..b3f1d76e 100644 --- a/aspnet-core/modules/DataDictionaryManagement/test/Lion.AbpPro.DataDictionaryManagement.TestBase/Lion.AbpPro.DataDictionaryManagement.TestBase.csproj +++ b/aspnet-core/modules/DataDictionaryManagement/test/Lion.AbpPro.DataDictionaryManagement.TestBase/Lion.AbpPro.DataDictionaryManagement.TestBase.csproj @@ -2,7 +2,7 @@ - net6.0 + net7.0 Lion.AbpPro.DataDictionaryManagement false diff --git a/aspnet-core/modules/FileManagement/host/Lion.AbpPro.FileManagement.HttpApi.Host/Lion.AbpPro.FileManagement.HttpApi.Host.csproj b/aspnet-core/modules/FileManagement/host/Lion.AbpPro.FileManagement.HttpApi.Host/Lion.AbpPro.FileManagement.HttpApi.Host.csproj index c3e7fe90..c46de31b 100644 --- a/aspnet-core/modules/FileManagement/host/Lion.AbpPro.FileManagement.HttpApi.Host/Lion.AbpPro.FileManagement.HttpApi.Host.csproj +++ b/aspnet-core/modules/FileManagement/host/Lion.AbpPro.FileManagement.HttpApi.Host/Lion.AbpPro.FileManagement.HttpApi.Host.csproj @@ -2,7 +2,7 @@ - net6.0 + net7.0 Lion.AbpPro.FileManagement true Lion.AbpPro.FileManagement-c2d31439-b723-48e2-b061-5ebd7aeb6010 diff --git a/aspnet-core/modules/FileManagement/src/Lion.AbpPro.FileManagement.Application/Lion.AbpPro.FileManagement.Application.csproj b/aspnet-core/modules/FileManagement/src/Lion.AbpPro.FileManagement.Application/Lion.AbpPro.FileManagement.Application.csproj index c53cbfd2..d7dc515b 100644 --- a/aspnet-core/modules/FileManagement/src/Lion.AbpPro.FileManagement.Application/Lion.AbpPro.FileManagement.Application.csproj +++ b/aspnet-core/modules/FileManagement/src/Lion.AbpPro.FileManagement.Application/Lion.AbpPro.FileManagement.Application.csproj @@ -2,7 +2,7 @@ - net6.0 + net7.0 Lion.AbpPro.FileManagement diff --git a/aspnet-core/modules/FileManagement/src/Lion.AbpPro.FileManagement.Domain/Lion.AbpPro.FileManagement.Domain.csproj b/aspnet-core/modules/FileManagement/src/Lion.AbpPro.FileManagement.Domain/Lion.AbpPro.FileManagement.Domain.csproj index f80ed01c..7ac80592 100644 --- a/aspnet-core/modules/FileManagement/src/Lion.AbpPro.FileManagement.Domain/Lion.AbpPro.FileManagement.Domain.csproj +++ b/aspnet-core/modules/FileManagement/src/Lion.AbpPro.FileManagement.Domain/Lion.AbpPro.FileManagement.Domain.csproj @@ -2,7 +2,7 @@ - net6.0 + net7.0 Lion.AbpPro.FileManagement diff --git a/aspnet-core/modules/FileManagement/src/Lion.AbpPro.FileManagement.EntityFrameworkCore/Lion.AbpPro.FileManagement.EntityFrameworkCore.csproj b/aspnet-core/modules/FileManagement/src/Lion.AbpPro.FileManagement.EntityFrameworkCore/Lion.AbpPro.FileManagement.EntityFrameworkCore.csproj index 674e2d4c..f633a485 100644 --- a/aspnet-core/modules/FileManagement/src/Lion.AbpPro.FileManagement.EntityFrameworkCore/Lion.AbpPro.FileManagement.EntityFrameworkCore.csproj +++ b/aspnet-core/modules/FileManagement/src/Lion.AbpPro.FileManagement.EntityFrameworkCore/Lion.AbpPro.FileManagement.EntityFrameworkCore.csproj @@ -2,7 +2,7 @@ - net6.0 + net7.0 Lion.AbpPro.FileManagement diff --git a/aspnet-core/modules/FileManagement/src/Lion.AbpPro.FileManagement.HttpApi/Lion.AbpPro.FileManagement.HttpApi.csproj b/aspnet-core/modules/FileManagement/src/Lion.AbpPro.FileManagement.HttpApi/Lion.AbpPro.FileManagement.HttpApi.csproj index 55e351ab..a405bd7c 100644 --- a/aspnet-core/modules/FileManagement/src/Lion.AbpPro.FileManagement.HttpApi/Lion.AbpPro.FileManagement.HttpApi.csproj +++ b/aspnet-core/modules/FileManagement/src/Lion.AbpPro.FileManagement.HttpApi/Lion.AbpPro.FileManagement.HttpApi.csproj @@ -2,7 +2,7 @@ - net6.0 + net7.0 Lion.AbpPro.FileManagement diff --git a/aspnet-core/modules/FileManagement/test/Lion.AbpPro.FileManagement.Application.Tests/Lion.AbpPro.FileManagement.Application.Tests.csproj b/aspnet-core/modules/FileManagement/test/Lion.AbpPro.FileManagement.Application.Tests/Lion.AbpPro.FileManagement.Application.Tests.csproj index 940dd032..5c6f2ed4 100644 --- a/aspnet-core/modules/FileManagement/test/Lion.AbpPro.FileManagement.Application.Tests/Lion.AbpPro.FileManagement.Application.Tests.csproj +++ b/aspnet-core/modules/FileManagement/test/Lion.AbpPro.FileManagement.Application.Tests/Lion.AbpPro.FileManagement.Application.Tests.csproj @@ -3,7 +3,7 @@ - net6.0 + net7.0 Lion.AbpPro.FileManagement diff --git a/aspnet-core/modules/FileManagement/test/Lion.AbpPro.FileManagement.Domain.Tests/Lion.AbpPro.FileManagement.Domain.Tests.csproj b/aspnet-core/modules/FileManagement/test/Lion.AbpPro.FileManagement.Domain.Tests/Lion.AbpPro.FileManagement.Domain.Tests.csproj index 72af8a72..fa119307 100644 --- a/aspnet-core/modules/FileManagement/test/Lion.AbpPro.FileManagement.Domain.Tests/Lion.AbpPro.FileManagement.Domain.Tests.csproj +++ b/aspnet-core/modules/FileManagement/test/Lion.AbpPro.FileManagement.Domain.Tests/Lion.AbpPro.FileManagement.Domain.Tests.csproj @@ -3,7 +3,7 @@ - net6.0 + net7.0 Lion.AbpPro.FileManagement diff --git a/aspnet-core/modules/FileManagement/test/Lion.AbpPro.FileManagement.EntityFrameworkCore.Tests/Lion.AbpPro.FileManagement.EntityFrameworkCore.Tests.csproj b/aspnet-core/modules/FileManagement/test/Lion.AbpPro.FileManagement.EntityFrameworkCore.Tests/Lion.AbpPro.FileManagement.EntityFrameworkCore.Tests.csproj index 0b45781e..ffe98582 100644 --- a/aspnet-core/modules/FileManagement/test/Lion.AbpPro.FileManagement.EntityFrameworkCore.Tests/Lion.AbpPro.FileManagement.EntityFrameworkCore.Tests.csproj +++ b/aspnet-core/modules/FileManagement/test/Lion.AbpPro.FileManagement.EntityFrameworkCore.Tests/Lion.AbpPro.FileManagement.EntityFrameworkCore.Tests.csproj @@ -3,7 +3,7 @@ - net6.0 + net7.0 Lion.AbpPro.FileManagement diff --git a/aspnet-core/modules/FileManagement/test/Lion.AbpPro.FileManagement.TestBase/Lion.AbpPro.FileManagement.TestBase.csproj b/aspnet-core/modules/FileManagement/test/Lion.AbpPro.FileManagement.TestBase/Lion.AbpPro.FileManagement.TestBase.csproj index 10778d47..7c0491bd 100644 --- a/aspnet-core/modules/FileManagement/test/Lion.AbpPro.FileManagement.TestBase/Lion.AbpPro.FileManagement.TestBase.csproj +++ b/aspnet-core/modules/FileManagement/test/Lion.AbpPro.FileManagement.TestBase/Lion.AbpPro.FileManagement.TestBase.csproj @@ -3,7 +3,7 @@ - net6.0 + net7.0 Lion.AbpPro.FileManagement diff --git a/aspnet-core/modules/NotificationManagement/host/Lion.AbpPro.NotificationManagement.HttpApi.Host/Lion.AbpPro.NotificationManagement.HttpApi.Host.csproj b/aspnet-core/modules/NotificationManagement/host/Lion.AbpPro.NotificationManagement.HttpApi.Host/Lion.AbpPro.NotificationManagement.HttpApi.Host.csproj index 95014414..496755b5 100644 --- a/aspnet-core/modules/NotificationManagement/host/Lion.AbpPro.NotificationManagement.HttpApi.Host/Lion.AbpPro.NotificationManagement.HttpApi.Host.csproj +++ b/aspnet-core/modules/NotificationManagement/host/Lion.AbpPro.NotificationManagement.HttpApi.Host/Lion.AbpPro.NotificationManagement.HttpApi.Host.csproj @@ -3,7 +3,7 @@ - net6.0 + net7.0 Lion.AbpPro.NotificationManagement true Lion.AbpPro.NotificationManagement-c2d31439-b723-48e2-b061-5ebd7aeb6010 diff --git a/aspnet-core/modules/NotificationManagement/src/Lion.AbpPro.NotificationManagement.Application/GlobalUsings.cs b/aspnet-core/modules/NotificationManagement/src/Lion.AbpPro.NotificationManagement.Application/GlobalUsings.cs index 7de127f6..ea216b77 100644 --- a/aspnet-core/modules/NotificationManagement/src/Lion.AbpPro.NotificationManagement.Application/GlobalUsings.cs +++ b/aspnet-core/modules/NotificationManagement/src/Lion.AbpPro.NotificationManagement.Application/GlobalUsings.cs @@ -16,7 +16,6 @@ global using Microsoft.AspNetCore.Authorization; global using Microsoft.AspNetCore.SignalR; global using Microsoft.Extensions.DependencyInjection; global using Microsoft.Extensions.Logging; -global using Newtonsoft.Json; global using Volo.Abp; global using Volo.Abp.Application; global using Volo.Abp.Application.Dtos; diff --git a/aspnet-core/modules/NotificationManagement/src/Lion.AbpPro.NotificationManagement.Application/Hubs/NotificationHubAppService.cs b/aspnet-core/modules/NotificationManagement/src/Lion.AbpPro.NotificationManagement.Application/Hubs/NotificationHubAppService.cs index 86b2b553..ba863ede 100644 --- a/aspnet-core/modules/NotificationManagement/src/Lion.AbpPro.NotificationManagement.Application/Hubs/NotificationHubAppService.cs +++ b/aspnet-core/modules/NotificationManagement/src/Lion.AbpPro.NotificationManagement.Application/Hubs/NotificationHubAppService.cs @@ -1,16 +1,20 @@ -namespace Lion.AbpPro.NotificationManagement.Hubs; +using Volo.Abp.Json; + +namespace Lion.AbpPro.NotificationManagement.Hubs; public class NotificationHubAppService : NotificationManagementAppService, INotificationHubAppService { private readonly IHubContext _hubContext; private readonly ILogger _logger; - + private readonly IJsonSerializer _jsonSerializer; public NotificationHubAppService( IHubContext hubContext, - ILogger logger) + ILogger logger, + IJsonSerializer jsonSerializer) { _hubContext = hubContext; _logger = logger; + _jsonSerializer = jsonSerializer; } /// @@ -41,11 +45,11 @@ public class NotificationHubAppService : NotificationManagementAppService, INoti await _hubContext.Clients .Users(users.AsReadOnly().ToList()) .ReceiveTextMessageAsync(sendNotificationDto); - _logger.LogInformation($"通知模块收到消息:{JsonConvert.SerializeObject(sendNotificationDto)},发送给:{JsonConvert.SerializeObject(users)}"); + _logger.LogInformation($"通知模块收到消息:{_jsonSerializer.Serialize(sendNotificationDto)},发送给:{_jsonSerializer.Serialize(users)}"); } else { - _logger.LogWarning($"消息未指定发送人:{JsonConvert.SerializeObject(sendNotificationDto)}"); + _logger.LogWarning($"消息未指定发送人:{_jsonSerializer.Serialize(sendNotificationDto)}"); } } @@ -56,6 +60,6 @@ public class NotificationHubAppService : NotificationManagementAppService, INoti private async Task SendMessageToAllClientAsync(SendNotificationDto sendNotificationDto) { await _hubContext.Clients.All.ReceiveBroadCastMessageAsync(sendNotificationDto); - _logger.LogInformation($"通知模块收到消息:{JsonConvert.SerializeObject(sendNotificationDto)}"); + _logger.LogInformation($"通知模块收到消息:{_jsonSerializer.Serialize(sendNotificationDto)}"); } } \ No newline at end of file diff --git a/aspnet-core/modules/NotificationManagement/src/Lion.AbpPro.NotificationManagement.Application/Lion.AbpPro.NotificationManagement.Application.csproj b/aspnet-core/modules/NotificationManagement/src/Lion.AbpPro.NotificationManagement.Application/Lion.AbpPro.NotificationManagement.Application.csproj index db319f5f..cf89ea7b 100644 --- a/aspnet-core/modules/NotificationManagement/src/Lion.AbpPro.NotificationManagement.Application/Lion.AbpPro.NotificationManagement.Application.csproj +++ b/aspnet-core/modules/NotificationManagement/src/Lion.AbpPro.NotificationManagement.Application/Lion.AbpPro.NotificationManagement.Application.csproj @@ -3,7 +3,7 @@ - net6.0 + net7.0 Lion.AbpPro.NotificationManagement diff --git a/aspnet-core/modules/NotificationManagement/src/Lion.AbpPro.NotificationManagement.Domain/Lion.AbpPro.NotificationManagement.Domain.csproj b/aspnet-core/modules/NotificationManagement/src/Lion.AbpPro.NotificationManagement.Domain/Lion.AbpPro.NotificationManagement.Domain.csproj index 24c04df5..37d3bb88 100644 --- a/aspnet-core/modules/NotificationManagement/src/Lion.AbpPro.NotificationManagement.Domain/Lion.AbpPro.NotificationManagement.Domain.csproj +++ b/aspnet-core/modules/NotificationManagement/src/Lion.AbpPro.NotificationManagement.Domain/Lion.AbpPro.NotificationManagement.Domain.csproj @@ -3,7 +3,7 @@ - net6.0 + net7.0 Lion.AbpPro.NotificationManagement diff --git a/aspnet-core/modules/NotificationManagement/src/Lion.AbpPro.NotificationManagement.EntityFrameworkCore/Lion.AbpPro.NotificationManagement.EntityFrameworkCore.csproj b/aspnet-core/modules/NotificationManagement/src/Lion.AbpPro.NotificationManagement.EntityFrameworkCore/Lion.AbpPro.NotificationManagement.EntityFrameworkCore.csproj index a468b4b2..3985cfdd 100644 --- a/aspnet-core/modules/NotificationManagement/src/Lion.AbpPro.NotificationManagement.EntityFrameworkCore/Lion.AbpPro.NotificationManagement.EntityFrameworkCore.csproj +++ b/aspnet-core/modules/NotificationManagement/src/Lion.AbpPro.NotificationManagement.EntityFrameworkCore/Lion.AbpPro.NotificationManagement.EntityFrameworkCore.csproj @@ -3,7 +3,7 @@ - net6.0 + net7.0 Lion.AbpPro.NotificationManagement diff --git a/aspnet-core/modules/NotificationManagement/src/Lion.AbpPro.NotificationManagement.HttpApi/Lion.AbpPro.NotificationManagement.HttpApi.csproj b/aspnet-core/modules/NotificationManagement/src/Lion.AbpPro.NotificationManagement.HttpApi/Lion.AbpPro.NotificationManagement.HttpApi.csproj index e49d4ffb..6e6bc8ea 100644 --- a/aspnet-core/modules/NotificationManagement/src/Lion.AbpPro.NotificationManagement.HttpApi/Lion.AbpPro.NotificationManagement.HttpApi.csproj +++ b/aspnet-core/modules/NotificationManagement/src/Lion.AbpPro.NotificationManagement.HttpApi/Lion.AbpPro.NotificationManagement.HttpApi.csproj @@ -3,7 +3,7 @@ - net6.0 + net7.0 Lion.AbpPro.NotificationManagement diff --git a/aspnet-core/modules/NotificationManagement/test/Lion.AbpPro.NotificationManagement.Application.Tests/Lion.AbpPro.NotificationManagement.Application.Tests.csproj b/aspnet-core/modules/NotificationManagement/test/Lion.AbpPro.NotificationManagement.Application.Tests/Lion.AbpPro.NotificationManagement.Application.Tests.csproj index a72b0277..e5a3fd95 100644 --- a/aspnet-core/modules/NotificationManagement/test/Lion.AbpPro.NotificationManagement.Application.Tests/Lion.AbpPro.NotificationManagement.Application.Tests.csproj +++ b/aspnet-core/modules/NotificationManagement/test/Lion.AbpPro.NotificationManagement.Application.Tests/Lion.AbpPro.NotificationManagement.Application.Tests.csproj @@ -3,7 +3,7 @@ - net6.0 + net7.0 Lion.AbpPro.NotificationManagement false diff --git a/aspnet-core/modules/NotificationManagement/test/Lion.AbpPro.NotificationManagement.Domain.Tests/Lion.AbpPro.NotificationManagement.Domain.Tests.csproj b/aspnet-core/modules/NotificationManagement/test/Lion.AbpPro.NotificationManagement.Domain.Tests/Lion.AbpPro.NotificationManagement.Domain.Tests.csproj index 17c43c4f..c5a92e3a 100644 --- a/aspnet-core/modules/NotificationManagement/test/Lion.AbpPro.NotificationManagement.Domain.Tests/Lion.AbpPro.NotificationManagement.Domain.Tests.csproj +++ b/aspnet-core/modules/NotificationManagement/test/Lion.AbpPro.NotificationManagement.Domain.Tests/Lion.AbpPro.NotificationManagement.Domain.Tests.csproj @@ -3,7 +3,7 @@ - net6.0 + net7.0 Lion.AbpPro.NotificationManagement false diff --git a/aspnet-core/modules/NotificationManagement/test/Lion.AbpPro.NotificationManagement.EntityFrameworkCore.Tests/Lion.AbpPro.NotificationManagement.EntityFrameworkCore.Tests.csproj b/aspnet-core/modules/NotificationManagement/test/Lion.AbpPro.NotificationManagement.EntityFrameworkCore.Tests/Lion.AbpPro.NotificationManagement.EntityFrameworkCore.Tests.csproj index b05d46ff..0e3cd1e2 100644 --- a/aspnet-core/modules/NotificationManagement/test/Lion.AbpPro.NotificationManagement.EntityFrameworkCore.Tests/Lion.AbpPro.NotificationManagement.EntityFrameworkCore.Tests.csproj +++ b/aspnet-core/modules/NotificationManagement/test/Lion.AbpPro.NotificationManagement.EntityFrameworkCore.Tests/Lion.AbpPro.NotificationManagement.EntityFrameworkCore.Tests.csproj @@ -3,7 +3,7 @@ - net6.0 + net7.0 Lion.AbpPro.NotificationManagement false diff --git a/aspnet-core/modules/NotificationManagement/test/Lion.AbpPro.NotificationManagement.TestBase/Lion.AbpPro.NotificationManagement.TestBase.csproj b/aspnet-core/modules/NotificationManagement/test/Lion.AbpPro.NotificationManagement.TestBase/Lion.AbpPro.NotificationManagement.TestBase.csproj index cb3e7c84..f94494dc 100644 --- a/aspnet-core/modules/NotificationManagement/test/Lion.AbpPro.NotificationManagement.TestBase/Lion.AbpPro.NotificationManagement.TestBase.csproj +++ b/aspnet-core/modules/NotificationManagement/test/Lion.AbpPro.NotificationManagement.TestBase/Lion.AbpPro.NotificationManagement.TestBase.csproj @@ -3,7 +3,7 @@ - net6.0 + net7.0 Lion.AbpPro.NotificationManagement false diff --git a/aspnet-core/services/host/Lion.AbpPro.HttpApi.Host/Lion.AbpPro.HttpApi.Host.csproj b/aspnet-core/services/host/Lion.AbpPro.HttpApi.Host/Lion.AbpPro.HttpApi.Host.csproj index 2600443f..bc0da53c 100644 --- a/aspnet-core/services/host/Lion.AbpPro.HttpApi.Host/Lion.AbpPro.HttpApi.Host.csproj +++ b/aspnet-core/services/host/Lion.AbpPro.HttpApi.Host/Lion.AbpPro.HttpApi.Host.csproj @@ -2,7 +2,7 @@ - net6.0 + net7.0 Lion.AbpPro true Lion.AbpPro-4681b4fd-151f-4221-84a4-929d86723e4c diff --git a/aspnet-core/services/src/Lion.AbpPro.Application/Lion.AbpPro.Application.csproj b/aspnet-core/services/src/Lion.AbpPro.Application/Lion.AbpPro.Application.csproj index d2ed5c52..2366a8b8 100644 --- a/aspnet-core/services/src/Lion.AbpPro.Application/Lion.AbpPro.Application.csproj +++ b/aspnet-core/services/src/Lion.AbpPro.Application/Lion.AbpPro.Application.csproj @@ -2,7 +2,7 @@ - net6.0 + net7.0 Lion.AbpPro 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 b0398a23..b77c5e07 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 @@ -4,7 +4,7 @@ Exe - net6.0 + net7.0 diff --git a/aspnet-core/services/src/Lion.AbpPro.Domain/Lion.AbpPro.Domain.csproj b/aspnet-core/services/src/Lion.AbpPro.Domain/Lion.AbpPro.Domain.csproj index 6917c113..e67ea470 100644 --- a/aspnet-core/services/src/Lion.AbpPro.Domain/Lion.AbpPro.Domain.csproj +++ b/aspnet-core/services/src/Lion.AbpPro.Domain/Lion.AbpPro.Domain.csproj @@ -3,7 +3,7 @@ - net6.0 + net7.0 Lion.AbpPro diff --git a/aspnet-core/services/src/Lion.AbpPro.EntityFrameworkCore/EntityFrameworkCore/AbpProDbContext.cs b/aspnet-core/services/src/Lion.AbpPro.EntityFrameworkCore/EntityFrameworkCore/AbpProDbContext.cs index d7aaaf56..d0f0c980 100644 --- a/aspnet-core/services/src/Lion.AbpPro.EntityFrameworkCore/EntityFrameworkCore/AbpProDbContext.cs +++ b/aspnet-core/services/src/Lion.AbpPro.EntityFrameworkCore/EntityFrameworkCore/AbpProDbContext.cs @@ -24,7 +24,11 @@ namespace Lion.AbpPro.EntityFrameworkCore public DbSet OrganizationUnits { get; set; } public DbSet SecurityLogs { get; set; } public DbSet LinkUsers { get; set; } + public DbSet FeatureGroups { get; set; } + public DbSet Features { get; set; } public DbSet FeatureValues { get; set; } + public DbSet PermissionGroups { get; set; } + public DbSet Permissions { get; set; } public DbSet PermissionGrants { get; set; } public DbSet Settings { get; set; } public DbSet Tenants { get; set; } diff --git a/aspnet-core/services/src/Lion.AbpPro.EntityFrameworkCore/Lion.AbpPro.EntityFrameworkCore.csproj b/aspnet-core/services/src/Lion.AbpPro.EntityFrameworkCore/Lion.AbpPro.EntityFrameworkCore.csproj index 0a54b877..8864a6c9 100644 --- a/aspnet-core/services/src/Lion.AbpPro.EntityFrameworkCore/Lion.AbpPro.EntityFrameworkCore.csproj +++ b/aspnet-core/services/src/Lion.AbpPro.EntityFrameworkCore/Lion.AbpPro.EntityFrameworkCore.csproj @@ -2,7 +2,7 @@ - net6.0 + net7.0 Lion.AbpPro diff --git a/aspnet-core/services/src/Lion.AbpPro.EntityFrameworkCore/Migrations/20230113040449_UpdateToAbpVnext7.Designer.cs b/aspnet-core/services/src/Lion.AbpPro.EntityFrameworkCore/Migrations/20230113040449_UpdateToAbpVnext7.Designer.cs new file mode 100644 index 00000000..f901e649 --- /dev/null +++ b/aspnet-core/services/src/Lion.AbpPro.EntityFrameworkCore/Migrations/20230113040449_UpdateToAbpVnext7.Designer.cs @@ -0,0 +1,1712 @@ +// +using System; +using Lion.AbpPro.EntityFrameworkCore; +using Microsoft.EntityFrameworkCore; +using Microsoft.EntityFrameworkCore.Infrastructure; +using Microsoft.EntityFrameworkCore.Migrations; +using Microsoft.EntityFrameworkCore.Storage.ValueConversion; +using Volo.Abp.EntityFrameworkCore; + +#nullable disable + +namespace Lion.AbpPro.Migrations +{ + [DbContext(typeof(AbpProDbContext))] + [Migration("20230113040449_UpdateToAbpVnext7")] + partial class UpdateToAbpVnext7 + { + /// + protected override void BuildTargetModel(ModelBuilder modelBuilder) + { +#pragma warning disable 612, 618 + modelBuilder + .HasAnnotation("_Abp_DatabaseProvider", EfCoreDatabaseProvider.MySql) + .HasAnnotation("ProductVersion", "7.0.2") + .HasAnnotation("Relational:MaxIdentifierLength", 64); + + modelBuilder.Entity("Lion.AbpPro.DataDictionaryManagement.DataDictionaries.Aggregates.DataDictionary", b => + { + b.Property("Id") + .HasColumnType("char(36)"); + + b.Property("Code") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("varchar(64)"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .HasMaxLength(40) + .HasColumnType("varchar(40)") + .HasColumnName("ConcurrencyStamp"); + + b.Property("CreationTime") + .HasColumnType("datetime(6)") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("char(36)") + .HasColumnName("CreatorId"); + + b.Property("DeleterId") + .HasColumnType("char(36)") + .HasColumnName("DeleterId"); + + b.Property("DeletionTime") + .HasColumnType("datetime(6)") + .HasColumnName("DeletionTime"); + + b.Property("Description") + .IsRequired() + .HasMaxLength(1024) + .HasColumnType("varchar(1024)"); + + b.Property("DisplayText") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("varchar(64)"); + + b.Property("ExtraProperties") + .HasColumnType("longtext") + .HasColumnName("ExtraProperties"); + + b.Property("IsDeleted") + .ValueGeneratedOnAdd() + .HasColumnType("tinyint(1)") + .HasDefaultValue(false) + .HasColumnName("IsDeleted"); + + b.Property("LastModificationTime") + .HasColumnType("datetime(6)") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("char(36)") + .HasColumnName("LastModifierId"); + + b.Property("TenantId") + .HasColumnType("char(36)") + .HasColumnName("TenantId"); + + b.HasKey("Id"); + + b.ToTable("DataDictionary", (string)null); + }); + + modelBuilder.Entity("Lion.AbpPro.DataDictionaryManagement.DataDictionaries.Aggregates.DataDictionaryDetail", b => + { + b.Property("Id") + .HasColumnType("char(36)"); + + b.Property("Code") + .HasColumnType("longtext"); + + b.Property("CreationTime") + .HasColumnType("datetime(6)") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("char(36)") + .HasColumnName("CreatorId"); + + b.Property("DataDictionaryId") + .HasColumnType("char(36)"); + + b.Property("Description") + .HasColumnType("longtext"); + + b.Property("DisplayText") + .HasColumnType("longtext"); + + b.Property("IsEnabled") + .HasColumnType("tinyint(1)"); + + b.Property("LastModificationTime") + .HasColumnType("datetime(6)") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("char(36)") + .HasColumnName("LastModifierId"); + + b.Property("Order") + .HasColumnType("int"); + + b.HasKey("Id"); + + b.HasIndex("DataDictionaryId"); + + b.ToTable("DataDictionaryDetail", (string)null); + }); + + modelBuilder.Entity("Lion.AbpPro.NotificationManagement.Notifications.Aggregates.Notification", b => + { + b.Property("Id") + .HasColumnType("char(36)"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .HasMaxLength(40) + .HasColumnType("varchar(40)") + .HasColumnName("ConcurrencyStamp"); + + b.Property("Content") + .IsRequired() + .HasMaxLength(1024) + .HasColumnType("varchar(1024)"); + + b.Property("CreationTime") + .HasColumnType("datetime(6)") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("char(36)") + .HasColumnName("CreatorId"); + + b.Property("DeleterId") + .HasColumnType("char(36)") + .HasColumnName("DeleterId"); + + b.Property("DeletionTime") + .HasColumnType("datetime(6)") + .HasColumnName("DeletionTime"); + + b.Property("ExtraProperties") + .HasColumnType("longtext") + .HasColumnName("ExtraProperties"); + + b.Property("IsDeleted") + .ValueGeneratedOnAdd() + .HasColumnType("tinyint(1)") + .HasDefaultValue(false) + .HasColumnName("IsDeleted"); + + b.Property("LastModificationTime") + .HasColumnType("datetime(6)") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("char(36)") + .HasColumnName("LastModifierId"); + + b.Property("MessageLevel") + .HasColumnType("int"); + + b.Property("MessageType") + .HasColumnType("int"); + + b.Property("SenderId") + .HasColumnType("char(36)"); + + b.Property("Title") + .IsRequired() + .HasMaxLength(256) + .HasColumnType("varchar(256)"); + + b.HasKey("Id"); + + b.ToTable("Notification", (string)null); + }); + + modelBuilder.Entity("Lion.AbpPro.NotificationManagement.Notifications.Aggregates.NotificationSubscription", b => + { + b.Property("Id") + .HasColumnType("char(36)"); + + b.Property("CreationTime") + .HasColumnType("datetime(6)") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("char(36)") + .HasColumnName("CreatorId"); + + b.Property("DeleterId") + .HasColumnType("char(36)") + .HasColumnName("DeleterId"); + + b.Property("DeletionTime") + .HasColumnType("datetime(6)") + .HasColumnName("DeletionTime"); + + b.Property("IsDeleted") + .ValueGeneratedOnAdd() + .HasColumnType("tinyint(1)") + .HasDefaultValue(false) + .HasColumnName("IsDeleted"); + + b.Property("LastModificationTime") + .HasColumnType("datetime(6)") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("char(36)") + .HasColumnName("LastModifierId"); + + b.Property("NotificationId") + .HasColumnType("char(36)"); + + b.Property("Read") + .HasColumnType("tinyint(1)"); + + b.Property("ReadTime") + .HasColumnType("datetime(6)"); + + b.Property("ReceiveId") + .HasColumnType("char(36)"); + + b.HasKey("Id"); + + b.HasIndex("NotificationId"); + + b.ToTable("NotificationSubscription", (string)null); + }); + + modelBuilder.Entity("Volo.Abp.AuditLogging.AuditLog", b => + { + b.Property("Id") + .HasColumnType("char(36)"); + + b.Property("ApplicationName") + .HasMaxLength(96) + .HasColumnType("varchar(96)") + .HasColumnName("ApplicationName"); + + b.Property("BrowserInfo") + .HasMaxLength(512) + .HasColumnType("varchar(512)") + .HasColumnName("BrowserInfo"); + + b.Property("ClientId") + .HasMaxLength(64) + .HasColumnType("varchar(64)") + .HasColumnName("ClientId"); + + b.Property("ClientIpAddress") + .HasMaxLength(64) + .HasColumnType("varchar(64)") + .HasColumnName("ClientIpAddress"); + + b.Property("ClientName") + .HasMaxLength(128) + .HasColumnType("varchar(128)") + .HasColumnName("ClientName"); + + b.Property("Comments") + .HasMaxLength(256) + .HasColumnType("varchar(256)") + .HasColumnName("Comments"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .HasMaxLength(40) + .HasColumnType("varchar(40)") + .HasColumnName("ConcurrencyStamp"); + + b.Property("CorrelationId") + .HasMaxLength(64) + .HasColumnType("varchar(64)") + .HasColumnName("CorrelationId"); + + b.Property("Exceptions") + .HasColumnType("longtext"); + + b.Property("ExecutionDuration") + .HasColumnType("int") + .HasColumnName("ExecutionDuration"); + + b.Property("ExecutionTime") + .HasColumnType("datetime(6)"); + + b.Property("ExtraProperties") + .HasColumnType("longtext") + .HasColumnName("ExtraProperties"); + + b.Property("HttpMethod") + .HasMaxLength(16) + .HasColumnType("varchar(16)") + .HasColumnName("HttpMethod"); + + b.Property("HttpStatusCode") + .HasColumnType("int") + .HasColumnName("HttpStatusCode"); + + b.Property("ImpersonatorTenantId") + .HasColumnType("char(36)") + .HasColumnName("ImpersonatorTenantId"); + + b.Property("ImpersonatorTenantName") + .HasMaxLength(64) + .HasColumnType("varchar(64)") + .HasColumnName("ImpersonatorTenantName"); + + b.Property("ImpersonatorUserId") + .HasColumnType("char(36)") + .HasColumnName("ImpersonatorUserId"); + + b.Property("ImpersonatorUserName") + .HasMaxLength(256) + .HasColumnType("varchar(256)") + .HasColumnName("ImpersonatorUserName"); + + b.Property("TenantId") + .HasColumnType("char(36)") + .HasColumnName("TenantId"); + + b.Property("TenantName") + .HasMaxLength(64) + .HasColumnType("varchar(64)") + .HasColumnName("TenantName"); + + b.Property("Url") + .HasMaxLength(256) + .HasColumnType("varchar(256)") + .HasColumnName("Url"); + + b.Property("UserId") + .HasColumnType("char(36)") + .HasColumnName("UserId"); + + b.Property("UserName") + .HasMaxLength(256) + .HasColumnType("varchar(256)") + .HasColumnName("UserName"); + + b.HasKey("Id"); + + b.HasIndex("TenantId", "ExecutionTime"); + + b.HasIndex("TenantId", "UserId", "ExecutionTime"); + + b.ToTable("AbpAuditLogs", (string)null); + }); + + modelBuilder.Entity("Volo.Abp.AuditLogging.AuditLogAction", b => + { + b.Property("Id") + .HasColumnType("char(36)"); + + b.Property("AuditLogId") + .HasColumnType("char(36)") + .HasColumnName("AuditLogId"); + + b.Property("ExecutionDuration") + .HasColumnType("int") + .HasColumnName("ExecutionDuration"); + + b.Property("ExecutionTime") + .HasColumnType("datetime(6)") + .HasColumnName("ExecutionTime"); + + b.Property("ExtraProperties") + .HasColumnType("longtext") + .HasColumnName("ExtraProperties"); + + b.Property("MethodName") + .HasMaxLength(128) + .HasColumnType("varchar(128)") + .HasColumnName("MethodName"); + + b.Property("Parameters") + .HasMaxLength(2000) + .HasColumnType("varchar(2000)") + .HasColumnName("Parameters"); + + b.Property("ServiceName") + .HasMaxLength(256) + .HasColumnType("varchar(256)") + .HasColumnName("ServiceName"); + + b.Property("TenantId") + .HasColumnType("char(36)") + .HasColumnName("TenantId"); + + b.HasKey("Id"); + + b.HasIndex("AuditLogId"); + + b.HasIndex("TenantId", "ServiceName", "MethodName", "ExecutionTime"); + + b.ToTable("AbpAuditLogActions", (string)null); + }); + + modelBuilder.Entity("Volo.Abp.AuditLogging.EntityChange", b => + { + b.Property("Id") + .HasColumnType("char(36)"); + + b.Property("AuditLogId") + .HasColumnType("char(36)") + .HasColumnName("AuditLogId"); + + b.Property("ChangeTime") + .HasColumnType("datetime(6)") + .HasColumnName("ChangeTime"); + + b.Property("ChangeType") + .HasColumnType("tinyint unsigned") + .HasColumnName("ChangeType"); + + b.Property("EntityId") + .IsRequired() + .HasMaxLength(128) + .HasColumnType("varchar(128)") + .HasColumnName("EntityId"); + + b.Property("EntityTenantId") + .HasColumnType("char(36)"); + + b.Property("EntityTypeFullName") + .IsRequired() + .HasMaxLength(128) + .HasColumnType("varchar(128)") + .HasColumnName("EntityTypeFullName"); + + b.Property("ExtraProperties") + .HasColumnType("longtext") + .HasColumnName("ExtraProperties"); + + b.Property("TenantId") + .HasColumnType("char(36)") + .HasColumnName("TenantId"); + + b.HasKey("Id"); + + b.HasIndex("AuditLogId"); + + b.HasIndex("TenantId", "EntityTypeFullName", "EntityId"); + + b.ToTable("AbpEntityChanges", (string)null); + }); + + modelBuilder.Entity("Volo.Abp.AuditLogging.EntityPropertyChange", b => + { + b.Property("Id") + .HasColumnType("char(36)"); + + b.Property("EntityChangeId") + .HasColumnType("char(36)"); + + b.Property("NewValue") + .HasMaxLength(512) + .HasColumnType("varchar(512)") + .HasColumnName("NewValue"); + + b.Property("OriginalValue") + .HasMaxLength(512) + .HasColumnType("varchar(512)") + .HasColumnName("OriginalValue"); + + b.Property("PropertyName") + .IsRequired() + .HasMaxLength(128) + .HasColumnType("varchar(128)") + .HasColumnName("PropertyName"); + + b.Property("PropertyTypeFullName") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("varchar(64)") + .HasColumnName("PropertyTypeFullName"); + + b.Property("TenantId") + .HasColumnType("char(36)") + .HasColumnName("TenantId"); + + b.HasKey("Id"); + + b.HasIndex("EntityChangeId"); + + b.ToTable("AbpEntityPropertyChanges", (string)null); + }); + + modelBuilder.Entity("Volo.Abp.BackgroundJobs.BackgroundJobRecord", b => + { + b.Property("Id") + .HasColumnType("char(36)"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .HasMaxLength(40) + .HasColumnType("varchar(40)") + .HasColumnName("ConcurrencyStamp"); + + b.Property("CreationTime") + .HasColumnType("datetime(6)") + .HasColumnName("CreationTime"); + + b.Property("ExtraProperties") + .HasColumnType("longtext") + .HasColumnName("ExtraProperties"); + + b.Property("IsAbandoned") + .ValueGeneratedOnAdd() + .HasColumnType("tinyint(1)") + .HasDefaultValue(false); + + b.Property("JobArgs") + .IsRequired() + .HasMaxLength(1048576) + .HasColumnType("longtext"); + + b.Property("JobName") + .IsRequired() + .HasMaxLength(128) + .HasColumnType("varchar(128)"); + + b.Property("LastTryTime") + .HasColumnType("datetime(6)"); + + b.Property("NextTryTime") + .HasColumnType("datetime(6)"); + + b.Property("Priority") + .ValueGeneratedOnAdd() + .HasColumnType("tinyint unsigned") + .HasDefaultValue((byte)15); + + b.Property("TryCount") + .ValueGeneratedOnAdd() + .HasColumnType("smallint") + .HasDefaultValue((short)0); + + b.HasKey("Id"); + + b.HasIndex("IsAbandoned", "NextTryTime"); + + b.ToTable("AbpBackgroundJobs", (string)null); + }); + + modelBuilder.Entity("Volo.Abp.FeatureManagement.FeatureDefinitionRecord", b => + { + b.Property("Id") + .HasColumnType("char(36)"); + + b.Property("AllowedProviders") + .HasMaxLength(256) + .HasColumnType("varchar(256)"); + + b.Property("DefaultValue") + .HasMaxLength(256) + .HasColumnType("varchar(256)"); + + b.Property("Description") + .HasMaxLength(256) + .HasColumnType("varchar(256)"); + + b.Property("DisplayName") + .IsRequired() + .HasMaxLength(256) + .HasColumnType("varchar(256)"); + + b.Property("ExtraProperties") + .HasColumnType("longtext") + .HasColumnName("ExtraProperties"); + + b.Property("GroupName") + .IsRequired() + .HasMaxLength(128) + .HasColumnType("varchar(128)"); + + b.Property("IsAvailableToHost") + .HasColumnType("tinyint(1)"); + + b.Property("IsVisibleToClients") + .HasColumnType("tinyint(1)"); + + b.Property("Name") + .IsRequired() + .HasMaxLength(128) + .HasColumnType("varchar(128)"); + + b.Property("ParentName") + .HasMaxLength(128) + .HasColumnType("varchar(128)"); + + b.Property("ValueType") + .HasMaxLength(2048) + .HasColumnType("varchar(2048)"); + + b.HasKey("Id"); + + b.HasIndex("GroupName"); + + b.HasIndex("Name") + .IsUnique(); + + b.ToTable("AbpFeatures", (string)null); + }); + + modelBuilder.Entity("Volo.Abp.FeatureManagement.FeatureGroupDefinitionRecord", b => + { + b.Property("Id") + .HasColumnType("char(36)"); + + b.Property("DisplayName") + .IsRequired() + .HasMaxLength(256) + .HasColumnType("varchar(256)"); + + b.Property("ExtraProperties") + .HasColumnType("longtext") + .HasColumnName("ExtraProperties"); + + b.Property("Name") + .IsRequired() + .HasMaxLength(128) + .HasColumnType("varchar(128)"); + + b.HasKey("Id"); + + b.HasIndex("Name") + .IsUnique(); + + b.ToTable("AbpFeatureGroups", (string)null); + }); + + modelBuilder.Entity("Volo.Abp.FeatureManagement.FeatureValue", b => + { + b.Property("Id") + .HasColumnType("char(36)"); + + b.Property("Name") + .IsRequired() + .HasMaxLength(128) + .HasColumnType("varchar(128)"); + + b.Property("ProviderKey") + .HasMaxLength(64) + .HasColumnType("varchar(64)"); + + b.Property("ProviderName") + .HasMaxLength(64) + .HasColumnType("varchar(64)"); + + b.Property("Value") + .IsRequired() + .HasMaxLength(128) + .HasColumnType("varchar(128)"); + + b.HasKey("Id"); + + b.HasIndex("Name", "ProviderName", "ProviderKey") + .IsUnique(); + + b.ToTable("AbpFeatureValues", (string)null); + }); + + modelBuilder.Entity("Volo.Abp.Identity.IdentityClaimType", b => + { + b.Property("Id") + .HasColumnType("char(36)"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .HasMaxLength(40) + .HasColumnType("varchar(40)") + .HasColumnName("ConcurrencyStamp"); + + b.Property("Description") + .HasMaxLength(256) + .HasColumnType("varchar(256)"); + + b.Property("ExtraProperties") + .HasColumnType("longtext") + .HasColumnName("ExtraProperties"); + + b.Property("IsStatic") + .HasColumnType("tinyint(1)"); + + b.Property("Name") + .IsRequired() + .HasMaxLength(256) + .HasColumnType("varchar(256)"); + + b.Property("Regex") + .HasMaxLength(512) + .HasColumnType("varchar(512)"); + + b.Property("RegexDescription") + .HasMaxLength(128) + .HasColumnType("varchar(128)"); + + b.Property("Required") + .HasColumnType("tinyint(1)"); + + b.Property("ValueType") + .HasColumnType("int"); + + b.HasKey("Id"); + + b.ToTable("AbpClaimTypes", (string)null); + }); + + modelBuilder.Entity("Volo.Abp.Identity.IdentityLinkUser", b => + { + b.Property("Id") + .HasColumnType("char(36)"); + + b.Property("SourceTenantId") + .HasColumnType("char(36)"); + + b.Property("SourceUserId") + .HasColumnType("char(36)"); + + b.Property("TargetTenantId") + .HasColumnType("char(36)"); + + b.Property("TargetUserId") + .HasColumnType("char(36)"); + + b.HasKey("Id"); + + b.HasIndex("SourceUserId", "SourceTenantId", "TargetUserId", "TargetTenantId") + .IsUnique(); + + b.ToTable("AbpLinkUsers", (string)null); + }); + + modelBuilder.Entity("Volo.Abp.Identity.IdentityRole", b => + { + b.Property("Id") + .HasColumnType("char(36)"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .HasMaxLength(40) + .HasColumnType("varchar(40)") + .HasColumnName("ConcurrencyStamp"); + + b.Property("ExtraProperties") + .HasColumnType("longtext") + .HasColumnName("ExtraProperties"); + + b.Property("IsDefault") + .HasColumnType("tinyint(1)") + .HasColumnName("IsDefault"); + + b.Property("IsPublic") + .HasColumnType("tinyint(1)") + .HasColumnName("IsPublic"); + + b.Property("IsStatic") + .HasColumnType("tinyint(1)") + .HasColumnName("IsStatic"); + + b.Property("Name") + .IsRequired() + .HasMaxLength(256) + .HasColumnType("varchar(256)"); + + b.Property("NormalizedName") + .IsRequired() + .HasMaxLength(256) + .HasColumnType("varchar(256)"); + + b.Property("TenantId") + .HasColumnType("char(36)") + .HasColumnName("TenantId"); + + b.HasKey("Id"); + + b.HasIndex("NormalizedName"); + + b.ToTable("AbpRoles", (string)null); + }); + + modelBuilder.Entity("Volo.Abp.Identity.IdentityRoleClaim", b => + { + b.Property("Id") + .HasColumnType("char(36)"); + + b.Property("ClaimType") + .IsRequired() + .HasMaxLength(256) + .HasColumnType("varchar(256)"); + + b.Property("ClaimValue") + .HasMaxLength(1024) + .HasColumnType("varchar(1024)"); + + b.Property("RoleId") + .HasColumnType("char(36)"); + + b.Property("TenantId") + .HasColumnType("char(36)") + .HasColumnName("TenantId"); + + b.HasKey("Id"); + + b.HasIndex("RoleId"); + + b.ToTable("AbpRoleClaims", (string)null); + }); + + modelBuilder.Entity("Volo.Abp.Identity.IdentitySecurityLog", b => + { + b.Property("Id") + .HasColumnType("char(36)"); + + b.Property("Action") + .HasMaxLength(96) + .HasColumnType("varchar(96)"); + + b.Property("ApplicationName") + .HasMaxLength(96) + .HasColumnType("varchar(96)"); + + b.Property("BrowserInfo") + .HasMaxLength(512) + .HasColumnType("varchar(512)"); + + b.Property("ClientId") + .HasMaxLength(64) + .HasColumnType("varchar(64)"); + + b.Property("ClientIpAddress") + .HasMaxLength(64) + .HasColumnType("varchar(64)"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .HasMaxLength(40) + .HasColumnType("varchar(40)") + .HasColumnName("ConcurrencyStamp"); + + b.Property("CorrelationId") + .HasMaxLength(64) + .HasColumnType("varchar(64)"); + + b.Property("CreationTime") + .HasColumnType("datetime(6)"); + + b.Property("ExtraProperties") + .HasColumnType("longtext") + .HasColumnName("ExtraProperties"); + + b.Property("Identity") + .HasMaxLength(96) + .HasColumnType("varchar(96)"); + + b.Property("TenantId") + .HasColumnType("char(36)") + .HasColumnName("TenantId"); + + b.Property("TenantName") + .HasMaxLength(64) + .HasColumnType("varchar(64)"); + + b.Property("UserId") + .HasColumnType("char(36)"); + + b.Property("UserName") + .HasMaxLength(256) + .HasColumnType("varchar(256)"); + + b.HasKey("Id"); + + b.HasIndex("TenantId", "Action"); + + b.HasIndex("TenantId", "ApplicationName"); + + b.HasIndex("TenantId", "Identity"); + + b.HasIndex("TenantId", "UserId"); + + b.ToTable("AbpSecurityLogs", (string)null); + }); + + modelBuilder.Entity("Volo.Abp.Identity.IdentityUser", b => + { + b.Property("Id") + .HasColumnType("char(36)"); + + b.Property("AccessFailedCount") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasDefaultValue(0) + .HasColumnName("AccessFailedCount"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .HasMaxLength(40) + .HasColumnType("varchar(40)") + .HasColumnName("ConcurrencyStamp"); + + b.Property("CreationTime") + .HasColumnType("datetime(6)") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("char(36)") + .HasColumnName("CreatorId"); + + b.Property("DeleterId") + .HasColumnType("char(36)") + .HasColumnName("DeleterId"); + + b.Property("DeletionTime") + .HasColumnType("datetime(6)") + .HasColumnName("DeletionTime"); + + b.Property("Email") + .IsRequired() + .HasMaxLength(256) + .HasColumnType("varchar(256)") + .HasColumnName("Email"); + + b.Property("EmailConfirmed") + .ValueGeneratedOnAdd() + .HasColumnType("tinyint(1)") + .HasDefaultValue(false) + .HasColumnName("EmailConfirmed"); + + b.Property("ExtraProperties") + .HasColumnType("longtext") + .HasColumnName("ExtraProperties"); + + b.Property("IsActive") + .HasColumnType("tinyint(1)") + .HasColumnName("IsActive"); + + b.Property("IsDeleted") + .ValueGeneratedOnAdd() + .HasColumnType("tinyint(1)") + .HasDefaultValue(false) + .HasColumnName("IsDeleted"); + + b.Property("IsExternal") + .ValueGeneratedOnAdd() + .HasColumnType("tinyint(1)") + .HasDefaultValue(false) + .HasColumnName("IsExternal"); + + b.Property("LastModificationTime") + .HasColumnType("datetime(6)") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("char(36)") + .HasColumnName("LastModifierId"); + + b.Property("LockoutEnabled") + .ValueGeneratedOnAdd() + .HasColumnType("tinyint(1)") + .HasDefaultValue(false) + .HasColumnName("LockoutEnabled"); + + b.Property("LockoutEnd") + .HasColumnType("datetime(6)"); + + b.Property("Name") + .HasMaxLength(64) + .HasColumnType("varchar(64)") + .HasColumnName("Name"); + + b.Property("NormalizedEmail") + .IsRequired() + .HasMaxLength(256) + .HasColumnType("varchar(256)") + .HasColumnName("NormalizedEmail"); + + b.Property("NormalizedUserName") + .IsRequired() + .HasMaxLength(256) + .HasColumnType("varchar(256)") + .HasColumnName("NormalizedUserName"); + + b.Property("PasswordHash") + .HasMaxLength(256) + .HasColumnType("varchar(256)") + .HasColumnName("PasswordHash"); + + b.Property("PhoneNumber") + .HasMaxLength(16) + .HasColumnType("varchar(16)") + .HasColumnName("PhoneNumber"); + + b.Property("PhoneNumberConfirmed") + .ValueGeneratedOnAdd() + .HasColumnType("tinyint(1)") + .HasDefaultValue(false) + .HasColumnName("PhoneNumberConfirmed"); + + b.Property("SecurityStamp") + .IsRequired() + .HasMaxLength(256) + .HasColumnType("varchar(256)") + .HasColumnName("SecurityStamp"); + + b.Property("Surname") + .HasMaxLength(64) + .HasColumnType("varchar(64)") + .HasColumnName("Surname"); + + b.Property("TenantId") + .HasColumnType("char(36)") + .HasColumnName("TenantId"); + + b.Property("TwoFactorEnabled") + .ValueGeneratedOnAdd() + .HasColumnType("tinyint(1)") + .HasDefaultValue(false) + .HasColumnName("TwoFactorEnabled"); + + b.Property("UserName") + .IsRequired() + .HasMaxLength(256) + .HasColumnType("varchar(256)") + .HasColumnName("UserName"); + + b.HasKey("Id"); + + b.HasIndex("Email"); + + b.HasIndex("NormalizedEmail"); + + b.HasIndex("NormalizedUserName"); + + b.HasIndex("UserName"); + + b.ToTable("AbpUsers", (string)null); + }); + + modelBuilder.Entity("Volo.Abp.Identity.IdentityUserClaim", b => + { + b.Property("Id") + .HasColumnType("char(36)"); + + b.Property("ClaimType") + .IsRequired() + .HasMaxLength(256) + .HasColumnType("varchar(256)"); + + b.Property("ClaimValue") + .HasMaxLength(1024) + .HasColumnType("varchar(1024)"); + + b.Property("TenantId") + .HasColumnType("char(36)") + .HasColumnName("TenantId"); + + b.Property("UserId") + .HasColumnType("char(36)"); + + b.HasKey("Id"); + + b.HasIndex("UserId"); + + b.ToTable("AbpUserClaims", (string)null); + }); + + modelBuilder.Entity("Volo.Abp.Identity.IdentityUserLogin", b => + { + b.Property("UserId") + .HasColumnType("char(36)"); + + b.Property("LoginProvider") + .HasMaxLength(64) + .HasColumnType("varchar(64)"); + + b.Property("ProviderDisplayName") + .HasMaxLength(128) + .HasColumnType("varchar(128)"); + + b.Property("ProviderKey") + .IsRequired() + .HasMaxLength(196) + .HasColumnType("varchar(196)"); + + b.Property("TenantId") + .HasColumnType("char(36)") + .HasColumnName("TenantId"); + + b.HasKey("UserId", "LoginProvider"); + + b.HasIndex("LoginProvider", "ProviderKey"); + + b.ToTable("AbpUserLogins", (string)null); + }); + + modelBuilder.Entity("Volo.Abp.Identity.IdentityUserOrganizationUnit", b => + { + b.Property("OrganizationUnitId") + .HasColumnType("char(36)"); + + b.Property("UserId") + .HasColumnType("char(36)"); + + b.Property("CreationTime") + .HasColumnType("datetime(6)") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("char(36)") + .HasColumnName("CreatorId"); + + b.Property("TenantId") + .HasColumnType("char(36)") + .HasColumnName("TenantId"); + + b.HasKey("OrganizationUnitId", "UserId"); + + b.HasIndex("UserId", "OrganizationUnitId"); + + b.ToTable("AbpUserOrganizationUnits", (string)null); + }); + + modelBuilder.Entity("Volo.Abp.Identity.IdentityUserRole", b => + { + b.Property("UserId") + .HasColumnType("char(36)"); + + b.Property("RoleId") + .HasColumnType("char(36)"); + + b.Property("TenantId") + .HasColumnType("char(36)") + .HasColumnName("TenantId"); + + b.HasKey("UserId", "RoleId"); + + b.HasIndex("RoleId", "UserId"); + + b.ToTable("AbpUserRoles", (string)null); + }); + + modelBuilder.Entity("Volo.Abp.Identity.IdentityUserToken", b => + { + b.Property("UserId") + .HasColumnType("char(36)"); + + b.Property("LoginProvider") + .HasMaxLength(64) + .HasColumnType("varchar(64)"); + + b.Property("Name") + .HasMaxLength(128) + .HasColumnType("varchar(128)"); + + b.Property("TenantId") + .HasColumnType("char(36)") + .HasColumnName("TenantId"); + + b.Property("Value") + .HasColumnType("longtext"); + + b.HasKey("UserId", "LoginProvider", "Name"); + + b.ToTable("AbpUserTokens", (string)null); + }); + + modelBuilder.Entity("Volo.Abp.Identity.OrganizationUnit", b => + { + b.Property("Id") + .HasColumnType("char(36)"); + + b.Property("Code") + .IsRequired() + .HasMaxLength(95) + .HasColumnType("varchar(95)") + .HasColumnName("Code"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .HasMaxLength(40) + .HasColumnType("varchar(40)") + .HasColumnName("ConcurrencyStamp"); + + b.Property("CreationTime") + .HasColumnType("datetime(6)") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("char(36)") + .HasColumnName("CreatorId"); + + b.Property("DeleterId") + .HasColumnType("char(36)") + .HasColumnName("DeleterId"); + + b.Property("DeletionTime") + .HasColumnType("datetime(6)") + .HasColumnName("DeletionTime"); + + b.Property("DisplayName") + .IsRequired() + .HasMaxLength(128) + .HasColumnType("varchar(128)") + .HasColumnName("DisplayName"); + + b.Property("ExtraProperties") + .HasColumnType("longtext") + .HasColumnName("ExtraProperties"); + + b.Property("IsDeleted") + .ValueGeneratedOnAdd() + .HasColumnType("tinyint(1)") + .HasDefaultValue(false) + .HasColumnName("IsDeleted"); + + b.Property("LastModificationTime") + .HasColumnType("datetime(6)") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("char(36)") + .HasColumnName("LastModifierId"); + + b.Property("ParentId") + .HasColumnType("char(36)"); + + b.Property("TenantId") + .HasColumnType("char(36)") + .HasColumnName("TenantId"); + + b.HasKey("Id"); + + b.HasIndex("Code"); + + b.HasIndex("ParentId"); + + b.ToTable("AbpOrganizationUnits", (string)null); + }); + + modelBuilder.Entity("Volo.Abp.Identity.OrganizationUnitRole", b => + { + b.Property("OrganizationUnitId") + .HasColumnType("char(36)"); + + b.Property("RoleId") + .HasColumnType("char(36)"); + + b.Property("CreationTime") + .HasColumnType("datetime(6)") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("char(36)") + .HasColumnName("CreatorId"); + + b.Property("TenantId") + .HasColumnType("char(36)") + .HasColumnName("TenantId"); + + b.HasKey("OrganizationUnitId", "RoleId"); + + b.HasIndex("RoleId", "OrganizationUnitId"); + + b.ToTable("AbpOrganizationUnitRoles", (string)null); + }); + + modelBuilder.Entity("Volo.Abp.PermissionManagement.PermissionDefinitionRecord", b => + { + b.Property("Id") + .HasColumnType("char(36)"); + + b.Property("DisplayName") + .IsRequired() + .HasMaxLength(256) + .HasColumnType("varchar(256)"); + + b.Property("ExtraProperties") + .HasColumnType("longtext") + .HasColumnName("ExtraProperties"); + + b.Property("GroupName") + .IsRequired() + .HasMaxLength(128) + .HasColumnType("varchar(128)"); + + b.Property("IsEnabled") + .HasColumnType("tinyint(1)"); + + b.Property("MultiTenancySide") + .HasColumnType("tinyint unsigned"); + + b.Property("Name") + .IsRequired() + .HasMaxLength(128) + .HasColumnType("varchar(128)"); + + b.Property("ParentName") + .HasMaxLength(128) + .HasColumnType("varchar(128)"); + + b.Property("Providers") + .HasMaxLength(128) + .HasColumnType("varchar(128)"); + + b.Property("StateCheckers") + .HasMaxLength(256) + .HasColumnType("varchar(256)"); + + b.HasKey("Id"); + + b.HasIndex("GroupName"); + + b.HasIndex("Name") + .IsUnique(); + + b.ToTable("AbpPermissions", (string)null); + }); + + modelBuilder.Entity("Volo.Abp.PermissionManagement.PermissionGrant", b => + { + b.Property("Id") + .HasColumnType("char(36)"); + + b.Property("Name") + .IsRequired() + .HasMaxLength(128) + .HasColumnType("varchar(128)"); + + b.Property("ProviderKey") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("varchar(64)"); + + b.Property("ProviderName") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("varchar(64)"); + + b.Property("TenantId") + .HasColumnType("char(36)") + .HasColumnName("TenantId"); + + b.HasKey("Id"); + + b.HasIndex("TenantId", "Name", "ProviderName", "ProviderKey") + .IsUnique(); + + b.ToTable("AbpPermissionGrants", (string)null); + }); + + modelBuilder.Entity("Volo.Abp.PermissionManagement.PermissionGroupDefinitionRecord", b => + { + b.Property("Id") + .HasColumnType("char(36)"); + + b.Property("DisplayName") + .IsRequired() + .HasMaxLength(256) + .HasColumnType("varchar(256)"); + + b.Property("ExtraProperties") + .HasColumnType("longtext") + .HasColumnName("ExtraProperties"); + + b.Property("Name") + .IsRequired() + .HasMaxLength(128) + .HasColumnType("varchar(128)"); + + b.HasKey("Id"); + + b.HasIndex("Name") + .IsUnique(); + + b.ToTable("AbpPermissionGroups", (string)null); + }); + + modelBuilder.Entity("Volo.Abp.SettingManagement.Setting", b => + { + b.Property("Id") + .HasColumnType("char(36)"); + + b.Property("Name") + .IsRequired() + .HasMaxLength(128) + .HasColumnType("varchar(128)"); + + b.Property("ProviderKey") + .HasMaxLength(64) + .HasColumnType("varchar(64)"); + + b.Property("ProviderName") + .HasMaxLength(64) + .HasColumnType("varchar(64)"); + + b.Property("Value") + .IsRequired() + .HasMaxLength(2048) + .HasColumnType("varchar(2048)"); + + b.HasKey("Id"); + + b.HasIndex("Name", "ProviderName", "ProviderKey") + .IsUnique(); + + b.ToTable("AbpSettings", (string)null); + }); + + modelBuilder.Entity("Volo.Abp.TenantManagement.Tenant", b => + { + b.Property("Id") + .HasColumnType("char(36)"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .HasMaxLength(40) + .HasColumnType("varchar(40)") + .HasColumnName("ConcurrencyStamp"); + + b.Property("CreationTime") + .HasColumnType("datetime(6)") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("char(36)") + .HasColumnName("CreatorId"); + + b.Property("DeleterId") + .HasColumnType("char(36)") + .HasColumnName("DeleterId"); + + b.Property("DeletionTime") + .HasColumnType("datetime(6)") + .HasColumnName("DeletionTime"); + + b.Property("ExtraProperties") + .HasColumnType("longtext") + .HasColumnName("ExtraProperties"); + + b.Property("IsDeleted") + .ValueGeneratedOnAdd() + .HasColumnType("tinyint(1)") + .HasDefaultValue(false) + .HasColumnName("IsDeleted"); + + b.Property("LastModificationTime") + .HasColumnType("datetime(6)") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("char(36)") + .HasColumnName("LastModifierId"); + + b.Property("Name") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("varchar(64)"); + + b.HasKey("Id"); + + b.HasIndex("Name"); + + b.ToTable("AbpTenants", (string)null); + }); + + modelBuilder.Entity("Volo.Abp.TenantManagement.TenantConnectionString", b => + { + b.Property("TenantId") + .HasColumnType("char(36)"); + + b.Property("Name") + .HasMaxLength(64) + .HasColumnType("varchar(64)"); + + b.Property("Value") + .IsRequired() + .HasMaxLength(1024) + .HasColumnType("varchar(1024)"); + + b.HasKey("TenantId", "Name"); + + b.ToTable("AbpTenantConnectionStrings", (string)null); + }); + + modelBuilder.Entity("Lion.AbpPro.DataDictionaryManagement.DataDictionaries.Aggregates.DataDictionaryDetail", b => + { + b.HasOne("Lion.AbpPro.DataDictionaryManagement.DataDictionaries.Aggregates.DataDictionary", null) + .WithMany("Details") + .HasForeignKey("DataDictionaryId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + }); + + modelBuilder.Entity("Lion.AbpPro.NotificationManagement.Notifications.Aggregates.NotificationSubscription", b => + { + b.HasOne("Lion.AbpPro.NotificationManagement.Notifications.Aggregates.Notification", null) + .WithMany("NotificationSubscriptions") + .HasForeignKey("NotificationId"); + }); + + modelBuilder.Entity("Volo.Abp.AuditLogging.AuditLogAction", b => + { + b.HasOne("Volo.Abp.AuditLogging.AuditLog", null) + .WithMany("Actions") + .HasForeignKey("AuditLogId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + }); + + modelBuilder.Entity("Volo.Abp.AuditLogging.EntityChange", b => + { + b.HasOne("Volo.Abp.AuditLogging.AuditLog", null) + .WithMany("EntityChanges") + .HasForeignKey("AuditLogId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + }); + + modelBuilder.Entity("Volo.Abp.AuditLogging.EntityPropertyChange", b => + { + b.HasOne("Volo.Abp.AuditLogging.EntityChange", null) + .WithMany("PropertyChanges") + .HasForeignKey("EntityChangeId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + }); + + modelBuilder.Entity("Volo.Abp.Identity.IdentityRoleClaim", b => + { + b.HasOne("Volo.Abp.Identity.IdentityRole", null) + .WithMany("Claims") + .HasForeignKey("RoleId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + }); + + modelBuilder.Entity("Volo.Abp.Identity.IdentityUserClaim", b => + { + b.HasOne("Volo.Abp.Identity.IdentityUser", null) + .WithMany("Claims") + .HasForeignKey("UserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + }); + + modelBuilder.Entity("Volo.Abp.Identity.IdentityUserLogin", b => + { + b.HasOne("Volo.Abp.Identity.IdentityUser", null) + .WithMany("Logins") + .HasForeignKey("UserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + }); + + modelBuilder.Entity("Volo.Abp.Identity.IdentityUserOrganizationUnit", b => + { + b.HasOne("Volo.Abp.Identity.OrganizationUnit", null) + .WithMany() + .HasForeignKey("OrganizationUnitId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("Volo.Abp.Identity.IdentityUser", null) + .WithMany("OrganizationUnits") + .HasForeignKey("UserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + }); + + modelBuilder.Entity("Volo.Abp.Identity.IdentityUserRole", b => + { + b.HasOne("Volo.Abp.Identity.IdentityRole", null) + .WithMany() + .HasForeignKey("RoleId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("Volo.Abp.Identity.IdentityUser", null) + .WithMany("Roles") + .HasForeignKey("UserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + }); + + modelBuilder.Entity("Volo.Abp.Identity.IdentityUserToken", b => + { + b.HasOne("Volo.Abp.Identity.IdentityUser", null) + .WithMany("Tokens") + .HasForeignKey("UserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + }); + + modelBuilder.Entity("Volo.Abp.Identity.OrganizationUnit", b => + { + b.HasOne("Volo.Abp.Identity.OrganizationUnit", null) + .WithMany() + .HasForeignKey("ParentId"); + }); + + modelBuilder.Entity("Volo.Abp.Identity.OrganizationUnitRole", b => + { + b.HasOne("Volo.Abp.Identity.OrganizationUnit", null) + .WithMany("Roles") + .HasForeignKey("OrganizationUnitId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("Volo.Abp.Identity.IdentityRole", null) + .WithMany() + .HasForeignKey("RoleId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + }); + + modelBuilder.Entity("Volo.Abp.TenantManagement.TenantConnectionString", b => + { + b.HasOne("Volo.Abp.TenantManagement.Tenant", null) + .WithMany("ConnectionStrings") + .HasForeignKey("TenantId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + }); + + modelBuilder.Entity("Lion.AbpPro.DataDictionaryManagement.DataDictionaries.Aggregates.DataDictionary", b => + { + b.Navigation("Details"); + }); + + modelBuilder.Entity("Lion.AbpPro.NotificationManagement.Notifications.Aggregates.Notification", b => + { + b.Navigation("NotificationSubscriptions"); + }); + + modelBuilder.Entity("Volo.Abp.AuditLogging.AuditLog", b => + { + b.Navigation("Actions"); + + b.Navigation("EntityChanges"); + }); + + modelBuilder.Entity("Volo.Abp.AuditLogging.EntityChange", b => + { + b.Navigation("PropertyChanges"); + }); + + modelBuilder.Entity("Volo.Abp.Identity.IdentityRole", b => + { + b.Navigation("Claims"); + }); + + modelBuilder.Entity("Volo.Abp.Identity.IdentityUser", b => + { + b.Navigation("Claims"); + + b.Navigation("Logins"); + + b.Navigation("OrganizationUnits"); + + b.Navigation("Roles"); + + b.Navigation("Tokens"); + }); + + modelBuilder.Entity("Volo.Abp.Identity.OrganizationUnit", b => + { + b.Navigation("Roles"); + }); + + modelBuilder.Entity("Volo.Abp.TenantManagement.Tenant", b => + { + b.Navigation("ConnectionStrings"); + }); +#pragma warning restore 612, 618 + } + } +} diff --git a/aspnet-core/services/src/Lion.AbpPro.EntityFrameworkCore/Migrations/20230113040449_UpdateToAbpVnext7.cs b/aspnet-core/services/src/Lion.AbpPro.EntityFrameworkCore/Migrations/20230113040449_UpdateToAbpVnext7.cs new file mode 100644 index 00000000..3ac4c7ef --- /dev/null +++ b/aspnet-core/services/src/Lion.AbpPro.EntityFrameworkCore/Migrations/20230113040449_UpdateToAbpVnext7.cs @@ -0,0 +1,161 @@ +using System; +using Microsoft.EntityFrameworkCore.Migrations; + +#nullable disable + +namespace Lion.AbpPro.Migrations +{ + /// + public partial class UpdateToAbpVnext7 : Migration + { + /// + protected override void Up(MigrationBuilder migrationBuilder) + { + migrationBuilder.CreateTable( + name: "AbpFeatureGroups", + columns: table => new + { + Id = table.Column(type: "char(36)", nullable: false, collation: "ascii_general_ci"), + Name = table.Column(type: "varchar(128)", maxLength: 128, nullable: false) + .Annotation("MySql:CharSet", "utf8mb4"), + DisplayName = table.Column(type: "varchar(256)", maxLength: 256, nullable: false) + .Annotation("MySql:CharSet", "utf8mb4"), + ExtraProperties = table.Column(type: "longtext", nullable: true) + .Annotation("MySql:CharSet", "utf8mb4") + }, + constraints: table => + { + table.PrimaryKey("PK_AbpFeatureGroups", x => x.Id); + }) + .Annotation("MySql:CharSet", "utf8mb4"); + + migrationBuilder.CreateTable( + name: "AbpFeatures", + columns: table => new + { + Id = table.Column(type: "char(36)", nullable: false, collation: "ascii_general_ci"), + GroupName = table.Column(type: "varchar(128)", maxLength: 128, nullable: false) + .Annotation("MySql:CharSet", "utf8mb4"), + Name = table.Column(type: "varchar(128)", maxLength: 128, nullable: false) + .Annotation("MySql:CharSet", "utf8mb4"), + ParentName = table.Column(type: "varchar(128)", maxLength: 128, nullable: true) + .Annotation("MySql:CharSet", "utf8mb4"), + DisplayName = table.Column(type: "varchar(256)", maxLength: 256, nullable: false) + .Annotation("MySql:CharSet", "utf8mb4"), + Description = table.Column(type: "varchar(256)", maxLength: 256, nullable: true) + .Annotation("MySql:CharSet", "utf8mb4"), + DefaultValue = table.Column(type: "varchar(256)", maxLength: 256, nullable: true) + .Annotation("MySql:CharSet", "utf8mb4"), + IsVisibleToClients = table.Column(type: "tinyint(1)", nullable: false), + IsAvailableToHost = table.Column(type: "tinyint(1)", nullable: false), + AllowedProviders = table.Column(type: "varchar(256)", maxLength: 256, nullable: true) + .Annotation("MySql:CharSet", "utf8mb4"), + ValueType = table.Column(type: "varchar(2048)", maxLength: 2048, nullable: true) + .Annotation("MySql:CharSet", "utf8mb4"), + ExtraProperties = table.Column(type: "longtext", nullable: true) + .Annotation("MySql:CharSet", "utf8mb4") + }, + constraints: table => + { + table.PrimaryKey("PK_AbpFeatures", x => x.Id); + }) + .Annotation("MySql:CharSet", "utf8mb4"); + + migrationBuilder.CreateTable( + name: "AbpPermissionGroups", + columns: table => new + { + Id = table.Column(type: "char(36)", nullable: false, collation: "ascii_general_ci"), + Name = table.Column(type: "varchar(128)", maxLength: 128, nullable: false) + .Annotation("MySql:CharSet", "utf8mb4"), + DisplayName = table.Column(type: "varchar(256)", maxLength: 256, nullable: false) + .Annotation("MySql:CharSet", "utf8mb4"), + ExtraProperties = table.Column(type: "longtext", nullable: true) + .Annotation("MySql:CharSet", "utf8mb4") + }, + constraints: table => + { + table.PrimaryKey("PK_AbpPermissionGroups", x => x.Id); + }) + .Annotation("MySql:CharSet", "utf8mb4"); + + migrationBuilder.CreateTable( + name: "AbpPermissions", + columns: table => new + { + Id = table.Column(type: "char(36)", nullable: false, collation: "ascii_general_ci"), + GroupName = table.Column(type: "varchar(128)", maxLength: 128, nullable: false) + .Annotation("MySql:CharSet", "utf8mb4"), + Name = table.Column(type: "varchar(128)", maxLength: 128, nullable: false) + .Annotation("MySql:CharSet", "utf8mb4"), + ParentName = table.Column(type: "varchar(128)", maxLength: 128, nullable: true) + .Annotation("MySql:CharSet", "utf8mb4"), + DisplayName = table.Column(type: "varchar(256)", maxLength: 256, nullable: false) + .Annotation("MySql:CharSet", "utf8mb4"), + IsEnabled = table.Column(type: "tinyint(1)", nullable: false), + MultiTenancySide = table.Column(type: "tinyint unsigned", nullable: false), + Providers = table.Column(type: "varchar(128)", maxLength: 128, nullable: true) + .Annotation("MySql:CharSet", "utf8mb4"), + StateCheckers = table.Column(type: "varchar(256)", maxLength: 256, nullable: true) + .Annotation("MySql:CharSet", "utf8mb4"), + ExtraProperties = table.Column(type: "longtext", nullable: true) + .Annotation("MySql:CharSet", "utf8mb4") + }, + constraints: table => + { + table.PrimaryKey("PK_AbpPermissions", x => x.Id); + }) + .Annotation("MySql:CharSet", "utf8mb4"); + + migrationBuilder.CreateIndex( + name: "IX_AbpFeatureGroups_Name", + table: "AbpFeatureGroups", + column: "Name", + unique: true); + + migrationBuilder.CreateIndex( + name: "IX_AbpFeatures_GroupName", + table: "AbpFeatures", + column: "GroupName"); + + migrationBuilder.CreateIndex( + name: "IX_AbpFeatures_Name", + table: "AbpFeatures", + column: "Name", + unique: true); + + migrationBuilder.CreateIndex( + name: "IX_AbpPermissionGroups_Name", + table: "AbpPermissionGroups", + column: "Name", + unique: true); + + migrationBuilder.CreateIndex( + name: "IX_AbpPermissions_GroupName", + table: "AbpPermissions", + column: "GroupName"); + + migrationBuilder.CreateIndex( + name: "IX_AbpPermissions_Name", + table: "AbpPermissions", + column: "Name", + unique: true); + } + + /// + protected override void Down(MigrationBuilder migrationBuilder) + { + migrationBuilder.DropTable( + name: "AbpFeatureGroups"); + + migrationBuilder.DropTable( + name: "AbpFeatures"); + + migrationBuilder.DropTable( + name: "AbpPermissionGroups"); + + migrationBuilder.DropTable( + name: "AbpPermissions"); + } + } +} diff --git a/aspnet-core/services/src/Lion.AbpPro.EntityFrameworkCore/Migrations/AbpProDbContextModelSnapshot.cs b/aspnet-core/services/src/Lion.AbpPro.EntityFrameworkCore/Migrations/AbpProDbContextModelSnapshot.cs index e379627e..79218f50 100644 --- a/aspnet-core/services/src/Lion.AbpPro.EntityFrameworkCore/Migrations/AbpProDbContextModelSnapshot.cs +++ b/aspnet-core/services/src/Lion.AbpPro.EntityFrameworkCore/Migrations/AbpProDbContextModelSnapshot.cs @@ -18,7 +18,7 @@ namespace Lion.AbpPro.Migrations #pragma warning disable 612, 618 modelBuilder .HasAnnotation("_Abp_DatabaseProvider", EfCoreDatabaseProvider.MySql) - .HasAnnotation("ProductVersion", "6.0.7") + .HasAnnotation("ProductVersion", "7.0.2") .HasAnnotation("Relational:MaxIdentifierLength", 64); modelBuilder.Entity("Lion.AbpPro.DataDictionaryManagement.DataDictionaries.Aggregates.DataDictionary", b => @@ -574,6 +574,93 @@ namespace Lion.AbpPro.Migrations b.ToTable("AbpBackgroundJobs", (string)null); }); + modelBuilder.Entity("Volo.Abp.FeatureManagement.FeatureDefinitionRecord", b => + { + b.Property("Id") + .HasColumnType("char(36)"); + + b.Property("AllowedProviders") + .HasMaxLength(256) + .HasColumnType("varchar(256)"); + + b.Property("DefaultValue") + .HasMaxLength(256) + .HasColumnType("varchar(256)"); + + b.Property("Description") + .HasMaxLength(256) + .HasColumnType("varchar(256)"); + + b.Property("DisplayName") + .IsRequired() + .HasMaxLength(256) + .HasColumnType("varchar(256)"); + + b.Property("ExtraProperties") + .HasColumnType("longtext") + .HasColumnName("ExtraProperties"); + + b.Property("GroupName") + .IsRequired() + .HasMaxLength(128) + .HasColumnType("varchar(128)"); + + b.Property("IsAvailableToHost") + .HasColumnType("tinyint(1)"); + + b.Property("IsVisibleToClients") + .HasColumnType("tinyint(1)"); + + b.Property("Name") + .IsRequired() + .HasMaxLength(128) + .HasColumnType("varchar(128)"); + + b.Property("ParentName") + .HasMaxLength(128) + .HasColumnType("varchar(128)"); + + b.Property("ValueType") + .HasMaxLength(2048) + .HasColumnType("varchar(2048)"); + + b.HasKey("Id"); + + b.HasIndex("GroupName"); + + b.HasIndex("Name") + .IsUnique(); + + b.ToTable("AbpFeatures", (string)null); + }); + + modelBuilder.Entity("Volo.Abp.FeatureManagement.FeatureGroupDefinitionRecord", b => + { + b.Property("Id") + .HasColumnType("char(36)"); + + b.Property("DisplayName") + .IsRequired() + .HasMaxLength(256) + .HasColumnType("varchar(256)"); + + b.Property("ExtraProperties") + .HasColumnType("longtext") + .HasColumnName("ExtraProperties"); + + b.Property("Name") + .IsRequired() + .HasMaxLength(128) + .HasColumnType("varchar(128)"); + + b.HasKey("Id"); + + b.HasIndex("Name") + .IsUnique(); + + b.ToTable("AbpFeatureGroups", (string)null); + }); + modelBuilder.Entity("Volo.Abp.FeatureManagement.FeatureValue", b => { b.Property("Id") @@ -876,7 +963,8 @@ namespace Lion.AbpPro.Migrations .HasColumnName("ExtraProperties"); b.Property("IsActive") - .HasColumnType("tinyint(1)"); + .HasColumnType("tinyint(1)") + .HasColumnName("IsActive"); b.Property("IsDeleted") .ValueGeneratedOnAdd() @@ -1208,6 +1296,58 @@ namespace Lion.AbpPro.Migrations b.ToTable("AbpOrganizationUnitRoles", (string)null); }); + modelBuilder.Entity("Volo.Abp.PermissionManagement.PermissionDefinitionRecord", b => + { + b.Property("Id") + .HasColumnType("char(36)"); + + b.Property("DisplayName") + .IsRequired() + .HasMaxLength(256) + .HasColumnType("varchar(256)"); + + b.Property("ExtraProperties") + .HasColumnType("longtext") + .HasColumnName("ExtraProperties"); + + b.Property("GroupName") + .IsRequired() + .HasMaxLength(128) + .HasColumnType("varchar(128)"); + + b.Property("IsEnabled") + .HasColumnType("tinyint(1)"); + + b.Property("MultiTenancySide") + .HasColumnType("tinyint unsigned"); + + b.Property("Name") + .IsRequired() + .HasMaxLength(128) + .HasColumnType("varchar(128)"); + + b.Property("ParentName") + .HasMaxLength(128) + .HasColumnType("varchar(128)"); + + b.Property("Providers") + .HasMaxLength(128) + .HasColumnType("varchar(128)"); + + b.Property("StateCheckers") + .HasMaxLength(256) + .HasColumnType("varchar(256)"); + + b.HasKey("Id"); + + b.HasIndex("GroupName"); + + b.HasIndex("Name") + .IsUnique(); + + b.ToTable("AbpPermissions", (string)null); + }); + modelBuilder.Entity("Volo.Abp.PermissionManagement.PermissionGrant", b => { b.Property("Id") @@ -1240,6 +1380,33 @@ namespace Lion.AbpPro.Migrations b.ToTable("AbpPermissionGrants", (string)null); }); + modelBuilder.Entity("Volo.Abp.PermissionManagement.PermissionGroupDefinitionRecord", b => + { + b.Property("Id") + .HasColumnType("char(36)"); + + b.Property("DisplayName") + .IsRequired() + .HasMaxLength(256) + .HasColumnType("varchar(256)"); + + b.Property("ExtraProperties") + .HasColumnType("longtext") + .HasColumnName("ExtraProperties"); + + b.Property("Name") + .IsRequired() + .HasMaxLength(128) + .HasColumnType("varchar(128)"); + + b.HasKey("Id"); + + b.HasIndex("Name") + .IsUnique(); + + b.ToTable("AbpPermissionGroups", (string)null); + }); + modelBuilder.Entity("Volo.Abp.SettingManagement.Setting", b => { b.Property("Id") diff --git a/aspnet-core/services/src/Lion.AbpPro.FreeSqlRepository/Lion.AbpPro.FreeSqlRepository.csproj b/aspnet-core/services/src/Lion.AbpPro.FreeSqlRepository/Lion.AbpPro.FreeSqlRepository.csproj index e9f7aa3c..508ae217 100644 --- a/aspnet-core/services/src/Lion.AbpPro.FreeSqlRepository/Lion.AbpPro.FreeSqlRepository.csproj +++ b/aspnet-core/services/src/Lion.AbpPro.FreeSqlRepository/Lion.AbpPro.FreeSqlRepository.csproj @@ -1,7 +1,7 @@ - net6.0 + net7.0 enable diff --git a/aspnet-core/services/src/Lion.AbpPro.HttpApi/Lion.AbpPro.HttpApi.csproj b/aspnet-core/services/src/Lion.AbpPro.HttpApi/Lion.AbpPro.HttpApi.csproj index 2a1f7475..6dc38e5c 100644 --- a/aspnet-core/services/src/Lion.AbpPro.HttpApi/Lion.AbpPro.HttpApi.csproj +++ b/aspnet-core/services/src/Lion.AbpPro.HttpApi/Lion.AbpPro.HttpApi.csproj @@ -3,7 +3,7 @@ - net6.0 + net7.0 Lion.AbpPro diff --git a/aspnet-core/services/test/Lion.AbpPro.Application.Tests/Lion.AbpPro.Application.Tests.csproj b/aspnet-core/services/test/Lion.AbpPro.Application.Tests/Lion.AbpPro.Application.Tests.csproj index baa07cb5..f6b46aef 100644 --- a/aspnet-core/services/test/Lion.AbpPro.Application.Tests/Lion.AbpPro.Application.Tests.csproj +++ b/aspnet-core/services/test/Lion.AbpPro.Application.Tests/Lion.AbpPro.Application.Tests.csproj @@ -2,7 +2,7 @@ - net6.0 + net7.0 Lion.AbpPro false diff --git a/aspnet-core/services/test/Lion.AbpPro.Domain.Tests/Lion.AbpPro.Domain.Tests.csproj b/aspnet-core/services/test/Lion.AbpPro.Domain.Tests/Lion.AbpPro.Domain.Tests.csproj index ad47684d..5847c881 100644 --- a/aspnet-core/services/test/Lion.AbpPro.Domain.Tests/Lion.AbpPro.Domain.Tests.csproj +++ b/aspnet-core/services/test/Lion.AbpPro.Domain.Tests/Lion.AbpPro.Domain.Tests.csproj @@ -3,7 +3,7 @@ - net6.0 + net7.0 Lion.AbpPro false diff --git a/aspnet-core/services/test/Lion.AbpPro.EntityFrameworkCore.Tests/Lion.AbpPro.EntityFrameworkCore.Tests.csproj b/aspnet-core/services/test/Lion.AbpPro.EntityFrameworkCore.Tests/Lion.AbpPro.EntityFrameworkCore.Tests.csproj index 1d1a7a7e..1a4df364 100644 --- a/aspnet-core/services/test/Lion.AbpPro.EntityFrameworkCore.Tests/Lion.AbpPro.EntityFrameworkCore.Tests.csproj +++ b/aspnet-core/services/test/Lion.AbpPro.EntityFrameworkCore.Tests/Lion.AbpPro.EntityFrameworkCore.Tests.csproj @@ -3,7 +3,7 @@ - net6.0 + net7.0 Lion.AbpPro false diff --git a/aspnet-core/services/test/Lion.AbpPro.FreeSqlRepository.Tests/Lion.AbpPro.FreeSqlRepository.Tests.csproj b/aspnet-core/services/test/Lion.AbpPro.FreeSqlRepository.Tests/Lion.AbpPro.FreeSqlRepository.Tests.csproj index 9921a4ef..3dd75547 100644 --- a/aspnet-core/services/test/Lion.AbpPro.FreeSqlRepository.Tests/Lion.AbpPro.FreeSqlRepository.Tests.csproj +++ b/aspnet-core/services/test/Lion.AbpPro.FreeSqlRepository.Tests/Lion.AbpPro.FreeSqlRepository.Tests.csproj @@ -1,7 +1,7 @@ - net6.0 + net7.0 false diff --git a/aspnet-core/services/test/Lion.AbpPro.HttpApi.Client.ConsoleTestApp/Lion.AbpPro.HttpApi.Client.ConsoleTestApp.csproj b/aspnet-core/services/test/Lion.AbpPro.HttpApi.Client.ConsoleTestApp/Lion.AbpPro.HttpApi.Client.ConsoleTestApp.csproj index c23c4e23..3bbce393 100644 --- a/aspnet-core/services/test/Lion.AbpPro.HttpApi.Client.ConsoleTestApp/Lion.AbpPro.HttpApi.Client.ConsoleTestApp.csproj +++ b/aspnet-core/services/test/Lion.AbpPro.HttpApi.Client.ConsoleTestApp/Lion.AbpPro.HttpApi.Client.ConsoleTestApp.csproj @@ -3,7 +3,7 @@ Exe - net6.0 + net7.0 false diff --git a/aspnet-core/services/test/Lion.AbpPro.TestBase/Lion.AbpPro.TestBase.csproj b/aspnet-core/services/test/Lion.AbpPro.TestBase/Lion.AbpPro.TestBase.csproj index 71355388..c79e6889 100644 --- a/aspnet-core/services/test/Lion.AbpPro.TestBase/Lion.AbpPro.TestBase.csproj +++ b/aspnet-core/services/test/Lion.AbpPro.TestBase/Lion.AbpPro.TestBase.csproj @@ -3,7 +3,7 @@ - net6.0 + net7.0 Lion.AbpPro false diff --git a/aspnet-core/shared/Lion.AbpPro.Shared.Hosting.Gateways/Lion.AbpPro.Shared.Hosting.Gateways.csproj b/aspnet-core/shared/Lion.AbpPro.Shared.Hosting.Gateways/Lion.AbpPro.Shared.Hosting.Gateways.csproj index b0327095..e66482d3 100644 --- a/aspnet-core/shared/Lion.AbpPro.Shared.Hosting.Gateways/Lion.AbpPro.Shared.Hosting.Gateways.csproj +++ b/aspnet-core/shared/Lion.AbpPro.Shared.Hosting.Gateways/Lion.AbpPro.Shared.Hosting.Gateways.csproj @@ -1,7 +1,7 @@ - net6.0 + net7.0 diff --git a/aspnet-core/shared/Lion.AbpPro.Shared.Hosting.Microservices/GlobalUsings.cs b/aspnet-core/shared/Lion.AbpPro.Shared.Hosting.Microservices/GlobalUsings.cs index 3e8269c5..d64e8907 100644 --- a/aspnet-core/shared/Lion.AbpPro.Shared.Hosting.Microservices/GlobalUsings.cs +++ b/aspnet-core/shared/Lion.AbpPro.Shared.Hosting.Microservices/GlobalUsings.cs @@ -24,7 +24,6 @@ global using Microsoft.Extensions.Logging.Abstractions; global using Microsoft.Extensions.Options; global using Microsoft.OpenApi.Any; global using Microsoft.OpenApi.Models; -global using Newtonsoft.Json; global using Serilog; global using Serilog.Exceptions; global using Serilog.Sinks.Elasticsearch; diff --git a/aspnet-core/shared/Lion.AbpPro.Shared.Hosting.Microservices/Lion.AbpPro.Shared.Hosting.Microservices.csproj b/aspnet-core/shared/Lion.AbpPro.Shared.Hosting.Microservices/Lion.AbpPro.Shared.Hosting.Microservices.csproj index 123a4ce9..1094ce74 100644 --- a/aspnet-core/shared/Lion.AbpPro.Shared.Hosting.Microservices/Lion.AbpPro.Shared.Hosting.Microservices.csproj +++ b/aspnet-core/shared/Lion.AbpPro.Shared.Hosting.Microservices/Lion.AbpPro.Shared.Hosting.Microservices.csproj @@ -1,7 +1,7 @@ - net6.0 + net7.0 diff --git a/aspnet-core/shared/Lion.AbpPro.Shared.Hosting.Microservices/Microsoft/AspNetCore/Mvc/Filters/LionResultFilter.cs b/aspnet-core/shared/Lion.AbpPro.Shared.Hosting.Microservices/Microsoft/AspNetCore/Mvc/Filters/LionResultFilter.cs index d21d0536..bc7a122e 100644 --- a/aspnet-core/shared/Lion.AbpPro.Shared.Hosting.Microservices/Microsoft/AspNetCore/Mvc/Filters/LionResultFilter.cs +++ b/aspnet-core/shared/Lion.AbpPro.Shared.Hosting.Microservices/Microsoft/AspNetCore/Mvc/Filters/LionResultFilter.cs @@ -1,4 +1,6 @@ -namespace Microsoft.AspNetCore.Mvc.Filters; +using System.Text.Json; + +namespace Microsoft.AspNetCore.Mvc.Filters; public class LionResultFilter : IResultFilter, ITransientDependency { @@ -7,7 +9,8 @@ public class LionResultFilter : IResultFilter, ITransientDependency // 如果是page 直接return if (context.ActionDescriptor.IsPageAction()) return; - var controllerHasDontWrapResultAttribute = context.ActionDescriptor.AsControllerActionDescriptor().ControllerTypeInfo.GetCustomAttributes(typeof(WrapResultAttribute), true).Any(); + var controllerHasDontWrapResultAttribute = + context.ActionDescriptor.AsControllerActionDescriptor().ControllerTypeInfo.GetCustomAttributes(typeof(WrapResultAttribute), true).Any(); var controllerActionHasDontWrapResultAttribute = context.ActionDescriptor.GetMethodInfo().GetCustomAttributes(typeof(WrapResultAttribute), true).Any(); if (controllerHasDontWrapResultAttribute || controllerActionHasDontWrapResultAttribute) { @@ -18,11 +21,13 @@ public class LionResultFilter : IResultFilter, ITransientDependency result.SetSuccess(((ObjectResult)context.Result).Value); } + var jsonSerializer = context.GetService(); + context.Result = new ContentResult() { StatusCode = (int)HttpStatusCode.OK, ContentType = "application/json;charset=utf-8", - Content = JsonConvert.SerializeObject(result) + Content = jsonSerializer.Serialize(result) }; } } diff --git a/vben28/.env.development b/vben28/.env.development index ebf8f410..7b688b46 100644 --- a/vben28/.env.development +++ b/vben28/.env.development @@ -26,4 +26,4 @@ VITE_GLOB_API_URL_PREFIX= VITE_API_URL= http://localhost:44315/ # WEBSOCKE 地址 -VITE_WEBSOCKE_URL= http://localhost:44315/ +VITE_WEBSOCKE_URL= http://localhost:44315/signalr/notification diff --git a/vben28/.env.production b/vben28/.env.production index 17d21cce..c6e3dbf2 100644 --- a/vben28/.env.production +++ b/vben28/.env.production @@ -40,4 +40,4 @@ VITE_API_URL= http://116.205.177.85:8080 # WEBSOCKE 地址 -VITE_WEBSOCKE_URL= http://116.205.177.85:8080 +VITE_WEBSOCKE_URL= http://116.205.177.85:8080/signalr/notification diff --git a/vben28/nswag/nswag.json b/vben28/nswag/nswag.json index 878bce3f..b9ee2b2d 100644 --- a/vben28/nswag/nswag.json +++ b/vben28/nswag/nswag.json @@ -71,4 +71,4 @@ "newLineBehavior": "Auto" } } -} \ No newline at end of file +} diff --git a/vben28/package.json b/vben28/package.json index cb6c684d..7ab85ba2 100644 --- a/vben28/package.json +++ b/vben28/package.json @@ -37,7 +37,7 @@ "@iconify/iconify": "^2.2.1", "@logicflow/core": "^1.1.13", "@logicflow/extension": "^1.1.13", - "@microsoft/signalr": "^6.0.6", + "@microsoft/signalr": "^7.0.2", "@vue/runtime-core": "^3.2.33", "@vue/shared": "^3.2.33", "@vueuse/core": "^8.3.0", @@ -55,7 +55,7 @@ "lodash-es": "^4.17.21", "mockjs": "^1.1.0", "nprogress": "^0.2.0", - "nswag": "^13.16.1", + "nswag": "^13.18.2", "path-to-regexp": "^6.2.0", "pinia": "2.0.12", "print-js": "^1.6.0", @@ -112,7 +112,6 @@ "eslint-plugin-vue": "^8.6.0", "esno": "^0.14.1", "fs-extra": "^10.1.0", - "inquirer": "^8.2.2", "less": "^4.1.2", "lint-staged": "12.3.7", diff --git a/vben28/pnpm-lock.yaml b/vben28/pnpm-lock.yaml index 599bd35f..892eb349 100644 --- a/vben28/pnpm-lock.yaml +++ b/vben28/pnpm-lock.yaml @@ -14,7 +14,7 @@ specifiers: '@iconify/json': ^2.1.30 '@logicflow/core': ^1.1.13 '@logicflow/extension': ^1.1.13 - '@microsoft/signalr': ^6.0.6 + '@microsoft/signalr': ^7.0.2 '@purge-icons/generated': ^0.8.1 '@types/codemirror': ^5.60.5 '@types/crypto-js': ^4.1.1 @@ -69,7 +69,7 @@ specifiers: mockjs: ^1.1.0 npm-run-all: ^4.1.5 nprogress: ^0.2.0 - nswag: ^13.16.1 + nswag: ^13.18.2 oidc-client: ^1.11.5 path-to-regexp: ^6.2.0 picocolors: ^1.0.0 @@ -126,7 +126,7 @@ dependencies: '@iconify/iconify': 2.2.1 '@logicflow/core': 1.1.13 '@logicflow/extension': 1.1.13 - '@microsoft/signalr': registry.npmmirror.com/@microsoft/signalr/6.0.6 + '@microsoft/signalr': registry.npmmirror.com/@microsoft/signalr/7.0.2 '@vue/runtime-core': 3.2.33 '@vue/shared': 3.2.33 '@vueuse/core': 8.3.0_vue@3.2.33 @@ -145,7 +145,7 @@ dependencies: lodash-es: 4.17.21 mockjs: 1.1.0 nprogress: 0.2.0 - nswag: registry.npmmirror.com/nswag/13.16.1 + nswag: registry.npmmirror.com/nswag/13.18.2 oidc-client: registry.npmmirror.com/oidc-client/1.11.5 path-to-regexp: 6.2.0 pinia: 2.0.12_ifhmkzsxec62ezvqv7qmanm4bq @@ -2054,7 +2054,7 @@ packages: resolution: {integrity: sha512-ZUxbzKl0IfJILTS6t7ip5fQQM/J3TJYubDm3nMbgubNNYS62eXeUpoLUC8/7fJNiFYHTrGPQn7hspDUzIHX3UA==} dependencies: '@types/minimatch': 3.0.5 - '@types/node': 17.0.25 + '@types/node': registry.npmmirror.com/@types/node/17.0.25 dev: true /@types/imagemin-gifsicle/7.0.1: @@ -4766,7 +4766,7 @@ packages: dependencies: graceful-fs: 4.2.10 jsonfile: 4.0.0 - universalify: 0.1.2 + universalify: registry.npmmirror.com/universalify/0.1.2 dev: true /functional-red-black-tree/1.0.1: @@ -8370,11 +8370,6 @@ packages: resolution: {integrity: sha512-isyNax3wXoKaulPDZWHQqbmIx1k2tb9fb3GGDBRxCscfYV2Ch7WxPArBsFEG8s/safwXTT7H4QGhaIkTp9447w==} dev: true - /universalify/0.1.2: - resolution: {integrity: sha512-rBJeI5CXAlmy1pV+617WB9J63U6XcazHHF2f2dbJix4XzpUF0RS3Zbj0FGIOCAva5P/d/GBOYaACQ1w+0azUkg==} - engines: {node: '>= 4.0.0'} - dev: true - /universalify/2.0.0: resolution: {integrity: sha512-hAZsKq7Yy11Zu1DE0OzWjw7nnLZmJZYTDZZyEFHZdUhV8FkH5MCfoU1XMaxXovpyW5nq5scPqq0ZDP9Zyl04oQ==} engines: {node: '>= 10.0.0'} @@ -9191,14 +9186,14 @@ packages: dev: true optional: true - registry.npmmirror.com/@microsoft/signalr/6.0.6: - resolution: {integrity: sha512-3dTLtgwEXUeE9R/3NZQslh1B2WbppeHVXdnpvSZc7Yz+tP5Yiw3KCVUHwKUVnYmd9/2v3DaI/pvCdihrss49zA==, registry: https://registry.npm.taobao.org/, tarball: https://registry.npmmirror.com/@microsoft/signalr/-/signalr-6.0.6.tgz} + registry.npmmirror.com/@microsoft/signalr/7.0.2: + resolution: {integrity: sha512-U+o33K2m6nnMojZzBrjrApKgYfiQ0A0t4I2F5oFJObgfzRSDS9v0YoYgkmva5nbPftUp3YcR5XmH0S/1+BZT6Q==, registry: https://registry.npm.taobao.org/, tarball: https://registry.npmmirror.com/@microsoft/signalr/-/signalr-7.0.2.tgz} name: '@microsoft/signalr' - version: 6.0.6 + version: 7.0.2 dependencies: abort-controller: registry.npmmirror.com/abort-controller/3.0.0 - eventsource: registry.npmmirror.com/eventsource/1.1.2 - fetch-cookie: registry.npmmirror.com/fetch-cookie/0.11.0 + eventsource: registry.npmmirror.com/eventsource/2.0.2 + fetch-cookie: registry.npmmirror.com/fetch-cookie/2.1.0 node-fetch: registry.npmmirror.com/node-fetch/2.6.7 ws: registry.npmmirror.com/ws/7.5.8 transitivePeerDependencies: @@ -10157,11 +10152,11 @@ packages: engines: {node: '>=6'} dev: false - registry.npmmirror.com/eventsource/1.1.2: - resolution: {integrity: sha512-xAH3zWhgO2/3KIniEKYPr8plNSzlGINOUqYj0m0u7AB81iRw8b/3E73W6AuU+6klLbaSFmZnaETQ2lXPfAydrA==, registry: https://registry.npm.taobao.org/, tarball: https://registry.npmmirror.com/eventsource/-/eventsource-1.1.2.tgz} + registry.npmmirror.com/eventsource/2.0.2: + resolution: {integrity: sha512-IzUmBGPR3+oUG9dUeXynyNmf91/3zUSJg1lCktzKw47OXuhco54U3r9B7O4XX+Rb1Itm9OZ2b0RkTs10bICOxA==, registry: https://registry.npm.taobao.org/, tarball: https://registry.npmmirror.com/eventsource/-/eventsource-2.0.2.tgz} name: eventsource - version: 1.1.2 - engines: {node: '>=0.12.0'} + version: 2.0.2 + engines: {node: '>=12.0.0'} dev: false registry.npmmirror.com/execa/0.7.0: @@ -10254,12 +10249,12 @@ packages: pend: registry.npmmirror.com/pend/1.2.0 dev: true - registry.npmmirror.com/fetch-cookie/0.11.0: - resolution: {integrity: sha512-BQm7iZLFhMWFy5CZ/162sAGjBfdNWb7a8LEqqnzsHFhxT/X/SVj/z2t2nu3aJvjlbQkrAlTUApplPRjWyH4mhA==, registry: https://registry.npm.taobao.org/, tarball: https://registry.npmmirror.com/fetch-cookie/-/fetch-cookie-0.11.0.tgz} + registry.npmmirror.com/fetch-cookie/2.1.0: + resolution: {integrity: sha512-39+cZRbWfbibmj22R2Jy6dmTbAWC+oqun1f1FzQaNurkPDUP4C38jpeZbiXCR88RKRVDp8UcDrbFXkNhN+NjYg==, registry: https://registry.npm.taobao.org/, tarball: https://registry.npmmirror.com/fetch-cookie/-/fetch-cookie-2.1.0.tgz} name: fetch-cookie - version: 0.11.0 - engines: {node: '>=8'} + version: 2.1.0 dependencies: + set-cookie-parser: registry.npmmirror.com/set-cookie-parser/2.5.1 tough-cookie: registry.npmmirror.com/tough-cookie/4.0.0 dev: false @@ -11111,10 +11106,10 @@ packages: path-key: registry.npmmirror.com/path-key/2.0.1 dev: true - registry.npmmirror.com/nswag/13.16.1: - resolution: {integrity: sha512-L/ll7TeMaYMVPGTT8T9MrEVP1FjSod8/quRB9WuFPdvgFAsDILBwVuSifghzaX9DXmo1G5C22xmE1/53EPywig==, registry: https://registry.npm.taobao.org/, tarball: https://registry.npmmirror.com/nswag/-/nswag-13.16.1.tgz} + registry.npmmirror.com/nswag/13.18.2: + resolution: {integrity: sha512-7OpG9WkrZUO2+9I7hgQsaAHujsP/tCaIs7ML2B4wUuFLjSsG6lHucyrREyVO/h9l3MM/Cw4RlEGFBbluWhgeYg==, registry: https://registry.npm.taobao.org/, tarball: https://registry.npmmirror.com/nswag/-/nswag-13.18.2.tgz} name: nswag - version: 13.16.1 + version: 13.18.2 engines: {npm: '>=3.10.8'} hasBin: true dev: false @@ -11645,6 +11640,12 @@ packages: dependencies: randombytes: registry.npmmirror.com/randombytes/2.1.0 + registry.npmmirror.com/set-cookie-parser/2.5.1: + resolution: {integrity: sha512-1jeBGaKNGdEq4FgIrORu/N570dwoPYio8lSoYLWmX7sQ//0JY08Xh9o5pBcgmHQ/MbsYp/aZnOe1s1lIsbLprQ==, registry: https://registry.npm.taobao.org/, tarball: https://registry.npmmirror.com/set-cookie-parser/-/set-cookie-parser-2.5.1.tgz} + name: set-cookie-parser + version: 2.5.1 + dev: false + registry.npmmirror.com/setprototypeof/1.2.0: resolution: {integrity: sha512-E5LDX7Wrp85Kil5bhZv46j8jOeboKq5JMmYM3gVGdGH8xFpPWXUMsNrlODCrkoxMEeNi/XZIwuRvY4XNwYMJpw==, registry: https://registry.npm.taobao.org/, tarball: https://registry.npmmirror.com/setprototypeof/-/setprototypeof-1.2.0.tgz} name: setprototypeof @@ -12021,7 +12022,6 @@ packages: name: universalify version: 0.1.2 engines: {node: '>= 4.0.0'} - dev: false registry.npmmirror.com/universalify/2.0.0: resolution: {integrity: sha512-hAZsKq7Yy11Zu1DE0OzWjw7nnLZmJZYTDZZyEFHZdUhV8FkH5MCfoU1XMaxXovpyW5nq5scPqq0ZDP9Zyl04oQ==, registry: https://registry.npm.taobao.org/, tarball: https://registry.npmmirror.com/universalify/-/universalify-2.0.0.tgz} diff --git a/vben28/src/hooks/web/useSignalR.ts b/vben28/src/hooks/web/useSignalR.ts index 9caa8478..93989751 100644 --- a/vben28/src/hooks/web/useSignalR.ts +++ b/vben28/src/hooks/web/useSignalR.ts @@ -1,17 +1,16 @@ import * as signalR from '@microsoft/signalr'; import { useMessage } from '/@/hooks/web/useMessage'; import { useUserStoreWithOut } from '/@/store/modules/user'; -let connection:signalR.HubConnection; +let connection: signalR.HubConnection; export function useSignalR() { - /** * 开始连接SignalR */ async function startConnect() { - try { + try { connectionsignalR(); await connection.start(); - } catch (err) { + } catch (err) { console.log(err); setTimeout(() => startConnect(), 5000); } @@ -20,49 +19,45 @@ export function useSignalR() { /** * 关闭SignalR连接 */ - function closeConnect(): void {8 + function closeConnect(): void { + 8; if (connection) { connection.stop(); } } - async function connectionsignalR(){ + async function connectionsignalR() { const userStore = useUserStoreWithOut(); const token = userStore.getToken; - const url = (import.meta.env.VITE_WEBSOCKE_URL as string) + '/signalr/notification'; connection = new signalR.HubConnectionBuilder() - .withUrl(url, { - accessTokenFactory: () => token, - skipNegotiation: true, - transport: signalR.HttpTransportType.WebSockets, - }) - .withAutomaticReconnect({ - nextRetryDelayInMilliseconds: retryContext => { - - //重连规则:重连次数<300:间隔1s;重试次数<3000:间隔3s;重试次数>3000:间隔30s - let count = retryContext.previousRetryCount / 300; - if (count < 1)//重试次数<300,间隔1s - { - return 1000; - } - else if (count < 10) //重试次数>300:间隔5s - { - return 1000 * 5; - - } - else //重试次数>3000:间隔30s - { - return 1000 * 30; - } - } - }) - .configureLogging(signalR.LogLevel.Debug) - .build(); + .withUrl(import.meta.env.VITE_WEBSOCKE_URL, { + accessTokenFactory: () => token, + skipNegotiation: true, + transport: signalR.HttpTransportType.WebSockets, + }) + .withAutomaticReconnect({ + nextRetryDelayInMilliseconds: (retryContext) => { + //重连规则:重连次数<300:间隔1s;重试次数<3000:间隔3s;重试次数>3000:间隔30s + const count = retryContext.previousRetryCount / 300; + if (count < 1) { + //重试次数<300,间隔1s + return 1000; + } else if (count < 10) { + //重试次数>300:间隔5s + return 1000 * 5; + } //重试次数>3000:间隔30s + else { + return 1000 * 30; + } + }, + }) + .configureLogging(signalR.LogLevel.Debug) + .build(); - //接收普通文本消息 - connection.on('ReceiveTextMessageAsync', ReceiveTextMessageHandlerAsync); - //接收广播消息 - connection.on('ReceiveBroadCastMessageAsync', ReceiveBroadCastMessageHandlerAsync); + //接收普通文本消息 + connection.on('ReceiveTextMessageAsync', ReceiveTextMessageHandlerAsync); + //接收广播消息 + connection.on('ReceiveBroadCastMessageAsync', ReceiveBroadCastMessageHandlerAsync); } /** @@ -100,7 +95,6 @@ export function useSignalR() { * @param message 消息体 */ function ReceiveBroadCastMessageHandlerAsync(message: any) { - const { notification } = useMessage(); if (message.messageLevel == 10) { notification.warn({ diff --git a/vben28/src/services/ServiceProxies.ts b/vben28/src/services/ServiceProxies.ts index 7bd0ae2b..36520518 100644 --- a/vben28/src/services/ServiceProxies.ts +++ b/vben28/src/services/ServiceProxies.ts @@ -2,13982 +2,14611 @@ /* eslint-disable */ //---------------------- // -// Generated using the NSwag toolchain v13.16.1.0 (NJsonSchema v10.7.2.0 (Newtonsoft.Json v13.0.0.0)) (http://NSwag.org) +// Generated using the NSwag toolchain v13.18.2.0 (NJsonSchema v10.8.0.0 (Newtonsoft.Json v13.0.0.0)) (http://NSwag.org) // //---------------------- // ReSharper disable InconsistentNaming -import {ServiceProxyBase} from './ServiceProxyBase' -import axios, { AxiosError, AxiosInstance, AxiosRequestConfig, AxiosResponse, CancelToken } from 'axios'; +import { ServiceProxyBase } from './ServiceProxyBase'; +import axios, { + AxiosError, + AxiosInstance, + AxiosRequestConfig, + AxiosResponse, + CancelToken, +} from 'axios'; import dayjs from 'dayjs'; export class AbpApiDefinitionServiceProxy 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 includeTypes (optional) - * @return Success - */ - apiDefinition(includeTypes: boolean | undefined , cancelToken?: CancelToken | undefined): Promise { - let url_ = this.baseUrl + "/api/abp/api-definition?"; - if (includeTypes === null) - throw new Error("The parameter 'includeTypes' cannot be null."); - else if (includeTypes !== undefined) - url_ += "IncludeTypes=" + encodeURIComponent("" + includeTypes) + "&"; - url_ = url_.replace(/[?&]$/, ""); - - let options_ = { - method: "GET", - url: url_, - headers: { - "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.processApiDefinition(_response)); - }); - } - - protected processApiDefinition(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 = ApplicationApiDescriptionModel.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 as any); - } + 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 includeTypes (optional) + * @return Success + */ + apiDefinition( + includeTypes: boolean | undefined, + cancelToken?: CancelToken | undefined, + ): Promise { + let url_ = this.baseUrl + '/api/abp/api-definition?'; + if (includeTypes === null) throw new Error("The parameter 'includeTypes' cannot be null."); + else if (includeTypes !== undefined) + url_ += 'IncludeTypes=' + encodeURIComponent('' + includeTypes) + '&'; + url_ = url_.replace(/[?&]$/, ''); + + let options_ = { + method: 'GET', + url: url_, + headers: { + 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.processApiDefinition(_response), + ); + }); + } + + protected processApiDefinition(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 = ApplicationApiDescriptionModel.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 as any); + } } export class AbpApplicationConfigurationServiceProxy 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 - */ - applicationConfiguration( cancelToken?: CancelToken | undefined): Promise { - let url_ = this.baseUrl + "/api/abp/application-configuration"; - url_ = url_.replace(/[?&]$/, ""); - - let options_ = { - method: "GET", - url: url_, - headers: { - "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.processApplicationConfiguration(_response)); - }); - } - - protected processApplicationConfiguration(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 = ApplicationConfigurationDto.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 as any); - } + 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 includeLocalizationResources (optional) + * @return Success + */ + applicationConfiguration( + includeLocalizationResources: boolean | undefined, + cancelToken?: CancelToken | undefined, + ): Promise { + let url_ = this.baseUrl + '/api/abp/application-configuration?'; + if (includeLocalizationResources === null) + throw new Error("The parameter 'includeLocalizationResources' cannot be null."); + else if (includeLocalizationResources !== undefined) + url_ += + 'IncludeLocalizationResources=' + + encodeURIComponent('' + includeLocalizationResources) + + '&'; + url_ = url_.replace(/[?&]$/, ''); + + let options_ = { + method: 'GET', + url: url_, + headers: { + 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.processApplicationConfiguration(_response), + ); + }); + } + + protected processApplicationConfiguration( + 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 = ApplicationConfigurationDto.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 as any); + } +} + +export class AbpApplicationLocalizationServiceProxy 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 onlyDynamics (optional) + * @return Success + */ + applicationLocalization( + cultureName: string, + onlyDynamics: boolean | undefined, + cancelToken?: CancelToken | undefined, + ): Promise { + let url_ = this.baseUrl + '/api/abp/application-localization?'; + if (cultureName === undefined || cultureName === null) + throw new Error("The parameter 'cultureName' must be defined and cannot be null."); + else url_ += 'CultureName=' + encodeURIComponent('' + cultureName) + '&'; + if (onlyDynamics === null) throw new Error("The parameter 'onlyDynamics' cannot be null."); + else if (onlyDynamics !== undefined) + url_ += 'OnlyDynamics=' + encodeURIComponent('' + onlyDynamics) + '&'; + url_ = url_.replace(/[?&]$/, ''); + + let options_ = { + method: 'GET', + url: url_, + headers: { + 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.processApplicationLocalization(_response), + ); + }); + } + + protected processApplicationLocalization( + 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 = ApplicationLocalizationDto.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 as any); + } } export class AccountServiceProxy 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 - */ - login(body: LoginInput | undefined , cancelToken?: CancelToken | undefined): Promise { - let url_ = this.baseUrl + "/api/app/account/login"; - 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.processLogin(_response)); - }); - } - - protected processLogin(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 = LoginOutput.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 as any); - } + 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 + */ + login(body: LoginInput | undefined, cancelToken?: CancelToken | undefined): Promise { + let url_ = this.baseUrl + '/api/app/account/login'; + 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.processLogin(_response), + ); + }); + } + + protected processLogin(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 = LoginOutput.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 as any); + } } export class AuditLogsServiceProxy 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: PagingAuditLogListInput | undefined , cancelToken?: CancelToken | undefined): Promise { - let url_ = this.baseUrl + "/AuditLogs/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 = GetAuditLogPageListOutputPagedResultDto.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 as any); - } + 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: PagingAuditLogListInput | undefined, + cancelToken?: CancelToken | undefined, + ): Promise { + let url_ = this.baseUrl + '/AuditLogs/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 = GetAuditLogPageListOutputPagedResultDto.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 as any); + } } export class DataDictionaryServiceProxy 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: PagingDataDictionaryInput | undefined , cancelToken?: CancelToken | undefined): Promise { - let url_ = this.baseUrl + "/DataDictionary/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 = PagingDataDictionaryOutputPagedResultDto.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 as any); - } - - /** - * 分页字典明细 - * @param body (optional) - * @return Success - */ - pageDetail(body: PagingDataDictionaryDetailInput | undefined , cancelToken?: CancelToken | undefined): Promise { - let url_ = this.baseUrl + "/DataDictionary/pageDetail"; - 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.processPageDetail(_response)); - }); - } - - protected processPageDetail(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 = PagingDataDictionaryDetailOutputPagedResultDto.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 as any); - } - - /** - * 创建字典类型 - * @param body (optional) - * @return Success - */ - create(body: CreateDataDictinaryInput | undefined , cancelToken?: CancelToken | undefined): Promise { - let url_ = this.baseUrl + "/DataDictionary/create"; - 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.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; - return Promise.resolve(null as any); - - } 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 as any); - } - - /** - * 创建字典明细 - * @param body (optional) - * @return Success - */ - createDetail(body: CreateDataDictinaryDetailInput | undefined , cancelToken?: CancelToken | undefined): Promise { - let url_ = this.baseUrl + "/DataDictionary/createDetail"; - 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.processCreateDetail(_response)); - }); - } - - protected processCreateDetail(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 as any); - - } 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 as any); - } - - /** - * 设置字典明细状态 - * @param body (optional) - * @return Success - */ - status(body: SetDataDictinaryDetailInput | undefined , cancelToken?: CancelToken | undefined): Promise { - let url_ = this.baseUrl + "/DataDictionary/status"; - 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.processStatus(_response)); - }); - } - - protected processStatus(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 as any); - - } 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 as any); - } - - /** - * 更新字典明细 - * @param body (optional) - * @return Success - */ - updateDetail(body: UpdateDetailInput | undefined , cancelToken?: CancelToken | undefined): Promise { - let url_ = this.baseUrl + "/DataDictionary/updateDetail"; - 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.processUpdateDetail(_response)); - }); - } - - protected processUpdateDetail(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 as any); - - } 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 as any); - } - - /** - * 删除字典明细 - * @param body (optional) - * @return Success - */ - delete(body: DeleteDataDictionaryDetailInput | undefined , cancelToken?: CancelToken | undefined): Promise { - let url_ = this.baseUrl + "/DataDictionary/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 as any); - - } 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 as any); - } - - /** - * 删除字典类型 - * @param body (optional) - * @return Success - */ - deleteDataDictionaryType(body: IdInput | undefined , cancelToken?: CancelToken | undefined): Promise { - let url_ = this.baseUrl + "/DataDictionary/deleteDataDictionaryType"; - 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.processDeleteDataDictionaryType(_response)); - }); - } - - protected processDeleteDataDictionaryType(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 as any); - - } 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 as any); - } - - /** - * 修改字典类型 - * @param body (optional) - * @return Success - */ - update(body: UpdateDataDictinaryInput | undefined , cancelToken?: CancelToken | undefined): Promise { - let url_ = this.baseUrl + "/DataDictionary/update"; - 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.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; - return Promise.resolve(null as any); - - } 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 as any); - } + 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: PagingDataDictionaryInput | undefined, + cancelToken?: CancelToken | undefined, + ): Promise { + let url_ = this.baseUrl + '/DataDictionary/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 = PagingDataDictionaryOutputPagedResultDto.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 as any); + } + + /** + * 分页字典明细 + * @param body (optional) + * @return Success + */ + pageDetail( + body: PagingDataDictionaryDetailInput | undefined, + cancelToken?: CancelToken | undefined, + ): Promise { + let url_ = this.baseUrl + '/DataDictionary/pageDetail'; + 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.processPageDetail(_response), + ); + }); + } + + protected processPageDetail( + 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 = PagingDataDictionaryDetailOutputPagedResultDto.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 as any); + } + + /** + * 创建字典类型 + * @param body (optional) + * @return Success + */ + create( + body: CreateDataDictinaryInput | undefined, + cancelToken?: CancelToken | undefined, + ): Promise { + let url_ = this.baseUrl + '/DataDictionary/create'; + 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.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; + return Promise.resolve(null as any); + } 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 as any); + } + + /** + * 创建字典明细 + * @param body (optional) + * @return Success + */ + createDetail( + body: CreateDataDictinaryDetailInput | undefined, + cancelToken?: CancelToken | undefined, + ): Promise { + let url_ = this.baseUrl + '/DataDictionary/createDetail'; + 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.processCreateDetail(_response), + ); + }); + } + + protected processCreateDetail(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 as any); + } 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 as any); + } + + /** + * 设置字典明细状态 + * @param body (optional) + * @return Success + */ + status( + body: SetDataDictinaryDetailInput | undefined, + cancelToken?: CancelToken | undefined, + ): Promise { + let url_ = this.baseUrl + '/DataDictionary/status'; + 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.processStatus(_response), + ); + }); + } + + protected processStatus(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 as any); + } 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 as any); + } + + /** + * 更新字典明细 + * @param body (optional) + * @return Success + */ + updateDetail( + body: UpdateDetailInput | undefined, + cancelToken?: CancelToken | undefined, + ): Promise { + let url_ = this.baseUrl + '/DataDictionary/updateDetail'; + 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.processUpdateDetail(_response), + ); + }); + } + + protected processUpdateDetail(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 as any); + } 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 as any); + } + + /** + * 删除字典明细 + * @param body (optional) + * @return Success + */ + delete( + body: DeleteDataDictionaryDetailInput | undefined, + cancelToken?: CancelToken | undefined, + ): Promise { + let url_ = this.baseUrl + '/DataDictionary/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 as any); + } 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 as any); + } + + /** + * 删除字典类型 + * @param body (optional) + * @return Success + */ + deleteDataDictionaryType( + body: IdInput | undefined, + cancelToken?: CancelToken | undefined, + ): Promise { + let url_ = this.baseUrl + '/DataDictionary/deleteDataDictionaryType'; + 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.processDeleteDataDictionaryType(_response), + ); + }); + } + + protected processDeleteDataDictionaryType(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 as any); + } 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 as any); + } + + /** + * 修改字典类型 + * @param body (optional) + * @return Success + */ + update( + body: UpdateDataDictinaryInput | undefined, + cancelToken?: CancelToken | undefined, + ): Promise { + let url_ = this.baseUrl + '/DataDictionary/update'; + 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.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; + return Promise.resolve(null as any); + } 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 as any); + } } export class EsLogServiceProxy 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 : ""; - } - - /** - * 分页获取Es日志 - * @param body (optional) - * @return Success - */ - page(body: PagingElasticSearchLogInput | undefined , cancelToken?: CancelToken | undefined): Promise { - let url_ = this.baseUrl + "/EsLog/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 = PagingElasticSearchLogOutputCustomePagedResultDto.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 as any); - } + 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 : ''; + } + + /** + * 分页获取Es日志 + * @param body (optional) + * @return Success + */ + page( + body: PagingElasticSearchLogInput | undefined, + cancelToken?: CancelToken | undefined, + ): Promise { + let url_ = this.baseUrl + '/EsLog/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 = PagingElasticSearchLogOutputCustomPagedResultDto.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 as any); + } } export class NotificationServiceProxy 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 - */ - common(body: PagingNotificationListInput | undefined , cancelToken?: CancelToken | undefined): Promise { - let url_ = this.baseUrl + "/Notification/Common"; - 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.processCommon(_response)); - }); - } - - protected processCommon(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 = PagingNotificationListOutputPagedResultDto.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 as any); - } - - /** - * 分页查询广播消息 - * @param body (optional) - * @return Success - */ - broadCast(body: PagingNotificationListInput | undefined , cancelToken?: CancelToken | undefined): Promise { - let url_ = this.baseUrl + "/Notification/BroadCast"; - 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.processBroadCast(_response)); - }); - } - - protected processBroadCast(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 = PagingNotificationListOutputPagedResultDto.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 as any); - } - - /** - * 发送警告文本消息 - * @param body (optional) - * @return Success - */ - sendCommonWarningMessage(body: SendCommonMessageInput | undefined , cancelToken?: CancelToken | undefined): Promise { - let url_ = this.baseUrl + "/Notification/SendCommonWarningMessage"; - 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.processSendCommonWarningMessage(_response)); - }); - } - - protected processSendCommonWarningMessage(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 as any); - - } 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 as any); - } - - /** - * 发送普通文本消息 - * @param body (optional) - * @return Success - */ - sendCommonInformationMessage(body: SendCommonMessageInput | undefined , cancelToken?: CancelToken | undefined): Promise { - let url_ = this.baseUrl + "/Notification/SendCommonInformationMessage"; - 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.processSendCommonInformationMessage(_response)); - }); - } - - protected processSendCommonInformationMessage(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 as any); - - } 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 as any); - } - - /** - * 发送错误文本消息 - * @param body (optional) - * @return Success - */ - sendCommonErrorMessage(body: SendCommonMessageInput | undefined , cancelToken?: CancelToken | undefined): Promise { - let url_ = this.baseUrl + "/Notification/SendCommonErrorMessage"; - 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.processSendCommonErrorMessage(_response)); - }); - } - - protected processSendCommonErrorMessage(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 as any); - - } 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 as any); - } - - /** - * 发送警告广播消息 - * @param body (optional) - * @return Success - */ - sendBroadCastWarningMessage(body: SendBroadCastMessageInput | undefined , cancelToken?: CancelToken | undefined): Promise { - let url_ = this.baseUrl + "/Notification/SendBroadCastWarningMessage"; - 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.processSendBroadCastWarningMessage(_response)); - }); - } - - protected processSendBroadCastWarningMessage(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 as any); - - } 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 as any); - } - - /** - * 发送正常广播消息 - * @param body (optional) - * @return Success - */ - sendBroadCastInformationMessage(body: SendBroadCastMessageInput | undefined , cancelToken?: CancelToken | undefined): Promise { - let url_ = this.baseUrl + "/Notification/SendBroadCastInformationMessage"; - 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.processSendBroadCastInformationMessage(_response)); - }); - } - - protected processSendBroadCastInformationMessage(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 as any); - - } 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 as any); - } - - /** - * 发送错误广播消息 - * @param body (optional) - * @return Success - */ - sendBroadCastErrorMessage(body: SendBroadCastMessageInput | undefined , cancelToken?: CancelToken | undefined): Promise { - let url_ = this.baseUrl + "/Notification/SendBroadCastErrorMessage"; - 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.processSendBroadCastErrorMessage(_response)); - }); - } - - protected processSendBroadCastErrorMessage(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 as any); - - } 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 as any); - } - - /** - * 消息设置为已读 - * @param body (optional) - * @return Success - */ - read(body: SetReadInput | undefined , cancelToken?: CancelToken | undefined): Promise { - let url_ = this.baseUrl + "/Notification/Read"; - 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.processRead(_response)); - }); - } - - protected processRead(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 as any); - - } 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 as any); - } + 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 + */ + common( + body: PagingNotificationListInput | undefined, + cancelToken?: CancelToken | undefined, + ): Promise { + let url_ = this.baseUrl + '/Notification/Common'; + 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.processCommon(_response), + ); + }); + } + + protected processCommon( + 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 = PagingNotificationListOutputPagedResultDto.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 as any); + } + + /** + * 分页查询广播消息 + * @param body (optional) + * @return Success + */ + broadCast( + body: PagingNotificationListInput | undefined, + cancelToken?: CancelToken | undefined, + ): Promise { + let url_ = this.baseUrl + '/Notification/BroadCast'; + 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.processBroadCast(_response), + ); + }); + } + + protected processBroadCast( + 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 = PagingNotificationListOutputPagedResultDto.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 as any); + } + + /** + * 发送警告文本消息 + * @param body (optional) + * @return Success + */ + sendCommonWarningMessage( + body: SendCommonMessageInput | undefined, + cancelToken?: CancelToken | undefined, + ): Promise { + let url_ = this.baseUrl + '/Notification/SendCommonWarningMessage'; + 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.processSendCommonWarningMessage(_response), + ); + }); + } + + protected processSendCommonWarningMessage(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 as any); + } 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 as any); + } + + /** + * 发送普通文本消息 + * @param body (optional) + * @return Success + */ + sendCommonInformationMessage( + body: SendCommonMessageInput | undefined, + cancelToken?: CancelToken | undefined, + ): Promise { + let url_ = this.baseUrl + '/Notification/SendCommonInformationMessage'; + 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.processSendCommonInformationMessage(_response), + ); + }); + } + + protected processSendCommonInformationMessage(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 as any); + } 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 as any); + } + + /** + * 发送错误文本消息 + * @param body (optional) + * @return Success + */ + sendCommonErrorMessage( + body: SendCommonMessageInput | undefined, + cancelToken?: CancelToken | undefined, + ): Promise { + let url_ = this.baseUrl + '/Notification/SendCommonErrorMessage'; + 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.processSendCommonErrorMessage(_response), + ); + }); + } + + protected processSendCommonErrorMessage(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 as any); + } 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 as any); + } + + /** + * 发送警告广播消息 + * @param body (optional) + * @return Success + */ + sendBroadCastWarningMessage( + body: SendBroadCastMessageInput | undefined, + cancelToken?: CancelToken | undefined, + ): Promise { + let url_ = this.baseUrl + '/Notification/SendBroadCastWarningMessage'; + 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.processSendBroadCastWarningMessage(_response), + ); + }); + } + + protected processSendBroadCastWarningMessage(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 as any); + } 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 as any); + } + + /** + * 发送正常广播消息 + * @param body (optional) + * @return Success + */ + sendBroadCastInformationMessage( + body: SendBroadCastMessageInput | undefined, + cancelToken?: CancelToken | undefined, + ): Promise { + let url_ = this.baseUrl + '/Notification/SendBroadCastInformationMessage'; + 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.processSendBroadCastInformationMessage(_response), + ); + }); + } + + protected processSendBroadCastInformationMessage(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 as any); + } 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 as any); + } + + /** + * 发送错误广播消息 + * @param body (optional) + * @return Success + */ + sendBroadCastErrorMessage( + body: SendBroadCastMessageInput | undefined, + cancelToken?: CancelToken | undefined, + ): Promise { + let url_ = this.baseUrl + '/Notification/SendBroadCastErrorMessage'; + 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.processSendBroadCastErrorMessage(_response), + ); + }); + } + + protected processSendBroadCastErrorMessage(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 as any); + } 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 as any); + } + + /** + * 消息设置为已读 + * @param body (optional) + * @return Success + */ + read(body: SetReadInput | undefined, cancelToken?: CancelToken | undefined): Promise { + let url_ = this.baseUrl + '/Notification/Read'; + 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.processRead(_response), + ); + }); + } + + protected processRead(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 as any); + } 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 as any); + } } export class OrganizationUnitsServiceProxy 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 - */ - tree( cancelToken?: CancelToken | undefined): Promise { - let url_ = this.baseUrl + "/OrganizationUnits/tree"; - url_ = url_.replace(/[?&]$/, ""); - - let options_ = { - method: "POST", - url: url_, - headers: { - "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.processTree(_response)); - }); - } - - protected processTree(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; - 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 as any); - } - - /** - * 创建组织机构 - * @param body (optional) - * @return Success - */ - create(body: CreateOrganizationUnitInput | undefined , cancelToken?: CancelToken | undefined): Promise { - let url_ = this.baseUrl + "/OrganizationUnits/create"; - 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.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; - return Promise.resolve(null as any); - - } 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 as any); - } - - /** - * 删除组织机构 - * @param body (optional) - * @return Success - */ - delete(body: IdInput | undefined , cancelToken?: CancelToken | undefined): Promise { - let url_ = this.baseUrl + "/OrganizationUnits/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 as any); - - } 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 as any); - } - - /** - * 编辑组织机构 - * @param body (optional) - * @return Success - */ - 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: { - "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.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; - return Promise.resolve(null as any); - - } 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 as any); - } - - /** - * 向组织机构添加角色 - * @param body (optional) - * @return Success - */ - addRoleToOrganizationUnit(body: AddRoleToOrganizationUnitInput | undefined , cancelToken?: CancelToken | undefined): Promise { - let url_ = this.baseUrl + "/OrganizationUnits/addRoleToOrganizationUnitAsync"; - 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.processAddRoleToOrganizationUnit(_response)); - }); - } - - protected processAddRoleToOrganizationUnit(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 as any); - - } 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 as any); - } - - /** - * 向组织机构删除角色 - * @param body (optional) - * @return Success - */ - removeRoleFromOrganizationUnit(body: RemoveRoleToOrganizationUnitInput | undefined , cancelToken?: CancelToken | undefined): Promise { - let url_ = this.baseUrl + "/OrganizationUnits/removeRoleFromOrganizationUnitAsync"; - 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.processRemoveRoleFromOrganizationUnit(_response)); - }); - } - - protected processRemoveRoleFromOrganizationUnit(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 as any); - - } 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 as any); - } - - /** - * 向组织机构添加用户 - * @param body (optional) - * @return Success - */ - addUserToOrganizationUnit(body: AddUserToOrganizationUnitInput | undefined , cancelToken?: CancelToken | undefined): Promise { - let url_ = this.baseUrl + "/OrganizationUnits/addUserToOrganizationUnit"; - 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.processAddUserToOrganizationUnit(_response)); - }); - } - - protected processAddUserToOrganizationUnit(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 as any); - - } 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 as any); - } - - /** - * 向组织机构删除用户 - * @param body (optional) - * @return Success - */ - removeUserFromOrganizationUnit(body: RemoveUserToOrganizationUnitInput | undefined , cancelToken?: CancelToken | undefined): Promise { - let url_ = this.baseUrl + "/OrganizationUnits/removeUserFromOrganizationUnit"; - 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.processRemoveUserFromOrganizationUnit(_response)); - }); - } - - protected processRemoveUserFromOrganizationUnit(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 as any); - - } 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 as any); - } - - /** - * 分页获取组织机构下用户 - * @param body (optional) - * @return Success - */ - getUsers(body: GetOrganizationUnitUserInput | undefined , cancelToken?: CancelToken | undefined): Promise { - let url_ = this.baseUrl + "/OrganizationUnits/getUsers"; - 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.processGetUsers(_response)); - }); - } - - protected processGetUsers(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 = GetOrganizationUnitUserOutputPagedResultDto.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 as any); - } - - /** - * 分页获取组织机构下角色 - * @param body (optional) - * @return Success - */ - getRoles(body: GetOrganizationUnitRoleInput | undefined , cancelToken?: CancelToken | undefined): Promise { - let url_ = this.baseUrl + "/OrganizationUnits/getRoles"; - 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.processGetRoles(_response)); - }); - } - - protected processGetRoles(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 = GetOrganizationUnitRoleOutputPagedResultDto.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 as any); - } - - /** - * 获取不在组织机构的用户 - * @param body (optional) - * @return Success - */ - 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 - }; - - 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.processGetUnAddUsers(_response)); - }); - } - - protected processGetUnAddUsers(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 = GetUnAddUserOutputPagedResultDto.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 as any); - } - - /** - * 获取不在组织机构的角色 - * @param body (optional) - * @return Success - */ - getUnAddRoles(body: GetUnAddRoleInput | undefined , cancelToken?: CancelToken | undefined): Promise { - let url_ = this.baseUrl + "/OrganizationUnits/getUnAddRoles"; - 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.processGetUnAddRoles(_response)); - }); - } - - protected processGetUnAddRoles(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 = GetUnAddRoleOutputPagedResultDto.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 as any); - } + 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 + */ + tree(cancelToken?: CancelToken | undefined): Promise { + let url_ = this.baseUrl + '/OrganizationUnits/tree'; + url_ = url_.replace(/[?&]$/, ''); + + let options_ = { + method: 'POST', + url: url_, + headers: { + 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.processTree(_response), + ); + }); + } + + protected processTree(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; + 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 as any); + } + + /** + * 创建组织机构 + * @param body (optional) + * @return Success + */ + create( + body: CreateOrganizationUnitInput | undefined, + cancelToken?: CancelToken | undefined, + ): Promise { + let url_ = this.baseUrl + '/OrganizationUnits/create'; + 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.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; + return Promise.resolve(null as any); + } 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 as any); + } + + /** + * 删除组织机构 + * @param body (optional) + * @return Success + */ + delete(body: IdInput | undefined, cancelToken?: CancelToken | undefined): Promise { + let url_ = this.baseUrl + '/OrganizationUnits/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 as any); + } 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 as any); + } + + /** + * 编辑组织机构 + * @param body (optional) + * @return Success + */ + 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: { + '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.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; + return Promise.resolve(null as any); + } 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 as any); + } + + /** + * 向组织机构添加角色 + * @param body (optional) + * @return Success + */ + addRoleToOrganizationUnit( + body: AddRoleToOrganizationUnitInput | undefined, + cancelToken?: CancelToken | undefined, + ): Promise { + let url_ = this.baseUrl + '/OrganizationUnits/addRoleToOrganizationUnitAsync'; + 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.processAddRoleToOrganizationUnit(_response), + ); + }); + } + + protected processAddRoleToOrganizationUnit(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 as any); + } 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 as any); + } + + /** + * 向组织机构删除角色 + * @param body (optional) + * @return Success + */ + removeRoleFromOrganizationUnit( + body: RemoveRoleToOrganizationUnitInput | undefined, + cancelToken?: CancelToken | undefined, + ): Promise { + let url_ = this.baseUrl + '/OrganizationUnits/removeRoleFromOrganizationUnitAsync'; + 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.processRemoveRoleFromOrganizationUnit(_response), + ); + }); + } + + protected processRemoveRoleFromOrganizationUnit(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 as any); + } 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 as any); + } + + /** + * 向组织机构添加用户 + * @param body (optional) + * @return Success + */ + addUserToOrganizationUnit( + body: AddUserToOrganizationUnitInput | undefined, + cancelToken?: CancelToken | undefined, + ): Promise { + let url_ = this.baseUrl + '/OrganizationUnits/addUserToOrganizationUnit'; + 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.processAddUserToOrganizationUnit(_response), + ); + }); + } + + protected processAddUserToOrganizationUnit(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 as any); + } 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 as any); + } + + /** + * 向组织机构删除用户 + * @param body (optional) + * @return Success + */ + removeUserFromOrganizationUnit( + body: RemoveUserToOrganizationUnitInput | undefined, + cancelToken?: CancelToken | undefined, + ): Promise { + let url_ = this.baseUrl + '/OrganizationUnits/removeUserFromOrganizationUnit'; + 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.processRemoveUserFromOrganizationUnit(_response), + ); + }); + } + + protected processRemoveUserFromOrganizationUnit(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 as any); + } 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 as any); + } + + /** + * 分页获取组织机构下用户 + * @param body (optional) + * @return Success + */ + getUsers( + body: GetOrganizationUnitUserInput | undefined, + cancelToken?: CancelToken | undefined, + ): Promise { + let url_ = this.baseUrl + '/OrganizationUnits/getUsers'; + 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.processGetUsers(_response), + ); + }); + } + + protected processGetUsers( + 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 = GetOrganizationUnitUserOutputPagedResultDto.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 as any); + } + + /** + * 分页获取组织机构下角色 + * @param body (optional) + * @return Success + */ + getRoles( + body: GetOrganizationUnitRoleInput | undefined, + cancelToken?: CancelToken | undefined, + ): Promise { + let url_ = this.baseUrl + '/OrganizationUnits/getRoles'; + 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.processGetRoles(_response), + ); + }); + } + + protected processGetRoles( + 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 = GetOrganizationUnitRoleOutputPagedResultDto.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 as any); + } + + /** + * 获取不在组织机构的用户 + * @param body (optional) + * @return Success + */ + 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, + }; + + 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.processGetUnAddUsers(_response), + ); + }); + } + + protected processGetUnAddUsers( + 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 = GetUnAddUserOutputPagedResultDto.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 as any); + } + + /** + * 获取不在组织机构的角色 + * @param body (optional) + * @return Success + */ + getUnAddRoles( + body: GetUnAddRoleInput | undefined, + cancelToken?: CancelToken | undefined, + ): Promise { + let url_ = this.baseUrl + '/OrganizationUnits/getUnAddRoles'; + 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.processGetUnAddRoles(_response), + ); + }); + } + + protected processGetUnAddRoles( + 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 = GetUnAddRoleOutputPagedResultDto.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 as any); + } } 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 : ""; - } - - /** - * 获取角色权限 - * @param body (optional) - * @return Success - */ - tree(body: GetPermissionInput | undefined , cancelToken?: CancelToken | undefined): Promise { - let url_ = this.baseUrl + "/Permissions/tree"; - 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.processTree(_response)); - }); - } - - protected processTree(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 = PermissionOutput.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 as any); - } - - /** - * 更新角色 - * @param body (optional) - * @return Success - */ - update(body: UpdateRolePermissionsInput | undefined , cancelToken?: CancelToken | undefined): Promise { - let url_ = this.baseUrl + "/Permissions/update"; - 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.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; - return Promise.resolve(null as any); - - } 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 as any); - } + 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 + */ + tree( + body: GetPermissionInput | undefined, + cancelToken?: CancelToken | undefined, + ): Promise { + let url_ = this.baseUrl + '/Permissions/tree'; + 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.processTree(_response), + ); + }); + } + + protected processTree(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 = PermissionOutput.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 as any); + } + + /** + * 更新角色 + * @param body (optional) + * @return Success + */ + update( + body: UpdateRolePermissionsInput | undefined, + cancelToken?: CancelToken | undefined, + ): Promise { + let url_ = this.baseUrl + '/Permissions/update'; + 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.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; + return Promise.resolve(null as any); + } 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 as any); + } } 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 : ""; - } - - /** - * 获取所有角色 - * @return Success - */ - all( cancelToken?: CancelToken | undefined): Promise { - let url_ = this.baseUrl + "/Roles/all"; - url_ = url_.replace(/[?&]$/, ""); - - let options_ = { - method: "POST", - url: url_, - headers: { - "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.processAll(_response)); - }); - } - - protected processAll(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 as any); - } - - /** - * 分页获取角色 - * @param body (optional) - * @return Success - */ - page(body: PagingRoleListInput | undefined , cancelToken?: CancelToken | undefined): Promise { - let url_ = this.baseUrl + "/Roles/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 = IdentityRoleDtoPagedResultDto.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 as any); - } - - /** - * 创建角色 - * @param body (optional) - * @return Success - */ - create(body: IdentityRoleCreateDto | undefined , cancelToken?: CancelToken | undefined): Promise { - let url_ = this.baseUrl + "/Roles/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 = IdentityRoleDto.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 as any); - } - - /** - * 更新角色 - * @param body (optional) - * @return Success - */ - update(body: UpdateRoleInput | undefined , cancelToken?: CancelToken | undefined): Promise { - let url_ = this.baseUrl + "/Roles/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 = IdentityRoleDto.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 as any); - } - - /** - * 删除角色 - * @param body (optional) - * @return Success - */ - delete(body: IdInput | undefined , cancelToken?: CancelToken | undefined): Promise { - let url_ = this.baseUrl + "/Roles/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 as any); - - } 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 as any); - } + 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 + */ + all(cancelToken?: CancelToken | undefined): Promise { + let url_ = this.baseUrl + '/Roles/all'; + url_ = url_.replace(/[?&]$/, ''); + + let options_ = { + method: 'POST', + url: url_, + headers: { + 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.processAll(_response), + ); + }); + } + + protected processAll(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 as any); + } + + /** + * 分页获取角色 + * @param body (optional) + * @return Success + */ + page( + body: PagingRoleListInput | undefined, + cancelToken?: CancelToken | undefined, + ): Promise { + let url_ = this.baseUrl + '/Roles/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 = IdentityRoleDtoPagedResultDto.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 as any); + } + + /** + * 创建角色 + * @param body (optional) + * @return Success + */ + create( + body: IdentityRoleCreateDto | undefined, + cancelToken?: CancelToken | undefined, + ): Promise { + let url_ = this.baseUrl + '/Roles/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 = IdentityRoleDto.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 as any); + } + + /** + * 更新角色 + * @param body (optional) + * @return Success + */ + update( + body: UpdateRoleInput | undefined, + cancelToken?: CancelToken | undefined, + ): Promise { + let url_ = this.baseUrl + '/Roles/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 = IdentityRoleDto.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 as any); + } + + /** + * 删除角色 + * @param body (optional) + * @return Success + */ + delete(body: IdInput | undefined, cancelToken?: CancelToken | undefined): Promise { + let url_ = this.baseUrl + '/Roles/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 as any); + } 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 as any); + } } 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 : ""; - } - - /** - * 获取所有Setting - * @return Success - */ - all( cancelToken?: CancelToken | undefined): Promise { - let url_ = this.baseUrl + "/Settings/all"; - url_ = url_.replace(/[?&]$/, ""); - - let options_ = { - method: "POST", - url: url_, - headers: { - "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.processAll(_response)); - }); - } - - protected processAll(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; - 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; - 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 as any); - } - - /** - * 更新Setting - * @param body (optional) - * @return Success - */ - update(body: UpdateSettingInput | undefined , cancelToken?: CancelToken | undefined): Promise { - let url_ = this.baseUrl + "/Settings/update"; - 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.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; - return Promise.resolve(null as any); - - } 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 as any); - } + 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 : ''; + } + + /** + * 获取所有Setting + * @return Success + */ + all(cancelToken?: CancelToken | undefined): Promise { + let url_ = this.baseUrl + '/Settings/all'; + url_ = url_.replace(/[?&]$/, ''); + + let options_ = { + method: 'POST', + url: url_, + headers: { + 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.processAll(_response), + ); + }); + } + + protected processAll(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; + 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; + 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 as any); + } + + /** + * 更新Setting + * @param body (optional) + * @return Success + */ + update( + body: UpdateSettingInput | undefined, + cancelToken?: CancelToken | undefined, + ): Promise { + let url_ = this.baseUrl + '/Settings/update'; + 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.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; + return Promise.resolve(null as any); + } 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 as any); + } } 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 - */ - find(body: FindTenantByNameInput | undefined , cancelToken?: CancelToken | undefined): Promise { - let url_ = this.baseUrl + "/Tenants/find"; - 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.processFind(_response)); - }); - } - - protected processFind(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 = FindTenantResultDto.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 as any); - } - - /** - * 分页获取租户信息 - * @param body (optional) - * @return Success - */ - page(body: PagingTenantInput | undefined , cancelToken?: CancelToken | undefined): Promise { - let url_ = this.baseUrl + "/Tenants/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 = TenantDtoPagedResultDto.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 as any); - } - - /** - * 创建租户 - * @param body (optional) - * @return Success - */ - create(body: TenantCreateDto | undefined , cancelToken?: CancelToken | undefined): Promise { - let url_ = this.baseUrl + "/Tenants/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 = TenantDto.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 as any); - } - - /** - * 更新租户 - * @param body (optional) - * @return Success - */ - update(body: UpdateTenantInput | undefined , cancelToken?: CancelToken | undefined): Promise { - let url_ = this.baseUrl + "/Tenants/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 = TenantDto.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 as any); - } - - /** - * 删除租户 - * @param body (optional) - * @return Success - */ - delete(body: IdInput | undefined , cancelToken?: CancelToken | undefined): Promise { - let url_ = this.baseUrl + "/Tenants/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 as any); - - } 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 as any); - } - - /** - * 获取租户连接字符串 - * @param body (optional) - * @return Success - */ - getConnectionString(body: IdInput | undefined , cancelToken?: CancelToken | undefined): Promise { - let url_ = this.baseUrl + "/Tenants/getConnectionString"; - 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.processGetConnectionString(_response)); - }); - } - - 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 as any); - } - - /** - * 更新租户连接字符串 - * @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 as any); - - } 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 as any); - } - - /** - * 删除租户连接字符串 - * @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 as any); - - } 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 as any); - } + 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 + */ + find( + body: FindTenantByNameInput | undefined, + cancelToken?: CancelToken | undefined, + ): Promise { + let url_ = this.baseUrl + '/Tenants/find'; + 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.processFind(_response), + ); + }); + } + + protected processFind(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 = FindTenantResultDto.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 as any); + } + + /** + * 分页获取租户信息 + * @param body (optional) + * @return Success + */ + page( + body: PagingTenantInput | undefined, + cancelToken?: CancelToken | undefined, + ): Promise { + let url_ = this.baseUrl + '/Tenants/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 = TenantDtoPagedResultDto.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 as any); + } + + /** + * 创建租户 + * @param body (optional) + * @return Success + */ + create( + body: TenantCreateDto | undefined, + cancelToken?: CancelToken | undefined, + ): Promise { + let url_ = this.baseUrl + '/Tenants/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 = TenantDto.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 as any); + } + + /** + * 更新租户 + * @param body (optional) + * @return Success + */ + update( + body: UpdateTenantInput | undefined, + cancelToken?: CancelToken | undefined, + ): Promise { + let url_ = this.baseUrl + '/Tenants/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 = TenantDto.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 as any); + } + + /** + * 删除租户 + * @param body (optional) + * @return Success + */ + delete(body: IdInput | undefined, cancelToken?: CancelToken | undefined): Promise { + let url_ = this.baseUrl + '/Tenants/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 as any); + } 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 as any); + } + + /** + * 获取租户连接字符串 + * @param body (optional) + * @return Success + */ + getConnectionString( + body: IdInput | undefined, + cancelToken?: CancelToken | undefined, + ): Promise { + let url_ = this.baseUrl + '/Tenants/getConnectionString'; + 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.processGetConnectionString(_response), + ); + }); + } + + 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 as any); + } + + /** + * 更新租户连接字符串 + * @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 as any); + } 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 as any); + } + + /** + * 删除租户连接字符串 + * @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 as any); + } 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 as any); + } } 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 as any); - } - - /** - * 导出用户列表 - * @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], { type: response.headers["content-type"] }), 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 as any); - } - - /** - * 创建用户 - * @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 as any); - } - - /** - * 编辑用户 - * @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 as any); - } - - /** - * 删除用户 - * @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 as any); - - } 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 as any); - } - - /** - * 获取用户角色信息 - * @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 as any); - } - - /** - * 修改当前用户密码 - * @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 as any); - } - - /** - * 锁定用户 - * @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 as any); - - } 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 as any); - } + 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 as any); + } + + /** + * 导出用户列表 + * @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; + let fileNameMatch = contentDisposition + ? /filename\*=(?:(\\?['"])(.*?)\1|(?:[^\s]+'.*?')?([^;\n]*))/g.exec(contentDisposition) + : undefined; + let fileName = + fileNameMatch && fileNameMatch.length > 1 + ? fileNameMatch[3] || fileNameMatch[2] + : undefined; + if (fileName) { + fileName = decodeURIComponent(fileName); + } else { + fileNameMatch = contentDisposition + ? /filename="?([^"]*?)"?(;|$)/g.exec(contentDisposition) + : undefined; + fileName = fileNameMatch && fileNameMatch.length > 1 ? fileNameMatch[1] : undefined; + } + return Promise.resolve({ + fileName: fileName, + status: status, + data: new Blob([response.data], { type: response.headers['content-type'] }), + 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 as any); + } + + /** + * 创建用户 + * @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 as any); + } + + /** + * 编辑用户 + * @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 as any); + } + + /** + * 删除用户 + * @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 as any); + } 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 as any); + } + + /** + * 获取用户角色信息 + * @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 as any); + } + + /** + * 修改当前用户密码 + * @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 as any); + } + + /** + * 锁定用户 + * @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 as any); + } 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 as any); + } } export class AbpLoginResult implements IAbpLoginResult { - result!: LoginResultType; - readonly description!: string | undefined; + result!: LoginResultType; + readonly description!: string | undefined; - constructor(data?: IAbpLoginResult) { - if (data) { - for (var property in data) { - if (data.hasOwnProperty(property)) - (this)[property] = (data)[property]; - } - } + 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"]; - } + 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; - } + 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; - } + 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; + 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; - } + 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; + 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 AddRoleToOrganizationUnitInput implements IAddRoleToOrganizationUnitInput { - roleId!: string[] | undefined; - organizationUnitId!: string; + roleId!: string[] | undefined; + organizationUnitId!: string; - constructor(data?: IAddRoleToOrganizationUnitInput) { - if (data) { - for (var property in data) { - if (data.hasOwnProperty(property)) - (this)[property] = (data)[property]; - } - } + 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"]; - } + 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; - } + 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; + 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; + roleId: string[] | undefined; + organizationUnitId: string; } export class AddUserToOrganizationUnitInput implements IAddUserToOrganizationUnitInput { - userId!: string[] | undefined; - organizationUnitId!: string; + userId!: string[] | undefined; + organizationUnitId!: string; - constructor(data?: IAddUserToOrganizationUnitInput) { - if (data) { - for (var property in data) { - if (data.hasOwnProperty(property)) - (this)[property] = (data)[property]; - } - } + 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"]; - } + 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; - } + 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; + 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; + 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; - } + 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; + routeKey: string | undefined; + parameter: string | undefined; + jsonPath: string | 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]; - } - } - } - - 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(); - } - } - } - } - - static fromJS(data: any): ApplicationApiDescriptionModel { - data = typeof data === 'object' ? data : {}; - let result = new ApplicationApiDescriptionModel(); - 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; - } - } - return data; - } + 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]; + } + } + } + + 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(); + } + } + } + } + + static fromJS(data: any): ApplicationApiDescriptionModel { + data = typeof data === 'object' ? data : {}; + let result = new ApplicationApiDescriptionModel(); + 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; + } + } + return data; + } } export interface IApplicationApiDescriptionModel { - modules: { [key: string]: ModuleApiDescriptionModel; } | undefined; - types: { [key: string]: TypeApiDescriptionModel; } | undefined; + modules: { [key: string]: ModuleApiDescriptionModel } | undefined; + types: { [key: string]: TypeApiDescriptionModel } | undefined; } export class ApplicationAuthConfigurationDto implements IApplicationAuthConfigurationDto { - policies!: { [key: string]: boolean; } | undefined; - grantedPolicies!: { [key: string]: boolean; } | undefined; + grantedPolicies!: { [key: string]: boolean } | undefined; - constructor(data?: IApplicationAuthConfigurationDto) { - if (data) { - for (var property in data) { - if (data.hasOwnProperty(property)) - (this)[property] = (data)[property]; - } - } + constructor(data?: IApplicationAuthConfigurationDto) { + if (data) { + for (var property in data) { + if (data.hasOwnProperty(property)) (this)[property] = (data)[property]; + } } + } - 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]; - } - } + init(_data?: any) { + if (_data) { + 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): ApplicationAuthConfigurationDto { - data = typeof data === 'object' ? data : {}; - let result = new ApplicationAuthConfigurationDto(); - result.init(data); - return result; - } + static fromJS(data: any): ApplicationAuthConfigurationDto { + data = typeof data === 'object' ? data : {}; + let result = new ApplicationAuthConfigurationDto(); + 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]; - } - } - if (this.grantedPolicies) { - data["grantedPolicies"] = {}; - for (let key in this.grantedPolicies) { - if (this.grantedPolicies.hasOwnProperty(key)) - (data["grantedPolicies"])[key] = (this.grantedPolicies)[key]; - } - } - return data; + toJSON(data?: any) { + data = typeof data === 'object' ? data : {}; + 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 IApplicationAuthConfigurationDto { - policies: { [key: string]: boolean; } | undefined; - grantedPolicies: { [key: string]: boolean; } | undefined; + grantedPolicies: { [key: string]: boolean } | undefined; } export class ApplicationConfigurationDto implements IApplicationConfigurationDto { - localization!: ApplicationLocalizationConfigurationDto; - auth!: ApplicationAuthConfigurationDto; - setting!: ApplicationSettingConfigurationDto; - currentUser!: CurrentUserDto; - features!: ApplicationFeatureConfigurationDto; - globalFeatures!: ApplicationGlobalFeatureConfigurationDto; - multiTenancy!: MultiTenancyInfoDto; - currentTenant!: CurrentTenantDto; - timing!: TimingDto; - clock!: ClockDto; - objectExtensions!: ObjectExtensionsDto; - extraProperties!: { [key: string]: any; } | undefined; - - constructor(data?: IApplicationConfigurationDto) { - if (data) { - for (var property in data) { - if (data.hasOwnProperty(property)) - (this)[property] = (data)[property]; - } - } - } - - 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.globalFeatures = _data["globalFeatures"] ? ApplicationGlobalFeatureConfigurationDto.fromJS(_data["globalFeatures"]) : 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; - if (_data["extraProperties"]) { - this.extraProperties = {} as any; - for (let key in _data["extraProperties"]) { - if (_data["extraProperties"].hasOwnProperty(key)) - (this.extraProperties)![key] = _data["extraProperties"][key]; - } - } - } - } - - static fromJS(data: any): ApplicationConfigurationDto { - data = typeof data === 'object' ? data : {}; - let result = new ApplicationConfigurationDto(); - 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["globalFeatures"] = this.globalFeatures ? this.globalFeatures.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; - if (this.extraProperties) { - data["extraProperties"] = {}; - for (let key in this.extraProperties) { - if (this.extraProperties.hasOwnProperty(key)) - (data["extraProperties"])[key] = (this.extraProperties)[key]; - } - } - return data; - } + localization!: ApplicationLocalizationConfigurationDto; + auth!: ApplicationAuthConfigurationDto; + setting!: ApplicationSettingConfigurationDto; + currentUser!: CurrentUserDto; + features!: ApplicationFeatureConfigurationDto; + globalFeatures!: ApplicationGlobalFeatureConfigurationDto; + multiTenancy!: MultiTenancyInfoDto; + currentTenant!: CurrentTenantDto; + timing!: TimingDto; + clock!: ClockDto; + objectExtensions!: ObjectExtensionsDto; + extraProperties!: { [key: string]: any } | undefined; + + constructor(data?: IApplicationConfigurationDto) { + if (data) { + for (var property in data) { + if (data.hasOwnProperty(property)) (this)[property] = (data)[property]; + } + } + } + + 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.globalFeatures = _data['globalFeatures'] + ? ApplicationGlobalFeatureConfigurationDto.fromJS(_data['globalFeatures']) + : 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; + if (_data['extraProperties']) { + this.extraProperties = {} as any; + for (let key in _data['extraProperties']) { + if (_data['extraProperties'].hasOwnProperty(key)) + (this.extraProperties)![key] = _data['extraProperties'][key]; + } + } + } + } + + static fromJS(data: any): ApplicationConfigurationDto { + data = typeof data === 'object' ? data : {}; + let result = new ApplicationConfigurationDto(); + 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['globalFeatures'] = this.globalFeatures ? this.globalFeatures.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; + if (this.extraProperties) { + data['extraProperties'] = {}; + for (let key in this.extraProperties) { + if (this.extraProperties.hasOwnProperty(key)) + (data['extraProperties'])[key] = (this.extraProperties)[key]; + } + } + return data; + } } export interface IApplicationConfigurationDto { - localization: ApplicationLocalizationConfigurationDto; - auth: ApplicationAuthConfigurationDto; - setting: ApplicationSettingConfigurationDto; - currentUser: CurrentUserDto; - features: ApplicationFeatureConfigurationDto; - globalFeatures: ApplicationGlobalFeatureConfigurationDto; - multiTenancy: MultiTenancyInfoDto; - currentTenant: CurrentTenantDto; - timing: TimingDto; - clock: ClockDto; - objectExtensions: ObjectExtensionsDto; - extraProperties: { [key: string]: any; } | undefined; + localization: ApplicationLocalizationConfigurationDto; + auth: ApplicationAuthConfigurationDto; + setting: ApplicationSettingConfigurationDto; + currentUser: CurrentUserDto; + features: ApplicationFeatureConfigurationDto; + globalFeatures: ApplicationGlobalFeatureConfigurationDto; + multiTenancy: MultiTenancyInfoDto; + currentTenant: CurrentTenantDto; + timing: TimingDto; + clock: ClockDto; + objectExtensions: ObjectExtensionsDto; + extraProperties: { [key: string]: any } | undefined; } export class ApplicationFeatureConfigurationDto implements IApplicationFeatureConfigurationDto { - values!: { [key: string]: string; } | undefined; + values!: { [key: string]: string } | undefined; - constructor(data?: IApplicationFeatureConfigurationDto) { - if (data) { - for (var property in data) { - if (data.hasOwnProperty(property)) - (this)[property] = (data)[property]; - } - } + constructor(data?: IApplicationFeatureConfigurationDto) { + if (data) { + for (var property in data) { + if (data.hasOwnProperty(property)) (this)[property] = (data)[property]; + } } + } - 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]; - } - } + 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]; } + } } + } - static fromJS(data: any): ApplicationFeatureConfigurationDto { - data = typeof data === 'object' ? data : {}; - let result = new ApplicationFeatureConfigurationDto(); - result.init(data); - return result; - } + static fromJS(data: any): ApplicationFeatureConfigurationDto { + data = typeof data === 'object' ? data : {}; + let result = new ApplicationFeatureConfigurationDto(); + 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]; - } - } - return data; + 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]; + } } + return data; + } } export interface IApplicationFeatureConfigurationDto { - values: { [key: string]: string; } | undefined; + values: { [key: string]: string } | undefined; } -export class ApplicationGlobalFeatureConfigurationDto implements IApplicationGlobalFeatureConfigurationDto { - enabledFeatures!: string[] | undefined; +export class ApplicationGlobalFeatureConfigurationDto + implements IApplicationGlobalFeatureConfigurationDto +{ + enabledFeatures!: string[] | undefined; - constructor(data?: IApplicationGlobalFeatureConfigurationDto) { - if (data) { - for (var property in data) { - if (data.hasOwnProperty(property)) - (this)[property] = (data)[property]; - } - } + constructor(data?: IApplicationGlobalFeatureConfigurationDto) { + if (data) { + for (var property in data) { + if (data.hasOwnProperty(property)) (this)[property] = (data)[property]; + } } + } - init(_data?: any) { - if (_data) { - if (Array.isArray(_data["enabledFeatures"])) { - this.enabledFeatures = [] as any; - for (let item of _data["enabledFeatures"]) - this.enabledFeatures!.push(item); - } - } + init(_data?: any) { + if (_data) { + if (Array.isArray(_data['enabledFeatures'])) { + this.enabledFeatures = [] as any; + for (let item of _data['enabledFeatures']) this.enabledFeatures!.push(item); + } } + } - static fromJS(data: any): ApplicationGlobalFeatureConfigurationDto { - data = typeof data === 'object' ? data : {}; - let result = new ApplicationGlobalFeatureConfigurationDto(); - result.init(data); - return result; - } + static fromJS(data: any): ApplicationGlobalFeatureConfigurationDto { + data = typeof data === 'object' ? data : {}; + let result = new ApplicationGlobalFeatureConfigurationDto(); + result.init(data); + return result; + } - toJSON(data?: any) { - data = typeof data === 'object' ? data : {}; - if (Array.isArray(this.enabledFeatures)) { - data["enabledFeatures"] = []; - for (let item of this.enabledFeatures) - data["enabledFeatures"].push(item); - } - return data; + toJSON(data?: any) { + data = typeof data === 'object' ? data : {}; + if (Array.isArray(this.enabledFeatures)) { + data['enabledFeatures'] = []; + for (let item of this.enabledFeatures) data['enabledFeatures'].push(item); } + return data; + } } export interface IApplicationGlobalFeatureConfigurationDto { - enabledFeatures: 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?: IApplicationLocalizationConfigurationDto) { - if (data) { - for (var property in data) { - if (data.hasOwnProperty(property)) - (this)[property] = (data)[property]; - } - } - } - - 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]; - } - } - 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)) : undefined; - } - } - 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)) : undefined; - } - } - } - } - - static fromJS(data: any): ApplicationLocalizationConfigurationDto { - data = typeof data === 'object' ? data : {}; - let result = new ApplicationLocalizationConfigurationDto(); - 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]; - } - } - return data; - } + enabledFeatures: string[] | undefined; +} + +export class ApplicationLocalizationConfigurationDto + implements IApplicationLocalizationConfigurationDto +{ + values!: { [key: string]: { [key: string]: string } } | undefined; + resources!: { [key: string]: ApplicationLocalizationResourceDto } | undefined; + languages!: LanguageInfo[] | undefined; + currentCulture!: CurrentCultureDto; + defaultResourceName!: string | undefined; + languagesMap!: { [key: string]: NameValue[] } | undefined; + languageFilesMap!: { [key: string]: NameValue[] } | undefined; + + constructor(data?: IApplicationLocalizationConfigurationDto) { + if (data) { + for (var property in data) { + if (data.hasOwnProperty(property)) (this)[property] = (data)[property]; + } + } + } + + 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]; + } + } + if (_data['resources']) { + this.resources = {} as any; + for (let key in _data['resources']) { + if (_data['resources'].hasOwnProperty(key)) + (this.resources)![key] = _data['resources'][key] + ? ApplicationLocalizationResourceDto.fromJS(_data['resources'][key]) + : new ApplicationLocalizationResourceDto(); + } + } + 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)) + : undefined; + } + } + 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)) + : undefined; + } + } + } + } + + static fromJS(data: any): ApplicationLocalizationConfigurationDto { + data = typeof data === 'object' ? data : {}; + let result = new ApplicationLocalizationConfigurationDto(); + 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 (this.resources) { + data['resources'] = {}; + for (let key in this.resources) { + if (this.resources.hasOwnProperty(key)) + (data['resources'])[key] = this.resources[key] + ? this.resources[key].toJSON() + : undefined; + } + } + 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 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; + values: { [key: string]: { [key: string]: string } } | undefined; + resources: { [key: string]: ApplicationLocalizationResourceDto } | undefined; + languages: LanguageInfo[] | undefined; + currentCulture: CurrentCultureDto; + defaultResourceName: string | undefined; + languagesMap: { [key: string]: NameValue[] } | undefined; + languageFilesMap: { [key: string]: NameValue[] } | undefined; +} + +export class ApplicationLocalizationDto implements IApplicationLocalizationDto { + resources!: { [key: string]: ApplicationLocalizationResourceDto } | undefined; + + constructor(data?: IApplicationLocalizationDto) { + if (data) { + for (var property in data) { + if (data.hasOwnProperty(property)) (this)[property] = (data)[property]; + } + } + } + + init(_data?: any) { + if (_data) { + if (_data['resources']) { + this.resources = {} as any; + for (let key in _data['resources']) { + if (_data['resources'].hasOwnProperty(key)) + (this.resources)![key] = _data['resources'][key] + ? ApplicationLocalizationResourceDto.fromJS(_data['resources'][key]) + : new ApplicationLocalizationResourceDto(); + } + } + } + } + + static fromJS(data: any): ApplicationLocalizationDto { + data = typeof data === 'object' ? data : {}; + let result = new ApplicationLocalizationDto(); + result.init(data); + return result; + } + + toJSON(data?: any) { + data = typeof data === 'object' ? data : {}; + if (this.resources) { + data['resources'] = {}; + for (let key in this.resources) { + if (this.resources.hasOwnProperty(key)) + (data['resources'])[key] = this.resources[key] + ? this.resources[key].toJSON() + : undefined; + } + } + return data; + } +} + +export interface IApplicationLocalizationDto { + resources: { [key: string]: ApplicationLocalizationResourceDto } | undefined; +} + +export class ApplicationLocalizationResourceDto implements IApplicationLocalizationResourceDto { + texts!: { [key: string]: string } | undefined; + baseResources!: string[] | undefined; + + constructor(data?: IApplicationLocalizationResourceDto) { + if (data) { + for (var property in data) { + if (data.hasOwnProperty(property)) (this)[property] = (data)[property]; + } + } + } + + init(_data?: any) { + if (_data) { + if (_data['texts']) { + this.texts = {} as any; + for (let key in _data['texts']) { + if (_data['texts'].hasOwnProperty(key)) (this.texts)![key] = _data['texts'][key]; + } + } + if (Array.isArray(_data['baseResources'])) { + this.baseResources = [] as any; + for (let item of _data['baseResources']) this.baseResources!.push(item); + } + } + } + + static fromJS(data: any): ApplicationLocalizationResourceDto { + data = typeof data === 'object' ? data : {}; + let result = new ApplicationLocalizationResourceDto(); + result.init(data); + return result; + } + + toJSON(data?: any) { + data = typeof data === 'object' ? data : {}; + if (this.texts) { + data['texts'] = {}; + for (let key in this.texts) { + if (this.texts.hasOwnProperty(key)) (data['texts'])[key] = (this.texts)[key]; + } + } + if (Array.isArray(this.baseResources)) { + data['baseResources'] = []; + for (let item of this.baseResources) data['baseResources'].push(item); + } + return data; + } +} + +export interface IApplicationLocalizationResourceDto { + texts: { [key: string]: string } | undefined; + baseResources: string[] | undefined; } export class ApplicationSettingConfigurationDto implements IApplicationSettingConfigurationDto { - values!: { [key: string]: string; } | undefined; + values!: { [key: string]: string } | undefined; - constructor(data?: IApplicationSettingConfigurationDto) { - if (data) { - for (var property in data) { - if (data.hasOwnProperty(property)) - (this)[property] = (data)[property]; - } - } + constructor(data?: IApplicationSettingConfigurationDto) { + if (data) { + for (var property in data) { + if (data.hasOwnProperty(property)) (this)[property] = (data)[property]; + } } + } - 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]; - } - } + 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]; } + } } + } - static fromJS(data: any): ApplicationSettingConfigurationDto { - data = typeof data === 'object' ? data : {}; - let result = new ApplicationSettingConfigurationDto(); - result.init(data); - return result; - } + static fromJS(data: any): ApplicationSettingConfigurationDto { + data = typeof data === 'object' ? data : {}; + let result = new ApplicationSettingConfigurationDto(); + 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]; - } - } - return data; + 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]; + } } + return data; + } } export interface IApplicationSettingConfigurationDto { - values: { [key: string]: string; } | undefined; + values: { [key: string]: string } | undefined; } export class ChangePasswordInput implements IChangePasswordInput { - currentPassword!: string | undefined; - newPassword!: string; + currentPassword!: string | undefined; + newPassword!: string; - constructor(data?: IChangePasswordInput) { - if (data) { - for (var property in data) { - if (data.hasOwnProperty(property)) - (this)[property] = (data)[property]; - } - } + constructor(data?: IChangePasswordInput) { + if (data) { + for (var property in data) { + if (data.hasOwnProperty(property)) (this)[property] = (data)[property]; + } } + } - init(_data?: any) { - if (_data) { - this.currentPassword = _data["currentPassword"]; - this.newPassword = _data["newPassword"]; - } + init(_data?: any) { + if (_data) { + this.currentPassword = _data['currentPassword']; + this.newPassword = _data['newPassword']; } + } - static fromJS(data: any): ChangePasswordInput { - data = typeof data === 'object' ? data : {}; - let result = new ChangePasswordInput(); - result.init(data); - return result; - } + static fromJS(data: any): ChangePasswordInput { + data = typeof data === 'object' ? data : {}; + let result = new ChangePasswordInput(); + result.init(data); + return result; + } - toJSON(data?: any) { - data = typeof data === 'object' ? data : {}; - data["currentPassword"] = this.currentPassword; - data["newPassword"] = this.newPassword; - return data; - } + toJSON(data?: any) { + data = typeof data === 'object' ? data : {}; + data['currentPassword'] = this.currentPassword; + data['newPassword'] = this.newPassword; + return data; + } } export interface IChangePasswordInput { - currentPassword: string | undefined; - newPassword: string; + currentPassword: string | undefined; + newPassword: string; } export class ClockDto implements IClockDto { - kind!: string | undefined; + kind!: string | undefined; - constructor(data?: IClockDto) { - if (data) { - for (var property in data) { - if (data.hasOwnProperty(property)) - (this)[property] = (data)[property]; - } - } + constructor(data?: IClockDto) { + if (data) { + for (var property in data) { + if (data.hasOwnProperty(property)) (this)[property] = (data)[property]; + } } + } - init(_data?: any) { - if (_data) { - this.kind = _data["kind"]; - } + init(_data?: any) { + if (_data) { + this.kind = _data['kind']; } + } - static fromJS(data: any): ClockDto { - data = typeof data === 'object' ? data : {}; - let result = new ClockDto(); - result.init(data); - return result; - } + static fromJS(data: any): ClockDto { + data = typeof data === 'object' ? data : {}; + let result = new ClockDto(); + result.init(data); + return result; + } - toJSON(data?: any) { - data = typeof data === 'object' ? data : {}; - data["kind"] = this.kind; - return data; - } + toJSON(data?: any) { + data = typeof data === 'object' ? data : {}; + data['kind'] = this.kind; + return data; + } } export interface IClockDto { - kind: string | undefined; + kind: 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; - - constructor(data?: IControllerApiDescriptionModel) { - if (data) { - for (var property in data) { - if (data.hasOwnProperty(property)) - (this)[property] = (data)[property]; - } - } - } - - 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 ControllerApiDescriptionModel(); - 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; - } - } - return data; - } + controllerName!: string | undefined; + controllerGroupName!: string | undefined; + isRemoteService!: boolean; + isIntegrationService!: boolean; + apiVersion!: string | undefined; + type!: string | undefined; + interfaces!: ControllerInterfaceApiDescriptionModel[] | undefined; + actions!: { [key: string]: ActionApiDescriptionModel } | undefined; + + constructor(data?: IControllerApiDescriptionModel) { + if (data) { + for (var property in data) { + if (data.hasOwnProperty(property)) (this)[property] = (data)[property]; + } + } + } + + init(_data?: any) { + if (_data) { + this.controllerName = _data['controllerName']; + this.controllerGroupName = _data['controllerGroupName']; + this.isRemoteService = _data['isRemoteService']; + this.isIntegrationService = _data['isIntegrationService']; + 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 ControllerApiDescriptionModel(); + 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['isIntegrationService'] = this.isIntegrationService; + 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 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 ControllerInterfaceApiDescriptionModel implements IControllerInterfaceApiDescriptionModel { - type!: string | undefined; - - constructor(data?: IControllerInterfaceApiDescriptionModel) { - if (data) { - for (var property in data) { - if (data.hasOwnProperty(property)) - (this)[property] = (data)[property]; - } - } - } - - init(_data?: any) { - if (_data) { - this.type = _data["type"]; - } - } - - static fromJS(data: any): ControllerInterfaceApiDescriptionModel { - data = typeof data === 'object' ? data : {}; - let result = new ControllerInterfaceApiDescriptionModel(); - result.init(data); - return result; - } - - toJSON(data?: any) { - data = typeof data === 'object' ? data : {}; - data["type"] = this.type; - return data; - } + controllerName: string | undefined; + controllerGroupName: string | undefined; + isRemoteService: boolean; + isIntegrationService: boolean; + apiVersion: string | undefined; + type: string | undefined; + interfaces: ControllerInterfaceApiDescriptionModel[] | undefined; + actions: { [key: string]: ActionApiDescriptionModel } | undefined; +} + +export class ControllerInterfaceApiDescriptionModel + implements IControllerInterfaceApiDescriptionModel +{ + type!: string | undefined; + name!: string | undefined; + methods!: InterfaceMethodApiDescriptionModel[] | undefined; + + constructor(data?: IControllerInterfaceApiDescriptionModel) { + if (data) { + for (var property in data) { + if (data.hasOwnProperty(property)) (this)[property] = (data)[property]; + } + } + } + + init(_data?: any) { + if (_data) { + this.type = _data['type']; + this.name = _data['name']; + if (Array.isArray(_data['methods'])) { + this.methods = [] as any; + for (let item of _data['methods']) + this.methods!.push(InterfaceMethodApiDescriptionModel.fromJS(item)); + } + } + } + + static fromJS(data: any): ControllerInterfaceApiDescriptionModel { + data = typeof data === 'object' ? data : {}; + let result = new ControllerInterfaceApiDescriptionModel(); + result.init(data); + return result; + } + + toJSON(data?: any) { + data = typeof data === 'object' ? data : {}; + data['type'] = this.type; + data['name'] = this.name; + if (Array.isArray(this.methods)) { + data['methods'] = []; + for (let item of this.methods) data['methods'].push(item.toJSON()); + } + return data; + } } export interface IControllerInterfaceApiDescriptionModel { - type: string | undefined; + type: string | undefined; + name: string | undefined; + methods: InterfaceMethodApiDescriptionModel[] | undefined; } export class CreateDataDictinaryDetailInput implements ICreateDataDictinaryDetailInput { - id!: string; - code!: string; - displayText!: string; - description!: string | undefined; - order!: number; - - constructor(data?: ICreateDataDictinaryDetailInput) { - 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.code = _data["code"]; - this.displayText = _data["displayText"]; - this.description = _data["description"]; - this.order = _data["order"]; - } - } - - static fromJS(data: any): CreateDataDictinaryDetailInput { - data = typeof data === 'object' ? data : {}; - let result = new CreateDataDictinaryDetailInput(); - 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; - } + id!: string; + code!: string; + displayText!: string; + description!: string | undefined; + order!: number; + + constructor(data?: ICreateDataDictinaryDetailInput) { + 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.code = _data['code']; + this.displayText = _data['displayText']; + this.description = _data['description']; + this.order = _data['order']; + } + } + + static fromJS(data: any): CreateDataDictinaryDetailInput { + data = typeof data === 'object' ? data : {}; + let result = new CreateDataDictinaryDetailInput(); + 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; + id: string; + code: string; + displayText: string; + description: string | undefined; + order: number; } export class CreateDataDictinaryInput implements ICreateDataDictinaryInput { - code!: string; - displayText!: string; - description!: string | undefined; - - constructor(data?: ICreateDataDictinaryInput) { - if (data) { - for (var property in data) { - if (data.hasOwnProperty(property)) - (this)[property] = (data)[property]; - } - } - } - - init(_data?: any) { - if (_data) { - this.code = _data["code"]; - this.displayText = _data["displayText"]; - this.description = _data["description"]; - } - } - - static fromJS(data: any): CreateDataDictinaryInput { - data = typeof data === 'object' ? data : {}; - let result = new CreateDataDictinaryInput(); - 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; - return data; - } + code!: string; + displayText!: string; + description!: string | undefined; + + constructor(data?: ICreateDataDictinaryInput) { + if (data) { + for (var property in data) { + if (data.hasOwnProperty(property)) (this)[property] = (data)[property]; + } + } + } + + init(_data?: any) { + if (_data) { + this.code = _data['code']; + this.displayText = _data['displayText']; + this.description = _data['description']; + } + } + + static fromJS(data: any): CreateDataDictinaryInput { + data = typeof data === 'object' ? data : {}; + let result = new CreateDataDictinaryInput(); + 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; + return data; + } } export interface ICreateDataDictinaryInput { - code: string; - displayText: string; - description: string | undefined; + code: string; + displayText: string; + description: string | undefined; } export class CreateOrganizationUnitInput implements ICreateOrganizationUnitInput { - displayName!: string; - parentId!: string | undefined; + displayName!: string; + parentId!: string | undefined; - constructor(data?: ICreateOrganizationUnitInput) { - if (data) { - for (var property in data) { - if (data.hasOwnProperty(property)) - (this)[property] = (data)[property]; - } - } + constructor(data?: ICreateOrganizationUnitInput) { + 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.parentId = _data["parentId"]; - } + init(_data?: any) { + if (_data) { + this.displayName = _data['displayName']; + this.parentId = _data['parentId']; } + } - static fromJS(data: any): CreateOrganizationUnitInput { - data = typeof data === 'object' ? data : {}; - let result = new CreateOrganizationUnitInput(); - result.init(data); - return result; - } + static fromJS(data: any): CreateOrganizationUnitInput { + data = typeof data === 'object' ? data : {}; + let result = new CreateOrganizationUnitInput(); + result.init(data); + return result; + } - toJSON(data?: any) { - data = typeof data === 'object' ? data : {}; - data["displayName"] = this.displayName; - data["parentId"] = this.parentId; - return data; - } + toJSON(data?: any) { + data = typeof data === 'object' ? data : {}; + data['displayName'] = this.displayName; + data['parentId'] = this.parentId; + return data; + } } export interface ICreateOrganizationUnitInput { - displayName: string; - parentId: string | undefined; + displayName: string; + parentId: string | 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?: ICurrentCultureDto) { - 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.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): CurrentCultureDto { - data = typeof data === 'object' ? data : {}; - let result = new CurrentCultureDto(); - 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; - return data; - } + 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?: ICurrentCultureDto) { + 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.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): CurrentCultureDto { + data = typeof data === 'object' ? data : {}; + let result = new CurrentCultureDto(); + 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; + 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; + 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 CurrentTenantDto implements ICurrentTenantDto { - id!: string | undefined; - name!: string | undefined; - isAvailable!: boolean; - - constructor(data?: ICurrentTenantDto) { - 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.isAvailable = _data["isAvailable"]; - } - } - - static fromJS(data: any): CurrentTenantDto { - data = typeof data === 'object' ? data : {}; - let result = new CurrentTenantDto(); - 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; - return data; - } + id!: string | undefined; + name!: string | undefined; + isAvailable!: boolean; + + constructor(data?: ICurrentTenantDto) { + 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.isAvailable = _data['isAvailable']; + } + } + + static fromJS(data: any): CurrentTenantDto { + data = typeof data === 'object' ? data : {}; + let result = new CurrentTenantDto(); + 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; + return data; + } } export interface ICurrentTenantDto { - id: string | undefined; - name: string | undefined; - isAvailable: boolean; + id: string | undefined; + name: string | undefined; + isAvailable: boolean; } 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; - - constructor(data?: ICurrentUserDto) { - if (data) { - for (var property in data) { - if (data.hasOwnProperty(property)) - (this)[property] = (data)[property]; - } - } - } - - 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); - } - } - } - - static fromJS(data: any): CurrentUserDto { - data = typeof data === 'object' ? data : {}; - 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["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; - } + 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; + + constructor(data?: ICurrentUserDto) { + if (data) { + for (var property in data) { + if (data.hasOwnProperty(property)) (this)[property] = (data)[property]; + } + } + } + + 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); + } + } + } + + static fromJS(data: any): CurrentUserDto { + data = typeof data === 'object' ? data : {}; + 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['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 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; + 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 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?: IDateTimeFormatDto) { - if (data) { - for (var property in data) { - if (data.hasOwnProperty(property)) - (this)[property] = (data)[property]; - } - } - } - - 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"]; - } - } - - static fromJS(data: any): DateTimeFormatDto { - data = typeof data === 'object' ? data : {}; - let result = new DateTimeFormatDto(); - 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; - return data; - } + calendarAlgorithmType!: string | undefined; + dateTimeFormatLong!: string | undefined; + shortDatePattern!: string | undefined; + fullDateTimePattern!: string | undefined; + dateSeparator!: string | undefined; + shortTimePattern!: string | undefined; + longTimePattern!: string | undefined; + + constructor(data?: IDateTimeFormatDto) { + if (data) { + for (var property in data) { + if (data.hasOwnProperty(property)) (this)[property] = (data)[property]; + } + } + } + + 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']; + } + } + + static fromJS(data: any): DateTimeFormatDto { + data = typeof data === 'object' ? data : {}; + let result = new DateTimeFormatDto(); + 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; + 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; + calendarAlgorithmType: string | undefined; + dateTimeFormatLong: string | undefined; + shortDatePattern: string | undefined; + fullDateTimePattern: string | undefined; + dateSeparator: string | undefined; + shortTimePattern: string | undefined; + longTimePattern: string | undefined; } export class DeleteDataDictionaryDetailInput implements IDeleteDataDictionaryDetailInput { - dataDictionaryId!: string; - dataDictionayDetailId!: string; + dataDictionaryId!: string; + dataDictionayDetailId!: string; - constructor(data?: IDeleteDataDictionaryDetailInput) { - if (data) { - for (var property in data) { - if (data.hasOwnProperty(property)) - (this)[property] = (data)[property]; - } - } + constructor(data?: IDeleteDataDictionaryDetailInput) { + if (data) { + for (var property in data) { + if (data.hasOwnProperty(property)) (this)[property] = (data)[property]; + } } + } - init(_data?: any) { - if (_data) { - this.dataDictionaryId = _data["dataDictionaryId"]; - this.dataDictionayDetailId = _data["dataDictionayDetailId"]; - } + init(_data?: any) { + if (_data) { + this.dataDictionaryId = _data['dataDictionaryId']; + this.dataDictionayDetailId = _data['dataDictionayDetailId']; } + } - static fromJS(data: any): DeleteDataDictionaryDetailInput { - data = typeof data === 'object' ? data : {}; - let result = new DeleteDataDictionaryDetailInput(); - result.init(data); - return result; - } + static fromJS(data: any): DeleteDataDictionaryDetailInput { + data = typeof data === 'object' ? data : {}; + let result = new DeleteDataDictionaryDetailInput(); + result.init(data); + return result; + } - toJSON(data?: any) { - data = typeof data === 'object' ? data : {}; - data["dataDictionaryId"] = this.dataDictionaryId; - data["dataDictionayDetailId"] = this.dataDictionayDetailId; - return data; - } + toJSON(data?: any) { + data = typeof data === 'object' ? data : {}; + data['dataDictionaryId'] = this.dataDictionaryId; + data['dataDictionayDetailId'] = this.dataDictionayDetailId; + return data; + } } export interface IDeleteDataDictionaryDetailInput { - dataDictionaryId: string; - dataDictionayDetailId: string; + dataDictionaryId: string; + dataDictionayDetailId: string; } export class EntityExtensionDto implements IEntityExtensionDto { - properties!: { [key: string]: ExtensionPropertyDto; } | undefined; - configuration!: { [key: string]: any; } | undefined; - - constructor(data?: IEntityExtensionDto) { - if (data) { - for (var property in data) { - if (data.hasOwnProperty(property)) - (this)[property] = (data)[property]; - } - } - } - - 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]; - } - } - } - } - - static fromJS(data: any): EntityExtensionDto { - data = typeof data === 'object' ? data : {}; - let result = new EntityExtensionDto(); - 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]; - } - } - return data; - } + properties!: { [key: string]: ExtensionPropertyDto } | undefined; + configuration!: { [key: string]: any } | undefined; + + constructor(data?: IEntityExtensionDto) { + if (data) { + for (var property in data) { + if (data.hasOwnProperty(property)) (this)[property] = (data)[property]; + } + } + } + + 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]; + } + } + } + } + + static fromJS(data: any): EntityExtensionDto { + data = typeof data === 'object' ? data : {}; + let result = new EntityExtensionDto(); + 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]; + } + } + return data; + } } export interface IEntityExtensionDto { - properties: { [key: string]: ExtensionPropertyDto; } | undefined; - configuration: { [key: string]: any; } | undefined; + properties: { [key: string]: ExtensionPropertyDto } | undefined; + configuration: { [key: string]: any } | undefined; } export class ExtensionEnumDto implements IExtensionEnumDto { - fields!: ExtensionEnumFieldDto[] | undefined; - localizationResource!: string | undefined; + fields!: ExtensionEnumFieldDto[] | undefined; + localizationResource!: string | undefined; - constructor(data?: IExtensionEnumDto) { - if (data) { - for (var property in data) { - if (data.hasOwnProperty(property)) - (this)[property] = (data)[property]; - } - } + constructor(data?: IExtensionEnumDto) { + if (data) { + for (var property in data) { + if (data.hasOwnProperty(property)) (this)[property] = (data)[property]; + } } + } - 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"]; - } + 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']; } + } - static fromJS(data: any): ExtensionEnumDto { - data = typeof data === 'object' ? data : {}; - let result = new ExtensionEnumDto(); - result.init(data); - return result; - } + static fromJS(data: any): ExtensionEnumDto { + data = typeof data === 'object' ? data : {}; + let result = new ExtensionEnumDto(); + 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; - return data; + 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; + return data; + } } export interface IExtensionEnumDto { - fields: ExtensionEnumFieldDto[] | undefined; - localizationResource: string | undefined; + fields: ExtensionEnumFieldDto[] | undefined; + localizationResource: string | undefined; } export class ExtensionEnumFieldDto implements IExtensionEnumFieldDto { - name!: string | undefined; - value!: any | undefined; + name!: string | undefined; + value!: any | undefined; - constructor(data?: IExtensionEnumFieldDto) { - if (data) { - for (var property in data) { - if (data.hasOwnProperty(property)) - (this)[property] = (data)[property]; - } - } + constructor(data?: IExtensionEnumFieldDto) { + if (data) { + for (var property in data) { + if (data.hasOwnProperty(property)) (this)[property] = (data)[property]; + } } + } - init(_data?: any) { - if (_data) { - this.name = _data["name"]; - this.value = _data["value"]; - } + init(_data?: any) { + if (_data) { + this.name = _data['name']; + this.value = _data['value']; } + } - static fromJS(data: any): ExtensionEnumFieldDto { - data = typeof data === 'object' ? data : {}; - let result = new ExtensionEnumFieldDto(); - result.init(data); - return result; - } + static fromJS(data: any): ExtensionEnumFieldDto { + data = typeof data === 'object' ? data : {}; + let result = new ExtensionEnumFieldDto(); + result.init(data); + return result; + } - toJSON(data?: any) { - data = typeof data === 'object' ? data : {}; - data["name"] = this.name; - data["value"] = this.value; - return data; - } + toJSON(data?: any) { + data = typeof data === 'object' ? data : {}; + data['name'] = this.name; + data['value'] = this.value; + return data; + } } export interface IExtensionEnumFieldDto { - name: string | undefined; - value: any | undefined; + name: string | undefined; + value: any | undefined; } export class ExtensionPropertyApiCreateDto implements IExtensionPropertyApiCreateDto { - isAvailable!: boolean; + isAvailable!: boolean; - constructor(data?: IExtensionPropertyApiCreateDto) { - if (data) { - for (var property in data) { - if (data.hasOwnProperty(property)) - (this)[property] = (data)[property]; - } - } + constructor(data?: IExtensionPropertyApiCreateDto) { + if (data) { + for (var property in data) { + if (data.hasOwnProperty(property)) (this)[property] = (data)[property]; + } } + } - init(_data?: any) { - if (_data) { - this.isAvailable = _data["isAvailable"]; - } + init(_data?: any) { + if (_data) { + this.isAvailable = _data['isAvailable']; } + } - static fromJS(data: any): ExtensionPropertyApiCreateDto { - data = typeof data === 'object' ? data : {}; - let result = new ExtensionPropertyApiCreateDto(); - result.init(data); - return result; - } + static fromJS(data: any): ExtensionPropertyApiCreateDto { + data = typeof data === 'object' ? data : {}; + let result = new ExtensionPropertyApiCreateDto(); + result.init(data); + return result; + } - toJSON(data?: any) { - data = typeof data === 'object' ? data : {}; - data["isAvailable"] = this.isAvailable; - return data; - } + toJSON(data?: any) { + data = typeof data === 'object' ? data : {}; + data['isAvailable'] = this.isAvailable; + return data; + } } export interface IExtensionPropertyApiCreateDto { - isAvailable: boolean; + isAvailable: boolean; } export class ExtensionPropertyApiDto implements IExtensionPropertyApiDto { - onGet!: ExtensionPropertyApiGetDto; - onCreate!: ExtensionPropertyApiCreateDto; - onUpdate!: ExtensionPropertyApiUpdateDto; - - constructor(data?: IExtensionPropertyApiDto) { - if (data) { - for (var property in data) { - if (data.hasOwnProperty(property)) - (this)[property] = (data)[property]; - } - } - } - - 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; - } - } - - static fromJS(data: any): ExtensionPropertyApiDto { - data = typeof data === 'object' ? data : {}; - let result = new ExtensionPropertyApiDto(); - 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; - return data; - } + onGet!: ExtensionPropertyApiGetDto; + onCreate!: ExtensionPropertyApiCreateDto; + onUpdate!: ExtensionPropertyApiUpdateDto; + + constructor(data?: IExtensionPropertyApiDto) { + if (data) { + for (var property in data) { + if (data.hasOwnProperty(property)) (this)[property] = (data)[property]; + } + } + } + + 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; + } + } + + static fromJS(data: any): ExtensionPropertyApiDto { + data = typeof data === 'object' ? data : {}; + let result = new ExtensionPropertyApiDto(); + 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; + return data; + } } export interface IExtensionPropertyApiDto { - onGet: ExtensionPropertyApiGetDto; - onCreate: ExtensionPropertyApiCreateDto; - onUpdate: ExtensionPropertyApiUpdateDto; + onGet: ExtensionPropertyApiGetDto; + onCreate: ExtensionPropertyApiCreateDto; + onUpdate: ExtensionPropertyApiUpdateDto; } export class ExtensionPropertyApiGetDto implements IExtensionPropertyApiGetDto { - isAvailable!: boolean; + isAvailable!: boolean; - constructor(data?: IExtensionPropertyApiGetDto) { - if (data) { - for (var property in data) { - if (data.hasOwnProperty(property)) - (this)[property] = (data)[property]; - } - } + constructor(data?: IExtensionPropertyApiGetDto) { + if (data) { + for (var property in data) { + if (data.hasOwnProperty(property)) (this)[property] = (data)[property]; + } } + } - init(_data?: any) { - if (_data) { - this.isAvailable = _data["isAvailable"]; - } + init(_data?: any) { + if (_data) { + this.isAvailable = _data['isAvailable']; } + } - static fromJS(data: any): ExtensionPropertyApiGetDto { - data = typeof data === 'object' ? data : {}; - let result = new ExtensionPropertyApiGetDto(); - result.init(data); - return result; - } + static fromJS(data: any): ExtensionPropertyApiGetDto { + data = typeof data === 'object' ? data : {}; + let result = new ExtensionPropertyApiGetDto(); + result.init(data); + return result; + } - toJSON(data?: any) { - data = typeof data === 'object' ? data : {}; - data["isAvailable"] = this.isAvailable; - return data; - } + toJSON(data?: any) { + data = typeof data === 'object' ? data : {}; + data['isAvailable'] = this.isAvailable; + return data; + } } export interface IExtensionPropertyApiGetDto { - isAvailable: boolean; + isAvailable: boolean; } export class ExtensionPropertyApiUpdateDto implements IExtensionPropertyApiUpdateDto { - isAvailable!: boolean; + isAvailable!: boolean; - constructor(data?: IExtensionPropertyApiUpdateDto) { - if (data) { - for (var property in data) { - if (data.hasOwnProperty(property)) - (this)[property] = (data)[property]; - } - } + constructor(data?: IExtensionPropertyApiUpdateDto) { + if (data) { + for (var property in data) { + if (data.hasOwnProperty(property)) (this)[property] = (data)[property]; + } } + } - init(_data?: any) { - if (_data) { - this.isAvailable = _data["isAvailable"]; - } + init(_data?: any) { + if (_data) { + this.isAvailable = _data['isAvailable']; } + } - static fromJS(data: any): ExtensionPropertyApiUpdateDto { - data = typeof data === 'object' ? data : {}; - let result = new ExtensionPropertyApiUpdateDto(); - result.init(data); - return result; - } + static fromJS(data: any): ExtensionPropertyApiUpdateDto { + data = typeof data === 'object' ? data : {}; + let result = new ExtensionPropertyApiUpdateDto(); + result.init(data); + return result; + } - toJSON(data?: any) { - data = typeof data === 'object' ? data : {}; - data["isAvailable"] = this.isAvailable; - return data; - } + toJSON(data?: any) { + data = typeof data === 'object' ? data : {}; + data['isAvailable'] = this.isAvailable; + return data; + } } export interface IExtensionPropertyApiUpdateDto { - isAvailable: boolean; + isAvailable: boolean; } export class ExtensionPropertyAttributeDto implements IExtensionPropertyAttributeDto { - typeSimple!: string | undefined; - config!: { [key: string]: any; } | undefined; + typeSimple!: string | undefined; + config!: { [key: string]: any } | undefined; - constructor(data?: IExtensionPropertyAttributeDto) { - if (data) { - for (var property in data) { - if (data.hasOwnProperty(property)) - (this)[property] = (data)[property]; - } - } + constructor(data?: IExtensionPropertyAttributeDto) { + if (data) { + for (var property in data) { + if (data.hasOwnProperty(property)) (this)[property] = (data)[property]; + } } + } - 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]; - } - } + 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]; } + } } + } - static fromJS(data: any): ExtensionPropertyAttributeDto { - data = typeof data === 'object' ? data : {}; - let result = new ExtensionPropertyAttributeDto(); - result.init(data); - return result; - } + static fromJS(data: any): ExtensionPropertyAttributeDto { + data = typeof data === 'object' ? data : {}; + let result = new ExtensionPropertyAttributeDto(); + 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]; - } - } - return data; + 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]; + } } + return data; + } } export interface IExtensionPropertyAttributeDto { - typeSimple: string | undefined; - config: { [key: string]: any; } | undefined; + typeSimple: string | undefined; + config: { [key: string]: any } | 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?: IExtensionPropertyDto) { - if (data) { - for (var property in data) { - if (data.hasOwnProperty(property)) - (this)[property] = (data)[property]; - } - } - } - - 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"]; - } - } - - static fromJS(data: any): ExtensionPropertyDto { - data = typeof data === 'object' ? data : {}; - let result = new ExtensionPropertyDto(); - 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; - return data; - } + 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?: IExtensionPropertyDto) { + if (data) { + for (var property in data) { + if (data.hasOwnProperty(property)) (this)[property] = (data)[property]; + } + } + } + + 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']; + } + } + + static fromJS(data: any): ExtensionPropertyDto { + data = typeof data === 'object' ? data : {}; + let result = new ExtensionPropertyDto(); + 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; + 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; + 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 ExtensionPropertyUiDto implements IExtensionPropertyUiDto { - onTable!: ExtensionPropertyUiTableDto; - onCreateForm!: ExtensionPropertyUiFormDto; - onEditForm!: ExtensionPropertyUiFormDto; - lookup!: ExtensionPropertyUiLookupDto; - - constructor(data?: IExtensionPropertyUiDto) { - if (data) { - for (var property in data) { - if (data.hasOwnProperty(property)) - (this)[property] = (data)[property]; - } - } - } - - 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; - } - } - - static fromJS(data: any): ExtensionPropertyUiDto { - data = typeof data === 'object' ? data : {}; - let result = new ExtensionPropertyUiDto(); - 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; - return data; - } + onTable!: ExtensionPropertyUiTableDto; + onCreateForm!: ExtensionPropertyUiFormDto; + onEditForm!: ExtensionPropertyUiFormDto; + lookup!: ExtensionPropertyUiLookupDto; + + constructor(data?: IExtensionPropertyUiDto) { + if (data) { + for (var property in data) { + if (data.hasOwnProperty(property)) (this)[property] = (data)[property]; + } + } + } + + 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; + } + } + + static fromJS(data: any): ExtensionPropertyUiDto { + data = typeof data === 'object' ? data : {}; + let result = new ExtensionPropertyUiDto(); + 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; + return data; + } } export interface IExtensionPropertyUiDto { - onTable: ExtensionPropertyUiTableDto; - onCreateForm: ExtensionPropertyUiFormDto; - onEditForm: ExtensionPropertyUiFormDto; - lookup: ExtensionPropertyUiLookupDto; + onTable: ExtensionPropertyUiTableDto; + onCreateForm: ExtensionPropertyUiFormDto; + onEditForm: ExtensionPropertyUiFormDto; + lookup: ExtensionPropertyUiLookupDto; } export class ExtensionPropertyUiFormDto implements IExtensionPropertyUiFormDto { - isVisible!: boolean; + isVisible!: boolean; - constructor(data?: IExtensionPropertyUiFormDto) { - if (data) { - for (var property in data) { - if (data.hasOwnProperty(property)) - (this)[property] = (data)[property]; - } - } + constructor(data?: IExtensionPropertyUiFormDto) { + if (data) { + for (var property in data) { + if (data.hasOwnProperty(property)) (this)[property] = (data)[property]; + } } + } - init(_data?: any) { - if (_data) { - this.isVisible = _data["isVisible"]; - } + init(_data?: any) { + if (_data) { + this.isVisible = _data['isVisible']; } + } - static fromJS(data: any): ExtensionPropertyUiFormDto { - data = typeof data === 'object' ? data : {}; - let result = new ExtensionPropertyUiFormDto(); - result.init(data); - return result; - } + static fromJS(data: any): ExtensionPropertyUiFormDto { + data = typeof data === 'object' ? data : {}; + let result = new ExtensionPropertyUiFormDto(); + result.init(data); + return result; + } - toJSON(data?: any) { - data = typeof data === 'object' ? data : {}; - data["isVisible"] = this.isVisible; - return data; - } + toJSON(data?: any) { + data = typeof data === 'object' ? data : {}; + data['isVisible'] = this.isVisible; + return data; + } } export interface IExtensionPropertyUiFormDto { - isVisible: boolean; + isVisible: boolean; } export class ExtensionPropertyUiLookupDto implements IExtensionPropertyUiLookupDto { - url!: string | undefined; - resultListPropertyName!: string | undefined; - displayPropertyName!: string | undefined; - valuePropertyName!: string | undefined; - filterParamName!: string | undefined; - - constructor(data?: IExtensionPropertyUiLookupDto) { - if (data) { - for (var property in data) { - if (data.hasOwnProperty(property)) - (this)[property] = (data)[property]; - } - } - } - - 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"]; - } - } - - static fromJS(data: any): ExtensionPropertyUiLookupDto { - data = typeof data === 'object' ? data : {}; - let result = new ExtensionPropertyUiLookupDto(); - 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; - return data; - } + url!: string | undefined; + resultListPropertyName!: string | undefined; + displayPropertyName!: string | undefined; + valuePropertyName!: string | undefined; + filterParamName!: string | undefined; + + constructor(data?: IExtensionPropertyUiLookupDto) { + if (data) { + for (var property in data) { + if (data.hasOwnProperty(property)) (this)[property] = (data)[property]; + } + } + } + + 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']; + } + } + + static fromJS(data: any): ExtensionPropertyUiLookupDto { + data = typeof data === 'object' ? data : {}; + let result = new ExtensionPropertyUiLookupDto(); + 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; + return data; + } } export interface IExtensionPropertyUiLookupDto { - url: string | undefined; - resultListPropertyName: string | undefined; - displayPropertyName: string | undefined; - valuePropertyName: string | undefined; - filterParamName: string | undefined; + url: string | undefined; + resultListPropertyName: string | undefined; + displayPropertyName: string | undefined; + valuePropertyName: string | undefined; + filterParamName: string | undefined; } export class ExtensionPropertyUiTableDto implements IExtensionPropertyUiTableDto { - isVisible!: boolean; + isVisible!: boolean; - constructor(data?: IExtensionPropertyUiTableDto) { - if (data) { - for (var property in data) { - if (data.hasOwnProperty(property)) - (this)[property] = (data)[property]; - } - } + constructor(data?: IExtensionPropertyUiTableDto) { + if (data) { + for (var property in data) { + if (data.hasOwnProperty(property)) (this)[property] = (data)[property]; + } } + } - init(_data?: any) { - if (_data) { - this.isVisible = _data["isVisible"]; - } + init(_data?: any) { + if (_data) { + this.isVisible = _data['isVisible']; } + } - static fromJS(data: any): ExtensionPropertyUiTableDto { - data = typeof data === 'object' ? data : {}; - let result = new ExtensionPropertyUiTableDto(); - result.init(data); - return result; - } + static fromJS(data: any): ExtensionPropertyUiTableDto { + data = typeof data === 'object' ? data : {}; + let result = new ExtensionPropertyUiTableDto(); + result.init(data); + return result; + } - toJSON(data?: any) { - data = typeof data === 'object' ? data : {}; - data["isVisible"] = this.isVisible; - return data; - } + toJSON(data?: any) { + data = typeof data === 'object' ? data : {}; + data['isVisible'] = this.isVisible; + return data; + } } export interface IExtensionPropertyUiTableDto { - isVisible: boolean; + isVisible: 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?: IFileAggregateRoute) { - if (data) { - for (var property in data) { - if (data.hasOwnProperty(property)) - (this)[property] = (data)[property]; - } - } - } - - 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"]; - } - } - - static fromJS(data: any): FileAggregateRoute { - data = typeof data === 'object' ? data : {}; - let result = new FileAggregateRoute(); - 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; - return data; - } + 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?: IFileAggregateRoute) { + if (data) { + for (var property in data) { + if (data.hasOwnProperty(property)) (this)[property] = (data)[property]; + } + } + } + + 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']; + } + } + + static fromJS(data: any): FileAggregateRoute { + data = typeof data === 'object' ? data : {}; + let result = new FileAggregateRoute(); + 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; + 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; + routeKeys: string[] | undefined; + routeKeysConfig: AggregateRouteConfig[] | undefined; + upstreamPathTemplate: string | undefined; + upstreamHost: string | undefined; + routeIsCaseSensitive: boolean; + aggregator: string | undefined; + upstreamHttpMethod: string[] | undefined; + priority: number; } export class FileAuthenticationOptions implements IFileAuthenticationOptions { - authenticationProviderKey!: string | undefined; - allowedScopes!: string[] | undefined; + authenticationProviderKey!: string | undefined; + allowedScopes!: string[] | undefined; - constructor(data?: IFileAuthenticationOptions) { - if (data) { - for (var property in data) { - if (data.hasOwnProperty(property)) - (this)[property] = (data)[property]; - } - } + constructor(data?: IFileAuthenticationOptions) { + if (data) { + for (var property in data) { + if (data.hasOwnProperty(property)) (this)[property] = (data)[property]; + } } + } - 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); - } - } + 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); + } } + } - static fromJS(data: any): FileAuthenticationOptions { - data = typeof data === 'object' ? data : {}; - let result = new FileAuthenticationOptions(); - result.init(data); - return result; - } + static fromJS(data: any): FileAuthenticationOptions { + data = typeof data === 'object' ? data : {}; + let result = new FileAuthenticationOptions(); + 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); - } - return data; + 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); } + return data; + } } export interface IFileAuthenticationOptions { - authenticationProviderKey: string | undefined; - allowedScopes: string[] | undefined; + authenticationProviderKey: string | undefined; + allowedScopes: string[] | undefined; } export class FileCacheOptions implements IFileCacheOptions { - ttlSeconds!: number; - region!: string | undefined; + ttlSeconds!: number; + region!: string | undefined; - constructor(data?: IFileCacheOptions) { - if (data) { - for (var property in data) { - if (data.hasOwnProperty(property)) - (this)[property] = (data)[property]; - } - } + constructor(data?: IFileCacheOptions) { + if (data) { + for (var property in data) { + if (data.hasOwnProperty(property)) (this)[property] = (data)[property]; + } } + } - init(_data?: any) { - if (_data) { - this.ttlSeconds = _data["ttlSeconds"]; - this.region = _data["region"]; - } + init(_data?: any) { + if (_data) { + this.ttlSeconds = _data['ttlSeconds']; + this.region = _data['region']; } + } - static fromJS(data: any): FileCacheOptions { - data = typeof data === 'object' ? data : {}; - let result = new FileCacheOptions(); - result.init(data); - return result; - } + static fromJS(data: any): FileCacheOptions { + data = typeof data === 'object' ? data : {}; + let result = new FileCacheOptions(); + result.init(data); + return result; + } - toJSON(data?: any) { - data = typeof data === 'object' ? data : {}; - data["ttlSeconds"] = this.ttlSeconds; - data["region"] = this.region; - return data; - } + toJSON(data?: any) { + data = typeof data === 'object' ? data : {}; + data['ttlSeconds'] = this.ttlSeconds; + data['region'] = this.region; + return data; + } } export interface IFileCacheOptions { - ttlSeconds: number; - region: string | undefined; + ttlSeconds: number; + region: string | undefined; } export class FileConfiguration implements IFileConfiguration { - routes!: FileRoute[] | undefined; - dynamicRoutes!: FileDynamicRoute[] | undefined; - aggregates!: FileAggregateRoute[] | undefined; - globalConfiguration!: FileGlobalConfiguration; - - constructor(data?: IFileConfiguration) { - if (data) { - for (var property in data) { - if (data.hasOwnProperty(property)) - (this)[property] = (data)[property]; - } - } - } - - 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["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): FileConfiguration { - data = typeof data === 'object' ? data : {}; - let result = new FileConfiguration(); - 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.aggregates)) { - data["aggregates"] = []; - for (let item of this.aggregates) - data["aggregates"].push(item.toJSON()); - } - data["globalConfiguration"] = this.globalConfiguration ? this.globalConfiguration.toJSON() : undefined; - return data; - } + routes!: FileRoute[] | undefined; + dynamicRoutes!: FileDynamicRoute[] | undefined; + aggregates!: FileAggregateRoute[] | undefined; + globalConfiguration!: FileGlobalConfiguration; + + constructor(data?: IFileConfiguration) { + if (data) { + for (var property in data) { + if (data.hasOwnProperty(property)) (this)[property] = (data)[property]; + } + } + } + + 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['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): FileConfiguration { + data = typeof data === 'object' ? data : {}; + let result = new FileConfiguration(); + 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.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 IFileConfiguration { - routes: FileRoute[] | undefined; - dynamicRoutes: FileDynamicRoute[] | undefined; - aggregates: FileAggregateRoute[] | undefined; - globalConfiguration: FileGlobalConfiguration; + routes: FileRoute[] | undefined; + dynamicRoutes: FileDynamicRoute[] | undefined; + aggregates: FileAggregateRoute[] | undefined; + globalConfiguration: FileGlobalConfiguration; } export class FileDynamicRoute implements IFileDynamicRoute { - serviceName!: string | undefined; - rateLimitRule!: FileRateLimitRule; - downstreamHttpVersion!: string | undefined; - - constructor(data?: IFileDynamicRoute) { - if (data) { - for (var property in data) { - if (data.hasOwnProperty(property)) - (this)[property] = (data)[property]; - } - } - } - - init(_data?: any) { - if (_data) { - this.serviceName = _data["serviceName"]; - this.rateLimitRule = _data["rateLimitRule"] ? FileRateLimitRule.fromJS(_data["rateLimitRule"]) : undefined; - this.downstreamHttpVersion = _data["downstreamHttpVersion"]; - } - } - - static fromJS(data: any): FileDynamicRoute { - data = typeof data === 'object' ? data : {}; - let result = new FileDynamicRoute(); - 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; - return data; - } + serviceName!: string | undefined; + rateLimitRule!: FileRateLimitRule; + downstreamHttpVersion!: string | undefined; + + constructor(data?: IFileDynamicRoute) { + if (data) { + for (var property in data) { + if (data.hasOwnProperty(property)) (this)[property] = (data)[property]; + } + } + } + + init(_data?: any) { + if (_data) { + this.serviceName = _data['serviceName']; + this.rateLimitRule = _data['rateLimitRule'] + ? FileRateLimitRule.fromJS(_data['rateLimitRule']) + : undefined; + this.downstreamHttpVersion = _data['downstreamHttpVersion']; + } + } + + static fromJS(data: any): FileDynamicRoute { + data = typeof data === 'object' ? data : {}; + let result = new FileDynamicRoute(); + 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; + return data; + } } export interface IFileDynamicRoute { - serviceName: string | undefined; - rateLimitRule: FileRateLimitRule; - downstreamHttpVersion: string | undefined; + serviceName: string | undefined; + rateLimitRule: FileRateLimitRule; + downstreamHttpVersion: 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?: IFileGlobalConfiguration) { - if (data) { - for (var property in data) { - if (data.hasOwnProperty(property)) - (this)[property] = (data)[property]; - } - } - } - - 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"]; - } - } - - static fromJS(data: any): FileGlobalConfiguration { - data = typeof data === 'object' ? data : {}; - let result = new FileGlobalConfiguration(); - 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; - return data; - } + requestIdKey!: string | undefined; + serviceDiscoveryProvider!: FileServiceDiscoveryProvider; + rateLimitOptions!: FileRateLimitOptions; + qoSOptions!: FileQoSOptions; + baseUrl!: string | undefined; + loadBalancerOptions!: FileLoadBalancerOptions; + downstreamScheme!: string | undefined; + httpHandlerOptions!: FileHttpHandlerOptions; + downstreamHttpVersion!: string | undefined; + + constructor(data?: IFileGlobalConfiguration) { + if (data) { + for (var property in data) { + if (data.hasOwnProperty(property)) (this)[property] = (data)[property]; + } + } + } + + 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']; + } + } + + static fromJS(data: any): FileGlobalConfiguration { + data = typeof data === 'object' ? data : {}; + let result = new FileGlobalConfiguration(); + 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; + 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; + requestIdKey: string | undefined; + serviceDiscoveryProvider: FileServiceDiscoveryProvider; + rateLimitOptions: FileRateLimitOptions; + qoSOptions: FileQoSOptions; + baseUrl: string | undefined; + loadBalancerOptions: FileLoadBalancerOptions; + downstreamScheme: string | undefined; + httpHandlerOptions: FileHttpHandlerOptions; + downstreamHttpVersion: string | undefined; } export class FileHostAndPort implements IFileHostAndPort { - host!: string | undefined; - port!: number; + host!: string | undefined; + port!: number; - constructor(data?: IFileHostAndPort) { - if (data) { - for (var property in data) { - if (data.hasOwnProperty(property)) - (this)[property] = (data)[property]; - } - } + constructor(data?: IFileHostAndPort) { + if (data) { + for (var property in data) { + if (data.hasOwnProperty(property)) (this)[property] = (data)[property]; + } } + } - init(_data?: any) { - if (_data) { - this.host = _data["host"]; - this.port = _data["port"]; - } + init(_data?: any) { + if (_data) { + this.host = _data['host']; + this.port = _data['port']; } + } - static fromJS(data: any): FileHostAndPort { - data = typeof data === 'object' ? data : {}; - let result = new FileHostAndPort(); - result.init(data); - return result; - } + static fromJS(data: any): FileHostAndPort { + data = typeof data === 'object' ? data : {}; + let result = new FileHostAndPort(); + result.init(data); + return result; + } - toJSON(data?: any) { - data = typeof data === 'object' ? data : {}; - data["host"] = this.host; - data["port"] = this.port; - return data; - } + toJSON(data?: any) { + data = typeof data === 'object' ? data : {}; + data['host'] = this.host; + data['port'] = this.port; + return data; + } } export interface IFileHostAndPort { - host: string | undefined; - port: number; + host: string | undefined; + port: number; } export class FileHttpHandlerOptions implements IFileHttpHandlerOptions { - allowAutoRedirect!: boolean; - useCookieContainer!: boolean; - useTracing!: boolean; - useProxy!: boolean; - maxConnectionsPerServer!: number; - - constructor(data?: IFileHttpHandlerOptions) { - if (data) { - for (var property in data) { - if (data.hasOwnProperty(property)) - (this)[property] = (data)[property]; - } - } - } - - 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"]; - } - } - - static fromJS(data: any): FileHttpHandlerOptions { - data = typeof data === 'object' ? data : {}; - let result = new FileHttpHandlerOptions(); - 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; - return data; - } + allowAutoRedirect!: boolean; + useCookieContainer!: boolean; + useTracing!: boolean; + useProxy!: boolean; + maxConnectionsPerServer!: number; + + constructor(data?: IFileHttpHandlerOptions) { + if (data) { + for (var property in data) { + if (data.hasOwnProperty(property)) (this)[property] = (data)[property]; + } + } + } + + 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']; + } + } + + static fromJS(data: any): FileHttpHandlerOptions { + data = typeof data === 'object' ? data : {}; + let result = new FileHttpHandlerOptions(); + 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; + return data; + } } export interface IFileHttpHandlerOptions { - allowAutoRedirect: boolean; - useCookieContainer: boolean; - useTracing: boolean; - useProxy: boolean; - maxConnectionsPerServer: number; + allowAutoRedirect: boolean; + useCookieContainer: boolean; + useTracing: boolean; + useProxy: boolean; + maxConnectionsPerServer: number; } export class FileLoadBalancerOptions implements IFileLoadBalancerOptions { - type!: string | undefined; - key!: string | undefined; - expiry!: number; - - constructor(data?: IFileLoadBalancerOptions) { - if (data) { - for (var property in data) { - if (data.hasOwnProperty(property)) - (this)[property] = (data)[property]; - } - } - } - - init(_data?: any) { - if (_data) { - this.type = _data["type"]; - this.key = _data["key"]; - this.expiry = _data["expiry"]; - } - } - - static fromJS(data: any): FileLoadBalancerOptions { - data = typeof data === 'object' ? data : {}; - let result = new FileLoadBalancerOptions(); - 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; - return data; - } + type!: string | undefined; + key!: string | undefined; + expiry!: number; + + constructor(data?: IFileLoadBalancerOptions) { + if (data) { + for (var property in data) { + if (data.hasOwnProperty(property)) (this)[property] = (data)[property]; + } + } + } + + init(_data?: any) { + if (_data) { + this.type = _data['type']; + this.key = _data['key']; + this.expiry = _data['expiry']; + } + } + + static fromJS(data: any): FileLoadBalancerOptions { + data = typeof data === 'object' ? data : {}; + let result = new FileLoadBalancerOptions(); + 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; + return data; + } } export interface IFileLoadBalancerOptions { - type: string | undefined; - key: string | undefined; - expiry: number; + type: string | undefined; + key: string | undefined; + expiry: number; } export class FileQoSOptions implements IFileQoSOptions { - exceptionsAllowedBeforeBreaking!: number; - durationOfBreak!: number; - timeoutValue!: number; - - constructor(data?: IFileQoSOptions) { - if (data) { - for (var property in data) { - if (data.hasOwnProperty(property)) - (this)[property] = (data)[property]; - } - } - } - - init(_data?: any) { - if (_data) { - this.exceptionsAllowedBeforeBreaking = _data["exceptionsAllowedBeforeBreaking"]; - this.durationOfBreak = _data["durationOfBreak"]; - this.timeoutValue = _data["timeoutValue"]; - } - } - - static fromJS(data: any): FileQoSOptions { - data = typeof data === 'object' ? data : {}; - let result = new FileQoSOptions(); - 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; - return data; - } + exceptionsAllowedBeforeBreaking!: number; + durationOfBreak!: number; + timeoutValue!: number; + + constructor(data?: IFileQoSOptions) { + if (data) { + for (var property in data) { + if (data.hasOwnProperty(property)) (this)[property] = (data)[property]; + } + } + } + + init(_data?: any) { + if (_data) { + this.exceptionsAllowedBeforeBreaking = _data['exceptionsAllowedBeforeBreaking']; + this.durationOfBreak = _data['durationOfBreak']; + this.timeoutValue = _data['timeoutValue']; + } + } + + static fromJS(data: any): FileQoSOptions { + data = typeof data === 'object' ? data : {}; + let result = new FileQoSOptions(); + 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; + return data; + } } export interface IFileQoSOptions { - exceptionsAllowedBeforeBreaking: number; - durationOfBreak: number; - timeoutValue: number; + exceptionsAllowedBeforeBreaking: number; + durationOfBreak: number; + timeoutValue: number; } export class FileRateLimitOptions implements IFileRateLimitOptions { - clientIdHeader!: string | undefined; - quotaExceededMessage!: string | undefined; - rateLimitCounterPrefix!: string | undefined; - disableRateLimitHeaders!: boolean; - httpStatusCode!: number; - - constructor(data?: IFileRateLimitOptions) { - if (data) { - for (var property in data) { - if (data.hasOwnProperty(property)) - (this)[property] = (data)[property]; - } - } - } - - 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"]; - } - } - - static fromJS(data: any): FileRateLimitOptions { - data = typeof data === 'object' ? data : {}; - let result = new FileRateLimitOptions(); - 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; - return data; - } + clientIdHeader!: string | undefined; + quotaExceededMessage!: string | undefined; + rateLimitCounterPrefix!: string | undefined; + disableRateLimitHeaders!: boolean; + httpStatusCode!: number; + + constructor(data?: IFileRateLimitOptions) { + if (data) { + for (var property in data) { + if (data.hasOwnProperty(property)) (this)[property] = (data)[property]; + } + } + } + + 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']; + } + } + + static fromJS(data: any): FileRateLimitOptions { + data = typeof data === 'object' ? data : {}; + let result = new FileRateLimitOptions(); + 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; + return data; + } } export interface IFileRateLimitOptions { - clientIdHeader: string | undefined; - quotaExceededMessage: string | undefined; - rateLimitCounterPrefix: string | undefined; - disableRateLimitHeaders: boolean; - httpStatusCode: number; + clientIdHeader: string | undefined; + quotaExceededMessage: string | undefined; + rateLimitCounterPrefix: string | undefined; + disableRateLimitHeaders: boolean; + httpStatusCode: number; } export class FileRateLimitRule implements IFileRateLimitRule { - clientWhitelist!: string[] | undefined; - enableRateLimiting!: boolean; - period!: string | undefined; - periodTimespan!: number; - limit!: number; - - constructor(data?: IFileRateLimitRule) { - if (data) { - for (var property in data) { - if (data.hasOwnProperty(property)) - (this)[property] = (data)[property]; - } - } - } - - 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"]; - } - } - - static fromJS(data: any): FileRateLimitRule { - data = typeof data === 'object' ? data : {}; - let result = new FileRateLimitRule(); - 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; - return data; - } + clientWhitelist!: string[] | undefined; + enableRateLimiting!: boolean; + period!: string | undefined; + periodTimespan!: number; + limit!: number; + + constructor(data?: IFileRateLimitRule) { + if (data) { + for (var property in data) { + if (data.hasOwnProperty(property)) (this)[property] = (data)[property]; + } + } + } + + 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']; + } + } + + static fromJS(data: any): FileRateLimitRule { + data = typeof data === 'object' ? data : {}; + let result = new FileRateLimitRule(); + 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; + return data; + } } export interface IFileRateLimitRule { - clientWhitelist: string[] | undefined; - enableRateLimiting: boolean; - period: string | undefined; - periodTimespan: number; - limit: number; + 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); - } - 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 FileRoute(); - 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]; - } - } - 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; - } + 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); + } + 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 FileRoute(); + 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]; + } + } + 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 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; + 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 FileSecurityOptions implements IFileSecurityOptions { - ipAllowedList!: string[] | undefined; - ipBlockedList!: string[] | undefined; - - constructor(data?: IFileSecurityOptions) { - if (data) { - for (var property in data) { - if (data.hasOwnProperty(property)) - (this)[property] = (data)[property]; - } - } - } - - 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); - } - } - } - - static fromJS(data: any): FileSecurityOptions { - data = typeof data === 'object' ? data : {}; - let result = new FileSecurityOptions(); - 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); - } - return data; - } + ipAllowedList!: string[] | undefined; + ipBlockedList!: string[] | undefined; + + constructor(data?: IFileSecurityOptions) { + if (data) { + for (var property in data) { + if (data.hasOwnProperty(property)) (this)[property] = (data)[property]; + } + } + } + + 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); + } + } + } + + static fromJS(data: any): FileSecurityOptions { + data = typeof data === 'object' ? data : {}; + let result = new FileSecurityOptions(); + 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); + } + return data; + } } export interface IFileSecurityOptions { - ipAllowedList: string[] | undefined; - ipBlockedList: string[] | undefined; + ipAllowedList: string[] | undefined; + ipBlockedList: 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?: IFileServiceDiscoveryProvider) { - if (data) { - for (var property in data) { - if (data.hasOwnProperty(property)) - (this)[property] = (data)[property]; - } - } - } - - 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"]; - } - } - - static fromJS(data: any): FileServiceDiscoveryProvider { - data = typeof data === 'object' ? data : {}; - let result = new FileServiceDiscoveryProvider(); - 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; - return data; - } + scheme!: string | undefined; + host!: string | undefined; + port!: number; + type!: string | undefined; + token!: string | undefined; + configurationKey!: string | undefined; + pollingInterval!: number; + namespace!: string | undefined; + + constructor(data?: IFileServiceDiscoveryProvider) { + if (data) { + for (var property in data) { + if (data.hasOwnProperty(property)) (this)[property] = (data)[property]; + } + } + } + + 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']; + } + } + + static fromJS(data: any): FileServiceDiscoveryProvider { + data = typeof data === 'object' ? data : {}; + let result = new FileServiceDiscoveryProvider(); + 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; + 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; + scheme: string | undefined; + host: string | undefined; + port: number; + type: string | undefined; + token: string | undefined; + configurationKey: string | undefined; + pollingInterval: number; + namespace: string | undefined; } export class FindTenantByNameInput implements IFindTenantByNameInput { - name!: string | undefined; + name!: string | undefined; - constructor(data?: IFindTenantByNameInput) { - if (data) { - for (var property in data) { - if (data.hasOwnProperty(property)) - (this)[property] = (data)[property]; - } - } + constructor(data?: IFindTenantByNameInput) { + if (data) { + for (var property in data) { + if (data.hasOwnProperty(property)) (this)[property] = (data)[property]; + } } + } - init(_data?: any) { - if (_data) { - this.name = _data["name"]; - } + init(_data?: any) { + if (_data) { + this.name = _data['name']; } + } - static fromJS(data: any): FindTenantByNameInput { - data = typeof data === 'object' ? data : {}; - let result = new FindTenantByNameInput(); - result.init(data); - return result; - } + static fromJS(data: any): FindTenantByNameInput { + data = typeof data === 'object' ? data : {}; + let result = new FindTenantByNameInput(); + result.init(data); + return result; + } - toJSON(data?: any) { - data = typeof data === 'object' ? data : {}; - data["name"] = this.name; - return data; - } + toJSON(data?: any) { + data = typeof data === 'object' ? data : {}; + data['name'] = this.name; + return data; + } } export interface IFindTenantByNameInput { - name: string | undefined; + name: string | undefined; } export class FindTenantResultDto implements IFindTenantResultDto { - success!: boolean; - tenantId!: string | undefined; - name!: string | undefined; - isActive!: boolean; - - constructor(data?: IFindTenantResultDto) { - if (data) { - for (var property in data) { - if (data.hasOwnProperty(property)) - (this)[property] = (data)[property]; - } - } - } - - init(_data?: any) { - if (_data) { - this.success = _data["success"]; - this.tenantId = _data["tenantId"]; - this.name = _data["name"]; - this.isActive = _data["isActive"]; - } - } - - static fromJS(data: any): FindTenantResultDto { - data = typeof data === 'object' ? data : {}; - let result = new FindTenantResultDto(); - 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; - return data; - } + success!: boolean; + tenantId!: string | undefined; + name!: string | undefined; + isActive!: boolean; + + constructor(data?: IFindTenantResultDto) { + if (data) { + for (var property in data) { + if (data.hasOwnProperty(property)) (this)[property] = (data)[property]; + } + } + } + + init(_data?: any) { + if (_data) { + this.success = _data['success']; + this.tenantId = _data['tenantId']; + this.name = _data['name']; + this.isActive = _data['isActive']; + } + } + + static fromJS(data: any): FindTenantResultDto { + data = typeof data === 'object' ? data : {}; + let result = new FindTenantResultDto(); + 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; + return data; + } } export interface IFindTenantResultDto { - success: boolean; - tenantId: string | undefined; - name: string | undefined; - isActive: boolean; + success: boolean; + tenantId: string | undefined; + name: string | undefined; + isActive: boolean; } 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!: dayjs.Dayjs; - 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?: IGetAuditLogPageListOutput) { - if (data) { - for (var property in data) { - if (data.hasOwnProperty(property)) - (this)[property] = (data)[property]; - } - } - } - - 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"] ? dayjs(_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): GetAuditLogPageListOutput { - data = typeof data === 'object' ? data : {}; - let result = new GetAuditLogPageListOutput(); - 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; - return data; - } + applicationName!: string | undefined; + userId!: string | undefined; + userName!: string | undefined; + tenantId!: string | undefined; + tenantName!: string | undefined; + impersonatorUserId!: string | undefined; + impersonatorTenantId!: string | undefined; + executionTime!: dayjs.Dayjs; + 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?: IGetAuditLogPageListOutput) { + if (data) { + for (var property in data) { + if (data.hasOwnProperty(property)) (this)[property] = (data)[property]; + } + } + } + + 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'] + ? dayjs(_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): GetAuditLogPageListOutput { + data = typeof data === 'object' ? data : {}; + let result = new GetAuditLogPageListOutput(); + 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; + 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: dayjs.Dayjs; - 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 GetAuditLogPageListOutputPagedResultDto implements IGetAuditLogPageListOutputPagedResultDto { - items!: GetAuditLogPageListOutput[] | undefined; - totalCount!: number; - - constructor(data?: IGetAuditLogPageListOutputPagedResultDto) { - 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(GetAuditLogPageListOutput.fromJS(item)); - } - this.totalCount = _data["totalCount"]; - } - } - - static fromJS(data: any): GetAuditLogPageListOutputPagedResultDto { - data = typeof data === 'object' ? data : {}; - let result = new GetAuditLogPageListOutputPagedResultDto(); - 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; - } + applicationName: string | undefined; + userId: string | undefined; + userName: string | undefined; + tenantId: string | undefined; + tenantName: string | undefined; + impersonatorUserId: string | undefined; + impersonatorTenantId: string | undefined; + executionTime: dayjs.Dayjs; + 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 GetAuditLogPageListOutputPagedResultDto + implements IGetAuditLogPageListOutputPagedResultDto +{ + items!: GetAuditLogPageListOutput[] | undefined; + totalCount!: number; + + constructor(data?: IGetAuditLogPageListOutputPagedResultDto) { + 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(GetAuditLogPageListOutput.fromJS(item)); + } + this.totalCount = _data['totalCount']; + } + } + + static fromJS(data: any): GetAuditLogPageListOutputPagedResultDto { + data = typeof data === 'object' ? data : {}; + let result = new GetAuditLogPageListOutputPagedResultDto(); + 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 IGetAuditLogPageListOutputPagedResultDto { - items: GetAuditLogPageListOutput[] | undefined; - totalCount: number; + items: GetAuditLogPageListOutput[] | undefined; + totalCount: number; } export class GetOrganizationUnitRoleInput implements IGetOrganizationUnitRoleInput { - pageIndex!: number; - pageSize!: number; - readonly skipCount!: number; - organizationUnitId!: string; - - constructor(data?: IGetOrganizationUnitRoleInput) { - if (data) { - for (var property in data) { - if (data.hasOwnProperty(property)) - (this)[property] = (data)[property]; - } - } - } - - init(_data?: any) { - if (_data) { - this.pageIndex = _data["pageIndex"]; - this.pageSize = _data["pageSize"]; - (this).skipCount = _data["skipCount"]; - this.organizationUnitId = _data["organizationUnitId"]; - } - } - - static fromJS(data: any): GetOrganizationUnitRoleInput { - data = typeof data === 'object' ? data : {}; - let result = new GetOrganizationUnitRoleInput(); - result.init(data); - return result; - } - - toJSON(data?: any) { - data = typeof data === 'object' ? data : {}; - data["pageIndex"] = this.pageIndex; - data["pageSize"] = this.pageSize; - data["skipCount"] = this.skipCount; - data["organizationUnitId"] = this.organizationUnitId; - return data; - } + pageIndex!: number; + pageSize!: number; + readonly skipCount!: number; + organizationUnitId!: string; + + constructor(data?: IGetOrganizationUnitRoleInput) { + if (data) { + for (var property in data) { + if (data.hasOwnProperty(property)) (this)[property] = (data)[property]; + } + } + } + + init(_data?: any) { + if (_data) { + this.pageIndex = _data['pageIndex']; + this.pageSize = _data['pageSize']; + (this).skipCount = _data['skipCount']; + this.organizationUnitId = _data['organizationUnitId']; + } + } + + static fromJS(data: any): GetOrganizationUnitRoleInput { + data = typeof data === 'object' ? data : {}; + let result = new GetOrganizationUnitRoleInput(); + result.init(data); + return result; + } + + toJSON(data?: any) { + data = typeof data === 'object' ? data : {}; + data['pageIndex'] = this.pageIndex; + data['pageSize'] = this.pageSize; + data['skipCount'] = this.skipCount; + data['organizationUnitId'] = this.organizationUnitId; + return data; + } } export interface IGetOrganizationUnitRoleInput { - pageIndex: number; - pageSize: number; - skipCount: number; - organizationUnitId: string; + pageIndex: number; + pageSize: number; + skipCount: number; + organizationUnitId: string; } export class GetOrganizationUnitRoleOutput implements IGetOrganizationUnitRoleOutput { - id!: string; - name!: string | undefined; + id!: string; + name!: string | undefined; - constructor(data?: IGetOrganizationUnitRoleOutput) { - if (data) { - for (var property in data) { - if (data.hasOwnProperty(property)) - (this)[property] = (data)[property]; - } - } + constructor(data?: IGetOrganizationUnitRoleOutput) { + 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"]; - } + 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 GetOrganizationUnitRoleOutput(); - result.init(data); - return result; - } + static fromJS(data: any): GetOrganizationUnitRoleOutput { + data = typeof data === 'object' ? data : {}; + let result = new GetOrganizationUnitRoleOutput(); + result.init(data); + return result; + } - toJSON(data?: any) { - data = typeof data === 'object' ? data : {}; - data["id"] = this.id; - data["name"] = this.name; - return data; - } + toJSON(data?: any) { + data = typeof data === 'object' ? data : {}; + data['id'] = this.id; + data['name'] = this.name; + return data; + } } export interface IGetOrganizationUnitRoleOutput { - id: string; - name: string | undefined; + id: string; + name: string | undefined; } -export class GetOrganizationUnitRoleOutputPagedResultDto implements IGetOrganizationUnitRoleOutputPagedResultDto { - items!: GetOrganizationUnitRoleOutput[] | undefined; - totalCount!: number; +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]; - } - } + constructor(data?: IGetOrganizationUnitRoleOutputPagedResultDto) { + 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(GetOrganizationUnitRoleOutput.fromJS(item)); - } - this.totalCount = _data["totalCount"]; - } + 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']; } + } - static fromJS(data: any): GetOrganizationUnitRoleOutputPagedResultDto { - data = typeof data === 'object' ? data : {}; - let result = new GetOrganizationUnitRoleOutputPagedResultDto(); - result.init(data); - return result; - } + 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["totalCount"] = this.totalCount; - return data; + 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 IGetOrganizationUnitRoleOutputPagedResultDto { - items: GetOrganizationUnitRoleOutput[] | undefined; - totalCount: number; + items: GetOrganizationUnitRoleOutput[] | undefined; + totalCount: number; } export class GetOrganizationUnitUserInput implements IGetOrganizationUnitUserInput { - pageIndex!: number; - pageSize!: number; - readonly skipCount!: number; - organizationUnitId!: string; - filter!: string | undefined; - - constructor(data?: IGetOrganizationUnitUserInput) { - if (data) { - for (var property in data) { - if (data.hasOwnProperty(property)) - (this)[property] = (data)[property]; - } - } - } - - init(_data?: any) { - if (_data) { - this.pageIndex = _data["pageIndex"]; - this.pageSize = _data["pageSize"]; - (this).skipCount = _data["skipCount"]; - this.organizationUnitId = _data["organizationUnitId"]; - this.filter = _data["filter"]; - } - } - - static fromJS(data: any): GetOrganizationUnitUserInput { - data = typeof data === 'object' ? data : {}; - let result = new GetOrganizationUnitUserInput(); - result.init(data); - return result; - } - - toJSON(data?: any) { - data = typeof data === 'object' ? data : {}; - data["pageIndex"] = this.pageIndex; - data["pageSize"] = this.pageSize; - data["skipCount"] = this.skipCount; - data["organizationUnitId"] = this.organizationUnitId; - data["filter"] = this.filter; - return data; - } + pageIndex!: number; + pageSize!: number; + readonly skipCount!: number; + organizationUnitId!: string; + filter!: string | undefined; + + constructor(data?: IGetOrganizationUnitUserInput) { + if (data) { + for (var property in data) { + if (data.hasOwnProperty(property)) (this)[property] = (data)[property]; + } + } + } + + init(_data?: any) { + if (_data) { + this.pageIndex = _data['pageIndex']; + this.pageSize = _data['pageSize']; + (this).skipCount = _data['skipCount']; + this.organizationUnitId = _data['organizationUnitId']; + this.filter = _data['filter']; + } + } + + static fromJS(data: any): GetOrganizationUnitUserInput { + data = typeof data === 'object' ? data : {}; + let result = new GetOrganizationUnitUserInput(); + result.init(data); + return result; + } + + toJSON(data?: any) { + data = typeof data === 'object' ? data : {}; + data['pageIndex'] = this.pageIndex; + data['pageSize'] = this.pageSize; + data['skipCount'] = this.skipCount; + data['organizationUnitId'] = this.organizationUnitId; + data['filter'] = this.filter; + return data; + } } export interface IGetOrganizationUnitUserInput { - pageIndex: number; - pageSize: number; - skipCount: number; - organizationUnitId: string; - filter: string | undefined; + pageIndex: number; + pageSize: number; + skipCount: number; + organizationUnitId: string; + filter: string | undefined; } export class GetOrganizationUnitUserOutput implements IGetOrganizationUnitUserOutput { - id!: string; - userName!: string | undefined; - email!: string | undefined; - - constructor(data?: IGetOrganizationUnitUserOutput) { - 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.userName = _data["userName"]; - this.email = _data["email"]; - } - } - - static fromJS(data: any): GetOrganizationUnitUserOutput { - data = typeof data === 'object' ? data : {}; - let result = new GetOrganizationUnitUserOutput(); - result.init(data); - return result; - } - - toJSON(data?: any) { - data = typeof data === 'object' ? data : {}; - data["id"] = this.id; - data["userName"] = this.userName; - data["email"] = this.email; - return data; - } + id!: string; + userName!: string | undefined; + email!: string | undefined; + + constructor(data?: IGetOrganizationUnitUserOutput) { + 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.userName = _data['userName']; + this.email = _data['email']; + } + } + + static fromJS(data: any): GetOrganizationUnitUserOutput { + data = typeof data === 'object' ? data : {}; + let result = new GetOrganizationUnitUserOutput(); + result.init(data); + return result; + } + + toJSON(data?: any) { + data = typeof data === 'object' ? data : {}; + data['id'] = this.id; + data['userName'] = this.userName; + data['email'] = this.email; + return data; + } } export interface IGetOrganizationUnitUserOutput { - id: string; - userName: string | undefined; - email: string | undefined; -} - -export class GetOrganizationUnitUserOutputPagedResultDto implements IGetOrganizationUnitUserOutputPagedResultDto { - items!: GetOrganizationUnitUserOutput[] | undefined; - totalCount!: number; - - constructor(data?: IGetOrganizationUnitUserOutputPagedResultDto) { - 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(GetOrganizationUnitUserOutput.fromJS(item)); - } - this.totalCount = _data["totalCount"]; - } - } - - static fromJS(data: any): GetOrganizationUnitUserOutputPagedResultDto { - data = typeof data === 'object' ? data : {}; - let result = new GetOrganizationUnitUserOutputPagedResultDto(); - 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; - } + id: string; + userName: string | undefined; + email: string | undefined; +} + +export class GetOrganizationUnitUserOutputPagedResultDto + implements IGetOrganizationUnitUserOutputPagedResultDto +{ + items!: GetOrganizationUnitUserOutput[] | undefined; + totalCount!: number; + + constructor(data?: IGetOrganizationUnitUserOutputPagedResultDto) { + 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(GetOrganizationUnitUserOutput.fromJS(item)); + } + this.totalCount = _data['totalCount']; + } + } + + static fromJS(data: any): GetOrganizationUnitUserOutputPagedResultDto { + data = typeof data === 'object' ? data : {}; + let result = new GetOrganizationUnitUserOutputPagedResultDto(); + 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 IGetOrganizationUnitUserOutputPagedResultDto { - items: GetOrganizationUnitUserOutput[] | undefined; - totalCount: number; + items: GetOrganizationUnitUserOutput[] | undefined; + totalCount: number; } export class GetPermissionInput implements IGetPermissionInput { - providerName!: string; - providerKey!: string; + providerName!: string; + providerKey!: string; - constructor(data?: IGetPermissionInput) { - if (data) { - for (var property in data) { - if (data.hasOwnProperty(property)) - (this)[property] = (data)[property]; - } - } + constructor(data?: IGetPermissionInput) { + if (data) { + for (var property in data) { + if (data.hasOwnProperty(property)) (this)[property] = (data)[property]; + } } + } - init(_data?: any) { - if (_data) { - this.providerName = _data["providerName"]; - this.providerKey = _data["providerKey"]; - } + init(_data?: any) { + if (_data) { + this.providerName = _data['providerName']; + this.providerKey = _data['providerKey']; } + } - static fromJS(data: any): GetPermissionInput { - data = typeof data === 'object' ? data : {}; - let result = new GetPermissionInput(); - result.init(data); - return result; - } + static fromJS(data: any): GetPermissionInput { + data = typeof data === 'object' ? data : {}; + let result = new GetPermissionInput(); + result.init(data); + return result; + } - toJSON(data?: any) { - data = typeof data === 'object' ? data : {}; - data["providerName"] = this.providerName; - data["providerKey"] = this.providerKey; - return data; - } + toJSON(data?: any) { + data = typeof data === 'object' ? data : {}; + data['providerName'] = this.providerName; + data['providerKey'] = this.providerKey; + return data; + } } export interface IGetPermissionInput { - providerName: string; - providerKey: string; + providerName: string; + providerKey: string; } export class GetUnAddRoleInput implements IGetUnAddRoleInput { - pageIndex!: number; - pageSize!: number; - readonly skipCount!: number; - organizationUnitId!: string; - filter!: string | undefined; - - constructor(data?: IGetUnAddRoleInput) { - if (data) { - for (var property in data) { - if (data.hasOwnProperty(property)) - (this)[property] = (data)[property]; - } - } - } - - init(_data?: any) { - if (_data) { - this.pageIndex = _data["pageIndex"]; - this.pageSize = _data["pageSize"]; - (this).skipCount = _data["skipCount"]; - this.organizationUnitId = _data["organizationUnitId"]; - this.filter = _data["filter"]; - } - } - - static fromJS(data: any): GetUnAddRoleInput { - data = typeof data === 'object' ? data : {}; - let result = new GetUnAddRoleInput(); - result.init(data); - return result; - } - - toJSON(data?: any) { - data = typeof data === 'object' ? data : {}; - data["pageIndex"] = this.pageIndex; - data["pageSize"] = this.pageSize; - data["skipCount"] = this.skipCount; - data["organizationUnitId"] = this.organizationUnitId; - data["filter"] = this.filter; - return data; - } + pageIndex!: number; + pageSize!: number; + readonly skipCount!: number; + organizationUnitId!: string; + filter!: string | undefined; + + constructor(data?: IGetUnAddRoleInput) { + if (data) { + for (var property in data) { + if (data.hasOwnProperty(property)) (this)[property] = (data)[property]; + } + } + } + + init(_data?: any) { + if (_data) { + this.pageIndex = _data['pageIndex']; + this.pageSize = _data['pageSize']; + (this).skipCount = _data['skipCount']; + this.organizationUnitId = _data['organizationUnitId']; + this.filter = _data['filter']; + } + } + + static fromJS(data: any): GetUnAddRoleInput { + data = typeof data === 'object' ? data : {}; + let result = new GetUnAddRoleInput(); + result.init(data); + return result; + } + + toJSON(data?: any) { + data = typeof data === 'object' ? data : {}; + data['pageIndex'] = this.pageIndex; + data['pageSize'] = this.pageSize; + data['skipCount'] = this.skipCount; + data['organizationUnitId'] = this.organizationUnitId; + data['filter'] = this.filter; + return data; + } } export interface IGetUnAddRoleInput { - pageIndex: number; - pageSize: number; - skipCount: number; - organizationUnitId: string; - filter: string | undefined; + pageIndex: number; + pageSize: number; + skipCount: number; + organizationUnitId: string; + filter: string | undefined; } export class GetUnAddRoleOutput implements IGetUnAddRoleOutput { - id!: string; - name!: string | undefined; + id!: string; + name!: string | undefined; - constructor(data?: IGetUnAddRoleOutput) { - if (data) { - for (var property in data) { - if (data.hasOwnProperty(property)) - (this)[property] = (data)[property]; - } - } + 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"]; - } + 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; - } + 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; - } + toJSON(data?: any) { + data = typeof data === 'object' ? data : {}; + data['id'] = this.id; + data['name'] = this.name; + return data; + } } export interface IGetUnAddRoleOutput { - id: string; - name: string | undefined; + id: string; + name: string | undefined; } export class GetUnAddRoleOutputPagedResultDto implements IGetUnAddRoleOutputPagedResultDto { - items!: GetUnAddRoleOutput[] | undefined; - totalCount!: number; + items!: GetUnAddRoleOutput[] | undefined; + totalCount!: number; - constructor(data?: IGetUnAddRoleOutputPagedResultDto) { - if (data) { - for (var property in data) { - if (data.hasOwnProperty(property)) - (this)[property] = (data)[property]; - } - } + constructor(data?: IGetUnAddRoleOutputPagedResultDto) { + 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(GetUnAddRoleOutput.fromJS(item)); - } - this.totalCount = _data["totalCount"]; - } + init(_data?: any) { + if (_data) { + if (Array.isArray(_data['items'])) { + this.items = [] as any; + for (let item of _data['items']) this.items!.push(GetUnAddRoleOutput.fromJS(item)); + } + this.totalCount = _data['totalCount']; } + } - static fromJS(data: any): GetUnAddRoleOutputPagedResultDto { - data = typeof data === 'object' ? data : {}; - let result = new GetUnAddRoleOutputPagedResultDto(); - result.init(data); - return result; - } + static fromJS(data: any): GetUnAddRoleOutputPagedResultDto { + data = typeof data === 'object' ? data : {}; + let result = new GetUnAddRoleOutputPagedResultDto(); + 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; + 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 IGetUnAddRoleOutputPagedResultDto { - items: GetUnAddRoleOutput[] | undefined; - totalCount: number; + items: GetUnAddRoleOutput[] | undefined; + totalCount: number; } export class GetUnAddUserInput implements IGetUnAddUserInput { - pageIndex!: number; - pageSize!: number; - readonly skipCount!: number; - organizationUnitId!: string; - filter!: string | undefined; - - constructor(data?: IGetUnAddUserInput) { - if (data) { - for (var property in data) { - if (data.hasOwnProperty(property)) - (this)[property] = (data)[property]; - } - } - } - - init(_data?: any) { - if (_data) { - this.pageIndex = _data["pageIndex"]; - this.pageSize = _data["pageSize"]; - (this).skipCount = _data["skipCount"]; - this.organizationUnitId = _data["organizationUnitId"]; - this.filter = _data["filter"]; - } - } - - static fromJS(data: any): GetUnAddUserInput { - data = typeof data === 'object' ? data : {}; - let result = new GetUnAddUserInput(); - result.init(data); - return result; - } - - toJSON(data?: any) { - data = typeof data === 'object' ? data : {}; - data["pageIndex"] = this.pageIndex; - data["pageSize"] = this.pageSize; - data["skipCount"] = this.skipCount; - data["organizationUnitId"] = this.organizationUnitId; - data["filter"] = this.filter; - return data; - } + pageIndex!: number; + pageSize!: number; + readonly skipCount!: number; + organizationUnitId!: string; + filter!: string | undefined; + + constructor(data?: IGetUnAddUserInput) { + if (data) { + for (var property in data) { + if (data.hasOwnProperty(property)) (this)[property] = (data)[property]; + } + } + } + + init(_data?: any) { + if (_data) { + this.pageIndex = _data['pageIndex']; + this.pageSize = _data['pageSize']; + (this).skipCount = _data['skipCount']; + this.organizationUnitId = _data['organizationUnitId']; + this.filter = _data['filter']; + } + } + + static fromJS(data: any): GetUnAddUserInput { + data = typeof data === 'object' ? data : {}; + let result = new GetUnAddUserInput(); + result.init(data); + return result; + } + + toJSON(data?: any) { + data = typeof data === 'object' ? data : {}; + data['pageIndex'] = this.pageIndex; + data['pageSize'] = this.pageSize; + data['skipCount'] = this.skipCount; + data['organizationUnitId'] = this.organizationUnitId; + data['filter'] = this.filter; + return data; + } } export interface IGetUnAddUserInput { - pageIndex: number; - pageSize: number; - skipCount: number; - organizationUnitId: string; - filter: string | undefined; + pageIndex: number; + pageSize: number; + skipCount: number; + organizationUnitId: string; + filter: string | undefined; } export class GetUnAddUserOutput implements IGetUnAddUserOutput { - id!: string; - userName!: string | undefined; - email!: string | undefined; - - constructor(data?: IGetUnAddUserOutput) { - 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.userName = _data["userName"]; - this.email = _data["email"]; - } - } - - static fromJS(data: any): GetUnAddUserOutput { - data = typeof data === 'object' ? data : {}; - let result = new GetUnAddUserOutput(); - result.init(data); - return result; - } - - toJSON(data?: any) { - data = typeof data === 'object' ? data : {}; - data["id"] = this.id; - data["userName"] = this.userName; - data["email"] = this.email; - return data; - } + id!: string; + userName!: string | undefined; + email!: string | undefined; + + constructor(data?: IGetUnAddUserOutput) { + 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.userName = _data['userName']; + this.email = _data['email']; + } + } + + static fromJS(data: any): GetUnAddUserOutput { + data = typeof data === 'object' ? data : {}; + let result = new GetUnAddUserOutput(); + result.init(data); + return result; + } + + toJSON(data?: any) { + data = typeof data === 'object' ? data : {}; + data['id'] = this.id; + data['userName'] = this.userName; + data['email'] = this.email; + return data; + } } export interface IGetUnAddUserOutput { - id: string; - userName: string | undefined; - email: string | undefined; + id: string; + userName: string | undefined; + email: string | undefined; } export class GetUnAddUserOutputPagedResultDto implements IGetUnAddUserOutputPagedResultDto { - items!: GetUnAddUserOutput[] | undefined; - totalCount!: number; + items!: GetUnAddUserOutput[] | undefined; + totalCount!: number; - constructor(data?: IGetUnAddUserOutputPagedResultDto) { - if (data) { - for (var property in data) { - if (data.hasOwnProperty(property)) - (this)[property] = (data)[property]; - } - } + constructor(data?: IGetUnAddUserOutputPagedResultDto) { + 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(GetUnAddUserOutput.fromJS(item)); - } - this.totalCount = _data["totalCount"]; - } + init(_data?: any) { + if (_data) { + 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): GetUnAddUserOutputPagedResultDto { - data = typeof data === 'object' ? data : {}; - let result = new GetUnAddUserOutputPagedResultDto(); - result.init(data); - return result; - } + static fromJS(data: any): GetUnAddUserOutputPagedResultDto { + data = typeof data === 'object' ? data : {}; + let result = new GetUnAddUserOutputPagedResultDto(); + 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; + 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 IGetUnAddUserOutputPagedResultDto { - items: GetUnAddUserOutput[] | undefined; - totalCount: number; + items: GetUnAddUserOutput[] | undefined; + totalCount: number; } export enum HttpStatusCode { - Continue = 100, - SwitchingProtocols = 101, - Processing = 102, - EarlyHints = 103, - OK = 200, - Created = 201, - Accepted = 202, - NonAuthoritativeInformation = 203, - NoContent = 204, - ResetContent = 205, - PartialContent = 206, - MultiStatus = 207, - AlreadyReported = 208, - IMUsed = 226, - MultipleChoices = 300, - Ambiguous = 301, - MovedPermanently = 302, - Moved = 303, - Found = 304, - Redirect = 305, - SeeOther = 306, - RedirectMethod = 307, - NotModified = 308, - UseProxy = 400, - Unused = 401, - TemporaryRedirect = 402, - RedirectKeepVerb = 403, - PermanentRedirect = 404, - BadRequest = 405, - Unauthorized = 406, - PaymentRequired = 407, - Forbidden = 408, - NotFound = 409, - MethodNotAllowed = 410, - NotAcceptable = 411, - ProxyAuthenticationRequired = 412, - RequestTimeout = 413, - Conflict = 414, - Gone = 415, - LengthRequired = 416, - PreconditionFailed = 417, - RequestEntityTooLarge = 421, - RequestUriTooLong = 422, - UnsupportedMediaType = 423, - RequestedRangeNotSatisfiable = 424, - ExpectationFailed = 426, - MisdirectedRequest = 428, - UnprocessableEntity = 429, - Locked = 431, - FailedDependency = 451, - UpgradeRequired = 500, - PreconditionRequired = 501, - TooManyRequests = 502, - RequestHeaderFieldsTooLarge = 503, - UnavailableForLegalReasons = 504, - InternalServerError = 505, - NotImplemented = 506, - BadGateway = 507, - ServiceUnavailable = 508, - GatewayTimeout = 510, - HttpVersionNotSupported = 511, + Continue = 100, + SwitchingProtocols = 101, + Processing = 102, + EarlyHints = 103, + OK = 200, + Created = 201, + Accepted = 202, + NonAuthoritativeInformation = 203, + NoContent = 204, + ResetContent = 205, + PartialContent = 206, + MultiStatus = 207, + AlreadyReported = 208, + IMUsed = 226, + MultipleChoices = 300, + Ambiguous = 301, + MovedPermanently = 302, + Moved = 303, + Found = 304, + Redirect = 305, + SeeOther = 306, + RedirectMethod = 307, + NotModified = 308, + UseProxy = 400, + Unused = 401, + TemporaryRedirect = 402, + RedirectKeepVerb = 403, + PermanentRedirect = 404, + BadRequest = 405, + Unauthorized = 406, + PaymentRequired = 407, + Forbidden = 408, + NotFound = 409, + MethodNotAllowed = 410, + NotAcceptable = 411, + ProxyAuthenticationRequired = 412, + RequestTimeout = 413, + Conflict = 414, + Gone = 415, + LengthRequired = 416, + PreconditionFailed = 417, + RequestEntityTooLarge = 421, + RequestUriTooLong = 422, + UnsupportedMediaType = 423, + RequestedRangeNotSatisfiable = 424, + ExpectationFailed = 426, + MisdirectedRequest = 428, + UnprocessableEntity = 429, + Locked = 431, + FailedDependency = 451, + UpgradeRequired = 500, + PreconditionRequired = 501, + TooManyRequests = 502, + RequestHeaderFieldsTooLarge = 503, + UnavailableForLegalReasons = 504, + InternalServerError = 505, + NotImplemented = 506, + BadGateway = 507, + ServiceUnavailable = 508, + GatewayTimeout = 510, + HttpVersionNotSupported = 511, } export class IanaTimeZone implements IIanaTimeZone { - timeZoneName!: string | undefined; + timeZoneName!: string | undefined; - constructor(data?: IIanaTimeZone) { - if (data) { - for (var property in data) { - if (data.hasOwnProperty(property)) - (this)[property] = (data)[property]; - } - } + constructor(data?: IIanaTimeZone) { + if (data) { + for (var property in data) { + if (data.hasOwnProperty(property)) (this)[property] = (data)[property]; + } } + } - init(_data?: any) { - if (_data) { - this.timeZoneName = _data["timeZoneName"]; - } + init(_data?: any) { + if (_data) { + this.timeZoneName = _data['timeZoneName']; } + } - static fromJS(data: any): IanaTimeZone { - data = typeof data === 'object' ? data : {}; - let result = new IanaTimeZone(); - result.init(data); - return result; - } + static fromJS(data: any): IanaTimeZone { + data = typeof data === 'object' ? data : {}; + let result = new IanaTimeZone(); + result.init(data); + return result; + } - toJSON(data?: any) { - data = typeof data === 'object' ? data : {}; - data["timeZoneName"] = this.timeZoneName; - return data; - } + toJSON(data?: any) { + data = typeof data === 'object' ? data : {}; + data['timeZoneName'] = this.timeZoneName; + return data; + } } export interface IIanaTimeZone { - timeZoneName: string | undefined; + timeZoneName: string | undefined; } export class IdInput implements IIdInput { - id!: string; + id!: string; - constructor(data?: IIdInput) { - if (data) { - for (var property in data) { - if (data.hasOwnProperty(property)) - (this)[property] = (data)[property]; - } - } + constructor(data?: IIdInput) { + if (data) { + for (var property in data) { + if (data.hasOwnProperty(property)) (this)[property] = (data)[property]; + } } + } - init(_data?: any) { - if (_data) { - this.id = _data["id"]; - } + init(_data?: any) { + if (_data) { + this.id = _data['id']; } + } - static fromJS(data: any): IdInput { - data = typeof data === 'object' ? data : {}; - let result = new IdInput(); - result.init(data); - return result; - } + static fromJS(data: any): IdInput { + data = typeof data === 'object' ? data : {}; + let result = new IdInput(); + result.init(data); + return result; + } - toJSON(data?: any) { - data = typeof data === 'object' ? data : {}; - data["id"] = this.id; - return data; - } + toJSON(data?: any) { + data = typeof data === 'object' ? data : {}; + data['id'] = this.id; + return data; + } } export interface IIdInput { - id: string; + id: string; } export class IdentityRoleCreateDto implements IIdentityRoleCreateDto { - readonly extraProperties!: { [key: string]: any; } | undefined; - name!: string; - isDefault!: boolean; - isPublic!: boolean; - - constructor(data?: IIdentityRoleCreateDto) { - if (data) { - for (var property in data) { - if (data.hasOwnProperty(property)) - (this)[property] = (data)[property]; - } - } - } - - init(_data?: any) { - if (_data) { - if (_data["extraProperties"]) { - (this).extraProperties = {} as any; - for (let key in _data["extraProperties"]) { - if (_data["extraProperties"].hasOwnProperty(key)) - ((this).extraProperties)![key] = _data["extraProperties"][key]; - } - } - this.name = _data["name"]; - this.isDefault = _data["isDefault"]; - this.isPublic = _data["isPublic"]; - } - } - - static fromJS(data: any): IdentityRoleCreateDto { - data = typeof data === 'object' ? data : {}; - let result = new IdentityRoleCreateDto(); - result.init(data); - return result; - } - - toJSON(data?: any) { - data = typeof data === 'object' ? data : {}; - if (this.extraProperties) { - data["extraProperties"] = {}; - for (let key in this.extraProperties) { - if (this.extraProperties.hasOwnProperty(key)) - (data["extraProperties"])[key] = (this.extraProperties)[key]; - } - } - data["name"] = this.name; - data["isDefault"] = this.isDefault; - data["isPublic"] = this.isPublic; - return data; - } + readonly extraProperties!: { [key: string]: any } | undefined; + name!: string; + isDefault!: boolean; + isPublic!: boolean; + + constructor(data?: IIdentityRoleCreateDto) { + if (data) { + for (var property in data) { + if (data.hasOwnProperty(property)) (this)[property] = (data)[property]; + } + } + } + + init(_data?: any) { + if (_data) { + if (_data['extraProperties']) { + (this).extraProperties = {} as any; + for (let key in _data['extraProperties']) { + if (_data['extraProperties'].hasOwnProperty(key)) + ((this).extraProperties)![key] = _data['extraProperties'][key]; + } + } + this.name = _data['name']; + this.isDefault = _data['isDefault']; + this.isPublic = _data['isPublic']; + } + } + + static fromJS(data: any): IdentityRoleCreateDto { + data = typeof data === 'object' ? data : {}; + let result = new IdentityRoleCreateDto(); + result.init(data); + return result; + } + + toJSON(data?: any) { + data = typeof data === 'object' ? data : {}; + if (this.extraProperties) { + data['extraProperties'] = {}; + for (let key in this.extraProperties) { + if (this.extraProperties.hasOwnProperty(key)) + (data['extraProperties'])[key] = (this.extraProperties)[key]; + } + } + data['name'] = this.name; + data['isDefault'] = this.isDefault; + data['isPublic'] = this.isPublic; + return data; + } } export interface IIdentityRoleCreateDto { - extraProperties: { [key: string]: any; } | undefined; - name: string; - isDefault: boolean; - isPublic: boolean; + extraProperties: { [key: string]: any } | undefined; + name: string; + isDefault: boolean; + isPublic: boolean; } export class IdentityRoleDto implements IIdentityRoleDto { - readonly extraProperties!: { [key: string]: any; } | undefined; - id!: string; - name!: string | undefined; - isDefault!: boolean; - isStatic!: boolean; - isPublic!: boolean; - concurrencyStamp!: string | undefined; - - constructor(data?: IIdentityRoleDto) { - if (data) { - for (var property in data) { - if (data.hasOwnProperty(property)) - (this)[property] = (data)[property]; - } - } - } - - init(_data?: any) { - if (_data) { - if (_data["extraProperties"]) { - (this).extraProperties = {} as any; - for (let key in _data["extraProperties"]) { - if (_data["extraProperties"].hasOwnProperty(key)) - ((this).extraProperties)![key] = _data["extraProperties"][key]; - } - } - this.id = _data["id"]; - this.name = _data["name"]; - this.isDefault = _data["isDefault"]; - this.isStatic = _data["isStatic"]; - this.isPublic = _data["isPublic"]; - this.concurrencyStamp = _data["concurrencyStamp"]; - } - } - - static fromJS(data: any): IdentityRoleDto { - data = typeof data === 'object' ? data : {}; - let result = new IdentityRoleDto(); - result.init(data); - return result; - } - - toJSON(data?: any) { - data = typeof data === 'object' ? data : {}; - if (this.extraProperties) { - data["extraProperties"] = {}; - for (let key in this.extraProperties) { - if (this.extraProperties.hasOwnProperty(key)) - (data["extraProperties"])[key] = (this.extraProperties)[key]; - } - } - data["id"] = this.id; - data["name"] = this.name; - data["isDefault"] = this.isDefault; - data["isStatic"] = this.isStatic; - data["isPublic"] = this.isPublic; - data["concurrencyStamp"] = this.concurrencyStamp; - return data; - } + readonly extraProperties!: { [key: string]: any } | undefined; + id!: string; + name!: string | undefined; + isDefault!: boolean; + isStatic!: boolean; + isPublic!: boolean; + concurrencyStamp!: string | undefined; + + constructor(data?: IIdentityRoleDto) { + if (data) { + for (var property in data) { + if (data.hasOwnProperty(property)) (this)[property] = (data)[property]; + } + } + } + + init(_data?: any) { + if (_data) { + if (_data['extraProperties']) { + (this).extraProperties = {} as any; + for (let key in _data['extraProperties']) { + if (_data['extraProperties'].hasOwnProperty(key)) + ((this).extraProperties)![key] = _data['extraProperties'][key]; + } + } + this.id = _data['id']; + this.name = _data['name']; + this.isDefault = _data['isDefault']; + this.isStatic = _data['isStatic']; + this.isPublic = _data['isPublic']; + this.concurrencyStamp = _data['concurrencyStamp']; + } + } + + static fromJS(data: any): IdentityRoleDto { + data = typeof data === 'object' ? data : {}; + let result = new IdentityRoleDto(); + result.init(data); + return result; + } + + toJSON(data?: any) { + data = typeof data === 'object' ? data : {}; + if (this.extraProperties) { + data['extraProperties'] = {}; + for (let key in this.extraProperties) { + if (this.extraProperties.hasOwnProperty(key)) + (data['extraProperties'])[key] = (this.extraProperties)[key]; + } + } + data['id'] = this.id; + data['name'] = this.name; + data['isDefault'] = this.isDefault; + data['isStatic'] = this.isStatic; + data['isPublic'] = this.isPublic; + data['concurrencyStamp'] = this.concurrencyStamp; + return data; + } } export interface IIdentityRoleDto { - extraProperties: { [key: string]: any; } | undefined; - id: string; - name: string | undefined; - isDefault: boolean; - isStatic: boolean; - isPublic: boolean; - concurrencyStamp: string | undefined; + extraProperties: { [key: string]: any } | undefined; + id: string; + name: string | undefined; + isDefault: boolean; + isStatic: boolean; + isPublic: boolean; + concurrencyStamp: string | undefined; } export class IdentityRoleDtoListResultDto implements IIdentityRoleDtoListResultDto { - items!: IdentityRoleDto[] | undefined; + items!: IdentityRoleDto[] | undefined; - constructor(data?: IIdentityRoleDtoListResultDto) { - if (data) { - for (var property in data) { - if (data.hasOwnProperty(property)) - (this)[property] = (data)[property]; - } - } + constructor(data?: IIdentityRoleDtoListResultDto) { + 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(IdentityRoleDto.fromJS(item)); - } - } + init(_data?: any) { + if (_data) { + if (Array.isArray(_data['items'])) { + this.items = [] as any; + for (let item of _data['items']) this.items!.push(IdentityRoleDto.fromJS(item)); + } } + } - static fromJS(data: any): IdentityRoleDtoListResultDto { - data = typeof data === 'object' ? data : {}; - let result = new IdentityRoleDtoListResultDto(); - result.init(data); - return result; - } + static fromJS(data: any): IdentityRoleDtoListResultDto { + data = typeof data === 'object' ? data : {}; + let result = new IdentityRoleDtoListResultDto(); + 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()); - } - return data; + 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()); } + return data; + } } export interface IIdentityRoleDtoListResultDto { - items: IdentityRoleDto[] | undefined; + items: IdentityRoleDto[] | undefined; } export class IdentityRoleDtoPagedResultDto implements IIdentityRoleDtoPagedResultDto { - items!: IdentityRoleDto[] | undefined; - totalCount!: number; + items!: IdentityRoleDto[] | undefined; + totalCount!: number; - constructor(data?: IIdentityRoleDtoPagedResultDto) { - if (data) { - for (var property in data) { - if (data.hasOwnProperty(property)) - (this)[property] = (data)[property]; - } - } + constructor(data?: IIdentityRoleDtoPagedResultDto) { + 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(IdentityRoleDto.fromJS(item)); - } - this.totalCount = _data["totalCount"]; - } + init(_data?: any) { + if (_data) { + if (Array.isArray(_data['items'])) { + this.items = [] as any; + for (let item of _data['items']) this.items!.push(IdentityRoleDto.fromJS(item)); + } + this.totalCount = _data['totalCount']; } + } - static fromJS(data: any): IdentityRoleDtoPagedResultDto { - data = typeof data === 'object' ? data : {}; - let result = new IdentityRoleDtoPagedResultDto(); - result.init(data); - return result; - } + static fromJS(data: any): IdentityRoleDtoPagedResultDto { + data = typeof data === 'object' ? data : {}; + let result = new IdentityRoleDtoPagedResultDto(); + 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; + 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 IIdentityRoleDtoPagedResultDto { - items: IdentityRoleDto[] | undefined; - totalCount: number; + items: IdentityRoleDto[] | undefined; + totalCount: number; } export class IdentityRoleUpdateDto implements IIdentityRoleUpdateDto { - readonly extraProperties!: { [key: string]: any; } | undefined; - name!: string; - isDefault!: boolean; - isPublic!: boolean; - concurrencyStamp!: string | undefined; - - constructor(data?: IIdentityRoleUpdateDto) { - if (data) { - for (var property in data) { - if (data.hasOwnProperty(property)) - (this)[property] = (data)[property]; - } - } - } - - init(_data?: any) { - if (_data) { - if (_data["extraProperties"]) { - (this).extraProperties = {} as any; - for (let key in _data["extraProperties"]) { - if (_data["extraProperties"].hasOwnProperty(key)) - ((this).extraProperties)![key] = _data["extraProperties"][key]; - } - } - this.name = _data["name"]; - this.isDefault = _data["isDefault"]; - this.isPublic = _data["isPublic"]; - this.concurrencyStamp = _data["concurrencyStamp"]; - } - } - - static fromJS(data: any): IdentityRoleUpdateDto { - data = typeof data === 'object' ? data : {}; - let result = new IdentityRoleUpdateDto(); - result.init(data); - return result; - } - - toJSON(data?: any) { - data = typeof data === 'object' ? data : {}; - if (this.extraProperties) { - data["extraProperties"] = {}; - for (let key in this.extraProperties) { - if (this.extraProperties.hasOwnProperty(key)) - (data["extraProperties"])[key] = (this.extraProperties)[key]; - } - } - data["name"] = this.name; - data["isDefault"] = this.isDefault; - data["isPublic"] = this.isPublic; - data["concurrencyStamp"] = this.concurrencyStamp; - return data; - } + readonly extraProperties!: { [key: string]: any } | undefined; + name!: string; + isDefault!: boolean; + isPublic!: boolean; + concurrencyStamp!: string | undefined; + + constructor(data?: IIdentityRoleUpdateDto) { + if (data) { + for (var property in data) { + if (data.hasOwnProperty(property)) (this)[property] = (data)[property]; + } + } + } + + init(_data?: any) { + if (_data) { + if (_data['extraProperties']) { + (this).extraProperties = {} as any; + for (let key in _data['extraProperties']) { + if (_data['extraProperties'].hasOwnProperty(key)) + ((this).extraProperties)![key] = _data['extraProperties'][key]; + } + } + this.name = _data['name']; + this.isDefault = _data['isDefault']; + this.isPublic = _data['isPublic']; + this.concurrencyStamp = _data['concurrencyStamp']; + } + } + + static fromJS(data: any): IdentityRoleUpdateDto { + data = typeof data === 'object' ? data : {}; + let result = new IdentityRoleUpdateDto(); + result.init(data); + return result; + } + + toJSON(data?: any) { + data = typeof data === 'object' ? data : {}; + if (this.extraProperties) { + data['extraProperties'] = {}; + for (let key in this.extraProperties) { + if (this.extraProperties.hasOwnProperty(key)) + (data['extraProperties'])[key] = (this.extraProperties)[key]; + } + } + data['name'] = this.name; + data['isDefault'] = this.isDefault; + data['isPublic'] = this.isPublic; + data['concurrencyStamp'] = this.concurrencyStamp; + return data; + } } export interface IIdentityRoleUpdateDto { - extraProperties: { [key: string]: any; } | undefined; - name: string; - isDefault: boolean; - isPublic: boolean; - concurrencyStamp: string | undefined; + extraProperties: { [key: string]: any } | undefined; + name: string; + isDefault: boolean; + isPublic: boolean; + concurrencyStamp: string | undefined; } export class IdentityUserCreateDto implements IIdentityUserCreateDto { - readonly extraProperties!: { [key: string]: any; } | undefined; - userName!: string; - name!: string | undefined; - surname!: string | undefined; - email!: string; - phoneNumber!: string | undefined; - isActive!: boolean; - lockoutEnabled!: boolean; - roleNames!: string[] | undefined; - password!: string; - - constructor(data?: IIdentityUserCreateDto) { - if (data) { - for (var property in data) { - if (data.hasOwnProperty(property)) - (this)[property] = (data)[property]; - } - } - } - - init(_data?: any) { - if (_data) { - if (_data["extraProperties"]) { - (this).extraProperties = {} as any; - for (let key in _data["extraProperties"]) { - if (_data["extraProperties"].hasOwnProperty(key)) - ((this).extraProperties)![key] = _data["extraProperties"][key]; - } - } - this.userName = _data["userName"]; - this.name = _data["name"]; - this.surname = _data["surname"]; - this.email = _data["email"]; - this.phoneNumber = _data["phoneNumber"]; - this.isActive = _data["isActive"]; - this.lockoutEnabled = _data["lockoutEnabled"]; - if (Array.isArray(_data["roleNames"])) { - this.roleNames = [] as any; - for (let item of _data["roleNames"]) - this.roleNames!.push(item); - } - this.password = _data["password"]; - } - } - - static fromJS(data: any): IdentityUserCreateDto { - data = typeof data === 'object' ? data : {}; - let result = new IdentityUserCreateDto(); - result.init(data); - return result; - } - - toJSON(data?: any) { - data = typeof data === 'object' ? data : {}; - if (this.extraProperties) { - data["extraProperties"] = {}; - for (let key in this.extraProperties) { - if (this.extraProperties.hasOwnProperty(key)) - (data["extraProperties"])[key] = (this.extraProperties)[key]; - } - } - data["userName"] = this.userName; - data["name"] = this.name; - data["surname"] = this.surname; - data["email"] = this.email; - data["phoneNumber"] = this.phoneNumber; - data["isActive"] = this.isActive; - data["lockoutEnabled"] = this.lockoutEnabled; - if (Array.isArray(this.roleNames)) { - data["roleNames"] = []; - for (let item of this.roleNames) - data["roleNames"].push(item); - } - data["password"] = this.password; - return data; - } + readonly extraProperties!: { [key: string]: any } | undefined; + userName!: string; + name!: string | undefined; + surname!: string | undefined; + email!: string; + phoneNumber!: string | undefined; + isActive!: boolean; + lockoutEnabled!: boolean; + roleNames!: string[] | undefined; + password!: string; + + constructor(data?: IIdentityUserCreateDto) { + if (data) { + for (var property in data) { + if (data.hasOwnProperty(property)) (this)[property] = (data)[property]; + } + } + } + + init(_data?: any) { + if (_data) { + if (_data['extraProperties']) { + (this).extraProperties = {} as any; + for (let key in _data['extraProperties']) { + if (_data['extraProperties'].hasOwnProperty(key)) + ((this).extraProperties)![key] = _data['extraProperties'][key]; + } + } + this.userName = _data['userName']; + this.name = _data['name']; + this.surname = _data['surname']; + this.email = _data['email']; + this.phoneNumber = _data['phoneNumber']; + this.isActive = _data['isActive']; + this.lockoutEnabled = _data['lockoutEnabled']; + if (Array.isArray(_data['roleNames'])) { + this.roleNames = [] as any; + for (let item of _data['roleNames']) this.roleNames!.push(item); + } + this.password = _data['password']; + } + } + + static fromJS(data: any): IdentityUserCreateDto { + data = typeof data === 'object' ? data : {}; + let result = new IdentityUserCreateDto(); + result.init(data); + return result; + } + + toJSON(data?: any) { + data = typeof data === 'object' ? data : {}; + if (this.extraProperties) { + data['extraProperties'] = {}; + for (let key in this.extraProperties) { + if (this.extraProperties.hasOwnProperty(key)) + (data['extraProperties'])[key] = (this.extraProperties)[key]; + } + } + data['userName'] = this.userName; + data['name'] = this.name; + data['surname'] = this.surname; + data['email'] = this.email; + data['phoneNumber'] = this.phoneNumber; + data['isActive'] = this.isActive; + data['lockoutEnabled'] = this.lockoutEnabled; + if (Array.isArray(this.roleNames)) { + data['roleNames'] = []; + for (let item of this.roleNames) data['roleNames'].push(item); + } + data['password'] = this.password; + return data; + } } export interface IIdentityUserCreateDto { - extraProperties: { [key: string]: any; } | undefined; - userName: string; - name: string | undefined; - surname: string | undefined; - email: string; - phoneNumber: string | undefined; - isActive: boolean; - lockoutEnabled: boolean; - roleNames: string[] | undefined; - password: string; + extraProperties: { [key: string]: any } | undefined; + userName: string; + name: string | undefined; + surname: string | undefined; + email: string; + phoneNumber: string | undefined; + isActive: boolean; + lockoutEnabled: boolean; + roleNames: string[] | undefined; + password: string; } export class IdentityUserDto implements IIdentityUserDto { - readonly extraProperties!: { [key: string]: any; } | undefined; - id!: string; - creationTime!: dayjs.Dayjs; - creatorId!: string | undefined; - lastModificationTime!: dayjs.Dayjs | undefined; - lastModifierId!: string | undefined; - isDeleted!: boolean; - deleterId!: string | undefined; - deletionTime!: dayjs.Dayjs | undefined; - tenantId!: string | undefined; - userName!: string | undefined; - name!: string | undefined; - surname!: string | undefined; - email!: string | undefined; - emailConfirmed!: boolean; - phoneNumber!: string | undefined; - phoneNumberConfirmed!: boolean; - isActive!: boolean; - lockoutEnabled!: boolean; - lockoutEnd!: dayjs.Dayjs | undefined; - concurrencyStamp!: string | undefined; - - constructor(data?: IIdentityUserDto) { - if (data) { - for (var property in data) { - if (data.hasOwnProperty(property)) - (this)[property] = (data)[property]; - } - } - } - - init(_data?: any) { - if (_data) { - if (_data["extraProperties"]) { - (this).extraProperties = {} as any; - for (let key in _data["extraProperties"]) { - if (_data["extraProperties"].hasOwnProperty(key)) - ((this).extraProperties)![key] = _data["extraProperties"][key]; - } - } - this.id = _data["id"]; - this.creationTime = _data["creationTime"] ? dayjs(_data["creationTime"].toString()) : undefined; - this.creatorId = _data["creatorId"]; - this.lastModificationTime = _data["lastModificationTime"] ? dayjs(_data["lastModificationTime"].toString()) : undefined; - this.lastModifierId = _data["lastModifierId"]; - this.isDeleted = _data["isDeleted"]; - this.deleterId = _data["deleterId"]; - this.deletionTime = _data["deletionTime"] ? dayjs(_data["deletionTime"].toString()) : undefined; - this.tenantId = _data["tenantId"]; - this.userName = _data["userName"]; - this.name = _data["name"]; - this.surname = _data["surname"]; - this.email = _data["email"]; - this.emailConfirmed = _data["emailConfirmed"]; - this.phoneNumber = _data["phoneNumber"]; - this.phoneNumberConfirmed = _data["phoneNumberConfirmed"]; - this.isActive = _data["isActive"]; - this.lockoutEnabled = _data["lockoutEnabled"]; - this.lockoutEnd = _data["lockoutEnd"] ? dayjs(_data["lockoutEnd"].toString()) : undefined; - this.concurrencyStamp = _data["concurrencyStamp"]; - } - } - - static fromJS(data: any): IdentityUserDto { - data = typeof data === 'object' ? data : {}; - let result = new IdentityUserDto(); - result.init(data); - return result; - } - - toJSON(data?: any) { - data = typeof data === 'object' ? data : {}; - if (this.extraProperties) { - data["extraProperties"] = {}; - for (let key in this.extraProperties) { - if (this.extraProperties.hasOwnProperty(key)) - (data["extraProperties"])[key] = (this.extraProperties)[key]; - } - } - data["id"] = this.id; - data["creationTime"] = this.creationTime ? this.creationTime.toISOString() : undefined; - data["creatorId"] = this.creatorId; - data["lastModificationTime"] = this.lastModificationTime ? this.lastModificationTime.toISOString() : undefined; - data["lastModifierId"] = this.lastModifierId; - data["isDeleted"] = this.isDeleted; - data["deleterId"] = this.deleterId; - data["deletionTime"] = this.deletionTime ? this.deletionTime.toISOString() : undefined; - data["tenantId"] = this.tenantId; - data["userName"] = this.userName; - data["name"] = this.name; - data["surname"] = this.surname; - data["email"] = this.email; - data["emailConfirmed"] = this.emailConfirmed; - data["phoneNumber"] = this.phoneNumber; - data["phoneNumberConfirmed"] = this.phoneNumberConfirmed; - data["isActive"] = this.isActive; - data["lockoutEnabled"] = this.lockoutEnabled; - data["lockoutEnd"] = this.lockoutEnd ? this.lockoutEnd.toISOString() : undefined; - data["concurrencyStamp"] = this.concurrencyStamp; - return data; - } + readonly extraProperties!: { [key: string]: any } | undefined; + id!: string; + creationTime!: dayjs.Dayjs; + creatorId!: string | undefined; + lastModificationTime!: dayjs.Dayjs | undefined; + lastModifierId!: string | undefined; + isDeleted!: boolean; + deleterId!: string | undefined; + deletionTime!: dayjs.Dayjs | undefined; + tenantId!: string | undefined; + userName!: string | undefined; + name!: string | undefined; + surname!: string | undefined; + email!: string | undefined; + emailConfirmed!: boolean; + phoneNumber!: string | undefined; + phoneNumberConfirmed!: boolean; + isActive!: boolean; + lockoutEnabled!: boolean; + lockoutEnd!: dayjs.Dayjs | undefined; + concurrencyStamp!: string | undefined; + + constructor(data?: IIdentityUserDto) { + if (data) { + for (var property in data) { + if (data.hasOwnProperty(property)) (this)[property] = (data)[property]; + } + } + } + + init(_data?: any) { + if (_data) { + if (_data['extraProperties']) { + (this).extraProperties = {} as any; + for (let key in _data['extraProperties']) { + if (_data['extraProperties'].hasOwnProperty(key)) + ((this).extraProperties)![key] = _data['extraProperties'][key]; + } + } + this.id = _data['id']; + this.creationTime = _data['creationTime'] + ? dayjs(_data['creationTime'].toString()) + : undefined; + this.creatorId = _data['creatorId']; + this.lastModificationTime = _data['lastModificationTime'] + ? dayjs(_data['lastModificationTime'].toString()) + : undefined; + this.lastModifierId = _data['lastModifierId']; + this.isDeleted = _data['isDeleted']; + this.deleterId = _data['deleterId']; + this.deletionTime = _data['deletionTime'] + ? dayjs(_data['deletionTime'].toString()) + : undefined; + this.tenantId = _data['tenantId']; + this.userName = _data['userName']; + this.name = _data['name']; + this.surname = _data['surname']; + this.email = _data['email']; + this.emailConfirmed = _data['emailConfirmed']; + this.phoneNumber = _data['phoneNumber']; + this.phoneNumberConfirmed = _data['phoneNumberConfirmed']; + this.isActive = _data['isActive']; + this.lockoutEnabled = _data['lockoutEnabled']; + this.lockoutEnd = _data['lockoutEnd'] + ? dayjs(_data['lockoutEnd'].toString()) + : undefined; + this.concurrencyStamp = _data['concurrencyStamp']; + } + } + + static fromJS(data: any): IdentityUserDto { + data = typeof data === 'object' ? data : {}; + let result = new IdentityUserDto(); + result.init(data); + return result; + } + + toJSON(data?: any) { + data = typeof data === 'object' ? data : {}; + if (this.extraProperties) { + data['extraProperties'] = {}; + for (let key in this.extraProperties) { + if (this.extraProperties.hasOwnProperty(key)) + (data['extraProperties'])[key] = (this.extraProperties)[key]; + } + } + data['id'] = this.id; + data['creationTime'] = this.creationTime ? this.creationTime.toISOString() : undefined; + data['creatorId'] = this.creatorId; + data['lastModificationTime'] = this.lastModificationTime + ? this.lastModificationTime.toISOString() + : undefined; + data['lastModifierId'] = this.lastModifierId; + data['isDeleted'] = this.isDeleted; + data['deleterId'] = this.deleterId; + data['deletionTime'] = this.deletionTime ? this.deletionTime.toISOString() : undefined; + data['tenantId'] = this.tenantId; + data['userName'] = this.userName; + data['name'] = this.name; + data['surname'] = this.surname; + data['email'] = this.email; + data['emailConfirmed'] = this.emailConfirmed; + data['phoneNumber'] = this.phoneNumber; + data['phoneNumberConfirmed'] = this.phoneNumberConfirmed; + data['isActive'] = this.isActive; + data['lockoutEnabled'] = this.lockoutEnabled; + data['lockoutEnd'] = this.lockoutEnd ? this.lockoutEnd.toISOString() : undefined; + data['concurrencyStamp'] = this.concurrencyStamp; + return data; + } } export interface IIdentityUserDto { - extraProperties: { [key: string]: any; } | undefined; - id: string; - creationTime: dayjs.Dayjs; - creatorId: string | undefined; - lastModificationTime: dayjs.Dayjs | undefined; - lastModifierId: string | undefined; - isDeleted: boolean; - deleterId: string | undefined; - deletionTime: dayjs.Dayjs | undefined; - tenantId: string | undefined; - userName: string | undefined; - name: string | undefined; - surname: string | undefined; - email: string | undefined; - emailConfirmed: boolean; - phoneNumber: string | undefined; - phoneNumberConfirmed: boolean; - isActive: boolean; - lockoutEnabled: boolean; - lockoutEnd: dayjs.Dayjs | undefined; - concurrencyStamp: string | undefined; + extraProperties: { [key: string]: any } | undefined; + id: string; + creationTime: dayjs.Dayjs; + creatorId: string | undefined; + lastModificationTime: dayjs.Dayjs | undefined; + lastModifierId: string | undefined; + isDeleted: boolean; + deleterId: string | undefined; + deletionTime: dayjs.Dayjs | undefined; + tenantId: string | undefined; + userName: string | undefined; + name: string | undefined; + surname: string | undefined; + email: string | undefined; + emailConfirmed: boolean; + phoneNumber: string | undefined; + phoneNumberConfirmed: boolean; + isActive: boolean; + lockoutEnabled: boolean; + lockoutEnd: dayjs.Dayjs | undefined; + concurrencyStamp: string | undefined; } export class IdentityUserDtoPagedResultDto implements IIdentityUserDtoPagedResultDto { - items!: IdentityUserDto[] | undefined; - totalCount!: number; + items!: IdentityUserDto[] | undefined; + totalCount!: number; - constructor(data?: IIdentityUserDtoPagedResultDto) { - if (data) { - for (var property in data) { - if (data.hasOwnProperty(property)) - (this)[property] = (data)[property]; - } - } + constructor(data?: IIdentityUserDtoPagedResultDto) { + 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(IdentityUserDto.fromJS(item)); - } - this.totalCount = _data["totalCount"]; - } + init(_data?: any) { + if (_data) { + if (Array.isArray(_data['items'])) { + this.items = [] as any; + for (let item of _data['items']) this.items!.push(IdentityUserDto.fromJS(item)); + } + this.totalCount = _data['totalCount']; } + } - static fromJS(data: any): IdentityUserDtoPagedResultDto { - data = typeof data === 'object' ? data : {}; - let result = new IdentityUserDtoPagedResultDto(); - result.init(data); - return result; - } + static fromJS(data: any): IdentityUserDtoPagedResultDto { + data = typeof data === 'object' ? data : {}; + let result = new IdentityUserDtoPagedResultDto(); + 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; + 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 IIdentityUserDtoPagedResultDto { - items: IdentityUserDto[] | undefined; - totalCount: number; + items: IdentityUserDto[] | undefined; + totalCount: number; } export class IdentityUserUpdateDto implements IIdentityUserUpdateDto { - readonly extraProperties!: { [key: string]: any; } | undefined; - userName!: string; - name!: string | undefined; - surname!: string | undefined; - email!: string; - phoneNumber!: string | undefined; - isActive!: boolean; - lockoutEnabled!: boolean; - roleNames!: string[] | undefined; - password!: string | undefined; - concurrencyStamp!: string | undefined; - - constructor(data?: IIdentityUserUpdateDto) { - if (data) { - for (var property in data) { - if (data.hasOwnProperty(property)) - (this)[property] = (data)[property]; - } - } - } - - init(_data?: any) { - if (_data) { - if (_data["extraProperties"]) { - (this).extraProperties = {} as any; - for (let key in _data["extraProperties"]) { - if (_data["extraProperties"].hasOwnProperty(key)) - ((this).extraProperties)![key] = _data["extraProperties"][key]; - } - } - this.userName = _data["userName"]; - this.name = _data["name"]; - this.surname = _data["surname"]; - this.email = _data["email"]; - this.phoneNumber = _data["phoneNumber"]; - this.isActive = _data["isActive"]; - this.lockoutEnabled = _data["lockoutEnabled"]; - if (Array.isArray(_data["roleNames"])) { - this.roleNames = [] as any; - for (let item of _data["roleNames"]) - this.roleNames!.push(item); - } - this.password = _data["password"]; - this.concurrencyStamp = _data["concurrencyStamp"]; - } - } - - static fromJS(data: any): IdentityUserUpdateDto { - data = typeof data === 'object' ? data : {}; - let result = new IdentityUserUpdateDto(); - result.init(data); - return result; - } - - toJSON(data?: any) { - data = typeof data === 'object' ? data : {}; - if (this.extraProperties) { - data["extraProperties"] = {}; - for (let key in this.extraProperties) { - if (this.extraProperties.hasOwnProperty(key)) - (data["extraProperties"])[key] = (this.extraProperties)[key]; - } - } - data["userName"] = this.userName; - data["name"] = this.name; - data["surname"] = this.surname; - data["email"] = this.email; - data["phoneNumber"] = this.phoneNumber; - data["isActive"] = this.isActive; - data["lockoutEnabled"] = this.lockoutEnabled; - if (Array.isArray(this.roleNames)) { - data["roleNames"] = []; - for (let item of this.roleNames) - data["roleNames"].push(item); - } - data["password"] = this.password; - data["concurrencyStamp"] = this.concurrencyStamp; - return data; - } + readonly extraProperties!: { [key: string]: any } | undefined; + userName!: string; + name!: string | undefined; + surname!: string | undefined; + email!: string; + phoneNumber!: string | undefined; + isActive!: boolean; + lockoutEnabled!: boolean; + roleNames!: string[] | undefined; + password!: string | undefined; + concurrencyStamp!: string | undefined; + + constructor(data?: IIdentityUserUpdateDto) { + if (data) { + for (var property in data) { + if (data.hasOwnProperty(property)) (this)[property] = (data)[property]; + } + } + } + + init(_data?: any) { + if (_data) { + if (_data['extraProperties']) { + (this).extraProperties = {} as any; + for (let key in _data['extraProperties']) { + if (_data['extraProperties'].hasOwnProperty(key)) + ((this).extraProperties)![key] = _data['extraProperties'][key]; + } + } + this.userName = _data['userName']; + this.name = _data['name']; + this.surname = _data['surname']; + this.email = _data['email']; + this.phoneNumber = _data['phoneNumber']; + this.isActive = _data['isActive']; + this.lockoutEnabled = _data['lockoutEnabled']; + if (Array.isArray(_data['roleNames'])) { + this.roleNames = [] as any; + for (let item of _data['roleNames']) this.roleNames!.push(item); + } + this.password = _data['password']; + this.concurrencyStamp = _data['concurrencyStamp']; + } + } + + static fromJS(data: any): IdentityUserUpdateDto { + data = typeof data === 'object' ? data : {}; + let result = new IdentityUserUpdateDto(); + result.init(data); + return result; + } + + toJSON(data?: any) { + data = typeof data === 'object' ? data : {}; + if (this.extraProperties) { + data['extraProperties'] = {}; + for (let key in this.extraProperties) { + if (this.extraProperties.hasOwnProperty(key)) + (data['extraProperties'])[key] = (this.extraProperties)[key]; + } + } + data['userName'] = this.userName; + data['name'] = this.name; + data['surname'] = this.surname; + data['email'] = this.email; + data['phoneNumber'] = this.phoneNumber; + data['isActive'] = this.isActive; + data['lockoutEnabled'] = this.lockoutEnabled; + if (Array.isArray(this.roleNames)) { + data['roleNames'] = []; + for (let item of this.roleNames) data['roleNames'].push(item); + } + data['password'] = this.password; + data['concurrencyStamp'] = this.concurrencyStamp; + return data; + } } export interface IIdentityUserUpdateDto { - extraProperties: { [key: string]: any; } | undefined; - userName: string; - name: string | undefined; - surname: string | undefined; - email: string; - phoneNumber: string | undefined; - isActive: boolean; - lockoutEnabled: boolean; - roleNames: string[] | undefined; - password: string | undefined; - concurrencyStamp: string | undefined; + extraProperties: { [key: string]: any } | undefined; + userName: string; + name: string | undefined; + surname: string | undefined; + email: string; + phoneNumber: string | undefined; + isActive: boolean; + lockoutEnabled: boolean; + roleNames: string[] | undefined; + password: string | undefined; + concurrencyStamp: string | undefined; +} + +export class InterfaceMethodApiDescriptionModel implements IInterfaceMethodApiDescriptionModel { + name!: string | undefined; + parametersOnMethod!: MethodParameterApiDescriptionModel[] | undefined; + returnValue!: ReturnValueApiDescriptionModel; + + constructor(data?: IInterfaceMethodApiDescriptionModel) { + if (data) { + for (var property in data) { + if (data.hasOwnProperty(property)) (this)[property] = (data)[property]; + } + } + } + + init(_data?: any) { + if (_data) { + this.name = _data['name']; + if (Array.isArray(_data['parametersOnMethod'])) { + this.parametersOnMethod = [] as any; + for (let item of _data['parametersOnMethod']) + this.parametersOnMethod!.push(MethodParameterApiDescriptionModel.fromJS(item)); + } + this.returnValue = _data['returnValue'] + ? ReturnValueApiDescriptionModel.fromJS(_data['returnValue']) + : undefined; + } + } + + static fromJS(data: any): InterfaceMethodApiDescriptionModel { + data = typeof data === 'object' ? data : {}; + let result = new InterfaceMethodApiDescriptionModel(); + result.init(data); + return result; + } + + toJSON(data?: any) { + data = typeof data === 'object' ? data : {}; + data['name'] = this.name; + if (Array.isArray(this.parametersOnMethod)) { + data['parametersOnMethod'] = []; + for (let item of this.parametersOnMethod) data['parametersOnMethod'].push(item.toJSON()); + } + data['returnValue'] = this.returnValue ? this.returnValue.toJSON() : undefined; + return data; + } +} + +export interface IInterfaceMethodApiDescriptionModel { + name: string | undefined; + parametersOnMethod: MethodParameterApiDescriptionModel[] | undefined; + returnValue: ReturnValueApiDescriptionModel; } export class LanguageInfo implements ILanguageInfo { - cultureName!: string | undefined; - uiCultureName!: string | undefined; - displayName!: string | undefined; - flagIcon!: string | undefined; - - constructor(data?: ILanguageInfo) { - if (data) { - for (var property in data) { - if (data.hasOwnProperty(property)) - (this)[property] = (data)[property]; - } - } - } - - init(_data?: any) { - if (_data) { - this.cultureName = _data["cultureName"]; - this.uiCultureName = _data["uiCultureName"]; - this.displayName = _data["displayName"]; - this.flagIcon = _data["flagIcon"]; - } - } - - static fromJS(data: any): LanguageInfo { - data = typeof data === 'object' ? data : {}; - let result = new LanguageInfo(); - result.init(data); - return result; - } - - toJSON(data?: any) { - data = typeof data === 'object' ? data : {}; - data["cultureName"] = this.cultureName; - data["uiCultureName"] = this.uiCultureName; - data["displayName"] = this.displayName; - data["flagIcon"] = this.flagIcon; - return data; - } + cultureName!: string | undefined; + uiCultureName!: string | undefined; + displayName!: string | undefined; + flagIcon!: string | undefined; + + constructor(data?: ILanguageInfo) { + if (data) { + for (var property in data) { + if (data.hasOwnProperty(property)) (this)[property] = (data)[property]; + } + } + } + + init(_data?: any) { + if (_data) { + this.cultureName = _data['cultureName']; + this.uiCultureName = _data['uiCultureName']; + this.displayName = _data['displayName']; + this.flagIcon = _data['flagIcon']; + } + } + + static fromJS(data: any): LanguageInfo { + data = typeof data === 'object' ? data : {}; + let result = new LanguageInfo(); + result.init(data); + return result; + } + + toJSON(data?: any) { + data = typeof data === 'object' ? data : {}; + data['cultureName'] = this.cultureName; + data['uiCultureName'] = this.uiCultureName; + data['displayName'] = this.displayName; + data['flagIcon'] = this.flagIcon; + return data; + } } export interface ILanguageInfo { - cultureName: string | undefined; - uiCultureName: string | undefined; - displayName: string | undefined; - flagIcon: string | undefined; + cultureName: string | undefined; + uiCultureName: string | undefined; + displayName: string | undefined; + flagIcon: string | undefined; } export class LocalizableStringDto implements ILocalizableStringDto { - name!: string | undefined; - resource!: string | undefined; + name!: string | undefined; + resource!: string | undefined; - constructor(data?: ILocalizableStringDto) { - if (data) { - for (var property in data) { - if (data.hasOwnProperty(property)) - (this)[property] = (data)[property]; - } - } + constructor(data?: ILocalizableStringDto) { + if (data) { + for (var property in data) { + if (data.hasOwnProperty(property)) (this)[property] = (data)[property]; + } } + } - init(_data?: any) { - if (_data) { - this.name = _data["name"]; - this.resource = _data["resource"]; - } + init(_data?: any) { + if (_data) { + this.name = _data['name']; + this.resource = _data['resource']; } + } - static fromJS(data: any): LocalizableStringDto { - data = typeof data === 'object' ? data : {}; - let result = new LocalizableStringDto(); - result.init(data); - return result; - } + static fromJS(data: any): LocalizableStringDto { + data = typeof data === 'object' ? data : {}; + let result = new LocalizableStringDto(); + result.init(data); + return result; + } - toJSON(data?: any) { - data = typeof data === 'object' ? data : {}; - data["name"] = this.name; - data["resource"] = this.resource; - return data; - } + toJSON(data?: any) { + data = typeof data === 'object' ? data : {}; + data['name'] = this.name; + data['resource'] = this.resource; + return data; + } } export interface ILocalizableStringDto { - name: string | undefined; - resource: string | undefined; + name: string | undefined; + resource: string | undefined; } export class LockUserInput implements ILockUserInput { - userId!: string; - locked!: boolean; + userId!: string; + locked!: boolean; - constructor(data?: ILockUserInput) { - if (data) { - for (var property in data) { - if (data.hasOwnProperty(property)) - (this)[property] = (data)[property]; - } - } + constructor(data?: ILockUserInput) { + 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.locked = _data["locked"]; - } + init(_data?: any) { + if (_data) { + this.userId = _data['userId']; + this.locked = _data['locked']; } + } - static fromJS(data: any): LockUserInput { - data = typeof data === 'object' ? data : {}; - let result = new LockUserInput(); - result.init(data); - return result; - } + static fromJS(data: any): LockUserInput { + data = typeof data === 'object' ? data : {}; + let result = new LockUserInput(); + result.init(data); + return result; + } - toJSON(data?: any) { - data = typeof data === 'object' ? data : {}; - data["userId"] = this.userId; - data["locked"] = this.locked; - return data; - } + toJSON(data?: any) { + data = typeof data === 'object' ? data : {}; + data['userId'] = this.userId; + data['locked'] = this.locked; + return data; + } } export interface ILockUserInput { - userId: string; - locked: boolean; + userId: string; + locked: boolean; } export class LoginInput implements ILoginInput { - name!: string | undefined; - password!: string | undefined; + name!: string | undefined; + password!: string | undefined; - constructor(data?: ILoginInput) { - if (data) { - for (var property in data) { - if (data.hasOwnProperty(property)) - (this)[property] = (data)[property]; - } - } + constructor(data?: ILoginInput) { + if (data) { + for (var property in data) { + if (data.hasOwnProperty(property)) (this)[property] = (data)[property]; + } } + } - init(_data?: any) { - if (_data) { - this.name = _data["name"]; - this.password = _data["password"]; - } + init(_data?: any) { + if (_data) { + this.name = _data['name']; + this.password = _data['password']; } + } - static fromJS(data: any): LoginInput { - data = typeof data === 'object' ? data : {}; - let result = new LoginInput(); - result.init(data); - return result; - } + static fromJS(data: any): LoginInput { + data = typeof data === 'object' ? data : {}; + let result = new LoginInput(); + result.init(data); + return result; + } - toJSON(data?: any) { - data = typeof data === 'object' ? data : {}; - data["name"] = this.name; - data["password"] = this.password; - return data; - } + toJSON(data?: any) { + data = typeof data === 'object' ? data : {}; + data['name'] = this.name; + data['password'] = this.password; + return data; + } } export interface ILoginInput { - name: string | undefined; - password: string | undefined; + name: string | undefined; + password: string | undefined; } export class LoginOutput implements ILoginOutput { - id!: string; - name!: string | undefined; - userName!: string | undefined; - token!: string | undefined; - roles!: string[] | undefined; - - constructor(data?: ILoginOutput) { - 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.userName = _data["userName"]; - this.token = _data["token"]; - if (Array.isArray(_data["roles"])) { - this.roles = [] as any; - for (let item of _data["roles"]) - this.roles!.push(item); - } - } - } - - static fromJS(data: any): LoginOutput { - data = typeof data === 'object' ? data : {}; - let result = new LoginOutput(); - result.init(data); - return result; - } - - toJSON(data?: any) { - data = typeof data === 'object' ? data : {}; - data["id"] = this.id; - data["name"] = this.name; - data["userName"] = this.userName; - data["token"] = this.token; - if (Array.isArray(this.roles)) { - data["roles"] = []; - for (let item of this.roles) - data["roles"].push(item); - } - return data; - } + id!: string; + name!: string | undefined; + userName!: string | undefined; + token!: string | undefined; + roles!: string[] | undefined; + + constructor(data?: ILoginOutput) { + 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.userName = _data['userName']; + this.token = _data['token']; + if (Array.isArray(_data['roles'])) { + this.roles = [] as any; + for (let item of _data['roles']) this.roles!.push(item); + } + } + } + + static fromJS(data: any): LoginOutput { + data = typeof data === 'object' ? data : {}; + let result = new LoginOutput(); + result.init(data); + return result; + } + + toJSON(data?: any) { + data = typeof data === 'object' ? data : {}; + data['id'] = this.id; + data['name'] = this.name; + data['userName'] = this.userName; + data['token'] = this.token; + if (Array.isArray(this.roles)) { + data['roles'] = []; + for (let item of this.roles) data['roles'].push(item); + } + return data; + } } export interface ILoginOutput { - id: string; - name: string | undefined; - userName: string | undefined; - token: string | undefined; - roles: string[] | undefined; + id: string; + name: string | undefined; + userName: string | undefined; + token: string | undefined; + roles: string[] | undefined; } export enum LoginResultType { - Success = 1, - InvalidUserNameOrPassword = 2, - NotAllowed = 3, - LockedOut = 4, - RequiresTwoFactor = 5, + Success = 1, + InvalidUserNameOrPassword = 2, + NotAllowed = 3, + LockedOut = 4, + RequiresTwoFactor = 5, } export enum MessageLevel { - Warning = 10, - Information = 20, - Error = 30, + Warning = 10, + Information = 20, + Error = 30, } export enum MessageType { - BroadCast = 10, - Common = 20, + BroadCast = 10, + Common = 20, } export class MethodParameterApiDescriptionModel implements IMethodParameterApiDescriptionModel { - name!: string | undefined; - typeAsString!: string | undefined; - type!: string | undefined; - typeSimple!: string | undefined; - isOptional!: boolean; - defaultValue!: any | undefined; - - constructor(data?: IMethodParameterApiDescriptionModel) { - if (data) { - for (var property in data) { - if (data.hasOwnProperty(property)) - (this)[property] = (data)[property]; - } - } - } - - init(_data?: any) { - if (_data) { - this.name = _data["name"]; - this.typeAsString = _data["typeAsString"]; - this.type = _data["type"]; - this.typeSimple = _data["typeSimple"]; - this.isOptional = _data["isOptional"]; - this.defaultValue = _data["defaultValue"]; - } - } - - static fromJS(data: any): MethodParameterApiDescriptionModel { - data = typeof data === 'object' ? data : {}; - let result = new MethodParameterApiDescriptionModel(); - result.init(data); - return result; - } - - toJSON(data?: any) { - data = typeof data === 'object' ? data : {}; - data["name"] = this.name; - data["typeAsString"] = this.typeAsString; - data["type"] = this.type; - data["typeSimple"] = this.typeSimple; - data["isOptional"] = this.isOptional; - data["defaultValue"] = this.defaultValue; - return data; - } + name!: string | undefined; + typeAsString!: string | undefined; + type!: string | undefined; + typeSimple!: string | undefined; + isOptional!: boolean; + defaultValue!: any | undefined; + + constructor(data?: IMethodParameterApiDescriptionModel) { + if (data) { + for (var property in data) { + if (data.hasOwnProperty(property)) (this)[property] = (data)[property]; + } + } + } + + init(_data?: any) { + if (_data) { + this.name = _data['name']; + this.typeAsString = _data['typeAsString']; + this.type = _data['type']; + this.typeSimple = _data['typeSimple']; + this.isOptional = _data['isOptional']; + this.defaultValue = _data['defaultValue']; + } + } + + static fromJS(data: any): MethodParameterApiDescriptionModel { + data = typeof data === 'object' ? data : {}; + let result = new MethodParameterApiDescriptionModel(); + result.init(data); + return result; + } + + toJSON(data?: any) { + data = typeof data === 'object' ? data : {}; + data['name'] = this.name; + data['typeAsString'] = this.typeAsString; + data['type'] = this.type; + data['typeSimple'] = this.typeSimple; + data['isOptional'] = this.isOptional; + data['defaultValue'] = this.defaultValue; + return data; + } } export interface IMethodParameterApiDescriptionModel { - name: string | undefined; - typeAsString: string | undefined; - type: string | undefined; - typeSimple: string | undefined; - isOptional: boolean; - defaultValue: any | undefined; + name: string | undefined; + typeAsString: string | undefined; + type: string | undefined; + typeSimple: string | undefined; + isOptional: boolean; + defaultValue: any | undefined; } export class ModuleApiDescriptionModel implements IModuleApiDescriptionModel { - rootPath!: string | undefined; - remoteServiceName!: string | undefined; - controllers!: { [key: string]: ControllerApiDescriptionModel; } | undefined; - - constructor(data?: IModuleApiDescriptionModel) { - if (data) { - for (var property in data) { - if (data.hasOwnProperty(property)) - (this)[property] = (data)[property]; - } - } - } - - init(_data?: any) { - if (_data) { - this.rootPath = _data["rootPath"]; - this.remoteServiceName = _data["remoteServiceName"]; - if (_data["controllers"]) { - this.controllers = {} as any; - for (let key in _data["controllers"]) { - if (_data["controllers"].hasOwnProperty(key)) - (this.controllers)![key] = _data["controllers"][key] ? ControllerApiDescriptionModel.fromJS(_data["controllers"][key]) : new ControllerApiDescriptionModel(); - } - } - } - } - - static fromJS(data: any): ModuleApiDescriptionModel { - data = typeof data === 'object' ? data : {}; - let result = new ModuleApiDescriptionModel(); - result.init(data); - return result; - } - - toJSON(data?: any) { - data = typeof data === 'object' ? data : {}; - data["rootPath"] = this.rootPath; - data["remoteServiceName"] = this.remoteServiceName; - if (this.controllers) { - data["controllers"] = {}; - for (let key in this.controllers) { - if (this.controllers.hasOwnProperty(key)) - (data["controllers"])[key] = this.controllers[key] ? this.controllers[key].toJSON() : undefined; - } - } - return data; - } + rootPath!: string | undefined; + remoteServiceName!: string | undefined; + controllers!: { [key: string]: ControllerApiDescriptionModel } | undefined; + + constructor(data?: IModuleApiDescriptionModel) { + if (data) { + for (var property in data) { + if (data.hasOwnProperty(property)) (this)[property] = (data)[property]; + } + } + } + + init(_data?: any) { + if (_data) { + this.rootPath = _data['rootPath']; + this.remoteServiceName = _data['remoteServiceName']; + if (_data['controllers']) { + this.controllers = {} as any; + for (let key in _data['controllers']) { + if (_data['controllers'].hasOwnProperty(key)) + (this.controllers)![key] = _data['controllers'][key] + ? ControllerApiDescriptionModel.fromJS(_data['controllers'][key]) + : new ControllerApiDescriptionModel(); + } + } + } + } + + static fromJS(data: any): ModuleApiDescriptionModel { + data = typeof data === 'object' ? data : {}; + let result = new ModuleApiDescriptionModel(); + result.init(data); + return result; + } + + toJSON(data?: any) { + data = typeof data === 'object' ? data : {}; + data['rootPath'] = this.rootPath; + data['remoteServiceName'] = this.remoteServiceName; + if (this.controllers) { + data['controllers'] = {}; + for (let key in this.controllers) { + if (this.controllers.hasOwnProperty(key)) + (data['controllers'])[key] = this.controllers[key] + ? this.controllers[key].toJSON() + : undefined; + } + } + return data; + } } export interface IModuleApiDescriptionModel { - rootPath: string | undefined; - remoteServiceName: string | undefined; - controllers: { [key: string]: ControllerApiDescriptionModel; } | undefined; + rootPath: string | undefined; + remoteServiceName: string | undefined; + controllers: { [key: string]: ControllerApiDescriptionModel } | undefined; } export class ModuleExtensionDto implements IModuleExtensionDto { - entities!: { [key: string]: EntityExtensionDto; } | undefined; - configuration!: { [key: string]: any; } | undefined; - - constructor(data?: IModuleExtensionDto) { - if (data) { - for (var property in data) { - if (data.hasOwnProperty(property)) - (this)[property] = (data)[property]; - } - } - } - - init(_data?: any) { - if (_data) { - if (_data["entities"]) { - this.entities = {} as any; - for (let key in _data["entities"]) { - if (_data["entities"].hasOwnProperty(key)) - (this.entities)![key] = _data["entities"][key] ? EntityExtensionDto.fromJS(_data["entities"][key]) : new EntityExtensionDto(); - } - } - 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): ModuleExtensionDto { - data = typeof data === 'object' ? data : {}; - let result = new ModuleExtensionDto(); - result.init(data); - return result; - } - - toJSON(data?: any) { - data = typeof data === 'object' ? data : {}; - if (this.entities) { - data["entities"] = {}; - for (let key in this.entities) { - if (this.entities.hasOwnProperty(key)) - (data["entities"])[key] = this.entities[key] ? this.entities[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; - } + entities!: { [key: string]: EntityExtensionDto } | undefined; + configuration!: { [key: string]: any } | undefined; + + constructor(data?: IModuleExtensionDto) { + if (data) { + for (var property in data) { + if (data.hasOwnProperty(property)) (this)[property] = (data)[property]; + } + } + } + + init(_data?: any) { + if (_data) { + if (_data['entities']) { + this.entities = {} as any; + for (let key in _data['entities']) { + if (_data['entities'].hasOwnProperty(key)) + (this.entities)![key] = _data['entities'][key] + ? EntityExtensionDto.fromJS(_data['entities'][key]) + : new EntityExtensionDto(); + } + } + 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): ModuleExtensionDto { + data = typeof data === 'object' ? data : {}; + let result = new ModuleExtensionDto(); + result.init(data); + return result; + } + + toJSON(data?: any) { + data = typeof data === 'object' ? data : {}; + if (this.entities) { + data['entities'] = {}; + for (let key in this.entities) { + if (this.entities.hasOwnProperty(key)) + (data['entities'])[key] = this.entities[key] + ? this.entities[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 IModuleExtensionDto { - entities: { [key: string]: EntityExtensionDto; } | undefined; - configuration: { [key: string]: any; } | undefined; + entities: { [key: string]: EntityExtensionDto } | undefined; + configuration: { [key: string]: any } | undefined; } export class MultiTenancyInfoDto implements IMultiTenancyInfoDto { - isEnabled!: boolean; + isEnabled!: boolean; - constructor(data?: IMultiTenancyInfoDto) { - if (data) { - for (var property in data) { - if (data.hasOwnProperty(property)) - (this)[property] = (data)[property]; - } - } + constructor(data?: IMultiTenancyInfoDto) { + if (data) { + for (var property in data) { + if (data.hasOwnProperty(property)) (this)[property] = (data)[property]; + } } + } - init(_data?: any) { - if (_data) { - this.isEnabled = _data["isEnabled"]; - } + init(_data?: any) { + if (_data) { + this.isEnabled = _data['isEnabled']; } + } - static fromJS(data: any): MultiTenancyInfoDto { - data = typeof data === 'object' ? data : {}; - let result = new MultiTenancyInfoDto(); - result.init(data); - return result; - } + static fromJS(data: any): MultiTenancyInfoDto { + data = typeof data === 'object' ? data : {}; + let result = new MultiTenancyInfoDto(); + result.init(data); + return result; + } - toJSON(data?: any) { - data = typeof data === 'object' ? data : {}; - data["isEnabled"] = this.isEnabled; - return data; - } + toJSON(data?: any) { + data = typeof data === 'object' ? data : {}; + data['isEnabled'] = this.isEnabled; + return data; + } } export interface IMultiTenancyInfoDto { - isEnabled: boolean; + isEnabled: boolean; } export class NameValue implements INameValue { - name!: string | undefined; - value!: string | undefined; + name!: string | undefined; + value!: string | undefined; - constructor(data?: INameValue) { - if (data) { - for (var property in data) { - if (data.hasOwnProperty(property)) - (this)[property] = (data)[property]; - } - } + constructor(data?: INameValue) { + if (data) { + for (var property in data) { + if (data.hasOwnProperty(property)) (this)[property] = (data)[property]; + } } + } - init(_data?: any) { - if (_data) { - this.name = _data["name"]; - this.value = _data["value"]; - } + init(_data?: any) { + if (_data) { + this.name = _data['name']; + this.value = _data['value']; } + } - static fromJS(data: any): NameValue { - data = typeof data === 'object' ? data : {}; - let result = new NameValue(); - result.init(data); - return result; - } + static fromJS(data: any): NameValue { + data = typeof data === 'object' ? data : {}; + let result = new NameValue(); + result.init(data); + return result; + } - toJSON(data?: any) { - data = typeof data === 'object' ? data : {}; - data["name"] = this.name; - data["value"] = this.value; - return data; - } + toJSON(data?: any) { + data = typeof data === 'object' ? data : {}; + data['name'] = this.name; + data['value'] = this.value; + return data; + } } export interface INameValue { - name: string | undefined; - value: string | undefined; + name: string | undefined; + value: string | undefined; } export class ObjectExtensionsDto implements IObjectExtensionsDto { - modules!: { [key: string]: ModuleExtensionDto; } | undefined; - enums!: { [key: string]: ExtensionEnumDto; } | undefined; - - constructor(data?: IObjectExtensionsDto) { - if (data) { - for (var property in data) { - if (data.hasOwnProperty(property)) - (this)[property] = (data)[property]; - } - } - } - - 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] ? ModuleExtensionDto.fromJS(_data["modules"][key]) : new ModuleExtensionDto(); - } - } - if (_data["enums"]) { - this.enums = {} as any; - for (let key in _data["enums"]) { - if (_data["enums"].hasOwnProperty(key)) - (this.enums)![key] = _data["enums"][key] ? ExtensionEnumDto.fromJS(_data["enums"][key]) : new ExtensionEnumDto(); - } - } - } - } - - static fromJS(data: any): ObjectExtensionsDto { - data = typeof data === 'object' ? data : {}; - let result = new ObjectExtensionsDto(); - 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.enums) { - data["enums"] = {}; - for (let key in this.enums) { - if (this.enums.hasOwnProperty(key)) - (data["enums"])[key] = this.enums[key] ? this.enums[key].toJSON() : undefined; - } - } - return data; - } + modules!: { [key: string]: ModuleExtensionDto } | undefined; + enums!: { [key: string]: ExtensionEnumDto } | undefined; + + constructor(data?: IObjectExtensionsDto) { + if (data) { + for (var property in data) { + if (data.hasOwnProperty(property)) (this)[property] = (data)[property]; + } + } + } + + 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] + ? ModuleExtensionDto.fromJS(_data['modules'][key]) + : new ModuleExtensionDto(); + } + } + if (_data['enums']) { + this.enums = {} as any; + for (let key in _data['enums']) { + if (_data['enums'].hasOwnProperty(key)) + (this.enums)![key] = _data['enums'][key] + ? ExtensionEnumDto.fromJS(_data['enums'][key]) + : new ExtensionEnumDto(); + } + } + } + } + + static fromJS(data: any): ObjectExtensionsDto { + data = typeof data === 'object' ? data : {}; + let result = new ObjectExtensionsDto(); + 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.enums) { + data['enums'] = {}; + for (let key in this.enums) { + if (this.enums.hasOwnProperty(key)) + (data['enums'])[key] = this.enums[key] ? this.enums[key].toJSON() : undefined; + } + } + return data; + } } export interface IObjectExtensionsDto { - modules: { [key: string]: ModuleExtensionDto; } | undefined; - enums: { [key: string]: ExtensionEnumDto; } | undefined; + modules: { [key: string]: ModuleExtensionDto } | undefined; + enums: { [key: string]: ExtensionEnumDto } | undefined; } export class PagingAuditLogListInput implements IPagingAuditLogListInput { - pageIndex!: number; - pageSize!: number; - readonly skipCount!: number; - sorting!: string | undefined; - startTime!: dayjs.Dayjs | undefined; - endTime!: dayjs.Dayjs | undefined; - httpMethod!: string | undefined; - url!: string | undefined; - userName!: string | undefined; - applicationName!: string | undefined; - correlationId!: string | undefined; - maxExecutionDuration!: number | undefined; - minExecutionDuration!: number | undefined; - hasException!: boolean | undefined; - httpStatusCode!: HttpStatusCode; - - constructor(data?: IPagingAuditLogListInput) { - if (data) { - for (var property in data) { - if (data.hasOwnProperty(property)) - (this)[property] = (data)[property]; - } - } - } - - init(_data?: any) { - if (_data) { - this.pageIndex = _data["pageIndex"]; - this.pageSize = _data["pageSize"]; - (this).skipCount = _data["skipCount"]; - this.sorting = _data["sorting"]; - this.startTime = _data["startTime"] ? dayjs(_data["startTime"].toString()) : undefined; - this.endTime = _data["endTime"] ? dayjs(_data["endTime"].toString()) : undefined; - this.httpMethod = _data["httpMethod"]; - this.url = _data["url"]; - this.userName = _data["userName"]; - this.applicationName = _data["applicationName"]; - this.correlationId = _data["correlationId"]; - this.maxExecutionDuration = _data["maxExecutionDuration"]; - this.minExecutionDuration = _data["minExecutionDuration"]; - this.hasException = _data["hasException"]; - this.httpStatusCode = _data["httpStatusCode"]; - } - } - - static fromJS(data: any): PagingAuditLogListInput { - data = typeof data === 'object' ? data : {}; - let result = new PagingAuditLogListInput(); - result.init(data); - return result; - } - - toJSON(data?: any) { - data = typeof data === 'object' ? data : {}; - data["pageIndex"] = this.pageIndex; - data["pageSize"] = this.pageSize; - data["skipCount"] = this.skipCount; - data["sorting"] = this.sorting; - data["startTime"] = this.startTime ? this.startTime.toISOString() : undefined; - data["endTime"] = this.endTime ? this.endTime.toISOString() : undefined; - data["httpMethod"] = this.httpMethod; - data["url"] = this.url; - data["userName"] = this.userName; - data["applicationName"] = this.applicationName; - data["correlationId"] = this.correlationId; - data["maxExecutionDuration"] = this.maxExecutionDuration; - data["minExecutionDuration"] = this.minExecutionDuration; - data["hasException"] = this.hasException; - data["httpStatusCode"] = this.httpStatusCode; - return data; - } + pageIndex!: number; + pageSize!: number; + readonly skipCount!: number; + sorting!: string | undefined; + startTime!: dayjs.Dayjs | undefined; + endTime!: dayjs.Dayjs | undefined; + httpMethod!: string | undefined; + url!: string | undefined; + userName!: string | undefined; + applicationName!: string | undefined; + correlationId!: string | undefined; + maxExecutionDuration!: number | undefined; + minExecutionDuration!: number | undefined; + hasException!: boolean | undefined; + httpStatusCode!: HttpStatusCode; + + constructor(data?: IPagingAuditLogListInput) { + if (data) { + for (var property in data) { + if (data.hasOwnProperty(property)) (this)[property] = (data)[property]; + } + } + } + + init(_data?: any) { + if (_data) { + this.pageIndex = _data['pageIndex']; + this.pageSize = _data['pageSize']; + (this).skipCount = _data['skipCount']; + this.sorting = _data['sorting']; + this.startTime = _data['startTime'] ? dayjs(_data['startTime'].toString()) : undefined; + this.endTime = _data['endTime'] ? dayjs(_data['endTime'].toString()) : undefined; + this.httpMethod = _data['httpMethod']; + this.url = _data['url']; + this.userName = _data['userName']; + this.applicationName = _data['applicationName']; + this.correlationId = _data['correlationId']; + this.maxExecutionDuration = _data['maxExecutionDuration']; + this.minExecutionDuration = _data['minExecutionDuration']; + this.hasException = _data['hasException']; + this.httpStatusCode = _data['httpStatusCode']; + } + } + + static fromJS(data: any): PagingAuditLogListInput { + data = typeof data === 'object' ? data : {}; + let result = new PagingAuditLogListInput(); + result.init(data); + return result; + } + + toJSON(data?: any) { + data = typeof data === 'object' ? data : {}; + data['pageIndex'] = this.pageIndex; + data['pageSize'] = this.pageSize; + data['skipCount'] = this.skipCount; + data['sorting'] = this.sorting; + data['startTime'] = this.startTime ? this.startTime.toISOString() : undefined; + data['endTime'] = this.endTime ? this.endTime.toISOString() : undefined; + data['httpMethod'] = this.httpMethod; + data['url'] = this.url; + data['userName'] = this.userName; + data['applicationName'] = this.applicationName; + data['correlationId'] = this.correlationId; + data['maxExecutionDuration'] = this.maxExecutionDuration; + data['minExecutionDuration'] = this.minExecutionDuration; + data['hasException'] = this.hasException; + data['httpStatusCode'] = this.httpStatusCode; + return data; + } } export interface IPagingAuditLogListInput { - pageIndex: number; - pageSize: number; - skipCount: number; - sorting: string | undefined; - startTime: dayjs.Dayjs | undefined; - endTime: dayjs.Dayjs | undefined; - httpMethod: string | undefined; - url: string | undefined; - userName: string | undefined; - applicationName: string | undefined; - correlationId: string | undefined; - maxExecutionDuration: number | undefined; - minExecutionDuration: number | undefined; - hasException: boolean | undefined; - httpStatusCode: HttpStatusCode; + pageIndex: number; + pageSize: number; + skipCount: number; + sorting: string | undefined; + startTime: dayjs.Dayjs | undefined; + endTime: dayjs.Dayjs | undefined; + httpMethod: string | undefined; + url: string | undefined; + userName: string | undefined; + applicationName: string | undefined; + correlationId: string | undefined; + maxExecutionDuration: number | undefined; + minExecutionDuration: number | undefined; + hasException: boolean | undefined; + httpStatusCode: HttpStatusCode; } export class PagingDataDictionaryDetailInput implements IPagingDataDictionaryDetailInput { - pageIndex!: number; - pageSize!: number; - readonly skipCount!: number; - dataDictionaryId!: string; - filter!: string | undefined; - - constructor(data?: IPagingDataDictionaryDetailInput) { - if (data) { - for (var property in data) { - if (data.hasOwnProperty(property)) - (this)[property] = (data)[property]; - } - } - } - - init(_data?: any) { - if (_data) { - this.pageIndex = _data["pageIndex"]; - this.pageSize = _data["pageSize"]; - (this).skipCount = _data["skipCount"]; - this.dataDictionaryId = _data["dataDictionaryId"]; - this.filter = _data["filter"]; - } - } - - static fromJS(data: any): PagingDataDictionaryDetailInput { - data = typeof data === 'object' ? data : {}; - let result = new PagingDataDictionaryDetailInput(); - result.init(data); - return result; - } - - toJSON(data?: any) { - data = typeof data === 'object' ? data : {}; - data["pageIndex"] = this.pageIndex; - data["pageSize"] = this.pageSize; - data["skipCount"] = this.skipCount; - data["dataDictionaryId"] = this.dataDictionaryId; - data["filter"] = this.filter; - return data; - } + pageIndex!: number; + pageSize!: number; + readonly skipCount!: number; + dataDictionaryId!: string; + filter!: string | undefined; + + constructor(data?: IPagingDataDictionaryDetailInput) { + if (data) { + for (var property in data) { + if (data.hasOwnProperty(property)) (this)[property] = (data)[property]; + } + } + } + + init(_data?: any) { + if (_data) { + this.pageIndex = _data['pageIndex']; + this.pageSize = _data['pageSize']; + (this).skipCount = _data['skipCount']; + this.dataDictionaryId = _data['dataDictionaryId']; + this.filter = _data['filter']; + } + } + + static fromJS(data: any): PagingDataDictionaryDetailInput { + data = typeof data === 'object' ? data : {}; + let result = new PagingDataDictionaryDetailInput(); + result.init(data); + return result; + } + + toJSON(data?: any) { + data = typeof data === 'object' ? data : {}; + data['pageIndex'] = this.pageIndex; + data['pageSize'] = this.pageSize; + data['skipCount'] = this.skipCount; + data['dataDictionaryId'] = this.dataDictionaryId; + data['filter'] = this.filter; + return data; + } } export interface IPagingDataDictionaryDetailInput { - pageIndex: number; - pageSize: number; - skipCount: number; - dataDictionaryId: string; - filter: string | undefined; + pageIndex: number; + pageSize: number; + skipCount: number; + dataDictionaryId: string; + filter: string | undefined; } export class PagingDataDictionaryDetailOutput implements IPagingDataDictionaryDetailOutput { - id!: string; - dataDictionaryId!: string; - code!: string | undefined; - order!: number; - displayText!: string | undefined; - description!: string | undefined; - isEnabled!: boolean; - - constructor(data?: IPagingDataDictionaryDetailOutput) { - 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.dataDictionaryId = _data["dataDictionaryId"]; - this.code = _data["code"]; - this.order = _data["order"]; - this.displayText = _data["displayText"]; - this.description = _data["description"]; - this.isEnabled = _data["isEnabled"]; - } - } - - static fromJS(data: any): PagingDataDictionaryDetailOutput { - data = typeof data === 'object' ? data : {}; - let result = new PagingDataDictionaryDetailOutput(); - result.init(data); - return result; - } - - toJSON(data?: any) { - data = typeof data === 'object' ? data : {}; - data["id"] = this.id; - data["dataDictionaryId"] = this.dataDictionaryId; - data["code"] = this.code; - data["order"] = this.order; - data["displayText"] = this.displayText; - data["description"] = this.description; - data["isEnabled"] = this.isEnabled; - return data; - } + id!: string; + dataDictionaryId!: string; + code!: string | undefined; + order!: number; + displayText!: string | undefined; + description!: string | undefined; + isEnabled!: boolean; + + constructor(data?: IPagingDataDictionaryDetailOutput) { + 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.dataDictionaryId = _data['dataDictionaryId']; + this.code = _data['code']; + this.order = _data['order']; + this.displayText = _data['displayText']; + this.description = _data['description']; + this.isEnabled = _data['isEnabled']; + } + } + + static fromJS(data: any): PagingDataDictionaryDetailOutput { + data = typeof data === 'object' ? data : {}; + let result = new PagingDataDictionaryDetailOutput(); + result.init(data); + return result; + } + + toJSON(data?: any) { + data = typeof data === 'object' ? data : {}; + data['id'] = this.id; + data['dataDictionaryId'] = this.dataDictionaryId; + data['code'] = this.code; + data['order'] = this.order; + data['displayText'] = this.displayText; + data['description'] = this.description; + data['isEnabled'] = this.isEnabled; + return data; + } } export interface IPagingDataDictionaryDetailOutput { - id: string; - dataDictionaryId: string; - code: string | undefined; - order: number; - displayText: string | undefined; - description: string | undefined; - isEnabled: boolean; -} - -export class PagingDataDictionaryDetailOutputPagedResultDto implements IPagingDataDictionaryDetailOutputPagedResultDto { - items!: PagingDataDictionaryDetailOutput[] | undefined; - totalCount!: number; - - constructor(data?: IPagingDataDictionaryDetailOutputPagedResultDto) { - 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(PagingDataDictionaryDetailOutput.fromJS(item)); - } - this.totalCount = _data["totalCount"]; - } - } - - static fromJS(data: any): PagingDataDictionaryDetailOutputPagedResultDto { - data = typeof data === 'object' ? data : {}; - let result = new PagingDataDictionaryDetailOutputPagedResultDto(); - 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; - } + id: string; + dataDictionaryId: string; + code: string | undefined; + order: number; + displayText: string | undefined; + description: string | undefined; + isEnabled: boolean; +} + +export class PagingDataDictionaryDetailOutputPagedResultDto + implements IPagingDataDictionaryDetailOutputPagedResultDto +{ + items!: PagingDataDictionaryDetailOutput[] | undefined; + totalCount!: number; + + constructor(data?: IPagingDataDictionaryDetailOutputPagedResultDto) { + 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(PagingDataDictionaryDetailOutput.fromJS(item)); + } + this.totalCount = _data['totalCount']; + } + } + + static fromJS(data: any): PagingDataDictionaryDetailOutputPagedResultDto { + data = typeof data === 'object' ? data : {}; + let result = new PagingDataDictionaryDetailOutputPagedResultDto(); + 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 IPagingDataDictionaryDetailOutputPagedResultDto { - items: PagingDataDictionaryDetailOutput[] | undefined; - totalCount: number; + items: PagingDataDictionaryDetailOutput[] | undefined; + totalCount: number; } export class PagingDataDictionaryInput implements IPagingDataDictionaryInput { - pageIndex!: number; - pageSize!: number; - readonly skipCount!: number; - filter!: string | undefined; - - constructor(data?: IPagingDataDictionaryInput) { - if (data) { - for (var property in data) { - if (data.hasOwnProperty(property)) - (this)[property] = (data)[property]; - } - } - } - - init(_data?: any) { - if (_data) { - this.pageIndex = _data["pageIndex"]; - this.pageSize = _data["pageSize"]; - (this).skipCount = _data["skipCount"]; - this.filter = _data["filter"]; - } - } - - static fromJS(data: any): PagingDataDictionaryInput { - data = typeof data === 'object' ? data : {}; - let result = new PagingDataDictionaryInput(); - result.init(data); - return result; - } - - toJSON(data?: any) { - data = typeof data === 'object' ? data : {}; - data["pageIndex"] = this.pageIndex; - data["pageSize"] = this.pageSize; - data["skipCount"] = this.skipCount; - data["filter"] = this.filter; - return data; - } + pageIndex!: number; + pageSize!: number; + readonly skipCount!: number; + filter!: string | undefined; + + constructor(data?: IPagingDataDictionaryInput) { + if (data) { + for (var property in data) { + if (data.hasOwnProperty(property)) (this)[property] = (data)[property]; + } + } + } + + init(_data?: any) { + if (_data) { + this.pageIndex = _data['pageIndex']; + this.pageSize = _data['pageSize']; + (this).skipCount = _data['skipCount']; + this.filter = _data['filter']; + } + } + + static fromJS(data: any): PagingDataDictionaryInput { + data = typeof data === 'object' ? data : {}; + let result = new PagingDataDictionaryInput(); + result.init(data); + return result; + } + + toJSON(data?: any) { + data = typeof data === 'object' ? data : {}; + data['pageIndex'] = this.pageIndex; + data['pageSize'] = this.pageSize; + data['skipCount'] = this.skipCount; + data['filter'] = this.filter; + return data; + } } export interface IPagingDataDictionaryInput { - pageIndex: number; - pageSize: number; - skipCount: number; - filter: string | undefined; + pageIndex: number; + pageSize: number; + skipCount: number; + filter: string | undefined; } export class PagingDataDictionaryOutput implements IPagingDataDictionaryOutput { - id!: string; - code!: string | undefined; - displayText!: string | undefined; - description!: string | undefined; - - constructor(data?: IPagingDataDictionaryOutput) { - 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.code = _data["code"]; - this.displayText = _data["displayText"]; - this.description = _data["description"]; - } - } - - static fromJS(data: any): PagingDataDictionaryOutput { - data = typeof data === 'object' ? data : {}; - let result = new PagingDataDictionaryOutput(); - 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; - return data; - } + id!: string; + code!: string | undefined; + displayText!: string | undefined; + description!: string | undefined; + + constructor(data?: IPagingDataDictionaryOutput) { + 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.code = _data['code']; + this.displayText = _data['displayText']; + this.description = _data['description']; + } + } + + static fromJS(data: any): PagingDataDictionaryOutput { + data = typeof data === 'object' ? data : {}; + let result = new PagingDataDictionaryOutput(); + 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; + return data; + } } export interface IPagingDataDictionaryOutput { - id: string; - code: string | undefined; - displayText: string | undefined; - description: string | undefined; -} - -export class PagingDataDictionaryOutputPagedResultDto implements IPagingDataDictionaryOutputPagedResultDto { - items!: PagingDataDictionaryOutput[] | undefined; - totalCount!: number; - - constructor(data?: IPagingDataDictionaryOutputPagedResultDto) { - 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(PagingDataDictionaryOutput.fromJS(item)); - } - this.totalCount = _data["totalCount"]; - } - } - - static fromJS(data: any): PagingDataDictionaryOutputPagedResultDto { - data = typeof data === 'object' ? data : {}; - let result = new PagingDataDictionaryOutputPagedResultDto(); - 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; - } + id: string; + code: string | undefined; + displayText: string | undefined; + description: string | undefined; +} + +export class PagingDataDictionaryOutputPagedResultDto + implements IPagingDataDictionaryOutputPagedResultDto +{ + items!: PagingDataDictionaryOutput[] | undefined; + totalCount!: number; + + constructor(data?: IPagingDataDictionaryOutputPagedResultDto) { + 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(PagingDataDictionaryOutput.fromJS(item)); + } + this.totalCount = _data['totalCount']; + } + } + + static fromJS(data: any): PagingDataDictionaryOutputPagedResultDto { + data = typeof data === 'object' ? data : {}; + let result = new PagingDataDictionaryOutputPagedResultDto(); + 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 IPagingDataDictionaryOutputPagedResultDto { - items: PagingDataDictionaryOutput[] | undefined; - totalCount: number; + items: PagingDataDictionaryOutput[] | undefined; + totalCount: number; } export class PagingElasticSearchLogInput implements IPagingElasticSearchLogInput { - pageIndex!: number; - pageSize!: number; - readonly skipCount!: number; - filter!: string | undefined; - startCreationTime!: dayjs.Dayjs | undefined; - endCreationTime!: dayjs.Dayjs | undefined; - - constructor(data?: IPagingElasticSearchLogInput) { - if (data) { - for (var property in data) { - if (data.hasOwnProperty(property)) - (this)[property] = (data)[property]; - } - } - } - - init(_data?: any) { - if (_data) { - this.pageIndex = _data["pageIndex"]; - this.pageSize = _data["pageSize"]; - (this).skipCount = _data["skipCount"]; - this.filter = _data["filter"]; - this.startCreationTime = _data["startCreationTime"] ? dayjs(_data["startCreationTime"].toString()) : undefined; - this.endCreationTime = _data["endCreationTime"] ? dayjs(_data["endCreationTime"].toString()) : undefined; - } - } - - static fromJS(data: any): PagingElasticSearchLogInput { - data = typeof data === 'object' ? data : {}; - let result = new PagingElasticSearchLogInput(); - result.init(data); - return result; - } - - toJSON(data?: any) { - data = typeof data === 'object' ? data : {}; - data["pageIndex"] = this.pageIndex; - data["pageSize"] = this.pageSize; - data["skipCount"] = this.skipCount; - data["filter"] = this.filter; - data["startCreationTime"] = this.startCreationTime ? this.startCreationTime.toISOString() : undefined; - data["endCreationTime"] = this.endCreationTime ? this.endCreationTime.toISOString() : undefined; - return data; - } + pageIndex!: number; + pageSize!: number; + readonly skipCount!: number; + filter!: string | undefined; + startCreationTime!: dayjs.Dayjs | undefined; + endCreationTime!: dayjs.Dayjs | undefined; + + constructor(data?: IPagingElasticSearchLogInput) { + if (data) { + for (var property in data) { + if (data.hasOwnProperty(property)) (this)[property] = (data)[property]; + } + } + } + + init(_data?: any) { + if (_data) { + this.pageIndex = _data['pageIndex']; + this.pageSize = _data['pageSize']; + (this).skipCount = _data['skipCount']; + this.filter = _data['filter']; + this.startCreationTime = _data['startCreationTime'] + ? dayjs(_data['startCreationTime'].toString()) + : undefined; + this.endCreationTime = _data['endCreationTime'] + ? dayjs(_data['endCreationTime'].toString()) + : undefined; + } + } + + static fromJS(data: any): PagingElasticSearchLogInput { + data = typeof data === 'object' ? data : {}; + let result = new PagingElasticSearchLogInput(); + result.init(data); + return result; + } + + toJSON(data?: any) { + data = typeof data === 'object' ? data : {}; + data['pageIndex'] = this.pageIndex; + data['pageSize'] = this.pageSize; + data['skipCount'] = this.skipCount; + data['filter'] = this.filter; + data['startCreationTime'] = this.startCreationTime + ? this.startCreationTime.toISOString() + : undefined; + data['endCreationTime'] = this.endCreationTime + ? this.endCreationTime.toISOString() + : undefined; + return data; + } } export interface IPagingElasticSearchLogInput { - pageIndex: number; - pageSize: number; - skipCount: number; - filter: string | undefined; - startCreationTime: dayjs.Dayjs | undefined; - endCreationTime: dayjs.Dayjs | undefined; + pageIndex: number; + pageSize: number; + skipCount: number; + filter: string | undefined; + startCreationTime: dayjs.Dayjs | undefined; + endCreationTime: dayjs.Dayjs | undefined; } export class PagingElasticSearchLogOutput implements IPagingElasticSearchLogOutput { - level!: string | undefined; - message!: string | undefined; - creationTime!: dayjs.Dayjs; - - constructor(data?: IPagingElasticSearchLogOutput) { - if (data) { - for (var property in data) { - if (data.hasOwnProperty(property)) - (this)[property] = (data)[property]; - } - } - } - - init(_data?: any) { - if (_data) { - this.level = _data["level"]; - this.message = _data["message"]; - this.creationTime = _data["creationTime"] ? dayjs(_data["creationTime"].toString()) : undefined; - } - } - - static fromJS(data: any): PagingElasticSearchLogOutput { - data = typeof data === 'object' ? data : {}; - let result = new PagingElasticSearchLogOutput(); - result.init(data); - return result; - } - - toJSON(data?: any) { - data = typeof data === 'object' ? data : {}; - data["level"] = this.level; - data["message"] = this.message; - data["creationTime"] = this.creationTime ? this.creationTime.toISOString() : undefined; - return data; - } + level!: string | undefined; + message!: string | undefined; + creationTime!: dayjs.Dayjs; + + constructor(data?: IPagingElasticSearchLogOutput) { + if (data) { + for (var property in data) { + if (data.hasOwnProperty(property)) (this)[property] = (data)[property]; + } + } + } + + init(_data?: any) { + if (_data) { + this.level = _data['level']; + this.message = _data['message']; + this.creationTime = _data['creationTime'] + ? dayjs(_data['creationTime'].toString()) + : undefined; + } + } + + static fromJS(data: any): PagingElasticSearchLogOutput { + data = typeof data === 'object' ? data : {}; + let result = new PagingElasticSearchLogOutput(); + result.init(data); + return result; + } + + toJSON(data?: any) { + data = typeof data === 'object' ? data : {}; + data['level'] = this.level; + data['message'] = this.message; + data['creationTime'] = this.creationTime ? this.creationTime.toISOString() : undefined; + return data; + } } export interface IPagingElasticSearchLogOutput { - level: string | undefined; - message: string | undefined; - creationTime: dayjs.Dayjs; + level: string | undefined; + message: string | undefined; + creationTime: dayjs.Dayjs; } -export class PagingElasticSearchLogOutputCustomePagedResultDto implements IPagingElasticSearchLogOutputCustomePagedResultDto { - items!: PagingElasticSearchLogOutput[] | undefined; - totalCount!: number; +export class PagingElasticSearchLogOutputCustomPagedResultDto + implements IPagingElasticSearchLogOutputCustomPagedResultDto +{ + items!: PagingElasticSearchLogOutput[] | undefined; + totalCount!: number; - constructor(data?: IPagingElasticSearchLogOutputCustomePagedResultDto) { - if (data) { - for (var property in data) { - if (data.hasOwnProperty(property)) - (this)[property] = (data)[property]; - } - } + constructor(data?: IPagingElasticSearchLogOutputCustomPagedResultDto) { + 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(PagingElasticSearchLogOutput.fromJS(item)); - } - this.totalCount = _data["totalCount"]; - } + init(_data?: any) { + if (_data) { + if (Array.isArray(_data['items'])) { + this.items = [] as any; + for (let item of _data['items']) + this.items!.push(PagingElasticSearchLogOutput.fromJS(item)); + } + this.totalCount = _data['totalCount']; } + } - static fromJS(data: any): PagingElasticSearchLogOutputCustomePagedResultDto { - data = typeof data === 'object' ? data : {}; - let result = new PagingElasticSearchLogOutputCustomePagedResultDto(); - result.init(data); - return result; - } + static fromJS(data: any): PagingElasticSearchLogOutputCustomPagedResultDto { + data = typeof data === 'object' ? data : {}; + let result = new PagingElasticSearchLogOutputCustomPagedResultDto(); + 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; + 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 IPagingElasticSearchLogOutputCustomePagedResultDto { - items: PagingElasticSearchLogOutput[] | undefined; - totalCount: number; +export interface IPagingElasticSearchLogOutputCustomPagedResultDto { + items: PagingElasticSearchLogOutput[] | undefined; + totalCount: number; } export class PagingNotificationListInput implements IPagingNotificationListInput { - pageIndex!: number; - pageSize!: number; - readonly skipCount!: number; - - constructor(data?: IPagingNotificationListInput) { - if (data) { - for (var property in data) { - if (data.hasOwnProperty(property)) - (this)[property] = (data)[property]; - } - } - } - - init(_data?: any) { - if (_data) { - this.pageIndex = _data["pageIndex"]; - this.pageSize = _data["pageSize"]; - (this).skipCount = _data["skipCount"]; - } - } - - static fromJS(data: any): PagingNotificationListInput { - data = typeof data === 'object' ? data : {}; - let result = new PagingNotificationListInput(); - result.init(data); - return result; - } - - toJSON(data?: any) { - data = typeof data === 'object' ? data : {}; - data["pageIndex"] = this.pageIndex; - data["pageSize"] = this.pageSize; - data["skipCount"] = this.skipCount; - return data; - } + pageIndex!: number; + pageSize!: number; + readonly skipCount!: number; + + constructor(data?: IPagingNotificationListInput) { + if (data) { + for (var property in data) { + if (data.hasOwnProperty(property)) (this)[property] = (data)[property]; + } + } + } + + init(_data?: any) { + if (_data) { + this.pageIndex = _data['pageIndex']; + this.pageSize = _data['pageSize']; + (this).skipCount = _data['skipCount']; + } + } + + static fromJS(data: any): PagingNotificationListInput { + data = typeof data === 'object' ? data : {}; + let result = new PagingNotificationListInput(); + result.init(data); + return result; + } + + toJSON(data?: any) { + data = typeof data === 'object' ? data : {}; + data['pageIndex'] = this.pageIndex; + data['pageSize'] = this.pageSize; + data['skipCount'] = this.skipCount; + return data; + } } export interface IPagingNotificationListInput { - pageIndex: number; - pageSize: number; - skipCount: number; + pageIndex: number; + pageSize: number; + skipCount: number; } export class PagingNotificationListOutput implements IPagingNotificationListOutput { - id!: string; - title!: string | undefined; - content!: string | undefined; - messageType!: MessageType; - readonly messageTypeDescription!: string | undefined; - messageLevel!: MessageLevel; - readonly messageLevelDescription!: string | undefined; - senderId!: string; - creationTime!: dayjs.Dayjs; - read!: boolean; - - constructor(data?: IPagingNotificationListOutput) { - 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.title = _data["title"]; - this.content = _data["content"]; - this.messageType = _data["messageType"]; - (this).messageTypeDescription = _data["messageTypeDescription"]; - this.messageLevel = _data["messageLevel"]; - (this).messageLevelDescription = _data["messageLevelDescription"]; - this.senderId = _data["senderId"]; - this.creationTime = _data["creationTime"] ? dayjs(_data["creationTime"].toString()) : undefined; - this.read = _data["read"]; - } - } - - static fromJS(data: any): PagingNotificationListOutput { - data = typeof data === 'object' ? data : {}; - let result = new PagingNotificationListOutput(); - result.init(data); - return result; - } - - toJSON(data?: any) { - data = typeof data === 'object' ? data : {}; - data["id"] = this.id; - data["title"] = this.title; - data["content"] = this.content; - data["messageType"] = this.messageType; - data["messageTypeDescription"] = this.messageTypeDescription; - data["messageLevel"] = this.messageLevel; - data["messageLevelDescription"] = this.messageLevelDescription; - data["senderId"] = this.senderId; - data["creationTime"] = this.creationTime ? this.creationTime.toISOString() : undefined; - data["read"] = this.read; - return data; - } -} - -export interface IPagingNotificationListOutput { - id: string; - title: string | undefined; - content: string | undefined; - messageType: MessageType; - messageTypeDescription: string | undefined; - messageLevel: MessageLevel; - messageLevelDescription: string | undefined; - senderId: string; - creationTime: dayjs.Dayjs; - read: boolean; -} - -export class PagingNotificationListOutputPagedResultDto implements IPagingNotificationListOutputPagedResultDto { - items!: PagingNotificationListOutput[] | undefined; - totalCount!: number; - - constructor(data?: IPagingNotificationListOutputPagedResultDto) { - 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(PagingNotificationListOutput.fromJS(item)); - } - this.totalCount = _data["totalCount"]; - } - } - - static fromJS(data: any): PagingNotificationListOutputPagedResultDto { - data = typeof data === 'object' ? data : {}; - let result = new PagingNotificationListOutputPagedResultDto(); - 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; - } + id!: string; + title!: string | undefined; + content!: string | undefined; + messageType!: MessageType; + readonly messageTypeDescription!: string | undefined; + messageLevel!: MessageLevel; + readonly messageLevelDescription!: string | undefined; + senderId!: string; + creationTime!: dayjs.Dayjs; + read!: boolean; + + constructor(data?: IPagingNotificationListOutput) { + 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.title = _data['title']; + this.content = _data['content']; + this.messageType = _data['messageType']; + (this).messageTypeDescription = _data['messageTypeDescription']; + this.messageLevel = _data['messageLevel']; + (this).messageLevelDescription = _data['messageLevelDescription']; + this.senderId = _data['senderId']; + this.creationTime = _data['creationTime'] + ? dayjs(_data['creationTime'].toString()) + : undefined; + this.read = _data['read']; + } + } + + static fromJS(data: any): PagingNotificationListOutput { + data = typeof data === 'object' ? data : {}; + let result = new PagingNotificationListOutput(); + result.init(data); + return result; + } + + toJSON(data?: any) { + data = typeof data === 'object' ? data : {}; + data['id'] = this.id; + data['title'] = this.title; + data['content'] = this.content; + data['messageType'] = this.messageType; + data['messageTypeDescription'] = this.messageTypeDescription; + data['messageLevel'] = this.messageLevel; + data['messageLevelDescription'] = this.messageLevelDescription; + data['senderId'] = this.senderId; + data['creationTime'] = this.creationTime ? this.creationTime.toISOString() : undefined; + data['read'] = this.read; + return data; + } } -export interface IPagingNotificationListOutputPagedResultDto { - items: PagingNotificationListOutput[] | undefined; - totalCount: number; -} - -export class PagingRoleListInput implements IPagingRoleListInput { - pageIndex!: number; - pageSize!: number; - readonly skipCount!: number; - filter!: string | undefined; - - constructor(data?: IPagingRoleListInput) { - if (data) { - for (var property in data) { - if (data.hasOwnProperty(property)) - (this)[property] = (data)[property]; - } - } - } - - init(_data?: any) { - if (_data) { - this.pageIndex = _data["pageIndex"]; - this.pageSize = _data["pageSize"]; - (this).skipCount = _data["skipCount"]; - this.filter = _data["filter"]; - } - } +export interface IPagingNotificationListOutput { + id: string; + title: string | undefined; + content: string | undefined; + messageType: MessageType; + messageTypeDescription: string | undefined; + messageLevel: MessageLevel; + messageLevelDescription: string | undefined; + senderId: string; + creationTime: dayjs.Dayjs; + read: boolean; +} + +export class PagingNotificationListOutputPagedResultDto + implements IPagingNotificationListOutputPagedResultDto +{ + items!: PagingNotificationListOutput[] | undefined; + totalCount!: number; + + constructor(data?: IPagingNotificationListOutputPagedResultDto) { + 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(PagingNotificationListOutput.fromJS(item)); + } + this.totalCount = _data['totalCount']; + } + } + + static fromJS(data: any): PagingNotificationListOutputPagedResultDto { + data = typeof data === 'object' ? data : {}; + let result = new PagingNotificationListOutputPagedResultDto(); + 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; + } +} - static fromJS(data: any): PagingRoleListInput { - data = typeof data === 'object' ? data : {}; - let result = new PagingRoleListInput(); - result.init(data); - return result; - } +export interface IPagingNotificationListOutputPagedResultDto { + items: PagingNotificationListOutput[] | undefined; + totalCount: number; +} - toJSON(data?: any) { - data = typeof data === 'object' ? data : {}; - data["pageIndex"] = this.pageIndex; - data["pageSize"] = this.pageSize; - data["skipCount"] = this.skipCount; - data["filter"] = this.filter; - return data; - } +export class PagingRoleListInput implements IPagingRoleListInput { + pageIndex!: number; + pageSize!: number; + readonly skipCount!: number; + filter!: string | undefined; + + constructor(data?: IPagingRoleListInput) { + if (data) { + for (var property in data) { + if (data.hasOwnProperty(property)) (this)[property] = (data)[property]; + } + } + } + + init(_data?: any) { + if (_data) { + this.pageIndex = _data['pageIndex']; + this.pageSize = _data['pageSize']; + (this).skipCount = _data['skipCount']; + this.filter = _data['filter']; + } + } + + static fromJS(data: any): PagingRoleListInput { + data = typeof data === 'object' ? data : {}; + let result = new PagingRoleListInput(); + result.init(data); + return result; + } + + toJSON(data?: any) { + data = typeof data === 'object' ? data : {}; + data['pageIndex'] = this.pageIndex; + data['pageSize'] = this.pageSize; + data['skipCount'] = this.skipCount; + data['filter'] = this.filter; + return data; + } } export interface IPagingRoleListInput { - pageIndex: number; - pageSize: number; - skipCount: number; - filter: string | undefined; + pageIndex: number; + pageSize: number; + skipCount: number; + filter: string | undefined; } export class PagingTenantInput implements IPagingTenantInput { - pageIndex!: number; - pageSize!: number; - readonly skipCount!: number; - filter!: string | undefined; - - constructor(data?: IPagingTenantInput) { - if (data) { - for (var property in data) { - if (data.hasOwnProperty(property)) - (this)[property] = (data)[property]; - } - } - } - - init(_data?: any) { - if (_data) { - this.pageIndex = _data["pageIndex"]; - this.pageSize = _data["pageSize"]; - (this).skipCount = _data["skipCount"]; - this.filter = _data["filter"]; - } - } - - static fromJS(data: any): PagingTenantInput { - data = typeof data === 'object' ? data : {}; - let result = new PagingTenantInput(); - result.init(data); - return result; - } - - toJSON(data?: any) { - data = typeof data === 'object' ? data : {}; - data["pageIndex"] = this.pageIndex; - data["pageSize"] = this.pageSize; - data["skipCount"] = this.skipCount; - data["filter"] = this.filter; - return data; - } + pageIndex!: number; + pageSize!: number; + readonly skipCount!: number; + filter!: string | undefined; + + constructor(data?: IPagingTenantInput) { + if (data) { + for (var property in data) { + if (data.hasOwnProperty(property)) (this)[property] = (data)[property]; + } + } + } + + init(_data?: any) { + if (_data) { + this.pageIndex = _data['pageIndex']; + this.pageSize = _data['pageSize']; + (this).skipCount = _data['skipCount']; + this.filter = _data['filter']; + } + } + + static fromJS(data: any): PagingTenantInput { + data = typeof data === 'object' ? data : {}; + let result = new PagingTenantInput(); + result.init(data); + return result; + } + + toJSON(data?: any) { + data = typeof data === 'object' ? data : {}; + data['pageIndex'] = this.pageIndex; + data['pageSize'] = this.pageSize; + data['skipCount'] = this.skipCount; + data['filter'] = this.filter; + return data; + } } export interface IPagingTenantInput { - pageIndex: number; - pageSize: number; - skipCount: number; - filter: string | undefined; + pageIndex: number; + pageSize: number; + skipCount: number; + filter: string | undefined; } export class PagingUserListInput implements IPagingUserListInput { - pageIndex!: number; - pageSize!: number; - readonly skipCount!: number; - filter!: string | undefined; - - constructor(data?: IPagingUserListInput) { - if (data) { - for (var property in data) { - if (data.hasOwnProperty(property)) - (this)[property] = (data)[property]; - } - } - } - - init(_data?: any) { - if (_data) { - this.pageIndex = _data["pageIndex"]; - this.pageSize = _data["pageSize"]; - (this).skipCount = _data["skipCount"]; - this.filter = _data["filter"]; - } - } - - static fromJS(data: any): PagingUserListInput { - data = typeof data === 'object' ? data : {}; - let result = new PagingUserListInput(); - result.init(data); - return result; - } - - toJSON(data?: any) { - data = typeof data === 'object' ? data : {}; - data["pageIndex"] = this.pageIndex; - data["pageSize"] = this.pageSize; - data["skipCount"] = this.skipCount; - data["filter"] = this.filter; - return data; - } + pageIndex!: number; + pageSize!: number; + readonly skipCount!: number; + filter!: string | undefined; + + constructor(data?: IPagingUserListInput) { + if (data) { + for (var property in data) { + if (data.hasOwnProperty(property)) (this)[property] = (data)[property]; + } + } + } + + init(_data?: any) { + if (_data) { + this.pageIndex = _data['pageIndex']; + this.pageSize = _data['pageSize']; + (this).skipCount = _data['skipCount']; + this.filter = _data['filter']; + } + } + + static fromJS(data: any): PagingUserListInput { + data = typeof data === 'object' ? data : {}; + let result = new PagingUserListInput(); + result.init(data); + return result; + } + + toJSON(data?: any) { + data = typeof data === 'object' ? data : {}; + data['pageIndex'] = this.pageIndex; + data['pageSize'] = this.pageSize; + data['skipCount'] = this.skipCount; + data['filter'] = this.filter; + return data; + } } export interface IPagingUserListInput { - pageIndex: number; - pageSize: number; - skipCount: number; - filter: string | undefined; + pageIndex: number; + pageSize: number; + skipCount: number; + filter: string | undefined; } export class ParameterApiDescriptionModel implements IParameterApiDescriptionModel { - nameOnMethod!: string | undefined; - name!: string | undefined; - jsonName!: string | undefined; - type!: string | undefined; - typeSimple!: string | undefined; - isOptional!: boolean; - defaultValue!: any | undefined; - constraintTypes!: string[] | undefined; - bindingSourceId!: string | undefined; - descriptorName!: string | undefined; - - constructor(data?: IParameterApiDescriptionModel) { - if (data) { - for (var property in data) { - if (data.hasOwnProperty(property)) - (this)[property] = (data)[property]; - } - } - } - - init(_data?: any) { - if (_data) { - this.nameOnMethod = _data["nameOnMethod"]; - this.name = _data["name"]; - this.jsonName = _data["jsonName"]; - this.type = _data["type"]; - this.typeSimple = _data["typeSimple"]; - this.isOptional = _data["isOptional"]; - this.defaultValue = _data["defaultValue"]; - if (Array.isArray(_data["constraintTypes"])) { - this.constraintTypes = [] as any; - for (let item of _data["constraintTypes"]) - this.constraintTypes!.push(item); - } - this.bindingSourceId = _data["bindingSourceId"]; - this.descriptorName = _data["descriptorName"]; - } - } - - static fromJS(data: any): ParameterApiDescriptionModel { - data = typeof data === 'object' ? data : {}; - let result = new ParameterApiDescriptionModel(); - result.init(data); - return result; - } - - toJSON(data?: any) { - data = typeof data === 'object' ? data : {}; - data["nameOnMethod"] = this.nameOnMethod; - data["name"] = this.name; - data["jsonName"] = this.jsonName; - data["type"] = this.type; - data["typeSimple"] = this.typeSimple; - data["isOptional"] = this.isOptional; - data["defaultValue"] = this.defaultValue; - if (Array.isArray(this.constraintTypes)) { - data["constraintTypes"] = []; - for (let item of this.constraintTypes) - data["constraintTypes"].push(item); - } - data["bindingSourceId"] = this.bindingSourceId; - data["descriptorName"] = this.descriptorName; - return data; - } + nameOnMethod!: string | undefined; + name!: string | undefined; + jsonName!: string | undefined; + type!: string | undefined; + typeSimple!: string | undefined; + isOptional!: boolean; + defaultValue!: any | undefined; + constraintTypes!: string[] | undefined; + bindingSourceId!: string | undefined; + descriptorName!: string | undefined; + + constructor(data?: IParameterApiDescriptionModel) { + if (data) { + for (var property in data) { + if (data.hasOwnProperty(property)) (this)[property] = (data)[property]; + } + } + } + + init(_data?: any) { + if (_data) { + this.nameOnMethod = _data['nameOnMethod']; + this.name = _data['name']; + this.jsonName = _data['jsonName']; + this.type = _data['type']; + this.typeSimple = _data['typeSimple']; + this.isOptional = _data['isOptional']; + this.defaultValue = _data['defaultValue']; + if (Array.isArray(_data['constraintTypes'])) { + this.constraintTypes = [] as any; + for (let item of _data['constraintTypes']) this.constraintTypes!.push(item); + } + this.bindingSourceId = _data['bindingSourceId']; + this.descriptorName = _data['descriptorName']; + } + } + + static fromJS(data: any): ParameterApiDescriptionModel { + data = typeof data === 'object' ? data : {}; + let result = new ParameterApiDescriptionModel(); + result.init(data); + return result; + } + + toJSON(data?: any) { + data = typeof data === 'object' ? data : {}; + data['nameOnMethod'] = this.nameOnMethod; + data['name'] = this.name; + data['jsonName'] = this.jsonName; + data['type'] = this.type; + data['typeSimple'] = this.typeSimple; + data['isOptional'] = this.isOptional; + data['defaultValue'] = this.defaultValue; + if (Array.isArray(this.constraintTypes)) { + data['constraintTypes'] = []; + for (let item of this.constraintTypes) data['constraintTypes'].push(item); + } + data['bindingSourceId'] = this.bindingSourceId; + data['descriptorName'] = this.descriptorName; + return data; + } } export interface IParameterApiDescriptionModel { - nameOnMethod: string | undefined; - name: string | undefined; - jsonName: string | undefined; - type: string | undefined; - typeSimple: string | undefined; - isOptional: boolean; - defaultValue: any | undefined; - constraintTypes: string[] | undefined; - bindingSourceId: string | undefined; - descriptorName: string | undefined; + nameOnMethod: string | undefined; + name: string | undefined; + jsonName: string | undefined; + type: string | undefined; + typeSimple: string | undefined; + isOptional: boolean; + defaultValue: any | undefined; + constraintTypes: string[] | undefined; + bindingSourceId: string | undefined; + descriptorName: string | undefined; } export class PermissionOutput implements IPermissionOutput { - grants!: string[] | undefined; - allGrants!: string[] | undefined; - permissions!: PermissionTreeDto[] | undefined; - - constructor(data?: IPermissionOutput) { - if (data) { - for (var property in data) { - if (data.hasOwnProperty(property)) - (this)[property] = (data)[property]; - } - } - } - - init(_data?: any) { - if (_data) { - if (Array.isArray(_data["grants"])) { - this.grants = [] as any; - for (let item of _data["grants"]) - this.grants!.push(item); - } - if (Array.isArray(_data["allGrants"])) { - this.allGrants = [] as any; - for (let item of _data["allGrants"]) - this.allGrants!.push(item); - } - if (Array.isArray(_data["permissions"])) { - this.permissions = [] as any; - for (let item of _data["permissions"]) - this.permissions!.push(PermissionTreeDto.fromJS(item)); - } - } - } - - static fromJS(data: any): PermissionOutput { - data = typeof data === 'object' ? data : {}; - let result = new PermissionOutput(); - result.init(data); - return result; - } - - toJSON(data?: any) { - data = typeof data === 'object' ? data : {}; - if (Array.isArray(this.grants)) { - data["grants"] = []; - for (let item of this.grants) - data["grants"].push(item); - } - if (Array.isArray(this.allGrants)) { - data["allGrants"] = []; - for (let item of this.allGrants) - data["allGrants"].push(item); - } - if (Array.isArray(this.permissions)) { - data["permissions"] = []; - for (let item of this.permissions) - data["permissions"].push(item.toJSON()); - } - return data; - } + grants!: string[] | undefined; + allGrants!: string[] | undefined; + permissions!: PermissionTreeDto[] | undefined; + + constructor(data?: IPermissionOutput) { + if (data) { + for (var property in data) { + if (data.hasOwnProperty(property)) (this)[property] = (data)[property]; + } + } + } + + init(_data?: any) { + if (_data) { + if (Array.isArray(_data['grants'])) { + this.grants = [] as any; + for (let item of _data['grants']) this.grants!.push(item); + } + if (Array.isArray(_data['allGrants'])) { + this.allGrants = [] as any; + for (let item of _data['allGrants']) this.allGrants!.push(item); + } + if (Array.isArray(_data['permissions'])) { + this.permissions = [] as any; + for (let item of _data['permissions']) + this.permissions!.push(PermissionTreeDto.fromJS(item)); + } + } + } + + static fromJS(data: any): PermissionOutput { + data = typeof data === 'object' ? data : {}; + let result = new PermissionOutput(); + result.init(data); + return result; + } + + toJSON(data?: any) { + data = typeof data === 'object' ? data : {}; + if (Array.isArray(this.grants)) { + data['grants'] = []; + for (let item of this.grants) data['grants'].push(item); + } + if (Array.isArray(this.allGrants)) { + data['allGrants'] = []; + for (let item of this.allGrants) data['allGrants'].push(item); + } + if (Array.isArray(this.permissions)) { + data['permissions'] = []; + for (let item of this.permissions) data['permissions'].push(item.toJSON()); + } + return data; + } } export interface IPermissionOutput { - grants: string[] | undefined; - allGrants: string[] | undefined; - permissions: PermissionTreeDto[] | undefined; + grants: string[] | undefined; + allGrants: string[] | undefined; + permissions: PermissionTreeDto[] | undefined; } export class PermissionTreeDto implements IPermissionTreeDto { - title!: string | undefined; - key!: string | undefined; - children!: PermissionTreeDto[] | undefined; - - constructor(data?: IPermissionTreeDto) { - 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(PermissionTreeDto.fromJS(item)); - } - } - } - - static fromJS(data: any): PermissionTreeDto { - data = typeof data === 'object' ? data : {}; - let result = new PermissionTreeDto(); - 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; - } + title!: string | undefined; + key!: string | undefined; + children!: PermissionTreeDto[] | undefined; + + constructor(data?: IPermissionTreeDto) { + 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(PermissionTreeDto.fromJS(item)); + } + } + } + + static fromJS(data: any): PermissionTreeDto { + data = typeof data === 'object' ? data : {}; + let result = new PermissionTreeDto(); + 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 IPermissionTreeDto { - title: string | undefined; - key: string | undefined; - children: PermissionTreeDto[] | undefined; + title: string | undefined; + key: string | undefined; + children: PermissionTreeDto[] | undefined; } export class PropertyApiDescriptionModel implements IPropertyApiDescriptionModel { - name!: string | undefined; - jsonName!: string | undefined; - type!: string | undefined; - typeSimple!: string | undefined; - isRequired!: boolean; - minLength!: number | undefined; - maxLength!: number | undefined; - minimum!: string | undefined; - maximum!: string | undefined; - regex!: string | undefined; - - constructor(data?: IPropertyApiDescriptionModel) { - if (data) { - for (var property in data) { - if (data.hasOwnProperty(property)) - (this)[property] = (data)[property]; - } - } - } - - init(_data?: any) { - if (_data) { - this.name = _data["name"]; - this.jsonName = _data["jsonName"]; - this.type = _data["type"]; - this.typeSimple = _data["typeSimple"]; - this.isRequired = _data["isRequired"]; - this.minLength = _data["minLength"]; - this.maxLength = _data["maxLength"]; - this.minimum = _data["minimum"]; - this.maximum = _data["maximum"]; - this.regex = _data["regex"]; - } - } - - static fromJS(data: any): PropertyApiDescriptionModel { - data = typeof data === 'object' ? data : {}; - let result = new PropertyApiDescriptionModel(); - result.init(data); - return result; - } - - toJSON(data?: any) { - data = typeof data === 'object' ? data : {}; - data["name"] = this.name; - data["jsonName"] = this.jsonName; - data["type"] = this.type; - data["typeSimple"] = this.typeSimple; - data["isRequired"] = this.isRequired; - data["minLength"] = this.minLength; - data["maxLength"] = this.maxLength; - data["minimum"] = this.minimum; - data["maximum"] = this.maximum; - data["regex"] = this.regex; - return data; - } + name!: string | undefined; + jsonName!: string | undefined; + type!: string | undefined; + typeSimple!: string | undefined; + isRequired!: boolean; + minLength!: number | undefined; + maxLength!: number | undefined; + minimum!: string | undefined; + maximum!: string | undefined; + regex!: string | undefined; + + constructor(data?: IPropertyApiDescriptionModel) { + if (data) { + for (var property in data) { + if (data.hasOwnProperty(property)) (this)[property] = (data)[property]; + } + } + } + + init(_data?: any) { + if (_data) { + this.name = _data['name']; + this.jsonName = _data['jsonName']; + this.type = _data['type']; + this.typeSimple = _data['typeSimple']; + this.isRequired = _data['isRequired']; + this.minLength = _data['minLength']; + this.maxLength = _data['maxLength']; + this.minimum = _data['minimum']; + this.maximum = _data['maximum']; + this.regex = _data['regex']; + } + } + + static fromJS(data: any): PropertyApiDescriptionModel { + data = typeof data === 'object' ? data : {}; + let result = new PropertyApiDescriptionModel(); + result.init(data); + return result; + } + + toJSON(data?: any) { + data = typeof data === 'object' ? data : {}; + data['name'] = this.name; + data['jsonName'] = this.jsonName; + data['type'] = this.type; + data['typeSimple'] = this.typeSimple; + data['isRequired'] = this.isRequired; + data['minLength'] = this.minLength; + data['maxLength'] = this.maxLength; + data['minimum'] = this.minimum; + data['maximum'] = this.maximum; + data['regex'] = this.regex; + return data; + } } export interface IPropertyApiDescriptionModel { - name: string | undefined; - jsonName: string | undefined; - type: string | undefined; - typeSimple: string | undefined; - isRequired: boolean; - minLength: number | undefined; - maxLength: number | undefined; - minimum: string | undefined; - maximum: string | undefined; - regex: string | undefined; + name: string | undefined; + jsonName: string | undefined; + type: string | undefined; + typeSimple: string | undefined; + isRequired: boolean; + minLength: number | undefined; + maxLength: number | undefined; + minimum: string | undefined; + maximum: string | undefined; + regex: string | undefined; } export class RemoteServiceErrorInfo implements IRemoteServiceErrorInfo { - code!: string | undefined; - message!: string | undefined; - details!: string | undefined; - data!: { [key: string]: any; } | undefined; - validationErrors!: RemoteServiceValidationErrorInfo[] | undefined; - - constructor(data?: IRemoteServiceErrorInfo) { - if (data) { - for (var property in data) { - if (data.hasOwnProperty(property)) - (this)[property] = (data)[property]; - } - } - } - - init(_data?: any) { - if (_data) { - this.code = _data["code"]; - this.message = _data["message"]; - this.details = _data["details"]; - if (_data["data"]) { - this.data = {} as any; - for (let key in _data["data"]) { - if (_data["data"].hasOwnProperty(key)) - (this.data)![key] = _data["data"][key]; - } - } - if (Array.isArray(_data["validationErrors"])) { - this.validationErrors = [] as any; - for (let item of _data["validationErrors"]) - this.validationErrors!.push(RemoteServiceValidationErrorInfo.fromJS(item)); - } - } - } - - static fromJS(data: any): RemoteServiceErrorInfo { - data = typeof data === 'object' ? data : {}; - let result = new RemoteServiceErrorInfo(); - result.init(data); - return result; - } - - toJSON(data?: any) { - data = typeof data === 'object' ? data : {}; - data["code"] = this.code; - data["message"] = this.message; - data["details"] = this.details; - if (this.data) { - data["data"] = {}; - for (let key in this.data) { - if (this.data.hasOwnProperty(key)) - (data["data"])[key] = (this.data)[key]; - } - } - if (Array.isArray(this.validationErrors)) { - data["validationErrors"] = []; - for (let item of this.validationErrors) - data["validationErrors"].push(item.toJSON()); - } - return data; - } + code!: string | undefined; + message!: string | undefined; + details!: string | undefined; + data!: { [key: string]: any } | undefined; + validationErrors!: RemoteServiceValidationErrorInfo[] | undefined; + + constructor(data?: IRemoteServiceErrorInfo) { + if (data) { + for (var property in data) { + if (data.hasOwnProperty(property)) (this)[property] = (data)[property]; + } + } + } + + init(_data?: any) { + if (_data) { + this.code = _data['code']; + this.message = _data['message']; + this.details = _data['details']; + if (_data['data']) { + this.data = {} as any; + for (let key in _data['data']) { + if (_data['data'].hasOwnProperty(key)) (this.data)![key] = _data['data'][key]; + } + } + if (Array.isArray(_data['validationErrors'])) { + this.validationErrors = [] as any; + for (let item of _data['validationErrors']) + this.validationErrors!.push(RemoteServiceValidationErrorInfo.fromJS(item)); + } + } + } + + static fromJS(data: any): RemoteServiceErrorInfo { + data = typeof data === 'object' ? data : {}; + let result = new RemoteServiceErrorInfo(); + result.init(data); + return result; + } + + toJSON(data?: any) { + data = typeof data === 'object' ? data : {}; + data['code'] = this.code; + data['message'] = this.message; + data['details'] = this.details; + if (this.data) { + data['data'] = {}; + for (let key in this.data) { + if (this.data.hasOwnProperty(key)) (data['data'])[key] = (this.data)[key]; + } + } + if (Array.isArray(this.validationErrors)) { + data['validationErrors'] = []; + for (let item of this.validationErrors) data['validationErrors'].push(item.toJSON()); + } + return data; + } } export interface IRemoteServiceErrorInfo { - code: string | undefined; - message: string | undefined; - details: string | undefined; - data: { [key: string]: any; } | undefined; - validationErrors: RemoteServiceValidationErrorInfo[] | undefined; + code: string | undefined; + message: string | undefined; + details: string | undefined; + data: { [key: string]: any } | undefined; + validationErrors: RemoteServiceValidationErrorInfo[] | undefined; } export class RemoteServiceErrorResponse implements IRemoteServiceErrorResponse { - error!: RemoteServiceErrorInfo; + error!: RemoteServiceErrorInfo; - constructor(data?: IRemoteServiceErrorResponse) { - if (data) { - for (var property in data) { - if (data.hasOwnProperty(property)) - (this)[property] = (data)[property]; - } - } + constructor(data?: IRemoteServiceErrorResponse) { + if (data) { + for (var property in data) { + if (data.hasOwnProperty(property)) (this)[property] = (data)[property]; + } } + } - init(_data?: any) { - if (_data) { - this.error = _data["error"] ? RemoteServiceErrorInfo.fromJS(_data["error"]) : undefined; - } + init(_data?: any) { + if (_data) { + this.error = _data['error'] ? RemoteServiceErrorInfo.fromJS(_data['error']) : undefined; } + } - static fromJS(data: any): RemoteServiceErrorResponse { - data = typeof data === 'object' ? data : {}; - let result = new RemoteServiceErrorResponse(); - result.init(data); - return result; - } + static fromJS(data: any): RemoteServiceErrorResponse { + data = typeof data === 'object' ? data : {}; + let result = new RemoteServiceErrorResponse(); + result.init(data); + return result; + } - toJSON(data?: any) { - data = typeof data === 'object' ? data : {}; - data["error"] = this.error ? this.error.toJSON() : undefined; - return data; - } + toJSON(data?: any) { + data = typeof data === 'object' ? data : {}; + data['error'] = this.error ? this.error.toJSON() : undefined; + return data; + } } export interface IRemoteServiceErrorResponse { - error: RemoteServiceErrorInfo; + error: RemoteServiceErrorInfo; } export class RemoteServiceValidationErrorInfo implements IRemoteServiceValidationErrorInfo { - message!: string | undefined; - members!: string[] | undefined; + message!: string | undefined; + members!: string[] | undefined; - constructor(data?: IRemoteServiceValidationErrorInfo) { - if (data) { - for (var property in data) { - if (data.hasOwnProperty(property)) - (this)[property] = (data)[property]; - } - } + constructor(data?: IRemoteServiceValidationErrorInfo) { + if (data) { + for (var property in data) { + if (data.hasOwnProperty(property)) (this)[property] = (data)[property]; + } } + } - init(_data?: any) { - if (_data) { - this.message = _data["message"]; - if (Array.isArray(_data["members"])) { - this.members = [] as any; - for (let item of _data["members"]) - this.members!.push(item); - } - } + init(_data?: any) { + if (_data) { + this.message = _data['message']; + if (Array.isArray(_data['members'])) { + this.members = [] as any; + for (let item of _data['members']) this.members!.push(item); + } } + } - static fromJS(data: any): RemoteServiceValidationErrorInfo { - data = typeof data === 'object' ? data : {}; - let result = new RemoteServiceValidationErrorInfo(); - result.init(data); - return result; - } + static fromJS(data: any): RemoteServiceValidationErrorInfo { + data = typeof data === 'object' ? data : {}; + let result = new RemoteServiceValidationErrorInfo(); + result.init(data); + return result; + } - toJSON(data?: any) { - data = typeof data === 'object' ? data : {}; - data["message"] = this.message; - if (Array.isArray(this.members)) { - data["members"] = []; - for (let item of this.members) - data["members"].push(item); - } - return data; + toJSON(data?: any) { + data = typeof data === 'object' ? data : {}; + data['message'] = this.message; + if (Array.isArray(this.members)) { + data['members'] = []; + for (let item of this.members) data['members'].push(item); } + return data; + } } export interface IRemoteServiceValidationErrorInfo { - message: string | undefined; - members: string[] | undefined; + message: string | undefined; + members: string[] | undefined; } export class RemoveRoleToOrganizationUnitInput implements IRemoveRoleToOrganizationUnitInput { - roleId!: string; - organizationUnitId!: string; + roleId!: string; + organizationUnitId!: string; - constructor(data?: IRemoveRoleToOrganizationUnitInput) { - if (data) { - for (var property in data) { - if (data.hasOwnProperty(property)) - (this)[property] = (data)[property]; - } - } + 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"]; - } + 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; - } + 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; - } + 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; + roleId: string; + organizationUnitId: string; } export class RemoveUserToOrganizationUnitInput implements IRemoveUserToOrganizationUnitInput { - userId!: string; - organizationUnitId!: string; + userId!: string; + organizationUnitId!: string; - constructor(data?: IRemoveUserToOrganizationUnitInput) { - if (data) { - for (var property in data) { - if (data.hasOwnProperty(property)) - (this)[property] = (data)[property]; - } - } + 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"]; - } + 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; - } + 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; - } + 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; + userId: string; + organizationUnitId: string; } export class ReturnValueApiDescriptionModel implements IReturnValueApiDescriptionModel { - type!: string | undefined; - typeSimple!: string | undefined; + type!: string | undefined; + typeSimple!: string | undefined; - constructor(data?: IReturnValueApiDescriptionModel) { - if (data) { - for (var property in data) { - if (data.hasOwnProperty(property)) - (this)[property] = (data)[property]; - } - } + constructor(data?: IReturnValueApiDescriptionModel) { + if (data) { + for (var property in data) { + if (data.hasOwnProperty(property)) (this)[property] = (data)[property]; + } } + } - init(_data?: any) { - if (_data) { - this.type = _data["type"]; - this.typeSimple = _data["typeSimple"]; - } + init(_data?: any) { + if (_data) { + this.type = _data['type']; + this.typeSimple = _data['typeSimple']; } + } - static fromJS(data: any): ReturnValueApiDescriptionModel { - data = typeof data === 'object' ? data : {}; - let result = new ReturnValueApiDescriptionModel(); - result.init(data); - return result; - } + static fromJS(data: any): ReturnValueApiDescriptionModel { + data = typeof data === 'object' ? data : {}; + let result = new ReturnValueApiDescriptionModel(); + result.init(data); + return result; + } - toJSON(data?: any) { - data = typeof data === 'object' ? data : {}; - data["type"] = this.type; - data["typeSimple"] = this.typeSimple; - return data; - } + toJSON(data?: any) { + data = typeof data === 'object' ? data : {}; + data['type'] = this.type; + data['typeSimple'] = this.typeSimple; + return data; + } } export interface IReturnValueApiDescriptionModel { - type: string | undefined; - typeSimple: string | undefined; + type: string | undefined; + typeSimple: string | undefined; } export class SendBroadCastMessageInput implements ISendBroadCastMessageInput { - title!: string | undefined; - content!: string | undefined; + title!: string | undefined; + content!: string | undefined; - constructor(data?: ISendBroadCastMessageInput) { - if (data) { - for (var property in data) { - if (data.hasOwnProperty(property)) - (this)[property] = (data)[property]; - } - } + constructor(data?: ISendBroadCastMessageInput) { + 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.content = _data["content"]; - } + init(_data?: any) { + if (_data) { + this.title = _data['title']; + this.content = _data['content']; } + } - static fromJS(data: any): SendBroadCastMessageInput { - data = typeof data === 'object' ? data : {}; - let result = new SendBroadCastMessageInput(); - result.init(data); - return result; - } + static fromJS(data: any): SendBroadCastMessageInput { + data = typeof data === 'object' ? data : {}; + let result = new SendBroadCastMessageInput(); + result.init(data); + return result; + } - toJSON(data?: any) { - data = typeof data === 'object' ? data : {}; - data["title"] = this.title; - data["content"] = this.content; - return data; - } + toJSON(data?: any) { + data = typeof data === 'object' ? data : {}; + data['title'] = this.title; + data['content'] = this.content; + return data; + } } export interface ISendBroadCastMessageInput { - title: string | undefined; - content: string | undefined; + title: string | undefined; + content: string | undefined; } export class SendCommonMessageInput implements ISendCommonMessageInput { - title!: string | undefined; - content!: string | undefined; - receiveIds!: string[] | undefined; - - constructor(data?: ISendCommonMessageInput) { - 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.content = _data["content"]; - if (Array.isArray(_data["receiveIds"])) { - this.receiveIds = [] as any; - for (let item of _data["receiveIds"]) - this.receiveIds!.push(item); - } - } - } - - static fromJS(data: any): SendCommonMessageInput { - data = typeof data === 'object' ? data : {}; - let result = new SendCommonMessageInput(); - result.init(data); - return result; - } - - toJSON(data?: any) { - data = typeof data === 'object' ? data : {}; - data["title"] = this.title; - data["content"] = this.content; - if (Array.isArray(this.receiveIds)) { - data["receiveIds"] = []; - for (let item of this.receiveIds) - data["receiveIds"].push(item); - } - return data; - } + title!: string | undefined; + content!: string | undefined; + receiveIds!: string[] | undefined; + + constructor(data?: ISendCommonMessageInput) { + 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.content = _data['content']; + if (Array.isArray(_data['receiveIds'])) { + this.receiveIds = [] as any; + for (let item of _data['receiveIds']) this.receiveIds!.push(item); + } + } + } + + static fromJS(data: any): SendCommonMessageInput { + data = typeof data === 'object' ? data : {}; + let result = new SendCommonMessageInput(); + result.init(data); + return result; + } + + toJSON(data?: any) { + data = typeof data === 'object' ? data : {}; + data['title'] = this.title; + data['content'] = this.content; + if (Array.isArray(this.receiveIds)) { + data['receiveIds'] = []; + for (let item of this.receiveIds) data['receiveIds'].push(item); + } + return data; + } } export interface ISendCommonMessageInput { - title: string | undefined; - content: string | undefined; - receiveIds: string[] | undefined; + title: string | undefined; + content: string | undefined; + receiveIds: string[] | undefined; } export class SetDataDictinaryDetailInput implements ISetDataDictinaryDetailInput { - dataDictionaryId!: string; - dataDictionayDetailId!: string; - isEnabled!: boolean; - - constructor(data?: ISetDataDictinaryDetailInput) { - if (data) { - for (var property in data) { - if (data.hasOwnProperty(property)) - (this)[property] = (data)[property]; - } - } - } - - init(_data?: any) { - if (_data) { - this.dataDictionaryId = _data["dataDictionaryId"]; - this.dataDictionayDetailId = _data["dataDictionayDetailId"]; - this.isEnabled = _data["isEnabled"]; - } - } - - static fromJS(data: any): SetDataDictinaryDetailInput { - data = typeof data === 'object' ? data : {}; - let result = new SetDataDictinaryDetailInput(); - result.init(data); - return result; - } - - toJSON(data?: any) { - data = typeof data === 'object' ? data : {}; - data["dataDictionaryId"] = this.dataDictionaryId; - data["dataDictionayDetailId"] = this.dataDictionayDetailId; - data["isEnabled"] = this.isEnabled; - return data; - } + dataDictionaryId!: string; + dataDictionayDetailId!: string; + isEnabled!: boolean; + + constructor(data?: ISetDataDictinaryDetailInput) { + if (data) { + for (var property in data) { + if (data.hasOwnProperty(property)) (this)[property] = (data)[property]; + } + } + } + + init(_data?: any) { + if (_data) { + this.dataDictionaryId = _data['dataDictionaryId']; + this.dataDictionayDetailId = _data['dataDictionayDetailId']; + this.isEnabled = _data['isEnabled']; + } + } + + static fromJS(data: any): SetDataDictinaryDetailInput { + data = typeof data === 'object' ? data : {}; + let result = new SetDataDictinaryDetailInput(); + result.init(data); + return result; + } + + toJSON(data?: any) { + data = typeof data === 'object' ? data : {}; + data['dataDictionaryId'] = this.dataDictionaryId; + data['dataDictionayDetailId'] = this.dataDictionayDetailId; + data['isEnabled'] = this.isEnabled; + return data; + } } export interface ISetDataDictinaryDetailInput { - dataDictionaryId: string; - dataDictionayDetailId: string; - isEnabled: boolean; + dataDictionaryId: string; + dataDictionayDetailId: string; + isEnabled: boolean; } export class SetReadInput implements ISetReadInput { - id!: string; + id!: string; - constructor(data?: ISetReadInput) { - if (data) { - for (var property in data) { - if (data.hasOwnProperty(property)) - (this)[property] = (data)[property]; - } - } + constructor(data?: ISetReadInput) { + if (data) { + for (var property in data) { + if (data.hasOwnProperty(property)) (this)[property] = (data)[property]; + } } + } - init(_data?: any) { - if (_data) { - this.id = _data["id"]; - } + init(_data?: any) { + if (_data) { + this.id = _data['id']; } + } - static fromJS(data: any): SetReadInput { - data = typeof data === 'object' ? data : {}; - let result = new SetReadInput(); - result.init(data); - return result; - } + static fromJS(data: any): SetReadInput { + data = typeof data === 'object' ? data : {}; + let result = new SetReadInput(); + result.init(data); + return result; + } - toJSON(data?: any) { - data = typeof data === 'object' ? data : {}; - data["id"] = this.id; - return data; - } + toJSON(data?: any) { + data = typeof data === 'object' ? data : {}; + data['id'] = this.id; + return data; + } } export interface ISetReadInput { - id: string; + id: string; } export class SettingItemOutput implements ISettingItemOutput { - name!: string | undefined; - displayName!: string | undefined; - description!: string | undefined; - value!: string | undefined; - type!: string | undefined; - - constructor(data?: ISettingItemOutput) { - if (data) { - for (var property in data) { - if (data.hasOwnProperty(property)) - (this)[property] = (data)[property]; - } - } - } - - init(_data?: any) { - if (_data) { - this.name = _data["name"]; - this.displayName = _data["displayName"]; - this.description = _data["description"]; - this.value = _data["value"]; - this.type = _data["type"]; - } - } - - static fromJS(data: any): SettingItemOutput { - data = typeof data === 'object' ? data : {}; - let result = new SettingItemOutput(); - 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["value"] = this.value; - data["type"] = this.type; - return data; - } + name!: string | undefined; + displayName!: string | undefined; + description!: string | undefined; + value!: string | undefined; + type!: string | undefined; + + constructor(data?: ISettingItemOutput) { + if (data) { + for (var property in data) { + if (data.hasOwnProperty(property)) (this)[property] = (data)[property]; + } + } + } + + init(_data?: any) { + if (_data) { + this.name = _data['name']; + this.displayName = _data['displayName']; + this.description = _data['description']; + this.value = _data['value']; + this.type = _data['type']; + } + } + + static fromJS(data: any): SettingItemOutput { + data = typeof data === 'object' ? data : {}; + let result = new SettingItemOutput(); + 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['value'] = this.value; + data['type'] = this.type; + return data; + } } export interface ISettingItemOutput { - name: string | undefined; - displayName: string | undefined; - description: string | undefined; - value: string | undefined; - type: string | undefined; + name: string | undefined; + displayName: string | undefined; + description: string | undefined; + value: string | undefined; + type: string | undefined; } export class SettingOutput implements ISettingOutput { - group!: string | undefined; - groupDisplayName!: string | undefined; - settingItemOutput!: SettingItemOutput[] | undefined; - - constructor(data?: ISettingOutput) { - if (data) { - for (var property in data) { - if (data.hasOwnProperty(property)) - (this)[property] = (data)[property]; - } - } - } - - init(_data?: any) { - if (_data) { - this.group = _data["group"]; - this.groupDisplayName = _data["groupDisplayName"]; - if (Array.isArray(_data["settingItemOutput"])) { - this.settingItemOutput = [] as any; - for (let item of _data["settingItemOutput"]) - this.settingItemOutput!.push(SettingItemOutput.fromJS(item)); - } - } - } - - static fromJS(data: any): SettingOutput { - data = typeof data === 'object' ? data : {}; - let result = new SettingOutput(); - result.init(data); - return result; - } - - toJSON(data?: any) { - data = typeof data === 'object' ? data : {}; - data["group"] = this.group; - data["groupDisplayName"] = this.groupDisplayName; - if (Array.isArray(this.settingItemOutput)) { - data["settingItemOutput"] = []; - for (let item of this.settingItemOutput) - data["settingItemOutput"].push(item.toJSON()); - } - return data; - } + group!: string | undefined; + groupDisplayName!: string | undefined; + settingItemOutput!: SettingItemOutput[] | undefined; + + constructor(data?: ISettingOutput) { + if (data) { + for (var property in data) { + if (data.hasOwnProperty(property)) (this)[property] = (data)[property]; + } + } + } + + init(_data?: any) { + if (_data) { + this.group = _data['group']; + this.groupDisplayName = _data['groupDisplayName']; + if (Array.isArray(_data['settingItemOutput'])) { + this.settingItemOutput = [] as any; + for (let item of _data['settingItemOutput']) + this.settingItemOutput!.push(SettingItemOutput.fromJS(item)); + } + } + } + + static fromJS(data: any): SettingOutput { + data = typeof data === 'object' ? data : {}; + let result = new SettingOutput(); + result.init(data); + return result; + } + + toJSON(data?: any) { + data = typeof data === 'object' ? data : {}; + data['group'] = this.group; + data['groupDisplayName'] = this.groupDisplayName; + if (Array.isArray(this.settingItemOutput)) { + data['settingItemOutput'] = []; + for (let item of this.settingItemOutput) data['settingItemOutput'].push(item.toJSON()); + } + return data; + } } export interface ISettingOutput { - group: string | undefined; - groupDisplayName: string | undefined; - settingItemOutput: SettingItemOutput[] | undefined; + group: string | undefined; + groupDisplayName: string | undefined; + settingItemOutput: SettingItemOutput[] | undefined; } export class TenantCreateDto implements ITenantCreateDto { - readonly extraProperties!: { [key: string]: any; } | undefined; - name!: string; - adminEmailAddress!: string; - adminPassword!: string; - - constructor(data?: ITenantCreateDto) { - if (data) { - for (var property in data) { - if (data.hasOwnProperty(property)) - (this)[property] = (data)[property]; - } - } - } - - init(_data?: any) { - if (_data) { - if (_data["extraProperties"]) { - (this).extraProperties = {} as any; - for (let key in _data["extraProperties"]) { - if (_data["extraProperties"].hasOwnProperty(key)) - ((this).extraProperties)![key] = _data["extraProperties"][key]; - } - } - this.name = _data["name"]; - this.adminEmailAddress = _data["adminEmailAddress"]; - this.adminPassword = _data["adminPassword"]; - } - } - - static fromJS(data: any): TenantCreateDto { - data = typeof data === 'object' ? data : {}; - let result = new TenantCreateDto(); - result.init(data); - return result; - } - - toJSON(data?: any) { - data = typeof data === 'object' ? data : {}; - if (this.extraProperties) { - data["extraProperties"] = {}; - for (let key in this.extraProperties) { - if (this.extraProperties.hasOwnProperty(key)) - (data["extraProperties"])[key] = (this.extraProperties)[key]; - } - } - data["name"] = this.name; - data["adminEmailAddress"] = this.adminEmailAddress; - data["adminPassword"] = this.adminPassword; - return data; - } + readonly extraProperties!: { [key: string]: any } | undefined; + name!: string; + adminEmailAddress!: string; + adminPassword!: string; + + constructor(data?: ITenantCreateDto) { + if (data) { + for (var property in data) { + if (data.hasOwnProperty(property)) (this)[property] = (data)[property]; + } + } + } + + init(_data?: any) { + if (_data) { + if (_data['extraProperties']) { + (this).extraProperties = {} as any; + for (let key in _data['extraProperties']) { + if (_data['extraProperties'].hasOwnProperty(key)) + ((this).extraProperties)![key] = _data['extraProperties'][key]; + } + } + this.name = _data['name']; + this.adminEmailAddress = _data['adminEmailAddress']; + this.adminPassword = _data['adminPassword']; + } + } + + static fromJS(data: any): TenantCreateDto { + data = typeof data === 'object' ? data : {}; + let result = new TenantCreateDto(); + result.init(data); + return result; + } + + toJSON(data?: any) { + data = typeof data === 'object' ? data : {}; + if (this.extraProperties) { + data['extraProperties'] = {}; + for (let key in this.extraProperties) { + if (this.extraProperties.hasOwnProperty(key)) + (data['extraProperties'])[key] = (this.extraProperties)[key]; + } + } + data['name'] = this.name; + data['adminEmailAddress'] = this.adminEmailAddress; + data['adminPassword'] = this.adminPassword; + return data; + } } export interface ITenantCreateDto { - extraProperties: { [key: string]: any; } | undefined; - name: string; - adminEmailAddress: string; - adminPassword: string; + extraProperties: { [key: string]: any } | undefined; + name: string; + adminEmailAddress: string; + adminPassword: string; } export class TenantDto implements ITenantDto { - readonly extraProperties!: { [key: string]: any; } | undefined; - id!: string; - name!: string | undefined; - concurrencyStamp!: string | undefined; - - constructor(data?: ITenantDto) { - if (data) { - for (var property in data) { - if (data.hasOwnProperty(property)) - (this)[property] = (data)[property]; - } - } - } - - init(_data?: any) { - if (_data) { - if (_data["extraProperties"]) { - (this).extraProperties = {} as any; - for (let key in _data["extraProperties"]) { - if (_data["extraProperties"].hasOwnProperty(key)) - ((this).extraProperties)![key] = _data["extraProperties"][key]; - } - } - this.id = _data["id"]; - this.name = _data["name"]; - this.concurrencyStamp = _data["concurrencyStamp"]; - } - } - - static fromJS(data: any): TenantDto { - data = typeof data === 'object' ? data : {}; - let result = new TenantDto(); - result.init(data); - return result; - } - - toJSON(data?: any) { - data = typeof data === 'object' ? data : {}; - if (this.extraProperties) { - data["extraProperties"] = {}; - for (let key in this.extraProperties) { - if (this.extraProperties.hasOwnProperty(key)) - (data["extraProperties"])[key] = (this.extraProperties)[key]; - } - } - data["id"] = this.id; - data["name"] = this.name; - data["concurrencyStamp"] = this.concurrencyStamp; - return data; - } + readonly extraProperties!: { [key: string]: any } | undefined; + id!: string; + name!: string | undefined; + concurrencyStamp!: string | undefined; + + constructor(data?: ITenantDto) { + if (data) { + for (var property in data) { + if (data.hasOwnProperty(property)) (this)[property] = (data)[property]; + } + } + } + + init(_data?: any) { + if (_data) { + if (_data['extraProperties']) { + (this).extraProperties = {} as any; + for (let key in _data['extraProperties']) { + if (_data['extraProperties'].hasOwnProperty(key)) + ((this).extraProperties)![key] = _data['extraProperties'][key]; + } + } + this.id = _data['id']; + this.name = _data['name']; + this.concurrencyStamp = _data['concurrencyStamp']; + } + } + + static fromJS(data: any): TenantDto { + data = typeof data === 'object' ? data : {}; + let result = new TenantDto(); + result.init(data); + return result; + } + + toJSON(data?: any) { + data = typeof data === 'object' ? data : {}; + if (this.extraProperties) { + data['extraProperties'] = {}; + for (let key in this.extraProperties) { + if (this.extraProperties.hasOwnProperty(key)) + (data['extraProperties'])[key] = (this.extraProperties)[key]; + } + } + data['id'] = this.id; + data['name'] = this.name; + data['concurrencyStamp'] = this.concurrencyStamp; + return data; + } } export interface ITenantDto { - extraProperties: { [key: string]: any; } | undefined; - id: string; - name: string | undefined; - concurrencyStamp: string | undefined; + extraProperties: { [key: string]: any } | undefined; + id: string; + name: string | undefined; + concurrencyStamp: string | undefined; } export class TenantDtoPagedResultDto implements ITenantDtoPagedResultDto { - items!: TenantDto[] | undefined; - totalCount!: number; + items!: TenantDto[] | undefined; + totalCount!: number; - constructor(data?: ITenantDtoPagedResultDto) { - if (data) { - for (var property in data) { - if (data.hasOwnProperty(property)) - (this)[property] = (data)[property]; - } - } + constructor(data?: ITenantDtoPagedResultDto) { + 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(TenantDto.fromJS(item)); - } - this.totalCount = _data["totalCount"]; - } + init(_data?: any) { + if (_data) { + if (Array.isArray(_data['items'])) { + this.items = [] as any; + for (let item of _data['items']) this.items!.push(TenantDto.fromJS(item)); + } + this.totalCount = _data['totalCount']; } + } - static fromJS(data: any): TenantDtoPagedResultDto { - data = typeof data === 'object' ? data : {}; - let result = new TenantDtoPagedResultDto(); - result.init(data); - return result; - } + static fromJS(data: any): TenantDtoPagedResultDto { + data = typeof data === 'object' ? data : {}; + let result = new TenantDtoPagedResultDto(); + 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; + 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 ITenantDtoPagedResultDto { - items: TenantDto[] | undefined; - totalCount: number; + items: TenantDto[] | undefined; + totalCount: number; } export class TimeZone implements ITimeZone { - iana!: IanaTimeZone; - windows!: WindowsTimeZone; + iana!: IanaTimeZone; + windows!: WindowsTimeZone; - constructor(data?: ITimeZone) { - if (data) { - for (var property in data) { - if (data.hasOwnProperty(property)) - (this)[property] = (data)[property]; - } - } + constructor(data?: ITimeZone) { + if (data) { + for (var property in data) { + if (data.hasOwnProperty(property)) (this)[property] = (data)[property]; + } } + } - init(_data?: any) { - if (_data) { - this.iana = _data["iana"] ? IanaTimeZone.fromJS(_data["iana"]) : undefined; - this.windows = _data["windows"] ? WindowsTimeZone.fromJS(_data["windows"]) : undefined; - } + init(_data?: any) { + if (_data) { + this.iana = _data['iana'] ? IanaTimeZone.fromJS(_data['iana']) : undefined; + this.windows = _data['windows'] ? WindowsTimeZone.fromJS(_data['windows']) : undefined; } + } - static fromJS(data: any): TimeZone { - data = typeof data === 'object' ? data : {}; - let result = new TimeZone(); - result.init(data); - return result; - } + static fromJS(data: any): TimeZone { + data = typeof data === 'object' ? data : {}; + let result = new TimeZone(); + result.init(data); + return result; + } - toJSON(data?: any) { - data = typeof data === 'object' ? data : {}; - data["iana"] = this.iana ? this.iana.toJSON() : undefined; - data["windows"] = this.windows ? this.windows.toJSON() : undefined; - return data; - } + toJSON(data?: any) { + data = typeof data === 'object' ? data : {}; + data['iana'] = this.iana ? this.iana.toJSON() : undefined; + data['windows'] = this.windows ? this.windows.toJSON() : undefined; + return data; + } } export interface ITimeZone { - iana: IanaTimeZone; - windows: WindowsTimeZone; + iana: IanaTimeZone; + windows: WindowsTimeZone; } export class TimingDto implements ITimingDto { - timeZone!: TimeZone; + timeZone!: TimeZone; - constructor(data?: ITimingDto) { - if (data) { - for (var property in data) { - if (data.hasOwnProperty(property)) - (this)[property] = (data)[property]; - } - } + constructor(data?: ITimingDto) { + if (data) { + for (var property in data) { + if (data.hasOwnProperty(property)) (this)[property] = (data)[property]; + } } + } - init(_data?: any) { - if (_data) { - this.timeZone = _data["timeZone"] ? TimeZone.fromJS(_data["timeZone"]) : undefined; - } + init(_data?: any) { + if (_data) { + this.timeZone = _data['timeZone'] ? TimeZone.fromJS(_data['timeZone']) : undefined; } + } - static fromJS(data: any): TimingDto { - data = typeof data === 'object' ? data : {}; - let result = new TimingDto(); - result.init(data); - return result; - } + static fromJS(data: any): TimingDto { + data = typeof data === 'object' ? data : {}; + let result = new TimingDto(); + result.init(data); + return result; + } - toJSON(data?: any) { - data = typeof data === 'object' ? data : {}; - data["timeZone"] = this.timeZone ? this.timeZone.toJSON() : undefined; - return data; - } + toJSON(data?: any) { + data = typeof data === 'object' ? data : {}; + data['timeZone'] = this.timeZone ? this.timeZone.toJSON() : undefined; + return data; + } } export interface ITimingDto { - timeZone: TimeZone; + 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; - } + 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; + title: string | undefined; + key: string; + children: TreeOutput[] | undefined; } export class TypeApiDescriptionModel implements ITypeApiDescriptionModel { - baseType!: string | undefined; - isEnum!: boolean; - enumNames!: string[] | undefined; - enumValues!: any[] | undefined; - genericArguments!: string[] | undefined; - properties!: PropertyApiDescriptionModel[] | undefined; - - constructor(data?: ITypeApiDescriptionModel) { - if (data) { - for (var property in data) { - if (data.hasOwnProperty(property)) - (this)[property] = (data)[property]; - } - } - } - - init(_data?: any) { - if (_data) { - this.baseType = _data["baseType"]; - this.isEnum = _data["isEnum"]; - if (Array.isArray(_data["enumNames"])) { - this.enumNames = [] as any; - for (let item of _data["enumNames"]) - this.enumNames!.push(item); - } - if (Array.isArray(_data["enumValues"])) { - this.enumValues = [] as any; - for (let item of _data["enumValues"]) - this.enumValues!.push(item); - } - if (Array.isArray(_data["genericArguments"])) { - this.genericArguments = [] as any; - for (let item of _data["genericArguments"]) - this.genericArguments!.push(item); - } - if (Array.isArray(_data["properties"])) { - this.properties = [] as any; - for (let item of _data["properties"]) - this.properties!.push(PropertyApiDescriptionModel.fromJS(item)); - } - } - } - - static fromJS(data: any): TypeApiDescriptionModel { - data = typeof data === 'object' ? data : {}; - let result = new TypeApiDescriptionModel(); - result.init(data); - return result; - } - - toJSON(data?: any) { - data = typeof data === 'object' ? data : {}; - data["baseType"] = this.baseType; - data["isEnum"] = this.isEnum; - if (Array.isArray(this.enumNames)) { - data["enumNames"] = []; - for (let item of this.enumNames) - data["enumNames"].push(item); - } - if (Array.isArray(this.enumValues)) { - data["enumValues"] = []; - for (let item of this.enumValues) - data["enumValues"].push(item); - } - if (Array.isArray(this.genericArguments)) { - data["genericArguments"] = []; - for (let item of this.genericArguments) - data["genericArguments"].push(item); - } - if (Array.isArray(this.properties)) { - data["properties"] = []; - for (let item of this.properties) - data["properties"].push(item.toJSON()); - } - return data; - } + baseType!: string | undefined; + isEnum!: boolean; + enumNames!: string[] | undefined; + enumValues!: any[] | undefined; + genericArguments!: string[] | undefined; + properties!: PropertyApiDescriptionModel[] | undefined; + + constructor(data?: ITypeApiDescriptionModel) { + if (data) { + for (var property in data) { + if (data.hasOwnProperty(property)) (this)[property] = (data)[property]; + } + } + } + + init(_data?: any) { + if (_data) { + this.baseType = _data['baseType']; + this.isEnum = _data['isEnum']; + if (Array.isArray(_data['enumNames'])) { + this.enumNames = [] as any; + for (let item of _data['enumNames']) this.enumNames!.push(item); + } + if (Array.isArray(_data['enumValues'])) { + this.enumValues = [] as any; + for (let item of _data['enumValues']) this.enumValues!.push(item); + } + if (Array.isArray(_data['genericArguments'])) { + this.genericArguments = [] as any; + for (let item of _data['genericArguments']) this.genericArguments!.push(item); + } + if (Array.isArray(_data['properties'])) { + this.properties = [] as any; + for (let item of _data['properties']) + this.properties!.push(PropertyApiDescriptionModel.fromJS(item)); + } + } + } + + static fromJS(data: any): TypeApiDescriptionModel { + data = typeof data === 'object' ? data : {}; + let result = new TypeApiDescriptionModel(); + result.init(data); + return result; + } + + toJSON(data?: any) { + data = typeof data === 'object' ? data : {}; + data['baseType'] = this.baseType; + data['isEnum'] = this.isEnum; + if (Array.isArray(this.enumNames)) { + data['enumNames'] = []; + for (let item of this.enumNames) data['enumNames'].push(item); + } + if (Array.isArray(this.enumValues)) { + data['enumValues'] = []; + for (let item of this.enumValues) data['enumValues'].push(item); + } + if (Array.isArray(this.genericArguments)) { + data['genericArguments'] = []; + for (let item of this.genericArguments) data['genericArguments'].push(item); + } + if (Array.isArray(this.properties)) { + data['properties'] = []; + for (let item of this.properties) data['properties'].push(item.toJSON()); + } + return data; + } } export interface ITypeApiDescriptionModel { - baseType: string | undefined; - isEnum: boolean; - enumNames: string[] | undefined; - enumValues: any[] | undefined; - genericArguments: string[] | undefined; - properties: PropertyApiDescriptionModel[] | undefined; + baseType: string | undefined; + isEnum: boolean; + enumNames: string[] | undefined; + enumValues: any[] | undefined; + genericArguments: string[] | undefined; + properties: PropertyApiDescriptionModel[] | undefined; } export class UpdateConnectionStringInput implements IUpdateConnectionStringInput { - id!: string; - connectionString!: string; + id!: string; + connectionString!: string; - constructor(data?: IUpdateConnectionStringInput) { - if (data) { - for (var property in data) { - if (data.hasOwnProperty(property)) - (this)[property] = (data)[property]; - } - } + constructor(data?: IUpdateConnectionStringInput) { + 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.connectionString = _data["connectionString"]; - } + init(_data?: any) { + if (_data) { + this.id = _data['id']; + this.connectionString = _data['connectionString']; } + } - static fromJS(data: any): UpdateConnectionStringInput { - data = typeof data === 'object' ? data : {}; - let result = new UpdateConnectionStringInput(); - result.init(data); - return result; - } + static fromJS(data: any): UpdateConnectionStringInput { + data = typeof data === 'object' ? data : {}; + let result = new UpdateConnectionStringInput(); + result.init(data); + return result; + } - toJSON(data?: any) { - data = typeof data === 'object' ? data : {}; - data["id"] = this.id; - data["connectionString"] = this.connectionString; - return data; - } + toJSON(data?: any) { + data = typeof data === 'object' ? data : {}; + data['id'] = this.id; + data['connectionString'] = this.connectionString; + return data; + } } export interface IUpdateConnectionStringInput { - id: string; - connectionString: string; + id: string; + connectionString: string; } export class UpdateDataDictinaryInput implements IUpdateDataDictinaryInput { - id!: string; - code!: string; - displayText!: string; - description!: string | undefined; - - constructor(data?: IUpdateDataDictinaryInput) { - 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.code = _data["code"]; - this.displayText = _data["displayText"]; - this.description = _data["description"]; - } - } - - static fromJS(data: any): UpdateDataDictinaryInput { - data = typeof data === 'object' ? data : {}; - let result = new UpdateDataDictinaryInput(); - 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; - return data; - } + id!: string; + code!: string; + displayText!: string; + description!: string | undefined; + + constructor(data?: IUpdateDataDictinaryInput) { + 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.code = _data['code']; + this.displayText = _data['displayText']; + this.description = _data['description']; + } + } + + static fromJS(data: any): UpdateDataDictinaryInput { + data = typeof data === 'object' ? data : {}; + let result = new UpdateDataDictinaryInput(); + 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; + return data; + } } export interface IUpdateDataDictinaryInput { - id: string; - code: string; - displayText: string; - description: string | undefined; + id: string; + code: string; + displayText: string; + description: string | undefined; } export class UpdateDetailInput implements IUpdateDetailInput { - dataDictionaryId!: string; - id!: string; - displayText!: string; - description!: string | undefined; - order!: number; - - constructor(data?: IUpdateDetailInput) { - if (data) { - for (var property in data) { - if (data.hasOwnProperty(property)) - (this)[property] = (data)[property]; - } - } - } - - init(_data?: any) { - if (_data) { - this.dataDictionaryId = _data["dataDictionaryId"]; - this.id = _data["id"]; - this.displayText = _data["displayText"]; - this.description = _data["description"]; - this.order = _data["order"]; - } - } - - static fromJS(data: any): UpdateDetailInput { - data = typeof data === 'object' ? data : {}; - let result = new UpdateDetailInput(); - result.init(data); - return result; - } - - toJSON(data?: any) { - data = typeof data === 'object' ? data : {}; - data["dataDictionaryId"] = this.dataDictionaryId; - data["id"] = this.id; - data["displayText"] = this.displayText; - data["description"] = this.description; - data["order"] = this.order; - return data; - } + dataDictionaryId!: string; + id!: string; + displayText!: string; + description!: string | undefined; + order!: number; + + constructor(data?: IUpdateDetailInput) { + if (data) { + for (var property in data) { + if (data.hasOwnProperty(property)) (this)[property] = (data)[property]; + } + } + } + + init(_data?: any) { + if (_data) { + this.dataDictionaryId = _data['dataDictionaryId']; + this.id = _data['id']; + this.displayText = _data['displayText']; + this.description = _data['description']; + this.order = _data['order']; + } + } + + static fromJS(data: any): UpdateDetailInput { + data = typeof data === 'object' ? data : {}; + let result = new UpdateDetailInput(); + result.init(data); + return result; + } + + toJSON(data?: any) { + data = typeof data === 'object' ? data : {}; + data['dataDictionaryId'] = this.dataDictionaryId; + data['id'] = this.id; + data['displayText'] = this.displayText; + data['description'] = this.description; + data['order'] = this.order; + return data; + } } export interface IUpdateDetailInput { - dataDictionaryId: string; - id: string; - displayText: string; - description: string | undefined; - order: number; + dataDictionaryId: string; + id: string; + displayText: string; + description: string | undefined; + order: number; } export class UpdateOrganizationUnitInput implements IUpdateOrganizationUnitInput { - displayName!: string; - id!: string; + displayName!: string; + id!: string; - constructor(data?: IUpdateOrganizationUnitInput) { - if (data) { - for (var property in data) { - if (data.hasOwnProperty(property)) - (this)[property] = (data)[property]; - } - } + 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"]; - } + 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; - } + 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; - } + 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; + displayName: string; + id: string; } export class UpdatePermissionDto implements IUpdatePermissionDto { - name!: string | undefined; - isGranted!: boolean; + name!: string | undefined; + isGranted!: boolean; - constructor(data?: IUpdatePermissionDto) { - if (data) { - for (var property in data) { - if (data.hasOwnProperty(property)) - (this)[property] = (data)[property]; - } - } + constructor(data?: IUpdatePermissionDto) { + if (data) { + for (var property in data) { + if (data.hasOwnProperty(property)) (this)[property] = (data)[property]; + } } + } - init(_data?: any) { - if (_data) { - this.name = _data["name"]; - this.isGranted = _data["isGranted"]; - } + init(_data?: any) { + if (_data) { + this.name = _data['name']; + this.isGranted = _data['isGranted']; } + } - static fromJS(data: any): UpdatePermissionDto { - data = typeof data === 'object' ? data : {}; - let result = new UpdatePermissionDto(); - result.init(data); - return result; - } + static fromJS(data: any): UpdatePermissionDto { + data = typeof data === 'object' ? data : {}; + let result = new UpdatePermissionDto(); + result.init(data); + return result; + } - toJSON(data?: any) { - data = typeof data === 'object' ? data : {}; - data["name"] = this.name; - data["isGranted"] = this.isGranted; - return data; - } + toJSON(data?: any) { + data = typeof data === 'object' ? data : {}; + data['name'] = this.name; + data['isGranted'] = this.isGranted; + return data; + } } export interface IUpdatePermissionDto { - name: string | undefined; - isGranted: boolean; + name: string | undefined; + isGranted: boolean; } export class UpdatePermissionsDto implements IUpdatePermissionsDto { - permissions!: UpdatePermissionDto[] | undefined; + permissions!: UpdatePermissionDto[] | undefined; - constructor(data?: IUpdatePermissionsDto) { - if (data) { - for (var property in data) { - if (data.hasOwnProperty(property)) - (this)[property] = (data)[property]; - } - } + constructor(data?: IUpdatePermissionsDto) { + if (data) { + for (var property in data) { + if (data.hasOwnProperty(property)) (this)[property] = (data)[property]; + } } + } - init(_data?: any) { - if (_data) { - if (Array.isArray(_data["permissions"])) { - this.permissions = [] as any; - for (let item of _data["permissions"]) - this.permissions!.push(UpdatePermissionDto.fromJS(item)); - } - } + init(_data?: any) { + if (_data) { + if (Array.isArray(_data['permissions'])) { + this.permissions = [] as any; + for (let item of _data['permissions']) + this.permissions!.push(UpdatePermissionDto.fromJS(item)); + } } + } - static fromJS(data: any): UpdatePermissionsDto { - data = typeof data === 'object' ? data : {}; - let result = new UpdatePermissionsDto(); - result.init(data); - return result; - } + static fromJS(data: any): UpdatePermissionsDto { + data = typeof data === 'object' ? data : {}; + let result = new UpdatePermissionsDto(); + result.init(data); + return result; + } - toJSON(data?: any) { - data = typeof data === 'object' ? data : {}; - if (Array.isArray(this.permissions)) { - data["permissions"] = []; - for (let item of this.permissions) - data["permissions"].push(item.toJSON()); - } - return data; + toJSON(data?: any) { + data = typeof data === 'object' ? data : {}; + if (Array.isArray(this.permissions)) { + data['permissions'] = []; + for (let item of this.permissions) data['permissions'].push(item.toJSON()); } + return data; + } } export interface IUpdatePermissionsDto { - permissions: UpdatePermissionDto[] | undefined; + permissions: UpdatePermissionDto[] | undefined; } export class UpdateRoleInput implements IUpdateRoleInput { - roleId!: string; - roleInfo!: IdentityRoleUpdateDto; + roleId!: string; + roleInfo!: IdentityRoleUpdateDto; - constructor(data?: IUpdateRoleInput) { - if (data) { - for (var property in data) { - if (data.hasOwnProperty(property)) - (this)[property] = (data)[property]; - } - } + constructor(data?: IUpdateRoleInput) { + 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.roleInfo = _data["roleInfo"] ? IdentityRoleUpdateDto.fromJS(_data["roleInfo"]) : undefined; - } + init(_data?: any) { + if (_data) { + this.roleId = _data['roleId']; + this.roleInfo = _data['roleInfo'] + ? IdentityRoleUpdateDto.fromJS(_data['roleInfo']) + : undefined; } + } - static fromJS(data: any): UpdateRoleInput { - data = typeof data === 'object' ? data : {}; - let result = new UpdateRoleInput(); - result.init(data); - return result; - } + static fromJS(data: any): UpdateRoleInput { + data = typeof data === 'object' ? data : {}; + let result = new UpdateRoleInput(); + result.init(data); + return result; + } - toJSON(data?: any) { - data = typeof data === 'object' ? data : {}; - data["roleId"] = this.roleId; - data["roleInfo"] = this.roleInfo ? this.roleInfo.toJSON() : undefined; - return data; - } + toJSON(data?: any) { + data = typeof data === 'object' ? data : {}; + data['roleId'] = this.roleId; + data['roleInfo'] = this.roleInfo ? this.roleInfo.toJSON() : undefined; + return data; + } } export interface IUpdateRoleInput { - roleId: string; - roleInfo: IdentityRoleUpdateDto; + roleId: string; + roleInfo: IdentityRoleUpdateDto; } export class UpdateRolePermissionsInput implements IUpdateRolePermissionsInput { - providerName!: string; - providerKey!: string; - updatePermissionsDto!: UpdatePermissionsDto; - - constructor(data?: IUpdateRolePermissionsInput) { - if (data) { - for (var property in data) { - if (data.hasOwnProperty(property)) - (this)[property] = (data)[property]; - } - } - } - - init(_data?: any) { - if (_data) { - this.providerName = _data["providerName"]; - this.providerKey = _data["providerKey"]; - this.updatePermissionsDto = _data["updatePermissionsDto"] ? UpdatePermissionsDto.fromJS(_data["updatePermissionsDto"]) : undefined; - } - } - - static fromJS(data: any): UpdateRolePermissionsInput { - data = typeof data === 'object' ? data : {}; - let result = new UpdateRolePermissionsInput(); - result.init(data); - return result; - } - - toJSON(data?: any) { - data = typeof data === 'object' ? data : {}; - data["providerName"] = this.providerName; - data["providerKey"] = this.providerKey; - data["updatePermissionsDto"] = this.updatePermissionsDto ? this.updatePermissionsDto.toJSON() : undefined; - return data; - } + providerName!: string; + providerKey!: string; + updatePermissionsDto!: UpdatePermissionsDto; + + constructor(data?: IUpdateRolePermissionsInput) { + if (data) { + for (var property in data) { + if (data.hasOwnProperty(property)) (this)[property] = (data)[property]; + } + } + } + + init(_data?: any) { + if (_data) { + this.providerName = _data['providerName']; + this.providerKey = _data['providerKey']; + this.updatePermissionsDto = _data['updatePermissionsDto'] + ? UpdatePermissionsDto.fromJS(_data['updatePermissionsDto']) + : undefined; + } + } + + static fromJS(data: any): UpdateRolePermissionsInput { + data = typeof data === 'object' ? data : {}; + let result = new UpdateRolePermissionsInput(); + result.init(data); + return result; + } + + toJSON(data?: any) { + data = typeof data === 'object' ? data : {}; + data['providerName'] = this.providerName; + data['providerKey'] = this.providerKey; + data['updatePermissionsDto'] = this.updatePermissionsDto + ? this.updatePermissionsDto.toJSON() + : undefined; + return data; + } } export interface IUpdateRolePermissionsInput { - providerName: string; - providerKey: string; - updatePermissionsDto: UpdatePermissionsDto; + providerName: string; + providerKey: string; + updatePermissionsDto: UpdatePermissionsDto; } export class UpdateSettingInput implements IUpdateSettingInput { - values!: { [key: string]: string; } | undefined; + values!: { [key: string]: string } | undefined; - constructor(data?: IUpdateSettingInput) { - if (data) { - for (var property in data) { - if (data.hasOwnProperty(property)) - (this)[property] = (data)[property]; - } - } + constructor(data?: IUpdateSettingInput) { + if (data) { + for (var property in data) { + if (data.hasOwnProperty(property)) (this)[property] = (data)[property]; + } } + } - 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]; - } - } + 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]; } + } } + } - static fromJS(data: any): UpdateSettingInput { - data = typeof data === 'object' ? data : {}; - let result = new UpdateSettingInput(); - result.init(data); - return result; - } + static fromJS(data: any): UpdateSettingInput { + data = typeof data === 'object' ? data : {}; + let result = new UpdateSettingInput(); + 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]; - } - } - return data; + 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]; + } } + return data; + } } export interface IUpdateSettingInput { - values: { [key: string]: string; } | undefined; + values: { [key: string]: string } | undefined; } export class UpdateTenantInput implements IUpdateTenantInput { - id!: string; - name!: string; + id!: string; + name!: string; - constructor(data?: IUpdateTenantInput) { - if (data) { - for (var property in data) { - if (data.hasOwnProperty(property)) - (this)[property] = (data)[property]; - } - } + constructor(data?: IUpdateTenantInput) { + 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"]; - } + init(_data?: any) { + if (_data) { + this.id = _data['id']; + this.name = _data['name']; } + } - static fromJS(data: any): UpdateTenantInput { - data = typeof data === 'object' ? data : {}; - let result = new UpdateTenantInput(); - result.init(data); - return result; - } + static fromJS(data: any): UpdateTenantInput { + data = typeof data === 'object' ? data : {}; + let result = new UpdateTenantInput(); + result.init(data); + return result; + } - toJSON(data?: any) { - data = typeof data === 'object' ? data : {}; - data["id"] = this.id; - data["name"] = this.name; - return data; - } + toJSON(data?: any) { + data = typeof data === 'object' ? data : {}; + data['id'] = this.id; + data['name'] = this.name; + return data; + } } export interface IUpdateTenantInput { - id: string; - name: string; + id: string; + name: string; } export class UpdateUserInput implements IUpdateUserInput { - userId!: string; - userInfo!: IdentityUserUpdateDto; + userId!: string; + userInfo!: IdentityUserUpdateDto; - constructor(data?: IUpdateUserInput) { - if (data) { - for (var property in data) { - if (data.hasOwnProperty(property)) - (this)[property] = (data)[property]; - } - } + constructor(data?: IUpdateUserInput) { + 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.userInfo = _data["userInfo"] ? IdentityUserUpdateDto.fromJS(_data["userInfo"]) : undefined; - } + init(_data?: any) { + if (_data) { + this.userId = _data['userId']; + this.userInfo = _data['userInfo'] + ? IdentityUserUpdateDto.fromJS(_data['userInfo']) + : undefined; } + } - static fromJS(data: any): UpdateUserInput { - data = typeof data === 'object' ? data : {}; - let result = new UpdateUserInput(); - result.init(data); - return result; - } + static fromJS(data: any): UpdateUserInput { + data = typeof data === 'object' ? data : {}; + let result = new UpdateUserInput(); + result.init(data); + return result; + } - toJSON(data?: any) { - data = typeof data === 'object' ? data : {}; - data["userId"] = this.userId; - data["userInfo"] = this.userInfo ? this.userInfo.toJSON() : undefined; - return data; - } + toJSON(data?: any) { + data = typeof data === 'object' ? data : {}; + data['userId'] = this.userId; + data['userInfo'] = this.userInfo ? this.userInfo.toJSON() : undefined; + return data; + } } export interface IUpdateUserInput { - userId: string; - userInfo: IdentityUserUpdateDto; + userId: string; + userInfo: IdentityUserUpdateDto; } export class UserLoginInfo implements IUserLoginInfo { - userNameOrEmailAddress!: string; - password!: string; - rememberMe!: boolean; - - constructor(data?: IUserLoginInfo) { - if (data) { - for (var property in data) { - if (data.hasOwnProperty(property)) - (this)[property] = (data)[property]; - } - } - } - - init(_data?: any) { - if (_data) { - this.userNameOrEmailAddress = _data["userNameOrEmailAddress"]; - this.password = _data["password"]; - this.rememberMe = _data["rememberMe"]; - } - } - - static fromJS(data: any): UserLoginInfo { - data = typeof data === 'object' ? data : {}; - let result = new UserLoginInfo(); - result.init(data); - return result; - } - - toJSON(data?: any) { - data = typeof data === 'object' ? data : {}; - data["userNameOrEmailAddress"] = this.userNameOrEmailAddress; - data["password"] = this.password; - data["rememberMe"] = this.rememberMe; - return data; - } + userNameOrEmailAddress!: string; + password!: string; + rememberMe!: boolean; + + constructor(data?: IUserLoginInfo) { + if (data) { + for (var property in data) { + if (data.hasOwnProperty(property)) (this)[property] = (data)[property]; + } + } + } + + init(_data?: any) { + if (_data) { + this.userNameOrEmailAddress = _data['userNameOrEmailAddress']; + this.password = _data['password']; + this.rememberMe = _data['rememberMe']; + } + } + + static fromJS(data: any): UserLoginInfo { + data = typeof data === 'object' ? data : {}; + let result = new UserLoginInfo(); + result.init(data); + return result; + } + + toJSON(data?: any) { + data = typeof data === 'object' ? data : {}; + data['userNameOrEmailAddress'] = this.userNameOrEmailAddress; + data['password'] = this.password; + data['rememberMe'] = this.rememberMe; + return data; + } } export interface IUserLoginInfo { - userNameOrEmailAddress: string; - password: string; - rememberMe: boolean; + userNameOrEmailAddress: string; + password: string; + rememberMe: boolean; } export class WindowsTimeZone implements IWindowsTimeZone { - timeZoneId!: string | undefined; + timeZoneId!: string | undefined; - constructor(data?: IWindowsTimeZone) { - if (data) { - for (var property in data) { - if (data.hasOwnProperty(property)) - (this)[property] = (data)[property]; - } - } + constructor(data?: IWindowsTimeZone) { + if (data) { + for (var property in data) { + if (data.hasOwnProperty(property)) (this)[property] = (data)[property]; + } } + } - init(_data?: any) { - if (_data) { - this.timeZoneId = _data["timeZoneId"]; - } + init(_data?: any) { + if (_data) { + this.timeZoneId = _data['timeZoneId']; } + } - static fromJS(data: any): WindowsTimeZone { - data = typeof data === 'object' ? data : {}; - let result = new WindowsTimeZone(); - result.init(data); - return result; - } + static fromJS(data: any): WindowsTimeZone { + data = typeof data === 'object' ? data : {}; + let result = new WindowsTimeZone(); + result.init(data); + return result; + } - toJSON(data?: any) { - data = typeof data === 'object' ? data : {}; - data["timeZoneId"] = this.timeZoneId; - return data; - } + toJSON(data?: any) { + data = typeof data === 'object' ? data : {}; + data['timeZoneId'] = this.timeZoneId; + return data; + } } export interface IWindowsTimeZone { - timeZoneId: string | undefined; + timeZoneId: string | undefined; } export interface FileResponse { - data: Blob; - status: number; - fileName?: string; - headers?: { [name: string]: any }; + data: Blob; + status: number; + fileName?: string; + headers?: { [name: string]: any }; } export class ApiException extends Error { - message: string; - status: number; - response: string; - headers: { [key: string]: any; }; - result: any; - - constructor(message: string, status: number, response: string, headers: { [key: string]: any; }, result: any) { - super(); - - this.message = message; - this.status = status; - this.response = response; - this.headers = headers; - this.result = result; - } - - protected isApiException = true; - - static isApiException(obj: any): obj is ApiException { - return obj.isApiException === true; - } -} - -function throwException(message: string, status: number, response: string, headers: { [key: string]: any; }, result?: any): any { - if (result !== null && result !== undefined) - throw result; - else - throw new ApiException(message, status, response, headers, null); + message: string; + status: number; + response: string; + headers: { [key: string]: any }; + result: any; + + constructor( + message: string, + status: number, + response: string, + headers: { [key: string]: any }, + result: any, + ) { + super(); + + this.message = message; + this.status = status; + this.response = response; + this.headers = headers; + this.result = result; + } + + protected isApiException = true; + + static isApiException(obj: any): obj is ApiException { + return obj.isApiException === true; + } +} + +function throwException( + message: string, + status: number, + response: string, + headers: { [key: string]: any }, + result?: any, +): any { + if (result !== null && result !== undefined) throw result; + else throw new ApiException(message, status, response, headers, null); } function isAxiosError(obj: any | undefined): obj is AxiosError { - return obj && obj.isAxiosError === true; -} \ No newline at end of file + return obj && obj.isAxiosError === true; +} diff --git a/vben28/src/views/admin/dictionary/AbpDictionary.ts b/vben28/src/views/admin/dictionary/AbpDictionary.ts index 2274978d..63dd6f6a 100644 --- a/vben28/src/views/admin/dictionary/AbpDictionary.ts +++ b/vben28/src/views/admin/dictionary/AbpDictionary.ts @@ -1,39 +1,39 @@ -import { FormSchema } from "/@/components/Table"; -import { BasicColumn } from "/@/components/Table"; -import { message } from "ant-design-vue"; -import { useI18n } from "/@/hooks/web/useI18n"; +import { FormSchema } from '/@/components/Table'; +import { BasicColumn } from '/@/components/Table'; +import { message } from 'ant-design-vue'; +import { useI18n } from '/@/hooks/web/useI18n'; import { PagingDataDictionaryInput, DataDictionaryServiceProxy, SetDataDictinaryDetailInput, DeleteDataDictionaryDetailInput, - IdInput -} from "/@/services/ServiceProxies"; -import { h } from "vue"; -import { Switch } from "ant-design-vue"; + IdInput, +} from '/@/services/ServiceProxies'; +import { h } from 'vue'; +import { Switch } from 'ant-design-vue'; const { t } = useI18n(); export const tableColumns: BasicColumn[] = [ { - title: t("routes.admin.dictionaryCode"), - dataIndex: "code" + title: t('routes.admin.dictionaryCode'), + dataIndex: 'code', }, { - title: t("routes.admin.dictionaryDisplayText"), - dataIndex: "displayText" + title: t('routes.admin.dictionaryDisplayText'), + dataIndex: 'displayText', }, { - title: t("routes.admin.dictionaryOrder"), - dataIndex: "order" + title: t('routes.admin.dictionaryOrder'), + dataIndex: 'order', }, { - title: t("common.status"), - dataIndex: "isEnabled", + title: t('common.status'), + dataIndex: 'isEnabled', customRender: ({ record }) => { return h(Switch, { checked: record.isEnabled, - checkedChildren: "是", - unCheckedChildren: "否", + checkedChildren: '是', + unCheckedChildren: '否', onChange(checked: boolean) { const request = new SetDataDictinaryDetailInput(); request.dataDictionaryId = record.dataDictionaryId; @@ -42,99 +42,96 @@ export const tableColumns: BasicColumn[] = [ enableDictionaryAsync(request) .then(() => { record.isEnabled = checked; - message.success(t("common.operationSuccess")); }) - .catch(() => { - message.error(t("common.operationFail")); - }); - } + .catch(() => {}); + }, }); - } + }, }, { - dataIndex: "description", - title: t("routes.admin.dictionaryDescription") - } + dataIndex: 'description', + title: t('routes.admin.dictionaryDescription'), + }, ]; //字典类型表格 export const dictionaryTypeTableColumns: BasicColumn[] = [ { - title: t("routes.admin.dictionaryCode") + "|" + t("routes.admin.dictionaryDisplayText"), - dataIndex: "text", - align: "left" - } + title: t('routes.admin.dictionaryCode') + '|' + t('routes.admin.dictionaryDisplayText'), + dataIndex: 'text', + align: 'left', + }, ]; //字典项查询 export const searchFormSchema: FormSchema[] = [ { - field: "filter", - label: "", - component: "Input", + field: 'filter', + label: '', + component: 'Input', colProps: { - span: 6 - } - } + span: 6, + }, + }, ]; //字典类型查询 export const searchDictionaryFormSchema: FormSchema[] = [ { - field: "filter", - label: "", - component: "Input", + field: 'filter', + label: '', + component: 'Input', colProps: { - span: 18 - } - } + span: 18, + }, + }, ]; //新增字典项 export const createFormSchema: FormSchema[] = [ { - field: "id", - label: "", + field: 'id', + label: '', ifShow: false, - component: "Input", + component: 'Input', colProps: { - span: 18 - } + span: 18, + }, }, { - field: "typeDisplayText", - label: t("routes.admin.dictionaryTypeName"), - component: "Input", + field: 'typeDisplayText', + label: t('routes.admin.dictionaryTypeName'), + component: 'Input', colProps: { - span: 18 + span: 18, }, componentProps: { - disabled: true - } + disabled: true, + }, }, { - field: "code", - label: t("routes.admin.dictionaryCode"), + field: 'code', + label: t('routes.admin.dictionaryCode'), required: true, - component: "Input", + component: 'Input', colProps: { - span: 18 - } + span: 18, + }, }, { - field: "displayText", - label: t("routes.admin.dictionaryDisplayText"), - component: "Input", + field: 'displayText', + label: t('routes.admin.dictionaryDisplayText'), + component: 'Input', required: true, colProps: { - span: 18 - } + span: 18, + }, }, { - field: "order", - label: t("routes.admin.dictionaryOrder"), + field: 'order', + label: t('routes.admin.dictionaryOrder'), required: true, - component: "InputNumber", + component: 'InputNumber', colProps: { - span: 18 + span: 18, }, dynamicRules: () => { return [ @@ -145,69 +142,69 @@ export const createFormSchema: FormSchema[] = [ if (regNull.test(value)) { return Promise.resolve(); } - return Promise.reject(t("routes.admin.nonZeroMessage")); - } - } + return Promise.reject(t('routes.admin.nonZeroMessage')); + }, + }, ]; - } + }, }, { - field: "description", - label: t("routes.admin.dictionaryDescription"), - component: "InputTextArea", + field: 'description', + label: t('routes.admin.dictionaryDescription'), + component: 'InputTextArea', colProps: { - span: 18 - } - } + span: 18, + }, + }, ]; //编辑字典项 export const editFormSchema: FormSchema[] = [ { - field: "dataDictionaryId", - label: "", + field: 'dataDictionaryId', + label: '', ifShow: false, - component: "Input", + component: 'Input', colProps: { - span: 18 - } + span: 18, + }, }, { - field: "id", - label: "", + field: 'id', + label: '', ifShow: false, - component: "Input", + component: 'Input', colProps: { - span: 18 - } + span: 18, + }, }, { - field: "code", - label: t("routes.admin.dictionaryCode"), + field: 'code', + label: t('routes.admin.dictionaryCode'), required: true, - component: "Input", + component: 'Input', colProps: { - span: 18 + span: 18, }, componentProps: { - disabled: true - } + disabled: true, + }, }, { - field: "displayText", - label: t("routes.admin.dictionaryDisplayText"), - component: "Input", + field: 'displayText', + label: t('routes.admin.dictionaryDisplayText'), + component: 'Input', required: true, colProps: { - span: 18 - } + span: 18, + }, }, { - field: "order", - label: t("routes.admin.dictionaryOrder"), + field: 'order', + label: t('routes.admin.dictionaryOrder'), required: true, - component: "InputNumber", + component: 'InputNumber', colProps: { - span: 18 + span: 18, }, dynamicRules: () => { return [ @@ -218,99 +215,99 @@ export const editFormSchema: FormSchema[] = [ if (regNull.test(value)) { return Promise.resolve(); } - return Promise.reject(t("routes.admin.nonZeroMessage")); - } - } + return Promise.reject(t('routes.admin.nonZeroMessage')); + }, + }, ]; - } + }, }, { - field: "description", - label: t("routes.admin.dictionaryDescription"), - component: "InputTextArea", + field: 'description', + label: t('routes.admin.dictionaryDescription'), + component: 'InputTextArea', colProps: { - span: 18 - } - } + span: 18, + }, + }, ]; //新增字典类型 export const createDictionaryTypeFormSchema: FormSchema[] = [ { - field: "code", - label: t("routes.admin.dictionaryCode"), - component: "Input", + field: 'code', + label: t('routes.admin.dictionaryCode'), + component: 'Input', required: true, colProps: { - span: 22 - } + span: 22, + }, }, { - field: "displayText", - label: t("routes.admin.dictionaryDisplayText"), - component: "Input", + field: 'displayText', + label: t('routes.admin.dictionaryDisplayText'), + component: 'Input', required: true, colProps: { - span: 22 - } + span: 22, + }, }, { - field: "description", - label: t("routes.admin.dictionaryDescription"), - component: "InputTextArea", + field: 'description', + label: t('routes.admin.dictionaryDescription'), + component: 'InputTextArea', colProps: { - span: 22 - } - } + span: 22, + }, + }, ]; //编辑字典类型 export const editDictionaryTypeFormSchema: FormSchema[] = [ { - field: "code", - label: t("routes.admin.dictionaryCode"), - component: "Input", + field: 'code', + label: t('routes.admin.dictionaryCode'), + component: 'Input', required: true, colProps: { - span: 22 + span: 22, }, componentProps: { - disabled: true - } + disabled: true, + }, }, { - field: "displayText", - label: t("routes.admin.dictionaryDisplayText"), - component: "Input", + field: 'displayText', + label: t('routes.admin.dictionaryDisplayText'), + component: 'Input', required: true, colProps: { - span: 22 - } + span: 22, + }, }, { - field: "description", - label: t("routes.admin.dictionaryDescription"), - component: "InputTextArea", + field: 'description', + label: t('routes.admin.dictionaryDescription'), + component: 'InputTextArea', colProps: { - span: 22 - } + span: 22, + }, }, { - field: "key", - label: "", + field: 'key', + label: '', ifShow: false, - component: "Input", + component: 'Input', colProps: { - span: 18 - } + span: 18, + }, }, { - field: "id", - label: "", + field: 'id', + label: '', ifShow: false, - component: "Input", + component: 'Input', colProps: { - span: 18 - } - } + span: 18, + }, + }, ]; /** @@ -330,13 +327,13 @@ export async function createDictionaryTypeAsync({ changeOkLoading, closeModal, validate, - resetFields + resetFields, }) { changeOkLoading(true); await validate(); const _dataDictionaryServiceProxy = new DataDictionaryServiceProxy(); await _dataDictionaryServiceProxy.create(request); - message.success(t("common.operationSuccess")); + message.success(t('common.operationSuccess')); resetFields(); changeOkLoading(false); closeModal(); @@ -348,7 +345,7 @@ export async function editDictionaryTypeAsync({ request, changeOkLoading, valida await validate(); const _dataDictionaryServiceProxy = new DataDictionaryServiceProxy(); await _dataDictionaryServiceProxy.update(request); - message.success(t("common.operationSuccess")); + message.success(t('common.operationSuccess')); changeOkLoading(false); closeModal(); } @@ -365,13 +362,13 @@ export async function createDetailsDictionaryAsync({ changeOkLoading, validate, resetFields, - closeModal + closeModal, }) { changeOkLoading(true); await validate(); const _dataDictionaryServiceProxy = new DataDictionaryServiceProxy(); await _dataDictionaryServiceProxy.createDetail(request); - message.success(t("common.operationSuccess")); + message.success(t('common.operationSuccess')); resetFields(); changeOkLoading(false); closeModal(); @@ -389,13 +386,13 @@ export async function editDetailsDictionaryAsync({ request, changeOkLoading, validate, - closeModal + closeModal, }) { changeOkLoading(true); await validate(); const _dataDictionaryServiceProxy = new DataDictionaryServiceProxy(); await _dataDictionaryServiceProxy.updateDetail(request); - message.success(t("common.operationSuccess")); + message.success(t('common.operationSuccess')); changeOkLoading(false); closeModal(); } @@ -413,6 +410,6 @@ export async function deleteDictionaryTypeAsync({ id, reloadType }) { const _dataDictionaryServiceProxy = new DataDictionaryServiceProxy(); const request = new IdInput(); request.id = id; - await _dataDictionaryServiceProxy.deleteDictinaryType(request); + await _dataDictionaryServiceProxy.deleteDataDictionaryType(request); reloadType(); } diff --git a/vben28/src/views/admin/dictionary/AbpDictionary.vue b/vben28/src/views/admin/dictionary/AbpDictionary.vue index 195ad204..b5e3833f 100644 --- a/vben28/src/views/admin/dictionary/AbpDictionary.vue +++ b/vben28/src/views/admin/dictionary/AbpDictionary.vue @@ -8,13 +8,12 @@ @selection-change="onSelectChange" :clickToRowSelect="false" > - + diff --git a/vben28/src/views/admin/settings/Setting.vue b/vben28/src/views/admin/settings/Setting.vue index 338ab6a0..1cb3f8e8 100644 --- a/vben28/src/views/admin/settings/Setting.vue +++ b/vben28/src/views/admin/settings/Setting.vue @@ -19,8 +19,8 @@ @update:checked="(val) => (setting.value = val)" > + {{ setting.description }} - {{ setting.description }} import { defineComponent, reactive, toRefs, onMounted } from 'vue'; import { Tabs } from 'ant-design-vue'; - import { CollapseContainer,ScrollContainer } from '/@/components/Container/index'; + import { CollapseContainer, ScrollContainer } from '/@/components/Container/index'; import { SettingOutput, UpdateSettingInput } from '/@/services/ServiceProxies'; - import { getAllSettingsAsync, updateSettingsAsync } from "/@/views/admin/settings/Setting"; + import { getAllSettingsAsync, updateSettingsAsync } from '/@/views/admin/settings/Setting'; import { useI18n } from '/@/hooks/web/useI18n'; import { PageWrapper } from '/@/components/Page'; import { message } from 'ant-design-vue'; @@ -71,7 +71,6 @@ const updateSettingValues = async (item: any) => { try { - const prefix = 'setting_'; const request = new UpdateSettingInput(); request.values as {};