| | | 1 | | using Elsa.Common.Entities; |
| | | 2 | | using System.Text.Json.Serialization; |
| | | 3 | | |
| | | 4 | | namespace Elsa.Connections.Models; |
| | | 5 | | |
| | | 6 | | public sealed class IntegrationConnection : Entity |
| | | 7 | | { |
| | 1211 | 8 | | public string EnvironmentId { get; set; } = default!; |
| | 1351 | 9 | | public string ProviderId { get; set; } = default!; |
| | 1351 | 10 | | public string ProviderAccountId { get; set; } = default!; |
| | 1479 | 11 | | public ConnectionStatus Status { get; set; } = ConnectionStatus.Active; |
| | 3234 | 12 | | public long Revision { get; set; } = 1; |
| | | 13 | | /// <summary>Nonsecret scheduling classification for the published generation. Null means legacy or unknown and is n |
| | | 14 | | [JsonIgnore] |
| | 1117 | 15 | | public ConnectionCredentialKind? CredentialKind { get; set; } |
| | | 16 | | /// <summary>OAuth access-token expiry copied atomically when its generation is published. API keys have no expiry.< |
| | | 17 | | [JsonIgnore] |
| | 1338 | 18 | | public DateTimeOffset? CredentialExpiresAt { get; set; } |
| | | 19 | | [JsonIgnore] |
| | 1356 | 20 | | public string? CurrentSecretName { get; set; } |
| | | 21 | | |
| | | 22 | | [JsonIgnore] |
| | 1497 | 23 | | public string? CurrentGenerationId { get; set; } |
| | | 24 | | |
| | | 25 | | [JsonIgnore] |
| | 90 | 26 | | public string? OperationId { get; set; } |
| | | 27 | | [JsonIgnore] |
| | 84 | 28 | | public long OperationExpectedRevision { get; set; } |
| | | 29 | | [JsonIgnore] |
| | 116 | 30 | | public long OperationFence { get; set; } |
| | | 31 | | [JsonIgnore] |
| | 56 | 32 | | public DateTimeOffset? OperationLeaseExpiresAt { get; set; } |
| | | 33 | | [JsonIgnore] |
| | 1461 | 34 | | public CredentialOperationStatus OperationStatus { get; set; } |
| | | 35 | | [JsonIgnore] |
| | 7 | 36 | | public string? OperationSourceGenerationId { get; set; } |
| | | 37 | | [JsonIgnore] |
| | 63 | 38 | | public string? PlannedSecretName { get; set; } |
| | | 39 | | [JsonIgnore] |
| | 82 | 40 | | public string? PlannedGenerationId { get; set; } |
| | | 41 | | [JsonIgnore] |
| | 0 | 42 | | public string? StagedSecretName { get; set; } |
| | | 43 | | [JsonIgnore] |
| | 17 | 44 | | public string? StagedGenerationId { get; set; } |
| | | 45 | | [JsonIgnore] |
| | 3 | 46 | | public ConnectionCredentialKind? StagedCredentialKind { get; set; } |
| | | 47 | | [JsonIgnore] |
| | 219 | 48 | | public DateTimeOffset? StagedCredentialExpiresAt { get; set; } |
| | | 49 | | [JsonIgnore] |
| | 0 | 50 | | public string? LastSafeErrorCode { get; set; } |
| | | 51 | | } |
| | | 52 | | |
| | | 53 | | public enum ConnectionStatus |
| | | 54 | | { |
| | | 55 | | Active, |
| | | 56 | | Disconnected, |
| | | 57 | | RecoveryRequired |
| | | 58 | | } |
| | | 59 | | |
| | | 60 | | public enum CredentialOperationStatus |
| | | 61 | | { |
| | | 62 | | None, |
| | | 63 | | Claimed, |
| | | 64 | | ProviderCallStarted, |
| | | 65 | | CredentialReceived, |
| | | 66 | | Staged, |
| | | 67 | | Completed, |
| | | 68 | | RecoveryRequired |
| | | 69 | | } |