< Summary

Information
Class: Elsa.Connections.Contracts.IConnectionOffboardingProvider
Assembly: Elsa.Connections
File(s): /home/runner/work/elsa-core/elsa-core/src/modules/Elsa.Connections/Contracts/IConnectionOffboardingProvider.cs
Line coverage
0%
Covered lines: 0
Uncovered lines: 1
Coverable lines: 1
Total lines: 38
Line coverage: 0%
Branch coverage
N/A
Covered branches: 0
Total branches: 0
Branch coverage: N/A
Method coverage

Feature is only available for sponsors

Upgrade to PRO version

Metrics

MethodBranch coverage Crap Score Cyclomatic complexity Line coverage
SupportsStableOperationIdIdempotency(...)100%210%

File(s)

/home/runner/work/elsa-core/elsa-core/src/modules/Elsa.Connections/Contracts/IConnectionOffboardingProvider.cs

#LineLine coverage
 1using Elsa.Connections.Models;
 2
 3namespace Elsa.Connections.Contracts;
 4
 5/// <summary>Host-owned remote offboarding actions with explicit outcome and retry guarantees.</summary>
 6/// <remarks>
 7/// Implementations must report <see cref="SupportsStableOperationIdIdempotency"/> as true for an operation kind only wh
 8/// guarantees at-most-once effects for repeated calls with the same operation ID. Without that guarantee, unknown outco
 9/// remain durable and are not automatically replayed. A retryable failure guarantees the provider knows no remote effec
 10/// </remarks>
 11public interface IConnectionOffboardingProvider
 12{
 13    /// <summary>Whether repeated calls with the same operation ID are guaranteed to produce at most one remote effect.<
 014    bool SupportsStableOperationIdIdempotency(ConnectionOffboardingOperationKind kind) => false;
 15
 16    Task<ConnectionOffboardingProviderResult> RevokeTokenPairAsync(
 17        string providerId,
 18        string providerAccountId,
 19        string operationId,
 20        CredentialMaterial credentials,
 21        CancellationToken cancellationToken = default);
 22
 23    /// <summary>Uses provider-owned host credentials; this operation does not receive or resolve a Connections generati
 24    Task<ConnectionOffboardingProviderResult> UninstallInstallationAsync(
 25        string providerId,
 26        string providerAccountId,
 27        string operationId,
 28        CancellationToken cancellationToken = default);
 29}
 30
 31public enum ConnectionOffboardingProviderResult
 32{
 33    Succeeded,
 34    /// <summary>The provider confirms that no remote effect occurred, so a later retry is safe without idempotency supp
 35    RetryableFailure,
 36    TerminalFailure,
 37    UnknownOutcome
 38}