From d33461f9be7adc7581f8ad7189f8965c68094733 Mon Sep 17 00:00:00 2001 From: Amund Myrbostad Date: Thu, 7 Nov 2024 10:45:07 +0100 Subject: [PATCH 01/62] Squash --- .github/workflows/ci-cd-pull-request.yml | 182 +- .github/workflows/dispatch-apps-deploy.yml | 14 + .refitter | 14 + Digdir.Domain.Dialogporten.sln | 24 + ...ry.Dialogporten.WebApiClient.Sample.csproj | 19 + .../Program.cs | 229 + .../appsettings.json | 20 + .../CHANGELOG.md | 1 + .../Config/DialogportenSettings.cs | 19 + .../Config/MaskinportenSettings.cs | 5 + ...r.Library.Dialogporten.WebApiClient.csproj | 32 + .../Extensions/ServiceCollectionExtensions.cs | 83 + .../Features/V1/DialogportenClient.cs | 30 + .../Features/V1/RefitterInterface.verified.cs | 5818 +++++++++++++++++ .../Interfaces/IDialogportenClient.cs | 48 + .../Interfaces/IDialogportenSettings.cs | 29 + .../Interfaces/IIdentifiable.cs | 7 + .../README.md | 196 + .../Services/Base64Url.cs | 45 + .../Services/DialogTokenVerifier.cs | 68 + .../.refitter | 14 + ...rten.WebApiClient.Integration.Tests.csproj | 31 + .../RefitterInterfaceTests.cs | 66 + .../refitter/RefitterInterface.cs | 5818 +++++++++++++++++ 24 files changed, 12721 insertions(+), 91 deletions(-) create mode 100644 .github/workflows/dispatch-apps-deploy.yml create mode 100644 .refitter create mode 100644 src/Digdir.Library.Dialogporten.WebApiClient.Sample/Digdir.Library.Dialogporten.WebApiClient.Sample.csproj create mode 100644 src/Digdir.Library.Dialogporten.WebApiClient.Sample/Program.cs create mode 100644 src/Digdir.Library.Dialogporten.WebApiClient.Sample/appsettings.json create mode 100644 src/Digdir.Library.Dialogporten.WebApiClient/CHANGELOG.md create mode 100644 src/Digdir.Library.Dialogporten.WebApiClient/Config/DialogportenSettings.cs create mode 100644 src/Digdir.Library.Dialogporten.WebApiClient/Config/MaskinportenSettings.cs create mode 100644 src/Digdir.Library.Dialogporten.WebApiClient/Digdir.Library.Dialogporten.WebApiClient.csproj create mode 100644 src/Digdir.Library.Dialogporten.WebApiClient/Extensions/ServiceCollectionExtensions.cs create mode 100644 src/Digdir.Library.Dialogporten.WebApiClient/Features/V1/DialogportenClient.cs create mode 100644 src/Digdir.Library.Dialogporten.WebApiClient/Features/V1/RefitterInterface.verified.cs create mode 100644 src/Digdir.Library.Dialogporten.WebApiClient/Interfaces/IDialogportenClient.cs create mode 100644 src/Digdir.Library.Dialogporten.WebApiClient/Interfaces/IDialogportenSettings.cs create mode 100644 src/Digdir.Library.Dialogporten.WebApiClient/Interfaces/IIdentifiable.cs create mode 100644 src/Digdir.Library.Dialogporten.WebApiClient/README.md create mode 100644 src/Digdir.Library.Dialogporten.WebApiClient/Services/Base64Url.cs create mode 100644 src/Digdir.Library.Dialogporten.WebApiClient/Services/DialogTokenVerifier.cs create mode 100644 tests/Digdir.Library.Dialogporten.WebApiClient.Integration.Tests/.refitter create mode 100644 tests/Digdir.Library.Dialogporten.WebApiClient.Integration.Tests/Digdir.Library.Dialogporten.WebApiClient.Integration.Tests.csproj create mode 100644 tests/Digdir.Library.Dialogporten.WebApiClient.Integration.Tests/RefitterInterfaceTests.cs create mode 100644 tests/Digdir.Library.Dialogporten.WebApiClient.Integration.Tests/refitter/RefitterInterface.cs diff --git a/.github/workflows/ci-cd-pull-request.yml b/.github/workflows/ci-cd-pull-request.yml index 67d057123..4bafe4b18 100644 --- a/.github/workflows/ci-cd-pull-request.yml +++ b/.github/workflows/ci-cd-pull-request.yml @@ -6,94 +6,94 @@ on: paths-ignore: - "tests/k6/**" - "CHANGELOG.md" - -jobs: - generate-git-short-sha: - name: Generate git short sha - uses: ./.github/workflows/workflow-generate-git-short-sha.yml - - get-current-version: - name: Get current version - uses: ./.github/workflows/workflow-get-current-version.yml - - check-for-changes: - name: Check for changes - uses: ./.github/workflows/workflow-check-for-changes.yml - - build: - uses: ./.github/workflows/workflow-build-and-test.yml - needs: [check-for-changes] - if: ${{ needs.check-for-changes.outputs.hasBackendChanges == 'true' || needs.check-for-changes.outputs.hasTestChanges == 'true' }} - - build-infrastructure: - uses: ./.github/workflows/workflow-build-infrastructure.yml - needs: [check-for-changes] - if: ${{ always() && needs.check-for-changes.outputs.hasInfraChanges == 'true' }} - secrets: - AZURE_CLIENT_ID: ${{ secrets.AZURE_CLIENT_ID }} - AZURE_TENANT_ID: ${{ secrets.AZURE_TENANT_ID }} - AZURE_SUBSCRIPTION_ID: ${{ secrets.AZURE_SUBSCRIPTION_ID }} - with: - environment: "test" - - dry-run-deploy-infra: - name: Dry run deploy infrastructure - uses: ./.github/workflows/workflow-deploy-infra.yml - needs: - [ - generate-git-short-sha, - check-for-changes, - get-current-version, - build-infrastructure, - ] - if: ${{ always() && needs.check-for-changes.outputs.hasInfraChanges == 'true' }} - secrets: - AZURE_CLIENT_ID: ${{ secrets.AZURE_CLIENT_ID }} - AZURE_TENANT_ID: ${{ secrets.AZURE_TENANT_ID }} - AZURE_SUBSCRIPTION_ID: ${{ secrets.AZURE_SUBSCRIPTION_ID }} - AZURE_SOURCE_KEY_VAULT_NAME: ${{ secrets.AZURE_SOURCE_KEY_VAULT_NAME }} - AZURE_SOURCE_KEY_VAULT_SUBSCRIPTION_ID: ${{ secrets.AZURE_SOURCE_KEY_VAULT_SUBSCRIPTION_ID }} - AZURE_SOURCE_KEY_VAULT_RESOURCE_GROUP: ${{ secrets.AZURE_SOURCE_KEY_VAULT_RESOURCE_GROUP }} - AZURE_SOURCE_KEY_VAULT_SSH_JUMPER_SSH_PUBLIC_KEY: ${{ secrets.AZURE_SOURCE_KEY_VAULT_SSH_JUMPER_SSH_PUBLIC_KEY }} - with: - environment: test - region: norwayeast - dryRun: true - version: ${{ needs.get-current-version.outputs.version }}-${{ needs.generate-git-short-sha.outputs.gitShortSha }} - - dry-run-deploy-apps: - name: Dry run deploy apps - needs: - [ - get-current-version, - check-for-changes, - generate-git-short-sha, - dry-run-deploy-infra, - ] - # we want deployment of apps to be dependent on deployment of infrastructure, but if infrastructure is skipped, we still want to deploy the apps - if: ${{ always() && !failure() && !cancelled() && (needs.check-for-changes.outputs.hasBackendChanges == 'true' || needs.check-for-changes.outputs.hasMigrationChanges == 'true') }} - uses: ./.github/workflows/workflow-deploy-apps.yml - secrets: - AZURE_CLIENT_ID: ${{ secrets.AZURE_CLIENT_ID }} - AZURE_TENANT_ID: ${{ secrets.AZURE_TENANT_ID }} - AZURE_SUBSCRIPTION_ID: ${{ secrets.AZURE_SUBSCRIPTION_ID }} - AZURE_RESOURCE_GROUP_NAME: ${{ secrets.AZURE_RESOURCE_GROUP_NAME }} - AZURE_ENVIRONMENT_KEY_VAULT_NAME: ${{ secrets.AZURE_ENVIRONMENT_KEY_VAULT_NAME }} - AZURE_CONTAINER_APP_ENVIRONMENT_NAME: ${{ secrets.AZURE_CONTAINER_APP_ENVIRONMENT_NAME }} - AZURE_APP_INSIGHTS_CONNECTION_STRING: ${{ secrets.AZURE_APP_INSIGHTS_CONNECTION_STRING }} - AZURE_APP_CONFIGURATION_NAME: ${{ secrets.AZURE_APP_CONFIGURATION_NAME }} - AZURE_SERVICE_BUS_NAMESPACE_NAME: ${{ secrets.AZURE_SERVICE_BUS_NAMESPACE_NAME }} - with: - environment: test - region: norwayeast - version: ${{ needs.get-current-version.outputs.version }}-${{ needs.generate-git-short-sha.outputs.gitShortSha }} - runMigration: ${{ needs.check-for-changes.outputs.hasMigrationChanges == 'true' }} - dryRun: true - - delete-github-deployments: - name: Delete GitHub deployments - uses: ./.github/workflows/workflow-delete-deployments.yml - needs: [dry-run-deploy-apps, dry-run-deploy-infra] - if: ${{ always() && !failure() && !cancelled() }} - with: - gitSha: ${{ github.event.pull_request.head.sha }} \ No newline at end of file +# +#jobs: +# generate-git-short-sha: +# name: Generate git short sha +# uses: ./.github/workflows/workflow-generate-git-short-sha.yml +# +# get-current-version: +# name: Get current version +# uses: ./.github/workflows/workflow-get-current-version.yml +# +# check-for-changes: +# name: Check for changes +# uses: ./.github/workflows/workflow-check-for-changes.yml +# +# build: +# uses: ./.github/workflows/workflow-build-and-test.yml +# needs: [check-for-changes] +# if: ${{ needs.check-for-changes.outputs.hasBackendChanges == 'true' || needs.check-for-changes.outputs.hasTestChanges == 'true' }} +# +# build-infrastructure: +# uses: ./.github/workflows/workflow-build-infrastructure.yml +# needs: [check-for-changes] +# if: ${{ always() && needs.check-for-changes.outputs.hasInfraChanges == 'true' }} +# secrets: +# AZURE_CLIENT_ID: ${{ secrets.AZURE_CLIENT_ID }} +# AZURE_TENANT_ID: ${{ secrets.AZURE_TENANT_ID }} +# AZURE_SUBSCRIPTION_ID: ${{ secrets.AZURE_SUBSCRIPTION_ID }} +# with: +# environment: "test" +# +# dry-run-deploy-infra: +# name: Dry run deploy infrastructure +# uses: ./.github/workflows/workflow-deploy-infra.yml +# needs: +# [ +# generate-git-short-sha, +# check-for-changes, +# get-current-version, +# build-infrastructure, +# ] +# if: ${{ always() && needs.check-for-changes.outputs.hasInfraChanges == 'true' }} +# secrets: +# AZURE_CLIENT_ID: ${{ secrets.AZURE_CLIENT_ID }} +# AZURE_TENANT_ID: ${{ secrets.AZURE_TENANT_ID }} +# AZURE_SUBSCRIPTION_ID: ${{ secrets.AZURE_SUBSCRIPTION_ID }} +# AZURE_SOURCE_KEY_VAULT_NAME: ${{ secrets.AZURE_SOURCE_KEY_VAULT_NAME }} +# AZURE_SOURCE_KEY_VAULT_SUBSCRIPTION_ID: ${{ secrets.AZURE_SOURCE_KEY_VAULT_SUBSCRIPTION_ID }} +# AZURE_SOURCE_KEY_VAULT_RESOURCE_GROUP: ${{ secrets.AZURE_SOURCE_KEY_VAULT_RESOURCE_GROUP }} +# AZURE_SOURCE_KEY_VAULT_SSH_JUMPER_SSH_PUBLIC_KEY: ${{ secrets.AZURE_SOURCE_KEY_VAULT_SSH_JUMPER_SSH_PUBLIC_KEY }} +# with: +# environment: test +# region: norwayeast +# dryRun: true +# version: ${{ needs.get-current-version.outputs.version }}-${{ needs.generate-git-short-sha.outputs.gitShortSha }} +# +# dry-run-deploy-apps: +# name: Dry run deploy apps +# needs: +# [ +# get-current-version, +# check-for-changes, +# generate-git-short-sha, +# dry-run-deploy-infra, +# ] +# # we want deployment of apps to be dependent on deployment of infrastructure, but if infrastructure is skipped, we still want to deploy the apps +# if: ${{ always() && !failure() && !cancelled() && (needs.check-for-changes.outputs.hasBackendChanges == 'true' || needs.check-for-changes.outputs.hasMigrationChanges == 'true') }} +# uses: ./.github/workflows/workflow-deploy-apps.yml +# secrets: +# AZURE_CLIENT_ID: ${{ secrets.AZURE_CLIENT_ID }} +# AZURE_TENANT_ID: ${{ secrets.AZURE_TENANT_ID }} +# AZURE_SUBSCRIPTION_ID: ${{ secrets.AZURE_SUBSCRIPTION_ID }} +# AZURE_RESOURCE_GROUP_NAME: ${{ secrets.AZURE_RESOURCE_GROUP_NAME }} +# AZURE_ENVIRONMENT_KEY_VAULT_NAME: ${{ secrets.AZURE_ENVIRONMENT_KEY_VAULT_NAME }} +# AZURE_CONTAINER_APP_ENVIRONMENT_NAME: ${{ secrets.AZURE_CONTAINER_APP_ENVIRONMENT_NAME }} +# AZURE_APP_INSIGHTS_CONNECTION_STRING: ${{ secrets.AZURE_APP_INSIGHTS_CONNECTION_STRING }} +# AZURE_APP_CONFIGURATION_NAME: ${{ secrets.AZURE_APP_CONFIGURATION_NAME }} +# AZURE_SERVICE_BUS_NAMESPACE_NAME: ${{ secrets.AZURE_SERVICE_BUS_NAMESPACE_NAME }} +# with: +# environment: test +# region: norwayeast +# version: ${{ needs.get-current-version.outputs.version }}-${{ needs.generate-git-short-sha.outputs.gitShortSha }} +# runMigration: ${{ needs.check-for-changes.outputs.hasMigrationChanges == 'true' }} +# dryRun: true +# +# delete-github-deployments: +# name: Delete GitHub deployments +# uses: ./.github/workflows/workflow-delete-deployments.yml +# needs: [dry-run-deploy-apps, dry-run-deploy-infra] +# if: ${{ always() && !failure() && !cancelled() }} +# with: +# gitSha: ${{ github.event.pull_request.head.sha }} diff --git a/.github/workflows/dispatch-apps-deploy.yml b/.github/workflows/dispatch-apps-deploy.yml new file mode 100644 index 000000000..534238e2f --- /dev/null +++ b/.github/workflows/dispatch-apps-deploy.yml @@ -0,0 +1,14 @@ +on: + workflow_dispatch: +jobs: + package-project: + runs-on: ubuntu-latest + timeout-minutes: 15 + steps: + - name: Checkout + uses: actions/checkout@v4 + - name: set PROJECT variable to point to project + run: | + PROJECT=$(find . -name '*Digdir.Library.Dialogporten.WebApiClient.csproj' -printf "%p" -quit) + echo "PROJECT ${PROJECT}" + echo "PROJECT=${PROJECT}" >> $GITHUB_ENV diff --git a/.refitter b/.refitter new file mode 100644 index 000000000..62ef65a3d --- /dev/null +++ b/.refitter @@ -0,0 +1,14 @@ +{ + "openApiPath": "docs/schema/V1/swagger.verified.json", + "namespace": "Digdir.Library.Dialogporten.WebApiClient.Features.V1", + "outputFolder": "src/Digdir.Library.Dialogporten.WebApiClient/Features/V1/", + "operationNameGenerator": "SingleClientFromOperationId", + "multipleInterfaces": "ByTag", + "includeTags": [ + + ], + "useCancellationTokens": true, + "returnIApiResponse": true, + "useDynamicQuerystringParameters": true, + "outputFilename": "RefitterInterface.cs" +} diff --git a/Digdir.Domain.Dialogporten.sln b/Digdir.Domain.Dialogporten.sln index 04d95ab2f..ac06dab11 100644 --- a/Digdir.Domain.Dialogporten.sln +++ b/Digdir.Domain.Dialogporten.sln @@ -67,6 +67,14 @@ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Digdir.Library.Utils.AspNet EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Digdir.Tool.Dialogporten.SlackNotifier.Tests", "tests\Digdir.Tool.Dialogporten.SlackNotifier.Tests\Digdir.Tool.Dialogporten.SlackNotifier.Tests.csproj", "{F7DF2792-9C83-49F7-B7DD-556E8EC577DB}" EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "WebApiClient", "WebApiClient", "{9B809C3A-B169-4599-A2D3-A25E87C510FC}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Digdir.Library.Dialogporten.WebApiClient", "src\Digdir.Library.Dialogporten.WebApiClient\Digdir.Library.Dialogporten.WebApiClient.csproj", "{714FBB11-ADC0-44E8-A768-D1A59D641D31}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Digdir.Library.Dialogporten.WebApiClient.Sample", "src\Digdir.Library.Dialogporten.WebApiClient.Sample\Digdir.Library.Dialogporten.WebApiClient.Sample.csproj", "{F8CB7159-4346-4436-9C35-BFCFDDE5DC2B}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Digdir.Library.Dialogporten.WebApiClient.Integration.Tests", "tests\Digdir.Library.Dialogporten.WebApiClient.Integration.Tests\Digdir.Library.Dialogporten.WebApiClient.Integration.Tests.csproj", "{7014AC47-0DF5-48C1-BD72-EE587FF3278B}" +EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution Debug|Any CPU = Debug|Any CPU @@ -165,6 +173,18 @@ Global {F7DF2792-9C83-49F7-B7DD-556E8EC577DB}.Debug|Any CPU.Build.0 = Debug|Any CPU {F7DF2792-9C83-49F7-B7DD-556E8EC577DB}.Release|Any CPU.ActiveCfg = Release|Any CPU {F7DF2792-9C83-49F7-B7DD-556E8EC577DB}.Release|Any CPU.Build.0 = Release|Any CPU + {714FBB11-ADC0-44E8-A768-D1A59D641D31}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {714FBB11-ADC0-44E8-A768-D1A59D641D31}.Debug|Any CPU.Build.0 = Debug|Any CPU + {714FBB11-ADC0-44E8-A768-D1A59D641D31}.Release|Any CPU.ActiveCfg = Release|Any CPU + {714FBB11-ADC0-44E8-A768-D1A59D641D31}.Release|Any CPU.Build.0 = Release|Any CPU + {F8CB7159-4346-4436-9C35-BFCFDDE5DC2B}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {F8CB7159-4346-4436-9C35-BFCFDDE5DC2B}.Debug|Any CPU.Build.0 = Debug|Any CPU + {F8CB7159-4346-4436-9C35-BFCFDDE5DC2B}.Release|Any CPU.ActiveCfg = Release|Any CPU + {F8CB7159-4346-4436-9C35-BFCFDDE5DC2B}.Release|Any CPU.Build.0 = Release|Any CPU + {7014AC47-0DF5-48C1-BD72-EE587FF3278B}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {7014AC47-0DF5-48C1-BD72-EE587FF3278B}.Debug|Any CPU.Build.0 = Debug|Any CPU + {7014AC47-0DF5-48C1-BD72-EE587FF3278B}.Release|Any CPU.ActiveCfg = Release|Any CPU + {7014AC47-0DF5-48C1-BD72-EE587FF3278B}.Release|Any CPU.Build.0 = Release|Any CPU EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE @@ -196,6 +216,10 @@ Global {E389C7C8-9610-40AC-86DC-769B1B7DC78E} = {CADB8189-4AA1-4732-844A-C41DBF3EC8B7} {6A485C65-3613-4A49-A16F-2789119F6F38} = {096E9B69-6783-4446-A895-0B6D7729A0D9} {F7DF2792-9C83-49F7-B7DD-556E8EC577DB} = {CADB8189-4AA1-4732-844A-C41DBF3EC8B7} + {9B809C3A-B169-4599-A2D3-A25E87C510FC} = {096E9B69-6783-4446-A895-0B6D7729A0D9} + {714FBB11-ADC0-44E8-A768-D1A59D641D31} = {9B809C3A-B169-4599-A2D3-A25E87C510FC} + {F8CB7159-4346-4436-9C35-BFCFDDE5DC2B} = {9B809C3A-B169-4599-A2D3-A25E87C510FC} + {7014AC47-0DF5-48C1-BD72-EE587FF3278B} = {CADB8189-4AA1-4732-844A-C41DBF3EC8B7} EndGlobalSection GlobalSection(ExtensibilityGlobals) = postSolution SolutionGuid = {B2FE67FF-7622-4AFB-AD8E-961B6A39D888} diff --git a/src/Digdir.Library.Dialogporten.WebApiClient.Sample/Digdir.Library.Dialogporten.WebApiClient.Sample.csproj b/src/Digdir.Library.Dialogporten.WebApiClient.Sample/Digdir.Library.Dialogporten.WebApiClient.Sample.csproj new file mode 100644 index 000000000..df2de14ef --- /dev/null +++ b/src/Digdir.Library.Dialogporten.WebApiClient.Sample/Digdir.Library.Dialogporten.WebApiClient.Sample.csproj @@ -0,0 +1,19 @@ + + + + Exe + enable + enable + + + + + + + + + PreserveNewest + + + + diff --git a/src/Digdir.Library.Dialogporten.WebApiClient.Sample/Program.cs b/src/Digdir.Library.Dialogporten.WebApiClient.Sample/Program.cs new file mode 100644 index 000000000..5355b4bbf --- /dev/null +++ b/src/Digdir.Library.Dialogporten.WebApiClient.Sample/Program.cs @@ -0,0 +1,229 @@ +using System.Diagnostics; +using Digdir.Library.Dialogporten.WebApiClient.Extensions; +using Digdir.Library.Dialogporten.WebApiClient.Features.V1; +using Digdir.Library.Dialogporten.WebApiClient.Services; +using Microsoft.Extensions.Configuration; +using Microsoft.Extensions.DependencyInjection; +var configuration = new ConfigurationBuilder() + .AddJsonFile("appsettings.json", optional: false, reloadOnChange: true) + .Build(); + +var services = new ServiceCollection(); + +services.AddSingleton(configuration); + +services.AddDialogportenClient(); +services.AddDialogTokenVerifer(); + +var serviceProvider = services.BuildServiceProvider(); + +var dialogportenClient = serviceProvider.GetRequiredService(); +var verifier = serviceProvider.GetRequiredService(); +var token = + "eyJhbGciOiJFZERTQSIsInR5cCI6IkpXVCIsImtpZCI6ImRldi1wcmltYXJ5LXNpZ25pbmcta2V5In0.eyJqdGkiOiIzNGZhMGViNS0xZGVmLTQxMDYtYWY4YS0xMjljYjNiNTliNDYiLCJjIjoidXJuOmFsdGlubjpwZXJzb246aWRlbnRpZmllci1ubzowODg5NTY5OTY4NCIsImwiOjMsInAiOiJ1cm46YWx0aW5uOnBlcnNvbjppZGVudGlmaWVyLW5vOjA4ODk1Njk5Njg0IiwicyI6InVybjphbHRpbm46cmVzb3VyY2U6c3VwZXItc2ltcGxlLXNlcnZpY2UiLCJpIjoiMDE5MzI1MzgtMzEzZC03NGI1LTg1ZWMtMWI5MGIxMjYzNWRjIiwiYSI6InJlYWQiLCJpc3MiOiJodHRwczovL2xvY2FsaG9zdDo3MjE0L2FwaS92MSIsImlhdCI6MTczMTU3ODk5OCwibmJmIjoxNzMxNTc4OTk4LCJleHAiOjE3MzE1Nzk1OTh9.fL-rpDsXqwOSVk5zMizLZRaFugaz2VfVNf0CjOxIhSdwrkAhh1UfRu5RcD2OK4ddnRrCuz8iKKJyadkek9UGAg"; +Console.WriteLine(verifier.Verify(token)); +var dict = DialogTokenVerifier.GetDialogTokenClaims(token); +Console.WriteLine(dict); +Console.WriteLine(dict[DialogTokenClaimTypes.Actions]); +Console.WriteLine("== Start Create Dialog =="); +// Create dialog SO +var createDialogCommand = CreateCommand(); +var response = await dialogportenClient.V1ServiceOwnerDialogsCreateDialog(createDialogCommand); +if (response.IsSuccessStatusCode) +{ + Console.WriteLine(response.StatusCode); + Console.WriteLine(response.Content); +} +Console.WriteLine("== End Create Dialog =="); +// Get single dialog SO +Console.WriteLine("==Start Get Single Dialog=="); +Debug.Assert(response.Content != null, "response.Content != null"); +var guid = Guid.Parse(response.Content.Replace("\"", "").Trim()); +// var guid = Guid.Parse("0192b307-f5a5-7450-bee2-04a3515337ff"); +var dialog = dialogportenClient.V1ServiceOwnerDialogsGetGetDialog(guid, null!).Result.Content; +Debug.Assert(dialog != null, nameof(dialog) + " != null"); +Console.WriteLine(dialog.SystemLabel); +Console.WriteLine(dialog.Status); +Console.WriteLine(dialog.Org); +Console.WriteLine(dialog.Progress); +Console.WriteLine($"Deleted at: {dialog.DeletedAt}"); +Console.WriteLine("==End Get Single Dialog=="); + +Console.WriteLine("==Start Search Dialogs=="); +var param = new V1ServiceOwnerDialogsSearchSearchDialogQueryParams() +{ + SystemLabel = [DialogEndUserContextsEntities_SystemLabel.Default] +}; +var result = await dialogportenClient.V1ServiceOwnerDialogsSearchSearchDialog(param); +Console.WriteLine(result.Content!.Items.Count); +Console.WriteLine(result.Content.Items.First().Org); +Console.WriteLine("==End Search Dialogs=="); + +Console.WriteLine("== Start Patch Dialog =="); +List patchDocument = +[ + new() + { + Op = "replace", + OperationType = JsonPatchOperations_OperationType.Replace, + Path = "/progress", + Value = 50 + } +]; +var patchResponse = await dialogportenClient.V1ServiceOwnerDialogsPatchDialog(guid, patchDocument, null); +Console.WriteLine(patchResponse.IsSuccessStatusCode); +Console.WriteLine(patchResponse.StatusCode); +Console.WriteLine("== End Patch Dialog =="); + +Console.WriteLine("== Start Delete Dialog =="); +var deleteResponse = await dialogportenClient.V1ServiceOwnerDialogsDeleteDialog(guid, null); +Console.WriteLine(deleteResponse.IsSuccessStatusCode); +Console.WriteLine("== End Delete Dialog =="); + +Console.WriteLine("==Start Get Single Dialog=="); +// var guid = Guid.Parse("0192b307-f5a5-7450-bee2-04a3515337ff"); +dialog = dialogportenClient.V1ServiceOwnerDialogsGetGetDialog(guid, null!).Result.Content; +Debug.Assert(dialog != null, nameof(dialog) + " != null"); +Console.WriteLine(dialog.SystemLabel); +Console.WriteLine(dialog.Status); +Console.WriteLine(dialog.Org); +Console.WriteLine(dialog.Progress); +Console.WriteLine(dialog.DeletedAt); +Console.WriteLine("==End Get Single Dialog=="); + + +result = await dialogportenClient.V1ServiceOwnerDialogsSearchSearchDialog(param); +Debug.Assert(result != null, nameof(result) + " != null"); +Console.WriteLine(result.Content!.Items.Count); +Console.WriteLine("== Start Purge Dialog == "); +var purgeResponse = await dialogportenClient.V1ServiceOwnerDialogsPurgePurgeDialog(guid, dialog.Revision); +Console.WriteLine($"Purge response status code: {purgeResponse.StatusCode}"); +if (purgeResponse.IsSuccessStatusCode) +{ + var dialogAfterPurge = await dialogportenClient.V1ServiceOwnerDialogsGetGetDialog(guid, null!); + Console.WriteLine(dialogAfterPurge.StatusCode); +} +Console.WriteLine("== End Purge Dialog =="); +var updateCommand = UpdateCommand(); +await dialogportenClient.V1ServiceOwnerDialogsUpdateDialog(guid, updateCommand, null, CancellationToken.None); +return; + +static V1ServiceOwnerDialogsCommandsCreate_DialogCommand CreateCommand() +{ + var createDialogCommand = new V1ServiceOwnerDialogsCommandsCreate_DialogCommand + { + // createDialogCommand.Id = Guid.Parse("01927a6d-40d8-728b-b3da-845b680840d9"); + ServiceResource = "urn:altinn:resource:super-simple-service", + Party = "urn:altinn:person:identifier-no:14886498226", + SystemLabel = DialogEndUserContextsEntities_SystemLabel.Default, + Status = DialogsEntities_DialogStatus.New, + Progress = 2, + Content = new V1ServiceOwnerDialogsCommandsCreate_Content + { + Title = new V1CommonContent_ContentValue + { + Value = + [ + new V1CommonLocalizations_Localization + { + LanguageCode = "nb", + Value = "Hoved" + }, + new V1CommonLocalizations_Localization + { + LanguageCode = "en", + Value = "Main" + } + ], + MediaType = "text/plain" + }, + Summary = new V1CommonContent_ContentValue + { + Value = + [ + new V1CommonLocalizations_Localization + { + LanguageCode = "nb", + Value = "Hoved Summary" + }, + new V1CommonLocalizations_Localization + { + LanguageCode = "en", + Value = "Main Summary" + } + ], + MediaType = "text/plain" + } + + + }, + Transmissions = + [ + new V1ServiceOwnerDialogsCommandsCreate_Transmission + { + Attachments = + [ + new V1ServiceOwnerDialogsCommandsCreate_TransmissionAttachment + { + DisplayName = + [ + new V1CommonLocalizations_Localization + { + LanguageCode = "nb", + Value = "Hoved misson" + } + ], + Urls = + [ + new V1ServiceOwnerDialogsCommandsCreate_TransmissionAttachmentUrl + { + ConsumerType = Attachments_AttachmentUrlConsumerType.Gui, + Url = new Uri("https://digdir.apps.tt02.altinn.no/some-other-url") + } + ] + + } + ], + Content = new V1ServiceOwnerDialogsCommandsCreate_TransmissionContent + { + Summary = new V1CommonContent_ContentValue + { + MediaType = "text/plain", + Value = + [ + new V1CommonLocalizations_Localization + { + LanguageCode = "nb", + Value = "Tranmission summary" + } + ] + }, + Title = new V1CommonContent_ContentValue + { + MediaType = "text/plain", + Value = + [ + new V1CommonLocalizations_Localization + { + LanguageCode = "nb", + Value = "Tranmission Title" + } + ] + } + }, + Sender = new V1ServiceOwnerCommonActors_Actor + { + ActorType = Actors_ActorType.ServiceOwner + }, + Type = DialogsEntitiesTransmissions_DialogTransmissionType.Information + } + ] + }; + return createDialogCommand; +} + +static V1ServiceOwnerDialogsCommandsUpdate_Dialog UpdateCommand() +{ + V1ServiceOwnerDialogsCommandsUpdate_Dialog updateDialog = new(); + return updateDialog; +} diff --git a/src/Digdir.Library.Dialogporten.WebApiClient.Sample/appsettings.json b/src/Digdir.Library.Dialogporten.WebApiClient.Sample/appsettings.json new file mode 100644 index 000000000..b740a0b52 --- /dev/null +++ b/src/Digdir.Library.Dialogporten.WebApiClient.Sample/appsettings.json @@ -0,0 +1,20 @@ +{ + "DialogportenSettings": { + "Environment": "test", + "Maskinporten": { + "ClientId": "ce3b732a-d4f2-4997-8545-adf8df70fe6c", + "Scope": "digdir:dialogporten.serviceprovider digdir:dialogporten.serviceprovider.search", + "EncodedJwk": "eyJwIjoieTRBZEhlVVBxdFEtSFlOWkR5ci0zS09RT3NQajA5TFh2a2hIUFlTdGFYNThkMndIWUJiVXlDTWdMYWtGTHo4UExKNWtscURsanRoczFtM1dFVGJhSWVuY25TalpjZTh4S1Q2SHh3bTNyaDlydWZ1TWVOZDRqaFptTm9WZmJrcGNXcVh0UDFvb1NPTE5zYUNVUWFUUEVKTXlFd3VhdWxMSzgxRG1SSTlMSmVNIiwia3R5IjoiUlNBIiwicSI6InFmOEQ2Uy1Kd19BdVQ0Q2hjQTlDek9WNk1uTW9mc1VCdTkteHJBcVFDRjh4WWZZOTRxQ1ZjQ3llajlkTlN3eXZUZXg1dThIMzNSaU1LMEFWM2tTQlpJLVZqcXJHLUx6YzNfTUlTTVpSVDJfbzNVQlRWVHpqTkUtSkpMX1hKaXJ6ZVhhQjM1UmFZMjFnWVhKQWg3X2tuR3dpRzF3MGxiT2ozQ0FzdnVwaU1BMCIsImQiOiJLVkF1b1Zhd2paTTgwenRYcUxSZUJGZkJ3M3pxVjdkUGFpaWFONWU0RFp6bW5MYTFMNEZJMTgtanVraHN4UVdqR1NFQnBIdTFrOHRPUWMyWjBsSDVaaTBydERqM0JKeEhxeDNsUGdYMWdTNXNiX1EyeXNfb2FKcklSX012MHBDQUFHX3hpa2lUY2kzTHMyeV9femV4QTdLbG0yalNmYW9Udzdhbml1R3RId1d5dHhCSnJnZ0J2c3loaHZIaUVQcnZaMHZBZldYYWI3QUtkUjc1cEtEaVVHOGdGNTdJN0hrWnpJSk9QYXp3MTU1Skx4TG9HcDVzeTFCVVpBNHRiQmlseWVsdG9ONGZINWd1aUktOXJjTE5zUmVYazJ1c3NFbE9EbVZ2Qmx2ZVVfb1ZRMVYtVDRJRnUzZk1BYVJGUFA2Wlo1akJJX2hkOFJOTTJ3eUp5UHVRWVEiLCJlIjoiQVFBQiIsInVzZSI6InNpZyIsImtpZCI6ImRpYWxvZ3BvcnRlbi1zcC1zZGstdGVzdC0yMDI0MTAxMCIsInFpIjoiQm9VS0RlczQ0UTNpXzNyT3Q4aHRrS2NxWkFNem00Njl2cTZuQnJVcHBTU1Ric3YwalZwN1daRGRRR0Q0bU8yMVJVOEFUbmN3NjFPOUt3YXktOGloX082VWFWbGxZN3NHYlVrQ2NVaG43ZDkzSElLZnhybnhWVE9nNUNMWTBka2Zwa3A1V2pyU1VvMTVKQURsY3BRM0ItRlU0Nm9PTG9ydjJ0SVFQekE4OF93IiwiZHAiOiJ1emVaRWZpN2Fqa3JFREhYekZtTThXWFUtZ3RmM1ctN0pnY082MnpWc1JrNTN4QlcxTE1NZlRlN2tlWk9xOEhDN3hTbGktSm9idnR6WGU3Y295ZW9sTXkzTnlydXFhQVp4VTBPMHpHQWQ4UFdjdHNXeDlITHlrU1hNby1QVlVNNkpmZERCaWFtcXk5bGQ0WTRfdzlscEdVWEMyaUFwLXdsWktaSHdrbG1KR3MiLCJhbGciOiJSUzI1NiIsImRxIjoiVENBcV9DMlJuX0RhakRlcUU2aUIzWWVWNVNtMHBMQk1Tbm10OHNENEp3ZVo4YWgzcGhrTFVxUm9qVGw1SDNhYXVtWl9UUmxiaWVNSVFnWDh4UUFnZ1l2YkNYeG9oZEx0aGt3ckZZdlp0WjBEeHJDYm9Md1hjc0Y3Ukwyejl4LWMwSFBGVFAzLVREQWF6UWlBNVVtRmNwYnAzeDYzWGFLSWFuYnVFc0NiSDdFIiwibiI6Imh5Sks4WnE2Wk8tRjFSSklVWVNCdUpfeG9RWkNNV1EyTVhrSFQ1bVROVVJJZmVWWWpCNWMwMzI0Uk5nc3ZPMEtXX0hUejRRSnptLV9rU1VaZ0h1Z2JoR0F3a1Vqc1lwTlJJRTBvLVNtdEExMlMxZHVCZWx6ajg2LVFrZkFzeFlwblNnSzl5OXpTS1B0YVlzMS1EcEVIb0hVdk9BSDJlNktFTXRaYUZPM0J0Yk9WUURXMENMYi1FY0UyaDBQRlFMMUp3NU8zeDhHcXBZeUFhamNoWnptcWlFbjBaSEd1QTNZZ1NyNGxQV1lkTzBNWHZmRFdyaFBTcnVTS3FodzBHMTlBRUpHOFhoek9xTWxLTUFIbW5ybk9XOHM2cWR2Sy1UQ1BiVGJJOU5XUWdFd2JpUFBBdlU0MUFITzZmTEYxUHZzQ3FhNjZTSGdYMkJzS3pvNVhORjhodyJ9" + } + }, + "Ed25519Keys": { + "Primary": { + "Kid": "", + "PublicComponent": "" + }, + "Secondary": { + "Kid": "", + "PublicComponent": "" + } + } +} diff --git a/src/Digdir.Library.Dialogporten.WebApiClient/CHANGELOG.md b/src/Digdir.Library.Dialogporten.WebApiClient/CHANGELOG.md new file mode 100644 index 000000000..4c04c3be3 --- /dev/null +++ b/src/Digdir.Library.Dialogporten.WebApiClient/CHANGELOG.md @@ -0,0 +1 @@ +hei dette er en test! diff --git a/src/Digdir.Library.Dialogporten.WebApiClient/Config/DialogportenSettings.cs b/src/Digdir.Library.Dialogporten.WebApiClient/Config/DialogportenSettings.cs new file mode 100644 index 000000000..b9ebd64bc --- /dev/null +++ b/src/Digdir.Library.Dialogporten.WebApiClient/Config/DialogportenSettings.cs @@ -0,0 +1,19 @@ +namespace Digdir.Library.Dialogporten.WebApiClient.Config; + +public class DialogportenSettings +{ + public string Environment { get; set; } = null!; + public MaskinportenSettings Maskinporten { get; set; } = null!; +} + +public record Ed25519Keys +{ + public Ed25519Key Primary { get; set; } = null!; + public Ed25519Key Secondary { get; set; } = null!; +} + +public record Ed25519Key +{ + public string Kid { get; set; } = null!; + public string PublicComponent { get; set; } = null!; +} diff --git a/src/Digdir.Library.Dialogporten.WebApiClient/Config/MaskinportenSettings.cs b/src/Digdir.Library.Dialogporten.WebApiClient/Config/MaskinportenSettings.cs new file mode 100644 index 000000000..95c524910 --- /dev/null +++ b/src/Digdir.Library.Dialogporten.WebApiClient/Config/MaskinportenSettings.cs @@ -0,0 +1,5 @@ +namespace Digdir.Library.Dialogporten.WebApiClient.Config; + +public sealed record MaskinportenSettings(string ClientId, string EncodedJwk, string Scope) +{ +} diff --git a/src/Digdir.Library.Dialogporten.WebApiClient/Digdir.Library.Dialogporten.WebApiClient.csproj b/src/Digdir.Library.Dialogporten.WebApiClient/Digdir.Library.Dialogporten.WebApiClient.csproj new file mode 100644 index 000000000..1a1db0fd2 --- /dev/null +++ b/src/Digdir.Library.Dialogporten.WebApiClient/Digdir.Library.Dialogporten.WebApiClient.csproj @@ -0,0 +1,32 @@ + + + + enable + enable + README.md + Link to release notes. + LICENSE + Digitaliseringsdirektoratet + digdir;altinn;dialogporten + git + https://github.com/digdir/dialogporten + 1.3 + + + + + + + + + + + + + + + + + + + diff --git a/src/Digdir.Library.Dialogporten.WebApiClient/Extensions/ServiceCollectionExtensions.cs b/src/Digdir.Library.Dialogporten.WebApiClient/Extensions/ServiceCollectionExtensions.cs new file mode 100644 index 000000000..65ac3df7e --- /dev/null +++ b/src/Digdir.Library.Dialogporten.WebApiClient/Extensions/ServiceCollectionExtensions.cs @@ -0,0 +1,83 @@ +using System.Reflection; +using Altinn.ApiClients.Maskinporten.Extensions; +using Altinn.ApiClients.Maskinporten.Services; +using Digdir.Library.Dialogporten.WebApiClient.Config; +using Digdir.Library.Dialogporten.WebApiClient.Services; +using Microsoft.Extensions.Configuration; +using Microsoft.Extensions.DependencyInjection; +using NSec.Cryptography; +using Refit; +using MaskinportenSettings = Altinn.ApiClients.Maskinporten.Config.MaskinportenSettings; +// using MaskinportenSettings = Altinn.Apiclient.Serviceowner.Config.MaskinportenSettings; + +namespace Digdir.Library.Dialogporten.WebApiClient.Extensions; + +public static class ServiceCollectionExtensions +{ + + public static IServiceCollection AddDialogTokenVerifer(this IServiceCollection services) + { + var provider = services.BuildServiceProvider(); + var dialogportenSettings = provider.GetRequiredService() + .GetSection("Ed25519Keys") + .Get(); + Console.WriteLine(dialogportenSettings); + var keyPair = dialogportenSettings!.Primary; + var kid = keyPair.Kid; + + var publicKey = PublicKey.Import(SignatureAlgorithm.Ed25519, + Base64Url.Decode(keyPair.PublicComponent), KeyBlobFormat.RawPublicKey); + services.AddSingleton(new DialogTokenVerifier(kid, publicKey)); + return services; + } + public static IServiceCollection AddDialogportenClient(this IServiceCollection services) + { + // Bygge en service provider for å få hentet ut settings + var provider = services.BuildServiceProvider(); + var dialogportenSettings = provider.GetRequiredService() + .GetSection("DialogportenSettings") + .Get(); + + // Vi mapper denne til en Maskinporten setting + var maskinportenSettings = new MaskinportenSettings() + { + EncodedJwk = dialogportenSettings!.Maskinporten.EncodedJwk, + ClientId = dialogportenSettings.Maskinporten.ClientId, + // Maskinportenmiljø utleded av Dialogporten-miljø + Environment = dialogportenSettings.Environment == "prod" ? "prod" : "test", + Scope = dialogportenSettings.Maskinporten.Scope, + }; + + // Vi registrerer en maskinporten klient med oppgite settings, som kan brukes som en http message handler + services.RegisterMaskinportenClientDefinition("dialogporten-sp-sdk", maskinportenSettings); + + var baseAddress = string.Empty; + if (dialogportenSettings.Environment == "test") + { + baseAddress = "https://localhost:7214"; + } + // Vi registrerer Refit, og legger til den registrerte maskinporten http message handlern + // Amund: Partial er ikke mulig å finne etter compile time. + var refitClients = Assembly.GetExecutingAssembly().GetTypes() + .Where(x => + x.Namespace!.StartsWith("Digdir.Library.Dialogporten.WebApiClient.Features.V1", StringComparison.InvariantCulture) && + x.IsInterface) + .ToList(); + + foreach (var refitClient in refitClients) + { + services + .AddRefitClient(refitClient) + .ConfigureHttpClient(c => + { + c.BaseAddress = new Uri(baseAddress); + }) + .AddMaskinportenHttpMessageHandler("dialogporten-sp-sdk"); + } + + // Vi registrerer vår egen API-abstraksjon, som selv tar inn og wrapper IDialgportenApi, som nå er "maskinporten-powered" + // services.AddSingleton(); + + return services; + } +} diff --git a/src/Digdir.Library.Dialogporten.WebApiClient/Features/V1/DialogportenClient.cs b/src/Digdir.Library.Dialogporten.WebApiClient/Features/V1/DialogportenClient.cs new file mode 100644 index 000000000..7cbfbda2b --- /dev/null +++ b/src/Digdir.Library.Dialogporten.WebApiClient/Features/V1/DialogportenClient.cs @@ -0,0 +1,30 @@ +// using Altinn.Apiclient.Serviceowner.Interfaces; +// using Digdir.Library.Dialogporten.WebApiClient.Interfaces; +// using Refit; +// +// namespace Digdir.Library.Dialogporten.WebApiClient.Features.V1; +// +// public sealed class DialogportenClient(IDialogportenApi dialogportenApi) : IDialogportenClient +// { +// public Task> GetDialogList( +// V1ServiceOwnerDialogsSearchSearchDialogQueryParams? param = null, CancellationToken cancellationToken = default) => +// dialogportenApi.V1ServiceOwnerDialogsSearchSearchDialog(param!, cancellationToken); +// +// public Task> GetDialog(Guid dialogId, string? endUserId = null, CancellationToken cancellationToken = default) => +// dialogportenApi.V1ServiceOwnerDialogsGetGetDialog(dialogId, endUserId!, cancellationToken); +// +// public Task> CreateDialog(V1ServiceOwnerDialogsCommandsCreate_DialogCommand createDialogCommand, CancellationToken cancellationToken = default) => +// dialogportenApi.V1ServiceOwnerDialogsCreateDialog(createDialogCommand, cancellationToken); +// +// public Task DeleteDialog(Guid dialogId, Guid? ifMatch = null, CancellationToken cancellationToken = default) => +// dialogportenApi.V1ServiceOwnerDialogsDeleteDialog(dialogId, ifMatch, cancellationToken); +// +// public Task PurgeDialog(Guid dialogId, Guid? ifMatch = null, CancellationToken cancellationToken = default) => +// dialogportenApi.V1ServiceOwnerDialogsPurgePurgeDialog(dialogId, ifMatch, cancellationToken); +// +// public Task PatchDialog(Guid dialogId, IEnumerable PatchDocument, Guid? ifMatch = null, CancellationToken cancellationToken = default) => +// dialogportenApi.V1ServiceOwnerDialogsPatchDialog(dialogId, PatchDocument, ifMatch, cancellationToken); +// +// public Task UpdateDialog(Guid dialogId, V1ServiceOwnerDialogsCommandsUpdate_Dialog updateCommand, Guid? ifMatch, CancellationToken cancellationToken = default) => +// dialogportenApi.V1ServiceOwnerDialogsUpdateDialog(dialogId, updateCommand, ifMatch, cancellationToken); +// } diff --git a/src/Digdir.Library.Dialogporten.WebApiClient/Features/V1/RefitterInterface.verified.cs b/src/Digdir.Library.Dialogporten.WebApiClient/Features/V1/RefitterInterface.verified.cs new file mode 100644 index 000000000..8b048947a --- /dev/null +++ b/src/Digdir.Library.Dialogporten.WebApiClient/Features/V1/RefitterInterface.verified.cs @@ -0,0 +1,5818 @@ +// +// This code was generated by Refitter. +// + + +using Refit; +using System.Collections.Generic; +using System.Text.Json.Serialization; +using System.Threading; +using System.Threading.Tasks; + +#nullable enable annotations + +namespace Digdir.Library.Dialogporten.WebApiClient.Features.V1 +{ + public class V1ServiceOwnerDialogsSearchSearchDialogQueryParams + { + + /// + /// Filter by one or more service resources + /// + [Query(CollectionFormat.Multi)] + public IEnumerable ServiceResource { get; set; } + + /// + /// Filter by one or more owning parties + /// + [Query(CollectionFormat.Multi)] + public IEnumerable Party { get; set; } + + /// + /// Filter by end user id + /// + [Query] + public string EndUserId { get; set; } + + /// + /// Filter by one or more extended statuses + /// + [Query(CollectionFormat.Multi)] + public IEnumerable ExtendedStatus { get; set; } + + /// + /// Filter by external reference + /// + [Query] + public string ExternalReference { get; set; } + + /// + /// Filter by status + /// + [Query(CollectionFormat.Multi)] + public IEnumerable Status { get; set; } + + /// + /// Only return dialogs created after this date + /// + [Query] + public System.DateTimeOffset? CreatedAfter { get; set; } + + /// + /// Only return dialogs created before this date + /// + [Query] + public System.DateTimeOffset? CreatedBefore { get; set; } + + /// + /// Only return dialogs updated after this date + /// + [Query] + public System.DateTimeOffset? UpdatedAfter { get; set; } + + /// + /// Only return dialogs updated before this date + /// + [Query] + public System.DateTimeOffset? UpdatedBefore { get; set; } + + /// + /// Only return dialogs with due date after this date + /// + [Query] + public System.DateTimeOffset? DueAfter { get; set; } + + /// + /// Only return dialogs with due date before this date + /// + [Query] + public System.DateTimeOffset? DueBefore { get; set; } + + /// + /// Only return dialogs with visible-from date after this date + /// + [Query] + public System.DateTimeOffset? VisibleAfter { get; set; } + + /// + /// Only return dialogs with visible-from date before this date + /// + [Query] + public System.DateTimeOffset? VisibleBefore { get; set; } + + /// + /// Filter by process + /// + [Query] + public string Process { get; set; } + + /// + /// Filter by Display state + /// + [Query(CollectionFormat.Multi)] + public IEnumerable SystemLabel { get; set; } + + /// + /// Search string for free text search. Will attempt to fuzzily match in all free text fields in the aggregate + /// + [Query] + public string Search { get; set; } + + /// + /// Limit free text search to texts with this language code, e.g. 'no', 'en'. Culture codes will be normalized to neutral language codes (ISO 639). Default: search all culture codes + /// + [Query] + public string SearchLanguageCode { get; set; } + + [Query] + public OrderSetOfTOrderDefinitionAndTTarget OrderBy { get; set; } + + /// + /// Supply "continuationToken" for the response to get the next page of results, if hasNextPage is true + /// + [Query] + public ContinuationTokenSetOfTOrderDefinitionAndTTarget ContinuationToken { get; set; } + + /// + /// Limit the number of results per page (1-1000, default: 100) + /// + [Query] + public int? Limit { get; set; } + + } + + public class V1ServiceOwnerDialogActivitiesNotificationConditionNotificationConditionQueryParams + { + public V1ServiceOwnerDialogActivitiesNotificationConditionNotificationConditionQueryParams(V1ServiceOwnerDialogActivitiesQueriesNotificationCondition_NotificationConditionType conditionType, DialogsEntitiesActivities_DialogActivityType activityType) + { + + ConditionType = conditionType; + ActivityType = activityType; + } + + [Query] + public V1ServiceOwnerDialogActivitiesQueriesNotificationCondition_NotificationConditionType ConditionType { get; set; } + + [Query] + public DialogsEntitiesActivities_DialogActivityType ActivityType { get; set; } + + [Query] + public System.Guid? TransmissionId { get; set; } + + } + + /// Gets a list of dialogs + [System.CodeDom.Compiler.GeneratedCode("Refitter", "1.4.1.0")] + public partial interface IServiceownerApi + { + /// Gets a list of dialogs + /// + /// Performs a search for dialogs, returning a paginated list of dialogs. For more information see the documentation (link TBD). + /// + /// * All date parameters must contain explicit time zone. Example: 2023-10-27T10:00:00Z or 2023-10-27T10:00:00+01:00 + /// * See "continuationToken" in the response for how to get the next page of results. + /// * hasNextPage will be set to true if there are more items to get. + /// + /// The dynamic querystring parameter wrapping all others. + /// + /// A representing the instance containing the result: + /// + /// + /// Status + /// Description + /// + /// + /// 200 + /// Successfully returned the dialog list. + /// + /// + /// 401 + /// Missing or invalid authentication token. Requires a Maskinporten-token with the scope \"digdir:dialogporten.serviceprovider.search\". + /// + /// + /// + [Headers("Accept: application/json")] + [Get("/api/v1/serviceowner/dialogs")] + Task> V1ServiceOwnerDialogsSearchSearchDialog([Query] V1ServiceOwnerDialogsSearchSearchDialogQueryParams queryParams, CancellationToken cancellationToken = default); + + /// Creates a new dialog + /// + /// The dialog is created with the given configuration. For more information see the documentation (link TBD). + /// + /// For detailed information on validation rules, see [the source for CreateDialogCommandValidator](https://github.com/digdir/dialogporten/blob/main/src/Digdir.Domain.Dialogporten.Application/Features/V1/ServiceOwner/Dialogs/Commands/Create/CreateDialogCommandValidator.cs) + /// + /// + /// A representing the instance containing the result: + /// + /// + /// Status + /// Description + /// + /// + /// 201 + /// The UUID of the created the dialog aggregate. A relative URL to the newly created activity is set in the \"Location\" header. + /// + /// + /// 400 + /// Validation error occured. See problem details for a list of errors. + /// + /// + /// 401 + /// Missing or invalid authentication token. Requires a Maskinporten-token with the scope \"digdir:dialogporten.serviceprovider\". + /// + /// + /// 403 + /// Unauthorized to create a dialog for the given serviceResource (not owned by authenticated organization or has additional scope requirements defined in policy). + /// + /// + /// 422 + /// Domain error occured. See problem details for a list of errors. + /// + /// + /// + [Headers("Accept: application/json, application/problem+json")] + [Post("/api/v1/serviceowner/dialogs")] + Task> V1ServiceOwnerDialogsCreateDialog([Body, AliasAs("CreateDialogCommand")] V1ServiceOwnerDialogsCommandsCreate_DialogCommand createDialogCommand, CancellationToken cancellationToken = default); + + /// Deletes a dialog + /// + /// Deletes a given dialog (soft delete). For more information see the documentation (link TBD). + /// + /// Note that the dialog will still be available on the single details endpoint, but will have a deleted status. It will not appear on the list endpoint for either service owners nor end users. + /// If end users attempt to access the dialog via the details endpoint, they will get a 410 Gone response. + /// + /// Optimistic concurrency control is implemented using the If-Match header. Supply the Revision value from the GetDialog endpoint to ensure that the dialog is not deleted by another request in the meantime. + /// + /// + /// A representing the instance containing the result: + /// + /// + /// Status + /// Description + /// + /// + /// 204 + /// The dialog aggregate was deleted successfully. + /// + /// + /// 401 + /// Missing or invalid authentication token. Requires a Maskinporten-token with the scope \"digdir:dialogporten.serviceprovider\". + /// + /// + /// 403 + /// Unauthorized to delete the supplied dialog (not owned by authenticated organization or has additional scope requirements defined in policy). + /// + /// + /// 404 + /// The given dialog ID was not found or is already deleted. + /// + /// + /// 412 + /// The supplied If-Match header did not match the current Revision value for the dialog. The request was not applied. + /// + /// + /// + [Headers("Accept: application/problem+json")] + [Delete("/api/v1/serviceowner/dialogs/{dialogId}")] + Task V1ServiceOwnerDialogsDeleteDialog(System.Guid dialogId, [Header("if-Match")] System.Guid? if_Match, CancellationToken cancellationToken = default); + + /// Gets a single dialog + /// + /// Gets a single dialog aggregate. For more information see the documentation (link TBD). + /// + /// Note that this operation may return deleted dialogs (see the field `DeletedAt`). + /// + /// Filter by end user id + /// + /// A representing the instance containing the result: + /// + /// + /// Status + /// Description + /// + /// + /// 200 + /// Successfully returned the dialog aggregate. + /// + /// + /// 401 + /// Missing or invalid authentication token. Requires a Maskinporten-token with the scope \"digdir:dialogporten.serviceprovider\". + /// + /// + /// 403 + /// Unauthorized to get the supplied dialog (not owned by authenticated organization or has additional scope requirements defined in policy). + /// + /// + /// 404 + /// The given dialog ID was not found or is already deleted. + /// + /// + /// + [Headers("Accept: application/json, application/problem+json")] + [Get("/api/v1/serviceowner/dialogs/{dialogId}")] + Task> V1ServiceOwnerDialogsGetGetDialog(System.Guid dialogId, [Query] string endUserId, CancellationToken cancellationToken = default); + + /// Patch a single dialog + /// + /// Patches a dialog aggregate with a RFC6902 JSON Patch document. The patch document must be a JSON array of RFC6902 operations. + /// See [https://tools.ietf.org/html/rfc6902](https://tools.ietf.org/html/rfc6902) for more information. + /// + /// Optimistic concurrency control is implemented using the If-Match header. Supply the Revision value from the GetDialog endpoint to ensure that the dialog is not modified/deleted by another request in the meantime. + /// + /// + /// A representing the instance containing the result: + /// + /// + /// Status + /// Description + /// + /// + /// 204 + /// Patch was successfully applied. + /// + /// + /// 400 + /// Validation error occured. See problem details for a list of errors. + /// + /// + /// 401 + /// Missing or invalid authentication token. Requires a Maskinporten-token with the scope \\\"digdir:dialogporten.serviceprovider\\\" + /// + /// + /// 403 + /// Unauthorized to update a dialog for the given serviceResource (not owned by authenticated organization or has additional scope requirements defined in policy) + /// + /// + /// 404 + /// The given dialog ID was not found or is deleted + /// + /// + /// 412 + /// The supplied Revision does not match the current Revision of the dialog + /// + /// + /// 422 + /// Domain error occured. See problem details for a list of errors. + /// + /// + /// + [Headers("Accept: application/json")] + [Patch("/api/v1/serviceowner/dialogs/{dialogId}")] + Task V1ServiceOwnerDialogsPatchDialog(System.Guid dialogId, [Body] IEnumerable patchDocument, [Header("If-Match")] System.Guid? etag, CancellationToken cancellationToken = default); + + /// Replaces a dialog + /// + /// Replaces a given dialog with the supplied model. For more information see the documentation (link TBD). + /// + /// Optimistic concurrency control is implemented using the If-Match header. Supply the Revision value from the GetDialog endpoint to ensure that the dialog is not modified/deleted by another request in the meantime. + /// + /// + /// A representing the instance containing the result: + /// + /// + /// Status + /// Description + /// + /// + /// 204 + /// The dialog aggregate was updated successfully. + /// + /// + /// 400 + /// Validation error occured. See problem details for a list of errors. + /// + /// + /// 401 + /// Missing or invalid authentication token. Requires a Maskinporten-token with the scope \"digdir:dialogporten.serviceprovider\". + /// + /// + /// 403 + /// Unauthorized to update the supplied dialog (not owned by authenticated organization or has additional scope requirements defined in policy). + /// + /// + /// 404 + /// The given dialog ID was not found or is already deleted. + /// + /// + /// 412 + /// The supplied If-Match header did not match the current Revision value for the dialog. The request was not applied. + /// + /// + /// 422 + /// Domain error occured. See problem details for a list of errors. + /// + /// + /// + [Headers("Accept: application/problem+json")] + [Put("/api/v1/serviceowner/dialogs/{dialogId}")] + Task V1ServiceOwnerDialogsUpdateDialog(System.Guid dialogId, [Body] V1ServiceOwnerDialogsCommandsUpdate_Dialog dto, [Header("if-Match")] System.Guid? if_Match, CancellationToken cancellationToken = default); + + /// Permanently deletes a dialog + /// + /// Deletes a given dialog (hard delete). For more information see the documentation (link TBD). + /// + /// Optimistic concurrency control is implemented using the If-Match header. Supply the Revision value from the GetDialog endpoint to ensure that the dialog is not deleted by another request in the meantime. + /// + /// + /// A representing the instance containing the result: + /// + /// + /// Status + /// Description + /// + /// + /// 204 + /// The dialog aggregate was deleted successfully. + /// + /// + /// 401 + /// Missing or invalid authentication token. Requires a Maskinporten-token with the scope \"digdir:dialogporten.serviceprovider\". + /// + /// + /// 403 + /// Unauthorized to delete the supplied dialog (not owned by authenticated organization or has additional scope requirements defined in policy). + /// + /// + /// 404 + /// The given dialog ID was not found or is already deleted. + /// + /// + /// 412 + /// The supplied If-Match header did not match the current Revision value for the dialog. The request was not applied. + /// + /// + /// + [Headers("Accept: application/problem+json")] + [Post("/api/v1/serviceowner/dialogs/{dialogId}/actions/purge")] + Task V1ServiceOwnerDialogsPurgePurgeDialog(System.Guid dialogId, [Header("if-Match")] System.Guid? if_Match, CancellationToken cancellationToken = default); + + /// Returns a boolean value based on conditions used to determine if a notification is to be sent + /// Used by Altinn Notification only. Takes a dialogId and returns a boolean value based on conditions used to determine if a notification is to be sent. + /// The dynamic querystring parameter wrapping all others. + /// + /// A representing the instance containing the result: + /// + /// + /// Status + /// Description + /// + /// + /// 200 + /// Successfully returned the notification determination. + /// + /// + /// 401 + /// Missing or invalid authentication token. Requires a Maskinporten-token with the scope \"altinn:system/notifications.condition.check\". + /// + /// + /// 403 + /// Forbidden + /// + /// + /// + [Headers("Accept: application/json")] + [Get("/api/v1/serviceowner/dialogs/{dialogId}/actions/should-send-notification")] + Task> V1ServiceOwnerDialogActivitiesNotificationConditionNotificationCondition(System.Guid dialogId, [Query] V1ServiceOwnerDialogActivitiesNotificationConditionNotificationConditionQueryParams queryParams, CancellationToken cancellationToken = default); + + /// Gets a list of dialog activities + /// Gets the list of activities belonging to a dialog + /// + /// A representing the instance containing the result: + /// + /// + /// Status + /// Description + /// + /// + /// 200 + /// Successfully returned the dialog activity list. + /// + /// + /// 401 + /// Missing or invalid authentication token. Requires a Maskinporten-token with the scope \"digdir:dialogporten.serviceprovider\". + /// + /// + /// 403 + /// Unauthorized to get the supplied dialog (not owned by authenticated organization or has additional scope requirements defined in policy). + /// + /// + /// + [Headers("Accept: application/json")] + [Get("/api/v1/serviceowner/dialogs/{dialogId}/activities")] + Task>> V1ServiceOwnerDialogActivitiesSearchSearchDialogActivity(System.Guid dialogId, CancellationToken cancellationToken = default); + + /// Adds a activity to a dialogs activity history + /// + /// The activity is created with the given configuration. For more information see the documentation (link TBD). + /// + /// Optimistic concurrency control is implemented using the If-Match header. Supply the Revision value from the GetDialog endpoint to ensure that the dialog is not modified/deleted by another request in the meantime. + /// + /// + /// A representing the instance containing the result: + /// + /// + /// Status + /// Description + /// + /// + /// 201 + /// The UUID of the created the dialog activity. A relative URL to the newly created activity is set in the \"Location\" header. + /// + /// + /// 400 + /// Validation error occured. See problem details for a list of errors. + /// + /// + /// 401 + /// Missing or invalid authentication token. Requires a Maskinporten-token with the scope \"digdir:dialogporten.serviceprovider\". + /// + /// + /// 403 + /// Unauthorized to create child entity for the given dialog (dialog not owned by authenticated organization or has additional scope requirements defined in service identifiers policy). + /// + /// + /// 404 + /// The given dialog ID was not found or is already deleted. + /// + /// + /// 412 + /// The supplied If-Match header did not match the current Revision value for the dialog. The request was not applied. + /// + /// + /// 422 + /// Domain error occured. See problem details for a list of errors. + /// + /// + /// + [Headers("Accept: application/json, application/problem+json")] + [Post("/api/v1/serviceowner/dialogs/{dialogId}/activities")] + Task> V1ServiceOwnerDialogActivitiesCreateDialogActivity(System.Guid dialogId, [Body, AliasAs("CreateActivityRequest")] V1ServiceOwnerDialogActivitiesCreate_ActivityRequest createActivityRequest, [Header("if-Match")] System.Guid? if_Match, CancellationToken cancellationToken = default); + + /// Gets a single dialog activity + /// Gets a single activity belonging to a dialog. For more information see the documentation (link TBD). + /// + /// A representing the instance containing the result: + /// + /// + /// Status + /// Description + /// + /// + /// 200 + /// Successfully returned the dialog activity. + /// + /// + /// 401 + /// Missing or invalid authentication token. Requires a Maskinporten-token with the scope \"digdir:dialogporten.serviceprovider\". + /// + /// + /// 403 + /// Unauthorized to get child entity for the given dialog (dialog not owned by authenticated organization or has additional scope requirements defined in service identifiers policy). + /// + /// + /// 404 + /// The given dialog ID was not found or was deleted, or the given activity ID was not found. + /// + /// + /// + [Headers("Accept: application/json, application/problem+json")] + [Get("/api/v1/serviceowner/dialogs/{dialogId}/activities/{activityId}")] + Task> V1ServiceOwnerDialogActivitiesGetGetDialogActivity(System.Guid dialogId, System.Guid activityId, CancellationToken cancellationToken = default); + + /// Gets all seen log records for a dialog + /// Gets all seen log records for a dialog. For more information see the documentation (link TBD). + /// + /// A representing the instance containing the result: + /// + /// + /// Status + /// Description + /// + /// + /// 200 + /// Successfully returned the dialog seen log records. + /// + /// + /// 401 + /// Unauthorized + /// + /// + /// 403 + /// Forbidden + /// + /// + /// 404 + /// Not Found + /// + /// + /// + [Headers("Accept: application/json, application/problem+json")] + [Get("/api/v1/serviceowner/dialogs/{dialogId}/seenlog")] + Task>> V1ServiceOwnerDialogSeenLogsSearchSearchDialogSeenLog(System.Guid dialogId, CancellationToken cancellationToken = default); + + /// Gets a single dialog seen log record + /// Gets a single dialog seen log record. For more information see the documentation (link TBD). + /// + /// A representing the instance containing the result: + /// + /// + /// Status + /// Description + /// + /// + /// 200 + /// Successfully returned the dialog seen log record. + /// + /// + /// 401 + /// Unauthorized + /// + /// + /// 403 + /// Forbidden + /// + /// + /// 404 + /// Not Found + /// + /// + /// + [Headers("Accept: application/json, application/problem+json")] + [Get("/api/v1/serviceowner/dialogs/{dialogId}/seenlog/{seenLogId}")] + Task> V1ServiceOwnerDialogSeenLogsGetGetDialogSeenLog(System.Guid dialogId, System.Guid seenLogId, CancellationToken cancellationToken = default); + + /// Gets a list of dialog transmissions + /// Gets the list of transmissions belonging to a dialog + /// + /// A representing the instance containing the result: + /// + /// + /// Status + /// Description + /// + /// + /// 200 + /// Successfully returned the dialog transmission list. + /// + /// + /// 401 + /// Missing or invalid authentication token. Requires a Maskinporten-token with the scope \"digdir:dialogporten.serviceprovider\". + /// + /// + /// 403 + /// Unauthorized to get the supplied dialog (not owned by authenticated organization or has additional scope requirements defined in policy). + /// + /// + /// 404 + /// The given dialog ID was not found or is already deleted. + /// + /// + /// + [Headers("Accept: application/json, application/problem+json")] + [Get("/api/v1/serviceowner/dialogs/{dialogId}/transmissions")] + Task> V1ServiceOwnerDialogTransmissionsSearchSearchDialogTransmission(System.Guid dialogId, CancellationToken cancellationToken = default); + + /// Adds a transmission to a dialog + /// + /// The transmission is created with the given configuration. For more information see the documentation (link TBD). + /// + /// Optimistic concurrency control is implemented using the If-Match header. Supply the Revision value from the GetDialog endpoint to ensure that the dialog is not modified/deleted by another request in the meantime. + /// + /// + /// A representing the instance containing the result: + /// + /// + /// Status + /// Description + /// + /// + /// 201 + /// The UUID of the created the dialog transmission. A relative URL to the newly created activity is set in the \"Location\" header. + /// + /// + /// 400 + /// Validation error occured. See problem details for a list of errors. + /// + /// + /// 401 + /// Missing or invalid authentication token. Requires a Maskinporten-token with the scope \"digdir:dialogporten.serviceprovider\". + /// + /// + /// 403 + /// Unauthorized to create child entity for the given dialog (dialog not owned by authenticated organization or has additional scope requirements defined in service identifiers policy). + /// + /// + /// 404 + /// The given dialog ID was not found or is already deleted. + /// + /// + /// 412 + /// The supplied If-Match header did not match the current Revision value for the dialog. The request was not applied. + /// + /// + /// 422 + /// Domain error occured. See problem details for a list of errors. + /// + /// + /// + [Headers("Accept: application/json, application/problem+json")] + [Post("/api/v1/serviceowner/dialogs/{dialogId}/transmissions")] + Task> V1ServiceOwnerDialogTransmissionsCreateDialogTransmission(System.Guid dialogId, [Body, AliasAs("CreateTransmissionRequest")] V1ServiceOwnerDialogTransmissionsCreate_TransmissionRequest createTransmissionRequest, [Header("if-Match")] System.Guid? if_Match, CancellationToken cancellationToken = default); + + /// Gets a single dialog transmission + /// Gets a single transmission belonging to a dialog. For more information see the documentation (link TBD). + /// + /// A representing the instance containing the result: + /// + /// + /// Status + /// Description + /// + /// + /// 200 + /// Successfully returned the dialog transmission. + /// + /// + /// 401 + /// Missing or invalid authentication token. Requires a Maskinporten-token with the scope \"digdir:dialogporten.serviceprovider\". + /// + /// + /// 403 + /// Unauthorized to get child entity for the given dialog (dialog not owned by authenticated organization or has additional scope requirements defined in service identifiers policy). + /// + /// + /// 404 + /// The given dialog ID was not found or was deleted, or the given transmission ID was not found. + /// + /// + /// + [Headers("Accept: application/json, application/problem+json")] + [Get("/api/v1/serviceowner/dialogs/{dialogId}/transmissions/{transmissionId}")] + Task> V1ServiceOwnerDialogTransmissionsGetGetDialogTransmission(System.Guid dialogId, System.Guid transmissionId, CancellationToken cancellationToken = default); + } + +} + +//---------------------- +// +// Generated using the NSwag toolchain v14.2.0.0 (NJsonSchema v11.1.0.0 (Newtonsoft.Json v13.0.0.0)) (http://NSwag.org) +// +//---------------------- + +#pragma warning disable 108 // Disable "CS0108 '{derivedDto}.ToJson()' hides inherited member '{dtoBase}.ToJson()'. Use the new keyword if hiding was intended." +#pragma warning disable 114 // Disable "CS0114 '{derivedDto}.RaisePropertyChanged(String)' hides inherited member 'dtoBase.RaisePropertyChanged(String)'. To make the current member override that implementation, add the override keyword. Otherwise add the new keyword." +#pragma warning disable 472 // Disable "CS0472 The result of the expression is always 'false' since a value of type 'Int32' is never equal to 'null' of type 'Int32?' +#pragma warning disable 612 // Disable "CS0612 '...' is obsolete" +#pragma warning disable 649 // Disable "CS0649 Field is never assigned to, and will always have its default value null" +#pragma warning disable 1573 // Disable "CS1573 Parameter '...' has no matching param tag in the XML comment for ... +#pragma warning disable 1591 // Disable "CS1591 Missing XML comment for publicly visible type or member ..." +#pragma warning disable 8073 // Disable "CS8073 The result of the expression is always 'false' since a value of type 'T' is never equal to 'null' of type 'T?'" +#pragma warning disable 3016 // Disable "CS3016 Arrays as attribute arguments is not CLS-compliant" +#pragma warning disable 8603 // Disable "CS8603 Possible null reference return" +#pragma warning disable 8604 // Disable "CS8604 Possible null reference argument for parameter" +#pragma warning disable 8625 // Disable "CS8625 Cannot convert null literal to non-nullable reference type" +#pragma warning disable 8765 // Disable "CS8765 Nullability of type of parameter doesn't match overridden member (possibly because of nullability attributes)." + +namespace Digdir.Library.Dialogporten.WebApiClient.Features.V1 +{ + using System = global::System; + + + + [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "14.2.0.0 (NJsonSchema v11.1.0.0 (Newtonsoft.Json v13.0.0.0))")] + public enum Actors_ActorType + { + + [System.Runtime.Serialization.EnumMember(Value = @"PartyRepresentative")] + PartyRepresentative = 0, + + [System.Runtime.Serialization.EnumMember(Value = @"ServiceOwner")] + ServiceOwner = 1, + + } + + [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "14.2.0.0 (NJsonSchema v11.1.0.0 (Newtonsoft.Json v13.0.0.0))")] + public enum Attachments_AttachmentUrlConsumerType + { + + [System.Runtime.Serialization.EnumMember(Value = @"Gui")] + Gui = 0, + + [System.Runtime.Serialization.EnumMember(Value = @"Api")] + Api = 1, + + } + + [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "14.2.0.0 (NJsonSchema v11.1.0.0 (Newtonsoft.Json v13.0.0.0))")] + public partial class ContinuationTokenSetOfTOrderDefinitionAndTTarget + { + + private IDictionary _additionalProperties; + + [JsonExtensionData] + public IDictionary AdditionalProperties + { + get { return _additionalProperties ?? (_additionalProperties = new Dictionary()); } + set { _additionalProperties = value; } + } + + } + + [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "14.2.0.0 (NJsonSchema v11.1.0.0 (Newtonsoft.Json v13.0.0.0))")] + public enum DialogEndUserContextsEntities_SystemLabel + { + + [System.Runtime.Serialization.EnumMember(Value = @"Default")] + Default = 0, + + [System.Runtime.Serialization.EnumMember(Value = @"Bin")] + Bin = 1, + + [System.Runtime.Serialization.EnumMember(Value = @"Archive")] + Archive = 2, + + } + + [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "14.2.0.0 (NJsonSchema v11.1.0.0 (Newtonsoft.Json v13.0.0.0))")] + public enum DialogsEntities_DialogStatus + { + + [System.Runtime.Serialization.EnumMember(Value = @"New")] + New = 0, + + [System.Runtime.Serialization.EnumMember(Value = @"InProgress")] + InProgress = 1, + + [System.Runtime.Serialization.EnumMember(Value = @"Draft")] + Draft = 2, + + [System.Runtime.Serialization.EnumMember(Value = @"Sent")] + Sent = 3, + + [System.Runtime.Serialization.EnumMember(Value = @"RequiresAttention")] + RequiresAttention = 4, + + [System.Runtime.Serialization.EnumMember(Value = @"Completed")] + Completed = 5, + + } + + [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "14.2.0.0 (NJsonSchema v11.1.0.0 (Newtonsoft.Json v13.0.0.0))")] + public enum DialogsEntitiesActions_DialogGuiActionPriority + { + + [System.Runtime.Serialization.EnumMember(Value = @"Primary")] + Primary = 0, + + [System.Runtime.Serialization.EnumMember(Value = @"Secondary")] + Secondary = 1, + + [System.Runtime.Serialization.EnumMember(Value = @"Tertiary")] + Tertiary = 2, + + } + + [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "14.2.0.0 (NJsonSchema v11.1.0.0 (Newtonsoft.Json v13.0.0.0))")] + public enum DialogsEntitiesActivities_DialogActivityType + { + + [System.Runtime.Serialization.EnumMember(Value = @"DialogCreated")] + DialogCreated = 0, + + [System.Runtime.Serialization.EnumMember(Value = @"DialogClosed")] + DialogClosed = 1, + + [System.Runtime.Serialization.EnumMember(Value = @"Information")] + Information = 2, + + [System.Runtime.Serialization.EnumMember(Value = @"TransmissionOpened")] + TransmissionOpened = 3, + + [System.Runtime.Serialization.EnumMember(Value = @"PaymentMade")] + PaymentMade = 4, + + [System.Runtime.Serialization.EnumMember(Value = @"SignatureProvided")] + SignatureProvided = 5, + + [System.Runtime.Serialization.EnumMember(Value = @"DialogOpened")] + DialogOpened = 6, + + } + + [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "14.2.0.0 (NJsonSchema v11.1.0.0 (Newtonsoft.Json v13.0.0.0))")] + public enum DialogsEntitiesTransmissions_DialogTransmissionType + { + + [System.Runtime.Serialization.EnumMember(Value = @"Information")] + Information = 0, + + [System.Runtime.Serialization.EnumMember(Value = @"Acceptance")] + Acceptance = 1, + + [System.Runtime.Serialization.EnumMember(Value = @"Rejection")] + Rejection = 2, + + [System.Runtime.Serialization.EnumMember(Value = @"Request")] + Request = 3, + + [System.Runtime.Serialization.EnumMember(Value = @"Alert")] + Alert = 4, + + [System.Runtime.Serialization.EnumMember(Value = @"Decision")] + Decision = 5, + + [System.Runtime.Serialization.EnumMember(Value = @"Submission")] + Submission = 6, + + [System.Runtime.Serialization.EnumMember(Value = @"Correction")] + Correction = 7, + + } + + [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "14.2.0.0 (NJsonSchema v11.1.0.0 (Newtonsoft.Json v13.0.0.0))")] + public enum Http_HttpVerb + { + + [System.Runtime.Serialization.EnumMember(Value = @"GET")] + GET = 0, + + [System.Runtime.Serialization.EnumMember(Value = @"POST")] + POST = 1, + + [System.Runtime.Serialization.EnumMember(Value = @"PUT")] + PUT = 2, + + [System.Runtime.Serialization.EnumMember(Value = @"PATCH")] + PATCH = 3, + + [System.Runtime.Serialization.EnumMember(Value = @"DELETE")] + DELETE = 4, + + [System.Runtime.Serialization.EnumMember(Value = @"HEAD")] + HEAD = 5, + + [System.Runtime.Serialization.EnumMember(Value = @"OPTIONS")] + OPTIONS = 6, + + [System.Runtime.Serialization.EnumMember(Value = @"TRACE")] + TRACE = 7, + + [System.Runtime.Serialization.EnumMember(Value = @"CONNECT")] + CONNECT = 8, + + } + + [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "14.2.0.0 (NJsonSchema v11.1.0.0 (Newtonsoft.Json v13.0.0.0))")] + public partial class JsonPatchOperations_Operation + { + + [JsonPropertyName("from")] + public string From { get; set; } + + [JsonPropertyName("op")] + public string Op { get; set; } + + [JsonPropertyName("operationType")] + [JsonConverter(typeof(JsonStringEnumConverter))] + public JsonPatchOperations_OperationType OperationType { get; set; } + + [JsonPropertyName("path")] + public string Path { get; set; } + + [JsonPropertyName("value")] + public object Value { get; set; } + + } + + [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "14.2.0.0 (NJsonSchema v11.1.0.0 (Newtonsoft.Json v13.0.0.0))")] + public enum JsonPatchOperations_OperationType + { + + [System.Runtime.Serialization.EnumMember(Value = @"Add")] + Add = 0, + + [System.Runtime.Serialization.EnumMember(Value = @"Remove")] + Remove = 1, + + [System.Runtime.Serialization.EnumMember(Value = @"Replace")] + Replace = 2, + + [System.Runtime.Serialization.EnumMember(Value = @"Move")] + Move = 3, + + [System.Runtime.Serialization.EnumMember(Value = @"Copy")] + Copy = 4, + + [System.Runtime.Serialization.EnumMember(Value = @"Test")] + Test = 5, + + [System.Runtime.Serialization.EnumMember(Value = @"Invalid")] + Invalid = 6, + + } + + [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "14.2.0.0 (NJsonSchema v11.1.0.0 (Newtonsoft.Json v13.0.0.0))")] + public partial class OrderSetOfTOrderDefinitionAndTTarget + { + + private IDictionary _additionalProperties; + + [JsonExtensionData] + public IDictionary AdditionalProperties + { + get { return _additionalProperties ?? (_additionalProperties = new Dictionary()); } + set { _additionalProperties = value; } + } + + } + + [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "14.2.0.0 (NJsonSchema v11.1.0.0 (Newtonsoft.Json v13.0.0.0))")] + public partial class PaginatedListOfV1EndUserDialogsQueriesSearch_Dialog + { + /// + /// The continuation token to be used to fetch the next page of items + /// + + [JsonPropertyName("continuationToken")] + public string ContinuationToken { get; set; } + + /// + /// Whether there are more items available that can be fetched by supplying the continuation token + /// + + [JsonPropertyName("hasNextPage")] + public bool HasNextPage { get; set; } + + /// + /// The paginated list of items + /// + + [JsonPropertyName("items")] + public ICollection Items { get; set; } + + /// + /// The current sorting order of the items + /// + + [JsonPropertyName("orderBy")] + public string OrderBy { get; set; } + + } + + [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "14.2.0.0 (NJsonSchema v11.1.0.0 (Newtonsoft.Json v13.0.0.0))")] + public partial class PaginatedListOfV1ServiceOwnerDialogsQueriesSearch_Dialog + { + /// + /// The continuation token to be used to fetch the next page of items + /// + + [JsonPropertyName("continuationToken")] + public string ContinuationToken { get; set; } + + /// + /// Whether there are more items available that can be fetched by supplying the continuation token + /// + + [JsonPropertyName("hasNextPage")] + public bool HasNextPage { get; set; } + + /// + /// The paginated list of items + /// + + [JsonPropertyName("items")] + public ICollection Items { get; set; } + + /// + /// The current sorting order of the items + /// + + [JsonPropertyName("orderBy")] + public string OrderBy { get; set; } + + } + + [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "14.2.0.0 (NJsonSchema v11.1.0.0 (Newtonsoft.Json v13.0.0.0))")] + public partial class ProblemDetails + { + + [JsonPropertyName("detail")] + public string Detail { get; set; } + + [JsonPropertyName("errors")] + public ICollection Errors { get; set; } + + [JsonPropertyName("instance")] + public string Instance { get; set; } = "/api/route"; + + [JsonPropertyName("status")] + public int Status { get; set; } = 400; + + [JsonPropertyName("title")] + public string Title { get; set; } = "One or more validation errors occurred."; + + [JsonPropertyName("traceId")] + public string TraceId { get; set; } = "0HMPNHL0JHL76:00000001"; + + [JsonPropertyName("type")] + public string Type { get; set; } = "https://www.rfc-editor.org/rfc/rfc7231#section-6.5.1"; + + } + + [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "14.2.0.0 (NJsonSchema v11.1.0.0 (Newtonsoft.Json v13.0.0.0))")] + public partial class ProblemDetails_Error + { + + [JsonPropertyName("code")] + public string Code { get; set; } + + [JsonPropertyName("name")] + public string Name { get; set; } = "Error or field name"; + + [JsonPropertyName("reason")] + public string Reason { get; set; } = "Error reason"; + + [JsonPropertyName("severity")] + public string Severity { get; set; } + + } + + [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "14.2.0.0 (NJsonSchema v11.1.0.0 (Newtonsoft.Json v13.0.0.0))")] + public partial class V1CommonContent_ContentValue + { + /// + /// Media type of the content (plaintext, Markdown). Can also indicate that the content is embeddable. + /// + + [JsonPropertyName("mediaType")] + public string MediaType { get; set; } + + /// + /// A list of localizations for the content. + /// + + [JsonPropertyName("value")] + public ICollection Value { get; set; } + + } + + [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "14.2.0.0 (NJsonSchema v11.1.0.0 (Newtonsoft.Json v13.0.0.0))")] + public partial class V1CommonLocalizations_Localization + { + /// + /// The language code of the localization in ISO 639-1 format. + /// + + [JsonPropertyName("languageCode")] + public string LanguageCode { get; set; } + + /// + /// The localized text or URI reference. + /// + + [JsonPropertyName("value")] + public string Value { get; set; } + + } + + [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "14.2.0.0 (NJsonSchema v11.1.0.0 (Newtonsoft.Json v13.0.0.0))")] + public partial class V1EndUserCommonActors_Actor + { + /// + /// The identifier of the person or organization that sent the transmission. Mutually exclusive with ActorName. + ///
Might be omitted if ActorType is "ServiceOwner". + ///
+ + [JsonPropertyName("actorId")] + public string ActorId { get; set; } + + /// + /// Specifies the name of the entity that sent the transmission. Mutually exclusive with ActorId. If ActorId + ///
is supplied, the name will be automatically populated from the name registries. + ///
+ + [JsonPropertyName("actorName")] + public string ActorName { get; set; } + + /// + /// The type of actor that sent the transmission. + /// + + [JsonPropertyName("actorType")] + [JsonConverter(typeof(JsonStringEnumConverter))] + public Actors_ActorType ActorType { get; set; } + + } + + [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "14.2.0.0 (NJsonSchema v11.1.0.0 (Newtonsoft.Json v13.0.0.0))")] + public partial class V1EndUserDialogActivitiesQueriesGet_Activity + { + + [JsonPropertyName("createdAt")] + public System.DateTimeOffset? CreatedAt { get; set; } + + [JsonPropertyName("description")] + public ICollection Description { get; set; } + + [JsonPropertyName("extendedType")] + public System.Uri ExtendedType { get; set; } + + [JsonPropertyName("id")] + public System.Guid Id { get; set; } + + [JsonPropertyName("performedBy")] + public V1EndUserCommonActors_Actor PerformedBy { get; set; } + + [JsonPropertyName("transmissionId")] + public System.Guid? TransmissionId { get; set; } + + [JsonPropertyName("type")] + [JsonConverter(typeof(JsonStringEnumConverter))] + public DialogsEntitiesActivities_DialogActivityType Type { get; set; } + + } + + [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "14.2.0.0 (NJsonSchema v11.1.0.0 (Newtonsoft.Json v13.0.0.0))")] + public partial class V1EndUserDialogActivitiesQueriesSearch_Activity + { + + [JsonPropertyName("createdAt")] + public System.DateTimeOffset CreatedAt { get; set; } + + [JsonPropertyName("extendedType")] + public System.Uri ExtendedType { get; set; } + + [JsonPropertyName("id")] + public System.Guid Id { get; set; } + + [JsonPropertyName("seenByEndUserIdHash")] + public string SeenByEndUserIdHash { get; set; } + + [JsonPropertyName("transmissionId")] + public System.Guid? TransmissionId { get; set; } + + [JsonPropertyName("type")] + [JsonConverter(typeof(JsonStringEnumConverter))] + public DialogsEntitiesActivities_DialogActivityType Type { get; set; } + + } + + [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "14.2.0.0 (NJsonSchema v11.1.0.0 (Newtonsoft.Json v13.0.0.0))")] + public partial class V1EndUserDialogLabelAssignmentLogQueriesSearch_LabelAssignmentLog + { + + [JsonPropertyName("action")] + public string Action { get; set; } + + [JsonPropertyName("createdAt")] + public System.DateTimeOffset CreatedAt { get; set; } + + [JsonPropertyName("name")] + public string Name { get; set; } + + [JsonPropertyName("performedBy")] + public V1EndUserCommonActors_Actor PerformedBy { get; set; } + + } + + [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "14.2.0.0 (NJsonSchema v11.1.0.0 (Newtonsoft.Json v13.0.0.0))")] + public partial class V1EndUserDialogSeenLogsQueriesGet_SeenLog + { + + [JsonPropertyName("id")] + public System.Guid Id { get; set; } + + [JsonPropertyName("isCurrentEndUser")] + public bool IsCurrentEndUser { get; set; } + + [JsonPropertyName("isViaServiceOwner")] + public bool IsViaServiceOwner { get; set; } + + [JsonPropertyName("seenAt")] + public System.DateTimeOffset SeenAt { get; set; } + + [JsonPropertyName("seenBy")] + public V1EndUserCommonActors_Actor SeenBy { get; set; } + + } + + [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "14.2.0.0 (NJsonSchema v11.1.0.0 (Newtonsoft.Json v13.0.0.0))")] + public partial class V1EndUserDialogSeenLogsQueriesSearch_SeenLog + { + + [JsonPropertyName("id")] + public System.Guid Id { get; set; } + + [JsonPropertyName("isCurrentEndUser")] + public bool IsCurrentEndUser { get; set; } + + [JsonPropertyName("isViaServiceOwner")] + public bool IsViaServiceOwner { get; set; } + + [JsonPropertyName("seenAt")] + public System.DateTimeOffset SeenAt { get; set; } + + [JsonPropertyName("seenBy")] + public V1EndUserCommonActors_Actor SeenBy { get; set; } + + } + + [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "14.2.0.0 (NJsonSchema v11.1.0.0 (Newtonsoft.Json v13.0.0.0))")] + public partial class V1EndUserDialogsQueriesGet_Content + { + /// + /// Additional information about the dialog, this may contain Markdown. + /// + + [JsonPropertyName("additionalInfo")] + public V1CommonContent_ContentValue AdditionalInfo { get; set; } + + /// + /// Used as the human-readable label used to describe the "ExtendedStatus" field. + /// + + [JsonPropertyName("extendedStatus")] + public V1CommonContent_ContentValue ExtendedStatus { get; set; } + + /// + /// Front-channel embedded content. Used to dynamically embed content in the frontend from an external URL. + /// + + [JsonPropertyName("mainContentReference")] + public V1CommonContent_ContentValue MainContentReference { get; set; } + + /// + /// Overridden sender name. If not supplied, assume "org" as the sender name. + /// + + [JsonPropertyName("senderName")] + public V1CommonContent_ContentValue SenderName { get; set; } + + /// + /// A short summary of the dialog and its current state. + /// + + [JsonPropertyName("summary")] + public V1CommonContent_ContentValue Summary { get; set; } + + /// + /// The title of the dialog. + /// + + [JsonPropertyName("title")] + public V1CommonContent_ContentValue Title { get; set; } + + } + + [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "14.2.0.0 (NJsonSchema v11.1.0.0 (Newtonsoft.Json v13.0.0.0))")] + public partial class V1EndUserDialogsQueriesGet_Dialog + { + /// + /// An immutable list of activities associated with the dialog. + /// + + [JsonPropertyName("activities")] + public ICollection Activities { get; set; } + + /// + /// The API actions associated with the dialog. Should be used in specialized, non-browser-based integrations. + /// + + [JsonPropertyName("apiActions")] + public ICollection ApiActions { get; set; } + + /// + /// The attachments associated with the dialog (on an aggregate level). + /// + + [JsonPropertyName("attachments")] + public ICollection Attachments { get; set; } + + /// + /// The dialog unstructured text content. + /// + + [JsonPropertyName("content")] + public V1EndUserDialogsQueriesGet_Content Content { get; set; } + + /// + /// The date and time when the dialog was created. + /// + + [JsonPropertyName("createdAt")] + public System.DateTimeOffset CreatedAt { get; set; } + + /// + /// The dialog token. May be used (if supported) against external URLs referred to in this dialog's apiActions, + ///
transmissions or attachments. It should also be used for front-channel embeds. + ///
+ + [JsonPropertyName("dialogToken")] + public string DialogToken { get; set; } + + /// + /// The due date for the dialog. Dialogs past due date might be marked as such in frontends but will still be available. + /// + + [JsonPropertyName("dueAt")] + public System.DateTimeOffset? DueAt { get; set; } + + /// + /// The expiration date for the dialog. This is the last date when the dialog is available for the end user. + ///
+ ///
After this date is passed, the dialog will be considered expired and no longer available for the end user in any + ///
API. If not supplied, the dialog will be considered to never expire. This field can be changed by the service + ///
owner after the dialog has been created. + ///
+ + [JsonPropertyName("expiresAt")] + public System.DateTimeOffset? ExpiresAt { get; set; } + + /// + /// Arbitrary string with a service-specific indicator of status, typically used to indicate a fine-grained state of + ///
the dialog to further specify the "status" enum. + ///
+ ///
Refer to the service-specific documentation provided by the service owner for details on the possible values (if + ///
in use). + ///
+ + [JsonPropertyName("extendedStatus")] + public string ExtendedStatus { get; set; } + + /// + /// Arbitrary string with a service-specific reference to an external system or service. + ///
+ ///
Refer to the service-specific documentation provided by the service owner for details (if in use). + ///
+ + [JsonPropertyName("externalReference")] + public string ExternalReference { get; set; } + + /// + /// The GUI actions associated with the dialog. Should be used in browser-based interactive frontends. + /// + + [JsonPropertyName("guiActions")] + public ICollection GuiActions { get; set; } + + /// + /// The unique identifier for the dialog in UUIDv7 format. + /// + + [JsonPropertyName("id")] + public System.Guid Id { get; set; } + + /// + /// The service owner code representing the organization (service owner) related to this dialog. + /// + + [JsonPropertyName("org")] + public string Org { get; set; } + + /// + /// The party code representing the organization or person that the dialog belongs to in URN format. + /// + + [JsonPropertyName("party")] + public string Party { get; set; } + + /// + /// Optional preceding process identifier to indicate the business process that preceded the process indicated in the "Process" field. Cannot be set without also "Process" being set. + /// + + [JsonPropertyName("precedingProcess")] + public string PrecedingProcess { get; set; } + + /// + /// Optional process identifier used to indicate a business process this dialog belongs to. + /// + + [JsonPropertyName("process")] + public string Process { get; set; } + + /// + /// Advisory indicator of progress, represented as 1-100 percentage value. 100% representing a dialog that has come + ///
to a natural completion (successful or not). + ///
+ + [JsonPropertyName("progress")] + public int? Progress { get; set; } + + /// + /// The unique identifier for the revision in UUIDv4 format. + /// + + [JsonPropertyName("revision")] + public System.Guid Revision { get; set; } + + /// + /// The list of seen log entries for the dialog newer than the dialog ChangedAt date. + /// + + [JsonPropertyName("seenSinceLastUpdate")] + public ICollection SeenSinceLastUpdate { get; set; } + + /// + /// The service identifier for the service that the dialog is related to in URN-format. + ///
This corresponds to a service resource in the Altinn Resource Registry. + ///
+ + [JsonPropertyName("serviceResource")] + public string ServiceResource { get; set; } + + /// + /// The ServiceResource type, as defined in Altinn Resource Registry (see ResourceType). + /// + + [JsonPropertyName("serviceResourceType")] + public string ServiceResourceType { get; set; } + + /// + /// The aggregated status of the dialog. + /// + + [JsonPropertyName("status")] + [JsonConverter(typeof(JsonStringEnumConverter))] + public DialogsEntities_DialogStatus Status { get; set; } + + /// + /// Current display state. + /// + + [JsonPropertyName("systemLabel")] + [JsonConverter(typeof(JsonStringEnumConverter))] + public DialogEndUserContextsEntities_SystemLabel SystemLabel { get; set; } + + /// + /// The immutable list of transmissions associated with the dialog. + /// + + [JsonPropertyName("transmissions")] + public ICollection Transmissions { get; set; } + + /// + /// The date and time when the dialog was last updated. + /// + + [JsonPropertyName("updatedAt")] + public System.DateTimeOffset UpdatedAt { get; set; } + + } + + [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "14.2.0.0 (NJsonSchema v11.1.0.0 (Newtonsoft.Json v13.0.0.0))")] + public partial class V1EndUserDialogsQueriesGet_DialogActivity + { + /// + /// The date and time when the activity was created. + /// + + [JsonPropertyName("createdAt")] + public System.DateTimeOffset? CreatedAt { get; set; } + + /// + /// Unstructured text describing the activity. Only set if the activity type is "Information". + /// + + [JsonPropertyName("description")] + public ICollection Description { get; set; } + + /// + /// An arbitrary URI/URN with a service-specific activity type. + ///
+ ///
Consult the service-specific documentation provided by the service owner for details (if in use). + ///
+ + [JsonPropertyName("extendedType")] + public System.Uri ExtendedType { get; set; } + + /// + /// The unique identifier for the activity in UUIDv7 format. + /// + + [JsonPropertyName("id")] + public System.Guid Id { get; set; } + + /// + /// The actor that performed the activity. + /// + + [JsonPropertyName("performedBy")] + public V1EndUserCommonActors_Actor PerformedBy { get; set; } + + /// + /// If the activity is related to a particular transmission, this field will contain the transmission identifier. + /// + + [JsonPropertyName("transmissionId")] + public System.Guid? TransmissionId { get; set; } + + /// + /// The type of activity. + /// + + [JsonPropertyName("type")] + [JsonConverter(typeof(JsonStringEnumConverter))] + public DialogsEntitiesActivities_DialogActivityType Type { get; set; } + + } + + [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "14.2.0.0 (NJsonSchema v11.1.0.0 (Newtonsoft.Json v13.0.0.0))")] + public partial class V1EndUserDialogsQueriesGet_DialogApiAction + { + /// + /// String identifier for the action, corresponding to the "action" attributeId used in the XACML service policy, + ///
which by default is the policy belonging to the service referred to by "serviceResource" in the dialog. + ///
+ + [JsonPropertyName("action")] + public string Action { get; set; } + + /// + /// Contains an authorization resource attributeId, that can used in custom authorization rules in the XACML service + ///
policy, which by default is the policy belonging to the service referred to by "serviceResource" in the dialog. + ///
+ ///
Can also be used to refer to other service policies. + ///
+ + [JsonPropertyName("authorizationAttribute")] + public string AuthorizationAttribute { get; set; } + + /// + /// The endpoints associated with the action. + /// + + [JsonPropertyName("endpoints")] + public ICollection Endpoints { get; set; } + + /// + /// The unique identifier for the action in UUIDv7 format. + /// + + [JsonPropertyName("id")] + public System.Guid Id { get; set; } + + /// + /// True if the authenticated user is authorized for this action. If not, the action will not be available + ///
and all endpoints will be replaced with a fixed placeholder. + ///
+ + [JsonPropertyName("isAuthorized")] + public bool IsAuthorized { get; set; } + + } + + [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "14.2.0.0 (NJsonSchema v11.1.0.0 (Newtonsoft.Json v13.0.0.0))")] + public partial class V1EndUserDialogsQueriesGet_DialogApiActionEndpoint + { + /// + /// Boolean indicating if the endpoint is deprecated. Integrators should migrate to endpoints with a higher version. + /// + + [JsonPropertyName("deprecated")] + public bool Deprecated { get; set; } + + /// + /// Link to service provider documentation for the endpoint. Used for service owners to provide documentation for + ///
integrators. Should be a URL to a human-readable page. + ///
+ + [JsonPropertyName("documentationUrl")] + public System.Uri DocumentationUrl { get; set; } + + /// + /// The HTTP method that the endpoint expects for this action. + /// + + [JsonPropertyName("httpMethod")] + [JsonConverter(typeof(JsonStringEnumConverter))] + public Http_HttpVerb HttpMethod { get; set; } + + /// + /// The unique identifier for the endpoint in UUIDv7 format. + /// + + [JsonPropertyName("id")] + public System.Guid Id { get; set; } + + /// + /// Link to the request schema for the endpoint. Used by service owners to provide documentation for integrators. + ///
Dialogporten will not validate information on this endpoint. + ///
+ + [JsonPropertyName("requestSchema")] + public System.Uri RequestSchema { get; set; } + + /// + /// Link to the response schema for the endpoint. Used for service owners to provide documentation for integrators. + ///
Dialogporten will not validate information on this endpoint. + ///
+ + [JsonPropertyName("responseSchema")] + public System.Uri ResponseSchema { get; set; } + + /// + /// Date and time when the service owner has indicated that endpoint will no longer function. Only set if the endpoint + ///
is deprecated. Dialogporten will not enforce this date. + ///
+ + [JsonPropertyName("sunsetAt")] + public System.DateTimeOffset? SunsetAt { get; set; } + + /// + /// The fully qualified URL of the API endpoint. Will be set to "urn:dialogporten:unauthorized" if the user is + ///
not authorized to perform the action. + ///
+ + [JsonPropertyName("url")] + public System.Uri Url { get; set; } + + /// + /// Arbitrary string indicating the version of the endpoint. + ///
+ ///
Consult the service-specific documentation provided by the service owner for details (if in use). + ///
+ + [JsonPropertyName("version")] + public string Version { get; set; } + + } + + [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "14.2.0.0 (NJsonSchema v11.1.0.0 (Newtonsoft.Json v13.0.0.0))")] + public partial class V1EndUserDialogsQueriesGet_DialogAttachment + { + /// + /// The display name of the attachment that should be used in GUIs. + /// + + [JsonPropertyName("displayName")] + public ICollection DisplayName { get; set; } + + /// + /// The unique identifier for the attachment in UUIDv7 format. + /// + + [JsonPropertyName("id")] + public System.Guid Id { get; set; } + + /// + /// The URLs associated with the attachment, each referring to a different representation of the attachment. + /// + + [JsonPropertyName("urls")] + public ICollection Urls { get; set; } + + } + + [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "14.2.0.0 (NJsonSchema v11.1.0.0 (Newtonsoft.Json v13.0.0.0))")] + public partial class V1EndUserDialogsQueriesGet_DialogAttachmentUrl + { + /// + /// What type of consumer the URL is intended for. + /// + + [JsonPropertyName("consumerType")] + [JsonConverter(typeof(JsonStringEnumConverter))] + public Attachments_AttachmentUrlConsumerType ConsumerType { get; set; } + + /// + /// The unique identifier for the attachment URL in UUIDv7 format. + /// + + [JsonPropertyName("id")] + public System.Guid Id { get; set; } + + /// + /// The media type of the attachment. + /// + + [JsonPropertyName("mediaType")] + public string MediaType { get; set; } + + /// + /// The fully qualified URL of the attachment. + /// + + [JsonPropertyName("url")] + public System.Uri Url { get; set; } + + } + + [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "14.2.0.0 (NJsonSchema v11.1.0.0 (Newtonsoft.Json v13.0.0.0))")] + public partial class V1EndUserDialogsQueriesGet_DialogGuiAction + { + /// + /// The action identifier for the action, corresponding to the "action" attributeId used in the XACML service policy. + /// + + [JsonPropertyName("action")] + public string Action { get; set; } + + /// + /// Contains an authorization resource attributeId, that can used in custom authorization rules in the XACML service + ///
policy, which by default is the policy belonging to the service referred to by "serviceResource" in the dialog. + ///
+ ///
Can also be used to refer to other service policies. + ///
+ + [JsonPropertyName("authorizationAttribute")] + public string AuthorizationAttribute { get; set; } + + /// + /// The HTTP method that the frontend should use when redirecting the user. + /// + + [JsonPropertyName("httpMethod")] + [JsonConverter(typeof(JsonStringEnumConverter))] + public Http_HttpVerb HttpMethod { get; set; } + + /// + /// The unique identifier for the action in UUIDv7 format. + /// + + [JsonPropertyName("id")] + public System.Guid Id { get; set; } + + /// + /// Whether the user is authorized to perform the action. + /// + + [JsonPropertyName("isAuthorized")] + public bool IsAuthorized { get; set; } + + /// + /// Indicates whether the action results in the dialog being deleted. Used by frontends to implement custom UX + ///
for delete actions. + ///
+ + [JsonPropertyName("isDeleteDialogAction")] + public bool IsDeleteDialogAction { get; set; } + + /// + /// Indicates a priority for the action, making it possible for frontends to adapt GUI elements based on action + ///
priority. + ///
+ + [JsonPropertyName("priority")] + [JsonConverter(typeof(JsonStringEnumConverter))] + public DialogsEntitiesActions_DialogGuiActionPriority Priority { get; set; } + + /// + /// If there should be a prompt asking the user for confirmation before the action is executed, + ///
this field should contain the prompt text. + ///
+ + [JsonPropertyName("prompt")] + public ICollection Prompt { get; set; } + + /// + /// The title of the action, this should be short and in verb form. + /// + + [JsonPropertyName("title")] + public ICollection Title { get; set; } + + /// + /// The fully qualified URL of the action, to which the user will be redirected when the action is triggered. Will be set to + ///
"urn:dialogporten:unauthorized" if the user is not authorized to perform the action. + ///
+ + [JsonPropertyName("url")] + public System.Uri Url { get; set; } + + } + + [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "14.2.0.0 (NJsonSchema v11.1.0.0 (Newtonsoft.Json v13.0.0.0))")] + public partial class V1EndUserDialogsQueriesGet_DialogSeenLog + { + /// + /// The unique identifier for the seen log entry in UUIDv7 format. + /// + + [JsonPropertyName("id")] + public System.Guid Id { get; set; } + + /// + /// Flag indicating whether the seen log entry was created by the current end user. + /// + + [JsonPropertyName("isCurrentEndUser")] + public bool IsCurrentEndUser { get; set; } + + /// + /// Flag indicating whether the seen log entry was created via the service owner. + ///
+ ///
This is used when the service owner uses the service owner API to implement its own frontend. + ///
+ + [JsonPropertyName("isViaServiceOwner")] + public bool? IsViaServiceOwner { get; set; } + + /// + /// The timestamp when the dialog revision was seen. + /// + + [JsonPropertyName("seenAt")] + public System.DateTimeOffset SeenAt { get; set; } + + /// + /// The actor that saw the dialog revision. + /// + + [JsonPropertyName("seenBy")] + public V1EndUserCommonActors_Actor SeenBy { get; set; } + + } + + [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "14.2.0.0 (NJsonSchema v11.1.0.0 (Newtonsoft.Json v13.0.0.0))")] + public partial class V1EndUserDialogsQueriesGet_DialogTransmission + { + /// + /// The transmission-level attachments. + /// + + [JsonPropertyName("attachments")] + public ICollection Attachments { get; set; } + + /// + /// Contains an authorization resource attributeId, that can used in custom authorization rules in the XACML service + ///
policy, which by default is the policy belonging to the service referred to by "serviceResource" in the dialog. + ///
+ ///
Can also be used to refer to other service policies. + ///
+ + [JsonPropertyName("authorizationAttribute")] + public string AuthorizationAttribute { get; set; } + + /// + /// The transmission unstructured text content. + /// + + [JsonPropertyName("content")] + public V1EndUserDialogsQueriesGet_DialogTransmissionContent Content { get; set; } + + /// + /// The date and time when the transmission was created. + /// + + [JsonPropertyName("createdAt")] + public System.DateTimeOffset CreatedAt { get; set; } + + /// + /// Arbitrary URI/URN describing a service-specific transmission type. + ///
+ ///
Refer to the service-specific documentation provided by the service owner for details (if in use). + ///
+ + [JsonPropertyName("extendedType")] + public System.Uri ExtendedType { get; set; } + + /// + /// The unique identifier for the transmission in UUIDv7 format. + /// + + [JsonPropertyName("id")] + public System.Guid Id { get; set; } + + /// + /// Flag indicating if the authenticated user is authorized for this transmission. If not, embedded content and + ///
the attachments will not be available. + ///
+ + [JsonPropertyName("isAuthorized")] + public bool IsAuthorized { get; set; } + + /// + /// Reference to any other transmission that this transmission is related to. + /// + + [JsonPropertyName("relatedTransmissionId")] + public System.Guid? RelatedTransmissionId { get; set; } + + /// + /// The actor that sent the transmission. + /// + + [JsonPropertyName("sender")] + public V1EndUserCommonActors_Actor Sender { get; set; } + + /// + /// The type of transmission. + /// + + [JsonPropertyName("type")] + [JsonConverter(typeof(JsonStringEnumConverter))] + public DialogsEntitiesTransmissions_DialogTransmissionType Type { get; set; } + + } + + [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "14.2.0.0 (NJsonSchema v11.1.0.0 (Newtonsoft.Json v13.0.0.0))")] + public partial class V1EndUserDialogsQueriesGet_DialogTransmissionAttachment + { + /// + /// The display name of the attachment that should be used in GUIs. + /// + + [JsonPropertyName("displayName")] + public ICollection DisplayName { get; set; } + + /// + /// The unique identifier for the attachment in UUIDv7 format. + /// + + [JsonPropertyName("id")] + public System.Guid Id { get; set; } + + /// + /// The URLs associated with the attachment, each referring to a different representation of the attachment. + /// + + [JsonPropertyName("urls")] + public ICollection Urls { get; set; } + + } + + [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "14.2.0.0 (NJsonSchema v11.1.0.0 (Newtonsoft.Json v13.0.0.0))")] + public partial class V1EndUserDialogsQueriesGet_DialogTransmissionAttachmentUrl + { + /// + /// The type of consumer the URL is intended for. + /// + + [JsonPropertyName("consumerType")] + [JsonConverter(typeof(JsonStringEnumConverter))] + public Attachments_AttachmentUrlConsumerType ConsumerType { get; set; } + + /// + /// The media type of the attachment. + /// + + [JsonPropertyName("mediaType")] + public string MediaType { get; set; } + + /// + /// The fully qualified URL of the attachment. Will be set to "urn:dialogporten:unauthorized" if the user is + ///
not authorized to access the transmission. + ///
+ + [JsonPropertyName("url")] + public System.Uri Url { get; set; } + + } + + [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "14.2.0.0 (NJsonSchema v11.1.0.0 (Newtonsoft.Json v13.0.0.0))")] + public partial class V1EndUserDialogsQueriesGet_DialogTransmissionContent + { + /// + /// Front-channel embedded content. Used to dynamically embed content in the frontend from an external URL. + ///
Allowed media types: application/vnd.dialogporten.frontchannelembed+json;type=markdown + ///
+ + [JsonPropertyName("contentReference")] + public V1CommonContent_ContentValue ContentReference { get; set; } + + /// + /// The transmission summary. + /// + + [JsonPropertyName("summary")] + public V1CommonContent_ContentValue Summary { get; set; } + + /// + /// The transmission title. + /// + + [JsonPropertyName("title")] + public V1CommonContent_ContentValue Title { get; set; } + + } + + [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "14.2.0.0 (NJsonSchema v11.1.0.0 (Newtonsoft.Json v13.0.0.0))")] + public partial class V1EndUserDialogsQueriesSearch_Content + { + /// + /// Used as the human-readable label used to describe the "ExtendedStatus" field. + /// + + [JsonPropertyName("extendedStatus")] + public V1CommonContent_ContentValue ExtendedStatus { get; set; } + + /// + /// Overridden sender name. If not supplied, assume "org" as the sender name. + /// + + [JsonPropertyName("senderName")] + public V1CommonContent_ContentValue SenderName { get; set; } + + /// + /// A short summary of the dialog and its current state. + /// + + [JsonPropertyName("summary")] + public V1CommonContent_ContentValue Summary { get; set; } + + /// + /// The title of the dialog. + /// + + [JsonPropertyName("title")] + public V1CommonContent_ContentValue Title { get; set; } + + } + + [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "14.2.0.0 (NJsonSchema v11.1.0.0 (Newtonsoft.Json v13.0.0.0))")] + public partial class V1EndUserDialogsQueriesSearch_Dialog + { + /// + /// The content of the dialog in search results. + /// + + [JsonPropertyName("content")] + public V1EndUserDialogsQueriesSearch_Content Content { get; set; } + + /// + /// The date and time when the dialog was created. + /// + + [JsonPropertyName("createdAt")] + public System.DateTimeOffset CreatedAt { get; set; } + + /// + /// The due date for the dialog. This is the last date when the dialog is expected to be completed. + /// + + [JsonPropertyName("dueAt")] + public System.DateTimeOffset? DueAt { get; set; } + + /// + /// Arbitrary string with a service-specific indicator of status, typically used to indicate a fine-grained state of + ///
the dialog to further specify the "status" enum. + ///
+ ///
Refer to the service-specific documentation provided by the service owner for details on the possible values (if + ///
in use). + ///
+ + [JsonPropertyName("extendedStatus")] + public string ExtendedStatus { get; set; } + + /// + /// Arbitrary string with a service-specific reference to an external system or service. + ///
+ ///
Refer to the service-specific documentation provided by the service owner for details (if in use). + ///
+ + [JsonPropertyName("externalReference")] + public string ExternalReference { get; set; } + + /// + /// The number of attachments in the dialog made available for browser-based frontends. + /// + + [JsonPropertyName("guiAttachmentCount")] + public int? GuiAttachmentCount { get; set; } + + /// + /// The unique identifier for the dialog in UUIDv7 format. + /// + + [JsonPropertyName("id")] + public System.Guid Id { get; set; } + + /// + /// The latest entry in the dialog's activity log. + /// + + [JsonPropertyName("latestActivity")] + public V1EndUserDialogsQueriesSearch_DialogActivity LatestActivity { get; set; } + + /// + /// The service owner code representing the organization (service owner) related to this dialog. + /// + + [JsonPropertyName("org")] + public string Org { get; set; } + + /// + /// The party code representing the organization or person that the dialog belongs to in URN format. + /// + + [JsonPropertyName("party")] + public string Party { get; set; } + + /// + /// Optional preceding process identifier to indicate the business process that preceded the process indicated in the "Process" field. Cannot be set without also "Process" being set. + /// + + [JsonPropertyName("precedingProcess")] + public string PrecedingProcess { get; set; } + + /// + /// Optional process identifier used to indicate a business process this dialog belongs to. + /// + + [JsonPropertyName("process")] + public string Process { get; set; } + + /// + /// Advisory indicator of progress, represented as 1-100 percentage value. 100% representing a dialog that has come + ///
to a natural completion (successful or not). + ///
+ + [JsonPropertyName("progress")] + public int? Progress { get; set; } + + /// + /// The list of seen log entries for the dialog newer than the dialog ChangedAt date. + /// + + [JsonPropertyName("seenSinceLastUpdate")] + public ICollection SeenSinceLastUpdate { get; set; } + + /// + /// The service identifier for the service that the dialog is related to in URN-format. + ///
This corresponds to a service resource in the Altinn Resource Registry. + ///
+ + [JsonPropertyName("serviceResource")] + public string ServiceResource { get; set; } + + /// + /// The ServiceResource type, as defined in Altinn Resource Registry (see ResourceType). + /// + + [JsonPropertyName("serviceResourceType")] + public string ServiceResourceType { get; set; } + + /// + /// The aggregated status of the dialog. + /// + + [JsonPropertyName("status")] + [JsonConverter(typeof(JsonStringEnumConverter))] + public DialogsEntities_DialogStatus Status { get; set; } + + /// + /// Current display state. + /// + + [JsonPropertyName("systemLabel")] + [JsonConverter(typeof(JsonStringEnumConverter))] + public DialogEndUserContextsEntities_SystemLabel SystemLabel { get; set; } + + /// + /// The date and time when the dialog was last updated. + /// + + [JsonPropertyName("updatedAt")] + public System.DateTimeOffset UpdatedAt { get; set; } + + } + + [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "14.2.0.0 (NJsonSchema v11.1.0.0 (Newtonsoft.Json v13.0.0.0))")] + public partial class V1EndUserDialogsQueriesSearch_DialogActivity + { + /// + /// The date and time when the activity was created. + /// + + [JsonPropertyName("createdAt")] + public System.DateTimeOffset? CreatedAt { get; set; } + + /// + /// Unstructured text describing the activity. Only set if the activity type is "Information". + /// + + [JsonPropertyName("description")] + public ICollection Description { get; set; } + + /// + /// An arbitrary string with a service-specific activity type. + ///
+ ///
Consult the service-specific documentation provided by the service owner for details (if in use). + ///
+ + [JsonPropertyName("extendedType")] + public System.Uri ExtendedType { get; set; } + + /// + /// The unique identifier for the activity in UUIDv7 format. + /// + + [JsonPropertyName("id")] + public System.Guid Id { get; set; } + + /// + /// The actor that performed the activity. + /// + + [JsonPropertyName("performedBy")] + public V1EndUserCommonActors_Actor PerformedBy { get; set; } + + /// + /// If the activity is related to a particular transmission, this field will contain the transmission identifier. + /// + + [JsonPropertyName("transmissionId")] + public System.Guid? TransmissionId { get; set; } + + /// + /// The type of activity. + /// + + [JsonPropertyName("type")] + [JsonConverter(typeof(JsonStringEnumConverter))] + public DialogsEntitiesActivities_DialogActivityType Type { get; set; } + + } + + [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "14.2.0.0 (NJsonSchema v11.1.0.0 (Newtonsoft.Json v13.0.0.0))")] + public partial class V1EndUserDialogsQueriesSearch_DialogSeenLog + { + /// + /// The unique identifier for the seen log entry in UUIDv7 format. + /// + + [JsonPropertyName("id")] + public System.Guid Id { get; set; } + + /// + /// Flag indicating whether the seen log entry was created by the current end user. + /// + + [JsonPropertyName("isCurrentEndUser")] + public bool IsCurrentEndUser { get; set; } + + /// + /// Flag indicating whether the seen log entry was created via the service owner. + ///
+ ///
This is used when the service owner uses the service owner API to implement its own frontend. + ///
+ + [JsonPropertyName("isViaServiceOwner")] + public bool? IsViaServiceOwner { get; set; } + + /// + /// The timestamp when the dialog revision was seen. + /// + + [JsonPropertyName("seenAt")] + public System.DateTimeOffset SeenAt { get; set; } + + /// + /// The actor that saw the dialog revision. + /// + + [JsonPropertyName("seenBy")] + public V1EndUserCommonActors_Actor SeenBy { get; set; } + + } + + [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "14.2.0.0 (NJsonSchema v11.1.0.0 (Newtonsoft.Json v13.0.0.0))")] + public partial class V1EndUserDialogSystemLabelsCommandsSet_SystemLabelCommand + { + + [JsonPropertyName("ifMatchDialogRevision")] + public System.Guid? IfMatchDialogRevision { get; set; } + + [JsonPropertyName("label")] + [JsonConverter(typeof(JsonStringEnumConverter))] + public DialogEndUserContextsEntities_SystemLabel Label { get; set; } + + } + + [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "14.2.0.0 (NJsonSchema v11.1.0.0 (Newtonsoft.Json v13.0.0.0))")] + public partial class V1EndUserDialogTransmissionsQueriesGet_Attachment + { + /// + /// The display name of the attachment that should be used in GUIs. + /// + + [JsonPropertyName("displayName")] + public ICollection DisplayName { get; set; } + + /// + /// The unique identifier for the attachment in UUIDv7 format. + /// + + [JsonPropertyName("id")] + public System.Guid Id { get; set; } + + /// + /// The URLs associated with the attachment, each referring to a different representation of the attachment. + /// + + [JsonPropertyName("urls")] + public ICollection Urls { get; set; } + + } + + [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "14.2.0.0 (NJsonSchema v11.1.0.0 (Newtonsoft.Json v13.0.0.0))")] + public partial class V1EndUserDialogTransmissionsQueriesGet_AttachmentUrl + { + /// + /// The type of consumer the URL is intended for. + /// + + [JsonPropertyName("consumerType")] + [JsonConverter(typeof(JsonStringEnumConverter))] + public Attachments_AttachmentUrlConsumerType ConsumerType { get; set; } + + /// + /// The unique identifier for the attachment URL in UUIDv7 format. + /// + + [JsonPropertyName("id")] + public System.Guid Id { get; set; } + + /// + /// The media type of the attachment. + /// + + [JsonPropertyName("mediaType")] + public string MediaType { get; set; } + + /// + /// The fully qualified URL of the attachment. Will be set to "urn:dialogporten:unauthorized" if the user is + ///
not authorized to access the transmission. + ///
+ + [JsonPropertyName("url")] + public System.Uri Url { get; set; } + + } + + [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "14.2.0.0 (NJsonSchema v11.1.0.0 (Newtonsoft.Json v13.0.0.0))")] + public partial class V1EndUserDialogTransmissionsQueriesGet_Content + { + /// + /// Front-channel embedded content. Used to dynamically embed content in the frontend from an external URL. + ///
Allowed media types: application/vnd.dialogporten.frontchannelembed+json;type=markdown + ///
+ + [JsonPropertyName("contentReference")] + public V1CommonContent_ContentValue ContentReference { get; set; } + + /// + /// The summary of the content. + /// + + [JsonPropertyName("summary")] + public V1CommonContent_ContentValue Summary { get; set; } + + /// + /// The title of the content. + /// + + [JsonPropertyName("title")] + public V1CommonContent_ContentValue Title { get; set; } + + } + + [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "14.2.0.0 (NJsonSchema v11.1.0.0 (Newtonsoft.Json v13.0.0.0))")] + public partial class V1EndUserDialogTransmissionsQueriesGet_Transmission + { + /// + /// The attachments associated with the transmission. + /// + + [JsonPropertyName("attachments")] + public ICollection Attachments { get; set; } + + /// + /// The authorization attribute associated with the transmission. + /// + + [JsonPropertyName("authorizationAttribute")] + public string AuthorizationAttribute { get; set; } + + /// + /// The content of the transmission. + /// + + [JsonPropertyName("content")] + public V1EndUserDialogTransmissionsQueriesGet_Content Content { get; set; } + + /// + /// The date and time when the transmission was created. + /// + + [JsonPropertyName("createdAt")] + public System.DateTimeOffset CreatedAt { get; set; } + + /// + /// The date and time when the transmission was deleted, if applicable. + /// + + [JsonPropertyName("deletedAt")] + public System.DateTimeOffset? DeletedAt { get; set; } + + /// + /// The extended type URI for the transmission. + /// + + [JsonPropertyName("extendedType")] + public System.Uri ExtendedType { get; set; } + + /// + /// The unique identifier for the transmission in UUIDv7 format. + /// + + [JsonPropertyName("id")] + public System.Guid Id { get; set; } + + /// + /// Flag indicating if the authenticated user is authorized for this transmission. If not, embedded content and + ///
the attachments will not be available. + ///
+ + [JsonPropertyName("isAuthorized")] + public bool IsAuthorized { get; set; } + + /// + /// The unique identifier for the related transmission, if any. + /// + + [JsonPropertyName("relatedTransmissionId")] + public System.Guid? RelatedTransmissionId { get; set; } + + /// + /// The sender actor information for the transmission. + /// + + [JsonPropertyName("sender")] + public V1EndUserCommonActors_Actor Sender { get; set; } + + /// + /// The type of the transmission. + /// + + [JsonPropertyName("type")] + [JsonConverter(typeof(JsonStringEnumConverter))] + public DialogsEntitiesTransmissions_DialogTransmissionType Type { get; set; } + + } + + [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "14.2.0.0 (NJsonSchema v11.1.0.0 (Newtonsoft.Json v13.0.0.0))")] + public partial class V1EndUserDialogTransmissionsQueriesSearch_Attachment + { + /// + /// The display name of the attachment that should be used in GUIs. + /// + + [JsonPropertyName("displayName")] + public ICollection DisplayName { get; set; } + + /// + /// The unique identifier for the attachment in UUIDv7 format. + /// + + [JsonPropertyName("id")] + public System.Guid Id { get; set; } + + /// + /// The URLs associated with the attachment, each referring to a different representation of the attachment. + /// + + [JsonPropertyName("urls")] + public ICollection Urls { get; set; } + + } + + [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "14.2.0.0 (NJsonSchema v11.1.0.0 (Newtonsoft.Json v13.0.0.0))")] + public partial class V1EndUserDialogTransmissionsQueriesSearch_AttachmentUrl + { + /// + /// The type of consumer the URL is intended for. + /// + + [JsonPropertyName("consumerType")] + [JsonConverter(typeof(JsonStringEnumConverter))] + public Attachments_AttachmentUrlConsumerType ConsumerType { get; set; } + + /// + /// The unique identifier for the attachment URL in UUIDv7 format. + /// + + [JsonPropertyName("id")] + public System.Guid Id { get; set; } + + /// + /// The media type of the attachment. + /// + + [JsonPropertyName("mediaType")] + public string MediaType { get; set; } + + /// + /// The fully qualified URL of the attachment. Will be set to "urn:dialogporten:unauthorized" if the user is + ///
not authorized to access the transmission. + ///
+ + [JsonPropertyName("url")] + public System.Uri Url { get; set; } + + } + + [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "14.2.0.0 (NJsonSchema v11.1.0.0 (Newtonsoft.Json v13.0.0.0))")] + public partial class V1EndUserDialogTransmissionsQueriesSearch_Content + { + /// + /// Front-channel embedded content. Used to dynamically embed content in the frontend from an external URL. + ///
Allowed media types: application/vnd.dialogporten.frontchannelembed+json;type=markdown + ///
+ + [JsonPropertyName("contentReference")] + public V1CommonContent_ContentValue ContentReference { get; set; } + + /// + /// The summary of the content. + /// + + [JsonPropertyName("summary")] + public V1CommonContent_ContentValue Summary { get; set; } + + /// + /// The title of the content. + /// + + [JsonPropertyName("title")] + public V1CommonContent_ContentValue Title { get; set; } + + } + + [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "14.2.0.0 (NJsonSchema v11.1.0.0 (Newtonsoft.Json v13.0.0.0))")] + public partial class V1EndUserDialogTransmissionsQueriesSearch_Transmission + { + /// + /// The attachments associated with the transmission. + /// + + [JsonPropertyName("attachments")] + public ICollection Attachments { get; set; } + + /// + /// The authorization attribute associated with the transmission. + /// + + [JsonPropertyName("authorizationAttribute")] + public string AuthorizationAttribute { get; set; } + + /// + /// The content of the transmission. + /// + + [JsonPropertyName("content")] + public V1EndUserDialogTransmissionsQueriesSearch_Content Content { get; set; } + + /// + /// The date and time when the transmission was created. + /// + + [JsonPropertyName("createdAt")] + public System.DateTimeOffset CreatedAt { get; set; } + + /// + /// The date and time when the transmission was deleted, if applicable. + /// + + [JsonPropertyName("deletedAt")] + public System.DateTimeOffset? DeletedAt { get; set; } + + /// + /// The extended type URI for the transmission. + /// + + [JsonPropertyName("extendedType")] + public System.Uri ExtendedType { get; set; } + + /// + /// The unique identifier for the transmission in UUIDv7 format. + /// + + [JsonPropertyName("id")] + public System.Guid Id { get; set; } + + /// + /// Flag indicating if the authenticated user is authorized for this transmission. If not, embedded content and + ///
the attachments will not be available. + ///
+ + [JsonPropertyName("isAuthorized")] + public bool IsAuthorized { get; set; } + + /// + /// The unique identifier for the related transmission, if any. + /// + + [JsonPropertyName("relatedTransmissionId")] + public System.Guid? RelatedTransmissionId { get; set; } + + /// + /// The sender actor information for the transmission. + /// + + [JsonPropertyName("sender")] + public V1EndUserCommonActors_Actor Sender { get; set; } + + /// + /// The type of the transmission. + /// + + [JsonPropertyName("type")] + [JsonConverter(typeof(JsonStringEnumConverter))] + public DialogsEntitiesTransmissions_DialogTransmissionType Type { get; set; } + + } + + [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "14.2.0.0 (NJsonSchema v11.1.0.0 (Newtonsoft.Json v13.0.0.0))")] + public partial class V1EndUserPartiesQueriesGet_AuthorizedParty + { + + [JsonPropertyName("hasKeyRole")] + public bool HasKeyRole { get; set; } + + [JsonPropertyName("hasOnlyAccessToSubParties")] + public bool HasOnlyAccessToSubParties { get; set; } + + [JsonPropertyName("isAccessManager")] + public bool IsAccessManager { get; set; } + + [JsonPropertyName("isCurrentEndUser")] + public bool IsCurrentEndUser { get; set; } + + [JsonPropertyName("isDeleted")] + public bool IsDeleted { get; set; } + + [JsonPropertyName("isMainAdministrator")] + public bool IsMainAdministrator { get; set; } + + [JsonPropertyName("name")] + public string Name { get; set; } + + [JsonPropertyName("party")] + public string Party { get; set; } + + [JsonPropertyName("partyType")] + public string PartyType { get; set; } + + [JsonPropertyName("subParties")] + public ICollection SubParties { get; set; } + + } + + [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "14.2.0.0 (NJsonSchema v11.1.0.0 (Newtonsoft.Json v13.0.0.0))")] + public partial class V1EndUserPartiesQueriesGet_Parties + { + + [JsonPropertyName("authorizedParties")] + public ICollection AuthorizedParties { get; set; } + + } + + [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "14.2.0.0 (NJsonSchema v11.1.0.0 (Newtonsoft.Json v13.0.0.0))")] + public partial class V1ServiceOwnerCommonActors_Actor + { + /// + /// The identifier of the person or organization that sent the transmission. Mutually exclusive with ActorName. + ///
Might be omitted if ActorType is "ServiceOwner". + ///
+ + [JsonPropertyName("actorId")] + public string ActorId { get; set; } + + /// + /// Specifies the name of the entity that sent the transmission. Mutually exclusive with ActorId. If ActorId + ///
is supplied, the name will be automatically populated from the name registries. + ///
+ + [JsonPropertyName("actorName")] + public string ActorName { get; set; } + + /// + /// The type of actor that sent the transmission. + /// + + [JsonPropertyName("actorType")] + [JsonConverter(typeof(JsonStringEnumConverter))] + public Actors_ActorType ActorType { get; set; } + + } + + [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "14.2.0.0 (NJsonSchema v11.1.0.0 (Newtonsoft.Json v13.0.0.0))")] + public partial class V1ServiceOwnerDialogActivitiesCreate_ActivityRequest + { + /// + /// If supplied, overrides the creating date and time for the transmission. + ///
If not supplied, the current date /time will be used. + ///
+ + [JsonPropertyName("createdAt")] + public System.DateTimeOffset? CreatedAt { get; set; } + + /// + /// Unstructured text describing the activity. Only set if the activity type is "Information". + /// + + [JsonPropertyName("description")] + public ICollection Description { get; set; } + + /// + /// Arbitrary URI/URN describing a service-specific transmission type. + /// + + [JsonPropertyName("extendedType")] + public System.Uri ExtendedType { get; set; } + + /// + /// The UUDIv7 of the action may be provided to support idempotent additions to the list of activities. + ///
If not supplied, a new UUIDv7 will be generated. + ///
+ + [JsonPropertyName("id")] + public System.Guid? Id { get; set; } + + /// + /// The actor that performed the activity. + /// + + [JsonPropertyName("performedBy")] + public V1ServiceOwnerCommonActors_Actor PerformedBy { get; set; } + + /// + /// If the activity is related to a particular transmission, this field will contain the transmission identifier. + ///
Must be present in the request body. + ///
+ + [JsonPropertyName("transmissionId")] + public System.Guid? TransmissionId { get; set; } + + /// + /// The type of transmission. + /// + + [JsonPropertyName("type")] + [JsonConverter(typeof(JsonStringEnumConverter))] + public DialogsEntitiesActivities_DialogActivityType Type { get; set; } + + } + + [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "14.2.0.0 (NJsonSchema v11.1.0.0 (Newtonsoft.Json v13.0.0.0))")] + public partial class V1ServiceOwnerDialogActivitiesQueriesGet_Activity + { + + [JsonPropertyName("createdAt")] + public System.DateTimeOffset? CreatedAt { get; set; } + + [JsonPropertyName("deletedAt")] + public System.DateTimeOffset? DeletedAt { get; set; } + + [JsonPropertyName("description")] + public ICollection Description { get; set; } + + [JsonPropertyName("extendedType")] + public System.Uri ExtendedType { get; set; } + + [JsonPropertyName("id")] + public System.Guid Id { get; set; } + + [JsonPropertyName("performedBy")] + public V1ServiceOwnerCommonActors_Actor PerformedBy { get; set; } + + [JsonPropertyName("transmissionId")] + public System.Guid? TransmissionId { get; set; } + + [JsonPropertyName("type")] + [JsonConverter(typeof(JsonStringEnumConverter))] + public DialogsEntitiesActivities_DialogActivityType Type { get; set; } + + } + + [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "14.2.0.0 (NJsonSchema v11.1.0.0 (Newtonsoft.Json v13.0.0.0))")] + public partial class V1ServiceOwnerDialogActivitiesQueriesNotificationCondition_NotificationCondition + { + + [JsonPropertyName("sendNotification")] + public bool SendNotification { get; set; } + + } + + [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "14.2.0.0 (NJsonSchema v11.1.0.0 (Newtonsoft.Json v13.0.0.0))")] + public enum V1ServiceOwnerDialogActivitiesQueriesNotificationCondition_NotificationConditionType + { + + [System.Runtime.Serialization.EnumMember(Value = @"NotExists")] + NotExists = 0, + + [System.Runtime.Serialization.EnumMember(Value = @"Exists")] + Exists = 1, + + } + + [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "14.2.0.0 (NJsonSchema v11.1.0.0 (Newtonsoft.Json v13.0.0.0))")] + public partial class V1ServiceOwnerDialogActivitiesQueriesSearch_Activity + { + + [JsonPropertyName("createdAt")] + public System.DateTimeOffset CreatedAt { get; set; } + + [JsonPropertyName("deletedAt")] + public System.DateTimeOffset? DeletedAt { get; set; } + + [JsonPropertyName("extendedType")] + public System.Uri ExtendedType { get; set; } + + [JsonPropertyName("id")] + public System.Guid Id { get; set; } + + [JsonPropertyName("transmissionId")] + public System.Guid? TransmissionId { get; set; } + + [JsonPropertyName("type")] + [JsonConverter(typeof(JsonStringEnumConverter))] + public DialogsEntitiesActivities_DialogActivityType Type { get; set; } + + } + + [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "14.2.0.0 (NJsonSchema v11.1.0.0 (Newtonsoft.Json v13.0.0.0))")] + public partial class V1ServiceOwnerDialogsCommandsCreate_Activity + { + /// + /// If supplied, overrides the creating date and time for the transmission. + ///
If not supplied, the current date /time will be used. + ///
+ + [JsonPropertyName("createdAt")] + public System.DateTimeOffset? CreatedAt { get; set; } + + /// + /// Unstructured text describing the activity. Only set if the activity type is "Information". + /// + + [JsonPropertyName("description")] + public ICollection Description { get; set; } + + /// + /// Arbitrary URI/URN describing a service-specific transmission type. + /// + + [JsonPropertyName("extendedType")] + public System.Uri ExtendedType { get; set; } + + /// + /// A self-defined UUIDv7 may be provided to support idempotent creation of activities. If not provided, a new UUIDv7 will be generated. + /// + + [JsonPropertyName("id")] + public System.Guid? Id { get; set; } + + /// + /// The actor that performed the activity. + /// + + [JsonPropertyName("performedBy")] + public V1ServiceOwnerCommonActors_Actor PerformedBy { get; set; } + + /// + /// If the activity is related to a particular transmission, this field will contain the transmission identifier. + ///
Must be present in the request body. + ///
+ + [JsonPropertyName("transmissionId")] + public System.Guid? TransmissionId { get; set; } + + /// + /// The type of transmission. + /// + + [JsonPropertyName("type")] + [JsonConverter(typeof(JsonStringEnumConverter))] + public DialogsEntitiesActivities_DialogActivityType Type { get; set; } + + } + + [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "14.2.0.0 (NJsonSchema v11.1.0.0 (Newtonsoft.Json v13.0.0.0))")] + public partial class V1ServiceOwnerDialogsCommandsCreate_ApiAction + { + /// + /// String identifier for the action, corresponding to the "action" attributeId used in the XACML service policy, + ///
which by default is the policy belonging to the service referred to by "serviceResource" in the dialog. + ///
+ + [JsonPropertyName("action")] + public string Action { get; set; } + + /// + /// Contains an authorization resource attributeId, that can used in custom authorization rules in the XACML service + ///
policy, which by default is the policy belonging to the service referred to by "serviceResource" in the dialog. + ///
+ ///
Can also be used to refer to other service policies. + ///
+ + [JsonPropertyName("authorizationAttribute")] + public string AuthorizationAttribute { get; set; } + + /// + /// The endpoints associated with the action. + /// + + [JsonPropertyName("endpoints")] + public ICollection Endpoints { get; set; } + + } + + [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "14.2.0.0 (NJsonSchema v11.1.0.0 (Newtonsoft.Json v13.0.0.0))")] + public partial class V1ServiceOwnerDialogsCommandsCreate_ApiActionEndpoint + { + /// + /// Boolean indicating if the endpoint is deprecated. + /// + + [JsonPropertyName("deprecated")] + public bool Deprecated { get; set; } + + /// + /// Link to documentation for the endpoint, providing documentation for integrators. Should be a URL to a + ///
human-readable page. + ///
+ + [JsonPropertyName("documentationUrl")] + public System.Uri DocumentationUrl { get; set; } + + /// + /// The HTTP method that the endpoint expects for this action. + /// + + [JsonPropertyName("httpMethod")] + [JsonConverter(typeof(JsonStringEnumConverter))] + public Http_HttpVerb HttpMethod { get; set; } + + /// + /// Link to the request schema for the endpoint. Used to provide documentation for integrators. + ///
Dialogporten will not validate information on this endpoint. + ///
+ + [JsonPropertyName("requestSchema")] + public System.Uri RequestSchema { get; set; } + + /// + /// Link to the response schema for the endpoint. Used to provide documentation for integrators. + ///
Dialogporten will not validate information on this endpoint. + ///
+ + [JsonPropertyName("responseSchema")] + public System.Uri ResponseSchema { get; set; } + + /// + /// Date and time when the endpoint will no longer function. Only set if the endpoint is deprecated. Dialogporten + ///
will not enforce this date. + ///
+ + [JsonPropertyName("sunsetAt")] + public System.DateTimeOffset? SunsetAt { get; set; } + + /// + /// The fully qualified URL of the API endpoint. + /// + + [JsonPropertyName("url")] + public System.Uri Url { get; set; } + + /// + /// Arbitrary string indicating the version of the endpoint. + /// + + [JsonPropertyName("version")] + public string Version { get; set; } + + } + + [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "14.2.0.0 (NJsonSchema v11.1.0.0 (Newtonsoft.Json v13.0.0.0))")] + public partial class V1ServiceOwnerDialogsCommandsCreate_Attachment + { + /// + /// The display name of the attachment that should be used in GUIs. + /// + + [JsonPropertyName("displayName")] + public ICollection DisplayName { get; set; } + + /// + /// The URLs associated with the attachment, each referring to a different representation of the attachment. + /// + + [JsonPropertyName("urls")] + public ICollection Urls { get; set; } + + } + + [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "14.2.0.0 (NJsonSchema v11.1.0.0 (Newtonsoft.Json v13.0.0.0))")] + public partial class V1ServiceOwnerDialogsCommandsCreate_AttachmentUrl + { + /// + /// The type of consumer the URL is intended for. + /// + + [JsonPropertyName("consumerType")] + [JsonConverter(typeof(JsonStringEnumConverter))] + public Attachments_AttachmentUrlConsumerType ConsumerType { get; set; } + + /// + /// The media type of the attachment. + /// + + [JsonPropertyName("mediaType")] + public string MediaType { get; set; } + + /// + /// The fully qualified URL of the attachment. + /// + + [JsonPropertyName("url")] + public System.Uri Url { get; set; } + + } + + [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "14.2.0.0 (NJsonSchema v11.1.0.0 (Newtonsoft.Json v13.0.0.0))")] + public partial class V1ServiceOwnerDialogsCommandsCreate_Content + { + /// + /// Additional information about the dialog. + ///
Supported media types: text/plain, text/markdown + ///
+ + [JsonPropertyName("additionalInfo")] + public V1CommonContent_ContentValue AdditionalInfo { get; set; } + + /// + /// Used as the human-readable label used to describe the "ExtendedStatus" field. + ///
Supported media types: text/plain + ///
+ + [JsonPropertyName("extendedStatus")] + public V1CommonContent_ContentValue ExtendedStatus { get; set; } + + /// + /// Front-channel embedded content. Used to dynamically embed content in the frontend from an external URL. Must be HTTPS. + ///
Supported media types: application/vnd.dialogporten.frontchannelembed+json;type=markdown + ///
+ + [JsonPropertyName("mainContentReference")] + public V1CommonContent_ContentValue MainContentReference { get; set; } + + /// + /// Overridden sender name. If not supplied, assume "org" as the sender name. Must be text/plain if supplied. + ///
Supported media types: text/plain + ///
+ + [JsonPropertyName("senderName")] + public V1CommonContent_ContentValue SenderName { get; set; } + + /// + /// A short summary of the dialog and its current state. + ///
Supported media types: text/plain + ///
+ + [JsonPropertyName("summary")] + public V1CommonContent_ContentValue Summary { get; set; } + + /// + /// The title of the dialog. + ///
Supported media types: text/plain + ///
+ + [JsonPropertyName("title")] + public V1CommonContent_ContentValue Title { get; set; } + + } + + [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "14.2.0.0 (NJsonSchema v11.1.0.0 (Newtonsoft.Json v13.0.0.0))")] + public partial class V1ServiceOwnerDialogsCommandsCreate_DialogCommand + { + /// + /// An immutable list of activities associated with the dialog. + /// + + [JsonPropertyName("activities")] + public ICollection Activities { get; set; } + + /// + /// The API actions associated with the dialog. Should be used in specialized, non-browser-based integrations. + /// + + [JsonPropertyName("apiActions")] + public ICollection ApiActions { get; set; } + + /// + /// The attachments associated with the dialog (on an aggregate level). + /// + + [JsonPropertyName("attachments")] + public ICollection Attachments { get; set; } + + /// + /// The dialog unstructured text content. + /// + + [JsonPropertyName("content")] + public V1ServiceOwnerDialogsCommandsCreate_Content Content { get; set; } + + /// + /// If set, will override the date and time when the dialog is set as created. + ///
If not supplied, the current date /time will be used. + ///
+ + [JsonPropertyName("createdAt")] + public System.DateTimeOffset CreatedAt { get; set; } + + /// + /// The due date for the dialog. Dialogs past due date might be marked as such in frontends but will still be available. + /// + + [JsonPropertyName("dueAt")] + public System.DateTimeOffset? DueAt { get; set; } + + /// + /// The expiration date for the dialog. This is the last date when the dialog is available for the end user. + ///
+ ///
After this date is passed, the dialog will be considered expired and no longer available for the end user in any + ///
API. If not supplied, the dialog will be considered to never expire. This field can be changed after creation. + ///
+ + [JsonPropertyName("expiresAt")] + public System.DateTimeOffset? ExpiresAt { get; set; } + + /// + /// Arbitrary string with a service-specific indicator of status, typically used to indicate a fine-grained state of + ///
the dialog to further specify the "status" enum. + ///
+ + [JsonPropertyName("extendedStatus")] + public string ExtendedStatus { get; set; } + + /// + /// Arbitrary string with a service-specific reference to an external system or service. + /// + + [JsonPropertyName("externalReference")] + public string ExternalReference { get; set; } + + /// + /// The GUI actions associated with the dialog. Should be used in browser-based interactive frontends. + /// + + [JsonPropertyName("guiActions")] + public ICollection GuiActions { get; set; } + + /// + /// A self-defined UUIDv7 may be provided to support idempotent creation of dialogs. If not provided, a new UUIDv7 will be generated. + /// + + [JsonPropertyName("id")] + public System.Guid? Id { get; set; } + + /// + /// The party code representing the organization or person that the dialog belongs to in URN format. + /// + + [JsonPropertyName("party")] + public string Party { get; set; } + + /// + /// Optional preceding process identifier to indicate the business process that preceded the process indicated in the "Process" field. Cannot be set without also "Process" being set. + /// + + [JsonPropertyName("precedingProcess")] + public string PrecedingProcess { get; set; } + + /// + /// Optional process identifier used to indicate a business process this dialog belongs to. + /// + + [JsonPropertyName("process")] + public string Process { get; set; } + + /// + /// Advisory indicator of progress, represented as 1-100 percentage value. 100% representing a dialog that has come + ///
to a natural completion (successful or not). + ///
+ + [JsonPropertyName("progress")] + public int? Progress { get; set; } + + /// + /// A list of words (tags) that will be used in dialog search queries. Not visible in end-user DTO. + /// + + [JsonPropertyName("searchTags")] + public ICollection SearchTags { get; set; } + + /// + /// The service identifier for the service that the dialog is related to in URN-format. + ///
This corresponds to a resource in the Altinn Resource Registry, which the authenticated organization + ///
must own, i.e., be listed as the "competent authority" in the Resource Registry entry. + ///
+ + [JsonPropertyName("serviceResource")] + public string ServiceResource { get; set; } + + /// + /// The aggregated status of the dialog. + /// + + [JsonPropertyName("status")] + [JsonConverter(typeof(JsonStringEnumConverter))] + public DialogsEntities_DialogStatus Status { get; set; } + + /// + /// Set the system label of the dialog Migration purposes. + /// + + [JsonPropertyName("systemLabel")] + [JsonConverter(typeof(JsonStringEnumConverter))] + public DialogEndUserContextsEntities_SystemLabel? SystemLabel { get; set; } + + /// + /// The immutable list of transmissions associated with the dialog. + /// + + [JsonPropertyName("transmissions")] + public ICollection Transmissions { get; set; } + + /// + /// If set, will override the date and time when the dialog is set as last updated. + ///
If not supplied, the current date /time will be used. + ///
+ + [JsonPropertyName("updatedAt")] + public System.DateTimeOffset UpdatedAt { get; set; } + + /// + /// The timestamp when the dialog should be made visible for authorized end users. If not provided, the dialog will be + ///
immediately available. + ///
+ + [JsonPropertyName("visibleFrom")] + public System.DateTimeOffset? VisibleFrom { get; set; } + + } + + [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "14.2.0.0 (NJsonSchema v11.1.0.0 (Newtonsoft.Json v13.0.0.0))")] + public partial class V1ServiceOwnerDialogsCommandsCreate_GuiAction + { + /// + /// The action identifier for the action, corresponding to the "action" attributeId used in the XACML service policy. + /// + + [JsonPropertyName("action")] + public string Action { get; set; } + + /// + /// Contains an authorization resource attributeId, that can used in custom authorization rules in the XACML service + ///
policy, which by default is the policy belonging to the service referred to by "serviceResource" in the dialog. + ///
+ ///
Can also be used to refer to other service policies. + ///
+ + [JsonPropertyName("authorizationAttribute")] + public string AuthorizationAttribute { get; set; } + + /// + /// The HTTP method that the frontend should use when redirecting the user. + /// + + [JsonPropertyName("httpMethod")] + [JsonConverter(typeof(JsonStringEnumConverter))] + public Http_HttpVerb? HttpMethod { get; set; } + + /// + /// Indicates whether the action results in the dialog being deleted. Used by frontends to implement custom UX + ///
for delete actions. + ///
+ + [JsonPropertyName("isDeleteDialogAction")] + public bool IsDeleteDialogAction { get; set; } + + /// + /// Indicates a priority for the action, making it possible for frontends to adapt GUI elements based on action + ///
priority. + ///
+ + [JsonPropertyName("priority")] + [JsonConverter(typeof(JsonStringEnumConverter))] + public DialogsEntitiesActions_DialogGuiActionPriority Priority { get; set; } + + /// + /// If there should be a prompt asking the user for confirmation before the action is executed, + ///
this field should contain the prompt text. + ///
+ + [JsonPropertyName("prompt")] + public ICollection Prompt { get; set; } + + /// + /// The title of the action, this should be short and in verb form. Must be text/plain. + /// + + [JsonPropertyName("title")] + public ICollection Title { get; set; } + + /// + /// The fully qualified URL of the action, to which the user will be redirected when the action is triggered. Will be set to + ///
"urn:dialogporten:unauthorized" if the user is not authorized to perform the action. + ///
+ + [JsonPropertyName("url")] + public System.Uri Url { get; set; } + + } + + [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "14.2.0.0 (NJsonSchema v11.1.0.0 (Newtonsoft.Json v13.0.0.0))")] + public partial class V1ServiceOwnerDialogsCommandsCreate_SearchTag + { + /// + /// A search tag value. + /// + + [JsonPropertyName("value")] + public string Value { get; set; } + + } + + [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "14.2.0.0 (NJsonSchema v11.1.0.0 (Newtonsoft.Json v13.0.0.0))")] + public partial class V1ServiceOwnerDialogsCommandsCreate_Transmission + { + /// + /// The transmission-level attachments. + /// + + [JsonPropertyName("attachments")] + public ICollection Attachments { get; set; } + + /// + /// Contains an authorization resource attributeId, that can used in custom authorization rules in the XACML service + ///
policy, which by default is the policy belonging to the service referred to by "serviceResource" in the dialog. + ///
+ ///
Can also be used to refer to other service policies. + ///
+ + [JsonPropertyName("authorizationAttribute")] + public string AuthorizationAttribute { get; set; } + + /// + /// The transmission unstructured text content. + /// + + [JsonPropertyName("content")] + public V1ServiceOwnerDialogsCommandsCreate_TransmissionContent Content { get; set; } + + /// + /// If supplied, overrides the creating date and time for the transmission. + ///
If not supplied, the current date /time will be used. + ///
+ + [JsonPropertyName("createdAt")] + public System.DateTimeOffset CreatedAt { get; set; } + + /// + /// Arbitrary URI/URN describing a service-specific transmission type. + ///
+ ///
Refer to the service-specific documentation provided by the service owner for details (if in use). + ///
+ + [JsonPropertyName("extendedType")] + public System.Uri ExtendedType { get; set; } + + /// + /// A self-defined UUIDv7 may be provided to support idempotent creation of transmissions. If not provided, a new UUIDv7 will be generated. + /// + + [JsonPropertyName("id")] + public System.Guid? Id { get; set; } + + /// + /// Reference to any other transmission that this transmission is related to. + /// + + [JsonPropertyName("relatedTransmissionId")] + public System.Guid? RelatedTransmissionId { get; set; } + + /// + /// The actor that sent the transmission. + /// + + [JsonPropertyName("sender")] + public V1ServiceOwnerCommonActors_Actor Sender { get; set; } + + /// + /// The type of transmission. + /// + + [JsonPropertyName("type")] + [JsonConverter(typeof(JsonStringEnumConverter))] + public DialogsEntitiesTransmissions_DialogTransmissionType Type { get; set; } + + } + + [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "14.2.0.0 (NJsonSchema v11.1.0.0 (Newtonsoft.Json v13.0.0.0))")] + public partial class V1ServiceOwnerDialogsCommandsCreate_TransmissionAttachment + { + /// + /// The display name of the attachment that should be used in GUIs. + /// + + [JsonPropertyName("displayName")] + public ICollection DisplayName { get; set; } + + /// + /// A self-defined UUIDv7 may be provided to support idempotent creation of transmission attachments. If not provided, a new UUIDv7 will be generated. + /// + + [JsonPropertyName("id")] + public System.Guid? Id { get; set; } + + /// + /// The URLs associated with the attachment, each referring to a different representation of the attachment. + /// + + [JsonPropertyName("urls")] + public ICollection Urls { get; set; } + + } + + [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "14.2.0.0 (NJsonSchema v11.1.0.0 (Newtonsoft.Json v13.0.0.0))")] + public partial class V1ServiceOwnerDialogsCommandsCreate_TransmissionAttachmentUrl + { + /// + /// The type of consumer the URL is intended for. + /// + + [JsonPropertyName("consumerType")] + [JsonConverter(typeof(JsonStringEnumConverter))] + public Attachments_AttachmentUrlConsumerType ConsumerType { get; set; } + + /// + /// The media type of the attachment. + /// + + [JsonPropertyName("mediaType")] + public string MediaType { get; set; } + + /// + /// The fully qualified URL of the attachment. + /// + + [JsonPropertyName("url")] + public System.Uri Url { get; set; } + + } + + [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "14.2.0.0 (NJsonSchema v11.1.0.0 (Newtonsoft.Json v13.0.0.0))")] + public partial class V1ServiceOwnerDialogsCommandsCreate_TransmissionContent + { + /// + /// Front-channel embedded content. Used to dynamically embed content in the frontend from an external URL. Must be HTTPS. + ///
Allowed media types: application/vnd.dialogporten.frontchannelembed+json;type=markdown + ///
+ + [JsonPropertyName("contentReference")] + public V1CommonContent_ContentValue ContentReference { get; set; } + + /// + /// The transmission summary. + /// + + [JsonPropertyName("summary")] + public V1CommonContent_ContentValue Summary { get; set; } + + /// + /// The transmission title. Must be text/plain. + /// + + [JsonPropertyName("title")] + public V1CommonContent_ContentValue Title { get; set; } + + } + + [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "14.2.0.0 (NJsonSchema v11.1.0.0 (Newtonsoft.Json v13.0.0.0))")] + public partial class V1ServiceOwnerDialogsCommandsUpdate_Activity + { + /// + /// If supplied, overrides the creating date and time for the transmission. + ///
If not supplied, the current date /time will be used. + ///
+ + [JsonPropertyName("createdAt")] + public System.DateTimeOffset? CreatedAt { get; set; } + + /// + /// Unstructured text describing the activity. Only set if the activity type is "Information". + /// + + [JsonPropertyName("description")] + public ICollection Description { get; set; } + + /// + /// Arbitrary URI/URN describing a service-specific transmission type. + /// + + [JsonPropertyName("extendedType")] + public System.Uri ExtendedType { get; set; } + + /// + /// The UUDIv7 of the action may be provided to support idempotent additions to the list of activities. + ///
If not supplied, a new UUIDv7 will be generated. + ///
+ + [JsonPropertyName("id")] + public System.Guid? Id { get; set; } + + /// + /// The actor that performed the activity. + /// + + [JsonPropertyName("performedBy")] + public V1ServiceOwnerCommonActors_Actor PerformedBy { get; set; } + + /// + /// If the activity is related to a particular transmission, this field will contain the transmission identifier. + ///
Must be present in the request body. + ///
+ + [JsonPropertyName("transmissionId")] + public System.Guid? TransmissionId { get; set; } + + /// + /// The type of transmission. + /// + + [JsonPropertyName("type")] + [JsonConverter(typeof(JsonStringEnumConverter))] + public DialogsEntitiesActivities_DialogActivityType Type { get; set; } + + } + + [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "14.2.0.0 (NJsonSchema v11.1.0.0 (Newtonsoft.Json v13.0.0.0))")] + public partial class V1ServiceOwnerDialogsCommandsUpdate_ApiAction + { + /// + /// String identifier for the action, corresponding to the "action" attributeId used in the XACML service policy, + ///
which by default is the policy belonging to the service referred to by "serviceResource" in the dialog. + ///
+ + [JsonPropertyName("action")] + public string Action { get; set; } + + /// + /// Contains an authorization resource attributeId, that can used in custom authorization rules in the XACML service + ///
policy, which by default is the policy belonging to the service referred to by "serviceResource" in the dialog. + ///
+ ///
Can also be used to refer to other service policies. + ///
+ + [JsonPropertyName("authorizationAttribute")] + public string AuthorizationAttribute { get; set; } + + /// + /// The endpoints associated with the action. + /// + + [JsonPropertyName("endpoints")] + public ICollection Endpoints { get; set; } + + /// + /// A UUIDv7 used for merging existing data, unknown IDs will be ignored as this entity does not support user-defined IDs. + /// + + [JsonPropertyName("id")] + public System.Guid? Id { get; set; } + + } + + [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "14.2.0.0 (NJsonSchema v11.1.0.0 (Newtonsoft.Json v13.0.0.0))")] + public partial class V1ServiceOwnerDialogsCommandsUpdate_ApiActionEndpoint + { + /// + /// Boolean indicating if the endpoint is deprecated. + /// + + [JsonPropertyName("deprecated")] + public bool Deprecated { get; set; } + + /// + /// Link to documentation for the endpoint, providing documentation for integrators. Should be a URL to a + ///
human-readable page. + ///
+ + [JsonPropertyName("documentationUrl")] + public System.Uri DocumentationUrl { get; set; } + + /// + /// The HTTP method that the endpoint expects for this action. + /// + + [JsonPropertyName("httpMethod")] + [JsonConverter(typeof(JsonStringEnumConverter))] + public Http_HttpVerb HttpMethod { get; set; } + + /// + /// A UUIDv7 used for merging existing data, unknown IDs will be ignored as this entity does not support user-defined IDs. + /// + + [JsonPropertyName("id")] + public System.Guid? Id { get; set; } + + /// + /// Link to the request schema for the endpoint. Used to provide documentation for integrators. + ///
Dialogporten will not validate information on this endpoint. + ///
+ + [JsonPropertyName("requestSchema")] + public System.Uri RequestSchema { get; set; } + + /// + /// Link to the response schema for the endpoint. Used to provide documentation for integrators. + ///
Dialogporten will not validate information on this endpoint. + ///
+ + [JsonPropertyName("responseSchema")] + public System.Uri ResponseSchema { get; set; } + + /// + /// Date and time when the endpoint will no longer function. Only set if the endpoint is deprecated. Dialogporten + ///
will not enforce this date. + ///
+ + [JsonPropertyName("sunsetAt")] + public System.DateTimeOffset? SunsetAt { get; set; } + + /// + /// The fully qualified URL of the API endpoint. + /// + + [JsonPropertyName("url")] + public System.Uri Url { get; set; } + + /// + /// Arbitrary string indicating the version of the endpoint. + /// + + [JsonPropertyName("version")] + public string Version { get; set; } + + } + + [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "14.2.0.0 (NJsonSchema v11.1.0.0 (Newtonsoft.Json v13.0.0.0))")] + public partial class V1ServiceOwnerDialogsCommandsUpdate_Attachment + { + /// + /// The display name of the attachment that should be used in GUIs. + /// + + [JsonPropertyName("displayName")] + public ICollection DisplayName { get; set; } + + /// + /// A UUIDv7 used for merging existing data, unknown IDs will be ignored as this entity does not support user-defined IDs. + /// + + [JsonPropertyName("id")] + public System.Guid? Id { get; set; } + + /// + /// The URLs associated with the attachment, each referring to a different representation of the attachment. + /// + + [JsonPropertyName("urls")] + public ICollection Urls { get; set; } + + } + + [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "14.2.0.0 (NJsonSchema v11.1.0.0 (Newtonsoft.Json v13.0.0.0))")] + public partial class V1ServiceOwnerDialogsCommandsUpdate_AttachmentUrl + { + /// + /// The type of consumer the URL is intended for. + /// + + [JsonPropertyName("consumerType")] + [JsonConverter(typeof(JsonStringEnumConverter))] + public Attachments_AttachmentUrlConsumerType ConsumerType { get; set; } + + /// + /// A UUIDv7 used for merging existing data, unknown IDs will be ignored as this entity does not support user-defined IDs. + /// + + [JsonPropertyName("id")] + public System.Guid? Id { get; set; } + + /// + /// The media type of the attachment. + /// + + [JsonPropertyName("mediaType")] + public string MediaType { get; set; } + + /// + /// The fully qualified URL of the attachment. + /// + + [JsonPropertyName("url")] + public System.Uri Url { get; set; } + + } + + [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "14.2.0.0 (NJsonSchema v11.1.0.0 (Newtonsoft.Json v13.0.0.0))")] + public partial class V1ServiceOwnerDialogsCommandsUpdate_Content + { + /// + /// Additional information about the dialog, this may contain Markdown. + /// + + [JsonPropertyName("additionalInfo")] + public V1CommonContent_ContentValue AdditionalInfo { get; set; } + + /// + /// Used as the human-readable label used to describe the "ExtendedStatus" field. Must be text/plain. + /// + + [JsonPropertyName("extendedStatus")] + public V1CommonContent_ContentValue ExtendedStatus { get; set; } + + /// + /// Front-channel embedded content. Used to dynamically embed content in the frontend from an external URL. Must be HTTPS. + /// + + [JsonPropertyName("mainContentReference")] + public V1CommonContent_ContentValue MainContentReference { get; set; } + + /// + /// Overridden sender name. If not supplied, assume "org" as the sender name. Must be text/plain if supplied. + /// + + [JsonPropertyName("senderName")] + public V1CommonContent_ContentValue SenderName { get; set; } + + /// + /// A short summary of the dialog and its current state. Must be text/plain. + /// + + [JsonPropertyName("summary")] + public V1CommonContent_ContentValue Summary { get; set; } + + /// + /// The title of the dialog. Must be text/plain. + /// + + [JsonPropertyName("title")] + public V1CommonContent_ContentValue Title { get; set; } + + } + + [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "14.2.0.0 (NJsonSchema v11.1.0.0 (Newtonsoft.Json v13.0.0.0))")] + public partial class V1ServiceOwnerDialogsCommandsUpdate_Dialog + { + /// + /// An immutable list of activities associated with the dialog. When updating via PUT, any activities added here + ///
will be appended to the existing list of activities. + ///
+ + [JsonPropertyName("activities")] + public ICollection Activities { get; set; } + + /// + /// The API actions associated with the dialog. Should be used in specialized, non-browser-based integrations. + /// + + [JsonPropertyName("apiActions")] + public ICollection ApiActions { get; set; } + + /// + /// The attachments associated with the dialog (on an aggregate level). + /// + + [JsonPropertyName("attachments")] + public ICollection Attachments { get; set; } + + /// + /// The dialog unstructured text content. + /// + + [JsonPropertyName("content")] + public V1ServiceOwnerDialogsCommandsUpdate_Content Content { get; set; } + + /// + /// The due date for the dialog. Dialogs past due date might be marked as such in frontends but will still be available. + /// + + [JsonPropertyName("dueAt")] + public System.DateTimeOffset? DueAt { get; set; } + + /// + /// The expiration date for the dialog. This is the last date when the dialog is available for the end user. + ///
+ ///
After this date is passed, the dialog will be considered expired and no longer available for the end user in any + ///
API. If not supplied, the dialog will be considered to never expire. This field can be changed after creation. + ///
+ + [JsonPropertyName("expiresAt")] + public System.DateTimeOffset? ExpiresAt { get; set; } + + /// + /// Arbitrary string with a service-specific indicator of status, typically used to indicate a fine-grained state of + ///
the dialog to further specify the "status" enum. + ///
+ + [JsonPropertyName("extendedStatus")] + public string ExtendedStatus { get; set; } + + /// + /// Arbitrary string with a service-specific reference to an external system or service. + /// + + [JsonPropertyName("externalReference")] + public string ExternalReference { get; set; } + + /// + /// The GUI actions associated with the dialog. Should be used in browser-based interactive frontends. + /// + + [JsonPropertyName("guiActions")] + public ICollection GuiActions { get; set; } + + /// + /// Advisory indicator of progress, represented as 1-100 percentage value. 100% representing a dialog that has come + ///
to a natural completion (successful or not). + ///
+ + [JsonPropertyName("progress")] + public int? Progress { get; set; } + + /// + /// A list of words (tags) that will be used in dialog search queries. Not visible in end-user DTO. + /// + + [JsonPropertyName("searchTags")] + public ICollection SearchTags { get; set; } + + /// + /// The aggregated status of the dialog. + /// + + [JsonPropertyName("status")] + [JsonConverter(typeof(JsonStringEnumConverter))] + public DialogsEntities_DialogStatus Status { get; set; } + + /// + /// The immutable list of transmissions associated with the dialog. When updating via PUT, any transmissions + ///
added here will be appended to the existing list of transmissions. + ///
+ + [JsonPropertyName("transmissions")] + public ICollection Transmissions { get; set; } + + /// + /// The timestamp when the dialog should be made visible for authorized end users. If not provided, the dialog will be + ///
immediately available. + ///
+ + [JsonPropertyName("visibleFrom")] + public System.DateTimeOffset? VisibleFrom { get; set; } + + } + + [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "14.2.0.0 (NJsonSchema v11.1.0.0 (Newtonsoft.Json v13.0.0.0))")] + public partial class V1ServiceOwnerDialogsCommandsUpdate_GuiAction + { + /// + /// The action identifier for the action, corresponding to the "action" attributeId used in the XACML service policy. + /// + + [JsonPropertyName("action")] + public string Action { get; set; } + + /// + /// Contains an authorization resource attributeId, that can used in custom authorization rules in the XACML service + ///
policy, which by default is the policy belonging to the service referred to by "serviceResource" in the dialog. + ///
+ ///
Can also be used to refer to other service policies. + ///
+ + [JsonPropertyName("authorizationAttribute")] + public string AuthorizationAttribute { get; set; } + + /// + /// The HTTP method that the frontend should use when redirecting the user. + /// + + [JsonPropertyName("httpMethod")] + [JsonConverter(typeof(JsonStringEnumConverter))] + public Http_HttpVerb? HttpMethod { get; set; } + + /// + /// A UUIDv7 used for merging existing data, unknown IDs will be ignored as this entity does not support user-defined IDs. + /// + + [JsonPropertyName("id")] + public System.Guid? Id { get; set; } + + /// + /// Indicates whether the action results in the dialog being deleted. Used by frontends to implement custom UX + ///
for delete actions. + ///
+ + [JsonPropertyName("isDeleteDialogAction")] + public bool IsDeleteDialogAction { get; set; } + + /// + /// Indicates a priority for the action, making it possible for frontends to adapt GUI elements based on action + ///
priority. + ///
+ + [JsonPropertyName("priority")] + [JsonConverter(typeof(JsonStringEnumConverter))] + public DialogsEntitiesActions_DialogGuiActionPriority Priority { get; set; } + + /// + /// If there should be a prompt asking the user for confirmation before the action is executed, + ///
this field should contain the prompt text. + ///
+ + [JsonPropertyName("prompt")] + public ICollection Prompt { get; set; } + + /// + /// The title of the action, this should be short and in verb form. Must be text/plain. + /// + + [JsonPropertyName("title")] + public ICollection Title { get; set; } + + /// + /// The fully qualified URL of the action, to which the user will be redirected when the action is triggered. Will be set to + ///
"urn:dialogporten:unauthorized" if the user is not authorized to perform the action. + ///
+ + [JsonPropertyName("url")] + public System.Uri Url { get; set; } + + } + + [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "14.2.0.0 (NJsonSchema v11.1.0.0 (Newtonsoft.Json v13.0.0.0))")] + public partial class V1ServiceOwnerDialogsCommandsUpdate_SearchTag + { + /// + /// A search tag value. + /// + + [JsonPropertyName("value")] + public string Value { get; set; } + + } + + [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "14.2.0.0 (NJsonSchema v11.1.0.0 (Newtonsoft.Json v13.0.0.0))")] + public partial class V1ServiceOwnerDialogsCommandsUpdate_Transmission + { + /// + /// The transmission-level attachments. + /// + + [JsonPropertyName("attachments")] + public ICollection Attachments { get; set; } + + /// + /// Contains an authorization resource attributeId, that can used in custom authorization rules in the XACML service + ///
policy, which by default is the policy belonging to the service referred to by "serviceResource" in the dialog. + ///
+ ///
Can also be used to refer to other service policies. + ///
+ + [JsonPropertyName("authorizationAttribute")] + public string AuthorizationAttribute { get; set; } + + /// + /// The transmission unstructured text content. + /// + + [JsonPropertyName("content")] + public V1ServiceOwnerDialogsCommandsUpdate_TransmissionContent Content { get; set; } + + /// + /// If supplied, overrides the creating date and time for the transmission. + ///
If not supplied, the current date /time will be used. + ///
+ + [JsonPropertyName("createdAt")] + public System.DateTimeOffset CreatedAt { get; set; } + + /// + /// Arbitrary URI/URN describing a service-specific transmission type. + ///
+ ///
Refer to the service-specific documentation provided by the service owner for details (if in use). + ///
+ + [JsonPropertyName("extendedType")] + public System.Uri ExtendedType { get; set; } + + /// + /// The UUDIv7 of the action may be provided to support idempotent additions to the list of transmissions. + ///
If not supplied, a new UUIDv7 will be generated. + ///
+ + [JsonPropertyName("id")] + public System.Guid? Id { get; set; } + + /// + /// Reference to any other transmission that this transmission is related to. + /// + + [JsonPropertyName("relatedTransmissionId")] + public System.Guid? RelatedTransmissionId { get; set; } + + /// + /// The actor that sent the transmission. + /// + + [JsonPropertyName("sender")] + public V1ServiceOwnerCommonActors_Actor Sender { get; set; } + + /// + /// The type of transmission. + /// + + [JsonPropertyName("type")] + [JsonConverter(typeof(JsonStringEnumConverter))] + public DialogsEntitiesTransmissions_DialogTransmissionType Type { get; set; } + + } + + [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "14.2.0.0 (NJsonSchema v11.1.0.0 (Newtonsoft.Json v13.0.0.0))")] + public partial class V1ServiceOwnerDialogsCommandsUpdate_TransmissionAttachment + { + /// + /// The display name of the attachment that should be used in GUIs. + /// + + [JsonPropertyName("displayName")] + public ICollection DisplayName { get; set; } + + /// + /// A self-defined UUIDv7 may be provided to support idempotent creation of transmission attachments. If not provided, a new UUIDv7 will be generated. + /// + + [JsonPropertyName("id")] + public System.Guid? Id { get; set; } + + /// + /// The URLs associated with the attachment, each referring to a different representation of the attachment. + /// + + [JsonPropertyName("urls")] + public ICollection Urls { get; set; } + + } + + [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "14.2.0.0 (NJsonSchema v11.1.0.0 (Newtonsoft.Json v13.0.0.0))")] + public partial class V1ServiceOwnerDialogsCommandsUpdate_TransmissionAttachmentUrl + { + /// + /// The type of consumer the URL is intended for. + /// + + [JsonPropertyName("consumerType")] + [JsonConverter(typeof(JsonStringEnumConverter))] + public Attachments_AttachmentUrlConsumerType ConsumerType { get; set; } + + /// + /// The media type of the attachment. + /// + + [JsonPropertyName("mediaType")] + public string MediaType { get; set; } + + /// + /// The fully qualified URL of the attachment. + /// + + [JsonPropertyName("url")] + public System.Uri Url { get; set; } + + } + + [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "14.2.0.0 (NJsonSchema v11.1.0.0 (Newtonsoft.Json v13.0.0.0))")] + public partial class V1ServiceOwnerDialogsCommandsUpdate_TransmissionContent + { + /// + /// Front-channel embedded content. Used to dynamically embed content in the frontend from an external URL. Must be HTTPS. + ///
Allowed media types: application/vnd.dialogporten.frontchannelembed+json;type=markdown + ///
+ + [JsonPropertyName("contentReference")] + public V1CommonContent_ContentValue ContentReference { get; set; } + + /// + /// The transmission summary. + /// + + [JsonPropertyName("summary")] + public V1CommonContent_ContentValue Summary { get; set; } + + /// + /// The transmission title. Must be text/plain. + /// + + [JsonPropertyName("title")] + public V1CommonContent_ContentValue Title { get; set; } + + } + + [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "14.2.0.0 (NJsonSchema v11.1.0.0 (Newtonsoft.Json v13.0.0.0))")] + public partial class V1ServiceOwnerDialogSeenLogsQueriesGet_SeenLog + { + + [JsonPropertyName("id")] + public System.Guid Id { get; set; } + + [JsonPropertyName("isViaServiceOwner")] + public bool? IsViaServiceOwner { get; set; } + + [JsonPropertyName("seenAt")] + public System.DateTimeOffset SeenAt { get; set; } + + [JsonPropertyName("seenBy")] + public V1ServiceOwnerCommonActors_Actor SeenBy { get; set; } + + } + + [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "14.2.0.0 (NJsonSchema v11.1.0.0 (Newtonsoft.Json v13.0.0.0))")] + public partial class V1ServiceOwnerDialogSeenLogsQueriesSearch_SeenLog + { + + [JsonPropertyName("id")] + public System.Guid Id { get; set; } + + [JsonPropertyName("isViaServiceOwner")] + public bool? IsViaServiceOwner { get; set; } + + [JsonPropertyName("seenAt")] + public System.DateTimeOffset SeenAt { get; set; } + + [JsonPropertyName("seenBy")] + public V1ServiceOwnerCommonActors_Actor SeenBy { get; set; } + + } + + [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "14.2.0.0 (NJsonSchema v11.1.0.0 (Newtonsoft.Json v13.0.0.0))")] + public partial class V1ServiceOwnerDialogsQueriesGet_Content + { + /// + /// Additional information about the dialog, this may contain Markdown. + /// + + [JsonPropertyName("additionalInfo")] + public V1CommonContent_ContentValue AdditionalInfo { get; set; } + + /// + /// Used as the human-readable label used to describe the "ExtendedStatus" field. + /// + + [JsonPropertyName("extendedStatus")] + public V1CommonContent_ContentValue ExtendedStatus { get; set; } + + /// + /// Front-channel embedded content. Used to dynamically embed content in the frontend from an external URL. Must be HTTPS. + ///
Allowed media types: application/vnd.dialogporten.frontchannelembed+json;type=markdown + ///
+ + [JsonPropertyName("mainContentReference")] + public V1CommonContent_ContentValue MainContentReference { get; set; } + + /// + /// Overridden sender name. If not supplied, assume "org" as the sender name. + /// + + [JsonPropertyName("senderName")] + public V1CommonContent_ContentValue SenderName { get; set; } + + /// + /// A short summary of the dialog and its current state. + /// + + [JsonPropertyName("summary")] + public V1CommonContent_ContentValue Summary { get; set; } + + /// + /// The title of the dialog. + /// + + [JsonPropertyName("title")] + public V1CommonContent_ContentValue Title { get; set; } + + } + + [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "14.2.0.0 (NJsonSchema v11.1.0.0 (Newtonsoft.Json v13.0.0.0))")] + public partial class V1ServiceOwnerDialogsQueriesGet_Dialog + { + /// + /// An immutable list of activities associated with the dialog. + /// + + [JsonPropertyName("activities")] + public ICollection Activities { get; set; } + + /// + /// The API actions associated with the dialog. Should be used in specialized, non-browser-based integrations. + /// + + [JsonPropertyName("apiActions")] + public ICollection ApiActions { get; set; } + + /// + /// The attachments associated with the dialog (on an aggregate level). + /// + + [JsonPropertyName("attachments")] + public ICollection Attachments { get; set; } + + /// + /// The dialog unstructured text content. + /// + + [JsonPropertyName("content")] + public V1ServiceOwnerDialogsQueriesGet_Content Content { get; set; } + + /// + /// The date and time when the dialog was created. + /// + + [JsonPropertyName("createdAt")] + public System.DateTimeOffset CreatedAt { get; set; } + + /// + /// If deleted, the date and time when the deletion was performed. + /// + + [JsonPropertyName("deletedAt")] + public System.DateTimeOffset? DeletedAt { get; set; } + + /// + /// The due date for the dialog. Dialogs past due date might be marked as such in frontends but will still be available. + /// + + [JsonPropertyName("dueAt")] + public System.DateTimeOffset? DueAt { get; set; } + + /// + /// The expiration date for the dialog. This is the last date when the dialog is available for the end user. + ///
+ ///
After this date is passed, the dialog will be considered expired and no longer available for the end user in any + ///
API. If not supplied, the dialog will be considered to never expire. This field can be changed by the service + ///
owner after the dialog has been created. + ///
+ + [JsonPropertyName("expiresAt")] + public System.DateTimeOffset? ExpiresAt { get; set; } + + /// + /// Arbitrary string with a service-specific indicator of status, typically used to indicate a fine-grained state of + ///
the dialog to further specify the "status" enum. + ///
+ ///
Refer to the service-specific documentation provided by the service owner for details on the possible values (if + ///
in use). + ///
+ + [JsonPropertyName("extendedStatus")] + public string ExtendedStatus { get; set; } + + /// + /// Arbitrary string with a service-specific reference to an external system or service. + ///
+ ///
Refer to the service-specific documentation provided by the service owner for details (if in use). + ///
+ + [JsonPropertyName("externalReference")] + public string ExternalReference { get; set; } + + /// + /// The GUI actions associated with the dialog. Should be used in browser-based interactive frontends. + /// + + [JsonPropertyName("guiActions")] + public ICollection GuiActions { get; set; } + + /// + /// The unique identifier for the dialog in UUIDv7 format. + /// + + [JsonPropertyName("id")] + public System.Guid Id { get; set; } + + /// + /// The service owner code representing the organization (service owner) related to this dialog. + /// + + [JsonPropertyName("org")] + public string Org { get; set; } + + /// + /// The party code representing the organization or person that the dialog belongs to in URN format. + /// + + [JsonPropertyName("party")] + public string Party { get; set; } + + /// + /// Optional preceding process identifier to indicate the business process that preceded the process indicated in the "Process" field. Cannot be set without also "Process" being set. + /// + + [JsonPropertyName("precedingProcess")] + public string PrecedingProcess { get; set; } + + /// + /// Optional process identifier used to indicate a business process this dialog belongs to. + /// + + [JsonPropertyName("process")] + public string Process { get; set; } + + /// + /// Advisory indicator of progress, represented as 1-100 percentage value. 100% representing a dialog that has come + ///
to a natural completion (successful or not). + ///
+ + [JsonPropertyName("progress")] + public int? Progress { get; set; } + + /// + /// The unique identifier for the revision in UUIDv4 format. + /// + + [JsonPropertyName("revision")] + public System.Guid Revision { get; set; } + + /// + /// The list of words (tags) that will be used in dialog search queries. Not visible in end-user DTO. + /// + + [JsonPropertyName("searchTags")] + public ICollection SearchTags { get; set; } + + /// + /// The list of seen log entries for the dialog newer than the dialog ChangedAt date. + /// + + [JsonPropertyName("seenSinceLastUpdate")] + public ICollection SeenSinceLastUpdate { get; set; } + + /// + /// The service identifier for the service that the dialog is related to in URN-format. + ///
This corresponds to a service resource in the Altinn Resource Registry. + ///
+ + [JsonPropertyName("serviceResource")] + public string ServiceResource { get; set; } + + /// + /// The ServiceResource type, as defined in Altinn Resource Registry (see ResourceType). + /// + + [JsonPropertyName("serviceResourceType")] + public string ServiceResourceType { get; set; } + + /// + /// The aggregated status of the dialog. + /// + + [JsonPropertyName("status")] + [JsonConverter(typeof(JsonStringEnumConverter))] + public DialogsEntities_DialogStatus Status { get; set; } + + /// + /// Current display state. + /// + + [JsonPropertyName("systemLabel")] + [JsonConverter(typeof(JsonStringEnumConverter))] + public DialogEndUserContextsEntities_SystemLabel SystemLabel { get; set; } + + /// + /// The immutable list of transmissions associated with the dialog. + /// + + [JsonPropertyName("transmissions")] + public ICollection Transmissions { get; set; } + + /// + /// The date and time when the dialog was last updated. + /// + + [JsonPropertyName("updatedAt")] + public System.DateTimeOffset UpdatedAt { get; set; } + + /// + /// The timestamp when the dialog will be made visible for authorized end users. + /// + + [JsonPropertyName("visibleFrom")] + public System.DateTimeOffset? VisibleFrom { get; set; } + + } + + [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "14.2.0.0 (NJsonSchema v11.1.0.0 (Newtonsoft.Json v13.0.0.0))")] + public partial class V1ServiceOwnerDialogsQueriesGet_DialogActivity + { + /// + /// The date and time when the activity was created. + /// + + [JsonPropertyName("createdAt")] + public System.DateTimeOffset? CreatedAt { get; set; } + + /// + /// Unstructured text describing the activity. Only set if the activity type is "Information". + /// + + [JsonPropertyName("description")] + public ICollection Description { get; set; } + + /// + /// An arbitrary URI/URN with a service-specific activity type. + ///
+ ///
Consult the service-specific documentation provided by the service owner for details (if in use). + ///
+ + [JsonPropertyName("extendedType")] + public System.Uri ExtendedType { get; set; } + + /// + /// The unique identifier for the activity in UUIDv7 format. + /// + + [JsonPropertyName("id")] + public System.Guid Id { get; set; } + + /// + /// The actor that performed the activity. + /// + + [JsonPropertyName("performedBy")] + public V1ServiceOwnerCommonActors_Actor PerformedBy { get; set; } + + /// + /// If the activity is related to a particular transmission, this field will contain the transmission identifier. + /// + + [JsonPropertyName("transmissionId")] + public System.Guid? TransmissionId { get; set; } + + /// + /// The type of activity. + /// + + [JsonPropertyName("type")] + [JsonConverter(typeof(JsonStringEnumConverter))] + public DialogsEntitiesActivities_DialogActivityType Type { get; set; } + + } + + [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "14.2.0.0 (NJsonSchema v11.1.0.0 (Newtonsoft.Json v13.0.0.0))")] + public partial class V1ServiceOwnerDialogsQueriesGet_DialogApiAction + { + /// + /// String identifier for the action, corresponding to the "action" attributeId used in the XACML service policy, + ///
which by default is the policy belonging to the service referred to by "serviceResource" in the dialog. + ///
+ + [JsonPropertyName("action")] + public string Action { get; set; } + + /// + /// Contains an authorization resource attributeId, that can used in custom authorization rules in the XACML service + ///
policy, which by default is the policy belonging to the service referred to by "serviceResource" in the dialog. + ///
+ ///
Can also be used to refer to other service policies. + ///
+ + [JsonPropertyName("authorizationAttribute")] + public string AuthorizationAttribute { get; set; } + + /// + /// The endpoints associated with the action. + /// + + [JsonPropertyName("endpoints")] + public ICollection Endpoints { get; set; } + + /// + /// The unique identifier for the action in UUIDv7 format. + /// + + [JsonPropertyName("id")] + public System.Guid Id { get; set; } + + /// + /// True if the authenticated user (set in the query) is authorized for this action. + /// + + [JsonPropertyName("isAuthorized")] + public bool? IsAuthorized { get; set; } + + } + + [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "14.2.0.0 (NJsonSchema v11.1.0.0 (Newtonsoft.Json v13.0.0.0))")] + public partial class V1ServiceOwnerDialogsQueriesGet_DialogApiActionEndpoint + { + /// + /// Boolean indicating if the endpoint is deprecated. Integrators should migrate to endpoints with a higher version. + /// + + [JsonPropertyName("deprecated")] + public bool Deprecated { get; set; } + + /// + /// Link to service provider documentation for the endpoint. Used for service owners to provide documentation for + ///
integrators. Should be a URL to a human-readable page. + ///
+ + [JsonPropertyName("documentationUrl")] + public System.Uri DocumentationUrl { get; set; } + + /// + /// The HTTP method that the endpoint expects for this action. + /// + + [JsonPropertyName("httpMethod")] + [JsonConverter(typeof(JsonStringEnumConverter))] + public Http_HttpVerb HttpMethod { get; set; } + + /// + /// The unique identifier for the endpoint in UUIDv7 format. + /// + + [JsonPropertyName("id")] + public System.Guid Id { get; set; } + + /// + /// Link to the request schema for the endpoint. Used by service owners to provide documentation for integrators. + ///
Dialogporten will not validate information on this endpoint. + ///
+ + [JsonPropertyName("requestSchema")] + public System.Uri RequestSchema { get; set; } + + /// + /// Link to the response schema for the endpoint. Used for service owners to provide documentation for integrators. + ///
Dialogporten will not validate information on this endpoint. + ///
+ + [JsonPropertyName("responseSchema")] + public System.Uri ResponseSchema { get; set; } + + /// + /// Date and time when the service owner has indicated that endpoint will no longer function. Only set if the endpoint + ///
is deprecated. Dialogporten will not enforce this date. + ///
+ + [JsonPropertyName("sunsetAt")] + public System.DateTimeOffset? SunsetAt { get; set; } + + /// + /// The fully qualified URL of the API endpoint. + /// + + [JsonPropertyName("url")] + public System.Uri Url { get; set; } + + /// + /// Arbitrary string indicating the version of the endpoint. + ///
+ ///
Consult the service-specific documentation provided by the service owner for details (if in use). + ///
+ + [JsonPropertyName("version")] + public string Version { get; set; } + + } + + [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "14.2.0.0 (NJsonSchema v11.1.0.0 (Newtonsoft.Json v13.0.0.0))")] + public partial class V1ServiceOwnerDialogsQueriesGet_DialogAttachment + { + /// + /// The display name of the attachment that should be used in GUIs. + /// + + [JsonPropertyName("displayName")] + public ICollection DisplayName { get; set; } + + /// + /// The unique identifier for the attachment in UUIDv7 format. + /// + + [JsonPropertyName("id")] + public System.Guid Id { get; set; } + + /// + /// The URLs associated with the attachment, each referring to a different representation of the attachment. + /// + + [JsonPropertyName("urls")] + public ICollection Urls { get; set; } + + } + + [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "14.2.0.0 (NJsonSchema v11.1.0.0 (Newtonsoft.Json v13.0.0.0))")] + public partial class V1ServiceOwnerDialogsQueriesGet_DialogAttachmentUrl + { + /// + /// What type of consumer the URL is intended for. + /// + + [JsonPropertyName("consumerType")] + [JsonConverter(typeof(JsonStringEnumConverter))] + public Attachments_AttachmentUrlConsumerType ConsumerType { get; set; } + + /// + /// The unique identifier for the attachment URL in UUIDv7 format. + /// + + [JsonPropertyName("id")] + public System.Guid Id { get; set; } + + /// + /// The media type of the attachment. + /// + + [JsonPropertyName("mediaType")] + public string MediaType { get; set; } + + /// + /// The fully qualified URL of the attachment. + /// + + [JsonPropertyName("url")] + public System.Uri Url { get; set; } + + } + + [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "14.2.0.0 (NJsonSchema v11.1.0.0 (Newtonsoft.Json v13.0.0.0))")] + public partial class V1ServiceOwnerDialogsQueriesGet_DialogGuiAction + { + /// + /// The action identifier for the action, corresponding to the "action" attributeId used in the XACML service policy. + /// + + [JsonPropertyName("action")] + public string Action { get; set; } + + /// + /// Contains an authorization resource attributeId, that can used in custom authorization rules in the XACML service + ///
policy, which by default is the policy belonging to the service referred to by "serviceResource" in the dialog. + ///
+ ///
Can also be used to refer to other service policies. + ///
+ + [JsonPropertyName("authorizationAttribute")] + public string AuthorizationAttribute { get; set; } + + /// + /// The HTTP method that the frontend should use when redirecting the user. + /// + + [JsonPropertyName("httpMethod")] + [JsonConverter(typeof(JsonStringEnumConverter))] + public Http_HttpVerb HttpMethod { get; set; } + + /// + /// The unique identifier for the action in UUIDv7 format. + /// + + [JsonPropertyName("id")] + public System.Guid Id { get; set; } + + /// + /// Whether the user, if supplied in the query, is authorized to perform the action. + /// + + [JsonPropertyName("isAuthorized")] + public bool? IsAuthorized { get; set; } + + /// + /// Indicates whether the action results in the dialog being deleted. Used by frontends to implement custom UX + ///
for delete actions. + ///
+ + [JsonPropertyName("isDeleteDialogAction")] + public bool IsDeleteDialogAction { get; set; } + + /// + /// Indicates a priority for the action, making it possible for frontends to adapt GUI elements based on action + ///
priority. + ///
+ + [JsonPropertyName("priority")] + [JsonConverter(typeof(JsonStringEnumConverter))] + public DialogsEntitiesActions_DialogGuiActionPriority Priority { get; set; } + + /// + /// If there should be a prompt asking the user for confirmation before the action is executed, + ///
this field should contain the prompt text. + ///
+ + [JsonPropertyName("prompt")] + public ICollection Prompt { get; set; } + + /// + /// The title of the action, this should be short and in verb form. + /// + + [JsonPropertyName("title")] + public ICollection Title { get; set; } + + /// + /// The fully qualified URL of the action, to which the user will be redirected when the action is triggered. + /// + + [JsonPropertyName("url")] + public System.Uri Url { get; set; } + + } + + [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "14.2.0.0 (NJsonSchema v11.1.0.0 (Newtonsoft.Json v13.0.0.0))")] + public partial class V1ServiceOwnerDialogsQueriesGet_DialogSeenLog + { + /// + /// The unique identifier for the seen log entry in UUIDv7 format. + /// + + [JsonPropertyName("id")] + public System.Guid Id { get; set; } + + /// + /// Flag indicating whether the seen log entry was created by the current end user, if provided in the query. + /// + + [JsonPropertyName("isCurrentEndUser")] + public bool IsCurrentEndUser { get; set; } + + /// + /// Flag indicating whether the seen log entry was created via the service owner. + ///
+ ///
This is used when the service owner uses the service owner API to implement its own frontend. + ///
+ + [JsonPropertyName("isViaServiceOwner")] + public bool? IsViaServiceOwner { get; set; } + + /// + /// The timestamp when the dialog revision was seen. + /// + + [JsonPropertyName("seenAt")] + public System.DateTimeOffset SeenAt { get; set; } + + /// + /// The actor that saw the dialog revision. + /// + + [JsonPropertyName("seenBy")] + public V1ServiceOwnerCommonActors_Actor SeenBy { get; set; } + + } + + [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "14.2.0.0 (NJsonSchema v11.1.0.0 (Newtonsoft.Json v13.0.0.0))")] + public partial class V1ServiceOwnerDialogsQueriesGet_DialogTransmission + { + /// + /// The transmission-level attachments. + /// + + [JsonPropertyName("attachments")] + public ICollection Attachments { get; set; } + + /// + /// Contains an authorization resource attributeId, that can used in custom authorization rules in the XACML service + ///
policy, which by default is the policy belonging to the service referred to by "serviceResource" in the dialog. + ///
+ ///
Can also be used to refer to other service policies. + ///
+ + [JsonPropertyName("authorizationAttribute")] + public string AuthorizationAttribute { get; set; } + + /// + /// The transmission unstructured text content. + /// + + [JsonPropertyName("content")] + public V1ServiceOwnerDialogsQueriesGet_DialogTransmissionContent Content { get; set; } + + /// + /// The date and time when the transmission was created. + /// + + [JsonPropertyName("createdAt")] + public System.DateTimeOffset CreatedAt { get; set; } + + /// + /// Arbitrary URI/URN describing a service-specific transmission type. + ///
+ ///
Refer to the service-specific documentation provided by the service owner for details (if in use). + ///
+ + [JsonPropertyName("extendedType")] + public System.Uri ExtendedType { get; set; } + + /// + /// The unique identifier for the transmission in UUIDv7 format. + /// + + [JsonPropertyName("id")] + public System.Guid Id { get; set; } + + /// + /// Flag indicating if the authenticated user supplied in the query is authorized for this transmission. + /// + + [JsonPropertyName("isAuthorized")] + public bool? IsAuthorized { get; set; } + + /// + /// Reference to any other transmission that this transmission is related to. + /// + + [JsonPropertyName("relatedTransmissionId")] + public System.Guid? RelatedTransmissionId { get; set; } + + /// + /// The actor that sent the transmission. + /// + + [JsonPropertyName("sender")] + public V1ServiceOwnerCommonActors_Actor Sender { get; set; } + + /// + /// The type of transmission. + /// + + [JsonPropertyName("type")] + [JsonConverter(typeof(JsonStringEnumConverter))] + public DialogsEntitiesTransmissions_DialogTransmissionType Type { get; set; } + + } + + [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "14.2.0.0 (NJsonSchema v11.1.0.0 (Newtonsoft.Json v13.0.0.0))")] + public partial class V1ServiceOwnerDialogsQueriesGet_DialogTransmissionAttachment + { + /// + /// The display name of the attachment that should be used in GUIs. + /// + + [JsonPropertyName("displayName")] + public ICollection DisplayName { get; set; } + + /// + /// The unique identifier for the attachment in UUIDv7 format. + /// + + [JsonPropertyName("id")] + public System.Guid Id { get; set; } + + /// + /// The URLs associated with the attachment, each referring to a different representation of the attachment. + /// + + [JsonPropertyName("urls")] + public ICollection Urls { get; set; } + + } + + [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "14.2.0.0 (NJsonSchema v11.1.0.0 (Newtonsoft.Json v13.0.0.0))")] + public partial class V1ServiceOwnerDialogsQueriesGet_DialogTransmissionAttachmentUrl + { + /// + /// The type of consumer the URL is intended for. + /// + + [JsonPropertyName("consumerType")] + [JsonConverter(typeof(JsonStringEnumConverter))] + public Attachments_AttachmentUrlConsumerType ConsumerType { get; set; } + + /// + /// The media type of the attachment. + /// + + [JsonPropertyName("mediaType")] + public string MediaType { get; set; } + + /// + /// The fully qualified URL of the attachment. Will be set to "urn:dialogporten:unauthorized" if the user is + ///
not authorized to access the transmission. + ///
+ + [JsonPropertyName("url")] + public System.Uri Url { get; set; } + + } + + [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "14.2.0.0 (NJsonSchema v11.1.0.0 (Newtonsoft.Json v13.0.0.0))")] + public partial class V1ServiceOwnerDialogsQueriesGet_DialogTransmissionContent + { + /// + /// Front-channel embedded content. Used to dynamically embed content in the frontend from an external URL. Must be HTTPS. + ///
Allowed media types: application/vnd.dialogporten.frontchannelembed+json;type=markdown + ///
+ + [JsonPropertyName("contentReference")] + public V1CommonContent_ContentValue ContentReference { get; set; } + + /// + /// The transmission summary. + /// + + [JsonPropertyName("summary")] + public V1CommonContent_ContentValue Summary { get; set; } + + /// + /// The transmission title. + /// + + [JsonPropertyName("title")] + public V1CommonContent_ContentValue Title { get; set; } + + } + + [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "14.2.0.0 (NJsonSchema v11.1.0.0 (Newtonsoft.Json v13.0.0.0))")] + public partial class V1ServiceOwnerDialogsQueriesGet_SearchTag + { + /// + /// A search tag value. + /// + + [JsonPropertyName("value")] + public string Value { get; set; } + + } + + [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "14.2.0.0 (NJsonSchema v11.1.0.0 (Newtonsoft.Json v13.0.0.0))")] + public partial class V1ServiceOwnerDialogsQueriesSearch_Content + { + /// + /// Used as the human-readable label used to describe the "ExtendedStatus" field. + /// + + [JsonPropertyName("extendedStatus")] + public V1CommonContent_ContentValue ExtendedStatus { get; set; } + + /// + /// Overridden sender name. If not supplied, assume "org" as the sender name. + /// + + [JsonPropertyName("senderName")] + public V1CommonContent_ContentValue SenderName { get; set; } + + /// + /// A short summary of the dialog and its current state. + /// + + [JsonPropertyName("summary")] + public V1CommonContent_ContentValue Summary { get; set; } + + /// + /// The title of the dialog. + /// + + [JsonPropertyName("title")] + public V1CommonContent_ContentValue Title { get; set; } + + } + + [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "14.2.0.0 (NJsonSchema v11.1.0.0 (Newtonsoft.Json v13.0.0.0))")] + public partial class V1ServiceOwnerDialogsQueriesSearch_Dialog + { + /// + /// The content of the dialog in search results. + /// + + [JsonPropertyName("content")] + public V1ServiceOwnerDialogsQueriesSearch_Content Content { get; set; } + + /// + /// The date and time when the dialog was created. + /// + + [JsonPropertyName("createdAt")] + public System.DateTimeOffset CreatedAt { get; set; } + + /// + /// The due date for the dialog. This is the last date when the dialog is expected to be completed. + /// + + [JsonPropertyName("dueAt")] + public System.DateTimeOffset? DueAt { get; set; } + + /// + /// Arbitrary string with a service-specific indicator of status, typically used to indicate a fine-grained state of + ///
the dialog to further specify the "status" enum. + ///
+ ///
Refer to the service-specific documentation provided by the service owner for details on the possible values (if + ///
in use). + ///
+ + [JsonPropertyName("extendedStatus")] + public string ExtendedStatus { get; set; } + + /// + /// Arbitrary string with a service-specific reference to an external system or service. + ///
+ ///
Refer to the service-specific documentation provided by the service owner for details (if in use). + ///
+ + [JsonPropertyName("externalReference")] + public string ExternalReference { get; set; } + + /// + /// The number of attachments in the dialog made available for browser-based frontends. + /// + + [JsonPropertyName("guiAttachmentCount")] + public int? GuiAttachmentCount { get; set; } + + /// + /// The unique identifier for the dialog in UUIDv7 format. + /// + + [JsonPropertyName("id")] + public System.Guid Id { get; set; } + + /// + /// The latest entry in the dialog's activity log. + /// + + [JsonPropertyName("latestActivity")] + public V1ServiceOwnerDialogsQueriesSearch_DialogActivity LatestActivity { get; set; } + + /// + /// The service owner code representing the organization (service owner) related to this dialog. + /// + + [JsonPropertyName("org")] + public string Org { get; set; } + + /// + /// The party code representing the organization or person that the dialog belongs to in URN format. + /// + + [JsonPropertyName("party")] + public string Party { get; set; } + + /// + /// Optional preceding process identifier to indicate the business process that preceded the process indicated in the "Process" field. Cannot be set without also "Process" being set. + /// + + [JsonPropertyName("precedingProcess")] + public string PrecedingProcess { get; set; } + + /// + /// Optional process identifier used to indicate a business process this dialog belongs to. + /// + + [JsonPropertyName("process")] + public string Process { get; set; } + + /// + /// Advisory indicator of progress, represented as 1-100 percentage value. 100% representing a dialog that has come + ///
to a natural completion (successful or not). + ///
+ + [JsonPropertyName("progress")] + public int? Progress { get; set; } + + /// + /// The unique identifier for the revision in UUIDv4 format. + /// + + [JsonPropertyName("revision")] + public System.Guid Revision { get; set; } + + /// + /// The list of seen log entries for the dialog newer than the dialog ChangedAt date. + /// + + [JsonPropertyName("seenSinceLastUpdate")] + public ICollection SeenSinceLastUpdate { get; set; } + + /// + /// The service identifier for the service that the dialog is related to in URN-format. + ///
This corresponds to a service resource in the Altinn Resource Registry. + ///
+ + [JsonPropertyName("serviceResource")] + public string ServiceResource { get; set; } + + /// + /// The ServiceResource type, as defined in Altinn Resource Registry (see ResourceType). + /// + + [JsonPropertyName("serviceResourceType")] + public string ServiceResourceType { get; set; } + + /// + /// The aggregated status of the dialog. + /// + + [JsonPropertyName("status")] + [JsonConverter(typeof(JsonStringEnumConverter))] + public DialogsEntities_DialogStatus Status { get; set; } + + /// + /// Current display state. + /// + + [JsonPropertyName("systemLabel")] + [JsonConverter(typeof(JsonStringEnumConverter))] + public DialogEndUserContextsEntities_SystemLabel SystemLabel { get; set; } + + /// + /// The date and time when the dialog was last updated. + /// + + [JsonPropertyName("updatedAt")] + public System.DateTimeOffset UpdatedAt { get; set; } + + /// + /// The timestamp when the dialog will be made visible for authorized end users. + /// + + [JsonPropertyName("visibleFrom")] + public System.DateTimeOffset? VisibleFrom { get; set; } + + } + + [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "14.2.0.0 (NJsonSchema v11.1.0.0 (Newtonsoft.Json v13.0.0.0))")] + public partial class V1ServiceOwnerDialogsQueriesSearch_DialogActivity + { + /// + /// The date and time when the activity was created. + /// + + [JsonPropertyName("createdAt")] + public System.DateTimeOffset? CreatedAt { get; set; } + + /// + /// Unstructured text describing the activity. Only set if the activity type is "Information". + /// + + [JsonPropertyName("description")] + public ICollection Description { get; set; } + + /// + /// An arbitrary string with a service-specific activity type. + ///
+ ///
Consult the service-specific documentation provided by the service owner for details (if in use). + ///
+ + [JsonPropertyName("extendedType")] + public System.Uri ExtendedType { get; set; } + + /// + /// The unique identifier for the activity in UUIDv7 format. + /// + + [JsonPropertyName("id")] + public System.Guid Id { get; set; } + + /// + /// The actor that performed the activity. + /// + + [JsonPropertyName("performedBy")] + public V1ServiceOwnerCommonActors_Actor PerformedBy { get; set; } + + /// + /// If the activity is related to a particular transmission, this field will contain the transmission identifier. + /// + + [JsonPropertyName("transmissionId")] + public System.Guid? TransmissionId { get; set; } + + /// + /// The type of activity. + /// + + [JsonPropertyName("type")] + [JsonConverter(typeof(JsonStringEnumConverter))] + public DialogsEntitiesActivities_DialogActivityType Type { get; set; } + + } + + [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "14.2.0.0 (NJsonSchema v11.1.0.0 (Newtonsoft.Json v13.0.0.0))")] + public partial class V1ServiceOwnerDialogsQueriesSearch_DialogSeenLog + { + /// + /// The unique identifier for the seen log entry in UUIDv7 format. + /// + + [JsonPropertyName("id")] + public System.Guid Id { get; set; } + + /// + /// Flag indicating whether the seen log entry was created by the end user supplied in the query. + /// + + [JsonPropertyName("isCurrentEndUser")] + public bool IsCurrentEndUser { get; set; } + + /// + /// Flag indicating whether the seen log entry was created via the service owner. + ///
+ ///
This is used when the service owner uses the service owner API to implement its own frontend. + ///
+ + [JsonPropertyName("isViaServiceOwner")] + public bool? IsViaServiceOwner { get; set; } + + /// + /// The timestamp when the dialog revision was seen. + /// + + [JsonPropertyName("seenAt")] + public System.DateTimeOffset SeenAt { get; set; } + + /// + /// The actor that saw the dialog revision. + /// + + [JsonPropertyName("seenBy")] + public V1ServiceOwnerCommonActors_Actor SeenBy { get; set; } + + } + + [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "14.2.0.0 (NJsonSchema v11.1.0.0 (Newtonsoft.Json v13.0.0.0))")] + public partial class V1ServiceOwnerDialogsUpdate_DialogRequest + { + + [JsonPropertyName("dto")] + public V1ServiceOwnerDialogsCommandsUpdate_Dialog Dto { get; set; } + + } + + [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "14.2.0.0 (NJsonSchema v11.1.0.0 (Newtonsoft.Json v13.0.0.0))")] + public partial class V1ServiceOwnerDialogTransmissionsCreate_TransmissionRequest + { + /// + /// The transmission-level attachments. + /// + + [JsonPropertyName("attachments")] + public ICollection Attachments { get; set; } + + /// + /// Contains an authorization resource attributeId, that can used in custom authorization rules in the XACML service + ///
policy, which by default is the policy belonging to the service referred to by "serviceResource" in the dialog. + ///
+ ///
Can also be used to refer to other service policies. + ///
+ + [JsonPropertyName("authorizationAttribute")] + public string AuthorizationAttribute { get; set; } + + /// + /// The transmission unstructured text content. + /// + + [JsonPropertyName("content")] + public V1ServiceOwnerDialogsCommandsUpdate_TransmissionContent Content { get; set; } + + /// + /// If supplied, overrides the creating date and time for the transmission. + ///
If not supplied, the current date /time will be used. + ///
+ + [JsonPropertyName("createdAt")] + public System.DateTimeOffset CreatedAt { get; set; } + + /// + /// Arbitrary URI/URN describing a service-specific transmission type. + ///
+ ///
Refer to the service-specific documentation provided by the service owner for details (if in use). + ///
+ + [JsonPropertyName("extendedType")] + public System.Uri ExtendedType { get; set; } + + /// + /// The UUDIv7 of the action may be provided to support idempotent additions to the list of transmissions. + ///
If not supplied, a new UUIDv7 will be generated. + ///
+ + [JsonPropertyName("id")] + public System.Guid? Id { get; set; } + + /// + /// Reference to any other transmission that this transmission is related to. + /// + + [JsonPropertyName("relatedTransmissionId")] + public System.Guid? RelatedTransmissionId { get; set; } + + /// + /// The actor that sent the transmission. + /// + + [JsonPropertyName("sender")] + public V1ServiceOwnerCommonActors_Actor Sender { get; set; } + + /// + /// The type of transmission. + /// + + [JsonPropertyName("type")] + [JsonConverter(typeof(JsonStringEnumConverter))] + public DialogsEntitiesTransmissions_DialogTransmissionType Type { get; set; } + + } + + [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "14.2.0.0 (NJsonSchema v11.1.0.0 (Newtonsoft.Json v13.0.0.0))")] + public partial class V1ServiceOwnerDialogTransmissionsQueriesGet_Attachment + { + /// + /// The display name of the attachment that should be used in GUIs. + /// + + [JsonPropertyName("displayName")] + public ICollection DisplayName { get; set; } + + /// + /// The unique identifier for the attachment in UUIDv7 format. + /// + + [JsonPropertyName("id")] + public System.Guid Id { get; set; } + + /// + /// The URLs associated with the attachment, each referring to a different representation of the attachment. + /// + + [JsonPropertyName("urls")] + public ICollection Urls { get; set; } + + } + + [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "14.2.0.0 (NJsonSchema v11.1.0.0 (Newtonsoft.Json v13.0.0.0))")] + public partial class V1ServiceOwnerDialogTransmissionsQueriesGet_AttachmentUrl + { + /// + /// The type of consumer the URL is intended for. + /// + + [JsonPropertyName("consumerType")] + [JsonConverter(typeof(JsonStringEnumConverter))] + public Attachments_AttachmentUrlConsumerType ConsumerType { get; set; } + + /// + /// The unique identifier for the attachment URL in UUIDv7 format. + /// + + [JsonPropertyName("id")] + public System.Guid Id { get; set; } + + /// + /// The media type of the attachment. + /// + + [JsonPropertyName("mediaType")] + public string MediaType { get; set; } + + /// + /// The fully qualified URL of the attachment. Will be set to "urn:dialogporten:unauthorized" if the user is + ///
not authorized to access the transmission. + ///
+ + [JsonPropertyName("url")] + public System.Uri Url { get; set; } + + } + + [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "14.2.0.0 (NJsonSchema v11.1.0.0 (Newtonsoft.Json v13.0.0.0))")] + public partial class V1ServiceOwnerDialogTransmissionsQueriesGet_Content + { + /// + /// Front-channel embedded content. Used to dynamically embed content in the frontend from an external URL. + ///
Allowed media types: application/vnd.dialogporten.frontchannelembed+json;type=markdown + ///
+ + [JsonPropertyName("contentReference")] + public V1CommonContent_ContentValue ContentReference { get; set; } + + /// + /// The summary of the content. + /// + + [JsonPropertyName("summary")] + public V1CommonContent_ContentValue Summary { get; set; } + + /// + /// The title of the content. + /// + + [JsonPropertyName("title")] + public V1CommonContent_ContentValue Title { get; set; } + + } + + [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "14.2.0.0 (NJsonSchema v11.1.0.0 (Newtonsoft.Json v13.0.0.0))")] + public partial class V1ServiceOwnerDialogTransmissionsQueriesGet_Transmission + { + /// + /// The attachments associated with the transmission. + /// + + [JsonPropertyName("attachments")] + public ICollection Attachments { get; set; } + + /// + /// The authorization attribute associated with the transmission. + /// + + [JsonPropertyName("authorizationAttribute")] + public string AuthorizationAttribute { get; set; } + + /// + /// The content of the transmission. + /// + + [JsonPropertyName("content")] + public V1ServiceOwnerDialogTransmissionsQueriesGet_Content Content { get; set; } + + /// + /// The date and time when the transmission was created. + /// + + [JsonPropertyName("createdAt")] + public System.DateTimeOffset CreatedAt { get; set; } + + /// + /// The date and time when the transmission was deleted, if applicable. + /// + + [JsonPropertyName("deletedAt")] + public System.DateTimeOffset? DeletedAt { get; set; } + + /// + /// The extended type URI for the transmission. + /// + + [JsonPropertyName("extendedType")] + public System.Uri ExtendedType { get; set; } + + /// + /// The unique identifier for the transmission in UUIDv7 format. + /// + + [JsonPropertyName("id")] + public System.Guid Id { get; set; } + + /// + /// The unique identifier for the related transmission, if any. + /// + + [JsonPropertyName("relatedTransmissionId")] + public System.Guid? RelatedTransmissionId { get; set; } + + /// + /// The sender actor information for the transmission. + /// + + [JsonPropertyName("sender")] + public V1ServiceOwnerCommonActors_Actor Sender { get; set; } + + /// + /// The type of the transmission. + /// + + [JsonPropertyName("type")] + [JsonConverter(typeof(JsonStringEnumConverter))] + public DialogsEntitiesTransmissions_DialogTransmissionType Type { get; set; } + + } + + [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "14.2.0.0 (NJsonSchema v11.1.0.0 (Newtonsoft.Json v13.0.0.0))")] + public partial class V1ServiceOwnerDialogTransmissionsQueriesSearch_Attachment + { + /// + /// The display name of the attachment that should be used in GUIs. + /// + + [JsonPropertyName("displayName")] + public ICollection DisplayName { get; set; } + + /// + /// The unique identifier for the attachment in UUIDv7 format. + /// + + [JsonPropertyName("id")] + public System.Guid Id { get; set; } + + /// + /// The URLs associated with the attachment, each referring to a different representation of the attachment. + /// + + [JsonPropertyName("urls")] + public ICollection Urls { get; set; } + + } + + [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "14.2.0.0 (NJsonSchema v11.1.0.0 (Newtonsoft.Json v13.0.0.0))")] + public partial class V1ServiceOwnerDialogTransmissionsQueriesSearch_AttachmentUrl + { + /// + /// The type of consumer the URL is intended for. + /// + + [JsonPropertyName("consumerType")] + [JsonConverter(typeof(JsonStringEnumConverter))] + public Attachments_AttachmentUrlConsumerType ConsumerType { get; set; } + + /// + /// The unique identifier for the attachment URL in UUIDv7 format. + /// + + [JsonPropertyName("id")] + public System.Guid Id { get; set; } + + /// + /// The media type of the attachment. + /// + + [JsonPropertyName("mediaType")] + public string MediaType { get; set; } + + /// + /// The fully qualified URL of the attachment. Will be set to "urn:dialogporten:unauthorized" if the user is + ///
not authorized to access the transmission. + ///
+ + [JsonPropertyName("url")] + public System.Uri Url { get; set; } + + } + + [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "14.2.0.0 (NJsonSchema v11.1.0.0 (Newtonsoft.Json v13.0.0.0))")] + public partial class V1ServiceOwnerDialogTransmissionsQueriesSearch_Content + { + /// + /// Front-channel embedded content. Used to dynamically embed content in the frontend from an external URL. + /// + + [JsonPropertyName("contentReference")] + public V1CommonContent_ContentValue ContentReference { get; set; } + + /// + /// The summary of the content. + /// + + [JsonPropertyName("summary")] + public V1CommonContent_ContentValue Summary { get; set; } + + /// + /// The title of the content. + /// + + [JsonPropertyName("title")] + public V1CommonContent_ContentValue Title { get; set; } + + } + + [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "14.2.0.0 (NJsonSchema v11.1.0.0 (Newtonsoft.Json v13.0.0.0))")] + public partial class V1ServiceOwnerDialogTransmissionsQueriesSearch_Transmission + { + /// + /// The attachments associated with the transmission. + /// + + [JsonPropertyName("attachments")] + public ICollection Attachments { get; set; } + + /// + /// The authorization attribute associated with the transmission. + /// + + [JsonPropertyName("authorizationAttribute")] + public string AuthorizationAttribute { get; set; } + + /// + /// The content of the transmission. + /// + + [JsonPropertyName("content")] + public V1ServiceOwnerDialogTransmissionsQueriesSearch_Content Content { get; set; } + + /// + /// The date and time when the transmission was created. + /// + + [JsonPropertyName("createdAt")] + public System.DateTimeOffset CreatedAt { get; set; } + + /// + /// The date and time when the transmission was deleted, if applicable. + /// + + [JsonPropertyName("deletedAt")] + public System.DateTimeOffset? DeletedAt { get; set; } + + /// + /// The extended type URI for the transmission. + /// + + [JsonPropertyName("extendedType")] + public System.Uri ExtendedType { get; set; } + + /// + /// The unique identifier for the transmission in UUIDv7 format. + /// + + [JsonPropertyName("id")] + public System.Guid Id { get; set; } + + /// + /// The unique identifier for the related transmission, if any. + /// + + [JsonPropertyName("relatedTransmissionId")] + public System.Guid? RelatedTransmissionId { get; set; } + + /// + /// The sender actor information for the transmission. + /// + + [JsonPropertyName("sender")] + public V1ServiceOwnerCommonActors_Actor Sender { get; set; } + + /// + /// The type of the transmission. + /// + + [JsonPropertyName("type")] + [JsonConverter(typeof(JsonStringEnumConverter))] + public DialogsEntitiesTransmissions_DialogTransmissionType Type { get; set; } + + } + + [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "14.2.0.0 (NJsonSchema v11.1.0.0 (Newtonsoft.Json v13.0.0.0))")] + public partial class V1WellKnownJwksQueriesGet_GetJwks + { + + [JsonPropertyName("keys")] + public ICollection Keys { get; set; } + + } + + [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "14.2.0.0 (NJsonSchema v11.1.0.0 (Newtonsoft.Json v13.0.0.0))")] + public partial class V1WellKnownJwksQueriesGet_Jwk + { + + [JsonPropertyName("alg")] + public string Alg { get; set; } + + [JsonPropertyName("crv")] + public string Crv { get; set; } + + [JsonPropertyName("kid")] + public string Kid { get; set; } + + [JsonPropertyName("kty")] + public string Kty { get; set; } + + [JsonPropertyName("use")] + public string Use { get; set; } + + [JsonPropertyName("x")] + public string X { get; set; } + + } + + [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "14.2.0.0 (NJsonSchema v11.1.0.0 (Newtonsoft.Json v13.0.0.0))")] + public partial class V1WellKnownOauthAuthorizationServerQueriesGet_GetOauthAuthorizationServer + { + + [JsonPropertyName("issuer")] + public string Issuer { get; set; } + + [JsonPropertyName("jwks_uri")] + public string Jwks_uri { get; set; } + + } + + +} + +#pragma warning restore 108 +#pragma warning restore 114 +#pragma warning restore 472 +#pragma warning restore 612 +#pragma warning restore 1573 +#pragma warning restore 1591 +#pragma warning restore 8073 +#pragma warning restore 3016 +#pragma warning restore 8603 +#pragma warning restore 8604 +#pragma warning restore 8625 diff --git a/src/Digdir.Library.Dialogporten.WebApiClient/Interfaces/IDialogportenClient.cs b/src/Digdir.Library.Dialogporten.WebApiClient/Interfaces/IDialogportenClient.cs new file mode 100644 index 000000000..ae355fb40 --- /dev/null +++ b/src/Digdir.Library.Dialogporten.WebApiClient/Interfaces/IDialogportenClient.cs @@ -0,0 +1,48 @@ +// using Altinn.Apiclient.Serviceowner.Interfaces; +// using Refit; +// +// namespace Digdir.Library.Dialogporten.WebApiClient.Interfaces; +// +// public interface IDialogportenClient +// { +// // Amund: Dette er et "lag" over refitter, har fjernes kindof versjon fra metodekallet og blir styrt av parameter. +// // Men om den er bare der for å rydde i metodenavn så er den unødvendig siden vi ikke rydder i typenavn? +// // Hvorfor ikke bare brukte refit direkte? Da er denne "SDKen" ekstremt liten. og egt bare en extension til ServiceCollection. +// // Det blir da ikke mye vedlikehold i forhold til at den har men funksjonalitet og abstraksjon +// // men er det da vits å ha refit her? og heller bare lage en dialogporten extension? +// // Amund: føler at jeg mister hvorfor denne skal lages, og hvilket behov den egt skal dekke. Im losing the plot. +// Task> GetDialogList( +// V1ServiceOwnerDialogsSearchSearchDialogQueryParams? param = null, +// CancellationToken cancellationToken = default); +// +// Task> GetDialog( +// Guid dialogId, +// string? endUserId = null, +// CancellationToken cancellationToken = default); +// +// Task> CreateDialog( +// V1ServiceOwnerDialogsCommandsCreate_DialogCommand createDialogCommand, +// CancellationToken cancellationToken = default); +// +// Task DeleteDialog( +// Guid dialogId, +// Guid? ifMatch, +// CancellationToken cancellationToken = default); +// +// Task PurgeDialog( +// Guid dialogId, +// Guid? ifMatch, +// CancellationToken cancellationToken = default); +// +// Task PatchDialog( +// Guid dialogId, +// IEnumerable PatchDocument, +// Guid? ifMatch, +// CancellationToken cancellationToken = default); +// +// Task UpdateDialog( +// Guid dialogId, +// V1ServiceOwnerDialogsCommandsUpdate_Dialog updateCommand, +// Guid? ifMatch, +// CancellationToken cancellationToken = default); +// } diff --git a/src/Digdir.Library.Dialogporten.WebApiClient/Interfaces/IDialogportenSettings.cs b/src/Digdir.Library.Dialogporten.WebApiClient/Interfaces/IDialogportenSettings.cs new file mode 100644 index 000000000..7cdb8651f --- /dev/null +++ b/src/Digdir.Library.Dialogporten.WebApiClient/Interfaces/IDialogportenSettings.cs @@ -0,0 +1,29 @@ +namespace Digdir.Library.Dialogporten.WebApiClient.Interfaces; + +public interface IDialogportenSettings +{ + /// + /// ClientID to use + /// + string ClientId { get; set; } + + /// + /// Scopes to request. Must be provisioned on the supplied client. + /// + string Scope { get; set; } + + /// + /// Resource claim for assertion. This will be the `aud`-claim in the received access token + /// + string Resource { get; set; } + + /// + /// The Maskinporten environment. Valid values are ver1, ver2, test or prod + /// + string Environment { get; set; } + + /// + /// Base64 Encoded Json Web Key + /// + string EncodedJwk { get; set; } +} diff --git a/src/Digdir.Library.Dialogporten.WebApiClient/Interfaces/IIdentifiable.cs b/src/Digdir.Library.Dialogporten.WebApiClient/Interfaces/IIdentifiable.cs new file mode 100644 index 000000000..20c0107a3 --- /dev/null +++ b/src/Digdir.Library.Dialogporten.WebApiClient/Interfaces/IIdentifiable.cs @@ -0,0 +1,7 @@ +namespace Digdir.Library.Dialogporten.WebApiClient.Interfaces; + +public interface IIdentifiable +{ + Guid Id { get; } + Guid RevisionId { get; } +} diff --git a/src/Digdir.Library.Dialogporten.WebApiClient/README.md b/src/Digdir.Library.Dialogporten.WebApiClient/README.md new file mode 100644 index 000000000..10c7eb3a5 --- /dev/null +++ b/src/Digdir.Library.Dialogporten.WebApiClient/README.md @@ -0,0 +1,196 @@ +# SO SDK + +Simple overview + +## Installation + +Install nuget + +## Usage + +Setup + +```C# +var configuration = new ConfigurationBuilder() + .AddJsonFile("appsettings.json", optional: false, reloadOnChange: true) + .Build(); + +var services = new ServiceCollection(); + +services.AddSingleton(configuration); + +services.AddDialogportenClient(); +services.AddDialogTokenVerifer(); +var dialogportenClient = serviceProvider.GetRequiredService(); +``` + +AppSettings + +```JSON +{ + "DialogportenSettings": { + "Environment": "test", + "Maskinporten": { + "ClientId": "ce3b732a-d4f2-4997-8545-adf8df70fe6c", + "Scope": "digdir:dialogporten.serviceprovider digdir:dialogporten.serviceprovider.search", + "EncodedJwk": "eyJwIjoieTRBZEhlVVBxdFEtSFlOWkR5ci0zS09RT3NQajA5TFh2a2hIUFlTdGFYNThkMndIWUJiVXlDTWdMYWtGTHo4UExKNWtscURsanRoczFtM1dFVGJhSWVuY25TalpjZTh4S1Q2SHh3bTNyaDlydWZ1TWVOZDRqaFptTm9WZmJrcGNXcVh0UDFvb1NPTE5zYUNVUWFUUEVKTXlFd3VhdWxMSzgxRG1SSTlMSmVNIiwia3R5IjoiUlNBIiwicSI6InFmOEQ2Uy1Kd19BdVQ0Q2hjQTlDek9WNk1uTW9mc1VCdTkteHJBcVFDRjh4WWZZOTRxQ1ZjQ3llajlkTlN3eXZUZXg1dThIMzNSaU1LMEFWM2tTQlpJLVZqcXJHLUx6YzNfTUlTTVpSVDJfbzNVQlRWVHpqTkUtSkpMX1hKaXJ6ZVhhQjM1UmFZMjFnWVhKQWg3X2tuR3dpRzF3MGxiT2ozQ0FzdnVwaU1BMCIsImQiOiJLVkF1b1Zhd2paTTgwenRYcUxSZUJGZkJ3M3pxVjdkUGFpaWFONWU0RFp6bW5MYTFMNEZJMTgtanVraHN4UVdqR1NFQnBIdTFrOHRPUWMyWjBsSDVaaTBydERqM0JKeEhxeDNsUGdYMWdTNXNiX1EyeXNfb2FKcklSX012MHBDQUFHX3hpa2lUY2kzTHMyeV9femV4QTdLbG0yalNmYW9Udzdhbml1R3RId1d5dHhCSnJnZ0J2c3loaHZIaUVQcnZaMHZBZldYYWI3QUtkUjc1cEtEaVVHOGdGNTdJN0hrWnpJSk9QYXp3MTU1Skx4TG9HcDVzeTFCVVpBNHRiQmlseWVsdG9ONGZINWd1aUktOXJjTE5zUmVYazJ1c3NFbE9EbVZ2Qmx2ZVVfb1ZRMVYtVDRJRnUzZk1BYVJGUFA2Wlo1akJJX2hkOFJOTTJ3eUp5UHVRWVEiLCJlIjoiQVFBQiIsInVzZSI6InNpZyIsImtpZCI6ImRpYWxvZ3BvcnRlbi1zcC1zZGstdGVzdC0yMDI0MTAxMCIsInFpIjoiQm9VS0RlczQ0UTNpXzNyT3Q4aHRrS2NxWkFNem00Njl2cTZuQnJVcHBTU1Ric3YwalZwN1daRGRRR0Q0bU8yMVJVOEFUbmN3NjFPOUt3YXktOGloX082VWFWbGxZN3NHYlVrQ2NVaG43ZDkzSElLZnhybnhWVE9nNUNMWTBka2Zwa3A1V2pyU1VvMTVKQURsY3BRM0ItRlU0Nm9PTG9ydjJ0SVFQekE4OF93IiwiZHAiOiJ1emVaRWZpN2Fqa3JFREhYekZtTThXWFUtZ3RmM1ctN0pnY082MnpWc1JrNTN4QlcxTE1NZlRlN2tlWk9xOEhDN3hTbGktSm9idnR6WGU3Y295ZW9sTXkzTnlydXFhQVp4VTBPMHpHQWQ4UFdjdHNXeDlITHlrU1hNby1QVlVNNkpmZERCaWFtcXk5bGQ0WTRfdzlscEdVWEMyaUFwLXdsWktaSHdrbG1KR3MiLCJhbGciOiJSUzI1NiIsImRxIjoiVENBcV9DMlJuX0RhakRlcUU2aUIzWWVWNVNtMHBMQk1Tbm10OHNENEp3ZVo4YWgzcGhrTFVxUm9qVGw1SDNhYXVtWl9UUmxiaWVNSVFnWDh4UUFnZ1l2YkNYeG9oZEx0aGt3ckZZdlp0WjBEeHJDYm9Md1hjc0Y3Ukwyejl4LWMwSFBGVFAzLVREQWF6UWlBNVVtRmNwYnAzeDYzWGFLSWFuYnVFc0NiSDdFIiwibiI6Imh5Sks4WnE2Wk8tRjFSSklVWVNCdUpfeG9RWkNNV1EyTVhrSFQ1bVROVVJJZmVWWWpCNWMwMzI0Uk5nc3ZPMEtXX0hUejRRSnptLV9rU1VaZ0h1Z2JoR0F3a1Vqc1lwTlJJRTBvLVNtdEExMlMxZHVCZWx6ajg2LVFrZkFzeFlwblNnSzl5OXpTS1B0YVlzMS1EcEVIb0hVdk9BSDJlNktFTXRaYUZPM0J0Yk9WUURXMENMYi1FY0UyaDBQRlFMMUp3NU8zeDhHcXBZeUFhamNoWnptcWlFbjBaSEd1QTNZZ1NyNGxQV1lkTzBNWHZmRFdyaFBTcnVTS3FodzBHMTlBRUpHOFhoek9xTWxLTUFIbW5ybk9XOHM2cWR2Sy1UQ1BiVGJJOU5XUWdFd2JpUFBBdlU0MUFITzZmTEYxUHZzQ3FhNjZTSGdYMkJzS3pvNVhORjhodyJ9" + } + }, + // Ed25519 keys for validating dialog tokens + "Ed25519Keys": { + "Primary": { + "Kid": "", + "PublicComponent": "" + }, + "Secondary": { + "Kid": "", + "PublicComponent": "" + } + } +} +``` + +Basic usage + +```C# +// Basic Usage example + +// Create a dialog +var createDialogCommand = new V1ServiceOwnerDialogsCommandsCreate_DialogCommand +{ + // createDialogCommand.Id = Guid.Parse("01927a6d-40d8-728b-b3da-845b680840d9"); + ServiceResource = "urn:altinn:resource:super-simple-service", + Party = "urn:altinn:person:identifier-no:14886498226", + SystemLabel = DialogEndUserContextsEntities_SystemLabel.Default, + Status = DialogsEntities_DialogStatus.New, + Progress = 2, + Content = new V1ServiceOwnerDialogsCommandsCreate_Content + { + Title = new V1CommonContent_ContentValue + { + Value = + [ + new V1CommonLocalizations_Localization + { + LanguageCode = "nb", + Value = "Hoved" + }, + new V1CommonLocalizations_Localization + { + LanguageCode = "en", + Value = "Main" + } + ], + MediaType = "text/plain" + }, + Summary = new V1CommonContent_ContentValue + { + Value = + [ + new V1CommonLocalizations_Localization + { + LanguageCode = "nb", + Value = "Hoved Summary" + }, + new V1CommonLocalizations_Localization + { + LanguageCode = "en", + Value = "Main Summary" + } + ], + MediaType = "text/plain" + } + + + }, + Transmissions = + [ + new V1ServiceOwnerDialogsCommandsCreate_Transmission + { + Attachments = + [ + new V1ServiceOwnerDialogsCommandsCreate_TransmissionAttachment + { + DisplayName = + [ + new V1CommonLocalizations_Localization + { + LanguageCode = "nb", + Value = "Hoved misson" + } + ], + Urls = + [ + new V1ServiceOwnerDialogsCommandsCreate_TransmissionAttachmentUrl + { + ConsumerType = Attachments_AttachmentUrlConsumerType.Gui, + Url = new Uri("https://digdir.apps.tt02.altinn.no/some-other-url") + } + ] + + } + ], + Content = new V1ServiceOwnerDialogsCommandsCreate_TransmissionContent + { + Summary = new V1CommonContent_ContentValue + { + MediaType = "text/plain", + Value = + [ + new V1CommonLocalizations_Localization + { + LanguageCode = "nb", + Value = "Tranmission summary" + } + ] + }, + Title = new V1CommonContent_ContentValue + { + MediaType = "text/plain", + Value = + [ + new V1CommonLocalizations_Localization + { + LanguageCode = "nb", + Value = "Tranmission Title" + } + ] + } + }, + Sender = new V1ServiceOwnerCommonActors_Actor + { + ActorType = Actors_ActorType.ServiceOwner + }, + Type = DialogsEntitiesTransmissions_DialogTransmissionType.Information + } + ] +}; +var response = await dialogportenClient.DialogsPost(createDialogCommand); +if (response.IsSuccessStatusCode) +{ + Console.WriteLine(response.StatusCode); + string guid = response.Content; +} +``` + +```C# +// Patch Dialog +List patchDocument = +[ + new() + { + Op = "replace", + OperationType = JsonPatchOperations_OperationType.Replace, + Path = "/progress", + Value = 50 + } +]; +var patchResponse = await dialogportenClient.V1ServiceOwnerDialogsPatchDialog(guid, patchDocument, null); +Console.WriteLine(patchResponse.IsSuccessStatusCode); +Console.WriteLine(patchResponse.StatusCode); +``` + +API REFERENCE/STRUCTURE + + +Links to changelog etc. diff --git a/src/Digdir.Library.Dialogporten.WebApiClient/Services/Base64Url.cs b/src/Digdir.Library.Dialogporten.WebApiClient/Services/Base64Url.cs new file mode 100644 index 000000000..910bbc705 --- /dev/null +++ b/src/Digdir.Library.Dialogporten.WebApiClient/Services/Base64Url.cs @@ -0,0 +1,45 @@ +using System.Buffers.Text; + +namespace Digdir.Library.Dialogporten.WebApiClient.Services; + +public static class Base64Url +{ + public static int GetMaxEncodedToUtf8Length(int length) => (length + 2) / 3 * 4; + + public static void Encode(ReadOnlySpan data, Span destination, out int bytesWritten) + { + Base64.EncodeToUtf8(data, destination, out _, out bytesWritten); + for (var i = 0; i < bytesWritten; i++) + { + destination[i] = destination[i] switch + { + (byte)'+' => (byte)'-', + (byte)'/' => (byte)'_', + _ => destination[i] + }; + } + + while (bytesWritten > 0 && destination[bytesWritten - 1] == '=') + { + bytesWritten--; + } + } + + public static byte[] Decode(string input) + { + var output = input.Replace('-', '+').Replace('_', '/'); + switch (output.Length % 4) + { + case 0: break; + case 2: + output += "=="; + break; + case 3: + output += "="; + break; + default: + throw new ArgumentException("Illegal base64url string", nameof(input)); + } + return Convert.FromBase64String(output); + } +} diff --git a/src/Digdir.Library.Dialogporten.WebApiClient/Services/DialogTokenVerifier.cs b/src/Digdir.Library.Dialogporten.WebApiClient/Services/DialogTokenVerifier.cs new file mode 100644 index 000000000..7baf0ab2a --- /dev/null +++ b/src/Digdir.Library.Dialogporten.WebApiClient/Services/DialogTokenVerifier.cs @@ -0,0 +1,68 @@ +using System.Text; +using System.Text.Json; +using NSec.Cryptography; + +namespace Digdir.Library.Dialogporten.WebApiClient.Services; + +public sealed class DialogTokenVerifier(string kid, PublicKey publicKey) +{ + public bool Verify(string token) + { + var parts = token.Split('.'); + if (parts.Length != 3) return false; + var header = Base64Url.Decode(parts[0]); + + var headerJson = JsonSerializer.Deserialize(header); + if (headerJson.TryGetProperty("kid", out var value)) + { + if (value.GetString() != kid) return false; + } + else + { + return false; + } + var signature = Base64Url.Decode(parts[2]); + return SignatureAlgorithm.Ed25519.Verify(publicKey, Encoding.UTF8.GetBytes(parts[0] + '.' + parts[1]), signature); + + } + public static Dictionary GetDialogTokenClaims(string token) + { + var claims = new Dictionary(); + + var parts = token.Split('.'); + if (parts.Length != 3) + { + throw new ArgumentException("Invalid dialog token"); + } + + var bodyJson = JsonSerializer.Deserialize(Base64Url.Decode(parts[1])); + + var fieldsInfo = typeof(DialogTokenClaimTypes).GetFields().Where(f => f.FieldType == typeof(string)); + + foreach (var fieldInfo in fieldsInfo) + { + var value = fieldInfo.GetValue("string"); + if (value != null && bodyJson.TryGetProperty(value.ToString()!, out var jsonValue)) + { + claims.Add(value.ToString()!, jsonValue); + } + } + return claims; + } +} + +public static class DialogTokenClaimTypes +{ + public const string JwtId = "jti"; + public const string Issuer = "iss"; + public const string IssuedAt = "iat"; + public const string NotBefore = "nbf"; + public const string Expires = "exp"; + public const string AuthenticationLevel = "l"; + public const string AuthenticatedParty = "c"; + public const string DialogParty = "p"; + public const string SupplierParty = "u"; + public const string ServiceResource = "s"; + public const string DialogId = "i"; + public const string Actions = "a"; +} diff --git a/tests/Digdir.Library.Dialogporten.WebApiClient.Integration.Tests/.refitter b/tests/Digdir.Library.Dialogporten.WebApiClient.Integration.Tests/.refitter new file mode 100644 index 000000000..d0319a8d5 --- /dev/null +++ b/tests/Digdir.Library.Dialogporten.WebApiClient.Integration.Tests/.refitter @@ -0,0 +1,14 @@ +{ + "openApiPath": "../../docs/schema/V1/swagger.verified.json", + "namespace": "Digdir.Library.Dialogporten.WebApiClient.Features.V1", + "outputFolder": "refitter", + "operationNameGenerator": "SingleClientFromOperationId", + "multipleInterfaces": "ByTag", + "includeTags": [ + "Serviceowner" + ], + "useCancellationTokens": true, + "returnIApiResponse": true, + "useDynamicQuerystringParameters": true, + "outputFilename": "RefitterInterface.cs" +} diff --git a/tests/Digdir.Library.Dialogporten.WebApiClient.Integration.Tests/Digdir.Library.Dialogporten.WebApiClient.Integration.Tests.csproj b/tests/Digdir.Library.Dialogporten.WebApiClient.Integration.Tests/Digdir.Library.Dialogporten.WebApiClient.Integration.Tests.csproj new file mode 100644 index 000000000..2a00c6d4d --- /dev/null +++ b/tests/Digdir.Library.Dialogporten.WebApiClient.Integration.Tests/Digdir.Library.Dialogporten.WebApiClient.Integration.Tests.csproj @@ -0,0 +1,31 @@ + + + + net9.0 + enable + enable + false + + + + + + + + all + runtime; build; native; contentfiles; analyzers; buildtransitive + + + + + + + + + + + + + + + diff --git a/tests/Digdir.Library.Dialogporten.WebApiClient.Integration.Tests/RefitterInterfaceTests.cs b/tests/Digdir.Library.Dialogporten.WebApiClient.Integration.Tests/RefitterInterfaceTests.cs new file mode 100644 index 000000000..0b78f0b49 --- /dev/null +++ b/tests/Digdir.Library.Dialogporten.WebApiClient.Integration.Tests/RefitterInterfaceTests.cs @@ -0,0 +1,66 @@ +namespace Digdir.Library.Dialogporten.WebApiClient.Integration.Tests; + +public sealed class RefitterInterfaceTests : IDisposable +{ + + [Fact] + public async Task FailIfRefitterInterfaceDoesNotMatch() + { + // Amund: prøv mæ mocka filesystem. det e litt for kult te å ikk prøve vartfall. + // ser ut som det er vrient å bruke verify sammen med mocka filesystem + // Constructor, dispose. Ser ut som å være en decent måte å takle cleanup på. Funker ikke når testen feiler så dør processen. + // Async dispose ikke lagt til enda. kommer i v3. som nå er i alpha/beta enda + // men AsyncLifetime er i V2. + var rootPath = GetSolutionRootFolder(); + var webApiClientPath = Path.Combine(rootPath!, "src/Digdir.Library.Dialogporten.WebApiClient/Features/V1"); + var currentDirectory = Path.Combine(rootPath!, "tests/Digdir.Library.Dialogporten.WebApiClient.Integration.Tests"); + var newRifitterPath = Path.Combine(currentDirectory, "refitter/RefitterInterface.cs"); + var newRefitter = File.ReadAllText(newRifitterPath); + // Den feiler og viser diff samtidig. testene er av definisjon ferdig når diff vises. er det noe måte å unngå dette på? + // Den lager bare fil om den feiler. er det noe som kan skrus av? + // Om den feiler ved en diff så må den kjøres på nytt uansett. det e egt litt skuffed. men jaja. + // Træng i da egt å fjerne fila eller feil? + // treng da egt bære å fjerne om den finnes fra en gammel runde. altså slett før verify + Assert.True(File.Exists(newRifitterPath)); + await Verify(newRefitter, extension: "cs") + .UseFileName("RefitterInterface") + .UseDirectory(webApiClientPath) + .OnVerify( + before: () => { }, + after: () => + { + // Funke ikkje! DEN FÆILE OG ÅPNE DIFF! + // var path = Path.Combine(webApiClientPath, "RefitterInterface.received.cs"); + // if (File.Exists(path)) + // { + // File.Delete(path); + // } + // if (File.Exists(newRifitterPath)) + // { + // File.Delete(newRifitterPath); + // } + // Assert.False(File.Exists(newRifitterPath)); + }); + } + private static string? GetSolutionRootFolder() + { + var currentDirectory = Directory.GetCurrentDirectory(); + var solutionFolder = currentDirectory; + while (solutionFolder != null && Directory.GetFiles(solutionFolder, "*.sln").Length == 0) + { + solutionFolder = Directory.GetParent(solutionFolder)?.FullName; + } + return solutionFolder; + } + + public void Dispose() + { + // var rootPath = GetSolutionRootFolder(); + // var webApiClientPath = Path.Combine(rootPath!, "src/Digdir.Library.Dialogporten.WebApiClient/Features/V1"); + // var path = Path.Combine(webApiClientPath, "RefitterInterface.received.cs"); + // if (File.Exists(path)) + // { + // File.Delete(path); + // } + } +} diff --git a/tests/Digdir.Library.Dialogporten.WebApiClient.Integration.Tests/refitter/RefitterInterface.cs b/tests/Digdir.Library.Dialogporten.WebApiClient.Integration.Tests/refitter/RefitterInterface.cs new file mode 100644 index 000000000..6868d316a --- /dev/null +++ b/tests/Digdir.Library.Dialogporten.WebApiClient.Integration.Tests/refitter/RefitterInterface.cs @@ -0,0 +1,5818 @@ +// +// This code was generated by Refitter. +// + + +using Refit; +using System.Collections.Generic; +using System.Text.Json.Serialization; +using System.Threading; +using System.Threading.Tasks; + +#nullable enable annotations + +namespace Digdir.Library.Dialogporten.WebApiClient.Features.V1 +{ + public class V1ServiceOwnerDialogsSearchSearchDialogQueryParams + { + + /// + /// Filter by one or more service resources + /// + [Query(CollectionFormat.Multi)] + public IEnumerable ServiceResource { get; set; } + + /// + /// Filter by one or more owning parties + /// + [Query(CollectionFormat.Multi)] + public IEnumerable Party { get; set; } + + /// + /// Filter by end user id + /// + [Query] + public string EndUserId { get; set; } + + /// + /// Filter by one or more extended statuses + /// + [Query(CollectionFormat.Multi)] + public IEnumerable ExtendedStatus { get; set; } + + /// + /// Filter by external reference + /// + [Query] + public string ExternalReference { get; set; } + + /// + /// Filter by status + /// + [Query(CollectionFormat.Multi)] + public IEnumerable Status { get; set; } + + /// + /// Only return dialogs created after this date + /// + [Query] + public System.DateTimeOffset? CreatedAfter { get; set; } + + /// + /// Only return dialogs created before this date + /// + [Query] + public System.DateTimeOffset? CreatedBefore { get; set; } + + /// + /// Only return dialogs updated after this date + /// + [Query] + public System.DateTimeOffset? UpdatedAfter { get; set; } + + /// + /// Only return dialogs updated before this date + /// + [Query] + public System.DateTimeOffset? UpdatedBefore { get; set; } + + /// + /// Only return dialogs with due date after this date + /// + [Query] + public System.DateTimeOffset? DueAfter { get; set; } + + /// + /// Only return dialogs with due date before this date + /// + [Query] + public System.DateTimeOffset? DueBefore { get; set; } + + /// + /// Only return dialogs with visible-from date after this date + /// + [Query] + public System.DateTimeOffset? VisibleAfter { get; set; } + + /// + /// Only return dialogs with visible-from date before this date + /// + [Query] + public System.DateTimeOffset? VisibleBefore { get; set; } + + /// + /// Filter by process + /// + [Query] + public string Process { get; set; } + + /// + /// Filter by Display state + /// + [Query(CollectionFormat.Multi)] + public IEnumerable SystemLabel { get; set; } + + /// + /// Search string for free text search. Will attempt to fuzzily match in all free text fields in the aggregate + /// + [Query] + public string Search { get; set; } + + /// + /// Limit free text search to texts with this language code, e.g. 'no', 'en'. Culture codes will be normalized to neutral language codes (ISO 639). Default: search all culture codes + /// + [Query] + public string SearchLanguageCode { get; set; } + + [Query] + public OrderSetOfTOrderDefinitionAndTTarget OrderBy { get; set; } + + /// + /// Supply "continuationToken" for the response to get the next page of results, if hasNextPage is true + /// + [Query] + public ContinuationTokenSetOfTOrderDefinitionAndTTarget ContinuationToken { get; set; } + + /// + /// Limit the number of results per page (1-1000, default: 100) + /// + [Query] + public int? Limit { get; set; } + + } + + public class V1ServiceOwnerDialogActivitiesNotificationConditionNotificationConditionQueryParams + { + public V1ServiceOwnerDialogActivitiesNotificationConditionNotificationConditionQueryParams(V1ServiceOwnerDialogActivitiesQueriesNotificationCondition_NotificationConditionType conditionType, DialogsEntitiesActivities_DialogActivityType activityType) + { + + ConditionType = conditionType; + ActivityType = activityType; + } + + [Query] + public V1ServiceOwnerDialogActivitiesQueriesNotificationCondition_NotificationConditionType ConditionType { get; set; } + + [Query] + public DialogsEntitiesActivities_DialogActivityType ActivityType { get; set; } + + [Query] + public System.Guid? TransmissionId { get; set; } + + } + + /// Gets a list of dialogs + [System.CodeDom.Compiler.GeneratedCode("Refitter", "1.4.1.0")] + public partial interface IServiceownerApi + { + /// Gets a list of dialogs + /// + /// Performs a search for dialogs, returning a paginated list of dialogs. For more information see the documentation (link TBD). + /// + /// * All date parameters must contain explicit time zone. Example: 2023-10-27T10:00:00Z or 2023-10-27T10:00:00+01:00 + /// * See "continuationToken" in the response for how to get the next page of results. + /// * hasNextPage will be set to true if there are more items to get. + /// + /// The dynamic querystring parameter wrapping all others. + /// + /// A representing the instance containing the result: + /// + /// + /// Status + /// Description + /// + /// + /// 200 + /// Successfully returned the dialog list. + /// + /// + /// 401 + /// Missing or invalid authentication token. Requires a Maskinporten-token with the scope \"digdir:dialogporten.serviceprovider.search\". + /// + /// + /// + [Headers("Accept: application/json")] + [Get("/api/v1/serviceowner/dialogs")] + Task> V1ServiceOwnerDialogsSearchSearchDialog([Query] V1ServiceOwnerDialogsSearchSearchDialogQueryParams queryParams, CancellationToken cancellationToken = default); + + /// Creates a new dialog + /// + /// The dialog is created with the given configuration. For more information see the documentation (link TBD). + /// + /// For detailed information on validation rules, see [the source for CreateDialogCommandValidator](https://github.com/digdir/dialogporten/blob/main/src/Digdir.Domain.Dialogporten.Application/Features/V1/ServiceOwner/Dialogs/Commands/Create/CreateDialogCommandValidator.cs) + /// + /// + /// A representing the instance containing the result: + /// + /// + /// Status + /// Description + /// + /// + /// 201 + /// The UUID of the created the dialog aggregate. A relative URL to the newly created activity is set in the \"Location\" header. + /// + /// + /// 400 + /// Validation error occured. See problem details for a list of errors. + /// + /// + /// 401 + /// Missing or invalid authentication token. Requires a Maskinporten-token with the scope \"digdir:dialogporten.serviceprovider\". + /// + /// + /// 403 + /// Unauthorized to create a dialog for the given serviceResource (not owned by authenticated organization or has additional scope requirements defined in policy). + /// + /// + /// 422 + /// Domain error occured. See problem details for a list of errors. + /// + /// + /// + [Headers("Accept: application/json, application/problem+json")] + [Post("/api/v1/serviceowner/dialogs")] + Task> V1ServiceOwnerDialogsCreateDialog([Body, AliasAs("CreateDialogCommand")] V1ServiceOwnerDialogsCommandsCreate_DialogCommand createDialogCommand, CancellationToken cancellationToken = default); + + /// Deletes a dialog + /// + /// Deletes a given dialog (soft delete). For more information see the documentation (link TBD). + /// + /// Note that the dialog will still be available on the single details endpoint, but will have a deleted status. It will not appear on the list endpoint for either service owners nor end users. + /// If end users attempt to access the dialog via the details endpoint, they will get a 410 Gone response. + /// + /// Optimistic concurrency control is implemented using the If-Match header. Supply the Revision value from the GetDialog endpoint to ensure that the dialog is not deleted by another request in the meantime. + /// + /// + /// A representing the instance containing the result: + /// + /// + /// Status + /// Description + /// + /// + /// 204 + /// The dialog aggregate was deleted successfully. + /// + /// + /// 401 + /// Missing or invalid authentication token. Requires a Maskinporten-token with the scope \"digdir:dialogporten.serviceprovider\". + /// + /// + /// 403 + /// Unauthorized to delete the supplied dialog (not owned by authenticated organization or has additional scope requirements defined in policy). + /// + /// + /// 404 + /// The given dialog ID was not found or is already deleted. + /// + /// + /// 412 + /// The supplied If-Match header did not match the current Revision value for the dialog. The request was not applied. + /// + /// + /// + [Headers("Accept: application/problem+json")] + [Delete("/api/v1/serviceowner/dialogs/{dialogId}")] + Task V1ServiceOwnerDialogsDeleteDialog(System.Guid dialogId, [Header("if-Match")] System.Guid? if_Match, CancellationToken cancellationToken = default); + + /// Gets a single dialog + /// + /// Gets a single dialog aggregate. For more information see the documentation (link TBD). + /// + /// Note that this operation may return deleted dialogs (see the field `DeletedAt`). + /// + /// Filter by end user id + /// + /// A representing the instance containing the result: + /// + /// + /// Status + /// Description + /// + /// + /// 200 + /// Successfully returned the dialog aggregate. + /// + /// + /// 401 + /// Missing or invalid authentication token. Requires a Maskinporten-token with the scope \"digdir:dialogporten.serviceprovider\". + /// + /// + /// 403 + /// Unauthorized to get the supplied dialog (not owned by authenticated organization or has additional scope requirements defined in policy). + /// + /// + /// 404 + /// The given dialog ID was not found or is already deleted. + /// + /// + /// + [Headers("Accept: application/json, application/problem+json")] + [Get("/api/v1/serviceowner/dialogs/{dialogId}")] + Task> V1ServiceOwnerDialogsGetGetDialog(System.Guid dialogId, [Query] string endUserId, CancellationToken cancellationToken = default); + + /// Patch a single dialog + /// + /// Patches a dialog aggregate with a RFC6902 JSON Patch document. The patch document must be a JSON array of RFC6902 operations. + /// See [https://tools.ietf.org/html/rfc6902](https://tools.ietf.org/html/rfc6902) for more information. + /// + /// Optimistic concurrency control is implemented using the If-Match header. Supply the Revision value from the GetDialog endpoint to ensure that the dialog is not modified/deleted by another request in the meantime. + /// + /// + /// A representing the instance containing the result: + /// + /// + /// Status + /// Description + /// + /// + /// 204 + /// Patch was successfully applied. + /// + /// + /// 400 + /// Validation error occured. See problem details for a list of errors. + /// + /// + /// 401 + /// Missing or invalid authentication token. Requires a Maskinporten-token with the scope \\\"digdir:dialogporten.serviceprovider\\\" + /// + /// + /// 403 + /// Unauthorized to update a dialog for the given serviceResource (not owned by authenticated organization or has additional scope requirements defined in policy) + /// + /// + /// 404 + /// The given dialog ID was not found or is deleted + /// + /// + /// 412 + /// The supplied Revision does not match the current Revision of the dialog + /// + /// + /// 422 + /// Domain error occured. See problem details for a list of errors. + /// + /// + /// + [Headers("Accept: application/json")] + [Patch("/api/v1/serviceowner/dialogs/{dialogId}")] + Task V1ServiceOwnerDialogsPatchDialog(System.Guid dialogId, [Body] IEnumerable patchDocument, [Header("If-Match")] System.Guid? etag, CancellationToken cancellationToken = default); + + /// Replaces a dialog + /// + /// Replaces a given dialog with the supplied model. For more information see the documentation (link TBD). + /// + /// Optimistic concurrency control is implemented using the If-Match header. Supply the Revision value from the GetDialog endpoint to ensure that the dialog is not modified/deleted by another request in the meantime. + /// + /// + /// A representing the instance containing the result: + /// + /// + /// Status + /// Description + /// + /// + /// 204 + /// The dialog aggregate was updated successfully. + /// + /// + /// 400 + /// Validation error occured. See problem details for a list of errors. + /// + /// + /// 401 + /// Missing or invalid authentication token. Requires a Maskinporten-token with the scope \"digdir:dialogporten.serviceprovider\". + /// + /// + /// 403 + /// Unauthorized to update the supplied dialog (not owned by authenticated organization or has additional scope requirements defined in policy). + /// + /// + /// 404 + /// The given dialog ID was not found or is already deleted. + /// + /// + /// 412 + /// The supplied If-Match header did not match the current Revision value for the dialog. The request was not applied. + /// + /// + /// 422 + /// Domain error occured. See problem details for a list of errors. + /// + /// + /// + [Headers("Accept: application/problem+json")] + [Put("/api/v1/serviceowner/dialogs/{dialogId}")] + Task V1ServiceOwnerDialogsUpdateDialog(System.Guid dialogId, [Body] V1ServiceOwnerDialogsCommandsUpdate_Dialog dto, [Header("if-Match")] System.Guid? if_Match, CancellationToken cancellationToken = default); + + /// Permanently deletes a dialog + /// + /// Deletes a given dialog (hard delete). For more information see the documentation (link TBD). + /// + /// Optimistic concurrency control is implemented using the If-Match header. Supply the Revision value from the GetDialog endpoint to ensure that the dialog is not deleted by another request in the meantime. + /// + /// + /// A representing the instance containing the result: + /// + /// + /// Status + /// Description + /// + /// + /// 204 + /// The dialog aggregate was deleted successfully. + /// + /// + /// 401 + /// Missing or invalid authentication token. Requires a Maskinporten-token with the scope \"digdir:dialogporten.serviceprovider\". + /// + /// + /// 403 + /// Unauthorized to delete the supplied dialog (not owned by authenticated organization or has additional scope requirements defined in policy). + /// + /// + /// 404 + /// The given dialog ID was not found or is already deleted. + /// + /// + /// 412 + /// The supplied If-Match header did not match the current Revision value for the dialog. The request was not applied. + /// + /// + /// + [Headers("Accept: application/problem+json")] + [Post("/api/v1/serviceowner/dialogs/{dialogId}/actions/purge")] + Task V1ServiceOwnerDialogsPurgePurgeDialog(System.Guid dialogId, [Header("if-Match")] System.Guid? if_Match, CancellationToken cancellationToken = default); + + /// Returns a boolean value based on conditions used to determine if a notification is to be sent + /// Used by Altinn Notification only. Takes a dialogId and returns a boolean value based on conditions used to determine if a notification is to be sent. + /// The dynamic querystring parameter wrapping all others. + /// + /// A representing the instance containing the result: + /// + /// + /// Status + /// Description + /// + /// + /// 200 + /// Successfully returned the notification determination. + /// + /// + /// 401 + /// Missing or invalid authentication token. Requires a Maskinporten-token with the scope \"altinn:system/notifications.condition.check\". + /// + /// + /// 403 + /// Forbidden + /// + /// + /// + [Headers("Accept: application/json")] + [Get("/api/v1/serviceowner/dialogs/{dialogId}/actions/should-send-notification")] + Task> V1ServiceOwnerDialogActivitiesNotificationConditionNotificationCondition(System.Guid dialogId, [Query] V1ServiceOwnerDialogActivitiesNotificationConditionNotificationConditionQueryParams queryParams, CancellationToken cancellationToken = default); + + /// Gets a list of dialog activities + /// Gets the list of activities belonging to a dialog + /// + /// A representing the instance containing the result: + /// + /// + /// Status + /// Description + /// + /// + /// 200 + /// Successfully returned the dialog activity list. + /// + /// + /// 401 + /// Missing or invalid authentication token. Requires a Maskinporten-token with the scope \"digdir:dialogporten.serviceprovider\". + /// + /// + /// 403 + /// Unauthorized to get the supplied dialog (not owned by authenticated organization or has additional scope requirements defined in policy). + /// + /// + /// + [Headers("Accept: application/json")] + [Get("/api/v1/serviceowner/dialogs/{dialogId}/activities")] + Task>> V1ServiceOwnerDialogActivitiesSearchSearchDialogActivity(System.Guid dialogId, CancellationToken cancellationToken = default); + + /// Adds a activity to a dialogs activity history + /// + /// The activity is created with the given configuration. For more information see the documentation (link TBD). + /// + /// Optimistic concurrency control is implemented using the If-Match header. Supply the Revision value from the GetDialog endpoint to ensure that the dialog is not modified/deleted by another request in the meantime. + /// + /// + /// A representing the instance containing the result: + /// + /// + /// Status + /// Description + /// + /// + /// 201 + /// The UUID of the created the dialog activity. A relative URL to the newly created activity is set in the \"Location\" header. + /// + /// + /// 400 + /// Validation error occured. See problem details for a list of errors. + /// + /// + /// 401 + /// Missing or invalid authentication token. Requires a Maskinporten-token with the scope \"digdir:dialogporten.serviceprovider\". + /// + /// + /// 403 + /// Unauthorized to create child entity for the given dialog (dialog not owned by authenticated organization or has additional scope requirements defined in service identifiers policy). + /// + /// + /// 404 + /// The given dialog ID was not found or is already deleted. + /// + /// + /// 412 + /// The supplied If-Match header did not match the current Revision value for the dialog. The request was not applied. + /// + /// + /// 422 + /// Domain error occured. See problem details for a list of errors. + /// + /// + /// + [Headers("Accept: application/json, application/problem+json")] + [Post("/api/v1/serviceowner/dialogs/{dialogId}/activities")] + Task> V1ServiceOwnerDialogActivitiesCreateDialogActivity(System.Guid dialogId, [Body, AliasAs("CreateActivityRequest")] V1ServiceOwnerDialogActivitiesCreate_ActivityRequest createActivityRequest, [Header("if-Match")] System.Guid? if_Match, CancellationToken cancellationToken = default); + + /// Gets a single dialog activity + /// Gets a single activity belonging to a dialog. For more information see the documentation (link TBD). + /// + /// A representing the instance containing the result: + /// + /// + /// Status + /// Description + /// + /// + /// 200 + /// Successfully returned the dialog activity. + /// + /// + /// 401 + /// Missing or invalid authentication token. Requires a Maskinporten-token with the scope \"digdir:dialogporten.serviceprovider\". + /// + /// + /// 403 + /// Unauthorized to get child entity for the given dialog (dialog not owned by authenticated organization or has additional scope requirements defined in service identifiers policy). + /// + /// + /// 404 + /// The given dialog ID was not found or was deleted, or the given activity ID was not found. + /// + /// + /// + [Headers("Accept: application/json, application/problem+json")] + [Get("/api/v1/serviceowner/dialogs/{dialogId}/activities/{activityId}")] + Task> V1ServiceOwnerDialogActivitiesGetGetDialogActivity(System.Guid dialogId, System.Guid activityId, CancellationToken cancellationToken = default); + + /// Gets all seen log records for a dialog + /// Gets all seen log records for a dialog. For more information see the documentation (link TBD). + /// + /// A representing the instance containing the result: + /// + /// + /// Status + /// Description + /// + /// + /// 200 + /// Successfully returned the dialog seen log records. + /// + /// + /// 401 + /// Unauthorized + /// + /// + /// 403 + /// Forbidden + /// + /// + /// 404 + /// Not Found + /// + /// + /// + [Headers("Accept: application/json, application/problem+json")] + [Get("/api/v1/serviceowner/dialogs/{dialogId}/seenlog")] + Task>> V1ServiceOwnerDialogSeenLogsSearchSearchDialogSeenLog(System.Guid dialogId, CancellationToken cancellationToken = default); + + /// Gets a single dialog seen log record + /// Gets a single dialog seen log record. For more information see the documentation (link TBD). + /// + /// A representing the instance containing the result: + /// + /// + /// Status + /// Description + /// + /// + /// 200 + /// Successfully returned the dialog seen log record. + /// + /// + /// 401 + /// Unauthorized + /// + /// + /// 403 + /// Forbidden + /// + /// + /// 404 + /// Not Found + /// + /// + /// + [Headers("Accept: application/json, application/problem+json")] + [Get("/api/v1/serviceowner/dialogs/{dialogId}/seenlog/{seenLogId}")] + Task> V1ServiceOwnerDialogSeenLogsGetGetDialogSeenLog(System.Guid dialogId, System.Guid seenLogId, CancellationToken cancellationToken = default); + + /// Gets a list of dialog transmissions + /// Gets the list of transmissions belonging to a dialog + /// + /// A representing the instance containing the result: + /// + /// + /// Status + /// Description + /// + /// + /// 200 + /// Successfully returned the dialog transmission list. + /// + /// + /// 401 + /// Missing or invalid authentication token. Requires a Maskinporten-token with the scope \"digdir:dialogporten.serviceprovider\". + /// + /// + /// 403 + /// Unauthorized to get the supplied dialog (not owned by authenticated organization or has additional scope requirements defined in policy). + /// + /// + /// 404 + /// The given dialog ID was not found or is already deleted. + /// + /// + /// + [Headers("Accept: application/json, application/problem+json")] + [Get("/api/v1/serviceowner/dialogs/{dialogId}/transmissions")] + Task> V1ServiceOwnerDialogTransmissionsSearchSearchDialogTransmission(System.Guid dialogId, CancellationToken cancellationToken = default); + + /// Adds a transmission to a dialog + /// + /// The transmission is created with the given configuration. For more information see the documentation (link TBD). + /// + /// Optimistic concurrency control is implemented using the If-Match header. Supply the Revision value from the GetDialog endpoint to ensure that the dialog is not modified/deleted by another request in the meantime. + /// + /// + /// A representing the instance containing the result: + /// + /// + /// Status + /// Description + /// + /// + /// 201 + /// The UUID of the created the dialog transmission. A relative URL to the newly created activity is set in the \"Location\" header. + /// + /// + /// 400 + /// Validation error occured. See problem details for a list of errors. + /// + /// + /// 401 + /// Missing or invalid authentication token. Requires a Maskinporten-token with the scope \"digdir:dialogporten.serviceprovider\". + /// + /// + /// 403 + /// Unauthorized to create child entity for the given dialog (dialog not owned by authenticated organization or has additional scope requirements defined in service identifiers policy). + /// + /// + /// 404 + /// The given dialog ID was not found or is already deleted. + /// + /// + /// 412 + /// The supplied If-Match header did not match the current Revision value for the dialog. The request was not applied. + /// + /// + /// 422 + /// Domain error occured. See problem details for a list of errors. + /// + /// + /// + [Headers("Accept: application/json, application/problem+json")] + [Post("/api/v1/serviceowner/dialogs/{dialogId}/transmissions")] + Task> V1ServiceOwnerDialogTransmissionsCreateDialogTransmission(System.Guid dialogId, [Body, AliasAs("CreateTransmissionRequest")] V1ServiceOwnerDialogTransmissionsCreate_TransmissionRequest createTransmissionRequest, [Header("if-Match")] System.Guid? if_Match, CancellationToken cancellationToken = default); + + /// Gets a single dialog transmission + /// Gets a single transmission belonging to a dialog. For more information see the documentation (link TBD). + /// + /// A representing the instance containing the result: + /// + /// + /// Status + /// Description + /// + /// + /// 200 + /// Successfully returned the dialog transmission. + /// + /// + /// 401 + /// Missing or invalid authentication token. Requires a Maskinporten-token with the scope \"digdir:dialogporten.serviceprovider\". + /// + /// + /// 403 + /// Unauthorized to get child entity for the given dialog (dialog not owned by authenticated organization or has additional scope requirements defined in service identifiers policy). + /// + /// + /// 404 + /// The given dialog ID was not found or was deleted, or the given transmission ID was not found. + /// + /// + /// + [Headers("Accept: application/json, application/problem+json")] + [Get("/api/v1/serviceowner/dialogs/{dialogId}/transmissions/{transmissionId}")] + Task> V1ServiceOwnerDialogTransmissionsGetGetDialogTransmission(System.Guid dialogId, System.Guid transmissionId, CancellationToken cancellationToken = default); + } + +} + +//---------------------- +// +// Generated using the NSwag toolchain v14.2.0.0 (NJsonSchema v11.1.0.0 (Newtonsoft.Json v13.0.0.0)) (http://NSwag.org) +// +//---------------------- + +#pragma warning disable 108 // Disable "CS0108 '{derivedDto}.ToJson()' hides inherited member '{dtoBase}.ToJson()'. Use the new keyword if hiding was intended." +#pragma warning disable 114 // Disable "CS0114 '{derivedDto}.RaisePropertyChanged(String)' hides inherited member 'dtoBase.RaisePropertyChanged(String)'. To make the current member override that implementation, add the override keyword. Otherwise add the new keyword." +#pragma warning disable 472 // Disable "CS0472 The result of the expression is always 'false' since a value of type 'Int32' is never equal to 'null' of type 'Int32?' +#pragma warning disable 612 // Disable "CS0612 '...' is obsolete" +#pragma warning disable 649 // Disable "CS0649 Field is never assigned to, and will always have its default value null" +#pragma warning disable 1573 // Disable "CS1573 Parameter '...' has no matching param tag in the XML comment for ... +#pragma warning disable 1591 // Disable "CS1591 Missing XML comment for publicly visible type or member ..." +#pragma warning disable 8073 // Disable "CS8073 The result of the expression is always 'false' since a value of type 'T' is never equal to 'null' of type 'T?'" +#pragma warning disable 3016 // Disable "CS3016 Arrays as attribute arguments is not CLS-compliant" +#pragma warning disable 8603 // Disable "CS8603 Possible null reference return" +#pragma warning disable 8604 // Disable "CS8604 Possible null reference argument for parameter" +#pragma warning disable 8625 // Disable "CS8625 Cannot convert null literal to non-nullable reference type" +#pragma warning disable 8765 // Disable "CS8765 Nullability of type of parameter doesn't match overridden member (possibly because of nullability attributes)." + +namespace Digdir.Library.Dialogporten.WebApiClient.Features.V1 +{ + using System = global::System; + + + + [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "14.2.0.0 (NJsonSchema v11.1.0.0 (Newtonsoft.Json v13.0.0.0))")] + public enum Actors_ActorType + { + + [System.Runtime.Serialization.EnumMember(Value = @"PartyRepresentative")] + PartyRepresentative = 0, + + [System.Runtime.Serialization.EnumMember(Value = @"ServiceOwner")] + ServiceOwner = 1, + + } + + [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "14.2.0.0 (NJsonSchema v11.1.0.0 (Newtonsoft.Json v13.0.0.0))")] + public enum Attachments_AttachmentUrlConsumerType + { + + [System.Runtime.Serialization.EnumMember(Value = @"Gui")] + Gui = 0, + + [System.Runtime.Serialization.EnumMember(Value = @"Api")] + Api = 1, + + } + + [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "14.2.0.0 (NJsonSchema v11.1.0.0 (Newtonsoft.Json v13.0.0.0))")] + public partial class ContinuationTokenSetOfTOrderDefinitionAndTTarget + { + + private IDictionary _additionalProperties; + + [JsonExtensionData] + public IDictionary AdditionalProperties + { + get { return _additionalProperties ?? (_additionalProperties = new Dictionary()); } + set { _additionalProperties = value; } + } + + } + + [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "14.2.0.0 (NJsonSchema v11.1.0.0 (Newtonsoft.Json v13.0.0.0))")] + public enum DialogEndUserContextsEntities_SystemLabel + { + + [System.Runtime.Serialization.EnumMember(Value = @"Default")] + Default = 0, + + [System.Runtime.Serialization.EnumMember(Value = @"Bin")] + Bin = 1, + + [System.Runtime.Serialization.EnumMember(Value = @"Archive")] + Archive = 2, + + } + + [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "14.2.0.0 (NJsonSchema v11.1.0.0 (Newtonsoft.Json v13.0.0.0))")] + public enum DialogsEntities_DialogStatus + { + + [System.Runtime.Serialization.EnumMember(Value = @"New")] + New = 0, + + [System.Runtime.Serialization.EnumMember(Value = @"InProgress")] + InProgress = 1, + + [System.Runtime.Serialization.EnumMember(Value = @"Draft")] + Draft = 2, + + [System.Runtime.Serialization.EnumMember(Value = @"Sent")] + Sent = 3, + + [System.Runtime.Serialization.EnumMember(Value = @"RequiresAttention")] + RequiresAttention = 4, + + [System.Runtime.Serialization.EnumMember(Value = @"Completed")] + Completed = 5, + + } + + [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "14.2.0.0 (NJsonSchema v11.1.0.0 (Newtonsoft.Json v13.0.0.0))")] + public enum DialogsEntitiesActions_DialogGuiActionPriority + { + + [System.Runtime.Serialization.EnumMember(Value = @"Primary")] + Primary = 0, + + [System.Runtime.Serialization.EnumMember(Value = @"Secondary")] + Secondary = 1, + + [System.Runtime.Serialization.EnumMember(Value = @"Tertiary")] + Tertiary = 2, + + } + + [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "14.2.0.0 (NJsonSchema v11.1.0.0 (Newtonsoft.Json v13.0.0.0))")] + public enum DialogsEntitiesActivities_DialogActivityType + { + + [System.Runtime.Serialization.EnumMember(Value = @"DialogCreated")] + DialogCreated = 0, + + [System.Runtime.Serialization.EnumMember(Value = @"DialogClosed")] + DialogClosed = 1, + + [System.Runtime.Serialization.EnumMember(Value = @"Information")] + Information = 2, + + [System.Runtime.Serialization.EnumMember(Value = @"TransmissionOpened")] + TransmissionOpened = 3, + + [System.Runtime.Serialization.EnumMember(Value = @"PaymentMade")] + PaymentMade = 4, + + [System.Runtime.Serialization.EnumMember(Value = @"SignatureProvided")] + SignatureProvided = 5, + + [System.Runtime.Serialization.EnumMember(Value = @"DialogOpened")] + DialogOpened = 6, + + } + + [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "14.2.0.0 (NJsonSchema v11.1.0.0 (Newtonsoft.Json v13.0.0.0))")] + public enum DialogsEntitiesTransmissions_DialogTransmissionType + { + + [System.Runtime.Serialization.EnumMember(Value = @"Information")] + Information = 0, + + [System.Runtime.Serialization.EnumMember(Value = @"Acceptance")] + Acceptance = 1, + + [System.Runtime.Serialization.EnumMember(Value = @"Rejection")] + Rejection = 2, + + [System.Runtime.Serialization.EnumMember(Value = @"Request")] + Request = 3, + + [System.Runtime.Serialization.EnumMember(Value = @"Alert")] + Alert = 4, + + [System.Runtime.Serialization.EnumMember(Value = @"Decision")] + Decision = 5, + + [System.Runtime.Serialization.EnumMember(Value = @"Submission")] + Submission = 6, + + [System.Runtime.Serialization.EnumMember(Value = @"Correction")] + Correction = 7, + + } + + [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "14.2.0.0 (NJsonSchema v11.1.0.0 (Newtonsoft.Json v13.0.0.0))")] + public enum Http_HttpVerb + { + + [System.Runtime.Serialization.EnumMember(Value = @"GET")] + GET = 0, + + [System.Runtime.Serialization.EnumMember(Value = @"POST")] + POST = 1, + + [System.Runtime.Serialization.EnumMember(Value = @"PUT")] + PUT = 2, + + [System.Runtime.Serialization.EnumMember(Value = @"PATCH")] + PATCH = 3, + + [System.Runtime.Serialization.EnumMember(Value = @"DELETE")] + DELETE = 4, + + [System.Runtime.Serialization.EnumMember(Value = @"HEAD")] + HEAD = 5, + + [System.Runtime.Serialization.EnumMember(Value = @"OPTIONS")] + OPTIONS = 6, + + [System.Runtime.Serialization.EnumMember(Value = @"TRACE")] + TRACE = 7, + + [System.Runtime.Serialization.EnumMember(Value = @"CONNECT")] + CONNECT = 8, + + } + + [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "14.2.0.0 (NJsonSchema v11.1.0.0 (Newtonsoft.Json v13.0.0.0))")] + public partial class JsonPatchOperations_Operation + { + + [JsonPropertyName("from")] + public string From { get; set; } + + [JsonPropertyName("op")] + public string Op { get; set; } + + [JsonPropertyName("operationType")] + [JsonConverter(typeof(JsonStringEnumConverter))] + public JsonPatchOperations_OperationType OperationType { get; set; } + + [JsonPropertyName("path")] + public string Path { get; set; } + + [JsonPropertyName("value")] + public object Value { get; set; } + + } + + [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "14.2.0.0 (NJsonSchema v11.1.0.0 (Newtonsoft.Json v13.0.0.0))")] + public enum JsonPatchOperations_OperationType + { + + [System.Runtime.Serialization.EnumMember(Value = @"Add")] + Add = 0, + + [System.Runtime.Serialization.EnumMember(Value = @"Remove")] + Remove = 1, + + [System.Runtime.Serialization.EnumMember(Value = @"Replace")] + Replace = 2, + + [System.Runtime.Serialization.EnumMember(Value = @"Move")] + Move = 3, + + [System.Runtime.Serialization.EnumMember(Value = @"Copy")] + Copy = 4, + + [System.Runtime.Serialization.EnumMember(Value = @"Test")] + Test = 5, + + [System.Runtime.Serialization.EnumMember(Value = @"Invalid")] + Invalid = 6, + + } + + [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "14.2.0.0 (NJsonSchema v11.1.0.0 (Newtonsoft.Json v13.0.0.0))")] + public partial class OrderSetOfTOrderDefinitionAndTTarget + { + + private IDictionary _additionalProperties; + + [JsonExtensionData] + public IDictionary AdditionalProperties + { + get { return _additionalProperties ?? (_additionalProperties = new Dictionary()); } + set { _additionalProperties = value; } + } + + } + + [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "14.2.0.0 (NJsonSchema v11.1.0.0 (Newtonsoft.Json v13.0.0.0))")] + public partial class PaginatedListOfV1EndUserDialogsQueriesSearch_Dialog + { + /// + /// The continuation token to be used to fetch the next page of items + /// + + [JsonPropertyName("continuationToken")] + public string ContinuationToken { get; set; } + + /// + /// Whether there are more items available that can be fetched by supplying the continuation token + /// + + [JsonPropertyName("hasNextPage")] + public bool HasNextPage { get; set; } + + /// + /// The paginated list of items + /// + + [JsonPropertyName("items")] + public ICollection Items { get; set; } + + /// + /// The current sorting order of the items + /// + + [JsonPropertyName("orderBy")] + public string OrderBy { get; set; } + + } + + [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "14.2.0.0 (NJsonSchema v11.1.0.0 (Newtonsoft.Json v13.0.0.0))")] + public partial class PaginatedListOfV1ServiceOwnerDialogsQueriesSearch_Dialog + { + /// + /// The continuation token to be used to fetch the next page of items + /// + + [JsonPropertyName("continuationToken")] + public string ContinuationToken { get; set; } + + /// + /// Whether there are more items available that can be fetched by supplying the continuation token + /// + + [JsonPropertyName("hasNextPage")] + public bool HasNextPage { get; set; } + + /// + /// The paginated list of items + /// + + [JsonPropertyName("items")] + public ICollection Items { get; set; } + + /// + /// The current sorting order of the items + /// + + [JsonPropertyName("orderBy")] + public string OrderBy { get; set; } + + } + + [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "14.2.0.0 (NJsonSchema v11.1.0.0 (Newtonsoft.Json v13.0.0.0))")] + public partial class ProblemDetails + { + + [JsonPropertyName("detail")] + public string Detail { get; set; } + + [JsonPropertyName("errors")] + public ICollection Errors { get; set; } + + [JsonPropertyName("instance")] + public string Instance { get; set; } = "/api/route"; + + [JsonPropertyName("status")] + public int Status { get; set; } = 400; + + [JsonPropertyName("title")] + public string Title { get; set; } = "One or more validation errors occurred."; + + [JsonPropertyName("traceId")] + public string TraceId { get; set; } = "0HMPNHL0JHL76:00000001"; + + [JsonPropertyName("type")] + public string Type { get; set; } = "https://www.rfc-editor.org/rfc/rfc7231#section-6.5.1"; + + } + + [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "14.2.0.0 (NJsonSchema v11.1.0.0 (Newtonsoft.Json v13.0.0.0))")] + public partial class ProblemDetails_Error + { + + [JsonPropertyName("code")] + public string Code { get; set; } + + [JsonPropertyName("name")] + public string Name { get; set; } = "Error or field name"; + + [JsonPropertyName("reason")] + public string Reason { get; set; } = "Error reason"; + + [JsonPropertyName("severity")] + public string Severity { get; set; } + + } + + [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "14.2.0.0 (NJsonSchema v11.1.0.0 (Newtonsoft.Json v13.0.0.0))")] + public partial class V1CommonContent_ContentValue + { + /// + /// Media type of the content (plaintext, Markdown). Can also indicate that the content is embeddable. + /// + + [JsonPropertyName("mediaType")] + public string MediaType { get; set; } + + /// + /// A list of localizations for the content. + /// + + [JsonPropertyName("value")] + public ICollection Value { get; set; } + + } + + [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "14.2.0.0 (NJsonSchema v11.1.0.0 (Newtonsoft.Json v13.0.0.0))")] + public partial class V1CommonLocalizations_Localization + { + /// + /// The language code of the localization in ISO 639-1 format. + /// + + [JsonPropertyName("languageCode")] + public string LanguageCode { get; set; } + + /// + /// The localized text or URI reference. + /// + + [JsonPropertyName("value")] + public string Value { get; set; } + + } + + [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "14.2.0.0 (NJsonSchema v11.1.0.0 (Newtonsoft.Json v13.0.0.0))")] + public partial class V1EndUserCommonActors_Actor + { + /// + /// The identifier of the person or organization that sent the transmission. Mutually exclusive with ActorName. + ///
Might be omitted if ActorType is "ServiceOwner". + ///
+ + [JsonPropertyName("actorId")] + public string ActorId { get; set; } + + /// + /// Specifies the name of the entity that sent the transmission. Mutually exclusive with ActorId. If ActorId + ///
is supplied, the name will be automatically populated from the name registries. + ///
+ + [JsonPropertyName("actorName")] + public string ActorName { get; set; } + + /// + /// The type of actor that sent the transmission. + /// + + [JsonPropertyName("actorType")] + [JsonConverter(typeof(JsonStringEnumConverter))] + public Actors_ActorType ActorType { get; set; } + + } + + [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "14.2.0.0 (NJsonSchema v11.1.0.0 (Newtonsoft.Json v13.0.0.0))")] + public partial class V1EndUserDialogActivitiesQueriesGet_Activity + { + + [JsonPropertyName("createdAt")] + public System.DateTimeOffset? CreatedAt { get; set; } + + [JsonPropertyName("description")] + public ICollection Description { get; set; } + + [JsonPropertyName("extendedType")] + public System.Uri ExtendedType { get; set; } + + [JsonPropertyName("id")] + public System.Guid Id { get; set; } + + [JsonPropertyName("performedBy")] + public V1EndUserCommonActors_Actor PerformedBy { get; set; } + + [JsonPropertyName("transmissionId")] + public System.Guid? TransmissionId { get; set; } + + [JsonPropertyName("type")] + [JsonConverter(typeof(JsonStringEnumConverter))] + public DialogsEntitiesActivities_DialogActivityType Type { get; set; } + + } + + [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "14.2.0.0 (NJsonSchema v11.1.0.0 (Newtonsoft.Json v13.0.0.0))")] + public partial class V1EndUserDialogActivitiesQueriesSearch_Activity + { + + [JsonPropertyName("createdAt")] + public System.DateTimeOffset CreatedAt { get; set; } + + [JsonPropertyName("extendedType")] + public System.Uri ExtendedType { get; set; } + + [JsonPropertyName("id")] + public System.Guid Id { get; set; } + + [JsonPropertyName("seenByEndUserIdHash")] + public string SeenByEndUserIdHash { get; set; } + + [JsonPropertyName("transmissionId")] + public System.Guid? TransmissionId { get; set; } + + [JsonPropertyName("type")] + [JsonConverter(typeof(JsonStringEnumConverter))] + public DialogsEntitiesActivities_DialogActivityType Type { get; set; } + + } + + [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "14.2.0.0 (NJsonSchema v11.1.0.0 (Newtonsoft.Json v13.0.0.0))")] + public partial class V1EndUserDialogLabelAssignmentLogQueriesSearch_LabelAssignmentLog + { + + [JsonPropertyName("action")] + public string Action { get; set; } + + [JsonPropertyName("createdAt")] + public System.DateTimeOffset CreatedAt { get; set; } + + [JsonPropertyName("name")] + public string Name { get; set; } + + [JsonPropertyName("performedBy")] + public V1EndUserCommonActors_Actor PerformedBy { get; set; } + + } + + [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "14.2.0.0 (NJsonSchema v11.1.0.0 (Newtonsoft.Json v13.0.0.0))")] + public partial class V1EndUserDialogSeenLogsQueriesGet_SeenLog + { + + [JsonPropertyName("id")] + public System.Guid Id { get; set; } + + [JsonPropertyName("isCurrentEndUser")] + public bool IsCurrentEndUser { get; set; } + + [JsonPropertyName("isViaServiceOwner")] + public bool IsViaServiceOwner { get; set; } + + [JsonPropertyName("seenAt")] + public System.DateTimeOffset SeenAt { get; set; } + + [JsonPropertyName("seenBy")] + public V1EndUserCommonActors_Actor SeenBy { get; set; } + + } + + [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "14.2.0.0 (NJsonSchema v11.1.0.0 (Newtonsoft.Json v13.0.0.0))")] + public partial class V1EndUserDialogSeenLogsQueriesSearch_SeenLog + { + + [JsonPropertyName("id")] + public System.Guid Id { get; set; } + + [JsonPropertyName("isCurrentEndUser")] + public bool IsCurrentEndUser { get; set; } + + [JsonPropertyName("isViaServiceOwner")] + public bool IsViaServiceOwner { get; set; } + + [JsonPropertyName("seenAt")] + public System.DateTimeOffset SeenAt { get; set; } + + [JsonPropertyName("seenBy")] + public V1EndUserCommonActors_Actor SeenBy { get; set; } + + } + + [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "14.2.0.0 (NJsonSchema v11.1.0.0 (Newtonsoft.Json v13.0.0.0))")] + public partial class V1EndUserDialogsQueriesGet_Content + { + /// + /// Additional information about the dialog, this may contain Markdown. + /// + + [JsonPropertyName("additionalInfo")] + public V1CommonContent_ContentValue AdditionalInfo { get; set; } + + /// + /// Used as the human-readable label used to describe the "ExtendedStatus" field. + /// + + [JsonPropertyName("extendedStatus")] + public V1CommonContent_ContentValue ExtendedStatus { get; set; } + + /// + /// Front-channel embedded content. Used to dynamically embed content in the frontend from an external URL. + /// + + [JsonPropertyName("mainContentReference")] + public V1CommonContent_ContentValue MainContentReference { get; set; } + + /// + /// Overridden sender name. If not supplied, assume "org" as the sender name. + /// + + [JsonPropertyName("senderName")] + public V1CommonContent_ContentValue SenderName { get; set; } + + /// + /// A short summary of the dialog and its current state. + /// + + [JsonPropertyName("summary")] + public V1CommonContent_ContentValue Summary { get; set; } + + /// + /// The title of the dialog. + /// + + [JsonPropertyName("title")] + public V1CommonContent_ContentValue Title { get; set; } + + } + + [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "14.2.0.0 (NJsonSchema v11.1.0.0 (Newtonsoft.Json v13.0.0.0))")] + public partial class V1EndUserDialogsQueriesGet_Dialog + { + /// + /// An immutable list of activities associated with the dialog. + /// + + [JsonPropertyName("activities")] + public ICollection Activities { get; set; } + + /// + /// The API actions associated with the dialog. Should be used in specialized, non-browser-based integrations. + /// + + [JsonPropertyName("apiActions")] + public ICollection ApiActions { get; set; } + + /// + /// The attachments associated with the dialog (on an aggregate level). + /// + + [JsonPropertyName("attachments")] + public ICollection Attachments { get; set; } + + /// + /// The dialog unstructured text content. + /// + + [JsonPropertyName("content")] + public V1EndUserDialogsQueriesGet_Content Content { get; set; } + + /// + /// The date and time when the dialog was created. + /// + + [JsonPropertyName("createdAt")] + public System.DateTimeOffset CreatedAt { get; set; } + + /// + /// The dialog token. May be used (if supported) against external URLs referred to in this dialog's apiActions, + ///
transmissions or attachments. It should also be used for front-channel embeds. + ///
+ + [JsonPropertyName("dialogToken")] + public string DialogToken { get; set; } + + /// + /// The due date for the dialog. Dialogs past due date might be marked as such in frontends but will still be available. + /// + + [JsonPropertyName("dueAt")] + public System.DateTimeOffset? DueAt { get; set; } + + /// + /// The expiration date for the dialog. This is the last date when the dialog is available for the end user. + ///
+ ///
After this date is passed, the dialog will be considered expired and no longer available for the end user in any + ///
API. If not supplied, the dialog will be considered to never expire. This field can be changed by the service + ///
owner after the dialog has been created. + ///
+ + [JsonPropertyName("expiresAt")] + public System.DateTimeOffset? ExpiresAt { get; set; } + + /// + /// Arbitrary string with a service-specific indicator of status, typically used to indicate a fine-grained state of + ///
the dialog to further specify the "status" enum. + ///
+ ///
Refer to the service-specific documentation provided by the service owner for details on the possible values (if + ///
in use). + ///
+ + [JsonPropertyName("extendedStatus")] + public string ExtendedStatus { get; set; } + + /// + /// Arbitrary string with a service-specific reference to an external system or service. + ///
+ ///
Refer to the service-specific documentation provided by the service owner for details (if in use). + ///
+ + [JsonPropertyName("externalReference")] + public string ExternalReference { get; set; } + + /// + /// The GUI actions associated with the dialog. Should be used in browser-based interactive frontends. + /// + + [JsonPropertyName("guiActions")] + public ICollection GuiActions { get; set; } + + /// + /// The unique identifier for the dialog in UUIDv7 format. + /// + + [JsonPropertyName("id")] + public System.Guid Id { get; set; } + + /// + /// The service owner code representing the organization (service owner) related to this dialog. + /// + + [JsonPropertyName("org")] + public string Org { get; set; } + + /// + /// The party code representing the organization or person that the dialog belongs to in URN format. + /// + + [JsonPropertyName("party")] + public string Party { get; set; } + + /// + /// Optional preceding process identifier to indicate the business process that preceded the process indicated in the "Process" field. Cannot be set without also "Process" being set. + /// + + [JsonPropertyName("precedingProcess")] + public string PrecedingProcess { get; set; } + + /// + /// Optional process identifier used to indicate a business process this dialog belongs to. + /// + + [JsonPropertyName("process")] + public string Process { get; set; } + + /// + /// Advisory indicator of progress, represented as 1-100 percentage value. 100% representing a dialog that has come + ///
to a natural completion (successful or not). + ///
+ + [JsonPropertyName("progress")] + public int? Progress { get; set; } + + /// + /// The unique identifier for the revision in UUIDv4 format. + /// + + [JsonPropertyName("revision")] + public System.Guid Revision { get; set; } + + /// + /// The list of seen log entries for the dialog newer than the dialog ChangedAt date. + /// + + [JsonPropertyName("seenSinceLastUpdate")] + public ICollection SeenSinceLastUpdate { get; set; } + + /// + /// The service identifier for the service that the dialog is related to in URN-format. + ///
This corresponds to a service resource in the Altinn Resource Registry. + ///
+ + [JsonPropertyName("serviceResource")] + public string ServiceResource { get; set; } + + /// + /// The ServiceResource type, as defined in Altinn Resource Registry (see ResourceType). + /// + + [JsonPropertyName("serviceResourceType")] + public string ServiceResourceType { get; set; } + + /// + /// The aggregated status of the dialog. + /// + + [JsonPropertyName("status")] + [JsonConverter(typeof(JsonStringEnumConverter))] + public DialogsEntities_DialogStatus Status { get; set; } + + /// + /// Current display state. + /// + + [JsonPropertyName("systemLabel")] + [JsonConverter(typeof(JsonStringEnumConverter))] + public DialogEndUserContextsEntities_SystemLabel SystemLabel { get; set; } + + /// + /// The immutable list of transmissions associated with the dialog. + /// + + [JsonPropertyName("transmissions")] + public ICollection Transmissions { get; set; } + + /// + /// The date and time when the dialog was last updated. + /// + + [JsonPropertyName("updatedAt")] + public System.DateTimeOffset UpdatedAt { get; set; } + + } + + [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "14.2.0.0 (NJsonSchema v11.1.0.0 (Newtonsoft.Json v13.0.0.0))")] + public partial class V1EndUserDialogsQueriesGet_DialogActivity + { + /// + /// The date and time when the activity was created. + /// + + [JsonPropertyName("createdAt")] + public System.DateTimeOffset? CreatedAt { get; set; } + + /// + /// Unstructured text describing the activity. Only set if the activity type is "Information". + /// + + [JsonPropertyName("description")] + public ICollection Description { get; set; } + + /// + /// An arbitrary URI/URN with a service-specific activity type. + ///
+ ///
Consult the service-specific documentation provided by the service owner for details (if in use). + ///
+ + [JsonPropertyName("extendedType")] + public System.Uri ExtendedType { get; set; } + + /// + /// The unique identifier for the activity in UUIDv7 format. + /// + + [JsonPropertyName("id")] + public System.Guid Id { get; set; } + + /// + /// The actor that performed the activity. + /// + + [JsonPropertyName("performedBy")] + public V1EndUserCommonActors_Actor PerformedBy { get; set; } + + /// + /// If the activity is related to a particular transmission, this field will contain the transmission identifier. + /// + + [JsonPropertyName("transmissionId")] + public System.Guid? TransmissionId { get; set; } + + /// + /// The type of activity. + /// + + [JsonPropertyName("type")] + [JsonConverter(typeof(JsonStringEnumConverter))] + public DialogsEntitiesActivities_DialogActivityType Type { get; set; } + + } + + [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "14.2.0.0 (NJsonSchema v11.1.0.0 (Newtonsoft.Json v13.0.0.0))")] + public partial class V1EndUserDialogsQueriesGet_DialogApiAction + { + /// + /// String identifier for the action, corresponding to the "action" attributeId used in the XACML service policy, + ///
which by default is the policy belonging to the service referred to by "serviceResource" in the dialog. + ///
+ + [JsonPropertyName("action")] + public string Action { get; set; } + + /// + /// Contains an authorization resource attributeId, that can used in custom authorization rules in the XACML service + ///
policy, which by default is the policy belonging to the service referred to by "serviceResource" in the dialog. + ///
+ ///
Can also be used to refer to other service policies. + ///
+ + [JsonPropertyName("authorizationAttribute")] + public string AuthorizationAttribute { get; set; } + + /// + /// The endpoints associated with the action. + /// + + [JsonPropertyName("endpoints")] + public ICollection Endpoints { get; set; } + + /// + /// The unique identifier for the action in UUIDv7 format. + /// + + [JsonPropertyName("id")] + public System.Guid Id { get; set; } + + /// + /// True if the authenticated user is authorized for this action. If not, the action will not be available + ///
and all endpoints will be replaced with a fixed placeholder. + ///
+ + [JsonPropertyName("isAuthorized")] + public bool IsAuthorized { get; set; } + + } + + [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "14.2.0.0 (NJsonSchema v11.1.0.0 (Newtonsoft.Json v13.0.0.0))")] + public partial class V1EndUserDialogsQueriesGet_DialogApiActionEndpoint + { + /// + /// Boolean indicating if the endpoint is deprecated. Integrators should migrate to endpoints with a higher version. + /// + + [JsonPropertyName("deprecated")] + public bool Deprecated { get; set; } + + /// + /// Link to service provider documentation for the endpoint. Used for service owners to provide documentation for + ///
integrators. Should be a URL to a human-readable page. + ///
+ + [JsonPropertyName("documentationUrl")] + public System.Uri DocumentationUrl { get; set; } + + /// + /// The HTTP method that the endpoint expects for this action. + /// + + [JsonPropertyName("httpMethod")] + [JsonConverter(typeof(JsonStringEnumConverter))] + public Http_HttpVerb HttpMethod { get; set; } + + /// + /// The unique identifier for the endpoint in UUIDv7 format. + /// + + [JsonPropertyName("id")] + public System.Guid Id { get; set; } + + /// + /// Link to the request schema for the endpoint. Used by service owners to provide documentation for integrators. + ///
Dialogporten will not validate information on this endpoint. + ///
+ + [JsonPropertyName("requestSchema")] + public System.Uri RequestSchema { get; set; } + + /// + /// Link to the response schema for the endpoint. Used for service owners to provide documentation for integrators. + ///
Dialogporten will not validate information on this endpoint. + ///
+ + [JsonPropertyName("responseSchema")] + public System.Uri ResponseSchema { get; set; } + + /// + /// Date and time when the service owner has indicated that endpoint will no longer function. Only set if the endpoint + ///
is deprecated. Dialogporten will not enforce this date. + ///
+ + [JsonPropertyName("sunsetAt")] + public System.DateTimeOffset? SunsetAt { get; set; } + + /// + /// The fully qualified URL of the API endpoint. Will be set to "urn:dialogporten:unauthorized" if the user is + ///
not authorized to perform the action. + ///
+ + [JsonPropertyName("url")] + public System.Uri Url { get; set; } + + /// + /// Arbitrary string indicating the version of the endpoint. + ///
+ ///
Consult the service-specific documentation provided by the service owner for details (if in use). + ///
+ + [JsonPropertyName("version")] + public string Version { get; set; } + + } + + [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "14.2.0.0 (NJsonSchema v11.1.0.0 (Newtonsoft.Json v13.0.0.0))")] + public partial class V1EndUserDialogsQueriesGet_DialogAttachment + { + /// + /// The display name of the attachment that should be used in GUIs. + /// + + [JsonPropertyName("displayName")] + public ICollection DisplayName { get; set; } + + /// + /// The unique identifier for the attachment in UUIDv7 format. + /// + + [JsonPropertyName("id")] + public System.Guid Id { get; set; } + + /// + /// The URLs associated with the attachment, each referring to a different representation of the attachment. + /// + + [JsonPropertyName("urls")] + public ICollection Urls { get; set; } + + } + + [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "14.2.0.0 (NJsonSchema v11.1.0.0 (Newtonsoft.Json v13.0.0.0))")] + public partial class V1EndUserDialogsQueriesGet_DialogAttachmentUrl + { + /// + /// What type of consumer the URL is intended for. + /// + + [JsonPropertyName("consumerType")] + [JsonConverter(typeof(JsonStringEnumConverter))] + public Attachments_AttachmentUrlConsumerType ConsumerType { get; set; } + + /// + /// The unique identifier for the attachment URL in UUIDv7 format. + /// + + [JsonPropertyName("id")] + public System.Guid Id { get; set; } + + /// + /// The media type of the attachment. + /// + + [JsonPropertyName("mediaType")] + public string MediaType { get; set; } + + /// + /// The fully qualified URL of the attachment. + /// + + [JsonPropertyName("url")] + public System.Uri Url { get; set; } + + } + + [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "14.2.0.0 (NJsonSchema v11.1.0.0 (Newtonsoft.Json v13.0.0.0))")] + public partial class V1EndUserDialogsQueriesGet_DialogGuiAction + { + /// + /// The action identifier for the action, corresponding to the "action" attributeId used in the XACML service policy. + /// + + [JsonPropertyName("action")] + public string Action { get; set; } + + /// + /// Contains an authorization resource attributeId, that can used in custom authorization rules in the XACML service + ///
policy, which by default is the policy belonging to the service referred to by "serviceResource" in the dialog. + ///
+ ///
Can also be used to refer to other service policies. + ///
+ + [JsonPropertyName("authorizationAttribute")] + public string AuthorizationAttribute { get; set; } + + /// + /// The HTTP method that the frontend should use when redirecting the user. + /// + + [JsonPropertyName("httpMethod")] + [JsonConverter(typeof(JsonStringEnumConverter))] + public Http_HttpVerb HttpMethod { get; set; } + + /// + /// The unique identifier for the action in UUIDv7 format. + /// + + [JsonPropertyName("id")] + public System.Guid Id { get; set; } + + /// + /// Whether the user is authorized to perform the action. + /// + + [JsonPropertyName("isAuthorized")] + public bool IsAuthorized { get; set; } + + /// + /// Indicates whether the action results in the dialog being deleted. Used by frontends to implement custom UX + ///
for delete actions. + ///
+ + [JsonPropertyName("isDeleteDialogAction")] + public bool IsDeleteDialogAction { get; set; } + + /// + /// Indicates a priority for the action, making it possible for frontends to adapt GUI elements based on action + ///
priority. + ///
+ + [JsonPropertyName("priority")] + [JsonConverter(typeof(JsonStringEnumConverter))] + public DialogsEntitiesActions_DialogGuiActionPriority Priority { get; set; } + + /// + /// If there should be a prompt asking the user for confirmation before the action is executed, + ///
this field should contain the prompt text. + ///
+ + [JsonPropertyName("prompt")] + public ICollection Prompt { get; set; } + + /// + /// The title of the action, this should be short and in verb form. + /// + + [JsonPropertyName("title")] + public ICollection Title { get; set; } + + /// + /// The fully qualified URL of the action, to which the user will be redirected when the action is triggered. Will be set to + ///
"urn:dialogporten:unauthorized" if the user is not authorized to perform the action. + ///
+ + [JsonPropertyName("url")] + public System.Uri Url { get; set; } + + } + + [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "14.2.0.0 (NJsonSchema v11.1.0.0 (Newtonsoft.Json v13.0.0.0))")] + public partial class V1EndUserDialogsQueriesGet_DialogSeenLog + { + /// + /// The unique identifier for the seen log entry in UUIDv7 format. + /// + + [JsonPropertyName("id")] + public System.Guid Id { get; set; } + + /// + /// Flag indicating whether the seen log entry was created by the current end user. + /// + + [JsonPropertyName("isCurrentEndUser")] + public bool IsCurrentEndUser { get; set; } + + /// + /// Flag indicating whether the seen log entry was created via the service owner. + ///
+ ///
This is used when the service owner uses the service owner API to implement its own frontend. + ///
+ + [JsonPropertyName("isViaServiceOwner")] + public bool? IsViaServiceOwner { get; set; } + + /// + /// The timestamp when the dialog revision was seen. + /// + + [JsonPropertyName("seenAt")] + public System.DateTimeOffset SeenAt { get; set; } + + /// + /// The actor that saw the dialog revision. + /// + + [JsonPropertyName("seenBy")] + public V1EndUserCommonActors_Actor SeenBy { get; set; } + + } + + [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "14.2.0.0 (NJsonSchema v11.1.0.0 (Newtonsoft.Json v13.0.0.0))")] + public partial class V1EndUserDialogsQueriesGet_DialogTransmission + { + /// + /// The transmission-level attachments. + /// + + [JsonPropertyName("attachments")] + public ICollection Attachments { get; set; } + + /// + /// Contains an authorization resource attributeId, that can used in custom authorization rules in the XACML service + ///
policy, which by default is the policy belonging to the service referred to by "serviceResource" in the dialog. + ///
+ ///
Can also be used to refer to other service policies. + ///
+ + [JsonPropertyName("authorizationAttribute")] + public string AuthorizationAttribute { get; set; } + + /// + /// The transmission unstructured text content. + /// + + [JsonPropertyName("content")] + public V1EndUserDialogsQueriesGet_DialogTransmissionContent Content { get; set; } + + /// + /// The date and time when the transmission was created. + /// + + [JsonPropertyName("createdAt")] + public System.DateTimeOffset CreatedAt { get; set; } + + /// + /// Arbitrary URI/URN describing a service-specific transmission type. + ///
+ ///
Refer to the service-specific documentation provided by the service owner for details (if in use). + ///
+ + [JsonPropertyName("extendedType")] + public System.Uri ExtendedType { get; set; } + + /// + /// The unique identifier for the transmission in UUIDv7 format. + /// + + [JsonPropertyName("id")] + public System.Guid Id { get; set; } + + /// + /// Flag indicating if the authenticated user is authorized for this transmission. If not, embedded content and + ///
the attachments will not be available. + ///
+ + [JsonPropertyName("isAuthorized")] + public bool IsAuthorized { get; set; } + + /// + /// Reference to any other transmission that this transmission is related to. + /// + + [JsonPropertyName("relatedTransmissionId")] + public System.Guid? RelatedTransmissionId { get; set; } + + /// + /// The actor that sent the transmission. + /// + + [JsonPropertyName("sender")] + public V1EndUserCommonActors_Actor Sender { get; set; } + + /// + /// The type of transmission. + /// + + [JsonPropertyName("type")] + [JsonConverter(typeof(JsonStringEnumConverter))] + public DialogsEntitiesTransmissions_DialogTransmissionType Type { get; set; } + + } + + [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "14.2.0.0 (NJsonSchema v11.1.0.0 (Newtonsoft.Json v13.0.0.0))")] + public partial class V1EndUserDialogsQueriesGet_DialogTransmissionAttachment + { + /// + /// The display name of the attachment that should be used in GUIs. + /// + + [JsonPropertyName("displayName")] + public ICollection DisplayName { get; set; } + + /// + /// The unique identifier for the attachment in UUIDv7 format. + /// + + [JsonPropertyName("id")] + public System.Guid Id { get; set; } + + /// + /// The URLs associated with the attachment, each referring to a different representation of the attachment. + /// + + [JsonPropertyName("urls")] + public ICollection Urls { get; set; } + + } + + [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "14.2.0.0 (NJsonSchema v11.1.0.0 (Newtonsoft.Json v13.0.0.0))")] + public partial class V1EndUserDialogsQueriesGet_DialogTransmissionAttachmentUrl + { + /// + /// The type of consumer the URL is intended for. + /// + + [JsonPropertyName("consumerType")] + [JsonConverter(typeof(JsonStringEnumConverter))] + public Attachments_AttachmentUrlConsumerType ConsumerType { get; set; } + + /// + /// The media type of the attachment. + /// + + [JsonPropertyName("mediaType")] + public string MediaType { get; set; } + + /// + /// The fully qualified URL of the attachment. Will be set to "urn:dialogporten:unauthorized" if the user is + ///
not authorized to access the transmission. + ///
+ + [JsonPropertyName("url")] + public System.Uri Url { get; set; } + + } + + [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "14.2.0.0 (NJsonSchema v11.1.0.0 (Newtonsoft.Json v13.0.0.0))")] + public partial class V1EndUserDialogsQueriesGet_DialogTransmissionContent + { + /// + /// Front-channel embedded content. Used to dynamically embed content in the frontend from an external URL. + ///
Allowed media types: application/vnd.dialogporten.frontchannelembed+json;type=markdown + ///
+ + [JsonPropertyName("contentReference")] + public V1CommonContent_ContentValue ContentReference { get; set; } + + /// + /// The transmission summary. + /// + + [JsonPropertyName("summary")] + public V1CommonContent_ContentValue Summary { get; set; } + + /// + /// The transmission title. + /// + + [JsonPropertyName("title")] + public V1CommonContent_ContentValue Title { get; set; } + + } + + [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "14.2.0.0 (NJsonSchema v11.1.0.0 (Newtonsoft.Json v13.0.0.0))")] + public partial class V1EndUserDialogsQueriesSearch_Content + { + /// + /// Used as the human-readable label used to describe the "ExtendedStatus" field. + /// + + [JsonPropertyName("extendedStatus")] + public V1CommonContent_ContentValue ExtendedStatus { get; set; } + + /// + /// Overridden sender name. If not supplied, assume "org" as the sender name. + /// + + [JsonPropertyName("senderName")] + public V1CommonContent_ContentValue SenderName { get; set; } + + /// + /// A short summary of the dialog and its current state. + /// + + [JsonPropertyName("summary")] + public V1CommonContent_ContentValue Summary { get; set; } + + /// + /// The title of the dialog. + /// + + [JsonPropertyName("title")] + public V1CommonContent_ContentValue Title { get; set; } + + } + + [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "14.2.0.0 (NJsonSchema v11.1.0.0 (Newtonsoft.Json v13.0.0.0))")] + public partial class V1EndUserDialogsQueriesSearch_Dialog + { + /// + /// The content of the dialog in search results. + /// + + [JsonPropertyName("content")] + public V1EndUserDialogsQueriesSearch_Content Content { get; set; } + + /// + /// The date and time when the dialog was created. + /// + + [JsonPropertyName("createdAt")] + public System.DateTimeOffset CreatedAt { get; set; } + + /// + /// The due date for the dialog. This is the last date when the dialog is expected to be completed. + /// + + [JsonPropertyName("dueAt")] + public System.DateTimeOffset? DueAt { get; set; } + + /// + /// Arbitrary string with a service-specific indicator of status, typically used to indicate a fine-grained state of + ///
the dialog to further specify the "status" enum. + ///
+ ///
Refer to the service-specific documentation provided by the service owner for details on the possible values (if + ///
in use). + ///
+ + [JsonPropertyName("extendedStatus")] + public string ExtendedStatus { get; set; } + + /// + /// Arbitrary string with a service-specific reference to an external system or service. + ///
+ ///
Refer to the service-specific documentation provided by the service owner for details (if in use). + ///
+ + [JsonPropertyName("externalReference")] + public string ExternalReference { get; set; } + + /// + /// The number of attachments in the dialog made available for browser-based frontends. + /// + + [JsonPropertyName("guiAttachmentCount")] + public int? GuiAttachmentCount { get; set; } + + /// + /// The unique identifier for the dialog in UUIDv7 format. + /// + + [JsonPropertyName("id")] + public System.Guid Id { get; set; } + + /// + /// The latest entry in the dialog's activity log. + /// + + [JsonPropertyName("latestActivity")] + public V1EndUserDialogsQueriesSearch_DialogActivity LatestActivity { get; set; } + + /// + /// The service owner code representing the organization (service owner) related to this dialog. + /// + + [JsonPropertyName("org")] + public string Org { get; set; } + + /// + /// The party code representing the organization or person that the dialog belongs to in URN format. + /// + + [JsonPropertyName("party")] + public string Party { get; set; } + + /// + /// Optional preceding process identifier to indicate the business process that preceded the process indicated in the "Process" field. Cannot be set without also "Process" being set. + /// + + [JsonPropertyName("precedingProcess")] + public string PrecedingProcess { get; set; } + + /// + /// Optional process identifier used to indicate a business process this dialog belongs to. + /// + + [JsonPropertyName("process")] + public string Process { get; set; } + + /// + /// Advisory indicator of progress, represented as 1-100 percentage value. 100% representing a dialog that has come + ///
to a natural completion (successful or not). + ///
+ + [JsonPropertyName("progress")] + public int? Progress { get; set; } + + /// + /// The list of seen log entries for the dialog newer than the dialog ChangedAt date. + /// + + [JsonPropertyName("seenSinceLastUpdate")] + public ICollection SeenSinceLastUpdate { get; set; } + + /// + /// The service identifier for the service that the dialog is related to in URN-format. + ///
This corresponds to a service resource in the Altinn Resource Registry. + ///
+ + [JsonPropertyName("serviceResource")] + public string ServiceResource { get; set; } + + /// + /// The ServiceResource type, as defined in Altinn Resource Registry (see ResourceType). + /// + + [JsonPropertyName("serviceResourceType")] + public string ServiceResourceType { get; set; } + + /// + /// The aggregated status of the dialog. + /// + + [JsonPropertyName("status")] + [JsonConverter(typeof(JsonStringEnumConverter))] + public DialogsEntities_DialogStatus Status { get; set; } + + /// + /// Current display state. + /// + + [JsonPropertyName("systemLabel")] + [JsonConverter(typeof(JsonStringEnumConverter))] + public DialogEndUserContextsEntities_SystemLabel SystemLabel { get; set; } + + /// + /// The date and time when the dialog was last updated. + /// + + [JsonPropertyName("updatedAt")] + public System.DateTimeOffset UpdatedAt { get; set; } + + } + + [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "14.2.0.0 (NJsonSchema v11.1.0.0 (Newtonsoft.Json v13.0.0.0))")] + public partial class V1EndUserDialogsQueriesSearch_DialogActivity + { + /// + /// The date and time when the activity was created. + /// + + [JsonPropertyName("createdAt")] + public System.DateTimeOffset? CreatedAt { get; set; } + + /// + /// Unstructured text describing the activity. Only set if the activity type is "Information". + /// + + [JsonPropertyName("description")] + public ICollection Description { get; set; } + + /// + /// An arbitrary string with a service-specific activity type. + ///
+ ///
Consult the service-specific documentation provided by the service owner for details (if in use). + ///
+ + [JsonPropertyName("extendedType")] + public System.Uri ExtendedType { get; set; } + + /// + /// The unique identifier for the activity in UUIDv7 format. + /// + + [JsonPropertyName("id")] + public System.Guid Id { get; set; } + + /// + /// The actor that performed the activity. + /// + + [JsonPropertyName("performedBy")] + public V1EndUserCommonActors_Actor PerformedBy { get; set; } + + /// + /// If the activity is related to a particular transmission, this field will contain the transmission identifier. + /// + + [JsonPropertyName("transmissionId")] + public System.Guid? TransmissionId { get; set; } + + /// + /// The type of activity. + /// + + [JsonPropertyName("type")] + [JsonConverter(typeof(JsonStringEnumConverter))] + public DialogsEntitiesActivities_DialogActivityType Type { get; set; } + + } + + [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "14.2.0.0 (NJsonSchema v11.1.0.0 (Newtonsoft.Json v13.0.0.0))")] + public partial class V1EndUserDialogsQueriesSearch_DialogSeenLog + { + /// + /// The unique identifier for the seen log entry in UUIDv7 format. + /// + + [JsonPropertyName("id")] + public System.Guid Id { get; set; } + + /// + /// Flag indicating whether the seen log entry was created by the current end user. + /// + + [JsonPropertyName("isCurrentEndUser")] + public bool IsCurrentEndUser { get; set; } + + /// + /// Flag indicating whether the seen log entry was created via the service owner. + ///
+ ///
This is used when the service owner uses the service owner API to implement its own frontend. + ///
+ + [JsonPropertyName("isViaServiceOwner")] + public bool? IsViaServiceOwner { get; set; } + + /// + /// The timestamp when the dialog revision was seen. + /// + + [JsonPropertyName("seenAt")] + public System.DateTimeOffset SeenAt { get; set; } + + /// + /// The actor that saw the dialog revision. + /// + + [JsonPropertyName("seenBy")] + public V1EndUserCommonActors_Actor SeenBy { get; set; } + + } + + [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "14.2.0.0 (NJsonSchema v11.1.0.0 (Newtonsoft.Json v13.0.0.0))")] + public partial class V1EndUserDialogSystemLabelsCommandsSet_SystemLabelCommand + { + + [JsonPropertyName("ifMatchDialogRevision")] + public System.Guid? IfMatchDialogRevision { get; set; } + + [JsonPropertyName("label")] + [JsonConverter(typeof(JsonStringEnumConverter))] + public DialogEndUserContextsEntities_SystemLabel Label { get; set; } + + } + + [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "14.2.0.0 (NJsonSchema v11.1.0.0 (Newtonsoft.Json v13.0.0.0))")] + public partial class V1EndUserDialogTransmissionsQueriesGet_Attachment + { + /// + /// The display name of the attachment that should be used in GUIs. + /// + + [JsonPropertyName("displayName")] + public ICollection DisplayName { get; set; } + + /// + /// The unique identifier for the attachment in UUIDv7 format. + /// + + [JsonPropertyName("id")] + public System.Guid Id { get; set; } + + /// + /// The URLs associated with the attachment, each referring to a different representation of the attachment. + /// + + [JsonPropertyName("urls")] + public ICollection Urls { get; set; } + + } + + [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "14.2.0.0 (NJsonSchema v11.1.0.0 (Newtonsoft.Json v13.0.0.0))")] + public partial class V1EndUserDialogTransmissionsQueriesGet_AttachmentUrl + { + /// + /// The type of consumer the URL is intended for. + /// + + [JsonPropertyName("consumerType")] + [JsonConverter(typeof(JsonStringEnumConverter))] + public Attachments_AttachmentUrlConsumerType ConsumerType { get; set; } + + /// + /// The unique identifier for the attachment URL in UUIDv7 format. + /// + + [JsonPropertyName("id")] + public System.Guid Id { get; set; } + + /// + /// The media type of the attachment. + /// + + [JsonPropertyName("mediaType")] + public string MediaType { get; set; } + + /// + /// The fully qualified URL of the attachment. Will be set to "urn:dialogporten:unauthorized" if the user is + ///
not authorized to access the transmission. + ///
+ + [JsonPropertyName("url")] + public System.Uri Url { get; set; } + + } + + [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "14.2.0.0 (NJsonSchema v11.1.0.0 (Newtonsoft.Json v13.0.0.0))")] + public partial class V1EndUserDialogTransmissionsQueriesGet_Content + { + /// + /// Front-channel embedded content. Used to dynamically embed content in the frontend from an external URL. + ///
Allowed media types: application/vnd.dialogporten.frontchannelembed+json;type=markdown + ///
+ + [JsonPropertyName("contentReference")] + public V1CommonContent_ContentValue ContentReference { get; set; } + + /// + /// The summary of the content. + /// + + [JsonPropertyName("summary")] + public V1CommonContent_ContentValue Summary { get; set; } + + /// + /// The title of the content. + /// + + [JsonPropertyName("title")] + public V1CommonContent_ContentValue Title { get; set; } + + } + + [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "14.2.0.0 (NJsonSchema v11.1.0.0 (Newtonsoft.Json v13.0.0.0))")] + public partial class V1EndUserDialogTransmissionsQueriesGet_Transmission + { + /// + /// The attachments associated with the transmission. + /// + + [JsonPropertyName("attachments")] + public ICollection Attachments { get; set; } + + /// + /// The authorization attribute associated with the transmission. + /// + + [JsonPropertyName("authorizationAttribute")] + public string AuthorizationAttribute { get; set; } + + /// + /// The content of the transmission. + /// + + [JsonPropertyName("content")] + public V1EndUserDialogTransmissionsQueriesGet_Content Content { get; set; } + + /// + /// The date and time when the transmission was created. + /// + + [JsonPropertyName("createdAt")] + public System.DateTimeOffset CreatedAt { get; set; } + + /// + /// The date and time when the transmission was deleted, if applicable. + /// + + [JsonPropertyName("deletedAt")] + public System.DateTimeOffset? DeletedAt { get; set; } + + /// + /// The extended type URI for the transmission. + /// + + [JsonPropertyName("extendedType")] + public System.Uri ExtendedType { get; set; } + + /// + /// The unique identifier for the transmission in UUIDv7 format. + /// + + [JsonPropertyName("id")] + public System.Guid Id { get; set; } + + /// + /// Flag indicating if the authenticated user is authorized for this transmission. If not, embedded content and + ///
the attachments will not be available. + ///
+ + [JsonPropertyName("isAuthorized")] + public bool IsAuthorized { get; set; } + + /// + /// The unique identifier for the related transmission, if any. + /// + + [JsonPropertyName("relatedTransmissionId")] + public System.Guid? RelatedTransmissionId { get; set; } + + /// + /// The sender actor information for the transmission. + /// + + [JsonPropertyName("sender")] + public V1EndUserCommonActors_Actor Sender { get; set; } + + /// + /// The type of the transmission. + /// + + [JsonPropertyName("type")] + [JsonConverter(typeof(JsonStringEnumConverter))] + public DialogsEntitiesTransmissions_DialogTransmissionType Type { get; set; } + + } + + [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "14.2.0.0 (NJsonSchema v11.1.0.0 (Newtonsoft.Json v13.0.0.0))")] + public partial class V1EndUserDialogTransmissionsQueriesSearch_Attachment + { + /// + /// The display name of the attachment that should be used in GUIs. + /// + + [JsonPropertyName("displayName")] + public ICollection DisplayName { get; set; } + + /// + /// The unique identifier for the attachment in UUIDv7 format. + /// + + [JsonPropertyName("id")] + public System.Guid Id { get; set; } + + /// + /// The URLs associated with the attachment, each referring to a different representation of the attachment. + /// + + [JsonPropertyName("urls")] + public ICollection Urls { get; set; } + + } + + [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "14.2.0.0 (NJsonSchema v11.1.0.0 (Newtonsoft.Json v13.0.0.0))")] + public partial class V1EndUserDialogTransmissionsQueriesSearch_AttachmentUrl + { + /// + /// The type of consumer the URL is intended for. + /// + + [JsonPropertyName("consumerType")] + [JsonConverter(typeof(JsonStringEnumConverter))] + public Attachments_AttachmentUrlConsumerType ConsumerType { get; set; } + + /// + /// The unique identifier for the attachment URL in UUIDv7 format. + /// + + [JsonPropertyName("id")] + public System.Guid Id { get; set; } + + /// + /// The media type of the attachment. + /// + + [JsonPropertyName("mediaType")] + public string MediaType { get; set; } + + /// + /// The fully qualified URL of the attachment. Will be set to "urn:dialogporten:unauthorized" if the user is + ///
not authorized to access the transmission. + ///
+ + [JsonPropertyName("url")] + public System.Uri Url { get; set; } + + } + + [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "14.2.0.0 (NJsonSchema v11.1.0.0 (Newtonsoft.Json v13.0.0.0))")] + public partial class V1EndUserDialogTransmissionsQueriesSearch_Content + { + /// + /// Front-channel embedded content. Used to dynamically embed content in the frontend from an external URL. + ///
Allowed media types: application/vnd.dialogporten.frontchannelembed+json;type=markdown + ///
+ + [JsonPropertyName("contentReference")] + public V1CommonContent_ContentValue ContentReference { get; set; } + + /// + /// The summary of the content. + /// + + [JsonPropertyName("summary")] + public V1CommonContent_ContentValue Summary { get; set; } + + /// + /// The title of the content. + /// + + [JsonPropertyName("title")] + public V1CommonContent_ContentValue Title { get; set; } + + } + + [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "14.2.0.0 (NJsonSchema v11.1.0.0 (Newtonsoft.Json v13.0.0.0))")] + public partial class V1EndUserDialogTransmissionsQueriesSearch_Transmission + { + /// + /// The attachments associated with the transmission. + /// + + [JsonPropertyName("attachments")] + public ICollection Attachments { get; set; } + + /// + /// The authorization attribute associated with the transmission. + /// + + [JsonPropertyName("authorizationAttribute")] + public string AuthorizationAttribute { get; set; } + + /// + /// The content of the transmission. + /// + + [JsonPropertyName("content")] + public V1EndUserDialogTransmissionsQueriesSearch_Content Content { get; set; } + + /// + /// The date and time when the transmission was created. + /// + + [JsonPropertyName("createdAt")] + public System.DateTimeOffset CreatedAt { get; set; } + + /// + /// The date and time when the transmission was deleted, if applicable. + /// + + [JsonPropertyName("deletedAt")] + public System.DateTimeOffset? DeletedAt { get; set; } + + /// + /// The extended type URI for the transmission. + /// + + [JsonPropertyName("extendedType")] + public System.Uri ExtendedType { get; set; } + + /// + /// The unique identifier for the transmission in UUIDv7 format. + /// + + [JsonPropertyName("id")] + public System.Guid Id { get; set; } + + /// + /// Flag indicating if the authenticated user is authorized for this transmission. If not, embedded content and + ///
the attachments will not be available. + ///
+ + [JsonPropertyName("isAuthorized")] + public bool IsAuthorized { get; set; } + + /// + /// The unique identifier for the related transmission, if any. + /// + + [JsonPropertyName("relatedTransmissionId")] + public System.Guid? RelatedTransmissionId { get; set; } + + /// + /// The sender actor information for the transmission. + /// + + [JsonPropertyName("sender")] + public V1EndUserCommonActors_Actor Sender { get; set; } + + /// + /// The type of the transmission. + /// + + [JsonPropertyName("type")] + [JsonConverter(typeof(JsonStringEnumConverter))] + public DialogsEntitiesTransmissions_DialogTransmissionType Type { get; set; } + + } + + [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "14.2.0.0 (NJsonSchema v11.1.0.0 (Newtonsoft.Json v13.0.0.0))")] + public partial class V1EndUserPartiesQueriesGet_AuthorizedParty + { + + [JsonPropertyName("hasKeyRole")] + public bool HasKeyRole { get; set; } + + [JsonPropertyName("hasOnlyAccessToSubParties")] + public bool HasOnlyAccessToSubParties { get; set; } + + [JsonPropertyName("isAccessManager")] + public bool IsAccessManager { get; set; } + + [JsonPropertyName("isCurrentEndUser")] + public bool IsCurrentEndUser { get; set; } + + [JsonPropertyName("isDeleted")] + public bool IsDeleted { get; set; } + + [JsonPropertyName("isMainAdministrator")] + public bool IsMainAdministrator { get; set; } + + [JsonPropertyName("name")] + public string Name { get; set; } + + [JsonPropertyName("party")] + public string Party { get; set; } + + [JsonPropertyName("partyType")] + public string PartyType { get; set; } + + [JsonPropertyName("subParties")] + public ICollection SubParties { get; set; } + + } + + [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "14.2.0.0 (NJsonSchema v11.1.0.0 (Newtonsoft.Json v13.0.0.0))")] + public partial class V1EndUserPartiesQueriesGet_Parties + { + + [JsonPropertyName("authorizedParties")] + public ICollection AuthorizedParties { get; set; } + + } + + [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "14.2.0.0 (NJsonSchema v11.1.0.0 (Newtonsoft.Json v13.0.0.0))")] + public partial class V1ServiceOwnerCommonActors_Actor + { + /// + /// The identifier of the person or organization that sent the transmission. Mutually exclusive with ActorName. + ///
Might be omitted if ActorType is "ServiceOwner". + ///
+ + [JsonPropertyName("actorId")] + public string ActorId { get; set; } + + /// + /// Specifies the name of the entity that sent the transmission. Mutually exclusive with ActorId. If ActorId + ///
is supplied, the name will be automatically populated from the name registries. + ///
+ + [JsonPropertyName("actorName")] + public string ActorName { get; set; } + + /// + /// The type of actor that sent the transmission. + /// + + [JsonPropertyName("actorType")] + [JsonConverter(typeof(JsonStringEnumConverter))] + public Actors_ActorType ActorType { get; set; } + + } + + [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "14.2.0.0 (NJsonSchema v11.1.0.0 (Newtonsoft.Json v13.0.0.0))")] + public partial class V1ServiceOwnerDialogActivitiesCreate_ActivityRequest + { + /// + /// If supplied, overrides the creating date and time for the transmission. + ///
If not supplied, the current date /time will be used. + ///
+ + [JsonPropertyName("createdAt")] + public System.DateTimeOffset? CreatedAt { get; set; } + + /// + /// Unstructured text describing the activity. Only set if the activity type is "Information". + /// + + [JsonPropertyName("description")] + public ICollection Description { get; set; } + + /// + /// Arbitrary URI/URN describing a service-specific transmission type. + /// + + [JsonPropertyName("extendedType")] + public System.Uri ExtendedType { get; set; } + + /// + /// The UUDIv7 of the action may be provided to support idempotent additions to the list of activities. + ///
If not supplied, a new UUIDv7 will be generated. + ///
+ + [JsonPropertyName("id")] + public System.Guid? Id { get; set; } + + /// + /// The actor that performed the activity. + /// + + [JsonPropertyName("performedBy")] + public V1ServiceOwnerCommonActors_Actor PerformedBy { get; set; } + + /// + /// If the activity is related to a particular transmission, this field will contain the transmission identifier. + ///
Must be present in the request body. + ///
+ + [JsonPropertyName("transmissionId")] + public System.Guid? TransmissionId { get; set; } + + /// + /// The type of transmission. + /// + + [JsonPropertyName("type")] + [JsonConverter(typeof(JsonStringEnumConverter))] + public DialogsEntitiesActivities_DialogActivityType Type { get; set; } + + } + + [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "14.2.0.0 (NJsonSchema v11.1.0.0 (Newtonsoft.Json v13.0.0.0))")] + public partial class V1ServiceOwnerDialogActivitiesQueriesGet_Activity + { + + [JsonPropertyName("createdAt")] + public System.DateTimeOffset? CreatedAt { get; set; } + + [JsonPropertyName("deletedAt")] + public System.DateTimeOffset? DeletedAt { get; set; } + + [JsonPropertyName("description")] + public ICollection Description { get; set; } + + [JsonPropertyName("extendedType")] + public System.Uri ExtendedType { get; set; } + + [JsonPropertyName("id")] + public System.Guid Id { get; set; } + + [JsonPropertyName("performedBy")] + public V1ServiceOwnerCommonActors_Actor PerformedBy { get; set; } + + [JsonPropertyName("transmissionId")] + public System.Guid? TransmissionId { get; set; } + + [JsonPropertyName("type")] + [JsonConverter(typeof(JsonStringEnumConverter))] + public DialogsEntitiesActivities_DialogActivityType Type { get; set; } + + } + + [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "14.2.0.0 (NJsonSchema v11.1.0.0 (Newtonsoft.Json v13.0.0.0))")] + public partial class V1ServiceOwnerDialogActivitiesQueriesNotificationCondition_NotificationCondition + { + + [JsonPropertyName("sendNotification")] + public bool SendNotification { get; set; } + + } + + [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "14.2.0.0 (NJsonSchema v11.1.0.0 (Newtonsoft.Json v13.0.0.0))")] + public enum V1ServiceOwnerDialogActivitiesQueriesNotificationCondition_NotificationConditionType + { + + [System.Runtime.Serialization.EnumMember(Value = @"NotExists")] + NotExists = 0, + + [System.Runtime.Serialization.EnumMember(Value = @"Exists")] + Exists = 1, + + } + + [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "14.2.0.0 (NJsonSchema v11.1.0.0 (Newtonsoft.Json v13.0.0.0))")] + public partial class V1ServiceOwnerDialogActivitiesQueriesSearch_Activity + { + + [JsonPropertyName("createdAt")] + public System.DateTimeOffset CreatedAt { get; set; } + + [JsonPropertyName("deletedAt")] + public System.DateTimeOffset? DeletedAt { get; set; } + + [JsonPropertyName("extendedType")] + public System.Uri ExtendedType { get; set; } + + [JsonPropertyName("id")] + public System.Guid Id { get; set; } + + [JsonPropertyName("transmissionId")] + public System.Guid? TransmissionId { get; set; } + + [JsonPropertyName("type")] + [JsonConverter(typeof(JsonStringEnumConverter))] + public DialogsEntitiesActivities_DialogActivityType Type { get; set; } + + } + + [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "14.2.0.0 (NJsonSchema v11.1.0.0 (Newtonsoft.Json v13.0.0.0))")] + public partial class V1ServiceOwnerDialogsCommandsCreate_Activity + { + /// + /// If supplied, overrides the creating date and time for the transmission. + ///
If not supplied, the current date /time will be used. + ///
+ + [JsonPropertyName("createdAt")] + public System.DateTimeOffset? CreatedAt { get; set; } + + /// + /// Unstructured text describing the activity. Only set if the activity type is "Information". + /// + + [JsonPropertyName("description")] + public ICollection Description { get; set; } + + /// + /// Arbitrary URI/URN describing a service-specific transmission type. + /// + + [JsonPropertyName("extendedType")] + public System.Uri ExtendedType { get; set; } + + /// + /// A self-defined UUIDv7 may be provided to support idempotent creation of activities. If not provided, a new UUIDv7 will be generated. + /// + + [JsonPropertyName("id")] + public System.Guid? Id { get; set; } + + /// + /// The actor that performed the activity. + /// + + [JsonPropertyName("performedBy")] + public V1ServiceOwnerCommonActors_Actor PerformedBy { get; set; } + + /// + /// If the activity is related to a particular transmission, this field will contain the transmission identifier. + ///
Must be present in the request body. + ///
+ + [JsonPropertyName("transmissionId")] + public System.Guid? TransmissionId { get; set; } + + /// + /// The type of transmission. + /// + + [JsonPropertyName("type")] + [JsonConverter(typeof(JsonStringEnumConverter))] + public DialogsEntitiesActivities_DialogActivityType Type { get; set; } + + } + + [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "14.2.0.0 (NJsonSchema v11.1.0.0 (Newtonsoft.Json v13.0.0.0))")] + public partial class V1ServiceOwnerDialogsCommandsCreate_ApiAction + { + /// + /// String identifier for the action, corresponding to the "action" attributeId used in the XACML service policy, + ///
which by default is the policy belonging to the service referred to by "serviceResource" in the dialog. + ///
+ + [JsonPropertyName("action")] + public string Action { get; set; } + + /// + /// Contains an authorization resource attributeId, that can used in custom authorization rules in the XACML service + ///
policy, which by default is the policy belonging to the service referred to by "serviceResource" in the dialog. + ///
+ ///
Can also be used to refer to other service policies. + ///
+ + [JsonPropertyName("authorizationAttribute")] + public string AuthorizationAttribute { get; set; } + + /// + /// The endpoints associated with the action. + /// + + [JsonPropertyName("endpoints")] + public ICollection Endpoints { get; set; } + + } + + [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "14.2.0.0 (NJsonSchema v11.1.0.0 (Newtonsoft.Json v13.0.0.0))")] + public partial class V1ServiceOwnerDialogsCommandsCreate_ApiActionEndpoint + { + /// + /// Boolean indicating if the endpoint is deprecated. + /// + + [JsonPropertyName("deprecated")] + public bool Deprecated { get; set; } + + /// + /// Link to documentation for the endpoint, providing documentation for integrators. Should be a URL to a + ///
human-readable page. + ///
+ + [JsonPropertyName("documentationUrl")] + public System.Uri DocumentationUrl { get; set; } + + /// + /// The HTTP method that the endpoint expects for this action. + /// + + [JsonPropertyName("httpMethod")] + [JsonConverter(typeof(JsonStringEnumConverter))] + public Http_HttpVerb HttpMethod { get; set; } + + /// + /// Link to the request schema for the endpoint. Used to provide documentation for integrators. + ///
Dialogporten will not validate information on this endpoint. + ///
+ + [JsonPropertyName("requestSchema")] + public System.Uri RequestSchema { get; set; } + + /// + /// Link to the response schema for the endpoint. Used to provide documentation for integrators. + ///
Dialogporten will not validate information on this endpoint. + ///
+ + [JsonPropertyName("responseSchema")] + public System.Uri ResponseSchema { get; set; } + + /// + /// Date and time when the endpoint will no longer function. Only set if the endpoint is deprecated. Dialogporten + ///
will not enforce this date. + ///
+ + [JsonPropertyName("sunsetAt")] + public System.DateTimeOffset? SunsetAt { get; set; } + + /// + /// The fully qualified URL of the API endpoint. + /// + + [JsonPropertyName("url")] + public System.Uri Url { get; set; } + + /// + /// Arbitrary string indicating the version of the endpoint. + /// + + [JsonPropertyName("version")] + public string Version { get; set; } + + } + + [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "14.2.0.0 (NJsonSchema v11.1.0.0 (Newtonsoft.Json v13.0.0.0))")] + public partial class V1ServiceOwnerDialogsCommandsCreate_Attachment + { + /// + /// The display name of the attachment that should be used in GUIs. + /// + + [JsonPropertyName("displayName")] + public ICollection DisplayName { get; set; } + + /// + /// The URLs associated with the attachment, each referring to a different representation of the attachment. + /// + + [JsonPropertyName("urls")] + public ICollection Urls { get; set; } + + } + + [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "14.2.0.0 (NJsonSchema v11.1.0.0 (Newtonsoft.Json v13.0.0.0))")] + public partial class V1ServiceOwnerDialogsCommandsCreate_AttachmentUrl + { + /// + /// The type of consumer the URL is intended for. + /// + + [JsonPropertyName("consumerType")] + [JsonConverter(typeof(JsonStringEnumConverter))] + public Attachments_AttachmentUrlConsumerType ConsumerType { get; set; } + + /// + /// The media type of the attachment. + /// + + [JsonPropertyName("mediaType")] + public string MediaType { get; set; } + + /// + /// The fully qualified URL of the attachment. + /// + + [JsonPropertyName("url")] + public System.Uri Url { get; set; } + + } + + [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "14.2.0.0 (NJsonSchema v11.1.0.0 (Newtonsoft.Json v13.0.0.0))")] + public partial class V1ServiceOwnerDialogsCommandsCreate_Content + { + /// + /// Additional information about the dialog. + ///
Supported media types: text/plain, text/markdown + ///
+ + [JsonPropertyName("additionalInfo")] + public V1CommonContent_ContentValue AdditionalInfo { get; set; } + + /// + /// Used as the human-readable label used to describe the "ExtendedStatus" field. + ///
Supported media types: text/plain + ///
+ + [JsonPropertyName("extendedStatus")] + public V1CommonContent_ContentValue ExtendedStatus { get; set; } + + /// + /// Front-channel embedded content. Used to dynamically embed content in the frontend from an external URL. Must be HTTPS. + ///
Supported media types: application/vnd.dialogporten.frontchannelembed+json;type=markdown + ///
+ + [JsonPropertyName("mainContentReference")] + public V1CommonContent_ContentValue MainContentReference { get; set; } + + /// + /// Overridden sender name. If not supplied, assume "org" as the sender name. Must be text/plain if supplied. + ///
Supported media types: text/plain + ///
+ + [JsonPropertyName("senderName")] + public V1CommonContent_ContentValue SenderName { get; set; } + + /// + /// A short summary of the dialog and its current state. + ///
Supported media types: text/plain + ///
+ + [JsonPropertyName("summary")] + public V1CommonContent_ContentValue Summary { get; set; } + + /// + /// The title of the dialog. + ///
Supported media types: text/plain + ///
+ + [JsonPropertyName("title")] + public V1CommonContent_ContentValue Title { get; set; } + + } + + [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "14.2.0.0 (NJsonSchema v11.1.0.0 (Newtonsoft.Json v13.0.0.0))")] + public partial class V1ServiceOwnerDialogsCommandsCreate_DialogCommand + { + /// + /// An immutable list of activities associated with the dialog. + /// + + [JsonPropertyName("activities")] + public ICollection Activities { get; set; } + + /// + /// The API actions associated with the dialog. Should be used in specialized, non-browser-based integrations. + /// + + [JsonPropertyName("apiActions")] + public ICollection ApiActions { get; set; } + + /// + /// The attachments associated with the dialog (on an aggregate level). + /// + + [JsonPropertyName("attachments")] + public ICollection Attachments { get; set; } + + /// + /// The dialog unstructured text content. + /// + + [JsonPropertyName("content")] + public V1ServiceOwnerDialogsCommandsCreate_Content Content { get; set; } + + /// + /// If set, will override the date and time when the dialog is set as created. + ///
If not supplied, the current date /time will be used. + ///
+ + [JsonPropertyName("createdAt")] + public System.DateTimeOffset CreatedAt { get; set; } + + /// + /// The due date for the dialog. Dialogs past due date might be marked as such in frontends but will still be available. + /// + + [JsonPropertyName("dueAt")] + public System.DateTimeOffset? DueAt { get; set; } + + /// + /// The expiration date for the dialog. This is the last date when the dialog is available for the end user. + ///
+ ///
After this date is passed, the dialog will be considered expired and no longer available for the end user in any + ///
API. If not supplied, the dialog will be considered to never expire. This field can be changed after creation. + ///
+ + [JsonPropertyName("expiresAt")] + public System.DateTimeOffset? ExpiresAt { get; set; } + + /// + /// Arbitrary string with a service-specific indicator of status, typically used to indicate a fine-grained state of + ///
the dialog to further specify the "status" enum. + ///
+ + [JsonPropertyName("extendedStatus")] + public string ExtendedStatus { get; set; } + + /// + /// Arbitrary string with a service-specific reference to an external system or service. + /// + + [JsonPropertyName("externalReference")] + public string ExternalReference { get; set; } + + /// + /// The GUI actions associated with the dialog. Should be used in browser-based interactive frontends. + /// + + [JsonPropertyName("guiActions")] + public ICollection GuiActions { get; set; } + + /// + /// A self-defined UUIDv7 may be provided to support idempotent creation of dialogs. If not provided, a new UUIDv7 will be generated. + /// + + [JsonPropertyName("id")] + public System.Guid? Id { get; set; } + + /// + /// The party code representing the organization or person that the dialog belongs to in URN format. + /// + + [JsonPropertyName("party")] + public string Party { get; set; } + + /// + /// Optional preceding process identifier to indicate the business process that preceded the process indicated in the "Process" field. Cannot be set without also "Process" being set. + /// + + [JsonPropertyName("precedingProcess")] + public string PrecedingProcess { get; set; } + + /// + /// Optional process identifier used to indicate a business process this dialog belongs to. + /// + + [JsonPropertyName("process")] + public string Process { get; set; } + + /// + /// Advisory indicator of progress, represented as 1-100 percentage value. 100% representing a dialog that has come + ///
to a natural completion (successful or not). + ///
+ + [JsonPropertyName("progress")] + public int? Progress { get; set; } + + /// + /// A list of words (tags) that will be used in dialog search queries. Not visible in end-user DTO. + /// + + [JsonPropertyName("searchTags")] + public ICollection SearchTags { get; set; } + + /// + /// The service identifier for the service that the dialog is related to in URN-format. + ///
This corresponds to a resource in the Altinn Resource Registry, which the authenticated organization + ///
must own, i.e., be listed as the "competent authority" in the Resource Registry entry. + ///
+ + [JsonPropertyName("serviceResource")] + public string ServiceResource { get; set; } + + /// + /// The aggregated status of the dialog. + /// + + [JsonPropertyName("status")] + [JsonConverter(typeof(JsonStringEnumConverter))] + public DialogsEntities_DialogStatus Status { get; set; } + + /// + /// Set the system label of the dialog Migration purposes. + /// + + [JsonPropertyName("systemLabel")] + [JsonConverter(typeof(JsonStringEnumConverter))] + public DialogEndUserContextsEntities_SystemLabel? SystemLabel { get; set; } + + /// + /// The immutable list of transmissions associated with the dialog. + /// + + [JsonPropertyName("transmissions")] + public ICollection Transmissions { get; set; } + + /// + /// If set, will override the date and time when the dialog is set as last updated. + ///
If not supplied, the current date /time will be used. + ///
+ + [JsonPropertyName("updatedAt")] + public System.DateTimeOffset UpdatedAt { get; set; } + + /// + /// The timestamp when the dialog should be made visible for authorized end users. If not provided, the dialog will be + ///
immediately available. + ///
+ + [JsonPropertyName("visibleFrom")] + public System.DateTimeOffset? VisibleFrom { get; set; } + + } + + [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "14.2.0.0 (NJsonSchema v11.1.0.0 (Newtonsoft.Json v13.0.0.0))")] + public partial class V1ServiceOwnerDialogsCommandsCreate_GuiAction + { + /// + /// The action identifier for the action, corresponding to the "action" attributeId used in the XACML service policy. + /// + + [JsonPropertyName("action")] + public string Action { get; set; } + + /// + /// Contains an authorization resource attributeId, that can used in custom authorization rules in the XACML service + ///
policy, which by default is the policy belonging to the service referred to by "serviceResource" in the dialog. + ///
+ ///
Can also be used to refer to other service policies. + ///
+ + [JsonPropertyName("authorizationAttribute")] + public string AuthorizationAttribute { get; set; } + + /// + /// The HTTP method that the frontend should use when redirecting the user. + /// + + [JsonPropertyName("httpMethod")] + [JsonConverter(typeof(JsonStringEnumConverter))] + public Http_HttpVerb? HttpMethod { get; set; } + + /// + /// Indicates whether the action results in the dialog being deleted. Used by frontends to implement custom UX + ///
for delete actions. + ///
+ + [JsonPropertyName("isDeleteDialogAction")] + public bool IsDeleteDialogAction { get; set; } + + /// + /// Indicates a priority for the action, making it possible for frontends to adapt GUI elements based on action + ///
priority. + ///
+ + [JsonPropertyName("priority")] + [JsonConverter(typeof(JsonStringEnumConverter))] + public DialogsEntitiesActions_DialogGuiActionPriority Priority { get; set; } + + /// + /// If there should be a prompt asking the user for confirmation before the action is executed, + ///
this field should contain the prompt text. + ///
+ + [JsonPropertyName("prompt")] + public ICollection Prompt { get; set; } + + /// + /// The title of the action, this should be short and in verb form. Must be text/plain. + /// + + [JsonPropertyName("title")] + public ICollection Title { get; set; } + + /// + /// The fully qualified URL of the action, to which the user will be redirected when the action is triggered. Will be set to + ///
"urn:dialogporten:unauthorized" if the user is not authorized to perform the action. + ///
+ + [JsonPropertyName("url")] + public System.Uri Url { get; set; } + + } + + [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "14.2.0.0 (NJsonSchema v11.1.0.0 (Newtonsoft.Json v13.0.0.0))")] + public partial class V1ServiceOwnerDialogsCommandsCreate_SearchTag + { + /// + /// A search tag value. + /// + + [JsonPropertyName("value")] + public string Value { get; set; } + + } + + [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "14.2.0.0 (NJsonSchema v11.1.0.0 (Newtonsoft.Json v13.0.0.0))")] + public partial class V1ServiceOwnerDialogsCommandsCreate_Transmission + { + /// + /// The transmission-level attachments. + /// + + [JsonPropertyName("attachments")] + public ICollection Attachments { get; set; } + + /// + /// Contains an authorization resource attributeId, that can used in custom authorization rules in the XACML service + ///
policy, which by default is the policy belonging to the service referred to by "serviceResource" in the dialog. + ///
+ ///
Can also be used to refer to other service policies. + ///
+ + [JsonPropertyName("authorizationAttribute")] + public string AuthorizationAttribute { get; set; } + + /// + /// The transmission unstructured text content. + /// + + [JsonPropertyName("content")] + public V1ServiceOwnerDialogsCommandsCreate_TransmissionContent Content { get; set; } + + /// + /// If supplied, overrides the creating date and time for the transmission. + ///
If not supplied, the current date /time will be used. + ///
+ + [JsonPropertyName("createdAt")] + public System.DateTimeOffset CreatedAt { get; set; } + + /// + /// Arbitrary URI/URN describing a service-specific transmission type. + ///
+ ///
Refer to the service-specific documentation provided by the service owner for details (if in use). + ///
+ + [JsonPropertyName("extendedType")] + public System.Uri ExtendedType { get; set; } + + /// + /// A self-defined UUIDv7 may be provided to support idempotent creation of transmissions. If not provided, a new UUIDv7 will be generated. + /// + + [JsonPropertyName("id")] + public System.Guid? Id { get; set; } + + /// + /// Reference to any other transmission that this transmission is related to. + /// + + [JsonPropertyName("relatedTransmissionId")] + public System.Guid? RelatedTransmissionId { get; set; } + + /// + /// The actor that sent the transmission. + /// + + [JsonPropertyName("sender")] + public V1ServiceOwnerCommonActors_Actor Sender { get; set; } + + /// + /// The type of transmission. + /// + + [JsonPropertyName("type")] + [JsonConverter(typeof(JsonStringEnumConverter))] + public DialogsEntitiesTransmissions_DialogTransmissionType Type { get; set; } + + } + + [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "14.2.0.0 (NJsonSchema v11.1.0.0 (Newtonsoft.Json v13.0.0.0))")] + public partial class V1ServiceOwnerDialogsCommandsCreate_TransmissionAttachment + { + /// + /// The display name of the attachment that should be used in GUIs. + /// + + [JsonPropertyName("displayName")] + public ICollection DisplayName { get; set; } + + /// + /// A self-defined UUIDv7 may be provided to support idempotent creation of transmission attachments. If not provided, a new UUIDv7 will be generated. + /// + + [JsonPropertyName("id")] + public System.Guid? Id { get; set; } + + /// + /// The URLs associated with the attachment, each referring to a different representation of the attachment. + /// + + [JsonPropertyName("urls")] + public ICollection Urls { get; set; } + + } + + [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "14.2.0.0 (NJsonSchema v11.1.0.0 (Newtonsoft.Json v13.0.0.0))")] + public partial class V1ServiceOwnerDialogsCommandsCreate_TransmissionAttachmentUrl + { + /// + /// The type of consumer the URL is intended for. + /// + + [JsonPropertyName("consumerType")] + [JsonConverter(typeof(JsonStringEnumConverter))] + public Attachments_AttachmentUrlConsumerType ConsumerType { get; set; } + + /// + /// The media type of the attachment. + /// + + [JsonPropertyName("mediaType")] + public string MediaType { get; set; } + + /// + /// The fully qualified URL of the attachment. + /// + + [JsonPropertyName("url")] + public System.Uri Url { get; set; } + + } + + [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "14.2.0.0 (NJsonSchema v11.1.0.0 (Newtonsoft.Json v13.0.0.0))")] + public partial class V1ServiceOwnerDialogsCommandsCreate_TransmissionContent + { + /// + /// Front-channel embedded content. Used to dynamically embed content in the frontend from an external URL. Must be HTTPS. + ///
Allowed media types: application/vnd.dialogporten.frontchannelembed+json;type=markdown + ///
+ + [JsonPropertyName("contentReference")] + public V1CommonContent_ContentValue ContentReference { get; set; } + + /// + /// The transmission summary. + /// + + [JsonPropertyName("summary")] + public V1CommonContent_ContentValue Summary { get; set; } + + /// + /// The transmission title. Must be text/plain. + /// + + [JsonPropertyName("title")] + public V1CommonContent_ContentValue Title { get; set; } + + } + + [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "14.2.0.0 (NJsonSchema v11.1.0.0 (Newtonsoft.Json v13.0.0.0))")] + public partial class V1ServiceOwnerDialogsCommandsUpdate_Activity + { + /// + /// If supplied, overrides the creating date and time for the transmission. + ///
If not supplied, the current date /time will be used. + ///
+ + [JsonPropertyName("createdAt")] + public System.DateTimeOffset? CreatedAt { get; set; } + + /// + /// Unstructured text describing the activity. Only set if the activity type is "Information". + /// + + [JsonPropertyName("description")] + public ICollection Description { get; set; } + + /// + /// Arbitrary URI/URN describing a service-specific transmission type. + /// + + [JsonPropertyName("extendedType")] + public System.Uri ExtendedType { get; set; } + + /// + /// The UUDIv7 of the action may be provided to support idempotent additions to the list of activities. + ///
If not supplied, a new UUIDv7 will be generated. + ///
+ + [JsonPropertyName("id")] + public System.Guid? Id { get; set; } + + /// + /// The actor that performed the activity. + /// + + [JsonPropertyName("performedBy")] + public V1ServiceOwnerCommonActors_Actor PerformedBy { get; set; } + + /// + /// If the activity is related to a particular transmission, this field will contain the transmission identifier. + ///
Must be present in the request body. + ///
+ + [JsonPropertyName("transmissionId")] + public System.Guid? TransmissionId { get; set; } + + /// + /// The type of transmission. + /// + + [JsonPropertyName("type")] + [JsonConverter(typeof(JsonStringEnumConverter))] + public DialogsEntitiesActivities_DialogActivityType Type { get; set; } + + } + + [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "14.2.0.0 (NJsonSchema v11.1.0.0 (Newtonsoft.Json v13.0.0.0))")] + public partial class V1ServiceOwnerDialogsCommandsUpdate_ApiAction + { + /// + /// String identifier for the action, corresponding to the "action" attributeId used in the XACML service policy, + ///
which by default is the policy belonging to the service referred to by "serviceResource" in the dialog. + ///
+ + [JsonPropertyName("action")] + public string Action { get; set; } + + /// + /// Contains an authorization resource attributeId, that can used in custom authorization rules in the XACML service + ///
policy, which by default is the policy belonging to the service referred to by "serviceResource" in the dialog. + ///
+ ///
Can also be used to refer to other service policies. + ///
+ + [JsonPropertyName("authorizationAttribute")] + public string AuthorizationAttribute { get; set; } + + /// + /// The endpoints associated with the action. + /// + + [JsonPropertyName("endpoints")] + public ICollection Endpoints { get; set; } + + /// + /// A UUIDv7 used for merging existing data, unknown IDs will be ignored as this entity does not support user-defined IDs. + /// + + [JsonPropertyName("id")] + public System.Guid? Id { get; set; } + + } + + [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "14.2.0.0 (NJsonSchema v11.1.0.0 (Newtonsoft.Json v13.0.0.0))")] + public partial class V1ServiceOwnerDialogsCommandsUpdate_ApiActionEndpoint + { + /// + /// Boolean indicating if the endpoint is deprecated. + /// + + [JsonPropertyName("deprecated")] + public bool Deprecated { get; set; } + + /// + /// Link to documentation for the endpoint, providing documentation for integrators. Should be a URL to a + ///
human-readable page. + ///
+ + [JsonPropertyName("documentationUrl")] + public System.Uri DocumentationUrl { get; set; } + + /// + /// The HTTP method that the endpoint expects for this action. + /// + + [JsonPropertyName("httpMethod")] + [JsonConverter(typeof(JsonStringEnumConverter))] + public Http_HttpVerb HttpMethod { get; set; } + + /// + /// A UUIDv7 used for merging existing data, unknown IDs will be ignored as this entity does not support user-defined IDs. + /// + + [JsonPropertyName("id")] + public System.Guid? Id { get; set; } + + /// + /// Link to the request schema for the endpoint. Used to provide documentation for integrators. + ///
Dialogporten will not validate information on this endpoint. + ///
+ + [JsonPropertyName("requestSchema")] + public System.Uri RequestSchema { get; set; } + + /// + /// Link to the response schema for the endpoint. Used to provide documentation for integrators. + ///
Dialogporten will not validate information on this endpoint. + ///
+ + [JsonPropertyName("responseSchema")] + public System.Uri ResponseSchema { get; set; } + + /// + /// Date and time when the endpoint will no longer function. Only set if the endpoint is deprecated. Dialogporten + ///
will not enforce this date. + ///
+ + [JsonPropertyName("sunsetAt")] + public System.DateTimeOffset? SunsetAt { get; set; } + + /// + /// The fully qualified URL of the API endpoint. + /// + + [JsonPropertyName("url")] + public System.Uri Url { get; set; } + + /// + /// Arbitrary string indicating the version of the endpoint. + /// + + [JsonPropertyName("version")] + public string Version { get; set; } + + } + + [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "14.2.0.0 (NJsonSchema v11.1.0.0 (Newtonsoft.Json v13.0.0.0))")] + public partial class V1ServiceOwnerDialogsCommandsUpdate_Attachment + { + /// + /// The display name of the attachment that should be used in GUIs. + /// + + [JsonPropertyName("displayName")] + public ICollection DisplayName { get; set; } + + /// + /// A UUIDv7 used for merging existing data, unknown IDs will be ignored as this entity does not support user-defined IDs. + /// + + [JsonPropertyName("id")] + public System.Guid? Id { get; set; } + + /// + /// The URLs associated with the attachment, each referring to a different representation of the attachment. + /// + + [JsonPropertyName("urls")] + public ICollection Urls { get; set; } + + } + + [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "14.2.0.0 (NJsonSchema v11.1.0.0 (Newtonsoft.Json v13.0.0.0))")] + public partial class V1ServiceOwnerDialogsCommandsUpdate_AttachmentUrl + { + /// + /// The type of consumer the URL is intended for. + /// + + [JsonPropertyName("consumerType")] + [JsonConverter(typeof(JsonStringEnumConverter))] + public Attachments_AttachmentUrlConsumerType ConsumerType { get; set; } + + /// + /// A UUIDv7 used for merging existing data, unknown IDs will be ignored as this entity does not support user-defined IDs. + /// + + [JsonPropertyName("id")] + public System.Guid? Id { get; set; } + + /// + /// The media type of the attachment. + /// + + [JsonPropertyName("mediaType")] + public string MediaType { get; set; } + + /// + /// The fully qualified URL of the attachment. + /// + + [JsonPropertyName("url")] + public System.Uri Url { get; set; } + + } + + [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "14.2.0.0 (NJsonSchema v11.1.0.0 (Newtonsoft.Json v13.0.0.0))")] + public partial class V1ServiceOwnerDialogsCommandsUpdate_Content + { + /// + /// Additional information about the dialog, this may contain Markdown. + /// + + [JsonPropertyName("additionalInfo")] + public V1CommonContent_ContentValue AdditionalInfo { get; set; } + + /// + /// Used as the human-readable label used to describe the "ExtendedStatus" field. Must be text/plain. + /// + + [JsonPropertyName("extendedStatus")] + public V1CommonContent_ContentValue ExtendedStatus { get; set; } + + /// + /// Front-channel embedded content. Used to dynamically embed content in the frontend from an external URL. Must be HTTPS. + /// + + [JsonPropertyName("mainContentReference")] + public V1CommonContent_ContentValue MainContentReference { get; set; } + + /// + /// Overridden sender name. If not supplied, assume "org" as the sender name. Must be text/plain if supplied. + /// + + [JsonPropertyName("senderName")] + public V1CommonContent_ContentValue SenderName { get; set; } + + /// + /// A short summary of the dialog and its current state. Must be text/plain. + /// + + [JsonPropertyName("summary")] + public V1CommonContent_ContentValue Summary { get; set; } + + /// + /// The title of the dialog. Must be text/plain. + /// + + [JsonPropertyName("title")] + public V1CommonContent_ContentValue Title { get; set; } + + } + + [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "14.2.0.0 (NJsonSchema v11.1.0.0 (Newtonsoft.Json v13.0.0.0))")] + public partial class V1ServiceOwnerDialogsCommandsUpdate_Dialog + { + /// + /// An immutable list of activities associated with the dialog. When updating via PUT, any activities added here + ///
will be appended to the existing list of activities. + ///
+ + [JsonPropertyName("activities")] + public ICollection Activities { get; set; } + + /// + /// The API actions associated with the dialog. Should be used in specialized, non-browser-based integrations. + /// + + [JsonPropertyName("apiActions")] + public ICollection ApiActions { get; set; } + + /// + /// The attachments associated with the dialog (on an aggregate level). + /// + + [JsonPropertyName("attachments")] + public ICollection Attachments { get; set; } + + /// + /// The dialog unstructured text content. + /// + + [JsonPropertyName("content")] + public V1ServiceOwnerDialogsCommandsUpdate_Content Content { get; set; } + + /// + /// The due date for the dialog. Dialogs past due date might be marked as such in frontends but will still be available. + /// + + [JsonPropertyName("dueAt")] + public System.DateTimeOffset? DueAt { get; set; } + + /// + /// The expiration date for the dialog. This is the last date when the dialog is available for the end user. + ///
+ ///
After this date is passed, the dialog will be considered expired and no longer available for the end user in any + ///
API. If not supplied, the dialog will be considered to never expire. This field can be changed after creation. + ///
+ + [JsonPropertyName("expiresAt")] + public System.DateTimeOffset? ExpiresAt { get; set; } + + /// + /// Arbitrary string with a service-specific indicator of status, typically used to indicate a fine-grained state of + ///
the dialog to further specify the "status" enum. + ///
+ + [JsonPropertyName("extendedStatus")] + public string ExtendedStatus { get; set; } + + /// + /// Arbitrary string with a service-specific reference to an external system or service. + /// + + [JsonPropertyName("externalReference")] + public string ExternalReference { get; set; } + + /// + /// The GUI actions associated with the dialog. Should be used in browser-based interactive frontends. + /// + + [JsonPropertyName("guiActions")] + public ICollection GuiActions { get; set; } + + /// + /// Advisory indicator of progress, represented as 1-100 percentage value. 100% representing a dialog that has come + ///
to a natural completion (successful or not). + ///
+ + [JsonPropertyName("progress")] + public int? Progress { get; set; } + + /// + /// A list of words (tags) that will be used in dialog search queries. Not visible in end-user DTO. + /// + + [JsonPropertyName("searchTags")] + public ICollection SearchTags { get; set; } + + /// + /// The aggregated status of the dialog. + /// + + [JsonPropertyName("status")] + [JsonConverter(typeof(JsonStringEnumConverter))] + public DialogsEntities_DialogStatus Status { get; set; } + + /// + /// The immutable list of transmissions associated with the dialog. When updating via PUT, any transmissions + ///
added here will be appended to the existing list of transmissions. + ///
+ + [JsonPropertyName("transmissions")] + public ICollection Transmissions { get; set; } + + /// + /// The timestamp when the dialog should be made visible for authorized end users. If not provided, the dialog will be + ///
immediately available. + ///
+ + [JsonPropertyName("visibleFrom")] + public System.DateTimeOffset? VisibleFrom { get; set; } + + } + + [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "14.2.0.0 (NJsonSchema v11.1.0.0 (Newtonsoft.Json v13.0.0.0))")] + public partial class V1ServiceOwnerDialogsCommandsUpdate_GuiAction + { + /// + /// The action identifier for the action, corresponding to the "action" attributeId used in the XACML service policy. + /// + + [JsonPropertyName("action")] + public string Action { get; set; } + + /// + /// Contains an authorization resource attributeId, that can used in custom authorization rules in the XACML service + ///
policy, which by default is the policy belonging to the service referred to by "serviceResource" in the dialog. + ///
+ ///
Can also be used to refer to other service policies. + ///
+ + [JsonPropertyName("authorizationAttribute")] + public string AuthorizationAttribute { get; set; } + + /// + /// The HTTP method that the frontend should use when redirecting the user. + /// + + [JsonPropertyName("httpMethod")] + [JsonConverter(typeof(JsonStringEnumConverter))] + public Http_HttpVerb? HttpMethod { get; set; } + + /// + /// A UUIDv7 used for merging existing data, unknown IDs will be ignored as this entity does not support user-defined IDs. + /// + + [JsonPropertyName("id")] + public System.Guid? Id { get; set; } + + /// + /// Indicates whether the action results in the dialog being deleted. Used by frontends to implement custom UX + ///
for delete actions. + ///
+ + [JsonPropertyName("isDeleteDialogAction")] + public bool IsDeleteDialogAction { get; set; } + + /// + /// Indicates a priority for the action, making it possible for frontends to adapt GUI elements based on action + ///
priority. + ///
+ + [JsonPropertyName("priority")] + [JsonConverter(typeof(JsonStringEnumConverter))] + public DialogsEntitiesActions_DialogGuiActionPriority Priority { get; set; } + + /// + /// If there should be a prompt asking the user for confirmation before the action is executed, + ///
this field should contain the prompt text. + ///
+ + [JsonPropertyName("prompt")] + public ICollection Prompt { get; set; } + + /// + /// The title of the action, this should be short and in verb form. Must be text/plain. + /// + + [JsonPropertyName("title")] + public ICollection Title { get; set; } + + /// + /// The fully qualified URL of the action, to which the user will be redirected when the action is triggered. Will be set to + ///
"urn:dialogporten:unauthorized" if the user is not authorized to perform the action. + ///
+ + [JsonPropertyName("url")] + public System.Uri Url { get; set; } + + } + + [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "14.2.0.0 (NJsonSchema v11.1.0.0 (Newtonsoft.Json v13.0.0.0))")] + public partial class V1ServiceOwnerDialogsCommandsUpdate_SearchTag + { + /// + /// A search tag value. + /// + + [JsonPropertyName("value")] + public string Value { get; set; } + + } + + [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "14.2.0.0 (NJsonSchema v11.1.0.0 (Newtonsoft.Json v13.0.0.0))")] + public partial class V1ServiceOwnerDialogsCommandsUpdate_Transmission + { + /// + /// The transmission-level attachments. + /// + + [JsonPropertyName("attachments")] + public ICollection Attachments { get; set; } + + /// + /// Contains an authorization resource attributeId, that can used in custom authorization rules in the XACML service + ///
policy, which by default is the policy belonging to the service referred to by "serviceResource" in the dialog. + ///
+ ///
Can also be used to refer to other service policies. + ///
+ + [JsonPropertyName("authorizationAttribute")] + public string AuthorizationAttribute { get; set; } + + /// + /// The transmission unstructured text content. + /// + + [JsonPropertyName("content")] + public V1ServiceOwnerDialogsCommandsUpdate_TransmissionContent Content { get; set; } + + /// + /// If supplied, overrides the creating date and time for the transmission. + ///
If not supplied, the current date /time will be used. + ///
+ + [JsonPropertyName("createdAt")] + public System.DateTimeOffset CreatedAt { get; set; } + + /// + /// Arbitrary URI/URN describing a service-specific transmission type. + ///
+ ///
Refer to the service-specific documentation provided by the service owner for details (if in use). + ///
+ + [JsonPropertyName("extendedType")] + public System.Uri ExtendedType { get; set; } + + /// + /// The UUDIv7 of the action may be provided to support idempotent additions to the list of transmissions. + ///
If not supplied, a new UUIDv7 will be generated. + ///
+ + [JsonPropertyName("id")] + public System.Guid? Id { get; set; } + + /// + /// Reference to any other transmission that this transmission is related to. + /// + + [JsonPropertyName("relatedTransmissionId")] + public System.Guid? RelatedTransmissionId { get; set; } + + /// + /// The actor that sent the transmission. + /// + + [JsonPropertyName("sender")] + public V1ServiceOwnerCommonActors_Actor Sender { get; set; } + + /// + /// The type of transmission. + /// + + [JsonPropertyName("type")] + [JsonConverter(typeof(JsonStringEnumConverter))] + public DialogsEntitiesTransmissions_DialogTransmissionType Type { get; set; } + + } + + [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "14.2.0.0 (NJsonSchema v11.1.0.0 (Newtonsoft.Json v13.0.0.0))")] + public partial class V1ServiceOwnerDialogsCommandsUpdate_TransmissionAttachment + { + /// + /// The display name of the attachment that should be used in GUIs. + /// + + [JsonPropertyName("displayName")] + public ICollection DisplayName { get; set; } + + /// + /// A self-defined UUIDv7 may be provided to support idempotent creation of transmission attachments. If not provided, a new UUIDv7 will be generated. + /// + + [JsonPropertyName("id")] + public System.Guid? Id { get; set; } + + /// + /// The URLs associated with the attachment, each referring to a different representation of the attachment. + /// + + [JsonPropertyName("urls")] + public ICollection Urls { get; set; } + + } + + [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "14.2.0.0 (NJsonSchema v11.1.0.0 (Newtonsoft.Json v13.0.0.0))")] + public partial class V1ServiceOwnerDialogsCommandsUpdate_TransmissionAttachmentUrl + { + /// + /// The type of consumer the URL is intended for. + /// + + [JsonPropertyName("consumerType")] + [JsonConverter(typeof(JsonStringEnumConverter))] + public Attachments_AttachmentUrlConsumerType ConsumerType { get; set; } + + /// + /// The media type of the attachment. + /// + + [JsonPropertyName("mediaType")] + public string MediaType { get; set; } + + /// + /// The fully qualified URL of the attachment. + /// + + [JsonPropertyName("url")] + public System.Uri Url { get; set; } + + } + + [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "14.2.0.0 (NJsonSchema v11.1.0.0 (Newtonsoft.Json v13.0.0.0))")] + public partial class V1ServiceOwnerDialogsCommandsUpdate_TransmissionContent + { + /// + /// Front-channel embedded content. Used to dynamically embed content in the frontend from an external URL. Must be HTTPS. + ///
Allowed media types: application/vnd.dialogporten.frontchannelembed+json;type=markdown + ///
+ + [JsonPropertyName("contentReference")] + public V1CommonContent_ContentValue ContentReference { get; set; } + + /// + /// The transmission summary. + /// + + [JsonPropertyName("summary")] + public V1CommonContent_ContentValue Summary { get; set; } + + /// + /// The transmission title. Must be text/plain. + /// + + [JsonPropertyName("title")] + public V1CommonContent_ContentValue Title { get; set; } + + } + + [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "14.2.0.0 (NJsonSchema v11.1.0.0 (Newtonsoft.Json v13.0.0.0))")] + public partial class V1ServiceOwnerDialogSeenLogsQueriesGet_SeenLog + { + + [JsonPropertyName("id")] + public System.Guid Id { get; set; } + + [JsonPropertyName("isViaServiceOwner")] + public bool? IsViaServiceOwner { get; set; } + + [JsonPropertyName("seenAt")] + public System.DateTimeOffset SeenAt { get; set; } + + [JsonPropertyName("seenBy")] + public V1ServiceOwnerCommonActors_Actor SeenBy { get; set; } + + } + + [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "14.2.0.0 (NJsonSchema v11.1.0.0 (Newtonsoft.Json v13.0.0.0))")] + public partial class V1ServiceOwnerDialogSeenLogsQueriesSearch_SeenLog + { + + [JsonPropertyName("id")] + public System.Guid Id { get; set; } + + [JsonPropertyName("isViaServiceOwner")] + public bool? IsViaServiceOwner { get; set; } + + [JsonPropertyName("seenAt")] + public System.DateTimeOffset SeenAt { get; set; } + + [JsonPropertyName("seenBy")] + public V1ServiceOwnerCommonActors_Actor SeenBy { get; set; } + + } + + [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "14.2.0.0 (NJsonSchema v11.1.0.0 (Newtonsoft.Json v13.0.0.0))")] + public partial class V1ServiceOwnerDialogsQueriesGet_Content + { + /// + /// Additional information about the dialog, this may contain Markdown. + /// + + [JsonPropertyName("additionalInfo")] + public V1CommonContent_ContentValue AdditionalInfo { get; set; } + + /// + /// Used as the human-readable label used to describe the "ExtendedStatus" field. + /// + + [JsonPropertyName("extendedStatus")] + public V1CommonContent_ContentValue ExtendedStatus { get; set; } + + /// + /// Front-channel embedded content. Used to dynamically embed content in the frontend from an external URL. Must be HTTPS. + ///
Allowed media types: application/vnd.dialogporten.frontchannelembed+json;type=markdown + ///
+ + [JsonPropertyName("mainContentReference")] + public V1CommonContent_ContentValue MainContentReference { get; set; } + + /// + /// Overridden sender name. If not supplied, assume "org" as the sender name. + /// + + [JsonPropertyName("senderName")] + public V1CommonContent_ContentValue SenderName { get; set; } + + /// + /// A short summary of the dialog and its current state. + /// + + [JsonPropertyName("summary")] + public V1CommonContent_ContentValue Summary { get; set; } + + /// + /// The title of the dialog. + /// + + [JsonPropertyName("title")] + public V1CommonContent_ContentValue Title { get; set; } + + } + + [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "14.2.0.0 (NJsonSchema v11.1.0.0 (Newtonsoft.Json v13.0.0.0))")] + public partial class V1ServiceOwnerDialogsQueriesGet_Dialog + { + /// + /// An immutable list of activities associated with the dialog. + /// + + [JsonPropertyName("activities")] + public ICollection Activities { get; set; } + + /// + /// The API actions associated with the dialog. Should be used in specialized, non-browser-based integrations. + /// + + [JsonPropertyName("apiActions")] + public ICollection ApiActions { get; set; } + + /// + /// The attachments associated with the dialog (on an aggregate level). + /// + + [JsonPropertyName("attachments")] + public ICollection Attachments { get; set; } + + /// + /// The dialog unstructured text content. + /// + + [JsonPropertyName("content")] + public V1ServiceOwnerDialogsQueriesGet_Content Content { get; set; } + + /// + /// The date and time when the dialog was created. + /// + + [JsonPropertyName("createdAt")] + public System.DateTimeOffset CreatedAt { get; set; } + + /// + /// If deleted, the date and time when the deletion was performed. + /// + + [JsonPropertyName("deletedAt")] + public System.DateTimeOffset? DeletedAt { get; set; } + + /// + /// The due date for the dialog. Dialogs past due date might be marked as such in frontends but will still be available. + /// + + [JsonPropertyName("dueAt")] + public System.DateTimeOffset? DueAt { get; set; } + + /// + /// The expiration date for the dialog. This is the last date when the dialog is available for the end user. + ///
+ ///
After this date is passed, the dialog will be considered expired and no longer available for the end user in any + ///
API. If not supplied, the dialog will be considered to never expire. This field can be changed by the service + ///
owner after the dialog has been created. + ///
+ + [JsonPropertyName("expiresAt")] + public System.DateTimeOffset? ExpiresAt { get; set; } + + /// + /// Arbitrary string with a service-specific indicator of status, typically used to indicate a fine-grained state of + ///
the dialog to further specify the "status" enum. + ///
+ ///
Refer to the service-specific documentation provided by the service owner for details on the possible values (if + ///
in use). + ///
+ + [JsonPropertyName("extendedStatus")] + public string ExtendedStatus { get; set; } + + /// + /// Arbitrary string with a service-specific reference to an external system or service. + ///
+ ///
Refer to the service-specific documentation provided by the service owner for details (if in use). + ///
+ + [JsonPropertyName("externalReference")] + public string ExternalReference { get; set; } + + /// + /// The GUI actions associated with the dialog. Should be used in browser-based interactive frontends. + /// + + [JsonPropertyName("guiActions")] + public ICollection GuiActions { get; set; } + + /// + /// The unique identifier for the dialog in UUIDv7 format. + /// + + [JsonPropertyName("id")] + public System.Guid Id { get; set; } + + /// + /// The service owner code representing the organization (service owner) related to this dialog. + /// + + [JsonPropertyName("org")] + public string Org { get; set; } + + /// + /// The party code representing the organization or person that the dialog belongs to in URN format. + /// + + [JsonPropertyName("party")] + public string Party { get; set; } + + /// + /// Optional preceding process identifier to indicate the business process that preceded the process indicated in the "Process" field. Cannot be set without also "Process" being set. + /// + + [JsonPropertyName("precedingProcess")] + public string PrecedingProcess { get; set; } + + /// + /// Optional process identifier used to indicate a business process this dialog belongs to. + /// + + [JsonPropertyName("process")] + public string Process { get; set; } + + /// + /// Advisory indicator of progress, represented as 1-100 percentage value. 100% representing a dialog that has come + ///
to a natural completion (successful or not). + ///
+ + [JsonPropertyName("progress")] + public int? Progress { get; set; } + + /// + /// The unique identifier for the revision in UUIDv4 format. + /// + + [JsonPropertyName("revision")] + public System.Guid Revision { get; set; } + + /// + /// The list of words (tags) that will be used in dialog search queries. Not visible in end-user DTO. + /// + + [JsonPropertyName("searchTags")] + public ICollection SearchTags { get; set; } + + /// + /// The list of seen log entries for the dialog newer than the dialog ChangedAt date. + /// + + [JsonPropertyName("seenSinceLastUpdate")] + public ICollection SeenSinceLastUpdate { get; set; } + + /// + /// The service identifier for the service that the dialog is related to in URN-format. + ///
This corresponds to a service resource in the Altinn Resource Registry. + ///
+ + [JsonPropertyName("serviceResource")] + public string ServiceResource { get; set; } + + /// + /// The ServiceResource type, as defined in Altinn Resource Registry (see ResourceType). + /// + + [JsonPropertyName("serviceResourceType")] + public string ServiceResourceType { get; set; } + + /// + /// The aggregated status of the dialog. + /// + + [JsonPropertyName("status")] + [JsonConverter(typeof(JsonStringEnumConverter))] + public DialogsEntities_DialogStatus Status { get; set; } + + /// + /// Current display state. + /// + + [JsonPropertyName("systemLabel")] + [JsonConverter(typeof(JsonStringEnumConverter))] + public DialogEndUserContextsEntities_SystemLabel SystemLabel { get; set; } + + /// + /// The immutable list of transmissions associated with the dialog. + /// + + [JsonPropertyName("transmissions")] + public ICollection Transmissions { get; set; } + + /// + /// The date and time when the dialog was last updated. + /// + + [JsonPropertyName("updatedAt")] + public System.DateTimeOffset UpdatedAt { get; set; } + + /// + /// The timestamp when the dialog will be made visible for authorized end users. + /// + + [JsonPropertyName("visibleFrom")] + public System.DateTimeOffset? VisibleFrom { get; set; } + + } + + [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "14.2.0.0 (NJsonSchema v11.1.0.0 (Newtonsoft.Json v13.0.0.0))")] + public partial class V1ServiceOwnerDialogsQueriesGet_DialogActivity + { + /// + /// The date and time when the activity was created. + /// + + [JsonPropertyName("createdAt")] + public System.DateTimeOffset? CreatedAt { get; set; } + + /// + /// Unstructured text describing the activity. Only set if the activity type is "Information". + /// + + [JsonPropertyName("description")] + public ICollection Description { get; set; } + + /// + /// An arbitrary URI/URN with a service-specific activity type. + ///
+ ///
Consult the service-specific documentation provided by the service owner for details (if in use). + ///
+ + [JsonPropertyName("extendedType")] + public System.Uri ExtendedType { get; set; } + + /// + /// The unique identifier for the activity in UUIDv7 format. + /// + + [JsonPropertyName("id")] + public System.Guid Id { get; set; } + + /// + /// The actor that performed the activity. + /// + + [JsonPropertyName("performedBy")] + public V1ServiceOwnerCommonActors_Actor PerformedBy { get; set; } + + /// + /// If the activity is related to a particular transmission, this field will contain the transmission identifier. + /// + + [JsonPropertyName("transmissionId")] + public System.Guid? TransmissionId { get; set; } + + /// + /// The type of activity. + /// + + [JsonPropertyName("type")] + [JsonConverter(typeof(JsonStringEnumConverter))] + public DialogsEntitiesActivities_DialogActivityType Type { get; set; } + + } + + [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "14.2.0.0 (NJsonSchema v11.1.0.0 (Newtonsoft.Json v13.0.0.0))")] + public partial class V1ServiceOwnerDialogsQueriesGet_DialogApiAction + { + /// + /// String identifier for the action, corresponding to the "action" attributeId used in the XACML service policy, + ///
which by default is the policy belonging to the service referred to by "serviceResource" in the dialog. + ///
+ + [JsonPropertyName("action")] + public string Action { get; set; } + + /// + /// Contains an authorization resource attributeId, that can used in custom authorization rules in the XACML service + ///
policy, which by default is the policy belonging to the service referred to by "serviceResource" in the dialog. + ///
+ ///
Can also be used to refer to other service policies. + ///
+ + [JsonPropertyName("authorizationAttribute")] + public string AuthorizationAttribute { get; set; } + + /// + /// The endpoints associated with the action. + /// + + [JsonPropertyName("endpoints")] + public ICollection Endpoints { get; set; } + + /// + /// The unique identifier for the action in UUIDv7 format. + /// + + [JsonPropertyName("id")] + public System.Guid Id { get; set; } + + /// + /// True if the authenticated user (set in the query) is authorized for this action. + /// + + [JsonPropertyName("isAuthorized")] + public bool? IsAuthorized { get; set; } + + } + + [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "14.2.0.0 (NJsonSchema v11.1.0.0 (Newtonsoft.Json v13.0.0.0))")] + public partial class V1ServiceOwnerDialogsQueriesGet_DialogApiActionEndpoint + { + /// + /// Boolean indicating if the endpoint is deprecated. Integrators should migrate to endpoints with a higher version. + /// + + [JsonPropertyName("deprecated")] + public bool Deprecated { get; set; } + + /// + /// Link to service provider documentation for the endpoint. Used for service owners to provide documentation for + ///
integrators. Should be a URL to a human-readable page. + ///
+ + [JsonPropertyName("documentationUrl")] + public System.Uri DocumentationUrl { get; set; } + + /// + /// The HTTP method that the endpoint expects for this action. + /// + + [JsonPropertyName("httpMethod")] + [JsonConverter(typeof(JsonStringEnumConverter))] + public Http_HttpVerb HttpMethod { get; set; } + + /// + /// The unique identifier for the endpoint in UUIDv7 format. + /// + + [JsonPropertyName("id")] + public System.Guid Id { get; set; } + + /// + /// Link to the request schema for the endpoint. Used by service owners to provide documentation for integrators. + ///
Dialogporten will not validate information on this endpoint. + ///
+ + [JsonPropertyName("requestSchema")] + public System.Uri RequestSchema { get; set; } + + /// + /// Link to the response schema for the endpoint. Used for service owners to provide documentation for integrators. + ///
Dialogporten will not validate information on this endpoint. + ///
+ + [JsonPropertyName("responseSchema")] + public System.Uri ResponseSchema { get; set; } + + /// + /// Date and time when the service owner has indicated that endpoint will no longer function. Only set if the endpoint + ///
is deprecated. Dialogporten will not enforce this date. + ///
+ + [JsonPropertyName("sunsetAt")] + public System.DateTimeOffset? SunsetAt { get; set; } + + /// + /// The fully qualified URL of the API endpoint. + /// + + [JsonPropertyName("url")] + public System.Uri Url { get; set; } + + /// + /// Arbitrary string indicating the version of the endpoint. + ///
+ ///
Consult the service-specific documentation provided by the service owner for details (if in use). + ///
+ + [JsonPropertyName("version")] + public string Version { get; set; } + + } + + [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "14.2.0.0 (NJsonSchema v11.1.0.0 (Newtonsoft.Json v13.0.0.0))")] + public partial class V1ServiceOwnerDialogsQueriesGet_DialogAttachment + { + /// + /// The display name of the attachment that should be used in GUIs. + /// + + [JsonPropertyName("displayName")] + public ICollection DisplayName { get; set; } + + /// + /// The unique identifier for the attachment in UUIDv7 format. + /// + + [JsonPropertyName("id")] + public System.Guid Id { get; set; } + + /// + /// The URLs associated with the attachment, each referring to a different representation of the attachment. + /// + + [JsonPropertyName("urls")] + public ICollection Urls { get; set; } + + } + + [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "14.2.0.0 (NJsonSchema v11.1.0.0 (Newtonsoft.Json v13.0.0.0))")] + public partial class V1ServiceOwnerDialogsQueriesGet_DialogAttachmentUrl + { + /// + /// What type of consumer the URL is intended for. + /// + + [JsonPropertyName("consumerType")] + [JsonConverter(typeof(JsonStringEnumConverter))] + public Attachments_AttachmentUrlConsumerType ConsumerType { get; set; } + + /// + /// The unique identifier for the attachment URL in UUIDv7 format. + /// + + [JsonPropertyName("id")] + public System.Guid Id { get; set; } + + /// + /// The media type of the attachment. + /// + + [JsonPropertyName("mediaType")] + public string MediaType { get; set; } + + /// + /// The fully qualified URL of the attachment. + /// + + [JsonPropertyName("url")] + public System.Uri Url { get; set; } + + } + + [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "14.2.0.0 (NJsonSchema v11.1.0.0 (Newtonsoft.Json v13.0.0.0))")] + public partial class V1ServiceOwnerDialogsQueriesGet_DialogGuiAction + { + /// + /// The action identifier for the action, corresponding to the "action" attributeId used in the XACML service policy. + /// + + [JsonPropertyName("action")] + public string Action { get; set; } + + /// + /// Contains an authorization resource attributeId, that can used in custom authorization rules in the XACML service + ///
policy, which by default is the policy belonging to the service referred to by "serviceResource" in the dialog. + ///
+ ///
Can also be used to refer to other service policies. + ///
+ + [JsonPropertyName("authorizationAttribute")] + public string AuthorizationAttribute { get; set; } + + /// + /// The HTTP method that the frontend should use when redirecting the user. + /// + + [JsonPropertyName("httpMethod")] + [JsonConverter(typeof(JsonStringEnumConverter))] + public Http_HttpVerb HttpMethod { get; set; } + + /// + /// The unique identifier for the action in UUIDv7 format. + /// + + [JsonPropertyName("id")] + public System.Guid Id { get; set; } + + /// + /// Whether the user, if supplied in the query, is authorized to perform the action. + /// + + [JsonPropertyName("isAuthorized")] + public bool? IsAuthorized { get; set; } + + /// + /// Indicates whether the action results in the dialog being deleted. Used by frontends to implement custom UX + ///
for delete actions. + ///
+ + [JsonPropertyName("isDeleteDialogAction")] + public bool IsDeleteDialogAction { get; set; } + + /// + /// Indicates a priority for the action, making it possible for frontends to adapt GUI elements based on action + ///
priority. + ///
+ + [JsonPropertyName("priority")] + [JsonConverter(typeof(JsonStringEnumConverter))] + public DialogsEntitiesActions_DialogGuiActionPriority Priority { get; set; } + + /// + /// If there should be a prompt asking the user for confirmation before the action is executed, + ///
this field should contain the prompt text. + ///
+ + [JsonPropertyName("prompt")] + public ICollection Prompt { get; set; } + + /// + /// The title of the action, this should be short and in verb form. + /// + + [JsonPropertyName("title")] + public ICollection Title { get; set; } + + /// + /// The fully qualified URL of the action, to which the user will be redirected when the action is triggered. + /// + + [JsonPropertyName("url")] + public System.Uri Url { get; set; } + + } + + [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "14.2.0.0 (NJsonSchema v11.1.0.0 (Newtonsoft.Json v13.0.0.0))")] + public partial class V1ServiceOwnerDialogsQueriesGet_DialogSeenLog + { + /// + /// The unique identifier for the seen log entry in UUIDv7 format. + /// + + [JsonPropertyName("id")] + public System.Guid Id { get; set; } + + /// + /// Flag indicating whether the seen log entry was created by the current end user, if provided in the query. + /// + + [JsonPropertyName("isCurrentEndUser")] + public bool IsCurrentEndUser { get; set; } + + /// + /// Flag indicating whether the seen log entry was created via the service owner. + ///
+ ///
This is used when the service owner uses the service owner API to implement its own frontend. + ///
+ + [JsonPropertyName("isViaServiceOwner")] + public bool? IsViaServiceOwner { get; set; } + + /// + /// The timestamp when the dialog revision was seen. + /// + + [JsonPropertyName("seenAt")] + public System.DateTimeOffset SeenAt { get; set; } + + /// + /// The actor that saw the dialog revision. + /// + + [JsonPropertyName("seenBy")] + public V1ServiceOwnerCommonActors_Actor SeenBy { get; set; } + + } + + [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "14.2.0.0 (NJsonSchema v11.1.0.0 (Newtonsoft.Json v13.0.0.0))")] + public partial class V1ServiceOwnerDialogsQueriesGet_DialogTransmission + { + /// + /// The transmission-level attachments. + /// + + [JsonPropertyName("attachments")] + public ICollection Attachments { get; set; } + + /// + /// Contains an authorization resource attributeId, that can used in custom authorization rules in the XACML service + ///
policy, which by default is the policy belonging to the service referred to by "serviceResource" in the dialog. + ///
+ ///
Can also be used to refer to other service policies. + ///
+ + [JsonPropertyName("authorizationAttribute")] + public string AuthorizationAttribute { get; set; } + + /// + /// The transmission unstructured text content. + /// + + [JsonPropertyName("content")] + public V1ServiceOwnerDialogsQueriesGet_DialogTransmissionContent Content { get; set; } + + /// + /// The date and time when the transmission was created. + /// + + [JsonPropertyName("createdAt")] + public System.DateTimeOffset CreatedAt { get; set; } + + /// + /// Arbitrary URI/URN describing a service-specific transmission type. + ///
+ ///
Refer to the service-specific documentation provided by the service owner for details (if in use). + ///
+ + [JsonPropertyName("extendedType")] + public System.Uri ExtendedType { get; set; } + + /// + /// The unique identifier for the transmission in UUIDv7 format. + /// + + [JsonPropertyName("id")] + public System.Guid Id { get; set; } + + /// + /// Flag indicating if the authenticated user supplied in the query is authorized for this transmission. + /// + + [JsonPropertyName("isAuthorized")] + public bool? IsAuthorized { get; set; } + + /// + /// Reference to any other transmission that this transmission is related to. + /// + + [JsonPropertyName("relatedTransmissionId")] + public System.Guid? RelatedTransmissionId { get; set; } + + /// + /// The actor that sent the transmission. + /// + + [JsonPropertyName("sender")] + public V1ServiceOwnerCommonActors_Actor Sender { get; set; } + + /// + /// The type of transmission. + /// + + [JsonPropertyName("type")] + [JsonConverter(typeof(JsonStringEnumConverter))] + public DialogsEntitiesTransmissions_DialogTransmissionType Type { get; set; } + + } + + [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "14.2.0.0 (NJsonSchema v11.1.0.0 (Newtonsoft.Json v13.0.0.0))")] + public partial class V1ServiceOwnerDialogsQueriesGet_DialogTransmissionAttachment + { + /// + /// The display name of the attachment that should be used in GUIs. + /// + + [JsonPropertyName("displayName")] + public ICollection DisplayName { get; set; } + + /// + /// The unique identifier for the attachment in UUIDv7 format. + /// + + [JsonPropertyName("id")] + public System.Guid Id { get; set; } + + /// + /// The URLs associated with the attachment, each referring to a different representation of the attachment. + /// + + [JsonPropertyName("urls")] + public ICollection Urls { get; set; } + + } + + [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "14.2.0.0 (NJsonSchema v11.1.0.0 (Newtonsoft.Json v13.0.0.0))")] + public partial class V1ServiceOwnerDialogsQueriesGet_DialogTransmissionAttachmentUrl + { + /// + /// The type of consumer the URL is intended for. + /// + + [JsonPropertyName("consumerType")] + [JsonConverter(typeof(JsonStringEnumConverter))] + public Attachments_AttachmentUrlConsumerType ConsumerType { get; set; } + + /// + /// The media type of the attachment. + /// + + [JsonPropertyName("mediaType")] + public string MediaType { get; set; } + + /// + /// The fully qualified URL of the attachment. Will be set to "urn:dialogporten:unauthorized" if the user is + ///
not authorized to access the transmission. + ///
+ + [JsonPropertyName("url")] + public System.Uri Url { get; set; } + + } + + [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "14.2.0.0 (NJsonSchema v11.1.0.0 (Newtonsoft.Json v13.0.0.0))")] + public partial class V1ServiceOwnerDialogsQueriesGet_DialogTransmissionContent + { + /// + /// Front-channel embedded content. Used to dynamically embed content in the frontend from an external URL. Must be HTTPS. + ///
Allowed media types: application/vnd.dialogporten.frontchannelembed+json;type=markdown + ///
+ + [JsonPropertyName("contentReference")] + public V1CommonContent_ContentValue ContentReference { get; set; } + + /// + /// The transmission summary. + /// + + [JsonPropertyName("summary")] + public V1CommonContent_ContentValue Summary { get; set; } + + /// + /// The transmission title. + /// + + [JsonPropertyName("title")] + public V1CommonContent_ContentValue Title { get; set; } + + } + + [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "14.2.0.0 (NJsonSchema v11.1.0.0 (Newtonsoft.Json v13.0.0.0))")] + public partial class V1ServiceOwnerDialogsQueriesGet_SearchTag + { + /// + /// A search tag value. + /// + + [JsonPropertyName("value")] + public string Value { get; set; } + + } + + [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "14.2.0.0 (NJsonSchema v11.1.0.0 (Newtonsoft.Json v13.0.0.0))")] + public partial class V1ServiceOwnerDialogsQueriesSearch_Content + { + /// + /// Used as the human-readable label used to describe the "ExtendedStatus" field. + /// + + [JsonPropertyName("extendedStatus")] + public V1CommonContent_ContentValue ExtendedStatus { get; set; } + + /// + /// Overridden sender name. If not supplied, assume "org" as the sender name. + /// + + [JsonPropertyName("senderName")] + public V1CommonContent_ContentValue SenderName { get; set; } + + /// + /// A short summary of the dialog and its current state. + /// + + [JsonPropertyName("summary")] + public V1CommonContent_ContentValue Summary { get; set; } + + /// + /// The title of the dialog. + /// + + [JsonPropertyName("title")] + public V1CommonContent_ContentValue Title { get; set; } + + } + + [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "14.2.0.0 (NJsonSchema v11.1.0.0 (Newtonsoft.Json v13.0.0.0))")] + public partial class V1ServiceOwnerDialogsQueriesSearch_Dialog + { + /// + /// The content of the dialog in search results. + /// + + [JsonPropertyName("content")] + public V1ServiceOwnerDialogsQueriesSearch_Content Content { get; set; } + + /// + /// The date and time when the dialog was created. + /// + + [JsonPropertyName("createdAt")] + public System.DateTimeOffset CreatedAt { get; set; } + + /// + /// The due date for the dialog. This is the last date when the dialog is expected to be completed. + /// + + [JsonPropertyName("dueAt")] + public System.DateTimeOffset? DueAt { get; set; } + + /// + /// Arbitrary string with a service-specific indicator of status, typically used to indicate a fine-grained state of + ///
the dialog to further specify the "status" enum. + ///
+ ///
Refer to the service-specific documentation provided by the service owner for details on the possible values (if + ///
in use). + ///
+ + [JsonPropertyName("extendedStatus")] + public string ExtendedStatus { get; set; } + + /// + /// Arbitrary string with a service-specific reference to an external system or service. + ///
+ ///
Refer to the service-specific documentation provided by the service owner for details (if in use). + ///
+ + [JsonPropertyName("externalReference")] + public string ExternalReference { get; set; } + + /// + /// The number of attachments in the dialog made available for browser-based frontends. + /// + + [JsonPropertyName("guiAttachmentCount")] + public int? GuiAttachmentCount { get; set; } + + /// + /// The unique identifier for the dialog in UUIDv7 format. + /// + + [JsonPropertyName("id")] + public System.Guid Id { get; set; } + + /// + /// The latest entry in the dialog's activity log. + /// + + [JsonPropertyName("latestActivity")] + public V1ServiceOwnerDialogsQueriesSearch_DialogActivity LatestActivity { get; set; } + + /// + /// The service owner code representing the organization (service owner) related to this dialog. + /// + + [JsonPropertyName("org")] + public string Org { get; set; } + + /// + /// The party code representing the organization or person that the dialog belongs to in URN format. + /// + + [JsonPropertyName("party")] + public string Party { get; set; } + + /// + /// Optional preceding process identifier to indicate the business process that preceded the process indicated in the "Process" field. Cannot be set without also "Process" being set. + /// + + [JsonPropertyName("precedingProcess")] + public string PrecedingProcess { get; set; } + + /// + /// Optional process identifier used to indicate a business process this dialog belongs to. + /// + + [JsonPropertyName("process")] + public string Process { get; set; } + + /// + /// Advisory indicator of progress, represented as 1-100 percentage value. 100% representing a dialog that has come + ///
to a natural completion (successful or not). + ///
+ + [JsonPropertyName("progress")] + public int? Progress { get; set; } + + /// + /// The unique identifier for the revision in UUIDv4 format. + /// + + [JsonPropertyName("revision")] + public System.Guid Revision { get; set; } + + /// + /// The list of seen log entries for the dialog newer than the dialog ChangedAt date. + /// + + [JsonPropertyName("seenSinceLastUpdate")] + public ICollection SeenSinceLastUpdate { get; set; } + + /// + /// The service identifier for the service that the dialog is related to in URN-format. + ///
This corresponds to a service resource in the Altinn Resource Registry. + ///
+ + [JsonPropertyName("serviceResource")] + public string ServiceResource { get; set; } + + /// + /// The ServiceResource type, as defined in Altinn Resource Registry (see ResourceType). + /// + + [JsonPropertyName("serviceResourceType")] + public string ServiceResourceType { get; set; } + + /// + /// The aggregated status of the dialog. + /// + + [JsonPropertyName("status")] + [JsonConverter(typeof(JsonStringEnumConverter))] + public DialogsEntities_DialogStatus Status { get; set; } + + /// + /// Current display state. + /// + + [JsonPropertyName("systemLabel")] + [JsonConverter(typeof(JsonStringEnumConverter))] + public DialogEndUserContextsEntities_SystemLabel SystemLabel { get; set; } + + /// + /// The date and time when the dialog was last updated. + /// + + [JsonPropertyName("updatedAt")] + public System.DateTimeOffset UpdatedAt { get; set; } + + /// + /// The timestamp when the dialog will be made visible for authorized end users. + /// + + [JsonPropertyName("visibleFrom")] + public System.DateTimeOffset? VisibleFrom { get; set; } + + } + + [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "14.2.0.0 (NJsonSchema v11.1.0.0 (Newtonsoft.Json v13.0.0.0))")] + public partial class V1ServiceOwnerDialogsQueriesSearch_DialogActivity + { + /// + /// The date and time when the activity was created. + /// + + [JsonPropertyName("createdAt")] + public System.DateTimeOffset? CreatedAt { get; set; } + + /// + /// Unstructured text describing the activity. Only set if the activity type is "Information". + /// + + [JsonPropertyName("description")] + public ICollection Description { get; set; } + + /// + /// An arbitrary string with a service-specific activity type. + ///
+ ///
Consult the service-specific documentation provided by the service owner for details (if in use). + ///
+ + [JsonPropertyName("extendedType")] + public System.Uri ExtendedType { get; set; } + + /// + /// The unique identifier for the activity in UUIDv7 format. + /// + + [JsonPropertyName("id")] + public System.Guid Id { get; set; } + + /// + /// The actor that performed the activity. + /// + + [JsonPropertyName("performedBy")] + public V1ServiceOwnerCommonActors_Actor PerformedBy { get; set; } + + /// + /// If the activity is related to a particular transmission, this field will contain the transmission identifier. + /// + + [JsonPropertyName("transmissionId")] + public System.Guid? TransmissionId { get; set; } + + /// + /// The type of activity. + /// + + [JsonPropertyName("type")] + [JsonConverter(typeof(JsonStringEnumConverter))] + public DialogsEntitiesActivities_DialogActivityType Type { get; set; } + + } + + [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "14.2.0.0 (NJsonSchema v11.1.0.0 (Newtonsoft.Json v13.0.0.0))")] + public partial class V1ServiceOwnerDialogsQueriesSearch_DialogSeenLog + { + /// + /// The unique identifier for the seen log entry in UUIDv7 format. + /// + + [JsonPropertyName("id")] + public System.Guid Id { get; set; } + + /// + /// Flag indicating whether the seen log entry was created by the end user supplied in the query. + /// + + [JsonPropertyName("isCurrentEndUser")] + public bool IsCurrentEndUser { get; set; } + + /// + /// Flag indicating whether the seen log entry was created via the service owner. + ///
+ ///
This is used when the service owner uses the service owner API to implement its own frontend. + ///
+ + [JsonPropertyName("isViaServiceOwner")] + public bool? IsViaServiceOwner { get; set; } + + /// + /// The timestamp when the dialog revision was seen. + /// + + [JsonPropertyName("seenAt")] + public System.DateTimeOffset SeenAt { get; set; } + + /// + /// The actor that saw the dialog revision. + /// + + [JsonPropertyName("seenBy")] + public V1ServiceOwnerCommonActors_Actor SeenBy { get; set; } + + } + + [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "14.2.0.0 (NJsonSchema v11.1.0.0 (Newtonsoft.Json v13.0.0.0))")] + public partial class V1ServiceOwnerDialogsUpdate_DialogRequest + { + + [JsonPropertyName("dto")] + public V1ServiceOwnerDialogsCommandsUpdate_Dialog Dto { get; set; } + + } + + [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "14.2.0.0 (NJsonSchema v11.1.0.0 (Newtonsoft.Json v13.0.0.0))")] + public partial class V1ServiceOwnerDialogTransmissionsCreate_TransmissionRequest + { + /// + /// The transmission-level attachments. + /// + + [JsonPropertyName("attachments")] + public ICollection Attachments { get; set; } + + /// + /// Contains an authorization resource attributeId, that can used in custom authorization rules in the XACML service + ///
policy, which by default is the policy belonging to the service referred to by "serviceResource" in the dialog. + ///
+ ///
Can also be used to refer to other service policies. + ///
+ + [JsonPropertyName("authorizationAttribute")] + public string AuthorizationAttribute { get; set; } + + /// + /// The transmission unstructured text content. + /// + + [JsonPropertyName("content")] + public V1ServiceOwnerDialogsCommandsUpdate_TransmissionContent Content { get; set; } + + /// + /// If supplied, overrides the creating date and time for the transmission. + ///
If not supplied, the current date /time will be used. + ///
+ + [JsonPropertyName("createdAt")] + public System.DateTimeOffset CreatedAt { get; set; } + + /// + /// Arbitrary URI/URN describing a service-specific transmission type. + ///
+ ///
Refer to the service-specific documentation provided by the service owner for details (if in use). + ///
+ + [JsonPropertyName("extendedType")] + public System.Uri ExtendedType { get; set; } + + /// + /// The UUDIv7 of the action may be provided to support idempotent additions to the list of transmissions. + ///
If not supplied, a new UUIDv7 will be generated. + ///
+ + [JsonPropertyName("id")] + public System.Guid? Id { get; set; } + + /// + /// Reference to any other transmission that this transmission is related to. + /// + + [JsonPropertyName("relatedTransmissionId")] + public System.Guid? RelatedTransmissionId { get; set; } + + /// + /// The actor that sent the transmission. + /// + + [JsonPropertyName("sender")] + public V1ServiceOwnerCommonActors_Actor Sender { get; set; } + + /// + /// The type of transmission. + /// + + [JsonPropertyName("type")] + [JsonConverter(typeof(JsonStringEnumConverter))] + public DialogsEntitiesTransmissions_DialogTransmissionType Type { get; set; } + + } + + [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "14.2.0.0 (NJsonSchema v11.1.0.0 (Newtonsoft.Json v13.0.0.0))")] + public partial class V1ServiceOwnerDialogTransmissionsQueriesGet_Attachment + { + /// + /// The display name of the attachment that should be used in GUIs. + /// + + [JsonPropertyName("displayName")] + public ICollection DisplayName { get; set; } + + /// + /// The unique identifier for the attachment in UUIDv7 format. + /// + + [JsonPropertyName("id")] + public System.Guid Id { get; set; } + + /// + /// The URLs associated with the attachment, each referring to a different representation of the attachment. + /// + + [JsonPropertyName("urls")] + public ICollection Urls { get; set; } + + } + + [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "14.2.0.0 (NJsonSchema v11.1.0.0 (Newtonsoft.Json v13.0.0.0))")] + public partial class V1ServiceOwnerDialogTransmissionsQueriesGet_AttachmentUrl + { + /// + /// The type of consumer the URL is intended for. + /// + + [JsonPropertyName("consumerType")] + [JsonConverter(typeof(JsonStringEnumConverter))] + public Attachments_AttachmentUrlConsumerType ConsumerType { get; set; } + + /// + /// The unique identifier for the attachment URL in UUIDv7 format. + /// + + [JsonPropertyName("id")] + public System.Guid Id { get; set; } + + /// + /// The media type of the attachment. + /// + + [JsonPropertyName("mediaType")] + public string MediaType { get; set; } + + /// + /// The fully qualified URL of the attachment. Will be set to "urn:dialogporten:unauthorized" if the user is + ///
not authorized to access the transmission. + ///
+ + [JsonPropertyName("url")] + public System.Uri Url { get; set; } + + } + + [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "14.2.0.0 (NJsonSchema v11.1.0.0 (Newtonsoft.Json v13.0.0.0))")] + public partial class V1ServiceOwnerDialogTransmissionsQueriesGet_Content + { + /// + /// Front-channel embedded content. Used to dynamically embed content in the frontend from an external URL. + ///
Allowed media types: application/vnd.dialogporten.frontchannelembed+json;type=markdown + ///
+ + [JsonPropertyName("contentReference")] + public V1CommonContent_ContentValue ContentReference { get; set; } + + /// + /// The summary of the content. + /// + + [JsonPropertyName("summary")] + public V1CommonContent_ContentValue Summary { get; set; } + + /// + /// The title of the content. + /// + + [JsonPropertyName("title")] + public V1CommonContent_ContentValue Title { get; set; } + + } + + [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "14.2.0.0 (NJsonSchema v11.1.0.0 (Newtonsoft.Json v13.0.0.0))")] + public partial class V1ServiceOwnerDialogTransmissionsQueriesGet_Transmission + { + /// + /// The attachments associated with the transmission. + /// + + [JsonPropertyName("attachments")] + public ICollection Attachments { get; set; } + + /// + /// The authorization attribute associated with the transmission. + /// + + [JsonPropertyName("authorizationAttribute")] + public string AuthorizationAttribute { get; set; } + + /// + /// The content of the transmission. + /// + + [JsonPropertyName("content")] + public V1ServiceOwnerDialogTransmissionsQueriesGet_Content Content { get; set; } + + /// + /// The date and time when the transmission was created. + /// + + [JsonPropertyName("createdAt")] + public System.DateTimeOffset CreatedAt { get; set; } + + /// + /// The date and time when the transmission was deleted, if applicable. + /// + + [JsonPropertyName("deletedAt")] + public System.DateTimeOffset? DeletedAt { get; set; } + + /// + /// The extended type URI for the transmission. + /// + + [JsonPropertyName("extendedType")] + public System.Uri ExtendedType { get; set; } + + /// + /// The unique identifier for the transmission in UUIDv7 format. + /// + + [JsonPropertyName("id")] + public System.Guid Id { get; set; } + + /// + /// The unique identifier for the related transmission, if any. + /// + + [JsonPropertyName("relatedTransmissionId")] + public System.Guid? RelatedTransmissionId { get; set; } + + /// + /// The sender actor information for the transmission. + /// + + [JsonPropertyName("sender")] + public V1ServiceOwnerCommonActors_Actor Sender { get; set; } + + /// + /// The type of the transmission. + /// + + [JsonPropertyName("type")] + [JsonConverter(typeof(JsonStringEnumConverter))] + public DialogsEntitiesTransmissions_DialogTransmissionType Type { get; set; } + + } + + [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "14.2.0.0 (NJsonSchema v11.1.0.0 (Newtonsoft.Json v13.0.0.0))")] + public partial class V1ServiceOwnerDialogTransmissionsQueriesSearch_Attachment + { + /// + /// The display name of the attachment that should be used in GUIs. + /// + + [JsonPropertyName("displayName")] + public ICollection DisplayName { get; set; } + + /// + /// The unique identifier for the attachment in UUIDv7 format. + /// + + [JsonPropertyName("id")] + public System.Guid Id { get; set; } + + /// + /// The URLs associated with the attachment, each referring to a different representation of the attachment. + /// + + [JsonPropertyName("urls")] + public ICollection Urls { get; set; } + + } + + [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "14.2.0.0 (NJsonSchema v11.1.0.0 (Newtonsoft.Json v13.0.0.0))")] + public partial class V1ServiceOwnerDialogTransmissionsQueriesSearch_AttachmentUrl + { + /// + /// The type of consumer the URL is intended for. + /// + + [JsonPropertyName("consumerType")] + [JsonConverter(typeof(JsonStringEnumConverter))] + public Attachments_AttachmentUrlConsumerType ConsumerType { get; set; } + + /// + /// The unique identifier for the attachment URL in UUIDv7 format. + /// + + [JsonPropertyName("id")] + public System.Guid Id { get; set; } + + /// + /// The media type of the attachment. + /// + + [JsonPropertyName("mediaType")] + public string MediaType { get; set; } + + /// + /// The fully qualified URL of the attachment. Will be set to "urn:dialogporten:unauthorized" if the user is + ///
not authorized to access the transmission. + ///
+ + [JsonPropertyName("url")] + public System.Uri Url { get; set; } + + } + + [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "14.2.0.0 (NJsonSchema v11.1.0.0 (Newtonsoft.Json v13.0.0.0))")] + public partial class V1ServiceOwnerDialogTransmissionsQueriesSearch_Content + { + /// + /// Front-channel embedded content. Used to dynamically embed content in the frontend from an external URL. + /// + + [JsonPropertyName("contentReference")] + public V1CommonContent_ContentValue ContentReference { get; set; } + + /// + /// The summary of the content. + /// + + [JsonPropertyName("summary")] + public V1CommonContent_ContentValue Summary { get; set; } + + /// + /// The title of the content. + /// + + [JsonPropertyName("title")] + public V1CommonContent_ContentValue Title { get; set; } + + } + + [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "14.2.0.0 (NJsonSchema v11.1.0.0 (Newtonsoft.Json v13.0.0.0))")] + public partial class V1ServiceOwnerDialogTransmissionsQueriesSearch_Transmission + { + /// + /// The attachments associated with the transmission. + /// + + [JsonPropertyName("attachments")] + public ICollection Attachments { get; set; } + + /// + /// The authorization attribute associated with the transmission. + /// + + [JsonPropertyName("authorizationAttribute")] + public string AuthorizationAttribute { get; set; } + + /// + /// The content of the transmission. + /// + + [JsonPropertyName("content")] + public V1ServiceOwnerDialogTransmissionsQueriesSearch_Content Content { get; set; } + + /// + /// The date and time when the transmission was created. + /// + + [JsonPropertyName("createdAt")] + public System.DateTimeOffset CreatedAt { get; set; } + + /// + /// The date and time when the transmission was deleted, if applicable. + /// + + [JsonPropertyName("deletedAt")] + public System.DateTimeOffset? DeletedAt { get; set; } + + /// + /// The extended type URI for the transmission. + /// + + [JsonPropertyName("extendedType")] + public System.Uri ExtendedType { get; set; } + + /// + /// The unique identifier for the transmission in UUIDv7 format. + /// + + [JsonPropertyName("id")] + public System.Guid Id { get; set; } + + /// + /// The unique identifier for the related transmission, if any. + /// + + [JsonPropertyName("relatedTransmissionId")] + public System.Guid? RelatedTransmissionId { get; set; } + + /// + /// The sender actor information for the transmission. + /// + + [JsonPropertyName("sender")] + public V1ServiceOwnerCommonActors_Actor Sender { get; set; } + + /// + /// The type of the transmission. + /// + + [JsonPropertyName("type")] + [JsonConverter(typeof(JsonStringEnumConverter))] + public DialogsEntitiesTransmissions_DialogTransmissionType Type { get; set; } + + } + + [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "14.2.0.0 (NJsonSchema v11.1.0.0 (Newtonsoft.Json v13.0.0.0))")] + public partial class V1WellKnownJwksQueriesGet_GetJwks + { + + [JsonPropertyName("keys")] + public ICollection Keys { get; set; } + + } + + [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "14.2.0.0 (NJsonSchema v11.1.0.0 (Newtonsoft.Json v13.0.0.0))")] + public partial class V1WellKnownJwksQueriesGet_Jwk + { + + [JsonPropertyName("alg")] + public string Alg { get; set; } + + [JsonPropertyName("crv")] + public string Crv { get; set; } + + [JsonPropertyName("kid")] + public string Kid { get; set; } + + [JsonPropertyName("kty")] + public string Kty { get; set; } + + [JsonPropertyName("use")] + public string Use { get; set; } + + [JsonPropertyName("x")] + public string X { get; set; } + + } + + [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "14.2.0.0 (NJsonSchema v11.1.0.0 (Newtonsoft.Json v13.0.0.0))")] + public partial class V1WellKnownOauthAuthorizationServerQueriesGet_GetOauthAuthorizationServer + { + + [JsonPropertyName("issuer")] + public string Issuer { get; set; } + + [JsonPropertyName("jwks_uri")] + public string Jwks_uri { get; set; } + + } + + +} + +#pragma warning restore 108 +#pragma warning restore 114 +#pragma warning restore 472 +#pragma warning restore 612 +#pragma warning restore 1573 +#pragma warning restore 1591 +#pragma warning restore 8073 +#pragma warning restore 3016 +#pragma warning restore 8603 +#pragma warning restore 8604 +#pragma warning restore 8625 \ No newline at end of file From afa5316d3c5ac87c70273954a468852aeaec53ec Mon Sep 17 00:00:00 2001 From: Amund Myrbostad Date: Mon, 25 Nov 2024 10:44:44 +0100 Subject: [PATCH 02/62] Workflow test --- .github/workflows/ci-cd-pull-request.yml | 14 ++++++++++++-- ...Library.Dialogporten.WebApiClient.Sample.csproj | 3 +++ .../Program.cs | 2 +- .../appsettings.json | 10 ---------- 4 files changed, 16 insertions(+), 13 deletions(-) diff --git a/.github/workflows/ci-cd-pull-request.yml b/.github/workflows/ci-cd-pull-request.yml index 4bafe4b18..c02910930 100644 --- a/.github/workflows/ci-cd-pull-request.yml +++ b/.github/workflows/ci-cd-pull-request.yml @@ -2,10 +2,20 @@ on: pull_request: - branches: [main] + branches: [ main ] paths-ignore: - "tests/k6/**" - - "CHANGELOG.md" +jobs: + runs-on: ubuntu-latest + timeout-minutes: 15 + steps: + - name: Checkout + uses: actions/checkout@v4 + - name: set PROJECT variable to point to project + run: | + PROJECT=$(find . -name '*Digdir.Library.Dialogporten.WebApiClient.csproj' -printf "%p" -quit) + echo "PROJECT ${PROJECT}" + echo "PROJECT=${PROJECT}" >> $GITHUB_ENV - "CHANGELOG.md" # #jobs: # generate-git-short-sha: diff --git a/src/Digdir.Library.Dialogporten.WebApiClient.Sample/Digdir.Library.Dialogporten.WebApiClient.Sample.csproj b/src/Digdir.Library.Dialogporten.WebApiClient.Sample/Digdir.Library.Dialogporten.WebApiClient.Sample.csproj index df2de14ef..6f78501ed 100644 --- a/src/Digdir.Library.Dialogporten.WebApiClient.Sample/Digdir.Library.Dialogporten.WebApiClient.Sample.csproj +++ b/src/Digdir.Library.Dialogporten.WebApiClient.Sample/Digdir.Library.Dialogporten.WebApiClient.Sample.csproj @@ -14,6 +14,9 @@ PreserveNewest + + PreserveNewest + diff --git a/src/Digdir.Library.Dialogporten.WebApiClient.Sample/Program.cs b/src/Digdir.Library.Dialogporten.WebApiClient.Sample/Program.cs index 5355b4bbf..0d6db826a 100644 --- a/src/Digdir.Library.Dialogporten.WebApiClient.Sample/Program.cs +++ b/src/Digdir.Library.Dialogporten.WebApiClient.Sample/Program.cs @@ -5,7 +5,7 @@ using Microsoft.Extensions.Configuration; using Microsoft.Extensions.DependencyInjection; var configuration = new ConfigurationBuilder() - .AddJsonFile("appsettings.json", optional: false, reloadOnChange: true) + .AddJsonFile("appsettings.local.json", optional: false, reloadOnChange: true) .Build(); var services = new ServiceCollection(); diff --git a/src/Digdir.Library.Dialogporten.WebApiClient.Sample/appsettings.json b/src/Digdir.Library.Dialogporten.WebApiClient.Sample/appsettings.json index b740a0b52..fcaba932d 100644 --- a/src/Digdir.Library.Dialogporten.WebApiClient.Sample/appsettings.json +++ b/src/Digdir.Library.Dialogporten.WebApiClient.Sample/appsettings.json @@ -6,15 +6,5 @@ "Scope": "digdir:dialogporten.serviceprovider digdir:dialogporten.serviceprovider.search", "EncodedJwk": "eyJwIjoieTRBZEhlVVBxdFEtSFlOWkR5ci0zS09RT3NQajA5TFh2a2hIUFlTdGFYNThkMndIWUJiVXlDTWdMYWtGTHo4UExKNWtscURsanRoczFtM1dFVGJhSWVuY25TalpjZTh4S1Q2SHh3bTNyaDlydWZ1TWVOZDRqaFptTm9WZmJrcGNXcVh0UDFvb1NPTE5zYUNVUWFUUEVKTXlFd3VhdWxMSzgxRG1SSTlMSmVNIiwia3R5IjoiUlNBIiwicSI6InFmOEQ2Uy1Kd19BdVQ0Q2hjQTlDek9WNk1uTW9mc1VCdTkteHJBcVFDRjh4WWZZOTRxQ1ZjQ3llajlkTlN3eXZUZXg1dThIMzNSaU1LMEFWM2tTQlpJLVZqcXJHLUx6YzNfTUlTTVpSVDJfbzNVQlRWVHpqTkUtSkpMX1hKaXJ6ZVhhQjM1UmFZMjFnWVhKQWg3X2tuR3dpRzF3MGxiT2ozQ0FzdnVwaU1BMCIsImQiOiJLVkF1b1Zhd2paTTgwenRYcUxSZUJGZkJ3M3pxVjdkUGFpaWFONWU0RFp6bW5MYTFMNEZJMTgtanVraHN4UVdqR1NFQnBIdTFrOHRPUWMyWjBsSDVaaTBydERqM0JKeEhxeDNsUGdYMWdTNXNiX1EyeXNfb2FKcklSX012MHBDQUFHX3hpa2lUY2kzTHMyeV9femV4QTdLbG0yalNmYW9Udzdhbml1R3RId1d5dHhCSnJnZ0J2c3loaHZIaUVQcnZaMHZBZldYYWI3QUtkUjc1cEtEaVVHOGdGNTdJN0hrWnpJSk9QYXp3MTU1Skx4TG9HcDVzeTFCVVpBNHRiQmlseWVsdG9ONGZINWd1aUktOXJjTE5zUmVYazJ1c3NFbE9EbVZ2Qmx2ZVVfb1ZRMVYtVDRJRnUzZk1BYVJGUFA2Wlo1akJJX2hkOFJOTTJ3eUp5UHVRWVEiLCJlIjoiQVFBQiIsInVzZSI6InNpZyIsImtpZCI6ImRpYWxvZ3BvcnRlbi1zcC1zZGstdGVzdC0yMDI0MTAxMCIsInFpIjoiQm9VS0RlczQ0UTNpXzNyT3Q4aHRrS2NxWkFNem00Njl2cTZuQnJVcHBTU1Ric3YwalZwN1daRGRRR0Q0bU8yMVJVOEFUbmN3NjFPOUt3YXktOGloX082VWFWbGxZN3NHYlVrQ2NVaG43ZDkzSElLZnhybnhWVE9nNUNMWTBka2Zwa3A1V2pyU1VvMTVKQURsY3BRM0ItRlU0Nm9PTG9ydjJ0SVFQekE4OF93IiwiZHAiOiJ1emVaRWZpN2Fqa3JFREhYekZtTThXWFUtZ3RmM1ctN0pnY082MnpWc1JrNTN4QlcxTE1NZlRlN2tlWk9xOEhDN3hTbGktSm9idnR6WGU3Y295ZW9sTXkzTnlydXFhQVp4VTBPMHpHQWQ4UFdjdHNXeDlITHlrU1hNby1QVlVNNkpmZERCaWFtcXk5bGQ0WTRfdzlscEdVWEMyaUFwLXdsWktaSHdrbG1KR3MiLCJhbGciOiJSUzI1NiIsImRxIjoiVENBcV9DMlJuX0RhakRlcUU2aUIzWWVWNVNtMHBMQk1Tbm10OHNENEp3ZVo4YWgzcGhrTFVxUm9qVGw1SDNhYXVtWl9UUmxiaWVNSVFnWDh4UUFnZ1l2YkNYeG9oZEx0aGt3ckZZdlp0WjBEeHJDYm9Md1hjc0Y3Ukwyejl4LWMwSFBGVFAzLVREQWF6UWlBNVVtRmNwYnAzeDYzWGFLSWFuYnVFc0NiSDdFIiwibiI6Imh5Sks4WnE2Wk8tRjFSSklVWVNCdUpfeG9RWkNNV1EyTVhrSFQ1bVROVVJJZmVWWWpCNWMwMzI0Uk5nc3ZPMEtXX0hUejRRSnptLV9rU1VaZ0h1Z2JoR0F3a1Vqc1lwTlJJRTBvLVNtdEExMlMxZHVCZWx6ajg2LVFrZkFzeFlwblNnSzl5OXpTS1B0YVlzMS1EcEVIb0hVdk9BSDJlNktFTXRaYUZPM0J0Yk9WUURXMENMYi1FY0UyaDBQRlFMMUp3NU8zeDhHcXBZeUFhamNoWnptcWlFbjBaSEd1QTNZZ1NyNGxQV1lkTzBNWHZmRFdyaFBTcnVTS3FodzBHMTlBRUpHOFhoek9xTWxLTUFIbW5ybk9XOHM2cWR2Sy1UQ1BiVGJJOU5XUWdFd2JpUFBBdlU0MUFITzZmTEYxUHZzQ3FhNjZTSGdYMkJzS3pvNVhORjhodyJ9" } - }, - "Ed25519Keys": { - "Primary": { - "Kid": "", - "PublicComponent": "" - }, - "Secondary": { - "Kid": "", - "PublicComponent": "" - } } } From d4b96db1300c45abcf7cf0ee37a4d55c2857e9db Mon Sep 17 00:00:00 2001 From: Amund Myrbostad Date: Mon, 25 Nov 2024 10:47:58 +0100 Subject: [PATCH 03/62] Workflow --- .github/workflows/ci-cd-pull-request.yml | 23 ++++++++++++----------- 1 file changed, 12 insertions(+), 11 deletions(-) diff --git a/.github/workflows/ci-cd-pull-request.yml b/.github/workflows/ci-cd-pull-request.yml index c02910930..d95f17357 100644 --- a/.github/workflows/ci-cd-pull-request.yml +++ b/.github/workflows/ci-cd-pull-request.yml @@ -5,17 +5,18 @@ on: branches: [ main ] paths-ignore: - "tests/k6/**" -jobs: - runs-on: ubuntu-latest - timeout-minutes: 15 - steps: - - name: Checkout - uses: actions/checkout@v4 - - name: set PROJECT variable to point to project - run: | - PROJECT=$(find . -name '*Digdir.Library.Dialogporten.WebApiClient.csproj' -printf "%p" -quit) - echo "PROJECT ${PROJECT}" - echo "PROJECT=${PROJECT}" >> $GITHUB_ENV - "CHANGELOG.md" +jobs: + build: + runs-on: ubuntu-latest + timeout-minutes: 15 + steps: + - name: Checkout + uses: actions/checkout@v4 + - name: set PROJECT variable to point to project + run: | + PROJECT=$(find . -name '*Digdir.Library.Dialogporten.WebApiClient.csproj' -printf "%p" -quit) + echo "PROJECT ${PROJECT}" + echo "PROJECT=${PROJECT}" >> $GITHUB_ENV - "CHANGELOG.md" # #jobs: # generate-git-short-sha: From 64db1f974a16a6191e211ccc67f5e350c9ec3abf Mon Sep 17 00:00:00 2001 From: Amund Myrbostad Date: Mon, 25 Nov 2024 11:04:08 +0100 Subject: [PATCH 04/62] Workflow --- .github/workflows/ci-cd-pull-request.yml | 20 +++++++++++++++++++- 1 file changed, 19 insertions(+), 1 deletion(-) diff --git a/.github/workflows/ci-cd-pull-request.yml b/.github/workflows/ci-cd-pull-request.yml index d95f17357..7bf675854 100644 --- a/.github/workflows/ci-cd-pull-request.yml +++ b/.github/workflows/ci-cd-pull-request.yml @@ -6,9 +6,16 @@ on: paths-ignore: - "tests/k6/**" jobs: + get-current-version: + name: Get current version + uses: ./.github/workflows/workflow-get-current-version.yml build: runs-on: ubuntu-latest timeout-minutes: 15 + needs: + [ + get-current-version, + ] steps: - name: Checkout uses: actions/checkout@v4 @@ -16,7 +23,18 @@ jobs: run: | PROJECT=$(find . -name '*Digdir.Library.Dialogporten.WebApiClient.csproj' -printf "%p" -quit) echo "PROJECT ${PROJECT}" - echo "PROJECT=${PROJECT}" >> $GITHUB_ENV - "CHANGELOG.md" + + - name: Build + run: dotnet build --configuration Release /p:Version=${{ needs.get-current-version.outputs.version }} ${PROJECT} + + - name: Pack with debug symbols + run: dotnet pack --configuration Release /p:Version=${{ needs.get-current-version.outputs.version }} -p:IncludeSymbols=true -p:SymbolPackageFormat=snupkg --output . ${PROJECT} + + - name: Upload artifact + uses: actions/upload-artifact@v4 + with: + name: package + path: '*.*nupkg' # #jobs: # generate-git-short-sha: From cbd3e765565e0941a510ea05690bc1046ac8ccf2 Mon Sep 17 00:00:00 2001 From: Amund Myrbostad Date: Mon, 25 Nov 2024 11:54:44 +0100 Subject: [PATCH 05/62] Workflow test --- .github/workflows/ci-cd-pull-request.yml | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/.github/workflows/ci-cd-pull-request.yml b/.github/workflows/ci-cd-pull-request.yml index 7bf675854..4398ea21b 100644 --- a/.github/workflows/ci-cd-pull-request.yml +++ b/.github/workflows/ci-cd-pull-request.yml @@ -23,13 +23,18 @@ jobs: run: | PROJECT=$(find . -name '*Digdir.Library.Dialogporten.WebApiClient.csproj' -printf "%p" -quit) echo "PROJECT ${PROJECT}" + + - name: Set up .NET + uses: actions/setup-dotnet@v4 + with: + global-json-file: ./global.json - name: Build run: dotnet build --configuration Release /p:Version=${{ needs.get-current-version.outputs.version }} ${PROJECT} - + - name: Pack with debug symbols run: dotnet pack --configuration Release /p:Version=${{ needs.get-current-version.outputs.version }} -p:IncludeSymbols=true -p:SymbolPackageFormat=snupkg --output . ${PROJECT} - + - name: Upload artifact uses: actions/upload-artifact@v4 with: From 3689808500fca0e2f7c73e955fa4a9fe1affa03e Mon Sep 17 00:00:00 2001 From: Amund Myrbostad Date: Mon, 25 Nov 2024 11:58:51 +0100 Subject: [PATCH 06/62] Workflow --- .github/workflows/ci-cd-pull-request.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/ci-cd-pull-request.yml b/.github/workflows/ci-cd-pull-request.yml index 4398ea21b..a257430e6 100644 --- a/.github/workflows/ci-cd-pull-request.yml +++ b/.github/workflows/ci-cd-pull-request.yml @@ -23,12 +23,13 @@ jobs: run: | PROJECT=$(find . -name '*Digdir.Library.Dialogporten.WebApiClient.csproj' -printf "%p" -quit) echo "PROJECT ${PROJECT}" + echo "PROJECT=${PROJECT}" >> $GITHUB_ENV - name: Set up .NET uses: actions/setup-dotnet@v4 with: global-json-file: ./global.json - + - name: Build run: dotnet build --configuration Release /p:Version=${{ needs.get-current-version.outputs.version }} ${PROJECT} From 7f17006959112cb2e7673e50a890fdde1b6c84c0 Mon Sep 17 00:00:00 2001 From: Amund Myrbostad Date: Mon, 25 Nov 2024 12:03:16 +0100 Subject: [PATCH 07/62] Nuget push workflow! --- .github/workflows/ci-cd-pull-request.yml | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/.github/workflows/ci-cd-pull-request.yml b/.github/workflows/ci-cd-pull-request.yml index a257430e6..564962c05 100644 --- a/.github/workflows/ci-cd-pull-request.yml +++ b/.github/workflows/ci-cd-pull-request.yml @@ -41,6 +41,20 @@ jobs: with: name: package path: '*.*nupkg' + push: + needs: build + runs-on: ubuntu-latest + steps: + + - name: Download artifact + uses: actions/download-artifact@v4 + with: + name: package + + - name: Push to NuGet + run: dotnet nuget push *.nupkg --source https://nuget.pkg.github.com/${GITHUB_REPOSITORY%/*}/index.json --api-key ${NUGET_API_TEST_KEY} + env: + NUGET_API_TEST_KEY: ${{ secrets.NUGET_API_TEST_KEY }} # #jobs: # generate-git-short-sha: From 324cf3f514ec51ec9eed885af2a9396b49c8fbe6 Mon Sep 17 00:00:00 2001 From: Amund Myrbostad Date: Mon, 25 Nov 2024 12:05:58 +0100 Subject: [PATCH 08/62] OI --- .github/workflows/ci-cd-pull-request.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci-cd-pull-request.yml b/.github/workflows/ci-cd-pull-request.yml index 564962c05..a8afe60df 100644 --- a/.github/workflows/ci-cd-pull-request.yml +++ b/.github/workflows/ci-cd-pull-request.yml @@ -52,7 +52,7 @@ jobs: name: package - name: Push to NuGet - run: dotnet nuget push *.nupkg --source https://nuget.pkg.github.com/${GITHUB_REPOSITORY%/*}/index.json --api-key ${NUGET_API_TEST_KEY} + run: dotnet nuget push *.nupkg --source https://int.nugettest.org --api-key ${NUGET_API_TEST_KEY} env: NUGET_API_TEST_KEY: ${{ secrets.NUGET_API_TEST_KEY }} # From 288175ce8c9c6faac7cfffe1213f6a60541de3ab Mon Sep 17 00:00:00 2001 From: Amund Myrbostad Date: Mon, 25 Nov 2024 14:16:57 +0100 Subject: [PATCH 09/62] Changed file test --- .github/workflows/ci-cd-pull-request.yml | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/.github/workflows/ci-cd-pull-request.yml b/.github/workflows/ci-cd-pull-request.yml index a8afe60df..19a693afd 100644 --- a/.github/workflows/ci-cd-pull-request.yml +++ b/.github/workflows/ci-cd-pull-request.yml @@ -45,6 +45,13 @@ jobs: needs: build runs-on: ubuntu-latest steps: + - name: Get all changed files + id: changed-files + uses: tj-actions/changed-files@v45 + with: + # Avoid using single or double quotes for multiline patterns + files: | + */Digdir.Domain.Dialogporten.WebApi/* - name: Download artifact uses: actions/download-artifact@v4 @@ -52,6 +59,7 @@ jobs: name: package - name: Push to NuGet + if: steps.changed-files.outputs.any_changed == 'true' run: dotnet nuget push *.nupkg --source https://int.nugettest.org --api-key ${NUGET_API_TEST_KEY} env: NUGET_API_TEST_KEY: ${{ secrets.NUGET_API_TEST_KEY }} From e538c94134346701cfca816a1d599a06279fe956 Mon Sep 17 00:00:00 2001 From: Amund Myrbostad Date: Mon, 25 Nov 2024 14:24:55 +0100 Subject: [PATCH 10/62] Update --- .github/workflows/ci-cd-pull-request.yml | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/.github/workflows/ci-cd-pull-request.yml b/.github/workflows/ci-cd-pull-request.yml index 19a693afd..6410f88ab 100644 --- a/.github/workflows/ci-cd-pull-request.yml +++ b/.github/workflows/ci-cd-pull-request.yml @@ -49,9 +49,8 @@ jobs: id: changed-files uses: tj-actions/changed-files@v45 with: - # Avoid using single or double quotes for multiline patterns - files: | - */Digdir.Domain.Dialogporten.WebApi/* + files: | + */Digdir.Domain.Dialogporten.WebApi/* - name: Download artifact uses: actions/download-artifact@v4 From 7135268a0065a15d24d48b560bff35d5ee5a6b88 Mon Sep 17 00:00:00 2001 From: Amund Myrbostad Date: Mon, 25 Nov 2024 14:27:09 +0100 Subject: [PATCH 11/62] Upd --- .../Extensions/ServiceCollectionExtensions.cs | 1 + 1 file changed, 1 insertion(+) diff --git a/src/Digdir.Library.Dialogporten.WebApiClient/Extensions/ServiceCollectionExtensions.cs b/src/Digdir.Library.Dialogporten.WebApiClient/Extensions/ServiceCollectionExtensions.cs index 65ac3df7e..31d4f015b 100644 --- a/src/Digdir.Library.Dialogporten.WebApiClient/Extensions/ServiceCollectionExtensions.cs +++ b/src/Digdir.Library.Dialogporten.WebApiClient/Extensions/ServiceCollectionExtensions.cs @@ -22,6 +22,7 @@ public static IServiceCollection AddDialogTokenVerifer(this IServiceCollection s .GetSection("Ed25519Keys") .Get(); Console.WriteLine(dialogportenSettings); + var keyPair = dialogportenSettings!.Primary; var kid = keyPair.Kid; From 2b9238b741cc30eaee0ba956300c9abfd26ce83b Mon Sep 17 00:00:00 2001 From: Amund Myrbostad Date: Mon, 25 Nov 2024 14:28:23 +0100 Subject: [PATCH 12/62] up --- .../Extensions/ServiceCollectionExtensions.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Digdir.Library.Dialogporten.WebApiClient/Extensions/ServiceCollectionExtensions.cs b/src/Digdir.Library.Dialogporten.WebApiClient/Extensions/ServiceCollectionExtensions.cs index 31d4f015b..ad6766473 100644 --- a/src/Digdir.Library.Dialogporten.WebApiClient/Extensions/ServiceCollectionExtensions.cs +++ b/src/Digdir.Library.Dialogporten.WebApiClient/Extensions/ServiceCollectionExtensions.cs @@ -22,7 +22,7 @@ public static IServiceCollection AddDialogTokenVerifer(this IServiceCollection s .GetSection("Ed25519Keys") .Get(); Console.WriteLine(dialogportenSettings); - + var keyPair = dialogportenSettings!.Primary; var kid = keyPair.Kid; From a6e66b58d67a1ba02492a4083ef26e083b36fe1e Mon Sep 17 00:00:00 2001 From: Amund Myrbostad Date: Tue, 26 Nov 2024 08:51:07 +0100 Subject: [PATCH 13/62] List all changes --- .github/workflows/ci-cd-pull-request.yml | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/.github/workflows/ci-cd-pull-request.yml b/.github/workflows/ci-cd-pull-request.yml index 6410f88ab..abc907f10 100644 --- a/.github/workflows/ci-cd-pull-request.yml +++ b/.github/workflows/ci-cd-pull-request.yml @@ -51,13 +51,20 @@ jobs: with: files: | */Digdir.Domain.Dialogporten.WebApi/* - + - name: List all changed files + env: + ALL_CHANGED_FILES: ${{ steps.changed-files.outputs.all_changed_files }} + run: | + for file in ${ALL_CHANGED_FILES}; do + echo "$file was changed" + done - name: Download artifact uses: actions/download-artifact@v4 with: name: package - name: Push to NuGet + if: steps.changed-files.outputs.any_changed == 'true' run: dotnet nuget push *.nupkg --source https://int.nugettest.org --api-key ${NUGET_API_TEST_KEY} env: From eb590e1b21122d62863d3efdbdf5f87a4c5f7e4c Mon Sep 17 00:00:00 2001 From: Amund Myrbostad Date: Tue, 26 Nov 2024 08:54:10 +0100 Subject: [PATCH 14/62] hm --- .github/workflows/ci-cd-pull-request.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci-cd-pull-request.yml b/.github/workflows/ci-cd-pull-request.yml index abc907f10..99820b415 100644 --- a/.github/workflows/ci-cd-pull-request.yml +++ b/.github/workflows/ci-cd-pull-request.yml @@ -53,7 +53,7 @@ jobs: */Digdir.Domain.Dialogporten.WebApi/* - name: List all changed files env: - ALL_CHANGED_FILES: ${{ steps.changed-files.outputs.all_changed_files }} + ALL_CHANGED_FILES: ${{ steps.push.outputs.all_changed_files }} run: | for file in ${ALL_CHANGED_FILES}; do echo "$file was changed" From b4991513c7d520153307c7c7875a5640a8c82b33 Mon Sep 17 00:00:00 2001 From: Amund Myrbostad Date: Tue, 26 Nov 2024 08:56:16 +0100 Subject: [PATCH 15/62] no da --- .github/workflows/ci-cd-pull-request.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/ci-cd-pull-request.yml b/.github/workflows/ci-cd-pull-request.yml index 99820b415..a7ef153b8 100644 --- a/.github/workflows/ci-cd-pull-request.yml +++ b/.github/workflows/ci-cd-pull-request.yml @@ -50,10 +50,10 @@ jobs: uses: tj-actions/changed-files@v45 with: files: | - */Digdir.Domain.Dialogporten.WebApi/* + **/Digdir.Domain.Dialogporten.WebApi/** - name: List all changed files env: - ALL_CHANGED_FILES: ${{ steps.push.outputs.all_changed_files }} + ALL_CHANGED_FILES: ${{ steps.changed-files.outputs.all_changed_files }} run: | for file in ${ALL_CHANGED_FILES}; do echo "$file was changed" From f8691de0a4457e19f3dd706c6b468e8266ee37df Mon Sep 17 00:00:00 2001 From: Amund Myrbostad Date: Tue, 26 Nov 2024 08:59:37 +0100 Subject: [PATCH 16/62] changes --- src/Digdir.Library.Dialogporten.WebApiClient.Sample/Program.cs | 1 + 1 file changed, 1 insertion(+) diff --git a/src/Digdir.Library.Dialogporten.WebApiClient.Sample/Program.cs b/src/Digdir.Library.Dialogporten.WebApiClient.Sample/Program.cs index 0d6db826a..d69a6f244 100644 --- a/src/Digdir.Library.Dialogporten.WebApiClient.Sample/Program.cs +++ b/src/Digdir.Library.Dialogporten.WebApiClient.Sample/Program.cs @@ -13,6 +13,7 @@ services.AddSingleton(configuration); services.AddDialogportenClient(); + services.AddDialogTokenVerifer(); var serviceProvider = services.BuildServiceProvider(); From ed42f736c6f55150c1167738397e134be1810b1e Mon Sep 17 00:00:00 2001 From: Amund Myrbostad Date: Tue, 26 Nov 2024 09:02:31 +0100 Subject: [PATCH 17/62] testing again --- .github/workflows/ci-cd-pull-request.yml | 6 +++--- .../Program.cs | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/workflows/ci-cd-pull-request.yml b/.github/workflows/ci-cd-pull-request.yml index a7ef153b8..fec86e4e8 100644 --- a/.github/workflows/ci-cd-pull-request.yml +++ b/.github/workflows/ci-cd-pull-request.yml @@ -48,9 +48,9 @@ jobs: - name: Get all changed files id: changed-files uses: tj-actions/changed-files@v45 - with: - files: | - **/Digdir.Domain.Dialogporten.WebApi/** +# with: +# files: | +# **/Digdir.Domain.Dialogporten.WebApi/** - name: List all changed files env: ALL_CHANGED_FILES: ${{ steps.changed-files.outputs.all_changed_files }} diff --git a/src/Digdir.Library.Dialogporten.WebApiClient.Sample/Program.cs b/src/Digdir.Library.Dialogporten.WebApiClient.Sample/Program.cs index d69a6f244..fd98d66c2 100644 --- a/src/Digdir.Library.Dialogporten.WebApiClient.Sample/Program.cs +++ b/src/Digdir.Library.Dialogporten.WebApiClient.Sample/Program.cs @@ -13,9 +13,9 @@ services.AddSingleton(configuration); services.AddDialogportenClient(); - services.AddDialogTokenVerifer(); + var serviceProvider = services.BuildServiceProvider(); var dialogportenClient = serviceProvider.GetRequiredService(); From 2f613c0abd06ee81c8210c66aa493ee56bc5cf8b Mon Sep 17 00:00:00 2001 From: Amund Myrbostad Date: Tue, 26 Nov 2024 09:04:23 +0100 Subject: [PATCH 18/62] oioi --- .github/workflows/ci-cd-pull-request.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/ci-cd-pull-request.yml b/.github/workflows/ci-cd-pull-request.yml index fec86e4e8..1d8454d0f 100644 --- a/.github/workflows/ci-cd-pull-request.yml +++ b/.github/workflows/ci-cd-pull-request.yml @@ -48,9 +48,9 @@ jobs: - name: Get all changed files id: changed-files uses: tj-actions/changed-files@v45 -# with: -# files: | -# **/Digdir.Domain.Dialogporten.WebApi/** + with: + files: | + **/Digdir.Library.Dialogporten.WebApi/** - name: List all changed files env: ALL_CHANGED_FILES: ${{ steps.changed-files.outputs.all_changed_files }} From 71aefc883004ed31e9b3f3409ccd5d41589a186d Mon Sep 17 00:00:00 2001 From: Amund Myrbostad Date: Tue, 26 Nov 2024 09:07:19 +0100 Subject: [PATCH 19/62] no da! --- .github/workflows/ci-cd-pull-request.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci-cd-pull-request.yml b/.github/workflows/ci-cd-pull-request.yml index 1d8454d0f..48b2376d4 100644 --- a/.github/workflows/ci-cd-pull-request.yml +++ b/.github/workflows/ci-cd-pull-request.yml @@ -50,7 +50,7 @@ jobs: uses: tj-actions/changed-files@v45 with: files: | - **/Digdir.Library.Dialogporten.WebApi/** + **/Digdir.Library.Dialogporten.WebApiClient/** - name: List all changed files env: ALL_CHANGED_FILES: ${{ steps.changed-files.outputs.all_changed_files }} From 1fb84e6805696d833da09918b20bc6357a161c13 Mon Sep 17 00:00:00 2001 From: Amund Myrbostad Date: Tue, 26 Nov 2024 10:03:50 +0100 Subject: [PATCH 20/62] Added comments --- .github/workflows/ci-cd-pull-request.yml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/.github/workflows/ci-cd-pull-request.yml b/.github/workflows/ci-cd-pull-request.yml index 48b2376d4..b3df48b9e 100644 --- a/.github/workflows/ci-cd-pull-request.yml +++ b/.github/workflows/ci-cd-pull-request.yml @@ -30,6 +30,7 @@ jobs: with: global-json-file: ./global.json + # Kan kanskje byttes ut med build-test som blir kjørt for hele solution? - name: Build run: dotnet build --configuration Release /p:Version=${{ needs.get-current-version.outputs.version }} ${PROJECT} @@ -51,6 +52,7 @@ jobs: with: files: | **/Digdir.Library.Dialogporten.WebApiClient/** + # For testing - name: List all changed files env: ALL_CHANGED_FILES: ${{ steps.changed-files.outputs.all_changed_files }} @@ -63,8 +65,8 @@ jobs: with: name: package + # Denne må bare kjøres når det merges inn i main. ellers feiler den på duplicates. - name: Push to NuGet - if: steps.changed-files.outputs.any_changed == 'true' run: dotnet nuget push *.nupkg --source https://int.nugettest.org --api-key ${NUGET_API_TEST_KEY} env: From 60571b601abd8bc50e26289923fa6b9eca22aa04 Mon Sep 17 00:00:00 2001 From: Amund Myrbostad Date: Wed, 27 Nov 2024 10:16:26 +0100 Subject: [PATCH 21/62] Workflow testing --- .github/workflows/ci-cd-pull-request.yml | 125 +++++-------------- .github/workflows/workflow-publish-nuget.yml | 53 ++++++++ 2 files changed, 87 insertions(+), 91 deletions(-) create mode 100644 .github/workflows/workflow-publish-nuget.yml diff --git a/.github/workflows/ci-cd-pull-request.yml b/.github/workflows/ci-cd-pull-request.yml index b3df48b9e..f1400f9c0 100644 --- a/.github/workflows/ci-cd-pull-request.yml +++ b/.github/workflows/ci-cd-pull-request.yml @@ -5,102 +5,45 @@ on: branches: [ main ] paths-ignore: - "tests/k6/**" + jobs: + generate-git-short-sha: + name: Generate git short sha + uses: ./.github/workflows/workflow-generate-git-short-sha.yml + get-current-version: name: Get current version uses: ./.github/workflows/workflow-get-current-version.yml - build: - runs-on: ubuntu-latest - timeout-minutes: 15 - needs: - [ - get-current-version, - ] - steps: - - name: Checkout - uses: actions/checkout@v4 - - name: set PROJECT variable to point to project - run: | - PROJECT=$(find . -name '*Digdir.Library.Dialogporten.WebApiClient.csproj' -printf "%p" -quit) - echo "PROJECT ${PROJECT}" - echo "PROJECT=${PROJECT}" >> $GITHUB_ENV - - - name: Set up .NET - uses: actions/setup-dotnet@v4 - with: - global-json-file: ./global.json - - # Kan kanskje byttes ut med build-test som blir kjørt for hele solution? - - name: Build - run: dotnet build --configuration Release /p:Version=${{ needs.get-current-version.outputs.version }} ${PROJECT} - - - name: Pack with debug symbols - run: dotnet pack --configuration Release /p:Version=${{ needs.get-current-version.outputs.version }} -p:IncludeSymbols=true -p:SymbolPackageFormat=snupkg --output . ${PROJECT} - - name: Upload artifact - uses: actions/upload-artifact@v4 - with: - name: package - path: '*.*nupkg' - push: - needs: build - runs-on: ubuntu-latest - steps: - - name: Get all changed files - id: changed-files - uses: tj-actions/changed-files@v45 - with: - files: | - **/Digdir.Library.Dialogporten.WebApiClient/** - # For testing - - name: List all changed files - env: - ALL_CHANGED_FILES: ${{ steps.changed-files.outputs.all_changed_files }} - run: | - for file in ${ALL_CHANGED_FILES}; do - echo "$file was changed" - done - - name: Download artifact - uses: actions/download-artifact@v4 - with: - name: package + check-for-changes: + name: Check for changes + uses: ./.github/workflows/workflow-check-for-changes.yml + + # build: + # uses: ./.github/workflows/workflow-build-and-test.yml + # needs: [ check-for-changes ] + # if: ${{ needs.check-for-changes.outputs.hasBackendChanges == 'true' || needs.check-for-changes.outputs.hasTestChanges == 'true' }} + + # build-infrastructure: + # uses: ./.github/workflows/workflow-build-infrastructure.yml + # needs: [ check-for-changes ] + # if: ${{ always() && needs.check-for-changes.outputs.hasInfraChanges == 'true' }} + # secrets: + # AZURE_CLIENT_ID: ${{ secrets.AZURE_CLIENT_ID }} + # AZURE_TENANT_ID: ${{ secrets.AZURE_TENANT_ID }} + # AZURE_SUBSCRIPTION_ID: ${{ secrets.AZURE_SUBSCRIPTION_ID }} + # with: + # environment: "test" + + publish-nuget: + uses: ./.github/workflows/workflow-publish-nuget.yml + needs: [ get-current-version, generate-git-short-sha, check-for-changes ] + if: ${{ needs.check-for-changes.outputs.hasBackendChanges == 'true' || needs.check-for-changes.outputs.hasTestChanges == 'true' }} + with: + version: ${{ needs.get-current-version.outputs.version }}-${{ needs.generate-git-short-sha.outputs.gitShortSha }} + secrets: + NUGET_API_TEST_KEY: ${{secrets.NUGET_API_TEST_KEY }} - # Denne må bare kjøres når det merges inn i main. ellers feiler den på duplicates. - - name: Push to NuGet - if: steps.changed-files.outputs.any_changed == 'true' - run: dotnet nuget push *.nupkg --source https://int.nugettest.org --api-key ${NUGET_API_TEST_KEY} - env: - NUGET_API_TEST_KEY: ${{ secrets.NUGET_API_TEST_KEY }} -# -#jobs: -# generate-git-short-sha: -# name: Generate git short sha -# uses: ./.github/workflows/workflow-generate-git-short-sha.yml -# -# get-current-version: -# name: Get current version -# uses: ./.github/workflows/workflow-get-current-version.yml -# -# check-for-changes: -# name: Check for changes -# uses: ./.github/workflows/workflow-check-for-changes.yml -# -# build: -# uses: ./.github/workflows/workflow-build-and-test.yml -# needs: [check-for-changes] -# if: ${{ needs.check-for-changes.outputs.hasBackendChanges == 'true' || needs.check-for-changes.outputs.hasTestChanges == 'true' }} -# -# build-infrastructure: -# uses: ./.github/workflows/workflow-build-infrastructure.yml -# needs: [check-for-changes] -# if: ${{ always() && needs.check-for-changes.outputs.hasInfraChanges == 'true' }} -# secrets: -# AZURE_CLIENT_ID: ${{ secrets.AZURE_CLIENT_ID }} -# AZURE_TENANT_ID: ${{ secrets.AZURE_TENANT_ID }} -# AZURE_SUBSCRIPTION_ID: ${{ secrets.AZURE_SUBSCRIPTION_ID }} -# with: -# environment: "test" -# # dry-run-deploy-infra: # name: Dry run deploy infrastructure # uses: ./.github/workflows/workflow-deploy-infra.yml @@ -158,7 +101,7 @@ jobs: # delete-github-deployments: # name: Delete GitHub deployments # uses: ./.github/workflows/workflow-delete-deployments.yml -# needs: [dry-run-deploy-apps, dry-run-deploy-infra] +# needs: [ dry-run-deploy-apps, dry-run-deploy-infra ] # if: ${{ always() && !failure() && !cancelled() }} # with: # gitSha: ${{ github.event.pull_request.head.sha }} diff --git a/.github/workflows/workflow-publish-nuget.yml b/.github/workflows/workflow-publish-nuget.yml new file mode 100644 index 000000000..94f76fb21 --- /dev/null +++ b/.github/workflows/workflow-publish-nuget.yml @@ -0,0 +1,53 @@ +name: "Publish nuget package" + +on: + workflow_call: + inputs: + version: + description: "Version" + required: true + type: string +jobs: + build: + runs-on: ubuntu-latest + timeout-minutes: 15 + steps: + - name: Checkout + uses: actions/checkout@v4 + - name: set PROJECT variable to point to project + run: | + PROJECT=$(find . -name '*Digdir.Library.Dialogporten.WebApiClient.csproj' -printf "%p" -quit) + echo "PROJECT ${PROJECT}" + echo "PROJECT=${PROJECT}" >> $GITHUB_ENV + + - name: Set up .NET + uses: actions/setup-dotnet@v4 + with: + global-json-file: ./global.json + + # Kan kanskje byttes ut med build-test som blir kjørt for hele solution? + - name: Build + run: dotnet build --configuration Release /p:Version=${{ inputs.version }} ${PROJECT} + + # Blir ikke brukt til noe? burde det egt brukes eller bare fjernes? + - name: Pack with debug symbols + run: dotnet pack --configuration Release /p:Version=${{ inputs.version }} -p:IncludeSymbols=true -p:SymbolPackageFormat=snupkg --output . ${PROJECT} + + - name: Upload artifact + uses: actions/upload-artifact@v4 + with: + name: package + path: '*.*nupkg' + push: + needs: build + runs-on: ubuntu-latest + steps: + - name: Download artifact + uses: actions/download-artifact@v4 + with: + name: package + + - name: Push to NuGet + run: dotnet nuget push *.nupkg --source https://int.nugettest.org --api-key ${NUGET_API_TEST_KEY} + env: + NUGET_API_TEST_KEY: ${{ secrets.NUGET_API_TEST_KEY }} From 2640a4b9807f9d2ee3626e2092e2a81aeb971871 Mon Sep 17 00:00:00 2001 From: Amund Myrbostad Date: Wed, 27 Nov 2024 10:19:15 +0100 Subject: [PATCH 22/62] funk --- .github/workflows/workflow-publish-nuget.yml | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/.github/workflows/workflow-publish-nuget.yml b/.github/workflows/workflow-publish-nuget.yml index 94f76fb21..1b6eaf5ac 100644 --- a/.github/workflows/workflow-publish-nuget.yml +++ b/.github/workflows/workflow-publish-nuget.yml @@ -7,6 +7,9 @@ on: description: "Version" required: true type: string + secrets: + NUGET_API_TEST_KEY: + required: true jobs: build: runs-on: ubuntu-latest @@ -49,5 +52,4 @@ jobs: - name: Push to NuGet run: dotnet nuget push *.nupkg --source https://int.nugettest.org --api-key ${NUGET_API_TEST_KEY} - env: - NUGET_API_TEST_KEY: ${{ secrets.NUGET_API_TEST_KEY }} + From 1f3c8b360fdde2ddf9cd74ce00fa84071113cbdd Mon Sep 17 00:00:00 2001 From: Amund Myrbostad Date: Wed, 27 Nov 2024 10:20:49 +0100 Subject: [PATCH 23/62] no da --- .github/workflows/workflow-publish-nuget.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/workflow-publish-nuget.yml b/.github/workflows/workflow-publish-nuget.yml index 1b6eaf5ac..19a317b01 100644 --- a/.github/workflows/workflow-publish-nuget.yml +++ b/.github/workflows/workflow-publish-nuget.yml @@ -51,5 +51,5 @@ jobs: name: package - name: Push to NuGet - run: dotnet nuget push *.nupkg --source https://int.nugettest.org --api-key ${NUGET_API_TEST_KEY} + run: dotnet nuget push *.nupkg --source https://int.nugettest.org --api-key ${secrets.NUGET_API_TEST_KEY} From 76b59649af365af098b5b598bbe1ed9b98076655 Mon Sep 17 00:00:00 2001 From: Amund Myrbostad Date: Wed, 27 Nov 2024 10:23:18 +0100 Subject: [PATCH 24/62] hm --- .github/workflows/ci-cd-pull-request.yml | 2 +- .github/workflows/workflow-publish-nuget.yml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/ci-cd-pull-request.yml b/.github/workflows/ci-cd-pull-request.yml index f1400f9c0..02ad54f8d 100644 --- a/.github/workflows/ci-cd-pull-request.yml +++ b/.github/workflows/ci-cd-pull-request.yml @@ -42,7 +42,7 @@ jobs: with: version: ${{ needs.get-current-version.outputs.version }}-${{ needs.generate-git-short-sha.outputs.gitShortSha }} secrets: - NUGET_API_TEST_KEY: ${{secrets.NUGET_API_TEST_KEY }} + NUGET_API_TEST_KEY: ${{ secrets.NUGET_API_TEST_KEY }} # dry-run-deploy-infra: # name: Dry run deploy infrastructure diff --git a/.github/workflows/workflow-publish-nuget.yml b/.github/workflows/workflow-publish-nuget.yml index 19a317b01..b0e1ed2cb 100644 --- a/.github/workflows/workflow-publish-nuget.yml +++ b/.github/workflows/workflow-publish-nuget.yml @@ -51,5 +51,5 @@ jobs: name: package - name: Push to NuGet - run: dotnet nuget push *.nupkg --source https://int.nugettest.org --api-key ${secrets.NUGET_API_TEST_KEY} + run: dotnet nuget push *.nupkg --source https://int.nugettest.org --api-key ${{secrets.NUGET_API_TEST_KEY}} From d3062a292ee3628fc8f01dd1bc571318a7e95276 Mon Sep 17 00:00:00 2001 From: Amund Myrbostad Date: Wed, 27 Nov 2024 10:26:27 +0100 Subject: [PATCH 25/62] no da --- .github/workflows/ci-cd-pull-request.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci-cd-pull-request.yml b/.github/workflows/ci-cd-pull-request.yml index 02ad54f8d..df40690e5 100644 --- a/.github/workflows/ci-cd-pull-request.yml +++ b/.github/workflows/ci-cd-pull-request.yml @@ -40,7 +40,7 @@ jobs: needs: [ get-current-version, generate-git-short-sha, check-for-changes ] if: ${{ needs.check-for-changes.outputs.hasBackendChanges == 'true' || needs.check-for-changes.outputs.hasTestChanges == 'true' }} with: - version: ${{ needs.get-current-version.outputs.version }}-${{ needs.generate-git-short-sha.outputs.gitShortSha }} + version: ${{ needs.get-current-version.outputs.version }}-rc.${{ needs.generate-git-short-sha.outputs.gitShortSha }} secrets: NUGET_API_TEST_KEY: ${{ secrets.NUGET_API_TEST_KEY }} From b09f6d49ad51598508fc2c982d234d2e56e2a184 Mon Sep 17 00:00:00 2001 From: Amund Myrbostad Date: Wed, 27 Nov 2024 10:30:09 +0100 Subject: [PATCH 26/62] oioi --- .github/workflows/ci-cd-pull-request.yml | 150 +++++++++++------------ 1 file changed, 75 insertions(+), 75 deletions(-) diff --git a/.github/workflows/ci-cd-pull-request.yml b/.github/workflows/ci-cd-pull-request.yml index df40690e5..c6894d441 100644 --- a/.github/workflows/ci-cd-pull-request.yml +++ b/.github/workflows/ci-cd-pull-request.yml @@ -19,21 +19,21 @@ jobs: name: Check for changes uses: ./.github/workflows/workflow-check-for-changes.yml - # build: - # uses: ./.github/workflows/workflow-build-and-test.yml - # needs: [ check-for-changes ] - # if: ${{ needs.check-for-changes.outputs.hasBackendChanges == 'true' || needs.check-for-changes.outputs.hasTestChanges == 'true' }} + build: + uses: ./.github/workflows/workflow-build-and-test.yml + needs: [ check-for-changes ] + if: ${{ needs.check-for-changes.outputs.hasBackendChanges == 'true' || needs.check-for-changes.outputs.hasTestChanges == 'true' }} - # build-infrastructure: - # uses: ./.github/workflows/workflow-build-infrastructure.yml - # needs: [ check-for-changes ] - # if: ${{ always() && needs.check-for-changes.outputs.hasInfraChanges == 'true' }} - # secrets: - # AZURE_CLIENT_ID: ${{ secrets.AZURE_CLIENT_ID }} - # AZURE_TENANT_ID: ${{ secrets.AZURE_TENANT_ID }} - # AZURE_SUBSCRIPTION_ID: ${{ secrets.AZURE_SUBSCRIPTION_ID }} - # with: - # environment: "test" + build-infrastructure: + uses: ./.github/workflows/workflow-build-infrastructure.yml + needs: [ check-for-changes ] + if: ${{ always() && needs.check-for-changes.outputs.hasInfraChanges == 'true' }} + secrets: + AZURE_CLIENT_ID: ${{ secrets.AZURE_CLIENT_ID }} + AZURE_TENANT_ID: ${{ secrets.AZURE_TENANT_ID }} + AZURE_SUBSCRIPTION_ID: ${{ secrets.AZURE_SUBSCRIPTION_ID }} + with: + environment: "test" publish-nuget: uses: ./.github/workflows/workflow-publish-nuget.yml @@ -44,64 +44,64 @@ jobs: secrets: NUGET_API_TEST_KEY: ${{ secrets.NUGET_API_TEST_KEY }} -# dry-run-deploy-infra: -# name: Dry run deploy infrastructure -# uses: ./.github/workflows/workflow-deploy-infra.yml -# needs: -# [ -# generate-git-short-sha, -# check-for-changes, -# get-current-version, -# build-infrastructure, -# ] -# if: ${{ always() && needs.check-for-changes.outputs.hasInfraChanges == 'true' }} -# secrets: -# AZURE_CLIENT_ID: ${{ secrets.AZURE_CLIENT_ID }} -# AZURE_TENANT_ID: ${{ secrets.AZURE_TENANT_ID }} -# AZURE_SUBSCRIPTION_ID: ${{ secrets.AZURE_SUBSCRIPTION_ID }} -# AZURE_SOURCE_KEY_VAULT_NAME: ${{ secrets.AZURE_SOURCE_KEY_VAULT_NAME }} -# AZURE_SOURCE_KEY_VAULT_SUBSCRIPTION_ID: ${{ secrets.AZURE_SOURCE_KEY_VAULT_SUBSCRIPTION_ID }} -# AZURE_SOURCE_KEY_VAULT_RESOURCE_GROUP: ${{ secrets.AZURE_SOURCE_KEY_VAULT_RESOURCE_GROUP }} -# AZURE_SOURCE_KEY_VAULT_SSH_JUMPER_SSH_PUBLIC_KEY: ${{ secrets.AZURE_SOURCE_KEY_VAULT_SSH_JUMPER_SSH_PUBLIC_KEY }} -# with: -# environment: test -# region: norwayeast -# dryRun: true -# version: ${{ needs.get-current-version.outputs.version }}-${{ needs.generate-git-short-sha.outputs.gitShortSha }} -# -# dry-run-deploy-apps: -# name: Dry run deploy apps -# needs: -# [ -# get-current-version, -# check-for-changes, -# generate-git-short-sha, -# dry-run-deploy-infra, -# ] -# # we want deployment of apps to be dependent on deployment of infrastructure, but if infrastructure is skipped, we still want to deploy the apps -# if: ${{ always() && !failure() && !cancelled() && (needs.check-for-changes.outputs.hasBackendChanges == 'true' || needs.check-for-changes.outputs.hasMigrationChanges == 'true') }} -# uses: ./.github/workflows/workflow-deploy-apps.yml -# secrets: -# AZURE_CLIENT_ID: ${{ secrets.AZURE_CLIENT_ID }} -# AZURE_TENANT_ID: ${{ secrets.AZURE_TENANT_ID }} -# AZURE_SUBSCRIPTION_ID: ${{ secrets.AZURE_SUBSCRIPTION_ID }} -# AZURE_RESOURCE_GROUP_NAME: ${{ secrets.AZURE_RESOURCE_GROUP_NAME }} -# AZURE_ENVIRONMENT_KEY_VAULT_NAME: ${{ secrets.AZURE_ENVIRONMENT_KEY_VAULT_NAME }} -# AZURE_CONTAINER_APP_ENVIRONMENT_NAME: ${{ secrets.AZURE_CONTAINER_APP_ENVIRONMENT_NAME }} -# AZURE_APP_INSIGHTS_CONNECTION_STRING: ${{ secrets.AZURE_APP_INSIGHTS_CONNECTION_STRING }} -# AZURE_APP_CONFIGURATION_NAME: ${{ secrets.AZURE_APP_CONFIGURATION_NAME }} -# AZURE_SERVICE_BUS_NAMESPACE_NAME: ${{ secrets.AZURE_SERVICE_BUS_NAMESPACE_NAME }} -# with: -# environment: test -# region: norwayeast -# version: ${{ needs.get-current-version.outputs.version }}-${{ needs.generate-git-short-sha.outputs.gitShortSha }} -# runMigration: ${{ needs.check-for-changes.outputs.hasMigrationChanges == 'true' }} -# dryRun: true -# -# delete-github-deployments: -# name: Delete GitHub deployments -# uses: ./.github/workflows/workflow-delete-deployments.yml -# needs: [ dry-run-deploy-apps, dry-run-deploy-infra ] -# if: ${{ always() && !failure() && !cancelled() }} -# with: -# gitSha: ${{ github.event.pull_request.head.sha }} + dry-run-deploy-infra: + name: Dry run deploy infrastructure + uses: ./.github/workflows/workflow-deploy-infra.yml + needs: + [ + generate-git-short-sha, + check-for-changes, + get-current-version, + build-infrastructure, + ] + if: ${{ always() && needs.check-for-changes.outputs.hasInfraChanges == 'true' }} + secrets: + AZURE_CLIENT_ID: ${{ secrets.AZURE_CLIENT_ID }} + AZURE_TENANT_ID: ${{ secrets.AZURE_TENANT_ID }} + AZURE_SUBSCRIPTION_ID: ${{ secrets.AZURE_SUBSCRIPTION_ID }} + AZURE_SOURCE_KEY_VAULT_NAME: ${{ secrets.AZURE_SOURCE_KEY_VAULT_NAME }} + AZURE_SOURCE_KEY_VAULT_SUBSCRIPTION_ID: ${{ secrets.AZURE_SOURCE_KEY_VAULT_SUBSCRIPTION_ID }} + AZURE_SOURCE_KEY_VAULT_RESOURCE_GROUP: ${{ secrets.AZURE_SOURCE_KEY_VAULT_RESOURCE_GROUP }} + AZURE_SOURCE_KEY_VAULT_SSH_JUMPER_SSH_PUBLIC_KEY: ${{ secrets.AZURE_SOURCE_KEY_VAULT_SSH_JUMPER_SSH_PUBLIC_KEY }} + with: + environment: test + region: norwayeast + dryRun: true + version: ${{ needs.get-current-version.outputs.version }}-${{ needs.generate-git-short-sha.outputs.gitShortSha }} + + dry-run-deploy-apps: + name: Dry run deploy apps + needs: + [ + get-current-version, + check-for-changes, + generate-git-short-sha, + dry-run-deploy-infra, + ] + # we want deployment of apps to be dependent on deployment of infrastructure, but if infrastructure is skipped, we still want to deploy the apps + if: ${{ always() && !failure() && !cancelled() && (needs.check-for-changes.outputs.hasBackendChanges == 'true' || needs.check-for-changes.outputs.hasMigrationChanges == 'true') }} + uses: ./.github/workflows/workflow-deploy-apps.yml + secrets: + AZURE_CLIENT_ID: ${{ secrets.AZURE_CLIENT_ID }} + AZURE_TENANT_ID: ${{ secrets.AZURE_TENANT_ID }} + AZURE_SUBSCRIPTION_ID: ${{ secrets.AZURE_SUBSCRIPTION_ID }} + AZURE_RESOURCE_GROUP_NAME: ${{ secrets.AZURE_RESOURCE_GROUP_NAME }} + AZURE_ENVIRONMENT_KEY_VAULT_NAME: ${{ secrets.AZURE_ENVIRONMENT_KEY_VAULT_NAME }} + AZURE_CONTAINER_APP_ENVIRONMENT_NAME: ${{ secrets.AZURE_CONTAINER_APP_ENVIRONMENT_NAME }} + AZURE_APP_INSIGHTS_CONNECTION_STRING: ${{ secrets.AZURE_APP_INSIGHTS_CONNECTION_STRING }} + AZURE_APP_CONFIGURATION_NAME: ${{ secrets.AZURE_APP_CONFIGURATION_NAME }} + AZURE_SERVICE_BUS_NAMESPACE_NAME: ${{ secrets.AZURE_SERVICE_BUS_NAMESPACE_NAME }} + with: + environment: test + region: norwayeast + version: ${{ needs.get-current-version.outputs.version }}-${{ needs.generate-git-short-sha.outputs.gitShortSha }} + runMigration: ${{ needs.check-for-changes.outputs.hasMigrationChanges == 'true' }} + dryRun: true + + delete-github-deployments: + name: Delete GitHub deployments + uses: ./.github/workflows/workflow-delete-deployments.yml + needs: [ dry-run-deploy-apps, dry-run-deploy-infra ] + if: ${{ always() && !failure() && !cancelled() }} + with: + gitSha: ${{ github.event.pull_request.head.sha }} From fd8907eba91a015fd979d050510a32bb52620c1c Mon Sep 17 00:00:00 2001 From: Amund Myrbostad Date: Thu, 28 Nov 2024 08:49:51 +0100 Subject: [PATCH 27/62] Workflow maybe done --- .github/workflows/ci-cd-main.yml | 21 ++++++++++---- .github/workflows/ci-cd-staging.yml | 29 +++++++++++++------- .github/workflows/workflow-publish-nuget.yml | 3 +- 3 files changed, 36 insertions(+), 17 deletions(-) diff --git a/.github/workflows/ci-cd-main.yml b/.github/workflows/ci-cd-main.yml index 52a8bd597..366ac84b3 100644 --- a/.github/workflows/ci-cd-main.yml +++ b/.github/workflows/ci-cd-main.yml @@ -3,7 +3,7 @@ on: workflow_dispatch: push: - branches: [main] + branches: [ main ] concurrency: group: ${{ github.workflow }}-${{ github.ref_name }} @@ -40,7 +40,7 @@ jobs: build-and-test: name: Build and test backend uses: ./.github/workflows/workflow-build-and-test.yml - needs: [check-for-changes] + needs: [ check-for-changes ] if: ${{ github.event_name == 'workflow_dispatch' || needs.check-for-changes.outputs.hasBackendChanges == 'true' || needs.check-for-changes.outputs.hasTestChanges == 'true' }} publish: @@ -62,7 +62,7 @@ jobs: deploy-infra: name: Deploy infra to test - needs: [get-current-version, check-for-changes, generate-git-short-sha] + needs: [ get-current-version, check-for-changes, generate-git-short-sha ] if: ${{ github.event_name == 'workflow_dispatch' || needs.check-for-changes.outputs.hasInfraChanges == 'true' }} uses: ./.github/workflows/workflow-deploy-infra.yml secrets: @@ -108,9 +108,18 @@ jobs: version: ${{ needs.get-current-version.outputs.version }}-${{ needs.generate-git-short-sha.outputs.gitShortSha }} runMigration: ${{ github.event_name == 'workflow_dispatch' || needs.check-for-changes.outputs.hasMigrationChanges == 'true' }} + publish-nuget: + uses: ./.github/workflows/workflow-publish-nuget.yml + needs: [ get-current-version, generate-git-short-sha, check-for-changes ] + if: ${{ needs.check-for-changes.outputs.hasBackendChanges == 'true' || needs.check-for-changes.outputs.hasTestChanges == 'true' }} + with: + version: ${{ needs.get-current-version.outputs.version }}-rc.${{ needs.generate-git-short-sha.outputs.gitShortSha }} + secrets: + NUGET_API_TEST_KEY: ${{ secrets.NUGET_API_TEST_KEY }} + deploy-slack-notifier: name: Deploy slack notifier (test) - needs: [check-for-changes] + needs: [ check-for-changes ] if: ${{ github.event_name == 'workflow_dispatch' || needs.check-for-changes.outputs.hasSlackNotifierChanges == 'true' }} uses: ./.github/workflows/workflow-deploy-function.yml secrets: @@ -126,7 +135,7 @@ jobs: publish-schema-npm: name: Deploy schema npm package - needs: [check-for-changes, get-current-version, generate-git-short-sha, deploy-apps] + needs: [ check-for-changes, get-current-version, generate-git-short-sha, deploy-apps ] if: ${{ always() && !failure() && !cancelled() && (github.event_name == 'workflow_dispatch' || needs.check-for-changes.outputs.hasSchemaChanges == 'true') }} uses: ./.github/workflows/workflow-publish-schema.yml with: @@ -138,7 +147,7 @@ jobs: name: "Run K6 functional end-to-end tests" # we want the end-to-end tests to be dependent on deployment of infrastructure and apps, but if infrastructure is skipped, we still want to run the tests if: ${{ always() && !failure() && !cancelled() && (github.event_name == 'workflow_dispatch' || needs.check-for-changes.outputs.hasBackendChanges == 'true' || needs.check-for-changes.outputs.hasTestChanges == 'true') }} - needs: [deploy-apps, check-for-changes] + needs: [ deploy-apps, check-for-changes ] uses: ./.github/workflows/workflow-run-k6-tests.yml secrets: TOKEN_GENERATOR_USERNAME: ${{ secrets.TOKEN_GENERATOR_USERNAME }} diff --git a/.github/workflows/ci-cd-staging.yml b/.github/workflows/ci-cd-staging.yml index 5091b5238..16f5eccab 100644 --- a/.github/workflows/ci-cd-staging.yml +++ b/.github/workflows/ci-cd-staging.yml @@ -20,7 +20,7 @@ jobs: check-for-changes: name: Check for changes - needs: [get-versions-from-github] + needs: [ get-versions-from-github ] uses: ./.github/workflows/workflow-check-for-changes.yml with: infra_base_sha: ${{ needs.get-versions-from-github.outputs.infra_version_sha }} @@ -33,7 +33,7 @@ jobs: deploy-infra: name: Deploy infra to staging if: ${{ github.event_name == 'workflow_dispatch' || needs.check-for-changes.outputs.hasInfraChanges == 'true' }} - needs: [get-current-version, check-for-changes] + needs: [ get-current-version, check-for-changes ] uses: ./.github/workflows/workflow-deploy-infra.yml secrets: AZURE_CLIENT_ID: ${{ secrets.AZURE_CLIENT_ID }} @@ -50,7 +50,7 @@ jobs: store-infra-version: name: Store Latest Deployed Infra Version as GitHub Variable - needs: [deploy-infra, get-current-version] + needs: [ deploy-infra, get-current-version ] if: ${{ needs.deploy-infra.result == 'success' }} uses: ./.github/workflows/workflow-store-github-env-variable.yml with: @@ -64,7 +64,7 @@ jobs: name: Build and publish docker images uses: ./.github/workflows/workflow-publish.yml if: ${{ github.event_name == 'workflow_dispatch' || needs.check-for-changes.outputs.hasBackendChanges == 'true' }} - needs: [get-current-version, check-for-changes] + needs: [ get-current-version, check-for-changes ] secrets: GCR_PASSWORD: ${{ secrets.GITHUB_TOKEN }} with: @@ -74,7 +74,7 @@ jobs: deploy-apps: name: Deploy apps to staging needs: - [get-current-version, check-for-changes, deploy-infra, publish] + [ get-current-version, check-for-changes, deploy-infra, publish ] if: ${{ always() && !failure() && !cancelled() && (github.event_name == 'workflow_dispatch' || needs.check-for-changes.outputs.hasBackendChanges == 'true') }} uses: ./.github/workflows/workflow-deploy-apps.yml secrets: @@ -93,9 +93,18 @@ jobs: version: ${{ needs.get-current-version.outputs.version }} runMigration: ${{ github.event_name == 'workflow_dispatch' || needs.check-for-changes.outputs.hasMigrationChanges == 'true' }} + publish-nuget: + uses: ./.github/workflows/workflow-publish-nuget.yml + needs: [ get-current-version, check-for-changes ] + if: ${{ needs.check-for-changes.outputs.hasBackendChanges == 'true' || needs.check-for-changes.outputs.hasTestChanges == 'true' }} + with: + version: ${{ needs.get-current-version.outputs.version }} + secrets: + NUGET_API_TEST_KEY: ${{ secrets.NUGET_API_TEST_KEY }} + store-apps-version: name: Store Latest Deployed Apps Version as GitHub Variable - needs: [deploy-apps, get-current-version] + needs: [ deploy-apps, get-current-version ] if: ${{ always() && !failure() && !cancelled() && (github.event_name == 'workflow_dispatch' || needs.deploy-apps.outputs.deployment_executed == 'true') }} uses: ./.github/workflows/workflow-store-github-env-variable.yml with: @@ -107,7 +116,7 @@ jobs: deploy-slack-notifier: name: Deploy slack notifier (staging) - needs: [check-for-changes] + needs: [ check-for-changes ] if: ${{ github.event_name == 'workflow_dispatch' || needs.check-for-changes.outputs.hasSlackNotifierChanges == 'true' }} uses: ./.github/workflows/workflow-deploy-function.yml secrets: @@ -123,7 +132,7 @@ jobs: publish-schema-npm: name: Publish schema npm package - needs: [check-for-changes, get-current-version, deploy-apps] + needs: [ check-for-changes, get-current-version, deploy-apps ] if: ${{ always() && !failure() && !cancelled() && (github.event_name == 'workflow_dispatch' || needs.check-for-changes.outputs.hasSchemaChanges == 'true') }} uses: ./.github/workflows/workflow-publish-schema.yml with: @@ -135,7 +144,7 @@ jobs: name: "Run K6 functional end-to-end tests" # we want the end-to-end tests to be dependent on deployment of infrastructure and apps, but if infrastructure is skipped, we still want to run the tests if: ${{ always() && !failure() && !cancelled() && (github.event_name == 'workflow_dispatch' || needs.check-for-changes.outputs.hasBackendChanges == 'true') }} - needs: [deploy-apps, check-for-changes] + needs: [ deploy-apps, check-for-changes ] uses: ./.github/workflows/workflow-run-k6-tests.yml secrets: TOKEN_GENERATOR_USERNAME: ${{ secrets.TOKEN_GENERATOR_USERNAME }} @@ -150,7 +159,7 @@ jobs: send-slack-message-on-failure: name: Send Slack message on failure - needs: [deploy-infra, deploy-apps, deploy-slack-notifier, run-e2e-tests, publish-schema-npm, publish] + needs: [ deploy-infra, deploy-apps, deploy-slack-notifier, run-e2e-tests, publish-schema-npm, publish ] if: ${{ always() && failure() && !cancelled() }} uses: ./.github/workflows/workflow-send-ci-cd-status-slack-message.yml with: diff --git a/.github/workflows/workflow-publish-nuget.yml b/.github/workflows/workflow-publish-nuget.yml index b0e1ed2cb..a088171c5 100644 --- a/.github/workflows/workflow-publish-nuget.yml +++ b/.github/workflows/workflow-publish-nuget.yml @@ -32,7 +32,8 @@ jobs: - name: Build run: dotnet build --configuration Release /p:Version=${{ inputs.version }} ${PROJECT} - # Blir ikke brukt til noe? burde det egt brukes eller bare fjernes? + # Blir ikke brukt til noe? burde det egt brukes eller bare fjernes? Ser ut som den blir brukt automatisk. + # Gjør det mye bedre for de som bruker pakken når de debugger - name: Pack with debug symbols run: dotnet pack --configuration Release /p:Version=${{ inputs.version }} -p:IncludeSymbols=true -p:SymbolPackageFormat=snupkg --output . ${PROJECT} From 41a2eb5b34e58f82e49b4be9a749f12f97320d4f Mon Sep 17 00:00:00 2001 From: Amund Myrbostad Date: Thu, 28 Nov 2024 08:51:38 +0100 Subject: [PATCH 28/62] Comment --- .github/workflows/ci-cd-pull-request.yml | 17 +++++++++-------- 1 file changed, 9 insertions(+), 8 deletions(-) diff --git a/.github/workflows/ci-cd-pull-request.yml b/.github/workflows/ci-cd-pull-request.yml index c6894d441..353bd1ecb 100644 --- a/.github/workflows/ci-cd-pull-request.yml +++ b/.github/workflows/ci-cd-pull-request.yml @@ -35,14 +35,15 @@ jobs: with: environment: "test" - publish-nuget: - uses: ./.github/workflows/workflow-publish-nuget.yml - needs: [ get-current-version, generate-git-short-sha, check-for-changes ] - if: ${{ needs.check-for-changes.outputs.hasBackendChanges == 'true' || needs.check-for-changes.outputs.hasTestChanges == 'true' }} - with: - version: ${{ needs.get-current-version.outputs.version }}-rc.${{ needs.generate-git-short-sha.outputs.gitShortSha }} - secrets: - NUGET_API_TEST_KEY: ${{ secrets.NUGET_API_TEST_KEY }} + # TESTING AV NUGET SKAL IKKE SKJØRES I PULL REQUEST +# publish-nuget: +# uses: ./.github/workflows/workflow-publish-nuget.yml +# needs: [ get-current-version, generate-git-short-sha, check-for-changes ] +# if: ${{ needs.check-for-changes.outputs.hasBackendChanges == 'true' || needs.check-for-changes.outputs.hasTestChanges == 'true' }} +# with: +# version: ${{ needs.get-current-version.outputs.version }}-rc.${{ needs.generate-git-short-sha.outputs.gitShortSha }} +# secrets: +# NUGET_API_TEST_KEY: ${{ secrets.NUGET_API_TEST_KEY }} dry-run-deploy-infra: name: Dry run deploy infrastructure From 1bdca4dffbc8556698992f29f313507d7fc4b39e Mon Sep 17 00:00:00 2001 From: Amund Myrbostad Date: Thu, 28 Nov 2024 09:13:03 +0100 Subject: [PATCH 29/62] .NET9 adds its own base64URL, can remove the custom one --- .../Extensions/ServiceCollectionExtensions.cs | 3 +- .../Services/Base64Url.cs | 45 ------------------- .../Services/DialogTokenVerifier.cs | 7 +-- 3 files changed, 6 insertions(+), 49 deletions(-) delete mode 100644 src/Digdir.Library.Dialogporten.WebApiClient/Services/Base64Url.cs diff --git a/src/Digdir.Library.Dialogporten.WebApiClient/Extensions/ServiceCollectionExtensions.cs b/src/Digdir.Library.Dialogporten.WebApiClient/Extensions/ServiceCollectionExtensions.cs index ad6766473..c73b1fd67 100644 --- a/src/Digdir.Library.Dialogporten.WebApiClient/Extensions/ServiceCollectionExtensions.cs +++ b/src/Digdir.Library.Dialogporten.WebApiClient/Extensions/ServiceCollectionExtensions.cs @@ -1,3 +1,4 @@ +using System.Buffers.Text; using System.Reflection; using Altinn.ApiClients.Maskinporten.Extensions; using Altinn.ApiClients.Maskinporten.Services; @@ -27,7 +28,7 @@ public static IServiceCollection AddDialogTokenVerifer(this IServiceCollection s var kid = keyPair.Kid; var publicKey = PublicKey.Import(SignatureAlgorithm.Ed25519, - Base64Url.Decode(keyPair.PublicComponent), KeyBlobFormat.RawPublicKey); + Base64Url.DecodeFromChars(keyPair.PublicComponent), KeyBlobFormat.RawPublicKey); services.AddSingleton(new DialogTokenVerifier(kid, publicKey)); return services; } diff --git a/src/Digdir.Library.Dialogporten.WebApiClient/Services/Base64Url.cs b/src/Digdir.Library.Dialogporten.WebApiClient/Services/Base64Url.cs deleted file mode 100644 index 910bbc705..000000000 --- a/src/Digdir.Library.Dialogporten.WebApiClient/Services/Base64Url.cs +++ /dev/null @@ -1,45 +0,0 @@ -using System.Buffers.Text; - -namespace Digdir.Library.Dialogporten.WebApiClient.Services; - -public static class Base64Url -{ - public static int GetMaxEncodedToUtf8Length(int length) => (length + 2) / 3 * 4; - - public static void Encode(ReadOnlySpan data, Span destination, out int bytesWritten) - { - Base64.EncodeToUtf8(data, destination, out _, out bytesWritten); - for (var i = 0; i < bytesWritten; i++) - { - destination[i] = destination[i] switch - { - (byte)'+' => (byte)'-', - (byte)'/' => (byte)'_', - _ => destination[i] - }; - } - - while (bytesWritten > 0 && destination[bytesWritten - 1] == '=') - { - bytesWritten--; - } - } - - public static byte[] Decode(string input) - { - var output = input.Replace('-', '+').Replace('_', '/'); - switch (output.Length % 4) - { - case 0: break; - case 2: - output += "=="; - break; - case 3: - output += "="; - break; - default: - throw new ArgumentException("Illegal base64url string", nameof(input)); - } - return Convert.FromBase64String(output); - } -} diff --git a/src/Digdir.Library.Dialogporten.WebApiClient/Services/DialogTokenVerifier.cs b/src/Digdir.Library.Dialogporten.WebApiClient/Services/DialogTokenVerifier.cs index 7baf0ab2a..39229f25f 100644 --- a/src/Digdir.Library.Dialogporten.WebApiClient/Services/DialogTokenVerifier.cs +++ b/src/Digdir.Library.Dialogporten.WebApiClient/Services/DialogTokenVerifier.cs @@ -1,3 +1,4 @@ +using System.Buffers.Text; using System.Text; using System.Text.Json; using NSec.Cryptography; @@ -10,7 +11,7 @@ public bool Verify(string token) { var parts = token.Split('.'); if (parts.Length != 3) return false; - var header = Base64Url.Decode(parts[0]); + var header = Base64Url.DecodeFromChars(parts[0]); var headerJson = JsonSerializer.Deserialize(header); if (headerJson.TryGetProperty("kid", out var value)) @@ -21,7 +22,7 @@ public bool Verify(string token) { return false; } - var signature = Base64Url.Decode(parts[2]); + var signature = Base64Url.DecodeFromChars(parts[2]); return SignatureAlgorithm.Ed25519.Verify(publicKey, Encoding.UTF8.GetBytes(parts[0] + '.' + parts[1]), signature); } @@ -35,7 +36,7 @@ public bool Verify(string token) throw new ArgumentException("Invalid dialog token"); } - var bodyJson = JsonSerializer.Deserialize(Base64Url.Decode(parts[1])); + var bodyJson = JsonSerializer.Deserialize(Base64Url.DecodeFromChars(parts[1])); var fieldsInfo = typeof(DialogTokenClaimTypes).GetFields().Where(f => f.FieldType == typeof(string)); From 1b7f5a76cbc602f8acd890210490588d0bf3c3a4 Mon Sep 17 00:00:00 2001 From: Amund Myrbostad Date: Thu, 28 Nov 2024 09:56:29 +0100 Subject: [PATCH 30/62] Cleaned up test --- .../RefitterInterfaceTests.cs | 22 +++++-------------- 1 file changed, 6 insertions(+), 16 deletions(-) diff --git a/tests/Digdir.Library.Dialogporten.WebApiClient.Integration.Tests/RefitterInterfaceTests.cs b/tests/Digdir.Library.Dialogporten.WebApiClient.Integration.Tests/RefitterInterfaceTests.cs index 0b78f0b49..3a52bab53 100644 --- a/tests/Digdir.Library.Dialogporten.WebApiClient.Integration.Tests/RefitterInterfaceTests.cs +++ b/tests/Digdir.Library.Dialogporten.WebApiClient.Integration.Tests/RefitterInterfaceTests.cs @@ -1,6 +1,6 @@ namespace Digdir.Library.Dialogporten.WebApiClient.Integration.Tests; -public sealed class RefitterInterfaceTests : IDisposable +public sealed class RefitterInterfaceTests { [Fact] @@ -35,11 +35,11 @@ await Verify(newRefitter, extension: "cs") // { // File.Delete(path); // } - // if (File.Exists(newRifitterPath)) - // { - // File.Delete(newRifitterPath); - // } - // Assert.False(File.Exists(newRifitterPath)); + if (File.Exists(newRifitterPath)) + { + File.Delete(newRifitterPath); + } + Assert.False(File.Exists(newRifitterPath)); }); } private static string? GetSolutionRootFolder() @@ -53,14 +53,4 @@ await Verify(newRefitter, extension: "cs") return solutionFolder; } - public void Dispose() - { - // var rootPath = GetSolutionRootFolder(); - // var webApiClientPath = Path.Combine(rootPath!, "src/Digdir.Library.Dialogporten.WebApiClient/Features/V1"); - // var path = Path.Combine(webApiClientPath, "RefitterInterface.received.cs"); - // if (File.Exists(path)) - // { - // File.Delete(path); - // } - } } From c4f5daf612adf1b045b491329580850c861f071c Mon Sep 17 00:00:00 2001 From: Amund Myrbostad Date: Thu, 28 Nov 2024 12:30:30 +0100 Subject: [PATCH 31/62] Workflow test --- .github/workflows/ci-cd-main.yml | 5 +++-- .github/workflows/ci-cd-pull-request.yml | 19 +++++++++-------- .github/workflows/ci-cd-staging.yml | 3 ++- .github/workflows/dispatch-apps-deploy.yml | 14 ------------- .github/workflows/workflow-publish-nuget.yml | 22 ++++++++++++-------- 5 files changed, 28 insertions(+), 35 deletions(-) delete mode 100644 .github/workflows/dispatch-apps-deploy.yml diff --git a/.github/workflows/ci-cd-main.yml b/.github/workflows/ci-cd-main.yml index 366ac84b3..c77b692ca 100644 --- a/.github/workflows/ci-cd-main.yml +++ b/.github/workflows/ci-cd-main.yml @@ -114,9 +114,10 @@ jobs: if: ${{ needs.check-for-changes.outputs.hasBackendChanges == 'true' || needs.check-for-changes.outputs.hasTestChanges == 'true' }} with: version: ${{ needs.get-current-version.outputs.version }}-rc.${{ needs.generate-git-short-sha.outputs.gitShortSha }} + path: $(find . -name '*Digdir.Library.Dialogporten.WebApiClient.csproj' -printf "%p" -quit) secrets: - NUGET_API_TEST_KEY: ${{ secrets.NUGET_API_TEST_KEY }} - + NUGET_API_KEY: ${{ secrets.NUGET_API_TEST_KEY }} + deploy-slack-notifier: name: Deploy slack notifier (test) needs: [ check-for-changes ] diff --git a/.github/workflows/ci-cd-pull-request.yml b/.github/workflows/ci-cd-pull-request.yml index 353bd1ecb..e52f59e55 100644 --- a/.github/workflows/ci-cd-pull-request.yml +++ b/.github/workflows/ci-cd-pull-request.yml @@ -35,15 +35,16 @@ jobs: with: environment: "test" - # TESTING AV NUGET SKAL IKKE SKJØRES I PULL REQUEST -# publish-nuget: -# uses: ./.github/workflows/workflow-publish-nuget.yml -# needs: [ get-current-version, generate-git-short-sha, check-for-changes ] -# if: ${{ needs.check-for-changes.outputs.hasBackendChanges == 'true' || needs.check-for-changes.outputs.hasTestChanges == 'true' }} -# with: -# version: ${{ needs.get-current-version.outputs.version }}-rc.${{ needs.generate-git-short-sha.outputs.gitShortSha }} -# secrets: -# NUGET_API_TEST_KEY: ${{ secrets.NUGET_API_TEST_KEY }} + # TESTING AV NUGET SKAL IKKE SKJØRES I PULL REQUEST + publish-nuget: + uses: ./.github/workflows/workflow-publish-nuget.yml + needs: [ get-current-version, generate-git-short-sha, check-for-changes ] + if: ${{ needs.check-for-changes.outputs.hasBackendChanges == 'true' || needs.check-for-changes.outputs.hasTestChanges == 'true' }} + with: + version: ${{ needs.get-current-version.outputs.version }}-rc.${{ needs.generate-git-short-sha.outputs.gitShortSha }} + path: $(find . -name '*Digdir.Library.Dialogporten.WebApiClient.csproj' -printf "%p" -quit) + secrets: + NUGET_API_KEY: ${{ secrets.NUGET_API_TEST_KEY }} dry-run-deploy-infra: name: Dry run deploy infrastructure diff --git a/.github/workflows/ci-cd-staging.yml b/.github/workflows/ci-cd-staging.yml index 16f5eccab..a224b2efb 100644 --- a/.github/workflows/ci-cd-staging.yml +++ b/.github/workflows/ci-cd-staging.yml @@ -93,12 +93,13 @@ jobs: version: ${{ needs.get-current-version.outputs.version }} runMigration: ${{ github.event_name == 'workflow_dispatch' || needs.check-for-changes.outputs.hasMigrationChanges == 'true' }} - publish-nuget: + publish-sdk-to-nuget: uses: ./.github/workflows/workflow-publish-nuget.yml needs: [ get-current-version, check-for-changes ] if: ${{ needs.check-for-changes.outputs.hasBackendChanges == 'true' || needs.check-for-changes.outputs.hasTestChanges == 'true' }} with: version: ${{ needs.get-current-version.outputs.version }} + path: $(find . -name '*Digdir.Library.Dialogporten.WebApiClient.csproj' -printf "%p" -quit) secrets: NUGET_API_TEST_KEY: ${{ secrets.NUGET_API_TEST_KEY }} diff --git a/.github/workflows/dispatch-apps-deploy.yml b/.github/workflows/dispatch-apps-deploy.yml deleted file mode 100644 index 534238e2f..000000000 --- a/.github/workflows/dispatch-apps-deploy.yml +++ /dev/null @@ -1,14 +0,0 @@ -on: - workflow_dispatch: -jobs: - package-project: - runs-on: ubuntu-latest - timeout-minutes: 15 - steps: - - name: Checkout - uses: actions/checkout@v4 - - name: set PROJECT variable to point to project - run: | - PROJECT=$(find . -name '*Digdir.Library.Dialogporten.WebApiClient.csproj' -printf "%p" -quit) - echo "PROJECT ${PROJECT}" - echo "PROJECT=${PROJECT}" >> $GITHUB_ENV diff --git a/.github/workflows/workflow-publish-nuget.yml b/.github/workflows/workflow-publish-nuget.yml index a088171c5..2dbf3f7a6 100644 --- a/.github/workflows/workflow-publish-nuget.yml +++ b/.github/workflows/workflow-publish-nuget.yml @@ -7,8 +7,12 @@ on: description: "Version" required: true type: string + path: + description: "Path to project" + required: true + type: string secrets: - NUGET_API_TEST_KEY: + NUGET_API_KEY: required: true jobs: build: @@ -17,11 +21,11 @@ jobs: steps: - name: Checkout uses: actions/checkout@v4 - - name: set PROJECT variable to point to project - run: | - PROJECT=$(find . -name '*Digdir.Library.Dialogporten.WebApiClient.csproj' -printf "%p" -quit) - echo "PROJECT ${PROJECT}" - echo "PROJECT=${PROJECT}" >> $GITHUB_ENV +# - name: set PROJECT variable to point to project +# run: | +# PROJECT=$(find . -name '*Digdir.Library.Dialogporten.WebApiClient.csproj' -printf "%p" -quit) +# echo "PROJECT ${PROJECT}" +# echo "PROJECT=${PROJECT}" >> $GITHUB_ENV - name: Set up .NET uses: actions/setup-dotnet@v4 @@ -30,12 +34,12 @@ jobs: # Kan kanskje byttes ut med build-test som blir kjørt for hele solution? - name: Build - run: dotnet build --configuration Release /p:Version=${{ inputs.version }} ${PROJECT} + run: dotnet build --configuration Release /p:Version=${{ inputs.version }} ${inputs.path} # Blir ikke brukt til noe? burde det egt brukes eller bare fjernes? Ser ut som den blir brukt automatisk. # Gjør det mye bedre for de som bruker pakken når de debugger - name: Pack with debug symbols - run: dotnet pack --configuration Release /p:Version=${{ inputs.version }} -p:IncludeSymbols=true -p:SymbolPackageFormat=snupkg --output . ${PROJECT} + run: dotnet pack --configuration Release /p:Version=${{ inputs.version }} -p:IncludeSymbols=true -p:SymbolPackageFormat=snupkg --output . ${inputs.path} - name: Upload artifact uses: actions/upload-artifact@v4 @@ -52,5 +56,5 @@ jobs: name: package - name: Push to NuGet - run: dotnet nuget push *.nupkg --source https://int.nugettest.org --api-key ${{secrets.NUGET_API_TEST_KEY}} + run: dotnet nuget push *.nupkg --source https://int.nugettest.org --api-key ${{secrets.NUGET_API_KEY}} From 56a5ebe37be63f68922bbb1c418d081c0b07ac03 Mon Sep 17 00:00:00 2001 From: Amund Myrbostad Date: Thu, 28 Nov 2024 12:31:51 +0100 Subject: [PATCH 32/62] no --- .github/workflows/ci-cd-main.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci-cd-main.yml b/.github/workflows/ci-cd-main.yml index c77b692ca..50995fbc1 100644 --- a/.github/workflows/ci-cd-main.yml +++ b/.github/workflows/ci-cd-main.yml @@ -108,7 +108,7 @@ jobs: version: ${{ needs.get-current-version.outputs.version }}-${{ needs.generate-git-short-sha.outputs.gitShortSha }} runMigration: ${{ github.event_name == 'workflow_dispatch' || needs.check-for-changes.outputs.hasMigrationChanges == 'true' }} - publish-nuget: + publish-sdk-to-nuget: uses: ./.github/workflows/workflow-publish-nuget.yml needs: [ get-current-version, generate-git-short-sha, check-for-changes ] if: ${{ needs.check-for-changes.outputs.hasBackendChanges == 'true' || needs.check-for-changes.outputs.hasTestChanges == 'true' }} From af4f6a396f1e1e133e47c7cf7214e77154dfee45 Mon Sep 17 00:00:00 2001 From: Amund Myrbostad Date: Thu, 28 Nov 2024 12:40:35 +0100 Subject: [PATCH 33/62] Big finding out --- .github/workflows/workflow-publish-nuget.yml | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/.github/workflows/workflow-publish-nuget.yml b/.github/workflows/workflow-publish-nuget.yml index 2dbf3f7a6..6c116dc26 100644 --- a/.github/workflows/workflow-publish-nuget.yml +++ b/.github/workflows/workflow-publish-nuget.yml @@ -21,11 +21,11 @@ jobs: steps: - name: Checkout uses: actions/checkout@v4 -# - name: set PROJECT variable to point to project -# run: | -# PROJECT=$(find . -name '*Digdir.Library.Dialogporten.WebApiClient.csproj' -printf "%p" -quit) -# echo "PROJECT ${PROJECT}" -# echo "PROJECT=${PROJECT}" >> $GITHUB_ENV + # - name: set PROJECT variable to point to project + # run: | + # PROJECT=$(find . -name '${{inputs.path}}' -printf "%p" -quit) + # echo "PROJECT ${PROJECT}" + # echo "PROJECT=${PROJECT}" >> $GITHUB_ENV - name: Set up .NET uses: actions/setup-dotnet@v4 @@ -34,12 +34,12 @@ jobs: # Kan kanskje byttes ut med build-test som blir kjørt for hele solution? - name: Build - run: dotnet build --configuration Release /p:Version=${{ inputs.version }} ${inputs.path} + run: dotnet build --configuration Release /p:Version=${{ inputs.version }} ${{inputs.path}} # Blir ikke brukt til noe? burde det egt brukes eller bare fjernes? Ser ut som den blir brukt automatisk. # Gjør det mye bedre for de som bruker pakken når de debugger - name: Pack with debug symbols - run: dotnet pack --configuration Release /p:Version=${{ inputs.version }} -p:IncludeSymbols=true -p:SymbolPackageFormat=snupkg --output . ${inputs.path} + run: dotnet pack --configuration Release /p:Version=${{ inputs.version }} -p:IncludeSymbols=true -p:SymbolPackageFormat=snupkg --output . ${{inputs.path}} - name: Upload artifact uses: actions/upload-artifact@v4 From 708b09efe39d723191b22752edaa6431405c1b7f Mon Sep 17 00:00:00 2001 From: Amund Myrbostad Date: Thu, 28 Nov 2024 12:46:47 +0100 Subject: [PATCH 34/62] hm --- .github/workflows/workflow-publish-nuget.yml | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/.github/workflows/workflow-publish-nuget.yml b/.github/workflows/workflow-publish-nuget.yml index 6c116dc26..6949c01ac 100644 --- a/.github/workflows/workflow-publish-nuget.yml +++ b/.github/workflows/workflow-publish-nuget.yml @@ -21,11 +21,12 @@ jobs: steps: - name: Checkout uses: actions/checkout@v4 - # - name: set PROJECT variable to point to project - # run: | - # PROJECT=$(find . -name '${{inputs.path}}' -printf "%p" -quit) - # echo "PROJECT ${PROJECT}" - # echo "PROJECT=${PROJECT}" >> $GITHUB_ENV + - name: set PROJECT variable to point to project + run: | + echo ${{inputs.path}} + PROJECT=${{inputs.path}} + echo "PROJECT ${PROJECT}" + echo "PROJECT=${PROJECT}" >> $GITHUB_ENV - name: Set up .NET uses: actions/setup-dotnet@v4 @@ -34,12 +35,12 @@ jobs: # Kan kanskje byttes ut med build-test som blir kjørt for hele solution? - name: Build - run: dotnet build --configuration Release /p:Version=${{ inputs.version }} ${{inputs.path}} + run: dotnet build --configuration Release /p:Version=${{ inputs.version }} ${{PROJECT}} # Blir ikke brukt til noe? burde det egt brukes eller bare fjernes? Ser ut som den blir brukt automatisk. # Gjør det mye bedre for de som bruker pakken når de debugger - name: Pack with debug symbols - run: dotnet pack --configuration Release /p:Version=${{ inputs.version }} -p:IncludeSymbols=true -p:SymbolPackageFormat=snupkg --output . ${{inputs.path}} + run: dotnet pack --configuration Release /p:Version=${{ inputs.version }} -p:IncludeSymbols=true -p:SymbolPackageFormat=snupkg --output . ${PROJECT} - name: Upload artifact uses: actions/upload-artifact@v4 From 4a15f4aa84e44d543978907bdbb0881eea490697 Mon Sep 17 00:00:00 2001 From: Amund Myrbostad Date: Thu, 28 Nov 2024 12:51:09 +0100 Subject: [PATCH 35/62] Clean up --- .github/workflows/workflow-publish-nuget.yml | 2 -- 1 file changed, 2 deletions(-) diff --git a/.github/workflows/workflow-publish-nuget.yml b/.github/workflows/workflow-publish-nuget.yml index 6949c01ac..5ef293237 100644 --- a/.github/workflows/workflow-publish-nuget.yml +++ b/.github/workflows/workflow-publish-nuget.yml @@ -37,8 +37,6 @@ jobs: - name: Build run: dotnet build --configuration Release /p:Version=${{ inputs.version }} ${{PROJECT}} - # Blir ikke brukt til noe? burde det egt brukes eller bare fjernes? Ser ut som den blir brukt automatisk. - # Gjør det mye bedre for de som bruker pakken når de debugger - name: Pack with debug symbols run: dotnet pack --configuration Release /p:Version=${{ inputs.version }} -p:IncludeSymbols=true -p:SymbolPackageFormat=snupkg --output . ${PROJECT} From 3849c42c6420d00bef26d90828df0455c22bdca0 Mon Sep 17 00:00:00 2001 From: Amund Myrbostad Date: Thu, 28 Nov 2024 12:53:34 +0100 Subject: [PATCH 36/62] Arg --- .github/workflows/workflow-publish-nuget.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/workflow-publish-nuget.yml b/.github/workflows/workflow-publish-nuget.yml index 5ef293237..44a96fbd2 100644 --- a/.github/workflows/workflow-publish-nuget.yml +++ b/.github/workflows/workflow-publish-nuget.yml @@ -35,8 +35,8 @@ jobs: # Kan kanskje byttes ut med build-test som blir kjørt for hele solution? - name: Build - run: dotnet build --configuration Release /p:Version=${{ inputs.version }} ${{PROJECT}} - + run: dotnet build --configuration Release /p:Version=${{ inputs.version }} ${PROJECT} + - name: Pack with debug symbols run: dotnet pack --configuration Release /p:Version=${{ inputs.version }} -p:IncludeSymbols=true -p:SymbolPackageFormat=snupkg --output . ${PROJECT} From 0894c17149d9961e261a6d2b87a5734b98f5157e Mon Sep 17 00:00:00 2001 From: Amund Myrbostad Date: Thu, 28 Nov 2024 13:02:21 +0100 Subject: [PATCH 37/62] hmm --- .github/workflows/ci-cd-pull-request.yml | 2 +- .github/workflows/workflow-publish-nuget.yml | 11 +++++++---- 2 files changed, 8 insertions(+), 5 deletions(-) diff --git a/.github/workflows/ci-cd-pull-request.yml b/.github/workflows/ci-cd-pull-request.yml index e52f59e55..66502c890 100644 --- a/.github/workflows/ci-cd-pull-request.yml +++ b/.github/workflows/ci-cd-pull-request.yml @@ -36,7 +36,7 @@ jobs: environment: "test" # TESTING AV NUGET SKAL IKKE SKJØRES I PULL REQUEST - publish-nuget: + publish-sdk-to-nuget: uses: ./.github/workflows/workflow-publish-nuget.yml needs: [ get-current-version, generate-git-short-sha, check-for-changes ] if: ${{ needs.check-for-changes.outputs.hasBackendChanges == 'true' || needs.check-for-changes.outputs.hasTestChanges == 'true' }} diff --git a/.github/workflows/workflow-publish-nuget.yml b/.github/workflows/workflow-publish-nuget.yml index 44a96fbd2..07be3b398 100644 --- a/.github/workflows/workflow-publish-nuget.yml +++ b/.github/workflows/workflow-publish-nuget.yml @@ -11,6 +11,11 @@ on: description: "Path to project" required: true type: string + source: + description: "Source to push to" + required: false + type: string + default: https://int.nugettest.org secrets: NUGET_API_KEY: required: true @@ -23,7 +28,6 @@ jobs: uses: actions/checkout@v4 - name: set PROJECT variable to point to project run: | - echo ${{inputs.path}} PROJECT=${{inputs.path}} echo "PROJECT ${PROJECT}" echo "PROJECT=${PROJECT}" >> $GITHUB_ENV @@ -33,10 +37,9 @@ jobs: with: global-json-file: ./global.json - # Kan kanskje byttes ut med build-test som blir kjørt for hele solution? - name: Build run: dotnet build --configuration Release /p:Version=${{ inputs.version }} ${PROJECT} - + - name: Pack with debug symbols run: dotnet pack --configuration Release /p:Version=${{ inputs.version }} -p:IncludeSymbols=true -p:SymbolPackageFormat=snupkg --output . ${PROJECT} @@ -55,5 +58,5 @@ jobs: name: package - name: Push to NuGet - run: dotnet nuget push *.nupkg --source https://int.nugettest.org --api-key ${{secrets.NUGET_API_KEY}} + run: dotnet nuget push *.nupkg --source ${{ inputs.source }} --api-key ${{secrets.NUGET_API_KEY}} From 329e8ebe9e39c3652bedb6ea29da2e849f6cf777 Mon Sep 17 00:00:00 2001 From: Amund Myrbostad Date: Thu, 28 Nov 2024 13:32:16 +0100 Subject: [PATCH 38/62] Updated README.md --- src/Digdir.Library.Dialogporten.WebApiClient/README.md | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/Digdir.Library.Dialogporten.WebApiClient/README.md b/src/Digdir.Library.Dialogporten.WebApiClient/README.md index 10c7eb3a5..cbcc177ad 100644 --- a/src/Digdir.Library.Dialogporten.WebApiClient/README.md +++ b/src/Digdir.Library.Dialogporten.WebApiClient/README.md @@ -29,11 +29,11 @@ AppSettings ```JSON { "DialogportenSettings": { - "Environment": "test", + "Environment": "", "Maskinporten": { - "ClientId": "ce3b732a-d4f2-4997-8545-adf8df70fe6c", - "Scope": "digdir:dialogporten.serviceprovider digdir:dialogporten.serviceprovider.search", - "EncodedJwk": "eyJwIjoieTRBZEhlVVBxdFEtSFlOWkR5ci0zS09RT3NQajA5TFh2a2hIUFlTdGFYNThkMndIWUJiVXlDTWdMYWtGTHo4UExKNWtscURsanRoczFtM1dFVGJhSWVuY25TalpjZTh4S1Q2SHh3bTNyaDlydWZ1TWVOZDRqaFptTm9WZmJrcGNXcVh0UDFvb1NPTE5zYUNVUWFUUEVKTXlFd3VhdWxMSzgxRG1SSTlMSmVNIiwia3R5IjoiUlNBIiwicSI6InFmOEQ2Uy1Kd19BdVQ0Q2hjQTlDek9WNk1uTW9mc1VCdTkteHJBcVFDRjh4WWZZOTRxQ1ZjQ3llajlkTlN3eXZUZXg1dThIMzNSaU1LMEFWM2tTQlpJLVZqcXJHLUx6YzNfTUlTTVpSVDJfbzNVQlRWVHpqTkUtSkpMX1hKaXJ6ZVhhQjM1UmFZMjFnWVhKQWg3X2tuR3dpRzF3MGxiT2ozQ0FzdnVwaU1BMCIsImQiOiJLVkF1b1Zhd2paTTgwenRYcUxSZUJGZkJ3M3pxVjdkUGFpaWFONWU0RFp6bW5MYTFMNEZJMTgtanVraHN4UVdqR1NFQnBIdTFrOHRPUWMyWjBsSDVaaTBydERqM0JKeEhxeDNsUGdYMWdTNXNiX1EyeXNfb2FKcklSX012MHBDQUFHX3hpa2lUY2kzTHMyeV9femV4QTdLbG0yalNmYW9Udzdhbml1R3RId1d5dHhCSnJnZ0J2c3loaHZIaUVQcnZaMHZBZldYYWI3QUtkUjc1cEtEaVVHOGdGNTdJN0hrWnpJSk9QYXp3MTU1Skx4TG9HcDVzeTFCVVpBNHRiQmlseWVsdG9ONGZINWd1aUktOXJjTE5zUmVYazJ1c3NFbE9EbVZ2Qmx2ZVVfb1ZRMVYtVDRJRnUzZk1BYVJGUFA2Wlo1akJJX2hkOFJOTTJ3eUp5UHVRWVEiLCJlIjoiQVFBQiIsInVzZSI6InNpZyIsImtpZCI6ImRpYWxvZ3BvcnRlbi1zcC1zZGstdGVzdC0yMDI0MTAxMCIsInFpIjoiQm9VS0RlczQ0UTNpXzNyT3Q4aHRrS2NxWkFNem00Njl2cTZuQnJVcHBTU1Ric3YwalZwN1daRGRRR0Q0bU8yMVJVOEFUbmN3NjFPOUt3YXktOGloX082VWFWbGxZN3NHYlVrQ2NVaG43ZDkzSElLZnhybnhWVE9nNUNMWTBka2Zwa3A1V2pyU1VvMTVKQURsY3BRM0ItRlU0Nm9PTG9ydjJ0SVFQekE4OF93IiwiZHAiOiJ1emVaRWZpN2Fqa3JFREhYekZtTThXWFUtZ3RmM1ctN0pnY082MnpWc1JrNTN4QlcxTE1NZlRlN2tlWk9xOEhDN3hTbGktSm9idnR6WGU3Y295ZW9sTXkzTnlydXFhQVp4VTBPMHpHQWQ4UFdjdHNXeDlITHlrU1hNby1QVlVNNkpmZERCaWFtcXk5bGQ0WTRfdzlscEdVWEMyaUFwLXdsWktaSHdrbG1KR3MiLCJhbGciOiJSUzI1NiIsImRxIjoiVENBcV9DMlJuX0RhakRlcUU2aUIzWWVWNVNtMHBMQk1Tbm10OHNENEp3ZVo4YWgzcGhrTFVxUm9qVGw1SDNhYXVtWl9UUmxiaWVNSVFnWDh4UUFnZ1l2YkNYeG9oZEx0aGt3ckZZdlp0WjBEeHJDYm9Md1hjc0Y3Ukwyejl4LWMwSFBGVFAzLVREQWF6UWlBNVVtRmNwYnAzeDYzWGFLSWFuYnVFc0NiSDdFIiwibiI6Imh5Sks4WnE2Wk8tRjFSSklVWVNCdUpfeG9RWkNNV1EyTVhrSFQ1bVROVVJJZmVWWWpCNWMwMzI0Uk5nc3ZPMEtXX0hUejRRSnptLV9rU1VaZ0h1Z2JoR0F3a1Vqc1lwTlJJRTBvLVNtdEExMlMxZHVCZWx6ajg2LVFrZkFzeFlwblNnSzl5OXpTS1B0YVlzMS1EcEVIb0hVdk9BSDJlNktFTXRaYUZPM0J0Yk9WUURXMENMYi1FY0UyaDBQRlFMMUp3NU8zeDhHcXBZeUFhamNoWnptcWlFbjBaSEd1QTNZZ1NyNGxQV1lkTzBNWHZmRFdyaFBTcnVTS3FodzBHMTlBRUpHOFhoek9xTWxLTUFIbW5ybk9XOHM2cWR2Sy1UQ1BiVGJJOU5XUWdFd2JpUFBBdlU0MUFITzZmTEYxUHZzQ3FhNjZTSGdYMkJzS3pvNVhORjhodyJ9" + "ClientId": "", + "Scope": "", + "EncodedJwk": "" } }, // Ed25519 keys for validating dialog tokens From 2a15b3706216287ab5faf917de9316ba662d7085 Mon Sep 17 00:00:00 2001 From: Amund Myrbostad Date: Fri, 29 Nov 2024 09:09:00 +0100 Subject: [PATCH 39/62] Clean up --- .../Dialogs.cs | 24 + .../Program.cs | 18 +- .../Features/V1/RefitterInterface.verified.cs | 1788 +---------------- .../README.md | 45 +- .../.refitter | 1 + .../RefitterInterfaceTests.cs | 35 +- .../refitter/RefitterInterface.cs | 1788 +---------------- 7 files changed, 175 insertions(+), 3524 deletions(-) create mode 100644 src/Digdir.Library.Dialogporten.WebApiClient.Sample/Dialogs.cs diff --git a/src/Digdir.Library.Dialogporten.WebApiClient.Sample/Dialogs.cs b/src/Digdir.Library.Dialogporten.WebApiClient.Sample/Dialogs.cs new file mode 100644 index 000000000..9251bbed6 --- /dev/null +++ b/src/Digdir.Library.Dialogporten.WebApiClient.Sample/Dialogs.cs @@ -0,0 +1,24 @@ +using Digdir.Library.Dialogporten.WebApiClient.Features.V1; +using Refit; + +namespace Digdir.Library.Dialogporten.WebApiClient.Sample; + +public sealed class Dialogs(IServiceownerApi client) +{ + public async Task Purge(Guid dialogId, Guid? ifMatch = null) + { + var response = await client.V1ServiceOwnerDialogsPurgePurgeDialog(dialogId, ifMatch); + Console.WriteLine($"Purge response status code: {response.StatusCode}"); + Console.WriteLine($"Purge Response: {response.StatusCode}"); + return response; + } + + public static void PrintGetDialog(V1ServiceOwnerDialogsQueriesGet_Dialog dialog) + { + Console.WriteLine($"System Label: {dialog.SystemLabel}"); + Console.WriteLine($"Dialog Status: {dialog.Status}"); + Console.WriteLine($"Dialog Org: {dialog.Org}"); + Console.WriteLine($"Dialog Progress: {dialog.Progress}"); + Console.WriteLine($"Deleted at: {dialog.DeletedAt}"); + } +} diff --git a/src/Digdir.Library.Dialogporten.WebApiClient.Sample/Program.cs b/src/Digdir.Library.Dialogporten.WebApiClient.Sample/Program.cs index fd98d66c2..095ada62b 100644 --- a/src/Digdir.Library.Dialogporten.WebApiClient.Sample/Program.cs +++ b/src/Digdir.Library.Dialogporten.WebApiClient.Sample/Program.cs @@ -1,6 +1,7 @@ using System.Diagnostics; using Digdir.Library.Dialogporten.WebApiClient.Extensions; using Digdir.Library.Dialogporten.WebApiClient.Features.V1; +using Digdir.Library.Dialogporten.WebApiClient.Sample; using Digdir.Library.Dialogporten.WebApiClient.Services; using Microsoft.Extensions.Configuration; using Microsoft.Extensions.DependencyInjection; @@ -19,6 +20,8 @@ var serviceProvider = services.BuildServiceProvider(); var dialogportenClient = serviceProvider.GetRequiredService(); + +var dialogs = new Dialogs(dialogportenClient); var verifier = serviceProvider.GetRequiredService(); var token = "eyJhbGciOiJFZERTQSIsInR5cCI6IkpXVCIsImtpZCI6ImRldi1wcmltYXJ5LXNpZ25pbmcta2V5In0.eyJqdGkiOiIzNGZhMGViNS0xZGVmLTQxMDYtYWY4YS0xMjljYjNiNTliNDYiLCJjIjoidXJuOmFsdGlubjpwZXJzb246aWRlbnRpZmllci1ubzowODg5NTY5OTY4NCIsImwiOjMsInAiOiJ1cm46YWx0aW5uOnBlcnNvbjppZGVudGlmaWVyLW5vOjA4ODk1Njk5Njg0IiwicyI6InVybjphbHRpbm46cmVzb3VyY2U6c3VwZXItc2ltcGxlLXNlcnZpY2UiLCJpIjoiMDE5MzI1MzgtMzEzZC03NGI1LTg1ZWMtMWI5MGIxMjYzNWRjIiwiYSI6InJlYWQiLCJpc3MiOiJodHRwczovL2xvY2FsaG9zdDo3MjE0L2FwaS92MSIsImlhdCI6MTczMTU3ODk5OCwibmJmIjoxNzMxNTc4OTk4LCJleHAiOjE3MzE1Nzk1OTh9.fL-rpDsXqwOSVk5zMizLZRaFugaz2VfVNf0CjOxIhSdwrkAhh1UfRu5RcD2OK4ddnRrCuz8iKKJyadkek9UGAg"; @@ -43,11 +46,7 @@ // var guid = Guid.Parse("0192b307-f5a5-7450-bee2-04a3515337ff"); var dialog = dialogportenClient.V1ServiceOwnerDialogsGetGetDialog(guid, null!).Result.Content; Debug.Assert(dialog != null, nameof(dialog) + " != null"); -Console.WriteLine(dialog.SystemLabel); -Console.WriteLine(dialog.Status); -Console.WriteLine(dialog.Org); -Console.WriteLine(dialog.Progress); -Console.WriteLine($"Deleted at: {dialog.DeletedAt}"); +Dialogs.PrintGetDialog(dialog); Console.WriteLine("==End Get Single Dialog=="); Console.WriteLine("==Start Search Dialogs=="); @@ -85,11 +84,7 @@ // var guid = Guid.Parse("0192b307-f5a5-7450-bee2-04a3515337ff"); dialog = dialogportenClient.V1ServiceOwnerDialogsGetGetDialog(guid, null!).Result.Content; Debug.Assert(dialog != null, nameof(dialog) + " != null"); -Console.WriteLine(dialog.SystemLabel); -Console.WriteLine(dialog.Status); -Console.WriteLine(dialog.Org); -Console.WriteLine(dialog.Progress); -Console.WriteLine(dialog.DeletedAt); +Dialogs.PrintGetDialog(dialog); Console.WriteLine("==End Get Single Dialog=="); @@ -97,7 +92,8 @@ Debug.Assert(result != null, nameof(result) + " != null"); Console.WriteLine(result.Content!.Items.Count); Console.WriteLine("== Start Purge Dialog == "); -var purgeResponse = await dialogportenClient.V1ServiceOwnerDialogsPurgePurgeDialog(guid, dialog.Revision); +var purgeResponse = await dialogs.Purge(guid, dialog.Revision); + Console.WriteLine($"Purge response status code: {purgeResponse.StatusCode}"); if (purgeResponse.IsSuccessStatusCode) { diff --git a/src/Digdir.Library.Dialogporten.WebApiClient/Features/V1/RefitterInterface.verified.cs b/src/Digdir.Library.Dialogporten.WebApiClient/Features/V1/RefitterInterface.verified.cs index 8b048947a..242dfe32c 100644 --- a/src/Digdir.Library.Dialogporten.WebApiClient/Features/V1/RefitterInterface.verified.cs +++ b/src/Digdir.Library.Dialogporten.WebApiClient/Features/V1/RefitterInterface.verified.cs @@ -1027,1744 +1027,118 @@ public IDictionary AdditionalProperties } [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "14.2.0.0 (NJsonSchema v11.1.0.0 (Newtonsoft.Json v13.0.0.0))")] - public partial class PaginatedListOfV1EndUserDialogsQueriesSearch_Dialog - { - /// - /// The continuation token to be used to fetch the next page of items - /// - - [JsonPropertyName("continuationToken")] - public string ContinuationToken { get; set; } - - /// - /// Whether there are more items available that can be fetched by supplying the continuation token - /// - - [JsonPropertyName("hasNextPage")] - public bool HasNextPage { get; set; } - - /// - /// The paginated list of items - /// - - [JsonPropertyName("items")] - public ICollection Items { get; set; } - - /// - /// The current sorting order of the items - /// - - [JsonPropertyName("orderBy")] - public string OrderBy { get; set; } - - } - - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "14.2.0.0 (NJsonSchema v11.1.0.0 (Newtonsoft.Json v13.0.0.0))")] - public partial class PaginatedListOfV1ServiceOwnerDialogsQueriesSearch_Dialog - { - /// - /// The continuation token to be used to fetch the next page of items - /// - - [JsonPropertyName("continuationToken")] - public string ContinuationToken { get; set; } - - /// - /// Whether there are more items available that can be fetched by supplying the continuation token - /// - - [JsonPropertyName("hasNextPage")] - public bool HasNextPage { get; set; } - - /// - /// The paginated list of items - /// - - [JsonPropertyName("items")] - public ICollection Items { get; set; } - - /// - /// The current sorting order of the items - /// - - [JsonPropertyName("orderBy")] - public string OrderBy { get; set; } - - } - - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "14.2.0.0 (NJsonSchema v11.1.0.0 (Newtonsoft.Json v13.0.0.0))")] - public partial class ProblemDetails - { - - [JsonPropertyName("detail")] - public string Detail { get; set; } - - [JsonPropertyName("errors")] - public ICollection Errors { get; set; } - - [JsonPropertyName("instance")] - public string Instance { get; set; } = "/api/route"; - - [JsonPropertyName("status")] - public int Status { get; set; } = 400; - - [JsonPropertyName("title")] - public string Title { get; set; } = "One or more validation errors occurred."; - - [JsonPropertyName("traceId")] - public string TraceId { get; set; } = "0HMPNHL0JHL76:00000001"; - - [JsonPropertyName("type")] - public string Type { get; set; } = "https://www.rfc-editor.org/rfc/rfc7231#section-6.5.1"; - - } - - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "14.2.0.0 (NJsonSchema v11.1.0.0 (Newtonsoft.Json v13.0.0.0))")] - public partial class ProblemDetails_Error - { - - [JsonPropertyName("code")] - public string Code { get; set; } - - [JsonPropertyName("name")] - public string Name { get; set; } = "Error or field name"; - - [JsonPropertyName("reason")] - public string Reason { get; set; } = "Error reason"; - - [JsonPropertyName("severity")] - public string Severity { get; set; } - - } - - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "14.2.0.0 (NJsonSchema v11.1.0.0 (Newtonsoft.Json v13.0.0.0))")] - public partial class V1CommonContent_ContentValue - { - /// - /// Media type of the content (plaintext, Markdown). Can also indicate that the content is embeddable. - /// - - [JsonPropertyName("mediaType")] - public string MediaType { get; set; } - - /// - /// A list of localizations for the content. - /// - - [JsonPropertyName("value")] - public ICollection Value { get; set; } - - } - - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "14.2.0.0 (NJsonSchema v11.1.0.0 (Newtonsoft.Json v13.0.0.0))")] - public partial class V1CommonLocalizations_Localization - { - /// - /// The language code of the localization in ISO 639-1 format. - /// - - [JsonPropertyName("languageCode")] - public string LanguageCode { get; set; } - - /// - /// The localized text or URI reference. - /// - - [JsonPropertyName("value")] - public string Value { get; set; } - - } - - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "14.2.0.0 (NJsonSchema v11.1.0.0 (Newtonsoft.Json v13.0.0.0))")] - public partial class V1EndUserCommonActors_Actor - { - /// - /// The identifier of the person or organization that sent the transmission. Mutually exclusive with ActorName. - ///
Might be omitted if ActorType is "ServiceOwner". - ///
- - [JsonPropertyName("actorId")] - public string ActorId { get; set; } - - /// - /// Specifies the name of the entity that sent the transmission. Mutually exclusive with ActorId. If ActorId - ///
is supplied, the name will be automatically populated from the name registries. - ///
- - [JsonPropertyName("actorName")] - public string ActorName { get; set; } - - /// - /// The type of actor that sent the transmission. - /// - - [JsonPropertyName("actorType")] - [JsonConverter(typeof(JsonStringEnumConverter))] - public Actors_ActorType ActorType { get; set; } - - } - - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "14.2.0.0 (NJsonSchema v11.1.0.0 (Newtonsoft.Json v13.0.0.0))")] - public partial class V1EndUserDialogActivitiesQueriesGet_Activity - { - - [JsonPropertyName("createdAt")] - public System.DateTimeOffset? CreatedAt { get; set; } - - [JsonPropertyName("description")] - public ICollection Description { get; set; } - - [JsonPropertyName("extendedType")] - public System.Uri ExtendedType { get; set; } - - [JsonPropertyName("id")] - public System.Guid Id { get; set; } - - [JsonPropertyName("performedBy")] - public V1EndUserCommonActors_Actor PerformedBy { get; set; } - - [JsonPropertyName("transmissionId")] - public System.Guid? TransmissionId { get; set; } - - [JsonPropertyName("type")] - [JsonConverter(typeof(JsonStringEnumConverter))] - public DialogsEntitiesActivities_DialogActivityType Type { get; set; } - - } - - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "14.2.0.0 (NJsonSchema v11.1.0.0 (Newtonsoft.Json v13.0.0.0))")] - public partial class V1EndUserDialogActivitiesQueriesSearch_Activity - { - - [JsonPropertyName("createdAt")] - public System.DateTimeOffset CreatedAt { get; set; } - - [JsonPropertyName("extendedType")] - public System.Uri ExtendedType { get; set; } - - [JsonPropertyName("id")] - public System.Guid Id { get; set; } - - [JsonPropertyName("seenByEndUserIdHash")] - public string SeenByEndUserIdHash { get; set; } - - [JsonPropertyName("transmissionId")] - public System.Guid? TransmissionId { get; set; } - - [JsonPropertyName("type")] - [JsonConverter(typeof(JsonStringEnumConverter))] - public DialogsEntitiesActivities_DialogActivityType Type { get; set; } - - } - - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "14.2.0.0 (NJsonSchema v11.1.0.0 (Newtonsoft.Json v13.0.0.0))")] - public partial class V1EndUserDialogLabelAssignmentLogQueriesSearch_LabelAssignmentLog - { - - [JsonPropertyName("action")] - public string Action { get; set; } - - [JsonPropertyName("createdAt")] - public System.DateTimeOffset CreatedAt { get; set; } - - [JsonPropertyName("name")] - public string Name { get; set; } - - [JsonPropertyName("performedBy")] - public V1EndUserCommonActors_Actor PerformedBy { get; set; } - - } - - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "14.2.0.0 (NJsonSchema v11.1.0.0 (Newtonsoft.Json v13.0.0.0))")] - public partial class V1EndUserDialogSeenLogsQueriesGet_SeenLog - { - - [JsonPropertyName("id")] - public System.Guid Id { get; set; } - - [JsonPropertyName("isCurrentEndUser")] - public bool IsCurrentEndUser { get; set; } - - [JsonPropertyName("isViaServiceOwner")] - public bool IsViaServiceOwner { get; set; } - - [JsonPropertyName("seenAt")] - public System.DateTimeOffset SeenAt { get; set; } - - [JsonPropertyName("seenBy")] - public V1EndUserCommonActors_Actor SeenBy { get; set; } - - } - - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "14.2.0.0 (NJsonSchema v11.1.0.0 (Newtonsoft.Json v13.0.0.0))")] - public partial class V1EndUserDialogSeenLogsQueriesSearch_SeenLog - { - - [JsonPropertyName("id")] - public System.Guid Id { get; set; } - - [JsonPropertyName("isCurrentEndUser")] - public bool IsCurrentEndUser { get; set; } - - [JsonPropertyName("isViaServiceOwner")] - public bool IsViaServiceOwner { get; set; } - - [JsonPropertyName("seenAt")] - public System.DateTimeOffset SeenAt { get; set; } - - [JsonPropertyName("seenBy")] - public V1EndUserCommonActors_Actor SeenBy { get; set; } - - } - - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "14.2.0.0 (NJsonSchema v11.1.0.0 (Newtonsoft.Json v13.0.0.0))")] - public partial class V1EndUserDialogsQueriesGet_Content - { - /// - /// Additional information about the dialog, this may contain Markdown. - /// - - [JsonPropertyName("additionalInfo")] - public V1CommonContent_ContentValue AdditionalInfo { get; set; } - - /// - /// Used as the human-readable label used to describe the "ExtendedStatus" field. - /// - - [JsonPropertyName("extendedStatus")] - public V1CommonContent_ContentValue ExtendedStatus { get; set; } - - /// - /// Front-channel embedded content. Used to dynamically embed content in the frontend from an external URL. - /// - - [JsonPropertyName("mainContentReference")] - public V1CommonContent_ContentValue MainContentReference { get; set; } - - /// - /// Overridden sender name. If not supplied, assume "org" as the sender name. - /// - - [JsonPropertyName("senderName")] - public V1CommonContent_ContentValue SenderName { get; set; } - - /// - /// A short summary of the dialog and its current state. - /// - - [JsonPropertyName("summary")] - public V1CommonContent_ContentValue Summary { get; set; } - - /// - /// The title of the dialog. - /// - - [JsonPropertyName("title")] - public V1CommonContent_ContentValue Title { get; set; } - - } - - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "14.2.0.0 (NJsonSchema v11.1.0.0 (Newtonsoft.Json v13.0.0.0))")] - public partial class V1EndUserDialogsQueriesGet_Dialog - { - /// - /// An immutable list of activities associated with the dialog. - /// - - [JsonPropertyName("activities")] - public ICollection Activities { get; set; } - - /// - /// The API actions associated with the dialog. Should be used in specialized, non-browser-based integrations. - /// - - [JsonPropertyName("apiActions")] - public ICollection ApiActions { get; set; } - - /// - /// The attachments associated with the dialog (on an aggregate level). - /// - - [JsonPropertyName("attachments")] - public ICollection Attachments { get; set; } - - /// - /// The dialog unstructured text content. - /// - - [JsonPropertyName("content")] - public V1EndUserDialogsQueriesGet_Content Content { get; set; } - - /// - /// The date and time when the dialog was created. - /// - - [JsonPropertyName("createdAt")] - public System.DateTimeOffset CreatedAt { get; set; } - - /// - /// The dialog token. May be used (if supported) against external URLs referred to in this dialog's apiActions, - ///
transmissions or attachments. It should also be used for front-channel embeds. - ///
- - [JsonPropertyName("dialogToken")] - public string DialogToken { get; set; } - - /// - /// The due date for the dialog. Dialogs past due date might be marked as such in frontends but will still be available. - /// - - [JsonPropertyName("dueAt")] - public System.DateTimeOffset? DueAt { get; set; } - - /// - /// The expiration date for the dialog. This is the last date when the dialog is available for the end user. - ///
- ///
After this date is passed, the dialog will be considered expired and no longer available for the end user in any - ///
API. If not supplied, the dialog will be considered to never expire. This field can be changed by the service - ///
owner after the dialog has been created. - ///
- - [JsonPropertyName("expiresAt")] - public System.DateTimeOffset? ExpiresAt { get; set; } - - /// - /// Arbitrary string with a service-specific indicator of status, typically used to indicate a fine-grained state of - ///
the dialog to further specify the "status" enum. - ///
- ///
Refer to the service-specific documentation provided by the service owner for details on the possible values (if - ///
in use). - ///
- - [JsonPropertyName("extendedStatus")] - public string ExtendedStatus { get; set; } - - /// - /// Arbitrary string with a service-specific reference to an external system or service. - ///
- ///
Refer to the service-specific documentation provided by the service owner for details (if in use). - ///
- - [JsonPropertyName("externalReference")] - public string ExternalReference { get; set; } - - /// - /// The GUI actions associated with the dialog. Should be used in browser-based interactive frontends. - /// - - [JsonPropertyName("guiActions")] - public ICollection GuiActions { get; set; } - - /// - /// The unique identifier for the dialog in UUIDv7 format. - /// - - [JsonPropertyName("id")] - public System.Guid Id { get; set; } - - /// - /// The service owner code representing the organization (service owner) related to this dialog. - /// - - [JsonPropertyName("org")] - public string Org { get; set; } - - /// - /// The party code representing the organization or person that the dialog belongs to in URN format. - /// - - [JsonPropertyName("party")] - public string Party { get; set; } - - /// - /// Optional preceding process identifier to indicate the business process that preceded the process indicated in the "Process" field. Cannot be set without also "Process" being set. - /// - - [JsonPropertyName("precedingProcess")] - public string PrecedingProcess { get; set; } - - /// - /// Optional process identifier used to indicate a business process this dialog belongs to. - /// - - [JsonPropertyName("process")] - public string Process { get; set; } - - /// - /// Advisory indicator of progress, represented as 1-100 percentage value. 100% representing a dialog that has come - ///
to a natural completion (successful or not). - ///
- - [JsonPropertyName("progress")] - public int? Progress { get; set; } - - /// - /// The unique identifier for the revision in UUIDv4 format. - /// - - [JsonPropertyName("revision")] - public System.Guid Revision { get; set; } - - /// - /// The list of seen log entries for the dialog newer than the dialog ChangedAt date. - /// - - [JsonPropertyName("seenSinceLastUpdate")] - public ICollection SeenSinceLastUpdate { get; set; } - - /// - /// The service identifier for the service that the dialog is related to in URN-format. - ///
This corresponds to a service resource in the Altinn Resource Registry. - ///
- - [JsonPropertyName("serviceResource")] - public string ServiceResource { get; set; } - - /// - /// The ServiceResource type, as defined in Altinn Resource Registry (see ResourceType). - /// - - [JsonPropertyName("serviceResourceType")] - public string ServiceResourceType { get; set; } - - /// - /// The aggregated status of the dialog. - /// - - [JsonPropertyName("status")] - [JsonConverter(typeof(JsonStringEnumConverter))] - public DialogsEntities_DialogStatus Status { get; set; } - - /// - /// Current display state. - /// - - [JsonPropertyName("systemLabel")] - [JsonConverter(typeof(JsonStringEnumConverter))] - public DialogEndUserContextsEntities_SystemLabel SystemLabel { get; set; } - - /// - /// The immutable list of transmissions associated with the dialog. - /// - - [JsonPropertyName("transmissions")] - public ICollection Transmissions { get; set; } - - /// - /// The date and time when the dialog was last updated. - /// - - [JsonPropertyName("updatedAt")] - public System.DateTimeOffset UpdatedAt { get; set; } - - } - - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "14.2.0.0 (NJsonSchema v11.1.0.0 (Newtonsoft.Json v13.0.0.0))")] - public partial class V1EndUserDialogsQueriesGet_DialogActivity - { - /// - /// The date and time when the activity was created. - /// - - [JsonPropertyName("createdAt")] - public System.DateTimeOffset? CreatedAt { get; set; } - - /// - /// Unstructured text describing the activity. Only set if the activity type is "Information". - /// - - [JsonPropertyName("description")] - public ICollection Description { get; set; } - - /// - /// An arbitrary URI/URN with a service-specific activity type. - ///
- ///
Consult the service-specific documentation provided by the service owner for details (if in use). - ///
- - [JsonPropertyName("extendedType")] - public System.Uri ExtendedType { get; set; } - - /// - /// The unique identifier for the activity in UUIDv7 format. - /// - - [JsonPropertyName("id")] - public System.Guid Id { get; set; } - - /// - /// The actor that performed the activity. - /// - - [JsonPropertyName("performedBy")] - public V1EndUserCommonActors_Actor PerformedBy { get; set; } - - /// - /// If the activity is related to a particular transmission, this field will contain the transmission identifier. - /// - - [JsonPropertyName("transmissionId")] - public System.Guid? TransmissionId { get; set; } - - /// - /// The type of activity. - /// - - [JsonPropertyName("type")] - [JsonConverter(typeof(JsonStringEnumConverter))] - public DialogsEntitiesActivities_DialogActivityType Type { get; set; } - - } - - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "14.2.0.0 (NJsonSchema v11.1.0.0 (Newtonsoft.Json v13.0.0.0))")] - public partial class V1EndUserDialogsQueriesGet_DialogApiAction - { - /// - /// String identifier for the action, corresponding to the "action" attributeId used in the XACML service policy, - ///
which by default is the policy belonging to the service referred to by "serviceResource" in the dialog. - ///
- - [JsonPropertyName("action")] - public string Action { get; set; } - - /// - /// Contains an authorization resource attributeId, that can used in custom authorization rules in the XACML service - ///
policy, which by default is the policy belonging to the service referred to by "serviceResource" in the dialog. - ///
- ///
Can also be used to refer to other service policies. - ///
- - [JsonPropertyName("authorizationAttribute")] - public string AuthorizationAttribute { get; set; } - - /// - /// The endpoints associated with the action. - /// - - [JsonPropertyName("endpoints")] - public ICollection Endpoints { get; set; } - - /// - /// The unique identifier for the action in UUIDv7 format. - /// - - [JsonPropertyName("id")] - public System.Guid Id { get; set; } - - /// - /// True if the authenticated user is authorized for this action. If not, the action will not be available - ///
and all endpoints will be replaced with a fixed placeholder. - ///
- - [JsonPropertyName("isAuthorized")] - public bool IsAuthorized { get; set; } - - } - - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "14.2.0.0 (NJsonSchema v11.1.0.0 (Newtonsoft.Json v13.0.0.0))")] - public partial class V1EndUserDialogsQueriesGet_DialogApiActionEndpoint - { - /// - /// Boolean indicating if the endpoint is deprecated. Integrators should migrate to endpoints with a higher version. - /// - - [JsonPropertyName("deprecated")] - public bool Deprecated { get; set; } - - /// - /// Link to service provider documentation for the endpoint. Used for service owners to provide documentation for - ///
integrators. Should be a URL to a human-readable page. - ///
- - [JsonPropertyName("documentationUrl")] - public System.Uri DocumentationUrl { get; set; } - - /// - /// The HTTP method that the endpoint expects for this action. - /// - - [JsonPropertyName("httpMethod")] - [JsonConverter(typeof(JsonStringEnumConverter))] - public Http_HttpVerb HttpMethod { get; set; } - - /// - /// The unique identifier for the endpoint in UUIDv7 format. - /// - - [JsonPropertyName("id")] - public System.Guid Id { get; set; } - - /// - /// Link to the request schema for the endpoint. Used by service owners to provide documentation for integrators. - ///
Dialogporten will not validate information on this endpoint. - ///
- - [JsonPropertyName("requestSchema")] - public System.Uri RequestSchema { get; set; } - - /// - /// Link to the response schema for the endpoint. Used for service owners to provide documentation for integrators. - ///
Dialogporten will not validate information on this endpoint. - ///
- - [JsonPropertyName("responseSchema")] - public System.Uri ResponseSchema { get; set; } - - /// - /// Date and time when the service owner has indicated that endpoint will no longer function. Only set if the endpoint - ///
is deprecated. Dialogporten will not enforce this date. - ///
- - [JsonPropertyName("sunsetAt")] - public System.DateTimeOffset? SunsetAt { get; set; } - - /// - /// The fully qualified URL of the API endpoint. Will be set to "urn:dialogporten:unauthorized" if the user is - ///
not authorized to perform the action. - ///
- - [JsonPropertyName("url")] - public System.Uri Url { get; set; } - - /// - /// Arbitrary string indicating the version of the endpoint. - ///
- ///
Consult the service-specific documentation provided by the service owner for details (if in use). - ///
- - [JsonPropertyName("version")] - public string Version { get; set; } - - } - - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "14.2.0.0 (NJsonSchema v11.1.0.0 (Newtonsoft.Json v13.0.0.0))")] - public partial class V1EndUserDialogsQueriesGet_DialogAttachment - { - /// - /// The display name of the attachment that should be used in GUIs. - /// - - [JsonPropertyName("displayName")] - public ICollection DisplayName { get; set; } - - /// - /// The unique identifier for the attachment in UUIDv7 format. - /// - - [JsonPropertyName("id")] - public System.Guid Id { get; set; } - - /// - /// The URLs associated with the attachment, each referring to a different representation of the attachment. - /// - - [JsonPropertyName("urls")] - public ICollection Urls { get; set; } - - } - - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "14.2.0.0 (NJsonSchema v11.1.0.0 (Newtonsoft.Json v13.0.0.0))")] - public partial class V1EndUserDialogsQueriesGet_DialogAttachmentUrl - { - /// - /// What type of consumer the URL is intended for. - /// - - [JsonPropertyName("consumerType")] - [JsonConverter(typeof(JsonStringEnumConverter))] - public Attachments_AttachmentUrlConsumerType ConsumerType { get; set; } - - /// - /// The unique identifier for the attachment URL in UUIDv7 format. - /// - - [JsonPropertyName("id")] - public System.Guid Id { get; set; } - - /// - /// The media type of the attachment. - /// - - [JsonPropertyName("mediaType")] - public string MediaType { get; set; } - - /// - /// The fully qualified URL of the attachment. - /// - - [JsonPropertyName("url")] - public System.Uri Url { get; set; } - - } - - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "14.2.0.0 (NJsonSchema v11.1.0.0 (Newtonsoft.Json v13.0.0.0))")] - public partial class V1EndUserDialogsQueriesGet_DialogGuiAction - { - /// - /// The action identifier for the action, corresponding to the "action" attributeId used in the XACML service policy. - /// - - [JsonPropertyName("action")] - public string Action { get; set; } - - /// - /// Contains an authorization resource attributeId, that can used in custom authorization rules in the XACML service - ///
policy, which by default is the policy belonging to the service referred to by "serviceResource" in the dialog. - ///
- ///
Can also be used to refer to other service policies. - ///
- - [JsonPropertyName("authorizationAttribute")] - public string AuthorizationAttribute { get; set; } - - /// - /// The HTTP method that the frontend should use when redirecting the user. - /// - - [JsonPropertyName("httpMethod")] - [JsonConverter(typeof(JsonStringEnumConverter))] - public Http_HttpVerb HttpMethod { get; set; } - - /// - /// The unique identifier for the action in UUIDv7 format. - /// - - [JsonPropertyName("id")] - public System.Guid Id { get; set; } - - /// - /// Whether the user is authorized to perform the action. - /// - - [JsonPropertyName("isAuthorized")] - public bool IsAuthorized { get; set; } - - /// - /// Indicates whether the action results in the dialog being deleted. Used by frontends to implement custom UX - ///
for delete actions. - ///
- - [JsonPropertyName("isDeleteDialogAction")] - public bool IsDeleteDialogAction { get; set; } - - /// - /// Indicates a priority for the action, making it possible for frontends to adapt GUI elements based on action - ///
priority. - ///
- - [JsonPropertyName("priority")] - [JsonConverter(typeof(JsonStringEnumConverter))] - public DialogsEntitiesActions_DialogGuiActionPriority Priority { get; set; } - - /// - /// If there should be a prompt asking the user for confirmation before the action is executed, - ///
this field should contain the prompt text. - ///
- - [JsonPropertyName("prompt")] - public ICollection Prompt { get; set; } - - /// - /// The title of the action, this should be short and in verb form. - /// - - [JsonPropertyName("title")] - public ICollection Title { get; set; } - - /// - /// The fully qualified URL of the action, to which the user will be redirected when the action is triggered. Will be set to - ///
"urn:dialogporten:unauthorized" if the user is not authorized to perform the action. - ///
- - [JsonPropertyName("url")] - public System.Uri Url { get; set; } - - } - - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "14.2.0.0 (NJsonSchema v11.1.0.0 (Newtonsoft.Json v13.0.0.0))")] - public partial class V1EndUserDialogsQueriesGet_DialogSeenLog - { - /// - /// The unique identifier for the seen log entry in UUIDv7 format. - /// - - [JsonPropertyName("id")] - public System.Guid Id { get; set; } - - /// - /// Flag indicating whether the seen log entry was created by the current end user. - /// - - [JsonPropertyName("isCurrentEndUser")] - public bool IsCurrentEndUser { get; set; } - - /// - /// Flag indicating whether the seen log entry was created via the service owner. - ///
- ///
This is used when the service owner uses the service owner API to implement its own frontend. - ///
- - [JsonPropertyName("isViaServiceOwner")] - public bool? IsViaServiceOwner { get; set; } - - /// - /// The timestamp when the dialog revision was seen. - /// - - [JsonPropertyName("seenAt")] - public System.DateTimeOffset SeenAt { get; set; } - - /// - /// The actor that saw the dialog revision. - /// - - [JsonPropertyName("seenBy")] - public V1EndUserCommonActors_Actor SeenBy { get; set; } - - } - - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "14.2.0.0 (NJsonSchema v11.1.0.0 (Newtonsoft.Json v13.0.0.0))")] - public partial class V1EndUserDialogsQueriesGet_DialogTransmission - { - /// - /// The transmission-level attachments. - /// - - [JsonPropertyName("attachments")] - public ICollection Attachments { get; set; } - - /// - /// Contains an authorization resource attributeId, that can used in custom authorization rules in the XACML service - ///
policy, which by default is the policy belonging to the service referred to by "serviceResource" in the dialog. - ///
- ///
Can also be used to refer to other service policies. - ///
- - [JsonPropertyName("authorizationAttribute")] - public string AuthorizationAttribute { get; set; } - - /// - /// The transmission unstructured text content. - /// - - [JsonPropertyName("content")] - public V1EndUserDialogsQueriesGet_DialogTransmissionContent Content { get; set; } - - /// - /// The date and time when the transmission was created. - /// - - [JsonPropertyName("createdAt")] - public System.DateTimeOffset CreatedAt { get; set; } - - /// - /// Arbitrary URI/URN describing a service-specific transmission type. - ///
- ///
Refer to the service-specific documentation provided by the service owner for details (if in use). - ///
- - [JsonPropertyName("extendedType")] - public System.Uri ExtendedType { get; set; } - - /// - /// The unique identifier for the transmission in UUIDv7 format. - /// - - [JsonPropertyName("id")] - public System.Guid Id { get; set; } - - /// - /// Flag indicating if the authenticated user is authorized for this transmission. If not, embedded content and - ///
the attachments will not be available. - ///
- - [JsonPropertyName("isAuthorized")] - public bool IsAuthorized { get; set; } - - /// - /// Reference to any other transmission that this transmission is related to. - /// - - [JsonPropertyName("relatedTransmissionId")] - public System.Guid? RelatedTransmissionId { get; set; } - - /// - /// The actor that sent the transmission. - /// - - [JsonPropertyName("sender")] - public V1EndUserCommonActors_Actor Sender { get; set; } - - /// - /// The type of transmission. - /// - - [JsonPropertyName("type")] - [JsonConverter(typeof(JsonStringEnumConverter))] - public DialogsEntitiesTransmissions_DialogTransmissionType Type { get; set; } - - } - - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "14.2.0.0 (NJsonSchema v11.1.0.0 (Newtonsoft.Json v13.0.0.0))")] - public partial class V1EndUserDialogsQueriesGet_DialogTransmissionAttachment - { - /// - /// The display name of the attachment that should be used in GUIs. - /// - - [JsonPropertyName("displayName")] - public ICollection DisplayName { get; set; } - - /// - /// The unique identifier for the attachment in UUIDv7 format. - /// - - [JsonPropertyName("id")] - public System.Guid Id { get; set; } - - /// - /// The URLs associated with the attachment, each referring to a different representation of the attachment. - /// - - [JsonPropertyName("urls")] - public ICollection Urls { get; set; } - - } - - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "14.2.0.0 (NJsonSchema v11.1.0.0 (Newtonsoft.Json v13.0.0.0))")] - public partial class V1EndUserDialogsQueriesGet_DialogTransmissionAttachmentUrl - { - /// - /// The type of consumer the URL is intended for. - /// - - [JsonPropertyName("consumerType")] - [JsonConverter(typeof(JsonStringEnumConverter))] - public Attachments_AttachmentUrlConsumerType ConsumerType { get; set; } - - /// - /// The media type of the attachment. - /// - - [JsonPropertyName("mediaType")] - public string MediaType { get; set; } - - /// - /// The fully qualified URL of the attachment. Will be set to "urn:dialogporten:unauthorized" if the user is - ///
not authorized to access the transmission. - ///
- - [JsonPropertyName("url")] - public System.Uri Url { get; set; } - - } - - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "14.2.0.0 (NJsonSchema v11.1.0.0 (Newtonsoft.Json v13.0.0.0))")] - public partial class V1EndUserDialogsQueriesGet_DialogTransmissionContent - { - /// - /// Front-channel embedded content. Used to dynamically embed content in the frontend from an external URL. - ///
Allowed media types: application/vnd.dialogporten.frontchannelembed+json;type=markdown - ///
- - [JsonPropertyName("contentReference")] - public V1CommonContent_ContentValue ContentReference { get; set; } - - /// - /// The transmission summary. - /// - - [JsonPropertyName("summary")] - public V1CommonContent_ContentValue Summary { get; set; } - - /// - /// The transmission title. - /// - - [JsonPropertyName("title")] - public V1CommonContent_ContentValue Title { get; set; } - - } - - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "14.2.0.0 (NJsonSchema v11.1.0.0 (Newtonsoft.Json v13.0.0.0))")] - public partial class V1EndUserDialogsQueriesSearch_Content - { - /// - /// Used as the human-readable label used to describe the "ExtendedStatus" field. - /// - - [JsonPropertyName("extendedStatus")] - public V1CommonContent_ContentValue ExtendedStatus { get; set; } - - /// - /// Overridden sender name. If not supplied, assume "org" as the sender name. - /// - - [JsonPropertyName("senderName")] - public V1CommonContent_ContentValue SenderName { get; set; } - - /// - /// A short summary of the dialog and its current state. - /// - - [JsonPropertyName("summary")] - public V1CommonContent_ContentValue Summary { get; set; } - - /// - /// The title of the dialog. - /// - - [JsonPropertyName("title")] - public V1CommonContent_ContentValue Title { get; set; } - - } - - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "14.2.0.0 (NJsonSchema v11.1.0.0 (Newtonsoft.Json v13.0.0.0))")] - public partial class V1EndUserDialogsQueriesSearch_Dialog - { - /// - /// The content of the dialog in search results. - /// - - [JsonPropertyName("content")] - public V1EndUserDialogsQueriesSearch_Content Content { get; set; } - - /// - /// The date and time when the dialog was created. - /// - - [JsonPropertyName("createdAt")] - public System.DateTimeOffset CreatedAt { get; set; } - - /// - /// The due date for the dialog. This is the last date when the dialog is expected to be completed. - /// - - [JsonPropertyName("dueAt")] - public System.DateTimeOffset? DueAt { get; set; } - - /// - /// Arbitrary string with a service-specific indicator of status, typically used to indicate a fine-grained state of - ///
the dialog to further specify the "status" enum. - ///
- ///
Refer to the service-specific documentation provided by the service owner for details on the possible values (if - ///
in use). - ///
- - [JsonPropertyName("extendedStatus")] - public string ExtendedStatus { get; set; } - - /// - /// Arbitrary string with a service-specific reference to an external system or service. - ///
- ///
Refer to the service-specific documentation provided by the service owner for details (if in use). - ///
- - [JsonPropertyName("externalReference")] - public string ExternalReference { get; set; } - - /// - /// The number of attachments in the dialog made available for browser-based frontends. - /// - - [JsonPropertyName("guiAttachmentCount")] - public int? GuiAttachmentCount { get; set; } - - /// - /// The unique identifier for the dialog in UUIDv7 format. - /// - - [JsonPropertyName("id")] - public System.Guid Id { get; set; } - - /// - /// The latest entry in the dialog's activity log. - /// - - [JsonPropertyName("latestActivity")] - public V1EndUserDialogsQueriesSearch_DialogActivity LatestActivity { get; set; } - - /// - /// The service owner code representing the organization (service owner) related to this dialog. - /// - - [JsonPropertyName("org")] - public string Org { get; set; } - - /// - /// The party code representing the organization or person that the dialog belongs to in URN format. - /// - - [JsonPropertyName("party")] - public string Party { get; set; } - - /// - /// Optional preceding process identifier to indicate the business process that preceded the process indicated in the "Process" field. Cannot be set without also "Process" being set. - /// - - [JsonPropertyName("precedingProcess")] - public string PrecedingProcess { get; set; } - - /// - /// Optional process identifier used to indicate a business process this dialog belongs to. - /// - - [JsonPropertyName("process")] - public string Process { get; set; } - - /// - /// Advisory indicator of progress, represented as 1-100 percentage value. 100% representing a dialog that has come - ///
to a natural completion (successful or not). - ///
- - [JsonPropertyName("progress")] - public int? Progress { get; set; } - - /// - /// The list of seen log entries for the dialog newer than the dialog ChangedAt date. - /// - - [JsonPropertyName("seenSinceLastUpdate")] - public ICollection SeenSinceLastUpdate { get; set; } - - /// - /// The service identifier for the service that the dialog is related to in URN-format. - ///
This corresponds to a service resource in the Altinn Resource Registry. - ///
- - [JsonPropertyName("serviceResource")] - public string ServiceResource { get; set; } - - /// - /// The ServiceResource type, as defined in Altinn Resource Registry (see ResourceType). - /// - - [JsonPropertyName("serviceResourceType")] - public string ServiceResourceType { get; set; } - - /// - /// The aggregated status of the dialog. - /// - - [JsonPropertyName("status")] - [JsonConverter(typeof(JsonStringEnumConverter))] - public DialogsEntities_DialogStatus Status { get; set; } - - /// - /// Current display state. - /// - - [JsonPropertyName("systemLabel")] - [JsonConverter(typeof(JsonStringEnumConverter))] - public DialogEndUserContextsEntities_SystemLabel SystemLabel { get; set; } - - /// - /// The date and time when the dialog was last updated. - /// - - [JsonPropertyName("updatedAt")] - public System.DateTimeOffset UpdatedAt { get; set; } - - } - - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "14.2.0.0 (NJsonSchema v11.1.0.0 (Newtonsoft.Json v13.0.0.0))")] - public partial class V1EndUserDialogsQueriesSearch_DialogActivity - { - /// - /// The date and time when the activity was created. - /// - - [JsonPropertyName("createdAt")] - public System.DateTimeOffset? CreatedAt { get; set; } - - /// - /// Unstructured text describing the activity. Only set if the activity type is "Information". - /// - - [JsonPropertyName("description")] - public ICollection Description { get; set; } - - /// - /// An arbitrary string with a service-specific activity type. - ///
- ///
Consult the service-specific documentation provided by the service owner for details (if in use). - ///
- - [JsonPropertyName("extendedType")] - public System.Uri ExtendedType { get; set; } - - /// - /// The unique identifier for the activity in UUIDv7 format. - /// - - [JsonPropertyName("id")] - public System.Guid Id { get; set; } - - /// - /// The actor that performed the activity. - /// - - [JsonPropertyName("performedBy")] - public V1EndUserCommonActors_Actor PerformedBy { get; set; } - - /// - /// If the activity is related to a particular transmission, this field will contain the transmission identifier. - /// - - [JsonPropertyName("transmissionId")] - public System.Guid? TransmissionId { get; set; } - - /// - /// The type of activity. - /// - - [JsonPropertyName("type")] - [JsonConverter(typeof(JsonStringEnumConverter))] - public DialogsEntitiesActivities_DialogActivityType Type { get; set; } - - } - - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "14.2.0.0 (NJsonSchema v11.1.0.0 (Newtonsoft.Json v13.0.0.0))")] - public partial class V1EndUserDialogsQueriesSearch_DialogSeenLog - { - /// - /// The unique identifier for the seen log entry in UUIDv7 format. - /// - - [JsonPropertyName("id")] - public System.Guid Id { get; set; } - - /// - /// Flag indicating whether the seen log entry was created by the current end user. - /// - - [JsonPropertyName("isCurrentEndUser")] - public bool IsCurrentEndUser { get; set; } - - /// - /// Flag indicating whether the seen log entry was created via the service owner. - ///
- ///
This is used when the service owner uses the service owner API to implement its own frontend. - ///
- - [JsonPropertyName("isViaServiceOwner")] - public bool? IsViaServiceOwner { get; set; } - - /// - /// The timestamp when the dialog revision was seen. - /// - - [JsonPropertyName("seenAt")] - public System.DateTimeOffset SeenAt { get; set; } - - /// - /// The actor that saw the dialog revision. - /// - - [JsonPropertyName("seenBy")] - public V1EndUserCommonActors_Actor SeenBy { get; set; } - - } - - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "14.2.0.0 (NJsonSchema v11.1.0.0 (Newtonsoft.Json v13.0.0.0))")] - public partial class V1EndUserDialogSystemLabelsCommandsSet_SystemLabelCommand - { - - [JsonPropertyName("ifMatchDialogRevision")] - public System.Guid? IfMatchDialogRevision { get; set; } - - [JsonPropertyName("label")] - [JsonConverter(typeof(JsonStringEnumConverter))] - public DialogEndUserContextsEntities_SystemLabel Label { get; set; } - - } - - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "14.2.0.0 (NJsonSchema v11.1.0.0 (Newtonsoft.Json v13.0.0.0))")] - public partial class V1EndUserDialogTransmissionsQueriesGet_Attachment - { - /// - /// The display name of the attachment that should be used in GUIs. - /// - - [JsonPropertyName("displayName")] - public ICollection DisplayName { get; set; } - - /// - /// The unique identifier for the attachment in UUIDv7 format. - /// - - [JsonPropertyName("id")] - public System.Guid Id { get; set; } - - /// - /// The URLs associated with the attachment, each referring to a different representation of the attachment. - /// - - [JsonPropertyName("urls")] - public ICollection Urls { get; set; } - - } - - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "14.2.0.0 (NJsonSchema v11.1.0.0 (Newtonsoft.Json v13.0.0.0))")] - public partial class V1EndUserDialogTransmissionsQueriesGet_AttachmentUrl - { - /// - /// The type of consumer the URL is intended for. - /// - - [JsonPropertyName("consumerType")] - [JsonConverter(typeof(JsonStringEnumConverter))] - public Attachments_AttachmentUrlConsumerType ConsumerType { get; set; } - - /// - /// The unique identifier for the attachment URL in UUIDv7 format. - /// - - [JsonPropertyName("id")] - public System.Guid Id { get; set; } - - /// - /// The media type of the attachment. - /// - - [JsonPropertyName("mediaType")] - public string MediaType { get; set; } - - /// - /// The fully qualified URL of the attachment. Will be set to "urn:dialogporten:unauthorized" if the user is - ///
not authorized to access the transmission. - ///
- - [JsonPropertyName("url")] - public System.Uri Url { get; set; } - - } - - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "14.2.0.0 (NJsonSchema v11.1.0.0 (Newtonsoft.Json v13.0.0.0))")] - public partial class V1EndUserDialogTransmissionsQueriesGet_Content - { - /// - /// Front-channel embedded content. Used to dynamically embed content in the frontend from an external URL. - ///
Allowed media types: application/vnd.dialogporten.frontchannelembed+json;type=markdown - ///
- - [JsonPropertyName("contentReference")] - public V1CommonContent_ContentValue ContentReference { get; set; } - - /// - /// The summary of the content. - /// - - [JsonPropertyName("summary")] - public V1CommonContent_ContentValue Summary { get; set; } - - /// - /// The title of the content. - /// - - [JsonPropertyName("title")] - public V1CommonContent_ContentValue Title { get; set; } - - } - - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "14.2.0.0 (NJsonSchema v11.1.0.0 (Newtonsoft.Json v13.0.0.0))")] - public partial class V1EndUserDialogTransmissionsQueriesGet_Transmission - { - /// - /// The attachments associated with the transmission. - /// - - [JsonPropertyName("attachments")] - public ICollection Attachments { get; set; } - - /// - /// The authorization attribute associated with the transmission. - /// - - [JsonPropertyName("authorizationAttribute")] - public string AuthorizationAttribute { get; set; } - - /// - /// The content of the transmission. - /// - - [JsonPropertyName("content")] - public V1EndUserDialogTransmissionsQueriesGet_Content Content { get; set; } - - /// - /// The date and time when the transmission was created. - /// - - [JsonPropertyName("createdAt")] - public System.DateTimeOffset CreatedAt { get; set; } - - /// - /// The date and time when the transmission was deleted, if applicable. - /// - - [JsonPropertyName("deletedAt")] - public System.DateTimeOffset? DeletedAt { get; set; } - - /// - /// The extended type URI for the transmission. - /// - - [JsonPropertyName("extendedType")] - public System.Uri ExtendedType { get; set; } - - /// - /// The unique identifier for the transmission in UUIDv7 format. - /// - - [JsonPropertyName("id")] - public System.Guid Id { get; set; } - + public partial class PaginatedListOfV1ServiceOwnerDialogsQueriesSearch_Dialog + { /// - /// Flag indicating if the authenticated user is authorized for this transmission. If not, embedded content and - ///
the attachments will not be available. + /// The continuation token to be used to fetch the next page of items ///
- [JsonPropertyName("isAuthorized")] - public bool IsAuthorized { get; set; } + [JsonPropertyName("continuationToken")] + public string ContinuationToken { get; set; } /// - /// The unique identifier for the related transmission, if any. + /// Whether there are more items available that can be fetched by supplying the continuation token /// - [JsonPropertyName("relatedTransmissionId")] - public System.Guid? RelatedTransmissionId { get; set; } + [JsonPropertyName("hasNextPage")] + public bool HasNextPage { get; set; } /// - /// The sender actor information for the transmission. + /// The paginated list of items /// - [JsonPropertyName("sender")] - public V1EndUserCommonActors_Actor Sender { get; set; } + [JsonPropertyName("items")] + public ICollection Items { get; set; } /// - /// The type of the transmission. + /// The current sorting order of the items /// - [JsonPropertyName("type")] - [JsonConverter(typeof(JsonStringEnumConverter))] - public DialogsEntitiesTransmissions_DialogTransmissionType Type { get; set; } + [JsonPropertyName("orderBy")] + public string OrderBy { get; set; } } [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "14.2.0.0 (NJsonSchema v11.1.0.0 (Newtonsoft.Json v13.0.0.0))")] - public partial class V1EndUserDialogTransmissionsQueriesSearch_Attachment + public partial class ProblemDetails { - /// - /// The display name of the attachment that should be used in GUIs. - /// - [JsonPropertyName("displayName")] - public ICollection DisplayName { get; set; } + [JsonPropertyName("detail")] + public string Detail { get; set; } - /// - /// The unique identifier for the attachment in UUIDv7 format. - /// + [JsonPropertyName("errors")] + public ICollection Errors { get; set; } - [JsonPropertyName("id")] - public System.Guid Id { get; set; } + [JsonPropertyName("instance")] + public string Instance { get; set; } = "/api/route"; - /// - /// The URLs associated with the attachment, each referring to a different representation of the attachment. - /// + [JsonPropertyName("status")] + public int Status { get; set; } = 400; - [JsonPropertyName("urls")] - public ICollection Urls { get; set; } + [JsonPropertyName("title")] + public string Title { get; set; } = "One or more validation errors occurred."; + + [JsonPropertyName("traceId")] + public string TraceId { get; set; } = "0HMPNHL0JHL76:00000001"; + + [JsonPropertyName("type")] + public string Type { get; set; } = "https://www.rfc-editor.org/rfc/rfc7231#section-6.5.1"; } [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "14.2.0.0 (NJsonSchema v11.1.0.0 (Newtonsoft.Json v13.0.0.0))")] - public partial class V1EndUserDialogTransmissionsQueriesSearch_AttachmentUrl + public partial class ProblemDetails_Error { - /// - /// The type of consumer the URL is intended for. - /// - - [JsonPropertyName("consumerType")] - [JsonConverter(typeof(JsonStringEnumConverter))] - public Attachments_AttachmentUrlConsumerType ConsumerType { get; set; } - - /// - /// The unique identifier for the attachment URL in UUIDv7 format. - /// - - [JsonPropertyName("id")] - public System.Guid Id { get; set; } - /// - /// The media type of the attachment. - /// + [JsonPropertyName("code")] + public string Code { get; set; } - [JsonPropertyName("mediaType")] - public string MediaType { get; set; } + [JsonPropertyName("name")] + public string Name { get; set; } = "Error or field name"; - /// - /// The fully qualified URL of the attachment. Will be set to "urn:dialogporten:unauthorized" if the user is - ///
not authorized to access the transmission. - ///
+ [JsonPropertyName("reason")] + public string Reason { get; set; } = "Error reason"; - [JsonPropertyName("url")] - public System.Uri Url { get; set; } + [JsonPropertyName("severity")] + public string Severity { get; set; } } [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "14.2.0.0 (NJsonSchema v11.1.0.0 (Newtonsoft.Json v13.0.0.0))")] - public partial class V1EndUserDialogTransmissionsQueriesSearch_Content + public partial class V1CommonContent_ContentValue { /// - /// Front-channel embedded content. Used to dynamically embed content in the frontend from an external URL. - ///
Allowed media types: application/vnd.dialogporten.frontchannelembed+json;type=markdown - ///
- - [JsonPropertyName("contentReference")] - public V1CommonContent_ContentValue ContentReference { get; set; } - - /// - /// The summary of the content. + /// Media type of the content (plaintext, Markdown). Can also indicate that the content is embeddable. /// - [JsonPropertyName("summary")] - public V1CommonContent_ContentValue Summary { get; set; } + [JsonPropertyName("mediaType")] + public string MediaType { get; set; } /// - /// The title of the content. + /// A list of localizations for the content. /// - [JsonPropertyName("title")] - public V1CommonContent_ContentValue Title { get; set; } + [JsonPropertyName("value")] + public ICollection Value { get; set; } } [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "14.2.0.0 (NJsonSchema v11.1.0.0 (Newtonsoft.Json v13.0.0.0))")] - public partial class V1EndUserDialogTransmissionsQueriesSearch_Transmission + public partial class V1CommonLocalizations_Localization { /// - /// The attachments associated with the transmission. - /// - - [JsonPropertyName("attachments")] - public ICollection Attachments { get; set; } - - /// - /// The authorization attribute associated with the transmission. - /// - - [JsonPropertyName("authorizationAttribute")] - public string AuthorizationAttribute { get; set; } - - /// - /// The content of the transmission. - /// - - [JsonPropertyName("content")] - public V1EndUserDialogTransmissionsQueriesSearch_Content Content { get; set; } - - /// - /// The date and time when the transmission was created. - /// - - [JsonPropertyName("createdAt")] - public System.DateTimeOffset CreatedAt { get; set; } - - /// - /// The date and time when the transmission was deleted, if applicable. - /// - - [JsonPropertyName("deletedAt")] - public System.DateTimeOffset? DeletedAt { get; set; } - - /// - /// The extended type URI for the transmission. - /// - - [JsonPropertyName("extendedType")] - public System.Uri ExtendedType { get; set; } - - /// - /// The unique identifier for the transmission in UUIDv7 format. - /// - - [JsonPropertyName("id")] - public System.Guid Id { get; set; } - - /// - /// Flag indicating if the authenticated user is authorized for this transmission. If not, embedded content and - ///
the attachments will not be available. - ///
- - [JsonPropertyName("isAuthorized")] - public bool IsAuthorized { get; set; } - - /// - /// The unique identifier for the related transmission, if any. - /// - - [JsonPropertyName("relatedTransmissionId")] - public System.Guid? RelatedTransmissionId { get; set; } - - /// - /// The sender actor information for the transmission. + /// The language code of the localization in ISO 639-1 format. /// - [JsonPropertyName("sender")] - public V1EndUserCommonActors_Actor Sender { get; set; } + [JsonPropertyName("languageCode")] + public string LanguageCode { get; set; } /// - /// The type of the transmission. + /// The localized text or URI reference. /// - [JsonPropertyName("type")] - [JsonConverter(typeof(JsonStringEnumConverter))] - public DialogsEntitiesTransmissions_DialogTransmissionType Type { get; set; } - - } - - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "14.2.0.0 (NJsonSchema v11.1.0.0 (Newtonsoft.Json v13.0.0.0))")] - public partial class V1EndUserPartiesQueriesGet_AuthorizedParty - { - - [JsonPropertyName("hasKeyRole")] - public bool HasKeyRole { get; set; } - - [JsonPropertyName("hasOnlyAccessToSubParties")] - public bool HasOnlyAccessToSubParties { get; set; } - - [JsonPropertyName("isAccessManager")] - public bool IsAccessManager { get; set; } - - [JsonPropertyName("isCurrentEndUser")] - public bool IsCurrentEndUser { get; set; } - - [JsonPropertyName("isDeleted")] - public bool IsDeleted { get; set; } - - [JsonPropertyName("isMainAdministrator")] - public bool IsMainAdministrator { get; set; } - - [JsonPropertyName("name")] - public string Name { get; set; } - - [JsonPropertyName("party")] - public string Party { get; set; } - - [JsonPropertyName("partyType")] - public string PartyType { get; set; } - - [JsonPropertyName("subParties")] - public ICollection SubParties { get; set; } - - } - - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "14.2.0.0 (NJsonSchema v11.1.0.0 (Newtonsoft.Json v13.0.0.0))")] - public partial class V1EndUserPartiesQueriesGet_Parties - { - - [JsonPropertyName("authorizedParties")] - public ICollection AuthorizedParties { get; set; } + [JsonPropertyName("value")] + public string Value { get; set; } } @@ -5345,15 +3719,6 @@ public partial class V1ServiceOwnerDialogsQueriesSearch_DialogSeenLog } - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "14.2.0.0 (NJsonSchema v11.1.0.0 (Newtonsoft.Json v13.0.0.0))")] - public partial class V1ServiceOwnerDialogsUpdate_DialogRequest - { - - [JsonPropertyName("dto")] - public V1ServiceOwnerDialogsCommandsUpdate_Dialog Dto { get; set; } - - } - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "14.2.0.0 (NJsonSchema v11.1.0.0 (Newtonsoft.Json v13.0.0.0))")] public partial class V1ServiceOwnerDialogTransmissionsCreate_TransmissionRequest { @@ -5757,51 +4122,6 @@ public partial class V1ServiceOwnerDialogTransmissionsQueriesSearch_Transmission } - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "14.2.0.0 (NJsonSchema v11.1.0.0 (Newtonsoft.Json v13.0.0.0))")] - public partial class V1WellKnownJwksQueriesGet_GetJwks - { - - [JsonPropertyName("keys")] - public ICollection Keys { get; set; } - - } - - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "14.2.0.0 (NJsonSchema v11.1.0.0 (Newtonsoft.Json v13.0.0.0))")] - public partial class V1WellKnownJwksQueriesGet_Jwk - { - - [JsonPropertyName("alg")] - public string Alg { get; set; } - - [JsonPropertyName("crv")] - public string Crv { get; set; } - - [JsonPropertyName("kid")] - public string Kid { get; set; } - - [JsonPropertyName("kty")] - public string Kty { get; set; } - - [JsonPropertyName("use")] - public string Use { get; set; } - - [JsonPropertyName("x")] - public string X { get; set; } - - } - - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "14.2.0.0 (NJsonSchema v11.1.0.0 (Newtonsoft.Json v13.0.0.0))")] - public partial class V1WellKnownOauthAuthorizationServerQueriesGet_GetOauthAuthorizationServer - { - - [JsonPropertyName("issuer")] - public string Issuer { get; set; } - - [JsonPropertyName("jwks_uri")] - public string Jwks_uri { get; set; } - - } - } diff --git a/src/Digdir.Library.Dialogporten.WebApiClient/README.md b/src/Digdir.Library.Dialogporten.WebApiClient/README.md index cbcc177ad..3f30b3f4e 100644 --- a/src/Digdir.Library.Dialogporten.WebApiClient/README.md +++ b/src/Digdir.Library.Dialogporten.WebApiClient/README.md @@ -8,6 +8,8 @@ Install nuget ## Usage +This library provides extensions methods providing means to create dialogporten clients. + Setup ```C# @@ -28,25 +30,24 @@ AppSettings ```JSON { - "DialogportenSettings": { - "Environment": "", - "Maskinporten": { - "ClientId": "", - "Scope": "", - "EncodedJwk": "" - } + "DialogportenSettings": { + "Environment": "", + "Maskinporten": { + "ClientId": "", + "Scope": "", + "EncodedJwk": "" + } + }, + "Ed25519Keys": { + "Primary": { + "Kid": "", + "PublicComponent": "" }, - // Ed25519 keys for validating dialog tokens - "Ed25519Keys": { - "Primary": { - "Kid": "", - "PublicComponent": "" - }, - "Secondary": { - "Kid": "", - "PublicComponent": "" - } + "Secondary": { + "Kid": "", + "PublicComponent": "" } + } } ``` @@ -190,7 +191,15 @@ Console.WriteLine(patchResponse.IsSuccessStatusCode); Console.WriteLine(patchResponse.StatusCode); ``` -API REFERENCE/STRUCTURE +DialogToken verification +```C# +var verifier = serviceProvider.GetRequiredService(); +var token = ""; // Dialog token +Console.WriteLine(verifier.Verify(token)); +var dict = DialogTokenVerifier.GetDialogTokenClaims(token); +``` + +API REFERENCE/STRUCTURE Links to changelog etc. diff --git a/tests/Digdir.Library.Dialogporten.WebApiClient.Integration.Tests/.refitter b/tests/Digdir.Library.Dialogporten.WebApiClient.Integration.Tests/.refitter index d0319a8d5..d62842e26 100644 --- a/tests/Digdir.Library.Dialogporten.WebApiClient.Integration.Tests/.refitter +++ b/tests/Digdir.Library.Dialogporten.WebApiClient.Integration.Tests/.refitter @@ -3,6 +3,7 @@ "namespace": "Digdir.Library.Dialogporten.WebApiClient.Features.V1", "outputFolder": "refitter", "operationNameGenerator": "SingleClientFromOperationId", + "trimUnusedSchema": true, "multipleInterfaces": "ByTag", "includeTags": [ "Serviceowner" diff --git a/tests/Digdir.Library.Dialogporten.WebApiClient.Integration.Tests/RefitterInterfaceTests.cs b/tests/Digdir.Library.Dialogporten.WebApiClient.Integration.Tests/RefitterInterfaceTests.cs index 3a52bab53..1505278b9 100644 --- a/tests/Digdir.Library.Dialogporten.WebApiClient.Integration.Tests/RefitterInterfaceTests.cs +++ b/tests/Digdir.Library.Dialogporten.WebApiClient.Integration.Tests/RefitterInterfaceTests.cs @@ -6,41 +6,22 @@ public sealed class RefitterInterfaceTests [Fact] public async Task FailIfRefitterInterfaceDoesNotMatch() { - // Amund: prøv mæ mocka filesystem. det e litt for kult te å ikk prøve vartfall. - // ser ut som det er vrient å bruke verify sammen med mocka filesystem - // Constructor, dispose. Ser ut som å være en decent måte å takle cleanup på. Funker ikke når testen feiler så dør processen. - // Async dispose ikke lagt til enda. kommer i v3. som nå er i alpha/beta enda - // men AsyncLifetime er i V2. var rootPath = GetSolutionRootFolder(); var webApiClientPath = Path.Combine(rootPath!, "src/Digdir.Library.Dialogporten.WebApiClient/Features/V1"); var currentDirectory = Path.Combine(rootPath!, "tests/Digdir.Library.Dialogporten.WebApiClient.Integration.Tests"); var newRifitterPath = Path.Combine(currentDirectory, "refitter/RefitterInterface.cs"); var newRefitter = File.ReadAllText(newRifitterPath); - // Den feiler og viser diff samtidig. testene er av definisjon ferdig når diff vises. er det noe måte å unngå dette på? - // Den lager bare fil om den feiler. er det noe som kan skrus av? - // Om den feiler ved en diff så må den kjøres på nytt uansett. det e egt litt skuffed. men jaja. - // Træng i da egt å fjerne fila eller feil? - // treng da egt bære å fjerne om den finnes fra en gammel runde. altså slett før verify Assert.True(File.Exists(newRifitterPath)); await Verify(newRefitter, extension: "cs") .UseFileName("RefitterInterface") - .UseDirectory(webApiClientPath) - .OnVerify( - before: () => { }, - after: () => - { - // Funke ikkje! DEN FÆILE OG ÅPNE DIFF! - // var path = Path.Combine(webApiClientPath, "RefitterInterface.received.cs"); - // if (File.Exists(path)) - // { - // File.Delete(path); - // } - if (File.Exists(newRifitterPath)) - { - File.Delete(newRifitterPath); - } - Assert.False(File.Exists(newRifitterPath)); - }); + .UseDirectory(webApiClientPath); + + var path = Path.Combine(webApiClientPath, "RefitterInterface.received.cs"); + if (File.Exists(path)) + { + File.Delete(path); + } + Assert.False(File.Exists(path)); } private static string? GetSolutionRootFolder() { diff --git a/tests/Digdir.Library.Dialogporten.WebApiClient.Integration.Tests/refitter/RefitterInterface.cs b/tests/Digdir.Library.Dialogporten.WebApiClient.Integration.Tests/refitter/RefitterInterface.cs index 6868d316a..e265659b8 100644 --- a/tests/Digdir.Library.Dialogporten.WebApiClient.Integration.Tests/refitter/RefitterInterface.cs +++ b/tests/Digdir.Library.Dialogporten.WebApiClient.Integration.Tests/refitter/RefitterInterface.cs @@ -1027,1744 +1027,118 @@ public IDictionary AdditionalProperties } [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "14.2.0.0 (NJsonSchema v11.1.0.0 (Newtonsoft.Json v13.0.0.0))")] - public partial class PaginatedListOfV1EndUserDialogsQueriesSearch_Dialog - { - /// - /// The continuation token to be used to fetch the next page of items - /// - - [JsonPropertyName("continuationToken")] - public string ContinuationToken { get; set; } - - /// - /// Whether there are more items available that can be fetched by supplying the continuation token - /// - - [JsonPropertyName("hasNextPage")] - public bool HasNextPage { get; set; } - - /// - /// The paginated list of items - /// - - [JsonPropertyName("items")] - public ICollection Items { get; set; } - - /// - /// The current sorting order of the items - /// - - [JsonPropertyName("orderBy")] - public string OrderBy { get; set; } - - } - - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "14.2.0.0 (NJsonSchema v11.1.0.0 (Newtonsoft.Json v13.0.0.0))")] - public partial class PaginatedListOfV1ServiceOwnerDialogsQueriesSearch_Dialog - { - /// - /// The continuation token to be used to fetch the next page of items - /// - - [JsonPropertyName("continuationToken")] - public string ContinuationToken { get; set; } - - /// - /// Whether there are more items available that can be fetched by supplying the continuation token - /// - - [JsonPropertyName("hasNextPage")] - public bool HasNextPage { get; set; } - - /// - /// The paginated list of items - /// - - [JsonPropertyName("items")] - public ICollection Items { get; set; } - - /// - /// The current sorting order of the items - /// - - [JsonPropertyName("orderBy")] - public string OrderBy { get; set; } - - } - - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "14.2.0.0 (NJsonSchema v11.1.0.0 (Newtonsoft.Json v13.0.0.0))")] - public partial class ProblemDetails - { - - [JsonPropertyName("detail")] - public string Detail { get; set; } - - [JsonPropertyName("errors")] - public ICollection Errors { get; set; } - - [JsonPropertyName("instance")] - public string Instance { get; set; } = "/api/route"; - - [JsonPropertyName("status")] - public int Status { get; set; } = 400; - - [JsonPropertyName("title")] - public string Title { get; set; } = "One or more validation errors occurred."; - - [JsonPropertyName("traceId")] - public string TraceId { get; set; } = "0HMPNHL0JHL76:00000001"; - - [JsonPropertyName("type")] - public string Type { get; set; } = "https://www.rfc-editor.org/rfc/rfc7231#section-6.5.1"; - - } - - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "14.2.0.0 (NJsonSchema v11.1.0.0 (Newtonsoft.Json v13.0.0.0))")] - public partial class ProblemDetails_Error - { - - [JsonPropertyName("code")] - public string Code { get; set; } - - [JsonPropertyName("name")] - public string Name { get; set; } = "Error or field name"; - - [JsonPropertyName("reason")] - public string Reason { get; set; } = "Error reason"; - - [JsonPropertyName("severity")] - public string Severity { get; set; } - - } - - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "14.2.0.0 (NJsonSchema v11.1.0.0 (Newtonsoft.Json v13.0.0.0))")] - public partial class V1CommonContent_ContentValue - { - /// - /// Media type of the content (plaintext, Markdown). Can also indicate that the content is embeddable. - /// - - [JsonPropertyName("mediaType")] - public string MediaType { get; set; } - - /// - /// A list of localizations for the content. - /// - - [JsonPropertyName("value")] - public ICollection Value { get; set; } - - } - - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "14.2.0.0 (NJsonSchema v11.1.0.0 (Newtonsoft.Json v13.0.0.0))")] - public partial class V1CommonLocalizations_Localization - { - /// - /// The language code of the localization in ISO 639-1 format. - /// - - [JsonPropertyName("languageCode")] - public string LanguageCode { get; set; } - - /// - /// The localized text or URI reference. - /// - - [JsonPropertyName("value")] - public string Value { get; set; } - - } - - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "14.2.0.0 (NJsonSchema v11.1.0.0 (Newtonsoft.Json v13.0.0.0))")] - public partial class V1EndUserCommonActors_Actor - { - /// - /// The identifier of the person or organization that sent the transmission. Mutually exclusive with ActorName. - ///
Might be omitted if ActorType is "ServiceOwner". - ///
- - [JsonPropertyName("actorId")] - public string ActorId { get; set; } - - /// - /// Specifies the name of the entity that sent the transmission. Mutually exclusive with ActorId. If ActorId - ///
is supplied, the name will be automatically populated from the name registries. - ///
- - [JsonPropertyName("actorName")] - public string ActorName { get; set; } - - /// - /// The type of actor that sent the transmission. - /// - - [JsonPropertyName("actorType")] - [JsonConverter(typeof(JsonStringEnumConverter))] - public Actors_ActorType ActorType { get; set; } - - } - - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "14.2.0.0 (NJsonSchema v11.1.0.0 (Newtonsoft.Json v13.0.0.0))")] - public partial class V1EndUserDialogActivitiesQueriesGet_Activity - { - - [JsonPropertyName("createdAt")] - public System.DateTimeOffset? CreatedAt { get; set; } - - [JsonPropertyName("description")] - public ICollection Description { get; set; } - - [JsonPropertyName("extendedType")] - public System.Uri ExtendedType { get; set; } - - [JsonPropertyName("id")] - public System.Guid Id { get; set; } - - [JsonPropertyName("performedBy")] - public V1EndUserCommonActors_Actor PerformedBy { get; set; } - - [JsonPropertyName("transmissionId")] - public System.Guid? TransmissionId { get; set; } - - [JsonPropertyName("type")] - [JsonConverter(typeof(JsonStringEnumConverter))] - public DialogsEntitiesActivities_DialogActivityType Type { get; set; } - - } - - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "14.2.0.0 (NJsonSchema v11.1.0.0 (Newtonsoft.Json v13.0.0.0))")] - public partial class V1EndUserDialogActivitiesQueriesSearch_Activity - { - - [JsonPropertyName("createdAt")] - public System.DateTimeOffset CreatedAt { get; set; } - - [JsonPropertyName("extendedType")] - public System.Uri ExtendedType { get; set; } - - [JsonPropertyName("id")] - public System.Guid Id { get; set; } - - [JsonPropertyName("seenByEndUserIdHash")] - public string SeenByEndUserIdHash { get; set; } - - [JsonPropertyName("transmissionId")] - public System.Guid? TransmissionId { get; set; } - - [JsonPropertyName("type")] - [JsonConverter(typeof(JsonStringEnumConverter))] - public DialogsEntitiesActivities_DialogActivityType Type { get; set; } - - } - - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "14.2.0.0 (NJsonSchema v11.1.0.0 (Newtonsoft.Json v13.0.0.0))")] - public partial class V1EndUserDialogLabelAssignmentLogQueriesSearch_LabelAssignmentLog - { - - [JsonPropertyName("action")] - public string Action { get; set; } - - [JsonPropertyName("createdAt")] - public System.DateTimeOffset CreatedAt { get; set; } - - [JsonPropertyName("name")] - public string Name { get; set; } - - [JsonPropertyName("performedBy")] - public V1EndUserCommonActors_Actor PerformedBy { get; set; } - - } - - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "14.2.0.0 (NJsonSchema v11.1.0.0 (Newtonsoft.Json v13.0.0.0))")] - public partial class V1EndUserDialogSeenLogsQueriesGet_SeenLog - { - - [JsonPropertyName("id")] - public System.Guid Id { get; set; } - - [JsonPropertyName("isCurrentEndUser")] - public bool IsCurrentEndUser { get; set; } - - [JsonPropertyName("isViaServiceOwner")] - public bool IsViaServiceOwner { get; set; } - - [JsonPropertyName("seenAt")] - public System.DateTimeOffset SeenAt { get; set; } - - [JsonPropertyName("seenBy")] - public V1EndUserCommonActors_Actor SeenBy { get; set; } - - } - - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "14.2.0.0 (NJsonSchema v11.1.0.0 (Newtonsoft.Json v13.0.0.0))")] - public partial class V1EndUserDialogSeenLogsQueriesSearch_SeenLog - { - - [JsonPropertyName("id")] - public System.Guid Id { get; set; } - - [JsonPropertyName("isCurrentEndUser")] - public bool IsCurrentEndUser { get; set; } - - [JsonPropertyName("isViaServiceOwner")] - public bool IsViaServiceOwner { get; set; } - - [JsonPropertyName("seenAt")] - public System.DateTimeOffset SeenAt { get; set; } - - [JsonPropertyName("seenBy")] - public V1EndUserCommonActors_Actor SeenBy { get; set; } - - } - - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "14.2.0.0 (NJsonSchema v11.1.0.0 (Newtonsoft.Json v13.0.0.0))")] - public partial class V1EndUserDialogsQueriesGet_Content - { - /// - /// Additional information about the dialog, this may contain Markdown. - /// - - [JsonPropertyName("additionalInfo")] - public V1CommonContent_ContentValue AdditionalInfo { get; set; } - - /// - /// Used as the human-readable label used to describe the "ExtendedStatus" field. - /// - - [JsonPropertyName("extendedStatus")] - public V1CommonContent_ContentValue ExtendedStatus { get; set; } - - /// - /// Front-channel embedded content. Used to dynamically embed content in the frontend from an external URL. - /// - - [JsonPropertyName("mainContentReference")] - public V1CommonContent_ContentValue MainContentReference { get; set; } - - /// - /// Overridden sender name. If not supplied, assume "org" as the sender name. - /// - - [JsonPropertyName("senderName")] - public V1CommonContent_ContentValue SenderName { get; set; } - - /// - /// A short summary of the dialog and its current state. - /// - - [JsonPropertyName("summary")] - public V1CommonContent_ContentValue Summary { get; set; } - - /// - /// The title of the dialog. - /// - - [JsonPropertyName("title")] - public V1CommonContent_ContentValue Title { get; set; } - - } - - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "14.2.0.0 (NJsonSchema v11.1.0.0 (Newtonsoft.Json v13.0.0.0))")] - public partial class V1EndUserDialogsQueriesGet_Dialog - { - /// - /// An immutable list of activities associated with the dialog. - /// - - [JsonPropertyName("activities")] - public ICollection Activities { get; set; } - - /// - /// The API actions associated with the dialog. Should be used in specialized, non-browser-based integrations. - /// - - [JsonPropertyName("apiActions")] - public ICollection ApiActions { get; set; } - - /// - /// The attachments associated with the dialog (on an aggregate level). - /// - - [JsonPropertyName("attachments")] - public ICollection Attachments { get; set; } - - /// - /// The dialog unstructured text content. - /// - - [JsonPropertyName("content")] - public V1EndUserDialogsQueriesGet_Content Content { get; set; } - - /// - /// The date and time when the dialog was created. - /// - - [JsonPropertyName("createdAt")] - public System.DateTimeOffset CreatedAt { get; set; } - - /// - /// The dialog token. May be used (if supported) against external URLs referred to in this dialog's apiActions, - ///
transmissions or attachments. It should also be used for front-channel embeds. - ///
- - [JsonPropertyName("dialogToken")] - public string DialogToken { get; set; } - - /// - /// The due date for the dialog. Dialogs past due date might be marked as such in frontends but will still be available. - /// - - [JsonPropertyName("dueAt")] - public System.DateTimeOffset? DueAt { get; set; } - - /// - /// The expiration date for the dialog. This is the last date when the dialog is available for the end user. - ///
- ///
After this date is passed, the dialog will be considered expired and no longer available for the end user in any - ///
API. If not supplied, the dialog will be considered to never expire. This field can be changed by the service - ///
owner after the dialog has been created. - ///
- - [JsonPropertyName("expiresAt")] - public System.DateTimeOffset? ExpiresAt { get; set; } - - /// - /// Arbitrary string with a service-specific indicator of status, typically used to indicate a fine-grained state of - ///
the dialog to further specify the "status" enum. - ///
- ///
Refer to the service-specific documentation provided by the service owner for details on the possible values (if - ///
in use). - ///
- - [JsonPropertyName("extendedStatus")] - public string ExtendedStatus { get; set; } - - /// - /// Arbitrary string with a service-specific reference to an external system or service. - ///
- ///
Refer to the service-specific documentation provided by the service owner for details (if in use). - ///
- - [JsonPropertyName("externalReference")] - public string ExternalReference { get; set; } - - /// - /// The GUI actions associated with the dialog. Should be used in browser-based interactive frontends. - /// - - [JsonPropertyName("guiActions")] - public ICollection GuiActions { get; set; } - - /// - /// The unique identifier for the dialog in UUIDv7 format. - /// - - [JsonPropertyName("id")] - public System.Guid Id { get; set; } - - /// - /// The service owner code representing the organization (service owner) related to this dialog. - /// - - [JsonPropertyName("org")] - public string Org { get; set; } - - /// - /// The party code representing the organization or person that the dialog belongs to in URN format. - /// - - [JsonPropertyName("party")] - public string Party { get; set; } - - /// - /// Optional preceding process identifier to indicate the business process that preceded the process indicated in the "Process" field. Cannot be set without also "Process" being set. - /// - - [JsonPropertyName("precedingProcess")] - public string PrecedingProcess { get; set; } - - /// - /// Optional process identifier used to indicate a business process this dialog belongs to. - /// - - [JsonPropertyName("process")] - public string Process { get; set; } - - /// - /// Advisory indicator of progress, represented as 1-100 percentage value. 100% representing a dialog that has come - ///
to a natural completion (successful or not). - ///
- - [JsonPropertyName("progress")] - public int? Progress { get; set; } - - /// - /// The unique identifier for the revision in UUIDv4 format. - /// - - [JsonPropertyName("revision")] - public System.Guid Revision { get; set; } - - /// - /// The list of seen log entries for the dialog newer than the dialog ChangedAt date. - /// - - [JsonPropertyName("seenSinceLastUpdate")] - public ICollection SeenSinceLastUpdate { get; set; } - - /// - /// The service identifier for the service that the dialog is related to in URN-format. - ///
This corresponds to a service resource in the Altinn Resource Registry. - ///
- - [JsonPropertyName("serviceResource")] - public string ServiceResource { get; set; } - - /// - /// The ServiceResource type, as defined in Altinn Resource Registry (see ResourceType). - /// - - [JsonPropertyName("serviceResourceType")] - public string ServiceResourceType { get; set; } - - /// - /// The aggregated status of the dialog. - /// - - [JsonPropertyName("status")] - [JsonConverter(typeof(JsonStringEnumConverter))] - public DialogsEntities_DialogStatus Status { get; set; } - - /// - /// Current display state. - /// - - [JsonPropertyName("systemLabel")] - [JsonConverter(typeof(JsonStringEnumConverter))] - public DialogEndUserContextsEntities_SystemLabel SystemLabel { get; set; } - - /// - /// The immutable list of transmissions associated with the dialog. - /// - - [JsonPropertyName("transmissions")] - public ICollection Transmissions { get; set; } - - /// - /// The date and time when the dialog was last updated. - /// - - [JsonPropertyName("updatedAt")] - public System.DateTimeOffset UpdatedAt { get; set; } - - } - - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "14.2.0.0 (NJsonSchema v11.1.0.0 (Newtonsoft.Json v13.0.0.0))")] - public partial class V1EndUserDialogsQueriesGet_DialogActivity - { - /// - /// The date and time when the activity was created. - /// - - [JsonPropertyName("createdAt")] - public System.DateTimeOffset? CreatedAt { get; set; } - - /// - /// Unstructured text describing the activity. Only set if the activity type is "Information". - /// - - [JsonPropertyName("description")] - public ICollection Description { get; set; } - - /// - /// An arbitrary URI/URN with a service-specific activity type. - ///
- ///
Consult the service-specific documentation provided by the service owner for details (if in use). - ///
- - [JsonPropertyName("extendedType")] - public System.Uri ExtendedType { get; set; } - - /// - /// The unique identifier for the activity in UUIDv7 format. - /// - - [JsonPropertyName("id")] - public System.Guid Id { get; set; } - - /// - /// The actor that performed the activity. - /// - - [JsonPropertyName("performedBy")] - public V1EndUserCommonActors_Actor PerformedBy { get; set; } - - /// - /// If the activity is related to a particular transmission, this field will contain the transmission identifier. - /// - - [JsonPropertyName("transmissionId")] - public System.Guid? TransmissionId { get; set; } - - /// - /// The type of activity. - /// - - [JsonPropertyName("type")] - [JsonConverter(typeof(JsonStringEnumConverter))] - public DialogsEntitiesActivities_DialogActivityType Type { get; set; } - - } - - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "14.2.0.0 (NJsonSchema v11.1.0.0 (Newtonsoft.Json v13.0.0.0))")] - public partial class V1EndUserDialogsQueriesGet_DialogApiAction - { - /// - /// String identifier for the action, corresponding to the "action" attributeId used in the XACML service policy, - ///
which by default is the policy belonging to the service referred to by "serviceResource" in the dialog. - ///
- - [JsonPropertyName("action")] - public string Action { get; set; } - - /// - /// Contains an authorization resource attributeId, that can used in custom authorization rules in the XACML service - ///
policy, which by default is the policy belonging to the service referred to by "serviceResource" in the dialog. - ///
- ///
Can also be used to refer to other service policies. - ///
- - [JsonPropertyName("authorizationAttribute")] - public string AuthorizationAttribute { get; set; } - - /// - /// The endpoints associated with the action. - /// - - [JsonPropertyName("endpoints")] - public ICollection Endpoints { get; set; } - - /// - /// The unique identifier for the action in UUIDv7 format. - /// - - [JsonPropertyName("id")] - public System.Guid Id { get; set; } - - /// - /// True if the authenticated user is authorized for this action. If not, the action will not be available - ///
and all endpoints will be replaced with a fixed placeholder. - ///
- - [JsonPropertyName("isAuthorized")] - public bool IsAuthorized { get; set; } - - } - - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "14.2.0.0 (NJsonSchema v11.1.0.0 (Newtonsoft.Json v13.0.0.0))")] - public partial class V1EndUserDialogsQueriesGet_DialogApiActionEndpoint - { - /// - /// Boolean indicating if the endpoint is deprecated. Integrators should migrate to endpoints with a higher version. - /// - - [JsonPropertyName("deprecated")] - public bool Deprecated { get; set; } - - /// - /// Link to service provider documentation for the endpoint. Used for service owners to provide documentation for - ///
integrators. Should be a URL to a human-readable page. - ///
- - [JsonPropertyName("documentationUrl")] - public System.Uri DocumentationUrl { get; set; } - - /// - /// The HTTP method that the endpoint expects for this action. - /// - - [JsonPropertyName("httpMethod")] - [JsonConverter(typeof(JsonStringEnumConverter))] - public Http_HttpVerb HttpMethod { get; set; } - - /// - /// The unique identifier for the endpoint in UUIDv7 format. - /// - - [JsonPropertyName("id")] - public System.Guid Id { get; set; } - - /// - /// Link to the request schema for the endpoint. Used by service owners to provide documentation for integrators. - ///
Dialogporten will not validate information on this endpoint. - ///
- - [JsonPropertyName("requestSchema")] - public System.Uri RequestSchema { get; set; } - - /// - /// Link to the response schema for the endpoint. Used for service owners to provide documentation for integrators. - ///
Dialogporten will not validate information on this endpoint. - ///
- - [JsonPropertyName("responseSchema")] - public System.Uri ResponseSchema { get; set; } - - /// - /// Date and time when the service owner has indicated that endpoint will no longer function. Only set if the endpoint - ///
is deprecated. Dialogporten will not enforce this date. - ///
- - [JsonPropertyName("sunsetAt")] - public System.DateTimeOffset? SunsetAt { get; set; } - - /// - /// The fully qualified URL of the API endpoint. Will be set to "urn:dialogporten:unauthorized" if the user is - ///
not authorized to perform the action. - ///
- - [JsonPropertyName("url")] - public System.Uri Url { get; set; } - - /// - /// Arbitrary string indicating the version of the endpoint. - ///
- ///
Consult the service-specific documentation provided by the service owner for details (if in use). - ///
- - [JsonPropertyName("version")] - public string Version { get; set; } - - } - - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "14.2.0.0 (NJsonSchema v11.1.0.0 (Newtonsoft.Json v13.0.0.0))")] - public partial class V1EndUserDialogsQueriesGet_DialogAttachment - { - /// - /// The display name of the attachment that should be used in GUIs. - /// - - [JsonPropertyName("displayName")] - public ICollection DisplayName { get; set; } - - /// - /// The unique identifier for the attachment in UUIDv7 format. - /// - - [JsonPropertyName("id")] - public System.Guid Id { get; set; } - - /// - /// The URLs associated with the attachment, each referring to a different representation of the attachment. - /// - - [JsonPropertyName("urls")] - public ICollection Urls { get; set; } - - } - - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "14.2.0.0 (NJsonSchema v11.1.0.0 (Newtonsoft.Json v13.0.0.0))")] - public partial class V1EndUserDialogsQueriesGet_DialogAttachmentUrl - { - /// - /// What type of consumer the URL is intended for. - /// - - [JsonPropertyName("consumerType")] - [JsonConverter(typeof(JsonStringEnumConverter))] - public Attachments_AttachmentUrlConsumerType ConsumerType { get; set; } - - /// - /// The unique identifier for the attachment URL in UUIDv7 format. - /// - - [JsonPropertyName("id")] - public System.Guid Id { get; set; } - - /// - /// The media type of the attachment. - /// - - [JsonPropertyName("mediaType")] - public string MediaType { get; set; } - - /// - /// The fully qualified URL of the attachment. - /// - - [JsonPropertyName("url")] - public System.Uri Url { get; set; } - - } - - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "14.2.0.0 (NJsonSchema v11.1.0.0 (Newtonsoft.Json v13.0.0.0))")] - public partial class V1EndUserDialogsQueriesGet_DialogGuiAction - { - /// - /// The action identifier for the action, corresponding to the "action" attributeId used in the XACML service policy. - /// - - [JsonPropertyName("action")] - public string Action { get; set; } - - /// - /// Contains an authorization resource attributeId, that can used in custom authorization rules in the XACML service - ///
policy, which by default is the policy belonging to the service referred to by "serviceResource" in the dialog. - ///
- ///
Can also be used to refer to other service policies. - ///
- - [JsonPropertyName("authorizationAttribute")] - public string AuthorizationAttribute { get; set; } - - /// - /// The HTTP method that the frontend should use when redirecting the user. - /// - - [JsonPropertyName("httpMethod")] - [JsonConverter(typeof(JsonStringEnumConverter))] - public Http_HttpVerb HttpMethod { get; set; } - - /// - /// The unique identifier for the action in UUIDv7 format. - /// - - [JsonPropertyName("id")] - public System.Guid Id { get; set; } - - /// - /// Whether the user is authorized to perform the action. - /// - - [JsonPropertyName("isAuthorized")] - public bool IsAuthorized { get; set; } - - /// - /// Indicates whether the action results in the dialog being deleted. Used by frontends to implement custom UX - ///
for delete actions. - ///
- - [JsonPropertyName("isDeleteDialogAction")] - public bool IsDeleteDialogAction { get; set; } - - /// - /// Indicates a priority for the action, making it possible for frontends to adapt GUI elements based on action - ///
priority. - ///
- - [JsonPropertyName("priority")] - [JsonConverter(typeof(JsonStringEnumConverter))] - public DialogsEntitiesActions_DialogGuiActionPriority Priority { get; set; } - - /// - /// If there should be a prompt asking the user for confirmation before the action is executed, - ///
this field should contain the prompt text. - ///
- - [JsonPropertyName("prompt")] - public ICollection Prompt { get; set; } - - /// - /// The title of the action, this should be short and in verb form. - /// - - [JsonPropertyName("title")] - public ICollection Title { get; set; } - - /// - /// The fully qualified URL of the action, to which the user will be redirected when the action is triggered. Will be set to - ///
"urn:dialogporten:unauthorized" if the user is not authorized to perform the action. - ///
- - [JsonPropertyName("url")] - public System.Uri Url { get; set; } - - } - - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "14.2.0.0 (NJsonSchema v11.1.0.0 (Newtonsoft.Json v13.0.0.0))")] - public partial class V1EndUserDialogsQueriesGet_DialogSeenLog - { - /// - /// The unique identifier for the seen log entry in UUIDv7 format. - /// - - [JsonPropertyName("id")] - public System.Guid Id { get; set; } - - /// - /// Flag indicating whether the seen log entry was created by the current end user. - /// - - [JsonPropertyName("isCurrentEndUser")] - public bool IsCurrentEndUser { get; set; } - - /// - /// Flag indicating whether the seen log entry was created via the service owner. - ///
- ///
This is used when the service owner uses the service owner API to implement its own frontend. - ///
- - [JsonPropertyName("isViaServiceOwner")] - public bool? IsViaServiceOwner { get; set; } - - /// - /// The timestamp when the dialog revision was seen. - /// - - [JsonPropertyName("seenAt")] - public System.DateTimeOffset SeenAt { get; set; } - - /// - /// The actor that saw the dialog revision. - /// - - [JsonPropertyName("seenBy")] - public V1EndUserCommonActors_Actor SeenBy { get; set; } - - } - - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "14.2.0.0 (NJsonSchema v11.1.0.0 (Newtonsoft.Json v13.0.0.0))")] - public partial class V1EndUserDialogsQueriesGet_DialogTransmission - { - /// - /// The transmission-level attachments. - /// - - [JsonPropertyName("attachments")] - public ICollection Attachments { get; set; } - - /// - /// Contains an authorization resource attributeId, that can used in custom authorization rules in the XACML service - ///
policy, which by default is the policy belonging to the service referred to by "serviceResource" in the dialog. - ///
- ///
Can also be used to refer to other service policies. - ///
- - [JsonPropertyName("authorizationAttribute")] - public string AuthorizationAttribute { get; set; } - - /// - /// The transmission unstructured text content. - /// - - [JsonPropertyName("content")] - public V1EndUserDialogsQueriesGet_DialogTransmissionContent Content { get; set; } - - /// - /// The date and time when the transmission was created. - /// - - [JsonPropertyName("createdAt")] - public System.DateTimeOffset CreatedAt { get; set; } - - /// - /// Arbitrary URI/URN describing a service-specific transmission type. - ///
- ///
Refer to the service-specific documentation provided by the service owner for details (if in use). - ///
- - [JsonPropertyName("extendedType")] - public System.Uri ExtendedType { get; set; } - - /// - /// The unique identifier for the transmission in UUIDv7 format. - /// - - [JsonPropertyName("id")] - public System.Guid Id { get; set; } - - /// - /// Flag indicating if the authenticated user is authorized for this transmission. If not, embedded content and - ///
the attachments will not be available. - ///
- - [JsonPropertyName("isAuthorized")] - public bool IsAuthorized { get; set; } - - /// - /// Reference to any other transmission that this transmission is related to. - /// - - [JsonPropertyName("relatedTransmissionId")] - public System.Guid? RelatedTransmissionId { get; set; } - - /// - /// The actor that sent the transmission. - /// - - [JsonPropertyName("sender")] - public V1EndUserCommonActors_Actor Sender { get; set; } - - /// - /// The type of transmission. - /// - - [JsonPropertyName("type")] - [JsonConverter(typeof(JsonStringEnumConverter))] - public DialogsEntitiesTransmissions_DialogTransmissionType Type { get; set; } - - } - - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "14.2.0.0 (NJsonSchema v11.1.0.0 (Newtonsoft.Json v13.0.0.0))")] - public partial class V1EndUserDialogsQueriesGet_DialogTransmissionAttachment - { - /// - /// The display name of the attachment that should be used in GUIs. - /// - - [JsonPropertyName("displayName")] - public ICollection DisplayName { get; set; } - - /// - /// The unique identifier for the attachment in UUIDv7 format. - /// - - [JsonPropertyName("id")] - public System.Guid Id { get; set; } - - /// - /// The URLs associated with the attachment, each referring to a different representation of the attachment. - /// - - [JsonPropertyName("urls")] - public ICollection Urls { get; set; } - - } - - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "14.2.0.0 (NJsonSchema v11.1.0.0 (Newtonsoft.Json v13.0.0.0))")] - public partial class V1EndUserDialogsQueriesGet_DialogTransmissionAttachmentUrl - { - /// - /// The type of consumer the URL is intended for. - /// - - [JsonPropertyName("consumerType")] - [JsonConverter(typeof(JsonStringEnumConverter))] - public Attachments_AttachmentUrlConsumerType ConsumerType { get; set; } - - /// - /// The media type of the attachment. - /// - - [JsonPropertyName("mediaType")] - public string MediaType { get; set; } - - /// - /// The fully qualified URL of the attachment. Will be set to "urn:dialogporten:unauthorized" if the user is - ///
not authorized to access the transmission. - ///
- - [JsonPropertyName("url")] - public System.Uri Url { get; set; } - - } - - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "14.2.0.0 (NJsonSchema v11.1.0.0 (Newtonsoft.Json v13.0.0.0))")] - public partial class V1EndUserDialogsQueriesGet_DialogTransmissionContent - { - /// - /// Front-channel embedded content. Used to dynamically embed content in the frontend from an external URL. - ///
Allowed media types: application/vnd.dialogporten.frontchannelembed+json;type=markdown - ///
- - [JsonPropertyName("contentReference")] - public V1CommonContent_ContentValue ContentReference { get; set; } - - /// - /// The transmission summary. - /// - - [JsonPropertyName("summary")] - public V1CommonContent_ContentValue Summary { get; set; } - - /// - /// The transmission title. - /// - - [JsonPropertyName("title")] - public V1CommonContent_ContentValue Title { get; set; } - - } - - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "14.2.0.0 (NJsonSchema v11.1.0.0 (Newtonsoft.Json v13.0.0.0))")] - public partial class V1EndUserDialogsQueriesSearch_Content - { - /// - /// Used as the human-readable label used to describe the "ExtendedStatus" field. - /// - - [JsonPropertyName("extendedStatus")] - public V1CommonContent_ContentValue ExtendedStatus { get; set; } - - /// - /// Overridden sender name. If not supplied, assume "org" as the sender name. - /// - - [JsonPropertyName("senderName")] - public V1CommonContent_ContentValue SenderName { get; set; } - - /// - /// A short summary of the dialog and its current state. - /// - - [JsonPropertyName("summary")] - public V1CommonContent_ContentValue Summary { get; set; } - - /// - /// The title of the dialog. - /// - - [JsonPropertyName("title")] - public V1CommonContent_ContentValue Title { get; set; } - - } - - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "14.2.0.0 (NJsonSchema v11.1.0.0 (Newtonsoft.Json v13.0.0.0))")] - public partial class V1EndUserDialogsQueriesSearch_Dialog - { - /// - /// The content of the dialog in search results. - /// - - [JsonPropertyName("content")] - public V1EndUserDialogsQueriesSearch_Content Content { get; set; } - - /// - /// The date and time when the dialog was created. - /// - - [JsonPropertyName("createdAt")] - public System.DateTimeOffset CreatedAt { get; set; } - - /// - /// The due date for the dialog. This is the last date when the dialog is expected to be completed. - /// - - [JsonPropertyName("dueAt")] - public System.DateTimeOffset? DueAt { get; set; } - - /// - /// Arbitrary string with a service-specific indicator of status, typically used to indicate a fine-grained state of - ///
the dialog to further specify the "status" enum. - ///
- ///
Refer to the service-specific documentation provided by the service owner for details on the possible values (if - ///
in use). - ///
- - [JsonPropertyName("extendedStatus")] - public string ExtendedStatus { get; set; } - - /// - /// Arbitrary string with a service-specific reference to an external system or service. - ///
- ///
Refer to the service-specific documentation provided by the service owner for details (if in use). - ///
- - [JsonPropertyName("externalReference")] - public string ExternalReference { get; set; } - - /// - /// The number of attachments in the dialog made available for browser-based frontends. - /// - - [JsonPropertyName("guiAttachmentCount")] - public int? GuiAttachmentCount { get; set; } - - /// - /// The unique identifier for the dialog in UUIDv7 format. - /// - - [JsonPropertyName("id")] - public System.Guid Id { get; set; } - - /// - /// The latest entry in the dialog's activity log. - /// - - [JsonPropertyName("latestActivity")] - public V1EndUserDialogsQueriesSearch_DialogActivity LatestActivity { get; set; } - - /// - /// The service owner code representing the organization (service owner) related to this dialog. - /// - - [JsonPropertyName("org")] - public string Org { get; set; } - - /// - /// The party code representing the organization or person that the dialog belongs to in URN format. - /// - - [JsonPropertyName("party")] - public string Party { get; set; } - - /// - /// Optional preceding process identifier to indicate the business process that preceded the process indicated in the "Process" field. Cannot be set without also "Process" being set. - /// - - [JsonPropertyName("precedingProcess")] - public string PrecedingProcess { get; set; } - - /// - /// Optional process identifier used to indicate a business process this dialog belongs to. - /// - - [JsonPropertyName("process")] - public string Process { get; set; } - - /// - /// Advisory indicator of progress, represented as 1-100 percentage value. 100% representing a dialog that has come - ///
to a natural completion (successful or not). - ///
- - [JsonPropertyName("progress")] - public int? Progress { get; set; } - - /// - /// The list of seen log entries for the dialog newer than the dialog ChangedAt date. - /// - - [JsonPropertyName("seenSinceLastUpdate")] - public ICollection SeenSinceLastUpdate { get; set; } - - /// - /// The service identifier for the service that the dialog is related to in URN-format. - ///
This corresponds to a service resource in the Altinn Resource Registry. - ///
- - [JsonPropertyName("serviceResource")] - public string ServiceResource { get; set; } - - /// - /// The ServiceResource type, as defined in Altinn Resource Registry (see ResourceType). - /// - - [JsonPropertyName("serviceResourceType")] - public string ServiceResourceType { get; set; } - - /// - /// The aggregated status of the dialog. - /// - - [JsonPropertyName("status")] - [JsonConverter(typeof(JsonStringEnumConverter))] - public DialogsEntities_DialogStatus Status { get; set; } - - /// - /// Current display state. - /// - - [JsonPropertyName("systemLabel")] - [JsonConverter(typeof(JsonStringEnumConverter))] - public DialogEndUserContextsEntities_SystemLabel SystemLabel { get; set; } - - /// - /// The date and time when the dialog was last updated. - /// - - [JsonPropertyName("updatedAt")] - public System.DateTimeOffset UpdatedAt { get; set; } - - } - - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "14.2.0.0 (NJsonSchema v11.1.0.0 (Newtonsoft.Json v13.0.0.0))")] - public partial class V1EndUserDialogsQueriesSearch_DialogActivity - { - /// - /// The date and time when the activity was created. - /// - - [JsonPropertyName("createdAt")] - public System.DateTimeOffset? CreatedAt { get; set; } - - /// - /// Unstructured text describing the activity. Only set if the activity type is "Information". - /// - - [JsonPropertyName("description")] - public ICollection Description { get; set; } - - /// - /// An arbitrary string with a service-specific activity type. - ///
- ///
Consult the service-specific documentation provided by the service owner for details (if in use). - ///
- - [JsonPropertyName("extendedType")] - public System.Uri ExtendedType { get; set; } - - /// - /// The unique identifier for the activity in UUIDv7 format. - /// - - [JsonPropertyName("id")] - public System.Guid Id { get; set; } - - /// - /// The actor that performed the activity. - /// - - [JsonPropertyName("performedBy")] - public V1EndUserCommonActors_Actor PerformedBy { get; set; } - - /// - /// If the activity is related to a particular transmission, this field will contain the transmission identifier. - /// - - [JsonPropertyName("transmissionId")] - public System.Guid? TransmissionId { get; set; } - - /// - /// The type of activity. - /// - - [JsonPropertyName("type")] - [JsonConverter(typeof(JsonStringEnumConverter))] - public DialogsEntitiesActivities_DialogActivityType Type { get; set; } - - } - - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "14.2.0.0 (NJsonSchema v11.1.0.0 (Newtonsoft.Json v13.0.0.0))")] - public partial class V1EndUserDialogsQueriesSearch_DialogSeenLog - { - /// - /// The unique identifier for the seen log entry in UUIDv7 format. - /// - - [JsonPropertyName("id")] - public System.Guid Id { get; set; } - - /// - /// Flag indicating whether the seen log entry was created by the current end user. - /// - - [JsonPropertyName("isCurrentEndUser")] - public bool IsCurrentEndUser { get; set; } - - /// - /// Flag indicating whether the seen log entry was created via the service owner. - ///
- ///
This is used when the service owner uses the service owner API to implement its own frontend. - ///
- - [JsonPropertyName("isViaServiceOwner")] - public bool? IsViaServiceOwner { get; set; } - - /// - /// The timestamp when the dialog revision was seen. - /// - - [JsonPropertyName("seenAt")] - public System.DateTimeOffset SeenAt { get; set; } - - /// - /// The actor that saw the dialog revision. - /// - - [JsonPropertyName("seenBy")] - public V1EndUserCommonActors_Actor SeenBy { get; set; } - - } - - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "14.2.0.0 (NJsonSchema v11.1.0.0 (Newtonsoft.Json v13.0.0.0))")] - public partial class V1EndUserDialogSystemLabelsCommandsSet_SystemLabelCommand - { - - [JsonPropertyName("ifMatchDialogRevision")] - public System.Guid? IfMatchDialogRevision { get; set; } - - [JsonPropertyName("label")] - [JsonConverter(typeof(JsonStringEnumConverter))] - public DialogEndUserContextsEntities_SystemLabel Label { get; set; } - - } - - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "14.2.0.0 (NJsonSchema v11.1.0.0 (Newtonsoft.Json v13.0.0.0))")] - public partial class V1EndUserDialogTransmissionsQueriesGet_Attachment - { - /// - /// The display name of the attachment that should be used in GUIs. - /// - - [JsonPropertyName("displayName")] - public ICollection DisplayName { get; set; } - - /// - /// The unique identifier for the attachment in UUIDv7 format. - /// - - [JsonPropertyName("id")] - public System.Guid Id { get; set; } - - /// - /// The URLs associated with the attachment, each referring to a different representation of the attachment. - /// - - [JsonPropertyName("urls")] - public ICollection Urls { get; set; } - - } - - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "14.2.0.0 (NJsonSchema v11.1.0.0 (Newtonsoft.Json v13.0.0.0))")] - public partial class V1EndUserDialogTransmissionsQueriesGet_AttachmentUrl - { - /// - /// The type of consumer the URL is intended for. - /// - - [JsonPropertyName("consumerType")] - [JsonConverter(typeof(JsonStringEnumConverter))] - public Attachments_AttachmentUrlConsumerType ConsumerType { get; set; } - - /// - /// The unique identifier for the attachment URL in UUIDv7 format. - /// - - [JsonPropertyName("id")] - public System.Guid Id { get; set; } - - /// - /// The media type of the attachment. - /// - - [JsonPropertyName("mediaType")] - public string MediaType { get; set; } - - /// - /// The fully qualified URL of the attachment. Will be set to "urn:dialogporten:unauthorized" if the user is - ///
not authorized to access the transmission. - ///
- - [JsonPropertyName("url")] - public System.Uri Url { get; set; } - - } - - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "14.2.0.0 (NJsonSchema v11.1.0.0 (Newtonsoft.Json v13.0.0.0))")] - public partial class V1EndUserDialogTransmissionsQueriesGet_Content - { - /// - /// Front-channel embedded content. Used to dynamically embed content in the frontend from an external URL. - ///
Allowed media types: application/vnd.dialogporten.frontchannelembed+json;type=markdown - ///
- - [JsonPropertyName("contentReference")] - public V1CommonContent_ContentValue ContentReference { get; set; } - - /// - /// The summary of the content. - /// - - [JsonPropertyName("summary")] - public V1CommonContent_ContentValue Summary { get; set; } - - /// - /// The title of the content. - /// - - [JsonPropertyName("title")] - public V1CommonContent_ContentValue Title { get; set; } - - } - - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "14.2.0.0 (NJsonSchema v11.1.0.0 (Newtonsoft.Json v13.0.0.0))")] - public partial class V1EndUserDialogTransmissionsQueriesGet_Transmission - { - /// - /// The attachments associated with the transmission. - /// - - [JsonPropertyName("attachments")] - public ICollection Attachments { get; set; } - - /// - /// The authorization attribute associated with the transmission. - /// - - [JsonPropertyName("authorizationAttribute")] - public string AuthorizationAttribute { get; set; } - - /// - /// The content of the transmission. - /// - - [JsonPropertyName("content")] - public V1EndUserDialogTransmissionsQueriesGet_Content Content { get; set; } - - /// - /// The date and time when the transmission was created. - /// - - [JsonPropertyName("createdAt")] - public System.DateTimeOffset CreatedAt { get; set; } - - /// - /// The date and time when the transmission was deleted, if applicable. - /// - - [JsonPropertyName("deletedAt")] - public System.DateTimeOffset? DeletedAt { get; set; } - - /// - /// The extended type URI for the transmission. - /// - - [JsonPropertyName("extendedType")] - public System.Uri ExtendedType { get; set; } - - /// - /// The unique identifier for the transmission in UUIDv7 format. - /// - - [JsonPropertyName("id")] - public System.Guid Id { get; set; } - + public partial class PaginatedListOfV1ServiceOwnerDialogsQueriesSearch_Dialog + { /// - /// Flag indicating if the authenticated user is authorized for this transmission. If not, embedded content and - ///
the attachments will not be available. + /// The continuation token to be used to fetch the next page of items ///
- [JsonPropertyName("isAuthorized")] - public bool IsAuthorized { get; set; } + [JsonPropertyName("continuationToken")] + public string ContinuationToken { get; set; } /// - /// The unique identifier for the related transmission, if any. + /// Whether there are more items available that can be fetched by supplying the continuation token /// - [JsonPropertyName("relatedTransmissionId")] - public System.Guid? RelatedTransmissionId { get; set; } + [JsonPropertyName("hasNextPage")] + public bool HasNextPage { get; set; } /// - /// The sender actor information for the transmission. + /// The paginated list of items /// - [JsonPropertyName("sender")] - public V1EndUserCommonActors_Actor Sender { get; set; } + [JsonPropertyName("items")] + public ICollection Items { get; set; } /// - /// The type of the transmission. + /// The current sorting order of the items /// - [JsonPropertyName("type")] - [JsonConverter(typeof(JsonStringEnumConverter))] - public DialogsEntitiesTransmissions_DialogTransmissionType Type { get; set; } + [JsonPropertyName("orderBy")] + public string OrderBy { get; set; } } [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "14.2.0.0 (NJsonSchema v11.1.0.0 (Newtonsoft.Json v13.0.0.0))")] - public partial class V1EndUserDialogTransmissionsQueriesSearch_Attachment + public partial class ProblemDetails { - /// - /// The display name of the attachment that should be used in GUIs. - /// - [JsonPropertyName("displayName")] - public ICollection DisplayName { get; set; } + [JsonPropertyName("detail")] + public string Detail { get; set; } - /// - /// The unique identifier for the attachment in UUIDv7 format. - /// + [JsonPropertyName("errors")] + public ICollection Errors { get; set; } - [JsonPropertyName("id")] - public System.Guid Id { get; set; } + [JsonPropertyName("instance")] + public string Instance { get; set; } = "/api/route"; - /// - /// The URLs associated with the attachment, each referring to a different representation of the attachment. - /// + [JsonPropertyName("status")] + public int Status { get; set; } = 400; - [JsonPropertyName("urls")] - public ICollection Urls { get; set; } + [JsonPropertyName("title")] + public string Title { get; set; } = "One or more validation errors occurred."; + + [JsonPropertyName("traceId")] + public string TraceId { get; set; } = "0HMPNHL0JHL76:00000001"; + + [JsonPropertyName("type")] + public string Type { get; set; } = "https://www.rfc-editor.org/rfc/rfc7231#section-6.5.1"; } [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "14.2.0.0 (NJsonSchema v11.1.0.0 (Newtonsoft.Json v13.0.0.0))")] - public partial class V1EndUserDialogTransmissionsQueriesSearch_AttachmentUrl + public partial class ProblemDetails_Error { - /// - /// The type of consumer the URL is intended for. - /// - - [JsonPropertyName("consumerType")] - [JsonConverter(typeof(JsonStringEnumConverter))] - public Attachments_AttachmentUrlConsumerType ConsumerType { get; set; } - - /// - /// The unique identifier for the attachment URL in UUIDv7 format. - /// - - [JsonPropertyName("id")] - public System.Guid Id { get; set; } - /// - /// The media type of the attachment. - /// + [JsonPropertyName("code")] + public string Code { get; set; } - [JsonPropertyName("mediaType")] - public string MediaType { get; set; } + [JsonPropertyName("name")] + public string Name { get; set; } = "Error or field name"; - /// - /// The fully qualified URL of the attachment. Will be set to "urn:dialogporten:unauthorized" if the user is - ///
not authorized to access the transmission. - ///
+ [JsonPropertyName("reason")] + public string Reason { get; set; } = "Error reason"; - [JsonPropertyName("url")] - public System.Uri Url { get; set; } + [JsonPropertyName("severity")] + public string Severity { get; set; } } [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "14.2.0.0 (NJsonSchema v11.1.0.0 (Newtonsoft.Json v13.0.0.0))")] - public partial class V1EndUserDialogTransmissionsQueriesSearch_Content + public partial class V1CommonContent_ContentValue { /// - /// Front-channel embedded content. Used to dynamically embed content in the frontend from an external URL. - ///
Allowed media types: application/vnd.dialogporten.frontchannelembed+json;type=markdown - ///
- - [JsonPropertyName("contentReference")] - public V1CommonContent_ContentValue ContentReference { get; set; } - - /// - /// The summary of the content. + /// Media type of the content (plaintext, Markdown). Can also indicate that the content is embeddable. /// - [JsonPropertyName("summary")] - public V1CommonContent_ContentValue Summary { get; set; } + [JsonPropertyName("mediaType")] + public string MediaType { get; set; } /// - /// The title of the content. + /// A list of localizations for the content. /// - [JsonPropertyName("title")] - public V1CommonContent_ContentValue Title { get; set; } + [JsonPropertyName("value")] + public ICollection Value { get; set; } } [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "14.2.0.0 (NJsonSchema v11.1.0.0 (Newtonsoft.Json v13.0.0.0))")] - public partial class V1EndUserDialogTransmissionsQueriesSearch_Transmission + public partial class V1CommonLocalizations_Localization { /// - /// The attachments associated with the transmission. - /// - - [JsonPropertyName("attachments")] - public ICollection Attachments { get; set; } - - /// - /// The authorization attribute associated with the transmission. - /// - - [JsonPropertyName("authorizationAttribute")] - public string AuthorizationAttribute { get; set; } - - /// - /// The content of the transmission. - /// - - [JsonPropertyName("content")] - public V1EndUserDialogTransmissionsQueriesSearch_Content Content { get; set; } - - /// - /// The date and time when the transmission was created. - /// - - [JsonPropertyName("createdAt")] - public System.DateTimeOffset CreatedAt { get; set; } - - /// - /// The date and time when the transmission was deleted, if applicable. - /// - - [JsonPropertyName("deletedAt")] - public System.DateTimeOffset? DeletedAt { get; set; } - - /// - /// The extended type URI for the transmission. - /// - - [JsonPropertyName("extendedType")] - public System.Uri ExtendedType { get; set; } - - /// - /// The unique identifier for the transmission in UUIDv7 format. - /// - - [JsonPropertyName("id")] - public System.Guid Id { get; set; } - - /// - /// Flag indicating if the authenticated user is authorized for this transmission. If not, embedded content and - ///
the attachments will not be available. - ///
- - [JsonPropertyName("isAuthorized")] - public bool IsAuthorized { get; set; } - - /// - /// The unique identifier for the related transmission, if any. - /// - - [JsonPropertyName("relatedTransmissionId")] - public System.Guid? RelatedTransmissionId { get; set; } - - /// - /// The sender actor information for the transmission. + /// The language code of the localization in ISO 639-1 format. /// - [JsonPropertyName("sender")] - public V1EndUserCommonActors_Actor Sender { get; set; } + [JsonPropertyName("languageCode")] + public string LanguageCode { get; set; } /// - /// The type of the transmission. + /// The localized text or URI reference. /// - [JsonPropertyName("type")] - [JsonConverter(typeof(JsonStringEnumConverter))] - public DialogsEntitiesTransmissions_DialogTransmissionType Type { get; set; } - - } - - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "14.2.0.0 (NJsonSchema v11.1.0.0 (Newtonsoft.Json v13.0.0.0))")] - public partial class V1EndUserPartiesQueriesGet_AuthorizedParty - { - - [JsonPropertyName("hasKeyRole")] - public bool HasKeyRole { get; set; } - - [JsonPropertyName("hasOnlyAccessToSubParties")] - public bool HasOnlyAccessToSubParties { get; set; } - - [JsonPropertyName("isAccessManager")] - public bool IsAccessManager { get; set; } - - [JsonPropertyName("isCurrentEndUser")] - public bool IsCurrentEndUser { get; set; } - - [JsonPropertyName("isDeleted")] - public bool IsDeleted { get; set; } - - [JsonPropertyName("isMainAdministrator")] - public bool IsMainAdministrator { get; set; } - - [JsonPropertyName("name")] - public string Name { get; set; } - - [JsonPropertyName("party")] - public string Party { get; set; } - - [JsonPropertyName("partyType")] - public string PartyType { get; set; } - - [JsonPropertyName("subParties")] - public ICollection SubParties { get; set; } - - } - - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "14.2.0.0 (NJsonSchema v11.1.0.0 (Newtonsoft.Json v13.0.0.0))")] - public partial class V1EndUserPartiesQueriesGet_Parties - { - - [JsonPropertyName("authorizedParties")] - public ICollection AuthorizedParties { get; set; } + [JsonPropertyName("value")] + public string Value { get; set; } } @@ -5345,15 +3719,6 @@ public partial class V1ServiceOwnerDialogsQueriesSearch_DialogSeenLog } - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "14.2.0.0 (NJsonSchema v11.1.0.0 (Newtonsoft.Json v13.0.0.0))")] - public partial class V1ServiceOwnerDialogsUpdate_DialogRequest - { - - [JsonPropertyName("dto")] - public V1ServiceOwnerDialogsCommandsUpdate_Dialog Dto { get; set; } - - } - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "14.2.0.0 (NJsonSchema v11.1.0.0 (Newtonsoft.Json v13.0.0.0))")] public partial class V1ServiceOwnerDialogTransmissionsCreate_TransmissionRequest { @@ -5757,51 +4122,6 @@ public partial class V1ServiceOwnerDialogTransmissionsQueriesSearch_Transmission } - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "14.2.0.0 (NJsonSchema v11.1.0.0 (Newtonsoft.Json v13.0.0.0))")] - public partial class V1WellKnownJwksQueriesGet_GetJwks - { - - [JsonPropertyName("keys")] - public ICollection Keys { get; set; } - - } - - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "14.2.0.0 (NJsonSchema v11.1.0.0 (Newtonsoft.Json v13.0.0.0))")] - public partial class V1WellKnownJwksQueriesGet_Jwk - { - - [JsonPropertyName("alg")] - public string Alg { get; set; } - - [JsonPropertyName("crv")] - public string Crv { get; set; } - - [JsonPropertyName("kid")] - public string Kid { get; set; } - - [JsonPropertyName("kty")] - public string Kty { get; set; } - - [JsonPropertyName("use")] - public string Use { get; set; } - - [JsonPropertyName("x")] - public string X { get; set; } - - } - - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "14.2.0.0 (NJsonSchema v11.1.0.0 (Newtonsoft.Json v13.0.0.0))")] - public partial class V1WellKnownOauthAuthorizationServerQueriesGet_GetOauthAuthorizationServer - { - - [JsonPropertyName("issuer")] - public string Issuer { get; set; } - - [JsonPropertyName("jwks_uri")] - public string Jwks_uri { get; set; } - - } - } From 431cc858e46989081b4b5e3e156b3fb034db2d43 Mon Sep 17 00:00:00 2001 From: Amund Myrbostad Date: Fri, 29 Nov 2024 09:43:51 +0100 Subject: [PATCH 40/62] Workflow cleanup --- .github/workflows/ci-cd-pull-request.yml | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/.github/workflows/ci-cd-pull-request.yml b/.github/workflows/ci-cd-pull-request.yml index 66502c890..8007ffcd9 100644 --- a/.github/workflows/ci-cd-pull-request.yml +++ b/.github/workflows/ci-cd-pull-request.yml @@ -35,16 +35,16 @@ jobs: with: environment: "test" - # TESTING AV NUGET SKAL IKKE SKJØRES I PULL REQUEST - publish-sdk-to-nuget: - uses: ./.github/workflows/workflow-publish-nuget.yml - needs: [ get-current-version, generate-git-short-sha, check-for-changes ] - if: ${{ needs.check-for-changes.outputs.hasBackendChanges == 'true' || needs.check-for-changes.outputs.hasTestChanges == 'true' }} - with: - version: ${{ needs.get-current-version.outputs.version }}-rc.${{ needs.generate-git-short-sha.outputs.gitShortSha }} - path: $(find . -name '*Digdir.Library.Dialogporten.WebApiClient.csproj' -printf "%p" -quit) - secrets: - NUGET_API_KEY: ${{ secrets.NUGET_API_TEST_KEY }} +# # TESTING AV NUGET SKAL IKKE SKJØRES I PULL REQUEST +# publish-sdk-to-nuget: +# uses: ./.github/workflows/workflow-publish-nuget.yml +# needs: [ get-current-version, generate-git-short-sha, check-for-changes ] +# if: ${{ needs.check-for-changes.outputs.hasBackendChanges == 'true' || needs.check-for-changes.outputs.hasTestChanges == 'true' }} +# with: +# version: ${{ needs.get-current-version.outputs.version }}-rc.${{ needs.generate-git-short-sha.outputs.gitShortSha }} +# path: $(find . -name '*Digdir.Library.Dialogporten.WebApiClient.csproj' -printf "%p" -quit) +# secrets: +# NUGET_API_KEY: ${{ secrets.NUGET_API_TEST_KEY }} dry-run-deploy-infra: name: Dry run deploy infrastructure From 4def26ad8db2a1060ecb55efcf8f970da87a18e6 Mon Sep 17 00:00:00 2001 From: Amund Myrbostad Date: Fri, 29 Nov 2024 12:07:50 +0100 Subject: [PATCH 41/62] README updated --- src/Digdir.Library.Dialogporten.WebApiClient/README.md | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/Digdir.Library.Dialogporten.WebApiClient/README.md b/src/Digdir.Library.Dialogporten.WebApiClient/README.md index 3f30b3f4e..90f02fa59 100644 --- a/src/Digdir.Library.Dialogporten.WebApiClient/README.md +++ b/src/Digdir.Library.Dialogporten.WebApiClient/README.md @@ -2,6 +2,10 @@ Simple overview +Uses maskinporten + +Interface autogenerated with refitter, matches operationId, only ServiceOwner + ## Installation Install nuget @@ -202,4 +206,6 @@ var dict = DialogTokenVerifier.GetDialogTokenClaims(token); API REFERENCE/STRUCTURE +Method name matches with the operationId in the OpenAPI spec + Links to changelog etc. From ff1d0f86c564afa8d06641c558ac9dbf54c48729 Mon Sep 17 00:00:00 2001 From: Amund Myrbostad Date: Thu, 5 Dec 2024 12:47:09 +0100 Subject: [PATCH 42/62] Created Basic test structure --- .../Extensions/ServiceCollectionExtensions.cs | 2 +- .../README.md | 6 +- ...rten.WebApiClient.Integration.Tests.csproj | 7 + .../Tests.cs | 146 + .../refitter/RefitterInterface.cs | 4138 ----------------- 5 files changed, 157 insertions(+), 4142 deletions(-) create mode 100644 tests/Digdir.Library.Dialogporten.WebApiClient.Integration.Tests/Tests.cs delete mode 100644 tests/Digdir.Library.Dialogporten.WebApiClient.Integration.Tests/refitter/RefitterInterface.cs diff --git a/src/Digdir.Library.Dialogporten.WebApiClient/Extensions/ServiceCollectionExtensions.cs b/src/Digdir.Library.Dialogporten.WebApiClient/Extensions/ServiceCollectionExtensions.cs index c73b1fd67..10f3ae30c 100644 --- a/src/Digdir.Library.Dialogporten.WebApiClient/Extensions/ServiceCollectionExtensions.cs +++ b/src/Digdir.Library.Dialogporten.WebApiClient/Extensions/ServiceCollectionExtensions.cs @@ -56,7 +56,7 @@ public static IServiceCollection AddDialogportenClient(this IServiceCollection s var baseAddress = string.Empty; if (dialogportenSettings.Environment == "test") { - baseAddress = "https://localhost:7214"; + baseAddress = "https://platform.tt02.altinn.no/dialogporten"; } // Vi registrerer Refit, og legger til den registrerte maskinporten http message handlern // Amund: Partial er ikke mulig å finne etter compile time. diff --git a/src/Digdir.Library.Dialogporten.WebApiClient/README.md b/src/Digdir.Library.Dialogporten.WebApiClient/README.md index 90f02fa59..1683e4142 100644 --- a/src/Digdir.Library.Dialogporten.WebApiClient/README.md +++ b/src/Digdir.Library.Dialogporten.WebApiClient/README.md @@ -1,10 +1,10 @@ # SO SDK Simple overview +Refit-based client SDK Based on https://github.com/altinn/altinn-apiclient-maskinporten -Uses maskinporten - -Interface autogenerated with refitter, matches operationId, only ServiceOwner +The refit-Interface is autogenerated with refitter. It uses OperationId to create method names. +Uses refit IApiResponse on returns. ## Installation diff --git a/tests/Digdir.Library.Dialogporten.WebApiClient.Integration.Tests/Digdir.Library.Dialogporten.WebApiClient.Integration.Tests.csproj b/tests/Digdir.Library.Dialogporten.WebApiClient.Integration.Tests/Digdir.Library.Dialogporten.WebApiClient.Integration.Tests.csproj index 2a00c6d4d..5705e42bf 100644 --- a/tests/Digdir.Library.Dialogporten.WebApiClient.Integration.Tests/Digdir.Library.Dialogporten.WebApiClient.Integration.Tests.csproj +++ b/tests/Digdir.Library.Dialogporten.WebApiClient.Integration.Tests/Digdir.Library.Dialogporten.WebApiClient.Integration.Tests.csproj @@ -9,6 +9,9 @@ + + + @@ -28,4 +31,8 @@ + + + + diff --git a/tests/Digdir.Library.Dialogporten.WebApiClient.Integration.Tests/Tests.cs b/tests/Digdir.Library.Dialogporten.WebApiClient.Integration.Tests/Tests.cs new file mode 100644 index 000000000..bc13279d6 --- /dev/null +++ b/tests/Digdir.Library.Dialogporten.WebApiClient.Integration.Tests/Tests.cs @@ -0,0 +1,146 @@ +using Digdir.Library.Dialogporten.WebApiClient.Extensions; +using Digdir.Library.Dialogporten.WebApiClient.Features.V1; +using Microsoft.Extensions.Configuration; +using Microsoft.Extensions.DependencyInjection; + +namespace Digdir.Library.Dialogporten.WebApiClient.Integration.Tests; + +public class Tests +{ + [Fact] + public async Task Test() + { + + var configuration = new ConfigurationBuilder().AddUserSecrets().Build(); + // .AddJsonFile("appsettings.local.json", optional: false, reloadOnChange: true) + var services = new ServiceCollection(); + + services.AddSingleton(configuration); + + services.AddDialogportenClient(); + services.AddDialogTokenVerifer(); + var serviceProvider = services.BuildServiceProvider(); + var dialogportenClient = serviceProvider.GetRequiredService(); + var createDialogCommand = CreateCommand(); + var createResponse = await dialogportenClient.V1ServiceOwnerDialogsCreateDialog(createDialogCommand); + Assert.True(createResponse.IsSuccessStatusCode); + Assert.True(Guid.TryParse(createResponse.Content!, out var dialogId)); + var purgeResponse = await dialogportenClient.V1ServiceOwnerDialogsPurgePurgeDialog(dialogId, null); + Assert.True(purgeResponse.IsSuccessStatusCode); + + } + + public static V1ServiceOwnerDialogsCommandsCreate_DialogCommand CreateCommand() + { + var createDialogCommand = new V1ServiceOwnerDialogsCommandsCreate_DialogCommand + { + // createDialogCommand.Id = Guid.Parse("01927a6d-40d8-728b-b3da-845b680840d9"); + ServiceResource = "urn:altinn:resource:super-simple-service", + Party = "urn:altinn:person:identifier-no:14886498226", + SystemLabel = DialogEndUserContextsEntities_SystemLabel.Default, + Status = DialogsEntities_DialogStatus.New, + Progress = 2, + Content = new V1ServiceOwnerDialogsCommandsCreate_Content + { + Title = new V1CommonContent_ContentValue + { + Value = + [ + new V1CommonLocalizations_Localization + { + LanguageCode = "nb", + Value = "Hoved" + }, + new V1CommonLocalizations_Localization + { + LanguageCode = "en", + Value = "Main" + } + ], + MediaType = "text/plain" + }, + Summary = new V1CommonContent_ContentValue + { + Value = + [ + new V1CommonLocalizations_Localization + { + LanguageCode = "nb", + Value = "Hoved Summary" + }, + new V1CommonLocalizations_Localization + { + LanguageCode = "en", + Value = "Main Summary" + } + ], + MediaType = "text/plain" + } + + + }, + Transmissions = + [ + new V1ServiceOwnerDialogsCommandsCreate_Transmission + { + Attachments = + [ + new V1ServiceOwnerDialogsCommandsCreate_TransmissionAttachment + { + DisplayName = + [ + new V1CommonLocalizations_Localization + { + LanguageCode = "nb", + Value = "Hoved misson" + } + ], + Urls = + [ + new V1ServiceOwnerDialogsCommandsCreate_TransmissionAttachmentUrl + { + ConsumerType = Attachments_AttachmentUrlConsumerType.Gui, + Url = new Uri("https://digdir.apps.tt02.altinn.no/some-other-url") + } + ] + + } + ], + Content = new V1ServiceOwnerDialogsCommandsCreate_TransmissionContent + { + Summary = new V1CommonContent_ContentValue + { + MediaType = "text/plain", + Value = + [ + new V1CommonLocalizations_Localization + { + LanguageCode = "nb", + Value = "Tranmission summary" + } + ] + }, + Title = new V1CommonContent_ContentValue + { + MediaType = "text/plain", + Value = + [ + new V1CommonLocalizations_Localization + { + LanguageCode = "nb", + Value = "Tranmission Title" + } + ] + } + }, + Sender = new V1ServiceOwnerCommonActors_Actor + { + ActorType = Actors_ActorType.ServiceOwner + }, + Type = DialogsEntitiesTransmissions_DialogTransmissionType.Information + } + ] + }; + return createDialogCommand; + } +} diff --git a/tests/Digdir.Library.Dialogporten.WebApiClient.Integration.Tests/refitter/RefitterInterface.cs b/tests/Digdir.Library.Dialogporten.WebApiClient.Integration.Tests/refitter/RefitterInterface.cs deleted file mode 100644 index e265659b8..000000000 --- a/tests/Digdir.Library.Dialogporten.WebApiClient.Integration.Tests/refitter/RefitterInterface.cs +++ /dev/null @@ -1,4138 +0,0 @@ -// -// This code was generated by Refitter. -// - - -using Refit; -using System.Collections.Generic; -using System.Text.Json.Serialization; -using System.Threading; -using System.Threading.Tasks; - -#nullable enable annotations - -namespace Digdir.Library.Dialogporten.WebApiClient.Features.V1 -{ - public class V1ServiceOwnerDialogsSearchSearchDialogQueryParams - { - - /// - /// Filter by one or more service resources - /// - [Query(CollectionFormat.Multi)] - public IEnumerable ServiceResource { get; set; } - - /// - /// Filter by one or more owning parties - /// - [Query(CollectionFormat.Multi)] - public IEnumerable Party { get; set; } - - /// - /// Filter by end user id - /// - [Query] - public string EndUserId { get; set; } - - /// - /// Filter by one or more extended statuses - /// - [Query(CollectionFormat.Multi)] - public IEnumerable ExtendedStatus { get; set; } - - /// - /// Filter by external reference - /// - [Query] - public string ExternalReference { get; set; } - - /// - /// Filter by status - /// - [Query(CollectionFormat.Multi)] - public IEnumerable Status { get; set; } - - /// - /// Only return dialogs created after this date - /// - [Query] - public System.DateTimeOffset? CreatedAfter { get; set; } - - /// - /// Only return dialogs created before this date - /// - [Query] - public System.DateTimeOffset? CreatedBefore { get; set; } - - /// - /// Only return dialogs updated after this date - /// - [Query] - public System.DateTimeOffset? UpdatedAfter { get; set; } - - /// - /// Only return dialogs updated before this date - /// - [Query] - public System.DateTimeOffset? UpdatedBefore { get; set; } - - /// - /// Only return dialogs with due date after this date - /// - [Query] - public System.DateTimeOffset? DueAfter { get; set; } - - /// - /// Only return dialogs with due date before this date - /// - [Query] - public System.DateTimeOffset? DueBefore { get; set; } - - /// - /// Only return dialogs with visible-from date after this date - /// - [Query] - public System.DateTimeOffset? VisibleAfter { get; set; } - - /// - /// Only return dialogs with visible-from date before this date - /// - [Query] - public System.DateTimeOffset? VisibleBefore { get; set; } - - /// - /// Filter by process - /// - [Query] - public string Process { get; set; } - - /// - /// Filter by Display state - /// - [Query(CollectionFormat.Multi)] - public IEnumerable SystemLabel { get; set; } - - /// - /// Search string for free text search. Will attempt to fuzzily match in all free text fields in the aggregate - /// - [Query] - public string Search { get; set; } - - /// - /// Limit free text search to texts with this language code, e.g. 'no', 'en'. Culture codes will be normalized to neutral language codes (ISO 639). Default: search all culture codes - /// - [Query] - public string SearchLanguageCode { get; set; } - - [Query] - public OrderSetOfTOrderDefinitionAndTTarget OrderBy { get; set; } - - /// - /// Supply "continuationToken" for the response to get the next page of results, if hasNextPage is true - /// - [Query] - public ContinuationTokenSetOfTOrderDefinitionAndTTarget ContinuationToken { get; set; } - - /// - /// Limit the number of results per page (1-1000, default: 100) - /// - [Query] - public int? Limit { get; set; } - - } - - public class V1ServiceOwnerDialogActivitiesNotificationConditionNotificationConditionQueryParams - { - public V1ServiceOwnerDialogActivitiesNotificationConditionNotificationConditionQueryParams(V1ServiceOwnerDialogActivitiesQueriesNotificationCondition_NotificationConditionType conditionType, DialogsEntitiesActivities_DialogActivityType activityType) - { - - ConditionType = conditionType; - ActivityType = activityType; - } - - [Query] - public V1ServiceOwnerDialogActivitiesQueriesNotificationCondition_NotificationConditionType ConditionType { get; set; } - - [Query] - public DialogsEntitiesActivities_DialogActivityType ActivityType { get; set; } - - [Query] - public System.Guid? TransmissionId { get; set; } - - } - - /// Gets a list of dialogs - [System.CodeDom.Compiler.GeneratedCode("Refitter", "1.4.1.0")] - public partial interface IServiceownerApi - { - /// Gets a list of dialogs - /// - /// Performs a search for dialogs, returning a paginated list of dialogs. For more information see the documentation (link TBD). - /// - /// * All date parameters must contain explicit time zone. Example: 2023-10-27T10:00:00Z or 2023-10-27T10:00:00+01:00 - /// * See "continuationToken" in the response for how to get the next page of results. - /// * hasNextPage will be set to true if there are more items to get. - /// - /// The dynamic querystring parameter wrapping all others. - /// - /// A representing the instance containing the result: - /// - /// - /// Status - /// Description - /// - /// - /// 200 - /// Successfully returned the dialog list. - /// - /// - /// 401 - /// Missing or invalid authentication token. Requires a Maskinporten-token with the scope \"digdir:dialogporten.serviceprovider.search\". - /// - /// - /// - [Headers("Accept: application/json")] - [Get("/api/v1/serviceowner/dialogs")] - Task> V1ServiceOwnerDialogsSearchSearchDialog([Query] V1ServiceOwnerDialogsSearchSearchDialogQueryParams queryParams, CancellationToken cancellationToken = default); - - /// Creates a new dialog - /// - /// The dialog is created with the given configuration. For more information see the documentation (link TBD). - /// - /// For detailed information on validation rules, see [the source for CreateDialogCommandValidator](https://github.com/digdir/dialogporten/blob/main/src/Digdir.Domain.Dialogporten.Application/Features/V1/ServiceOwner/Dialogs/Commands/Create/CreateDialogCommandValidator.cs) - /// - /// - /// A representing the instance containing the result: - /// - /// - /// Status - /// Description - /// - /// - /// 201 - /// The UUID of the created the dialog aggregate. A relative URL to the newly created activity is set in the \"Location\" header. - /// - /// - /// 400 - /// Validation error occured. See problem details for a list of errors. - /// - /// - /// 401 - /// Missing or invalid authentication token. Requires a Maskinporten-token with the scope \"digdir:dialogporten.serviceprovider\". - /// - /// - /// 403 - /// Unauthorized to create a dialog for the given serviceResource (not owned by authenticated organization or has additional scope requirements defined in policy). - /// - /// - /// 422 - /// Domain error occured. See problem details for a list of errors. - /// - /// - /// - [Headers("Accept: application/json, application/problem+json")] - [Post("/api/v1/serviceowner/dialogs")] - Task> V1ServiceOwnerDialogsCreateDialog([Body, AliasAs("CreateDialogCommand")] V1ServiceOwnerDialogsCommandsCreate_DialogCommand createDialogCommand, CancellationToken cancellationToken = default); - - /// Deletes a dialog - /// - /// Deletes a given dialog (soft delete). For more information see the documentation (link TBD). - /// - /// Note that the dialog will still be available on the single details endpoint, but will have a deleted status. It will not appear on the list endpoint for either service owners nor end users. - /// If end users attempt to access the dialog via the details endpoint, they will get a 410 Gone response. - /// - /// Optimistic concurrency control is implemented using the If-Match header. Supply the Revision value from the GetDialog endpoint to ensure that the dialog is not deleted by another request in the meantime. - /// - /// - /// A representing the instance containing the result: - /// - /// - /// Status - /// Description - /// - /// - /// 204 - /// The dialog aggregate was deleted successfully. - /// - /// - /// 401 - /// Missing or invalid authentication token. Requires a Maskinporten-token with the scope \"digdir:dialogporten.serviceprovider\". - /// - /// - /// 403 - /// Unauthorized to delete the supplied dialog (not owned by authenticated organization or has additional scope requirements defined in policy). - /// - /// - /// 404 - /// The given dialog ID was not found or is already deleted. - /// - /// - /// 412 - /// The supplied If-Match header did not match the current Revision value for the dialog. The request was not applied. - /// - /// - /// - [Headers("Accept: application/problem+json")] - [Delete("/api/v1/serviceowner/dialogs/{dialogId}")] - Task V1ServiceOwnerDialogsDeleteDialog(System.Guid dialogId, [Header("if-Match")] System.Guid? if_Match, CancellationToken cancellationToken = default); - - /// Gets a single dialog - /// - /// Gets a single dialog aggregate. For more information see the documentation (link TBD). - /// - /// Note that this operation may return deleted dialogs (see the field `DeletedAt`). - /// - /// Filter by end user id - /// - /// A representing the instance containing the result: - /// - /// - /// Status - /// Description - /// - /// - /// 200 - /// Successfully returned the dialog aggregate. - /// - /// - /// 401 - /// Missing or invalid authentication token. Requires a Maskinporten-token with the scope \"digdir:dialogporten.serviceprovider\". - /// - /// - /// 403 - /// Unauthorized to get the supplied dialog (not owned by authenticated organization or has additional scope requirements defined in policy). - /// - /// - /// 404 - /// The given dialog ID was not found or is already deleted. - /// - /// - /// - [Headers("Accept: application/json, application/problem+json")] - [Get("/api/v1/serviceowner/dialogs/{dialogId}")] - Task> V1ServiceOwnerDialogsGetGetDialog(System.Guid dialogId, [Query] string endUserId, CancellationToken cancellationToken = default); - - /// Patch a single dialog - /// - /// Patches a dialog aggregate with a RFC6902 JSON Patch document. The patch document must be a JSON array of RFC6902 operations. - /// See [https://tools.ietf.org/html/rfc6902](https://tools.ietf.org/html/rfc6902) for more information. - /// - /// Optimistic concurrency control is implemented using the If-Match header. Supply the Revision value from the GetDialog endpoint to ensure that the dialog is not modified/deleted by another request in the meantime. - /// - /// - /// A representing the instance containing the result: - /// - /// - /// Status - /// Description - /// - /// - /// 204 - /// Patch was successfully applied. - /// - /// - /// 400 - /// Validation error occured. See problem details for a list of errors. - /// - /// - /// 401 - /// Missing or invalid authentication token. Requires a Maskinporten-token with the scope \\\"digdir:dialogporten.serviceprovider\\\" - /// - /// - /// 403 - /// Unauthorized to update a dialog for the given serviceResource (not owned by authenticated organization or has additional scope requirements defined in policy) - /// - /// - /// 404 - /// The given dialog ID was not found or is deleted - /// - /// - /// 412 - /// The supplied Revision does not match the current Revision of the dialog - /// - /// - /// 422 - /// Domain error occured. See problem details for a list of errors. - /// - /// - /// - [Headers("Accept: application/json")] - [Patch("/api/v1/serviceowner/dialogs/{dialogId}")] - Task V1ServiceOwnerDialogsPatchDialog(System.Guid dialogId, [Body] IEnumerable patchDocument, [Header("If-Match")] System.Guid? etag, CancellationToken cancellationToken = default); - - /// Replaces a dialog - /// - /// Replaces a given dialog with the supplied model. For more information see the documentation (link TBD). - /// - /// Optimistic concurrency control is implemented using the If-Match header. Supply the Revision value from the GetDialog endpoint to ensure that the dialog is not modified/deleted by another request in the meantime. - /// - /// - /// A representing the instance containing the result: - /// - /// - /// Status - /// Description - /// - /// - /// 204 - /// The dialog aggregate was updated successfully. - /// - /// - /// 400 - /// Validation error occured. See problem details for a list of errors. - /// - /// - /// 401 - /// Missing or invalid authentication token. Requires a Maskinporten-token with the scope \"digdir:dialogporten.serviceprovider\". - /// - /// - /// 403 - /// Unauthorized to update the supplied dialog (not owned by authenticated organization or has additional scope requirements defined in policy). - /// - /// - /// 404 - /// The given dialog ID was not found or is already deleted. - /// - /// - /// 412 - /// The supplied If-Match header did not match the current Revision value for the dialog. The request was not applied. - /// - /// - /// 422 - /// Domain error occured. See problem details for a list of errors. - /// - /// - /// - [Headers("Accept: application/problem+json")] - [Put("/api/v1/serviceowner/dialogs/{dialogId}")] - Task V1ServiceOwnerDialogsUpdateDialog(System.Guid dialogId, [Body] V1ServiceOwnerDialogsCommandsUpdate_Dialog dto, [Header("if-Match")] System.Guid? if_Match, CancellationToken cancellationToken = default); - - /// Permanently deletes a dialog - /// - /// Deletes a given dialog (hard delete). For more information see the documentation (link TBD). - /// - /// Optimistic concurrency control is implemented using the If-Match header. Supply the Revision value from the GetDialog endpoint to ensure that the dialog is not deleted by another request in the meantime. - /// - /// - /// A representing the instance containing the result: - /// - /// - /// Status - /// Description - /// - /// - /// 204 - /// The dialog aggregate was deleted successfully. - /// - /// - /// 401 - /// Missing or invalid authentication token. Requires a Maskinporten-token with the scope \"digdir:dialogporten.serviceprovider\". - /// - /// - /// 403 - /// Unauthorized to delete the supplied dialog (not owned by authenticated organization or has additional scope requirements defined in policy). - /// - /// - /// 404 - /// The given dialog ID was not found or is already deleted. - /// - /// - /// 412 - /// The supplied If-Match header did not match the current Revision value for the dialog. The request was not applied. - /// - /// - /// - [Headers("Accept: application/problem+json")] - [Post("/api/v1/serviceowner/dialogs/{dialogId}/actions/purge")] - Task V1ServiceOwnerDialogsPurgePurgeDialog(System.Guid dialogId, [Header("if-Match")] System.Guid? if_Match, CancellationToken cancellationToken = default); - - /// Returns a boolean value based on conditions used to determine if a notification is to be sent - /// Used by Altinn Notification only. Takes a dialogId and returns a boolean value based on conditions used to determine if a notification is to be sent. - /// The dynamic querystring parameter wrapping all others. - /// - /// A representing the instance containing the result: - /// - /// - /// Status - /// Description - /// - /// - /// 200 - /// Successfully returned the notification determination. - /// - /// - /// 401 - /// Missing or invalid authentication token. Requires a Maskinporten-token with the scope \"altinn:system/notifications.condition.check\". - /// - /// - /// 403 - /// Forbidden - /// - /// - /// - [Headers("Accept: application/json")] - [Get("/api/v1/serviceowner/dialogs/{dialogId}/actions/should-send-notification")] - Task> V1ServiceOwnerDialogActivitiesNotificationConditionNotificationCondition(System.Guid dialogId, [Query] V1ServiceOwnerDialogActivitiesNotificationConditionNotificationConditionQueryParams queryParams, CancellationToken cancellationToken = default); - - /// Gets a list of dialog activities - /// Gets the list of activities belonging to a dialog - /// - /// A representing the instance containing the result: - /// - /// - /// Status - /// Description - /// - /// - /// 200 - /// Successfully returned the dialog activity list. - /// - /// - /// 401 - /// Missing or invalid authentication token. Requires a Maskinporten-token with the scope \"digdir:dialogporten.serviceprovider\". - /// - /// - /// 403 - /// Unauthorized to get the supplied dialog (not owned by authenticated organization or has additional scope requirements defined in policy). - /// - /// - /// - [Headers("Accept: application/json")] - [Get("/api/v1/serviceowner/dialogs/{dialogId}/activities")] - Task>> V1ServiceOwnerDialogActivitiesSearchSearchDialogActivity(System.Guid dialogId, CancellationToken cancellationToken = default); - - /// Adds a activity to a dialogs activity history - /// - /// The activity is created with the given configuration. For more information see the documentation (link TBD). - /// - /// Optimistic concurrency control is implemented using the If-Match header. Supply the Revision value from the GetDialog endpoint to ensure that the dialog is not modified/deleted by another request in the meantime. - /// - /// - /// A representing the instance containing the result: - /// - /// - /// Status - /// Description - /// - /// - /// 201 - /// The UUID of the created the dialog activity. A relative URL to the newly created activity is set in the \"Location\" header. - /// - /// - /// 400 - /// Validation error occured. See problem details for a list of errors. - /// - /// - /// 401 - /// Missing or invalid authentication token. Requires a Maskinporten-token with the scope \"digdir:dialogporten.serviceprovider\". - /// - /// - /// 403 - /// Unauthorized to create child entity for the given dialog (dialog not owned by authenticated organization or has additional scope requirements defined in service identifiers policy). - /// - /// - /// 404 - /// The given dialog ID was not found or is already deleted. - /// - /// - /// 412 - /// The supplied If-Match header did not match the current Revision value for the dialog. The request was not applied. - /// - /// - /// 422 - /// Domain error occured. See problem details for a list of errors. - /// - /// - /// - [Headers("Accept: application/json, application/problem+json")] - [Post("/api/v1/serviceowner/dialogs/{dialogId}/activities")] - Task> V1ServiceOwnerDialogActivitiesCreateDialogActivity(System.Guid dialogId, [Body, AliasAs("CreateActivityRequest")] V1ServiceOwnerDialogActivitiesCreate_ActivityRequest createActivityRequest, [Header("if-Match")] System.Guid? if_Match, CancellationToken cancellationToken = default); - - /// Gets a single dialog activity - /// Gets a single activity belonging to a dialog. For more information see the documentation (link TBD). - /// - /// A representing the instance containing the result: - /// - /// - /// Status - /// Description - /// - /// - /// 200 - /// Successfully returned the dialog activity. - /// - /// - /// 401 - /// Missing or invalid authentication token. Requires a Maskinporten-token with the scope \"digdir:dialogporten.serviceprovider\". - /// - /// - /// 403 - /// Unauthorized to get child entity for the given dialog (dialog not owned by authenticated organization or has additional scope requirements defined in service identifiers policy). - /// - /// - /// 404 - /// The given dialog ID was not found or was deleted, or the given activity ID was not found. - /// - /// - /// - [Headers("Accept: application/json, application/problem+json")] - [Get("/api/v1/serviceowner/dialogs/{dialogId}/activities/{activityId}")] - Task> V1ServiceOwnerDialogActivitiesGetGetDialogActivity(System.Guid dialogId, System.Guid activityId, CancellationToken cancellationToken = default); - - /// Gets all seen log records for a dialog - /// Gets all seen log records for a dialog. For more information see the documentation (link TBD). - /// - /// A representing the instance containing the result: - /// - /// - /// Status - /// Description - /// - /// - /// 200 - /// Successfully returned the dialog seen log records. - /// - /// - /// 401 - /// Unauthorized - /// - /// - /// 403 - /// Forbidden - /// - /// - /// 404 - /// Not Found - /// - /// - /// - [Headers("Accept: application/json, application/problem+json")] - [Get("/api/v1/serviceowner/dialogs/{dialogId}/seenlog")] - Task>> V1ServiceOwnerDialogSeenLogsSearchSearchDialogSeenLog(System.Guid dialogId, CancellationToken cancellationToken = default); - - /// Gets a single dialog seen log record - /// Gets a single dialog seen log record. For more information see the documentation (link TBD). - /// - /// A representing the instance containing the result: - /// - /// - /// Status - /// Description - /// - /// - /// 200 - /// Successfully returned the dialog seen log record. - /// - /// - /// 401 - /// Unauthorized - /// - /// - /// 403 - /// Forbidden - /// - /// - /// 404 - /// Not Found - /// - /// - /// - [Headers("Accept: application/json, application/problem+json")] - [Get("/api/v1/serviceowner/dialogs/{dialogId}/seenlog/{seenLogId}")] - Task> V1ServiceOwnerDialogSeenLogsGetGetDialogSeenLog(System.Guid dialogId, System.Guid seenLogId, CancellationToken cancellationToken = default); - - /// Gets a list of dialog transmissions - /// Gets the list of transmissions belonging to a dialog - /// - /// A representing the instance containing the result: - /// - /// - /// Status - /// Description - /// - /// - /// 200 - /// Successfully returned the dialog transmission list. - /// - /// - /// 401 - /// Missing or invalid authentication token. Requires a Maskinporten-token with the scope \"digdir:dialogporten.serviceprovider\". - /// - /// - /// 403 - /// Unauthorized to get the supplied dialog (not owned by authenticated organization or has additional scope requirements defined in policy). - /// - /// - /// 404 - /// The given dialog ID was not found or is already deleted. - /// - /// - /// - [Headers("Accept: application/json, application/problem+json")] - [Get("/api/v1/serviceowner/dialogs/{dialogId}/transmissions")] - Task> V1ServiceOwnerDialogTransmissionsSearchSearchDialogTransmission(System.Guid dialogId, CancellationToken cancellationToken = default); - - /// Adds a transmission to a dialog - /// - /// The transmission is created with the given configuration. For more information see the documentation (link TBD). - /// - /// Optimistic concurrency control is implemented using the If-Match header. Supply the Revision value from the GetDialog endpoint to ensure that the dialog is not modified/deleted by another request in the meantime. - /// - /// - /// A representing the instance containing the result: - /// - /// - /// Status - /// Description - /// - /// - /// 201 - /// The UUID of the created the dialog transmission. A relative URL to the newly created activity is set in the \"Location\" header. - /// - /// - /// 400 - /// Validation error occured. See problem details for a list of errors. - /// - /// - /// 401 - /// Missing or invalid authentication token. Requires a Maskinporten-token with the scope \"digdir:dialogporten.serviceprovider\". - /// - /// - /// 403 - /// Unauthorized to create child entity for the given dialog (dialog not owned by authenticated organization or has additional scope requirements defined in service identifiers policy). - /// - /// - /// 404 - /// The given dialog ID was not found or is already deleted. - /// - /// - /// 412 - /// The supplied If-Match header did not match the current Revision value for the dialog. The request was not applied. - /// - /// - /// 422 - /// Domain error occured. See problem details for a list of errors. - /// - /// - /// - [Headers("Accept: application/json, application/problem+json")] - [Post("/api/v1/serviceowner/dialogs/{dialogId}/transmissions")] - Task> V1ServiceOwnerDialogTransmissionsCreateDialogTransmission(System.Guid dialogId, [Body, AliasAs("CreateTransmissionRequest")] V1ServiceOwnerDialogTransmissionsCreate_TransmissionRequest createTransmissionRequest, [Header("if-Match")] System.Guid? if_Match, CancellationToken cancellationToken = default); - - /// Gets a single dialog transmission - /// Gets a single transmission belonging to a dialog. For more information see the documentation (link TBD). - /// - /// A representing the instance containing the result: - /// - /// - /// Status - /// Description - /// - /// - /// 200 - /// Successfully returned the dialog transmission. - /// - /// - /// 401 - /// Missing or invalid authentication token. Requires a Maskinporten-token with the scope \"digdir:dialogporten.serviceprovider\". - /// - /// - /// 403 - /// Unauthorized to get child entity for the given dialog (dialog not owned by authenticated organization or has additional scope requirements defined in service identifiers policy). - /// - /// - /// 404 - /// The given dialog ID was not found or was deleted, or the given transmission ID was not found. - /// - /// - /// - [Headers("Accept: application/json, application/problem+json")] - [Get("/api/v1/serviceowner/dialogs/{dialogId}/transmissions/{transmissionId}")] - Task> V1ServiceOwnerDialogTransmissionsGetGetDialogTransmission(System.Guid dialogId, System.Guid transmissionId, CancellationToken cancellationToken = default); - } - -} - -//---------------------- -// -// Generated using the NSwag toolchain v14.2.0.0 (NJsonSchema v11.1.0.0 (Newtonsoft.Json v13.0.0.0)) (http://NSwag.org) -// -//---------------------- - -#pragma warning disable 108 // Disable "CS0108 '{derivedDto}.ToJson()' hides inherited member '{dtoBase}.ToJson()'. Use the new keyword if hiding was intended." -#pragma warning disable 114 // Disable "CS0114 '{derivedDto}.RaisePropertyChanged(String)' hides inherited member 'dtoBase.RaisePropertyChanged(String)'. To make the current member override that implementation, add the override keyword. Otherwise add the new keyword." -#pragma warning disable 472 // Disable "CS0472 The result of the expression is always 'false' since a value of type 'Int32' is never equal to 'null' of type 'Int32?' -#pragma warning disable 612 // Disable "CS0612 '...' is obsolete" -#pragma warning disable 649 // Disable "CS0649 Field is never assigned to, and will always have its default value null" -#pragma warning disable 1573 // Disable "CS1573 Parameter '...' has no matching param tag in the XML comment for ... -#pragma warning disable 1591 // Disable "CS1591 Missing XML comment for publicly visible type or member ..." -#pragma warning disable 8073 // Disable "CS8073 The result of the expression is always 'false' since a value of type 'T' is never equal to 'null' of type 'T?'" -#pragma warning disable 3016 // Disable "CS3016 Arrays as attribute arguments is not CLS-compliant" -#pragma warning disable 8603 // Disable "CS8603 Possible null reference return" -#pragma warning disable 8604 // Disable "CS8604 Possible null reference argument for parameter" -#pragma warning disable 8625 // Disable "CS8625 Cannot convert null literal to non-nullable reference type" -#pragma warning disable 8765 // Disable "CS8765 Nullability of type of parameter doesn't match overridden member (possibly because of nullability attributes)." - -namespace Digdir.Library.Dialogporten.WebApiClient.Features.V1 -{ - using System = global::System; - - - - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "14.2.0.0 (NJsonSchema v11.1.0.0 (Newtonsoft.Json v13.0.0.0))")] - public enum Actors_ActorType - { - - [System.Runtime.Serialization.EnumMember(Value = @"PartyRepresentative")] - PartyRepresentative = 0, - - [System.Runtime.Serialization.EnumMember(Value = @"ServiceOwner")] - ServiceOwner = 1, - - } - - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "14.2.0.0 (NJsonSchema v11.1.0.0 (Newtonsoft.Json v13.0.0.0))")] - public enum Attachments_AttachmentUrlConsumerType - { - - [System.Runtime.Serialization.EnumMember(Value = @"Gui")] - Gui = 0, - - [System.Runtime.Serialization.EnumMember(Value = @"Api")] - Api = 1, - - } - - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "14.2.0.0 (NJsonSchema v11.1.0.0 (Newtonsoft.Json v13.0.0.0))")] - public partial class ContinuationTokenSetOfTOrderDefinitionAndTTarget - { - - private IDictionary _additionalProperties; - - [JsonExtensionData] - public IDictionary AdditionalProperties - { - get { return _additionalProperties ?? (_additionalProperties = new Dictionary()); } - set { _additionalProperties = value; } - } - - } - - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "14.2.0.0 (NJsonSchema v11.1.0.0 (Newtonsoft.Json v13.0.0.0))")] - public enum DialogEndUserContextsEntities_SystemLabel - { - - [System.Runtime.Serialization.EnumMember(Value = @"Default")] - Default = 0, - - [System.Runtime.Serialization.EnumMember(Value = @"Bin")] - Bin = 1, - - [System.Runtime.Serialization.EnumMember(Value = @"Archive")] - Archive = 2, - - } - - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "14.2.0.0 (NJsonSchema v11.1.0.0 (Newtonsoft.Json v13.0.0.0))")] - public enum DialogsEntities_DialogStatus - { - - [System.Runtime.Serialization.EnumMember(Value = @"New")] - New = 0, - - [System.Runtime.Serialization.EnumMember(Value = @"InProgress")] - InProgress = 1, - - [System.Runtime.Serialization.EnumMember(Value = @"Draft")] - Draft = 2, - - [System.Runtime.Serialization.EnumMember(Value = @"Sent")] - Sent = 3, - - [System.Runtime.Serialization.EnumMember(Value = @"RequiresAttention")] - RequiresAttention = 4, - - [System.Runtime.Serialization.EnumMember(Value = @"Completed")] - Completed = 5, - - } - - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "14.2.0.0 (NJsonSchema v11.1.0.0 (Newtonsoft.Json v13.0.0.0))")] - public enum DialogsEntitiesActions_DialogGuiActionPriority - { - - [System.Runtime.Serialization.EnumMember(Value = @"Primary")] - Primary = 0, - - [System.Runtime.Serialization.EnumMember(Value = @"Secondary")] - Secondary = 1, - - [System.Runtime.Serialization.EnumMember(Value = @"Tertiary")] - Tertiary = 2, - - } - - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "14.2.0.0 (NJsonSchema v11.1.0.0 (Newtonsoft.Json v13.0.0.0))")] - public enum DialogsEntitiesActivities_DialogActivityType - { - - [System.Runtime.Serialization.EnumMember(Value = @"DialogCreated")] - DialogCreated = 0, - - [System.Runtime.Serialization.EnumMember(Value = @"DialogClosed")] - DialogClosed = 1, - - [System.Runtime.Serialization.EnumMember(Value = @"Information")] - Information = 2, - - [System.Runtime.Serialization.EnumMember(Value = @"TransmissionOpened")] - TransmissionOpened = 3, - - [System.Runtime.Serialization.EnumMember(Value = @"PaymentMade")] - PaymentMade = 4, - - [System.Runtime.Serialization.EnumMember(Value = @"SignatureProvided")] - SignatureProvided = 5, - - [System.Runtime.Serialization.EnumMember(Value = @"DialogOpened")] - DialogOpened = 6, - - } - - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "14.2.0.0 (NJsonSchema v11.1.0.0 (Newtonsoft.Json v13.0.0.0))")] - public enum DialogsEntitiesTransmissions_DialogTransmissionType - { - - [System.Runtime.Serialization.EnumMember(Value = @"Information")] - Information = 0, - - [System.Runtime.Serialization.EnumMember(Value = @"Acceptance")] - Acceptance = 1, - - [System.Runtime.Serialization.EnumMember(Value = @"Rejection")] - Rejection = 2, - - [System.Runtime.Serialization.EnumMember(Value = @"Request")] - Request = 3, - - [System.Runtime.Serialization.EnumMember(Value = @"Alert")] - Alert = 4, - - [System.Runtime.Serialization.EnumMember(Value = @"Decision")] - Decision = 5, - - [System.Runtime.Serialization.EnumMember(Value = @"Submission")] - Submission = 6, - - [System.Runtime.Serialization.EnumMember(Value = @"Correction")] - Correction = 7, - - } - - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "14.2.0.0 (NJsonSchema v11.1.0.0 (Newtonsoft.Json v13.0.0.0))")] - public enum Http_HttpVerb - { - - [System.Runtime.Serialization.EnumMember(Value = @"GET")] - GET = 0, - - [System.Runtime.Serialization.EnumMember(Value = @"POST")] - POST = 1, - - [System.Runtime.Serialization.EnumMember(Value = @"PUT")] - PUT = 2, - - [System.Runtime.Serialization.EnumMember(Value = @"PATCH")] - PATCH = 3, - - [System.Runtime.Serialization.EnumMember(Value = @"DELETE")] - DELETE = 4, - - [System.Runtime.Serialization.EnumMember(Value = @"HEAD")] - HEAD = 5, - - [System.Runtime.Serialization.EnumMember(Value = @"OPTIONS")] - OPTIONS = 6, - - [System.Runtime.Serialization.EnumMember(Value = @"TRACE")] - TRACE = 7, - - [System.Runtime.Serialization.EnumMember(Value = @"CONNECT")] - CONNECT = 8, - - } - - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "14.2.0.0 (NJsonSchema v11.1.0.0 (Newtonsoft.Json v13.0.0.0))")] - public partial class JsonPatchOperations_Operation - { - - [JsonPropertyName("from")] - public string From { get; set; } - - [JsonPropertyName("op")] - public string Op { get; set; } - - [JsonPropertyName("operationType")] - [JsonConverter(typeof(JsonStringEnumConverter))] - public JsonPatchOperations_OperationType OperationType { get; set; } - - [JsonPropertyName("path")] - public string Path { get; set; } - - [JsonPropertyName("value")] - public object Value { get; set; } - - } - - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "14.2.0.0 (NJsonSchema v11.1.0.0 (Newtonsoft.Json v13.0.0.0))")] - public enum JsonPatchOperations_OperationType - { - - [System.Runtime.Serialization.EnumMember(Value = @"Add")] - Add = 0, - - [System.Runtime.Serialization.EnumMember(Value = @"Remove")] - Remove = 1, - - [System.Runtime.Serialization.EnumMember(Value = @"Replace")] - Replace = 2, - - [System.Runtime.Serialization.EnumMember(Value = @"Move")] - Move = 3, - - [System.Runtime.Serialization.EnumMember(Value = @"Copy")] - Copy = 4, - - [System.Runtime.Serialization.EnumMember(Value = @"Test")] - Test = 5, - - [System.Runtime.Serialization.EnumMember(Value = @"Invalid")] - Invalid = 6, - - } - - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "14.2.0.0 (NJsonSchema v11.1.0.0 (Newtonsoft.Json v13.0.0.0))")] - public partial class OrderSetOfTOrderDefinitionAndTTarget - { - - private IDictionary _additionalProperties; - - [JsonExtensionData] - public IDictionary AdditionalProperties - { - get { return _additionalProperties ?? (_additionalProperties = new Dictionary()); } - set { _additionalProperties = value; } - } - - } - - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "14.2.0.0 (NJsonSchema v11.1.0.0 (Newtonsoft.Json v13.0.0.0))")] - public partial class PaginatedListOfV1ServiceOwnerDialogsQueriesSearch_Dialog - { - /// - /// The continuation token to be used to fetch the next page of items - /// - - [JsonPropertyName("continuationToken")] - public string ContinuationToken { get; set; } - - /// - /// Whether there are more items available that can be fetched by supplying the continuation token - /// - - [JsonPropertyName("hasNextPage")] - public bool HasNextPage { get; set; } - - /// - /// The paginated list of items - /// - - [JsonPropertyName("items")] - public ICollection Items { get; set; } - - /// - /// The current sorting order of the items - /// - - [JsonPropertyName("orderBy")] - public string OrderBy { get; set; } - - } - - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "14.2.0.0 (NJsonSchema v11.1.0.0 (Newtonsoft.Json v13.0.0.0))")] - public partial class ProblemDetails - { - - [JsonPropertyName("detail")] - public string Detail { get; set; } - - [JsonPropertyName("errors")] - public ICollection Errors { get; set; } - - [JsonPropertyName("instance")] - public string Instance { get; set; } = "/api/route"; - - [JsonPropertyName("status")] - public int Status { get; set; } = 400; - - [JsonPropertyName("title")] - public string Title { get; set; } = "One or more validation errors occurred."; - - [JsonPropertyName("traceId")] - public string TraceId { get; set; } = "0HMPNHL0JHL76:00000001"; - - [JsonPropertyName("type")] - public string Type { get; set; } = "https://www.rfc-editor.org/rfc/rfc7231#section-6.5.1"; - - } - - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "14.2.0.0 (NJsonSchema v11.1.0.0 (Newtonsoft.Json v13.0.0.0))")] - public partial class ProblemDetails_Error - { - - [JsonPropertyName("code")] - public string Code { get; set; } - - [JsonPropertyName("name")] - public string Name { get; set; } = "Error or field name"; - - [JsonPropertyName("reason")] - public string Reason { get; set; } = "Error reason"; - - [JsonPropertyName("severity")] - public string Severity { get; set; } - - } - - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "14.2.0.0 (NJsonSchema v11.1.0.0 (Newtonsoft.Json v13.0.0.0))")] - public partial class V1CommonContent_ContentValue - { - /// - /// Media type of the content (plaintext, Markdown). Can also indicate that the content is embeddable. - /// - - [JsonPropertyName("mediaType")] - public string MediaType { get; set; } - - /// - /// A list of localizations for the content. - /// - - [JsonPropertyName("value")] - public ICollection Value { get; set; } - - } - - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "14.2.0.0 (NJsonSchema v11.1.0.0 (Newtonsoft.Json v13.0.0.0))")] - public partial class V1CommonLocalizations_Localization - { - /// - /// The language code of the localization in ISO 639-1 format. - /// - - [JsonPropertyName("languageCode")] - public string LanguageCode { get; set; } - - /// - /// The localized text or URI reference. - /// - - [JsonPropertyName("value")] - public string Value { get; set; } - - } - - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "14.2.0.0 (NJsonSchema v11.1.0.0 (Newtonsoft.Json v13.0.0.0))")] - public partial class V1ServiceOwnerCommonActors_Actor - { - /// - /// The identifier of the person or organization that sent the transmission. Mutually exclusive with ActorName. - ///
Might be omitted if ActorType is "ServiceOwner". - ///
- - [JsonPropertyName("actorId")] - public string ActorId { get; set; } - - /// - /// Specifies the name of the entity that sent the transmission. Mutually exclusive with ActorId. If ActorId - ///
is supplied, the name will be automatically populated from the name registries. - ///
- - [JsonPropertyName("actorName")] - public string ActorName { get; set; } - - /// - /// The type of actor that sent the transmission. - /// - - [JsonPropertyName("actorType")] - [JsonConverter(typeof(JsonStringEnumConverter))] - public Actors_ActorType ActorType { get; set; } - - } - - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "14.2.0.0 (NJsonSchema v11.1.0.0 (Newtonsoft.Json v13.0.0.0))")] - public partial class V1ServiceOwnerDialogActivitiesCreate_ActivityRequest - { - /// - /// If supplied, overrides the creating date and time for the transmission. - ///
If not supplied, the current date /time will be used. - ///
- - [JsonPropertyName("createdAt")] - public System.DateTimeOffset? CreatedAt { get; set; } - - /// - /// Unstructured text describing the activity. Only set if the activity type is "Information". - /// - - [JsonPropertyName("description")] - public ICollection Description { get; set; } - - /// - /// Arbitrary URI/URN describing a service-specific transmission type. - /// - - [JsonPropertyName("extendedType")] - public System.Uri ExtendedType { get; set; } - - /// - /// The UUDIv7 of the action may be provided to support idempotent additions to the list of activities. - ///
If not supplied, a new UUIDv7 will be generated. - ///
- - [JsonPropertyName("id")] - public System.Guid? Id { get; set; } - - /// - /// The actor that performed the activity. - /// - - [JsonPropertyName("performedBy")] - public V1ServiceOwnerCommonActors_Actor PerformedBy { get; set; } - - /// - /// If the activity is related to a particular transmission, this field will contain the transmission identifier. - ///
Must be present in the request body. - ///
- - [JsonPropertyName("transmissionId")] - public System.Guid? TransmissionId { get; set; } - - /// - /// The type of transmission. - /// - - [JsonPropertyName("type")] - [JsonConverter(typeof(JsonStringEnumConverter))] - public DialogsEntitiesActivities_DialogActivityType Type { get; set; } - - } - - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "14.2.0.0 (NJsonSchema v11.1.0.0 (Newtonsoft.Json v13.0.0.0))")] - public partial class V1ServiceOwnerDialogActivitiesQueriesGet_Activity - { - - [JsonPropertyName("createdAt")] - public System.DateTimeOffset? CreatedAt { get; set; } - - [JsonPropertyName("deletedAt")] - public System.DateTimeOffset? DeletedAt { get; set; } - - [JsonPropertyName("description")] - public ICollection Description { get; set; } - - [JsonPropertyName("extendedType")] - public System.Uri ExtendedType { get; set; } - - [JsonPropertyName("id")] - public System.Guid Id { get; set; } - - [JsonPropertyName("performedBy")] - public V1ServiceOwnerCommonActors_Actor PerformedBy { get; set; } - - [JsonPropertyName("transmissionId")] - public System.Guid? TransmissionId { get; set; } - - [JsonPropertyName("type")] - [JsonConverter(typeof(JsonStringEnumConverter))] - public DialogsEntitiesActivities_DialogActivityType Type { get; set; } - - } - - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "14.2.0.0 (NJsonSchema v11.1.0.0 (Newtonsoft.Json v13.0.0.0))")] - public partial class V1ServiceOwnerDialogActivitiesQueriesNotificationCondition_NotificationCondition - { - - [JsonPropertyName("sendNotification")] - public bool SendNotification { get; set; } - - } - - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "14.2.0.0 (NJsonSchema v11.1.0.0 (Newtonsoft.Json v13.0.0.0))")] - public enum V1ServiceOwnerDialogActivitiesQueriesNotificationCondition_NotificationConditionType - { - - [System.Runtime.Serialization.EnumMember(Value = @"NotExists")] - NotExists = 0, - - [System.Runtime.Serialization.EnumMember(Value = @"Exists")] - Exists = 1, - - } - - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "14.2.0.0 (NJsonSchema v11.1.0.0 (Newtonsoft.Json v13.0.0.0))")] - public partial class V1ServiceOwnerDialogActivitiesQueriesSearch_Activity - { - - [JsonPropertyName("createdAt")] - public System.DateTimeOffset CreatedAt { get; set; } - - [JsonPropertyName("deletedAt")] - public System.DateTimeOffset? DeletedAt { get; set; } - - [JsonPropertyName("extendedType")] - public System.Uri ExtendedType { get; set; } - - [JsonPropertyName("id")] - public System.Guid Id { get; set; } - - [JsonPropertyName("transmissionId")] - public System.Guid? TransmissionId { get; set; } - - [JsonPropertyName("type")] - [JsonConverter(typeof(JsonStringEnumConverter))] - public DialogsEntitiesActivities_DialogActivityType Type { get; set; } - - } - - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "14.2.0.0 (NJsonSchema v11.1.0.0 (Newtonsoft.Json v13.0.0.0))")] - public partial class V1ServiceOwnerDialogsCommandsCreate_Activity - { - /// - /// If supplied, overrides the creating date and time for the transmission. - ///
If not supplied, the current date /time will be used. - ///
- - [JsonPropertyName("createdAt")] - public System.DateTimeOffset? CreatedAt { get; set; } - - /// - /// Unstructured text describing the activity. Only set if the activity type is "Information". - /// - - [JsonPropertyName("description")] - public ICollection Description { get; set; } - - /// - /// Arbitrary URI/URN describing a service-specific transmission type. - /// - - [JsonPropertyName("extendedType")] - public System.Uri ExtendedType { get; set; } - - /// - /// A self-defined UUIDv7 may be provided to support idempotent creation of activities. If not provided, a new UUIDv7 will be generated. - /// - - [JsonPropertyName("id")] - public System.Guid? Id { get; set; } - - /// - /// The actor that performed the activity. - /// - - [JsonPropertyName("performedBy")] - public V1ServiceOwnerCommonActors_Actor PerformedBy { get; set; } - - /// - /// If the activity is related to a particular transmission, this field will contain the transmission identifier. - ///
Must be present in the request body. - ///
- - [JsonPropertyName("transmissionId")] - public System.Guid? TransmissionId { get; set; } - - /// - /// The type of transmission. - /// - - [JsonPropertyName("type")] - [JsonConverter(typeof(JsonStringEnumConverter))] - public DialogsEntitiesActivities_DialogActivityType Type { get; set; } - - } - - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "14.2.0.0 (NJsonSchema v11.1.0.0 (Newtonsoft.Json v13.0.0.0))")] - public partial class V1ServiceOwnerDialogsCommandsCreate_ApiAction - { - /// - /// String identifier for the action, corresponding to the "action" attributeId used in the XACML service policy, - ///
which by default is the policy belonging to the service referred to by "serviceResource" in the dialog. - ///
- - [JsonPropertyName("action")] - public string Action { get; set; } - - /// - /// Contains an authorization resource attributeId, that can used in custom authorization rules in the XACML service - ///
policy, which by default is the policy belonging to the service referred to by "serviceResource" in the dialog. - ///
- ///
Can also be used to refer to other service policies. - ///
- - [JsonPropertyName("authorizationAttribute")] - public string AuthorizationAttribute { get; set; } - - /// - /// The endpoints associated with the action. - /// - - [JsonPropertyName("endpoints")] - public ICollection Endpoints { get; set; } - - } - - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "14.2.0.0 (NJsonSchema v11.1.0.0 (Newtonsoft.Json v13.0.0.0))")] - public partial class V1ServiceOwnerDialogsCommandsCreate_ApiActionEndpoint - { - /// - /// Boolean indicating if the endpoint is deprecated. - /// - - [JsonPropertyName("deprecated")] - public bool Deprecated { get; set; } - - /// - /// Link to documentation for the endpoint, providing documentation for integrators. Should be a URL to a - ///
human-readable page. - ///
- - [JsonPropertyName("documentationUrl")] - public System.Uri DocumentationUrl { get; set; } - - /// - /// The HTTP method that the endpoint expects for this action. - /// - - [JsonPropertyName("httpMethod")] - [JsonConverter(typeof(JsonStringEnumConverter))] - public Http_HttpVerb HttpMethod { get; set; } - - /// - /// Link to the request schema for the endpoint. Used to provide documentation for integrators. - ///
Dialogporten will not validate information on this endpoint. - ///
- - [JsonPropertyName("requestSchema")] - public System.Uri RequestSchema { get; set; } - - /// - /// Link to the response schema for the endpoint. Used to provide documentation for integrators. - ///
Dialogporten will not validate information on this endpoint. - ///
- - [JsonPropertyName("responseSchema")] - public System.Uri ResponseSchema { get; set; } - - /// - /// Date and time when the endpoint will no longer function. Only set if the endpoint is deprecated. Dialogporten - ///
will not enforce this date. - ///
- - [JsonPropertyName("sunsetAt")] - public System.DateTimeOffset? SunsetAt { get; set; } - - /// - /// The fully qualified URL of the API endpoint. - /// - - [JsonPropertyName("url")] - public System.Uri Url { get; set; } - - /// - /// Arbitrary string indicating the version of the endpoint. - /// - - [JsonPropertyName("version")] - public string Version { get; set; } - - } - - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "14.2.0.0 (NJsonSchema v11.1.0.0 (Newtonsoft.Json v13.0.0.0))")] - public partial class V1ServiceOwnerDialogsCommandsCreate_Attachment - { - /// - /// The display name of the attachment that should be used in GUIs. - /// - - [JsonPropertyName("displayName")] - public ICollection DisplayName { get; set; } - - /// - /// The URLs associated with the attachment, each referring to a different representation of the attachment. - /// - - [JsonPropertyName("urls")] - public ICollection Urls { get; set; } - - } - - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "14.2.0.0 (NJsonSchema v11.1.0.0 (Newtonsoft.Json v13.0.0.0))")] - public partial class V1ServiceOwnerDialogsCommandsCreate_AttachmentUrl - { - /// - /// The type of consumer the URL is intended for. - /// - - [JsonPropertyName("consumerType")] - [JsonConverter(typeof(JsonStringEnumConverter))] - public Attachments_AttachmentUrlConsumerType ConsumerType { get; set; } - - /// - /// The media type of the attachment. - /// - - [JsonPropertyName("mediaType")] - public string MediaType { get; set; } - - /// - /// The fully qualified URL of the attachment. - /// - - [JsonPropertyName("url")] - public System.Uri Url { get; set; } - - } - - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "14.2.0.0 (NJsonSchema v11.1.0.0 (Newtonsoft.Json v13.0.0.0))")] - public partial class V1ServiceOwnerDialogsCommandsCreate_Content - { - /// - /// Additional information about the dialog. - ///
Supported media types: text/plain, text/markdown - ///
- - [JsonPropertyName("additionalInfo")] - public V1CommonContent_ContentValue AdditionalInfo { get; set; } - - /// - /// Used as the human-readable label used to describe the "ExtendedStatus" field. - ///
Supported media types: text/plain - ///
- - [JsonPropertyName("extendedStatus")] - public V1CommonContent_ContentValue ExtendedStatus { get; set; } - - /// - /// Front-channel embedded content. Used to dynamically embed content in the frontend from an external URL. Must be HTTPS. - ///
Supported media types: application/vnd.dialogporten.frontchannelembed+json;type=markdown - ///
- - [JsonPropertyName("mainContentReference")] - public V1CommonContent_ContentValue MainContentReference { get; set; } - - /// - /// Overridden sender name. If not supplied, assume "org" as the sender name. Must be text/plain if supplied. - ///
Supported media types: text/plain - ///
- - [JsonPropertyName("senderName")] - public V1CommonContent_ContentValue SenderName { get; set; } - - /// - /// A short summary of the dialog and its current state. - ///
Supported media types: text/plain - ///
- - [JsonPropertyName("summary")] - public V1CommonContent_ContentValue Summary { get; set; } - - /// - /// The title of the dialog. - ///
Supported media types: text/plain - ///
- - [JsonPropertyName("title")] - public V1CommonContent_ContentValue Title { get; set; } - - } - - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "14.2.0.0 (NJsonSchema v11.1.0.0 (Newtonsoft.Json v13.0.0.0))")] - public partial class V1ServiceOwnerDialogsCommandsCreate_DialogCommand - { - /// - /// An immutable list of activities associated with the dialog. - /// - - [JsonPropertyName("activities")] - public ICollection Activities { get; set; } - - /// - /// The API actions associated with the dialog. Should be used in specialized, non-browser-based integrations. - /// - - [JsonPropertyName("apiActions")] - public ICollection ApiActions { get; set; } - - /// - /// The attachments associated with the dialog (on an aggregate level). - /// - - [JsonPropertyName("attachments")] - public ICollection Attachments { get; set; } - - /// - /// The dialog unstructured text content. - /// - - [JsonPropertyName("content")] - public V1ServiceOwnerDialogsCommandsCreate_Content Content { get; set; } - - /// - /// If set, will override the date and time when the dialog is set as created. - ///
If not supplied, the current date /time will be used. - ///
- - [JsonPropertyName("createdAt")] - public System.DateTimeOffset CreatedAt { get; set; } - - /// - /// The due date for the dialog. Dialogs past due date might be marked as such in frontends but will still be available. - /// - - [JsonPropertyName("dueAt")] - public System.DateTimeOffset? DueAt { get; set; } - - /// - /// The expiration date for the dialog. This is the last date when the dialog is available for the end user. - ///
- ///
After this date is passed, the dialog will be considered expired and no longer available for the end user in any - ///
API. If not supplied, the dialog will be considered to never expire. This field can be changed after creation. - ///
- - [JsonPropertyName("expiresAt")] - public System.DateTimeOffset? ExpiresAt { get; set; } - - /// - /// Arbitrary string with a service-specific indicator of status, typically used to indicate a fine-grained state of - ///
the dialog to further specify the "status" enum. - ///
- - [JsonPropertyName("extendedStatus")] - public string ExtendedStatus { get; set; } - - /// - /// Arbitrary string with a service-specific reference to an external system or service. - /// - - [JsonPropertyName("externalReference")] - public string ExternalReference { get; set; } - - /// - /// The GUI actions associated with the dialog. Should be used in browser-based interactive frontends. - /// - - [JsonPropertyName("guiActions")] - public ICollection GuiActions { get; set; } - - /// - /// A self-defined UUIDv7 may be provided to support idempotent creation of dialogs. If not provided, a new UUIDv7 will be generated. - /// - - [JsonPropertyName("id")] - public System.Guid? Id { get; set; } - - /// - /// The party code representing the organization or person that the dialog belongs to in URN format. - /// - - [JsonPropertyName("party")] - public string Party { get; set; } - - /// - /// Optional preceding process identifier to indicate the business process that preceded the process indicated in the "Process" field. Cannot be set without also "Process" being set. - /// - - [JsonPropertyName("precedingProcess")] - public string PrecedingProcess { get; set; } - - /// - /// Optional process identifier used to indicate a business process this dialog belongs to. - /// - - [JsonPropertyName("process")] - public string Process { get; set; } - - /// - /// Advisory indicator of progress, represented as 1-100 percentage value. 100% representing a dialog that has come - ///
to a natural completion (successful or not). - ///
- - [JsonPropertyName("progress")] - public int? Progress { get; set; } - - /// - /// A list of words (tags) that will be used in dialog search queries. Not visible in end-user DTO. - /// - - [JsonPropertyName("searchTags")] - public ICollection SearchTags { get; set; } - - /// - /// The service identifier for the service that the dialog is related to in URN-format. - ///
This corresponds to a resource in the Altinn Resource Registry, which the authenticated organization - ///
must own, i.e., be listed as the "competent authority" in the Resource Registry entry. - ///
- - [JsonPropertyName("serviceResource")] - public string ServiceResource { get; set; } - - /// - /// The aggregated status of the dialog. - /// - - [JsonPropertyName("status")] - [JsonConverter(typeof(JsonStringEnumConverter))] - public DialogsEntities_DialogStatus Status { get; set; } - - /// - /// Set the system label of the dialog Migration purposes. - /// - - [JsonPropertyName("systemLabel")] - [JsonConverter(typeof(JsonStringEnumConverter))] - public DialogEndUserContextsEntities_SystemLabel? SystemLabel { get; set; } - - /// - /// The immutable list of transmissions associated with the dialog. - /// - - [JsonPropertyName("transmissions")] - public ICollection Transmissions { get; set; } - - /// - /// If set, will override the date and time when the dialog is set as last updated. - ///
If not supplied, the current date /time will be used. - ///
- - [JsonPropertyName("updatedAt")] - public System.DateTimeOffset UpdatedAt { get; set; } - - /// - /// The timestamp when the dialog should be made visible for authorized end users. If not provided, the dialog will be - ///
immediately available. - ///
- - [JsonPropertyName("visibleFrom")] - public System.DateTimeOffset? VisibleFrom { get; set; } - - } - - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "14.2.0.0 (NJsonSchema v11.1.0.0 (Newtonsoft.Json v13.0.0.0))")] - public partial class V1ServiceOwnerDialogsCommandsCreate_GuiAction - { - /// - /// The action identifier for the action, corresponding to the "action" attributeId used in the XACML service policy. - /// - - [JsonPropertyName("action")] - public string Action { get; set; } - - /// - /// Contains an authorization resource attributeId, that can used in custom authorization rules in the XACML service - ///
policy, which by default is the policy belonging to the service referred to by "serviceResource" in the dialog. - ///
- ///
Can also be used to refer to other service policies. - ///
- - [JsonPropertyName("authorizationAttribute")] - public string AuthorizationAttribute { get; set; } - - /// - /// The HTTP method that the frontend should use when redirecting the user. - /// - - [JsonPropertyName("httpMethod")] - [JsonConverter(typeof(JsonStringEnumConverter))] - public Http_HttpVerb? HttpMethod { get; set; } - - /// - /// Indicates whether the action results in the dialog being deleted. Used by frontends to implement custom UX - ///
for delete actions. - ///
- - [JsonPropertyName("isDeleteDialogAction")] - public bool IsDeleteDialogAction { get; set; } - - /// - /// Indicates a priority for the action, making it possible for frontends to adapt GUI elements based on action - ///
priority. - ///
- - [JsonPropertyName("priority")] - [JsonConverter(typeof(JsonStringEnumConverter))] - public DialogsEntitiesActions_DialogGuiActionPriority Priority { get; set; } - - /// - /// If there should be a prompt asking the user for confirmation before the action is executed, - ///
this field should contain the prompt text. - ///
- - [JsonPropertyName("prompt")] - public ICollection Prompt { get; set; } - - /// - /// The title of the action, this should be short and in verb form. Must be text/plain. - /// - - [JsonPropertyName("title")] - public ICollection Title { get; set; } - - /// - /// The fully qualified URL of the action, to which the user will be redirected when the action is triggered. Will be set to - ///
"urn:dialogporten:unauthorized" if the user is not authorized to perform the action. - ///
- - [JsonPropertyName("url")] - public System.Uri Url { get; set; } - - } - - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "14.2.0.0 (NJsonSchema v11.1.0.0 (Newtonsoft.Json v13.0.0.0))")] - public partial class V1ServiceOwnerDialogsCommandsCreate_SearchTag - { - /// - /// A search tag value. - /// - - [JsonPropertyName("value")] - public string Value { get; set; } - - } - - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "14.2.0.0 (NJsonSchema v11.1.0.0 (Newtonsoft.Json v13.0.0.0))")] - public partial class V1ServiceOwnerDialogsCommandsCreate_Transmission - { - /// - /// The transmission-level attachments. - /// - - [JsonPropertyName("attachments")] - public ICollection Attachments { get; set; } - - /// - /// Contains an authorization resource attributeId, that can used in custom authorization rules in the XACML service - ///
policy, which by default is the policy belonging to the service referred to by "serviceResource" in the dialog. - ///
- ///
Can also be used to refer to other service policies. - ///
- - [JsonPropertyName("authorizationAttribute")] - public string AuthorizationAttribute { get; set; } - - /// - /// The transmission unstructured text content. - /// - - [JsonPropertyName("content")] - public V1ServiceOwnerDialogsCommandsCreate_TransmissionContent Content { get; set; } - - /// - /// If supplied, overrides the creating date and time for the transmission. - ///
If not supplied, the current date /time will be used. - ///
- - [JsonPropertyName("createdAt")] - public System.DateTimeOffset CreatedAt { get; set; } - - /// - /// Arbitrary URI/URN describing a service-specific transmission type. - ///
- ///
Refer to the service-specific documentation provided by the service owner for details (if in use). - ///
- - [JsonPropertyName("extendedType")] - public System.Uri ExtendedType { get; set; } - - /// - /// A self-defined UUIDv7 may be provided to support idempotent creation of transmissions. If not provided, a new UUIDv7 will be generated. - /// - - [JsonPropertyName("id")] - public System.Guid? Id { get; set; } - - /// - /// Reference to any other transmission that this transmission is related to. - /// - - [JsonPropertyName("relatedTransmissionId")] - public System.Guid? RelatedTransmissionId { get; set; } - - /// - /// The actor that sent the transmission. - /// - - [JsonPropertyName("sender")] - public V1ServiceOwnerCommonActors_Actor Sender { get; set; } - - /// - /// The type of transmission. - /// - - [JsonPropertyName("type")] - [JsonConverter(typeof(JsonStringEnumConverter))] - public DialogsEntitiesTransmissions_DialogTransmissionType Type { get; set; } - - } - - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "14.2.0.0 (NJsonSchema v11.1.0.0 (Newtonsoft.Json v13.0.0.0))")] - public partial class V1ServiceOwnerDialogsCommandsCreate_TransmissionAttachment - { - /// - /// The display name of the attachment that should be used in GUIs. - /// - - [JsonPropertyName("displayName")] - public ICollection DisplayName { get; set; } - - /// - /// A self-defined UUIDv7 may be provided to support idempotent creation of transmission attachments. If not provided, a new UUIDv7 will be generated. - /// - - [JsonPropertyName("id")] - public System.Guid? Id { get; set; } - - /// - /// The URLs associated with the attachment, each referring to a different representation of the attachment. - /// - - [JsonPropertyName("urls")] - public ICollection Urls { get; set; } - - } - - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "14.2.0.0 (NJsonSchema v11.1.0.0 (Newtonsoft.Json v13.0.0.0))")] - public partial class V1ServiceOwnerDialogsCommandsCreate_TransmissionAttachmentUrl - { - /// - /// The type of consumer the URL is intended for. - /// - - [JsonPropertyName("consumerType")] - [JsonConverter(typeof(JsonStringEnumConverter))] - public Attachments_AttachmentUrlConsumerType ConsumerType { get; set; } - - /// - /// The media type of the attachment. - /// - - [JsonPropertyName("mediaType")] - public string MediaType { get; set; } - - /// - /// The fully qualified URL of the attachment. - /// - - [JsonPropertyName("url")] - public System.Uri Url { get; set; } - - } - - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "14.2.0.0 (NJsonSchema v11.1.0.0 (Newtonsoft.Json v13.0.0.0))")] - public partial class V1ServiceOwnerDialogsCommandsCreate_TransmissionContent - { - /// - /// Front-channel embedded content. Used to dynamically embed content in the frontend from an external URL. Must be HTTPS. - ///
Allowed media types: application/vnd.dialogporten.frontchannelembed+json;type=markdown - ///
- - [JsonPropertyName("contentReference")] - public V1CommonContent_ContentValue ContentReference { get; set; } - - /// - /// The transmission summary. - /// - - [JsonPropertyName("summary")] - public V1CommonContent_ContentValue Summary { get; set; } - - /// - /// The transmission title. Must be text/plain. - /// - - [JsonPropertyName("title")] - public V1CommonContent_ContentValue Title { get; set; } - - } - - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "14.2.0.0 (NJsonSchema v11.1.0.0 (Newtonsoft.Json v13.0.0.0))")] - public partial class V1ServiceOwnerDialogsCommandsUpdate_Activity - { - /// - /// If supplied, overrides the creating date and time for the transmission. - ///
If not supplied, the current date /time will be used. - ///
- - [JsonPropertyName("createdAt")] - public System.DateTimeOffset? CreatedAt { get; set; } - - /// - /// Unstructured text describing the activity. Only set if the activity type is "Information". - /// - - [JsonPropertyName("description")] - public ICollection Description { get; set; } - - /// - /// Arbitrary URI/URN describing a service-specific transmission type. - /// - - [JsonPropertyName("extendedType")] - public System.Uri ExtendedType { get; set; } - - /// - /// The UUDIv7 of the action may be provided to support idempotent additions to the list of activities. - ///
If not supplied, a new UUIDv7 will be generated. - ///
- - [JsonPropertyName("id")] - public System.Guid? Id { get; set; } - - /// - /// The actor that performed the activity. - /// - - [JsonPropertyName("performedBy")] - public V1ServiceOwnerCommonActors_Actor PerformedBy { get; set; } - - /// - /// If the activity is related to a particular transmission, this field will contain the transmission identifier. - ///
Must be present in the request body. - ///
- - [JsonPropertyName("transmissionId")] - public System.Guid? TransmissionId { get; set; } - - /// - /// The type of transmission. - /// - - [JsonPropertyName("type")] - [JsonConverter(typeof(JsonStringEnumConverter))] - public DialogsEntitiesActivities_DialogActivityType Type { get; set; } - - } - - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "14.2.0.0 (NJsonSchema v11.1.0.0 (Newtonsoft.Json v13.0.0.0))")] - public partial class V1ServiceOwnerDialogsCommandsUpdate_ApiAction - { - /// - /// String identifier for the action, corresponding to the "action" attributeId used in the XACML service policy, - ///
which by default is the policy belonging to the service referred to by "serviceResource" in the dialog. - ///
- - [JsonPropertyName("action")] - public string Action { get; set; } - - /// - /// Contains an authorization resource attributeId, that can used in custom authorization rules in the XACML service - ///
policy, which by default is the policy belonging to the service referred to by "serviceResource" in the dialog. - ///
- ///
Can also be used to refer to other service policies. - ///
- - [JsonPropertyName("authorizationAttribute")] - public string AuthorizationAttribute { get; set; } - - /// - /// The endpoints associated with the action. - /// - - [JsonPropertyName("endpoints")] - public ICollection Endpoints { get; set; } - - /// - /// A UUIDv7 used for merging existing data, unknown IDs will be ignored as this entity does not support user-defined IDs. - /// - - [JsonPropertyName("id")] - public System.Guid? Id { get; set; } - - } - - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "14.2.0.0 (NJsonSchema v11.1.0.0 (Newtonsoft.Json v13.0.0.0))")] - public partial class V1ServiceOwnerDialogsCommandsUpdate_ApiActionEndpoint - { - /// - /// Boolean indicating if the endpoint is deprecated. - /// - - [JsonPropertyName("deprecated")] - public bool Deprecated { get; set; } - - /// - /// Link to documentation for the endpoint, providing documentation for integrators. Should be a URL to a - ///
human-readable page. - ///
- - [JsonPropertyName("documentationUrl")] - public System.Uri DocumentationUrl { get; set; } - - /// - /// The HTTP method that the endpoint expects for this action. - /// - - [JsonPropertyName("httpMethod")] - [JsonConverter(typeof(JsonStringEnumConverter))] - public Http_HttpVerb HttpMethod { get; set; } - - /// - /// A UUIDv7 used for merging existing data, unknown IDs will be ignored as this entity does not support user-defined IDs. - /// - - [JsonPropertyName("id")] - public System.Guid? Id { get; set; } - - /// - /// Link to the request schema for the endpoint. Used to provide documentation for integrators. - ///
Dialogporten will not validate information on this endpoint. - ///
- - [JsonPropertyName("requestSchema")] - public System.Uri RequestSchema { get; set; } - - /// - /// Link to the response schema for the endpoint. Used to provide documentation for integrators. - ///
Dialogporten will not validate information on this endpoint. - ///
- - [JsonPropertyName("responseSchema")] - public System.Uri ResponseSchema { get; set; } - - /// - /// Date and time when the endpoint will no longer function. Only set if the endpoint is deprecated. Dialogporten - ///
will not enforce this date. - ///
- - [JsonPropertyName("sunsetAt")] - public System.DateTimeOffset? SunsetAt { get; set; } - - /// - /// The fully qualified URL of the API endpoint. - /// - - [JsonPropertyName("url")] - public System.Uri Url { get; set; } - - /// - /// Arbitrary string indicating the version of the endpoint. - /// - - [JsonPropertyName("version")] - public string Version { get; set; } - - } - - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "14.2.0.0 (NJsonSchema v11.1.0.0 (Newtonsoft.Json v13.0.0.0))")] - public partial class V1ServiceOwnerDialogsCommandsUpdate_Attachment - { - /// - /// The display name of the attachment that should be used in GUIs. - /// - - [JsonPropertyName("displayName")] - public ICollection DisplayName { get; set; } - - /// - /// A UUIDv7 used for merging existing data, unknown IDs will be ignored as this entity does not support user-defined IDs. - /// - - [JsonPropertyName("id")] - public System.Guid? Id { get; set; } - - /// - /// The URLs associated with the attachment, each referring to a different representation of the attachment. - /// - - [JsonPropertyName("urls")] - public ICollection Urls { get; set; } - - } - - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "14.2.0.0 (NJsonSchema v11.1.0.0 (Newtonsoft.Json v13.0.0.0))")] - public partial class V1ServiceOwnerDialogsCommandsUpdate_AttachmentUrl - { - /// - /// The type of consumer the URL is intended for. - /// - - [JsonPropertyName("consumerType")] - [JsonConverter(typeof(JsonStringEnumConverter))] - public Attachments_AttachmentUrlConsumerType ConsumerType { get; set; } - - /// - /// A UUIDv7 used for merging existing data, unknown IDs will be ignored as this entity does not support user-defined IDs. - /// - - [JsonPropertyName("id")] - public System.Guid? Id { get; set; } - - /// - /// The media type of the attachment. - /// - - [JsonPropertyName("mediaType")] - public string MediaType { get; set; } - - /// - /// The fully qualified URL of the attachment. - /// - - [JsonPropertyName("url")] - public System.Uri Url { get; set; } - - } - - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "14.2.0.0 (NJsonSchema v11.1.0.0 (Newtonsoft.Json v13.0.0.0))")] - public partial class V1ServiceOwnerDialogsCommandsUpdate_Content - { - /// - /// Additional information about the dialog, this may contain Markdown. - /// - - [JsonPropertyName("additionalInfo")] - public V1CommonContent_ContentValue AdditionalInfo { get; set; } - - /// - /// Used as the human-readable label used to describe the "ExtendedStatus" field. Must be text/plain. - /// - - [JsonPropertyName("extendedStatus")] - public V1CommonContent_ContentValue ExtendedStatus { get; set; } - - /// - /// Front-channel embedded content. Used to dynamically embed content in the frontend from an external URL. Must be HTTPS. - /// - - [JsonPropertyName("mainContentReference")] - public V1CommonContent_ContentValue MainContentReference { get; set; } - - /// - /// Overridden sender name. If not supplied, assume "org" as the sender name. Must be text/plain if supplied. - /// - - [JsonPropertyName("senderName")] - public V1CommonContent_ContentValue SenderName { get; set; } - - /// - /// A short summary of the dialog and its current state. Must be text/plain. - /// - - [JsonPropertyName("summary")] - public V1CommonContent_ContentValue Summary { get; set; } - - /// - /// The title of the dialog. Must be text/plain. - /// - - [JsonPropertyName("title")] - public V1CommonContent_ContentValue Title { get; set; } - - } - - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "14.2.0.0 (NJsonSchema v11.1.0.0 (Newtonsoft.Json v13.0.0.0))")] - public partial class V1ServiceOwnerDialogsCommandsUpdate_Dialog - { - /// - /// An immutable list of activities associated with the dialog. When updating via PUT, any activities added here - ///
will be appended to the existing list of activities. - ///
- - [JsonPropertyName("activities")] - public ICollection Activities { get; set; } - - /// - /// The API actions associated with the dialog. Should be used in specialized, non-browser-based integrations. - /// - - [JsonPropertyName("apiActions")] - public ICollection ApiActions { get; set; } - - /// - /// The attachments associated with the dialog (on an aggregate level). - /// - - [JsonPropertyName("attachments")] - public ICollection Attachments { get; set; } - - /// - /// The dialog unstructured text content. - /// - - [JsonPropertyName("content")] - public V1ServiceOwnerDialogsCommandsUpdate_Content Content { get; set; } - - /// - /// The due date for the dialog. Dialogs past due date might be marked as such in frontends but will still be available. - /// - - [JsonPropertyName("dueAt")] - public System.DateTimeOffset? DueAt { get; set; } - - /// - /// The expiration date for the dialog. This is the last date when the dialog is available for the end user. - ///
- ///
After this date is passed, the dialog will be considered expired and no longer available for the end user in any - ///
API. If not supplied, the dialog will be considered to never expire. This field can be changed after creation. - ///
- - [JsonPropertyName("expiresAt")] - public System.DateTimeOffset? ExpiresAt { get; set; } - - /// - /// Arbitrary string with a service-specific indicator of status, typically used to indicate a fine-grained state of - ///
the dialog to further specify the "status" enum. - ///
- - [JsonPropertyName("extendedStatus")] - public string ExtendedStatus { get; set; } - - /// - /// Arbitrary string with a service-specific reference to an external system or service. - /// - - [JsonPropertyName("externalReference")] - public string ExternalReference { get; set; } - - /// - /// The GUI actions associated with the dialog. Should be used in browser-based interactive frontends. - /// - - [JsonPropertyName("guiActions")] - public ICollection GuiActions { get; set; } - - /// - /// Advisory indicator of progress, represented as 1-100 percentage value. 100% representing a dialog that has come - ///
to a natural completion (successful or not). - ///
- - [JsonPropertyName("progress")] - public int? Progress { get; set; } - - /// - /// A list of words (tags) that will be used in dialog search queries. Not visible in end-user DTO. - /// - - [JsonPropertyName("searchTags")] - public ICollection SearchTags { get; set; } - - /// - /// The aggregated status of the dialog. - /// - - [JsonPropertyName("status")] - [JsonConverter(typeof(JsonStringEnumConverter))] - public DialogsEntities_DialogStatus Status { get; set; } - - /// - /// The immutable list of transmissions associated with the dialog. When updating via PUT, any transmissions - ///
added here will be appended to the existing list of transmissions. - ///
- - [JsonPropertyName("transmissions")] - public ICollection Transmissions { get; set; } - - /// - /// The timestamp when the dialog should be made visible for authorized end users. If not provided, the dialog will be - ///
immediately available. - ///
- - [JsonPropertyName("visibleFrom")] - public System.DateTimeOffset? VisibleFrom { get; set; } - - } - - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "14.2.0.0 (NJsonSchema v11.1.0.0 (Newtonsoft.Json v13.0.0.0))")] - public partial class V1ServiceOwnerDialogsCommandsUpdate_GuiAction - { - /// - /// The action identifier for the action, corresponding to the "action" attributeId used in the XACML service policy. - /// - - [JsonPropertyName("action")] - public string Action { get; set; } - - /// - /// Contains an authorization resource attributeId, that can used in custom authorization rules in the XACML service - ///
policy, which by default is the policy belonging to the service referred to by "serviceResource" in the dialog. - ///
- ///
Can also be used to refer to other service policies. - ///
- - [JsonPropertyName("authorizationAttribute")] - public string AuthorizationAttribute { get; set; } - - /// - /// The HTTP method that the frontend should use when redirecting the user. - /// - - [JsonPropertyName("httpMethod")] - [JsonConverter(typeof(JsonStringEnumConverter))] - public Http_HttpVerb? HttpMethod { get; set; } - - /// - /// A UUIDv7 used for merging existing data, unknown IDs will be ignored as this entity does not support user-defined IDs. - /// - - [JsonPropertyName("id")] - public System.Guid? Id { get; set; } - - /// - /// Indicates whether the action results in the dialog being deleted. Used by frontends to implement custom UX - ///
for delete actions. - ///
- - [JsonPropertyName("isDeleteDialogAction")] - public bool IsDeleteDialogAction { get; set; } - - /// - /// Indicates a priority for the action, making it possible for frontends to adapt GUI elements based on action - ///
priority. - ///
- - [JsonPropertyName("priority")] - [JsonConverter(typeof(JsonStringEnumConverter))] - public DialogsEntitiesActions_DialogGuiActionPriority Priority { get; set; } - - /// - /// If there should be a prompt asking the user for confirmation before the action is executed, - ///
this field should contain the prompt text. - ///
- - [JsonPropertyName("prompt")] - public ICollection Prompt { get; set; } - - /// - /// The title of the action, this should be short and in verb form. Must be text/plain. - /// - - [JsonPropertyName("title")] - public ICollection Title { get; set; } - - /// - /// The fully qualified URL of the action, to which the user will be redirected when the action is triggered. Will be set to - ///
"urn:dialogporten:unauthorized" if the user is not authorized to perform the action. - ///
- - [JsonPropertyName("url")] - public System.Uri Url { get; set; } - - } - - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "14.2.0.0 (NJsonSchema v11.1.0.0 (Newtonsoft.Json v13.0.0.0))")] - public partial class V1ServiceOwnerDialogsCommandsUpdate_SearchTag - { - /// - /// A search tag value. - /// - - [JsonPropertyName("value")] - public string Value { get; set; } - - } - - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "14.2.0.0 (NJsonSchema v11.1.0.0 (Newtonsoft.Json v13.0.0.0))")] - public partial class V1ServiceOwnerDialogsCommandsUpdate_Transmission - { - /// - /// The transmission-level attachments. - /// - - [JsonPropertyName("attachments")] - public ICollection Attachments { get; set; } - - /// - /// Contains an authorization resource attributeId, that can used in custom authorization rules in the XACML service - ///
policy, which by default is the policy belonging to the service referred to by "serviceResource" in the dialog. - ///
- ///
Can also be used to refer to other service policies. - ///
- - [JsonPropertyName("authorizationAttribute")] - public string AuthorizationAttribute { get; set; } - - /// - /// The transmission unstructured text content. - /// - - [JsonPropertyName("content")] - public V1ServiceOwnerDialogsCommandsUpdate_TransmissionContent Content { get; set; } - - /// - /// If supplied, overrides the creating date and time for the transmission. - ///
If not supplied, the current date /time will be used. - ///
- - [JsonPropertyName("createdAt")] - public System.DateTimeOffset CreatedAt { get; set; } - - /// - /// Arbitrary URI/URN describing a service-specific transmission type. - ///
- ///
Refer to the service-specific documentation provided by the service owner for details (if in use). - ///
- - [JsonPropertyName("extendedType")] - public System.Uri ExtendedType { get; set; } - - /// - /// The UUDIv7 of the action may be provided to support idempotent additions to the list of transmissions. - ///
If not supplied, a new UUIDv7 will be generated. - ///
- - [JsonPropertyName("id")] - public System.Guid? Id { get; set; } - - /// - /// Reference to any other transmission that this transmission is related to. - /// - - [JsonPropertyName("relatedTransmissionId")] - public System.Guid? RelatedTransmissionId { get; set; } - - /// - /// The actor that sent the transmission. - /// - - [JsonPropertyName("sender")] - public V1ServiceOwnerCommonActors_Actor Sender { get; set; } - - /// - /// The type of transmission. - /// - - [JsonPropertyName("type")] - [JsonConverter(typeof(JsonStringEnumConverter))] - public DialogsEntitiesTransmissions_DialogTransmissionType Type { get; set; } - - } - - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "14.2.0.0 (NJsonSchema v11.1.0.0 (Newtonsoft.Json v13.0.0.0))")] - public partial class V1ServiceOwnerDialogsCommandsUpdate_TransmissionAttachment - { - /// - /// The display name of the attachment that should be used in GUIs. - /// - - [JsonPropertyName("displayName")] - public ICollection DisplayName { get; set; } - - /// - /// A self-defined UUIDv7 may be provided to support idempotent creation of transmission attachments. If not provided, a new UUIDv7 will be generated. - /// - - [JsonPropertyName("id")] - public System.Guid? Id { get; set; } - - /// - /// The URLs associated with the attachment, each referring to a different representation of the attachment. - /// - - [JsonPropertyName("urls")] - public ICollection Urls { get; set; } - - } - - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "14.2.0.0 (NJsonSchema v11.1.0.0 (Newtonsoft.Json v13.0.0.0))")] - public partial class V1ServiceOwnerDialogsCommandsUpdate_TransmissionAttachmentUrl - { - /// - /// The type of consumer the URL is intended for. - /// - - [JsonPropertyName("consumerType")] - [JsonConverter(typeof(JsonStringEnumConverter))] - public Attachments_AttachmentUrlConsumerType ConsumerType { get; set; } - - /// - /// The media type of the attachment. - /// - - [JsonPropertyName("mediaType")] - public string MediaType { get; set; } - - /// - /// The fully qualified URL of the attachment. - /// - - [JsonPropertyName("url")] - public System.Uri Url { get; set; } - - } - - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "14.2.0.0 (NJsonSchema v11.1.0.0 (Newtonsoft.Json v13.0.0.0))")] - public partial class V1ServiceOwnerDialogsCommandsUpdate_TransmissionContent - { - /// - /// Front-channel embedded content. Used to dynamically embed content in the frontend from an external URL. Must be HTTPS. - ///
Allowed media types: application/vnd.dialogporten.frontchannelembed+json;type=markdown - ///
- - [JsonPropertyName("contentReference")] - public V1CommonContent_ContentValue ContentReference { get; set; } - - /// - /// The transmission summary. - /// - - [JsonPropertyName("summary")] - public V1CommonContent_ContentValue Summary { get; set; } - - /// - /// The transmission title. Must be text/plain. - /// - - [JsonPropertyName("title")] - public V1CommonContent_ContentValue Title { get; set; } - - } - - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "14.2.0.0 (NJsonSchema v11.1.0.0 (Newtonsoft.Json v13.0.0.0))")] - public partial class V1ServiceOwnerDialogSeenLogsQueriesGet_SeenLog - { - - [JsonPropertyName("id")] - public System.Guid Id { get; set; } - - [JsonPropertyName("isViaServiceOwner")] - public bool? IsViaServiceOwner { get; set; } - - [JsonPropertyName("seenAt")] - public System.DateTimeOffset SeenAt { get; set; } - - [JsonPropertyName("seenBy")] - public V1ServiceOwnerCommonActors_Actor SeenBy { get; set; } - - } - - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "14.2.0.0 (NJsonSchema v11.1.0.0 (Newtonsoft.Json v13.0.0.0))")] - public partial class V1ServiceOwnerDialogSeenLogsQueriesSearch_SeenLog - { - - [JsonPropertyName("id")] - public System.Guid Id { get; set; } - - [JsonPropertyName("isViaServiceOwner")] - public bool? IsViaServiceOwner { get; set; } - - [JsonPropertyName("seenAt")] - public System.DateTimeOffset SeenAt { get; set; } - - [JsonPropertyName("seenBy")] - public V1ServiceOwnerCommonActors_Actor SeenBy { get; set; } - - } - - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "14.2.0.0 (NJsonSchema v11.1.0.0 (Newtonsoft.Json v13.0.0.0))")] - public partial class V1ServiceOwnerDialogsQueriesGet_Content - { - /// - /// Additional information about the dialog, this may contain Markdown. - /// - - [JsonPropertyName("additionalInfo")] - public V1CommonContent_ContentValue AdditionalInfo { get; set; } - - /// - /// Used as the human-readable label used to describe the "ExtendedStatus" field. - /// - - [JsonPropertyName("extendedStatus")] - public V1CommonContent_ContentValue ExtendedStatus { get; set; } - - /// - /// Front-channel embedded content. Used to dynamically embed content in the frontend from an external URL. Must be HTTPS. - ///
Allowed media types: application/vnd.dialogporten.frontchannelembed+json;type=markdown - ///
- - [JsonPropertyName("mainContentReference")] - public V1CommonContent_ContentValue MainContentReference { get; set; } - - /// - /// Overridden sender name. If not supplied, assume "org" as the sender name. - /// - - [JsonPropertyName("senderName")] - public V1CommonContent_ContentValue SenderName { get; set; } - - /// - /// A short summary of the dialog and its current state. - /// - - [JsonPropertyName("summary")] - public V1CommonContent_ContentValue Summary { get; set; } - - /// - /// The title of the dialog. - /// - - [JsonPropertyName("title")] - public V1CommonContent_ContentValue Title { get; set; } - - } - - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "14.2.0.0 (NJsonSchema v11.1.0.0 (Newtonsoft.Json v13.0.0.0))")] - public partial class V1ServiceOwnerDialogsQueriesGet_Dialog - { - /// - /// An immutable list of activities associated with the dialog. - /// - - [JsonPropertyName("activities")] - public ICollection Activities { get; set; } - - /// - /// The API actions associated with the dialog. Should be used in specialized, non-browser-based integrations. - /// - - [JsonPropertyName("apiActions")] - public ICollection ApiActions { get; set; } - - /// - /// The attachments associated with the dialog (on an aggregate level). - /// - - [JsonPropertyName("attachments")] - public ICollection Attachments { get; set; } - - /// - /// The dialog unstructured text content. - /// - - [JsonPropertyName("content")] - public V1ServiceOwnerDialogsQueriesGet_Content Content { get; set; } - - /// - /// The date and time when the dialog was created. - /// - - [JsonPropertyName("createdAt")] - public System.DateTimeOffset CreatedAt { get; set; } - - /// - /// If deleted, the date and time when the deletion was performed. - /// - - [JsonPropertyName("deletedAt")] - public System.DateTimeOffset? DeletedAt { get; set; } - - /// - /// The due date for the dialog. Dialogs past due date might be marked as such in frontends but will still be available. - /// - - [JsonPropertyName("dueAt")] - public System.DateTimeOffset? DueAt { get; set; } - - /// - /// The expiration date for the dialog. This is the last date when the dialog is available for the end user. - ///
- ///
After this date is passed, the dialog will be considered expired and no longer available for the end user in any - ///
API. If not supplied, the dialog will be considered to never expire. This field can be changed by the service - ///
owner after the dialog has been created. - ///
- - [JsonPropertyName("expiresAt")] - public System.DateTimeOffset? ExpiresAt { get; set; } - - /// - /// Arbitrary string with a service-specific indicator of status, typically used to indicate a fine-grained state of - ///
the dialog to further specify the "status" enum. - ///
- ///
Refer to the service-specific documentation provided by the service owner for details on the possible values (if - ///
in use). - ///
- - [JsonPropertyName("extendedStatus")] - public string ExtendedStatus { get; set; } - - /// - /// Arbitrary string with a service-specific reference to an external system or service. - ///
- ///
Refer to the service-specific documentation provided by the service owner for details (if in use). - ///
- - [JsonPropertyName("externalReference")] - public string ExternalReference { get; set; } - - /// - /// The GUI actions associated with the dialog. Should be used in browser-based interactive frontends. - /// - - [JsonPropertyName("guiActions")] - public ICollection GuiActions { get; set; } - - /// - /// The unique identifier for the dialog in UUIDv7 format. - /// - - [JsonPropertyName("id")] - public System.Guid Id { get; set; } - - /// - /// The service owner code representing the organization (service owner) related to this dialog. - /// - - [JsonPropertyName("org")] - public string Org { get; set; } - - /// - /// The party code representing the organization or person that the dialog belongs to in URN format. - /// - - [JsonPropertyName("party")] - public string Party { get; set; } - - /// - /// Optional preceding process identifier to indicate the business process that preceded the process indicated in the "Process" field. Cannot be set without also "Process" being set. - /// - - [JsonPropertyName("precedingProcess")] - public string PrecedingProcess { get; set; } - - /// - /// Optional process identifier used to indicate a business process this dialog belongs to. - /// - - [JsonPropertyName("process")] - public string Process { get; set; } - - /// - /// Advisory indicator of progress, represented as 1-100 percentage value. 100% representing a dialog that has come - ///
to a natural completion (successful or not). - ///
- - [JsonPropertyName("progress")] - public int? Progress { get; set; } - - /// - /// The unique identifier for the revision in UUIDv4 format. - /// - - [JsonPropertyName("revision")] - public System.Guid Revision { get; set; } - - /// - /// The list of words (tags) that will be used in dialog search queries. Not visible in end-user DTO. - /// - - [JsonPropertyName("searchTags")] - public ICollection SearchTags { get; set; } - - /// - /// The list of seen log entries for the dialog newer than the dialog ChangedAt date. - /// - - [JsonPropertyName("seenSinceLastUpdate")] - public ICollection SeenSinceLastUpdate { get; set; } - - /// - /// The service identifier for the service that the dialog is related to in URN-format. - ///
This corresponds to a service resource in the Altinn Resource Registry. - ///
- - [JsonPropertyName("serviceResource")] - public string ServiceResource { get; set; } - - /// - /// The ServiceResource type, as defined in Altinn Resource Registry (see ResourceType). - /// - - [JsonPropertyName("serviceResourceType")] - public string ServiceResourceType { get; set; } - - /// - /// The aggregated status of the dialog. - /// - - [JsonPropertyName("status")] - [JsonConverter(typeof(JsonStringEnumConverter))] - public DialogsEntities_DialogStatus Status { get; set; } - - /// - /// Current display state. - /// - - [JsonPropertyName("systemLabel")] - [JsonConverter(typeof(JsonStringEnumConverter))] - public DialogEndUserContextsEntities_SystemLabel SystemLabel { get; set; } - - /// - /// The immutable list of transmissions associated with the dialog. - /// - - [JsonPropertyName("transmissions")] - public ICollection Transmissions { get; set; } - - /// - /// The date and time when the dialog was last updated. - /// - - [JsonPropertyName("updatedAt")] - public System.DateTimeOffset UpdatedAt { get; set; } - - /// - /// The timestamp when the dialog will be made visible for authorized end users. - /// - - [JsonPropertyName("visibleFrom")] - public System.DateTimeOffset? VisibleFrom { get; set; } - - } - - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "14.2.0.0 (NJsonSchema v11.1.0.0 (Newtonsoft.Json v13.0.0.0))")] - public partial class V1ServiceOwnerDialogsQueriesGet_DialogActivity - { - /// - /// The date and time when the activity was created. - /// - - [JsonPropertyName("createdAt")] - public System.DateTimeOffset? CreatedAt { get; set; } - - /// - /// Unstructured text describing the activity. Only set if the activity type is "Information". - /// - - [JsonPropertyName("description")] - public ICollection Description { get; set; } - - /// - /// An arbitrary URI/URN with a service-specific activity type. - ///
- ///
Consult the service-specific documentation provided by the service owner for details (if in use). - ///
- - [JsonPropertyName("extendedType")] - public System.Uri ExtendedType { get; set; } - - /// - /// The unique identifier for the activity in UUIDv7 format. - /// - - [JsonPropertyName("id")] - public System.Guid Id { get; set; } - - /// - /// The actor that performed the activity. - /// - - [JsonPropertyName("performedBy")] - public V1ServiceOwnerCommonActors_Actor PerformedBy { get; set; } - - /// - /// If the activity is related to a particular transmission, this field will contain the transmission identifier. - /// - - [JsonPropertyName("transmissionId")] - public System.Guid? TransmissionId { get; set; } - - /// - /// The type of activity. - /// - - [JsonPropertyName("type")] - [JsonConverter(typeof(JsonStringEnumConverter))] - public DialogsEntitiesActivities_DialogActivityType Type { get; set; } - - } - - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "14.2.0.0 (NJsonSchema v11.1.0.0 (Newtonsoft.Json v13.0.0.0))")] - public partial class V1ServiceOwnerDialogsQueriesGet_DialogApiAction - { - /// - /// String identifier for the action, corresponding to the "action" attributeId used in the XACML service policy, - ///
which by default is the policy belonging to the service referred to by "serviceResource" in the dialog. - ///
- - [JsonPropertyName("action")] - public string Action { get; set; } - - /// - /// Contains an authorization resource attributeId, that can used in custom authorization rules in the XACML service - ///
policy, which by default is the policy belonging to the service referred to by "serviceResource" in the dialog. - ///
- ///
Can also be used to refer to other service policies. - ///
- - [JsonPropertyName("authorizationAttribute")] - public string AuthorizationAttribute { get; set; } - - /// - /// The endpoints associated with the action. - /// - - [JsonPropertyName("endpoints")] - public ICollection Endpoints { get; set; } - - /// - /// The unique identifier for the action in UUIDv7 format. - /// - - [JsonPropertyName("id")] - public System.Guid Id { get; set; } - - /// - /// True if the authenticated user (set in the query) is authorized for this action. - /// - - [JsonPropertyName("isAuthorized")] - public bool? IsAuthorized { get; set; } - - } - - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "14.2.0.0 (NJsonSchema v11.1.0.0 (Newtonsoft.Json v13.0.0.0))")] - public partial class V1ServiceOwnerDialogsQueriesGet_DialogApiActionEndpoint - { - /// - /// Boolean indicating if the endpoint is deprecated. Integrators should migrate to endpoints with a higher version. - /// - - [JsonPropertyName("deprecated")] - public bool Deprecated { get; set; } - - /// - /// Link to service provider documentation for the endpoint. Used for service owners to provide documentation for - ///
integrators. Should be a URL to a human-readable page. - ///
- - [JsonPropertyName("documentationUrl")] - public System.Uri DocumentationUrl { get; set; } - - /// - /// The HTTP method that the endpoint expects for this action. - /// - - [JsonPropertyName("httpMethod")] - [JsonConverter(typeof(JsonStringEnumConverter))] - public Http_HttpVerb HttpMethod { get; set; } - - /// - /// The unique identifier for the endpoint in UUIDv7 format. - /// - - [JsonPropertyName("id")] - public System.Guid Id { get; set; } - - /// - /// Link to the request schema for the endpoint. Used by service owners to provide documentation for integrators. - ///
Dialogporten will not validate information on this endpoint. - ///
- - [JsonPropertyName("requestSchema")] - public System.Uri RequestSchema { get; set; } - - /// - /// Link to the response schema for the endpoint. Used for service owners to provide documentation for integrators. - ///
Dialogporten will not validate information on this endpoint. - ///
- - [JsonPropertyName("responseSchema")] - public System.Uri ResponseSchema { get; set; } - - /// - /// Date and time when the service owner has indicated that endpoint will no longer function. Only set if the endpoint - ///
is deprecated. Dialogporten will not enforce this date. - ///
- - [JsonPropertyName("sunsetAt")] - public System.DateTimeOffset? SunsetAt { get; set; } - - /// - /// The fully qualified URL of the API endpoint. - /// - - [JsonPropertyName("url")] - public System.Uri Url { get; set; } - - /// - /// Arbitrary string indicating the version of the endpoint. - ///
- ///
Consult the service-specific documentation provided by the service owner for details (if in use). - ///
- - [JsonPropertyName("version")] - public string Version { get; set; } - - } - - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "14.2.0.0 (NJsonSchema v11.1.0.0 (Newtonsoft.Json v13.0.0.0))")] - public partial class V1ServiceOwnerDialogsQueriesGet_DialogAttachment - { - /// - /// The display name of the attachment that should be used in GUIs. - /// - - [JsonPropertyName("displayName")] - public ICollection DisplayName { get; set; } - - /// - /// The unique identifier for the attachment in UUIDv7 format. - /// - - [JsonPropertyName("id")] - public System.Guid Id { get; set; } - - /// - /// The URLs associated with the attachment, each referring to a different representation of the attachment. - /// - - [JsonPropertyName("urls")] - public ICollection Urls { get; set; } - - } - - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "14.2.0.0 (NJsonSchema v11.1.0.0 (Newtonsoft.Json v13.0.0.0))")] - public partial class V1ServiceOwnerDialogsQueriesGet_DialogAttachmentUrl - { - /// - /// What type of consumer the URL is intended for. - /// - - [JsonPropertyName("consumerType")] - [JsonConverter(typeof(JsonStringEnumConverter))] - public Attachments_AttachmentUrlConsumerType ConsumerType { get; set; } - - /// - /// The unique identifier for the attachment URL in UUIDv7 format. - /// - - [JsonPropertyName("id")] - public System.Guid Id { get; set; } - - /// - /// The media type of the attachment. - /// - - [JsonPropertyName("mediaType")] - public string MediaType { get; set; } - - /// - /// The fully qualified URL of the attachment. - /// - - [JsonPropertyName("url")] - public System.Uri Url { get; set; } - - } - - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "14.2.0.0 (NJsonSchema v11.1.0.0 (Newtonsoft.Json v13.0.0.0))")] - public partial class V1ServiceOwnerDialogsQueriesGet_DialogGuiAction - { - /// - /// The action identifier for the action, corresponding to the "action" attributeId used in the XACML service policy. - /// - - [JsonPropertyName("action")] - public string Action { get; set; } - - /// - /// Contains an authorization resource attributeId, that can used in custom authorization rules in the XACML service - ///
policy, which by default is the policy belonging to the service referred to by "serviceResource" in the dialog. - ///
- ///
Can also be used to refer to other service policies. - ///
- - [JsonPropertyName("authorizationAttribute")] - public string AuthorizationAttribute { get; set; } - - /// - /// The HTTP method that the frontend should use when redirecting the user. - /// - - [JsonPropertyName("httpMethod")] - [JsonConverter(typeof(JsonStringEnumConverter))] - public Http_HttpVerb HttpMethod { get; set; } - - /// - /// The unique identifier for the action in UUIDv7 format. - /// - - [JsonPropertyName("id")] - public System.Guid Id { get; set; } - - /// - /// Whether the user, if supplied in the query, is authorized to perform the action. - /// - - [JsonPropertyName("isAuthorized")] - public bool? IsAuthorized { get; set; } - - /// - /// Indicates whether the action results in the dialog being deleted. Used by frontends to implement custom UX - ///
for delete actions. - ///
- - [JsonPropertyName("isDeleteDialogAction")] - public bool IsDeleteDialogAction { get; set; } - - /// - /// Indicates a priority for the action, making it possible for frontends to adapt GUI elements based on action - ///
priority. - ///
- - [JsonPropertyName("priority")] - [JsonConverter(typeof(JsonStringEnumConverter))] - public DialogsEntitiesActions_DialogGuiActionPriority Priority { get; set; } - - /// - /// If there should be a prompt asking the user for confirmation before the action is executed, - ///
this field should contain the prompt text. - ///
- - [JsonPropertyName("prompt")] - public ICollection Prompt { get; set; } - - /// - /// The title of the action, this should be short and in verb form. - /// - - [JsonPropertyName("title")] - public ICollection Title { get; set; } - - /// - /// The fully qualified URL of the action, to which the user will be redirected when the action is triggered. - /// - - [JsonPropertyName("url")] - public System.Uri Url { get; set; } - - } - - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "14.2.0.0 (NJsonSchema v11.1.0.0 (Newtonsoft.Json v13.0.0.0))")] - public partial class V1ServiceOwnerDialogsQueriesGet_DialogSeenLog - { - /// - /// The unique identifier for the seen log entry in UUIDv7 format. - /// - - [JsonPropertyName("id")] - public System.Guid Id { get; set; } - - /// - /// Flag indicating whether the seen log entry was created by the current end user, if provided in the query. - /// - - [JsonPropertyName("isCurrentEndUser")] - public bool IsCurrentEndUser { get; set; } - - /// - /// Flag indicating whether the seen log entry was created via the service owner. - ///
- ///
This is used when the service owner uses the service owner API to implement its own frontend. - ///
- - [JsonPropertyName("isViaServiceOwner")] - public bool? IsViaServiceOwner { get; set; } - - /// - /// The timestamp when the dialog revision was seen. - /// - - [JsonPropertyName("seenAt")] - public System.DateTimeOffset SeenAt { get; set; } - - /// - /// The actor that saw the dialog revision. - /// - - [JsonPropertyName("seenBy")] - public V1ServiceOwnerCommonActors_Actor SeenBy { get; set; } - - } - - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "14.2.0.0 (NJsonSchema v11.1.0.0 (Newtonsoft.Json v13.0.0.0))")] - public partial class V1ServiceOwnerDialogsQueriesGet_DialogTransmission - { - /// - /// The transmission-level attachments. - /// - - [JsonPropertyName("attachments")] - public ICollection Attachments { get; set; } - - /// - /// Contains an authorization resource attributeId, that can used in custom authorization rules in the XACML service - ///
policy, which by default is the policy belonging to the service referred to by "serviceResource" in the dialog. - ///
- ///
Can also be used to refer to other service policies. - ///
- - [JsonPropertyName("authorizationAttribute")] - public string AuthorizationAttribute { get; set; } - - /// - /// The transmission unstructured text content. - /// - - [JsonPropertyName("content")] - public V1ServiceOwnerDialogsQueriesGet_DialogTransmissionContent Content { get; set; } - - /// - /// The date and time when the transmission was created. - /// - - [JsonPropertyName("createdAt")] - public System.DateTimeOffset CreatedAt { get; set; } - - /// - /// Arbitrary URI/URN describing a service-specific transmission type. - ///
- ///
Refer to the service-specific documentation provided by the service owner for details (if in use). - ///
- - [JsonPropertyName("extendedType")] - public System.Uri ExtendedType { get; set; } - - /// - /// The unique identifier for the transmission in UUIDv7 format. - /// - - [JsonPropertyName("id")] - public System.Guid Id { get; set; } - - /// - /// Flag indicating if the authenticated user supplied in the query is authorized for this transmission. - /// - - [JsonPropertyName("isAuthorized")] - public bool? IsAuthorized { get; set; } - - /// - /// Reference to any other transmission that this transmission is related to. - /// - - [JsonPropertyName("relatedTransmissionId")] - public System.Guid? RelatedTransmissionId { get; set; } - - /// - /// The actor that sent the transmission. - /// - - [JsonPropertyName("sender")] - public V1ServiceOwnerCommonActors_Actor Sender { get; set; } - - /// - /// The type of transmission. - /// - - [JsonPropertyName("type")] - [JsonConverter(typeof(JsonStringEnumConverter))] - public DialogsEntitiesTransmissions_DialogTransmissionType Type { get; set; } - - } - - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "14.2.0.0 (NJsonSchema v11.1.0.0 (Newtonsoft.Json v13.0.0.0))")] - public partial class V1ServiceOwnerDialogsQueriesGet_DialogTransmissionAttachment - { - /// - /// The display name of the attachment that should be used in GUIs. - /// - - [JsonPropertyName("displayName")] - public ICollection DisplayName { get; set; } - - /// - /// The unique identifier for the attachment in UUIDv7 format. - /// - - [JsonPropertyName("id")] - public System.Guid Id { get; set; } - - /// - /// The URLs associated with the attachment, each referring to a different representation of the attachment. - /// - - [JsonPropertyName("urls")] - public ICollection Urls { get; set; } - - } - - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "14.2.0.0 (NJsonSchema v11.1.0.0 (Newtonsoft.Json v13.0.0.0))")] - public partial class V1ServiceOwnerDialogsQueriesGet_DialogTransmissionAttachmentUrl - { - /// - /// The type of consumer the URL is intended for. - /// - - [JsonPropertyName("consumerType")] - [JsonConverter(typeof(JsonStringEnumConverter))] - public Attachments_AttachmentUrlConsumerType ConsumerType { get; set; } - - /// - /// The media type of the attachment. - /// - - [JsonPropertyName("mediaType")] - public string MediaType { get; set; } - - /// - /// The fully qualified URL of the attachment. Will be set to "urn:dialogporten:unauthorized" if the user is - ///
not authorized to access the transmission. - ///
- - [JsonPropertyName("url")] - public System.Uri Url { get; set; } - - } - - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "14.2.0.0 (NJsonSchema v11.1.0.0 (Newtonsoft.Json v13.0.0.0))")] - public partial class V1ServiceOwnerDialogsQueriesGet_DialogTransmissionContent - { - /// - /// Front-channel embedded content. Used to dynamically embed content in the frontend from an external URL. Must be HTTPS. - ///
Allowed media types: application/vnd.dialogporten.frontchannelembed+json;type=markdown - ///
- - [JsonPropertyName("contentReference")] - public V1CommonContent_ContentValue ContentReference { get; set; } - - /// - /// The transmission summary. - /// - - [JsonPropertyName("summary")] - public V1CommonContent_ContentValue Summary { get; set; } - - /// - /// The transmission title. - /// - - [JsonPropertyName("title")] - public V1CommonContent_ContentValue Title { get; set; } - - } - - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "14.2.0.0 (NJsonSchema v11.1.0.0 (Newtonsoft.Json v13.0.0.0))")] - public partial class V1ServiceOwnerDialogsQueriesGet_SearchTag - { - /// - /// A search tag value. - /// - - [JsonPropertyName("value")] - public string Value { get; set; } - - } - - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "14.2.0.0 (NJsonSchema v11.1.0.0 (Newtonsoft.Json v13.0.0.0))")] - public partial class V1ServiceOwnerDialogsQueriesSearch_Content - { - /// - /// Used as the human-readable label used to describe the "ExtendedStatus" field. - /// - - [JsonPropertyName("extendedStatus")] - public V1CommonContent_ContentValue ExtendedStatus { get; set; } - - /// - /// Overridden sender name. If not supplied, assume "org" as the sender name. - /// - - [JsonPropertyName("senderName")] - public V1CommonContent_ContentValue SenderName { get; set; } - - /// - /// A short summary of the dialog and its current state. - /// - - [JsonPropertyName("summary")] - public V1CommonContent_ContentValue Summary { get; set; } - - /// - /// The title of the dialog. - /// - - [JsonPropertyName("title")] - public V1CommonContent_ContentValue Title { get; set; } - - } - - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "14.2.0.0 (NJsonSchema v11.1.0.0 (Newtonsoft.Json v13.0.0.0))")] - public partial class V1ServiceOwnerDialogsQueriesSearch_Dialog - { - /// - /// The content of the dialog in search results. - /// - - [JsonPropertyName("content")] - public V1ServiceOwnerDialogsQueriesSearch_Content Content { get; set; } - - /// - /// The date and time when the dialog was created. - /// - - [JsonPropertyName("createdAt")] - public System.DateTimeOffset CreatedAt { get; set; } - - /// - /// The due date for the dialog. This is the last date when the dialog is expected to be completed. - /// - - [JsonPropertyName("dueAt")] - public System.DateTimeOffset? DueAt { get; set; } - - /// - /// Arbitrary string with a service-specific indicator of status, typically used to indicate a fine-grained state of - ///
the dialog to further specify the "status" enum. - ///
- ///
Refer to the service-specific documentation provided by the service owner for details on the possible values (if - ///
in use). - ///
- - [JsonPropertyName("extendedStatus")] - public string ExtendedStatus { get; set; } - - /// - /// Arbitrary string with a service-specific reference to an external system or service. - ///
- ///
Refer to the service-specific documentation provided by the service owner for details (if in use). - ///
- - [JsonPropertyName("externalReference")] - public string ExternalReference { get; set; } - - /// - /// The number of attachments in the dialog made available for browser-based frontends. - /// - - [JsonPropertyName("guiAttachmentCount")] - public int? GuiAttachmentCount { get; set; } - - /// - /// The unique identifier for the dialog in UUIDv7 format. - /// - - [JsonPropertyName("id")] - public System.Guid Id { get; set; } - - /// - /// The latest entry in the dialog's activity log. - /// - - [JsonPropertyName("latestActivity")] - public V1ServiceOwnerDialogsQueriesSearch_DialogActivity LatestActivity { get; set; } - - /// - /// The service owner code representing the organization (service owner) related to this dialog. - /// - - [JsonPropertyName("org")] - public string Org { get; set; } - - /// - /// The party code representing the organization or person that the dialog belongs to in URN format. - /// - - [JsonPropertyName("party")] - public string Party { get; set; } - - /// - /// Optional preceding process identifier to indicate the business process that preceded the process indicated in the "Process" field. Cannot be set without also "Process" being set. - /// - - [JsonPropertyName("precedingProcess")] - public string PrecedingProcess { get; set; } - - /// - /// Optional process identifier used to indicate a business process this dialog belongs to. - /// - - [JsonPropertyName("process")] - public string Process { get; set; } - - /// - /// Advisory indicator of progress, represented as 1-100 percentage value. 100% representing a dialog that has come - ///
to a natural completion (successful or not). - ///
- - [JsonPropertyName("progress")] - public int? Progress { get; set; } - - /// - /// The unique identifier for the revision in UUIDv4 format. - /// - - [JsonPropertyName("revision")] - public System.Guid Revision { get; set; } - - /// - /// The list of seen log entries for the dialog newer than the dialog ChangedAt date. - /// - - [JsonPropertyName("seenSinceLastUpdate")] - public ICollection SeenSinceLastUpdate { get; set; } - - /// - /// The service identifier for the service that the dialog is related to in URN-format. - ///
This corresponds to a service resource in the Altinn Resource Registry. - ///
- - [JsonPropertyName("serviceResource")] - public string ServiceResource { get; set; } - - /// - /// The ServiceResource type, as defined in Altinn Resource Registry (see ResourceType). - /// - - [JsonPropertyName("serviceResourceType")] - public string ServiceResourceType { get; set; } - - /// - /// The aggregated status of the dialog. - /// - - [JsonPropertyName("status")] - [JsonConverter(typeof(JsonStringEnumConverter))] - public DialogsEntities_DialogStatus Status { get; set; } - - /// - /// Current display state. - /// - - [JsonPropertyName("systemLabel")] - [JsonConverter(typeof(JsonStringEnumConverter))] - public DialogEndUserContextsEntities_SystemLabel SystemLabel { get; set; } - - /// - /// The date and time when the dialog was last updated. - /// - - [JsonPropertyName("updatedAt")] - public System.DateTimeOffset UpdatedAt { get; set; } - - /// - /// The timestamp when the dialog will be made visible for authorized end users. - /// - - [JsonPropertyName("visibleFrom")] - public System.DateTimeOffset? VisibleFrom { get; set; } - - } - - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "14.2.0.0 (NJsonSchema v11.1.0.0 (Newtonsoft.Json v13.0.0.0))")] - public partial class V1ServiceOwnerDialogsQueriesSearch_DialogActivity - { - /// - /// The date and time when the activity was created. - /// - - [JsonPropertyName("createdAt")] - public System.DateTimeOffset? CreatedAt { get; set; } - - /// - /// Unstructured text describing the activity. Only set if the activity type is "Information". - /// - - [JsonPropertyName("description")] - public ICollection Description { get; set; } - - /// - /// An arbitrary string with a service-specific activity type. - ///
- ///
Consult the service-specific documentation provided by the service owner for details (if in use). - ///
- - [JsonPropertyName("extendedType")] - public System.Uri ExtendedType { get; set; } - - /// - /// The unique identifier for the activity in UUIDv7 format. - /// - - [JsonPropertyName("id")] - public System.Guid Id { get; set; } - - /// - /// The actor that performed the activity. - /// - - [JsonPropertyName("performedBy")] - public V1ServiceOwnerCommonActors_Actor PerformedBy { get; set; } - - /// - /// If the activity is related to a particular transmission, this field will contain the transmission identifier. - /// - - [JsonPropertyName("transmissionId")] - public System.Guid? TransmissionId { get; set; } - - /// - /// The type of activity. - /// - - [JsonPropertyName("type")] - [JsonConverter(typeof(JsonStringEnumConverter))] - public DialogsEntitiesActivities_DialogActivityType Type { get; set; } - - } - - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "14.2.0.0 (NJsonSchema v11.1.0.0 (Newtonsoft.Json v13.0.0.0))")] - public partial class V1ServiceOwnerDialogsQueriesSearch_DialogSeenLog - { - /// - /// The unique identifier for the seen log entry in UUIDv7 format. - /// - - [JsonPropertyName("id")] - public System.Guid Id { get; set; } - - /// - /// Flag indicating whether the seen log entry was created by the end user supplied in the query. - /// - - [JsonPropertyName("isCurrentEndUser")] - public bool IsCurrentEndUser { get; set; } - - /// - /// Flag indicating whether the seen log entry was created via the service owner. - ///
- ///
This is used when the service owner uses the service owner API to implement its own frontend. - ///
- - [JsonPropertyName("isViaServiceOwner")] - public bool? IsViaServiceOwner { get; set; } - - /// - /// The timestamp when the dialog revision was seen. - /// - - [JsonPropertyName("seenAt")] - public System.DateTimeOffset SeenAt { get; set; } - - /// - /// The actor that saw the dialog revision. - /// - - [JsonPropertyName("seenBy")] - public V1ServiceOwnerCommonActors_Actor SeenBy { get; set; } - - } - - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "14.2.0.0 (NJsonSchema v11.1.0.0 (Newtonsoft.Json v13.0.0.0))")] - public partial class V1ServiceOwnerDialogTransmissionsCreate_TransmissionRequest - { - /// - /// The transmission-level attachments. - /// - - [JsonPropertyName("attachments")] - public ICollection Attachments { get; set; } - - /// - /// Contains an authorization resource attributeId, that can used in custom authorization rules in the XACML service - ///
policy, which by default is the policy belonging to the service referred to by "serviceResource" in the dialog. - ///
- ///
Can also be used to refer to other service policies. - ///
- - [JsonPropertyName("authorizationAttribute")] - public string AuthorizationAttribute { get; set; } - - /// - /// The transmission unstructured text content. - /// - - [JsonPropertyName("content")] - public V1ServiceOwnerDialogsCommandsUpdate_TransmissionContent Content { get; set; } - - /// - /// If supplied, overrides the creating date and time for the transmission. - ///
If not supplied, the current date /time will be used. - ///
- - [JsonPropertyName("createdAt")] - public System.DateTimeOffset CreatedAt { get; set; } - - /// - /// Arbitrary URI/URN describing a service-specific transmission type. - ///
- ///
Refer to the service-specific documentation provided by the service owner for details (if in use). - ///
- - [JsonPropertyName("extendedType")] - public System.Uri ExtendedType { get; set; } - - /// - /// The UUDIv7 of the action may be provided to support idempotent additions to the list of transmissions. - ///
If not supplied, a new UUIDv7 will be generated. - ///
- - [JsonPropertyName("id")] - public System.Guid? Id { get; set; } - - /// - /// Reference to any other transmission that this transmission is related to. - /// - - [JsonPropertyName("relatedTransmissionId")] - public System.Guid? RelatedTransmissionId { get; set; } - - /// - /// The actor that sent the transmission. - /// - - [JsonPropertyName("sender")] - public V1ServiceOwnerCommonActors_Actor Sender { get; set; } - - /// - /// The type of transmission. - /// - - [JsonPropertyName("type")] - [JsonConverter(typeof(JsonStringEnumConverter))] - public DialogsEntitiesTransmissions_DialogTransmissionType Type { get; set; } - - } - - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "14.2.0.0 (NJsonSchema v11.1.0.0 (Newtonsoft.Json v13.0.0.0))")] - public partial class V1ServiceOwnerDialogTransmissionsQueriesGet_Attachment - { - /// - /// The display name of the attachment that should be used in GUIs. - /// - - [JsonPropertyName("displayName")] - public ICollection DisplayName { get; set; } - - /// - /// The unique identifier for the attachment in UUIDv7 format. - /// - - [JsonPropertyName("id")] - public System.Guid Id { get; set; } - - /// - /// The URLs associated with the attachment, each referring to a different representation of the attachment. - /// - - [JsonPropertyName("urls")] - public ICollection Urls { get; set; } - - } - - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "14.2.0.0 (NJsonSchema v11.1.0.0 (Newtonsoft.Json v13.0.0.0))")] - public partial class V1ServiceOwnerDialogTransmissionsQueriesGet_AttachmentUrl - { - /// - /// The type of consumer the URL is intended for. - /// - - [JsonPropertyName("consumerType")] - [JsonConverter(typeof(JsonStringEnumConverter))] - public Attachments_AttachmentUrlConsumerType ConsumerType { get; set; } - - /// - /// The unique identifier for the attachment URL in UUIDv7 format. - /// - - [JsonPropertyName("id")] - public System.Guid Id { get; set; } - - /// - /// The media type of the attachment. - /// - - [JsonPropertyName("mediaType")] - public string MediaType { get; set; } - - /// - /// The fully qualified URL of the attachment. Will be set to "urn:dialogporten:unauthorized" if the user is - ///
not authorized to access the transmission. - ///
- - [JsonPropertyName("url")] - public System.Uri Url { get; set; } - - } - - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "14.2.0.0 (NJsonSchema v11.1.0.0 (Newtonsoft.Json v13.0.0.0))")] - public partial class V1ServiceOwnerDialogTransmissionsQueriesGet_Content - { - /// - /// Front-channel embedded content. Used to dynamically embed content in the frontend from an external URL. - ///
Allowed media types: application/vnd.dialogporten.frontchannelembed+json;type=markdown - ///
- - [JsonPropertyName("contentReference")] - public V1CommonContent_ContentValue ContentReference { get; set; } - - /// - /// The summary of the content. - /// - - [JsonPropertyName("summary")] - public V1CommonContent_ContentValue Summary { get; set; } - - /// - /// The title of the content. - /// - - [JsonPropertyName("title")] - public V1CommonContent_ContentValue Title { get; set; } - - } - - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "14.2.0.0 (NJsonSchema v11.1.0.0 (Newtonsoft.Json v13.0.0.0))")] - public partial class V1ServiceOwnerDialogTransmissionsQueriesGet_Transmission - { - /// - /// The attachments associated with the transmission. - /// - - [JsonPropertyName("attachments")] - public ICollection Attachments { get; set; } - - /// - /// The authorization attribute associated with the transmission. - /// - - [JsonPropertyName("authorizationAttribute")] - public string AuthorizationAttribute { get; set; } - - /// - /// The content of the transmission. - /// - - [JsonPropertyName("content")] - public V1ServiceOwnerDialogTransmissionsQueriesGet_Content Content { get; set; } - - /// - /// The date and time when the transmission was created. - /// - - [JsonPropertyName("createdAt")] - public System.DateTimeOffset CreatedAt { get; set; } - - /// - /// The date and time when the transmission was deleted, if applicable. - /// - - [JsonPropertyName("deletedAt")] - public System.DateTimeOffset? DeletedAt { get; set; } - - /// - /// The extended type URI for the transmission. - /// - - [JsonPropertyName("extendedType")] - public System.Uri ExtendedType { get; set; } - - /// - /// The unique identifier for the transmission in UUIDv7 format. - /// - - [JsonPropertyName("id")] - public System.Guid Id { get; set; } - - /// - /// The unique identifier for the related transmission, if any. - /// - - [JsonPropertyName("relatedTransmissionId")] - public System.Guid? RelatedTransmissionId { get; set; } - - /// - /// The sender actor information for the transmission. - /// - - [JsonPropertyName("sender")] - public V1ServiceOwnerCommonActors_Actor Sender { get; set; } - - /// - /// The type of the transmission. - /// - - [JsonPropertyName("type")] - [JsonConverter(typeof(JsonStringEnumConverter))] - public DialogsEntitiesTransmissions_DialogTransmissionType Type { get; set; } - - } - - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "14.2.0.0 (NJsonSchema v11.1.0.0 (Newtonsoft.Json v13.0.0.0))")] - public partial class V1ServiceOwnerDialogTransmissionsQueriesSearch_Attachment - { - /// - /// The display name of the attachment that should be used in GUIs. - /// - - [JsonPropertyName("displayName")] - public ICollection DisplayName { get; set; } - - /// - /// The unique identifier for the attachment in UUIDv7 format. - /// - - [JsonPropertyName("id")] - public System.Guid Id { get; set; } - - /// - /// The URLs associated with the attachment, each referring to a different representation of the attachment. - /// - - [JsonPropertyName("urls")] - public ICollection Urls { get; set; } - - } - - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "14.2.0.0 (NJsonSchema v11.1.0.0 (Newtonsoft.Json v13.0.0.0))")] - public partial class V1ServiceOwnerDialogTransmissionsQueriesSearch_AttachmentUrl - { - /// - /// The type of consumer the URL is intended for. - /// - - [JsonPropertyName("consumerType")] - [JsonConverter(typeof(JsonStringEnumConverter))] - public Attachments_AttachmentUrlConsumerType ConsumerType { get; set; } - - /// - /// The unique identifier for the attachment URL in UUIDv7 format. - /// - - [JsonPropertyName("id")] - public System.Guid Id { get; set; } - - /// - /// The media type of the attachment. - /// - - [JsonPropertyName("mediaType")] - public string MediaType { get; set; } - - /// - /// The fully qualified URL of the attachment. Will be set to "urn:dialogporten:unauthorized" if the user is - ///
not authorized to access the transmission. - ///
- - [JsonPropertyName("url")] - public System.Uri Url { get; set; } - - } - - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "14.2.0.0 (NJsonSchema v11.1.0.0 (Newtonsoft.Json v13.0.0.0))")] - public partial class V1ServiceOwnerDialogTransmissionsQueriesSearch_Content - { - /// - /// Front-channel embedded content. Used to dynamically embed content in the frontend from an external URL. - /// - - [JsonPropertyName("contentReference")] - public V1CommonContent_ContentValue ContentReference { get; set; } - - /// - /// The summary of the content. - /// - - [JsonPropertyName("summary")] - public V1CommonContent_ContentValue Summary { get; set; } - - /// - /// The title of the content. - /// - - [JsonPropertyName("title")] - public V1CommonContent_ContentValue Title { get; set; } - - } - - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "14.2.0.0 (NJsonSchema v11.1.0.0 (Newtonsoft.Json v13.0.0.0))")] - public partial class V1ServiceOwnerDialogTransmissionsQueriesSearch_Transmission - { - /// - /// The attachments associated with the transmission. - /// - - [JsonPropertyName("attachments")] - public ICollection Attachments { get; set; } - - /// - /// The authorization attribute associated with the transmission. - /// - - [JsonPropertyName("authorizationAttribute")] - public string AuthorizationAttribute { get; set; } - - /// - /// The content of the transmission. - /// - - [JsonPropertyName("content")] - public V1ServiceOwnerDialogTransmissionsQueriesSearch_Content Content { get; set; } - - /// - /// The date and time when the transmission was created. - /// - - [JsonPropertyName("createdAt")] - public System.DateTimeOffset CreatedAt { get; set; } - - /// - /// The date and time when the transmission was deleted, if applicable. - /// - - [JsonPropertyName("deletedAt")] - public System.DateTimeOffset? DeletedAt { get; set; } - - /// - /// The extended type URI for the transmission. - /// - - [JsonPropertyName("extendedType")] - public System.Uri ExtendedType { get; set; } - - /// - /// The unique identifier for the transmission in UUIDv7 format. - /// - - [JsonPropertyName("id")] - public System.Guid Id { get; set; } - - /// - /// The unique identifier for the related transmission, if any. - /// - - [JsonPropertyName("relatedTransmissionId")] - public System.Guid? RelatedTransmissionId { get; set; } - - /// - /// The sender actor information for the transmission. - /// - - [JsonPropertyName("sender")] - public V1ServiceOwnerCommonActors_Actor Sender { get; set; } - - /// - /// The type of the transmission. - /// - - [JsonPropertyName("type")] - [JsonConverter(typeof(JsonStringEnumConverter))] - public DialogsEntitiesTransmissions_DialogTransmissionType Type { get; set; } - - } - - -} - -#pragma warning restore 108 -#pragma warning restore 114 -#pragma warning restore 472 -#pragma warning restore 612 -#pragma warning restore 1573 -#pragma warning restore 1591 -#pragma warning restore 8073 -#pragma warning restore 3016 -#pragma warning restore 8603 -#pragma warning restore 8604 -#pragma warning restore 8625 \ No newline at end of file From 347d729a09d7d712bb53db21e89db8415d9514bd Mon Sep 17 00:00:00 2001 From: Amund Myrbostad Date: Thu, 5 Dec 2024 13:04:31 +0100 Subject: [PATCH 43/62] Added more tests. Now test Create, Path, Get, and Purge --- .../Tests.cs | 20 ++++++++++++++++++- 1 file changed, 19 insertions(+), 1 deletion(-) diff --git a/tests/Digdir.Library.Dialogporten.WebApiClient.Integration.Tests/Tests.cs b/tests/Digdir.Library.Dialogporten.WebApiClient.Integration.Tests/Tests.cs index bc13279d6..b738be36a 100644 --- a/tests/Digdir.Library.Dialogporten.WebApiClient.Integration.Tests/Tests.cs +++ b/tests/Digdir.Library.Dialogporten.WebApiClient.Integration.Tests/Tests.cs @@ -1,3 +1,4 @@ +using System.Net; using Digdir.Library.Dialogporten.WebApiClient.Extensions; using Digdir.Library.Dialogporten.WebApiClient.Features.V1; using Microsoft.Extensions.Configuration; @@ -24,7 +25,23 @@ public async Task Test() var createDialogCommand = CreateCommand(); var createResponse = await dialogportenClient.V1ServiceOwnerDialogsCreateDialog(createDialogCommand); Assert.True(createResponse.IsSuccessStatusCode); - Assert.True(Guid.TryParse(createResponse.Content!, out var dialogId)); + Assert.NotNull(createResponse.Content); + Assert.True(Guid.TryParse(createResponse.Content!.Replace("\"", "").Trim(), out var dialogId)); + List patchDocument = + [ + new() + { + Op = "replace", + OperationType = JsonPatchOperations_OperationType.Replace, + Path = "/progress", + Value = 50 + } + ]; + var updateResponse = await dialogportenClient.V1ServiceOwnerDialogsPatchDialog(dialogId, patchDocument, null, CancellationToken.None); + Assert.True(updateResponse.IsSuccessStatusCode); + var getResponse = await dialogportenClient.V1ServiceOwnerDialogsGetGetDialog(dialogId, null!, CancellationToken.None); + Assert.Equal(HttpStatusCode.OK, getResponse.StatusCode); + Assert.Equal(getResponse.Content!.Progress!, 50); var purgeResponse = await dialogportenClient.V1ServiceOwnerDialogsPurgePurgeDialog(dialogId, null); Assert.True(purgeResponse.IsSuccessStatusCode); @@ -143,4 +160,5 @@ public static V1ServiceOwnerDialogsCommandsCreate_DialogCommand CreateCommand() }; return createDialogCommand; } + } From cdee031805b6aae3ea3358923b4da701565d5989 Mon Sep 17 00:00:00 2001 From: Amund Myrbostad Date: Fri, 6 Dec 2024 10:07:32 +0100 Subject: [PATCH 44/62] Test fixture --- .../Tests.cs | 76 +++++++++++++++---- 1 file changed, 60 insertions(+), 16 deletions(-) diff --git a/tests/Digdir.Library.Dialogporten.WebApiClient.Integration.Tests/Tests.cs b/tests/Digdir.Library.Dialogporten.WebApiClient.Integration.Tests/Tests.cs index b738be36a..60e5c1300 100644 --- a/tests/Digdir.Library.Dialogporten.WebApiClient.Integration.Tests/Tests.cs +++ b/tests/Digdir.Library.Dialogporten.WebApiClient.Integration.Tests/Tests.cs @@ -6,10 +6,10 @@ namespace Digdir.Library.Dialogporten.WebApiClient.Integration.Tests; -public class Tests +public class WebApiClientFixture : IDisposable { - [Fact] - public async Task Test() + public IServiceownerApi DialogportenClient { get; } + public WebApiClientFixture() { var configuration = new ConfigurationBuilder().AddUserSecrets().Build(); @@ -20,13 +20,53 @@ public async Task Test() services.AddDialogportenClient(); services.AddDialogTokenVerifer(); - var serviceProvider = services.BuildServiceProvider(); - var dialogportenClient = serviceProvider.GetRequiredService(); + DialogportenClient = services.BuildServiceProvider().GetRequiredService(); + + } + + public void Dispose() + { + GC.SuppressFinalize(this); + + } +} + +public class Tests : IClassFixture, IAsyncDisposable +{ + private readonly WebApiClientFixture _fixture; + private readonly List _dialogIds; + public Tests(WebApiClientFixture fixture) + { + _fixture = fixture; + _dialogIds = []; + } + [Fact] + public async Task PurgeTest() + { + + var createDialogCommand = CreateCommand(); + var createResponse = await _fixture.DialogportenClient.V1ServiceOwnerDialogsCreateDialog(createDialogCommand); + + Assert.True(createResponse.IsSuccessStatusCode); + Assert.NotNull(createResponse.Content); + Assert.True(Guid.TryParse(createResponse.Content!.Replace("\"", "").Trim(), out var dialogId)); + var getResponse = await _fixture.DialogportenClient.V1ServiceOwnerDialogsGetGetDialog(dialogId, null!, CancellationToken.None); + Assert.Equal(HttpStatusCode.OK, getResponse.StatusCode); + Assert.Equal(getResponse.Content!.Progress!, 2); + var purgeResponse = await _fixture.DialogportenClient.V1ServiceOwnerDialogsPurgePurgeDialog(dialogId, null); + Assert.True(purgeResponse.IsSuccessStatusCode); + + } + [Fact] + public async Task PatchTest() + { var createDialogCommand = CreateCommand(); - var createResponse = await dialogportenClient.V1ServiceOwnerDialogsCreateDialog(createDialogCommand); + var createResponse = await _fixture.DialogportenClient.V1ServiceOwnerDialogsCreateDialog(createDialogCommand); + Assert.True(createResponse.IsSuccessStatusCode); Assert.NotNull(createResponse.Content); Assert.True(Guid.TryParse(createResponse.Content!.Replace("\"", "").Trim(), out var dialogId)); + _dialogIds.Add(dialogId); List patchDocument = [ new() @@ -37,14 +77,8 @@ public async Task Test() Value = 50 } ]; - var updateResponse = await dialogportenClient.V1ServiceOwnerDialogsPatchDialog(dialogId, patchDocument, null, CancellationToken.None); + var updateResponse = await _fixture.DialogportenClient.V1ServiceOwnerDialogsPatchDialog(dialogId, patchDocument, null, CancellationToken.None); Assert.True(updateResponse.IsSuccessStatusCode); - var getResponse = await dialogportenClient.V1ServiceOwnerDialogsGetGetDialog(dialogId, null!, CancellationToken.None); - Assert.Equal(HttpStatusCode.OK, getResponse.StatusCode); - Assert.Equal(getResponse.Content!.Progress!, 50); - var purgeResponse = await dialogportenClient.V1ServiceOwnerDialogsPurgePurgeDialog(dialogId, null); - Assert.True(purgeResponse.IsSuccessStatusCode); - } public static V1ServiceOwnerDialogsCommandsCreate_DialogCommand CreateCommand() @@ -109,7 +143,7 @@ public static V1ServiceOwnerDialogsCommandsCreate_DialogCommand CreateCommand() new V1CommonLocalizations_Localization { LanguageCode = "nb", - Value = "Hoved misson" + Value = "Hoved mission" } ], Urls = @@ -133,7 +167,7 @@ public static V1ServiceOwnerDialogsCommandsCreate_DialogCommand CreateCommand() new V1CommonLocalizations_Localization { LanguageCode = "nb", - Value = "Tranmission summary" + Value = "Transmission summary" } ] }, @@ -145,7 +179,7 @@ public static V1ServiceOwnerDialogsCommandsCreate_DialogCommand CreateCommand() new V1CommonLocalizations_Localization { LanguageCode = "nb", - Value = "Tranmission Title" + Value = "Transmission Title" } ] } @@ -161,4 +195,14 @@ public static V1ServiceOwnerDialogsCommandsCreate_DialogCommand CreateCommand() return createDialogCommand; } + public ValueTask DisposeAsync() + { + GC.SuppressFinalize(this); + foreach (var dialogId in _dialogIds) + { + _fixture.DialogportenClient.V1ServiceOwnerDialogsPurgePurgeDialog(dialogId, null!); + } + + return ValueTask.CompletedTask; + } } From d75e11381423fc15ddf7a6fee17dcfa6154df801 Mon Sep 17 00:00:00 2001 From: Amund Myrbostad Date: Fri, 6 Dec 2024 12:59:49 +0100 Subject: [PATCH 45/62] Removed generated file from test proj to not make conflicts --- ...Library.Dialogporten.WebApiClient.Integration.Tests.csproj | 4 ++++ .../Tests.cs | 1 - 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/tests/Digdir.Library.Dialogporten.WebApiClient.Integration.Tests/Digdir.Library.Dialogporten.WebApiClient.Integration.Tests.csproj b/tests/Digdir.Library.Dialogporten.WebApiClient.Integration.Tests/Digdir.Library.Dialogporten.WebApiClient.Integration.Tests.csproj index 5705e42bf..104e9ae95 100644 --- a/tests/Digdir.Library.Dialogporten.WebApiClient.Integration.Tests/Digdir.Library.Dialogporten.WebApiClient.Integration.Tests.csproj +++ b/tests/Digdir.Library.Dialogporten.WebApiClient.Integration.Tests/Digdir.Library.Dialogporten.WebApiClient.Integration.Tests.csproj @@ -35,4 +35,8 @@ + + + + diff --git a/tests/Digdir.Library.Dialogporten.WebApiClient.Integration.Tests/Tests.cs b/tests/Digdir.Library.Dialogporten.WebApiClient.Integration.Tests/Tests.cs index 60e5c1300..f9a88603e 100644 --- a/tests/Digdir.Library.Dialogporten.WebApiClient.Integration.Tests/Tests.cs +++ b/tests/Digdir.Library.Dialogporten.WebApiClient.Integration.Tests/Tests.cs @@ -27,7 +27,6 @@ public WebApiClientFixture() public void Dispose() { GC.SuppressFinalize(this); - } } From 054c9ce23169b2c99bf2dbd26fc2015cf8d514bb Mon Sep 17 00:00:00 2001 From: Amund Myrbostad Date: Fri, 6 Dec 2024 13:00:09 +0100 Subject: [PATCH 46/62] Updated how base url is set --- .../Extensions/ServiceCollectionExtensions.cs | 17 ++++++++++++----- 1 file changed, 12 insertions(+), 5 deletions(-) diff --git a/src/Digdir.Library.Dialogporten.WebApiClient/Extensions/ServiceCollectionExtensions.cs b/src/Digdir.Library.Dialogporten.WebApiClient/Extensions/ServiceCollectionExtensions.cs index 10f3ae30c..a4ff6603b 100644 --- a/src/Digdir.Library.Dialogporten.WebApiClient/Extensions/ServiceCollectionExtensions.cs +++ b/src/Digdir.Library.Dialogporten.WebApiClient/Extensions/ServiceCollectionExtensions.cs @@ -46,18 +46,25 @@ public static IServiceCollection AddDialogportenClient(this IServiceCollection s EncodedJwk = dialogportenSettings!.Maskinporten.EncodedJwk, ClientId = dialogportenSettings.Maskinporten.ClientId, // Maskinportenmiljø utleded av Dialogporten-miljø - Environment = dialogportenSettings.Environment == "prod" ? "prod" : "test", + Environment = dialogportenSettings.Environment switch + { + "prod" => "prod", + "test" => "test", + _ => "local" + }, Scope = dialogportenSettings.Maskinporten.Scope, }; // Vi registrerer en maskinporten klient med oppgite settings, som kan brukes som en http message handler services.RegisterMaskinportenClientDefinition("dialogporten-sp-sdk", maskinportenSettings); - var baseAddress = string.Empty; - if (dialogportenSettings.Environment == "test") + var baseAddress = dialogportenSettings.Environment switch { - baseAddress = "https://platform.tt02.altinn.no/dialogporten"; - } + "test" => "https://platform.tt02.altinn.no/dialogporten", + "local" => "https://localhost:7214", + // "prod" => "https://platform.altinn.no/dialogporten", + _ => throw new NotImplementedException() + }; // Vi registrerer Refit, og legger til den registrerte maskinporten http message handlern // Amund: Partial er ikke mulig å finne etter compile time. var refitClients = Assembly.GetExecutingAssembly().GetTypes() From b85b008e671fd5a28cc3de46dfbd4560acde6c22 Mon Sep 17 00:00:00 2001 From: Amund Myrbostad Date: Fri, 6 Dec 2024 13:51:27 +0100 Subject: [PATCH 47/62] Created SearchTest --- .../Program.cs | 1 + .../appsettings.json | 2 +- .../Tests.cs | 26 +++++++++++++++++++ 3 files changed, 28 insertions(+), 1 deletion(-) diff --git a/src/Digdir.Library.Dialogporten.WebApiClient.Sample/Program.cs b/src/Digdir.Library.Dialogporten.WebApiClient.Sample/Program.cs index 095ada62b..e5d80d756 100644 --- a/src/Digdir.Library.Dialogporten.WebApiClient.Sample/Program.cs +++ b/src/Digdir.Library.Dialogporten.WebApiClient.Sample/Program.cs @@ -23,6 +23,7 @@ var dialogs = new Dialogs(dialogportenClient); var verifier = serviceProvider.GetRequiredService(); +// Amund: Test token var token = "eyJhbGciOiJFZERTQSIsInR5cCI6IkpXVCIsImtpZCI6ImRldi1wcmltYXJ5LXNpZ25pbmcta2V5In0.eyJqdGkiOiIzNGZhMGViNS0xZGVmLTQxMDYtYWY4YS0xMjljYjNiNTliNDYiLCJjIjoidXJuOmFsdGlubjpwZXJzb246aWRlbnRpZmllci1ubzowODg5NTY5OTY4NCIsImwiOjMsInAiOiJ1cm46YWx0aW5uOnBlcnNvbjppZGVudGlmaWVyLW5vOjA4ODk1Njk5Njg0IiwicyI6InVybjphbHRpbm46cmVzb3VyY2U6c3VwZXItc2ltcGxlLXNlcnZpY2UiLCJpIjoiMDE5MzI1MzgtMzEzZC03NGI1LTg1ZWMtMWI5MGIxMjYzNWRjIiwiYSI6InJlYWQiLCJpc3MiOiJodHRwczovL2xvY2FsaG9zdDo3MjE0L2FwaS92MSIsImlhdCI6MTczMTU3ODk5OCwibmJmIjoxNzMxNTc4OTk4LCJleHAiOjE3MzE1Nzk1OTh9.fL-rpDsXqwOSVk5zMizLZRaFugaz2VfVNf0CjOxIhSdwrkAhh1UfRu5RcD2OK4ddnRrCuz8iKKJyadkek9UGAg"; Console.WriteLine(verifier.Verify(token)); diff --git a/src/Digdir.Library.Dialogporten.WebApiClient.Sample/appsettings.json b/src/Digdir.Library.Dialogporten.WebApiClient.Sample/appsettings.json index fcaba932d..1fb853d49 100644 --- a/src/Digdir.Library.Dialogporten.WebApiClient.Sample/appsettings.json +++ b/src/Digdir.Library.Dialogporten.WebApiClient.Sample/appsettings.json @@ -1,6 +1,6 @@ { "DialogportenSettings": { - "Environment": "test", + "Environment": "local", "Maskinporten": { "ClientId": "ce3b732a-d4f2-4997-8545-adf8df70fe6c", "Scope": "digdir:dialogporten.serviceprovider digdir:dialogporten.serviceprovider.search", diff --git a/tests/Digdir.Library.Dialogporten.WebApiClient.Integration.Tests/Tests.cs b/tests/Digdir.Library.Dialogporten.WebApiClient.Integration.Tests/Tests.cs index f9a88603e..9711d20f0 100644 --- a/tests/Digdir.Library.Dialogporten.WebApiClient.Integration.Tests/Tests.cs +++ b/tests/Digdir.Library.Dialogporten.WebApiClient.Integration.Tests/Tests.cs @@ -80,6 +80,32 @@ public async Task PatchTest() Assert.True(updateResponse.IsSuccessStatusCode); } + [Fact] + public async Task SearchTest() + { + var dateOffset = DateTimeOffset.UtcNow; + var createDialogCommand = CreateCommand(); + var createResponse = await _fixture.DialogportenClient.V1ServiceOwnerDialogsCreateDialog(createDialogCommand); + + Assert.True(createResponse.IsSuccessStatusCode); + Assert.NotNull(createResponse.Content); + Assert.True(Guid.TryParse(createResponse.Content!.Replace("\"", "").Trim(), out var dialogId)); + _dialogIds.Add(dialogId); + + var param = new V1ServiceOwnerDialogsSearchSearchDialogQueryParams + { + Party = + [ + "urn:altinn:person:identifier-no:14886498226" + ], + CreatedAfter = dateOffset + }; + var searchResponse = await _fixture.DialogportenClient.V1ServiceOwnerDialogsSearchSearchDialog(param); + Assert.True(searchResponse.IsSuccessStatusCode); + Assert.NotNull(searchResponse.Content); + Assert.Single(searchResponse.Content!.Items); + + } public static V1ServiceOwnerDialogsCommandsCreate_DialogCommand CreateCommand() { var createDialogCommand = new V1ServiceOwnerDialogsCommandsCreate_DialogCommand From 457e9b748851aab626dff1f71e4a8392dc20315e Mon Sep 17 00:00:00 2001 From: Amund Myrbostad Date: Fri, 6 Dec 2024 14:15:29 +0100 Subject: [PATCH 48/62] Created Get test --- .../Tests.cs | 18 +++++++++++++++--- 1 file changed, 15 insertions(+), 3 deletions(-) diff --git a/tests/Digdir.Library.Dialogporten.WebApiClient.Integration.Tests/Tests.cs b/tests/Digdir.Library.Dialogporten.WebApiClient.Integration.Tests/Tests.cs index 9711d20f0..60fd0215c 100644 --- a/tests/Digdir.Library.Dialogporten.WebApiClient.Integration.Tests/Tests.cs +++ b/tests/Digdir.Library.Dialogporten.WebApiClient.Integration.Tests/Tests.cs @@ -49,9 +49,6 @@ public async Task PurgeTest() Assert.True(createResponse.IsSuccessStatusCode); Assert.NotNull(createResponse.Content); Assert.True(Guid.TryParse(createResponse.Content!.Replace("\"", "").Trim(), out var dialogId)); - var getResponse = await _fixture.DialogportenClient.V1ServiceOwnerDialogsGetGetDialog(dialogId, null!, CancellationToken.None); - Assert.Equal(HttpStatusCode.OK, getResponse.StatusCode); - Assert.Equal(getResponse.Content!.Progress!, 2); var purgeResponse = await _fixture.DialogportenClient.V1ServiceOwnerDialogsPurgePurgeDialog(dialogId, null); Assert.True(purgeResponse.IsSuccessStatusCode); @@ -80,6 +77,21 @@ public async Task PatchTest() Assert.True(updateResponse.IsSuccessStatusCode); } + [Fact] + public async Task GetTest() + { + var createDialogCommand = CreateCommand(); + var createResponse = await _fixture.DialogportenClient.V1ServiceOwnerDialogsCreateDialog(createDialogCommand); + + Assert.True(createResponse.IsSuccessStatusCode); + Assert.NotNull(createResponse.Content); + Assert.True(Guid.TryParse(createResponse.Content!.Replace("\"", "").Trim(), out var dialogId)); + _dialogIds.Add(dialogId); + var getResponse = await _fixture.DialogportenClient.V1ServiceOwnerDialogsGetGetDialog(dialogId, null!, CancellationToken.None); + Assert.Equal(HttpStatusCode.OK, getResponse.StatusCode); + Assert.Equal(getResponse.Content!.Progress!, createDialogCommand.Progress); + + } [Fact] public async Task SearchTest() { From 81df39870239552f73e98c629c0ca1e34fd205f0 Mon Sep 17 00:00:00 2001 From: Amund Myrbostad Date: Tue, 10 Dec 2024 11:13:13 +0100 Subject: [PATCH 49/62] Updated tests to use local nuget --- docs/schema/V1/swagger.verified.json | 2 +- .../Program.cs | 4 +- .../Extensions/ServiceCollectionExtensions.cs | 4 +- .../Features/V1/RefitterInterface.verified.cs | 28 +++++++- .../.refitter | 6 +- ...rten.WebApiClient.Integration.Tests.csproj | 22 ++++--- .../Tests.cs | 65 +++++++++++-------- 7 files changed, 88 insertions(+), 43 deletions(-) diff --git a/docs/schema/V1/swagger.verified.json b/docs/schema/V1/swagger.verified.json index 322a57cf0..2a1cfc555 100644 --- a/docs/schema/V1/swagger.verified.json +++ b/docs/schema/V1/swagger.verified.json @@ -6921,4 +6921,4 @@ "url": "https://altinn-dev-api.azure-api.net/dialogporten" } ] -} +} \ No newline at end of file diff --git a/src/Digdir.Library.Dialogporten.WebApiClient.Sample/Program.cs b/src/Digdir.Library.Dialogporten.WebApiClient.Sample/Program.cs index e5d80d756..44689e908 100644 --- a/src/Digdir.Library.Dialogporten.WebApiClient.Sample/Program.cs +++ b/src/Digdir.Library.Dialogporten.WebApiClient.Sample/Program.cs @@ -18,6 +18,7 @@ var serviceProvider = services.BuildServiceProvider(); +var now = DateTime.UtcNow; var dialogportenClient = serviceProvider.GetRequiredService(); @@ -53,9 +54,10 @@ Console.WriteLine("==Start Search Dialogs=="); var param = new V1ServiceOwnerDialogsSearchSearchDialogQueryParams() { - SystemLabel = [DialogEndUserContextsEntities_SystemLabel.Default] + CreatedAfter = now }; var result = await dialogportenClient.V1ServiceOwnerDialogsSearchSearchDialog(param); +Console.WriteLine(now); Console.WriteLine(result.Content!.Items.Count); Console.WriteLine(result.Content.Items.First().Org); Console.WriteLine("==End Search Dialogs=="); diff --git a/src/Digdir.Library.Dialogporten.WebApiClient/Extensions/ServiceCollectionExtensions.cs b/src/Digdir.Library.Dialogporten.WebApiClient/Extensions/ServiceCollectionExtensions.cs index a4ff6603b..678fbca34 100644 --- a/src/Digdir.Library.Dialogporten.WebApiClient/Extensions/ServiceCollectionExtensions.cs +++ b/src/Digdir.Library.Dialogporten.WebApiClient/Extensions/ServiceCollectionExtensions.cs @@ -49,8 +49,9 @@ public static IServiceCollection AddDialogportenClient(this IServiceCollection s Environment = dialogportenSettings.Environment switch { "prod" => "prod", + "local" => "test", "test" => "test", - _ => "local" + _ => throw new ArgumentException() }, Scope = dialogportenSettings.Maskinporten.Scope, }; @@ -73,6 +74,7 @@ public static IServiceCollection AddDialogportenClient(this IServiceCollection s x.IsInterface) .ToList(); + ; foreach (var refitClient in refitClients) { services diff --git a/src/Digdir.Library.Dialogporten.WebApiClient/Features/V1/RefitterInterface.verified.cs b/src/Digdir.Library.Dialogporten.WebApiClient/Features/V1/RefitterInterface.verified.cs index 242dfe32c..a2dfcb49d 100644 --- a/src/Digdir.Library.Dialogporten.WebApiClient/Features/V1/RefitterInterface.verified.cs +++ b/src/Digdir.Library.Dialogporten.WebApiClient/Features/V1/RefitterInterface.verified.cs @@ -55,13 +55,13 @@ public class V1ServiceOwnerDialogsSearchSearchDialogQueryParams /// /// Only return dialogs created after this date /// - [Query] + [Query(Format = "yyyy-MM-ddThh:mm:ssZ")] public System.DateTimeOffset? CreatedAfter { get; set; } /// /// Only return dialogs created before this date /// - [Query] + [Query(Format = "yyyy-MM-ddThh:mm:ssZ")] public System.DateTimeOffset? CreatedBefore { get; set; } /// @@ -162,7 +162,7 @@ public V1ServiceOwnerDialogActivitiesNotificationConditionNotificationConditionQ } /// Gets a list of dialogs - [System.CodeDom.Compiler.GeneratedCode("Refitter", "1.4.1.0")] + [System.CodeDom.Compiler.GeneratedCode("Refitter", "1.0.0.0")] public partial interface IServiceownerApi { /// Gets a list of dialogs @@ -2898,6 +2898,7 @@ public partial class V1ServiceOwnerDialogsQueriesGet_DialogActivity /// [JsonPropertyName("createdAt")] + [JsonConverter(typeof(DateFormatConverter))] public System.DateTimeOffset? CreatedAt { get; set; } /// @@ -3628,6 +3629,7 @@ public partial class V1ServiceOwnerDialogsQueriesSearch_DialogActivity /// [JsonPropertyName("createdAt")] + [JsonConverter(typeof(DateFormatConverter))] public System.DateTimeOffset? CreatedAt { get; set; } /// @@ -4122,6 +4124,26 @@ public partial class V1ServiceOwnerDialogTransmissionsQueriesSearch_Transmission } + [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "14.2.0.0 (NJsonSchema v11.1.0.0 (Newtonsoft.Json v13.0.0.0))")] + internal class DateFormatConverter : JsonConverter + { + public override System.DateTimeOffset Read(ref System.Text.Json.Utf8JsonReader reader, System.Type typeToConvert, System.Text.Json.JsonSerializerOptions options) + { + var dateTime = reader.GetString(); + if (dateTime == null) + { + throw new System.Text.Json.JsonException("Unexpected JsonTokenType.Null"); + } + + return System.DateTimeOffset.Parse(dateTime); + } + + public override void Write(System.Text.Json.Utf8JsonWriter writer, System.DateTimeOffset value, System.Text.Json.JsonSerializerOptions options) + { + writer.WriteStringValue(value.ToString("yyyy-MM-dd")); + } + } + } diff --git a/tests/Digdir.Library.Dialogporten.WebApiClient.Integration.Tests/.refitter b/tests/Digdir.Library.Dialogporten.WebApiClient.Integration.Tests/.refitter index d62842e26..f594e73fd 100644 --- a/tests/Digdir.Library.Dialogporten.WebApiClient.Integration.Tests/.refitter +++ b/tests/Digdir.Library.Dialogporten.WebApiClient.Integration.Tests/.refitter @@ -4,6 +4,7 @@ "outputFolder": "refitter", "operationNameGenerator": "SingleClientFromOperationId", "trimUnusedSchema": true, + "useIsoDateFormat": true, "multipleInterfaces": "ByTag", "includeTags": [ "Serviceowner" @@ -11,5 +12,8 @@ "useCancellationTokens": true, "returnIApiResponse": true, "useDynamicQuerystringParameters": true, - "outputFilename": "RefitterInterface.cs" + "outputFilename": "RefitterInterface.cs", + "codeGeneratorSettings": { + "DateFormat": "yyyy-MM-ddThh:mm:ssZ" + } } diff --git a/tests/Digdir.Library.Dialogporten.WebApiClient.Integration.Tests/Digdir.Library.Dialogporten.WebApiClient.Integration.Tests.csproj b/tests/Digdir.Library.Dialogporten.WebApiClient.Integration.Tests/Digdir.Library.Dialogporten.WebApiClient.Integration.Tests.csproj index 104e9ae95..a1e92e340 100644 --- a/tests/Digdir.Library.Dialogporten.WebApiClient.Integration.Tests/Digdir.Library.Dialogporten.WebApiClient.Integration.Tests.csproj +++ b/tests/Digdir.Library.Dialogporten.WebApiClient.Integration.Tests/Digdir.Library.Dialogporten.WebApiClient.Integration.Tests.csproj @@ -9,16 +9,20 @@ - - - + + + - - + + all runtime; build; native; contentfiles; analyzers; buildtransitive - + + + + + @@ -28,15 +32,15 @@ - + - + - + diff --git a/tests/Digdir.Library.Dialogporten.WebApiClient.Integration.Tests/Tests.cs b/tests/Digdir.Library.Dialogporten.WebApiClient.Integration.Tests/Tests.cs index 60fd0215c..a570a906f 100644 --- a/tests/Digdir.Library.Dialogporten.WebApiClient.Integration.Tests/Tests.cs +++ b/tests/Digdir.Library.Dialogporten.WebApiClient.Integration.Tests/Tests.cs @@ -30,39 +30,35 @@ public void Dispose() } } -public class Tests : IClassFixture, IAsyncDisposable +public class Tests(WebApiClientFixture fixture) : IClassFixture, IDisposable { - private readonly WebApiClientFixture _fixture; - private readonly List _dialogIds; - public Tests(WebApiClientFixture fixture) - { - _fixture = fixture; - _dialogIds = []; - } + private readonly List _dialogIds = []; [Fact] public async Task PurgeTest() { var createDialogCommand = CreateCommand(); - var createResponse = await _fixture.DialogportenClient.V1ServiceOwnerDialogsCreateDialog(createDialogCommand); + var createResponse = await fixture.DialogportenClient.V1ServiceOwnerDialogsCreateDialog(createDialogCommand); Assert.True(createResponse.IsSuccessStatusCode); Assert.NotNull(createResponse.Content); Assert.True(Guid.TryParse(createResponse.Content!.Replace("\"", "").Trim(), out var dialogId)); - var purgeResponse = await _fixture.DialogportenClient.V1ServiceOwnerDialogsPurgePurgeDialog(dialogId, null); + var purgeResponse = await fixture.DialogportenClient.V1ServiceOwnerDialogsPurgePurgeDialog(dialogId, null); Assert.True(purgeResponse.IsSuccessStatusCode); } + [Fact] public async Task PatchTest() { var createDialogCommand = CreateCommand(); - var createResponse = await _fixture.DialogportenClient.V1ServiceOwnerDialogsCreateDialog(createDialogCommand); + var createResponse = await fixture.DialogportenClient.V1ServiceOwnerDialogsCreateDialog(createDialogCommand); Assert.True(createResponse.IsSuccessStatusCode); Assert.NotNull(createResponse.Content); Assert.True(Guid.TryParse(createResponse.Content!.Replace("\"", "").Trim(), out var dialogId)); _dialogIds.Add(dialogId); + List patchDocument = [ new() @@ -73,7 +69,7 @@ public async Task PatchTest() Value = 50 } ]; - var updateResponse = await _fixture.DialogportenClient.V1ServiceOwnerDialogsPatchDialog(dialogId, patchDocument, null, CancellationToken.None); + var updateResponse = await fixture.DialogportenClient.V1ServiceOwnerDialogsPatchDialog(dialogId, patchDocument, null, CancellationToken.None); Assert.True(updateResponse.IsSuccessStatusCode); } @@ -81,43 +77,59 @@ public async Task PatchTest() public async Task GetTest() { var createDialogCommand = CreateCommand(); - var createResponse = await _fixture.DialogportenClient.V1ServiceOwnerDialogsCreateDialog(createDialogCommand); + var createResponse = await fixture.DialogportenClient.V1ServiceOwnerDialogsCreateDialog(createDialogCommand); Assert.True(createResponse.IsSuccessStatusCode); Assert.NotNull(createResponse.Content); Assert.True(Guid.TryParse(createResponse.Content!.Replace("\"", "").Trim(), out var dialogId)); - _dialogIds.Add(dialogId); - var getResponse = await _fixture.DialogportenClient.V1ServiceOwnerDialogsGetGetDialog(dialogId, null!, CancellationToken.None); + var getResponse = await fixture.DialogportenClient.V1ServiceOwnerDialogsGetGetDialog(dialogId, null!, CancellationToken.None); Assert.Equal(HttpStatusCode.OK, getResponse.StatusCode); Assert.Equal(getResponse.Content!.Progress!, createDialogCommand.Progress); + await fixture.DialogportenClient.V1ServiceOwnerDialogsPurgePurgeDialog(dialogId, null!); } + [Fact] public async Task SearchTest() { + // Amund: DateTimeOffset blir sendt over i feil format. Virker som den blir sendt som string og parset fra string igjen. + // Usikker på hvordan jeg skal sende i annet format? + // Det er nok en implisitt toString som skjer. hvordan skal jeg da gi den format stringen? + /* + * Amund Q:. + * [x] Refit støtter date format. + * [x] Refitter trenger at swagger sier "date" på format. + * [x] Swagger sier nå "date-time" + * [x] Refit støtter custom date format + * [x] Refitter søtter ikke custom date format + * [x] Få Swagger gen til å generete "date" istedet for "date-time"? + * [x] lag til date-time støtte i refitter + * [x] Legge til støtte for custom date format i Refitter + * [x] Virker doable, Relativt lett leslig kilde kode. + * [ ] Lagde PR inn til refitter repo med forandringene + */ var dateOffset = DateTimeOffset.UtcNow; + // Thread.CurrentThread.CurrentCulture.Calendar = new GregorianCalendar(GregorianCalendarTypes.TransliteratedEnglish); var createDialogCommand = CreateCommand(); - var createResponse = await _fixture.DialogportenClient.V1ServiceOwnerDialogsCreateDialog(createDialogCommand); + var createResponse = await fixture.DialogportenClient.V1ServiceOwnerDialogsCreateDialog(createDialogCommand); + Assert.True(createResponse.IsSuccessStatusCode); Assert.NotNull(createResponse.Content); Assert.True(Guid.TryParse(createResponse.Content!.Replace("\"", "").Trim(), out var dialogId)); - _dialogIds.Add(dialogId); var param = new V1ServiceOwnerDialogsSearchSearchDialogQueryParams { - Party = - [ - "urn:altinn:person:identifier-no:14886498226" - ], CreatedAfter = dateOffset }; - var searchResponse = await _fixture.DialogportenClient.V1ServiceOwnerDialogsSearchSearchDialog(param); + var searchResponse = await fixture.DialogportenClient.V1ServiceOwnerDialogsSearchSearchDialog(param, CancellationToken.None); + await fixture.DialogportenClient.V1ServiceOwnerDialogsPurgePurgeDialog(dialogId, null!, CancellationToken.None); Assert.True(searchResponse.IsSuccessStatusCode); Assert.NotNull(searchResponse.Content); Assert.Single(searchResponse.Content!.Items); } + public static V1ServiceOwnerDialogsCommandsCreate_DialogCommand CreateCommand() { var createDialogCommand = new V1ServiceOwnerDialogsCommandsCreate_DialogCommand @@ -232,14 +244,13 @@ public static V1ServiceOwnerDialogsCommandsCreate_DialogCommand CreateCommand() return createDialogCommand; } - public ValueTask DisposeAsync() + public async void Dispose() { - GC.SuppressFinalize(this); foreach (var dialogId in _dialogIds) { - _fixture.DialogportenClient.V1ServiceOwnerDialogsPurgePurgeDialog(dialogId, null!); + var purgeResponse = await fixture.DialogportenClient.V1ServiceOwnerDialogsPurgePurgeDialog(dialogId, null!); + Assert.True(purgeResponse.IsSuccessStatusCode); } - - return ValueTask.CompletedTask; + GC.SuppressFinalize(this); } } From bf88cdc30dd2eaa5ab15b9eafdb3d0f215e11c27 Mon Sep 17 00:00:00 2001 From: Amund Myrbostad Date: Wed, 11 Dec 2024 13:56:38 +0100 Subject: [PATCH 50/62] Created UpdateTest --- .../Program.cs | 120 ++++++++++- .../Features/V1/RefitterInterface.verified.cs | 84 +++++--- .../.refitter | 3 +- ...rten.WebApiClient.Integration.Tests.csproj | 2 +- .../Tests.cs | 198 +++++++++++++++++- 5 files changed, 359 insertions(+), 48 deletions(-) diff --git a/src/Digdir.Library.Dialogporten.WebApiClient.Sample/Program.cs b/src/Digdir.Library.Dialogporten.WebApiClient.Sample/Program.cs index 44689e908..c714db4ef 100644 --- a/src/Digdir.Library.Dialogporten.WebApiClient.Sample/Program.cs +++ b/src/Digdir.Library.Dialogporten.WebApiClient.Sample/Program.cs @@ -54,7 +54,7 @@ Console.WriteLine("==Start Search Dialogs=="); var param = new V1ServiceOwnerDialogsSearchSearchDialogQueryParams() { - CreatedAfter = now + SystemLabel = [DialogEndUserContextsEntities_SystemLabel.Default] }; var result = await dialogportenClient.V1ServiceOwnerDialogsSearchSearchDialog(param); Console.WriteLine(now); @@ -78,6 +78,12 @@ Console.WriteLine(patchResponse.StatusCode); Console.WriteLine("== End Patch Dialog =="); +Console.WriteLine("== Start update Dialog =="); +var updateCommand = UpdateCommand(); +var updateResponse = await dialogportenClient.V1ServiceOwnerDialogsUpdateDialog(guid, updateCommand, null, CancellationToken.None); +Console.WriteLine(updateResponse.StatusCode); +Console.WriteLine(updateResponse.Error?.Content); +Console.WriteLine("== End Update Dialog =="); Console.WriteLine("== Start Delete Dialog =="); var deleteResponse = await dialogportenClient.V1ServiceOwnerDialogsDeleteDialog(guid, null); Console.WriteLine(deleteResponse.IsSuccessStatusCode); @@ -92,7 +98,7 @@ result = await dialogportenClient.V1ServiceOwnerDialogsSearchSearchDialog(param); -Debug.Assert(result != null, nameof(result) + " != null"); +Debug.Assert(result.Content != null, nameof(result) + " != null"); Console.WriteLine(result.Content!.Items.Count); Console.WriteLine("== Start Purge Dialog == "); var purgeResponse = await dialogs.Purge(guid, dialog.Revision); @@ -104,8 +110,6 @@ Console.WriteLine(dialogAfterPurge.StatusCode); } Console.WriteLine("== End Purge Dialog =="); -var updateCommand = UpdateCommand(); -await dialogportenClient.V1ServiceOwnerDialogsUpdateDialog(guid, updateCommand, null, CancellationToken.None); return; static V1ServiceOwnerDialogsCommandsCreate_DialogCommand CreateCommand() @@ -224,6 +228,110 @@ static V1ServiceOwnerDialogsCommandsCreate_DialogCommand CreateCommand() static V1ServiceOwnerDialogsCommandsUpdate_Dialog UpdateCommand() { - V1ServiceOwnerDialogsCommandsUpdate_Dialog updateDialog = new(); - return updateDialog; + var createDialogCommand = new V1ServiceOwnerDialogsCommandsUpdate_Dialog + { + Status = DialogsEntities_DialogStatus.New, + Progress = 60, + Content = new V1ServiceOwnerDialogsCommandsUpdate_Content + { + Title = new V1CommonContent_ContentValue + { + Value = + [ + new V1CommonLocalizations_Localization + { + LanguageCode = "nb", + Value = "Hoved" + }, + new V1CommonLocalizations_Localization + { + LanguageCode = "en", + Value = "Main" + } + ], + MediaType = "text/plain" + }, + Summary = new V1CommonContent_ContentValue + { + Value = + [ + new V1CommonLocalizations_Localization + { + LanguageCode = "nb", + Value = "Hoved Summary" + }, + new V1CommonLocalizations_Localization + { + LanguageCode = "en", + Value = "Main Summary" + } + ], + MediaType = "text/plain" + } + + + }, + Transmissions = + [ + new V1ServiceOwnerDialogsCommandsUpdate_Transmission + { + Attachments = + [ + new V1ServiceOwnerDialogsCommandsUpdate_TransmissionAttachment + { + DisplayName = + [ + new V1CommonLocalizations_Localization + { + LanguageCode = "nb", + Value = "Hoved mission" + } + ], + Urls = + [ + new V1ServiceOwnerDialogsCommandsUpdate_TransmissionAttachmentUrl + { + ConsumerType = Attachments_AttachmentUrlConsumerType.Gui, + Url = new Uri("https://digdir.apps.tt02.altinn.no/some-other-url") + } + ] + + } + ], + Content = new V1ServiceOwnerDialogsCommandsUpdate_TransmissionContent + { + Summary = new V1CommonContent_ContentValue + { + MediaType = "text/plain", + Value = + [ + new V1CommonLocalizations_Localization + { + LanguageCode = "nb", + Value = "Transmission summary" + } + ] + }, + Title = new V1CommonContent_ContentValue + { + MediaType = "text/plain", + Value = + [ + new V1CommonLocalizations_Localization + { + LanguageCode = "nb", + Value = "Transmission Title" + } + ] + } + }, + Sender = new V1ServiceOwnerCommonActors_Actor + { + ActorType = Actors_ActorType.ServiceOwner + }, + Type = DialogsEntitiesTransmissions_DialogTransmissionType.Information + } + ] + }; + return createDialogCommand; } diff --git a/src/Digdir.Library.Dialogporten.WebApiClient/Features/V1/RefitterInterface.verified.cs b/src/Digdir.Library.Dialogporten.WebApiClient/Features/V1/RefitterInterface.verified.cs index a2dfcb49d..2e9ce2151 100644 --- a/src/Digdir.Library.Dialogporten.WebApiClient/Features/V1/RefitterInterface.verified.cs +++ b/src/Digdir.Library.Dialogporten.WebApiClient/Features/V1/RefitterInterface.verified.cs @@ -55,49 +55,49 @@ public class V1ServiceOwnerDialogsSearchSearchDialogQueryParams /// /// Only return dialogs created after this date /// - [Query(Format = "yyyy-MM-ddThh:mm:ssZ")] + [Query(Format = "yyyy-MM-ddTHH:mm:ssZ")] public System.DateTimeOffset? CreatedAfter { get; set; } /// /// Only return dialogs created before this date /// - [Query(Format = "yyyy-MM-ddThh:mm:ssZ")] + [Query(Format = "yyyy-MM-ddTHH:mm:ssZ")] public System.DateTimeOffset? CreatedBefore { get; set; } /// /// Only return dialogs updated after this date /// - [Query] + [Query(Format = "yyyy-MM-ddTHH:mm:ssZ")] public System.DateTimeOffset? UpdatedAfter { get; set; } /// /// Only return dialogs updated before this date /// - [Query] + [Query(Format = "yyyy-MM-ddTHH:mm:ssZ")] public System.DateTimeOffset? UpdatedBefore { get; set; } /// /// Only return dialogs with due date after this date /// - [Query] + [Query(Format = "yyyy-MM-ddTHH:mm:ssZ")] public System.DateTimeOffset? DueAfter { get; set; } /// /// Only return dialogs with due date before this date /// - [Query] + [Query(Format = "yyyy-MM-ddTHH:mm:ssZ")] public System.DateTimeOffset? DueBefore { get; set; } /// /// Only return dialogs with visible-from date after this date /// - [Query] + [Query(Format = "yyyy-MM-ddTHH:mm:ssZ")] public System.DateTimeOffset? VisibleAfter { get; set; } /// /// Only return dialogs with visible-from date before this date /// - [Query] + [Query(Format = "yyyy-MM-ddTHH:mm:ssZ")] public System.DateTimeOffset? VisibleBefore { get; set; } /// @@ -162,7 +162,7 @@ public V1ServiceOwnerDialogActivitiesNotificationConditionNotificationConditionQ } /// Gets a list of dialogs - [System.CodeDom.Compiler.GeneratedCode("Refitter", "1.0.0.0")] + [System.CodeDom.Compiler.GeneratedCode("Refitter", "1.1.0.0")] public partial interface IServiceownerApi { /// Gets a list of dialogs @@ -255,6 +255,10 @@ public partial interface IServiceownerApi /// The dialog aggregate was deleted successfully. /// /// + /// 400 + /// Validation error occured. See problem details for a list of errors. + /// + /// /// 401 /// Missing or invalid authentication token. Requires a Maskinporten-token with the scope \"digdir:dialogporten.serviceprovider\". /// @@ -267,6 +271,10 @@ public partial interface IServiceownerApi /// The given dialog ID was not found or is already deleted. /// /// + /// 410 + /// Entity with the given key(s) is removed. + /// + /// /// 412 /// The supplied If-Match header did not match the current Revision value for the dialog. The request was not applied. /// @@ -394,6 +402,10 @@ public partial interface IServiceownerApi /// The given dialog ID was not found or is already deleted. /// /// + /// 410 + /// Entity with the given key(s) is removed. + /// + /// /// 412 /// The supplied If-Match header did not match the current Revision value for the dialog. The request was not applied. /// @@ -535,6 +547,10 @@ public partial interface IServiceownerApi /// The given dialog ID was not found or is already deleted. /// /// + /// 410 + /// Entity with the given key(s) is removed. + /// + /// /// 412 /// The supplied If-Match header did not match the current Revision value for the dialog. The request was not applied. /// @@ -573,6 +589,10 @@ public partial interface IServiceownerApi /// 404 /// The given dialog ID was not found or was deleted, or the given activity ID was not found. /// + /// + /// 410 + /// Entity with the given key(s) is removed. + /// /// /// [Headers("Accept: application/json, application/problem+json")] @@ -602,7 +622,11 @@ public partial interface IServiceownerApi /// /// /// 404 - /// Not Found + /// The given dialog ID was not found or is already deleted. + /// + /// + /// 410 + /// Entity with the given key(s) is removed. /// /// /// @@ -633,7 +657,11 @@ public partial interface IServiceownerApi /// /// /// 404 - /// Not Found + /// The given dialog ID was not found or is already deleted. + /// + /// + /// 410 + /// Entity with the given key(s) is removed. /// /// /// @@ -666,6 +694,10 @@ public partial interface IServiceownerApi /// 404 /// The given dialog ID was not found or is already deleted. /// + /// + /// 410 + /// Entity with the given key(s) is removed. + /// /// /// [Headers("Accept: application/json, application/problem+json")] @@ -706,6 +738,10 @@ public partial interface IServiceownerApi /// The given dialog ID was not found or is already deleted. /// /// + /// 410 + /// Entity with the given key(s) is removed. + /// + /// /// 412 /// The supplied If-Match header did not match the current Revision value for the dialog. The request was not applied. /// @@ -744,6 +780,10 @@ public partial interface IServiceownerApi /// 404 /// The given dialog ID was not found or was deleted, or the given transmission ID was not found. /// + /// + /// 410 + /// Entity with the given key(s) is removed. + /// /// /// [Headers("Accept: application/json, application/problem+json")] @@ -2898,7 +2938,6 @@ public partial class V1ServiceOwnerDialogsQueriesGet_DialogActivity /// [JsonPropertyName("createdAt")] - [JsonConverter(typeof(DateFormatConverter))] public System.DateTimeOffset? CreatedAt { get; set; } /// @@ -3629,7 +3668,6 @@ public partial class V1ServiceOwnerDialogsQueriesSearch_DialogActivity /// [JsonPropertyName("createdAt")] - [JsonConverter(typeof(DateFormatConverter))] public System.DateTimeOffset? CreatedAt { get; set; } /// @@ -4124,26 +4162,6 @@ public partial class V1ServiceOwnerDialogTransmissionsQueriesSearch_Transmission } - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "14.2.0.0 (NJsonSchema v11.1.0.0 (Newtonsoft.Json v13.0.0.0))")] - internal class DateFormatConverter : JsonConverter - { - public override System.DateTimeOffset Read(ref System.Text.Json.Utf8JsonReader reader, System.Type typeToConvert, System.Text.Json.JsonSerializerOptions options) - { - var dateTime = reader.GetString(); - if (dateTime == null) - { - throw new System.Text.Json.JsonException("Unexpected JsonTokenType.Null"); - } - - return System.DateTimeOffset.Parse(dateTime); - } - - public override void Write(System.Text.Json.Utf8JsonWriter writer, System.DateTimeOffset value, System.Text.Json.JsonSerializerOptions options) - { - writer.WriteStringValue(value.ToString("yyyy-MM-dd")); - } - } - } diff --git a/tests/Digdir.Library.Dialogporten.WebApiClient.Integration.Tests/.refitter b/tests/Digdir.Library.Dialogporten.WebApiClient.Integration.Tests/.refitter index f594e73fd..700fb94a8 100644 --- a/tests/Digdir.Library.Dialogporten.WebApiClient.Integration.Tests/.refitter +++ b/tests/Digdir.Library.Dialogporten.WebApiClient.Integration.Tests/.refitter @@ -4,7 +4,6 @@ "outputFolder": "refitter", "operationNameGenerator": "SingleClientFromOperationId", "trimUnusedSchema": true, - "useIsoDateFormat": true, "multipleInterfaces": "ByTag", "includeTags": [ "Serviceowner" @@ -14,6 +13,6 @@ "useDynamicQuerystringParameters": true, "outputFilename": "RefitterInterface.cs", "codeGeneratorSettings": { - "DateFormat": "yyyy-MM-ddThh:mm:ssZ" + "dateFormat": "yyyy-MM-ddTHH:mm:ssZ" } } diff --git a/tests/Digdir.Library.Dialogporten.WebApiClient.Integration.Tests/Digdir.Library.Dialogporten.WebApiClient.Integration.Tests.csproj b/tests/Digdir.Library.Dialogporten.WebApiClient.Integration.Tests/Digdir.Library.Dialogporten.WebApiClient.Integration.Tests.csproj index a1e92e340..2eb1e9915 100644 --- a/tests/Digdir.Library.Dialogporten.WebApiClient.Integration.Tests/Digdir.Library.Dialogporten.WebApiClient.Integration.Tests.csproj +++ b/tests/Digdir.Library.Dialogporten.WebApiClient.Integration.Tests/Digdir.Library.Dialogporten.WebApiClient.Integration.Tests.csproj @@ -14,7 +14,7 @@ - + all runtime; build; native; contentfiles; analyzers; buildtransitive diff --git a/tests/Digdir.Library.Dialogporten.WebApiClient.Integration.Tests/Tests.cs b/tests/Digdir.Library.Dialogporten.WebApiClient.Integration.Tests/Tests.cs index a570a906f..66f6febdc 100644 --- a/tests/Digdir.Library.Dialogporten.WebApiClient.Integration.Tests/Tests.cs +++ b/tests/Digdir.Library.Dialogporten.WebApiClient.Integration.Tests/Tests.cs @@ -54,7 +54,7 @@ public async Task PatchTest() var createDialogCommand = CreateCommand(); var createResponse = await fixture.DialogportenClient.V1ServiceOwnerDialogsCreateDialog(createDialogCommand); - Assert.True(createResponse.IsSuccessStatusCode); + Assert.True(createResponse.IsSuccessStatusCode, createResponse.Error?.Content); Assert.NotNull(createResponse.Content); Assert.True(Guid.TryParse(createResponse.Content!.Replace("\"", "").Trim(), out var dialogId)); _dialogIds.Add(dialogId); @@ -69,8 +69,8 @@ public async Task PatchTest() Value = 50 } ]; - var updateResponse = await fixture.DialogportenClient.V1ServiceOwnerDialogsPatchDialog(dialogId, patchDocument, null, CancellationToken.None); - Assert.True(updateResponse.IsSuccessStatusCode); + var patchResponse = await fixture.DialogportenClient.V1ServiceOwnerDialogsPatchDialog(dialogId, patchDocument, null, CancellationToken.None); + Assert.True(patchResponse.IsSuccessStatusCode); } [Fact] @@ -89,6 +89,25 @@ public async Task GetTest() } + [Fact] + public async Task UpdateTest() + { + + var createDialogCommand = CreateCommand(); + var createResponse = await fixture.DialogportenClient.V1ServiceOwnerDialogsCreateDialog(createDialogCommand); + + Assert.True(createResponse.IsSuccessStatusCode); + Assert.NotNull(createResponse.Content); + Assert.True(Guid.TryParse(createResponse.Content!.Replace("\"", "").Trim(), out var dialogId)); + _dialogIds.Add(dialogId); + + var updateDialogCommand = UpdateCommand(); + var updateResponse = await fixture.DialogportenClient.V1ServiceOwnerDialogsUpdateDialog(dialogId, updateDialogCommand, null!, CancellationToken.None); + Assert.True(updateResponse.IsSuccessStatusCode, updateResponse.Error?.Content); + var getResponse = await fixture.DialogportenClient.V1ServiceOwnerDialogsGetGetDialog(dialogId, null!); + Assert.True(getResponse.IsSuccessStatusCode); + Assert.Equal(updateDialogCommand.Progress, getResponse.Content!.Progress); + } [Fact] public async Task SearchTest() { @@ -106,10 +125,15 @@ public async Task SearchTest() * [x] lag til date-time støtte i refitter * [x] Legge til støtte for custom date format i Refitter * [x] Virker doable, Relativt lett leslig kilde kode. - * [ ] Lagde PR inn til refitter repo med forandringene + * [x] Lagde PR med forandringene, blitgt Merget inn + * [ ] Vente på preview av refitter blir lansert + */ + + /* Amund: . + * 500 Error om jeg sender en null istedet for et tomt array. + * Funker også i postman med å skrive null */ var dateOffset = DateTimeOffset.UtcNow; - // Thread.CurrentThread.CurrentCulture.Calendar = new GregorianCalendar(GregorianCalendarTypes.TransliteratedEnglish); var createDialogCommand = CreateCommand(); var createResponse = await fixture.DialogportenClient.V1ServiceOwnerDialogsCreateDialog(createDialogCommand); @@ -130,16 +154,176 @@ public async Task SearchTest() } + public static V1ServiceOwnerDialogsCommandsUpdate_Dialog UpdateCommand() + { + var createDialogCommand = new V1ServiceOwnerDialogsCommandsUpdate_Dialog + { + Status = DialogsEntities_DialogStatus.New, + Progress = 60, + SearchTags = [], + Attachments = [], + GuiActions = [], + ApiActions = [], + Content = new V1ServiceOwnerDialogsCommandsUpdate_Content + { + Title = new V1CommonContent_ContentValue + { + Value = + [ + new V1CommonLocalizations_Localization + { + LanguageCode = "nb", + Value = "Hoved" + }, + new V1CommonLocalizations_Localization + { + LanguageCode = "en", + Value = "Main" + } + ], + MediaType = "text/plain" + }, + Summary = new V1CommonContent_ContentValue + { + Value = + [ + new V1CommonLocalizations_Localization + { + LanguageCode = "nb", + Value = "Hoved Summary" + }, + new V1CommonLocalizations_Localization + { + LanguageCode = "en", + Value = "Main Summary" + } + ], + MediaType = "text/plain" + } + + + }, + Transmissions = + [ + new V1ServiceOwnerDialogsCommandsUpdate_Transmission + { + Attachments = + [ + new V1ServiceOwnerDialogsCommandsUpdate_TransmissionAttachment + { + DisplayName = + [ + new V1CommonLocalizations_Localization + { + LanguageCode = "nb", + Value = "Hoved mission" + } + ], + Urls = + [ + new V1ServiceOwnerDialogsCommandsUpdate_TransmissionAttachmentUrl + { + ConsumerType = Attachments_AttachmentUrlConsumerType.Gui, + Url = new Uri("https://digdir.apps.tt02.altinn.no/some-other-url") + } + ] + + } + ], + Content = new V1ServiceOwnerDialogsCommandsUpdate_TransmissionContent + { + Summary = new V1CommonContent_ContentValue + { + MediaType = "text/plain", + Value = + [ + new V1CommonLocalizations_Localization + { + LanguageCode = "nb", + Value = "Transmission summary" + } + ] + }, + Title = new V1CommonContent_ContentValue + { + MediaType = "text/plain", + Value = + [ + new V1CommonLocalizations_Localization + { + LanguageCode = "nb", + Value = "Transmission Title" + } + ] + } + }, + Sender = new V1ServiceOwnerCommonActors_Actor + { + ActorType = Actors_ActorType.ServiceOwner + }, + Type = DialogsEntitiesTransmissions_DialogTransmissionType.Information + } + ], + VisibleFrom = null + }; + return createDialogCommand; + } public static V1ServiceOwnerDialogsCommandsCreate_DialogCommand CreateCommand() { + var now = DateTimeOffset.UtcNow; var createDialogCommand = new V1ServiceOwnerDialogsCommandsCreate_DialogCommand { + Activities = + [ + new V1ServiceOwnerDialogsCommandsCreate_Activity + { + CreatedAt = now, + Description = + [ + new V1CommonLocalizations_Localization + { + LanguageCode = "nb", + Value = "Dette er en beskrivelse" + } + ], + PerformedBy = new V1ServiceOwnerCommonActors_Actor + { + ActorType = Actors_ActorType.ServiceOwner + }, + Type = DialogsEntitiesActivities_DialogActivityType.Information + } + ], + ApiActions = + [ + new V1ServiceOwnerDialogsCommandsCreate_ApiAction + { + Action = "submit", + Endpoints = + [ + new V1ServiceOwnerDialogsCommandsCreate_ApiActionEndpoint + { + HttpMethod = Http_HttpVerb.POST, + RequestSchema = new Uri("https://digdir.apps.tt02.altinn.no/digdir/super-simple-service/api/jsonschema/mainform-20231015"), + ResponseSchema = new Uri("https://docs.altinn.studio/swagger/altinn-app-v1.json#/components/schemas/DataElement"), + Url = new Uri("https://digdir.apps.tt02.altinn.no/digdir/super-simple-service/#/instance/50756302/58d88b01-8840-8771-a6dd-e51e9809df2c/data?dataType=mainform-20231015"), + Version = "20231015" + } + ] + } + ], // createDialogCommand.Id = Guid.Parse("01927a6d-40d8-728b-b3da-845b680840d9"); ServiceResource = "urn:altinn:resource:super-simple-service", Party = "urn:altinn:person:identifier-no:14886498226", SystemLabel = DialogEndUserContextsEntities_SystemLabel.Default, Status = DialogsEntities_DialogStatus.New, Progress = 2, + SearchTags = + [ + new V1ServiceOwnerDialogsCommandsCreate_SearchTag + { + Value = "Search tag" + } + ], Content = new V1ServiceOwnerDialogsCommandsCreate_Content { Title = new V1CommonContent_ContentValue @@ -239,7 +423,9 @@ public static V1ServiceOwnerDialogsCommandsCreate_DialogCommand CreateCommand() }, Type = DialogsEntitiesTransmissions_DialogTransmissionType.Information } - ] + ], + UpdatedAt = default, + VisibleFrom = null }; return createDialogCommand; } From aac7bfa0cf41e35c93934069d743725bcede2dc4 Mon Sep 17 00:00:00 2001 From: Amund Myrbostad Date: Wed, 11 Dec 2024 14:50:11 +0100 Subject: [PATCH 51/62] Added deleteTest --- .../Tests.cs | 27 +++++++++++++++---- 1 file changed, 22 insertions(+), 5 deletions(-) diff --git a/tests/Digdir.Library.Dialogporten.WebApiClient.Integration.Tests/Tests.cs b/tests/Digdir.Library.Dialogporten.WebApiClient.Integration.Tests/Tests.cs index 66f6febdc..a40317812 100644 --- a/tests/Digdir.Library.Dialogporten.WebApiClient.Integration.Tests/Tests.cs +++ b/tests/Digdir.Library.Dialogporten.WebApiClient.Integration.Tests/Tests.cs @@ -111,9 +111,6 @@ public async Task UpdateTest() [Fact] public async Task SearchTest() { - // Amund: DateTimeOffset blir sendt over i feil format. Virker som den blir sendt som string og parset fra string igjen. - // Usikker på hvordan jeg skal sende i annet format? - // Det er nok en implisitt toString som skjer. hvordan skal jeg da gi den format stringen? /* * Amund Q:. * [x] Refit støtter date format. @@ -141,19 +138,39 @@ public async Task SearchTest() Assert.True(createResponse.IsSuccessStatusCode); Assert.NotNull(createResponse.Content); Assert.True(Guid.TryParse(createResponse.Content!.Replace("\"", "").Trim(), out var dialogId)); - + _dialogIds.Add(dialogId); var param = new V1ServiceOwnerDialogsSearchSearchDialogQueryParams { CreatedAfter = dateOffset }; var searchResponse = await fixture.DialogportenClient.V1ServiceOwnerDialogsSearchSearchDialog(param, CancellationToken.None); - await fixture.DialogportenClient.V1ServiceOwnerDialogsPurgePurgeDialog(dialogId, null!, CancellationToken.None); Assert.True(searchResponse.IsSuccessStatusCode); Assert.NotNull(searchResponse.Content); Assert.Single(searchResponse.Content!.Items); } + [Fact] + public async Task DeleteTest() + { + var createDialogCommand = CreateCommand(); + var createResponse = await fixture.DialogportenClient.V1ServiceOwnerDialogsCreateDialog(createDialogCommand); + + Assert.True(createResponse.IsSuccessStatusCode); + Assert.NotNull(createResponse.Content); + Assert.True(Guid.TryParse(createResponse.Content!.Replace("\"", "").Trim(), out var dialogId)); + _dialogIds.Add(dialogId); + + var deleteResponse = await fixture.DialogportenClient.V1ServiceOwnerDialogsDeleteDialog(dialogId, null); + + Assert.True(deleteResponse.IsSuccessStatusCode); + + var getResponse = await fixture.DialogportenClient.V1ServiceOwnerDialogsGetGetDialog(dialogId, null!); + Assert.True(getResponse.IsSuccessStatusCode); + Assert.NotNull(getResponse.Content!.DeletedAt); + + } + public static V1ServiceOwnerDialogsCommandsUpdate_Dialog UpdateCommand() { var createDialogCommand = new V1ServiceOwnerDialogsCommandsUpdate_Dialog From 21c9e8793aac64c0a6947b6750e8629a6f2524bb Mon Sep 17 00:00:00 2001 From: Amund Myrbostad Date: Wed, 11 Dec 2024 15:25:04 +0100 Subject: [PATCH 52/62] Test refactor --- .../Tests.cs | 58 ++++++++++++------- 1 file changed, 36 insertions(+), 22 deletions(-) diff --git a/tests/Digdir.Library.Dialogporten.WebApiClient.Integration.Tests/Tests.cs b/tests/Digdir.Library.Dialogporten.WebApiClient.Integration.Tests/Tests.cs index a40317812..a7b9982da 100644 --- a/tests/Digdir.Library.Dialogporten.WebApiClient.Integration.Tests/Tests.cs +++ b/tests/Digdir.Library.Dialogporten.WebApiClient.Integration.Tests/Tests.cs @@ -33,28 +33,41 @@ public void Dispose() public class Tests(WebApiClientFixture fixture) : IClassFixture, IDisposable { private readonly List _dialogIds = []; + // Amund: Invalid Patch, Invalid Update, Search multiple dialog [Fact] - public async Task PurgeTest() + public async Task Create_Invalid_Dialog_Returns_400() { var createDialogCommand = CreateCommand(); + createDialogCommand.Progress = 200; var createResponse = await fixture.DialogportenClient.V1ServiceOwnerDialogsCreateDialog(createDialogCommand); - Assert.True(createResponse.IsSuccessStatusCode); + Assert.Equal(HttpStatusCode.BadRequest, createResponse.StatusCode); + } + [Fact] + public async Task Purge_Dialog_Returns_204() + { + + var createDialogCommand = CreateCommand(); + var createResponse = await fixture.DialogportenClient.V1ServiceOwnerDialogsCreateDialog(createDialogCommand); + + Assert.Equal(HttpStatusCode.Created, createResponse.StatusCode); Assert.NotNull(createResponse.Content); Assert.True(Guid.TryParse(createResponse.Content!.Replace("\"", "").Trim(), out var dialogId)); var purgeResponse = await fixture.DialogportenClient.V1ServiceOwnerDialogsPurgePurgeDialog(dialogId, null); - Assert.True(purgeResponse.IsSuccessStatusCode); + Assert.Equal(HttpStatusCode.NoContent, purgeResponse.StatusCode); + var getResponse = await fixture.DialogportenClient.V1ServiceOwnerDialogsGetGetDialog(dialogId, null!, CancellationToken.None); + Assert.Equal(HttpStatusCode.NotFound, getResponse.StatusCode); } [Fact] - public async Task PatchTest() + public async Task Patch_Dialog_Returns_204() { var createDialogCommand = CreateCommand(); var createResponse = await fixture.DialogportenClient.V1ServiceOwnerDialogsCreateDialog(createDialogCommand); - Assert.True(createResponse.IsSuccessStatusCode, createResponse.Error?.Content); + Assert.Equal(HttpStatusCode.Created, createResponse.StatusCode); Assert.NotNull(createResponse.Content); Assert.True(Guid.TryParse(createResponse.Content!.Replace("\"", "").Trim(), out var dialogId)); _dialogIds.Add(dialogId); @@ -70,46 +83,48 @@ public async Task PatchTest() } ]; var patchResponse = await fixture.DialogportenClient.V1ServiceOwnerDialogsPatchDialog(dialogId, patchDocument, null, CancellationToken.None); - Assert.True(patchResponse.IsSuccessStatusCode); + Assert.Equal(HttpStatusCode.NoContent, patchResponse.StatusCode); } [Fact] - public async Task GetTest() + public async Task Get_Dialog_Returns_200() { var createDialogCommand = CreateCommand(); var createResponse = await fixture.DialogportenClient.V1ServiceOwnerDialogsCreateDialog(createDialogCommand); - Assert.True(createResponse.IsSuccessStatusCode); + Assert.Equal(HttpStatusCode.Created, createResponse.StatusCode); Assert.NotNull(createResponse.Content); Assert.True(Guid.TryParse(createResponse.Content!.Replace("\"", "").Trim(), out var dialogId)); + var getResponse = await fixture.DialogportenClient.V1ServiceOwnerDialogsGetGetDialog(dialogId, null!, CancellationToken.None); + Assert.Equal(HttpStatusCode.OK, getResponse.StatusCode); Assert.Equal(getResponse.Content!.Progress!, createDialogCommand.Progress); - await fixture.DialogportenClient.V1ServiceOwnerDialogsPurgePurgeDialog(dialogId, null!); - + _dialogIds.Add(dialogId); } [Fact] - public async Task UpdateTest() + public async Task Update_Dialog_Returns_204() { var createDialogCommand = CreateCommand(); var createResponse = await fixture.DialogportenClient.V1ServiceOwnerDialogsCreateDialog(createDialogCommand); - Assert.True(createResponse.IsSuccessStatusCode); + Assert.Equal(HttpStatusCode.Created, createResponse.StatusCode); Assert.NotNull(createResponse.Content); Assert.True(Guid.TryParse(createResponse.Content!.Replace("\"", "").Trim(), out var dialogId)); _dialogIds.Add(dialogId); var updateDialogCommand = UpdateCommand(); var updateResponse = await fixture.DialogportenClient.V1ServiceOwnerDialogsUpdateDialog(dialogId, updateDialogCommand, null!, CancellationToken.None); - Assert.True(updateResponse.IsSuccessStatusCode, updateResponse.Error?.Content); + Assert.Equal(HttpStatusCode.NoContent, updateResponse.StatusCode); + var getResponse = await fixture.DialogportenClient.V1ServiceOwnerDialogsGetGetDialog(dialogId, null!); - Assert.True(getResponse.IsSuccessStatusCode); + Assert.Equal(HttpStatusCode.OK, getResponse.StatusCode); Assert.Equal(updateDialogCommand.Progress, getResponse.Content!.Progress); } [Fact] - public async Task SearchTest() + public async Task Search_Dialog_Returns_200() { /* * Amund Q:. @@ -135,7 +150,7 @@ public async Task SearchTest() var createResponse = await fixture.DialogportenClient.V1ServiceOwnerDialogsCreateDialog(createDialogCommand); - Assert.True(createResponse.IsSuccessStatusCode); + Assert.Equal(HttpStatusCode.Created, createResponse.StatusCode); Assert.NotNull(createResponse.Content); Assert.True(Guid.TryParse(createResponse.Content!.Replace("\"", "").Trim(), out var dialogId)); _dialogIds.Add(dialogId); @@ -144,29 +159,28 @@ public async Task SearchTest() CreatedAfter = dateOffset }; var searchResponse = await fixture.DialogportenClient.V1ServiceOwnerDialogsSearchSearchDialog(param, CancellationToken.None); - Assert.True(searchResponse.IsSuccessStatusCode); + Assert.Equal(HttpStatusCode.OK, searchResponse.StatusCode); Assert.NotNull(searchResponse.Content); Assert.Single(searchResponse.Content!.Items); } [Fact] - public async Task DeleteTest() + public async Task Delete_Dialog_Returns_204() { var createDialogCommand = CreateCommand(); var createResponse = await fixture.DialogportenClient.V1ServiceOwnerDialogsCreateDialog(createDialogCommand); - Assert.True(createResponse.IsSuccessStatusCode); + Assert.Equal(HttpStatusCode.Created, createResponse.StatusCode); Assert.NotNull(createResponse.Content); Assert.True(Guid.TryParse(createResponse.Content!.Replace("\"", "").Trim(), out var dialogId)); _dialogIds.Add(dialogId); var deleteResponse = await fixture.DialogportenClient.V1ServiceOwnerDialogsDeleteDialog(dialogId, null); - - Assert.True(deleteResponse.IsSuccessStatusCode); + Assert.Equal(HttpStatusCode.NoContent, deleteResponse.StatusCode); var getResponse = await fixture.DialogportenClient.V1ServiceOwnerDialogsGetGetDialog(dialogId, null!); - Assert.True(getResponse.IsSuccessStatusCode); + Assert.Equal(HttpStatusCode.OK, getResponse.StatusCode); Assert.NotNull(getResponse.Content!.DeletedAt); } From 46557749585bf150b74d626a773a4a7c4524c086 Mon Sep 17 00:00:00 2001 From: Amund Myrbostad Date: Thu, 12 Dec 2024 11:07:13 +0100 Subject: [PATCH 53/62] Search multiple test --- .../Tests.cs | 78 +++++++++---------- 1 file changed, 37 insertions(+), 41 deletions(-) diff --git a/tests/Digdir.Library.Dialogporten.WebApiClient.Integration.Tests/Tests.cs b/tests/Digdir.Library.Dialogporten.WebApiClient.Integration.Tests/Tests.cs index a7b9982da..e79a40e3f 100644 --- a/tests/Digdir.Library.Dialogporten.WebApiClient.Integration.Tests/Tests.cs +++ b/tests/Digdir.Library.Dialogporten.WebApiClient.Integration.Tests/Tests.cs @@ -33,43 +33,62 @@ public void Dispose() public class Tests(WebApiClientFixture fixture) : IClassFixture, IDisposable { private readonly List _dialogIds = []; - // Amund: Invalid Patch, Invalid Update, Search multiple dialog + // Amund: Invalid Patch, Invalid Update [Fact] public async Task Create_Invalid_Dialog_Returns_400() { - var createDialogCommand = CreateCommand(); createDialogCommand.Progress = 200; var createResponse = await fixture.DialogportenClient.V1ServiceOwnerDialogsCreateDialog(createDialogCommand); Assert.Equal(HttpStatusCode.BadRequest, createResponse.StatusCode); } + [Fact] - public async Task Purge_Dialog_Returns_204() + public async Task Search_Multiple_Dialogs() { + var dateOffset = DateTime.UtcNow; + var dialogsCreated = 5; + for (var i = 0; i < dialogsCreated; i++) + { + _dialogIds.Add(await CreateDialog()); + } + var param = new V1ServiceOwnerDialogsSearchSearchDialogQueryParams + { + CreatedAfter = dateOffset + }; + var searchResponse = await fixture.DialogportenClient.V1ServiceOwnerDialogsSearchSearchDialog(param, CancellationToken.None); + Assert.Equal(HttpStatusCode.OK, searchResponse.StatusCode); + Assert.NotNull(searchResponse.Content); + Assert.Equal(dialogsCreated, searchResponse.Content!.Items.Count); + } - var createDialogCommand = CreateCommand(); - var createResponse = await fixture.DialogportenClient.V1ServiceOwnerDialogsCreateDialog(createDialogCommand); - - Assert.Equal(HttpStatusCode.Created, createResponse.StatusCode); - Assert.NotNull(createResponse.Content); - Assert.True(Guid.TryParse(createResponse.Content!.Replace("\"", "").Trim(), out var dialogId)); + [Fact] + public async Task Purge_Dialog_Returns_204() + { + var dialogId = await CreateDialog(); var purgeResponse = await fixture.DialogportenClient.V1ServiceOwnerDialogsPurgePurgeDialog(dialogId, null); Assert.Equal(HttpStatusCode.NoContent, purgeResponse.StatusCode); var getResponse = await fixture.DialogportenClient.V1ServiceOwnerDialogsGetGetDialog(dialogId, null!, CancellationToken.None); Assert.Equal(HttpStatusCode.NotFound, getResponse.StatusCode); } - - [Fact] - public async Task Patch_Dialog_Returns_204() + private async Task CreateDialog() { + var createDialogCommand = CreateCommand(); var createResponse = await fixture.DialogportenClient.V1ServiceOwnerDialogsCreateDialog(createDialogCommand); Assert.Equal(HttpStatusCode.Created, createResponse.StatusCode); Assert.NotNull(createResponse.Content); Assert.True(Guid.TryParse(createResponse.Content!.Replace("\"", "").Trim(), out var dialogId)); + return dialogId; + } + + [Fact] + public async Task Patch_Dialog_Returns_204() + { + var dialogId = await CreateDialog(); _dialogIds.Add(dialogId); List patchDocument = @@ -89,30 +108,18 @@ public async Task Patch_Dialog_Returns_204() [Fact] public async Task Get_Dialog_Returns_200() { - var createDialogCommand = CreateCommand(); - var createResponse = await fixture.DialogportenClient.V1ServiceOwnerDialogsCreateDialog(createDialogCommand); - - Assert.Equal(HttpStatusCode.Created, createResponse.StatusCode); - Assert.NotNull(createResponse.Content); - Assert.True(Guid.TryParse(createResponse.Content!.Replace("\"", "").Trim(), out var dialogId)); + var dialogId = await CreateDialog(); var getResponse = await fixture.DialogportenClient.V1ServiceOwnerDialogsGetGetDialog(dialogId, null!, CancellationToken.None); Assert.Equal(HttpStatusCode.OK, getResponse.StatusCode); - Assert.Equal(getResponse.Content!.Progress!, createDialogCommand.Progress); _dialogIds.Add(dialogId); } [Fact] public async Task Update_Dialog_Returns_204() { - - var createDialogCommand = CreateCommand(); - var createResponse = await fixture.DialogportenClient.V1ServiceOwnerDialogsCreateDialog(createDialogCommand); - - Assert.Equal(HttpStatusCode.Created, createResponse.StatusCode); - Assert.NotNull(createResponse.Content); - Assert.True(Guid.TryParse(createResponse.Content!.Replace("\"", "").Trim(), out var dialogId)); + var dialogId = await CreateDialog(); _dialogIds.Add(dialogId); var updateDialogCommand = UpdateCommand(); @@ -146,13 +153,7 @@ public async Task Search_Dialog_Returns_200() * Funker også i postman med å skrive null */ var dateOffset = DateTimeOffset.UtcNow; - var createDialogCommand = CreateCommand(); - var createResponse = await fixture.DialogportenClient.V1ServiceOwnerDialogsCreateDialog(createDialogCommand); - - - Assert.Equal(HttpStatusCode.Created, createResponse.StatusCode); - Assert.NotNull(createResponse.Content); - Assert.True(Guid.TryParse(createResponse.Content!.Replace("\"", "").Trim(), out var dialogId)); + var dialogId = await CreateDialog(); _dialogIds.Add(dialogId); var param = new V1ServiceOwnerDialogsSearchSearchDialogQueryParams { @@ -168,12 +169,7 @@ public async Task Search_Dialog_Returns_200() [Fact] public async Task Delete_Dialog_Returns_204() { - var createDialogCommand = CreateCommand(); - var createResponse = await fixture.DialogportenClient.V1ServiceOwnerDialogsCreateDialog(createDialogCommand); - - Assert.Equal(HttpStatusCode.Created, createResponse.StatusCode); - Assert.NotNull(createResponse.Content); - Assert.True(Guid.TryParse(createResponse.Content!.Replace("\"", "").Trim(), out var dialogId)); + var dialogId = await CreateDialog(); _dialogIds.Add(dialogId); var deleteResponse = await fixture.DialogportenClient.V1ServiceOwnerDialogsDeleteDialog(dialogId, null); @@ -185,7 +181,7 @@ public async Task Delete_Dialog_Returns_204() } - public static V1ServiceOwnerDialogsCommandsUpdate_Dialog UpdateCommand() + private static V1ServiceOwnerDialogsCommandsUpdate_Dialog UpdateCommand() { var createDialogCommand = new V1ServiceOwnerDialogsCommandsUpdate_Dialog { @@ -299,7 +295,7 @@ public static V1ServiceOwnerDialogsCommandsUpdate_Dialog UpdateCommand() }; return createDialogCommand; } - public static V1ServiceOwnerDialogsCommandsCreate_DialogCommand CreateCommand() + private static V1ServiceOwnerDialogsCommandsCreate_DialogCommand CreateCommand() { var now = DateTimeOffset.UtcNow; var createDialogCommand = new V1ServiceOwnerDialogsCommandsCreate_DialogCommand From 40f54fe9762f554e1a3670c55bfb20c363917d47 Mon Sep 17 00:00:00 2001 From: Amund Myrbostad Date: Thu, 12 Dec 2024 12:35:21 +0100 Subject: [PATCH 54/62] Multiple dialog search, and Invalid Patch test --- .../Tests.cs | 56 +++++++++++++------ 1 file changed, 38 insertions(+), 18 deletions(-) diff --git a/tests/Digdir.Library.Dialogporten.WebApiClient.Integration.Tests/Tests.cs b/tests/Digdir.Library.Dialogporten.WebApiClient.Integration.Tests/Tests.cs index e79a40e3f..b7ba8790c 100644 --- a/tests/Digdir.Library.Dialogporten.WebApiClient.Integration.Tests/Tests.cs +++ b/tests/Digdir.Library.Dialogporten.WebApiClient.Integration.Tests/Tests.cs @@ -44,24 +44,6 @@ public async Task Create_Invalid_Dialog_Returns_400() Assert.Equal(HttpStatusCode.BadRequest, createResponse.StatusCode); } - [Fact] - public async Task Search_Multiple_Dialogs() - { - var dateOffset = DateTime.UtcNow; - var dialogsCreated = 5; - for (var i = 0; i < dialogsCreated; i++) - { - _dialogIds.Add(await CreateDialog()); - } - var param = new V1ServiceOwnerDialogsSearchSearchDialogQueryParams - { - CreatedAfter = dateOffset - }; - var searchResponse = await fixture.DialogportenClient.V1ServiceOwnerDialogsSearchSearchDialog(param, CancellationToken.None); - Assert.Equal(HttpStatusCode.OK, searchResponse.StatusCode); - Assert.NotNull(searchResponse.Content); - Assert.Equal(dialogsCreated, searchResponse.Content!.Items.Count); - } [Fact] public async Task Purge_Dialog_Returns_204() @@ -85,6 +67,25 @@ private async Task CreateDialog() return dialogId; } + [Fact] + public async Task Patch_Invalid_Dialog_Returns_400() + { + var dialogId = await CreateDialog(); + _dialogIds.Add(dialogId); + + List patchDocument = + [ + new() + { + Op = "replace", + OperationType = JsonPatchOperations_OperationType.Replace, + Path = "/progress", + Value = 500 + } + ]; + var patchResponse = await fixture.DialogportenClient.V1ServiceOwnerDialogsPatchDialog(dialogId, patchDocument, null, CancellationToken.None); + Assert.Equal(HttpStatusCode.BadRequest, patchResponse.StatusCode); + } [Fact] public async Task Patch_Dialog_Returns_204() { @@ -166,6 +167,25 @@ public async Task Search_Dialog_Returns_200() } + [Fact] + public async Task Search_Multiple_Dialogs() + { + var dateOffset = DateTime.UtcNow; + var dialogsCreated = 5; + for (var i = 0; i < dialogsCreated; i++) + { + _dialogIds.Add(await CreateDialog()); + } + var param = new V1ServiceOwnerDialogsSearchSearchDialogQueryParams + { + CreatedAfter = dateOffset + }; + var searchResponse = await fixture.DialogportenClient.V1ServiceOwnerDialogsSearchSearchDialog(param, CancellationToken.None); + Assert.Equal(HttpStatusCode.OK, searchResponse.StatusCode); + Assert.NotNull(searchResponse.Content); + Assert.Equal(dialogsCreated, searchResponse.Content!.Items.Count); + } + [Fact] public async Task Delete_Dialog_Returns_204() { From 0c663ee38790eae5ff2fbc6b0c002491bd435062 Mon Sep 17 00:00:00 2001 From: Amund Myrbostad Date: Thu, 12 Dec 2024 12:42:39 +0100 Subject: [PATCH 55/62] Invalid Update test --- .../Tests.cs | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/tests/Digdir.Library.Dialogporten.WebApiClient.Integration.Tests/Tests.cs b/tests/Digdir.Library.Dialogporten.WebApiClient.Integration.Tests/Tests.cs index b7ba8790c..942cc5a63 100644 --- a/tests/Digdir.Library.Dialogporten.WebApiClient.Integration.Tests/Tests.cs +++ b/tests/Digdir.Library.Dialogporten.WebApiClient.Integration.Tests/Tests.cs @@ -33,7 +33,6 @@ public void Dispose() public class Tests(WebApiClientFixture fixture) : IClassFixture, IDisposable { private readonly List _dialogIds = []; - // Amund: Invalid Patch, Invalid Update [Fact] public async Task Create_Invalid_Dialog_Returns_400() { @@ -116,7 +115,17 @@ public async Task Get_Dialog_Returns_200() Assert.Equal(HttpStatusCode.OK, getResponse.StatusCode); _dialogIds.Add(dialogId); } + [Fact] + public async Task Update_Invalid_Dialog_Returns_400() + { + var dialogId = await CreateDialog(); + _dialogIds.Add(dialogId); + var updateDialogCommand = UpdateCommand(); + updateDialogCommand.Progress = 200; + var updateResponse = await fixture.DialogportenClient.V1ServiceOwnerDialogsUpdateDialog(dialogId, updateDialogCommand, null!, CancellationToken.None); + Assert.Equal(HttpStatusCode.BadRequest, updateResponse.StatusCode); + } [Fact] public async Task Update_Dialog_Returns_204() { From a08e486c0f19dd5fa6389f120f015fe9aae07a6f Mon Sep 17 00:00:00 2001 From: Amund Myrbostad Date: Fri, 13 Dec 2024 10:45:14 +0100 Subject: [PATCH 56/62] Updated tests --- ...r.Library.Dialogporten.WebApiClient.csproj | 2 +- .../Features/V1/RefitterInterface.verified.cs | 14 ++- .../Tests.cs | 89 ++++++++++++++++--- 3 files changed, 89 insertions(+), 16 deletions(-) diff --git a/src/Digdir.Library.Dialogporten.WebApiClient/Digdir.Library.Dialogporten.WebApiClient.csproj b/src/Digdir.Library.Dialogporten.WebApiClient/Digdir.Library.Dialogporten.WebApiClient.csproj index 1a1db0fd2..6f81c1852 100644 --- a/src/Digdir.Library.Dialogporten.WebApiClient/Digdir.Library.Dialogporten.WebApiClient.csproj +++ b/src/Digdir.Library.Dialogporten.WebApiClient/Digdir.Library.Dialogporten.WebApiClient.csproj @@ -26,7 +26,7 @@ + - diff --git a/src/Digdir.Library.Dialogporten.WebApiClient/Features/V1/RefitterInterface.verified.cs b/src/Digdir.Library.Dialogporten.WebApiClient/Features/V1/RefitterInterface.verified.cs index 2e9ce2151..b74070a38 100644 --- a/src/Digdir.Library.Dialogporten.WebApiClient/Features/V1/RefitterInterface.verified.cs +++ b/src/Digdir.Library.Dialogporten.WebApiClient/Features/V1/RefitterInterface.verified.cs @@ -213,6 +213,10 @@ public partial interface IServiceownerApi /// The UUID of the created the dialog aggregate. A relative URL to the newly created activity is set in the \"Location\" header. /// /// + /// 204 + /// No Content + /// + /// /// 400 /// Validation error occured. See problem details for a list of errors. /// @@ -531,6 +535,10 @@ public partial interface IServiceownerApi /// The UUID of the created the dialog activity. A relative URL to the newly created activity is set in the \"Location\" header. /// /// + /// 204 + /// No Content + /// + /// /// 400 /// Validation error occured. See problem details for a list of errors. /// @@ -702,7 +710,7 @@ public partial interface IServiceownerApi /// [Headers("Accept: application/json, application/problem+json")] [Get("/api/v1/serviceowner/dialogs/{dialogId}/transmissions")] - Task> V1ServiceOwnerDialogTransmissionsSearchSearchDialogTransmission(System.Guid dialogId, CancellationToken cancellationToken = default); + Task>> V1ServiceOwnerDialogTransmissionsSearchSearchDialogTransmission(System.Guid dialogId, CancellationToken cancellationToken = default); /// Adds a transmission to a dialog /// @@ -722,6 +730,10 @@ public partial interface IServiceownerApi /// The UUID of the created the dialog transmission. A relative URL to the newly created activity is set in the \"Location\" header. /// /// + /// 204 + /// No Content + /// + /// /// 400 /// Validation error occured. See problem details for a list of errors. /// diff --git a/tests/Digdir.Library.Dialogporten.WebApiClient.Integration.Tests/Tests.cs b/tests/Digdir.Library.Dialogporten.WebApiClient.Integration.Tests/Tests.cs index 942cc5a63..3b831fed9 100644 --- a/tests/Digdir.Library.Dialogporten.WebApiClient.Integration.Tests/Tests.cs +++ b/tests/Digdir.Library.Dialogporten.WebApiClient.Integration.Tests/Tests.cs @@ -47,17 +47,17 @@ public async Task Create_Invalid_Dialog_Returns_400() [Fact] public async Task Purge_Dialog_Returns_204() { - var dialogId = await CreateDialog(); + var createDialogCommand = CreateCommand(); + var dialogId = await CreateDialog(createDialogCommand); var purgeResponse = await fixture.DialogportenClient.V1ServiceOwnerDialogsPurgePurgeDialog(dialogId, null); Assert.Equal(HttpStatusCode.NoContent, purgeResponse.StatusCode); var getResponse = await fixture.DialogportenClient.V1ServiceOwnerDialogsGetGetDialog(dialogId, null!, CancellationToken.None); Assert.Equal(HttpStatusCode.NotFound, getResponse.StatusCode); } - private async Task CreateDialog() + private async Task CreateDialog(V1ServiceOwnerDialogsCommandsCreate_DialogCommand createDialogCommand) { - var createDialogCommand = CreateCommand(); var createResponse = await fixture.DialogportenClient.V1ServiceOwnerDialogsCreateDialog(createDialogCommand); Assert.Equal(HttpStatusCode.Created, createResponse.StatusCode); @@ -69,7 +69,8 @@ private async Task CreateDialog() [Fact] public async Task Patch_Invalid_Dialog_Returns_400() { - var dialogId = await CreateDialog(); + var createDialogCommand = CreateCommand(); + var dialogId = await CreateDialog(createDialogCommand); _dialogIds.Add(dialogId); List patchDocument = @@ -88,7 +89,8 @@ public async Task Patch_Invalid_Dialog_Returns_400() [Fact] public async Task Patch_Dialog_Returns_204() { - var dialogId = await CreateDialog(); + var createDialogCommand = CreateCommand(); + var dialogId = await CreateDialog(createDialogCommand); _dialogIds.Add(dialogId); List patchDocument = @@ -103,12 +105,18 @@ public async Task Patch_Dialog_Returns_204() ]; var patchResponse = await fixture.DialogportenClient.V1ServiceOwnerDialogsPatchDialog(dialogId, patchDocument, null, CancellationToken.None); Assert.Equal(HttpStatusCode.NoContent, patchResponse.StatusCode); + + var getResponse = await fixture.DialogportenClient.V1ServiceOwnerDialogsGetGetDialog(dialogId, null!, CancellationToken.None); + + Assert.Equal(HttpStatusCode.OK, getResponse.StatusCode); + Assert.Equal(50, getResponse.Content!.Progress); } [Fact] public async Task Get_Dialog_Returns_200() { - var dialogId = await CreateDialog(); + var createDialogCommand = CreateCommand(); + var dialogId = await CreateDialog(createDialogCommand); var getResponse = await fixture.DialogportenClient.V1ServiceOwnerDialogsGetGetDialog(dialogId, null!, CancellationToken.None); @@ -118,7 +126,8 @@ public async Task Get_Dialog_Returns_200() [Fact] public async Task Update_Invalid_Dialog_Returns_400() { - var dialogId = await CreateDialog(); + var createDialogCommand = CreateCommand(); + var dialogId = await CreateDialog(createDialogCommand); _dialogIds.Add(dialogId); var updateDialogCommand = UpdateCommand(); @@ -129,7 +138,8 @@ public async Task Update_Invalid_Dialog_Returns_400() [Fact] public async Task Update_Dialog_Returns_204() { - var dialogId = await CreateDialog(); + var createDialogCommand = CreateCommand(); + var dialogId = await CreateDialog(createDialogCommand); _dialogIds.Add(dialogId); var updateDialogCommand = UpdateCommand(); @@ -163,7 +173,8 @@ public async Task Search_Dialog_Returns_200() * Funker også i postman med å skrive null */ var dateOffset = DateTimeOffset.UtcNow; - var dialogId = await CreateDialog(); + var createDialogCommand = CreateCommand(); + var dialogId = await CreateDialog(createDialogCommand); _dialogIds.Add(dialogId); var param = new V1ServiceOwnerDialogsSearchSearchDialogQueryParams { @@ -183,7 +194,9 @@ public async Task Search_Multiple_Dialogs() var dialogsCreated = 5; for (var i = 0; i < dialogsCreated; i++) { - _dialogIds.Add(await CreateDialog()); + var createDialogCommand = CreateCommand(); + var dialogId = await CreateDialog(createDialogCommand); + _dialogIds.Add(dialogId); } var param = new V1ServiceOwnerDialogsSearchSearchDialogQueryParams { @@ -198,7 +211,8 @@ public async Task Search_Multiple_Dialogs() [Fact] public async Task Delete_Dialog_Returns_204() { - var dialogId = await CreateDialog(); + var createDialogCommand = CreateCommand(); + var dialogId = await CreateDialog(createDialogCommand); _dialogIds.Add(dialogId); var deleteResponse = await fixture.DialogportenClient.V1ServiceOwnerDialogsDeleteDialog(dialogId, null); @@ -210,20 +224,69 @@ public async Task Delete_Dialog_Returns_204() } + [Fact] + public async Task Create_Dialog_Transmission_returns_201() + { + + var createDialogCommand = CreateCommand(); + createDialogCommand.Transmissions = []; + var dialogId = await CreateDialog(createDialogCommand); + _dialogIds.Add(dialogId); + var createTransmission = new V1ServiceOwnerDialogTransmissionsCreate_TransmissionRequest + { + Attachments = [], + Content = new V1ServiceOwnerDialogsCommandsUpdate_TransmissionContent + { + Summary = new V1CommonContent_ContentValue + { + MediaType = "text/plain", + Value = + [ + new V1CommonLocalizations_Localization + { + LanguageCode = "nb", + Value = "Sammendrag" + } + ] + }, + Title = new V1CommonContent_ContentValue + { + MediaType = "text/plain", + Value = + [ + new V1CommonLocalizations_Localization + { + LanguageCode = "nb", + Value = "Dette er en tittel" + } + ] + } + }, + Sender = new V1ServiceOwnerCommonActors_Actor + { + ActorType = Actors_ActorType.ServiceOwner + }, + Type = DialogsEntitiesTransmissions_DialogTransmissionType.Information + }; + var transmissionResponse = await fixture.DialogportenClient.V1ServiceOwnerDialogTransmissionsCreateDialogTransmission(dialogId, createTransmission, null!); + Assert.Equal(HttpStatusCode.Created, transmissionResponse.StatusCode); + + } private static V1ServiceOwnerDialogsCommandsUpdate_Dialog UpdateCommand() { var createDialogCommand = new V1ServiceOwnerDialogsCommandsUpdate_Dialog { Status = DialogsEntities_DialogStatus.New, Progress = 60, - SearchTags = [], Attachments = [], GuiActions = [], ApiActions = [], + SearchTags = [], Content = new V1ServiceOwnerDialogsCommandsUpdate_Content { Title = new V1CommonContent_ContentValue { + MediaType = "text/plain", Value = [ new V1CommonLocalizations_Localization @@ -237,7 +300,6 @@ private static V1ServiceOwnerDialogsCommandsUpdate_Dialog UpdateCommand() Value = "Main" } ], - MediaType = "text/plain" }, Summary = new V1CommonContent_ContentValue { @@ -320,7 +382,6 @@ private static V1ServiceOwnerDialogsCommandsUpdate_Dialog UpdateCommand() Type = DialogsEntitiesTransmissions_DialogTransmissionType.Information } ], - VisibleFrom = null }; return createDialogCommand; } From e71db250d4757fbc0def034c1de6c08a7964fc72 Mon Sep 17 00:00:00 2001 From: Amund Myrbostad Date: Fri, 13 Dec 2024 10:51:40 +0100 Subject: [PATCH 57/62] Cleanup --- .github/workflows/ci-cd-pull-request.yml | 11 ----- .github/workflows/workflow-publish-nuget.yml | 2 +- .../Program.cs | 34 +++++++++---- .../CHANGELOG.md | 1 - ...r.Library.Dialogporten.WebApiClient.csproj | 1 - .../Features/V1/DialogportenClient.cs | 30 ------------ .../Interfaces/IDialogportenClient.cs | 48 ------------------- .../README.md | 6 --- .../Services/DialogTokenVerifier.cs | 2 +- ...rten.WebApiClient.Integration.Tests.csproj | 1 + .../Tests.cs | 4 -- 11 files changed, 29 insertions(+), 111 deletions(-) delete mode 100644 src/Digdir.Library.Dialogporten.WebApiClient/CHANGELOG.md delete mode 100644 src/Digdir.Library.Dialogporten.WebApiClient/Features/V1/DialogportenClient.cs delete mode 100644 src/Digdir.Library.Dialogporten.WebApiClient/Interfaces/IDialogportenClient.cs diff --git a/.github/workflows/ci-cd-pull-request.yml b/.github/workflows/ci-cd-pull-request.yml index 8007ffcd9..be4356c0f 100644 --- a/.github/workflows/ci-cd-pull-request.yml +++ b/.github/workflows/ci-cd-pull-request.yml @@ -35,17 +35,6 @@ jobs: with: environment: "test" -# # TESTING AV NUGET SKAL IKKE SKJØRES I PULL REQUEST -# publish-sdk-to-nuget: -# uses: ./.github/workflows/workflow-publish-nuget.yml -# needs: [ get-current-version, generate-git-short-sha, check-for-changes ] -# if: ${{ needs.check-for-changes.outputs.hasBackendChanges == 'true' || needs.check-for-changes.outputs.hasTestChanges == 'true' }} -# with: -# version: ${{ needs.get-current-version.outputs.version }}-rc.${{ needs.generate-git-short-sha.outputs.gitShortSha }} -# path: $(find . -name '*Digdir.Library.Dialogporten.WebApiClient.csproj' -printf "%p" -quit) -# secrets: -# NUGET_API_KEY: ${{ secrets.NUGET_API_TEST_KEY }} - dry-run-deploy-infra: name: Dry run deploy infrastructure uses: ./.github/workflows/workflow-deploy-infra.yml diff --git a/.github/workflows/workflow-publish-nuget.yml b/.github/workflows/workflow-publish-nuget.yml index 07be3b398..e941fc04b 100644 --- a/.github/workflows/workflow-publish-nuget.yml +++ b/.github/workflows/workflow-publish-nuget.yml @@ -12,7 +12,7 @@ on: required: true type: string source: - description: "Source to push to" + description: "Nuget Source" required: false type: string default: https://int.nugettest.org diff --git a/src/Digdir.Library.Dialogporten.WebApiClient.Sample/Program.cs b/src/Digdir.Library.Dialogporten.WebApiClient.Sample/Program.cs index c714db4ef..2c72d1b1f 100644 --- a/src/Digdir.Library.Dialogporten.WebApiClient.Sample/Program.cs +++ b/src/Digdir.Library.Dialogporten.WebApiClient.Sample/Program.cs @@ -5,6 +5,8 @@ using Digdir.Library.Dialogporten.WebApiClient.Services; using Microsoft.Extensions.Configuration; using Microsoft.Extensions.DependencyInjection; + +// Setup var configuration = new ConfigurationBuilder() .AddJsonFile("appsettings.local.json", optional: false, reloadOnChange: true) .Build(); @@ -24,13 +26,17 @@ var dialogs = new Dialogs(dialogportenClient); var verifier = serviceProvider.GetRequiredService(); -// Amund: Test token + +// Usage +// Test token var token = "eyJhbGciOiJFZERTQSIsInR5cCI6IkpXVCIsImtpZCI6ImRldi1wcmltYXJ5LXNpZ25pbmcta2V5In0.eyJqdGkiOiIzNGZhMGViNS0xZGVmLTQxMDYtYWY4YS0xMjljYjNiNTliNDYiLCJjIjoidXJuOmFsdGlubjpwZXJzb246aWRlbnRpZmllci1ubzowODg5NTY5OTY4NCIsImwiOjMsInAiOiJ1cm46YWx0aW5uOnBlcnNvbjppZGVudGlmaWVyLW5vOjA4ODk1Njk5Njg0IiwicyI6InVybjphbHRpbm46cmVzb3VyY2U6c3VwZXItc2ltcGxlLXNlcnZpY2UiLCJpIjoiMDE5MzI1MzgtMzEzZC03NGI1LTg1ZWMtMWI5MGIxMjYzNWRjIiwiYSI6InJlYWQiLCJpc3MiOiJodHRwczovL2xvY2FsaG9zdDo3MjE0L2FwaS92MSIsImlhdCI6MTczMTU3ODk5OCwibmJmIjoxNzMxNTc4OTk4LCJleHAiOjE3MzE1Nzk1OTh9.fL-rpDsXqwOSVk5zMizLZRaFugaz2VfVNf0CjOxIhSdwrkAhh1UfRu5RcD2OK4ddnRrCuz8iKKJyadkek9UGAg"; Console.WriteLine(verifier.Verify(token)); var dict = DialogTokenVerifier.GetDialogTokenClaims(token); Console.WriteLine(dict); Console.WriteLine(dict[DialogTokenClaimTypes.Actions]); + + Console.WriteLine("== Start Create Dialog =="); // Create dialog SO var createDialogCommand = CreateCommand(); @@ -41,16 +47,18 @@ Console.WriteLine(response.Content); } Console.WriteLine("== End Create Dialog =="); + + // Get single dialog SO Console.WriteLine("==Start Get Single Dialog=="); Debug.Assert(response.Content != null, "response.Content != null"); var guid = Guid.Parse(response.Content.Replace("\"", "").Trim()); -// var guid = Guid.Parse("0192b307-f5a5-7450-bee2-04a3515337ff"); var dialog = dialogportenClient.V1ServiceOwnerDialogsGetGetDialog(guid, null!).Result.Content; Debug.Assert(dialog != null, nameof(dialog) + " != null"); Dialogs.PrintGetDialog(dialog); Console.WriteLine("==End Get Single Dialog=="); + Console.WriteLine("==Start Search Dialogs=="); var param = new V1ServiceOwnerDialogsSearchSearchDialogQueryParams() { @@ -62,6 +70,7 @@ Console.WriteLine(result.Content.Items.First().Org); Console.WriteLine("==End Search Dialogs=="); + Console.WriteLine("== Start Patch Dialog =="); List patchDocument = [ @@ -78,17 +87,21 @@ Console.WriteLine(patchResponse.StatusCode); Console.WriteLine("== End Patch Dialog =="); + Console.WriteLine("== Start update Dialog =="); var updateCommand = UpdateCommand(); var updateResponse = await dialogportenClient.V1ServiceOwnerDialogsUpdateDialog(guid, updateCommand, null, CancellationToken.None); Console.WriteLine(updateResponse.StatusCode); Console.WriteLine(updateResponse.Error?.Content); Console.WriteLine("== End Update Dialog =="); + + Console.WriteLine("== Start Delete Dialog =="); var deleteResponse = await dialogportenClient.V1ServiceOwnerDialogsDeleteDialog(guid, null); Console.WriteLine(deleteResponse.IsSuccessStatusCode); Console.WriteLine("== End Delete Dialog =="); + Console.WriteLine("==Start Get Single Dialog=="); // var guid = Guid.Parse("0192b307-f5a5-7450-bee2-04a3515337ff"); dialog = dialogportenClient.V1ServiceOwnerDialogsGetGetDialog(guid, null!).Result.Content; @@ -100,6 +113,8 @@ result = await dialogportenClient.V1ServiceOwnerDialogsSearchSearchDialog(param); Debug.Assert(result.Content != null, nameof(result) + " != null"); Console.WriteLine(result.Content!.Items.Count); + + Console.WriteLine("== Start Purge Dialog == "); var purgeResponse = await dialogs.Purge(guid, dialog.Revision); @@ -114,9 +129,8 @@ static V1ServiceOwnerDialogsCommandsCreate_DialogCommand CreateCommand() { - var createDialogCommand = new V1ServiceOwnerDialogsCommandsCreate_DialogCommand + return new V1ServiceOwnerDialogsCommandsCreate_DialogCommand { - // createDialogCommand.Id = Guid.Parse("01927a6d-40d8-728b-b3da-845b680840d9"); ServiceResource = "urn:altinn:resource:super-simple-service", Party = "urn:altinn:person:identifier-no:14886498226", SystemLabel = DialogEndUserContextsEntities_SystemLabel.Default, @@ -223,13 +237,16 @@ static V1ServiceOwnerDialogsCommandsCreate_DialogCommand CreateCommand() } ] }; - return createDialogCommand; } static V1ServiceOwnerDialogsCommandsUpdate_Dialog UpdateCommand() { - var createDialogCommand = new V1ServiceOwnerDialogsCommandsUpdate_Dialog + return new V1ServiceOwnerDialogsCommandsUpdate_Dialog { + Activities = [], + ApiActions = [], + Attachments = [], + SearchTags = [], Status = DialogsEntities_DialogStatus.New, Progress = 60, Content = new V1ServiceOwnerDialogsCommandsUpdate_Content @@ -271,6 +288,7 @@ static V1ServiceOwnerDialogsCommandsUpdate_Dialog UpdateCommand() }, + GuiActions = [], Transmissions = [ new V1ServiceOwnerDialogsCommandsUpdate_Transmission @@ -331,7 +349,7 @@ static V1ServiceOwnerDialogsCommandsUpdate_Dialog UpdateCommand() }, Type = DialogsEntitiesTransmissions_DialogTransmissionType.Information } - ] + ], + VisibleFrom = null }; - return createDialogCommand; } diff --git a/src/Digdir.Library.Dialogporten.WebApiClient/CHANGELOG.md b/src/Digdir.Library.Dialogporten.WebApiClient/CHANGELOG.md deleted file mode 100644 index 4c04c3be3..000000000 --- a/src/Digdir.Library.Dialogporten.WebApiClient/CHANGELOG.md +++ /dev/null @@ -1 +0,0 @@ -hei dette er en test! diff --git a/src/Digdir.Library.Dialogporten.WebApiClient/Digdir.Library.Dialogporten.WebApiClient.csproj b/src/Digdir.Library.Dialogporten.WebApiClient/Digdir.Library.Dialogporten.WebApiClient.csproj index 6f81c1852..75b302c68 100644 --- a/src/Digdir.Library.Dialogporten.WebApiClient/Digdir.Library.Dialogporten.WebApiClient.csproj +++ b/src/Digdir.Library.Dialogporten.WebApiClient/Digdir.Library.Dialogporten.WebApiClient.csproj @@ -10,7 +10,6 @@ digdir;altinn;dialogporten git https://github.com/digdir/dialogporten - 1.3 diff --git a/src/Digdir.Library.Dialogporten.WebApiClient/Features/V1/DialogportenClient.cs b/src/Digdir.Library.Dialogporten.WebApiClient/Features/V1/DialogportenClient.cs deleted file mode 100644 index 7cbfbda2b..000000000 --- a/src/Digdir.Library.Dialogporten.WebApiClient/Features/V1/DialogportenClient.cs +++ /dev/null @@ -1,30 +0,0 @@ -// using Altinn.Apiclient.Serviceowner.Interfaces; -// using Digdir.Library.Dialogporten.WebApiClient.Interfaces; -// using Refit; -// -// namespace Digdir.Library.Dialogporten.WebApiClient.Features.V1; -// -// public sealed class DialogportenClient(IDialogportenApi dialogportenApi) : IDialogportenClient -// { -// public Task> GetDialogList( -// V1ServiceOwnerDialogsSearchSearchDialogQueryParams? param = null, CancellationToken cancellationToken = default) => -// dialogportenApi.V1ServiceOwnerDialogsSearchSearchDialog(param!, cancellationToken); -// -// public Task> GetDialog(Guid dialogId, string? endUserId = null, CancellationToken cancellationToken = default) => -// dialogportenApi.V1ServiceOwnerDialogsGetGetDialog(dialogId, endUserId!, cancellationToken); -// -// public Task> CreateDialog(V1ServiceOwnerDialogsCommandsCreate_DialogCommand createDialogCommand, CancellationToken cancellationToken = default) => -// dialogportenApi.V1ServiceOwnerDialogsCreateDialog(createDialogCommand, cancellationToken); -// -// public Task DeleteDialog(Guid dialogId, Guid? ifMatch = null, CancellationToken cancellationToken = default) => -// dialogportenApi.V1ServiceOwnerDialogsDeleteDialog(dialogId, ifMatch, cancellationToken); -// -// public Task PurgeDialog(Guid dialogId, Guid? ifMatch = null, CancellationToken cancellationToken = default) => -// dialogportenApi.V1ServiceOwnerDialogsPurgePurgeDialog(dialogId, ifMatch, cancellationToken); -// -// public Task PatchDialog(Guid dialogId, IEnumerable PatchDocument, Guid? ifMatch = null, CancellationToken cancellationToken = default) => -// dialogportenApi.V1ServiceOwnerDialogsPatchDialog(dialogId, PatchDocument, ifMatch, cancellationToken); -// -// public Task UpdateDialog(Guid dialogId, V1ServiceOwnerDialogsCommandsUpdate_Dialog updateCommand, Guid? ifMatch, CancellationToken cancellationToken = default) => -// dialogportenApi.V1ServiceOwnerDialogsUpdateDialog(dialogId, updateCommand, ifMatch, cancellationToken); -// } diff --git a/src/Digdir.Library.Dialogporten.WebApiClient/Interfaces/IDialogportenClient.cs b/src/Digdir.Library.Dialogporten.WebApiClient/Interfaces/IDialogportenClient.cs deleted file mode 100644 index ae355fb40..000000000 --- a/src/Digdir.Library.Dialogporten.WebApiClient/Interfaces/IDialogportenClient.cs +++ /dev/null @@ -1,48 +0,0 @@ -// using Altinn.Apiclient.Serviceowner.Interfaces; -// using Refit; -// -// namespace Digdir.Library.Dialogporten.WebApiClient.Interfaces; -// -// public interface IDialogportenClient -// { -// // Amund: Dette er et "lag" over refitter, har fjernes kindof versjon fra metodekallet og blir styrt av parameter. -// // Men om den er bare der for å rydde i metodenavn så er den unødvendig siden vi ikke rydder i typenavn? -// // Hvorfor ikke bare brukte refit direkte? Da er denne "SDKen" ekstremt liten. og egt bare en extension til ServiceCollection. -// // Det blir da ikke mye vedlikehold i forhold til at den har men funksjonalitet og abstraksjon -// // men er det da vits å ha refit her? og heller bare lage en dialogporten extension? -// // Amund: føler at jeg mister hvorfor denne skal lages, og hvilket behov den egt skal dekke. Im losing the plot. -// Task> GetDialogList( -// V1ServiceOwnerDialogsSearchSearchDialogQueryParams? param = null, -// CancellationToken cancellationToken = default); -// -// Task> GetDialog( -// Guid dialogId, -// string? endUserId = null, -// CancellationToken cancellationToken = default); -// -// Task> CreateDialog( -// V1ServiceOwnerDialogsCommandsCreate_DialogCommand createDialogCommand, -// CancellationToken cancellationToken = default); -// -// Task DeleteDialog( -// Guid dialogId, -// Guid? ifMatch, -// CancellationToken cancellationToken = default); -// -// Task PurgeDialog( -// Guid dialogId, -// Guid? ifMatch, -// CancellationToken cancellationToken = default); -// -// Task PatchDialog( -// Guid dialogId, -// IEnumerable PatchDocument, -// Guid? ifMatch, -// CancellationToken cancellationToken = default); -// -// Task UpdateDialog( -// Guid dialogId, -// V1ServiceOwnerDialogsCommandsUpdate_Dialog updateCommand, -// Guid? ifMatch, -// CancellationToken cancellationToken = default); -// } diff --git a/src/Digdir.Library.Dialogporten.WebApiClient/README.md b/src/Digdir.Library.Dialogporten.WebApiClient/README.md index 1683e4142..33ab21fa0 100644 --- a/src/Digdir.Library.Dialogporten.WebApiClient/README.md +++ b/src/Digdir.Library.Dialogporten.WebApiClient/README.md @@ -203,9 +203,3 @@ var token = ""; // Dialog token Console.WriteLine(verifier.Verify(token)); var dict = DialogTokenVerifier.GetDialogTokenClaims(token); ``` - -API REFERENCE/STRUCTURE - -Method name matches with the operationId in the OpenAPI spec - -Links to changelog etc. diff --git a/src/Digdir.Library.Dialogporten.WebApiClient/Services/DialogTokenVerifier.cs b/src/Digdir.Library.Dialogporten.WebApiClient/Services/DialogTokenVerifier.cs index 39229f25f..4580444f7 100644 --- a/src/Digdir.Library.Dialogporten.WebApiClient/Services/DialogTokenVerifier.cs +++ b/src/Digdir.Library.Dialogporten.WebApiClient/Services/DialogTokenVerifier.cs @@ -38,8 +38,8 @@ public bool Verify(string token) var bodyJson = JsonSerializer.Deserialize(Base64Url.DecodeFromChars(parts[1])); + // Maps bodyJson -> DialogTokenClaimTypes var fieldsInfo = typeof(DialogTokenClaimTypes).GetFields().Where(f => f.FieldType == typeof(string)); - foreach (var fieldInfo in fieldsInfo) { var value = fieldInfo.GetValue("string"); diff --git a/tests/Digdir.Library.Dialogporten.WebApiClient.Integration.Tests/Digdir.Library.Dialogporten.WebApiClient.Integration.Tests.csproj b/tests/Digdir.Library.Dialogporten.WebApiClient.Integration.Tests/Digdir.Library.Dialogporten.WebApiClient.Integration.Tests.csproj index 2eb1e9915..2025a8d4c 100644 --- a/tests/Digdir.Library.Dialogporten.WebApiClient.Integration.Tests/Digdir.Library.Dialogporten.WebApiClient.Integration.Tests.csproj +++ b/tests/Digdir.Library.Dialogporten.WebApiClient.Integration.Tests/Digdir.Library.Dialogporten.WebApiClient.Integration.Tests.csproj @@ -14,6 +14,7 @@ + all runtime; build; native; contentfiles; analyzers; buildtransitive diff --git a/tests/Digdir.Library.Dialogporten.WebApiClient.Integration.Tests/Tests.cs b/tests/Digdir.Library.Dialogporten.WebApiClient.Integration.Tests/Tests.cs index 3b831fed9..c683bb4bd 100644 --- a/tests/Digdir.Library.Dialogporten.WebApiClient.Integration.Tests/Tests.cs +++ b/tests/Digdir.Library.Dialogporten.WebApiClient.Integration.Tests/Tests.cs @@ -168,10 +168,6 @@ public async Task Search_Dialog_Returns_200() * [ ] Vente på preview av refitter blir lansert */ - /* Amund: . - * 500 Error om jeg sender en null istedet for et tomt array. - * Funker også i postman med å skrive null - */ var dateOffset = DateTimeOffset.UtcNow; var createDialogCommand = CreateCommand(); var dialogId = await CreateDialog(createDialogCommand); From a82f91d981fdb516a3e879386b81b29b4a3b479b Mon Sep 17 00:00:00 2001 From: Amund Myrbostad Date: Fri, 13 Dec 2024 13:13:38 +0100 Subject: [PATCH 58/62] Updated tests --- .../Tests.cs | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/tests/Digdir.Library.Dialogporten.WebApiClient.Integration.Tests/Tests.cs b/tests/Digdir.Library.Dialogporten.WebApiClient.Integration.Tests/Tests.cs index c683bb4bd..e3ee65956 100644 --- a/tests/Digdir.Library.Dialogporten.WebApiClient.Integration.Tests/Tests.cs +++ b/tests/Digdir.Library.Dialogporten.WebApiClient.Integration.Tests/Tests.cs @@ -272,6 +272,7 @@ private static V1ServiceOwnerDialogsCommandsUpdate_Dialog UpdateCommand() { var createDialogCommand = new V1ServiceOwnerDialogsCommandsUpdate_Dialog { + Activities = [], Status = DialogsEntities_DialogStatus.New, Progress = 60, Attachments = [], @@ -378,6 +379,7 @@ private static V1ServiceOwnerDialogsCommandsUpdate_Dialog UpdateCommand() Type = DialogsEntitiesTransmissions_DialogTransmissionType.Information } ], + VisibleFrom = null, }; return createDialogCommand; } @@ -386,6 +388,7 @@ private static V1ServiceOwnerDialogsCommandsCreate_DialogCommand CreateCommand() var now = DateTimeOffset.UtcNow; var createDialogCommand = new V1ServiceOwnerDialogsCommandsCreate_DialogCommand { + GuiActions = [], Activities = [ new V1ServiceOwnerDialogsCommandsCreate_Activity @@ -424,6 +427,7 @@ private static V1ServiceOwnerDialogsCommandsCreate_DialogCommand CreateCommand() ] } ], + Attachments = [], // createDialogCommand.Id = Guid.Parse("01927a6d-40d8-728b-b3da-845b680840d9"); ServiceResource = "urn:altinn:resource:super-simple-service", Party = "urn:altinn:person:identifier-no:14886498226", @@ -473,8 +477,6 @@ private static V1ServiceOwnerDialogsCommandsCreate_DialogCommand CreateCommand() ], MediaType = "text/plain" } - - }, Transmissions = [ @@ -537,8 +539,6 @@ private static V1ServiceOwnerDialogsCommandsCreate_DialogCommand CreateCommand() Type = DialogsEntitiesTransmissions_DialogTransmissionType.Information } ], - UpdatedAt = default, - VisibleFrom = null }; return createDialogCommand; } From aba1aec294931f5caacb5982c500b856b277d17a Mon Sep 17 00:00:00 2001 From: Amund Myrbostad Date: Fri, 13 Dec 2024 13:21:28 +0100 Subject: [PATCH 59/62] Cleanup --- .../Tests.cs | 1 - 1 file changed, 1 deletion(-) diff --git a/tests/Digdir.Library.Dialogporten.WebApiClient.Integration.Tests/Tests.cs b/tests/Digdir.Library.Dialogporten.WebApiClient.Integration.Tests/Tests.cs index e3ee65956..38d5a6797 100644 --- a/tests/Digdir.Library.Dialogporten.WebApiClient.Integration.Tests/Tests.cs +++ b/tests/Digdir.Library.Dialogporten.WebApiClient.Integration.Tests/Tests.cs @@ -502,7 +502,6 @@ private static V1ServiceOwnerDialogsCommandsCreate_DialogCommand CreateCommand() Url = new Uri("https://digdir.apps.tt02.altinn.no/some-other-url") } ] - } ], Content = new V1ServiceOwnerDialogsCommandsCreate_TransmissionContent From 075854b9936d42ced2632ab00a4d34b3d0a848d8 Mon Sep 17 00:00:00 2001 From: Amund Myrbostad Date: Fri, 13 Dec 2024 13:35:54 +0100 Subject: [PATCH 60/62] Comments --- .../Tests.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tests/Digdir.Library.Dialogporten.WebApiClient.Integration.Tests/Tests.cs b/tests/Digdir.Library.Dialogporten.WebApiClient.Integration.Tests/Tests.cs index 38d5a6797..445cd0f0e 100644 --- a/tests/Digdir.Library.Dialogporten.WebApiClient.Integration.Tests/Tests.cs +++ b/tests/Digdir.Library.Dialogporten.WebApiClient.Integration.Tests/Tests.cs @@ -164,8 +164,8 @@ public async Task Search_Dialog_Returns_200() * [x] lag til date-time støtte i refitter * [x] Legge til støtte for custom date format i Refitter * [x] Virker doable, Relativt lett leslig kilde kode. - * [x] Lagde PR med forandringene, blitgt Merget inn - * [ ] Vente på preview av refitter blir lansert + * [x] Lagde PR med forandringene, blitt Merget inn + * [ ] Venter på preview av refitter blir lansert */ var dateOffset = DateTimeOffset.UtcNow; From b9523944ffeb5a7a9967798b526cdf7ca893e91a Mon Sep 17 00:00:00 2001 From: Amund Date: Fri, 13 Dec 2024 13:39:22 +0100 Subject: [PATCH 61/62] Update src/Digdir.Library.Dialogporten.WebApiClient/Config/MaskinportenSettings.cs MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: Ole Jørgen Skogstad --- .../Config/MaskinportenSettings.cs | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/src/Digdir.Library.Dialogporten.WebApiClient/Config/MaskinportenSettings.cs b/src/Digdir.Library.Dialogporten.WebApiClient/Config/MaskinportenSettings.cs index 95c524910..1fdc74983 100644 --- a/src/Digdir.Library.Dialogporten.WebApiClient/Config/MaskinportenSettings.cs +++ b/src/Digdir.Library.Dialogporten.WebApiClient/Config/MaskinportenSettings.cs @@ -1,5 +1,3 @@ namespace Digdir.Library.Dialogporten.WebApiClient.Config; -public sealed record MaskinportenSettings(string ClientId, string EncodedJwk, string Scope) -{ -} +public sealed record MaskinportenSettings(string ClientId, string EncodedJwk, string Scope); From 9fd4304f8dea3995574225a762b7a1111b0c3341 Mon Sep 17 00:00:00 2001 From: Amund Myrbostad Date: Fri, 13 Dec 2024 14:36:10 +0100 Subject: [PATCH 62/62] Clean up --- .github/workflows/ci-cd-staging.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci-cd-staging.yml b/.github/workflows/ci-cd-staging.yml index a224b2efb..a6816fc8a 100644 --- a/.github/workflows/ci-cd-staging.yml +++ b/.github/workflows/ci-cd-staging.yml @@ -101,7 +101,7 @@ jobs: version: ${{ needs.get-current-version.outputs.version }} path: $(find . -name '*Digdir.Library.Dialogporten.WebApiClient.csproj' -printf "%p" -quit) secrets: - NUGET_API_TEST_KEY: ${{ secrets.NUGET_API_TEST_KEY }} + NUGET_API_KEY: ${{ secrets.NUGET_API_TEST_KEY }} store-apps-version: name: Store Latest Deployed Apps Version as GitHub Variable