From aae3a6c8758d19e1eb3473d9f25db01a7867f8bc Mon Sep 17 00:00:00 2001 From: Daniel Skovli Date: Thu, 5 Dec 2024 08:24:22 +0100 Subject: [PATCH] Update XML docs formatting, some words, grammar. (#944) --- .../Extensions/HttpClientBuilderExtensions.cs | 24 +-- .../Extensions/ServiceCollectionExtensions.cs | 20 +-- ...teAntiforgeryTokenIfAuthCookieAttribute.cs | 14 +- .../Correspondence/Builder/BuilderUtils.cs | 7 +- .../CorrespondenceAttachmentBuilder.cs | 4 +- .../Builder/CorrespondenceContentBuilder.cs | 4 +- .../CorrespondenceNotificationBuilder.cs | 5 +- .../Builder/CorrespondenceRequestBuilder.cs | 4 +- .../ICorrespondenceAttachmentBuilder.cs | 30 ++-- .../Builder/ICorrespondenceContentBuilder.cs | 22 +-- .../ICorrespondenceNotificationBuilder.cs | 58 +++---- .../Builder/ICorrespondenceRequestBuilder.cs | 143 +++++++----------- .../CorrespondenceArgumentException.cs | 2 +- .../CorrespondenceRequestException.cs | 8 +- .../Correspondence/ICorrespondenceClient.cs | 17 ++- .../Models/CorrespondenceAttachment.cs | 16 +- .../CorrespondenceAttachmentResponse.cs | 28 ++-- .../CorrespondenceAttachmentStatusResponse.cs | 12 +- .../Models/CorrespondenceContent.cs | 12 +- .../Models/CorrespondenceContentResponse.cs | 12 +- .../Models/CorrespondenceDataLocationType.cs | 9 +- .../CorrespondenceDataLocationTypeResponse.cs | 6 +- .../Models/CorrespondenceDetailsResponse.cs | 10 +- .../Models/CorrespondenceExternalReference.cs | 6 +- .../Models/CorrespondenceNotification.cs | 52 +++---- .../CorrespondenceNotificationChannel.cs | 2 +- ...rrespondenceNotificationDetailsResponse.cs | 8 +- ...CorrespondenceNotificationOrderResponse.cs | 24 +-- ...espondenceNotificationRecipientResponse.cs | 12 +- ...ndenceNotificationStatusDetailsResponse.cs | 10 +- ...orrespondenceNotificationStatusResponse.cs | 8 +- ...ndenceNotificationStatusSummaryResponse.cs | 8 +- ...rrespondenceNotificationSummaryResponse.cs | 6 +- .../CorrespondenceNotificationTemplate.cs | 6 +- .../Models/CorrespondencePayload.cs | 20 +-- .../Models/CorrespondenceReferenceType.cs | 12 +- .../Models/CorrespondenceReplyOption.cs | 6 +- .../Models/CorrespondenceRequest.cs | 46 +++--- .../Models/CorrespondenceStatus.cs | 26 ++-- .../CorrespondenceStatusEventResponse.cs | 8 +- .../Models/GetCorrespondenceStatusResponse.cs | 50 +++--- .../Models/OrganisationOrPersonIdentifier.cs | 14 +- .../Models/SendCorrespondenceResponse.cs | 6 +- .../Maskinporten/Constants/JwtClaimTypes.cs | 2 +- .../Constants/TokenAuthorities.cs | 6 +- .../Converters/JsonWebKeyConverter.cs | 2 +- .../MaskinportenDelegatingHandler.cs | 2 +- .../MaskinportenAuthenticationException.cs | 2 +- .../MaskinportenConfigurationException.cs | 2 +- .../MaskinportenTokenExpiredException.cs | 2 +- .../Extensions/ServiceCollectionExtensions.cs | 2 +- .../Maskinporten/IMaskinportenClient.cs | 20 +-- .../Maskinporten/MaskinportenClient.cs | 12 +- .../Models/MaskinportenSettings.cs | 44 +++--- .../Models/MaskinportenTokenResponse.cs | 12 +- src/Altinn.App.Core/Models/JwtToken.cs | 40 +++-- .../Models/JwtTokenJsonConverter.cs | 2 +- src/Altinn.App.Core/Models/LanguageCode.cs | 36 ++--- .../Models/LanguageCodeJsonConverter.cs | 2 +- .../Models/NationalIdentityNumber.cs | 34 ++--- .../NationalIdentityNumberJsonConverter.cs | 2 +- .../Models/OrganisationNumber.cs | 34 ++--- .../Models/OrganisationNumberJsonConverter.cs | 2 +- 63 files changed, 469 insertions(+), 588 deletions(-) diff --git a/src/Altinn.App.Api/Extensions/HttpClientBuilderExtensions.cs b/src/Altinn.App.Api/Extensions/HttpClientBuilderExtensions.cs index 15f258873..62f25a722 100644 --- a/src/Altinn.App.Api/Extensions/HttpClientBuilderExtensions.cs +++ b/src/Altinn.App.Api/Extensions/HttpClientBuilderExtensions.cs @@ -10,14 +10,10 @@ namespace Altinn.App.Api.Extensions; public static class HttpClientBuilderExtensions { /// - /// - /// Authorises all requests with Maskinporten using the provided scopes, - /// and injects the resulting token in the Authorization header using the Bearer scheme. - /// - /// - /// If your target API does not use this authorisation scheme, you should consider implementing - /// directly and handling the specifics manually. - /// + ///

Authorises all requests with Maskinporten using the provided scopes, + /// and injects the resulting token in the Authorization header using the Bearer scheme.

+ ///

If your target API does not use this authorisation scheme, you should consider implementing + /// directly and handling the specifics manually.

///
/// The Http client builder /// The scope to claim authorization for with Maskinporten @@ -32,15 +28,11 @@ params string[] additionalScopes } /// - /// - /// Authorises all requests with Maskinporten using the provided scopes. + ///

Authorises all requests with Maskinporten using the provided scopes. /// The resulting token is then exchanged for an Altinn issued token and injected in - /// the Authorization header using the Bearer scheme. - /// - /// - /// If your target API does not use this authorisation scheme, you should consider implementing - /// directly and handling the specifics manually. - /// + /// the Authorization header using the Bearer scheme.

+ ///

If your target API does not use this authorisation scheme, you should consider implementing + /// directly and handling the specifics manually.

///
/// The Http client builder /// The scope to claim authorization for with Maskinporten diff --git a/src/Altinn.App.Api/Extensions/ServiceCollectionExtensions.cs b/src/Altinn.App.Api/Extensions/ServiceCollectionExtensions.cs index c5751dff8..da203e0e6 100644 --- a/src/Altinn.App.Api/Extensions/ServiceCollectionExtensions.cs +++ b/src/Altinn.App.Api/Extensions/ServiceCollectionExtensions.cs @@ -122,13 +122,9 @@ IWebHostEnvironment env } /// - /// - /// Configures the service with a configuration object which will be static for the lifetime of the service. - /// - /// - /// If you have already provided a configuration, either manually or - /// implicitly via , this will be overridden. - /// + ///

Configures the service with a configuration object which will be static for the lifetime of the service.

+ ///

If you have already provided a configuration, either manually or + /// implicitly via , this will be overridden.

///
/// The service collection /// @@ -145,13 +141,9 @@ Action configureOptions } /// - /// - /// Binds a configuration to the supplied config section path. - /// - /// - /// If you have already provided a configuration, either manually or - /// implicitly via , this will be overridden. - /// + ///

Binds a configuration to the supplied config section path.

+ ///

If you have already provided a configuration, either manually or + /// implicitly via , this will be overridden.

///
/// The service collection /// The configuration section path (Eg. "MaskinportenSettings") diff --git a/src/Altinn.App.Api/Infrastructure/Filters/AutoValidateAntiforgeryTokenIfAuthCookieAttribute.cs b/src/Altinn.App.Api/Infrastructure/Filters/AutoValidateAntiforgeryTokenIfAuthCookieAttribute.cs index 5be90f3a6..f0786c62e 100644 --- a/src/Altinn.App.Api/Infrastructure/Filters/AutoValidateAntiforgeryTokenIfAuthCookieAttribute.cs +++ b/src/Altinn.App.Api/Infrastructure/Filters/AutoValidateAntiforgeryTokenIfAuthCookieAttribute.cs @@ -14,16 +14,10 @@ public class AutoValidateAntiforgeryTokenIfAuthCookieAttribute : Attribute, IFil /// ascending numeric value of the property. /// /// - /// - /// Filters are executed in a sequence determined by an ascending sort of the property. - /// - /// - /// The default Order for this attribute is 1000 because it must run after any filter which does authentication - /// or login in order to allow them to behave as expected (ie Unauthenticated or Redirect instead of 400). - /// - /// - /// Look at for more detailed info. - /// + ///

Filters are executed in a sequence determined by an ascending sort of the property.

+ ///

The default Order for this attribute is 1000 because it must run after any filter which does authentication + /// or login in order to allow them to behave as expected (ie Unauthenticated or Redirect instead of 400).

+ ///

Look at for more detailed info.

///
public int Order { get; set; } = 1000; diff --git a/src/Altinn.App.Core/Features/Correspondence/Builder/BuilderUtils.cs b/src/Altinn.App.Core/Features/Correspondence/Builder/BuilderUtils.cs index 7c27f9470..db3066a8e 100644 --- a/src/Altinn.App.Core/Features/Correspondence/Builder/BuilderUtils.cs +++ b/src/Altinn.App.Core/Features/Correspondence/Builder/BuilderUtils.cs @@ -6,10 +6,9 @@ namespace Altinn.App.Core.Features.Correspondence.Builder; internal static class BuilderUtils { /// - /// Because of the interface-chaining in this builder, some properties are guaranteed to be non-null. - /// But the compiler doesn't trust that, so we add this check where needed. - /// - /// Additionally this method checks for empty strings and empty data allocations. + ///

Because of the interface-chaining in this builder, some properties are guaranteed to be non-null. + /// But the compiler doesn't trust that, so we add this check where needed.

+ ///

Additionally, this method checks for empty strings and empty data allocations.

///
/// The value to assert /// The error message to throw, if the value was null diff --git a/src/Altinn.App.Core/Features/Correspondence/Builder/CorrespondenceAttachmentBuilder.cs b/src/Altinn.App.Core/Features/Correspondence/Builder/CorrespondenceAttachmentBuilder.cs index 5b33b1e12..8f18a5182 100644 --- a/src/Altinn.App.Core/Features/Correspondence/Builder/CorrespondenceAttachmentBuilder.cs +++ b/src/Altinn.App.Core/Features/Correspondence/Builder/CorrespondenceAttachmentBuilder.cs @@ -3,7 +3,7 @@ namespace Altinn.App.Core.Features.Correspondence.Builder; /// -/// Builder factory for creating objects +/// Builder factory for creating objects. /// public class CorrespondenceAttachmentBuilder : ICorrespondenceAttachmentBuilder { @@ -19,7 +19,7 @@ public class CorrespondenceAttachmentBuilder : ICorrespondenceAttachmentBuilder private CorrespondenceAttachmentBuilder() { } /// - /// Creates a new instance + /// Creates a new instance. /// public static ICorrespondenceAttachmentBuilderFilename Create() => new CorrespondenceAttachmentBuilder(); diff --git a/src/Altinn.App.Core/Features/Correspondence/Builder/CorrespondenceContentBuilder.cs b/src/Altinn.App.Core/Features/Correspondence/Builder/CorrespondenceContentBuilder.cs index e0ead1344..785790bf2 100644 --- a/src/Altinn.App.Core/Features/Correspondence/Builder/CorrespondenceContentBuilder.cs +++ b/src/Altinn.App.Core/Features/Correspondence/Builder/CorrespondenceContentBuilder.cs @@ -4,7 +4,7 @@ namespace Altinn.App.Core.Features.Correspondence.Builder; /// -/// Builder factory for creating objects +/// Builder factory for creating objects. /// public class CorrespondenceContentBuilder : ICorrespondenceContentBuilder { @@ -16,7 +16,7 @@ public class CorrespondenceContentBuilder : ICorrespondenceContentBuilder private CorrespondenceContentBuilder() { } /// - /// Creates a new instance + /// Creates a new instance. /// /// public static ICorrespondenceContentBuilderLanguage Create() => new CorrespondenceContentBuilder(); diff --git a/src/Altinn.App.Core/Features/Correspondence/Builder/CorrespondenceNotificationBuilder.cs b/src/Altinn.App.Core/Features/Correspondence/Builder/CorrespondenceNotificationBuilder.cs index a2ab06331..002ff2aa3 100644 --- a/src/Altinn.App.Core/Features/Correspondence/Builder/CorrespondenceNotificationBuilder.cs +++ b/src/Altinn.App.Core/Features/Correspondence/Builder/CorrespondenceNotificationBuilder.cs @@ -3,7 +3,7 @@ namespace Altinn.App.Core.Features.Correspondence.Builder; /// -/// Builder factory for creating objects +/// Builder factory for creating objects. /// public class CorrespondenceNotificationBuilder : ICorrespondenceNotificationBuilder { @@ -23,9 +23,8 @@ public class CorrespondenceNotificationBuilder : ICorrespondenceNotificationBuil private CorrespondenceNotificationBuilder() { } /// - /// Creates a new instance + /// Creates a new instance. /// - /// public static ICorrespondenceNotificationBuilderTemplate Create() => new CorrespondenceNotificationBuilder(); /// diff --git a/src/Altinn.App.Core/Features/Correspondence/Builder/CorrespondenceRequestBuilder.cs b/src/Altinn.App.Core/Features/Correspondence/Builder/CorrespondenceRequestBuilder.cs index 69a59b05f..aac2c0d16 100644 --- a/src/Altinn.App.Core/Features/Correspondence/Builder/CorrespondenceRequestBuilder.cs +++ b/src/Altinn.App.Core/Features/Correspondence/Builder/CorrespondenceRequestBuilder.cs @@ -4,7 +4,7 @@ namespace Altinn.App.Core.Features.Correspondence.Builder; /// -/// Builder factory for creating objects +/// Builder factory for creating objects. /// public class CorrespondenceRequestBuilder : ICorrespondenceRequestBuilder { @@ -29,7 +29,7 @@ public class CorrespondenceRequestBuilder : ICorrespondenceRequestBuilder private CorrespondenceRequestBuilder() { } /// - /// Creates a new instance + /// Creates a new instance. /// public static ICorrespondenceRequestBuilderResourceId Create() => new CorrespondenceRequestBuilder(); diff --git a/src/Altinn.App.Core/Features/Correspondence/Builder/ICorrespondenceAttachmentBuilder.cs b/src/Altinn.App.Core/Features/Correspondence/Builder/ICorrespondenceAttachmentBuilder.cs index 2a8debadb..3a7574af6 100644 --- a/src/Altinn.App.Core/Features/Correspondence/Builder/ICorrespondenceAttachmentBuilder.cs +++ b/src/Altinn.App.Core/Features/Correspondence/Builder/ICorrespondenceAttachmentBuilder.cs @@ -4,48 +4,48 @@ namespace Altinn.App.Core.Features.Correspondence.Builder; /// -/// Indicates that the instance is on the step +/// Indicates that the instance is on the step. /// public interface ICorrespondenceAttachmentBuilderFilename { /// - /// Sets the filename of the attachment + /// Sets the filename of the attachment. /// /// The attachment filename ICorrespondenceAttachmentBuilderName WithFilename(string filename); } /// -/// Indicates that the instance is on the step +/// Indicates that the instance is on the step. /// public interface ICorrespondenceAttachmentBuilderName { /// - /// Sets the display name of the attachment + /// Sets the display name of the attachment. /// /// The display name ICorrespondenceAttachmentBuilderSendersReference WithName(string name); } /// -/// Indicates that the instance is on the step +/// Indicates that the instance is on the step. /// public interface ICorrespondenceAttachmentBuilderSendersReference { /// - /// Sets the senders reference for the attachment + /// Sets the senders reference for the attachment. /// /// The reference value ICorrespondenceAttachmentBuilderDataType WithSendersReference(string sendersReference); } /// -/// Indicates that the instance is on the step +/// Indicates that the instance is on the step. /// public interface ICorrespondenceAttachmentBuilderDataType { /// - /// Sets the data type of the attachment in MIME format + /// Sets the data type of the attachment in MIME format. /// /// See /// The MIME type of the attachment @@ -53,19 +53,19 @@ public interface ICorrespondenceAttachmentBuilderDataType } /// -/// Indicates that the instance is on the step +/// Indicates that the instance is on the step. /// public interface ICorrespondenceAttachmentBuilderData { /// - /// Sets the data content of the attachment + /// Sets the data content of the attachment. /// /// The data ICorrespondenceAttachmentBuilder WithData(ReadOnlyMemory data); } /// -/// Indicates that the instance has completed all required steps and can proceed to +/// Indicates that the instance has completed all required steps and can proceed to . /// public interface ICorrespondenceAttachmentBuilder : ICorrespondenceAttachmentBuilderFilename, @@ -75,20 +75,20 @@ public interface ICorrespondenceAttachmentBuilder ICorrespondenceAttachmentBuilderData { /// - /// Sets whether the attachment is encrypted or not + /// Sets whether the attachment is encrypted or not. /// - /// `true` for encrypted, `false` otherwise + /// true for encrypted, false otherwise ICorrespondenceAttachmentBuilder WithIsEncrypted(bool isEncrypted); /// - /// Sets the storage location of the attachment data + /// Sets the storage location of the attachment data. /// /// In this context, it is extremely likely that the storage location is /// The data storage location ICorrespondenceAttachmentBuilder WithDataLocationType(CorrespondenceDataLocationType dataLocationType); /// - /// Builds the correspondence attachment + /// Builds the correspondence attachment. /// CorrespondenceAttachment Build(); } diff --git a/src/Altinn.App.Core/Features/Correspondence/Builder/ICorrespondenceContentBuilder.cs b/src/Altinn.App.Core/Features/Correspondence/Builder/ICorrespondenceContentBuilder.cs index 31b727bda..813d07b91 100644 --- a/src/Altinn.App.Core/Features/Correspondence/Builder/ICorrespondenceContentBuilder.cs +++ b/src/Altinn.App.Core/Features/Correspondence/Builder/ICorrespondenceContentBuilder.cs @@ -4,61 +4,61 @@ namespace Altinn.App.Core.Features.Correspondence.Builder; /// -/// Indicates that the instance is on the step +/// Indicates that the instance is on the step. /// public interface ICorrespondenceContentBuilderLanguage { /// - /// Sets the language of the correspondence content + /// Sets the language of the correspondence content. /// /// The content language ICorrespondenceContentBuilderTitle WithLanguage(LanguageCode language); /// - /// Sets the language of the correspondence content + /// Sets the language of the correspondence content. /// /// The content language in ISO 639-1 format ICorrespondenceContentBuilderTitle WithLanguage(string language); } /// -/// Indicates that the instance is on the step +/// Indicates that the instance is on the step. /// public interface ICorrespondenceContentBuilderTitle { /// - /// Sets the title of the correspondence content + /// Sets the title of the correspondence content. /// /// The correspondence title ICorrespondenceContentBuilderSummary WithTitle(string title); } /// -/// Indicates that the instance is on the step +/// Indicates that the instance is on the step. /// public interface ICorrespondenceContentBuilderSummary { /// - /// Sets the summary of the correspondence content + /// Sets the summary of the correspondence content. /// /// The summary of the message ICorrespondenceContentBuilderBody WithSummary(string summary); } /// -/// Indicates that the instance is on the step +/// Indicates that the instance is on the step. /// public interface ICorrespondenceContentBuilderBody { /// - /// Sets the body of the correspondence content + /// Sets the body of the correspondence content. /// /// The full text (body) of the message ICorrespondenceContentBuilder WithBody(string body); } /// -/// Indicates that the instance has completed all required steps and can proceed to +/// Indicates that the instance has completed all required steps and can proceed to . /// public interface ICorrespondenceContentBuilder : ICorrespondenceContentBuilderTitle, @@ -67,7 +67,7 @@ public interface ICorrespondenceContentBuilder ICorrespondenceContentBuilderBody { /// - /// Builds the correspondence content + /// Builds the correspondence content. /// CorrespondenceContent Build(); } diff --git a/src/Altinn.App.Core/Features/Correspondence/Builder/ICorrespondenceNotificationBuilder.cs b/src/Altinn.App.Core/Features/Correspondence/Builder/ICorrespondenceNotificationBuilder.cs index 540e48ee2..684645e31 100644 --- a/src/Altinn.App.Core/Features/Correspondence/Builder/ICorrespondenceNotificationBuilder.cs +++ b/src/Altinn.App.Core/Features/Correspondence/Builder/ICorrespondenceNotificationBuilder.cs @@ -3,12 +3,12 @@ namespace Altinn.App.Core.Features.Correspondence.Builder; /// -/// Indicates that the instance is on the step +/// Indicates that the instance is on the step. /// public interface ICorrespondenceNotificationBuilderTemplate { /// - /// Sets the notification template for the correspondence notification + /// Sets the notification template for the correspondence notification. /// /// The notification template ICorrespondenceNotificationBuilder WithNotificationTemplate( @@ -17,78 +17,67 @@ CorrespondenceNotificationTemplate notificationTemplate } /// -/// Indicates that the instance has completed all required steps and can proceed to +/// Indicates that the instance has completed all required steps and can proceed to . /// public interface ICorrespondenceNotificationBuilder : ICorrespondenceNotificationBuilderTemplate { /// - /// Sets the email subject for the correspondence notification + ///

Sets the email subject for the correspondence notification.

+ ///

Depending on the in use, this value may be padded according to the template logic.

///
- /// - /// Depending on the in use, this value may be padded according to the template logic - /// /// The email subject ICorrespondenceNotificationBuilder WithEmailSubject(string? emailSubject); /// - /// Sets the email body for the correspondence notification + ///

Sets the email body for the correspondence notification.

+ ///

Depending on the in use, this value may be padded according to the template logic.

///
- /// - /// Depending on the in use, this value may be padded according to the template logic - /// /// The email content (body) ICorrespondenceNotificationBuilder WithEmailBody(string? emailBody); /// - /// Sets the SMS body for the correspondence notification + ///

Sets the SMS body for the correspondence notification.

+ ///

Depending on the in use, this value may be padded according to the template logic.

///
- /// - /// Depending on the in use, this value may be padded according to the template logic - /// /// The SMS content (body) ICorrespondenceNotificationBuilder WithSmsBody(string? smsBody); /// - /// Sets whether a reminder should be sent for the correspondence notification, if not actioned within an appropriate time frame + ///

Sets whether a reminder should be sent for the correspondence notification, if not actioned within an appropriate time frame.

+ ///

Depending on the in use, this value may be padded according to the template logic.

///
- /// `true` if yes, `false` if no + /// true if yes, false if no ICorrespondenceNotificationBuilder WithSendReminder(bool? sendReminder); /// - /// Sets the email subject for the reminder notification + ///

Sets the email subject for the reminder notification.

+ ///

Depending on the in use, this value may be padded according to the template logic.

///
- /// - /// Depending on the in use, this value may be padded according to the template logic - /// /// The reminder email subject ICorrespondenceNotificationBuilder WithReminderEmailSubject(string? reminderEmailSubject); /// - /// Sets the email body for the reminder notification + ///

Sets the email body for the reminder notification.

+ ///

Depending on the in use, this value may be padded according to the template logic.

///
- /// - /// Depending on the in use, this value may be padded according to the template logic - /// /// The reminder email content (body) ICorrespondenceNotificationBuilder WithReminderEmailBody(string? reminderEmailBody); /// - /// Sets the SMS body for the reminder notification + ///

Sets the SMS body for the reminder notification.

+ ///

Depending on the in use, this value may be padded according to the template logic.

///
- /// - /// Depending on the in use, this value may be padded according to the template logic - /// /// The reminder SMS content (body) ICorrespondenceNotificationBuilder WithReminderSmsBody(string? reminderSmsBody); /// - /// Sets the notification channel for the correspondence notification + /// Sets the notification channel for the correspondence notification. /// /// The notification channel to use ICorrespondenceNotificationBuilder WithNotificationChannel(CorrespondenceNotificationChannel? notificationChannel); /// - /// Sets the notification channel for the reminder notification + /// Sets the notification channel for the reminder notification. /// /// The notification channel to use ICorrespondenceNotificationBuilder WithReminderNotificationChannel( @@ -96,20 +85,19 @@ ICorrespondenceNotificationBuilder WithReminderNotificationChannel( ); /// - /// Sets the senders reference for the correspondence notification + /// Sets the senders reference for the correspondence notification. /// /// The senders reference value - /// ICorrespondenceNotificationBuilder WithSendersReference(string? sendersReference); /// - /// Sets the requested send time for the correspondence notification + /// Sets the requested send time for the correspondence notification. /// /// The requested send time ICorrespondenceNotificationBuilder WithRequestedSendTime(DateTimeOffset? requestedSendTime); /// - /// Builds the instance + /// Builds the instance. /// CorrespondenceNotification Build(); } diff --git a/src/Altinn.App.Core/Features/Correspondence/Builder/ICorrespondenceRequestBuilder.cs b/src/Altinn.App.Core/Features/Correspondence/Builder/ICorrespondenceRequestBuilder.cs index df792e6ff..ed6c845fd 100644 --- a/src/Altinn.App.Core/Features/Correspondence/Builder/ICorrespondenceRequestBuilder.cs +++ b/src/Altinn.App.Core/Features/Correspondence/Builder/ICorrespondenceRequestBuilder.cs @@ -4,122 +4,114 @@ namespace Altinn.App.Core.Features.Correspondence.Builder; /// -/// Indicates that the instance is on the step +/// Indicates that the instance is on the step. /// public interface ICorrespondenceRequestBuilderResourceId { /// - /// Sets the Resource Id for the correspondence + /// Sets the Resource Id for the correspondence. /// /// The resource ID as registered in the Altinn Resource Registry ICorrespondenceRequestBuilderSender WithResourceId(string resourceId); } /// -/// Indicates that the instance is on the step +/// Indicates that the instance is on the step. /// public interface ICorrespondenceRequestBuilderSender { /// - /// Sets the sender of the correspondence + /// Sets the sender of the correspondence. /// /// The correspondence sender ICorrespondenceRequestBuilderSendersReference WithSender(OrganisationNumber sender); /// - /// Sets the sender of the correspondence + /// Sets the sender of the correspondence. /// /// A string representing a Norwegian organisation number (e.g. 991825827 or 0192:991825827) ICorrespondenceRequestBuilderSendersReference WithSender(string sender); } /// -/// Indicates that the instance is on the step +/// Indicates that the instance is on the step. /// public interface ICorrespondenceRequestBuilderSendersReference { /// - /// Sets the senders reference for the correspondence + /// Sets the senders reference for the correspondence. /// /// The correspondence reference ICorrespondenceRequestBuilderRecipients WithSendersReference(string sendersReference); } /// -/// Indicates that the instance is on the step +/// Indicates that the instance is on the step. /// public interface ICorrespondenceRequestBuilderRecipients { /// - /// Adds a recipient to the correspondence + ///

Adds a recipient to the correspondence.

+ ///

This method respects any existing options already stored in .

///
- /// - /// This method respects any existing options already stored in - /// /// A recipient ICorrespondenceRequestBuilderAllowSystemDeleteAfter WithRecipient(OrganisationOrPersonIdentifier recipient); /// - /// Adds a recipient to the correspondence + ///

Adds a recipient to the correspondence.

+ ///

This method respects any existing options already stored in .

///
- /// - /// This method respects any existing options already stored in - /// /// A recipient: Either a Norwegian organisation number or national identity number ICorrespondenceRequestBuilderAllowSystemDeleteAfter WithRecipient(string recipient); /// - /// Adds recipients to the correspondence + ///

Adds recipients to the correspondence.

+ ///

This method respects any existing options already stored in .

///
- /// - /// This method respects any existing options already stored in - /// /// A list of recipients ICorrespondenceRequestBuilderAllowSystemDeleteAfter WithRecipients( IEnumerable recipients ); /// - /// Adds recipients to the correspondence + ///

Adds recipients to the correspondence.

+ ///

This method respects any existing options already stored in .

///
- /// - /// This method respects any existing options already stored in - /// /// A list of recipients: Either Norwegian organisation numbers or national identity numbers ICorrespondenceRequestBuilderAllowSystemDeleteAfter WithRecipients(IEnumerable recipients); } /// -/// Indicates that the instance is on the step +/// Indicates that the instance is on the step. /// public interface ICorrespondenceRequestBuilderAllowSystemDeleteAfter { /// - /// Sets the date and time when the correspondence can be deleted from the system + /// Sets the date and time when the correspondence can be deleted from the system. /// /// The point in time when the correspondence may be safely deleted ICorrespondenceRequestBuilderContent WithAllowSystemDeleteAfter(DateTimeOffset allowSystemDeleteAfter); } /// -/// Indicates that the instance is on the step +/// Indicates that the instance is on the step. /// public interface ICorrespondenceRequestBuilderContent { /// - /// Sets the content of the correspondence + /// Sets the content of the correspondence. /// /// The correspondence content ICorrespondenceRequestBuilder WithContent(CorrespondenceContent content); /// - /// Sets the content of the correspondence + /// Sets the content of the correspondence. /// /// A instance in the stage ICorrespondenceRequestBuilder WithContent(ICorrespondenceContentBuilder builder); /// - /// Sets the content of the correspondence + /// Sets the content of the correspondence. /// /// The message language /// The message title @@ -133,7 +125,7 @@ string body ); /// - /// Sets the content of the correspondence + /// Sets the content of the correspondence. /// /// The message language in ISO 639-1 format /// The message title @@ -144,7 +136,7 @@ string body /// /// Indicates that the instance has completed all -/// required steps and can proceed to +/// required steps and can proceed to . /// public interface ICorrespondenceRequestBuilder : ICorrespondenceRequestBuilderResourceId, @@ -155,49 +147,41 @@ public interface ICorrespondenceRequestBuilder ICorrespondenceRequestBuilderContent { /// - /// Sets due date and time for the correspondence + /// Sets due date and time for the correspondence. /// /// The point in time when the correspondence is due - /// ICorrespondenceRequestBuilder WithDueDateTime(DateTimeOffset dueDateTime); /// - /// Sets the requested publish time for the correspondence + /// Sets the requested publish time for the correspondence. /// /// The point in time when the correspondence should be published ICorrespondenceRequestBuilder WithRequestedPublishTime(DateTimeOffset requestedPublishTime); /// - /// Set the message sender for the correspondence + /// Set the message sender for the correspondence. /// /// The name of the message sender - /// ICorrespondenceRequestBuilder WithMessageSender(string messageSender); /// - /// Adds an external reference to the correspondence - /// - /// This method respects any existing references already stored in - /// + ///

Adds an external reference to the correspondence.

+ ///

This method respects any existing references already stored in .

///
/// A item ICorrespondenceRequestBuilder WithExternalReference(CorrespondenceExternalReference externalReference); /// - /// Adds an external reference to the correspondence - /// - /// This method respects any existing references already stored in - /// + ///

Adds an external reference to the correspondence.

+ ///

This method respects any existing references already stored in .

///
/// The reference type to add /// The reference value ICorrespondenceRequestBuilder WithExternalReference(CorrespondenceReferenceType type, string value); /// - /// Adds external references to the correspondence - /// - /// This method respects any existing references already stored in - /// + ///

Adds external references to the correspondence.

+ ///

This method respects any existing references already stored in .

///
/// A list of items ICorrespondenceRequestBuilder WithExternalReferences( @@ -205,110 +189,95 @@ IEnumerable externalReferences ); /// - /// Sets the property list for the correspondence + ///

Sets the property list for the correspondence.

+ ///

This method respects any existing properties already stored in , but will overwrite entries with the same key.

///
/// A key-value list of arbitrary properties to associate with the correspondence ICorrespondenceRequestBuilder WithPropertyList(IReadOnlyDictionary propertyList); /// - /// Adds a reply option to the correspondence - /// - /// This method respects any existing options already stored in - /// + ///

Adds a reply option to the correspondence.

+ ///

This method respects any existing options already stored in .

///
/// A item ICorrespondenceRequestBuilder WithReplyOption(CorrespondenceReplyOption replyOption); /// - /// Adds a reply option to the correspondence - /// - /// This method respects any existing options already stored in - /// + ///

Adds a reply option to the correspondence.

+ ///

This method respects any existing options already stored in .

///
/// The URL to be used as a reply/response to a correspondence /// The text to display for the link ICorrespondenceRequestBuilder WithReplyOption(string linkUrl, string linkText); /// - /// Adds reply options to the correspondence - /// - /// This method respects any existing options already stored in - /// + ///

Adds reply options to the correspondence.

+ ///

This method respects any existing options already stored in .

///
/// A list of items ICorrespondenceRequestBuilder WithReplyOptions(IEnumerable replyOptions); /// - /// Sets the notification for the correspondence + /// Sets the notification for the correspondence. /// /// The notification details to be associated with the correspondence ICorrespondenceRequestBuilder WithNotification(CorrespondenceNotification notification); /// - /// Sets the notification for the correspondence + /// Sets the notification for the correspondence. /// /// A instance in the stage ICorrespondenceRequestBuilder WithNotification(ICorrespondenceNotificationBuilder builder); /// - /// Sets whether the correspondence can override reservation against digital communication in KRR + /// Sets whether the correspondence can override reservation against digital communication in KRR. /// /// A boolean value indicating if reservations can be ignored or not ICorrespondenceRequestBuilder WithIgnoreReservation(bool ignoreReservation); /// - /// Sets whether reading the correspondence needs to be confirmed by the recipient + /// Sets whether reading the correspondence needs to be confirmed by the recipient. /// /// A boolean value indicating if confirmation is needed or not ICorrespondenceRequestBuilder WithIsConfirmationNeeded(bool isConfirmationNeeded); /// - /// Adds an existing attachment reference to the correspondence - /// - /// This method respects any existing references already stored in - /// + ///

Adds an existing attachment reference to the correspondence.

+ ///

This method respects any existing references already stored in .

///
/// A item pointing to an existing attachment ICorrespondenceRequestBuilder WithExistingAttachment(Guid existingAttachment); /// - /// Adds existing attachment references to the correspondence - /// - /// This method respects any existing references already stored in - /// + ///

Adds existing attachment references to the correspondence.

+ ///

This method respects any existing references already stored in .

///
/// A list of items pointing to existing attachments ICorrespondenceRequestBuilder WithExistingAttachments(IEnumerable existingAttachments); /// - /// Adds an attachment to the correspondence - /// - /// This method respects any existing attachments already stored in - /// + ///

Adds an attachment to the correspondence.

+ ///

This method respects any existing attachments already stored in .

///
/// A item ICorrespondenceRequestBuilder WithAttachment(CorrespondenceAttachment attachment); /// - /// Adds an attachment to the correspondence - /// - /// This method respects any existing attachments already stored in - /// + ///

Adds an attachment to the correspondence.

+ ///

This method respects any existing attachments already stored in .

///
/// A instance in the stage ICorrespondenceRequestBuilder WithAttachment(ICorrespondenceAttachmentBuilder builder); /// - /// Adds attachments to the correspondence - /// - /// This method respects any existing attachments already stored in - /// + ///

Adds attachments to the correspondence.

+ ///

This method respects any existing attachments already stored in .

///
/// A List of items ICorrespondenceRequestBuilder WithAttachments(IEnumerable attachments); /// - /// Builds the instance + /// Builds the instance. /// CorrespondenceRequest Build(); } diff --git a/src/Altinn.App.Core/Features/Correspondence/Exceptions/CorrespondenceArgumentException.cs b/src/Altinn.App.Core/Features/Correspondence/Exceptions/CorrespondenceArgumentException.cs index 4e4d1705b..9586033c3 100644 --- a/src/Altinn.App.Core/Features/Correspondence/Exceptions/CorrespondenceArgumentException.cs +++ b/src/Altinn.App.Core/Features/Correspondence/Exceptions/CorrespondenceArgumentException.cs @@ -1,7 +1,7 @@ namespace Altinn.App.Core.Features.Correspondence.Exceptions; /// -/// An exception that indicates an invalid method argument is being used in a correspondence operation +/// An exception that indicates an invalid method argument is being used in a correspondence operation. /// public class CorrespondenceArgumentException : CorrespondenceException { diff --git a/src/Altinn.App.Core/Features/Correspondence/Exceptions/CorrespondenceRequestException.cs b/src/Altinn.App.Core/Features/Correspondence/Exceptions/CorrespondenceRequestException.cs index 158150609..404984881 100644 --- a/src/Altinn.App.Core/Features/Correspondence/Exceptions/CorrespondenceRequestException.cs +++ b/src/Altinn.App.Core/Features/Correspondence/Exceptions/CorrespondenceRequestException.cs @@ -4,22 +4,22 @@ namespace Altinn.App.Core.Features.Correspondence.Exceptions; /// -/// An exception that indicates an error was returned from the correspondence server +/// An exception that indicates an error was returned from the correspondence server. /// public class CorrespondenceRequestException : CorrespondenceException { /// - /// Problem details object from the Correspondence API server, if available + /// Problem details object from the Correspondence API server, if available. /// public ProblemDetails? ProblemDetails { get; init; } /// - /// Http status code related to the request, if available + /// Http status code related to the request, if available. /// public HttpStatusCode? HttpStatusCode { get; init; } /// - /// The request body, if available + /// The request body, if available. /// public string? ResponseBody { get; init; } diff --git a/src/Altinn.App.Core/Features/Correspondence/ICorrespondenceClient.cs b/src/Altinn.App.Core/Features/Correspondence/ICorrespondenceClient.cs index 7b50eaf72..5211ccfc1 100644 --- a/src/Altinn.App.Core/Features/Correspondence/ICorrespondenceClient.cs +++ b/src/Altinn.App.Core/Features/Correspondence/ICorrespondenceClient.cs @@ -3,18 +3,19 @@ namespace Altinn.App.Core.Features.Correspondence; /// -/// Contains logic for interacting with the correspondence message service +///

Contains logic for interacting with the correspondence message service.

+///

The use of this client requires Maskinporten scopes altinn:correspondence.write and altinn:serviceowner.

///
public interface ICorrespondenceClient { /// - /// Sends a correspondence. - /// After a successful request, the state of the correspondence order is . + ///

Sends a correspondence.

+ ///

After a successful request, the state of the correspondence order is . /// This indicates that the request has met all validation requirements and is considered valid, but until the state - /// reaches it has not actually been sent to the recipient. - /// The current status of a correspondence and the associated notifications can be checked via . - /// Alternatively, the correspondence service publishes events which can be subscribed to. - /// For more information, see https://docs.altinn.studio/correspondence/getting-started/developer-guides/events/ + /// reaches it has not actually been sent to the recipient.

+ ///

The current status of a correspondence and the associated notifications can be checked via .

+ ///

Alternatively, the correspondence service publishes events which can be subscribed to. + /// For more information, see https://docs.altinn.studio/correspondence/getting-started/developer-guides/events/.

///
/// The payload /// An optional cancellation token @@ -24,7 +25,7 @@ Task Send( ); /// - /// Fetches the status of a correspondence + /// Fetches the status of a correspondence. /// /// The payload /// An optional cancellation token diff --git a/src/Altinn.App.Core/Features/Correspondence/Models/CorrespondenceAttachment.cs b/src/Altinn.App.Core/Features/Correspondence/Models/CorrespondenceAttachment.cs index ecadf589b..add8600d3 100644 --- a/src/Altinn.App.Core/Features/Correspondence/Models/CorrespondenceAttachment.cs +++ b/src/Altinn.App.Core/Features/Correspondence/Models/CorrespondenceAttachment.cs @@ -1,43 +1,43 @@ namespace Altinn.App.Core.Features.Correspondence.Models; /// -/// Represents an attachment to a correspondence +/// Represents an attachment to a correspondence. /// public sealed record CorrespondenceAttachment : MultipartCorrespondenceItem { /// - /// The filename of the attachment + /// The filename of the attachment. /// public required string Filename { get; init; } /// - /// The display name of the attachment + /// The display name of the attachment. /// public required string Name { get; init; } /// - /// A value indicating whether the attachment is encrypted or not + /// A value indicating whether the attachment is encrypted or not. /// public bool? IsEncrypted { get; init; } /// - /// A reference value given to the attachment by the creator + /// A reference value given to the attachment by the creator. /// public required string SendersReference { get; init; } /// - /// The attachment data type in MIME format + /// The attachment data type in MIME format. /// public required string DataType { get; init; } /// - /// Specifies the storage location of the attachment data + /// Specifies the storage location of the attachment data. /// public CorrespondenceDataLocationType DataLocationType { get; init; } = CorrespondenceDataLocationType.ExistingCorrespondenceAttachment; /// - /// The file stream + /// The data content. /// public required ReadOnlyMemory Data { get; init; } diff --git a/src/Altinn.App.Core/Features/Correspondence/Models/CorrespondenceAttachmentResponse.cs b/src/Altinn.App.Core/Features/Correspondence/Models/CorrespondenceAttachmentResponse.cs index 9f7e06943..14c48e518 100644 --- a/src/Altinn.App.Core/Features/Correspondence/Models/CorrespondenceAttachmentResponse.cs +++ b/src/Altinn.App.Core/Features/Correspondence/Models/CorrespondenceAttachmentResponse.cs @@ -3,84 +3,84 @@ namespace Altinn.App.Core.Features.Correspondence.Models; /// -/// Represents a binary attachment to a Correspondence +/// Represents a binary attachment to a Correspondence. /// public sealed record CorrespondenceAttachmentResponse { /// - /// A unique id for the correspondence attachment + /// A unique id for the correspondence attachment. /// [JsonPropertyName("id")] public Guid Id { get; init; } /// - /// The date and time when the attachment was created + /// The date and time when the attachment was created. /// [JsonPropertyName("created")] public DateTimeOffset Created { get; init; } /// - /// The location of the attachment data + /// The location of the attachment data. /// [JsonPropertyName("dataLocationType")] public CorrespondenceDataLocationTypeResponse DataLocationType { get; init; } /// - /// The current status of the attachment + /// The current status of the attachment. /// [JsonPropertyName("status")] public CorrespondenceAttachmentStatusResponse Status { get; init; } /// - /// The text description of the status code + /// The text description of the status code. /// [JsonPropertyName("statusText")] public required string StatusText { get; init; } /// - /// The date and time when the current attachment status was changed + /// The date and time when the current attachment status was changed. /// [JsonPropertyName("statusChanged")] public DateTimeOffset StatusChanged { get; init; } /// - /// The date and time when the attachment expires + /// The date and time when the attachment expires. /// [JsonPropertyName("expirationTime")] public DateTimeOffset ExpirationTime { get; init; } /// - /// The filename of the attachment + /// The filename of the attachment. /// [JsonPropertyName("fileName")] public string? FileName { get; init; } /// - /// The display name of the attachment + /// The display name of the attachment. /// [JsonPropertyName("name")] public required string Name { get; init; } /// - /// Indicates if the attachment is encrypted or not + /// Indicates if the attachment is encrypted or not. /// [JsonPropertyName("isEncrypted")] public bool IsEncrypted { get; init; } /// - /// MD5 checksum of the file data + /// MD5 checksum of the file data. /// [JsonPropertyName("checksum")] public string? Checksum { get; init; } /// - /// A reference value given to the attachment by the creator + /// A reference value given to the attachment by the creator. /// [JsonPropertyName("sendersReference")] public required string SendersReference { get; init; } /// - /// The attachment data type in MIME format + /// The attachment data type in MIME format. /// [JsonPropertyName("dataType")] public required string DataType { get; init; } diff --git a/src/Altinn.App.Core/Features/Correspondence/Models/CorrespondenceAttachmentStatusResponse.cs b/src/Altinn.App.Core/Features/Correspondence/Models/CorrespondenceAttachmentStatusResponse.cs index 4062fb383..3f87c4f80 100644 --- a/src/Altinn.App.Core/Features/Correspondence/Models/CorrespondenceAttachmentStatusResponse.cs +++ b/src/Altinn.App.Core/Features/Correspondence/Models/CorrespondenceAttachmentStatusResponse.cs @@ -3,33 +3,33 @@ namespace Altinn.App.Core.Features.Correspondence.Models; /// -/// Represents the status of an attachment +/// Represents the status of an attachment. /// [JsonConverter(typeof(JsonStringEnumConverter))] public enum CorrespondenceAttachmentStatusResponse { /// - /// Attachment has been Initialized. + /// Attachment has been initialised. /// Initialized, /// - /// Awaiting processing of upload + /// Awaiting processing of upload. /// UploadProcessing, /// - /// Published and available for download + /// Published and available for download. /// Published, /// - /// Purged + /// Purged. /// Purged, /// - /// Failed + /// Failed. /// Failed, } diff --git a/src/Altinn.App.Core/Features/Correspondence/Models/CorrespondenceContent.cs b/src/Altinn.App.Core/Features/Correspondence/Models/CorrespondenceContent.cs index c6b8679ab..bec873d2a 100644 --- a/src/Altinn.App.Core/Features/Correspondence/Models/CorrespondenceContent.cs +++ b/src/Altinn.App.Core/Features/Correspondence/Models/CorrespondenceContent.cs @@ -3,32 +3,32 @@ namespace Altinn.App.Core.Features.Correspondence.Models; /// -/// The message content in a correspondence +/// The message content in a correspondence. /// public sealed record CorrespondenceContent : MultipartCorrespondenceItem { /// - /// The correspondence message title (subject) + /// The correspondence message title (subject). /// public required string Title { get; init; } /// - /// The language of the correspondence, specified according to ISO 639-1 + /// The language of the correspondence, specified according to ISO 639-1. /// public required LanguageCode Language { get; init; } /// - /// The summary text of the correspondence message + /// The summary text of the correspondence message. /// public required string Summary { get; init; } /// - /// The full text (body) of the correspondence message + /// The full text (body) of the correspondence message. /// public required string Body { get; init; } /// - /// File attachments to associate with this correspondence + /// File attachments to associate with this correspondence. /// public IReadOnlyList? Attachments { get; init; } diff --git a/src/Altinn.App.Core/Features/Correspondence/Models/CorrespondenceContentResponse.cs b/src/Altinn.App.Core/Features/Correspondence/Models/CorrespondenceContentResponse.cs index b7309c0f1..3e1954df7 100644 --- a/src/Altinn.App.Core/Features/Correspondence/Models/CorrespondenceContentResponse.cs +++ b/src/Altinn.App.Core/Features/Correspondence/Models/CorrespondenceContentResponse.cs @@ -4,37 +4,37 @@ namespace Altinn.App.Core.Features.Correspondence.Models; /// -/// Represents the content of a correspondence +/// Represents the content of a correspondence. /// public sealed record CorrespondenceContentResponse { /// - /// The language of the correspondence, specified according to ISO 639-1 + /// The language of the correspondence, specified according to ISO 639-1. /// [JsonPropertyName("language")] [JsonConverter(typeof(LanguageCodeJsonConverter))] public LanguageCode Language { get; init; } /// - /// The correspondence message title (subject) + /// The correspondence message title (subject). /// [JsonPropertyName("messageTitle")] public required string MessageTitle { get; init; } /// - /// The summary text of the correspondence + /// The summary text of the correspondence. /// [JsonPropertyName("messageSummary")] public required string MessageSummary { get; init; } /// - /// The main body of the correspondence + /// The main body of the correspondence. /// [JsonPropertyName("messageBody")] public required string MessageBody { get; init; } /// - /// A list of attachments for the correspondence + /// A list of attachments for the correspondence. /// [JsonPropertyName("attachments")] public IEnumerable? Attachments { get; init; } diff --git a/src/Altinn.App.Core/Features/Correspondence/Models/CorrespondenceDataLocationType.cs b/src/Altinn.App.Core/Features/Correspondence/Models/CorrespondenceDataLocationType.cs index 54b995c90..ad9ee8172 100644 --- a/src/Altinn.App.Core/Features/Correspondence/Models/CorrespondenceDataLocationType.cs +++ b/src/Altinn.App.Core/Features/Correspondence/Models/CorrespondenceDataLocationType.cs @@ -3,23 +3,24 @@ namespace Altinn.App.Core.Features.Correspondence.Models; /// -/// The location of the attachment during the correspondence initialization +/// The location of the attachment during the correspondence initialisation. /// [JsonConverter(typeof(JsonStringEnumConverter))] public enum CorrespondenceDataLocationType { /// - /// Specifies that the attachment data will need to be uploaded to Altinn Correspondence via the Upload Attachment operation + /// Specifies that the attachment data will be uploaded separately or as part of this request. /// NewCorrespondenceAttachment, /// - /// Specifies that the attachment already exist in Altinn Correspondence storage + /// Specifies that the attachment already exist in Altinn Correspondence storage. /// ExistingCorrespondenceAttachment, + // TODO: Typo in this member, bug issue: https://github.com/Altinn/altinn-correspondence/issues/535 /// - /// Specifies that the attachment data already exist in an external storage + /// Specifies that the attachment data already exist in an external storage. /// ExisitingExternalStorage, } diff --git a/src/Altinn.App.Core/Features/Correspondence/Models/CorrespondenceDataLocationTypeResponse.cs b/src/Altinn.App.Core/Features/Correspondence/Models/CorrespondenceDataLocationTypeResponse.cs index 7d0568502..193b5ae4a 100644 --- a/src/Altinn.App.Core/Features/Correspondence/Models/CorrespondenceDataLocationTypeResponse.cs +++ b/src/Altinn.App.Core/Features/Correspondence/Models/CorrespondenceDataLocationTypeResponse.cs @@ -3,18 +3,18 @@ namespace Altinn.App.Core.Features.Correspondence.Models; /// -/// Defines the location of the attachment data +/// Defines the location of the attachment data. /// [JsonConverter(typeof(JsonStringEnumConverter))] public enum CorrespondenceDataLocationTypeResponse { /// - /// Specifies that the attachment data is stored in the Altinn correspondence storage + /// Specifies that the attachment data is stored in the Altinn correspondence storage. /// AltinnCorrespondenceAttachment, /// - /// Specifies that the attachment data is stored in an external storage controlled by the sender + /// Specifies that the attachment data is stored in an external storage controlled by the sender. /// ExternalStorage, } diff --git a/src/Altinn.App.Core/Features/Correspondence/Models/CorrespondenceDetailsResponse.cs b/src/Altinn.App.Core/Features/Correspondence/Models/CorrespondenceDetailsResponse.cs index a24fb182c..e6260ec9e 100644 --- a/src/Altinn.App.Core/Features/Correspondence/Models/CorrespondenceDetailsResponse.cs +++ b/src/Altinn.App.Core/Features/Correspondence/Models/CorrespondenceDetailsResponse.cs @@ -4,31 +4,31 @@ namespace Altinn.App.Core.Features.Correspondence.Models; /// -/// Details about the correspondence +/// Details about the correspondence. /// public sealed record CorrespondenceDetailsResponse { /// - /// The correspondence identifier + /// The correspondence identifier. /// [JsonPropertyName("correspondenceId")] public Guid CorrespondenceId { get; init; } /// - /// The status of the correspondence + /// The status of the correspondence. /// [JsonPropertyName("status")] public CorrespondenceStatus Status { get; init; } /// - /// The recipient of the correspondence + /// The recipient of the correspondence. /// [JsonPropertyName("recipient")] [OrganisationOrPersonIdentifierJsonConverter(OrganisationNumberFormat.International)] public required OrganisationOrPersonIdentifier Recipient { get; init; } /// - /// Notifications linked to the correspondence + /// Notifications linked to the correspondence. /// [JsonPropertyName("notifications")] public IReadOnlyList? Notifications { get; init; } diff --git a/src/Altinn.App.Core/Features/Correspondence/Models/CorrespondenceExternalReference.cs b/src/Altinn.App.Core/Features/Correspondence/Models/CorrespondenceExternalReference.cs index 219c31f98..43baa58c7 100644 --- a/src/Altinn.App.Core/Features/Correspondence/Models/CorrespondenceExternalReference.cs +++ b/src/Altinn.App.Core/Features/Correspondence/Models/CorrespondenceExternalReference.cs @@ -3,18 +3,18 @@ namespace Altinn.App.Core.Features.Correspondence.Models; /// -/// Represents a reference to another item in the Altinn ecosystem +/// Represents a reference to another item in the Altinn ecosystem. /// public sealed record CorrespondenceExternalReference : MultipartCorrespondenceListItem { /// - /// The reference type + /// The reference type. /// [JsonPropertyName("referenceType")] public required CorrespondenceReferenceType ReferenceType { get; init; } /// - /// The reference value + /// The reference value. /// [JsonPropertyName("referenceValue")] public required string ReferenceValue { get; init; } diff --git a/src/Altinn.App.Core/Features/Correspondence/Models/CorrespondenceNotification.cs b/src/Altinn.App.Core/Features/Correspondence/Models/CorrespondenceNotification.cs index 414d0eaaf..c693563d2 100644 --- a/src/Altinn.App.Core/Features/Correspondence/Models/CorrespondenceNotification.cs +++ b/src/Altinn.App.Core/Features/Correspondence/Models/CorrespondenceNotification.cs @@ -3,70 +3,64 @@ namespace Altinn.App.Core.Features.Correspondence.Models; /// -/// Represents a notification to be sent to the recipient of a correspondence +/// Represents a notification to be sent to the recipient of a correspondence. /// public sealed record CorrespondenceNotification : MultipartCorrespondenceItem { /// - /// The notification template for use for notifications + /// The notification template for use for notifications. /// public required CorrespondenceNotificationTemplate NotificationTemplate { get; init; } /// - /// The email subject to use for notifications - /// - /// Depending on the in use, this value may be padded according to the template logic - /// + ///

The email subject to use for notifications.

+ ///

Depending on the in use, + /// this value may be padded according to the template logic.

///
[StringLength(128, MinimumLength = 0)] public string? EmailSubject { get; init; } /// - /// The email body content to use for notifications - /// - /// Depending on the in use, this value may be padded according to the template logic - /// + ///

The email body content to use for notifications.

+ ///

Depending on the in use, + /// this value may be padded according to the template logic.

///
[StringLength(1024, MinimumLength = 0)] public string? EmailBody { get; init; } /// - /// The sms content to use for notifications - /// - /// Depending on the in use, this value may be padded according to the template logic - /// + ///

The sms content to use for notifications.

+ ///

Depending on the in use, + /// this value may be padded according to the template logic.

///
[StringLength(160, MinimumLength = 0)] public string? SmsBody { get; init; } /// - /// Should a reminder be sent if this correspondence has not been actioned within an appropriate time frame? + /// Should a reminder be sent if this correspondence has not been actioned within an appropriate time frame?. /// public bool? SendReminder { get; init; } /// - /// The email subject to use for reminder notifications - /// - /// Depending on the in use, this value may be padded according to the template logic - /// + ///

The email subject to use for reminder notifications.

+ ///

Depending on the in use, + /// this value may be padded according to the template logic.

///
[StringLength(128, MinimumLength = 0)] public string? ReminderEmailSubject { get; init; } /// - /// The email body content to use for reminder notifications - /// - /// Depending on the in use, this value may be padded according to the template logic - /// + ///

The email body content to use for reminder notifications.

+ ///

Depending on the in use, + /// this value may be padded according to the template logic.

///
[StringLength(1024, MinimumLength = 0)] public string? ReminderEmailBody { get; init; } /// - /// The sms content to use for reminder notifications - /// - /// Depending on the in use, this value may be padded according to the template logic - /// + ///

The sms content to use for reminder notifications.

+ ///

Depending on the in use, + /// this value may be padded according to the template logic.

///
[StringLength(160, MinimumLength = 0)] public string? ReminderSmsBody { get; init; } @@ -82,12 +76,12 @@ public sealed record CorrespondenceNotification : MultipartCorrespondenceItem public CorrespondenceNotificationChannel? ReminderNotificationChannel { get; init; } /// - /// Senders reference for this notification + /// Senders reference for this notification. /// public string? SendersReference { get; init; } /// - /// The date and time for when the notification should be sent + /// The date and time for when the notification should be sent. /// public DateTimeOffset? RequestedSendTime { get; init; } diff --git a/src/Altinn.App.Core/Features/Correspondence/Models/CorrespondenceNotificationChannel.cs b/src/Altinn.App.Core/Features/Correspondence/Models/CorrespondenceNotificationChannel.cs index b97e67579..75f6b7514 100644 --- a/src/Altinn.App.Core/Features/Correspondence/Models/CorrespondenceNotificationChannel.cs +++ b/src/Altinn.App.Core/Features/Correspondence/Models/CorrespondenceNotificationChannel.cs @@ -3,7 +3,7 @@ namespace Altinn.App.Core.Features.Correspondence.Models; /// -/// Available notification channels (methods) +/// Available notification channels (methods). /// [JsonConverter(typeof(JsonStringEnumConverter))] public enum CorrespondenceNotificationChannel diff --git a/src/Altinn.App.Core/Features/Correspondence/Models/CorrespondenceNotificationDetailsResponse.cs b/src/Altinn.App.Core/Features/Correspondence/Models/CorrespondenceNotificationDetailsResponse.cs index 57c7a19ed..4985f882f 100644 --- a/src/Altinn.App.Core/Features/Correspondence/Models/CorrespondenceNotificationDetailsResponse.cs +++ b/src/Altinn.App.Core/Features/Correspondence/Models/CorrespondenceNotificationDetailsResponse.cs @@ -3,24 +3,24 @@ namespace Altinn.App.Core.Features.Correspondence.Models; /// -/// Details about a correspondence notification +/// Details about a correspondence notification. /// public sealed record CorrespondenceNotificationDetailsResponse { /// - /// The notification order identifier + /// The notification order identifier. /// [JsonPropertyName("orderId")] public Guid? OrderId { get; init; } /// - /// Whether or not this is a reminder notification + /// Whether this is a reminder notification. /// [JsonPropertyName("isReminder")] public bool? IsReminder { get; init; } /// - /// The status of the notification + /// The status of the notification. /// [JsonPropertyName("status")] public CorrespondenceNotificationStatusResponse Status { get; init; } diff --git a/src/Altinn.App.Core/Features/Correspondence/Models/CorrespondenceNotificationOrderResponse.cs b/src/Altinn.App.Core/Features/Correspondence/Models/CorrespondenceNotificationOrderResponse.cs index 51e130c35..840f057c1 100644 --- a/src/Altinn.App.Core/Features/Correspondence/Models/CorrespondenceNotificationOrderResponse.cs +++ b/src/Altinn.App.Core/Features/Correspondence/Models/CorrespondenceNotificationOrderResponse.cs @@ -3,72 +3,72 @@ namespace Altinn.App.Core.Features.Correspondence.Models; /// -/// Represents a notification connected to a specific correspondence +/// Represents a notification connected to a specific correspondence. /// public sealed record CorrespondenceNotificationOrderResponse { /// - /// The id of the notification order + /// The id of the notification order. /// [JsonPropertyName("id")] public required string Id { get; set; } /// - /// The senders reference of the notification + /// The senders reference of the notification. /// [JsonPropertyName("sendersReference")] public string? SendersReference { get; set; } /// - /// The requested send time of the notification + /// The requested send time of the notification. /// [JsonPropertyName("requestedSendTime")] public DateTimeOffset RequestedSendTime { get; set; } /// - /// The short name of the creator of the notification order + /// The short name of the creator of the notification order. /// [JsonPropertyName("creator")] public required string Creator { get; init; } /// - /// The date and time of when the notification order was created + /// The date and time of when the notification order was created. /// [JsonPropertyName("created")] public DateTimeOffset Created { get; init; } /// - /// Indicates if the notification is a reminder notification + /// Indicates if the notification is a reminder notification. /// [JsonPropertyName("isReminder")] public bool IsReminder { get; init; } /// - /// The preferred notification channel of the notification order + /// The preferred notification channel of the notification order. /// [JsonPropertyName("notificationChannel")] public CorrespondenceNotificationChannel NotificationChannel { get; init; } /// - /// Indicates if notifications generated by this order should ignore KRR reservations + /// Indicates if notifications generated by this order should ignore KRR reservations. /// [JsonPropertyName("ignoreReservation")] public bool? IgnoreReservation { get; init; } /// - /// The id of the resource that this notification relates to + /// The id of the resource that this notification relates to. /// [JsonPropertyName("resourceId")] public string? ResourceId { get; init; } /// - /// The processing status of the notification order + /// The processing status of the notification order. /// [JsonPropertyName("processingStatus")] public CorrespondenceNotificationStatusSummaryResponse? ProcessingStatus { get; init; } /// - /// The summary of the notifications statuses + /// The summary of the notifications statuses. /// [JsonPropertyName("notificationStatusDetails")] public CorrespondenceNotificationSummaryResponse? NotificationStatusDetails { get; init; } diff --git a/src/Altinn.App.Core/Features/Correspondence/Models/CorrespondenceNotificationRecipientResponse.cs b/src/Altinn.App.Core/Features/Correspondence/Models/CorrespondenceNotificationRecipientResponse.cs index 8f1f93b65..936cada9a 100644 --- a/src/Altinn.App.Core/Features/Correspondence/Models/CorrespondenceNotificationRecipientResponse.cs +++ b/src/Altinn.App.Core/Features/Correspondence/Models/CorrespondenceNotificationRecipientResponse.cs @@ -3,36 +3,36 @@ namespace Altinn.App.Core.Features.Correspondence.Models; /// -/// Represents a recipient of a notification +/// Represents a recipient of a notification. /// public sealed record CorrespondenceNotificationRecipientResponse { /// - /// The email address of the recipient + /// The email address of the recipient. /// [JsonPropertyName("emailAddress")] public string? EmailAddress { get; init; } /// - /// The mobile phone number of the recipient + /// The mobile phone number of the recipient. /// [JsonPropertyName("mobileNumber")] public string? MobileNumber { get; init; } /// - /// The organization number of the recipient + /// The organization number of the recipient. /// [JsonPropertyName("organizationNumber")] public string? OrganisationNumber { get; init; } /// - /// The SSN/identity number of the recipient + /// The SSN/identity number of the recipient. /// [JsonPropertyName("nationalIdentityNumber")] public string? NationalIdentityNumber { get; init; } /// - /// Indicates if the recipient is reserved from receiving communication + /// Indicates if the recipient is reserved from receiving communication. /// [JsonPropertyName("isReserved")] public bool? IsReserved { get; init; } diff --git a/src/Altinn.App.Core/Features/Correspondence/Models/CorrespondenceNotificationStatusDetailsResponse.cs b/src/Altinn.App.Core/Features/Correspondence/Models/CorrespondenceNotificationStatusDetailsResponse.cs index 79ffd4dda..f43375059 100644 --- a/src/Altinn.App.Core/Features/Correspondence/Models/CorrespondenceNotificationStatusDetailsResponse.cs +++ b/src/Altinn.App.Core/Features/Correspondence/Models/CorrespondenceNotificationStatusDetailsResponse.cs @@ -3,30 +3,30 @@ namespace Altinn.App.Core.Features.Correspondence.Models; /// -/// Represents a status overview from a single notification channel +/// Represents a status overview from a single notification channel. /// public sealed record CorrespondenceNotificationStatusDetailsResponse { /// - /// The notification id + /// The notification id. /// [JsonPropertyName("id")] public Guid Id { get; init; } /// - /// Indicates if the sending of the notification was successful + /// Indicates if the sending of the notification was successful. /// [JsonPropertyName("succeeded")] public bool Succeeded { get; init; } /// - /// The recipient of the notification. Either an organisation number or identity number + /// The recipient of the notification. Either an organisation number or identity number. /// [JsonPropertyName("recipient")] public CorrespondenceNotificationRecipientResponse? Recipient { get; init; } /// - /// The result status of the notification + /// The result status of the notification. /// [JsonPropertyName("sendStatus")] public CorrespondenceNotificationStatusSummaryResponse? SendStatus { get; init; } diff --git a/src/Altinn.App.Core/Features/Correspondence/Models/CorrespondenceNotificationStatusResponse.cs b/src/Altinn.App.Core/Features/Correspondence/Models/CorrespondenceNotificationStatusResponse.cs index bb186574c..58cffdef1 100644 --- a/src/Altinn.App.Core/Features/Correspondence/Models/CorrespondenceNotificationStatusResponse.cs +++ b/src/Altinn.App.Core/Features/Correspondence/Models/CorrespondenceNotificationStatusResponse.cs @@ -3,23 +3,23 @@ namespace Altinn.App.Core.Features.Correspondence.Models; /// -/// The status of a correspondence notification +/// The status of a correspondence notification. /// [JsonConverter(typeof(JsonStringEnumConverter))] public enum CorrespondenceNotificationStatusResponse { /// - /// Notification has been scheduled successfully + /// Notification has been scheduled successfully. /// Success, /// - /// Notification cannot be delivered because of missing contact information + /// Notification cannot be delivered because of missing contact information. /// MissingContact, /// - /// Notification has failed + /// Notification has failed. /// Failure, } diff --git a/src/Altinn.App.Core/Features/Correspondence/Models/CorrespondenceNotificationStatusSummaryResponse.cs b/src/Altinn.App.Core/Features/Correspondence/Models/CorrespondenceNotificationStatusSummaryResponse.cs index 56bcd8c46..dc9d8152c 100644 --- a/src/Altinn.App.Core/Features/Correspondence/Models/CorrespondenceNotificationStatusSummaryResponse.cs +++ b/src/Altinn.App.Core/Features/Correspondence/Models/CorrespondenceNotificationStatusSummaryResponse.cs @@ -3,24 +3,24 @@ namespace Altinn.App.Core.Features.Correspondence.Models; /// -/// Represents the status summary of a notification +/// Represents the status summary of a notification. /// public sealed record CorrespondenceNotificationStatusSummaryResponse { /// - /// The status + /// The status. /// [JsonPropertyName("status")] public required string Status { get; init; } /// - /// The status description + /// The status description. /// [JsonPropertyName("description")] public string? Description { get; init; } /// - /// The date and time of when the status was last updated + /// The date and time of when the status was last updated. /// [JsonPropertyName("lastUpdate")] public DateTimeOffset LastUpdate { get; init; } diff --git a/src/Altinn.App.Core/Features/Correspondence/Models/CorrespondenceNotificationSummaryResponse.cs b/src/Altinn.App.Core/Features/Correspondence/Models/CorrespondenceNotificationSummaryResponse.cs index b10bd14a2..d75a18870 100644 --- a/src/Altinn.App.Core/Features/Correspondence/Models/CorrespondenceNotificationSummaryResponse.cs +++ b/src/Altinn.App.Core/Features/Correspondence/Models/CorrespondenceNotificationSummaryResponse.cs @@ -3,18 +3,18 @@ namespace Altinn.App.Core.Features.Correspondence.Models; /// -/// Represents a summary of status overviews from all notification channels +/// Represents a summary of status overviews from all notification channels. /// public sealed record CorrespondenceNotificationSummaryResponse { /// - /// Notifications sent via Email + /// Notifications sent via email. /// [JsonPropertyName("email")] public CorrespondenceNotificationStatusDetailsResponse? Email { get; init; } /// - /// Notifications sent via SMS + /// Notifications sent via SMS. /// [JsonPropertyName("sms")] public CorrespondenceNotificationStatusDetailsResponse? Sms { get; init; } diff --git a/src/Altinn.App.Core/Features/Correspondence/Models/CorrespondenceNotificationTemplate.cs b/src/Altinn.App.Core/Features/Correspondence/Models/CorrespondenceNotificationTemplate.cs index ff48101a7..92ec23155 100644 --- a/src/Altinn.App.Core/Features/Correspondence/Models/CorrespondenceNotificationTemplate.cs +++ b/src/Altinn.App.Core/Features/Correspondence/Models/CorrespondenceNotificationTemplate.cs @@ -3,18 +3,18 @@ namespace Altinn.App.Core.Features.Correspondence.Models; /// -/// The message template to use for notifications +/// The message template to use for notifications. /// [JsonConverter(typeof(JsonStringEnumConverter))] public enum CorrespondenceNotificationTemplate { /// - /// Fully customizable template (e.g. no template) + /// Fully customizable template (e.g. no template). /// CustomMessage, /// - /// Standard Altinn notification template ("You have received a message in Altinn...") + /// Standard Altinn notification template ("You have received a message in Altinn..."). /// GenericAltinnMessage, } diff --git a/src/Altinn.App.Core/Features/Correspondence/Models/CorrespondencePayload.cs b/src/Altinn.App.Core/Features/Correspondence/Models/CorrespondencePayload.cs index 2899d6a9f..5d137a6e9 100644 --- a/src/Altinn.App.Core/Features/Correspondence/Models/CorrespondencePayload.cs +++ b/src/Altinn.App.Core/Features/Correspondence/Models/CorrespondencePayload.cs @@ -4,18 +4,18 @@ namespace Altinn.App.Core.Features.Correspondence.Models; /// -/// Defines an authorisation method to use with the correspondence server +/// Defines an authorisation method to use with the correspondence server. /// public enum CorrespondenceAuthorisation { /// - /// Uses the built-in for authorization + /// Uses the built-in for authorization. /// Maskinporten, } /// -/// Authorisation properties which are common for all correspondence interaction +/// Authorisation properties which are common for all correspondence interaction. /// public abstract record CorrespondencePayloadBase { @@ -25,14 +25,14 @@ public abstract record CorrespondencePayloadBase } /// -/// Represents the payload for sending a correspondence +/// Represents the payload for sending a correspondence. /// public sealed record SendCorrespondencePayload : CorrespondencePayloadBase { internal CorrespondenceRequest CorrespondenceRequest { get; init; } /// - /// Instantiates a new payload for + /// Instantiates a new payload for . /// /// The correspondence request to send /// Access token factory delegate (e.g. ) to use for authorisation @@ -43,7 +43,7 @@ public SendCorrespondencePayload(CorrespondenceRequest request, Func - /// Instantiates a new payload for + /// Instantiates a new payload for . /// /// The correspondence request to send /// The built-in authorisation method to use @@ -55,17 +55,17 @@ public SendCorrespondencePayload(CorrespondenceRequest request, CorrespondenceAu } /// -/// Represents a payload for querying the status of a correspondence +/// Represents a payload for querying the status of a correspondence. /// public sealed record GetCorrespondenceStatusPayload : CorrespondencePayloadBase { /// - /// The correspondence identifier + /// The correspondence identifier. /// public Guid CorrespondenceId { get; init; } /// - /// Instantiates a new payload for + /// Instantiates a new payload for . /// /// The correspondence identifier to retrieve information about /// Access token factory delegate (e.g. ) to use for authorisation @@ -76,7 +76,7 @@ public GetCorrespondenceStatusPayload(Guid correspondenceId, Func } /// - /// Instantiates a new payload for + /// Instantiates a new payload for . /// /// The correspondence identifier to retrieve information about /// The built-in authorisation method to use diff --git a/src/Altinn.App.Core/Features/Correspondence/Models/CorrespondenceReferenceType.cs b/src/Altinn.App.Core/Features/Correspondence/Models/CorrespondenceReferenceType.cs index 343f703d5..8a028f4ac 100644 --- a/src/Altinn.App.Core/Features/Correspondence/Models/CorrespondenceReferenceType.cs +++ b/src/Altinn.App.Core/Features/Correspondence/Models/CorrespondenceReferenceType.cs @@ -3,33 +3,33 @@ namespace Altinn.App.Core.Features.Correspondence.Models; /// -/// Defines the type of an external reference +/// Defines the type of external reference. /// [JsonConverter(typeof(JsonStringEnumConverter))] public enum CorrespondenceReferenceType { /// - /// A generic reference + /// A generic reference. /// Generic, /// - /// A reference to an Altinn App Instance + /// A reference to an Altinn app instance. /// AltinnAppInstance, /// - /// A reference to an Altinn Broker File Transfer + /// A reference to an Altinn broker file transfer. /// AltinnBrokerFileTransfer, /// - /// A reference to a Dialogporten Dialog ID + /// A reference to a Dialogporten dialog ID. /// DialogportenDialogId, /// - /// A reference to a Dialogporten Process ID + /// A reference to a Dialogporten process ID. /// DialogportenProcessId, } diff --git a/src/Altinn.App.Core/Features/Correspondence/Models/CorrespondenceReplyOption.cs b/src/Altinn.App.Core/Features/Correspondence/Models/CorrespondenceReplyOption.cs index 6426bf88a..8fdbc6aae 100644 --- a/src/Altinn.App.Core/Features/Correspondence/Models/CorrespondenceReplyOption.cs +++ b/src/Altinn.App.Core/Features/Correspondence/Models/CorrespondenceReplyOption.cs @@ -3,18 +3,18 @@ namespace Altinn.App.Core.Features.Correspondence.Models; /// -/// Methods for recipients to respond to a correspondence, in addition to the normal Read and Confirm operations +/// Methods for recipients to respond to a correspondence, in addition to the normal read and confirm operations. /// public sealed record CorrespondenceReplyOption : MultipartCorrespondenceListItem { /// - /// The URL to be used as a reply/response to a correspondence + /// The URL to be used as a reply/response to a correspondence. /// [JsonPropertyName("linkURL")] public required string LinkUrl { get; init; } /// - /// The link text + /// The link text. /// [JsonPropertyName("linkText")] public string? LinkText { get; init; } diff --git a/src/Altinn.App.Core/Features/Correspondence/Models/CorrespondenceRequest.cs b/src/Altinn.App.Core/Features/Correspondence/Models/CorrespondenceRequest.cs index 7cb0361a4..82c8e1153 100644 --- a/src/Altinn.App.Core/Features/Correspondence/Models/CorrespondenceRequest.cs +++ b/src/Altinn.App.Core/Features/Correspondence/Models/CorrespondenceRequest.cs @@ -6,7 +6,7 @@ namespace Altinn.App.Core.Features.Correspondence.Models; /// -/// Represents a correspondence item that is serialisable as multipart form data +/// Represents a correspondence item that is serialisable as multipart form data. /// public abstract record MultipartCorrespondenceItem { @@ -173,7 +173,7 @@ internal void ValidateAllProperties(string dataTypeName) } /// - /// Removes the portion of a + /// Removes the portion of a . /// internal static DateTimeOffset NormaliseDateTime(DateTimeOffset dateTime) { @@ -182,7 +182,7 @@ internal static DateTimeOffset NormaliseDateTime(DateTimeOffset dateTime) } /// -/// Represents a correspondence list item that is serialisable as multipart form data +/// Represents a correspondence list item that is serialisable as multipart form data. /// public abstract record MultipartCorrespondenceListItem : MultipartCorrespondenceItem { @@ -190,33 +190,33 @@ public abstract record MultipartCorrespondenceListItem : MultipartCorrespondence } /// -/// Represents and Altinn Correspondence request +/// Represents and Altinn correspondence request. /// public sealed record CorrespondenceRequest : MultipartCorrespondenceItem { /// - /// The Resource Id for the correspondence service + /// The Resource ID for the correspondence service. /// public required string ResourceId { get; init; } /// - /// The sending organisation of the correspondence + /// The sending organisation of the correspondence. /// public required OrganisationNumber Sender { get; init; } /// - /// A reference value given to the message by the creator + /// A reference value given to the message by the creator. /// public required string SendersReference { get; init; } /// - /// The content of the message + /// The content of the message. /// public required CorrespondenceContent Content { get; init; } /// /// When should the correspondence become visible to the recipient? - /// If omitted, the correspondence is available immediately + /// If omitted, the correspondence is available immediately. /// public DateTimeOffset? RequestedPublishTime { get; init; } @@ -231,52 +231,52 @@ public sealed record CorrespondenceRequest : MultipartCorrespondenceItem public DateTimeOffset? DueDateTime { get; init; } /// - /// The recipients of the correspondence. Either Norwegian organisation numbers or national identity numbers + /// The recipients of the correspondence. Either Norwegian organisation numbers or national identity numbers. /// public required IReadOnlyList Recipients { get; init; } /// - /// An alternative name for the sender of the correspondence. The name will be displayed instead of the organisation name + /// An alternative name for the sender of the correspondence. The name will be displayed instead of the organisation name. /// public string? MessageSender { get; init; } /// - /// Reference to other items in the Altinn ecosystem + /// Reference to other items in the Altinn ecosystem. /// public IReadOnlyList? ExternalReferences { get; init; } /// - /// User-defined properties related to the correspondence + /// User-defined properties related to the correspondence. /// public IReadOnlyDictionary? PropertyList { get; init; } /// - /// Options for how the recipient can reply to the correspondence + /// Options for how the recipient can reply to the correspondence. /// public IReadOnlyList? ReplyOptions { get; init; } /// - /// Notifications associated with this correspondence + /// Notifications associated with this correspondence. /// public CorrespondenceNotification? Notification { get; init; } /// - /// Specifies whether the correspondence can override reservation against digital communication in KRR + /// Specifies whether the correspondence can override reservation against digital communication in KRR. /// public bool? IgnoreReservation { get; init; } /// - /// Specifies if reading the correspondence needs to be confirmed by the recipient + /// Specifies if reading the correspondence needs to be confirmed by the recipient. /// public bool? IsConfirmationNeeded { get; init; } /// - /// Existing attachments that should be added to the correspondence + /// Existing attachments that should be added to the correspondence. /// public IReadOnlyList? ExistingAttachments { get; init; } /// - /// Serialises the entire object to a provided instance + /// Serialises the entire object to a provided instance. /// /// The multipart object to serialise into internal void Serialise(MultipartFormDataContent content) @@ -303,7 +303,7 @@ internal void Serialise(MultipartFormDataContent content) } /// - /// Serialises the entire object to a newly created + /// Serialises the entire object to a newly created . /// internal MultipartFormDataContent Serialise() { @@ -313,11 +313,9 @@ internal MultipartFormDataContent Serialise() } /// - /// Validates the state of the request based on some known requirements from the Correspondence API + ///

Validates the state of the request based on some known requirements from the Correspondence API.

+ ///

Mostly stuff found here: https://github.com/Altinn/altinn-correspondence/blob/main/src/Altinn.Correspondence.Application/InitializeCorrespondences/InitializeCorrespondencesHandler.cs#L51.

///
- /// - /// Mostly stuff found here: https://github.com/Altinn/altinn-correspondence/blob/main/src/Altinn.Correspondence.Application/InitializeCorrespondences/InitializeCorrespondencesHandler.cs#L51 - /// private void Validate() { if (Recipients.Count != Recipients.Distinct().Count()) diff --git a/src/Altinn.App.Core/Features/Correspondence/Models/CorrespondenceStatus.cs b/src/Altinn.App.Core/Features/Correspondence/Models/CorrespondenceStatus.cs index cb56c60dd..d27cd11c2 100644 --- a/src/Altinn.App.Core/Features/Correspondence/Models/CorrespondenceStatus.cs +++ b/src/Altinn.App.Core/Features/Correspondence/Models/CorrespondenceStatus.cs @@ -3,68 +3,68 @@ namespace Altinn.App.Core.Features.Correspondence.Models; /// -/// The status of a correspondence +/// The status of a correspondence. /// [JsonConverter(typeof(JsonStringEnumConverter))] public enum CorrespondenceStatus { /// - /// Correspondence has been Initialized + /// Correspondence has been initialised. /// Initialized, /// - /// Correspondence is ready for publish, but not available for recipient + /// Correspondence is ready for publish, but not available for recipient. /// ReadyForPublish, /// - /// Correspondence has been published, and is available for recipient + /// Correspondence has been published, and is available for recipient. /// Published, /// - /// Correspondence fetched by recipient + /// Correspondence fetched by recipient. /// Fetched, /// - /// Correspondence read by recipient + /// Correspondence read by recipient. /// Read, /// - /// Recipient has replied to the correspondence + /// Recipient has replied to the correspondence. /// Replied, /// - /// Correspondence confirmed by recipient + /// Correspondence confirmed by recipient. /// Confirmed, /// - /// Correspondence has been purged by recipient + /// Correspondence has been purged by recipient. /// PurgedByRecipient, /// - /// Correspondence has been purged by Altinn + /// Correspondence has been purged by Altinn. /// PurgedByAltinn, /// - /// Correspondence has been archived + /// Correspondence has been archived. /// Archived, /// - /// Recipient has opted out of digital communication in KRR + /// Recipient has opted out of digital communication in KRR. /// Reserved, /// - /// Correspondence has failed + /// Correspondence has failed. /// Failed, } diff --git a/src/Altinn.App.Core/Features/Correspondence/Models/CorrespondenceStatusEventResponse.cs b/src/Altinn.App.Core/Features/Correspondence/Models/CorrespondenceStatusEventResponse.cs index 06f0d5fdb..7853f6535 100644 --- a/src/Altinn.App.Core/Features/Correspondence/Models/CorrespondenceStatusEventResponse.cs +++ b/src/Altinn.App.Core/Features/Correspondence/Models/CorrespondenceStatusEventResponse.cs @@ -3,24 +3,24 @@ namespace Altinn.App.Core.Features.Correspondence.Models; /// -/// Represents a correspondence status event +/// Represents a correspondence status event. /// public sealed record CorrespondenceStatusEventResponse { /// - /// The event status indicator + /// The event status indicator. /// [JsonPropertyName("status")] public CorrespondenceStatus Status { get; init; } /// - /// Description of the status + /// Description of the status. /// [JsonPropertyName("statusText")] public required string StatusText { get; init; } /// - /// Timestamp for when this correspondence status event occurred + /// Timestamp for when this correspondence status event occurred. /// [JsonPropertyName("statusChanged")] public DateTimeOffset StatusChanged { get; init; } diff --git a/src/Altinn.App.Core/Features/Correspondence/Models/GetCorrespondenceStatusResponse.cs b/src/Altinn.App.Core/Features/Correspondence/Models/GetCorrespondenceStatusResponse.cs index 372f8aa3b..8177fa5ca 100644 --- a/src/Altinn.App.Core/Features/Correspondence/Models/GetCorrespondenceStatusResponse.cs +++ b/src/Altinn.App.Core/Features/Correspondence/Models/GetCorrespondenceStatusResponse.cs @@ -4,36 +4,36 @@ namespace Altinn.App.Core.Features.Correspondence.Models; /// -/// Response after a successful request +/// Response after a successful request. /// public sealed record GetCorrespondenceStatusResponse { /// - /// The status history for the correspondence + /// The status history for the correspondence. /// [JsonPropertyName("statusHistory")] public required IEnumerable StatusHistory { get; init; } /// - /// Notifications directly related to this correspondence + /// Notifications directly related to this correspondence. /// [JsonPropertyName("notifications")] public IEnumerable? Notifications { get; init; } /// - /// The recipient of the correspondence. Either an organisation number or identity number + /// The recipient of the correspondence. Either an organisation number or identity number. /// [JsonPropertyName("recipient")] public required string Recipient { get; init; } /// - /// Indicates if the correspondence has been set as unread by the recipient + /// Indicates if the correspondence has been set as unread by the recipient. /// [JsonPropertyName("markedUnread")] public bool? MarkedUnread { get; init; } /// - /// Unique Id for this correspondence + /// Unique Id for this correspondence. /// [JsonPropertyName("correspondenceId")] public Guid CorrespondenceId { get; init; } @@ -45,107 +45,105 @@ public sealed record GetCorrespondenceStatusResponse public CorrespondenceContentResponse? Content { get; init; } /// - /// When the correspondence was created + /// When the correspondence was created. /// [JsonPropertyName("created")] public DateTimeOffset Created { get; init; } /// - /// The current status for the correspondence + /// The current status for the correspondence. /// [JsonPropertyName("status")] public CorrespondenceStatus Status { get; init; } /// - /// The current status text for the correspondence + /// The current status text for the correspondence. /// [JsonPropertyName("statusText")] public string? StatusText { get; init; } /// - /// Timestamp for when the current correspondence status was changed + /// Timestamp for when the current correspondence status was changed. /// [JsonPropertyName("statusChanged")] public DateTimeOffset StatusChanged { get; init; } /// - /// The resource id for the correspondence service + /// The resource id for the correspondence service. /// [JsonPropertyName("resourceId")] public required string ResourceId { get; init; } /// - /// The sending organisation of the correspondence + /// The sending organisation of the correspondence. /// [JsonPropertyName("sender")] [OrganisationNumberJsonConverter(OrganisationNumberFormat.International)] public OrganisationNumber Sender { get; init; } /// - /// A reference value given to the message by the creator + /// A reference value given to the message by the creator. /// [JsonPropertyName("sendersReference")] public required string SendersReference { get; init; } /// - /// An alternative name for the sender of the correspondence. The name will be displayed instead of the organization name + /// An alternative name for the sender of the correspondence. The name will be displayed instead of the organization name. /// [JsonPropertyName("messageSender")] public string? MessageSender { get; init; } /// - /// When the correspondence should become visible to the recipient + /// When the correspondence should become visible to the recipient. /// [JsonPropertyName("requestedPublishTime")] public DateTimeOffset? RequestedPublishTime { get; init; } /// - /// The date for when Altinn can remove the correspondence from its database + /// The date for when Altinn can remove the correspondence from its database. /// [JsonPropertyName("allowSystemDeleteAfter")] public DateTimeOffset? AllowSystemDeleteAfter { get; init; } /// - /// A date and time for when the recipient must reply + /// A date and time for when the recipient must reply. /// [JsonPropertyName("dueDateTime")] public DateTimeOffset? DueDateTime { get; init; } /// - /// Reference to other items in the Altinn ecosystem + /// Reference to other items in the Altinn ecosystem. /// [JsonPropertyName("externalReferences")] public IEnumerable? ExternalReferences { get; init; } /// - /// User-defined properties related to the correspondence + /// User-defined properties related to the correspondence. /// [JsonPropertyName("propertyList")] public IReadOnlyDictionary? PropertyList { get; init; } /// - /// Options for how the recipient can reply to the correspondence + /// Options for how the recipient can reply to the correspondence. /// [JsonPropertyName("replyOptions")] public IEnumerable? ReplyOptions { get; init; } /// - /// Specifies whether the correspondence can override reservation against digital communication in KRR + /// Specifies whether the correspondence can override reservation against digital communication in KRR. /// [JsonPropertyName("ignoreReservation")] public bool? IgnoreReservation { get; init; } /// - /// The time the correspondence was published + ///

The time the correspondence was published.

+ ///

A null value means the correspondence has not yet been published.

///
- /// - /// A null value means the correspondence has not yet been published - /// [JsonPropertyName("published")] public DateTimeOffset? Published { get; init; } /// - /// Specifies whether reading the correspondence needs to be confirmed by the recipient + /// Specifies whether reading the correspondence needs to be confirmed by the recipient. /// [JsonPropertyName("isConfirmationNeeded")] public bool IsConfirmationNeeded { get; init; } diff --git a/src/Altinn.App.Core/Features/Correspondence/Models/OrganisationOrPersonIdentifier.cs b/src/Altinn.App.Core/Features/Correspondence/Models/OrganisationOrPersonIdentifier.cs index 549f25b1c..8db69d7ab 100644 --- a/src/Altinn.App.Core/Features/Correspondence/Models/OrganisationOrPersonIdentifier.cs +++ b/src/Altinn.App.Core/Features/Correspondence/Models/OrganisationOrPersonIdentifier.cs @@ -5,13 +5,13 @@ namespace Altinn.App.Core.Features.Correspondence.Models; /// -/// Represents either an organisation or a person +/// Represents either an organisation or a person. /// [OrganisationOrPersonIdentifierJsonConverter(OrganisationNumberFormat.International)] public abstract record OrganisationOrPersonIdentifier { /// - /// Represents an organisation + /// Represents an organisation. /// /// The organisation number public sealed record Organisation(OrganisationNumber Value) : OrganisationOrPersonIdentifier @@ -24,7 +24,7 @@ public override string ToString() } /// - /// Represents a person + /// Represents a person. /// /// The national identity number public sealed record Person(NationalIdentityNumber Value) : OrganisationOrPersonIdentifier @@ -37,7 +37,7 @@ public override string ToString() } /// - /// Creates a new instance of + /// Creates a new instance of . /// /// The organisation number public static Organisation Create(OrganisationNumber value) @@ -46,7 +46,7 @@ public static Organisation Create(OrganisationNumber value) } /// - /// Creates a new instance of + /// Creates a new instance of . /// /// The national identity number public static Person Create(NationalIdentityNumber value) @@ -55,7 +55,7 @@ public static Person Create(NationalIdentityNumber value) } /// - /// Attempts to parse a string containing either an or a + /// Attempts to parse a string containing either an or a . /// /// The string to parse /// The supplied string is not a valid format for either type @@ -78,7 +78,7 @@ public static OrganisationOrPersonIdentifier Parse(string value) } /// -/// Json converter to transform between and +/// Json converter to transform between and . /// [AttributeUsage(AttributeTargets.Property | AttributeTargets.Class, AllowMultiple = false)] internal class OrganisationOrPersonIdentifierJsonConverterAttribute : JsonConverterAttribute diff --git a/src/Altinn.App.Core/Features/Correspondence/Models/SendCorrespondenceResponse.cs b/src/Altinn.App.Core/Features/Correspondence/Models/SendCorrespondenceResponse.cs index b82aa9870..2a789ed7a 100644 --- a/src/Altinn.App.Core/Features/Correspondence/Models/SendCorrespondenceResponse.cs +++ b/src/Altinn.App.Core/Features/Correspondence/Models/SendCorrespondenceResponse.cs @@ -3,18 +3,18 @@ namespace Altinn.App.Core.Features.Correspondence.Models; /// -/// Response after a successful request +/// Response after a successful request. /// public sealed record SendCorrespondenceResponse { /// - /// The correspondences that were processed + /// The correspondences that were processed. /// [JsonPropertyName("correspondences")] public required IReadOnlyList Correspondences { get; init; } /// - /// The attachments linked to the correspondence + /// The attachments linked to the correspondence. /// [JsonPropertyName("attachmentIds")] public IReadOnlyList? AttachmentIds { get; init; } diff --git a/src/Altinn.App.Core/Features/Maskinporten/Constants/JwtClaimTypes.cs b/src/Altinn.App.Core/Features/Maskinporten/Constants/JwtClaimTypes.cs index f14998f26..be4391050 100644 --- a/src/Altinn.App.Core/Features/Maskinporten/Constants/JwtClaimTypes.cs +++ b/src/Altinn.App.Core/Features/Maskinporten/Constants/JwtClaimTypes.cs @@ -1,7 +1,7 @@ namespace Altinn.App.Core.Features.Maskinporten.Constants; /// -/// Relevant known Digdir JWT claim types +/// Relevant known Digdir JWT claim types. /// internal static class JwtClaimTypes { diff --git a/src/Altinn.App.Core/Features/Maskinporten/Constants/TokenAuthorities.cs b/src/Altinn.App.Core/Features/Maskinporten/Constants/TokenAuthorities.cs index d076ff87d..4b8e9fff1 100644 --- a/src/Altinn.App.Core/Features/Maskinporten/Constants/TokenAuthorities.cs +++ b/src/Altinn.App.Core/Features/Maskinporten/Constants/TokenAuthorities.cs @@ -1,17 +1,17 @@ namespace Altinn.App.Core.Features.Maskinporten.Constants; /// -/// Supported token authorities +/// Supported token authorities. /// internal enum TokenAuthorities { /// - /// Maskinporten + /// Maskinporten. /// Maskinporten, /// - /// Altinn Authentication token exchange + /// Altinn Authentication token exchange. /// AltinnTokenExchange, } diff --git a/src/Altinn.App.Core/Features/Maskinporten/Converters/JsonWebKeyConverter.cs b/src/Altinn.App.Core/Features/Maskinporten/Converters/JsonWebKeyConverter.cs index 5b6a54ac9..c7bfff37d 100644 --- a/src/Altinn.App.Core/Features/Maskinporten/Converters/JsonWebKeyConverter.cs +++ b/src/Altinn.App.Core/Features/Maskinporten/Converters/JsonWebKeyConverter.cs @@ -7,7 +7,7 @@ namespace Altinn.App.Core.Features.Maskinporten.Converters; /// -/// Utility class that facilitates conversion +/// Utility class that facilitates conversion. /// internal static class JsonWebKeyConverter { diff --git a/src/Altinn.App.Core/Features/Maskinporten/Delegates/MaskinportenDelegatingHandler.cs b/src/Altinn.App.Core/Features/Maskinporten/Delegates/MaskinportenDelegatingHandler.cs index c5dfd25f3..0d9a64624 100644 --- a/src/Altinn.App.Core/Features/Maskinporten/Delegates/MaskinportenDelegatingHandler.cs +++ b/src/Altinn.App.Core/Features/Maskinporten/Delegates/MaskinportenDelegatingHandler.cs @@ -6,7 +6,7 @@ namespace Altinn.App.Core.Features.Maskinporten.Delegates; /// -/// A middleware that provides authorization for all http requests +/// A middleware that provides authorization for all http requests. /// internal sealed class MaskinportenDelegatingHandler : DelegatingHandler { diff --git a/src/Altinn.App.Core/Features/Maskinporten/Exceptions/MaskinportenAuthenticationException.cs b/src/Altinn.App.Core/Features/Maskinporten/Exceptions/MaskinportenAuthenticationException.cs index 7b258157c..19d7057a4 100644 --- a/src/Altinn.App.Core/Features/Maskinporten/Exceptions/MaskinportenAuthenticationException.cs +++ b/src/Altinn.App.Core/Features/Maskinporten/Exceptions/MaskinportenAuthenticationException.cs @@ -1,7 +1,7 @@ namespace Altinn.App.Core.Features.Maskinporten.Exceptions; /// -/// An exception that indicates a problem with the authentication/authorization call to Maskinporten +/// An exception that indicates a problem with the authentication/authorization call to Maskinporten. /// public sealed class MaskinportenAuthenticationException : MaskinportenException { diff --git a/src/Altinn.App.Core/Features/Maskinporten/Exceptions/MaskinportenConfigurationException.cs b/src/Altinn.App.Core/Features/Maskinporten/Exceptions/MaskinportenConfigurationException.cs index adeecea8b..7a69a24e6 100644 --- a/src/Altinn.App.Core/Features/Maskinporten/Exceptions/MaskinportenConfigurationException.cs +++ b/src/Altinn.App.Core/Features/Maskinporten/Exceptions/MaskinportenConfigurationException.cs @@ -1,7 +1,7 @@ namespace Altinn.App.Core.Features.Maskinporten.Exceptions; /// -/// An exception that indicates a missing or invalid `maskinporten-settings.json` file +/// An exception that indicates a missing or invalid maskinporten-settings.json file. /// public sealed class MaskinportenConfigurationException : MaskinportenException { diff --git a/src/Altinn.App.Core/Features/Maskinporten/Exceptions/MaskinportenTokenExpiredException.cs b/src/Altinn.App.Core/Features/Maskinporten/Exceptions/MaskinportenTokenExpiredException.cs index fc2be85c6..22a3dd8b5 100644 --- a/src/Altinn.App.Core/Features/Maskinporten/Exceptions/MaskinportenTokenExpiredException.cs +++ b/src/Altinn.App.Core/Features/Maskinporten/Exceptions/MaskinportenTokenExpiredException.cs @@ -1,7 +1,7 @@ namespace Altinn.App.Core.Features.Maskinporten.Exceptions; /// -/// An exception that indicates the access token has expired when it was in fact expected to be valid +/// An exception that indicates the access token has expired when it was in fact expected to be valid. /// public sealed class MaskinportenTokenExpiredException : MaskinportenException { diff --git a/src/Altinn.App.Core/Features/Maskinporten/Extensions/ServiceCollectionExtensions.cs b/src/Altinn.App.Core/Features/Maskinporten/Extensions/ServiceCollectionExtensions.cs index 21c2191a6..fa3bac9df 100644 --- a/src/Altinn.App.Core/Features/Maskinporten/Extensions/ServiceCollectionExtensions.cs +++ b/src/Altinn.App.Core/Features/Maskinporten/Extensions/ServiceCollectionExtensions.cs @@ -35,7 +35,7 @@ public static IServiceCollection AddMaskinportenClient(this IServiceCollection s } /// - /// Binds a configuration to the supplied config section path and options name + /// Binds a configuration to the supplied config section path and options name. /// /// The service collection /// The configuration section path, e.g. "MaskinportenSettingsInternal" diff --git a/src/Altinn.App.Core/Features/Maskinporten/IMaskinportenClient.cs b/src/Altinn.App.Core/Features/Maskinporten/IMaskinportenClient.cs index 8f25a2e56..74e2c9d07 100644 --- a/src/Altinn.App.Core/Features/Maskinporten/IMaskinportenClient.cs +++ b/src/Altinn.App.Core/Features/Maskinporten/IMaskinportenClient.cs @@ -8,13 +8,9 @@ namespace Altinn.App.Core.Features.Maskinporten; public interface IMaskinportenClient { /// - /// - /// Sends an authorization request to Maskinporten and retrieves a JWT Bearer token for successful requests. - /// - /// - /// Will cache tokens per scope, for the lifetime duration as defined in the Maskinporten token payload, - /// which means this method is safe to call in a loop or concurrent environment without encountering rate concerns. - /// + ///

Sends an authorization request to Maskinporten and retrieves a JWT Bearer token for successful requests.

+ ///

Will cache tokens per scope, for the lifetime duration as defined in the Maskinporten token payload, + /// which means this method is safe to call in a loop or concurrent environment without encountering rate concerns.

///
/// A list of scopes to claim authorization for with Maskinporten. /// An optional cancellation token to be forwarded to internal http calls. @@ -29,13 +25,9 @@ public interface IMaskinportenClient public Task GetAccessToken(IEnumerable scopes, CancellationToken cancellationToken = default); /// - /// - /// Sends an authorization request to Maskinporten, then exchanges the grant for an Altinn issued token. - /// - /// - /// Will cache tokens per scope, for the lifetime duration as defined in the Altinn token payload, - /// which means this method is safe to call in a loop or concurrent environment without encountering rate concerns. - /// + ///

Sends an authorization request to Maskinporten, then exchanges the grant for an Altinn issued token.

+ ///

Will cache tokens per scope, for the lifetime duration as defined in the Altinn token payload, + /// which means this method is safe to call in a loop or concurrent environment without encountering rate concerns.

///
/// A list of scopes to claim authorization for with Maskinporten. These scopes will carry through to the Altinn issued token. /// An optional cancellation token to be forwarded to internal http calls. diff --git a/src/Altinn.App.Core/Features/Maskinporten/MaskinportenClient.cs b/src/Altinn.App.Core/Features/Maskinporten/MaskinportenClient.cs index 9ee59574e..32bf18fca 100644 --- a/src/Altinn.App.Core/Features/Maskinporten/MaskinportenClient.cs +++ b/src/Altinn.App.Core/Features/Maskinporten/MaskinportenClient.cs @@ -198,7 +198,7 @@ await _tokenCache.SetAsync( } /// - /// Handles the sending of grant requests to Maskinporten and parsing the returned response + /// Handles the sending of grant requests to Maskinporten and parsing the returned response. /// /// A single space-separated string containing the scopes to authorize for. /// An optional cancellation token. @@ -338,13 +338,9 @@ internal string GenerateJwtGrant(string formattedScopes) } /// - /// - /// Generates an authentication payload from the supplied JWT (see ). - /// - /// - /// This payload needs to be a object with some precise parameters, - /// as per the docs.. - /// + ///

Generates an authentication payload from the supplied JWT (see ).

+ ///

This payload needs to be a object with some precise parameters, + /// as per the docs.

///
/// The JWT token generated by . internal static FormUrlEncodedContent AuthenticationPayloadFactory(string jwtAssertion) diff --git a/src/Altinn.App.Core/Features/Maskinporten/Models/MaskinportenSettings.cs b/src/Altinn.App.Core/Features/Maskinporten/Models/MaskinportenSettings.cs index 421d1de3f..fa8b603c1 100644 --- a/src/Altinn.App.Core/Features/Maskinporten/Models/MaskinportenSettings.cs +++ b/src/Altinn.App.Core/Features/Maskinporten/Models/MaskinportenSettings.cs @@ -7,12 +7,8 @@ namespace Altinn.App.Core.Features.Maskinporten.Models; /// -/// -/// A configuration object that represents all required Maskinporten authentication settings. -/// -/// -/// Typically serialized as `maskinporten-settings.json` and injected in the runtime. -/// +///

A configuration object that represents all required Maskinporten authentication settings.

+///

Typically serialised as maskinporten-settings.json and injected in the runtime.

///
public sealed record MaskinportenSettings { @@ -91,84 +87,84 @@ internal JsonWebKey ConvertJwk() } /// -/// Serialization wrapper for a JsonWebKey object +/// Serialization wrapper for a JsonWebKey object. /// public record JwkWrapper { /// - /// Key type + /// Key type. /// [JsonPropertyName("kty")] public string? Kty { get; init; } /// - /// Public key usage + /// Public key usage. /// [JsonPropertyName("use")] public string? Use { get; init; } /// - /// Key ID + /// Key ID. /// [JsonPropertyName("kid")] public string? Kid { get; init; } /// - /// Algorithm + /// Algorithm. /// [JsonPropertyName("alg")] public string? Alg { get; init; } /// - /// Modulus + /// Modulus. /// [JsonPropertyName("n")] public string? N { get; init; } /// - /// Exponent + /// Exponent. /// [JsonPropertyName("e")] public string? E { get; init; } /// - /// Private exponent + /// Private exponent. /// [JsonPropertyName("d")] public string? D { get; init; } /// - /// First prime factor + /// First prime factor. /// [JsonPropertyName("p")] public string? P { get; init; } /// - /// Second prime factor + /// Second prime factor. /// [JsonPropertyName("q")] public string? Q { get; init; } /// - /// First CRT coefficient + /// First CRT coefficient. /// [JsonPropertyName("qi")] public string? Qi { get; init; } /// - /// First factor CRT exponent + /// First factor CRT exponent. /// [JsonPropertyName("dp")] public string? Dp { get; init; } /// - /// Second factor CRT exponent + /// Second factor CRT exponent. /// [JsonPropertyName("dq")] public string? Dq { get; init; } /// - /// Validates the contents of this JWK + /// Validates the contents of this JWK. /// public ValidationResult Validate() { @@ -195,7 +191,7 @@ public ValidationResult Validate() } /// - /// A instance containing the component data from this record + /// A instance containing the component data from this record. /// public JsonWebKey ToJsonWebKey() { @@ -217,12 +213,12 @@ public JsonWebKey ToJsonWebKey() } /// - /// A record that holds the result of a call + /// A record that holds the result of a call. /// public readonly record struct ValidationResult { /// - /// A collection of properties that are considered to be invalid + /// A collection of properties that are considered to be invalid. /// public IEnumerable? InvalidProperties { get; init; } @@ -232,7 +228,7 @@ public readonly record struct ValidationResult public bool IsValid() => InvalidProperties is null || !InvalidProperties.Any(); /// - /// Helpful summary of the result + /// Helpful summary of the result. /// public override string ToString() { diff --git a/src/Altinn.App.Core/Features/Maskinporten/Models/MaskinportenTokenResponse.cs b/src/Altinn.App.Core/Features/Maskinporten/Models/MaskinportenTokenResponse.cs index cbab31935..cccb31511 100644 --- a/src/Altinn.App.Core/Features/Maskinporten/Models/MaskinportenTokenResponse.cs +++ b/src/Altinn.App.Core/Features/Maskinporten/Models/MaskinportenTokenResponse.cs @@ -4,37 +4,37 @@ namespace Altinn.App.Core.Features.Maskinporten.Models; /// -/// The response received from Maskinporten after a successful grant request +/// The response received from Maskinporten after a successful grant request. /// internal sealed record MaskinportenTokenResponse { /// - /// The JWT access token to be used for authorisation of http requests + /// The JWT access token to be used for authorisation of http requests. /// [JsonPropertyName("access_token")] [JsonConverter(typeof(JwtTokenJsonConverter))] public required JwtToken AccessToken { get; init; } /// - /// The type of JWT received. In this context, the value is always `Bearer` + /// The type of JWT received. In this context, the value is always Bearer. /// [JsonPropertyName("token_type")] public required string TokenType { get; init; } /// - /// The number of seconds until token expiry. Typically set to 120 = 2 minutes + /// The number of seconds until token expiry. Typically set to 120 = 2 minutes. /// [JsonPropertyName("expires_in")] public required int ExpiresIn { get; init; } /// - /// The scope(s) associated with the authorization token () + /// The scope(s) associated with the authorization token (). /// [JsonPropertyName("scope")] public required string Scope { get; init; } /// - /// Stringifies the content of this instance, while masking the JWT signature part of + /// Stringifies the content of this instance, while masking the JWT signature part of . /// public override string ToString() { diff --git a/src/Altinn.App.Core/Models/JwtToken.cs b/src/Altinn.App.Core/Models/JwtToken.cs index 4d4f8eda2..bc831743d 100644 --- a/src/Altinn.App.Core/Models/JwtToken.cs +++ b/src/Altinn.App.Core/Models/JwtToken.cs @@ -5,21 +5,21 @@ namespace Altinn.App.Core.Models; /// -/// Represents an OAuth 2.0 access token in JWT format -/// Needs to be unencrypted +/// Represents an OAuth 2.0 access token in JWT format. +/// Needs to be unencrypted. /// [ImmutableObject(true)] // `ImmutableObject` prevents serialization with HybridCache public readonly partial struct JwtToken : IEquatable { /// - /// The access token value (JWT format) + /// The access token value (JWT format). /// public string Value { get; } private readonly JwtSecurityToken _jwtSecurityToken; /// - /// The instant in time when the token expires + /// The instant in time when the token expires. /// public DateTimeOffset ExpiresAt => _jwtSecurityToken.ValidTo; @@ -30,12 +30,12 @@ public bool IsExpired(TimeProvider? timeProvider = null) => ExpiresAt < (timeProvider?.GetUtcNow() ?? DateTimeOffset.UtcNow); /// - /// The issuing authority of the token + /// The issuing authority of the token. /// public string Issuer => _jwtSecurityToken.Issuer; /// - /// The scope(s) associated with the token + /// The scope(s) associated with the token. /// public string? Scope => _jwtSecurityToken.Payload.TryGetValue("scope", out var scope) ? scope.ToString() : null; @@ -46,7 +46,7 @@ private JwtToken(string jwtToken, JwtSecurityToken jwtSecurityToken) } /// - /// Parses an access token + /// Parses an access token. /// /// The value to parse /// The access token is not valid @@ -58,11 +58,11 @@ public static JwtToken Parse(string value) } /// - /// Attempt to parse an access token + /// Attempt to parse an access token. /// /// The value to parse /// The resulting instance - /// `true` on successful parse, `false` otherwise + /// true on successful parse, false otherwise public static bool TryParse(string value, out JwtToken jwtToken) { jwtToken = default; @@ -91,43 +91,37 @@ private static string MaskJwtSignature(string accessToken) return accessTokenMatch.Success ? $"{accessTokenMatch.Groups[1]}" : ""; } - /// - /// Determines whether the specified object is equal to the current object - /// + /// public bool Equals(JwtToken other) => Value == other.Value; - /// - /// Determines whether the specified object is equal to the current object - /// + /// public override bool Equals(object? obj) => obj is JwtToken other && Equals(other); - /// - /// Returns the hash code for the access token value - /// + /// public override int GetHashCode() => Value.GetHashCode(); /// - /// Returns a string representation of the access token with a masked signature component + /// Returns a string representation of the access token with a masked signature component. /// public override string ToString() => MaskJwtSignature(Value); /// - /// Returns a string representation of the access token with an intact signature component + /// Returns a string representation of the access token with an intact signature component. /// public string ToStringUnmasked() => Value; /// - /// Determines whether two specified instances of are equal + /// Determines whether two specified instances of are equal. /// public static bool operator ==(JwtToken left, JwtToken right) => left.Equals(right); /// - /// Determines whether two specified instances of are not equal + /// Determines whether two specified instances of are not equal. /// public static bool operator !=(JwtToken left, JwtToken right) => !left.Equals(right); /// - /// Implicit conversion from to string + /// Implicit conversion from to string. /// /// The access token instance public static implicit operator string(JwtToken accessToken) diff --git a/src/Altinn.App.Core/Models/JwtTokenJsonConverter.cs b/src/Altinn.App.Core/Models/JwtTokenJsonConverter.cs index 01af8b792..4bc67e503 100644 --- a/src/Altinn.App.Core/Models/JwtTokenJsonConverter.cs +++ b/src/Altinn.App.Core/Models/JwtTokenJsonConverter.cs @@ -4,7 +4,7 @@ namespace Altinn.App.Core.Models; /// -/// Json converter to transform between and +/// Json converter to transform between and . /// internal class JwtTokenJsonConverter : JsonConverter { diff --git a/src/Altinn.App.Core/Models/LanguageCode.cs b/src/Altinn.App.Core/Models/LanguageCode.cs index 1038b6b3c..d8f6843b1 100644 --- a/src/Altinn.App.Core/Models/LanguageCode.cs +++ b/src/Altinn.App.Core/Models/LanguageCode.cs @@ -5,7 +5,7 @@ namespace Altinn.App.Core.Models; #pragma warning disable CA1000 /// -/// Specification details for language code ISO 639-1 +/// Specification details for language code ISO 639-1. /// public readonly partial struct Iso6391 : ILanguageCodeStandard { @@ -28,32 +28,32 @@ public static LanguageCodeValidationResult Validate(string code) } /// -/// Specifications for language code standards +/// Specifications for language code standards. /// public interface ILanguageCodeStandard { /// - /// Validation instructions for the language code implementation + /// Validation instructions for the language code implementation. /// /// The code to validate, e.g. "no" in the case of ISO 639-1 static abstract LanguageCodeValidationResult Validate(string code); }; /// -/// The result of a language code validation +/// The result of a language code validation. /// /// Is the code valid? /// If not valid, what is the reason given? public sealed record LanguageCodeValidationResult(bool IsValid, string? ErrorMessage); /// -/// Represents a language code +/// Represents a language code. /// public readonly struct LanguageCode : IEquatable> where TLangCodeStandard : struct, ILanguageCodeStandard { /// - /// The language code value + /// The language code value. /// public string Value { get; } @@ -63,7 +63,7 @@ private LanguageCode(string code) } /// - /// Parses a language code + /// Parses a language code. /// /// The language code /// The language code format is invalid @@ -77,7 +77,7 @@ public static LanguageCode Parse(string code) } /// - /// Attempts to parse a language code + /// Attempts to parse a language code. /// /// The code to parse /// The resulting @@ -94,40 +94,34 @@ public static LanguageCodeValidationResult TryParse(string code, out LanguageCod return new LanguageCodeValidationResult(true, null); } - /// - /// Determines whether the specified object is equal to the current object - /// + /// public bool Equals(LanguageCode other) => Value == other.Value; - /// - /// Determines whether the specified object is equal to the current object - /// + /// public override bool Equals(object? obj) => obj is LanguageCode other && Equals(other); - /// - /// Returns the hash code for the language code value - /// + /// public override int GetHashCode() => Value.GetHashCode(); /// - /// Returns a string representation of the language code + /// Returns a string representation of the language code. /// public override string ToString() => Value; /// - /// Determines whether two specified instances of are equal + /// Determines whether two specified instances of are equal. /// public static bool operator ==(LanguageCode left, LanguageCode right) => left.Equals(right); /// - /// Determines whether two specified instances of are not equal + /// Determines whether two specified instances of are not equal. /// public static bool operator !=(LanguageCode left, LanguageCode right) => !left.Equals(right); /// - /// Implicit conversion from to string + /// Implicit conversion from to string. /// /// The language code instance public static implicit operator string(LanguageCode languageCode) diff --git a/src/Altinn.App.Core/Models/LanguageCodeJsonConverter.cs b/src/Altinn.App.Core/Models/LanguageCodeJsonConverter.cs index d64053afd..f11581edf 100644 --- a/src/Altinn.App.Core/Models/LanguageCodeJsonConverter.cs +++ b/src/Altinn.App.Core/Models/LanguageCodeJsonConverter.cs @@ -4,7 +4,7 @@ namespace Altinn.App.Core.Models; /// -/// Json converter to transform between and +/// Json converter to transform between and . /// internal class LanguageCodeJsonConverter : JsonConverter> where T : struct, ILanguageCodeStandard diff --git a/src/Altinn.App.Core/Models/NationalIdentityNumber.cs b/src/Altinn.App.Core/Models/NationalIdentityNumber.cs index 79e2775c3..fcbd303e7 100644 --- a/src/Altinn.App.Core/Models/NationalIdentityNumber.cs +++ b/src/Altinn.App.Core/Models/NationalIdentityNumber.cs @@ -3,15 +3,13 @@ namespace Altinn.App.Core.Models; /// -/// Represents a Norwegian national identity number -/// -/// The validation in this type is hard coded to the Norwegian national identity number format -/// +///

Represents a Norwegian national identity number.

+///

Note: The validation in this type is hard coded to the Norwegian national identity number format.

///
public readonly struct NationalIdentityNumber : IEquatable { /// - /// The national identity number value + /// The national identity number value. /// public string Value { get; } @@ -21,7 +19,7 @@ private NationalIdentityNumber(string nationalIdentityNumber) } /// - /// Parses a national identity number + /// Parses a national identity number. /// /// The value to parse /// The number is not valid @@ -33,11 +31,11 @@ public static NationalIdentityNumber Parse(string value) } /// - /// Attempt to parse a national identity number + /// Attempt to parse a national identity number. /// /// The value to parse /// The resulting instance - /// `true` on successful parse, `false` otherwise + /// true on successful parse, false otherwise public static bool TryParse(string value, out NationalIdentityNumber nationalIdentityNumber) { nationalIdentityNumber = default; @@ -99,38 +97,32 @@ private static int Mod11(int value) return 11 - (value % 11); } - /// - /// Determines whether the specified object is equal to the current object - /// + /// public bool Equals(NationalIdentityNumber other) => Value == other.Value; - /// - /// Determines whether the specified object is equal to the current object - /// + /// public override bool Equals(object? obj) => obj is NationalIdentityNumber other && Equals(other); - /// - /// Returns the hash code for the national identity number value - /// + /// public override int GetHashCode() => Value.GetHashCode(); /// - /// Returns a string representation of the national identity number + /// Returns a string representation of the national identity number. /// public override string ToString() => Value; /// - /// Determines whether two specified instances of are equal + /// Determines whether two specified instances of are equal. /// public static bool operator ==(NationalIdentityNumber left, NationalIdentityNumber right) => left.Equals(right); /// - /// Determines whether two specified instances of are not equal + /// Determines whether two specified instances of are not equal. /// public static bool operator !=(NationalIdentityNumber left, NationalIdentityNumber right) => !left.Equals(right); /// - /// Implicit conversion from to string + /// Implicit conversion from to string. /// /// The national identity number instance public static implicit operator string(NationalIdentityNumber nationalIdentityNumber) diff --git a/src/Altinn.App.Core/Models/NationalIdentityNumberJsonConverter.cs b/src/Altinn.App.Core/Models/NationalIdentityNumberJsonConverter.cs index f3d1261c7..5edd75781 100644 --- a/src/Altinn.App.Core/Models/NationalIdentityNumberJsonConverter.cs +++ b/src/Altinn.App.Core/Models/NationalIdentityNumberJsonConverter.cs @@ -4,7 +4,7 @@ namespace Altinn.App.Core.Models; /// -/// Json converter to transform between and +/// Json converter to transform between and . /// internal class NationalIdentityNumberJsonConverter : JsonConverter { diff --git a/src/Altinn.App.Core/Models/OrganisationNumber.cs b/src/Altinn.App.Core/Models/OrganisationNumber.cs index 1d040c1b2..eff31976b 100644 --- a/src/Altinn.App.Core/Models/OrganisationNumber.cs +++ b/src/Altinn.App.Core/Models/OrganisationNumber.cs @@ -3,7 +3,7 @@ namespace Altinn.App.Core.Models; /// -/// Represents the format of an organisation number +/// Represents the format of an organisation number. /// public enum OrganisationNumberFormat { @@ -19,10 +19,8 @@ public enum OrganisationNumberFormat } /// -/// Represents a Norwegian organisation number -/// -/// The validation in this type is hard coded to the Norwegian organisation number format -/// +///

Represents a Norwegian organisation number.

+///

Note: The validation in this type is hard coded to the Norwegian organisation number format.

///
public readonly struct OrganisationNumber : IEquatable { @@ -30,7 +28,7 @@ public enum OrganisationNumberFormat private readonly string _international; /// - /// Gets the organisation number as a string in the specified format + /// Gets the organisation number as a string in the specified format. /// /// The format to get /// Invalid format provided @@ -49,7 +47,7 @@ private OrganisationNumber(string local, string international) } /// - /// Parses an organisation number + /// Parses an organisation number. /// /// The value to parse /// The organisation number is not valid @@ -61,11 +59,11 @@ public static OrganisationNumber Parse(string value) } /// - /// Attempt to parse an organisation number + /// Attempt to parse an organisation number. /// /// The value to parse /// The resulting instance - /// `true` on successful parse, `false` otherwise + /// true on successful parse, false otherwise public static bool TryParse(string value, out OrganisationNumber organisationNumber) { organisationNumber = default; @@ -115,33 +113,27 @@ public static bool TryParse(string value, out OrganisationNumber organisationNum return true; } - /// - /// Determines whether the specified object is equal to the current object - /// + /// public bool Equals(OrganisationNumber other) => _local == other._local; - /// - /// Determines whether the specified object is equal to the current object - /// + /// public override bool Equals(object? obj) => obj is OrganisationNumber other && Equals(other); - /// - /// Returns the hash code for the value - /// + /// public override int GetHashCode() => _local.GetHashCode(); /// - /// Returns a string representation of the organisation number + /// Returns a string representation of the organisation number. /// public override string ToString() => _local; /// - /// Determines whether two specified instances of are equal + /// Determines whether two specified instances of are equal. /// public static bool operator ==(OrganisationNumber left, OrganisationNumber right) => left.Equals(right); /// - /// Determines whether two specified instances of are not equal + /// Determines whether two specified instances of are not equal. /// public static bool operator !=(OrganisationNumber left, OrganisationNumber right) => !left.Equals(right); } diff --git a/src/Altinn.App.Core/Models/OrganisationNumberJsonConverter.cs b/src/Altinn.App.Core/Models/OrganisationNumberJsonConverter.cs index c748d332f..60a0aea10 100644 --- a/src/Altinn.App.Core/Models/OrganisationNumberJsonConverter.cs +++ b/src/Altinn.App.Core/Models/OrganisationNumberJsonConverter.cs @@ -4,7 +4,7 @@ namespace Altinn.App.Core.Models; /// -/// Json converter to transform between and +/// Json converter to transform between and . /// [AttributeUsage(AttributeTargets.Property | AttributeTargets.Class, AllowMultiple = false)] internal class OrganisationNumberJsonConverterAttribute : JsonConverterAttribute