Neuron®
The Neuron® is the basis for the creation of open and secure federated networks for smart societies.
Loading...
Searching...
No Matches
IKycService.cs
1using System;
2using System.Threading;
9
11{
15 [DefaultImplementation(typeof(KycService))]
16 public interface IKycService
17 {
21 event EventHandler<ApplicationReviewEventArgs>? ApplicationReviewUpdated;
22
27 Task<KycReference> LoadKycReferenceAsync(string? Lang = null, KycApplicationTemplate? Template = null);
28
34
39 Task<IReadOnlyList<KycReference>> LoadAvailableKycReferencesAsync(string? Lang = null);
40
50 Task<KycApplicationPage> LoadKycApplicationsPageAsync(string? After = null, string? Before = null, int? Index = null, int? Max = null, string? Lang = null, CancellationToken CancellationToken = default);
51
57 Task<bool> ValidatePageAsync(Kyc.Models.KycPage Page);
58
63 Task<int> GetFirstInvalidVisiblePageIndexAsync(Kyc.Models.KycProcess Process);
64
71 Task<(IReadOnlyList<Property> Properties, IReadOnlyList<LegalIdentityAttachment> Attachments)> PreparePropertiesAndAttachmentsAsync(Kyc.Models.KycProcess Process, CancellationToken CancellationToken);
72
76 Task ScheduleSnapshotAsync(KycReference Reference, Kyc.Models.KycProcess Process, KycNavigationSnapshot Navigation, double Progress, string? CurrentPageId);
77
81 Task FlushSnapshotAsync(KycReference Reference, Kyc.Models.KycProcess Process, KycNavigationSnapshot Navigation, double Progress, string? CurrentPageId);
82
87
94
99
104
108 Task PrepareReferenceForNewApplicationAsync(KycReference Reference, string? Language, IReadOnlyList<KycFieldValue>? SeedFields);
109
113 Task FlushAsync(CancellationToken CancellationToken = default);
114
119 Task ShutdownAsync(CancellationToken CancellationToken = default);
120
121 }
122}
Captures the result of an application review returned from backend services.
Represents a parsed KYC application template along with optional PubSub metadata.
Contains a local reference to a KYC process.
Definition: KycReference.cs:22
Service providing KYC process loading, validation, snapshotting and persistence. Implements ordered,...
Definition: KycService.cs:41
Service for loading KYC processes, performing validation, building identity artifacts and managing pe...
Definition: IKycService.cs:17
Task< int > GetFirstInvalidVisiblePageIndexAsync(Kyc.Models.KycProcess Process)
Returns index of first invalid visible page, or -1 if all visible pages are valid.
Task ScheduleSnapshotAsync(KycReference Reference, Kyc.Models.KycProcess Process, KycNavigationSnapshot Navigation, double Progress, string? CurrentPageId)
Updates snapshot information and schedules an autosave.
Task ShutdownAsync(CancellationToken CancellationToken=default)
Performs an orderly shutdown of the KYC service, draining queues and releasing resources....
Task< KycApplicationPage > LoadKycApplicationsPageAsync(string? After=null, string? Before=null, int? Index=null, int? Max=null, string? Lang=null, CancellationToken CancellationToken=default)
Loads a page of KYC application templates using PubSub pagination, with bundled fallback when remote ...
Task UpdateSubmissionStateAsync(KycReference Reference, LegalIdentity Identity)
Updates stored submission state without clearing any existing application review.
Task PrepareReferenceForNewApplicationAsync(KycReference Reference, string? Language, IReadOnlyList< KycFieldValue >? SeedFields)
Resets reference state and seeds optional field values for a fresh application session.
Task FlushSnapshotAsync(KycReference Reference, Kyc.Models.KycProcess Process, KycNavigationSnapshot Navigation, double Progress, string? CurrentPageId)
Updates snapshot information and flushes any pending autosave.
Task FlushAsync(CancellationToken CancellationToken=default)
Flushes any pending in-memory KYC snapshots to durable storage. Should be fast and idempotent.
Task ApplySubmissionAsync(KycReference Reference, LegalIdentity Identity)
Persists submission details after an application is sent.
EventHandler< ApplicationReviewEventArgs >? ApplicationReviewUpdated
Event raised whenever an application review is stored.
Definition: IKycService.cs:21
Task ClearSubmissionAsync(KycReference Reference)
Clears stored submission details for revoked or reset applications.
Task ApplyApplicationReviewAsync(KycReference Reference, ApplicationReview Review)
Persists review metadata from the provider.
Task< IReadOnlyList< KycReference > > LoadAvailableKycReferencesAsync(string? Lang=null)
Loads available KYC processes from server, falling back to bundled test KYC.
Task< KycReference > LoadKycReferenceAsync(string? Lang=null, KycApplicationTemplate? Template=null)
Loads (or creates) the persisted KYC reference and ensures process XML is available.
Task SaveKycReferenceAsync(KycReference Reference)
Persists the provided reference (insert or update).
Task<(IReadOnlyList< Property > Properties, IReadOnlyList< LegalIdentityAttachment > Attachments)> PreparePropertiesAndAttachmentsAsync(Kyc.Models.KycProcess Process, CancellationToken CancellationToken)
Prepares mapped properties and attachments (image compression & transforms applied).
Task< bool > ValidatePageAsync(Kyc.Models.KycPage Page)
Validates a single visible KYC page (synchronous + asynchronous rules).
sealed record KycNavigationSnapshot(int CurrentPageIndex, int AnchorPageIndex, KycFlowState State)
Navigation snapshot capturing minimal mutable UI navigation state.