| | | 1 | | using System.Text.Json; |
| | | 2 | | |
| | | 3 | | namespace Elsa.Api.Client.Resources.ExternalAuthentication.Descriptors.Models; |
| | | 4 | | |
| | | 5 | | public sealed class ExternalAuthenticationAdapterDescriptor |
| | | 6 | | { |
| | | 7 | | public string Type { get; set; } = ""; |
| | | 8 | | public string DisplayName { get; set; } = ""; |
| | | 9 | | public string Description { get; set; } = ""; |
| | | 10 | | public int SettingsVersion { get; set; } |
| | | 11 | | public ICollection<ExternalAuthenticationSettingFieldDescriptor> Fields { get; set; } = []; |
| | | 12 | | public ExternalAuthenticationAdapterCapabilities Capabilities { get; set; } = new(); |
| | | 13 | | public ExternalAuthenticationCustomEditorContract? CustomEditor { get; set; } |
| | | 14 | | } |
| | | 15 | | |
| | | 16 | | public sealed class ExternalAuthenticationPolicyDescriptor |
| | | 17 | | { |
| | | 18 | | public string Type { get; set; } = ""; |
| | | 19 | | public string DisplayName { get; set; } = ""; |
| | | 20 | | public string Description { get; set; } = ""; |
| | | 21 | | public int SettingsVersion { get; set; } |
| | | 22 | | public ICollection<ExternalAuthenticationSettingFieldDescriptor> Fields { get; set; } = []; |
| | | 23 | | public ExternalAuthenticationCustomEditorContract? CustomEditor { get; set; } |
| | | 24 | | } |
| | | 25 | | |
| | | 26 | | public sealed class ExternalAuthenticationPermissionGrantSourceDescriptor |
| | | 27 | | { |
| | | 28 | | public string Type { get; set; } = ""; |
| | | 29 | | public string DisplayName { get; set; } = ""; |
| | | 30 | | public string Description { get; set; } = ""; |
| | | 31 | | public int SettingsVersion { get; set; } |
| | | 32 | | public ICollection<ExternalAuthenticationSettingFieldDescriptor> Fields { get; set; } = []; |
| | | 33 | | public ExternalAuthenticationCustomEditorContract? CustomEditor { get; set; } |
| | | 34 | | } |
| | | 35 | | |
| | | 36 | | public sealed class ExternalAuthenticationPermissionDescriptor |
| | | 37 | | { |
| | | 38 | | public string Name { get; set; } = ""; |
| | | 39 | | public string DisplayName { get; set; } = ""; |
| | | 40 | | public string Description { get; set; } = ""; |
| | | 41 | | public string Category { get; set; } = ""; |
| | | 42 | | } |
| | | 43 | | |
| | | 44 | | public sealed class ExternalAuthenticationSettingFieldDescriptor |
| | | 45 | | { |
| | | 46 | | public string Name { get; set; } = ""; |
| | | 47 | | public string DisplayName { get; set; } = ""; |
| | | 48 | | public string Description { get; set; } = ""; |
| | | 49 | | public string ValueType { get; set; } = ""; |
| | | 50 | | public bool IsRequired { get; set; } |
| | | 51 | | public string UiHint { get; set; } = ""; |
| | | 52 | | public JsonElement? DefaultValue { get; set; } |
| | | 53 | | public ICollection<string> AllowedValues { get; set; } = []; |
| | | 54 | | public ExternalAuthenticationSettingFieldValidation Validation { get; set; } = new(); |
| | | 55 | | public bool IsSecretBinding { get; set; } |
| | | 56 | | public bool IsUnsafe { get; set; } |
| | | 57 | | public ExternalAuthenticationSettingFieldVisibilityCondition? VisibleWhen { get; set; } |
| | | 58 | | public string? HelpText { get; set; } |
| | | 59 | | public bool IsRedacted { get; set; } |
| | | 60 | | } |
| | | 61 | | |
| | | 62 | | public sealed class ExternalAuthenticationSettingFieldValidation |
| | | 63 | | { |
| | | 64 | | public int? MinimumLength { get; set; } |
| | | 65 | | public int? MaximumLength { get; set; } |
| | | 66 | | public string? Pattern { get; set; } |
| | | 67 | | } |
| | | 68 | | |
| | | 69 | | public sealed class ExternalAuthenticationSettingFieldVisibilityCondition |
| | | 70 | | { |
| | 0 | 71 | | public string Field { get; set; } = ""; |
| | 0 | 72 | | public string ExpectedValue { get; set; } = ""; |
| | | 73 | | } |
| | | 74 | | |
| | | 75 | | public sealed class ExternalAuthenticationCustomEditorContract |
| | | 76 | | { |
| | | 77 | | public string Key { get; set; } = ""; |
| | | 78 | | public int ContractVersion { get; set; } |
| | | 79 | | } |
| | | 80 | | |
| | | 81 | | public sealed class ExternalAuthenticationAdapterCapabilities |
| | | 82 | | { |
| | | 83 | | public bool SupportsTest { get; set; } |
| | | 84 | | public bool SupportsPreview { get; set; } |
| | | 85 | | public bool SupportsUpstreamLogout { get; set; } |
| | | 86 | | } |