From d33461f9be7adc7581f8ad7189f8965c68094733 Mon Sep 17 00:00:00 2001 From: Amund Myrbostad Date: Thu, 7 Nov 2024 10:45:07 +0100 Subject: [PATCH 001/169] 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 002/169] 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 003/169] 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 004/169] 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 005/169] 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 006/169] 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 007/169] 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 008/169] 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 009/169] 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 010/169] 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 011/169] 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 012/169] 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 013/169] 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 014/169] 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 015/169] 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 016/169] 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 017/169] 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 018/169] 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 019/169] 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 020/169] 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 021/169] 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 022/169] 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 023/169] 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 024/169] 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 025/169] 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 026/169] 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 027/169] 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 028/169] 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 029/169] .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 030/169] 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 031/169] 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 032/169] 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 033/169] 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 034/169] 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 035/169] 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 036/169] 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 037/169] 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 038/169] 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 039/169] 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 040/169] 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 041/169] 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 042/169] 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 043/169] 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 044/169] 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 045/169] 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 046/169] 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 047/169] 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 048/169] 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 049/169] 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 050/169] 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 051/169] 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 052/169] 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 053/169] 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 054/169] 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 055/169] 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 056/169] 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 057/169] 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 058/169] 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 059/169] 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 060/169] 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 061/169] 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 062/169] 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 From e46f868eefdb006fa2227d3a0c292e232343cf22 Mon Sep 17 00:00:00 2001 From: Amund Myrbostad Date: Mon, 20 Jan 2025 09:42:02 +0100 Subject: [PATCH 063/169] Updated Sample and RefitterInterfac --- .../Program.cs | 12 +++- .../Features/V1/RefitterInterface.verified.cs | 58 ++++++++++++++++--- .../Services/DialogTokenVerifier.cs | 2 +- 3 files changed, 61 insertions(+), 11 deletions(-) diff --git a/src/Digdir.Library.Dialogporten.WebApiClient.Sample/Program.cs b/src/Digdir.Library.Dialogporten.WebApiClient.Sample/Program.cs index 2c72d1b1f..19a361d1d 100644 --- a/src/Digdir.Library.Dialogporten.WebApiClient.Sample/Program.cs +++ b/src/Digdir.Library.Dialogporten.WebApiClient.Sample/Program.cs @@ -46,12 +46,16 @@ Console.WriteLine(response.StatusCode); Console.WriteLine(response.Content); } +else +{ + Console.WriteLine(response.StatusCode); +} +Debug.Assert(response.Content != null, "response.Content != null"); 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 dialog = dialogportenClient.V1ServiceOwnerDialogsGetGetDialog(guid, null!).Result.Content; Debug.Assert(dialog != null, nameof(dialog) + " != null"); @@ -131,6 +135,11 @@ static V1ServiceOwnerDialogsCommandsCreate_DialogCommand CreateCommand() { return new V1ServiceOwnerDialogsCommandsCreate_DialogCommand { + Activities = [], + ApiActions = [], + GuiActions = [], + Attachments = [], + SearchTags = [], ServiceResource = "urn:altinn:resource:super-simple-service", Party = "urn:altinn:person:identifier-no:14886498226", SystemLabel = DialogEndUserContextsEntities_SystemLabel.Default, @@ -175,6 +184,7 @@ static V1ServiceOwnerDialogsCommandsCreate_DialogCommand CreateCommand() }, + Id = null, Transmissions = [ new V1ServiceOwnerDialogsCommandsCreate_Transmission 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 b74070a38..64bbd8355 100644 --- a/src/Digdir.Library.Dialogporten.WebApiClient/Features/V1/RefitterInterface.verified.cs +++ b/src/Digdir.Library.Dialogporten.WebApiClient/Features/V1/RefitterInterface.verified.cs @@ -199,7 +199,7 @@ public partial interface IServiceownerApi /// /// 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) + /// For detailed information on validation rules, see [the source for CreateDialogCommandValidator](https://github.com/altinn/dialogporten/blob/main/src/Digdir.Domain.Dialogporten.Application/Features/V1/ServiceOwner/Dialogs/Commands/Create/CreateDialogCommandValidator.cs) /// /// /// A representing the instance containing the result: @@ -210,7 +210,7 @@ public partial interface IServiceownerApi /// /// /// 201 - /// The UUID of the created the dialog aggregate. A relative URL to the newly created activity is set in the \"Location\" header. + /// The UUID of the created dialog aggregate. A relative URL to the newly created activity is set in the \"Location\" header. /// /// /// 204 @@ -532,7 +532,7 @@ public partial interface IServiceownerApi /// /// /// 201 - /// The UUID of the created the dialog activity. A relative URL to the newly created activity is set in the \"Location\" header. + /// The UUID of the created dialog activity. A relative URL to the newly created activity is set in the \"Location\" header. /// /// /// 204 @@ -727,7 +727,7 @@ public partial interface IServiceownerApi /// /// /// 201 - /// The UUID of the created the dialog transmission. A relative URL to the newly created activity is set in the \"Location\" header. + /// The UUID of the created dialog transmission. A relative URL to the newly created activity is set in the \"Location\" header. /// /// /// 204 @@ -949,6 +949,24 @@ public enum DialogsEntitiesActivities_DialogActivityType [System.Runtime.Serialization.EnumMember(Value = @"DialogOpened")] DialogOpened = 6, + [System.Runtime.Serialization.EnumMember(Value = @"DialogDeleted")] + DialogDeleted = 7, + + [System.Runtime.Serialization.EnumMember(Value = @"DialogRestored")] + DialogRestored = 8, + + [System.Runtime.Serialization.EnumMember(Value = @"SentToSigning")] + SentToSigning = 9, + + [System.Runtime.Serialization.EnumMember(Value = @"SentToFormFill")] + SentToFormFill = 10, + + [System.Runtime.Serialization.EnumMember(Value = @"SentToSendIn")] + SentToSendIn = 11, + + [System.Runtime.Serialization.EnumMember(Value = @"SentToPayment")] + SentToPayment = 12, + } [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "14.2.0.0 (NJsonSchema v11.1.0.0 (Newtonsoft.Json v13.0.0.0))")] @@ -1160,7 +1178,8 @@ public partial class ProblemDetails_Error public partial class V1CommonContent_ContentValue { /// - /// Media type of the content (plaintext, Markdown). Can also indicate that the content is embeddable. + /// Media type of the content, this can also indicate that the content is embeddable. + ///
For a list of supported media types, see (link TBD). ///
[JsonPropertyName("mediaType")] @@ -1443,6 +1462,13 @@ public partial class V1ServiceOwnerDialogsCommandsCreate_ApiAction [JsonPropertyName("endpoints")] public ICollection Endpoints { get; set; } + /// + /// A self-defined UUIDv7 may be provided to support idempotent creation of Api Actions. If not provided, a new UUIDv7 will be generated. + /// + + [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))")] @@ -1521,6 +1547,13 @@ public partial class V1ServiceOwnerDialogsCommandsCreate_Attachment [JsonPropertyName("displayName")] public ICollection DisplayName { get; set; } + /// + /// A self-defined UUIDv7 may be provided to support idempotent creation of 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. /// @@ -1809,6 +1842,13 @@ public partial class V1ServiceOwnerDialogsCommandsCreate_GuiAction [JsonConverter(typeof(JsonStringEnumConverter))] public Http_HttpVerb? HttpMethod { get; set; } + /// + /// A self-defined UUIDv7 may be provided to support idempotent creation of Gui Actions. If not provided, a new UUIDv7 will be generated. + /// + + [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. @@ -2105,7 +2145,7 @@ public partial class V1ServiceOwnerDialogsCommandsUpdate_ApiAction 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. + /// A self-defined UUIDv7 may be provided to support idempotent additions of Api Actions. If not provided, a new UUIDv7 will be generated. /// [JsonPropertyName("id")] @@ -2197,7 +2237,7 @@ public partial class V1ServiceOwnerDialogsCommandsUpdate_Attachment 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. + /// A self-defined UUIDv7 may be provided to support idempotent additions of attachments. If not provided, a new UUIDv7 will be generated. /// [JsonPropertyName("id")] @@ -2434,7 +2474,7 @@ public partial class V1ServiceOwnerDialogsCommandsUpdate_GuiAction 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. + /// A self-defined UUIDv7 may be provided to support idempotent additions of Gui Actions. If not provided, a new UUIDv7 will be generated. /// [JsonPropertyName("id")] @@ -2581,7 +2621,7 @@ public partial class V1ServiceOwnerDialogsCommandsUpdate_TransmissionAttachment 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. + /// A self-defined UUIDv7 may be provided to support idempotent additions of transmission attachments. If not provided, a new UUIDv7 will be generated. /// [JsonPropertyName("id")] diff --git a/src/Digdir.Library.Dialogporten.WebApiClient/Services/DialogTokenVerifier.cs b/src/Digdir.Library.Dialogporten.WebApiClient/Services/DialogTokenVerifier.cs index 4580444f7..f4aa1ffd8 100644 --- a/src/Digdir.Library.Dialogporten.WebApiClient/Services/DialogTokenVerifier.cs +++ b/src/Digdir.Library.Dialogporten.WebApiClient/Services/DialogTokenVerifier.cs @@ -42,7 +42,7 @@ public bool Verify(string token) var fieldsInfo = typeof(DialogTokenClaimTypes).GetFields().Where(f => f.FieldType == typeof(string)); foreach (var fieldInfo in fieldsInfo) { - var value = fieldInfo.GetValue("string"); + var value = fieldInfo.GetValue(null); if (value != null && bodyJson.TryGetProperty(value.ToString()!, out var jsonValue)) { claims.Add(value.ToString()!, jsonValue); From 68d65bc0b6d38cff902244484ae431189b065000 Mon Sep 17 00:00:00 2001 From: Amund Myrbostad Date: Mon, 20 Jan 2025 10:10:05 +0100 Subject: [PATCH 064/169] * Updated comments on IDialogportenSettings * Made MaskinportenEnvironment an enum instead of string * Properly quoted commands in workflow --- .github/workflows/workflow-publish-nuget.yml | 10 +++--- .../Interfaces/IDialogportenSettings.cs | 32 ++++++++++++++++++- 2 files changed, 36 insertions(+), 6 deletions(-) diff --git a/.github/workflows/workflow-publish-nuget.yml b/.github/workflows/workflow-publish-nuget.yml index e941fc04b..0b5304c1a 100644 --- a/.github/workflows/workflow-publish-nuget.yml +++ b/.github/workflows/workflow-publish-nuget.yml @@ -28,9 +28,9 @@ jobs: uses: actions/checkout@v4 - name: set PROJECT variable to point to project run: | - PROJECT=${{inputs.path}} + PROJECT="${{inputs.path}}" echo "PROJECT ${PROJECT}" - echo "PROJECT=${PROJECT}" >> $GITHUB_ENV + echo "PROJECT=${PROJECT}" >> "$GITHUB_ENV" - name: Set up .NET uses: actions/setup-dotnet@v4 @@ -38,10 +38,10 @@ jobs: global-json-file: ./global.json - 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} + 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 @@ -58,5 +58,5 @@ jobs: name: package - name: Push to NuGet - run: dotnet nuget push *.nupkg --source ${{ inputs.source }} --api-key ${{secrets.NUGET_API_KEY}} + run: dotnet nuget push *.nupkg --source "${{ inputs.source }}" --api-key ${{secrets.NUGET_API_KEY}} diff --git a/src/Digdir.Library.Dialogporten.WebApiClient/Interfaces/IDialogportenSettings.cs b/src/Digdir.Library.Dialogporten.WebApiClient/Interfaces/IDialogportenSettings.cs index 7cdb8651f..c653001fc 100644 --- a/src/Digdir.Library.Dialogporten.WebApiClient/Interfaces/IDialogportenSettings.cs +++ b/src/Digdir.Library.Dialogporten.WebApiClient/Interfaces/IDialogportenSettings.cs @@ -20,10 +20,40 @@ public interface IDialogportenSettings /// /// The Maskinporten environment. Valid values are ver1, ver2, test or prod /// - string Environment { get; set; } + MaskinportenEnvironment Environment { get; set; } /// /// Base64 Encoded Json Web Key /// + /// + /// Security considerations: + /// - Store this value in a secure configuration store or key vault + /// - Ensure the value is properly Base64 encoded + /// - Protect this value in memory and logs + /// string EncodedJwk { get; set; } } + +public enum MaskinportenEnvironment +{ + /// + /// Version 1 environment + /// + Ver1, + + /// + /// Version 2 environment + /// + Ver2, + + /// + /// Test environment + /// + Test, + + /// + /// Production environment + /// + Prod + +} From bcba03c70144be18c26bf4371acb93de5f63aaaa Mon Sep 17 00:00:00 2001 From: Amund Myrbostad Date: Mon, 20 Jan 2025 10:17:42 +0100 Subject: [PATCH 065/169] Updated to refitter v1.5.0 --- .../Features/V1/RefitterInterface.verified.cs | 4 +- ...rten.WebApiClient.Integration.Tests.csproj | 7 +- .../refitter/RefitterInterface.cs | 4230 +++++++++++++++++ 3 files changed, 4233 insertions(+), 8 deletions(-) create mode 100644 tests/Digdir.Library.Dialogporten.WebApiClient.Integration.Tests/refitter/RefitterInterface.cs 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 64bbd8355..b26d8f2af 100644 --- a/src/Digdir.Library.Dialogporten.WebApiClient/Features/V1/RefitterInterface.verified.cs +++ b/src/Digdir.Library.Dialogporten.WebApiClient/Features/V1/RefitterInterface.verified.cs @@ -119,7 +119,7 @@ public class V1ServiceOwnerDialogsSearchSearchDialogQueryParams 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 + /// Limit free text search to texts with this language code, e.g. 'nb', 'en'. Culture codes will be normalized to neutral language codes (ISO 639). Default: search all culture codes /// [Query] public string SearchLanguageCode { get; set; } @@ -162,7 +162,7 @@ public V1ServiceOwnerDialogActivitiesNotificationConditionNotificationConditionQ } /// Gets a list of dialogs - [System.CodeDom.Compiler.GeneratedCode("Refitter", "1.1.0.0")] + [System.CodeDom.Compiler.GeneratedCode("Refitter", "1.5.0.0")] public partial interface IServiceownerApi { /// Gets a list of dialogs 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 2025a8d4c..db8d8c640 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,15 +14,10 @@ - - + all runtime; build; native; contentfiles; analyzers; buildtransitive - - - - 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..d3091bca5 --- /dev/null +++ b/tests/Digdir.Library.Dialogporten.WebApiClient.Integration.Tests/refitter/RefitterInterface.cs @@ -0,0 +1,4230 @@ +// +// 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(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")] + public System.DateTimeOffset? CreatedBefore { get; set; } + + /// + /// Only return dialogs updated after this date + /// + [Query(Format = "yyyy-MM-ddTHH:mm:ssZ")] + public System.DateTimeOffset? UpdatedAfter { get; set; } + + /// + /// Only return dialogs updated before this date + /// + [Query(Format = "yyyy-MM-ddTHH:mm:ssZ")] + public System.DateTimeOffset? UpdatedBefore { get; set; } + + /// + /// Only return dialogs with due date after this date + /// + [Query(Format = "yyyy-MM-ddTHH:mm:ssZ")] + public System.DateTimeOffset? DueAfter { get; set; } + + /// + /// Only return dialogs with due date before this date + /// + [Query(Format = "yyyy-MM-ddTHH:mm:ssZ")] + public System.DateTimeOffset? DueBefore { get; set; } + + /// + /// Only return dialogs with visible-from date after this date + /// + [Query(Format = "yyyy-MM-ddTHH:mm:ssZ")] + public System.DateTimeOffset? VisibleAfter { get; set; } + + /// + /// Only return dialogs with visible-from date before this date + /// + [Query(Format = "yyyy-MM-ddTHH:mm:ssZ")] + 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. 'nb', '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.5.0.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/altinn/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 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. + /// + /// + /// 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. + /// + /// + /// 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 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. + /// + /// + /// 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. + /// + /// + /// + [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. + /// + /// + /// 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. + /// + /// + /// 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 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. + /// + /// + /// 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. + /// + /// + /// 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. + /// + /// + /// 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. + /// + /// + /// 410 + /// Entity with the given key(s) is removed. + /// + /// + /// + [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 + /// 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")] + [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 + /// 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")] + [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. + /// + /// + /// 410 + /// Entity with the given key(s) is removed. + /// + /// + /// + [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 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. + /// + /// + /// 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. + /// + /// + /// 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. + /// + /// + /// 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. + /// + /// + /// 410 + /// Entity with the given key(s) is removed. + /// + /// + /// + [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.Runtime.Serialization.EnumMember(Value = @"DialogDeleted")] + DialogDeleted = 7, + + [System.Runtime.Serialization.EnumMember(Value = @"DialogRestored")] + DialogRestored = 8, + + [System.Runtime.Serialization.EnumMember(Value = @"SentToSigning")] + SentToSigning = 9, + + [System.Runtime.Serialization.EnumMember(Value = @"SentToFormFill")] + SentToFormFill = 10, + + [System.Runtime.Serialization.EnumMember(Value = @"SentToSendIn")] + SentToSendIn = 11, + + [System.Runtime.Serialization.EnumMember(Value = @"SentToPayment")] + SentToPayment = 12, + + } + + [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, this can also indicate that the content is embeddable. + ///
For a list of supported media types, see (link TBD). + ///
+ + [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; } + + /// + /// A self-defined UUIDv7 may be provided to support idempotent creation of Api Actions. If not provided, a new UUIDv7 will be generated. + /// + + [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 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; } + + /// + /// A self-defined UUIDv7 may be provided to support idempotent creation of 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_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; } + + /// + /// A self-defined UUIDv7 may be provided to support idempotent creation of Gui Actions. If not provided, a new UUIDv7 will be generated. + /// + + [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 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 self-defined UUIDv7 may be provided to support idempotent additions of Api Actions. If not provided, a new UUIDv7 will be generated. + /// + + [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 self-defined UUIDv7 may be provided to support idempotent additions of 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_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 self-defined UUIDv7 may be provided to support idempotent additions of Gui Actions. If not provided, a new UUIDv7 will be generated. + /// + + [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 additions 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 f159e5dd0ce174c961faea5b1b86b170fa0dbf90 Mon Sep 17 00:00:00 2001 From: Amund Myrbostad Date: Mon, 20 Jan 2025 10:30:31 +0100 Subject: [PATCH 066/169] Removed comments --- .../Extensions/ServiceCollectionExtensions.cs | 12 +----------- 1 file changed, 1 insertion(+), 11 deletions(-) diff --git a/src/Digdir.Library.Dialogporten.WebApiClient/Extensions/ServiceCollectionExtensions.cs b/src/Digdir.Library.Dialogporten.WebApiClient/Extensions/ServiceCollectionExtensions.cs index 678fbca34..31e0bf820 100644 --- a/src/Digdir.Library.Dialogporten.WebApiClient/Extensions/ServiceCollectionExtensions.cs +++ b/src/Digdir.Library.Dialogporten.WebApiClient/Extensions/ServiceCollectionExtensions.cs @@ -34,18 +34,15 @@ public static IServiceCollection AddDialogTokenVerifer(this IServiceCollection s } 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 switch { "prod" => "prod", @@ -56,25 +53,21 @@ public static IServiceCollection AddDialogportenClient(this IServiceCollection s 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 = dialogportenSettings.Environment switch { "test" => "https://platform.tt02.altinn.no/dialogporten", "local" => "https://localhost:7214", - // "prod" => "https://platform.altinn.no/dialogporten", + "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() .Where(x => x.Namespace!.StartsWith("Digdir.Library.Dialogporten.WebApiClient.Features.V1", StringComparison.InvariantCulture) && x.IsInterface) .ToList(); - ; foreach (var refitClient in refitClients) { services @@ -86,9 +79,6 @@ public static IServiceCollection AddDialogportenClient(this IServiceCollection s .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; } } From e1ae1007f2c2cf7a1f7dd92fe373b773ac94f680 Mon Sep 17 00:00:00 2001 From: Amund Myrbostad Date: Mon, 20 Jan 2025 10:38:10 +0100 Subject: [PATCH 067/169] Clean up --- .../Extensions/ServiceCollectionExtensions.cs | 1 - .../Interfaces/IDialogportenSettings.cs | 59 ------------------- .../{Tests.cs => WebApiClientTests.cs} | 18 +----- 3 files changed, 2 insertions(+), 76 deletions(-) delete mode 100644 src/Digdir.Library.Dialogporten.WebApiClient/Interfaces/IDialogportenSettings.cs rename tests/Digdir.Library.Dialogporten.WebApiClient.Integration.Tests/{Tests.cs => WebApiClientTests.cs} (96%) diff --git a/src/Digdir.Library.Dialogporten.WebApiClient/Extensions/ServiceCollectionExtensions.cs b/src/Digdir.Library.Dialogporten.WebApiClient/Extensions/ServiceCollectionExtensions.cs index 31e0bf820..2a01eb399 100644 --- a/src/Digdir.Library.Dialogporten.WebApiClient/Extensions/ServiceCollectionExtensions.cs +++ b/src/Digdir.Library.Dialogporten.WebApiClient/Extensions/ServiceCollectionExtensions.cs @@ -22,7 +22,6 @@ public static IServiceCollection AddDialogTokenVerifer(this IServiceCollection s var dialogportenSettings = provider.GetRequiredService() .GetSection("Ed25519Keys") .Get(); - Console.WriteLine(dialogportenSettings); var keyPair = dialogportenSettings!.Primary; var kid = keyPair.Kid; diff --git a/src/Digdir.Library.Dialogporten.WebApiClient/Interfaces/IDialogportenSettings.cs b/src/Digdir.Library.Dialogporten.WebApiClient/Interfaces/IDialogportenSettings.cs deleted file mode 100644 index c653001fc..000000000 --- a/src/Digdir.Library.Dialogporten.WebApiClient/Interfaces/IDialogportenSettings.cs +++ /dev/null @@ -1,59 +0,0 @@ -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 - /// - MaskinportenEnvironment Environment { get; set; } - - /// - /// Base64 Encoded Json Web Key - /// - /// - /// Security considerations: - /// - Store this value in a secure configuration store or key vault - /// - Ensure the value is properly Base64 encoded - /// - Protect this value in memory and logs - /// - string EncodedJwk { get; set; } -} - -public enum MaskinportenEnvironment -{ - /// - /// Version 1 environment - /// - Ver1, - - /// - /// Version 2 environment - /// - Ver2, - - /// - /// Test environment - /// - Test, - - /// - /// Production environment - /// - Prod - -} diff --git a/tests/Digdir.Library.Dialogporten.WebApiClient.Integration.Tests/Tests.cs b/tests/Digdir.Library.Dialogporten.WebApiClient.Integration.Tests/WebApiClientTests.cs similarity index 96% rename from tests/Digdir.Library.Dialogporten.WebApiClient.Integration.Tests/Tests.cs rename to tests/Digdir.Library.Dialogporten.WebApiClient.Integration.Tests/WebApiClientTests.cs index 445cd0f0e..c4a6bb9c7 100644 --- a/tests/Digdir.Library.Dialogporten.WebApiClient.Integration.Tests/Tests.cs +++ b/tests/Digdir.Library.Dialogporten.WebApiClient.Integration.Tests/WebApiClientTests.cs @@ -12,7 +12,7 @@ public class WebApiClientFixture : IDisposable public WebApiClientFixture() { - var configuration = new ConfigurationBuilder().AddUserSecrets().Build(); + var configuration = new ConfigurationBuilder().AddUserSecrets().Build(); // .AddJsonFile("appsettings.local.json", optional: false, reloadOnChange: true) var services = new ServiceCollection(); @@ -30,7 +30,7 @@ public void Dispose() } } -public class Tests(WebApiClientFixture fixture) : IClassFixture, IDisposable +public class WebApiClientTests(WebApiClientFixture fixture) : IClassFixture, IDisposable { private readonly List _dialogIds = []; [Fact] @@ -153,20 +153,6 @@ public async Task Update_Dialog_Returns_204() [Fact] public async Task Search_Dialog_Returns_200() { - /* - * 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. - * [x] Lagde PR med forandringene, blitt Merget inn - * [ ] Venter på preview av refitter blir lansert - */ var dateOffset = DateTimeOffset.UtcNow; var createDialogCommand = CreateCommand(); From 8588f26033126a4a9551dc90d9930beaa9a0dfaf Mon Sep 17 00:00:00 2001 From: Amund Myrbostad Date: Mon, 20 Jan 2025 10:45:09 +0100 Subject: [PATCH 068/169] sln broken? possible from earlier merge from main --- Digdir.Domain.Dialogporten.sln | 1 - 1 file changed, 1 deletion(-) diff --git a/Digdir.Domain.Dialogporten.sln b/Digdir.Domain.Dialogporten.sln index bd7bde107..3f6de6786 100644 --- a/Digdir.Domain.Dialogporten.sln +++ b/Digdir.Domain.Dialogporten.sln @@ -202,7 +202,6 @@ Global {0900E3CF-F9D8-4B29-957F-484B3B028D6D} = {320B47A0-5EB8-4B6E-8C84-90633A1849CA} {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} From a3113dc4bdd680e0a28b97243d0f916e311840a9 Mon Sep 17 00:00:00 2001 From: Amund Myrbostad Date: Mon, 20 Jan 2025 12:38:32 +0100 Subject: [PATCH 069/169] Added secrets to test workflow --- .github/workflows/workflow-build-and-test.yml | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/.github/workflows/workflow-build-and-test.yml b/.github/workflows/workflow-build-and-test.yml index 44f343145..25fa352e4 100644 --- a/.github/workflows/workflow-build-and-test.yml +++ b/.github/workflows/workflow-build-and-test.yml @@ -22,4 +22,11 @@ jobs: run: dotnet build --no-restore --configuration Release - name: Test + env: + DialogportenSettings.Environment: "test" + DialogportenSettings.Maskinporten.ClientId: "${{secrets.DIALOGPORTEN_MASKINPORTEN_CLIENTID}}" + DialogportenSettings.Maskinporten.Scope: "${{secrets.DIALOGPORTEN_MASKINPORTEN_SCOPE}}" + DialogportenSettings.Maskinporten.EncodedJwk: "${{secrets.DIALOGPORTEN_MASKINPORTEN_ENCODEDJWK}}" + Ed25519Keys.Primary.Kid: "${{secrets.ED25519KEYS_PRIMARY_KID}}" + Ed25519Keys.Primary.PublicComponent: "${{secrets.ED25519KEYS_PRIMARY_PUBLICCOMPONENT}}" run: dotnet test --no-build --configuration Release From 1793fd7b33100fe482ff8ae380bc603e28d3842b Mon Sep 17 00:00:00 2001 From: Amund Myrbostad Date: Mon, 20 Jan 2025 12:41:10 +0100 Subject: [PATCH 070/169] hm --- .github/workflows/workflow-build-and-test.yml | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/.github/workflows/workflow-build-and-test.yml b/.github/workflows/workflow-build-and-test.yml index 25fa352e4..f7531828f 100644 --- a/.github/workflows/workflow-build-and-test.yml +++ b/.github/workflows/workflow-build-and-test.yml @@ -23,10 +23,10 @@ jobs: - name: Test env: - DialogportenSettings.Environment: "test" - DialogportenSettings.Maskinporten.ClientId: "${{secrets.DIALOGPORTEN_MASKINPORTEN_CLIENTID}}" - DialogportenSettings.Maskinporten.Scope: "${{secrets.DIALOGPORTEN_MASKINPORTEN_SCOPE}}" - DialogportenSettings.Maskinporten.EncodedJwk: "${{secrets.DIALOGPORTEN_MASKINPORTEN_ENCODEDJWK}}" - Ed25519Keys.Primary.Kid: "${{secrets.ED25519KEYS_PRIMARY_KID}}" - Ed25519Keys.Primary.PublicComponent: "${{secrets.ED25519KEYS_PRIMARY_PUBLICCOMPONENT}}" + DialogportenSettings:Environment: "test" + DialogportenSettings:Maskinporten:ClientId: "${{secrets.DIALOGPORTEN_MASKINPORTEN_CLIENTID}}" + DialogportenSettings:Maskinporten:Scope: "${{secrets.DIALOGPORTEN_MASKINPORTEN_SCOPE}}" + DialogportenSettings:Maskinporten:EncodedJwk: "${{secrets.DIALOGPORTEN_MASKINPORTEN_ENCODEDJWK}}" + Ed25519Keys:Primary:Kid: "${{secrets.ED25519KEYS_PRIMARY_KID}}" + Ed25519Keys:Primary:PublicComponent: "${{secrets.ED25519KEYS_PRIMARY_PUBLICCOMPONENT}}" run: dotnet test --no-build --configuration Release From 0299d683278da2e262e7c5f57354fd10920ae4f6 Mon Sep 17 00:00:00 2001 From: Amund Myrbostad Date: Mon, 20 Jan 2025 12:49:25 +0100 Subject: [PATCH 071/169] test --- .../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 2a01eb399..fcf58d4b6 100644 --- a/src/Digdir.Library.Dialogporten.WebApiClient/Extensions/ServiceCollectionExtensions.cs +++ b/src/Digdir.Library.Dialogporten.WebApiClient/Extensions/ServiceCollectionExtensions.cs @@ -38,6 +38,7 @@ public static IServiceCollection AddDialogportenClient(this IServiceCollection s .GetSection("DialogportenSettings") .Get(); + Console.WriteLine(dialogportenSettings); var maskinportenSettings = new MaskinportenSettings() { EncodedJwk = dialogportenSettings!.Maskinporten.EncodedJwk, From 8a72becd1545c6c09c0aeca1250cda8dc85bac95 Mon Sep 17 00:00:00 2001 From: Amund Myrbostad Date: Mon, 20 Jan 2025 14:41:59 +0100 Subject: [PATCH 072/169] Test now uses env variables --- ...Library.Dialogporten.WebApiClient.Integration.Tests.csproj | 1 + .../WebApiClientTests.cs | 4 +++- 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 db8d8c640..a23617e85 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 @@ -10,6 +10,7 @@ + diff --git a/tests/Digdir.Library.Dialogporten.WebApiClient.Integration.Tests/WebApiClientTests.cs b/tests/Digdir.Library.Dialogporten.WebApiClient.Integration.Tests/WebApiClientTests.cs index c4a6bb9c7..9b26ce505 100644 --- a/tests/Digdir.Library.Dialogporten.WebApiClient.Integration.Tests/WebApiClientTests.cs +++ b/tests/Digdir.Library.Dialogporten.WebApiClient.Integration.Tests/WebApiClientTests.cs @@ -12,7 +12,9 @@ public class WebApiClientFixture : IDisposable public WebApiClientFixture() { - var configuration = new ConfigurationBuilder().AddUserSecrets().Build(); + var configuration = new ConfigurationBuilder() + .AddUserSecrets() + .AddEnvironmentVariables().Build(); // .AddJsonFile("appsettings.local.json", optional: false, reloadOnChange: true) var services = new ServiceCollection(); From b034ddb7f3ed8f82fd5f34516794b04314bf5bb4 Mon Sep 17 00:00:00 2001 From: Amund Myrbostad Date: Mon, 20 Jan 2025 14:46:07 +0100 Subject: [PATCH 073/169] hm --- .github/workflows/workflow-build-and-test.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/workflow-build-and-test.yml b/.github/workflows/workflow-build-and-test.yml index f7531828f..95d450d4c 100644 --- a/.github/workflows/workflow-build-and-test.yml +++ b/.github/workflows/workflow-build-and-test.yml @@ -26,7 +26,7 @@ jobs: DialogportenSettings:Environment: "test" DialogportenSettings:Maskinporten:ClientId: "${{secrets.DIALOGPORTEN_MASKINPORTEN_CLIENTID}}" DialogportenSettings:Maskinporten:Scope: "${{secrets.DIALOGPORTEN_MASKINPORTEN_SCOPE}}" - DialogportenSettings:Maskinporten:EncodedJwk: "${{secrets.DIALOGPORTEN_MASKINPORTEN_ENCODEDJWK}}" - Ed25519Keys:Primary:Kid: "${{secrets.ED25519KEYS_PRIMARY_KID}}" - Ed25519Keys:Primary:PublicComponent: "${{secrets.ED25519KEYS_PRIMARY_PUBLICCOMPONENT}}" + DialogportenSettings:Maskinporten:EncodedJwk: ${{secrets.DIALOGPORTEN_MASKINPORTEN_ENCODEDJWK}} + Ed25519Keys:Primary:Kid: ${{secrets.ED25519KEYS_PRIMARY_KID}} + Ed25519Keys:Primary:PublicComponent: ${{secrets.ED25519KEYS_PRIMARY_PUBLICCOMPONENT}} run: dotnet test --no-build --configuration Release From 99ef7ecb109fb18149dca9b3fe8965fd9b93df8d Mon Sep 17 00:00:00 2001 From: Amund Myrbostad Date: Mon, 20 Jan 2025 14:55:20 +0100 Subject: [PATCH 074/169] testing --- .../Extensions/ServiceCollectionExtensions.cs | 2 +- .../WebApiClientTests.cs | 7 ++++--- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/src/Digdir.Library.Dialogporten.WebApiClient/Extensions/ServiceCollectionExtensions.cs b/src/Digdir.Library.Dialogporten.WebApiClient/Extensions/ServiceCollectionExtensions.cs index fcf58d4b6..3c93da8a3 100644 --- a/src/Digdir.Library.Dialogporten.WebApiClient/Extensions/ServiceCollectionExtensions.cs +++ b/src/Digdir.Library.Dialogporten.WebApiClient/Extensions/ServiceCollectionExtensions.cs @@ -25,7 +25,7 @@ public static IServiceCollection AddDialogTokenVerifer(this IServiceCollection s var keyPair = dialogportenSettings!.Primary; var kid = keyPair.Kid; - + Console.WriteLine(keyPair); var publicKey = PublicKey.Import(SignatureAlgorithm.Ed25519, Base64Url.DecodeFromChars(keyPair.PublicComponent), KeyBlobFormat.RawPublicKey); services.AddSingleton(new DialogTokenVerifier(kid, publicKey)); diff --git a/tests/Digdir.Library.Dialogporten.WebApiClient.Integration.Tests/WebApiClientTests.cs b/tests/Digdir.Library.Dialogporten.WebApiClient.Integration.Tests/WebApiClientTests.cs index 9b26ce505..1bc00ca6a 100644 --- a/tests/Digdir.Library.Dialogporten.WebApiClient.Integration.Tests/WebApiClientTests.cs +++ b/tests/Digdir.Library.Dialogporten.WebApiClient.Integration.Tests/WebApiClientTests.cs @@ -1,4 +1,5 @@ using System.Net; +using Digdir.Library.Dialogporten.WebApiClient.Config; using Digdir.Library.Dialogporten.WebApiClient.Extensions; using Digdir.Library.Dialogporten.WebApiClient.Features.V1; using Microsoft.Extensions.Configuration; @@ -14,12 +15,12 @@ public WebApiClientFixture() var configuration = new ConfigurationBuilder() .AddUserSecrets() - .AddEnvironmentVariables().Build(); + .AddEnvironmentVariables() + .Build(); // .AddJsonFile("appsettings.local.json", optional: false, reloadOnChange: true) var services = new ServiceCollection(); - services.AddSingleton(configuration); - + services.AddDialogportenClient(); services.AddDialogTokenVerifer(); DialogportenClient = services.BuildServiceProvider().GetRequiredService(); From d60ac48bae79b5a9fae52b55f290633c121489e5 Mon Sep 17 00:00:00 2001 From: Amund Myrbostad Date: Mon, 20 Jan 2025 14:57:03 +0100 Subject: [PATCH 075/169] bruh --- .../WebApiClientTests.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/Digdir.Library.Dialogporten.WebApiClient.Integration.Tests/WebApiClientTests.cs b/tests/Digdir.Library.Dialogporten.WebApiClient.Integration.Tests/WebApiClientTests.cs index 1bc00ca6a..d6e9ef505 100644 --- a/tests/Digdir.Library.Dialogporten.WebApiClient.Integration.Tests/WebApiClientTests.cs +++ b/tests/Digdir.Library.Dialogporten.WebApiClient.Integration.Tests/WebApiClientTests.cs @@ -20,7 +20,7 @@ public WebApiClientFixture() // .AddJsonFile("appsettings.local.json", optional: false, reloadOnChange: true) var services = new ServiceCollection(); services.AddSingleton(configuration); - + services.AddDialogportenClient(); services.AddDialogTokenVerifer(); DialogportenClient = services.BuildServiceProvider().GetRequiredService(); From 5e5778c3c38c5281ab91a53a7144a5a0424be338 Mon Sep 17 00:00:00 2001 From: Amund Myrbostad Date: Tue, 21 Jan 2025 08:19:46 +0100 Subject: [PATCH 076/169] oi --- .github/workflows/workflow-build-and-test.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/workflow-build-and-test.yml b/.github/workflows/workflow-build-and-test.yml index 95d450d4c..f7531828f 100644 --- a/.github/workflows/workflow-build-and-test.yml +++ b/.github/workflows/workflow-build-and-test.yml @@ -26,7 +26,7 @@ jobs: DialogportenSettings:Environment: "test" DialogportenSettings:Maskinporten:ClientId: "${{secrets.DIALOGPORTEN_MASKINPORTEN_CLIENTID}}" DialogportenSettings:Maskinporten:Scope: "${{secrets.DIALOGPORTEN_MASKINPORTEN_SCOPE}}" - DialogportenSettings:Maskinporten:EncodedJwk: ${{secrets.DIALOGPORTEN_MASKINPORTEN_ENCODEDJWK}} - Ed25519Keys:Primary:Kid: ${{secrets.ED25519KEYS_PRIMARY_KID}} - Ed25519Keys:Primary:PublicComponent: ${{secrets.ED25519KEYS_PRIMARY_PUBLICCOMPONENT}} + DialogportenSettings:Maskinporten:EncodedJwk: "${{secrets.DIALOGPORTEN_MASKINPORTEN_ENCODEDJWK}}" + Ed25519Keys:Primary:Kid: "${{secrets.ED25519KEYS_PRIMARY_KID}}" + Ed25519Keys:Primary:PublicComponent: "${{secrets.ED25519KEYS_PRIMARY_PUBLICCOMPONENT}}" run: dotnet test --no-build --configuration Release From f20e1132b8d7df55d8dd0efaf80b6d547b5cf0e8 Mon Sep 17 00:00:00 2001 From: Amund Myrbostad Date: Tue, 21 Jan 2025 08:48:13 +0100 Subject: [PATCH 077/169] Test --- .../Extensions/ServiceCollectionExtensions.cs | 5 ++--- .../WebApiClientTests.cs | 2 +- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/src/Digdir.Library.Dialogporten.WebApiClient/Extensions/ServiceCollectionExtensions.cs b/src/Digdir.Library.Dialogporten.WebApiClient/Extensions/ServiceCollectionExtensions.cs index 3c93da8a3..bd514420f 100644 --- a/src/Digdir.Library.Dialogporten.WebApiClient/Extensions/ServiceCollectionExtensions.cs +++ b/src/Digdir.Library.Dialogporten.WebApiClient/Extensions/ServiceCollectionExtensions.cs @@ -23,9 +23,8 @@ public static IServiceCollection AddDialogTokenVerifer(this IServiceCollection s .GetSection("Ed25519Keys") .Get(); - var keyPair = dialogportenSettings!.Primary; - var kid = keyPair.Kid; - Console.WriteLine(keyPair); + var keyPair = dialogportenSettings!.Primary ?? throw new ArgumentException("Missing Ed25519 key"); + var kid = keyPair.Kid ?? throw new ArgumentException("Missing Ed25519 key id"); var publicKey = PublicKey.Import(SignatureAlgorithm.Ed25519, Base64Url.DecodeFromChars(keyPair.PublicComponent), KeyBlobFormat.RawPublicKey); services.AddSingleton(new DialogTokenVerifier(kid, publicKey)); diff --git a/tests/Digdir.Library.Dialogporten.WebApiClient.Integration.Tests/WebApiClientTests.cs b/tests/Digdir.Library.Dialogporten.WebApiClient.Integration.Tests/WebApiClientTests.cs index d6e9ef505..ef222696f 100644 --- a/tests/Digdir.Library.Dialogporten.WebApiClient.Integration.Tests/WebApiClientTests.cs +++ b/tests/Digdir.Library.Dialogporten.WebApiClient.Integration.Tests/WebApiClientTests.cs @@ -16,8 +16,8 @@ public WebApiClientFixture() var configuration = new ConfigurationBuilder() .AddUserSecrets() .AddEnvironmentVariables() + // .AddJsonFile("appsettings.local.json", optional: false, reloadOnChange: true) .Build(); - // .AddJsonFile("appsettings.local.json", optional: false, reloadOnChange: true) var services = new ServiceCollection(); services.AddSingleton(configuration); From a3496beef9129ea00c0cc160664b95692d778b7e Mon Sep 17 00:00:00 2001 From: Amund Myrbostad Date: Tue, 21 Jan 2025 08:53:15 +0100 Subject: [PATCH 078/169] nani --- .../Extensions/ServiceCollectionExtensions.cs | 28 +++++++++++++++---- 1 file changed, 22 insertions(+), 6 deletions(-) diff --git a/src/Digdir.Library.Dialogporten.WebApiClient/Extensions/ServiceCollectionExtensions.cs b/src/Digdir.Library.Dialogporten.WebApiClient/Extensions/ServiceCollectionExtensions.cs index bd514420f..4e39e63f6 100644 --- a/src/Digdir.Library.Dialogporten.WebApiClient/Extensions/ServiceCollectionExtensions.cs +++ b/src/Digdir.Library.Dialogporten.WebApiClient/Extensions/ServiceCollectionExtensions.cs @@ -23,12 +23,28 @@ public static IServiceCollection AddDialogTokenVerifer(this IServiceCollection s .GetSection("Ed25519Keys") .Get(); - var keyPair = dialogportenSettings!.Primary ?? throw new ArgumentException("Missing Ed25519 key"); - var kid = keyPair.Kid ?? throw new ArgumentException("Missing Ed25519 key id"); - var publicKey = PublicKey.Import(SignatureAlgorithm.Ed25519, - Base64Url.DecodeFromChars(keyPair.PublicComponent), KeyBlobFormat.RawPublicKey); - services.AddSingleton(new DialogTokenVerifier(kid, publicKey)); - return services; + var keyPair = dialogportenSettings!.Primary; + if (keyPair == null) + { + throw new ArgumentException("Missing Ed25519 key"); + } + var kid = keyPair.Kid; + if (kid == null) + { + throw new ArgumentException("Missing Ed25519 key id"); + } + try + { + + var publicKey = PublicKey.Import(SignatureAlgorithm.Ed25519, + Base64Url.DecodeFromChars(keyPair.PublicComponent), KeyBlobFormat.RawPublicKey); + services.AddSingleton(new DialogTokenVerifier(kid, publicKey)); + return services; + } + catch (Exception e) + { + throw new FormatException(keyPair.PublicComponent, e); + } } public static IServiceCollection AddDialogportenClient(this IServiceCollection services) { From 65da39804ac7f5216896bb57d983cdcd9270fce5 Mon Sep 17 00:00:00 2001 From: Amund Myrbostad Date: Tue, 21 Jan 2025 08:55:30 +0100 Subject: [PATCH 079/169] no da --- .../Extensions/ServiceCollectionExtensions.cs | 8 -------- 1 file changed, 8 deletions(-) diff --git a/src/Digdir.Library.Dialogporten.WebApiClient/Extensions/ServiceCollectionExtensions.cs b/src/Digdir.Library.Dialogporten.WebApiClient/Extensions/ServiceCollectionExtensions.cs index 4e39e63f6..786360779 100644 --- a/src/Digdir.Library.Dialogporten.WebApiClient/Extensions/ServiceCollectionExtensions.cs +++ b/src/Digdir.Library.Dialogporten.WebApiClient/Extensions/ServiceCollectionExtensions.cs @@ -24,15 +24,7 @@ public static IServiceCollection AddDialogTokenVerifer(this IServiceCollection s .Get(); var keyPair = dialogportenSettings!.Primary; - if (keyPair == null) - { - throw new ArgumentException("Missing Ed25519 key"); - } var kid = keyPair.Kid; - if (kid == null) - { - throw new ArgumentException("Missing Ed25519 key id"); - } try { From 8e7ac5b7d07099e99108bcc4e29149f393e7eddb Mon Sep 17 00:00:00 2001 From: Amund Myrbostad Date: Tue, 21 Jan 2025 08:58:49 +0100 Subject: [PATCH 080/169] funk --- .github/workflows/workflow-build-and-test.yml | 10 +++++----- .../Extensions/ServiceCollectionExtensions.cs | 16 ++++------------ 2 files changed, 9 insertions(+), 17 deletions(-) diff --git a/.github/workflows/workflow-build-and-test.yml b/.github/workflows/workflow-build-and-test.yml index f7531828f..47957b806 100644 --- a/.github/workflows/workflow-build-and-test.yml +++ b/.github/workflows/workflow-build-and-test.yml @@ -24,9 +24,9 @@ jobs: - name: Test env: DialogportenSettings:Environment: "test" - DialogportenSettings:Maskinporten:ClientId: "${{secrets.DIALOGPORTEN_MASKINPORTEN_CLIENTID}}" - DialogportenSettings:Maskinporten:Scope: "${{secrets.DIALOGPORTEN_MASKINPORTEN_SCOPE}}" - DialogportenSettings:Maskinporten:EncodedJwk: "${{secrets.DIALOGPORTEN_MASKINPORTEN_ENCODEDJWK}}" - Ed25519Keys:Primary:Kid: "${{secrets.ED25519KEYS_PRIMARY_KID}}" - Ed25519Keys:Primary:PublicComponent: "${{secrets.ED25519KEYS_PRIMARY_PUBLICCOMPONENT}}" + DialogportenSettings:Maskinporten:ClientId: ${{secrets.DIALOGPORTEN_MASKINPORTEN_CLIENTID}} + DialogportenSettings:Maskinporten:Scope: ${{secrets.DIALOGPORTEN_MASKINPORTEN_SCOPE}} + DialogportenSettings:Maskinporten:EncodedJwk: ${{secrets.DIALOGPORTEN_MASKINPORTEN_ENCODEDJWK}} + Ed25519Keys:Primary:Kid: ${{secrets.ED25519KEYS_PRIMARY_KID}} + Ed25519Keys:Primary:PublicComponent: ${{secrets.ED25519KEYS_PRIMARY_PUBLICCOMPONENT}} run: dotnet test --no-build --configuration Release diff --git a/src/Digdir.Library.Dialogporten.WebApiClient/Extensions/ServiceCollectionExtensions.cs b/src/Digdir.Library.Dialogporten.WebApiClient/Extensions/ServiceCollectionExtensions.cs index 786360779..209651c83 100644 --- a/src/Digdir.Library.Dialogporten.WebApiClient/Extensions/ServiceCollectionExtensions.cs +++ b/src/Digdir.Library.Dialogporten.WebApiClient/Extensions/ServiceCollectionExtensions.cs @@ -25,18 +25,10 @@ public static IServiceCollection AddDialogTokenVerifer(this IServiceCollection s var keyPair = dialogportenSettings!.Primary; var kid = keyPair.Kid; - try - { - - var publicKey = PublicKey.Import(SignatureAlgorithm.Ed25519, - Base64Url.DecodeFromChars(keyPair.PublicComponent), KeyBlobFormat.RawPublicKey); - services.AddSingleton(new DialogTokenVerifier(kid, publicKey)); - return services; - } - catch (Exception e) - { - throw new FormatException(keyPair.PublicComponent, e); - } + var publicKey = PublicKey.Import(SignatureAlgorithm.Ed25519, + Base64Url.DecodeFromChars(keyPair.PublicComponent), KeyBlobFormat.RawPublicKey); + services.AddSingleton(new DialogTokenVerifier(kid, publicKey)); + return services; } public static IServiceCollection AddDialogportenClient(this IServiceCollection services) { From 480f1590f2e89d426e19b0f7a546e3cf869b732e Mon Sep 17 00:00:00 2001 From: Are Almaas Date: Tue, 21 Jan 2025 09:16:04 +0100 Subject: [PATCH 081/169] add environemnt for test --- .github/workflows/workflow-build-and-test.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/workflow-build-and-test.yml b/.github/workflows/workflow-build-and-test.yml index 47957b806..0ef86df88 100644 --- a/.github/workflows/workflow-build-and-test.yml +++ b/.github/workflows/workflow-build-and-test.yml @@ -7,6 +7,7 @@ on: jobs: build-and-test: runs-on: ubuntu-latest + environment: test steps: - uses: actions/checkout@v4 From 40aec959b81d434d2116de3ed32e1faeca35e5bd Mon Sep 17 00:00:00 2001 From: Amund Myrbostad Date: Tue, 21 Jan 2025 09:25:36 +0100 Subject: [PATCH 082/169] est --- .github/workflows/workflow-build-and-test.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/workflow-build-and-test.yml b/.github/workflows/workflow-build-and-test.yml index 0ef86df88..3d4981ab4 100644 --- a/.github/workflows/workflow-build-and-test.yml +++ b/.github/workflows/workflow-build-and-test.yml @@ -29,5 +29,5 @@ jobs: DialogportenSettings:Maskinporten:Scope: ${{secrets.DIALOGPORTEN_MASKINPORTEN_SCOPE}} DialogportenSettings:Maskinporten:EncodedJwk: ${{secrets.DIALOGPORTEN_MASKINPORTEN_ENCODEDJWK}} Ed25519Keys:Primary:Kid: ${{secrets.ED25519KEYS_PRIMARY_KID}} - Ed25519Keys:Primary:PublicComponent: ${{secrets.ED25519KEYS_PRIMARY_PUBLICCOMPONENT}} + Ed25519Keys.Primary.PublicComponent: ${{secrets.ED25519KEYS_PRIMARY_PUBLICCOMPONENT}} run: dotnet test --no-build --configuration Release From 5b2fca11683216d07d6aa43eca1724b272814020 Mon Sep 17 00:00:00 2001 From: Amund Myrbostad Date: Tue, 21 Jan 2025 09:28:38 +0100 Subject: [PATCH 083/169] oi --- .github/workflows/workflow-build-and-test.yml | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/.github/workflows/workflow-build-and-test.yml b/.github/workflows/workflow-build-and-test.yml index 3d4981ab4..9992ef29f 100644 --- a/.github/workflows/workflow-build-and-test.yml +++ b/.github/workflows/workflow-build-and-test.yml @@ -24,10 +24,9 @@ jobs: - name: Test env: - DialogportenSettings:Environment: "test" DialogportenSettings:Maskinporten:ClientId: ${{secrets.DIALOGPORTEN_MASKINPORTEN_CLIENTID}} DialogportenSettings:Maskinporten:Scope: ${{secrets.DIALOGPORTEN_MASKINPORTEN_SCOPE}} DialogportenSettings:Maskinporten:EncodedJwk: ${{secrets.DIALOGPORTEN_MASKINPORTEN_ENCODEDJWK}} Ed25519Keys:Primary:Kid: ${{secrets.ED25519KEYS_PRIMARY_KID}} - Ed25519Keys.Primary.PublicComponent: ${{secrets.ED25519KEYS_PRIMARY_PUBLICCOMPONENT}} + Ed25519Keys:Primary:PublicComponent: ${{secrets.ED25519KEYS_PRIMARY_PUBLICCOMPONENT}} run: dotnet test --no-build --configuration Release From 9ca55050cac739c1bf0217ae453c1f09c3b23b34 Mon Sep 17 00:00:00 2001 From: Amund Myrbostad Date: Tue, 21 Jan 2025 09:41:23 +0100 Subject: [PATCH 084/169] Wth --- .github/workflows/workflow-build-and-test.yml | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/.github/workflows/workflow-build-and-test.yml b/.github/workflows/workflow-build-and-test.yml index 9992ef29f..5846e9838 100644 --- a/.github/workflows/workflow-build-and-test.yml +++ b/.github/workflows/workflow-build-and-test.yml @@ -24,9 +24,10 @@ jobs: - name: Test env: + DialogportenSettings:Environment: "test" DialogportenSettings:Maskinporten:ClientId: ${{secrets.DIALOGPORTEN_MASKINPORTEN_CLIENTID}} DialogportenSettings:Maskinporten:Scope: ${{secrets.DIALOGPORTEN_MASKINPORTEN_SCOPE}} DialogportenSettings:Maskinporten:EncodedJwk: ${{secrets.DIALOGPORTEN_MASKINPORTEN_ENCODEDJWK}} - Ed25519Keys:Primary:Kid: ${{secrets.ED25519KEYS_PRIMARY_KID}} - Ed25519Keys:Primary:PublicComponent: ${{secrets.ED25519KEYS_PRIMARY_PUBLICCOMPONENT}} + Ed25519Keys:Primary:Kid: "${{secrets.ED25519KEYS_PRIMARY_KID}}" + Ed25519Keys:Primary:PublicComponent: "${{secrets.ED25519KEYS_PRIMARY_PUBLICCOMPONENT}}" run: dotnet test --no-build --configuration Release From f21d71de09b32dd529f2017be714472152235c91 Mon Sep 17 00:00:00 2001 From: Amund Myrbostad Date: Tue, 21 Jan 2025 09:47:30 +0100 Subject: [PATCH 085/169] oioioi --- .../WebApiClientTests.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/Digdir.Library.Dialogporten.WebApiClient.Integration.Tests/WebApiClientTests.cs b/tests/Digdir.Library.Dialogporten.WebApiClient.Integration.Tests/WebApiClientTests.cs index ef222696f..c2561d01e 100644 --- a/tests/Digdir.Library.Dialogporten.WebApiClient.Integration.Tests/WebApiClientTests.cs +++ b/tests/Digdir.Library.Dialogporten.WebApiClient.Integration.Tests/WebApiClientTests.cs @@ -22,7 +22,7 @@ public WebApiClientFixture() services.AddSingleton(configuration); services.AddDialogportenClient(); - services.AddDialogTokenVerifer(); + // services.AddDialogTokenVerifer(); DialogportenClient = services.BuildServiceProvider().GetRequiredService(); } From 810a80905b3bcfd09cc85227631598d14eaf99f9 Mon Sep 17 00:00:00 2001 From: Are Almaas Date: Tue, 21 Jan 2025 09:51:10 +0100 Subject: [PATCH 086/169] work neow? --- .github/workflows/ci-cd-main.yml | 6 ++++++ .github/workflows/ci-cd-pull-request.yml | 6 ++++++ .github/workflows/workflow-build-and-test.yml | 11 +++++++++++ 3 files changed, 23 insertions(+) diff --git a/.github/workflows/ci-cd-main.yml b/.github/workflows/ci-cd-main.yml index 171cc60da..52f3c8a85 100644 --- a/.github/workflows/ci-cd-main.yml +++ b/.github/workflows/ci-cd-main.yml @@ -42,6 +42,12 @@ jobs: uses: ./.github/workflows/workflow-build-and-test.yml needs: [check-for-changes] if: ${{ github.event_name == 'workflow_dispatch' || needs.check-for-changes.outputs.hasBackendChanges == 'true' || needs.check-for-changes.outputs.hasTestChanges == 'true' }} + secrets: + DIALOGPORTEN_MASKINPORTEN_ENCODEDJWK: ${{ secrets.DIALOGPORTEN_MASKINPORTEN_ENCODEDJWK }} + DIALOGPORTEN_MASKINPORTEN_CLIENTID: ${{ secrets.DIALOGPORTEN_MASKINPORTEN_CLIENTID }} + DIALOGPORTEN_MASKINPORTEN_SCOPE: ${{ secrets.DIALOGPORTEN_MASKINPORTEN_SCOPE }} + ED25519KEYS_PRIMARY_KID: ${{ secrets.ED25519KEYS_PRIMARY_KID }} + ED25519KEYS_PRIMARY_PUBLICCOMPONENT: ${{ secrets.ED25519KEYS_PRIMARY_PUBLICCOMPONENT }} publish: name: Build and publish docker images diff --git a/.github/workflows/ci-cd-pull-request.yml b/.github/workflows/ci-cd-pull-request.yml index be4356c0f..4a59a3104 100644 --- a/.github/workflows/ci-cd-pull-request.yml +++ b/.github/workflows/ci-cd-pull-request.yml @@ -23,6 +23,12 @@ jobs: 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' }} + secrets: + DIALOGPORTEN_MASKINPORTEN_ENCODEDJWK: ${{ secrets.DIALOGPORTEN_MASKINPORTEN_ENCODEDJWK }} + DIALOGPORTEN_MASKINPORTEN_CLIENTID: ${{ secrets.DIALOGPORTEN_MASKINPORTEN_CLIENTID }} + DIALOGPORTEN_MASKINPORTEN_SCOPE: ${{ secrets.DIALOGPORTEN_MASKINPORTEN_SCOPE }} + ED25519KEYS_PRIMARY_KID: ${{ secrets.ED25519KEYS_PRIMARY_KID }} + ED25519KEYS_PRIMARY_PUBLICCOMPONENT: ${{ secrets.ED25519KEYS_PRIMARY_PUBLICCOMPONENT }} build-infrastructure: uses: ./.github/workflows/workflow-build-infrastructure.yml diff --git a/.github/workflows/workflow-build-and-test.yml b/.github/workflows/workflow-build-and-test.yml index 5846e9838..7881995c5 100644 --- a/.github/workflows/workflow-build-and-test.yml +++ b/.github/workflows/workflow-build-and-test.yml @@ -3,6 +3,17 @@ name: Build and test .NET on: workflow_dispatch: workflow_call: + secrets: + DIALOGPORTEN_MASKINPORTEN_ENCODEDJWK: + required: true + DIALOGPORTEN_MASKINPORTEN_CLIENTID: + required: true + DIALOGPORTEN_MASKINPORTEN_SCOPE: + required: true + ED25519KEYS_PRIMARY_KID: + required: true + ED25519KEYS_PRIMARY_PUBLICCOMPONENT: + required: true jobs: build-and-test: From e327f47996d9307f92f54c4b0eb0f6a3ea7f1e8d Mon Sep 17 00:00:00 2001 From: Amund Myrbostad Date: Tue, 21 Jan 2025 09:56:41 +0100 Subject: [PATCH 087/169] ay --- .../WebApiClientTests.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/Digdir.Library.Dialogporten.WebApiClient.Integration.Tests/WebApiClientTests.cs b/tests/Digdir.Library.Dialogporten.WebApiClient.Integration.Tests/WebApiClientTests.cs index c2561d01e..ef222696f 100644 --- a/tests/Digdir.Library.Dialogporten.WebApiClient.Integration.Tests/WebApiClientTests.cs +++ b/tests/Digdir.Library.Dialogporten.WebApiClient.Integration.Tests/WebApiClientTests.cs @@ -22,7 +22,7 @@ public WebApiClientFixture() services.AddSingleton(configuration); services.AddDialogportenClient(); - // services.AddDialogTokenVerifer(); + services.AddDialogTokenVerifer(); DialogportenClient = services.BuildServiceProvider().GetRequiredService(); } From 837b133c4a72b7120c7dd027cebd75311895b8d4 Mon Sep 17 00:00:00 2001 From: Amund Myrbostad Date: Tue, 21 Jan 2025 10:05:50 +0100 Subject: [PATCH 088/169] Update tests --- .../WebApiClientTests.cs | 48 ++++++++++++------- 1 file changed, 32 insertions(+), 16 deletions(-) diff --git a/tests/Digdir.Library.Dialogporten.WebApiClient.Integration.Tests/WebApiClientTests.cs b/tests/Digdir.Library.Dialogporten.WebApiClient.Integration.Tests/WebApiClientTests.cs index ef222696f..c24b212d4 100644 --- a/tests/Digdir.Library.Dialogporten.WebApiClient.Integration.Tests/WebApiClientTests.cs +++ b/tests/Digdir.Library.Dialogporten.WebApiClient.Integration.Tests/WebApiClientTests.cs @@ -35,7 +35,6 @@ public void Dispose() public class WebApiClientTests(WebApiClientFixture fixture) : IClassFixture, IDisposable { - private readonly List _dialogIds = []; [Fact] public async Task Create_Invalid_Dialog_Returns_400() { @@ -74,7 +73,6 @@ public async Task Patch_Invalid_Dialog_Returns_400() { var createDialogCommand = CreateCommand(); var dialogId = await CreateDialog(createDialogCommand); - _dialogIds.Add(dialogId); List patchDocument = [ @@ -88,13 +86,15 @@ public async Task Patch_Invalid_Dialog_Returns_400() ]; var patchResponse = await fixture.DialogportenClient.V1ServiceOwnerDialogsPatchDialog(dialogId, patchDocument, null, CancellationToken.None); Assert.Equal(HttpStatusCode.BadRequest, patchResponse.StatusCode); + + var purgeResponse = await fixture.DialogportenClient.V1ServiceOwnerDialogsPurgePurgeDialog(dialogId, null); + Assert.Equal(HttpStatusCode.NoContent, purgeResponse.StatusCode); } [Fact] public async Task Patch_Dialog_Returns_204() { var createDialogCommand = CreateCommand(); var dialogId = await CreateDialog(createDialogCommand); - _dialogIds.Add(dialogId); List patchDocument = [ @@ -113,6 +113,9 @@ public async Task Patch_Dialog_Returns_204() Assert.Equal(HttpStatusCode.OK, getResponse.StatusCode); Assert.Equal(50, getResponse.Content!.Progress); + + var purgeResponse = await fixture.DialogportenClient.V1ServiceOwnerDialogsPurgePurgeDialog(dialogId, null); + Assert.Equal(HttpStatusCode.NoContent, purgeResponse.StatusCode); } [Fact] @@ -124,26 +127,29 @@ public async Task Get_Dialog_Returns_200() var getResponse = await fixture.DialogportenClient.V1ServiceOwnerDialogsGetGetDialog(dialogId, null!, CancellationToken.None); Assert.Equal(HttpStatusCode.OK, getResponse.StatusCode); - _dialogIds.Add(dialogId); + + var purgeResponse = await fixture.DialogportenClient.V1ServiceOwnerDialogsPurgePurgeDialog(dialogId, null); + Assert.Equal(HttpStatusCode.NoContent, purgeResponse.StatusCode); } [Fact] public async Task Update_Invalid_Dialog_Returns_400() { var createDialogCommand = CreateCommand(); var dialogId = await CreateDialog(createDialogCommand); - _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); + + var purgeResponse = await fixture.DialogportenClient.V1ServiceOwnerDialogsPurgePurgeDialog(dialogId, null); + Assert.Equal(HttpStatusCode.NoContent, purgeResponse.StatusCode); } [Fact] public async Task Update_Dialog_Returns_204() { var createDialogCommand = CreateCommand(); var dialogId = await CreateDialog(createDialogCommand); - _dialogIds.Add(dialogId); var updateDialogCommand = UpdateCommand(); var updateResponse = await fixture.DialogportenClient.V1ServiceOwnerDialogsUpdateDialog(dialogId, updateDialogCommand, null!, CancellationToken.None); @@ -152,6 +158,10 @@ public async Task Update_Dialog_Returns_204() var getResponse = await fixture.DialogportenClient.V1ServiceOwnerDialogsGetGetDialog(dialogId, null!); Assert.Equal(HttpStatusCode.OK, getResponse.StatusCode); Assert.Equal(updateDialogCommand.Progress, getResponse.Content!.Progress); + + + var purgeResponse = await fixture.DialogportenClient.V1ServiceOwnerDialogsPurgePurgeDialog(dialogId, null); + Assert.Equal(HttpStatusCode.NoContent, purgeResponse.StatusCode); } [Fact] public async Task Search_Dialog_Returns_200() @@ -160,7 +170,6 @@ public async Task Search_Dialog_Returns_200() var dateOffset = DateTimeOffset.UtcNow; var createDialogCommand = CreateCommand(); var dialogId = await CreateDialog(createDialogCommand); - _dialogIds.Add(dialogId); var param = new V1ServiceOwnerDialogsSearchSearchDialogQueryParams { CreatedAfter = dateOffset @@ -170,6 +179,8 @@ public async Task Search_Dialog_Returns_200() Assert.NotNull(searchResponse.Content); Assert.Single(searchResponse.Content!.Items); + var purgeResponse = await fixture.DialogportenClient.V1ServiceOwnerDialogsPurgePurgeDialog(dialogId, null); + Assert.Equal(HttpStatusCode.NoContent, purgeResponse.StatusCode); } [Fact] @@ -177,11 +188,12 @@ public async Task Search_Multiple_Dialogs() { var dateOffset = DateTime.UtcNow; var dialogsCreated = 5; + var dialogIds = new List(); for (var i = 0; i < dialogsCreated; i++) { var createDialogCommand = CreateCommand(); var dialogId = await CreateDialog(createDialogCommand); - _dialogIds.Add(dialogId); + dialogIds.Add(dialogId); } var param = new V1ServiceOwnerDialogsSearchSearchDialogQueryParams { @@ -191,6 +203,11 @@ public async Task Search_Multiple_Dialogs() Assert.Equal(HttpStatusCode.OK, searchResponse.StatusCode); Assert.NotNull(searchResponse.Content); Assert.Equal(dialogsCreated, searchResponse.Content!.Items.Count); + for (var i = 0; i < dialogsCreated; i++) + { + var purgeResponse = await fixture.DialogportenClient.V1ServiceOwnerDialogsPurgePurgeDialog(dialogIds[i], null); + Assert.Equal(HttpStatusCode.NoContent, purgeResponse.StatusCode); + } } [Fact] @@ -198,7 +215,6 @@ public async Task Delete_Dialog_Returns_204() { var createDialogCommand = CreateCommand(); var dialogId = await CreateDialog(createDialogCommand); - _dialogIds.Add(dialogId); var deleteResponse = await fixture.DialogportenClient.V1ServiceOwnerDialogsDeleteDialog(dialogId, null); Assert.Equal(HttpStatusCode.NoContent, deleteResponse.StatusCode); @@ -207,6 +223,8 @@ public async Task Delete_Dialog_Returns_204() Assert.Equal(HttpStatusCode.OK, getResponse.StatusCode); Assert.NotNull(getResponse.Content!.DeletedAt); + var purgeResponse = await fixture.DialogportenClient.V1ServiceOwnerDialogsPurgePurgeDialog(dialogId, null); + Assert.Equal(HttpStatusCode.NoContent, purgeResponse.StatusCode); } [Fact] @@ -216,7 +234,6 @@ 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 = [], @@ -256,6 +273,10 @@ public async Task Create_Dialog_Transmission_returns_201() var transmissionResponse = await fixture.DialogportenClient.V1ServiceOwnerDialogTransmissionsCreateDialogTransmission(dialogId, createTransmission, null!); Assert.Equal(HttpStatusCode.Created, transmissionResponse.StatusCode); + + var purgeResponse = await fixture.DialogportenClient.V1ServiceOwnerDialogsPurgePurgeDialog(dialogId, null); + Assert.Equal(HttpStatusCode.NoContent, purgeResponse.StatusCode); + } private static V1ServiceOwnerDialogsCommandsUpdate_Dialog UpdateCommand() { @@ -531,13 +552,8 @@ private static V1ServiceOwnerDialogsCommandsCreate_DialogCommand CreateCommand() return createDialogCommand; } - public async void Dispose() + public void Dispose() { - foreach (var dialogId in _dialogIds) - { - var purgeResponse = await fixture.DialogportenClient.V1ServiceOwnerDialogsPurgePurgeDialog(dialogId, null!); - Assert.True(purgeResponse.IsSuccessStatusCode); - } GC.SuppressFinalize(this); } } From 156d3da1824430065fcb0e0359e44c0cfa732d61 Mon Sep 17 00:00:00 2001 From: Amund Myrbostad Date: Tue, 21 Jan 2025 10:14:54 +0100 Subject: [PATCH 089/169] Updated tests --- .../WebApiClientTests.cs | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/tests/Digdir.Library.Dialogporten.WebApiClient.Integration.Tests/WebApiClientTests.cs b/tests/Digdir.Library.Dialogporten.WebApiClient.Integration.Tests/WebApiClientTests.cs index c24b212d4..6cd417b41 100644 --- a/tests/Digdir.Library.Dialogporten.WebApiClient.Integration.Tests/WebApiClientTests.cs +++ b/tests/Digdir.Library.Dialogporten.WebApiClient.Integration.Tests/WebApiClientTests.cs @@ -169,10 +169,12 @@ public async Task Search_Dialog_Returns_200() var dateOffset = DateTimeOffset.UtcNow; var createDialogCommand = CreateCommand(); + createDialogCommand.SystemLabel = DialogEndUserContextsEntities_SystemLabel.Bin; var dialogId = await CreateDialog(createDialogCommand); var param = new V1ServiceOwnerDialogsSearchSearchDialogQueryParams { - CreatedAfter = dateOffset + CreatedAfter = dateOffset, + SystemLabel = [DialogEndUserContextsEntities_SystemLabel.Bin] }; var searchResponse = await fixture.DialogportenClient.V1ServiceOwnerDialogsSearchSearchDialog(param, CancellationToken.None); Assert.Equal(HttpStatusCode.OK, searchResponse.StatusCode); @@ -197,7 +199,8 @@ public async Task Search_Multiple_Dialogs() } var param = new V1ServiceOwnerDialogsSearchSearchDialogQueryParams { - CreatedAfter = dateOffset + CreatedAfter = dateOffset, + SystemLabel = [DialogEndUserContextsEntities_SystemLabel.Default] }; var searchResponse = await fixture.DialogportenClient.V1ServiceOwnerDialogsSearchSearchDialog(param, CancellationToken.None); Assert.Equal(HttpStatusCode.OK, searchResponse.StatusCode); From 741833a5193cf398fe7bf85880371d35d375da0b Mon Sep 17 00:00:00 2001 From: Amund Myrbostad Date: Tue, 21 Jan 2025 10:20:57 +0100 Subject: [PATCH 090/169] Updated tests again --- .../WebApiClientTests.cs | 3 --- 1 file changed, 3 deletions(-) diff --git a/tests/Digdir.Library.Dialogporten.WebApiClient.Integration.Tests/WebApiClientTests.cs b/tests/Digdir.Library.Dialogporten.WebApiClient.Integration.Tests/WebApiClientTests.cs index 6cd417b41..bda9b3655 100644 --- a/tests/Digdir.Library.Dialogporten.WebApiClient.Integration.Tests/WebApiClientTests.cs +++ b/tests/Digdir.Library.Dialogporten.WebApiClient.Integration.Tests/WebApiClientTests.cs @@ -159,7 +159,6 @@ public async Task Update_Dialog_Returns_204() Assert.Equal(HttpStatusCode.OK, getResponse.StatusCode); Assert.Equal(updateDialogCommand.Progress, getResponse.Content!.Progress); - var purgeResponse = await fixture.DialogportenClient.V1ServiceOwnerDialogsPurgePurgeDialog(dialogId, null); Assert.Equal(HttpStatusCode.NoContent, purgeResponse.StatusCode); } @@ -398,7 +397,6 @@ private static V1ServiceOwnerDialogsCommandsUpdate_Dialog UpdateCommand() } private static V1ServiceOwnerDialogsCommandsCreate_DialogCommand CreateCommand() { - var now = DateTimeOffset.UtcNow; var createDialogCommand = new V1ServiceOwnerDialogsCommandsCreate_DialogCommand { GuiActions = [], @@ -406,7 +404,6 @@ private static V1ServiceOwnerDialogsCommandsCreate_DialogCommand CreateCommand() [ new V1ServiceOwnerDialogsCommandsCreate_Activity { - CreatedAt = now, Description = [ new V1CommonLocalizations_Localization From 4dfbf7699ed70c5c7bf70b2a0beafda59167c83f Mon Sep 17 00:00:00 2001 From: Amund Myrbostad Date: Tue, 21 Jan 2025 10:29:06 +0100 Subject: [PATCH 091/169] gm --- .../WebApiClientTests.cs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/tests/Digdir.Library.Dialogporten.WebApiClient.Integration.Tests/WebApiClientTests.cs b/tests/Digdir.Library.Dialogporten.WebApiClient.Integration.Tests/WebApiClientTests.cs index bda9b3655..6a6a4e1b7 100644 --- a/tests/Digdir.Library.Dialogporten.WebApiClient.Integration.Tests/WebApiClientTests.cs +++ b/tests/Digdir.Library.Dialogporten.WebApiClient.Integration.Tests/WebApiClientTests.cs @@ -193,13 +193,14 @@ public async Task Search_Multiple_Dialogs() for (var i = 0; i < dialogsCreated; i++) { var createDialogCommand = CreateCommand(); + createDialogCommand.SystemLabel = DialogEndUserContextsEntities_SystemLabel.Archive; var dialogId = await CreateDialog(createDialogCommand); dialogIds.Add(dialogId); } var param = new V1ServiceOwnerDialogsSearchSearchDialogQueryParams { CreatedAfter = dateOffset, - SystemLabel = [DialogEndUserContextsEntities_SystemLabel.Default] + SystemLabel = [DialogEndUserContextsEntities_SystemLabel.Archive] }; var searchResponse = await fixture.DialogportenClient.V1ServiceOwnerDialogsSearchSearchDialog(param, CancellationToken.None); Assert.Equal(HttpStatusCode.OK, searchResponse.StatusCode); From 00254683a261d7ce5a7c352255601b2da7cf0f47 Mon Sep 17 00:00:00 2001 From: Amund Myrbostad Date: Tue, 21 Jan 2025 10:59:19 +0100 Subject: [PATCH 092/169] WebApiClient Cleanup --- .../Extensions/ServiceCollectionExtensions.cs | 4 +--- .../Interfaces/IIdentifiable.cs | 7 ------- .../Services/DialogTokenVerifier.cs | 14 ++++++++------ 3 files changed, 9 insertions(+), 16 deletions(-) delete mode 100644 src/Digdir.Library.Dialogporten.WebApiClient/Interfaces/IIdentifiable.cs diff --git a/src/Digdir.Library.Dialogporten.WebApiClient/Extensions/ServiceCollectionExtensions.cs b/src/Digdir.Library.Dialogporten.WebApiClient/Extensions/ServiceCollectionExtensions.cs index 209651c83..56968e5fe 100644 --- a/src/Digdir.Library.Dialogporten.WebApiClient/Extensions/ServiceCollectionExtensions.cs +++ b/src/Digdir.Library.Dialogporten.WebApiClient/Extensions/ServiceCollectionExtensions.cs @@ -9,7 +9,6 @@ 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; @@ -37,7 +36,6 @@ public static IServiceCollection AddDialogportenClient(this IServiceCollection s .GetSection("DialogportenSettings") .Get(); - Console.WriteLine(dialogportenSettings); var maskinportenSettings = new MaskinportenSettings() { EncodedJwk = dialogportenSettings!.Maskinporten.EncodedJwk, @@ -49,7 +47,7 @@ public static IServiceCollection AddDialogportenClient(this IServiceCollection s "test" => "test", _ => throw new ArgumentException() }, - Scope = dialogportenSettings.Maskinporten.Scope, + Scope = dialogportenSettings.Maskinporten.Scope }; services.RegisterMaskinportenClientDefinition("dialogporten-sp-sdk", maskinportenSettings); diff --git a/src/Digdir.Library.Dialogporten.WebApiClient/Interfaces/IIdentifiable.cs b/src/Digdir.Library.Dialogporten.WebApiClient/Interfaces/IIdentifiable.cs deleted file mode 100644 index 20c0107a3..000000000 --- a/src/Digdir.Library.Dialogporten.WebApiClient/Interfaces/IIdentifiable.cs +++ /dev/null @@ -1,7 +0,0 @@ -namespace Digdir.Library.Dialogporten.WebApiClient.Interfaces; - -public interface IIdentifiable -{ - Guid Id { get; } - Guid RevisionId { get; } -} diff --git a/src/Digdir.Library.Dialogporten.WebApiClient/Services/DialogTokenVerifier.cs b/src/Digdir.Library.Dialogporten.WebApiClient/Services/DialogTokenVerifier.cs index f4aa1ffd8..2f03d547d 100644 --- a/src/Digdir.Library.Dialogporten.WebApiClient/Services/DialogTokenVerifier.cs +++ b/src/Digdir.Library.Dialogporten.WebApiClient/Services/DialogTokenVerifier.cs @@ -10,19 +10,21 @@ public sealed class DialogTokenVerifier(string kid, PublicKey publicKey) public bool Verify(string token) { var parts = token.Split('.'); - if (parts.Length != 3) return false; + if (parts.Length != 3) + { + return false; + } var header = Base64Url.DecodeFromChars(parts[0]); var headerJson = JsonSerializer.Deserialize(header); - if (headerJson.TryGetProperty("kid", out var value)) - { - if (value.GetString() != kid) return false; - } - else + + if (!headerJson.TryGetProperty("kid", out var value) && value.GetString() != kid) { return false; } + var signature = Base64Url.DecodeFromChars(parts[2]); + return SignatureAlgorithm.Ed25519.Verify(publicKey, Encoding.UTF8.GetBytes(parts[0] + '.' + parts[1]), signature); } From febc391dfb63d32ece4fb9e3f4d922dda45ad1db Mon Sep 17 00:00:00 2001 From: Amund Myrbostad Date: Tue, 21 Jan 2025 12:46:25 +0100 Subject: [PATCH 093/169] Sample cleanup --- .../Program.cs | 21 ++++-------- ...r.Library.Dialogporten.WebApiClient.csproj | 1 - .../README.md | 34 ++++++++++--------- 3 files changed, 24 insertions(+), 32 deletions(-) diff --git a/src/Digdir.Library.Dialogporten.WebApiClient.Sample/Program.cs b/src/Digdir.Library.Dialogporten.WebApiClient.Sample/Program.cs index 19a361d1d..df5ed812d 100644 --- a/src/Digdir.Library.Dialogporten.WebApiClient.Sample/Program.cs +++ b/src/Digdir.Library.Dialogporten.WebApiClient.Sample/Program.cs @@ -24,7 +24,6 @@ var dialogportenClient = serviceProvider.GetRequiredService(); -var dialogs = new Dialogs(dialogportenClient); var verifier = serviceProvider.GetRequiredService(); // Usage @@ -38,25 +37,16 @@ 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); -} -else -{ - Console.WriteLine(response.StatusCode); -} -Debug.Assert(response.Content != null, "response.Content != null"); +Console.WriteLine(response.StatusCode); +Console.WriteLine(response.Content); Console.WriteLine("== End Create Dialog =="); // Get single dialog SO Console.WriteLine("==Start Get Single Dialog=="); -var guid = Guid.Parse(response.Content.Replace("\"", "").Trim()); +var guid = Guid.Parse(response.Content!.Replace("\"", "").Trim()); var dialog = dialogportenClient.V1ServiceOwnerDialogsGetGetDialog(guid, null!).Result.Content; Debug.Assert(dialog != null, nameof(dialog) + " != null"); Dialogs.PrintGetDialog(dialog); @@ -107,7 +97,6 @@ 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"); Dialogs.PrintGetDialog(dialog); @@ -120,7 +109,9 @@ Console.WriteLine("== Start Purge Dialog == "); -var purgeResponse = await dialogs.Purge(guid, dialog.Revision); +var purgeResponse = await dialogportenClient.V1ServiceOwnerDialogsPurgePurgeDialog(guid, dialog.Revision); +Console.WriteLine($"Purge response status code: {response.StatusCode}"); +Console.WriteLine($"Purge Response: {response.StatusCode}"); Console.WriteLine($"Purge response status code: {purgeResponse.StatusCode}"); if (purgeResponse.IsSuccessStatusCode) 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 75b302c68..8c002df95 100644 --- a/src/Digdir.Library.Dialogporten.WebApiClient/Digdir.Library.Dialogporten.WebApiClient.csproj +++ b/src/Digdir.Library.Dialogporten.WebApiClient/Digdir.Library.Dialogporten.WebApiClient.csproj @@ -4,7 +4,6 @@ enable enable README.md - Link to release notes. LICENSE Digitaliseringsdirektoratet digdir;altinn;dialogporten diff --git a/src/Digdir.Library.Dialogporten.WebApiClient/README.md b/src/Digdir.Library.Dialogporten.WebApiClient/README.md index 33ab21fa0..8e78b8a3a 100644 --- a/src/Digdir.Library.Dialogporten.WebApiClient/README.md +++ b/src/Digdir.Library.Dialogporten.WebApiClient/README.md @@ -27,31 +27,33 @@ services.AddSingleton(configuration); services.AddDialogportenClient(); services.AddDialogTokenVerifer(); + var dialogportenClient = serviceProvider.GetRequiredService(); +var verifier = serviceProvider.GetRequiredService(); ``` AppSettings ```JSON { - "DialogportenSettings": { - "Environment": "", - "Maskinporten": { - "ClientId": "", - "Scope": "", - "EncodedJwk": "" - } - }, - "Ed25519Keys": { - "Primary": { - "Kid": "", - "PublicComponent": "" + "DialogportenSettings": { + "Environment": "", + "Maskinporten": { + "ClientId": "", + "Scope": "", + "EncodedJwk": "" + } }, - "Secondary": { - "Kid": "", - "PublicComponent": "" + "Ed25519Keys": { + "Primary": { + "Kid": "", + "PublicComponent": "" + }, + "Secondary": { + "Kid": "", + "PublicComponent": "" + } } - } } ``` From 377cef152cc6a869e239e41809cb69bb4a183839 Mon Sep 17 00:00:00 2001 From: Amund Myrbostad Date: Tue, 21 Jan 2025 12:51:48 +0100 Subject: [PATCH 094/169] m --- src/Digdir.Library.Dialogporten.WebApiClient/README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Digdir.Library.Dialogporten.WebApiClient/README.md b/src/Digdir.Library.Dialogporten.WebApiClient/README.md index 8e78b8a3a..5b6b4cf1b 100644 --- a/src/Digdir.Library.Dialogporten.WebApiClient/README.md +++ b/src/Digdir.Library.Dialogporten.WebApiClient/README.md @@ -1,6 +1,6 @@ # SO SDK -Simple overview +Simple overview Refit-based client SDK Based on https://github.com/altinn/altinn-apiclient-maskinporten The refit-Interface is autogenerated with refitter. It uses OperationId to create method names. From 024e3cb0b936d4d01531721f11089338440224e8 Mon Sep 17 00:00:00 2001 From: Amund Myrbostad Date: Tue, 21 Jan 2025 13:20:13 +0100 Subject: [PATCH 095/169] Updated RefitterInterface --- .../Program.cs | 4 +- .../Features/V1/RefitterInterface.verified.cs | 4 +- .../WebApiClientTests.cs | 7 +- .../refitter/RefitterInterface.cs | 4230 ----------------- 4 files changed, 7 insertions(+), 4238 deletions(-) delete mode 100644 tests/Digdir.Library.Dialogporten.WebApiClient.Integration.Tests/refitter/RefitterInterface.cs diff --git a/src/Digdir.Library.Dialogporten.WebApiClient.Sample/Program.cs b/src/Digdir.Library.Dialogporten.WebApiClient.Sample/Program.cs index df5ed812d..57a910fa3 100644 --- a/src/Digdir.Library.Dialogporten.WebApiClient.Sample/Program.cs +++ b/src/Digdir.Library.Dialogporten.WebApiClient.Sample/Program.cs @@ -122,9 +122,9 @@ Console.WriteLine("== End Purge Dialog =="); return; -static V1ServiceOwnerDialogsCommandsCreate_DialogCommand CreateCommand() +static V1ServiceOwnerDialogsCommandsCreate_Dialog CreateCommand() { - return new V1ServiceOwnerDialogsCommandsCreate_DialogCommand + return new V1ServiceOwnerDialogsCommandsCreate_Dialog { Activities = [], ApiActions = [], 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 b26d8f2af..af7c0ca3c 100644 --- a/src/Digdir.Library.Dialogporten.WebApiClient/Features/V1/RefitterInterface.verified.cs +++ b/src/Digdir.Library.Dialogporten.WebApiClient/Features/V1/RefitterInterface.verified.cs @@ -236,7 +236,7 @@ public partial interface IServiceownerApi /// [Headers("Accept: application/json, application/problem+json")] [Post("/api/v1/serviceowner/dialogs")] - Task> V1ServiceOwnerDialogsCreateDialog([Body, AliasAs("CreateDialogCommand")] V1ServiceOwnerDialogsCommandsCreate_DialogCommand createDialogCommand, CancellationToken cancellationToken = default); + Task> V1ServiceOwnerDialogsCreateDialog([Body] V1ServiceOwnerDialogsCommandsCreate_Dialog dto, CancellationToken cancellationToken = default); /// Deletes a dialog /// @@ -1644,7 +1644,7 @@ public partial class V1ServiceOwnerDialogsCommandsCreate_Content } [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 + public partial class V1ServiceOwnerDialogsCommandsCreate_Dialog { /// /// An immutable list of activities associated with the dialog. diff --git a/tests/Digdir.Library.Dialogporten.WebApiClient.Integration.Tests/WebApiClientTests.cs b/tests/Digdir.Library.Dialogporten.WebApiClient.Integration.Tests/WebApiClientTests.cs index 6a6a4e1b7..6981e8f89 100644 --- a/tests/Digdir.Library.Dialogporten.WebApiClient.Integration.Tests/WebApiClientTests.cs +++ b/tests/Digdir.Library.Dialogporten.WebApiClient.Integration.Tests/WebApiClientTests.cs @@ -1,5 +1,4 @@ using System.Net; -using Digdir.Library.Dialogporten.WebApiClient.Config; using Digdir.Library.Dialogporten.WebApiClient.Extensions; using Digdir.Library.Dialogporten.WebApiClient.Features.V1; using Microsoft.Extensions.Configuration; @@ -57,7 +56,7 @@ public async Task Purge_Dialog_Returns_204() var getResponse = await fixture.DialogportenClient.V1ServiceOwnerDialogsGetGetDialog(dialogId, null!, CancellationToken.None); Assert.Equal(HttpStatusCode.NotFound, getResponse.StatusCode); } - private async Task CreateDialog(V1ServiceOwnerDialogsCommandsCreate_DialogCommand createDialogCommand) + private async Task CreateDialog(V1ServiceOwnerDialogsCommandsCreate_Dialog createDialogCommand) { var createResponse = await fixture.DialogportenClient.V1ServiceOwnerDialogsCreateDialog(createDialogCommand); @@ -396,9 +395,9 @@ private static V1ServiceOwnerDialogsCommandsUpdate_Dialog UpdateCommand() }; return createDialogCommand; } - private static V1ServiceOwnerDialogsCommandsCreate_DialogCommand CreateCommand() + private static V1ServiceOwnerDialogsCommandsCreate_Dialog CreateCommand() { - var createDialogCommand = new V1ServiceOwnerDialogsCommandsCreate_DialogCommand + var createDialogCommand = new V1ServiceOwnerDialogsCommandsCreate_Dialog { GuiActions = [], Activities = 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 d3091bca5..000000000 --- a/tests/Digdir.Library.Dialogporten.WebApiClient.Integration.Tests/refitter/RefitterInterface.cs +++ /dev/null @@ -1,4230 +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(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")] - public System.DateTimeOffset? CreatedBefore { get; set; } - - /// - /// Only return dialogs updated after this date - /// - [Query(Format = "yyyy-MM-ddTHH:mm:ssZ")] - public System.DateTimeOffset? UpdatedAfter { get; set; } - - /// - /// Only return dialogs updated before this date - /// - [Query(Format = "yyyy-MM-ddTHH:mm:ssZ")] - public System.DateTimeOffset? UpdatedBefore { get; set; } - - /// - /// Only return dialogs with due date after this date - /// - [Query(Format = "yyyy-MM-ddTHH:mm:ssZ")] - public System.DateTimeOffset? DueAfter { get; set; } - - /// - /// Only return dialogs with due date before this date - /// - [Query(Format = "yyyy-MM-ddTHH:mm:ssZ")] - public System.DateTimeOffset? DueBefore { get; set; } - - /// - /// Only return dialogs with visible-from date after this date - /// - [Query(Format = "yyyy-MM-ddTHH:mm:ssZ")] - public System.DateTimeOffset? VisibleAfter { get; set; } - - /// - /// Only return dialogs with visible-from date before this date - /// - [Query(Format = "yyyy-MM-ddTHH:mm:ssZ")] - 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. 'nb', '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.5.0.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/altinn/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 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. - /// - /// - /// 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. - /// - /// - /// 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 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. - /// - /// - /// 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. - /// - /// - /// - [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. - /// - /// - /// 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. - /// - /// - /// 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 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. - /// - /// - /// 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. - /// - /// - /// 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. - /// - /// - /// 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. - /// - /// - /// 410 - /// Entity with the given key(s) is removed. - /// - /// - /// - [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 - /// 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")] - [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 - /// 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")] - [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. - /// - /// - /// 410 - /// Entity with the given key(s) is removed. - /// - /// - /// - [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 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. - /// - /// - /// 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. - /// - /// - /// 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. - /// - /// - /// 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. - /// - /// - /// 410 - /// Entity with the given key(s) is removed. - /// - /// - /// - [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.Runtime.Serialization.EnumMember(Value = @"DialogDeleted")] - DialogDeleted = 7, - - [System.Runtime.Serialization.EnumMember(Value = @"DialogRestored")] - DialogRestored = 8, - - [System.Runtime.Serialization.EnumMember(Value = @"SentToSigning")] - SentToSigning = 9, - - [System.Runtime.Serialization.EnumMember(Value = @"SentToFormFill")] - SentToFormFill = 10, - - [System.Runtime.Serialization.EnumMember(Value = @"SentToSendIn")] - SentToSendIn = 11, - - [System.Runtime.Serialization.EnumMember(Value = @"SentToPayment")] - SentToPayment = 12, - - } - - [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, this can also indicate that the content is embeddable. - ///
For a list of supported media types, see (link TBD). - ///
- - [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; } - - /// - /// A self-defined UUIDv7 may be provided to support idempotent creation of Api Actions. If not provided, a new UUIDv7 will be generated. - /// - - [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 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; } - - /// - /// A self-defined UUIDv7 may be provided to support idempotent creation of 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_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; } - - /// - /// A self-defined UUIDv7 may be provided to support idempotent creation of Gui Actions. If not provided, a new UUIDv7 will be generated. - /// - - [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 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 self-defined UUIDv7 may be provided to support idempotent additions of Api Actions. If not provided, a new UUIDv7 will be generated. - /// - - [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 self-defined UUIDv7 may be provided to support idempotent additions of 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_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 self-defined UUIDv7 may be provided to support idempotent additions of Gui Actions. If not provided, a new UUIDv7 will be generated. - /// - - [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 additions 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 44842d92494061ae720ecf9b8052c0f6d110e7eb Mon Sep 17 00:00:00 2001 From: Amund Myrbostad Date: Thu, 23 Jan 2025 09:11:41 +0100 Subject: [PATCH 096/169] Build testing --- .../Digdir.Domain.Dialogporten.WebApi.csproj | 57 ++++++++++++------- .../.refitter | 18 ++++++ ...r.Library.Dialogporten.WebApiClient.csproj | 6 +- ...rten.WebApiClient.Integration.Tests.csproj | 3 +- 4 files changed, 59 insertions(+), 25 deletions(-) create mode 100644 src/Digdir.Library.Dialogporten.WebApiClient/.refitter diff --git a/src/Digdir.Domain.Dialogporten.WebApi/Digdir.Domain.Dialogporten.WebApi.csproj b/src/Digdir.Domain.Dialogporten.WebApi/Digdir.Domain.Dialogporten.WebApi.csproj index d06d3cd74..4759c990f 100644 --- a/src/Digdir.Domain.Dialogporten.WebApi/Digdir.Domain.Dialogporten.WebApi.csproj +++ b/src/Digdir.Domain.Dialogporten.WebApi/Digdir.Domain.Dialogporten.WebApi.csproj @@ -6,33 +6,46 @@ 1591 + + OnBuildSuccess + - + - - - - - - - - - - - - - - - - - + + + + + + + all + runtime; build; native; contentfiles; analyzers; buildtransitive + + + + + + + + + + + + + + - - - - + + + + + + + + + diff --git a/src/Digdir.Library.Dialogporten.WebApiClient/.refitter b/src/Digdir.Library.Dialogporten.WebApiClient/.refitter new file mode 100644 index 000000000..f5cc28633 --- /dev/null +++ b/src/Digdir.Library.Dialogporten.WebApiClient/.refitter @@ -0,0 +1,18 @@ +{ + "openApiPath": "../../docs/schema/V1/swagger.verified.json", + "namespace": "Digdir.Library.Dialogporten.WebApiClient.Features.V1", + "outputFolder": "Features/V1", + "operationNameGenerator": "SingleClientFromOperationId", + "trimUnusedSchema": true, + "multipleInterfaces": "ByTag", + "includeTags": [ + "Serviceowner" + ], + "useCancellationTokens": true, + "returnIApiResponse": true, + "useDynamicQuerystringParameters": true, + "outputFilename": "RefitterInterface.cs", + "codeGeneratorSettings": { + "dateFormat": "yyyy-MM-ddTHH:mm:ssZ" + } +} 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 8c002df95..ce261110f 100644 --- a/src/Digdir.Library.Dialogporten.WebApiClient/Digdir.Library.Dialogporten.WebApiClient.csproj +++ b/src/Digdir.Library.Dialogporten.WebApiClient/Digdir.Library.Dialogporten.WebApiClient.csproj @@ -20,10 +20,14 @@ + + + all + runtime; build; native; contentfiles; analyzers; buildtransitive + - 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 a23617e85..7233bdbeb 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 @@ -8,8 +8,7 @@ - - + From 199607c8014f8ddcfecd9ffbf4d733c20efe14ca Mon Sep 17 00:00:00 2001 From: Amund Myrbostad Date: Thu, 23 Jan 2025 10:16:31 +0100 Subject: [PATCH 097/169] test --- .../Digdir.Domain.Dialogporten.WebApi.csproj | 15 +- .../Program.cs | 37 +- .../nswag.json | 25 + .../swagger.json | 6985 +++++++++++++++++ .../.refitter | 2 +- ...r.Library.Dialogporten.WebApiClient.csproj | 6 +- ...rface.verified.cs => RefitterInterface.cs} | 3906 ++++----- 7 files changed, 9009 insertions(+), 1967 deletions(-) create mode 100644 src/Digdir.Domain.Dialogporten.WebApi/nswag.json create mode 100644 src/Digdir.Domain.Dialogporten.WebApi/swagger.json rename src/Digdir.Library.Dialogporten.WebApiClient/Features/V1/{RefitterInterface.verified.cs => RefitterInterface.cs} (99%) diff --git a/src/Digdir.Domain.Dialogporten.WebApi/Digdir.Domain.Dialogporten.WebApi.csproj b/src/Digdir.Domain.Dialogporten.WebApi/Digdir.Domain.Dialogporten.WebApi.csproj index 4759c990f..1ca9519e4 100644 --- a/src/Digdir.Domain.Dialogporten.WebApi/Digdir.Domain.Dialogporten.WebApi.csproj +++ b/src/Digdir.Domain.Dialogporten.WebApi/Digdir.Domain.Dialogporten.WebApi.csproj @@ -43,9 +43,18 @@ - - - + + + + + + + + + + + + diff --git a/src/Digdir.Domain.Dialogporten.WebApi/Program.cs b/src/Digdir.Domain.Dialogporten.WebApi/Program.cs index 2c2de6730..17b1790b3 100644 --- a/src/Digdir.Domain.Dialogporten.WebApi/Program.cs +++ b/src/Digdir.Domain.Dialogporten.WebApi/Program.cs @@ -85,8 +85,8 @@ static void BuildAndRun(string[] args) // Clean architecture projects .AddApplication(builder.Configuration, builder.Environment) .AddInfrastructure(builder.Configuration, builder.Environment) - .WithPubCapabilities() - .Build() + .WithPubCapabilities() + .Build() // Asp infrastructure .AddExceptionHandler() @@ -122,8 +122,8 @@ static void BuildAndRun(string[] args) }; }) .AddControllers(options => options.InputFormatters.Insert(0, JsonPatchInputFormatter.Get())) - .AddNewtonsoftJson() - .Services + .AddNewtonsoftJson() + .Services // Add health checks with the retrieved URLs .AddAspNetHealthChecks((x, y) => x.HealthCheckSettings.HttpGetEndpointsToCheck = y .GetRequiredService>().Value? @@ -147,7 +147,6 @@ static void BuildAndRun(string[] args) } var app = builder.Build(); - app.MapAspNetHealthChecks() .MapControllers(); @@ -178,7 +177,10 @@ static void BuildAndRun(string[] args) // Do not serialize empty collections x.Serializer.Options.TypeInfoResolver = new DefaultJsonTypeInfoResolver { - Modifiers = { IgnoreEmptyCollections } + Modifiers = + { + IgnoreEmptyCollections + } }; x.Serializer.Options.Converters.Add(new JsonStringEnumConverter()); x.Serializer.Options.Converters.Add(new UtcDateTimeOffsetConverter()); @@ -198,7 +200,10 @@ static void BuildAndRun(string[] args) .ToString(); document.Servers.Clear(); - document.Servers.Add(new OpenApiServer { Url = dialogportenBaseUri }); + document.Servers.Add(new OpenApiServer + { + Url = dialogportenBaseUri + }); document.Generator = null; document.ReplaceProblemDetailsDescriptions(); document.MakeCollectionsNullable(); @@ -214,6 +219,24 @@ static void BuildAndRun(string[] args) uiConfig.DocumentPath = dialogPrefix + "/swagger/{documentName}/swagger.json"; }); + /*await app.ExportSwaggerJsonAndExitAsync( + c => + { + c.SwaggerDocumentName = "v1"; //must match doc name above + c.Language = GenerationLanguage.CSharp; + c.OutputPath = Path.Combine(app.Environment.WebRootPath, "ApiClients", "CSharp"); + c.ClientNamespaceName = "MyCompanyName"; + c.ClientClassName = "MyCsClient"; + c.CreateZipArchive = true; //if you'd like a zip file as well + }, + c => + { + c.SwaggerDocumentName = "v1"; + c.Language = GenerationLanguage.TypeScript; + c.OutputPath = Path.Combine(app.Environment.WebRootPath, "ApiClients", "Typescript"); + c.ClientNamespaceName = "MyCompanyName"; + c.ClientClassName = "MyTsClient"; + });*/ app.Run(); } diff --git a/src/Digdir.Domain.Dialogporten.WebApi/nswag.json b/src/Digdir.Domain.Dialogporten.WebApi/nswag.json new file mode 100644 index 000000000..9c25e8c76 --- /dev/null +++ b/src/Digdir.Domain.Dialogporten.WebApi/nswag.json @@ -0,0 +1,25 @@ +{ + "runtime": "Net90", + "documentGenerator": { + "webApiToOpenApi": { + "isAspNetCore": true, + "addMissingPathParameters": false, + "defaultPropertyNameHandling": "Default", + "defaultReferenceTypeNullHandling": "Null", + "defaultEnumHandling": "Integer", + "flattenInheritanceHierarchy": false, + "generateKnownTypes": true, + "generateXmlObjects": false, + "generateAbstractProperties": false, + "ignoreObsoleteProperties": false, + "allowReferencesWithProperties": false, + "excludedTypeNames": [], + "infoTitle": "My Title", + "infoVersion": "1.0.0", + "output": "swagger.json", + "outputType": "Swagger2", + "assemblyPaths": [], + "referencePaths": [] + } + } +} diff --git a/src/Digdir.Domain.Dialogporten.WebApi/swagger.json b/src/Digdir.Domain.Dialogporten.WebApi/swagger.json new file mode 100644 index 000000000..7d1162481 --- /dev/null +++ b/src/Digdir.Domain.Dialogporten.WebApi/swagger.json @@ -0,0 +1,6985 @@ +{ + "x-generator": "NSwag v14.2.0.0 (NJsonSchema v11.1.0.0 (Newtonsoft.Json v13.0.0.0))", + "openapi": "3.0.0", + "info": { + "title": "Dialogporten", + "version": "v1" + }, + "paths": { + "/api/v1/.well-known/oauth-authorization-server": { + "get": { + "tags": [ + "Metadata" + ], + "summary": "Gets the OAuth 2.0 Metadata for automatic configuration of clients verifying dialog tokens", + "description": "This endpoint can be used by client integrations supporting automatic discovery of \"OAuth 2.0 Authorization Server\" metadata, enabling verification of dialog tokens issues by Dialogporten.", + "operationId": "V1WellKnownOauthAuthorizationServerGet_GetOauthAuthorizationServer", + "responses": { + "200": { + "description": "The OAuth 2.0 Authorization Server Metadata", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/V1WellKnownOauthAuthorizationServerQueriesGet_GetOauthAuthorizationServer" + } + } + } + } + } + } + }, + "/api/v1/.well-known/jwks.json": { + "get": { + "tags": [ + "Metadata" + ], + "summary": "Gets the JSON Web Key Set (JWKS) containing the public keys used to verify dialog token signatures", + "description": "This endpoint can be used by client integrations supporting automatic discovery of \"OAuth 2.0 Authorization Server\" metadata, enabling verification of dialog tokens issues by Dialogporten.", + "operationId": "V1WellKnownJwksGet_GetJwks", + "responses": { + "200": { + "description": "The OAuth 2.0 Authorization Server Metadata", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/V1WellKnownJwksQueriesGet_GetJwks" + } + } + } + } + } + } + }, + "/api/v1/serviceowner/dialogs/{dialogId}/transmissions": { + "get": { + "tags": [ + "Serviceowner" + ], + "summary": "Gets a list of dialog transmissions", + "description": "Gets the list of transmissions belonging to a dialog", + "operationId": "V1ServiceOwnerDialogTransmissionsSearch_SearchDialogTransmission", + "parameters": [ + { + "name": "dialogId", + "in": "path", + "required": true, + "schema": { + "type": "string", + "format": "guid" + } + } + ], + "responses": { + "200": { + "description": "Successfully returned the dialog transmission list.", + "content": { + "application/json": { + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/V1ServiceOwnerDialogTransmissionsQueriesSearch_Transmission" + } + } + } + } + }, + "401": { + "description": "Missing or invalid authentication token. Requires a Maskinporten-token with the scope \"digdir:dialogporten.serviceprovider\"." + }, + "403": { + "description": "Unauthorized to get the supplied dialog (not owned by authenticated organization or has additional scope requirements defined in policy)." + }, + "404": { + "description": "The given dialog ID was not found or is already deleted.", + "content": { + "application/problem+json": { + "schema": { + "$ref": "#/components/schemas/ProblemDetails" + } + } + } + }, + "410": { + "description": "Entity with the given key(s) is removed." + } + }, + "security": [ + { + "JWTBearerAuth": [] + } + ] + }, + "post": { + "tags": [ + "Serviceowner" + ], + "summary": "Adds a transmission to a dialog", + "description": "The transmission is created with the given configuration. For more information see the documentation (link TBD).\n\nOptimistic 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.", + "operationId": "V1ServiceOwnerDialogTransmissionsCreate_DialogTransmission", + "parameters": [ + { + "name": "dialogId", + "in": "path", + "required": true, + "schema": { + "type": "string", + "format": "guid" + } + }, + { + "name": "if-Match", + "in": "header", + "schema": { + "type": "string", + "format": "guid", + "nullable": true + } + } + ], + "requestBody": { + "x-name": "CreateTransmissionRequest", + "description": "", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/V1ServiceOwnerDialogTransmissionsCreate_TransmissionRequest" + } + } + }, + "required": true, + "x-position": 1 + }, + "responses": { + "201": { + "description": "The UUID of the created dialog transmission. A relative URL to the newly created activity is set in the \"Location\" header.", + "headers": { + "Etag": { + "description": "The new UUID ETag of the dialog", + "schema": { + "title": "System_String", + "type": "string" + }, + "example": "123e4567-e89b-12d3-a456-426614174000" + } + }, + "content": { + "application/json": { + "schema": { + "type": "string" + }, + "example": "018bb8e5-d9d0-7434-8ec5-569a6c8e01fc" + } + } + }, + "204": { + "description": "No Content" + }, + "400": { + "description": "Validation error occured. See problem details for a list of errors.", + "content": { + "application/problem+json": { + "schema": { + "$ref": "#/components/schemas/ProblemDetails" + } + } + } + }, + "401": { + "description": "Missing or invalid authentication token. Requires a Maskinporten-token with the scope \"digdir:dialogporten.serviceprovider\"." + }, + "403": { + "description": "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": { + "description": "The given dialog ID was not found or is already deleted.", + "content": { + "application/problem+json": { + "schema": { + "$ref": "#/components/schemas/ProblemDetails" + } + } + } + }, + "410": { + "description": "Entity with the given key(s) is removed." + }, + "412": { + "description": "The supplied If-Match header did not match the current Revision value for the dialog. The request was not applied.", + "content": { + "application/problem+json": { + "schema": { + "$ref": "#/components/schemas/ProblemDetails" + } + } + } + }, + "422": { + "description": "Domain error occured. See problem details for a list of errors.", + "content": { + "application/problem+json": { + "schema": { + "$ref": "#/components/schemas/ProblemDetails" + } + } + } + } + }, + "security": [ + { + "JWTBearerAuth": [] + } + ] + } + }, + "/api/v1/serviceowner/dialogs/{dialogId}/transmissions/{transmissionId}": { + "get": { + "tags": [ + "Serviceowner" + ], + "summary": "Gets a single dialog transmission", + "description": "Gets a single transmission belonging to a dialog. For more information see the documentation (link TBD).", + "operationId": "V1ServiceOwnerDialogTransmissionsGet_GetDialogTransmission", + "parameters": [ + { + "name": "dialogId", + "in": "path", + "required": true, + "schema": { + "type": "string", + "format": "guid" + } + }, + { + "name": "transmissionId", + "in": "path", + "required": true, + "schema": { + "type": "string", + "format": "guid" + } + } + ], + "responses": { + "200": { + "description": "Successfully returned the dialog transmission.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/V1ServiceOwnerDialogTransmissionsQueriesGet_Transmission" + } + } + } + }, + "401": { + "description": "Missing or invalid authentication token. Requires a Maskinporten-token with the scope \"digdir:dialogporten.serviceprovider\"." + }, + "403": { + "description": "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": { + "description": "The given dialog ID was not found or was deleted, or the given transmission ID was not found.", + "content": { + "application/problem+json": { + "schema": { + "$ref": "#/components/schemas/ProblemDetails" + } + } + } + }, + "410": { + "description": "Entity with the given key(s) is removed." + } + }, + "security": [ + { + "JWTBearerAuth": [] + } + ] + } + }, + "/api/v1/serviceowner/dialogs/{dialogId}/seenlog": { + "get": { + "tags": [ + "Serviceowner" + ], + "summary": "Gets all seen log records for a dialog", + "description": "Gets all seen log records for a dialog. For more information see the documentation (link TBD).", + "operationId": "V1ServiceOwnerDialogSeenLogsSearch_SearchDialogSeenLog", + "parameters": [ + { + "name": "dialogId", + "in": "path", + "required": true, + "schema": { + "type": "string", + "format": "guid" + } + } + ], + "responses": { + "200": { + "description": "Successfully returned the dialog seen log records.", + "content": { + "application/json": { + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/V1ServiceOwnerDialogSeenLogsQueriesSearch_SeenLog" + } + } + } + } + }, + "401": { + "description": "Unauthorized" + }, + "403": { + "description": "Forbidden" + }, + "404": { + "description": "The given dialog ID was not found or is already deleted.", + "content": { + "application/problem+json": { + "schema": { + "$ref": "#/components/schemas/ProblemDetails" + } + } + } + }, + "410": { + "description": "Entity with the given key(s) is removed." + } + }, + "security": [ + { + "JWTBearerAuth": [] + } + ] + } + }, + "/api/v1/serviceowner/dialogs/{dialogId}/seenlog/{seenLogId}": { + "get": { + "tags": [ + "Serviceowner" + ], + "summary": "Gets a single dialog seen log record", + "description": "Gets a single dialog seen log record. For more information see the documentation (link TBD).", + "operationId": "V1ServiceOwnerDialogSeenLogsGet_GetDialogSeenLog", + "parameters": [ + { + "name": "dialogId", + "in": "path", + "required": true, + "schema": { + "type": "string", + "format": "guid" + } + }, + { + "name": "seenLogId", + "in": "path", + "required": true, + "schema": { + "type": "string", + "format": "guid" + } + } + ], + "responses": { + "200": { + "description": "Successfully returned the dialog seen log record.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/V1ServiceOwnerDialogSeenLogsQueriesGet_SeenLog" + } + } + } + }, + "401": { + "description": "Unauthorized" + }, + "403": { + "description": "Forbidden" + }, + "404": { + "description": "The given dialog ID was not found or is already deleted.", + "content": { + "application/problem+json": { + "schema": { + "$ref": "#/components/schemas/ProblemDetails" + } + } + } + }, + "410": { + "description": "Entity with the given key(s) is removed." + } + }, + "security": [ + { + "JWTBearerAuth": [] + } + ] + } + }, + "/api/v1/serviceowner/dialogs/{dialogId}": { + "put": { + "tags": [ + "Serviceowner" + ], + "summary": "Replaces a dialog", + "description": "Replaces a given dialog with the supplied model. For more information see the documentation (link TBD).\n\nOptimistic 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.", + "operationId": "V1ServiceOwnerDialogsUpdate_Dialog", + "parameters": [ + { + "name": "dialogId", + "in": "path", + "required": true, + "schema": { + "type": "string", + "format": "guid" + } + }, + { + "name": "if-Match", + "in": "header", + "schema": { + "type": "string", + "format": "guid", + "nullable": true + } + } + ], + "requestBody": { + "x-name": "dto", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/V1ServiceOwnerDialogsCommandsUpdate_Dialog" + } + } + }, + "required": true + }, + "responses": { + "204": { + "description": "The dialog aggregate was updated successfully.", + "headers": { + "Etag": { + "description": "The new UUID ETag of the dialog", + "schema": { + "title": "System_String", + "type": "string" + }, + "example": "123e4567-e89b-12d3-a456-426614174000" + } + } + }, + "400": { + "description": "Validation error occured. See problem details for a list of errors.", + "content": { + "application/problem+json": { + "schema": { + "$ref": "#/components/schemas/ProblemDetails" + } + } + } + }, + "401": { + "description": "Missing or invalid authentication token. Requires a Maskinporten-token with the scope \"digdir:dialogporten.serviceprovider\"." + }, + "403": { + "description": "Unauthorized to update the supplied dialog (not owned by authenticated organization or has additional scope requirements defined in policy)." + }, + "404": { + "description": "The given dialog ID was not found or is already deleted.", + "content": { + "application/problem+json": { + "schema": { + "$ref": "#/components/schemas/ProblemDetails" + } + } + } + }, + "410": { + "description": "Entity with the given key(s) is removed." + }, + "412": { + "description": "The supplied If-Match header did not match the current Revision value for the dialog. The request was not applied.", + "content": { + "application/problem+json": { + "schema": { + "$ref": "#/components/schemas/ProblemDetails" + } + } + } + }, + "422": { + "description": "Domain error occured. See problem details for a list of errors.", + "content": { + "application/problem+json": { + "schema": { + "$ref": "#/components/schemas/ProblemDetails" + } + } + } + } + }, + "security": [ + { + "JWTBearerAuth": [] + } + ] + }, + "get": { + "tags": [ + "Serviceowner" + ], + "summary": "Gets a single dialog", + "description": "Gets a single dialog aggregate. For more information see the documentation (link TBD).\n\nNote that this operation may return deleted dialogs (see the field `DeletedAt`).", + "operationId": "V1ServiceOwnerDialogsGet_GetDialog", + "parameters": [ + { + "name": "dialogId", + "in": "path", + "required": true, + "schema": { + "type": "string", + "format": "guid" + } + }, + { + "name": "endUserId", + "in": "query", + "description": "Filter by end user id", + "schema": { + "type": "string", + "nullable": true + } + } + ], + "responses": { + "200": { + "description": "Successfully returned the dialog aggregate.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/V1ServiceOwnerDialogsQueriesGet_Dialog" + } + } + } + }, + "401": { + "description": "Missing or invalid authentication token. Requires a Maskinporten-token with the scope \"digdir:dialogporten.serviceprovider\"." + }, + "403": { + "description": "Unauthorized to get the supplied dialog (not owned by authenticated organization or has additional scope requirements defined in policy)." + }, + "404": { + "description": "The given dialog ID was not found or is already deleted.", + "content": { + "application/problem+json": { + "schema": { + "$ref": "#/components/schemas/ProblemDetails" + } + } + } + } + }, + "security": [ + { + "JWTBearerAuth": [] + } + ] + }, + "delete": { + "tags": [ + "Serviceowner" + ], + "summary": "Deletes a dialog", + "description": "Deletes a given dialog (soft delete). For more information see the documentation (link TBD).\n\nNote 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.\nIf end users attempt to access the dialog via the details endpoint, they will get a 410 Gone response.\n\nOptimistic 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.", + "operationId": "V1ServiceOwnerDialogsDelete_Dialog", + "parameters": [ + { + "name": "dialogId", + "in": "path", + "required": true, + "schema": { + "type": "string", + "format": "guid" + } + }, + { + "name": "if-Match", + "in": "header", + "schema": { + "type": "string", + "format": "guid", + "nullable": true + } + } + ], + "responses": { + "204": { + "description": "The dialog aggregate was deleted successfully.", + "headers": { + "Etag": { + "description": "The new UUID ETag of the dialog", + "schema": { + "title": "System_String", + "type": "string" + }, + "example": "123e4567-e89b-12d3-a456-426614174000" + } + } + }, + "400": { + "description": "Validation error occured. See problem details for a list of errors.", + "content": { + "application/problem+json": { + "schema": { + "$ref": "#/components/schemas/ProblemDetails" + } + } + } + }, + "401": { + "description": "Missing or invalid authentication token. Requires a Maskinporten-token with the scope \"digdir:dialogporten.serviceprovider\"." + }, + "403": { + "description": "Unauthorized to delete the supplied dialog (not owned by authenticated organization or has additional scope requirements defined in policy)." + }, + "404": { + "description": "The given dialog ID was not found or is already deleted.", + "content": { + "application/problem+json": { + "schema": { + "$ref": "#/components/schemas/ProblemDetails" + } + } + } + }, + "410": { + "description": "Entity with the given key(s) is removed." + }, + "412": { + "description": "The supplied If-Match header did not match the current Revision value for the dialog. The request was not applied.", + "content": { + "application/problem+json": { + "schema": { + "$ref": "#/components/schemas/ProblemDetails" + } + } + } + } + }, + "security": [ + { + "JWTBearerAuth": [] + } + ] + }, + "patch": { + "tags": [ + "Serviceowner" + ], + "summary": "Patch a single dialog", + "description": "Patches a dialog aggregate with a RFC6902 JSON Patch document. The patch document must be a JSON array of RFC6902 operations.\nSee [https://tools.ietf.org/html/rfc6902](https://tools.ietf.org/html/rfc6902) for more information.\n \nOptimistic 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.", + "operationId": "V1ServiceOwnerDialogsPatchDialog", + "parameters": [ + { + "name": "dialogId", + "in": "path", + "required": true, + "schema": { + "type": "string", + "format": "guid" + }, + "x-position": 1 + }, + { + "name": "If-Match", + "x-originalName": "etag", + "in": "header", + "schema": { + "type": "string", + "format": "guid", + "nullable": true + }, + "x-position": 2 + } + ], + "requestBody": { + "x-name": "patchDocument", + "content": { + "application/json": { + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/JsonPatchOperations_Operation" + } + } + } + }, + "required": true, + "x-position": 3 + }, + "responses": { + "204": { + "description": "Patch was successfully applied.", + "headers": { + "Etag": { + "description": "The new UUID ETag of the dialog", + "schema": { + "type": "string" + }, + "example": "123e4567-e89b-12d3-a456-426614174000" + } + } + }, + "400": { + "description": "Validation error occured. See problem details for a list of errors.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ProblemDetails" + } + } + } + }, + "401": { + "description": "Missing or invalid authentication token. Requires a Maskinporten-token with the scope \\\"digdir:dialogporten.serviceprovider\\\"" + }, + "403": { + "description": "Unauthorized to update a dialog for the given serviceResource (not owned by authenticated organization or has additional scope requirements defined in policy)" + }, + "404": { + "description": "The given dialog ID was not found or is deleted", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ProblemDetails" + } + } + } + }, + "412": { + "description": "The supplied Revision does not match the current Revision of the dialog", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ProblemDetails" + } + } + } + }, + "422": { + "description": "Domain error occured. See problem details for a list of errors.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ProblemDetails" + } + } + } + } + }, + "security": [ + { + "JWTBearerAuth": [] + } + ] + } + }, + "/api/v1/serviceowner/dialogs": { + "get": { + "tags": [ + "Serviceowner" + ], + "summary": "Gets a list of dialogs", + "description": "Performs a search for dialogs, returning a paginated list of dialogs. For more information see the documentation (link TBD).\n\n* All date parameters must contain explicit time zone. Example: 2023-10-27T10:00:00Z or 2023-10-27T10:00:00+01:00\n* See \"continuationToken\" in the response for how to get the next page of results.\n* hasNextPage will be set to true if there are more items to get.", + "operationId": "V1ServiceOwnerDialogsSearch_SearchDialog", + "parameters": [ + { + "name": "serviceResource", + "in": "query", + "style": "form", + "explode": true, + "description": "Filter by one or more service resources", + "schema": { + "type": "array", + "nullable": true, + "items": { + "type": "string" + } + } + }, + { + "name": "party", + "in": "query", + "style": "form", + "explode": true, + "description": "Filter by one or more owning parties", + "schema": { + "type": "array", + "nullable": true, + "items": { + "type": "string" + } + } + }, + { + "name": "endUserId", + "in": "query", + "description": "Filter by end user id", + "schema": { + "type": "string", + "nullable": true + } + }, + { + "name": "extendedStatus", + "in": "query", + "style": "form", + "explode": true, + "description": "Filter by one or more extended statuses", + "schema": { + "type": "array", + "nullable": true, + "items": { + "type": "string" + } + } + }, + { + "name": "externalReference", + "in": "query", + "description": "Filter by external reference", + "schema": { + "type": "string", + "nullable": true + } + }, + { + "name": "status", + "in": "query", + "style": "form", + "explode": true, + "description": "Filter by status", + "schema": { + "type": "array", + "nullable": true, + "items": { + "$ref": "#/components/schemas/DialogsEntities_DialogStatus" + } + } + }, + { + "name": "createdAfter", + "in": "query", + "description": "Only return dialogs created after this date", + "schema": { + "type": "string", + "format": "date-time", + "nullable": true + } + }, + { + "name": "createdBefore", + "in": "query", + "description": "Only return dialogs created before this date", + "schema": { + "type": "string", + "format": "date-time", + "nullable": true + } + }, + { + "name": "updatedAfter", + "in": "query", + "description": "Only return dialogs updated after this date", + "schema": { + "type": "string", + "format": "date-time", + "nullable": true + } + }, + { + "name": "updatedBefore", + "in": "query", + "description": "Only return dialogs updated before this date", + "schema": { + "type": "string", + "format": "date-time", + "nullable": true + } + }, + { + "name": "dueAfter", + "in": "query", + "description": "Only return dialogs with due date after this date", + "schema": { + "type": "string", + "format": "date-time", + "nullable": true + } + }, + { + "name": "dueBefore", + "in": "query", + "description": "Only return dialogs with due date before this date", + "schema": { + "type": "string", + "format": "date-time", + "nullable": true + } + }, + { + "name": "visibleAfter", + "in": "query", + "description": "Only return dialogs with visible-from date after this date", + "schema": { + "type": "string", + "format": "date-time", + "nullable": true + } + }, + { + "name": "visibleBefore", + "in": "query", + "description": "Only return dialogs with visible-from date before this date", + "schema": { + "type": "string", + "format": "date-time", + "nullable": true + } + }, + { + "name": "process", + "in": "query", + "description": "Filter by process", + "schema": { + "type": "string", + "nullable": true + } + }, + { + "name": "systemLabel", + "in": "query", + "style": "form", + "explode": true, + "description": "Filter by Display state", + "schema": { + "type": "array", + "nullable": true, + "items": { + "$ref": "#/components/schemas/DialogEndUserContextsEntities_SystemLabel" + } + } + }, + { + "name": "search", + "in": "query", + "description": "Search string for free text search. Will attempt to fuzzily match in all free text fields in the aggregate", + "schema": { + "type": "string", + "nullable": true + } + }, + { + "name": "searchLanguageCode", + "in": "query", + "description": "Limit free text search to texts with this language code, e.g. 'nb', 'en'. Culture codes will be normalized to neutral language codes (ISO 639). Default: search all culture codes", + "schema": { + "type": "string", + "nullable": true + } + }, + { + "name": "orderBy", + "in": "query", + "schema": { + "nullable": true, + "oneOf": [ + { + "$ref": "#/components/schemas/OrderSetOfTOrderDefinitionAndTTarget" + } + ] + } + }, + { + "name": "continuationToken", + "in": "query", + "description": "Supply \"continuationToken\" for the response to get the next page of results, if hasNextPage is true", + "schema": { + "nullable": true, + "oneOf": [ + { + "$ref": "#/components/schemas/ContinuationTokenSetOfTOrderDefinitionAndTTarget" + } + ] + } + }, + { + "name": "limit", + "in": "query", + "description": "Limit the number of results per page (1-1000, default: 100)", + "schema": { + "type": "integer", + "format": "int32", + "nullable": true + } + } + ], + "responses": { + "200": { + "description": "Successfully returned the dialog list.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/PaginatedListOfV1ServiceOwnerDialogsQueriesSearch_Dialog" + } + } + } + }, + "401": { + "description": "Missing or invalid authentication token. Requires a Maskinporten-token with the scope \"digdir:dialogporten.serviceprovider.search\"." + } + }, + "security": [ + { + "JWTBearerAuth": [] + } + ] + }, + "post": { + "tags": [ + "Serviceowner" + ], + "summary": "Creates a new dialog", + "description": "The dialog is created with the given configuration. For more information see the documentation (link TBD).\n\nFor detailed information on validation rules, see [the source for CreateDialogCommandValidator](https://github.com/altinn/dialogporten/blob/main/src/Digdir.Domain.Dialogporten.Application/Features/V1/ServiceOwner/Dialogs/Commands/Create/CreateDialogCommandValidator.cs)", + "operationId": "V1ServiceOwnerDialogsCreate_Dialog", + "requestBody": { + "x-name": "dto", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/V1ServiceOwnerDialogsCommandsCreate_Dialog" + } + } + }, + "required": true + }, + "responses": { + "201": { + "description": "The UUID of the created dialog aggregate. A relative URL to the newly created activity is set in the \"Location\" header.", + "headers": { + "Etag": { + "description": "The new UUID ETag of the dialog", + "schema": { + "title": "System_String", + "type": "string" + }, + "example": "123e4567-e89b-12d3-a456-426614174000" + } + }, + "content": { + "application/json": { + "schema": { + "type": "string" + }, + "example": "018bb8e5-d9d0-7434-8ec5-569a6c8e01fc" + } + } + }, + "204": { + "description": "No Content" + }, + "400": { + "description": "Validation error occured. See problem details for a list of errors.", + "content": { + "application/problem+json": { + "schema": { + "$ref": "#/components/schemas/ProblemDetails" + } + } + } + }, + "401": { + "description": "Missing or invalid authentication token. Requires a Maskinporten-token with the scope \"digdir:dialogporten.serviceprovider\"." + }, + "403": { + "description": "Unauthorized to create a dialog for the given serviceResource (not owned by authenticated organization or has additional scope requirements defined in policy)." + }, + "422": { + "description": "Domain error occured. See problem details for a list of errors.", + "content": { + "application/problem+json": { + "schema": { + "$ref": "#/components/schemas/ProblemDetails" + } + } + } + } + }, + "security": [ + { + "JWTBearerAuth": [] + } + ] + } + }, + "/api/v1/serviceowner/dialogs/{dialogId}/actions/purge": { + "post": { + "tags": [ + "Serviceowner" + ], + "summary": "Permanently deletes a dialog", + "description": "Deletes a given dialog (hard delete). For more information see the documentation (link TBD).\n\nOptimistic 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.", + "operationId": "V1ServiceOwnerDialogsPurge_PurgeDialog", + "parameters": [ + { + "name": "dialogId", + "in": "path", + "required": true, + "schema": { + "type": "string", + "format": "guid" + } + }, + { + "name": "if-Match", + "in": "header", + "schema": { + "type": "string", + "format": "guid", + "nullable": true + } + } + ], + "responses": { + "204": { + "description": "The dialog aggregate was deleted successfully." + }, + "401": { + "description": "Missing or invalid authentication token. Requires a Maskinporten-token with the scope \"digdir:dialogporten.serviceprovider\"." + }, + "403": { + "description": "Unauthorized to delete the supplied dialog (not owned by authenticated organization or has additional scope requirements defined in policy)." + }, + "404": { + "description": "The given dialog ID was not found or is already deleted.", + "content": { + "application/problem+json": { + "schema": { + "$ref": "#/components/schemas/ProblemDetails" + } + } + } + }, + "412": { + "description": "The supplied If-Match header did not match the current Revision value for the dialog. The request was not applied.", + "content": { + "application/problem+json": { + "schema": { + "$ref": "#/components/schemas/ProblemDetails" + } + } + } + } + }, + "security": [ + { + "JWTBearerAuth": [] + } + ] + } + }, + "/api/v1/serviceowner/dialogs/{dialogId}/activities": { + "get": { + "tags": [ + "Serviceowner" + ], + "summary": "Gets a list of dialog activities", + "description": "Gets the list of activities belonging to a dialog", + "operationId": "V1ServiceOwnerDialogActivitiesSearch_SearchDialogActivity", + "parameters": [ + { + "name": "dialogId", + "in": "path", + "required": true, + "schema": { + "type": "string", + "format": "guid" + } + } + ], + "responses": { + "200": { + "description": "Successfully returned the dialog activity list.", + "content": { + "application/json": { + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/V1ServiceOwnerDialogActivitiesQueriesSearch_Activity" + } + } + } + } + }, + "401": { + "description": "Missing or invalid authentication token. Requires a Maskinporten-token with the scope \"digdir:dialogporten.serviceprovider\"." + }, + "403": { + "description": "Unauthorized to get the supplied dialog (not owned by authenticated organization or has additional scope requirements defined in policy)." + } + }, + "security": [ + { + "JWTBearerAuth": [] + } + ] + }, + "post": { + "tags": [ + "Serviceowner" + ], + "summary": "Adds a activity to a dialogs activity history", + "description": "The activity is created with the given configuration. For more information see the documentation (link TBD).\n\nOptimistic 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.", + "operationId": "V1ServiceOwnerDialogActivitiesCreate_DialogActivity", + "parameters": [ + { + "name": "dialogId", + "in": "path", + "required": true, + "schema": { + "type": "string", + "format": "guid" + } + }, + { + "name": "if-Match", + "in": "header", + "schema": { + "type": "string", + "format": "guid", + "nullable": true + } + } + ], + "requestBody": { + "x-name": "CreateActivityRequest", + "description": "", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/V1ServiceOwnerDialogActivitiesCreate_ActivityRequest" + } + } + }, + "required": true, + "x-position": 1 + }, + "responses": { + "201": { + "description": "The UUID of the created dialog activity. A relative URL to the newly created activity is set in the \"Location\" header.", + "headers": { + "Etag": { + "description": "The new UUID ETag of the dialog", + "schema": { + "title": "System_String", + "type": "string" + }, + "example": "123e4567-e89b-12d3-a456-426614174000" + } + }, + "content": { + "application/json": { + "schema": { + "type": "string" + }, + "example": "018bb8e5-d9d0-7434-8ec5-569a6c8e01fc" + } + } + }, + "204": { + "description": "No Content" + }, + "400": { + "description": "Validation error occured. See problem details for a list of errors.", + "content": { + "application/problem+json": { + "schema": { + "$ref": "#/components/schemas/ProblemDetails" + } + } + } + }, + "401": { + "description": "Missing or invalid authentication token. Requires a Maskinporten-token with the scope \"digdir:dialogporten.serviceprovider\"." + }, + "403": { + "description": "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": { + "description": "The given dialog ID was not found or is already deleted.", + "content": { + "application/problem+json": { + "schema": { + "$ref": "#/components/schemas/ProblemDetails" + } + } + } + }, + "410": { + "description": "Entity with the given key(s) is removed." + }, + "412": { + "description": "The supplied If-Match header did not match the current Revision value for the dialog. The request was not applied.", + "content": { + "application/problem+json": { + "schema": { + "$ref": "#/components/schemas/ProblemDetails" + } + } + } + }, + "422": { + "description": "Domain error occured. See problem details for a list of errors.", + "content": { + "application/problem+json": { + "schema": { + "$ref": "#/components/schemas/ProblemDetails" + } + } + } + } + }, + "security": [ + { + "JWTBearerAuth": [] + } + ] + } + }, + "/api/v1/serviceowner/dialogs/{dialogId}/actions/should-send-notification": { + "get": { + "tags": [ + "Serviceowner" + ], + "summary": "Returns a boolean value based on conditions used to determine if a notification is to be sent", + "description": "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.", + "operationId": "V1ServiceOwnerDialogActivitiesNotificationCondition_NotificationCondition", + "parameters": [ + { + "name": "dialogId", + "in": "path", + "required": true, + "schema": { + "type": "string", + "format": "guid" + } + }, + { + "name": "conditionType", + "in": "query", + "required": true, + "schema": { + "allOf": [ + { + "$ref": "#/components/schemas/V1ServiceOwnerDialogActivitiesQueriesNotificationCondition_NotificationConditionType" + } + ] + } + }, + { + "name": "activityType", + "in": "query", + "required": true, + "schema": { + "allOf": [ + { + "$ref": "#/components/schemas/DialogsEntitiesActivities_DialogActivityType" + } + ] + } + }, + { + "name": "transmissionId", + "in": "query", + "schema": { + "type": "string", + "format": "guid", + "nullable": true + } + } + ], + "responses": { + "200": { + "description": "Successfully returned the notification determination.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/V1ServiceOwnerDialogActivitiesQueriesNotificationCondition_NotificationCondition" + } + } + } + }, + "401": { + "description": "Missing or invalid authentication token. Requires a Maskinporten-token with the scope \"altinn:system/notifications.condition.check\"." + }, + "403": { + "description": "Forbidden" + } + }, + "security": [ + { + "JWTBearerAuth": [] + } + ] + } + }, + "/api/v1/serviceowner/dialogs/{dialogId}/activities/{activityId}": { + "get": { + "tags": [ + "Serviceowner" + ], + "summary": "Gets a single dialog activity", + "description": "Gets a single activity belonging to a dialog. For more information see the documentation (link TBD).", + "operationId": "V1ServiceOwnerDialogActivitiesGet_GetDialogActivity", + "parameters": [ + { + "name": "dialogId", + "in": "path", + "required": true, + "schema": { + "type": "string", + "format": "guid" + } + }, + { + "name": "activityId", + "in": "path", + "required": true, + "schema": { + "type": "string", + "format": "guid" + } + } + ], + "responses": { + "200": { + "description": "Successfully returned the dialog activity.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/V1ServiceOwnerDialogActivitiesQueriesGet_Activity" + } + } + } + }, + "401": { + "description": "Missing or invalid authentication token. Requires a Maskinporten-token with the scope \"digdir:dialogporten.serviceprovider\"." + }, + "403": { + "description": "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": { + "description": "The given dialog ID was not found or was deleted, or the given activity ID was not found.", + "content": { + "application/problem+json": { + "schema": { + "$ref": "#/components/schemas/ProblemDetails" + } + } + } + }, + "410": { + "description": "Entity with the given key(s) is removed." + } + }, + "security": [ + { + "JWTBearerAuth": [] + } + ] + } + }, + "/api/v1/enduser/parties": { + "get": { + "tags": [ + "Enduser" + ], + "summary": "Gets the list of authorized parties for the end user", + "description": "Gets the list of authorized parties for the end user. For more information see the documentation (link TBD).", + "operationId": "V1EndUserPartiesGet_GetParties", + "responses": { + "200": { + "description": "The list of authorized parties for the end user", + "content": { + "application/json": { + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/V1EndUserPartiesQueriesGet_Parties" + } + } + } + } + }, + "401": { + "description": "Unauthorized" + }, + "403": { + "description": "Forbidden" + } + }, + "security": [ + { + "JWTBearerAuth": [] + } + ] + } + }, + "/api/v1/enduser/dialogs/{dialogId}/transmissions": { + "get": { + "tags": [ + "Enduser" + ], + "summary": "Gets a list of dialog transmissions", + "description": "Gets the list of transmissions belonging to a dialog", + "operationId": "V1EndUserDialogTransmissionsSearch_SearchDialogTransmission", + "parameters": [ + { + "name": "dialogId", + "in": "path", + "required": true, + "schema": { + "type": "string", + "format": "guid" + } + } + ], + "responses": { + "200": { + "description": "Successfully returned the dialog transmission list.", + "content": { + "application/json": { + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/V1EndUserDialogTransmissionsQueriesSearch_Transmission" + } + } + } + } + }, + "401": { + "description": "Missing or invalid authentication token. Requires a Maskinporten-token with the scope \"digdir:dialogporten\"." + }, + "403": { + "description": "Unauthorized to get the supplied dialog (not owned by authenticated organization or has additional scope requirements defined in policy)." + } + }, + "security": [ + { + "JWTBearerAuth": [] + } + ] + } + }, + "/api/v1/enduser/dialogs/{dialogId}/transmissions/{transmissionId}": { + "get": { + "tags": [ + "Enduser" + ], + "summary": "Gets a single dialog transmission", + "description": "Gets a single transmission belonging to a dialog. For more information see the documentation (link TBD).", + "operationId": "V1EndUserDialogTransmissionsGet_GetDialogTransmission", + "parameters": [ + { + "name": "dialogId", + "in": "path", + "required": true, + "schema": { + "type": "string", + "format": "guid" + } + }, + { + "name": "transmissionId", + "in": "path", + "required": true, + "schema": { + "type": "string", + "format": "guid" + } + } + ], + "responses": { + "200": { + "description": "Successfully returned the dialog transmission.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/V1EndUserDialogTransmissionsQueriesGet_Transmission" + } + } + } + }, + "401": { + "description": "Missing or invalid authentication token. Requires a Maskinporten-token with the scope \"digdir:dialogporten\"." + }, + "403": { + "description": "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": { + "description": "The given dialog ID was not found or was deleted, or the given transmission ID was not found.", + "content": { + "application/problem+json": { + "schema": { + "$ref": "#/components/schemas/ProblemDetails" + } + } + } + } + }, + "security": [ + { + "JWTBearerAuth": [] + } + ] + } + }, + "/api/v1/enduser/dialogs/{dialogId}/systemlabels": { + "put": { + "tags": [ + "Enduser" + ], + "operationId": "V1EndUserDialogSystemLabelsSet_SetDialogSystemLabel", + "parameters": [ + { + "name": "dialogId", + "in": "path", + "required": true, + "schema": { + "type": "string", + "format": "guid" + } + } + ], + "requestBody": { + "x-name": "SystemLabelCommand", + "description": "", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/V1EndUserDialogSystemLabelsCommandsSet_SystemLabelCommand" + } + } + }, + "required": true, + "x-position": 1 + }, + "responses": { + "204": { + "description": "No Content" + }, + "400": { + "description": "Bad Request", + "content": { + "application/problem+json": { + "schema": { + "$ref": "#/components/schemas/ProblemDetails" + } + } + } + }, + "401": { + "description": "Unauthorized" + }, + "403": { + "description": "Forbidden" + }, + "404": { + "description": "Not Found", + "content": { + "application/problem+json": { + "schema": { + "$ref": "#/components/schemas/ProblemDetails" + } + } + } + }, + "410": { + "description": "" + }, + "412": { + "description": "", + "content": { + "application/problem+json": { + "schema": { + "$ref": "#/components/schemas/ProblemDetails" + } + } + } + }, + "422": { + "description": "", + "content": { + "application/problem+json": { + "schema": { + "$ref": "#/components/schemas/ProblemDetails" + } + } + } + } + }, + "security": [ + { + "JWTBearerAuth": [] + } + ] + } + }, + "/api/v1/enduser/dialogs/{dialogId}/seenlog": { + "get": { + "tags": [ + "Enduser" + ], + "summary": "Gets all seen log records for a dialog", + "description": "Gets all seen log records for a dialog. For more information see the documentation (link TBD).", + "operationId": "V1EndUserDialogSeenLogsSearch_SearchDialogSeenLog", + "parameters": [ + { + "name": "dialogId", + "in": "path", + "required": true, + "schema": { + "type": "string", + "format": "guid" + } + } + ], + "responses": { + "200": { + "description": "Successfully returned the dialog seen log records.", + "content": { + "application/json": { + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/V1EndUserDialogSeenLogsQueriesSearch_SeenLog" + } + } + } + } + }, + "401": { + "description": "Missing or invalid authentication token. Requires a Maskinporten-token with the scope \"digdir:dialogporten\"." + }, + "403": { + "description": "Forbidden" + }, + "404": { + "description": "Not Found", + "content": { + "application/problem+json": { + "schema": { + "$ref": "#/components/schemas/ProblemDetails" + } + } + } + } + }, + "security": [ + { + "JWTBearerAuth": [] + } + ] + } + }, + "/api/v1/enduser/dialogs/{dialogId}/seenlog/{seenLogId}": { + "get": { + "tags": [ + "Enduser" + ], + "summary": "Gets a single dialog seen log record", + "description": "Gets a single dialog seen log record. For more information see the documentation (link TBD).", + "operationId": "V1EndUserDialogSeenLogsGet_GetDialogSeenLog", + "parameters": [ + { + "name": "dialogId", + "in": "path", + "required": true, + "schema": { + "type": "string", + "format": "guid" + } + }, + { + "name": "seenLogId", + "in": "path", + "required": true, + "schema": { + "type": "string", + "format": "guid" + } + } + ], + "responses": { + "200": { + "description": "Successfully returned the dialog seen log record.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/V1EndUserDialogSeenLogsQueriesGet_SeenLog" + } + } + } + }, + "401": { + "description": "Missing or invalid authentication token. Requires a Maskinporten-token with the scope \"digdir:dialogporten\"." + }, + "403": { + "description": "Forbidden" + }, + "404": { + "description": "Not Found", + "content": { + "application/problem+json": { + "schema": { + "$ref": "#/components/schemas/ProblemDetails" + } + } + } + } + }, + "security": [ + { + "JWTBearerAuth": [] + } + ] + } + }, + "/api/v1/enduser/dialogs": { + "get": { + "tags": [ + "Enduser" + ], + "summary": "Gets a list of dialogs", + "description": "Performs a search for dialogs, returning a paginated list of dialogs. For more information see the documentation (link TBD).\n\n* All date parameters must contain explicit time zone. Example: 2023-10-27T10:00:00Z or 2023-10-27T10:00:00+01:00\n* See \"continuationToken\" in the response for how to get the next page of results.\n* hasNextPage will be set to true if there are more items to get.", + "operationId": "V1EndUserDialogsSearch_SearchDialog", + "parameters": [ + { + "name": "org", + "in": "query", + "style": "form", + "explode": true, + "description": "Filter by one or more service owner codes", + "schema": { + "type": "array", + "nullable": true, + "items": { + "type": "string" + } + } + }, + { + "name": "serviceResource", + "in": "query", + "style": "form", + "explode": true, + "description": "Filter by one or more service resources", + "schema": { + "type": "array", + "nullable": true, + "items": { + "type": "string" + } + } + }, + { + "name": "party", + "in": "query", + "style": "form", + "explode": true, + "description": "Filter by one or more owning parties", + "schema": { + "type": "array", + "nullable": true, + "items": { + "type": "string" + } + } + }, + { + "name": "extendedStatus", + "in": "query", + "style": "form", + "explode": true, + "description": "Filter by one or more extended statuses", + "schema": { + "type": "array", + "nullable": true, + "items": { + "type": "string" + } + } + }, + { + "name": "externalReference", + "in": "query", + "description": "Filter by external reference", + "schema": { + "type": "string", + "nullable": true + } + }, + { + "name": "status", + "in": "query", + "style": "form", + "explode": true, + "description": "Filter by status", + "schema": { + "type": "array", + "nullable": true, + "items": { + "$ref": "#/components/schemas/DialogsEntities_DialogStatus" + } + } + }, + { + "name": "createdAfter", + "in": "query", + "description": "Only return dialogs created after this date", + "schema": { + "type": "string", + "format": "date-time", + "nullable": true + } + }, + { + "name": "createdBefore", + "in": "query", + "description": "Only return dialogs created before this date", + "schema": { + "type": "string", + "format": "date-time", + "nullable": true + } + }, + { + "name": "updatedAfter", + "in": "query", + "description": "Only return dialogs updated after this date", + "schema": { + "type": "string", + "format": "date-time", + "nullable": true + } + }, + { + "name": "updatedBefore", + "in": "query", + "description": "Only return dialogs updated before this date", + "schema": { + "type": "string", + "format": "date-time", + "nullable": true + } + }, + { + "name": "dueAfter", + "in": "query", + "description": "Only return dialogs with due date after this date", + "schema": { + "type": "string", + "format": "date-time", + "nullable": true + } + }, + { + "name": "dueBefore", + "in": "query", + "description": "Only return dialogs with due date before this date", + "schema": { + "type": "string", + "format": "date-time", + "nullable": true + } + }, + { + "name": "process", + "in": "query", + "description": "Filter by process", + "schema": { + "type": "string", + "nullable": true + } + }, + { + "name": "systemLabel", + "in": "query", + "style": "form", + "explode": true, + "description": "Filter by Display state", + "schema": { + "type": "array", + "nullable": true, + "items": { + "$ref": "#/components/schemas/DialogEndUserContextsEntities_SystemLabel" + } + } + }, + { + "name": "search", + "in": "query", + "description": "Search string for free text search. Will attempt to fuzzily match in all free text fields in the aggregate", + "schema": { + "type": "string", + "nullable": true + } + }, + { + "name": "searchLanguageCode", + "in": "query", + "description": "Limit free text search to texts with this language code, e.g. 'nb', 'en'. Culture codes will be normalized to neutral language codes (ISO 639). Default: search all culture codes", + "schema": { + "type": "string", + "nullable": true + } + }, + { + "name": "orderBy", + "in": "query", + "schema": { + "nullable": true, + "oneOf": [ + { + "$ref": "#/components/schemas/OrderSetOfTOrderDefinitionAndTTarget" + } + ] + } + }, + { + "name": "continuationToken", + "in": "query", + "description": "Supply \"continuationToken\" for the response to get the next page of results, if hasNextPage is true", + "schema": { + "nullable": true, + "oneOf": [ + { + "$ref": "#/components/schemas/ContinuationTokenSetOfTOrderDefinitionAndTTarget" + } + ] + } + }, + { + "name": "limit", + "in": "query", + "description": "Limit the number of results per page (1-1000, default: 100)", + "schema": { + "type": "integer", + "format": "int32", + "nullable": true + } + } + ], + "responses": { + "200": { + "description": "Successfully returned the dialog list.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/PaginatedListOfV1EndUserDialogsQueriesSearch_Dialog" + } + } + } + }, + "401": { + "description": "Missing or invalid authentication token. Requires a Maskinporten-token with the scope \"digdir:dialogporten\"." + } + }, + "security": [ + { + "JWTBearerAuth": [] + } + ] + } + }, + "/api/v1/enduser/dialogs/{dialogId}": { + "get": { + "tags": [ + "Enduser" + ], + "summary": "Gets a single dialog", + "description": "Gets a single dialog aggregate. For more information see the documentation (link TBD).", + "operationId": "V1EndUserDialogsGet_GetDialog", + "parameters": [ + { + "name": "dialogId", + "in": "path", + "required": true, + "schema": { + "type": "string", + "format": "guid" + } + } + ], + "responses": { + "200": { + "description": "Successfully returned the dialog aggregate.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/V1EndUserDialogsQueriesGet_Dialog" + } + } + } + }, + "401": { + "description": "Missing or invalid authentication token. Requires a Maskinporten-token with the scope \"digdir:dialogporten\"." + }, + "403": { + "description": "Unauthorized to get the supplied dialog (not owned by authenticated organization or has additional scope requirements defined in policy)." + }, + "404": { + "description": "The given dialog ID was not found or is already deleted.", + "content": { + "application/problem+json": { + "schema": { + "$ref": "#/components/schemas/ProblemDetails" + } + } + } + } + }, + "security": [ + { + "JWTBearerAuth": [] + } + ] + } + }, + "/api/v1/enduser/dialogs/{dialogId}/labellog": { + "get": { + "tags": [ + "Enduser" + ], + "operationId": "V1EndUserDialogLabelAssignmentLogsSearch_SearchDialogLabelAssignmentLog", + "parameters": [ + { + "name": "dialogId", + "in": "path", + "required": true, + "schema": { + "type": "string", + "format": "guid" + } + } + ], + "responses": { + "200": { + "description": "Success", + "content": { + "application/json": { + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/V1EndUserDialogLabelAssignmentLogQueriesSearch_LabelAssignmentLog" + } + } + } + } + }, + "401": { + "description": "Unauthorized" + }, + "403": { + "description": "Forbidden" + }, + "404": { + "description": "Not Found", + "content": { + "application/problem+json": { + "schema": { + "$ref": "#/components/schemas/ProblemDetails" + } + } + } + }, + "410": { + "description": "" + } + }, + "security": [ + { + "JWTBearerAuth": [] + } + ] + } + }, + "/api/v1/enduser/dialogs/{dialogId}/activities": { + "get": { + "tags": [ + "Enduser" + ], + "summary": "Gets a list of dialog activities", + "description": "Gets the list of activities belonging to a dialog", + "operationId": "V1EndUserDialogActivitiesSearch_SearchDialogActivity", + "parameters": [ + { + "name": "dialogId", + "in": "path", + "required": true, + "schema": { + "type": "string", + "format": "guid" + } + } + ], + "responses": { + "200": { + "description": "Successfully returned the dialog activity list.", + "content": { + "application/json": { + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/V1EndUserDialogActivitiesQueriesSearch_Activity" + } + } + } + } + }, + "401": { + "description": "Missing or invalid authentication token. Requires a Maskinporten-token with the scope \"digdir:dialogporten\"." + }, + "403": { + "description": "Unauthorized to get the supplied dialog (not owned by authenticated organization or has additional scope requirements defined in policy)." + } + }, + "security": [ + { + "JWTBearerAuth": [] + } + ] + } + }, + "/api/v1/enduser/dialogs/{dialogId}/activities/{activityId}": { + "get": { + "tags": [ + "Enduser" + ], + "summary": "Gets a single dialog activity", + "description": "Gets a single activity belonging to a dialog. For more information see the documentation (link TBD).", + "operationId": "V1EndUserDialogActivitiesGet_GetDialogActivity", + "parameters": [ + { + "name": "dialogId", + "in": "path", + "required": true, + "schema": { + "type": "string", + "format": "guid" + } + }, + { + "name": "activityId", + "in": "path", + "required": true, + "schema": { + "type": "string", + "format": "guid" + } + } + ], + "responses": { + "200": { + "description": "Successfully returned the dialog activity.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/V1EndUserDialogActivitiesQueriesGet_Activity" + } + } + } + }, + "401": { + "description": "Missing or invalid authentication token. Requires a Maskinporten-token with the scope \"digdir:dialogporten\"." + }, + "403": { + "description": "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": { + "description": "The given dialog ID was not found or was deleted, or the given activity ID was not found.", + "content": { + "application/problem+json": { + "schema": { + "$ref": "#/components/schemas/ProblemDetails" + } + } + } + } + }, + "security": [ + { + "JWTBearerAuth": [] + } + ] + } + } + }, + "components": { + "schemas": { + "V1WellKnownOauthAuthorizationServerQueriesGet_GetOauthAuthorizationServer": { + "type": "object", + "additionalProperties": false, + "properties": { + "issuer": { + "type": "string" + }, + "jwks_uri": { + "type": "string" + } + } + }, + "V1WellKnownJwksQueriesGet_GetJwks": { + "type": "object", + "additionalProperties": false, + "properties": { + "keys": { + "type": "array", + "items": { + "$ref": "#/components/schemas/V1WellKnownJwksQueriesGet_Jwk" + } + } + } + }, + "V1WellKnownJwksQueriesGet_Jwk": { + "type": "object", + "additionalProperties": false, + "properties": { + "kty": { + "type": "string" + }, + "use": { + "type": "string" + }, + "kid": { + "type": "string" + }, + "crv": { + "type": "string" + }, + "x": { + "type": "string" + }, + "alg": { + "type": "string" + } + } + }, + "V1ServiceOwnerDialogTransmissionsQueriesSearch_Transmission": { + "type": "object", + "additionalProperties": false, + "properties": { + "id": { + "type": "string", + "description": "The unique identifier for the transmission in UUIDv7 format.", + "format": "guid" + }, + "createdAt": { + "type": "string", + "description": "The date and time when the transmission was created.", + "format": "date-time" + }, + "authorizationAttribute": { + "type": "string", + "description": "The authorization attribute associated with the transmission.", + "nullable": true + }, + "extendedType": { + "type": "string", + "description": "The extended type URI for the transmission.", + "format": "uri", + "nullable": true + }, + "relatedTransmissionId": { + "type": "string", + "description": "The unique identifier for the related transmission, if any.", + "format": "guid", + "nullable": true + }, + "deletedAt": { + "type": "string", + "description": "The date and time when the transmission was deleted, if applicable.", + "format": "date-time", + "nullable": true + }, + "type": { + "description": "The type of the transmission.", + "oneOf": [ + { + "$ref": "#/components/schemas/DialogsEntitiesTransmissions_DialogTransmissionType" + } + ] + }, + "sender": { + "description": "The sender actor information for the transmission.", + "oneOf": [ + { + "$ref": "#/components/schemas/V1ServiceOwnerCommonActors_Actor" + } + ] + }, + "content": { + "description": "The content of the transmission.", + "oneOf": [ + { + "$ref": "#/components/schemas/V1ServiceOwnerDialogTransmissionsQueriesSearch_Content" + } + ] + }, + "attachments": { + "type": "array", + "description": "The attachments associated with the transmission.", + "items": { + "$ref": "#/components/schemas/V1ServiceOwnerDialogTransmissionsQueriesSearch_Attachment" + } + } + } + }, + "DialogsEntitiesTransmissions_DialogTransmissionType": { + "type": "string", + "description": "", + "x-enumNames": [ + "Information", + "Acceptance", + "Rejection", + "Request", + "Alert", + "Decision", + "Submission", + "Correction" + ], + "enum": [ + "Information", + "Acceptance", + "Rejection", + "Request", + "Alert", + "Decision", + "Submission", + "Correction" + ] + }, + "V1ServiceOwnerCommonActors_Actor": { + "type": "object", + "additionalProperties": false, + "properties": { + "actorType": { + "description": "The type of actor that sent the transmission.", + "oneOf": [ + { + "$ref": "#/components/schemas/Actors_ActorType" + } + ] + }, + "actorName": { + "type": "string", + "description": "Specifies the name of the entity that sent the transmission. Mutually exclusive with ActorId. If ActorId\nis supplied, the name will be automatically populated from the name registries.", + "nullable": true, + "example": "Ola Nordmann" + }, + "actorId": { + "type": "string", + "description": "The identifier of the person or organization that sent the transmission. Mutually exclusive with ActorName.\nMight be omitted if ActorType is \"ServiceOwner\".", + "nullable": true, + "example": "urn:altinn:person:identifier-no:12018212345" + } + } + }, + "Actors_ActorType": { + "type": "string", + "description": "", + "x-enumNames": [ + "PartyRepresentative", + "ServiceOwner" + ], + "enum": [ + "PartyRepresentative", + "ServiceOwner" + ] + }, + "V1ServiceOwnerDialogTransmissionsQueriesSearch_Content": { + "type": "object", + "additionalProperties": false, + "properties": { + "title": { + "description": "The title of the content.", + "oneOf": [ + { + "$ref": "#/components/schemas/V1CommonContent_ContentValue" + } + ] + }, + "summary": { + "description": "The summary of the content.", + "oneOf": [ + { + "$ref": "#/components/schemas/V1CommonContent_ContentValue" + } + ] + }, + "contentReference": { + "description": "Front-channel embedded content. Used to dynamically embed content in the frontend from an external URL.", + "nullable": true, + "oneOf": [ + { + "$ref": "#/components/schemas/V1CommonContent_ContentValue" + } + ] + } + } + }, + "V1CommonContent_ContentValue": { + "type": "object", + "additionalProperties": false, + "properties": { + "value": { + "type": "array", + "description": "A list of localizations for the content.", + "items": { + "$ref": "#/components/schemas/V1CommonLocalizations_Localization" + } + }, + "mediaType": { + "type": "string", + "description": "Media type of the content, this can also indicate that the content is embeddable.\nFor a list of supported media types, see (link TBD)." + } + } + }, + "V1CommonLocalizations_Localization": { + "type": "object", + "additionalProperties": false, + "properties": { + "value": { + "type": "string", + "description": "The localized text or URI reference." + }, + "languageCode": { + "type": "string", + "description": "The language code of the localization in ISO 639-1 format.", + "example": "nb" + } + } + }, + "V1ServiceOwnerDialogTransmissionsQueriesSearch_Attachment": { + "type": "object", + "additionalProperties": false, + "properties": { + "id": { + "type": "string", + "description": "The unique identifier for the attachment in UUIDv7 format.", + "format": "guid" + }, + "displayName": { + "type": "array", + "description": "The display name of the attachment that should be used in GUIs.", + "items": { + "$ref": "#/components/schemas/V1CommonLocalizations_Localization" + } + }, + "urls": { + "type": "array", + "description": "The URLs associated with the attachment, each referring to a different representation of the attachment.", + "items": { + "$ref": "#/components/schemas/V1ServiceOwnerDialogTransmissionsQueriesSearch_AttachmentUrl" + } + } + } + }, + "V1ServiceOwnerDialogTransmissionsQueriesSearch_AttachmentUrl": { + "type": "object", + "additionalProperties": false, + "properties": { + "id": { + "type": "string", + "description": "The unique identifier for the attachment URL in UUIDv7 format.", + "format": "guid" + }, + "url": { + "type": "string", + "description": "The fully qualified URL of the attachment. Will be set to \"urn:dialogporten:unauthorized\" if the user is\nnot authorized to access the transmission.", + "format": "uri", + "example": "https://someendpoint.com/someattachment.pdf\nurn:dialogporten:unauthorized" + }, + "mediaType": { + "type": "string", + "description": "The media type of the attachment.", + "nullable": true, + "example": "application/pdf\napplication/zip" + }, + "consumerType": { + "description": "The type of consumer the URL is intended for.", + "oneOf": [ + { + "$ref": "#/components/schemas/Attachments_AttachmentUrlConsumerType" + } + ] + } + } + }, + "Attachments_AttachmentUrlConsumerType": { + "type": "string", + "description": "", + "x-enumNames": [ + "Gui", + "Api" + ], + "enum": [ + "Gui", + "Api" + ] + }, + "V1ServiceOwnerDialogTransmissionsQueriesGet_Transmission": { + "type": "object", + "additionalProperties": false, + "properties": { + "id": { + "type": "string", + "description": "The unique identifier for the transmission in UUIDv7 format.", + "format": "guid" + }, + "createdAt": { + "type": "string", + "description": "The date and time when the transmission was created.", + "format": "date-time" + }, + "authorizationAttribute": { + "type": "string", + "description": "The authorization attribute associated with the transmission.", + "nullable": true + }, + "extendedType": { + "type": "string", + "description": "The extended type URI for the transmission.", + "format": "uri", + "nullable": true + }, + "relatedTransmissionId": { + "type": "string", + "description": "The unique identifier for the related transmission, if any.", + "format": "guid", + "nullable": true + }, + "deletedAt": { + "type": "string", + "description": "The date and time when the transmission was deleted, if applicable.", + "format": "date-time", + "nullable": true + }, + "type": { + "description": "The type of the transmission.", + "oneOf": [ + { + "$ref": "#/components/schemas/DialogsEntitiesTransmissions_DialogTransmissionType" + } + ] + }, + "sender": { + "description": "The sender actor information for the transmission.", + "oneOf": [ + { + "$ref": "#/components/schemas/V1ServiceOwnerCommonActors_Actor" + } + ] + }, + "content": { + "description": "The content of the transmission.", + "oneOf": [ + { + "$ref": "#/components/schemas/V1ServiceOwnerDialogTransmissionsQueriesGet_Content" + } + ] + }, + "attachments": { + "type": "array", + "description": "The attachments associated with the transmission.", + "items": { + "$ref": "#/components/schemas/V1ServiceOwnerDialogTransmissionsQueriesGet_Attachment" + } + } + } + }, + "ProblemDetails": { + "type": "object", + "additionalProperties": false, + "properties": { + "type": { + "type": "string", + "default": "https://www.rfc-editor.org/rfc/rfc7231#section-6.5.1" + }, + "title": { + "type": "string", + "default": "One or more validation errors occurred." + }, + "status": { + "type": "integer", + "format": "int32", + "default": 400 + }, + "instance": { + "type": "string", + "default": "/api/route" + }, + "traceId": { + "type": "string", + "default": "0HMPNHL0JHL76:00000001" + }, + "detail": { + "type": "string", + "nullable": true + }, + "errors": { + "type": "array", + "items": { + "$ref": "#/components/schemas/ProblemDetails_Error" + } + } + } + }, + "ProblemDetails_Error": { + "type": "object", + "additionalProperties": false, + "properties": { + "name": { + "type": "string", + "default": "Error or field name" + }, + "reason": { + "type": "string", + "default": "Error reason" + }, + "code": { + "type": "string", + "nullable": true + }, + "severity": { + "type": "string", + "nullable": true + } + } + }, + "V1ServiceOwnerDialogTransmissionsQueriesGet_Content": { + "type": "object", + "additionalProperties": false, + "properties": { + "title": { + "description": "The title of the content.", + "oneOf": [ + { + "$ref": "#/components/schemas/V1CommonContent_ContentValue" + } + ] + }, + "summary": { + "description": "The summary of the content.", + "oneOf": [ + { + "$ref": "#/components/schemas/V1CommonContent_ContentValue" + } + ] + }, + "contentReference": { + "description": "Front-channel embedded content. Used to dynamically embed content in the frontend from an external URL.\nAllowed media types: application/vnd.dialogporten.frontchannelembed+json;type=markdown", + "nullable": true, + "oneOf": [ + { + "$ref": "#/components/schemas/V1CommonContent_ContentValue" + } + ] + } + } + }, + "V1ServiceOwnerDialogTransmissionsQueriesGet_Attachment": { + "type": "object", + "additionalProperties": false, + "properties": { + "id": { + "type": "string", + "description": "The unique identifier for the attachment in UUIDv7 format.", + "format": "guid" + }, + "displayName": { + "type": "array", + "description": "The display name of the attachment that should be used in GUIs.", + "items": { + "$ref": "#/components/schemas/V1CommonLocalizations_Localization" + } + }, + "urls": { + "type": "array", + "description": "The URLs associated with the attachment, each referring to a different representation of the attachment.", + "items": { + "$ref": "#/components/schemas/V1ServiceOwnerDialogTransmissionsQueriesGet_AttachmentUrl" + } + } + } + }, + "V1ServiceOwnerDialogTransmissionsQueriesGet_AttachmentUrl": { + "type": "object", + "additionalProperties": false, + "properties": { + "id": { + "type": "string", + "description": "The unique identifier for the attachment URL in UUIDv7 format.", + "format": "guid" + }, + "url": { + "type": "string", + "description": "The fully qualified URL of the attachment. Will be set to \"urn:dialogporten:unauthorized\" if the user is\nnot authorized to access the transmission.", + "format": "uri", + "example": "https://someendpoint.com/someattachment.pdf\nurn:dialogporten:unauthorized" + }, + "mediaType": { + "type": "string", + "description": "The media type of the attachment.", + "nullable": true, + "example": "application/pdf\napplication/zip" + }, + "consumerType": { + "description": "The type of consumer the URL is intended for.", + "oneOf": [ + { + "$ref": "#/components/schemas/Attachments_AttachmentUrlConsumerType" + } + ] + } + } + }, + "V1ServiceOwnerDialogTransmissionsCreate_TransmissionRequest": { + "type": "object", + "additionalProperties": false, + "properties": { + "id": { + "type": "string", + "description": "The UUDIv7 of the action may be provided to support idempotent additions to the list of transmissions.\nIf not supplied, a new UUIDv7 will be generated.", + "format": "guid", + "nullable": true, + "example": "01913cd5-784f-7d3b-abef-4c77b1f0972d" + }, + "createdAt": { + "type": "string", + "description": "If supplied, overrides the creating date and time for the transmission.\nIf not supplied, the current date /time will be used.", + "format": "date-time" + }, + "authorizationAttribute": { + "type": "string", + "description": "Contains an authorization resource attributeId, that can used in custom authorization rules in the XACML service\npolicy, which by default is the policy belonging to the service referred to by \"serviceResource\" in the dialog.\n \nCan also be used to refer to other service policies.", + "nullable": true, + "example": "mycustomresource\n/* equivalent to the above */\nurn:altinn:subresource:mycustomresource\nurn:altinn:task:Task_1\n/* refer to another service */\nurn:altinn:resource:some-other-service-identifier" + }, + "extendedType": { + "type": "string", + "description": "Arbitrary URI/URN describing a service-specific transmission type.\n \nRefer to the service-specific documentation provided by the service owner for details (if in use).", + "format": "uri", + "nullable": true + }, + "relatedTransmissionId": { + "type": "string", + "description": "Reference to any other transmission that this transmission is related to.", + "format": "guid", + "nullable": true + }, + "type": { + "description": "The type of transmission.", + "oneOf": [ + { + "$ref": "#/components/schemas/DialogsEntitiesTransmissions_DialogTransmissionType" + } + ] + }, + "sender": { + "description": "The actor that sent the transmission.", + "oneOf": [ + { + "$ref": "#/components/schemas/V1ServiceOwnerCommonActors_Actor" + } + ] + }, + "content": { + "description": "The transmission unstructured text content.", + "oneOf": [ + { + "$ref": "#/components/schemas/V1ServiceOwnerDialogsCommandsUpdate_TransmissionContent" + } + ] + }, + "attachments": { + "type": "array", + "description": "The transmission-level attachments.", + "items": { + "$ref": "#/components/schemas/V1ServiceOwnerDialogsCommandsUpdate_TransmissionAttachment" + } + } + } + }, + "V1ServiceOwnerDialogsCommandsUpdate_TransmissionContent": { + "type": "object", + "additionalProperties": false, + "properties": { + "title": { + "description": "The transmission title. Must be text/plain.", + "oneOf": [ + { + "$ref": "#/components/schemas/V1CommonContent_ContentValue" + } + ] + }, + "summary": { + "description": "The transmission summary.", + "oneOf": [ + { + "$ref": "#/components/schemas/V1CommonContent_ContentValue" + } + ] + }, + "contentReference": { + "description": "Front-channel embedded content. Used to dynamically embed content in the frontend from an external URL. Must be HTTPS.\nAllowed media types: application/vnd.dialogporten.frontchannelembed+json;type=markdown", + "nullable": true, + "oneOf": [ + { + "$ref": "#/components/schemas/V1CommonContent_ContentValue" + } + ] + } + } + }, + "V1ServiceOwnerDialogsCommandsUpdate_TransmissionAttachment": { + "type": "object", + "additionalProperties": false, + "properties": { + "id": { + "type": "string", + "description": "A self-defined UUIDv7 may be provided to support idempotent additions of transmission attachments. If not provided, a new UUIDv7 will be generated.", + "format": "guid", + "nullable": true, + "example": "01913cd5-784f-7d3b-abef-4c77b1f0972d" + }, + "displayName": { + "type": "array", + "description": "The display name of the attachment that should be used in GUIs.", + "items": { + "$ref": "#/components/schemas/V1CommonLocalizations_Localization" + } + }, + "urls": { + "type": "array", + "description": "The URLs associated with the attachment, each referring to a different representation of the attachment.", + "items": { + "$ref": "#/components/schemas/V1ServiceOwnerDialogsCommandsUpdate_TransmissionAttachmentUrl" + } + } + } + }, + "V1ServiceOwnerDialogsCommandsUpdate_TransmissionAttachmentUrl": { + "type": "object", + "additionalProperties": false, + "properties": { + "url": { + "type": "string", + "description": "The fully qualified URL of the attachment.", + "format": "uri" + }, + "mediaType": { + "type": "string", + "description": "The media type of the attachment.", + "nullable": true, + "example": "application/pdf\napplication/zip" + }, + "consumerType": { + "description": "The type of consumer the URL is intended for.", + "oneOf": [ + { + "$ref": "#/components/schemas/Attachments_AttachmentUrlConsumerType" + } + ] + } + } + }, + "V1ServiceOwnerDialogSeenLogsQueriesSearch_SeenLog": { + "type": "object", + "additionalProperties": false, + "properties": { + "id": { + "type": "string", + "format": "guid" + }, + "seenAt": { + "type": "string", + "format": "date-time" + }, + "seenBy": { + "$ref": "#/components/schemas/V1ServiceOwnerCommonActors_Actor" + }, + "isViaServiceOwner": { + "type": "boolean", + "nullable": true + } + } + }, + "V1ServiceOwnerDialogSeenLogsQueriesGet_SeenLog": { + "type": "object", + "additionalProperties": false, + "properties": { + "id": { + "type": "string", + "format": "guid" + }, + "seenAt": { + "type": "string", + "format": "date-time" + }, + "seenBy": { + "$ref": "#/components/schemas/V1ServiceOwnerCommonActors_Actor" + }, + "isViaServiceOwner": { + "type": "boolean", + "nullable": true + } + } + }, + "V1ServiceOwnerDialogsUpdate_DialogRequest": { + "type": "object", + "additionalProperties": false, + "properties": { + "dto": { + "$ref": "#/components/schemas/V1ServiceOwnerDialogsCommandsUpdate_Dialog" + } + } + }, + "V1ServiceOwnerDialogsCommandsUpdate_Dialog": { + "type": "object", + "additionalProperties": false, + "properties": { + "progress": { + "type": "integer", + "description": "Advisory indicator of progress, represented as 1-100 percentage value. 100% representing a dialog that has come\nto a natural completion (successful or not).", + "format": "int32", + "nullable": true + }, + "extendedStatus": { + "type": "string", + "description": "Arbitrary string with a service-specific indicator of status, typically used to indicate a fine-grained state of\nthe dialog to further specify the \"status\" enum.", + "nullable": true + }, + "externalReference": { + "type": "string", + "description": "Arbitrary string with a service-specific reference to an external system or service.", + "nullable": true + }, + "visibleFrom": { + "type": "string", + "description": "The timestamp when the dialog should be made visible for authorized end users. If not provided, the dialog will be\nimmediately available.", + "format": "date-time", + "nullable": true, + "example": "2022-12-31T23:59:59Z" + }, + "dueAt": { + "type": "string", + "description": "The due date for the dialog. Dialogs past due date might be marked as such in frontends but will still be available.", + "format": "date-time", + "nullable": true, + "example": "2022-12-31T23:59:59Z" + }, + "expiresAt": { + "type": "string", + "description": "The expiration date for the dialog. This is the last date when the dialog is available for the end user.\n \nAfter this date is passed, the dialog will be considered expired and no longer available for the end user in any\nAPI. If not supplied, the dialog will be considered to never expire. This field can be changed after creation.", + "format": "date-time", + "nullable": true, + "example": "2022-12-31T23:59:59Z" + }, + "status": { + "description": "The aggregated status of the dialog.", + "oneOf": [ + { + "$ref": "#/components/schemas/DialogsEntities_DialogStatus" + } + ] + }, + "content": { + "description": "The dialog unstructured text content.", + "oneOf": [ + { + "$ref": "#/components/schemas/V1ServiceOwnerDialogsCommandsUpdate_Content" + } + ] + }, + "searchTags": { + "type": "array", + "description": "A list of words (tags) that will be used in dialog search queries. Not visible in end-user DTO.", + "items": { + "$ref": "#/components/schemas/V1ServiceOwnerDialogsCommandsUpdate_SearchTag" + } + }, + "attachments": { + "type": "array", + "description": "The attachments associated with the dialog (on an aggregate level).", + "items": { + "$ref": "#/components/schemas/V1ServiceOwnerDialogsCommandsUpdate_Attachment" + } + }, + "transmissions": { + "type": "array", + "description": "The immutable list of transmissions associated with the dialog. When updating via PUT, any transmissions\nadded here will be appended to the existing list of transmissions.", + "items": { + "$ref": "#/components/schemas/V1ServiceOwnerDialogsCommandsUpdate_Transmission" + } + }, + "guiActions": { + "type": "array", + "description": "The GUI actions associated with the dialog. Should be used in browser-based interactive frontends.", + "items": { + "$ref": "#/components/schemas/V1ServiceOwnerDialogsCommandsUpdate_GuiAction" + } + }, + "apiActions": { + "type": "array", + "description": "The API actions associated with the dialog. Should be used in specialized, non-browser-based integrations.", + "items": { + "$ref": "#/components/schemas/V1ServiceOwnerDialogsCommandsUpdate_ApiAction" + } + }, + "activities": { + "type": "array", + "description": "An immutable list of activities associated with the dialog. When updating via PUT, any activities added here\nwill be appended to the existing list of activities.", + "items": { + "$ref": "#/components/schemas/V1ServiceOwnerDialogsCommandsUpdate_Activity" + } + } + } + }, + "DialogsEntities_DialogStatus": { + "type": "string", + "description": "", + "x-enumNames": [ + "New", + "InProgress", + "Draft", + "Sent", + "RequiresAttention", + "Completed" + ], + "enum": [ + "New", + "InProgress", + "Draft", + "Sent", + "RequiresAttention", + "Completed" + ] + }, + "V1ServiceOwnerDialogsCommandsUpdate_Content": { + "type": "object", + "additionalProperties": false, + "properties": { + "title": { + "description": "The title of the dialog. Must be text/plain.", + "oneOf": [ + { + "$ref": "#/components/schemas/V1CommonContent_ContentValue" + } + ] + }, + "summary": { + "description": "A short summary of the dialog and its current state. Must be text/plain.", + "oneOf": [ + { + "$ref": "#/components/schemas/V1CommonContent_ContentValue" + } + ] + }, + "senderName": { + "description": "Overridden sender name. If not supplied, assume \"org\" as the sender name. Must be text/plain if supplied.", + "nullable": true, + "oneOf": [ + { + "$ref": "#/components/schemas/V1CommonContent_ContentValue" + } + ] + }, + "additionalInfo": { + "description": "Additional information about the dialog, this may contain Markdown.", + "nullable": true, + "oneOf": [ + { + "$ref": "#/components/schemas/V1CommonContent_ContentValue" + } + ] + }, + "extendedStatus": { + "description": "Used as the human-readable label used to describe the \"ExtendedStatus\" field. Must be text/plain.", + "nullable": true, + "oneOf": [ + { + "$ref": "#/components/schemas/V1CommonContent_ContentValue" + } + ] + }, + "mainContentReference": { + "description": "Front-channel embedded content. Used to dynamically embed content in the frontend from an external URL. Must be HTTPS.", + "nullable": true, + "oneOf": [ + { + "$ref": "#/components/schemas/V1CommonContent_ContentValue" + } + ] + } + } + }, + "V1ServiceOwnerDialogsCommandsUpdate_SearchTag": { + "type": "object", + "additionalProperties": false, + "properties": { + "value": { + "type": "string", + "description": "A search tag value." + } + } + }, + "V1ServiceOwnerDialogsCommandsUpdate_Attachment": { + "type": "object", + "additionalProperties": false, + "properties": { + "id": { + "type": "string", + "description": "A self-defined UUIDv7 may be provided to support idempotent additions of attachments. If not provided, a new UUIDv7 will be generated.", + "format": "guid", + "nullable": true, + "example": "01913cd5-784f-7d3b-abef-4c77b1f0972d" + }, + "displayName": { + "type": "array", + "description": "The display name of the attachment that should be used in GUIs.", + "items": { + "$ref": "#/components/schemas/V1CommonLocalizations_Localization" + } + }, + "urls": { + "type": "array", + "description": "The URLs associated with the attachment, each referring to a different representation of the attachment.", + "items": { + "$ref": "#/components/schemas/V1ServiceOwnerDialogsCommandsUpdate_AttachmentUrl" + } + } + } + }, + "V1ServiceOwnerDialogsCommandsUpdate_AttachmentUrl": { + "type": "object", + "additionalProperties": false, + "properties": { + "id": { + "type": "string", + "description": "A UUIDv7 used for merging existing data, unknown IDs will be ignored as this entity does not support user-defined IDs.", + "format": "guid", + "nullable": true, + "example": "01913cd5-784f-7d3b-abef-4c77b1f0972d" + }, + "url": { + "type": "string", + "description": "The fully qualified URL of the attachment.", + "format": "uri" + }, + "mediaType": { + "type": "string", + "description": "The media type of the attachment.", + "nullable": true, + "example": "application/pdf\napplication/zip" + }, + "consumerType": { + "description": "The type of consumer the URL is intended for.", + "oneOf": [ + { + "$ref": "#/components/schemas/Attachments_AttachmentUrlConsumerType" + } + ] + } + } + }, + "V1ServiceOwnerDialogsCommandsUpdate_Transmission": { + "type": "object", + "additionalProperties": false, + "properties": { + "id": { + "type": "string", + "description": "The UUDIv7 of the action may be provided to support idempotent additions to the list of transmissions.\nIf not supplied, a new UUIDv7 will be generated.", + "format": "guid", + "nullable": true, + "example": "01913cd5-784f-7d3b-abef-4c77b1f0972d" + }, + "createdAt": { + "type": "string", + "description": "If supplied, overrides the creating date and time for the transmission.\nIf not supplied, the current date /time will be used.", + "format": "date-time" + }, + "authorizationAttribute": { + "type": "string", + "description": "Contains an authorization resource attributeId, that can used in custom authorization rules in the XACML service\npolicy, which by default is the policy belonging to the service referred to by \"serviceResource\" in the dialog.\n \nCan also be used to refer to other service policies.", + "nullable": true, + "example": "mycustomresource\n/* equivalent to the above */\nurn:altinn:subresource:mycustomresource\nurn:altinn:task:Task_1\n/* refer to another service */\nurn:altinn:resource:some-other-service-identifier" + }, + "extendedType": { + "type": "string", + "description": "Arbitrary URI/URN describing a service-specific transmission type.\n \nRefer to the service-specific documentation provided by the service owner for details (if in use).", + "format": "uri", + "nullable": true + }, + "relatedTransmissionId": { + "type": "string", + "description": "Reference to any other transmission that this transmission is related to.", + "format": "guid", + "nullable": true + }, + "type": { + "description": "The type of transmission.", + "oneOf": [ + { + "$ref": "#/components/schemas/DialogsEntitiesTransmissions_DialogTransmissionType" + } + ] + }, + "sender": { + "description": "The actor that sent the transmission.", + "oneOf": [ + { + "$ref": "#/components/schemas/V1ServiceOwnerCommonActors_Actor" + } + ] + }, + "content": { + "description": "The transmission unstructured text content.", + "oneOf": [ + { + "$ref": "#/components/schemas/V1ServiceOwnerDialogsCommandsUpdate_TransmissionContent" + } + ] + }, + "attachments": { + "type": "array", + "description": "The transmission-level attachments.", + "items": { + "$ref": "#/components/schemas/V1ServiceOwnerDialogsCommandsUpdate_TransmissionAttachment" + } + } + } + }, + "V1ServiceOwnerDialogsCommandsUpdate_GuiAction": { + "type": "object", + "additionalProperties": false, + "properties": { + "id": { + "type": "string", + "description": "A self-defined UUIDv7 may be provided to support idempotent additions of Gui Actions. If not provided, a new UUIDv7 will be generated.", + "format": "guid", + "nullable": true, + "example": "01913cd5-784f-7d3b-abef-4c77b1f0972d" + }, + "action": { + "type": "string", + "description": "The action identifier for the action, corresponding to the \"action\" attributeId used in the XACML service policy." + }, + "url": { + "type": "string", + "description": "The fully qualified URL of the action, to which the user will be redirected when the action is triggered. Will be set to\n\"urn:dialogporten:unauthorized\" if the user is not authorized to perform the action.", + "format": "uri", + "example": "urn:dialogporten:unauthorized\nhttps://someendpoint.com/gui/some-service-instance-id" + }, + "authorizationAttribute": { + "type": "string", + "description": "Contains an authorization resource attributeId, that can used in custom authorization rules in the XACML service\npolicy, which by default is the policy belonging to the service referred to by \"serviceResource\" in the dialog.\n \nCan also be used to refer to other service policies.", + "nullable": true, + "example": "mycustomresource\n/* equivalent to the above */\nurn:altinn:subresource:mycustomresource\nurn:altinn:task:Task_1\n/* refer to another service */\nurn:altinn:resource:some-other-service-identifier" + }, + "isDeleteDialogAction": { + "type": "boolean", + "description": "Indicates whether the action results in the dialog being deleted. Used by frontends to implement custom UX\nfor delete actions." + }, + "httpMethod": { + "description": "The HTTP method that the frontend should use when redirecting the user.", + "nullable": true, + "oneOf": [ + { + "$ref": "#/components/schemas/Http_HttpVerb" + } + ] + }, + "priority": { + "description": "Indicates a priority for the action, making it possible for frontends to adapt GUI elements based on action\npriority.", + "oneOf": [ + { + "$ref": "#/components/schemas/DialogsEntitiesActions_DialogGuiActionPriority" + } + ] + }, + "title": { + "type": "array", + "description": "The title of the action, this should be short and in verb form. Must be text/plain.", + "items": { + "$ref": "#/components/schemas/V1CommonLocalizations_Localization" + } + }, + "prompt": { + "type": "array", + "description": "If there should be a prompt asking the user for confirmation before the action is executed,\nthis field should contain the prompt text.", + "nullable": true, + "items": { + "$ref": "#/components/schemas/V1CommonLocalizations_Localization" + } + } + } + }, + "Http_HttpVerb": { + "type": "string", + "description": "", + "x-enumNames": [ + "GET", + "POST", + "PUT", + "PATCH", + "DELETE", + "HEAD", + "OPTIONS", + "TRACE", + "CONNECT" + ], + "enum": [ + "GET", + "POST", + "PUT", + "PATCH", + "DELETE", + "HEAD", + "OPTIONS", + "TRACE", + "CONNECT" + ] + }, + "DialogsEntitiesActions_DialogGuiActionPriority": { + "type": "string", + "description": "", + "x-enumNames": [ + "Primary", + "Secondary", + "Tertiary" + ], + "enum": [ + "Primary", + "Secondary", + "Tertiary" + ] + }, + "V1ServiceOwnerDialogsCommandsUpdate_ApiAction": { + "type": "object", + "additionalProperties": false, + "properties": { + "id": { + "type": "string", + "description": "A self-defined UUIDv7 may be provided to support idempotent additions of Api Actions. If not provided, a new UUIDv7 will be generated.", + "format": "guid", + "nullable": true, + "example": "01913cd5-784f-7d3b-abef-4c77b1f0972d" + }, + "action": { + "type": "string", + "description": "String identifier for the action, corresponding to the \"action\" attributeId used in the XACML service policy,\nwhich by default is the policy belonging to the service referred to by \"serviceResource\" in the dialog.", + "example": "write" + }, + "authorizationAttribute": { + "type": "string", + "description": "Contains an authorization resource attributeId, that can used in custom authorization rules in the XACML service\npolicy, which by default is the policy belonging to the service referred to by \"serviceResource\" in the dialog.\n \nCan also be used to refer to other service policies.", + "nullable": true, + "example": "mycustomresource\n/* equivalent to the above */\nurn:altinn:subresource:mycustomresource\nurn:altinn:task:Task_1\n/* refer to another service */\nurn:altinn:resource:some-other-service-identifier" + }, + "endpoints": { + "type": "array", + "description": "The endpoints associated with the action.", + "items": { + "$ref": "#/components/schemas/V1ServiceOwnerDialogsCommandsUpdate_ApiActionEndpoint" + } + } + } + }, + "V1ServiceOwnerDialogsCommandsUpdate_ApiActionEndpoint": { + "type": "object", + "additionalProperties": false, + "properties": { + "id": { + "type": "string", + "description": "A UUIDv7 used for merging existing data, unknown IDs will be ignored as this entity does not support user-defined IDs.", + "format": "guid", + "nullable": true, + "example": "01913cd5-784f-7d3b-abef-4c77b1f0972d" + }, + "version": { + "type": "string", + "description": "Arbitrary string indicating the version of the endpoint.", + "nullable": true + }, + "url": { + "type": "string", + "description": "The fully qualified URL of the API endpoint.", + "format": "uri" + }, + "httpMethod": { + "description": "The HTTP method that the endpoint expects for this action.", + "oneOf": [ + { + "$ref": "#/components/schemas/Http_HttpVerb" + } + ] + }, + "documentationUrl": { + "type": "string", + "description": "Link to documentation for the endpoint, providing documentation for integrators. Should be a URL to a\nhuman-readable page.", + "format": "uri", + "nullable": true + }, + "requestSchema": { + "type": "string", + "description": "Link to the request schema for the endpoint. Used to provide documentation for integrators.\nDialogporten will not validate information on this endpoint.", + "format": "uri", + "nullable": true + }, + "responseSchema": { + "type": "string", + "description": "Link to the response schema for the endpoint. Used to provide documentation for integrators.\nDialogporten will not validate information on this endpoint.", + "format": "uri", + "nullable": true + }, + "deprecated": { + "type": "boolean", + "description": "Boolean indicating if the endpoint is deprecated." + }, + "sunsetAt": { + "type": "string", + "description": "Date and time when the endpoint will no longer function. Only set if the endpoint is deprecated. Dialogporten\nwill not enforce this date.", + "format": "date-time", + "nullable": true + } + } + }, + "V1ServiceOwnerDialogsCommandsUpdate_Activity": { + "type": "object", + "additionalProperties": false, + "properties": { + "id": { + "type": "string", + "description": "The UUDIv7 of the action may be provided to support idempotent additions to the list of activities.\nIf not supplied, a new UUIDv7 will be generated.", + "format": "guid", + "nullable": true, + "example": "01913cd5-784f-7d3b-abef-4c77b1f0972d" + }, + "createdAt": { + "type": "string", + "description": "If supplied, overrides the creating date and time for the transmission.\nIf not supplied, the current date /time will be used.", + "format": "date-time", + "nullable": true + }, + "extendedType": { + "type": "string", + "description": "Arbitrary URI/URN describing a service-specific transmission type.", + "format": "uri", + "nullable": true + }, + "type": { + "description": "The type of transmission.", + "oneOf": [ + { + "$ref": "#/components/schemas/DialogsEntitiesActivities_DialogActivityType" + } + ] + }, + "transmissionId": { + "type": "string", + "description": "If the activity is related to a particular transmission, this field will contain the transmission identifier.\nMust be present in the request body.", + "format": "guid", + "nullable": true + }, + "performedBy": { + "description": "The actor that performed the activity.", + "oneOf": [ + { + "$ref": "#/components/schemas/V1ServiceOwnerCommonActors_Actor" + } + ] + }, + "description": { + "type": "array", + "description": "Unstructured text describing the activity. Only set if the activity type is \"Information\".", + "items": { + "$ref": "#/components/schemas/V1CommonLocalizations_Localization" + } + } + } + }, + "DialogsEntitiesActivities_DialogActivityType": { + "type": "string", + "description": "", + "x-enumNames": [ + "DialogCreated", + "DialogClosed", + "Information", + "TransmissionOpened", + "PaymentMade", + "SignatureProvided", + "DialogOpened", + "DialogDeleted", + "DialogRestored", + "SentToSigning", + "SentToFormFill", + "SentToSendIn", + "SentToPayment" + ], + "enum": [ + "DialogCreated", + "DialogClosed", + "Information", + "TransmissionOpened", + "PaymentMade", + "SignatureProvided", + "DialogOpened", + "DialogDeleted", + "DialogRestored", + "SentToSigning", + "SentToFormFill", + "SentToSendIn", + "SentToPayment" + ] + }, + "PaginatedListOfV1ServiceOwnerDialogsQueriesSearch_Dialog": { + "type": "object", + "additionalProperties": false, + "properties": { + "items": { + "type": "array", + "description": "The paginated list of items", + "items": { + "$ref": "#/components/schemas/V1ServiceOwnerDialogsQueriesSearch_Dialog" + } + }, + "hasNextPage": { + "type": "boolean", + "description": "Whether there are more items available that can be fetched by supplying the continuation token" + }, + "continuationToken": { + "type": "string", + "description": "The continuation token to be used to fetch the next page of items", + "nullable": true, + "example": "createdat_2024-07-31T09:09:03.0257090Z,id_0c089101-b7cf-a476-955c-f00a78d74a4e" + }, + "orderBy": { + "type": "string", + "description": "The current sorting order of the items", + "example": "createdat_desc,id_desc" + } + } + }, + "V1ServiceOwnerDialogsQueriesSearch_Dialog": { + "type": "object", + "additionalProperties": false, + "properties": { + "id": { + "type": "string", + "description": "The unique identifier for the dialog in UUIDv7 format.", + "format": "guid", + "example": "01913cd5-784f-7d3b-abef-4c77b1f0972d" + }, + "org": { + "type": "string", + "description": "The service owner code representing the organization (service owner) related to this dialog.", + "example": "ske" + }, + "revision": { + "type": "string", + "description": "The unique identifier for the revision in UUIDv4 format.", + "format": "guid", + "example": "a312cb9c-7632-43c2-aa38-69b06aed56ca" + }, + "serviceResource": { + "type": "string", + "description": "The service identifier for the service that the dialog is related to in URN-format.\nThis corresponds to a service resource in the Altinn Resource Registry.", + "example": "urn:altinn:resource:some-service-identifier" + }, + "serviceResourceType": { + "type": "string", + "description": "The ServiceResource type, as defined in Altinn Resource Registry (see ResourceType)." + }, + "party": { + "type": "string", + "description": "The party code representing the organization or person that the dialog belongs to in URN format.", + "example": "urn:altinn:person:identifier-no:01125512345\nurn:altinn:organization:identifier-no:912345678" + }, + "progress": { + "type": "integer", + "description": "Advisory indicator of progress, represented as 1-100 percentage value. 100% representing a dialog that has come\nto a natural completion (successful or not).", + "format": "int32", + "nullable": true + }, + "process": { + "type": "string", + "description": "Optional process identifier used to indicate a business process this dialog belongs to.", + "nullable": true + }, + "precedingProcess": { + "type": "string", + "description": "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.", + "nullable": true + }, + "guiAttachmentCount": { + "type": "integer", + "description": "The number of attachments in the dialog made available for browser-based frontends.", + "format": "int32", + "nullable": true + }, + "extendedStatus": { + "type": "string", + "description": "Arbitrary string with a service-specific indicator of status, typically used to indicate a fine-grained state of\nthe dialog to further specify the \"status\" enum.\n \nRefer to the service-specific documentation provided by the service owner for details on the possible values (if\nin use).", + "nullable": true + }, + "externalReference": { + "type": "string", + "description": "Arbitrary string with a service-specific reference to an external system or service.\n \nRefer to the service-specific documentation provided by the service owner for details (if in use).", + "nullable": true + }, + "createdAt": { + "type": "string", + "description": "The date and time when the dialog was created.", + "format": "date-time", + "example": "2022-12-31T23:59:59Z" + }, + "updatedAt": { + "type": "string", + "description": "The date and time when the dialog was last updated.", + "format": "date-time", + "example": "2022-12-31T23:59:59Z" + }, + "dueAt": { + "type": "string", + "description": "The due date for the dialog. This is the last date when the dialog is expected to be completed.", + "format": "date-time", + "nullable": true, + "example": "2022-12-31T23:59:59Z" + }, + "visibleFrom": { + "type": "string", + "description": "The timestamp when the dialog will be made visible for authorized end users.", + "format": "date-time", + "nullable": true + }, + "status": { + "description": "The aggregated status of the dialog.", + "oneOf": [ + { + "$ref": "#/components/schemas/DialogsEntities_DialogStatus" + } + ] + }, + "systemLabel": { + "description": "Current display state.", + "oneOf": [ + { + "$ref": "#/components/schemas/DialogEndUserContextsEntities_SystemLabel" + } + ] + }, + "latestActivity": { + "description": "The latest entry in the dialog's activity log.", + "nullable": true, + "oneOf": [ + { + "$ref": "#/components/schemas/V1ServiceOwnerDialogsQueriesSearch_DialogActivity" + } + ] + }, + "seenSinceLastUpdate": { + "type": "array", + "description": "The list of seen log entries for the dialog newer than the dialog ChangedAt date.", + "items": { + "$ref": "#/components/schemas/V1ServiceOwnerDialogsQueriesSearch_DialogSeenLog" + } + }, + "content": { + "description": "The content of the dialog in search results.", + "oneOf": [ + { + "$ref": "#/components/schemas/V1ServiceOwnerDialogsQueriesSearch_Content" + } + ] + } + } + }, + "DialogEndUserContextsEntities_SystemLabel": { + "type": "string", + "description": "", + "x-enumNames": [ + "Default", + "Bin", + "Archive" + ], + "enum": [ + "Default", + "Bin", + "Archive" + ] + }, + "V1ServiceOwnerDialogsQueriesSearch_DialogActivity": { + "type": "object", + "additionalProperties": false, + "properties": { + "id": { + "type": "string", + "description": "The unique identifier for the activity in UUIDv7 format.", + "format": "guid" + }, + "createdAt": { + "type": "string", + "description": "The date and time when the activity was created.", + "format": "date-time", + "nullable": true + }, + "extendedType": { + "type": "string", + "description": "An arbitrary string with a service-specific activity type.\n \nConsult the service-specific documentation provided by the service owner for details (if in use).", + "format": "uri", + "nullable": true + }, + "type": { + "description": "The type of activity.", + "oneOf": [ + { + "$ref": "#/components/schemas/DialogsEntitiesActivities_DialogActivityType" + } + ] + }, + "transmissionId": { + "type": "string", + "description": "If the activity is related to a particular transmission, this field will contain the transmission identifier.", + "format": "guid", + "nullable": true + }, + "performedBy": { + "description": "The actor that performed the activity.", + "oneOf": [ + { + "$ref": "#/components/schemas/V1ServiceOwnerCommonActors_Actor" + } + ] + }, + "description": { + "type": "array", + "description": "Unstructured text describing the activity. Only set if the activity type is \"Information\".", + "items": { + "$ref": "#/components/schemas/V1CommonLocalizations_Localization" + } + } + } + }, + "V1ServiceOwnerDialogsQueriesSearch_DialogSeenLog": { + "type": "object", + "additionalProperties": false, + "properties": { + "id": { + "type": "string", + "description": "The unique identifier for the seen log entry in UUIDv7 format.", + "format": "guid" + }, + "seenAt": { + "type": "string", + "description": "The timestamp when the dialog revision was seen.", + "format": "date-time" + }, + "seenBy": { + "description": "The actor that saw the dialog revision.", + "oneOf": [ + { + "$ref": "#/components/schemas/V1ServiceOwnerCommonActors_Actor" + } + ] + }, + "isViaServiceOwner": { + "type": "boolean", + "description": "Flag indicating whether the seen log entry was created via the service owner.\n \nThis is used when the service owner uses the service owner API to implement its own frontend.", + "nullable": true + }, + "isCurrentEndUser": { + "type": "boolean", + "description": "Flag indicating whether the seen log entry was created by the end user supplied in the query." + } + } + }, + "V1ServiceOwnerDialogsQueriesSearch_Content": { + "type": "object", + "additionalProperties": false, + "properties": { + "title": { + "description": "The title of the dialog.", + "oneOf": [ + { + "$ref": "#/components/schemas/V1CommonContent_ContentValue" + } + ] + }, + "summary": { + "description": "A short summary of the dialog and its current state.", + "oneOf": [ + { + "$ref": "#/components/schemas/V1CommonContent_ContentValue" + } + ] + }, + "senderName": { + "description": "Overridden sender name. If not supplied, assume \"org\" as the sender name.", + "nullable": true, + "oneOf": [ + { + "$ref": "#/components/schemas/V1CommonContent_ContentValue" + } + ] + }, + "extendedStatus": { + "description": "Used as the human-readable label used to describe the \"ExtendedStatus\" field.", + "nullable": true, + "oneOf": [ + { + "$ref": "#/components/schemas/V1CommonContent_ContentValue" + } + ] + } + } + }, + "V1ServiceOwnerDialogsQueriesGet_Dialog": { + "type": "object", + "additionalProperties": false, + "properties": { + "id": { + "type": "string", + "description": "The unique identifier for the dialog in UUIDv7 format.", + "format": "guid", + "example": "01913cd5-784f-7d3b-abef-4c77b1f0972d" + }, + "revision": { + "type": "string", + "description": "The unique identifier for the revision in UUIDv4 format.", + "format": "guid", + "example": "a312cb9c-7632-43c2-aa38-69b06aed56ca" + }, + "org": { + "type": "string", + "description": "The service owner code representing the organization (service owner) related to this dialog.", + "example": "ske" + }, + "serviceResource": { + "type": "string", + "description": "The service identifier for the service that the dialog is related to in URN-format.\nThis corresponds to a service resource in the Altinn Resource Registry.", + "example": "urn:altinn:resource:some-service-identifier" + }, + "serviceResourceType": { + "type": "string", + "description": "The ServiceResource type, as defined in Altinn Resource Registry (see ResourceType)." + }, + "party": { + "type": "string", + "description": "The party code representing the organization or person that the dialog belongs to in URN format.", + "example": "urn:altinn:person:identifier-no:01125512345\nurn:altinn:organization:identifier-no:912345678" + }, + "progress": { + "type": "integer", + "description": "Advisory indicator of progress, represented as 1-100 percentage value. 100% representing a dialog that has come\nto a natural completion (successful or not).", + "format": "int32", + "nullable": true + }, + "process": { + "type": "string", + "description": "Optional process identifier used to indicate a business process this dialog belongs to.", + "nullable": true + }, + "precedingProcess": { + "type": "string", + "description": "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.", + "nullable": true + }, + "extendedStatus": { + "type": "string", + "description": "Arbitrary string with a service-specific indicator of status, typically used to indicate a fine-grained state of\nthe dialog to further specify the \"status\" enum.\n \nRefer to the service-specific documentation provided by the service owner for details on the possible values (if\nin use).", + "nullable": true + }, + "externalReference": { + "type": "string", + "description": "Arbitrary string with a service-specific reference to an external system or service.\n \nRefer to the service-specific documentation provided by the service owner for details (if in use).", + "nullable": true + }, + "deletedAt": { + "type": "string", + "description": "If deleted, the date and time when the deletion was performed.", + "format": "date-time", + "nullable": true + }, + "visibleFrom": { + "type": "string", + "description": "The timestamp when the dialog will be made visible for authorized end users.", + "format": "date-time", + "nullable": true, + "example": "2022-12-31T23:59:59Z" + }, + "dueAt": { + "type": "string", + "description": "The due date for the dialog. Dialogs past due date might be marked as such in frontends but will still be available.", + "format": "date-time", + "nullable": true, + "example": "2022-12-31T23:59:59Z" + }, + "expiresAt": { + "type": "string", + "description": "The expiration date for the dialog. This is the last date when the dialog is available for the end user.\n \nAfter this date is passed, the dialog will be considered expired and no longer available for the end user in any\nAPI. If not supplied, the dialog will be considered to never expire. This field can be changed by the service\nowner after the dialog has been created.", + "format": "date-time", + "nullable": true, + "example": "2022-12-31T23:59:59Z" + }, + "createdAt": { + "type": "string", + "description": "The date and time when the dialog was created.", + "format": "date-time", + "example": "2022-12-31T23:59:59Z" + }, + "updatedAt": { + "type": "string", + "description": "The date and time when the dialog was last updated.", + "format": "date-time", + "example": "2022-12-31T23:59:59Z" + }, + "status": { + "description": "The aggregated status of the dialog.", + "oneOf": [ + { + "$ref": "#/components/schemas/DialogsEntities_DialogStatus" + } + ] + }, + "systemLabel": { + "description": "Current display state.", + "oneOf": [ + { + "$ref": "#/components/schemas/DialogEndUserContextsEntities_SystemLabel" + } + ] + }, + "content": { + "description": "The dialog unstructured text content.", + "oneOf": [ + { + "$ref": "#/components/schemas/V1ServiceOwnerDialogsQueriesGet_Content" + } + ] + }, + "searchTags": { + "type": "array", + "description": "The list of words (tags) that will be used in dialog search queries. Not visible in end-user DTO.", + "nullable": true, + "items": { + "$ref": "#/components/schemas/V1ServiceOwnerDialogsQueriesGet_SearchTag" + } + }, + "attachments": { + "type": "array", + "description": "The attachments associated with the dialog (on an aggregate level).", + "items": { + "$ref": "#/components/schemas/V1ServiceOwnerDialogsQueriesGet_DialogAttachment" + } + }, + "transmissions": { + "type": "array", + "description": "The immutable list of transmissions associated with the dialog.", + "items": { + "$ref": "#/components/schemas/V1ServiceOwnerDialogsQueriesGet_DialogTransmission" + } + }, + "guiActions": { + "type": "array", + "description": "The GUI actions associated with the dialog. Should be used in browser-based interactive frontends.", + "items": { + "$ref": "#/components/schemas/V1ServiceOwnerDialogsQueriesGet_DialogGuiAction" + } + }, + "apiActions": { + "type": "array", + "description": "The API actions associated with the dialog. Should be used in specialized, non-browser-based integrations.", + "items": { + "$ref": "#/components/schemas/V1ServiceOwnerDialogsQueriesGet_DialogApiAction" + } + }, + "activities": { + "type": "array", + "description": "An immutable list of activities associated with the dialog.", + "items": { + "$ref": "#/components/schemas/V1ServiceOwnerDialogsQueriesGet_DialogActivity" + } + }, + "seenSinceLastUpdate": { + "type": "array", + "description": "The list of seen log entries for the dialog newer than the dialog ChangedAt date.", + "items": { + "$ref": "#/components/schemas/V1ServiceOwnerDialogsQueriesGet_DialogSeenLog" + } + } + } + }, + "OrderSetOfTOrderDefinitionAndTTarget": {}, + "ContinuationTokenSetOfTOrderDefinitionAndTTarget": {}, + "V1ServiceOwnerDialogsQueriesGet_Content": { + "type": "object", + "additionalProperties": false, + "properties": { + "title": { + "description": "The title of the dialog.", + "oneOf": [ + { + "$ref": "#/components/schemas/V1CommonContent_ContentValue" + } + ] + }, + "summary": { + "description": "A short summary of the dialog and its current state.", + "oneOf": [ + { + "$ref": "#/components/schemas/V1CommonContent_ContentValue" + } + ] + }, + "senderName": { + "description": "Overridden sender name. If not supplied, assume \"org\" as the sender name.", + "nullable": true, + "oneOf": [ + { + "$ref": "#/components/schemas/V1CommonContent_ContentValue" + } + ] + }, + "additionalInfo": { + "description": "Additional information about the dialog, this may contain Markdown.", + "nullable": true, + "oneOf": [ + { + "$ref": "#/components/schemas/V1CommonContent_ContentValue" + } + ] + }, + "extendedStatus": { + "description": "Used as the human-readable label used to describe the \"ExtendedStatus\" field.", + "nullable": true, + "oneOf": [ + { + "$ref": "#/components/schemas/V1CommonContent_ContentValue" + } + ] + }, + "mainContentReference": { + "description": "Front-channel embedded content. Used to dynamically embed content in the frontend from an external URL. Must be HTTPS.\nAllowed media types: application/vnd.dialogporten.frontchannelembed+json;type=markdown", + "nullable": true, + "oneOf": [ + { + "$ref": "#/components/schemas/V1CommonContent_ContentValue" + } + ] + } + } + }, + "V1ServiceOwnerDialogsQueriesGet_SearchTag": { + "type": "object", + "additionalProperties": false, + "properties": { + "value": { + "type": "string", + "description": "A search tag value." + } + } + }, + "V1ServiceOwnerDialogsQueriesGet_DialogAttachment": { + "type": "object", + "additionalProperties": false, + "properties": { + "id": { + "type": "string", + "description": "The unique identifier for the attachment in UUIDv7 format.", + "format": "guid" + }, + "displayName": { + "type": "array", + "description": "The display name of the attachment that should be used in GUIs.", + "items": { + "$ref": "#/components/schemas/V1CommonLocalizations_Localization" + } + }, + "urls": { + "type": "array", + "description": "The URLs associated with the attachment, each referring to a different representation of the attachment.", + "items": { + "$ref": "#/components/schemas/V1ServiceOwnerDialogsQueriesGet_DialogAttachmentUrl" + } + } + } + }, + "V1ServiceOwnerDialogsQueriesGet_DialogAttachmentUrl": { + "type": "object", + "additionalProperties": false, + "properties": { + "id": { + "type": "string", + "description": "The unique identifier for the attachment URL in UUIDv7 format.", + "format": "guid" + }, + "url": { + "type": "string", + "description": "The fully qualified URL of the attachment.", + "format": "uri", + "example": "https://someendpoint.com/someattachment.pdf" + }, + "mediaType": { + "type": "string", + "description": "The media type of the attachment.", + "nullable": true, + "example": "application/pdf\napplication/zip" + }, + "consumerType": { + "description": "What type of consumer the URL is intended for.", + "oneOf": [ + { + "$ref": "#/components/schemas/Attachments_AttachmentUrlConsumerType" + } + ] + } + } + }, + "V1ServiceOwnerDialogsQueriesGet_DialogTransmission": { + "type": "object", + "additionalProperties": false, + "properties": { + "id": { + "type": "string", + "description": "The unique identifier for the transmission in UUIDv7 format.", + "format": "guid" + }, + "createdAt": { + "type": "string", + "description": "The date and time when the transmission was created.", + "format": "date-time" + }, + "authorizationAttribute": { + "type": "string", + "description": "Contains an authorization resource attributeId, that can used in custom authorization rules in the XACML service\npolicy, which by default is the policy belonging to the service referred to by \"serviceResource\" in the dialog.\n \nCan also be used to refer to other service policies.", + "nullable": true, + "example": "mycustomresource\n/* equivalent to the above */\nurn:altinn:subresource:mycustomresource\nurn:altinn:task:Task_1\n/* refer to another service */\nurn:altinn:resource:some-other-service-identifier" + }, + "isAuthorized": { + "type": "boolean", + "description": "Flag indicating if the authenticated user supplied in the query is authorized for this transmission.", + "nullable": true + }, + "extendedType": { + "type": "string", + "description": "Arbitrary URI/URN describing a service-specific transmission type.\n \nRefer to the service-specific documentation provided by the service owner for details (if in use).", + "format": "uri", + "nullable": true + }, + "relatedTransmissionId": { + "type": "string", + "description": "Reference to any other transmission that this transmission is related to.", + "format": "guid", + "nullable": true + }, + "type": { + "description": "The type of transmission.", + "oneOf": [ + { + "$ref": "#/components/schemas/DialogsEntitiesTransmissions_DialogTransmissionType" + } + ] + }, + "sender": { + "description": "The actor that sent the transmission.", + "oneOf": [ + { + "$ref": "#/components/schemas/V1ServiceOwnerCommonActors_Actor" + } + ] + }, + "content": { + "description": "The transmission unstructured text content.", + "oneOf": [ + { + "$ref": "#/components/schemas/V1ServiceOwnerDialogsQueriesGet_DialogTransmissionContent" + } + ] + }, + "attachments": { + "type": "array", + "description": "The transmission-level attachments.", + "items": { + "$ref": "#/components/schemas/V1ServiceOwnerDialogsQueriesGet_DialogTransmissionAttachment" + } + } + } + }, + "V1ServiceOwnerDialogsQueriesGet_DialogTransmissionContent": { + "type": "object", + "additionalProperties": false, + "properties": { + "title": { + "description": "The transmission title.", + "oneOf": [ + { + "$ref": "#/components/schemas/V1CommonContent_ContentValue" + } + ] + }, + "summary": { + "description": "The transmission summary.", + "oneOf": [ + { + "$ref": "#/components/schemas/V1CommonContent_ContentValue" + } + ] + }, + "contentReference": { + "description": "Front-channel embedded content. Used to dynamically embed content in the frontend from an external URL. Must be HTTPS.\nAllowed media types: application/vnd.dialogporten.frontchannelembed+json;type=markdown", + "nullable": true, + "oneOf": [ + { + "$ref": "#/components/schemas/V1CommonContent_ContentValue" + } + ] + } + } + }, + "V1ServiceOwnerDialogsQueriesGet_DialogTransmissionAttachment": { + "type": "object", + "additionalProperties": false, + "properties": { + "id": { + "type": "string", + "description": "The unique identifier for the attachment in UUIDv7 format.", + "format": "guid" + }, + "displayName": { + "type": "array", + "description": "The display name of the attachment that should be used in GUIs.", + "items": { + "$ref": "#/components/schemas/V1CommonLocalizations_Localization" + } + }, + "urls": { + "type": "array", + "description": "The URLs associated with the attachment, each referring to a different representation of the attachment.", + "items": { + "$ref": "#/components/schemas/V1ServiceOwnerDialogsQueriesGet_DialogTransmissionAttachmentUrl" + } + } + } + }, + "V1ServiceOwnerDialogsQueriesGet_DialogTransmissionAttachmentUrl": { + "type": "object", + "additionalProperties": false, + "properties": { + "url": { + "type": "string", + "description": "The fully qualified URL of the attachment. Will be set to \"urn:dialogporten:unauthorized\" if the user is\nnot authorized to access the transmission.", + "format": "uri", + "example": "https://someendpoint.com/someattachment.pdf\nurn:dialogporten:unauthorized" + }, + "mediaType": { + "type": "string", + "description": "The media type of the attachment.", + "nullable": true, + "example": "application/pdf\napplication/zip" + }, + "consumerType": { + "description": "The type of consumer the URL is intended for.", + "oneOf": [ + { + "$ref": "#/components/schemas/Attachments_AttachmentUrlConsumerType" + } + ] + } + } + }, + "V1ServiceOwnerDialogsQueriesGet_DialogGuiAction": { + "type": "object", + "additionalProperties": false, + "properties": { + "id": { + "type": "string", + "description": "The unique identifier for the action in UUIDv7 format.", + "format": "guid" + }, + "action": { + "type": "string", + "description": "The action identifier for the action, corresponding to the \"action\" attributeId used in the XACML service policy." + }, + "url": { + "type": "string", + "description": "The fully qualified URL of the action, to which the user will be redirected when the action is triggered.", + "format": "uri" + }, + "authorizationAttribute": { + "type": "string", + "description": "Contains an authorization resource attributeId, that can used in custom authorization rules in the XACML service\npolicy, which by default is the policy belonging to the service referred to by \"serviceResource\" in the dialog.\n \nCan also be used to refer to other service policies.", + "nullable": true, + "example": "mycustomresource\n/* equivalent to the above */\nurn:altinn:subresource:mycustomresource\nurn:altinn:task:Task_1\n/* refer to another service */\nurn:altinn:resource:some-other-service-identifier" + }, + "isAuthorized": { + "type": "boolean", + "description": "Whether the user, if supplied in the query, is authorized to perform the action.", + "nullable": true + }, + "isDeleteDialogAction": { + "type": "boolean", + "description": "Indicates whether the action results in the dialog being deleted. Used by frontends to implement custom UX\nfor delete actions." + }, + "priority": { + "description": "Indicates a priority for the action, making it possible for frontends to adapt GUI elements based on action\npriority.", + "oneOf": [ + { + "$ref": "#/components/schemas/DialogsEntitiesActions_DialogGuiActionPriority" + } + ] + }, + "httpMethod": { + "description": "The HTTP method that the frontend should use when redirecting the user.", + "oneOf": [ + { + "$ref": "#/components/schemas/Http_HttpVerb" + } + ] + }, + "title": { + "type": "array", + "description": "The title of the action, this should be short and in verb form.", + "items": { + "$ref": "#/components/schemas/V1CommonLocalizations_Localization" + } + }, + "prompt": { + "type": "array", + "description": "If there should be a prompt asking the user for confirmation before the action is executed,\nthis field should contain the prompt text.", + "nullable": true, + "items": { + "$ref": "#/components/schemas/V1CommonLocalizations_Localization" + } + } + } + }, + "V1ServiceOwnerDialogsQueriesGet_DialogApiAction": { + "type": "object", + "additionalProperties": false, + "properties": { + "id": { + "type": "string", + "description": "The unique identifier for the action in UUIDv7 format.", + "format": "guid" + }, + "action": { + "type": "string", + "description": "String identifier for the action, corresponding to the \"action\" attributeId used in the XACML service policy,\nwhich by default is the policy belonging to the service referred to by \"serviceResource\" in the dialog.", + "example": "write" + }, + "authorizationAttribute": { + "type": "string", + "description": "Contains an authorization resource attributeId, that can used in custom authorization rules in the XACML service\npolicy, which by default is the policy belonging to the service referred to by \"serviceResource\" in the dialog.\n \nCan also be used to refer to other service policies.", + "nullable": true, + "example": "mycustomresource\n/* equivalent to the above */\nurn:altinn:subresource:mycustomresource\nurn:altinn:task:Task_1\n/* refer to another service */\nurn:altinn:resource:some-other-service-identifier" + }, + "isAuthorized": { + "type": "boolean", + "description": "True if the authenticated user (set in the query) is authorized for this action.", + "nullable": true + }, + "endpoints": { + "type": "array", + "description": "The endpoints associated with the action.", + "items": { + "$ref": "#/components/schemas/V1ServiceOwnerDialogsQueriesGet_DialogApiActionEndpoint" + } + } + } + }, + "V1ServiceOwnerDialogsQueriesGet_DialogApiActionEndpoint": { + "type": "object", + "additionalProperties": false, + "properties": { + "id": { + "type": "string", + "description": "The unique identifier for the endpoint in UUIDv7 format.", + "format": "guid" + }, + "version": { + "type": "string", + "description": "Arbitrary string indicating the version of the endpoint.\n \nConsult the service-specific documentation provided by the service owner for details (if in use).", + "nullable": true + }, + "url": { + "type": "string", + "description": "The fully qualified URL of the API endpoint.", + "format": "uri" + }, + "httpMethod": { + "description": "The HTTP method that the endpoint expects for this action.", + "oneOf": [ + { + "$ref": "#/components/schemas/Http_HttpVerb" + } + ] + }, + "documentationUrl": { + "type": "string", + "description": "Link to service provider documentation for the endpoint. Used for service owners to provide documentation for\nintegrators. Should be a URL to a human-readable page.", + "format": "uri", + "nullable": true + }, + "requestSchema": { + "type": "string", + "description": "Link to the request schema for the endpoint. Used by service owners to provide documentation for integrators.\nDialogporten will not validate information on this endpoint.", + "format": "uri", + "nullable": true + }, + "responseSchema": { + "type": "string", + "description": "Link to the response schema for the endpoint. Used for service owners to provide documentation for integrators.\nDialogporten will not validate information on this endpoint.", + "format": "uri", + "nullable": true + }, + "deprecated": { + "type": "boolean", + "description": "Boolean indicating if the endpoint is deprecated. Integrators should migrate to endpoints with a higher version." + }, + "sunsetAt": { + "type": "string", + "description": "Date and time when the service owner has indicated that endpoint will no longer function. Only set if the endpoint\nis deprecated. Dialogporten will not enforce this date.", + "format": "date-time", + "nullable": true + } + } + }, + "V1ServiceOwnerDialogsQueriesGet_DialogActivity": { + "type": "object", + "additionalProperties": false, + "properties": { + "id": { + "type": "string", + "description": "The unique identifier for the activity in UUIDv7 format.", + "format": "guid" + }, + "createdAt": { + "type": "string", + "description": "The date and time when the activity was created.", + "format": "date-time", + "nullable": true + }, + "extendedType": { + "type": "string", + "description": "An arbitrary URI/URN with a service-specific activity type.\n \nConsult the service-specific documentation provided by the service owner for details (if in use).", + "format": "uri", + "nullable": true + }, + "type": { + "description": "The type of activity.", + "oneOf": [ + { + "$ref": "#/components/schemas/DialogsEntitiesActivities_DialogActivityType" + } + ] + }, + "transmissionId": { + "type": "string", + "description": "If the activity is related to a particular transmission, this field will contain the transmission identifier.", + "format": "guid", + "nullable": true + }, + "performedBy": { + "description": "The actor that performed the activity.", + "oneOf": [ + { + "$ref": "#/components/schemas/V1ServiceOwnerCommonActors_Actor" + } + ] + }, + "description": { + "type": "array", + "description": "Unstructured text describing the activity. Only set if the activity type is \"Information\".", + "items": { + "$ref": "#/components/schemas/V1CommonLocalizations_Localization" + } + } + } + }, + "V1ServiceOwnerDialogsQueriesGet_DialogSeenLog": { + "type": "object", + "additionalProperties": false, + "properties": { + "id": { + "type": "string", + "description": "The unique identifier for the seen log entry in UUIDv7 format.", + "format": "guid" + }, + "seenAt": { + "type": "string", + "description": "The timestamp when the dialog revision was seen.", + "format": "date-time" + }, + "seenBy": { + "description": "The actor that saw the dialog revision.", + "oneOf": [ + { + "$ref": "#/components/schemas/V1ServiceOwnerCommonActors_Actor" + } + ] + }, + "isViaServiceOwner": { + "type": "boolean", + "description": "Flag indicating whether the seen log entry was created via the service owner.\n \nThis is used when the service owner uses the service owner API to implement its own frontend.", + "nullable": true + }, + "isCurrentEndUser": { + "type": "boolean", + "description": "Flag indicating whether the seen log entry was created by the current end user, if provided in the query." + } + } + }, + "V1ServiceOwnerDialogsCreate_DialogRequest": { + "type": "object", + "additionalProperties": false, + "properties": { + "dto": { + "$ref": "#/components/schemas/V1ServiceOwnerDialogsCommandsCreate_Dialog" + } + } + }, + "V1ServiceOwnerDialogsCommandsCreate_Dialog": { + "type": "object", + "additionalProperties": false, + "properties": { + "id": { + "type": "string", + "description": "A self-defined UUIDv7 may be provided to support idempotent creation of dialogs. If not provided, a new UUIDv7 will be generated.", + "format": "guid", + "nullable": true, + "example": "01913cd5-784f-7d3b-abef-4c77b1f0972d" + }, + "serviceResource": { + "type": "string", + "description": "The service identifier for the service that the dialog is related to in URN-format.\nThis corresponds to a resource in the Altinn Resource Registry, which the authenticated organization\nmust own, i.e., be listed as the \"competent authority\" in the Resource Registry entry.", + "example": "urn:altinn:resource:some-service-identifier" + }, + "party": { + "type": "string", + "description": "The party code representing the organization or person that the dialog belongs to in URN format.", + "example": "urn:altinn:person:identifier-no:01125512345\nurn:altinn:organization:identifier-no:912345678" + }, + "progress": { + "type": "integer", + "description": "Advisory indicator of progress, represented as 1-100 percentage value. 100% representing a dialog that has come\nto a natural completion (successful or not).", + "format": "int32", + "nullable": true + }, + "extendedStatus": { + "type": "string", + "description": "Arbitrary string with a service-specific indicator of status, typically used to indicate a fine-grained state of\nthe dialog to further specify the \"status\" enum.", + "nullable": true + }, + "externalReference": { + "type": "string", + "description": "Arbitrary string with a service-specific reference to an external system or service.", + "nullable": true + }, + "visibleFrom": { + "type": "string", + "description": "The timestamp when the dialog should be made visible for authorized end users. If not provided, the dialog will be\nimmediately available.", + "format": "date-time", + "nullable": true, + "example": "2022-12-31T23:59:59Z" + }, + "dueAt": { + "type": "string", + "description": "The due date for the dialog. Dialogs past due date might be marked as such in frontends but will still be available.", + "format": "date-time", + "nullable": true, + "example": "2022-12-31T23:59:59Z" + }, + "process": { + "type": "string", + "description": "Optional process identifier used to indicate a business process this dialog belongs to.", + "nullable": true + }, + "precedingProcess": { + "type": "string", + "description": "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.", + "nullable": true + }, + "expiresAt": { + "type": "string", + "description": "The expiration date for the dialog. This is the last date when the dialog is available for the end user.\n \nAfter this date is passed, the dialog will be considered expired and no longer available for the end user in any\nAPI. If not supplied, the dialog will be considered to never expire. This field can be changed after creation.", + "format": "date-time", + "nullable": true, + "example": "2022-12-31T23:59:59Z" + }, + "createdAt": { + "type": "string", + "description": "If set, will override the date and time when the dialog is set as created.\nIf not supplied, the current date /time will be used.", + "format": "date-time", + "example": "2022-12-31T23:59:59Z" + }, + "updatedAt": { + "type": "string", + "description": "If set, will override the date and time when the dialog is set as last updated.\nIf not supplied, the current date /time will be used.", + "format": "date-time", + "example": "2022-12-31T23:59:59Z" + }, + "status": { + "description": "The aggregated status of the dialog.", + "oneOf": [ + { + "$ref": "#/components/schemas/DialogsEntities_DialogStatus" + } + ] + }, + "systemLabel": { + "description": "Set the system label of the dialog Migration purposes.", + "nullable": true, + "oneOf": [ + { + "$ref": "#/components/schemas/DialogEndUserContextsEntities_SystemLabel" + } + ] + }, + "content": { + "description": "The dialog unstructured text content.", + "oneOf": [ + { + "$ref": "#/components/schemas/V1ServiceOwnerDialogsCommandsCreate_Content" + } + ] + }, + "searchTags": { + "type": "array", + "description": "A list of words (tags) that will be used in dialog search queries. Not visible in end-user DTO.", + "items": { + "$ref": "#/components/schemas/V1ServiceOwnerDialogsCommandsCreate_SearchTag" + } + }, + "attachments": { + "type": "array", + "description": "The attachments associated with the dialog (on an aggregate level).", + "items": { + "$ref": "#/components/schemas/V1ServiceOwnerDialogsCommandsCreate_Attachment" + } + }, + "transmissions": { + "type": "array", + "description": "The immutable list of transmissions associated with the dialog.", + "items": { + "$ref": "#/components/schemas/V1ServiceOwnerDialogsCommandsCreate_Transmission" + } + }, + "guiActions": { + "type": "array", + "description": "The GUI actions associated with the dialog. Should be used in browser-based interactive frontends.", + "items": { + "$ref": "#/components/schemas/V1ServiceOwnerDialogsCommandsCreate_GuiAction" + } + }, + "apiActions": { + "type": "array", + "description": "The API actions associated with the dialog. Should be used in specialized, non-browser-based integrations.", + "items": { + "$ref": "#/components/schemas/V1ServiceOwnerDialogsCommandsCreate_ApiAction" + } + }, + "activities": { + "type": "array", + "description": "An immutable list of activities associated with the dialog.", + "items": { + "$ref": "#/components/schemas/V1ServiceOwnerDialogsCommandsCreate_Activity" + } + } + } + }, + "V1ServiceOwnerDialogsCommandsCreate_Content": { + "type": "object", + "additionalProperties": false, + "properties": { + "title": { + "description": "The title of the dialog.\nSupported media types: text/plain", + "oneOf": [ + { + "$ref": "#/components/schemas/V1CommonContent_ContentValue" + } + ] + }, + "summary": { + "description": "A short summary of the dialog and its current state.\nSupported media types: text/plain", + "oneOf": [ + { + "$ref": "#/components/schemas/V1CommonContent_ContentValue" + } + ] + }, + "senderName": { + "description": "Overridden sender name. If not supplied, assume \"org\" as the sender name. Must be text/plain if supplied.\nSupported media types: text/plain", + "nullable": true, + "oneOf": [ + { + "$ref": "#/components/schemas/V1CommonContent_ContentValue" + } + ] + }, + "additionalInfo": { + "description": "Additional information about the dialog.\nSupported media types: text/plain, text/markdown", + "nullable": true, + "oneOf": [ + { + "$ref": "#/components/schemas/V1CommonContent_ContentValue" + } + ] + }, + "extendedStatus": { + "description": "Used as the human-readable label used to describe the \"ExtendedStatus\" field.\nSupported media types: text/plain", + "nullable": true, + "oneOf": [ + { + "$ref": "#/components/schemas/V1CommonContent_ContentValue" + } + ] + }, + "mainContentReference": { + "description": "Front-channel embedded content. Used to dynamically embed content in the frontend from an external URL. Must be HTTPS.\nSupported media types: application/vnd.dialogporten.frontchannelembed+json;type=markdown", + "nullable": true, + "oneOf": [ + { + "$ref": "#/components/schemas/V1CommonContent_ContentValue" + } + ] + } + } + }, + "V1ServiceOwnerDialogsCommandsCreate_SearchTag": { + "type": "object", + "additionalProperties": false, + "properties": { + "value": { + "type": "string", + "description": "A search tag value." + } + } + }, + "V1ServiceOwnerDialogsCommandsCreate_Attachment": { + "type": "object", + "additionalProperties": false, + "properties": { + "id": { + "type": "string", + "description": "A self-defined UUIDv7 may be provided to support idempotent creation of attachments. If not provided, a new UUIDv7 will be generated.", + "format": "guid", + "nullable": true + }, + "displayName": { + "type": "array", + "description": "The display name of the attachment that should be used in GUIs.", + "items": { + "$ref": "#/components/schemas/V1CommonLocalizations_Localization" + } + }, + "urls": { + "type": "array", + "description": "The URLs associated with the attachment, each referring to a different representation of the attachment.", + "items": { + "$ref": "#/components/schemas/V1ServiceOwnerDialogsCommandsCreate_AttachmentUrl" + } + } + } + }, + "V1ServiceOwnerDialogsCommandsCreate_AttachmentUrl": { + "type": "object", + "additionalProperties": false, + "properties": { + "url": { + "type": "string", + "description": "The fully qualified URL of the attachment.", + "format": "uri" + }, + "mediaType": { + "type": "string", + "description": "The media type of the attachment.", + "nullable": true, + "example": "application/pdf\napplication/zip" + }, + "consumerType": { + "description": "The type of consumer the URL is intended for.", + "oneOf": [ + { + "$ref": "#/components/schemas/Attachments_AttachmentUrlConsumerType" + } + ] + } + } + }, + "V1ServiceOwnerDialogsCommandsCreate_Transmission": { + "type": "object", + "additionalProperties": false, + "properties": { + "id": { + "type": "string", + "description": "A self-defined UUIDv7 may be provided to support idempotent creation of transmissions. If not provided, a new UUIDv7 will be generated.", + "format": "guid", + "nullable": true, + "example": "01913cd5-784f-7d3b-abef-4c77b1f0972d" + }, + "createdAt": { + "type": "string", + "description": "If supplied, overrides the creating date and time for the transmission.\nIf not supplied, the current date /time will be used.", + "format": "date-time" + }, + "authorizationAttribute": { + "type": "string", + "description": "Contains an authorization resource attributeId, that can used in custom authorization rules in the XACML service\npolicy, which by default is the policy belonging to the service referred to by \"serviceResource\" in the dialog.\n \nCan also be used to refer to other service policies.", + "nullable": true, + "example": "mycustomresource\n/* equivalent to the above */\nurn:altinn:subresource:mycustomresource\nurn:altinn:task:Task_1\n/* refer to another service */\nurn:altinn:resource:some-other-service-identifier" + }, + "extendedType": { + "type": "string", + "description": "Arbitrary URI/URN describing a service-specific transmission type.\n \nRefer to the service-specific documentation provided by the service owner for details (if in use).", + "format": "uri", + "nullable": true + }, + "relatedTransmissionId": { + "type": "string", + "description": "Reference to any other transmission that this transmission is related to.", + "format": "guid", + "nullable": true + }, + "type": { + "description": "The type of transmission.", + "oneOf": [ + { + "$ref": "#/components/schemas/DialogsEntitiesTransmissions_DialogTransmissionType" + } + ] + }, + "sender": { + "description": "The actor that sent the transmission.", + "oneOf": [ + { + "$ref": "#/components/schemas/V1ServiceOwnerCommonActors_Actor" + } + ] + }, + "content": { + "description": "The transmission unstructured text content.", + "oneOf": [ + { + "$ref": "#/components/schemas/V1ServiceOwnerDialogsCommandsCreate_TransmissionContent" + } + ] + }, + "attachments": { + "type": "array", + "description": "The transmission-level attachments.", + "items": { + "$ref": "#/components/schemas/V1ServiceOwnerDialogsCommandsCreate_TransmissionAttachment" + } + } + } + }, + "V1ServiceOwnerDialogsCommandsCreate_TransmissionContent": { + "type": "object", + "additionalProperties": false, + "properties": { + "title": { + "description": "The transmission title. Must be text/plain.", + "oneOf": [ + { + "$ref": "#/components/schemas/V1CommonContent_ContentValue" + } + ] + }, + "summary": { + "description": "The transmission summary.", + "oneOf": [ + { + "$ref": "#/components/schemas/V1CommonContent_ContentValue" + } + ] + }, + "contentReference": { + "description": "Front-channel embedded content. Used to dynamically embed content in the frontend from an external URL. Must be HTTPS.\nAllowed media types: application/vnd.dialogporten.frontchannelembed+json;type=markdown", + "nullable": true, + "oneOf": [ + { + "$ref": "#/components/schemas/V1CommonContent_ContentValue" + } + ] + } + } + }, + "V1ServiceOwnerDialogsCommandsCreate_TransmissionAttachment": { + "type": "object", + "additionalProperties": false, + "properties": { + "id": { + "type": "string", + "description": "A self-defined UUIDv7 may be provided to support idempotent creation of transmission attachments. If not provided, a new UUIDv7 will be generated.", + "format": "guid", + "nullable": true, + "example": "01913cd5-784f-7d3b-abef-4c77b1f0972d" + }, + "displayName": { + "type": "array", + "description": "The display name of the attachment that should be used in GUIs.", + "items": { + "$ref": "#/components/schemas/V1CommonLocalizations_Localization" + } + }, + "urls": { + "type": "array", + "description": "The URLs associated with the attachment, each referring to a different representation of the attachment.", + "items": { + "$ref": "#/components/schemas/V1ServiceOwnerDialogsCommandsCreate_TransmissionAttachmentUrl" + } + } + } + }, + "V1ServiceOwnerDialogsCommandsCreate_TransmissionAttachmentUrl": { + "type": "object", + "additionalProperties": false, + "properties": { + "url": { + "type": "string", + "description": "The fully qualified URL of the attachment.", + "format": "uri" + }, + "mediaType": { + "type": "string", + "description": "The media type of the attachment.", + "nullable": true, + "example": "application/pdf\napplication/zip" + }, + "consumerType": { + "description": "The type of consumer the URL is intended for.", + "oneOf": [ + { + "$ref": "#/components/schemas/Attachments_AttachmentUrlConsumerType" + } + ] + } + } + }, + "V1ServiceOwnerDialogsCommandsCreate_GuiAction": { + "type": "object", + "additionalProperties": false, + "properties": { + "id": { + "type": "string", + "description": "A self-defined UUIDv7 may be provided to support idempotent creation of Gui Actions. If not provided, a new UUIDv7 will be generated.", + "format": "guid", + "nullable": true, + "example": "01913cd5-784f-7d3b-abef-4c77b1f0972d" + }, + "action": { + "type": "string", + "description": "The action identifier for the action, corresponding to the \"action\" attributeId used in the XACML service policy." + }, + "url": { + "type": "string", + "description": "The fully qualified URL of the action, to which the user will be redirected when the action is triggered. Will be set to\n\"urn:dialogporten:unauthorized\" if the user is not authorized to perform the action.", + "format": "uri", + "example": "urn:dialogporten:unauthorized\nhttps://someendpoint.com/gui/some-service-instance-id" + }, + "authorizationAttribute": { + "type": "string", + "description": "Contains an authorization resource attributeId, that can used in custom authorization rules in the XACML service\npolicy, which by default is the policy belonging to the service referred to by \"serviceResource\" in the dialog.\n \nCan also be used to refer to other service policies.", + "nullable": true, + "example": "mycustomresource\n/* equivalent to the above */\nurn:altinn:subresource:mycustomresource\nurn:altinn:task:Task_1\n/* refer to another service */\nurn:altinn:resource:some-other-service-identifier" + }, + "isDeleteDialogAction": { + "type": "boolean", + "description": "Indicates whether the action results in the dialog being deleted. Used by frontends to implement custom UX\nfor delete actions." + }, + "httpMethod": { + "description": "The HTTP method that the frontend should use when redirecting the user.", + "nullable": true, + "oneOf": [ + { + "$ref": "#/components/schemas/Http_HttpVerb" + } + ] + }, + "priority": { + "description": "Indicates a priority for the action, making it possible for frontends to adapt GUI elements based on action\npriority.", + "oneOf": [ + { + "$ref": "#/components/schemas/DialogsEntitiesActions_DialogGuiActionPriority" + } + ] + }, + "title": { + "type": "array", + "description": "The title of the action, this should be short and in verb form. Must be text/plain.", + "items": { + "$ref": "#/components/schemas/V1CommonLocalizations_Localization" + } + }, + "prompt": { + "type": "array", + "description": "If there should be a prompt asking the user for confirmation before the action is executed,\nthis field should contain the prompt text.", + "nullable": true, + "items": { + "$ref": "#/components/schemas/V1CommonLocalizations_Localization" + } + } + } + }, + "V1ServiceOwnerDialogsCommandsCreate_ApiAction": { + "type": "object", + "additionalProperties": false, + "properties": { + "id": { + "type": "string", + "description": "A self-defined UUIDv7 may be provided to support idempotent creation of Api Actions. If not provided, a new UUIDv7 will be generated.", + "format": "guid", + "nullable": true, + "example": "01913cd5-784f-7d3b-abef-4c77b1f0972d" + }, + "action": { + "type": "string", + "description": "String identifier for the action, corresponding to the \"action\" attributeId used in the XACML service policy,\nwhich by default is the policy belonging to the service referred to by \"serviceResource\" in the dialog.", + "example": "write" + }, + "authorizationAttribute": { + "type": "string", + "description": "Contains an authorization resource attributeId, that can used in custom authorization rules in the XACML service\npolicy, which by default is the policy belonging to the service referred to by \"serviceResource\" in the dialog.\n \nCan also be used to refer to other service policies.", + "nullable": true, + "example": "mycustomresource\n/* equivalent to the above */\nurn:altinn:subresource:mycustomresource\nurn:altinn:task:Task_1\n/* refer to another service */\nurn:altinn:resource:some-other-service-identifier" + }, + "endpoints": { + "type": "array", + "description": "The endpoints associated with the action.", + "items": { + "$ref": "#/components/schemas/V1ServiceOwnerDialogsCommandsCreate_ApiActionEndpoint" + } + } + } + }, + "V1ServiceOwnerDialogsCommandsCreate_ApiActionEndpoint": { + "type": "object", + "additionalProperties": false, + "properties": { + "version": { + "type": "string", + "description": "Arbitrary string indicating the version of the endpoint.", + "nullable": true + }, + "url": { + "type": "string", + "description": "The fully qualified URL of the API endpoint.", + "format": "uri" + }, + "httpMethod": { + "description": "The HTTP method that the endpoint expects for this action.", + "oneOf": [ + { + "$ref": "#/components/schemas/Http_HttpVerb" + } + ] + }, + "documentationUrl": { + "type": "string", + "description": "Link to documentation for the endpoint, providing documentation for integrators. Should be a URL to a\nhuman-readable page.", + "format": "uri", + "nullable": true + }, + "requestSchema": { + "type": "string", + "description": "Link to the request schema for the endpoint. Used to provide documentation for integrators.\nDialogporten will not validate information on this endpoint.", + "format": "uri", + "nullable": true + }, + "responseSchema": { + "type": "string", + "description": "Link to the response schema for the endpoint. Used to provide documentation for integrators.\nDialogporten will not validate information on this endpoint.", + "format": "uri", + "nullable": true + }, + "deprecated": { + "type": "boolean", + "description": "Boolean indicating if the endpoint is deprecated." + }, + "sunsetAt": { + "type": "string", + "description": "Date and time when the endpoint will no longer function. Only set if the endpoint is deprecated. Dialogporten\nwill not enforce this date.", + "format": "date-time", + "nullable": true + } + } + }, + "V1ServiceOwnerDialogsCommandsCreate_Activity": { + "type": "object", + "additionalProperties": false, + "properties": { + "id": { + "type": "string", + "description": "A self-defined UUIDv7 may be provided to support idempotent creation of activities. If not provided, a new UUIDv7 will be generated.", + "format": "guid", + "nullable": true, + "example": "01913cd5-784f-7d3b-abef-4c77b1f0972d" + }, + "createdAt": { + "type": "string", + "description": "If supplied, overrides the creating date and time for the transmission.\nIf not supplied, the current date /time will be used.", + "format": "date-time", + "nullable": true + }, + "extendedType": { + "type": "string", + "description": "Arbitrary URI/URN describing a service-specific transmission type.", + "format": "uri", + "nullable": true + }, + "type": { + "description": "The type of transmission.", + "oneOf": [ + { + "$ref": "#/components/schemas/DialogsEntitiesActivities_DialogActivityType" + } + ] + }, + "transmissionId": { + "type": "string", + "description": "If the activity is related to a particular transmission, this field will contain the transmission identifier.\nMust be present in the request body.", + "format": "guid", + "nullable": true + }, + "performedBy": { + "description": "The actor that performed the activity.", + "oneOf": [ + { + "$ref": "#/components/schemas/V1ServiceOwnerCommonActors_Actor" + } + ] + }, + "description": { + "type": "array", + "description": "Unstructured text describing the activity. Only set if the activity type is \"Information\".", + "items": { + "$ref": "#/components/schemas/V1CommonLocalizations_Localization" + } + } + } + }, + "V1ServiceOwnerDialogActivitiesQueriesSearch_Activity": { + "type": "object", + "additionalProperties": false, + "properties": { + "id": { + "type": "string", + "format": "guid" + }, + "createdAt": { + "type": "string", + "format": "date-time" + }, + "extendedType": { + "type": "string", + "format": "uri", + "nullable": true + }, + "type": { + "$ref": "#/components/schemas/DialogsEntitiesActivities_DialogActivityType" + }, + "deletedAt": { + "type": "string", + "format": "date-time", + "nullable": true + }, + "transmissionId": { + "type": "string", + "format": "guid", + "nullable": true + } + } + }, + "V1ServiceOwnerDialogActivitiesQueriesNotificationCondition_NotificationCondition": { + "type": "object", + "additionalProperties": false, + "properties": { + "sendNotification": { + "type": "boolean" + } + } + }, + "V1ServiceOwnerDialogActivitiesQueriesGet_Activity": { + "type": "object", + "additionalProperties": false, + "properties": { + "id": { + "type": "string", + "format": "guid" + }, + "createdAt": { + "type": "string", + "format": "date-time", + "nullable": true + }, + "extendedType": { + "type": "string", + "format": "uri", + "nullable": true + }, + "type": { + "$ref": "#/components/schemas/DialogsEntitiesActivities_DialogActivityType" + }, + "deletedAt": { + "type": "string", + "format": "date-time", + "nullable": true + }, + "transmissionId": { + "type": "string", + "format": "guid", + "nullable": true + }, + "performedBy": { + "$ref": "#/components/schemas/V1ServiceOwnerCommonActors_Actor" + }, + "description": { + "type": "array", + "items": { + "$ref": "#/components/schemas/V1CommonLocalizations_Localization" + } + } + } + }, + "V1ServiceOwnerDialogActivitiesQueriesNotificationCondition_NotificationConditionType": { + "type": "string", + "description": "", + "x-enumNames": [ + "NotExists", + "Exists" + ], + "enum": [ + "NotExists", + "Exists" + ] + }, + "V1ServiceOwnerDialogActivitiesCreate_ActivityRequest": { + "type": "object", + "additionalProperties": false, + "properties": { + "id": { + "type": "string", + "description": "The UUDIv7 of the action may be provided to support idempotent additions to the list of activities.\nIf not supplied, a new UUIDv7 will be generated.", + "format": "guid", + "nullable": true, + "example": "01913cd5-784f-7d3b-abef-4c77b1f0972d" + }, + "createdAt": { + "type": "string", + "description": "If supplied, overrides the creating date and time for the transmission.\nIf not supplied, the current date /time will be used.", + "format": "date-time", + "nullable": true + }, + "extendedType": { + "type": "string", + "description": "Arbitrary URI/URN describing a service-specific transmission type.", + "format": "uri", + "nullable": true + }, + "type": { + "description": "The type of transmission.", + "oneOf": [ + { + "$ref": "#/components/schemas/DialogsEntitiesActivities_DialogActivityType" + } + ] + }, + "transmissionId": { + "type": "string", + "description": "If the activity is related to a particular transmission, this field will contain the transmission identifier.\nMust be present in the request body.", + "format": "guid", + "nullable": true + }, + "performedBy": { + "description": "The actor that performed the activity.", + "oneOf": [ + { + "$ref": "#/components/schemas/V1ServiceOwnerCommonActors_Actor" + } + ] + }, + "description": { + "type": "array", + "description": "Unstructured text describing the activity. Only set if the activity type is \"Information\".", + "items": { + "$ref": "#/components/schemas/V1CommonLocalizations_Localization" + } + } + } + }, + "V1EndUserPartiesQueriesGet_Parties": { + "type": "object", + "additionalProperties": false, + "properties": { + "authorizedParties": { + "type": "array", + "items": { + "$ref": "#/components/schemas/V1EndUserPartiesQueriesGet_AuthorizedParty" + } + } + } + }, + "V1EndUserPartiesQueriesGet_AuthorizedParty": { + "type": "object", + "additionalProperties": false, + "properties": { + "party": { + "type": "string" + }, + "name": { + "type": "string" + }, + "partyType": { + "type": "string" + }, + "isDeleted": { + "type": "boolean" + }, + "hasKeyRole": { + "type": "boolean" + }, + "isCurrentEndUser": { + "type": "boolean" + }, + "isMainAdministrator": { + "type": "boolean" + }, + "isAccessManager": { + "type": "boolean" + }, + "hasOnlyAccessToSubParties": { + "type": "boolean" + }, + "subParties": { + "type": "array", + "nullable": true, + "items": { + "$ref": "#/components/schemas/V1EndUserPartiesQueriesGet_AuthorizedParty" + } + } + } + }, + "V1EndUserDialogTransmissionsQueriesSearch_Transmission": { + "type": "object", + "additionalProperties": false, + "properties": { + "id": { + "type": "string", + "description": "The unique identifier for the transmission in UUIDv7 format.", + "format": "guid" + }, + "createdAt": { + "type": "string", + "description": "The date and time when the transmission was created.", + "format": "date-time" + }, + "authorizationAttribute": { + "type": "string", + "description": "The authorization attribute associated with the transmission.", + "nullable": true + }, + "isAuthorized": { + "type": "boolean", + "description": "Flag indicating if the authenticated user is authorized for this transmission. If not, embedded content and\nthe attachments will not be available." + }, + "extendedType": { + "type": "string", + "description": "The extended type URI for the transmission.", + "format": "uri", + "nullable": true + }, + "relatedTransmissionId": { + "type": "string", + "description": "The unique identifier for the related transmission, if any.", + "format": "guid", + "nullable": true + }, + "deletedAt": { + "type": "string", + "description": "The date and time when the transmission was deleted, if applicable.", + "format": "date-time", + "nullable": true + }, + "type": { + "description": "The type of the transmission.", + "oneOf": [ + { + "$ref": "#/components/schemas/DialogsEntitiesTransmissions_DialogTransmissionType" + } + ] + }, + "sender": { + "description": "The sender actor information for the transmission.", + "oneOf": [ + { + "$ref": "#/components/schemas/V1EndUserCommonActors_Actor" + } + ] + }, + "content": { + "description": "The content of the transmission.", + "oneOf": [ + { + "$ref": "#/components/schemas/V1EndUserDialogTransmissionsQueriesSearch_Content" + } + ] + }, + "attachments": { + "type": "array", + "description": "The attachments associated with the transmission.", + "items": { + "$ref": "#/components/schemas/V1EndUserDialogTransmissionsQueriesSearch_Attachment" + } + } + } + }, + "V1EndUserCommonActors_Actor": { + "type": "object", + "additionalProperties": false, + "properties": { + "actorType": { + "description": "The type of actor that sent the transmission.", + "oneOf": [ + { + "$ref": "#/components/schemas/Actors_ActorType" + } + ] + }, + "actorName": { + "type": "string", + "description": "Specifies the name of the entity that sent the transmission. Mutually exclusive with ActorId. If ActorId\nis supplied, the name will be automatically populated from the name registries.", + "nullable": true, + "example": "Ola Nordmann" + }, + "actorId": { + "type": "string", + "description": "The identifier of the person or organization that sent the transmission. Mutually exclusive with ActorName.\nMight be omitted if ActorType is \"ServiceOwner\".", + "nullable": true, + "example": "urn:altinn:person:identifier-no:12018212345" + } + } + }, + "V1EndUserDialogTransmissionsQueriesSearch_Content": { + "type": "object", + "additionalProperties": false, + "properties": { + "title": { + "description": "The title of the content.", + "oneOf": [ + { + "$ref": "#/components/schemas/V1CommonContent_ContentValue" + } + ] + }, + "summary": { + "description": "The summary of the content.", + "oneOf": [ + { + "$ref": "#/components/schemas/V1CommonContent_ContentValue" + } + ] + }, + "contentReference": { + "description": "Front-channel embedded content. Used to dynamically embed content in the frontend from an external URL.\nAllowed media types: application/vnd.dialogporten.frontchannelembed+json;type=markdown", + "nullable": true, + "oneOf": [ + { + "$ref": "#/components/schemas/V1CommonContent_ContentValue" + } + ] + } + } + }, + "V1EndUserDialogTransmissionsQueriesSearch_Attachment": { + "type": "object", + "additionalProperties": false, + "properties": { + "id": { + "type": "string", + "description": "The unique identifier for the attachment in UUIDv7 format.", + "format": "guid" + }, + "displayName": { + "type": "array", + "description": "The display name of the attachment that should be used in GUIs.", + "items": { + "$ref": "#/components/schemas/V1CommonLocalizations_Localization" + } + }, + "urls": { + "type": "array", + "description": "The URLs associated with the attachment, each referring to a different representation of the attachment.", + "items": { + "$ref": "#/components/schemas/V1EndUserDialogTransmissionsQueriesSearch_AttachmentUrl" + } + } + } + }, + "V1EndUserDialogTransmissionsQueriesSearch_AttachmentUrl": { + "type": "object", + "additionalProperties": false, + "properties": { + "id": { + "type": "string", + "description": "The unique identifier for the attachment URL in UUIDv7 format.", + "format": "guid" + }, + "url": { + "type": "string", + "description": "The fully qualified URL of the attachment. Will be set to \"urn:dialogporten:unauthorized\" if the user is\nnot authorized to access the transmission.", + "format": "uri", + "example": "https://someendpoint.com/someattachment.pdf\nurn:dialogporten:unauthorized" + }, + "mediaType": { + "type": "string", + "description": "The media type of the attachment.", + "nullable": true, + "example": "application/pdf\napplication/zip" + }, + "consumerType": { + "description": "The type of consumer the URL is intended for.", + "oneOf": [ + { + "$ref": "#/components/schemas/Attachments_AttachmentUrlConsumerType" + } + ] + } + } + }, + "V1EndUserDialogTransmissionsQueriesGet_Transmission": { + "type": "object", + "additionalProperties": false, + "properties": { + "id": { + "type": "string", + "description": "The unique identifier for the transmission in UUIDv7 format.", + "format": "guid" + }, + "createdAt": { + "type": "string", + "description": "The date and time when the transmission was created.", + "format": "date-time" + }, + "authorizationAttribute": { + "type": "string", + "description": "The authorization attribute associated with the transmission.", + "nullable": true + }, + "isAuthorized": { + "type": "boolean", + "description": "Flag indicating if the authenticated user is authorized for this transmission. If not, embedded content and\nthe attachments will not be available." + }, + "extendedType": { + "type": "string", + "description": "The extended type URI for the transmission.", + "format": "uri", + "nullable": true + }, + "relatedTransmissionId": { + "type": "string", + "description": "The unique identifier for the related transmission, if any.", + "format": "guid", + "nullable": true + }, + "deletedAt": { + "type": "string", + "description": "The date and time when the transmission was deleted, if applicable.", + "format": "date-time", + "nullable": true + }, + "type": { + "description": "The type of the transmission.", + "oneOf": [ + { + "$ref": "#/components/schemas/DialogsEntitiesTransmissions_DialogTransmissionType" + } + ] + }, + "sender": { + "description": "The sender actor information for the transmission.", + "oneOf": [ + { + "$ref": "#/components/schemas/V1EndUserCommonActors_Actor" + } + ] + }, + "content": { + "description": "The content of the transmission.", + "oneOf": [ + { + "$ref": "#/components/schemas/V1EndUserDialogTransmissionsQueriesGet_Content" + } + ] + }, + "attachments": { + "type": "array", + "description": "The attachments associated with the transmission.", + "items": { + "$ref": "#/components/schemas/V1EndUserDialogTransmissionsQueriesGet_Attachment" + } + } + } + }, + "V1EndUserDialogTransmissionsQueriesGet_Content": { + "type": "object", + "additionalProperties": false, + "properties": { + "title": { + "description": "The title of the content.", + "oneOf": [ + { + "$ref": "#/components/schemas/V1CommonContent_ContentValue" + } + ] + }, + "summary": { + "description": "The summary of the content.", + "oneOf": [ + { + "$ref": "#/components/schemas/V1CommonContent_ContentValue" + } + ] + }, + "contentReference": { + "description": "Front-channel embedded content. Used to dynamically embed content in the frontend from an external URL.\nAllowed media types: application/vnd.dialogporten.frontchannelembed+json;type=markdown", + "nullable": true, + "oneOf": [ + { + "$ref": "#/components/schemas/V1CommonContent_ContentValue" + } + ] + } + } + }, + "V1EndUserDialogTransmissionsQueriesGet_Attachment": { + "type": "object", + "additionalProperties": false, + "properties": { + "id": { + "type": "string", + "description": "The unique identifier for the attachment in UUIDv7 format.", + "format": "guid" + }, + "displayName": { + "type": "array", + "description": "The display name of the attachment that should be used in GUIs.", + "items": { + "$ref": "#/components/schemas/V1CommonLocalizations_Localization" + } + }, + "urls": { + "type": "array", + "description": "The URLs associated with the attachment, each referring to a different representation of the attachment.", + "items": { + "$ref": "#/components/schemas/V1EndUserDialogTransmissionsQueriesGet_AttachmentUrl" + } + } + } + }, + "V1EndUserDialogTransmissionsQueriesGet_AttachmentUrl": { + "type": "object", + "additionalProperties": false, + "properties": { + "id": { + "type": "string", + "description": "The unique identifier for the attachment URL in UUIDv7 format.", + "format": "guid" + }, + "url": { + "type": "string", + "description": "The fully qualified URL of the attachment. Will be set to \"urn:dialogporten:unauthorized\" if the user is\nnot authorized to access the transmission.", + "format": "uri", + "example": "https://someendpoint.com/someattachment.pdf\nurn:dialogporten:unauthorized" + }, + "mediaType": { + "type": "string", + "description": "The media type of the attachment.", + "nullable": true, + "example": "application/pdf\napplication/zip" + }, + "consumerType": { + "description": "The type of consumer the URL is intended for.", + "oneOf": [ + { + "$ref": "#/components/schemas/Attachments_AttachmentUrlConsumerType" + } + ] + } + } + }, + "V1EndUserDialogSystemLabelsCommandsSet_SystemLabelCommand": { + "type": "object", + "additionalProperties": false, + "properties": { + "label": { + "$ref": "#/components/schemas/DialogEndUserContextsEntities_SystemLabel" + }, + "ifMatchDialogRevision": { + "type": "string", + "format": "guid", + "nullable": true + } + } + }, + "V1EndUserDialogSeenLogsQueriesSearch_SeenLog": { + "type": "object", + "additionalProperties": false, + "properties": { + "id": { + "type": "string", + "format": "guid" + }, + "seenAt": { + "type": "string", + "format": "date-time" + }, + "seenBy": { + "$ref": "#/components/schemas/V1EndUserCommonActors_Actor" + }, + "isViaServiceOwner": { + "type": "boolean" + }, + "isCurrentEndUser": { + "type": "boolean" + } + } + }, + "V1EndUserDialogSeenLogsQueriesGet_SeenLog": { + "type": "object", + "additionalProperties": false, + "properties": { + "id": { + "type": "string", + "format": "guid" + }, + "seenAt": { + "type": "string", + "format": "date-time" + }, + "seenBy": { + "$ref": "#/components/schemas/V1EndUserCommonActors_Actor" + }, + "isViaServiceOwner": { + "type": "boolean" + }, + "isCurrentEndUser": { + "type": "boolean" + } + } + }, + "PaginatedListOfV1EndUserDialogsQueriesSearch_Dialog": { + "type": "object", + "additionalProperties": false, + "properties": { + "items": { + "type": "array", + "description": "The paginated list of items", + "items": { + "$ref": "#/components/schemas/V1EndUserDialogsQueriesSearch_Dialog" + } + }, + "hasNextPage": { + "type": "boolean", + "description": "Whether there are more items available that can be fetched by supplying the continuation token" + }, + "continuationToken": { + "type": "string", + "description": "The continuation token to be used to fetch the next page of items", + "nullable": true, + "example": "createdat_2024-07-31T09:09:03.0257090Z,id_0c089101-b7cf-a476-955c-f00a78d74a4e" + }, + "orderBy": { + "type": "string", + "description": "The current sorting order of the items", + "example": "createdat_desc,id_desc" + } + } + }, + "V1EndUserDialogsQueriesSearch_Dialog": { + "type": "object", + "additionalProperties": false, + "properties": { + "id": { + "type": "string", + "description": "The unique identifier for the dialog in UUIDv7 format.", + "format": "guid", + "example": "01913cd5-784f-7d3b-abef-4c77b1f0972d" + }, + "org": { + "type": "string", + "description": "The service owner code representing the organization (service owner) related to this dialog.", + "example": "ske" + }, + "serviceResource": { + "type": "string", + "description": "The service identifier for the service that the dialog is related to in URN-format.\nThis corresponds to a service resource in the Altinn Resource Registry.", + "example": "urn:altinn:resource:some-service-identifier" + }, + "serviceResourceType": { + "type": "string", + "description": "The ServiceResource type, as defined in Altinn Resource Registry (see ResourceType)." + }, + "party": { + "type": "string", + "description": "The party code representing the organization or person that the dialog belongs to in URN format.", + "example": "urn:altinn:person:identifier-no:01125512345\nurn:altinn:organization:identifier-no:912345678" + }, + "progress": { + "type": "integer", + "description": "Advisory indicator of progress, represented as 1-100 percentage value. 100% representing a dialog that has come\nto a natural completion (successful or not).", + "format": "int32", + "nullable": true + }, + "process": { + "type": "string", + "description": "Optional process identifier used to indicate a business process this dialog belongs to.", + "nullable": true + }, + "precedingProcess": { + "type": "string", + "description": "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.", + "nullable": true + }, + "guiAttachmentCount": { + "type": "integer", + "description": "The number of attachments in the dialog made available for browser-based frontends.", + "format": "int32", + "nullable": true + }, + "extendedStatus": { + "type": "string", + "description": "Arbitrary string with a service-specific indicator of status, typically used to indicate a fine-grained state of\nthe dialog to further specify the \"status\" enum.\n \nRefer to the service-specific documentation provided by the service owner for details on the possible values (if\nin use).", + "nullable": true + }, + "externalReference": { + "type": "string", + "description": "Arbitrary string with a service-specific reference to an external system or service.\n \nRefer to the service-specific documentation provided by the service owner for details (if in use).", + "nullable": true + }, + "createdAt": { + "type": "string", + "description": "The date and time when the dialog was created.", + "format": "date-time", + "example": "2022-12-31T23:59:59Z" + }, + "updatedAt": { + "type": "string", + "description": "The date and time when the dialog was last updated.", + "format": "date-time", + "example": "2022-12-31T23:59:59Z" + }, + "dueAt": { + "type": "string", + "description": "The due date for the dialog. This is the last date when the dialog is expected to be completed.", + "format": "date-time", + "nullable": true, + "example": "2022-12-31T23:59:59Z" + }, + "status": { + "description": "The aggregated status of the dialog.", + "oneOf": [ + { + "$ref": "#/components/schemas/DialogsEntities_DialogStatus" + } + ] + }, + "systemLabel": { + "description": "Current display state.", + "oneOf": [ + { + "$ref": "#/components/schemas/DialogEndUserContextsEntities_SystemLabel" + } + ] + }, + "latestActivity": { + "description": "The latest entry in the dialog's activity log.", + "nullable": true, + "oneOf": [ + { + "$ref": "#/components/schemas/V1EndUserDialogsQueriesSearch_DialogActivity" + } + ] + }, + "seenSinceLastUpdate": { + "type": "array", + "description": "The list of seen log entries for the dialog newer than the dialog ChangedAt date.", + "items": { + "$ref": "#/components/schemas/V1EndUserDialogsQueriesSearch_DialogSeenLog" + } + }, + "content": { + "description": "The content of the dialog in search results.", + "oneOf": [ + { + "$ref": "#/components/schemas/V1EndUserDialogsQueriesSearch_Content" + } + ] + } + } + }, + "V1EndUserDialogsQueriesSearch_DialogActivity": { + "type": "object", + "additionalProperties": false, + "properties": { + "id": { + "type": "string", + "description": "The unique identifier for the activity in UUIDv7 format.", + "format": "guid" + }, + "createdAt": { + "type": "string", + "description": "The date and time when the activity was created.", + "format": "date-time", + "nullable": true + }, + "extendedType": { + "type": "string", + "description": "An arbitrary string with a service-specific activity type.\n \nConsult the service-specific documentation provided by the service owner for details (if in use).", + "format": "uri", + "nullable": true + }, + "type": { + "description": "The type of activity.", + "oneOf": [ + { + "$ref": "#/components/schemas/DialogsEntitiesActivities_DialogActivityType" + } + ] + }, + "transmissionId": { + "type": "string", + "description": "If the activity is related to a particular transmission, this field will contain the transmission identifier.", + "format": "guid", + "nullable": true + }, + "performedBy": { + "description": "The actor that performed the activity.", + "oneOf": [ + { + "$ref": "#/components/schemas/V1EndUserCommonActors_Actor" + } + ] + }, + "description": { + "type": "array", + "description": "Unstructured text describing the activity. Only set if the activity type is \"Information\".", + "items": { + "$ref": "#/components/schemas/V1CommonLocalizations_Localization" + } + } + } + }, + "V1EndUserDialogsQueriesSearch_DialogSeenLog": { + "type": "object", + "additionalProperties": false, + "properties": { + "id": { + "type": "string", + "description": "The unique identifier for the seen log entry in UUIDv7 format.", + "format": "guid" + }, + "seenAt": { + "type": "string", + "description": "The timestamp when the dialog revision was seen.", + "format": "date-time" + }, + "seenBy": { + "description": "The actor that saw the dialog revision.", + "oneOf": [ + { + "$ref": "#/components/schemas/V1EndUserCommonActors_Actor" + } + ] + }, + "isViaServiceOwner": { + "type": "boolean", + "description": "Flag indicating whether the seen log entry was created via the service owner.\n \nThis is used when the service owner uses the service owner API to implement its own frontend.", + "nullable": true + }, + "isCurrentEndUser": { + "type": "boolean", + "description": "Flag indicating whether the seen log entry was created by the current end user." + } + } + }, + "V1EndUserDialogsQueriesSearch_Content": { + "type": "object", + "additionalProperties": false, + "properties": { + "title": { + "description": "The title of the dialog.", + "oneOf": [ + { + "$ref": "#/components/schemas/V1CommonContent_ContentValue" + } + ] + }, + "summary": { + "description": "A short summary of the dialog and its current state.", + "oneOf": [ + { + "$ref": "#/components/schemas/V1CommonContent_ContentValue" + } + ] + }, + "senderName": { + "description": "Overridden sender name. If not supplied, assume \"org\" as the sender name.", + "nullable": true, + "oneOf": [ + { + "$ref": "#/components/schemas/V1CommonContent_ContentValue" + } + ] + }, + "extendedStatus": { + "description": "Used as the human-readable label used to describe the \"ExtendedStatus\" field.", + "nullable": true, + "oneOf": [ + { + "$ref": "#/components/schemas/V1CommonContent_ContentValue" + } + ] + } + } + }, + "V1EndUserDialogsQueriesGet_Dialog": { + "type": "object", + "additionalProperties": false, + "properties": { + "id": { + "type": "string", + "description": "The unique identifier for the dialog in UUIDv7 format.", + "format": "guid", + "example": "01913cd5-784f-7d3b-abef-4c77b1f0972d" + }, + "revision": { + "type": "string", + "description": "The unique identifier for the revision in UUIDv4 format.", + "format": "guid", + "example": "a312cb9c-7632-43c2-aa38-69b06aed56ca" + }, + "org": { + "type": "string", + "description": "The service owner code representing the organization (service owner) related to this dialog.", + "example": "ske" + }, + "serviceResource": { + "type": "string", + "description": "The service identifier for the service that the dialog is related to in URN-format.\nThis corresponds to a service resource in the Altinn Resource Registry.", + "example": "urn:altinn:resource:some-service-identifier" + }, + "serviceResourceType": { + "type": "string", + "description": "The ServiceResource type, as defined in Altinn Resource Registry (see ResourceType)." + }, + "party": { + "type": "string", + "description": "The party code representing the organization or person that the dialog belongs to in URN format.", + "example": "urn:altinn:person:identifier-no:01125512345\nurn:altinn:organization:identifier-no:912345678" + }, + "progress": { + "type": "integer", + "description": "Advisory indicator of progress, represented as 1-100 percentage value. 100% representing a dialog that has come\nto a natural completion (successful or not).", + "format": "int32", + "nullable": true + }, + "process": { + "type": "string", + "description": "Optional process identifier used to indicate a business process this dialog belongs to.", + "nullable": true + }, + "precedingProcess": { + "type": "string", + "description": "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.", + "nullable": true + }, + "extendedStatus": { + "type": "string", + "description": "Arbitrary string with a service-specific indicator of status, typically used to indicate a fine-grained state of\nthe dialog to further specify the \"status\" enum.\n \nRefer to the service-specific documentation provided by the service owner for details on the possible values (if\nin use).", + "nullable": true + }, + "externalReference": { + "type": "string", + "description": "Arbitrary string with a service-specific reference to an external system or service.\n \nRefer to the service-specific documentation provided by the service owner for details (if in use).", + "nullable": true + }, + "dueAt": { + "type": "string", + "description": "The due date for the dialog. Dialogs past due date might be marked as such in frontends but will still be available.", + "format": "date-time", + "nullable": true, + "example": "2022-12-31T23:59:59Z" + }, + "expiresAt": { + "type": "string", + "description": "The expiration date for the dialog. This is the last date when the dialog is available for the end user.\n \nAfter this date is passed, the dialog will be considered expired and no longer available for the end user in any\nAPI. If not supplied, the dialog will be considered to never expire. This field can be changed by the service\nowner after the dialog has been created.", + "format": "date-time", + "nullable": true, + "example": "2022-12-31T23:59:59Z" + }, + "createdAt": { + "type": "string", + "description": "The date and time when the dialog was created.", + "format": "date-time", + "example": "2022-12-31T23:59:59Z" + }, + "updatedAt": { + "type": "string", + "description": "The date and time when the dialog was last updated.", + "format": "date-time", + "example": "2022-12-31T23:59:59Z" + }, + "status": { + "description": "The aggregated status of the dialog.", + "oneOf": [ + { + "$ref": "#/components/schemas/DialogsEntities_DialogStatus" + } + ] + }, + "systemLabel": { + "description": "Current display state.", + "oneOf": [ + { + "$ref": "#/components/schemas/DialogEndUserContextsEntities_SystemLabel" + } + ] + }, + "content": { + "description": "The dialog unstructured text content.", + "oneOf": [ + { + "$ref": "#/components/schemas/V1EndUserDialogsQueriesGet_Content" + } + ] + }, + "dialogToken": { + "type": "string", + "description": "The dialog token. May be used (if supported) against external URLs referred to in this dialog's apiActions,\ntransmissions or attachments. It should also be used for front-channel embeds.", + "nullable": true + }, + "attachments": { + "type": "array", + "description": "The attachments associated with the dialog (on an aggregate level).", + "items": { + "$ref": "#/components/schemas/V1EndUserDialogsQueriesGet_DialogAttachment" + } + }, + "transmissions": { + "type": "array", + "description": "The immutable list of transmissions associated with the dialog.", + "items": { + "$ref": "#/components/schemas/V1EndUserDialogsQueriesGet_DialogTransmission" + } + }, + "guiActions": { + "type": "array", + "description": "The GUI actions associated with the dialog. Should be used in browser-based interactive frontends.", + "items": { + "$ref": "#/components/schemas/V1EndUserDialogsQueriesGet_DialogGuiAction" + } + }, + "apiActions": { + "type": "array", + "description": "The API actions associated with the dialog. Should be used in specialized, non-browser-based integrations.", + "items": { + "$ref": "#/components/schemas/V1EndUserDialogsQueriesGet_DialogApiAction" + } + }, + "activities": { + "type": "array", + "description": "An immutable list of activities associated with the dialog.", + "items": { + "$ref": "#/components/schemas/V1EndUserDialogsQueriesGet_DialogActivity" + } + }, + "seenSinceLastUpdate": { + "type": "array", + "description": "The list of seen log entries for the dialog newer than the dialog ChangedAt date.", + "items": { + "$ref": "#/components/schemas/V1EndUserDialogsQueriesGet_DialogSeenLog" + } + } + } + }, + "V1EndUserDialogsQueriesGet_Content": { + "type": "object", + "additionalProperties": false, + "properties": { + "title": { + "description": "The title of the dialog.", + "oneOf": [ + { + "$ref": "#/components/schemas/V1CommonContent_ContentValue" + } + ] + }, + "summary": { + "description": "A short summary of the dialog and its current state.", + "oneOf": [ + { + "$ref": "#/components/schemas/V1CommonContent_ContentValue" + } + ] + }, + "senderName": { + "description": "Overridden sender name. If not supplied, assume \"org\" as the sender name.", + "nullable": true, + "oneOf": [ + { + "$ref": "#/components/schemas/V1CommonContent_ContentValue" + } + ] + }, + "additionalInfo": { + "description": "Additional information about the dialog, this may contain Markdown.", + "nullable": true, + "oneOf": [ + { + "$ref": "#/components/schemas/V1CommonContent_ContentValue" + } + ] + }, + "extendedStatus": { + "description": "Used as the human-readable label used to describe the \"ExtendedStatus\" field.", + "nullable": true, + "oneOf": [ + { + "$ref": "#/components/schemas/V1CommonContent_ContentValue" + } + ] + }, + "mainContentReference": { + "description": "Front-channel embedded content. Used to dynamically embed content in the frontend from an external URL.", + "nullable": true, + "oneOf": [ + { + "$ref": "#/components/schemas/V1CommonContent_ContentValue" + } + ] + } + } + }, + "V1EndUserDialogsQueriesGet_DialogAttachment": { + "type": "object", + "additionalProperties": false, + "properties": { + "id": { + "type": "string", + "description": "The unique identifier for the attachment in UUIDv7 format.", + "format": "guid" + }, + "displayName": { + "type": "array", + "description": "The display name of the attachment that should be used in GUIs.", + "items": { + "$ref": "#/components/schemas/V1CommonLocalizations_Localization" + } + }, + "urls": { + "type": "array", + "description": "The URLs associated with the attachment, each referring to a different representation of the attachment.", + "items": { + "$ref": "#/components/schemas/V1EndUserDialogsQueriesGet_DialogAttachmentUrl" + } + } + } + }, + "V1EndUserDialogsQueriesGet_DialogAttachmentUrl": { + "type": "object", + "additionalProperties": false, + "properties": { + "id": { + "type": "string", + "description": "The unique identifier for the attachment URL in UUIDv7 format.", + "format": "guid" + }, + "url": { + "type": "string", + "description": "The fully qualified URL of the attachment.", + "format": "uri", + "example": "https://someendpoint.com/someattachment.pdf" + }, + "mediaType": { + "type": "string", + "description": "The media type of the attachment.", + "nullable": true, + "example": "application/pdf\napplication/zip" + }, + "consumerType": { + "description": "What type of consumer the URL is intended for.", + "oneOf": [ + { + "$ref": "#/components/schemas/Attachments_AttachmentUrlConsumerType" + } + ] + } + } + }, + "V1EndUserDialogsQueriesGet_DialogTransmission": { + "type": "object", + "additionalProperties": false, + "properties": { + "id": { + "type": "string", + "description": "The unique identifier for the transmission in UUIDv7 format.", + "format": "guid" + }, + "createdAt": { + "type": "string", + "description": "The date and time when the transmission was created.", + "format": "date-time" + }, + "authorizationAttribute": { + "type": "string", + "description": "Contains an authorization resource attributeId, that can used in custom authorization rules in the XACML service\npolicy, which by default is the policy belonging to the service referred to by \"serviceResource\" in the dialog.\n \nCan also be used to refer to other service policies.", + "nullable": true, + "example": "mycustomresource\n/* equivalent to the above */\nurn:altinn:subresource:mycustomresource\nurn:altinn:task:Task_1\n/* refer to another service */\nurn:altinn:resource:some-other-service-identifier" + }, + "isAuthorized": { + "type": "boolean", + "description": "Flag indicating if the authenticated user is authorized for this transmission. If not, embedded content and\nthe attachments will not be available." + }, + "extendedType": { + "type": "string", + "description": "Arbitrary URI/URN describing a service-specific transmission type.\n \nRefer to the service-specific documentation provided by the service owner for details (if in use).", + "format": "uri", + "nullable": true + }, + "relatedTransmissionId": { + "type": "string", + "description": "Reference to any other transmission that this transmission is related to.", + "format": "guid", + "nullable": true + }, + "type": { + "description": "The type of transmission.", + "oneOf": [ + { + "$ref": "#/components/schemas/DialogsEntitiesTransmissions_DialogTransmissionType" + } + ] + }, + "sender": { + "description": "The actor that sent the transmission.", + "oneOf": [ + { + "$ref": "#/components/schemas/V1EndUserCommonActors_Actor" + } + ] + }, + "content": { + "description": "The transmission unstructured text content.", + "oneOf": [ + { + "$ref": "#/components/schemas/V1EndUserDialogsQueriesGet_DialogTransmissionContent" + } + ] + }, + "attachments": { + "type": "array", + "description": "The transmission-level attachments.", + "items": { + "$ref": "#/components/schemas/V1EndUserDialogsQueriesGet_DialogTransmissionAttachment" + } + } + } + }, + "V1EndUserDialogsQueriesGet_DialogTransmissionContent": { + "type": "object", + "additionalProperties": false, + "properties": { + "title": { + "description": "The transmission title.", + "oneOf": [ + { + "$ref": "#/components/schemas/V1CommonContent_ContentValue" + } + ] + }, + "summary": { + "description": "The transmission summary.", + "oneOf": [ + { + "$ref": "#/components/schemas/V1CommonContent_ContentValue" + } + ] + }, + "contentReference": { + "description": "Front-channel embedded content. Used to dynamically embed content in the frontend from an external URL.\nAllowed media types: application/vnd.dialogporten.frontchannelembed+json;type=markdown", + "nullable": true, + "oneOf": [ + { + "$ref": "#/components/schemas/V1CommonContent_ContentValue" + } + ] + } + } + }, + "V1EndUserDialogsQueriesGet_DialogTransmissionAttachment": { + "type": "object", + "additionalProperties": false, + "properties": { + "id": { + "type": "string", + "description": "The unique identifier for the attachment in UUIDv7 format.", + "format": "guid" + }, + "displayName": { + "type": "array", + "description": "The display name of the attachment that should be used in GUIs.", + "items": { + "$ref": "#/components/schemas/V1CommonLocalizations_Localization" + } + }, + "urls": { + "type": "array", + "description": "The URLs associated with the attachment, each referring to a different representation of the attachment.", + "items": { + "$ref": "#/components/schemas/V1EndUserDialogsQueriesGet_DialogTransmissionAttachmentUrl" + } + } + } + }, + "V1EndUserDialogsQueriesGet_DialogTransmissionAttachmentUrl": { + "type": "object", + "additionalProperties": false, + "properties": { + "url": { + "type": "string", + "description": "The fully qualified URL of the attachment. Will be set to \"urn:dialogporten:unauthorized\" if the user is\nnot authorized to access the transmission.", + "format": "uri", + "example": "https://someendpoint.com/someattachment.pdf\nurn:dialogporten:unauthorized" + }, + "mediaType": { + "type": "string", + "description": "The media type of the attachment.", + "nullable": true, + "example": "application/pdf\napplication/zip" + }, + "consumerType": { + "description": "The type of consumer the URL is intended for.", + "oneOf": [ + { + "$ref": "#/components/schemas/Attachments_AttachmentUrlConsumerType" + } + ] + } + } + }, + "V1EndUserDialogsQueriesGet_DialogGuiAction": { + "type": "object", + "additionalProperties": false, + "properties": { + "id": { + "type": "string", + "description": "The unique identifier for the action in UUIDv7 format.", + "format": "guid" + }, + "action": { + "type": "string", + "description": "The action identifier for the action, corresponding to the \"action\" attributeId used in the XACML service policy." + }, + "url": { + "type": "string", + "description": "The fully qualified URL of the action, to which the user will be redirected when the action is triggered. Will be set to\n\"urn:dialogporten:unauthorized\" if the user is not authorized to perform the action.", + "format": "uri", + "example": "urn:dialogporten:unauthorized\nhttps://someendpoint.com/gui/some-service-instance-id" + }, + "authorizationAttribute": { + "type": "string", + "description": "Contains an authorization resource attributeId, that can used in custom authorization rules in the XACML service\npolicy, which by default is the policy belonging to the service referred to by \"serviceResource\" in the dialog.\n \nCan also be used to refer to other service policies.", + "nullable": true, + "example": "mycustomresource\n/* equivalent to the above */\nurn:altinn:subresource:mycustomresource\nurn:altinn:task:Task_1\n/* refer to another service */\nurn:altinn:resource:some-other-service-identifier" + }, + "isAuthorized": { + "type": "boolean", + "description": "Whether the user is authorized to perform the action." + }, + "isDeleteDialogAction": { + "type": "boolean", + "description": "Indicates whether the action results in the dialog being deleted. Used by frontends to implement custom UX\nfor delete actions." + }, + "priority": { + "description": "Indicates a priority for the action, making it possible for frontends to adapt GUI elements based on action\npriority.", + "oneOf": [ + { + "$ref": "#/components/schemas/DialogsEntitiesActions_DialogGuiActionPriority" + } + ] + }, + "httpMethod": { + "description": "The HTTP method that the frontend should use when redirecting the user.", + "oneOf": [ + { + "$ref": "#/components/schemas/Http_HttpVerb" + } + ] + }, + "title": { + "type": "array", + "description": "The title of the action, this should be short and in verb form.", + "items": { + "$ref": "#/components/schemas/V1CommonLocalizations_Localization" + } + }, + "prompt": { + "type": "array", + "description": "If there should be a prompt asking the user for confirmation before the action is executed,\nthis field should contain the prompt text.", + "nullable": true, + "items": { + "$ref": "#/components/schemas/V1CommonLocalizations_Localization" + } + } + } + }, + "V1EndUserDialogsQueriesGet_DialogApiAction": { + "type": "object", + "additionalProperties": false, + "properties": { + "id": { + "type": "string", + "description": "The unique identifier for the action in UUIDv7 format.", + "format": "guid" + }, + "action": { + "type": "string", + "description": "String identifier for the action, corresponding to the \"action\" attributeId used in the XACML service policy,\nwhich by default is the policy belonging to the service referred to by \"serviceResource\" in the dialog.", + "example": "write" + }, + "authorizationAttribute": { + "type": "string", + "description": "Contains an authorization resource attributeId, that can used in custom authorization rules in the XACML service\npolicy, which by default is the policy belonging to the service referred to by \"serviceResource\" in the dialog.\n \nCan also be used to refer to other service policies.", + "nullable": true, + "example": "mycustomresource\n/* equivalent to the above */\nurn:altinn:subresource:mycustomresource\nurn:altinn:task:Task_1\n/* refer to another service */\nurn:altinn:resource:some-other-service-identifier" + }, + "isAuthorized": { + "type": "boolean", + "description": "True if the authenticated user is authorized for this action. If not, the action will not be available\nand all endpoints will be replaced with a fixed placeholder." + }, + "endpoints": { + "type": "array", + "description": "The endpoints associated with the action.", + "items": { + "$ref": "#/components/schemas/V1EndUserDialogsQueriesGet_DialogApiActionEndpoint" + } + } + } + }, + "V1EndUserDialogsQueriesGet_DialogApiActionEndpoint": { + "type": "object", + "additionalProperties": false, + "properties": { + "id": { + "type": "string", + "description": "The unique identifier for the endpoint in UUIDv7 format.", + "format": "guid" + }, + "version": { + "type": "string", + "description": "Arbitrary string indicating the version of the endpoint.\n \nConsult the service-specific documentation provided by the service owner for details (if in use).", + "nullable": true + }, + "url": { + "type": "string", + "description": "The fully qualified URL of the API endpoint. Will be set to \"urn:dialogporten:unauthorized\" if the user is\nnot authorized to perform the action.", + "format": "uri", + "example": "https://someendpoint.com/api/v1/someaction\nurn:dialogporten:unauthorized" + }, + "httpMethod": { + "description": "The HTTP method that the endpoint expects for this action.", + "oneOf": [ + { + "$ref": "#/components/schemas/Http_HttpVerb" + } + ] + }, + "documentationUrl": { + "type": "string", + "description": "Link to service provider documentation for the endpoint. Used for service owners to provide documentation for\nintegrators. Should be a URL to a human-readable page.", + "format": "uri", + "nullable": true + }, + "requestSchema": { + "type": "string", + "description": "Link to the request schema for the endpoint. Used by service owners to provide documentation for integrators.\nDialogporten will not validate information on this endpoint.", + "format": "uri", + "nullable": true + }, + "responseSchema": { + "type": "string", + "description": "Link to the response schema for the endpoint. Used for service owners to provide documentation for integrators.\nDialogporten will not validate information on this endpoint.", + "format": "uri", + "nullable": true + }, + "deprecated": { + "type": "boolean", + "description": "Boolean indicating if the endpoint is deprecated. Integrators should migrate to endpoints with a higher version." + }, + "sunsetAt": { + "type": "string", + "description": "Date and time when the service owner has indicated that endpoint will no longer function. Only set if the endpoint\nis deprecated. Dialogporten will not enforce this date.", + "format": "date-time", + "nullable": true + } + } + }, + "V1EndUserDialogsQueriesGet_DialogActivity": { + "type": "object", + "additionalProperties": false, + "properties": { + "id": { + "type": "string", + "description": "The unique identifier for the activity in UUIDv7 format.", + "format": "guid" + }, + "createdAt": { + "type": "string", + "description": "The date and time when the activity was created.", + "format": "date-time", + "nullable": true + }, + "extendedType": { + "type": "string", + "description": "An arbitrary URI/URN with a service-specific activity type.\n \nConsult the service-specific documentation provided by the service owner for details (if in use).", + "format": "uri", + "nullable": true + }, + "type": { + "description": "The type of activity.", + "oneOf": [ + { + "$ref": "#/components/schemas/DialogsEntitiesActivities_DialogActivityType" + } + ] + }, + "transmissionId": { + "type": "string", + "description": "If the activity is related to a particular transmission, this field will contain the transmission identifier.", + "format": "guid", + "nullable": true + }, + "performedBy": { + "description": "The actor that performed the activity.", + "oneOf": [ + { + "$ref": "#/components/schemas/V1EndUserCommonActors_Actor" + } + ] + }, + "description": { + "type": "array", + "description": "Unstructured text describing the activity. Only set if the activity type is \"Information\".", + "items": { + "$ref": "#/components/schemas/V1CommonLocalizations_Localization" + } + } + } + }, + "V1EndUserDialogsQueriesGet_DialogSeenLog": { + "type": "object", + "additionalProperties": false, + "properties": { + "id": { + "type": "string", + "description": "The unique identifier for the seen log entry in UUIDv7 format.", + "format": "guid" + }, + "seenAt": { + "type": "string", + "description": "The timestamp when the dialog revision was seen.", + "format": "date-time" + }, + "seenBy": { + "description": "The actor that saw the dialog revision.", + "oneOf": [ + { + "$ref": "#/components/schemas/V1EndUserCommonActors_Actor" + } + ] + }, + "isViaServiceOwner": { + "type": "boolean", + "description": "Flag indicating whether the seen log entry was created via the service owner.\n \nThis is used when the service owner uses the service owner API to implement its own frontend.", + "nullable": true + }, + "isCurrentEndUser": { + "type": "boolean", + "description": "Flag indicating whether the seen log entry was created by the current end user." + } + } + }, + "V1EndUserDialogLabelAssignmentLogQueriesSearch_LabelAssignmentLog": { + "type": "object", + "additionalProperties": false, + "properties": { + "createdAt": { + "type": "string", + "format": "date-time" + }, + "name": { + "type": "string" + }, + "action": { + "type": "string" + }, + "performedBy": { + "$ref": "#/components/schemas/V1EndUserCommonActors_Actor" + } + } + }, + "V1EndUserDialogActivitiesQueriesSearch_Activity": { + "type": "object", + "additionalProperties": false, + "properties": { + "id": { + "type": "string", + "format": "guid" + }, + "createdAt": { + "type": "string", + "format": "date-time" + }, + "extendedType": { + "type": "string", + "format": "uri", + "nullable": true + }, + "seenByEndUserIdHash": { + "type": "string", + "nullable": true + }, + "type": { + "$ref": "#/components/schemas/DialogsEntitiesActivities_DialogActivityType" + }, + "transmissionId": { + "type": "string", + "format": "guid", + "nullable": true + } + } + }, + "V1EndUserDialogActivitiesQueriesGet_Activity": { + "type": "object", + "additionalProperties": false, + "properties": { + "id": { + "type": "string", + "format": "guid" + }, + "createdAt": { + "type": "string", + "format": "date-time", + "nullable": true + }, + "extendedType": { + "type": "string", + "format": "uri", + "nullable": true + }, + "type": { + "$ref": "#/components/schemas/DialogsEntitiesActivities_DialogActivityType" + }, + "transmissionId": { + "type": "string", + "format": "guid", + "nullable": true + }, + "performedBy": { + "$ref": "#/components/schemas/V1EndUserCommonActors_Actor" + }, + "description": { + "type": "array", + "items": { + "$ref": "#/components/schemas/V1CommonLocalizations_Localization" + } + } + } + }, + "JsonPatchOperations_Operation": { + "type": "object", + "additionalProperties": false, + "properties": { + "operationType": { + "$ref": "#/components/schemas/JsonPatchOperations_OperationType" + }, + "path": { + "type": "string", + "nullable": true + }, + "op": { + "type": "string", + "nullable": true + }, + "from": { + "type": "string", + "nullable": true + }, + "value": { + "nullable": true + } + } + }, + "JsonPatchOperations_OperationType": { + "type": "string", + "description": "", + "x-enumNames": [ + "Add", + "Remove", + "Replace", + "Move", + "Copy", + "Test", + "Invalid" + ], + "enum": [ + "Add", + "Remove", + "Replace", + "Move", + "Copy", + "Test", + "Invalid" + ] + } + }, + "securitySchemes": { + "JWTBearerAuth": { + "type": "http", + "description": "Enter a JWT token to authorize the requests...", + "scheme": "Bearer", + "bearerFormat": "JWT" + } + } + } +} \ No newline at end of file diff --git a/src/Digdir.Library.Dialogporten.WebApiClient/.refitter b/src/Digdir.Library.Dialogporten.WebApiClient/.refitter index f5cc28633..288a6ffec 100644 --- a/src/Digdir.Library.Dialogporten.WebApiClient/.refitter +++ b/src/Digdir.Library.Dialogporten.WebApiClient/.refitter @@ -1,5 +1,5 @@ { - "openApiPath": "../../docs/schema/V1/swagger.verified.json", + "openApiPath": "../Digdir.Domain.Dialogporten.WebApi/swagger.json", "namespace": "Digdir.Library.Dialogporten.WebApiClient.Features.V1", "outputFolder": "Features/V1", "operationNameGenerator": "SingleClientFromOperationId", 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 ce261110f..9a55ab425 100644 --- a/src/Digdir.Library.Dialogporten.WebApiClient/Digdir.Library.Dialogporten.WebApiClient.csproj +++ b/src/Digdir.Library.Dialogporten.WebApiClient/Digdir.Library.Dialogporten.WebApiClient.csproj @@ -20,10 +20,10 @@ - + - all - runtime; build; native; contentfiles; analyzers; buildtransitive + all + runtime; build; native; contentfiles; analyzers; buildtransitive diff --git a/src/Digdir.Library.Dialogporten.WebApiClient/Features/V1/RefitterInterface.verified.cs b/src/Digdir.Library.Dialogporten.WebApiClient/Features/V1/RefitterInterface.cs similarity index 99% rename from src/Digdir.Library.Dialogporten.WebApiClient/Features/V1/RefitterInterface.verified.cs rename to src/Digdir.Library.Dialogporten.WebApiClient/Features/V1/RefitterInterface.cs index af7c0ca3c..429edef02 100644 --- a/src/Digdir.Library.Dialogporten.WebApiClient/Features/V1/RefitterInterface.verified.cs +++ b/src/Digdir.Library.Dialogporten.WebApiClient/Features/V1/RefitterInterface.cs @@ -161,19 +161,12 @@ public V1ServiceOwnerDialogActivitiesNotificationConditionNotificationConditionQ } - /// Gets a list of dialogs + /// Gets a list of dialog transmissions [System.CodeDom.Compiler.GeneratedCode("Refitter", "1.5.0.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. + /// Gets a list of dialog transmissions + /// Gets the list of transmissions belonging to a dialog /// /// A representing the instance containing the result: /// @@ -183,23 +176,35 @@ public partial interface IServiceownerApi /// /// /// 200 - /// Successfully returned the dialog list. + /// Successfully returned the dialog transmission list. /// /// /// 401 - /// Missing or invalid authentication token. Requires a Maskinporten-token with the scope \"digdir:dialogporten.serviceprovider.search\". + /// 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. + /// + /// + /// 410 + /// Entity with the given key(s) is removed. /// /// /// - [Headers("Accept: application/json")] - [Get("/api/v1/serviceowner/dialogs")] - Task> V1ServiceOwnerDialogsSearchSearchDialog([Query] V1ServiceOwnerDialogsSearchSearchDialogQueryParams queryParams, CancellationToken cancellationToken = default); + [Headers("Accept: application/json, application/problem+json")] + [Get("/api/v1/serviceowner/dialogs/{dialogId}/transmissions")] + Task>> V1ServiceOwnerDialogTransmissionsSearchSearchDialogTransmission(System.Guid dialogId, CancellationToken cancellationToken = default); - /// Creates a new dialog + /// Adds a transmission to a dialog /// - /// The dialog is created with the given configuration. For more information see the documentation (link TBD). + /// The transmission 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/altinn/dialogporten/blob/main/src/Digdir.Domain.Dialogporten.Application/Features/V1/ServiceOwner/Dialogs/Commands/Create/CreateDialogCommandValidator.cs) + /// 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: @@ -210,7 +215,7 @@ public partial interface IServiceownerApi /// /// /// 201 - /// The UUID of the created dialog aggregate. A relative URL to the newly created activity is set in the \"Location\" header. + /// The UUID of the created dialog transmission. A relative URL to the newly created activity is set in the \"Location\" header. /// /// /// 204 @@ -226,7 +231,19 @@ public partial interface IServiceownerApi /// /// /// 403 - /// Unauthorized to create a dialog for the given serviceResource (not owned by authenticated organization or has additional scope requirements defined in policy). + /// 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. + /// + /// + /// 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. /// /// /// 422 @@ -235,18 +252,11 @@ public partial interface IServiceownerApi /// /// [Headers("Accept: application/json, application/problem+json")] - [Post("/api/v1/serviceowner/dialogs")] - Task> V1ServiceOwnerDialogsCreateDialog([Body] V1ServiceOwnerDialogsCommandsCreate_Dialog dto, CancellationToken cancellationToken = default); + [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); - /// 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. - /// + /// 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: /// @@ -255,12 +265,8 @@ public partial interface IServiceownerApi /// Description /// /// - /// 204 - /// The dialog aggregate was deleted successfully. - /// - /// - /// 400 - /// Validation error occured. See problem details for a list of errors. + /// 200 + /// Successfully returned the dialog transmission. /// /// /// 401 @@ -268,33 +274,24 @@ public partial interface IServiceownerApi /// /// /// 403 - /// Unauthorized to delete the supplied dialog (not owned by authenticated organization or has additional scope requirements defined in policy). + /// 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 is already deleted. + /// 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. /// - /// - /// 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); + [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); - /// 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 + /// 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: /// @@ -304,33 +301,32 @@ public partial interface IServiceownerApi /// /// /// 200 - /// Successfully returned the dialog aggregate. + /// Successfully returned the dialog seen log records. /// /// /// 401 - /// Missing or invalid authentication token. Requires a Maskinporten-token with the scope \"digdir:dialogporten.serviceprovider\". + /// Unauthorized /// /// /// 403 - /// Unauthorized to get the supplied dialog (not owned by authenticated organization or has additional scope requirements defined in policy). + /// Forbidden /// /// /// 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")] - [Get("/api/v1/serviceowner/dialogs/{dialogId}")] - Task> V1ServiceOwnerDialogsGetGetDialog(System.Guid dialogId, [Query] string endUserId, CancellationToken cancellationToken = default); + [Get("/api/v1/serviceowner/dialogs/{dialogId}/seenlog")] + Task>> V1ServiceOwnerDialogSeenLogsSearchSearchDialogSeenLog(System.Guid dialogId, 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. - /// + /// 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: /// @@ -339,38 +335,30 @@ public partial interface IServiceownerApi /// Description /// /// - /// 204 - /// Patch was successfully applied. - /// - /// - /// 400 - /// Validation error occured. See problem details for a list of errors. + /// 200 + /// Successfully returned the dialog seen log record. /// /// /// 401 - /// Missing or invalid authentication token. Requires a Maskinporten-token with the scope \\\"digdir:dialogporten.serviceprovider\\\" + /// Unauthorized /// /// /// 403 - /// Unauthorized to update a dialog for the given serviceResource (not owned by authenticated organization or has additional scope requirements defined in policy) + /// Forbidden /// /// /// 404 - /// The given dialog ID was not found or is deleted - /// - /// - /// 412 - /// The supplied Revision does not match the current Revision of the dialog + /// The given dialog ID was not found or is already deleted. /// /// - /// 422 - /// Domain error occured. See problem details for a list of errors. + /// 410 + /// Entity with the given key(s) is removed. /// /// /// - [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); + [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); /// Replaces a dialog /// @@ -423,12 +411,13 @@ public partial interface IServiceownerApi [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 + /// Gets a single dialog /// - /// Deletes a given dialog (hard delete). For more information see the documentation (link TBD). + /// Gets a single dialog aggregate. 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. + /// Note that this operation may return deleted dialogs (see the field `DeletedAt`). /// + /// Filter by end user id /// /// A representing the instance containing the result: /// @@ -437,8 +426,8 @@ public partial interface IServiceownerApi /// Description /// /// - /// 204 - /// The dialog aggregate was deleted successfully. + /// 200 + /// Successfully returned the dialog aggregate. /// /// /// 401 @@ -446,25 +435,27 @@ public partial interface IServiceownerApi /// /// /// 403 - /// Unauthorized to delete the supplied dialog (not owned by authenticated organization or has additional scope requirements defined in policy). + /// 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. /// - /// - /// 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); + [Headers("Accept: application/json, application/problem+json")] + [Get("/api/v1/serviceowner/dialogs/{dialogId}")] + Task> V1ServiceOwnerDialogsGetGetDialog(System.Guid dialogId, [Query] string endUserId, 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. + /// 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: /// @@ -473,53 +464,43 @@ public partial interface IServiceownerApi /// Description /// /// - /// 200 - /// Successfully returned the notification determination. + /// 204 + /// 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 \"altinn:system/notifications.condition.check\". + /// Missing or invalid authentication token. Requires a Maskinporten-token with the scope \"digdir:dialogporten.serviceprovider\". /// /// /// 403 - /// Forbidden + /// Unauthorized to delete 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}/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. + /// 404 + /// The given dialog ID was not found or is already deleted. /// /// - /// 401 - /// Missing or invalid authentication token. Requires a Maskinporten-token with the scope \"digdir:dialogporten.serviceprovider\". + /// 410 + /// Entity with the given key(s) is removed. /// /// - /// 403 - /// Unauthorized to get the supplied dialog (not owned by authenticated organization or has additional scope requirements defined in policy). + /// 412 + /// The supplied If-Match header did not match the current Revision value for the dialog. The request was not applied. /// /// /// - [Headers("Accept: application/json")] - [Get("/api/v1/serviceowner/dialogs/{dialogId}/activities")] - Task>> V1ServiceOwnerDialogActivitiesSearchSearchDialogActivity(System.Guid dialogId, CancellationToken cancellationToken = default); + [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); - /// Adds a activity to a dialogs activity history + /// Patch a single dialog /// - /// The activity is created with the given configuration. For more information see the documentation (link TBD). + /// 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. /// @@ -531,12 +512,8 @@ public partial interface IServiceownerApi /// Description /// /// - /// 201 - /// The UUID of the created dialog activity. A relative URL to the newly created activity is set in the \"Location\" header. - /// - /// /// 204 - /// No Content + /// Patch was successfully applied. /// /// /// 400 @@ -544,23 +521,19 @@ public partial interface IServiceownerApi /// /// /// 401 - /// Missing or invalid authentication token. Requires a Maskinporten-token with the scope \"digdir:dialogporten.serviceprovider\". + /// 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). + /// 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 already deleted. - /// - /// - /// 410 - /// Entity with the given key(s) is removed. + /// The given dialog ID was not found or is deleted /// /// /// 412 - /// The supplied If-Match header did not match the current Revision value for the dialog. The request was not applied. + /// The supplied Revision does not match the current Revision of the dialog /// /// /// 422 @@ -568,12 +541,19 @@ public partial interface IServiceownerApi /// /// /// - [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); + [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); - /// Gets a single dialog activity - /// Gets a single activity belonging to a dialog. For more information see the documentation (link TBD). + /// 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: /// @@ -583,32 +563,24 @@ public partial interface IServiceownerApi /// /// /// 200 - /// Successfully returned the dialog activity. + /// Successfully returned the dialog list. /// /// /// 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. - /// - /// - /// 410 - /// Entity with the given key(s) is removed. + /// Missing or invalid authentication token. Requires a Maskinporten-token with the scope \"digdir:dialogporten.serviceprovider.search\". /// /// /// - [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); + [Headers("Accept: application/json")] + [Get("/api/v1/serviceowner/dialogs")] + Task> V1ServiceOwnerDialogsSearchSearchDialog([Query] V1ServiceOwnerDialogsSearchSearchDialogQueryParams queryParams, 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). + /// 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/altinn/dialogporten/blob/main/src/Digdir.Domain.Dialogporten.Application/Features/V1/ServiceOwner/Dialogs/Commands/Create/CreateDialogCommandValidator.cs) + /// /// /// A representing the instance containing the result: /// @@ -617,33 +589,41 @@ public partial interface IServiceownerApi /// Description /// /// - /// 200 - /// Successfully returned the dialog seen log records. + /// 201 + /// The UUID of the created dialog aggregate. A relative URL to the newly created activity is set in the \"Location\" header. /// /// - /// 401 - /// Unauthorized + /// 204 + /// No Content /// /// - /// 403 - /// Forbidden + /// 400 + /// Validation error occured. See problem details for a list of errors. /// /// - /// 404 - /// The given dialog ID was not found or is already deleted. + /// 401 + /// Missing or invalid authentication token. Requires a Maskinporten-token with the scope \"digdir:dialogporten.serviceprovider\". /// /// - /// 410 - /// Entity with the given key(s) is removed. + /// 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")] - [Get("/api/v1/serviceowner/dialogs/{dialogId}/seenlog")] - Task>> V1ServiceOwnerDialogSeenLogsSearchSearchDialogSeenLog(System.Guid dialogId, CancellationToken cancellationToken = default); + [Post("/api/v1/serviceowner/dialogs")] + Task> V1ServiceOwnerDialogsCreateDialog([Body] V1ServiceOwnerDialogsCommandsCreate_Dialog dto, 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). + /// 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: /// @@ -652,33 +632,33 @@ public partial interface IServiceownerApi /// Description /// /// - /// 200 - /// Successfully returned the dialog seen log record. + /// 204 + /// The dialog aggregate was deleted successfully. /// /// /// 401 - /// Unauthorized + /// Missing or invalid authentication token. Requires a Maskinporten-token with the scope \"digdir:dialogporten.serviceprovider\". /// /// /// 403 - /// Forbidden + /// 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. /// /// - /// 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. /// /// /// - [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); + [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); - /// Gets a list of dialog transmissions - /// Gets the list of transmissions belonging to a dialog + /// Gets a list of dialog activities + /// Gets the list of activities belonging to a dialog /// /// A representing the instance containing the result: /// @@ -688,7 +668,7 @@ public partial interface IServiceownerApi /// /// /// 200 - /// Successfully returned the dialog transmission list. + /// Successfully returned the dialog activity list. /// /// /// 401 @@ -698,23 +678,15 @@ public partial interface IServiceownerApi /// 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. - /// - /// - /// 410 - /// Entity with the given key(s) is removed. - /// /// /// - [Headers("Accept: application/json, application/problem+json")] - [Get("/api/v1/serviceowner/dialogs/{dialogId}/transmissions")] - Task>> V1ServiceOwnerDialogTransmissionsSearchSearchDialogTransmission(System.Guid dialogId, CancellationToken cancellationToken = default); + [Headers("Accept: application/json")] + [Get("/api/v1/serviceowner/dialogs/{dialogId}/activities")] + Task>> V1ServiceOwnerDialogActivitiesSearchSearchDialogActivity(System.Guid dialogId, CancellationToken cancellationToken = default); - /// Adds a transmission to a dialog + /// Adds a activity to a dialogs activity history /// - /// The transmission is created with the given configuration. For more information see the documentation (link TBD). + /// 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. /// @@ -727,7 +699,7 @@ public partial interface IServiceownerApi /// /// /// 201 - /// The UUID of the created dialog transmission. A relative URL to the newly created activity is set in the \"Location\" header. + /// The UUID of the created dialog activity. A relative URL to the newly created activity is set in the \"Location\" header. /// /// /// 204 @@ -764,11 +736,12 @@ public partial interface IServiceownerApi /// /// [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); + [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 transmission - /// Gets a single transmission belonging to a dialog. For more information see the documentation (link TBD). + /// 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: /// @@ -778,7 +751,34 @@ public partial interface IServiceownerApi /// /// /// 200 - /// Successfully returned the dialog transmission. + /// 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 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 @@ -790,7 +790,7 @@ public partial interface IServiceownerApi /// /// /// 404 - /// The given dialog ID was not found or was deleted, or the given transmission ID was not found. + /// The given dialog ID was not found or was deleted, or the given activity ID was not found. /// /// /// 410 @@ -799,8 +799,8 @@ public partial interface IServiceownerApi /// /// [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); + [Get("/api/v1/serviceowner/dialogs/{dialogId}/activities/{activityId}")] + Task> V1ServiceOwnerDialogActivitiesGetGetDialogActivity(System.Guid dialogId, System.Guid activityId, CancellationToken cancellationToken = default); } } @@ -832,140 +832,78 @@ namespace Digdir.Library.Dialogporten.WebApiClient.Features.V1 [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "14.2.0.0 (NJsonSchema v11.1.0.0 (Newtonsoft.Json v13.0.0.0))")] - public enum Actors_ActorType + public partial class V1ServiceOwnerDialogTransmissionsQueriesSearch_Transmission { + /// + /// The unique identifier for the transmission in UUIDv7 format. + /// - [System.Runtime.Serialization.EnumMember(Value = @"PartyRepresentative")] - PartyRepresentative = 0, + [JsonPropertyName("id")] + public System.Guid Id { get; set; } - [System.Runtime.Serialization.EnumMember(Value = @"ServiceOwner")] - ServiceOwner = 1, + /// + /// The date and time when the transmission was created. + /// - } + [JsonPropertyName("createdAt")] + public System.DateTimeOffset CreatedAt { get; set; } - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "14.2.0.0 (NJsonSchema v11.1.0.0 (Newtonsoft.Json v13.0.0.0))")] - public enum Attachments_AttachmentUrlConsumerType - { + /// + /// The authorization attribute associated with the transmission. + /// - [System.Runtime.Serialization.EnumMember(Value = @"Gui")] - Gui = 0, + [JsonPropertyName("authorizationAttribute")] + public string AuthorizationAttribute { get; set; } - [System.Runtime.Serialization.EnumMember(Value = @"Api")] - Api = 1, + /// + /// The extended type URI for the transmission. + /// - } + [JsonPropertyName("extendedType")] + public System.Uri ExtendedType { get; set; } - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "14.2.0.0 (NJsonSchema v11.1.0.0 (Newtonsoft.Json v13.0.0.0))")] - public partial class ContinuationTokenSetOfTOrderDefinitionAndTTarget - { + /// + /// The unique identifier for the related transmission, if any. + /// - private IDictionary _additionalProperties; + [JsonPropertyName("relatedTransmissionId")] + public System.Guid? RelatedTransmissionId { get; set; } - [JsonExtensionData] - public IDictionary AdditionalProperties - { - get { return _additionalProperties ?? (_additionalProperties = new Dictionary()); } - set { _additionalProperties = value; } - } + /// + /// The date and time when the transmission was deleted, if applicable. + /// - } + [JsonPropertyName("deletedAt")] + public System.DateTimeOffset? DeletedAt { get; set; } - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "14.2.0.0 (NJsonSchema v11.1.0.0 (Newtonsoft.Json v13.0.0.0))")] - public enum DialogEndUserContextsEntities_SystemLabel - { + /// + /// The type of the transmission. + /// - [System.Runtime.Serialization.EnumMember(Value = @"Default")] - Default = 0, + [JsonPropertyName("type")] + [JsonConverter(typeof(JsonStringEnumConverter))] + public DialogsEntitiesTransmissions_DialogTransmissionType Type { get; set; } - [System.Runtime.Serialization.EnumMember(Value = @"Bin")] - Bin = 1, + /// + /// The sender actor information for the transmission. + /// - [System.Runtime.Serialization.EnumMember(Value = @"Archive")] - Archive = 2, + [JsonPropertyName("sender")] + public V1ServiceOwnerCommonActors_Actor Sender { get; set; } - } + /// + /// The content of the transmission. + /// - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "14.2.0.0 (NJsonSchema v11.1.0.0 (Newtonsoft.Json v13.0.0.0))")] - public enum DialogsEntities_DialogStatus - { + [JsonPropertyName("content")] + public V1ServiceOwnerDialogTransmissionsQueriesSearch_Content Content { get; set; } - [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.Runtime.Serialization.EnumMember(Value = @"DialogDeleted")] - DialogDeleted = 7, - - [System.Runtime.Serialization.EnumMember(Value = @"DialogRestored")] - DialogRestored = 8, - - [System.Runtime.Serialization.EnumMember(Value = @"SentToSigning")] - SentToSigning = 9, - - [System.Runtime.Serialization.EnumMember(Value = @"SentToFormFill")] - SentToFormFill = 10, - - [System.Runtime.Serialization.EnumMember(Value = @"SentToSendIn")] - SentToSendIn = 11, + /// + /// The attachments associated with the transmission. + /// - [System.Runtime.Serialization.EnumMember(Value = @"SentToPayment")] - SentToPayment = 12, + [JsonPropertyName("attachments")] + public ICollection Attachments { get; set; } } @@ -1000,159 +938,284 @@ public enum DialogsEntitiesTransmissions_DialogTransmissionType } [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "14.2.0.0 (NJsonSchema v11.1.0.0 (Newtonsoft.Json v13.0.0.0))")] - public enum Http_HttpVerb + public partial class V1ServiceOwnerCommonActors_Actor { + /// + /// The type of actor that sent the transmission. + /// - [System.Runtime.Serialization.EnumMember(Value = @"GET")] - GET = 0, + [JsonPropertyName("actorType")] + [JsonConverter(typeof(JsonStringEnumConverter))] + public Actors_ActorType ActorType { get; set; } - [System.Runtime.Serialization.EnumMember(Value = @"POST")] - POST = 1, + /// + /// 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. + ///
- [System.Runtime.Serialization.EnumMember(Value = @"PUT")] - PUT = 2, + [JsonPropertyName("actorName")] + public string ActorName { get; set; } - [System.Runtime.Serialization.EnumMember(Value = @"PATCH")] - PATCH = 3, + /// + /// The identifier of the person or organization that sent the transmission. Mutually exclusive with ActorName. + ///
Might be omitted if ActorType is "ServiceOwner". + ///
- [System.Runtime.Serialization.EnumMember(Value = @"DELETE")] - DELETE = 4, + [JsonPropertyName("actorId")] + public string ActorId { get; set; } - [System.Runtime.Serialization.EnumMember(Value = @"HEAD")] - HEAD = 5, + } - [System.Runtime.Serialization.EnumMember(Value = @"OPTIONS")] - OPTIONS = 6, + [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 = @"TRACE")] - TRACE = 7, + [System.Runtime.Serialization.EnumMember(Value = @"PartyRepresentative")] + PartyRepresentative = 0, - [System.Runtime.Serialization.EnumMember(Value = @"CONNECT")] - CONNECT = 8, + [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 partial class JsonPatchOperations_Operation + public partial class V1ServiceOwnerDialogTransmissionsQueriesSearch_Content { + /// + /// The title of the content. + /// - [JsonPropertyName("from")] - public string From { get; set; } + [JsonPropertyName("title")] + public V1CommonContent_ContentValue Title { get; set; } - [JsonPropertyName("op")] - public string Op { get; set; } + /// + /// The summary of the content. + /// - [JsonPropertyName("operationType")] - [JsonConverter(typeof(JsonStringEnumConverter))] - public JsonPatchOperations_OperationType OperationType { get; set; } + [JsonPropertyName("summary")] + public V1CommonContent_ContentValue Summary { get; set; } - [JsonPropertyName("path")] - public string Path { get; set; } + /// + /// Front-channel embedded content. Used to dynamically embed content in the frontend from an external URL. + /// - [JsonPropertyName("value")] - public object Value { get; set; } + [JsonPropertyName("contentReference")] + public V1CommonContent_ContentValue ContentReference { 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 + public partial class V1CommonContent_ContentValue { + /// + /// A list of localizations for the content. + /// - [System.Runtime.Serialization.EnumMember(Value = @"Add")] - Add = 0, + [JsonPropertyName("value")] + public ICollection Value { get; set; } - [System.Runtime.Serialization.EnumMember(Value = @"Remove")] - Remove = 1, + /// + /// Media type of the content, this can also indicate that the content is embeddable. + ///
For a list of supported media types, see (link TBD). + ///
- [System.Runtime.Serialization.EnumMember(Value = @"Replace")] - Replace = 2, + [JsonPropertyName("mediaType")] + public string MediaType { get; set; } - [System.Runtime.Serialization.EnumMember(Value = @"Move")] - Move = 3, + } - [System.Runtime.Serialization.EnumMember(Value = @"Copy")] - Copy = 4, + [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 localized text or URI reference. + /// - [System.Runtime.Serialization.EnumMember(Value = @"Test")] - Test = 5, + [JsonPropertyName("value")] + public string Value { get; set; } - [System.Runtime.Serialization.EnumMember(Value = @"Invalid")] - Invalid = 6, + /// + /// The language code of the localization in ISO 639-1 format. + /// + + [JsonPropertyName("languageCode")] + public string LanguageCode { get; set; } } [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "14.2.0.0 (NJsonSchema v11.1.0.0 (Newtonsoft.Json v13.0.0.0))")] - public partial class OrderSetOfTOrderDefinitionAndTTarget + public partial class V1ServiceOwnerDialogTransmissionsQueriesSearch_Attachment { + /// + /// The unique identifier for the attachment in UUIDv7 format. + /// - private IDictionary _additionalProperties; + [JsonPropertyName("id")] + public System.Guid Id { get; set; } - [JsonExtensionData] - public IDictionary AdditionalProperties - { - get { return _additionalProperties ?? (_additionalProperties = new Dictionary()); } - set { _additionalProperties = value; } - } + /// + /// 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 PaginatedListOfV1ServiceOwnerDialogsQueriesSearch_Dialog + public partial class V1ServiceOwnerDialogTransmissionsQueriesSearch_AttachmentUrl { /// - /// The continuation token to be used to fetch the next page of items + /// The unique identifier for the attachment URL in UUIDv7 format. /// - [JsonPropertyName("continuationToken")] - public string ContinuationToken { get; set; } + [JsonPropertyName("id")] + public System.Guid Id { get; set; } /// - /// Whether there are more items available that can be fetched by supplying the continuation token + /// 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("hasNextPage")] - public bool HasNextPage { get; set; } + [JsonPropertyName("url")] + public System.Uri Url { get; set; } /// - /// The paginated list of items + /// The media type of the attachment. /// - [JsonPropertyName("items")] - public ICollection Items { get; set; } + [JsonPropertyName("mediaType")] + public string MediaType { get; set; } /// - /// The current sorting order of the items + /// The type of consumer the URL is intended for. /// - [JsonPropertyName("orderBy")] - public string OrderBy { get; set; } + [JsonPropertyName("consumerType")] + [JsonConverter(typeof(JsonStringEnumConverter))] + public Attachments_AttachmentUrlConsumerType ConsumerType { get; 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 + public enum Attachments_AttachmentUrlConsumerType { - [JsonPropertyName("detail")] - public string Detail { get; set; } - - [JsonPropertyName("errors")] - public ICollection Errors { get; set; } + [System.Runtime.Serialization.EnumMember(Value = @"Gui")] + Gui = 0, - [JsonPropertyName("instance")] - public string Instance { get; set; } = "/api/route"; + [System.Runtime.Serialization.EnumMember(Value = @"Api")] + Api = 1, - [JsonPropertyName("status")] - public int Status { get; set; } = 400; + } + + [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 unique identifier for the transmission in UUIDv7 format. + /// + + [JsonPropertyName("id")] + public System.Guid Id { get; set; } + + /// + /// The date and time when the transmission was created. + /// + + [JsonPropertyName("createdAt")] + public System.DateTimeOffset CreatedAt { get; set; } + + /// + /// The authorization attribute associated with the transmission. + /// + + [JsonPropertyName("authorizationAttribute")] + public string AuthorizationAttribute { get; set; } + + /// + /// The extended type URI for the transmission. + /// + + [JsonPropertyName("extendedType")] + public System.Uri ExtendedType { get; set; } + + /// + /// The unique identifier for the related transmission, if any. + /// + + [JsonPropertyName("relatedTransmissionId")] + public System.Guid? RelatedTransmissionId { get; set; } + + /// + /// The date and time when the transmission was deleted, if applicable. + /// + + [JsonPropertyName("deletedAt")] + public System.DateTimeOffset? DeletedAt { get; set; } + + /// + /// The type of the transmission. + /// + + [JsonPropertyName("type")] + [JsonConverter(typeof(JsonStringEnumConverter))] + public DialogsEntitiesTransmissions_DialogTransmissionType Type { get; set; } + + /// + /// The sender actor information for the transmission. + /// + + [JsonPropertyName("sender")] + public V1ServiceOwnerCommonActors_Actor Sender { get; set; } + + /// + /// The content of the transmission. + /// + + [JsonPropertyName("content")] + public V1ServiceOwnerDialogTransmissionsQueriesGet_Content Content { get; set; } + + /// + /// The attachments associated with the transmission. + /// + + [JsonPropertyName("attachments")] + public ICollection Attachments { get; 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("type")] + public string Type { get; set; } = "https://www.rfc-editor.org/rfc/rfc7231#section-6.5.1"; [JsonPropertyName("title")] public string Title { get; set; } = "One or more validation errors occurred."; + [JsonPropertyName("status")] + public int Status { get; set; } = 400; + + [JsonPropertyName("instance")] + public string Instance { get; set; } = "/api/route"; + [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"; + [JsonPropertyName("detail")] + public string Detail { get; set; } + + [JsonPropertyName("errors")] + public ICollection Errors { get; set; } } @@ -1160,450 +1223,469 @@ public partial class ProblemDetails 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("code")] + public string Code { 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 V1CommonContent_ContentValue + public partial class V1ServiceOwnerDialogTransmissionsQueriesGet_Content { /// - /// Media type of the content, this can also indicate that the content is embeddable. - ///
For a list of supported media types, see (link TBD). + /// The title of the content. ///
- [JsonPropertyName("mediaType")] - public string MediaType { get; set; } + [JsonPropertyName("title")] + public V1CommonContent_ContentValue Title { get; set; } /// - /// A list of localizations for the content. + /// The summary of the content. /// - [JsonPropertyName("value")] - public ICollection Value { get; set; } + [JsonPropertyName("summary")] + public V1CommonContent_ContentValue Summary { get; set; } + + /// + /// 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; } } [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 + public partial class V1ServiceOwnerDialogTransmissionsQueriesGet_Attachment { /// - /// The language code of the localization in ISO 639-1 format. + /// The unique identifier for the attachment in UUIDv7 format. /// - [JsonPropertyName("languageCode")] - public string LanguageCode { get; set; } + [JsonPropertyName("id")] + public System.Guid Id { get; set; } /// - /// The localized text or URI reference. + /// The display name of the attachment that should be used in GUIs. /// - [JsonPropertyName("value")] - public string Value { get; set; } + [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 V1ServiceOwnerCommonActors_Actor + public partial class V1ServiceOwnerDialogTransmissionsQueriesGet_AttachmentUrl { /// - /// The identifier of the person or organization that sent the transmission. Mutually exclusive with ActorName. - ///
Might be omitted if ActorType is "ServiceOwner". + /// The unique identifier for the attachment URL in UUIDv7 format. ///
- [JsonPropertyName("actorId")] - public string ActorId { get; set; } + [JsonPropertyName("id")] + public System.Guid Id { 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. + /// 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("actorName")] - public string ActorName { get; set; } + [JsonPropertyName("url")] + public System.Uri Url { get; set; } /// - /// The type of actor that sent the transmission. + /// The media type of the attachment. /// - [JsonPropertyName("actorType")] + [JsonPropertyName("mediaType")] + public string MediaType { get; set; } + + /// + /// The type of consumer the URL is intended for. + /// + + [JsonPropertyName("consumerType")] [JsonConverter(typeof(JsonStringEnumConverter))] - public Actors_ActorType ActorType { get; set; } + public Attachments_AttachmentUrlConsumerType ConsumerType { get; 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 + public partial class V1ServiceOwnerDialogTransmissionsCreate_TransmissionRequest { + /// + /// 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; } + /// /// 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; } + public System.DateTimeOffset CreatedAt { get; set; } /// - /// Unstructured text describing the activity. Only set if the activity type is "Information". + /// 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("description")] - public ICollection Description { get; set; } + [JsonPropertyName("authorizationAttribute")] + public string AuthorizationAttribute { 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 activities. - ///
If not supplied, a new UUIDv7 will be generated. + /// Reference to any other transmission that this transmission is related to. ///
- [JsonPropertyName("id")] - public System.Guid? Id { get; set; } + [JsonPropertyName("relatedTransmissionId")] + public System.Guid? RelatedTransmissionId { get; set; } /// - /// The actor that performed the activity. + /// The type of transmission. /// - [JsonPropertyName("performedBy")] - public V1ServiceOwnerCommonActors_Actor PerformedBy { get; set; } + [JsonPropertyName("type")] + [JsonConverter(typeof(JsonStringEnumConverter))] + public DialogsEntitiesTransmissions_DialogTransmissionType Type { 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. + /// The actor that sent the transmission. ///
- [JsonPropertyName("transmissionId")] - public System.Guid? TransmissionId { get; set; } + [JsonPropertyName("sender")] + public V1ServiceOwnerCommonActors_Actor Sender { get; set; } /// - /// The type of transmission. + /// The transmission unstructured text content. /// - [JsonPropertyName("type")] - [JsonConverter(typeof(JsonStringEnumConverter))] - public DialogsEntitiesActivities_DialogActivityType Type { get; set; } + [JsonPropertyName("content")] + public V1ServiceOwnerDialogsCommandsUpdate_TransmissionContent Content { get; set; } + + /// + /// The transmission-level attachments. + /// + + [JsonPropertyName("attachments")] + public ICollection Attachments { get; 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 + public partial class V1ServiceOwnerDialogsCommandsUpdate_TransmissionContent { + /// + /// The transmission title. Must be text/plain. + /// - [JsonPropertyName("createdAt")] - public System.DateTimeOffset? CreatedAt { get; set; } + [JsonPropertyName("title")] + public V1CommonContent_ContentValue Title { 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; } + /// + /// The transmission summary. + /// - [JsonPropertyName("performedBy")] - public V1ServiceOwnerCommonActors_Actor PerformedBy { get; set; } + [JsonPropertyName("summary")] + public V1CommonContent_ContentValue Summary { get; set; } - [JsonPropertyName("transmissionId")] - public System.Guid? TransmissionId { 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("type")] - [JsonConverter(typeof(JsonStringEnumConverter))] - public DialogsEntitiesActivities_DialogActivityType Type { get; set; } + [JsonPropertyName("contentReference")] + public V1CommonContent_ContentValue ContentReference { get; 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 + public partial class V1ServiceOwnerDialogsCommandsUpdate_TransmissionAttachment { + /// + /// A self-defined UUIDv7 may be provided to support idempotent additions of transmission attachments. If not provided, a new UUIDv7 will be generated. + /// - [JsonPropertyName("sendNotification")] - public bool SendNotification { get; set; } + [JsonPropertyName("id")] + public System.Guid? Id { get; set; } - } + /// + /// The display name of the attachment that should be used in GUIs. + /// - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "14.2.0.0 (NJsonSchema v11.1.0.0 (Newtonsoft.Json v13.0.0.0))")] - public enum V1ServiceOwnerDialogActivitiesQueriesNotificationCondition_NotificationConditionType - { + [JsonPropertyName("displayName")] + public ICollection DisplayName { get; set; } - [System.Runtime.Serialization.EnumMember(Value = @"NotExists")] - NotExists = 0, + /// + /// The URLs associated with the attachment, each referring to a different representation of the attachment. + /// - [System.Runtime.Serialization.EnumMember(Value = @"Exists")] - Exists = 1, + [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 V1ServiceOwnerDialogActivitiesQueriesSearch_Activity + public partial class V1ServiceOwnerDialogsCommandsUpdate_TransmissionAttachmentUrl { + /// + /// The fully qualified URL of the attachment. + /// - [JsonPropertyName("createdAt")] - public System.DateTimeOffset CreatedAt { get; set; } - - [JsonPropertyName("deletedAt")] - public System.DateTimeOffset? DeletedAt { get; set; } + [JsonPropertyName("url")] + public System.Uri Url { get; set; } - [JsonPropertyName("extendedType")] - public System.Uri ExtendedType { get; set; } + /// + /// The media type of the attachment. + /// - [JsonPropertyName("id")] - public System.Guid Id { get; set; } + [JsonPropertyName("mediaType")] + public string MediaType { get; set; } - [JsonPropertyName("transmissionId")] - public System.Guid? TransmissionId { get; set; } + /// + /// The type of consumer the URL is intended for. + /// - [JsonPropertyName("type")] + [JsonPropertyName("consumerType")] [JsonConverter(typeof(JsonStringEnumConverter))] - public DialogsEntitiesActivities_DialogActivityType Type { get; set; } + public Attachments_AttachmentUrlConsumerType ConsumerType { get; 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 + public partial class V1ServiceOwnerDialogSeenLogsQueriesSearch_SeenLog { - /// - /// 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; } + [JsonPropertyName("id")] + public System.Guid Id { get; set; } - /// - /// Unstructured text describing the activity. Only set if the activity type is "Information". - /// + [JsonPropertyName("seenAt")] + public System.DateTimeOffset SeenAt { get; set; } - [JsonPropertyName("description")] - public ICollection Description { get; set; } + [JsonPropertyName("seenBy")] + public V1ServiceOwnerCommonActors_Actor SeenBy { get; set; } - /// - /// Arbitrary URI/URN describing a service-specific transmission type. - /// + [JsonPropertyName("isViaServiceOwner")] + public bool? IsViaServiceOwner { get; set; } - [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. - /// + [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; } - - /// - /// 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. - ///
+ public System.Guid Id { get; set; } - [JsonPropertyName("transmissionId")] - public System.Guid? TransmissionId { get; set; } + [JsonPropertyName("seenAt")] + public System.DateTimeOffset SeenAt { get; set; } - /// - /// The type of transmission. - /// + [JsonPropertyName("seenBy")] + public V1ServiceOwnerCommonActors_Actor SeenBy { get; set; } - [JsonPropertyName("type")] - [JsonConverter(typeof(JsonStringEnumConverter))] - public DialogsEntitiesActivities_DialogActivityType Type { get; set; } + [JsonPropertyName("isViaServiceOwner")] + public bool? IsViaServiceOwner { get; 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 + public partial class V1ServiceOwnerDialogsCommandsUpdate_Dialog { /// - /// 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. + /// 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("action")] - public string Action { get; set; } + [JsonPropertyName("progress")] + public int? Progress { 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. + /// 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("authorizationAttribute")] - public string AuthorizationAttribute { get; set; } + [JsonPropertyName("extendedStatus")] + public string ExtendedStatus { get; set; } /// - /// The endpoints associated with the action. + /// Arbitrary string with a service-specific reference to an external system or service. /// - [JsonPropertyName("endpoints")] - public ICollection Endpoints { get; set; } + [JsonPropertyName("externalReference")] + public string ExternalReference { get; set; } /// - /// A self-defined UUIDv7 may be provided to support idempotent creation of Api Actions. If not provided, a new UUIDv7 will be generated. + /// The timestamp when the dialog should be made visible for authorized end users. If not provided, the dialog will be + ///
immediately available. ///
- [JsonPropertyName("id")] - public System.Guid? Id { get; set; } - - } + [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_ApiActionEndpoint - { /// - /// Boolean indicating if the endpoint is deprecated. + /// The due date for the dialog. Dialogs past due date might be marked as such in frontends but will still be available. /// - [JsonPropertyName("deprecated")] - public bool Deprecated { get; set; } + [JsonPropertyName("dueAt")] + public System.DateTimeOffset? DueAt { get; set; } /// - /// Link to documentation for the endpoint, providing documentation for integrators. Should be a URL to a - ///
human-readable page. + /// 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("documentationUrl")] - public System.Uri DocumentationUrl { get; set; } + [JsonPropertyName("expiresAt")] + public System.DateTimeOffset? ExpiresAt { get; set; } /// - /// The HTTP method that the endpoint expects for this action. + /// The aggregated status of the dialog. /// - [JsonPropertyName("httpMethod")] + [JsonPropertyName("status")] [JsonConverter(typeof(JsonStringEnumConverter))] - public Http_HttpVerb HttpMethod { get; set; } + public DialogsEntities_DialogStatus Status { get; set; } /// - /// Link to the request schema for the endpoint. Used to provide documentation for integrators. - ///
Dialogporten will not validate information on this endpoint. + /// The dialog unstructured text content. ///
- [JsonPropertyName("requestSchema")] - public System.Uri RequestSchema { get; set; } + [JsonPropertyName("content")] + public V1ServiceOwnerDialogsCommandsUpdate_Content Content { get; set; } /// - /// Link to the response schema for the endpoint. Used to provide documentation for integrators. - ///
Dialogporten will not validate information on this endpoint. + /// A list of words (tags) that will be used in dialog search queries. Not visible in end-user DTO. ///
- [JsonPropertyName("responseSchema")] - public System.Uri ResponseSchema { get; set; } + [JsonPropertyName("searchTags")] + public ICollection SearchTags { 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. + /// The attachments associated with the dialog (on an aggregate level). ///
- [JsonPropertyName("sunsetAt")] - public System.DateTimeOffset? SunsetAt { get; set; } + [JsonPropertyName("attachments")] + public ICollection Attachments { get; set; } /// - /// The fully qualified URL of the API endpoint. + /// 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("url")] - public System.Uri Url { get; set; } + [JsonPropertyName("transmissions")] + public ICollection Transmissions { get; set; } /// - /// Arbitrary string indicating the version of the endpoint. + /// The GUI actions associated with the dialog. Should be used in browser-based interactive frontends. /// - [JsonPropertyName("version")] - public string Version { get; set; } - - } + [JsonPropertyName("guiActions")] + public ICollection GuiActions { get; 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. + /// The API actions associated with the dialog. Should be used in specialized, non-browser-based integrations. /// - [JsonPropertyName("displayName")] - public ICollection DisplayName { get; set; } + [JsonPropertyName("apiActions")] + public ICollection ApiActions { get; set; } /// - /// A self-defined UUIDv7 may be provided to support idempotent creation of attachments. If not provided, a new UUIDv7 will be generated. + /// 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("id")] - public System.Guid? Id { get; set; } - - /// - /// The URLs associated with the attachment, each referring to a different representation of the attachment. - /// + [JsonPropertyName("activities")] + public ICollection Activities { get; set; } - [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 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 partial class V1ServiceOwnerDialogsCommandsCreate_AttachmentUrl + public partial class V1ServiceOwnerDialogsCommandsUpdate_Content { /// - /// The type of consumer the URL is intended for. + /// The title of the dialog. Must be text/plain. /// - [JsonPropertyName("consumerType")] - [JsonConverter(typeof(JsonStringEnumConverter))] - public Attachments_AttachmentUrlConsumerType ConsumerType { get; set; } + [JsonPropertyName("title")] + public V1CommonContent_ContentValue Title { get; set; } /// - /// The media type of the attachment. + /// A short summary of the dialog and its current state. Must be text/plain. /// - [JsonPropertyName("mediaType")] - public string MediaType { get; set; } + [JsonPropertyName("summary")] + public V1CommonContent_ContentValue Summary { get; set; } /// - /// The fully qualified URL of the attachment. + /// Overridden sender name. If not supplied, assume "org" as the sender name. Must be text/plain if supplied. /// - [JsonPropertyName("url")] - public System.Uri Url { get; set; } - - } + [JsonPropertyName("senderName")] + public V1CommonContent_ContentValue SenderName { get; 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 + /// 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. - ///
Supported media types: text/plain + /// Used as the human-readable label used to describe the "ExtendedStatus" field. Must be text/plain. ///
[JsonPropertyName("extendedStatus")] @@ -1611,71 +1693,98 @@ public partial class V1ServiceOwnerDialogsCommandsCreate_Content /// /// 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; } + } + + [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 + { /// - /// Overridden sender name. If not supplied, assume "org" as the sender name. Must be text/plain if supplied. - ///
Supported media types: text/plain + /// A search tag value. ///
- [JsonPropertyName("senderName")] - public V1CommonContent_ContentValue SenderName { get; set; } + [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_Attachment + { /// - /// A short summary of the dialog and its current state. - ///
Supported media types: text/plain + /// A self-defined UUIDv7 may be provided to support idempotent additions of attachments. If not provided, a new UUIDv7 will be generated. ///
- [JsonPropertyName("summary")] - public V1CommonContent_ContentValue Summary { get; set; } + [JsonPropertyName("id")] + public System.Guid? Id { get; set; } /// - /// The title of the dialog. - ///
Supported media types: text/plain + /// The display name of the attachment that should be used in GUIs. ///
- [JsonPropertyName("title")] - public V1CommonContent_ContentValue Title { get; set; } + [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_Dialog + public partial class V1ServiceOwnerDialogsCommandsUpdate_AttachmentUrl { /// - /// An immutable list of activities associated with the dialog. + /// A UUIDv7 used for merging existing data, unknown IDs will be ignored as this entity does not support user-defined IDs. /// - [JsonPropertyName("activities")] - public ICollection Activities { get; set; } + [JsonPropertyName("id")] + public System.Guid? Id { get; set; } /// - /// The API actions associated with the dialog. Should be used in specialized, non-browser-based integrations. + /// The fully qualified URL of the attachment. /// - [JsonPropertyName("apiActions")] - public ICollection ApiActions { get; set; } + [JsonPropertyName("url")] + public System.Uri Url { get; set; } /// - /// The attachments associated with the dialog (on an aggregate level). + /// The media type of the attachment. /// - [JsonPropertyName("attachments")] - public ICollection Attachments { get; set; } + [JsonPropertyName("mediaType")] + public string MediaType { get; set; } /// - /// The dialog unstructured text content. + /// The type of consumer the URL is intended for. /// - [JsonPropertyName("content")] - public V1ServiceOwnerDialogsCommandsCreate_Content Content { get; set; } + [JsonPropertyName("consumerType")] + [JsonConverter(typeof(JsonStringEnumConverter))] + public Attachments_AttachmentUrlConsumerType ConsumerType { get; 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 + { /// - /// If set, will override the date and time when the dialog is set as created. + /// 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; } + + /// + /// If supplied, overrides the creating date and time for the transmission. ///
If not supplied, the current date /time will be used. ///
@@ -1683,142 +1792,200 @@ public partial class V1ServiceOwnerDialogsCommandsCreate_Dialog 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. + /// 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("dueAt")] - public System.DateTimeOffset? DueAt { get; set; } + [JsonPropertyName("authorizationAttribute")] + public string AuthorizationAttribute { get; set; } /// - /// The expiration date for the dialog. This is the last date when the dialog is available for the end user. + /// Arbitrary URI/URN describing a service-specific transmission type. ///
- ///
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. + ///
Refer to the service-specific documentation provided by the service owner for details (if in use). ///
- [JsonPropertyName("expiresAt")] - public System.DateTimeOffset? ExpiresAt { get; set; } + [JsonPropertyName("extendedType")] + public System.Uri ExtendedType { 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. + /// Reference to any other transmission that this transmission is related to. ///
- [JsonPropertyName("extendedStatus")] - public string ExtendedStatus { get; set; } + [JsonPropertyName("relatedTransmissionId")] + public System.Guid? RelatedTransmissionId { get; set; } /// - /// Arbitrary string with a service-specific reference to an external system or service. + /// The type of transmission. /// - [JsonPropertyName("externalReference")] - public string ExternalReference { get; set; } + [JsonPropertyName("type")] + [JsonConverter(typeof(JsonStringEnumConverter))] + public DialogsEntitiesTransmissions_DialogTransmissionType Type { get; set; } /// - /// The GUI actions associated with the dialog. Should be used in browser-based interactive frontends. + /// The actor that sent the transmission. /// - [JsonPropertyName("guiActions")] - public ICollection GuiActions { get; set; } + [JsonPropertyName("sender")] + public V1ServiceOwnerCommonActors_Actor Sender { get; set; } /// - /// A self-defined UUIDv7 may be provided to support idempotent creation of dialogs. If not provided, a new UUIDv7 will be generated. + /// The transmission unstructured text content. /// - [JsonPropertyName("id")] - public System.Guid? Id { get; set; } + [JsonPropertyName("content")] + public V1ServiceOwnerDialogsCommandsUpdate_TransmissionContent Content { get; set; } /// - /// The party code representing the organization or person that the dialog belongs to in URN format. + /// The transmission-level attachments. /// - [JsonPropertyName("party")] - public string Party { get; set; } + [JsonPropertyName("attachments")] + public ICollection Attachments { get; 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 + { /// - /// 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. + /// A self-defined UUIDv7 may be provided to support idempotent additions of Gui Actions. If not provided, a new UUIDv7 will be generated. /// - [JsonPropertyName("precedingProcess")] - public string PrecedingProcess { get; set; } + [JsonPropertyName("id")] + public System.Guid? Id { get; set; } /// - /// Optional process identifier used to indicate a business process this dialog belongs to. + /// The action identifier for the action, corresponding to the "action" attributeId used in the XACML service policy. /// - [JsonPropertyName("process")] - public string Process { get; set; } + [JsonPropertyName("action")] + public string Action { 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). + /// 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("progress")] - public int? Progress { get; set; } + [JsonPropertyName("url")] + public System.Uri Url { get; set; } /// - /// A list of words (tags) that will be used in dialog search queries. Not visible in end-user DTO. + /// 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("searchTags")] - public ICollection SearchTags { get; set; } + [JsonPropertyName("authorizationAttribute")] + public string AuthorizationAttribute { 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. + /// Indicates whether the action results in the dialog being deleted. Used by frontends to implement custom UX + ///
for delete actions. ///
- [JsonPropertyName("serviceResource")] - public string ServiceResource { get; set; } + [JsonPropertyName("isDeleteDialogAction")] + public bool IsDeleteDialogAction { get; set; } /// - /// The aggregated status of the dialog. + /// The HTTP method that the frontend should use when redirecting the user. /// - [JsonPropertyName("status")] + [JsonPropertyName("httpMethod")] [JsonConverter(typeof(JsonStringEnumConverter))] - public DialogsEntities_DialogStatus Status { get; set; } + public Http_HttpVerb? HttpMethod { get; set; } /// - /// Set the system label of the dialog Migration purposes. + /// Indicates a priority for the action, making it possible for frontends to adapt GUI elements based on action + ///
priority. ///
- [JsonPropertyName("systemLabel")] + [JsonPropertyName("priority")] [JsonConverter(typeof(JsonStringEnumConverter))] - public DialogEndUserContextsEntities_SystemLabel? SystemLabel { get; set; } + public DialogsEntitiesActions_DialogGuiActionPriority Priority { get; set; } /// - /// The immutable list of transmissions associated with the dialog. + /// The title of the action, this should be short and in verb form. Must be text/plain. /// - [JsonPropertyName("transmissions")] - public ICollection Transmissions { get; set; } + [JsonPropertyName("title")] + public ICollection Title { 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. + /// If there should be a prompt asking the user for confirmation before the action is executed, + ///
this field should contain the prompt text. ///
- [JsonPropertyName("updatedAt")] - public System.DateTimeOffset UpdatedAt { get; set; } + [JsonPropertyName("prompt")] + public ICollection Prompt { 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 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 V1ServiceOwnerDialogsCommandsCreate_GuiAction + 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 partial class V1ServiceOwnerDialogsCommandsUpdate_ApiAction { /// - /// The action identifier for the action, corresponding to the "action" attributeId used in the XACML service policy. + /// A self-defined UUIDv7 may be provided to support idempotent additions of Api Actions. If not provided, a new UUIDv7 will be generated. + /// + + [JsonPropertyName("id")] + public System.Guid? Id { get; set; } + + /// + /// 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")] @@ -1835,100 +2002,97 @@ public partial class V1ServiceOwnerDialogsCommandsCreate_GuiAction public string AuthorizationAttribute { get; set; } /// - /// The HTTP method that the frontend should use when redirecting the user. + /// The endpoints associated with the action. /// - [JsonPropertyName("httpMethod")] - [JsonConverter(typeof(JsonStringEnumConverter))] - public Http_HttpVerb? HttpMethod { get; set; } + [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 V1ServiceOwnerDialogsCommandsUpdate_ApiActionEndpoint + { /// - /// A self-defined UUIDv7 may be provided to support idempotent creation of Gui Actions. If not provided, a new UUIDv7 will be generated. + /// 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. + /// Arbitrary string indicating the version of the endpoint. ///
- [JsonPropertyName("isDeleteDialogAction")] - public bool IsDeleteDialogAction { get; set; } + [JsonPropertyName("version")] + public string Version { get; set; } /// - /// Indicates a priority for the action, making it possible for frontends to adapt GUI elements based on action - ///
priority. + /// The fully qualified URL of the API endpoint. ///
- [JsonPropertyName("priority")] - [JsonConverter(typeof(JsonStringEnumConverter))] - public DialogsEntitiesActions_DialogGuiActionPriority Priority { get; set; } + [JsonPropertyName("url")] + public System.Uri Url { 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. + /// The HTTP method that the endpoint expects for this action. ///
- [JsonPropertyName("prompt")] - public ICollection Prompt { get; set; } + [JsonPropertyName("httpMethod")] + [JsonConverter(typeof(JsonStringEnumConverter))] + public Http_HttpVerb HttpMethod { get; set; } /// - /// The title of the action, this should be short and in verb form. Must be text/plain. + /// Link to documentation for the endpoint, providing documentation for integrators. Should be a URL to a + ///
human-readable page. ///
- [JsonPropertyName("title")] - public ICollection Title { get; set; } + [JsonPropertyName("documentationUrl")] + public System.Uri DocumentationUrl { 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. + /// Link to the request schema for the endpoint. Used to provide documentation for integrators. + ///
Dialogporten will not validate information on this endpoint. ///
- [JsonPropertyName("url")] - public System.Uri Url { get; set; } - - } + [JsonPropertyName("requestSchema")] + public System.Uri RequestSchema { get; 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. + /// Link to the response schema for the endpoint. Used to provide documentation for integrators. + ///
Dialogporten will not validate information on this endpoint. ///
- [JsonPropertyName("value")] - public string Value { get; set; } - - } + [JsonPropertyName("responseSchema")] + public System.Uri ResponseSchema { get; 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. + /// Boolean indicating if the endpoint is deprecated. /// - [JsonPropertyName("attachments")] - public ICollection Attachments { get; set; } + [JsonPropertyName("deprecated")] + public bool Deprecated { 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. + /// Date and time when the endpoint will no longer function. Only set if the endpoint is deprecated. Dialogporten + ///
will not enforce this date. ///
- [JsonPropertyName("authorizationAttribute")] - public string AuthorizationAttribute { get; set; } + [JsonPropertyName("sunsetAt")] + public System.DateTimeOffset? SunsetAt { get; 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 + { /// - /// The transmission unstructured text content. + /// 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("content")] - public V1ServiceOwnerDialogsCommandsCreate_TransmissionContent Content { get; set; } + [JsonPropertyName("id")] + public System.Guid? Id { get; set; } /// /// If supplied, overrides the creating date and time for the transmission. @@ -1936,473 +2100,479 @@ public partial class V1ServiceOwnerDialogsCommandsCreate_Transmission /// [JsonPropertyName("createdAt")] - public System.DateTimeOffset CreatedAt { get; set; } + 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. + /// The type of transmission. /// - [JsonPropertyName("id")] - public System.Guid? Id { get; set; } + [JsonPropertyName("type")] + [JsonConverter(typeof(JsonStringEnumConverter))] + public DialogsEntitiesActivities_DialogActivityType Type { get; set; } /// - /// Reference to any other transmission that this transmission is related to. + /// If the activity is related to a particular transmission, this field will contain the transmission identifier. + ///
Must be present in the request body. ///
- [JsonPropertyName("relatedTransmissionId")] - public System.Guid? RelatedTransmissionId { get; set; } + [JsonPropertyName("transmissionId")] + public System.Guid? TransmissionId { get; set; } /// - /// The actor that sent the transmission. + /// The actor that performed the activity. /// - [JsonPropertyName("sender")] - public V1ServiceOwnerCommonActors_Actor Sender { get; set; } + [JsonPropertyName("performedBy")] + public V1ServiceOwnerCommonActors_Actor PerformedBy { get; set; } /// - /// The type of transmission. + /// Unstructured text describing the activity. Only set if the activity type is "Information". /// - [JsonPropertyName("type")] - [JsonConverter(typeof(JsonStringEnumConverter))] - public DialogsEntitiesTransmissions_DialogTransmissionType Type { get; set; } + [JsonPropertyName("description")] + public ICollection Description { get; 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 + public enum DialogsEntitiesActivities_DialogActivityType { - /// - /// The display name of the attachment that should be used in GUIs. - /// - [JsonPropertyName("displayName")] - public ICollection DisplayName { get; set; } + [System.Runtime.Serialization.EnumMember(Value = @"DialogCreated")] + DialogCreated = 0, - /// - /// A self-defined UUIDv7 may be provided to support idempotent creation of transmission attachments. If not provided, a new UUIDv7 will be generated. - /// + [System.Runtime.Serialization.EnumMember(Value = @"DialogClosed")] + DialogClosed = 1, - [JsonPropertyName("id")] - public System.Guid? Id { get; set; } + [System.Runtime.Serialization.EnumMember(Value = @"Information")] + Information = 2, - /// - /// The URLs associated with the attachment, each referring to a different representation of the attachment. - /// + [System.Runtime.Serialization.EnumMember(Value = @"TransmissionOpened")] + TransmissionOpened = 3, - [JsonPropertyName("urls")] - public ICollection Urls { get; set; } + [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.Runtime.Serialization.EnumMember(Value = @"DialogDeleted")] + DialogDeleted = 7, + + [System.Runtime.Serialization.EnumMember(Value = @"DialogRestored")] + DialogRestored = 8, + + [System.Runtime.Serialization.EnumMember(Value = @"SentToSigning")] + SentToSigning = 9, + + [System.Runtime.Serialization.EnumMember(Value = @"SentToFormFill")] + SentToFormFill = 10, + + [System.Runtime.Serialization.EnumMember(Value = @"SentToSendIn")] + SentToSendIn = 11, + + [System.Runtime.Serialization.EnumMember(Value = @"SentToPayment")] + SentToPayment = 12, } [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 + public partial class PaginatedListOfV1ServiceOwnerDialogsQueriesSearch_Dialog { /// - /// The type of consumer the URL is intended for. + /// The paginated list of items /// - [JsonPropertyName("consumerType")] - [JsonConverter(typeof(JsonStringEnumConverter))] - public Attachments_AttachmentUrlConsumerType ConsumerType { get; set; } + [JsonPropertyName("items")] + public ICollection Items { get; set; } /// - /// The media type of the attachment. + /// Whether there are more items available that can be fetched by supplying the continuation token /// - [JsonPropertyName("mediaType")] - public string MediaType { get; set; } + [JsonPropertyName("hasNextPage")] + public bool HasNextPage { get; set; } /// - /// The fully qualified URL of the attachment. + /// The continuation token to be used to fetch the next page of items /// - [JsonPropertyName("url")] - public System.Uri Url { get; set; } + [JsonPropertyName("continuationToken")] + public string ContinuationToken { 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 V1ServiceOwnerDialogsCommandsCreate_TransmissionContent + public partial class V1ServiceOwnerDialogsQueriesSearch_Dialog { /// - /// 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 + /// The unique identifier for the dialog in UUIDv7 format. ///
- [JsonPropertyName("contentReference")] - public V1CommonContent_ContentValue ContentReference { get; set; } + [JsonPropertyName("id")] + public System.Guid Id { get; set; } /// - /// The transmission summary. + /// The service owner code representing the organization (service owner) related to this dialog. /// - [JsonPropertyName("summary")] - public V1CommonContent_ContentValue Summary { get; set; } + [JsonPropertyName("org")] + public string Org { get; set; } /// - /// The transmission title. Must be text/plain. + /// The unique identifier for the revision in UUIDv4 format. /// - [JsonPropertyName("title")] - public V1CommonContent_ContentValue Title { get; set; } - - } + [JsonPropertyName("revision")] + public System.Guid Revision { get; 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. + /// 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("createdAt")] - public System.DateTimeOffset? CreatedAt { get; set; } + [JsonPropertyName("serviceResource")] + public string ServiceResource { get; set; } /// - /// Unstructured text describing the activity. Only set if the activity type is "Information". + /// The ServiceResource type, as defined in Altinn Resource Registry (see ResourceType). /// - [JsonPropertyName("description")] - public ICollection Description { get; set; } + [JsonPropertyName("serviceResourceType")] + public string ServiceResourceType { get; set; } /// - /// Arbitrary URI/URN describing a service-specific transmission type. + /// The party code representing the organization or person that the dialog belongs to in URN format. /// - [JsonPropertyName("extendedType")] - public System.Uri ExtendedType { get; set; } + [JsonPropertyName("party")] + public string Party { 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. + /// 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("id")] - public System.Guid? Id { get; set; } + [JsonPropertyName("progress")] + public int? Progress { get; set; } /// - /// The actor that performed the activity. + /// Optional process identifier used to indicate a business process this dialog belongs to. /// - [JsonPropertyName("performedBy")] - public V1ServiceOwnerCommonActors_Actor PerformedBy { get; set; } + [JsonPropertyName("process")] + public string Process { 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. + /// 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("transmissionId")] - public System.Guid? TransmissionId { get; set; } + [JsonPropertyName("precedingProcess")] + public string PrecedingProcess { get; set; } /// - /// The type of transmission. + /// The number of attachments in the dialog made available for browser-based frontends. /// - [JsonPropertyName("type")] - [JsonConverter(typeof(JsonStringEnumConverter))] - public DialogsEntitiesActivities_DialogActivityType Type { get; set; } - - } + [JsonPropertyName("guiAttachmentCount")] + public int? GuiAttachmentCount { get; 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. + /// 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("action")] - public string Action { get; set; } + [JsonPropertyName("extendedStatus")] + public string ExtendedStatus { 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. + /// Arbitrary string with a service-specific reference to an external system or service. ///
- ///
Can also be used to refer to other service policies. + ///
Refer to the service-specific documentation provided by the service owner for details (if in use). ///
- [JsonPropertyName("authorizationAttribute")] - public string AuthorizationAttribute { get; set; } + [JsonPropertyName("externalReference")] + public string ExternalReference { get; set; } /// - /// The endpoints associated with the action. + /// The date and time when the dialog was created. /// - [JsonPropertyName("endpoints")] - public ICollection Endpoints { get; set; } + [JsonPropertyName("createdAt")] + public System.DateTimeOffset CreatedAt { get; set; } /// - /// A self-defined UUIDv7 may be provided to support idempotent additions of Api Actions. If not provided, a new UUIDv7 will be generated. + /// The date and time when the dialog was last updated. /// - [JsonPropertyName("id")] - public System.Guid? Id { get; set; } - - } + [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 V1ServiceOwnerDialogsCommandsUpdate_ApiActionEndpoint - { /// - /// Boolean indicating if the endpoint is deprecated. + /// The due date for the dialog. This is the last date when the dialog is expected to be completed. /// - [JsonPropertyName("deprecated")] - public bool Deprecated { get; set; } + [JsonPropertyName("dueAt")] + public System.DateTimeOffset? DueAt { get; set; } /// - /// Link to documentation for the endpoint, providing documentation for integrators. Should be a URL to a - ///
human-readable page. + /// The timestamp when the dialog will be made visible for authorized end users. ///
- [JsonPropertyName("documentationUrl")] - public System.Uri DocumentationUrl { get; set; } + [JsonPropertyName("visibleFrom")] + public System.DateTimeOffset? VisibleFrom { get; set; } /// - /// The HTTP method that the endpoint expects for this action. + /// The aggregated status of the dialog. /// - [JsonPropertyName("httpMethod")] + [JsonPropertyName("status")] [JsonConverter(typeof(JsonStringEnumConverter))] - public Http_HttpVerb HttpMethod { get; set; } + public DialogsEntities_DialogStatus Status { get; set; } /// - /// A UUIDv7 used for merging existing data, unknown IDs will be ignored as this entity does not support user-defined IDs. + /// Current display state. /// - [JsonPropertyName("id")] - public System.Guid? Id { get; set; } + [JsonPropertyName("systemLabel")] + [JsonConverter(typeof(JsonStringEnumConverter))] + public DialogEndUserContextsEntities_SystemLabel SystemLabel { get; set; } /// - /// Link to the request schema for the endpoint. Used to provide documentation for integrators. - ///
Dialogporten will not validate information on this endpoint. + /// The latest entry in the dialog's activity log. ///
- [JsonPropertyName("requestSchema")] - public System.Uri RequestSchema { get; set; } + [JsonPropertyName("latestActivity")] + public V1ServiceOwnerDialogsQueriesSearch_DialogActivity LatestActivity { get; set; } /// - /// Link to the response schema for the endpoint. Used to provide documentation for integrators. - ///
Dialogporten will not validate information on this endpoint. + /// The list of seen log entries for the dialog newer than the dialog ChangedAt date. ///
- [JsonPropertyName("responseSchema")] - public System.Uri ResponseSchema { get; set; } + [JsonPropertyName("seenSinceLastUpdate")] + public ICollection SeenSinceLastUpdate { 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. + /// The content of the dialog in search results. ///
- [JsonPropertyName("sunsetAt")] - public System.DateTimeOffset? SunsetAt { get; set; } + [JsonPropertyName("content")] + public V1ServiceOwnerDialogsQueriesSearch_Content Content { get; set; } - /// - /// The fully qualified URL of the API endpoint. - /// + } - [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 enum DialogEndUserContextsEntities_SystemLabel + { - /// - /// Arbitrary string indicating the version of the endpoint. - /// + [System.Runtime.Serialization.EnumMember(Value = @"Default")] + Default = 0, - [JsonPropertyName("version")] - public string Version { get; set; } + [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 partial class V1ServiceOwnerDialogsCommandsUpdate_Attachment + public partial class V1ServiceOwnerDialogsQueriesSearch_DialogActivity { /// - /// The display name of the attachment that should be used in GUIs. + /// The unique identifier for the activity in UUIDv7 format. /// - [JsonPropertyName("displayName")] - public ICollection DisplayName { get; set; } + [JsonPropertyName("id")] + public System.Guid Id { get; set; } /// - /// A self-defined UUIDv7 may be provided to support idempotent additions of attachments. If not provided, a new UUIDv7 will be generated. + /// The date and time when the activity was created. /// - [JsonPropertyName("id")] - public System.Guid? Id { get; set; } + [JsonPropertyName("createdAt")] + public System.DateTimeOffset? CreatedAt { get; set; } /// - /// The URLs associated with the attachment, each referring to a different representation of the attachment. + /// 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("urls")] - public ICollection Urls { get; set; } - - } + [JsonPropertyName("extendedType")] + public System.Uri ExtendedType { get; 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. + /// The type of activity. /// - [JsonPropertyName("consumerType")] + [JsonPropertyName("type")] [JsonConverter(typeof(JsonStringEnumConverter))] - public Attachments_AttachmentUrlConsumerType ConsumerType { get; set; } + public DialogsEntitiesActivities_DialogActivityType Type { get; set; } /// - /// A UUIDv7 used for merging existing data, unknown IDs will be ignored as this entity does not support user-defined IDs. + /// If the activity is related to a particular transmission, this field will contain the transmission identifier. /// - [JsonPropertyName("id")] - public System.Guid? Id { get; set; } + [JsonPropertyName("transmissionId")] + public System.Guid? TransmissionId { get; set; } /// - /// The media type of the attachment. + /// The actor that performed the activity. /// - [JsonPropertyName("mediaType")] - public string MediaType { get; set; } + [JsonPropertyName("performedBy")] + public V1ServiceOwnerCommonActors_Actor PerformedBy { get; set; } /// - /// The fully qualified URL of the attachment. + /// Unstructured text describing the activity. Only set if the activity type is "Information". /// - [JsonPropertyName("url")] - public System.Uri Url { get; set; } - + [JsonPropertyName("description")] + public ICollection Description { get; 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 + public partial class V1ServiceOwnerDialogsQueriesSearch_DialogSeenLog { /// - /// Additional information about the dialog, this may contain Markdown. + /// The unique identifier for the seen log entry in UUIDv7 format. /// - [JsonPropertyName("additionalInfo")] - public V1CommonContent_ContentValue AdditionalInfo { get; set; } + [JsonPropertyName("id")] + public System.Guid Id { get; set; } /// - /// Used as the human-readable label used to describe the "ExtendedStatus" field. Must be text/plain. + /// The timestamp when the dialog revision was seen. /// - [JsonPropertyName("extendedStatus")] - public V1CommonContent_ContentValue ExtendedStatus { get; set; } + [JsonPropertyName("seenAt")] + public System.DateTimeOffset SeenAt { get; set; } /// - /// Front-channel embedded content. Used to dynamically embed content in the frontend from an external URL. Must be HTTPS. + /// The actor that saw the dialog revision. /// - [JsonPropertyName("mainContentReference")] - public V1CommonContent_ContentValue MainContentReference { get; set; } + [JsonPropertyName("seenBy")] + public V1ServiceOwnerCommonActors_Actor SeenBy { get; set; } /// - /// Overridden sender name. If not supplied, assume "org" as the sender name. Must be text/plain if supplied. + /// 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("senderName")] - public V1CommonContent_ContentValue SenderName { get; set; } + [JsonPropertyName("isViaServiceOwner")] + public bool? IsViaServiceOwner { get; set; } /// - /// A short summary of the dialog and its current state. Must be text/plain. + /// Flag indicating whether the seen log entry was created by the end user supplied in the query. /// - [JsonPropertyName("summary")] - public V1CommonContent_ContentValue Summary { get; set; } + [JsonPropertyName("isCurrentEndUser")] + public bool IsCurrentEndUser { get; 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 + { /// - /// The title of the dialog. Must be text/plain. + /// 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 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. + /// A short summary of the dialog and its current state. ///
- [JsonPropertyName("activities")] - public ICollection Activities { get; set; } + [JsonPropertyName("summary")] + public V1CommonContent_ContentValue Summary { get; set; } /// - /// The API actions associated with the dialog. Should be used in specialized, non-browser-based integrations. + /// Overridden sender name. If not supplied, assume "org" as the sender name. /// - [JsonPropertyName("apiActions")] - public ICollection ApiActions { get; set; } + [JsonPropertyName("senderName")] + public V1CommonContent_ContentValue SenderName { get; set; } /// - /// The attachments associated with the dialog (on an aggregate level). + /// Used as the human-readable label used to describe the "ExtendedStatus" field. /// - [JsonPropertyName("attachments")] - public ICollection Attachments { get; set; } + [JsonPropertyName("extendedStatus")] + public V1CommonContent_ContentValue ExtendedStatus { get; 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 + { /// - /// The dialog unstructured text content. + /// The unique identifier for the dialog in UUIDv7 format. /// - [JsonPropertyName("content")] - public V1ServiceOwnerDialogsCommandsUpdate_Content Content { get; set; } + [JsonPropertyName("id")] + public System.Guid Id { get; set; } /// - /// The due date for the dialog. Dialogs past due date might be marked as such in frontends but will still be available. + /// The unique identifier for the revision in UUIDv4 format. /// - [JsonPropertyName("dueAt")] - public System.DateTimeOffset? DueAt { get; set; } + [JsonPropertyName("revision")] + public System.Guid Revision { 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. + /// The service owner code representing the organization (service owner) related to this dialog. ///
- [JsonPropertyName("expiresAt")] - public System.DateTimeOffset? ExpiresAt { get; set; } + [JsonPropertyName("org")] + public string Org { 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. + /// 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("extendedStatus")] - public string ExtendedStatus { get; set; } + [JsonPropertyName("serviceResource")] + public string ServiceResource { get; set; } /// - /// Arbitrary string with a service-specific reference to an external system or service. + /// The ServiceResource type, as defined in Altinn Resource Registry (see ResourceType). /// - [JsonPropertyName("externalReference")] - public string ExternalReference { get; set; } + [JsonPropertyName("serviceResourceType")] + public string ServiceResourceType { get; set; } /// - /// The GUI actions associated with the dialog. Should be used in browser-based interactive frontends. + /// The party code representing the organization or person that the dialog belongs to in URN format. /// - [JsonPropertyName("guiActions")] - public ICollection GuiActions { get; set; } + [JsonPropertyName("party")] + public string Party { get; set; } /// /// Advisory indicator of progress, represented as 1-100 percentage value. 100% representing a dialog that has come @@ -2413,635 +2583,564 @@ public partial class V1ServiceOwnerDialogsCommandsUpdate_Dialog public int? Progress { get; set; } /// - /// A list of words (tags) that will be used in dialog search queries. Not visible in end-user DTO. + /// Optional process identifier used to indicate a business process this dialog belongs to. /// - [JsonPropertyName("searchTags")] - public ICollection SearchTags { get; set; } + [JsonPropertyName("process")] + public string Process { get; set; } /// - /// The aggregated status of the dialog. + /// 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("status")] - [JsonConverter(typeof(JsonStringEnumConverter))] - public DialogsEntities_DialogStatus Status { get; set; } + [JsonPropertyName("precedingProcess")] + public string PrecedingProcess { 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. + /// 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("transmissions")] - public ICollection Transmissions { get; set; } + [JsonPropertyName("extendedStatus")] + public string ExtendedStatus { get; set; } /// - /// The timestamp when the dialog should be made visible for authorized end users. If not provided, the dialog will be - ///
immediately available. + /// 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("visibleFrom")] - public System.DateTimeOffset? VisibleFrom { get; set; } - - } + [JsonPropertyName("externalReference")] + public string ExternalReference { get; 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. + /// If deleted, the date and time when the deletion was performed. /// - [JsonPropertyName("action")] - public string Action { get; set; } + [JsonPropertyName("deletedAt")] + public System.DateTimeOffset? DeletedAt { 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. + /// The timestamp when the dialog will be made visible for authorized end users. ///
- [JsonPropertyName("authorizationAttribute")] - public string AuthorizationAttribute { get; set; } + [JsonPropertyName("visibleFrom")] + public System.DateTimeOffset? VisibleFrom { get; set; } /// - /// The HTTP method that the frontend should use when redirecting the user. + /// The due date for the dialog. Dialogs past due date might be marked as such in frontends but will still be available. /// - [JsonPropertyName("httpMethod")] - [JsonConverter(typeof(JsonStringEnumConverter))] - public Http_HttpVerb? HttpMethod { get; set; } + [JsonPropertyName("dueAt")] + public System.DateTimeOffset? DueAt { get; set; } /// - /// A self-defined UUIDv7 may be provided to support idempotent additions of Gui Actions. If not provided, a new UUIDv7 will be generated. + /// 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("id")] - public System.Guid? Id { get; set; } + [JsonPropertyName("expiresAt")] + public System.DateTimeOffset? ExpiresAt { get; set; } /// - /// Indicates whether the action results in the dialog being deleted. Used by frontends to implement custom UX - ///
for delete actions. + /// The date and time when the dialog was created. ///
- [JsonPropertyName("isDeleteDialogAction")] - public bool IsDeleteDialogAction { get; set; } + [JsonPropertyName("createdAt")] + public System.DateTimeOffset CreatedAt { get; set; } /// - /// Indicates a priority for the action, making it possible for frontends to adapt GUI elements based on action - ///
priority. + /// The date and time when the dialog was last updated. ///
- [JsonPropertyName("priority")] - [JsonConverter(typeof(JsonStringEnumConverter))] - public DialogsEntitiesActions_DialogGuiActionPriority Priority { get; set; } + [JsonPropertyName("updatedAt")] + public System.DateTimeOffset UpdatedAt { 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. + /// The aggregated status of the dialog. ///
- [JsonPropertyName("prompt")] - public ICollection Prompt { get; set; } + [JsonPropertyName("status")] + [JsonConverter(typeof(JsonStringEnumConverter))] + public DialogsEntities_DialogStatus Status { get; set; } /// - /// The title of the action, this should be short and in verb form. Must be text/plain. + /// Current display state. /// - [JsonPropertyName("title")] - public ICollection Title { get; set; } + [JsonPropertyName("systemLabel")] + [JsonConverter(typeof(JsonStringEnumConverter))] + public DialogEndUserContextsEntities_SystemLabel SystemLabel { 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. + /// The dialog unstructured text content. ///
- [JsonPropertyName("url")] - public System.Uri Url { get; set; } - - } + [JsonPropertyName("content")] + public V1ServiceOwnerDialogsQueriesGet_Content Content { get; 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. + /// The list of words (tags) that will be used in dialog search queries. Not visible in end-user DTO. /// - [JsonPropertyName("value")] - public string Value { get; set; } - - } + [JsonPropertyName("searchTags")] + public ICollection SearchTags { get; 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. + /// The attachments associated with the dialog (on an aggregate level). /// [JsonPropertyName("attachments")] - public ICollection Attachments { get; set; } + 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. + /// The immutable list of transmissions associated with the dialog. ///
- [JsonPropertyName("authorizationAttribute")] - public string AuthorizationAttribute { get; set; } + [JsonPropertyName("transmissions")] + public ICollection Transmissions { get; set; } /// - /// The transmission unstructured text content. + /// The GUI actions associated with the dialog. Should be used in browser-based interactive frontends. /// - [JsonPropertyName("content")] - public V1ServiceOwnerDialogsCommandsUpdate_TransmissionContent Content { get; set; } + [JsonPropertyName("guiActions")] + public ICollection GuiActions { 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). + /// The API actions associated with the dialog. Should be used in specialized, non-browser-based integrations. ///
- [JsonPropertyName("extendedType")] - public System.Uri ExtendedType { get; set; } + [JsonPropertyName("apiActions")] + public ICollection ApiActions { 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. + /// An immutable list of activities associated with the dialog. ///
- [JsonPropertyName("id")] - public System.Guid? Id { get; set; } + [JsonPropertyName("activities")] + public ICollection Activities { get; set; } /// - /// Reference to any other transmission that this transmission is related to. + /// The list of seen log entries for the dialog newer than the dialog ChangedAt date. /// - [JsonPropertyName("relatedTransmissionId")] - public System.Guid? RelatedTransmissionId { get; set; } + [JsonPropertyName("seenSinceLastUpdate")] + public ICollection SeenSinceLastUpdate { get; set; } - /// - /// The actor that sent the transmission. - /// + } - [JsonPropertyName("sender")] - public V1ServiceOwnerCommonActors_Actor Sender { get; set; } + [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "14.2.0.0 (NJsonSchema v11.1.0.0 (Newtonsoft.Json v13.0.0.0))")] + public partial class OrderSetOfTOrderDefinitionAndTTarget + { - /// - /// The type of transmission. - /// + private IDictionary _additionalProperties; - [JsonPropertyName("type")] - [JsonConverter(typeof(JsonStringEnumConverter))] - public DialogsEntitiesTransmissions_DialogTransmissionType Type { get; set; } + [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 V1ServiceOwnerDialogsCommandsUpdate_TransmissionAttachment + public partial class ContinuationTokenSetOfTOrderDefinitionAndTTarget { - /// - /// 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 additions 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. - /// + private IDictionary _additionalProperties; - [JsonPropertyName("urls")] - public ICollection Urls { get; set; } + [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 V1ServiceOwnerDialogsCommandsUpdate_TransmissionAttachmentUrl + public partial class V1ServiceOwnerDialogsQueriesGet_Content { /// - /// The type of consumer the URL is intended for. + /// The title of the dialog. /// - [JsonPropertyName("consumerType")] - [JsonConverter(typeof(JsonStringEnumConverter))] - public Attachments_AttachmentUrlConsumerType ConsumerType { get; set; } + [JsonPropertyName("title")] + public V1CommonContent_ContentValue Title { get; set; } /// - /// The media type of the attachment. + /// A short summary of the dialog and its current state. /// - [JsonPropertyName("mediaType")] - public string MediaType { get; set; } + [JsonPropertyName("summary")] + public V1CommonContent_ContentValue Summary { get; set; } /// - /// The fully qualified URL of the attachment. + /// Overridden sender name. If not supplied, assume "org" as the sender name. /// - [JsonPropertyName("url")] - public System.Uri Url { get; set; } - - } + [JsonPropertyName("senderName")] + public V1CommonContent_ContentValue SenderName { get; 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 + /// Additional information about the dialog, this may contain Markdown. ///
- [JsonPropertyName("contentReference")] - public V1CommonContent_ContentValue ContentReference { get; set; } + [JsonPropertyName("additionalInfo")] + public V1CommonContent_ContentValue AdditionalInfo { get; set; } /// - /// The transmission summary. + /// Used as the human-readable label used to describe the "ExtendedStatus" field. /// - [JsonPropertyName("summary")] - public V1CommonContent_ContentValue Summary { get; set; } + [JsonPropertyName("extendedStatus")] + public V1CommonContent_ContentValue ExtendedStatus { get; set; } /// - /// The transmission title. Must be text/plain. + /// 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("title")] - public V1CommonContent_ContentValue Title { get; set; } + [JsonPropertyName("mainContentReference")] + public V1CommonContent_ContentValue MainContentReference { get; 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 + public partial class V1ServiceOwnerDialogsQueriesGet_SearchTag { + /// + /// A search tag value. + /// - [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; } + [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 V1ServiceOwnerDialogSeenLogsQueriesSearch_SeenLog + public partial class V1ServiceOwnerDialogsQueriesGet_DialogAttachment { + /// + /// The unique identifier for the attachment in UUIDv7 format. + /// [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. + /// The display name of the attachment that should be used in GUIs. /// - [JsonPropertyName("additionalInfo")] - public V1CommonContent_ContentValue AdditionalInfo { get; set; } + [JsonPropertyName("displayName")] + public ICollection DisplayName { get; set; } /// - /// Used as the human-readable label used to describe the "ExtendedStatus" field. + /// The URLs associated with the attachment, each referring to a different representation of the attachment. /// - [JsonPropertyName("extendedStatus")] - public V1CommonContent_ContentValue ExtendedStatus { get; set; } + [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 + { /// - /// 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 + /// The unique identifier for the attachment URL in UUIDv7 format. ///
- [JsonPropertyName("mainContentReference")] - public V1CommonContent_ContentValue MainContentReference { get; set; } + [JsonPropertyName("id")] + public System.Guid Id { get; set; } /// - /// Overridden sender name. If not supplied, assume "org" as the sender name. + /// The fully qualified URL of the attachment. /// - [JsonPropertyName("senderName")] - public V1CommonContent_ContentValue SenderName { get; set; } + [JsonPropertyName("url")] + public System.Uri Url { get; set; } /// - /// A short summary of the dialog and its current state. + /// The media type of the attachment. /// - [JsonPropertyName("summary")] - public V1CommonContent_ContentValue Summary { get; set; } + [JsonPropertyName("mediaType")] + public string MediaType { get; set; } /// - /// The title of the dialog. + /// What type of consumer the URL is intended for. /// - [JsonPropertyName("title")] - public V1CommonContent_ContentValue Title { get; set; } + [JsonPropertyName("consumerType")] + [JsonConverter(typeof(JsonStringEnumConverter))] + public Attachments_AttachmentUrlConsumerType ConsumerType { get; 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 + public partial class V1ServiceOwnerDialogsQueriesGet_DialogTransmission { /// - /// An immutable list of activities associated with the dialog. + /// The unique identifier for the transmission in UUIDv7 format. /// - [JsonPropertyName("activities")] - public ICollection Activities { get; set; } + [JsonPropertyName("id")] + public System.Guid Id { get; set; } /// - /// The API actions associated with the dialog. Should be used in specialized, non-browser-based integrations. + /// The date and time when the transmission was created. /// - [JsonPropertyName("apiActions")] - public ICollection ApiActions { get; set; } + [JsonPropertyName("createdAt")] + public System.DateTimeOffset CreatedAt { get; set; } /// - /// The attachments associated with the dialog (on an aggregate level). + /// 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("attachments")] - public ICollection Attachments { get; set; } + [JsonPropertyName("authorizationAttribute")] + public string AuthorizationAttribute { get; set; } /// - /// The dialog unstructured text content. + /// Flag indicating if the authenticated user supplied in the query is authorized for this transmission. /// - [JsonPropertyName("content")] - public V1ServiceOwnerDialogsQueriesGet_Content Content { get; set; } + [JsonPropertyName("isAuthorized")] + public bool? IsAuthorized { get; set; } /// - /// The date and time when the dialog was created. + /// 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("createdAt")] - public System.DateTimeOffset CreatedAt { get; set; } + [JsonPropertyName("extendedType")] + public System.Uri ExtendedType { get; set; } /// - /// If deleted, the date and time when the deletion was performed. + /// Reference to any other transmission that this transmission is related to. /// - [JsonPropertyName("deletedAt")] - public System.DateTimeOffset? DeletedAt { get; set; } + [JsonPropertyName("relatedTransmissionId")] + public System.Guid? RelatedTransmissionId { get; set; } /// - /// The due date for the dialog. Dialogs past due date might be marked as such in frontends but will still be available. + /// The type of transmission. /// - [JsonPropertyName("dueAt")] - public System.DateTimeOffset? DueAt { get; set; } + [JsonPropertyName("type")] + [JsonConverter(typeof(JsonStringEnumConverter))] + public DialogsEntitiesTransmissions_DialogTransmissionType Type { 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). + /// The actor that sent the transmission. ///
- [JsonPropertyName("extendedStatus")] - public string ExtendedStatus { get; set; } + [JsonPropertyName("sender")] + public V1ServiceOwnerCommonActors_Actor Sender { 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). + /// The transmission unstructured text content. ///
- [JsonPropertyName("externalReference")] - public string ExternalReference { get; set; } + [JsonPropertyName("content")] + public V1ServiceOwnerDialogsQueriesGet_DialogTransmissionContent Content { get; set; } /// - /// The GUI actions associated with the dialog. Should be used in browser-based interactive frontends. + /// The transmission-level attachments. /// - [JsonPropertyName("guiActions")] - public ICollection GuiActions { get; set; } - - /// - /// The unique identifier for the dialog in UUIDv7 format. - /// + [JsonPropertyName("attachments")] + public ICollection Attachments { get; set; } - [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 V1ServiceOwnerDialogsQueriesGet_DialogTransmissionContent + { /// - /// The service owner code representing the organization (service owner) related to this dialog. + /// The transmission title. /// - [JsonPropertyName("org")] - public string Org { get; set; } + [JsonPropertyName("title")] + public V1CommonContent_ContentValue Title { get; set; } /// - /// The party code representing the organization or person that the dialog belongs to in URN format. + /// The transmission summary. /// - [JsonPropertyName("party")] - public string Party { get; set; } + [JsonPropertyName("summary")] + public V1CommonContent_ContentValue Summary { 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. + /// 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("precedingProcess")] - public string PrecedingProcess { get; set; } - - /// - /// Optional process identifier used to indicate a business process this dialog belongs to. - /// + [JsonPropertyName("contentReference")] + public V1CommonContent_ContentValue ContentReference { get; set; } - [JsonPropertyName("process")] - public string Process { get; 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 + { /// - /// Advisory indicator of progress, represented as 1-100 percentage value. 100% representing a dialog that has come - ///
to a natural completion (successful or not). + /// The unique identifier for the attachment in UUIDv7 format. ///
- [JsonPropertyName("progress")] - public int? Progress { get; set; } + [JsonPropertyName("id")] + public System.Guid Id { get; set; } /// - /// The unique identifier for the revision in UUIDv4 format. + /// The display name of the attachment that should be used in GUIs. /// - [JsonPropertyName("revision")] - public System.Guid Revision { get; set; } + [JsonPropertyName("displayName")] + public ICollection DisplayName { get; set; } /// - /// The list of words (tags) that will be used in dialog search queries. Not visible in end-user DTO. + /// The URLs associated with the attachment, each referring to a different representation of the attachment. /// - [JsonPropertyName("searchTags")] - public ICollection SearchTags { get; set; } - - /// - /// The list of seen log entries for the dialog newer than the dialog ChangedAt date. - /// + [JsonPropertyName("urls")] + public ICollection Urls { get; set; } - [JsonPropertyName("seenSinceLastUpdate")] - public ICollection SeenSinceLastUpdate { get; 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 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. + /// 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("serviceResource")] - public string ServiceResource { get; set; } + [JsonPropertyName("url")] + public System.Uri Url { get; set; } /// - /// The ServiceResource type, as defined in Altinn Resource Registry (see ResourceType). + /// The media type of the attachment. /// - [JsonPropertyName("serviceResourceType")] - public string ServiceResourceType { get; set; } + [JsonPropertyName("mediaType")] + public string MediaType { get; set; } /// - /// The aggregated status of the dialog. + /// The type of consumer the URL is intended for. /// - [JsonPropertyName("status")] + [JsonPropertyName("consumerType")] [JsonConverter(typeof(JsonStringEnumConverter))] - public DialogsEntities_DialogStatus Status { get; set; } - - /// - /// Current display state. - /// + public Attachments_AttachmentUrlConsumerType ConsumerType { get; set; } - [JsonPropertyName("systemLabel")] - [JsonConverter(typeof(JsonStringEnumConverter))] - public DialogEndUserContextsEntities_SystemLabel SystemLabel { get; 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 immutable list of transmissions associated with the dialog. + /// The unique identifier for the action in UUIDv7 format. /// - [JsonPropertyName("transmissions")] - public ICollection Transmissions { get; set; } + [JsonPropertyName("id")] + public System.Guid Id { get; set; } /// - /// The date and time when the dialog was last updated. + /// The action identifier for the action, corresponding to the "action" attributeId used in the XACML service policy. /// - [JsonPropertyName("updatedAt")] - public System.DateTimeOffset UpdatedAt { get; set; } + [JsonPropertyName("action")] + public string Action { get; set; } /// - /// The timestamp when the dialog will be made visible for authorized end users. + /// The fully qualified URL of the action, to which the user will be redirected when the action is triggered. /// - [JsonPropertyName("visibleFrom")] - public System.DateTimeOffset? VisibleFrom { get; set; } - - } + [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_DialogActivity - { /// - /// The date and time when the activity was created. + /// 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("createdAt")] - public System.DateTimeOffset? CreatedAt { get; set; } + [JsonPropertyName("authorizationAttribute")] + public string AuthorizationAttribute { get; set; } /// - /// Unstructured text describing the activity. Only set if the activity type is "Information". + /// Whether the user, if supplied in the query, is authorized to perform the action. /// - [JsonPropertyName("description")] - public ICollection Description { get; set; } + [JsonPropertyName("isAuthorized")] + public bool? IsAuthorized { 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). + /// Indicates whether the action results in the dialog being deleted. Used by frontends to implement custom UX + ///
for delete actions. ///
- [JsonPropertyName("extendedType")] - public System.Uri ExtendedType { get; set; } + [JsonPropertyName("isDeleteDialogAction")] + public bool IsDeleteDialogAction { get; set; } /// - /// The unique identifier for the activity in UUIDv7 format. + /// Indicates a priority for the action, making it possible for frontends to adapt GUI elements based on action + ///
priority. ///
- [JsonPropertyName("id")] - public System.Guid Id { get; set; } + [JsonPropertyName("priority")] + [JsonConverter(typeof(JsonStringEnumConverter))] + public DialogsEntitiesActions_DialogGuiActionPriority Priority { get; set; } /// - /// The actor that performed the activity. + /// The HTTP method that the frontend should use when redirecting the user. /// - [JsonPropertyName("performedBy")] - public V1ServiceOwnerCommonActors_Actor PerformedBy { get; set; } + [JsonPropertyName("httpMethod")] + [JsonConverter(typeof(JsonStringEnumConverter))] + public Http_HttpVerb HttpMethod { get; set; } /// - /// If the activity is related to a particular transmission, this field will contain the transmission identifier. + /// The title of the action, this should be short and in verb form. /// - [JsonPropertyName("transmissionId")] - public System.Guid? TransmissionId { get; set; } + [JsonPropertyName("title")] + public ICollection Title { get; set; } /// - /// The type of activity. + /// If there should be a prompt asking the user for confirmation before the action is executed, + ///
this field should contain the prompt text. ///
- [JsonPropertyName("type")] - [JsonConverter(typeof(JsonStringEnumConverter))] - public DialogsEntitiesActivities_DialogActivityType Type { get; set; } + [JsonPropertyName("prompt")] + public ICollection Prompt { get; 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 { + /// + /// The unique identifier for the action in UUIDv7 format. + /// + + [JsonPropertyName("id")] + public System.Guid Id { get; set; } + /// /// 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. @@ -3060,6 +3159,13 @@ public partial class V1ServiceOwnerDialogsQueriesGet_DialogApiAction [JsonPropertyName("authorizationAttribute")] public string AuthorizationAttribute { get; set; } + /// + /// True if the authenticated user (set in the query) is authorized for this action. + /// + + [JsonPropertyName("isAuthorized")] + public bool? IsAuthorized { get; set; } + /// /// The endpoints associated with the action. /// @@ -3067,31 +3173,41 @@ public partial class V1ServiceOwnerDialogsQueriesGet_DialogApiAction [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 V1ServiceOwnerDialogsQueriesGet_DialogApiActionEndpoint + { /// - /// The unique identifier for the action in UUIDv7 format. + /// The unique identifier for the endpoint 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. + /// Arbitrary string indicating the version of the endpoint. + ///
+ ///
Consult the service-specific documentation provided by the service owner for details (if in use). ///
- [JsonPropertyName("isAuthorized")] - public bool? IsAuthorized { get; set; } + [JsonPropertyName("version")] + public string Version { get; set; } - } + /// + /// The fully qualified URL of the API endpoint. + /// + + [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_DialogApiActionEndpoint - { /// - /// Boolean indicating if the endpoint is deprecated. Integrators should migrate to endpoints with a higher version. + /// The HTTP method that the endpoint expects for this action. /// - [JsonPropertyName("deprecated")] - public bool Deprecated { get; set; } + [JsonPropertyName("httpMethod")] + [JsonConverter(typeof(JsonStringEnumConverter))] + public Http_HttpVerb HttpMethod { get; set; } /// /// Link to service provider documentation for the endpoint. Used for service owners to provide documentation for @@ -3101,21 +3217,6 @@ public partial class V1ServiceOwnerDialogsQueriesGet_DialogApiActionEndpoint [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. @@ -3132,6 +3233,13 @@ public partial class V1ServiceOwnerDialogsQueriesGet_DialogApiActionEndpoint [JsonPropertyName("responseSchema")] public System.Uri ResponseSchema { get; set; } + /// + /// Boolean indicating if the endpoint is deprecated. Integrators should migrate to endpoints with a higher version. + /// + + [JsonPropertyName("deprecated")] + public bool Deprecated { 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. @@ -3140,326 +3248,378 @@ public partial class V1ServiceOwnerDialogsQueriesGet_DialogApiActionEndpoint [JsonPropertyName("sunsetAt")] public System.DateTimeOffset? SunsetAt { get; 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 fully qualified URL of the API endpoint. + /// The unique identifier for the activity in UUIDv7 format. /// - [JsonPropertyName("url")] - public System.Uri Url { get; set; } + [JsonPropertyName("id")] + public System.Guid Id { get; set; } /// - /// Arbitrary string indicating the version of the endpoint. + /// The date and time when the activity was created. + /// + + [JsonPropertyName("createdAt")] + public System.DateTimeOffset? CreatedAt { 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("version")] - public string Version { get; set; } + [JsonPropertyName("extendedType")] + public System.Uri ExtendedType { 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_DialogAttachment - { /// - /// The display name of the attachment that should be used in GUIs. + /// If the activity is related to a particular transmission, this field will contain the transmission identifier. /// - [JsonPropertyName("displayName")] - public ICollection DisplayName { get; set; } + [JsonPropertyName("transmissionId")] + public System.Guid? TransmissionId { get; set; } /// - /// The unique identifier for the attachment in UUIDv7 format. + /// The actor that performed the activity. /// - [JsonPropertyName("id")] - public System.Guid Id { get; set; } + [JsonPropertyName("performedBy")] + public V1ServiceOwnerCommonActors_Actor PerformedBy { get; set; } /// - /// The URLs associated with the attachment, each referring to a different representation of the attachment. + /// Unstructured text describing the activity. Only set if the activity type is "Information". /// - [JsonPropertyName("urls")] - public ICollection Urls { get; set; } + [JsonPropertyName("description")] + public ICollection Description { get; 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 + public partial class V1ServiceOwnerDialogsQueriesGet_DialogSeenLog { /// - /// What type of consumer the URL is intended for. + /// The unique identifier for the seen log entry in UUIDv7 format. /// - [JsonPropertyName("consumerType")] - [JsonConverter(typeof(JsonStringEnumConverter))] - public Attachments_AttachmentUrlConsumerType ConsumerType { get; set; } + [JsonPropertyName("id")] + public System.Guid Id { get; set; } /// - /// The unique identifier for the attachment URL in UUIDv7 format. + /// The timestamp when the dialog revision was seen. /// - [JsonPropertyName("id")] - public System.Guid Id { get; set; } + [JsonPropertyName("seenAt")] + public System.DateTimeOffset SeenAt { get; set; } /// - /// The media type of the attachment. + /// The actor that saw the dialog revision. /// - [JsonPropertyName("mediaType")] - public string MediaType { get; set; } + [JsonPropertyName("seenBy")] + public V1ServiceOwnerCommonActors_Actor SeenBy { get; set; } /// - /// The fully qualified URL of the attachment. + /// 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("url")] - public System.Uri Url { get; set; } + [JsonPropertyName("isViaServiceOwner")] + public bool? IsViaServiceOwner { 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; } } [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 + public partial class V1ServiceOwnerDialogsCommandsCreate_Dialog { /// - /// The action identifier for the action, corresponding to the "action" attributeId used in the XACML service policy. + /// A self-defined UUIDv7 may be provided to support idempotent creation of dialogs. If not provided, a new UUIDv7 will be generated. /// - [JsonPropertyName("action")] - public string Action { get; set; } + [JsonPropertyName("id")] + public System.Guid? Id { 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. + /// 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("authorizationAttribute")] - public string AuthorizationAttribute { get; set; } + [JsonPropertyName("serviceResource")] + public string ServiceResource { get; set; } /// - /// The HTTP method that the frontend should use when redirecting the user. + /// The party code representing the organization or person that the dialog belongs to in URN format. /// - [JsonPropertyName("httpMethod")] - [JsonConverter(typeof(JsonStringEnumConverter))] - public Http_HttpVerb HttpMethod { get; set; } + [JsonPropertyName("party")] + public string Party { get; set; } /// - /// The unique identifier for the action in UUIDv7 format. + /// 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("id")] - public System.Guid Id { get; set; } + [JsonPropertyName("progress")] + public int? Progress { get; set; } /// - /// Whether the user, if supplied in the query, is authorized to perform the action. + /// 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("isAuthorized")] - public bool? IsAuthorized { get; set; } + [JsonPropertyName("extendedStatus")] + public string ExtendedStatus { get; set; } /// - /// Indicates whether the action results in the dialog being deleted. Used by frontends to implement custom UX - ///
for delete actions. + /// Arbitrary string with a service-specific reference to an external system or service. ///
- [JsonPropertyName("isDeleteDialogAction")] - public bool IsDeleteDialogAction { get; set; } + [JsonPropertyName("externalReference")] + public string ExternalReference { get; set; } /// - /// Indicates a priority for the action, making it possible for frontends to adapt GUI elements based on action - ///
priority. + /// The timestamp when the dialog should be made visible for authorized end users. If not provided, the dialog will be + ///
immediately available. ///
- [JsonPropertyName("priority")] - [JsonConverter(typeof(JsonStringEnumConverter))] - public DialogsEntitiesActions_DialogGuiActionPriority Priority { get; set; } + [JsonPropertyName("visibleFrom")] + public System.DateTimeOffset? VisibleFrom { 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. + /// The due date for the dialog. Dialogs past due date might be marked as such in frontends but will still be available. ///
- [JsonPropertyName("prompt")] - public ICollection Prompt { get; set; } + [JsonPropertyName("dueAt")] + public System.DateTimeOffset? DueAt { get; set; } /// - /// The title of the action, this should be short and in verb form. + /// Optional process identifier used to indicate a business process this dialog belongs to. /// - [JsonPropertyName("title")] - public ICollection Title { get; set; } + [JsonPropertyName("process")] + public string Process { get; set; } /// - /// The fully qualified URL of the action, to which the user will be redirected when the action is triggered. + /// 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("url")] - public System.Uri Url { get; set; } - - } + [JsonPropertyName("precedingProcess")] + public string PrecedingProcess { get; 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. + /// 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("id")] - public System.Guid Id { get; set; } + [JsonPropertyName("expiresAt")] + public System.DateTimeOffset? ExpiresAt { get; set; } /// - /// Flag indicating whether the seen log entry was created by the current end user, if provided in the query. + /// 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("isCurrentEndUser")] - public bool IsCurrentEndUser { get; set; } + [JsonPropertyName("createdAt")] + public System.DateTimeOffset CreatedAt { 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. + /// 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("isViaServiceOwner")] - public bool? IsViaServiceOwner { get; set; } + [JsonPropertyName("updatedAt")] + public System.DateTimeOffset UpdatedAt { get; set; } /// - /// The timestamp when the dialog revision was seen. + /// The aggregated status of the dialog. /// - [JsonPropertyName("seenAt")] - public System.DateTimeOffset SeenAt { get; set; } + [JsonPropertyName("status")] + [JsonConverter(typeof(JsonStringEnumConverter))] + public DialogsEntities_DialogStatus Status { get; set; } /// - /// The actor that saw the dialog revision. + /// Set the system label of the dialog Migration purposes. /// - [JsonPropertyName("seenBy")] - public V1ServiceOwnerCommonActors_Actor SeenBy { get; set; } - - } + [JsonPropertyName("systemLabel")] + [JsonConverter(typeof(JsonStringEnumConverter))] + public DialogEndUserContextsEntities_SystemLabel? SystemLabel { get; 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. + /// The dialog unstructured text content. /// - [JsonPropertyName("attachments")] - public ICollection Attachments { get; set; } + [JsonPropertyName("content")] + public V1ServiceOwnerDialogsCommandsCreate_Content Content { 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. + /// A list of words (tags) that will be used in dialog search queries. Not visible in end-user DTO. ///
- [JsonPropertyName("authorizationAttribute")] - public string AuthorizationAttribute { get; set; } + [JsonPropertyName("searchTags")] + public ICollection SearchTags { get; set; } /// - /// The transmission unstructured text content. + /// The attachments associated with the dialog (on an aggregate level). /// - [JsonPropertyName("content")] - public V1ServiceOwnerDialogsQueriesGet_DialogTransmissionContent Content { get; set; } + [JsonPropertyName("attachments")] + public ICollection Attachments { get; set; } /// - /// The date and time when the transmission was created. + /// The immutable list of transmissions associated with the dialog. /// - [JsonPropertyName("createdAt")] - public System.DateTimeOffset CreatedAt { get; set; } + [JsonPropertyName("transmissions")] + public ICollection Transmissions { 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). + /// The GUI actions associated with the dialog. Should be used in browser-based interactive frontends. ///
- [JsonPropertyName("extendedType")] - public System.Uri ExtendedType { get; set; } + [JsonPropertyName("guiActions")] + public ICollection GuiActions { get; set; } /// - /// The unique identifier for the transmission in UUIDv7 format. + /// The API actions associated with the dialog. Should be used in specialized, non-browser-based integrations. /// - [JsonPropertyName("id")] - public System.Guid Id { get; set; } + [JsonPropertyName("apiActions")] + public ICollection ApiActions { get; set; } /// - /// Flag indicating if the authenticated user supplied in the query is authorized for this transmission. + /// An immutable list of activities associated with the dialog. /// - [JsonPropertyName("isAuthorized")] - public bool? IsAuthorized { get; set; } + [JsonPropertyName("activities")] + public ICollection Activities { get; 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 + { /// - /// Reference to any other transmission that this transmission is related to. + /// The title of the dialog. + ///
Supported media types: text/plain ///
- [JsonPropertyName("relatedTransmissionId")] - public System.Guid? RelatedTransmissionId { get; set; } + [JsonPropertyName("title")] + public V1CommonContent_ContentValue Title { get; set; } /// - /// The actor that sent the transmission. + /// A short summary of the dialog and its current state. + ///
Supported media types: text/plain ///
- [JsonPropertyName("sender")] - public V1ServiceOwnerCommonActors_Actor Sender { get; set; } + [JsonPropertyName("summary")] + public V1CommonContent_ContentValue Summary { get; set; } /// - /// The type of transmission. + /// Overridden sender name. If not supplied, assume "org" as the sender name. Must be text/plain if supplied. + ///
Supported media types: text/plain ///
- [JsonPropertyName("type")] - [JsonConverter(typeof(JsonStringEnumConverter))] - public DialogsEntitiesTransmissions_DialogTransmissionType Type { get; set; } + [JsonPropertyName("senderName")] + public V1CommonContent_ContentValue SenderName { get; set; } + + /// + /// 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; } } [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 + public partial class V1ServiceOwnerDialogsCommandsCreate_SearchTag { /// - /// The display name of the attachment that should be used in GUIs. + /// A search tag value. /// - [JsonPropertyName("displayName")] - public ICollection DisplayName { get; set; } + [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_Attachment + { /// - /// The unique identifier for the attachment in UUIDv7 format. + /// A self-defined UUIDv7 may be provided to support idempotent creation of attachments. If not provided, a new UUIDv7 will be generated. /// [JsonPropertyName("id")] - public System.Guid Id { get; set; } + public System.Guid? Id { get; set; } + + /// + /// 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; } + 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 + public partial class V1ServiceOwnerDialogsCommandsCreate_AttachmentUrl { /// - /// The type of consumer the URL is intended for. + /// The fully qualified URL of the attachment. /// - [JsonPropertyName("consumerType")] - [JsonConverter(typeof(JsonStringEnumConverter))] - public Attachments_AttachmentUrlConsumerType ConsumerType { get; set; } + [JsonPropertyName("url")] + public System.Uri Url { get; set; } /// /// The media type of the attachment. @@ -3469,374 +3629,359 @@ public partial class V1ServiceOwnerDialogsQueriesGet_DialogTransmissionAttachmen 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. + /// The type of consumer the URL is intended for. ///
- [JsonPropertyName("url")] - public System.Uri Url { get; set; } + [JsonPropertyName("consumerType")] + [JsonConverter(typeof(JsonStringEnumConverter))] + public Attachments_AttachmentUrlConsumerType ConsumerType { get; 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 + public partial class V1ServiceOwnerDialogsCommandsCreate_Transmission { /// - /// 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 + /// A self-defined UUIDv7 may be provided to support idempotent creation of transmissions. If not provided, a new UUIDv7 will be generated. ///
- [JsonPropertyName("contentReference")] - public V1CommonContent_ContentValue ContentReference { get; set; } + [JsonPropertyName("id")] + public System.Guid? Id { get; set; } /// - /// The transmission summary. + /// If supplied, overrides the creating date and time for the transmission. + ///
If not supplied, the current date /time will be used. ///
- [JsonPropertyName("summary")] - public V1CommonContent_ContentValue Summary { get; set; } + [JsonPropertyName("createdAt")] + public System.DateTimeOffset CreatedAt { get; set; } /// - /// The transmission title. + /// 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("title")] - public V1CommonContent_ContentValue Title { get; set; } - - } + [JsonPropertyName("authorizationAttribute")] + public string AuthorizationAttribute { get; 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. + /// 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("value")] - public string Value { get; set; } + [JsonPropertyName("extendedType")] + public System.Uri ExtendedType { get; set; } - } + /// + /// Reference to any other transmission that this transmission is related to. + /// + + [JsonPropertyName("relatedTransmissionId")] + public System.Guid? RelatedTransmissionId { get; 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. + /// The type of transmission. /// - [JsonPropertyName("extendedStatus")] - public V1CommonContent_ContentValue ExtendedStatus { get; set; } + [JsonPropertyName("type")] + [JsonConverter(typeof(JsonStringEnumConverter))] + public DialogsEntitiesTransmissions_DialogTransmissionType Type { get; set; } /// - /// Overridden sender name. If not supplied, assume "org" as the sender name. + /// The actor that sent the transmission. /// - [JsonPropertyName("senderName")] - public V1CommonContent_ContentValue SenderName { get; set; } + [JsonPropertyName("sender")] + public V1ServiceOwnerCommonActors_Actor Sender { get; set; } /// - /// A short summary of the dialog and its current state. + /// The transmission unstructured text content. /// - [JsonPropertyName("summary")] - public V1CommonContent_ContentValue Summary { get; set; } + [JsonPropertyName("content")] + public V1ServiceOwnerDialogsCommandsCreate_TransmissionContent Content { get; set; } /// - /// The title of the dialog. + /// The transmission-level attachments. /// - [JsonPropertyName("title")] - public V1CommonContent_ContentValue Title { get; set; } + [JsonPropertyName("attachments")] + public ICollection Attachments { get; 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 + public partial class V1ServiceOwnerDialogsCommandsCreate_TransmissionContent { /// - /// The content of the dialog in search results. + /// The transmission title. Must be text/plain. /// - [JsonPropertyName("content")] - public V1ServiceOwnerDialogsQueriesSearch_Content Content { get; set; } + [JsonPropertyName("title")] + public V1CommonContent_ContentValue Title { get; set; } /// - /// The date and time when the dialog was created. + /// The transmission summary. /// - [JsonPropertyName("createdAt")] - public System.DateTimeOffset CreatedAt { get; set; } + [JsonPropertyName("summary")] + public V1CommonContent_ContentValue Summary { get; set; } /// - /// The due date for the dialog. This is the last date when the dialog is expected to be completed. + /// 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("dueAt")] - public System.DateTimeOffset? DueAt { get; set; } + [JsonPropertyName("contentReference")] + public V1CommonContent_ContentValue ContentReference { get; 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 + { /// - /// 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). + /// A self-defined UUIDv7 may be provided to support idempotent creation of transmission attachments. If not provided, a new UUIDv7 will be generated. ///
- [JsonPropertyName("extendedStatus")] - public string ExtendedStatus { get; set; } + [JsonPropertyName("id")] + public System.Guid? Id { 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). + /// The display name of the attachment that should be used in GUIs. ///
- [JsonPropertyName("externalReference")] - public string ExternalReference { get; set; } + [JsonPropertyName("displayName")] + public ICollection DisplayName { get; set; } /// - /// The number of attachments in the dialog made available for browser-based frontends. + /// The URLs associated with the attachment, each referring to a different representation of the attachment. /// - [JsonPropertyName("guiAttachmentCount")] - public int? GuiAttachmentCount { get; set; } + [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 unique identifier for the dialog in UUIDv7 format. + /// The fully qualified URL of the attachment. /// - [JsonPropertyName("id")] - public System.Guid Id { get; set; } + [JsonPropertyName("url")] + public System.Uri Url { get; set; } /// - /// The latest entry in the dialog's activity log. + /// The media type of the attachment. /// - [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; } + [JsonPropertyName("mediaType")] + public string MediaType { 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. + /// The type of consumer the URL is intended for. /// - [JsonPropertyName("precedingProcess")] - public string PrecedingProcess { get; set; } - - /// - /// Optional process identifier used to indicate a business process this dialog belongs to. - /// + [JsonPropertyName("consumerType")] + [JsonConverter(typeof(JsonStringEnumConverter))] + public Attachments_AttachmentUrlConsumerType ConsumerType { get; set; } - [JsonPropertyName("process")] - public string Process { get; 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 + { /// - /// Advisory indicator of progress, represented as 1-100 percentage value. 100% representing a dialog that has come - ///
to a natural completion (successful or not). + /// A self-defined UUIDv7 may be provided to support idempotent creation of Gui Actions. If not provided, a new UUIDv7 will be generated. ///
- [JsonPropertyName("progress")] - public int? Progress { get; set; } + [JsonPropertyName("id")] + public System.Guid? Id { get; set; } /// - /// The unique identifier for the revision in UUIDv4 format. + /// The action identifier for the action, corresponding to the "action" attributeId used in the XACML service policy. /// - [JsonPropertyName("revision")] - public System.Guid Revision { get; set; } + [JsonPropertyName("action")] + public string Action { get; set; } /// - /// The list of seen log entries for the dialog newer than the dialog ChangedAt date. + /// 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("seenSinceLastUpdate")] - public ICollection SeenSinceLastUpdate { get; set; } + [JsonPropertyName("url")] + public System.Uri Url { 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. + /// 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("serviceResource")] - public string ServiceResource { get; set; } + [JsonPropertyName("authorizationAttribute")] + public string AuthorizationAttribute { get; set; } /// - /// The ServiceResource type, as defined in Altinn Resource Registry (see ResourceType). + /// Indicates whether the action results in the dialog being deleted. Used by frontends to implement custom UX + ///
for delete actions. ///
- [JsonPropertyName("serviceResourceType")] - public string ServiceResourceType { get; set; } + [JsonPropertyName("isDeleteDialogAction")] + public bool IsDeleteDialogAction { get; set; } /// - /// The aggregated status of the dialog. + /// The HTTP method that the frontend should use when redirecting the user. /// - [JsonPropertyName("status")] + [JsonPropertyName("httpMethod")] [JsonConverter(typeof(JsonStringEnumConverter))] - public DialogsEntities_DialogStatus Status { get; set; } + public Http_HttpVerb? HttpMethod { get; set; } /// - /// Current display state. + /// Indicates a priority for the action, making it possible for frontends to adapt GUI elements based on action + ///
priority. ///
- [JsonPropertyName("systemLabel")] + [JsonPropertyName("priority")] [JsonConverter(typeof(JsonStringEnumConverter))] - public DialogEndUserContextsEntities_SystemLabel SystemLabel { get; set; } + public DialogsEntitiesActions_DialogGuiActionPriority Priority { get; set; } /// - /// The date and time when the dialog was last updated. + /// The title of the action, this should be short and in verb form. Must be text/plain. /// - [JsonPropertyName("updatedAt")] - public System.DateTimeOffset UpdatedAt { get; set; } + [JsonPropertyName("title")] + public ICollection Title { get; set; } /// - /// The timestamp when the dialog will be made visible for authorized end users. + /// If there should be a prompt asking the user for confirmation before the action is executed, + ///
this field should contain the prompt text. ///
- [JsonPropertyName("visibleFrom")] - public System.DateTimeOffset? VisibleFrom { get; set; } + [JsonPropertyName("prompt")] + public ICollection Prompt { get; 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 + public partial class V1ServiceOwnerDialogsCommandsCreate_ApiAction { /// - /// The date and time when the activity was created. + /// A self-defined UUIDv7 may be provided to support idempotent creation of Api Actions. If not provided, a new UUIDv7 will be generated. /// - [JsonPropertyName("createdAt")] - public System.DateTimeOffset? CreatedAt { get; set; } + [JsonPropertyName("id")] + public System.Guid? Id { get; set; } /// - /// Unstructured text describing the activity. Only set if the activity type is "Information". + /// 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("description")] - public ICollection Description { get; set; } + [JsonPropertyName("action")] + public string Action { get; set; } /// - /// An arbitrary string with a service-specific activity type. + /// 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. ///
- ///
Consult the service-specific documentation provided by the service owner for details (if in use). + ///
Can also be used to refer to other service policies. ///
- [JsonPropertyName("extendedType")] - public System.Uri ExtendedType { get; set; } + [JsonPropertyName("authorizationAttribute")] + public string AuthorizationAttribute { get; set; } /// - /// The unique identifier for the activity in UUIDv7 format. + /// The endpoints associated with the action. /// - [JsonPropertyName("id")] - public System.Guid Id { get; set; } + [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 + { /// - /// The actor that performed the activity. + /// Arbitrary string indicating the version of the endpoint. /// - [JsonPropertyName("performedBy")] - public V1ServiceOwnerCommonActors_Actor PerformedBy { get; set; } + [JsonPropertyName("version")] + public string Version { get; set; } /// - /// If the activity is related to a particular transmission, this field will contain the transmission identifier. + /// The fully qualified URL of the API endpoint. /// - [JsonPropertyName("transmissionId")] - public System.Guid? TransmissionId { get; set; } + [JsonPropertyName("url")] + public System.Uri Url { get; set; } /// - /// The type of activity. + /// The HTTP method that the endpoint expects for this action. /// - [JsonPropertyName("type")] + [JsonPropertyName("httpMethod")] [JsonConverter(typeof(JsonStringEnumConverter))] - public DialogsEntitiesActivities_DialogActivityType Type { get; set; } - - } + public Http_HttpVerb HttpMethod { get; 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. + /// Link to documentation for the endpoint, providing documentation for integrators. Should be a URL to a + ///
human-readable page. ///
- [JsonPropertyName("id")] - public System.Guid Id { get; set; } + [JsonPropertyName("documentationUrl")] + public System.Uri DocumentationUrl { get; set; } /// - /// Flag indicating whether the seen log entry was created by the end user supplied in the query. + /// Link to the request schema for the endpoint. Used to provide documentation for integrators. + ///
Dialogporten will not validate information on this endpoint. ///
- [JsonPropertyName("isCurrentEndUser")] - public bool IsCurrentEndUser { get; set; } + [JsonPropertyName("requestSchema")] + public System.Uri RequestSchema { 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. + /// Link to the response schema for the endpoint. Used to provide documentation for integrators. + ///
Dialogporten will not validate information on this endpoint. ///
- [JsonPropertyName("isViaServiceOwner")] - public bool? IsViaServiceOwner { get; set; } + [JsonPropertyName("responseSchema")] + public System.Uri ResponseSchema { get; set; } /// - /// The timestamp when the dialog revision was seen. + /// Boolean indicating if the endpoint is deprecated. /// - [JsonPropertyName("seenAt")] - public System.DateTimeOffset SeenAt { get; set; } + [JsonPropertyName("deprecated")] + public bool Deprecated { get; set; } /// - /// The actor that saw the dialog revision. + /// Date and time when the endpoint will no longer function. Only set if the endpoint is deprecated. Dialogporten + ///
will not enforce this date. ///
- [JsonPropertyName("seenBy")] - public V1ServiceOwnerCommonActors_Actor SeenBy { get; set; } + [JsonPropertyName("sunsetAt")] + public System.DateTimeOffset? SunsetAt { get; 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 + public partial class V1ServiceOwnerDialogsCommandsCreate_Activity { /// - /// 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. + /// A self-defined UUIDv7 may be provided to support idempotent creation of activities. If not provided, a new UUIDv7 will be generated. /// - [JsonPropertyName("content")] - public V1ServiceOwnerDialogsCommandsUpdate_TransmissionContent Content { get; set; } + [JsonPropertyName("id")] + public System.Guid? Id { get; set; } /// /// If supplied, overrides the creating date and time for the transmission. @@ -3844,373 +3989,228 @@ public partial class V1ServiceOwnerDialogTransmissionsCreate_TransmissionRequest /// [JsonPropertyName("createdAt")] - public System.DateTimeOffset CreatedAt { get; set; } + 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. + /// The type of transmission. ///
- [JsonPropertyName("id")] - public System.Guid? Id { get; set; } + [JsonPropertyName("type")] + [JsonConverter(typeof(JsonStringEnumConverter))] + public DialogsEntitiesActivities_DialogActivityType Type { get; set; } /// - /// Reference to any other transmission that this transmission is related to. + /// If the activity is related to a particular transmission, this field will contain the transmission identifier. + ///
Must be present in the request body. ///
- [JsonPropertyName("relatedTransmissionId")] - public System.Guid? RelatedTransmissionId { get; set; } + [JsonPropertyName("transmissionId")] + public System.Guid? TransmissionId { get; set; } /// - /// The actor that sent the transmission. + /// The actor that performed the activity. /// - [JsonPropertyName("sender")] - public V1ServiceOwnerCommonActors_Actor Sender { get; set; } + [JsonPropertyName("performedBy")] + public V1ServiceOwnerCommonActors_Actor PerformedBy { get; set; } /// - /// The type of transmission. + /// Unstructured text describing the activity. Only set if the activity type is "Information". /// - [JsonPropertyName("type")] - [JsonConverter(typeof(JsonStringEnumConverter))] - public DialogsEntitiesTransmissions_DialogTransmissionType Type { get; set; } + [JsonPropertyName("description")] + public ICollection Description { get; 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 + public partial class V1ServiceOwnerDialogActivitiesQueriesSearch_Activity { - /// - /// The display name of the attachment that should be used in GUIs. - /// - [JsonPropertyName("displayName")] - public ICollection DisplayName { get; set; } + [JsonPropertyName("id")] + public System.Guid Id { 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; } - - } + [JsonPropertyName("createdAt")] + public System.DateTimeOffset CreatedAt { get; 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("extendedType")] + public System.Uri ExtendedType { get; set; } - [JsonPropertyName("consumerType")] + [JsonPropertyName("type")] [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; } + public DialogsEntitiesActivities_DialogActivityType Type { 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("deletedAt")] + public System.DateTimeOffset? DeletedAt { get; set; } - [JsonPropertyName("url")] - public System.Uri Url { get; set; } + [JsonPropertyName("transmissionId")] + public System.Guid? TransmissionId { get; 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 + public partial class V1ServiceOwnerDialogActivitiesQueriesNotificationCondition_NotificationCondition { - /// - /// 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; } + [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 partial class V1ServiceOwnerDialogTransmissionsQueriesGet_Transmission + public partial class V1ServiceOwnerDialogActivitiesQueriesGet_Activity { - /// - /// 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("id")] + public System.Guid Id { get; set; } [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. - /// + public System.DateTimeOffset? CreatedAt { get; set; } [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; } + [JsonPropertyName("type")] + [JsonConverter(typeof(JsonStringEnumConverter))] + public DialogsEntitiesActivities_DialogActivityType Type { get; set; } - /// - /// The sender actor information for the transmission. - /// + [JsonPropertyName("deletedAt")] + public System.DateTimeOffset? DeletedAt { get; set; } - [JsonPropertyName("sender")] - public V1ServiceOwnerCommonActors_Actor Sender { get; set; } + [JsonPropertyName("transmissionId")] + public System.Guid? TransmissionId { get; set; } - /// - /// The type of the transmission. - /// + [JsonPropertyName("performedBy")] + public V1ServiceOwnerCommonActors_Actor PerformedBy { get; set; } - [JsonPropertyName("type")] - [JsonConverter(typeof(JsonStringEnumConverter))] - public DialogsEntitiesTransmissions_DialogTransmissionType Type { get; set; } + [JsonPropertyName("description")] + public ICollection Description { get; 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 + public enum V1ServiceOwnerDialogActivitiesQueriesNotificationCondition_NotificationConditionType { - /// - /// 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. - /// + [System.Runtime.Serialization.EnumMember(Value = @"NotExists")] + NotExists = 0, - [JsonPropertyName("urls")] - public ICollection Urls { get; set; } + [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 V1ServiceOwnerDialogTransmissionsQueriesSearch_AttachmentUrl + public partial class V1ServiceOwnerDialogActivitiesCreate_ActivityRequest { /// - /// The type of consumer the URL is intended for. + /// 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("consumerType")] - [JsonConverter(typeof(JsonStringEnumConverter))] - public Attachments_AttachmentUrlConsumerType ConsumerType { get; set; } + [JsonPropertyName("id")] + public System.Guid? Id { get; set; } /// - /// The unique identifier for the attachment URL in UUIDv7 format. + /// If supplied, overrides the creating date and time for the transmission. + ///
If not supplied, the current date /time will be used. ///
- [JsonPropertyName("id")] - public System.Guid Id { get; set; } + [JsonPropertyName("createdAt")] + public System.DateTimeOffset? CreatedAt { get; set; } /// - /// The media type of the attachment. + /// Arbitrary URI/URN describing a service-specific transmission type. /// - [JsonPropertyName("mediaType")] - public string MediaType { get; set; } + [JsonPropertyName("extendedType")] + public System.Uri ExtendedType { 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. + /// The type of transmission. ///
- [JsonPropertyName("url")] - public System.Uri Url { 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 V1ServiceOwnerDialogTransmissionsQueriesSearch_Content - { /// - /// Front-channel embedded content. Used to dynamically embed content in the frontend from an external URL. + /// If the activity is related to a particular transmission, this field will contain the transmission identifier. + ///
Must be present in the request body. ///
- [JsonPropertyName("contentReference")] - public V1CommonContent_ContentValue ContentReference { get; set; } + [JsonPropertyName("transmissionId")] + public System.Guid? TransmissionId { get; set; } /// - /// The summary of the content. + /// The actor that performed the activity. /// - [JsonPropertyName("summary")] - public V1CommonContent_ContentValue Summary { get; set; } + [JsonPropertyName("performedBy")] + public V1ServiceOwnerCommonActors_Actor PerformedBy { get; set; } /// - /// The title of the content. + /// Unstructured text describing the activity. Only set if the activity type is "Information". /// - [JsonPropertyName("title")] - public V1CommonContent_ContentValue Title { get; set; } + [JsonPropertyName("description")] + public ICollection Description { get; 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 + public partial class JsonPatchOperations_Operation { - /// - /// 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("operationType")] + [JsonConverter(typeof(JsonStringEnumConverter))] + public JsonPatchOperations_OperationType OperationType { get; set; } - [JsonPropertyName("createdAt")] - public System.DateTimeOffset CreatedAt { get; set; } + [JsonPropertyName("path")] + public string Path { get; set; } - /// - /// The date and time when the transmission was deleted, if applicable. - /// + [JsonPropertyName("op")] + public string Op { get; set; } - [JsonPropertyName("deletedAt")] - public System.DateTimeOffset? DeletedAt { get; set; } + [JsonPropertyName("from")] + public string From { get; set; } - /// - /// The extended type URI for the transmission. - /// + [JsonPropertyName("value")] + public object Value { get; set; } - [JsonPropertyName("extendedType")] - public System.Uri ExtendedType { get; set; } + } - /// - /// The unique identifier for the transmission in UUIDv7 format. - /// + [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "14.2.0.0 (NJsonSchema v11.1.0.0 (Newtonsoft.Json v13.0.0.0))")] + public enum JsonPatchOperations_OperationType + { - [JsonPropertyName("id")] - public System.Guid Id { get; set; } + [System.Runtime.Serialization.EnumMember(Value = @"Add")] + Add = 0, - /// - /// The unique identifier for the related transmission, if any. - /// + [System.Runtime.Serialization.EnumMember(Value = @"Remove")] + Remove = 1, - [JsonPropertyName("relatedTransmissionId")] - public System.Guid? RelatedTransmissionId { get; set; } + [System.Runtime.Serialization.EnumMember(Value = @"Replace")] + Replace = 2, - /// - /// The sender actor information for the transmission. - /// + [System.Runtime.Serialization.EnumMember(Value = @"Move")] + Move = 3, - [JsonPropertyName("sender")] - public V1ServiceOwnerCommonActors_Actor Sender { get; set; } + [System.Runtime.Serialization.EnumMember(Value = @"Copy")] + Copy = 4, - /// - /// The type of the transmission. - /// + [System.Runtime.Serialization.EnumMember(Value = @"Test")] + Test = 5, - [JsonPropertyName("type")] - [JsonConverter(typeof(JsonStringEnumConverter))] - public DialogsEntitiesTransmissions_DialogTransmissionType Type { get; set; } + [System.Runtime.Serialization.EnumMember(Value = @"Invalid")] + Invalid = 6, } @@ -4227,4 +4227,4 @@ public partial class V1ServiceOwnerDialogTransmissionsQueriesSearch_Transmission #pragma warning restore 3016 #pragma warning restore 8603 #pragma warning restore 8604 -#pragma warning restore 8625 +#pragma warning restore 8625 \ No newline at end of file From 3c0d18d457b62e2343c83f197cccb732422d0889 Mon Sep 17 00:00:00 2001 From: Amund Myrbostad Date: Thu, 23 Jan 2025 10:44:55 +0100 Subject: [PATCH 098/169] test --- .../Digdir.Domain.Dialogporten.WebApi.csproj | 16 +- .../Get/GetDialogActivityEndpointSummary.cs | 2 +- .../swagger.json | 6985 ----------------- ...r.Library.Dialogporten.WebApiClient.csproj | 1 - 4 files changed, 4 insertions(+), 7000 deletions(-) delete mode 100644 src/Digdir.Domain.Dialogporten.WebApi/swagger.json diff --git a/src/Digdir.Domain.Dialogporten.WebApi/Digdir.Domain.Dialogporten.WebApi.csproj b/src/Digdir.Domain.Dialogporten.WebApi/Digdir.Domain.Dialogporten.WebApi.csproj index 1ca9519e4..56668bc5a 100644 --- a/src/Digdir.Domain.Dialogporten.WebApi/Digdir.Domain.Dialogporten.WebApi.csproj +++ b/src/Digdir.Domain.Dialogporten.WebApi/Digdir.Domain.Dialogporten.WebApi.csproj @@ -6,9 +6,6 @@ 1591 - - OnBuildSuccess - @@ -43,18 +40,11 @@ - - - - - - + + - - - - + diff --git a/src/Digdir.Domain.Dialogporten.WebApi/Endpoints/V1/EndUser/DialogActivities/Get/GetDialogActivityEndpointSummary.cs b/src/Digdir.Domain.Dialogporten.WebApi/Endpoints/V1/EndUser/DialogActivities/Get/GetDialogActivityEndpointSummary.cs index 8162d6dee..064f95f54 100644 --- a/src/Digdir.Domain.Dialogporten.WebApi/Endpoints/V1/EndUser/DialogActivities/Get/GetDialogActivityEndpointSummary.cs +++ b/src/Digdir.Domain.Dialogporten.WebApi/Endpoints/V1/EndUser/DialogActivities/Get/GetDialogActivityEndpointSummary.cs @@ -10,7 +10,7 @@ public GetDialogActivityEndpointSummary() { Summary = "Gets a single dialog activity"; Description = """ - Gets a single activity belonging to a dialog. For more information see the documentation (link TBD). + Gets a single activity belonging to a dial og. For more information see the documentation (link TBD). """; Responses[StatusCodes.Status200OK] = Constants.SwaggerSummary.ReturnedResult.FormatInvariant("activity"); Responses[StatusCodes.Status401Unauthorized] = Constants.SwaggerSummary.EndUserAuthenticationFailure; diff --git a/src/Digdir.Domain.Dialogporten.WebApi/swagger.json b/src/Digdir.Domain.Dialogporten.WebApi/swagger.json deleted file mode 100644 index 7d1162481..000000000 --- a/src/Digdir.Domain.Dialogporten.WebApi/swagger.json +++ /dev/null @@ -1,6985 +0,0 @@ -{ - "x-generator": "NSwag v14.2.0.0 (NJsonSchema v11.1.0.0 (Newtonsoft.Json v13.0.0.0))", - "openapi": "3.0.0", - "info": { - "title": "Dialogporten", - "version": "v1" - }, - "paths": { - "/api/v1/.well-known/oauth-authorization-server": { - "get": { - "tags": [ - "Metadata" - ], - "summary": "Gets the OAuth 2.0 Metadata for automatic configuration of clients verifying dialog tokens", - "description": "This endpoint can be used by client integrations supporting automatic discovery of \"OAuth 2.0 Authorization Server\" metadata, enabling verification of dialog tokens issues by Dialogporten.", - "operationId": "V1WellKnownOauthAuthorizationServerGet_GetOauthAuthorizationServer", - "responses": { - "200": { - "description": "The OAuth 2.0 Authorization Server Metadata", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/V1WellKnownOauthAuthorizationServerQueriesGet_GetOauthAuthorizationServer" - } - } - } - } - } - } - }, - "/api/v1/.well-known/jwks.json": { - "get": { - "tags": [ - "Metadata" - ], - "summary": "Gets the JSON Web Key Set (JWKS) containing the public keys used to verify dialog token signatures", - "description": "This endpoint can be used by client integrations supporting automatic discovery of \"OAuth 2.0 Authorization Server\" metadata, enabling verification of dialog tokens issues by Dialogporten.", - "operationId": "V1WellKnownJwksGet_GetJwks", - "responses": { - "200": { - "description": "The OAuth 2.0 Authorization Server Metadata", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/V1WellKnownJwksQueriesGet_GetJwks" - } - } - } - } - } - } - }, - "/api/v1/serviceowner/dialogs/{dialogId}/transmissions": { - "get": { - "tags": [ - "Serviceowner" - ], - "summary": "Gets a list of dialog transmissions", - "description": "Gets the list of transmissions belonging to a dialog", - "operationId": "V1ServiceOwnerDialogTransmissionsSearch_SearchDialogTransmission", - "parameters": [ - { - "name": "dialogId", - "in": "path", - "required": true, - "schema": { - "type": "string", - "format": "guid" - } - } - ], - "responses": { - "200": { - "description": "Successfully returned the dialog transmission list.", - "content": { - "application/json": { - "schema": { - "type": "array", - "items": { - "$ref": "#/components/schemas/V1ServiceOwnerDialogTransmissionsQueriesSearch_Transmission" - } - } - } - } - }, - "401": { - "description": "Missing or invalid authentication token. Requires a Maskinporten-token with the scope \"digdir:dialogporten.serviceprovider\"." - }, - "403": { - "description": "Unauthorized to get the supplied dialog (not owned by authenticated organization or has additional scope requirements defined in policy)." - }, - "404": { - "description": "The given dialog ID was not found or is already deleted.", - "content": { - "application/problem+json": { - "schema": { - "$ref": "#/components/schemas/ProblemDetails" - } - } - } - }, - "410": { - "description": "Entity with the given key(s) is removed." - } - }, - "security": [ - { - "JWTBearerAuth": [] - } - ] - }, - "post": { - "tags": [ - "Serviceowner" - ], - "summary": "Adds a transmission to a dialog", - "description": "The transmission is created with the given configuration. For more information see the documentation (link TBD).\n\nOptimistic 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.", - "operationId": "V1ServiceOwnerDialogTransmissionsCreate_DialogTransmission", - "parameters": [ - { - "name": "dialogId", - "in": "path", - "required": true, - "schema": { - "type": "string", - "format": "guid" - } - }, - { - "name": "if-Match", - "in": "header", - "schema": { - "type": "string", - "format": "guid", - "nullable": true - } - } - ], - "requestBody": { - "x-name": "CreateTransmissionRequest", - "description": "", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/V1ServiceOwnerDialogTransmissionsCreate_TransmissionRequest" - } - } - }, - "required": true, - "x-position": 1 - }, - "responses": { - "201": { - "description": "The UUID of the created dialog transmission. A relative URL to the newly created activity is set in the \"Location\" header.", - "headers": { - "Etag": { - "description": "The new UUID ETag of the dialog", - "schema": { - "title": "System_String", - "type": "string" - }, - "example": "123e4567-e89b-12d3-a456-426614174000" - } - }, - "content": { - "application/json": { - "schema": { - "type": "string" - }, - "example": "018bb8e5-d9d0-7434-8ec5-569a6c8e01fc" - } - } - }, - "204": { - "description": "No Content" - }, - "400": { - "description": "Validation error occured. See problem details for a list of errors.", - "content": { - "application/problem+json": { - "schema": { - "$ref": "#/components/schemas/ProblemDetails" - } - } - } - }, - "401": { - "description": "Missing or invalid authentication token. Requires a Maskinporten-token with the scope \"digdir:dialogporten.serviceprovider\"." - }, - "403": { - "description": "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": { - "description": "The given dialog ID was not found or is already deleted.", - "content": { - "application/problem+json": { - "schema": { - "$ref": "#/components/schemas/ProblemDetails" - } - } - } - }, - "410": { - "description": "Entity with the given key(s) is removed." - }, - "412": { - "description": "The supplied If-Match header did not match the current Revision value for the dialog. The request was not applied.", - "content": { - "application/problem+json": { - "schema": { - "$ref": "#/components/schemas/ProblemDetails" - } - } - } - }, - "422": { - "description": "Domain error occured. See problem details for a list of errors.", - "content": { - "application/problem+json": { - "schema": { - "$ref": "#/components/schemas/ProblemDetails" - } - } - } - } - }, - "security": [ - { - "JWTBearerAuth": [] - } - ] - } - }, - "/api/v1/serviceowner/dialogs/{dialogId}/transmissions/{transmissionId}": { - "get": { - "tags": [ - "Serviceowner" - ], - "summary": "Gets a single dialog transmission", - "description": "Gets a single transmission belonging to a dialog. For more information see the documentation (link TBD).", - "operationId": "V1ServiceOwnerDialogTransmissionsGet_GetDialogTransmission", - "parameters": [ - { - "name": "dialogId", - "in": "path", - "required": true, - "schema": { - "type": "string", - "format": "guid" - } - }, - { - "name": "transmissionId", - "in": "path", - "required": true, - "schema": { - "type": "string", - "format": "guid" - } - } - ], - "responses": { - "200": { - "description": "Successfully returned the dialog transmission.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/V1ServiceOwnerDialogTransmissionsQueriesGet_Transmission" - } - } - } - }, - "401": { - "description": "Missing or invalid authentication token. Requires a Maskinporten-token with the scope \"digdir:dialogporten.serviceprovider\"." - }, - "403": { - "description": "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": { - "description": "The given dialog ID was not found or was deleted, or the given transmission ID was not found.", - "content": { - "application/problem+json": { - "schema": { - "$ref": "#/components/schemas/ProblemDetails" - } - } - } - }, - "410": { - "description": "Entity with the given key(s) is removed." - } - }, - "security": [ - { - "JWTBearerAuth": [] - } - ] - } - }, - "/api/v1/serviceowner/dialogs/{dialogId}/seenlog": { - "get": { - "tags": [ - "Serviceowner" - ], - "summary": "Gets all seen log records for a dialog", - "description": "Gets all seen log records for a dialog. For more information see the documentation (link TBD).", - "operationId": "V1ServiceOwnerDialogSeenLogsSearch_SearchDialogSeenLog", - "parameters": [ - { - "name": "dialogId", - "in": "path", - "required": true, - "schema": { - "type": "string", - "format": "guid" - } - } - ], - "responses": { - "200": { - "description": "Successfully returned the dialog seen log records.", - "content": { - "application/json": { - "schema": { - "type": "array", - "items": { - "$ref": "#/components/schemas/V1ServiceOwnerDialogSeenLogsQueriesSearch_SeenLog" - } - } - } - } - }, - "401": { - "description": "Unauthorized" - }, - "403": { - "description": "Forbidden" - }, - "404": { - "description": "The given dialog ID was not found or is already deleted.", - "content": { - "application/problem+json": { - "schema": { - "$ref": "#/components/schemas/ProblemDetails" - } - } - } - }, - "410": { - "description": "Entity with the given key(s) is removed." - } - }, - "security": [ - { - "JWTBearerAuth": [] - } - ] - } - }, - "/api/v1/serviceowner/dialogs/{dialogId}/seenlog/{seenLogId}": { - "get": { - "tags": [ - "Serviceowner" - ], - "summary": "Gets a single dialog seen log record", - "description": "Gets a single dialog seen log record. For more information see the documentation (link TBD).", - "operationId": "V1ServiceOwnerDialogSeenLogsGet_GetDialogSeenLog", - "parameters": [ - { - "name": "dialogId", - "in": "path", - "required": true, - "schema": { - "type": "string", - "format": "guid" - } - }, - { - "name": "seenLogId", - "in": "path", - "required": true, - "schema": { - "type": "string", - "format": "guid" - } - } - ], - "responses": { - "200": { - "description": "Successfully returned the dialog seen log record.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/V1ServiceOwnerDialogSeenLogsQueriesGet_SeenLog" - } - } - } - }, - "401": { - "description": "Unauthorized" - }, - "403": { - "description": "Forbidden" - }, - "404": { - "description": "The given dialog ID was not found or is already deleted.", - "content": { - "application/problem+json": { - "schema": { - "$ref": "#/components/schemas/ProblemDetails" - } - } - } - }, - "410": { - "description": "Entity with the given key(s) is removed." - } - }, - "security": [ - { - "JWTBearerAuth": [] - } - ] - } - }, - "/api/v1/serviceowner/dialogs/{dialogId}": { - "put": { - "tags": [ - "Serviceowner" - ], - "summary": "Replaces a dialog", - "description": "Replaces a given dialog with the supplied model. For more information see the documentation (link TBD).\n\nOptimistic 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.", - "operationId": "V1ServiceOwnerDialogsUpdate_Dialog", - "parameters": [ - { - "name": "dialogId", - "in": "path", - "required": true, - "schema": { - "type": "string", - "format": "guid" - } - }, - { - "name": "if-Match", - "in": "header", - "schema": { - "type": "string", - "format": "guid", - "nullable": true - } - } - ], - "requestBody": { - "x-name": "dto", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/V1ServiceOwnerDialogsCommandsUpdate_Dialog" - } - } - }, - "required": true - }, - "responses": { - "204": { - "description": "The dialog aggregate was updated successfully.", - "headers": { - "Etag": { - "description": "The new UUID ETag of the dialog", - "schema": { - "title": "System_String", - "type": "string" - }, - "example": "123e4567-e89b-12d3-a456-426614174000" - } - } - }, - "400": { - "description": "Validation error occured. See problem details for a list of errors.", - "content": { - "application/problem+json": { - "schema": { - "$ref": "#/components/schemas/ProblemDetails" - } - } - } - }, - "401": { - "description": "Missing or invalid authentication token. Requires a Maskinporten-token with the scope \"digdir:dialogporten.serviceprovider\"." - }, - "403": { - "description": "Unauthorized to update the supplied dialog (not owned by authenticated organization or has additional scope requirements defined in policy)." - }, - "404": { - "description": "The given dialog ID was not found or is already deleted.", - "content": { - "application/problem+json": { - "schema": { - "$ref": "#/components/schemas/ProblemDetails" - } - } - } - }, - "410": { - "description": "Entity with the given key(s) is removed." - }, - "412": { - "description": "The supplied If-Match header did not match the current Revision value for the dialog. The request was not applied.", - "content": { - "application/problem+json": { - "schema": { - "$ref": "#/components/schemas/ProblemDetails" - } - } - } - }, - "422": { - "description": "Domain error occured. See problem details for a list of errors.", - "content": { - "application/problem+json": { - "schema": { - "$ref": "#/components/schemas/ProblemDetails" - } - } - } - } - }, - "security": [ - { - "JWTBearerAuth": [] - } - ] - }, - "get": { - "tags": [ - "Serviceowner" - ], - "summary": "Gets a single dialog", - "description": "Gets a single dialog aggregate. For more information see the documentation (link TBD).\n\nNote that this operation may return deleted dialogs (see the field `DeletedAt`).", - "operationId": "V1ServiceOwnerDialogsGet_GetDialog", - "parameters": [ - { - "name": "dialogId", - "in": "path", - "required": true, - "schema": { - "type": "string", - "format": "guid" - } - }, - { - "name": "endUserId", - "in": "query", - "description": "Filter by end user id", - "schema": { - "type": "string", - "nullable": true - } - } - ], - "responses": { - "200": { - "description": "Successfully returned the dialog aggregate.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/V1ServiceOwnerDialogsQueriesGet_Dialog" - } - } - } - }, - "401": { - "description": "Missing or invalid authentication token. Requires a Maskinporten-token with the scope \"digdir:dialogporten.serviceprovider\"." - }, - "403": { - "description": "Unauthorized to get the supplied dialog (not owned by authenticated organization or has additional scope requirements defined in policy)." - }, - "404": { - "description": "The given dialog ID was not found or is already deleted.", - "content": { - "application/problem+json": { - "schema": { - "$ref": "#/components/schemas/ProblemDetails" - } - } - } - } - }, - "security": [ - { - "JWTBearerAuth": [] - } - ] - }, - "delete": { - "tags": [ - "Serviceowner" - ], - "summary": "Deletes a dialog", - "description": "Deletes a given dialog (soft delete). For more information see the documentation (link TBD).\n\nNote 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.\nIf end users attempt to access the dialog via the details endpoint, they will get a 410 Gone response.\n\nOptimistic 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.", - "operationId": "V1ServiceOwnerDialogsDelete_Dialog", - "parameters": [ - { - "name": "dialogId", - "in": "path", - "required": true, - "schema": { - "type": "string", - "format": "guid" - } - }, - { - "name": "if-Match", - "in": "header", - "schema": { - "type": "string", - "format": "guid", - "nullable": true - } - } - ], - "responses": { - "204": { - "description": "The dialog aggregate was deleted successfully.", - "headers": { - "Etag": { - "description": "The new UUID ETag of the dialog", - "schema": { - "title": "System_String", - "type": "string" - }, - "example": "123e4567-e89b-12d3-a456-426614174000" - } - } - }, - "400": { - "description": "Validation error occured. See problem details for a list of errors.", - "content": { - "application/problem+json": { - "schema": { - "$ref": "#/components/schemas/ProblemDetails" - } - } - } - }, - "401": { - "description": "Missing or invalid authentication token. Requires a Maskinporten-token with the scope \"digdir:dialogporten.serviceprovider\"." - }, - "403": { - "description": "Unauthorized to delete the supplied dialog (not owned by authenticated organization or has additional scope requirements defined in policy)." - }, - "404": { - "description": "The given dialog ID was not found or is already deleted.", - "content": { - "application/problem+json": { - "schema": { - "$ref": "#/components/schemas/ProblemDetails" - } - } - } - }, - "410": { - "description": "Entity with the given key(s) is removed." - }, - "412": { - "description": "The supplied If-Match header did not match the current Revision value for the dialog. The request was not applied.", - "content": { - "application/problem+json": { - "schema": { - "$ref": "#/components/schemas/ProblemDetails" - } - } - } - } - }, - "security": [ - { - "JWTBearerAuth": [] - } - ] - }, - "patch": { - "tags": [ - "Serviceowner" - ], - "summary": "Patch a single dialog", - "description": "Patches a dialog aggregate with a RFC6902 JSON Patch document. The patch document must be a JSON array of RFC6902 operations.\nSee [https://tools.ietf.org/html/rfc6902](https://tools.ietf.org/html/rfc6902) for more information.\n \nOptimistic 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.", - "operationId": "V1ServiceOwnerDialogsPatchDialog", - "parameters": [ - { - "name": "dialogId", - "in": "path", - "required": true, - "schema": { - "type": "string", - "format": "guid" - }, - "x-position": 1 - }, - { - "name": "If-Match", - "x-originalName": "etag", - "in": "header", - "schema": { - "type": "string", - "format": "guid", - "nullable": true - }, - "x-position": 2 - } - ], - "requestBody": { - "x-name": "patchDocument", - "content": { - "application/json": { - "schema": { - "type": "array", - "items": { - "$ref": "#/components/schemas/JsonPatchOperations_Operation" - } - } - } - }, - "required": true, - "x-position": 3 - }, - "responses": { - "204": { - "description": "Patch was successfully applied.", - "headers": { - "Etag": { - "description": "The new UUID ETag of the dialog", - "schema": { - "type": "string" - }, - "example": "123e4567-e89b-12d3-a456-426614174000" - } - } - }, - "400": { - "description": "Validation error occured. See problem details for a list of errors.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ProblemDetails" - } - } - } - }, - "401": { - "description": "Missing or invalid authentication token. Requires a Maskinporten-token with the scope \\\"digdir:dialogporten.serviceprovider\\\"" - }, - "403": { - "description": "Unauthorized to update a dialog for the given serviceResource (not owned by authenticated organization or has additional scope requirements defined in policy)" - }, - "404": { - "description": "The given dialog ID was not found or is deleted", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ProblemDetails" - } - } - } - }, - "412": { - "description": "The supplied Revision does not match the current Revision of the dialog", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ProblemDetails" - } - } - } - }, - "422": { - "description": "Domain error occured. See problem details for a list of errors.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ProblemDetails" - } - } - } - } - }, - "security": [ - { - "JWTBearerAuth": [] - } - ] - } - }, - "/api/v1/serviceowner/dialogs": { - "get": { - "tags": [ - "Serviceowner" - ], - "summary": "Gets a list of dialogs", - "description": "Performs a search for dialogs, returning a paginated list of dialogs. For more information see the documentation (link TBD).\n\n* All date parameters must contain explicit time zone. Example: 2023-10-27T10:00:00Z or 2023-10-27T10:00:00+01:00\n* See \"continuationToken\" in the response for how to get the next page of results.\n* hasNextPage will be set to true if there are more items to get.", - "operationId": "V1ServiceOwnerDialogsSearch_SearchDialog", - "parameters": [ - { - "name": "serviceResource", - "in": "query", - "style": "form", - "explode": true, - "description": "Filter by one or more service resources", - "schema": { - "type": "array", - "nullable": true, - "items": { - "type": "string" - } - } - }, - { - "name": "party", - "in": "query", - "style": "form", - "explode": true, - "description": "Filter by one or more owning parties", - "schema": { - "type": "array", - "nullable": true, - "items": { - "type": "string" - } - } - }, - { - "name": "endUserId", - "in": "query", - "description": "Filter by end user id", - "schema": { - "type": "string", - "nullable": true - } - }, - { - "name": "extendedStatus", - "in": "query", - "style": "form", - "explode": true, - "description": "Filter by one or more extended statuses", - "schema": { - "type": "array", - "nullable": true, - "items": { - "type": "string" - } - } - }, - { - "name": "externalReference", - "in": "query", - "description": "Filter by external reference", - "schema": { - "type": "string", - "nullable": true - } - }, - { - "name": "status", - "in": "query", - "style": "form", - "explode": true, - "description": "Filter by status", - "schema": { - "type": "array", - "nullable": true, - "items": { - "$ref": "#/components/schemas/DialogsEntities_DialogStatus" - } - } - }, - { - "name": "createdAfter", - "in": "query", - "description": "Only return dialogs created after this date", - "schema": { - "type": "string", - "format": "date-time", - "nullable": true - } - }, - { - "name": "createdBefore", - "in": "query", - "description": "Only return dialogs created before this date", - "schema": { - "type": "string", - "format": "date-time", - "nullable": true - } - }, - { - "name": "updatedAfter", - "in": "query", - "description": "Only return dialogs updated after this date", - "schema": { - "type": "string", - "format": "date-time", - "nullable": true - } - }, - { - "name": "updatedBefore", - "in": "query", - "description": "Only return dialogs updated before this date", - "schema": { - "type": "string", - "format": "date-time", - "nullable": true - } - }, - { - "name": "dueAfter", - "in": "query", - "description": "Only return dialogs with due date after this date", - "schema": { - "type": "string", - "format": "date-time", - "nullable": true - } - }, - { - "name": "dueBefore", - "in": "query", - "description": "Only return dialogs with due date before this date", - "schema": { - "type": "string", - "format": "date-time", - "nullable": true - } - }, - { - "name": "visibleAfter", - "in": "query", - "description": "Only return dialogs with visible-from date after this date", - "schema": { - "type": "string", - "format": "date-time", - "nullable": true - } - }, - { - "name": "visibleBefore", - "in": "query", - "description": "Only return dialogs with visible-from date before this date", - "schema": { - "type": "string", - "format": "date-time", - "nullable": true - } - }, - { - "name": "process", - "in": "query", - "description": "Filter by process", - "schema": { - "type": "string", - "nullable": true - } - }, - { - "name": "systemLabel", - "in": "query", - "style": "form", - "explode": true, - "description": "Filter by Display state", - "schema": { - "type": "array", - "nullable": true, - "items": { - "$ref": "#/components/schemas/DialogEndUserContextsEntities_SystemLabel" - } - } - }, - { - "name": "search", - "in": "query", - "description": "Search string for free text search. Will attempt to fuzzily match in all free text fields in the aggregate", - "schema": { - "type": "string", - "nullable": true - } - }, - { - "name": "searchLanguageCode", - "in": "query", - "description": "Limit free text search to texts with this language code, e.g. 'nb', 'en'. Culture codes will be normalized to neutral language codes (ISO 639). Default: search all culture codes", - "schema": { - "type": "string", - "nullable": true - } - }, - { - "name": "orderBy", - "in": "query", - "schema": { - "nullable": true, - "oneOf": [ - { - "$ref": "#/components/schemas/OrderSetOfTOrderDefinitionAndTTarget" - } - ] - } - }, - { - "name": "continuationToken", - "in": "query", - "description": "Supply \"continuationToken\" for the response to get the next page of results, if hasNextPage is true", - "schema": { - "nullable": true, - "oneOf": [ - { - "$ref": "#/components/schemas/ContinuationTokenSetOfTOrderDefinitionAndTTarget" - } - ] - } - }, - { - "name": "limit", - "in": "query", - "description": "Limit the number of results per page (1-1000, default: 100)", - "schema": { - "type": "integer", - "format": "int32", - "nullable": true - } - } - ], - "responses": { - "200": { - "description": "Successfully returned the dialog list.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/PaginatedListOfV1ServiceOwnerDialogsQueriesSearch_Dialog" - } - } - } - }, - "401": { - "description": "Missing or invalid authentication token. Requires a Maskinporten-token with the scope \"digdir:dialogporten.serviceprovider.search\"." - } - }, - "security": [ - { - "JWTBearerAuth": [] - } - ] - }, - "post": { - "tags": [ - "Serviceowner" - ], - "summary": "Creates a new dialog", - "description": "The dialog is created with the given configuration. For more information see the documentation (link TBD).\n\nFor detailed information on validation rules, see [the source for CreateDialogCommandValidator](https://github.com/altinn/dialogporten/blob/main/src/Digdir.Domain.Dialogporten.Application/Features/V1/ServiceOwner/Dialogs/Commands/Create/CreateDialogCommandValidator.cs)", - "operationId": "V1ServiceOwnerDialogsCreate_Dialog", - "requestBody": { - "x-name": "dto", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/V1ServiceOwnerDialogsCommandsCreate_Dialog" - } - } - }, - "required": true - }, - "responses": { - "201": { - "description": "The UUID of the created dialog aggregate. A relative URL to the newly created activity is set in the \"Location\" header.", - "headers": { - "Etag": { - "description": "The new UUID ETag of the dialog", - "schema": { - "title": "System_String", - "type": "string" - }, - "example": "123e4567-e89b-12d3-a456-426614174000" - } - }, - "content": { - "application/json": { - "schema": { - "type": "string" - }, - "example": "018bb8e5-d9d0-7434-8ec5-569a6c8e01fc" - } - } - }, - "204": { - "description": "No Content" - }, - "400": { - "description": "Validation error occured. See problem details for a list of errors.", - "content": { - "application/problem+json": { - "schema": { - "$ref": "#/components/schemas/ProblemDetails" - } - } - } - }, - "401": { - "description": "Missing or invalid authentication token. Requires a Maskinporten-token with the scope \"digdir:dialogporten.serviceprovider\"." - }, - "403": { - "description": "Unauthorized to create a dialog for the given serviceResource (not owned by authenticated organization or has additional scope requirements defined in policy)." - }, - "422": { - "description": "Domain error occured. See problem details for a list of errors.", - "content": { - "application/problem+json": { - "schema": { - "$ref": "#/components/schemas/ProblemDetails" - } - } - } - } - }, - "security": [ - { - "JWTBearerAuth": [] - } - ] - } - }, - "/api/v1/serviceowner/dialogs/{dialogId}/actions/purge": { - "post": { - "tags": [ - "Serviceowner" - ], - "summary": "Permanently deletes a dialog", - "description": "Deletes a given dialog (hard delete). For more information see the documentation (link TBD).\n\nOptimistic 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.", - "operationId": "V1ServiceOwnerDialogsPurge_PurgeDialog", - "parameters": [ - { - "name": "dialogId", - "in": "path", - "required": true, - "schema": { - "type": "string", - "format": "guid" - } - }, - { - "name": "if-Match", - "in": "header", - "schema": { - "type": "string", - "format": "guid", - "nullable": true - } - } - ], - "responses": { - "204": { - "description": "The dialog aggregate was deleted successfully." - }, - "401": { - "description": "Missing or invalid authentication token. Requires a Maskinporten-token with the scope \"digdir:dialogporten.serviceprovider\"." - }, - "403": { - "description": "Unauthorized to delete the supplied dialog (not owned by authenticated organization or has additional scope requirements defined in policy)." - }, - "404": { - "description": "The given dialog ID was not found or is already deleted.", - "content": { - "application/problem+json": { - "schema": { - "$ref": "#/components/schemas/ProblemDetails" - } - } - } - }, - "412": { - "description": "The supplied If-Match header did not match the current Revision value for the dialog. The request was not applied.", - "content": { - "application/problem+json": { - "schema": { - "$ref": "#/components/schemas/ProblemDetails" - } - } - } - } - }, - "security": [ - { - "JWTBearerAuth": [] - } - ] - } - }, - "/api/v1/serviceowner/dialogs/{dialogId}/activities": { - "get": { - "tags": [ - "Serviceowner" - ], - "summary": "Gets a list of dialog activities", - "description": "Gets the list of activities belonging to a dialog", - "operationId": "V1ServiceOwnerDialogActivitiesSearch_SearchDialogActivity", - "parameters": [ - { - "name": "dialogId", - "in": "path", - "required": true, - "schema": { - "type": "string", - "format": "guid" - } - } - ], - "responses": { - "200": { - "description": "Successfully returned the dialog activity list.", - "content": { - "application/json": { - "schema": { - "type": "array", - "items": { - "$ref": "#/components/schemas/V1ServiceOwnerDialogActivitiesQueriesSearch_Activity" - } - } - } - } - }, - "401": { - "description": "Missing or invalid authentication token. Requires a Maskinporten-token with the scope \"digdir:dialogporten.serviceprovider\"." - }, - "403": { - "description": "Unauthorized to get the supplied dialog (not owned by authenticated organization or has additional scope requirements defined in policy)." - } - }, - "security": [ - { - "JWTBearerAuth": [] - } - ] - }, - "post": { - "tags": [ - "Serviceowner" - ], - "summary": "Adds a activity to a dialogs activity history", - "description": "The activity is created with the given configuration. For more information see the documentation (link TBD).\n\nOptimistic 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.", - "operationId": "V1ServiceOwnerDialogActivitiesCreate_DialogActivity", - "parameters": [ - { - "name": "dialogId", - "in": "path", - "required": true, - "schema": { - "type": "string", - "format": "guid" - } - }, - { - "name": "if-Match", - "in": "header", - "schema": { - "type": "string", - "format": "guid", - "nullable": true - } - } - ], - "requestBody": { - "x-name": "CreateActivityRequest", - "description": "", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/V1ServiceOwnerDialogActivitiesCreate_ActivityRequest" - } - } - }, - "required": true, - "x-position": 1 - }, - "responses": { - "201": { - "description": "The UUID of the created dialog activity. A relative URL to the newly created activity is set in the \"Location\" header.", - "headers": { - "Etag": { - "description": "The new UUID ETag of the dialog", - "schema": { - "title": "System_String", - "type": "string" - }, - "example": "123e4567-e89b-12d3-a456-426614174000" - } - }, - "content": { - "application/json": { - "schema": { - "type": "string" - }, - "example": "018bb8e5-d9d0-7434-8ec5-569a6c8e01fc" - } - } - }, - "204": { - "description": "No Content" - }, - "400": { - "description": "Validation error occured. See problem details for a list of errors.", - "content": { - "application/problem+json": { - "schema": { - "$ref": "#/components/schemas/ProblemDetails" - } - } - } - }, - "401": { - "description": "Missing or invalid authentication token. Requires a Maskinporten-token with the scope \"digdir:dialogporten.serviceprovider\"." - }, - "403": { - "description": "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": { - "description": "The given dialog ID was not found or is already deleted.", - "content": { - "application/problem+json": { - "schema": { - "$ref": "#/components/schemas/ProblemDetails" - } - } - } - }, - "410": { - "description": "Entity with the given key(s) is removed." - }, - "412": { - "description": "The supplied If-Match header did not match the current Revision value for the dialog. The request was not applied.", - "content": { - "application/problem+json": { - "schema": { - "$ref": "#/components/schemas/ProblemDetails" - } - } - } - }, - "422": { - "description": "Domain error occured. See problem details for a list of errors.", - "content": { - "application/problem+json": { - "schema": { - "$ref": "#/components/schemas/ProblemDetails" - } - } - } - } - }, - "security": [ - { - "JWTBearerAuth": [] - } - ] - } - }, - "/api/v1/serviceowner/dialogs/{dialogId}/actions/should-send-notification": { - "get": { - "tags": [ - "Serviceowner" - ], - "summary": "Returns a boolean value based on conditions used to determine if a notification is to be sent", - "description": "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.", - "operationId": "V1ServiceOwnerDialogActivitiesNotificationCondition_NotificationCondition", - "parameters": [ - { - "name": "dialogId", - "in": "path", - "required": true, - "schema": { - "type": "string", - "format": "guid" - } - }, - { - "name": "conditionType", - "in": "query", - "required": true, - "schema": { - "allOf": [ - { - "$ref": "#/components/schemas/V1ServiceOwnerDialogActivitiesQueriesNotificationCondition_NotificationConditionType" - } - ] - } - }, - { - "name": "activityType", - "in": "query", - "required": true, - "schema": { - "allOf": [ - { - "$ref": "#/components/schemas/DialogsEntitiesActivities_DialogActivityType" - } - ] - } - }, - { - "name": "transmissionId", - "in": "query", - "schema": { - "type": "string", - "format": "guid", - "nullable": true - } - } - ], - "responses": { - "200": { - "description": "Successfully returned the notification determination.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/V1ServiceOwnerDialogActivitiesQueriesNotificationCondition_NotificationCondition" - } - } - } - }, - "401": { - "description": "Missing or invalid authentication token. Requires a Maskinporten-token with the scope \"altinn:system/notifications.condition.check\"." - }, - "403": { - "description": "Forbidden" - } - }, - "security": [ - { - "JWTBearerAuth": [] - } - ] - } - }, - "/api/v1/serviceowner/dialogs/{dialogId}/activities/{activityId}": { - "get": { - "tags": [ - "Serviceowner" - ], - "summary": "Gets a single dialog activity", - "description": "Gets a single activity belonging to a dialog. For more information see the documentation (link TBD).", - "operationId": "V1ServiceOwnerDialogActivitiesGet_GetDialogActivity", - "parameters": [ - { - "name": "dialogId", - "in": "path", - "required": true, - "schema": { - "type": "string", - "format": "guid" - } - }, - { - "name": "activityId", - "in": "path", - "required": true, - "schema": { - "type": "string", - "format": "guid" - } - } - ], - "responses": { - "200": { - "description": "Successfully returned the dialog activity.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/V1ServiceOwnerDialogActivitiesQueriesGet_Activity" - } - } - } - }, - "401": { - "description": "Missing or invalid authentication token. Requires a Maskinporten-token with the scope \"digdir:dialogporten.serviceprovider\"." - }, - "403": { - "description": "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": { - "description": "The given dialog ID was not found or was deleted, or the given activity ID was not found.", - "content": { - "application/problem+json": { - "schema": { - "$ref": "#/components/schemas/ProblemDetails" - } - } - } - }, - "410": { - "description": "Entity with the given key(s) is removed." - } - }, - "security": [ - { - "JWTBearerAuth": [] - } - ] - } - }, - "/api/v1/enduser/parties": { - "get": { - "tags": [ - "Enduser" - ], - "summary": "Gets the list of authorized parties for the end user", - "description": "Gets the list of authorized parties for the end user. For more information see the documentation (link TBD).", - "operationId": "V1EndUserPartiesGet_GetParties", - "responses": { - "200": { - "description": "The list of authorized parties for the end user", - "content": { - "application/json": { - "schema": { - "type": "array", - "items": { - "$ref": "#/components/schemas/V1EndUserPartiesQueriesGet_Parties" - } - } - } - } - }, - "401": { - "description": "Unauthorized" - }, - "403": { - "description": "Forbidden" - } - }, - "security": [ - { - "JWTBearerAuth": [] - } - ] - } - }, - "/api/v1/enduser/dialogs/{dialogId}/transmissions": { - "get": { - "tags": [ - "Enduser" - ], - "summary": "Gets a list of dialog transmissions", - "description": "Gets the list of transmissions belonging to a dialog", - "operationId": "V1EndUserDialogTransmissionsSearch_SearchDialogTransmission", - "parameters": [ - { - "name": "dialogId", - "in": "path", - "required": true, - "schema": { - "type": "string", - "format": "guid" - } - } - ], - "responses": { - "200": { - "description": "Successfully returned the dialog transmission list.", - "content": { - "application/json": { - "schema": { - "type": "array", - "items": { - "$ref": "#/components/schemas/V1EndUserDialogTransmissionsQueriesSearch_Transmission" - } - } - } - } - }, - "401": { - "description": "Missing or invalid authentication token. Requires a Maskinporten-token with the scope \"digdir:dialogporten\"." - }, - "403": { - "description": "Unauthorized to get the supplied dialog (not owned by authenticated organization or has additional scope requirements defined in policy)." - } - }, - "security": [ - { - "JWTBearerAuth": [] - } - ] - } - }, - "/api/v1/enduser/dialogs/{dialogId}/transmissions/{transmissionId}": { - "get": { - "tags": [ - "Enduser" - ], - "summary": "Gets a single dialog transmission", - "description": "Gets a single transmission belonging to a dialog. For more information see the documentation (link TBD).", - "operationId": "V1EndUserDialogTransmissionsGet_GetDialogTransmission", - "parameters": [ - { - "name": "dialogId", - "in": "path", - "required": true, - "schema": { - "type": "string", - "format": "guid" - } - }, - { - "name": "transmissionId", - "in": "path", - "required": true, - "schema": { - "type": "string", - "format": "guid" - } - } - ], - "responses": { - "200": { - "description": "Successfully returned the dialog transmission.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/V1EndUserDialogTransmissionsQueriesGet_Transmission" - } - } - } - }, - "401": { - "description": "Missing or invalid authentication token. Requires a Maskinporten-token with the scope \"digdir:dialogporten\"." - }, - "403": { - "description": "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": { - "description": "The given dialog ID was not found or was deleted, or the given transmission ID was not found.", - "content": { - "application/problem+json": { - "schema": { - "$ref": "#/components/schemas/ProblemDetails" - } - } - } - } - }, - "security": [ - { - "JWTBearerAuth": [] - } - ] - } - }, - "/api/v1/enduser/dialogs/{dialogId}/systemlabels": { - "put": { - "tags": [ - "Enduser" - ], - "operationId": "V1EndUserDialogSystemLabelsSet_SetDialogSystemLabel", - "parameters": [ - { - "name": "dialogId", - "in": "path", - "required": true, - "schema": { - "type": "string", - "format": "guid" - } - } - ], - "requestBody": { - "x-name": "SystemLabelCommand", - "description": "", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/V1EndUserDialogSystemLabelsCommandsSet_SystemLabelCommand" - } - } - }, - "required": true, - "x-position": 1 - }, - "responses": { - "204": { - "description": "No Content" - }, - "400": { - "description": "Bad Request", - "content": { - "application/problem+json": { - "schema": { - "$ref": "#/components/schemas/ProblemDetails" - } - } - } - }, - "401": { - "description": "Unauthorized" - }, - "403": { - "description": "Forbidden" - }, - "404": { - "description": "Not Found", - "content": { - "application/problem+json": { - "schema": { - "$ref": "#/components/schemas/ProblemDetails" - } - } - } - }, - "410": { - "description": "" - }, - "412": { - "description": "", - "content": { - "application/problem+json": { - "schema": { - "$ref": "#/components/schemas/ProblemDetails" - } - } - } - }, - "422": { - "description": "", - "content": { - "application/problem+json": { - "schema": { - "$ref": "#/components/schemas/ProblemDetails" - } - } - } - } - }, - "security": [ - { - "JWTBearerAuth": [] - } - ] - } - }, - "/api/v1/enduser/dialogs/{dialogId}/seenlog": { - "get": { - "tags": [ - "Enduser" - ], - "summary": "Gets all seen log records for a dialog", - "description": "Gets all seen log records for a dialog. For more information see the documentation (link TBD).", - "operationId": "V1EndUserDialogSeenLogsSearch_SearchDialogSeenLog", - "parameters": [ - { - "name": "dialogId", - "in": "path", - "required": true, - "schema": { - "type": "string", - "format": "guid" - } - } - ], - "responses": { - "200": { - "description": "Successfully returned the dialog seen log records.", - "content": { - "application/json": { - "schema": { - "type": "array", - "items": { - "$ref": "#/components/schemas/V1EndUserDialogSeenLogsQueriesSearch_SeenLog" - } - } - } - } - }, - "401": { - "description": "Missing or invalid authentication token. Requires a Maskinporten-token with the scope \"digdir:dialogporten\"." - }, - "403": { - "description": "Forbidden" - }, - "404": { - "description": "Not Found", - "content": { - "application/problem+json": { - "schema": { - "$ref": "#/components/schemas/ProblemDetails" - } - } - } - } - }, - "security": [ - { - "JWTBearerAuth": [] - } - ] - } - }, - "/api/v1/enduser/dialogs/{dialogId}/seenlog/{seenLogId}": { - "get": { - "tags": [ - "Enduser" - ], - "summary": "Gets a single dialog seen log record", - "description": "Gets a single dialog seen log record. For more information see the documentation (link TBD).", - "operationId": "V1EndUserDialogSeenLogsGet_GetDialogSeenLog", - "parameters": [ - { - "name": "dialogId", - "in": "path", - "required": true, - "schema": { - "type": "string", - "format": "guid" - } - }, - { - "name": "seenLogId", - "in": "path", - "required": true, - "schema": { - "type": "string", - "format": "guid" - } - } - ], - "responses": { - "200": { - "description": "Successfully returned the dialog seen log record.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/V1EndUserDialogSeenLogsQueriesGet_SeenLog" - } - } - } - }, - "401": { - "description": "Missing or invalid authentication token. Requires a Maskinporten-token with the scope \"digdir:dialogporten\"." - }, - "403": { - "description": "Forbidden" - }, - "404": { - "description": "Not Found", - "content": { - "application/problem+json": { - "schema": { - "$ref": "#/components/schemas/ProblemDetails" - } - } - } - } - }, - "security": [ - { - "JWTBearerAuth": [] - } - ] - } - }, - "/api/v1/enduser/dialogs": { - "get": { - "tags": [ - "Enduser" - ], - "summary": "Gets a list of dialogs", - "description": "Performs a search for dialogs, returning a paginated list of dialogs. For more information see the documentation (link TBD).\n\n* All date parameters must contain explicit time zone. Example: 2023-10-27T10:00:00Z or 2023-10-27T10:00:00+01:00\n* See \"continuationToken\" in the response for how to get the next page of results.\n* hasNextPage will be set to true if there are more items to get.", - "operationId": "V1EndUserDialogsSearch_SearchDialog", - "parameters": [ - { - "name": "org", - "in": "query", - "style": "form", - "explode": true, - "description": "Filter by one or more service owner codes", - "schema": { - "type": "array", - "nullable": true, - "items": { - "type": "string" - } - } - }, - { - "name": "serviceResource", - "in": "query", - "style": "form", - "explode": true, - "description": "Filter by one or more service resources", - "schema": { - "type": "array", - "nullable": true, - "items": { - "type": "string" - } - } - }, - { - "name": "party", - "in": "query", - "style": "form", - "explode": true, - "description": "Filter by one or more owning parties", - "schema": { - "type": "array", - "nullable": true, - "items": { - "type": "string" - } - } - }, - { - "name": "extendedStatus", - "in": "query", - "style": "form", - "explode": true, - "description": "Filter by one or more extended statuses", - "schema": { - "type": "array", - "nullable": true, - "items": { - "type": "string" - } - } - }, - { - "name": "externalReference", - "in": "query", - "description": "Filter by external reference", - "schema": { - "type": "string", - "nullable": true - } - }, - { - "name": "status", - "in": "query", - "style": "form", - "explode": true, - "description": "Filter by status", - "schema": { - "type": "array", - "nullable": true, - "items": { - "$ref": "#/components/schemas/DialogsEntities_DialogStatus" - } - } - }, - { - "name": "createdAfter", - "in": "query", - "description": "Only return dialogs created after this date", - "schema": { - "type": "string", - "format": "date-time", - "nullable": true - } - }, - { - "name": "createdBefore", - "in": "query", - "description": "Only return dialogs created before this date", - "schema": { - "type": "string", - "format": "date-time", - "nullable": true - } - }, - { - "name": "updatedAfter", - "in": "query", - "description": "Only return dialogs updated after this date", - "schema": { - "type": "string", - "format": "date-time", - "nullable": true - } - }, - { - "name": "updatedBefore", - "in": "query", - "description": "Only return dialogs updated before this date", - "schema": { - "type": "string", - "format": "date-time", - "nullable": true - } - }, - { - "name": "dueAfter", - "in": "query", - "description": "Only return dialogs with due date after this date", - "schema": { - "type": "string", - "format": "date-time", - "nullable": true - } - }, - { - "name": "dueBefore", - "in": "query", - "description": "Only return dialogs with due date before this date", - "schema": { - "type": "string", - "format": "date-time", - "nullable": true - } - }, - { - "name": "process", - "in": "query", - "description": "Filter by process", - "schema": { - "type": "string", - "nullable": true - } - }, - { - "name": "systemLabel", - "in": "query", - "style": "form", - "explode": true, - "description": "Filter by Display state", - "schema": { - "type": "array", - "nullable": true, - "items": { - "$ref": "#/components/schemas/DialogEndUserContextsEntities_SystemLabel" - } - } - }, - { - "name": "search", - "in": "query", - "description": "Search string for free text search. Will attempt to fuzzily match in all free text fields in the aggregate", - "schema": { - "type": "string", - "nullable": true - } - }, - { - "name": "searchLanguageCode", - "in": "query", - "description": "Limit free text search to texts with this language code, e.g. 'nb', 'en'. Culture codes will be normalized to neutral language codes (ISO 639). Default: search all culture codes", - "schema": { - "type": "string", - "nullable": true - } - }, - { - "name": "orderBy", - "in": "query", - "schema": { - "nullable": true, - "oneOf": [ - { - "$ref": "#/components/schemas/OrderSetOfTOrderDefinitionAndTTarget" - } - ] - } - }, - { - "name": "continuationToken", - "in": "query", - "description": "Supply \"continuationToken\" for the response to get the next page of results, if hasNextPage is true", - "schema": { - "nullable": true, - "oneOf": [ - { - "$ref": "#/components/schemas/ContinuationTokenSetOfTOrderDefinitionAndTTarget" - } - ] - } - }, - { - "name": "limit", - "in": "query", - "description": "Limit the number of results per page (1-1000, default: 100)", - "schema": { - "type": "integer", - "format": "int32", - "nullable": true - } - } - ], - "responses": { - "200": { - "description": "Successfully returned the dialog list.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/PaginatedListOfV1EndUserDialogsQueriesSearch_Dialog" - } - } - } - }, - "401": { - "description": "Missing or invalid authentication token. Requires a Maskinporten-token with the scope \"digdir:dialogporten\"." - } - }, - "security": [ - { - "JWTBearerAuth": [] - } - ] - } - }, - "/api/v1/enduser/dialogs/{dialogId}": { - "get": { - "tags": [ - "Enduser" - ], - "summary": "Gets a single dialog", - "description": "Gets a single dialog aggregate. For more information see the documentation (link TBD).", - "operationId": "V1EndUserDialogsGet_GetDialog", - "parameters": [ - { - "name": "dialogId", - "in": "path", - "required": true, - "schema": { - "type": "string", - "format": "guid" - } - } - ], - "responses": { - "200": { - "description": "Successfully returned the dialog aggregate.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/V1EndUserDialogsQueriesGet_Dialog" - } - } - } - }, - "401": { - "description": "Missing or invalid authentication token. Requires a Maskinporten-token with the scope \"digdir:dialogporten\"." - }, - "403": { - "description": "Unauthorized to get the supplied dialog (not owned by authenticated organization or has additional scope requirements defined in policy)." - }, - "404": { - "description": "The given dialog ID was not found or is already deleted.", - "content": { - "application/problem+json": { - "schema": { - "$ref": "#/components/schemas/ProblemDetails" - } - } - } - } - }, - "security": [ - { - "JWTBearerAuth": [] - } - ] - } - }, - "/api/v1/enduser/dialogs/{dialogId}/labellog": { - "get": { - "tags": [ - "Enduser" - ], - "operationId": "V1EndUserDialogLabelAssignmentLogsSearch_SearchDialogLabelAssignmentLog", - "parameters": [ - { - "name": "dialogId", - "in": "path", - "required": true, - "schema": { - "type": "string", - "format": "guid" - } - } - ], - "responses": { - "200": { - "description": "Success", - "content": { - "application/json": { - "schema": { - "type": "array", - "items": { - "$ref": "#/components/schemas/V1EndUserDialogLabelAssignmentLogQueriesSearch_LabelAssignmentLog" - } - } - } - } - }, - "401": { - "description": "Unauthorized" - }, - "403": { - "description": "Forbidden" - }, - "404": { - "description": "Not Found", - "content": { - "application/problem+json": { - "schema": { - "$ref": "#/components/schemas/ProblemDetails" - } - } - } - }, - "410": { - "description": "" - } - }, - "security": [ - { - "JWTBearerAuth": [] - } - ] - } - }, - "/api/v1/enduser/dialogs/{dialogId}/activities": { - "get": { - "tags": [ - "Enduser" - ], - "summary": "Gets a list of dialog activities", - "description": "Gets the list of activities belonging to a dialog", - "operationId": "V1EndUserDialogActivitiesSearch_SearchDialogActivity", - "parameters": [ - { - "name": "dialogId", - "in": "path", - "required": true, - "schema": { - "type": "string", - "format": "guid" - } - } - ], - "responses": { - "200": { - "description": "Successfully returned the dialog activity list.", - "content": { - "application/json": { - "schema": { - "type": "array", - "items": { - "$ref": "#/components/schemas/V1EndUserDialogActivitiesQueriesSearch_Activity" - } - } - } - } - }, - "401": { - "description": "Missing or invalid authentication token. Requires a Maskinporten-token with the scope \"digdir:dialogporten\"." - }, - "403": { - "description": "Unauthorized to get the supplied dialog (not owned by authenticated organization or has additional scope requirements defined in policy)." - } - }, - "security": [ - { - "JWTBearerAuth": [] - } - ] - } - }, - "/api/v1/enduser/dialogs/{dialogId}/activities/{activityId}": { - "get": { - "tags": [ - "Enduser" - ], - "summary": "Gets a single dialog activity", - "description": "Gets a single activity belonging to a dialog. For more information see the documentation (link TBD).", - "operationId": "V1EndUserDialogActivitiesGet_GetDialogActivity", - "parameters": [ - { - "name": "dialogId", - "in": "path", - "required": true, - "schema": { - "type": "string", - "format": "guid" - } - }, - { - "name": "activityId", - "in": "path", - "required": true, - "schema": { - "type": "string", - "format": "guid" - } - } - ], - "responses": { - "200": { - "description": "Successfully returned the dialog activity.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/V1EndUserDialogActivitiesQueriesGet_Activity" - } - } - } - }, - "401": { - "description": "Missing or invalid authentication token. Requires a Maskinporten-token with the scope \"digdir:dialogporten\"." - }, - "403": { - "description": "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": { - "description": "The given dialog ID was not found or was deleted, or the given activity ID was not found.", - "content": { - "application/problem+json": { - "schema": { - "$ref": "#/components/schemas/ProblemDetails" - } - } - } - } - }, - "security": [ - { - "JWTBearerAuth": [] - } - ] - } - } - }, - "components": { - "schemas": { - "V1WellKnownOauthAuthorizationServerQueriesGet_GetOauthAuthorizationServer": { - "type": "object", - "additionalProperties": false, - "properties": { - "issuer": { - "type": "string" - }, - "jwks_uri": { - "type": "string" - } - } - }, - "V1WellKnownJwksQueriesGet_GetJwks": { - "type": "object", - "additionalProperties": false, - "properties": { - "keys": { - "type": "array", - "items": { - "$ref": "#/components/schemas/V1WellKnownJwksQueriesGet_Jwk" - } - } - } - }, - "V1WellKnownJwksQueriesGet_Jwk": { - "type": "object", - "additionalProperties": false, - "properties": { - "kty": { - "type": "string" - }, - "use": { - "type": "string" - }, - "kid": { - "type": "string" - }, - "crv": { - "type": "string" - }, - "x": { - "type": "string" - }, - "alg": { - "type": "string" - } - } - }, - "V1ServiceOwnerDialogTransmissionsQueriesSearch_Transmission": { - "type": "object", - "additionalProperties": false, - "properties": { - "id": { - "type": "string", - "description": "The unique identifier for the transmission in UUIDv7 format.", - "format": "guid" - }, - "createdAt": { - "type": "string", - "description": "The date and time when the transmission was created.", - "format": "date-time" - }, - "authorizationAttribute": { - "type": "string", - "description": "The authorization attribute associated with the transmission.", - "nullable": true - }, - "extendedType": { - "type": "string", - "description": "The extended type URI for the transmission.", - "format": "uri", - "nullable": true - }, - "relatedTransmissionId": { - "type": "string", - "description": "The unique identifier for the related transmission, if any.", - "format": "guid", - "nullable": true - }, - "deletedAt": { - "type": "string", - "description": "The date and time when the transmission was deleted, if applicable.", - "format": "date-time", - "nullable": true - }, - "type": { - "description": "The type of the transmission.", - "oneOf": [ - { - "$ref": "#/components/schemas/DialogsEntitiesTransmissions_DialogTransmissionType" - } - ] - }, - "sender": { - "description": "The sender actor information for the transmission.", - "oneOf": [ - { - "$ref": "#/components/schemas/V1ServiceOwnerCommonActors_Actor" - } - ] - }, - "content": { - "description": "The content of the transmission.", - "oneOf": [ - { - "$ref": "#/components/schemas/V1ServiceOwnerDialogTransmissionsQueriesSearch_Content" - } - ] - }, - "attachments": { - "type": "array", - "description": "The attachments associated with the transmission.", - "items": { - "$ref": "#/components/schemas/V1ServiceOwnerDialogTransmissionsQueriesSearch_Attachment" - } - } - } - }, - "DialogsEntitiesTransmissions_DialogTransmissionType": { - "type": "string", - "description": "", - "x-enumNames": [ - "Information", - "Acceptance", - "Rejection", - "Request", - "Alert", - "Decision", - "Submission", - "Correction" - ], - "enum": [ - "Information", - "Acceptance", - "Rejection", - "Request", - "Alert", - "Decision", - "Submission", - "Correction" - ] - }, - "V1ServiceOwnerCommonActors_Actor": { - "type": "object", - "additionalProperties": false, - "properties": { - "actorType": { - "description": "The type of actor that sent the transmission.", - "oneOf": [ - { - "$ref": "#/components/schemas/Actors_ActorType" - } - ] - }, - "actorName": { - "type": "string", - "description": "Specifies the name of the entity that sent the transmission. Mutually exclusive with ActorId. If ActorId\nis supplied, the name will be automatically populated from the name registries.", - "nullable": true, - "example": "Ola Nordmann" - }, - "actorId": { - "type": "string", - "description": "The identifier of the person or organization that sent the transmission. Mutually exclusive with ActorName.\nMight be omitted if ActorType is \"ServiceOwner\".", - "nullable": true, - "example": "urn:altinn:person:identifier-no:12018212345" - } - } - }, - "Actors_ActorType": { - "type": "string", - "description": "", - "x-enumNames": [ - "PartyRepresentative", - "ServiceOwner" - ], - "enum": [ - "PartyRepresentative", - "ServiceOwner" - ] - }, - "V1ServiceOwnerDialogTransmissionsQueriesSearch_Content": { - "type": "object", - "additionalProperties": false, - "properties": { - "title": { - "description": "The title of the content.", - "oneOf": [ - { - "$ref": "#/components/schemas/V1CommonContent_ContentValue" - } - ] - }, - "summary": { - "description": "The summary of the content.", - "oneOf": [ - { - "$ref": "#/components/schemas/V1CommonContent_ContentValue" - } - ] - }, - "contentReference": { - "description": "Front-channel embedded content. Used to dynamically embed content in the frontend from an external URL.", - "nullable": true, - "oneOf": [ - { - "$ref": "#/components/schemas/V1CommonContent_ContentValue" - } - ] - } - } - }, - "V1CommonContent_ContentValue": { - "type": "object", - "additionalProperties": false, - "properties": { - "value": { - "type": "array", - "description": "A list of localizations for the content.", - "items": { - "$ref": "#/components/schemas/V1CommonLocalizations_Localization" - } - }, - "mediaType": { - "type": "string", - "description": "Media type of the content, this can also indicate that the content is embeddable.\nFor a list of supported media types, see (link TBD)." - } - } - }, - "V1CommonLocalizations_Localization": { - "type": "object", - "additionalProperties": false, - "properties": { - "value": { - "type": "string", - "description": "The localized text or URI reference." - }, - "languageCode": { - "type": "string", - "description": "The language code of the localization in ISO 639-1 format.", - "example": "nb" - } - } - }, - "V1ServiceOwnerDialogTransmissionsQueriesSearch_Attachment": { - "type": "object", - "additionalProperties": false, - "properties": { - "id": { - "type": "string", - "description": "The unique identifier for the attachment in UUIDv7 format.", - "format": "guid" - }, - "displayName": { - "type": "array", - "description": "The display name of the attachment that should be used in GUIs.", - "items": { - "$ref": "#/components/schemas/V1CommonLocalizations_Localization" - } - }, - "urls": { - "type": "array", - "description": "The URLs associated with the attachment, each referring to a different representation of the attachment.", - "items": { - "$ref": "#/components/schemas/V1ServiceOwnerDialogTransmissionsQueriesSearch_AttachmentUrl" - } - } - } - }, - "V1ServiceOwnerDialogTransmissionsQueriesSearch_AttachmentUrl": { - "type": "object", - "additionalProperties": false, - "properties": { - "id": { - "type": "string", - "description": "The unique identifier for the attachment URL in UUIDv7 format.", - "format": "guid" - }, - "url": { - "type": "string", - "description": "The fully qualified URL of the attachment. Will be set to \"urn:dialogporten:unauthorized\" if the user is\nnot authorized to access the transmission.", - "format": "uri", - "example": "https://someendpoint.com/someattachment.pdf\nurn:dialogporten:unauthorized" - }, - "mediaType": { - "type": "string", - "description": "The media type of the attachment.", - "nullable": true, - "example": "application/pdf\napplication/zip" - }, - "consumerType": { - "description": "The type of consumer the URL is intended for.", - "oneOf": [ - { - "$ref": "#/components/schemas/Attachments_AttachmentUrlConsumerType" - } - ] - } - } - }, - "Attachments_AttachmentUrlConsumerType": { - "type": "string", - "description": "", - "x-enumNames": [ - "Gui", - "Api" - ], - "enum": [ - "Gui", - "Api" - ] - }, - "V1ServiceOwnerDialogTransmissionsQueriesGet_Transmission": { - "type": "object", - "additionalProperties": false, - "properties": { - "id": { - "type": "string", - "description": "The unique identifier for the transmission in UUIDv7 format.", - "format": "guid" - }, - "createdAt": { - "type": "string", - "description": "The date and time when the transmission was created.", - "format": "date-time" - }, - "authorizationAttribute": { - "type": "string", - "description": "The authorization attribute associated with the transmission.", - "nullable": true - }, - "extendedType": { - "type": "string", - "description": "The extended type URI for the transmission.", - "format": "uri", - "nullable": true - }, - "relatedTransmissionId": { - "type": "string", - "description": "The unique identifier for the related transmission, if any.", - "format": "guid", - "nullable": true - }, - "deletedAt": { - "type": "string", - "description": "The date and time when the transmission was deleted, if applicable.", - "format": "date-time", - "nullable": true - }, - "type": { - "description": "The type of the transmission.", - "oneOf": [ - { - "$ref": "#/components/schemas/DialogsEntitiesTransmissions_DialogTransmissionType" - } - ] - }, - "sender": { - "description": "The sender actor information for the transmission.", - "oneOf": [ - { - "$ref": "#/components/schemas/V1ServiceOwnerCommonActors_Actor" - } - ] - }, - "content": { - "description": "The content of the transmission.", - "oneOf": [ - { - "$ref": "#/components/schemas/V1ServiceOwnerDialogTransmissionsQueriesGet_Content" - } - ] - }, - "attachments": { - "type": "array", - "description": "The attachments associated with the transmission.", - "items": { - "$ref": "#/components/schemas/V1ServiceOwnerDialogTransmissionsQueriesGet_Attachment" - } - } - } - }, - "ProblemDetails": { - "type": "object", - "additionalProperties": false, - "properties": { - "type": { - "type": "string", - "default": "https://www.rfc-editor.org/rfc/rfc7231#section-6.5.1" - }, - "title": { - "type": "string", - "default": "One or more validation errors occurred." - }, - "status": { - "type": "integer", - "format": "int32", - "default": 400 - }, - "instance": { - "type": "string", - "default": "/api/route" - }, - "traceId": { - "type": "string", - "default": "0HMPNHL0JHL76:00000001" - }, - "detail": { - "type": "string", - "nullable": true - }, - "errors": { - "type": "array", - "items": { - "$ref": "#/components/schemas/ProblemDetails_Error" - } - } - } - }, - "ProblemDetails_Error": { - "type": "object", - "additionalProperties": false, - "properties": { - "name": { - "type": "string", - "default": "Error or field name" - }, - "reason": { - "type": "string", - "default": "Error reason" - }, - "code": { - "type": "string", - "nullable": true - }, - "severity": { - "type": "string", - "nullable": true - } - } - }, - "V1ServiceOwnerDialogTransmissionsQueriesGet_Content": { - "type": "object", - "additionalProperties": false, - "properties": { - "title": { - "description": "The title of the content.", - "oneOf": [ - { - "$ref": "#/components/schemas/V1CommonContent_ContentValue" - } - ] - }, - "summary": { - "description": "The summary of the content.", - "oneOf": [ - { - "$ref": "#/components/schemas/V1CommonContent_ContentValue" - } - ] - }, - "contentReference": { - "description": "Front-channel embedded content. Used to dynamically embed content in the frontend from an external URL.\nAllowed media types: application/vnd.dialogporten.frontchannelembed+json;type=markdown", - "nullable": true, - "oneOf": [ - { - "$ref": "#/components/schemas/V1CommonContent_ContentValue" - } - ] - } - } - }, - "V1ServiceOwnerDialogTransmissionsQueriesGet_Attachment": { - "type": "object", - "additionalProperties": false, - "properties": { - "id": { - "type": "string", - "description": "The unique identifier for the attachment in UUIDv7 format.", - "format": "guid" - }, - "displayName": { - "type": "array", - "description": "The display name of the attachment that should be used in GUIs.", - "items": { - "$ref": "#/components/schemas/V1CommonLocalizations_Localization" - } - }, - "urls": { - "type": "array", - "description": "The URLs associated with the attachment, each referring to a different representation of the attachment.", - "items": { - "$ref": "#/components/schemas/V1ServiceOwnerDialogTransmissionsQueriesGet_AttachmentUrl" - } - } - } - }, - "V1ServiceOwnerDialogTransmissionsQueriesGet_AttachmentUrl": { - "type": "object", - "additionalProperties": false, - "properties": { - "id": { - "type": "string", - "description": "The unique identifier for the attachment URL in UUIDv7 format.", - "format": "guid" - }, - "url": { - "type": "string", - "description": "The fully qualified URL of the attachment. Will be set to \"urn:dialogporten:unauthorized\" if the user is\nnot authorized to access the transmission.", - "format": "uri", - "example": "https://someendpoint.com/someattachment.pdf\nurn:dialogporten:unauthorized" - }, - "mediaType": { - "type": "string", - "description": "The media type of the attachment.", - "nullable": true, - "example": "application/pdf\napplication/zip" - }, - "consumerType": { - "description": "The type of consumer the URL is intended for.", - "oneOf": [ - { - "$ref": "#/components/schemas/Attachments_AttachmentUrlConsumerType" - } - ] - } - } - }, - "V1ServiceOwnerDialogTransmissionsCreate_TransmissionRequest": { - "type": "object", - "additionalProperties": false, - "properties": { - "id": { - "type": "string", - "description": "The UUDIv7 of the action may be provided to support idempotent additions to the list of transmissions.\nIf not supplied, a new UUIDv7 will be generated.", - "format": "guid", - "nullable": true, - "example": "01913cd5-784f-7d3b-abef-4c77b1f0972d" - }, - "createdAt": { - "type": "string", - "description": "If supplied, overrides the creating date and time for the transmission.\nIf not supplied, the current date /time will be used.", - "format": "date-time" - }, - "authorizationAttribute": { - "type": "string", - "description": "Contains an authorization resource attributeId, that can used in custom authorization rules in the XACML service\npolicy, which by default is the policy belonging to the service referred to by \"serviceResource\" in the dialog.\n \nCan also be used to refer to other service policies.", - "nullable": true, - "example": "mycustomresource\n/* equivalent to the above */\nurn:altinn:subresource:mycustomresource\nurn:altinn:task:Task_1\n/* refer to another service */\nurn:altinn:resource:some-other-service-identifier" - }, - "extendedType": { - "type": "string", - "description": "Arbitrary URI/URN describing a service-specific transmission type.\n \nRefer to the service-specific documentation provided by the service owner for details (if in use).", - "format": "uri", - "nullable": true - }, - "relatedTransmissionId": { - "type": "string", - "description": "Reference to any other transmission that this transmission is related to.", - "format": "guid", - "nullable": true - }, - "type": { - "description": "The type of transmission.", - "oneOf": [ - { - "$ref": "#/components/schemas/DialogsEntitiesTransmissions_DialogTransmissionType" - } - ] - }, - "sender": { - "description": "The actor that sent the transmission.", - "oneOf": [ - { - "$ref": "#/components/schemas/V1ServiceOwnerCommonActors_Actor" - } - ] - }, - "content": { - "description": "The transmission unstructured text content.", - "oneOf": [ - { - "$ref": "#/components/schemas/V1ServiceOwnerDialogsCommandsUpdate_TransmissionContent" - } - ] - }, - "attachments": { - "type": "array", - "description": "The transmission-level attachments.", - "items": { - "$ref": "#/components/schemas/V1ServiceOwnerDialogsCommandsUpdate_TransmissionAttachment" - } - } - } - }, - "V1ServiceOwnerDialogsCommandsUpdate_TransmissionContent": { - "type": "object", - "additionalProperties": false, - "properties": { - "title": { - "description": "The transmission title. Must be text/plain.", - "oneOf": [ - { - "$ref": "#/components/schemas/V1CommonContent_ContentValue" - } - ] - }, - "summary": { - "description": "The transmission summary.", - "oneOf": [ - { - "$ref": "#/components/schemas/V1CommonContent_ContentValue" - } - ] - }, - "contentReference": { - "description": "Front-channel embedded content. Used to dynamically embed content in the frontend from an external URL. Must be HTTPS.\nAllowed media types: application/vnd.dialogporten.frontchannelembed+json;type=markdown", - "nullable": true, - "oneOf": [ - { - "$ref": "#/components/schemas/V1CommonContent_ContentValue" - } - ] - } - } - }, - "V1ServiceOwnerDialogsCommandsUpdate_TransmissionAttachment": { - "type": "object", - "additionalProperties": false, - "properties": { - "id": { - "type": "string", - "description": "A self-defined UUIDv7 may be provided to support idempotent additions of transmission attachments. If not provided, a new UUIDv7 will be generated.", - "format": "guid", - "nullable": true, - "example": "01913cd5-784f-7d3b-abef-4c77b1f0972d" - }, - "displayName": { - "type": "array", - "description": "The display name of the attachment that should be used in GUIs.", - "items": { - "$ref": "#/components/schemas/V1CommonLocalizations_Localization" - } - }, - "urls": { - "type": "array", - "description": "The URLs associated with the attachment, each referring to a different representation of the attachment.", - "items": { - "$ref": "#/components/schemas/V1ServiceOwnerDialogsCommandsUpdate_TransmissionAttachmentUrl" - } - } - } - }, - "V1ServiceOwnerDialogsCommandsUpdate_TransmissionAttachmentUrl": { - "type": "object", - "additionalProperties": false, - "properties": { - "url": { - "type": "string", - "description": "The fully qualified URL of the attachment.", - "format": "uri" - }, - "mediaType": { - "type": "string", - "description": "The media type of the attachment.", - "nullable": true, - "example": "application/pdf\napplication/zip" - }, - "consumerType": { - "description": "The type of consumer the URL is intended for.", - "oneOf": [ - { - "$ref": "#/components/schemas/Attachments_AttachmentUrlConsumerType" - } - ] - } - } - }, - "V1ServiceOwnerDialogSeenLogsQueriesSearch_SeenLog": { - "type": "object", - "additionalProperties": false, - "properties": { - "id": { - "type": "string", - "format": "guid" - }, - "seenAt": { - "type": "string", - "format": "date-time" - }, - "seenBy": { - "$ref": "#/components/schemas/V1ServiceOwnerCommonActors_Actor" - }, - "isViaServiceOwner": { - "type": "boolean", - "nullable": true - } - } - }, - "V1ServiceOwnerDialogSeenLogsQueriesGet_SeenLog": { - "type": "object", - "additionalProperties": false, - "properties": { - "id": { - "type": "string", - "format": "guid" - }, - "seenAt": { - "type": "string", - "format": "date-time" - }, - "seenBy": { - "$ref": "#/components/schemas/V1ServiceOwnerCommonActors_Actor" - }, - "isViaServiceOwner": { - "type": "boolean", - "nullable": true - } - } - }, - "V1ServiceOwnerDialogsUpdate_DialogRequest": { - "type": "object", - "additionalProperties": false, - "properties": { - "dto": { - "$ref": "#/components/schemas/V1ServiceOwnerDialogsCommandsUpdate_Dialog" - } - } - }, - "V1ServiceOwnerDialogsCommandsUpdate_Dialog": { - "type": "object", - "additionalProperties": false, - "properties": { - "progress": { - "type": "integer", - "description": "Advisory indicator of progress, represented as 1-100 percentage value. 100% representing a dialog that has come\nto a natural completion (successful or not).", - "format": "int32", - "nullable": true - }, - "extendedStatus": { - "type": "string", - "description": "Arbitrary string with a service-specific indicator of status, typically used to indicate a fine-grained state of\nthe dialog to further specify the \"status\" enum.", - "nullable": true - }, - "externalReference": { - "type": "string", - "description": "Arbitrary string with a service-specific reference to an external system or service.", - "nullable": true - }, - "visibleFrom": { - "type": "string", - "description": "The timestamp when the dialog should be made visible for authorized end users. If not provided, the dialog will be\nimmediately available.", - "format": "date-time", - "nullable": true, - "example": "2022-12-31T23:59:59Z" - }, - "dueAt": { - "type": "string", - "description": "The due date for the dialog. Dialogs past due date might be marked as such in frontends but will still be available.", - "format": "date-time", - "nullable": true, - "example": "2022-12-31T23:59:59Z" - }, - "expiresAt": { - "type": "string", - "description": "The expiration date for the dialog. This is the last date when the dialog is available for the end user.\n \nAfter this date is passed, the dialog will be considered expired and no longer available for the end user in any\nAPI. If not supplied, the dialog will be considered to never expire. This field can be changed after creation.", - "format": "date-time", - "nullable": true, - "example": "2022-12-31T23:59:59Z" - }, - "status": { - "description": "The aggregated status of the dialog.", - "oneOf": [ - { - "$ref": "#/components/schemas/DialogsEntities_DialogStatus" - } - ] - }, - "content": { - "description": "The dialog unstructured text content.", - "oneOf": [ - { - "$ref": "#/components/schemas/V1ServiceOwnerDialogsCommandsUpdate_Content" - } - ] - }, - "searchTags": { - "type": "array", - "description": "A list of words (tags) that will be used in dialog search queries. Not visible in end-user DTO.", - "items": { - "$ref": "#/components/schemas/V1ServiceOwnerDialogsCommandsUpdate_SearchTag" - } - }, - "attachments": { - "type": "array", - "description": "The attachments associated with the dialog (on an aggregate level).", - "items": { - "$ref": "#/components/schemas/V1ServiceOwnerDialogsCommandsUpdate_Attachment" - } - }, - "transmissions": { - "type": "array", - "description": "The immutable list of transmissions associated with the dialog. When updating via PUT, any transmissions\nadded here will be appended to the existing list of transmissions.", - "items": { - "$ref": "#/components/schemas/V1ServiceOwnerDialogsCommandsUpdate_Transmission" - } - }, - "guiActions": { - "type": "array", - "description": "The GUI actions associated with the dialog. Should be used in browser-based interactive frontends.", - "items": { - "$ref": "#/components/schemas/V1ServiceOwnerDialogsCommandsUpdate_GuiAction" - } - }, - "apiActions": { - "type": "array", - "description": "The API actions associated with the dialog. Should be used in specialized, non-browser-based integrations.", - "items": { - "$ref": "#/components/schemas/V1ServiceOwnerDialogsCommandsUpdate_ApiAction" - } - }, - "activities": { - "type": "array", - "description": "An immutable list of activities associated with the dialog. When updating via PUT, any activities added here\nwill be appended to the existing list of activities.", - "items": { - "$ref": "#/components/schemas/V1ServiceOwnerDialogsCommandsUpdate_Activity" - } - } - } - }, - "DialogsEntities_DialogStatus": { - "type": "string", - "description": "", - "x-enumNames": [ - "New", - "InProgress", - "Draft", - "Sent", - "RequiresAttention", - "Completed" - ], - "enum": [ - "New", - "InProgress", - "Draft", - "Sent", - "RequiresAttention", - "Completed" - ] - }, - "V1ServiceOwnerDialogsCommandsUpdate_Content": { - "type": "object", - "additionalProperties": false, - "properties": { - "title": { - "description": "The title of the dialog. Must be text/plain.", - "oneOf": [ - { - "$ref": "#/components/schemas/V1CommonContent_ContentValue" - } - ] - }, - "summary": { - "description": "A short summary of the dialog and its current state. Must be text/plain.", - "oneOf": [ - { - "$ref": "#/components/schemas/V1CommonContent_ContentValue" - } - ] - }, - "senderName": { - "description": "Overridden sender name. If not supplied, assume \"org\" as the sender name. Must be text/plain if supplied.", - "nullable": true, - "oneOf": [ - { - "$ref": "#/components/schemas/V1CommonContent_ContentValue" - } - ] - }, - "additionalInfo": { - "description": "Additional information about the dialog, this may contain Markdown.", - "nullable": true, - "oneOf": [ - { - "$ref": "#/components/schemas/V1CommonContent_ContentValue" - } - ] - }, - "extendedStatus": { - "description": "Used as the human-readable label used to describe the \"ExtendedStatus\" field. Must be text/plain.", - "nullable": true, - "oneOf": [ - { - "$ref": "#/components/schemas/V1CommonContent_ContentValue" - } - ] - }, - "mainContentReference": { - "description": "Front-channel embedded content. Used to dynamically embed content in the frontend from an external URL. Must be HTTPS.", - "nullable": true, - "oneOf": [ - { - "$ref": "#/components/schemas/V1CommonContent_ContentValue" - } - ] - } - } - }, - "V1ServiceOwnerDialogsCommandsUpdate_SearchTag": { - "type": "object", - "additionalProperties": false, - "properties": { - "value": { - "type": "string", - "description": "A search tag value." - } - } - }, - "V1ServiceOwnerDialogsCommandsUpdate_Attachment": { - "type": "object", - "additionalProperties": false, - "properties": { - "id": { - "type": "string", - "description": "A self-defined UUIDv7 may be provided to support idempotent additions of attachments. If not provided, a new UUIDv7 will be generated.", - "format": "guid", - "nullable": true, - "example": "01913cd5-784f-7d3b-abef-4c77b1f0972d" - }, - "displayName": { - "type": "array", - "description": "The display name of the attachment that should be used in GUIs.", - "items": { - "$ref": "#/components/schemas/V1CommonLocalizations_Localization" - } - }, - "urls": { - "type": "array", - "description": "The URLs associated with the attachment, each referring to a different representation of the attachment.", - "items": { - "$ref": "#/components/schemas/V1ServiceOwnerDialogsCommandsUpdate_AttachmentUrl" - } - } - } - }, - "V1ServiceOwnerDialogsCommandsUpdate_AttachmentUrl": { - "type": "object", - "additionalProperties": false, - "properties": { - "id": { - "type": "string", - "description": "A UUIDv7 used for merging existing data, unknown IDs will be ignored as this entity does not support user-defined IDs.", - "format": "guid", - "nullable": true, - "example": "01913cd5-784f-7d3b-abef-4c77b1f0972d" - }, - "url": { - "type": "string", - "description": "The fully qualified URL of the attachment.", - "format": "uri" - }, - "mediaType": { - "type": "string", - "description": "The media type of the attachment.", - "nullable": true, - "example": "application/pdf\napplication/zip" - }, - "consumerType": { - "description": "The type of consumer the URL is intended for.", - "oneOf": [ - { - "$ref": "#/components/schemas/Attachments_AttachmentUrlConsumerType" - } - ] - } - } - }, - "V1ServiceOwnerDialogsCommandsUpdate_Transmission": { - "type": "object", - "additionalProperties": false, - "properties": { - "id": { - "type": "string", - "description": "The UUDIv7 of the action may be provided to support idempotent additions to the list of transmissions.\nIf not supplied, a new UUIDv7 will be generated.", - "format": "guid", - "nullable": true, - "example": "01913cd5-784f-7d3b-abef-4c77b1f0972d" - }, - "createdAt": { - "type": "string", - "description": "If supplied, overrides the creating date and time for the transmission.\nIf not supplied, the current date /time will be used.", - "format": "date-time" - }, - "authorizationAttribute": { - "type": "string", - "description": "Contains an authorization resource attributeId, that can used in custom authorization rules in the XACML service\npolicy, which by default is the policy belonging to the service referred to by \"serviceResource\" in the dialog.\n \nCan also be used to refer to other service policies.", - "nullable": true, - "example": "mycustomresource\n/* equivalent to the above */\nurn:altinn:subresource:mycustomresource\nurn:altinn:task:Task_1\n/* refer to another service */\nurn:altinn:resource:some-other-service-identifier" - }, - "extendedType": { - "type": "string", - "description": "Arbitrary URI/URN describing a service-specific transmission type.\n \nRefer to the service-specific documentation provided by the service owner for details (if in use).", - "format": "uri", - "nullable": true - }, - "relatedTransmissionId": { - "type": "string", - "description": "Reference to any other transmission that this transmission is related to.", - "format": "guid", - "nullable": true - }, - "type": { - "description": "The type of transmission.", - "oneOf": [ - { - "$ref": "#/components/schemas/DialogsEntitiesTransmissions_DialogTransmissionType" - } - ] - }, - "sender": { - "description": "The actor that sent the transmission.", - "oneOf": [ - { - "$ref": "#/components/schemas/V1ServiceOwnerCommonActors_Actor" - } - ] - }, - "content": { - "description": "The transmission unstructured text content.", - "oneOf": [ - { - "$ref": "#/components/schemas/V1ServiceOwnerDialogsCommandsUpdate_TransmissionContent" - } - ] - }, - "attachments": { - "type": "array", - "description": "The transmission-level attachments.", - "items": { - "$ref": "#/components/schemas/V1ServiceOwnerDialogsCommandsUpdate_TransmissionAttachment" - } - } - } - }, - "V1ServiceOwnerDialogsCommandsUpdate_GuiAction": { - "type": "object", - "additionalProperties": false, - "properties": { - "id": { - "type": "string", - "description": "A self-defined UUIDv7 may be provided to support idempotent additions of Gui Actions. If not provided, a new UUIDv7 will be generated.", - "format": "guid", - "nullable": true, - "example": "01913cd5-784f-7d3b-abef-4c77b1f0972d" - }, - "action": { - "type": "string", - "description": "The action identifier for the action, corresponding to the \"action\" attributeId used in the XACML service policy." - }, - "url": { - "type": "string", - "description": "The fully qualified URL of the action, to which the user will be redirected when the action is triggered. Will be set to\n\"urn:dialogporten:unauthorized\" if the user is not authorized to perform the action.", - "format": "uri", - "example": "urn:dialogporten:unauthorized\nhttps://someendpoint.com/gui/some-service-instance-id" - }, - "authorizationAttribute": { - "type": "string", - "description": "Contains an authorization resource attributeId, that can used in custom authorization rules in the XACML service\npolicy, which by default is the policy belonging to the service referred to by \"serviceResource\" in the dialog.\n \nCan also be used to refer to other service policies.", - "nullable": true, - "example": "mycustomresource\n/* equivalent to the above */\nurn:altinn:subresource:mycustomresource\nurn:altinn:task:Task_1\n/* refer to another service */\nurn:altinn:resource:some-other-service-identifier" - }, - "isDeleteDialogAction": { - "type": "boolean", - "description": "Indicates whether the action results in the dialog being deleted. Used by frontends to implement custom UX\nfor delete actions." - }, - "httpMethod": { - "description": "The HTTP method that the frontend should use when redirecting the user.", - "nullable": true, - "oneOf": [ - { - "$ref": "#/components/schemas/Http_HttpVerb" - } - ] - }, - "priority": { - "description": "Indicates a priority for the action, making it possible for frontends to adapt GUI elements based on action\npriority.", - "oneOf": [ - { - "$ref": "#/components/schemas/DialogsEntitiesActions_DialogGuiActionPriority" - } - ] - }, - "title": { - "type": "array", - "description": "The title of the action, this should be short and in verb form. Must be text/plain.", - "items": { - "$ref": "#/components/schemas/V1CommonLocalizations_Localization" - } - }, - "prompt": { - "type": "array", - "description": "If there should be a prompt asking the user for confirmation before the action is executed,\nthis field should contain the prompt text.", - "nullable": true, - "items": { - "$ref": "#/components/schemas/V1CommonLocalizations_Localization" - } - } - } - }, - "Http_HttpVerb": { - "type": "string", - "description": "", - "x-enumNames": [ - "GET", - "POST", - "PUT", - "PATCH", - "DELETE", - "HEAD", - "OPTIONS", - "TRACE", - "CONNECT" - ], - "enum": [ - "GET", - "POST", - "PUT", - "PATCH", - "DELETE", - "HEAD", - "OPTIONS", - "TRACE", - "CONNECT" - ] - }, - "DialogsEntitiesActions_DialogGuiActionPriority": { - "type": "string", - "description": "", - "x-enumNames": [ - "Primary", - "Secondary", - "Tertiary" - ], - "enum": [ - "Primary", - "Secondary", - "Tertiary" - ] - }, - "V1ServiceOwnerDialogsCommandsUpdate_ApiAction": { - "type": "object", - "additionalProperties": false, - "properties": { - "id": { - "type": "string", - "description": "A self-defined UUIDv7 may be provided to support idempotent additions of Api Actions. If not provided, a new UUIDv7 will be generated.", - "format": "guid", - "nullable": true, - "example": "01913cd5-784f-7d3b-abef-4c77b1f0972d" - }, - "action": { - "type": "string", - "description": "String identifier for the action, corresponding to the \"action\" attributeId used in the XACML service policy,\nwhich by default is the policy belonging to the service referred to by \"serviceResource\" in the dialog.", - "example": "write" - }, - "authorizationAttribute": { - "type": "string", - "description": "Contains an authorization resource attributeId, that can used in custom authorization rules in the XACML service\npolicy, which by default is the policy belonging to the service referred to by \"serviceResource\" in the dialog.\n \nCan also be used to refer to other service policies.", - "nullable": true, - "example": "mycustomresource\n/* equivalent to the above */\nurn:altinn:subresource:mycustomresource\nurn:altinn:task:Task_1\n/* refer to another service */\nurn:altinn:resource:some-other-service-identifier" - }, - "endpoints": { - "type": "array", - "description": "The endpoints associated with the action.", - "items": { - "$ref": "#/components/schemas/V1ServiceOwnerDialogsCommandsUpdate_ApiActionEndpoint" - } - } - } - }, - "V1ServiceOwnerDialogsCommandsUpdate_ApiActionEndpoint": { - "type": "object", - "additionalProperties": false, - "properties": { - "id": { - "type": "string", - "description": "A UUIDv7 used for merging existing data, unknown IDs will be ignored as this entity does not support user-defined IDs.", - "format": "guid", - "nullable": true, - "example": "01913cd5-784f-7d3b-abef-4c77b1f0972d" - }, - "version": { - "type": "string", - "description": "Arbitrary string indicating the version of the endpoint.", - "nullable": true - }, - "url": { - "type": "string", - "description": "The fully qualified URL of the API endpoint.", - "format": "uri" - }, - "httpMethod": { - "description": "The HTTP method that the endpoint expects for this action.", - "oneOf": [ - { - "$ref": "#/components/schemas/Http_HttpVerb" - } - ] - }, - "documentationUrl": { - "type": "string", - "description": "Link to documentation for the endpoint, providing documentation for integrators. Should be a URL to a\nhuman-readable page.", - "format": "uri", - "nullable": true - }, - "requestSchema": { - "type": "string", - "description": "Link to the request schema for the endpoint. Used to provide documentation for integrators.\nDialogporten will not validate information on this endpoint.", - "format": "uri", - "nullable": true - }, - "responseSchema": { - "type": "string", - "description": "Link to the response schema for the endpoint. Used to provide documentation for integrators.\nDialogporten will not validate information on this endpoint.", - "format": "uri", - "nullable": true - }, - "deprecated": { - "type": "boolean", - "description": "Boolean indicating if the endpoint is deprecated." - }, - "sunsetAt": { - "type": "string", - "description": "Date and time when the endpoint will no longer function. Only set if the endpoint is deprecated. Dialogporten\nwill not enforce this date.", - "format": "date-time", - "nullable": true - } - } - }, - "V1ServiceOwnerDialogsCommandsUpdate_Activity": { - "type": "object", - "additionalProperties": false, - "properties": { - "id": { - "type": "string", - "description": "The UUDIv7 of the action may be provided to support idempotent additions to the list of activities.\nIf not supplied, a new UUIDv7 will be generated.", - "format": "guid", - "nullable": true, - "example": "01913cd5-784f-7d3b-abef-4c77b1f0972d" - }, - "createdAt": { - "type": "string", - "description": "If supplied, overrides the creating date and time for the transmission.\nIf not supplied, the current date /time will be used.", - "format": "date-time", - "nullable": true - }, - "extendedType": { - "type": "string", - "description": "Arbitrary URI/URN describing a service-specific transmission type.", - "format": "uri", - "nullable": true - }, - "type": { - "description": "The type of transmission.", - "oneOf": [ - { - "$ref": "#/components/schemas/DialogsEntitiesActivities_DialogActivityType" - } - ] - }, - "transmissionId": { - "type": "string", - "description": "If the activity is related to a particular transmission, this field will contain the transmission identifier.\nMust be present in the request body.", - "format": "guid", - "nullable": true - }, - "performedBy": { - "description": "The actor that performed the activity.", - "oneOf": [ - { - "$ref": "#/components/schemas/V1ServiceOwnerCommonActors_Actor" - } - ] - }, - "description": { - "type": "array", - "description": "Unstructured text describing the activity. Only set if the activity type is \"Information\".", - "items": { - "$ref": "#/components/schemas/V1CommonLocalizations_Localization" - } - } - } - }, - "DialogsEntitiesActivities_DialogActivityType": { - "type": "string", - "description": "", - "x-enumNames": [ - "DialogCreated", - "DialogClosed", - "Information", - "TransmissionOpened", - "PaymentMade", - "SignatureProvided", - "DialogOpened", - "DialogDeleted", - "DialogRestored", - "SentToSigning", - "SentToFormFill", - "SentToSendIn", - "SentToPayment" - ], - "enum": [ - "DialogCreated", - "DialogClosed", - "Information", - "TransmissionOpened", - "PaymentMade", - "SignatureProvided", - "DialogOpened", - "DialogDeleted", - "DialogRestored", - "SentToSigning", - "SentToFormFill", - "SentToSendIn", - "SentToPayment" - ] - }, - "PaginatedListOfV1ServiceOwnerDialogsQueriesSearch_Dialog": { - "type": "object", - "additionalProperties": false, - "properties": { - "items": { - "type": "array", - "description": "The paginated list of items", - "items": { - "$ref": "#/components/schemas/V1ServiceOwnerDialogsQueriesSearch_Dialog" - } - }, - "hasNextPage": { - "type": "boolean", - "description": "Whether there are more items available that can be fetched by supplying the continuation token" - }, - "continuationToken": { - "type": "string", - "description": "The continuation token to be used to fetch the next page of items", - "nullable": true, - "example": "createdat_2024-07-31T09:09:03.0257090Z,id_0c089101-b7cf-a476-955c-f00a78d74a4e" - }, - "orderBy": { - "type": "string", - "description": "The current sorting order of the items", - "example": "createdat_desc,id_desc" - } - } - }, - "V1ServiceOwnerDialogsQueriesSearch_Dialog": { - "type": "object", - "additionalProperties": false, - "properties": { - "id": { - "type": "string", - "description": "The unique identifier for the dialog in UUIDv7 format.", - "format": "guid", - "example": "01913cd5-784f-7d3b-abef-4c77b1f0972d" - }, - "org": { - "type": "string", - "description": "The service owner code representing the organization (service owner) related to this dialog.", - "example": "ske" - }, - "revision": { - "type": "string", - "description": "The unique identifier for the revision in UUIDv4 format.", - "format": "guid", - "example": "a312cb9c-7632-43c2-aa38-69b06aed56ca" - }, - "serviceResource": { - "type": "string", - "description": "The service identifier for the service that the dialog is related to in URN-format.\nThis corresponds to a service resource in the Altinn Resource Registry.", - "example": "urn:altinn:resource:some-service-identifier" - }, - "serviceResourceType": { - "type": "string", - "description": "The ServiceResource type, as defined in Altinn Resource Registry (see ResourceType)." - }, - "party": { - "type": "string", - "description": "The party code representing the organization or person that the dialog belongs to in URN format.", - "example": "urn:altinn:person:identifier-no:01125512345\nurn:altinn:organization:identifier-no:912345678" - }, - "progress": { - "type": "integer", - "description": "Advisory indicator of progress, represented as 1-100 percentage value. 100% representing a dialog that has come\nto a natural completion (successful or not).", - "format": "int32", - "nullable": true - }, - "process": { - "type": "string", - "description": "Optional process identifier used to indicate a business process this dialog belongs to.", - "nullable": true - }, - "precedingProcess": { - "type": "string", - "description": "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.", - "nullable": true - }, - "guiAttachmentCount": { - "type": "integer", - "description": "The number of attachments in the dialog made available for browser-based frontends.", - "format": "int32", - "nullable": true - }, - "extendedStatus": { - "type": "string", - "description": "Arbitrary string with a service-specific indicator of status, typically used to indicate a fine-grained state of\nthe dialog to further specify the \"status\" enum.\n \nRefer to the service-specific documentation provided by the service owner for details on the possible values (if\nin use).", - "nullable": true - }, - "externalReference": { - "type": "string", - "description": "Arbitrary string with a service-specific reference to an external system or service.\n \nRefer to the service-specific documentation provided by the service owner for details (if in use).", - "nullable": true - }, - "createdAt": { - "type": "string", - "description": "The date and time when the dialog was created.", - "format": "date-time", - "example": "2022-12-31T23:59:59Z" - }, - "updatedAt": { - "type": "string", - "description": "The date and time when the dialog was last updated.", - "format": "date-time", - "example": "2022-12-31T23:59:59Z" - }, - "dueAt": { - "type": "string", - "description": "The due date for the dialog. This is the last date when the dialog is expected to be completed.", - "format": "date-time", - "nullable": true, - "example": "2022-12-31T23:59:59Z" - }, - "visibleFrom": { - "type": "string", - "description": "The timestamp when the dialog will be made visible for authorized end users.", - "format": "date-time", - "nullable": true - }, - "status": { - "description": "The aggregated status of the dialog.", - "oneOf": [ - { - "$ref": "#/components/schemas/DialogsEntities_DialogStatus" - } - ] - }, - "systemLabel": { - "description": "Current display state.", - "oneOf": [ - { - "$ref": "#/components/schemas/DialogEndUserContextsEntities_SystemLabel" - } - ] - }, - "latestActivity": { - "description": "The latest entry in the dialog's activity log.", - "nullable": true, - "oneOf": [ - { - "$ref": "#/components/schemas/V1ServiceOwnerDialogsQueriesSearch_DialogActivity" - } - ] - }, - "seenSinceLastUpdate": { - "type": "array", - "description": "The list of seen log entries for the dialog newer than the dialog ChangedAt date.", - "items": { - "$ref": "#/components/schemas/V1ServiceOwnerDialogsQueriesSearch_DialogSeenLog" - } - }, - "content": { - "description": "The content of the dialog in search results.", - "oneOf": [ - { - "$ref": "#/components/schemas/V1ServiceOwnerDialogsQueriesSearch_Content" - } - ] - } - } - }, - "DialogEndUserContextsEntities_SystemLabel": { - "type": "string", - "description": "", - "x-enumNames": [ - "Default", - "Bin", - "Archive" - ], - "enum": [ - "Default", - "Bin", - "Archive" - ] - }, - "V1ServiceOwnerDialogsQueriesSearch_DialogActivity": { - "type": "object", - "additionalProperties": false, - "properties": { - "id": { - "type": "string", - "description": "The unique identifier for the activity in UUIDv7 format.", - "format": "guid" - }, - "createdAt": { - "type": "string", - "description": "The date and time when the activity was created.", - "format": "date-time", - "nullable": true - }, - "extendedType": { - "type": "string", - "description": "An arbitrary string with a service-specific activity type.\n \nConsult the service-specific documentation provided by the service owner for details (if in use).", - "format": "uri", - "nullable": true - }, - "type": { - "description": "The type of activity.", - "oneOf": [ - { - "$ref": "#/components/schemas/DialogsEntitiesActivities_DialogActivityType" - } - ] - }, - "transmissionId": { - "type": "string", - "description": "If the activity is related to a particular transmission, this field will contain the transmission identifier.", - "format": "guid", - "nullable": true - }, - "performedBy": { - "description": "The actor that performed the activity.", - "oneOf": [ - { - "$ref": "#/components/schemas/V1ServiceOwnerCommonActors_Actor" - } - ] - }, - "description": { - "type": "array", - "description": "Unstructured text describing the activity. Only set if the activity type is \"Information\".", - "items": { - "$ref": "#/components/schemas/V1CommonLocalizations_Localization" - } - } - } - }, - "V1ServiceOwnerDialogsQueriesSearch_DialogSeenLog": { - "type": "object", - "additionalProperties": false, - "properties": { - "id": { - "type": "string", - "description": "The unique identifier for the seen log entry in UUIDv7 format.", - "format": "guid" - }, - "seenAt": { - "type": "string", - "description": "The timestamp when the dialog revision was seen.", - "format": "date-time" - }, - "seenBy": { - "description": "The actor that saw the dialog revision.", - "oneOf": [ - { - "$ref": "#/components/schemas/V1ServiceOwnerCommonActors_Actor" - } - ] - }, - "isViaServiceOwner": { - "type": "boolean", - "description": "Flag indicating whether the seen log entry was created via the service owner.\n \nThis is used when the service owner uses the service owner API to implement its own frontend.", - "nullable": true - }, - "isCurrentEndUser": { - "type": "boolean", - "description": "Flag indicating whether the seen log entry was created by the end user supplied in the query." - } - } - }, - "V1ServiceOwnerDialogsQueriesSearch_Content": { - "type": "object", - "additionalProperties": false, - "properties": { - "title": { - "description": "The title of the dialog.", - "oneOf": [ - { - "$ref": "#/components/schemas/V1CommonContent_ContentValue" - } - ] - }, - "summary": { - "description": "A short summary of the dialog and its current state.", - "oneOf": [ - { - "$ref": "#/components/schemas/V1CommonContent_ContentValue" - } - ] - }, - "senderName": { - "description": "Overridden sender name. If not supplied, assume \"org\" as the sender name.", - "nullable": true, - "oneOf": [ - { - "$ref": "#/components/schemas/V1CommonContent_ContentValue" - } - ] - }, - "extendedStatus": { - "description": "Used as the human-readable label used to describe the \"ExtendedStatus\" field.", - "nullable": true, - "oneOf": [ - { - "$ref": "#/components/schemas/V1CommonContent_ContentValue" - } - ] - } - } - }, - "V1ServiceOwnerDialogsQueriesGet_Dialog": { - "type": "object", - "additionalProperties": false, - "properties": { - "id": { - "type": "string", - "description": "The unique identifier for the dialog in UUIDv7 format.", - "format": "guid", - "example": "01913cd5-784f-7d3b-abef-4c77b1f0972d" - }, - "revision": { - "type": "string", - "description": "The unique identifier for the revision in UUIDv4 format.", - "format": "guid", - "example": "a312cb9c-7632-43c2-aa38-69b06aed56ca" - }, - "org": { - "type": "string", - "description": "The service owner code representing the organization (service owner) related to this dialog.", - "example": "ske" - }, - "serviceResource": { - "type": "string", - "description": "The service identifier for the service that the dialog is related to in URN-format.\nThis corresponds to a service resource in the Altinn Resource Registry.", - "example": "urn:altinn:resource:some-service-identifier" - }, - "serviceResourceType": { - "type": "string", - "description": "The ServiceResource type, as defined in Altinn Resource Registry (see ResourceType)." - }, - "party": { - "type": "string", - "description": "The party code representing the organization or person that the dialog belongs to in URN format.", - "example": "urn:altinn:person:identifier-no:01125512345\nurn:altinn:organization:identifier-no:912345678" - }, - "progress": { - "type": "integer", - "description": "Advisory indicator of progress, represented as 1-100 percentage value. 100% representing a dialog that has come\nto a natural completion (successful or not).", - "format": "int32", - "nullable": true - }, - "process": { - "type": "string", - "description": "Optional process identifier used to indicate a business process this dialog belongs to.", - "nullable": true - }, - "precedingProcess": { - "type": "string", - "description": "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.", - "nullable": true - }, - "extendedStatus": { - "type": "string", - "description": "Arbitrary string with a service-specific indicator of status, typically used to indicate a fine-grained state of\nthe dialog to further specify the \"status\" enum.\n \nRefer to the service-specific documentation provided by the service owner for details on the possible values (if\nin use).", - "nullable": true - }, - "externalReference": { - "type": "string", - "description": "Arbitrary string with a service-specific reference to an external system or service.\n \nRefer to the service-specific documentation provided by the service owner for details (if in use).", - "nullable": true - }, - "deletedAt": { - "type": "string", - "description": "If deleted, the date and time when the deletion was performed.", - "format": "date-time", - "nullable": true - }, - "visibleFrom": { - "type": "string", - "description": "The timestamp when the dialog will be made visible for authorized end users.", - "format": "date-time", - "nullable": true, - "example": "2022-12-31T23:59:59Z" - }, - "dueAt": { - "type": "string", - "description": "The due date for the dialog. Dialogs past due date might be marked as such in frontends but will still be available.", - "format": "date-time", - "nullable": true, - "example": "2022-12-31T23:59:59Z" - }, - "expiresAt": { - "type": "string", - "description": "The expiration date for the dialog. This is the last date when the dialog is available for the end user.\n \nAfter this date is passed, the dialog will be considered expired and no longer available for the end user in any\nAPI. If not supplied, the dialog will be considered to never expire. This field can be changed by the service\nowner after the dialog has been created.", - "format": "date-time", - "nullable": true, - "example": "2022-12-31T23:59:59Z" - }, - "createdAt": { - "type": "string", - "description": "The date and time when the dialog was created.", - "format": "date-time", - "example": "2022-12-31T23:59:59Z" - }, - "updatedAt": { - "type": "string", - "description": "The date and time when the dialog was last updated.", - "format": "date-time", - "example": "2022-12-31T23:59:59Z" - }, - "status": { - "description": "The aggregated status of the dialog.", - "oneOf": [ - { - "$ref": "#/components/schemas/DialogsEntities_DialogStatus" - } - ] - }, - "systemLabel": { - "description": "Current display state.", - "oneOf": [ - { - "$ref": "#/components/schemas/DialogEndUserContextsEntities_SystemLabel" - } - ] - }, - "content": { - "description": "The dialog unstructured text content.", - "oneOf": [ - { - "$ref": "#/components/schemas/V1ServiceOwnerDialogsQueriesGet_Content" - } - ] - }, - "searchTags": { - "type": "array", - "description": "The list of words (tags) that will be used in dialog search queries. Not visible in end-user DTO.", - "nullable": true, - "items": { - "$ref": "#/components/schemas/V1ServiceOwnerDialogsQueriesGet_SearchTag" - } - }, - "attachments": { - "type": "array", - "description": "The attachments associated with the dialog (on an aggregate level).", - "items": { - "$ref": "#/components/schemas/V1ServiceOwnerDialogsQueriesGet_DialogAttachment" - } - }, - "transmissions": { - "type": "array", - "description": "The immutable list of transmissions associated with the dialog.", - "items": { - "$ref": "#/components/schemas/V1ServiceOwnerDialogsQueriesGet_DialogTransmission" - } - }, - "guiActions": { - "type": "array", - "description": "The GUI actions associated with the dialog. Should be used in browser-based interactive frontends.", - "items": { - "$ref": "#/components/schemas/V1ServiceOwnerDialogsQueriesGet_DialogGuiAction" - } - }, - "apiActions": { - "type": "array", - "description": "The API actions associated with the dialog. Should be used in specialized, non-browser-based integrations.", - "items": { - "$ref": "#/components/schemas/V1ServiceOwnerDialogsQueriesGet_DialogApiAction" - } - }, - "activities": { - "type": "array", - "description": "An immutable list of activities associated with the dialog.", - "items": { - "$ref": "#/components/schemas/V1ServiceOwnerDialogsQueriesGet_DialogActivity" - } - }, - "seenSinceLastUpdate": { - "type": "array", - "description": "The list of seen log entries for the dialog newer than the dialog ChangedAt date.", - "items": { - "$ref": "#/components/schemas/V1ServiceOwnerDialogsQueriesGet_DialogSeenLog" - } - } - } - }, - "OrderSetOfTOrderDefinitionAndTTarget": {}, - "ContinuationTokenSetOfTOrderDefinitionAndTTarget": {}, - "V1ServiceOwnerDialogsQueriesGet_Content": { - "type": "object", - "additionalProperties": false, - "properties": { - "title": { - "description": "The title of the dialog.", - "oneOf": [ - { - "$ref": "#/components/schemas/V1CommonContent_ContentValue" - } - ] - }, - "summary": { - "description": "A short summary of the dialog and its current state.", - "oneOf": [ - { - "$ref": "#/components/schemas/V1CommonContent_ContentValue" - } - ] - }, - "senderName": { - "description": "Overridden sender name. If not supplied, assume \"org\" as the sender name.", - "nullable": true, - "oneOf": [ - { - "$ref": "#/components/schemas/V1CommonContent_ContentValue" - } - ] - }, - "additionalInfo": { - "description": "Additional information about the dialog, this may contain Markdown.", - "nullable": true, - "oneOf": [ - { - "$ref": "#/components/schemas/V1CommonContent_ContentValue" - } - ] - }, - "extendedStatus": { - "description": "Used as the human-readable label used to describe the \"ExtendedStatus\" field.", - "nullable": true, - "oneOf": [ - { - "$ref": "#/components/schemas/V1CommonContent_ContentValue" - } - ] - }, - "mainContentReference": { - "description": "Front-channel embedded content. Used to dynamically embed content in the frontend from an external URL. Must be HTTPS.\nAllowed media types: application/vnd.dialogporten.frontchannelembed+json;type=markdown", - "nullable": true, - "oneOf": [ - { - "$ref": "#/components/schemas/V1CommonContent_ContentValue" - } - ] - } - } - }, - "V1ServiceOwnerDialogsQueriesGet_SearchTag": { - "type": "object", - "additionalProperties": false, - "properties": { - "value": { - "type": "string", - "description": "A search tag value." - } - } - }, - "V1ServiceOwnerDialogsQueriesGet_DialogAttachment": { - "type": "object", - "additionalProperties": false, - "properties": { - "id": { - "type": "string", - "description": "The unique identifier for the attachment in UUIDv7 format.", - "format": "guid" - }, - "displayName": { - "type": "array", - "description": "The display name of the attachment that should be used in GUIs.", - "items": { - "$ref": "#/components/schemas/V1CommonLocalizations_Localization" - } - }, - "urls": { - "type": "array", - "description": "The URLs associated with the attachment, each referring to a different representation of the attachment.", - "items": { - "$ref": "#/components/schemas/V1ServiceOwnerDialogsQueriesGet_DialogAttachmentUrl" - } - } - } - }, - "V1ServiceOwnerDialogsQueriesGet_DialogAttachmentUrl": { - "type": "object", - "additionalProperties": false, - "properties": { - "id": { - "type": "string", - "description": "The unique identifier for the attachment URL in UUIDv7 format.", - "format": "guid" - }, - "url": { - "type": "string", - "description": "The fully qualified URL of the attachment.", - "format": "uri", - "example": "https://someendpoint.com/someattachment.pdf" - }, - "mediaType": { - "type": "string", - "description": "The media type of the attachment.", - "nullable": true, - "example": "application/pdf\napplication/zip" - }, - "consumerType": { - "description": "What type of consumer the URL is intended for.", - "oneOf": [ - { - "$ref": "#/components/schemas/Attachments_AttachmentUrlConsumerType" - } - ] - } - } - }, - "V1ServiceOwnerDialogsQueriesGet_DialogTransmission": { - "type": "object", - "additionalProperties": false, - "properties": { - "id": { - "type": "string", - "description": "The unique identifier for the transmission in UUIDv7 format.", - "format": "guid" - }, - "createdAt": { - "type": "string", - "description": "The date and time when the transmission was created.", - "format": "date-time" - }, - "authorizationAttribute": { - "type": "string", - "description": "Contains an authorization resource attributeId, that can used in custom authorization rules in the XACML service\npolicy, which by default is the policy belonging to the service referred to by \"serviceResource\" in the dialog.\n \nCan also be used to refer to other service policies.", - "nullable": true, - "example": "mycustomresource\n/* equivalent to the above */\nurn:altinn:subresource:mycustomresource\nurn:altinn:task:Task_1\n/* refer to another service */\nurn:altinn:resource:some-other-service-identifier" - }, - "isAuthorized": { - "type": "boolean", - "description": "Flag indicating if the authenticated user supplied in the query is authorized for this transmission.", - "nullable": true - }, - "extendedType": { - "type": "string", - "description": "Arbitrary URI/URN describing a service-specific transmission type.\n \nRefer to the service-specific documentation provided by the service owner for details (if in use).", - "format": "uri", - "nullable": true - }, - "relatedTransmissionId": { - "type": "string", - "description": "Reference to any other transmission that this transmission is related to.", - "format": "guid", - "nullable": true - }, - "type": { - "description": "The type of transmission.", - "oneOf": [ - { - "$ref": "#/components/schemas/DialogsEntitiesTransmissions_DialogTransmissionType" - } - ] - }, - "sender": { - "description": "The actor that sent the transmission.", - "oneOf": [ - { - "$ref": "#/components/schemas/V1ServiceOwnerCommonActors_Actor" - } - ] - }, - "content": { - "description": "The transmission unstructured text content.", - "oneOf": [ - { - "$ref": "#/components/schemas/V1ServiceOwnerDialogsQueriesGet_DialogTransmissionContent" - } - ] - }, - "attachments": { - "type": "array", - "description": "The transmission-level attachments.", - "items": { - "$ref": "#/components/schemas/V1ServiceOwnerDialogsQueriesGet_DialogTransmissionAttachment" - } - } - } - }, - "V1ServiceOwnerDialogsQueriesGet_DialogTransmissionContent": { - "type": "object", - "additionalProperties": false, - "properties": { - "title": { - "description": "The transmission title.", - "oneOf": [ - { - "$ref": "#/components/schemas/V1CommonContent_ContentValue" - } - ] - }, - "summary": { - "description": "The transmission summary.", - "oneOf": [ - { - "$ref": "#/components/schemas/V1CommonContent_ContentValue" - } - ] - }, - "contentReference": { - "description": "Front-channel embedded content. Used to dynamically embed content in the frontend from an external URL. Must be HTTPS.\nAllowed media types: application/vnd.dialogporten.frontchannelembed+json;type=markdown", - "nullable": true, - "oneOf": [ - { - "$ref": "#/components/schemas/V1CommonContent_ContentValue" - } - ] - } - } - }, - "V1ServiceOwnerDialogsQueriesGet_DialogTransmissionAttachment": { - "type": "object", - "additionalProperties": false, - "properties": { - "id": { - "type": "string", - "description": "The unique identifier for the attachment in UUIDv7 format.", - "format": "guid" - }, - "displayName": { - "type": "array", - "description": "The display name of the attachment that should be used in GUIs.", - "items": { - "$ref": "#/components/schemas/V1CommonLocalizations_Localization" - } - }, - "urls": { - "type": "array", - "description": "The URLs associated with the attachment, each referring to a different representation of the attachment.", - "items": { - "$ref": "#/components/schemas/V1ServiceOwnerDialogsQueriesGet_DialogTransmissionAttachmentUrl" - } - } - } - }, - "V1ServiceOwnerDialogsQueriesGet_DialogTransmissionAttachmentUrl": { - "type": "object", - "additionalProperties": false, - "properties": { - "url": { - "type": "string", - "description": "The fully qualified URL of the attachment. Will be set to \"urn:dialogporten:unauthorized\" if the user is\nnot authorized to access the transmission.", - "format": "uri", - "example": "https://someendpoint.com/someattachment.pdf\nurn:dialogporten:unauthorized" - }, - "mediaType": { - "type": "string", - "description": "The media type of the attachment.", - "nullable": true, - "example": "application/pdf\napplication/zip" - }, - "consumerType": { - "description": "The type of consumer the URL is intended for.", - "oneOf": [ - { - "$ref": "#/components/schemas/Attachments_AttachmentUrlConsumerType" - } - ] - } - } - }, - "V1ServiceOwnerDialogsQueriesGet_DialogGuiAction": { - "type": "object", - "additionalProperties": false, - "properties": { - "id": { - "type": "string", - "description": "The unique identifier for the action in UUIDv7 format.", - "format": "guid" - }, - "action": { - "type": "string", - "description": "The action identifier for the action, corresponding to the \"action\" attributeId used in the XACML service policy." - }, - "url": { - "type": "string", - "description": "The fully qualified URL of the action, to which the user will be redirected when the action is triggered.", - "format": "uri" - }, - "authorizationAttribute": { - "type": "string", - "description": "Contains an authorization resource attributeId, that can used in custom authorization rules in the XACML service\npolicy, which by default is the policy belonging to the service referred to by \"serviceResource\" in the dialog.\n \nCan also be used to refer to other service policies.", - "nullable": true, - "example": "mycustomresource\n/* equivalent to the above */\nurn:altinn:subresource:mycustomresource\nurn:altinn:task:Task_1\n/* refer to another service */\nurn:altinn:resource:some-other-service-identifier" - }, - "isAuthorized": { - "type": "boolean", - "description": "Whether the user, if supplied in the query, is authorized to perform the action.", - "nullable": true - }, - "isDeleteDialogAction": { - "type": "boolean", - "description": "Indicates whether the action results in the dialog being deleted. Used by frontends to implement custom UX\nfor delete actions." - }, - "priority": { - "description": "Indicates a priority for the action, making it possible for frontends to adapt GUI elements based on action\npriority.", - "oneOf": [ - { - "$ref": "#/components/schemas/DialogsEntitiesActions_DialogGuiActionPriority" - } - ] - }, - "httpMethod": { - "description": "The HTTP method that the frontend should use when redirecting the user.", - "oneOf": [ - { - "$ref": "#/components/schemas/Http_HttpVerb" - } - ] - }, - "title": { - "type": "array", - "description": "The title of the action, this should be short and in verb form.", - "items": { - "$ref": "#/components/schemas/V1CommonLocalizations_Localization" - } - }, - "prompt": { - "type": "array", - "description": "If there should be a prompt asking the user for confirmation before the action is executed,\nthis field should contain the prompt text.", - "nullable": true, - "items": { - "$ref": "#/components/schemas/V1CommonLocalizations_Localization" - } - } - } - }, - "V1ServiceOwnerDialogsQueriesGet_DialogApiAction": { - "type": "object", - "additionalProperties": false, - "properties": { - "id": { - "type": "string", - "description": "The unique identifier for the action in UUIDv7 format.", - "format": "guid" - }, - "action": { - "type": "string", - "description": "String identifier for the action, corresponding to the \"action\" attributeId used in the XACML service policy,\nwhich by default is the policy belonging to the service referred to by \"serviceResource\" in the dialog.", - "example": "write" - }, - "authorizationAttribute": { - "type": "string", - "description": "Contains an authorization resource attributeId, that can used in custom authorization rules in the XACML service\npolicy, which by default is the policy belonging to the service referred to by \"serviceResource\" in the dialog.\n \nCan also be used to refer to other service policies.", - "nullable": true, - "example": "mycustomresource\n/* equivalent to the above */\nurn:altinn:subresource:mycustomresource\nurn:altinn:task:Task_1\n/* refer to another service */\nurn:altinn:resource:some-other-service-identifier" - }, - "isAuthorized": { - "type": "boolean", - "description": "True if the authenticated user (set in the query) is authorized for this action.", - "nullable": true - }, - "endpoints": { - "type": "array", - "description": "The endpoints associated with the action.", - "items": { - "$ref": "#/components/schemas/V1ServiceOwnerDialogsQueriesGet_DialogApiActionEndpoint" - } - } - } - }, - "V1ServiceOwnerDialogsQueriesGet_DialogApiActionEndpoint": { - "type": "object", - "additionalProperties": false, - "properties": { - "id": { - "type": "string", - "description": "The unique identifier for the endpoint in UUIDv7 format.", - "format": "guid" - }, - "version": { - "type": "string", - "description": "Arbitrary string indicating the version of the endpoint.\n \nConsult the service-specific documentation provided by the service owner for details (if in use).", - "nullable": true - }, - "url": { - "type": "string", - "description": "The fully qualified URL of the API endpoint.", - "format": "uri" - }, - "httpMethod": { - "description": "The HTTP method that the endpoint expects for this action.", - "oneOf": [ - { - "$ref": "#/components/schemas/Http_HttpVerb" - } - ] - }, - "documentationUrl": { - "type": "string", - "description": "Link to service provider documentation for the endpoint. Used for service owners to provide documentation for\nintegrators. Should be a URL to a human-readable page.", - "format": "uri", - "nullable": true - }, - "requestSchema": { - "type": "string", - "description": "Link to the request schema for the endpoint. Used by service owners to provide documentation for integrators.\nDialogporten will not validate information on this endpoint.", - "format": "uri", - "nullable": true - }, - "responseSchema": { - "type": "string", - "description": "Link to the response schema for the endpoint. Used for service owners to provide documentation for integrators.\nDialogporten will not validate information on this endpoint.", - "format": "uri", - "nullable": true - }, - "deprecated": { - "type": "boolean", - "description": "Boolean indicating if the endpoint is deprecated. Integrators should migrate to endpoints with a higher version." - }, - "sunsetAt": { - "type": "string", - "description": "Date and time when the service owner has indicated that endpoint will no longer function. Only set if the endpoint\nis deprecated. Dialogporten will not enforce this date.", - "format": "date-time", - "nullable": true - } - } - }, - "V1ServiceOwnerDialogsQueriesGet_DialogActivity": { - "type": "object", - "additionalProperties": false, - "properties": { - "id": { - "type": "string", - "description": "The unique identifier for the activity in UUIDv7 format.", - "format": "guid" - }, - "createdAt": { - "type": "string", - "description": "The date and time when the activity was created.", - "format": "date-time", - "nullable": true - }, - "extendedType": { - "type": "string", - "description": "An arbitrary URI/URN with a service-specific activity type.\n \nConsult the service-specific documentation provided by the service owner for details (if in use).", - "format": "uri", - "nullable": true - }, - "type": { - "description": "The type of activity.", - "oneOf": [ - { - "$ref": "#/components/schemas/DialogsEntitiesActivities_DialogActivityType" - } - ] - }, - "transmissionId": { - "type": "string", - "description": "If the activity is related to a particular transmission, this field will contain the transmission identifier.", - "format": "guid", - "nullable": true - }, - "performedBy": { - "description": "The actor that performed the activity.", - "oneOf": [ - { - "$ref": "#/components/schemas/V1ServiceOwnerCommonActors_Actor" - } - ] - }, - "description": { - "type": "array", - "description": "Unstructured text describing the activity. Only set if the activity type is \"Information\".", - "items": { - "$ref": "#/components/schemas/V1CommonLocalizations_Localization" - } - } - } - }, - "V1ServiceOwnerDialogsQueriesGet_DialogSeenLog": { - "type": "object", - "additionalProperties": false, - "properties": { - "id": { - "type": "string", - "description": "The unique identifier for the seen log entry in UUIDv7 format.", - "format": "guid" - }, - "seenAt": { - "type": "string", - "description": "The timestamp when the dialog revision was seen.", - "format": "date-time" - }, - "seenBy": { - "description": "The actor that saw the dialog revision.", - "oneOf": [ - { - "$ref": "#/components/schemas/V1ServiceOwnerCommonActors_Actor" - } - ] - }, - "isViaServiceOwner": { - "type": "boolean", - "description": "Flag indicating whether the seen log entry was created via the service owner.\n \nThis is used when the service owner uses the service owner API to implement its own frontend.", - "nullable": true - }, - "isCurrentEndUser": { - "type": "boolean", - "description": "Flag indicating whether the seen log entry was created by the current end user, if provided in the query." - } - } - }, - "V1ServiceOwnerDialogsCreate_DialogRequest": { - "type": "object", - "additionalProperties": false, - "properties": { - "dto": { - "$ref": "#/components/schemas/V1ServiceOwnerDialogsCommandsCreate_Dialog" - } - } - }, - "V1ServiceOwnerDialogsCommandsCreate_Dialog": { - "type": "object", - "additionalProperties": false, - "properties": { - "id": { - "type": "string", - "description": "A self-defined UUIDv7 may be provided to support idempotent creation of dialogs. If not provided, a new UUIDv7 will be generated.", - "format": "guid", - "nullable": true, - "example": "01913cd5-784f-7d3b-abef-4c77b1f0972d" - }, - "serviceResource": { - "type": "string", - "description": "The service identifier for the service that the dialog is related to in URN-format.\nThis corresponds to a resource in the Altinn Resource Registry, which the authenticated organization\nmust own, i.e., be listed as the \"competent authority\" in the Resource Registry entry.", - "example": "urn:altinn:resource:some-service-identifier" - }, - "party": { - "type": "string", - "description": "The party code representing the organization or person that the dialog belongs to in URN format.", - "example": "urn:altinn:person:identifier-no:01125512345\nurn:altinn:organization:identifier-no:912345678" - }, - "progress": { - "type": "integer", - "description": "Advisory indicator of progress, represented as 1-100 percentage value. 100% representing a dialog that has come\nto a natural completion (successful or not).", - "format": "int32", - "nullable": true - }, - "extendedStatus": { - "type": "string", - "description": "Arbitrary string with a service-specific indicator of status, typically used to indicate a fine-grained state of\nthe dialog to further specify the \"status\" enum.", - "nullable": true - }, - "externalReference": { - "type": "string", - "description": "Arbitrary string with a service-specific reference to an external system or service.", - "nullable": true - }, - "visibleFrom": { - "type": "string", - "description": "The timestamp when the dialog should be made visible for authorized end users. If not provided, the dialog will be\nimmediately available.", - "format": "date-time", - "nullable": true, - "example": "2022-12-31T23:59:59Z" - }, - "dueAt": { - "type": "string", - "description": "The due date for the dialog. Dialogs past due date might be marked as such in frontends but will still be available.", - "format": "date-time", - "nullable": true, - "example": "2022-12-31T23:59:59Z" - }, - "process": { - "type": "string", - "description": "Optional process identifier used to indicate a business process this dialog belongs to.", - "nullable": true - }, - "precedingProcess": { - "type": "string", - "description": "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.", - "nullable": true - }, - "expiresAt": { - "type": "string", - "description": "The expiration date for the dialog. This is the last date when the dialog is available for the end user.\n \nAfter this date is passed, the dialog will be considered expired and no longer available for the end user in any\nAPI. If not supplied, the dialog will be considered to never expire. This field can be changed after creation.", - "format": "date-time", - "nullable": true, - "example": "2022-12-31T23:59:59Z" - }, - "createdAt": { - "type": "string", - "description": "If set, will override the date and time when the dialog is set as created.\nIf not supplied, the current date /time will be used.", - "format": "date-time", - "example": "2022-12-31T23:59:59Z" - }, - "updatedAt": { - "type": "string", - "description": "If set, will override the date and time when the dialog is set as last updated.\nIf not supplied, the current date /time will be used.", - "format": "date-time", - "example": "2022-12-31T23:59:59Z" - }, - "status": { - "description": "The aggregated status of the dialog.", - "oneOf": [ - { - "$ref": "#/components/schemas/DialogsEntities_DialogStatus" - } - ] - }, - "systemLabel": { - "description": "Set the system label of the dialog Migration purposes.", - "nullable": true, - "oneOf": [ - { - "$ref": "#/components/schemas/DialogEndUserContextsEntities_SystemLabel" - } - ] - }, - "content": { - "description": "The dialog unstructured text content.", - "oneOf": [ - { - "$ref": "#/components/schemas/V1ServiceOwnerDialogsCommandsCreate_Content" - } - ] - }, - "searchTags": { - "type": "array", - "description": "A list of words (tags) that will be used in dialog search queries. Not visible in end-user DTO.", - "items": { - "$ref": "#/components/schemas/V1ServiceOwnerDialogsCommandsCreate_SearchTag" - } - }, - "attachments": { - "type": "array", - "description": "The attachments associated with the dialog (on an aggregate level).", - "items": { - "$ref": "#/components/schemas/V1ServiceOwnerDialogsCommandsCreate_Attachment" - } - }, - "transmissions": { - "type": "array", - "description": "The immutable list of transmissions associated with the dialog.", - "items": { - "$ref": "#/components/schemas/V1ServiceOwnerDialogsCommandsCreate_Transmission" - } - }, - "guiActions": { - "type": "array", - "description": "The GUI actions associated with the dialog. Should be used in browser-based interactive frontends.", - "items": { - "$ref": "#/components/schemas/V1ServiceOwnerDialogsCommandsCreate_GuiAction" - } - }, - "apiActions": { - "type": "array", - "description": "The API actions associated with the dialog. Should be used in specialized, non-browser-based integrations.", - "items": { - "$ref": "#/components/schemas/V1ServiceOwnerDialogsCommandsCreate_ApiAction" - } - }, - "activities": { - "type": "array", - "description": "An immutable list of activities associated with the dialog.", - "items": { - "$ref": "#/components/schemas/V1ServiceOwnerDialogsCommandsCreate_Activity" - } - } - } - }, - "V1ServiceOwnerDialogsCommandsCreate_Content": { - "type": "object", - "additionalProperties": false, - "properties": { - "title": { - "description": "The title of the dialog.\nSupported media types: text/plain", - "oneOf": [ - { - "$ref": "#/components/schemas/V1CommonContent_ContentValue" - } - ] - }, - "summary": { - "description": "A short summary of the dialog and its current state.\nSupported media types: text/plain", - "oneOf": [ - { - "$ref": "#/components/schemas/V1CommonContent_ContentValue" - } - ] - }, - "senderName": { - "description": "Overridden sender name. If not supplied, assume \"org\" as the sender name. Must be text/plain if supplied.\nSupported media types: text/plain", - "nullable": true, - "oneOf": [ - { - "$ref": "#/components/schemas/V1CommonContent_ContentValue" - } - ] - }, - "additionalInfo": { - "description": "Additional information about the dialog.\nSupported media types: text/plain, text/markdown", - "nullable": true, - "oneOf": [ - { - "$ref": "#/components/schemas/V1CommonContent_ContentValue" - } - ] - }, - "extendedStatus": { - "description": "Used as the human-readable label used to describe the \"ExtendedStatus\" field.\nSupported media types: text/plain", - "nullable": true, - "oneOf": [ - { - "$ref": "#/components/schemas/V1CommonContent_ContentValue" - } - ] - }, - "mainContentReference": { - "description": "Front-channel embedded content. Used to dynamically embed content in the frontend from an external URL. Must be HTTPS.\nSupported media types: application/vnd.dialogporten.frontchannelembed+json;type=markdown", - "nullable": true, - "oneOf": [ - { - "$ref": "#/components/schemas/V1CommonContent_ContentValue" - } - ] - } - } - }, - "V1ServiceOwnerDialogsCommandsCreate_SearchTag": { - "type": "object", - "additionalProperties": false, - "properties": { - "value": { - "type": "string", - "description": "A search tag value." - } - } - }, - "V1ServiceOwnerDialogsCommandsCreate_Attachment": { - "type": "object", - "additionalProperties": false, - "properties": { - "id": { - "type": "string", - "description": "A self-defined UUIDv7 may be provided to support idempotent creation of attachments. If not provided, a new UUIDv7 will be generated.", - "format": "guid", - "nullable": true - }, - "displayName": { - "type": "array", - "description": "The display name of the attachment that should be used in GUIs.", - "items": { - "$ref": "#/components/schemas/V1CommonLocalizations_Localization" - } - }, - "urls": { - "type": "array", - "description": "The URLs associated with the attachment, each referring to a different representation of the attachment.", - "items": { - "$ref": "#/components/schemas/V1ServiceOwnerDialogsCommandsCreate_AttachmentUrl" - } - } - } - }, - "V1ServiceOwnerDialogsCommandsCreate_AttachmentUrl": { - "type": "object", - "additionalProperties": false, - "properties": { - "url": { - "type": "string", - "description": "The fully qualified URL of the attachment.", - "format": "uri" - }, - "mediaType": { - "type": "string", - "description": "The media type of the attachment.", - "nullable": true, - "example": "application/pdf\napplication/zip" - }, - "consumerType": { - "description": "The type of consumer the URL is intended for.", - "oneOf": [ - { - "$ref": "#/components/schemas/Attachments_AttachmentUrlConsumerType" - } - ] - } - } - }, - "V1ServiceOwnerDialogsCommandsCreate_Transmission": { - "type": "object", - "additionalProperties": false, - "properties": { - "id": { - "type": "string", - "description": "A self-defined UUIDv7 may be provided to support idempotent creation of transmissions. If not provided, a new UUIDv7 will be generated.", - "format": "guid", - "nullable": true, - "example": "01913cd5-784f-7d3b-abef-4c77b1f0972d" - }, - "createdAt": { - "type": "string", - "description": "If supplied, overrides the creating date and time for the transmission.\nIf not supplied, the current date /time will be used.", - "format": "date-time" - }, - "authorizationAttribute": { - "type": "string", - "description": "Contains an authorization resource attributeId, that can used in custom authorization rules in the XACML service\npolicy, which by default is the policy belonging to the service referred to by \"serviceResource\" in the dialog.\n \nCan also be used to refer to other service policies.", - "nullable": true, - "example": "mycustomresource\n/* equivalent to the above */\nurn:altinn:subresource:mycustomresource\nurn:altinn:task:Task_1\n/* refer to another service */\nurn:altinn:resource:some-other-service-identifier" - }, - "extendedType": { - "type": "string", - "description": "Arbitrary URI/URN describing a service-specific transmission type.\n \nRefer to the service-specific documentation provided by the service owner for details (if in use).", - "format": "uri", - "nullable": true - }, - "relatedTransmissionId": { - "type": "string", - "description": "Reference to any other transmission that this transmission is related to.", - "format": "guid", - "nullable": true - }, - "type": { - "description": "The type of transmission.", - "oneOf": [ - { - "$ref": "#/components/schemas/DialogsEntitiesTransmissions_DialogTransmissionType" - } - ] - }, - "sender": { - "description": "The actor that sent the transmission.", - "oneOf": [ - { - "$ref": "#/components/schemas/V1ServiceOwnerCommonActors_Actor" - } - ] - }, - "content": { - "description": "The transmission unstructured text content.", - "oneOf": [ - { - "$ref": "#/components/schemas/V1ServiceOwnerDialogsCommandsCreate_TransmissionContent" - } - ] - }, - "attachments": { - "type": "array", - "description": "The transmission-level attachments.", - "items": { - "$ref": "#/components/schemas/V1ServiceOwnerDialogsCommandsCreate_TransmissionAttachment" - } - } - } - }, - "V1ServiceOwnerDialogsCommandsCreate_TransmissionContent": { - "type": "object", - "additionalProperties": false, - "properties": { - "title": { - "description": "The transmission title. Must be text/plain.", - "oneOf": [ - { - "$ref": "#/components/schemas/V1CommonContent_ContentValue" - } - ] - }, - "summary": { - "description": "The transmission summary.", - "oneOf": [ - { - "$ref": "#/components/schemas/V1CommonContent_ContentValue" - } - ] - }, - "contentReference": { - "description": "Front-channel embedded content. Used to dynamically embed content in the frontend from an external URL. Must be HTTPS.\nAllowed media types: application/vnd.dialogporten.frontchannelembed+json;type=markdown", - "nullable": true, - "oneOf": [ - { - "$ref": "#/components/schemas/V1CommonContent_ContentValue" - } - ] - } - } - }, - "V1ServiceOwnerDialogsCommandsCreate_TransmissionAttachment": { - "type": "object", - "additionalProperties": false, - "properties": { - "id": { - "type": "string", - "description": "A self-defined UUIDv7 may be provided to support idempotent creation of transmission attachments. If not provided, a new UUIDv7 will be generated.", - "format": "guid", - "nullable": true, - "example": "01913cd5-784f-7d3b-abef-4c77b1f0972d" - }, - "displayName": { - "type": "array", - "description": "The display name of the attachment that should be used in GUIs.", - "items": { - "$ref": "#/components/schemas/V1CommonLocalizations_Localization" - } - }, - "urls": { - "type": "array", - "description": "The URLs associated with the attachment, each referring to a different representation of the attachment.", - "items": { - "$ref": "#/components/schemas/V1ServiceOwnerDialogsCommandsCreate_TransmissionAttachmentUrl" - } - } - } - }, - "V1ServiceOwnerDialogsCommandsCreate_TransmissionAttachmentUrl": { - "type": "object", - "additionalProperties": false, - "properties": { - "url": { - "type": "string", - "description": "The fully qualified URL of the attachment.", - "format": "uri" - }, - "mediaType": { - "type": "string", - "description": "The media type of the attachment.", - "nullable": true, - "example": "application/pdf\napplication/zip" - }, - "consumerType": { - "description": "The type of consumer the URL is intended for.", - "oneOf": [ - { - "$ref": "#/components/schemas/Attachments_AttachmentUrlConsumerType" - } - ] - } - } - }, - "V1ServiceOwnerDialogsCommandsCreate_GuiAction": { - "type": "object", - "additionalProperties": false, - "properties": { - "id": { - "type": "string", - "description": "A self-defined UUIDv7 may be provided to support idempotent creation of Gui Actions. If not provided, a new UUIDv7 will be generated.", - "format": "guid", - "nullable": true, - "example": "01913cd5-784f-7d3b-abef-4c77b1f0972d" - }, - "action": { - "type": "string", - "description": "The action identifier for the action, corresponding to the \"action\" attributeId used in the XACML service policy." - }, - "url": { - "type": "string", - "description": "The fully qualified URL of the action, to which the user will be redirected when the action is triggered. Will be set to\n\"urn:dialogporten:unauthorized\" if the user is not authorized to perform the action.", - "format": "uri", - "example": "urn:dialogporten:unauthorized\nhttps://someendpoint.com/gui/some-service-instance-id" - }, - "authorizationAttribute": { - "type": "string", - "description": "Contains an authorization resource attributeId, that can used in custom authorization rules in the XACML service\npolicy, which by default is the policy belonging to the service referred to by \"serviceResource\" in the dialog.\n \nCan also be used to refer to other service policies.", - "nullable": true, - "example": "mycustomresource\n/* equivalent to the above */\nurn:altinn:subresource:mycustomresource\nurn:altinn:task:Task_1\n/* refer to another service */\nurn:altinn:resource:some-other-service-identifier" - }, - "isDeleteDialogAction": { - "type": "boolean", - "description": "Indicates whether the action results in the dialog being deleted. Used by frontends to implement custom UX\nfor delete actions." - }, - "httpMethod": { - "description": "The HTTP method that the frontend should use when redirecting the user.", - "nullable": true, - "oneOf": [ - { - "$ref": "#/components/schemas/Http_HttpVerb" - } - ] - }, - "priority": { - "description": "Indicates a priority for the action, making it possible for frontends to adapt GUI elements based on action\npriority.", - "oneOf": [ - { - "$ref": "#/components/schemas/DialogsEntitiesActions_DialogGuiActionPriority" - } - ] - }, - "title": { - "type": "array", - "description": "The title of the action, this should be short and in verb form. Must be text/plain.", - "items": { - "$ref": "#/components/schemas/V1CommonLocalizations_Localization" - } - }, - "prompt": { - "type": "array", - "description": "If there should be a prompt asking the user for confirmation before the action is executed,\nthis field should contain the prompt text.", - "nullable": true, - "items": { - "$ref": "#/components/schemas/V1CommonLocalizations_Localization" - } - } - } - }, - "V1ServiceOwnerDialogsCommandsCreate_ApiAction": { - "type": "object", - "additionalProperties": false, - "properties": { - "id": { - "type": "string", - "description": "A self-defined UUIDv7 may be provided to support idempotent creation of Api Actions. If not provided, a new UUIDv7 will be generated.", - "format": "guid", - "nullable": true, - "example": "01913cd5-784f-7d3b-abef-4c77b1f0972d" - }, - "action": { - "type": "string", - "description": "String identifier for the action, corresponding to the \"action\" attributeId used in the XACML service policy,\nwhich by default is the policy belonging to the service referred to by \"serviceResource\" in the dialog.", - "example": "write" - }, - "authorizationAttribute": { - "type": "string", - "description": "Contains an authorization resource attributeId, that can used in custom authorization rules in the XACML service\npolicy, which by default is the policy belonging to the service referred to by \"serviceResource\" in the dialog.\n \nCan also be used to refer to other service policies.", - "nullable": true, - "example": "mycustomresource\n/* equivalent to the above */\nurn:altinn:subresource:mycustomresource\nurn:altinn:task:Task_1\n/* refer to another service */\nurn:altinn:resource:some-other-service-identifier" - }, - "endpoints": { - "type": "array", - "description": "The endpoints associated with the action.", - "items": { - "$ref": "#/components/schemas/V1ServiceOwnerDialogsCommandsCreate_ApiActionEndpoint" - } - } - } - }, - "V1ServiceOwnerDialogsCommandsCreate_ApiActionEndpoint": { - "type": "object", - "additionalProperties": false, - "properties": { - "version": { - "type": "string", - "description": "Arbitrary string indicating the version of the endpoint.", - "nullable": true - }, - "url": { - "type": "string", - "description": "The fully qualified URL of the API endpoint.", - "format": "uri" - }, - "httpMethod": { - "description": "The HTTP method that the endpoint expects for this action.", - "oneOf": [ - { - "$ref": "#/components/schemas/Http_HttpVerb" - } - ] - }, - "documentationUrl": { - "type": "string", - "description": "Link to documentation for the endpoint, providing documentation for integrators. Should be a URL to a\nhuman-readable page.", - "format": "uri", - "nullable": true - }, - "requestSchema": { - "type": "string", - "description": "Link to the request schema for the endpoint. Used to provide documentation for integrators.\nDialogporten will not validate information on this endpoint.", - "format": "uri", - "nullable": true - }, - "responseSchema": { - "type": "string", - "description": "Link to the response schema for the endpoint. Used to provide documentation for integrators.\nDialogporten will not validate information on this endpoint.", - "format": "uri", - "nullable": true - }, - "deprecated": { - "type": "boolean", - "description": "Boolean indicating if the endpoint is deprecated." - }, - "sunsetAt": { - "type": "string", - "description": "Date and time when the endpoint will no longer function. Only set if the endpoint is deprecated. Dialogporten\nwill not enforce this date.", - "format": "date-time", - "nullable": true - } - } - }, - "V1ServiceOwnerDialogsCommandsCreate_Activity": { - "type": "object", - "additionalProperties": false, - "properties": { - "id": { - "type": "string", - "description": "A self-defined UUIDv7 may be provided to support idempotent creation of activities. If not provided, a new UUIDv7 will be generated.", - "format": "guid", - "nullable": true, - "example": "01913cd5-784f-7d3b-abef-4c77b1f0972d" - }, - "createdAt": { - "type": "string", - "description": "If supplied, overrides the creating date and time for the transmission.\nIf not supplied, the current date /time will be used.", - "format": "date-time", - "nullable": true - }, - "extendedType": { - "type": "string", - "description": "Arbitrary URI/URN describing a service-specific transmission type.", - "format": "uri", - "nullable": true - }, - "type": { - "description": "The type of transmission.", - "oneOf": [ - { - "$ref": "#/components/schemas/DialogsEntitiesActivities_DialogActivityType" - } - ] - }, - "transmissionId": { - "type": "string", - "description": "If the activity is related to a particular transmission, this field will contain the transmission identifier.\nMust be present in the request body.", - "format": "guid", - "nullable": true - }, - "performedBy": { - "description": "The actor that performed the activity.", - "oneOf": [ - { - "$ref": "#/components/schemas/V1ServiceOwnerCommonActors_Actor" - } - ] - }, - "description": { - "type": "array", - "description": "Unstructured text describing the activity. Only set if the activity type is \"Information\".", - "items": { - "$ref": "#/components/schemas/V1CommonLocalizations_Localization" - } - } - } - }, - "V1ServiceOwnerDialogActivitiesQueriesSearch_Activity": { - "type": "object", - "additionalProperties": false, - "properties": { - "id": { - "type": "string", - "format": "guid" - }, - "createdAt": { - "type": "string", - "format": "date-time" - }, - "extendedType": { - "type": "string", - "format": "uri", - "nullable": true - }, - "type": { - "$ref": "#/components/schemas/DialogsEntitiesActivities_DialogActivityType" - }, - "deletedAt": { - "type": "string", - "format": "date-time", - "nullable": true - }, - "transmissionId": { - "type": "string", - "format": "guid", - "nullable": true - } - } - }, - "V1ServiceOwnerDialogActivitiesQueriesNotificationCondition_NotificationCondition": { - "type": "object", - "additionalProperties": false, - "properties": { - "sendNotification": { - "type": "boolean" - } - } - }, - "V1ServiceOwnerDialogActivitiesQueriesGet_Activity": { - "type": "object", - "additionalProperties": false, - "properties": { - "id": { - "type": "string", - "format": "guid" - }, - "createdAt": { - "type": "string", - "format": "date-time", - "nullable": true - }, - "extendedType": { - "type": "string", - "format": "uri", - "nullable": true - }, - "type": { - "$ref": "#/components/schemas/DialogsEntitiesActivities_DialogActivityType" - }, - "deletedAt": { - "type": "string", - "format": "date-time", - "nullable": true - }, - "transmissionId": { - "type": "string", - "format": "guid", - "nullable": true - }, - "performedBy": { - "$ref": "#/components/schemas/V1ServiceOwnerCommonActors_Actor" - }, - "description": { - "type": "array", - "items": { - "$ref": "#/components/schemas/V1CommonLocalizations_Localization" - } - } - } - }, - "V1ServiceOwnerDialogActivitiesQueriesNotificationCondition_NotificationConditionType": { - "type": "string", - "description": "", - "x-enumNames": [ - "NotExists", - "Exists" - ], - "enum": [ - "NotExists", - "Exists" - ] - }, - "V1ServiceOwnerDialogActivitiesCreate_ActivityRequest": { - "type": "object", - "additionalProperties": false, - "properties": { - "id": { - "type": "string", - "description": "The UUDIv7 of the action may be provided to support idempotent additions to the list of activities.\nIf not supplied, a new UUIDv7 will be generated.", - "format": "guid", - "nullable": true, - "example": "01913cd5-784f-7d3b-abef-4c77b1f0972d" - }, - "createdAt": { - "type": "string", - "description": "If supplied, overrides the creating date and time for the transmission.\nIf not supplied, the current date /time will be used.", - "format": "date-time", - "nullable": true - }, - "extendedType": { - "type": "string", - "description": "Arbitrary URI/URN describing a service-specific transmission type.", - "format": "uri", - "nullable": true - }, - "type": { - "description": "The type of transmission.", - "oneOf": [ - { - "$ref": "#/components/schemas/DialogsEntitiesActivities_DialogActivityType" - } - ] - }, - "transmissionId": { - "type": "string", - "description": "If the activity is related to a particular transmission, this field will contain the transmission identifier.\nMust be present in the request body.", - "format": "guid", - "nullable": true - }, - "performedBy": { - "description": "The actor that performed the activity.", - "oneOf": [ - { - "$ref": "#/components/schemas/V1ServiceOwnerCommonActors_Actor" - } - ] - }, - "description": { - "type": "array", - "description": "Unstructured text describing the activity. Only set if the activity type is \"Information\".", - "items": { - "$ref": "#/components/schemas/V1CommonLocalizations_Localization" - } - } - } - }, - "V1EndUserPartiesQueriesGet_Parties": { - "type": "object", - "additionalProperties": false, - "properties": { - "authorizedParties": { - "type": "array", - "items": { - "$ref": "#/components/schemas/V1EndUserPartiesQueriesGet_AuthorizedParty" - } - } - } - }, - "V1EndUserPartiesQueriesGet_AuthorizedParty": { - "type": "object", - "additionalProperties": false, - "properties": { - "party": { - "type": "string" - }, - "name": { - "type": "string" - }, - "partyType": { - "type": "string" - }, - "isDeleted": { - "type": "boolean" - }, - "hasKeyRole": { - "type": "boolean" - }, - "isCurrentEndUser": { - "type": "boolean" - }, - "isMainAdministrator": { - "type": "boolean" - }, - "isAccessManager": { - "type": "boolean" - }, - "hasOnlyAccessToSubParties": { - "type": "boolean" - }, - "subParties": { - "type": "array", - "nullable": true, - "items": { - "$ref": "#/components/schemas/V1EndUserPartiesQueriesGet_AuthorizedParty" - } - } - } - }, - "V1EndUserDialogTransmissionsQueriesSearch_Transmission": { - "type": "object", - "additionalProperties": false, - "properties": { - "id": { - "type": "string", - "description": "The unique identifier for the transmission in UUIDv7 format.", - "format": "guid" - }, - "createdAt": { - "type": "string", - "description": "The date and time when the transmission was created.", - "format": "date-time" - }, - "authorizationAttribute": { - "type": "string", - "description": "The authorization attribute associated with the transmission.", - "nullable": true - }, - "isAuthorized": { - "type": "boolean", - "description": "Flag indicating if the authenticated user is authorized for this transmission. If not, embedded content and\nthe attachments will not be available." - }, - "extendedType": { - "type": "string", - "description": "The extended type URI for the transmission.", - "format": "uri", - "nullable": true - }, - "relatedTransmissionId": { - "type": "string", - "description": "The unique identifier for the related transmission, if any.", - "format": "guid", - "nullable": true - }, - "deletedAt": { - "type": "string", - "description": "The date and time when the transmission was deleted, if applicable.", - "format": "date-time", - "nullable": true - }, - "type": { - "description": "The type of the transmission.", - "oneOf": [ - { - "$ref": "#/components/schemas/DialogsEntitiesTransmissions_DialogTransmissionType" - } - ] - }, - "sender": { - "description": "The sender actor information for the transmission.", - "oneOf": [ - { - "$ref": "#/components/schemas/V1EndUserCommonActors_Actor" - } - ] - }, - "content": { - "description": "The content of the transmission.", - "oneOf": [ - { - "$ref": "#/components/schemas/V1EndUserDialogTransmissionsQueriesSearch_Content" - } - ] - }, - "attachments": { - "type": "array", - "description": "The attachments associated with the transmission.", - "items": { - "$ref": "#/components/schemas/V1EndUserDialogTransmissionsQueriesSearch_Attachment" - } - } - } - }, - "V1EndUserCommonActors_Actor": { - "type": "object", - "additionalProperties": false, - "properties": { - "actorType": { - "description": "The type of actor that sent the transmission.", - "oneOf": [ - { - "$ref": "#/components/schemas/Actors_ActorType" - } - ] - }, - "actorName": { - "type": "string", - "description": "Specifies the name of the entity that sent the transmission. Mutually exclusive with ActorId. If ActorId\nis supplied, the name will be automatically populated from the name registries.", - "nullable": true, - "example": "Ola Nordmann" - }, - "actorId": { - "type": "string", - "description": "The identifier of the person or organization that sent the transmission. Mutually exclusive with ActorName.\nMight be omitted if ActorType is \"ServiceOwner\".", - "nullable": true, - "example": "urn:altinn:person:identifier-no:12018212345" - } - } - }, - "V1EndUserDialogTransmissionsQueriesSearch_Content": { - "type": "object", - "additionalProperties": false, - "properties": { - "title": { - "description": "The title of the content.", - "oneOf": [ - { - "$ref": "#/components/schemas/V1CommonContent_ContentValue" - } - ] - }, - "summary": { - "description": "The summary of the content.", - "oneOf": [ - { - "$ref": "#/components/schemas/V1CommonContent_ContentValue" - } - ] - }, - "contentReference": { - "description": "Front-channel embedded content. Used to dynamically embed content in the frontend from an external URL.\nAllowed media types: application/vnd.dialogporten.frontchannelembed+json;type=markdown", - "nullable": true, - "oneOf": [ - { - "$ref": "#/components/schemas/V1CommonContent_ContentValue" - } - ] - } - } - }, - "V1EndUserDialogTransmissionsQueriesSearch_Attachment": { - "type": "object", - "additionalProperties": false, - "properties": { - "id": { - "type": "string", - "description": "The unique identifier for the attachment in UUIDv7 format.", - "format": "guid" - }, - "displayName": { - "type": "array", - "description": "The display name of the attachment that should be used in GUIs.", - "items": { - "$ref": "#/components/schemas/V1CommonLocalizations_Localization" - } - }, - "urls": { - "type": "array", - "description": "The URLs associated with the attachment, each referring to a different representation of the attachment.", - "items": { - "$ref": "#/components/schemas/V1EndUserDialogTransmissionsQueriesSearch_AttachmentUrl" - } - } - } - }, - "V1EndUserDialogTransmissionsQueriesSearch_AttachmentUrl": { - "type": "object", - "additionalProperties": false, - "properties": { - "id": { - "type": "string", - "description": "The unique identifier for the attachment URL in UUIDv7 format.", - "format": "guid" - }, - "url": { - "type": "string", - "description": "The fully qualified URL of the attachment. Will be set to \"urn:dialogporten:unauthorized\" if the user is\nnot authorized to access the transmission.", - "format": "uri", - "example": "https://someendpoint.com/someattachment.pdf\nurn:dialogporten:unauthorized" - }, - "mediaType": { - "type": "string", - "description": "The media type of the attachment.", - "nullable": true, - "example": "application/pdf\napplication/zip" - }, - "consumerType": { - "description": "The type of consumer the URL is intended for.", - "oneOf": [ - { - "$ref": "#/components/schemas/Attachments_AttachmentUrlConsumerType" - } - ] - } - } - }, - "V1EndUserDialogTransmissionsQueriesGet_Transmission": { - "type": "object", - "additionalProperties": false, - "properties": { - "id": { - "type": "string", - "description": "The unique identifier for the transmission in UUIDv7 format.", - "format": "guid" - }, - "createdAt": { - "type": "string", - "description": "The date and time when the transmission was created.", - "format": "date-time" - }, - "authorizationAttribute": { - "type": "string", - "description": "The authorization attribute associated with the transmission.", - "nullable": true - }, - "isAuthorized": { - "type": "boolean", - "description": "Flag indicating if the authenticated user is authorized for this transmission. If not, embedded content and\nthe attachments will not be available." - }, - "extendedType": { - "type": "string", - "description": "The extended type URI for the transmission.", - "format": "uri", - "nullable": true - }, - "relatedTransmissionId": { - "type": "string", - "description": "The unique identifier for the related transmission, if any.", - "format": "guid", - "nullable": true - }, - "deletedAt": { - "type": "string", - "description": "The date and time when the transmission was deleted, if applicable.", - "format": "date-time", - "nullable": true - }, - "type": { - "description": "The type of the transmission.", - "oneOf": [ - { - "$ref": "#/components/schemas/DialogsEntitiesTransmissions_DialogTransmissionType" - } - ] - }, - "sender": { - "description": "The sender actor information for the transmission.", - "oneOf": [ - { - "$ref": "#/components/schemas/V1EndUserCommonActors_Actor" - } - ] - }, - "content": { - "description": "The content of the transmission.", - "oneOf": [ - { - "$ref": "#/components/schemas/V1EndUserDialogTransmissionsQueriesGet_Content" - } - ] - }, - "attachments": { - "type": "array", - "description": "The attachments associated with the transmission.", - "items": { - "$ref": "#/components/schemas/V1EndUserDialogTransmissionsQueriesGet_Attachment" - } - } - } - }, - "V1EndUserDialogTransmissionsQueriesGet_Content": { - "type": "object", - "additionalProperties": false, - "properties": { - "title": { - "description": "The title of the content.", - "oneOf": [ - { - "$ref": "#/components/schemas/V1CommonContent_ContentValue" - } - ] - }, - "summary": { - "description": "The summary of the content.", - "oneOf": [ - { - "$ref": "#/components/schemas/V1CommonContent_ContentValue" - } - ] - }, - "contentReference": { - "description": "Front-channel embedded content. Used to dynamically embed content in the frontend from an external URL.\nAllowed media types: application/vnd.dialogporten.frontchannelembed+json;type=markdown", - "nullable": true, - "oneOf": [ - { - "$ref": "#/components/schemas/V1CommonContent_ContentValue" - } - ] - } - } - }, - "V1EndUserDialogTransmissionsQueriesGet_Attachment": { - "type": "object", - "additionalProperties": false, - "properties": { - "id": { - "type": "string", - "description": "The unique identifier for the attachment in UUIDv7 format.", - "format": "guid" - }, - "displayName": { - "type": "array", - "description": "The display name of the attachment that should be used in GUIs.", - "items": { - "$ref": "#/components/schemas/V1CommonLocalizations_Localization" - } - }, - "urls": { - "type": "array", - "description": "The URLs associated with the attachment, each referring to a different representation of the attachment.", - "items": { - "$ref": "#/components/schemas/V1EndUserDialogTransmissionsQueriesGet_AttachmentUrl" - } - } - } - }, - "V1EndUserDialogTransmissionsQueriesGet_AttachmentUrl": { - "type": "object", - "additionalProperties": false, - "properties": { - "id": { - "type": "string", - "description": "The unique identifier for the attachment URL in UUIDv7 format.", - "format": "guid" - }, - "url": { - "type": "string", - "description": "The fully qualified URL of the attachment. Will be set to \"urn:dialogporten:unauthorized\" if the user is\nnot authorized to access the transmission.", - "format": "uri", - "example": "https://someendpoint.com/someattachment.pdf\nurn:dialogporten:unauthorized" - }, - "mediaType": { - "type": "string", - "description": "The media type of the attachment.", - "nullable": true, - "example": "application/pdf\napplication/zip" - }, - "consumerType": { - "description": "The type of consumer the URL is intended for.", - "oneOf": [ - { - "$ref": "#/components/schemas/Attachments_AttachmentUrlConsumerType" - } - ] - } - } - }, - "V1EndUserDialogSystemLabelsCommandsSet_SystemLabelCommand": { - "type": "object", - "additionalProperties": false, - "properties": { - "label": { - "$ref": "#/components/schemas/DialogEndUserContextsEntities_SystemLabel" - }, - "ifMatchDialogRevision": { - "type": "string", - "format": "guid", - "nullable": true - } - } - }, - "V1EndUserDialogSeenLogsQueriesSearch_SeenLog": { - "type": "object", - "additionalProperties": false, - "properties": { - "id": { - "type": "string", - "format": "guid" - }, - "seenAt": { - "type": "string", - "format": "date-time" - }, - "seenBy": { - "$ref": "#/components/schemas/V1EndUserCommonActors_Actor" - }, - "isViaServiceOwner": { - "type": "boolean" - }, - "isCurrentEndUser": { - "type": "boolean" - } - } - }, - "V1EndUserDialogSeenLogsQueriesGet_SeenLog": { - "type": "object", - "additionalProperties": false, - "properties": { - "id": { - "type": "string", - "format": "guid" - }, - "seenAt": { - "type": "string", - "format": "date-time" - }, - "seenBy": { - "$ref": "#/components/schemas/V1EndUserCommonActors_Actor" - }, - "isViaServiceOwner": { - "type": "boolean" - }, - "isCurrentEndUser": { - "type": "boolean" - } - } - }, - "PaginatedListOfV1EndUserDialogsQueriesSearch_Dialog": { - "type": "object", - "additionalProperties": false, - "properties": { - "items": { - "type": "array", - "description": "The paginated list of items", - "items": { - "$ref": "#/components/schemas/V1EndUserDialogsQueriesSearch_Dialog" - } - }, - "hasNextPage": { - "type": "boolean", - "description": "Whether there are more items available that can be fetched by supplying the continuation token" - }, - "continuationToken": { - "type": "string", - "description": "The continuation token to be used to fetch the next page of items", - "nullable": true, - "example": "createdat_2024-07-31T09:09:03.0257090Z,id_0c089101-b7cf-a476-955c-f00a78d74a4e" - }, - "orderBy": { - "type": "string", - "description": "The current sorting order of the items", - "example": "createdat_desc,id_desc" - } - } - }, - "V1EndUserDialogsQueriesSearch_Dialog": { - "type": "object", - "additionalProperties": false, - "properties": { - "id": { - "type": "string", - "description": "The unique identifier for the dialog in UUIDv7 format.", - "format": "guid", - "example": "01913cd5-784f-7d3b-abef-4c77b1f0972d" - }, - "org": { - "type": "string", - "description": "The service owner code representing the organization (service owner) related to this dialog.", - "example": "ske" - }, - "serviceResource": { - "type": "string", - "description": "The service identifier for the service that the dialog is related to in URN-format.\nThis corresponds to a service resource in the Altinn Resource Registry.", - "example": "urn:altinn:resource:some-service-identifier" - }, - "serviceResourceType": { - "type": "string", - "description": "The ServiceResource type, as defined in Altinn Resource Registry (see ResourceType)." - }, - "party": { - "type": "string", - "description": "The party code representing the organization or person that the dialog belongs to in URN format.", - "example": "urn:altinn:person:identifier-no:01125512345\nurn:altinn:organization:identifier-no:912345678" - }, - "progress": { - "type": "integer", - "description": "Advisory indicator of progress, represented as 1-100 percentage value. 100% representing a dialog that has come\nto a natural completion (successful or not).", - "format": "int32", - "nullable": true - }, - "process": { - "type": "string", - "description": "Optional process identifier used to indicate a business process this dialog belongs to.", - "nullable": true - }, - "precedingProcess": { - "type": "string", - "description": "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.", - "nullable": true - }, - "guiAttachmentCount": { - "type": "integer", - "description": "The number of attachments in the dialog made available for browser-based frontends.", - "format": "int32", - "nullable": true - }, - "extendedStatus": { - "type": "string", - "description": "Arbitrary string with a service-specific indicator of status, typically used to indicate a fine-grained state of\nthe dialog to further specify the \"status\" enum.\n \nRefer to the service-specific documentation provided by the service owner for details on the possible values (if\nin use).", - "nullable": true - }, - "externalReference": { - "type": "string", - "description": "Arbitrary string with a service-specific reference to an external system or service.\n \nRefer to the service-specific documentation provided by the service owner for details (if in use).", - "nullable": true - }, - "createdAt": { - "type": "string", - "description": "The date and time when the dialog was created.", - "format": "date-time", - "example": "2022-12-31T23:59:59Z" - }, - "updatedAt": { - "type": "string", - "description": "The date and time when the dialog was last updated.", - "format": "date-time", - "example": "2022-12-31T23:59:59Z" - }, - "dueAt": { - "type": "string", - "description": "The due date for the dialog. This is the last date when the dialog is expected to be completed.", - "format": "date-time", - "nullable": true, - "example": "2022-12-31T23:59:59Z" - }, - "status": { - "description": "The aggregated status of the dialog.", - "oneOf": [ - { - "$ref": "#/components/schemas/DialogsEntities_DialogStatus" - } - ] - }, - "systemLabel": { - "description": "Current display state.", - "oneOf": [ - { - "$ref": "#/components/schemas/DialogEndUserContextsEntities_SystemLabel" - } - ] - }, - "latestActivity": { - "description": "The latest entry in the dialog's activity log.", - "nullable": true, - "oneOf": [ - { - "$ref": "#/components/schemas/V1EndUserDialogsQueriesSearch_DialogActivity" - } - ] - }, - "seenSinceLastUpdate": { - "type": "array", - "description": "The list of seen log entries for the dialog newer than the dialog ChangedAt date.", - "items": { - "$ref": "#/components/schemas/V1EndUserDialogsQueriesSearch_DialogSeenLog" - } - }, - "content": { - "description": "The content of the dialog in search results.", - "oneOf": [ - { - "$ref": "#/components/schemas/V1EndUserDialogsQueriesSearch_Content" - } - ] - } - } - }, - "V1EndUserDialogsQueriesSearch_DialogActivity": { - "type": "object", - "additionalProperties": false, - "properties": { - "id": { - "type": "string", - "description": "The unique identifier for the activity in UUIDv7 format.", - "format": "guid" - }, - "createdAt": { - "type": "string", - "description": "The date and time when the activity was created.", - "format": "date-time", - "nullable": true - }, - "extendedType": { - "type": "string", - "description": "An arbitrary string with a service-specific activity type.\n \nConsult the service-specific documentation provided by the service owner for details (if in use).", - "format": "uri", - "nullable": true - }, - "type": { - "description": "The type of activity.", - "oneOf": [ - { - "$ref": "#/components/schemas/DialogsEntitiesActivities_DialogActivityType" - } - ] - }, - "transmissionId": { - "type": "string", - "description": "If the activity is related to a particular transmission, this field will contain the transmission identifier.", - "format": "guid", - "nullable": true - }, - "performedBy": { - "description": "The actor that performed the activity.", - "oneOf": [ - { - "$ref": "#/components/schemas/V1EndUserCommonActors_Actor" - } - ] - }, - "description": { - "type": "array", - "description": "Unstructured text describing the activity. Only set if the activity type is \"Information\".", - "items": { - "$ref": "#/components/schemas/V1CommonLocalizations_Localization" - } - } - } - }, - "V1EndUserDialogsQueriesSearch_DialogSeenLog": { - "type": "object", - "additionalProperties": false, - "properties": { - "id": { - "type": "string", - "description": "The unique identifier for the seen log entry in UUIDv7 format.", - "format": "guid" - }, - "seenAt": { - "type": "string", - "description": "The timestamp when the dialog revision was seen.", - "format": "date-time" - }, - "seenBy": { - "description": "The actor that saw the dialog revision.", - "oneOf": [ - { - "$ref": "#/components/schemas/V1EndUserCommonActors_Actor" - } - ] - }, - "isViaServiceOwner": { - "type": "boolean", - "description": "Flag indicating whether the seen log entry was created via the service owner.\n \nThis is used when the service owner uses the service owner API to implement its own frontend.", - "nullable": true - }, - "isCurrentEndUser": { - "type": "boolean", - "description": "Flag indicating whether the seen log entry was created by the current end user." - } - } - }, - "V1EndUserDialogsQueriesSearch_Content": { - "type": "object", - "additionalProperties": false, - "properties": { - "title": { - "description": "The title of the dialog.", - "oneOf": [ - { - "$ref": "#/components/schemas/V1CommonContent_ContentValue" - } - ] - }, - "summary": { - "description": "A short summary of the dialog and its current state.", - "oneOf": [ - { - "$ref": "#/components/schemas/V1CommonContent_ContentValue" - } - ] - }, - "senderName": { - "description": "Overridden sender name. If not supplied, assume \"org\" as the sender name.", - "nullable": true, - "oneOf": [ - { - "$ref": "#/components/schemas/V1CommonContent_ContentValue" - } - ] - }, - "extendedStatus": { - "description": "Used as the human-readable label used to describe the \"ExtendedStatus\" field.", - "nullable": true, - "oneOf": [ - { - "$ref": "#/components/schemas/V1CommonContent_ContentValue" - } - ] - } - } - }, - "V1EndUserDialogsQueriesGet_Dialog": { - "type": "object", - "additionalProperties": false, - "properties": { - "id": { - "type": "string", - "description": "The unique identifier for the dialog in UUIDv7 format.", - "format": "guid", - "example": "01913cd5-784f-7d3b-abef-4c77b1f0972d" - }, - "revision": { - "type": "string", - "description": "The unique identifier for the revision in UUIDv4 format.", - "format": "guid", - "example": "a312cb9c-7632-43c2-aa38-69b06aed56ca" - }, - "org": { - "type": "string", - "description": "The service owner code representing the organization (service owner) related to this dialog.", - "example": "ske" - }, - "serviceResource": { - "type": "string", - "description": "The service identifier for the service that the dialog is related to in URN-format.\nThis corresponds to a service resource in the Altinn Resource Registry.", - "example": "urn:altinn:resource:some-service-identifier" - }, - "serviceResourceType": { - "type": "string", - "description": "The ServiceResource type, as defined in Altinn Resource Registry (see ResourceType)." - }, - "party": { - "type": "string", - "description": "The party code representing the organization or person that the dialog belongs to in URN format.", - "example": "urn:altinn:person:identifier-no:01125512345\nurn:altinn:organization:identifier-no:912345678" - }, - "progress": { - "type": "integer", - "description": "Advisory indicator of progress, represented as 1-100 percentage value. 100% representing a dialog that has come\nto a natural completion (successful or not).", - "format": "int32", - "nullable": true - }, - "process": { - "type": "string", - "description": "Optional process identifier used to indicate a business process this dialog belongs to.", - "nullable": true - }, - "precedingProcess": { - "type": "string", - "description": "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.", - "nullable": true - }, - "extendedStatus": { - "type": "string", - "description": "Arbitrary string with a service-specific indicator of status, typically used to indicate a fine-grained state of\nthe dialog to further specify the \"status\" enum.\n \nRefer to the service-specific documentation provided by the service owner for details on the possible values (if\nin use).", - "nullable": true - }, - "externalReference": { - "type": "string", - "description": "Arbitrary string with a service-specific reference to an external system or service.\n \nRefer to the service-specific documentation provided by the service owner for details (if in use).", - "nullable": true - }, - "dueAt": { - "type": "string", - "description": "The due date for the dialog. Dialogs past due date might be marked as such in frontends but will still be available.", - "format": "date-time", - "nullable": true, - "example": "2022-12-31T23:59:59Z" - }, - "expiresAt": { - "type": "string", - "description": "The expiration date for the dialog. This is the last date when the dialog is available for the end user.\n \nAfter this date is passed, the dialog will be considered expired and no longer available for the end user in any\nAPI. If not supplied, the dialog will be considered to never expire. This field can be changed by the service\nowner after the dialog has been created.", - "format": "date-time", - "nullable": true, - "example": "2022-12-31T23:59:59Z" - }, - "createdAt": { - "type": "string", - "description": "The date and time when the dialog was created.", - "format": "date-time", - "example": "2022-12-31T23:59:59Z" - }, - "updatedAt": { - "type": "string", - "description": "The date and time when the dialog was last updated.", - "format": "date-time", - "example": "2022-12-31T23:59:59Z" - }, - "status": { - "description": "The aggregated status of the dialog.", - "oneOf": [ - { - "$ref": "#/components/schemas/DialogsEntities_DialogStatus" - } - ] - }, - "systemLabel": { - "description": "Current display state.", - "oneOf": [ - { - "$ref": "#/components/schemas/DialogEndUserContextsEntities_SystemLabel" - } - ] - }, - "content": { - "description": "The dialog unstructured text content.", - "oneOf": [ - { - "$ref": "#/components/schemas/V1EndUserDialogsQueriesGet_Content" - } - ] - }, - "dialogToken": { - "type": "string", - "description": "The dialog token. May be used (if supported) against external URLs referred to in this dialog's apiActions,\ntransmissions or attachments. It should also be used for front-channel embeds.", - "nullable": true - }, - "attachments": { - "type": "array", - "description": "The attachments associated with the dialog (on an aggregate level).", - "items": { - "$ref": "#/components/schemas/V1EndUserDialogsQueriesGet_DialogAttachment" - } - }, - "transmissions": { - "type": "array", - "description": "The immutable list of transmissions associated with the dialog.", - "items": { - "$ref": "#/components/schemas/V1EndUserDialogsQueriesGet_DialogTransmission" - } - }, - "guiActions": { - "type": "array", - "description": "The GUI actions associated with the dialog. Should be used in browser-based interactive frontends.", - "items": { - "$ref": "#/components/schemas/V1EndUserDialogsQueriesGet_DialogGuiAction" - } - }, - "apiActions": { - "type": "array", - "description": "The API actions associated with the dialog. Should be used in specialized, non-browser-based integrations.", - "items": { - "$ref": "#/components/schemas/V1EndUserDialogsQueriesGet_DialogApiAction" - } - }, - "activities": { - "type": "array", - "description": "An immutable list of activities associated with the dialog.", - "items": { - "$ref": "#/components/schemas/V1EndUserDialogsQueriesGet_DialogActivity" - } - }, - "seenSinceLastUpdate": { - "type": "array", - "description": "The list of seen log entries for the dialog newer than the dialog ChangedAt date.", - "items": { - "$ref": "#/components/schemas/V1EndUserDialogsQueriesGet_DialogSeenLog" - } - } - } - }, - "V1EndUserDialogsQueriesGet_Content": { - "type": "object", - "additionalProperties": false, - "properties": { - "title": { - "description": "The title of the dialog.", - "oneOf": [ - { - "$ref": "#/components/schemas/V1CommonContent_ContentValue" - } - ] - }, - "summary": { - "description": "A short summary of the dialog and its current state.", - "oneOf": [ - { - "$ref": "#/components/schemas/V1CommonContent_ContentValue" - } - ] - }, - "senderName": { - "description": "Overridden sender name. If not supplied, assume \"org\" as the sender name.", - "nullable": true, - "oneOf": [ - { - "$ref": "#/components/schemas/V1CommonContent_ContentValue" - } - ] - }, - "additionalInfo": { - "description": "Additional information about the dialog, this may contain Markdown.", - "nullable": true, - "oneOf": [ - { - "$ref": "#/components/schemas/V1CommonContent_ContentValue" - } - ] - }, - "extendedStatus": { - "description": "Used as the human-readable label used to describe the \"ExtendedStatus\" field.", - "nullable": true, - "oneOf": [ - { - "$ref": "#/components/schemas/V1CommonContent_ContentValue" - } - ] - }, - "mainContentReference": { - "description": "Front-channel embedded content. Used to dynamically embed content in the frontend from an external URL.", - "nullable": true, - "oneOf": [ - { - "$ref": "#/components/schemas/V1CommonContent_ContentValue" - } - ] - } - } - }, - "V1EndUserDialogsQueriesGet_DialogAttachment": { - "type": "object", - "additionalProperties": false, - "properties": { - "id": { - "type": "string", - "description": "The unique identifier for the attachment in UUIDv7 format.", - "format": "guid" - }, - "displayName": { - "type": "array", - "description": "The display name of the attachment that should be used in GUIs.", - "items": { - "$ref": "#/components/schemas/V1CommonLocalizations_Localization" - } - }, - "urls": { - "type": "array", - "description": "The URLs associated with the attachment, each referring to a different representation of the attachment.", - "items": { - "$ref": "#/components/schemas/V1EndUserDialogsQueriesGet_DialogAttachmentUrl" - } - } - } - }, - "V1EndUserDialogsQueriesGet_DialogAttachmentUrl": { - "type": "object", - "additionalProperties": false, - "properties": { - "id": { - "type": "string", - "description": "The unique identifier for the attachment URL in UUIDv7 format.", - "format": "guid" - }, - "url": { - "type": "string", - "description": "The fully qualified URL of the attachment.", - "format": "uri", - "example": "https://someendpoint.com/someattachment.pdf" - }, - "mediaType": { - "type": "string", - "description": "The media type of the attachment.", - "nullable": true, - "example": "application/pdf\napplication/zip" - }, - "consumerType": { - "description": "What type of consumer the URL is intended for.", - "oneOf": [ - { - "$ref": "#/components/schemas/Attachments_AttachmentUrlConsumerType" - } - ] - } - } - }, - "V1EndUserDialogsQueriesGet_DialogTransmission": { - "type": "object", - "additionalProperties": false, - "properties": { - "id": { - "type": "string", - "description": "The unique identifier for the transmission in UUIDv7 format.", - "format": "guid" - }, - "createdAt": { - "type": "string", - "description": "The date and time when the transmission was created.", - "format": "date-time" - }, - "authorizationAttribute": { - "type": "string", - "description": "Contains an authorization resource attributeId, that can used in custom authorization rules in the XACML service\npolicy, which by default is the policy belonging to the service referred to by \"serviceResource\" in the dialog.\n \nCan also be used to refer to other service policies.", - "nullable": true, - "example": "mycustomresource\n/* equivalent to the above */\nurn:altinn:subresource:mycustomresource\nurn:altinn:task:Task_1\n/* refer to another service */\nurn:altinn:resource:some-other-service-identifier" - }, - "isAuthorized": { - "type": "boolean", - "description": "Flag indicating if the authenticated user is authorized for this transmission. If not, embedded content and\nthe attachments will not be available." - }, - "extendedType": { - "type": "string", - "description": "Arbitrary URI/URN describing a service-specific transmission type.\n \nRefer to the service-specific documentation provided by the service owner for details (if in use).", - "format": "uri", - "nullable": true - }, - "relatedTransmissionId": { - "type": "string", - "description": "Reference to any other transmission that this transmission is related to.", - "format": "guid", - "nullable": true - }, - "type": { - "description": "The type of transmission.", - "oneOf": [ - { - "$ref": "#/components/schemas/DialogsEntitiesTransmissions_DialogTransmissionType" - } - ] - }, - "sender": { - "description": "The actor that sent the transmission.", - "oneOf": [ - { - "$ref": "#/components/schemas/V1EndUserCommonActors_Actor" - } - ] - }, - "content": { - "description": "The transmission unstructured text content.", - "oneOf": [ - { - "$ref": "#/components/schemas/V1EndUserDialogsQueriesGet_DialogTransmissionContent" - } - ] - }, - "attachments": { - "type": "array", - "description": "The transmission-level attachments.", - "items": { - "$ref": "#/components/schemas/V1EndUserDialogsQueriesGet_DialogTransmissionAttachment" - } - } - } - }, - "V1EndUserDialogsQueriesGet_DialogTransmissionContent": { - "type": "object", - "additionalProperties": false, - "properties": { - "title": { - "description": "The transmission title.", - "oneOf": [ - { - "$ref": "#/components/schemas/V1CommonContent_ContentValue" - } - ] - }, - "summary": { - "description": "The transmission summary.", - "oneOf": [ - { - "$ref": "#/components/schemas/V1CommonContent_ContentValue" - } - ] - }, - "contentReference": { - "description": "Front-channel embedded content. Used to dynamically embed content in the frontend from an external URL.\nAllowed media types: application/vnd.dialogporten.frontchannelembed+json;type=markdown", - "nullable": true, - "oneOf": [ - { - "$ref": "#/components/schemas/V1CommonContent_ContentValue" - } - ] - } - } - }, - "V1EndUserDialogsQueriesGet_DialogTransmissionAttachment": { - "type": "object", - "additionalProperties": false, - "properties": { - "id": { - "type": "string", - "description": "The unique identifier for the attachment in UUIDv7 format.", - "format": "guid" - }, - "displayName": { - "type": "array", - "description": "The display name of the attachment that should be used in GUIs.", - "items": { - "$ref": "#/components/schemas/V1CommonLocalizations_Localization" - } - }, - "urls": { - "type": "array", - "description": "The URLs associated with the attachment, each referring to a different representation of the attachment.", - "items": { - "$ref": "#/components/schemas/V1EndUserDialogsQueriesGet_DialogTransmissionAttachmentUrl" - } - } - } - }, - "V1EndUserDialogsQueriesGet_DialogTransmissionAttachmentUrl": { - "type": "object", - "additionalProperties": false, - "properties": { - "url": { - "type": "string", - "description": "The fully qualified URL of the attachment. Will be set to \"urn:dialogporten:unauthorized\" if the user is\nnot authorized to access the transmission.", - "format": "uri", - "example": "https://someendpoint.com/someattachment.pdf\nurn:dialogporten:unauthorized" - }, - "mediaType": { - "type": "string", - "description": "The media type of the attachment.", - "nullable": true, - "example": "application/pdf\napplication/zip" - }, - "consumerType": { - "description": "The type of consumer the URL is intended for.", - "oneOf": [ - { - "$ref": "#/components/schemas/Attachments_AttachmentUrlConsumerType" - } - ] - } - } - }, - "V1EndUserDialogsQueriesGet_DialogGuiAction": { - "type": "object", - "additionalProperties": false, - "properties": { - "id": { - "type": "string", - "description": "The unique identifier for the action in UUIDv7 format.", - "format": "guid" - }, - "action": { - "type": "string", - "description": "The action identifier for the action, corresponding to the \"action\" attributeId used in the XACML service policy." - }, - "url": { - "type": "string", - "description": "The fully qualified URL of the action, to which the user will be redirected when the action is triggered. Will be set to\n\"urn:dialogporten:unauthorized\" if the user is not authorized to perform the action.", - "format": "uri", - "example": "urn:dialogporten:unauthorized\nhttps://someendpoint.com/gui/some-service-instance-id" - }, - "authorizationAttribute": { - "type": "string", - "description": "Contains an authorization resource attributeId, that can used in custom authorization rules in the XACML service\npolicy, which by default is the policy belonging to the service referred to by \"serviceResource\" in the dialog.\n \nCan also be used to refer to other service policies.", - "nullable": true, - "example": "mycustomresource\n/* equivalent to the above */\nurn:altinn:subresource:mycustomresource\nurn:altinn:task:Task_1\n/* refer to another service */\nurn:altinn:resource:some-other-service-identifier" - }, - "isAuthorized": { - "type": "boolean", - "description": "Whether the user is authorized to perform the action." - }, - "isDeleteDialogAction": { - "type": "boolean", - "description": "Indicates whether the action results in the dialog being deleted. Used by frontends to implement custom UX\nfor delete actions." - }, - "priority": { - "description": "Indicates a priority for the action, making it possible for frontends to adapt GUI elements based on action\npriority.", - "oneOf": [ - { - "$ref": "#/components/schemas/DialogsEntitiesActions_DialogGuiActionPriority" - } - ] - }, - "httpMethod": { - "description": "The HTTP method that the frontend should use when redirecting the user.", - "oneOf": [ - { - "$ref": "#/components/schemas/Http_HttpVerb" - } - ] - }, - "title": { - "type": "array", - "description": "The title of the action, this should be short and in verb form.", - "items": { - "$ref": "#/components/schemas/V1CommonLocalizations_Localization" - } - }, - "prompt": { - "type": "array", - "description": "If there should be a prompt asking the user for confirmation before the action is executed,\nthis field should contain the prompt text.", - "nullable": true, - "items": { - "$ref": "#/components/schemas/V1CommonLocalizations_Localization" - } - } - } - }, - "V1EndUserDialogsQueriesGet_DialogApiAction": { - "type": "object", - "additionalProperties": false, - "properties": { - "id": { - "type": "string", - "description": "The unique identifier for the action in UUIDv7 format.", - "format": "guid" - }, - "action": { - "type": "string", - "description": "String identifier for the action, corresponding to the \"action\" attributeId used in the XACML service policy,\nwhich by default is the policy belonging to the service referred to by \"serviceResource\" in the dialog.", - "example": "write" - }, - "authorizationAttribute": { - "type": "string", - "description": "Contains an authorization resource attributeId, that can used in custom authorization rules in the XACML service\npolicy, which by default is the policy belonging to the service referred to by \"serviceResource\" in the dialog.\n \nCan also be used to refer to other service policies.", - "nullable": true, - "example": "mycustomresource\n/* equivalent to the above */\nurn:altinn:subresource:mycustomresource\nurn:altinn:task:Task_1\n/* refer to another service */\nurn:altinn:resource:some-other-service-identifier" - }, - "isAuthorized": { - "type": "boolean", - "description": "True if the authenticated user is authorized for this action. If not, the action will not be available\nand all endpoints will be replaced with a fixed placeholder." - }, - "endpoints": { - "type": "array", - "description": "The endpoints associated with the action.", - "items": { - "$ref": "#/components/schemas/V1EndUserDialogsQueriesGet_DialogApiActionEndpoint" - } - } - } - }, - "V1EndUserDialogsQueriesGet_DialogApiActionEndpoint": { - "type": "object", - "additionalProperties": false, - "properties": { - "id": { - "type": "string", - "description": "The unique identifier for the endpoint in UUIDv7 format.", - "format": "guid" - }, - "version": { - "type": "string", - "description": "Arbitrary string indicating the version of the endpoint.\n \nConsult the service-specific documentation provided by the service owner for details (if in use).", - "nullable": true - }, - "url": { - "type": "string", - "description": "The fully qualified URL of the API endpoint. Will be set to \"urn:dialogporten:unauthorized\" if the user is\nnot authorized to perform the action.", - "format": "uri", - "example": "https://someendpoint.com/api/v1/someaction\nurn:dialogporten:unauthorized" - }, - "httpMethod": { - "description": "The HTTP method that the endpoint expects for this action.", - "oneOf": [ - { - "$ref": "#/components/schemas/Http_HttpVerb" - } - ] - }, - "documentationUrl": { - "type": "string", - "description": "Link to service provider documentation for the endpoint. Used for service owners to provide documentation for\nintegrators. Should be a URL to a human-readable page.", - "format": "uri", - "nullable": true - }, - "requestSchema": { - "type": "string", - "description": "Link to the request schema for the endpoint. Used by service owners to provide documentation for integrators.\nDialogporten will not validate information on this endpoint.", - "format": "uri", - "nullable": true - }, - "responseSchema": { - "type": "string", - "description": "Link to the response schema for the endpoint. Used for service owners to provide documentation for integrators.\nDialogporten will not validate information on this endpoint.", - "format": "uri", - "nullable": true - }, - "deprecated": { - "type": "boolean", - "description": "Boolean indicating if the endpoint is deprecated. Integrators should migrate to endpoints with a higher version." - }, - "sunsetAt": { - "type": "string", - "description": "Date and time when the service owner has indicated that endpoint will no longer function. Only set if the endpoint\nis deprecated. Dialogporten will not enforce this date.", - "format": "date-time", - "nullable": true - } - } - }, - "V1EndUserDialogsQueriesGet_DialogActivity": { - "type": "object", - "additionalProperties": false, - "properties": { - "id": { - "type": "string", - "description": "The unique identifier for the activity in UUIDv7 format.", - "format": "guid" - }, - "createdAt": { - "type": "string", - "description": "The date and time when the activity was created.", - "format": "date-time", - "nullable": true - }, - "extendedType": { - "type": "string", - "description": "An arbitrary URI/URN with a service-specific activity type.\n \nConsult the service-specific documentation provided by the service owner for details (if in use).", - "format": "uri", - "nullable": true - }, - "type": { - "description": "The type of activity.", - "oneOf": [ - { - "$ref": "#/components/schemas/DialogsEntitiesActivities_DialogActivityType" - } - ] - }, - "transmissionId": { - "type": "string", - "description": "If the activity is related to a particular transmission, this field will contain the transmission identifier.", - "format": "guid", - "nullable": true - }, - "performedBy": { - "description": "The actor that performed the activity.", - "oneOf": [ - { - "$ref": "#/components/schemas/V1EndUserCommonActors_Actor" - } - ] - }, - "description": { - "type": "array", - "description": "Unstructured text describing the activity. Only set if the activity type is \"Information\".", - "items": { - "$ref": "#/components/schemas/V1CommonLocalizations_Localization" - } - } - } - }, - "V1EndUserDialogsQueriesGet_DialogSeenLog": { - "type": "object", - "additionalProperties": false, - "properties": { - "id": { - "type": "string", - "description": "The unique identifier for the seen log entry in UUIDv7 format.", - "format": "guid" - }, - "seenAt": { - "type": "string", - "description": "The timestamp when the dialog revision was seen.", - "format": "date-time" - }, - "seenBy": { - "description": "The actor that saw the dialog revision.", - "oneOf": [ - { - "$ref": "#/components/schemas/V1EndUserCommonActors_Actor" - } - ] - }, - "isViaServiceOwner": { - "type": "boolean", - "description": "Flag indicating whether the seen log entry was created via the service owner.\n \nThis is used when the service owner uses the service owner API to implement its own frontend.", - "nullable": true - }, - "isCurrentEndUser": { - "type": "boolean", - "description": "Flag indicating whether the seen log entry was created by the current end user." - } - } - }, - "V1EndUserDialogLabelAssignmentLogQueriesSearch_LabelAssignmentLog": { - "type": "object", - "additionalProperties": false, - "properties": { - "createdAt": { - "type": "string", - "format": "date-time" - }, - "name": { - "type": "string" - }, - "action": { - "type": "string" - }, - "performedBy": { - "$ref": "#/components/schemas/V1EndUserCommonActors_Actor" - } - } - }, - "V1EndUserDialogActivitiesQueriesSearch_Activity": { - "type": "object", - "additionalProperties": false, - "properties": { - "id": { - "type": "string", - "format": "guid" - }, - "createdAt": { - "type": "string", - "format": "date-time" - }, - "extendedType": { - "type": "string", - "format": "uri", - "nullable": true - }, - "seenByEndUserIdHash": { - "type": "string", - "nullable": true - }, - "type": { - "$ref": "#/components/schemas/DialogsEntitiesActivities_DialogActivityType" - }, - "transmissionId": { - "type": "string", - "format": "guid", - "nullable": true - } - } - }, - "V1EndUserDialogActivitiesQueriesGet_Activity": { - "type": "object", - "additionalProperties": false, - "properties": { - "id": { - "type": "string", - "format": "guid" - }, - "createdAt": { - "type": "string", - "format": "date-time", - "nullable": true - }, - "extendedType": { - "type": "string", - "format": "uri", - "nullable": true - }, - "type": { - "$ref": "#/components/schemas/DialogsEntitiesActivities_DialogActivityType" - }, - "transmissionId": { - "type": "string", - "format": "guid", - "nullable": true - }, - "performedBy": { - "$ref": "#/components/schemas/V1EndUserCommonActors_Actor" - }, - "description": { - "type": "array", - "items": { - "$ref": "#/components/schemas/V1CommonLocalizations_Localization" - } - } - } - }, - "JsonPatchOperations_Operation": { - "type": "object", - "additionalProperties": false, - "properties": { - "operationType": { - "$ref": "#/components/schemas/JsonPatchOperations_OperationType" - }, - "path": { - "type": "string", - "nullable": true - }, - "op": { - "type": "string", - "nullable": true - }, - "from": { - "type": "string", - "nullable": true - }, - "value": { - "nullable": true - } - } - }, - "JsonPatchOperations_OperationType": { - "type": "string", - "description": "", - "x-enumNames": [ - "Add", - "Remove", - "Replace", - "Move", - "Copy", - "Test", - "Invalid" - ], - "enum": [ - "Add", - "Remove", - "Replace", - "Move", - "Copy", - "Test", - "Invalid" - ] - } - }, - "securitySchemes": { - "JWTBearerAuth": { - "type": "http", - "description": "Enter a JWT token to authorize the requests...", - "scheme": "Bearer", - "bearerFormat": "JWT" - } - } - } -} \ No newline at end of file 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 9a55ab425..d0ad16543 100644 --- a/src/Digdir.Library.Dialogporten.WebApiClient/Digdir.Library.Dialogporten.WebApiClient.csproj +++ b/src/Digdir.Library.Dialogporten.WebApiClient/Digdir.Library.Dialogporten.WebApiClient.csproj @@ -20,7 +20,6 @@ - all runtime; build; native; contentfiles; analyzers; buildtransitive From 3c9762e8ce750c0f7aedca5ae9f935f91f60eaf5 Mon Sep 17 00:00:00 2001 From: Amund Myrbostad Date: Thu, 23 Jan 2025 10:47:23 +0100 Subject: [PATCH 099/169] added swagger to client --- .../Digdir.Library.Dialogporten.WebApiClient.csproj | 1 + 1 file changed, 1 insertion(+) 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 d0ad16543..e2fe896c5 100644 --- a/src/Digdir.Library.Dialogporten.WebApiClient/Digdir.Library.Dialogporten.WebApiClient.csproj +++ b/src/Digdir.Library.Dialogporten.WebApiClient/Digdir.Library.Dialogporten.WebApiClient.csproj @@ -20,6 +20,7 @@ + all runtime; build; native; contentfiles; analyzers; buildtransitive From 1d5d9acc39554e3a018a7b859b636004169b2c6d Mon Sep 17 00:00:00 2001 From: Amund Myrbostad Date: Thu, 23 Jan 2025 11:09:54 +0100 Subject: [PATCH 100/169] Correct configuratuin --- .../Digdir.Domain.Dialogporten.WebApi.csproj | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Digdir.Domain.Dialogporten.WebApi/Digdir.Domain.Dialogporten.WebApi.csproj b/src/Digdir.Domain.Dialogporten.WebApi/Digdir.Domain.Dialogporten.WebApi.csproj index 2704af7e0..1c367fd6e 100644 --- a/src/Digdir.Domain.Dialogporten.WebApi/Digdir.Domain.Dialogporten.WebApi.csproj +++ b/src/Digdir.Domain.Dialogporten.WebApi/Digdir.Domain.Dialogporten.WebApi.csproj @@ -40,7 +40,7 @@ - + From 948579bce46861b0adcca4f195a9554caf8e36ca Mon Sep 17 00:00:00 2001 From: Amund Myrbostad Date: Thu, 23 Jan 2025 12:02:56 +0100 Subject: [PATCH 101/169] Is it working? --- docs/schema/V1/swagger.json | 6985 +++++++++++++++++ .../.refitter | 2 +- ...r.Library.Dialogporten.WebApiClient.csproj | 16 +- 3 files changed, 6997 insertions(+), 6 deletions(-) create mode 100644 docs/schema/V1/swagger.json diff --git a/docs/schema/V1/swagger.json b/docs/schema/V1/swagger.json new file mode 100644 index 000000000..e9678465b --- /dev/null +++ b/docs/schema/V1/swagger.json @@ -0,0 +1,6985 @@ +{ + "x-generator": "NSwag v14.2.0.0 (NJsonSchema v11.1.0.0 (Newtonsoft.Json v13.0.0.0))", + "openapi": "3.0.0", + "info": { + "title": "Dialogporten", + "version": "v1" + }, + "paths": { + "/api/v1/.well-known/oauth-authorization-server": { + "get": { + "tags": [ + "Metadata" + ], + "summary": "Gets the OAuth 2.0 Metadata for automatic configuration of clients verifying dialog tokens", + "description": "This endpoint can be used by client integrations supporting automatic discovery of \"OAuth 2.0 Authorization Server\" metadata, enabling verification of dialog tokens issues by Dialogporten.", + "operationId": "V1WellKnownOauthAuthorizationServerGet_GetOauthAuthorizationServer", + "responses": { + "200": { + "description": "The OAuth 2.0 Authorization Server Metadata", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/V1WellKnownOauthAuthorizationServerQueriesGet_GetOauthAuthorizationServer" + } + } + } + } + } + } + }, + "/api/v1/.well-known/jwks.json": { + "get": { + "tags": [ + "Metadata" + ], + "summary": "Gets the JSON Web Key Set (JWKS) containing the public keys used to verify dialog token signatures", + "description": "This endpoint can be used by client integrations supporting automatic discovery of \"OAuth 2.0 Authorization Server\" metadata, enabling verification of dialog tokens issues by Dialogporten.", + "operationId": "V1WellKnownJwksGet_GetJwks", + "responses": { + "200": { + "description": "The OAuth 2.0 Authorization Server Metadata", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/V1WellKnownJwksQueriesGet_GetJwks" + } + } + } + } + } + } + }, + "/api/v1/serviceowner/dialogs/{dialogId}/transmissions": { + "get": { + "tags": [ + "Serviceowner" + ], + "summary": "Gets a list of dialog transmissions", + "description": "Gets the list of transmissions belonging to a dialog", + "operationId": "V1ServiceOwnerDialogTransmissionsSearch_SearchDialogTransmission", + "parameters": [ + { + "name": "dialogId", + "in": "path", + "required": true, + "schema": { + "type": "string", + "format": "guid" + } + } + ], + "responses": { + "200": { + "description": "Successfully returned the dialog transmission list.", + "content": { + "application/json": { + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/V1ServiceOwnerDialogTransmissionsQueriesSearch_Transmission" + } + } + } + } + }, + "401": { + "description": "Missing or invalid authentication token. Requires a Maskinporten-token with the scope \"digdir:dialogporten.serviceprovider\"." + }, + "403": { + "description": "Unauthorized to get the supplied dialog (not owned by authenticated organization or has additional scope requirements defined in policy)." + }, + "404": { + "description": "The given dialog ID was not found or is already deleted.", + "content": { + "application/problem+json": { + "schema": { + "$ref": "#/components/schemas/ProblemDetails" + } + } + } + }, + "410": { + "description": "Entity with the given key(s) is removed." + } + }, + "security": [ + { + "JWTBearerAuth": [] + } + ] + }, + "post": { + "tags": [ + "Serviceowner" + ], + "summary": "Adds a transmission to a dialog", + "description": "The transmission is created with the given configuration. For more information see the documentation (link TBD).\n\nOptimistic 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.", + "operationId": "V1ServiceOwnerDialogTransmissionsCreate_DialogTransmission", + "parameters": [ + { + "name": "dialogId", + "in": "path", + "required": true, + "schema": { + "type": "string", + "format": "guid" + } + }, + { + "name": "if-Match", + "in": "header", + "schema": { + "type": "string", + "format": "guid", + "nullable": true + } + } + ], + "requestBody": { + "x-name": "CreateTransmissionRequest", + "description": "", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/V1ServiceOwnerDialogTransmissionsCreate_TransmissionRequest" + } + } + }, + "required": true, + "x-position": 1 + }, + "responses": { + "201": { + "description": "The UUID of the created dialog transmission. A relative URL to the newly created activity is set in the \"Location\" header.", + "headers": { + "Etag": { + "description": "The new UUID ETag of the dialog", + "schema": { + "title": "System_String", + "type": "string" + }, + "example": "123e4567-e89b-12d3-a456-426614174000" + } + }, + "content": { + "application/json": { + "schema": { + "type": "string" + }, + "example": "018bb8e5-d9d0-7434-8ec5-569a6c8e01fc" + } + } + }, + "204": { + "description": "No Content" + }, + "400": { + "description": "Validation error occured. See problem details for a list of errors.", + "content": { + "application/problem+json": { + "schema": { + "$ref": "#/components/schemas/ProblemDetails" + } + } + } + }, + "401": { + "description": "Missing or invalid authentication token. Requires a Maskinporten-token with the scope \"digdir:dialogporten.serviceprovider\"." + }, + "403": { + "description": "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": { + "description": "The given dialog ID was not found or is already deleted.", + "content": { + "application/problem+json": { + "schema": { + "$ref": "#/components/schemas/ProblemDetails" + } + } + } + }, + "410": { + "description": "Entity with the given key(s) is removed." + }, + "412": { + "description": "The supplied If-Match header did not match the current Revision value for the dialog. The request was not applied.", + "content": { + "application/problem+json": { + "schema": { + "$ref": "#/components/schemas/ProblemDetails" + } + } + } + }, + "422": { + "description": "Domain error occured. See problem details for a list of errors.", + "content": { + "application/problem+json": { + "schema": { + "$ref": "#/components/schemas/ProblemDetails" + } + } + } + } + }, + "security": [ + { + "JWTBearerAuth": [] + } + ] + } + }, + "/api/v1/serviceowner/dialogs/{dialogId}/transmissions/{transmissionId}": { + "get": { + "tags": [ + "Serviceowner" + ], + "summary": "Gets a single dialog transmission", + "description": "Gets a single transmission belonging to a dialog. For more information see the documentation (link TBD).", + "operationId": "V1ServiceOwnerDialogTransmissionsGet_GetDialogTransmission", + "parameters": [ + { + "name": "dialogId", + "in": "path", + "required": true, + "schema": { + "type": "string", + "format": "guid" + } + }, + { + "name": "transmissionId", + "in": "path", + "required": true, + "schema": { + "type": "string", + "format": "guid" + } + } + ], + "responses": { + "200": { + "description": "Successfully returned the dialog transmission.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/V1ServiceOwnerDialogTransmissionsQueriesGet_Transmission" + } + } + } + }, + "401": { + "description": "Missing or invalid authentication token. Requires a Maskinporten-token with the scope \"digdir:dialogporten.serviceprovider\"." + }, + "403": { + "description": "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": { + "description": "The given dialog ID was not found or was deleted, or the given transmission ID was not found.", + "content": { + "application/problem+json": { + "schema": { + "$ref": "#/components/schemas/ProblemDetails" + } + } + } + }, + "410": { + "description": "Entity with the given key(s) is removed." + } + }, + "security": [ + { + "JWTBearerAuth": [] + } + ] + } + }, + "/api/v1/serviceowner/dialogs/{dialogId}/seenlog": { + "get": { + "tags": [ + "Serviceowner" + ], + "summary": "Gets all seen log records for a dialog", + "description": "Gets all seen log records for a dialog. For more information see the documentation (link TBD).", + "operationId": "V1ServiceOwnerDialogSeenLogsSearch_SearchDialogSeenLog", + "parameters": [ + { + "name": "dialogId", + "in": "path", + "required": true, + "schema": { + "type": "string", + "format": "guid" + } + } + ], + "responses": { + "200": { + "description": "Successfully returned the dialog seen log records.", + "content": { + "application/json": { + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/V1ServiceOwnerDialogSeenLogsQueriesSearch_SeenLog" + } + } + } + } + }, + "401": { + "description": "Unauthorized" + }, + "403": { + "description": "Forbidden" + }, + "404": { + "description": "The given dialog ID was not found or is already deleted.", + "content": { + "application/problem+json": { + "schema": { + "$ref": "#/components/schemas/ProblemDetails" + } + } + } + }, + "410": { + "description": "Entity with the given key(s) is removed." + } + }, + "security": [ + { + "JWTBearerAuth": [] + } + ] + } + }, + "/api/v1/serviceowner/dialogs/{dialogId}/seenlog/{seenLogId}": { + "get": { + "tags": [ + "Serviceowner" + ], + "summary": "Gets a single dialog seen log record", + "description": "Gets a single dialog seen log record. For more information see the documentation (link TBD).", + "operationId": "V1ServiceOwnerDialogSeenLogsGet_GetDialogSeenLog", + "parameters": [ + { + "name": "dialogId", + "in": "path", + "required": true, + "schema": { + "type": "string", + "format": "guid" + } + }, + { + "name": "seenLogId", + "in": "path", + "required": true, + "schema": { + "type": "string", + "format": "guid" + } + } + ], + "responses": { + "200": { + "description": "Successfully returned the dialog seen log record.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/V1ServiceOwnerDialogSeenLogsQueriesGet_SeenLog" + } + } + } + }, + "401": { + "description": "Unauthorized" + }, + "403": { + "description": "Forbidden" + }, + "404": { + "description": "The given dialog ID was not found or is already deleted.", + "content": { + "application/problem+json": { + "schema": { + "$ref": "#/components/schemas/ProblemDetails" + } + } + } + }, + "410": { + "description": "Entity with the given key(s) is removed." + } + }, + "security": [ + { + "JWTBearerAuth": [] + } + ] + } + }, + "/api/v1/serviceowner/dialogs/{dialogId}": { + "put": { + "tags": [ + "Serviceowner" + ], + "summary": "Replaces a dialog", + "description": "Replaces a given dialog with the supplied model. For more information see the documentation (link TBD).\n\nOptimistic 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.", + "operationId": "V1ServiceOwnerDialogsUpdate_Dialog", + "parameters": [ + { + "name": "dialogId", + "in": "path", + "required": true, + "schema": { + "type": "string", + "format": "guid" + } + }, + { + "name": "if-Match", + "in": "header", + "schema": { + "type": "string", + "format": "guid", + "nullable": true + } + } + ], + "requestBody": { + "x-name": "dto", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/V1ServiceOwnerDialogsCommandsUpdate_Dialog" + } + } + }, + "required": true + }, + "responses": { + "204": { + "description": "The dialog aggregate was updated successfully.", + "headers": { + "Etag": { + "description": "The new UUID ETag of the dialog", + "schema": { + "title": "System_String", + "type": "string" + }, + "example": "123e4567-e89b-12d3-a456-426614174000" + } + } + }, + "400": { + "description": "Validation error occured. See problem details for a list of errors.", + "content": { + "application/problem+json": { + "schema": { + "$ref": "#/components/schemas/ProblemDetails" + } + } + } + }, + "401": { + "description": "Missing or invalid authentication token. Requires a Maskinporten-token with the scope \"digdir:dialogporten.serviceprovider\"." + }, + "403": { + "description": "Unauthorized to update the supplied dialog (not owned by authenticated organization or has additional scope requirements defined in policy)." + }, + "404": { + "description": "The given dialog ID was not found or is already deleted.", + "content": { + "application/problem+json": { + "schema": { + "$ref": "#/components/schemas/ProblemDetails" + } + } + } + }, + "410": { + "description": "Entity with the given key(s) is removed." + }, + "412": { + "description": "The supplied If-Match header did not match the current Revision value for the dialog. The request was not applied.", + "content": { + "application/problem+json": { + "schema": { + "$ref": "#/components/schemas/ProblemDetails" + } + } + } + }, + "422": { + "description": "Domain error occured. See problem details for a list of errors.", + "content": { + "application/problem+json": { + "schema": { + "$ref": "#/components/schemas/ProblemDetails" + } + } + } + } + }, + "security": [ + { + "JWTBearerAuth": [] + } + ] + }, + "get": { + "tags": [ + "Serviceowner" + ], + "summary": "Gets a single dialog", + "description": "Gets a single dialog aggregate. For more information see the documentation (link TBD).\n\nNote that this operation may return deleted dialogs (see the field `DeletedAt`).", + "operationId": "V1ServiceOwnerDialogsGet_GetDialog", + "parameters": [ + { + "name": "dialogId", + "in": "path", + "required": true, + "schema": { + "type": "string", + "format": "guid" + } + }, + { + "name": "endUserId", + "in": "query", + "description": "Filter by end user id", + "schema": { + "type": "string", + "nullable": true + } + } + ], + "responses": { + "200": { + "description": "Successfully returned the dialog aggregate.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/V1ServiceOwnerDialogsQueriesGet_Dialog" + } + } + } + }, + "401": { + "description": "Missing or invalid authentication token. Requires a Maskinporten-token with the scope \"digdir:dialogporten.serviceprovider\"." + }, + "403": { + "description": "Unauthorized to get the supplied dialog (not owned by authenticated organization or has additional scope requirements defined in policy)." + }, + "404": { + "description": "The given dialog ID was not found or is already deleted.", + "content": { + "application/problem+json": { + "schema": { + "$ref": "#/components/schemas/ProblemDetails" + } + } + } + } + }, + "security": [ + { + "JWTBearerAuth": [] + } + ] + }, + "delete": { + "tags": [ + "Serviceowner" + ], + "summary": "Deletes a dialog", + "description": "Deletes a given dialog (soft delete). For more information see the documentation (link TBD).\n\nNote 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.\nIf end users attempt to access the dialog via the details endpoint, they will get a 410 Gone response.\n\nOptimistic 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.", + "operationId": "V1ServiceOwnerDialogsDelete_Dialog", + "parameters": [ + { + "name": "dialogId", + "in": "path", + "required": true, + "schema": { + "type": "string", + "format": "guid" + } + }, + { + "name": "if-Match", + "in": "header", + "schema": { + "type": "string", + "format": "guid", + "nullable": true + } + } + ], + "responses": { + "204": { + "description": "The dialog aggregate was deleted successfully.", + "headers": { + "Etag": { + "description": "The new UUID ETag of the dialog", + "schema": { + "title": "System_String", + "type": "string" + }, + "example": "123e4567-e89b-12d3-a456-426614174000" + } + } + }, + "400": { + "description": "Validation error occured. See problem details for a list of errors.", + "content": { + "application/problem+json": { + "schema": { + "$ref": "#/components/schemas/ProblemDetails" + } + } + } + }, + "401": { + "description": "Missing or invalid authentication token. Requires a Maskinporten-token with the scope \"digdir:dialogporten.serviceprovider\"." + }, + "403": { + "description": "Unauthorized to delete the supplied dialog (not owned by authenticated organization or has additional scope requirements defined in policy)." + }, + "404": { + "description": "The given dialog ID was not found or is already deleted.", + "content": { + "application/problem+json": { + "schema": { + "$ref": "#/components/schemas/ProblemDetails" + } + } + } + }, + "410": { + "description": "Entity with the given key(s) is removed." + }, + "412": { + "description": "The supplied If-Match header did not match the current Revision value for the dialog. The request was not applied.", + "content": { + "application/problem+json": { + "schema": { + "$ref": "#/components/schemas/ProblemDetails" + } + } + } + } + }, + "security": [ + { + "JWTBearerAuth": [] + } + ] + }, + "patch": { + "tags": [ + "Serviceowner" + ], + "summary": "Patch a single dialog", + "description": "Patches a dialog aggregate with a RFC6902 JSON Patch document. The patch document must be a JSON array of RFC6902 operations.\nSee [https://tools.ietf.org/html/rfc6902](https://tools.ietf.org/html/rfc6902) for more information.\n \nOptimistic 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.", + "operationId": "V1ServiceOwnerDialogsPatchDialog", + "parameters": [ + { + "name": "dialogId", + "in": "path", + "required": true, + "schema": { + "type": "string", + "format": "guid" + }, + "x-position": 1 + }, + { + "name": "If-Match", + "x-originalName": "etag", + "in": "header", + "schema": { + "type": "string", + "format": "guid", + "nullable": true + }, + "x-position": 2 + } + ], + "requestBody": { + "x-name": "patchDocument", + "content": { + "application/json": { + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/JsonPatchOperations_Operation" + } + } + } + }, + "required": true, + "x-position": 3 + }, + "responses": { + "204": { + "description": "Patch was successfully applied.", + "headers": { + "Etag": { + "description": "The new UUID ETag of the dialog", + "schema": { + "type": "string" + }, + "example": "123e4567-e89b-12d3-a456-426614174000" + } + } + }, + "400": { + "description": "Validation error occured. See problem details for a list of errors.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ProblemDetails" + } + } + } + }, + "401": { + "description": "Missing or invalid authentication token. Requires a Maskinporten-token with the scope \\\"digdir:dialogporten.serviceprovider\\\"" + }, + "403": { + "description": "Unauthorized to update a dialog for the given serviceResource (not owned by authenticated organization or has additional scope requirements defined in policy)" + }, + "404": { + "description": "The given dialog ID was not found or is deleted", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ProblemDetails" + } + } + } + }, + "412": { + "description": "The supplied Revision does not match the current Revision of the dialog", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ProblemDetails" + } + } + } + }, + "422": { + "description": "Domain error occured. See problem details for a list of errors.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ProblemDetails" + } + } + } + } + }, + "security": [ + { + "JWTBearerAuth": [] + } + ] + } + }, + "/api/v1/serviceowner/dialogs": { + "get": { + "tags": [ + "Serviceowner" + ], + "summary": "Gets a list of dialogs", + "description": "Performs a search for dialogs, returning a paginated list of dialogs. For more information see the documentation (link TBD).\n\n* All date parameters must contain explicit time zone. Example: 2023-10-27T10:00:00Z or 2023-10-27T10:00:00+01:00\n* See \"continuationToken\" in the response for how to get the next page of results.\n* hasNextPage will be set to true if there are more items to get.", + "operationId": "V1ServiceOwnerDialogsSearch_SearchDialog", + "parameters": [ + { + "name": "serviceResource", + "in": "query", + "style": "form", + "explode": true, + "description": "Filter by one or more service resources", + "schema": { + "type": "array", + "nullable": true, + "items": { + "type": "string" + } + } + }, + { + "name": "party", + "in": "query", + "style": "form", + "explode": true, + "description": "Filter by one or more owning parties", + "schema": { + "type": "array", + "nullable": true, + "items": { + "type": "string" + } + } + }, + { + "name": "endUserId", + "in": "query", + "description": "Filter by end user id", + "schema": { + "type": "string", + "nullable": true + } + }, + { + "name": "extendedStatus", + "in": "query", + "style": "form", + "explode": true, + "description": "Filter by one or more extended statuses", + "schema": { + "type": "array", + "nullable": true, + "items": { + "type": "string" + } + } + }, + { + "name": "externalReference", + "in": "query", + "description": "Filter by external reference", + "schema": { + "type": "string", + "nullable": true + } + }, + { + "name": "status", + "in": "query", + "style": "form", + "explode": true, + "description": "Filter by status", + "schema": { + "type": "array", + "nullable": true, + "items": { + "$ref": "#/components/schemas/DialogsEntities_DialogStatus" + } + } + }, + { + "name": "createdAfter", + "in": "query", + "description": "Only return dialogs created after this date", + "schema": { + "type": "string", + "format": "date-time", + "nullable": true + } + }, + { + "name": "createdBefore", + "in": "query", + "description": "Only return dialogs created before this date", + "schema": { + "type": "string", + "format": "date-time", + "nullable": true + } + }, + { + "name": "updatedAfter", + "in": "query", + "description": "Only return dialogs updated after this date", + "schema": { + "type": "string", + "format": "date-time", + "nullable": true + } + }, + { + "name": "updatedBefore", + "in": "query", + "description": "Only return dialogs updated before this date", + "schema": { + "type": "string", + "format": "date-time", + "nullable": true + } + }, + { + "name": "dueAfter", + "in": "query", + "description": "Only return dialogs with due date after this date", + "schema": { + "type": "string", + "format": "date-time", + "nullable": true + } + }, + { + "name": "dueBefore", + "in": "query", + "description": "Only return dialogs with due date before this date", + "schema": { + "type": "string", + "format": "date-time", + "nullable": true + } + }, + { + "name": "visibleAfter", + "in": "query", + "description": "Only return dialogs with visible-from date after this date", + "schema": { + "type": "string", + "format": "date-time", + "nullable": true + } + }, + { + "name": "visibleBefore", + "in": "query", + "description": "Only return dialogs with visible-from date before this date", + "schema": { + "type": "string", + "format": "date-time", + "nullable": true + } + }, + { + "name": "process", + "in": "query", + "description": "Filter by process", + "schema": { + "type": "string", + "nullable": true + } + }, + { + "name": "systemLabel", + "in": "query", + "style": "form", + "explode": true, + "description": "Filter by Display state", + "schema": { + "type": "array", + "nullable": true, + "items": { + "$ref": "#/components/schemas/DialogEndUserContextsEntities_SystemLabel" + } + } + }, + { + "name": "search", + "in": "query", + "description": "Search string for free text search. Will attempt to fuzzily match in all free text fields in the aggregate", + "schema": { + "type": "string", + "nullable": true + } + }, + { + "name": "searchLanguageCode", + "in": "query", + "description": "Limit free text search to texts with this language code, e.g. 'nb', 'en'. Culture codes will be normalized to neutral language codes (ISO 639). Default: search all culture codes", + "schema": { + "type": "string", + "nullable": true + } + }, + { + "name": "orderBy", + "in": "query", + "schema": { + "nullable": true, + "oneOf": [ + { + "$ref": "#/components/schemas/OrderSetOfTOrderDefinitionAndTTarget" + } + ] + } + }, + { + "name": "continuationToken", + "in": "query", + "description": "Supply \"continuationToken\" for the response to get the next page of results, if hasNextPage is true", + "schema": { + "nullable": true, + "oneOf": [ + { + "$ref": "#/components/schemas/ContinuationTokenSetOfTOrderDefinitionAndTTarget" + } + ] + } + }, + { + "name": "limit", + "in": "query", + "description": "Limit the number of results per page (1-1000, default: 100)", + "schema": { + "type": "integer", + "format": "int32", + "nullable": true + } + } + ], + "responses": { + "200": { + "description": "Successfully returned the dialog list.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/PaginatedListOfV1ServiceOwnerDialogsQueriesSearch_Dialog" + } + } + } + }, + "401": { + "description": "Missing or invalid authentication token. Requires a Maskinporten-token with the scope \"digdir:dialogporten.serviceprovider.search\"." + } + }, + "security": [ + { + "JWTBearerAuth": [] + } + ] + }, + "post": { + "tags": [ + "Serviceowner" + ], + "summary": "Creates a new dialog", + "description": "The dialog is created with the given configuration. For more information see the documentation (link TBD).\n\nFor detailed information on validation rules, see [the source for CreateDialogCommandValidator](https://github.com/altinn/dialogporten/blob/main/src/Digdir.Domain.Dialogporten.Application/Features/V1/ServiceOwner/Dialogs/Commands/Create/CreateDialogCommandValidator.cs)", + "operationId": "V1ServiceOwnerDialogsCreate_Dialog", + "requestBody": { + "x-name": "dto", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/V1ServiceOwnerDialogsCommandsCreate_Dialog" + } + } + }, + "required": true + }, + "responses": { + "201": { + "description": "The UUID of the created dialog aggregate. A relative URL to the newly created activity is set in the \"Location\" header.", + "headers": { + "Etag": { + "description": "The new UUID ETag of the dialog", + "schema": { + "title": "System_String", + "type": "string" + }, + "example": "123e4567-e89b-12d3-a456-426614174000" + } + }, + "content": { + "application/json": { + "schema": { + "type": "string" + }, + "example": "018bb8e5-d9d0-7434-8ec5-569a6c8e01fc" + } + } + }, + "204": { + "description": "No Content" + }, + "400": { + "description": "Validation error occured. See problem details for a list of errors.", + "content": { + "application/problem+json": { + "schema": { + "$ref": "#/components/schemas/ProblemDetails" + } + } + } + }, + "401": { + "description": "Missing or invalid authentication token. Requires a Maskinporten-token with the scope \"digdir:dialogporten.serviceprovider\"." + }, + "403": { + "description": "Unauthorized to create a dialog for the given serviceResource (not owned by authenticated organization or has additional scope requirements defined in policy)." + }, + "422": { + "description": "Domain error occured. See problem details for a list of errors.", + "content": { + "application/problem+json": { + "schema": { + "$ref": "#/components/schemas/ProblemDetails" + } + } + } + } + }, + "security": [ + { + "JWTBearerAuth": [] + } + ] + } + }, + "/api/v1/serviceowner/dialogs/{dialogId}/actions/purge": { + "post": { + "tags": [ + "Serviceowner" + ], + "summary": "Permanently deletes a dialog", + "description": "Deletes a given dialog (hard delete). For more information see the documentation (link TBD).\n\nOptimistic 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.", + "operationId": "V1ServiceOwnerDialogsPurge_PurgeDialog", + "parameters": [ + { + "name": "dialogId", + "in": "path", + "required": true, + "schema": { + "type": "string", + "format": "guid" + } + }, + { + "name": "if-Match", + "in": "header", + "schema": { + "type": "string", + "format": "guid", + "nullable": true + } + } + ], + "responses": { + "204": { + "description": "The dialog aggregate was deleted successfully." + }, + "401": { + "description": "Missing or invalid authentication token. Requires a Maskinporten-token with the scope \"digdir:dialogporten.serviceprovider\"." + }, + "403": { + "description": "Unauthorized to delete the supplied dialog (not owned by authenticated organization or has additional scope requirements defined in policy)." + }, + "404": { + "description": "The given dialog ID was not found or is already deleted.", + "content": { + "application/problem+json": { + "schema": { + "$ref": "#/components/schemas/ProblemDetails" + } + } + } + }, + "412": { + "description": "The supplied If-Match header did not match the current Revision value for the dialog. The request was not applied.", + "content": { + "application/problem+json": { + "schema": { + "$ref": "#/components/schemas/ProblemDetails" + } + } + } + } + }, + "security": [ + { + "JWTBearerAuth": [] + } + ] + } + }, + "/api/v1/serviceowner/dialogs/{dialogId}/activities": { + "get": { + "tags": [ + "Serviceowner" + ], + "summary": "Gets a list of dialog activities", + "description": "Gets the list of activities belonging to a dialog", + "operationId": "V1ServiceOwnerDialogActivitiesSearch_SearchDialogActivity", + "parameters": [ + { + "name": "dialogId", + "in": "path", + "required": true, + "schema": { + "type": "string", + "format": "guid" + } + } + ], + "responses": { + "200": { + "description": "Successfully returned the dialog activity list.", + "content": { + "application/json": { + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/V1ServiceOwnerDialogActivitiesQueriesSearch_Activity" + } + } + } + } + }, + "401": { + "description": "Missing or invalid authentication token. Requires a Maskinporten-token with the scope \"digdir:dialogporten.serviceprovider\"." + }, + "403": { + "description": "Unauthorized to get the supplied dialog (not owned by authenticated organization or has additional scope requirements defined in policy)." + } + }, + "security": [ + { + "JWTBearerAuth": [] + } + ] + }, + "post": { + "tags": [ + "Serviceowner" + ], + "summary": "Adds a activity to a dialogs activity history", + "description": "The activity is created with the given configuration. For more information see the documentation (link TBD).\n\nOptimistic 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.", + "operationId": "V1ServiceOwnerDialogActivitiesCreate_DialogActivity", + "parameters": [ + { + "name": "dialogId", + "in": "path", + "required": true, + "schema": { + "type": "string", + "format": "guid" + } + }, + { + "name": "if-Match", + "in": "header", + "schema": { + "type": "string", + "format": "guid", + "nullable": true + } + } + ], + "requestBody": { + "x-name": "CreateActivityRequest", + "description": "", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/V1ServiceOwnerDialogActivitiesCreate_ActivityRequest" + } + } + }, + "required": true, + "x-position": 1 + }, + "responses": { + "201": { + "description": "The UUID of the created dialog activity. A relative URL to the newly created activity is set in the \"Location\" header.", + "headers": { + "Etag": { + "description": "The new UUID ETag of the dialog", + "schema": { + "title": "System_String", + "type": "string" + }, + "example": "123e4567-e89b-12d3-a456-426614174000" + } + }, + "content": { + "application/json": { + "schema": { + "type": "string" + }, + "example": "018bb8e5-d9d0-7434-8ec5-569a6c8e01fc" + } + } + }, + "204": { + "description": "No Content" + }, + "400": { + "description": "Validation error occured. See problem details for a list of errors.", + "content": { + "application/problem+json": { + "schema": { + "$ref": "#/components/schemas/ProblemDetails" + } + } + } + }, + "401": { + "description": "Missing or invalid authentication token. Requires a Maskinporten-token with the scope \"digdir:dialogporten.serviceprovider\"." + }, + "403": { + "description": "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": { + "description": "The given dialog ID was not found or is already deleted.", + "content": { + "application/problem+json": { + "schema": { + "$ref": "#/components/schemas/ProblemDetails" + } + } + } + }, + "410": { + "description": "Entity with the given key(s) is removed." + }, + "412": { + "description": "The supplied If-Match header did not match the current Revision value for the dialog. The request was not applied.", + "content": { + "application/problem+json": { + "schema": { + "$ref": "#/components/schemas/ProblemDetails" + } + } + } + }, + "422": { + "description": "Domain error occured. See problem details for a list of errors.", + "content": { + "application/problem+json": { + "schema": { + "$ref": "#/components/schemas/ProblemDetails" + } + } + } + } + }, + "security": [ + { + "JWTBearerAuth": [] + } + ] + } + }, + "/api/v1/serviceowner/dialogs/{dialogId}/actions/should-send-notification": { + "get": { + "tags": [ + "Serviceowner" + ], + "summary": "Returns a boolean value based on conditions used to determine if a notification is to be sent", + "description": "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.", + "operationId": "V1ServiceOwnerDialogActivitiesNotificationCondition_NotificationCondition", + "parameters": [ + { + "name": "dialogId", + "in": "path", + "required": true, + "schema": { + "type": "string", + "format": "guid" + } + }, + { + "name": "conditionType", + "in": "query", + "required": true, + "schema": { + "allOf": [ + { + "$ref": "#/components/schemas/V1ServiceOwnerDialogActivitiesQueriesNotificationCondition_NotificationConditionType" + } + ] + } + }, + { + "name": "activityType", + "in": "query", + "required": true, + "schema": { + "allOf": [ + { + "$ref": "#/components/schemas/DialogsEntitiesActivities_DialogActivityType" + } + ] + } + }, + { + "name": "transmissionId", + "in": "query", + "schema": { + "type": "string", + "format": "guid", + "nullable": true + } + } + ], + "responses": { + "200": { + "description": "Successfully returned the notification determination.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/V1ServiceOwnerDialogActivitiesQueriesNotificationCondition_NotificationCondition" + } + } + } + }, + "401": { + "description": "Missing or invalid authentication token. Requires a Maskinporten-token with the scope \"altinn:system/notifications.condition.check\"." + }, + "403": { + "description": "Forbidden" + } + }, + "security": [ + { + "JWTBearerAuth": [] + } + ] + } + }, + "/api/v1/serviceowner/dialogs/{dialogId}/activities/{activityId}": { + "get": { + "tags": [ + "Serviceowner" + ], + "summary": "Gets a single dialog activity", + "description": "Gets a single activity belonging to a dialog. For more information see the documentation (link TBD).", + "operationId": "V1ServiceOwnerDialogActivitiesGet_GetDialogActivity", + "parameters": [ + { + "name": "dialogId", + "in": "path", + "required": true, + "schema": { + "type": "string", + "format": "guid" + } + }, + { + "name": "activityId", + "in": "path", + "required": true, + "schema": { + "type": "string", + "format": "guid" + } + } + ], + "responses": { + "200": { + "description": "Successfully returned the dialog activity.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/V1ServiceOwnerDialogActivitiesQueriesGet_Activity" + } + } + } + }, + "401": { + "description": "Missing or invalid authentication token. Requires a Maskinporten-token with the scope \"digdir:dialogporten.serviceprovider\"." + }, + "403": { + "description": "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": { + "description": "The given dialog ID was not found or was deleted, or the given activity ID was not found.", + "content": { + "application/problem+json": { + "schema": { + "$ref": "#/components/schemas/ProblemDetails" + } + } + } + }, + "410": { + "description": "Entity with the given key(s) is removed." + } + }, + "security": [ + { + "JWTBearerAuth": [] + } + ] + } + }, + "/api/v1/enduser/parties": { + "get": { + "tags": [ + "Enduser" + ], + "summary": "Gets the list of authorized parties for the end user", + "description": "Gets the list of authorized parties for the end user. For more information see the documentation (link TBD).", + "operationId": "V1EndUserPartiesGet_GetParties", + "responses": { + "200": { + "description": "The list of authorized parties for the end user", + "content": { + "application/json": { + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/V1EndUserPartiesQueriesGet_Parties" + } + } + } + } + }, + "401": { + "description": "Unauthorized" + }, + "403": { + "description": "Forbidden" + } + }, + "security": [ + { + "JWTBearerAuth": [] + } + ] + } + }, + "/api/v1/enduser/dialogs/{dialogId}/transmissions": { + "get": { + "tags": [ + "Enduser" + ], + "summary": "Gets a list of dialog transmissions", + "description": "Gets the list of transmissions belonging to a dialog", + "operationId": "V1EndUserDialogTransmissionsSearch_SearchDialogTransmission", + "parameters": [ + { + "name": "dialogId", + "in": "path", + "required": true, + "schema": { + "type": "string", + "format": "guid" + } + } + ], + "responses": { + "200": { + "description": "Successfully returned the dialog transmission list.", + "content": { + "application/json": { + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/V1EndUserDialogTransmissionsQueriesSearch_Transmission" + } + } + } + } + }, + "401": { + "description": "Missing or invalid authentication token. Requires a Maskinporten-token with the scope \"digdir:dialogporten\"." + }, + "403": { + "description": "Unauthorized to get the supplied dialog (not owned by authenticated organization or has additional scope requirements defined in policy)." + } + }, + "security": [ + { + "JWTBearerAuth": [] + } + ] + } + }, + "/api/v1/enduser/dialogs/{dialogId}/transmissions/{transmissionId}": { + "get": { + "tags": [ + "Enduser" + ], + "summary": "Gets a single dialog transmission", + "description": "Gets a single transmission belonging to a dialog. For more information see the documentation (link TBD).", + "operationId": "V1EndUserDialogTransmissionsGet_GetDialogTransmission", + "parameters": [ + { + "name": "dialogId", + "in": "path", + "required": true, + "schema": { + "type": "string", + "format": "guid" + } + }, + { + "name": "transmissionId", + "in": "path", + "required": true, + "schema": { + "type": "string", + "format": "guid" + } + } + ], + "responses": { + "200": { + "description": "Successfully returned the dialog transmission.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/V1EndUserDialogTransmissionsQueriesGet_Transmission" + } + } + } + }, + "401": { + "description": "Missing or invalid authentication token. Requires a Maskinporten-token with the scope \"digdir:dialogporten\"." + }, + "403": { + "description": "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": { + "description": "The given dialog ID was not found or was deleted, or the given transmission ID was not found.", + "content": { + "application/problem+json": { + "schema": { + "$ref": "#/components/schemas/ProblemDetails" + } + } + } + } + }, + "security": [ + { + "JWTBearerAuth": [] + } + ] + } + }, + "/api/v1/enduser/dialogs/{dialogId}/systemlabels": { + "put": { + "tags": [ + "Enduser" + ], + "operationId": "V1EndUserDialogSystemLabelsSet_SetDialogSystemLabel", + "parameters": [ + { + "name": "dialogId", + "in": "path", + "required": true, + "schema": { + "type": "string", + "format": "guid" + } + } + ], + "requestBody": { + "x-name": "SystemLabelCommand", + "description": "", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/V1EndUserDialogSystemLabelsCommandsSet_SystemLabelCommand" + } + } + }, + "required": true, + "x-position": 1 + }, + "responses": { + "204": { + "description": "No Content" + }, + "400": { + "description": "Bad Request", + "content": { + "application/problem+json": { + "schema": { + "$ref": "#/components/schemas/ProblemDetails" + } + } + } + }, + "401": { + "description": "Unauthorized" + }, + "403": { + "description": "Forbidden" + }, + "404": { + "description": "Not Found", + "content": { + "application/problem+json": { + "schema": { + "$ref": "#/components/schemas/ProblemDetails" + } + } + } + }, + "410": { + "description": "" + }, + "412": { + "description": "", + "content": { + "application/problem+json": { + "schema": { + "$ref": "#/components/schemas/ProblemDetails" + } + } + } + }, + "422": { + "description": "", + "content": { + "application/problem+json": { + "schema": { + "$ref": "#/components/schemas/ProblemDetails" + } + } + } + } + }, + "security": [ + { + "JWTBearerAuth": [] + } + ] + } + }, + "/api/v1/enduser/dialogs/{dialogId}/seenlog": { + "get": { + "tags": [ + "Enduser" + ], + "summary": "Gets all seen log records for a dialog", + "description": "Gets all seen log records for a dialog. For more information see the documentation (link TBD).", + "operationId": "V1EndUserDialogSeenLogsSearch_SearchDialogSeenLog", + "parameters": [ + { + "name": "dialogId", + "in": "path", + "required": true, + "schema": { + "type": "string", + "format": "guid" + } + } + ], + "responses": { + "200": { + "description": "Successfully returned the dialog seen log records.", + "content": { + "application/json": { + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/V1EndUserDialogSeenLogsQueriesSearch_SeenLog" + } + } + } + } + }, + "401": { + "description": "Missing or invalid authentication token. Requires a Maskinporten-token with the scope \"digdir:dialogporten\"." + }, + "403": { + "description": "Forbidden" + }, + "404": { + "description": "Not Found", + "content": { + "application/problem+json": { + "schema": { + "$ref": "#/components/schemas/ProblemDetails" + } + } + } + } + }, + "security": [ + { + "JWTBearerAuth": [] + } + ] + } + }, + "/api/v1/enduser/dialogs/{dialogId}/seenlog/{seenLogId}": { + "get": { + "tags": [ + "Enduser" + ], + "summary": "Gets a single dialog seen log record", + "description": "Gets a single dialog seen log record. For more information see the documentation (link TBD).", + "operationId": "V1EndUserDialogSeenLogsGet_GetDialogSeenLog", + "parameters": [ + { + "name": "dialogId", + "in": "path", + "required": true, + "schema": { + "type": "string", + "format": "guid" + } + }, + { + "name": "seenLogId", + "in": "path", + "required": true, + "schema": { + "type": "string", + "format": "guid" + } + } + ], + "responses": { + "200": { + "description": "Successfully returned the dialog seen log record.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/V1EndUserDialogSeenLogsQueriesGet_SeenLog" + } + } + } + }, + "401": { + "description": "Missing or invalid authentication token. Requires a Maskinporten-token with the scope \"digdir:dialogporten\"." + }, + "403": { + "description": "Forbidden" + }, + "404": { + "description": "Not Found", + "content": { + "application/problem+json": { + "schema": { + "$ref": "#/components/schemas/ProblemDetails" + } + } + } + } + }, + "security": [ + { + "JWTBearerAuth": [] + } + ] + } + }, + "/api/v1/enduser/dialogs": { + "get": { + "tags": [ + "Enduser" + ], + "summary": "Gets a list of dialogs", + "description": "Performs a search for dialogs, returning a paginated list of dialogs. For more information see the documentation (link TBD).\n\n* All date parameters must contain explicit time zone. Example: 2023-10-27T10:00:00Z or 2023-10-27T10:00:00+01:00\n* See \"continuationToken\" in the response for how to get the next page of results.\n* hasNextPage will be set to true if there are more items to get.", + "operationId": "V1EndUserDialogsSearch_SearchDialog", + "parameters": [ + { + "name": "org", + "in": "query", + "style": "form", + "explode": true, + "description": "Filter by one or more service owner codes", + "schema": { + "type": "array", + "nullable": true, + "items": { + "type": "string" + } + } + }, + { + "name": "serviceResource", + "in": "query", + "style": "form", + "explode": true, + "description": "Filter by one or more service resources", + "schema": { + "type": "array", + "nullable": true, + "items": { + "type": "string" + } + } + }, + { + "name": "party", + "in": "query", + "style": "form", + "explode": true, + "description": "Filter by one or more owning parties", + "schema": { + "type": "array", + "nullable": true, + "items": { + "type": "string" + } + } + }, + { + "name": "extendedStatus", + "in": "query", + "style": "form", + "explode": true, + "description": "Filter by one or more extended statuses", + "schema": { + "type": "array", + "nullable": true, + "items": { + "type": "string" + } + } + }, + { + "name": "externalReference", + "in": "query", + "description": "Filter by external reference", + "schema": { + "type": "string", + "nullable": true + } + }, + { + "name": "status", + "in": "query", + "style": "form", + "explode": true, + "description": "Filter by status", + "schema": { + "type": "array", + "nullable": true, + "items": { + "$ref": "#/components/schemas/DialogsEntities_DialogStatus" + } + } + }, + { + "name": "createdAfter", + "in": "query", + "description": "Only return dialogs created after this date", + "schema": { + "type": "string", + "format": "date-time", + "nullable": true + } + }, + { + "name": "createdBefore", + "in": "query", + "description": "Only return dialogs created before this date", + "schema": { + "type": "string", + "format": "date-time", + "nullable": true + } + }, + { + "name": "updatedAfter", + "in": "query", + "description": "Only return dialogs updated after this date", + "schema": { + "type": "string", + "format": "date-time", + "nullable": true + } + }, + { + "name": "updatedBefore", + "in": "query", + "description": "Only return dialogs updated before this date", + "schema": { + "type": "string", + "format": "date-time", + "nullable": true + } + }, + { + "name": "dueAfter", + "in": "query", + "description": "Only return dialogs with due date after this date", + "schema": { + "type": "string", + "format": "date-time", + "nullable": true + } + }, + { + "name": "dueBefore", + "in": "query", + "description": "Only return dialogs with due date before this date", + "schema": { + "type": "string", + "format": "date-time", + "nullable": true + } + }, + { + "name": "process", + "in": "query", + "description": "Filter by process", + "schema": { + "type": "string", + "nullable": true + } + }, + { + "name": "systemLabel", + "in": "query", + "style": "form", + "explode": true, + "description": "Filter by Display state", + "schema": { + "type": "array", + "nullable": true, + "items": { + "$ref": "#/components/schemas/DialogEndUserContextsEntities_SystemLabel" + } + } + }, + { + "name": "search", + "in": "query", + "description": "Search string for free text search. Will attempt to fuzzily match in all free text fields in the aggregate", + "schema": { + "type": "string", + "nullable": true + } + }, + { + "name": "searchLanguageCode", + "in": "query", + "description": "Limit free text search to texts with this language code, e.g. 'nb', 'en'. Culture codes will be normalized to neutral language codes (ISO 639). Default: search all culture codes", + "schema": { + "type": "string", + "nullable": true + } + }, + { + "name": "orderBy", + "in": "query", + "schema": { + "nullable": true, + "oneOf": [ + { + "$ref": "#/components/schemas/OrderSetOfTOrderDefinitionAndTTarget" + } + ] + } + }, + { + "name": "continuationToken", + "in": "query", + "description": "Supply \"continuationToken\" for the response to get the next page of results, if hasNextPage is true", + "schema": { + "nullable": true, + "oneOf": [ + { + "$ref": "#/components/schemas/ContinuationTokenSetOfTOrderDefinitionAndTTarget" + } + ] + } + }, + { + "name": "limit", + "in": "query", + "description": "Limit the number of results per page (1-1000, default: 100)", + "schema": { + "type": "integer", + "format": "int32", + "nullable": true + } + } + ], + "responses": { + "200": { + "description": "Successfully returned the dialog list.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/PaginatedListOfV1EndUserDialogsQueriesSearch_Dialog" + } + } + } + }, + "401": { + "description": "Missing or invalid authentication token. Requires a Maskinporten-token with the scope \"digdir:dialogporten\"." + } + }, + "security": [ + { + "JWTBearerAuth": [] + } + ] + } + }, + "/api/v1/enduser/dialogs/{dialogId}": { + "get": { + "tags": [ + "Enduser" + ], + "summary": "Gets a single dialog", + "description": "Gets a single dialog aggregate. For more information see the documentation (link TBD).", + "operationId": "V1EndUserDialogsGet_GetDialog", + "parameters": [ + { + "name": "dialogId", + "in": "path", + "required": true, + "schema": { + "type": "string", + "format": "guid" + } + } + ], + "responses": { + "200": { + "description": "Successfully returned the dialog aggregate.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/V1EndUserDialogsQueriesGet_Dialog" + } + } + } + }, + "401": { + "description": "Missing or invalid authentication token. Requires a Maskinporten-token with the scope \"digdir:dialogporten\"." + }, + "403": { + "description": "Unauthorized to get the supplied dialog (not owned by authenticated organization or has additional scope requirements defined in policy)." + }, + "404": { + "description": "The given dialog ID was not found or is already deleted.", + "content": { + "application/problem+json": { + "schema": { + "$ref": "#/components/schemas/ProblemDetails" + } + } + } + } + }, + "security": [ + { + "JWTBearerAuth": [] + } + ] + } + }, + "/api/v1/enduser/dialogs/{dialogId}/labellog": { + "get": { + "tags": [ + "Enduser" + ], + "operationId": "V1EndUserDialogLabelAssignmentLogsSearch_SearchDialogLabelAssignmentLog", + "parameters": [ + { + "name": "dialogId", + "in": "path", + "required": true, + "schema": { + "type": "string", + "format": "guid" + } + } + ], + "responses": { + "200": { + "description": "Success", + "content": { + "application/json": { + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/V1EndUserDialogLabelAssignmentLogQueriesSearch_LabelAssignmentLog" + } + } + } + } + }, + "401": { + "description": "Unauthorized" + }, + "403": { + "description": "Forbidden" + }, + "404": { + "description": "Not Found", + "content": { + "application/problem+json": { + "schema": { + "$ref": "#/components/schemas/ProblemDetails" + } + } + } + }, + "410": { + "description": "" + } + }, + "security": [ + { + "JWTBearerAuth": [] + } + ] + } + }, + "/api/v1/enduser/dialogs/{dialogId}/activities": { + "get": { + "tags": [ + "Enduser" + ], + "summary": "Gets a list of dialog activities", + "description": "Gets the list of activities belonging to a dialog", + "operationId": "V1EndUserDialogActivitiesSearch_SearchDialogActivity", + "parameters": [ + { + "name": "dialogId", + "in": "path", + "required": true, + "schema": { + "type": "string", + "format": "guid" + } + } + ], + "responses": { + "200": { + "description": "Successfully returned the dialog activity list.", + "content": { + "application/json": { + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/V1EndUserDialogActivitiesQueriesSearch_Activity" + } + } + } + } + }, + "401": { + "description": "Missing or invalid authentication token. Requires a Maskinporten-token with the scope \"digdir:dialogporten\"." + }, + "403": { + "description": "Unauthorized to get the supplied dialog (not owned by authenticated organization or has additional scope requirements defined in policy)." + } + }, + "security": [ + { + "JWTBearerAuth": [] + } + ] + } + }, + "/api/v1/enduser/dialogs/{dialogId}/activities/{activityId}": { + "get": { + "tags": [ + "Enduser" + ], + "summary": "Gets a single dialog activity", + "description": "Gets a single activity belonging to a dial og. For more information see the documentation (link TBD).", + "operationId": "V1EndUserDialogActivitiesGet_GetDialogActivity", + "parameters": [ + { + "name": "dialogId", + "in": "path", + "required": true, + "schema": { + "type": "string", + "format": "guid" + } + }, + { + "name": "activityId", + "in": "path", + "required": true, + "schema": { + "type": "string", + "format": "guid" + } + } + ], + "responses": { + "200": { + "description": "Successfully returned the dialog activity.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/V1EndUserDialogActivitiesQueriesGet_Activity" + } + } + } + }, + "401": { + "description": "Missing or invalid authentication token. Requires a Maskinporten-token with the scope \"digdir:dialogporten\"." + }, + "403": { + "description": "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": { + "description": "The given dialog ID was not found or was deleted, or the given activity ID was not found.", + "content": { + "application/problem+json": { + "schema": { + "$ref": "#/components/schemas/ProblemDetails" + } + } + } + } + }, + "security": [ + { + "JWTBearerAuth": [] + } + ] + } + } + }, + "components": { + "schemas": { + "V1WellKnownOauthAuthorizationServerQueriesGet_GetOauthAuthorizationServer": { + "type": "object", + "additionalProperties": false, + "properties": { + "issuer": { + "type": "string" + }, + "jwks_uri": { + "type": "string" + } + } + }, + "V1WellKnownJwksQueriesGet_GetJwks": { + "type": "object", + "additionalProperties": false, + "properties": { + "keys": { + "type": "array", + "items": { + "$ref": "#/components/schemas/V1WellKnownJwksQueriesGet_Jwk" + } + } + } + }, + "V1WellKnownJwksQueriesGet_Jwk": { + "type": "object", + "additionalProperties": false, + "properties": { + "kty": { + "type": "string" + }, + "use": { + "type": "string" + }, + "kid": { + "type": "string" + }, + "crv": { + "type": "string" + }, + "x": { + "type": "string" + }, + "alg": { + "type": "string" + } + } + }, + "V1ServiceOwnerDialogTransmissionsQueriesSearch_Transmission": { + "type": "object", + "additionalProperties": false, + "properties": { + "id": { + "type": "string", + "description": "The unique identifier for the transmission in UUIDv7 format.", + "format": "guid" + }, + "createdAt": { + "type": "string", + "description": "The date and time when the transmission was created.", + "format": "date-time" + }, + "authorizationAttribute": { + "type": "string", + "description": "The authorization attribute associated with the transmission.", + "nullable": true + }, + "extendedType": { + "type": "string", + "description": "The extended type URI for the transmission.", + "format": "uri", + "nullable": true + }, + "relatedTransmissionId": { + "type": "string", + "description": "The unique identifier for the related transmission, if any.", + "format": "guid", + "nullable": true + }, + "deletedAt": { + "type": "string", + "description": "The date and time when the transmission was deleted, if applicable.", + "format": "date-time", + "nullable": true + }, + "type": { + "description": "The type of the transmission.", + "oneOf": [ + { + "$ref": "#/components/schemas/DialogsEntitiesTransmissions_DialogTransmissionType" + } + ] + }, + "sender": { + "description": "The sender actor information for the transmission.", + "oneOf": [ + { + "$ref": "#/components/schemas/V1ServiceOwnerCommonActors_Actor" + } + ] + }, + "content": { + "description": "The content of the transmission.", + "oneOf": [ + { + "$ref": "#/components/schemas/V1ServiceOwnerDialogTransmissionsQueriesSearch_Content" + } + ] + }, + "attachments": { + "type": "array", + "description": "The attachments associated with the transmission.", + "items": { + "$ref": "#/components/schemas/V1ServiceOwnerDialogTransmissionsQueriesSearch_Attachment" + } + } + } + }, + "DialogsEntitiesTransmissions_DialogTransmissionType": { + "type": "string", + "description": "", + "x-enumNames": [ + "Information", + "Acceptance", + "Rejection", + "Request", + "Alert", + "Decision", + "Submission", + "Correction" + ], + "enum": [ + "Information", + "Acceptance", + "Rejection", + "Request", + "Alert", + "Decision", + "Submission", + "Correction" + ] + }, + "V1ServiceOwnerCommonActors_Actor": { + "type": "object", + "additionalProperties": false, + "properties": { + "actorType": { + "description": "The type of actor that sent the transmission.", + "oneOf": [ + { + "$ref": "#/components/schemas/Actors_ActorType" + } + ] + }, + "actorName": { + "type": "string", + "description": "Specifies the name of the entity that sent the transmission. Mutually exclusive with ActorId. If ActorId\nis supplied, the name will be automatically populated from the name registries.", + "nullable": true, + "example": "Ola Nordmann" + }, + "actorId": { + "type": "string", + "description": "The identifier of the person or organization that sent the transmission. Mutually exclusive with ActorName.\nMight be omitted if ActorType is \"ServiceOwner\".", + "nullable": true, + "example": "urn:altinn:person:identifier-no:12018212345" + } + } + }, + "Actors_ActorType": { + "type": "string", + "description": "", + "x-enumNames": [ + "PartyRepresentative", + "ServiceOwner" + ], + "enum": [ + "PartyRepresentative", + "ServiceOwner" + ] + }, + "V1ServiceOwnerDialogTransmissionsQueriesSearch_Content": { + "type": "object", + "additionalProperties": false, + "properties": { + "title": { + "description": "The title of the content.", + "oneOf": [ + { + "$ref": "#/components/schemas/V1CommonContent_ContentValue" + } + ] + }, + "summary": { + "description": "The summary of the content.", + "oneOf": [ + { + "$ref": "#/components/schemas/V1CommonContent_ContentValue" + } + ] + }, + "contentReference": { + "description": "Front-channel embedded content. Used to dynamically embed content in the frontend from an external URL.", + "nullable": true, + "oneOf": [ + { + "$ref": "#/components/schemas/V1CommonContent_ContentValue" + } + ] + } + } + }, + "V1CommonContent_ContentValue": { + "type": "object", + "additionalProperties": false, + "properties": { + "value": { + "type": "array", + "description": "A list of localizations for the content.", + "items": { + "$ref": "#/components/schemas/V1CommonLocalizations_Localization" + } + }, + "mediaType": { + "type": "string", + "description": "Media type of the content, this can also indicate that the content is embeddable.\nFor a list of supported media types, see (link TBD)." + } + } + }, + "V1CommonLocalizations_Localization": { + "type": "object", + "additionalProperties": false, + "properties": { + "value": { + "type": "string", + "description": "The localized text or URI reference." + }, + "languageCode": { + "type": "string", + "description": "The language code of the localization in ISO 639-1 format.", + "example": "nb" + } + } + }, + "V1ServiceOwnerDialogTransmissionsQueriesSearch_Attachment": { + "type": "object", + "additionalProperties": false, + "properties": { + "id": { + "type": "string", + "description": "The unique identifier for the attachment in UUIDv7 format.", + "format": "guid" + }, + "displayName": { + "type": "array", + "description": "The display name of the attachment that should be used in GUIs.", + "items": { + "$ref": "#/components/schemas/V1CommonLocalizations_Localization" + } + }, + "urls": { + "type": "array", + "description": "The URLs associated with the attachment, each referring to a different representation of the attachment.", + "items": { + "$ref": "#/components/schemas/V1ServiceOwnerDialogTransmissionsQueriesSearch_AttachmentUrl" + } + } + } + }, + "V1ServiceOwnerDialogTransmissionsQueriesSearch_AttachmentUrl": { + "type": "object", + "additionalProperties": false, + "properties": { + "id": { + "type": "string", + "description": "The unique identifier for the attachment URL in UUIDv7 format.", + "format": "guid" + }, + "url": { + "type": "string", + "description": "The fully qualified URL of the attachment. Will be set to \"urn:dialogporten:unauthorized\" if the user is\nnot authorized to access the transmission.", + "format": "uri", + "example": "https://someendpoint.com/someattachment.pdf\nurn:dialogporten:unauthorized" + }, + "mediaType": { + "type": "string", + "description": "The media type of the attachment.", + "nullable": true, + "example": "application/pdf\napplication/zip" + }, + "consumerType": { + "description": "The type of consumer the URL is intended for.", + "oneOf": [ + { + "$ref": "#/components/schemas/Attachments_AttachmentUrlConsumerType" + } + ] + } + } + }, + "Attachments_AttachmentUrlConsumerType": { + "type": "string", + "description": "", + "x-enumNames": [ + "Gui", + "Api" + ], + "enum": [ + "Gui", + "Api" + ] + }, + "V1ServiceOwnerDialogTransmissionsQueriesGet_Transmission": { + "type": "object", + "additionalProperties": false, + "properties": { + "id": { + "type": "string", + "description": "The unique identifier for the transmission in UUIDv7 format.", + "format": "guid" + }, + "createdAt": { + "type": "string", + "description": "The date and time when the transmission was created.", + "format": "date-time" + }, + "authorizationAttribute": { + "type": "string", + "description": "The authorization attribute associated with the transmission.", + "nullable": true + }, + "extendedType": { + "type": "string", + "description": "The extended type URI for the transmission.", + "format": "uri", + "nullable": true + }, + "relatedTransmissionId": { + "type": "string", + "description": "The unique identifier for the related transmission, if any.", + "format": "guid", + "nullable": true + }, + "deletedAt": { + "type": "string", + "description": "The date and time when the transmission was deleted, if applicable.", + "format": "date-time", + "nullable": true + }, + "type": { + "description": "The type of the transmission.", + "oneOf": [ + { + "$ref": "#/components/schemas/DialogsEntitiesTransmissions_DialogTransmissionType" + } + ] + }, + "sender": { + "description": "The sender actor information for the transmission.", + "oneOf": [ + { + "$ref": "#/components/schemas/V1ServiceOwnerCommonActors_Actor" + } + ] + }, + "content": { + "description": "The content of the transmission.", + "oneOf": [ + { + "$ref": "#/components/schemas/V1ServiceOwnerDialogTransmissionsQueriesGet_Content" + } + ] + }, + "attachments": { + "type": "array", + "description": "The attachments associated with the transmission.", + "items": { + "$ref": "#/components/schemas/V1ServiceOwnerDialogTransmissionsQueriesGet_Attachment" + } + } + } + }, + "ProblemDetails": { + "type": "object", + "additionalProperties": false, + "properties": { + "type": { + "type": "string", + "default": "https://www.rfc-editor.org/rfc/rfc7231#section-6.5.1" + }, + "title": { + "type": "string", + "default": "One or more validation errors occurred." + }, + "status": { + "type": "integer", + "format": "int32", + "default": 400 + }, + "instance": { + "type": "string", + "default": "/api/route" + }, + "traceId": { + "type": "string", + "default": "0HMPNHL0JHL76:00000001" + }, + "detail": { + "type": "string", + "nullable": true + }, + "errors": { + "type": "array", + "items": { + "$ref": "#/components/schemas/ProblemDetails_Error" + } + } + } + }, + "ProblemDetails_Error": { + "type": "object", + "additionalProperties": false, + "properties": { + "name": { + "type": "string", + "default": "Error or field name" + }, + "reason": { + "type": "string", + "default": "Error reason" + }, + "code": { + "type": "string", + "nullable": true + }, + "severity": { + "type": "string", + "nullable": true + } + } + }, + "V1ServiceOwnerDialogTransmissionsQueriesGet_Content": { + "type": "object", + "additionalProperties": false, + "properties": { + "title": { + "description": "The title of the content.", + "oneOf": [ + { + "$ref": "#/components/schemas/V1CommonContent_ContentValue" + } + ] + }, + "summary": { + "description": "The summary of the content.", + "oneOf": [ + { + "$ref": "#/components/schemas/V1CommonContent_ContentValue" + } + ] + }, + "contentReference": { + "description": "Front-channel embedded content. Used to dynamically embed content in the frontend from an external URL.\nAllowed media types: application/vnd.dialogporten.frontchannelembed+json;type=markdown", + "nullable": true, + "oneOf": [ + { + "$ref": "#/components/schemas/V1CommonContent_ContentValue" + } + ] + } + } + }, + "V1ServiceOwnerDialogTransmissionsQueriesGet_Attachment": { + "type": "object", + "additionalProperties": false, + "properties": { + "id": { + "type": "string", + "description": "The unique identifier for the attachment in UUIDv7 format.", + "format": "guid" + }, + "displayName": { + "type": "array", + "description": "The display name of the attachment that should be used in GUIs.", + "items": { + "$ref": "#/components/schemas/V1CommonLocalizations_Localization" + } + }, + "urls": { + "type": "array", + "description": "The URLs associated with the attachment, each referring to a different representation of the attachment.", + "items": { + "$ref": "#/components/schemas/V1ServiceOwnerDialogTransmissionsQueriesGet_AttachmentUrl" + } + } + } + }, + "V1ServiceOwnerDialogTransmissionsQueriesGet_AttachmentUrl": { + "type": "object", + "additionalProperties": false, + "properties": { + "id": { + "type": "string", + "description": "The unique identifier for the attachment URL in UUIDv7 format.", + "format": "guid" + }, + "url": { + "type": "string", + "description": "The fully qualified URL of the attachment. Will be set to \"urn:dialogporten:unauthorized\" if the user is\nnot authorized to access the transmission.", + "format": "uri", + "example": "https://someendpoint.com/someattachment.pdf\nurn:dialogporten:unauthorized" + }, + "mediaType": { + "type": "string", + "description": "The media type of the attachment.", + "nullable": true, + "example": "application/pdf\napplication/zip" + }, + "consumerType": { + "description": "The type of consumer the URL is intended for.", + "oneOf": [ + { + "$ref": "#/components/schemas/Attachments_AttachmentUrlConsumerType" + } + ] + } + } + }, + "V1ServiceOwnerDialogTransmissionsCreate_TransmissionRequest": { + "type": "object", + "additionalProperties": false, + "properties": { + "id": { + "type": "string", + "description": "The UUDIv7 of the action may be provided to support idempotent additions to the list of transmissions.\nIf not supplied, a new UUIDv7 will be generated.", + "format": "guid", + "nullable": true, + "example": "01913cd5-784f-7d3b-abef-4c77b1f0972d" + }, + "createdAt": { + "type": "string", + "description": "If supplied, overrides the creating date and time for the transmission.\nIf not supplied, the current date /time will be used.", + "format": "date-time" + }, + "authorizationAttribute": { + "type": "string", + "description": "Contains an authorization resource attributeId, that can used in custom authorization rules in the XACML service\npolicy, which by default is the policy belonging to the service referred to by \"serviceResource\" in the dialog.\n \nCan also be used to refer to other service policies.", + "nullable": true, + "example": "mycustomresource\n/* equivalent to the above */\nurn:altinn:subresource:mycustomresource\nurn:altinn:task:Task_1\n/* refer to another service */\nurn:altinn:resource:some-other-service-identifier" + }, + "extendedType": { + "type": "string", + "description": "Arbitrary URI/URN describing a service-specific transmission type.\n \nRefer to the service-specific documentation provided by the service owner for details (if in use).", + "format": "uri", + "nullable": true + }, + "relatedTransmissionId": { + "type": "string", + "description": "Reference to any other transmission that this transmission is related to.", + "format": "guid", + "nullable": true + }, + "type": { + "description": "The type of transmission.", + "oneOf": [ + { + "$ref": "#/components/schemas/DialogsEntitiesTransmissions_DialogTransmissionType" + } + ] + }, + "sender": { + "description": "The actor that sent the transmission.", + "oneOf": [ + { + "$ref": "#/components/schemas/V1ServiceOwnerCommonActors_Actor" + } + ] + }, + "content": { + "description": "The transmission unstructured text content.", + "oneOf": [ + { + "$ref": "#/components/schemas/V1ServiceOwnerDialogsCommandsUpdate_TransmissionContent" + } + ] + }, + "attachments": { + "type": "array", + "description": "The transmission-level attachments.", + "items": { + "$ref": "#/components/schemas/V1ServiceOwnerDialogsCommandsUpdate_TransmissionAttachment" + } + } + } + }, + "V1ServiceOwnerDialogsCommandsUpdate_TransmissionContent": { + "type": "object", + "additionalProperties": false, + "properties": { + "title": { + "description": "The transmission title. Must be text/plain.", + "oneOf": [ + { + "$ref": "#/components/schemas/V1CommonContent_ContentValue" + } + ] + }, + "summary": { + "description": "The transmission summary.", + "oneOf": [ + { + "$ref": "#/components/schemas/V1CommonContent_ContentValue" + } + ] + }, + "contentReference": { + "description": "Front-channel embedded content. Used to dynamically embed content in the frontend from an external URL. Must be HTTPS.\nAllowed media types: application/vnd.dialogporten.frontchannelembed+json;type=markdown", + "nullable": true, + "oneOf": [ + { + "$ref": "#/components/schemas/V1CommonContent_ContentValue" + } + ] + } + } + }, + "V1ServiceOwnerDialogsCommandsUpdate_TransmissionAttachment": { + "type": "object", + "additionalProperties": false, + "properties": { + "id": { + "type": "string", + "description": "A self-defined UUIDv7 may be provided to support idempotent additions of transmission attachments. If not provided, a new UUIDv7 will be generated.", + "format": "guid", + "nullable": true, + "example": "01913cd5-784f-7d3b-abef-4c77b1f0972d" + }, + "displayName": { + "type": "array", + "description": "The display name of the attachment that should be used in GUIs.", + "items": { + "$ref": "#/components/schemas/V1CommonLocalizations_Localization" + } + }, + "urls": { + "type": "array", + "description": "The URLs associated with the attachment, each referring to a different representation of the attachment.", + "items": { + "$ref": "#/components/schemas/V1ServiceOwnerDialogsCommandsUpdate_TransmissionAttachmentUrl" + } + } + } + }, + "V1ServiceOwnerDialogsCommandsUpdate_TransmissionAttachmentUrl": { + "type": "object", + "additionalProperties": false, + "properties": { + "url": { + "type": "string", + "description": "The fully qualified URL of the attachment.", + "format": "uri" + }, + "mediaType": { + "type": "string", + "description": "The media type of the attachment.", + "nullable": true, + "example": "application/pdf\napplication/zip" + }, + "consumerType": { + "description": "The type of consumer the URL is intended for.", + "oneOf": [ + { + "$ref": "#/components/schemas/Attachments_AttachmentUrlConsumerType" + } + ] + } + } + }, + "V1ServiceOwnerDialogSeenLogsQueriesSearch_SeenLog": { + "type": "object", + "additionalProperties": false, + "properties": { + "id": { + "type": "string", + "format": "guid" + }, + "seenAt": { + "type": "string", + "format": "date-time" + }, + "seenBy": { + "$ref": "#/components/schemas/V1ServiceOwnerCommonActors_Actor" + }, + "isViaServiceOwner": { + "type": "boolean", + "nullable": true + } + } + }, + "V1ServiceOwnerDialogSeenLogsQueriesGet_SeenLog": { + "type": "object", + "additionalProperties": false, + "properties": { + "id": { + "type": "string", + "format": "guid" + }, + "seenAt": { + "type": "string", + "format": "date-time" + }, + "seenBy": { + "$ref": "#/components/schemas/V1ServiceOwnerCommonActors_Actor" + }, + "isViaServiceOwner": { + "type": "boolean", + "nullable": true + } + } + }, + "V1ServiceOwnerDialogsUpdate_DialogRequest": { + "type": "object", + "additionalProperties": false, + "properties": { + "dto": { + "$ref": "#/components/schemas/V1ServiceOwnerDialogsCommandsUpdate_Dialog" + } + } + }, + "V1ServiceOwnerDialogsCommandsUpdate_Dialog": { + "type": "object", + "additionalProperties": false, + "properties": { + "progress": { + "type": "integer", + "description": "Advisory indicator of progress, represented as 1-100 percentage value. 100% representing a dialog that has come\nto a natural completion (successful or not).", + "format": "int32", + "nullable": true + }, + "extendedStatus": { + "type": "string", + "description": "Arbitrary string with a service-specific indicator of status, typically used to indicate a fine-grained state of\nthe dialog to further specify the \"status\" enum.", + "nullable": true + }, + "externalReference": { + "type": "string", + "description": "Arbitrary string with a service-specific reference to an external system or service.", + "nullable": true + }, + "visibleFrom": { + "type": "string", + "description": "The timestamp when the dialog should be made visible for authorized end users. If not provided, the dialog will be\nimmediately available.", + "format": "date-time", + "nullable": true, + "example": "2022-12-31T23:59:59Z" + }, + "dueAt": { + "type": "string", + "description": "The due date for the dialog. Dialogs past due date might be marked as such in frontends but will still be available.", + "format": "date-time", + "nullable": true, + "example": "2022-12-31T23:59:59Z" + }, + "expiresAt": { + "type": "string", + "description": "The expiration date for the dialog. This is the last date when the dialog is available for the end user.\n \nAfter this date is passed, the dialog will be considered expired and no longer available for the end user in any\nAPI. If not supplied, the dialog will be considered to never expire. This field can be changed after creation.", + "format": "date-time", + "nullable": true, + "example": "2022-12-31T23:59:59Z" + }, + "status": { + "description": "The aggregated status of the dialog.", + "oneOf": [ + { + "$ref": "#/components/schemas/DialogsEntities_DialogStatus" + } + ] + }, + "content": { + "description": "The dialog unstructured text content.", + "oneOf": [ + { + "$ref": "#/components/schemas/V1ServiceOwnerDialogsCommandsUpdate_Content" + } + ] + }, + "searchTags": { + "type": "array", + "description": "A list of words (tags) that will be used in dialog search queries. Not visible in end-user DTO.", + "items": { + "$ref": "#/components/schemas/V1ServiceOwnerDialogsCommandsUpdate_SearchTag" + } + }, + "attachments": { + "type": "array", + "description": "The attachments associated with the dialog (on an aggregate level).", + "items": { + "$ref": "#/components/schemas/V1ServiceOwnerDialogsCommandsUpdate_Attachment" + } + }, + "transmissions": { + "type": "array", + "description": "The immutable list of transmissions associated with the dialog. When updating via PUT, any transmissions\nadded here will be appended to the existing list of transmissions.", + "items": { + "$ref": "#/components/schemas/V1ServiceOwnerDialogsCommandsUpdate_Transmission" + } + }, + "guiActions": { + "type": "array", + "description": "The GUI actions associated with the dialog. Should be used in browser-based interactive frontends.", + "items": { + "$ref": "#/components/schemas/V1ServiceOwnerDialogsCommandsUpdate_GuiAction" + } + }, + "apiActions": { + "type": "array", + "description": "The API actions associated with the dialog. Should be used in specialized, non-browser-based integrations.", + "items": { + "$ref": "#/components/schemas/V1ServiceOwnerDialogsCommandsUpdate_ApiAction" + } + }, + "activities": { + "type": "array", + "description": "An immutable list of activities associated with the dialog. When updating via PUT, any activities added here\nwill be appended to the existing list of activities.", + "items": { + "$ref": "#/components/schemas/V1ServiceOwnerDialogsCommandsUpdate_Activity" + } + } + } + }, + "DialogsEntities_DialogStatus": { + "type": "string", + "description": "", + "x-enumNames": [ + "New", + "InProgress", + "Draft", + "Sent", + "RequiresAttention", + "Completed" + ], + "enum": [ + "New", + "InProgress", + "Draft", + "Sent", + "RequiresAttention", + "Completed" + ] + }, + "V1ServiceOwnerDialogsCommandsUpdate_Content": { + "type": "object", + "additionalProperties": false, + "properties": { + "title": { + "description": "The title of the dialog. Must be text/plain.", + "oneOf": [ + { + "$ref": "#/components/schemas/V1CommonContent_ContentValue" + } + ] + }, + "summary": { + "description": "A short summary of the dialog and its current state. Must be text/plain.", + "oneOf": [ + { + "$ref": "#/components/schemas/V1CommonContent_ContentValue" + } + ] + }, + "senderName": { + "description": "Overridden sender name. If not supplied, assume \"org\" as the sender name. Must be text/plain if supplied.", + "nullable": true, + "oneOf": [ + { + "$ref": "#/components/schemas/V1CommonContent_ContentValue" + } + ] + }, + "additionalInfo": { + "description": "Additional information about the dialog, this may contain Markdown.", + "nullable": true, + "oneOf": [ + { + "$ref": "#/components/schemas/V1CommonContent_ContentValue" + } + ] + }, + "extendedStatus": { + "description": "Used as the human-readable label used to describe the \"ExtendedStatus\" field. Must be text/plain.", + "nullable": true, + "oneOf": [ + { + "$ref": "#/components/schemas/V1CommonContent_ContentValue" + } + ] + }, + "mainContentReference": { + "description": "Front-channel embedded content. Used to dynamically embed content in the frontend from an external URL. Must be HTTPS.", + "nullable": true, + "oneOf": [ + { + "$ref": "#/components/schemas/V1CommonContent_ContentValue" + } + ] + } + } + }, + "V1ServiceOwnerDialogsCommandsUpdate_SearchTag": { + "type": "object", + "additionalProperties": false, + "properties": { + "value": { + "type": "string", + "description": "A search tag value." + } + } + }, + "V1ServiceOwnerDialogsCommandsUpdate_Attachment": { + "type": "object", + "additionalProperties": false, + "properties": { + "id": { + "type": "string", + "description": "A self-defined UUIDv7 may be provided to support idempotent additions of attachments. If not provided, a new UUIDv7 will be generated.", + "format": "guid", + "nullable": true, + "example": "01913cd5-784f-7d3b-abef-4c77b1f0972d" + }, + "displayName": { + "type": "array", + "description": "The display name of the attachment that should be used in GUIs.", + "items": { + "$ref": "#/components/schemas/V1CommonLocalizations_Localization" + } + }, + "urls": { + "type": "array", + "description": "The URLs associated with the attachment, each referring to a different representation of the attachment.", + "items": { + "$ref": "#/components/schemas/V1ServiceOwnerDialogsCommandsUpdate_AttachmentUrl" + } + } + } + }, + "V1ServiceOwnerDialogsCommandsUpdate_AttachmentUrl": { + "type": "object", + "additionalProperties": false, + "properties": { + "id": { + "type": "string", + "description": "A UUIDv7 used for merging existing data, unknown IDs will be ignored as this entity does not support user-defined IDs.", + "format": "guid", + "nullable": true, + "example": "01913cd5-784f-7d3b-abef-4c77b1f0972d" + }, + "url": { + "type": "string", + "description": "The fully qualified URL of the attachment.", + "format": "uri" + }, + "mediaType": { + "type": "string", + "description": "The media type of the attachment.", + "nullable": true, + "example": "application/pdf\napplication/zip" + }, + "consumerType": { + "description": "The type of consumer the URL is intended for.", + "oneOf": [ + { + "$ref": "#/components/schemas/Attachments_AttachmentUrlConsumerType" + } + ] + } + } + }, + "V1ServiceOwnerDialogsCommandsUpdate_Transmission": { + "type": "object", + "additionalProperties": false, + "properties": { + "id": { + "type": "string", + "description": "The UUDIv7 of the action may be provided to support idempotent additions to the list of transmissions.\nIf not supplied, a new UUIDv7 will be generated.", + "format": "guid", + "nullable": true, + "example": "01913cd5-784f-7d3b-abef-4c77b1f0972d" + }, + "createdAt": { + "type": "string", + "description": "If supplied, overrides the creating date and time for the transmission.\nIf not supplied, the current date /time will be used.", + "format": "date-time" + }, + "authorizationAttribute": { + "type": "string", + "description": "Contains an authorization resource attributeId, that can used in custom authorization rules in the XACML service\npolicy, which by default is the policy belonging to the service referred to by \"serviceResource\" in the dialog.\n \nCan also be used to refer to other service policies.", + "nullable": true, + "example": "mycustomresource\n/* equivalent to the above */\nurn:altinn:subresource:mycustomresource\nurn:altinn:task:Task_1\n/* refer to another service */\nurn:altinn:resource:some-other-service-identifier" + }, + "extendedType": { + "type": "string", + "description": "Arbitrary URI/URN describing a service-specific transmission type.\n \nRefer to the service-specific documentation provided by the service owner for details (if in use).", + "format": "uri", + "nullable": true + }, + "relatedTransmissionId": { + "type": "string", + "description": "Reference to any other transmission that this transmission is related to.", + "format": "guid", + "nullable": true + }, + "type": { + "description": "The type of transmission.", + "oneOf": [ + { + "$ref": "#/components/schemas/DialogsEntitiesTransmissions_DialogTransmissionType" + } + ] + }, + "sender": { + "description": "The actor that sent the transmission.", + "oneOf": [ + { + "$ref": "#/components/schemas/V1ServiceOwnerCommonActors_Actor" + } + ] + }, + "content": { + "description": "The transmission unstructured text content.", + "oneOf": [ + { + "$ref": "#/components/schemas/V1ServiceOwnerDialogsCommandsUpdate_TransmissionContent" + } + ] + }, + "attachments": { + "type": "array", + "description": "The transmission-level attachments.", + "items": { + "$ref": "#/components/schemas/V1ServiceOwnerDialogsCommandsUpdate_TransmissionAttachment" + } + } + } + }, + "V1ServiceOwnerDialogsCommandsUpdate_GuiAction": { + "type": "object", + "additionalProperties": false, + "properties": { + "id": { + "type": "string", + "description": "A self-defined UUIDv7 may be provided to support idempotent additions of Gui Actions. If not provided, a new UUIDv7 will be generated.", + "format": "guid", + "nullable": true, + "example": "01913cd5-784f-7d3b-abef-4c77b1f0972d" + }, + "action": { + "type": "string", + "description": "The action identifier for the action, corresponding to the \"action\" attributeId used in the XACML service policy." + }, + "url": { + "type": "string", + "description": "The fully qualified URL of the action, to which the user will be redirected when the action is triggered. Will be set to\n\"urn:dialogporten:unauthorized\" if the user is not authorized to perform the action.", + "format": "uri", + "example": "urn:dialogporten:unauthorized\nhttps://someendpoint.com/gui/some-service-instance-id" + }, + "authorizationAttribute": { + "type": "string", + "description": "Contains an authorization resource attributeId, that can used in custom authorization rules in the XACML service\npolicy, which by default is the policy belonging to the service referred to by \"serviceResource\" in the dialog.\n \nCan also be used to refer to other service policies.", + "nullable": true, + "example": "mycustomresource\n/* equivalent to the above */\nurn:altinn:subresource:mycustomresource\nurn:altinn:task:Task_1\n/* refer to another service */\nurn:altinn:resource:some-other-service-identifier" + }, + "isDeleteDialogAction": { + "type": "boolean", + "description": "Indicates whether the action results in the dialog being deleted. Used by frontends to implement custom UX\nfor delete actions." + }, + "httpMethod": { + "description": "The HTTP method that the frontend should use when redirecting the user.", + "nullable": true, + "oneOf": [ + { + "$ref": "#/components/schemas/Http_HttpVerb" + } + ] + }, + "priority": { + "description": "Indicates a priority for the action, making it possible for frontends to adapt GUI elements based on action\npriority.", + "oneOf": [ + { + "$ref": "#/components/schemas/DialogsEntitiesActions_DialogGuiActionPriority" + } + ] + }, + "title": { + "type": "array", + "description": "The title of the action, this should be short and in verb form. Must be text/plain.", + "items": { + "$ref": "#/components/schemas/V1CommonLocalizations_Localization" + } + }, + "prompt": { + "type": "array", + "description": "If there should be a prompt asking the user for confirmation before the action is executed,\nthis field should contain the prompt text.", + "nullable": true, + "items": { + "$ref": "#/components/schemas/V1CommonLocalizations_Localization" + } + } + } + }, + "Http_HttpVerb": { + "type": "string", + "description": "", + "x-enumNames": [ + "GET", + "POST", + "PUT", + "PATCH", + "DELETE", + "HEAD", + "OPTIONS", + "TRACE", + "CONNECT" + ], + "enum": [ + "GET", + "POST", + "PUT", + "PATCH", + "DELETE", + "HEAD", + "OPTIONS", + "TRACE", + "CONNECT" + ] + }, + "DialogsEntitiesActions_DialogGuiActionPriority": { + "type": "string", + "description": "", + "x-enumNames": [ + "Primary", + "Secondary", + "Tertiary" + ], + "enum": [ + "Primary", + "Secondary", + "Tertiary" + ] + }, + "V1ServiceOwnerDialogsCommandsUpdate_ApiAction": { + "type": "object", + "additionalProperties": false, + "properties": { + "id": { + "type": "string", + "description": "A self-defined UUIDv7 may be provided to support idempotent additions of Api Actions. If not provided, a new UUIDv7 will be generated.", + "format": "guid", + "nullable": true, + "example": "01913cd5-784f-7d3b-abef-4c77b1f0972d" + }, + "action": { + "type": "string", + "description": "String identifier for the action, corresponding to the \"action\" attributeId used in the XACML service policy,\nwhich by default is the policy belonging to the service referred to by \"serviceResource\" in the dialog.", + "example": "write" + }, + "authorizationAttribute": { + "type": "string", + "description": "Contains an authorization resource attributeId, that can used in custom authorization rules in the XACML service\npolicy, which by default is the policy belonging to the service referred to by \"serviceResource\" in the dialog.\n \nCan also be used to refer to other service policies.", + "nullable": true, + "example": "mycustomresource\n/* equivalent to the above */\nurn:altinn:subresource:mycustomresource\nurn:altinn:task:Task_1\n/* refer to another service */\nurn:altinn:resource:some-other-service-identifier" + }, + "endpoints": { + "type": "array", + "description": "The endpoints associated with the action.", + "items": { + "$ref": "#/components/schemas/V1ServiceOwnerDialogsCommandsUpdate_ApiActionEndpoint" + } + } + } + }, + "V1ServiceOwnerDialogsCommandsUpdate_ApiActionEndpoint": { + "type": "object", + "additionalProperties": false, + "properties": { + "id": { + "type": "string", + "description": "A UUIDv7 used for merging existing data, unknown IDs will be ignored as this entity does not support user-defined IDs.", + "format": "guid", + "nullable": true, + "example": "01913cd5-784f-7d3b-abef-4c77b1f0972d" + }, + "version": { + "type": "string", + "description": "Arbitrary string indicating the version of the endpoint.", + "nullable": true + }, + "url": { + "type": "string", + "description": "The fully qualified URL of the API endpoint.", + "format": "uri" + }, + "httpMethod": { + "description": "The HTTP method that the endpoint expects for this action.", + "oneOf": [ + { + "$ref": "#/components/schemas/Http_HttpVerb" + } + ] + }, + "documentationUrl": { + "type": "string", + "description": "Link to documentation for the endpoint, providing documentation for integrators. Should be a URL to a\nhuman-readable page.", + "format": "uri", + "nullable": true + }, + "requestSchema": { + "type": "string", + "description": "Link to the request schema for the endpoint. Used to provide documentation for integrators.\nDialogporten will not validate information on this endpoint.", + "format": "uri", + "nullable": true + }, + "responseSchema": { + "type": "string", + "description": "Link to the response schema for the endpoint. Used to provide documentation for integrators.\nDialogporten will not validate information on this endpoint.", + "format": "uri", + "nullable": true + }, + "deprecated": { + "type": "boolean", + "description": "Boolean indicating if the endpoint is deprecated." + }, + "sunsetAt": { + "type": "string", + "description": "Date and time when the endpoint will no longer function. Only set if the endpoint is deprecated. Dialogporten\nwill not enforce this date.", + "format": "date-time", + "nullable": true + } + } + }, + "V1ServiceOwnerDialogsCommandsUpdate_Activity": { + "type": "object", + "additionalProperties": false, + "properties": { + "id": { + "type": "string", + "description": "The UUDIv7 of the action may be provided to support idempotent additions to the list of activities.\nIf not supplied, a new UUIDv7 will be generated.", + "format": "guid", + "nullable": true, + "example": "01913cd5-784f-7d3b-abef-4c77b1f0972d" + }, + "createdAt": { + "type": "string", + "description": "If supplied, overrides the creating date and time for the transmission.\nIf not supplied, the current date /time will be used.", + "format": "date-time", + "nullable": true + }, + "extendedType": { + "type": "string", + "description": "Arbitrary URI/URN describing a service-specific transmission type.", + "format": "uri", + "nullable": true + }, + "type": { + "description": "The type of transmission.", + "oneOf": [ + { + "$ref": "#/components/schemas/DialogsEntitiesActivities_DialogActivityType" + } + ] + }, + "transmissionId": { + "type": "string", + "description": "If the activity is related to a particular transmission, this field will contain the transmission identifier.\nMust be present in the request body.", + "format": "guid", + "nullable": true + }, + "performedBy": { + "description": "The actor that performed the activity.", + "oneOf": [ + { + "$ref": "#/components/schemas/V1ServiceOwnerCommonActors_Actor" + } + ] + }, + "description": { + "type": "array", + "description": "Unstructured text describing the activity. Only set if the activity type is \"Information\".", + "items": { + "$ref": "#/components/schemas/V1CommonLocalizations_Localization" + } + } + } + }, + "DialogsEntitiesActivities_DialogActivityType": { + "type": "string", + "description": "", + "x-enumNames": [ + "DialogCreated", + "DialogClosed", + "Information", + "TransmissionOpened", + "PaymentMade", + "SignatureProvided", + "DialogOpened", + "DialogDeleted", + "DialogRestored", + "SentToSigning", + "SentToFormFill", + "SentToSendIn", + "SentToPayment" + ], + "enum": [ + "DialogCreated", + "DialogClosed", + "Information", + "TransmissionOpened", + "PaymentMade", + "SignatureProvided", + "DialogOpened", + "DialogDeleted", + "DialogRestored", + "SentToSigning", + "SentToFormFill", + "SentToSendIn", + "SentToPayment" + ] + }, + "PaginatedListOfV1ServiceOwnerDialogsQueriesSearch_Dialog": { + "type": "object", + "additionalProperties": false, + "properties": { + "items": { + "type": "array", + "description": "The paginated list of items", + "items": { + "$ref": "#/components/schemas/V1ServiceOwnerDialogsQueriesSearch_Dialog" + } + }, + "hasNextPage": { + "type": "boolean", + "description": "Whether there are more items available that can be fetched by supplying the continuation token" + }, + "continuationToken": { + "type": "string", + "description": "The continuation token to be used to fetch the next page of items", + "nullable": true, + "example": "createdat_2024-07-31T09:09:03.0257090Z,id_0c089101-b7cf-a476-955c-f00a78d74a4e" + }, + "orderBy": { + "type": "string", + "description": "The current sorting order of the items", + "example": "createdat_desc,id_desc" + } + } + }, + "V1ServiceOwnerDialogsQueriesSearch_Dialog": { + "type": "object", + "additionalProperties": false, + "properties": { + "id": { + "type": "string", + "description": "The unique identifier for the dialog in UUIDv7 format.", + "format": "guid", + "example": "01913cd5-784f-7d3b-abef-4c77b1f0972d" + }, + "org": { + "type": "string", + "description": "The service owner code representing the organization (service owner) related to this dialog.", + "example": "ske" + }, + "revision": { + "type": "string", + "description": "The unique identifier for the revision in UUIDv4 format.", + "format": "guid", + "example": "a312cb9c-7632-43c2-aa38-69b06aed56ca" + }, + "serviceResource": { + "type": "string", + "description": "The service identifier for the service that the dialog is related to in URN-format.\nThis corresponds to a service resource in the Altinn Resource Registry.", + "example": "urn:altinn:resource:some-service-identifier" + }, + "serviceResourceType": { + "type": "string", + "description": "The ServiceResource type, as defined in Altinn Resource Registry (see ResourceType)." + }, + "party": { + "type": "string", + "description": "The party code representing the organization or person that the dialog belongs to in URN format.", + "example": "urn:altinn:person:identifier-no:01125512345\nurn:altinn:organization:identifier-no:912345678" + }, + "progress": { + "type": "integer", + "description": "Advisory indicator of progress, represented as 1-100 percentage value. 100% representing a dialog that has come\nto a natural completion (successful or not).", + "format": "int32", + "nullable": true + }, + "process": { + "type": "string", + "description": "Optional process identifier used to indicate a business process this dialog belongs to.", + "nullable": true + }, + "precedingProcess": { + "type": "string", + "description": "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.", + "nullable": true + }, + "guiAttachmentCount": { + "type": "integer", + "description": "The number of attachments in the dialog made available for browser-based frontends.", + "format": "int32", + "nullable": true + }, + "extendedStatus": { + "type": "string", + "description": "Arbitrary string with a service-specific indicator of status, typically used to indicate a fine-grained state of\nthe dialog to further specify the \"status\" enum.\n \nRefer to the service-specific documentation provided by the service owner for details on the possible values (if\nin use).", + "nullable": true + }, + "externalReference": { + "type": "string", + "description": "Arbitrary string with a service-specific reference to an external system or service.\n \nRefer to the service-specific documentation provided by the service owner for details (if in use).", + "nullable": true + }, + "createdAt": { + "type": "string", + "description": "The date and time when the dialog was created.", + "format": "date-time", + "example": "2022-12-31T23:59:59Z" + }, + "updatedAt": { + "type": "string", + "description": "The date and time when the dialog was last updated.", + "format": "date-time", + "example": "2022-12-31T23:59:59Z" + }, + "dueAt": { + "type": "string", + "description": "The due date for the dialog. This is the last date when the dialog is expected to be completed.", + "format": "date-time", + "nullable": true, + "example": "2022-12-31T23:59:59Z" + }, + "visibleFrom": { + "type": "string", + "description": "The timestamp when the dialog will be made visible for authorized end users.", + "format": "date-time", + "nullable": true + }, + "status": { + "description": "The aggregated status of the dialog.", + "oneOf": [ + { + "$ref": "#/components/schemas/DialogsEntities_DialogStatus" + } + ] + }, + "systemLabel": { + "description": "Current display state.", + "oneOf": [ + { + "$ref": "#/components/schemas/DialogEndUserContextsEntities_SystemLabel" + } + ] + }, + "latestActivity": { + "description": "The latest entry in the dialog's activity log.", + "nullable": true, + "oneOf": [ + { + "$ref": "#/components/schemas/V1ServiceOwnerDialogsQueriesSearch_DialogActivity" + } + ] + }, + "seenSinceLastUpdate": { + "type": "array", + "description": "The list of seen log entries for the dialog newer than the dialog ChangedAt date.", + "items": { + "$ref": "#/components/schemas/V1ServiceOwnerDialogsQueriesSearch_DialogSeenLog" + } + }, + "content": { + "description": "The content of the dialog in search results.", + "oneOf": [ + { + "$ref": "#/components/schemas/V1ServiceOwnerDialogsQueriesSearch_Content" + } + ] + } + } + }, + "DialogEndUserContextsEntities_SystemLabel": { + "type": "string", + "description": "", + "x-enumNames": [ + "Default", + "Bin", + "Archive" + ], + "enum": [ + "Default", + "Bin", + "Archive" + ] + }, + "V1ServiceOwnerDialogsQueriesSearch_DialogActivity": { + "type": "object", + "additionalProperties": false, + "properties": { + "id": { + "type": "string", + "description": "The unique identifier for the activity in UUIDv7 format.", + "format": "guid" + }, + "createdAt": { + "type": "string", + "description": "The date and time when the activity was created.", + "format": "date-time", + "nullable": true + }, + "extendedType": { + "type": "string", + "description": "An arbitrary string with a service-specific activity type.\n \nConsult the service-specific documentation provided by the service owner for details (if in use).", + "format": "uri", + "nullable": true + }, + "type": { + "description": "The type of activity.", + "oneOf": [ + { + "$ref": "#/components/schemas/DialogsEntitiesActivities_DialogActivityType" + } + ] + }, + "transmissionId": { + "type": "string", + "description": "If the activity is related to a particular transmission, this field will contain the transmission identifier.", + "format": "guid", + "nullable": true + }, + "performedBy": { + "description": "The actor that performed the activity.", + "oneOf": [ + { + "$ref": "#/components/schemas/V1ServiceOwnerCommonActors_Actor" + } + ] + }, + "description": { + "type": "array", + "description": "Unstructured text describing the activity. Only set if the activity type is \"Information\".", + "items": { + "$ref": "#/components/schemas/V1CommonLocalizations_Localization" + } + } + } + }, + "V1ServiceOwnerDialogsQueriesSearch_DialogSeenLog": { + "type": "object", + "additionalProperties": false, + "properties": { + "id": { + "type": "string", + "description": "The unique identifier for the seen log entry in UUIDv7 format.", + "format": "guid" + }, + "seenAt": { + "type": "string", + "description": "The timestamp when the dialog revision was seen.", + "format": "date-time" + }, + "seenBy": { + "description": "The actor that saw the dialog revision.", + "oneOf": [ + { + "$ref": "#/components/schemas/V1ServiceOwnerCommonActors_Actor" + } + ] + }, + "isViaServiceOwner": { + "type": "boolean", + "description": "Flag indicating whether the seen log entry was created via the service owner.\n \nThis is used when the service owner uses the service owner API to implement its own frontend.", + "nullable": true + }, + "isCurrentEndUser": { + "type": "boolean", + "description": "Flag indicating whether the seen log entry was created by the end user supplied in the query." + } + } + }, + "V1ServiceOwnerDialogsQueriesSearch_Content": { + "type": "object", + "additionalProperties": false, + "properties": { + "title": { + "description": "The title of the dialog.", + "oneOf": [ + { + "$ref": "#/components/schemas/V1CommonContent_ContentValue" + } + ] + }, + "summary": { + "description": "A short summary of the dialog and its current state.", + "oneOf": [ + { + "$ref": "#/components/schemas/V1CommonContent_ContentValue" + } + ] + }, + "senderName": { + "description": "Overridden sender name. If not supplied, assume \"org\" as the sender name.", + "nullable": true, + "oneOf": [ + { + "$ref": "#/components/schemas/V1CommonContent_ContentValue" + } + ] + }, + "extendedStatus": { + "description": "Used as the human-readable label used to describe the \"ExtendedStatus\" field.", + "nullable": true, + "oneOf": [ + { + "$ref": "#/components/schemas/V1CommonContent_ContentValue" + } + ] + } + } + }, + "V1ServiceOwnerDialogsQueriesGet_Dialog": { + "type": "object", + "additionalProperties": false, + "properties": { + "id": { + "type": "string", + "description": "The unique identifier for the dialog in UUIDv7 format.", + "format": "guid", + "example": "01913cd5-784f-7d3b-abef-4c77b1f0972d" + }, + "revision": { + "type": "string", + "description": "The unique identifier for the revision in UUIDv4 format.", + "format": "guid", + "example": "a312cb9c-7632-43c2-aa38-69b06aed56ca" + }, + "org": { + "type": "string", + "description": "The service owner code representing the organization (service owner) related to this dialog.", + "example": "ske" + }, + "serviceResource": { + "type": "string", + "description": "The service identifier for the service that the dialog is related to in URN-format.\nThis corresponds to a service resource in the Altinn Resource Registry.", + "example": "urn:altinn:resource:some-service-identifier" + }, + "serviceResourceType": { + "type": "string", + "description": "The ServiceResource type, as defined in Altinn Resource Registry (see ResourceType)." + }, + "party": { + "type": "string", + "description": "The party code representing the organization or person that the dialog belongs to in URN format.", + "example": "urn:altinn:person:identifier-no:01125512345\nurn:altinn:organization:identifier-no:912345678" + }, + "progress": { + "type": "integer", + "description": "Advisory indicator of progress, represented as 1-100 percentage value. 100% representing a dialog that has come\nto a natural completion (successful or not).", + "format": "int32", + "nullable": true + }, + "process": { + "type": "string", + "description": "Optional process identifier used to indicate a business process this dialog belongs to.", + "nullable": true + }, + "precedingProcess": { + "type": "string", + "description": "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.", + "nullable": true + }, + "extendedStatus": { + "type": "string", + "description": "Arbitrary string with a service-specific indicator of status, typically used to indicate a fine-grained state of\nthe dialog to further specify the \"status\" enum.\n \nRefer to the service-specific documentation provided by the service owner for details on the possible values (if\nin use).", + "nullable": true + }, + "externalReference": { + "type": "string", + "description": "Arbitrary string with a service-specific reference to an external system or service.\n \nRefer to the service-specific documentation provided by the service owner for details (if in use).", + "nullable": true + }, + "deletedAt": { + "type": "string", + "description": "If deleted, the date and time when the deletion was performed.", + "format": "date-time", + "nullable": true + }, + "visibleFrom": { + "type": "string", + "description": "The timestamp when the dialog will be made visible for authorized end users.", + "format": "date-time", + "nullable": true, + "example": "2022-12-31T23:59:59Z" + }, + "dueAt": { + "type": "string", + "description": "The due date for the dialog. Dialogs past due date might be marked as such in frontends but will still be available.", + "format": "date-time", + "nullable": true, + "example": "2022-12-31T23:59:59Z" + }, + "expiresAt": { + "type": "string", + "description": "The expiration date for the dialog. This is the last date when the dialog is available for the end user.\n \nAfter this date is passed, the dialog will be considered expired and no longer available for the end user in any\nAPI. If not supplied, the dialog will be considered to never expire. This field can be changed by the service\nowner after the dialog has been created.", + "format": "date-time", + "nullable": true, + "example": "2022-12-31T23:59:59Z" + }, + "createdAt": { + "type": "string", + "description": "The date and time when the dialog was created.", + "format": "date-time", + "example": "2022-12-31T23:59:59Z" + }, + "updatedAt": { + "type": "string", + "description": "The date and time when the dialog was last updated.", + "format": "date-time", + "example": "2022-12-31T23:59:59Z" + }, + "status": { + "description": "The aggregated status of the dialog.", + "oneOf": [ + { + "$ref": "#/components/schemas/DialogsEntities_DialogStatus" + } + ] + }, + "systemLabel": { + "description": "Current display state.", + "oneOf": [ + { + "$ref": "#/components/schemas/DialogEndUserContextsEntities_SystemLabel" + } + ] + }, + "content": { + "description": "The dialog unstructured text content.", + "oneOf": [ + { + "$ref": "#/components/schemas/V1ServiceOwnerDialogsQueriesGet_Content" + } + ] + }, + "searchTags": { + "type": "array", + "description": "The list of words (tags) that will be used in dialog search queries. Not visible in end-user DTO.", + "nullable": true, + "items": { + "$ref": "#/components/schemas/V1ServiceOwnerDialogsQueriesGet_SearchTag" + } + }, + "attachments": { + "type": "array", + "description": "The attachments associated with the dialog (on an aggregate level).", + "items": { + "$ref": "#/components/schemas/V1ServiceOwnerDialogsQueriesGet_DialogAttachment" + } + }, + "transmissions": { + "type": "array", + "description": "The immutable list of transmissions associated with the dialog.", + "items": { + "$ref": "#/components/schemas/V1ServiceOwnerDialogsQueriesGet_DialogTransmission" + } + }, + "guiActions": { + "type": "array", + "description": "The GUI actions associated with the dialog. Should be used in browser-based interactive frontends.", + "items": { + "$ref": "#/components/schemas/V1ServiceOwnerDialogsQueriesGet_DialogGuiAction" + } + }, + "apiActions": { + "type": "array", + "description": "The API actions associated with the dialog. Should be used in specialized, non-browser-based integrations.", + "items": { + "$ref": "#/components/schemas/V1ServiceOwnerDialogsQueriesGet_DialogApiAction" + } + }, + "activities": { + "type": "array", + "description": "An immutable list of activities associated with the dialog.", + "items": { + "$ref": "#/components/schemas/V1ServiceOwnerDialogsQueriesGet_DialogActivity" + } + }, + "seenSinceLastUpdate": { + "type": "array", + "description": "The list of seen log entries for the dialog newer than the dialog ChangedAt date.", + "items": { + "$ref": "#/components/schemas/V1ServiceOwnerDialogsQueriesGet_DialogSeenLog" + } + } + } + }, + "OrderSetOfTOrderDefinitionAndTTarget": {}, + "ContinuationTokenSetOfTOrderDefinitionAndTTarget": {}, + "V1ServiceOwnerDialogsQueriesGet_Content": { + "type": "object", + "additionalProperties": false, + "properties": { + "title": { + "description": "The title of the dialog.", + "oneOf": [ + { + "$ref": "#/components/schemas/V1CommonContent_ContentValue" + } + ] + }, + "summary": { + "description": "A short summary of the dialog and its current state.", + "oneOf": [ + { + "$ref": "#/components/schemas/V1CommonContent_ContentValue" + } + ] + }, + "senderName": { + "description": "Overridden sender name. If not supplied, assume \"org\" as the sender name.", + "nullable": true, + "oneOf": [ + { + "$ref": "#/components/schemas/V1CommonContent_ContentValue" + } + ] + }, + "additionalInfo": { + "description": "Additional information about the dialog, this may contain Markdown.", + "nullable": true, + "oneOf": [ + { + "$ref": "#/components/schemas/V1CommonContent_ContentValue" + } + ] + }, + "extendedStatus": { + "description": "Used as the human-readable label used to describe the \"ExtendedStatus\" field.", + "nullable": true, + "oneOf": [ + { + "$ref": "#/components/schemas/V1CommonContent_ContentValue" + } + ] + }, + "mainContentReference": { + "description": "Front-channel embedded content. Used to dynamically embed content in the frontend from an external URL. Must be HTTPS.\nAllowed media types: application/vnd.dialogporten.frontchannelembed+json;type=markdown", + "nullable": true, + "oneOf": [ + { + "$ref": "#/components/schemas/V1CommonContent_ContentValue" + } + ] + } + } + }, + "V1ServiceOwnerDialogsQueriesGet_SearchTag": { + "type": "object", + "additionalProperties": false, + "properties": { + "value": { + "type": "string", + "description": "A search tag value." + } + } + }, + "V1ServiceOwnerDialogsQueriesGet_DialogAttachment": { + "type": "object", + "additionalProperties": false, + "properties": { + "id": { + "type": "string", + "description": "The unique identifier for the attachment in UUIDv7 format.", + "format": "guid" + }, + "displayName": { + "type": "array", + "description": "The display name of the attachment that should be used in GUIs.", + "items": { + "$ref": "#/components/schemas/V1CommonLocalizations_Localization" + } + }, + "urls": { + "type": "array", + "description": "The URLs associated with the attachment, each referring to a different representation of the attachment.", + "items": { + "$ref": "#/components/schemas/V1ServiceOwnerDialogsQueriesGet_DialogAttachmentUrl" + } + } + } + }, + "V1ServiceOwnerDialogsQueriesGet_DialogAttachmentUrl": { + "type": "object", + "additionalProperties": false, + "properties": { + "id": { + "type": "string", + "description": "The unique identifier for the attachment URL in UUIDv7 format.", + "format": "guid" + }, + "url": { + "type": "string", + "description": "The fully qualified URL of the attachment.", + "format": "uri", + "example": "https://someendpoint.com/someattachment.pdf" + }, + "mediaType": { + "type": "string", + "description": "The media type of the attachment.", + "nullable": true, + "example": "application/pdf\napplication/zip" + }, + "consumerType": { + "description": "What type of consumer the URL is intended for.", + "oneOf": [ + { + "$ref": "#/components/schemas/Attachments_AttachmentUrlConsumerType" + } + ] + } + } + }, + "V1ServiceOwnerDialogsQueriesGet_DialogTransmission": { + "type": "object", + "additionalProperties": false, + "properties": { + "id": { + "type": "string", + "description": "The unique identifier for the transmission in UUIDv7 format.", + "format": "guid" + }, + "createdAt": { + "type": "string", + "description": "The date and time when the transmission was created.", + "format": "date-time" + }, + "authorizationAttribute": { + "type": "string", + "description": "Contains an authorization resource attributeId, that can used in custom authorization rules in the XACML service\npolicy, which by default is the policy belonging to the service referred to by \"serviceResource\" in the dialog.\n \nCan also be used to refer to other service policies.", + "nullable": true, + "example": "mycustomresource\n/* equivalent to the above */\nurn:altinn:subresource:mycustomresource\nurn:altinn:task:Task_1\n/* refer to another service */\nurn:altinn:resource:some-other-service-identifier" + }, + "isAuthorized": { + "type": "boolean", + "description": "Flag indicating if the authenticated user supplied in the query is authorized for this transmission.", + "nullable": true + }, + "extendedType": { + "type": "string", + "description": "Arbitrary URI/URN describing a service-specific transmission type.\n \nRefer to the service-specific documentation provided by the service owner for details (if in use).", + "format": "uri", + "nullable": true + }, + "relatedTransmissionId": { + "type": "string", + "description": "Reference to any other transmission that this transmission is related to.", + "format": "guid", + "nullable": true + }, + "type": { + "description": "The type of transmission.", + "oneOf": [ + { + "$ref": "#/components/schemas/DialogsEntitiesTransmissions_DialogTransmissionType" + } + ] + }, + "sender": { + "description": "The actor that sent the transmission.", + "oneOf": [ + { + "$ref": "#/components/schemas/V1ServiceOwnerCommonActors_Actor" + } + ] + }, + "content": { + "description": "The transmission unstructured text content.", + "oneOf": [ + { + "$ref": "#/components/schemas/V1ServiceOwnerDialogsQueriesGet_DialogTransmissionContent" + } + ] + }, + "attachments": { + "type": "array", + "description": "The transmission-level attachments.", + "items": { + "$ref": "#/components/schemas/V1ServiceOwnerDialogsQueriesGet_DialogTransmissionAttachment" + } + } + } + }, + "V1ServiceOwnerDialogsQueriesGet_DialogTransmissionContent": { + "type": "object", + "additionalProperties": false, + "properties": { + "title": { + "description": "The transmission title.", + "oneOf": [ + { + "$ref": "#/components/schemas/V1CommonContent_ContentValue" + } + ] + }, + "summary": { + "description": "The transmission summary.", + "oneOf": [ + { + "$ref": "#/components/schemas/V1CommonContent_ContentValue" + } + ] + }, + "contentReference": { + "description": "Front-channel embedded content. Used to dynamically embed content in the frontend from an external URL. Must be HTTPS.\nAllowed media types: application/vnd.dialogporten.frontchannelembed+json;type=markdown", + "nullable": true, + "oneOf": [ + { + "$ref": "#/components/schemas/V1CommonContent_ContentValue" + } + ] + } + } + }, + "V1ServiceOwnerDialogsQueriesGet_DialogTransmissionAttachment": { + "type": "object", + "additionalProperties": false, + "properties": { + "id": { + "type": "string", + "description": "The unique identifier for the attachment in UUIDv7 format.", + "format": "guid" + }, + "displayName": { + "type": "array", + "description": "The display name of the attachment that should be used in GUIs.", + "items": { + "$ref": "#/components/schemas/V1CommonLocalizations_Localization" + } + }, + "urls": { + "type": "array", + "description": "The URLs associated with the attachment, each referring to a different representation of the attachment.", + "items": { + "$ref": "#/components/schemas/V1ServiceOwnerDialogsQueriesGet_DialogTransmissionAttachmentUrl" + } + } + } + }, + "V1ServiceOwnerDialogsQueriesGet_DialogTransmissionAttachmentUrl": { + "type": "object", + "additionalProperties": false, + "properties": { + "url": { + "type": "string", + "description": "The fully qualified URL of the attachment. Will be set to \"urn:dialogporten:unauthorized\" if the user is\nnot authorized to access the transmission.", + "format": "uri", + "example": "https://someendpoint.com/someattachment.pdf\nurn:dialogporten:unauthorized" + }, + "mediaType": { + "type": "string", + "description": "The media type of the attachment.", + "nullable": true, + "example": "application/pdf\napplication/zip" + }, + "consumerType": { + "description": "The type of consumer the URL is intended for.", + "oneOf": [ + { + "$ref": "#/components/schemas/Attachments_AttachmentUrlConsumerType" + } + ] + } + } + }, + "V1ServiceOwnerDialogsQueriesGet_DialogGuiAction": { + "type": "object", + "additionalProperties": false, + "properties": { + "id": { + "type": "string", + "description": "The unique identifier for the action in UUIDv7 format.", + "format": "guid" + }, + "action": { + "type": "string", + "description": "The action identifier for the action, corresponding to the \"action\" attributeId used in the XACML service policy." + }, + "url": { + "type": "string", + "description": "The fully qualified URL of the action, to which the user will be redirected when the action is triggered.", + "format": "uri" + }, + "authorizationAttribute": { + "type": "string", + "description": "Contains an authorization resource attributeId, that can used in custom authorization rules in the XACML service\npolicy, which by default is the policy belonging to the service referred to by \"serviceResource\" in the dialog.\n \nCan also be used to refer to other service policies.", + "nullable": true, + "example": "mycustomresource\n/* equivalent to the above */\nurn:altinn:subresource:mycustomresource\nurn:altinn:task:Task_1\n/* refer to another service */\nurn:altinn:resource:some-other-service-identifier" + }, + "isAuthorized": { + "type": "boolean", + "description": "Whether the user, if supplied in the query, is authorized to perform the action.", + "nullable": true + }, + "isDeleteDialogAction": { + "type": "boolean", + "description": "Indicates whether the action results in the dialog being deleted. Used by frontends to implement custom UX\nfor delete actions." + }, + "priority": { + "description": "Indicates a priority for the action, making it possible for frontends to adapt GUI elements based on action\npriority.", + "oneOf": [ + { + "$ref": "#/components/schemas/DialogsEntitiesActions_DialogGuiActionPriority" + } + ] + }, + "httpMethod": { + "description": "The HTTP method that the frontend should use when redirecting the user.", + "oneOf": [ + { + "$ref": "#/components/schemas/Http_HttpVerb" + } + ] + }, + "title": { + "type": "array", + "description": "The title of the action, this should be short and in verb form.", + "items": { + "$ref": "#/components/schemas/V1CommonLocalizations_Localization" + } + }, + "prompt": { + "type": "array", + "description": "If there should be a prompt asking the user for confirmation before the action is executed,\nthis field should contain the prompt text.", + "nullable": true, + "items": { + "$ref": "#/components/schemas/V1CommonLocalizations_Localization" + } + } + } + }, + "V1ServiceOwnerDialogsQueriesGet_DialogApiAction": { + "type": "object", + "additionalProperties": false, + "properties": { + "id": { + "type": "string", + "description": "The unique identifier for the action in UUIDv7 format.", + "format": "guid" + }, + "action": { + "type": "string", + "description": "String identifier for the action, corresponding to the \"action\" attributeId used in the XACML service policy,\nwhich by default is the policy belonging to the service referred to by \"serviceResource\" in the dialog.", + "example": "write" + }, + "authorizationAttribute": { + "type": "string", + "description": "Contains an authorization resource attributeId, that can used in custom authorization rules in the XACML service\npolicy, which by default is the policy belonging to the service referred to by \"serviceResource\" in the dialog.\n \nCan also be used to refer to other service policies.", + "nullable": true, + "example": "mycustomresource\n/* equivalent to the above */\nurn:altinn:subresource:mycustomresource\nurn:altinn:task:Task_1\n/* refer to another service */\nurn:altinn:resource:some-other-service-identifier" + }, + "isAuthorized": { + "type": "boolean", + "description": "True if the authenticated user (set in the query) is authorized for this action.", + "nullable": true + }, + "endpoints": { + "type": "array", + "description": "The endpoints associated with the action.", + "items": { + "$ref": "#/components/schemas/V1ServiceOwnerDialogsQueriesGet_DialogApiActionEndpoint" + } + } + } + }, + "V1ServiceOwnerDialogsQueriesGet_DialogApiActionEndpoint": { + "type": "object", + "additionalProperties": false, + "properties": { + "id": { + "type": "string", + "description": "The unique identifier for the endpoint in UUIDv7 format.", + "format": "guid" + }, + "version": { + "type": "string", + "description": "Arbitrary string indicating the version of the endpoint.\n \nConsult the service-specific documentation provided by the service owner for details (if in use).", + "nullable": true + }, + "url": { + "type": "string", + "description": "The fully qualified URL of the API endpoint.", + "format": "uri" + }, + "httpMethod": { + "description": "The HTTP method that the endpoint expects for this action.", + "oneOf": [ + { + "$ref": "#/components/schemas/Http_HttpVerb" + } + ] + }, + "documentationUrl": { + "type": "string", + "description": "Link to service provider documentation for the endpoint. Used for service owners to provide documentation for\nintegrators. Should be a URL to a human-readable page.", + "format": "uri", + "nullable": true + }, + "requestSchema": { + "type": "string", + "description": "Link to the request schema for the endpoint. Used by service owners to provide documentation for integrators.\nDialogporten will not validate information on this endpoint.", + "format": "uri", + "nullable": true + }, + "responseSchema": { + "type": "string", + "description": "Link to the response schema for the endpoint. Used for service owners to provide documentation for integrators.\nDialogporten will not validate information on this endpoint.", + "format": "uri", + "nullable": true + }, + "deprecated": { + "type": "boolean", + "description": "Boolean indicating if the endpoint is deprecated. Integrators should migrate to endpoints with a higher version." + }, + "sunsetAt": { + "type": "string", + "description": "Date and time when the service owner has indicated that endpoint will no longer function. Only set if the endpoint\nis deprecated. Dialogporten will not enforce this date.", + "format": "date-time", + "nullable": true + } + } + }, + "V1ServiceOwnerDialogsQueriesGet_DialogActivity": { + "type": "object", + "additionalProperties": false, + "properties": { + "id": { + "type": "string", + "description": "The unique identifier for the activity in UUIDv7 format.", + "format": "guid" + }, + "createdAt": { + "type": "string", + "description": "The date and time when the activity was created.", + "format": "date-time", + "nullable": true + }, + "extendedType": { + "type": "string", + "description": "An arbitrary URI/URN with a service-specific activity type.\n \nConsult the service-specific documentation provided by the service owner for details (if in use).", + "format": "uri", + "nullable": true + }, + "type": { + "description": "The type of activity.", + "oneOf": [ + { + "$ref": "#/components/schemas/DialogsEntitiesActivities_DialogActivityType" + } + ] + }, + "transmissionId": { + "type": "string", + "description": "If the activity is related to a particular transmission, this field will contain the transmission identifier.", + "format": "guid", + "nullable": true + }, + "performedBy": { + "description": "The actor that performed the activity.", + "oneOf": [ + { + "$ref": "#/components/schemas/V1ServiceOwnerCommonActors_Actor" + } + ] + }, + "description": { + "type": "array", + "description": "Unstructured text describing the activity. Only set if the activity type is \"Information\".", + "items": { + "$ref": "#/components/schemas/V1CommonLocalizations_Localization" + } + } + } + }, + "V1ServiceOwnerDialogsQueriesGet_DialogSeenLog": { + "type": "object", + "additionalProperties": false, + "properties": { + "id": { + "type": "string", + "description": "The unique identifier for the seen log entry in UUIDv7 format.", + "format": "guid" + }, + "seenAt": { + "type": "string", + "description": "The timestamp when the dialog revision was seen.", + "format": "date-time" + }, + "seenBy": { + "description": "The actor that saw the dialog revision.", + "oneOf": [ + { + "$ref": "#/components/schemas/V1ServiceOwnerCommonActors_Actor" + } + ] + }, + "isViaServiceOwner": { + "type": "boolean", + "description": "Flag indicating whether the seen log entry was created via the service owner.\n \nThis is used when the service owner uses the service owner API to implement its own frontend.", + "nullable": true + }, + "isCurrentEndUser": { + "type": "boolean", + "description": "Flag indicating whether the seen log entry was created by the current end user, if provided in the query." + } + } + }, + "V1ServiceOwnerDialogsCreate_DialogRequest": { + "type": "object", + "additionalProperties": false, + "properties": { + "dto": { + "$ref": "#/components/schemas/V1ServiceOwnerDialogsCommandsCreate_Dialog" + } + } + }, + "V1ServiceOwnerDialogsCommandsCreate_Dialog": { + "type": "object", + "additionalProperties": false, + "properties": { + "id": { + "type": "string", + "description": "A self-defined UUIDv7 may be provided to support idempotent creation of dialogs. If not provided, a new UUIDv7 will be generated.", + "format": "guid", + "nullable": true, + "example": "01913cd5-784f-7d3b-abef-4c77b1f0972d" + }, + "serviceResource": { + "type": "string", + "description": "The service identifier for the service that the dialog is related to in URN-format.\nThis corresponds to a resource in the Altinn Resource Registry, which the authenticated organization\nmust own, i.e., be listed as the \"competent authority\" in the Resource Registry entry.", + "example": "urn:altinn:resource:some-service-identifier" + }, + "party": { + "type": "string", + "description": "The party code representing the organization or person that the dialog belongs to in URN format.", + "example": "urn:altinn:person:identifier-no:01125512345\nurn:altinn:organization:identifier-no:912345678" + }, + "progress": { + "type": "integer", + "description": "Advisory indicator of progress, represented as 1-100 percentage value. 100% representing a dialog that has come\nto a natural completion (successful or not).", + "format": "int32", + "nullable": true + }, + "extendedStatus": { + "type": "string", + "description": "Arbitrary string with a service-specific indicator of status, typically used to indicate a fine-grained state of\nthe dialog to further specify the \"status\" enum.", + "nullable": true + }, + "externalReference": { + "type": "string", + "description": "Arbitrary string with a service-specific reference to an external system or service.", + "nullable": true + }, + "visibleFrom": { + "type": "string", + "description": "The timestamp when the dialog should be made visible for authorized end users. If not provided, the dialog will be\nimmediately available.", + "format": "date-time", + "nullable": true, + "example": "2022-12-31T23:59:59Z" + }, + "dueAt": { + "type": "string", + "description": "The due date for the dialog. Dialogs past due date might be marked as such in frontends but will still be available.", + "format": "date-time", + "nullable": true, + "example": "2022-12-31T23:59:59Z" + }, + "process": { + "type": "string", + "description": "Optional process identifier used to indicate a business process this dialog belongs to.", + "nullable": true + }, + "precedingProcess": { + "type": "string", + "description": "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.", + "nullable": true + }, + "expiresAt": { + "type": "string", + "description": "The expiration date for the dialog. This is the last date when the dialog is available for the end user.\n \nAfter this date is passed, the dialog will be considered expired and no longer available for the end user in any\nAPI. If not supplied, the dialog will be considered to never expire. This field can be changed after creation.", + "format": "date-time", + "nullable": true, + "example": "2022-12-31T23:59:59Z" + }, + "createdAt": { + "type": "string", + "description": "If set, will override the date and time when the dialog is set as created.\nIf not supplied, the current date /time will be used.", + "format": "date-time", + "example": "2022-12-31T23:59:59Z" + }, + "updatedAt": { + "type": "string", + "description": "If set, will override the date and time when the dialog is set as last updated.\nIf not supplied, the current date /time will be used.", + "format": "date-time", + "example": "2022-12-31T23:59:59Z" + }, + "status": { + "description": "The aggregated status of the dialog.", + "oneOf": [ + { + "$ref": "#/components/schemas/DialogsEntities_DialogStatus" + } + ] + }, + "systemLabel": { + "description": "Set the system label of the dialog Migration purposes.", + "nullable": true, + "oneOf": [ + { + "$ref": "#/components/schemas/DialogEndUserContextsEntities_SystemLabel" + } + ] + }, + "content": { + "description": "The dialog unstructured text content.", + "oneOf": [ + { + "$ref": "#/components/schemas/V1ServiceOwnerDialogsCommandsCreate_Content" + } + ] + }, + "searchTags": { + "type": "array", + "description": "A list of words (tags) that will be used in dialog search queries. Not visible in end-user DTO.", + "items": { + "$ref": "#/components/schemas/V1ServiceOwnerDialogsCommandsCreate_SearchTag" + } + }, + "attachments": { + "type": "array", + "description": "The attachments associated with the dialog (on an aggregate level).", + "items": { + "$ref": "#/components/schemas/V1ServiceOwnerDialogsCommandsCreate_Attachment" + } + }, + "transmissions": { + "type": "array", + "description": "The immutable list of transmissions associated with the dialog.", + "items": { + "$ref": "#/components/schemas/V1ServiceOwnerDialogsCommandsCreate_Transmission" + } + }, + "guiActions": { + "type": "array", + "description": "The GUI actions associated with the dialog. Should be used in browser-based interactive frontends.", + "items": { + "$ref": "#/components/schemas/V1ServiceOwnerDialogsCommandsCreate_GuiAction" + } + }, + "apiActions": { + "type": "array", + "description": "The API actions associated with the dialog. Should be used in specialized, non-browser-based integrations.", + "items": { + "$ref": "#/components/schemas/V1ServiceOwnerDialogsCommandsCreate_ApiAction" + } + }, + "activities": { + "type": "array", + "description": "An immutable list of activities associated with the dialog.", + "items": { + "$ref": "#/components/schemas/V1ServiceOwnerDialogsCommandsCreate_Activity" + } + } + } + }, + "V1ServiceOwnerDialogsCommandsCreate_Content": { + "type": "object", + "additionalProperties": false, + "properties": { + "title": { + "description": "The title of the dialog.\nSupported media types: text/plain", + "oneOf": [ + { + "$ref": "#/components/schemas/V1CommonContent_ContentValue" + } + ] + }, + "summary": { + "description": "A short summary of the dialog and its current state.\nSupported media types: text/plain", + "oneOf": [ + { + "$ref": "#/components/schemas/V1CommonContent_ContentValue" + } + ] + }, + "senderName": { + "description": "Overridden sender name. If not supplied, assume \"org\" as the sender name. Must be text/plain if supplied.\nSupported media types: text/plain", + "nullable": true, + "oneOf": [ + { + "$ref": "#/components/schemas/V1CommonContent_ContentValue" + } + ] + }, + "additionalInfo": { + "description": "Additional information about the dialog.\nSupported media types: text/plain, text/markdown", + "nullable": true, + "oneOf": [ + { + "$ref": "#/components/schemas/V1CommonContent_ContentValue" + } + ] + }, + "extendedStatus": { + "description": "Used as the human-readable label used to describe the \"ExtendedStatus\" field.\nSupported media types: text/plain", + "nullable": true, + "oneOf": [ + { + "$ref": "#/components/schemas/V1CommonContent_ContentValue" + } + ] + }, + "mainContentReference": { + "description": "Front-channel embedded content. Used to dynamically embed content in the frontend from an external URL. Must be HTTPS.\nSupported media types: application/vnd.dialogporten.frontchannelembed+json;type=markdown", + "nullable": true, + "oneOf": [ + { + "$ref": "#/components/schemas/V1CommonContent_ContentValue" + } + ] + } + } + }, + "V1ServiceOwnerDialogsCommandsCreate_SearchTag": { + "type": "object", + "additionalProperties": false, + "properties": { + "value": { + "type": "string", + "description": "A search tag value." + } + } + }, + "V1ServiceOwnerDialogsCommandsCreate_Attachment": { + "type": "object", + "additionalProperties": false, + "properties": { + "id": { + "type": "string", + "description": "A self-defined UUIDv7 may be provided to support idempotent creation of attachments. If not provided, a new UUIDv7 will be generated.", + "format": "guid", + "nullable": true + }, + "displayName": { + "type": "array", + "description": "The display name of the attachment that should be used in GUIs.", + "items": { + "$ref": "#/components/schemas/V1CommonLocalizations_Localization" + } + }, + "urls": { + "type": "array", + "description": "The URLs associated with the attachment, each referring to a different representation of the attachment.", + "items": { + "$ref": "#/components/schemas/V1ServiceOwnerDialogsCommandsCreate_AttachmentUrl" + } + } + } + }, + "V1ServiceOwnerDialogsCommandsCreate_AttachmentUrl": { + "type": "object", + "additionalProperties": false, + "properties": { + "url": { + "type": "string", + "description": "The fully qualified URL of the attachment.", + "format": "uri" + }, + "mediaType": { + "type": "string", + "description": "The media type of the attachment.", + "nullable": true, + "example": "application/pdf\napplication/zip" + }, + "consumerType": { + "description": "The type of consumer the URL is intended for.", + "oneOf": [ + { + "$ref": "#/components/schemas/Attachments_AttachmentUrlConsumerType" + } + ] + } + } + }, + "V1ServiceOwnerDialogsCommandsCreate_Transmission": { + "type": "object", + "additionalProperties": false, + "properties": { + "id": { + "type": "string", + "description": "A self-defined UUIDv7 may be provided to support idempotent creation of transmissions. If not provided, a new UUIDv7 will be generated.", + "format": "guid", + "nullable": true, + "example": "01913cd5-784f-7d3b-abef-4c77b1f0972d" + }, + "createdAt": { + "type": "string", + "description": "If supplied, overrides the creating date and time for the transmission.\nIf not supplied, the current date /time will be used.", + "format": "date-time" + }, + "authorizationAttribute": { + "type": "string", + "description": "Contains an authorization resource attributeId, that can used in custom authorization rules in the XACML service\npolicy, which by default is the policy belonging to the service referred to by \"serviceResource\" in the dialog.\n \nCan also be used to refer to other service policies.", + "nullable": true, + "example": "mycustomresource\n/* equivalent to the above */\nurn:altinn:subresource:mycustomresource\nurn:altinn:task:Task_1\n/* refer to another service */\nurn:altinn:resource:some-other-service-identifier" + }, + "extendedType": { + "type": "string", + "description": "Arbitrary URI/URN describing a service-specific transmission type.\n \nRefer to the service-specific documentation provided by the service owner for details (if in use).", + "format": "uri", + "nullable": true + }, + "relatedTransmissionId": { + "type": "string", + "description": "Reference to any other transmission that this transmission is related to.", + "format": "guid", + "nullable": true + }, + "type": { + "description": "The type of transmission.", + "oneOf": [ + { + "$ref": "#/components/schemas/DialogsEntitiesTransmissions_DialogTransmissionType" + } + ] + }, + "sender": { + "description": "The actor that sent the transmission.", + "oneOf": [ + { + "$ref": "#/components/schemas/V1ServiceOwnerCommonActors_Actor" + } + ] + }, + "content": { + "description": "The transmission unstructured text content.", + "oneOf": [ + { + "$ref": "#/components/schemas/V1ServiceOwnerDialogsCommandsCreate_TransmissionContent" + } + ] + }, + "attachments": { + "type": "array", + "description": "The transmission-level attachments.", + "items": { + "$ref": "#/components/schemas/V1ServiceOwnerDialogsCommandsCreate_TransmissionAttachment" + } + } + } + }, + "V1ServiceOwnerDialogsCommandsCreate_TransmissionContent": { + "type": "object", + "additionalProperties": false, + "properties": { + "title": { + "description": "The transmission title. Must be text/plain.", + "oneOf": [ + { + "$ref": "#/components/schemas/V1CommonContent_ContentValue" + } + ] + }, + "summary": { + "description": "The transmission summary.", + "oneOf": [ + { + "$ref": "#/components/schemas/V1CommonContent_ContentValue" + } + ] + }, + "contentReference": { + "description": "Front-channel embedded content. Used to dynamically embed content in the frontend from an external URL. Must be HTTPS.\nAllowed media types: application/vnd.dialogporten.frontchannelembed+json;type=markdown", + "nullable": true, + "oneOf": [ + { + "$ref": "#/components/schemas/V1CommonContent_ContentValue" + } + ] + } + } + }, + "V1ServiceOwnerDialogsCommandsCreate_TransmissionAttachment": { + "type": "object", + "additionalProperties": false, + "properties": { + "id": { + "type": "string", + "description": "A self-defined UUIDv7 may be provided to support idempotent creation of transmission attachments. If not provided, a new UUIDv7 will be generated.", + "format": "guid", + "nullable": true, + "example": "01913cd5-784f-7d3b-abef-4c77b1f0972d" + }, + "displayName": { + "type": "array", + "description": "The display name of the attachment that should be used in GUIs.", + "items": { + "$ref": "#/components/schemas/V1CommonLocalizations_Localization" + } + }, + "urls": { + "type": "array", + "description": "The URLs associated with the attachment, each referring to a different representation of the attachment.", + "items": { + "$ref": "#/components/schemas/V1ServiceOwnerDialogsCommandsCreate_TransmissionAttachmentUrl" + } + } + } + }, + "V1ServiceOwnerDialogsCommandsCreate_TransmissionAttachmentUrl": { + "type": "object", + "additionalProperties": false, + "properties": { + "url": { + "type": "string", + "description": "The fully qualified URL of the attachment.", + "format": "uri" + }, + "mediaType": { + "type": "string", + "description": "The media type of the attachment.", + "nullable": true, + "example": "application/pdf\napplication/zip" + }, + "consumerType": { + "description": "The type of consumer the URL is intended for.", + "oneOf": [ + { + "$ref": "#/components/schemas/Attachments_AttachmentUrlConsumerType" + } + ] + } + } + }, + "V1ServiceOwnerDialogsCommandsCreate_GuiAction": { + "type": "object", + "additionalProperties": false, + "properties": { + "id": { + "type": "string", + "description": "A self-defined UUIDv7 may be provided to support idempotent creation of Gui Actions. If not provided, a new UUIDv7 will be generated.", + "format": "guid", + "nullable": true, + "example": "01913cd5-784f-7d3b-abef-4c77b1f0972d" + }, + "action": { + "type": "string", + "description": "The action identifier for the action, corresponding to the \"action\" attributeId used in the XACML service policy." + }, + "url": { + "type": "string", + "description": "The fully qualified URL of the action, to which the user will be redirected when the action is triggered. Will be set to\n\"urn:dialogporten:unauthorized\" if the user is not authorized to perform the action.", + "format": "uri", + "example": "urn:dialogporten:unauthorized\nhttps://someendpoint.com/gui/some-service-instance-id" + }, + "authorizationAttribute": { + "type": "string", + "description": "Contains an authorization resource attributeId, that can used in custom authorization rules in the XACML service\npolicy, which by default is the policy belonging to the service referred to by \"serviceResource\" in the dialog.\n \nCan also be used to refer to other service policies.", + "nullable": true, + "example": "mycustomresource\n/* equivalent to the above */\nurn:altinn:subresource:mycustomresource\nurn:altinn:task:Task_1\n/* refer to another service */\nurn:altinn:resource:some-other-service-identifier" + }, + "isDeleteDialogAction": { + "type": "boolean", + "description": "Indicates whether the action results in the dialog being deleted. Used by frontends to implement custom UX\nfor delete actions." + }, + "httpMethod": { + "description": "The HTTP method that the frontend should use when redirecting the user.", + "nullable": true, + "oneOf": [ + { + "$ref": "#/components/schemas/Http_HttpVerb" + } + ] + }, + "priority": { + "description": "Indicates a priority for the action, making it possible for frontends to adapt GUI elements based on action\npriority.", + "oneOf": [ + { + "$ref": "#/components/schemas/DialogsEntitiesActions_DialogGuiActionPriority" + } + ] + }, + "title": { + "type": "array", + "description": "The title of the action, this should be short and in verb form. Must be text/plain.", + "items": { + "$ref": "#/components/schemas/V1CommonLocalizations_Localization" + } + }, + "prompt": { + "type": "array", + "description": "If there should be a prompt asking the user for confirmation before the action is executed,\nthis field should contain the prompt text.", + "nullable": true, + "items": { + "$ref": "#/components/schemas/V1CommonLocalizations_Localization" + } + } + } + }, + "V1ServiceOwnerDialogsCommandsCreate_ApiAction": { + "type": "object", + "additionalProperties": false, + "properties": { + "id": { + "type": "string", + "description": "A self-defined UUIDv7 may be provided to support idempotent creation of Api Actions. If not provided, a new UUIDv7 will be generated.", + "format": "guid", + "nullable": true, + "example": "01913cd5-784f-7d3b-abef-4c77b1f0972d" + }, + "action": { + "type": "string", + "description": "String identifier for the action, corresponding to the \"action\" attributeId used in the XACML service policy,\nwhich by default is the policy belonging to the service referred to by \"serviceResource\" in the dialog.", + "example": "write" + }, + "authorizationAttribute": { + "type": "string", + "description": "Contains an authorization resource attributeId, that can used in custom authorization rules in the XACML service\npolicy, which by default is the policy belonging to the service referred to by \"serviceResource\" in the dialog.\n \nCan also be used to refer to other service policies.", + "nullable": true, + "example": "mycustomresource\n/* equivalent to the above */\nurn:altinn:subresource:mycustomresource\nurn:altinn:task:Task_1\n/* refer to another service */\nurn:altinn:resource:some-other-service-identifier" + }, + "endpoints": { + "type": "array", + "description": "The endpoints associated with the action.", + "items": { + "$ref": "#/components/schemas/V1ServiceOwnerDialogsCommandsCreate_ApiActionEndpoint" + } + } + } + }, + "V1ServiceOwnerDialogsCommandsCreate_ApiActionEndpoint": { + "type": "object", + "additionalProperties": false, + "properties": { + "version": { + "type": "string", + "description": "Arbitrary string indicating the version of the endpoint.", + "nullable": true + }, + "url": { + "type": "string", + "description": "The fully qualified URL of the API endpoint.", + "format": "uri" + }, + "httpMethod": { + "description": "The HTTP method that the endpoint expects for this action.", + "oneOf": [ + { + "$ref": "#/components/schemas/Http_HttpVerb" + } + ] + }, + "documentationUrl": { + "type": "string", + "description": "Link to documentation for the endpoint, providing documentation for integrators. Should be a URL to a\nhuman-readable page.", + "format": "uri", + "nullable": true + }, + "requestSchema": { + "type": "string", + "description": "Link to the request schema for the endpoint. Used to provide documentation for integrators.\nDialogporten will not validate information on this endpoint.", + "format": "uri", + "nullable": true + }, + "responseSchema": { + "type": "string", + "description": "Link to the response schema for the endpoint. Used to provide documentation for integrators.\nDialogporten will not validate information on this endpoint.", + "format": "uri", + "nullable": true + }, + "deprecated": { + "type": "boolean", + "description": "Boolean indicating if the endpoint is deprecated." + }, + "sunsetAt": { + "type": "string", + "description": "Date and time when the endpoint will no longer function. Only set if the endpoint is deprecated. Dialogporten\nwill not enforce this date.", + "format": "date-time", + "nullable": true + } + } + }, + "V1ServiceOwnerDialogsCommandsCreate_Activity": { + "type": "object", + "additionalProperties": false, + "properties": { + "id": { + "type": "string", + "description": "A self-defined UUIDv7 may be provided to support idempotent creation of activities. If not provided, a new UUIDv7 will be generated.", + "format": "guid", + "nullable": true, + "example": "01913cd5-784f-7d3b-abef-4c77b1f0972d" + }, + "createdAt": { + "type": "string", + "description": "If supplied, overrides the creating date and time for the transmission.\nIf not supplied, the current date /time will be used.", + "format": "date-time", + "nullable": true + }, + "extendedType": { + "type": "string", + "description": "Arbitrary URI/URN describing a service-specific transmission type.", + "format": "uri", + "nullable": true + }, + "type": { + "description": "The type of transmission.", + "oneOf": [ + { + "$ref": "#/components/schemas/DialogsEntitiesActivities_DialogActivityType" + } + ] + }, + "transmissionId": { + "type": "string", + "description": "If the activity is related to a particular transmission, this field will contain the transmission identifier.\nMust be present in the request body.", + "format": "guid", + "nullable": true + }, + "performedBy": { + "description": "The actor that performed the activity.", + "oneOf": [ + { + "$ref": "#/components/schemas/V1ServiceOwnerCommonActors_Actor" + } + ] + }, + "description": { + "type": "array", + "description": "Unstructured text describing the activity. Only set if the activity type is \"Information\".", + "items": { + "$ref": "#/components/schemas/V1CommonLocalizations_Localization" + } + } + } + }, + "V1ServiceOwnerDialogActivitiesQueriesSearch_Activity": { + "type": "object", + "additionalProperties": false, + "properties": { + "id": { + "type": "string", + "format": "guid" + }, + "createdAt": { + "type": "string", + "format": "date-time" + }, + "extendedType": { + "type": "string", + "format": "uri", + "nullable": true + }, + "type": { + "$ref": "#/components/schemas/DialogsEntitiesActivities_DialogActivityType" + }, + "deletedAt": { + "type": "string", + "format": "date-time", + "nullable": true + }, + "transmissionId": { + "type": "string", + "format": "guid", + "nullable": true + } + } + }, + "V1ServiceOwnerDialogActivitiesQueriesNotificationCondition_NotificationCondition": { + "type": "object", + "additionalProperties": false, + "properties": { + "sendNotification": { + "type": "boolean" + } + } + }, + "V1ServiceOwnerDialogActivitiesQueriesGet_Activity": { + "type": "object", + "additionalProperties": false, + "properties": { + "id": { + "type": "string", + "format": "guid" + }, + "createdAt": { + "type": "string", + "format": "date-time", + "nullable": true + }, + "extendedType": { + "type": "string", + "format": "uri", + "nullable": true + }, + "type": { + "$ref": "#/components/schemas/DialogsEntitiesActivities_DialogActivityType" + }, + "deletedAt": { + "type": "string", + "format": "date-time", + "nullable": true + }, + "transmissionId": { + "type": "string", + "format": "guid", + "nullable": true + }, + "performedBy": { + "$ref": "#/components/schemas/V1ServiceOwnerCommonActors_Actor" + }, + "description": { + "type": "array", + "items": { + "$ref": "#/components/schemas/V1CommonLocalizations_Localization" + } + } + } + }, + "V1ServiceOwnerDialogActivitiesQueriesNotificationCondition_NotificationConditionType": { + "type": "string", + "description": "", + "x-enumNames": [ + "NotExists", + "Exists" + ], + "enum": [ + "NotExists", + "Exists" + ] + }, + "V1ServiceOwnerDialogActivitiesCreate_ActivityRequest": { + "type": "object", + "additionalProperties": false, + "properties": { + "id": { + "type": "string", + "description": "The UUDIv7 of the action may be provided to support idempotent additions to the list of activities.\nIf not supplied, a new UUIDv7 will be generated.", + "format": "guid", + "nullable": true, + "example": "01913cd5-784f-7d3b-abef-4c77b1f0972d" + }, + "createdAt": { + "type": "string", + "description": "If supplied, overrides the creating date and time for the transmission.\nIf not supplied, the current date /time will be used.", + "format": "date-time", + "nullable": true + }, + "extendedType": { + "type": "string", + "description": "Arbitrary URI/URN describing a service-specific transmission type.", + "format": "uri", + "nullable": true + }, + "type": { + "description": "The type of transmission.", + "oneOf": [ + { + "$ref": "#/components/schemas/DialogsEntitiesActivities_DialogActivityType" + } + ] + }, + "transmissionId": { + "type": "string", + "description": "If the activity is related to a particular transmission, this field will contain the transmission identifier.\nMust be present in the request body.", + "format": "guid", + "nullable": true + }, + "performedBy": { + "description": "The actor that performed the activity.", + "oneOf": [ + { + "$ref": "#/components/schemas/V1ServiceOwnerCommonActors_Actor" + } + ] + }, + "description": { + "type": "array", + "description": "Unstructured text describing the activity. Only set if the activity type is \"Information\".", + "items": { + "$ref": "#/components/schemas/V1CommonLocalizations_Localization" + } + } + } + }, + "V1EndUserPartiesQueriesGet_Parties": { + "type": "object", + "additionalProperties": false, + "properties": { + "authorizedParties": { + "type": "array", + "items": { + "$ref": "#/components/schemas/V1EndUserPartiesQueriesGet_AuthorizedParty" + } + } + } + }, + "V1EndUserPartiesQueriesGet_AuthorizedParty": { + "type": "object", + "additionalProperties": false, + "properties": { + "party": { + "type": "string" + }, + "name": { + "type": "string" + }, + "partyType": { + "type": "string" + }, + "isDeleted": { + "type": "boolean" + }, + "hasKeyRole": { + "type": "boolean" + }, + "isCurrentEndUser": { + "type": "boolean" + }, + "isMainAdministrator": { + "type": "boolean" + }, + "isAccessManager": { + "type": "boolean" + }, + "hasOnlyAccessToSubParties": { + "type": "boolean" + }, + "subParties": { + "type": "array", + "nullable": true, + "items": { + "$ref": "#/components/schemas/V1EndUserPartiesQueriesGet_AuthorizedParty" + } + } + } + }, + "V1EndUserDialogTransmissionsQueriesSearch_Transmission": { + "type": "object", + "additionalProperties": false, + "properties": { + "id": { + "type": "string", + "description": "The unique identifier for the transmission in UUIDv7 format.", + "format": "guid" + }, + "createdAt": { + "type": "string", + "description": "The date and time when the transmission was created.", + "format": "date-time" + }, + "authorizationAttribute": { + "type": "string", + "description": "The authorization attribute associated with the transmission.", + "nullable": true + }, + "isAuthorized": { + "type": "boolean", + "description": "Flag indicating if the authenticated user is authorized for this transmission. If not, embedded content and\nthe attachments will not be available." + }, + "extendedType": { + "type": "string", + "description": "The extended type URI for the transmission.", + "format": "uri", + "nullable": true + }, + "relatedTransmissionId": { + "type": "string", + "description": "The unique identifier for the related transmission, if any.", + "format": "guid", + "nullable": true + }, + "deletedAt": { + "type": "string", + "description": "The date and time when the transmission was deleted, if applicable.", + "format": "date-time", + "nullable": true + }, + "type": { + "description": "The type of the transmission.", + "oneOf": [ + { + "$ref": "#/components/schemas/DialogsEntitiesTransmissions_DialogTransmissionType" + } + ] + }, + "sender": { + "description": "The sender actor information for the transmission.", + "oneOf": [ + { + "$ref": "#/components/schemas/V1EndUserCommonActors_Actor" + } + ] + }, + "content": { + "description": "The content of the transmission.", + "oneOf": [ + { + "$ref": "#/components/schemas/V1EndUserDialogTransmissionsQueriesSearch_Content" + } + ] + }, + "attachments": { + "type": "array", + "description": "The attachments associated with the transmission.", + "items": { + "$ref": "#/components/schemas/V1EndUserDialogTransmissionsQueriesSearch_Attachment" + } + } + } + }, + "V1EndUserCommonActors_Actor": { + "type": "object", + "additionalProperties": false, + "properties": { + "actorType": { + "description": "The type of actor that sent the transmission.", + "oneOf": [ + { + "$ref": "#/components/schemas/Actors_ActorType" + } + ] + }, + "actorName": { + "type": "string", + "description": "Specifies the name of the entity that sent the transmission. Mutually exclusive with ActorId. If ActorId\nis supplied, the name will be automatically populated from the name registries.", + "nullable": true, + "example": "Ola Nordmann" + }, + "actorId": { + "type": "string", + "description": "The identifier of the person or organization that sent the transmission. Mutually exclusive with ActorName.\nMight be omitted if ActorType is \"ServiceOwner\".", + "nullable": true, + "example": "urn:altinn:person:identifier-no:12018212345" + } + } + }, + "V1EndUserDialogTransmissionsQueriesSearch_Content": { + "type": "object", + "additionalProperties": false, + "properties": { + "title": { + "description": "The title of the content.", + "oneOf": [ + { + "$ref": "#/components/schemas/V1CommonContent_ContentValue" + } + ] + }, + "summary": { + "description": "The summary of the content.", + "oneOf": [ + { + "$ref": "#/components/schemas/V1CommonContent_ContentValue" + } + ] + }, + "contentReference": { + "description": "Front-channel embedded content. Used to dynamically embed content in the frontend from an external URL.\nAllowed media types: application/vnd.dialogporten.frontchannelembed+json;type=markdown", + "nullable": true, + "oneOf": [ + { + "$ref": "#/components/schemas/V1CommonContent_ContentValue" + } + ] + } + } + }, + "V1EndUserDialogTransmissionsQueriesSearch_Attachment": { + "type": "object", + "additionalProperties": false, + "properties": { + "id": { + "type": "string", + "description": "The unique identifier for the attachment in UUIDv7 format.", + "format": "guid" + }, + "displayName": { + "type": "array", + "description": "The display name of the attachment that should be used in GUIs.", + "items": { + "$ref": "#/components/schemas/V1CommonLocalizations_Localization" + } + }, + "urls": { + "type": "array", + "description": "The URLs associated with the attachment, each referring to a different representation of the attachment.", + "items": { + "$ref": "#/components/schemas/V1EndUserDialogTransmissionsQueriesSearch_AttachmentUrl" + } + } + } + }, + "V1EndUserDialogTransmissionsQueriesSearch_AttachmentUrl": { + "type": "object", + "additionalProperties": false, + "properties": { + "id": { + "type": "string", + "description": "The unique identifier for the attachment URL in UUIDv7 format.", + "format": "guid" + }, + "url": { + "type": "string", + "description": "The fully qualified URL of the attachment. Will be set to \"urn:dialogporten:unauthorized\" if the user is\nnot authorized to access the transmission.", + "format": "uri", + "example": "https://someendpoint.com/someattachment.pdf\nurn:dialogporten:unauthorized" + }, + "mediaType": { + "type": "string", + "description": "The media type of the attachment.", + "nullable": true, + "example": "application/pdf\napplication/zip" + }, + "consumerType": { + "description": "The type of consumer the URL is intended for.", + "oneOf": [ + { + "$ref": "#/components/schemas/Attachments_AttachmentUrlConsumerType" + } + ] + } + } + }, + "V1EndUserDialogTransmissionsQueriesGet_Transmission": { + "type": "object", + "additionalProperties": false, + "properties": { + "id": { + "type": "string", + "description": "The unique identifier for the transmission in UUIDv7 format.", + "format": "guid" + }, + "createdAt": { + "type": "string", + "description": "The date and time when the transmission was created.", + "format": "date-time" + }, + "authorizationAttribute": { + "type": "string", + "description": "The authorization attribute associated with the transmission.", + "nullable": true + }, + "isAuthorized": { + "type": "boolean", + "description": "Flag indicating if the authenticated user is authorized for this transmission. If not, embedded content and\nthe attachments will not be available." + }, + "extendedType": { + "type": "string", + "description": "The extended type URI for the transmission.", + "format": "uri", + "nullable": true + }, + "relatedTransmissionId": { + "type": "string", + "description": "The unique identifier for the related transmission, if any.", + "format": "guid", + "nullable": true + }, + "deletedAt": { + "type": "string", + "description": "The date and time when the transmission was deleted, if applicable.", + "format": "date-time", + "nullable": true + }, + "type": { + "description": "The type of the transmission.", + "oneOf": [ + { + "$ref": "#/components/schemas/DialogsEntitiesTransmissions_DialogTransmissionType" + } + ] + }, + "sender": { + "description": "The sender actor information for the transmission.", + "oneOf": [ + { + "$ref": "#/components/schemas/V1EndUserCommonActors_Actor" + } + ] + }, + "content": { + "description": "The content of the transmission.", + "oneOf": [ + { + "$ref": "#/components/schemas/V1EndUserDialogTransmissionsQueriesGet_Content" + } + ] + }, + "attachments": { + "type": "array", + "description": "The attachments associated with the transmission.", + "items": { + "$ref": "#/components/schemas/V1EndUserDialogTransmissionsQueriesGet_Attachment" + } + } + } + }, + "V1EndUserDialogTransmissionsQueriesGet_Content": { + "type": "object", + "additionalProperties": false, + "properties": { + "title": { + "description": "The title of the content.", + "oneOf": [ + { + "$ref": "#/components/schemas/V1CommonContent_ContentValue" + } + ] + }, + "summary": { + "description": "The summary of the content.", + "oneOf": [ + { + "$ref": "#/components/schemas/V1CommonContent_ContentValue" + } + ] + }, + "contentReference": { + "description": "Front-channel embedded content. Used to dynamically embed content in the frontend from an external URL.\nAllowed media types: application/vnd.dialogporten.frontchannelembed+json;type=markdown", + "nullable": true, + "oneOf": [ + { + "$ref": "#/components/schemas/V1CommonContent_ContentValue" + } + ] + } + } + }, + "V1EndUserDialogTransmissionsQueriesGet_Attachment": { + "type": "object", + "additionalProperties": false, + "properties": { + "id": { + "type": "string", + "description": "The unique identifier for the attachment in UUIDv7 format.", + "format": "guid" + }, + "displayName": { + "type": "array", + "description": "The display name of the attachment that should be used in GUIs.", + "items": { + "$ref": "#/components/schemas/V1CommonLocalizations_Localization" + } + }, + "urls": { + "type": "array", + "description": "The URLs associated with the attachment, each referring to a different representation of the attachment.", + "items": { + "$ref": "#/components/schemas/V1EndUserDialogTransmissionsQueriesGet_AttachmentUrl" + } + } + } + }, + "V1EndUserDialogTransmissionsQueriesGet_AttachmentUrl": { + "type": "object", + "additionalProperties": false, + "properties": { + "id": { + "type": "string", + "description": "The unique identifier for the attachment URL in UUIDv7 format.", + "format": "guid" + }, + "url": { + "type": "string", + "description": "The fully qualified URL of the attachment. Will be set to \"urn:dialogporten:unauthorized\" if the user is\nnot authorized to access the transmission.", + "format": "uri", + "example": "https://someendpoint.com/someattachment.pdf\nurn:dialogporten:unauthorized" + }, + "mediaType": { + "type": "string", + "description": "The media type of the attachment.", + "nullable": true, + "example": "application/pdf\napplication/zip" + }, + "consumerType": { + "description": "The type of consumer the URL is intended for.", + "oneOf": [ + { + "$ref": "#/components/schemas/Attachments_AttachmentUrlConsumerType" + } + ] + } + } + }, + "V1EndUserDialogSystemLabelsCommandsSet_SystemLabelCommand": { + "type": "object", + "additionalProperties": false, + "properties": { + "label": { + "$ref": "#/components/schemas/DialogEndUserContextsEntities_SystemLabel" + }, + "ifMatchDialogRevision": { + "type": "string", + "format": "guid", + "nullable": true + } + } + }, + "V1EndUserDialogSeenLogsQueriesSearch_SeenLog": { + "type": "object", + "additionalProperties": false, + "properties": { + "id": { + "type": "string", + "format": "guid" + }, + "seenAt": { + "type": "string", + "format": "date-time" + }, + "seenBy": { + "$ref": "#/components/schemas/V1EndUserCommonActors_Actor" + }, + "isViaServiceOwner": { + "type": "boolean" + }, + "isCurrentEndUser": { + "type": "boolean" + } + } + }, + "V1EndUserDialogSeenLogsQueriesGet_SeenLog": { + "type": "object", + "additionalProperties": false, + "properties": { + "id": { + "type": "string", + "format": "guid" + }, + "seenAt": { + "type": "string", + "format": "date-time" + }, + "seenBy": { + "$ref": "#/components/schemas/V1EndUserCommonActors_Actor" + }, + "isViaServiceOwner": { + "type": "boolean" + }, + "isCurrentEndUser": { + "type": "boolean" + } + } + }, + "PaginatedListOfV1EndUserDialogsQueriesSearch_Dialog": { + "type": "object", + "additionalProperties": false, + "properties": { + "items": { + "type": "array", + "description": "The paginated list of items", + "items": { + "$ref": "#/components/schemas/V1EndUserDialogsQueriesSearch_Dialog" + } + }, + "hasNextPage": { + "type": "boolean", + "description": "Whether there are more items available that can be fetched by supplying the continuation token" + }, + "continuationToken": { + "type": "string", + "description": "The continuation token to be used to fetch the next page of items", + "nullable": true, + "example": "createdat_2024-07-31T09:09:03.0257090Z,id_0c089101-b7cf-a476-955c-f00a78d74a4e" + }, + "orderBy": { + "type": "string", + "description": "The current sorting order of the items", + "example": "createdat_desc,id_desc" + } + } + }, + "V1EndUserDialogsQueriesSearch_Dialog": { + "type": "object", + "additionalProperties": false, + "properties": { + "id": { + "type": "string", + "description": "The unique identifier for the dialog in UUIDv7 format.", + "format": "guid", + "example": "01913cd5-784f-7d3b-abef-4c77b1f0972d" + }, + "org": { + "type": "string", + "description": "The service owner code representing the organization (service owner) related to this dialog.", + "example": "ske" + }, + "serviceResource": { + "type": "string", + "description": "The service identifier for the service that the dialog is related to in URN-format.\nThis corresponds to a service resource in the Altinn Resource Registry.", + "example": "urn:altinn:resource:some-service-identifier" + }, + "serviceResourceType": { + "type": "string", + "description": "The ServiceResource type, as defined in Altinn Resource Registry (see ResourceType)." + }, + "party": { + "type": "string", + "description": "The party code representing the organization or person that the dialog belongs to in URN format.", + "example": "urn:altinn:person:identifier-no:01125512345\nurn:altinn:organization:identifier-no:912345678" + }, + "progress": { + "type": "integer", + "description": "Advisory indicator of progress, represented as 1-100 percentage value. 100% representing a dialog that has come\nto a natural completion (successful or not).", + "format": "int32", + "nullable": true + }, + "process": { + "type": "string", + "description": "Optional process identifier used to indicate a business process this dialog belongs to.", + "nullable": true + }, + "precedingProcess": { + "type": "string", + "description": "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.", + "nullable": true + }, + "guiAttachmentCount": { + "type": "integer", + "description": "The number of attachments in the dialog made available for browser-based frontends.", + "format": "int32", + "nullable": true + }, + "extendedStatus": { + "type": "string", + "description": "Arbitrary string with a service-specific indicator of status, typically used to indicate a fine-grained state of\nthe dialog to further specify the \"status\" enum.\n \nRefer to the service-specific documentation provided by the service owner for details on the possible values (if\nin use).", + "nullable": true + }, + "externalReference": { + "type": "string", + "description": "Arbitrary string with a service-specific reference to an external system or service.\n \nRefer to the service-specific documentation provided by the service owner for details (if in use).", + "nullable": true + }, + "createdAt": { + "type": "string", + "description": "The date and time when the dialog was created.", + "format": "date-time", + "example": "2022-12-31T23:59:59Z" + }, + "updatedAt": { + "type": "string", + "description": "The date and time when the dialog was last updated.", + "format": "date-time", + "example": "2022-12-31T23:59:59Z" + }, + "dueAt": { + "type": "string", + "description": "The due date for the dialog. This is the last date when the dialog is expected to be completed.", + "format": "date-time", + "nullable": true, + "example": "2022-12-31T23:59:59Z" + }, + "status": { + "description": "The aggregated status of the dialog.", + "oneOf": [ + { + "$ref": "#/components/schemas/DialogsEntities_DialogStatus" + } + ] + }, + "systemLabel": { + "description": "Current display state.", + "oneOf": [ + { + "$ref": "#/components/schemas/DialogEndUserContextsEntities_SystemLabel" + } + ] + }, + "latestActivity": { + "description": "The latest entry in the dialog's activity log.", + "nullable": true, + "oneOf": [ + { + "$ref": "#/components/schemas/V1EndUserDialogsQueriesSearch_DialogActivity" + } + ] + }, + "seenSinceLastUpdate": { + "type": "array", + "description": "The list of seen log entries for the dialog newer than the dialog ChangedAt date.", + "items": { + "$ref": "#/components/schemas/V1EndUserDialogsQueriesSearch_DialogSeenLog" + } + }, + "content": { + "description": "The content of the dialog in search results.", + "oneOf": [ + { + "$ref": "#/components/schemas/V1EndUserDialogsQueriesSearch_Content" + } + ] + } + } + }, + "V1EndUserDialogsQueriesSearch_DialogActivity": { + "type": "object", + "additionalProperties": false, + "properties": { + "id": { + "type": "string", + "description": "The unique identifier for the activity in UUIDv7 format.", + "format": "guid" + }, + "createdAt": { + "type": "string", + "description": "The date and time when the activity was created.", + "format": "date-time", + "nullable": true + }, + "extendedType": { + "type": "string", + "description": "An arbitrary string with a service-specific activity type.\n \nConsult the service-specific documentation provided by the service owner for details (if in use).", + "format": "uri", + "nullable": true + }, + "type": { + "description": "The type of activity.", + "oneOf": [ + { + "$ref": "#/components/schemas/DialogsEntitiesActivities_DialogActivityType" + } + ] + }, + "transmissionId": { + "type": "string", + "description": "If the activity is related to a particular transmission, this field will contain the transmission identifier.", + "format": "guid", + "nullable": true + }, + "performedBy": { + "description": "The actor that performed the activity.", + "oneOf": [ + { + "$ref": "#/components/schemas/V1EndUserCommonActors_Actor" + } + ] + }, + "description": { + "type": "array", + "description": "Unstructured text describing the activity. Only set if the activity type is \"Information\".", + "items": { + "$ref": "#/components/schemas/V1CommonLocalizations_Localization" + } + } + } + }, + "V1EndUserDialogsQueriesSearch_DialogSeenLog": { + "type": "object", + "additionalProperties": false, + "properties": { + "id": { + "type": "string", + "description": "The unique identifier for the seen log entry in UUIDv7 format.", + "format": "guid" + }, + "seenAt": { + "type": "string", + "description": "The timestamp when the dialog revision was seen.", + "format": "date-time" + }, + "seenBy": { + "description": "The actor that saw the dialog revision.", + "oneOf": [ + { + "$ref": "#/components/schemas/V1EndUserCommonActors_Actor" + } + ] + }, + "isViaServiceOwner": { + "type": "boolean", + "description": "Flag indicating whether the seen log entry was created via the service owner.\n \nThis is used when the service owner uses the service owner API to implement its own frontend.", + "nullable": true + }, + "isCurrentEndUser": { + "type": "boolean", + "description": "Flag indicating whether the seen log entry was created by the current end user." + } + } + }, + "V1EndUserDialogsQueriesSearch_Content": { + "type": "object", + "additionalProperties": false, + "properties": { + "title": { + "description": "The title of the dialog.", + "oneOf": [ + { + "$ref": "#/components/schemas/V1CommonContent_ContentValue" + } + ] + }, + "summary": { + "description": "A short summary of the dialog and its current state.", + "oneOf": [ + { + "$ref": "#/components/schemas/V1CommonContent_ContentValue" + } + ] + }, + "senderName": { + "description": "Overridden sender name. If not supplied, assume \"org\" as the sender name.", + "nullable": true, + "oneOf": [ + { + "$ref": "#/components/schemas/V1CommonContent_ContentValue" + } + ] + }, + "extendedStatus": { + "description": "Used as the human-readable label used to describe the \"ExtendedStatus\" field.", + "nullable": true, + "oneOf": [ + { + "$ref": "#/components/schemas/V1CommonContent_ContentValue" + } + ] + } + } + }, + "V1EndUserDialogsQueriesGet_Dialog": { + "type": "object", + "additionalProperties": false, + "properties": { + "id": { + "type": "string", + "description": "The unique identifier for the dialog in UUIDv7 format.", + "format": "guid", + "example": "01913cd5-784f-7d3b-abef-4c77b1f0972d" + }, + "revision": { + "type": "string", + "description": "The unique identifier for the revision in UUIDv4 format.", + "format": "guid", + "example": "a312cb9c-7632-43c2-aa38-69b06aed56ca" + }, + "org": { + "type": "string", + "description": "The service owner code representing the organization (service owner) related to this dialog.", + "example": "ske" + }, + "serviceResource": { + "type": "string", + "description": "The service identifier for the service that the dialog is related to in URN-format.\nThis corresponds to a service resource in the Altinn Resource Registry.", + "example": "urn:altinn:resource:some-service-identifier" + }, + "serviceResourceType": { + "type": "string", + "description": "The ServiceResource type, as defined in Altinn Resource Registry (see ResourceType)." + }, + "party": { + "type": "string", + "description": "The party code representing the organization or person that the dialog belongs to in URN format.", + "example": "urn:altinn:person:identifier-no:01125512345\nurn:altinn:organization:identifier-no:912345678" + }, + "progress": { + "type": "integer", + "description": "Advisory indicator of progress, represented as 1-100 percentage value. 100% representing a dialog that has come\nto a natural completion (successful or not).", + "format": "int32", + "nullable": true + }, + "process": { + "type": "string", + "description": "Optional process identifier used to indicate a business process this dialog belongs to.", + "nullable": true + }, + "precedingProcess": { + "type": "string", + "description": "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.", + "nullable": true + }, + "extendedStatus": { + "type": "string", + "description": "Arbitrary string with a service-specific indicator of status, typically used to indicate a fine-grained state of\nthe dialog to further specify the \"status\" enum.\n \nRefer to the service-specific documentation provided by the service owner for details on the possible values (if\nin use).", + "nullable": true + }, + "externalReference": { + "type": "string", + "description": "Arbitrary string with a service-specific reference to an external system or service.\n \nRefer to the service-specific documentation provided by the service owner for details (if in use).", + "nullable": true + }, + "dueAt": { + "type": "string", + "description": "The due date for the dialog. Dialogs past due date might be marked as such in frontends but will still be available.", + "format": "date-time", + "nullable": true, + "example": "2022-12-31T23:59:59Z" + }, + "expiresAt": { + "type": "string", + "description": "The expiration date for the dialog. This is the last date when the dialog is available for the end user.\n \nAfter this date is passed, the dialog will be considered expired and no longer available for the end user in any\nAPI. If not supplied, the dialog will be considered to never expire. This field can be changed by the service\nowner after the dialog has been created.", + "format": "date-time", + "nullable": true, + "example": "2022-12-31T23:59:59Z" + }, + "createdAt": { + "type": "string", + "description": "The date and time when the dialog was created.", + "format": "date-time", + "example": "2022-12-31T23:59:59Z" + }, + "updatedAt": { + "type": "string", + "description": "The date and time when the dialog was last updated.", + "format": "date-time", + "example": "2022-12-31T23:59:59Z" + }, + "status": { + "description": "The aggregated status of the dialog.", + "oneOf": [ + { + "$ref": "#/components/schemas/DialogsEntities_DialogStatus" + } + ] + }, + "systemLabel": { + "description": "Current display state.", + "oneOf": [ + { + "$ref": "#/components/schemas/DialogEndUserContextsEntities_SystemLabel" + } + ] + }, + "content": { + "description": "The dialog unstructured text content.", + "oneOf": [ + { + "$ref": "#/components/schemas/V1EndUserDialogsQueriesGet_Content" + } + ] + }, + "dialogToken": { + "type": "string", + "description": "The dialog token. May be used (if supported) against external URLs referred to in this dialog's apiActions,\ntransmissions or attachments. It should also be used for front-channel embeds.", + "nullable": true + }, + "attachments": { + "type": "array", + "description": "The attachments associated with the dialog (on an aggregate level).", + "items": { + "$ref": "#/components/schemas/V1EndUserDialogsQueriesGet_DialogAttachment" + } + }, + "transmissions": { + "type": "array", + "description": "The immutable list of transmissions associated with the dialog.", + "items": { + "$ref": "#/components/schemas/V1EndUserDialogsQueriesGet_DialogTransmission" + } + }, + "guiActions": { + "type": "array", + "description": "The GUI actions associated with the dialog. Should be used in browser-based interactive frontends.", + "items": { + "$ref": "#/components/schemas/V1EndUserDialogsQueriesGet_DialogGuiAction" + } + }, + "apiActions": { + "type": "array", + "description": "The API actions associated with the dialog. Should be used in specialized, non-browser-based integrations.", + "items": { + "$ref": "#/components/schemas/V1EndUserDialogsQueriesGet_DialogApiAction" + } + }, + "activities": { + "type": "array", + "description": "An immutable list of activities associated with the dialog.", + "items": { + "$ref": "#/components/schemas/V1EndUserDialogsQueriesGet_DialogActivity" + } + }, + "seenSinceLastUpdate": { + "type": "array", + "description": "The list of seen log entries for the dialog newer than the dialog ChangedAt date.", + "items": { + "$ref": "#/components/schemas/V1EndUserDialogsQueriesGet_DialogSeenLog" + } + } + } + }, + "V1EndUserDialogsQueriesGet_Content": { + "type": "object", + "additionalProperties": false, + "properties": { + "title": { + "description": "The title of the dialog.", + "oneOf": [ + { + "$ref": "#/components/schemas/V1CommonContent_ContentValue" + } + ] + }, + "summary": { + "description": "A short summary of the dialog and its current state.", + "oneOf": [ + { + "$ref": "#/components/schemas/V1CommonContent_ContentValue" + } + ] + }, + "senderName": { + "description": "Overridden sender name. If not supplied, assume \"org\" as the sender name.", + "nullable": true, + "oneOf": [ + { + "$ref": "#/components/schemas/V1CommonContent_ContentValue" + } + ] + }, + "additionalInfo": { + "description": "Additional information about the dialog, this may contain Markdown.", + "nullable": true, + "oneOf": [ + { + "$ref": "#/components/schemas/V1CommonContent_ContentValue" + } + ] + }, + "extendedStatus": { + "description": "Used as the human-readable label used to describe the \"ExtendedStatus\" field.", + "nullable": true, + "oneOf": [ + { + "$ref": "#/components/schemas/V1CommonContent_ContentValue" + } + ] + }, + "mainContentReference": { + "description": "Front-channel embedded content. Used to dynamically embed content in the frontend from an external URL.", + "nullable": true, + "oneOf": [ + { + "$ref": "#/components/schemas/V1CommonContent_ContentValue" + } + ] + } + } + }, + "V1EndUserDialogsQueriesGet_DialogAttachment": { + "type": "object", + "additionalProperties": false, + "properties": { + "id": { + "type": "string", + "description": "The unique identifier for the attachment in UUIDv7 format.", + "format": "guid" + }, + "displayName": { + "type": "array", + "description": "The display name of the attachment that should be used in GUIs.", + "items": { + "$ref": "#/components/schemas/V1CommonLocalizations_Localization" + } + }, + "urls": { + "type": "array", + "description": "The URLs associated with the attachment, each referring to a different representation of the attachment.", + "items": { + "$ref": "#/components/schemas/V1EndUserDialogsQueriesGet_DialogAttachmentUrl" + } + } + } + }, + "V1EndUserDialogsQueriesGet_DialogAttachmentUrl": { + "type": "object", + "additionalProperties": false, + "properties": { + "id": { + "type": "string", + "description": "The unique identifier for the attachment URL in UUIDv7 format.", + "format": "guid" + }, + "url": { + "type": "string", + "description": "The fully qualified URL of the attachment.", + "format": "uri", + "example": "https://someendpoint.com/someattachment.pdf" + }, + "mediaType": { + "type": "string", + "description": "The media type of the attachment.", + "nullable": true, + "example": "application/pdf\napplication/zip" + }, + "consumerType": { + "description": "What type of consumer the URL is intended for.", + "oneOf": [ + { + "$ref": "#/components/schemas/Attachments_AttachmentUrlConsumerType" + } + ] + } + } + }, + "V1EndUserDialogsQueriesGet_DialogTransmission": { + "type": "object", + "additionalProperties": false, + "properties": { + "id": { + "type": "string", + "description": "The unique identifier for the transmission in UUIDv7 format.", + "format": "guid" + }, + "createdAt": { + "type": "string", + "description": "The date and time when the transmission was created.", + "format": "date-time" + }, + "authorizationAttribute": { + "type": "string", + "description": "Contains an authorization resource attributeId, that can used in custom authorization rules in the XACML service\npolicy, which by default is the policy belonging to the service referred to by \"serviceResource\" in the dialog.\n \nCan also be used to refer to other service policies.", + "nullable": true, + "example": "mycustomresource\n/* equivalent to the above */\nurn:altinn:subresource:mycustomresource\nurn:altinn:task:Task_1\n/* refer to another service */\nurn:altinn:resource:some-other-service-identifier" + }, + "isAuthorized": { + "type": "boolean", + "description": "Flag indicating if the authenticated user is authorized for this transmission. If not, embedded content and\nthe attachments will not be available." + }, + "extendedType": { + "type": "string", + "description": "Arbitrary URI/URN describing a service-specific transmission type.\n \nRefer to the service-specific documentation provided by the service owner for details (if in use).", + "format": "uri", + "nullable": true + }, + "relatedTransmissionId": { + "type": "string", + "description": "Reference to any other transmission that this transmission is related to.", + "format": "guid", + "nullable": true + }, + "type": { + "description": "The type of transmission.", + "oneOf": [ + { + "$ref": "#/components/schemas/DialogsEntitiesTransmissions_DialogTransmissionType" + } + ] + }, + "sender": { + "description": "The actor that sent the transmission.", + "oneOf": [ + { + "$ref": "#/components/schemas/V1EndUserCommonActors_Actor" + } + ] + }, + "content": { + "description": "The transmission unstructured text content.", + "oneOf": [ + { + "$ref": "#/components/schemas/V1EndUserDialogsQueriesGet_DialogTransmissionContent" + } + ] + }, + "attachments": { + "type": "array", + "description": "The transmission-level attachments.", + "items": { + "$ref": "#/components/schemas/V1EndUserDialogsQueriesGet_DialogTransmissionAttachment" + } + } + } + }, + "V1EndUserDialogsQueriesGet_DialogTransmissionContent": { + "type": "object", + "additionalProperties": false, + "properties": { + "title": { + "description": "The transmission title.", + "oneOf": [ + { + "$ref": "#/components/schemas/V1CommonContent_ContentValue" + } + ] + }, + "summary": { + "description": "The transmission summary.", + "oneOf": [ + { + "$ref": "#/components/schemas/V1CommonContent_ContentValue" + } + ] + }, + "contentReference": { + "description": "Front-channel embedded content. Used to dynamically embed content in the frontend from an external URL.\nAllowed media types: application/vnd.dialogporten.frontchannelembed+json;type=markdown", + "nullable": true, + "oneOf": [ + { + "$ref": "#/components/schemas/V1CommonContent_ContentValue" + } + ] + } + } + }, + "V1EndUserDialogsQueriesGet_DialogTransmissionAttachment": { + "type": "object", + "additionalProperties": false, + "properties": { + "id": { + "type": "string", + "description": "The unique identifier for the attachment in UUIDv7 format.", + "format": "guid" + }, + "displayName": { + "type": "array", + "description": "The display name of the attachment that should be used in GUIs.", + "items": { + "$ref": "#/components/schemas/V1CommonLocalizations_Localization" + } + }, + "urls": { + "type": "array", + "description": "The URLs associated with the attachment, each referring to a different representation of the attachment.", + "items": { + "$ref": "#/components/schemas/V1EndUserDialogsQueriesGet_DialogTransmissionAttachmentUrl" + } + } + } + }, + "V1EndUserDialogsQueriesGet_DialogTransmissionAttachmentUrl": { + "type": "object", + "additionalProperties": false, + "properties": { + "url": { + "type": "string", + "description": "The fully qualified URL of the attachment. Will be set to \"urn:dialogporten:unauthorized\" if the user is\nnot authorized to access the transmission.", + "format": "uri", + "example": "https://someendpoint.com/someattachment.pdf\nurn:dialogporten:unauthorized" + }, + "mediaType": { + "type": "string", + "description": "The media type of the attachment.", + "nullable": true, + "example": "application/pdf\napplication/zip" + }, + "consumerType": { + "description": "The type of consumer the URL is intended for.", + "oneOf": [ + { + "$ref": "#/components/schemas/Attachments_AttachmentUrlConsumerType" + } + ] + } + } + }, + "V1EndUserDialogsQueriesGet_DialogGuiAction": { + "type": "object", + "additionalProperties": false, + "properties": { + "id": { + "type": "string", + "description": "The unique identifier for the action in UUIDv7 format.", + "format": "guid" + }, + "action": { + "type": "string", + "description": "The action identifier for the action, corresponding to the \"action\" attributeId used in the XACML service policy." + }, + "url": { + "type": "string", + "description": "The fully qualified URL of the action, to which the user will be redirected when the action is triggered. Will be set to\n\"urn:dialogporten:unauthorized\" if the user is not authorized to perform the action.", + "format": "uri", + "example": "urn:dialogporten:unauthorized\nhttps://someendpoint.com/gui/some-service-instance-id" + }, + "authorizationAttribute": { + "type": "string", + "description": "Contains an authorization resource attributeId, that can used in custom authorization rules in the XACML service\npolicy, which by default is the policy belonging to the service referred to by \"serviceResource\" in the dialog.\n \nCan also be used to refer to other service policies.", + "nullable": true, + "example": "mycustomresource\n/* equivalent to the above */\nurn:altinn:subresource:mycustomresource\nurn:altinn:task:Task_1\n/* refer to another service */\nurn:altinn:resource:some-other-service-identifier" + }, + "isAuthorized": { + "type": "boolean", + "description": "Whether the user is authorized to perform the action." + }, + "isDeleteDialogAction": { + "type": "boolean", + "description": "Indicates whether the action results in the dialog being deleted. Used by frontends to implement custom UX\nfor delete actions." + }, + "priority": { + "description": "Indicates a priority for the action, making it possible for frontends to adapt GUI elements based on action\npriority.", + "oneOf": [ + { + "$ref": "#/components/schemas/DialogsEntitiesActions_DialogGuiActionPriority" + } + ] + }, + "httpMethod": { + "description": "The HTTP method that the frontend should use when redirecting the user.", + "oneOf": [ + { + "$ref": "#/components/schemas/Http_HttpVerb" + } + ] + }, + "title": { + "type": "array", + "description": "The title of the action, this should be short and in verb form.", + "items": { + "$ref": "#/components/schemas/V1CommonLocalizations_Localization" + } + }, + "prompt": { + "type": "array", + "description": "If there should be a prompt asking the user for confirmation before the action is executed,\nthis field should contain the prompt text.", + "nullable": true, + "items": { + "$ref": "#/components/schemas/V1CommonLocalizations_Localization" + } + } + } + }, + "V1EndUserDialogsQueriesGet_DialogApiAction": { + "type": "object", + "additionalProperties": false, + "properties": { + "id": { + "type": "string", + "description": "The unique identifier for the action in UUIDv7 format.", + "format": "guid" + }, + "action": { + "type": "string", + "description": "String identifier for the action, corresponding to the \"action\" attributeId used in the XACML service policy,\nwhich by default is the policy belonging to the service referred to by \"serviceResource\" in the dialog.", + "example": "write" + }, + "authorizationAttribute": { + "type": "string", + "description": "Contains an authorization resource attributeId, that can used in custom authorization rules in the XACML service\npolicy, which by default is the policy belonging to the service referred to by \"serviceResource\" in the dialog.\n \nCan also be used to refer to other service policies.", + "nullable": true, + "example": "mycustomresource\n/* equivalent to the above */\nurn:altinn:subresource:mycustomresource\nurn:altinn:task:Task_1\n/* refer to another service */\nurn:altinn:resource:some-other-service-identifier" + }, + "isAuthorized": { + "type": "boolean", + "description": "True if the authenticated user is authorized for this action. If not, the action will not be available\nand all endpoints will be replaced with a fixed placeholder." + }, + "endpoints": { + "type": "array", + "description": "The endpoints associated with the action.", + "items": { + "$ref": "#/components/schemas/V1EndUserDialogsQueriesGet_DialogApiActionEndpoint" + } + } + } + }, + "V1EndUserDialogsQueriesGet_DialogApiActionEndpoint": { + "type": "object", + "additionalProperties": false, + "properties": { + "id": { + "type": "string", + "description": "The unique identifier for the endpoint in UUIDv7 format.", + "format": "guid" + }, + "version": { + "type": "string", + "description": "Arbitrary string indicating the version of the endpoint.\n \nConsult the service-specific documentation provided by the service owner for details (if in use).", + "nullable": true + }, + "url": { + "type": "string", + "description": "The fully qualified URL of the API endpoint. Will be set to \"urn:dialogporten:unauthorized\" if the user is\nnot authorized to perform the action.", + "format": "uri", + "example": "https://someendpoint.com/api/v1/someaction\nurn:dialogporten:unauthorized" + }, + "httpMethod": { + "description": "The HTTP method that the endpoint expects for this action.", + "oneOf": [ + { + "$ref": "#/components/schemas/Http_HttpVerb" + } + ] + }, + "documentationUrl": { + "type": "string", + "description": "Link to service provider documentation for the endpoint. Used for service owners to provide documentation for\nintegrators. Should be a URL to a human-readable page.", + "format": "uri", + "nullable": true + }, + "requestSchema": { + "type": "string", + "description": "Link to the request schema for the endpoint. Used by service owners to provide documentation for integrators.\nDialogporten will not validate information on this endpoint.", + "format": "uri", + "nullable": true + }, + "responseSchema": { + "type": "string", + "description": "Link to the response schema for the endpoint. Used for service owners to provide documentation for integrators.\nDialogporten will not validate information on this endpoint.", + "format": "uri", + "nullable": true + }, + "deprecated": { + "type": "boolean", + "description": "Boolean indicating if the endpoint is deprecated. Integrators should migrate to endpoints with a higher version." + }, + "sunsetAt": { + "type": "string", + "description": "Date and time when the service owner has indicated that endpoint will no longer function. Only set if the endpoint\nis deprecated. Dialogporten will not enforce this date.", + "format": "date-time", + "nullable": true + } + } + }, + "V1EndUserDialogsQueriesGet_DialogActivity": { + "type": "object", + "additionalProperties": false, + "properties": { + "id": { + "type": "string", + "description": "The unique identifier for the activity in UUIDv7 format.", + "format": "guid" + }, + "createdAt": { + "type": "string", + "description": "The date and time when the activity was created.", + "format": "date-time", + "nullable": true + }, + "extendedType": { + "type": "string", + "description": "An arbitrary URI/URN with a service-specific activity type.\n \nConsult the service-specific documentation provided by the service owner for details (if in use).", + "format": "uri", + "nullable": true + }, + "type": { + "description": "The type of activity.", + "oneOf": [ + { + "$ref": "#/components/schemas/DialogsEntitiesActivities_DialogActivityType" + } + ] + }, + "transmissionId": { + "type": "string", + "description": "If the activity is related to a particular transmission, this field will contain the transmission identifier.", + "format": "guid", + "nullable": true + }, + "performedBy": { + "description": "The actor that performed the activity.", + "oneOf": [ + { + "$ref": "#/components/schemas/V1EndUserCommonActors_Actor" + } + ] + }, + "description": { + "type": "array", + "description": "Unstructured text describing the activity. Only set if the activity type is \"Information\".", + "items": { + "$ref": "#/components/schemas/V1CommonLocalizations_Localization" + } + } + } + }, + "V1EndUserDialogsQueriesGet_DialogSeenLog": { + "type": "object", + "additionalProperties": false, + "properties": { + "id": { + "type": "string", + "description": "The unique identifier for the seen log entry in UUIDv7 format.", + "format": "guid" + }, + "seenAt": { + "type": "string", + "description": "The timestamp when the dialog revision was seen.", + "format": "date-time" + }, + "seenBy": { + "description": "The actor that saw the dialog revision.", + "oneOf": [ + { + "$ref": "#/components/schemas/V1EndUserCommonActors_Actor" + } + ] + }, + "isViaServiceOwner": { + "type": "boolean", + "description": "Flag indicating whether the seen log entry was created via the service owner.\n \nThis is used when the service owner uses the service owner API to implement its own frontend.", + "nullable": true + }, + "isCurrentEndUser": { + "type": "boolean", + "description": "Flag indicating whether the seen log entry was created by the current end user." + } + } + }, + "V1EndUserDialogLabelAssignmentLogQueriesSearch_LabelAssignmentLog": { + "type": "object", + "additionalProperties": false, + "properties": { + "createdAt": { + "type": "string", + "format": "date-time" + }, + "name": { + "type": "string" + }, + "action": { + "type": "string" + }, + "performedBy": { + "$ref": "#/components/schemas/V1EndUserCommonActors_Actor" + } + } + }, + "V1EndUserDialogActivitiesQueriesSearch_Activity": { + "type": "object", + "additionalProperties": false, + "properties": { + "id": { + "type": "string", + "format": "guid" + }, + "createdAt": { + "type": "string", + "format": "date-time" + }, + "extendedType": { + "type": "string", + "format": "uri", + "nullable": true + }, + "seenByEndUserIdHash": { + "type": "string", + "nullable": true + }, + "type": { + "$ref": "#/components/schemas/DialogsEntitiesActivities_DialogActivityType" + }, + "transmissionId": { + "type": "string", + "format": "guid", + "nullable": true + } + } + }, + "V1EndUserDialogActivitiesQueriesGet_Activity": { + "type": "object", + "additionalProperties": false, + "properties": { + "id": { + "type": "string", + "format": "guid" + }, + "createdAt": { + "type": "string", + "format": "date-time", + "nullable": true + }, + "extendedType": { + "type": "string", + "format": "uri", + "nullable": true + }, + "type": { + "$ref": "#/components/schemas/DialogsEntitiesActivities_DialogActivityType" + }, + "transmissionId": { + "type": "string", + "format": "guid", + "nullable": true + }, + "performedBy": { + "$ref": "#/components/schemas/V1EndUserCommonActors_Actor" + }, + "description": { + "type": "array", + "items": { + "$ref": "#/components/schemas/V1CommonLocalizations_Localization" + } + } + } + }, + "JsonPatchOperations_Operation": { + "type": "object", + "additionalProperties": false, + "properties": { + "operationType": { + "$ref": "#/components/schemas/JsonPatchOperations_OperationType" + }, + "path": { + "type": "string", + "nullable": true + }, + "op": { + "type": "string", + "nullable": true + }, + "from": { + "type": "string", + "nullable": true + }, + "value": { + "nullable": true + } + } + }, + "JsonPatchOperations_OperationType": { + "type": "string", + "description": "", + "x-enumNames": [ + "Add", + "Remove", + "Replace", + "Move", + "Copy", + "Test", + "Invalid" + ], + "enum": [ + "Add", + "Remove", + "Replace", + "Move", + "Copy", + "Test", + "Invalid" + ] + } + }, + "securitySchemes": { + "JWTBearerAuth": { + "type": "http", + "description": "Enter a JWT token to authorize the requests...", + "scheme": "Bearer", + "bearerFormat": "JWT" + } + } + } +} \ No newline at end of file diff --git a/src/Digdir.Library.Dialogporten.WebApiClient/.refitter b/src/Digdir.Library.Dialogporten.WebApiClient/.refitter index 288a6ffec..2d84fd2bc 100644 --- a/src/Digdir.Library.Dialogporten.WebApiClient/.refitter +++ b/src/Digdir.Library.Dialogporten.WebApiClient/.refitter @@ -1,5 +1,5 @@ { - "openApiPath": "../Digdir.Domain.Dialogporten.WebApi/swagger.json", + "openApiPath": "../../docs/schema/v1/swagger.json", "namespace": "Digdir.Library.Dialogporten.WebApiClient.Features.V1", "outputFolder": "Features/V1", "operationNameGenerator": "SingleClientFromOperationId", 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 e2fe896c5..5213c6f7a 100644 --- a/src/Digdir.Library.Dialogporten.WebApiClient/Digdir.Library.Dialogporten.WebApiClient.csproj +++ b/src/Digdir.Library.Dialogporten.WebApiClient/Digdir.Library.Dialogporten.WebApiClient.csproj @@ -11,6 +11,15 @@ https://github.com/digdir/dialogporten + + + + + + + @@ -18,17 +27,14 @@ - - - - + all runtime; build; native; contentfiles; analyzers; buildtransitive - + From fd86499feb5b896239507ca222f0c38663be8704 Mon Sep 17 00:00:00 2001 From: Amund Myrbostad Date: Thu, 23 Jan 2025 14:24:51 +0100 Subject: [PATCH 102/169] Updated SwaggerSnapshotTests to use Swaggger.json from the build of WebApi --- docs/schema/V1/swagger.json | 6985 ---------- docs/schema/V1/swagger.verified.json | 11430 ++++++++-------- .../Digdir.Domain.Dialogporten.WebApi.csproj | 2 +- .../Get/GetDialogActivityEndpointSummary.cs | 2 +- .../Program.cs | 64 +- .../.refitter | 2 +- ...r.Library.Dialogporten.WebApiClient.csproj | 1 - .../Features/V1/SwaggerSnapshotTests.cs | 27 +- 8 files changed, 5756 insertions(+), 12757 deletions(-) delete mode 100644 docs/schema/V1/swagger.json diff --git a/docs/schema/V1/swagger.json b/docs/schema/V1/swagger.json deleted file mode 100644 index e9678465b..000000000 --- a/docs/schema/V1/swagger.json +++ /dev/null @@ -1,6985 +0,0 @@ -{ - "x-generator": "NSwag v14.2.0.0 (NJsonSchema v11.1.0.0 (Newtonsoft.Json v13.0.0.0))", - "openapi": "3.0.0", - "info": { - "title": "Dialogporten", - "version": "v1" - }, - "paths": { - "/api/v1/.well-known/oauth-authorization-server": { - "get": { - "tags": [ - "Metadata" - ], - "summary": "Gets the OAuth 2.0 Metadata for automatic configuration of clients verifying dialog tokens", - "description": "This endpoint can be used by client integrations supporting automatic discovery of \"OAuth 2.0 Authorization Server\" metadata, enabling verification of dialog tokens issues by Dialogporten.", - "operationId": "V1WellKnownOauthAuthorizationServerGet_GetOauthAuthorizationServer", - "responses": { - "200": { - "description": "The OAuth 2.0 Authorization Server Metadata", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/V1WellKnownOauthAuthorizationServerQueriesGet_GetOauthAuthorizationServer" - } - } - } - } - } - } - }, - "/api/v1/.well-known/jwks.json": { - "get": { - "tags": [ - "Metadata" - ], - "summary": "Gets the JSON Web Key Set (JWKS) containing the public keys used to verify dialog token signatures", - "description": "This endpoint can be used by client integrations supporting automatic discovery of \"OAuth 2.0 Authorization Server\" metadata, enabling verification of dialog tokens issues by Dialogporten.", - "operationId": "V1WellKnownJwksGet_GetJwks", - "responses": { - "200": { - "description": "The OAuth 2.0 Authorization Server Metadata", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/V1WellKnownJwksQueriesGet_GetJwks" - } - } - } - } - } - } - }, - "/api/v1/serviceowner/dialogs/{dialogId}/transmissions": { - "get": { - "tags": [ - "Serviceowner" - ], - "summary": "Gets a list of dialog transmissions", - "description": "Gets the list of transmissions belonging to a dialog", - "operationId": "V1ServiceOwnerDialogTransmissionsSearch_SearchDialogTransmission", - "parameters": [ - { - "name": "dialogId", - "in": "path", - "required": true, - "schema": { - "type": "string", - "format": "guid" - } - } - ], - "responses": { - "200": { - "description": "Successfully returned the dialog transmission list.", - "content": { - "application/json": { - "schema": { - "type": "array", - "items": { - "$ref": "#/components/schemas/V1ServiceOwnerDialogTransmissionsQueriesSearch_Transmission" - } - } - } - } - }, - "401": { - "description": "Missing or invalid authentication token. Requires a Maskinporten-token with the scope \"digdir:dialogporten.serviceprovider\"." - }, - "403": { - "description": "Unauthorized to get the supplied dialog (not owned by authenticated organization or has additional scope requirements defined in policy)." - }, - "404": { - "description": "The given dialog ID was not found or is already deleted.", - "content": { - "application/problem+json": { - "schema": { - "$ref": "#/components/schemas/ProblemDetails" - } - } - } - }, - "410": { - "description": "Entity with the given key(s) is removed." - } - }, - "security": [ - { - "JWTBearerAuth": [] - } - ] - }, - "post": { - "tags": [ - "Serviceowner" - ], - "summary": "Adds a transmission to a dialog", - "description": "The transmission is created with the given configuration. For more information see the documentation (link TBD).\n\nOptimistic 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.", - "operationId": "V1ServiceOwnerDialogTransmissionsCreate_DialogTransmission", - "parameters": [ - { - "name": "dialogId", - "in": "path", - "required": true, - "schema": { - "type": "string", - "format": "guid" - } - }, - { - "name": "if-Match", - "in": "header", - "schema": { - "type": "string", - "format": "guid", - "nullable": true - } - } - ], - "requestBody": { - "x-name": "CreateTransmissionRequest", - "description": "", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/V1ServiceOwnerDialogTransmissionsCreate_TransmissionRequest" - } - } - }, - "required": true, - "x-position": 1 - }, - "responses": { - "201": { - "description": "The UUID of the created dialog transmission. A relative URL to the newly created activity is set in the \"Location\" header.", - "headers": { - "Etag": { - "description": "The new UUID ETag of the dialog", - "schema": { - "title": "System_String", - "type": "string" - }, - "example": "123e4567-e89b-12d3-a456-426614174000" - } - }, - "content": { - "application/json": { - "schema": { - "type": "string" - }, - "example": "018bb8e5-d9d0-7434-8ec5-569a6c8e01fc" - } - } - }, - "204": { - "description": "No Content" - }, - "400": { - "description": "Validation error occured. See problem details for a list of errors.", - "content": { - "application/problem+json": { - "schema": { - "$ref": "#/components/schemas/ProblemDetails" - } - } - } - }, - "401": { - "description": "Missing or invalid authentication token. Requires a Maskinporten-token with the scope \"digdir:dialogporten.serviceprovider\"." - }, - "403": { - "description": "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": { - "description": "The given dialog ID was not found or is already deleted.", - "content": { - "application/problem+json": { - "schema": { - "$ref": "#/components/schemas/ProblemDetails" - } - } - } - }, - "410": { - "description": "Entity with the given key(s) is removed." - }, - "412": { - "description": "The supplied If-Match header did not match the current Revision value for the dialog. The request was not applied.", - "content": { - "application/problem+json": { - "schema": { - "$ref": "#/components/schemas/ProblemDetails" - } - } - } - }, - "422": { - "description": "Domain error occured. See problem details for a list of errors.", - "content": { - "application/problem+json": { - "schema": { - "$ref": "#/components/schemas/ProblemDetails" - } - } - } - } - }, - "security": [ - { - "JWTBearerAuth": [] - } - ] - } - }, - "/api/v1/serviceowner/dialogs/{dialogId}/transmissions/{transmissionId}": { - "get": { - "tags": [ - "Serviceowner" - ], - "summary": "Gets a single dialog transmission", - "description": "Gets a single transmission belonging to a dialog. For more information see the documentation (link TBD).", - "operationId": "V1ServiceOwnerDialogTransmissionsGet_GetDialogTransmission", - "parameters": [ - { - "name": "dialogId", - "in": "path", - "required": true, - "schema": { - "type": "string", - "format": "guid" - } - }, - { - "name": "transmissionId", - "in": "path", - "required": true, - "schema": { - "type": "string", - "format": "guid" - } - } - ], - "responses": { - "200": { - "description": "Successfully returned the dialog transmission.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/V1ServiceOwnerDialogTransmissionsQueriesGet_Transmission" - } - } - } - }, - "401": { - "description": "Missing or invalid authentication token. Requires a Maskinporten-token with the scope \"digdir:dialogporten.serviceprovider\"." - }, - "403": { - "description": "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": { - "description": "The given dialog ID was not found or was deleted, or the given transmission ID was not found.", - "content": { - "application/problem+json": { - "schema": { - "$ref": "#/components/schemas/ProblemDetails" - } - } - } - }, - "410": { - "description": "Entity with the given key(s) is removed." - } - }, - "security": [ - { - "JWTBearerAuth": [] - } - ] - } - }, - "/api/v1/serviceowner/dialogs/{dialogId}/seenlog": { - "get": { - "tags": [ - "Serviceowner" - ], - "summary": "Gets all seen log records for a dialog", - "description": "Gets all seen log records for a dialog. For more information see the documentation (link TBD).", - "operationId": "V1ServiceOwnerDialogSeenLogsSearch_SearchDialogSeenLog", - "parameters": [ - { - "name": "dialogId", - "in": "path", - "required": true, - "schema": { - "type": "string", - "format": "guid" - } - } - ], - "responses": { - "200": { - "description": "Successfully returned the dialog seen log records.", - "content": { - "application/json": { - "schema": { - "type": "array", - "items": { - "$ref": "#/components/schemas/V1ServiceOwnerDialogSeenLogsQueriesSearch_SeenLog" - } - } - } - } - }, - "401": { - "description": "Unauthorized" - }, - "403": { - "description": "Forbidden" - }, - "404": { - "description": "The given dialog ID was not found or is already deleted.", - "content": { - "application/problem+json": { - "schema": { - "$ref": "#/components/schemas/ProblemDetails" - } - } - } - }, - "410": { - "description": "Entity with the given key(s) is removed." - } - }, - "security": [ - { - "JWTBearerAuth": [] - } - ] - } - }, - "/api/v1/serviceowner/dialogs/{dialogId}/seenlog/{seenLogId}": { - "get": { - "tags": [ - "Serviceowner" - ], - "summary": "Gets a single dialog seen log record", - "description": "Gets a single dialog seen log record. For more information see the documentation (link TBD).", - "operationId": "V1ServiceOwnerDialogSeenLogsGet_GetDialogSeenLog", - "parameters": [ - { - "name": "dialogId", - "in": "path", - "required": true, - "schema": { - "type": "string", - "format": "guid" - } - }, - { - "name": "seenLogId", - "in": "path", - "required": true, - "schema": { - "type": "string", - "format": "guid" - } - } - ], - "responses": { - "200": { - "description": "Successfully returned the dialog seen log record.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/V1ServiceOwnerDialogSeenLogsQueriesGet_SeenLog" - } - } - } - }, - "401": { - "description": "Unauthorized" - }, - "403": { - "description": "Forbidden" - }, - "404": { - "description": "The given dialog ID was not found or is already deleted.", - "content": { - "application/problem+json": { - "schema": { - "$ref": "#/components/schemas/ProblemDetails" - } - } - } - }, - "410": { - "description": "Entity with the given key(s) is removed." - } - }, - "security": [ - { - "JWTBearerAuth": [] - } - ] - } - }, - "/api/v1/serviceowner/dialogs/{dialogId}": { - "put": { - "tags": [ - "Serviceowner" - ], - "summary": "Replaces a dialog", - "description": "Replaces a given dialog with the supplied model. For more information see the documentation (link TBD).\n\nOptimistic 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.", - "operationId": "V1ServiceOwnerDialogsUpdate_Dialog", - "parameters": [ - { - "name": "dialogId", - "in": "path", - "required": true, - "schema": { - "type": "string", - "format": "guid" - } - }, - { - "name": "if-Match", - "in": "header", - "schema": { - "type": "string", - "format": "guid", - "nullable": true - } - } - ], - "requestBody": { - "x-name": "dto", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/V1ServiceOwnerDialogsCommandsUpdate_Dialog" - } - } - }, - "required": true - }, - "responses": { - "204": { - "description": "The dialog aggregate was updated successfully.", - "headers": { - "Etag": { - "description": "The new UUID ETag of the dialog", - "schema": { - "title": "System_String", - "type": "string" - }, - "example": "123e4567-e89b-12d3-a456-426614174000" - } - } - }, - "400": { - "description": "Validation error occured. See problem details for a list of errors.", - "content": { - "application/problem+json": { - "schema": { - "$ref": "#/components/schemas/ProblemDetails" - } - } - } - }, - "401": { - "description": "Missing or invalid authentication token. Requires a Maskinporten-token with the scope \"digdir:dialogporten.serviceprovider\"." - }, - "403": { - "description": "Unauthorized to update the supplied dialog (not owned by authenticated organization or has additional scope requirements defined in policy)." - }, - "404": { - "description": "The given dialog ID was not found or is already deleted.", - "content": { - "application/problem+json": { - "schema": { - "$ref": "#/components/schemas/ProblemDetails" - } - } - } - }, - "410": { - "description": "Entity with the given key(s) is removed." - }, - "412": { - "description": "The supplied If-Match header did not match the current Revision value for the dialog. The request was not applied.", - "content": { - "application/problem+json": { - "schema": { - "$ref": "#/components/schemas/ProblemDetails" - } - } - } - }, - "422": { - "description": "Domain error occured. See problem details for a list of errors.", - "content": { - "application/problem+json": { - "schema": { - "$ref": "#/components/schemas/ProblemDetails" - } - } - } - } - }, - "security": [ - { - "JWTBearerAuth": [] - } - ] - }, - "get": { - "tags": [ - "Serviceowner" - ], - "summary": "Gets a single dialog", - "description": "Gets a single dialog aggregate. For more information see the documentation (link TBD).\n\nNote that this operation may return deleted dialogs (see the field `DeletedAt`).", - "operationId": "V1ServiceOwnerDialogsGet_GetDialog", - "parameters": [ - { - "name": "dialogId", - "in": "path", - "required": true, - "schema": { - "type": "string", - "format": "guid" - } - }, - { - "name": "endUserId", - "in": "query", - "description": "Filter by end user id", - "schema": { - "type": "string", - "nullable": true - } - } - ], - "responses": { - "200": { - "description": "Successfully returned the dialog aggregate.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/V1ServiceOwnerDialogsQueriesGet_Dialog" - } - } - } - }, - "401": { - "description": "Missing or invalid authentication token. Requires a Maskinporten-token with the scope \"digdir:dialogporten.serviceprovider\"." - }, - "403": { - "description": "Unauthorized to get the supplied dialog (not owned by authenticated organization or has additional scope requirements defined in policy)." - }, - "404": { - "description": "The given dialog ID was not found or is already deleted.", - "content": { - "application/problem+json": { - "schema": { - "$ref": "#/components/schemas/ProblemDetails" - } - } - } - } - }, - "security": [ - { - "JWTBearerAuth": [] - } - ] - }, - "delete": { - "tags": [ - "Serviceowner" - ], - "summary": "Deletes a dialog", - "description": "Deletes a given dialog (soft delete). For more information see the documentation (link TBD).\n\nNote 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.\nIf end users attempt to access the dialog via the details endpoint, they will get a 410 Gone response.\n\nOptimistic 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.", - "operationId": "V1ServiceOwnerDialogsDelete_Dialog", - "parameters": [ - { - "name": "dialogId", - "in": "path", - "required": true, - "schema": { - "type": "string", - "format": "guid" - } - }, - { - "name": "if-Match", - "in": "header", - "schema": { - "type": "string", - "format": "guid", - "nullable": true - } - } - ], - "responses": { - "204": { - "description": "The dialog aggregate was deleted successfully.", - "headers": { - "Etag": { - "description": "The new UUID ETag of the dialog", - "schema": { - "title": "System_String", - "type": "string" - }, - "example": "123e4567-e89b-12d3-a456-426614174000" - } - } - }, - "400": { - "description": "Validation error occured. See problem details for a list of errors.", - "content": { - "application/problem+json": { - "schema": { - "$ref": "#/components/schemas/ProblemDetails" - } - } - } - }, - "401": { - "description": "Missing or invalid authentication token. Requires a Maskinporten-token with the scope \"digdir:dialogporten.serviceprovider\"." - }, - "403": { - "description": "Unauthorized to delete the supplied dialog (not owned by authenticated organization or has additional scope requirements defined in policy)." - }, - "404": { - "description": "The given dialog ID was not found or is already deleted.", - "content": { - "application/problem+json": { - "schema": { - "$ref": "#/components/schemas/ProblemDetails" - } - } - } - }, - "410": { - "description": "Entity with the given key(s) is removed." - }, - "412": { - "description": "The supplied If-Match header did not match the current Revision value for the dialog. The request was not applied.", - "content": { - "application/problem+json": { - "schema": { - "$ref": "#/components/schemas/ProblemDetails" - } - } - } - } - }, - "security": [ - { - "JWTBearerAuth": [] - } - ] - }, - "patch": { - "tags": [ - "Serviceowner" - ], - "summary": "Patch a single dialog", - "description": "Patches a dialog aggregate with a RFC6902 JSON Patch document. The patch document must be a JSON array of RFC6902 operations.\nSee [https://tools.ietf.org/html/rfc6902](https://tools.ietf.org/html/rfc6902) for more information.\n \nOptimistic 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.", - "operationId": "V1ServiceOwnerDialogsPatchDialog", - "parameters": [ - { - "name": "dialogId", - "in": "path", - "required": true, - "schema": { - "type": "string", - "format": "guid" - }, - "x-position": 1 - }, - { - "name": "If-Match", - "x-originalName": "etag", - "in": "header", - "schema": { - "type": "string", - "format": "guid", - "nullable": true - }, - "x-position": 2 - } - ], - "requestBody": { - "x-name": "patchDocument", - "content": { - "application/json": { - "schema": { - "type": "array", - "items": { - "$ref": "#/components/schemas/JsonPatchOperations_Operation" - } - } - } - }, - "required": true, - "x-position": 3 - }, - "responses": { - "204": { - "description": "Patch was successfully applied.", - "headers": { - "Etag": { - "description": "The new UUID ETag of the dialog", - "schema": { - "type": "string" - }, - "example": "123e4567-e89b-12d3-a456-426614174000" - } - } - }, - "400": { - "description": "Validation error occured. See problem details for a list of errors.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ProblemDetails" - } - } - } - }, - "401": { - "description": "Missing or invalid authentication token. Requires a Maskinporten-token with the scope \\\"digdir:dialogporten.serviceprovider\\\"" - }, - "403": { - "description": "Unauthorized to update a dialog for the given serviceResource (not owned by authenticated organization or has additional scope requirements defined in policy)" - }, - "404": { - "description": "The given dialog ID was not found or is deleted", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ProblemDetails" - } - } - } - }, - "412": { - "description": "The supplied Revision does not match the current Revision of the dialog", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ProblemDetails" - } - } - } - }, - "422": { - "description": "Domain error occured. See problem details for a list of errors.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ProblemDetails" - } - } - } - } - }, - "security": [ - { - "JWTBearerAuth": [] - } - ] - } - }, - "/api/v1/serviceowner/dialogs": { - "get": { - "tags": [ - "Serviceowner" - ], - "summary": "Gets a list of dialogs", - "description": "Performs a search for dialogs, returning a paginated list of dialogs. For more information see the documentation (link TBD).\n\n* All date parameters must contain explicit time zone. Example: 2023-10-27T10:00:00Z or 2023-10-27T10:00:00+01:00\n* See \"continuationToken\" in the response for how to get the next page of results.\n* hasNextPage will be set to true if there are more items to get.", - "operationId": "V1ServiceOwnerDialogsSearch_SearchDialog", - "parameters": [ - { - "name": "serviceResource", - "in": "query", - "style": "form", - "explode": true, - "description": "Filter by one or more service resources", - "schema": { - "type": "array", - "nullable": true, - "items": { - "type": "string" - } - } - }, - { - "name": "party", - "in": "query", - "style": "form", - "explode": true, - "description": "Filter by one or more owning parties", - "schema": { - "type": "array", - "nullable": true, - "items": { - "type": "string" - } - } - }, - { - "name": "endUserId", - "in": "query", - "description": "Filter by end user id", - "schema": { - "type": "string", - "nullable": true - } - }, - { - "name": "extendedStatus", - "in": "query", - "style": "form", - "explode": true, - "description": "Filter by one or more extended statuses", - "schema": { - "type": "array", - "nullable": true, - "items": { - "type": "string" - } - } - }, - { - "name": "externalReference", - "in": "query", - "description": "Filter by external reference", - "schema": { - "type": "string", - "nullable": true - } - }, - { - "name": "status", - "in": "query", - "style": "form", - "explode": true, - "description": "Filter by status", - "schema": { - "type": "array", - "nullable": true, - "items": { - "$ref": "#/components/schemas/DialogsEntities_DialogStatus" - } - } - }, - { - "name": "createdAfter", - "in": "query", - "description": "Only return dialogs created after this date", - "schema": { - "type": "string", - "format": "date-time", - "nullable": true - } - }, - { - "name": "createdBefore", - "in": "query", - "description": "Only return dialogs created before this date", - "schema": { - "type": "string", - "format": "date-time", - "nullable": true - } - }, - { - "name": "updatedAfter", - "in": "query", - "description": "Only return dialogs updated after this date", - "schema": { - "type": "string", - "format": "date-time", - "nullable": true - } - }, - { - "name": "updatedBefore", - "in": "query", - "description": "Only return dialogs updated before this date", - "schema": { - "type": "string", - "format": "date-time", - "nullable": true - } - }, - { - "name": "dueAfter", - "in": "query", - "description": "Only return dialogs with due date after this date", - "schema": { - "type": "string", - "format": "date-time", - "nullable": true - } - }, - { - "name": "dueBefore", - "in": "query", - "description": "Only return dialogs with due date before this date", - "schema": { - "type": "string", - "format": "date-time", - "nullable": true - } - }, - { - "name": "visibleAfter", - "in": "query", - "description": "Only return dialogs with visible-from date after this date", - "schema": { - "type": "string", - "format": "date-time", - "nullable": true - } - }, - { - "name": "visibleBefore", - "in": "query", - "description": "Only return dialogs with visible-from date before this date", - "schema": { - "type": "string", - "format": "date-time", - "nullable": true - } - }, - { - "name": "process", - "in": "query", - "description": "Filter by process", - "schema": { - "type": "string", - "nullable": true - } - }, - { - "name": "systemLabel", - "in": "query", - "style": "form", - "explode": true, - "description": "Filter by Display state", - "schema": { - "type": "array", - "nullable": true, - "items": { - "$ref": "#/components/schemas/DialogEndUserContextsEntities_SystemLabel" - } - } - }, - { - "name": "search", - "in": "query", - "description": "Search string for free text search. Will attempt to fuzzily match in all free text fields in the aggregate", - "schema": { - "type": "string", - "nullable": true - } - }, - { - "name": "searchLanguageCode", - "in": "query", - "description": "Limit free text search to texts with this language code, e.g. 'nb', 'en'. Culture codes will be normalized to neutral language codes (ISO 639). Default: search all culture codes", - "schema": { - "type": "string", - "nullable": true - } - }, - { - "name": "orderBy", - "in": "query", - "schema": { - "nullable": true, - "oneOf": [ - { - "$ref": "#/components/schemas/OrderSetOfTOrderDefinitionAndTTarget" - } - ] - } - }, - { - "name": "continuationToken", - "in": "query", - "description": "Supply \"continuationToken\" for the response to get the next page of results, if hasNextPage is true", - "schema": { - "nullable": true, - "oneOf": [ - { - "$ref": "#/components/schemas/ContinuationTokenSetOfTOrderDefinitionAndTTarget" - } - ] - } - }, - { - "name": "limit", - "in": "query", - "description": "Limit the number of results per page (1-1000, default: 100)", - "schema": { - "type": "integer", - "format": "int32", - "nullable": true - } - } - ], - "responses": { - "200": { - "description": "Successfully returned the dialog list.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/PaginatedListOfV1ServiceOwnerDialogsQueriesSearch_Dialog" - } - } - } - }, - "401": { - "description": "Missing or invalid authentication token. Requires a Maskinporten-token with the scope \"digdir:dialogporten.serviceprovider.search\"." - } - }, - "security": [ - { - "JWTBearerAuth": [] - } - ] - }, - "post": { - "tags": [ - "Serviceowner" - ], - "summary": "Creates a new dialog", - "description": "The dialog is created with the given configuration. For more information see the documentation (link TBD).\n\nFor detailed information on validation rules, see [the source for CreateDialogCommandValidator](https://github.com/altinn/dialogporten/blob/main/src/Digdir.Domain.Dialogporten.Application/Features/V1/ServiceOwner/Dialogs/Commands/Create/CreateDialogCommandValidator.cs)", - "operationId": "V1ServiceOwnerDialogsCreate_Dialog", - "requestBody": { - "x-name": "dto", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/V1ServiceOwnerDialogsCommandsCreate_Dialog" - } - } - }, - "required": true - }, - "responses": { - "201": { - "description": "The UUID of the created dialog aggregate. A relative URL to the newly created activity is set in the \"Location\" header.", - "headers": { - "Etag": { - "description": "The new UUID ETag of the dialog", - "schema": { - "title": "System_String", - "type": "string" - }, - "example": "123e4567-e89b-12d3-a456-426614174000" - } - }, - "content": { - "application/json": { - "schema": { - "type": "string" - }, - "example": "018bb8e5-d9d0-7434-8ec5-569a6c8e01fc" - } - } - }, - "204": { - "description": "No Content" - }, - "400": { - "description": "Validation error occured. See problem details for a list of errors.", - "content": { - "application/problem+json": { - "schema": { - "$ref": "#/components/schemas/ProblemDetails" - } - } - } - }, - "401": { - "description": "Missing or invalid authentication token. Requires a Maskinporten-token with the scope \"digdir:dialogporten.serviceprovider\"." - }, - "403": { - "description": "Unauthorized to create a dialog for the given serviceResource (not owned by authenticated organization or has additional scope requirements defined in policy)." - }, - "422": { - "description": "Domain error occured. See problem details for a list of errors.", - "content": { - "application/problem+json": { - "schema": { - "$ref": "#/components/schemas/ProblemDetails" - } - } - } - } - }, - "security": [ - { - "JWTBearerAuth": [] - } - ] - } - }, - "/api/v1/serviceowner/dialogs/{dialogId}/actions/purge": { - "post": { - "tags": [ - "Serviceowner" - ], - "summary": "Permanently deletes a dialog", - "description": "Deletes a given dialog (hard delete). For more information see the documentation (link TBD).\n\nOptimistic 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.", - "operationId": "V1ServiceOwnerDialogsPurge_PurgeDialog", - "parameters": [ - { - "name": "dialogId", - "in": "path", - "required": true, - "schema": { - "type": "string", - "format": "guid" - } - }, - { - "name": "if-Match", - "in": "header", - "schema": { - "type": "string", - "format": "guid", - "nullable": true - } - } - ], - "responses": { - "204": { - "description": "The dialog aggregate was deleted successfully." - }, - "401": { - "description": "Missing or invalid authentication token. Requires a Maskinporten-token with the scope \"digdir:dialogporten.serviceprovider\"." - }, - "403": { - "description": "Unauthorized to delete the supplied dialog (not owned by authenticated organization or has additional scope requirements defined in policy)." - }, - "404": { - "description": "The given dialog ID was not found or is already deleted.", - "content": { - "application/problem+json": { - "schema": { - "$ref": "#/components/schemas/ProblemDetails" - } - } - } - }, - "412": { - "description": "The supplied If-Match header did not match the current Revision value for the dialog. The request was not applied.", - "content": { - "application/problem+json": { - "schema": { - "$ref": "#/components/schemas/ProblemDetails" - } - } - } - } - }, - "security": [ - { - "JWTBearerAuth": [] - } - ] - } - }, - "/api/v1/serviceowner/dialogs/{dialogId}/activities": { - "get": { - "tags": [ - "Serviceowner" - ], - "summary": "Gets a list of dialog activities", - "description": "Gets the list of activities belonging to a dialog", - "operationId": "V1ServiceOwnerDialogActivitiesSearch_SearchDialogActivity", - "parameters": [ - { - "name": "dialogId", - "in": "path", - "required": true, - "schema": { - "type": "string", - "format": "guid" - } - } - ], - "responses": { - "200": { - "description": "Successfully returned the dialog activity list.", - "content": { - "application/json": { - "schema": { - "type": "array", - "items": { - "$ref": "#/components/schemas/V1ServiceOwnerDialogActivitiesQueriesSearch_Activity" - } - } - } - } - }, - "401": { - "description": "Missing or invalid authentication token. Requires a Maskinporten-token with the scope \"digdir:dialogporten.serviceprovider\"." - }, - "403": { - "description": "Unauthorized to get the supplied dialog (not owned by authenticated organization or has additional scope requirements defined in policy)." - } - }, - "security": [ - { - "JWTBearerAuth": [] - } - ] - }, - "post": { - "tags": [ - "Serviceowner" - ], - "summary": "Adds a activity to a dialogs activity history", - "description": "The activity is created with the given configuration. For more information see the documentation (link TBD).\n\nOptimistic 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.", - "operationId": "V1ServiceOwnerDialogActivitiesCreate_DialogActivity", - "parameters": [ - { - "name": "dialogId", - "in": "path", - "required": true, - "schema": { - "type": "string", - "format": "guid" - } - }, - { - "name": "if-Match", - "in": "header", - "schema": { - "type": "string", - "format": "guid", - "nullable": true - } - } - ], - "requestBody": { - "x-name": "CreateActivityRequest", - "description": "", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/V1ServiceOwnerDialogActivitiesCreate_ActivityRequest" - } - } - }, - "required": true, - "x-position": 1 - }, - "responses": { - "201": { - "description": "The UUID of the created dialog activity. A relative URL to the newly created activity is set in the \"Location\" header.", - "headers": { - "Etag": { - "description": "The new UUID ETag of the dialog", - "schema": { - "title": "System_String", - "type": "string" - }, - "example": "123e4567-e89b-12d3-a456-426614174000" - } - }, - "content": { - "application/json": { - "schema": { - "type": "string" - }, - "example": "018bb8e5-d9d0-7434-8ec5-569a6c8e01fc" - } - } - }, - "204": { - "description": "No Content" - }, - "400": { - "description": "Validation error occured. See problem details for a list of errors.", - "content": { - "application/problem+json": { - "schema": { - "$ref": "#/components/schemas/ProblemDetails" - } - } - } - }, - "401": { - "description": "Missing or invalid authentication token. Requires a Maskinporten-token with the scope \"digdir:dialogporten.serviceprovider\"." - }, - "403": { - "description": "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": { - "description": "The given dialog ID was not found or is already deleted.", - "content": { - "application/problem+json": { - "schema": { - "$ref": "#/components/schemas/ProblemDetails" - } - } - } - }, - "410": { - "description": "Entity with the given key(s) is removed." - }, - "412": { - "description": "The supplied If-Match header did not match the current Revision value for the dialog. The request was not applied.", - "content": { - "application/problem+json": { - "schema": { - "$ref": "#/components/schemas/ProblemDetails" - } - } - } - }, - "422": { - "description": "Domain error occured. See problem details for a list of errors.", - "content": { - "application/problem+json": { - "schema": { - "$ref": "#/components/schemas/ProblemDetails" - } - } - } - } - }, - "security": [ - { - "JWTBearerAuth": [] - } - ] - } - }, - "/api/v1/serviceowner/dialogs/{dialogId}/actions/should-send-notification": { - "get": { - "tags": [ - "Serviceowner" - ], - "summary": "Returns a boolean value based on conditions used to determine if a notification is to be sent", - "description": "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.", - "operationId": "V1ServiceOwnerDialogActivitiesNotificationCondition_NotificationCondition", - "parameters": [ - { - "name": "dialogId", - "in": "path", - "required": true, - "schema": { - "type": "string", - "format": "guid" - } - }, - { - "name": "conditionType", - "in": "query", - "required": true, - "schema": { - "allOf": [ - { - "$ref": "#/components/schemas/V1ServiceOwnerDialogActivitiesQueriesNotificationCondition_NotificationConditionType" - } - ] - } - }, - { - "name": "activityType", - "in": "query", - "required": true, - "schema": { - "allOf": [ - { - "$ref": "#/components/schemas/DialogsEntitiesActivities_DialogActivityType" - } - ] - } - }, - { - "name": "transmissionId", - "in": "query", - "schema": { - "type": "string", - "format": "guid", - "nullable": true - } - } - ], - "responses": { - "200": { - "description": "Successfully returned the notification determination.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/V1ServiceOwnerDialogActivitiesQueriesNotificationCondition_NotificationCondition" - } - } - } - }, - "401": { - "description": "Missing or invalid authentication token. Requires a Maskinporten-token with the scope \"altinn:system/notifications.condition.check\"." - }, - "403": { - "description": "Forbidden" - } - }, - "security": [ - { - "JWTBearerAuth": [] - } - ] - } - }, - "/api/v1/serviceowner/dialogs/{dialogId}/activities/{activityId}": { - "get": { - "tags": [ - "Serviceowner" - ], - "summary": "Gets a single dialog activity", - "description": "Gets a single activity belonging to a dialog. For more information see the documentation (link TBD).", - "operationId": "V1ServiceOwnerDialogActivitiesGet_GetDialogActivity", - "parameters": [ - { - "name": "dialogId", - "in": "path", - "required": true, - "schema": { - "type": "string", - "format": "guid" - } - }, - { - "name": "activityId", - "in": "path", - "required": true, - "schema": { - "type": "string", - "format": "guid" - } - } - ], - "responses": { - "200": { - "description": "Successfully returned the dialog activity.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/V1ServiceOwnerDialogActivitiesQueriesGet_Activity" - } - } - } - }, - "401": { - "description": "Missing or invalid authentication token. Requires a Maskinporten-token with the scope \"digdir:dialogporten.serviceprovider\"." - }, - "403": { - "description": "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": { - "description": "The given dialog ID was not found or was deleted, or the given activity ID was not found.", - "content": { - "application/problem+json": { - "schema": { - "$ref": "#/components/schemas/ProblemDetails" - } - } - } - }, - "410": { - "description": "Entity with the given key(s) is removed." - } - }, - "security": [ - { - "JWTBearerAuth": [] - } - ] - } - }, - "/api/v1/enduser/parties": { - "get": { - "tags": [ - "Enduser" - ], - "summary": "Gets the list of authorized parties for the end user", - "description": "Gets the list of authorized parties for the end user. For more information see the documentation (link TBD).", - "operationId": "V1EndUserPartiesGet_GetParties", - "responses": { - "200": { - "description": "The list of authorized parties for the end user", - "content": { - "application/json": { - "schema": { - "type": "array", - "items": { - "$ref": "#/components/schemas/V1EndUserPartiesQueriesGet_Parties" - } - } - } - } - }, - "401": { - "description": "Unauthorized" - }, - "403": { - "description": "Forbidden" - } - }, - "security": [ - { - "JWTBearerAuth": [] - } - ] - } - }, - "/api/v1/enduser/dialogs/{dialogId}/transmissions": { - "get": { - "tags": [ - "Enduser" - ], - "summary": "Gets a list of dialog transmissions", - "description": "Gets the list of transmissions belonging to a dialog", - "operationId": "V1EndUserDialogTransmissionsSearch_SearchDialogTransmission", - "parameters": [ - { - "name": "dialogId", - "in": "path", - "required": true, - "schema": { - "type": "string", - "format": "guid" - } - } - ], - "responses": { - "200": { - "description": "Successfully returned the dialog transmission list.", - "content": { - "application/json": { - "schema": { - "type": "array", - "items": { - "$ref": "#/components/schemas/V1EndUserDialogTransmissionsQueriesSearch_Transmission" - } - } - } - } - }, - "401": { - "description": "Missing or invalid authentication token. Requires a Maskinporten-token with the scope \"digdir:dialogporten\"." - }, - "403": { - "description": "Unauthorized to get the supplied dialog (not owned by authenticated organization or has additional scope requirements defined in policy)." - } - }, - "security": [ - { - "JWTBearerAuth": [] - } - ] - } - }, - "/api/v1/enduser/dialogs/{dialogId}/transmissions/{transmissionId}": { - "get": { - "tags": [ - "Enduser" - ], - "summary": "Gets a single dialog transmission", - "description": "Gets a single transmission belonging to a dialog. For more information see the documentation (link TBD).", - "operationId": "V1EndUserDialogTransmissionsGet_GetDialogTransmission", - "parameters": [ - { - "name": "dialogId", - "in": "path", - "required": true, - "schema": { - "type": "string", - "format": "guid" - } - }, - { - "name": "transmissionId", - "in": "path", - "required": true, - "schema": { - "type": "string", - "format": "guid" - } - } - ], - "responses": { - "200": { - "description": "Successfully returned the dialog transmission.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/V1EndUserDialogTransmissionsQueriesGet_Transmission" - } - } - } - }, - "401": { - "description": "Missing or invalid authentication token. Requires a Maskinporten-token with the scope \"digdir:dialogporten\"." - }, - "403": { - "description": "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": { - "description": "The given dialog ID was not found or was deleted, or the given transmission ID was not found.", - "content": { - "application/problem+json": { - "schema": { - "$ref": "#/components/schemas/ProblemDetails" - } - } - } - } - }, - "security": [ - { - "JWTBearerAuth": [] - } - ] - } - }, - "/api/v1/enduser/dialogs/{dialogId}/systemlabels": { - "put": { - "tags": [ - "Enduser" - ], - "operationId": "V1EndUserDialogSystemLabelsSet_SetDialogSystemLabel", - "parameters": [ - { - "name": "dialogId", - "in": "path", - "required": true, - "schema": { - "type": "string", - "format": "guid" - } - } - ], - "requestBody": { - "x-name": "SystemLabelCommand", - "description": "", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/V1EndUserDialogSystemLabelsCommandsSet_SystemLabelCommand" - } - } - }, - "required": true, - "x-position": 1 - }, - "responses": { - "204": { - "description": "No Content" - }, - "400": { - "description": "Bad Request", - "content": { - "application/problem+json": { - "schema": { - "$ref": "#/components/schemas/ProblemDetails" - } - } - } - }, - "401": { - "description": "Unauthorized" - }, - "403": { - "description": "Forbidden" - }, - "404": { - "description": "Not Found", - "content": { - "application/problem+json": { - "schema": { - "$ref": "#/components/schemas/ProblemDetails" - } - } - } - }, - "410": { - "description": "" - }, - "412": { - "description": "", - "content": { - "application/problem+json": { - "schema": { - "$ref": "#/components/schemas/ProblemDetails" - } - } - } - }, - "422": { - "description": "", - "content": { - "application/problem+json": { - "schema": { - "$ref": "#/components/schemas/ProblemDetails" - } - } - } - } - }, - "security": [ - { - "JWTBearerAuth": [] - } - ] - } - }, - "/api/v1/enduser/dialogs/{dialogId}/seenlog": { - "get": { - "tags": [ - "Enduser" - ], - "summary": "Gets all seen log records for a dialog", - "description": "Gets all seen log records for a dialog. For more information see the documentation (link TBD).", - "operationId": "V1EndUserDialogSeenLogsSearch_SearchDialogSeenLog", - "parameters": [ - { - "name": "dialogId", - "in": "path", - "required": true, - "schema": { - "type": "string", - "format": "guid" - } - } - ], - "responses": { - "200": { - "description": "Successfully returned the dialog seen log records.", - "content": { - "application/json": { - "schema": { - "type": "array", - "items": { - "$ref": "#/components/schemas/V1EndUserDialogSeenLogsQueriesSearch_SeenLog" - } - } - } - } - }, - "401": { - "description": "Missing or invalid authentication token. Requires a Maskinporten-token with the scope \"digdir:dialogporten\"." - }, - "403": { - "description": "Forbidden" - }, - "404": { - "description": "Not Found", - "content": { - "application/problem+json": { - "schema": { - "$ref": "#/components/schemas/ProblemDetails" - } - } - } - } - }, - "security": [ - { - "JWTBearerAuth": [] - } - ] - } - }, - "/api/v1/enduser/dialogs/{dialogId}/seenlog/{seenLogId}": { - "get": { - "tags": [ - "Enduser" - ], - "summary": "Gets a single dialog seen log record", - "description": "Gets a single dialog seen log record. For more information see the documentation (link TBD).", - "operationId": "V1EndUserDialogSeenLogsGet_GetDialogSeenLog", - "parameters": [ - { - "name": "dialogId", - "in": "path", - "required": true, - "schema": { - "type": "string", - "format": "guid" - } - }, - { - "name": "seenLogId", - "in": "path", - "required": true, - "schema": { - "type": "string", - "format": "guid" - } - } - ], - "responses": { - "200": { - "description": "Successfully returned the dialog seen log record.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/V1EndUserDialogSeenLogsQueriesGet_SeenLog" - } - } - } - }, - "401": { - "description": "Missing or invalid authentication token. Requires a Maskinporten-token with the scope \"digdir:dialogporten\"." - }, - "403": { - "description": "Forbidden" - }, - "404": { - "description": "Not Found", - "content": { - "application/problem+json": { - "schema": { - "$ref": "#/components/schemas/ProblemDetails" - } - } - } - } - }, - "security": [ - { - "JWTBearerAuth": [] - } - ] - } - }, - "/api/v1/enduser/dialogs": { - "get": { - "tags": [ - "Enduser" - ], - "summary": "Gets a list of dialogs", - "description": "Performs a search for dialogs, returning a paginated list of dialogs. For more information see the documentation (link TBD).\n\n* All date parameters must contain explicit time zone. Example: 2023-10-27T10:00:00Z or 2023-10-27T10:00:00+01:00\n* See \"continuationToken\" in the response for how to get the next page of results.\n* hasNextPage will be set to true if there are more items to get.", - "operationId": "V1EndUserDialogsSearch_SearchDialog", - "parameters": [ - { - "name": "org", - "in": "query", - "style": "form", - "explode": true, - "description": "Filter by one or more service owner codes", - "schema": { - "type": "array", - "nullable": true, - "items": { - "type": "string" - } - } - }, - { - "name": "serviceResource", - "in": "query", - "style": "form", - "explode": true, - "description": "Filter by one or more service resources", - "schema": { - "type": "array", - "nullable": true, - "items": { - "type": "string" - } - } - }, - { - "name": "party", - "in": "query", - "style": "form", - "explode": true, - "description": "Filter by one or more owning parties", - "schema": { - "type": "array", - "nullable": true, - "items": { - "type": "string" - } - } - }, - { - "name": "extendedStatus", - "in": "query", - "style": "form", - "explode": true, - "description": "Filter by one or more extended statuses", - "schema": { - "type": "array", - "nullable": true, - "items": { - "type": "string" - } - } - }, - { - "name": "externalReference", - "in": "query", - "description": "Filter by external reference", - "schema": { - "type": "string", - "nullable": true - } - }, - { - "name": "status", - "in": "query", - "style": "form", - "explode": true, - "description": "Filter by status", - "schema": { - "type": "array", - "nullable": true, - "items": { - "$ref": "#/components/schemas/DialogsEntities_DialogStatus" - } - } - }, - { - "name": "createdAfter", - "in": "query", - "description": "Only return dialogs created after this date", - "schema": { - "type": "string", - "format": "date-time", - "nullable": true - } - }, - { - "name": "createdBefore", - "in": "query", - "description": "Only return dialogs created before this date", - "schema": { - "type": "string", - "format": "date-time", - "nullable": true - } - }, - { - "name": "updatedAfter", - "in": "query", - "description": "Only return dialogs updated after this date", - "schema": { - "type": "string", - "format": "date-time", - "nullable": true - } - }, - { - "name": "updatedBefore", - "in": "query", - "description": "Only return dialogs updated before this date", - "schema": { - "type": "string", - "format": "date-time", - "nullable": true - } - }, - { - "name": "dueAfter", - "in": "query", - "description": "Only return dialogs with due date after this date", - "schema": { - "type": "string", - "format": "date-time", - "nullable": true - } - }, - { - "name": "dueBefore", - "in": "query", - "description": "Only return dialogs with due date before this date", - "schema": { - "type": "string", - "format": "date-time", - "nullable": true - } - }, - { - "name": "process", - "in": "query", - "description": "Filter by process", - "schema": { - "type": "string", - "nullable": true - } - }, - { - "name": "systemLabel", - "in": "query", - "style": "form", - "explode": true, - "description": "Filter by Display state", - "schema": { - "type": "array", - "nullable": true, - "items": { - "$ref": "#/components/schemas/DialogEndUserContextsEntities_SystemLabel" - } - } - }, - { - "name": "search", - "in": "query", - "description": "Search string for free text search. Will attempt to fuzzily match in all free text fields in the aggregate", - "schema": { - "type": "string", - "nullable": true - } - }, - { - "name": "searchLanguageCode", - "in": "query", - "description": "Limit free text search to texts with this language code, e.g. 'nb', 'en'. Culture codes will be normalized to neutral language codes (ISO 639). Default: search all culture codes", - "schema": { - "type": "string", - "nullable": true - } - }, - { - "name": "orderBy", - "in": "query", - "schema": { - "nullable": true, - "oneOf": [ - { - "$ref": "#/components/schemas/OrderSetOfTOrderDefinitionAndTTarget" - } - ] - } - }, - { - "name": "continuationToken", - "in": "query", - "description": "Supply \"continuationToken\" for the response to get the next page of results, if hasNextPage is true", - "schema": { - "nullable": true, - "oneOf": [ - { - "$ref": "#/components/schemas/ContinuationTokenSetOfTOrderDefinitionAndTTarget" - } - ] - } - }, - { - "name": "limit", - "in": "query", - "description": "Limit the number of results per page (1-1000, default: 100)", - "schema": { - "type": "integer", - "format": "int32", - "nullable": true - } - } - ], - "responses": { - "200": { - "description": "Successfully returned the dialog list.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/PaginatedListOfV1EndUserDialogsQueriesSearch_Dialog" - } - } - } - }, - "401": { - "description": "Missing or invalid authentication token. Requires a Maskinporten-token with the scope \"digdir:dialogporten\"." - } - }, - "security": [ - { - "JWTBearerAuth": [] - } - ] - } - }, - "/api/v1/enduser/dialogs/{dialogId}": { - "get": { - "tags": [ - "Enduser" - ], - "summary": "Gets a single dialog", - "description": "Gets a single dialog aggregate. For more information see the documentation (link TBD).", - "operationId": "V1EndUserDialogsGet_GetDialog", - "parameters": [ - { - "name": "dialogId", - "in": "path", - "required": true, - "schema": { - "type": "string", - "format": "guid" - } - } - ], - "responses": { - "200": { - "description": "Successfully returned the dialog aggregate.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/V1EndUserDialogsQueriesGet_Dialog" - } - } - } - }, - "401": { - "description": "Missing or invalid authentication token. Requires a Maskinporten-token with the scope \"digdir:dialogporten\"." - }, - "403": { - "description": "Unauthorized to get the supplied dialog (not owned by authenticated organization or has additional scope requirements defined in policy)." - }, - "404": { - "description": "The given dialog ID was not found or is already deleted.", - "content": { - "application/problem+json": { - "schema": { - "$ref": "#/components/schemas/ProblemDetails" - } - } - } - } - }, - "security": [ - { - "JWTBearerAuth": [] - } - ] - } - }, - "/api/v1/enduser/dialogs/{dialogId}/labellog": { - "get": { - "tags": [ - "Enduser" - ], - "operationId": "V1EndUserDialogLabelAssignmentLogsSearch_SearchDialogLabelAssignmentLog", - "parameters": [ - { - "name": "dialogId", - "in": "path", - "required": true, - "schema": { - "type": "string", - "format": "guid" - } - } - ], - "responses": { - "200": { - "description": "Success", - "content": { - "application/json": { - "schema": { - "type": "array", - "items": { - "$ref": "#/components/schemas/V1EndUserDialogLabelAssignmentLogQueriesSearch_LabelAssignmentLog" - } - } - } - } - }, - "401": { - "description": "Unauthorized" - }, - "403": { - "description": "Forbidden" - }, - "404": { - "description": "Not Found", - "content": { - "application/problem+json": { - "schema": { - "$ref": "#/components/schemas/ProblemDetails" - } - } - } - }, - "410": { - "description": "" - } - }, - "security": [ - { - "JWTBearerAuth": [] - } - ] - } - }, - "/api/v1/enduser/dialogs/{dialogId}/activities": { - "get": { - "tags": [ - "Enduser" - ], - "summary": "Gets a list of dialog activities", - "description": "Gets the list of activities belonging to a dialog", - "operationId": "V1EndUserDialogActivitiesSearch_SearchDialogActivity", - "parameters": [ - { - "name": "dialogId", - "in": "path", - "required": true, - "schema": { - "type": "string", - "format": "guid" - } - } - ], - "responses": { - "200": { - "description": "Successfully returned the dialog activity list.", - "content": { - "application/json": { - "schema": { - "type": "array", - "items": { - "$ref": "#/components/schemas/V1EndUserDialogActivitiesQueriesSearch_Activity" - } - } - } - } - }, - "401": { - "description": "Missing or invalid authentication token. Requires a Maskinporten-token with the scope \"digdir:dialogporten\"." - }, - "403": { - "description": "Unauthorized to get the supplied dialog (not owned by authenticated organization or has additional scope requirements defined in policy)." - } - }, - "security": [ - { - "JWTBearerAuth": [] - } - ] - } - }, - "/api/v1/enduser/dialogs/{dialogId}/activities/{activityId}": { - "get": { - "tags": [ - "Enduser" - ], - "summary": "Gets a single dialog activity", - "description": "Gets a single activity belonging to a dial og. For more information see the documentation (link TBD).", - "operationId": "V1EndUserDialogActivitiesGet_GetDialogActivity", - "parameters": [ - { - "name": "dialogId", - "in": "path", - "required": true, - "schema": { - "type": "string", - "format": "guid" - } - }, - { - "name": "activityId", - "in": "path", - "required": true, - "schema": { - "type": "string", - "format": "guid" - } - } - ], - "responses": { - "200": { - "description": "Successfully returned the dialog activity.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/V1EndUserDialogActivitiesQueriesGet_Activity" - } - } - } - }, - "401": { - "description": "Missing or invalid authentication token. Requires a Maskinporten-token with the scope \"digdir:dialogporten\"." - }, - "403": { - "description": "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": { - "description": "The given dialog ID was not found or was deleted, or the given activity ID was not found.", - "content": { - "application/problem+json": { - "schema": { - "$ref": "#/components/schemas/ProblemDetails" - } - } - } - } - }, - "security": [ - { - "JWTBearerAuth": [] - } - ] - } - } - }, - "components": { - "schemas": { - "V1WellKnownOauthAuthorizationServerQueriesGet_GetOauthAuthorizationServer": { - "type": "object", - "additionalProperties": false, - "properties": { - "issuer": { - "type": "string" - }, - "jwks_uri": { - "type": "string" - } - } - }, - "V1WellKnownJwksQueriesGet_GetJwks": { - "type": "object", - "additionalProperties": false, - "properties": { - "keys": { - "type": "array", - "items": { - "$ref": "#/components/schemas/V1WellKnownJwksQueriesGet_Jwk" - } - } - } - }, - "V1WellKnownJwksQueriesGet_Jwk": { - "type": "object", - "additionalProperties": false, - "properties": { - "kty": { - "type": "string" - }, - "use": { - "type": "string" - }, - "kid": { - "type": "string" - }, - "crv": { - "type": "string" - }, - "x": { - "type": "string" - }, - "alg": { - "type": "string" - } - } - }, - "V1ServiceOwnerDialogTransmissionsQueriesSearch_Transmission": { - "type": "object", - "additionalProperties": false, - "properties": { - "id": { - "type": "string", - "description": "The unique identifier for the transmission in UUIDv7 format.", - "format": "guid" - }, - "createdAt": { - "type": "string", - "description": "The date and time when the transmission was created.", - "format": "date-time" - }, - "authorizationAttribute": { - "type": "string", - "description": "The authorization attribute associated with the transmission.", - "nullable": true - }, - "extendedType": { - "type": "string", - "description": "The extended type URI for the transmission.", - "format": "uri", - "nullable": true - }, - "relatedTransmissionId": { - "type": "string", - "description": "The unique identifier for the related transmission, if any.", - "format": "guid", - "nullable": true - }, - "deletedAt": { - "type": "string", - "description": "The date and time when the transmission was deleted, if applicable.", - "format": "date-time", - "nullable": true - }, - "type": { - "description": "The type of the transmission.", - "oneOf": [ - { - "$ref": "#/components/schemas/DialogsEntitiesTransmissions_DialogTransmissionType" - } - ] - }, - "sender": { - "description": "The sender actor information for the transmission.", - "oneOf": [ - { - "$ref": "#/components/schemas/V1ServiceOwnerCommonActors_Actor" - } - ] - }, - "content": { - "description": "The content of the transmission.", - "oneOf": [ - { - "$ref": "#/components/schemas/V1ServiceOwnerDialogTransmissionsQueriesSearch_Content" - } - ] - }, - "attachments": { - "type": "array", - "description": "The attachments associated with the transmission.", - "items": { - "$ref": "#/components/schemas/V1ServiceOwnerDialogTransmissionsQueriesSearch_Attachment" - } - } - } - }, - "DialogsEntitiesTransmissions_DialogTransmissionType": { - "type": "string", - "description": "", - "x-enumNames": [ - "Information", - "Acceptance", - "Rejection", - "Request", - "Alert", - "Decision", - "Submission", - "Correction" - ], - "enum": [ - "Information", - "Acceptance", - "Rejection", - "Request", - "Alert", - "Decision", - "Submission", - "Correction" - ] - }, - "V1ServiceOwnerCommonActors_Actor": { - "type": "object", - "additionalProperties": false, - "properties": { - "actorType": { - "description": "The type of actor that sent the transmission.", - "oneOf": [ - { - "$ref": "#/components/schemas/Actors_ActorType" - } - ] - }, - "actorName": { - "type": "string", - "description": "Specifies the name of the entity that sent the transmission. Mutually exclusive with ActorId. If ActorId\nis supplied, the name will be automatically populated from the name registries.", - "nullable": true, - "example": "Ola Nordmann" - }, - "actorId": { - "type": "string", - "description": "The identifier of the person or organization that sent the transmission. Mutually exclusive with ActorName.\nMight be omitted if ActorType is \"ServiceOwner\".", - "nullable": true, - "example": "urn:altinn:person:identifier-no:12018212345" - } - } - }, - "Actors_ActorType": { - "type": "string", - "description": "", - "x-enumNames": [ - "PartyRepresentative", - "ServiceOwner" - ], - "enum": [ - "PartyRepresentative", - "ServiceOwner" - ] - }, - "V1ServiceOwnerDialogTransmissionsQueriesSearch_Content": { - "type": "object", - "additionalProperties": false, - "properties": { - "title": { - "description": "The title of the content.", - "oneOf": [ - { - "$ref": "#/components/schemas/V1CommonContent_ContentValue" - } - ] - }, - "summary": { - "description": "The summary of the content.", - "oneOf": [ - { - "$ref": "#/components/schemas/V1CommonContent_ContentValue" - } - ] - }, - "contentReference": { - "description": "Front-channel embedded content. Used to dynamically embed content in the frontend from an external URL.", - "nullable": true, - "oneOf": [ - { - "$ref": "#/components/schemas/V1CommonContent_ContentValue" - } - ] - } - } - }, - "V1CommonContent_ContentValue": { - "type": "object", - "additionalProperties": false, - "properties": { - "value": { - "type": "array", - "description": "A list of localizations for the content.", - "items": { - "$ref": "#/components/schemas/V1CommonLocalizations_Localization" - } - }, - "mediaType": { - "type": "string", - "description": "Media type of the content, this can also indicate that the content is embeddable.\nFor a list of supported media types, see (link TBD)." - } - } - }, - "V1CommonLocalizations_Localization": { - "type": "object", - "additionalProperties": false, - "properties": { - "value": { - "type": "string", - "description": "The localized text or URI reference." - }, - "languageCode": { - "type": "string", - "description": "The language code of the localization in ISO 639-1 format.", - "example": "nb" - } - } - }, - "V1ServiceOwnerDialogTransmissionsQueriesSearch_Attachment": { - "type": "object", - "additionalProperties": false, - "properties": { - "id": { - "type": "string", - "description": "The unique identifier for the attachment in UUIDv7 format.", - "format": "guid" - }, - "displayName": { - "type": "array", - "description": "The display name of the attachment that should be used in GUIs.", - "items": { - "$ref": "#/components/schemas/V1CommonLocalizations_Localization" - } - }, - "urls": { - "type": "array", - "description": "The URLs associated with the attachment, each referring to a different representation of the attachment.", - "items": { - "$ref": "#/components/schemas/V1ServiceOwnerDialogTransmissionsQueriesSearch_AttachmentUrl" - } - } - } - }, - "V1ServiceOwnerDialogTransmissionsQueriesSearch_AttachmentUrl": { - "type": "object", - "additionalProperties": false, - "properties": { - "id": { - "type": "string", - "description": "The unique identifier for the attachment URL in UUIDv7 format.", - "format": "guid" - }, - "url": { - "type": "string", - "description": "The fully qualified URL of the attachment. Will be set to \"urn:dialogporten:unauthorized\" if the user is\nnot authorized to access the transmission.", - "format": "uri", - "example": "https://someendpoint.com/someattachment.pdf\nurn:dialogporten:unauthorized" - }, - "mediaType": { - "type": "string", - "description": "The media type of the attachment.", - "nullable": true, - "example": "application/pdf\napplication/zip" - }, - "consumerType": { - "description": "The type of consumer the URL is intended for.", - "oneOf": [ - { - "$ref": "#/components/schemas/Attachments_AttachmentUrlConsumerType" - } - ] - } - } - }, - "Attachments_AttachmentUrlConsumerType": { - "type": "string", - "description": "", - "x-enumNames": [ - "Gui", - "Api" - ], - "enum": [ - "Gui", - "Api" - ] - }, - "V1ServiceOwnerDialogTransmissionsQueriesGet_Transmission": { - "type": "object", - "additionalProperties": false, - "properties": { - "id": { - "type": "string", - "description": "The unique identifier for the transmission in UUIDv7 format.", - "format": "guid" - }, - "createdAt": { - "type": "string", - "description": "The date and time when the transmission was created.", - "format": "date-time" - }, - "authorizationAttribute": { - "type": "string", - "description": "The authorization attribute associated with the transmission.", - "nullable": true - }, - "extendedType": { - "type": "string", - "description": "The extended type URI for the transmission.", - "format": "uri", - "nullable": true - }, - "relatedTransmissionId": { - "type": "string", - "description": "The unique identifier for the related transmission, if any.", - "format": "guid", - "nullable": true - }, - "deletedAt": { - "type": "string", - "description": "The date and time when the transmission was deleted, if applicable.", - "format": "date-time", - "nullable": true - }, - "type": { - "description": "The type of the transmission.", - "oneOf": [ - { - "$ref": "#/components/schemas/DialogsEntitiesTransmissions_DialogTransmissionType" - } - ] - }, - "sender": { - "description": "The sender actor information for the transmission.", - "oneOf": [ - { - "$ref": "#/components/schemas/V1ServiceOwnerCommonActors_Actor" - } - ] - }, - "content": { - "description": "The content of the transmission.", - "oneOf": [ - { - "$ref": "#/components/schemas/V1ServiceOwnerDialogTransmissionsQueriesGet_Content" - } - ] - }, - "attachments": { - "type": "array", - "description": "The attachments associated with the transmission.", - "items": { - "$ref": "#/components/schemas/V1ServiceOwnerDialogTransmissionsQueriesGet_Attachment" - } - } - } - }, - "ProblemDetails": { - "type": "object", - "additionalProperties": false, - "properties": { - "type": { - "type": "string", - "default": "https://www.rfc-editor.org/rfc/rfc7231#section-6.5.1" - }, - "title": { - "type": "string", - "default": "One or more validation errors occurred." - }, - "status": { - "type": "integer", - "format": "int32", - "default": 400 - }, - "instance": { - "type": "string", - "default": "/api/route" - }, - "traceId": { - "type": "string", - "default": "0HMPNHL0JHL76:00000001" - }, - "detail": { - "type": "string", - "nullable": true - }, - "errors": { - "type": "array", - "items": { - "$ref": "#/components/schemas/ProblemDetails_Error" - } - } - } - }, - "ProblemDetails_Error": { - "type": "object", - "additionalProperties": false, - "properties": { - "name": { - "type": "string", - "default": "Error or field name" - }, - "reason": { - "type": "string", - "default": "Error reason" - }, - "code": { - "type": "string", - "nullable": true - }, - "severity": { - "type": "string", - "nullable": true - } - } - }, - "V1ServiceOwnerDialogTransmissionsQueriesGet_Content": { - "type": "object", - "additionalProperties": false, - "properties": { - "title": { - "description": "The title of the content.", - "oneOf": [ - { - "$ref": "#/components/schemas/V1CommonContent_ContentValue" - } - ] - }, - "summary": { - "description": "The summary of the content.", - "oneOf": [ - { - "$ref": "#/components/schemas/V1CommonContent_ContentValue" - } - ] - }, - "contentReference": { - "description": "Front-channel embedded content. Used to dynamically embed content in the frontend from an external URL.\nAllowed media types: application/vnd.dialogporten.frontchannelembed+json;type=markdown", - "nullable": true, - "oneOf": [ - { - "$ref": "#/components/schemas/V1CommonContent_ContentValue" - } - ] - } - } - }, - "V1ServiceOwnerDialogTransmissionsQueriesGet_Attachment": { - "type": "object", - "additionalProperties": false, - "properties": { - "id": { - "type": "string", - "description": "The unique identifier for the attachment in UUIDv7 format.", - "format": "guid" - }, - "displayName": { - "type": "array", - "description": "The display name of the attachment that should be used in GUIs.", - "items": { - "$ref": "#/components/schemas/V1CommonLocalizations_Localization" - } - }, - "urls": { - "type": "array", - "description": "The URLs associated with the attachment, each referring to a different representation of the attachment.", - "items": { - "$ref": "#/components/schemas/V1ServiceOwnerDialogTransmissionsQueriesGet_AttachmentUrl" - } - } - } - }, - "V1ServiceOwnerDialogTransmissionsQueriesGet_AttachmentUrl": { - "type": "object", - "additionalProperties": false, - "properties": { - "id": { - "type": "string", - "description": "The unique identifier for the attachment URL in UUIDv7 format.", - "format": "guid" - }, - "url": { - "type": "string", - "description": "The fully qualified URL of the attachment. Will be set to \"urn:dialogporten:unauthorized\" if the user is\nnot authorized to access the transmission.", - "format": "uri", - "example": "https://someendpoint.com/someattachment.pdf\nurn:dialogporten:unauthorized" - }, - "mediaType": { - "type": "string", - "description": "The media type of the attachment.", - "nullable": true, - "example": "application/pdf\napplication/zip" - }, - "consumerType": { - "description": "The type of consumer the URL is intended for.", - "oneOf": [ - { - "$ref": "#/components/schemas/Attachments_AttachmentUrlConsumerType" - } - ] - } - } - }, - "V1ServiceOwnerDialogTransmissionsCreate_TransmissionRequest": { - "type": "object", - "additionalProperties": false, - "properties": { - "id": { - "type": "string", - "description": "The UUDIv7 of the action may be provided to support idempotent additions to the list of transmissions.\nIf not supplied, a new UUIDv7 will be generated.", - "format": "guid", - "nullable": true, - "example": "01913cd5-784f-7d3b-abef-4c77b1f0972d" - }, - "createdAt": { - "type": "string", - "description": "If supplied, overrides the creating date and time for the transmission.\nIf not supplied, the current date /time will be used.", - "format": "date-time" - }, - "authorizationAttribute": { - "type": "string", - "description": "Contains an authorization resource attributeId, that can used in custom authorization rules in the XACML service\npolicy, which by default is the policy belonging to the service referred to by \"serviceResource\" in the dialog.\n \nCan also be used to refer to other service policies.", - "nullable": true, - "example": "mycustomresource\n/* equivalent to the above */\nurn:altinn:subresource:mycustomresource\nurn:altinn:task:Task_1\n/* refer to another service */\nurn:altinn:resource:some-other-service-identifier" - }, - "extendedType": { - "type": "string", - "description": "Arbitrary URI/URN describing a service-specific transmission type.\n \nRefer to the service-specific documentation provided by the service owner for details (if in use).", - "format": "uri", - "nullable": true - }, - "relatedTransmissionId": { - "type": "string", - "description": "Reference to any other transmission that this transmission is related to.", - "format": "guid", - "nullable": true - }, - "type": { - "description": "The type of transmission.", - "oneOf": [ - { - "$ref": "#/components/schemas/DialogsEntitiesTransmissions_DialogTransmissionType" - } - ] - }, - "sender": { - "description": "The actor that sent the transmission.", - "oneOf": [ - { - "$ref": "#/components/schemas/V1ServiceOwnerCommonActors_Actor" - } - ] - }, - "content": { - "description": "The transmission unstructured text content.", - "oneOf": [ - { - "$ref": "#/components/schemas/V1ServiceOwnerDialogsCommandsUpdate_TransmissionContent" - } - ] - }, - "attachments": { - "type": "array", - "description": "The transmission-level attachments.", - "items": { - "$ref": "#/components/schemas/V1ServiceOwnerDialogsCommandsUpdate_TransmissionAttachment" - } - } - } - }, - "V1ServiceOwnerDialogsCommandsUpdate_TransmissionContent": { - "type": "object", - "additionalProperties": false, - "properties": { - "title": { - "description": "The transmission title. Must be text/plain.", - "oneOf": [ - { - "$ref": "#/components/schemas/V1CommonContent_ContentValue" - } - ] - }, - "summary": { - "description": "The transmission summary.", - "oneOf": [ - { - "$ref": "#/components/schemas/V1CommonContent_ContentValue" - } - ] - }, - "contentReference": { - "description": "Front-channel embedded content. Used to dynamically embed content in the frontend from an external URL. Must be HTTPS.\nAllowed media types: application/vnd.dialogporten.frontchannelembed+json;type=markdown", - "nullable": true, - "oneOf": [ - { - "$ref": "#/components/schemas/V1CommonContent_ContentValue" - } - ] - } - } - }, - "V1ServiceOwnerDialogsCommandsUpdate_TransmissionAttachment": { - "type": "object", - "additionalProperties": false, - "properties": { - "id": { - "type": "string", - "description": "A self-defined UUIDv7 may be provided to support idempotent additions of transmission attachments. If not provided, a new UUIDv7 will be generated.", - "format": "guid", - "nullable": true, - "example": "01913cd5-784f-7d3b-abef-4c77b1f0972d" - }, - "displayName": { - "type": "array", - "description": "The display name of the attachment that should be used in GUIs.", - "items": { - "$ref": "#/components/schemas/V1CommonLocalizations_Localization" - } - }, - "urls": { - "type": "array", - "description": "The URLs associated with the attachment, each referring to a different representation of the attachment.", - "items": { - "$ref": "#/components/schemas/V1ServiceOwnerDialogsCommandsUpdate_TransmissionAttachmentUrl" - } - } - } - }, - "V1ServiceOwnerDialogsCommandsUpdate_TransmissionAttachmentUrl": { - "type": "object", - "additionalProperties": false, - "properties": { - "url": { - "type": "string", - "description": "The fully qualified URL of the attachment.", - "format": "uri" - }, - "mediaType": { - "type": "string", - "description": "The media type of the attachment.", - "nullable": true, - "example": "application/pdf\napplication/zip" - }, - "consumerType": { - "description": "The type of consumer the URL is intended for.", - "oneOf": [ - { - "$ref": "#/components/schemas/Attachments_AttachmentUrlConsumerType" - } - ] - } - } - }, - "V1ServiceOwnerDialogSeenLogsQueriesSearch_SeenLog": { - "type": "object", - "additionalProperties": false, - "properties": { - "id": { - "type": "string", - "format": "guid" - }, - "seenAt": { - "type": "string", - "format": "date-time" - }, - "seenBy": { - "$ref": "#/components/schemas/V1ServiceOwnerCommonActors_Actor" - }, - "isViaServiceOwner": { - "type": "boolean", - "nullable": true - } - } - }, - "V1ServiceOwnerDialogSeenLogsQueriesGet_SeenLog": { - "type": "object", - "additionalProperties": false, - "properties": { - "id": { - "type": "string", - "format": "guid" - }, - "seenAt": { - "type": "string", - "format": "date-time" - }, - "seenBy": { - "$ref": "#/components/schemas/V1ServiceOwnerCommonActors_Actor" - }, - "isViaServiceOwner": { - "type": "boolean", - "nullable": true - } - } - }, - "V1ServiceOwnerDialogsUpdate_DialogRequest": { - "type": "object", - "additionalProperties": false, - "properties": { - "dto": { - "$ref": "#/components/schemas/V1ServiceOwnerDialogsCommandsUpdate_Dialog" - } - } - }, - "V1ServiceOwnerDialogsCommandsUpdate_Dialog": { - "type": "object", - "additionalProperties": false, - "properties": { - "progress": { - "type": "integer", - "description": "Advisory indicator of progress, represented as 1-100 percentage value. 100% representing a dialog that has come\nto a natural completion (successful or not).", - "format": "int32", - "nullable": true - }, - "extendedStatus": { - "type": "string", - "description": "Arbitrary string with a service-specific indicator of status, typically used to indicate a fine-grained state of\nthe dialog to further specify the \"status\" enum.", - "nullable": true - }, - "externalReference": { - "type": "string", - "description": "Arbitrary string with a service-specific reference to an external system or service.", - "nullable": true - }, - "visibleFrom": { - "type": "string", - "description": "The timestamp when the dialog should be made visible for authorized end users. If not provided, the dialog will be\nimmediately available.", - "format": "date-time", - "nullable": true, - "example": "2022-12-31T23:59:59Z" - }, - "dueAt": { - "type": "string", - "description": "The due date for the dialog. Dialogs past due date might be marked as such in frontends but will still be available.", - "format": "date-time", - "nullable": true, - "example": "2022-12-31T23:59:59Z" - }, - "expiresAt": { - "type": "string", - "description": "The expiration date for the dialog. This is the last date when the dialog is available for the end user.\n \nAfter this date is passed, the dialog will be considered expired and no longer available for the end user in any\nAPI. If not supplied, the dialog will be considered to never expire. This field can be changed after creation.", - "format": "date-time", - "nullable": true, - "example": "2022-12-31T23:59:59Z" - }, - "status": { - "description": "The aggregated status of the dialog.", - "oneOf": [ - { - "$ref": "#/components/schemas/DialogsEntities_DialogStatus" - } - ] - }, - "content": { - "description": "The dialog unstructured text content.", - "oneOf": [ - { - "$ref": "#/components/schemas/V1ServiceOwnerDialogsCommandsUpdate_Content" - } - ] - }, - "searchTags": { - "type": "array", - "description": "A list of words (tags) that will be used in dialog search queries. Not visible in end-user DTO.", - "items": { - "$ref": "#/components/schemas/V1ServiceOwnerDialogsCommandsUpdate_SearchTag" - } - }, - "attachments": { - "type": "array", - "description": "The attachments associated with the dialog (on an aggregate level).", - "items": { - "$ref": "#/components/schemas/V1ServiceOwnerDialogsCommandsUpdate_Attachment" - } - }, - "transmissions": { - "type": "array", - "description": "The immutable list of transmissions associated with the dialog. When updating via PUT, any transmissions\nadded here will be appended to the existing list of transmissions.", - "items": { - "$ref": "#/components/schemas/V1ServiceOwnerDialogsCommandsUpdate_Transmission" - } - }, - "guiActions": { - "type": "array", - "description": "The GUI actions associated with the dialog. Should be used in browser-based interactive frontends.", - "items": { - "$ref": "#/components/schemas/V1ServiceOwnerDialogsCommandsUpdate_GuiAction" - } - }, - "apiActions": { - "type": "array", - "description": "The API actions associated with the dialog. Should be used in specialized, non-browser-based integrations.", - "items": { - "$ref": "#/components/schemas/V1ServiceOwnerDialogsCommandsUpdate_ApiAction" - } - }, - "activities": { - "type": "array", - "description": "An immutable list of activities associated with the dialog. When updating via PUT, any activities added here\nwill be appended to the existing list of activities.", - "items": { - "$ref": "#/components/schemas/V1ServiceOwnerDialogsCommandsUpdate_Activity" - } - } - } - }, - "DialogsEntities_DialogStatus": { - "type": "string", - "description": "", - "x-enumNames": [ - "New", - "InProgress", - "Draft", - "Sent", - "RequiresAttention", - "Completed" - ], - "enum": [ - "New", - "InProgress", - "Draft", - "Sent", - "RequiresAttention", - "Completed" - ] - }, - "V1ServiceOwnerDialogsCommandsUpdate_Content": { - "type": "object", - "additionalProperties": false, - "properties": { - "title": { - "description": "The title of the dialog. Must be text/plain.", - "oneOf": [ - { - "$ref": "#/components/schemas/V1CommonContent_ContentValue" - } - ] - }, - "summary": { - "description": "A short summary of the dialog and its current state. Must be text/plain.", - "oneOf": [ - { - "$ref": "#/components/schemas/V1CommonContent_ContentValue" - } - ] - }, - "senderName": { - "description": "Overridden sender name. If not supplied, assume \"org\" as the sender name. Must be text/plain if supplied.", - "nullable": true, - "oneOf": [ - { - "$ref": "#/components/schemas/V1CommonContent_ContentValue" - } - ] - }, - "additionalInfo": { - "description": "Additional information about the dialog, this may contain Markdown.", - "nullable": true, - "oneOf": [ - { - "$ref": "#/components/schemas/V1CommonContent_ContentValue" - } - ] - }, - "extendedStatus": { - "description": "Used as the human-readable label used to describe the \"ExtendedStatus\" field. Must be text/plain.", - "nullable": true, - "oneOf": [ - { - "$ref": "#/components/schemas/V1CommonContent_ContentValue" - } - ] - }, - "mainContentReference": { - "description": "Front-channel embedded content. Used to dynamically embed content in the frontend from an external URL. Must be HTTPS.", - "nullable": true, - "oneOf": [ - { - "$ref": "#/components/schemas/V1CommonContent_ContentValue" - } - ] - } - } - }, - "V1ServiceOwnerDialogsCommandsUpdate_SearchTag": { - "type": "object", - "additionalProperties": false, - "properties": { - "value": { - "type": "string", - "description": "A search tag value." - } - } - }, - "V1ServiceOwnerDialogsCommandsUpdate_Attachment": { - "type": "object", - "additionalProperties": false, - "properties": { - "id": { - "type": "string", - "description": "A self-defined UUIDv7 may be provided to support idempotent additions of attachments. If not provided, a new UUIDv7 will be generated.", - "format": "guid", - "nullable": true, - "example": "01913cd5-784f-7d3b-abef-4c77b1f0972d" - }, - "displayName": { - "type": "array", - "description": "The display name of the attachment that should be used in GUIs.", - "items": { - "$ref": "#/components/schemas/V1CommonLocalizations_Localization" - } - }, - "urls": { - "type": "array", - "description": "The URLs associated with the attachment, each referring to a different representation of the attachment.", - "items": { - "$ref": "#/components/schemas/V1ServiceOwnerDialogsCommandsUpdate_AttachmentUrl" - } - } - } - }, - "V1ServiceOwnerDialogsCommandsUpdate_AttachmentUrl": { - "type": "object", - "additionalProperties": false, - "properties": { - "id": { - "type": "string", - "description": "A UUIDv7 used for merging existing data, unknown IDs will be ignored as this entity does not support user-defined IDs.", - "format": "guid", - "nullable": true, - "example": "01913cd5-784f-7d3b-abef-4c77b1f0972d" - }, - "url": { - "type": "string", - "description": "The fully qualified URL of the attachment.", - "format": "uri" - }, - "mediaType": { - "type": "string", - "description": "The media type of the attachment.", - "nullable": true, - "example": "application/pdf\napplication/zip" - }, - "consumerType": { - "description": "The type of consumer the URL is intended for.", - "oneOf": [ - { - "$ref": "#/components/schemas/Attachments_AttachmentUrlConsumerType" - } - ] - } - } - }, - "V1ServiceOwnerDialogsCommandsUpdate_Transmission": { - "type": "object", - "additionalProperties": false, - "properties": { - "id": { - "type": "string", - "description": "The UUDIv7 of the action may be provided to support idempotent additions to the list of transmissions.\nIf not supplied, a new UUIDv7 will be generated.", - "format": "guid", - "nullable": true, - "example": "01913cd5-784f-7d3b-abef-4c77b1f0972d" - }, - "createdAt": { - "type": "string", - "description": "If supplied, overrides the creating date and time for the transmission.\nIf not supplied, the current date /time will be used.", - "format": "date-time" - }, - "authorizationAttribute": { - "type": "string", - "description": "Contains an authorization resource attributeId, that can used in custom authorization rules in the XACML service\npolicy, which by default is the policy belonging to the service referred to by \"serviceResource\" in the dialog.\n \nCan also be used to refer to other service policies.", - "nullable": true, - "example": "mycustomresource\n/* equivalent to the above */\nurn:altinn:subresource:mycustomresource\nurn:altinn:task:Task_1\n/* refer to another service */\nurn:altinn:resource:some-other-service-identifier" - }, - "extendedType": { - "type": "string", - "description": "Arbitrary URI/URN describing a service-specific transmission type.\n \nRefer to the service-specific documentation provided by the service owner for details (if in use).", - "format": "uri", - "nullable": true - }, - "relatedTransmissionId": { - "type": "string", - "description": "Reference to any other transmission that this transmission is related to.", - "format": "guid", - "nullable": true - }, - "type": { - "description": "The type of transmission.", - "oneOf": [ - { - "$ref": "#/components/schemas/DialogsEntitiesTransmissions_DialogTransmissionType" - } - ] - }, - "sender": { - "description": "The actor that sent the transmission.", - "oneOf": [ - { - "$ref": "#/components/schemas/V1ServiceOwnerCommonActors_Actor" - } - ] - }, - "content": { - "description": "The transmission unstructured text content.", - "oneOf": [ - { - "$ref": "#/components/schemas/V1ServiceOwnerDialogsCommandsUpdate_TransmissionContent" - } - ] - }, - "attachments": { - "type": "array", - "description": "The transmission-level attachments.", - "items": { - "$ref": "#/components/schemas/V1ServiceOwnerDialogsCommandsUpdate_TransmissionAttachment" - } - } - } - }, - "V1ServiceOwnerDialogsCommandsUpdate_GuiAction": { - "type": "object", - "additionalProperties": false, - "properties": { - "id": { - "type": "string", - "description": "A self-defined UUIDv7 may be provided to support idempotent additions of Gui Actions. If not provided, a new UUIDv7 will be generated.", - "format": "guid", - "nullable": true, - "example": "01913cd5-784f-7d3b-abef-4c77b1f0972d" - }, - "action": { - "type": "string", - "description": "The action identifier for the action, corresponding to the \"action\" attributeId used in the XACML service policy." - }, - "url": { - "type": "string", - "description": "The fully qualified URL of the action, to which the user will be redirected when the action is triggered. Will be set to\n\"urn:dialogporten:unauthorized\" if the user is not authorized to perform the action.", - "format": "uri", - "example": "urn:dialogporten:unauthorized\nhttps://someendpoint.com/gui/some-service-instance-id" - }, - "authorizationAttribute": { - "type": "string", - "description": "Contains an authorization resource attributeId, that can used in custom authorization rules in the XACML service\npolicy, which by default is the policy belonging to the service referred to by \"serviceResource\" in the dialog.\n \nCan also be used to refer to other service policies.", - "nullable": true, - "example": "mycustomresource\n/* equivalent to the above */\nurn:altinn:subresource:mycustomresource\nurn:altinn:task:Task_1\n/* refer to another service */\nurn:altinn:resource:some-other-service-identifier" - }, - "isDeleteDialogAction": { - "type": "boolean", - "description": "Indicates whether the action results in the dialog being deleted. Used by frontends to implement custom UX\nfor delete actions." - }, - "httpMethod": { - "description": "The HTTP method that the frontend should use when redirecting the user.", - "nullable": true, - "oneOf": [ - { - "$ref": "#/components/schemas/Http_HttpVerb" - } - ] - }, - "priority": { - "description": "Indicates a priority for the action, making it possible for frontends to adapt GUI elements based on action\npriority.", - "oneOf": [ - { - "$ref": "#/components/schemas/DialogsEntitiesActions_DialogGuiActionPriority" - } - ] - }, - "title": { - "type": "array", - "description": "The title of the action, this should be short and in verb form. Must be text/plain.", - "items": { - "$ref": "#/components/schemas/V1CommonLocalizations_Localization" - } - }, - "prompt": { - "type": "array", - "description": "If there should be a prompt asking the user for confirmation before the action is executed,\nthis field should contain the prompt text.", - "nullable": true, - "items": { - "$ref": "#/components/schemas/V1CommonLocalizations_Localization" - } - } - } - }, - "Http_HttpVerb": { - "type": "string", - "description": "", - "x-enumNames": [ - "GET", - "POST", - "PUT", - "PATCH", - "DELETE", - "HEAD", - "OPTIONS", - "TRACE", - "CONNECT" - ], - "enum": [ - "GET", - "POST", - "PUT", - "PATCH", - "DELETE", - "HEAD", - "OPTIONS", - "TRACE", - "CONNECT" - ] - }, - "DialogsEntitiesActions_DialogGuiActionPriority": { - "type": "string", - "description": "", - "x-enumNames": [ - "Primary", - "Secondary", - "Tertiary" - ], - "enum": [ - "Primary", - "Secondary", - "Tertiary" - ] - }, - "V1ServiceOwnerDialogsCommandsUpdate_ApiAction": { - "type": "object", - "additionalProperties": false, - "properties": { - "id": { - "type": "string", - "description": "A self-defined UUIDv7 may be provided to support idempotent additions of Api Actions. If not provided, a new UUIDv7 will be generated.", - "format": "guid", - "nullable": true, - "example": "01913cd5-784f-7d3b-abef-4c77b1f0972d" - }, - "action": { - "type": "string", - "description": "String identifier for the action, corresponding to the \"action\" attributeId used in the XACML service policy,\nwhich by default is the policy belonging to the service referred to by \"serviceResource\" in the dialog.", - "example": "write" - }, - "authorizationAttribute": { - "type": "string", - "description": "Contains an authorization resource attributeId, that can used in custom authorization rules in the XACML service\npolicy, which by default is the policy belonging to the service referred to by \"serviceResource\" in the dialog.\n \nCan also be used to refer to other service policies.", - "nullable": true, - "example": "mycustomresource\n/* equivalent to the above */\nurn:altinn:subresource:mycustomresource\nurn:altinn:task:Task_1\n/* refer to another service */\nurn:altinn:resource:some-other-service-identifier" - }, - "endpoints": { - "type": "array", - "description": "The endpoints associated with the action.", - "items": { - "$ref": "#/components/schemas/V1ServiceOwnerDialogsCommandsUpdate_ApiActionEndpoint" - } - } - } - }, - "V1ServiceOwnerDialogsCommandsUpdate_ApiActionEndpoint": { - "type": "object", - "additionalProperties": false, - "properties": { - "id": { - "type": "string", - "description": "A UUIDv7 used for merging existing data, unknown IDs will be ignored as this entity does not support user-defined IDs.", - "format": "guid", - "nullable": true, - "example": "01913cd5-784f-7d3b-abef-4c77b1f0972d" - }, - "version": { - "type": "string", - "description": "Arbitrary string indicating the version of the endpoint.", - "nullable": true - }, - "url": { - "type": "string", - "description": "The fully qualified URL of the API endpoint.", - "format": "uri" - }, - "httpMethod": { - "description": "The HTTP method that the endpoint expects for this action.", - "oneOf": [ - { - "$ref": "#/components/schemas/Http_HttpVerb" - } - ] - }, - "documentationUrl": { - "type": "string", - "description": "Link to documentation for the endpoint, providing documentation for integrators. Should be a URL to a\nhuman-readable page.", - "format": "uri", - "nullable": true - }, - "requestSchema": { - "type": "string", - "description": "Link to the request schema for the endpoint. Used to provide documentation for integrators.\nDialogporten will not validate information on this endpoint.", - "format": "uri", - "nullable": true - }, - "responseSchema": { - "type": "string", - "description": "Link to the response schema for the endpoint. Used to provide documentation for integrators.\nDialogporten will not validate information on this endpoint.", - "format": "uri", - "nullable": true - }, - "deprecated": { - "type": "boolean", - "description": "Boolean indicating if the endpoint is deprecated." - }, - "sunsetAt": { - "type": "string", - "description": "Date and time when the endpoint will no longer function. Only set if the endpoint is deprecated. Dialogporten\nwill not enforce this date.", - "format": "date-time", - "nullable": true - } - } - }, - "V1ServiceOwnerDialogsCommandsUpdate_Activity": { - "type": "object", - "additionalProperties": false, - "properties": { - "id": { - "type": "string", - "description": "The UUDIv7 of the action may be provided to support idempotent additions to the list of activities.\nIf not supplied, a new UUIDv7 will be generated.", - "format": "guid", - "nullable": true, - "example": "01913cd5-784f-7d3b-abef-4c77b1f0972d" - }, - "createdAt": { - "type": "string", - "description": "If supplied, overrides the creating date and time for the transmission.\nIf not supplied, the current date /time will be used.", - "format": "date-time", - "nullable": true - }, - "extendedType": { - "type": "string", - "description": "Arbitrary URI/URN describing a service-specific transmission type.", - "format": "uri", - "nullable": true - }, - "type": { - "description": "The type of transmission.", - "oneOf": [ - { - "$ref": "#/components/schemas/DialogsEntitiesActivities_DialogActivityType" - } - ] - }, - "transmissionId": { - "type": "string", - "description": "If the activity is related to a particular transmission, this field will contain the transmission identifier.\nMust be present in the request body.", - "format": "guid", - "nullable": true - }, - "performedBy": { - "description": "The actor that performed the activity.", - "oneOf": [ - { - "$ref": "#/components/schemas/V1ServiceOwnerCommonActors_Actor" - } - ] - }, - "description": { - "type": "array", - "description": "Unstructured text describing the activity. Only set if the activity type is \"Information\".", - "items": { - "$ref": "#/components/schemas/V1CommonLocalizations_Localization" - } - } - } - }, - "DialogsEntitiesActivities_DialogActivityType": { - "type": "string", - "description": "", - "x-enumNames": [ - "DialogCreated", - "DialogClosed", - "Information", - "TransmissionOpened", - "PaymentMade", - "SignatureProvided", - "DialogOpened", - "DialogDeleted", - "DialogRestored", - "SentToSigning", - "SentToFormFill", - "SentToSendIn", - "SentToPayment" - ], - "enum": [ - "DialogCreated", - "DialogClosed", - "Information", - "TransmissionOpened", - "PaymentMade", - "SignatureProvided", - "DialogOpened", - "DialogDeleted", - "DialogRestored", - "SentToSigning", - "SentToFormFill", - "SentToSendIn", - "SentToPayment" - ] - }, - "PaginatedListOfV1ServiceOwnerDialogsQueriesSearch_Dialog": { - "type": "object", - "additionalProperties": false, - "properties": { - "items": { - "type": "array", - "description": "The paginated list of items", - "items": { - "$ref": "#/components/schemas/V1ServiceOwnerDialogsQueriesSearch_Dialog" - } - }, - "hasNextPage": { - "type": "boolean", - "description": "Whether there are more items available that can be fetched by supplying the continuation token" - }, - "continuationToken": { - "type": "string", - "description": "The continuation token to be used to fetch the next page of items", - "nullable": true, - "example": "createdat_2024-07-31T09:09:03.0257090Z,id_0c089101-b7cf-a476-955c-f00a78d74a4e" - }, - "orderBy": { - "type": "string", - "description": "The current sorting order of the items", - "example": "createdat_desc,id_desc" - } - } - }, - "V1ServiceOwnerDialogsQueriesSearch_Dialog": { - "type": "object", - "additionalProperties": false, - "properties": { - "id": { - "type": "string", - "description": "The unique identifier for the dialog in UUIDv7 format.", - "format": "guid", - "example": "01913cd5-784f-7d3b-abef-4c77b1f0972d" - }, - "org": { - "type": "string", - "description": "The service owner code representing the organization (service owner) related to this dialog.", - "example": "ske" - }, - "revision": { - "type": "string", - "description": "The unique identifier for the revision in UUIDv4 format.", - "format": "guid", - "example": "a312cb9c-7632-43c2-aa38-69b06aed56ca" - }, - "serviceResource": { - "type": "string", - "description": "The service identifier for the service that the dialog is related to in URN-format.\nThis corresponds to a service resource in the Altinn Resource Registry.", - "example": "urn:altinn:resource:some-service-identifier" - }, - "serviceResourceType": { - "type": "string", - "description": "The ServiceResource type, as defined in Altinn Resource Registry (see ResourceType)." - }, - "party": { - "type": "string", - "description": "The party code representing the organization or person that the dialog belongs to in URN format.", - "example": "urn:altinn:person:identifier-no:01125512345\nurn:altinn:organization:identifier-no:912345678" - }, - "progress": { - "type": "integer", - "description": "Advisory indicator of progress, represented as 1-100 percentage value. 100% representing a dialog that has come\nto a natural completion (successful or not).", - "format": "int32", - "nullable": true - }, - "process": { - "type": "string", - "description": "Optional process identifier used to indicate a business process this dialog belongs to.", - "nullable": true - }, - "precedingProcess": { - "type": "string", - "description": "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.", - "nullable": true - }, - "guiAttachmentCount": { - "type": "integer", - "description": "The number of attachments in the dialog made available for browser-based frontends.", - "format": "int32", - "nullable": true - }, - "extendedStatus": { - "type": "string", - "description": "Arbitrary string with a service-specific indicator of status, typically used to indicate a fine-grained state of\nthe dialog to further specify the \"status\" enum.\n \nRefer to the service-specific documentation provided by the service owner for details on the possible values (if\nin use).", - "nullable": true - }, - "externalReference": { - "type": "string", - "description": "Arbitrary string with a service-specific reference to an external system or service.\n \nRefer to the service-specific documentation provided by the service owner for details (if in use).", - "nullable": true - }, - "createdAt": { - "type": "string", - "description": "The date and time when the dialog was created.", - "format": "date-time", - "example": "2022-12-31T23:59:59Z" - }, - "updatedAt": { - "type": "string", - "description": "The date and time when the dialog was last updated.", - "format": "date-time", - "example": "2022-12-31T23:59:59Z" - }, - "dueAt": { - "type": "string", - "description": "The due date for the dialog. This is the last date when the dialog is expected to be completed.", - "format": "date-time", - "nullable": true, - "example": "2022-12-31T23:59:59Z" - }, - "visibleFrom": { - "type": "string", - "description": "The timestamp when the dialog will be made visible for authorized end users.", - "format": "date-time", - "nullable": true - }, - "status": { - "description": "The aggregated status of the dialog.", - "oneOf": [ - { - "$ref": "#/components/schemas/DialogsEntities_DialogStatus" - } - ] - }, - "systemLabel": { - "description": "Current display state.", - "oneOf": [ - { - "$ref": "#/components/schemas/DialogEndUserContextsEntities_SystemLabel" - } - ] - }, - "latestActivity": { - "description": "The latest entry in the dialog's activity log.", - "nullable": true, - "oneOf": [ - { - "$ref": "#/components/schemas/V1ServiceOwnerDialogsQueriesSearch_DialogActivity" - } - ] - }, - "seenSinceLastUpdate": { - "type": "array", - "description": "The list of seen log entries for the dialog newer than the dialog ChangedAt date.", - "items": { - "$ref": "#/components/schemas/V1ServiceOwnerDialogsQueriesSearch_DialogSeenLog" - } - }, - "content": { - "description": "The content of the dialog in search results.", - "oneOf": [ - { - "$ref": "#/components/schemas/V1ServiceOwnerDialogsQueriesSearch_Content" - } - ] - } - } - }, - "DialogEndUserContextsEntities_SystemLabel": { - "type": "string", - "description": "", - "x-enumNames": [ - "Default", - "Bin", - "Archive" - ], - "enum": [ - "Default", - "Bin", - "Archive" - ] - }, - "V1ServiceOwnerDialogsQueriesSearch_DialogActivity": { - "type": "object", - "additionalProperties": false, - "properties": { - "id": { - "type": "string", - "description": "The unique identifier for the activity in UUIDv7 format.", - "format": "guid" - }, - "createdAt": { - "type": "string", - "description": "The date and time when the activity was created.", - "format": "date-time", - "nullable": true - }, - "extendedType": { - "type": "string", - "description": "An arbitrary string with a service-specific activity type.\n \nConsult the service-specific documentation provided by the service owner for details (if in use).", - "format": "uri", - "nullable": true - }, - "type": { - "description": "The type of activity.", - "oneOf": [ - { - "$ref": "#/components/schemas/DialogsEntitiesActivities_DialogActivityType" - } - ] - }, - "transmissionId": { - "type": "string", - "description": "If the activity is related to a particular transmission, this field will contain the transmission identifier.", - "format": "guid", - "nullable": true - }, - "performedBy": { - "description": "The actor that performed the activity.", - "oneOf": [ - { - "$ref": "#/components/schemas/V1ServiceOwnerCommonActors_Actor" - } - ] - }, - "description": { - "type": "array", - "description": "Unstructured text describing the activity. Only set if the activity type is \"Information\".", - "items": { - "$ref": "#/components/schemas/V1CommonLocalizations_Localization" - } - } - } - }, - "V1ServiceOwnerDialogsQueriesSearch_DialogSeenLog": { - "type": "object", - "additionalProperties": false, - "properties": { - "id": { - "type": "string", - "description": "The unique identifier for the seen log entry in UUIDv7 format.", - "format": "guid" - }, - "seenAt": { - "type": "string", - "description": "The timestamp when the dialog revision was seen.", - "format": "date-time" - }, - "seenBy": { - "description": "The actor that saw the dialog revision.", - "oneOf": [ - { - "$ref": "#/components/schemas/V1ServiceOwnerCommonActors_Actor" - } - ] - }, - "isViaServiceOwner": { - "type": "boolean", - "description": "Flag indicating whether the seen log entry was created via the service owner.\n \nThis is used when the service owner uses the service owner API to implement its own frontend.", - "nullable": true - }, - "isCurrentEndUser": { - "type": "boolean", - "description": "Flag indicating whether the seen log entry was created by the end user supplied in the query." - } - } - }, - "V1ServiceOwnerDialogsQueriesSearch_Content": { - "type": "object", - "additionalProperties": false, - "properties": { - "title": { - "description": "The title of the dialog.", - "oneOf": [ - { - "$ref": "#/components/schemas/V1CommonContent_ContentValue" - } - ] - }, - "summary": { - "description": "A short summary of the dialog and its current state.", - "oneOf": [ - { - "$ref": "#/components/schemas/V1CommonContent_ContentValue" - } - ] - }, - "senderName": { - "description": "Overridden sender name. If not supplied, assume \"org\" as the sender name.", - "nullable": true, - "oneOf": [ - { - "$ref": "#/components/schemas/V1CommonContent_ContentValue" - } - ] - }, - "extendedStatus": { - "description": "Used as the human-readable label used to describe the \"ExtendedStatus\" field.", - "nullable": true, - "oneOf": [ - { - "$ref": "#/components/schemas/V1CommonContent_ContentValue" - } - ] - } - } - }, - "V1ServiceOwnerDialogsQueriesGet_Dialog": { - "type": "object", - "additionalProperties": false, - "properties": { - "id": { - "type": "string", - "description": "The unique identifier for the dialog in UUIDv7 format.", - "format": "guid", - "example": "01913cd5-784f-7d3b-abef-4c77b1f0972d" - }, - "revision": { - "type": "string", - "description": "The unique identifier for the revision in UUIDv4 format.", - "format": "guid", - "example": "a312cb9c-7632-43c2-aa38-69b06aed56ca" - }, - "org": { - "type": "string", - "description": "The service owner code representing the organization (service owner) related to this dialog.", - "example": "ske" - }, - "serviceResource": { - "type": "string", - "description": "The service identifier for the service that the dialog is related to in URN-format.\nThis corresponds to a service resource in the Altinn Resource Registry.", - "example": "urn:altinn:resource:some-service-identifier" - }, - "serviceResourceType": { - "type": "string", - "description": "The ServiceResource type, as defined in Altinn Resource Registry (see ResourceType)." - }, - "party": { - "type": "string", - "description": "The party code representing the organization or person that the dialog belongs to in URN format.", - "example": "urn:altinn:person:identifier-no:01125512345\nurn:altinn:organization:identifier-no:912345678" - }, - "progress": { - "type": "integer", - "description": "Advisory indicator of progress, represented as 1-100 percentage value. 100% representing a dialog that has come\nto a natural completion (successful or not).", - "format": "int32", - "nullable": true - }, - "process": { - "type": "string", - "description": "Optional process identifier used to indicate a business process this dialog belongs to.", - "nullable": true - }, - "precedingProcess": { - "type": "string", - "description": "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.", - "nullable": true - }, - "extendedStatus": { - "type": "string", - "description": "Arbitrary string with a service-specific indicator of status, typically used to indicate a fine-grained state of\nthe dialog to further specify the \"status\" enum.\n \nRefer to the service-specific documentation provided by the service owner for details on the possible values (if\nin use).", - "nullable": true - }, - "externalReference": { - "type": "string", - "description": "Arbitrary string with a service-specific reference to an external system or service.\n \nRefer to the service-specific documentation provided by the service owner for details (if in use).", - "nullable": true - }, - "deletedAt": { - "type": "string", - "description": "If deleted, the date and time when the deletion was performed.", - "format": "date-time", - "nullable": true - }, - "visibleFrom": { - "type": "string", - "description": "The timestamp when the dialog will be made visible for authorized end users.", - "format": "date-time", - "nullable": true, - "example": "2022-12-31T23:59:59Z" - }, - "dueAt": { - "type": "string", - "description": "The due date for the dialog. Dialogs past due date might be marked as such in frontends but will still be available.", - "format": "date-time", - "nullable": true, - "example": "2022-12-31T23:59:59Z" - }, - "expiresAt": { - "type": "string", - "description": "The expiration date for the dialog. This is the last date when the dialog is available for the end user.\n \nAfter this date is passed, the dialog will be considered expired and no longer available for the end user in any\nAPI. If not supplied, the dialog will be considered to never expire. This field can be changed by the service\nowner after the dialog has been created.", - "format": "date-time", - "nullable": true, - "example": "2022-12-31T23:59:59Z" - }, - "createdAt": { - "type": "string", - "description": "The date and time when the dialog was created.", - "format": "date-time", - "example": "2022-12-31T23:59:59Z" - }, - "updatedAt": { - "type": "string", - "description": "The date and time when the dialog was last updated.", - "format": "date-time", - "example": "2022-12-31T23:59:59Z" - }, - "status": { - "description": "The aggregated status of the dialog.", - "oneOf": [ - { - "$ref": "#/components/schemas/DialogsEntities_DialogStatus" - } - ] - }, - "systemLabel": { - "description": "Current display state.", - "oneOf": [ - { - "$ref": "#/components/schemas/DialogEndUserContextsEntities_SystemLabel" - } - ] - }, - "content": { - "description": "The dialog unstructured text content.", - "oneOf": [ - { - "$ref": "#/components/schemas/V1ServiceOwnerDialogsQueriesGet_Content" - } - ] - }, - "searchTags": { - "type": "array", - "description": "The list of words (tags) that will be used in dialog search queries. Not visible in end-user DTO.", - "nullable": true, - "items": { - "$ref": "#/components/schemas/V1ServiceOwnerDialogsQueriesGet_SearchTag" - } - }, - "attachments": { - "type": "array", - "description": "The attachments associated with the dialog (on an aggregate level).", - "items": { - "$ref": "#/components/schemas/V1ServiceOwnerDialogsQueriesGet_DialogAttachment" - } - }, - "transmissions": { - "type": "array", - "description": "The immutable list of transmissions associated with the dialog.", - "items": { - "$ref": "#/components/schemas/V1ServiceOwnerDialogsQueriesGet_DialogTransmission" - } - }, - "guiActions": { - "type": "array", - "description": "The GUI actions associated with the dialog. Should be used in browser-based interactive frontends.", - "items": { - "$ref": "#/components/schemas/V1ServiceOwnerDialogsQueriesGet_DialogGuiAction" - } - }, - "apiActions": { - "type": "array", - "description": "The API actions associated with the dialog. Should be used in specialized, non-browser-based integrations.", - "items": { - "$ref": "#/components/schemas/V1ServiceOwnerDialogsQueriesGet_DialogApiAction" - } - }, - "activities": { - "type": "array", - "description": "An immutable list of activities associated with the dialog.", - "items": { - "$ref": "#/components/schemas/V1ServiceOwnerDialogsQueriesGet_DialogActivity" - } - }, - "seenSinceLastUpdate": { - "type": "array", - "description": "The list of seen log entries for the dialog newer than the dialog ChangedAt date.", - "items": { - "$ref": "#/components/schemas/V1ServiceOwnerDialogsQueriesGet_DialogSeenLog" - } - } - } - }, - "OrderSetOfTOrderDefinitionAndTTarget": {}, - "ContinuationTokenSetOfTOrderDefinitionAndTTarget": {}, - "V1ServiceOwnerDialogsQueriesGet_Content": { - "type": "object", - "additionalProperties": false, - "properties": { - "title": { - "description": "The title of the dialog.", - "oneOf": [ - { - "$ref": "#/components/schemas/V1CommonContent_ContentValue" - } - ] - }, - "summary": { - "description": "A short summary of the dialog and its current state.", - "oneOf": [ - { - "$ref": "#/components/schemas/V1CommonContent_ContentValue" - } - ] - }, - "senderName": { - "description": "Overridden sender name. If not supplied, assume \"org\" as the sender name.", - "nullable": true, - "oneOf": [ - { - "$ref": "#/components/schemas/V1CommonContent_ContentValue" - } - ] - }, - "additionalInfo": { - "description": "Additional information about the dialog, this may contain Markdown.", - "nullable": true, - "oneOf": [ - { - "$ref": "#/components/schemas/V1CommonContent_ContentValue" - } - ] - }, - "extendedStatus": { - "description": "Used as the human-readable label used to describe the \"ExtendedStatus\" field.", - "nullable": true, - "oneOf": [ - { - "$ref": "#/components/schemas/V1CommonContent_ContentValue" - } - ] - }, - "mainContentReference": { - "description": "Front-channel embedded content. Used to dynamically embed content in the frontend from an external URL. Must be HTTPS.\nAllowed media types: application/vnd.dialogporten.frontchannelembed+json;type=markdown", - "nullable": true, - "oneOf": [ - { - "$ref": "#/components/schemas/V1CommonContent_ContentValue" - } - ] - } - } - }, - "V1ServiceOwnerDialogsQueriesGet_SearchTag": { - "type": "object", - "additionalProperties": false, - "properties": { - "value": { - "type": "string", - "description": "A search tag value." - } - } - }, - "V1ServiceOwnerDialogsQueriesGet_DialogAttachment": { - "type": "object", - "additionalProperties": false, - "properties": { - "id": { - "type": "string", - "description": "The unique identifier for the attachment in UUIDv7 format.", - "format": "guid" - }, - "displayName": { - "type": "array", - "description": "The display name of the attachment that should be used in GUIs.", - "items": { - "$ref": "#/components/schemas/V1CommonLocalizations_Localization" - } - }, - "urls": { - "type": "array", - "description": "The URLs associated with the attachment, each referring to a different representation of the attachment.", - "items": { - "$ref": "#/components/schemas/V1ServiceOwnerDialogsQueriesGet_DialogAttachmentUrl" - } - } - } - }, - "V1ServiceOwnerDialogsQueriesGet_DialogAttachmentUrl": { - "type": "object", - "additionalProperties": false, - "properties": { - "id": { - "type": "string", - "description": "The unique identifier for the attachment URL in UUIDv7 format.", - "format": "guid" - }, - "url": { - "type": "string", - "description": "The fully qualified URL of the attachment.", - "format": "uri", - "example": "https://someendpoint.com/someattachment.pdf" - }, - "mediaType": { - "type": "string", - "description": "The media type of the attachment.", - "nullable": true, - "example": "application/pdf\napplication/zip" - }, - "consumerType": { - "description": "What type of consumer the URL is intended for.", - "oneOf": [ - { - "$ref": "#/components/schemas/Attachments_AttachmentUrlConsumerType" - } - ] - } - } - }, - "V1ServiceOwnerDialogsQueriesGet_DialogTransmission": { - "type": "object", - "additionalProperties": false, - "properties": { - "id": { - "type": "string", - "description": "The unique identifier for the transmission in UUIDv7 format.", - "format": "guid" - }, - "createdAt": { - "type": "string", - "description": "The date and time when the transmission was created.", - "format": "date-time" - }, - "authorizationAttribute": { - "type": "string", - "description": "Contains an authorization resource attributeId, that can used in custom authorization rules in the XACML service\npolicy, which by default is the policy belonging to the service referred to by \"serviceResource\" in the dialog.\n \nCan also be used to refer to other service policies.", - "nullable": true, - "example": "mycustomresource\n/* equivalent to the above */\nurn:altinn:subresource:mycustomresource\nurn:altinn:task:Task_1\n/* refer to another service */\nurn:altinn:resource:some-other-service-identifier" - }, - "isAuthorized": { - "type": "boolean", - "description": "Flag indicating if the authenticated user supplied in the query is authorized for this transmission.", - "nullable": true - }, - "extendedType": { - "type": "string", - "description": "Arbitrary URI/URN describing a service-specific transmission type.\n \nRefer to the service-specific documentation provided by the service owner for details (if in use).", - "format": "uri", - "nullable": true - }, - "relatedTransmissionId": { - "type": "string", - "description": "Reference to any other transmission that this transmission is related to.", - "format": "guid", - "nullable": true - }, - "type": { - "description": "The type of transmission.", - "oneOf": [ - { - "$ref": "#/components/schemas/DialogsEntitiesTransmissions_DialogTransmissionType" - } - ] - }, - "sender": { - "description": "The actor that sent the transmission.", - "oneOf": [ - { - "$ref": "#/components/schemas/V1ServiceOwnerCommonActors_Actor" - } - ] - }, - "content": { - "description": "The transmission unstructured text content.", - "oneOf": [ - { - "$ref": "#/components/schemas/V1ServiceOwnerDialogsQueriesGet_DialogTransmissionContent" - } - ] - }, - "attachments": { - "type": "array", - "description": "The transmission-level attachments.", - "items": { - "$ref": "#/components/schemas/V1ServiceOwnerDialogsQueriesGet_DialogTransmissionAttachment" - } - } - } - }, - "V1ServiceOwnerDialogsQueriesGet_DialogTransmissionContent": { - "type": "object", - "additionalProperties": false, - "properties": { - "title": { - "description": "The transmission title.", - "oneOf": [ - { - "$ref": "#/components/schemas/V1CommonContent_ContentValue" - } - ] - }, - "summary": { - "description": "The transmission summary.", - "oneOf": [ - { - "$ref": "#/components/schemas/V1CommonContent_ContentValue" - } - ] - }, - "contentReference": { - "description": "Front-channel embedded content. Used to dynamically embed content in the frontend from an external URL. Must be HTTPS.\nAllowed media types: application/vnd.dialogporten.frontchannelembed+json;type=markdown", - "nullable": true, - "oneOf": [ - { - "$ref": "#/components/schemas/V1CommonContent_ContentValue" - } - ] - } - } - }, - "V1ServiceOwnerDialogsQueriesGet_DialogTransmissionAttachment": { - "type": "object", - "additionalProperties": false, - "properties": { - "id": { - "type": "string", - "description": "The unique identifier for the attachment in UUIDv7 format.", - "format": "guid" - }, - "displayName": { - "type": "array", - "description": "The display name of the attachment that should be used in GUIs.", - "items": { - "$ref": "#/components/schemas/V1CommonLocalizations_Localization" - } - }, - "urls": { - "type": "array", - "description": "The URLs associated with the attachment, each referring to a different representation of the attachment.", - "items": { - "$ref": "#/components/schemas/V1ServiceOwnerDialogsQueriesGet_DialogTransmissionAttachmentUrl" - } - } - } - }, - "V1ServiceOwnerDialogsQueriesGet_DialogTransmissionAttachmentUrl": { - "type": "object", - "additionalProperties": false, - "properties": { - "url": { - "type": "string", - "description": "The fully qualified URL of the attachment. Will be set to \"urn:dialogporten:unauthorized\" if the user is\nnot authorized to access the transmission.", - "format": "uri", - "example": "https://someendpoint.com/someattachment.pdf\nurn:dialogporten:unauthorized" - }, - "mediaType": { - "type": "string", - "description": "The media type of the attachment.", - "nullable": true, - "example": "application/pdf\napplication/zip" - }, - "consumerType": { - "description": "The type of consumer the URL is intended for.", - "oneOf": [ - { - "$ref": "#/components/schemas/Attachments_AttachmentUrlConsumerType" - } - ] - } - } - }, - "V1ServiceOwnerDialogsQueriesGet_DialogGuiAction": { - "type": "object", - "additionalProperties": false, - "properties": { - "id": { - "type": "string", - "description": "The unique identifier for the action in UUIDv7 format.", - "format": "guid" - }, - "action": { - "type": "string", - "description": "The action identifier for the action, corresponding to the \"action\" attributeId used in the XACML service policy." - }, - "url": { - "type": "string", - "description": "The fully qualified URL of the action, to which the user will be redirected when the action is triggered.", - "format": "uri" - }, - "authorizationAttribute": { - "type": "string", - "description": "Contains an authorization resource attributeId, that can used in custom authorization rules in the XACML service\npolicy, which by default is the policy belonging to the service referred to by \"serviceResource\" in the dialog.\n \nCan also be used to refer to other service policies.", - "nullable": true, - "example": "mycustomresource\n/* equivalent to the above */\nurn:altinn:subresource:mycustomresource\nurn:altinn:task:Task_1\n/* refer to another service */\nurn:altinn:resource:some-other-service-identifier" - }, - "isAuthorized": { - "type": "boolean", - "description": "Whether the user, if supplied in the query, is authorized to perform the action.", - "nullable": true - }, - "isDeleteDialogAction": { - "type": "boolean", - "description": "Indicates whether the action results in the dialog being deleted. Used by frontends to implement custom UX\nfor delete actions." - }, - "priority": { - "description": "Indicates a priority for the action, making it possible for frontends to adapt GUI elements based on action\npriority.", - "oneOf": [ - { - "$ref": "#/components/schemas/DialogsEntitiesActions_DialogGuiActionPriority" - } - ] - }, - "httpMethod": { - "description": "The HTTP method that the frontend should use when redirecting the user.", - "oneOf": [ - { - "$ref": "#/components/schemas/Http_HttpVerb" - } - ] - }, - "title": { - "type": "array", - "description": "The title of the action, this should be short and in verb form.", - "items": { - "$ref": "#/components/schemas/V1CommonLocalizations_Localization" - } - }, - "prompt": { - "type": "array", - "description": "If there should be a prompt asking the user for confirmation before the action is executed,\nthis field should contain the prompt text.", - "nullable": true, - "items": { - "$ref": "#/components/schemas/V1CommonLocalizations_Localization" - } - } - } - }, - "V1ServiceOwnerDialogsQueriesGet_DialogApiAction": { - "type": "object", - "additionalProperties": false, - "properties": { - "id": { - "type": "string", - "description": "The unique identifier for the action in UUIDv7 format.", - "format": "guid" - }, - "action": { - "type": "string", - "description": "String identifier for the action, corresponding to the \"action\" attributeId used in the XACML service policy,\nwhich by default is the policy belonging to the service referred to by \"serviceResource\" in the dialog.", - "example": "write" - }, - "authorizationAttribute": { - "type": "string", - "description": "Contains an authorization resource attributeId, that can used in custom authorization rules in the XACML service\npolicy, which by default is the policy belonging to the service referred to by \"serviceResource\" in the dialog.\n \nCan also be used to refer to other service policies.", - "nullable": true, - "example": "mycustomresource\n/* equivalent to the above */\nurn:altinn:subresource:mycustomresource\nurn:altinn:task:Task_1\n/* refer to another service */\nurn:altinn:resource:some-other-service-identifier" - }, - "isAuthorized": { - "type": "boolean", - "description": "True if the authenticated user (set in the query) is authorized for this action.", - "nullable": true - }, - "endpoints": { - "type": "array", - "description": "The endpoints associated with the action.", - "items": { - "$ref": "#/components/schemas/V1ServiceOwnerDialogsQueriesGet_DialogApiActionEndpoint" - } - } - } - }, - "V1ServiceOwnerDialogsQueriesGet_DialogApiActionEndpoint": { - "type": "object", - "additionalProperties": false, - "properties": { - "id": { - "type": "string", - "description": "The unique identifier for the endpoint in UUIDv7 format.", - "format": "guid" - }, - "version": { - "type": "string", - "description": "Arbitrary string indicating the version of the endpoint.\n \nConsult the service-specific documentation provided by the service owner for details (if in use).", - "nullable": true - }, - "url": { - "type": "string", - "description": "The fully qualified URL of the API endpoint.", - "format": "uri" - }, - "httpMethod": { - "description": "The HTTP method that the endpoint expects for this action.", - "oneOf": [ - { - "$ref": "#/components/schemas/Http_HttpVerb" - } - ] - }, - "documentationUrl": { - "type": "string", - "description": "Link to service provider documentation for the endpoint. Used for service owners to provide documentation for\nintegrators. Should be a URL to a human-readable page.", - "format": "uri", - "nullable": true - }, - "requestSchema": { - "type": "string", - "description": "Link to the request schema for the endpoint. Used by service owners to provide documentation for integrators.\nDialogporten will not validate information on this endpoint.", - "format": "uri", - "nullable": true - }, - "responseSchema": { - "type": "string", - "description": "Link to the response schema for the endpoint. Used for service owners to provide documentation for integrators.\nDialogporten will not validate information on this endpoint.", - "format": "uri", - "nullable": true - }, - "deprecated": { - "type": "boolean", - "description": "Boolean indicating if the endpoint is deprecated. Integrators should migrate to endpoints with a higher version." - }, - "sunsetAt": { - "type": "string", - "description": "Date and time when the service owner has indicated that endpoint will no longer function. Only set if the endpoint\nis deprecated. Dialogporten will not enforce this date.", - "format": "date-time", - "nullable": true - } - } - }, - "V1ServiceOwnerDialogsQueriesGet_DialogActivity": { - "type": "object", - "additionalProperties": false, - "properties": { - "id": { - "type": "string", - "description": "The unique identifier for the activity in UUIDv7 format.", - "format": "guid" - }, - "createdAt": { - "type": "string", - "description": "The date and time when the activity was created.", - "format": "date-time", - "nullable": true - }, - "extendedType": { - "type": "string", - "description": "An arbitrary URI/URN with a service-specific activity type.\n \nConsult the service-specific documentation provided by the service owner for details (if in use).", - "format": "uri", - "nullable": true - }, - "type": { - "description": "The type of activity.", - "oneOf": [ - { - "$ref": "#/components/schemas/DialogsEntitiesActivities_DialogActivityType" - } - ] - }, - "transmissionId": { - "type": "string", - "description": "If the activity is related to a particular transmission, this field will contain the transmission identifier.", - "format": "guid", - "nullable": true - }, - "performedBy": { - "description": "The actor that performed the activity.", - "oneOf": [ - { - "$ref": "#/components/schemas/V1ServiceOwnerCommonActors_Actor" - } - ] - }, - "description": { - "type": "array", - "description": "Unstructured text describing the activity. Only set if the activity type is \"Information\".", - "items": { - "$ref": "#/components/schemas/V1CommonLocalizations_Localization" - } - } - } - }, - "V1ServiceOwnerDialogsQueriesGet_DialogSeenLog": { - "type": "object", - "additionalProperties": false, - "properties": { - "id": { - "type": "string", - "description": "The unique identifier for the seen log entry in UUIDv7 format.", - "format": "guid" - }, - "seenAt": { - "type": "string", - "description": "The timestamp when the dialog revision was seen.", - "format": "date-time" - }, - "seenBy": { - "description": "The actor that saw the dialog revision.", - "oneOf": [ - { - "$ref": "#/components/schemas/V1ServiceOwnerCommonActors_Actor" - } - ] - }, - "isViaServiceOwner": { - "type": "boolean", - "description": "Flag indicating whether the seen log entry was created via the service owner.\n \nThis is used when the service owner uses the service owner API to implement its own frontend.", - "nullable": true - }, - "isCurrentEndUser": { - "type": "boolean", - "description": "Flag indicating whether the seen log entry was created by the current end user, if provided in the query." - } - } - }, - "V1ServiceOwnerDialogsCreate_DialogRequest": { - "type": "object", - "additionalProperties": false, - "properties": { - "dto": { - "$ref": "#/components/schemas/V1ServiceOwnerDialogsCommandsCreate_Dialog" - } - } - }, - "V1ServiceOwnerDialogsCommandsCreate_Dialog": { - "type": "object", - "additionalProperties": false, - "properties": { - "id": { - "type": "string", - "description": "A self-defined UUIDv7 may be provided to support idempotent creation of dialogs. If not provided, a new UUIDv7 will be generated.", - "format": "guid", - "nullable": true, - "example": "01913cd5-784f-7d3b-abef-4c77b1f0972d" - }, - "serviceResource": { - "type": "string", - "description": "The service identifier for the service that the dialog is related to in URN-format.\nThis corresponds to a resource in the Altinn Resource Registry, which the authenticated organization\nmust own, i.e., be listed as the \"competent authority\" in the Resource Registry entry.", - "example": "urn:altinn:resource:some-service-identifier" - }, - "party": { - "type": "string", - "description": "The party code representing the organization or person that the dialog belongs to in URN format.", - "example": "urn:altinn:person:identifier-no:01125512345\nurn:altinn:organization:identifier-no:912345678" - }, - "progress": { - "type": "integer", - "description": "Advisory indicator of progress, represented as 1-100 percentage value. 100% representing a dialog that has come\nto a natural completion (successful or not).", - "format": "int32", - "nullable": true - }, - "extendedStatus": { - "type": "string", - "description": "Arbitrary string with a service-specific indicator of status, typically used to indicate a fine-grained state of\nthe dialog to further specify the \"status\" enum.", - "nullable": true - }, - "externalReference": { - "type": "string", - "description": "Arbitrary string with a service-specific reference to an external system or service.", - "nullable": true - }, - "visibleFrom": { - "type": "string", - "description": "The timestamp when the dialog should be made visible for authorized end users. If not provided, the dialog will be\nimmediately available.", - "format": "date-time", - "nullable": true, - "example": "2022-12-31T23:59:59Z" - }, - "dueAt": { - "type": "string", - "description": "The due date for the dialog. Dialogs past due date might be marked as such in frontends but will still be available.", - "format": "date-time", - "nullable": true, - "example": "2022-12-31T23:59:59Z" - }, - "process": { - "type": "string", - "description": "Optional process identifier used to indicate a business process this dialog belongs to.", - "nullable": true - }, - "precedingProcess": { - "type": "string", - "description": "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.", - "nullable": true - }, - "expiresAt": { - "type": "string", - "description": "The expiration date for the dialog. This is the last date when the dialog is available for the end user.\n \nAfter this date is passed, the dialog will be considered expired and no longer available for the end user in any\nAPI. If not supplied, the dialog will be considered to never expire. This field can be changed after creation.", - "format": "date-time", - "nullable": true, - "example": "2022-12-31T23:59:59Z" - }, - "createdAt": { - "type": "string", - "description": "If set, will override the date and time when the dialog is set as created.\nIf not supplied, the current date /time will be used.", - "format": "date-time", - "example": "2022-12-31T23:59:59Z" - }, - "updatedAt": { - "type": "string", - "description": "If set, will override the date and time when the dialog is set as last updated.\nIf not supplied, the current date /time will be used.", - "format": "date-time", - "example": "2022-12-31T23:59:59Z" - }, - "status": { - "description": "The aggregated status of the dialog.", - "oneOf": [ - { - "$ref": "#/components/schemas/DialogsEntities_DialogStatus" - } - ] - }, - "systemLabel": { - "description": "Set the system label of the dialog Migration purposes.", - "nullable": true, - "oneOf": [ - { - "$ref": "#/components/schemas/DialogEndUserContextsEntities_SystemLabel" - } - ] - }, - "content": { - "description": "The dialog unstructured text content.", - "oneOf": [ - { - "$ref": "#/components/schemas/V1ServiceOwnerDialogsCommandsCreate_Content" - } - ] - }, - "searchTags": { - "type": "array", - "description": "A list of words (tags) that will be used in dialog search queries. Not visible in end-user DTO.", - "items": { - "$ref": "#/components/schemas/V1ServiceOwnerDialogsCommandsCreate_SearchTag" - } - }, - "attachments": { - "type": "array", - "description": "The attachments associated with the dialog (on an aggregate level).", - "items": { - "$ref": "#/components/schemas/V1ServiceOwnerDialogsCommandsCreate_Attachment" - } - }, - "transmissions": { - "type": "array", - "description": "The immutable list of transmissions associated with the dialog.", - "items": { - "$ref": "#/components/schemas/V1ServiceOwnerDialogsCommandsCreate_Transmission" - } - }, - "guiActions": { - "type": "array", - "description": "The GUI actions associated with the dialog. Should be used in browser-based interactive frontends.", - "items": { - "$ref": "#/components/schemas/V1ServiceOwnerDialogsCommandsCreate_GuiAction" - } - }, - "apiActions": { - "type": "array", - "description": "The API actions associated with the dialog. Should be used in specialized, non-browser-based integrations.", - "items": { - "$ref": "#/components/schemas/V1ServiceOwnerDialogsCommandsCreate_ApiAction" - } - }, - "activities": { - "type": "array", - "description": "An immutable list of activities associated with the dialog.", - "items": { - "$ref": "#/components/schemas/V1ServiceOwnerDialogsCommandsCreate_Activity" - } - } - } - }, - "V1ServiceOwnerDialogsCommandsCreate_Content": { - "type": "object", - "additionalProperties": false, - "properties": { - "title": { - "description": "The title of the dialog.\nSupported media types: text/plain", - "oneOf": [ - { - "$ref": "#/components/schemas/V1CommonContent_ContentValue" - } - ] - }, - "summary": { - "description": "A short summary of the dialog and its current state.\nSupported media types: text/plain", - "oneOf": [ - { - "$ref": "#/components/schemas/V1CommonContent_ContentValue" - } - ] - }, - "senderName": { - "description": "Overridden sender name. If not supplied, assume \"org\" as the sender name. Must be text/plain if supplied.\nSupported media types: text/plain", - "nullable": true, - "oneOf": [ - { - "$ref": "#/components/schemas/V1CommonContent_ContentValue" - } - ] - }, - "additionalInfo": { - "description": "Additional information about the dialog.\nSupported media types: text/plain, text/markdown", - "nullable": true, - "oneOf": [ - { - "$ref": "#/components/schemas/V1CommonContent_ContentValue" - } - ] - }, - "extendedStatus": { - "description": "Used as the human-readable label used to describe the \"ExtendedStatus\" field.\nSupported media types: text/plain", - "nullable": true, - "oneOf": [ - { - "$ref": "#/components/schemas/V1CommonContent_ContentValue" - } - ] - }, - "mainContentReference": { - "description": "Front-channel embedded content. Used to dynamically embed content in the frontend from an external URL. Must be HTTPS.\nSupported media types: application/vnd.dialogporten.frontchannelembed+json;type=markdown", - "nullable": true, - "oneOf": [ - { - "$ref": "#/components/schemas/V1CommonContent_ContentValue" - } - ] - } - } - }, - "V1ServiceOwnerDialogsCommandsCreate_SearchTag": { - "type": "object", - "additionalProperties": false, - "properties": { - "value": { - "type": "string", - "description": "A search tag value." - } - } - }, - "V1ServiceOwnerDialogsCommandsCreate_Attachment": { - "type": "object", - "additionalProperties": false, - "properties": { - "id": { - "type": "string", - "description": "A self-defined UUIDv7 may be provided to support idempotent creation of attachments. If not provided, a new UUIDv7 will be generated.", - "format": "guid", - "nullable": true - }, - "displayName": { - "type": "array", - "description": "The display name of the attachment that should be used in GUIs.", - "items": { - "$ref": "#/components/schemas/V1CommonLocalizations_Localization" - } - }, - "urls": { - "type": "array", - "description": "The URLs associated with the attachment, each referring to a different representation of the attachment.", - "items": { - "$ref": "#/components/schemas/V1ServiceOwnerDialogsCommandsCreate_AttachmentUrl" - } - } - } - }, - "V1ServiceOwnerDialogsCommandsCreate_AttachmentUrl": { - "type": "object", - "additionalProperties": false, - "properties": { - "url": { - "type": "string", - "description": "The fully qualified URL of the attachment.", - "format": "uri" - }, - "mediaType": { - "type": "string", - "description": "The media type of the attachment.", - "nullable": true, - "example": "application/pdf\napplication/zip" - }, - "consumerType": { - "description": "The type of consumer the URL is intended for.", - "oneOf": [ - { - "$ref": "#/components/schemas/Attachments_AttachmentUrlConsumerType" - } - ] - } - } - }, - "V1ServiceOwnerDialogsCommandsCreate_Transmission": { - "type": "object", - "additionalProperties": false, - "properties": { - "id": { - "type": "string", - "description": "A self-defined UUIDv7 may be provided to support idempotent creation of transmissions. If not provided, a new UUIDv7 will be generated.", - "format": "guid", - "nullable": true, - "example": "01913cd5-784f-7d3b-abef-4c77b1f0972d" - }, - "createdAt": { - "type": "string", - "description": "If supplied, overrides the creating date and time for the transmission.\nIf not supplied, the current date /time will be used.", - "format": "date-time" - }, - "authorizationAttribute": { - "type": "string", - "description": "Contains an authorization resource attributeId, that can used in custom authorization rules in the XACML service\npolicy, which by default is the policy belonging to the service referred to by \"serviceResource\" in the dialog.\n \nCan also be used to refer to other service policies.", - "nullable": true, - "example": "mycustomresource\n/* equivalent to the above */\nurn:altinn:subresource:mycustomresource\nurn:altinn:task:Task_1\n/* refer to another service */\nurn:altinn:resource:some-other-service-identifier" - }, - "extendedType": { - "type": "string", - "description": "Arbitrary URI/URN describing a service-specific transmission type.\n \nRefer to the service-specific documentation provided by the service owner for details (if in use).", - "format": "uri", - "nullable": true - }, - "relatedTransmissionId": { - "type": "string", - "description": "Reference to any other transmission that this transmission is related to.", - "format": "guid", - "nullable": true - }, - "type": { - "description": "The type of transmission.", - "oneOf": [ - { - "$ref": "#/components/schemas/DialogsEntitiesTransmissions_DialogTransmissionType" - } - ] - }, - "sender": { - "description": "The actor that sent the transmission.", - "oneOf": [ - { - "$ref": "#/components/schemas/V1ServiceOwnerCommonActors_Actor" - } - ] - }, - "content": { - "description": "The transmission unstructured text content.", - "oneOf": [ - { - "$ref": "#/components/schemas/V1ServiceOwnerDialogsCommandsCreate_TransmissionContent" - } - ] - }, - "attachments": { - "type": "array", - "description": "The transmission-level attachments.", - "items": { - "$ref": "#/components/schemas/V1ServiceOwnerDialogsCommandsCreate_TransmissionAttachment" - } - } - } - }, - "V1ServiceOwnerDialogsCommandsCreate_TransmissionContent": { - "type": "object", - "additionalProperties": false, - "properties": { - "title": { - "description": "The transmission title. Must be text/plain.", - "oneOf": [ - { - "$ref": "#/components/schemas/V1CommonContent_ContentValue" - } - ] - }, - "summary": { - "description": "The transmission summary.", - "oneOf": [ - { - "$ref": "#/components/schemas/V1CommonContent_ContentValue" - } - ] - }, - "contentReference": { - "description": "Front-channel embedded content. Used to dynamically embed content in the frontend from an external URL. Must be HTTPS.\nAllowed media types: application/vnd.dialogporten.frontchannelembed+json;type=markdown", - "nullable": true, - "oneOf": [ - { - "$ref": "#/components/schemas/V1CommonContent_ContentValue" - } - ] - } - } - }, - "V1ServiceOwnerDialogsCommandsCreate_TransmissionAttachment": { - "type": "object", - "additionalProperties": false, - "properties": { - "id": { - "type": "string", - "description": "A self-defined UUIDv7 may be provided to support idempotent creation of transmission attachments. If not provided, a new UUIDv7 will be generated.", - "format": "guid", - "nullable": true, - "example": "01913cd5-784f-7d3b-abef-4c77b1f0972d" - }, - "displayName": { - "type": "array", - "description": "The display name of the attachment that should be used in GUIs.", - "items": { - "$ref": "#/components/schemas/V1CommonLocalizations_Localization" - } - }, - "urls": { - "type": "array", - "description": "The URLs associated with the attachment, each referring to a different representation of the attachment.", - "items": { - "$ref": "#/components/schemas/V1ServiceOwnerDialogsCommandsCreate_TransmissionAttachmentUrl" - } - } - } - }, - "V1ServiceOwnerDialogsCommandsCreate_TransmissionAttachmentUrl": { - "type": "object", - "additionalProperties": false, - "properties": { - "url": { - "type": "string", - "description": "The fully qualified URL of the attachment.", - "format": "uri" - }, - "mediaType": { - "type": "string", - "description": "The media type of the attachment.", - "nullable": true, - "example": "application/pdf\napplication/zip" - }, - "consumerType": { - "description": "The type of consumer the URL is intended for.", - "oneOf": [ - { - "$ref": "#/components/schemas/Attachments_AttachmentUrlConsumerType" - } - ] - } - } - }, - "V1ServiceOwnerDialogsCommandsCreate_GuiAction": { - "type": "object", - "additionalProperties": false, - "properties": { - "id": { - "type": "string", - "description": "A self-defined UUIDv7 may be provided to support idempotent creation of Gui Actions. If not provided, a new UUIDv7 will be generated.", - "format": "guid", - "nullable": true, - "example": "01913cd5-784f-7d3b-abef-4c77b1f0972d" - }, - "action": { - "type": "string", - "description": "The action identifier for the action, corresponding to the \"action\" attributeId used in the XACML service policy." - }, - "url": { - "type": "string", - "description": "The fully qualified URL of the action, to which the user will be redirected when the action is triggered. Will be set to\n\"urn:dialogporten:unauthorized\" if the user is not authorized to perform the action.", - "format": "uri", - "example": "urn:dialogporten:unauthorized\nhttps://someendpoint.com/gui/some-service-instance-id" - }, - "authorizationAttribute": { - "type": "string", - "description": "Contains an authorization resource attributeId, that can used in custom authorization rules in the XACML service\npolicy, which by default is the policy belonging to the service referred to by \"serviceResource\" in the dialog.\n \nCan also be used to refer to other service policies.", - "nullable": true, - "example": "mycustomresource\n/* equivalent to the above */\nurn:altinn:subresource:mycustomresource\nurn:altinn:task:Task_1\n/* refer to another service */\nurn:altinn:resource:some-other-service-identifier" - }, - "isDeleteDialogAction": { - "type": "boolean", - "description": "Indicates whether the action results in the dialog being deleted. Used by frontends to implement custom UX\nfor delete actions." - }, - "httpMethod": { - "description": "The HTTP method that the frontend should use when redirecting the user.", - "nullable": true, - "oneOf": [ - { - "$ref": "#/components/schemas/Http_HttpVerb" - } - ] - }, - "priority": { - "description": "Indicates a priority for the action, making it possible for frontends to adapt GUI elements based on action\npriority.", - "oneOf": [ - { - "$ref": "#/components/schemas/DialogsEntitiesActions_DialogGuiActionPriority" - } - ] - }, - "title": { - "type": "array", - "description": "The title of the action, this should be short and in verb form. Must be text/plain.", - "items": { - "$ref": "#/components/schemas/V1CommonLocalizations_Localization" - } - }, - "prompt": { - "type": "array", - "description": "If there should be a prompt asking the user for confirmation before the action is executed,\nthis field should contain the prompt text.", - "nullable": true, - "items": { - "$ref": "#/components/schemas/V1CommonLocalizations_Localization" - } - } - } - }, - "V1ServiceOwnerDialogsCommandsCreate_ApiAction": { - "type": "object", - "additionalProperties": false, - "properties": { - "id": { - "type": "string", - "description": "A self-defined UUIDv7 may be provided to support idempotent creation of Api Actions. If not provided, a new UUIDv7 will be generated.", - "format": "guid", - "nullable": true, - "example": "01913cd5-784f-7d3b-abef-4c77b1f0972d" - }, - "action": { - "type": "string", - "description": "String identifier for the action, corresponding to the \"action\" attributeId used in the XACML service policy,\nwhich by default is the policy belonging to the service referred to by \"serviceResource\" in the dialog.", - "example": "write" - }, - "authorizationAttribute": { - "type": "string", - "description": "Contains an authorization resource attributeId, that can used in custom authorization rules in the XACML service\npolicy, which by default is the policy belonging to the service referred to by \"serviceResource\" in the dialog.\n \nCan also be used to refer to other service policies.", - "nullable": true, - "example": "mycustomresource\n/* equivalent to the above */\nurn:altinn:subresource:mycustomresource\nurn:altinn:task:Task_1\n/* refer to another service */\nurn:altinn:resource:some-other-service-identifier" - }, - "endpoints": { - "type": "array", - "description": "The endpoints associated with the action.", - "items": { - "$ref": "#/components/schemas/V1ServiceOwnerDialogsCommandsCreate_ApiActionEndpoint" - } - } - } - }, - "V1ServiceOwnerDialogsCommandsCreate_ApiActionEndpoint": { - "type": "object", - "additionalProperties": false, - "properties": { - "version": { - "type": "string", - "description": "Arbitrary string indicating the version of the endpoint.", - "nullable": true - }, - "url": { - "type": "string", - "description": "The fully qualified URL of the API endpoint.", - "format": "uri" - }, - "httpMethod": { - "description": "The HTTP method that the endpoint expects for this action.", - "oneOf": [ - { - "$ref": "#/components/schemas/Http_HttpVerb" - } - ] - }, - "documentationUrl": { - "type": "string", - "description": "Link to documentation for the endpoint, providing documentation for integrators. Should be a URL to a\nhuman-readable page.", - "format": "uri", - "nullable": true - }, - "requestSchema": { - "type": "string", - "description": "Link to the request schema for the endpoint. Used to provide documentation for integrators.\nDialogporten will not validate information on this endpoint.", - "format": "uri", - "nullable": true - }, - "responseSchema": { - "type": "string", - "description": "Link to the response schema for the endpoint. Used to provide documentation for integrators.\nDialogporten will not validate information on this endpoint.", - "format": "uri", - "nullable": true - }, - "deprecated": { - "type": "boolean", - "description": "Boolean indicating if the endpoint is deprecated." - }, - "sunsetAt": { - "type": "string", - "description": "Date and time when the endpoint will no longer function. Only set if the endpoint is deprecated. Dialogporten\nwill not enforce this date.", - "format": "date-time", - "nullable": true - } - } - }, - "V1ServiceOwnerDialogsCommandsCreate_Activity": { - "type": "object", - "additionalProperties": false, - "properties": { - "id": { - "type": "string", - "description": "A self-defined UUIDv7 may be provided to support idempotent creation of activities. If not provided, a new UUIDv7 will be generated.", - "format": "guid", - "nullable": true, - "example": "01913cd5-784f-7d3b-abef-4c77b1f0972d" - }, - "createdAt": { - "type": "string", - "description": "If supplied, overrides the creating date and time for the transmission.\nIf not supplied, the current date /time will be used.", - "format": "date-time", - "nullable": true - }, - "extendedType": { - "type": "string", - "description": "Arbitrary URI/URN describing a service-specific transmission type.", - "format": "uri", - "nullable": true - }, - "type": { - "description": "The type of transmission.", - "oneOf": [ - { - "$ref": "#/components/schemas/DialogsEntitiesActivities_DialogActivityType" - } - ] - }, - "transmissionId": { - "type": "string", - "description": "If the activity is related to a particular transmission, this field will contain the transmission identifier.\nMust be present in the request body.", - "format": "guid", - "nullable": true - }, - "performedBy": { - "description": "The actor that performed the activity.", - "oneOf": [ - { - "$ref": "#/components/schemas/V1ServiceOwnerCommonActors_Actor" - } - ] - }, - "description": { - "type": "array", - "description": "Unstructured text describing the activity. Only set if the activity type is \"Information\".", - "items": { - "$ref": "#/components/schemas/V1CommonLocalizations_Localization" - } - } - } - }, - "V1ServiceOwnerDialogActivitiesQueriesSearch_Activity": { - "type": "object", - "additionalProperties": false, - "properties": { - "id": { - "type": "string", - "format": "guid" - }, - "createdAt": { - "type": "string", - "format": "date-time" - }, - "extendedType": { - "type": "string", - "format": "uri", - "nullable": true - }, - "type": { - "$ref": "#/components/schemas/DialogsEntitiesActivities_DialogActivityType" - }, - "deletedAt": { - "type": "string", - "format": "date-time", - "nullable": true - }, - "transmissionId": { - "type": "string", - "format": "guid", - "nullable": true - } - } - }, - "V1ServiceOwnerDialogActivitiesQueriesNotificationCondition_NotificationCondition": { - "type": "object", - "additionalProperties": false, - "properties": { - "sendNotification": { - "type": "boolean" - } - } - }, - "V1ServiceOwnerDialogActivitiesQueriesGet_Activity": { - "type": "object", - "additionalProperties": false, - "properties": { - "id": { - "type": "string", - "format": "guid" - }, - "createdAt": { - "type": "string", - "format": "date-time", - "nullable": true - }, - "extendedType": { - "type": "string", - "format": "uri", - "nullable": true - }, - "type": { - "$ref": "#/components/schemas/DialogsEntitiesActivities_DialogActivityType" - }, - "deletedAt": { - "type": "string", - "format": "date-time", - "nullable": true - }, - "transmissionId": { - "type": "string", - "format": "guid", - "nullable": true - }, - "performedBy": { - "$ref": "#/components/schemas/V1ServiceOwnerCommonActors_Actor" - }, - "description": { - "type": "array", - "items": { - "$ref": "#/components/schemas/V1CommonLocalizations_Localization" - } - } - } - }, - "V1ServiceOwnerDialogActivitiesQueriesNotificationCondition_NotificationConditionType": { - "type": "string", - "description": "", - "x-enumNames": [ - "NotExists", - "Exists" - ], - "enum": [ - "NotExists", - "Exists" - ] - }, - "V1ServiceOwnerDialogActivitiesCreate_ActivityRequest": { - "type": "object", - "additionalProperties": false, - "properties": { - "id": { - "type": "string", - "description": "The UUDIv7 of the action may be provided to support idempotent additions to the list of activities.\nIf not supplied, a new UUIDv7 will be generated.", - "format": "guid", - "nullable": true, - "example": "01913cd5-784f-7d3b-abef-4c77b1f0972d" - }, - "createdAt": { - "type": "string", - "description": "If supplied, overrides the creating date and time for the transmission.\nIf not supplied, the current date /time will be used.", - "format": "date-time", - "nullable": true - }, - "extendedType": { - "type": "string", - "description": "Arbitrary URI/URN describing a service-specific transmission type.", - "format": "uri", - "nullable": true - }, - "type": { - "description": "The type of transmission.", - "oneOf": [ - { - "$ref": "#/components/schemas/DialogsEntitiesActivities_DialogActivityType" - } - ] - }, - "transmissionId": { - "type": "string", - "description": "If the activity is related to a particular transmission, this field will contain the transmission identifier.\nMust be present in the request body.", - "format": "guid", - "nullable": true - }, - "performedBy": { - "description": "The actor that performed the activity.", - "oneOf": [ - { - "$ref": "#/components/schemas/V1ServiceOwnerCommonActors_Actor" - } - ] - }, - "description": { - "type": "array", - "description": "Unstructured text describing the activity. Only set if the activity type is \"Information\".", - "items": { - "$ref": "#/components/schemas/V1CommonLocalizations_Localization" - } - } - } - }, - "V1EndUserPartiesQueriesGet_Parties": { - "type": "object", - "additionalProperties": false, - "properties": { - "authorizedParties": { - "type": "array", - "items": { - "$ref": "#/components/schemas/V1EndUserPartiesQueriesGet_AuthorizedParty" - } - } - } - }, - "V1EndUserPartiesQueriesGet_AuthorizedParty": { - "type": "object", - "additionalProperties": false, - "properties": { - "party": { - "type": "string" - }, - "name": { - "type": "string" - }, - "partyType": { - "type": "string" - }, - "isDeleted": { - "type": "boolean" - }, - "hasKeyRole": { - "type": "boolean" - }, - "isCurrentEndUser": { - "type": "boolean" - }, - "isMainAdministrator": { - "type": "boolean" - }, - "isAccessManager": { - "type": "boolean" - }, - "hasOnlyAccessToSubParties": { - "type": "boolean" - }, - "subParties": { - "type": "array", - "nullable": true, - "items": { - "$ref": "#/components/schemas/V1EndUserPartiesQueriesGet_AuthorizedParty" - } - } - } - }, - "V1EndUserDialogTransmissionsQueriesSearch_Transmission": { - "type": "object", - "additionalProperties": false, - "properties": { - "id": { - "type": "string", - "description": "The unique identifier for the transmission in UUIDv7 format.", - "format": "guid" - }, - "createdAt": { - "type": "string", - "description": "The date and time when the transmission was created.", - "format": "date-time" - }, - "authorizationAttribute": { - "type": "string", - "description": "The authorization attribute associated with the transmission.", - "nullable": true - }, - "isAuthorized": { - "type": "boolean", - "description": "Flag indicating if the authenticated user is authorized for this transmission. If not, embedded content and\nthe attachments will not be available." - }, - "extendedType": { - "type": "string", - "description": "The extended type URI for the transmission.", - "format": "uri", - "nullable": true - }, - "relatedTransmissionId": { - "type": "string", - "description": "The unique identifier for the related transmission, if any.", - "format": "guid", - "nullable": true - }, - "deletedAt": { - "type": "string", - "description": "The date and time when the transmission was deleted, if applicable.", - "format": "date-time", - "nullable": true - }, - "type": { - "description": "The type of the transmission.", - "oneOf": [ - { - "$ref": "#/components/schemas/DialogsEntitiesTransmissions_DialogTransmissionType" - } - ] - }, - "sender": { - "description": "The sender actor information for the transmission.", - "oneOf": [ - { - "$ref": "#/components/schemas/V1EndUserCommonActors_Actor" - } - ] - }, - "content": { - "description": "The content of the transmission.", - "oneOf": [ - { - "$ref": "#/components/schemas/V1EndUserDialogTransmissionsQueriesSearch_Content" - } - ] - }, - "attachments": { - "type": "array", - "description": "The attachments associated with the transmission.", - "items": { - "$ref": "#/components/schemas/V1EndUserDialogTransmissionsQueriesSearch_Attachment" - } - } - } - }, - "V1EndUserCommonActors_Actor": { - "type": "object", - "additionalProperties": false, - "properties": { - "actorType": { - "description": "The type of actor that sent the transmission.", - "oneOf": [ - { - "$ref": "#/components/schemas/Actors_ActorType" - } - ] - }, - "actorName": { - "type": "string", - "description": "Specifies the name of the entity that sent the transmission. Mutually exclusive with ActorId. If ActorId\nis supplied, the name will be automatically populated from the name registries.", - "nullable": true, - "example": "Ola Nordmann" - }, - "actorId": { - "type": "string", - "description": "The identifier of the person or organization that sent the transmission. Mutually exclusive with ActorName.\nMight be omitted if ActorType is \"ServiceOwner\".", - "nullable": true, - "example": "urn:altinn:person:identifier-no:12018212345" - } - } - }, - "V1EndUserDialogTransmissionsQueriesSearch_Content": { - "type": "object", - "additionalProperties": false, - "properties": { - "title": { - "description": "The title of the content.", - "oneOf": [ - { - "$ref": "#/components/schemas/V1CommonContent_ContentValue" - } - ] - }, - "summary": { - "description": "The summary of the content.", - "oneOf": [ - { - "$ref": "#/components/schemas/V1CommonContent_ContentValue" - } - ] - }, - "contentReference": { - "description": "Front-channel embedded content. Used to dynamically embed content in the frontend from an external URL.\nAllowed media types: application/vnd.dialogporten.frontchannelembed+json;type=markdown", - "nullable": true, - "oneOf": [ - { - "$ref": "#/components/schemas/V1CommonContent_ContentValue" - } - ] - } - } - }, - "V1EndUserDialogTransmissionsQueriesSearch_Attachment": { - "type": "object", - "additionalProperties": false, - "properties": { - "id": { - "type": "string", - "description": "The unique identifier for the attachment in UUIDv7 format.", - "format": "guid" - }, - "displayName": { - "type": "array", - "description": "The display name of the attachment that should be used in GUIs.", - "items": { - "$ref": "#/components/schemas/V1CommonLocalizations_Localization" - } - }, - "urls": { - "type": "array", - "description": "The URLs associated with the attachment, each referring to a different representation of the attachment.", - "items": { - "$ref": "#/components/schemas/V1EndUserDialogTransmissionsQueriesSearch_AttachmentUrl" - } - } - } - }, - "V1EndUserDialogTransmissionsQueriesSearch_AttachmentUrl": { - "type": "object", - "additionalProperties": false, - "properties": { - "id": { - "type": "string", - "description": "The unique identifier for the attachment URL in UUIDv7 format.", - "format": "guid" - }, - "url": { - "type": "string", - "description": "The fully qualified URL of the attachment. Will be set to \"urn:dialogporten:unauthorized\" if the user is\nnot authorized to access the transmission.", - "format": "uri", - "example": "https://someendpoint.com/someattachment.pdf\nurn:dialogporten:unauthorized" - }, - "mediaType": { - "type": "string", - "description": "The media type of the attachment.", - "nullable": true, - "example": "application/pdf\napplication/zip" - }, - "consumerType": { - "description": "The type of consumer the URL is intended for.", - "oneOf": [ - { - "$ref": "#/components/schemas/Attachments_AttachmentUrlConsumerType" - } - ] - } - } - }, - "V1EndUserDialogTransmissionsQueriesGet_Transmission": { - "type": "object", - "additionalProperties": false, - "properties": { - "id": { - "type": "string", - "description": "The unique identifier for the transmission in UUIDv7 format.", - "format": "guid" - }, - "createdAt": { - "type": "string", - "description": "The date and time when the transmission was created.", - "format": "date-time" - }, - "authorizationAttribute": { - "type": "string", - "description": "The authorization attribute associated with the transmission.", - "nullable": true - }, - "isAuthorized": { - "type": "boolean", - "description": "Flag indicating if the authenticated user is authorized for this transmission. If not, embedded content and\nthe attachments will not be available." - }, - "extendedType": { - "type": "string", - "description": "The extended type URI for the transmission.", - "format": "uri", - "nullable": true - }, - "relatedTransmissionId": { - "type": "string", - "description": "The unique identifier for the related transmission, if any.", - "format": "guid", - "nullable": true - }, - "deletedAt": { - "type": "string", - "description": "The date and time when the transmission was deleted, if applicable.", - "format": "date-time", - "nullable": true - }, - "type": { - "description": "The type of the transmission.", - "oneOf": [ - { - "$ref": "#/components/schemas/DialogsEntitiesTransmissions_DialogTransmissionType" - } - ] - }, - "sender": { - "description": "The sender actor information for the transmission.", - "oneOf": [ - { - "$ref": "#/components/schemas/V1EndUserCommonActors_Actor" - } - ] - }, - "content": { - "description": "The content of the transmission.", - "oneOf": [ - { - "$ref": "#/components/schemas/V1EndUserDialogTransmissionsQueriesGet_Content" - } - ] - }, - "attachments": { - "type": "array", - "description": "The attachments associated with the transmission.", - "items": { - "$ref": "#/components/schemas/V1EndUserDialogTransmissionsQueriesGet_Attachment" - } - } - } - }, - "V1EndUserDialogTransmissionsQueriesGet_Content": { - "type": "object", - "additionalProperties": false, - "properties": { - "title": { - "description": "The title of the content.", - "oneOf": [ - { - "$ref": "#/components/schemas/V1CommonContent_ContentValue" - } - ] - }, - "summary": { - "description": "The summary of the content.", - "oneOf": [ - { - "$ref": "#/components/schemas/V1CommonContent_ContentValue" - } - ] - }, - "contentReference": { - "description": "Front-channel embedded content. Used to dynamically embed content in the frontend from an external URL.\nAllowed media types: application/vnd.dialogporten.frontchannelembed+json;type=markdown", - "nullable": true, - "oneOf": [ - { - "$ref": "#/components/schemas/V1CommonContent_ContentValue" - } - ] - } - } - }, - "V1EndUserDialogTransmissionsQueriesGet_Attachment": { - "type": "object", - "additionalProperties": false, - "properties": { - "id": { - "type": "string", - "description": "The unique identifier for the attachment in UUIDv7 format.", - "format": "guid" - }, - "displayName": { - "type": "array", - "description": "The display name of the attachment that should be used in GUIs.", - "items": { - "$ref": "#/components/schemas/V1CommonLocalizations_Localization" - } - }, - "urls": { - "type": "array", - "description": "The URLs associated with the attachment, each referring to a different representation of the attachment.", - "items": { - "$ref": "#/components/schemas/V1EndUserDialogTransmissionsQueriesGet_AttachmentUrl" - } - } - } - }, - "V1EndUserDialogTransmissionsQueriesGet_AttachmentUrl": { - "type": "object", - "additionalProperties": false, - "properties": { - "id": { - "type": "string", - "description": "The unique identifier for the attachment URL in UUIDv7 format.", - "format": "guid" - }, - "url": { - "type": "string", - "description": "The fully qualified URL of the attachment. Will be set to \"urn:dialogporten:unauthorized\" if the user is\nnot authorized to access the transmission.", - "format": "uri", - "example": "https://someendpoint.com/someattachment.pdf\nurn:dialogporten:unauthorized" - }, - "mediaType": { - "type": "string", - "description": "The media type of the attachment.", - "nullable": true, - "example": "application/pdf\napplication/zip" - }, - "consumerType": { - "description": "The type of consumer the URL is intended for.", - "oneOf": [ - { - "$ref": "#/components/schemas/Attachments_AttachmentUrlConsumerType" - } - ] - } - } - }, - "V1EndUserDialogSystemLabelsCommandsSet_SystemLabelCommand": { - "type": "object", - "additionalProperties": false, - "properties": { - "label": { - "$ref": "#/components/schemas/DialogEndUserContextsEntities_SystemLabel" - }, - "ifMatchDialogRevision": { - "type": "string", - "format": "guid", - "nullable": true - } - } - }, - "V1EndUserDialogSeenLogsQueriesSearch_SeenLog": { - "type": "object", - "additionalProperties": false, - "properties": { - "id": { - "type": "string", - "format": "guid" - }, - "seenAt": { - "type": "string", - "format": "date-time" - }, - "seenBy": { - "$ref": "#/components/schemas/V1EndUserCommonActors_Actor" - }, - "isViaServiceOwner": { - "type": "boolean" - }, - "isCurrentEndUser": { - "type": "boolean" - } - } - }, - "V1EndUserDialogSeenLogsQueriesGet_SeenLog": { - "type": "object", - "additionalProperties": false, - "properties": { - "id": { - "type": "string", - "format": "guid" - }, - "seenAt": { - "type": "string", - "format": "date-time" - }, - "seenBy": { - "$ref": "#/components/schemas/V1EndUserCommonActors_Actor" - }, - "isViaServiceOwner": { - "type": "boolean" - }, - "isCurrentEndUser": { - "type": "boolean" - } - } - }, - "PaginatedListOfV1EndUserDialogsQueriesSearch_Dialog": { - "type": "object", - "additionalProperties": false, - "properties": { - "items": { - "type": "array", - "description": "The paginated list of items", - "items": { - "$ref": "#/components/schemas/V1EndUserDialogsQueriesSearch_Dialog" - } - }, - "hasNextPage": { - "type": "boolean", - "description": "Whether there are more items available that can be fetched by supplying the continuation token" - }, - "continuationToken": { - "type": "string", - "description": "The continuation token to be used to fetch the next page of items", - "nullable": true, - "example": "createdat_2024-07-31T09:09:03.0257090Z,id_0c089101-b7cf-a476-955c-f00a78d74a4e" - }, - "orderBy": { - "type": "string", - "description": "The current sorting order of the items", - "example": "createdat_desc,id_desc" - } - } - }, - "V1EndUserDialogsQueriesSearch_Dialog": { - "type": "object", - "additionalProperties": false, - "properties": { - "id": { - "type": "string", - "description": "The unique identifier for the dialog in UUIDv7 format.", - "format": "guid", - "example": "01913cd5-784f-7d3b-abef-4c77b1f0972d" - }, - "org": { - "type": "string", - "description": "The service owner code representing the organization (service owner) related to this dialog.", - "example": "ske" - }, - "serviceResource": { - "type": "string", - "description": "The service identifier for the service that the dialog is related to in URN-format.\nThis corresponds to a service resource in the Altinn Resource Registry.", - "example": "urn:altinn:resource:some-service-identifier" - }, - "serviceResourceType": { - "type": "string", - "description": "The ServiceResource type, as defined in Altinn Resource Registry (see ResourceType)." - }, - "party": { - "type": "string", - "description": "The party code representing the organization or person that the dialog belongs to in URN format.", - "example": "urn:altinn:person:identifier-no:01125512345\nurn:altinn:organization:identifier-no:912345678" - }, - "progress": { - "type": "integer", - "description": "Advisory indicator of progress, represented as 1-100 percentage value. 100% representing a dialog that has come\nto a natural completion (successful or not).", - "format": "int32", - "nullable": true - }, - "process": { - "type": "string", - "description": "Optional process identifier used to indicate a business process this dialog belongs to.", - "nullable": true - }, - "precedingProcess": { - "type": "string", - "description": "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.", - "nullable": true - }, - "guiAttachmentCount": { - "type": "integer", - "description": "The number of attachments in the dialog made available for browser-based frontends.", - "format": "int32", - "nullable": true - }, - "extendedStatus": { - "type": "string", - "description": "Arbitrary string with a service-specific indicator of status, typically used to indicate a fine-grained state of\nthe dialog to further specify the \"status\" enum.\n \nRefer to the service-specific documentation provided by the service owner for details on the possible values (if\nin use).", - "nullable": true - }, - "externalReference": { - "type": "string", - "description": "Arbitrary string with a service-specific reference to an external system or service.\n \nRefer to the service-specific documentation provided by the service owner for details (if in use).", - "nullable": true - }, - "createdAt": { - "type": "string", - "description": "The date and time when the dialog was created.", - "format": "date-time", - "example": "2022-12-31T23:59:59Z" - }, - "updatedAt": { - "type": "string", - "description": "The date and time when the dialog was last updated.", - "format": "date-time", - "example": "2022-12-31T23:59:59Z" - }, - "dueAt": { - "type": "string", - "description": "The due date for the dialog. This is the last date when the dialog is expected to be completed.", - "format": "date-time", - "nullable": true, - "example": "2022-12-31T23:59:59Z" - }, - "status": { - "description": "The aggregated status of the dialog.", - "oneOf": [ - { - "$ref": "#/components/schemas/DialogsEntities_DialogStatus" - } - ] - }, - "systemLabel": { - "description": "Current display state.", - "oneOf": [ - { - "$ref": "#/components/schemas/DialogEndUserContextsEntities_SystemLabel" - } - ] - }, - "latestActivity": { - "description": "The latest entry in the dialog's activity log.", - "nullable": true, - "oneOf": [ - { - "$ref": "#/components/schemas/V1EndUserDialogsQueriesSearch_DialogActivity" - } - ] - }, - "seenSinceLastUpdate": { - "type": "array", - "description": "The list of seen log entries for the dialog newer than the dialog ChangedAt date.", - "items": { - "$ref": "#/components/schemas/V1EndUserDialogsQueriesSearch_DialogSeenLog" - } - }, - "content": { - "description": "The content of the dialog in search results.", - "oneOf": [ - { - "$ref": "#/components/schemas/V1EndUserDialogsQueriesSearch_Content" - } - ] - } - } - }, - "V1EndUserDialogsQueriesSearch_DialogActivity": { - "type": "object", - "additionalProperties": false, - "properties": { - "id": { - "type": "string", - "description": "The unique identifier for the activity in UUIDv7 format.", - "format": "guid" - }, - "createdAt": { - "type": "string", - "description": "The date and time when the activity was created.", - "format": "date-time", - "nullable": true - }, - "extendedType": { - "type": "string", - "description": "An arbitrary string with a service-specific activity type.\n \nConsult the service-specific documentation provided by the service owner for details (if in use).", - "format": "uri", - "nullable": true - }, - "type": { - "description": "The type of activity.", - "oneOf": [ - { - "$ref": "#/components/schemas/DialogsEntitiesActivities_DialogActivityType" - } - ] - }, - "transmissionId": { - "type": "string", - "description": "If the activity is related to a particular transmission, this field will contain the transmission identifier.", - "format": "guid", - "nullable": true - }, - "performedBy": { - "description": "The actor that performed the activity.", - "oneOf": [ - { - "$ref": "#/components/schemas/V1EndUserCommonActors_Actor" - } - ] - }, - "description": { - "type": "array", - "description": "Unstructured text describing the activity. Only set if the activity type is \"Information\".", - "items": { - "$ref": "#/components/schemas/V1CommonLocalizations_Localization" - } - } - } - }, - "V1EndUserDialogsQueriesSearch_DialogSeenLog": { - "type": "object", - "additionalProperties": false, - "properties": { - "id": { - "type": "string", - "description": "The unique identifier for the seen log entry in UUIDv7 format.", - "format": "guid" - }, - "seenAt": { - "type": "string", - "description": "The timestamp when the dialog revision was seen.", - "format": "date-time" - }, - "seenBy": { - "description": "The actor that saw the dialog revision.", - "oneOf": [ - { - "$ref": "#/components/schemas/V1EndUserCommonActors_Actor" - } - ] - }, - "isViaServiceOwner": { - "type": "boolean", - "description": "Flag indicating whether the seen log entry was created via the service owner.\n \nThis is used when the service owner uses the service owner API to implement its own frontend.", - "nullable": true - }, - "isCurrentEndUser": { - "type": "boolean", - "description": "Flag indicating whether the seen log entry was created by the current end user." - } - } - }, - "V1EndUserDialogsQueriesSearch_Content": { - "type": "object", - "additionalProperties": false, - "properties": { - "title": { - "description": "The title of the dialog.", - "oneOf": [ - { - "$ref": "#/components/schemas/V1CommonContent_ContentValue" - } - ] - }, - "summary": { - "description": "A short summary of the dialog and its current state.", - "oneOf": [ - { - "$ref": "#/components/schemas/V1CommonContent_ContentValue" - } - ] - }, - "senderName": { - "description": "Overridden sender name. If not supplied, assume \"org\" as the sender name.", - "nullable": true, - "oneOf": [ - { - "$ref": "#/components/schemas/V1CommonContent_ContentValue" - } - ] - }, - "extendedStatus": { - "description": "Used as the human-readable label used to describe the \"ExtendedStatus\" field.", - "nullable": true, - "oneOf": [ - { - "$ref": "#/components/schemas/V1CommonContent_ContentValue" - } - ] - } - } - }, - "V1EndUserDialogsQueriesGet_Dialog": { - "type": "object", - "additionalProperties": false, - "properties": { - "id": { - "type": "string", - "description": "The unique identifier for the dialog in UUIDv7 format.", - "format": "guid", - "example": "01913cd5-784f-7d3b-abef-4c77b1f0972d" - }, - "revision": { - "type": "string", - "description": "The unique identifier for the revision in UUIDv4 format.", - "format": "guid", - "example": "a312cb9c-7632-43c2-aa38-69b06aed56ca" - }, - "org": { - "type": "string", - "description": "The service owner code representing the organization (service owner) related to this dialog.", - "example": "ske" - }, - "serviceResource": { - "type": "string", - "description": "The service identifier for the service that the dialog is related to in URN-format.\nThis corresponds to a service resource in the Altinn Resource Registry.", - "example": "urn:altinn:resource:some-service-identifier" - }, - "serviceResourceType": { - "type": "string", - "description": "The ServiceResource type, as defined in Altinn Resource Registry (see ResourceType)." - }, - "party": { - "type": "string", - "description": "The party code representing the organization or person that the dialog belongs to in URN format.", - "example": "urn:altinn:person:identifier-no:01125512345\nurn:altinn:organization:identifier-no:912345678" - }, - "progress": { - "type": "integer", - "description": "Advisory indicator of progress, represented as 1-100 percentage value. 100% representing a dialog that has come\nto a natural completion (successful or not).", - "format": "int32", - "nullable": true - }, - "process": { - "type": "string", - "description": "Optional process identifier used to indicate a business process this dialog belongs to.", - "nullable": true - }, - "precedingProcess": { - "type": "string", - "description": "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.", - "nullable": true - }, - "extendedStatus": { - "type": "string", - "description": "Arbitrary string with a service-specific indicator of status, typically used to indicate a fine-grained state of\nthe dialog to further specify the \"status\" enum.\n \nRefer to the service-specific documentation provided by the service owner for details on the possible values (if\nin use).", - "nullable": true - }, - "externalReference": { - "type": "string", - "description": "Arbitrary string with a service-specific reference to an external system or service.\n \nRefer to the service-specific documentation provided by the service owner for details (if in use).", - "nullable": true - }, - "dueAt": { - "type": "string", - "description": "The due date for the dialog. Dialogs past due date might be marked as such in frontends but will still be available.", - "format": "date-time", - "nullable": true, - "example": "2022-12-31T23:59:59Z" - }, - "expiresAt": { - "type": "string", - "description": "The expiration date for the dialog. This is the last date when the dialog is available for the end user.\n \nAfter this date is passed, the dialog will be considered expired and no longer available for the end user in any\nAPI. If not supplied, the dialog will be considered to never expire. This field can be changed by the service\nowner after the dialog has been created.", - "format": "date-time", - "nullable": true, - "example": "2022-12-31T23:59:59Z" - }, - "createdAt": { - "type": "string", - "description": "The date and time when the dialog was created.", - "format": "date-time", - "example": "2022-12-31T23:59:59Z" - }, - "updatedAt": { - "type": "string", - "description": "The date and time when the dialog was last updated.", - "format": "date-time", - "example": "2022-12-31T23:59:59Z" - }, - "status": { - "description": "The aggregated status of the dialog.", - "oneOf": [ - { - "$ref": "#/components/schemas/DialogsEntities_DialogStatus" - } - ] - }, - "systemLabel": { - "description": "Current display state.", - "oneOf": [ - { - "$ref": "#/components/schemas/DialogEndUserContextsEntities_SystemLabel" - } - ] - }, - "content": { - "description": "The dialog unstructured text content.", - "oneOf": [ - { - "$ref": "#/components/schemas/V1EndUserDialogsQueriesGet_Content" - } - ] - }, - "dialogToken": { - "type": "string", - "description": "The dialog token. May be used (if supported) against external URLs referred to in this dialog's apiActions,\ntransmissions or attachments. It should also be used for front-channel embeds.", - "nullable": true - }, - "attachments": { - "type": "array", - "description": "The attachments associated with the dialog (on an aggregate level).", - "items": { - "$ref": "#/components/schemas/V1EndUserDialogsQueriesGet_DialogAttachment" - } - }, - "transmissions": { - "type": "array", - "description": "The immutable list of transmissions associated with the dialog.", - "items": { - "$ref": "#/components/schemas/V1EndUserDialogsQueriesGet_DialogTransmission" - } - }, - "guiActions": { - "type": "array", - "description": "The GUI actions associated with the dialog. Should be used in browser-based interactive frontends.", - "items": { - "$ref": "#/components/schemas/V1EndUserDialogsQueriesGet_DialogGuiAction" - } - }, - "apiActions": { - "type": "array", - "description": "The API actions associated with the dialog. Should be used in specialized, non-browser-based integrations.", - "items": { - "$ref": "#/components/schemas/V1EndUserDialogsQueriesGet_DialogApiAction" - } - }, - "activities": { - "type": "array", - "description": "An immutable list of activities associated with the dialog.", - "items": { - "$ref": "#/components/schemas/V1EndUserDialogsQueriesGet_DialogActivity" - } - }, - "seenSinceLastUpdate": { - "type": "array", - "description": "The list of seen log entries for the dialog newer than the dialog ChangedAt date.", - "items": { - "$ref": "#/components/schemas/V1EndUserDialogsQueriesGet_DialogSeenLog" - } - } - } - }, - "V1EndUserDialogsQueriesGet_Content": { - "type": "object", - "additionalProperties": false, - "properties": { - "title": { - "description": "The title of the dialog.", - "oneOf": [ - { - "$ref": "#/components/schemas/V1CommonContent_ContentValue" - } - ] - }, - "summary": { - "description": "A short summary of the dialog and its current state.", - "oneOf": [ - { - "$ref": "#/components/schemas/V1CommonContent_ContentValue" - } - ] - }, - "senderName": { - "description": "Overridden sender name. If not supplied, assume \"org\" as the sender name.", - "nullable": true, - "oneOf": [ - { - "$ref": "#/components/schemas/V1CommonContent_ContentValue" - } - ] - }, - "additionalInfo": { - "description": "Additional information about the dialog, this may contain Markdown.", - "nullable": true, - "oneOf": [ - { - "$ref": "#/components/schemas/V1CommonContent_ContentValue" - } - ] - }, - "extendedStatus": { - "description": "Used as the human-readable label used to describe the \"ExtendedStatus\" field.", - "nullable": true, - "oneOf": [ - { - "$ref": "#/components/schemas/V1CommonContent_ContentValue" - } - ] - }, - "mainContentReference": { - "description": "Front-channel embedded content. Used to dynamically embed content in the frontend from an external URL.", - "nullable": true, - "oneOf": [ - { - "$ref": "#/components/schemas/V1CommonContent_ContentValue" - } - ] - } - } - }, - "V1EndUserDialogsQueriesGet_DialogAttachment": { - "type": "object", - "additionalProperties": false, - "properties": { - "id": { - "type": "string", - "description": "The unique identifier for the attachment in UUIDv7 format.", - "format": "guid" - }, - "displayName": { - "type": "array", - "description": "The display name of the attachment that should be used in GUIs.", - "items": { - "$ref": "#/components/schemas/V1CommonLocalizations_Localization" - } - }, - "urls": { - "type": "array", - "description": "The URLs associated with the attachment, each referring to a different representation of the attachment.", - "items": { - "$ref": "#/components/schemas/V1EndUserDialogsQueriesGet_DialogAttachmentUrl" - } - } - } - }, - "V1EndUserDialogsQueriesGet_DialogAttachmentUrl": { - "type": "object", - "additionalProperties": false, - "properties": { - "id": { - "type": "string", - "description": "The unique identifier for the attachment URL in UUIDv7 format.", - "format": "guid" - }, - "url": { - "type": "string", - "description": "The fully qualified URL of the attachment.", - "format": "uri", - "example": "https://someendpoint.com/someattachment.pdf" - }, - "mediaType": { - "type": "string", - "description": "The media type of the attachment.", - "nullable": true, - "example": "application/pdf\napplication/zip" - }, - "consumerType": { - "description": "What type of consumer the URL is intended for.", - "oneOf": [ - { - "$ref": "#/components/schemas/Attachments_AttachmentUrlConsumerType" - } - ] - } - } - }, - "V1EndUserDialogsQueriesGet_DialogTransmission": { - "type": "object", - "additionalProperties": false, - "properties": { - "id": { - "type": "string", - "description": "The unique identifier for the transmission in UUIDv7 format.", - "format": "guid" - }, - "createdAt": { - "type": "string", - "description": "The date and time when the transmission was created.", - "format": "date-time" - }, - "authorizationAttribute": { - "type": "string", - "description": "Contains an authorization resource attributeId, that can used in custom authorization rules in the XACML service\npolicy, which by default is the policy belonging to the service referred to by \"serviceResource\" in the dialog.\n \nCan also be used to refer to other service policies.", - "nullable": true, - "example": "mycustomresource\n/* equivalent to the above */\nurn:altinn:subresource:mycustomresource\nurn:altinn:task:Task_1\n/* refer to another service */\nurn:altinn:resource:some-other-service-identifier" - }, - "isAuthorized": { - "type": "boolean", - "description": "Flag indicating if the authenticated user is authorized for this transmission. If not, embedded content and\nthe attachments will not be available." - }, - "extendedType": { - "type": "string", - "description": "Arbitrary URI/URN describing a service-specific transmission type.\n \nRefer to the service-specific documentation provided by the service owner for details (if in use).", - "format": "uri", - "nullable": true - }, - "relatedTransmissionId": { - "type": "string", - "description": "Reference to any other transmission that this transmission is related to.", - "format": "guid", - "nullable": true - }, - "type": { - "description": "The type of transmission.", - "oneOf": [ - { - "$ref": "#/components/schemas/DialogsEntitiesTransmissions_DialogTransmissionType" - } - ] - }, - "sender": { - "description": "The actor that sent the transmission.", - "oneOf": [ - { - "$ref": "#/components/schemas/V1EndUserCommonActors_Actor" - } - ] - }, - "content": { - "description": "The transmission unstructured text content.", - "oneOf": [ - { - "$ref": "#/components/schemas/V1EndUserDialogsQueriesGet_DialogTransmissionContent" - } - ] - }, - "attachments": { - "type": "array", - "description": "The transmission-level attachments.", - "items": { - "$ref": "#/components/schemas/V1EndUserDialogsQueriesGet_DialogTransmissionAttachment" - } - } - } - }, - "V1EndUserDialogsQueriesGet_DialogTransmissionContent": { - "type": "object", - "additionalProperties": false, - "properties": { - "title": { - "description": "The transmission title.", - "oneOf": [ - { - "$ref": "#/components/schemas/V1CommonContent_ContentValue" - } - ] - }, - "summary": { - "description": "The transmission summary.", - "oneOf": [ - { - "$ref": "#/components/schemas/V1CommonContent_ContentValue" - } - ] - }, - "contentReference": { - "description": "Front-channel embedded content. Used to dynamically embed content in the frontend from an external URL.\nAllowed media types: application/vnd.dialogporten.frontchannelembed+json;type=markdown", - "nullable": true, - "oneOf": [ - { - "$ref": "#/components/schemas/V1CommonContent_ContentValue" - } - ] - } - } - }, - "V1EndUserDialogsQueriesGet_DialogTransmissionAttachment": { - "type": "object", - "additionalProperties": false, - "properties": { - "id": { - "type": "string", - "description": "The unique identifier for the attachment in UUIDv7 format.", - "format": "guid" - }, - "displayName": { - "type": "array", - "description": "The display name of the attachment that should be used in GUIs.", - "items": { - "$ref": "#/components/schemas/V1CommonLocalizations_Localization" - } - }, - "urls": { - "type": "array", - "description": "The URLs associated with the attachment, each referring to a different representation of the attachment.", - "items": { - "$ref": "#/components/schemas/V1EndUserDialogsQueriesGet_DialogTransmissionAttachmentUrl" - } - } - } - }, - "V1EndUserDialogsQueriesGet_DialogTransmissionAttachmentUrl": { - "type": "object", - "additionalProperties": false, - "properties": { - "url": { - "type": "string", - "description": "The fully qualified URL of the attachment. Will be set to \"urn:dialogporten:unauthorized\" if the user is\nnot authorized to access the transmission.", - "format": "uri", - "example": "https://someendpoint.com/someattachment.pdf\nurn:dialogporten:unauthorized" - }, - "mediaType": { - "type": "string", - "description": "The media type of the attachment.", - "nullable": true, - "example": "application/pdf\napplication/zip" - }, - "consumerType": { - "description": "The type of consumer the URL is intended for.", - "oneOf": [ - { - "$ref": "#/components/schemas/Attachments_AttachmentUrlConsumerType" - } - ] - } - } - }, - "V1EndUserDialogsQueriesGet_DialogGuiAction": { - "type": "object", - "additionalProperties": false, - "properties": { - "id": { - "type": "string", - "description": "The unique identifier for the action in UUIDv7 format.", - "format": "guid" - }, - "action": { - "type": "string", - "description": "The action identifier for the action, corresponding to the \"action\" attributeId used in the XACML service policy." - }, - "url": { - "type": "string", - "description": "The fully qualified URL of the action, to which the user will be redirected when the action is triggered. Will be set to\n\"urn:dialogporten:unauthorized\" if the user is not authorized to perform the action.", - "format": "uri", - "example": "urn:dialogporten:unauthorized\nhttps://someendpoint.com/gui/some-service-instance-id" - }, - "authorizationAttribute": { - "type": "string", - "description": "Contains an authorization resource attributeId, that can used in custom authorization rules in the XACML service\npolicy, which by default is the policy belonging to the service referred to by \"serviceResource\" in the dialog.\n \nCan also be used to refer to other service policies.", - "nullable": true, - "example": "mycustomresource\n/* equivalent to the above */\nurn:altinn:subresource:mycustomresource\nurn:altinn:task:Task_1\n/* refer to another service */\nurn:altinn:resource:some-other-service-identifier" - }, - "isAuthorized": { - "type": "boolean", - "description": "Whether the user is authorized to perform the action." - }, - "isDeleteDialogAction": { - "type": "boolean", - "description": "Indicates whether the action results in the dialog being deleted. Used by frontends to implement custom UX\nfor delete actions." - }, - "priority": { - "description": "Indicates a priority for the action, making it possible for frontends to adapt GUI elements based on action\npriority.", - "oneOf": [ - { - "$ref": "#/components/schemas/DialogsEntitiesActions_DialogGuiActionPriority" - } - ] - }, - "httpMethod": { - "description": "The HTTP method that the frontend should use when redirecting the user.", - "oneOf": [ - { - "$ref": "#/components/schemas/Http_HttpVerb" - } - ] - }, - "title": { - "type": "array", - "description": "The title of the action, this should be short and in verb form.", - "items": { - "$ref": "#/components/schemas/V1CommonLocalizations_Localization" - } - }, - "prompt": { - "type": "array", - "description": "If there should be a prompt asking the user for confirmation before the action is executed,\nthis field should contain the prompt text.", - "nullable": true, - "items": { - "$ref": "#/components/schemas/V1CommonLocalizations_Localization" - } - } - } - }, - "V1EndUserDialogsQueriesGet_DialogApiAction": { - "type": "object", - "additionalProperties": false, - "properties": { - "id": { - "type": "string", - "description": "The unique identifier for the action in UUIDv7 format.", - "format": "guid" - }, - "action": { - "type": "string", - "description": "String identifier for the action, corresponding to the \"action\" attributeId used in the XACML service policy,\nwhich by default is the policy belonging to the service referred to by \"serviceResource\" in the dialog.", - "example": "write" - }, - "authorizationAttribute": { - "type": "string", - "description": "Contains an authorization resource attributeId, that can used in custom authorization rules in the XACML service\npolicy, which by default is the policy belonging to the service referred to by \"serviceResource\" in the dialog.\n \nCan also be used to refer to other service policies.", - "nullable": true, - "example": "mycustomresource\n/* equivalent to the above */\nurn:altinn:subresource:mycustomresource\nurn:altinn:task:Task_1\n/* refer to another service */\nurn:altinn:resource:some-other-service-identifier" - }, - "isAuthorized": { - "type": "boolean", - "description": "True if the authenticated user is authorized for this action. If not, the action will not be available\nand all endpoints will be replaced with a fixed placeholder." - }, - "endpoints": { - "type": "array", - "description": "The endpoints associated with the action.", - "items": { - "$ref": "#/components/schemas/V1EndUserDialogsQueriesGet_DialogApiActionEndpoint" - } - } - } - }, - "V1EndUserDialogsQueriesGet_DialogApiActionEndpoint": { - "type": "object", - "additionalProperties": false, - "properties": { - "id": { - "type": "string", - "description": "The unique identifier for the endpoint in UUIDv7 format.", - "format": "guid" - }, - "version": { - "type": "string", - "description": "Arbitrary string indicating the version of the endpoint.\n \nConsult the service-specific documentation provided by the service owner for details (if in use).", - "nullable": true - }, - "url": { - "type": "string", - "description": "The fully qualified URL of the API endpoint. Will be set to \"urn:dialogporten:unauthorized\" if the user is\nnot authorized to perform the action.", - "format": "uri", - "example": "https://someendpoint.com/api/v1/someaction\nurn:dialogporten:unauthorized" - }, - "httpMethod": { - "description": "The HTTP method that the endpoint expects for this action.", - "oneOf": [ - { - "$ref": "#/components/schemas/Http_HttpVerb" - } - ] - }, - "documentationUrl": { - "type": "string", - "description": "Link to service provider documentation for the endpoint. Used for service owners to provide documentation for\nintegrators. Should be a URL to a human-readable page.", - "format": "uri", - "nullable": true - }, - "requestSchema": { - "type": "string", - "description": "Link to the request schema for the endpoint. Used by service owners to provide documentation for integrators.\nDialogporten will not validate information on this endpoint.", - "format": "uri", - "nullable": true - }, - "responseSchema": { - "type": "string", - "description": "Link to the response schema for the endpoint. Used for service owners to provide documentation for integrators.\nDialogporten will not validate information on this endpoint.", - "format": "uri", - "nullable": true - }, - "deprecated": { - "type": "boolean", - "description": "Boolean indicating if the endpoint is deprecated. Integrators should migrate to endpoints with a higher version." - }, - "sunsetAt": { - "type": "string", - "description": "Date and time when the service owner has indicated that endpoint will no longer function. Only set if the endpoint\nis deprecated. Dialogporten will not enforce this date.", - "format": "date-time", - "nullable": true - } - } - }, - "V1EndUserDialogsQueriesGet_DialogActivity": { - "type": "object", - "additionalProperties": false, - "properties": { - "id": { - "type": "string", - "description": "The unique identifier for the activity in UUIDv7 format.", - "format": "guid" - }, - "createdAt": { - "type": "string", - "description": "The date and time when the activity was created.", - "format": "date-time", - "nullable": true - }, - "extendedType": { - "type": "string", - "description": "An arbitrary URI/URN with a service-specific activity type.\n \nConsult the service-specific documentation provided by the service owner for details (if in use).", - "format": "uri", - "nullable": true - }, - "type": { - "description": "The type of activity.", - "oneOf": [ - { - "$ref": "#/components/schemas/DialogsEntitiesActivities_DialogActivityType" - } - ] - }, - "transmissionId": { - "type": "string", - "description": "If the activity is related to a particular transmission, this field will contain the transmission identifier.", - "format": "guid", - "nullable": true - }, - "performedBy": { - "description": "The actor that performed the activity.", - "oneOf": [ - { - "$ref": "#/components/schemas/V1EndUserCommonActors_Actor" - } - ] - }, - "description": { - "type": "array", - "description": "Unstructured text describing the activity. Only set if the activity type is \"Information\".", - "items": { - "$ref": "#/components/schemas/V1CommonLocalizations_Localization" - } - } - } - }, - "V1EndUserDialogsQueriesGet_DialogSeenLog": { - "type": "object", - "additionalProperties": false, - "properties": { - "id": { - "type": "string", - "description": "The unique identifier for the seen log entry in UUIDv7 format.", - "format": "guid" - }, - "seenAt": { - "type": "string", - "description": "The timestamp when the dialog revision was seen.", - "format": "date-time" - }, - "seenBy": { - "description": "The actor that saw the dialog revision.", - "oneOf": [ - { - "$ref": "#/components/schemas/V1EndUserCommonActors_Actor" - } - ] - }, - "isViaServiceOwner": { - "type": "boolean", - "description": "Flag indicating whether the seen log entry was created via the service owner.\n \nThis is used when the service owner uses the service owner API to implement its own frontend.", - "nullable": true - }, - "isCurrentEndUser": { - "type": "boolean", - "description": "Flag indicating whether the seen log entry was created by the current end user." - } - } - }, - "V1EndUserDialogLabelAssignmentLogQueriesSearch_LabelAssignmentLog": { - "type": "object", - "additionalProperties": false, - "properties": { - "createdAt": { - "type": "string", - "format": "date-time" - }, - "name": { - "type": "string" - }, - "action": { - "type": "string" - }, - "performedBy": { - "$ref": "#/components/schemas/V1EndUserCommonActors_Actor" - } - } - }, - "V1EndUserDialogActivitiesQueriesSearch_Activity": { - "type": "object", - "additionalProperties": false, - "properties": { - "id": { - "type": "string", - "format": "guid" - }, - "createdAt": { - "type": "string", - "format": "date-time" - }, - "extendedType": { - "type": "string", - "format": "uri", - "nullable": true - }, - "seenByEndUserIdHash": { - "type": "string", - "nullable": true - }, - "type": { - "$ref": "#/components/schemas/DialogsEntitiesActivities_DialogActivityType" - }, - "transmissionId": { - "type": "string", - "format": "guid", - "nullable": true - } - } - }, - "V1EndUserDialogActivitiesQueriesGet_Activity": { - "type": "object", - "additionalProperties": false, - "properties": { - "id": { - "type": "string", - "format": "guid" - }, - "createdAt": { - "type": "string", - "format": "date-time", - "nullable": true - }, - "extendedType": { - "type": "string", - "format": "uri", - "nullable": true - }, - "type": { - "$ref": "#/components/schemas/DialogsEntitiesActivities_DialogActivityType" - }, - "transmissionId": { - "type": "string", - "format": "guid", - "nullable": true - }, - "performedBy": { - "$ref": "#/components/schemas/V1EndUserCommonActors_Actor" - }, - "description": { - "type": "array", - "items": { - "$ref": "#/components/schemas/V1CommonLocalizations_Localization" - } - } - } - }, - "JsonPatchOperations_Operation": { - "type": "object", - "additionalProperties": false, - "properties": { - "operationType": { - "$ref": "#/components/schemas/JsonPatchOperations_OperationType" - }, - "path": { - "type": "string", - "nullable": true - }, - "op": { - "type": "string", - "nullable": true - }, - "from": { - "type": "string", - "nullable": true - }, - "value": { - "nullable": true - } - } - }, - "JsonPatchOperations_OperationType": { - "type": "string", - "description": "", - "x-enumNames": [ - "Add", - "Remove", - "Replace", - "Move", - "Copy", - "Test", - "Invalid" - ], - "enum": [ - "Add", - "Remove", - "Replace", - "Move", - "Copy", - "Test", - "Invalid" - ] - } - }, - "securitySchemes": { - "JWTBearerAuth": { - "type": "http", - "description": "Enter a JWT token to authorize the requests...", - "scheme": "Bearer", - "bearerFormat": "JWT" - } - } - } -} \ No newline at end of file diff --git a/docs/schema/V1/swagger.verified.json b/docs/schema/V1/swagger.verified.json index 7a682d578..73cab3ae3 100644 --- a/docs/schema/V1/swagger.verified.json +++ b/docs/schema/V1/swagger.verified.json @@ -1,2248 +1,2528 @@ { - "components": { - "schemas": { - "Actors_ActorType": { - "description": "", - "enum": [ - "PartyRepresentative", - "ServiceOwner" - ], - "type": "string", - "x-enumNames": [ - "PartyRepresentative", - "ServiceOwner" - ] - }, - "Attachments_AttachmentUrlConsumerType": { - "description": "", - "enum": [ - "Gui", - "Api" - ], - "type": "string", - "x-enumNames": [ - "Gui", - "Api" - ] - }, - "ContinuationTokenSetOfTOrderDefinitionAndTTarget": {}, - "DialogEndUserContextsEntities_SystemLabel": { - "description": "", - "enum": [ - "Default", - "Bin", - "Archive" - ], - "type": "string", - "x-enumNames": [ - "Default", - "Bin", - "Archive" - ] - }, - "DialogsEntities_DialogStatus": { - "description": "", - "enum": [ - "New", - "InProgress", - "Draft", - "Sent", - "RequiresAttention", - "Completed" - ], - "type": "string", - "x-enumNames": [ - "New", - "InProgress", - "Draft", - "Sent", - "RequiresAttention", - "Completed" - ] - }, - "DialogsEntitiesActions_DialogGuiActionPriority": { - "description": "", - "enum": [ - "Primary", - "Secondary", - "Tertiary" - ], - "type": "string", - "x-enumNames": [ - "Primary", - "Secondary", - "Tertiary" - ] - }, - "DialogsEntitiesActivities_DialogActivityType": { - "description": "", - "enum": [ - "DialogCreated", - "DialogClosed", - "Information", - "TransmissionOpened", - "PaymentMade", - "SignatureProvided", - "DialogOpened", - "DialogDeleted", - "DialogRestored", - "SentToSigning", - "SentToFormFill", - "SentToSendIn", - "SentToPayment" - ], - "type": "string", - "x-enumNames": [ - "DialogCreated", - "DialogClosed", - "Information", - "TransmissionOpened", - "PaymentMade", - "SignatureProvided", - "DialogOpened", - "DialogDeleted", - "DialogRestored", - "SentToSigning", - "SentToFormFill", - "SentToSendIn", - "SentToPayment" - ] - }, - "DialogsEntitiesTransmissions_DialogTransmissionType": { - "description": "", - "enum": [ - "Information", - "Acceptance", - "Rejection", - "Request", - "Alert", - "Decision", - "Submission", - "Correction" - ], - "type": "string", - "x-enumNames": [ - "Information", - "Acceptance", - "Rejection", - "Request", - "Alert", - "Decision", - "Submission", - "Correction" - ] - }, - "Http_HttpVerb": { - "description": "", - "enum": [ - "GET", - "POST", - "PUT", - "PATCH", - "DELETE", - "HEAD", - "OPTIONS", - "TRACE", - "CONNECT" - ], - "type": "string", - "x-enumNames": [ - "GET", - "POST", - "PUT", - "PATCH", - "DELETE", - "HEAD", - "OPTIONS", - "TRACE", - "CONNECT" - ] - }, - "JsonPatchOperations_Operation": { - "additionalProperties": false, - "properties": { - "from": { - "nullable": true, - "type": "string" - }, - "op": { - "nullable": true, - "type": "string" - }, - "operationType": { - "$ref": "#/components/schemas/JsonPatchOperations_OperationType" - }, - "path": { - "nullable": true, - "type": "string" - }, - "value": { - "nullable": true - } - }, - "type": "object" - }, - "JsonPatchOperations_OperationType": { - "description": "", - "enum": [ - "Add", - "Remove", - "Replace", - "Move", - "Copy", - "Test", - "Invalid" - ], - "type": "string", - "x-enumNames": [ - "Add", - "Remove", - "Replace", - "Move", - "Copy", - "Test", - "Invalid" - ] - }, - "OrderSetOfTOrderDefinitionAndTTarget": {}, - "PaginatedListOfV1EndUserDialogsQueriesSearch_Dialog": { - "additionalProperties": false, - "properties": { - "continuationToken": { - "description": "The continuation token to be used to fetch the next page of items", - "example": "createdat_2024-07-31T09:09:03.0257090Z,id_0c089101-b7cf-a476-955c-f00a78d74a4e", - "nullable": true, - "type": "string" - }, - "hasNextPage": { - "description": "Whether there are more items available that can be fetched by supplying the continuation token", - "type": "boolean" - }, - "items": { - "description": "The paginated list of items", - "items": { - "$ref": "#/components/schemas/V1EndUserDialogsQueriesSearch_Dialog" - }, - "nullable": true, - "type": "array" - }, - "orderBy": { - "description": "The current sorting order of the items", - "example": "createdat_desc,id_desc", - "type": "string" - } - }, - "type": "object" - }, - "PaginatedListOfV1ServiceOwnerDialogsQueriesSearch_Dialog": { - "additionalProperties": false, - "properties": { - "continuationToken": { - "description": "The continuation token to be used to fetch the next page of items", - "example": "createdat_2024-07-31T09:09:03.0257090Z,id_0c089101-b7cf-a476-955c-f00a78d74a4e", - "nullable": true, - "type": "string" - }, - "hasNextPage": { - "description": "Whether there are more items available that can be fetched by supplying the continuation token", - "type": "boolean" - }, - "items": { - "description": "The paginated list of items", - "items": { - "$ref": "#/components/schemas/V1ServiceOwnerDialogsQueriesSearch_Dialog" - }, - "nullable": true, - "type": "array" - }, - "orderBy": { - "description": "The current sorting order of the items", - "example": "createdat_desc,id_desc", - "type": "string" - } - }, - "type": "object" - }, - "ProblemDetails": { - "additionalProperties": false, - "properties": { - "detail": { - "nullable": true, - "type": "string" - }, - "errors": { - "items": { - "$ref": "#/components/schemas/ProblemDetails_Error" - }, - "nullable": true, - "type": "array" - }, - "instance": { - "default": "/api/route", - "type": "string" - }, - "status": { - "default": 400, - "format": "int32", - "type": "integer" - }, - "title": { - "default": "One or more validation errors occurred.", - "type": "string" - }, - "traceId": { - "default": "0HMPNHL0JHL76:00000001", - "type": "string" - }, - "type": { - "default": "https://www.rfc-editor.org/rfc/rfc7231#section-6.5.1", - "type": "string" - } - }, - "type": "object" - }, - "ProblemDetails_Error": { - "additionalProperties": false, - "properties": { - "code": { - "nullable": true, - "type": "string" - }, - "name": { - "default": "Error or field name", - "type": "string" - }, - "reason": { - "default": "Error reason", - "type": "string" - }, - "severity": { - "nullable": true, - "type": "string" - } - }, - "type": "object" - }, - "V1CommonContent_ContentValue": { - "additionalProperties": false, - "properties": { - "mediaType": { - "description": "Media type of the content, this can also indicate that the content is embeddable.\nFor a list of supported media types, see (link TBD).", - "type": "string" - }, - "value": { - "description": "A list of localizations for the content.", - "items": { - "$ref": "#/components/schemas/V1CommonLocalizations_Localization" - }, - "nullable": true, - "type": "array" - } - }, - "type": "object" - }, - "V1CommonLocalizations_Localization": { - "additionalProperties": false, - "properties": { - "languageCode": { - "description": "The language code of the localization in ISO 639-1 format.", - "example": "nb", - "type": "string" - }, - "value": { - "description": "The localized text or URI reference.", - "type": "string" - } - }, - "type": "object" - }, - "V1EndUserCommonActors_Actor": { - "additionalProperties": false, - "properties": { - "actorId": { - "description": "The identifier of the person or organization that sent the transmission. Mutually exclusive with ActorName.\nMight be omitted if ActorType is \u0022ServiceOwner\u0022.", - "example": "urn:altinn:person:identifier-no:12018212345", - "nullable": true, - "type": "string" - }, - "actorName": { - "description": "Specifies the name of the entity that sent the transmission. Mutually exclusive with ActorId. If ActorId\nis supplied, the name will be automatically populated from the name registries.", - "example": "Ola Nordmann", - "nullable": true, - "type": "string" - }, - "actorType": { - "description": "The type of actor that sent the transmission.", - "oneOf": [ - { - "$ref": "#/components/schemas/Actors_ActorType" + "openapi": "3.0.0", + "info": { + "title": "Dialogporten", + "version": "v1" + }, + "servers": [ + { + "url": "https://localhost:7214/" + } + ], + "paths": { + "/api/v1/.well-known/oauth-authorization-server": { + "get": { + "tags": [ + "Metadata" + ], + "summary": "Gets the OAuth 2.0 Metadata for automatic configuration of clients verifying dialog tokens", + "description": "This endpoint can be used by client integrations supporting automatic discovery of \"OAuth 2.0 Authorization Server\" metadata, enabling verification of dialog tokens issues by Dialogporten.", + "operationId": "V1WellKnownOauthAuthorizationServerGet_GetOauthAuthorizationServer", + "responses": { + "200": { + "description": "The OAuth 2.0 Authorization Server Metadata", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/V1WellKnownOauthAuthorizationServerQueriesGet_GetOauthAuthorizationServer" + } } - ] - } - }, - "type": "object" - }, - "V1EndUserDialogActivitiesQueriesGet_Activity": { - "additionalProperties": false, - "properties": { - "createdAt": { - "format": "date-time", - "nullable": true, - "type": "string" - }, - "description": { - "items": { - "$ref": "#/components/schemas/V1CommonLocalizations_Localization" - }, - "nullable": true, - "type": "array" - }, - "extendedType": { - "format": "uri", - "nullable": true, - "type": "string" - }, - "id": { - "format": "guid", - "type": "string" - }, - "performedBy": { - "$ref": "#/components/schemas/V1EndUserCommonActors_Actor" - }, - "transmissionId": { - "format": "guid", - "nullable": true, - "type": "string" - }, - "type": { - "$ref": "#/components/schemas/DialogsEntitiesActivities_DialogActivityType" - } - }, - "type": "object" - }, - "V1EndUserDialogActivitiesQueriesSearch_Activity": { - "additionalProperties": false, - "properties": { - "createdAt": { - "format": "date-time", - "type": "string" - }, - "extendedType": { - "format": "uri", - "nullable": true, - "type": "string" - }, - "id": { - "format": "guid", - "type": "string" - }, - "seenByEndUserIdHash": { - "nullable": true, - "type": "string" - }, - "transmissionId": { - "format": "guid", - "nullable": true, - "type": "string" - }, - "type": { - "$ref": "#/components/schemas/DialogsEntitiesActivities_DialogActivityType" - } - }, - "type": "object" - }, - "V1EndUserDialogLabelAssignmentLogQueriesSearch_LabelAssignmentLog": { - "additionalProperties": false, - "properties": { - "action": { - "type": "string" - }, - "createdAt": { - "format": "date-time", - "type": "string" - }, - "name": { - "type": "string" - }, - "performedBy": { - "$ref": "#/components/schemas/V1EndUserCommonActors_Actor" - } - }, - "type": "object" - }, - "V1EndUserDialogSeenLogsQueriesGet_SeenLog": { - "additionalProperties": false, - "properties": { - "id": { - "format": "guid", - "type": "string" - }, - "isCurrentEndUser": { - "type": "boolean" - }, - "isViaServiceOwner": { - "type": "boolean" - }, - "seenAt": { - "format": "date-time", - "type": "string" - }, - "seenBy": { - "$ref": "#/components/schemas/V1EndUserCommonActors_Actor" - } - }, - "type": "object" - }, - "V1EndUserDialogSeenLogsQueriesSearch_SeenLog": { - "additionalProperties": false, - "properties": { - "id": { - "format": "guid", - "type": "string" - }, - "isCurrentEndUser": { - "type": "boolean" - }, - "isViaServiceOwner": { - "type": "boolean" - }, - "seenAt": { - "format": "date-time", - "type": "string" - }, - "seenBy": { - "$ref": "#/components/schemas/V1EndUserCommonActors_Actor" + } } - }, - "type": "object" - }, - "V1EndUserDialogsQueriesGet_Content": { - "additionalProperties": false, - "properties": { - "additionalInfo": { - "description": "Additional information about the dialog, this may contain Markdown.", - "nullable": true, - "oneOf": [ - { - "$ref": "#/components/schemas/V1CommonContent_ContentValue" + } + } + }, + "/api/v1/.well-known/jwks.json": { + "get": { + "tags": [ + "Metadata" + ], + "summary": "Gets the JSON Web Key Set (JWKS) containing the public keys used to verify dialog token signatures", + "description": "This endpoint can be used by client integrations supporting automatic discovery of \"OAuth 2.0 Authorization Server\" metadata, enabling verification of dialog tokens issues by Dialogporten.", + "operationId": "V1WellKnownJwksGet_GetJwks", + "responses": { + "200": { + "description": "The OAuth 2.0 Authorization Server Metadata", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/V1WellKnownJwksQueriesGet_GetJwks" + } } - ] - }, - "extendedStatus": { - "description": "Used as the human-readable label used to describe the \u0022ExtendedStatus\u0022 field.", - "nullable": true, - "oneOf": [ - { - "$ref": "#/components/schemas/V1CommonContent_ContentValue" + } + } + } + } + }, + "/api/v1/serviceowner/dialogs/{dialogId}/transmissions": { + "get": { + "tags": [ + "Serviceowner" + ], + "summary": "Gets a list of dialog transmissions", + "description": "Gets the list of transmissions belonging to a dialog", + "operationId": "V1ServiceOwnerDialogTransmissionsSearch_SearchDialogTransmission", + "parameters": [ + { + "name": "dialogId", + "in": "path", + "required": true, + "schema": { + "type": "string", + "format": "guid" + } + } + ], + "responses": { + "200": { + "description": "Successfully returned the dialog transmission list.", + "content": { + "application/json": { + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/V1ServiceOwnerDialogTransmissionsQueriesSearch_Transmission" + } + } } - ] + } }, - "mainContentReference": { - "description": "Front-channel embedded content. Used to dynamically embed content in the frontend from an external URL.", - "nullable": true, - "oneOf": [ - { - "$ref": "#/components/schemas/V1CommonContent_ContentValue" - } - ] + "401": { + "description": "Missing or invalid authentication token. Requires a Maskinporten-token with the scope \"digdir:dialogporten.serviceprovider\"." }, - "senderName": { - "description": "Overridden sender name. If not supplied, assume \u0022org\u0022 as the sender name.", - "nullable": true, - "oneOf": [ - { - "$ref": "#/components/schemas/V1CommonContent_ContentValue" - } - ] + "403": { + "description": "Unauthorized to get the supplied dialog (not owned by authenticated organization or has additional scope requirements defined in policy)." }, - "summary": { - "description": "A short summary of the dialog and its current state.", - "oneOf": [ - { - "$ref": "#/components/schemas/V1CommonContent_ContentValue" + "404": { + "description": "The given dialog ID was not found or is already deleted.", + "content": { + "application/problem+json": { + "schema": { + "$ref": "#/components/schemas/ProblemDetails" + } } - ] + } }, - "title": { - "description": "The title of the dialog.", - "oneOf": [ - { - "$ref": "#/components/schemas/V1CommonContent_ContentValue" - } - ] + "410": { + "description": "Entity with the given key(s) is removed." } }, - "type": "object" + "security": [ + { + "JWTBearerAuth": [] + } + ] }, - "V1EndUserDialogsQueriesGet_Dialog": { - "additionalProperties": false, - "properties": { - "activities": { - "description": "An immutable list of activities associated with the dialog.", - "items": { - "$ref": "#/components/schemas/V1EndUserDialogsQueriesGet_DialogActivity" - }, - "nullable": true, - "type": "array" + "post": { + "tags": [ + "Serviceowner" + ], + "summary": "Adds a transmission to a dialog", + "description": "The transmission is created with the given configuration. For more information see the documentation (link TBD).\n\nOptimistic 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.", + "operationId": "V1ServiceOwnerDialogTransmissionsCreate_DialogTransmission", + "parameters": [ + { + "name": "dialogId", + "in": "path", + "required": true, + "schema": { + "type": "string", + "format": "guid" + } }, - "apiActions": { - "description": "The API actions associated with the dialog. Should be used in specialized, non-browser-based integrations.", - "items": { - "$ref": "#/components/schemas/V1EndUserDialogsQueriesGet_DialogApiAction" - }, - "nullable": true, - "type": "array" + { + "name": "if-Match", + "in": "header", + "schema": { + "type": "string", + "format": "guid", + "nullable": true + } + } + ], + "requestBody": { + "x-name": "CreateTransmissionRequest", + "description": "", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/V1ServiceOwnerDialogTransmissionsCreate_TransmissionRequest" + } + } }, - "attachments": { - "description": "The attachments associated with the dialog (on an aggregate level).", - "items": { - "$ref": "#/components/schemas/V1EndUserDialogsQueriesGet_DialogAttachment" + "required": true, + "x-position": 1 + }, + "responses": { + "201": { + "description": "The UUID of the created dialog transmission. A relative URL to the newly created activity is set in the \"Location\" header.", + "headers": { + "Etag": { + "description": "The new UUID ETag of the dialog", + "schema": { + "type": "string" + }, + "example": "123e4567-e89b-12d3-a456-426614174000" + } }, - "nullable": true, - "type": "array" - }, - "content": { - "description": "The dialog unstructured text content.", - "oneOf": [ - { - "$ref": "#/components/schemas/V1EndUserDialogsQueriesGet_Content" + "content": { + "application/json": { + "schema": { + "type": "string" + }, + "example": "018bb8e5-d9d0-7434-8ec5-569a6c8e01fc" } - ] + } }, - "createdAt": { - "description": "The date and time when the dialog was created.", - "example": "2022-12-31T23:59:59Z", - "format": "date-time", - "type": "string" + "204": { + "description": "No Content" }, - "dialogToken": { - "description": "The dialog token. May be used (if supported) against external URLs referred to in this dialog\u0027s apiActions,\ntransmissions or attachments. It should also be used for front-channel embeds.", - "nullable": true, - "type": "string" + "400": { + "description": "Validation error occured. See problem details for a list of errors.", + "content": { + "application/problem+json": { + "schema": { + "$ref": "#/components/schemas/ProblemDetails" + } + } + } }, - "dueAt": { - "description": "The due date for the dialog. Dialogs past due date might be marked as such in frontends but will still be available.", - "example": "2022-12-31T23:59:59Z", - "format": "date-time", - "nullable": true, - "type": "string" + "401": { + "description": "Missing or invalid authentication token. Requires a Maskinporten-token with the scope \"digdir:dialogporten.serviceprovider\"." }, - "expiresAt": { - "description": "The expiration date for the dialog. This is the last date when the dialog is available for the end user.\n \nAfter this date is passed, the dialog will be considered expired and no longer available for the end user in any\nAPI. If not supplied, the dialog will be considered to never expire. This field can be changed by the service\nowner after the dialog has been created.", - "example": "2022-12-31T23:59:59Z", - "format": "date-time", - "nullable": true, - "type": "string" + "403": { + "description": "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)." }, - "extendedStatus": { - "description": "Arbitrary string with a service-specific indicator of status, typically used to indicate a fine-grained state of\nthe dialog to further specify the \u0022status\u0022 enum.\n \nRefer to the service-specific documentation provided by the service owner for details on the possible values (if\nin use).", - "nullable": true, - "type": "string" + "404": { + "description": "The given dialog ID was not found or is already deleted.", + "content": { + "application/problem+json": { + "schema": { + "$ref": "#/components/schemas/ProblemDetails" + } + } + } }, - "externalReference": { - "description": "Arbitrary string with a service-specific reference to an external system or service.\n \nRefer to the service-specific documentation provided by the service owner for details (if in use).", - "nullable": true, - "type": "string" + "410": { + "description": "Entity with the given key(s) is removed." }, - "guiActions": { - "description": "The GUI actions associated with the dialog. Should be used in browser-based interactive frontends.", - "items": { - "$ref": "#/components/schemas/V1EndUserDialogsQueriesGet_DialogGuiAction" - }, - "nullable": true, - "type": "array" + "412": { + "description": "The supplied If-Match header did not match the current Revision value for the dialog. The request was not applied.", + "content": { + "application/problem+json": { + "schema": { + "$ref": "#/components/schemas/ProblemDetails" + } + } + } }, - "id": { - "description": "The unique identifier for the dialog in UUIDv7 format.", - "example": "01913cd5-784f-7d3b-abef-4c77b1f0972d", - "format": "guid", - "type": "string" + "422": { + "description": "Domain error occured. See problem details for a list of errors.", + "content": { + "application/problem+json": { + "schema": { + "$ref": "#/components/schemas/ProblemDetails" + } + } + } + } + }, + "security": [ + { + "JWTBearerAuth": [] + } + ] + } + }, + "/api/v1/serviceowner/dialogs/{dialogId}/transmissions/{transmissionId}": { + "get": { + "tags": [ + "Serviceowner" + ], + "summary": "Gets a single dialog transmission", + "description": "Gets a single transmission belonging to a dialog. For more information see the documentation (link TBD).", + "operationId": "V1ServiceOwnerDialogTransmissionsGet_GetDialogTransmission", + "parameters": [ + { + "name": "dialogId", + "in": "path", + "required": true, + "schema": { + "type": "string", + "format": "guid" + } }, - "org": { - "description": "The service owner code representing the organization (service owner) related to this dialog.", - "example": "ske", - "type": "string" + { + "name": "transmissionId", + "in": "path", + "required": true, + "schema": { + "type": "string", + "format": "guid" + } + } + ], + "responses": { + "200": { + "description": "Successfully returned the dialog transmission.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/V1ServiceOwnerDialogTransmissionsQueriesGet_Transmission" + } + } + } }, - "party": { - "description": "The party code representing the organization or person that the dialog belongs to in URN format.", - "example": "urn:altinn:person:identifier-no:01125512345\nurn:altinn:organization:identifier-no:912345678", - "type": "string" + "401": { + "description": "Missing or invalid authentication token. Requires a Maskinporten-token with the scope \"digdir:dialogporten.serviceprovider\"." }, - "precedingProcess": { - "description": "Optional preceding process identifier to indicate the business process that preceded the process indicated in the \u0022Process\u0022 field. Cannot be set without also \u0022Process\u0022 being set.", - "nullable": true, - "type": "string" + "403": { + "description": "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)." }, - "process": { - "description": "Optional process identifier used to indicate a business process this dialog belongs to.", - "nullable": true, - "type": "string" + "404": { + "description": "The given dialog ID was not found or was deleted, or the given transmission ID was not found.", + "content": { + "application/problem+json": { + "schema": { + "$ref": "#/components/schemas/ProblemDetails" + } + } + } }, - "progress": { - "description": "Advisory indicator of progress, represented as 1-100 percentage value. 100% representing a dialog that has come\nto a natural completion (successful or not).", - "format": "int32", - "nullable": true, - "type": "integer" + "410": { + "description": "Entity with the given key(s) is removed." + } + }, + "security": [ + { + "JWTBearerAuth": [] + } + ] + } + }, + "/api/v1/serviceowner/dialogs/{dialogId}/seenlog": { + "get": { + "tags": [ + "Serviceowner" + ], + "summary": "Gets all seen log records for a dialog", + "description": "Gets all seen log records for a dialog. For more information see the documentation (link TBD).", + "operationId": "V1ServiceOwnerDialogSeenLogsSearch_SearchDialogSeenLog", + "parameters": [ + { + "name": "dialogId", + "in": "path", + "required": true, + "schema": { + "type": "string", + "format": "guid" + } + } + ], + "responses": { + "200": { + "description": "Successfully returned the dialog seen log records.", + "content": { + "application/json": { + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/V1ServiceOwnerDialogSeenLogsQueriesSearch_SeenLog" + } + } + } + } }, - "revision": { - "description": "The unique identifier for the revision in UUIDv4 format.", - "example": "a312cb9c-7632-43c2-aa38-69b06aed56ca", - "format": "guid", - "type": "string" + "401": { + "description": "Unauthorized" }, - "seenSinceLastUpdate": { - "description": "The list of seen log entries for the dialog newer than the dialog ChangedAt date.", - "items": { - "$ref": "#/components/schemas/V1EndUserDialogsQueriesGet_DialogSeenLog" - }, - "nullable": true, - "type": "array" + "403": { + "description": "Forbidden" }, - "serviceResource": { - "description": "The service identifier for the service that the dialog is related to in URN-format.\nThis corresponds to a service resource in the Altinn Resource Registry.", - "example": "urn:altinn:resource:some-service-identifier", - "type": "string" + "404": { + "description": "The given dialog ID was not found or is already deleted.", + "content": { + "application/problem+json": { + "schema": { + "$ref": "#/components/schemas/ProblemDetails" + } + } + } }, - "serviceResourceType": { - "description": "The ServiceResource type, as defined in Altinn Resource Registry (see ResourceType).", - "type": "string" + "410": { + "description": "Entity with the given key(s) is removed." + } + }, + "security": [ + { + "JWTBearerAuth": [] + } + ] + } + }, + "/api/v1/serviceowner/dialogs/{dialogId}/seenlog/{seenLogId}": { + "get": { + "tags": [ + "Serviceowner" + ], + "summary": "Gets a single dialog seen log record", + "description": "Gets a single dialog seen log record. For more information see the documentation (link TBD).", + "operationId": "V1ServiceOwnerDialogSeenLogsGet_GetDialogSeenLog", + "parameters": [ + { + "name": "dialogId", + "in": "path", + "required": true, + "schema": { + "type": "string", + "format": "guid" + } }, - "status": { - "description": "The aggregated status of the dialog.", - "oneOf": [ - { - "$ref": "#/components/schemas/DialogsEntities_DialogStatus" + { + "name": "seenLogId", + "in": "path", + "required": true, + "schema": { + "type": "string", + "format": "guid" + } + } + ], + "responses": { + "200": { + "description": "Successfully returned the dialog seen log record.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/V1ServiceOwnerDialogSeenLogsQueriesGet_SeenLog" + } } - ] + } }, - "systemLabel": { - "description": "Current display state.", - "oneOf": [ - { - "$ref": "#/components/schemas/DialogEndUserContextsEntities_SystemLabel" + "401": { + "description": "Unauthorized" + }, + "403": { + "description": "Forbidden" + }, + "404": { + "description": "The given dialog ID was not found or is already deleted.", + "content": { + "application/problem+json": { + "schema": { + "$ref": "#/components/schemas/ProblemDetails" + } } - ] + } }, - "transmissions": { - "description": "The immutable list of transmissions associated with the dialog.", - "items": { - "$ref": "#/components/schemas/V1EndUserDialogsQueriesGet_DialogTransmission" - }, - "nullable": true, - "type": "array" + "410": { + "description": "Entity with the given key(s) is removed." + } + }, + "security": [ + { + "JWTBearerAuth": [] + } + ] + } + }, + "/api/v1/serviceowner/dialogs/{dialogId}": { + "put": { + "tags": [ + "Serviceowner" + ], + "summary": "Replaces a dialog", + "description": "Replaces a given dialog with the supplied model. For more information see the documentation (link TBD).\n\nOptimistic 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.", + "operationId": "V1ServiceOwnerDialogsUpdate_Dialog", + "parameters": [ + { + "name": "dialogId", + "in": "path", + "required": true, + "schema": { + "type": "string", + "format": "guid" + } }, - "updatedAt": { - "description": "The date and time when the dialog was last updated.", - "example": "2022-12-31T23:59:59Z", - "format": "date-time", - "type": "string" + { + "name": "if-Match", + "in": "header", + "schema": { + "type": "string", + "format": "guid", + "nullable": true + } } + ], + "requestBody": { + "x-name": "dto", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/V1ServiceOwnerDialogsCommandsUpdate_Dialog" + } + } + }, + "required": true }, - "type": "object" - }, - "V1EndUserDialogsQueriesGet_DialogActivity": { - "additionalProperties": false, - "properties": { - "createdAt": { - "description": "The date and time when the activity was created.", - "format": "date-time", - "nullable": true, - "type": "string" + "responses": { + "204": { + "description": "The dialog aggregate was updated successfully.", + "headers": { + "Etag": { + "description": "The new UUID ETag of the dialog", + "schema": { + "type": "string" + }, + "example": "123e4567-e89b-12d3-a456-426614174000" + } + } }, - "description": { - "description": "Unstructured text describing the activity. Only set if the activity type is \u0022Information\u0022.", - "items": { - "$ref": "#/components/schemas/V1CommonLocalizations_Localization" - }, - "nullable": true, - "type": "array" + "400": { + "description": "Validation error occured. See problem details for a list of errors.", + "content": { + "application/problem+json": { + "schema": { + "$ref": "#/components/schemas/ProblemDetails" + } + } + } }, - "extendedType": { - "description": "An arbitrary URI/URN with a service-specific activity type.\n \nConsult the service-specific documentation provided by the service owner for details (if in use).", - "format": "uri", - "nullable": true, - "type": "string" + "401": { + "description": "Missing or invalid authentication token. Requires a Maskinporten-token with the scope \"digdir:dialogporten.serviceprovider\"." }, - "id": { - "description": "The unique identifier for the activity in UUIDv7 format.", - "format": "guid", - "type": "string" + "403": { + "description": "Unauthorized to update the supplied dialog (not owned by authenticated organization or has additional scope requirements defined in policy)." }, - "performedBy": { - "description": "The actor that performed the activity.", - "oneOf": [ - { - "$ref": "#/components/schemas/V1EndUserCommonActors_Actor" + "404": { + "description": "The given dialog ID was not found or is already deleted.", + "content": { + "application/problem+json": { + "schema": { + "$ref": "#/components/schemas/ProblemDetails" + } } - ] + } }, - "transmissionId": { - "description": "If the activity is related to a particular transmission, this field will contain the transmission identifier.", - "format": "guid", - "nullable": true, - "type": "string" + "410": { + "description": "Entity with the given key(s) is removed." }, - "type": { - "description": "The type of activity.", - "oneOf": [ - { - "$ref": "#/components/schemas/DialogsEntitiesActivities_DialogActivityType" + "412": { + "description": "The supplied If-Match header did not match the current Revision value for the dialog. The request was not applied.", + "content": { + "application/problem+json": { + "schema": { + "$ref": "#/components/schemas/ProblemDetails" + } } - ] + } + }, + "422": { + "description": "Domain error occured. See problem details for a list of errors.", + "content": { + "application/problem+json": { + "schema": { + "$ref": "#/components/schemas/ProblemDetails" + } + } + } } }, - "type": "object" + "security": [ + { + "JWTBearerAuth": [] + } + ] }, - "V1EndUserDialogsQueriesGet_DialogApiAction": { - "additionalProperties": false, - "properties": { - "action": { - "description": "String identifier for the action, corresponding to the \u0022action\u0022 attributeId used in the XACML service policy,\nwhich by default is the policy belonging to the service referred to by \u0022serviceResource\u0022 in the dialog.", - "example": "write", - "type": "string" + "get": { + "tags": [ + "Serviceowner" + ], + "summary": "Gets a single dialog", + "description": "Gets a single dialog aggregate. For more information see the documentation (link TBD).\n\nNote that this operation may return deleted dialogs (see the field `DeletedAt`).", + "operationId": "V1ServiceOwnerDialogsGet_GetDialog", + "parameters": [ + { + "name": "dialogId", + "in": "path", + "required": true, + "schema": { + "type": "string", + "format": "guid" + } }, - "authorizationAttribute": { - "description": "Contains an authorization resource attributeId, that can used in custom authorization rules in the XACML service\npolicy, which by default is the policy belonging to the service referred to by \u0022serviceResource\u0022 in the dialog.\n \nCan also be used to refer to other service policies.", - "example": "mycustomresource\n/* equivalent to the above */\nurn:altinn:subresource:mycustomresource\nurn:altinn:task:Task_1\n/* refer to another service */\nurn:altinn:resource:some-other-service-identifier", - "nullable": true, - "type": "string" + { + "name": "endUserId", + "in": "query", + "description": "Filter by end user id", + "schema": { + "type": "string", + "nullable": true + } + } + ], + "responses": { + "200": { + "description": "Successfully returned the dialog aggregate.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/V1ServiceOwnerDialogsQueriesGet_Dialog" + } + } + } }, - "endpoints": { - "description": "The endpoints associated with the action.", - "items": { - "$ref": "#/components/schemas/V1EndUserDialogsQueriesGet_DialogApiActionEndpoint" - }, - "nullable": true, - "type": "array" + "401": { + "description": "Missing or invalid authentication token. Requires a Maskinporten-token with the scope \"digdir:dialogporten.serviceprovider\"." }, - "id": { - "description": "The unique identifier for the action in UUIDv7 format.", - "format": "guid", - "type": "string" + "403": { + "description": "Unauthorized to get the supplied dialog (not owned by authenticated organization or has additional scope requirements defined in policy)." }, - "isAuthorized": { - "description": "True if the authenticated user is authorized for this action. If not, the action will not be available\nand all endpoints will be replaced with a fixed placeholder.", - "type": "boolean" + "404": { + "description": "The given dialog ID was not found or is already deleted.", + "content": { + "application/problem+json": { + "schema": { + "$ref": "#/components/schemas/ProblemDetails" + } + } + } } }, - "type": "object" + "security": [ + { + "JWTBearerAuth": [] + } + ] }, - "V1EndUserDialogsQueriesGet_DialogApiActionEndpoint": { - "additionalProperties": false, - "properties": { - "deprecated": { - "description": "Boolean indicating if the endpoint is deprecated. Integrators should migrate to endpoints with a higher version.", - "type": "boolean" - }, - "documentationUrl": { - "description": "Link to service provider documentation for the endpoint. Used for service owners to provide documentation for\nintegrators. Should be a URL to a human-readable page.", - "format": "uri", - "nullable": true, - "type": "string" + "delete": { + "tags": [ + "Serviceowner" + ], + "summary": "Deletes a dialog", + "description": "Deletes a given dialog (soft delete). For more information see the documentation (link TBD).\n\nNote 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.\nIf end users attempt to access the dialog via the details endpoint, they will get a 410 Gone response.\n\nOptimistic 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.", + "operationId": "V1ServiceOwnerDialogsDelete_Dialog", + "parameters": [ + { + "name": "dialogId", + "in": "path", + "required": true, + "schema": { + "type": "string", + "format": "guid" + } }, - "httpMethod": { - "description": "The HTTP method that the endpoint expects for this action.", - "oneOf": [ - { - "$ref": "#/components/schemas/Http_HttpVerb" + { + "name": "if-Match", + "in": "header", + "schema": { + "type": "string", + "format": "guid", + "nullable": true + } + } + ], + "responses": { + "204": { + "description": "The dialog aggregate was deleted successfully.", + "headers": { + "Etag": { + "description": "The new UUID ETag of the dialog", + "schema": { + "type": "string" + }, + "example": "123e4567-e89b-12d3-a456-426614174000" } - ] - }, - "id": { - "description": "The unique identifier for the endpoint in UUIDv7 format.", - "format": "guid", - "type": "string" - }, - "requestSchema": { - "description": "Link to the request schema for the endpoint. Used by service owners to provide documentation for integrators.\nDialogporten will not validate information on this endpoint.", - "format": "uri", - "nullable": true, - "type": "string" + } }, - "responseSchema": { - "description": "Link to the response schema for the endpoint. Used for service owners to provide documentation for integrators.\nDialogporten will not validate information on this endpoint.", - "format": "uri", - "nullable": true, - "type": "string" + "400": { + "description": "Validation error occured. See problem details for a list of errors.", + "content": { + "application/problem+json": { + "schema": { + "$ref": "#/components/schemas/ProblemDetails" + } + } + } }, - "sunsetAt": { - "description": "Date and time when the service owner has indicated that endpoint will no longer function. Only set if the endpoint\nis deprecated. Dialogporten will not enforce this date.", - "format": "date-time", - "nullable": true, - "type": "string" + "401": { + "description": "Missing or invalid authentication token. Requires a Maskinporten-token with the scope \"digdir:dialogporten.serviceprovider\"." }, - "url": { - "description": "The fully qualified URL of the API endpoint. Will be set to \u0022urn:dialogporten:unauthorized\u0022 if the user is\nnot authorized to perform the action.", - "example": "https://someendpoint.com/api/v1/someaction\nurn:dialogporten:unauthorized", - "format": "uri", - "type": "string" + "403": { + "description": "Unauthorized to delete the supplied dialog (not owned by authenticated organization or has additional scope requirements defined in policy)." }, - "version": { - "description": "Arbitrary string indicating the version of the endpoint.\n \nConsult the service-specific documentation provided by the service owner for details (if in use).", - "nullable": true, - "type": "string" - } - }, - "type": "object" - }, - "V1EndUserDialogsQueriesGet_DialogAttachment": { - "additionalProperties": false, - "properties": { - "displayName": { - "description": "The display name of the attachment that should be used in GUIs.", - "items": { - "$ref": "#/components/schemas/V1CommonLocalizations_Localization" - }, - "nullable": true, - "type": "array" + "404": { + "description": "The given dialog ID was not found or is already deleted.", + "content": { + "application/problem+json": { + "schema": { + "$ref": "#/components/schemas/ProblemDetails" + } + } + } }, - "id": { - "description": "The unique identifier for the attachment in UUIDv7 format.", - "format": "guid", - "type": "string" + "410": { + "description": "Entity with the given key(s) is removed." }, - "urls": { - "description": "The URLs associated with the attachment, each referring to a different representation of the attachment.", - "items": { - "$ref": "#/components/schemas/V1EndUserDialogsQueriesGet_DialogAttachmentUrl" - }, - "nullable": true, - "type": "array" + "412": { + "description": "The supplied If-Match header did not match the current Revision value for the dialog. The request was not applied.", + "content": { + "application/problem+json": { + "schema": { + "$ref": "#/components/schemas/ProblemDetails" + } + } + } } }, - "type": "object" - }, - "V1EndUserDialogsQueriesGet_DialogAttachmentUrl": { - "additionalProperties": false, - "properties": { - "consumerType": { - "description": "What type of consumer the URL is intended for.", - "oneOf": [ - { - "$ref": "#/components/schemas/Attachments_AttachmentUrlConsumerType" - } - ] - }, - "id": { - "description": "The unique identifier for the attachment URL in UUIDv7 format.", - "format": "guid", - "type": "string" - }, - "mediaType": { - "description": "The media type of the attachment.", - "example": "application/pdf\napplication/zip", - "nullable": true, - "type": "string" - }, - "url": { - "description": "The fully qualified URL of the attachment.", - "example": "https://someendpoint.com/someattachment.pdf", - "format": "uri", - "type": "string" + "security": [ + { + "JWTBearerAuth": [] } - }, - "type": "object" + ] }, - "V1EndUserDialogsQueriesGet_DialogGuiAction": { - "additionalProperties": false, - "properties": { - "action": { - "description": "The action identifier for the action, corresponding to the \u0022action\u0022 attributeId used in the XACML service policy.", - "type": "string" + "patch": { + "tags": [ + "Serviceowner" + ], + "summary": "Patch a single dialog", + "description": "Patches a dialog aggregate with a RFC6902 JSON Patch document. The patch document must be a JSON array of RFC6902 operations.\nSee [https://tools.ietf.org/html/rfc6902](https://tools.ietf.org/html/rfc6902) for more information.\n \nOptimistic 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.", + "operationId": "V1ServiceOwnerDialogsPatchDialog", + "parameters": [ + { + "name": "dialogId", + "in": "path", + "required": true, + "schema": { + "type": "string", + "format": "guid" + }, + "x-position": 1 }, - "authorizationAttribute": { - "description": "Contains an authorization resource attributeId, that can used in custom authorization rules in the XACML service\npolicy, which by default is the policy belonging to the service referred to by \u0022serviceResource\u0022 in the dialog.\n \nCan also be used to refer to other service policies.", - "example": "mycustomresource\n/* equivalent to the above */\nurn:altinn:subresource:mycustomresource\nurn:altinn:task:Task_1\n/* refer to another service */\nurn:altinn:resource:some-other-service-identifier", - "nullable": true, - "type": "string" + { + "name": "If-Match", + "x-originalName": "etag", + "in": "header", + "schema": { + "type": "string", + "format": "guid", + "nullable": true + }, + "x-position": 2 + } + ], + "requestBody": { + "x-name": "patchDocument", + "content": { + "application/json": { + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/JsonPatchOperations_Operation" + } + } + } }, - "httpMethod": { - "description": "The HTTP method that the frontend should use when redirecting the user.", - "oneOf": [ - { - "$ref": "#/components/schemas/Http_HttpVerb" + "required": true, + "x-position": 3 + }, + "responses": { + "204": { + "description": "Patch was successfully applied.", + "headers": { + "Etag": { + "description": "The new UUID ETag of the dialog", + "schema": { + "type": "string" + }, + "example": "123e4567-e89b-12d3-a456-426614174000" } - ] + } }, - "id": { - "description": "The unique identifier for the action in UUIDv7 format.", - "format": "guid", - "type": "string" + "400": { + "description": "Validation error occured. See problem details for a list of errors.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ProblemDetails" + } + } + } }, - "isAuthorized": { - "description": "Whether the user is authorized to perform the action.", - "type": "boolean" + "401": { + "description": "Missing or invalid authentication token. Requires a Maskinporten-token with the scope \\\"digdir:dialogporten.serviceprovider\\\"" }, - "isDeleteDialogAction": { - "description": "Indicates whether the action results in the dialog being deleted. Used by frontends to implement custom UX\nfor delete actions.", - "type": "boolean" + "403": { + "description": "Unauthorized to update a dialog for the given serviceResource (not owned by authenticated organization or has additional scope requirements defined in policy)" }, - "priority": { - "description": "Indicates a priority for the action, making it possible for frontends to adapt GUI elements based on action\npriority.", - "oneOf": [ - { - "$ref": "#/components/schemas/DialogsEntitiesActions_DialogGuiActionPriority" + "404": { + "description": "The given dialog ID was not found or is deleted", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ProblemDetails" + } } - ] - }, - "prompt": { - "description": "If there should be a prompt asking the user for confirmation before the action is executed,\nthis field should contain the prompt text.", - "items": { - "$ref": "#/components/schemas/V1CommonLocalizations_Localization" - }, - "nullable": true, - "type": "array" + } }, - "title": { - "description": "The title of the action, this should be short and in verb form.", - "items": { - "$ref": "#/components/schemas/V1CommonLocalizations_Localization" - }, - "nullable": true, - "type": "array" + "412": { + "description": "The supplied Revision does not match the current Revision of the dialog", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ProblemDetails" + } + } + } }, - "url": { - "description": "The fully qualified URL of the action, to which the user will be redirected when the action is triggered. Will be set to\n\u0022urn:dialogporten:unauthorized\u0022 if the user is not authorized to perform the action.", - "example": "urn:dialogporten:unauthorized\nhttps://someendpoint.com/gui/some-service-instance-id", - "format": "uri", - "type": "string" + "422": { + "description": "Domain error occured. See problem details for a list of errors.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ProblemDetails" + } + } + } } }, - "type": "object" - }, - "V1EndUserDialogsQueriesGet_DialogSeenLog": { - "additionalProperties": false, - "properties": { - "id": { - "description": "The unique identifier for the seen log entry in UUIDv7 format.", - "format": "guid", - "type": "string" + "security": [ + { + "JWTBearerAuth": [] + } + ] + } + }, + "/api/v1/serviceowner/dialogs": { + "get": { + "tags": [ + "Serviceowner" + ], + "summary": "Gets a list of dialogs", + "description": "Performs a search for dialogs, returning a paginated list of dialogs. For more information see the documentation (link TBD).\n\n* All date parameters must contain explicit time zone. Example: 2023-10-27T10:00:00Z or 2023-10-27T10:00:00+01:00\n* See \"continuationToken\" in the response for how to get the next page of results.\n* hasNextPage will be set to true if there are more items to get.", + "operationId": "V1ServiceOwnerDialogsSearch_SearchDialog", + "parameters": [ + { + "name": "serviceResource", + "in": "query", + "style": "form", + "explode": true, + "description": "Filter by one or more service resources", + "schema": { + "type": "array", + "nullable": true, + "items": { + "type": "string" + } + } }, - "isCurrentEndUser": { - "description": "Flag indicating whether the seen log entry was created by the current end user.", - "type": "boolean" + { + "name": "party", + "in": "query", + "style": "form", + "explode": true, + "description": "Filter by one or more owning parties", + "schema": { + "type": "array", + "nullable": true, + "items": { + "type": "string" + } + } }, - "isViaServiceOwner": { - "description": "Flag indicating whether the seen log entry was created via the service owner.\n \nThis is used when the service owner uses the service owner API to implement its own frontend.", - "nullable": true, - "type": "boolean" + { + "name": "endUserId", + "in": "query", + "description": "Filter by end user id", + "schema": { + "type": "string", + "nullable": true + } }, - "seenAt": { - "description": "The timestamp when the dialog revision was seen.", - "format": "date-time", - "type": "string" + { + "name": "extendedStatus", + "in": "query", + "style": "form", + "explode": true, + "description": "Filter by one or more extended statuses", + "schema": { + "type": "array", + "nullable": true, + "items": { + "type": "string" + } + } }, - "seenBy": { - "description": "The actor that saw the dialog revision.", - "oneOf": [ - { - "$ref": "#/components/schemas/V1EndUserCommonActors_Actor" + { + "name": "externalReference", + "in": "query", + "description": "Filter by external reference", + "schema": { + "type": "string", + "nullable": true + } + }, + { + "name": "status", + "in": "query", + "style": "form", + "explode": true, + "description": "Filter by status", + "schema": { + "type": "array", + "nullable": true, + "items": { + "$ref": "#/components/schemas/DialogsEntities_DialogStatus" } - ] - } - }, - "type": "object" - }, - "V1EndUserDialogsQueriesGet_DialogTransmission": { - "additionalProperties": false, - "properties": { - "attachments": { - "description": "The transmission-level attachments.", - "items": { - "$ref": "#/components/schemas/V1EndUserDialogsQueriesGet_DialogTransmissionAttachment" - }, - "nullable": true, - "type": "array" + } }, - "authorizationAttribute": { - "description": "Contains an authorization resource attributeId, that can used in custom authorization rules in the XACML service\npolicy, which by default is the policy belonging to the service referred to by \u0022serviceResource\u0022 in the dialog.\n \nCan also be used to refer to other service policies.", - "example": "mycustomresource\n/* equivalent to the above */\nurn:altinn:subresource:mycustomresource\nurn:altinn:task:Task_1\n/* refer to another service */\nurn:altinn:resource:some-other-service-identifier", - "nullable": true, - "type": "string" + { + "name": "createdAfter", + "in": "query", + "description": "Only return dialogs created after this date", + "schema": { + "type": "string", + "format": "date-time", + "nullable": true + } + }, + { + "name": "createdBefore", + "in": "query", + "description": "Only return dialogs created before this date", + "schema": { + "type": "string", + "format": "date-time", + "nullable": true + } + }, + { + "name": "updatedAfter", + "in": "query", + "description": "Only return dialogs updated after this date", + "schema": { + "type": "string", + "format": "date-time", + "nullable": true + } }, - "content": { - "description": "The transmission unstructured text content.", - "oneOf": [ - { - "$ref": "#/components/schemas/V1EndUserDialogsQueriesGet_DialogTransmissionContent" - } - ] + { + "name": "updatedBefore", + "in": "query", + "description": "Only return dialogs updated before this date", + "schema": { + "type": "string", + "format": "date-time", + "nullable": true + } }, - "createdAt": { - "description": "The date and time when the transmission was created.", - "format": "date-time", - "type": "string" + { + "name": "dueAfter", + "in": "query", + "description": "Only return dialogs with due date after this date", + "schema": { + "type": "string", + "format": "date-time", + "nullable": true + } }, - "extendedType": { - "description": "Arbitrary URI/URN describing a service-specific transmission type.\n \nRefer to the service-specific documentation provided by the service owner for details (if in use).", - "format": "uri", - "nullable": true, - "type": "string" + { + "name": "dueBefore", + "in": "query", + "description": "Only return dialogs with due date before this date", + "schema": { + "type": "string", + "format": "date-time", + "nullable": true + } }, - "id": { - "description": "The unique identifier for the transmission in UUIDv7 format.", - "format": "guid", - "type": "string" + { + "name": "visibleAfter", + "in": "query", + "description": "Only return dialogs with visible-from date after this date", + "schema": { + "type": "string", + "format": "date-time", + "nullable": true + } }, - "isAuthorized": { - "description": "Flag indicating if the authenticated user is authorized for this transmission. If not, embedded content and\nthe attachments will not be available.", - "type": "boolean" + { + "name": "visibleBefore", + "in": "query", + "description": "Only return dialogs with visible-from date before this date", + "schema": { + "type": "string", + "format": "date-time", + "nullable": true + } }, - "relatedTransmissionId": { - "description": "Reference to any other transmission that this transmission is related to.", - "format": "guid", - "nullable": true, - "type": "string" + { + "name": "process", + "in": "query", + "description": "Filter by process", + "schema": { + "type": "string", + "nullable": true + } }, - "sender": { - "description": "The actor that sent the transmission.", - "oneOf": [ - { - "$ref": "#/components/schemas/V1EndUserCommonActors_Actor" + { + "name": "systemLabel", + "in": "query", + "style": "form", + "explode": true, + "description": "Filter by Display state", + "schema": { + "type": "array", + "nullable": true, + "items": { + "$ref": "#/components/schemas/DialogEndUserContextsEntities_SystemLabel" } - ] + } }, - "type": { - "description": "The type of transmission.", - "oneOf": [ - { - "$ref": "#/components/schemas/DialogsEntitiesTransmissions_DialogTransmissionType" - } - ] - } - }, - "type": "object" - }, - "V1EndUserDialogsQueriesGet_DialogTransmissionAttachment": { - "additionalProperties": false, - "properties": { - "displayName": { - "description": "The display name of the attachment that should be used in GUIs.", - "items": { - "$ref": "#/components/schemas/V1CommonLocalizations_Localization" - }, - "nullable": true, - "type": "array" + { + "name": "search", + "in": "query", + "description": "Search string for free text search. Will attempt to fuzzily match in all free text fields in the aggregate", + "schema": { + "type": "string", + "nullable": true + } }, - "id": { - "description": "The unique identifier for the attachment in UUIDv7 format.", - "format": "guid", - "type": "string" + { + "name": "searchLanguageCode", + "in": "query", + "description": "Limit free text search to texts with this language code, e.g. 'nb', 'en'. Culture codes will be normalized to neutral language codes (ISO 639). Default: search all culture codes", + "schema": { + "type": "string", + "nullable": true + } }, - "urls": { - "description": "The URLs associated with the attachment, each referring to a different representation of the attachment.", - "items": { - "$ref": "#/components/schemas/V1EndUserDialogsQueriesGet_DialogTransmissionAttachmentUrl" - }, - "nullable": true, - "type": "array" + { + "name": "orderBy", + "in": "query", + "schema": { + "nullable": true, + "oneOf": [ + { + "$ref": "#/components/schemas/OrderSetOfTOrderDefinitionAndTTarget" + } + ] + } + }, + { + "name": "continuationToken", + "in": "query", + "description": "Supply \"continuationToken\" for the response to get the next page of results, if hasNextPage is true", + "schema": { + "nullable": true, + "oneOf": [ + { + "$ref": "#/components/schemas/ContinuationTokenSetOfTOrderDefinitionAndTTarget" + } + ] + } + }, + { + "name": "limit", + "in": "query", + "description": "Limit the number of results per page (1-1000, default: 100)", + "schema": { + "type": "integer", + "format": "int32", + "nullable": true + } } - }, - "type": "object" - }, - "V1EndUserDialogsQueriesGet_DialogTransmissionAttachmentUrl": { - "additionalProperties": false, - "properties": { - "consumerType": { - "description": "The type of consumer the URL is intended for.", - "oneOf": [ - { - "$ref": "#/components/schemas/Attachments_AttachmentUrlConsumerType" + ], + "responses": { + "200": { + "description": "Successfully returned the dialog list.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/PaginatedListOfV1ServiceOwnerDialogsQueriesSearch_Dialog" + } } - ] - }, - "mediaType": { - "description": "The media type of the attachment.", - "example": "application/pdf\napplication/zip", - "nullable": true, - "type": "string" + } }, - "url": { - "description": "The fully qualified URL of the attachment. Will be set to \u0022urn:dialogporten:unauthorized\u0022 if the user is\nnot authorized to access the transmission.", - "example": "https://someendpoint.com/someattachment.pdf\nurn:dialogporten:unauthorized", - "format": "uri", - "type": "string" + "401": { + "description": "Missing or invalid authentication token. Requires a Maskinporten-token with the scope \"digdir:dialogporten.serviceprovider.search\"." } }, - "type": "object" + "security": [ + { + "JWTBearerAuth": [] + } + ] }, - "V1EndUserDialogsQueriesGet_DialogTransmissionContent": { - "additionalProperties": false, - "properties": { - "contentReference": { - "description": "Front-channel embedded content. Used to dynamically embed content in the frontend from an external URL.\nAllowed media types: application/vnd.dialogporten.frontchannelembed\u002Bjson;type=markdown", - "nullable": true, - "oneOf": [ - { - "$ref": "#/components/schemas/V1CommonContent_ContentValue" - } - ] - }, - "summary": { - "description": "The transmission summary.", - "oneOf": [ - { - "$ref": "#/components/schemas/V1CommonContent_ContentValue" + "post": { + "tags": [ + "Serviceowner" + ], + "summary": "Creates a new dialog", + "description": "The dialog is created with the given configuration. For more information see the documentation (link TBD).\n\nFor detailed information on validation rules, see [the source for CreateDialogCommandValidator](https://github.com/altinn/dialogporten/blob/main/src/Digdir.Domain.Dialogporten.Application/Features/V1/ServiceOwner/Dialogs/Commands/Create/CreateDialogCommandValidator.cs)", + "operationId": "V1ServiceOwnerDialogsCreate_Dialog", + "requestBody": { + "x-name": "dto", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/V1ServiceOwnerDialogsCommandsCreate_Dialog" } - ] + } }, - "title": { - "description": "The transmission title.", - "oneOf": [ - { - "$ref": "#/components/schemas/V1CommonContent_ContentValue" - } - ] - } + "required": true }, - "type": "object" - }, - "V1EndUserDialogsQueriesSearch_Content": { - "additionalProperties": false, - "properties": { - "extendedStatus": { - "description": "Used as the human-readable label used to describe the \u0022ExtendedStatus\u0022 field.", - "nullable": true, - "oneOf": [ - { - "$ref": "#/components/schemas/V1CommonContent_ContentValue" + "responses": { + "201": { + "description": "The UUID of the created dialog aggregate. A relative URL to the newly created activity is set in the \"Location\" header.", + "headers": { + "Etag": { + "description": "The new UUID ETag of the dialog", + "schema": { + "type": "string" + }, + "example": "123e4567-e89b-12d3-a456-426614174000" + } + }, + "content": { + "application/json": { + "schema": { + "type": "string" + }, + "example": "018bb8e5-d9d0-7434-8ec5-569a6c8e01fc" } - ] + } }, - "senderName": { - "description": "Overridden sender name. If not supplied, assume \u0022org\u0022 as the sender name.", - "nullable": true, - "oneOf": [ - { - "$ref": "#/components/schemas/V1CommonContent_ContentValue" - } - ] + "204": { + "description": "No Content" }, - "summary": { - "description": "A short summary of the dialog and its current state.", - "oneOf": [ - { - "$ref": "#/components/schemas/V1CommonContent_ContentValue" + "400": { + "description": "Validation error occured. See problem details for a list of errors.", + "content": { + "application/problem+json": { + "schema": { + "$ref": "#/components/schemas/ProblemDetails" + } } - ] + } }, - "title": { - "description": "The title of the dialog.", - "oneOf": [ - { - "$ref": "#/components/schemas/V1CommonContent_ContentValue" + "401": { + "description": "Missing or invalid authentication token. Requires a Maskinporten-token with the scope \"digdir:dialogporten.serviceprovider\"." + }, + "403": { + "description": "Unauthorized to create a dialog for the given serviceResource (not owned by authenticated organization or has additional scope requirements defined in policy)." + }, + "422": { + "description": "Domain error occured. See problem details for a list of errors.", + "content": { + "application/problem+json": { + "schema": { + "$ref": "#/components/schemas/ProblemDetails" + } } - ] + } } }, - "type": "object" - }, - "V1EndUserDialogsQueriesSearch_Dialog": { - "additionalProperties": false, - "properties": { - "content": { - "description": "The content of the dialog in search results.", - "oneOf": [ - { - "$ref": "#/components/schemas/V1EndUserDialogsQueriesSearch_Content" - } - ] - }, - "createdAt": { - "description": "The date and time when the dialog was created.", - "example": "2022-12-31T23:59:59Z", - "format": "date-time", - "type": "string" - }, - "dueAt": { - "description": "The due date for the dialog. This is the last date when the dialog is expected to be completed.", - "example": "2022-12-31T23:59:59Z", - "format": "date-time", - "nullable": true, - "type": "string" + "security": [ + { + "JWTBearerAuth": [] + } + ] + } + }, + "/api/v1/serviceowner/dialogs/{dialogId}/actions/purge": { + "post": { + "tags": [ + "Serviceowner" + ], + "summary": "Permanently deletes a dialog", + "description": "Deletes a given dialog (hard delete). For more information see the documentation (link TBD).\n\nOptimistic 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.", + "operationId": "V1ServiceOwnerDialogsPurge_PurgeDialog", + "parameters": [ + { + "name": "dialogId", + "in": "path", + "required": true, + "schema": { + "type": "string", + "format": "guid" + } }, - "extendedStatus": { - "description": "Arbitrary string with a service-specific indicator of status, typically used to indicate a fine-grained state of\nthe dialog to further specify the \u0022status\u0022 enum.\n \nRefer to the service-specific documentation provided by the service owner for details on the possible values (if\nin use).", - "nullable": true, - "type": "string" + { + "name": "if-Match", + "in": "header", + "schema": { + "type": "string", + "format": "guid", + "nullable": true + } + } + ], + "responses": { + "204": { + "description": "The dialog aggregate was deleted successfully." }, - "externalReference": { - "description": "Arbitrary string with a service-specific reference to an external system or service.\n \nRefer to the service-specific documentation provided by the service owner for details (if in use).", - "nullable": true, - "type": "string" + "401": { + "description": "Missing or invalid authentication token. Requires a Maskinporten-token with the scope \"digdir:dialogporten.serviceprovider\"." }, - "guiAttachmentCount": { - "description": "The number of attachments in the dialog made available for browser-based frontends.", - "format": "int32", - "nullable": true, - "type": "integer" + "403": { + "description": "Unauthorized to delete the supplied dialog (not owned by authenticated organization or has additional scope requirements defined in policy)." }, - "id": { - "description": "The unique identifier for the dialog in UUIDv7 format.", - "example": "01913cd5-784f-7d3b-abef-4c77b1f0972d", - "format": "guid", - "type": "string" + "404": { + "description": "The given dialog ID was not found or is already deleted.", + "content": { + "application/problem+json": { + "schema": { + "$ref": "#/components/schemas/ProblemDetails" + } + } + } }, - "latestActivity": { - "description": "The latest entry in the dialog\u0027s activity log.", - "nullable": true, - "oneOf": [ - { - "$ref": "#/components/schemas/V1EndUserDialogsQueriesSearch_DialogActivity" + "412": { + "description": "The supplied If-Match header did not match the current Revision value for the dialog. The request was not applied.", + "content": { + "application/problem+json": { + "schema": { + "$ref": "#/components/schemas/ProblemDetails" + } } - ] + } + } + }, + "security": [ + { + "JWTBearerAuth": [] + } + ] + } + }, + "/api/v1/serviceowner/dialogs/{dialogId}/activities": { + "get": { + "tags": [ + "Serviceowner" + ], + "summary": "Gets a list of dialog activities", + "description": "Gets the list of activities belonging to a dialog", + "operationId": "V1ServiceOwnerDialogActivitiesSearch_SearchDialogActivity", + "parameters": [ + { + "name": "dialogId", + "in": "path", + "required": true, + "schema": { + "type": "string", + "format": "guid" + } + } + ], + "responses": { + "200": { + "description": "Successfully returned the dialog activity list.", + "content": { + "application/json": { + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/V1ServiceOwnerDialogActivitiesQueriesSearch_Activity" + } + } + } + } }, - "org": { - "description": "The service owner code representing the organization (service owner) related to this dialog.", - "example": "ske", - "type": "string" + "401": { + "description": "Missing or invalid authentication token. Requires a Maskinporten-token with the scope \"digdir:dialogporten.serviceprovider\"." }, - "party": { - "description": "The party code representing the organization or person that the dialog belongs to in URN format.", - "example": "urn:altinn:person:identifier-no:01125512345\nurn:altinn:organization:identifier-no:912345678", - "type": "string" + "403": { + "description": "Unauthorized to get the supplied dialog (not owned by authenticated organization or has additional scope requirements defined in policy)." + } + }, + "security": [ + { + "JWTBearerAuth": [] + } + ] + }, + "post": { + "tags": [ + "Serviceowner" + ], + "summary": "Adds a activity to a dialogs activity history", + "description": "The activity is created with the given configuration. For more information see the documentation (link TBD).\n\nOptimistic 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.", + "operationId": "V1ServiceOwnerDialogActivitiesCreate_DialogActivity", + "parameters": [ + { + "name": "dialogId", + "in": "path", + "required": true, + "schema": { + "type": "string", + "format": "guid" + } }, - "precedingProcess": { - "description": "Optional preceding process identifier to indicate the business process that preceded the process indicated in the \u0022Process\u0022 field. Cannot be set without also \u0022Process\u0022 being set.", - "nullable": true, - "type": "string" + { + "name": "if-Match", + "in": "header", + "schema": { + "type": "string", + "format": "guid", + "nullable": true + } + } + ], + "requestBody": { + "x-name": "CreateActivityRequest", + "description": "", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/V1ServiceOwnerDialogActivitiesCreate_ActivityRequest" + } + } }, - "process": { - "description": "Optional process identifier used to indicate a business process this dialog belongs to.", - "nullable": true, - "type": "string" + "required": true, + "x-position": 1 + }, + "responses": { + "201": { + "description": "The UUID of the created dialog activity. A relative URL to the newly created activity is set in the \"Location\" header.", + "headers": { + "Etag": { + "description": "The new UUID ETag of the dialog", + "schema": { + "type": "string" + }, + "example": "123e4567-e89b-12d3-a456-426614174000" + } + }, + "content": { + "application/json": { + "schema": { + "type": "string" + }, + "example": "018bb8e5-d9d0-7434-8ec5-569a6c8e01fc" + } + } }, - "progress": { - "description": "Advisory indicator of progress, represented as 1-100 percentage value. 100% representing a dialog that has come\nto a natural completion (successful or not).", - "format": "int32", - "nullable": true, - "type": "integer" + "204": { + "description": "No Content" }, - "seenSinceLastUpdate": { - "description": "The list of seen log entries for the dialog newer than the dialog ChangedAt date.", - "items": { - "$ref": "#/components/schemas/V1EndUserDialogsQueriesSearch_DialogSeenLog" - }, - "nullable": true, - "type": "array" + "400": { + "description": "Validation error occured. See problem details for a list of errors.", + "content": { + "application/problem+json": { + "schema": { + "$ref": "#/components/schemas/ProblemDetails" + } + } + } }, - "serviceResource": { - "description": "The service identifier for the service that the dialog is related to in URN-format.\nThis corresponds to a service resource in the Altinn Resource Registry.", - "example": "urn:altinn:resource:some-service-identifier", - "type": "string" + "401": { + "description": "Missing or invalid authentication token. Requires a Maskinporten-token with the scope \"digdir:dialogporten.serviceprovider\"." }, - "serviceResourceType": { - "description": "The ServiceResource type, as defined in Altinn Resource Registry (see ResourceType).", - "type": "string" + "403": { + "description": "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)." }, - "status": { - "description": "The aggregated status of the dialog.", - "oneOf": [ - { - "$ref": "#/components/schemas/DialogsEntities_DialogStatus" + "404": { + "description": "The given dialog ID was not found or is already deleted.", + "content": { + "application/problem+json": { + "schema": { + "$ref": "#/components/schemas/ProblemDetails" + } } - ] + } }, - "systemLabel": { - "description": "Current display state.", - "oneOf": [ - { - "$ref": "#/components/schemas/DialogEndUserContextsEntities_SystemLabel" + "410": { + "description": "Entity with the given key(s) is removed." + }, + "412": { + "description": "The supplied If-Match header did not match the current Revision value for the dialog. The request was not applied.", + "content": { + "application/problem+json": { + "schema": { + "$ref": "#/components/schemas/ProblemDetails" + } } - ] + } }, - "updatedAt": { - "description": "The date and time when the dialog was last updated.", - "example": "2022-12-31T23:59:59Z", - "format": "date-time", - "type": "string" + "422": { + "description": "Domain error occured. See problem details for a list of errors.", + "content": { + "application/problem+json": { + "schema": { + "$ref": "#/components/schemas/ProblemDetails" + } + } + } } }, - "type": "object" - }, - "V1EndUserDialogsQueriesSearch_DialogActivity": { - "additionalProperties": false, - "properties": { - "createdAt": { - "description": "The date and time when the activity was created.", - "format": "date-time", - "nullable": true, - "type": "string" - }, - "description": { - "description": "Unstructured text describing the activity. Only set if the activity type is \u0022Information\u0022.", - "items": { - "$ref": "#/components/schemas/V1CommonLocalizations_Localization" - }, - "nullable": true, - "type": "array" + "security": [ + { + "JWTBearerAuth": [] + } + ] + } + }, + "/api/v1/serviceowner/dialogs/{dialogId}/actions/should-send-notification": { + "get": { + "tags": [ + "Serviceowner" + ], + "summary": "Returns a boolean value based on conditions used to determine if a notification is to be sent", + "description": "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.", + "operationId": "V1ServiceOwnerDialogActivitiesNotificationCondition_NotificationCondition", + "parameters": [ + { + "name": "dialogId", + "in": "path", + "required": true, + "schema": { + "type": "string", + "format": "guid" + } }, - "extendedType": { - "description": "An arbitrary string with a service-specific activity type.\n \nConsult the service-specific documentation provided by the service owner for details (if in use).", - "format": "uri", - "nullable": true, - "type": "string" + { + "name": "conditionType", + "in": "query", + "required": true, + "schema": { + "allOf": [ + { + "$ref": "#/components/schemas/V1ServiceOwnerDialogActivitiesQueriesNotificationCondition_NotificationConditionType" + } + ] + } }, - "id": { - "description": "The unique identifier for the activity in UUIDv7 format.", - "format": "guid", - "type": "string" + { + "name": "activityType", + "in": "query", + "required": true, + "schema": { + "allOf": [ + { + "$ref": "#/components/schemas/DialogsEntitiesActivities_DialogActivityType" + } + ] + } }, - "performedBy": { - "description": "The actor that performed the activity.", - "oneOf": [ - { - "$ref": "#/components/schemas/V1EndUserCommonActors_Actor" + { + "name": "transmissionId", + "in": "query", + "schema": { + "type": "string", + "format": "guid", + "nullable": true + } + } + ], + "responses": { + "200": { + "description": "Successfully returned the notification determination.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/V1ServiceOwnerDialogActivitiesQueriesNotificationCondition_NotificationCondition" + } } - ] + } }, - "transmissionId": { - "description": "If the activity is related to a particular transmission, this field will contain the transmission identifier.", - "format": "guid", - "nullable": true, - "type": "string" + "401": { + "description": "Missing or invalid authentication token. Requires a Maskinporten-token with the scope \"altinn:system/notifications.condition.check\"." }, - "type": { - "description": "The type of activity.", - "oneOf": [ - { - "$ref": "#/components/schemas/DialogsEntitiesActivities_DialogActivityType" - } - ] + "403": { + "description": "Forbidden" } }, - "type": "object" - }, - "V1EndUserDialogsQueriesSearch_DialogSeenLog": { - "additionalProperties": false, - "properties": { - "id": { - "description": "The unique identifier for the seen log entry in UUIDv7 format.", - "format": "guid", - "type": "string" + "security": [ + { + "JWTBearerAuth": [] + } + ] + } + }, + "/api/v1/serviceowner/dialogs/{dialogId}/activities/{activityId}": { + "get": { + "tags": [ + "Serviceowner" + ], + "summary": "Gets a single dialog activity", + "description": "Gets a single activity belonging to a dialog. For more information see the documentation (link TBD).", + "operationId": "V1ServiceOwnerDialogActivitiesGet_GetDialogActivity", + "parameters": [ + { + "name": "dialogId", + "in": "path", + "required": true, + "schema": { + "type": "string", + "format": "guid" + } }, - "isCurrentEndUser": { - "description": "Flag indicating whether the seen log entry was created by the current end user.", - "type": "boolean" + { + "name": "activityId", + "in": "path", + "required": true, + "schema": { + "type": "string", + "format": "guid" + } + } + ], + "responses": { + "200": { + "description": "Successfully returned the dialog activity.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/V1ServiceOwnerDialogActivitiesQueriesGet_Activity" + } + } + } }, - "isViaServiceOwner": { - "description": "Flag indicating whether the seen log entry was created via the service owner.\n \nThis is used when the service owner uses the service owner API to implement its own frontend.", - "nullable": true, - "type": "boolean" + "401": { + "description": "Missing or invalid authentication token. Requires a Maskinporten-token with the scope \"digdir:dialogporten.serviceprovider\"." }, - "seenAt": { - "description": "The timestamp when the dialog revision was seen.", - "format": "date-time", - "type": "string" + "403": { + "description": "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)." }, - "seenBy": { - "description": "The actor that saw the dialog revision.", - "oneOf": [ - { - "$ref": "#/components/schemas/V1EndUserCommonActors_Actor" + "404": { + "description": "The given dialog ID was not found or was deleted, or the given activity ID was not found.", + "content": { + "application/problem+json": { + "schema": { + "$ref": "#/components/schemas/ProblemDetails" + } + } + } + }, + "410": { + "description": "Entity with the given key(s) is removed." + } + }, + "security": [ + { + "JWTBearerAuth": [] + } + ] + } + }, + "/api/v1/enduser/parties": { + "get": { + "tags": [ + "Enduser" + ], + "summary": "Gets the list of authorized parties for the end user", + "description": "Gets the list of authorized parties for the end user. For more information see the documentation (link TBD).", + "operationId": "V1EndUserPartiesGet_GetParties", + "responses": { + "200": { + "description": "The list of authorized parties for the end user", + "content": { + "application/json": { + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/V1EndUserPartiesQueriesGet_Parties" + } + } } - ] - } - }, - "type": "object" - }, - "V1EndUserDialogSystemLabelsCommandsSet_SystemLabelCommand": { - "additionalProperties": false, - "properties": { - "ifMatchDialogRevision": { - "format": "guid", - "nullable": true, - "type": "string" - }, - "label": { - "$ref": "#/components/schemas/DialogEndUserContextsEntities_SystemLabel" - } - }, - "type": "object" - }, - "V1EndUserDialogTransmissionsQueriesGet_Attachment": { - "additionalProperties": false, - "properties": { - "displayName": { - "description": "The display name of the attachment that should be used in GUIs.", - "items": { - "$ref": "#/components/schemas/V1CommonLocalizations_Localization" - }, - "nullable": true, - "type": "array" + } }, - "id": { - "description": "The unique identifier for the attachment in UUIDv7 format.", - "format": "guid", - "type": "string" + "401": { + "description": "Unauthorized" }, - "urls": { - "description": "The URLs associated with the attachment, each referring to a different representation of the attachment.", - "items": { - "$ref": "#/components/schemas/V1EndUserDialogTransmissionsQueriesGet_AttachmentUrl" - }, - "nullable": true, - "type": "array" + "403": { + "description": "Forbidden" } }, - "type": "object" - }, - "V1EndUserDialogTransmissionsQueriesGet_AttachmentUrl": { - "additionalProperties": false, - "properties": { - "consumerType": { - "description": "The type of consumer the URL is intended for.", - "oneOf": [ - { - "$ref": "#/components/schemas/Attachments_AttachmentUrlConsumerType" + "security": [ + { + "JWTBearerAuth": [] + } + ] + } + }, + "/api/v1/enduser/dialogs/{dialogId}/transmissions": { + "get": { + "tags": [ + "Enduser" + ], + "summary": "Gets a list of dialog transmissions", + "description": "Gets the list of transmissions belonging to a dialog", + "operationId": "V1EndUserDialogTransmissionsSearch_SearchDialogTransmission", + "parameters": [ + { + "name": "dialogId", + "in": "path", + "required": true, + "schema": { + "type": "string", + "format": "guid" + } + } + ], + "responses": { + "200": { + "description": "Successfully returned the dialog transmission list.", + "content": { + "application/json": { + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/V1EndUserDialogTransmissionsQueriesSearch_Transmission" + } + } } - ] - }, - "id": { - "description": "The unique identifier for the attachment URL in UUIDv7 format.", - "format": "guid", - "type": "string" + } }, - "mediaType": { - "description": "The media type of the attachment.", - "example": "application/pdf\napplication/zip", - "nullable": true, - "type": "string" + "401": { + "description": "Missing or invalid authentication token. Requires a Maskinporten-token with the scope \"digdir:dialogporten\"." }, - "url": { - "description": "The fully qualified URL of the attachment. Will be set to \u0022urn:dialogporten:unauthorized\u0022 if the user is\nnot authorized to access the transmission.", - "example": "https://someendpoint.com/someattachment.pdf\nurn:dialogporten:unauthorized", - "format": "uri", - "type": "string" + "403": { + "description": "Unauthorized to get the supplied dialog (not owned by authenticated organization or has additional scope requirements defined in policy)." } }, - "type": "object" - }, - "V1EndUserDialogTransmissionsQueriesGet_Content": { - "additionalProperties": false, - "properties": { - "contentReference": { - "description": "Front-channel embedded content. Used to dynamically embed content in the frontend from an external URL.\nAllowed media types: application/vnd.dialogporten.frontchannelembed\u002Bjson;type=markdown", - "nullable": true, - "oneOf": [ - { - "$ref": "#/components/schemas/V1CommonContent_ContentValue" - } - ] + "security": [ + { + "JWTBearerAuth": [] + } + ] + } + }, + "/api/v1/enduser/dialogs/{dialogId}/transmissions/{transmissionId}": { + "get": { + "tags": [ + "Enduser" + ], + "summary": "Gets a single dialog transmission", + "description": "Gets a single transmission belonging to a dialog. For more information see the documentation (link TBD).", + "operationId": "V1EndUserDialogTransmissionsGet_GetDialogTransmission", + "parameters": [ + { + "name": "dialogId", + "in": "path", + "required": true, + "schema": { + "type": "string", + "format": "guid" + } }, - "summary": { - "description": "The summary of the content.", - "oneOf": [ - { - "$ref": "#/components/schemas/V1CommonContent_ContentValue" + { + "name": "transmissionId", + "in": "path", + "required": true, + "schema": { + "type": "string", + "format": "guid" + } + } + ], + "responses": { + "200": { + "description": "Successfully returned the dialog transmission.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/V1EndUserDialogTransmissionsQueriesGet_Transmission" + } } - ] + } }, - "title": { - "description": "The title of the content.", - "oneOf": [ - { - "$ref": "#/components/schemas/V1CommonContent_ContentValue" + "401": { + "description": "Missing or invalid authentication token. Requires a Maskinporten-token with the scope \"digdir:dialogporten\"." + }, + "403": { + "description": "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": { + "description": "The given dialog ID was not found or was deleted, or the given transmission ID was not found.", + "content": { + "application/problem+json": { + "schema": { + "$ref": "#/components/schemas/ProblemDetails" + } } - ] + } } }, - "type": "object" - }, - "V1EndUserDialogTransmissionsQueriesGet_Transmission": { - "additionalProperties": false, - "properties": { - "attachments": { - "description": "The attachments associated with the transmission.", - "items": { - "$ref": "#/components/schemas/V1EndUserDialogTransmissionsQueriesGet_Attachment" - }, - "nullable": true, - "type": "array" - }, - "authorizationAttribute": { - "description": "The authorization attribute associated with the transmission.", - "nullable": true, - "type": "string" - }, + "security": [ + { + "JWTBearerAuth": [] + } + ] + } + }, + "/api/v1/enduser/dialogs/{dialogId}/systemlabels": { + "put": { + "tags": [ + "Enduser" + ], + "operationId": "V1EndUserDialogSystemLabelsSet_SetDialogSystemLabel", + "parameters": [ + { + "name": "dialogId", + "in": "path", + "required": true, + "schema": { + "type": "string", + "format": "guid" + } + } + ], + "requestBody": { + "x-name": "SystemLabelCommand", + "description": "", "content": { - "description": "The content of the transmission.", - "oneOf": [ - { - "$ref": "#/components/schemas/V1EndUserDialogTransmissionsQueriesGet_Content" + "application/json": { + "schema": { + "$ref": "#/components/schemas/V1EndUserDialogSystemLabelsCommandsSet_SystemLabelCommand" } - ] + } }, - "createdAt": { - "description": "The date and time when the transmission was created.", - "format": "date-time", - "type": "string" + "required": true, + "x-position": 1 + }, + "responses": { + "204": { + "description": "No Content" }, - "deletedAt": { - "description": "The date and time when the transmission was deleted, if applicable.", - "format": "date-time", - "nullable": true, - "type": "string" + "400": { + "description": "Bad Request", + "content": { + "application/problem+json": { + "schema": { + "$ref": "#/components/schemas/ProblemDetails" + } + } + } }, - "extendedType": { - "description": "The extended type URI for the transmission.", - "format": "uri", - "nullable": true, - "type": "string" + "401": { + "description": "Unauthorized" }, - "id": { - "description": "The unique identifier for the transmission in UUIDv7 format.", - "format": "guid", - "type": "string" + "403": { + "description": "Forbidden" }, - "isAuthorized": { - "description": "Flag indicating if the authenticated user is authorized for this transmission. If not, embedded content and\nthe attachments will not be available.", - "type": "boolean" + "404": { + "description": "Not Found", + "content": { + "application/problem+json": { + "schema": { + "$ref": "#/components/schemas/ProblemDetails" + } + } + } }, - "relatedTransmissionId": { - "description": "The unique identifier for the related transmission, if any.", - "format": "guid", - "nullable": true, - "type": "string" + "410": { + "description": "" }, - "sender": { - "description": "The sender actor information for the transmission.", - "oneOf": [ - { - "$ref": "#/components/schemas/V1EndUserCommonActors_Actor" + "412": { + "description": "", + "content": { + "application/problem+json": { + "schema": { + "$ref": "#/components/schemas/ProblemDetails" + } } - ] + } }, - "type": { - "description": "The type of the transmission.", - "oneOf": [ - { - "$ref": "#/components/schemas/DialogsEntitiesTransmissions_DialogTransmissionType" + "422": { + "description": "", + "content": { + "application/problem+json": { + "schema": { + "$ref": "#/components/schemas/ProblemDetails" + } } - ] + } } }, - "type": "object" - }, - "V1EndUserDialogTransmissionsQueriesSearch_Attachment": { - "additionalProperties": false, - "properties": { - "displayName": { - "description": "The display name of the attachment that should be used in GUIs.", - "items": { - "$ref": "#/components/schemas/V1CommonLocalizations_Localization" - }, - "nullable": true, - "type": "array" - }, - "id": { - "description": "The unique identifier for the attachment in UUIDv7 format.", - "format": "guid", - "type": "string" - }, - "urls": { - "description": "The URLs associated with the attachment, each referring to a different representation of the attachment.", - "items": { - "$ref": "#/components/schemas/V1EndUserDialogTransmissionsQueriesSearch_AttachmentUrl" - }, - "nullable": true, - "type": "array" + "security": [ + { + "JWTBearerAuth": [] } - }, - "type": "object" - }, - "V1EndUserDialogTransmissionsQueriesSearch_AttachmentUrl": { - "additionalProperties": false, - "properties": { - "consumerType": { - "description": "The type of consumer the URL is intended for.", - "oneOf": [ - { - "$ref": "#/components/schemas/Attachments_AttachmentUrlConsumerType" + ] + } + }, + "/api/v1/enduser/dialogs/{dialogId}/seenlog": { + "get": { + "tags": [ + "Enduser" + ], + "summary": "Gets all seen log records for a dialog", + "description": "Gets all seen log records for a dialog. For more information see the documentation (link TBD).", + "operationId": "V1EndUserDialogSeenLogsSearch_SearchDialogSeenLog", + "parameters": [ + { + "name": "dialogId", + "in": "path", + "required": true, + "schema": { + "type": "string", + "format": "guid" + } + } + ], + "responses": { + "200": { + "description": "Successfully returned the dialog seen log records.", + "content": { + "application/json": { + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/V1EndUserDialogSeenLogsQueriesSearch_SeenLog" + } + } } - ] + } }, - "id": { - "description": "The unique identifier for the attachment URL in UUIDv7 format.", - "format": "guid", - "type": "string" + "401": { + "description": "Missing or invalid authentication token. Requires a Maskinporten-token with the scope \"digdir:dialogporten\"." }, - "mediaType": { - "description": "The media type of the attachment.", - "example": "application/pdf\napplication/zip", - "nullable": true, - "type": "string" + "403": { + "description": "Forbidden" }, - "url": { - "description": "The fully qualified URL of the attachment. Will be set to \u0022urn:dialogporten:unauthorized\u0022 if the user is\nnot authorized to access the transmission.", - "example": "https://someendpoint.com/someattachment.pdf\nurn:dialogporten:unauthorized", - "format": "uri", - "type": "string" + "404": { + "description": "Not Found", + "content": { + "application/problem+json": { + "schema": { + "$ref": "#/components/schemas/ProblemDetails" + } + } + } } }, - "type": "object" - }, - "V1EndUserDialogTransmissionsQueriesSearch_Content": { - "additionalProperties": false, - "properties": { - "contentReference": { - "description": "Front-channel embedded content. Used to dynamically embed content in the frontend from an external URL.\nAllowed media types: application/vnd.dialogporten.frontchannelembed\u002Bjson;type=markdown", - "nullable": true, - "oneOf": [ - { - "$ref": "#/components/schemas/V1CommonContent_ContentValue" - } - ] + "security": [ + { + "JWTBearerAuth": [] + } + ] + } + }, + "/api/v1/enduser/dialogs/{dialogId}/seenlog/{seenLogId}": { + "get": { + "tags": [ + "Enduser" + ], + "summary": "Gets a single dialog seen log record", + "description": "Gets a single dialog seen log record. For more information see the documentation (link TBD).", + "operationId": "V1EndUserDialogSeenLogsGet_GetDialogSeenLog", + "parameters": [ + { + "name": "dialogId", + "in": "path", + "required": true, + "schema": { + "type": "string", + "format": "guid" + } }, - "summary": { - "description": "The summary of the content.", - "oneOf": [ - { - "$ref": "#/components/schemas/V1CommonContent_ContentValue" + { + "name": "seenLogId", + "in": "path", + "required": true, + "schema": { + "type": "string", + "format": "guid" + } + } + ], + "responses": { + "200": { + "description": "Successfully returned the dialog seen log record.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/V1EndUserDialogSeenLogsQueriesGet_SeenLog" + } } - ] + } }, - "title": { - "description": "The title of the content.", - "oneOf": [ - { - "$ref": "#/components/schemas/V1CommonContent_ContentValue" + "401": { + "description": "Missing or invalid authentication token. Requires a Maskinporten-token with the scope \"digdir:dialogporten\"." + }, + "403": { + "description": "Forbidden" + }, + "404": { + "description": "Not Found", + "content": { + "application/problem+json": { + "schema": { + "$ref": "#/components/schemas/ProblemDetails" + } } - ] + } } }, - "type": "object" - }, - "V1EndUserDialogTransmissionsQueriesSearch_Transmission": { - "additionalProperties": false, - "properties": { - "attachments": { - "description": "The attachments associated with the transmission.", - "items": { - "$ref": "#/components/schemas/V1EndUserDialogTransmissionsQueriesSearch_Attachment" - }, - "nullable": true, - "type": "array" + "security": [ + { + "JWTBearerAuth": [] + } + ] + } + }, + "/api/v1/enduser/dialogs": { + "get": { + "tags": [ + "Enduser" + ], + "summary": "Gets a list of dialogs", + "description": "Performs a search for dialogs, returning a paginated list of dialogs. For more information see the documentation (link TBD).\n\n* All date parameters must contain explicit time zone. Example: 2023-10-27T10:00:00Z or 2023-10-27T10:00:00+01:00\n* See \"continuationToken\" in the response for how to get the next page of results.\n* hasNextPage will be set to true if there are more items to get.", + "operationId": "V1EndUserDialogsSearch_SearchDialog", + "parameters": [ + { + "name": "org", + "in": "query", + "style": "form", + "explode": true, + "description": "Filter by one or more service owner codes", + "schema": { + "type": "array", + "nullable": true, + "items": { + "type": "string" + } + } }, - "authorizationAttribute": { - "description": "The authorization attribute associated with the transmission.", - "nullable": true, - "type": "string" + { + "name": "serviceResource", + "in": "query", + "style": "form", + "explode": true, + "description": "Filter by one or more service resources", + "schema": { + "type": "array", + "nullable": true, + "items": { + "type": "string" + } + } }, - "content": { - "description": "The content of the transmission.", - "oneOf": [ - { - "$ref": "#/components/schemas/V1EndUserDialogTransmissionsQueriesSearch_Content" + { + "name": "party", + "in": "query", + "style": "form", + "explode": true, + "description": "Filter by one or more owning parties", + "schema": { + "type": "array", + "nullable": true, + "items": { + "type": "string" } - ] + } }, - "createdAt": { - "description": "The date and time when the transmission was created.", - "format": "date-time", - "type": "string" + { + "name": "extendedStatus", + "in": "query", + "style": "form", + "explode": true, + "description": "Filter by one or more extended statuses", + "schema": { + "type": "array", + "nullable": true, + "items": { + "type": "string" + } + } }, - "deletedAt": { - "description": "The date and time when the transmission was deleted, if applicable.", - "format": "date-time", - "nullable": true, - "type": "string" + { + "name": "externalReference", + "in": "query", + "description": "Filter by external reference", + "schema": { + "type": "string", + "nullable": true + } }, - "extendedType": { - "description": "The extended type URI for the transmission.", - "format": "uri", - "nullable": true, - "type": "string" + { + "name": "status", + "in": "query", + "style": "form", + "explode": true, + "description": "Filter by status", + "schema": { + "type": "array", + "nullable": true, + "items": { + "$ref": "#/components/schemas/DialogsEntities_DialogStatus" + } + } }, - "id": { - "description": "The unique identifier for the transmission in UUIDv7 format.", - "format": "guid", - "type": "string" + { + "name": "createdAfter", + "in": "query", + "description": "Only return dialogs created after this date", + "schema": { + "type": "string", + "format": "date-time", + "nullable": true + } }, - "isAuthorized": { - "description": "Flag indicating if the authenticated user is authorized for this transmission. If not, embedded content and\nthe attachments will not be available.", - "type": "boolean" + { + "name": "createdBefore", + "in": "query", + "description": "Only return dialogs created before this date", + "schema": { + "type": "string", + "format": "date-time", + "nullable": true + } }, - "relatedTransmissionId": { - "description": "The unique identifier for the related transmission, if any.", - "format": "guid", - "nullable": true, - "type": "string" + { + "name": "updatedAfter", + "in": "query", + "description": "Only return dialogs updated after this date", + "schema": { + "type": "string", + "format": "date-time", + "nullable": true + } }, - "sender": { - "description": "The sender actor information for the transmission.", - "oneOf": [ - { - "$ref": "#/components/schemas/V1EndUserCommonActors_Actor" - } - ] + { + "name": "updatedBefore", + "in": "query", + "description": "Only return dialogs updated before this date", + "schema": { + "type": "string", + "format": "date-time", + "nullable": true + } }, - "type": { - "description": "The type of the transmission.", - "oneOf": [ - { - "$ref": "#/components/schemas/DialogsEntitiesTransmissions_DialogTransmissionType" - } - ] - } - }, - "type": "object" - }, - "V1EndUserPartiesQueriesGet_AuthorizedParty": { - "additionalProperties": false, - "properties": { - "hasKeyRole": { - "type": "boolean" + { + "name": "dueAfter", + "in": "query", + "description": "Only return dialogs with due date after this date", + "schema": { + "type": "string", + "format": "date-time", + "nullable": true + } }, - "hasOnlyAccessToSubParties": { - "type": "boolean" + { + "name": "dueBefore", + "in": "query", + "description": "Only return dialogs with due date before this date", + "schema": { + "type": "string", + "format": "date-time", + "nullable": true + } }, - "isAccessManager": { - "type": "boolean" + { + "name": "process", + "in": "query", + "description": "Filter by process", + "schema": { + "type": "string", + "nullable": true + } }, - "isCurrentEndUser": { - "type": "boolean" + { + "name": "systemLabel", + "in": "query", + "style": "form", + "explode": true, + "description": "Filter by Display state", + "schema": { + "type": "array", + "nullable": true, + "items": { + "$ref": "#/components/schemas/DialogEndUserContextsEntities_SystemLabel" + } + } }, - "isDeleted": { - "type": "boolean" + { + "name": "search", + "in": "query", + "description": "Search string for free text search. Will attempt to fuzzily match in all free text fields in the aggregate", + "schema": { + "type": "string", + "nullable": true + } }, - "isMainAdministrator": { - "type": "boolean" + { + "name": "searchLanguageCode", + "in": "query", + "description": "Limit free text search to texts with this language code, e.g. 'nb', 'en'. Culture codes will be normalized to neutral language codes (ISO 639). Default: search all culture codes", + "schema": { + "type": "string", + "nullable": true + } }, - "name": { - "type": "string" + { + "name": "orderBy", + "in": "query", + "schema": { + "nullable": true, + "oneOf": [ + { + "$ref": "#/components/schemas/OrderSetOfTOrderDefinitionAndTTarget" + } + ] + } }, - "party": { - "type": "string" + { + "name": "continuationToken", + "in": "query", + "description": "Supply \"continuationToken\" for the response to get the next page of results, if hasNextPage is true", + "schema": { + "nullable": true, + "oneOf": [ + { + "$ref": "#/components/schemas/ContinuationTokenSetOfTOrderDefinitionAndTTarget" + } + ] + } }, - "partyType": { - "type": "string" + { + "name": "limit", + "in": "query", + "description": "Limit the number of results per page (1-1000, default: 100)", + "schema": { + "type": "integer", + "format": "int32", + "nullable": true + } + } + ], + "responses": { + "200": { + "description": "Successfully returned the dialog list.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/PaginatedListOfV1EndUserDialogsQueriesSearch_Dialog" + } + } + } }, - "subParties": { - "items": { - "$ref": "#/components/schemas/V1EndUserPartiesQueriesGet_AuthorizedParty" - }, - "nullable": true, - "type": "array" + "401": { + "description": "Missing or invalid authentication token. Requires a Maskinporten-token with the scope \"digdir:dialogporten\"." } }, - "type": "object" - }, - "V1EndUserPartiesQueriesGet_Parties": { - "additionalProperties": false, - "properties": { - "authorizedParties": { - "items": { - "$ref": "#/components/schemas/V1EndUserPartiesQueriesGet_AuthorizedParty" - }, - "nullable": true, - "type": "array" + "security": [ + { + "JWTBearerAuth": [] } - }, - "type": "object" - }, - "V1ServiceOwnerCommonActors_Actor": { - "additionalProperties": false, - "properties": { - "actorId": { - "description": "The identifier of the person or organization that sent the transmission. Mutually exclusive with ActorName.\nMight be omitted if ActorType is \u0022ServiceOwner\u0022.", - "example": "urn:altinn:person:identifier-no:12018212345", - "nullable": true, - "type": "string" + ] + } + }, + "/api/v1/enduser/dialogs/{dialogId}": { + "get": { + "tags": [ + "Enduser" + ], + "summary": "Gets a single dialog", + "description": "Gets a single dialog aggregate. For more information see the documentation (link TBD).", + "operationId": "V1EndUserDialogsGet_GetDialog", + "parameters": [ + { + "name": "dialogId", + "in": "path", + "required": true, + "schema": { + "type": "string", + "format": "guid" + } + } + ], + "responses": { + "200": { + "description": "Successfully returned the dialog aggregate.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/V1EndUserDialogsQueriesGet_Dialog" + } + } + } }, - "actorName": { - "description": "Specifies the name of the entity that sent the transmission. Mutually exclusive with ActorId. If ActorId\nis supplied, the name will be automatically populated from the name registries.", - "example": "Ola Nordmann", - "nullable": true, - "type": "string" + "401": { + "description": "Missing or invalid authentication token. Requires a Maskinporten-token with the scope \"digdir:dialogporten\"." }, - "actorType": { - "description": "The type of actor that sent the transmission.", - "oneOf": [ - { - "$ref": "#/components/schemas/Actors_ActorType" + "403": { + "description": "Unauthorized to get the supplied dialog (not owned by authenticated organization or has additional scope requirements defined in policy)." + }, + "404": { + "description": "The given dialog ID was not found or is already deleted.", + "content": { + "application/problem+json": { + "schema": { + "$ref": "#/components/schemas/ProblemDetails" + } } - ] + } } }, - "type": "object" - }, - "V1ServiceOwnerDialogActivitiesCreate_ActivityRequest": { - "additionalProperties": false, - "properties": { - "createdAt": { - "description": "If supplied, overrides the creating date and time for the transmission.\nIf not supplied, the current date /time will be used.", - "format": "date-time", - "nullable": true, - "type": "string" - }, - "description": { - "description": "Unstructured text describing the activity. Only set if the activity type is \u0022Information\u0022.", - "items": { - "$ref": "#/components/schemas/V1CommonLocalizations_Localization" - }, - "nullable": true, - "type": "array" + "security": [ + { + "JWTBearerAuth": [] + } + ] + } + }, + "/api/v1/enduser/dialogs/{dialogId}/labellog": { + "get": { + "tags": [ + "Enduser" + ], + "operationId": "V1EndUserDialogLabelAssignmentLogsSearch_SearchDialogLabelAssignmentLog", + "parameters": [ + { + "name": "dialogId", + "in": "path", + "required": true, + "schema": { + "type": "string", + "format": "guid" + } + } + ], + "responses": { + "200": { + "description": "Success", + "content": { + "application/json": { + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/V1EndUserDialogLabelAssignmentLogQueriesSearch_LabelAssignmentLog" + } + } + } + } }, - "extendedType": { - "description": "Arbitrary URI/URN describing a service-specific transmission type.", - "format": "uri", - "nullable": true, - "type": "string" + "401": { + "description": "Unauthorized" }, - "id": { - "description": "The UUDIv7 of the action may be provided to support idempotent additions to the list of activities.\nIf not supplied, a new UUIDv7 will be generated.", - "example": "01913cd5-784f-7d3b-abef-4c77b1f0972d", - "format": "guid", - "nullable": true, - "type": "string" + "403": { + "description": "Forbidden" }, - "performedBy": { - "description": "The actor that performed the activity.", - "oneOf": [ - { - "$ref": "#/components/schemas/V1ServiceOwnerCommonActors_Actor" + "404": { + "description": "Not Found", + "content": { + "application/problem+json": { + "schema": { + "$ref": "#/components/schemas/ProblemDetails" + } } - ] - }, - "transmissionId": { - "description": "If the activity is related to a particular transmission, this field will contain the transmission identifier.\nMust be present in the request body.", - "format": "guid", - "nullable": true, - "type": "string" + } }, - "type": { - "description": "The type of transmission.", - "oneOf": [ - { - "$ref": "#/components/schemas/DialogsEntitiesActivities_DialogActivityType" - } - ] + "410": { + "description": "" } }, - "type": "object" - }, - "V1ServiceOwnerDialogActivitiesQueriesGet_Activity": { - "additionalProperties": false, - "properties": { - "createdAt": { - "format": "date-time", - "nullable": true, - "type": "string" - }, - "deletedAt": { - "format": "date-time", - "nullable": true, - "type": "string" - }, - "description": { - "items": { - "$ref": "#/components/schemas/V1CommonLocalizations_Localization" - }, - "nullable": true, - "type": "array" - }, - "extendedType": { - "format": "uri", - "nullable": true, - "type": "string" - }, - "id": { - "format": "guid", - "type": "string" - }, - "performedBy": { - "$ref": "#/components/schemas/V1ServiceOwnerCommonActors_Actor" + "security": [ + { + "JWTBearerAuth": [] + } + ] + } + }, + "/api/v1/enduser/dialogs/{dialogId}/activities": { + "get": { + "tags": [ + "Enduser" + ], + "summary": "Gets a list of dialog activities", + "description": "Gets the list of activities belonging to a dialog", + "operationId": "V1EndUserDialogActivitiesSearch_SearchDialogActivity", + "parameters": [ + { + "name": "dialogId", + "in": "path", + "required": true, + "schema": { + "type": "string", + "format": "guid" + } + } + ], + "responses": { + "200": { + "description": "Successfully returned the dialog activity list.", + "content": { + "application/json": { + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/V1EndUserDialogActivitiesQueriesSearch_Activity" + } + } + } + } }, - "transmissionId": { - "format": "guid", - "nullable": true, - "type": "string" + "401": { + "description": "Missing or invalid authentication token. Requires a Maskinporten-token with the scope \"digdir:dialogporten\"." }, - "type": { - "$ref": "#/components/schemas/DialogsEntitiesActivities_DialogActivityType" + "403": { + "description": "Unauthorized to get the supplied dialog (not owned by authenticated organization or has additional scope requirements defined in policy)." } }, - "type": "object" - }, - "V1ServiceOwnerDialogActivitiesQueriesNotificationCondition_NotificationCondition": { - "additionalProperties": false, - "properties": { - "sendNotification": { - "type": "boolean" + "security": [ + { + "JWTBearerAuth": [] } - }, - "type": "object" - }, - "V1ServiceOwnerDialogActivitiesQueriesNotificationCondition_NotificationConditionType": { - "description": "", - "enum": [ - "NotExists", - "Exists" - ], - "type": "string", - "x-enumNames": [ - "NotExists", - "Exists" ] - }, - "V1ServiceOwnerDialogActivitiesQueriesSearch_Activity": { - "additionalProperties": false, - "properties": { - "createdAt": { - "format": "date-time", - "type": "string" - }, - "deletedAt": { - "format": "date-time", - "nullable": true, - "type": "string" + } + }, + "/api/v1/enduser/dialogs/{dialogId}/activities/{activityId}": { + "get": { + "tags": [ + "Enduser" + ], + "summary": "Gets a single dialog activity", + "description": "Gets a single activity belonging to a dialog. For more information see the documentation (link TBD).", + "operationId": "V1EndUserDialogActivitiesGet_GetDialogActivity", + "parameters": [ + { + "name": "dialogId", + "in": "path", + "required": true, + "schema": { + "type": "string", + "format": "guid" + } }, - "extendedType": { - "format": "uri", - "nullable": true, - "type": "string" + { + "name": "activityId", + "in": "path", + "required": true, + "schema": { + "type": "string", + "format": "guid" + } + } + ], + "responses": { + "200": { + "description": "Successfully returned the dialog activity.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/V1EndUserDialogActivitiesQueriesGet_Activity" + } + } + } }, - "id": { - "format": "guid", - "type": "string" + "401": { + "description": "Missing or invalid authentication token. Requires a Maskinporten-token with the scope \"digdir:dialogporten\"." }, - "transmissionId": { - "format": "guid", - "nullable": true, - "type": "string" + "403": { + "description": "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)." }, - "type": { - "$ref": "#/components/schemas/DialogsEntitiesActivities_DialogActivityType" + "404": { + "description": "The given dialog ID was not found or was deleted, or the given activity ID was not found.", + "content": { + "application/problem+json": { + "schema": { + "$ref": "#/components/schemas/ProblemDetails" + } + } + } } }, - "type": "object" - }, - "V1ServiceOwnerDialogsCommandsCreate_Activity": { + "security": [ + { + "JWTBearerAuth": [] + } + ] + } + } + }, + "components": { + "schemas": { + "V1WellKnownOauthAuthorizationServerQueriesGet_GetOauthAuthorizationServer": { + "type": "object", "additionalProperties": false, "properties": { - "createdAt": { - "description": "If supplied, overrides the creating date and time for the transmission.\nIf not supplied, the current date /time will be used.", - "format": "date-time", - "nullable": true, - "type": "string" - }, - "description": { - "description": "Unstructured text describing the activity. Only set if the activity type is \u0022Information\u0022.", - "items": { - "$ref": "#/components/schemas/V1CommonLocalizations_Localization" - }, - "nullable": true, - "type": "array" - }, - "extendedType": { - "description": "Arbitrary URI/URN describing a service-specific transmission type.", - "format": "uri", - "nullable": true, - "type": "string" - }, - "id": { - "description": "A self-defined UUIDv7 may be provided to support idempotent creation of activities. If not provided, a new UUIDv7 will be generated.", - "example": "01913cd5-784f-7d3b-abef-4c77b1f0972d", - "format": "guid", - "nullable": true, + "issuer": { "type": "string" }, - "performedBy": { - "description": "The actor that performed the activity.", - "oneOf": [ - { - "$ref": "#/components/schemas/V1ServiceOwnerCommonActors_Actor" - } - ] - }, - "transmissionId": { - "description": "If the activity is related to a particular transmission, this field will contain the transmission identifier.\nMust be present in the request body.", - "format": "guid", - "nullable": true, + "jwks_uri": { "type": "string" - }, - "type": { - "description": "The type of transmission.", - "oneOf": [ - { - "$ref": "#/components/schemas/DialogsEntitiesActivities_DialogActivityType" - } - ] } - }, - "type": "object" + } }, - "V1ServiceOwnerDialogsCommandsCreate_ApiAction": { + "V1WellKnownJwksQueriesGet_GetJwks": { + "type": "object", "additionalProperties": false, "properties": { - "action": { - "description": "String identifier for the action, corresponding to the \u0022action\u0022 attributeId used in the XACML service policy,\nwhich by default is the policy belonging to the service referred to by \u0022serviceResource\u0022 in the dialog.", - "example": "write", - "type": "string" - }, - "authorizationAttribute": { - "description": "Contains an authorization resource attributeId, that can used in custom authorization rules in the XACML service\npolicy, which by default is the policy belonging to the service referred to by \u0022serviceResource\u0022 in the dialog.\n \nCan also be used to refer to other service policies.", - "example": "mycustomresource\n/* equivalent to the above */\nurn:altinn:subresource:mycustomresource\nurn:altinn:task:Task_1\n/* refer to another service */\nurn:altinn:resource:some-other-service-identifier", + "keys": { + "type": "array", "nullable": true, - "type": "string" - }, - "endpoints": { - "description": "The endpoints associated with the action.", "items": { - "$ref": "#/components/schemas/V1ServiceOwnerDialogsCommandsCreate_ApiActionEndpoint" - }, - "nullable": true, - "type": "array" - }, - "id": { - "description": "A self-defined UUIDv7 may be provided to support idempotent creation of Api Actions. If not provided, a new UUIDv7 will be generated.", - "example": "01913cd5-784f-7d3b-abef-4c77b1f0972d", - "format": "guid", - "nullable": true, - "type": "string" + "$ref": "#/components/schemas/V1WellKnownJwksQueriesGet_Jwk" + } } - }, - "type": "object" + } }, - "V1ServiceOwnerDialogsCommandsCreate_ApiActionEndpoint": { + "V1WellKnownJwksQueriesGet_Jwk": { + "type": "object", "additionalProperties": false, "properties": { - "deprecated": { - "description": "Boolean indicating if the endpoint is deprecated.", - "type": "boolean" - }, - "documentationUrl": { - "description": "Link to documentation for the endpoint, providing documentation for integrators. Should be a URL to a\nhuman-readable page.", - "format": "uri", - "nullable": true, + "kty": { "type": "string" }, - "httpMethod": { - "description": "The HTTP method that the endpoint expects for this action.", - "oneOf": [ - { - "$ref": "#/components/schemas/Http_HttpVerb" - } - ] - }, - "requestSchema": { - "description": "Link to the request schema for the endpoint. Used to provide documentation for integrators.\nDialogporten will not validate information on this endpoint.", - "format": "uri", - "nullable": true, + "use": { "type": "string" }, - "responseSchema": { - "description": "Link to the response schema for the endpoint. Used to provide documentation for integrators.\nDialogporten will not validate information on this endpoint.", - "format": "uri", - "nullable": true, + "kid": { "type": "string" }, - "sunsetAt": { - "description": "Date and time when the endpoint will no longer function. Only set if the endpoint is deprecated. Dialogporten\nwill not enforce this date.", - "format": "date-time", - "nullable": true, + "crv": { "type": "string" }, - "url": { - "description": "The fully qualified URL of the API endpoint.", - "format": "uri", + "x": { "type": "string" }, - "version": { - "description": "Arbitrary string indicating the version of the endpoint.", - "nullable": true, + "alg": { "type": "string" } - }, - "type": "object" + } }, - "V1ServiceOwnerDialogsCommandsCreate_Attachment": { + "V1ServiceOwnerDialogTransmissionsQueriesSearch_Transmission": { + "type": "object", "additionalProperties": false, "properties": { - "displayName": { - "description": "The display name of the attachment that should be used in GUIs.", - "items": { - "$ref": "#/components/schemas/V1CommonLocalizations_Localization" - }, - "nullable": true, - "type": "array" - }, "id": { - "description": "A self-defined UUIDv7 may be provided to support idempotent creation of attachments. If not provided, a new UUIDv7 will be generated.", + "type": "string", + "description": "The unique identifier for the transmission in UUIDv7 format.", + "format": "guid" + }, + "createdAt": { + "type": "string", + "description": "The date and time when the transmission was created.", + "format": "date-time" + }, + "authorizationAttribute": { + "type": "string", + "description": "The authorization attribute associated with the transmission.", + "nullable": true + }, + "extendedType": { + "type": "string", + "description": "The extended type URI for the transmission.", + "format": "uri", + "nullable": true + }, + "relatedTransmissionId": { + "type": "string", + "description": "The unique identifier for the related transmission, if any.", "format": "guid", - "nullable": true, - "type": "string" + "nullable": true }, - "urls": { - "description": "The URLs associated with the attachment, each referring to a different representation of the attachment.", - "items": { - "$ref": "#/components/schemas/V1ServiceOwnerDialogsCommandsCreate_AttachmentUrl" - }, - "nullable": true, - "type": "array" - } - }, - "type": "object" - }, - "V1ServiceOwnerDialogsCommandsCreate_AttachmentUrl": { - "additionalProperties": false, - "properties": { - "consumerType": { - "description": "The type of consumer the URL is intended for.", + "deletedAt": { + "type": "string", + "description": "The date and time when the transmission was deleted, if applicable.", + "format": "date-time", + "nullable": true + }, + "type": { + "description": "The type of the transmission.", "oneOf": [ { - "$ref": "#/components/schemas/Attachments_AttachmentUrlConsumerType" + "$ref": "#/components/schemas/DialogsEntitiesTransmissions_DialogTransmissionType" } ] }, - "mediaType": { - "description": "The media type of the attachment.", - "example": "application/pdf\napplication/zip", - "nullable": true, - "type": "string" + "sender": { + "description": "The sender actor information for the transmission.", + "oneOf": [ + { + "$ref": "#/components/schemas/V1ServiceOwnerCommonActors_Actor" + } + ] }, - "url": { - "description": "The fully qualified URL of the attachment.", - "format": "uri", - "type": "string" - } - }, - "type": "object" - }, - "V1ServiceOwnerDialogsCommandsCreate_Content": { - "additionalProperties": false, - "properties": { - "additionalInfo": { - "description": "Additional information about the dialog.\nSupported media types: text/plain, text/markdown", - "nullable": true, + "content": { + "description": "The content of the transmission.", "oneOf": [ { - "$ref": "#/components/schemas/V1CommonContent_ContentValue" + "$ref": "#/components/schemas/V1ServiceOwnerDialogTransmissionsQueriesSearch_Content" } ] }, - "extendedStatus": { - "description": "Used as the human-readable label used to describe the \u0022ExtendedStatus\u0022 field.\nSupported media types: text/plain", + "attachments": { + "type": "array", + "description": "The attachments associated with the transmission.", "nullable": true, + "items": { + "$ref": "#/components/schemas/V1ServiceOwnerDialogTransmissionsQueriesSearch_Attachment" + } + } + } + }, + "DialogsEntitiesTransmissions_DialogTransmissionType": { + "type": "string", + "description": "", + "x-enumNames": [ + "Information", + "Acceptance", + "Rejection", + "Request", + "Alert", + "Decision", + "Submission", + "Correction" + ], + "enum": [ + "Information", + "Acceptance", + "Rejection", + "Request", + "Alert", + "Decision", + "Submission", + "Correction" + ] + }, + "V1ServiceOwnerCommonActors_Actor": { + "type": "object", + "additionalProperties": false, + "properties": { + "actorType": { + "description": "The type of actor that sent the transmission.", "oneOf": [ { - "$ref": "#/components/schemas/V1CommonContent_ContentValue" + "$ref": "#/components/schemas/Actors_ActorType" } ] }, - "mainContentReference": { - "description": "Front-channel embedded content. Used to dynamically embed content in the frontend from an external URL. Must be HTTPS.\nSupported media types: application/vnd.dialogporten.frontchannelembed\u002Bjson;type=markdown", + "actorName": { + "type": "string", + "description": "Specifies the name of the entity that sent the transmission. Mutually exclusive with ActorId. If ActorId\nis supplied, the name will be automatically populated from the name registries.", "nullable": true, - "oneOf": [ - { - "$ref": "#/components/schemas/V1CommonContent_ContentValue" - } - ] + "example": "Ola Nordmann" }, - "senderName": { - "description": "Overridden sender name. If not supplied, assume \u0022org\u0022 as the sender name. Must be text/plain if supplied.\nSupported media types: text/plain", + "actorId": { + "type": "string", + "description": "The identifier of the person or organization that sent the transmission. Mutually exclusive with ActorName.\nMight be omitted if ActorType is \"ServiceOwner\".", "nullable": true, + "example": "urn:altinn:person:identifier-no:12018212345" + } + } + }, + "Actors_ActorType": { + "type": "string", + "description": "", + "x-enumNames": [ + "PartyRepresentative", + "ServiceOwner" + ], + "enum": [ + "PartyRepresentative", + "ServiceOwner" + ] + }, + "V1ServiceOwnerDialogTransmissionsQueriesSearch_Content": { + "type": "object", + "additionalProperties": false, + "properties": { + "title": { + "description": "The title of the content.", "oneOf": [ { "$ref": "#/components/schemas/V1CommonContent_ContentValue" @@ -2250,355 +2530,337 @@ ] }, "summary": { - "description": "A short summary of the dialog and its current state.\nSupported media types: text/plain", + "description": "The summary of the content.", "oneOf": [ { "$ref": "#/components/schemas/V1CommonContent_ContentValue" } ] }, - "title": { - "description": "The title of the dialog.\nSupported media types: text/plain", + "contentReference": { + "description": "Front-channel embedded content. Used to dynamically embed content in the frontend from an external URL.", + "nullable": true, "oneOf": [ { "$ref": "#/components/schemas/V1CommonContent_ContentValue" } ] } - }, - "type": "object" + } }, - "V1ServiceOwnerDialogsCommandsCreate_Dialog": { + "V1CommonContent_ContentValue": { + "type": "object", "additionalProperties": false, "properties": { - "activities": { - "description": "An immutable list of activities associated with the dialog.", - "items": { - "$ref": "#/components/schemas/V1ServiceOwnerDialogsCommandsCreate_Activity" - }, - "nullable": true, - "type": "array" - }, - "apiActions": { - "description": "The API actions associated with the dialog. Should be used in specialized, non-browser-based integrations.", - "items": { - "$ref": "#/components/schemas/V1ServiceOwnerDialogsCommandsCreate_ApiAction" - }, + "value": { + "type": "array", + "description": "A list of localizations for the content.", "nullable": true, - "type": "array" - }, - "attachments": { - "description": "The attachments associated with the dialog (on an aggregate level).", "items": { - "$ref": "#/components/schemas/V1ServiceOwnerDialogsCommandsCreate_Attachment" - }, - "nullable": true, - "type": "array" - }, - "content": { - "description": "The dialog unstructured text content.", - "oneOf": [ - { - "$ref": "#/components/schemas/V1ServiceOwnerDialogsCommandsCreate_Content" - } - ] - }, - "createdAt": { - "description": "If set, will override the date and time when the dialog is set as created.\nIf not supplied, the current date /time will be used.", - "example": "2022-12-31T23:59:59Z", - "format": "date-time", - "type": "string" + "$ref": "#/components/schemas/V1CommonLocalizations_Localization" + } }, - "dueAt": { - "description": "The due date for the dialog. Dialogs past due date might be marked as such in frontends but will still be available.", - "example": "2022-12-31T23:59:59Z", - "format": "date-time", - "nullable": true, - "type": "string" + "mediaType": { + "type": "string", + "description": "Media type of the content, this can also indicate that the content is embeddable.\nFor a list of supported media types, see (link TBD)." + } + } + }, + "V1CommonLocalizations_Localization": { + "type": "object", + "additionalProperties": false, + "properties": { + "value": { + "type": "string", + "description": "The localized text or URI reference." }, - "expiresAt": { - "description": "The expiration date for the dialog. This is the last date when the dialog is available for the end user.\n \nAfter this date is passed, the dialog will be considered expired and no longer available for the end user in any\nAPI. If not supplied, the dialog will be considered to never expire. This field can be changed after creation.", - "example": "2022-12-31T23:59:59Z", - "format": "date-time", - "nullable": true, - "type": "string" + "languageCode": { + "type": "string", + "description": "The language code of the localization in ISO 639-1 format.", + "example": "nb" + } + } + }, + "V1ServiceOwnerDialogTransmissionsQueriesSearch_Attachment": { + "type": "object", + "additionalProperties": false, + "properties": { + "id": { + "type": "string", + "description": "The unique identifier for the attachment in UUIDv7 format.", + "format": "guid" }, - "extendedStatus": { - "description": "Arbitrary string with a service-specific indicator of status, typically used to indicate a fine-grained state of\nthe dialog to further specify the \u0022status\u0022 enum.", + "displayName": { + "type": "array", + "description": "The display name of the attachment that should be used in GUIs.", "nullable": true, - "type": "string" + "items": { + "$ref": "#/components/schemas/V1CommonLocalizations_Localization" + } }, - "externalReference": { - "description": "Arbitrary string with a service-specific reference to an external system or service.", + "urls": { + "type": "array", + "description": "The URLs associated with the attachment, each referring to a different representation of the attachment.", "nullable": true, - "type": "string" - }, - "guiActions": { - "description": "The GUI actions associated with the dialog. Should be used in browser-based interactive frontends.", "items": { - "$ref": "#/components/schemas/V1ServiceOwnerDialogsCommandsCreate_GuiAction" - }, - "nullable": true, - "type": "array" - }, + "$ref": "#/components/schemas/V1ServiceOwnerDialogTransmissionsQueriesSearch_AttachmentUrl" + } + } + } + }, + "V1ServiceOwnerDialogTransmissionsQueriesSearch_AttachmentUrl": { + "type": "object", + "additionalProperties": false, + "properties": { "id": { - "description": "A self-defined UUIDv7 may be provided to support idempotent creation of dialogs. If not provided, a new UUIDv7 will be generated.", - "example": "01913cd5-784f-7d3b-abef-4c77b1f0972d", - "format": "guid", - "nullable": true, - "type": "string" - }, - "party": { - "description": "The party code representing the organization or person that the dialog belongs to in URN format.", - "example": "urn:altinn:person:identifier-no:01125512345\nurn:altinn:organization:identifier-no:912345678", - "type": "string" - }, - "precedingProcess": { - "description": "Optional preceding process identifier to indicate the business process that preceded the process indicated in the \u0022Process\u0022 field. Cannot be set without also \u0022Process\u0022 being set.", - "nullable": true, - "type": "string" - }, - "process": { - "description": "Optional process identifier used to indicate a business process this dialog belongs to.", - "nullable": true, - "type": "string" + "type": "string", + "description": "The unique identifier for the attachment URL in UUIDv7 format.", + "format": "guid" }, - "progress": { - "description": "Advisory indicator of progress, represented as 1-100 percentage value. 100% representing a dialog that has come\nto a natural completion (successful or not).", - "format": "int32", - "nullable": true, - "type": "integer" + "url": { + "type": "string", + "description": "The fully qualified URL of the attachment. Will be set to \"urn:dialogporten:unauthorized\" if the user is\nnot authorized to access the transmission.", + "format": "uri", + "example": "https://someendpoint.com/someattachment.pdf\nurn:dialogporten:unauthorized" }, - "searchTags": { - "description": "A list of words (tags) that will be used in dialog search queries. Not visible in end-user DTO.", - "items": { - "$ref": "#/components/schemas/V1ServiceOwnerDialogsCommandsCreate_SearchTag" - }, + "mediaType": { + "type": "string", + "description": "The media type of the attachment.", "nullable": true, - "type": "array" - }, - "serviceResource": { - "description": "The service identifier for the service that the dialog is related to in URN-format.\nThis corresponds to a resource in the Altinn Resource Registry, which the authenticated organization\nmust own, i.e., be listed as the \u0022competent authority\u0022 in the Resource Registry entry.", - "example": "urn:altinn:resource:some-service-identifier", - "type": "string" - }, - "status": { - "description": "The aggregated status of the dialog.", - "oneOf": [ - { - "$ref": "#/components/schemas/DialogsEntities_DialogStatus" - } - ] + "example": "application/pdf\napplication/zip" }, - "systemLabel": { - "description": "Set the system label of the dialog Migration purposes.", - "nullable": true, + "consumerType": { + "description": "The type of consumer the URL is intended for.", "oneOf": [ { - "$ref": "#/components/schemas/DialogEndUserContextsEntities_SystemLabel" + "$ref": "#/components/schemas/Attachments_AttachmentUrlConsumerType" } ] - }, - "transmissions": { - "description": "The immutable list of transmissions associated with the dialog.", - "items": { - "$ref": "#/components/schemas/V1ServiceOwnerDialogsCommandsCreate_Transmission" - }, - "nullable": true, - "type": "array" - }, - "updatedAt": { - "description": "If set, will override the date and time when the dialog is set as last updated.\nIf not supplied, the current date /time will be used.", - "example": "2022-12-31T23:59:59Z", - "format": "date-time", - "type": "string" - }, - "visibleFrom": { - "description": "The timestamp when the dialog should be made visible for authorized end users. If not provided, the dialog will be\nimmediately available.", - "example": "2022-12-31T23:59:59Z", - "format": "date-time", - "nullable": true, - "type": "string" } - }, - "type": "object" + } }, - "V1ServiceOwnerDialogsCommandsCreate_GuiAction": { + "Attachments_AttachmentUrlConsumerType": { + "type": "string", + "description": "", + "x-enumNames": [ + "Gui", + "Api" + ], + "enum": [ + "Gui", + "Api" + ] + }, + "V1ServiceOwnerDialogTransmissionsQueriesGet_Transmission": { + "type": "object", "additionalProperties": false, "properties": { - "action": { - "description": "The action identifier for the action, corresponding to the \u0022action\u0022 attributeId used in the XACML service policy.", - "type": "string" + "id": { + "type": "string", + "description": "The unique identifier for the transmission in UUIDv7 format.", + "format": "guid" + }, + "createdAt": { + "type": "string", + "description": "The date and time when the transmission was created.", + "format": "date-time" }, "authorizationAttribute": { - "description": "Contains an authorization resource attributeId, that can used in custom authorization rules in the XACML service\npolicy, which by default is the policy belonging to the service referred to by \u0022serviceResource\u0022 in the dialog.\n \nCan also be used to refer to other service policies.", - "example": "mycustomresource\n/* equivalent to the above */\nurn:altinn:subresource:mycustomresource\nurn:altinn:task:Task_1\n/* refer to another service */\nurn:altinn:resource:some-other-service-identifier", - "nullable": true, - "type": "string" + "type": "string", + "description": "The authorization attribute associated with the transmission.", + "nullable": true }, - "httpMethod": { - "description": "The HTTP method that the frontend should use when redirecting the user.", - "nullable": true, + "extendedType": { + "type": "string", + "description": "The extended type URI for the transmission.", + "format": "uri", + "nullable": true + }, + "relatedTransmissionId": { + "type": "string", + "description": "The unique identifier for the related transmission, if any.", + "format": "guid", + "nullable": true + }, + "deletedAt": { + "type": "string", + "description": "The date and time when the transmission was deleted, if applicable.", + "format": "date-time", + "nullable": true + }, + "type": { + "description": "The type of the transmission.", + "oneOf": [ + { + "$ref": "#/components/schemas/DialogsEntitiesTransmissions_DialogTransmissionType" + } + ] + }, + "sender": { + "description": "The sender actor information for the transmission.", "oneOf": [ { - "$ref": "#/components/schemas/Http_HttpVerb" + "$ref": "#/components/schemas/V1ServiceOwnerCommonActors_Actor" } ] }, - "id": { - "description": "A self-defined UUIDv7 may be provided to support idempotent creation of Gui Actions. If not provided, a new UUIDv7 will be generated.", - "example": "01913cd5-784f-7d3b-abef-4c77b1f0972d", - "format": "guid", - "nullable": true, - "type": "string" - }, - "isDeleteDialogAction": { - "description": "Indicates whether the action results in the dialog being deleted. Used by frontends to implement custom UX\nfor delete actions.", - "type": "boolean" - }, - "priority": { - "description": "Indicates a priority for the action, making it possible for frontends to adapt GUI elements based on action\npriority.", + "content": { + "description": "The content of the transmission.", "oneOf": [ { - "$ref": "#/components/schemas/DialogsEntitiesActions_DialogGuiActionPriority" + "$ref": "#/components/schemas/V1ServiceOwnerDialogTransmissionsQueriesGet_Content" } ] }, - "prompt": { - "description": "If there should be a prompt asking the user for confirmation before the action is executed,\nthis field should contain the prompt text.", - "items": { - "$ref": "#/components/schemas/V1CommonLocalizations_Localization" - }, + "attachments": { + "type": "array", + "description": "The attachments associated with the transmission.", "nullable": true, - "type": "array" - }, - "title": { - "description": "The title of the action, this should be short and in verb form. Must be text/plain.", "items": { - "$ref": "#/components/schemas/V1CommonLocalizations_Localization" - }, - "nullable": true, - "type": "array" - }, - "url": { - "description": "The fully qualified URL of the action, to which the user will be redirected when the action is triggered. Will be set to\n\u0022urn:dialogporten:unauthorized\u0022 if the user is not authorized to perform the action.", - "example": "urn:dialogporten:unauthorized\nhttps://someendpoint.com/gui/some-service-instance-id", - "format": "uri", - "type": "string" + "$ref": "#/components/schemas/V1ServiceOwnerDialogTransmissionsQueriesGet_Attachment" + } } - }, - "type": "object" + } }, - "V1ServiceOwnerDialogsCommandsCreate_SearchTag": { + "ProblemDetails": { + "type": "object", "additionalProperties": false, "properties": { - "value": { - "description": "A search tag value.", - "type": "string" + "type": { + "type": "string", + "default": "https://www.rfc-editor.org/rfc/rfc7231#section-6.5.1" + }, + "title": { + "type": "string", + "default": "One or more validation errors occurred." + }, + "status": { + "type": "integer", + "format": "int32", + "default": 400 + }, + "instance": { + "type": "string", + "default": "/api/route" + }, + "traceId": { + "type": "string", + "default": "0HMPNHL0JHL76:00000001" + }, + "detail": { + "type": "string", + "nullable": true + }, + "errors": { + "type": "array", + "nullable": true, + "items": { + "$ref": "#/components/schemas/ProblemDetails_Error" + } } - }, - "type": "object" + } }, - "V1ServiceOwnerDialogsCommandsCreate_Transmission": { + "ProblemDetails_Error": { + "type": "object", "additionalProperties": false, "properties": { - "attachments": { - "description": "The transmission-level attachments.", - "items": { - "$ref": "#/components/schemas/V1ServiceOwnerDialogsCommandsCreate_TransmissionAttachment" - }, - "nullable": true, - "type": "array" + "name": { + "type": "string", + "default": "Error or field name" }, - "authorizationAttribute": { - "description": "Contains an authorization resource attributeId, that can used in custom authorization rules in the XACML service\npolicy, which by default is the policy belonging to the service referred to by \u0022serviceResource\u0022 in the dialog.\n \nCan also be used to refer to other service policies.", - "example": "mycustomresource\n/* equivalent to the above */\nurn:altinn:subresource:mycustomresource\nurn:altinn:task:Task_1\n/* refer to another service */\nurn:altinn:resource:some-other-service-identifier", - "nullable": true, - "type": "string" + "reason": { + "type": "string", + "default": "Error reason" }, - "content": { - "description": "The transmission unstructured text content.", + "code": { + "type": "string", + "nullable": true + }, + "severity": { + "type": "string", + "nullable": true + } + } + }, + "V1ServiceOwnerDialogTransmissionsQueriesGet_Content": { + "type": "object", + "additionalProperties": false, + "properties": { + "title": { + "description": "The title of the content.", "oneOf": [ { - "$ref": "#/components/schemas/V1ServiceOwnerDialogsCommandsCreate_TransmissionContent" + "$ref": "#/components/schemas/V1CommonContent_ContentValue" } ] }, - "createdAt": { - "description": "If supplied, overrides the creating date and time for the transmission.\nIf not supplied, the current date /time will be used.", - "format": "date-time", - "type": "string" - }, - "extendedType": { - "description": "Arbitrary URI/URN describing a service-specific transmission type.\n \nRefer to the service-specific documentation provided by the service owner for details (if in use).", - "format": "uri", - "nullable": true, - "type": "string" - }, - "id": { - "description": "A self-defined UUIDv7 may be provided to support idempotent creation of transmissions. If not provided, a new UUIDv7 will be generated.", - "example": "01913cd5-784f-7d3b-abef-4c77b1f0972d", - "format": "guid", - "nullable": true, - "type": "string" - }, - "relatedTransmissionId": { - "description": "Reference to any other transmission that this transmission is related to.", - "format": "guid", - "nullable": true, - "type": "string" - }, - "sender": { - "description": "The actor that sent the transmission.", + "summary": { + "description": "The summary of the content.", "oneOf": [ { - "$ref": "#/components/schemas/V1ServiceOwnerCommonActors_Actor" + "$ref": "#/components/schemas/V1CommonContent_ContentValue" } ] }, - "type": { - "description": "The type of transmission.", + "contentReference": { + "description": "Front-channel embedded content. Used to dynamically embed content in the frontend from an external URL.\nAllowed media types: application/vnd.dialogporten.frontchannelembed+json;type=markdown", + "nullable": true, "oneOf": [ { - "$ref": "#/components/schemas/DialogsEntitiesTransmissions_DialogTransmissionType" + "$ref": "#/components/schemas/V1CommonContent_ContentValue" } ] } - }, - "type": "object" + } }, - "V1ServiceOwnerDialogsCommandsCreate_TransmissionAttachment": { + "V1ServiceOwnerDialogTransmissionsQueriesGet_Attachment": { + "type": "object", "additionalProperties": false, "properties": { + "id": { + "type": "string", + "description": "The unique identifier for the attachment in UUIDv7 format.", + "format": "guid" + }, "displayName": { + "type": "array", "description": "The display name of the attachment that should be used in GUIs.", + "nullable": true, "items": { "$ref": "#/components/schemas/V1CommonLocalizations_Localization" - }, - "nullable": true, - "type": "array" - }, - "id": { - "description": "A self-defined UUIDv7 may be provided to support idempotent creation of transmission attachments. If not provided, a new UUIDv7 will be generated.", - "example": "01913cd5-784f-7d3b-abef-4c77b1f0972d", - "format": "guid", - "nullable": true, - "type": "string" + } }, "urls": { + "type": "array", "description": "The URLs associated with the attachment, each referring to a different representation of the attachment.", - "items": { - "$ref": "#/components/schemas/V1ServiceOwnerDialogsCommandsCreate_TransmissionAttachmentUrl" - }, "nullable": true, - "type": "array" + "items": { + "$ref": "#/components/schemas/V1ServiceOwnerDialogTransmissionsQueriesGet_AttachmentUrl" + } } - }, - "type": "object" + } }, - "V1ServiceOwnerDialogsCommandsCreate_TransmissionAttachmentUrl": { + "V1ServiceOwnerDialogTransmissionsQueriesGet_AttachmentUrl": { + "type": "object", "additionalProperties": false, "properties": { + "id": { + "type": "string", + "description": "The unique identifier for the attachment URL in UUIDv7 format.", + "format": "guid" + }, + "url": { + "type": "string", + "description": "The fully qualified URL of the attachment. Will be set to \"urn:dialogporten:unauthorized\" if the user is\nnot authorized to access the transmission.", + "format": "uri", + "example": "https://someendpoint.com/someattachment.pdf\nurn:dialogporten:unauthorized" + }, + "mediaType": { + "type": "string", + "description": "The media type of the attachment.", + "nullable": true, + "example": "application/pdf\napplication/zip" + }, "consumerType": { "description": "The type of consumer the URL is intended for.", "oneOf": [ @@ -2606,282 +2868,362 @@ "$ref": "#/components/schemas/Attachments_AttachmentUrlConsumerType" } ] - }, - "mediaType": { - "description": "The media type of the attachment.", - "example": "application/pdf\napplication/zip", - "nullable": true, - "type": "string" - }, - "url": { - "description": "The fully qualified URL of the attachment.", - "format": "uri", - "type": "string" } - }, - "type": "object" + } }, - "V1ServiceOwnerDialogsCommandsCreate_TransmissionContent": { + "V1ServiceOwnerDialogTransmissionsCreate_TransmissionRequest": { + "type": "object", "additionalProperties": false, "properties": { - "contentReference": { - "description": "Front-channel embedded content. Used to dynamically embed content in the frontend from an external URL. Must be HTTPS.\nAllowed media types: application/vnd.dialogporten.frontchannelembed\u002Bjson;type=markdown", + "id": { + "type": "string", + "description": "The UUDIv7 of the action may be provided to support idempotent additions to the list of transmissions.\nIf not supplied, a new UUIDv7 will be generated.", + "format": "guid", + "nullable": true, + "example": "01913cd5-784f-7d3b-abef-4c77b1f0972d" + }, + "createdAt": { + "type": "string", + "description": "If supplied, overrides the creating date and time for the transmission.\nIf not supplied, the current date /time will be used.", + "format": "date-time" + }, + "authorizationAttribute": { + "type": "string", + "description": "Contains an authorization resource attributeId, that can used in custom authorization rules in the XACML service\npolicy, which by default is the policy belonging to the service referred to by \"serviceResource\" in the dialog.\n \nCan also be used to refer to other service policies.", "nullable": true, + "example": "mycustomresource\n/* equivalent to the above */\nurn:altinn:subresource:mycustomresource\nurn:altinn:task:Task_1\n/* refer to another service */\nurn:altinn:resource:some-other-service-identifier" + }, + "extendedType": { + "type": "string", + "description": "Arbitrary URI/URN describing a service-specific transmission type.\n \nRefer to the service-specific documentation provided by the service owner for details (if in use).", + "format": "uri", + "nullable": true + }, + "relatedTransmissionId": { + "type": "string", + "description": "Reference to any other transmission that this transmission is related to.", + "format": "guid", + "nullable": true + }, + "type": { + "description": "The type of transmission.", "oneOf": [ { - "$ref": "#/components/schemas/V1CommonContent_ContentValue" + "$ref": "#/components/schemas/DialogsEntitiesTransmissions_DialogTransmissionType" } ] }, - "summary": { - "description": "The transmission summary.", + "sender": { + "description": "The actor that sent the transmission.", "oneOf": [ { - "$ref": "#/components/schemas/V1CommonContent_ContentValue" + "$ref": "#/components/schemas/V1ServiceOwnerCommonActors_Actor" } ] }, - "title": { - "description": "The transmission title. Must be text/plain.", + "content": { + "description": "The transmission unstructured text content.", "oneOf": [ { - "$ref": "#/components/schemas/V1CommonContent_ContentValue" + "$ref": "#/components/schemas/V1ServiceOwnerDialogsCommandsUpdate_TransmissionContent" } ] + }, + "attachments": { + "type": "array", + "description": "The transmission-level attachments.", + "nullable": true, + "items": { + "$ref": "#/components/schemas/V1ServiceOwnerDialogsCommandsUpdate_TransmissionAttachment" + } } - }, - "type": "object" + } }, - "V1ServiceOwnerDialogsCommandsUpdate_Activity": { + "V1ServiceOwnerDialogsCommandsUpdate_TransmissionContent": { + "type": "object", "additionalProperties": false, "properties": { - "createdAt": { - "description": "If supplied, overrides the creating date and time for the transmission.\nIf not supplied, the current date /time will be used.", - "format": "date-time", - "nullable": true, - "type": "string" - }, - "description": { - "description": "Unstructured text describing the activity. Only set if the activity type is \u0022Information\u0022.", - "items": { - "$ref": "#/components/schemas/V1CommonLocalizations_Localization" - }, - "nullable": true, - "type": "array" - }, - "extendedType": { - "description": "Arbitrary URI/URN describing a service-specific transmission type.", - "format": "uri", - "nullable": true, - "type": "string" - }, - "id": { - "description": "The UUDIv7 of the action may be provided to support idempotent additions to the list of activities.\nIf not supplied, a new UUIDv7 will be generated.", - "example": "01913cd5-784f-7d3b-abef-4c77b1f0972d", - "format": "guid", - "nullable": true, - "type": "string" + "title": { + "description": "The transmission title. Must be text/plain.", + "oneOf": [ + { + "$ref": "#/components/schemas/V1CommonContent_ContentValue" + } + ] }, - "performedBy": { - "description": "The actor that performed the activity.", + "summary": { + "description": "The transmission summary.", "oneOf": [ { - "$ref": "#/components/schemas/V1ServiceOwnerCommonActors_Actor" + "$ref": "#/components/schemas/V1CommonContent_ContentValue" } ] }, - "transmissionId": { - "description": "If the activity is related to a particular transmission, this field will contain the transmission identifier.\nMust be present in the request body.", - "format": "guid", + "contentReference": { + "description": "Front-channel embedded content. Used to dynamically embed content in the frontend from an external URL. Must be HTTPS.\nAllowed media types: application/vnd.dialogporten.frontchannelembed+json;type=markdown", "nullable": true, - "type": "string" - }, - "type": { - "description": "The type of transmission.", "oneOf": [ { - "$ref": "#/components/schemas/DialogsEntitiesActivities_DialogActivityType" + "$ref": "#/components/schemas/V1CommonContent_ContentValue" } ] } - }, - "type": "object" + } }, - "V1ServiceOwnerDialogsCommandsUpdate_ApiAction": { + "V1ServiceOwnerDialogsCommandsUpdate_TransmissionAttachment": { + "type": "object", "additionalProperties": false, "properties": { - "action": { - "description": "String identifier for the action, corresponding to the \u0022action\u0022 attributeId used in the XACML service policy,\nwhich by default is the policy belonging to the service referred to by \u0022serviceResource\u0022 in the dialog.", - "example": "write", - "type": "string" - }, - "authorizationAttribute": { - "description": "Contains an authorization resource attributeId, that can used in custom authorization rules in the XACML service\npolicy, which by default is the policy belonging to the service referred to by \u0022serviceResource\u0022 in the dialog.\n \nCan also be used to refer to other service policies.", - "example": "mycustomresource\n/* equivalent to the above */\nurn:altinn:subresource:mycustomresource\nurn:altinn:task:Task_1\n/* refer to another service */\nurn:altinn:resource:some-other-service-identifier", + "id": { + "type": "string", + "description": "A self-defined UUIDv7 may be provided to support idempotent additions of transmission attachments. If not provided, a new UUIDv7 will be generated.", + "format": "guid", "nullable": true, - "type": "string" + "example": "01913cd5-784f-7d3b-abef-4c77b1f0972d" }, - "endpoints": { - "description": "The endpoints associated with the action.", - "items": { - "$ref": "#/components/schemas/V1ServiceOwnerDialogsCommandsUpdate_ApiActionEndpoint" - }, + "displayName": { + "type": "array", + "description": "The display name of the attachment that should be used in GUIs.", "nullable": true, - "type": "array" + "items": { + "$ref": "#/components/schemas/V1CommonLocalizations_Localization" + } }, - "id": { - "description": "A self-defined UUIDv7 may be provided to support idempotent additions of Api Actions. If not provided, a new UUIDv7 will be generated.", - "example": "01913cd5-784f-7d3b-abef-4c77b1f0972d", - "format": "guid", + "urls": { + "type": "array", + "description": "The URLs associated with the attachment, each referring to a different representation of the attachment.", "nullable": true, - "type": "string" + "items": { + "$ref": "#/components/schemas/V1ServiceOwnerDialogsCommandsUpdate_TransmissionAttachmentUrl" + } } - }, - "type": "object" + } }, - "V1ServiceOwnerDialogsCommandsUpdate_ApiActionEndpoint": { + "V1ServiceOwnerDialogsCommandsUpdate_TransmissionAttachmentUrl": { + "type": "object", "additionalProperties": false, "properties": { - "deprecated": { - "description": "Boolean indicating if the endpoint is deprecated.", - "type": "boolean" + "url": { + "type": "string", + "description": "The fully qualified URL of the attachment.", + "format": "uri" }, - "documentationUrl": { - "description": "Link to documentation for the endpoint, providing documentation for integrators. Should be a URL to a\nhuman-readable page.", - "format": "uri", + "mediaType": { + "type": "string", + "description": "The media type of the attachment.", "nullable": true, - "type": "string" + "example": "application/pdf\napplication/zip" }, - "httpMethod": { - "description": "The HTTP method that the endpoint expects for this action.", + "consumerType": { + "description": "The type of consumer the URL is intended for.", "oneOf": [ { - "$ref": "#/components/schemas/Http_HttpVerb" + "$ref": "#/components/schemas/Attachments_AttachmentUrlConsumerType" } ] - }, + } + } + }, + "V1ServiceOwnerDialogSeenLogsQueriesSearch_SeenLog": { + "type": "object", + "additionalProperties": false, + "properties": { "id": { - "description": "A UUIDv7 used for merging existing data, unknown IDs will be ignored as this entity does not support user-defined IDs.", - "example": "01913cd5-784f-7d3b-abef-4c77b1f0972d", - "format": "guid", - "nullable": true, - "type": "string" + "type": "string", + "format": "guid" }, - "requestSchema": { - "description": "Link to the request schema for the endpoint. Used to provide documentation for integrators.\nDialogporten will not validate information on this endpoint.", - "format": "uri", - "nullable": true, - "type": "string" + "seenAt": { + "type": "string", + "format": "date-time" }, - "responseSchema": { - "description": "Link to the response schema for the endpoint. Used to provide documentation for integrators.\nDialogporten will not validate information on this endpoint.", - "format": "uri", - "nullable": true, - "type": "string" + "seenBy": { + "$ref": "#/components/schemas/V1ServiceOwnerCommonActors_Actor" }, - "sunsetAt": { - "description": "Date and time when the endpoint will no longer function. Only set if the endpoint is deprecated. Dialogporten\nwill not enforce this date.", - "format": "date-time", - "nullable": true, - "type": "string" + "isViaServiceOwner": { + "type": "boolean", + "nullable": true + } + } + }, + "V1ServiceOwnerDialogSeenLogsQueriesGet_SeenLog": { + "type": "object", + "additionalProperties": false, + "properties": { + "id": { + "type": "string", + "format": "guid" }, - "url": { - "description": "The fully qualified URL of the API endpoint.", - "format": "uri", - "type": "string" + "seenAt": { + "type": "string", + "format": "date-time" }, - "version": { - "description": "Arbitrary string indicating the version of the endpoint.", - "nullable": true, - "type": "string" + "seenBy": { + "$ref": "#/components/schemas/V1ServiceOwnerCommonActors_Actor" + }, + "isViaServiceOwner": { + "type": "boolean", + "nullable": true } - }, - "type": "object" + } }, - "V1ServiceOwnerDialogsCommandsUpdate_Attachment": { + "V1ServiceOwnerDialogsUpdate_DialogRequest": { + "type": "object", "additionalProperties": false, "properties": { - "displayName": { - "description": "The display name of the attachment that should be used in GUIs.", - "items": { - "$ref": "#/components/schemas/V1CommonLocalizations_Localization" - }, + "dto": { + "$ref": "#/components/schemas/V1ServiceOwnerDialogsCommandsUpdate_Dialog" + } + } + }, + "V1ServiceOwnerDialogsCommandsUpdate_Dialog": { + "type": "object", + "additionalProperties": false, + "properties": { + "progress": { + "type": "integer", + "description": "Advisory indicator of progress, represented as 1-100 percentage value. 100% representing a dialog that has come\nto a natural completion (successful or not).", + "format": "int32", + "nullable": true + }, + "extendedStatus": { + "type": "string", + "description": "Arbitrary string with a service-specific indicator of status, typically used to indicate a fine-grained state of\nthe dialog to further specify the \"status\" enum.", + "nullable": true + }, + "externalReference": { + "type": "string", + "description": "Arbitrary string with a service-specific reference to an external system or service.", + "nullable": true + }, + "visibleFrom": { + "type": "string", + "description": "The timestamp when the dialog should be made visible for authorized end users. If not provided, the dialog will be\nimmediately available.", + "format": "date-time", "nullable": true, - "type": "array" + "example": "2022-12-31T23:59:59Z" }, - "id": { - "description": "A self-defined UUIDv7 may be provided to support idempotent additions of attachments. If not provided, a new UUIDv7 will be generated.", - "example": "01913cd5-784f-7d3b-abef-4c77b1f0972d", - "format": "guid", + "dueAt": { + "type": "string", + "description": "The due date for the dialog. Dialogs past due date might be marked as such in frontends but will still be available.", + "format": "date-time", "nullable": true, - "type": "string" + "example": "2022-12-31T23:59:59Z" }, - "urls": { - "description": "The URLs associated with the attachment, each referring to a different representation of the attachment.", - "items": { - "$ref": "#/components/schemas/V1ServiceOwnerDialogsCommandsUpdate_AttachmentUrl" - }, + "expiresAt": { + "type": "string", + "description": "The expiration date for the dialog. This is the last date when the dialog is available for the end user.\n \nAfter this date is passed, the dialog will be considered expired and no longer available for the end user in any\nAPI. If not supplied, the dialog will be considered to never expire. This field can be changed after creation.", + "format": "date-time", "nullable": true, - "type": "array" - } - }, - "type": "object" - }, - "V1ServiceOwnerDialogsCommandsUpdate_AttachmentUrl": { - "additionalProperties": false, - "properties": { - "consumerType": { - "description": "The type of consumer the URL is intended for.", + "example": "2022-12-31T23:59:59Z" + }, + "status": { + "description": "The aggregated status of the dialog.", "oneOf": [ { - "$ref": "#/components/schemas/Attachments_AttachmentUrlConsumerType" + "$ref": "#/components/schemas/DialogsEntities_DialogStatus" } ] }, - "id": { - "description": "A UUIDv7 used for merging existing data, unknown IDs will be ignored as this entity does not support user-defined IDs.", - "example": "01913cd5-784f-7d3b-abef-4c77b1f0972d", - "format": "guid", + "content": { + "description": "The dialog unstructured text content.", + "oneOf": [ + { + "$ref": "#/components/schemas/V1ServiceOwnerDialogsCommandsUpdate_Content" + } + ] + }, + "searchTags": { + "type": "array", + "description": "A list of words (tags) that will be used in dialog search queries. Not visible in end-user DTO.", "nullable": true, - "type": "string" + "items": { + "$ref": "#/components/schemas/V1ServiceOwnerDialogsCommandsUpdate_SearchTag" + } }, - "mediaType": { - "description": "The media type of the attachment.", - "example": "application/pdf\napplication/zip", + "attachments": { + "type": "array", + "description": "The attachments associated with the dialog (on an aggregate level).", "nullable": true, - "type": "string" + "items": { + "$ref": "#/components/schemas/V1ServiceOwnerDialogsCommandsUpdate_Attachment" + } }, - "url": { - "description": "The fully qualified URL of the attachment.", - "format": "uri", - "type": "string" + "transmissions": { + "type": "array", + "description": "The immutable list of transmissions associated with the dialog. When updating via PUT, any transmissions\nadded here will be appended to the existing list of transmissions.", + "nullable": true, + "items": { + "$ref": "#/components/schemas/V1ServiceOwnerDialogsCommandsUpdate_Transmission" + } + }, + "guiActions": { + "type": "array", + "description": "The GUI actions associated with the dialog. Should be used in browser-based interactive frontends.", + "nullable": true, + "items": { + "$ref": "#/components/schemas/V1ServiceOwnerDialogsCommandsUpdate_GuiAction" + } + }, + "apiActions": { + "type": "array", + "description": "The API actions associated with the dialog. Should be used in specialized, non-browser-based integrations.", + "nullable": true, + "items": { + "$ref": "#/components/schemas/V1ServiceOwnerDialogsCommandsUpdate_ApiAction" + } + }, + "activities": { + "type": "array", + "description": "An immutable list of activities associated with the dialog. When updating via PUT, any activities added here\nwill be appended to the existing list of activities.", + "nullable": true, + "items": { + "$ref": "#/components/schemas/V1ServiceOwnerDialogsCommandsUpdate_Activity" + } } - }, - "type": "object" + } + }, + "DialogsEntities_DialogStatus": { + "type": "string", + "description": "", + "x-enumNames": [ + "New", + "InProgress", + "Draft", + "Sent", + "RequiresAttention", + "Completed" + ], + "enum": [ + "New", + "InProgress", + "Draft", + "Sent", + "RequiresAttention", + "Completed" + ] }, "V1ServiceOwnerDialogsCommandsUpdate_Content": { + "type": "object", "additionalProperties": false, "properties": { - "additionalInfo": { - "description": "Additional information about the dialog, this may contain Markdown.", - "nullable": true, + "title": { + "description": "The title of the dialog. Must be text/plain.", "oneOf": [ { "$ref": "#/components/schemas/V1CommonContent_ContentValue" } ] }, - "extendedStatus": { - "description": "Used as the human-readable label used to describe the \u0022ExtendedStatus\u0022 field. Must be text/plain.", - "nullable": true, + "summary": { + "description": "A short summary of the dialog and its current state. Must be text/plain.", "oneOf": [ { "$ref": "#/components/schemas/V1CommonContent_ContentValue" } ] }, - "mainContentReference": { - "description": "Front-channel embedded content. Used to dynamically embed content in the frontend from an external URL. Must be HTTPS.", + "senderName": { + "description": "Overridden sender name. If not supplied, assume \"org\" as the sender name. Must be text/plain if supplied.", "nullable": true, "oneOf": [ { @@ -2889,8 +3231,8 @@ } ] }, - "senderName": { - "description": "Overridden sender name. If not supplied, assume \u0022org\u0022 as the sender name. Must be text/plain if supplied.", + "additionalInfo": { + "description": "Additional information about the dialog, this may contain Markdown.", "nullable": true, "oneOf": [ { @@ -2898,144 +3240,195 @@ } ] }, - "summary": { - "description": "A short summary of the dialog and its current state. Must be text/plain.", + "extendedStatus": { + "description": "Used as the human-readable label used to describe the \"ExtendedStatus\" field. Must be text/plain.", + "nullable": true, "oneOf": [ { "$ref": "#/components/schemas/V1CommonContent_ContentValue" } ] }, - "title": { - "description": "The title of the dialog. Must be text/plain.", + "mainContentReference": { + "description": "Front-channel embedded content. Used to dynamically embed content in the frontend from an external URL. Must be HTTPS.", + "nullable": true, "oneOf": [ { "$ref": "#/components/schemas/V1CommonContent_ContentValue" } ] } - }, - "type": "object" + } }, - "V1ServiceOwnerDialogsCommandsUpdate_Dialog": { + "V1ServiceOwnerDialogsCommandsUpdate_SearchTag": { + "type": "object", "additionalProperties": false, "properties": { - "activities": { - "description": "An immutable list of activities associated with the dialog. When updating via PUT, any activities added here\nwill be appended to the existing list of activities.", - "items": { - "$ref": "#/components/schemas/V1ServiceOwnerDialogsCommandsUpdate_Activity" - }, + "value": { + "type": "string", + "description": "A search tag value." + } + } + }, + "V1ServiceOwnerDialogsCommandsUpdate_Attachment": { + "type": "object", + "additionalProperties": false, + "properties": { + "id": { + "type": "string", + "description": "A self-defined UUIDv7 may be provided to support idempotent additions of attachments. If not provided, a new UUIDv7 will be generated.", + "format": "guid", "nullable": true, - "type": "array" + "example": "01913cd5-784f-7d3b-abef-4c77b1f0972d" }, - "apiActions": { - "description": "The API actions associated with the dialog. Should be used in specialized, non-browser-based integrations.", - "items": { - "$ref": "#/components/schemas/V1ServiceOwnerDialogsCommandsUpdate_ApiAction" - }, + "displayName": { + "type": "array", + "description": "The display name of the attachment that should be used in GUIs.", "nullable": true, - "type": "array" + "items": { + "$ref": "#/components/schemas/V1CommonLocalizations_Localization" + } }, - "attachments": { - "description": "The attachments associated with the dialog (on an aggregate level).", + "urls": { + "type": "array", + "description": "The URLs associated with the attachment, each referring to a different representation of the attachment.", + "nullable": true, "items": { - "$ref": "#/components/schemas/V1ServiceOwnerDialogsCommandsUpdate_Attachment" - }, + "$ref": "#/components/schemas/V1ServiceOwnerDialogsCommandsUpdate_AttachmentUrl" + } + } + } + }, + "V1ServiceOwnerDialogsCommandsUpdate_AttachmentUrl": { + "type": "object", + "additionalProperties": false, + "properties": { + "id": { + "type": "string", + "description": "A UUIDv7 used for merging existing data, unknown IDs will be ignored as this entity does not support user-defined IDs.", + "format": "guid", "nullable": true, - "type": "array" + "example": "01913cd5-784f-7d3b-abef-4c77b1f0972d" }, - "content": { - "description": "The dialog unstructured text content.", + "url": { + "type": "string", + "description": "The fully qualified URL of the attachment.", + "format": "uri" + }, + "mediaType": { + "type": "string", + "description": "The media type of the attachment.", + "nullable": true, + "example": "application/pdf\napplication/zip" + }, + "consumerType": { + "description": "The type of consumer the URL is intended for.", "oneOf": [ { - "$ref": "#/components/schemas/V1ServiceOwnerDialogsCommandsUpdate_Content" + "$ref": "#/components/schemas/Attachments_AttachmentUrlConsumerType" } ] - }, - "dueAt": { - "description": "The due date for the dialog. Dialogs past due date might be marked as such in frontends but will still be available.", - "example": "2022-12-31T23:59:59Z", - "format": "date-time", - "nullable": true, - "type": "string" - }, - "expiresAt": { - "description": "The expiration date for the dialog. This is the last date when the dialog is available for the end user.\n \nAfter this date is passed, the dialog will be considered expired and no longer available for the end user in any\nAPI. If not supplied, the dialog will be considered to never expire. This field can be changed after creation.", - "example": "2022-12-31T23:59:59Z", - "format": "date-time", + } + } + }, + "V1ServiceOwnerDialogsCommandsUpdate_Transmission": { + "type": "object", + "additionalProperties": false, + "properties": { + "id": { + "type": "string", + "description": "The UUDIv7 of the action may be provided to support idempotent additions to the list of transmissions.\nIf not supplied, a new UUIDv7 will be generated.", + "format": "guid", "nullable": true, - "type": "string" + "example": "01913cd5-784f-7d3b-abef-4c77b1f0972d" }, - "extendedStatus": { - "description": "Arbitrary string with a service-specific indicator of status, typically used to indicate a fine-grained state of\nthe dialog to further specify the \u0022status\u0022 enum.", - "nullable": true, - "type": "string" + "createdAt": { + "type": "string", + "description": "If supplied, overrides the creating date and time for the transmission.\nIf not supplied, the current date /time will be used.", + "format": "date-time" }, - "externalReference": { - "description": "Arbitrary string with a service-specific reference to an external system or service.", + "authorizationAttribute": { + "type": "string", + "description": "Contains an authorization resource attributeId, that can used in custom authorization rules in the XACML service\npolicy, which by default is the policy belonging to the service referred to by \"serviceResource\" in the dialog.\n \nCan also be used to refer to other service policies.", "nullable": true, - "type": "string" + "example": "mycustomresource\n/* equivalent to the above */\nurn:altinn:subresource:mycustomresource\nurn:altinn:task:Task_1\n/* refer to another service */\nurn:altinn:resource:some-other-service-identifier" }, - "guiActions": { - "description": "The GUI actions associated with the dialog. Should be used in browser-based interactive frontends.", - "items": { - "$ref": "#/components/schemas/V1ServiceOwnerDialogsCommandsUpdate_GuiAction" - }, - "nullable": true, - "type": "array" + "extendedType": { + "type": "string", + "description": "Arbitrary URI/URN describing a service-specific transmission type.\n \nRefer to the service-specific documentation provided by the service owner for details (if in use).", + "format": "uri", + "nullable": true }, - "progress": { - "description": "Advisory indicator of progress, represented as 1-100 percentage value. 100% representing a dialog that has come\nto a natural completion (successful or not).", - "format": "int32", - "nullable": true, - "type": "integer" + "relatedTransmissionId": { + "type": "string", + "description": "Reference to any other transmission that this transmission is related to.", + "format": "guid", + "nullable": true }, - "searchTags": { - "description": "A list of words (tags) that will be used in dialog search queries. Not visible in end-user DTO.", - "items": { - "$ref": "#/components/schemas/V1ServiceOwnerDialogsCommandsUpdate_SearchTag" - }, - "nullable": true, - "type": "array" + "type": { + "description": "The type of transmission.", + "oneOf": [ + { + "$ref": "#/components/schemas/DialogsEntitiesTransmissions_DialogTransmissionType" + } + ] }, - "status": { - "description": "The aggregated status of the dialog.", + "sender": { + "description": "The actor that sent the transmission.", "oneOf": [ { - "$ref": "#/components/schemas/DialogsEntities_DialogStatus" + "$ref": "#/components/schemas/V1ServiceOwnerCommonActors_Actor" } ] }, - "transmissions": { - "description": "The immutable list of transmissions associated with the dialog. When updating via PUT, any transmissions\nadded here will be appended to the existing list of transmissions.", - "items": { - "$ref": "#/components/schemas/V1ServiceOwnerDialogsCommandsUpdate_Transmission" - }, - "nullable": true, - "type": "array" + "content": { + "description": "The transmission unstructured text content.", + "oneOf": [ + { + "$ref": "#/components/schemas/V1ServiceOwnerDialogsCommandsUpdate_TransmissionContent" + } + ] }, - "visibleFrom": { - "description": "The timestamp when the dialog should be made visible for authorized end users. If not provided, the dialog will be\nimmediately available.", - "example": "2022-12-31T23:59:59Z", - "format": "date-time", + "attachments": { + "type": "array", + "description": "The transmission-level attachments.", "nullable": true, - "type": "string" + "items": { + "$ref": "#/components/schemas/V1ServiceOwnerDialogsCommandsUpdate_TransmissionAttachment" + } } - }, - "type": "object" + } }, "V1ServiceOwnerDialogsCommandsUpdate_GuiAction": { + "type": "object", "additionalProperties": false, "properties": { + "id": { + "type": "string", + "description": "A self-defined UUIDv7 may be provided to support idempotent additions of Gui Actions. If not provided, a new UUIDv7 will be generated.", + "format": "guid", + "nullable": true, + "example": "01913cd5-784f-7d3b-abef-4c77b1f0972d" + }, "action": { - "description": "The action identifier for the action, corresponding to the \u0022action\u0022 attributeId used in the XACML service policy.", - "type": "string" + "type": "string", + "description": "The action identifier for the action, corresponding to the \"action\" attributeId used in the XACML service policy." + }, + "url": { + "type": "string", + "description": "The fully qualified URL of the action, to which the user will be redirected when the action is triggered. Will be set to\n\"urn:dialogporten:unauthorized\" if the user is not authorized to perform the action.", + "format": "uri", + "example": "urn:dialogporten:unauthorized\nhttps://someendpoint.com/gui/some-service-instance-id" }, "authorizationAttribute": { - "description": "Contains an authorization resource attributeId, that can used in custom authorization rules in the XACML service\npolicy, which by default is the policy belonging to the service referred to by \u0022serviceResource\u0022 in the dialog.\n \nCan also be used to refer to other service policies.", - "example": "mycustomresource\n/* equivalent to the above */\nurn:altinn:subresource:mycustomresource\nurn:altinn:task:Task_1\n/* refer to another service */\nurn:altinn:resource:some-other-service-identifier", + "type": "string", + "description": "Contains an authorization resource attributeId, that can used in custom authorization rules in the XACML service\npolicy, which by default is the policy belonging to the service referred to by \"serviceResource\" in the dialog.\n \nCan also be used to refer to other service policies.", "nullable": true, - "type": "string" + "example": "mycustomresource\n/* equivalent to the above */\nurn:altinn:subresource:mycustomresource\nurn:altinn:task:Task_1\n/* refer to another service */\nurn:altinn:resource:some-other-service-identifier" + }, + "isDeleteDialogAction": { + "type": "boolean", + "description": "Indicates whether the action results in the dialog being deleted. Used by frontends to implement custom UX\nfor delete actions." }, "httpMethod": { "description": "The HTTP method that the frontend should use when redirecting the user.", @@ -3046,17 +3439,6 @@ } ] }, - "id": { - "description": "A self-defined UUIDv7 may be provided to support idempotent additions of Gui Actions. If not provided, a new UUIDv7 will be generated.", - "example": "01913cd5-784f-7d3b-abef-4c77b1f0972d", - "format": "guid", - "nullable": true, - "type": "string" - }, - "isDeleteDialogAction": { - "description": "Indicates whether the action results in the dialog being deleted. Used by frontends to implement custom UX\nfor delete actions.", - "type": "boolean" - }, "priority": { "description": "Indicates a priority for the action, making it possible for frontends to adapt GUI elements based on action\npriority.", "oneOf": [ @@ -3065,269 +3447,522 @@ } ] }, - "prompt": { - "description": "If there should be a prompt asking the user for confirmation before the action is executed,\nthis field should contain the prompt text.", - "items": { - "$ref": "#/components/schemas/V1CommonLocalizations_Localization" - }, - "nullable": true, - "type": "array" - }, "title": { + "type": "array", "description": "The title of the action, this should be short and in verb form. Must be text/plain.", + "nullable": true, "items": { "$ref": "#/components/schemas/V1CommonLocalizations_Localization" - }, - "nullable": true, - "type": "array" + } }, - "url": { - "description": "The fully qualified URL of the action, to which the user will be redirected when the action is triggered. Will be set to\n\u0022urn:dialogporten:unauthorized\u0022 if the user is not authorized to perform the action.", - "example": "urn:dialogporten:unauthorized\nhttps://someendpoint.com/gui/some-service-instance-id", - "format": "uri", - "type": "string" + "prompt": { + "type": "array", + "description": "If there should be a prompt asking the user for confirmation before the action is executed,\nthis field should contain the prompt text.", + "nullable": true, + "items": { + "$ref": "#/components/schemas/V1CommonLocalizations_Localization" + } } - }, - "type": "object" + } }, - "V1ServiceOwnerDialogsCommandsUpdate_SearchTag": { + "Http_HttpVerb": { + "type": "string", + "description": "", + "x-enumNames": [ + "GET", + "POST", + "PUT", + "PATCH", + "DELETE", + "HEAD", + "OPTIONS", + "TRACE", + "CONNECT" + ], + "enum": [ + "GET", + "POST", + "PUT", + "PATCH", + "DELETE", + "HEAD", + "OPTIONS", + "TRACE", + "CONNECT" + ] + }, + "DialogsEntitiesActions_DialogGuiActionPriority": { + "type": "string", + "description": "", + "x-enumNames": [ + "Primary", + "Secondary", + "Tertiary" + ], + "enum": [ + "Primary", + "Secondary", + "Tertiary" + ] + }, + "V1ServiceOwnerDialogsCommandsUpdate_ApiAction": { + "type": "object", "additionalProperties": false, "properties": { - "value": { - "description": "A search tag value.", - "type": "string" + "id": { + "type": "string", + "description": "A self-defined UUIDv7 may be provided to support idempotent additions of Api Actions. If not provided, a new UUIDv7 will be generated.", + "format": "guid", + "nullable": true, + "example": "01913cd5-784f-7d3b-abef-4c77b1f0972d" + }, + "action": { + "type": "string", + "description": "String identifier for the action, corresponding to the \"action\" attributeId used in the XACML service policy,\nwhich by default is the policy belonging to the service referred to by \"serviceResource\" in the dialog.", + "example": "write" + }, + "authorizationAttribute": { + "type": "string", + "description": "Contains an authorization resource attributeId, that can used in custom authorization rules in the XACML service\npolicy, which by default is the policy belonging to the service referred to by \"serviceResource\" in the dialog.\n \nCan also be used to refer to other service policies.", + "nullable": true, + "example": "mycustomresource\n/* equivalent to the above */\nurn:altinn:subresource:mycustomresource\nurn:altinn:task:Task_1\n/* refer to another service */\nurn:altinn:resource:some-other-service-identifier" + }, + "endpoints": { + "type": "array", + "description": "The endpoints associated with the action.", + "nullable": true, + "items": { + "$ref": "#/components/schemas/V1ServiceOwnerDialogsCommandsUpdate_ApiActionEndpoint" + } } - }, - "type": "object" + } }, - "V1ServiceOwnerDialogsCommandsUpdate_Transmission": { + "V1ServiceOwnerDialogsCommandsUpdate_ApiActionEndpoint": { + "type": "object", "additionalProperties": false, "properties": { - "attachments": { - "description": "The transmission-level attachments.", - "items": { - "$ref": "#/components/schemas/V1ServiceOwnerDialogsCommandsUpdate_TransmissionAttachment" - }, + "id": { + "type": "string", + "description": "A UUIDv7 used for merging existing data, unknown IDs will be ignored as this entity does not support user-defined IDs.", + "format": "guid", "nullable": true, - "type": "array" + "example": "01913cd5-784f-7d3b-abef-4c77b1f0972d" }, - "authorizationAttribute": { - "description": "Contains an authorization resource attributeId, that can used in custom authorization rules in the XACML service\npolicy, which by default is the policy belonging to the service referred to by \u0022serviceResource\u0022 in the dialog.\n \nCan also be used to refer to other service policies.", - "example": "mycustomresource\n/* equivalent to the above */\nurn:altinn:subresource:mycustomresource\nurn:altinn:task:Task_1\n/* refer to another service */\nurn:altinn:resource:some-other-service-identifier", - "nullable": true, - "type": "string" + "version": { + "type": "string", + "description": "Arbitrary string indicating the version of the endpoint.", + "nullable": true }, - "content": { - "description": "The transmission unstructured text content.", + "url": { + "type": "string", + "description": "The fully qualified URL of the API endpoint.", + "format": "uri" + }, + "httpMethod": { + "description": "The HTTP method that the endpoint expects for this action.", "oneOf": [ { - "$ref": "#/components/schemas/V1ServiceOwnerDialogsCommandsUpdate_TransmissionContent" + "$ref": "#/components/schemas/Http_HttpVerb" } ] }, - "createdAt": { - "description": "If supplied, overrides the creating date and time for the transmission.\nIf not supplied, the current date /time will be used.", - "format": "date-time", - "type": "string" + "documentationUrl": { + "type": "string", + "description": "Link to documentation for the endpoint, providing documentation for integrators. Should be a URL to a\nhuman-readable page.", + "format": "uri", + "nullable": true }, - "extendedType": { - "description": "Arbitrary URI/URN describing a service-specific transmission type.\n \nRefer to the service-specific documentation provided by the service owner for details (if in use).", + "requestSchema": { + "type": "string", + "description": "Link to the request schema for the endpoint. Used to provide documentation for integrators.\nDialogporten will not validate information on this endpoint.", "format": "uri", - "nullable": true, - "type": "string" + "nullable": true }, + "responseSchema": { + "type": "string", + "description": "Link to the response schema for the endpoint. Used to provide documentation for integrators.\nDialogporten will not validate information on this endpoint.", + "format": "uri", + "nullable": true + }, + "deprecated": { + "type": "boolean", + "description": "Boolean indicating if the endpoint is deprecated." + }, + "sunsetAt": { + "type": "string", + "description": "Date and time when the endpoint will no longer function. Only set if the endpoint is deprecated. Dialogporten\nwill not enforce this date.", + "format": "date-time", + "nullable": true + } + } + }, + "V1ServiceOwnerDialogsCommandsUpdate_Activity": { + "type": "object", + "additionalProperties": false, + "properties": { "id": { - "description": "The UUDIv7 of the action may be provided to support idempotent additions to the list of transmissions.\nIf not supplied, a new UUIDv7 will be generated.", - "example": "01913cd5-784f-7d3b-abef-4c77b1f0972d", + "type": "string", + "description": "The UUDIv7 of the action may be provided to support idempotent additions to the list of activities.\nIf not supplied, a new UUIDv7 will be generated.", "format": "guid", "nullable": true, - "type": "string" + "example": "01913cd5-784f-7d3b-abef-4c77b1f0972d" }, - "relatedTransmissionId": { - "description": "Reference to any other transmission that this transmission is related to.", - "format": "guid", - "nullable": true, - "type": "string" + "createdAt": { + "type": "string", + "description": "If supplied, overrides the creating date and time for the transmission.\nIf not supplied, the current date /time will be used.", + "format": "date-time", + "nullable": true }, - "sender": { - "description": "The actor that sent the transmission.", + "extendedType": { + "type": "string", + "description": "Arbitrary URI/URN describing a service-specific transmission type.", + "format": "uri", + "nullable": true + }, + "type": { + "description": "The type of transmission.", "oneOf": [ { - "$ref": "#/components/schemas/V1ServiceOwnerCommonActors_Actor" + "$ref": "#/components/schemas/DialogsEntitiesActivities_DialogActivityType" } ] }, - "type": { - "description": "The type of transmission.", + "transmissionId": { + "type": "string", + "description": "If the activity is related to a particular transmission, this field will contain the transmission identifier.\nMust be present in the request body.", + "format": "guid", + "nullable": true + }, + "performedBy": { + "description": "The actor that performed the activity.", "oneOf": [ { - "$ref": "#/components/schemas/DialogsEntitiesTransmissions_DialogTransmissionType" + "$ref": "#/components/schemas/V1ServiceOwnerCommonActors_Actor" } ] - } - }, - "type": "object" - }, - "V1ServiceOwnerDialogsCommandsUpdate_TransmissionAttachment": { - "additionalProperties": false, - "properties": { - "displayName": { - "description": "The display name of the attachment that should be used in GUIs.", - "items": { - "$ref": "#/components/schemas/V1CommonLocalizations_Localization" - }, - "nullable": true, - "type": "array" }, - "id": { - "description": "A self-defined UUIDv7 may be provided to support idempotent additions of transmission attachments. If not provided, a new UUIDv7 will be generated.", - "example": "01913cd5-784f-7d3b-abef-4c77b1f0972d", - "format": "guid", + "description": { + "type": "array", + "description": "Unstructured text describing the activity. Only set if the activity type is \"Information\".", "nullable": true, - "type": "string" - }, - "urls": { - "description": "The URLs associated with the attachment, each referring to a different representation of the attachment.", "items": { - "$ref": "#/components/schemas/V1ServiceOwnerDialogsCommandsUpdate_TransmissionAttachmentUrl" - }, - "nullable": true, - "type": "array" + "$ref": "#/components/schemas/V1CommonLocalizations_Localization" + } } - }, - "type": "object" + } }, - "V1ServiceOwnerDialogsCommandsUpdate_TransmissionAttachmentUrl": { + "DialogsEntitiesActivities_DialogActivityType": { + "type": "string", + "description": "", + "x-enumNames": [ + "DialogCreated", + "DialogClosed", + "Information", + "TransmissionOpened", + "PaymentMade", + "SignatureProvided", + "DialogOpened", + "DialogDeleted", + "DialogRestored", + "SentToSigning", + "SentToFormFill", + "SentToSendIn", + "SentToPayment" + ], + "enum": [ + "DialogCreated", + "DialogClosed", + "Information", + "TransmissionOpened", + "PaymentMade", + "SignatureProvided", + "DialogOpened", + "DialogDeleted", + "DialogRestored", + "SentToSigning", + "SentToFormFill", + "SentToSendIn", + "SentToPayment" + ] + }, + "PaginatedListOfV1ServiceOwnerDialogsQueriesSearch_Dialog": { + "type": "object", "additionalProperties": false, "properties": { - "consumerType": { - "description": "The type of consumer the URL is intended for.", - "oneOf": [ - { - "$ref": "#/components/schemas/Attachments_AttachmentUrlConsumerType" - } - ] + "items": { + "type": "array", + "description": "The paginated list of items", + "nullable": true, + "items": { + "$ref": "#/components/schemas/V1ServiceOwnerDialogsQueriesSearch_Dialog" + } }, - "mediaType": { - "description": "The media type of the attachment.", - "example": "application/pdf\napplication/zip", + "hasNextPage": { + "type": "boolean", + "description": "Whether there are more items available that can be fetched by supplying the continuation token" + }, + "continuationToken": { + "type": "string", + "description": "The continuation token to be used to fetch the next page of items", "nullable": true, - "type": "string" + "example": "createdat_2024-07-31T09:09:03.0257090Z,id_0c089101-b7cf-a476-955c-f00a78d74a4e" }, - "url": { - "description": "The fully qualified URL of the attachment.", - "format": "uri", - "type": "string" + "orderBy": { + "type": "string", + "description": "The current sorting order of the items", + "example": "createdat_desc,id_desc" } - }, - "type": "object" + } }, - "V1ServiceOwnerDialogsCommandsUpdate_TransmissionContent": { + "V1ServiceOwnerDialogsQueriesSearch_Dialog": { + "type": "object", "additionalProperties": false, "properties": { - "contentReference": { - "description": "Front-channel embedded content. Used to dynamically embed content in the frontend from an external URL. Must be HTTPS.\nAllowed media types: application/vnd.dialogporten.frontchannelembed\u002Bjson;type=markdown", + "id": { + "type": "string", + "description": "The unique identifier for the dialog in UUIDv7 format.", + "format": "guid", + "example": "01913cd5-784f-7d3b-abef-4c77b1f0972d" + }, + "org": { + "type": "string", + "description": "The service owner code representing the organization (service owner) related to this dialog.", + "example": "ske" + }, + "revision": { + "type": "string", + "description": "The unique identifier for the revision in UUIDv4 format.", + "format": "guid", + "example": "a312cb9c-7632-43c2-aa38-69b06aed56ca" + }, + "serviceResource": { + "type": "string", + "description": "The service identifier for the service that the dialog is related to in URN-format.\nThis corresponds to a service resource in the Altinn Resource Registry.", + "example": "urn:altinn:resource:some-service-identifier" + }, + "serviceResourceType": { + "type": "string", + "description": "The ServiceResource type, as defined in Altinn Resource Registry (see ResourceType)." + }, + "party": { + "type": "string", + "description": "The party code representing the organization or person that the dialog belongs to in URN format.", + "example": "urn:altinn:person:identifier-no:01125512345\nurn:altinn:organization:identifier-no:912345678" + }, + "progress": { + "type": "integer", + "description": "Advisory indicator of progress, represented as 1-100 percentage value. 100% representing a dialog that has come\nto a natural completion (successful or not).", + "format": "int32", + "nullable": true + }, + "process": { + "type": "string", + "description": "Optional process identifier used to indicate a business process this dialog belongs to.", + "nullable": true + }, + "precedingProcess": { + "type": "string", + "description": "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.", + "nullable": true + }, + "guiAttachmentCount": { + "type": "integer", + "description": "The number of attachments in the dialog made available for browser-based frontends.", + "format": "int32", + "nullable": true + }, + "extendedStatus": { + "type": "string", + "description": "Arbitrary string with a service-specific indicator of status, typically used to indicate a fine-grained state of\nthe dialog to further specify the \"status\" enum.\n \nRefer to the service-specific documentation provided by the service owner for details on the possible values (if\nin use).", + "nullable": true + }, + "externalReference": { + "type": "string", + "description": "Arbitrary string with a service-specific reference to an external system or service.\n \nRefer to the service-specific documentation provided by the service owner for details (if in use).", + "nullable": true + }, + "createdAt": { + "type": "string", + "description": "The date and time when the dialog was created.", + "format": "date-time", + "example": "2022-12-31T23:59:59Z" + }, + "updatedAt": { + "type": "string", + "description": "The date and time when the dialog was last updated.", + "format": "date-time", + "example": "2022-12-31T23:59:59Z" + }, + "dueAt": { + "type": "string", + "description": "The due date for the dialog. This is the last date when the dialog is expected to be completed.", + "format": "date-time", "nullable": true, + "example": "2022-12-31T23:59:59Z" + }, + "visibleFrom": { + "type": "string", + "description": "The timestamp when the dialog will be made visible for authorized end users.", + "format": "date-time", + "nullable": true + }, + "status": { + "description": "The aggregated status of the dialog.", + "oneOf": [ + { + "$ref": "#/components/schemas/DialogsEntities_DialogStatus" + } + ] + }, + "systemLabel": { + "description": "Current display state.", "oneOf": [ { - "$ref": "#/components/schemas/V1CommonContent_ContentValue" + "$ref": "#/components/schemas/DialogEndUserContextsEntities_SystemLabel" } ] }, - "summary": { - "description": "The transmission summary.", + "latestActivity": { + "description": "The latest entry in the dialog's activity log.", + "nullable": true, "oneOf": [ { - "$ref": "#/components/schemas/V1CommonContent_ContentValue" + "$ref": "#/components/schemas/V1ServiceOwnerDialogsQueriesSearch_DialogActivity" } ] }, - "title": { - "description": "The transmission title. Must be text/plain.", + "seenSinceLastUpdate": { + "type": "array", + "description": "The list of seen log entries for the dialog newer than the dialog ChangedAt date.", + "nullable": true, + "items": { + "$ref": "#/components/schemas/V1ServiceOwnerDialogsQueriesSearch_DialogSeenLog" + } + }, + "content": { + "description": "The content of the dialog in search results.", "oneOf": [ { - "$ref": "#/components/schemas/V1CommonContent_ContentValue" + "$ref": "#/components/schemas/V1ServiceOwnerDialogsQueriesSearch_Content" } ] } - }, - "type": "object" + } }, - "V1ServiceOwnerDialogsCreate_DialogRequest": { - "additionalProperties": false, - "properties": { - "dto": { - "$ref": "#/components/schemas/V1ServiceOwnerDialogsCommandsCreate_Dialog" - } - }, - "type": "object" + "DialogEndUserContextsEntities_SystemLabel": { + "type": "string", + "description": "", + "x-enumNames": [ + "Default", + "Bin", + "Archive" + ], + "enum": [ + "Default", + "Bin", + "Archive" + ] }, - "V1ServiceOwnerDialogSeenLogsQueriesGet_SeenLog": { + "V1ServiceOwnerDialogsQueriesSearch_DialogActivity": { + "type": "object", "additionalProperties": false, "properties": { "id": { - "format": "guid", - "type": "string" - }, - "isViaServiceOwner": { - "nullable": true, - "type": "boolean" + "type": "string", + "description": "The unique identifier for the activity in UUIDv7 format.", + "format": "guid" }, - "seenAt": { + "createdAt": { + "type": "string", + "description": "The date and time when the activity was created.", "format": "date-time", - "type": "string" + "nullable": true }, - "seenBy": { - "$ref": "#/components/schemas/V1ServiceOwnerCommonActors_Actor" + "extendedType": { + "type": "string", + "description": "An arbitrary string with a service-specific activity type.\n \nConsult the service-specific documentation provided by the service owner for details (if in use).", + "format": "uri", + "nullable": true + }, + "type": { + "description": "The type of activity.", + "oneOf": [ + { + "$ref": "#/components/schemas/DialogsEntitiesActivities_DialogActivityType" + } + ] + }, + "transmissionId": { + "type": "string", + "description": "If the activity is related to a particular transmission, this field will contain the transmission identifier.", + "format": "guid", + "nullable": true + }, + "performedBy": { + "description": "The actor that performed the activity.", + "oneOf": [ + { + "$ref": "#/components/schemas/V1ServiceOwnerCommonActors_Actor" + } + ] + }, + "description": { + "type": "array", + "description": "Unstructured text describing the activity. Only set if the activity type is \"Information\".", + "nullable": true, + "items": { + "$ref": "#/components/schemas/V1CommonLocalizations_Localization" + } } - }, - "type": "object" + } }, - "V1ServiceOwnerDialogSeenLogsQueriesSearch_SeenLog": { + "V1ServiceOwnerDialogsQueriesSearch_DialogSeenLog": { + "type": "object", "additionalProperties": false, "properties": { "id": { - "format": "guid", - "type": "string" - }, - "isViaServiceOwner": { - "nullable": true, - "type": "boolean" + "type": "string", + "description": "The unique identifier for the seen log entry in UUIDv7 format.", + "format": "guid" }, "seenAt": { - "format": "date-time", - "type": "string" + "type": "string", + "description": "The timestamp when the dialog revision was seen.", + "format": "date-time" }, "seenBy": { - "$ref": "#/components/schemas/V1ServiceOwnerCommonActors_Actor" - } - }, - "type": "object" - }, - "V1ServiceOwnerDialogsQueriesGet_Content": { - "additionalProperties": false, - "properties": { - "additionalInfo": { - "description": "Additional information about the dialog, this may contain Markdown.", - "nullable": true, + "description": "The actor that saw the dialog revision.", "oneOf": [ { - "$ref": "#/components/schemas/V1CommonContent_ContentValue" + "$ref": "#/components/schemas/V1ServiceOwnerCommonActors_Actor" } ] }, - "extendedStatus": { - "description": "Used as the human-readable label used to describe the \u0022ExtendedStatus\u0022 field.", - "nullable": true, + "isViaServiceOwner": { + "type": "boolean", + "description": "Flag indicating whether the seen log entry was created via the service owner.\n \nThis is used when the service owner uses the service owner API to implement its own frontend.", + "nullable": true + }, + "isCurrentEndUser": { + "type": "boolean", + "description": "Flag indicating whether the seen log entry was created by the end user supplied in the query." + } + } + }, + "V1ServiceOwnerDialogsQueriesSearch_Content": { + "type": "object", + "additionalProperties": false, + "properties": { + "title": { + "description": "The title of the dialog.", "oneOf": [ { "$ref": "#/components/schemas/V1CommonContent_ContentValue" } ] }, - "mainContentReference": { - "description": "Front-channel embedded content. Used to dynamically embed content in the frontend from an external URL. Must be HTTPS.\nAllowed media types: application/vnd.dialogporten.frontchannelembed\u002Bjson;type=markdown", - "nullable": true, + "summary": { + "description": "A short summary of the dialog and its current state.", "oneOf": [ { "$ref": "#/components/schemas/V1CommonContent_ContentValue" @@ -3335,7 +3970,7 @@ ] }, "senderName": { - "description": "Overridden sender name. If not supplied, assume \u0022org\u0022 as the sender name.", + "description": "Overridden sender name. If not supplied, assume \"org\" as the sender name.", "nullable": true, "oneOf": [ { @@ -3343,690 +3978,404 @@ } ] }, - "summary": { - "description": "A short summary of the dialog and its current state.", - "oneOf": [ - { - "$ref": "#/components/schemas/V1CommonContent_ContentValue" - } - ] - }, - "title": { - "description": "The title of the dialog.", + "extendedStatus": { + "description": "Used as the human-readable label used to describe the \"ExtendedStatus\" field.", + "nullable": true, "oneOf": [ { "$ref": "#/components/schemas/V1CommonContent_ContentValue" } ] } - }, - "type": "object" + } }, "V1ServiceOwnerDialogsQueriesGet_Dialog": { + "type": "object", "additionalProperties": false, "properties": { - "activities": { - "description": "An immutable list of activities associated with the dialog.", - "items": { - "$ref": "#/components/schemas/V1ServiceOwnerDialogsQueriesGet_DialogActivity" - }, - "nullable": true, - "type": "array" - }, - "apiActions": { - "description": "The API actions associated with the dialog. Should be used in specialized, non-browser-based integrations.", - "items": { - "$ref": "#/components/schemas/V1ServiceOwnerDialogsQueriesGet_DialogApiAction" - }, - "nullable": true, - "type": "array" - }, - "attachments": { - "description": "The attachments associated with the dialog (on an aggregate level).", - "items": { - "$ref": "#/components/schemas/V1ServiceOwnerDialogsQueriesGet_DialogAttachment" - }, - "nullable": true, - "type": "array" - }, - "content": { - "description": "The dialog unstructured text content.", - "oneOf": [ - { - "$ref": "#/components/schemas/V1ServiceOwnerDialogsQueriesGet_Content" - } - ] - }, - "createdAt": { - "description": "The date and time when the dialog was created.", - "example": "2022-12-31T23:59:59Z", - "format": "date-time", - "type": "string" - }, - "deletedAt": { - "description": "If deleted, the date and time when the deletion was performed.", - "format": "date-time", - "nullable": true, - "type": "string" - }, - "dueAt": { - "description": "The due date for the dialog. Dialogs past due date might be marked as such in frontends but will still be available.", - "example": "2022-12-31T23:59:59Z", - "format": "date-time", - "nullable": true, - "type": "string" - }, - "expiresAt": { - "description": "The expiration date for the dialog. This is the last date when the dialog is available for the end user.\n \nAfter this date is passed, the dialog will be considered expired and no longer available for the end user in any\nAPI. If not supplied, the dialog will be considered to never expire. This field can be changed by the service\nowner after the dialog has been created.", - "example": "2022-12-31T23:59:59Z", - "format": "date-time", - "nullable": true, - "type": "string" - }, - "extendedStatus": { - "description": "Arbitrary string with a service-specific indicator of status, typically used to indicate a fine-grained state of\nthe dialog to further specify the \u0022status\u0022 enum.\n \nRefer to the service-specific documentation provided by the service owner for details on the possible values (if\nin use).", - "nullable": true, - "type": "string" - }, - "externalReference": { - "description": "Arbitrary string with a service-specific reference to an external system or service.\n \nRefer to the service-specific documentation provided by the service owner for details (if in use).", - "nullable": true, - "type": "string" - }, - "guiActions": { - "description": "The GUI actions associated with the dialog. Should be used in browser-based interactive frontends.", - "items": { - "$ref": "#/components/schemas/V1ServiceOwnerDialogsQueriesGet_DialogGuiAction" - }, - "nullable": true, - "type": "array" - }, "id": { + "type": "string", "description": "The unique identifier for the dialog in UUIDv7 format.", - "example": "01913cd5-784f-7d3b-abef-4c77b1f0972d", "format": "guid", - "type": "string" - }, - "org": { - "description": "The service owner code representing the organization (service owner) related to this dialog.", - "example": "ske", - "type": "string" - }, - "party": { - "description": "The party code representing the organization or person that the dialog belongs to in URN format.", - "example": "urn:altinn:person:identifier-no:01125512345\nurn:altinn:organization:identifier-no:912345678", - "type": "string" - }, - "precedingProcess": { - "description": "Optional preceding process identifier to indicate the business process that preceded the process indicated in the \u0022Process\u0022 field. Cannot be set without also \u0022Process\u0022 being set.", - "nullable": true, - "type": "string" - }, - "process": { - "description": "Optional process identifier used to indicate a business process this dialog belongs to.", - "nullable": true, - "type": "string" - }, - "progress": { - "description": "Advisory indicator of progress, represented as 1-100 percentage value. 100% representing a dialog that has come\nto a natural completion (successful or not).", - "format": "int32", - "nullable": true, - "type": "integer" + "example": "01913cd5-784f-7d3b-abef-4c77b1f0972d" }, "revision": { + "type": "string", "description": "The unique identifier for the revision in UUIDv4 format.", - "example": "a312cb9c-7632-43c2-aa38-69b06aed56ca", "format": "guid", - "type": "string" - }, - "searchTags": { - "description": "The list of words (tags) that will be used in dialog search queries. Not visible in end-user DTO.", - "items": { - "$ref": "#/components/schemas/V1ServiceOwnerDialogsQueriesGet_SearchTag" - }, - "nullable": true, - "type": "array" + "example": "a312cb9c-7632-43c2-aa38-69b06aed56ca" }, - "seenSinceLastUpdate": { - "description": "The list of seen log entries for the dialog newer than the dialog ChangedAt date.", - "items": { - "$ref": "#/components/schemas/V1ServiceOwnerDialogsQueriesGet_DialogSeenLog" - }, - "nullable": true, - "type": "array" + "org": { + "type": "string", + "description": "The service owner code representing the organization (service owner) related to this dialog.", + "example": "ske" }, "serviceResource": { + "type": "string", "description": "The service identifier for the service that the dialog is related to in URN-format.\nThis corresponds to a service resource in the Altinn Resource Registry.", - "example": "urn:altinn:resource:some-service-identifier", - "type": "string" + "example": "urn:altinn:resource:some-service-identifier" }, "serviceResourceType": { - "description": "The ServiceResource type, as defined in Altinn Resource Registry (see ResourceType).", - "type": "string" + "type": "string", + "description": "The ServiceResource type, as defined in Altinn Resource Registry (see ResourceType)." }, - "status": { - "description": "The aggregated status of the dialog.", - "oneOf": [ - { - "$ref": "#/components/schemas/DialogsEntities_DialogStatus" - } - ] + "party": { + "type": "string", + "description": "The party code representing the organization or person that the dialog belongs to in URN format.", + "example": "urn:altinn:person:identifier-no:01125512345\nurn:altinn:organization:identifier-no:912345678" }, - "systemLabel": { - "description": "Current display state.", - "oneOf": [ - { - "$ref": "#/components/schemas/DialogEndUserContextsEntities_SystemLabel" - } - ] + "progress": { + "type": "integer", + "description": "Advisory indicator of progress, represented as 1-100 percentage value. 100% representing a dialog that has come\nto a natural completion (successful or not).", + "format": "int32", + "nullable": true }, - "transmissions": { - "description": "The immutable list of transmissions associated with the dialog.", - "items": { - "$ref": "#/components/schemas/V1ServiceOwnerDialogsQueriesGet_DialogTransmission" - }, - "nullable": true, - "type": "array" + "process": { + "type": "string", + "description": "Optional process identifier used to indicate a business process this dialog belongs to.", + "nullable": true }, - "updatedAt": { - "description": "The date and time when the dialog was last updated.", - "example": "2022-12-31T23:59:59Z", + "precedingProcess": { + "type": "string", + "description": "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.", + "nullable": true + }, + "extendedStatus": { + "type": "string", + "description": "Arbitrary string with a service-specific indicator of status, typically used to indicate a fine-grained state of\nthe dialog to further specify the \"status\" enum.\n \nRefer to the service-specific documentation provided by the service owner for details on the possible values (if\nin use).", + "nullable": true + }, + "externalReference": { + "type": "string", + "description": "Arbitrary string with a service-specific reference to an external system or service.\n \nRefer to the service-specific documentation provided by the service owner for details (if in use).", + "nullable": true + }, + "deletedAt": { + "type": "string", + "description": "If deleted, the date and time when the deletion was performed.", "format": "date-time", - "type": "string" + "nullable": true }, "visibleFrom": { + "type": "string", "description": "The timestamp when the dialog will be made visible for authorized end users.", - "example": "2022-12-31T23:59:59Z", "format": "date-time", "nullable": true, - "type": "string" - } - }, - "type": "object" - }, - "V1ServiceOwnerDialogsQueriesGet_DialogActivity": { - "additionalProperties": false, - "properties": { - "createdAt": { - "description": "The date and time when the activity was created.", + "example": "2022-12-31T23:59:59Z" + }, + "dueAt": { + "type": "string", + "description": "The due date for the dialog. Dialogs past due date might be marked as such in frontends but will still be available.", "format": "date-time", "nullable": true, - "type": "string" + "example": "2022-12-31T23:59:59Z" }, - "description": { - "description": "Unstructured text describing the activity. Only set if the activity type is \u0022Information\u0022.", - "items": { - "$ref": "#/components/schemas/V1CommonLocalizations_Localization" - }, + "expiresAt": { + "type": "string", + "description": "The expiration date for the dialog. This is the last date when the dialog is available for the end user.\n \nAfter this date is passed, the dialog will be considered expired and no longer available for the end user in any\nAPI. If not supplied, the dialog will be considered to never expire. This field can be changed by the service\nowner after the dialog has been created.", + "format": "date-time", "nullable": true, - "type": "array" + "example": "2022-12-31T23:59:59Z" }, - "extendedType": { - "description": "An arbitrary URI/URN with a service-specific activity type.\n \nConsult the service-specific documentation provided by the service owner for details (if in use).", - "format": "uri", - "nullable": true, - "type": "string" + "createdAt": { + "type": "string", + "description": "The date and time when the dialog was created.", + "format": "date-time", + "example": "2022-12-31T23:59:59Z" }, - "id": { - "description": "The unique identifier for the activity in UUIDv7 format.", - "format": "guid", - "type": "string" + "updatedAt": { + "type": "string", + "description": "The date and time when the dialog was last updated.", + "format": "date-time", + "example": "2022-12-31T23:59:59Z" }, - "performedBy": { - "description": "The actor that performed the activity.", + "status": { + "description": "The aggregated status of the dialog.", "oneOf": [ { - "$ref": "#/components/schemas/V1ServiceOwnerCommonActors_Actor" + "$ref": "#/components/schemas/DialogsEntities_DialogStatus" } ] }, - "transmissionId": { - "description": "If the activity is related to a particular transmission, this field will contain the transmission identifier.", - "format": "guid", - "nullable": true, - "type": "string" - }, - "type": { - "description": "The type of activity.", + "systemLabel": { + "description": "Current display state.", "oneOf": [ { - "$ref": "#/components/schemas/DialogsEntitiesActivities_DialogActivityType" + "$ref": "#/components/schemas/DialogEndUserContextsEntities_SystemLabel" } ] - } - }, - "type": "object" - }, - "V1ServiceOwnerDialogsQueriesGet_DialogApiAction": { - "additionalProperties": false, - "properties": { - "action": { - "description": "String identifier for the action, corresponding to the \u0022action\u0022 attributeId used in the XACML service policy,\nwhich by default is the policy belonging to the service referred to by \u0022serviceResource\u0022 in the dialog.", - "example": "write", - "type": "string" - }, - "authorizationAttribute": { - "description": "Contains an authorization resource attributeId, that can used in custom authorization rules in the XACML service\npolicy, which by default is the policy belonging to the service referred to by \u0022serviceResource\u0022 in the dialog.\n \nCan also be used to refer to other service policies.", - "example": "mycustomresource\n/* equivalent to the above */\nurn:altinn:subresource:mycustomresource\nurn:altinn:task:Task_1\n/* refer to another service */\nurn:altinn:resource:some-other-service-identifier", - "nullable": true, - "type": "string" - }, - "endpoints": { - "description": "The endpoints associated with the action.", - "items": { - "$ref": "#/components/schemas/V1ServiceOwnerDialogsQueriesGet_DialogApiActionEndpoint" - }, - "nullable": true, - "type": "array" - }, - "id": { - "description": "The unique identifier for the action in UUIDv7 format.", - "format": "guid", - "type": "string" - }, - "isAuthorized": { - "description": "True if the authenticated user (set in the query) is authorized for this action.", - "nullable": true, - "type": "boolean" - } - }, - "type": "object" - }, - "V1ServiceOwnerDialogsQueriesGet_DialogApiActionEndpoint": { - "additionalProperties": false, - "properties": { - "deprecated": { - "description": "Boolean indicating if the endpoint is deprecated. Integrators should migrate to endpoints with a higher version.", - "type": "boolean" - }, - "documentationUrl": { - "description": "Link to service provider documentation for the endpoint. Used for service owners to provide documentation for\nintegrators. Should be a URL to a human-readable page.", - "format": "uri", - "nullable": true, - "type": "string" }, - "httpMethod": { - "description": "The HTTP method that the endpoint expects for this action.", + "content": { + "description": "The dialog unstructured text content.", "oneOf": [ { - "$ref": "#/components/schemas/Http_HttpVerb" + "$ref": "#/components/schemas/V1ServiceOwnerDialogsQueriesGet_Content" } ] }, - "id": { - "description": "The unique identifier for the endpoint in UUIDv7 format.", - "format": "guid", - "type": "string" - }, - "requestSchema": { - "description": "Link to the request schema for the endpoint. Used by service owners to provide documentation for integrators.\nDialogporten will not validate information on this endpoint.", - "format": "uri", + "searchTags": { + "type": "array", + "description": "The list of words (tags) that will be used in dialog search queries. Not visible in end-user DTO.", "nullable": true, - "type": "string" + "items": { + "$ref": "#/components/schemas/V1ServiceOwnerDialogsQueriesGet_SearchTag" + } }, - "responseSchema": { - "description": "Link to the response schema for the endpoint. Used for service owners to provide documentation for integrators.\nDialogporten will not validate information on this endpoint.", - "format": "uri", + "attachments": { + "type": "array", + "description": "The attachments associated with the dialog (on an aggregate level).", "nullable": true, - "type": "string" + "items": { + "$ref": "#/components/schemas/V1ServiceOwnerDialogsQueriesGet_DialogAttachment" + } }, - "sunsetAt": { - "description": "Date and time when the service owner has indicated that endpoint will no longer function. Only set if the endpoint\nis deprecated. Dialogporten will not enforce this date.", - "format": "date-time", + "transmissions": { + "type": "array", + "description": "The immutable list of transmissions associated with the dialog.", "nullable": true, - "type": "string" - }, - "url": { - "description": "The fully qualified URL of the API endpoint.", - "format": "uri", - "type": "string" + "items": { + "$ref": "#/components/schemas/V1ServiceOwnerDialogsQueriesGet_DialogTransmission" + } }, - "version": { - "description": "Arbitrary string indicating the version of the endpoint.\n \nConsult the service-specific documentation provided by the service owner for details (if in use).", + "guiActions": { + "type": "array", + "description": "The GUI actions associated with the dialog. Should be used in browser-based interactive frontends.", "nullable": true, - "type": "string" - } - }, - "type": "object" - }, - "V1ServiceOwnerDialogsQueriesGet_DialogAttachment": { - "additionalProperties": false, - "properties": { - "displayName": { - "description": "The display name of the attachment that should be used in GUIs.", "items": { - "$ref": "#/components/schemas/V1CommonLocalizations_Localization" - }, - "nullable": true, - "type": "array" - }, - "id": { - "description": "The unique identifier for the attachment in UUIDv7 format.", - "format": "guid", - "type": "string" + "$ref": "#/components/schemas/V1ServiceOwnerDialogsQueriesGet_DialogGuiAction" + } }, - "urls": { - "description": "The URLs associated with the attachment, each referring to a different representation of the attachment.", - "items": { - "$ref": "#/components/schemas/V1ServiceOwnerDialogsQueriesGet_DialogAttachmentUrl" - }, + "apiActions": { + "type": "array", + "description": "The API actions associated with the dialog. Should be used in specialized, non-browser-based integrations.", "nullable": true, - "type": "array" - } - }, - "type": "object" - }, - "V1ServiceOwnerDialogsQueriesGet_DialogAttachmentUrl": { - "additionalProperties": false, - "properties": { - "consumerType": { - "description": "What type of consumer the URL is intended for.", - "oneOf": [ - { - "$ref": "#/components/schemas/Attachments_AttachmentUrlConsumerType" - } - ] - }, - "id": { - "description": "The unique identifier for the attachment URL in UUIDv7 format.", - "format": "guid", - "type": "string" + "items": { + "$ref": "#/components/schemas/V1ServiceOwnerDialogsQueriesGet_DialogApiAction" + } }, - "mediaType": { - "description": "The media type of the attachment.", - "example": "application/pdf\napplication/zip", + "activities": { + "type": "array", + "description": "An immutable list of activities associated with the dialog.", "nullable": true, - "type": "string" + "items": { + "$ref": "#/components/schemas/V1ServiceOwnerDialogsQueriesGet_DialogActivity" + } }, - "url": { - "description": "The fully qualified URL of the attachment.", - "example": "https://someendpoint.com/someattachment.pdf", - "format": "uri", - "type": "string" + "seenSinceLastUpdate": { + "type": "array", + "description": "The list of seen log entries for the dialog newer than the dialog ChangedAt date.", + "nullable": true, + "items": { + "$ref": "#/components/schemas/V1ServiceOwnerDialogsQueriesGet_DialogSeenLog" + } } - }, - "type": "object" + } }, - "V1ServiceOwnerDialogsQueriesGet_DialogGuiAction": { + "OrderSetOfTOrderDefinitionAndTTarget": {}, + "ContinuationTokenSetOfTOrderDefinitionAndTTarget": {}, + "V1ServiceOwnerDialogsQueriesGet_Content": { + "type": "object", "additionalProperties": false, "properties": { - "action": { - "description": "The action identifier for the action, corresponding to the \u0022action\u0022 attributeId used in the XACML service policy.", - "type": "string" - }, - "authorizationAttribute": { - "description": "Contains an authorization resource attributeId, that can used in custom authorization rules in the XACML service\npolicy, which by default is the policy belonging to the service referred to by \u0022serviceResource\u0022 in the dialog.\n \nCan also be used to refer to other service policies.", - "example": "mycustomresource\n/* equivalent to the above */\nurn:altinn:subresource:mycustomresource\nurn:altinn:task:Task_1\n/* refer to another service */\nurn:altinn:resource:some-other-service-identifier", - "nullable": true, - "type": "string" - }, - "httpMethod": { - "description": "The HTTP method that the frontend should use when redirecting the user.", + "title": { + "description": "The title of the dialog.", "oneOf": [ { - "$ref": "#/components/schemas/Http_HttpVerb" + "$ref": "#/components/schemas/V1CommonContent_ContentValue" } ] }, - "id": { - "description": "The unique identifier for the action in UUIDv7 format.", - "format": "guid", - "type": "string" - }, - "isAuthorized": { - "description": "Whether the user, if supplied in the query, is authorized to perform the action.", - "nullable": true, - "type": "boolean" - }, - "isDeleteDialogAction": { - "description": "Indicates whether the action results in the dialog being deleted. Used by frontends to implement custom UX\nfor delete actions.", - "type": "boolean" - }, - "priority": { - "description": "Indicates a priority for the action, making it possible for frontends to adapt GUI elements based on action\npriority.", + "summary": { + "description": "A short summary of the dialog and its current state.", "oneOf": [ { - "$ref": "#/components/schemas/DialogsEntitiesActions_DialogGuiActionPriority" + "$ref": "#/components/schemas/V1CommonContent_ContentValue" } ] }, - "prompt": { - "description": "If there should be a prompt asking the user for confirmation before the action is executed,\nthis field should contain the prompt text.", - "items": { - "$ref": "#/components/schemas/V1CommonLocalizations_Localization" - }, - "nullable": true, - "type": "array" - }, - "title": { - "description": "The title of the action, this should be short and in verb form.", - "items": { - "$ref": "#/components/schemas/V1CommonLocalizations_Localization" - }, - "nullable": true, - "type": "array" - }, - "url": { - "description": "The fully qualified URL of the action, to which the user will be redirected when the action is triggered.", - "format": "uri", - "type": "string" - } - }, - "type": "object" - }, - "V1ServiceOwnerDialogsQueriesGet_DialogSeenLog": { - "additionalProperties": false, - "properties": { - "id": { - "description": "The unique identifier for the seen log entry in UUIDv7 format.", - "format": "guid", - "type": "string" - }, - "isCurrentEndUser": { - "description": "Flag indicating whether the seen log entry was created by the current end user, if provided in the query.", - "type": "boolean" - }, - "isViaServiceOwner": { - "description": "Flag indicating whether the seen log entry was created via the service owner.\n \nThis is used when the service owner uses the service owner API to implement its own frontend.", + "senderName": { + "description": "Overridden sender name. If not supplied, assume \"org\" as the sender name.", "nullable": true, - "type": "boolean" - }, - "seenAt": { - "description": "The timestamp when the dialog revision was seen.", - "format": "date-time", - "type": "string" - }, - "seenBy": { - "description": "The actor that saw the dialog revision.", "oneOf": [ { - "$ref": "#/components/schemas/V1ServiceOwnerCommonActors_Actor" + "$ref": "#/components/schemas/V1CommonContent_ContentValue" } ] - } - }, - "type": "object" - }, - "V1ServiceOwnerDialogsQueriesGet_DialogTransmission": { - "additionalProperties": false, - "properties": { - "attachments": { - "description": "The transmission-level attachments.", - "items": { - "$ref": "#/components/schemas/V1ServiceOwnerDialogsQueriesGet_DialogTransmissionAttachment" - }, - "nullable": true, - "type": "array" }, - "authorizationAttribute": { - "description": "Contains an authorization resource attributeId, that can used in custom authorization rules in the XACML service\npolicy, which by default is the policy belonging to the service referred to by \u0022serviceResource\u0022 in the dialog.\n \nCan also be used to refer to other service policies.", - "example": "mycustomresource\n/* equivalent to the above */\nurn:altinn:subresource:mycustomresource\nurn:altinn:task:Task_1\n/* refer to another service */\nurn:altinn:resource:some-other-service-identifier", + "additionalInfo": { + "description": "Additional information about the dialog, this may contain Markdown.", "nullable": true, - "type": "string" - }, - "content": { - "description": "The transmission unstructured text content.", "oneOf": [ { - "$ref": "#/components/schemas/V1ServiceOwnerDialogsQueriesGet_DialogTransmissionContent" + "$ref": "#/components/schemas/V1CommonContent_ContentValue" } ] }, - "createdAt": { - "description": "The date and time when the transmission was created.", - "format": "date-time", - "type": "string" - }, - "extendedType": { - "description": "Arbitrary URI/URN describing a service-specific transmission type.\n \nRefer to the service-specific documentation provided by the service owner for details (if in use).", - "format": "uri", - "nullable": true, - "type": "string" - }, - "id": { - "description": "The unique identifier for the transmission in UUIDv7 format.", - "format": "guid", - "type": "string" - }, - "isAuthorized": { - "description": "Flag indicating if the authenticated user supplied in the query is authorized for this transmission.", - "nullable": true, - "type": "boolean" - }, - "relatedTransmissionId": { - "description": "Reference to any other transmission that this transmission is related to.", - "format": "guid", + "extendedStatus": { + "description": "Used as the human-readable label used to describe the \"ExtendedStatus\" field.", "nullable": true, - "type": "string" - }, - "sender": { - "description": "The actor that sent the transmission.", "oneOf": [ { - "$ref": "#/components/schemas/V1ServiceOwnerCommonActors_Actor" + "$ref": "#/components/schemas/V1CommonContent_ContentValue" } ] }, - "type": { - "description": "The type of transmission.", + "mainContentReference": { + "description": "Front-channel embedded content. Used to dynamically embed content in the frontend from an external URL. Must be HTTPS.\nAllowed media types: application/vnd.dialogporten.frontchannelembed+json;type=markdown", + "nullable": true, "oneOf": [ { - "$ref": "#/components/schemas/DialogsEntitiesTransmissions_DialogTransmissionType" + "$ref": "#/components/schemas/V1CommonContent_ContentValue" } ] } - }, - "type": "object" + } }, - "V1ServiceOwnerDialogsQueriesGet_DialogTransmissionAttachment": { + "V1ServiceOwnerDialogsQueriesGet_SearchTag": { + "type": "object", "additionalProperties": false, "properties": { + "value": { + "type": "string", + "description": "A search tag value." + } + } + }, + "V1ServiceOwnerDialogsQueriesGet_DialogAttachment": { + "type": "object", + "additionalProperties": false, + "properties": { + "id": { + "type": "string", + "description": "The unique identifier for the attachment in UUIDv7 format.", + "format": "guid" + }, "displayName": { + "type": "array", "description": "The display name of the attachment that should be used in GUIs.", + "nullable": true, "items": { "$ref": "#/components/schemas/V1CommonLocalizations_Localization" - }, - "nullable": true, - "type": "array" - }, - "id": { - "description": "The unique identifier for the attachment in UUIDv7 format.", - "format": "guid", - "type": "string" + } }, "urls": { + "type": "array", "description": "The URLs associated with the attachment, each referring to a different representation of the attachment.", - "items": { - "$ref": "#/components/schemas/V1ServiceOwnerDialogsQueriesGet_DialogTransmissionAttachmentUrl" - }, "nullable": true, - "type": "array" + "items": { + "$ref": "#/components/schemas/V1ServiceOwnerDialogsQueriesGet_DialogAttachmentUrl" + } } - }, - "type": "object" + } }, - "V1ServiceOwnerDialogsQueriesGet_DialogTransmissionAttachmentUrl": { + "V1ServiceOwnerDialogsQueriesGet_DialogAttachmentUrl": { + "type": "object", "additionalProperties": false, "properties": { + "id": { + "type": "string", + "description": "The unique identifier for the attachment URL in UUIDv7 format.", + "format": "guid" + }, + "url": { + "type": "string", + "description": "The fully qualified URL of the attachment.", + "format": "uri", + "example": "https://someendpoint.com/someattachment.pdf" + }, + "mediaType": { + "type": "string", + "description": "The media type of the attachment.", + "nullable": true, + "example": "application/pdf\napplication/zip" + }, "consumerType": { - "description": "The type of consumer the URL is intended for.", + "description": "What type of consumer the URL is intended for.", "oneOf": [ { "$ref": "#/components/schemas/Attachments_AttachmentUrlConsumerType" } ] - }, - "mediaType": { - "description": "The media type of the attachment.", - "example": "application/pdf\napplication/zip", - "nullable": true, - "type": "string" - }, - "url": { - "description": "The fully qualified URL of the attachment. Will be set to \u0022urn:dialogporten:unauthorized\u0022 if the user is\nnot authorized to access the transmission.", - "example": "https://someendpoint.com/someattachment.pdf\nurn:dialogporten:unauthorized", - "format": "uri", - "type": "string" } - }, - "type": "object" + } }, - "V1ServiceOwnerDialogsQueriesGet_DialogTransmissionContent": { + "V1ServiceOwnerDialogsQueriesGet_DialogTransmission": { + "type": "object", "additionalProperties": false, "properties": { - "contentReference": { - "description": "Front-channel embedded content. Used to dynamically embed content in the frontend from an external URL. Must be HTTPS.\nAllowed media types: application/vnd.dialogporten.frontchannelembed\u002Bjson;type=markdown", + "id": { + "type": "string", + "description": "The unique identifier for the transmission in UUIDv7 format.", + "format": "guid" + }, + "createdAt": { + "type": "string", + "description": "The date and time when the transmission was created.", + "format": "date-time" + }, + "authorizationAttribute": { + "type": "string", + "description": "Contains an authorization resource attributeId, that can used in custom authorization rules in the XACML service\npolicy, which by default is the policy belonging to the service referred to by \"serviceResource\" in the dialog.\n \nCan also be used to refer to other service policies.", "nullable": true, - "oneOf": [ - { - "$ref": "#/components/schemas/V1CommonContent_ContentValue" - } - ] + "example": "mycustomresource\n/* equivalent to the above */\nurn:altinn:subresource:mycustomresource\nurn:altinn:task:Task_1\n/* refer to another service */\nurn:altinn:resource:some-other-service-identifier" }, - "summary": { - "description": "The transmission summary.", + "isAuthorized": { + "type": "boolean", + "description": "Flag indicating if the authenticated user supplied in the query is authorized for this transmission.", + "nullable": true + }, + "extendedType": { + "type": "string", + "description": "Arbitrary URI/URN describing a service-specific transmission type.\n \nRefer to the service-specific documentation provided by the service owner for details (if in use).", + "format": "uri", + "nullable": true + }, + "relatedTransmissionId": { + "type": "string", + "description": "Reference to any other transmission that this transmission is related to.", + "format": "guid", + "nullable": true + }, + "type": { + "description": "The type of transmission.", "oneOf": [ { - "$ref": "#/components/schemas/V1CommonContent_ContentValue" + "$ref": "#/components/schemas/DialogsEntitiesTransmissions_DialogTransmissionType" } ] }, - "title": { - "description": "The transmission title.", + "sender": { + "description": "The actor that sent the transmission.", "oneOf": [ { - "$ref": "#/components/schemas/V1CommonContent_ContentValue" + "$ref": "#/components/schemas/V1ServiceOwnerCommonActors_Actor" } ] - } - }, - "type": "object" - }, - "V1ServiceOwnerDialogsQueriesGet_SearchTag": { - "additionalProperties": false, - "properties": { - "value": { - "description": "A search tag value.", - "type": "string" - } - }, - "type": "object" - }, - "V1ServiceOwnerDialogsQueriesSearch_Content": { - "additionalProperties": false, - "properties": { - "extendedStatus": { - "description": "Used as the human-readable label used to describe the \u0022ExtendedStatus\u0022 field.", - "nullable": true, + }, + "content": { + "description": "The transmission unstructured text content.", "oneOf": [ { - "$ref": "#/components/schemas/V1CommonContent_ContentValue" + "$ref": "#/components/schemas/V1ServiceOwnerDialogsQueriesGet_DialogTransmissionContent" } ] }, - "senderName": { - "description": "Overridden sender name. If not supplied, assume \u0022org\u0022 as the sender name.", + "attachments": { + "type": "array", + "description": "The transmission-level attachments.", "nullable": true, + "items": { + "$ref": "#/components/schemas/V1ServiceOwnerDialogsQueriesGet_DialogTransmissionAttachment" + } + } + } + }, + "V1ServiceOwnerDialogsQueriesGet_DialogTransmissionContent": { + "type": "object", + "additionalProperties": false, + "properties": { + "title": { + "description": "The transmission title.", "oneOf": [ { "$ref": "#/components/schemas/V1CommonContent_ContentValue" @@ -4034,233 +4383,302 @@ ] }, "summary": { - "description": "A short summary of the dialog and its current state.", + "description": "The transmission summary.", "oneOf": [ { "$ref": "#/components/schemas/V1CommonContent_ContentValue" } ] }, - "title": { - "description": "The title of the dialog.", + "contentReference": { + "description": "Front-channel embedded content. Used to dynamically embed content in the frontend from an external URL. Must be HTTPS.\nAllowed media types: application/vnd.dialogporten.frontchannelembed+json;type=markdown", + "nullable": true, "oneOf": [ { "$ref": "#/components/schemas/V1CommonContent_ContentValue" } ] } - }, - "type": "object" + } }, - "V1ServiceOwnerDialogsQueriesSearch_Dialog": { + "V1ServiceOwnerDialogsQueriesGet_DialogTransmissionAttachment": { + "type": "object", "additionalProperties": false, "properties": { - "content": { - "description": "The content of the dialog in search results.", + "id": { + "type": "string", + "description": "The unique identifier for the attachment in UUIDv7 format.", + "format": "guid" + }, + "displayName": { + "type": "array", + "description": "The display name of the attachment that should be used in GUIs.", + "nullable": true, + "items": { + "$ref": "#/components/schemas/V1CommonLocalizations_Localization" + } + }, + "urls": { + "type": "array", + "description": "The URLs associated with the attachment, each referring to a different representation of the attachment.", + "nullable": true, + "items": { + "$ref": "#/components/schemas/V1ServiceOwnerDialogsQueriesGet_DialogTransmissionAttachmentUrl" + } + } + } + }, + "V1ServiceOwnerDialogsQueriesGet_DialogTransmissionAttachmentUrl": { + "type": "object", + "additionalProperties": false, + "properties": { + "url": { + "type": "string", + "description": "The fully qualified URL of the attachment. Will be set to \"urn:dialogporten:unauthorized\" if the user is\nnot authorized to access the transmission.", + "format": "uri", + "example": "https://someendpoint.com/someattachment.pdf\nurn:dialogporten:unauthorized" + }, + "mediaType": { + "type": "string", + "description": "The media type of the attachment.", + "nullable": true, + "example": "application/pdf\napplication/zip" + }, + "consumerType": { + "description": "The type of consumer the URL is intended for.", "oneOf": [ { - "$ref": "#/components/schemas/V1ServiceOwnerDialogsQueriesSearch_Content" + "$ref": "#/components/schemas/Attachments_AttachmentUrlConsumerType" } ] + } + } + }, + "V1ServiceOwnerDialogsQueriesGet_DialogGuiAction": { + "type": "object", + "additionalProperties": false, + "properties": { + "id": { + "type": "string", + "description": "The unique identifier for the action in UUIDv7 format.", + "format": "guid" }, - "createdAt": { - "description": "The date and time when the dialog was created.", - "example": "2022-12-31T23:59:59Z", - "format": "date-time", - "type": "string" - }, - "dueAt": { - "description": "The due date for the dialog. This is the last date when the dialog is expected to be completed.", - "example": "2022-12-31T23:59:59Z", - "format": "date-time", - "nullable": true, - "type": "string" + "action": { + "type": "string", + "description": "The action identifier for the action, corresponding to the \"action\" attributeId used in the XACML service policy." }, - "extendedStatus": { - "description": "Arbitrary string with a service-specific indicator of status, typically used to indicate a fine-grained state of\nthe dialog to further specify the \u0022status\u0022 enum.\n \nRefer to the service-specific documentation provided by the service owner for details on the possible values (if\nin use).", - "nullable": true, - "type": "string" + "url": { + "type": "string", + "description": "The fully qualified URL of the action, to which the user will be redirected when the action is triggered.", + "format": "uri" }, - "externalReference": { - "description": "Arbitrary string with a service-specific reference to an external system or service.\n \nRefer to the service-specific documentation provided by the service owner for details (if in use).", + "authorizationAttribute": { + "type": "string", + "description": "Contains an authorization resource attributeId, that can used in custom authorization rules in the XACML service\npolicy, which by default is the policy belonging to the service referred to by \"serviceResource\" in the dialog.\n \nCan also be used to refer to other service policies.", "nullable": true, - "type": "string" + "example": "mycustomresource\n/* equivalent to the above */\nurn:altinn:subresource:mycustomresource\nurn:altinn:task:Task_1\n/* refer to another service */\nurn:altinn:resource:some-other-service-identifier" }, - "guiAttachmentCount": { - "description": "The number of attachments in the dialog made available for browser-based frontends.", - "format": "int32", - "nullable": true, - "type": "integer" + "isAuthorized": { + "type": "boolean", + "description": "Whether the user, if supplied in the query, is authorized to perform the action.", + "nullable": true }, - "id": { - "description": "The unique identifier for the dialog in UUIDv7 format.", - "example": "01913cd5-784f-7d3b-abef-4c77b1f0972d", - "format": "guid", - "type": "string" + "isDeleteDialogAction": { + "type": "boolean", + "description": "Indicates whether the action results in the dialog being deleted. Used by frontends to implement custom UX\nfor delete actions." }, - "latestActivity": { - "description": "The latest entry in the dialog\u0027s activity log.", - "nullable": true, + "priority": { + "description": "Indicates a priority for the action, making it possible for frontends to adapt GUI elements based on action\npriority.", "oneOf": [ { - "$ref": "#/components/schemas/V1ServiceOwnerDialogsQueriesSearch_DialogActivity" + "$ref": "#/components/schemas/DialogsEntitiesActions_DialogGuiActionPriority" } ] }, - "org": { - "description": "The service owner code representing the organization (service owner) related to this dialog.", - "example": "ske", - "type": "string" - }, - "party": { - "description": "The party code representing the organization or person that the dialog belongs to in URN format.", - "example": "urn:altinn:person:identifier-no:01125512345\nurn:altinn:organization:identifier-no:912345678", - "type": "string" + "httpMethod": { + "description": "The HTTP method that the frontend should use when redirecting the user.", + "oneOf": [ + { + "$ref": "#/components/schemas/Http_HttpVerb" + } + ] }, - "precedingProcess": { - "description": "Optional preceding process identifier to indicate the business process that preceded the process indicated in the \u0022Process\u0022 field. Cannot be set without also \u0022Process\u0022 being set.", + "title": { + "type": "array", + "description": "The title of the action, this should be short and in verb form.", "nullable": true, - "type": "string" + "items": { + "$ref": "#/components/schemas/V1CommonLocalizations_Localization" + } }, - "process": { - "description": "Optional process identifier used to indicate a business process this dialog belongs to.", + "prompt": { + "type": "array", + "description": "If there should be a prompt asking the user for confirmation before the action is executed,\nthis field should contain the prompt text.", "nullable": true, - "type": "string" + "items": { + "$ref": "#/components/schemas/V1CommonLocalizations_Localization" + } + } + } + }, + "V1ServiceOwnerDialogsQueriesGet_DialogApiAction": { + "type": "object", + "additionalProperties": false, + "properties": { + "id": { + "type": "string", + "description": "The unique identifier for the action in UUIDv7 format.", + "format": "guid" }, - "progress": { - "description": "Advisory indicator of progress, represented as 1-100 percentage value. 100% representing a dialog that has come\nto a natural completion (successful or not).", - "format": "int32", + "action": { + "type": "string", + "description": "String identifier for the action, corresponding to the \"action\" attributeId used in the XACML service policy,\nwhich by default is the policy belonging to the service referred to by \"serviceResource\" in the dialog.", + "example": "write" + }, + "authorizationAttribute": { + "type": "string", + "description": "Contains an authorization resource attributeId, that can used in custom authorization rules in the XACML service\npolicy, which by default is the policy belonging to the service referred to by \"serviceResource\" in the dialog.\n \nCan also be used to refer to other service policies.", "nullable": true, - "type": "integer" + "example": "mycustomresource\n/* equivalent to the above */\nurn:altinn:subresource:mycustomresource\nurn:altinn:task:Task_1\n/* refer to another service */\nurn:altinn:resource:some-other-service-identifier" }, - "revision": { - "description": "The unique identifier for the revision in UUIDv4 format.", - "example": "a312cb9c-7632-43c2-aa38-69b06aed56ca", - "format": "guid", - "type": "string" + "isAuthorized": { + "type": "boolean", + "description": "True if the authenticated user (set in the query) is authorized for this action.", + "nullable": true }, - "seenSinceLastUpdate": { - "description": "The list of seen log entries for the dialog newer than the dialog ChangedAt date.", - "items": { - "$ref": "#/components/schemas/V1ServiceOwnerDialogsQueriesSearch_DialogSeenLog" - }, + "endpoints": { + "type": "array", + "description": "The endpoints associated with the action.", "nullable": true, - "type": "array" + "items": { + "$ref": "#/components/schemas/V1ServiceOwnerDialogsQueriesGet_DialogApiActionEndpoint" + } + } + } + }, + "V1ServiceOwnerDialogsQueriesGet_DialogApiActionEndpoint": { + "type": "object", + "additionalProperties": false, + "properties": { + "id": { + "type": "string", + "description": "The unique identifier for the endpoint in UUIDv7 format.", + "format": "guid" }, - "serviceResource": { - "description": "The service identifier for the service that the dialog is related to in URN-format.\nThis corresponds to a service resource in the Altinn Resource Registry.", - "example": "urn:altinn:resource:some-service-identifier", - "type": "string" + "version": { + "type": "string", + "description": "Arbitrary string indicating the version of the endpoint.\n \nConsult the service-specific documentation provided by the service owner for details (if in use).", + "nullable": true }, - "serviceResourceType": { - "description": "The ServiceResource type, as defined in Altinn Resource Registry (see ResourceType).", - "type": "string" + "url": { + "type": "string", + "description": "The fully qualified URL of the API endpoint.", + "format": "uri" }, - "status": { - "description": "The aggregated status of the dialog.", + "httpMethod": { + "description": "The HTTP method that the endpoint expects for this action.", "oneOf": [ { - "$ref": "#/components/schemas/DialogsEntities_DialogStatus" + "$ref": "#/components/schemas/Http_HttpVerb" } ] }, - "systemLabel": { - "description": "Current display state.", - "oneOf": [ - { - "$ref": "#/components/schemas/DialogEndUserContextsEntities_SystemLabel" - } - ] + "documentationUrl": { + "type": "string", + "description": "Link to service provider documentation for the endpoint. Used for service owners to provide documentation for\nintegrators. Should be a URL to a human-readable page.", + "format": "uri", + "nullable": true }, - "updatedAt": { - "description": "The date and time when the dialog was last updated.", - "example": "2022-12-31T23:59:59Z", - "format": "date-time", - "type": "string" + "requestSchema": { + "type": "string", + "description": "Link to the request schema for the endpoint. Used by service owners to provide documentation for integrators.\nDialogporten will not validate information on this endpoint.", + "format": "uri", + "nullable": true }, - "visibleFrom": { - "description": "The timestamp when the dialog will be made visible for authorized end users.", + "responseSchema": { + "type": "string", + "description": "Link to the response schema for the endpoint. Used for service owners to provide documentation for integrators.\nDialogporten will not validate information on this endpoint.", + "format": "uri", + "nullable": true + }, + "deprecated": { + "type": "boolean", + "description": "Boolean indicating if the endpoint is deprecated. Integrators should migrate to endpoints with a higher version." + }, + "sunsetAt": { + "type": "string", + "description": "Date and time when the service owner has indicated that endpoint will no longer function. Only set if the endpoint\nis deprecated. Dialogporten will not enforce this date.", "format": "date-time", - "nullable": true, - "type": "string" + "nullable": true } - }, - "type": "object" + } }, - "V1ServiceOwnerDialogsQueriesSearch_DialogActivity": { + "V1ServiceOwnerDialogsQueriesGet_DialogActivity": { + "type": "object", "additionalProperties": false, "properties": { + "id": { + "type": "string", + "description": "The unique identifier for the activity in UUIDv7 format.", + "format": "guid" + }, "createdAt": { + "type": "string", "description": "The date and time when the activity was created.", "format": "date-time", - "nullable": true, - "type": "string" - }, - "description": { - "description": "Unstructured text describing the activity. Only set if the activity type is \u0022Information\u0022.", - "items": { - "$ref": "#/components/schemas/V1CommonLocalizations_Localization" - }, - "nullable": true, - "type": "array" + "nullable": true }, "extendedType": { - "description": "An arbitrary string with a service-specific activity type.\n \nConsult the service-specific documentation provided by the service owner for details (if in use).", + "type": "string", + "description": "An arbitrary URI/URN with a service-specific activity type.\n \nConsult the service-specific documentation provided by the service owner for details (if in use).", "format": "uri", - "nullable": true, - "type": "string" - }, - "id": { - "description": "The unique identifier for the activity in UUIDv7 format.", - "format": "guid", - "type": "string" + "nullable": true }, - "performedBy": { - "description": "The actor that performed the activity.", + "type": { + "description": "The type of activity.", "oneOf": [ { - "$ref": "#/components/schemas/V1ServiceOwnerCommonActors_Actor" + "$ref": "#/components/schemas/DialogsEntitiesActivities_DialogActivityType" } ] }, "transmissionId": { + "type": "string", "description": "If the activity is related to a particular transmission, this field will contain the transmission identifier.", "format": "guid", - "nullable": true, - "type": "string" + "nullable": true }, - "type": { - "description": "The type of activity.", + "performedBy": { + "description": "The actor that performed the activity.", "oneOf": [ { - "$ref": "#/components/schemas/DialogsEntitiesActivities_DialogActivityType" + "$ref": "#/components/schemas/V1ServiceOwnerCommonActors_Actor" } ] + }, + "description": { + "type": "array", + "description": "Unstructured text describing the activity. Only set if the activity type is \"Information\".", + "nullable": true, + "items": { + "$ref": "#/components/schemas/V1CommonLocalizations_Localization" + } } - }, - "type": "object" + } }, - "V1ServiceOwnerDialogsQueriesSearch_DialogSeenLog": { + "V1ServiceOwnerDialogsQueriesGet_DialogSeenLog": { + "type": "object", "additionalProperties": false, "properties": { "id": { + "type": "string", "description": "The unique identifier for the seen log entry in UUIDv7 format.", - "format": "guid", - "type": "string" - }, - "isCurrentEndUser": { - "description": "Flag indicating whether the seen log entry was created by the end user supplied in the query.", - "type": "boolean" - }, - "isViaServiceOwner": { - "description": "Flag indicating whether the seen log entry was created via the service owner.\n \nThis is used when the service owner uses the service owner API to implement its own frontend.", - "nullable": true, - "type": "boolean" + "format": "guid" }, "seenAt": { + "type": "string", "description": "The timestamp when the dialog revision was seen.", - "format": "date-time", - "type": "string" + "format": "date-time" }, "seenBy": { "description": "The actor that saw the dialog revision.", @@ -4269,151 +4687,188 @@ "$ref": "#/components/schemas/V1ServiceOwnerCommonActors_Actor" } ] + }, + "isViaServiceOwner": { + "type": "boolean", + "description": "Flag indicating whether the seen log entry was created via the service owner.\n \nThis is used when the service owner uses the service owner API to implement its own frontend.", + "nullable": true + }, + "isCurrentEndUser": { + "type": "boolean", + "description": "Flag indicating whether the seen log entry was created by the current end user, if provided in the query." } - }, - "type": "object" + } }, - "V1ServiceOwnerDialogsUpdate_DialogRequest": { + "V1ServiceOwnerDialogsCreate_DialogRequest": { + "type": "object", "additionalProperties": false, "properties": { "dto": { - "$ref": "#/components/schemas/V1ServiceOwnerDialogsCommandsUpdate_Dialog" + "$ref": "#/components/schemas/V1ServiceOwnerDialogsCommandsCreate_Dialog" } - }, - "type": "object" + } }, - "V1ServiceOwnerDialogTransmissionsCreate_TransmissionRequest": { + "V1ServiceOwnerDialogsCommandsCreate_Dialog": { + "type": "object", "additionalProperties": false, "properties": { - "attachments": { - "description": "The transmission-level attachments.", - "items": { - "$ref": "#/components/schemas/V1ServiceOwnerDialogsCommandsUpdate_TransmissionAttachment" - }, + "id": { + "type": "string", + "description": "A self-defined UUIDv7 may be provided to support idempotent creation of dialogs. If not provided, a new UUIDv7 will be generated.", + "format": "guid", "nullable": true, - "type": "array" + "example": "01913cd5-784f-7d3b-abef-4c77b1f0972d" }, - "authorizationAttribute": { - "description": "Contains an authorization resource attributeId, that can used in custom authorization rules in the XACML service\npolicy, which by default is the policy belonging to the service referred to by \u0022serviceResource\u0022 in the dialog.\n \nCan also be used to refer to other service policies.", - "example": "mycustomresource\n/* equivalent to the above */\nurn:altinn:subresource:mycustomresource\nurn:altinn:task:Task_1\n/* refer to another service */\nurn:altinn:resource:some-other-service-identifier", - "nullable": true, - "type": "string" + "serviceResource": { + "type": "string", + "description": "The service identifier for the service that the dialog is related to in URN-format.\nThis corresponds to a resource in the Altinn Resource Registry, which the authenticated organization\nmust own, i.e., be listed as the \"competent authority\" in the Resource Registry entry.", + "example": "urn:altinn:resource:some-service-identifier" }, - "content": { - "description": "The transmission unstructured text content.", - "oneOf": [ - { - "$ref": "#/components/schemas/V1ServiceOwnerDialogsCommandsUpdate_TransmissionContent" - } - ] + "party": { + "type": "string", + "description": "The party code representing the organization or person that the dialog belongs to in URN format.", + "example": "urn:altinn:person:identifier-no:01125512345\nurn:altinn:organization:identifier-no:912345678" }, - "createdAt": { - "description": "If supplied, overrides the creating date and time for the transmission.\nIf not supplied, the current date /time will be used.", - "format": "date-time", - "type": "string" + "progress": { + "type": "integer", + "description": "Advisory indicator of progress, represented as 1-100 percentage value. 100% representing a dialog that has come\nto a natural completion (successful or not).", + "format": "int32", + "nullable": true }, - "extendedType": { - "description": "Arbitrary URI/URN describing a service-specific transmission type.\n \nRefer to the service-specific documentation provided by the service owner for details (if in use).", - "format": "uri", + "extendedStatus": { + "type": "string", + "description": "Arbitrary string with a service-specific indicator of status, typically used to indicate a fine-grained state of\nthe dialog to further specify the \"status\" enum.", + "nullable": true + }, + "externalReference": { + "type": "string", + "description": "Arbitrary string with a service-specific reference to an external system or service.", + "nullable": true + }, + "visibleFrom": { + "type": "string", + "description": "The timestamp when the dialog should be made visible for authorized end users. If not provided, the dialog will be\nimmediately available.", + "format": "date-time", "nullable": true, - "type": "string" + "example": "2022-12-31T23:59:59Z" }, - "id": { - "description": "The UUDIv7 of the action may be provided to support idempotent additions to the list of transmissions.\nIf not supplied, a new UUIDv7 will be generated.", - "example": "01913cd5-784f-7d3b-abef-4c77b1f0972d", - "format": "guid", + "dueAt": { + "type": "string", + "description": "The due date for the dialog. Dialogs past due date might be marked as such in frontends but will still be available.", + "format": "date-time", "nullable": true, - "type": "string" + "example": "2022-12-31T23:59:59Z" }, - "relatedTransmissionId": { - "description": "Reference to any other transmission that this transmission is related to.", - "format": "guid", + "process": { + "type": "string", + "description": "Optional process identifier used to indicate a business process this dialog belongs to.", + "nullable": true + }, + "precedingProcess": { + "type": "string", + "description": "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.", + "nullable": true + }, + "expiresAt": { + "type": "string", + "description": "The expiration date for the dialog. This is the last date when the dialog is available for the end user.\n \nAfter this date is passed, the dialog will be considered expired and no longer available for the end user in any\nAPI. If not supplied, the dialog will be considered to never expire. This field can be changed after creation.", + "format": "date-time", "nullable": true, - "type": "string" + "example": "2022-12-31T23:59:59Z" }, - "sender": { - "description": "The actor that sent the transmission.", + "createdAt": { + "type": "string", + "description": "If set, will override the date and time when the dialog is set as created.\nIf not supplied, the current date /time will be used.", + "format": "date-time", + "example": "2022-12-31T23:59:59Z" + }, + "updatedAt": { + "type": "string", + "description": "If set, will override the date and time when the dialog is set as last updated.\nIf not supplied, the current date /time will be used.", + "format": "date-time", + "example": "2022-12-31T23:59:59Z" + }, + "status": { + "description": "The aggregated status of the dialog.", "oneOf": [ { - "$ref": "#/components/schemas/V1ServiceOwnerCommonActors_Actor" + "$ref": "#/components/schemas/DialogsEntities_DialogStatus" } ] }, - "type": { - "description": "The type of transmission.", + "systemLabel": { + "description": "Set the system label of the dialog Migration purposes.", + "nullable": true, "oneOf": [ { - "$ref": "#/components/schemas/DialogsEntitiesTransmissions_DialogTransmissionType" + "$ref": "#/components/schemas/DialogEndUserContextsEntities_SystemLabel" } ] - } - }, - "type": "object" - }, - "V1ServiceOwnerDialogTransmissionsQueriesGet_Attachment": { - "additionalProperties": false, - "properties": { - "displayName": { - "description": "The display name of the attachment that should be used in GUIs.", - "items": { - "$ref": "#/components/schemas/V1CommonLocalizations_Localization" - }, - "nullable": true, - "type": "array" - }, - "id": { - "description": "The unique identifier for the attachment in UUIDv7 format.", - "format": "guid", - "type": "string" }, - "urls": { - "description": "The URLs associated with the attachment, each referring to a different representation of the attachment.", - "items": { - "$ref": "#/components/schemas/V1ServiceOwnerDialogTransmissionsQueriesGet_AttachmentUrl" - }, - "nullable": true, - "type": "array" - } - }, - "type": "object" - }, - "V1ServiceOwnerDialogTransmissionsQueriesGet_AttachmentUrl": { - "additionalProperties": false, - "properties": { - "consumerType": { - "description": "The type of consumer the URL is intended for.", + "content": { + "description": "The dialog unstructured text content.", "oneOf": [ { - "$ref": "#/components/schemas/Attachments_AttachmentUrlConsumerType" + "$ref": "#/components/schemas/V1ServiceOwnerDialogsCommandsCreate_Content" } ] }, - "id": { - "description": "The unique identifier for the attachment URL in UUIDv7 format.", - "format": "guid", - "type": "string" + "searchTags": { + "type": "array", + "description": "A list of words (tags) that will be used in dialog search queries. Not visible in end-user DTO.", + "nullable": true, + "items": { + "$ref": "#/components/schemas/V1ServiceOwnerDialogsCommandsCreate_SearchTag" + } }, - "mediaType": { - "description": "The media type of the attachment.", - "example": "application/pdf\napplication/zip", + "attachments": { + "type": "array", + "description": "The attachments associated with the dialog (on an aggregate level).", "nullable": true, - "type": "string" + "items": { + "$ref": "#/components/schemas/V1ServiceOwnerDialogsCommandsCreate_Attachment" + } }, - "url": { - "description": "The fully qualified URL of the attachment. Will be set to \u0022urn:dialogporten:unauthorized\u0022 if the user is\nnot authorized to access the transmission.", - "example": "https://someendpoint.com/someattachment.pdf\nurn:dialogporten:unauthorized", - "format": "uri", - "type": "string" + "transmissions": { + "type": "array", + "description": "The immutable list of transmissions associated with the dialog.", + "nullable": true, + "items": { + "$ref": "#/components/schemas/V1ServiceOwnerDialogsCommandsCreate_Transmission" + } + }, + "guiActions": { + "type": "array", + "description": "The GUI actions associated with the dialog. Should be used in browser-based interactive frontends.", + "nullable": true, + "items": { + "$ref": "#/components/schemas/V1ServiceOwnerDialogsCommandsCreate_GuiAction" + } + }, + "apiActions": { + "type": "array", + "description": "The API actions associated with the dialog. Should be used in specialized, non-browser-based integrations.", + "nullable": true, + "items": { + "$ref": "#/components/schemas/V1ServiceOwnerDialogsCommandsCreate_ApiAction" + } + }, + "activities": { + "type": "array", + "description": "An immutable list of activities associated with the dialog.", + "nullable": true, + "items": { + "$ref": "#/components/schemas/V1ServiceOwnerDialogsCommandsCreate_Activity" + } } - }, - "type": "object" + } }, - "V1ServiceOwnerDialogTransmissionsQueriesGet_Content": { + "V1ServiceOwnerDialogsCommandsCreate_Content": { + "type": "object", "additionalProperties": false, "properties": { - "contentReference": { - "description": "Front-channel embedded content. Used to dynamically embed content in the frontend from an external URL.\nAllowed media types: application/vnd.dialogporten.frontchannelembed\u002Bjson;type=markdown", - "nullable": true, + "title": { + "description": "The title of the dialog.\nSupported media types: text/plain", "oneOf": [ { "$ref": "#/components/schemas/V1CommonContent_ContentValue" @@ -4421,125 +4876,104 @@ ] }, "summary": { - "description": "The summary of the content.", - "oneOf": [ - { - "$ref": "#/components/schemas/V1CommonContent_ContentValue" - } - ] - }, - "title": { - "description": "The title of the content.", + "description": "A short summary of the dialog and its current state.\nSupported media types: text/plain", "oneOf": [ { "$ref": "#/components/schemas/V1CommonContent_ContentValue" } ] - } - }, - "type": "object" - }, - "V1ServiceOwnerDialogTransmissionsQueriesGet_Transmission": { - "additionalProperties": false, - "properties": { - "attachments": { - "description": "The attachments associated with the transmission.", - "items": { - "$ref": "#/components/schemas/V1ServiceOwnerDialogTransmissionsQueriesGet_Attachment" - }, - "nullable": true, - "type": "array" - }, - "authorizationAttribute": { - "description": "The authorization attribute associated with the transmission.", - "nullable": true, - "type": "string" - }, - "content": { - "description": "The content of the transmission.", - "oneOf": [ - { - "$ref": "#/components/schemas/V1ServiceOwnerDialogTransmissionsQueriesGet_Content" - } - ] - }, - "createdAt": { - "description": "The date and time when the transmission was created.", - "format": "date-time", - "type": "string" - }, - "deletedAt": { - "description": "The date and time when the transmission was deleted, if applicable.", - "format": "date-time", - "nullable": true, - "type": "string" }, - "extendedType": { - "description": "The extended type URI for the transmission.", - "format": "uri", + "senderName": { + "description": "Overridden sender name. If not supplied, assume \"org\" as the sender name. Must be text/plain if supplied.\nSupported media types: text/plain", "nullable": true, - "type": "string" - }, - "id": { - "description": "The unique identifier for the transmission in UUIDv7 format.", - "format": "guid", - "type": "string" + "oneOf": [ + { + "$ref": "#/components/schemas/V1CommonContent_ContentValue" + } + ] }, - "relatedTransmissionId": { - "description": "The unique identifier for the related transmission, if any.", - "format": "guid", + "additionalInfo": { + "description": "Additional information about the dialog.\nSupported media types: text/plain, text/markdown", "nullable": true, - "type": "string" + "oneOf": [ + { + "$ref": "#/components/schemas/V1CommonContent_ContentValue" + } + ] }, - "sender": { - "description": "The sender actor information for the transmission.", + "extendedStatus": { + "description": "Used as the human-readable label used to describe the \"ExtendedStatus\" field.\nSupported media types: text/plain", + "nullable": true, "oneOf": [ { - "$ref": "#/components/schemas/V1ServiceOwnerCommonActors_Actor" + "$ref": "#/components/schemas/V1CommonContent_ContentValue" } ] }, - "type": { - "description": "The type of the transmission.", + "mainContentReference": { + "description": "Front-channel embedded content. Used to dynamically embed content in the frontend from an external URL. Must be HTTPS.\nSupported media types: application/vnd.dialogporten.frontchannelembed+json;type=markdown", + "nullable": true, "oneOf": [ { - "$ref": "#/components/schemas/DialogsEntitiesTransmissions_DialogTransmissionType" + "$ref": "#/components/schemas/V1CommonContent_ContentValue" } ] } - }, - "type": "object" + } }, - "V1ServiceOwnerDialogTransmissionsQueriesSearch_Attachment": { + "V1ServiceOwnerDialogsCommandsCreate_SearchTag": { + "type": "object", + "additionalProperties": false, + "properties": { + "value": { + "type": "string", + "description": "A search tag value." + } + } + }, + "V1ServiceOwnerDialogsCommandsCreate_Attachment": { + "type": "object", "additionalProperties": false, "properties": { + "id": { + "type": "string", + "description": "A self-defined UUIDv7 may be provided to support idempotent creation of attachments. If not provided, a new UUIDv7 will be generated.", + "format": "guid", + "nullable": true + }, "displayName": { + "type": "array", "description": "The display name of the attachment that should be used in GUIs.", + "nullable": true, "items": { "$ref": "#/components/schemas/V1CommonLocalizations_Localization" - }, - "nullable": true, - "type": "array" - }, - "id": { - "description": "The unique identifier for the attachment in UUIDv7 format.", - "format": "guid", - "type": "string" + } }, "urls": { + "type": "array", "description": "The URLs associated with the attachment, each referring to a different representation of the attachment.", - "items": { - "$ref": "#/components/schemas/V1ServiceOwnerDialogTransmissionsQueriesSearch_AttachmentUrl" - }, "nullable": true, - "type": "array" + "items": { + "$ref": "#/components/schemas/V1ServiceOwnerDialogsCommandsCreate_AttachmentUrl" + } } - }, - "type": "object" + } }, - "V1ServiceOwnerDialogTransmissionsQueriesSearch_AttachmentUrl": { + "V1ServiceOwnerDialogsCommandsCreate_AttachmentUrl": { + "type": "object", "additionalProperties": false, "properties": { + "url": { + "type": "string", + "description": "The fully qualified URL of the attachment.", + "format": "uri" + }, + "mediaType": { + "type": "string", + "description": "The media type of the attachment.", + "nullable": true, + "example": "application/pdf\napplication/zip" + }, "consumerType": { "description": "The type of consumer the URL is intended for.", "oneOf": [ @@ -4547,33 +4981,83 @@ "$ref": "#/components/schemas/Attachments_AttachmentUrlConsumerType" } ] - }, + } + } + }, + "V1ServiceOwnerDialogsCommandsCreate_Transmission": { + "type": "object", + "additionalProperties": false, + "properties": { "id": { - "description": "The unique identifier for the attachment URL in UUIDv7 format.", + "type": "string", + "description": "A self-defined UUIDv7 may be provided to support idempotent creation of transmissions. If not provided, a new UUIDv7 will be generated.", "format": "guid", - "type": "string" + "nullable": true, + "example": "01913cd5-784f-7d3b-abef-4c77b1f0972d" }, - "mediaType": { - "description": "The media type of the attachment.", - "example": "application/pdf\napplication/zip", + "createdAt": { + "type": "string", + "description": "If supplied, overrides the creating date and time for the transmission.\nIf not supplied, the current date /time will be used.", + "format": "date-time" + }, + "authorizationAttribute": { + "type": "string", + "description": "Contains an authorization resource attributeId, that can used in custom authorization rules in the XACML service\npolicy, which by default is the policy belonging to the service referred to by \"serviceResource\" in the dialog.\n \nCan also be used to refer to other service policies.", "nullable": true, - "type": "string" + "example": "mycustomresource\n/* equivalent to the above */\nurn:altinn:subresource:mycustomresource\nurn:altinn:task:Task_1\n/* refer to another service */\nurn:altinn:resource:some-other-service-identifier" }, - "url": { - "description": "The fully qualified URL of the attachment. Will be set to \u0022urn:dialogporten:unauthorized\u0022 if the user is\nnot authorized to access the transmission.", - "example": "https://someendpoint.com/someattachment.pdf\nurn:dialogporten:unauthorized", + "extendedType": { + "type": "string", + "description": "Arbitrary URI/URN describing a service-specific transmission type.\n \nRefer to the service-specific documentation provided by the service owner for details (if in use).", "format": "uri", - "type": "string" + "nullable": true + }, + "relatedTransmissionId": { + "type": "string", + "description": "Reference to any other transmission that this transmission is related to.", + "format": "guid", + "nullable": true + }, + "type": { + "description": "The type of transmission.", + "oneOf": [ + { + "$ref": "#/components/schemas/DialogsEntitiesTransmissions_DialogTransmissionType" + } + ] + }, + "sender": { + "description": "The actor that sent the transmission.", + "oneOf": [ + { + "$ref": "#/components/schemas/V1ServiceOwnerCommonActors_Actor" + } + ] + }, + "content": { + "description": "The transmission unstructured text content.", + "oneOf": [ + { + "$ref": "#/components/schemas/V1ServiceOwnerDialogsCommandsCreate_TransmissionContent" + } + ] + }, + "attachments": { + "type": "array", + "description": "The transmission-level attachments.", + "nullable": true, + "items": { + "$ref": "#/components/schemas/V1ServiceOwnerDialogsCommandsCreate_TransmissionAttachment" + } } - }, - "type": "object" + } }, - "V1ServiceOwnerDialogTransmissionsQueriesSearch_Content": { + "V1ServiceOwnerDialogsCommandsCreate_TransmissionContent": { + "type": "object", "additionalProperties": false, "properties": { - "contentReference": { - "description": "Front-channel embedded content. Used to dynamically embed content in the frontend from an external URL.", - "nullable": true, + "title": { + "description": "The transmission title. Must be text/plain.", "oneOf": [ { "$ref": "#/components/schemas/V1CommonContent_ContentValue" @@ -4581,2486 +5065,2002 @@ ] }, "summary": { - "description": "The summary of the content.", + "description": "The transmission summary.", "oneOf": [ { "$ref": "#/components/schemas/V1CommonContent_ContentValue" } ] }, - "title": { - "description": "The title of the content.", + "contentReference": { + "description": "Front-channel embedded content. Used to dynamically embed content in the frontend from an external URL. Must be HTTPS.\nAllowed media types: application/vnd.dialogporten.frontchannelembed+json;type=markdown", + "nullable": true, "oneOf": [ { "$ref": "#/components/schemas/V1CommonContent_ContentValue" } ] } - }, - "type": "object" + } }, - "V1ServiceOwnerDialogTransmissionsQueriesSearch_Transmission": { + "V1ServiceOwnerDialogsCommandsCreate_TransmissionAttachment": { + "type": "object", "additionalProperties": false, "properties": { - "attachments": { - "description": "The attachments associated with the transmission.", + "id": { + "type": "string", + "description": "A self-defined UUIDv7 may be provided to support idempotent creation of transmission attachments. If not provided, a new UUIDv7 will be generated.", + "format": "guid", + "nullable": true, + "example": "01913cd5-784f-7d3b-abef-4c77b1f0972d" + }, + "displayName": { + "type": "array", + "description": "The display name of the attachment that should be used in GUIs.", + "nullable": true, "items": { - "$ref": "#/components/schemas/V1ServiceOwnerDialogTransmissionsQueriesSearch_Attachment" - }, + "$ref": "#/components/schemas/V1CommonLocalizations_Localization" + } + }, + "urls": { + "type": "array", + "description": "The URLs associated with the attachment, each referring to a different representation of the attachment.", "nullable": true, - "type": "array" + "items": { + "$ref": "#/components/schemas/V1ServiceOwnerDialogsCommandsCreate_TransmissionAttachmentUrl" + } + } + } + }, + "V1ServiceOwnerDialogsCommandsCreate_TransmissionAttachmentUrl": { + "type": "object", + "additionalProperties": false, + "properties": { + "url": { + "type": "string", + "description": "The fully qualified URL of the attachment.", + "format": "uri" }, - "authorizationAttribute": { - "description": "The authorization attribute associated with the transmission.", + "mediaType": { + "type": "string", + "description": "The media type of the attachment.", "nullable": true, - "type": "string" + "example": "application/pdf\napplication/zip" }, - "content": { - "description": "The content of the transmission.", + "consumerType": { + "description": "The type of consumer the URL is intended for.", "oneOf": [ { - "$ref": "#/components/schemas/V1ServiceOwnerDialogTransmissionsQueriesSearch_Content" + "$ref": "#/components/schemas/Attachments_AttachmentUrlConsumerType" } ] - }, - "createdAt": { - "description": "The date and time when the transmission was created.", - "format": "date-time", - "type": "string" - }, - "deletedAt": { - "description": "The date and time when the transmission was deleted, if applicable.", - "format": "date-time", + } + } + }, + "V1ServiceOwnerDialogsCommandsCreate_GuiAction": { + "type": "object", + "additionalProperties": false, + "properties": { + "id": { + "type": "string", + "description": "A self-defined UUIDv7 may be provided to support idempotent creation of Gui Actions. If not provided, a new UUIDv7 will be generated.", + "format": "guid", "nullable": true, - "type": "string" + "example": "01913cd5-784f-7d3b-abef-4c77b1f0972d" }, - "extendedType": { - "description": "The extended type URI for the transmission.", + "action": { + "type": "string", + "description": "The action identifier for the action, corresponding to the \"action\" attributeId used in the XACML service policy." + }, + "url": { + "type": "string", + "description": "The fully qualified URL of the action, to which the user will be redirected when the action is triggered. Will be set to\n\"urn:dialogporten:unauthorized\" if the user is not authorized to perform the action.", "format": "uri", + "example": "urn:dialogporten:unauthorized\nhttps://someendpoint.com/gui/some-service-instance-id" + }, + "authorizationAttribute": { + "type": "string", + "description": "Contains an authorization resource attributeId, that can used in custom authorization rules in the XACML service\npolicy, which by default is the policy belonging to the service referred to by \"serviceResource\" in the dialog.\n \nCan also be used to refer to other service policies.", "nullable": true, - "type": "string" + "example": "mycustomresource\n/* equivalent to the above */\nurn:altinn:subresource:mycustomresource\nurn:altinn:task:Task_1\n/* refer to another service */\nurn:altinn:resource:some-other-service-identifier" }, - "id": { - "description": "The unique identifier for the transmission in UUIDv7 format.", - "format": "guid", - "type": "string" + "isDeleteDialogAction": { + "type": "boolean", + "description": "Indicates whether the action results in the dialog being deleted. Used by frontends to implement custom UX\nfor delete actions." }, - "relatedTransmissionId": { - "description": "The unique identifier for the related transmission, if any.", - "format": "guid", + "httpMethod": { + "description": "The HTTP method that the frontend should use when redirecting the user.", "nullable": true, - "type": "string" - }, - "sender": { - "description": "The sender actor information for the transmission.", "oneOf": [ { - "$ref": "#/components/schemas/V1ServiceOwnerCommonActors_Actor" + "$ref": "#/components/schemas/Http_HttpVerb" } ] }, - "type": { - "description": "The type of the transmission.", + "priority": { + "description": "Indicates a priority for the action, making it possible for frontends to adapt GUI elements based on action\npriority.", "oneOf": [ { - "$ref": "#/components/schemas/DialogsEntitiesTransmissions_DialogTransmissionType" + "$ref": "#/components/schemas/DialogsEntitiesActions_DialogGuiActionPriority" } ] - } - }, - "type": "object" - }, - "V1WellKnownJwksQueriesGet_GetJwks": { - "additionalProperties": false, - "properties": { - "keys": { + }, + "title": { + "type": "array", + "description": "The title of the action, this should be short and in verb form. Must be text/plain.", + "nullable": true, "items": { - "$ref": "#/components/schemas/V1WellKnownJwksQueriesGet_Jwk" - }, + "$ref": "#/components/schemas/V1CommonLocalizations_Localization" + } + }, + "prompt": { + "type": "array", + "description": "If there should be a prompt asking the user for confirmation before the action is executed,\nthis field should contain the prompt text.", "nullable": true, - "type": "array" + "items": { + "$ref": "#/components/schemas/V1CommonLocalizations_Localization" + } } - }, - "type": "object" + } }, - "V1WellKnownJwksQueriesGet_Jwk": { + "V1ServiceOwnerDialogsCommandsCreate_ApiAction": { + "type": "object", "additionalProperties": false, "properties": { - "alg": { - "type": "string" - }, - "crv": { - "type": "string" - }, - "kid": { - "type": "string" + "id": { + "type": "string", + "description": "A self-defined UUIDv7 may be provided to support idempotent creation of Api Actions. If not provided, a new UUIDv7 will be generated.", + "format": "guid", + "nullable": true, + "example": "01913cd5-784f-7d3b-abef-4c77b1f0972d" }, - "kty": { - "type": "string" + "action": { + "type": "string", + "description": "String identifier for the action, corresponding to the \"action\" attributeId used in the XACML service policy,\nwhich by default is the policy belonging to the service referred to by \"serviceResource\" in the dialog.", + "example": "write" }, - "use": { - "type": "string" + "authorizationAttribute": { + "type": "string", + "description": "Contains an authorization resource attributeId, that can used in custom authorization rules in the XACML service\npolicy, which by default is the policy belonging to the service referred to by \"serviceResource\" in the dialog.\n \nCan also be used to refer to other service policies.", + "nullable": true, + "example": "mycustomresource\n/* equivalent to the above */\nurn:altinn:subresource:mycustomresource\nurn:altinn:task:Task_1\n/* refer to another service */\nurn:altinn:resource:some-other-service-identifier" }, - "x": { - "type": "string" + "endpoints": { + "type": "array", + "description": "The endpoints associated with the action.", + "nullable": true, + "items": { + "$ref": "#/components/schemas/V1ServiceOwnerDialogsCommandsCreate_ApiActionEndpoint" + } } - }, - "type": "object" + } }, - "V1WellKnownOauthAuthorizationServerQueriesGet_GetOauthAuthorizationServer": { + "V1ServiceOwnerDialogsCommandsCreate_ApiActionEndpoint": { + "type": "object", "additionalProperties": false, "properties": { - "issuer": { - "type": "string" + "version": { + "type": "string", + "description": "Arbitrary string indicating the version of the endpoint.", + "nullable": true }, - "jwks_uri": { - "type": "string" - } - }, - "type": "object" - } - }, - "securitySchemes": { - "JWTBearerAuth": { - "bearerFormat": "JWT", - "description": "Enter a JWT token to authorize the requests...", - "scheme": "bearer", - "type": "http" - } - } - }, - "info": { - "title": "Dialogporten", - "version": "v1" - }, - "openapi": "3.0.0", - "paths": { - "/api/v1/.well-known/jwks.json": { - "get": { - "description": "This endpoint can be used by client integrations supporting automatic discovery of \u0022OAuth 2.0 Authorization Server\u0022 metadata, enabling verification of dialog tokens issues by Dialogporten.", - "operationId": "V1WellKnownJwksGet_GetJwks", - "responses": { - "200": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/V1WellKnownJwksQueriesGet_GetJwks" - } - } - }, - "description": "The OAuth 2.0 Authorization Server Metadata" - } - }, - "summary": "Gets the JSON Web Key Set (JWKS) containing the public keys used to verify dialog token signatures", - "tags": [ - "Metadata" - ] - } - }, - "/api/v1/.well-known/oauth-authorization-server": { - "get": { - "description": "This endpoint can be used by client integrations supporting automatic discovery of \u0022OAuth 2.0 Authorization Server\u0022 metadata, enabling verification of dialog tokens issues by Dialogporten.", - "operationId": "V1WellKnownOauthAuthorizationServerGet_GetOauthAuthorizationServer", - "responses": { - "200": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/V1WellKnownOauthAuthorizationServerQueriesGet_GetOauthAuthorizationServer" - } + "url": { + "type": "string", + "description": "The fully qualified URL of the API endpoint.", + "format": "uri" + }, + "httpMethod": { + "description": "The HTTP method that the endpoint expects for this action.", + "oneOf": [ + { + "$ref": "#/components/schemas/Http_HttpVerb" } - }, - "description": "The OAuth 2.0 Authorization Server Metadata" - } - }, - "summary": "Gets the OAuth 2.0 Metadata for automatic configuration of clients verifying dialog tokens", - "tags": [ - "Metadata" - ] - } - }, - "/api/v1/enduser/dialogs": { - "get": { - "description": "Performs a search for dialogs, returning a paginated list of dialogs. For more information see the documentation (link TBD).\n\n* All date parameters must contain explicit time zone. Example: 2023-10-27T10:00:00Z or 2023-10-27T10:00:00\u002B01:00\n* See \u0022continuationToken\u0022 in the response for how to get the next page of results.\n* hasNextPage will be set to true if there are more items to get.", - "operationId": "V1EndUserDialogsSearch_SearchDialog", - "parameters": [ - { - "description": "Filter by one or more service owner codes", - "explode": true, - "in": "query", - "name": "org", - "schema": { - "items": { - "type": "string" - }, - "nullable": true, - "type": "array" - }, - "style": "form" + ] }, - { - "description": "Filter by one or more service resources", - "explode": true, - "in": "query", - "name": "serviceResource", - "schema": { - "items": { - "type": "string" - }, - "nullable": true, - "type": "array" - }, - "style": "form" + "documentationUrl": { + "type": "string", + "description": "Link to documentation for the endpoint, providing documentation for integrators. Should be a URL to a\nhuman-readable page.", + "format": "uri", + "nullable": true }, - { - "description": "Filter by one or more owning parties", - "explode": true, - "in": "query", - "name": "party", - "schema": { - "items": { - "type": "string" - }, - "nullable": true, - "type": "array" - }, - "style": "form" + "requestSchema": { + "type": "string", + "description": "Link to the request schema for the endpoint. Used to provide documentation for integrators.\nDialogporten will not validate information on this endpoint.", + "format": "uri", + "nullable": true }, - { - "description": "Filter by one or more extended statuses", - "explode": true, - "in": "query", - "name": "extendedStatus", - "schema": { - "items": { - "type": "string" - }, - "nullable": true, - "type": "array" - }, - "style": "form" + "responseSchema": { + "type": "string", + "description": "Link to the response schema for the endpoint. Used to provide documentation for integrators.\nDialogporten will not validate information on this endpoint.", + "format": "uri", + "nullable": true }, - { - "description": "Filter by external reference", - "in": "query", - "name": "externalReference", - "schema": { - "nullable": true, - "type": "string" - } + "deprecated": { + "type": "boolean", + "description": "Boolean indicating if the endpoint is deprecated." }, - { - "description": "Filter by status", - "explode": true, - "in": "query", - "name": "status", - "schema": { - "items": { - "$ref": "#/components/schemas/DialogsEntities_DialogStatus" - }, - "nullable": true, - "type": "array" - }, - "style": "form" + "sunsetAt": { + "type": "string", + "description": "Date and time when the endpoint will no longer function. Only set if the endpoint is deprecated. Dialogporten\nwill not enforce this date.", + "format": "date-time", + "nullable": true + } + } + }, + "V1ServiceOwnerDialogsCommandsCreate_Activity": { + "type": "object", + "additionalProperties": false, + "properties": { + "id": { + "type": "string", + "description": "A self-defined UUIDv7 may be provided to support idempotent creation of activities. If not provided, a new UUIDv7 will be generated.", + "format": "guid", + "nullable": true, + "example": "01913cd5-784f-7d3b-abef-4c77b1f0972d" }, - { - "description": "Only return dialogs created after this date", - "in": "query", - "name": "createdAfter", - "schema": { - "format": "date-time", - "nullable": true, - "type": "string" - } + "createdAt": { + "type": "string", + "description": "If supplied, overrides the creating date and time for the transmission.\nIf not supplied, the current date /time will be used.", + "format": "date-time", + "nullable": true }, - { - "description": "Only return dialogs created before this date", - "in": "query", - "name": "createdBefore", - "schema": { - "format": "date-time", - "nullable": true, - "type": "string" - } + "extendedType": { + "type": "string", + "description": "Arbitrary URI/URN describing a service-specific transmission type.", + "format": "uri", + "nullable": true }, - { - "description": "Only return dialogs updated after this date", - "in": "query", - "name": "updatedAfter", - "schema": { - "format": "date-time", - "nullable": true, - "type": "string" - } + "type": { + "description": "The type of transmission.", + "oneOf": [ + { + "$ref": "#/components/schemas/DialogsEntitiesActivities_DialogActivityType" + } + ] }, - { - "description": "Only return dialogs updated before this date", - "in": "query", - "name": "updatedBefore", - "schema": { - "format": "date-time", - "nullable": true, - "type": "string" + "transmissionId": { + "type": "string", + "description": "If the activity is related to a particular transmission, this field will contain the transmission identifier.\nMust be present in the request body.", + "format": "guid", + "nullable": true + }, + "performedBy": { + "description": "The actor that performed the activity.", + "oneOf": [ + { + "$ref": "#/components/schemas/V1ServiceOwnerCommonActors_Actor" + } + ] + }, + "description": { + "type": "array", + "description": "Unstructured text describing the activity. Only set if the activity type is \"Information\".", + "nullable": true, + "items": { + "$ref": "#/components/schemas/V1CommonLocalizations_Localization" } + } + } + }, + "V1ServiceOwnerDialogActivitiesQueriesSearch_Activity": { + "type": "object", + "additionalProperties": false, + "properties": { + "id": { + "type": "string", + "format": "guid" }, - { - "description": "Only return dialogs with due date after this date", - "in": "query", - "name": "dueAfter", - "schema": { - "format": "date-time", - "nullable": true, - "type": "string" - } + "createdAt": { + "type": "string", + "format": "date-time" }, - { - "description": "Only return dialogs with due date before this date", - "in": "query", - "name": "dueBefore", - "schema": { - "format": "date-time", - "nullable": true, - "type": "string" - } + "extendedType": { + "type": "string", + "format": "uri", + "nullable": true }, - { - "description": "Filter by process", - "in": "query", - "name": "process", - "schema": { - "nullable": true, - "type": "string" - } + "type": { + "$ref": "#/components/schemas/DialogsEntitiesActivities_DialogActivityType" }, - { - "description": "Filter by Display state", - "explode": true, - "in": "query", - "name": "systemLabel", - "schema": { - "items": { - "$ref": "#/components/schemas/DialogEndUserContextsEntities_SystemLabel" - }, - "nullable": true, - "type": "array" - }, - "style": "form" + "deletedAt": { + "type": "string", + "format": "date-time", + "nullable": true }, - { - "description": "Search string for free text search. Will attempt to fuzzily match in all free text fields in the aggregate", - "in": "query", - "name": "search", - "schema": { - "nullable": true, - "type": "string" - } + "transmissionId": { + "type": "string", + "format": "guid", + "nullable": true + } + } + }, + "V1ServiceOwnerDialogActivitiesQueriesNotificationCondition_NotificationCondition": { + "type": "object", + "additionalProperties": false, + "properties": { + "sendNotification": { + "type": "boolean" + } + } + }, + "V1ServiceOwnerDialogActivitiesQueriesGet_Activity": { + "type": "object", + "additionalProperties": false, + "properties": { + "id": { + "type": "string", + "format": "guid" }, - { - "description": "Limit free text search to texts with this language code, e.g. \u0027nb\u0027, \u0027en\u0027. Culture codes will be normalized to neutral language codes (ISO 639). Default: search all culture codes", - "in": "query", - "name": "searchLanguageCode", - "schema": { - "nullable": true, - "type": "string" - } + "createdAt": { + "type": "string", + "format": "date-time", + "nullable": true }, - { - "in": "query", - "name": "orderBy", - "schema": { - "nullable": true, - "oneOf": [ - { - "$ref": "#/components/schemas/OrderSetOfTOrderDefinitionAndTTarget" - } - ] - } + "extendedType": { + "type": "string", + "format": "uri", + "nullable": true }, - { - "description": "Supply \u0022continuationToken\u0022 for the response to get the next page of results, if hasNextPage is true", - "in": "query", - "name": "continuationToken", - "schema": { - "nullable": true, - "oneOf": [ - { - "$ref": "#/components/schemas/ContinuationTokenSetOfTOrderDefinitionAndTTarget" - } - ] - } + "type": { + "$ref": "#/components/schemas/DialogsEntitiesActivities_DialogActivityType" }, - { - "description": "Limit the number of results per page (1-1000, default: 100)", - "in": "query", - "name": "limit", - "schema": { - "format": "int32", - "nullable": true, - "type": "integer" + "deletedAt": { + "type": "string", + "format": "date-time", + "nullable": true + }, + "transmissionId": { + "type": "string", + "format": "guid", + "nullable": true + }, + "performedBy": { + "$ref": "#/components/schemas/V1ServiceOwnerCommonActors_Actor" + }, + "description": { + "type": "array", + "nullable": true, + "items": { + "$ref": "#/components/schemas/V1CommonLocalizations_Localization" } } + } + }, + "V1ServiceOwnerDialogActivitiesQueriesNotificationCondition_NotificationConditionType": { + "type": "string", + "description": "", + "x-enumNames": [ + "NotExists", + "Exists" ], - "responses": { - "200": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/PaginatedListOfV1EndUserDialogsQueriesSearch_Dialog" - } + "enum": [ + "NotExists", + "Exists" + ] + }, + "V1ServiceOwnerDialogActivitiesCreate_ActivityRequest": { + "type": "object", + "additionalProperties": false, + "properties": { + "id": { + "type": "string", + "description": "The UUDIv7 of the action may be provided to support idempotent additions to the list of activities.\nIf not supplied, a new UUIDv7 will be generated.", + "format": "guid", + "nullable": true, + "example": "01913cd5-784f-7d3b-abef-4c77b1f0972d" + }, + "createdAt": { + "type": "string", + "description": "If supplied, overrides the creating date and time for the transmission.\nIf not supplied, the current date /time will be used.", + "format": "date-time", + "nullable": true + }, + "extendedType": { + "type": "string", + "description": "Arbitrary URI/URN describing a service-specific transmission type.", + "format": "uri", + "nullable": true + }, + "type": { + "description": "The type of transmission.", + "oneOf": [ + { + "$ref": "#/components/schemas/DialogsEntitiesActivities_DialogActivityType" } - }, - "description": "Successfully returned the dialog list." + ] }, - "401": { - "description": "Missing or invalid authentication token. Requires a Maskinporten-token with the scope \u0022digdir:dialogporten\u0022." - } - }, - "security": [ - { - "JWTBearerAuth": [] + "transmissionId": { + "type": "string", + "description": "If the activity is related to a particular transmission, this field will contain the transmission identifier.\nMust be present in the request body.", + "format": "guid", + "nullable": true + }, + "performedBy": { + "description": "The actor that performed the activity.", + "oneOf": [ + { + "$ref": "#/components/schemas/V1ServiceOwnerCommonActors_Actor" + } + ] + }, + "description": { + "type": "array", + "description": "Unstructured text describing the activity. Only set if the activity type is \"Information\".", + "nullable": true, + "items": { + "$ref": "#/components/schemas/V1CommonLocalizations_Localization" + } } - ], - "summary": "Gets a list of dialogs", - "tags": [ - "Enduser" - ] - } - }, - "/api/v1/enduser/dialogs/{dialogId}": { - "get": { - "description": "Gets a single dialog aggregate. For more information see the documentation (link TBD).", - "operationId": "V1EndUserDialogsGet_GetDialog", - "parameters": [ - { - "in": "path", - "name": "dialogId", - "required": true, - "schema": { - "format": "guid", - "type": "string" + } + }, + "V1EndUserPartiesQueriesGet_Parties": { + "type": "object", + "additionalProperties": false, + "properties": { + "authorizedParties": { + "type": "array", + "nullable": true, + "items": { + "$ref": "#/components/schemas/V1EndUserPartiesQueriesGet_AuthorizedParty" } } - ], - "responses": { - "200": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/V1EndUserDialogsQueriesGet_Dialog" - } - } - }, - "description": "Successfully returned the dialog aggregate." + } + }, + "V1EndUserPartiesQueriesGet_AuthorizedParty": { + "type": "object", + "additionalProperties": false, + "properties": { + "party": { + "type": "string" + }, + "name": { + "type": "string" + }, + "partyType": { + "type": "string" + }, + "isDeleted": { + "type": "boolean" + }, + "hasKeyRole": { + "type": "boolean" + }, + "isCurrentEndUser": { + "type": "boolean" }, - "401": { - "description": "Missing or invalid authentication token. Requires a Maskinporten-token with the scope \u0022digdir:dialogporten\u0022." + "isMainAdministrator": { + "type": "boolean" }, - "403": { - "description": "Unauthorized to get the supplied dialog (not owned by authenticated organization or has additional scope requirements defined in policy)." + "isAccessManager": { + "type": "boolean" }, - "404": { - "content": { - "application/problem\u002Bjson": { - "schema": { - "$ref": "#/components/schemas/ProblemDetails" - } - } - }, - "description": "The given dialog ID was not found or is already deleted." - } - }, - "security": [ - { - "JWTBearerAuth": [] - } - ], - "summary": "Gets a single dialog", - "tags": [ - "Enduser" - ] - } - }, - "/api/v1/enduser/dialogs/{dialogId}/activities": { - "get": { - "description": "Gets the list of activities belonging to a dialog", - "operationId": "V1EndUserDialogActivitiesSearch_SearchDialogActivity", - "parameters": [ - { - "in": "path", - "name": "dialogId", - "required": true, - "schema": { - "format": "guid", - "type": "string" + "hasOnlyAccessToSubParties": { + "type": "boolean" + }, + "subParties": { + "type": "array", + "nullable": true, + "items": { + "$ref": "#/components/schemas/V1EndUserPartiesQueriesGet_AuthorizedParty" } } - ], - "responses": { - "200": { - "content": { - "application/json": { - "schema": { - "items": { - "$ref": "#/components/schemas/V1EndUserDialogActivitiesQueriesSearch_Activity" - }, - "type": "array" - } - } - }, - "description": "Successfully returned the dialog activity list." + } + }, + "V1EndUserDialogTransmissionsQueriesSearch_Transmission": { + "type": "object", + "additionalProperties": false, + "properties": { + "id": { + "type": "string", + "description": "The unique identifier for the transmission in UUIDv7 format.", + "format": "guid" }, - "401": { - "description": "Missing or invalid authentication token. Requires a Maskinporten-token with the scope \u0022digdir:dialogporten\u0022." + "createdAt": { + "type": "string", + "description": "The date and time when the transmission was created.", + "format": "date-time" }, - "403": { - "description": "Unauthorized to get the supplied dialog (not owned by authenticated organization or has additional scope requirements defined in policy)." - } - }, - "security": [ - { - "JWTBearerAuth": [] - } - ], - "summary": "Gets a list of dialog activities", - "tags": [ - "Enduser" - ] - } - }, - "/api/v1/enduser/dialogs/{dialogId}/activities/{activityId}": { - "get": { - "description": "Gets a single activity belonging to a dialog. For more information see the documentation (link TBD).", - "operationId": "V1EndUserDialogActivitiesGet_GetDialogActivity", - "parameters": [ - { - "in": "path", - "name": "dialogId", - "required": true, - "schema": { - "format": "guid", - "type": "string" - } + "authorizationAttribute": { + "type": "string", + "description": "The authorization attribute associated with the transmission.", + "nullable": true }, - { - "in": "path", - "name": "activityId", - "required": true, - "schema": { - "format": "guid", - "type": "string" - } - } - ], - "responses": { - "200": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/V1EndUserDialogActivitiesQueriesGet_Activity" - } - } - }, - "description": "Successfully returned the dialog activity." + "isAuthorized": { + "type": "boolean", + "description": "Flag indicating if the authenticated user is authorized for this transmission. If not, embedded content and\nthe attachments will not be available." }, - "401": { - "description": "Missing or invalid authentication token. Requires a Maskinporten-token with the scope \u0022digdir:dialogporten\u0022." + "extendedType": { + "type": "string", + "description": "The extended type URI for the transmission.", + "format": "uri", + "nullable": true }, - "403": { - "description": "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)." + "relatedTransmissionId": { + "type": "string", + "description": "The unique identifier for the related transmission, if any.", + "format": "guid", + "nullable": true }, - "404": { - "content": { - "application/problem\u002Bjson": { - "schema": { - "$ref": "#/components/schemas/ProblemDetails" - } - } - }, - "description": "The given dialog ID was not found or was deleted, or the given activity ID was not found." - } - }, - "security": [ - { - "JWTBearerAuth": [] - } - ], - "summary": "Gets a single dialog activity", - "tags": [ - "Enduser" - ] - } - }, - "/api/v1/enduser/dialogs/{dialogId}/labellog": { - "get": { - "operationId": "V1EndUserDialogLabelAssignmentLogsSearch_SearchDialogLabelAssignmentLog", - "parameters": [ - { - "in": "path", - "name": "dialogId", - "required": true, - "schema": { - "format": "guid", - "type": "string" - } - } - ], - "responses": { - "200": { - "content": { - "application/json": { - "schema": { - "items": { - "$ref": "#/components/schemas/V1EndUserDialogLabelAssignmentLogQueriesSearch_LabelAssignmentLog" - }, - "type": "array" - } - } - }, - "description": "Success" + "deletedAt": { + "type": "string", + "description": "The date and time when the transmission was deleted, if applicable.", + "format": "date-time", + "nullable": true }, - "401": { - "description": "Unauthorized" + "type": { + "description": "The type of the transmission.", + "oneOf": [ + { + "$ref": "#/components/schemas/DialogsEntitiesTransmissions_DialogTransmissionType" + } + ] }, - "403": { - "description": "Forbidden" + "sender": { + "description": "The sender actor information for the transmission.", + "oneOf": [ + { + "$ref": "#/components/schemas/V1EndUserCommonActors_Actor" + } + ] }, - "404": { - "content": { - "application/problem\u002Bjson": { - "schema": { - "$ref": "#/components/schemas/ProblemDetails" - } + "content": { + "description": "The content of the transmission.", + "oneOf": [ + { + "$ref": "#/components/schemas/V1EndUserDialogTransmissionsQueriesSearch_Content" } - }, - "description": "Not Found" + ] }, - "410": { - "description": "" - } - }, - "security": [ - { - "JWTBearerAuth": [] - } - ], - "tags": [ - "Enduser" - ] - } - }, - "/api/v1/enduser/dialogs/{dialogId}/seenlog": { - "get": { - "description": "Gets all seen log records for a dialog. For more information see the documentation (link TBD).", - "operationId": "V1EndUserDialogSeenLogsSearch_SearchDialogSeenLog", - "parameters": [ - { - "in": "path", - "name": "dialogId", - "required": true, - "schema": { - "format": "guid", - "type": "string" + "attachments": { + "type": "array", + "description": "The attachments associated with the transmission.", + "nullable": true, + "items": { + "$ref": "#/components/schemas/V1EndUserDialogTransmissionsQueriesSearch_Attachment" } } - ], - "responses": { - "200": { - "content": { - "application/json": { - "schema": { - "items": { - "$ref": "#/components/schemas/V1EndUserDialogSeenLogsQueriesSearch_SeenLog" - }, - "type": "array" - } + } + }, + "V1EndUserCommonActors_Actor": { + "type": "object", + "additionalProperties": false, + "properties": { + "actorType": { + "description": "The type of actor that sent the transmission.", + "oneOf": [ + { + "$ref": "#/components/schemas/Actors_ActorType" } - }, - "description": "Successfully returned the dialog seen log records." + ] + }, + "actorName": { + "type": "string", + "description": "Specifies the name of the entity that sent the transmission. Mutually exclusive with ActorId. If ActorId\nis supplied, the name will be automatically populated from the name registries.", + "nullable": true, + "example": "Ola Nordmann" }, - "401": { - "description": "Missing or invalid authentication token. Requires a Maskinporten-token with the scope \u0022digdir:dialogporten\u0022." + "actorId": { + "type": "string", + "description": "The identifier of the person or organization that sent the transmission. Mutually exclusive with ActorName.\nMight be omitted if ActorType is \"ServiceOwner\".", + "nullable": true, + "example": "urn:altinn:person:identifier-no:12018212345" + } + } + }, + "V1EndUserDialogTransmissionsQueriesSearch_Content": { + "type": "object", + "additionalProperties": false, + "properties": { + "title": { + "description": "The title of the content.", + "oneOf": [ + { + "$ref": "#/components/schemas/V1CommonContent_ContentValue" + } + ] }, - "403": { - "description": "Forbidden" + "summary": { + "description": "The summary of the content.", + "oneOf": [ + { + "$ref": "#/components/schemas/V1CommonContent_ContentValue" + } + ] }, - "404": { - "content": { - "application/problem\u002Bjson": { - "schema": { - "$ref": "#/components/schemas/ProblemDetails" - } + "contentReference": { + "description": "Front-channel embedded content. Used to dynamically embed content in the frontend from an external URL.\nAllowed media types: application/vnd.dialogporten.frontchannelembed+json;type=markdown", + "nullable": true, + "oneOf": [ + { + "$ref": "#/components/schemas/V1CommonContent_ContentValue" } - }, - "description": "Not Found" - } - }, - "security": [ - { - "JWTBearerAuth": [] + ] } - ], - "summary": "Gets all seen log records for a dialog", - "tags": [ - "Enduser" - ] - } - }, - "/api/v1/enduser/dialogs/{dialogId}/seenlog/{seenLogId}": { - "get": { - "description": "Gets a single dialog seen log record. For more information see the documentation (link TBD).", - "operationId": "V1EndUserDialogSeenLogsGet_GetDialogSeenLog", - "parameters": [ - { - "in": "path", - "name": "dialogId", - "required": true, - "schema": { - "format": "guid", - "type": "string" + } + }, + "V1EndUserDialogTransmissionsQueriesSearch_Attachment": { + "type": "object", + "additionalProperties": false, + "properties": { + "id": { + "type": "string", + "description": "The unique identifier for the attachment in UUIDv7 format.", + "format": "guid" + }, + "displayName": { + "type": "array", + "description": "The display name of the attachment that should be used in GUIs.", + "nullable": true, + "items": { + "$ref": "#/components/schemas/V1CommonLocalizations_Localization" } }, - { - "in": "path", - "name": "seenLogId", - "required": true, - "schema": { - "format": "guid", - "type": "string" + "urls": { + "type": "array", + "description": "The URLs associated with the attachment, each referring to a different representation of the attachment.", + "nullable": true, + "items": { + "$ref": "#/components/schemas/V1EndUserDialogTransmissionsQueriesSearch_AttachmentUrl" } } - ], - "responses": { - "200": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/V1EndUserDialogSeenLogsQueriesGet_SeenLog" - } - } - }, - "description": "Successfully returned the dialog seen log record." + } + }, + "V1EndUserDialogTransmissionsQueriesSearch_AttachmentUrl": { + "type": "object", + "additionalProperties": false, + "properties": { + "id": { + "type": "string", + "description": "The unique identifier for the attachment URL in UUIDv7 format.", + "format": "guid" }, - "401": { - "description": "Missing or invalid authentication token. Requires a Maskinporten-token with the scope \u0022digdir:dialogporten\u0022." + "url": { + "type": "string", + "description": "The fully qualified URL of the attachment. Will be set to \"urn:dialogporten:unauthorized\" if the user is\nnot authorized to access the transmission.", + "format": "uri", + "example": "https://someendpoint.com/someattachment.pdf\nurn:dialogporten:unauthorized" }, - "403": { - "description": "Forbidden" + "mediaType": { + "type": "string", + "description": "The media type of the attachment.", + "nullable": true, + "example": "application/pdf\napplication/zip" }, - "404": { - "content": { - "application/problem\u002Bjson": { - "schema": { - "$ref": "#/components/schemas/ProblemDetails" - } + "consumerType": { + "description": "The type of consumer the URL is intended for.", + "oneOf": [ + { + "$ref": "#/components/schemas/Attachments_AttachmentUrlConsumerType" } - }, - "description": "Not Found" - } - }, - "security": [ - { - "JWTBearerAuth": [] - } - ], - "summary": "Gets a single dialog seen log record", - "tags": [ - "Enduser" - ] - } - }, - "/api/v1/enduser/dialogs/{dialogId}/systemlabels": { - "put": { - "operationId": "V1EndUserDialogSystemLabelsSet_SetDialogSystemLabel", - "parameters": [ - { - "in": "path", - "name": "dialogId", - "required": true, - "schema": { - "format": "guid", - "type": "string" - } + ] } - ], - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/V1EndUserDialogSystemLabelsCommandsSet_SystemLabelCommand" - } - } + } + }, + "V1EndUserDialogTransmissionsQueriesGet_Transmission": { + "type": "object", + "additionalProperties": false, + "properties": { + "id": { + "type": "string", + "description": "The unique identifier for the transmission in UUIDv7 format.", + "format": "guid" }, - "description": "", - "required": true, - "x-name": "SystemLabelCommand", - "x-position": 1 - }, - "responses": { - "204": { - "description": "No Content" + "createdAt": { + "type": "string", + "description": "The date and time when the transmission was created.", + "format": "date-time" }, - "400": { - "content": { - "application/problem\u002Bjson": { - "schema": { - "$ref": "#/components/schemas/ProblemDetails" - } - } - }, - "description": "Bad Request" + "authorizationAttribute": { + "type": "string", + "description": "The authorization attribute associated with the transmission.", + "nullable": true }, - "401": { - "description": "Unauthorized" + "isAuthorized": { + "type": "boolean", + "description": "Flag indicating if the authenticated user is authorized for this transmission. If not, embedded content and\nthe attachments will not be available." }, - "403": { - "description": "Forbidden" + "extendedType": { + "type": "string", + "description": "The extended type URI for the transmission.", + "format": "uri", + "nullable": true }, - "404": { - "content": { - "application/problem\u002Bjson": { - "schema": { - "$ref": "#/components/schemas/ProblemDetails" - } - } - }, - "description": "Not Found" + "relatedTransmissionId": { + "type": "string", + "description": "The unique identifier for the related transmission, if any.", + "format": "guid", + "nullable": true }, - "410": { - "description": "" + "deletedAt": { + "type": "string", + "description": "The date and time when the transmission was deleted, if applicable.", + "format": "date-time", + "nullable": true }, - "412": { - "content": { - "application/problem\u002Bjson": { - "schema": { - "$ref": "#/components/schemas/ProblemDetails" - } + "type": { + "description": "The type of the transmission.", + "oneOf": [ + { + "$ref": "#/components/schemas/DialogsEntitiesTransmissions_DialogTransmissionType" } - }, - "description": "" + ] }, - "422": { - "content": { - "application/problem\u002Bjson": { - "schema": { - "$ref": "#/components/schemas/ProblemDetails" - } + "sender": { + "description": "The sender actor information for the transmission.", + "oneOf": [ + { + "$ref": "#/components/schemas/V1EndUserCommonActors_Actor" } - }, - "description": "" - } - }, - "security": [ - { - "JWTBearerAuth": [] - } - ], - "tags": [ - "Enduser" - ] - } - }, - "/api/v1/enduser/dialogs/{dialogId}/transmissions": { - "get": { - "description": "Gets the list of transmissions belonging to a dialog", - "operationId": "V1EndUserDialogTransmissionsSearch_SearchDialogTransmission", - "parameters": [ - { - "in": "path", - "name": "dialogId", - "required": true, - "schema": { - "format": "guid", - "type": "string" + ] + }, + "content": { + "description": "The content of the transmission.", + "oneOf": [ + { + "$ref": "#/components/schemas/V1EndUserDialogTransmissionsQueriesGet_Content" + } + ] + }, + "attachments": { + "type": "array", + "description": "The attachments associated with the transmission.", + "nullable": true, + "items": { + "$ref": "#/components/schemas/V1EndUserDialogTransmissionsQueriesGet_Attachment" } } - ], - "responses": { - "200": { - "content": { - "application/json": { - "schema": { - "items": { - "$ref": "#/components/schemas/V1EndUserDialogTransmissionsQueriesSearch_Transmission" - }, - "type": "array" - } + } + }, + "V1EndUserDialogTransmissionsQueriesGet_Content": { + "type": "object", + "additionalProperties": false, + "properties": { + "title": { + "description": "The title of the content.", + "oneOf": [ + { + "$ref": "#/components/schemas/V1CommonContent_ContentValue" } - }, - "description": "Successfully returned the dialog transmission list." + ] }, - "401": { - "description": "Missing or invalid authentication token. Requires a Maskinporten-token with the scope \u0022digdir:dialogporten\u0022." + "summary": { + "description": "The summary of the content.", + "oneOf": [ + { + "$ref": "#/components/schemas/V1CommonContent_ContentValue" + } + ] }, - "403": { - "description": "Unauthorized to get the supplied dialog (not owned by authenticated organization or has additional scope requirements defined in policy)." - } - }, - "security": [ - { - "JWTBearerAuth": [] + "contentReference": { + "description": "Front-channel embedded content. Used to dynamically embed content in the frontend from an external URL.\nAllowed media types: application/vnd.dialogporten.frontchannelembed+json;type=markdown", + "nullable": true, + "oneOf": [ + { + "$ref": "#/components/schemas/V1CommonContent_ContentValue" + } + ] } - ], - "summary": "Gets a list of dialog transmissions", - "tags": [ - "Enduser" - ] - } - }, - "/api/v1/enduser/dialogs/{dialogId}/transmissions/{transmissionId}": { - "get": { - "description": "Gets a single transmission belonging to a dialog. For more information see the documentation (link TBD).", - "operationId": "V1EndUserDialogTransmissionsGet_GetDialogTransmission", - "parameters": [ - { - "in": "path", - "name": "dialogId", - "required": true, - "schema": { - "format": "guid", - "type": "string" + } + }, + "V1EndUserDialogTransmissionsQueriesGet_Attachment": { + "type": "object", + "additionalProperties": false, + "properties": { + "id": { + "type": "string", + "description": "The unique identifier for the attachment in UUIDv7 format.", + "format": "guid" + }, + "displayName": { + "type": "array", + "description": "The display name of the attachment that should be used in GUIs.", + "nullable": true, + "items": { + "$ref": "#/components/schemas/V1CommonLocalizations_Localization" } }, - { - "in": "path", - "name": "transmissionId", - "required": true, - "schema": { - "format": "guid", - "type": "string" + "urls": { + "type": "array", + "description": "The URLs associated with the attachment, each referring to a different representation of the attachment.", + "nullable": true, + "items": { + "$ref": "#/components/schemas/V1EndUserDialogTransmissionsQueriesGet_AttachmentUrl" } } - ], - "responses": { - "200": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/V1EndUserDialogTransmissionsQueriesGet_Transmission" - } - } - }, - "description": "Successfully returned the dialog transmission." + } + }, + "V1EndUserDialogTransmissionsQueriesGet_AttachmentUrl": { + "type": "object", + "additionalProperties": false, + "properties": { + "id": { + "type": "string", + "description": "The unique identifier for the attachment URL in UUIDv7 format.", + "format": "guid" }, - "401": { - "description": "Missing or invalid authentication token. Requires a Maskinporten-token with the scope \u0022digdir:dialogporten\u0022." + "url": { + "type": "string", + "description": "The fully qualified URL of the attachment. Will be set to \"urn:dialogporten:unauthorized\" if the user is\nnot authorized to access the transmission.", + "format": "uri", + "example": "https://someendpoint.com/someattachment.pdf\nurn:dialogporten:unauthorized" }, - "403": { - "description": "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)." + "mediaType": { + "type": "string", + "description": "The media type of the attachment.", + "nullable": true, + "example": "application/pdf\napplication/zip" }, - "404": { - "content": { - "application/problem\u002Bjson": { - "schema": { - "$ref": "#/components/schemas/ProblemDetails" - } + "consumerType": { + "description": "The type of consumer the URL is intended for.", + "oneOf": [ + { + "$ref": "#/components/schemas/Attachments_AttachmentUrlConsumerType" } - }, - "description": "The given dialog ID was not found or was deleted, or the given transmission ID was not found." - } - }, - "security": [ - { - "JWTBearerAuth": [] + ] } - ], - "summary": "Gets a single dialog transmission", - "tags": [ - "Enduser" - ] - } - }, - "/api/v1/enduser/parties": { - "get": { - "description": "Gets the list of authorized parties for the end user. For more information see the documentation (link TBD).", - "operationId": "V1EndUserPartiesGet_GetParties", - "responses": { - "200": { - "content": { - "application/json": { - "schema": { - "items": { - "$ref": "#/components/schemas/V1EndUserPartiesQueriesGet_Parties" - }, - "type": "array" - } - } - }, - "description": "The list of authorized parties for the end user" - }, - "401": { - "description": "Unauthorized" + } + }, + "V1EndUserDialogSystemLabelsCommandsSet_SystemLabelCommand": { + "type": "object", + "additionalProperties": false, + "properties": { + "label": { + "$ref": "#/components/schemas/DialogEndUserContextsEntities_SystemLabel" }, - "403": { - "description": "Forbidden" - } - }, - "security": [ - { - "JWTBearerAuth": [] + "ifMatchDialogRevision": { + "type": "string", + "format": "guid", + "nullable": true } - ], - "summary": "Gets the list of authorized parties for the end user", - "tags": [ - "Enduser" - ] - } - }, - "/api/v1/serviceowner/dialogs": { - "get": { - "description": "Performs a search for dialogs, returning a paginated list of dialogs. For more information see the documentation (link TBD).\n\n* All date parameters must contain explicit time zone. Example: 2023-10-27T10:00:00Z or 2023-10-27T10:00:00\u002B01:00\n* See \u0022continuationToken\u0022 in the response for how to get the next page of results.\n* hasNextPage will be set to true if there are more items to get.", - "operationId": "V1ServiceOwnerDialogsSearch_SearchDialog", - "parameters": [ - { - "description": "Filter by one or more service resources", - "explode": true, - "in": "query", - "name": "serviceResource", - "schema": { - "items": { - "type": "string" - }, - "nullable": true, - "type": "array" - }, - "style": "form" - }, - { - "description": "Filter by one or more owning parties", - "explode": true, - "in": "query", - "name": "party", - "schema": { - "items": { - "type": "string" - }, - "nullable": true, - "type": "array" - }, - "style": "form" + } + }, + "V1EndUserDialogSeenLogsQueriesSearch_SeenLog": { + "type": "object", + "additionalProperties": false, + "properties": { + "id": { + "type": "string", + "format": "guid" }, - { - "description": "Filter by end user id", - "in": "query", - "name": "endUserId", - "schema": { - "nullable": true, - "type": "string" - } + "seenAt": { + "type": "string", + "format": "date-time" }, - { - "description": "Filter by one or more extended statuses", - "explode": true, - "in": "query", - "name": "extendedStatus", - "schema": { - "items": { - "type": "string" - }, - "nullable": true, - "type": "array" - }, - "style": "form" + "seenBy": { + "$ref": "#/components/schemas/V1EndUserCommonActors_Actor" }, - { - "description": "Filter by external reference", - "in": "query", - "name": "externalReference", - "schema": { - "nullable": true, - "type": "string" - } + "isViaServiceOwner": { + "type": "boolean" }, - { - "description": "Filter by status", - "explode": true, - "in": "query", - "name": "status", - "schema": { - "items": { - "$ref": "#/components/schemas/DialogsEntities_DialogStatus" - }, - "nullable": true, - "type": "array" - }, - "style": "form" + "isCurrentEndUser": { + "type": "boolean" + } + } + }, + "V1EndUserDialogSeenLogsQueriesGet_SeenLog": { + "type": "object", + "additionalProperties": false, + "properties": { + "id": { + "type": "string", + "format": "guid" }, - { - "description": "Only return dialogs created after this date", - "in": "query", - "name": "createdAfter", - "schema": { - "format": "date-time", - "nullable": true, - "type": "string" - } + "seenAt": { + "type": "string", + "format": "date-time" }, - { - "description": "Only return dialogs created before this date", - "in": "query", - "name": "createdBefore", - "schema": { - "format": "date-time", - "nullable": true, - "type": "string" - } + "seenBy": { + "$ref": "#/components/schemas/V1EndUserCommonActors_Actor" }, - { - "description": "Only return dialogs updated after this date", - "in": "query", - "name": "updatedAfter", - "schema": { - "format": "date-time", - "nullable": true, - "type": "string" - } + "isViaServiceOwner": { + "type": "boolean" }, - { - "description": "Only return dialogs updated before this date", - "in": "query", - "name": "updatedBefore", - "schema": { - "format": "date-time", - "nullable": true, - "type": "string" + "isCurrentEndUser": { + "type": "boolean" + } + } + }, + "PaginatedListOfV1EndUserDialogsQueriesSearch_Dialog": { + "type": "object", + "additionalProperties": false, + "properties": { + "items": { + "type": "array", + "description": "The paginated list of items", + "nullable": true, + "items": { + "$ref": "#/components/schemas/V1EndUserDialogsQueriesSearch_Dialog" } }, - { - "description": "Only return dialogs with due date after this date", - "in": "query", - "name": "dueAfter", - "schema": { - "format": "date-time", - "nullable": true, - "type": "string" - } + "hasNextPage": { + "type": "boolean", + "description": "Whether there are more items available that can be fetched by supplying the continuation token" }, - { - "description": "Only return dialogs with due date before this date", - "in": "query", - "name": "dueBefore", - "schema": { - "format": "date-time", - "nullable": true, - "type": "string" - } + "continuationToken": { + "type": "string", + "description": "The continuation token to be used to fetch the next page of items", + "nullable": true, + "example": "createdat_2024-07-31T09:09:03.0257090Z,id_0c089101-b7cf-a476-955c-f00a78d74a4e" }, - { - "description": "Only return dialogs with visible-from date after this date", - "in": "query", - "name": "visibleAfter", - "schema": { - "format": "date-time", - "nullable": true, - "type": "string" - } + "orderBy": { + "type": "string", + "description": "The current sorting order of the items", + "example": "createdat_desc,id_desc" + } + } + }, + "V1EndUserDialogsQueriesSearch_Dialog": { + "type": "object", + "additionalProperties": false, + "properties": { + "id": { + "type": "string", + "description": "The unique identifier for the dialog in UUIDv7 format.", + "format": "guid", + "example": "01913cd5-784f-7d3b-abef-4c77b1f0972d" }, - { - "description": "Only return dialogs with visible-from date before this date", - "in": "query", - "name": "visibleBefore", - "schema": { - "format": "date-time", - "nullable": true, - "type": "string" - } + "org": { + "type": "string", + "description": "The service owner code representing the organization (service owner) related to this dialog.", + "example": "ske" }, - { - "description": "Filter by process", - "in": "query", - "name": "process", - "schema": { - "nullable": true, - "type": "string" - } + "serviceResource": { + "type": "string", + "description": "The service identifier for the service that the dialog is related to in URN-format.\nThis corresponds to a service resource in the Altinn Resource Registry.", + "example": "urn:altinn:resource:some-service-identifier" }, - { - "description": "Filter by Display state", - "explode": true, - "in": "query", - "name": "systemLabel", - "schema": { - "items": { - "$ref": "#/components/schemas/DialogEndUserContextsEntities_SystemLabel" - }, - "nullable": true, - "type": "array" - }, - "style": "form" + "serviceResourceType": { + "type": "string", + "description": "The ServiceResource type, as defined in Altinn Resource Registry (see ResourceType)." }, - { - "description": "Search string for free text search. Will attempt to fuzzily match in all free text fields in the aggregate", - "in": "query", - "name": "search", - "schema": { - "nullable": true, - "type": "string" - } + "party": { + "type": "string", + "description": "The party code representing the organization or person that the dialog belongs to in URN format.", + "example": "urn:altinn:person:identifier-no:01125512345\nurn:altinn:organization:identifier-no:912345678" }, - { - "description": "Limit free text search to texts with this language code, e.g. \u0027nb\u0027, \u0027en\u0027. Culture codes will be normalized to neutral language codes (ISO 639). Default: search all culture codes", - "in": "query", - "name": "searchLanguageCode", - "schema": { - "nullable": true, - "type": "string" - } + "progress": { + "type": "integer", + "description": "Advisory indicator of progress, represented as 1-100 percentage value. 100% representing a dialog that has come\nto a natural completion (successful or not).", + "format": "int32", + "nullable": true }, - { - "in": "query", - "name": "orderBy", - "schema": { - "nullable": true, - "oneOf": [ - { - "$ref": "#/components/schemas/OrderSetOfTOrderDefinitionAndTTarget" - } - ] - } + "process": { + "type": "string", + "description": "Optional process identifier used to indicate a business process this dialog belongs to.", + "nullable": true }, - { - "description": "Supply \u0022continuationToken\u0022 for the response to get the next page of results, if hasNextPage is true", - "in": "query", - "name": "continuationToken", - "schema": { - "nullable": true, - "oneOf": [ - { - "$ref": "#/components/schemas/ContinuationTokenSetOfTOrderDefinitionAndTTarget" - } - ] - } + "precedingProcess": { + "type": "string", + "description": "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.", + "nullable": true }, - { - "description": "Limit the number of results per page (1-1000, default: 100)", - "in": "query", - "name": "limit", - "schema": { - "format": "int32", - "nullable": true, - "type": "integer" - } - } - ], - "responses": { - "200": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/PaginatedListOfV1ServiceOwnerDialogsQueriesSearch_Dialog" - } - } - }, - "description": "Successfully returned the dialog list." + "guiAttachmentCount": { + "type": "integer", + "description": "The number of attachments in the dialog made available for browser-based frontends.", + "format": "int32", + "nullable": true }, - "401": { - "description": "Missing or invalid authentication token. Requires a Maskinporten-token with the scope \u0022digdir:dialogporten.serviceprovider.search\u0022." - } - }, - "security": [ - { - "JWTBearerAuth": [] - } - ], - "summary": "Gets a list of dialogs", - "tags": [ - "Serviceowner" - ] - }, - "post": { - "description": "The dialog is created with the given configuration. For more information see the documentation (link TBD).\n\nFor detailed information on validation rules, see [the source for CreateDialogCommandValidator](https://github.com/altinn/dialogporten/blob/main/src/Digdir.Domain.Dialogporten.Application/Features/V1/ServiceOwner/Dialogs/Commands/Create/CreateDialogCommandValidator.cs)", - "operationId": "V1ServiceOwnerDialogsCreate_Dialog", - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/V1ServiceOwnerDialogsCommandsCreate_Dialog" - } - } + "extendedStatus": { + "type": "string", + "description": "Arbitrary string with a service-specific indicator of status, typically used to indicate a fine-grained state of\nthe dialog to further specify the \"status\" enum.\n \nRefer to the service-specific documentation provided by the service owner for details on the possible values (if\nin use).", + "nullable": true }, - "required": true, - "x-name": "dto" - }, - "responses": { - "201": { - "content": { - "application/json": { - "example": "018bb8e5-d9d0-7434-8ec5-569a6c8e01fc", - "schema": { - "type": "string" - } - } - }, - "description": "The UUID of the created dialog aggregate. A relative URL to the newly created activity is set in the \u0022Location\u0022 header.", - "headers": { - "Etag": { - "description": "The new UUID ETag of the dialog", - "example": "123e4567-e89b-12d3-a456-426614174000", - "schema": { - "type": "string" - } - } - } + "externalReference": { + "type": "string", + "description": "Arbitrary string with a service-specific reference to an external system or service.\n \nRefer to the service-specific documentation provided by the service owner for details (if in use).", + "nullable": true }, - "204": { - "description": "No Content" + "createdAt": { + "type": "string", + "description": "The date and time when the dialog was created.", + "format": "date-time", + "example": "2022-12-31T23:59:59Z" }, - "400": { - "content": { - "application/problem\u002Bjson": { - "schema": { - "$ref": "#/components/schemas/ProblemDetails" - } - } - }, - "description": "Validation error occured. See problem details for a list of errors." + "updatedAt": { + "type": "string", + "description": "The date and time when the dialog was last updated.", + "format": "date-time", + "example": "2022-12-31T23:59:59Z" }, - "401": { - "description": "Missing or invalid authentication token. Requires a Maskinporten-token with the scope \u0022digdir:dialogporten.serviceprovider\u0022." + "dueAt": { + "type": "string", + "description": "The due date for the dialog. This is the last date when the dialog is expected to be completed.", + "format": "date-time", + "nullable": true, + "example": "2022-12-31T23:59:59Z" }, - "403": { - "description": "Unauthorized to create a dialog for the given serviceResource (not owned by authenticated organization or has additional scope requirements defined in policy)." + "status": { + "description": "The aggregated status of the dialog.", + "oneOf": [ + { + "$ref": "#/components/schemas/DialogsEntities_DialogStatus" + } + ] }, - "422": { - "content": { - "application/problem\u002Bjson": { - "schema": { - "$ref": "#/components/schemas/ProblemDetails" - } + "systemLabel": { + "description": "Current display state.", + "oneOf": [ + { + "$ref": "#/components/schemas/DialogEndUserContextsEntities_SystemLabel" } - }, - "description": "Domain error occured. See problem details for a list of errors." - } - }, - "security": [ - { - "JWTBearerAuth": [] - } - ], - "summary": "Creates a new dialog", - "tags": [ - "Serviceowner" - ] - } - }, - "/api/v1/serviceowner/dialogs/{dialogId}": { - "delete": { - "description": "Deletes a given dialog (soft delete). For more information see the documentation (link TBD).\n\nNote 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.\nIf end users attempt to access the dialog via the details endpoint, they will get a 410 Gone response.\n\nOptimistic 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.", - "operationId": "V1ServiceOwnerDialogsDelete_Dialog", - "parameters": [ - { - "in": "path", - "name": "dialogId", - "required": true, - "schema": { - "format": "guid", - "type": "string" - } + ] }, - { - "in": "header", - "name": "if-Match", - "schema": { - "format": "guid", - "nullable": true, - "type": "string" - } - } - ], - "responses": { - "204": { - "description": "The dialog aggregate was deleted successfully.", - "headers": { - "Etag": { - "description": "The new UUID ETag of the dialog", - "example": "123e4567-e89b-12d3-a456-426614174000", - "schema": { - "type": "string" - } + "latestActivity": { + "description": "The latest entry in the dialog's activity log.", + "nullable": true, + "oneOf": [ + { + "$ref": "#/components/schemas/V1EndUserDialogsQueriesSearch_DialogActivity" } + ] + }, + "seenSinceLastUpdate": { + "type": "array", + "description": "The list of seen log entries for the dialog newer than the dialog ChangedAt date.", + "nullable": true, + "items": { + "$ref": "#/components/schemas/V1EndUserDialogsQueriesSearch_DialogSeenLog" } }, - "400": { - "content": { - "application/problem\u002Bjson": { - "schema": { - "$ref": "#/components/schemas/ProblemDetails" - } + "content": { + "description": "The content of the dialog in search results.", + "oneOf": [ + { + "$ref": "#/components/schemas/V1EndUserDialogsQueriesSearch_Content" } - }, - "description": "Validation error occured. See problem details for a list of errors." + ] + } + } + }, + "V1EndUserDialogsQueriesSearch_DialogActivity": { + "type": "object", + "additionalProperties": false, + "properties": { + "id": { + "type": "string", + "description": "The unique identifier for the activity in UUIDv7 format.", + "format": "guid" }, - "401": { - "description": "Missing or invalid authentication token. Requires a Maskinporten-token with the scope \u0022digdir:dialogporten.serviceprovider\u0022." + "createdAt": { + "type": "string", + "description": "The date and time when the activity was created.", + "format": "date-time", + "nullable": true }, - "403": { - "description": "Unauthorized to delete the supplied dialog (not owned by authenticated organization or has additional scope requirements defined in policy)." + "extendedType": { + "type": "string", + "description": "An arbitrary string with a service-specific activity type.\n \nConsult the service-specific documentation provided by the service owner for details (if in use).", + "format": "uri", + "nullable": true }, - "404": { - "content": { - "application/problem\u002Bjson": { - "schema": { - "$ref": "#/components/schemas/ProblemDetails" - } + "type": { + "description": "The type of activity.", + "oneOf": [ + { + "$ref": "#/components/schemas/DialogsEntitiesActivities_DialogActivityType" } - }, - "description": "The given dialog ID was not found or is already deleted." + ] }, - "410": { - "description": "Entity with the given key(s) is removed." + "transmissionId": { + "type": "string", + "description": "If the activity is related to a particular transmission, this field will contain the transmission identifier.", + "format": "guid", + "nullable": true }, - "412": { - "content": { - "application/problem\u002Bjson": { - "schema": { - "$ref": "#/components/schemas/ProblemDetails" - } + "performedBy": { + "description": "The actor that performed the activity.", + "oneOf": [ + { + "$ref": "#/components/schemas/V1EndUserCommonActors_Actor" } - }, - "description": "The supplied If-Match header did not match the current Revision value for the dialog. The request was not applied." - } - }, - "security": [ - { - "JWTBearerAuth": [] - } - ], - "summary": "Deletes a dialog", - "tags": [ - "Serviceowner" - ] - }, - "get": { - "description": "Gets a single dialog aggregate. For more information see the documentation (link TBD).\n\nNote that this operation may return deleted dialogs (see the field \u0060DeletedAt\u0060).", - "operationId": "V1ServiceOwnerDialogsGet_GetDialog", - "parameters": [ - { - "in": "path", - "name": "dialogId", - "required": true, - "schema": { - "format": "guid", - "type": "string" - } + ] }, - { - "description": "Filter by end user id", - "in": "query", - "name": "endUserId", - "schema": { - "nullable": true, - "type": "string" + "description": { + "type": "array", + "description": "Unstructured text describing the activity. Only set if the activity type is \"Information\".", + "nullable": true, + "items": { + "$ref": "#/components/schemas/V1CommonLocalizations_Localization" } } - ], - "responses": { - "200": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/V1ServiceOwnerDialogsQueriesGet_Dialog" - } - } - }, - "description": "Successfully returned the dialog aggregate." - }, - "401": { - "description": "Missing or invalid authentication token. Requires a Maskinporten-token with the scope \u0022digdir:dialogporten.serviceprovider\u0022." + } + }, + "V1EndUserDialogsQueriesSearch_DialogSeenLog": { + "type": "object", + "additionalProperties": false, + "properties": { + "id": { + "type": "string", + "description": "The unique identifier for the seen log entry in UUIDv7 format.", + "format": "guid" }, - "403": { - "description": "Unauthorized to get the supplied dialog (not owned by authenticated organization or has additional scope requirements defined in policy)." + "seenAt": { + "type": "string", + "description": "The timestamp when the dialog revision was seen.", + "format": "date-time" }, - "404": { - "content": { - "application/problem\u002Bjson": { - "schema": { - "$ref": "#/components/schemas/ProblemDetails" - } + "seenBy": { + "description": "The actor that saw the dialog revision.", + "oneOf": [ + { + "$ref": "#/components/schemas/V1EndUserCommonActors_Actor" } - }, - "description": "The given dialog ID was not found or is already deleted." - } - }, - "security": [ - { - "JWTBearerAuth": [] + ] + }, + "isViaServiceOwner": { + "type": "boolean", + "description": "Flag indicating whether the seen log entry was created via the service owner.\n \nThis is used when the service owner uses the service owner API to implement its own frontend.", + "nullable": true + }, + "isCurrentEndUser": { + "type": "boolean", + "description": "Flag indicating whether the seen log entry was created by the current end user." } - ], - "summary": "Gets a single dialog", - "tags": [ - "Serviceowner" - ] + } }, - "patch": { - "description": "Patches a dialog aggregate with a RFC6902 JSON Patch document. The patch document must be a JSON array of RFC6902 operations.\nSee [https://tools.ietf.org/html/rfc6902](https://tools.ietf.org/html/rfc6902) for more information.\n \nOptimistic 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.", - "operationId": "V1ServiceOwnerDialogsPatchDialog", - "parameters": [ - { - "in": "path", - "name": "dialogId", - "required": true, - "schema": { - "format": "guid", - "type": "string" - }, - "x-position": 1 + "V1EndUserDialogsQueriesSearch_Content": { + "type": "object", + "additionalProperties": false, + "properties": { + "title": { + "description": "The title of the dialog.", + "oneOf": [ + { + "$ref": "#/components/schemas/V1CommonContent_ContentValue" + } + ] }, - { - "in": "header", - "name": "If-Match", - "schema": { - "format": "guid", - "nullable": true, - "type": "string" - }, - "x-originalName": "etag", - "x-position": 2 - } - ], - "requestBody": { - "content": { - "application/json": { - "schema": { - "items": { - "$ref": "#/components/schemas/JsonPatchOperations_Operation" - }, - "type": "array" + "summary": { + "description": "A short summary of the dialog and its current state.", + "oneOf": [ + { + "$ref": "#/components/schemas/V1CommonContent_ContentValue" } - } + ] }, - "required": true, - "x-name": "patchDocument", - "x-position": 3 - }, - "responses": { - "204": { - "description": "Patch was successfully applied.", - "headers": { - "Etag": { - "description": "The new UUID ETag of the dialog", - "example": "123e4567-e89b-12d3-a456-426614174000", - "schema": { - "type": "string" - } + "senderName": { + "description": "Overridden sender name. If not supplied, assume \"org\" as the sender name.", + "nullable": true, + "oneOf": [ + { + "$ref": "#/components/schemas/V1CommonContent_ContentValue" } - } + ] }, - "400": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ProblemDetails" - } + "extendedStatus": { + "description": "Used as the human-readable label used to describe the \"ExtendedStatus\" field.", + "nullable": true, + "oneOf": [ + { + "$ref": "#/components/schemas/V1CommonContent_ContentValue" } - }, - "description": "Validation error occured. See problem details for a list of errors." + ] + } + } + }, + "V1EndUserDialogsQueriesGet_Dialog": { + "type": "object", + "additionalProperties": false, + "properties": { + "id": { + "type": "string", + "description": "The unique identifier for the dialog in UUIDv7 format.", + "format": "guid", + "example": "01913cd5-784f-7d3b-abef-4c77b1f0972d" }, - "401": { - "description": "Missing or invalid authentication token. Requires a Maskinporten-token with the scope \\\u0022digdir:dialogporten.serviceprovider\\\u0022" + "revision": { + "type": "string", + "description": "The unique identifier for the revision in UUIDv4 format.", + "format": "guid", + "example": "a312cb9c-7632-43c2-aa38-69b06aed56ca" }, - "403": { - "description": "Unauthorized to update a dialog for the given serviceResource (not owned by authenticated organization or has additional scope requirements defined in policy)" + "org": { + "type": "string", + "description": "The service owner code representing the organization (service owner) related to this dialog.", + "example": "ske" }, - "404": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ProblemDetails" - } - } - }, - "description": "The given dialog ID was not found or is deleted" + "serviceResource": { + "type": "string", + "description": "The service identifier for the service that the dialog is related to in URN-format.\nThis corresponds to a service resource in the Altinn Resource Registry.", + "example": "urn:altinn:resource:some-service-identifier" }, - "412": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ProblemDetails" - } + "serviceResourceType": { + "type": "string", + "description": "The ServiceResource type, as defined in Altinn Resource Registry (see ResourceType)." + }, + "party": { + "type": "string", + "description": "The party code representing the organization or person that the dialog belongs to in URN format.", + "example": "urn:altinn:person:identifier-no:01125512345\nurn:altinn:organization:identifier-no:912345678" + }, + "progress": { + "type": "integer", + "description": "Advisory indicator of progress, represented as 1-100 percentage value. 100% representing a dialog that has come\nto a natural completion (successful or not).", + "format": "int32", + "nullable": true + }, + "process": { + "type": "string", + "description": "Optional process identifier used to indicate a business process this dialog belongs to.", + "nullable": true + }, + "precedingProcess": { + "type": "string", + "description": "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.", + "nullable": true + }, + "extendedStatus": { + "type": "string", + "description": "Arbitrary string with a service-specific indicator of status, typically used to indicate a fine-grained state of\nthe dialog to further specify the \"status\" enum.\n \nRefer to the service-specific documentation provided by the service owner for details on the possible values (if\nin use).", + "nullable": true + }, + "externalReference": { + "type": "string", + "description": "Arbitrary string with a service-specific reference to an external system or service.\n \nRefer to the service-specific documentation provided by the service owner for details (if in use).", + "nullable": true + }, + "dueAt": { + "type": "string", + "description": "The due date for the dialog. Dialogs past due date might be marked as such in frontends but will still be available.", + "format": "date-time", + "nullable": true, + "example": "2022-12-31T23:59:59Z" + }, + "expiresAt": { + "type": "string", + "description": "The expiration date for the dialog. This is the last date when the dialog is available for the end user.\n \nAfter this date is passed, the dialog will be considered expired and no longer available for the end user in any\nAPI. If not supplied, the dialog will be considered to never expire. This field can be changed by the service\nowner after the dialog has been created.", + "format": "date-time", + "nullable": true, + "example": "2022-12-31T23:59:59Z" + }, + "createdAt": { + "type": "string", + "description": "The date and time when the dialog was created.", + "format": "date-time", + "example": "2022-12-31T23:59:59Z" + }, + "updatedAt": { + "type": "string", + "description": "The date and time when the dialog was last updated.", + "format": "date-time", + "example": "2022-12-31T23:59:59Z" + }, + "status": { + "description": "The aggregated status of the dialog.", + "oneOf": [ + { + "$ref": "#/components/schemas/DialogsEntities_DialogStatus" } - }, - "description": "The supplied Revision does not match the current Revision of the dialog" + ] }, - "422": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ProblemDetails" - } + "systemLabel": { + "description": "Current display state.", + "oneOf": [ + { + "$ref": "#/components/schemas/DialogEndUserContextsEntities_SystemLabel" } - }, - "description": "Domain error occured. See problem details for a list of errors." - } - }, - "security": [ - { - "JWTBearerAuth": [] - } - ], - "summary": "Patch a single dialog", - "tags": [ - "Serviceowner" - ] - }, - "put": { - "description": "Replaces a given dialog with the supplied model. For more information see the documentation (link TBD).\n\nOptimistic 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.", - "operationId": "V1ServiceOwnerDialogsUpdate_Dialog", - "parameters": [ - { - "in": "path", - "name": "dialogId", - "required": true, - "schema": { - "format": "guid", - "type": "string" - } + ] }, - { - "in": "header", - "name": "if-Match", - "schema": { - "format": "guid", - "nullable": true, - "type": "string" - } - } - ], - "requestBody": { "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/V1ServiceOwnerDialogsCommandsUpdate_Dialog" + "description": "The dialog unstructured text content.", + "oneOf": [ + { + "$ref": "#/components/schemas/V1EndUserDialogsQueriesGet_Content" } + ] + }, + "dialogToken": { + "type": "string", + "description": "The dialog token. May be used (if supported) against external URLs referred to in this dialog's apiActions,\ntransmissions or attachments. It should also be used for front-channel embeds.", + "nullable": true + }, + "attachments": { + "type": "array", + "description": "The attachments associated with the dialog (on an aggregate level).", + "nullable": true, + "items": { + "$ref": "#/components/schemas/V1EndUserDialogsQueriesGet_DialogAttachment" } }, - "required": true, - "x-name": "dto" - }, - "responses": { - "204": { - "description": "The dialog aggregate was updated successfully.", - "headers": { - "Etag": { - "description": "The new UUID ETag of the dialog", - "example": "123e4567-e89b-12d3-a456-426614174000", - "schema": { - "type": "string" - } - } + "transmissions": { + "type": "array", + "description": "The immutable list of transmissions associated with the dialog.", + "nullable": true, + "items": { + "$ref": "#/components/schemas/V1EndUserDialogsQueriesGet_DialogTransmission" } }, - "400": { - "content": { - "application/problem\u002Bjson": { - "schema": { - "$ref": "#/components/schemas/ProblemDetails" - } - } - }, - "description": "Validation error occured. See problem details for a list of errors." + "guiActions": { + "type": "array", + "description": "The GUI actions associated with the dialog. Should be used in browser-based interactive frontends.", + "nullable": true, + "items": { + "$ref": "#/components/schemas/V1EndUserDialogsQueriesGet_DialogGuiAction" + } }, - "401": { - "description": "Missing or invalid authentication token. Requires a Maskinporten-token with the scope \u0022digdir:dialogporten.serviceprovider\u0022." + "apiActions": { + "type": "array", + "description": "The API actions associated with the dialog. Should be used in specialized, non-browser-based integrations.", + "nullable": true, + "items": { + "$ref": "#/components/schemas/V1EndUserDialogsQueriesGet_DialogApiAction" + } }, - "403": { - "description": "Unauthorized to update the supplied dialog (not owned by authenticated organization or has additional scope requirements defined in policy)." + "activities": { + "type": "array", + "description": "An immutable list of activities associated with the dialog.", + "nullable": true, + "items": { + "$ref": "#/components/schemas/V1EndUserDialogsQueriesGet_DialogActivity" + } }, - "404": { - "content": { - "application/problem\u002Bjson": { - "schema": { - "$ref": "#/components/schemas/ProblemDetails" - } + "seenSinceLastUpdate": { + "type": "array", + "description": "The list of seen log entries for the dialog newer than the dialog ChangedAt date.", + "nullable": true, + "items": { + "$ref": "#/components/schemas/V1EndUserDialogsQueriesGet_DialogSeenLog" + } + } + } + }, + "V1EndUserDialogsQueriesGet_Content": { + "type": "object", + "additionalProperties": false, + "properties": { + "title": { + "description": "The title of the dialog.", + "oneOf": [ + { + "$ref": "#/components/schemas/V1CommonContent_ContentValue" + } + ] + }, + "summary": { + "description": "A short summary of the dialog and its current state.", + "oneOf": [ + { + "$ref": "#/components/schemas/V1CommonContent_ContentValue" } - }, - "description": "The given dialog ID was not found or is already deleted." + ] }, - "410": { - "description": "Entity with the given key(s) is removed." + "senderName": { + "description": "Overridden sender name. If not supplied, assume \"org\" as the sender name.", + "nullable": true, + "oneOf": [ + { + "$ref": "#/components/schemas/V1CommonContent_ContentValue" + } + ] }, - "412": { - "content": { - "application/problem\u002Bjson": { - "schema": { - "$ref": "#/components/schemas/ProblemDetails" - } + "additionalInfo": { + "description": "Additional information about the dialog, this may contain Markdown.", + "nullable": true, + "oneOf": [ + { + "$ref": "#/components/schemas/V1CommonContent_ContentValue" } - }, - "description": "The supplied If-Match header did not match the current Revision value for the dialog. The request was not applied." + ] }, - "422": { - "content": { - "application/problem\u002Bjson": { - "schema": { - "$ref": "#/components/schemas/ProblemDetails" - } + "extendedStatus": { + "description": "Used as the human-readable label used to describe the \"ExtendedStatus\" field.", + "nullable": true, + "oneOf": [ + { + "$ref": "#/components/schemas/V1CommonContent_ContentValue" } - }, - "description": "Domain error occured. See problem details for a list of errors." - } - }, - "security": [ - { - "JWTBearerAuth": [] + ] + }, + "mainContentReference": { + "description": "Front-channel embedded content. Used to dynamically embed content in the frontend from an external URL.", + "nullable": true, + "oneOf": [ + { + "$ref": "#/components/schemas/V1CommonContent_ContentValue" + } + ] } - ], - "summary": "Replaces a dialog", - "tags": [ - "Serviceowner" - ] - } - }, - "/api/v1/serviceowner/dialogs/{dialogId}/actions/purge": { - "post": { - "description": "Deletes a given dialog (hard delete). For more information see the documentation (link TBD).\n\nOptimistic 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.", - "operationId": "V1ServiceOwnerDialogsPurge_PurgeDialog", - "parameters": [ - { - "in": "path", - "name": "dialogId", - "required": true, - "schema": { - "format": "guid", - "type": "string" + } + }, + "V1EndUserDialogsQueriesGet_DialogAttachment": { + "type": "object", + "additionalProperties": false, + "properties": { + "id": { + "type": "string", + "description": "The unique identifier for the attachment in UUIDv7 format.", + "format": "guid" + }, + "displayName": { + "type": "array", + "description": "The display name of the attachment that should be used in GUIs.", + "nullable": true, + "items": { + "$ref": "#/components/schemas/V1CommonLocalizations_Localization" } }, - { - "in": "header", - "name": "if-Match", - "schema": { - "format": "guid", - "nullable": true, - "type": "string" + "urls": { + "type": "array", + "description": "The URLs associated with the attachment, each referring to a different representation of the attachment.", + "nullable": true, + "items": { + "$ref": "#/components/schemas/V1EndUserDialogsQueriesGet_DialogAttachmentUrl" } } - ], - "responses": { - "204": { - "description": "The dialog aggregate was deleted successfully." - }, - "401": { - "description": "Missing or invalid authentication token. Requires a Maskinporten-token with the scope \u0022digdir:dialogporten.serviceprovider\u0022." + } + }, + "V1EndUserDialogsQueriesGet_DialogAttachmentUrl": { + "type": "object", + "additionalProperties": false, + "properties": { + "id": { + "type": "string", + "description": "The unique identifier for the attachment URL in UUIDv7 format.", + "format": "guid" }, - "403": { - "description": "Unauthorized to delete the supplied dialog (not owned by authenticated organization or has additional scope requirements defined in policy)." + "url": { + "type": "string", + "description": "The fully qualified URL of the attachment.", + "format": "uri", + "example": "https://someendpoint.com/someattachment.pdf" }, - "404": { - "content": { - "application/problem\u002Bjson": { - "schema": { - "$ref": "#/components/schemas/ProblemDetails" - } - } - }, - "description": "The given dialog ID was not found or is already deleted." + "mediaType": { + "type": "string", + "description": "The media type of the attachment.", + "nullable": true, + "example": "application/pdf\napplication/zip" }, - "412": { - "content": { - "application/problem\u002Bjson": { - "schema": { - "$ref": "#/components/schemas/ProblemDetails" - } + "consumerType": { + "description": "What type of consumer the URL is intended for.", + "oneOf": [ + { + "$ref": "#/components/schemas/Attachments_AttachmentUrlConsumerType" } - }, - "description": "The supplied If-Match header did not match the current Revision value for the dialog. The request was not applied." - } - }, - "security": [ - { - "JWTBearerAuth": [] + ] } - ], - "summary": "Permanently deletes a dialog", - "tags": [ - "Serviceowner" - ] - } - }, - "/api/v1/serviceowner/dialogs/{dialogId}/actions/should-send-notification": { - "get": { - "description": "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.", - "operationId": "V1ServiceOwnerDialogActivitiesNotificationCondition_NotificationCondition", - "parameters": [ - { - "in": "path", - "name": "dialogId", - "required": true, - "schema": { - "format": "guid", - "type": "string" - } + } + }, + "V1EndUserDialogsQueriesGet_DialogTransmission": { + "type": "object", + "additionalProperties": false, + "properties": { + "id": { + "type": "string", + "description": "The unique identifier for the transmission in UUIDv7 format.", + "format": "guid" }, - { - "in": "query", - "name": "conditionType", - "required": true, - "schema": { - "allOf": [ - { - "$ref": "#/components/schemas/V1ServiceOwnerDialogActivitiesQueriesNotificationCondition_NotificationConditionType" - } - ] - } + "createdAt": { + "type": "string", + "description": "The date and time when the transmission was created.", + "format": "date-time" }, - { - "in": "query", - "name": "activityType", - "required": true, - "schema": { - "allOf": [ - { - "$ref": "#/components/schemas/DialogsEntitiesActivities_DialogActivityType" - } - ] - } + "authorizationAttribute": { + "type": "string", + "description": "Contains an authorization resource attributeId, that can used in custom authorization rules in the XACML service\npolicy, which by default is the policy belonging to the service referred to by \"serviceResource\" in the dialog.\n \nCan also be used to refer to other service policies.", + "nullable": true, + "example": "mycustomresource\n/* equivalent to the above */\nurn:altinn:subresource:mycustomresource\nurn:altinn:task:Task_1\n/* refer to another service */\nurn:altinn:resource:some-other-service-identifier" }, - { - "in": "query", - "name": "transmissionId", - "schema": { - "format": "guid", - "nullable": true, - "type": "string" - } - } - ], - "responses": { - "200": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/V1ServiceOwnerDialogActivitiesQueriesNotificationCondition_NotificationCondition" - } - } - }, - "description": "Successfully returned the notification determination." + "isAuthorized": { + "type": "boolean", + "description": "Flag indicating if the authenticated user is authorized for this transmission. If not, embedded content and\nthe attachments will not be available." }, - "401": { - "description": "Missing or invalid authentication token. Requires a Maskinporten-token with the scope \u0022altinn:system/notifications.condition.check\u0022." + "extendedType": { + "type": "string", + "description": "Arbitrary URI/URN describing a service-specific transmission type.\n \nRefer to the service-specific documentation provided by the service owner for details (if in use).", + "format": "uri", + "nullable": true }, - "403": { - "description": "Forbidden" - } - }, - "security": [ - { - "JWTBearerAuth": [] - } - ], - "summary": "Returns a boolean value based on conditions used to determine if a notification is to be sent", - "tags": [ - "Serviceowner" - ] - } - }, - "/api/v1/serviceowner/dialogs/{dialogId}/activities": { - "get": { - "description": "Gets the list of activities belonging to a dialog", - "operationId": "V1ServiceOwnerDialogActivitiesSearch_SearchDialogActivity", - "parameters": [ - { - "in": "path", - "name": "dialogId", - "required": true, - "schema": { - "format": "guid", - "type": "string" - } - } - ], - "responses": { - "200": { - "content": { - "application/json": { - "schema": { - "items": { - "$ref": "#/components/schemas/V1ServiceOwnerDialogActivitiesQueriesSearch_Activity" - }, - "type": "array" - } + "relatedTransmissionId": { + "type": "string", + "description": "Reference to any other transmission that this transmission is related to.", + "format": "guid", + "nullable": true + }, + "type": { + "description": "The type of transmission.", + "oneOf": [ + { + "$ref": "#/components/schemas/DialogsEntitiesTransmissions_DialogTransmissionType" } - }, - "description": "Successfully returned the dialog activity list." + ] }, - "401": { - "description": "Missing or invalid authentication token. Requires a Maskinporten-token with the scope \u0022digdir:dialogporten.serviceprovider\u0022." + "sender": { + "description": "The actor that sent the transmission.", + "oneOf": [ + { + "$ref": "#/components/schemas/V1EndUserCommonActors_Actor" + } + ] }, - "403": { - "description": "Unauthorized to get the supplied dialog (not owned by authenticated organization or has additional scope requirements defined in policy)." - } - }, - "security": [ - { - "JWTBearerAuth": [] - } - ], - "summary": "Gets a list of dialog activities", - "tags": [ - "Serviceowner" - ] - }, - "post": { - "description": "The activity is created with the given configuration. For more information see the documentation (link TBD).\n\nOptimistic 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.", - "operationId": "V1ServiceOwnerDialogActivitiesCreate_DialogActivity", - "parameters": [ - { - "in": "path", - "name": "dialogId", - "required": true, - "schema": { - "format": "guid", - "type": "string" - } + "content": { + "description": "The transmission unstructured text content.", + "oneOf": [ + { + "$ref": "#/components/schemas/V1EndUserDialogsQueriesGet_DialogTransmissionContent" + } + ] }, - { - "in": "header", - "name": "if-Match", - "schema": { - "format": "guid", - "nullable": true, - "type": "string" + "attachments": { + "type": "array", + "description": "The transmission-level attachments.", + "nullable": true, + "items": { + "$ref": "#/components/schemas/V1EndUserDialogsQueriesGet_DialogTransmissionAttachment" } } - ], - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/V1ServiceOwnerDialogActivitiesCreate_ActivityRequest" + } + }, + "V1EndUserDialogsQueriesGet_DialogTransmissionContent": { + "type": "object", + "additionalProperties": false, + "properties": { + "title": { + "description": "The transmission title.", + "oneOf": [ + { + "$ref": "#/components/schemas/V1CommonContent_ContentValue" } - } + ] }, - "description": "", - "required": true, - "x-name": "CreateActivityRequest", - "x-position": 1 - }, - "responses": { - "201": { - "content": { - "application/json": { - "example": "018bb8e5-d9d0-7434-8ec5-569a6c8e01fc", - "schema": { - "type": "string" - } + "summary": { + "description": "The transmission summary.", + "oneOf": [ + { + "$ref": "#/components/schemas/V1CommonContent_ContentValue" } - }, - "description": "The UUID of the created dialog activity. A relative URL to the newly created activity is set in the \u0022Location\u0022 header.", - "headers": { - "Etag": { - "description": "The new UUID ETag of the dialog", - "example": "123e4567-e89b-12d3-a456-426614174000", - "schema": { - "type": "string" - } + ] + }, + "contentReference": { + "description": "Front-channel embedded content. Used to dynamically embed content in the frontend from an external URL.\nAllowed media types: application/vnd.dialogporten.frontchannelembed+json;type=markdown", + "nullable": true, + "oneOf": [ + { + "$ref": "#/components/schemas/V1CommonContent_ContentValue" } + ] + } + } + }, + "V1EndUserDialogsQueriesGet_DialogTransmissionAttachment": { + "type": "object", + "additionalProperties": false, + "properties": { + "id": { + "type": "string", + "description": "The unique identifier for the attachment in UUIDv7 format.", + "format": "guid" + }, + "displayName": { + "type": "array", + "description": "The display name of the attachment that should be used in GUIs.", + "nullable": true, + "items": { + "$ref": "#/components/schemas/V1CommonLocalizations_Localization" } }, - "204": { - "description": "No Content" + "urls": { + "type": "array", + "description": "The URLs associated with the attachment, each referring to a different representation of the attachment.", + "nullable": true, + "items": { + "$ref": "#/components/schemas/V1EndUserDialogsQueriesGet_DialogTransmissionAttachmentUrl" + } + } + } + }, + "V1EndUserDialogsQueriesGet_DialogTransmissionAttachmentUrl": { + "type": "object", + "additionalProperties": false, + "properties": { + "url": { + "type": "string", + "description": "The fully qualified URL of the attachment. Will be set to \"urn:dialogporten:unauthorized\" if the user is\nnot authorized to access the transmission.", + "format": "uri", + "example": "https://someendpoint.com/someattachment.pdf\nurn:dialogporten:unauthorized" }, - "400": { - "content": { - "application/problem\u002Bjson": { - "schema": { - "$ref": "#/components/schemas/ProblemDetails" - } + "mediaType": { + "type": "string", + "description": "The media type of the attachment.", + "nullable": true, + "example": "application/pdf\napplication/zip" + }, + "consumerType": { + "description": "The type of consumer the URL is intended for.", + "oneOf": [ + { + "$ref": "#/components/schemas/Attachments_AttachmentUrlConsumerType" } - }, - "description": "Validation error occured. See problem details for a list of errors." + ] + } + } + }, + "V1EndUserDialogsQueriesGet_DialogGuiAction": { + "type": "object", + "additionalProperties": false, + "properties": { + "id": { + "type": "string", + "description": "The unique identifier for the action in UUIDv7 format.", + "format": "guid" }, - "401": { - "description": "Missing or invalid authentication token. Requires a Maskinporten-token with the scope \u0022digdir:dialogporten.serviceprovider\u0022." + "action": { + "type": "string", + "description": "The action identifier for the action, corresponding to the \"action\" attributeId used in the XACML service policy." }, - "403": { - "description": "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)." + "url": { + "type": "string", + "description": "The fully qualified URL of the action, to which the user will be redirected when the action is triggered. Will be set to\n\"urn:dialogporten:unauthorized\" if the user is not authorized to perform the action.", + "format": "uri", + "example": "urn:dialogporten:unauthorized\nhttps://someendpoint.com/gui/some-service-instance-id" }, - "404": { - "content": { - "application/problem\u002Bjson": { - "schema": { - "$ref": "#/components/schemas/ProblemDetails" - } - } - }, - "description": "The given dialog ID was not found or is already deleted." + "authorizationAttribute": { + "type": "string", + "description": "Contains an authorization resource attributeId, that can used in custom authorization rules in the XACML service\npolicy, which by default is the policy belonging to the service referred to by \"serviceResource\" in the dialog.\n \nCan also be used to refer to other service policies.", + "nullable": true, + "example": "mycustomresource\n/* equivalent to the above */\nurn:altinn:subresource:mycustomresource\nurn:altinn:task:Task_1\n/* refer to another service */\nurn:altinn:resource:some-other-service-identifier" }, - "410": { - "description": "Entity with the given key(s) is removed." + "isAuthorized": { + "type": "boolean", + "description": "Whether the user is authorized to perform the action." }, - "412": { - "content": { - "application/problem\u002Bjson": { - "schema": { - "$ref": "#/components/schemas/ProblemDetails" - } + "isDeleteDialogAction": { + "type": "boolean", + "description": "Indicates whether the action results in the dialog being deleted. Used by frontends to implement custom UX\nfor delete actions." + }, + "priority": { + "description": "Indicates a priority for the action, making it possible for frontends to adapt GUI elements based on action\npriority.", + "oneOf": [ + { + "$ref": "#/components/schemas/DialogsEntitiesActions_DialogGuiActionPriority" } - }, - "description": "The supplied If-Match header did not match the current Revision value for the dialog. The request was not applied." + ] }, - "422": { - "content": { - "application/problem\u002Bjson": { - "schema": { - "$ref": "#/components/schemas/ProblemDetails" - } + "httpMethod": { + "description": "The HTTP method that the frontend should use when redirecting the user.", + "oneOf": [ + { + "$ref": "#/components/schemas/Http_HttpVerb" } - }, - "description": "Domain error occured. See problem details for a list of errors." - } - }, - "security": [ - { - "JWTBearerAuth": [] - } - ], - "summary": "Adds a activity to a dialogs activity history", - "tags": [ - "Serviceowner" - ] - } - }, - "/api/v1/serviceowner/dialogs/{dialogId}/activities/{activityId}": { - "get": { - "description": "Gets a single activity belonging to a dialog. For more information see the documentation (link TBD).", - "operationId": "V1ServiceOwnerDialogActivitiesGet_GetDialogActivity", - "parameters": [ - { - "in": "path", - "name": "dialogId", - "required": true, - "schema": { - "format": "guid", - "type": "string" + ] + }, + "title": { + "type": "array", + "description": "The title of the action, this should be short and in verb form.", + "nullable": true, + "items": { + "$ref": "#/components/schemas/V1CommonLocalizations_Localization" } }, - { - "in": "path", - "name": "activityId", - "required": true, - "schema": { - "format": "guid", - "type": "string" + "prompt": { + "type": "array", + "description": "If there should be a prompt asking the user for confirmation before the action is executed,\nthis field should contain the prompt text.", + "nullable": true, + "items": { + "$ref": "#/components/schemas/V1CommonLocalizations_Localization" } } - ], - "responses": { - "200": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/V1ServiceOwnerDialogActivitiesQueriesGet_Activity" - } - } - }, - "description": "Successfully returned the dialog activity." + } + }, + "V1EndUserDialogsQueriesGet_DialogApiAction": { + "type": "object", + "additionalProperties": false, + "properties": { + "id": { + "type": "string", + "description": "The unique identifier for the action in UUIDv7 format.", + "format": "guid" }, - "401": { - "description": "Missing or invalid authentication token. Requires a Maskinporten-token with the scope \u0022digdir:dialogporten.serviceprovider\u0022." + "action": { + "type": "string", + "description": "String identifier for the action, corresponding to the \"action\" attributeId used in the XACML service policy,\nwhich by default is the policy belonging to the service referred to by \"serviceResource\" in the dialog.", + "example": "write" }, - "403": { - "description": "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)." + "authorizationAttribute": { + "type": "string", + "description": "Contains an authorization resource attributeId, that can used in custom authorization rules in the XACML service\npolicy, which by default is the policy belonging to the service referred to by \"serviceResource\" in the dialog.\n \nCan also be used to refer to other service policies.", + "nullable": true, + "example": "mycustomresource\n/* equivalent to the above */\nurn:altinn:subresource:mycustomresource\nurn:altinn:task:Task_1\n/* refer to another service */\nurn:altinn:resource:some-other-service-identifier" }, - "404": { - "content": { - "application/problem\u002Bjson": { - "schema": { - "$ref": "#/components/schemas/ProblemDetails" - } - } - }, - "description": "The given dialog ID was not found or was deleted, or the given activity ID was not found." + "isAuthorized": { + "type": "boolean", + "description": "True if the authenticated user is authorized for this action. If not, the action will not be available\nand all endpoints will be replaced with a fixed placeholder." }, - "410": { - "description": "Entity with the given key(s) is removed." - } - }, - "security": [ - { - "JWTBearerAuth": [] - } - ], - "summary": "Gets a single dialog activity", - "tags": [ - "Serviceowner" - ] - } - }, - "/api/v1/serviceowner/dialogs/{dialogId}/seenlog": { - "get": { - "description": "Gets all seen log records for a dialog. For more information see the documentation (link TBD).", - "operationId": "V1ServiceOwnerDialogSeenLogsSearch_SearchDialogSeenLog", - "parameters": [ - { - "in": "path", - "name": "dialogId", - "required": true, - "schema": { - "format": "guid", - "type": "string" + "endpoints": { + "type": "array", + "description": "The endpoints associated with the action.", + "nullable": true, + "items": { + "$ref": "#/components/schemas/V1EndUserDialogsQueriesGet_DialogApiActionEndpoint" } } - ], - "responses": { - "200": { - "content": { - "application/json": { - "schema": { - "items": { - "$ref": "#/components/schemas/V1ServiceOwnerDialogSeenLogsQueriesSearch_SeenLog" - }, - "type": "array" - } - } - }, - "description": "Successfully returned the dialog seen log records." + } + }, + "V1EndUserDialogsQueriesGet_DialogApiActionEndpoint": { + "type": "object", + "additionalProperties": false, + "properties": { + "id": { + "type": "string", + "description": "The unique identifier for the endpoint in UUIDv7 format.", + "format": "guid" }, - "401": { - "description": "Unauthorized" + "version": { + "type": "string", + "description": "Arbitrary string indicating the version of the endpoint.\n \nConsult the service-specific documentation provided by the service owner for details (if in use).", + "nullable": true }, - "403": { - "description": "Forbidden" + "url": { + "type": "string", + "description": "The fully qualified URL of the API endpoint. Will be set to \"urn:dialogporten:unauthorized\" if the user is\nnot authorized to perform the action.", + "format": "uri", + "example": "https://someendpoint.com/api/v1/someaction\nurn:dialogporten:unauthorized" }, - "404": { - "content": { - "application/problem\u002Bjson": { - "schema": { - "$ref": "#/components/schemas/ProblemDetails" - } + "httpMethod": { + "description": "The HTTP method that the endpoint expects for this action.", + "oneOf": [ + { + "$ref": "#/components/schemas/Http_HttpVerb" } - }, - "description": "The given dialog ID was not found or is already deleted." + ] }, - "410": { - "description": "Entity with the given key(s) is removed." - } - }, - "security": [ - { - "JWTBearerAuth": [] - } - ], - "summary": "Gets all seen log records for a dialog", - "tags": [ - "Serviceowner" - ] - } - }, - "/api/v1/serviceowner/dialogs/{dialogId}/seenlog/{seenLogId}": { - "get": { - "description": "Gets a single dialog seen log record. For more information see the documentation (link TBD).", - "operationId": "V1ServiceOwnerDialogSeenLogsGet_GetDialogSeenLog", - "parameters": [ - { - "in": "path", - "name": "dialogId", - "required": true, - "schema": { - "format": "guid", - "type": "string" - } + "documentationUrl": { + "type": "string", + "description": "Link to service provider documentation for the endpoint. Used for service owners to provide documentation for\nintegrators. Should be a URL to a human-readable page.", + "format": "uri", + "nullable": true }, - { - "in": "path", - "name": "seenLogId", - "required": true, - "schema": { - "format": "guid", - "type": "string" - } + "requestSchema": { + "type": "string", + "description": "Link to the request schema for the endpoint. Used by service owners to provide documentation for integrators.\nDialogporten will not validate information on this endpoint.", + "format": "uri", + "nullable": true + }, + "responseSchema": { + "type": "string", + "description": "Link to the response schema for the endpoint. Used for service owners to provide documentation for integrators.\nDialogporten will not validate information on this endpoint.", + "format": "uri", + "nullable": true + }, + "deprecated": { + "type": "boolean", + "description": "Boolean indicating if the endpoint is deprecated. Integrators should migrate to endpoints with a higher version." + }, + "sunsetAt": { + "type": "string", + "description": "Date and time when the service owner has indicated that endpoint will no longer function. Only set if the endpoint\nis deprecated. Dialogporten will not enforce this date.", + "format": "date-time", + "nullable": true } - ], - "responses": { - "200": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/V1ServiceOwnerDialogSeenLogsQueriesGet_SeenLog" - } - } - }, - "description": "Successfully returned the dialog seen log record." + } + }, + "V1EndUserDialogsQueriesGet_DialogActivity": { + "type": "object", + "additionalProperties": false, + "properties": { + "id": { + "type": "string", + "description": "The unique identifier for the activity in UUIDv7 format.", + "format": "guid" }, - "401": { - "description": "Unauthorized" + "createdAt": { + "type": "string", + "description": "The date and time when the activity was created.", + "format": "date-time", + "nullable": true }, - "403": { - "description": "Forbidden" + "extendedType": { + "type": "string", + "description": "An arbitrary URI/URN with a service-specific activity type.\n \nConsult the service-specific documentation provided by the service owner for details (if in use).", + "format": "uri", + "nullable": true }, - "404": { - "content": { - "application/problem\u002Bjson": { - "schema": { - "$ref": "#/components/schemas/ProblemDetails" - } + "type": { + "description": "The type of activity.", + "oneOf": [ + { + "$ref": "#/components/schemas/DialogsEntitiesActivities_DialogActivityType" } - }, - "description": "The given dialog ID was not found or is already deleted." + ] }, - "410": { - "description": "Entity with the given key(s) is removed." - } - }, - "security": [ - { - "JWTBearerAuth": [] - } - ], - "summary": "Gets a single dialog seen log record", - "tags": [ - "Serviceowner" - ] - } - }, - "/api/v1/serviceowner/dialogs/{dialogId}/transmissions": { - "get": { - "description": "Gets the list of transmissions belonging to a dialog", - "operationId": "V1ServiceOwnerDialogTransmissionsSearch_SearchDialogTransmission", - "parameters": [ - { - "in": "path", - "name": "dialogId", - "required": true, - "schema": { - "format": "guid", - "type": "string" + "transmissionId": { + "type": "string", + "description": "If the activity is related to a particular transmission, this field will contain the transmission identifier.", + "format": "guid", + "nullable": true + }, + "performedBy": { + "description": "The actor that performed the activity.", + "oneOf": [ + { + "$ref": "#/components/schemas/V1EndUserCommonActors_Actor" + } + ] + }, + "description": { + "type": "array", + "description": "Unstructured text describing the activity. Only set if the activity type is \"Information\".", + "nullable": true, + "items": { + "$ref": "#/components/schemas/V1CommonLocalizations_Localization" } } - ], - "responses": { - "200": { - "content": { - "application/json": { - "schema": { - "items": { - "$ref": "#/components/schemas/V1ServiceOwnerDialogTransmissionsQueriesSearch_Transmission" - }, - "type": "array" - } + } + }, + "V1EndUserDialogsQueriesGet_DialogSeenLog": { + "type": "object", + "additionalProperties": false, + "properties": { + "id": { + "type": "string", + "description": "The unique identifier for the seen log entry in UUIDv7 format.", + "format": "guid" + }, + "seenAt": { + "type": "string", + "description": "The timestamp when the dialog revision was seen.", + "format": "date-time" + }, + "seenBy": { + "description": "The actor that saw the dialog revision.", + "oneOf": [ + { + "$ref": "#/components/schemas/V1EndUserCommonActors_Actor" } - }, - "description": "Successfully returned the dialog transmission list." + ] }, - "401": { - "description": "Missing or invalid authentication token. Requires a Maskinporten-token with the scope \u0022digdir:dialogporten.serviceprovider\u0022." + "isViaServiceOwner": { + "type": "boolean", + "description": "Flag indicating whether the seen log entry was created via the service owner.\n \nThis is used when the service owner uses the service owner API to implement its own frontend.", + "nullable": true + }, + "isCurrentEndUser": { + "type": "boolean", + "description": "Flag indicating whether the seen log entry was created by the current end user." + } + } + }, + "V1EndUserDialogLabelAssignmentLogQueriesSearch_LabelAssignmentLog": { + "type": "object", + "additionalProperties": false, + "properties": { + "createdAt": { + "type": "string", + "format": "date-time" }, - "403": { - "description": "Unauthorized to get the supplied dialog (not owned by authenticated organization or has additional scope requirements defined in policy)." + "name": { + "type": "string" }, - "404": { - "content": { - "application/problem\u002Bjson": { - "schema": { - "$ref": "#/components/schemas/ProblemDetails" - } - } - }, - "description": "The given dialog ID was not found or is already deleted." + "action": { + "type": "string" }, - "410": { - "description": "Entity with the given key(s) is removed." - } - }, - "security": [ - { - "JWTBearerAuth": [] + "performedBy": { + "$ref": "#/components/schemas/V1EndUserCommonActors_Actor" } - ], - "summary": "Gets a list of dialog transmissions", - "tags": [ - "Serviceowner" - ] + } }, - "post": { - "description": "The transmission is created with the given configuration. For more information see the documentation (link TBD).\n\nOptimistic 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.", - "operationId": "V1ServiceOwnerDialogTransmissionsCreate_DialogTransmission", - "parameters": [ - { - "in": "path", - "name": "dialogId", - "required": true, - "schema": { - "format": "guid", - "type": "string" - } + "V1EndUserDialogActivitiesQueriesSearch_Activity": { + "type": "object", + "additionalProperties": false, + "properties": { + "id": { + "type": "string", + "format": "guid" }, - { - "in": "header", - "name": "if-Match", - "schema": { - "format": "guid", - "nullable": true, - "type": "string" - } - } - ], - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/V1ServiceOwnerDialogTransmissionsCreate_TransmissionRequest" - } - } + "createdAt": { + "type": "string", + "format": "date-time" }, - "description": "", - "required": true, - "x-name": "CreateTransmissionRequest", - "x-position": 1 - }, - "responses": { - "201": { - "content": { - "application/json": { - "example": "018bb8e5-d9d0-7434-8ec5-569a6c8e01fc", - "schema": { - "type": "string" - } - } - }, - "description": "The UUID of the created dialog transmission. A relative URL to the newly created activity is set in the \u0022Location\u0022 header.", - "headers": { - "Etag": { - "description": "The new UUID ETag of the dialog", - "example": "123e4567-e89b-12d3-a456-426614174000", - "schema": { - "type": "string" - } - } - } + "extendedType": { + "type": "string", + "format": "uri", + "nullable": true }, - "204": { - "description": "No Content" + "seenByEndUserIdHash": { + "type": "string", + "nullable": true }, - "400": { - "content": { - "application/problem\u002Bjson": { - "schema": { - "$ref": "#/components/schemas/ProblemDetails" - } - } - }, - "description": "Validation error occured. See problem details for a list of errors." + "type": { + "$ref": "#/components/schemas/DialogsEntitiesActivities_DialogActivityType" }, - "401": { - "description": "Missing or invalid authentication token. Requires a Maskinporten-token with the scope \u0022digdir:dialogporten.serviceprovider\u0022." + "transmissionId": { + "type": "string", + "format": "guid", + "nullable": true + } + } + }, + "V1EndUserDialogActivitiesQueriesGet_Activity": { + "type": "object", + "additionalProperties": false, + "properties": { + "id": { + "type": "string", + "format": "guid" }, - "403": { - "description": "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)." + "createdAt": { + "type": "string", + "format": "date-time", + "nullable": true }, - "404": { - "content": { - "application/problem\u002Bjson": { - "schema": { - "$ref": "#/components/schemas/ProblemDetails" - } - } - }, - "description": "The given dialog ID was not found or is already deleted." + "extendedType": { + "type": "string", + "format": "uri", + "nullable": true }, - "410": { - "description": "Entity with the given key(s) is removed." + "type": { + "$ref": "#/components/schemas/DialogsEntitiesActivities_DialogActivityType" }, - "412": { - "content": { - "application/problem\u002Bjson": { - "schema": { - "$ref": "#/components/schemas/ProblemDetails" - } - } - }, - "description": "The supplied If-Match header did not match the current Revision value for the dialog. The request was not applied." + "transmissionId": { + "type": "string", + "format": "guid", + "nullable": true }, - "422": { - "content": { - "application/problem\u002Bjson": { - "schema": { - "$ref": "#/components/schemas/ProblemDetails" - } - } - }, - "description": "Domain error occured. See problem details for a list of errors." - } - }, - "security": [ - { - "JWTBearerAuth": [] - } - ], - "summary": "Adds a transmission to a dialog", - "tags": [ - "Serviceowner" - ] - } - }, - "/api/v1/serviceowner/dialogs/{dialogId}/transmissions/{transmissionId}": { - "get": { - "description": "Gets a single transmission belonging to a dialog. For more information see the documentation (link TBD).", - "operationId": "V1ServiceOwnerDialogTransmissionsGet_GetDialogTransmission", - "parameters": [ - { - "in": "path", - "name": "dialogId", - "required": true, - "schema": { - "format": "guid", - "type": "string" - } + "performedBy": { + "$ref": "#/components/schemas/V1EndUserCommonActors_Actor" }, - { - "in": "path", - "name": "transmissionId", - "required": true, - "schema": { - "format": "guid", - "type": "string" + "description": { + "type": "array", + "nullable": true, + "items": { + "$ref": "#/components/schemas/V1CommonLocalizations_Localization" } } - ], - "responses": { - "200": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/V1ServiceOwnerDialogTransmissionsQueriesGet_Transmission" - } - } - }, - "description": "Successfully returned the dialog transmission." + } + }, + "JsonPatchOperations_Operation": { + "type": "object", + "additionalProperties": false, + "properties": { + "operationType": { + "$ref": "#/components/schemas/JsonPatchOperations_OperationType" }, - "401": { - "description": "Missing or invalid authentication token. Requires a Maskinporten-token with the scope \u0022digdir:dialogporten.serviceprovider\u0022." + "path": { + "type": "string", + "nullable": true }, - "403": { - "description": "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)." + "op": { + "type": "string", + "nullable": true }, - "404": { - "content": { - "application/problem\u002Bjson": { - "schema": { - "$ref": "#/components/schemas/ProblemDetails" - } - } - }, - "description": "The given dialog ID was not found or was deleted, or the given transmission ID was not found." + "from": { + "type": "string", + "nullable": true }, - "410": { - "description": "Entity with the given key(s) is removed." - } - }, - "security": [ - { - "JWTBearerAuth": [] + "value": { + "nullable": true } + } + }, + "JsonPatchOperations_OperationType": { + "type": "string", + "description": "", + "x-enumNames": [ + "Add", + "Remove", + "Replace", + "Move", + "Copy", + "Test", + "Invalid" ], - "summary": "Gets a single dialog transmission", - "tags": [ - "Serviceowner" + "enum": [ + "Add", + "Remove", + "Replace", + "Move", + "Copy", + "Test", + "Invalid" ] } + }, + "securitySchemes": { + "JWTBearerAuth": { + "type": "http", + "description": "Enter a JWT token to authorize the requests...", + "scheme": "bearer", + "bearerFormat": "JWT" + } } - }, - "servers": [ - { - "url": "https://altinn-dev-api.azure-api.net/dialogporten" - } - ] + } } diff --git a/src/Digdir.Domain.Dialogporten.WebApi/Digdir.Domain.Dialogporten.WebApi.csproj b/src/Digdir.Domain.Dialogporten.WebApi/Digdir.Domain.Dialogporten.WebApi.csproj index 1c367fd6e..2ca308fdf 100644 --- a/src/Digdir.Domain.Dialogporten.WebApi/Digdir.Domain.Dialogporten.WebApi.csproj +++ b/src/Digdir.Domain.Dialogporten.WebApi/Digdir.Domain.Dialogporten.WebApi.csproj @@ -40,7 +40,7 @@ - + diff --git a/src/Digdir.Domain.Dialogporten.WebApi/Endpoints/V1/EndUser/DialogActivities/Get/GetDialogActivityEndpointSummary.cs b/src/Digdir.Domain.Dialogporten.WebApi/Endpoints/V1/EndUser/DialogActivities/Get/GetDialogActivityEndpointSummary.cs index 064f95f54..8162d6dee 100644 --- a/src/Digdir.Domain.Dialogporten.WebApi/Endpoints/V1/EndUser/DialogActivities/Get/GetDialogActivityEndpointSummary.cs +++ b/src/Digdir.Domain.Dialogporten.WebApi/Endpoints/V1/EndUser/DialogActivities/Get/GetDialogActivityEndpointSummary.cs @@ -10,7 +10,7 @@ public GetDialogActivityEndpointSummary() { Summary = "Gets a single dialog activity"; Description = """ - Gets a single activity belonging to a dial og. For more information see the documentation (link TBD). + Gets a single activity belonging to a dialog. For more information see the documentation (link TBD). """; Responses[StatusCodes.Status200OK] = Constants.SwaggerSummary.ReturnedResult.FormatInvariant("activity"); Responses[StatusCodes.Status401Unauthorized] = Constants.SwaggerSummary.EndUserAuthenticationFailure; diff --git a/src/Digdir.Domain.Dialogporten.WebApi/Program.cs b/src/Digdir.Domain.Dialogporten.WebApi/Program.cs index 17b1790b3..c9e43dba5 100644 --- a/src/Digdir.Domain.Dialogporten.WebApi/Program.cs +++ b/src/Digdir.Domain.Dialogporten.WebApi/Program.cs @@ -66,7 +66,7 @@ static void BuildAndRun(string[] args) .ReadFrom.Configuration(context.Configuration) .ReadFrom.Services(services) .Enrich.WithEnvironmentName() - .Enrich.FromLogContext() + .Enrich.FromLogContext() .WriteTo.OpenTelemetryOrConsole(context)); builder.Services @@ -104,6 +104,26 @@ static void BuildAndRun(string[] args) x.RemoveEmptyRequestSchema = true; x.DocumentSettings = s => { + s.PostProcess = document => + { + var dialogportenBaseUri = builder.Configuration + .GetSection(ApplicationSettings.ConfigurationSectionName) + .Get()! + .Dialogporten + .BaseUri + .ToString(); + + document.Servers.Clear(); + document.Servers.Add(new OpenApiServer + { + Url = dialogportenBaseUri + }); + document.Generator = null; + document.ReplaceProblemDetailsDescriptions(); + document.MakeCollectionsNullable(); + document.FixJwtBearerCasing(); + document.RemoveSystemStringHeaderTitles(); + }; s.Title = "Dialogporten"; s.DocumentName = "v1"; s.Version = "v1"; @@ -188,29 +208,7 @@ static void BuildAndRun(string[] args) x.Errors.ResponseBuilder = ErrorResponseBuilderExtensions.ResponseBuilder; }) .UseAddSwaggerCorsHeader() - .UseSwaggerGen(config => - { - config.PostProcess = (document, _) => - { - var dialogportenBaseUri = builder.Configuration - .GetSection(ApplicationSettings.ConfigurationSectionName) - .Get()! - .Dialogporten - .BaseUri - .ToString(); - - document.Servers.Clear(); - document.Servers.Add(new OpenApiServer - { - Url = dialogportenBaseUri - }); - document.Generator = null; - document.ReplaceProblemDetailsDescriptions(); - document.MakeCollectionsNullable(); - document.FixJwtBearerCasing(); - document.RemoveSystemStringHeaderTitles(); - }; - }, uiConfig => + .UseSwaggerGen(uiConfig: uiConfig => { // Hide schemas view uiConfig.DefaultModelsExpandDepth = -1; @@ -219,24 +217,6 @@ static void BuildAndRun(string[] args) uiConfig.DocumentPath = dialogPrefix + "/swagger/{documentName}/swagger.json"; }); - /*await app.ExportSwaggerJsonAndExitAsync( - c => - { - c.SwaggerDocumentName = "v1"; //must match doc name above - c.Language = GenerationLanguage.CSharp; - c.OutputPath = Path.Combine(app.Environment.WebRootPath, "ApiClients", "CSharp"); - c.ClientNamespaceName = "MyCompanyName"; - c.ClientClassName = "MyCsClient"; - c.CreateZipArchive = true; //if you'd like a zip file as well - }, - c => - { - c.SwaggerDocumentName = "v1"; - c.Language = GenerationLanguage.TypeScript; - c.OutputPath = Path.Combine(app.Environment.WebRootPath, "ApiClients", "Typescript"); - c.ClientNamespaceName = "MyCompanyName"; - c.ClientClassName = "MyTsClient"; - });*/ app.Run(); } diff --git a/src/Digdir.Library.Dialogporten.WebApiClient/.refitter b/src/Digdir.Library.Dialogporten.WebApiClient/.refitter index 2d84fd2bc..8dc18a8ed 100644 --- a/src/Digdir.Library.Dialogporten.WebApiClient/.refitter +++ b/src/Digdir.Library.Dialogporten.WebApiClient/.refitter @@ -1,5 +1,5 @@ { - "openApiPath": "../../docs/schema/v1/swagger.json", + "openApiPath": "../Digdir.Domain.Dialogporten.WebApi/bin/Release/net9.0/swagger.json", "namespace": "Digdir.Library.Dialogporten.WebApiClient.Features.V1", "outputFolder": "Features/V1", "operationNameGenerator": "SingleClientFromOperationId", 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 5213c6f7a..d389f03a6 100644 --- a/src/Digdir.Library.Dialogporten.WebApiClient/Digdir.Library.Dialogporten.WebApiClient.csproj +++ b/src/Digdir.Library.Dialogporten.WebApiClient/Digdir.Library.Dialogporten.WebApiClient.csproj @@ -14,7 +14,6 @@ - diff --git a/tests/Digdir.Domain.Dialogporten.WebApi.Integration.Tests/Features/V1/SwaggerSnapshotTests.cs b/tests/Digdir.Domain.Dialogporten.WebApi.Integration.Tests/Features/V1/SwaggerSnapshotTests.cs index 32b0f33e5..c23fb1f75 100644 --- a/tests/Digdir.Domain.Dialogporten.WebApi.Integration.Tests/Features/V1/SwaggerSnapshotTests.cs +++ b/tests/Digdir.Domain.Dialogporten.WebApi.Integration.Tests/Features/V1/SwaggerSnapshotTests.cs @@ -2,6 +2,7 @@ using System.Text.Json; using Microsoft.AspNetCore.Hosting; using Microsoft.AspNetCore.Mvc.Testing; +#pragma warning disable CS1998 // Async method lacks 'await' operators and will run synchronously namespace Digdir.Domain.Dialogporten.WebApi.Integration.Tests.Features.V1; @@ -17,6 +18,7 @@ public SwaggerSnapshotTests(WebApplicationFactory webApplicationFactory [Fact] public async Task FailIfSwaggerSnapshotDoesNotMatch() { +#if RELEASE // Arrange // This test checks for changes against the published version of the swagger.verified.json file // The file is located at /docs/schema/ on the solution root @@ -24,30 +26,33 @@ public async Task FailIfSwaggerSnapshotDoesNotMatch() // of the npm package located in the same folder var rootPath = Utils.GetSolutionRootFolder(); var swaggerPath = Path.Combine(rootPath!, "docs/schema/V1"); - - var client = _webApplicationFactory - .WithWebHostBuilder(builder => builder.UseEnvironment("test")) - .CreateClient(); - + var newSwaggerPath = Path.Combine(rootPath!, "src/Digdir.Domain.Dialogporten.WebApi/bin/Release/net9.0/swagger.json"); // Act - var response = await client.GetAsync("/swagger/v1/swagger.json"); - var newSwagger = await response.Content.ReadAsStringAsync(); + var newSwagger = File.ReadAllText(newSwaggerPath); + + // Amund: Stemmer dette lenger? // The order of the properties in the swagger.json file is not cross-platform deterministic. // Running client.GetAsync("/swagger/v1/swagger.json"); on Windows and Mac will produce // different ordering of the results (although the content is the same). So we force an // alphabetical ordering of the properties to make the test deterministic. // Ref: https://github.com/altinn/dialogporten/issues/996 - var orderedSwagger = SortJson(newSwagger); + // var orderedSwagger = SortJson(newSwagger); // Assert - response.EnsureSuccessStatusCode(); - await Verify(orderedSwagger, extension: "json") + await Verify(newSwagger, extension: "json") .UseFileName("swagger") .UseDirectory(swaggerPath); +#else + Assert.Fail("Swagger snapshot tests are not supported in DEBUG mode. Swagger is NOT generated in DEBUG mode, this is to keep build times low. therefore this test will always fail. Run in RELEASE mode to enable."); + +#endif } - private static readonly JsonSerializerOptions SerializerOptions = new() { WriteIndented = true }; + private static readonly JsonSerializerOptions SerializerOptions = new() + { + WriteIndented = true + }; private static string SortJson(string jsonString) { From 00ddab23014e261f9d60f31356712895ca84379c Mon Sep 17 00:00:00 2001 From: Amund Myrbostad Date: Thu, 23 Jan 2025 14:37:39 +0100 Subject: [PATCH 103/169] Sorting still needed --- .../Features/V1/SwaggerSnapshotTests.cs | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/tests/Digdir.Domain.Dialogporten.WebApi.Integration.Tests/Features/V1/SwaggerSnapshotTests.cs b/tests/Digdir.Domain.Dialogporten.WebApi.Integration.Tests/Features/V1/SwaggerSnapshotTests.cs index c23fb1f75..17f0249fd 100644 --- a/tests/Digdir.Domain.Dialogporten.WebApi.Integration.Tests/Features/V1/SwaggerSnapshotTests.cs +++ b/tests/Digdir.Domain.Dialogporten.WebApi.Integration.Tests/Features/V1/SwaggerSnapshotTests.cs @@ -2,7 +2,7 @@ using System.Text.Json; using Microsoft.AspNetCore.Hosting; using Microsoft.AspNetCore.Mvc.Testing; -#pragma warning disable CS1998 // Async method lacks 'await' operators and will run synchronously +#pragma warning disable CS1998 // Async method lacks 'await' operators and will run synchronously. If tests are run in DEBUG mode, this is expected. namespace Digdir.Domain.Dialogporten.WebApi.Integration.Tests.Features.V1; @@ -30,17 +30,16 @@ public async Task FailIfSwaggerSnapshotDoesNotMatch() // Act var newSwagger = File.ReadAllText(newSwaggerPath); - // Amund: Stemmer dette lenger? // The order of the properties in the swagger.json file is not cross-platform deterministic. - // Running client.GetAsync("/swagger/v1/swagger.json"); on Windows and Mac will produce + // Running Nswag on Windows and Mac will produce // different ordering of the results (although the content is the same). So we force an // alphabetical ordering of the properties to make the test deterministic. // Ref: https://github.com/altinn/dialogporten/issues/996 - // var orderedSwagger = SortJson(newSwagger); + var orderedSwagger = SortJson(newSwagger); // Assert - await Verify(newSwagger, extension: "json") + await Verify(orderedSwagger, extension: "json") .UseFileName("swagger") .UseDirectory(swaggerPath); #else From 47bfc21b08b3e01a30d58df2a1ea7678786355b4 Mon Sep 17 00:00:00 2001 From: Amund Myrbostad Date: Thu, 23 Jan 2025 14:39:39 +0100 Subject: [PATCH 104/169] Sorted swagger --- docs/schema/V1/swagger.verified.json | 11390 ++++++++++++------------- 1 file changed, 5695 insertions(+), 5695 deletions(-) diff --git a/docs/schema/V1/swagger.verified.json b/docs/schema/V1/swagger.verified.json index 73cab3ae3..47b0b0c7a 100644 --- a/docs/schema/V1/swagger.verified.json +++ b/docs/schema/V1/swagger.verified.json @@ -1,2634 +1,2193 @@ { - "openapi": "3.0.0", - "info": { - "title": "Dialogporten", - "version": "v1" - }, - "servers": [ - { - "url": "https://localhost:7214/" - } - ], - "paths": { - "/api/v1/.well-known/oauth-authorization-server": { - "get": { - "tags": [ - "Metadata" + "components": { + "schemas": { + "Actors_ActorType": { + "description": "", + "enum": [ + "PartyRepresentative", + "ServiceOwner" ], - "summary": "Gets the OAuth 2.0 Metadata for automatic configuration of clients verifying dialog tokens", - "description": "This endpoint can be used by client integrations supporting automatic discovery of \"OAuth 2.0 Authorization Server\" metadata, enabling verification of dialog tokens issues by Dialogporten.", - "operationId": "V1WellKnownOauthAuthorizationServerGet_GetOauthAuthorizationServer", - "responses": { - "200": { - "description": "The OAuth 2.0 Authorization Server Metadata", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/V1WellKnownOauthAuthorizationServerQueriesGet_GetOauthAuthorizationServer" - } - } - } - } - } - } - }, - "/api/v1/.well-known/jwks.json": { - "get": { - "tags": [ - "Metadata" + "type": "string", + "x-enumNames": [ + "PartyRepresentative", + "ServiceOwner" + ] + }, + "Attachments_AttachmentUrlConsumerType": { + "description": "", + "enum": [ + "Gui", + "Api" ], - "summary": "Gets the JSON Web Key Set (JWKS) containing the public keys used to verify dialog token signatures", - "description": "This endpoint can be used by client integrations supporting automatic discovery of \"OAuth 2.0 Authorization Server\" metadata, enabling verification of dialog tokens issues by Dialogporten.", - "operationId": "V1WellKnownJwksGet_GetJwks", - "responses": { - "200": { - "description": "The OAuth 2.0 Authorization Server Metadata", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/V1WellKnownJwksQueriesGet_GetJwks" - } - } - } - } - } - } - }, - "/api/v1/serviceowner/dialogs/{dialogId}/transmissions": { - "get": { - "tags": [ - "Serviceowner" + "type": "string", + "x-enumNames": [ + "Gui", + "Api" + ] + }, + "ContinuationTokenSetOfTOrderDefinitionAndTTarget": {}, + "DialogEndUserContextsEntities_SystemLabel": { + "description": "", + "enum": [ + "Default", + "Bin", + "Archive" ], - "summary": "Gets a list of dialog transmissions", - "description": "Gets the list of transmissions belonging to a dialog", - "operationId": "V1ServiceOwnerDialogTransmissionsSearch_SearchDialogTransmission", - "parameters": [ - { - "name": "dialogId", - "in": "path", - "required": true, - "schema": { - "type": "string", - "format": "guid" - } - } + "type": "string", + "x-enumNames": [ + "Default", + "Bin", + "Archive" + ] + }, + "DialogsEntities_DialogStatus": { + "description": "", + "enum": [ + "New", + "InProgress", + "Draft", + "Sent", + "RequiresAttention", + "Completed" ], - "responses": { - "200": { - "description": "Successfully returned the dialog transmission list.", - "content": { - "application/json": { - "schema": { - "type": "array", - "items": { - "$ref": "#/components/schemas/V1ServiceOwnerDialogTransmissionsQueriesSearch_Transmission" - } - } - } - } + "type": "string", + "x-enumNames": [ + "New", + "InProgress", + "Draft", + "Sent", + "RequiresAttention", + "Completed" + ] + }, + "DialogsEntitiesActions_DialogGuiActionPriority": { + "description": "", + "enum": [ + "Primary", + "Secondary", + "Tertiary" + ], + "type": "string", + "x-enumNames": [ + "Primary", + "Secondary", + "Tertiary" + ] + }, + "DialogsEntitiesActivities_DialogActivityType": { + "description": "", + "enum": [ + "DialogCreated", + "DialogClosed", + "Information", + "TransmissionOpened", + "PaymentMade", + "SignatureProvided", + "DialogOpened", + "DialogDeleted", + "DialogRestored", + "SentToSigning", + "SentToFormFill", + "SentToSendIn", + "SentToPayment" + ], + "type": "string", + "x-enumNames": [ + "DialogCreated", + "DialogClosed", + "Information", + "TransmissionOpened", + "PaymentMade", + "SignatureProvided", + "DialogOpened", + "DialogDeleted", + "DialogRestored", + "SentToSigning", + "SentToFormFill", + "SentToSendIn", + "SentToPayment" + ] + }, + "DialogsEntitiesTransmissions_DialogTransmissionType": { + "description": "", + "enum": [ + "Information", + "Acceptance", + "Rejection", + "Request", + "Alert", + "Decision", + "Submission", + "Correction" + ], + "type": "string", + "x-enumNames": [ + "Information", + "Acceptance", + "Rejection", + "Request", + "Alert", + "Decision", + "Submission", + "Correction" + ] + }, + "Http_HttpVerb": { + "description": "", + "enum": [ + "GET", + "POST", + "PUT", + "PATCH", + "DELETE", + "HEAD", + "OPTIONS", + "TRACE", + "CONNECT" + ], + "type": "string", + "x-enumNames": [ + "GET", + "POST", + "PUT", + "PATCH", + "DELETE", + "HEAD", + "OPTIONS", + "TRACE", + "CONNECT" + ] + }, + "JsonPatchOperations_Operation": { + "additionalProperties": false, + "properties": { + "from": { + "nullable": true, + "type": "string" }, - "401": { - "description": "Missing or invalid authentication token. Requires a Maskinporten-token with the scope \"digdir:dialogporten.serviceprovider\"." + "op": { + "nullable": true, + "type": "string" }, - "403": { - "description": "Unauthorized to get the supplied dialog (not owned by authenticated organization or has additional scope requirements defined in policy)." + "operationType": { + "$ref": "#/components/schemas/JsonPatchOperations_OperationType" }, - "404": { - "description": "The given dialog ID was not found or is already deleted.", - "content": { - "application/problem+json": { - "schema": { - "$ref": "#/components/schemas/ProblemDetails" - } - } - } + "path": { + "nullable": true, + "type": "string" }, - "410": { - "description": "Entity with the given key(s) is removed." + "value": { + "nullable": true } }, - "security": [ - { - "JWTBearerAuth": [] - } - ] + "type": "object" }, - "post": { - "tags": [ - "Serviceowner" + "JsonPatchOperations_OperationType": { + "description": "", + "enum": [ + "Add", + "Remove", + "Replace", + "Move", + "Copy", + "Test", + "Invalid" ], - "summary": "Adds a transmission to a dialog", - "description": "The transmission is created with the given configuration. For more information see the documentation (link TBD).\n\nOptimistic 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.", - "operationId": "V1ServiceOwnerDialogTransmissionsCreate_DialogTransmission", - "parameters": [ - { - "name": "dialogId", - "in": "path", - "required": true, - "schema": { - "type": "string", - "format": "guid" - } + "type": "string", + "x-enumNames": [ + "Add", + "Remove", + "Replace", + "Move", + "Copy", + "Test", + "Invalid" + ] + }, + "OrderSetOfTOrderDefinitionAndTTarget": {}, + "PaginatedListOfV1EndUserDialogsQueriesSearch_Dialog": { + "additionalProperties": false, + "properties": { + "continuationToken": { + "description": "The continuation token to be used to fetch the next page of items", + "example": "createdat_2024-07-31T09:09:03.0257090Z,id_0c089101-b7cf-a476-955c-f00a78d74a4e", + "nullable": true, + "type": "string" }, - { - "name": "if-Match", - "in": "header", - "schema": { - "type": "string", - "format": "guid", - "nullable": true - } - } - ], - "requestBody": { - "x-name": "CreateTransmissionRequest", - "description": "", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/V1ServiceOwnerDialogTransmissionsCreate_TransmissionRequest" - } - } + "hasNextPage": { + "description": "Whether there are more items available that can be fetched by supplying the continuation token", + "type": "boolean" }, - "required": true, - "x-position": 1 - }, - "responses": { - "201": { - "description": "The UUID of the created dialog transmission. A relative URL to the newly created activity is set in the \"Location\" header.", - "headers": { - "Etag": { - "description": "The new UUID ETag of the dialog", - "schema": { - "type": "string" - }, - "example": "123e4567-e89b-12d3-a456-426614174000" - } + "items": { + "description": "The paginated list of items", + "items": { + "$ref": "#/components/schemas/V1EndUserDialogsQueriesSearch_Dialog" }, - "content": { - "application/json": { - "schema": { - "type": "string" - }, - "example": "018bb8e5-d9d0-7434-8ec5-569a6c8e01fc" - } - } - }, - "204": { - "description": "No Content" - }, - "400": { - "description": "Validation error occured. See problem details for a list of errors.", - "content": { - "application/problem+json": { - "schema": { - "$ref": "#/components/schemas/ProblemDetails" - } - } - } - }, - "401": { - "description": "Missing or invalid authentication token. Requires a Maskinporten-token with the scope \"digdir:dialogporten.serviceprovider\"." - }, - "403": { - "description": "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": { - "description": "The given dialog ID was not found or is already deleted.", - "content": { - "application/problem+json": { - "schema": { - "$ref": "#/components/schemas/ProblemDetails" - } - } - } - }, - "410": { - "description": "Entity with the given key(s) is removed." - }, - "412": { - "description": "The supplied If-Match header did not match the current Revision value for the dialog. The request was not applied.", - "content": { - "application/problem+json": { - "schema": { - "$ref": "#/components/schemas/ProblemDetails" - } - } - } + "nullable": true, + "type": "array" }, - "422": { - "description": "Domain error occured. See problem details for a list of errors.", - "content": { - "application/problem+json": { - "schema": { - "$ref": "#/components/schemas/ProblemDetails" - } - } - } + "orderBy": { + "description": "The current sorting order of the items", + "example": "createdat_desc,id_desc", + "type": "string" } }, - "security": [ - { - "JWTBearerAuth": [] - } - ] - } - }, - "/api/v1/serviceowner/dialogs/{dialogId}/transmissions/{transmissionId}": { - "get": { - "tags": [ - "Serviceowner" - ], - "summary": "Gets a single dialog transmission", - "description": "Gets a single transmission belonging to a dialog. For more information see the documentation (link TBD).", - "operationId": "V1ServiceOwnerDialogTransmissionsGet_GetDialogTransmission", - "parameters": [ - { - "name": "dialogId", - "in": "path", - "required": true, - "schema": { - "type": "string", - "format": "guid" - } - }, - { - "name": "transmissionId", - "in": "path", - "required": true, - "schema": { - "type": "string", - "format": "guid" - } - } - ], - "responses": { - "200": { - "description": "Successfully returned the dialog transmission.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/V1ServiceOwnerDialogTransmissionsQueriesGet_Transmission" - } - } - } - }, - "401": { - "description": "Missing or invalid authentication token. Requires a Maskinporten-token with the scope \"digdir:dialogporten.serviceprovider\"." + "type": "object" + }, + "PaginatedListOfV1ServiceOwnerDialogsQueriesSearch_Dialog": { + "additionalProperties": false, + "properties": { + "continuationToken": { + "description": "The continuation token to be used to fetch the next page of items", + "example": "createdat_2024-07-31T09:09:03.0257090Z,id_0c089101-b7cf-a476-955c-f00a78d74a4e", + "nullable": true, + "type": "string" }, - "403": { - "description": "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)." + "hasNextPage": { + "description": "Whether there are more items available that can be fetched by supplying the continuation token", + "type": "boolean" }, - "404": { - "description": "The given dialog ID was not found or was deleted, or the given transmission ID was not found.", - "content": { - "application/problem+json": { - "schema": { - "$ref": "#/components/schemas/ProblemDetails" - } - } - } + "items": { + "description": "The paginated list of items", + "items": { + "$ref": "#/components/schemas/V1ServiceOwnerDialogsQueriesSearch_Dialog" + }, + "nullable": true, + "type": "array" }, - "410": { - "description": "Entity with the given key(s) is removed." + "orderBy": { + "description": "The current sorting order of the items", + "example": "createdat_desc,id_desc", + "type": "string" } }, - "security": [ - { - "JWTBearerAuth": [] - } - ] - } - }, - "/api/v1/serviceowner/dialogs/{dialogId}/seenlog": { - "get": { - "tags": [ - "Serviceowner" - ], - "summary": "Gets all seen log records for a dialog", - "description": "Gets all seen log records for a dialog. For more information see the documentation (link TBD).", - "operationId": "V1ServiceOwnerDialogSeenLogsSearch_SearchDialogSeenLog", - "parameters": [ - { - "name": "dialogId", - "in": "path", - "required": true, - "schema": { - "type": "string", - "format": "guid" - } - } - ], - "responses": { - "200": { - "description": "Successfully returned the dialog seen log records.", - "content": { - "application/json": { - "schema": { - "type": "array", - "items": { - "$ref": "#/components/schemas/V1ServiceOwnerDialogSeenLogsQueriesSearch_SeenLog" - } - } - } - } + "type": "object" + }, + "ProblemDetails": { + "additionalProperties": false, + "properties": { + "detail": { + "nullable": true, + "type": "string" }, - "401": { - "description": "Unauthorized" + "errors": { + "items": { + "$ref": "#/components/schemas/ProblemDetails_Error" + }, + "nullable": true, + "type": "array" }, - "403": { - "description": "Forbidden" + "instance": { + "default": "/api/route", + "type": "string" }, - "404": { - "description": "The given dialog ID was not found or is already deleted.", - "content": { - "application/problem+json": { - "schema": { - "$ref": "#/components/schemas/ProblemDetails" - } - } - } + "status": { + "default": 400, + "format": "int32", + "type": "integer" }, - "410": { - "description": "Entity with the given key(s) is removed." + "title": { + "default": "One or more validation errors occurred.", + "type": "string" + }, + "traceId": { + "default": "0HMPNHL0JHL76:00000001", + "type": "string" + }, + "type": { + "default": "https://www.rfc-editor.org/rfc/rfc7231#section-6.5.1", + "type": "string" } }, - "security": [ - { - "JWTBearerAuth": [] + "type": "object" + }, + "ProblemDetails_Error": { + "additionalProperties": false, + "properties": { + "code": { + "nullable": true, + "type": "string" + }, + "name": { + "default": "Error or field name", + "type": "string" + }, + "reason": { + "default": "Error reason", + "type": "string" + }, + "severity": { + "nullable": true, + "type": "string" } - ] - } - }, - "/api/v1/serviceowner/dialogs/{dialogId}/seenlog/{seenLogId}": { - "get": { - "tags": [ - "Serviceowner" - ], - "summary": "Gets a single dialog seen log record", - "description": "Gets a single dialog seen log record. For more information see the documentation (link TBD).", - "operationId": "V1ServiceOwnerDialogSeenLogsGet_GetDialogSeenLog", - "parameters": [ - { - "name": "dialogId", - "in": "path", - "required": true, - "schema": { - "type": "string", - "format": "guid" - } + }, + "type": "object" + }, + "V1CommonContent_ContentValue": { + "additionalProperties": false, + "properties": { + "mediaType": { + "description": "Media type of the content, this can also indicate that the content is embeddable.\nFor a list of supported media types, see (link TBD).", + "type": "string" }, - { - "name": "seenLogId", - "in": "path", - "required": true, - "schema": { - "type": "string", - "format": "guid" - } + "value": { + "description": "A list of localizations for the content.", + "items": { + "$ref": "#/components/schemas/V1CommonLocalizations_Localization" + }, + "nullable": true, + "type": "array" } - ], - "responses": { - "200": { - "description": "Successfully returned the dialog seen log record.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/V1ServiceOwnerDialogSeenLogsQueriesGet_SeenLog" - } - } - } + }, + "type": "object" + }, + "V1CommonLocalizations_Localization": { + "additionalProperties": false, + "properties": { + "languageCode": { + "description": "The language code of the localization in ISO 639-1 format.", + "example": "nb", + "type": "string" }, - "401": { - "description": "Unauthorized" + "value": { + "description": "The localized text or URI reference.", + "type": "string" + } + }, + "type": "object" + }, + "V1EndUserCommonActors_Actor": { + "additionalProperties": false, + "properties": { + "actorId": { + "description": "The identifier of the person or organization that sent the transmission. Mutually exclusive with ActorName.\nMight be omitted if ActorType is \u0022ServiceOwner\u0022.", + "example": "urn:altinn:person:identifier-no:12018212345", + "nullable": true, + "type": "string" }, - "403": { - "description": "Forbidden" + "actorName": { + "description": "Specifies the name of the entity that sent the transmission. Mutually exclusive with ActorId. If ActorId\nis supplied, the name will be automatically populated from the name registries.", + "example": "Ola Nordmann", + "nullable": true, + "type": "string" }, - "404": { - "description": "The given dialog ID was not found or is already deleted.", - "content": { - "application/problem+json": { - "schema": { - "$ref": "#/components/schemas/ProblemDetails" - } + "actorType": { + "description": "The type of actor that sent the transmission.", + "oneOf": [ + { + "$ref": "#/components/schemas/Actors_ActorType" } - } - }, - "410": { - "description": "Entity with the given key(s) is removed." + ] } }, - "security": [ - { - "JWTBearerAuth": [] - } - ] - } - }, - "/api/v1/serviceowner/dialogs/{dialogId}": { - "put": { - "tags": [ - "Serviceowner" - ], - "summary": "Replaces a dialog", - "description": "Replaces a given dialog with the supplied model. For more information see the documentation (link TBD).\n\nOptimistic 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.", - "operationId": "V1ServiceOwnerDialogsUpdate_Dialog", - "parameters": [ - { - "name": "dialogId", - "in": "path", - "required": true, - "schema": { - "type": "string", - "format": "guid" - } + "type": "object" + }, + "V1EndUserDialogActivitiesQueriesGet_Activity": { + "additionalProperties": false, + "properties": { + "createdAt": { + "format": "date-time", + "nullable": true, + "type": "string" }, - { - "name": "if-Match", - "in": "header", - "schema": { - "type": "string", - "format": "guid", - "nullable": true - } - } - ], - "requestBody": { - "x-name": "dto", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/V1ServiceOwnerDialogsCommandsUpdate_Dialog" - } - } + "description": { + "items": { + "$ref": "#/components/schemas/V1CommonLocalizations_Localization" + }, + "nullable": true, + "type": "array" }, - "required": true - }, - "responses": { - "204": { - "description": "The dialog aggregate was updated successfully.", - "headers": { - "Etag": { - "description": "The new UUID ETag of the dialog", - "schema": { - "type": "string" - }, - "example": "123e4567-e89b-12d3-a456-426614174000" - } - } + "extendedType": { + "format": "uri", + "nullable": true, + "type": "string" }, - "400": { - "description": "Validation error occured. See problem details for a list of errors.", - "content": { - "application/problem+json": { - "schema": { - "$ref": "#/components/schemas/ProblemDetails" - } - } - } + "id": { + "format": "guid", + "type": "string" }, - "401": { - "description": "Missing or invalid authentication token. Requires a Maskinporten-token with the scope \"digdir:dialogporten.serviceprovider\"." + "performedBy": { + "$ref": "#/components/schemas/V1EndUserCommonActors_Actor" }, - "403": { - "description": "Unauthorized to update the supplied dialog (not owned by authenticated organization or has additional scope requirements defined in policy)." + "transmissionId": { + "format": "guid", + "nullable": true, + "type": "string" }, - "404": { - "description": "The given dialog ID was not found or is already deleted.", - "content": { - "application/problem+json": { - "schema": { - "$ref": "#/components/schemas/ProblemDetails" - } - } - } + "type": { + "$ref": "#/components/schemas/DialogsEntitiesActivities_DialogActivityType" + } + }, + "type": "object" + }, + "V1EndUserDialogActivitiesQueriesSearch_Activity": { + "additionalProperties": false, + "properties": { + "createdAt": { + "format": "date-time", + "type": "string" }, - "410": { - "description": "Entity with the given key(s) is removed." + "extendedType": { + "format": "uri", + "nullable": true, + "type": "string" + }, + "id": { + "format": "guid", + "type": "string" + }, + "seenByEndUserIdHash": { + "nullable": true, + "type": "string" }, - "412": { - "description": "The supplied If-Match header did not match the current Revision value for the dialog. The request was not applied.", - "content": { - "application/problem+json": { - "schema": { - "$ref": "#/components/schemas/ProblemDetails" - } - } - } + "transmissionId": { + "format": "guid", + "nullable": true, + "type": "string" }, - "422": { - "description": "Domain error occured. See problem details for a list of errors.", - "content": { - "application/problem+json": { - "schema": { - "$ref": "#/components/schemas/ProblemDetails" - } - } - } + "type": { + "$ref": "#/components/schemas/DialogsEntitiesActivities_DialogActivityType" } }, - "security": [ - { - "JWTBearerAuth": [] - } - ] + "type": "object" }, - "get": { - "tags": [ - "Serviceowner" - ], - "summary": "Gets a single dialog", - "description": "Gets a single dialog aggregate. For more information see the documentation (link TBD).\n\nNote that this operation may return deleted dialogs (see the field `DeletedAt`).", - "operationId": "V1ServiceOwnerDialogsGet_GetDialog", - "parameters": [ - { - "name": "dialogId", - "in": "path", - "required": true, - "schema": { - "type": "string", - "format": "guid" - } - }, - { - "name": "endUserId", - "in": "query", - "description": "Filter by end user id", - "schema": { - "type": "string", - "nullable": true - } - } - ], - "responses": { - "200": { - "description": "Successfully returned the dialog aggregate.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/V1ServiceOwnerDialogsQueriesGet_Dialog" - } - } - } + "V1EndUserDialogLabelAssignmentLogQueriesSearch_LabelAssignmentLog": { + "additionalProperties": false, + "properties": { + "action": { + "type": "string" }, - "401": { - "description": "Missing or invalid authentication token. Requires a Maskinporten-token with the scope \"digdir:dialogporten.serviceprovider\"." + "createdAt": { + "format": "date-time", + "type": "string" }, - "403": { - "description": "Unauthorized to get the supplied dialog (not owned by authenticated organization or has additional scope requirements defined in policy)." + "name": { + "type": "string" }, - "404": { - "description": "The given dialog ID was not found or is already deleted.", - "content": { - "application/problem+json": { - "schema": { - "$ref": "#/components/schemas/ProblemDetails" - } - } - } + "performedBy": { + "$ref": "#/components/schemas/V1EndUserCommonActors_Actor" } }, - "security": [ - { - "JWTBearerAuth": [] - } - ] + "type": "object" }, - "delete": { - "tags": [ - "Serviceowner" - ], - "summary": "Deletes a dialog", - "description": "Deletes a given dialog (soft delete). For more information see the documentation (link TBD).\n\nNote 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.\nIf end users attempt to access the dialog via the details endpoint, they will get a 410 Gone response.\n\nOptimistic 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.", - "operationId": "V1ServiceOwnerDialogsDelete_Dialog", - "parameters": [ - { - "name": "dialogId", - "in": "path", - "required": true, - "schema": { - "type": "string", - "format": "guid" - } + "V1EndUserDialogSeenLogsQueriesGet_SeenLog": { + "additionalProperties": false, + "properties": { + "id": { + "format": "guid", + "type": "string" }, - { - "name": "if-Match", - "in": "header", - "schema": { - "type": "string", - "format": "guid", - "nullable": true - } - } - ], - "responses": { - "204": { - "description": "The dialog aggregate was deleted successfully.", - "headers": { - "Etag": { - "description": "The new UUID ETag of the dialog", - "schema": { - "type": "string" - }, - "example": "123e4567-e89b-12d3-a456-426614174000" - } - } + "isCurrentEndUser": { + "type": "boolean" }, - "400": { - "description": "Validation error occured. See problem details for a list of errors.", - "content": { - "application/problem+json": { - "schema": { - "$ref": "#/components/schemas/ProblemDetails" - } - } - } + "isViaServiceOwner": { + "type": "boolean" }, - "401": { - "description": "Missing or invalid authentication token. Requires a Maskinporten-token with the scope \"digdir:dialogporten.serviceprovider\"." + "seenAt": { + "format": "date-time", + "type": "string" }, - "403": { - "description": "Unauthorized to delete the supplied dialog (not owned by authenticated organization or has additional scope requirements defined in policy)." + "seenBy": { + "$ref": "#/components/schemas/V1EndUserCommonActors_Actor" + } + }, + "type": "object" + }, + "V1EndUserDialogSeenLogsQueriesSearch_SeenLog": { + "additionalProperties": false, + "properties": { + "id": { + "format": "guid", + "type": "string" }, - "404": { - "description": "The given dialog ID was not found or is already deleted.", - "content": { - "application/problem+json": { - "schema": { - "$ref": "#/components/schemas/ProblemDetails" - } - } - } + "isCurrentEndUser": { + "type": "boolean" }, - "410": { - "description": "Entity with the given key(s) is removed." + "isViaServiceOwner": { + "type": "boolean" }, - "412": { - "description": "The supplied If-Match header did not match the current Revision value for the dialog. The request was not applied.", - "content": { - "application/problem+json": { - "schema": { - "$ref": "#/components/schemas/ProblemDetails" - } - } - } + "seenAt": { + "format": "date-time", + "type": "string" + }, + "seenBy": { + "$ref": "#/components/schemas/V1EndUserCommonActors_Actor" } }, - "security": [ - { - "JWTBearerAuth": [] - } - ] + "type": "object" }, - "patch": { - "tags": [ - "Serviceowner" - ], - "summary": "Patch a single dialog", - "description": "Patches a dialog aggregate with a RFC6902 JSON Patch document. The patch document must be a JSON array of RFC6902 operations.\nSee [https://tools.ietf.org/html/rfc6902](https://tools.ietf.org/html/rfc6902) for more information.\n \nOptimistic 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.", - "operationId": "V1ServiceOwnerDialogsPatchDialog", - "parameters": [ - { - "name": "dialogId", - "in": "path", - "required": true, - "schema": { - "type": "string", - "format": "guid" - }, - "x-position": 1 - }, - { - "name": "If-Match", - "x-originalName": "etag", - "in": "header", - "schema": { - "type": "string", - "format": "guid", - "nullable": true - }, - "x-position": 2 - } - ], - "requestBody": { - "x-name": "patchDocument", - "content": { - "application/json": { - "schema": { - "type": "array", - "items": { - "$ref": "#/components/schemas/JsonPatchOperations_Operation" - } + "V1EndUserDialogsQueriesGet_Content": { + "additionalProperties": false, + "properties": { + "additionalInfo": { + "description": "Additional information about the dialog, this may contain Markdown.", + "nullable": true, + "oneOf": [ + { + "$ref": "#/components/schemas/V1CommonContent_ContentValue" } - } + ] }, - "required": true, - "x-position": 3 - }, - "responses": { - "204": { - "description": "Patch was successfully applied.", - "headers": { - "Etag": { - "description": "The new UUID ETag of the dialog", - "schema": { - "type": "string" - }, - "example": "123e4567-e89b-12d3-a456-426614174000" + "extendedStatus": { + "description": "Used as the human-readable label used to describe the \u0022ExtendedStatus\u0022 field.", + "nullable": true, + "oneOf": [ + { + "$ref": "#/components/schemas/V1CommonContent_ContentValue" } - } + ] }, - "400": { - "description": "Validation error occured. See problem details for a list of errors.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ProblemDetails" - } + "mainContentReference": { + "description": "Front-channel embedded content. Used to dynamically embed content in the frontend from an external URL.", + "nullable": true, + "oneOf": [ + { + "$ref": "#/components/schemas/V1CommonContent_ContentValue" } - } - }, - "401": { - "description": "Missing or invalid authentication token. Requires a Maskinporten-token with the scope \\\"digdir:dialogporten.serviceprovider\\\"" - }, - "403": { - "description": "Unauthorized to update a dialog for the given serviceResource (not owned by authenticated organization or has additional scope requirements defined in policy)" + ] }, - "404": { - "description": "The given dialog ID was not found or is deleted", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ProblemDetails" - } + "senderName": { + "description": "Overridden sender name. If not supplied, assume \u0022org\u0022 as the sender name.", + "nullable": true, + "oneOf": [ + { + "$ref": "#/components/schemas/V1CommonContent_ContentValue" } - } + ] }, - "412": { - "description": "The supplied Revision does not match the current Revision of the dialog", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ProblemDetails" - } + "summary": { + "description": "A short summary of the dialog and its current state.", + "oneOf": [ + { + "$ref": "#/components/schemas/V1CommonContent_ContentValue" } - } + ] }, - "422": { - "description": "Domain error occured. See problem details for a list of errors.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ProblemDetails" - } + "title": { + "description": "The title of the dialog.", + "oneOf": [ + { + "$ref": "#/components/schemas/V1CommonContent_ContentValue" } - } + ] } }, - "security": [ - { - "JWTBearerAuth": [] - } - ] - } - }, - "/api/v1/serviceowner/dialogs": { - "get": { - "tags": [ - "Serviceowner" - ], - "summary": "Gets a list of dialogs", - "description": "Performs a search for dialogs, returning a paginated list of dialogs. For more information see the documentation (link TBD).\n\n* All date parameters must contain explicit time zone. Example: 2023-10-27T10:00:00Z or 2023-10-27T10:00:00+01:00\n* See \"continuationToken\" in the response for how to get the next page of results.\n* hasNextPage will be set to true if there are more items to get.", - "operationId": "V1ServiceOwnerDialogsSearch_SearchDialog", - "parameters": [ - { - "name": "serviceResource", - "in": "query", - "style": "form", - "explode": true, - "description": "Filter by one or more service resources", - "schema": { - "type": "array", - "nullable": true, - "items": { - "type": "string" - } - } + "type": "object" + }, + "V1EndUserDialogsQueriesGet_Dialog": { + "additionalProperties": false, + "properties": { + "activities": { + "description": "An immutable list of activities associated with the dialog.", + "items": { + "$ref": "#/components/schemas/V1EndUserDialogsQueriesGet_DialogActivity" + }, + "nullable": true, + "type": "array" }, - { - "name": "party", - "in": "query", - "style": "form", - "explode": true, - "description": "Filter by one or more owning parties", - "schema": { - "type": "array", - "nullable": true, - "items": { - "type": "string" - } - } + "apiActions": { + "description": "The API actions associated with the dialog. Should be used in specialized, non-browser-based integrations.", + "items": { + "$ref": "#/components/schemas/V1EndUserDialogsQueriesGet_DialogApiAction" + }, + "nullable": true, + "type": "array" }, - { - "name": "endUserId", - "in": "query", - "description": "Filter by end user id", - "schema": { - "type": "string", - "nullable": true - } + "attachments": { + "description": "The attachments associated with the dialog (on an aggregate level).", + "items": { + "$ref": "#/components/schemas/V1EndUserDialogsQueriesGet_DialogAttachment" + }, + "nullable": true, + "type": "array" }, - { - "name": "extendedStatus", - "in": "query", - "style": "form", - "explode": true, - "description": "Filter by one or more extended statuses", - "schema": { - "type": "array", - "nullable": true, - "items": { - "type": "string" + "content": { + "description": "The dialog unstructured text content.", + "oneOf": [ + { + "$ref": "#/components/schemas/V1EndUserDialogsQueriesGet_Content" } - } + ] }, - { - "name": "externalReference", - "in": "query", - "description": "Filter by external reference", - "schema": { - "type": "string", - "nullable": true - } + "createdAt": { + "description": "The date and time when the dialog was created.", + "example": "2022-12-31T23:59:59Z", + "format": "date-time", + "type": "string" }, - { - "name": "status", - "in": "query", - "style": "form", - "explode": true, - "description": "Filter by status", - "schema": { - "type": "array", - "nullable": true, - "items": { - "$ref": "#/components/schemas/DialogsEntities_DialogStatus" - } - } + "dialogToken": { + "description": "The dialog token. May be used (if supported) against external URLs referred to in this dialog\u0027s apiActions,\ntransmissions or attachments. It should also be used for front-channel embeds.", + "nullable": true, + "type": "string" }, - { - "name": "createdAfter", - "in": "query", - "description": "Only return dialogs created after this date", - "schema": { - "type": "string", - "format": "date-time", - "nullable": true - } + "dueAt": { + "description": "The due date for the dialog. Dialogs past due date might be marked as such in frontends but will still be available.", + "example": "2022-12-31T23:59:59Z", + "format": "date-time", + "nullable": true, + "type": "string" }, - { - "name": "createdBefore", - "in": "query", - "description": "Only return dialogs created before this date", - "schema": { - "type": "string", - "format": "date-time", - "nullable": true - } + "expiresAt": { + "description": "The expiration date for the dialog. This is the last date when the dialog is available for the end user.\n \nAfter this date is passed, the dialog will be considered expired and no longer available for the end user in any\nAPI. If not supplied, the dialog will be considered to never expire. This field can be changed by the service\nowner after the dialog has been created.", + "example": "2022-12-31T23:59:59Z", + "format": "date-time", + "nullable": true, + "type": "string" }, - { - "name": "updatedAfter", - "in": "query", - "description": "Only return dialogs updated after this date", - "schema": { - "type": "string", - "format": "date-time", - "nullable": true - } + "extendedStatus": { + "description": "Arbitrary string with a service-specific indicator of status, typically used to indicate a fine-grained state of\nthe dialog to further specify the \u0022status\u0022 enum.\n \nRefer to the service-specific documentation provided by the service owner for details on the possible values (if\nin use).", + "nullable": true, + "type": "string" }, - { - "name": "updatedBefore", - "in": "query", - "description": "Only return dialogs updated before this date", - "schema": { - "type": "string", - "format": "date-time", - "nullable": true - } + "externalReference": { + "description": "Arbitrary string with a service-specific reference to an external system or service.\n \nRefer to the service-specific documentation provided by the service owner for details (if in use).", + "nullable": true, + "type": "string" }, - { - "name": "dueAfter", - "in": "query", - "description": "Only return dialogs with due date after this date", - "schema": { - "type": "string", - "format": "date-time", - "nullable": true - } + "guiActions": { + "description": "The GUI actions associated with the dialog. Should be used in browser-based interactive frontends.", + "items": { + "$ref": "#/components/schemas/V1EndUserDialogsQueriesGet_DialogGuiAction" + }, + "nullable": true, + "type": "array" }, - { - "name": "dueBefore", - "in": "query", - "description": "Only return dialogs with due date before this date", - "schema": { - "type": "string", - "format": "date-time", - "nullable": true - } + "id": { + "description": "The unique identifier for the dialog in UUIDv7 format.", + "example": "01913cd5-784f-7d3b-abef-4c77b1f0972d", + "format": "guid", + "type": "string" }, - { - "name": "visibleAfter", - "in": "query", - "description": "Only return dialogs with visible-from date after this date", - "schema": { - "type": "string", - "format": "date-time", - "nullable": true - } + "org": { + "description": "The service owner code representing the organization (service owner) related to this dialog.", + "example": "ske", + "type": "string" }, - { - "name": "visibleBefore", - "in": "query", - "description": "Only return dialogs with visible-from date before this date", - "schema": { - "type": "string", - "format": "date-time", - "nullable": true - } + "party": { + "description": "The party code representing the organization or person that the dialog belongs to in URN format.", + "example": "urn:altinn:person:identifier-no:01125512345\nurn:altinn:organization:identifier-no:912345678", + "type": "string" }, - { - "name": "process", - "in": "query", - "description": "Filter by process", - "schema": { - "type": "string", - "nullable": true - } + "precedingProcess": { + "description": "Optional preceding process identifier to indicate the business process that preceded the process indicated in the \u0022Process\u0022 field. Cannot be set without also \u0022Process\u0022 being set.", + "nullable": true, + "type": "string" + }, + "process": { + "description": "Optional process identifier used to indicate a business process this dialog belongs to.", + "nullable": true, + "type": "string" + }, + "progress": { + "description": "Advisory indicator of progress, represented as 1-100 percentage value. 100% representing a dialog that has come\nto a natural completion (successful or not).", + "format": "int32", + "nullable": true, + "type": "integer" }, - { - "name": "systemLabel", - "in": "query", - "style": "form", - "explode": true, - "description": "Filter by Display state", - "schema": { - "type": "array", - "nullable": true, - "items": { - "$ref": "#/components/schemas/DialogEndUserContextsEntities_SystemLabel" - } - } + "revision": { + "description": "The unique identifier for the revision in UUIDv4 format.", + "example": "a312cb9c-7632-43c2-aa38-69b06aed56ca", + "format": "guid", + "type": "string" }, - { - "name": "search", - "in": "query", - "description": "Search string for free text search. Will attempt to fuzzily match in all free text fields in the aggregate", - "schema": { - "type": "string", - "nullable": true - } + "seenSinceLastUpdate": { + "description": "The list of seen log entries for the dialog newer than the dialog ChangedAt date.", + "items": { + "$ref": "#/components/schemas/V1EndUserDialogsQueriesGet_DialogSeenLog" + }, + "nullable": true, + "type": "array" }, - { - "name": "searchLanguageCode", - "in": "query", - "description": "Limit free text search to texts with this language code, e.g. 'nb', 'en'. Culture codes will be normalized to neutral language codes (ISO 639). Default: search all culture codes", - "schema": { - "type": "string", - "nullable": true - } + "serviceResource": { + "description": "The service identifier for the service that the dialog is related to in URN-format.\nThis corresponds to a service resource in the Altinn Resource Registry.", + "example": "urn:altinn:resource:some-service-identifier", + "type": "string" }, - { - "name": "orderBy", - "in": "query", - "schema": { - "nullable": true, - "oneOf": [ - { - "$ref": "#/components/schemas/OrderSetOfTOrderDefinitionAndTTarget" - } - ] - } + "serviceResourceType": { + "description": "The ServiceResource type, as defined in Altinn Resource Registry (see ResourceType).", + "type": "string" }, - { - "name": "continuationToken", - "in": "query", - "description": "Supply \"continuationToken\" for the response to get the next page of results, if hasNextPage is true", - "schema": { - "nullable": true, - "oneOf": [ - { - "$ref": "#/components/schemas/ContinuationTokenSetOfTOrderDefinitionAndTTarget" - } - ] - } + "status": { + "description": "The aggregated status of the dialog.", + "oneOf": [ + { + "$ref": "#/components/schemas/DialogsEntities_DialogStatus" + } + ] }, - { - "name": "limit", - "in": "query", - "description": "Limit the number of results per page (1-1000, default: 100)", - "schema": { - "type": "integer", - "format": "int32", - "nullable": true - } - } - ], - "responses": { - "200": { - "description": "Successfully returned the dialog list.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/PaginatedListOfV1ServiceOwnerDialogsQueriesSearch_Dialog" - } + "systemLabel": { + "description": "Current display state.", + "oneOf": [ + { + "$ref": "#/components/schemas/DialogEndUserContextsEntities_SystemLabel" } - } + ] }, - "401": { - "description": "Missing or invalid authentication token. Requires a Maskinporten-token with the scope \"digdir:dialogporten.serviceprovider.search\"." + "transmissions": { + "description": "The immutable list of transmissions associated with the dialog.", + "items": { + "$ref": "#/components/schemas/V1EndUserDialogsQueriesGet_DialogTransmission" + }, + "nullable": true, + "type": "array" + }, + "updatedAt": { + "description": "The date and time when the dialog was last updated.", + "example": "2022-12-31T23:59:59Z", + "format": "date-time", + "type": "string" } }, - "security": [ - { - "JWTBearerAuth": [] - } - ] + "type": "object" }, - "post": { - "tags": [ - "Serviceowner" - ], - "summary": "Creates a new dialog", - "description": "The dialog is created with the given configuration. For more information see the documentation (link TBD).\n\nFor detailed information on validation rules, see [the source for CreateDialogCommandValidator](https://github.com/altinn/dialogporten/blob/main/src/Digdir.Domain.Dialogporten.Application/Features/V1/ServiceOwner/Dialogs/Commands/Create/CreateDialogCommandValidator.cs)", - "operationId": "V1ServiceOwnerDialogsCreate_Dialog", - "requestBody": { - "x-name": "dto", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/V1ServiceOwnerDialogsCommandsCreate_Dialog" - } - } + "V1EndUserDialogsQueriesGet_DialogActivity": { + "additionalProperties": false, + "properties": { + "createdAt": { + "description": "The date and time when the activity was created.", + "format": "date-time", + "nullable": true, + "type": "string" }, - "required": true - }, - "responses": { - "201": { - "description": "The UUID of the created dialog aggregate. A relative URL to the newly created activity is set in the \"Location\" header.", - "headers": { - "Etag": { - "description": "The new UUID ETag of the dialog", - "schema": { - "type": "string" - }, - "example": "123e4567-e89b-12d3-a456-426614174000" - } + "description": { + "description": "Unstructured text describing the activity. Only set if the activity type is \u0022Information\u0022.", + "items": { + "$ref": "#/components/schemas/V1CommonLocalizations_Localization" }, - "content": { - "application/json": { - "schema": { - "type": "string" - }, - "example": "018bb8e5-d9d0-7434-8ec5-569a6c8e01fc" - } - } + "nullable": true, + "type": "array" }, - "204": { - "description": "No Content" + "extendedType": { + "description": "An arbitrary URI/URN with a service-specific activity type.\n \nConsult the service-specific documentation provided by the service owner for details (if in use).", + "format": "uri", + "nullable": true, + "type": "string" }, - "400": { - "description": "Validation error occured. See problem details for a list of errors.", - "content": { - "application/problem+json": { - "schema": { - "$ref": "#/components/schemas/ProblemDetails" - } - } - } + "id": { + "description": "The unique identifier for the activity in UUIDv7 format.", + "format": "guid", + "type": "string" }, - "401": { - "description": "Missing or invalid authentication token. Requires a Maskinporten-token with the scope \"digdir:dialogporten.serviceprovider\"." + "performedBy": { + "description": "The actor that performed the activity.", + "oneOf": [ + { + "$ref": "#/components/schemas/V1EndUserCommonActors_Actor" + } + ] }, - "403": { - "description": "Unauthorized to create a dialog for the given serviceResource (not owned by authenticated organization or has additional scope requirements defined in policy)." + "transmissionId": { + "description": "If the activity is related to a particular transmission, this field will contain the transmission identifier.", + "format": "guid", + "nullable": true, + "type": "string" }, - "422": { - "description": "Domain error occured. See problem details for a list of errors.", - "content": { - "application/problem+json": { - "schema": { - "$ref": "#/components/schemas/ProblemDetails" - } + "type": { + "description": "The type of activity.", + "oneOf": [ + { + "$ref": "#/components/schemas/DialogsEntitiesActivities_DialogActivityType" } - } + ] } }, - "security": [ - { - "JWTBearerAuth": [] + "type": "object" + }, + "V1EndUserDialogsQueriesGet_DialogApiAction": { + "additionalProperties": false, + "properties": { + "action": { + "description": "String identifier for the action, corresponding to the \u0022action\u0022 attributeId used in the XACML service policy,\nwhich by default is the policy belonging to the service referred to by \u0022serviceResource\u0022 in the dialog.", + "example": "write", + "type": "string" + }, + "authorizationAttribute": { + "description": "Contains an authorization resource attributeId, that can used in custom authorization rules in the XACML service\npolicy, which by default is the policy belonging to the service referred to by \u0022serviceResource\u0022 in the dialog.\n \nCan also be used to refer to other service policies.", + "example": "mycustomresource\n/* equivalent to the above */\nurn:altinn:subresource:mycustomresource\nurn:altinn:task:Task_1\n/* refer to another service */\nurn:altinn:resource:some-other-service-identifier", + "nullable": true, + "type": "string" + }, + "endpoints": { + "description": "The endpoints associated with the action.", + "items": { + "$ref": "#/components/schemas/V1EndUserDialogsQueriesGet_DialogApiActionEndpoint" + }, + "nullable": true, + "type": "array" + }, + "id": { + "description": "The unique identifier for the action in UUIDv7 format.", + "format": "guid", + "type": "string" + }, + "isAuthorized": { + "description": "True if the authenticated user is authorized for this action. If not, the action will not be available\nand all endpoints will be replaced with a fixed placeholder.", + "type": "boolean" } - ] - } - }, - "/api/v1/serviceowner/dialogs/{dialogId}/actions/purge": { - "post": { - "tags": [ - "Serviceowner" - ], - "summary": "Permanently deletes a dialog", - "description": "Deletes a given dialog (hard delete). For more information see the documentation (link TBD).\n\nOptimistic 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.", - "operationId": "V1ServiceOwnerDialogsPurge_PurgeDialog", - "parameters": [ - { - "name": "dialogId", - "in": "path", - "required": true, - "schema": { - "type": "string", - "format": "guid" - } + }, + "type": "object" + }, + "V1EndUserDialogsQueriesGet_DialogApiActionEndpoint": { + "additionalProperties": false, + "properties": { + "deprecated": { + "description": "Boolean indicating if the endpoint is deprecated. Integrators should migrate to endpoints with a higher version.", + "type": "boolean" + }, + "documentationUrl": { + "description": "Link to service provider documentation for the endpoint. Used for service owners to provide documentation for\nintegrators. Should be a URL to a human-readable page.", + "format": "uri", + "nullable": true, + "type": "string" }, - { - "name": "if-Match", - "in": "header", - "schema": { - "type": "string", - "format": "guid", - "nullable": true - } - } - ], - "responses": { - "204": { - "description": "The dialog aggregate was deleted successfully." + "httpMethod": { + "description": "The HTTP method that the endpoint expects for this action.", + "oneOf": [ + { + "$ref": "#/components/schemas/Http_HttpVerb" + } + ] }, - "401": { - "description": "Missing or invalid authentication token. Requires a Maskinporten-token with the scope \"digdir:dialogporten.serviceprovider\"." + "id": { + "description": "The unique identifier for the endpoint in UUIDv7 format.", + "format": "guid", + "type": "string" }, - "403": { - "description": "Unauthorized to delete the supplied dialog (not owned by authenticated organization or has additional scope requirements defined in policy)." + "requestSchema": { + "description": "Link to the request schema for the endpoint. Used by service owners to provide documentation for integrators.\nDialogporten will not validate information on this endpoint.", + "format": "uri", + "nullable": true, + "type": "string" }, - "404": { - "description": "The given dialog ID was not found or is already deleted.", - "content": { - "application/problem+json": { - "schema": { - "$ref": "#/components/schemas/ProblemDetails" - } - } - } + "responseSchema": { + "description": "Link to the response schema for the endpoint. Used for service owners to provide documentation for integrators.\nDialogporten will not validate information on this endpoint.", + "format": "uri", + "nullable": true, + "type": "string" }, - "412": { - "description": "The supplied If-Match header did not match the current Revision value for the dialog. The request was not applied.", - "content": { - "application/problem+json": { - "schema": { - "$ref": "#/components/schemas/ProblemDetails" - } - } - } + "sunsetAt": { + "description": "Date and time when the service owner has indicated that endpoint will no longer function. Only set if the endpoint\nis deprecated. Dialogporten will not enforce this date.", + "format": "date-time", + "nullable": true, + "type": "string" + }, + "url": { + "description": "The fully qualified URL of the API endpoint. Will be set to \u0022urn:dialogporten:unauthorized\u0022 if the user is\nnot authorized to perform the action.", + "example": "https://someendpoint.com/api/v1/someaction\nurn:dialogporten:unauthorized", + "format": "uri", + "type": "string" + }, + "version": { + "description": "Arbitrary string indicating the version of the endpoint.\n \nConsult the service-specific documentation provided by the service owner for details (if in use).", + "nullable": true, + "type": "string" } }, - "security": [ - { - "JWTBearerAuth": [] - } - ] - } - }, - "/api/v1/serviceowner/dialogs/{dialogId}/activities": { - "get": { - "tags": [ - "Serviceowner" - ], - "summary": "Gets a list of dialog activities", - "description": "Gets the list of activities belonging to a dialog", - "operationId": "V1ServiceOwnerDialogActivitiesSearch_SearchDialogActivity", - "parameters": [ - { - "name": "dialogId", - "in": "path", - "required": true, - "schema": { - "type": "string", - "format": "guid" - } + "type": "object" + }, + "V1EndUserDialogsQueriesGet_DialogAttachment": { + "additionalProperties": false, + "properties": { + "displayName": { + "description": "The display name of the attachment that should be used in GUIs.", + "items": { + "$ref": "#/components/schemas/V1CommonLocalizations_Localization" + }, + "nullable": true, + "type": "array" + }, + "id": { + "description": "The unique identifier for the attachment in UUIDv7 format.", + "format": "guid", + "type": "string" + }, + "urls": { + "description": "The URLs associated with the attachment, each referring to a different representation of the attachment.", + "items": { + "$ref": "#/components/schemas/V1EndUserDialogsQueriesGet_DialogAttachmentUrl" + }, + "nullable": true, + "type": "array" } - ], - "responses": { - "200": { - "description": "Successfully returned the dialog activity list.", - "content": { - "application/json": { - "schema": { - "type": "array", - "items": { - "$ref": "#/components/schemas/V1ServiceOwnerDialogActivitiesQueriesSearch_Activity" - } - } + }, + "type": "object" + }, + "V1EndUserDialogsQueriesGet_DialogAttachmentUrl": { + "additionalProperties": false, + "properties": { + "consumerType": { + "description": "What type of consumer the URL is intended for.", + "oneOf": [ + { + "$ref": "#/components/schemas/Attachments_AttachmentUrlConsumerType" } - } + ] }, - "401": { - "description": "Missing or invalid authentication token. Requires a Maskinporten-token with the scope \"digdir:dialogporten.serviceprovider\"." + "id": { + "description": "The unique identifier for the attachment URL in UUIDv7 format.", + "format": "guid", + "type": "string" }, - "403": { - "description": "Unauthorized to get the supplied dialog (not owned by authenticated organization or has additional scope requirements defined in policy)." + "mediaType": { + "description": "The media type of the attachment.", + "example": "application/pdf\napplication/zip", + "nullable": true, + "type": "string" + }, + "url": { + "description": "The fully qualified URL of the attachment.", + "example": "https://someendpoint.com/someattachment.pdf", + "format": "uri", + "type": "string" } }, - "security": [ - { - "JWTBearerAuth": [] - } - ] + "type": "object" }, - "post": { - "tags": [ - "Serviceowner" - ], - "summary": "Adds a activity to a dialogs activity history", - "description": "The activity is created with the given configuration. For more information see the documentation (link TBD).\n\nOptimistic 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.", - "operationId": "V1ServiceOwnerDialogActivitiesCreate_DialogActivity", - "parameters": [ - { - "name": "dialogId", - "in": "path", - "required": true, - "schema": { - "type": "string", - "format": "guid" - } + "V1EndUserDialogsQueriesGet_DialogGuiAction": { + "additionalProperties": false, + "properties": { + "action": { + "description": "The action identifier for the action, corresponding to the \u0022action\u0022 attributeId used in the XACML service policy.", + "type": "string" }, - { - "name": "if-Match", - "in": "header", - "schema": { - "type": "string", - "format": "guid", - "nullable": true - } - } - ], - "requestBody": { - "x-name": "CreateActivityRequest", - "description": "", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/V1ServiceOwnerDialogActivitiesCreate_ActivityRequest" - } - } + "authorizationAttribute": { + "description": "Contains an authorization resource attributeId, that can used in custom authorization rules in the XACML service\npolicy, which by default is the policy belonging to the service referred to by \u0022serviceResource\u0022 in the dialog.\n \nCan also be used to refer to other service policies.", + "example": "mycustomresource\n/* equivalent to the above */\nurn:altinn:subresource:mycustomresource\nurn:altinn:task:Task_1\n/* refer to another service */\nurn:altinn:resource:some-other-service-identifier", + "nullable": true, + "type": "string" }, - "required": true, - "x-position": 1 - }, - "responses": { - "201": { - "description": "The UUID of the created dialog activity. A relative URL to the newly created activity is set in the \"Location\" header.", - "headers": { - "Etag": { - "description": "The new UUID ETag of the dialog", - "schema": { - "type": "string" - }, - "example": "123e4567-e89b-12d3-a456-426614174000" - } - }, - "content": { - "application/json": { - "schema": { - "type": "string" - }, - "example": "018bb8e5-d9d0-7434-8ec5-569a6c8e01fc" + "httpMethod": { + "description": "The HTTP method that the frontend should use when redirecting the user.", + "oneOf": [ + { + "$ref": "#/components/schemas/Http_HttpVerb" } - } + ] }, - "204": { - "description": "No Content" + "id": { + "description": "The unique identifier for the action in UUIDv7 format.", + "format": "guid", + "type": "string" }, - "400": { - "description": "Validation error occured. See problem details for a list of errors.", - "content": { - "application/problem+json": { - "schema": { - "$ref": "#/components/schemas/ProblemDetails" - } + "isAuthorized": { + "description": "Whether the user is authorized to perform the action.", + "type": "boolean" + }, + "isDeleteDialogAction": { + "description": "Indicates whether the action results in the dialog being deleted. Used by frontends to implement custom UX\nfor delete actions.", + "type": "boolean" + }, + "priority": { + "description": "Indicates a priority for the action, making it possible for frontends to adapt GUI elements based on action\npriority.", + "oneOf": [ + { + "$ref": "#/components/schemas/DialogsEntitiesActions_DialogGuiActionPriority" } - } + ] }, - "401": { - "description": "Missing or invalid authentication token. Requires a Maskinporten-token with the scope \"digdir:dialogporten.serviceprovider\"." + "prompt": { + "description": "If there should be a prompt asking the user for confirmation before the action is executed,\nthis field should contain the prompt text.", + "items": { + "$ref": "#/components/schemas/V1CommonLocalizations_Localization" + }, + "nullable": true, + "type": "array" }, - "403": { - "description": "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)." + "title": { + "description": "The title of the action, this should be short and in verb form.", + "items": { + "$ref": "#/components/schemas/V1CommonLocalizations_Localization" + }, + "nullable": true, + "type": "array" + }, + "url": { + "description": "The fully qualified URL of the action, to which the user will be redirected when the action is triggered. Will be set to\n\u0022urn:dialogporten:unauthorized\u0022 if the user is not authorized to perform the action.", + "example": "urn:dialogporten:unauthorized\nhttps://someendpoint.com/gui/some-service-instance-id", + "format": "uri", + "type": "string" + } + }, + "type": "object" + }, + "V1EndUserDialogsQueriesGet_DialogSeenLog": { + "additionalProperties": false, + "properties": { + "id": { + "description": "The unique identifier for the seen log entry in UUIDv7 format.", + "format": "guid", + "type": "string" }, - "404": { - "description": "The given dialog ID was not found or is already deleted.", - "content": { - "application/problem+json": { - "schema": { - "$ref": "#/components/schemas/ProblemDetails" - } - } - } + "isCurrentEndUser": { + "description": "Flag indicating whether the seen log entry was created by the current end user.", + "type": "boolean" }, - "410": { - "description": "Entity with the given key(s) is removed." + "isViaServiceOwner": { + "description": "Flag indicating whether the seen log entry was created via the service owner.\n \nThis is used when the service owner uses the service owner API to implement its own frontend.", + "nullable": true, + "type": "boolean" }, - "412": { - "description": "The supplied If-Match header did not match the current Revision value for the dialog. The request was not applied.", - "content": { - "application/problem+json": { - "schema": { - "$ref": "#/components/schemas/ProblemDetails" - } - } - } + "seenAt": { + "description": "The timestamp when the dialog revision was seen.", + "format": "date-time", + "type": "string" }, - "422": { - "description": "Domain error occured. See problem details for a list of errors.", - "content": { - "application/problem+json": { - "schema": { - "$ref": "#/components/schemas/ProblemDetails" - } + "seenBy": { + "description": "The actor that saw the dialog revision.", + "oneOf": [ + { + "$ref": "#/components/schemas/V1EndUserCommonActors_Actor" } - } + ] } }, - "security": [ - { - "JWTBearerAuth": [] - } - ] - } - }, - "/api/v1/serviceowner/dialogs/{dialogId}/actions/should-send-notification": { - "get": { - "tags": [ - "Serviceowner" - ], - "summary": "Returns a boolean value based on conditions used to determine if a notification is to be sent", - "description": "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.", - "operationId": "V1ServiceOwnerDialogActivitiesNotificationCondition_NotificationCondition", - "parameters": [ - { - "name": "dialogId", - "in": "path", - "required": true, - "schema": { - "type": "string", - "format": "guid" - } - }, - { - "name": "conditionType", - "in": "query", - "required": true, - "schema": { - "allOf": [ - { - "$ref": "#/components/schemas/V1ServiceOwnerDialogActivitiesQueriesNotificationCondition_NotificationConditionType" - } - ] - } + "type": "object" + }, + "V1EndUserDialogsQueriesGet_DialogTransmission": { + "additionalProperties": false, + "properties": { + "attachments": { + "description": "The transmission-level attachments.", + "items": { + "$ref": "#/components/schemas/V1EndUserDialogsQueriesGet_DialogTransmissionAttachment" + }, + "nullable": true, + "type": "array" }, - { - "name": "activityType", - "in": "query", - "required": true, - "schema": { - "allOf": [ - { - "$ref": "#/components/schemas/DialogsEntitiesActivities_DialogActivityType" - } - ] - } + "authorizationAttribute": { + "description": "Contains an authorization resource attributeId, that can used in custom authorization rules in the XACML service\npolicy, which by default is the policy belonging to the service referred to by \u0022serviceResource\u0022 in the dialog.\n \nCan also be used to refer to other service policies.", + "example": "mycustomresource\n/* equivalent to the above */\nurn:altinn:subresource:mycustomresource\nurn:altinn:task:Task_1\n/* refer to another service */\nurn:altinn:resource:some-other-service-identifier", + "nullable": true, + "type": "string" }, - { - "name": "transmissionId", - "in": "query", - "schema": { - "type": "string", - "format": "guid", - "nullable": true - } - } - ], - "responses": { - "200": { - "description": "Successfully returned the notification determination.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/V1ServiceOwnerDialogActivitiesQueriesNotificationCondition_NotificationCondition" - } + "content": { + "description": "The transmission unstructured text content.", + "oneOf": [ + { + "$ref": "#/components/schemas/V1EndUserDialogsQueriesGet_DialogTransmissionContent" } - } + ] }, - "401": { - "description": "Missing or invalid authentication token. Requires a Maskinporten-token with the scope \"altinn:system/notifications.condition.check\"." + "createdAt": { + "description": "The date and time when the transmission was created.", + "format": "date-time", + "type": "string" }, - "403": { - "description": "Forbidden" - } - }, - "security": [ - { - "JWTBearerAuth": [] - } - ] - } - }, - "/api/v1/serviceowner/dialogs/{dialogId}/activities/{activityId}": { - "get": { - "tags": [ - "Serviceowner" - ], - "summary": "Gets a single dialog activity", - "description": "Gets a single activity belonging to a dialog. For more information see the documentation (link TBD).", - "operationId": "V1ServiceOwnerDialogActivitiesGet_GetDialogActivity", - "parameters": [ - { - "name": "dialogId", - "in": "path", - "required": true, - "schema": { - "type": "string", - "format": "guid" - } + "extendedType": { + "description": "Arbitrary URI/URN describing a service-specific transmission type.\n \nRefer to the service-specific documentation provided by the service owner for details (if in use).", + "format": "uri", + "nullable": true, + "type": "string" }, - { - "name": "activityId", - "in": "path", - "required": true, - "schema": { - "type": "string", - "format": "guid" - } - } - ], - "responses": { - "200": { - "description": "Successfully returned the dialog activity.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/V1ServiceOwnerDialogActivitiesQueriesGet_Activity" - } - } - } + "id": { + "description": "The unique identifier for the transmission in UUIDv7 format.", + "format": "guid", + "type": "string" }, - "401": { - "description": "Missing or invalid authentication token. Requires a Maskinporten-token with the scope \"digdir:dialogporten.serviceprovider\"." + "isAuthorized": { + "description": "Flag indicating if the authenticated user is authorized for this transmission. If not, embedded content and\nthe attachments will not be available.", + "type": "boolean" }, - "403": { - "description": "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)." + "relatedTransmissionId": { + "description": "Reference to any other transmission that this transmission is related to.", + "format": "guid", + "nullable": true, + "type": "string" }, - "404": { - "description": "The given dialog ID was not found or was deleted, or the given activity ID was not found.", - "content": { - "application/problem+json": { - "schema": { - "$ref": "#/components/schemas/ProblemDetails" - } + "sender": { + "description": "The actor that sent the transmission.", + "oneOf": [ + { + "$ref": "#/components/schemas/V1EndUserCommonActors_Actor" } - } + ] }, - "410": { - "description": "Entity with the given key(s) is removed." + "type": { + "description": "The type of transmission.", + "oneOf": [ + { + "$ref": "#/components/schemas/DialogsEntitiesTransmissions_DialogTransmissionType" + } + ] } }, - "security": [ - { - "JWTBearerAuth": [] - } - ] - } - }, - "/api/v1/enduser/parties": { - "get": { - "tags": [ - "Enduser" - ], - "summary": "Gets the list of authorized parties for the end user", - "description": "Gets the list of authorized parties for the end user. For more information see the documentation (link TBD).", - "operationId": "V1EndUserPartiesGet_GetParties", - "responses": { - "200": { - "description": "The list of authorized parties for the end user", - "content": { - "application/json": { - "schema": { - "type": "array", - "items": { - "$ref": "#/components/schemas/V1EndUserPartiesQueriesGet_Parties" - } - } - } - } + "type": "object" + }, + "V1EndUserDialogsQueriesGet_DialogTransmissionAttachment": { + "additionalProperties": false, + "properties": { + "displayName": { + "description": "The display name of the attachment that should be used in GUIs.", + "items": { + "$ref": "#/components/schemas/V1CommonLocalizations_Localization" + }, + "nullable": true, + "type": "array" }, - "401": { - "description": "Unauthorized" + "id": { + "description": "The unique identifier for the attachment in UUIDv7 format.", + "format": "guid", + "type": "string" }, - "403": { - "description": "Forbidden" + "urls": { + "description": "The URLs associated with the attachment, each referring to a different representation of the attachment.", + "items": { + "$ref": "#/components/schemas/V1EndUserDialogsQueriesGet_DialogTransmissionAttachmentUrl" + }, + "nullable": true, + "type": "array" } }, - "security": [ - { - "JWTBearerAuth": [] - } - ] - } - }, - "/api/v1/enduser/dialogs/{dialogId}/transmissions": { - "get": { - "tags": [ - "Enduser" - ], - "summary": "Gets a list of dialog transmissions", - "description": "Gets the list of transmissions belonging to a dialog", - "operationId": "V1EndUserDialogTransmissionsSearch_SearchDialogTransmission", - "parameters": [ - { - "name": "dialogId", - "in": "path", - "required": true, - "schema": { - "type": "string", - "format": "guid" - } - } - ], - "responses": { - "200": { - "description": "Successfully returned the dialog transmission list.", - "content": { - "application/json": { - "schema": { - "type": "array", - "items": { - "$ref": "#/components/schemas/V1EndUserDialogTransmissionsQueriesSearch_Transmission" - } - } + "type": "object" + }, + "V1EndUserDialogsQueriesGet_DialogTransmissionAttachmentUrl": { + "additionalProperties": false, + "properties": { + "consumerType": { + "description": "The type of consumer the URL is intended for.", + "oneOf": [ + { + "$ref": "#/components/schemas/Attachments_AttachmentUrlConsumerType" } - } + ] }, - "401": { - "description": "Missing or invalid authentication token. Requires a Maskinporten-token with the scope \"digdir:dialogporten\"." + "mediaType": { + "description": "The media type of the attachment.", + "example": "application/pdf\napplication/zip", + "nullable": true, + "type": "string" }, - "403": { - "description": "Unauthorized to get the supplied dialog (not owned by authenticated organization or has additional scope requirements defined in policy)." + "url": { + "description": "The fully qualified URL of the attachment. Will be set to \u0022urn:dialogporten:unauthorized\u0022 if the user is\nnot authorized to access the transmission.", + "example": "https://someendpoint.com/someattachment.pdf\nurn:dialogporten:unauthorized", + "format": "uri", + "type": "string" } }, - "security": [ - { - "JWTBearerAuth": [] - } - ] - } - }, - "/api/v1/enduser/dialogs/{dialogId}/transmissions/{transmissionId}": { - "get": { - "tags": [ - "Enduser" - ], - "summary": "Gets a single dialog transmission", - "description": "Gets a single transmission belonging to a dialog. For more information see the documentation (link TBD).", - "operationId": "V1EndUserDialogTransmissionsGet_GetDialogTransmission", - "parameters": [ - { - "name": "dialogId", - "in": "path", - "required": true, - "schema": { - "type": "string", - "format": "guid" - } + "type": "object" + }, + "V1EndUserDialogsQueriesGet_DialogTransmissionContent": { + "additionalProperties": false, + "properties": { + "contentReference": { + "description": "Front-channel embedded content. Used to dynamically embed content in the frontend from an external URL.\nAllowed media types: application/vnd.dialogporten.frontchannelembed\u002Bjson;type=markdown", + "nullable": true, + "oneOf": [ + { + "$ref": "#/components/schemas/V1CommonContent_ContentValue" + } + ] }, - { - "name": "transmissionId", - "in": "path", - "required": true, - "schema": { - "type": "string", - "format": "guid" - } + "summary": { + "description": "The transmission summary.", + "oneOf": [ + { + "$ref": "#/components/schemas/V1CommonContent_ContentValue" + } + ] + }, + "title": { + "description": "The transmission title.", + "oneOf": [ + { + "$ref": "#/components/schemas/V1CommonContent_ContentValue" + } + ] } - ], - "responses": { - "200": { - "description": "Successfully returned the dialog transmission.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/V1EndUserDialogTransmissionsQueriesGet_Transmission" - } + }, + "type": "object" + }, + "V1EndUserDialogsQueriesSearch_Content": { + "additionalProperties": false, + "properties": { + "extendedStatus": { + "description": "Used as the human-readable label used to describe the \u0022ExtendedStatus\u0022 field.", + "nullable": true, + "oneOf": [ + { + "$ref": "#/components/schemas/V1CommonContent_ContentValue" } - } + ] }, - "401": { - "description": "Missing or invalid authentication token. Requires a Maskinporten-token with the scope \"digdir:dialogporten\"." + "senderName": { + "description": "Overridden sender name. If not supplied, assume \u0022org\u0022 as the sender name.", + "nullable": true, + "oneOf": [ + { + "$ref": "#/components/schemas/V1CommonContent_ContentValue" + } + ] }, - "403": { - "description": "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)." + "summary": { + "description": "A short summary of the dialog and its current state.", + "oneOf": [ + { + "$ref": "#/components/schemas/V1CommonContent_ContentValue" + } + ] }, - "404": { - "description": "The given dialog ID was not found or was deleted, or the given transmission ID was not found.", - "content": { - "application/problem+json": { - "schema": { - "$ref": "#/components/schemas/ProblemDetails" - } + "title": { + "description": "The title of the dialog.", + "oneOf": [ + { + "$ref": "#/components/schemas/V1CommonContent_ContentValue" } - } + ] } }, - "security": [ - { - "JWTBearerAuth": [] - } - ] - } - }, - "/api/v1/enduser/dialogs/{dialogId}/systemlabels": { - "put": { - "tags": [ - "Enduser" - ], - "operationId": "V1EndUserDialogSystemLabelsSet_SetDialogSystemLabel", - "parameters": [ - { - "name": "dialogId", - "in": "path", - "required": true, - "schema": { - "type": "string", - "format": "guid" - } - } - ], - "requestBody": { - "x-name": "SystemLabelCommand", - "description": "", + "type": "object" + }, + "V1EndUserDialogsQueriesSearch_Dialog": { + "additionalProperties": false, + "properties": { "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/V1EndUserDialogSystemLabelsCommandsSet_SystemLabelCommand" + "description": "The content of the dialog in search results.", + "oneOf": [ + { + "$ref": "#/components/schemas/V1EndUserDialogsQueriesSearch_Content" } - } + ] + }, + "createdAt": { + "description": "The date and time when the dialog was created.", + "example": "2022-12-31T23:59:59Z", + "format": "date-time", + "type": "string" + }, + "dueAt": { + "description": "The due date for the dialog. This is the last date when the dialog is expected to be completed.", + "example": "2022-12-31T23:59:59Z", + "format": "date-time", + "nullable": true, + "type": "string" + }, + "extendedStatus": { + "description": "Arbitrary string with a service-specific indicator of status, typically used to indicate a fine-grained state of\nthe dialog to further specify the \u0022status\u0022 enum.\n \nRefer to the service-specific documentation provided by the service owner for details on the possible values (if\nin use).", + "nullable": true, + "type": "string" + }, + "externalReference": { + "description": "Arbitrary string with a service-specific reference to an external system or service.\n \nRefer to the service-specific documentation provided by the service owner for details (if in use).", + "nullable": true, + "type": "string" + }, + "guiAttachmentCount": { + "description": "The number of attachments in the dialog made available for browser-based frontends.", + "format": "int32", + "nullable": true, + "type": "integer" + }, + "id": { + "description": "The unique identifier for the dialog in UUIDv7 format.", + "example": "01913cd5-784f-7d3b-abef-4c77b1f0972d", + "format": "guid", + "type": "string" + }, + "latestActivity": { + "description": "The latest entry in the dialog\u0027s activity log.", + "nullable": true, + "oneOf": [ + { + "$ref": "#/components/schemas/V1EndUserDialogsQueriesSearch_DialogActivity" + } + ] + }, + "org": { + "description": "The service owner code representing the organization (service owner) related to this dialog.", + "example": "ske", + "type": "string" + }, + "party": { + "description": "The party code representing the organization or person that the dialog belongs to in URN format.", + "example": "urn:altinn:person:identifier-no:01125512345\nurn:altinn:organization:identifier-no:912345678", + "type": "string" + }, + "precedingProcess": { + "description": "Optional preceding process identifier to indicate the business process that preceded the process indicated in the \u0022Process\u0022 field. Cannot be set without also \u0022Process\u0022 being set.", + "nullable": true, + "type": "string" + }, + "process": { + "description": "Optional process identifier used to indicate a business process this dialog belongs to.", + "nullable": true, + "type": "string" }, - "required": true, - "x-position": 1 - }, - "responses": { - "204": { - "description": "No Content" + "progress": { + "description": "Advisory indicator of progress, represented as 1-100 percentage value. 100% representing a dialog that has come\nto a natural completion (successful or not).", + "format": "int32", + "nullable": true, + "type": "integer" }, - "400": { - "description": "Bad Request", - "content": { - "application/problem+json": { - "schema": { - "$ref": "#/components/schemas/ProblemDetails" - } - } - } + "seenSinceLastUpdate": { + "description": "The list of seen log entries for the dialog newer than the dialog ChangedAt date.", + "items": { + "$ref": "#/components/schemas/V1EndUserDialogsQueriesSearch_DialogSeenLog" + }, + "nullable": true, + "type": "array" }, - "401": { - "description": "Unauthorized" + "serviceResource": { + "description": "The service identifier for the service that the dialog is related to in URN-format.\nThis corresponds to a service resource in the Altinn Resource Registry.", + "example": "urn:altinn:resource:some-service-identifier", + "type": "string" }, - "403": { - "description": "Forbidden" + "serviceResourceType": { + "description": "The ServiceResource type, as defined in Altinn Resource Registry (see ResourceType).", + "type": "string" }, - "404": { - "description": "Not Found", - "content": { - "application/problem+json": { - "schema": { - "$ref": "#/components/schemas/ProblemDetails" - } + "status": { + "description": "The aggregated status of the dialog.", + "oneOf": [ + { + "$ref": "#/components/schemas/DialogsEntities_DialogStatus" } - } + ] }, - "410": { - "description": "" + "systemLabel": { + "description": "Current display state.", + "oneOf": [ + { + "$ref": "#/components/schemas/DialogEndUserContextsEntities_SystemLabel" + } + ] }, - "412": { - "description": "", - "content": { - "application/problem+json": { - "schema": { - "$ref": "#/components/schemas/ProblemDetails" - } + "updatedAt": { + "description": "The date and time when the dialog was last updated.", + "example": "2022-12-31T23:59:59Z", + "format": "date-time", + "type": "string" + } + }, + "type": "object" + }, + "V1EndUserDialogsQueriesSearch_DialogActivity": { + "additionalProperties": false, + "properties": { + "createdAt": { + "description": "The date and time when the activity was created.", + "format": "date-time", + "nullable": true, + "type": "string" + }, + "description": { + "description": "Unstructured text describing the activity. Only set if the activity type is \u0022Information\u0022.", + "items": { + "$ref": "#/components/schemas/V1CommonLocalizations_Localization" + }, + "nullable": true, + "type": "array" + }, + "extendedType": { + "description": "An arbitrary string with a service-specific activity type.\n \nConsult the service-specific documentation provided by the service owner for details (if in use).", + "format": "uri", + "nullable": true, + "type": "string" + }, + "id": { + "description": "The unique identifier for the activity in UUIDv7 format.", + "format": "guid", + "type": "string" + }, + "performedBy": { + "description": "The actor that performed the activity.", + "oneOf": [ + { + "$ref": "#/components/schemas/V1EndUserCommonActors_Actor" } - } + ] }, - "422": { - "description": "", - "content": { - "application/problem+json": { - "schema": { - "$ref": "#/components/schemas/ProblemDetails" - } + "transmissionId": { + "description": "If the activity is related to a particular transmission, this field will contain the transmission identifier.", + "format": "guid", + "nullable": true, + "type": "string" + }, + "type": { + "description": "The type of activity.", + "oneOf": [ + { + "$ref": "#/components/schemas/DialogsEntitiesActivities_DialogActivityType" } - } + ] } }, - "security": [ - { - "JWTBearerAuth": [] - } - ] - } - }, - "/api/v1/enduser/dialogs/{dialogId}/seenlog": { - "get": { - "tags": [ - "Enduser" - ], - "summary": "Gets all seen log records for a dialog", - "description": "Gets all seen log records for a dialog. For more information see the documentation (link TBD).", - "operationId": "V1EndUserDialogSeenLogsSearch_SearchDialogSeenLog", - "parameters": [ - { - "name": "dialogId", - "in": "path", - "required": true, - "schema": { - "type": "string", - "format": "guid" - } - } - ], - "responses": { - "200": { - "description": "Successfully returned the dialog seen log records.", - "content": { - "application/json": { - "schema": { - "type": "array", - "items": { - "$ref": "#/components/schemas/V1EndUserDialogSeenLogsQueriesSearch_SeenLog" - } - } - } - } + "type": "object" + }, + "V1EndUserDialogsQueriesSearch_DialogSeenLog": { + "additionalProperties": false, + "properties": { + "id": { + "description": "The unique identifier for the seen log entry in UUIDv7 format.", + "format": "guid", + "type": "string" }, - "401": { - "description": "Missing or invalid authentication token. Requires a Maskinporten-token with the scope \"digdir:dialogporten\"." + "isCurrentEndUser": { + "description": "Flag indicating whether the seen log entry was created by the current end user.", + "type": "boolean" }, - "403": { - "description": "Forbidden" + "isViaServiceOwner": { + "description": "Flag indicating whether the seen log entry was created via the service owner.\n \nThis is used when the service owner uses the service owner API to implement its own frontend.", + "nullable": true, + "type": "boolean" }, - "404": { - "description": "Not Found", - "content": { - "application/problem+json": { - "schema": { - "$ref": "#/components/schemas/ProblemDetails" - } + "seenAt": { + "description": "The timestamp when the dialog revision was seen.", + "format": "date-time", + "type": "string" + }, + "seenBy": { + "description": "The actor that saw the dialog revision.", + "oneOf": [ + { + "$ref": "#/components/schemas/V1EndUserCommonActors_Actor" } - } + ] } }, - "security": [ - { - "JWTBearerAuth": [] - } - ] - } - }, - "/api/v1/enduser/dialogs/{dialogId}/seenlog/{seenLogId}": { - "get": { - "tags": [ - "Enduser" - ], - "summary": "Gets a single dialog seen log record", - "description": "Gets a single dialog seen log record. For more information see the documentation (link TBD).", - "operationId": "V1EndUserDialogSeenLogsGet_GetDialogSeenLog", - "parameters": [ - { - "name": "dialogId", - "in": "path", - "required": true, - "schema": { - "type": "string", - "format": "guid" - } + "type": "object" + }, + "V1EndUserDialogSystemLabelsCommandsSet_SystemLabelCommand": { + "additionalProperties": false, + "properties": { + "ifMatchDialogRevision": { + "format": "guid", + "nullable": true, + "type": "string" }, - { - "name": "seenLogId", - "in": "path", - "required": true, - "schema": { - "type": "string", - "format": "guid" - } + "label": { + "$ref": "#/components/schemas/DialogEndUserContextsEntities_SystemLabel" } - ], - "responses": { - "200": { - "description": "Successfully returned the dialog seen log record.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/V1EndUserDialogSeenLogsQueriesGet_SeenLog" - } + }, + "type": "object" + }, + "V1EndUserDialogTransmissionsQueriesGet_Attachment": { + "additionalProperties": false, + "properties": { + "displayName": { + "description": "The display name of the attachment that should be used in GUIs.", + "items": { + "$ref": "#/components/schemas/V1CommonLocalizations_Localization" + }, + "nullable": true, + "type": "array" + }, + "id": { + "description": "The unique identifier for the attachment in UUIDv7 format.", + "format": "guid", + "type": "string" + }, + "urls": { + "description": "The URLs associated with the attachment, each referring to a different representation of the attachment.", + "items": { + "$ref": "#/components/schemas/V1EndUserDialogTransmissionsQueriesGet_AttachmentUrl" + }, + "nullable": true, + "type": "array" + } + }, + "type": "object" + }, + "V1EndUserDialogTransmissionsQueriesGet_AttachmentUrl": { + "additionalProperties": false, + "properties": { + "consumerType": { + "description": "The type of consumer the URL is intended for.", + "oneOf": [ + { + "$ref": "#/components/schemas/Attachments_AttachmentUrlConsumerType" } - } + ] }, - "401": { - "description": "Missing or invalid authentication token. Requires a Maskinporten-token with the scope \"digdir:dialogporten\"." + "id": { + "description": "The unique identifier for the attachment URL in UUIDv7 format.", + "format": "guid", + "type": "string" }, - "403": { - "description": "Forbidden" + "mediaType": { + "description": "The media type of the attachment.", + "example": "application/pdf\napplication/zip", + "nullable": true, + "type": "string" }, - "404": { - "description": "Not Found", - "content": { - "application/problem+json": { - "schema": { - "$ref": "#/components/schemas/ProblemDetails" - } - } - } + "url": { + "description": "The fully qualified URL of the attachment. Will be set to \u0022urn:dialogporten:unauthorized\u0022 if the user is\nnot authorized to access the transmission.", + "example": "https://someendpoint.com/someattachment.pdf\nurn:dialogporten:unauthorized", + "format": "uri", + "type": "string" } }, - "security": [ - { - "JWTBearerAuth": [] - } - ] - } - }, - "/api/v1/enduser/dialogs": { - "get": { - "tags": [ - "Enduser" - ], - "summary": "Gets a list of dialogs", - "description": "Performs a search for dialogs, returning a paginated list of dialogs. For more information see the documentation (link TBD).\n\n* All date parameters must contain explicit time zone. Example: 2023-10-27T10:00:00Z or 2023-10-27T10:00:00+01:00\n* See \"continuationToken\" in the response for how to get the next page of results.\n* hasNextPage will be set to true if there are more items to get.", - "operationId": "V1EndUserDialogsSearch_SearchDialog", - "parameters": [ - { - "name": "org", - "in": "query", - "style": "form", - "explode": true, - "description": "Filter by one or more service owner codes", - "schema": { - "type": "array", - "nullable": true, - "items": { - "type": "string" - } - } - }, - { - "name": "serviceResource", - "in": "query", - "style": "form", - "explode": true, - "description": "Filter by one or more service resources", - "schema": { - "type": "array", - "nullable": true, - "items": { - "type": "string" + "type": "object" + }, + "V1EndUserDialogTransmissionsQueriesGet_Content": { + "additionalProperties": false, + "properties": { + "contentReference": { + "description": "Front-channel embedded content. Used to dynamically embed content in the frontend from an external URL.\nAllowed media types: application/vnd.dialogporten.frontchannelembed\u002Bjson;type=markdown", + "nullable": true, + "oneOf": [ + { + "$ref": "#/components/schemas/V1CommonContent_ContentValue" } - } + ] }, - { - "name": "party", - "in": "query", - "style": "form", - "explode": true, - "description": "Filter by one or more owning parties", - "schema": { - "type": "array", - "nullable": true, - "items": { - "type": "string" + "summary": { + "description": "The summary of the content.", + "oneOf": [ + { + "$ref": "#/components/schemas/V1CommonContent_ContentValue" } - } + ] }, - { - "name": "extendedStatus", - "in": "query", - "style": "form", - "explode": true, - "description": "Filter by one or more extended statuses", - "schema": { - "type": "array", - "nullable": true, - "items": { - "type": "string" + "title": { + "description": "The title of the content.", + "oneOf": [ + { + "$ref": "#/components/schemas/V1CommonContent_ContentValue" } - } + ] + } + }, + "type": "object" + }, + "V1EndUserDialogTransmissionsQueriesGet_Transmission": { + "additionalProperties": false, + "properties": { + "attachments": { + "description": "The attachments associated with the transmission.", + "items": { + "$ref": "#/components/schemas/V1EndUserDialogTransmissionsQueriesGet_Attachment" + }, + "nullable": true, + "type": "array" }, - { - "name": "externalReference", - "in": "query", - "description": "Filter by external reference", - "schema": { - "type": "string", - "nullable": true - } + "authorizationAttribute": { + "description": "The authorization attribute associated with the transmission.", + "nullable": true, + "type": "string" }, - { - "name": "status", - "in": "query", - "style": "form", - "explode": true, - "description": "Filter by status", - "schema": { - "type": "array", - "nullable": true, - "items": { - "$ref": "#/components/schemas/DialogsEntities_DialogStatus" + "content": { + "description": "The content of the transmission.", + "oneOf": [ + { + "$ref": "#/components/schemas/V1EndUserDialogTransmissionsQueriesGet_Content" } - } + ] }, - { - "name": "createdAfter", - "in": "query", - "description": "Only return dialogs created after this date", - "schema": { - "type": "string", - "format": "date-time", - "nullable": true - } + "createdAt": { + "description": "The date and time when the transmission was created.", + "format": "date-time", + "type": "string" }, - { - "name": "createdBefore", - "in": "query", - "description": "Only return dialogs created before this date", - "schema": { - "type": "string", - "format": "date-time", - "nullable": true - } + "deletedAt": { + "description": "The date and time when the transmission was deleted, if applicable.", + "format": "date-time", + "nullable": true, + "type": "string" }, - { - "name": "updatedAfter", - "in": "query", - "description": "Only return dialogs updated after this date", - "schema": { - "type": "string", - "format": "date-time", - "nullable": true - } + "extendedType": { + "description": "The extended type URI for the transmission.", + "format": "uri", + "nullable": true, + "type": "string" }, - { - "name": "updatedBefore", - "in": "query", - "description": "Only return dialogs updated before this date", - "schema": { - "type": "string", - "format": "date-time", - "nullable": true - } + "id": { + "description": "The unique identifier for the transmission in UUIDv7 format.", + "format": "guid", + "type": "string" }, - { - "name": "dueAfter", - "in": "query", - "description": "Only return dialogs with due date after this date", - "schema": { - "type": "string", - "format": "date-time", - "nullable": true - } + "isAuthorized": { + "description": "Flag indicating if the authenticated user is authorized for this transmission. If not, embedded content and\nthe attachments will not be available.", + "type": "boolean" }, - { - "name": "dueBefore", - "in": "query", - "description": "Only return dialogs with due date before this date", - "schema": { - "type": "string", - "format": "date-time", - "nullable": true - } + "relatedTransmissionId": { + "description": "The unique identifier for the related transmission, if any.", + "format": "guid", + "nullable": true, + "type": "string" }, - { - "name": "process", - "in": "query", - "description": "Filter by process", - "schema": { - "type": "string", - "nullable": true - } + "sender": { + "description": "The sender actor information for the transmission.", + "oneOf": [ + { + "$ref": "#/components/schemas/V1EndUserCommonActors_Actor" + } + ] }, - { - "name": "systemLabel", - "in": "query", - "style": "form", - "explode": true, - "description": "Filter by Display state", - "schema": { - "type": "array", - "nullable": true, - "items": { - "$ref": "#/components/schemas/DialogEndUserContextsEntities_SystemLabel" + "type": { + "description": "The type of the transmission.", + "oneOf": [ + { + "$ref": "#/components/schemas/DialogsEntitiesTransmissions_DialogTransmissionType" } - } + ] + } + }, + "type": "object" + }, + "V1EndUserDialogTransmissionsQueriesSearch_Attachment": { + "additionalProperties": false, + "properties": { + "displayName": { + "description": "The display name of the attachment that should be used in GUIs.", + "items": { + "$ref": "#/components/schemas/V1CommonLocalizations_Localization" + }, + "nullable": true, + "type": "array" }, - { - "name": "search", - "in": "query", - "description": "Search string for free text search. Will attempt to fuzzily match in all free text fields in the aggregate", - "schema": { - "type": "string", - "nullable": true - } + "id": { + "description": "The unique identifier for the attachment in UUIDv7 format.", + "format": "guid", + "type": "string" }, - { - "name": "searchLanguageCode", - "in": "query", - "description": "Limit free text search to texts with this language code, e.g. 'nb', 'en'. Culture codes will be normalized to neutral language codes (ISO 639). Default: search all culture codes", - "schema": { - "type": "string", - "nullable": true - } + "urls": { + "description": "The URLs associated with the attachment, each referring to a different representation of the attachment.", + "items": { + "$ref": "#/components/schemas/V1EndUserDialogTransmissionsQueriesSearch_AttachmentUrl" + }, + "nullable": true, + "type": "array" + } + }, + "type": "object" + }, + "V1EndUserDialogTransmissionsQueriesSearch_AttachmentUrl": { + "additionalProperties": false, + "properties": { + "consumerType": { + "description": "The type of consumer the URL is intended for.", + "oneOf": [ + { + "$ref": "#/components/schemas/Attachments_AttachmentUrlConsumerType" + } + ] }, - { - "name": "orderBy", - "in": "query", - "schema": { - "nullable": true, - "oneOf": [ - { - "$ref": "#/components/schemas/OrderSetOfTOrderDefinitionAndTTarget" - } - ] - } + "id": { + "description": "The unique identifier for the attachment URL in UUIDv7 format.", + "format": "guid", + "type": "string" }, - { - "name": "continuationToken", - "in": "query", - "description": "Supply \"continuationToken\" for the response to get the next page of results, if hasNextPage is true", - "schema": { - "nullable": true, - "oneOf": [ - { - "$ref": "#/components/schemas/ContinuationTokenSetOfTOrderDefinitionAndTTarget" - } - ] - } + "mediaType": { + "description": "The media type of the attachment.", + "example": "application/pdf\napplication/zip", + "nullable": true, + "type": "string" }, - { - "name": "limit", - "in": "query", - "description": "Limit the number of results per page (1-1000, default: 100)", - "schema": { - "type": "integer", - "format": "int32", - "nullable": true - } + "url": { + "description": "The fully qualified URL of the attachment. Will be set to \u0022urn:dialogporten:unauthorized\u0022 if the user is\nnot authorized to access the transmission.", + "example": "https://someendpoint.com/someattachment.pdf\nurn:dialogporten:unauthorized", + "format": "uri", + "type": "string" } - ], - "responses": { - "200": { - "description": "Successfully returned the dialog list.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/PaginatedListOfV1EndUserDialogsQueriesSearch_Dialog" - } + }, + "type": "object" + }, + "V1EndUserDialogTransmissionsQueriesSearch_Content": { + "additionalProperties": false, + "properties": { + "contentReference": { + "description": "Front-channel embedded content. Used to dynamically embed content in the frontend from an external URL.\nAllowed media types: application/vnd.dialogporten.frontchannelembed\u002Bjson;type=markdown", + "nullable": true, + "oneOf": [ + { + "$ref": "#/components/schemas/V1CommonContent_ContentValue" } - } + ] }, - "401": { - "description": "Missing or invalid authentication token. Requires a Maskinporten-token with the scope \"digdir:dialogporten\"." + "summary": { + "description": "The summary of the content.", + "oneOf": [ + { + "$ref": "#/components/schemas/V1CommonContent_ContentValue" + } + ] + }, + "title": { + "description": "The title of the content.", + "oneOf": [ + { + "$ref": "#/components/schemas/V1CommonContent_ContentValue" + } + ] } }, - "security": [ - { - "JWTBearerAuth": [] - } - ] - } - }, - "/api/v1/enduser/dialogs/{dialogId}": { - "get": { - "tags": [ - "Enduser" - ], - "summary": "Gets a single dialog", - "description": "Gets a single dialog aggregate. For more information see the documentation (link TBD).", - "operationId": "V1EndUserDialogsGet_GetDialog", - "parameters": [ - { - "name": "dialogId", - "in": "path", - "required": true, - "schema": { - "type": "string", - "format": "guid" - } - } - ], - "responses": { - "200": { - "description": "Successfully returned the dialog aggregate.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/V1EndUserDialogsQueriesGet_Dialog" - } + "type": "object" + }, + "V1EndUserDialogTransmissionsQueriesSearch_Transmission": { + "additionalProperties": false, + "properties": { + "attachments": { + "description": "The attachments associated with the transmission.", + "items": { + "$ref": "#/components/schemas/V1EndUserDialogTransmissionsQueriesSearch_Attachment" + }, + "nullable": true, + "type": "array" + }, + "authorizationAttribute": { + "description": "The authorization attribute associated with the transmission.", + "nullable": true, + "type": "string" + }, + "content": { + "description": "The content of the transmission.", + "oneOf": [ + { + "$ref": "#/components/schemas/V1EndUserDialogTransmissionsQueriesSearch_Content" } - } + ] }, - "401": { - "description": "Missing or invalid authentication token. Requires a Maskinporten-token with the scope \"digdir:dialogporten\"." + "createdAt": { + "description": "The date and time when the transmission was created.", + "format": "date-time", + "type": "string" }, - "403": { - "description": "Unauthorized to get the supplied dialog (not owned by authenticated organization or has additional scope requirements defined in policy)." + "deletedAt": { + "description": "The date and time when the transmission was deleted, if applicable.", + "format": "date-time", + "nullable": true, + "type": "string" }, - "404": { - "description": "The given dialog ID was not found or is already deleted.", - "content": { - "application/problem+json": { - "schema": { - "$ref": "#/components/schemas/ProblemDetails" - } + "extendedType": { + "description": "The extended type URI for the transmission.", + "format": "uri", + "nullable": true, + "type": "string" + }, + "id": { + "description": "The unique identifier for the transmission in UUIDv7 format.", + "format": "guid", + "type": "string" + }, + "isAuthorized": { + "description": "Flag indicating if the authenticated user is authorized for this transmission. If not, embedded content and\nthe attachments will not be available.", + "type": "boolean" + }, + "relatedTransmissionId": { + "description": "The unique identifier for the related transmission, if any.", + "format": "guid", + "nullable": true, + "type": "string" + }, + "sender": { + "description": "The sender actor information for the transmission.", + "oneOf": [ + { + "$ref": "#/components/schemas/V1EndUserCommonActors_Actor" } - } + ] + }, + "type": { + "description": "The type of the transmission.", + "oneOf": [ + { + "$ref": "#/components/schemas/DialogsEntitiesTransmissions_DialogTransmissionType" + } + ] } }, - "security": [ - { - "JWTBearerAuth": [] - } - ] - } - }, - "/api/v1/enduser/dialogs/{dialogId}/labellog": { - "get": { - "tags": [ - "Enduser" - ], - "operationId": "V1EndUserDialogLabelAssignmentLogsSearch_SearchDialogLabelAssignmentLog", - "parameters": [ - { - "name": "dialogId", - "in": "path", - "required": true, - "schema": { - "type": "string", - "format": "guid" - } - } - ], - "responses": { - "200": { - "description": "Success", - "content": { - "application/json": { - "schema": { - "type": "array", - "items": { - "$ref": "#/components/schemas/V1EndUserDialogLabelAssignmentLogQueriesSearch_LabelAssignmentLog" - } - } - } - } + "type": "object" + }, + "V1EndUserPartiesQueriesGet_AuthorizedParty": { + "additionalProperties": false, + "properties": { + "hasKeyRole": { + "type": "boolean" }, - "401": { - "description": "Unauthorized" + "hasOnlyAccessToSubParties": { + "type": "boolean" }, - "403": { - "description": "Forbidden" + "isAccessManager": { + "type": "boolean" }, - "404": { - "description": "Not Found", - "content": { - "application/problem+json": { - "schema": { - "$ref": "#/components/schemas/ProblemDetails" - } - } - } + "isCurrentEndUser": { + "type": "boolean" }, - "410": { - "description": "" + "isDeleted": { + "type": "boolean" + }, + "isMainAdministrator": { + "type": "boolean" + }, + "name": { + "type": "string" + }, + "party": { + "type": "string" + }, + "partyType": { + "type": "string" + }, + "subParties": { + "items": { + "$ref": "#/components/schemas/V1EndUserPartiesQueriesGet_AuthorizedParty" + }, + "nullable": true, + "type": "array" } }, - "security": [ - { - "JWTBearerAuth": [] - } - ] - } - }, - "/api/v1/enduser/dialogs/{dialogId}/activities": { - "get": { - "tags": [ - "Enduser" - ], - "summary": "Gets a list of dialog activities", - "description": "Gets the list of activities belonging to a dialog", - "operationId": "V1EndUserDialogActivitiesSearch_SearchDialogActivity", - "parameters": [ - { - "name": "dialogId", - "in": "path", - "required": true, - "schema": { - "type": "string", - "format": "guid" - } + "type": "object" + }, + "V1EndUserPartiesQueriesGet_Parties": { + "additionalProperties": false, + "properties": { + "authorizedParties": { + "items": { + "$ref": "#/components/schemas/V1EndUserPartiesQueriesGet_AuthorizedParty" + }, + "nullable": true, + "type": "array" } - ], - "responses": { - "200": { - "description": "Successfully returned the dialog activity list.", - "content": { - "application/json": { - "schema": { - "type": "array", - "items": { - "$ref": "#/components/schemas/V1EndUserDialogActivitiesQueriesSearch_Activity" - } - } - } - } + }, + "type": "object" + }, + "V1ServiceOwnerCommonActors_Actor": { + "additionalProperties": false, + "properties": { + "actorId": { + "description": "The identifier of the person or organization that sent the transmission. Mutually exclusive with ActorName.\nMight be omitted if ActorType is \u0022ServiceOwner\u0022.", + "example": "urn:altinn:person:identifier-no:12018212345", + "nullable": true, + "type": "string" }, - "401": { - "description": "Missing or invalid authentication token. Requires a Maskinporten-token with the scope \"digdir:dialogporten\"." + "actorName": { + "description": "Specifies the name of the entity that sent the transmission. Mutually exclusive with ActorId. If ActorId\nis supplied, the name will be automatically populated from the name registries.", + "example": "Ola Nordmann", + "nullable": true, + "type": "string" }, - "403": { - "description": "Unauthorized to get the supplied dialog (not owned by authenticated organization or has additional scope requirements defined in policy)." + "actorType": { + "description": "The type of actor that sent the transmission.", + "oneOf": [ + { + "$ref": "#/components/schemas/Actors_ActorType" + } + ] } }, - "security": [ - { - "JWTBearerAuth": [] - } - ] - } - }, - "/api/v1/enduser/dialogs/{dialogId}/activities/{activityId}": { - "get": { - "tags": [ - "Enduser" - ], - "summary": "Gets a single dialog activity", - "description": "Gets a single activity belonging to a dialog. For more information see the documentation (link TBD).", - "operationId": "V1EndUserDialogActivitiesGet_GetDialogActivity", - "parameters": [ - { - "name": "dialogId", - "in": "path", - "required": true, - "schema": { - "type": "string", - "format": "guid" - } + "type": "object" + }, + "V1ServiceOwnerDialogActivitiesCreate_ActivityRequest": { + "additionalProperties": false, + "properties": { + "createdAt": { + "description": "If supplied, overrides the creating date and time for the transmission.\nIf not supplied, the current date /time will be used.", + "format": "date-time", + "nullable": true, + "type": "string" }, - { - "name": "activityId", - "in": "path", - "required": true, - "schema": { - "type": "string", - "format": "guid" - } - } - ], - "responses": { - "200": { - "description": "Successfully returned the dialog activity.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/V1EndUserDialogActivitiesQueriesGet_Activity" - } - } - } + "description": { + "description": "Unstructured text describing the activity. Only set if the activity type is \u0022Information\u0022.", + "items": { + "$ref": "#/components/schemas/V1CommonLocalizations_Localization" + }, + "nullable": true, + "type": "array" }, - "401": { - "description": "Missing or invalid authentication token. Requires a Maskinporten-token with the scope \"digdir:dialogporten\"." + "extendedType": { + "description": "Arbitrary URI/URN describing a service-specific transmission type.", + "format": "uri", + "nullable": true, + "type": "string" }, - "403": { - "description": "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)." + "id": { + "description": "The UUDIv7 of the action may be provided to support idempotent additions to the list of activities.\nIf not supplied, a new UUIDv7 will be generated.", + "example": "01913cd5-784f-7d3b-abef-4c77b1f0972d", + "format": "guid", + "nullable": true, + "type": "string" }, - "404": { - "description": "The given dialog ID was not found or was deleted, or the given activity ID was not found.", - "content": { - "application/problem+json": { - "schema": { - "$ref": "#/components/schemas/ProblemDetails" - } + "performedBy": { + "description": "The actor that performed the activity.", + "oneOf": [ + { + "$ref": "#/components/schemas/V1ServiceOwnerCommonActors_Actor" } - } + ] + }, + "transmissionId": { + "description": "If the activity is related to a particular transmission, this field will contain the transmission identifier.\nMust be present in the request body.", + "format": "guid", + "nullable": true, + "type": "string" + }, + "type": { + "description": "The type of transmission.", + "oneOf": [ + { + "$ref": "#/components/schemas/DialogsEntitiesActivities_DialogActivityType" + } + ] } }, - "security": [ - { - "JWTBearerAuth": [] - } - ] - } - } - }, - "components": { - "schemas": { - "V1WellKnownOauthAuthorizationServerQueriesGet_GetOauthAuthorizationServer": { - "type": "object", + "type": "object" + }, + "V1ServiceOwnerDialogActivitiesQueriesGet_Activity": { "additionalProperties": false, "properties": { - "issuer": { + "createdAt": { + "format": "date-time", + "nullable": true, "type": "string" }, - "jwks_uri": { + "deletedAt": { + "format": "date-time", + "nullable": true, + "type": "string" + }, + "description": { + "items": { + "$ref": "#/components/schemas/V1CommonLocalizations_Localization" + }, + "nullable": true, + "type": "array" + }, + "extendedType": { + "format": "uri", + "nullable": true, + "type": "string" + }, + "id": { + "format": "guid", + "type": "string" + }, + "performedBy": { + "$ref": "#/components/schemas/V1ServiceOwnerCommonActors_Actor" + }, + "transmissionId": { + "format": "guid", + "nullable": true, "type": "string" + }, + "type": { + "$ref": "#/components/schemas/DialogsEntitiesActivities_DialogActivityType" } - } + }, + "type": "object" }, - "V1WellKnownJwksQueriesGet_GetJwks": { - "type": "object", + "V1ServiceOwnerDialogActivitiesQueriesNotificationCondition_NotificationCondition": { "additionalProperties": false, "properties": { - "keys": { - "type": "array", - "nullable": true, - "items": { - "$ref": "#/components/schemas/V1WellKnownJwksQueriesGet_Jwk" - } + "sendNotification": { + "type": "boolean" } - } + }, + "type": "object" + }, + "V1ServiceOwnerDialogActivitiesQueriesNotificationCondition_NotificationConditionType": { + "description": "", + "enum": [ + "NotExists", + "Exists" + ], + "type": "string", + "x-enumNames": [ + "NotExists", + "Exists" + ] }, - "V1WellKnownJwksQueriesGet_Jwk": { - "type": "object", + "V1ServiceOwnerDialogActivitiesQueriesSearch_Activity": { "additionalProperties": false, "properties": { - "kty": { + "createdAt": { + "format": "date-time", "type": "string" }, - "use": { + "deletedAt": { + "format": "date-time", + "nullable": true, "type": "string" }, - "kid": { + "extendedType": { + "format": "uri", + "nullable": true, "type": "string" }, - "crv": { + "id": { + "format": "guid", "type": "string" }, - "x": { + "transmissionId": { + "format": "guid", + "nullable": true, "type": "string" }, - "alg": { - "type": "string" + "type": { + "$ref": "#/components/schemas/DialogsEntitiesActivities_DialogActivityType" } - } + }, + "type": "object" }, - "V1ServiceOwnerDialogTransmissionsQueriesSearch_Transmission": { - "type": "object", + "V1ServiceOwnerDialogsCommandsCreate_Activity": { "additionalProperties": false, "properties": { - "id": { - "type": "string", - "description": "The unique identifier for the transmission in UUIDv7 format.", - "format": "guid" - }, "createdAt": { - "type": "string", - "description": "The date and time when the transmission was created.", - "format": "date-time" + "description": "If supplied, overrides the creating date and time for the transmission.\nIf not supplied, the current date /time will be used.", + "format": "date-time", + "nullable": true, + "type": "string" }, - "authorizationAttribute": { - "type": "string", - "description": "The authorization attribute associated with the transmission.", - "nullable": true + "description": { + "description": "Unstructured text describing the activity. Only set if the activity type is \u0022Information\u0022.", + "items": { + "$ref": "#/components/schemas/V1CommonLocalizations_Localization" + }, + "nullable": true, + "type": "array" }, "extendedType": { - "type": "string", - "description": "The extended type URI for the transmission.", + "description": "Arbitrary URI/URN describing a service-specific transmission type.", "format": "uri", - "nullable": true + "nullable": true, + "type": "string" }, - "relatedTransmissionId": { - "type": "string", - "description": "The unique identifier for the related transmission, if any.", + "id": { + "description": "A self-defined UUIDv7 may be provided to support idempotent creation of activities. If not provided, a new UUIDv7 will be generated.", + "example": "01913cd5-784f-7d3b-abef-4c77b1f0972d", "format": "guid", - "nullable": true - }, - "deletedAt": { - "type": "string", - "description": "The date and time when the transmission was deleted, if applicable.", - "format": "date-time", - "nullable": true - }, - "type": { - "description": "The type of the transmission.", - "oneOf": [ - { - "$ref": "#/components/schemas/DialogsEntitiesTransmissions_DialogTransmissionType" - } - ] + "nullable": true, + "type": "string" }, - "sender": { - "description": "The sender actor information for the transmission.", + "performedBy": { + "description": "The actor that performed the activity.", "oneOf": [ { "$ref": "#/components/schemas/V1ServiceOwnerCommonActors_Actor" } ] }, - "content": { - "description": "The content of the transmission.", + "transmissionId": { + "description": "If the activity is related to a particular transmission, this field will contain the transmission identifier.\nMust be present in the request body.", + "format": "guid", + "nullable": true, + "type": "string" + }, + "type": { + "description": "The type of transmission.", "oneOf": [ { - "$ref": "#/components/schemas/V1ServiceOwnerDialogTransmissionsQueriesSearch_Content" + "$ref": "#/components/schemas/DialogsEntitiesActivities_DialogActivityType" } ] - }, - "attachments": { - "type": "array", - "description": "The attachments associated with the transmission.", - "nullable": true, - "items": { - "$ref": "#/components/schemas/V1ServiceOwnerDialogTransmissionsQueriesSearch_Attachment" - } } - } - }, - "DialogsEntitiesTransmissions_DialogTransmissionType": { - "type": "string", - "description": "", - "x-enumNames": [ - "Information", - "Acceptance", - "Rejection", - "Request", - "Alert", - "Decision", - "Submission", - "Correction" - ], - "enum": [ - "Information", - "Acceptance", - "Rejection", - "Request", - "Alert", - "Decision", - "Submission", - "Correction" - ] + }, + "type": "object" }, - "V1ServiceOwnerCommonActors_Actor": { - "type": "object", + "V1ServiceOwnerDialogsCommandsCreate_ApiAction": { "additionalProperties": false, "properties": { - "actorType": { - "description": "The type of actor that sent the transmission.", - "oneOf": [ - { - "$ref": "#/components/schemas/Actors_ActorType" - } - ] + "action": { + "description": "String identifier for the action, corresponding to the \u0022action\u0022 attributeId used in the XACML service policy,\nwhich by default is the policy belonging to the service referred to by \u0022serviceResource\u0022 in the dialog.", + "example": "write", + "type": "string" }, - "actorName": { - "type": "string", - "description": "Specifies the name of the entity that sent the transmission. Mutually exclusive with ActorId. If ActorId\nis supplied, the name will be automatically populated from the name registries.", + "authorizationAttribute": { + "description": "Contains an authorization resource attributeId, that can used in custom authorization rules in the XACML service\npolicy, which by default is the policy belonging to the service referred to by \u0022serviceResource\u0022 in the dialog.\n \nCan also be used to refer to other service policies.", + "example": "mycustomresource\n/* equivalent to the above */\nurn:altinn:subresource:mycustomresource\nurn:altinn:task:Task_1\n/* refer to another service */\nurn:altinn:resource:some-other-service-identifier", "nullable": true, - "example": "Ola Nordmann" + "type": "string" }, - "actorId": { - "type": "string", - "description": "The identifier of the person or organization that sent the transmission. Mutually exclusive with ActorName.\nMight be omitted if ActorType is \"ServiceOwner\".", + "endpoints": { + "description": "The endpoints associated with the action.", + "items": { + "$ref": "#/components/schemas/V1ServiceOwnerDialogsCommandsCreate_ApiActionEndpoint" + }, + "nullable": true, + "type": "array" + }, + "id": { + "description": "A self-defined UUIDv7 may be provided to support idempotent creation of Api Actions. If not provided, a new UUIDv7 will be generated.", + "example": "01913cd5-784f-7d3b-abef-4c77b1f0972d", + "format": "guid", "nullable": true, - "example": "urn:altinn:person:identifier-no:12018212345" + "type": "string" } - } - }, - "Actors_ActorType": { - "type": "string", - "description": "", - "x-enumNames": [ - "PartyRepresentative", - "ServiceOwner" - ], - "enum": [ - "PartyRepresentative", - "ServiceOwner" - ] + }, + "type": "object" }, - "V1ServiceOwnerDialogTransmissionsQueriesSearch_Content": { - "type": "object", + "V1ServiceOwnerDialogsCommandsCreate_ApiActionEndpoint": { "additionalProperties": false, "properties": { - "title": { - "description": "The title of the content.", - "oneOf": [ - { - "$ref": "#/components/schemas/V1CommonContent_ContentValue" - } - ] + "deprecated": { + "description": "Boolean indicating if the endpoint is deprecated.", + "type": "boolean" }, - "summary": { - "description": "The summary of the content.", + "documentationUrl": { + "description": "Link to documentation for the endpoint, providing documentation for integrators. Should be a URL to a\nhuman-readable page.", + "format": "uri", + "nullable": true, + "type": "string" + }, + "httpMethod": { + "description": "The HTTP method that the endpoint expects for this action.", "oneOf": [ { - "$ref": "#/components/schemas/V1CommonContent_ContentValue" + "$ref": "#/components/schemas/Http_HttpVerb" } ] }, - "contentReference": { - "description": "Front-channel embedded content. Used to dynamically embed content in the frontend from an external URL.", + "requestSchema": { + "description": "Link to the request schema for the endpoint. Used to provide documentation for integrators.\nDialogporten will not validate information on this endpoint.", + "format": "uri", "nullable": true, - "oneOf": [ - { - "$ref": "#/components/schemas/V1CommonContent_ContentValue" - } - ] - } - } - }, - "V1CommonContent_ContentValue": { - "type": "object", - "additionalProperties": false, - "properties": { - "value": { - "type": "array", - "description": "A list of localizations for the content.", + "type": "string" + }, + "responseSchema": { + "description": "Link to the response schema for the endpoint. Used to provide documentation for integrators.\nDialogporten will not validate information on this endpoint.", + "format": "uri", "nullable": true, - "items": { - "$ref": "#/components/schemas/V1CommonLocalizations_Localization" - } + "type": "string" }, - "mediaType": { - "type": "string", - "description": "Media type of the content, this can also indicate that the content is embeddable.\nFor a list of supported media types, see (link TBD)." - } - } - }, - "V1CommonLocalizations_Localization": { - "type": "object", - "additionalProperties": false, - "properties": { - "value": { - "type": "string", - "description": "The localized text or URI reference." + "sunsetAt": { + "description": "Date and time when the endpoint will no longer function. Only set if the endpoint is deprecated. Dialogporten\nwill not enforce this date.", + "format": "date-time", + "nullable": true, + "type": "string" }, - "languageCode": { - "type": "string", - "description": "The language code of the localization in ISO 639-1 format.", - "example": "nb" + "url": { + "description": "The fully qualified URL of the API endpoint.", + "format": "uri", + "type": "string" + }, + "version": { + "description": "Arbitrary string indicating the version of the endpoint.", + "nullable": true, + "type": "string" } - } + }, + "type": "object" }, - "V1ServiceOwnerDialogTransmissionsQueriesSearch_Attachment": { - "type": "object", + "V1ServiceOwnerDialogsCommandsCreate_Attachment": { "additionalProperties": false, "properties": { - "id": { - "type": "string", - "description": "The unique identifier for the attachment in UUIDv7 format.", - "format": "guid" - }, "displayName": { - "type": "array", "description": "The display name of the attachment that should be used in GUIs.", - "nullable": true, "items": { "$ref": "#/components/schemas/V1CommonLocalizations_Localization" - } + }, + "nullable": true, + "type": "array" + }, + "id": { + "description": "A self-defined UUIDv7 may be provided to support idempotent creation of attachments. If not provided, a new UUIDv7 will be generated.", + "format": "guid", + "nullable": true, + "type": "string" }, "urls": { - "type": "array", "description": "The URLs associated with the attachment, each referring to a different representation of the attachment.", + "items": { + "$ref": "#/components/schemas/V1ServiceOwnerDialogsCommandsCreate_AttachmentUrl" + }, "nullable": true, - "items": { - "$ref": "#/components/schemas/V1ServiceOwnerDialogTransmissionsQueriesSearch_AttachmentUrl" - } + "type": "array" } - } + }, + "type": "object" }, - "V1ServiceOwnerDialogTransmissionsQueriesSearch_AttachmentUrl": { - "type": "object", + "V1ServiceOwnerDialogsCommandsCreate_AttachmentUrl": { "additionalProperties": false, "properties": { - "id": { - "type": "string", - "description": "The unique identifier for the attachment URL in UUIDv7 format.", - "format": "guid" - }, - "url": { - "type": "string", - "description": "The fully qualified URL of the attachment. Will be set to \"urn:dialogporten:unauthorized\" if the user is\nnot authorized to access the transmission.", - "format": "uri", - "example": "https://someendpoint.com/someattachment.pdf\nurn:dialogporten:unauthorized" - }, - "mediaType": { - "type": "string", - "description": "The media type of the attachment.", - "nullable": true, - "example": "application/pdf\napplication/zip" - }, "consumerType": { "description": "The type of consumer the URL is intended for.", "oneOf": [ @@ -2636,158 +2195,54 @@ "$ref": "#/components/schemas/Attachments_AttachmentUrlConsumerType" } ] + }, + "mediaType": { + "description": "The media type of the attachment.", + "example": "application/pdf\napplication/zip", + "nullable": true, + "type": "string" + }, + "url": { + "description": "The fully qualified URL of the attachment.", + "format": "uri", + "type": "string" } - } - }, - "Attachments_AttachmentUrlConsumerType": { - "type": "string", - "description": "", - "x-enumNames": [ - "Gui", - "Api" - ], - "enum": [ - "Gui", - "Api" - ] + }, + "type": "object" }, - "V1ServiceOwnerDialogTransmissionsQueriesGet_Transmission": { - "type": "object", + "V1ServiceOwnerDialogsCommandsCreate_Content": { "additionalProperties": false, "properties": { - "id": { - "type": "string", - "description": "The unique identifier for the transmission in UUIDv7 format.", - "format": "guid" - }, - "createdAt": { - "type": "string", - "description": "The date and time when the transmission was created.", - "format": "date-time" - }, - "authorizationAttribute": { - "type": "string", - "description": "The authorization attribute associated with the transmission.", - "nullable": true - }, - "extendedType": { - "type": "string", - "description": "The extended type URI for the transmission.", - "format": "uri", - "nullable": true - }, - "relatedTransmissionId": { - "type": "string", - "description": "The unique identifier for the related transmission, if any.", - "format": "guid", - "nullable": true - }, - "deletedAt": { - "type": "string", - "description": "The date and time when the transmission was deleted, if applicable.", - "format": "date-time", - "nullable": true - }, - "type": { - "description": "The type of the transmission.", + "additionalInfo": { + "description": "Additional information about the dialog.\nSupported media types: text/plain, text/markdown", + "nullable": true, "oneOf": [ { - "$ref": "#/components/schemas/DialogsEntitiesTransmissions_DialogTransmissionType" + "$ref": "#/components/schemas/V1CommonContent_ContentValue" } ] }, - "sender": { - "description": "The sender actor information for the transmission.", + "extendedStatus": { + "description": "Used as the human-readable label used to describe the \u0022ExtendedStatus\u0022 field.\nSupported media types: text/plain", + "nullable": true, "oneOf": [ { - "$ref": "#/components/schemas/V1ServiceOwnerCommonActors_Actor" + "$ref": "#/components/schemas/V1CommonContent_ContentValue" } ] }, - "content": { - "description": "The content of the transmission.", + "mainContentReference": { + "description": "Front-channel embedded content. Used to dynamically embed content in the frontend from an external URL. Must be HTTPS.\nSupported media types: application/vnd.dialogporten.frontchannelembed\u002Bjson;type=markdown", + "nullable": true, "oneOf": [ { - "$ref": "#/components/schemas/V1ServiceOwnerDialogTransmissionsQueriesGet_Content" + "$ref": "#/components/schemas/V1CommonContent_ContentValue" } ] }, - "attachments": { - "type": "array", - "description": "The attachments associated with the transmission.", - "nullable": true, - "items": { - "$ref": "#/components/schemas/V1ServiceOwnerDialogTransmissionsQueriesGet_Attachment" - } - } - } - }, - "ProblemDetails": { - "type": "object", - "additionalProperties": false, - "properties": { - "type": { - "type": "string", - "default": "https://www.rfc-editor.org/rfc/rfc7231#section-6.5.1" - }, - "title": { - "type": "string", - "default": "One or more validation errors occurred." - }, - "status": { - "type": "integer", - "format": "int32", - "default": 400 - }, - "instance": { - "type": "string", - "default": "/api/route" - }, - "traceId": { - "type": "string", - "default": "0HMPNHL0JHL76:00000001" - }, - "detail": { - "type": "string", - "nullable": true - }, - "errors": { - "type": "array", + "senderName": { + "description": "Overridden sender name. If not supplied, assume \u0022org\u0022 as the sender name. Must be text/plain if supplied.\nSupported media types: text/plain", "nullable": true, - "items": { - "$ref": "#/components/schemas/ProblemDetails_Error" - } - } - } - }, - "ProblemDetails_Error": { - "type": "object", - "additionalProperties": false, - "properties": { - "name": { - "type": "string", - "default": "Error or field name" - }, - "reason": { - "type": "string", - "default": "Error reason" - }, - "code": { - "type": "string", - "nullable": true - }, - "severity": { - "type": "string", - "nullable": true - } - } - }, - "V1ServiceOwnerDialogTransmissionsQueriesGet_Content": { - "type": "object", - "additionalProperties": false, - "properties": { - "title": { - "description": "The title of the content.", "oneOf": [ { "$ref": "#/components/schemas/V1CommonContent_ContentValue" @@ -2795,1174 +2250,1084 @@ ] }, "summary": { - "description": "The summary of the content.", + "description": "A short summary of the dialog and its current state.\nSupported media types: text/plain", "oneOf": [ { "$ref": "#/components/schemas/V1CommonContent_ContentValue" } ] }, - "contentReference": { - "description": "Front-channel embedded content. Used to dynamically embed content in the frontend from an external URL.\nAllowed media types: application/vnd.dialogporten.frontchannelembed+json;type=markdown", - "nullable": true, + "title": { + "description": "The title of the dialog.\nSupported media types: text/plain", "oneOf": [ { "$ref": "#/components/schemas/V1CommonContent_ContentValue" } ] } - } + }, + "type": "object" }, - "V1ServiceOwnerDialogTransmissionsQueriesGet_Attachment": { - "type": "object", + "V1ServiceOwnerDialogsCommandsCreate_Dialog": { "additionalProperties": false, "properties": { - "id": { - "type": "string", - "description": "The unique identifier for the attachment in UUIDv7 format.", - "format": "guid" - }, - "displayName": { - "type": "array", - "description": "The display name of the attachment that should be used in GUIs.", - "nullable": true, + "activities": { + "description": "An immutable list of activities associated with the dialog.", "items": { - "$ref": "#/components/schemas/V1CommonLocalizations_Localization" - } - }, - "urls": { - "type": "array", - "description": "The URLs associated with the attachment, each referring to a different representation of the attachment.", + "$ref": "#/components/schemas/V1ServiceOwnerDialogsCommandsCreate_Activity" + }, "nullable": true, - "items": { - "$ref": "#/components/schemas/V1ServiceOwnerDialogTransmissionsQueriesGet_AttachmentUrl" - } - } - } - }, - "V1ServiceOwnerDialogTransmissionsQueriesGet_AttachmentUrl": { - "type": "object", - "additionalProperties": false, - "properties": { - "id": { - "type": "string", - "description": "The unique identifier for the attachment URL in UUIDv7 format.", - "format": "guid" + "type": "array" }, - "url": { - "type": "string", - "description": "The fully qualified URL of the attachment. Will be set to \"urn:dialogporten:unauthorized\" if the user is\nnot authorized to access the transmission.", - "format": "uri", - "example": "https://someendpoint.com/someattachment.pdf\nurn:dialogporten:unauthorized" + "apiActions": { + "description": "The API actions associated with the dialog. Should be used in specialized, non-browser-based integrations.", + "items": { + "$ref": "#/components/schemas/V1ServiceOwnerDialogsCommandsCreate_ApiAction" + }, + "nullable": true, + "type": "array" }, - "mediaType": { - "type": "string", - "description": "The media type of the attachment.", + "attachments": { + "description": "The attachments associated with the dialog (on an aggregate level).", + "items": { + "$ref": "#/components/schemas/V1ServiceOwnerDialogsCommandsCreate_Attachment" + }, "nullable": true, - "example": "application/pdf\napplication/zip" + "type": "array" }, - "consumerType": { - "description": "The type of consumer the URL is intended for.", + "content": { + "description": "The dialog unstructured text content.", "oneOf": [ { - "$ref": "#/components/schemas/Attachments_AttachmentUrlConsumerType" + "$ref": "#/components/schemas/V1ServiceOwnerDialogsCommandsCreate_Content" } ] - } - } - }, - "V1ServiceOwnerDialogTransmissionsCreate_TransmissionRequest": { - "type": "object", - "additionalProperties": false, - "properties": { + }, + "createdAt": { + "description": "If set, will override the date and time when the dialog is set as created.\nIf not supplied, the current date /time will be used.", + "example": "2022-12-31T23:59:59Z", + "format": "date-time", + "type": "string" + }, + "dueAt": { + "description": "The due date for the dialog. Dialogs past due date might be marked as such in frontends but will still be available.", + "example": "2022-12-31T23:59:59Z", + "format": "date-time", + "nullable": true, + "type": "string" + }, + "expiresAt": { + "description": "The expiration date for the dialog. This is the last date when the dialog is available for the end user.\n \nAfter this date is passed, the dialog will be considered expired and no longer available for the end user in any\nAPI. If not supplied, the dialog will be considered to never expire. This field can be changed after creation.", + "example": "2022-12-31T23:59:59Z", + "format": "date-time", + "nullable": true, + "type": "string" + }, + "extendedStatus": { + "description": "Arbitrary string with a service-specific indicator of status, typically used to indicate a fine-grained state of\nthe dialog to further specify the \u0022status\u0022 enum.", + "nullable": true, + "type": "string" + }, + "externalReference": { + "description": "Arbitrary string with a service-specific reference to an external system or service.", + "nullable": true, + "type": "string" + }, + "guiActions": { + "description": "The GUI actions associated with the dialog. Should be used in browser-based interactive frontends.", + "items": { + "$ref": "#/components/schemas/V1ServiceOwnerDialogsCommandsCreate_GuiAction" + }, + "nullable": true, + "type": "array" + }, "id": { - "type": "string", - "description": "The UUDIv7 of the action may be provided to support idempotent additions to the list of transmissions.\nIf not supplied, a new UUIDv7 will be generated.", + "description": "A self-defined UUIDv7 may be provided to support idempotent creation of dialogs. If not provided, a new UUIDv7 will be generated.", + "example": "01913cd5-784f-7d3b-abef-4c77b1f0972d", "format": "guid", "nullable": true, - "example": "01913cd5-784f-7d3b-abef-4c77b1f0972d" + "type": "string" }, - "createdAt": { - "type": "string", - "description": "If supplied, overrides the creating date and time for the transmission.\nIf not supplied, the current date /time will be used.", - "format": "date-time" + "party": { + "description": "The party code representing the organization or person that the dialog belongs to in URN format.", + "example": "urn:altinn:person:identifier-no:01125512345\nurn:altinn:organization:identifier-no:912345678", + "type": "string" }, - "authorizationAttribute": { - "type": "string", - "description": "Contains an authorization resource attributeId, that can used in custom authorization rules in the XACML service\npolicy, which by default is the policy belonging to the service referred to by \"serviceResource\" in the dialog.\n \nCan also be used to refer to other service policies.", + "precedingProcess": { + "description": "Optional preceding process identifier to indicate the business process that preceded the process indicated in the \u0022Process\u0022 field. Cannot be set without also \u0022Process\u0022 being set.", + "nullable": true, + "type": "string" + }, + "process": { + "description": "Optional process identifier used to indicate a business process this dialog belongs to.", + "nullable": true, + "type": "string" + }, + "progress": { + "description": "Advisory indicator of progress, represented as 1-100 percentage value. 100% representing a dialog that has come\nto a natural completion (successful or not).", + "format": "int32", + "nullable": true, + "type": "integer" + }, + "searchTags": { + "description": "A list of words (tags) that will be used in dialog search queries. Not visible in end-user DTO.", + "items": { + "$ref": "#/components/schemas/V1ServiceOwnerDialogsCommandsCreate_SearchTag" + }, "nullable": true, - "example": "mycustomresource\n/* equivalent to the above */\nurn:altinn:subresource:mycustomresource\nurn:altinn:task:Task_1\n/* refer to another service */\nurn:altinn:resource:some-other-service-identifier" - }, - "extendedType": { - "type": "string", - "description": "Arbitrary URI/URN describing a service-specific transmission type.\n \nRefer to the service-specific documentation provided by the service owner for details (if in use).", - "format": "uri", - "nullable": true + "type": "array" }, - "relatedTransmissionId": { - "type": "string", - "description": "Reference to any other transmission that this transmission is related to.", - "format": "guid", - "nullable": true + "serviceResource": { + "description": "The service identifier for the service that the dialog is related to in URN-format.\nThis corresponds to a resource in the Altinn Resource Registry, which the authenticated organization\nmust own, i.e., be listed as the \u0022competent authority\u0022 in the Resource Registry entry.", + "example": "urn:altinn:resource:some-service-identifier", + "type": "string" }, - "type": { - "description": "The type of transmission.", + "status": { + "description": "The aggregated status of the dialog.", "oneOf": [ { - "$ref": "#/components/schemas/DialogsEntitiesTransmissions_DialogTransmissionType" + "$ref": "#/components/schemas/DialogsEntities_DialogStatus" } ] }, - "sender": { - "description": "The actor that sent the transmission.", + "systemLabel": { + "description": "Set the system label of the dialog Migration purposes.", + "nullable": true, "oneOf": [ { - "$ref": "#/components/schemas/V1ServiceOwnerCommonActors_Actor" + "$ref": "#/components/schemas/DialogEndUserContextsEntities_SystemLabel" } ] }, - "content": { - "description": "The transmission unstructured text content.", - "oneOf": [ - { - "$ref": "#/components/schemas/V1ServiceOwnerDialogsCommandsUpdate_TransmissionContent" - } - ] + "transmissions": { + "description": "The immutable list of transmissions associated with the dialog.", + "items": { + "$ref": "#/components/schemas/V1ServiceOwnerDialogsCommandsCreate_Transmission" + }, + "nullable": true, + "type": "array" }, - "attachments": { - "type": "array", - "description": "The transmission-level attachments.", + "updatedAt": { + "description": "If set, will override the date and time when the dialog is set as last updated.\nIf not supplied, the current date /time will be used.", + "example": "2022-12-31T23:59:59Z", + "format": "date-time", + "type": "string" + }, + "visibleFrom": { + "description": "The timestamp when the dialog should be made visible for authorized end users. If not provided, the dialog will be\nimmediately available.", + "example": "2022-12-31T23:59:59Z", + "format": "date-time", "nullable": true, - "items": { - "$ref": "#/components/schemas/V1ServiceOwnerDialogsCommandsUpdate_TransmissionAttachment" - } + "type": "string" } - } + }, + "type": "object" }, - "V1ServiceOwnerDialogsCommandsUpdate_TransmissionContent": { - "type": "object", + "V1ServiceOwnerDialogsCommandsCreate_GuiAction": { "additionalProperties": false, "properties": { - "title": { - "description": "The transmission title. Must be text/plain.", - "oneOf": [ - { - "$ref": "#/components/schemas/V1CommonContent_ContentValue" - } - ] + "action": { + "description": "The action identifier for the action, corresponding to the \u0022action\u0022 attributeId used in the XACML service policy.", + "type": "string" }, - "summary": { - "description": "The transmission summary.", - "oneOf": [ - { - "$ref": "#/components/schemas/V1CommonContent_ContentValue" - } - ] + "authorizationAttribute": { + "description": "Contains an authorization resource attributeId, that can used in custom authorization rules in the XACML service\npolicy, which by default is the policy belonging to the service referred to by \u0022serviceResource\u0022 in the dialog.\n \nCan also be used to refer to other service policies.", + "example": "mycustomresource\n/* equivalent to the above */\nurn:altinn:subresource:mycustomresource\nurn:altinn:task:Task_1\n/* refer to another service */\nurn:altinn:resource:some-other-service-identifier", + "nullable": true, + "type": "string" }, - "contentReference": { - "description": "Front-channel embedded content. Used to dynamically embed content in the frontend from an external URL. Must be HTTPS.\nAllowed media types: application/vnd.dialogporten.frontchannelembed+json;type=markdown", + "httpMethod": { + "description": "The HTTP method that the frontend should use when redirecting the user.", "nullable": true, "oneOf": [ { - "$ref": "#/components/schemas/V1CommonContent_ContentValue" + "$ref": "#/components/schemas/Http_HttpVerb" } ] - } - } - }, - "V1ServiceOwnerDialogsCommandsUpdate_TransmissionAttachment": { - "type": "object", - "additionalProperties": false, - "properties": { + }, "id": { - "type": "string", - "description": "A self-defined UUIDv7 may be provided to support idempotent additions of transmission attachments. If not provided, a new UUIDv7 will be generated.", + "description": "A self-defined UUIDv7 may be provided to support idempotent creation of Gui Actions. If not provided, a new UUIDv7 will be generated.", + "example": "01913cd5-784f-7d3b-abef-4c77b1f0972d", "format": "guid", "nullable": true, - "example": "01913cd5-784f-7d3b-abef-4c77b1f0972d" - }, - "displayName": { - "type": "array", - "description": "The display name of the attachment that should be used in GUIs.", - "nullable": true, - "items": { - "$ref": "#/components/schemas/V1CommonLocalizations_Localization" - } - }, - "urls": { - "type": "array", - "description": "The URLs associated with the attachment, each referring to a different representation of the attachment.", - "nullable": true, - "items": { - "$ref": "#/components/schemas/V1ServiceOwnerDialogsCommandsUpdate_TransmissionAttachmentUrl" - } - } - } - }, - "V1ServiceOwnerDialogsCommandsUpdate_TransmissionAttachmentUrl": { - "type": "object", - "additionalProperties": false, - "properties": { - "url": { - "type": "string", - "description": "The fully qualified URL of the attachment.", - "format": "uri" + "type": "string" }, - "mediaType": { - "type": "string", - "description": "The media type of the attachment.", - "nullable": true, - "example": "application/pdf\napplication/zip" + "isDeleteDialogAction": { + "description": "Indicates whether the action results in the dialog being deleted. Used by frontends to implement custom UX\nfor delete actions.", + "type": "boolean" }, - "consumerType": { - "description": "The type of consumer the URL is intended for.", + "priority": { + "description": "Indicates a priority for the action, making it possible for frontends to adapt GUI elements based on action\npriority.", "oneOf": [ { - "$ref": "#/components/schemas/Attachments_AttachmentUrlConsumerType" + "$ref": "#/components/schemas/DialogsEntitiesActions_DialogGuiActionPriority" } ] - } - } - }, - "V1ServiceOwnerDialogSeenLogsQueriesSearch_SeenLog": { - "type": "object", - "additionalProperties": false, - "properties": { - "id": { - "type": "string", - "format": "guid" }, - "seenAt": { - "type": "string", - "format": "date-time" - }, - "seenBy": { - "$ref": "#/components/schemas/V1ServiceOwnerCommonActors_Actor" - }, - "isViaServiceOwner": { - "type": "boolean", - "nullable": true - } - } - }, - "V1ServiceOwnerDialogSeenLogsQueriesGet_SeenLog": { - "type": "object", - "additionalProperties": false, - "properties": { - "id": { - "type": "string", - "format": "guid" - }, - "seenAt": { - "type": "string", - "format": "date-time" + "prompt": { + "description": "If there should be a prompt asking the user for confirmation before the action is executed,\nthis field should contain the prompt text.", + "items": { + "$ref": "#/components/schemas/V1CommonLocalizations_Localization" + }, + "nullable": true, + "type": "array" }, - "seenBy": { - "$ref": "#/components/schemas/V1ServiceOwnerCommonActors_Actor" + "title": { + "description": "The title of the action, this should be short and in verb form. Must be text/plain.", + "items": { + "$ref": "#/components/schemas/V1CommonLocalizations_Localization" + }, + "nullable": true, + "type": "array" }, - "isViaServiceOwner": { - "type": "boolean", - "nullable": true + "url": { + "description": "The fully qualified URL of the action, to which the user will be redirected when the action is triggered. Will be set to\n\u0022urn:dialogporten:unauthorized\u0022 if the user is not authorized to perform the action.", + "example": "urn:dialogporten:unauthorized\nhttps://someendpoint.com/gui/some-service-instance-id", + "format": "uri", + "type": "string" } - } + }, + "type": "object" }, - "V1ServiceOwnerDialogsUpdate_DialogRequest": { - "type": "object", + "V1ServiceOwnerDialogsCommandsCreate_SearchTag": { "additionalProperties": false, "properties": { - "dto": { - "$ref": "#/components/schemas/V1ServiceOwnerDialogsCommandsUpdate_Dialog" + "value": { + "description": "A search tag value.", + "type": "string" } - } + }, + "type": "object" }, - "V1ServiceOwnerDialogsCommandsUpdate_Dialog": { - "type": "object", + "V1ServiceOwnerDialogsCommandsCreate_Transmission": { "additionalProperties": false, "properties": { - "progress": { - "type": "integer", - "description": "Advisory indicator of progress, represented as 1-100 percentage value. 100% representing a dialog that has come\nto a natural completion (successful or not).", - "format": "int32", - "nullable": true + "attachments": { + "description": "The transmission-level attachments.", + "items": { + "$ref": "#/components/schemas/V1ServiceOwnerDialogsCommandsCreate_TransmissionAttachment" + }, + "nullable": true, + "type": "array" }, - "extendedStatus": { - "type": "string", - "description": "Arbitrary string with a service-specific indicator of status, typically used to indicate a fine-grained state of\nthe dialog to further specify the \"status\" enum.", - "nullable": true + "authorizationAttribute": { + "description": "Contains an authorization resource attributeId, that can used in custom authorization rules in the XACML service\npolicy, which by default is the policy belonging to the service referred to by \u0022serviceResource\u0022 in the dialog.\n \nCan also be used to refer to other service policies.", + "example": "mycustomresource\n/* equivalent to the above */\nurn:altinn:subresource:mycustomresource\nurn:altinn:task:Task_1\n/* refer to another service */\nurn:altinn:resource:some-other-service-identifier", + "nullable": true, + "type": "string" }, - "externalReference": { - "type": "string", - "description": "Arbitrary string with a service-specific reference to an external system or service.", - "nullable": true + "content": { + "description": "The transmission unstructured text content.", + "oneOf": [ + { + "$ref": "#/components/schemas/V1ServiceOwnerDialogsCommandsCreate_TransmissionContent" + } + ] }, - "visibleFrom": { - "type": "string", - "description": "The timestamp when the dialog should be made visible for authorized end users. If not provided, the dialog will be\nimmediately available.", + "createdAt": { + "description": "If supplied, overrides the creating date and time for the transmission.\nIf not supplied, the current date /time will be used.", "format": "date-time", + "type": "string" + }, + "extendedType": { + "description": "Arbitrary URI/URN describing a service-specific transmission type.\n \nRefer to the service-specific documentation provided by the service owner for details (if in use).", + "format": "uri", "nullable": true, - "example": "2022-12-31T23:59:59Z" + "type": "string" }, - "dueAt": { - "type": "string", - "description": "The due date for the dialog. Dialogs past due date might be marked as such in frontends but will still be available.", - "format": "date-time", + "id": { + "description": "A self-defined UUIDv7 may be provided to support idempotent creation of transmissions. If not provided, a new UUIDv7 will be generated.", + "example": "01913cd5-784f-7d3b-abef-4c77b1f0972d", + "format": "guid", "nullable": true, - "example": "2022-12-31T23:59:59Z" + "type": "string" }, - "expiresAt": { - "type": "string", - "description": "The expiration date for the dialog. This is the last date when the dialog is available for the end user.\n \nAfter this date is passed, the dialog will be considered expired and no longer available for the end user in any\nAPI. If not supplied, the dialog will be considered to never expire. This field can be changed after creation.", - "format": "date-time", + "relatedTransmissionId": { + "description": "Reference to any other transmission that this transmission is related to.", + "format": "guid", "nullable": true, - "example": "2022-12-31T23:59:59Z" + "type": "string" }, - "status": { - "description": "The aggregated status of the dialog.", + "sender": { + "description": "The actor that sent the transmission.", "oneOf": [ { - "$ref": "#/components/schemas/DialogsEntities_DialogStatus" + "$ref": "#/components/schemas/V1ServiceOwnerCommonActors_Actor" } ] }, - "content": { - "description": "The dialog unstructured text content.", + "type": { + "description": "The type of transmission.", "oneOf": [ { - "$ref": "#/components/schemas/V1ServiceOwnerDialogsCommandsUpdate_Content" + "$ref": "#/components/schemas/DialogsEntitiesTransmissions_DialogTransmissionType" } ] - }, - "searchTags": { - "type": "array", - "description": "A list of words (tags) that will be used in dialog search queries. Not visible in end-user DTO.", - "nullable": true, - "items": { - "$ref": "#/components/schemas/V1ServiceOwnerDialogsCommandsUpdate_SearchTag" - } - }, - "attachments": { - "type": "array", - "description": "The attachments associated with the dialog (on an aggregate level).", - "nullable": true, - "items": { - "$ref": "#/components/schemas/V1ServiceOwnerDialogsCommandsUpdate_Attachment" - } - }, - "transmissions": { - "type": "array", - "description": "The immutable list of transmissions associated with the dialog. When updating via PUT, any transmissions\nadded here will be appended to the existing list of transmissions.", - "nullable": true, + } + }, + "type": "object" + }, + "V1ServiceOwnerDialogsCommandsCreate_TransmissionAttachment": { + "additionalProperties": false, + "properties": { + "displayName": { + "description": "The display name of the attachment that should be used in GUIs.", "items": { - "$ref": "#/components/schemas/V1ServiceOwnerDialogsCommandsUpdate_Transmission" - } - }, - "guiActions": { - "type": "array", - "description": "The GUI actions associated with the dialog. Should be used in browser-based interactive frontends.", + "$ref": "#/components/schemas/V1CommonLocalizations_Localization" + }, "nullable": true, - "items": { - "$ref": "#/components/schemas/V1ServiceOwnerDialogsCommandsUpdate_GuiAction" - } + "type": "array" }, - "apiActions": { - "type": "array", - "description": "The API actions associated with the dialog. Should be used in specialized, non-browser-based integrations.", + "id": { + "description": "A self-defined UUIDv7 may be provided to support idempotent creation of transmission attachments. If not provided, a new UUIDv7 will be generated.", + "example": "01913cd5-784f-7d3b-abef-4c77b1f0972d", + "format": "guid", "nullable": true, - "items": { - "$ref": "#/components/schemas/V1ServiceOwnerDialogsCommandsUpdate_ApiAction" - } + "type": "string" }, - "activities": { - "type": "array", - "description": "An immutable list of activities associated with the dialog. When updating via PUT, any activities added here\nwill be appended to the existing list of activities.", - "nullable": true, + "urls": { + "description": "The URLs associated with the attachment, each referring to a different representation of the attachment.", "items": { - "$ref": "#/components/schemas/V1ServiceOwnerDialogsCommandsUpdate_Activity" - } + "$ref": "#/components/schemas/V1ServiceOwnerDialogsCommandsCreate_TransmissionAttachmentUrl" + }, + "nullable": true, + "type": "array" } - } - }, - "DialogsEntities_DialogStatus": { - "type": "string", - "description": "", - "x-enumNames": [ - "New", - "InProgress", - "Draft", - "Sent", - "RequiresAttention", - "Completed" - ], - "enum": [ - "New", - "InProgress", - "Draft", - "Sent", - "RequiresAttention", - "Completed" - ] + }, + "type": "object" }, - "V1ServiceOwnerDialogsCommandsUpdate_Content": { - "type": "object", + "V1ServiceOwnerDialogsCommandsCreate_TransmissionAttachmentUrl": { "additionalProperties": false, "properties": { - "title": { - "description": "The title of the dialog. Must be text/plain.", + "consumerType": { + "description": "The type of consumer the URL is intended for.", "oneOf": [ { - "$ref": "#/components/schemas/V1CommonContent_ContentValue" + "$ref": "#/components/schemas/Attachments_AttachmentUrlConsumerType" } ] }, - "summary": { - "description": "A short summary of the dialog and its current state. Must be text/plain.", + "mediaType": { + "description": "The media type of the attachment.", + "example": "application/pdf\napplication/zip", + "nullable": true, + "type": "string" + }, + "url": { + "description": "The fully qualified URL of the attachment.", + "format": "uri", + "type": "string" + } + }, + "type": "object" + }, + "V1ServiceOwnerDialogsCommandsCreate_TransmissionContent": { + "additionalProperties": false, + "properties": { + "contentReference": { + "description": "Front-channel embedded content. Used to dynamically embed content in the frontend from an external URL. Must be HTTPS.\nAllowed media types: application/vnd.dialogporten.frontchannelembed\u002Bjson;type=markdown", + "nullable": true, "oneOf": [ { "$ref": "#/components/schemas/V1CommonContent_ContentValue" } ] }, - "senderName": { - "description": "Overridden sender name. If not supplied, assume \"org\" as the sender name. Must be text/plain if supplied.", - "nullable": true, + "summary": { + "description": "The transmission summary.", "oneOf": [ { "$ref": "#/components/schemas/V1CommonContent_ContentValue" } ] }, - "additionalInfo": { - "description": "Additional information about the dialog, this may contain Markdown.", - "nullable": true, + "title": { + "description": "The transmission title. Must be text/plain.", "oneOf": [ { "$ref": "#/components/schemas/V1CommonContent_ContentValue" } ] + } + }, + "type": "object" + }, + "V1ServiceOwnerDialogsCommandsUpdate_Activity": { + "additionalProperties": false, + "properties": { + "createdAt": { + "description": "If supplied, overrides the creating date and time for the transmission.\nIf not supplied, the current date /time will be used.", + "format": "date-time", + "nullable": true, + "type": "string" }, - "extendedStatus": { - "description": "Used as the human-readable label used to describe the \"ExtendedStatus\" field. Must be text/plain.", + "description": { + "description": "Unstructured text describing the activity. Only set if the activity type is \u0022Information\u0022.", + "items": { + "$ref": "#/components/schemas/V1CommonLocalizations_Localization" + }, + "nullable": true, + "type": "array" + }, + "extendedType": { + "description": "Arbitrary URI/URN describing a service-specific transmission type.", + "format": "uri", + "nullable": true, + "type": "string" + }, + "id": { + "description": "The UUDIv7 of the action may be provided to support idempotent additions to the list of activities.\nIf not supplied, a new UUIDv7 will be generated.", + "example": "01913cd5-784f-7d3b-abef-4c77b1f0972d", + "format": "guid", "nullable": true, + "type": "string" + }, + "performedBy": { + "description": "The actor that performed the activity.", "oneOf": [ { - "$ref": "#/components/schemas/V1CommonContent_ContentValue" + "$ref": "#/components/schemas/V1ServiceOwnerCommonActors_Actor" } ] }, - "mainContentReference": { - "description": "Front-channel embedded content. Used to dynamically embed content in the frontend from an external URL. Must be HTTPS.", + "transmissionId": { + "description": "If the activity is related to a particular transmission, this field will contain the transmission identifier.\nMust be present in the request body.", + "format": "guid", "nullable": true, + "type": "string" + }, + "type": { + "description": "The type of transmission.", "oneOf": [ { - "$ref": "#/components/schemas/V1CommonContent_ContentValue" + "$ref": "#/components/schemas/DialogsEntitiesActivities_DialogActivityType" } ] } - } + }, + "type": "object" }, - "V1ServiceOwnerDialogsCommandsUpdate_SearchTag": { - "type": "object", + "V1ServiceOwnerDialogsCommandsUpdate_ApiAction": { "additionalProperties": false, "properties": { - "value": { - "type": "string", - "description": "A search tag value." + "action": { + "description": "String identifier for the action, corresponding to the \u0022action\u0022 attributeId used in the XACML service policy,\nwhich by default is the policy belonging to the service referred to by \u0022serviceResource\u0022 in the dialog.", + "example": "write", + "type": "string" + }, + "authorizationAttribute": { + "description": "Contains an authorization resource attributeId, that can used in custom authorization rules in the XACML service\npolicy, which by default is the policy belonging to the service referred to by \u0022serviceResource\u0022 in the dialog.\n \nCan also be used to refer to other service policies.", + "example": "mycustomresource\n/* equivalent to the above */\nurn:altinn:subresource:mycustomresource\nurn:altinn:task:Task_1\n/* refer to another service */\nurn:altinn:resource:some-other-service-identifier", + "nullable": true, + "type": "string" + }, + "endpoints": { + "description": "The endpoints associated with the action.", + "items": { + "$ref": "#/components/schemas/V1ServiceOwnerDialogsCommandsUpdate_ApiActionEndpoint" + }, + "nullable": true, + "type": "array" + }, + "id": { + "description": "A self-defined UUIDv7 may be provided to support idempotent additions of Api Actions. If not provided, a new UUIDv7 will be generated.", + "example": "01913cd5-784f-7d3b-abef-4c77b1f0972d", + "format": "guid", + "nullable": true, + "type": "string" } - } + }, + "type": "object" }, - "V1ServiceOwnerDialogsCommandsUpdate_Attachment": { - "type": "object", + "V1ServiceOwnerDialogsCommandsUpdate_ApiActionEndpoint": { "additionalProperties": false, "properties": { + "deprecated": { + "description": "Boolean indicating if the endpoint is deprecated.", + "type": "boolean" + }, + "documentationUrl": { + "description": "Link to documentation for the endpoint, providing documentation for integrators. Should be a URL to a\nhuman-readable page.", + "format": "uri", + "nullable": true, + "type": "string" + }, + "httpMethod": { + "description": "The HTTP method that the endpoint expects for this action.", + "oneOf": [ + { + "$ref": "#/components/schemas/Http_HttpVerb" + } + ] + }, "id": { - "type": "string", - "description": "A self-defined UUIDv7 may be provided to support idempotent additions of attachments. If not provided, a new UUIDv7 will be generated.", + "description": "A UUIDv7 used for merging existing data, unknown IDs will be ignored as this entity does not support user-defined IDs.", + "example": "01913cd5-784f-7d3b-abef-4c77b1f0972d", "format": "guid", "nullable": true, - "example": "01913cd5-784f-7d3b-abef-4c77b1f0972d" + "type": "string" + }, + "requestSchema": { + "description": "Link to the request schema for the endpoint. Used to provide documentation for integrators.\nDialogporten will not validate information on this endpoint.", + "format": "uri", + "nullable": true, + "type": "string" + }, + "responseSchema": { + "description": "Link to the response schema for the endpoint. Used to provide documentation for integrators.\nDialogporten will not validate information on this endpoint.", + "format": "uri", + "nullable": true, + "type": "string" + }, + "sunsetAt": { + "description": "Date and time when the endpoint will no longer function. Only set if the endpoint is deprecated. Dialogporten\nwill not enforce this date.", + "format": "date-time", + "nullable": true, + "type": "string" + }, + "url": { + "description": "The fully qualified URL of the API endpoint.", + "format": "uri", + "type": "string" }, + "version": { + "description": "Arbitrary string indicating the version of the endpoint.", + "nullable": true, + "type": "string" + } + }, + "type": "object" + }, + "V1ServiceOwnerDialogsCommandsUpdate_Attachment": { + "additionalProperties": false, + "properties": { "displayName": { - "type": "array", "description": "The display name of the attachment that should be used in GUIs.", - "nullable": true, "items": { "$ref": "#/components/schemas/V1CommonLocalizations_Localization" - } + }, + "nullable": true, + "type": "array" + }, + "id": { + "description": "A self-defined UUIDv7 may be provided to support idempotent additions of attachments. If not provided, a new UUIDv7 will be generated.", + "example": "01913cd5-784f-7d3b-abef-4c77b1f0972d", + "format": "guid", + "nullable": true, + "type": "string" }, "urls": { - "type": "array", "description": "The URLs associated with the attachment, each referring to a different representation of the attachment.", - "nullable": true, "items": { "$ref": "#/components/schemas/V1ServiceOwnerDialogsCommandsUpdate_AttachmentUrl" - } + }, + "nullable": true, + "type": "array" } - } + }, + "type": "object" }, "V1ServiceOwnerDialogsCommandsUpdate_AttachmentUrl": { - "type": "object", "additionalProperties": false, "properties": { - "id": { - "type": "string", - "description": "A UUIDv7 used for merging existing data, unknown IDs will be ignored as this entity does not support user-defined IDs.", - "format": "guid", + "consumerType": { + "description": "The type of consumer the URL is intended for.", + "oneOf": [ + { + "$ref": "#/components/schemas/Attachments_AttachmentUrlConsumerType" + } + ] + }, + "id": { + "description": "A UUIDv7 used for merging existing data, unknown IDs will be ignored as this entity does not support user-defined IDs.", + "example": "01913cd5-784f-7d3b-abef-4c77b1f0972d", + "format": "guid", + "nullable": true, + "type": "string" + }, + "mediaType": { + "description": "The media type of the attachment.", + "example": "application/pdf\napplication/zip", + "nullable": true, + "type": "string" + }, + "url": { + "description": "The fully qualified URL of the attachment.", + "format": "uri", + "type": "string" + } + }, + "type": "object" + }, + "V1ServiceOwnerDialogsCommandsUpdate_Content": { + "additionalProperties": false, + "properties": { + "additionalInfo": { + "description": "Additional information about the dialog, this may contain Markdown.", "nullable": true, - "example": "01913cd5-784f-7d3b-abef-4c77b1f0972d" - }, - "url": { - "type": "string", - "description": "The fully qualified URL of the attachment.", - "format": "uri" + "oneOf": [ + { + "$ref": "#/components/schemas/V1CommonContent_ContentValue" + } + ] }, - "mediaType": { - "type": "string", - "description": "The media type of the attachment.", + "extendedStatus": { + "description": "Used as the human-readable label used to describe the \u0022ExtendedStatus\u0022 field. Must be text/plain.", "nullable": true, - "example": "application/pdf\napplication/zip" - }, - "consumerType": { - "description": "The type of consumer the URL is intended for.", "oneOf": [ { - "$ref": "#/components/schemas/Attachments_AttachmentUrlConsumerType" + "$ref": "#/components/schemas/V1CommonContent_ContentValue" } ] - } - } - }, - "V1ServiceOwnerDialogsCommandsUpdate_Transmission": { - "type": "object", - "additionalProperties": false, - "properties": { - "id": { - "type": "string", - "description": "The UUDIv7 of the action may be provided to support idempotent additions to the list of transmissions.\nIf not supplied, a new UUIDv7 will be generated.", - "format": "guid", - "nullable": true, - "example": "01913cd5-784f-7d3b-abef-4c77b1f0972d" - }, - "createdAt": { - "type": "string", - "description": "If supplied, overrides the creating date and time for the transmission.\nIf not supplied, the current date /time will be used.", - "format": "date-time" }, - "authorizationAttribute": { - "type": "string", - "description": "Contains an authorization resource attributeId, that can used in custom authorization rules in the XACML service\npolicy, which by default is the policy belonging to the service referred to by \"serviceResource\" in the dialog.\n \nCan also be used to refer to other service policies.", + "mainContentReference": { + "description": "Front-channel embedded content. Used to dynamically embed content in the frontend from an external URL. Must be HTTPS.", "nullable": true, - "example": "mycustomresource\n/* equivalent to the above */\nurn:altinn:subresource:mycustomresource\nurn:altinn:task:Task_1\n/* refer to another service */\nurn:altinn:resource:some-other-service-identifier" - }, - "extendedType": { - "type": "string", - "description": "Arbitrary URI/URN describing a service-specific transmission type.\n \nRefer to the service-specific documentation provided by the service owner for details (if in use).", - "format": "uri", - "nullable": true - }, - "relatedTransmissionId": { - "type": "string", - "description": "Reference to any other transmission that this transmission is related to.", - "format": "guid", - "nullable": true - }, - "type": { - "description": "The type of transmission.", "oneOf": [ { - "$ref": "#/components/schemas/DialogsEntitiesTransmissions_DialogTransmissionType" + "$ref": "#/components/schemas/V1CommonContent_ContentValue" } ] }, - "sender": { - "description": "The actor that sent the transmission.", + "senderName": { + "description": "Overridden sender name. If not supplied, assume \u0022org\u0022 as the sender name. Must be text/plain if supplied.", + "nullable": true, "oneOf": [ { - "$ref": "#/components/schemas/V1ServiceOwnerCommonActors_Actor" + "$ref": "#/components/schemas/V1CommonContent_ContentValue" } ] }, - "content": { - "description": "The transmission unstructured text content.", + "summary": { + "description": "A short summary of the dialog and its current state. Must be text/plain.", "oneOf": [ { - "$ref": "#/components/schemas/V1ServiceOwnerDialogsCommandsUpdate_TransmissionContent" + "$ref": "#/components/schemas/V1CommonContent_ContentValue" } ] }, - "attachments": { - "type": "array", - "description": "The transmission-level attachments.", - "nullable": true, - "items": { - "$ref": "#/components/schemas/V1ServiceOwnerDialogsCommandsUpdate_TransmissionAttachment" - } + "title": { + "description": "The title of the dialog. Must be text/plain.", + "oneOf": [ + { + "$ref": "#/components/schemas/V1CommonContent_ContentValue" + } + ] } - } + }, + "type": "object" }, - "V1ServiceOwnerDialogsCommandsUpdate_GuiAction": { - "type": "object", + "V1ServiceOwnerDialogsCommandsUpdate_Dialog": { "additionalProperties": false, "properties": { - "id": { - "type": "string", - "description": "A self-defined UUIDv7 may be provided to support idempotent additions of Gui Actions. If not provided, a new UUIDv7 will be generated.", - "format": "guid", + "activities": { + "description": "An immutable list of activities associated with the dialog. When updating via PUT, any activities added here\nwill be appended to the existing list of activities.", + "items": { + "$ref": "#/components/schemas/V1ServiceOwnerDialogsCommandsUpdate_Activity" + }, "nullable": true, - "example": "01913cd5-784f-7d3b-abef-4c77b1f0972d" - }, - "action": { - "type": "string", - "description": "The action identifier for the action, corresponding to the \"action\" attributeId used in the XACML service policy." - }, - "url": { - "type": "string", - "description": "The fully qualified URL of the action, to which the user will be redirected when the action is triggered. Will be set to\n\"urn:dialogporten:unauthorized\" if the user is not authorized to perform the action.", - "format": "uri", - "example": "urn:dialogporten:unauthorized\nhttps://someendpoint.com/gui/some-service-instance-id" + "type": "array" }, - "authorizationAttribute": { - "type": "string", - "description": "Contains an authorization resource attributeId, that can used in custom authorization rules in the XACML service\npolicy, which by default is the policy belonging to the service referred to by \"serviceResource\" in the dialog.\n \nCan also be used to refer to other service policies.", + "apiActions": { + "description": "The API actions associated with the dialog. Should be used in specialized, non-browser-based integrations.", + "items": { + "$ref": "#/components/schemas/V1ServiceOwnerDialogsCommandsUpdate_ApiAction" + }, "nullable": true, - "example": "mycustomresource\n/* equivalent to the above */\nurn:altinn:subresource:mycustomresource\nurn:altinn:task:Task_1\n/* refer to another service */\nurn:altinn:resource:some-other-service-identifier" - }, - "isDeleteDialogAction": { - "type": "boolean", - "description": "Indicates whether the action results in the dialog being deleted. Used by frontends to implement custom UX\nfor delete actions." + "type": "array" }, - "httpMethod": { - "description": "The HTTP method that the frontend should use when redirecting the user.", + "attachments": { + "description": "The attachments associated with the dialog (on an aggregate level).", + "items": { + "$ref": "#/components/schemas/V1ServiceOwnerDialogsCommandsUpdate_Attachment" + }, "nullable": true, + "type": "array" + }, + "content": { + "description": "The dialog unstructured text content.", "oneOf": [ { - "$ref": "#/components/schemas/Http_HttpVerb" + "$ref": "#/components/schemas/V1ServiceOwnerDialogsCommandsUpdate_Content" } ] }, - "priority": { - "description": "Indicates a priority for the action, making it possible for frontends to adapt GUI elements based on action\npriority.", + "dueAt": { + "description": "The due date for the dialog. Dialogs past due date might be marked as such in frontends but will still be available.", + "example": "2022-12-31T23:59:59Z", + "format": "date-time", + "nullable": true, + "type": "string" + }, + "expiresAt": { + "description": "The expiration date for the dialog. This is the last date when the dialog is available for the end user.\n \nAfter this date is passed, the dialog will be considered expired and no longer available for the end user in any\nAPI. If not supplied, the dialog will be considered to never expire. This field can be changed after creation.", + "example": "2022-12-31T23:59:59Z", + "format": "date-time", + "nullable": true, + "type": "string" + }, + "extendedStatus": { + "description": "Arbitrary string with a service-specific indicator of status, typically used to indicate a fine-grained state of\nthe dialog to further specify the \u0022status\u0022 enum.", + "nullable": true, + "type": "string" + }, + "externalReference": { + "description": "Arbitrary string with a service-specific reference to an external system or service.", + "nullable": true, + "type": "string" + }, + "guiActions": { + "description": "The GUI actions associated with the dialog. Should be used in browser-based interactive frontends.", + "items": { + "$ref": "#/components/schemas/V1ServiceOwnerDialogsCommandsUpdate_GuiAction" + }, + "nullable": true, + "type": "array" + }, + "progress": { + "description": "Advisory indicator of progress, represented as 1-100 percentage value. 100% representing a dialog that has come\nto a natural completion (successful or not).", + "format": "int32", + "nullable": true, + "type": "integer" + }, + "searchTags": { + "description": "A list of words (tags) that will be used in dialog search queries. Not visible in end-user DTO.", + "items": { + "$ref": "#/components/schemas/V1ServiceOwnerDialogsCommandsUpdate_SearchTag" + }, + "nullable": true, + "type": "array" + }, + "status": { + "description": "The aggregated status of the dialog.", "oneOf": [ { - "$ref": "#/components/schemas/DialogsEntitiesActions_DialogGuiActionPriority" + "$ref": "#/components/schemas/DialogsEntities_DialogStatus" } ] }, - "title": { - "type": "array", - "description": "The title of the action, this should be short and in verb form. Must be text/plain.", - "nullable": true, + "transmissions": { + "description": "The immutable list of transmissions associated with the dialog. When updating via PUT, any transmissions\nadded here will be appended to the existing list of transmissions.", "items": { - "$ref": "#/components/schemas/V1CommonLocalizations_Localization" - } + "$ref": "#/components/schemas/V1ServiceOwnerDialogsCommandsUpdate_Transmission" + }, + "nullable": true, + "type": "array" }, - "prompt": { - "type": "array", - "description": "If there should be a prompt asking the user for confirmation before the action is executed,\nthis field should contain the prompt text.", + "visibleFrom": { + "description": "The timestamp when the dialog should be made visible for authorized end users. If not provided, the dialog will be\nimmediately available.", + "example": "2022-12-31T23:59:59Z", + "format": "date-time", "nullable": true, - "items": { - "$ref": "#/components/schemas/V1CommonLocalizations_Localization" - } + "type": "string" } - } - }, - "Http_HttpVerb": { - "type": "string", - "description": "", - "x-enumNames": [ - "GET", - "POST", - "PUT", - "PATCH", - "DELETE", - "HEAD", - "OPTIONS", - "TRACE", - "CONNECT" - ], - "enum": [ - "GET", - "POST", - "PUT", - "PATCH", - "DELETE", - "HEAD", - "OPTIONS", - "TRACE", - "CONNECT" - ] - }, - "DialogsEntitiesActions_DialogGuiActionPriority": { - "type": "string", - "description": "", - "x-enumNames": [ - "Primary", - "Secondary", - "Tertiary" - ], - "enum": [ - "Primary", - "Secondary", - "Tertiary" - ] + }, + "type": "object" }, - "V1ServiceOwnerDialogsCommandsUpdate_ApiAction": { - "type": "object", + "V1ServiceOwnerDialogsCommandsUpdate_GuiAction": { "additionalProperties": false, "properties": { - "id": { - "type": "string", - "description": "A self-defined UUIDv7 may be provided to support idempotent additions of Api Actions. If not provided, a new UUIDv7 will be generated.", - "format": "guid", - "nullable": true, - "example": "01913cd5-784f-7d3b-abef-4c77b1f0972d" - }, "action": { - "type": "string", - "description": "String identifier for the action, corresponding to the \"action\" attributeId used in the XACML service policy,\nwhich by default is the policy belonging to the service referred to by \"serviceResource\" in the dialog.", - "example": "write" + "description": "The action identifier for the action, corresponding to the \u0022action\u0022 attributeId used in the XACML service policy.", + "type": "string" }, "authorizationAttribute": { - "type": "string", - "description": "Contains an authorization resource attributeId, that can used in custom authorization rules in the XACML service\npolicy, which by default is the policy belonging to the service referred to by \"serviceResource\" in the dialog.\n \nCan also be used to refer to other service policies.", + "description": "Contains an authorization resource attributeId, that can used in custom authorization rules in the XACML service\npolicy, which by default is the policy belonging to the service referred to by \u0022serviceResource\u0022 in the dialog.\n \nCan also be used to refer to other service policies.", + "example": "mycustomresource\n/* equivalent to the above */\nurn:altinn:subresource:mycustomresource\nurn:altinn:task:Task_1\n/* refer to another service */\nurn:altinn:resource:some-other-service-identifier", "nullable": true, - "example": "mycustomresource\n/* equivalent to the above */\nurn:altinn:subresource:mycustomresource\nurn:altinn:task:Task_1\n/* refer to another service */\nurn:altinn:resource:some-other-service-identifier" + "type": "string" }, - "endpoints": { - "type": "array", - "description": "The endpoints associated with the action.", + "httpMethod": { + "description": "The HTTP method that the frontend should use when redirecting the user.", "nullable": true, - "items": { - "$ref": "#/components/schemas/V1ServiceOwnerDialogsCommandsUpdate_ApiActionEndpoint" - } - } - } - }, - "V1ServiceOwnerDialogsCommandsUpdate_ApiActionEndpoint": { - "type": "object", - "additionalProperties": false, - "properties": { + "oneOf": [ + { + "$ref": "#/components/schemas/Http_HttpVerb" + } + ] + }, "id": { - "type": "string", - "description": "A UUIDv7 used for merging existing data, unknown IDs will be ignored as this entity does not support user-defined IDs.", + "description": "A self-defined UUIDv7 may be provided to support idempotent additions of Gui Actions. If not provided, a new UUIDv7 will be generated.", + "example": "01913cd5-784f-7d3b-abef-4c77b1f0972d", "format": "guid", "nullable": true, - "example": "01913cd5-784f-7d3b-abef-4c77b1f0972d" - }, - "version": { - "type": "string", - "description": "Arbitrary string indicating the version of the endpoint.", - "nullable": true + "type": "string" }, - "url": { - "type": "string", - "description": "The fully qualified URL of the API endpoint.", - "format": "uri" + "isDeleteDialogAction": { + "description": "Indicates whether the action results in the dialog being deleted. Used by frontends to implement custom UX\nfor delete actions.", + "type": "boolean" }, - "httpMethod": { - "description": "The HTTP method that the endpoint expects for this action.", + "priority": { + "description": "Indicates a priority for the action, making it possible for frontends to adapt GUI elements based on action\npriority.", "oneOf": [ { - "$ref": "#/components/schemas/Http_HttpVerb" + "$ref": "#/components/schemas/DialogsEntitiesActions_DialogGuiActionPriority" } ] }, - "documentationUrl": { - "type": "string", - "description": "Link to documentation for the endpoint, providing documentation for integrators. Should be a URL to a\nhuman-readable page.", - "format": "uri", - "nullable": true + "prompt": { + "description": "If there should be a prompt asking the user for confirmation before the action is executed,\nthis field should contain the prompt text.", + "items": { + "$ref": "#/components/schemas/V1CommonLocalizations_Localization" + }, + "nullable": true, + "type": "array" }, - "requestSchema": { - "type": "string", - "description": "Link to the request schema for the endpoint. Used to provide documentation for integrators.\nDialogporten will not validate information on this endpoint.", - "format": "uri", - "nullable": true + "title": { + "description": "The title of the action, this should be short and in verb form. Must be text/plain.", + "items": { + "$ref": "#/components/schemas/V1CommonLocalizations_Localization" + }, + "nullable": true, + "type": "array" }, - "responseSchema": { - "type": "string", - "description": "Link to the response schema for the endpoint. Used to provide documentation for integrators.\nDialogporten will not validate information on this endpoint.", + "url": { + "description": "The fully qualified URL of the action, to which the user will be redirected when the action is triggered. Will be set to\n\u0022urn:dialogporten:unauthorized\u0022 if the user is not authorized to perform the action.", + "example": "urn:dialogporten:unauthorized\nhttps://someendpoint.com/gui/some-service-instance-id", "format": "uri", - "nullable": true - }, - "deprecated": { - "type": "boolean", - "description": "Boolean indicating if the endpoint is deprecated." - }, - "sunsetAt": { - "type": "string", - "description": "Date and time when the endpoint will no longer function. Only set if the endpoint is deprecated. Dialogporten\nwill not enforce this date.", - "format": "date-time", - "nullable": true + "type": "string" } - } + }, + "type": "object" }, - "V1ServiceOwnerDialogsCommandsUpdate_Activity": { - "type": "object", + "V1ServiceOwnerDialogsCommandsUpdate_SearchTag": { "additionalProperties": false, "properties": { - "id": { - "type": "string", - "description": "The UUDIv7 of the action may be provided to support idempotent additions to the list of activities.\nIf not supplied, a new UUIDv7 will be generated.", - "format": "guid", + "value": { + "description": "A search tag value.", + "type": "string" + } + }, + "type": "object" + }, + "V1ServiceOwnerDialogsCommandsUpdate_Transmission": { + "additionalProperties": false, + "properties": { + "attachments": { + "description": "The transmission-level attachments.", + "items": { + "$ref": "#/components/schemas/V1ServiceOwnerDialogsCommandsUpdate_TransmissionAttachment" + }, + "nullable": true, + "type": "array" + }, + "authorizationAttribute": { + "description": "Contains an authorization resource attributeId, that can used in custom authorization rules in the XACML service\npolicy, which by default is the policy belonging to the service referred to by \u0022serviceResource\u0022 in the dialog.\n \nCan also be used to refer to other service policies.", + "example": "mycustomresource\n/* equivalent to the above */\nurn:altinn:subresource:mycustomresource\nurn:altinn:task:Task_1\n/* refer to another service */\nurn:altinn:resource:some-other-service-identifier", "nullable": true, - "example": "01913cd5-784f-7d3b-abef-4c77b1f0972d" + "type": "string" + }, + "content": { + "description": "The transmission unstructured text content.", + "oneOf": [ + { + "$ref": "#/components/schemas/V1ServiceOwnerDialogsCommandsUpdate_TransmissionContent" + } + ] }, "createdAt": { - "type": "string", "description": "If supplied, overrides the creating date and time for the transmission.\nIf not supplied, the current date /time will be used.", "format": "date-time", - "nullable": true + "type": "string" }, "extendedType": { - "type": "string", - "description": "Arbitrary URI/URN describing a service-specific transmission type.", + "description": "Arbitrary URI/URN describing a service-specific transmission type.\n \nRefer to the service-specific documentation provided by the service owner for details (if in use).", "format": "uri", - "nullable": true + "nullable": true, + "type": "string" }, - "type": { - "description": "The type of transmission.", - "oneOf": [ - { - "$ref": "#/components/schemas/DialogsEntitiesActivities_DialogActivityType" - } - ] + "id": { + "description": "The UUDIv7 of the action may be provided to support idempotent additions to the list of transmissions.\nIf not supplied, a new UUIDv7 will be generated.", + "example": "01913cd5-784f-7d3b-abef-4c77b1f0972d", + "format": "guid", + "nullable": true, + "type": "string" }, - "transmissionId": { - "type": "string", - "description": "If the activity is related to a particular transmission, this field will contain the transmission identifier.\nMust be present in the request body.", + "relatedTransmissionId": { + "description": "Reference to any other transmission that this transmission is related to.", "format": "guid", - "nullable": true + "nullable": true, + "type": "string" }, - "performedBy": { - "description": "The actor that performed the activity.", + "sender": { + "description": "The actor that sent the transmission.", "oneOf": [ { "$ref": "#/components/schemas/V1ServiceOwnerCommonActors_Actor" } ] }, - "description": { - "type": "array", - "description": "Unstructured text describing the activity. Only set if the activity type is \"Information\".", - "nullable": true, - "items": { - "$ref": "#/components/schemas/V1CommonLocalizations_Localization" - } + "type": { + "description": "The type of transmission.", + "oneOf": [ + { + "$ref": "#/components/schemas/DialogsEntitiesTransmissions_DialogTransmissionType" + } + ] } - } - }, - "DialogsEntitiesActivities_DialogActivityType": { - "type": "string", - "description": "", - "x-enumNames": [ - "DialogCreated", - "DialogClosed", - "Information", - "TransmissionOpened", - "PaymentMade", - "SignatureProvided", - "DialogOpened", - "DialogDeleted", - "DialogRestored", - "SentToSigning", - "SentToFormFill", - "SentToSendIn", - "SentToPayment" - ], - "enum": [ - "DialogCreated", - "DialogClosed", - "Information", - "TransmissionOpened", - "PaymentMade", - "SignatureProvided", - "DialogOpened", - "DialogDeleted", - "DialogRestored", - "SentToSigning", - "SentToFormFill", - "SentToSendIn", - "SentToPayment" - ] + }, + "type": "object" }, - "PaginatedListOfV1ServiceOwnerDialogsQueriesSearch_Dialog": { - "type": "object", + "V1ServiceOwnerDialogsCommandsUpdate_TransmissionAttachment": { "additionalProperties": false, "properties": { - "items": { - "type": "array", - "description": "The paginated list of items", - "nullable": true, + "displayName": { + "description": "The display name of the attachment that should be used in GUIs.", "items": { - "$ref": "#/components/schemas/V1ServiceOwnerDialogsQueriesSearch_Dialog" - } - }, - "hasNextPage": { - "type": "boolean", - "description": "Whether there are more items available that can be fetched by supplying the continuation token" + "$ref": "#/components/schemas/V1CommonLocalizations_Localization" + }, + "nullable": true, + "type": "array" }, - "continuationToken": { - "type": "string", - "description": "The continuation token to be used to fetch the next page of items", + "id": { + "description": "A self-defined UUIDv7 may be provided to support idempotent additions of transmission attachments. If not provided, a new UUIDv7 will be generated.", + "example": "01913cd5-784f-7d3b-abef-4c77b1f0972d", + "format": "guid", "nullable": true, - "example": "createdat_2024-07-31T09:09:03.0257090Z,id_0c089101-b7cf-a476-955c-f00a78d74a4e" + "type": "string" }, - "orderBy": { - "type": "string", - "description": "The current sorting order of the items", - "example": "createdat_desc,id_desc" + "urls": { + "description": "The URLs associated with the attachment, each referring to a different representation of the attachment.", + "items": { + "$ref": "#/components/schemas/V1ServiceOwnerDialogsCommandsUpdate_TransmissionAttachmentUrl" + }, + "nullable": true, + "type": "array" } - } + }, + "type": "object" }, - "V1ServiceOwnerDialogsQueriesSearch_Dialog": { - "type": "object", + "V1ServiceOwnerDialogsCommandsUpdate_TransmissionAttachmentUrl": { "additionalProperties": false, "properties": { - "id": { - "type": "string", - "description": "The unique identifier for the dialog in UUIDv7 format.", - "format": "guid", - "example": "01913cd5-784f-7d3b-abef-4c77b1f0972d" - }, - "org": { - "type": "string", - "description": "The service owner code representing the organization (service owner) related to this dialog.", - "example": "ske" - }, - "revision": { - "type": "string", - "description": "The unique identifier for the revision in UUIDv4 format.", - "format": "guid", - "example": "a312cb9c-7632-43c2-aa38-69b06aed56ca" - }, - "serviceResource": { - "type": "string", - "description": "The service identifier for the service that the dialog is related to in URN-format.\nThis corresponds to a service resource in the Altinn Resource Registry.", - "example": "urn:altinn:resource:some-service-identifier" - }, - "serviceResourceType": { - "type": "string", - "description": "The ServiceResource type, as defined in Altinn Resource Registry (see ResourceType)." - }, - "party": { - "type": "string", - "description": "The party code representing the organization or person that the dialog belongs to in URN format.", - "example": "urn:altinn:person:identifier-no:01125512345\nurn:altinn:organization:identifier-no:912345678" - }, - "progress": { - "type": "integer", - "description": "Advisory indicator of progress, represented as 1-100 percentage value. 100% representing a dialog that has come\nto a natural completion (successful or not).", - "format": "int32", - "nullable": true - }, - "process": { - "type": "string", - "description": "Optional process identifier used to indicate a business process this dialog belongs to.", - "nullable": true - }, - "precedingProcess": { - "type": "string", - "description": "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.", - "nullable": true - }, - "guiAttachmentCount": { - "type": "integer", - "description": "The number of attachments in the dialog made available for browser-based frontends.", - "format": "int32", - "nullable": true - }, - "extendedStatus": { - "type": "string", - "description": "Arbitrary string with a service-specific indicator of status, typically used to indicate a fine-grained state of\nthe dialog to further specify the \"status\" enum.\n \nRefer to the service-specific documentation provided by the service owner for details on the possible values (if\nin use).", - "nullable": true - }, - "externalReference": { - "type": "string", - "description": "Arbitrary string with a service-specific reference to an external system or service.\n \nRefer to the service-specific documentation provided by the service owner for details (if in use).", - "nullable": true - }, - "createdAt": { - "type": "string", - "description": "The date and time when the dialog was created.", - "format": "date-time", - "example": "2022-12-31T23:59:59Z" - }, - "updatedAt": { - "type": "string", - "description": "The date and time when the dialog was last updated.", - "format": "date-time", - "example": "2022-12-31T23:59:59Z" - }, - "dueAt": { - "type": "string", - "description": "The due date for the dialog. This is the last date when the dialog is expected to be completed.", - "format": "date-time", - "nullable": true, - "example": "2022-12-31T23:59:59Z" - }, - "visibleFrom": { - "type": "string", - "description": "The timestamp when the dialog will be made visible for authorized end users.", - "format": "date-time", - "nullable": true - }, - "status": { - "description": "The aggregated status of the dialog.", + "consumerType": { + "description": "The type of consumer the URL is intended for.", "oneOf": [ { - "$ref": "#/components/schemas/DialogsEntities_DialogStatus" + "$ref": "#/components/schemas/Attachments_AttachmentUrlConsumerType" } ] }, - "systemLabel": { - "description": "Current display state.", + "mediaType": { + "description": "The media type of the attachment.", + "example": "application/pdf\napplication/zip", + "nullable": true, + "type": "string" + }, + "url": { + "description": "The fully qualified URL of the attachment.", + "format": "uri", + "type": "string" + } + }, + "type": "object" + }, + "V1ServiceOwnerDialogsCommandsUpdate_TransmissionContent": { + "additionalProperties": false, + "properties": { + "contentReference": { + "description": "Front-channel embedded content. Used to dynamically embed content in the frontend from an external URL. Must be HTTPS.\nAllowed media types: application/vnd.dialogporten.frontchannelembed\u002Bjson;type=markdown", + "nullable": true, "oneOf": [ { - "$ref": "#/components/schemas/DialogEndUserContextsEntities_SystemLabel" + "$ref": "#/components/schemas/V1CommonContent_ContentValue" } ] }, - "latestActivity": { - "description": "The latest entry in the dialog's activity log.", - "nullable": true, + "summary": { + "description": "The transmission summary.", "oneOf": [ { - "$ref": "#/components/schemas/V1ServiceOwnerDialogsQueriesSearch_DialogActivity" + "$ref": "#/components/schemas/V1CommonContent_ContentValue" } ] }, - "seenSinceLastUpdate": { - "type": "array", - "description": "The list of seen log entries for the dialog newer than the dialog ChangedAt date.", - "nullable": true, - "items": { - "$ref": "#/components/schemas/V1ServiceOwnerDialogsQueriesSearch_DialogSeenLog" - } - }, - "content": { - "description": "The content of the dialog in search results.", + "title": { + "description": "The transmission title. Must be text/plain.", "oneOf": [ { - "$ref": "#/components/schemas/V1ServiceOwnerDialogsQueriesSearch_Content" + "$ref": "#/components/schemas/V1CommonContent_ContentValue" } ] } - } + }, + "type": "object" }, - "DialogEndUserContextsEntities_SystemLabel": { - "type": "string", - "description": "", - "x-enumNames": [ - "Default", - "Bin", - "Archive" - ], - "enum": [ - "Default", - "Bin", - "Archive" - ] + "V1ServiceOwnerDialogsCreate_DialogRequest": { + "additionalProperties": false, + "properties": { + "dto": { + "$ref": "#/components/schemas/V1ServiceOwnerDialogsCommandsCreate_Dialog" + } + }, + "type": "object" }, - "V1ServiceOwnerDialogsQueriesSearch_DialogActivity": { - "type": "object", + "V1ServiceOwnerDialogSeenLogsQueriesGet_SeenLog": { "additionalProperties": false, "properties": { "id": { - "type": "string", - "description": "The unique identifier for the activity in UUIDv7 format.", - "format": "guid" - }, - "createdAt": { - "type": "string", - "description": "The date and time when the activity was created.", - "format": "date-time", - "nullable": true - }, - "extendedType": { - "type": "string", - "description": "An arbitrary string with a service-specific activity type.\n \nConsult the service-specific documentation provided by the service owner for details (if in use).", - "format": "uri", - "nullable": true - }, - "type": { - "description": "The type of activity.", - "oneOf": [ - { - "$ref": "#/components/schemas/DialogsEntitiesActivities_DialogActivityType" - } - ] - }, - "transmissionId": { - "type": "string", - "description": "If the activity is related to a particular transmission, this field will contain the transmission identifier.", "format": "guid", - "nullable": true - }, - "performedBy": { - "description": "The actor that performed the activity.", - "oneOf": [ - { - "$ref": "#/components/schemas/V1ServiceOwnerCommonActors_Actor" - } - ] + "type": "string" }, - "description": { - "type": "array", - "description": "Unstructured text describing the activity. Only set if the activity type is \"Information\".", + "isViaServiceOwner": { "nullable": true, - "items": { - "$ref": "#/components/schemas/V1CommonLocalizations_Localization" - } + "type": "boolean" + }, + "seenAt": { + "format": "date-time", + "type": "string" + }, + "seenBy": { + "$ref": "#/components/schemas/V1ServiceOwnerCommonActors_Actor" } - } + }, + "type": "object" }, - "V1ServiceOwnerDialogsQueriesSearch_DialogSeenLog": { - "type": "object", + "V1ServiceOwnerDialogSeenLogsQueriesSearch_SeenLog": { "additionalProperties": false, "properties": { "id": { - "type": "string", - "description": "The unique identifier for the seen log entry in UUIDv7 format.", - "format": "guid" + "format": "guid", + "type": "string" + }, + "isViaServiceOwner": { + "nullable": true, + "type": "boolean" }, "seenAt": { - "type": "string", - "description": "The timestamp when the dialog revision was seen.", - "format": "date-time" + "format": "date-time", + "type": "string" }, "seenBy": { - "description": "The actor that saw the dialog revision.", + "$ref": "#/components/schemas/V1ServiceOwnerCommonActors_Actor" + } + }, + "type": "object" + }, + "V1ServiceOwnerDialogsQueriesGet_Content": { + "additionalProperties": false, + "properties": { + "additionalInfo": { + "description": "Additional information about the dialog, this may contain Markdown.", + "nullable": true, "oneOf": [ { - "$ref": "#/components/schemas/V1ServiceOwnerCommonActors_Actor" + "$ref": "#/components/schemas/V1CommonContent_ContentValue" } ] }, - "isViaServiceOwner": { - "type": "boolean", - "description": "Flag indicating whether the seen log entry was created via the service owner.\n \nThis is used when the service owner uses the service owner API to implement its own frontend.", - "nullable": true - }, - "isCurrentEndUser": { - "type": "boolean", - "description": "Flag indicating whether the seen log entry was created by the end user supplied in the query." - } - } - }, - "V1ServiceOwnerDialogsQueriesSearch_Content": { - "type": "object", - "additionalProperties": false, - "properties": { - "title": { - "description": "The title of the dialog.", + "extendedStatus": { + "description": "Used as the human-readable label used to describe the \u0022ExtendedStatus\u0022 field.", + "nullable": true, "oneOf": [ { "$ref": "#/components/schemas/V1CommonContent_ContentValue" } ] }, - "summary": { - "description": "A short summary of the dialog and its current state.", + "mainContentReference": { + "description": "Front-channel embedded content. Used to dynamically embed content in the frontend from an external URL. Must be HTTPS.\nAllowed media types: application/vnd.dialogporten.frontchannelembed\u002Bjson;type=markdown", + "nullable": true, "oneOf": [ { "$ref": "#/components/schemas/V1CommonContent_ContentValue" @@ -3970,7 +3335,7 @@ ] }, "senderName": { - "description": "Overridden sender name. If not supplied, assume \"org\" as the sender name.", + "description": "Overridden sender name. If not supplied, assume \u0022org\u0022 as the sender name.", "nullable": true, "oneOf": [ { @@ -3978,404 +3343,690 @@ } ] }, - "extendedStatus": { - "description": "Used as the human-readable label used to describe the \"ExtendedStatus\" field.", - "nullable": true, + "summary": { + "description": "A short summary of the dialog and its current state.", + "oneOf": [ + { + "$ref": "#/components/schemas/V1CommonContent_ContentValue" + } + ] + }, + "title": { + "description": "The title of the dialog.", "oneOf": [ { "$ref": "#/components/schemas/V1CommonContent_ContentValue" } ] } - } + }, + "type": "object" }, "V1ServiceOwnerDialogsQueriesGet_Dialog": { - "type": "object", "additionalProperties": false, "properties": { + "activities": { + "description": "An immutable list of activities associated with the dialog.", + "items": { + "$ref": "#/components/schemas/V1ServiceOwnerDialogsQueriesGet_DialogActivity" + }, + "nullable": true, + "type": "array" + }, + "apiActions": { + "description": "The API actions associated with the dialog. Should be used in specialized, non-browser-based integrations.", + "items": { + "$ref": "#/components/schemas/V1ServiceOwnerDialogsQueriesGet_DialogApiAction" + }, + "nullable": true, + "type": "array" + }, + "attachments": { + "description": "The attachments associated with the dialog (on an aggregate level).", + "items": { + "$ref": "#/components/schemas/V1ServiceOwnerDialogsQueriesGet_DialogAttachment" + }, + "nullable": true, + "type": "array" + }, + "content": { + "description": "The dialog unstructured text content.", + "oneOf": [ + { + "$ref": "#/components/schemas/V1ServiceOwnerDialogsQueriesGet_Content" + } + ] + }, + "createdAt": { + "description": "The date and time when the dialog was created.", + "example": "2022-12-31T23:59:59Z", + "format": "date-time", + "type": "string" + }, + "deletedAt": { + "description": "If deleted, the date and time when the deletion was performed.", + "format": "date-time", + "nullable": true, + "type": "string" + }, + "dueAt": { + "description": "The due date for the dialog. Dialogs past due date might be marked as such in frontends but will still be available.", + "example": "2022-12-31T23:59:59Z", + "format": "date-time", + "nullable": true, + "type": "string" + }, + "expiresAt": { + "description": "The expiration date for the dialog. This is the last date when the dialog is available for the end user.\n \nAfter this date is passed, the dialog will be considered expired and no longer available for the end user in any\nAPI. If not supplied, the dialog will be considered to never expire. This field can be changed by the service\nowner after the dialog has been created.", + "example": "2022-12-31T23:59:59Z", + "format": "date-time", + "nullable": true, + "type": "string" + }, + "extendedStatus": { + "description": "Arbitrary string with a service-specific indicator of status, typically used to indicate a fine-grained state of\nthe dialog to further specify the \u0022status\u0022 enum.\n \nRefer to the service-specific documentation provided by the service owner for details on the possible values (if\nin use).", + "nullable": true, + "type": "string" + }, + "externalReference": { + "description": "Arbitrary string with a service-specific reference to an external system or service.\n \nRefer to the service-specific documentation provided by the service owner for details (if in use).", + "nullable": true, + "type": "string" + }, + "guiActions": { + "description": "The GUI actions associated with the dialog. Should be used in browser-based interactive frontends.", + "items": { + "$ref": "#/components/schemas/V1ServiceOwnerDialogsQueriesGet_DialogGuiAction" + }, + "nullable": true, + "type": "array" + }, "id": { - "type": "string", "description": "The unique identifier for the dialog in UUIDv7 format.", + "example": "01913cd5-784f-7d3b-abef-4c77b1f0972d", "format": "guid", - "example": "01913cd5-784f-7d3b-abef-4c77b1f0972d" + "type": "string" + }, + "org": { + "description": "The service owner code representing the organization (service owner) related to this dialog.", + "example": "ske", + "type": "string" + }, + "party": { + "description": "The party code representing the organization or person that the dialog belongs to in URN format.", + "example": "urn:altinn:person:identifier-no:01125512345\nurn:altinn:organization:identifier-no:912345678", + "type": "string" + }, + "precedingProcess": { + "description": "Optional preceding process identifier to indicate the business process that preceded the process indicated in the \u0022Process\u0022 field. Cannot be set without also \u0022Process\u0022 being set.", + "nullable": true, + "type": "string" + }, + "process": { + "description": "Optional process identifier used to indicate a business process this dialog belongs to.", + "nullable": true, + "type": "string" + }, + "progress": { + "description": "Advisory indicator of progress, represented as 1-100 percentage value. 100% representing a dialog that has come\nto a natural completion (successful or not).", + "format": "int32", + "nullable": true, + "type": "integer" }, "revision": { - "type": "string", "description": "The unique identifier for the revision in UUIDv4 format.", + "example": "a312cb9c-7632-43c2-aa38-69b06aed56ca", "format": "guid", - "example": "a312cb9c-7632-43c2-aa38-69b06aed56ca" + "type": "string" }, - "org": { - "type": "string", - "description": "The service owner code representing the organization (service owner) related to this dialog.", - "example": "ske" + "searchTags": { + "description": "The list of words (tags) that will be used in dialog search queries. Not visible in end-user DTO.", + "items": { + "$ref": "#/components/schemas/V1ServiceOwnerDialogsQueriesGet_SearchTag" + }, + "nullable": true, + "type": "array" + }, + "seenSinceLastUpdate": { + "description": "The list of seen log entries for the dialog newer than the dialog ChangedAt date.", + "items": { + "$ref": "#/components/schemas/V1ServiceOwnerDialogsQueriesGet_DialogSeenLog" + }, + "nullable": true, + "type": "array" }, "serviceResource": { - "type": "string", "description": "The service identifier for the service that the dialog is related to in URN-format.\nThis corresponds to a service resource in the Altinn Resource Registry.", - "example": "urn:altinn:resource:some-service-identifier" + "example": "urn:altinn:resource:some-service-identifier", + "type": "string" }, "serviceResourceType": { - "type": "string", - "description": "The ServiceResource type, as defined in Altinn Resource Registry (see ResourceType)." - }, - "party": { - "type": "string", - "description": "The party code representing the organization or person that the dialog belongs to in URN format.", - "example": "urn:altinn:person:identifier-no:01125512345\nurn:altinn:organization:identifier-no:912345678" - }, - "progress": { - "type": "integer", - "description": "Advisory indicator of progress, represented as 1-100 percentage value. 100% representing a dialog that has come\nto a natural completion (successful or not).", - "format": "int32", - "nullable": true - }, - "process": { - "type": "string", - "description": "Optional process identifier used to indicate a business process this dialog belongs to.", - "nullable": true + "description": "The ServiceResource type, as defined in Altinn Resource Registry (see ResourceType).", + "type": "string" }, - "precedingProcess": { - "type": "string", - "description": "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.", - "nullable": true + "status": { + "description": "The aggregated status of the dialog.", + "oneOf": [ + { + "$ref": "#/components/schemas/DialogsEntities_DialogStatus" + } + ] }, - "extendedStatus": { - "type": "string", - "description": "Arbitrary string with a service-specific indicator of status, typically used to indicate a fine-grained state of\nthe dialog to further specify the \"status\" enum.\n \nRefer to the service-specific documentation provided by the service owner for details on the possible values (if\nin use).", - "nullable": true + "systemLabel": { + "description": "Current display state.", + "oneOf": [ + { + "$ref": "#/components/schemas/DialogEndUserContextsEntities_SystemLabel" + } + ] }, - "externalReference": { - "type": "string", - "description": "Arbitrary string with a service-specific reference to an external system or service.\n \nRefer to the service-specific documentation provided by the service owner for details (if in use).", - "nullable": true + "transmissions": { + "description": "The immutable list of transmissions associated with the dialog.", + "items": { + "$ref": "#/components/schemas/V1ServiceOwnerDialogsQueriesGet_DialogTransmission" + }, + "nullable": true, + "type": "array" }, - "deletedAt": { - "type": "string", - "description": "If deleted, the date and time when the deletion was performed.", + "updatedAt": { + "description": "The date and time when the dialog was last updated.", + "example": "2022-12-31T23:59:59Z", "format": "date-time", - "nullable": true + "type": "string" }, "visibleFrom": { - "type": "string", "description": "The timestamp when the dialog will be made visible for authorized end users.", + "example": "2022-12-31T23:59:59Z", "format": "date-time", "nullable": true, - "example": "2022-12-31T23:59:59Z" - }, - "dueAt": { - "type": "string", - "description": "The due date for the dialog. Dialogs past due date might be marked as such in frontends but will still be available.", + "type": "string" + } + }, + "type": "object" + }, + "V1ServiceOwnerDialogsQueriesGet_DialogActivity": { + "additionalProperties": false, + "properties": { + "createdAt": { + "description": "The date and time when the activity was created.", "format": "date-time", "nullable": true, - "example": "2022-12-31T23:59:59Z" + "type": "string" }, - "expiresAt": { - "type": "string", - "description": "The expiration date for the dialog. This is the last date when the dialog is available for the end user.\n \nAfter this date is passed, the dialog will be considered expired and no longer available for the end user in any\nAPI. If not supplied, the dialog will be considered to never expire. This field can be changed by the service\nowner after the dialog has been created.", - "format": "date-time", + "description": { + "description": "Unstructured text describing the activity. Only set if the activity type is \u0022Information\u0022.", + "items": { + "$ref": "#/components/schemas/V1CommonLocalizations_Localization" + }, "nullable": true, - "example": "2022-12-31T23:59:59Z" + "type": "array" }, - "createdAt": { - "type": "string", - "description": "The date and time when the dialog was created.", - "format": "date-time", - "example": "2022-12-31T23:59:59Z" + "extendedType": { + "description": "An arbitrary URI/URN with a service-specific activity type.\n \nConsult the service-specific documentation provided by the service owner for details (if in use).", + "format": "uri", + "nullable": true, + "type": "string" }, - "updatedAt": { - "type": "string", - "description": "The date and time when the dialog was last updated.", - "format": "date-time", - "example": "2022-12-31T23:59:59Z" + "id": { + "description": "The unique identifier for the activity in UUIDv7 format.", + "format": "guid", + "type": "string" }, - "status": { - "description": "The aggregated status of the dialog.", + "performedBy": { + "description": "The actor that performed the activity.", "oneOf": [ { - "$ref": "#/components/schemas/DialogsEntities_DialogStatus" + "$ref": "#/components/schemas/V1ServiceOwnerCommonActors_Actor" } ] }, - "systemLabel": { - "description": "Current display state.", + "transmissionId": { + "description": "If the activity is related to a particular transmission, this field will contain the transmission identifier.", + "format": "guid", + "nullable": true, + "type": "string" + }, + "type": { + "description": "The type of activity.", "oneOf": [ { - "$ref": "#/components/schemas/DialogEndUserContextsEntities_SystemLabel" + "$ref": "#/components/schemas/DialogsEntitiesActivities_DialogActivityType" } ] + } + }, + "type": "object" + }, + "V1ServiceOwnerDialogsQueriesGet_DialogApiAction": { + "additionalProperties": false, + "properties": { + "action": { + "description": "String identifier for the action, corresponding to the \u0022action\u0022 attributeId used in the XACML service policy,\nwhich by default is the policy belonging to the service referred to by \u0022serviceResource\u0022 in the dialog.", + "example": "write", + "type": "string" }, - "content": { - "description": "The dialog unstructured text content.", + "authorizationAttribute": { + "description": "Contains an authorization resource attributeId, that can used in custom authorization rules in the XACML service\npolicy, which by default is the policy belonging to the service referred to by \u0022serviceResource\u0022 in the dialog.\n \nCan also be used to refer to other service policies.", + "example": "mycustomresource\n/* equivalent to the above */\nurn:altinn:subresource:mycustomresource\nurn:altinn:task:Task_1\n/* refer to another service */\nurn:altinn:resource:some-other-service-identifier", + "nullable": true, + "type": "string" + }, + "endpoints": { + "description": "The endpoints associated with the action.", + "items": { + "$ref": "#/components/schemas/V1ServiceOwnerDialogsQueriesGet_DialogApiActionEndpoint" + }, + "nullable": true, + "type": "array" + }, + "id": { + "description": "The unique identifier for the action in UUIDv7 format.", + "format": "guid", + "type": "string" + }, + "isAuthorized": { + "description": "True if the authenticated user (set in the query) is authorized for this action.", + "nullable": true, + "type": "boolean" + } + }, + "type": "object" + }, + "V1ServiceOwnerDialogsQueriesGet_DialogApiActionEndpoint": { + "additionalProperties": false, + "properties": { + "deprecated": { + "description": "Boolean indicating if the endpoint is deprecated. Integrators should migrate to endpoints with a higher version.", + "type": "boolean" + }, + "documentationUrl": { + "description": "Link to service provider documentation for the endpoint. Used for service owners to provide documentation for\nintegrators. Should be a URL to a human-readable page.", + "format": "uri", + "nullable": true, + "type": "string" + }, + "httpMethod": { + "description": "The HTTP method that the endpoint expects for this action.", "oneOf": [ { - "$ref": "#/components/schemas/V1ServiceOwnerDialogsQueriesGet_Content" + "$ref": "#/components/schemas/Http_HttpVerb" } ] }, - "searchTags": { - "type": "array", - "description": "The list of words (tags) that will be used in dialog search queries. Not visible in end-user DTO.", - "nullable": true, - "items": { - "$ref": "#/components/schemas/V1ServiceOwnerDialogsQueriesGet_SearchTag" - } + "id": { + "description": "The unique identifier for the endpoint in UUIDv7 format.", + "format": "guid", + "type": "string" }, - "attachments": { - "type": "array", - "description": "The attachments associated with the dialog (on an aggregate level).", + "requestSchema": { + "description": "Link to the request schema for the endpoint. Used by service owners to provide documentation for integrators.\nDialogporten will not validate information on this endpoint.", + "format": "uri", "nullable": true, - "items": { - "$ref": "#/components/schemas/V1ServiceOwnerDialogsQueriesGet_DialogAttachment" - } + "type": "string" }, - "transmissions": { - "type": "array", - "description": "The immutable list of transmissions associated with the dialog.", + "responseSchema": { + "description": "Link to the response schema for the endpoint. Used for service owners to provide documentation for integrators.\nDialogporten will not validate information on this endpoint.", + "format": "uri", "nullable": true, - "items": { - "$ref": "#/components/schemas/V1ServiceOwnerDialogsQueriesGet_DialogTransmission" - } + "type": "string" }, - "guiActions": { - "type": "array", - "description": "The GUI actions associated with the dialog. Should be used in browser-based interactive frontends.", + "sunsetAt": { + "description": "Date and time when the service owner has indicated that endpoint will no longer function. Only set if the endpoint\nis deprecated. Dialogporten will not enforce this date.", + "format": "date-time", "nullable": true, - "items": { - "$ref": "#/components/schemas/V1ServiceOwnerDialogsQueriesGet_DialogGuiAction" - } + "type": "string" }, - "apiActions": { - "type": "array", - "description": "The API actions associated with the dialog. Should be used in specialized, non-browser-based integrations.", + "url": { + "description": "The fully qualified URL of the API endpoint.", + "format": "uri", + "type": "string" + }, + "version": { + "description": "Arbitrary string indicating the version of the endpoint.\n \nConsult the service-specific documentation provided by the service owner for details (if in use).", "nullable": true, + "type": "string" + } + }, + "type": "object" + }, + "V1ServiceOwnerDialogsQueriesGet_DialogAttachment": { + "additionalProperties": false, + "properties": { + "displayName": { + "description": "The display name of the attachment that should be used in GUIs.", "items": { - "$ref": "#/components/schemas/V1ServiceOwnerDialogsQueriesGet_DialogApiAction" - } - }, - "activities": { - "type": "array", - "description": "An immutable list of activities associated with the dialog.", + "$ref": "#/components/schemas/V1CommonLocalizations_Localization" + }, "nullable": true, + "type": "array" + }, + "id": { + "description": "The unique identifier for the attachment in UUIDv7 format.", + "format": "guid", + "type": "string" + }, + "urls": { + "description": "The URLs associated with the attachment, each referring to a different representation of the attachment.", "items": { - "$ref": "#/components/schemas/V1ServiceOwnerDialogsQueriesGet_DialogActivity" - } + "$ref": "#/components/schemas/V1ServiceOwnerDialogsQueriesGet_DialogAttachmentUrl" + }, + "nullable": true, + "type": "array" + } + }, + "type": "object" + }, + "V1ServiceOwnerDialogsQueriesGet_DialogAttachmentUrl": { + "additionalProperties": false, + "properties": { + "consumerType": { + "description": "What type of consumer the URL is intended for.", + "oneOf": [ + { + "$ref": "#/components/schemas/Attachments_AttachmentUrlConsumerType" + } + ] }, - "seenSinceLastUpdate": { - "type": "array", - "description": "The list of seen log entries for the dialog newer than the dialog ChangedAt date.", + "id": { + "description": "The unique identifier for the attachment URL in UUIDv7 format.", + "format": "guid", + "type": "string" + }, + "mediaType": { + "description": "The media type of the attachment.", + "example": "application/pdf\napplication/zip", "nullable": true, - "items": { - "$ref": "#/components/schemas/V1ServiceOwnerDialogsQueriesGet_DialogSeenLog" - } + "type": "string" + }, + "url": { + "description": "The fully qualified URL of the attachment.", + "example": "https://someendpoint.com/someattachment.pdf", + "format": "uri", + "type": "string" } - } + }, + "type": "object" }, - "OrderSetOfTOrderDefinitionAndTTarget": {}, - "ContinuationTokenSetOfTOrderDefinitionAndTTarget": {}, - "V1ServiceOwnerDialogsQueriesGet_Content": { - "type": "object", + "V1ServiceOwnerDialogsQueriesGet_DialogGuiAction": { "additionalProperties": false, "properties": { - "title": { - "description": "The title of the dialog.", + "action": { + "description": "The action identifier for the action, corresponding to the \u0022action\u0022 attributeId used in the XACML service policy.", + "type": "string" + }, + "authorizationAttribute": { + "description": "Contains an authorization resource attributeId, that can used in custom authorization rules in the XACML service\npolicy, which by default is the policy belonging to the service referred to by \u0022serviceResource\u0022 in the dialog.\n \nCan also be used to refer to other service policies.", + "example": "mycustomresource\n/* equivalent to the above */\nurn:altinn:subresource:mycustomresource\nurn:altinn:task:Task_1\n/* refer to another service */\nurn:altinn:resource:some-other-service-identifier", + "nullable": true, + "type": "string" + }, + "httpMethod": { + "description": "The HTTP method that the frontend should use when redirecting the user.", "oneOf": [ { - "$ref": "#/components/schemas/V1CommonContent_ContentValue" + "$ref": "#/components/schemas/Http_HttpVerb" } ] }, - "summary": { - "description": "A short summary of the dialog and its current state.", + "id": { + "description": "The unique identifier for the action in UUIDv7 format.", + "format": "guid", + "type": "string" + }, + "isAuthorized": { + "description": "Whether the user, if supplied in the query, is authorized to perform the action.", + "nullable": true, + "type": "boolean" + }, + "isDeleteDialogAction": { + "description": "Indicates whether the action results in the dialog being deleted. Used by frontends to implement custom UX\nfor delete actions.", + "type": "boolean" + }, + "priority": { + "description": "Indicates a priority for the action, making it possible for frontends to adapt GUI elements based on action\npriority.", "oneOf": [ { - "$ref": "#/components/schemas/V1CommonContent_ContentValue" + "$ref": "#/components/schemas/DialogsEntitiesActions_DialogGuiActionPriority" } ] }, - "senderName": { - "description": "Overridden sender name. If not supplied, assume \"org\" as the sender name.", + "prompt": { + "description": "If there should be a prompt asking the user for confirmation before the action is executed,\nthis field should contain the prompt text.", + "items": { + "$ref": "#/components/schemas/V1CommonLocalizations_Localization" + }, + "nullable": true, + "type": "array" + }, + "title": { + "description": "The title of the action, this should be short and in verb form.", + "items": { + "$ref": "#/components/schemas/V1CommonLocalizations_Localization" + }, + "nullable": true, + "type": "array" + }, + "url": { + "description": "The fully qualified URL of the action, to which the user will be redirected when the action is triggered.", + "format": "uri", + "type": "string" + } + }, + "type": "object" + }, + "V1ServiceOwnerDialogsQueriesGet_DialogSeenLog": { + "additionalProperties": false, + "properties": { + "id": { + "description": "The unique identifier for the seen log entry in UUIDv7 format.", + "format": "guid", + "type": "string" + }, + "isCurrentEndUser": { + "description": "Flag indicating whether the seen log entry was created by the current end user, if provided in the query.", + "type": "boolean" + }, + "isViaServiceOwner": { + "description": "Flag indicating whether the seen log entry was created via the service owner.\n \nThis is used when the service owner uses the service owner API to implement its own frontend.", "nullable": true, + "type": "boolean" + }, + "seenAt": { + "description": "The timestamp when the dialog revision was seen.", + "format": "date-time", + "type": "string" + }, + "seenBy": { + "description": "The actor that saw the dialog revision.", "oneOf": [ { - "$ref": "#/components/schemas/V1CommonContent_ContentValue" + "$ref": "#/components/schemas/V1ServiceOwnerCommonActors_Actor" } ] + } + }, + "type": "object" + }, + "V1ServiceOwnerDialogsQueriesGet_DialogTransmission": { + "additionalProperties": false, + "properties": { + "attachments": { + "description": "The transmission-level attachments.", + "items": { + "$ref": "#/components/schemas/V1ServiceOwnerDialogsQueriesGet_DialogTransmissionAttachment" + }, + "nullable": true, + "type": "array" }, - "additionalInfo": { - "description": "Additional information about the dialog, this may contain Markdown.", + "authorizationAttribute": { + "description": "Contains an authorization resource attributeId, that can used in custom authorization rules in the XACML service\npolicy, which by default is the policy belonging to the service referred to by \u0022serviceResource\u0022 in the dialog.\n \nCan also be used to refer to other service policies.", + "example": "mycustomresource\n/* equivalent to the above */\nurn:altinn:subresource:mycustomresource\nurn:altinn:task:Task_1\n/* refer to another service */\nurn:altinn:resource:some-other-service-identifier", "nullable": true, + "type": "string" + }, + "content": { + "description": "The transmission unstructured text content.", "oneOf": [ { - "$ref": "#/components/schemas/V1CommonContent_ContentValue" + "$ref": "#/components/schemas/V1ServiceOwnerDialogsQueriesGet_DialogTransmissionContent" } ] }, - "extendedStatus": { - "description": "Used as the human-readable label used to describe the \"ExtendedStatus\" field.", + "createdAt": { + "description": "The date and time when the transmission was created.", + "format": "date-time", + "type": "string" + }, + "extendedType": { + "description": "Arbitrary URI/URN describing a service-specific transmission type.\n \nRefer to the service-specific documentation provided by the service owner for details (if in use).", + "format": "uri", + "nullable": true, + "type": "string" + }, + "id": { + "description": "The unique identifier for the transmission in UUIDv7 format.", + "format": "guid", + "type": "string" + }, + "isAuthorized": { + "description": "Flag indicating if the authenticated user supplied in the query is authorized for this transmission.", + "nullable": true, + "type": "boolean" + }, + "relatedTransmissionId": { + "description": "Reference to any other transmission that this transmission is related to.", + "format": "guid", "nullable": true, + "type": "string" + }, + "sender": { + "description": "The actor that sent the transmission.", "oneOf": [ { - "$ref": "#/components/schemas/V1CommonContent_ContentValue" + "$ref": "#/components/schemas/V1ServiceOwnerCommonActors_Actor" } ] }, - "mainContentReference": { - "description": "Front-channel embedded content. Used to dynamically embed content in the frontend from an external URL. Must be HTTPS.\nAllowed media types: application/vnd.dialogporten.frontchannelembed+json;type=markdown", - "nullable": true, + "type": { + "description": "The type of transmission.", "oneOf": [ { - "$ref": "#/components/schemas/V1CommonContent_ContentValue" + "$ref": "#/components/schemas/DialogsEntitiesTransmissions_DialogTransmissionType" } ] } - } - }, - "V1ServiceOwnerDialogsQueriesGet_SearchTag": { - "type": "object", - "additionalProperties": false, - "properties": { - "value": { - "type": "string", - "description": "A search tag value." - } - } + }, + "type": "object" }, - "V1ServiceOwnerDialogsQueriesGet_DialogAttachment": { - "type": "object", + "V1ServiceOwnerDialogsQueriesGet_DialogTransmissionAttachment": { "additionalProperties": false, "properties": { - "id": { - "type": "string", - "description": "The unique identifier for the attachment in UUIDv7 format.", - "format": "guid" - }, "displayName": { - "type": "array", "description": "The display name of the attachment that should be used in GUIs.", - "nullable": true, "items": { "$ref": "#/components/schemas/V1CommonLocalizations_Localization" - } + }, + "nullable": true, + "type": "array" + }, + "id": { + "description": "The unique identifier for the attachment in UUIDv7 format.", + "format": "guid", + "type": "string" }, "urls": { - "type": "array", "description": "The URLs associated with the attachment, each referring to a different representation of the attachment.", - "nullable": true, "items": { - "$ref": "#/components/schemas/V1ServiceOwnerDialogsQueriesGet_DialogAttachmentUrl" - } + "$ref": "#/components/schemas/V1ServiceOwnerDialogsQueriesGet_DialogTransmissionAttachmentUrl" + }, + "nullable": true, + "type": "array" } - } + }, + "type": "object" }, - "V1ServiceOwnerDialogsQueriesGet_DialogAttachmentUrl": { - "type": "object", + "V1ServiceOwnerDialogsQueriesGet_DialogTransmissionAttachmentUrl": { "additionalProperties": false, "properties": { - "id": { - "type": "string", - "description": "The unique identifier for the attachment URL in UUIDv7 format.", - "format": "guid" - }, - "url": { - "type": "string", - "description": "The fully qualified URL of the attachment.", - "format": "uri", - "example": "https://someendpoint.com/someattachment.pdf" - }, - "mediaType": { - "type": "string", - "description": "The media type of the attachment.", - "nullable": true, - "example": "application/pdf\napplication/zip" - }, "consumerType": { - "description": "What type of consumer the URL is intended for.", + "description": "The type of consumer the URL is intended for.", "oneOf": [ { "$ref": "#/components/schemas/Attachments_AttachmentUrlConsumerType" } ] + }, + "mediaType": { + "description": "The media type of the attachment.", + "example": "application/pdf\napplication/zip", + "nullable": true, + "type": "string" + }, + "url": { + "description": "The fully qualified URL of the attachment. Will be set to \u0022urn:dialogporten:unauthorized\u0022 if the user is\nnot authorized to access the transmission.", + "example": "https://someendpoint.com/someattachment.pdf\nurn:dialogporten:unauthorized", + "format": "uri", + "type": "string" } - } + }, + "type": "object" }, - "V1ServiceOwnerDialogsQueriesGet_DialogTransmission": { - "type": "object", + "V1ServiceOwnerDialogsQueriesGet_DialogTransmissionContent": { "additionalProperties": false, "properties": { - "id": { - "type": "string", - "description": "The unique identifier for the transmission in UUIDv7 format.", - "format": "guid" - }, - "createdAt": { - "type": "string", - "description": "The date and time when the transmission was created.", - "format": "date-time" - }, - "authorizationAttribute": { - "type": "string", - "description": "Contains an authorization resource attributeId, that can used in custom authorization rules in the XACML service\npolicy, which by default is the policy belonging to the service referred to by \"serviceResource\" in the dialog.\n \nCan also be used to refer to other service policies.", + "contentReference": { + "description": "Front-channel embedded content. Used to dynamically embed content in the frontend from an external URL. Must be HTTPS.\nAllowed media types: application/vnd.dialogporten.frontchannelembed\u002Bjson;type=markdown", "nullable": true, - "example": "mycustomresource\n/* equivalent to the above */\nurn:altinn:subresource:mycustomresource\nurn:altinn:task:Task_1\n/* refer to another service */\nurn:altinn:resource:some-other-service-identifier" - }, - "isAuthorized": { - "type": "boolean", - "description": "Flag indicating if the authenticated user supplied in the query is authorized for this transmission.", - "nullable": true - }, - "extendedType": { - "type": "string", - "description": "Arbitrary URI/URN describing a service-specific transmission type.\n \nRefer to the service-specific documentation provided by the service owner for details (if in use).", - "format": "uri", - "nullable": true - }, - "relatedTransmissionId": { - "type": "string", - "description": "Reference to any other transmission that this transmission is related to.", - "format": "guid", - "nullable": true - }, - "type": { - "description": "The type of transmission.", "oneOf": [ { - "$ref": "#/components/schemas/DialogsEntitiesTransmissions_DialogTransmissionType" + "$ref": "#/components/schemas/V1CommonContent_ContentValue" } ] }, - "sender": { - "description": "The actor that sent the transmission.", + "summary": { + "description": "The transmission summary.", "oneOf": [ { - "$ref": "#/components/schemas/V1ServiceOwnerCommonActors_Actor" + "$ref": "#/components/schemas/V1CommonContent_ContentValue" } ] }, - "content": { - "description": "The transmission unstructured text content.", + "title": { + "description": "The transmission title.", + "oneOf": [ + { + "$ref": "#/components/schemas/V1CommonContent_ContentValue" + } + ] + } + }, + "type": "object" + }, + "V1ServiceOwnerDialogsQueriesGet_SearchTag": { + "additionalProperties": false, + "properties": { + "value": { + "description": "A search tag value.", + "type": "string" + } + }, + "type": "object" + }, + "V1ServiceOwnerDialogsQueriesSearch_Content": { + "additionalProperties": false, + "properties": { + "extendedStatus": { + "description": "Used as the human-readable label used to describe the \u0022ExtendedStatus\u0022 field.", + "nullable": true, "oneOf": [ { - "$ref": "#/components/schemas/V1ServiceOwnerDialogsQueriesGet_DialogTransmissionContent" + "$ref": "#/components/schemas/V1CommonContent_ContentValue" } ] }, - "attachments": { - "type": "array", - "description": "The transmission-level attachments.", + "senderName": { + "description": "Overridden sender name. If not supplied, assume \u0022org\u0022 as the sender name.", "nullable": true, - "items": { - "$ref": "#/components/schemas/V1ServiceOwnerDialogsQueriesGet_DialogTransmissionAttachment" - } - } - } - }, - "V1ServiceOwnerDialogsQueriesGet_DialogTransmissionContent": { - "type": "object", - "additionalProperties": false, - "properties": { - "title": { - "description": "The transmission title.", "oneOf": [ { "$ref": "#/components/schemas/V1CommonContent_ContentValue" @@ -4383,302 +4034,233 @@ ] }, "summary": { - "description": "The transmission summary.", + "description": "A short summary of the dialog and its current state.", "oneOf": [ { "$ref": "#/components/schemas/V1CommonContent_ContentValue" } ] }, - "contentReference": { - "description": "Front-channel embedded content. Used to dynamically embed content in the frontend from an external URL. Must be HTTPS.\nAllowed media types: application/vnd.dialogporten.frontchannelembed+json;type=markdown", - "nullable": true, + "title": { + "description": "The title of the dialog.", "oneOf": [ { "$ref": "#/components/schemas/V1CommonContent_ContentValue" } ] } - } - }, - "V1ServiceOwnerDialogsQueriesGet_DialogTransmissionAttachment": { - "type": "object", - "additionalProperties": false, - "properties": { - "id": { - "type": "string", - "description": "The unique identifier for the attachment in UUIDv7 format.", - "format": "guid" - }, - "displayName": { - "type": "array", - "description": "The display name of the attachment that should be used in GUIs.", - "nullable": true, - "items": { - "$ref": "#/components/schemas/V1CommonLocalizations_Localization" - } - }, - "urls": { - "type": "array", - "description": "The URLs associated with the attachment, each referring to a different representation of the attachment.", - "nullable": true, - "items": { - "$ref": "#/components/schemas/V1ServiceOwnerDialogsQueriesGet_DialogTransmissionAttachmentUrl" - } - } - } + }, + "type": "object" }, - "V1ServiceOwnerDialogsQueriesGet_DialogTransmissionAttachmentUrl": { - "type": "object", + "V1ServiceOwnerDialogsQueriesSearch_Dialog": { "additionalProperties": false, "properties": { - "url": { - "type": "string", - "description": "The fully qualified URL of the attachment. Will be set to \"urn:dialogporten:unauthorized\" if the user is\nnot authorized to access the transmission.", - "format": "uri", - "example": "https://someendpoint.com/someattachment.pdf\nurn:dialogporten:unauthorized" - }, - "mediaType": { - "type": "string", - "description": "The media type of the attachment.", - "nullable": true, - "example": "application/pdf\napplication/zip" - }, - "consumerType": { - "description": "The type of consumer the URL is intended for.", + "content": { + "description": "The content of the dialog in search results.", "oneOf": [ { - "$ref": "#/components/schemas/Attachments_AttachmentUrlConsumerType" + "$ref": "#/components/schemas/V1ServiceOwnerDialogsQueriesSearch_Content" } ] - } - } - }, - "V1ServiceOwnerDialogsQueriesGet_DialogGuiAction": { - "type": "object", - "additionalProperties": false, - "properties": { - "id": { - "type": "string", - "description": "The unique identifier for the action in UUIDv7 format.", - "format": "guid" }, - "action": { - "type": "string", - "description": "The action identifier for the action, corresponding to the \"action\" attributeId used in the XACML service policy." + "createdAt": { + "description": "The date and time when the dialog was created.", + "example": "2022-12-31T23:59:59Z", + "format": "date-time", + "type": "string" }, - "url": { - "type": "string", - "description": "The fully qualified URL of the action, to which the user will be redirected when the action is triggered.", - "format": "uri" + "dueAt": { + "description": "The due date for the dialog. This is the last date when the dialog is expected to be completed.", + "example": "2022-12-31T23:59:59Z", + "format": "date-time", + "nullable": true, + "type": "string" }, - "authorizationAttribute": { - "type": "string", - "description": "Contains an authorization resource attributeId, that can used in custom authorization rules in the XACML service\npolicy, which by default is the policy belonging to the service referred to by \"serviceResource\" in the dialog.\n \nCan also be used to refer to other service policies.", + "extendedStatus": { + "description": "Arbitrary string with a service-specific indicator of status, typically used to indicate a fine-grained state of\nthe dialog to further specify the \u0022status\u0022 enum.\n \nRefer to the service-specific documentation provided by the service owner for details on the possible values (if\nin use).", "nullable": true, - "example": "mycustomresource\n/* equivalent to the above */\nurn:altinn:subresource:mycustomresource\nurn:altinn:task:Task_1\n/* refer to another service */\nurn:altinn:resource:some-other-service-identifier" + "type": "string" }, - "isAuthorized": { - "type": "boolean", - "description": "Whether the user, if supplied in the query, is authorized to perform the action.", - "nullable": true + "externalReference": { + "description": "Arbitrary string with a service-specific reference to an external system or service.\n \nRefer to the service-specific documentation provided by the service owner for details (if in use).", + "nullable": true, + "type": "string" }, - "isDeleteDialogAction": { - "type": "boolean", - "description": "Indicates whether the action results in the dialog being deleted. Used by frontends to implement custom UX\nfor delete actions." + "guiAttachmentCount": { + "description": "The number of attachments in the dialog made available for browser-based frontends.", + "format": "int32", + "nullable": true, + "type": "integer" }, - "priority": { - "description": "Indicates a priority for the action, making it possible for frontends to adapt GUI elements based on action\npriority.", - "oneOf": [ - { - "$ref": "#/components/schemas/DialogsEntitiesActions_DialogGuiActionPriority" - } - ] + "id": { + "description": "The unique identifier for the dialog in UUIDv7 format.", + "example": "01913cd5-784f-7d3b-abef-4c77b1f0972d", + "format": "guid", + "type": "string" }, - "httpMethod": { - "description": "The HTTP method that the frontend should use when redirecting the user.", + "latestActivity": { + "description": "The latest entry in the dialog\u0027s activity log.", + "nullable": true, "oneOf": [ { - "$ref": "#/components/schemas/Http_HttpVerb" + "$ref": "#/components/schemas/V1ServiceOwnerDialogsQueriesSearch_DialogActivity" } ] }, - "title": { - "type": "array", - "description": "The title of the action, this should be short and in verb form.", - "nullable": true, - "items": { - "$ref": "#/components/schemas/V1CommonLocalizations_Localization" - } + "org": { + "description": "The service owner code representing the organization (service owner) related to this dialog.", + "example": "ske", + "type": "string" }, - "prompt": { - "type": "array", - "description": "If there should be a prompt asking the user for confirmation before the action is executed,\nthis field should contain the prompt text.", + "party": { + "description": "The party code representing the organization or person that the dialog belongs to in URN format.", + "example": "urn:altinn:person:identifier-no:01125512345\nurn:altinn:organization:identifier-no:912345678", + "type": "string" + }, + "precedingProcess": { + "description": "Optional preceding process identifier to indicate the business process that preceded the process indicated in the \u0022Process\u0022 field. Cannot be set without also \u0022Process\u0022 being set.", "nullable": true, - "items": { - "$ref": "#/components/schemas/V1CommonLocalizations_Localization" - } - } - } - }, - "V1ServiceOwnerDialogsQueriesGet_DialogApiAction": { - "type": "object", - "additionalProperties": false, - "properties": { - "id": { - "type": "string", - "description": "The unique identifier for the action in UUIDv7 format.", - "format": "guid" + "type": "string" }, - "action": { - "type": "string", - "description": "String identifier for the action, corresponding to the \"action\" attributeId used in the XACML service policy,\nwhich by default is the policy belonging to the service referred to by \"serviceResource\" in the dialog.", - "example": "write" + "process": { + "description": "Optional process identifier used to indicate a business process this dialog belongs to.", + "nullable": true, + "type": "string" }, - "authorizationAttribute": { - "type": "string", - "description": "Contains an authorization resource attributeId, that can used in custom authorization rules in the XACML service\npolicy, which by default is the policy belonging to the service referred to by \"serviceResource\" in the dialog.\n \nCan also be used to refer to other service policies.", + "progress": { + "description": "Advisory indicator of progress, represented as 1-100 percentage value. 100% representing a dialog that has come\nto a natural completion (successful or not).", + "format": "int32", "nullable": true, - "example": "mycustomresource\n/* equivalent to the above */\nurn:altinn:subresource:mycustomresource\nurn:altinn:task:Task_1\n/* refer to another service */\nurn:altinn:resource:some-other-service-identifier" + "type": "integer" }, - "isAuthorized": { - "type": "boolean", - "description": "True if the authenticated user (set in the query) is authorized for this action.", - "nullable": true + "revision": { + "description": "The unique identifier for the revision in UUIDv4 format.", + "example": "a312cb9c-7632-43c2-aa38-69b06aed56ca", + "format": "guid", + "type": "string" }, - "endpoints": { - "type": "array", - "description": "The endpoints associated with the action.", - "nullable": true, + "seenSinceLastUpdate": { + "description": "The list of seen log entries for the dialog newer than the dialog ChangedAt date.", "items": { - "$ref": "#/components/schemas/V1ServiceOwnerDialogsQueriesGet_DialogApiActionEndpoint" - } - } - } - }, - "V1ServiceOwnerDialogsQueriesGet_DialogApiActionEndpoint": { - "type": "object", - "additionalProperties": false, - "properties": { - "id": { - "type": "string", - "description": "The unique identifier for the endpoint in UUIDv7 format.", - "format": "guid" + "$ref": "#/components/schemas/V1ServiceOwnerDialogsQueriesSearch_DialogSeenLog" + }, + "nullable": true, + "type": "array" }, - "version": { - "type": "string", - "description": "Arbitrary string indicating the version of the endpoint.\n \nConsult the service-specific documentation provided by the service owner for details (if in use).", - "nullable": true + "serviceResource": { + "description": "The service identifier for the service that the dialog is related to in URN-format.\nThis corresponds to a service resource in the Altinn Resource Registry.", + "example": "urn:altinn:resource:some-service-identifier", + "type": "string" }, - "url": { - "type": "string", - "description": "The fully qualified URL of the API endpoint.", - "format": "uri" + "serviceResourceType": { + "description": "The ServiceResource type, as defined in Altinn Resource Registry (see ResourceType).", + "type": "string" }, - "httpMethod": { - "description": "The HTTP method that the endpoint expects for this action.", + "status": { + "description": "The aggregated status of the dialog.", "oneOf": [ { - "$ref": "#/components/schemas/Http_HttpVerb" + "$ref": "#/components/schemas/DialogsEntities_DialogStatus" } ] }, - "documentationUrl": { - "type": "string", - "description": "Link to service provider documentation for the endpoint. Used for service owners to provide documentation for\nintegrators. Should be a URL to a human-readable page.", - "format": "uri", - "nullable": true - }, - "requestSchema": { - "type": "string", - "description": "Link to the request schema for the endpoint. Used by service owners to provide documentation for integrators.\nDialogporten will not validate information on this endpoint.", - "format": "uri", - "nullable": true - }, - "responseSchema": { - "type": "string", - "description": "Link to the response schema for the endpoint. Used for service owners to provide documentation for integrators.\nDialogporten will not validate information on this endpoint.", - "format": "uri", - "nullable": true + "systemLabel": { + "description": "Current display state.", + "oneOf": [ + { + "$ref": "#/components/schemas/DialogEndUserContextsEntities_SystemLabel" + } + ] }, - "deprecated": { - "type": "boolean", - "description": "Boolean indicating if the endpoint is deprecated. Integrators should migrate to endpoints with a higher version." + "updatedAt": { + "description": "The date and time when the dialog was last updated.", + "example": "2022-12-31T23:59:59Z", + "format": "date-time", + "type": "string" }, - "sunsetAt": { - "type": "string", - "description": "Date and time when the service owner has indicated that endpoint will no longer function. Only set if the endpoint\nis deprecated. Dialogporten will not enforce this date.", + "visibleFrom": { + "description": "The timestamp when the dialog will be made visible for authorized end users.", "format": "date-time", - "nullable": true + "nullable": true, + "type": "string" } - } + }, + "type": "object" }, - "V1ServiceOwnerDialogsQueriesGet_DialogActivity": { - "type": "object", + "V1ServiceOwnerDialogsQueriesSearch_DialogActivity": { "additionalProperties": false, "properties": { - "id": { - "type": "string", - "description": "The unique identifier for the activity in UUIDv7 format.", - "format": "guid" - }, "createdAt": { - "type": "string", "description": "The date and time when the activity was created.", "format": "date-time", - "nullable": true + "nullable": true, + "type": "string" + }, + "description": { + "description": "Unstructured text describing the activity. Only set if the activity type is \u0022Information\u0022.", + "items": { + "$ref": "#/components/schemas/V1CommonLocalizations_Localization" + }, + "nullable": true, + "type": "array" }, "extendedType": { - "type": "string", - "description": "An arbitrary URI/URN with a service-specific activity type.\n \nConsult the service-specific documentation provided by the service owner for details (if in use).", + "description": "An arbitrary string with a service-specific activity type.\n \nConsult the service-specific documentation provided by the service owner for details (if in use).", "format": "uri", - "nullable": true + "nullable": true, + "type": "string" }, - "type": { - "description": "The type of activity.", + "id": { + "description": "The unique identifier for the activity in UUIDv7 format.", + "format": "guid", + "type": "string" + }, + "performedBy": { + "description": "The actor that performed the activity.", "oneOf": [ { - "$ref": "#/components/schemas/DialogsEntitiesActivities_DialogActivityType" + "$ref": "#/components/schemas/V1ServiceOwnerCommonActors_Actor" } ] }, "transmissionId": { - "type": "string", "description": "If the activity is related to a particular transmission, this field will contain the transmission identifier.", "format": "guid", - "nullable": true + "nullable": true, + "type": "string" }, - "performedBy": { - "description": "The actor that performed the activity.", + "type": { + "description": "The type of activity.", "oneOf": [ { - "$ref": "#/components/schemas/V1ServiceOwnerCommonActors_Actor" + "$ref": "#/components/schemas/DialogsEntitiesActivities_DialogActivityType" } ] - }, - "description": { - "type": "array", - "description": "Unstructured text describing the activity. Only set if the activity type is \"Information\".", - "nullable": true, - "items": { - "$ref": "#/components/schemas/V1CommonLocalizations_Localization" - } } - } + }, + "type": "object" }, - "V1ServiceOwnerDialogsQueriesGet_DialogSeenLog": { - "type": "object", + "V1ServiceOwnerDialogsQueriesSearch_DialogSeenLog": { "additionalProperties": false, "properties": { "id": { - "type": "string", "description": "The unique identifier for the seen log entry in UUIDv7 format.", - "format": "guid" + "format": "guid", + "type": "string" + }, + "isCurrentEndUser": { + "description": "Flag indicating whether the seen log entry was created by the end user supplied in the query.", + "type": "boolean" + }, + "isViaServiceOwner": { + "description": "Flag indicating whether the seen log entry was created via the service owner.\n \nThis is used when the service owner uses the service owner API to implement its own frontend.", + "nullable": true, + "type": "boolean" }, "seenAt": { - "type": "string", "description": "The timestamp when the dialog revision was seen.", - "format": "date-time" + "format": "date-time", + "type": "string" }, "seenBy": { "description": "The actor that saw the dialog revision.", @@ -4687,188 +4269,151 @@ "$ref": "#/components/schemas/V1ServiceOwnerCommonActors_Actor" } ] - }, - "isViaServiceOwner": { - "type": "boolean", - "description": "Flag indicating whether the seen log entry was created via the service owner.\n \nThis is used when the service owner uses the service owner API to implement its own frontend.", - "nullable": true - }, - "isCurrentEndUser": { - "type": "boolean", - "description": "Flag indicating whether the seen log entry was created by the current end user, if provided in the query." } - } + }, + "type": "object" }, - "V1ServiceOwnerDialogsCreate_DialogRequest": { - "type": "object", + "V1ServiceOwnerDialogsUpdate_DialogRequest": { "additionalProperties": false, "properties": { "dto": { - "$ref": "#/components/schemas/V1ServiceOwnerDialogsCommandsCreate_Dialog" + "$ref": "#/components/schemas/V1ServiceOwnerDialogsCommandsUpdate_Dialog" } - } + }, + "type": "object" }, - "V1ServiceOwnerDialogsCommandsCreate_Dialog": { - "type": "object", + "V1ServiceOwnerDialogTransmissionsCreate_TransmissionRequest": { "additionalProperties": false, "properties": { - "id": { - "type": "string", - "description": "A self-defined UUIDv7 may be provided to support idempotent creation of dialogs. If not provided, a new UUIDv7 will be generated.", - "format": "guid", + "attachments": { + "description": "The transmission-level attachments.", + "items": { + "$ref": "#/components/schemas/V1ServiceOwnerDialogsCommandsUpdate_TransmissionAttachment" + }, "nullable": true, - "example": "01913cd5-784f-7d3b-abef-4c77b1f0972d" - }, - "serviceResource": { - "type": "string", - "description": "The service identifier for the service that the dialog is related to in URN-format.\nThis corresponds to a resource in the Altinn Resource Registry, which the authenticated organization\nmust own, i.e., be listed as the \"competent authority\" in the Resource Registry entry.", - "example": "urn:altinn:resource:some-service-identifier" + "type": "array" }, - "party": { - "type": "string", - "description": "The party code representing the organization or person that the dialog belongs to in URN format.", - "example": "urn:altinn:person:identifier-no:01125512345\nurn:altinn:organization:identifier-no:912345678" - }, - "progress": { - "type": "integer", - "description": "Advisory indicator of progress, represented as 1-100 percentage value. 100% representing a dialog that has come\nto a natural completion (successful or not).", - "format": "int32", - "nullable": true - }, - "extendedStatus": { - "type": "string", - "description": "Arbitrary string with a service-specific indicator of status, typically used to indicate a fine-grained state of\nthe dialog to further specify the \"status\" enum.", - "nullable": true + "authorizationAttribute": { + "description": "Contains an authorization resource attributeId, that can used in custom authorization rules in the XACML service\npolicy, which by default is the policy belonging to the service referred to by \u0022serviceResource\u0022 in the dialog.\n \nCan also be used to refer to other service policies.", + "example": "mycustomresource\n/* equivalent to the above */\nurn:altinn:subresource:mycustomresource\nurn:altinn:task:Task_1\n/* refer to another service */\nurn:altinn:resource:some-other-service-identifier", + "nullable": true, + "type": "string" }, - "externalReference": { - "type": "string", - "description": "Arbitrary string with a service-specific reference to an external system or service.", - "nullable": true + "content": { + "description": "The transmission unstructured text content.", + "oneOf": [ + { + "$ref": "#/components/schemas/V1ServiceOwnerDialogsCommandsUpdate_TransmissionContent" + } + ] }, - "visibleFrom": { - "type": "string", - "description": "The timestamp when the dialog should be made visible for authorized end users. If not provided, the dialog will be\nimmediately available.", + "createdAt": { + "description": "If supplied, overrides the creating date and time for the transmission.\nIf not supplied, the current date /time will be used.", "format": "date-time", - "nullable": true, - "example": "2022-12-31T23:59:59Z" + "type": "string" }, - "dueAt": { - "type": "string", - "description": "The due date for the dialog. Dialogs past due date might be marked as such in frontends but will still be available.", - "format": "date-time", + "extendedType": { + "description": "Arbitrary URI/URN describing a service-specific transmission type.\n \nRefer to the service-specific documentation provided by the service owner for details (if in use).", + "format": "uri", "nullable": true, - "example": "2022-12-31T23:59:59Z" - }, - "process": { - "type": "string", - "description": "Optional process identifier used to indicate a business process this dialog belongs to.", - "nullable": true - }, - "precedingProcess": { - "type": "string", - "description": "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.", - "nullable": true + "type": "string" }, - "expiresAt": { - "type": "string", - "description": "The expiration date for the dialog. This is the last date when the dialog is available for the end user.\n \nAfter this date is passed, the dialog will be considered expired and no longer available for the end user in any\nAPI. If not supplied, the dialog will be considered to never expire. This field can be changed after creation.", - "format": "date-time", + "id": { + "description": "The UUDIv7 of the action may be provided to support idempotent additions to the list of transmissions.\nIf not supplied, a new UUIDv7 will be generated.", + "example": "01913cd5-784f-7d3b-abef-4c77b1f0972d", + "format": "guid", "nullable": true, - "example": "2022-12-31T23:59:59Z" - }, - "createdAt": { - "type": "string", - "description": "If set, will override the date and time when the dialog is set as created.\nIf not supplied, the current date /time will be used.", - "format": "date-time", - "example": "2022-12-31T23:59:59Z" + "type": "string" }, - "updatedAt": { - "type": "string", - "description": "If set, will override the date and time when the dialog is set as last updated.\nIf not supplied, the current date /time will be used.", - "format": "date-time", - "example": "2022-12-31T23:59:59Z" + "relatedTransmissionId": { + "description": "Reference to any other transmission that this transmission is related to.", + "format": "guid", + "nullable": true, + "type": "string" }, - "status": { - "description": "The aggregated status of the dialog.", + "sender": { + "description": "The actor that sent the transmission.", "oneOf": [ { - "$ref": "#/components/schemas/DialogsEntities_DialogStatus" + "$ref": "#/components/schemas/V1ServiceOwnerCommonActors_Actor" } ] }, - "systemLabel": { - "description": "Set the system label of the dialog Migration purposes.", - "nullable": true, + "type": { + "description": "The type of transmission.", "oneOf": [ { - "$ref": "#/components/schemas/DialogEndUserContextsEntities_SystemLabel" + "$ref": "#/components/schemas/DialogsEntitiesTransmissions_DialogTransmissionType" } ] + } + }, + "type": "object" + }, + "V1ServiceOwnerDialogTransmissionsQueriesGet_Attachment": { + "additionalProperties": false, + "properties": { + "displayName": { + "description": "The display name of the attachment that should be used in GUIs.", + "items": { + "$ref": "#/components/schemas/V1CommonLocalizations_Localization" + }, + "nullable": true, + "type": "array" }, - "content": { - "description": "The dialog unstructured text content.", + "id": { + "description": "The unique identifier for the attachment in UUIDv7 format.", + "format": "guid", + "type": "string" + }, + "urls": { + "description": "The URLs associated with the attachment, each referring to a different representation of the attachment.", + "items": { + "$ref": "#/components/schemas/V1ServiceOwnerDialogTransmissionsQueriesGet_AttachmentUrl" + }, + "nullable": true, + "type": "array" + } + }, + "type": "object" + }, + "V1ServiceOwnerDialogTransmissionsQueriesGet_AttachmentUrl": { + "additionalProperties": false, + "properties": { + "consumerType": { + "description": "The type of consumer the URL is intended for.", "oneOf": [ { - "$ref": "#/components/schemas/V1ServiceOwnerDialogsCommandsCreate_Content" + "$ref": "#/components/schemas/Attachments_AttachmentUrlConsumerType" } ] }, - "searchTags": { - "type": "array", - "description": "A list of words (tags) that will be used in dialog search queries. Not visible in end-user DTO.", - "nullable": true, - "items": { - "$ref": "#/components/schemas/V1ServiceOwnerDialogsCommandsCreate_SearchTag" - } - }, - "attachments": { - "type": "array", - "description": "The attachments associated with the dialog (on an aggregate level).", - "nullable": true, - "items": { - "$ref": "#/components/schemas/V1ServiceOwnerDialogsCommandsCreate_Attachment" - } - }, - "transmissions": { - "type": "array", - "description": "The immutable list of transmissions associated with the dialog.", - "nullable": true, - "items": { - "$ref": "#/components/schemas/V1ServiceOwnerDialogsCommandsCreate_Transmission" - } - }, - "guiActions": { - "type": "array", - "description": "The GUI actions associated with the dialog. Should be used in browser-based interactive frontends.", - "nullable": true, - "items": { - "$ref": "#/components/schemas/V1ServiceOwnerDialogsCommandsCreate_GuiAction" - } + "id": { + "description": "The unique identifier for the attachment URL in UUIDv7 format.", + "format": "guid", + "type": "string" }, - "apiActions": { - "type": "array", - "description": "The API actions associated with the dialog. Should be used in specialized, non-browser-based integrations.", + "mediaType": { + "description": "The media type of the attachment.", + "example": "application/pdf\napplication/zip", "nullable": true, - "items": { - "$ref": "#/components/schemas/V1ServiceOwnerDialogsCommandsCreate_ApiAction" - } + "type": "string" }, - "activities": { - "type": "array", - "description": "An immutable list of activities associated with the dialog.", - "nullable": true, - "items": { - "$ref": "#/components/schemas/V1ServiceOwnerDialogsCommandsCreate_Activity" - } + "url": { + "description": "The fully qualified URL of the attachment. Will be set to \u0022urn:dialogporten:unauthorized\u0022 if the user is\nnot authorized to access the transmission.", + "example": "https://someendpoint.com/someattachment.pdf\nurn:dialogporten:unauthorized", + "format": "uri", + "type": "string" } - } + }, + "type": "object" }, - "V1ServiceOwnerDialogsCommandsCreate_Content": { - "type": "object", + "V1ServiceOwnerDialogTransmissionsQueriesGet_Content": { "additionalProperties": false, "properties": { - "title": { - "description": "The title of the dialog.\nSupported media types: text/plain", + "contentReference": { + "description": "Front-channel embedded content. Used to dynamically embed content in the frontend from an external URL.\nAllowed media types: application/vnd.dialogporten.frontchannelembed\u002Bjson;type=markdown", + "nullable": true, "oneOf": [ { "$ref": "#/components/schemas/V1CommonContent_ContentValue" @@ -4876,104 +4421,125 @@ ] }, "summary": { - "description": "A short summary of the dialog and its current state.\nSupported media types: text/plain", + "description": "The summary of the content.", "oneOf": [ { "$ref": "#/components/schemas/V1CommonContent_ContentValue" } ] }, - "senderName": { - "description": "Overridden sender name. If not supplied, assume \"org\" as the sender name. Must be text/plain if supplied.\nSupported media types: text/plain", + "title": { + "description": "The title of the content.", + "oneOf": [ + { + "$ref": "#/components/schemas/V1CommonContent_ContentValue" + } + ] + } + }, + "type": "object" + }, + "V1ServiceOwnerDialogTransmissionsQueriesGet_Transmission": { + "additionalProperties": false, + "properties": { + "attachments": { + "description": "The attachments associated with the transmission.", + "items": { + "$ref": "#/components/schemas/V1ServiceOwnerDialogTransmissionsQueriesGet_Attachment" + }, + "nullable": true, + "type": "array" + }, + "authorizationAttribute": { + "description": "The authorization attribute associated with the transmission.", + "nullable": true, + "type": "string" + }, + "content": { + "description": "The content of the transmission.", + "oneOf": [ + { + "$ref": "#/components/schemas/V1ServiceOwnerDialogTransmissionsQueriesGet_Content" + } + ] + }, + "createdAt": { + "description": "The date and time when the transmission was created.", + "format": "date-time", + "type": "string" + }, + "deletedAt": { + "description": "The date and time when the transmission was deleted, if applicable.", + "format": "date-time", "nullable": true, - "oneOf": [ - { - "$ref": "#/components/schemas/V1CommonContent_ContentValue" - } - ] + "type": "string" }, - "additionalInfo": { - "description": "Additional information about the dialog.\nSupported media types: text/plain, text/markdown", + "extendedType": { + "description": "The extended type URI for the transmission.", + "format": "uri", "nullable": true, - "oneOf": [ - { - "$ref": "#/components/schemas/V1CommonContent_ContentValue" - } - ] + "type": "string" }, - "extendedStatus": { - "description": "Used as the human-readable label used to describe the \"ExtendedStatus\" field.\nSupported media types: text/plain", + "id": { + "description": "The unique identifier for the transmission in UUIDv7 format.", + "format": "guid", + "type": "string" + }, + "relatedTransmissionId": { + "description": "The unique identifier for the related transmission, if any.", + "format": "guid", "nullable": true, + "type": "string" + }, + "sender": { + "description": "The sender actor information for the transmission.", "oneOf": [ { - "$ref": "#/components/schemas/V1CommonContent_ContentValue" + "$ref": "#/components/schemas/V1ServiceOwnerCommonActors_Actor" } ] }, - "mainContentReference": { - "description": "Front-channel embedded content. Used to dynamically embed content in the frontend from an external URL. Must be HTTPS.\nSupported media types: application/vnd.dialogporten.frontchannelembed+json;type=markdown", - "nullable": true, + "type": { + "description": "The type of the transmission.", "oneOf": [ { - "$ref": "#/components/schemas/V1CommonContent_ContentValue" + "$ref": "#/components/schemas/DialogsEntitiesTransmissions_DialogTransmissionType" } ] } - } - }, - "V1ServiceOwnerDialogsCommandsCreate_SearchTag": { - "type": "object", - "additionalProperties": false, - "properties": { - "value": { - "type": "string", - "description": "A search tag value." - } - } + }, + "type": "object" }, - "V1ServiceOwnerDialogsCommandsCreate_Attachment": { - "type": "object", + "V1ServiceOwnerDialogTransmissionsQueriesSearch_Attachment": { "additionalProperties": false, "properties": { - "id": { - "type": "string", - "description": "A self-defined UUIDv7 may be provided to support idempotent creation of attachments. If not provided, a new UUIDv7 will be generated.", - "format": "guid", - "nullable": true - }, "displayName": { - "type": "array", "description": "The display name of the attachment that should be used in GUIs.", - "nullable": true, "items": { "$ref": "#/components/schemas/V1CommonLocalizations_Localization" - } + }, + "nullable": true, + "type": "array" + }, + "id": { + "description": "The unique identifier for the attachment in UUIDv7 format.", + "format": "guid", + "type": "string" }, "urls": { - "type": "array", "description": "The URLs associated with the attachment, each referring to a different representation of the attachment.", - "nullable": true, "items": { - "$ref": "#/components/schemas/V1ServiceOwnerDialogsCommandsCreate_AttachmentUrl" - } + "$ref": "#/components/schemas/V1ServiceOwnerDialogTransmissionsQueriesSearch_AttachmentUrl" + }, + "nullable": true, + "type": "array" } - } + }, + "type": "object" }, - "V1ServiceOwnerDialogsCommandsCreate_AttachmentUrl": { - "type": "object", + "V1ServiceOwnerDialogTransmissionsQueriesSearch_AttachmentUrl": { "additionalProperties": false, "properties": { - "url": { - "type": "string", - "description": "The fully qualified URL of the attachment.", - "format": "uri" - }, - "mediaType": { - "type": "string", - "description": "The media type of the attachment.", - "nullable": true, - "example": "application/pdf\napplication/zip" - }, "consumerType": { "description": "The type of consumer the URL is intended for.", "oneOf": [ @@ -4981,83 +4547,33 @@ "$ref": "#/components/schemas/Attachments_AttachmentUrlConsumerType" } ] - } - } - }, - "V1ServiceOwnerDialogsCommandsCreate_Transmission": { - "type": "object", - "additionalProperties": false, - "properties": { + }, "id": { - "type": "string", - "description": "A self-defined UUIDv7 may be provided to support idempotent creation of transmissions. If not provided, a new UUIDv7 will be generated.", + "description": "The unique identifier for the attachment URL in UUIDv7 format.", "format": "guid", - "nullable": true, - "example": "01913cd5-784f-7d3b-abef-4c77b1f0972d" - }, - "createdAt": { - "type": "string", - "description": "If supplied, overrides the creating date and time for the transmission.\nIf not supplied, the current date /time will be used.", - "format": "date-time" + "type": "string" }, - "authorizationAttribute": { - "type": "string", - "description": "Contains an authorization resource attributeId, that can used in custom authorization rules in the XACML service\npolicy, which by default is the policy belonging to the service referred to by \"serviceResource\" in the dialog.\n \nCan also be used to refer to other service policies.", + "mediaType": { + "description": "The media type of the attachment.", + "example": "application/pdf\napplication/zip", "nullable": true, - "example": "mycustomresource\n/* equivalent to the above */\nurn:altinn:subresource:mycustomresource\nurn:altinn:task:Task_1\n/* refer to another service */\nurn:altinn:resource:some-other-service-identifier" + "type": "string" }, - "extendedType": { - "type": "string", - "description": "Arbitrary URI/URN describing a service-specific transmission type.\n \nRefer to the service-specific documentation provided by the service owner for details (if in use).", + "url": { + "description": "The fully qualified URL of the attachment. Will be set to \u0022urn:dialogporten:unauthorized\u0022 if the user is\nnot authorized to access the transmission.", + "example": "https://someendpoint.com/someattachment.pdf\nurn:dialogporten:unauthorized", "format": "uri", - "nullable": true - }, - "relatedTransmissionId": { - "type": "string", - "description": "Reference to any other transmission that this transmission is related to.", - "format": "guid", - "nullable": true - }, - "type": { - "description": "The type of transmission.", - "oneOf": [ - { - "$ref": "#/components/schemas/DialogsEntitiesTransmissions_DialogTransmissionType" - } - ] - }, - "sender": { - "description": "The actor that sent the transmission.", - "oneOf": [ - { - "$ref": "#/components/schemas/V1ServiceOwnerCommonActors_Actor" - } - ] - }, - "content": { - "description": "The transmission unstructured text content.", - "oneOf": [ - { - "$ref": "#/components/schemas/V1ServiceOwnerDialogsCommandsCreate_TransmissionContent" - } - ] - }, - "attachments": { - "type": "array", - "description": "The transmission-level attachments.", - "nullable": true, - "items": { - "$ref": "#/components/schemas/V1ServiceOwnerDialogsCommandsCreate_TransmissionAttachment" - } + "type": "string" } - } + }, + "type": "object" }, - "V1ServiceOwnerDialogsCommandsCreate_TransmissionContent": { - "type": "object", + "V1ServiceOwnerDialogTransmissionsQueriesSearch_Content": { "additionalProperties": false, "properties": { - "title": { - "description": "The transmission title. Must be text/plain.", + "contentReference": { + "description": "Front-channel embedded content. Used to dynamically embed content in the frontend from an external URL.", + "nullable": true, "oneOf": [ { "$ref": "#/components/schemas/V1CommonContent_ContentValue" @@ -5065,2002 +4581,2486 @@ ] }, "summary": { - "description": "The transmission summary.", + "description": "The summary of the content.", "oneOf": [ { "$ref": "#/components/schemas/V1CommonContent_ContentValue" } ] }, - "contentReference": { - "description": "Front-channel embedded content. Used to dynamically embed content in the frontend from an external URL. Must be HTTPS.\nAllowed media types: application/vnd.dialogporten.frontchannelembed+json;type=markdown", - "nullable": true, + "title": { + "description": "The title of the content.", "oneOf": [ { "$ref": "#/components/schemas/V1CommonContent_ContentValue" } ] } - } + }, + "type": "object" }, - "V1ServiceOwnerDialogsCommandsCreate_TransmissionAttachment": { - "type": "object", + "V1ServiceOwnerDialogTransmissionsQueriesSearch_Transmission": { "additionalProperties": false, "properties": { - "id": { - "type": "string", - "description": "A self-defined UUIDv7 may be provided to support idempotent creation of transmission attachments. If not provided, a new UUIDv7 will be generated.", - "format": "guid", - "nullable": true, - "example": "01913cd5-784f-7d3b-abef-4c77b1f0972d" - }, - "displayName": { - "type": "array", - "description": "The display name of the attachment that should be used in GUIs.", - "nullable": true, + "attachments": { + "description": "The attachments associated with the transmission.", "items": { - "$ref": "#/components/schemas/V1CommonLocalizations_Localization" - } - }, - "urls": { - "type": "array", - "description": "The URLs associated with the attachment, each referring to a different representation of the attachment.", + "$ref": "#/components/schemas/V1ServiceOwnerDialogTransmissionsQueriesSearch_Attachment" + }, "nullable": true, - "items": { - "$ref": "#/components/schemas/V1ServiceOwnerDialogsCommandsCreate_TransmissionAttachmentUrl" - } - } - } - }, - "V1ServiceOwnerDialogsCommandsCreate_TransmissionAttachmentUrl": { - "type": "object", - "additionalProperties": false, - "properties": { - "url": { - "type": "string", - "description": "The fully qualified URL of the attachment.", - "format": "uri" + "type": "array" }, - "mediaType": { - "type": "string", - "description": "The media type of the attachment.", + "authorizationAttribute": { + "description": "The authorization attribute associated with the transmission.", "nullable": true, - "example": "application/pdf\napplication/zip" + "type": "string" }, - "consumerType": { - "description": "The type of consumer the URL is intended for.", + "content": { + "description": "The content of the transmission.", "oneOf": [ { - "$ref": "#/components/schemas/Attachments_AttachmentUrlConsumerType" + "$ref": "#/components/schemas/V1ServiceOwnerDialogTransmissionsQueriesSearch_Content" } ] - } - } - }, - "V1ServiceOwnerDialogsCommandsCreate_GuiAction": { - "type": "object", - "additionalProperties": false, - "properties": { - "id": { - "type": "string", - "description": "A self-defined UUIDv7 may be provided to support idempotent creation of Gui Actions. If not provided, a new UUIDv7 will be generated.", - "format": "guid", - "nullable": true, - "example": "01913cd5-784f-7d3b-abef-4c77b1f0972d" }, - "action": { - "type": "string", - "description": "The action identifier for the action, corresponding to the \"action\" attributeId used in the XACML service policy." + "createdAt": { + "description": "The date and time when the transmission was created.", + "format": "date-time", + "type": "string" }, - "url": { - "type": "string", - "description": "The fully qualified URL of the action, to which the user will be redirected when the action is triggered. Will be set to\n\"urn:dialogporten:unauthorized\" if the user is not authorized to perform the action.", - "format": "uri", - "example": "urn:dialogporten:unauthorized\nhttps://someendpoint.com/gui/some-service-instance-id" + "deletedAt": { + "description": "The date and time when the transmission was deleted, if applicable.", + "format": "date-time", + "nullable": true, + "type": "string" }, - "authorizationAttribute": { - "type": "string", - "description": "Contains an authorization resource attributeId, that can used in custom authorization rules in the XACML service\npolicy, which by default is the policy belonging to the service referred to by \"serviceResource\" in the dialog.\n \nCan also be used to refer to other service policies.", + "extendedType": { + "description": "The extended type URI for the transmission.", + "format": "uri", "nullable": true, - "example": "mycustomresource\n/* equivalent to the above */\nurn:altinn:subresource:mycustomresource\nurn:altinn:task:Task_1\n/* refer to another service */\nurn:altinn:resource:some-other-service-identifier" + "type": "string" }, - "isDeleteDialogAction": { - "type": "boolean", - "description": "Indicates whether the action results in the dialog being deleted. Used by frontends to implement custom UX\nfor delete actions." + "id": { + "description": "The unique identifier for the transmission in UUIDv7 format.", + "format": "guid", + "type": "string" }, - "httpMethod": { - "description": "The HTTP method that the frontend should use when redirecting the user.", + "relatedTransmissionId": { + "description": "The unique identifier for the related transmission, if any.", + "format": "guid", "nullable": true, + "type": "string" + }, + "sender": { + "description": "The sender actor information for the transmission.", "oneOf": [ { - "$ref": "#/components/schemas/Http_HttpVerb" + "$ref": "#/components/schemas/V1ServiceOwnerCommonActors_Actor" } ] }, - "priority": { - "description": "Indicates a priority for the action, making it possible for frontends to adapt GUI elements based on action\npriority.", + "type": { + "description": "The type of the transmission.", "oneOf": [ { - "$ref": "#/components/schemas/DialogsEntitiesActions_DialogGuiActionPriority" + "$ref": "#/components/schemas/DialogsEntitiesTransmissions_DialogTransmissionType" } ] - }, - "title": { - "type": "array", - "description": "The title of the action, this should be short and in verb form. Must be text/plain.", - "nullable": true, - "items": { - "$ref": "#/components/schemas/V1CommonLocalizations_Localization" - } - }, - "prompt": { - "type": "array", - "description": "If there should be a prompt asking the user for confirmation before the action is executed,\nthis field should contain the prompt text.", - "nullable": true, - "items": { - "$ref": "#/components/schemas/V1CommonLocalizations_Localization" - } } - } + }, + "type": "object" }, - "V1ServiceOwnerDialogsCommandsCreate_ApiAction": { - "type": "object", + "V1WellKnownJwksQueriesGet_GetJwks": { "additionalProperties": false, "properties": { - "id": { - "type": "string", - "description": "A self-defined UUIDv7 may be provided to support idempotent creation of Api Actions. If not provided, a new UUIDv7 will be generated.", - "format": "guid", - "nullable": true, - "example": "01913cd5-784f-7d3b-abef-4c77b1f0972d" - }, - "action": { - "type": "string", - "description": "String identifier for the action, corresponding to the \"action\" attributeId used in the XACML service policy,\nwhich by default is the policy belonging to the service referred to by \"serviceResource\" in the dialog.", - "example": "write" - }, - "authorizationAttribute": { - "type": "string", - "description": "Contains an authorization resource attributeId, that can used in custom authorization rules in the XACML service\npolicy, which by default is the policy belonging to the service referred to by \"serviceResource\" in the dialog.\n \nCan also be used to refer to other service policies.", - "nullable": true, - "example": "mycustomresource\n/* equivalent to the above */\nurn:altinn:subresource:mycustomresource\nurn:altinn:task:Task_1\n/* refer to another service */\nurn:altinn:resource:some-other-service-identifier" - }, - "endpoints": { - "type": "array", - "description": "The endpoints associated with the action.", - "nullable": true, + "keys": { "items": { - "$ref": "#/components/schemas/V1ServiceOwnerDialogsCommandsCreate_ApiActionEndpoint" - } + "$ref": "#/components/schemas/V1WellKnownJwksQueriesGet_Jwk" + }, + "nullable": true, + "type": "array" } - } + }, + "type": "object" }, - "V1ServiceOwnerDialogsCommandsCreate_ApiActionEndpoint": { - "type": "object", + "V1WellKnownJwksQueriesGet_Jwk": { "additionalProperties": false, "properties": { - "version": { - "type": "string", - "description": "Arbitrary string indicating the version of the endpoint.", - "nullable": true - }, - "url": { - "type": "string", - "description": "The fully qualified URL of the API endpoint.", - "format": "uri" - }, - "httpMethod": { - "description": "The HTTP method that the endpoint expects for this action.", - "oneOf": [ - { - "$ref": "#/components/schemas/Http_HttpVerb" - } - ] + "alg": { + "type": "string" }, - "documentationUrl": { - "type": "string", - "description": "Link to documentation for the endpoint, providing documentation for integrators. Should be a URL to a\nhuman-readable page.", - "format": "uri", - "nullable": true + "crv": { + "type": "string" }, - "requestSchema": { - "type": "string", - "description": "Link to the request schema for the endpoint. Used to provide documentation for integrators.\nDialogporten will not validate information on this endpoint.", - "format": "uri", - "nullable": true + "kid": { + "type": "string" }, - "responseSchema": { - "type": "string", - "description": "Link to the response schema for the endpoint. Used to provide documentation for integrators.\nDialogporten will not validate information on this endpoint.", - "format": "uri", - "nullable": true + "kty": { + "type": "string" }, - "deprecated": { - "type": "boolean", - "description": "Boolean indicating if the endpoint is deprecated." + "use": { + "type": "string" }, - "sunsetAt": { - "type": "string", - "description": "Date and time when the endpoint will no longer function. Only set if the endpoint is deprecated. Dialogporten\nwill not enforce this date.", - "format": "date-time", - "nullable": true + "x": { + "type": "string" } - } + }, + "type": "object" }, - "V1ServiceOwnerDialogsCommandsCreate_Activity": { - "type": "object", + "V1WellKnownOauthAuthorizationServerQueriesGet_GetOauthAuthorizationServer": { "additionalProperties": false, "properties": { - "id": { - "type": "string", - "description": "A self-defined UUIDv7 may be provided to support idempotent creation of activities. If not provided, a new UUIDv7 will be generated.", - "format": "guid", - "nullable": true, - "example": "01913cd5-784f-7d3b-abef-4c77b1f0972d" + "issuer": { + "type": "string" }, - "createdAt": { - "type": "string", - "description": "If supplied, overrides the creating date and time for the transmission.\nIf not supplied, the current date /time will be used.", - "format": "date-time", - "nullable": true + "jwks_uri": { + "type": "string" + } + }, + "type": "object" + } + }, + "securitySchemes": { + "JWTBearerAuth": { + "bearerFormat": "JWT", + "description": "Enter a JWT token to authorize the requests...", + "scheme": "bearer", + "type": "http" + } + } + }, + "info": { + "title": "Dialogporten", + "version": "v1" + }, + "openapi": "3.0.0", + "paths": { + "/api/v1/.well-known/jwks.json": { + "get": { + "description": "This endpoint can be used by client integrations supporting automatic discovery of \u0022OAuth 2.0 Authorization Server\u0022 metadata, enabling verification of dialog tokens issues by Dialogporten.", + "operationId": "V1WellKnownJwksGet_GetJwks", + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/V1WellKnownJwksQueriesGet_GetJwks" + } + } + }, + "description": "The OAuth 2.0 Authorization Server Metadata" + } + }, + "summary": "Gets the JSON Web Key Set (JWKS) containing the public keys used to verify dialog token signatures", + "tags": [ + "Metadata" + ] + } + }, + "/api/v1/.well-known/oauth-authorization-server": { + "get": { + "description": "This endpoint can be used by client integrations supporting automatic discovery of \u0022OAuth 2.0 Authorization Server\u0022 metadata, enabling verification of dialog tokens issues by Dialogporten.", + "operationId": "V1WellKnownOauthAuthorizationServerGet_GetOauthAuthorizationServer", + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/V1WellKnownOauthAuthorizationServerQueriesGet_GetOauthAuthorizationServer" + } + } + }, + "description": "The OAuth 2.0 Authorization Server Metadata" + } + }, + "summary": "Gets the OAuth 2.0 Metadata for automatic configuration of clients verifying dialog tokens", + "tags": [ + "Metadata" + ] + } + }, + "/api/v1/enduser/dialogs": { + "get": { + "description": "Performs a search for dialogs, returning a paginated list of dialogs. For more information see the documentation (link TBD).\n\n* All date parameters must contain explicit time zone. Example: 2023-10-27T10:00:00Z or 2023-10-27T10:00:00\u002B01:00\n* See \u0022continuationToken\u0022 in the response for how to get the next page of results.\n* hasNextPage will be set to true if there are more items to get.", + "operationId": "V1EndUserDialogsSearch_SearchDialog", + "parameters": [ + { + "description": "Filter by one or more service owner codes", + "explode": true, + "in": "query", + "name": "org", + "schema": { + "items": { + "type": "string" + }, + "nullable": true, + "type": "array" + }, + "style": "form" }, - "extendedType": { - "type": "string", - "description": "Arbitrary URI/URN describing a service-specific transmission type.", - "format": "uri", - "nullable": true + { + "description": "Filter by one or more service resources", + "explode": true, + "in": "query", + "name": "serviceResource", + "schema": { + "items": { + "type": "string" + }, + "nullable": true, + "type": "array" + }, + "style": "form" }, - "type": { - "description": "The type of transmission.", - "oneOf": [ - { - "$ref": "#/components/schemas/DialogsEntitiesActivities_DialogActivityType" - } - ] + { + "description": "Filter by one or more owning parties", + "explode": true, + "in": "query", + "name": "party", + "schema": { + "items": { + "type": "string" + }, + "nullable": true, + "type": "array" + }, + "style": "form" }, - "transmissionId": { - "type": "string", - "description": "If the activity is related to a particular transmission, this field will contain the transmission identifier.\nMust be present in the request body.", - "format": "guid", - "nullable": true + { + "description": "Filter by one or more extended statuses", + "explode": true, + "in": "query", + "name": "extendedStatus", + "schema": { + "items": { + "type": "string" + }, + "nullable": true, + "type": "array" + }, + "style": "form" }, - "performedBy": { - "description": "The actor that performed the activity.", - "oneOf": [ - { - "$ref": "#/components/schemas/V1ServiceOwnerCommonActors_Actor" - } - ] + { + "description": "Filter by external reference", + "in": "query", + "name": "externalReference", + "schema": { + "nullable": true, + "type": "string" + } }, - "description": { - "type": "array", - "description": "Unstructured text describing the activity. Only set if the activity type is \"Information\".", - "nullable": true, - "items": { - "$ref": "#/components/schemas/V1CommonLocalizations_Localization" + { + "description": "Filter by status", + "explode": true, + "in": "query", + "name": "status", + "schema": { + "items": { + "$ref": "#/components/schemas/DialogsEntities_DialogStatus" + }, + "nullable": true, + "type": "array" + }, + "style": "form" + }, + { + "description": "Only return dialogs created after this date", + "in": "query", + "name": "createdAfter", + "schema": { + "format": "date-time", + "nullable": true, + "type": "string" } - } - } - }, - "V1ServiceOwnerDialogActivitiesQueriesSearch_Activity": { - "type": "object", - "additionalProperties": false, - "properties": { - "id": { - "type": "string", - "format": "guid" }, - "createdAt": { - "type": "string", - "format": "date-time" + { + "description": "Only return dialogs created before this date", + "in": "query", + "name": "createdBefore", + "schema": { + "format": "date-time", + "nullable": true, + "type": "string" + } }, - "extendedType": { - "type": "string", - "format": "uri", - "nullable": true + { + "description": "Only return dialogs updated after this date", + "in": "query", + "name": "updatedAfter", + "schema": { + "format": "date-time", + "nullable": true, + "type": "string" + } }, - "type": { - "$ref": "#/components/schemas/DialogsEntitiesActivities_DialogActivityType" + { + "description": "Only return dialogs updated before this date", + "in": "query", + "name": "updatedBefore", + "schema": { + "format": "date-time", + "nullable": true, + "type": "string" + } }, - "deletedAt": { - "type": "string", - "format": "date-time", - "nullable": true + { + "description": "Only return dialogs with due date after this date", + "in": "query", + "name": "dueAfter", + "schema": { + "format": "date-time", + "nullable": true, + "type": "string" + } }, - "transmissionId": { - "type": "string", - "format": "guid", - "nullable": true - } - } - }, - "V1ServiceOwnerDialogActivitiesQueriesNotificationCondition_NotificationCondition": { - "type": "object", - "additionalProperties": false, - "properties": { - "sendNotification": { - "type": "boolean" - } - } - }, - "V1ServiceOwnerDialogActivitiesQueriesGet_Activity": { - "type": "object", - "additionalProperties": false, - "properties": { - "id": { - "type": "string", - "format": "guid" + { + "description": "Only return dialogs with due date before this date", + "in": "query", + "name": "dueBefore", + "schema": { + "format": "date-time", + "nullable": true, + "type": "string" + } }, - "createdAt": { - "type": "string", - "format": "date-time", - "nullable": true + { + "description": "Filter by process", + "in": "query", + "name": "process", + "schema": { + "nullable": true, + "type": "string" + } }, - "extendedType": { - "type": "string", - "format": "uri", - "nullable": true + { + "description": "Filter by Display state", + "explode": true, + "in": "query", + "name": "systemLabel", + "schema": { + "items": { + "$ref": "#/components/schemas/DialogEndUserContextsEntities_SystemLabel" + }, + "nullable": true, + "type": "array" + }, + "style": "form" }, - "type": { - "$ref": "#/components/schemas/DialogsEntitiesActivities_DialogActivityType" + { + "description": "Search string for free text search. Will attempt to fuzzily match in all free text fields in the aggregate", + "in": "query", + "name": "search", + "schema": { + "nullable": true, + "type": "string" + } }, - "deletedAt": { - "type": "string", - "format": "date-time", - "nullable": true + { + "description": "Limit free text search to texts with this language code, e.g. \u0027nb\u0027, \u0027en\u0027. Culture codes will be normalized to neutral language codes (ISO 639). Default: search all culture codes", + "in": "query", + "name": "searchLanguageCode", + "schema": { + "nullable": true, + "type": "string" + } }, - "transmissionId": { - "type": "string", - "format": "guid", - "nullable": true + { + "in": "query", + "name": "orderBy", + "schema": { + "nullable": true, + "oneOf": [ + { + "$ref": "#/components/schemas/OrderSetOfTOrderDefinitionAndTTarget" + } + ] + } }, - "performedBy": { - "$ref": "#/components/schemas/V1ServiceOwnerCommonActors_Actor" + { + "description": "Supply \u0022continuationToken\u0022 for the response to get the next page of results, if hasNextPage is true", + "in": "query", + "name": "continuationToken", + "schema": { + "nullable": true, + "oneOf": [ + { + "$ref": "#/components/schemas/ContinuationTokenSetOfTOrderDefinitionAndTTarget" + } + ] + } }, - "description": { - "type": "array", - "nullable": true, - "items": { - "$ref": "#/components/schemas/V1CommonLocalizations_Localization" + { + "description": "Limit the number of results per page (1-1000, default: 100)", + "in": "query", + "name": "limit", + "schema": { + "format": "int32", + "nullable": true, + "type": "integer" } } - } - }, - "V1ServiceOwnerDialogActivitiesQueriesNotificationCondition_NotificationConditionType": { - "type": "string", - "description": "", - "x-enumNames": [ - "NotExists", - "Exists" ], - "enum": [ - "NotExists", - "Exists" - ] - }, - "V1ServiceOwnerDialogActivitiesCreate_ActivityRequest": { - "type": "object", - "additionalProperties": false, - "properties": { - "id": { - "type": "string", - "description": "The UUDIv7 of the action may be provided to support idempotent additions to the list of activities.\nIf not supplied, a new UUIDv7 will be generated.", - "format": "guid", - "nullable": true, - "example": "01913cd5-784f-7d3b-abef-4c77b1f0972d" - }, - "createdAt": { - "type": "string", - "description": "If supplied, overrides the creating date and time for the transmission.\nIf not supplied, the current date /time will be used.", - "format": "date-time", - "nullable": true - }, - "extendedType": { - "type": "string", - "description": "Arbitrary URI/URN describing a service-specific transmission type.", - "format": "uri", - "nullable": true - }, - "type": { - "description": "The type of transmission.", - "oneOf": [ - { - "$ref": "#/components/schemas/DialogsEntitiesActivities_DialogActivityType" - } - ] - }, - "transmissionId": { - "type": "string", - "description": "If the activity is related to a particular transmission, this field will contain the transmission identifier.\nMust be present in the request body.", - "format": "guid", - "nullable": true - }, - "performedBy": { - "description": "The actor that performed the activity.", - "oneOf": [ - { - "$ref": "#/components/schemas/V1ServiceOwnerCommonActors_Actor" + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/PaginatedListOfV1EndUserDialogsQueriesSearch_Dialog" + } } - ] + }, + "description": "Successfully returned the dialog list." }, - "description": { - "type": "array", - "description": "Unstructured text describing the activity. Only set if the activity type is \"Information\".", - "nullable": true, - "items": { - "$ref": "#/components/schemas/V1CommonLocalizations_Localization" - } + "401": { + "description": "Missing or invalid authentication token. Requires a Maskinporten-token with the scope \u0022digdir:dialogporten\u0022." } - } - }, - "V1EndUserPartiesQueriesGet_Parties": { - "type": "object", - "additionalProperties": false, - "properties": { - "authorizedParties": { - "type": "array", - "nullable": true, - "items": { - "$ref": "#/components/schemas/V1EndUserPartiesQueriesGet_AuthorizedParty" + }, + "security": [ + { + "JWTBearerAuth": [] + } + ], + "summary": "Gets a list of dialogs", + "tags": [ + "Enduser" + ] + } + }, + "/api/v1/enduser/dialogs/{dialogId}": { + "get": { + "description": "Gets a single dialog aggregate. For more information see the documentation (link TBD).", + "operationId": "V1EndUserDialogsGet_GetDialog", + "parameters": [ + { + "in": "path", + "name": "dialogId", + "required": true, + "schema": { + "format": "guid", + "type": "string" } } - } - }, - "V1EndUserPartiesQueriesGet_AuthorizedParty": { - "type": "object", - "additionalProperties": false, - "properties": { - "party": { - "type": "string" - }, - "name": { - "type": "string" - }, - "partyType": { - "type": "string" - }, - "isDeleted": { - "type": "boolean" - }, - "hasKeyRole": { - "type": "boolean" - }, - "isCurrentEndUser": { - "type": "boolean" - }, - "isMainAdministrator": { - "type": "boolean" + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/V1EndUserDialogsQueriesGet_Dialog" + } + } + }, + "description": "Successfully returned the dialog aggregate." }, - "isAccessManager": { - "type": "boolean" + "401": { + "description": "Missing or invalid authentication token. Requires a Maskinporten-token with the scope \u0022digdir:dialogporten\u0022." }, - "hasOnlyAccessToSubParties": { - "type": "boolean" + "403": { + "description": "Unauthorized to get the supplied dialog (not owned by authenticated organization or has additional scope requirements defined in policy)." }, - "subParties": { - "type": "array", - "nullable": true, - "items": { - "$ref": "#/components/schemas/V1EndUserPartiesQueriesGet_AuthorizedParty" + "404": { + "content": { + "application/problem\u002Bjson": { + "schema": { + "$ref": "#/components/schemas/ProblemDetails" + } + } + }, + "description": "The given dialog ID was not found or is already deleted." + } + }, + "security": [ + { + "JWTBearerAuth": [] + } + ], + "summary": "Gets a single dialog", + "tags": [ + "Enduser" + ] + } + }, + "/api/v1/enduser/dialogs/{dialogId}/activities": { + "get": { + "description": "Gets the list of activities belonging to a dialog", + "operationId": "V1EndUserDialogActivitiesSearch_SearchDialogActivity", + "parameters": [ + { + "in": "path", + "name": "dialogId", + "required": true, + "schema": { + "format": "guid", + "type": "string" } } - } - }, - "V1EndUserDialogTransmissionsQueriesSearch_Transmission": { - "type": "object", - "additionalProperties": false, - "properties": { - "id": { - "type": "string", - "description": "The unique identifier for the transmission in UUIDv7 format.", - "format": "guid" - }, - "createdAt": { - "type": "string", - "description": "The date and time when the transmission was created.", - "format": "date-time" - }, - "authorizationAttribute": { - "type": "string", - "description": "The authorization attribute associated with the transmission.", - "nullable": true - }, - "isAuthorized": { - "type": "boolean", - "description": "Flag indicating if the authenticated user is authorized for this transmission. If not, embedded content and\nthe attachments will not be available." - }, - "extendedType": { - "type": "string", - "description": "The extended type URI for the transmission.", - "format": "uri", - "nullable": true + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "items": { + "$ref": "#/components/schemas/V1EndUserDialogActivitiesQueriesSearch_Activity" + }, + "type": "array" + } + } + }, + "description": "Successfully returned the dialog activity list." }, - "relatedTransmissionId": { - "type": "string", - "description": "The unique identifier for the related transmission, if any.", - "format": "guid", - "nullable": true + "401": { + "description": "Missing or invalid authentication token. Requires a Maskinporten-token with the scope \u0022digdir:dialogporten\u0022." }, - "deletedAt": { - "type": "string", - "description": "The date and time when the transmission was deleted, if applicable.", - "format": "date-time", - "nullable": true + "403": { + "description": "Unauthorized to get the supplied dialog (not owned by authenticated organization or has additional scope requirements defined in policy)." + } + }, + "security": [ + { + "JWTBearerAuth": [] + } + ], + "summary": "Gets a list of dialog activities", + "tags": [ + "Enduser" + ] + } + }, + "/api/v1/enduser/dialogs/{dialogId}/activities/{activityId}": { + "get": { + "description": "Gets a single activity belonging to a dialog. For more information see the documentation (link TBD).", + "operationId": "V1EndUserDialogActivitiesGet_GetDialogActivity", + "parameters": [ + { + "in": "path", + "name": "dialogId", + "required": true, + "schema": { + "format": "guid", + "type": "string" + } }, - "type": { - "description": "The type of the transmission.", - "oneOf": [ - { - "$ref": "#/components/schemas/DialogsEntitiesTransmissions_DialogTransmissionType" + { + "in": "path", + "name": "activityId", + "required": true, + "schema": { + "format": "guid", + "type": "string" + } + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/V1EndUserDialogActivitiesQueriesGet_Activity" + } } - ] + }, + "description": "Successfully returned the dialog activity." }, - "sender": { - "description": "The sender actor information for the transmission.", - "oneOf": [ - { - "$ref": "#/components/schemas/V1EndUserCommonActors_Actor" - } - ] + "401": { + "description": "Missing or invalid authentication token. Requires a Maskinporten-token with the scope \u0022digdir:dialogporten\u0022." }, - "content": { - "description": "The content of the transmission.", - "oneOf": [ - { - "$ref": "#/components/schemas/V1EndUserDialogTransmissionsQueriesSearch_Content" - } - ] + "403": { + "description": "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)." }, - "attachments": { - "type": "array", - "description": "The attachments associated with the transmission.", - "nullable": true, - "items": { - "$ref": "#/components/schemas/V1EndUserDialogTransmissionsQueriesSearch_Attachment" + "404": { + "content": { + "application/problem\u002Bjson": { + "schema": { + "$ref": "#/components/schemas/ProblemDetails" + } + } + }, + "description": "The given dialog ID was not found or was deleted, or the given activity ID was not found." + } + }, + "security": [ + { + "JWTBearerAuth": [] + } + ], + "summary": "Gets a single dialog activity", + "tags": [ + "Enduser" + ] + } + }, + "/api/v1/enduser/dialogs/{dialogId}/labellog": { + "get": { + "operationId": "V1EndUserDialogLabelAssignmentLogsSearch_SearchDialogLabelAssignmentLog", + "parameters": [ + { + "in": "path", + "name": "dialogId", + "required": true, + "schema": { + "format": "guid", + "type": "string" } } - } - }, - "V1EndUserCommonActors_Actor": { - "type": "object", - "additionalProperties": false, - "properties": { - "actorType": { - "description": "The type of actor that sent the transmission.", - "oneOf": [ - { - "$ref": "#/components/schemas/Actors_ActorType" + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "items": { + "$ref": "#/components/schemas/V1EndUserDialogLabelAssignmentLogQueriesSearch_LabelAssignmentLog" + }, + "type": "array" + } } - ] + }, + "description": "Success" }, - "actorName": { - "type": "string", - "description": "Specifies the name of the entity that sent the transmission. Mutually exclusive with ActorId. If ActorId\nis supplied, the name will be automatically populated from the name registries.", - "nullable": true, - "example": "Ola Nordmann" + "401": { + "description": "Unauthorized" }, - "actorId": { - "type": "string", - "description": "The identifier of the person or organization that sent the transmission. Mutually exclusive with ActorName.\nMight be omitted if ActorType is \"ServiceOwner\".", - "nullable": true, - "example": "urn:altinn:person:identifier-no:12018212345" + "403": { + "description": "Forbidden" + }, + "404": { + "content": { + "application/problem\u002Bjson": { + "schema": { + "$ref": "#/components/schemas/ProblemDetails" + } + } + }, + "description": "Not Found" + }, + "410": { + "description": "" } - } - }, - "V1EndUserDialogTransmissionsQueriesSearch_Content": { - "type": "object", - "additionalProperties": false, - "properties": { - "title": { - "description": "The title of the content.", - "oneOf": [ - { - "$ref": "#/components/schemas/V1CommonContent_ContentValue" + }, + "security": [ + { + "JWTBearerAuth": [] + } + ], + "tags": [ + "Enduser" + ] + } + }, + "/api/v1/enduser/dialogs/{dialogId}/seenlog": { + "get": { + "description": "Gets all seen log records for a dialog. For more information see the documentation (link TBD).", + "operationId": "V1EndUserDialogSeenLogsSearch_SearchDialogSeenLog", + "parameters": [ + { + "in": "path", + "name": "dialogId", + "required": true, + "schema": { + "format": "guid", + "type": "string" + } + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "items": { + "$ref": "#/components/schemas/V1EndUserDialogSeenLogsQueriesSearch_SeenLog" + }, + "type": "array" + } } - ] + }, + "description": "Successfully returned the dialog seen log records." }, - "summary": { - "description": "The summary of the content.", - "oneOf": [ - { - "$ref": "#/components/schemas/V1CommonContent_ContentValue" - } - ] + "401": { + "description": "Missing or invalid authentication token. Requires a Maskinporten-token with the scope \u0022digdir:dialogporten\u0022." }, - "contentReference": { - "description": "Front-channel embedded content. Used to dynamically embed content in the frontend from an external URL.\nAllowed media types: application/vnd.dialogporten.frontchannelembed+json;type=markdown", - "nullable": true, - "oneOf": [ - { - "$ref": "#/components/schemas/V1CommonContent_ContentValue" + "403": { + "description": "Forbidden" + }, + "404": { + "content": { + "application/problem\u002Bjson": { + "schema": { + "$ref": "#/components/schemas/ProblemDetails" + } } - ] + }, + "description": "Not Found" } - } - }, - "V1EndUserDialogTransmissionsQueriesSearch_Attachment": { - "type": "object", - "additionalProperties": false, - "properties": { - "id": { - "type": "string", - "description": "The unique identifier for the attachment in UUIDv7 format.", - "format": "guid" - }, - "displayName": { - "type": "array", - "description": "The display name of the attachment that should be used in GUIs.", - "nullable": true, - "items": { - "$ref": "#/components/schemas/V1CommonLocalizations_Localization" + }, + "security": [ + { + "JWTBearerAuth": [] + } + ], + "summary": "Gets all seen log records for a dialog", + "tags": [ + "Enduser" + ] + } + }, + "/api/v1/enduser/dialogs/{dialogId}/seenlog/{seenLogId}": { + "get": { + "description": "Gets a single dialog seen log record. For more information see the documentation (link TBD).", + "operationId": "V1EndUserDialogSeenLogsGet_GetDialogSeenLog", + "parameters": [ + { + "in": "path", + "name": "dialogId", + "required": true, + "schema": { + "format": "guid", + "type": "string" } }, - "urls": { - "type": "array", - "description": "The URLs associated with the attachment, each referring to a different representation of the attachment.", - "nullable": true, - "items": { - "$ref": "#/components/schemas/V1EndUserDialogTransmissionsQueriesSearch_AttachmentUrl" + { + "in": "path", + "name": "seenLogId", + "required": true, + "schema": { + "format": "guid", + "type": "string" } } - } - }, - "V1EndUserDialogTransmissionsQueriesSearch_AttachmentUrl": { - "type": "object", - "additionalProperties": false, - "properties": { - "id": { - "type": "string", - "description": "The unique identifier for the attachment URL in UUIDv7 format.", - "format": "guid" + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/V1EndUserDialogSeenLogsQueriesGet_SeenLog" + } + } + }, + "description": "Successfully returned the dialog seen log record." }, - "url": { - "type": "string", - "description": "The fully qualified URL of the attachment. Will be set to \"urn:dialogporten:unauthorized\" if the user is\nnot authorized to access the transmission.", - "format": "uri", - "example": "https://someendpoint.com/someattachment.pdf\nurn:dialogporten:unauthorized" + "401": { + "description": "Missing or invalid authentication token. Requires a Maskinporten-token with the scope \u0022digdir:dialogporten\u0022." }, - "mediaType": { - "type": "string", - "description": "The media type of the attachment.", - "nullable": true, - "example": "application/pdf\napplication/zip" + "403": { + "description": "Forbidden" }, - "consumerType": { - "description": "The type of consumer the URL is intended for.", - "oneOf": [ - { - "$ref": "#/components/schemas/Attachments_AttachmentUrlConsumerType" + "404": { + "content": { + "application/problem\u002Bjson": { + "schema": { + "$ref": "#/components/schemas/ProblemDetails" + } } - ] + }, + "description": "Not Found" } - } - }, - "V1EndUserDialogTransmissionsQueriesGet_Transmission": { - "type": "object", - "additionalProperties": false, - "properties": { - "id": { - "type": "string", - "description": "The unique identifier for the transmission in UUIDv7 format.", - "format": "guid" - }, - "createdAt": { - "type": "string", - "description": "The date and time when the transmission was created.", - "format": "date-time" - }, - "authorizationAttribute": { - "type": "string", - "description": "The authorization attribute associated with the transmission.", - "nullable": true + }, + "security": [ + { + "JWTBearerAuth": [] + } + ], + "summary": "Gets a single dialog seen log record", + "tags": [ + "Enduser" + ] + } + }, + "/api/v1/enduser/dialogs/{dialogId}/systemlabels": { + "put": { + "operationId": "V1EndUserDialogSystemLabelsSet_SetDialogSystemLabel", + "parameters": [ + { + "in": "path", + "name": "dialogId", + "required": true, + "schema": { + "format": "guid", + "type": "string" + } + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/V1EndUserDialogSystemLabelsCommandsSet_SystemLabelCommand" + } + } }, - "isAuthorized": { - "type": "boolean", - "description": "Flag indicating if the authenticated user is authorized for this transmission. If not, embedded content and\nthe attachments will not be available." + "description": "", + "required": true, + "x-name": "SystemLabelCommand", + "x-position": 1 + }, + "responses": { + "204": { + "description": "No Content" }, - "extendedType": { - "type": "string", - "description": "The extended type URI for the transmission.", - "format": "uri", - "nullable": true + "400": { + "content": { + "application/problem\u002Bjson": { + "schema": { + "$ref": "#/components/schemas/ProblemDetails" + } + } + }, + "description": "Bad Request" }, - "relatedTransmissionId": { - "type": "string", - "description": "The unique identifier for the related transmission, if any.", - "format": "guid", - "nullable": true + "401": { + "description": "Unauthorized" }, - "deletedAt": { - "type": "string", - "description": "The date and time when the transmission was deleted, if applicable.", - "format": "date-time", - "nullable": true + "403": { + "description": "Forbidden" }, - "type": { - "description": "The type of the transmission.", - "oneOf": [ - { - "$ref": "#/components/schemas/DialogsEntitiesTransmissions_DialogTransmissionType" + "404": { + "content": { + "application/problem\u002Bjson": { + "schema": { + "$ref": "#/components/schemas/ProblemDetails" + } } - ] + }, + "description": "Not Found" }, - "sender": { - "description": "The sender actor information for the transmission.", - "oneOf": [ - { - "$ref": "#/components/schemas/V1EndUserCommonActors_Actor" - } - ] + "410": { + "description": "" }, - "content": { - "description": "The content of the transmission.", - "oneOf": [ - { - "$ref": "#/components/schemas/V1EndUserDialogTransmissionsQueriesGet_Content" + "412": { + "content": { + "application/problem\u002Bjson": { + "schema": { + "$ref": "#/components/schemas/ProblemDetails" + } } - ] + }, + "description": "" }, - "attachments": { - "type": "array", - "description": "The attachments associated with the transmission.", - "nullable": true, - "items": { - "$ref": "#/components/schemas/V1EndUserDialogTransmissionsQueriesGet_Attachment" + "422": { + "content": { + "application/problem\u002Bjson": { + "schema": { + "$ref": "#/components/schemas/ProblemDetails" + } + } + }, + "description": "" + } + }, + "security": [ + { + "JWTBearerAuth": [] + } + ], + "tags": [ + "Enduser" + ] + } + }, + "/api/v1/enduser/dialogs/{dialogId}/transmissions": { + "get": { + "description": "Gets the list of transmissions belonging to a dialog", + "operationId": "V1EndUserDialogTransmissionsSearch_SearchDialogTransmission", + "parameters": [ + { + "in": "path", + "name": "dialogId", + "required": true, + "schema": { + "format": "guid", + "type": "string" } } - } - }, - "V1EndUserDialogTransmissionsQueriesGet_Content": { - "type": "object", - "additionalProperties": false, - "properties": { - "title": { - "description": "The title of the content.", - "oneOf": [ - { - "$ref": "#/components/schemas/V1CommonContent_ContentValue" + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "items": { + "$ref": "#/components/schemas/V1EndUserDialogTransmissionsQueriesSearch_Transmission" + }, + "type": "array" + } } - ] + }, + "description": "Successfully returned the dialog transmission list." }, - "summary": { - "description": "The summary of the content.", - "oneOf": [ - { - "$ref": "#/components/schemas/V1CommonContent_ContentValue" - } - ] + "401": { + "description": "Missing or invalid authentication token. Requires a Maskinporten-token with the scope \u0022digdir:dialogporten\u0022." }, - "contentReference": { - "description": "Front-channel embedded content. Used to dynamically embed content in the frontend from an external URL.\nAllowed media types: application/vnd.dialogporten.frontchannelembed+json;type=markdown", - "nullable": true, - "oneOf": [ - { - "$ref": "#/components/schemas/V1CommonContent_ContentValue" - } - ] + "403": { + "description": "Unauthorized to get the supplied dialog (not owned by authenticated organization or has additional scope requirements defined in policy)." } - } - }, - "V1EndUserDialogTransmissionsQueriesGet_Attachment": { - "type": "object", - "additionalProperties": false, - "properties": { - "id": { - "type": "string", - "description": "The unique identifier for the attachment in UUIDv7 format.", - "format": "guid" - }, - "displayName": { - "type": "array", - "description": "The display name of the attachment that should be used in GUIs.", - "nullable": true, - "items": { - "$ref": "#/components/schemas/V1CommonLocalizations_Localization" + }, + "security": [ + { + "JWTBearerAuth": [] + } + ], + "summary": "Gets a list of dialog transmissions", + "tags": [ + "Enduser" + ] + } + }, + "/api/v1/enduser/dialogs/{dialogId}/transmissions/{transmissionId}": { + "get": { + "description": "Gets a single transmission belonging to a dialog. For more information see the documentation (link TBD).", + "operationId": "V1EndUserDialogTransmissionsGet_GetDialogTransmission", + "parameters": [ + { + "in": "path", + "name": "dialogId", + "required": true, + "schema": { + "format": "guid", + "type": "string" } }, - "urls": { - "type": "array", - "description": "The URLs associated with the attachment, each referring to a different representation of the attachment.", - "nullable": true, - "items": { - "$ref": "#/components/schemas/V1EndUserDialogTransmissionsQueriesGet_AttachmentUrl" + { + "in": "path", + "name": "transmissionId", + "required": true, + "schema": { + "format": "guid", + "type": "string" } } - } - }, - "V1EndUserDialogTransmissionsQueriesGet_AttachmentUrl": { - "type": "object", - "additionalProperties": false, - "properties": { - "id": { - "type": "string", - "description": "The unique identifier for the attachment URL in UUIDv7 format.", - "format": "guid" + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/V1EndUserDialogTransmissionsQueriesGet_Transmission" + } + } + }, + "description": "Successfully returned the dialog transmission." }, - "url": { - "type": "string", - "description": "The fully qualified URL of the attachment. Will be set to \"urn:dialogporten:unauthorized\" if the user is\nnot authorized to access the transmission.", - "format": "uri", - "example": "https://someendpoint.com/someattachment.pdf\nurn:dialogporten:unauthorized" + "401": { + "description": "Missing or invalid authentication token. Requires a Maskinporten-token with the scope \u0022digdir:dialogporten\u0022." }, - "mediaType": { - "type": "string", - "description": "The media type of the attachment.", - "nullable": true, - "example": "application/pdf\napplication/zip" + "403": { + "description": "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)." }, - "consumerType": { - "description": "The type of consumer the URL is intended for.", - "oneOf": [ - { - "$ref": "#/components/schemas/Attachments_AttachmentUrlConsumerType" + "404": { + "content": { + "application/problem\u002Bjson": { + "schema": { + "$ref": "#/components/schemas/ProblemDetails" + } } - ] - } - } - }, - "V1EndUserDialogSystemLabelsCommandsSet_SystemLabelCommand": { - "type": "object", - "additionalProperties": false, - "properties": { - "label": { - "$ref": "#/components/schemas/DialogEndUserContextsEntities_SystemLabel" - }, - "ifMatchDialogRevision": { - "type": "string", - "format": "guid", - "nullable": true + }, + "description": "The given dialog ID was not found or was deleted, or the given transmission ID was not found." } - } - }, - "V1EndUserDialogSeenLogsQueriesSearch_SeenLog": { - "type": "object", - "additionalProperties": false, - "properties": { - "id": { - "type": "string", - "format": "guid" - }, - "seenAt": { - "type": "string", - "format": "date-time" - }, - "seenBy": { - "$ref": "#/components/schemas/V1EndUserCommonActors_Actor" - }, - "isViaServiceOwner": { - "type": "boolean" - }, - "isCurrentEndUser": { - "type": "boolean" + }, + "security": [ + { + "JWTBearerAuth": [] } - } - }, - "V1EndUserDialogSeenLogsQueriesGet_SeenLog": { - "type": "object", - "additionalProperties": false, - "properties": { - "id": { - "type": "string", - "format": "guid" - }, - "seenAt": { - "type": "string", - "format": "date-time" - }, - "seenBy": { - "$ref": "#/components/schemas/V1EndUserCommonActors_Actor" + ], + "summary": "Gets a single dialog transmission", + "tags": [ + "Enduser" + ] + } + }, + "/api/v1/enduser/parties": { + "get": { + "description": "Gets the list of authorized parties for the end user. For more information see the documentation (link TBD).", + "operationId": "V1EndUserPartiesGet_GetParties", + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "items": { + "$ref": "#/components/schemas/V1EndUserPartiesQueriesGet_Parties" + }, + "type": "array" + } + } + }, + "description": "The list of authorized parties for the end user" }, - "isViaServiceOwner": { - "type": "boolean" + "401": { + "description": "Unauthorized" }, - "isCurrentEndUser": { - "type": "boolean" + "403": { + "description": "Forbidden" } - } - }, - "PaginatedListOfV1EndUserDialogsQueriesSearch_Dialog": { - "type": "object", - "additionalProperties": false, - "properties": { - "items": { - "type": "array", - "description": "The paginated list of items", - "nullable": true, - "items": { - "$ref": "#/components/schemas/V1EndUserDialogsQueriesSearch_Dialog" - } - }, - "hasNextPage": { - "type": "boolean", - "description": "Whether there are more items available that can be fetched by supplying the continuation token" - }, - "continuationToken": { - "type": "string", - "description": "The continuation token to be used to fetch the next page of items", - "nullable": true, - "example": "createdat_2024-07-31T09:09:03.0257090Z,id_0c089101-b7cf-a476-955c-f00a78d74a4e" - }, - "orderBy": { - "type": "string", - "description": "The current sorting order of the items", - "example": "createdat_desc,id_desc" + }, + "security": [ + { + "JWTBearerAuth": [] } - } - }, - "V1EndUserDialogsQueriesSearch_Dialog": { - "type": "object", - "additionalProperties": false, - "properties": { - "id": { - "type": "string", - "description": "The unique identifier for the dialog in UUIDv7 format.", - "format": "guid", - "example": "01913cd5-784f-7d3b-abef-4c77b1f0972d" + ], + "summary": "Gets the list of authorized parties for the end user", + "tags": [ + "Enduser" + ] + } + }, + "/api/v1/serviceowner/dialogs": { + "get": { + "description": "Performs a search for dialogs, returning a paginated list of dialogs. For more information see the documentation (link TBD).\n\n* All date parameters must contain explicit time zone. Example: 2023-10-27T10:00:00Z or 2023-10-27T10:00:00\u002B01:00\n* See \u0022continuationToken\u0022 in the response for how to get the next page of results.\n* hasNextPage will be set to true if there are more items to get.", + "operationId": "V1ServiceOwnerDialogsSearch_SearchDialog", + "parameters": [ + { + "description": "Filter by one or more service resources", + "explode": true, + "in": "query", + "name": "serviceResource", + "schema": { + "items": { + "type": "string" + }, + "nullable": true, + "type": "array" + }, + "style": "form" }, - "org": { - "type": "string", - "description": "The service owner code representing the organization (service owner) related to this dialog.", - "example": "ske" + { + "description": "Filter by one or more owning parties", + "explode": true, + "in": "query", + "name": "party", + "schema": { + "items": { + "type": "string" + }, + "nullable": true, + "type": "array" + }, + "style": "form" }, - "serviceResource": { - "type": "string", - "description": "The service identifier for the service that the dialog is related to in URN-format.\nThis corresponds to a service resource in the Altinn Resource Registry.", - "example": "urn:altinn:resource:some-service-identifier" + { + "description": "Filter by end user id", + "in": "query", + "name": "endUserId", + "schema": { + "nullable": true, + "type": "string" + } }, - "serviceResourceType": { - "type": "string", - "description": "The ServiceResource type, as defined in Altinn Resource Registry (see ResourceType)." + { + "description": "Filter by one or more extended statuses", + "explode": true, + "in": "query", + "name": "extendedStatus", + "schema": { + "items": { + "type": "string" + }, + "nullable": true, + "type": "array" + }, + "style": "form" }, - "party": { - "type": "string", - "description": "The party code representing the organization or person that the dialog belongs to in URN format.", - "example": "urn:altinn:person:identifier-no:01125512345\nurn:altinn:organization:identifier-no:912345678" + { + "description": "Filter by external reference", + "in": "query", + "name": "externalReference", + "schema": { + "nullable": true, + "type": "string" + } }, - "progress": { - "type": "integer", - "description": "Advisory indicator of progress, represented as 1-100 percentage value. 100% representing a dialog that has come\nto a natural completion (successful or not).", - "format": "int32", - "nullable": true + { + "description": "Filter by status", + "explode": true, + "in": "query", + "name": "status", + "schema": { + "items": { + "$ref": "#/components/schemas/DialogsEntities_DialogStatus" + }, + "nullable": true, + "type": "array" + }, + "style": "form" }, - "process": { - "type": "string", - "description": "Optional process identifier used to indicate a business process this dialog belongs to.", - "nullable": true + { + "description": "Only return dialogs created after this date", + "in": "query", + "name": "createdAfter", + "schema": { + "format": "date-time", + "nullable": true, + "type": "string" + } }, - "precedingProcess": { - "type": "string", - "description": "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.", - "nullable": true + { + "description": "Only return dialogs created before this date", + "in": "query", + "name": "createdBefore", + "schema": { + "format": "date-time", + "nullable": true, + "type": "string" + } }, - "guiAttachmentCount": { - "type": "integer", - "description": "The number of attachments in the dialog made available for browser-based frontends.", - "format": "int32", - "nullable": true + { + "description": "Only return dialogs updated after this date", + "in": "query", + "name": "updatedAfter", + "schema": { + "format": "date-time", + "nullable": true, + "type": "string" + } }, - "extendedStatus": { - "type": "string", - "description": "Arbitrary string with a service-specific indicator of status, typically used to indicate a fine-grained state of\nthe dialog to further specify the \"status\" enum.\n \nRefer to the service-specific documentation provided by the service owner for details on the possible values (if\nin use).", - "nullable": true + { + "description": "Only return dialogs updated before this date", + "in": "query", + "name": "updatedBefore", + "schema": { + "format": "date-time", + "nullable": true, + "type": "string" + } }, - "externalReference": { - "type": "string", - "description": "Arbitrary string with a service-specific reference to an external system or service.\n \nRefer to the service-specific documentation provided by the service owner for details (if in use).", - "nullable": true + { + "description": "Only return dialogs with due date after this date", + "in": "query", + "name": "dueAfter", + "schema": { + "format": "date-time", + "nullable": true, + "type": "string" + } }, - "createdAt": { - "type": "string", - "description": "The date and time when the dialog was created.", - "format": "date-time", - "example": "2022-12-31T23:59:59Z" + { + "description": "Only return dialogs with due date before this date", + "in": "query", + "name": "dueBefore", + "schema": { + "format": "date-time", + "nullable": true, + "type": "string" + } }, - "updatedAt": { - "type": "string", - "description": "The date and time when the dialog was last updated.", - "format": "date-time", - "example": "2022-12-31T23:59:59Z" + { + "description": "Only return dialogs with visible-from date after this date", + "in": "query", + "name": "visibleAfter", + "schema": { + "format": "date-time", + "nullable": true, + "type": "string" + } }, - "dueAt": { - "type": "string", - "description": "The due date for the dialog. This is the last date when the dialog is expected to be completed.", - "format": "date-time", - "nullable": true, - "example": "2022-12-31T23:59:59Z" + { + "description": "Only return dialogs with visible-from date before this date", + "in": "query", + "name": "visibleBefore", + "schema": { + "format": "date-time", + "nullable": true, + "type": "string" + } }, - "status": { - "description": "The aggregated status of the dialog.", - "oneOf": [ - { - "$ref": "#/components/schemas/DialogsEntities_DialogStatus" - } - ] + { + "description": "Filter by process", + "in": "query", + "name": "process", + "schema": { + "nullable": true, + "type": "string" + } }, - "systemLabel": { - "description": "Current display state.", - "oneOf": [ - { + { + "description": "Filter by Display state", + "explode": true, + "in": "query", + "name": "systemLabel", + "schema": { + "items": { "$ref": "#/components/schemas/DialogEndUserContextsEntities_SystemLabel" - } - ] - }, - "latestActivity": { - "description": "The latest entry in the dialog's activity log.", - "nullable": true, - "oneOf": [ - { - "$ref": "#/components/schemas/V1EndUserDialogsQueriesSearch_DialogActivity" - } - ] + }, + "nullable": true, + "type": "array" + }, + "style": "form" }, - "seenSinceLastUpdate": { - "type": "array", - "description": "The list of seen log entries for the dialog newer than the dialog ChangedAt date.", - "nullable": true, - "items": { - "$ref": "#/components/schemas/V1EndUserDialogsQueriesSearch_DialogSeenLog" + { + "description": "Search string for free text search. Will attempt to fuzzily match in all free text fields in the aggregate", + "in": "query", + "name": "search", + "schema": { + "nullable": true, + "type": "string" } }, - "content": { - "description": "The content of the dialog in search results.", - "oneOf": [ - { - "$ref": "#/components/schemas/V1EndUserDialogsQueriesSearch_Content" - } - ] - } - } - }, - "V1EndUserDialogsQueriesSearch_DialogActivity": { - "type": "object", - "additionalProperties": false, - "properties": { - "id": { - "type": "string", - "description": "The unique identifier for the activity in UUIDv7 format.", - "format": "guid" - }, - "createdAt": { - "type": "string", - "description": "The date and time when the activity was created.", - "format": "date-time", - "nullable": true - }, - "extendedType": { - "type": "string", - "description": "An arbitrary string with a service-specific activity type.\n \nConsult the service-specific documentation provided by the service owner for details (if in use).", - "format": "uri", - "nullable": true - }, - "type": { - "description": "The type of activity.", - "oneOf": [ - { - "$ref": "#/components/schemas/DialogsEntitiesActivities_DialogActivityType" - } - ] + { + "description": "Limit free text search to texts with this language code, e.g. \u0027nb\u0027, \u0027en\u0027. Culture codes will be normalized to neutral language codes (ISO 639). Default: search all culture codes", + "in": "query", + "name": "searchLanguageCode", + "schema": { + "nullable": true, + "type": "string" + } }, - "transmissionId": { - "type": "string", - "description": "If the activity is related to a particular transmission, this field will contain the transmission identifier.", - "format": "guid", - "nullable": true + { + "in": "query", + "name": "orderBy", + "schema": { + "nullable": true, + "oneOf": [ + { + "$ref": "#/components/schemas/OrderSetOfTOrderDefinitionAndTTarget" + } + ] + } }, - "performedBy": { - "description": "The actor that performed the activity.", - "oneOf": [ - { - "$ref": "#/components/schemas/V1EndUserCommonActors_Actor" - } - ] + { + "description": "Supply \u0022continuationToken\u0022 for the response to get the next page of results, if hasNextPage is true", + "in": "query", + "name": "continuationToken", + "schema": { + "nullable": true, + "oneOf": [ + { + "$ref": "#/components/schemas/ContinuationTokenSetOfTOrderDefinitionAndTTarget" + } + ] + } }, - "description": { - "type": "array", - "description": "Unstructured text describing the activity. Only set if the activity type is \"Information\".", - "nullable": true, - "items": { - "$ref": "#/components/schemas/V1CommonLocalizations_Localization" + { + "description": "Limit the number of results per page (1-1000, default: 100)", + "in": "query", + "name": "limit", + "schema": { + "format": "int32", + "nullable": true, + "type": "integer" } } - } - }, - "V1EndUserDialogsQueriesSearch_DialogSeenLog": { - "type": "object", - "additionalProperties": false, - "properties": { - "id": { - "type": "string", - "description": "The unique identifier for the seen log entry in UUIDv7 format.", - "format": "guid" - }, - "seenAt": { - "type": "string", - "description": "The timestamp when the dialog revision was seen.", - "format": "date-time" - }, - "seenBy": { - "description": "The actor that saw the dialog revision.", - "oneOf": [ - { - "$ref": "#/components/schemas/V1EndUserCommonActors_Actor" + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/PaginatedListOfV1ServiceOwnerDialogsQueriesSearch_Dialog" + } } - ] - }, - "isViaServiceOwner": { - "type": "boolean", - "description": "Flag indicating whether the seen log entry was created via the service owner.\n \nThis is used when the service owner uses the service owner API to implement its own frontend.", - "nullable": true + }, + "description": "Successfully returned the dialog list." }, - "isCurrentEndUser": { - "type": "boolean", - "description": "Flag indicating whether the seen log entry was created by the current end user." + "401": { + "description": "Missing or invalid authentication token. Requires a Maskinporten-token with the scope \u0022digdir:dialogporten.serviceprovider.search\u0022." + } + }, + "security": [ + { + "JWTBearerAuth": [] } - } + ], + "summary": "Gets a list of dialogs", + "tags": [ + "Serviceowner" + ] }, - "V1EndUserDialogsQueriesSearch_Content": { - "type": "object", - "additionalProperties": false, - "properties": { - "title": { - "description": "The title of the dialog.", - "oneOf": [ - { - "$ref": "#/components/schemas/V1CommonContent_ContentValue" + "post": { + "description": "The dialog is created with the given configuration. For more information see the documentation (link TBD).\n\nFor detailed information on validation rules, see [the source for CreateDialogCommandValidator](https://github.com/altinn/dialogporten/blob/main/src/Digdir.Domain.Dialogporten.Application/Features/V1/ServiceOwner/Dialogs/Commands/Create/CreateDialogCommandValidator.cs)", + "operationId": "V1ServiceOwnerDialogsCreate_Dialog", + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/V1ServiceOwnerDialogsCommandsCreate_Dialog" } - ] + } }, - "summary": { - "description": "A short summary of the dialog and its current state.", - "oneOf": [ - { - "$ref": "#/components/schemas/V1CommonContent_ContentValue" + "required": true, + "x-name": "dto" + }, + "responses": { + "201": { + "content": { + "application/json": { + "example": "018bb8e5-d9d0-7434-8ec5-569a6c8e01fc", + "schema": { + "type": "string" + } } - ] - }, - "senderName": { - "description": "Overridden sender name. If not supplied, assume \"org\" as the sender name.", - "nullable": true, - "oneOf": [ - { - "$ref": "#/components/schemas/V1CommonContent_ContentValue" + }, + "description": "The UUID of the created dialog aggregate. A relative URL to the newly created activity is set in the \u0022Location\u0022 header.", + "headers": { + "Etag": { + "description": "The new UUID ETag of the dialog", + "example": "123e4567-e89b-12d3-a456-426614174000", + "schema": { + "type": "string" + } } - ] + } }, - "extendedStatus": { - "description": "Used as the human-readable label used to describe the \"ExtendedStatus\" field.", - "nullable": true, - "oneOf": [ - { - "$ref": "#/components/schemas/V1CommonContent_ContentValue" - } - ] - } - } - }, - "V1EndUserDialogsQueriesGet_Dialog": { - "type": "object", - "additionalProperties": false, - "properties": { - "id": { - "type": "string", - "description": "The unique identifier for the dialog in UUIDv7 format.", - "format": "guid", - "example": "01913cd5-784f-7d3b-abef-4c77b1f0972d" + "204": { + "description": "No Content" }, - "revision": { - "type": "string", - "description": "The unique identifier for the revision in UUIDv4 format.", - "format": "guid", - "example": "a312cb9c-7632-43c2-aa38-69b06aed56ca" + "400": { + "content": { + "application/problem\u002Bjson": { + "schema": { + "$ref": "#/components/schemas/ProblemDetails" + } + } + }, + "description": "Validation error occured. See problem details for a list of errors." }, - "org": { - "type": "string", - "description": "The service owner code representing the organization (service owner) related to this dialog.", - "example": "ske" + "401": { + "description": "Missing or invalid authentication token. Requires a Maskinporten-token with the scope \u0022digdir:dialogporten.serviceprovider\u0022." }, - "serviceResource": { - "type": "string", - "description": "The service identifier for the service that the dialog is related to in URN-format.\nThis corresponds to a service resource in the Altinn Resource Registry.", - "example": "urn:altinn:resource:some-service-identifier" + "403": { + "description": "Unauthorized to create a dialog for the given serviceResource (not owned by authenticated organization or has additional scope requirements defined in policy)." }, - "serviceResourceType": { - "type": "string", - "description": "The ServiceResource type, as defined in Altinn Resource Registry (see ResourceType)." + "422": { + "content": { + "application/problem\u002Bjson": { + "schema": { + "$ref": "#/components/schemas/ProblemDetails" + } + } + }, + "description": "Domain error occured. See problem details for a list of errors." + } + }, + "security": [ + { + "JWTBearerAuth": [] + } + ], + "summary": "Creates a new dialog", + "tags": [ + "Serviceowner" + ] + } + }, + "/api/v1/serviceowner/dialogs/{dialogId}": { + "delete": { + "description": "Deletes a given dialog (soft delete). For more information see the documentation (link TBD).\n\nNote 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.\nIf end users attempt to access the dialog via the details endpoint, they will get a 410 Gone response.\n\nOptimistic 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.", + "operationId": "V1ServiceOwnerDialogsDelete_Dialog", + "parameters": [ + { + "in": "path", + "name": "dialogId", + "required": true, + "schema": { + "format": "guid", + "type": "string" + } }, - "party": { - "type": "string", - "description": "The party code representing the organization or person that the dialog belongs to in URN format.", - "example": "urn:altinn:person:identifier-no:01125512345\nurn:altinn:organization:identifier-no:912345678" + { + "in": "header", + "name": "if-Match", + "schema": { + "format": "guid", + "nullable": true, + "type": "string" + } + } + ], + "responses": { + "204": { + "description": "The dialog aggregate was deleted successfully.", + "headers": { + "Etag": { + "description": "The new UUID ETag of the dialog", + "example": "123e4567-e89b-12d3-a456-426614174000", + "schema": { + "type": "string" + } + } + } }, - "progress": { - "type": "integer", - "description": "Advisory indicator of progress, represented as 1-100 percentage value. 100% representing a dialog that has come\nto a natural completion (successful or not).", - "format": "int32", - "nullable": true + "400": { + "content": { + "application/problem\u002Bjson": { + "schema": { + "$ref": "#/components/schemas/ProblemDetails" + } + } + }, + "description": "Validation error occured. See problem details for a list of errors." }, - "process": { - "type": "string", - "description": "Optional process identifier used to indicate a business process this dialog belongs to.", - "nullable": true + "401": { + "description": "Missing or invalid authentication token. Requires a Maskinporten-token with the scope \u0022digdir:dialogporten.serviceprovider\u0022." }, - "precedingProcess": { - "type": "string", - "description": "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.", - "nullable": true + "403": { + "description": "Unauthorized to delete the supplied dialog (not owned by authenticated organization or has additional scope requirements defined in policy)." }, - "extendedStatus": { - "type": "string", - "description": "Arbitrary string with a service-specific indicator of status, typically used to indicate a fine-grained state of\nthe dialog to further specify the \"status\" enum.\n \nRefer to the service-specific documentation provided by the service owner for details on the possible values (if\nin use).", - "nullable": true + "404": { + "content": { + "application/problem\u002Bjson": { + "schema": { + "$ref": "#/components/schemas/ProblemDetails" + } + } + }, + "description": "The given dialog ID was not found or is already deleted." }, - "externalReference": { - "type": "string", - "description": "Arbitrary string with a service-specific reference to an external system or service.\n \nRefer to the service-specific documentation provided by the service owner for details (if in use).", - "nullable": true + "410": { + "description": "Entity with the given key(s) is removed." }, - "dueAt": { - "type": "string", - "description": "The due date for the dialog. Dialogs past due date might be marked as such in frontends but will still be available.", - "format": "date-time", - "nullable": true, - "example": "2022-12-31T23:59:59Z" + "412": { + "content": { + "application/problem\u002Bjson": { + "schema": { + "$ref": "#/components/schemas/ProblemDetails" + } + } + }, + "description": "The supplied If-Match header did not match the current Revision value for the dialog. The request was not applied." + } + }, + "security": [ + { + "JWTBearerAuth": [] + } + ], + "summary": "Deletes a dialog", + "tags": [ + "Serviceowner" + ] + }, + "get": { + "description": "Gets a single dialog aggregate. For more information see the documentation (link TBD).\n\nNote that this operation may return deleted dialogs (see the field \u0060DeletedAt\u0060).", + "operationId": "V1ServiceOwnerDialogsGet_GetDialog", + "parameters": [ + { + "in": "path", + "name": "dialogId", + "required": true, + "schema": { + "format": "guid", + "type": "string" + } }, - "expiresAt": { - "type": "string", - "description": "The expiration date for the dialog. This is the last date when the dialog is available for the end user.\n \nAfter this date is passed, the dialog will be considered expired and no longer available for the end user in any\nAPI. If not supplied, the dialog will be considered to never expire. This field can be changed by the service\nowner after the dialog has been created.", - "format": "date-time", - "nullable": true, - "example": "2022-12-31T23:59:59Z" + { + "description": "Filter by end user id", + "in": "query", + "name": "endUserId", + "schema": { + "nullable": true, + "type": "string" + } + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/V1ServiceOwnerDialogsQueriesGet_Dialog" + } + } + }, + "description": "Successfully returned the dialog aggregate." }, - "createdAt": { - "type": "string", - "description": "The date and time when the dialog was created.", - "format": "date-time", - "example": "2022-12-31T23:59:59Z" + "401": { + "description": "Missing or invalid authentication token. Requires a Maskinporten-token with the scope \u0022digdir:dialogporten.serviceprovider\u0022." }, - "updatedAt": { - "type": "string", - "description": "The date and time when the dialog was last updated.", - "format": "date-time", - "example": "2022-12-31T23:59:59Z" + "403": { + "description": "Unauthorized to get the supplied dialog (not owned by authenticated organization or has additional scope requirements defined in policy)." }, - "status": { - "description": "The aggregated status of the dialog.", - "oneOf": [ - { - "$ref": "#/components/schemas/DialogsEntities_DialogStatus" + "404": { + "content": { + "application/problem\u002Bjson": { + "schema": { + "$ref": "#/components/schemas/ProblemDetails" + } } - ] + }, + "description": "The given dialog ID was not found or is already deleted." + } + }, + "security": [ + { + "JWTBearerAuth": [] + } + ], + "summary": "Gets a single dialog", + "tags": [ + "Serviceowner" + ] + }, + "patch": { + "description": "Patches a dialog aggregate with a RFC6902 JSON Patch document. The patch document must be a JSON array of RFC6902 operations.\nSee [https://tools.ietf.org/html/rfc6902](https://tools.ietf.org/html/rfc6902) for more information.\n \nOptimistic 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.", + "operationId": "V1ServiceOwnerDialogsPatchDialog", + "parameters": [ + { + "in": "path", + "name": "dialogId", + "required": true, + "schema": { + "format": "guid", + "type": "string" + }, + "x-position": 1 }, - "systemLabel": { - "description": "Current display state.", - "oneOf": [ - { - "$ref": "#/components/schemas/DialogEndUserContextsEntities_SystemLabel" + { + "in": "header", + "name": "If-Match", + "schema": { + "format": "guid", + "nullable": true, + "type": "string" + }, + "x-originalName": "etag", + "x-position": 2 + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "items": { + "$ref": "#/components/schemas/JsonPatchOperations_Operation" + }, + "type": "array" } - ] + } }, - "content": { - "description": "The dialog unstructured text content.", - "oneOf": [ - { - "$ref": "#/components/schemas/V1EndUserDialogsQueriesGet_Content" + "required": true, + "x-name": "patchDocument", + "x-position": 3 + }, + "responses": { + "204": { + "description": "Patch was successfully applied.", + "headers": { + "Etag": { + "description": "The new UUID ETag of the dialog", + "example": "123e4567-e89b-12d3-a456-426614174000", + "schema": { + "type": "string" + } } - ] + } }, - "dialogToken": { - "type": "string", - "description": "The dialog token. May be used (if supported) against external URLs referred to in this dialog's apiActions,\ntransmissions or attachments. It should also be used for front-channel embeds.", - "nullable": true + "400": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ProblemDetails" + } + } + }, + "description": "Validation error occured. See problem details for a list of errors." }, - "attachments": { - "type": "array", - "description": "The attachments associated with the dialog (on an aggregate level).", - "nullable": true, - "items": { - "$ref": "#/components/schemas/V1EndUserDialogsQueriesGet_DialogAttachment" - } + "401": { + "description": "Missing or invalid authentication token. Requires a Maskinporten-token with the scope \\\u0022digdir:dialogporten.serviceprovider\\\u0022" }, - "transmissions": { - "type": "array", - "description": "The immutable list of transmissions associated with the dialog.", - "nullable": true, - "items": { - "$ref": "#/components/schemas/V1EndUserDialogsQueriesGet_DialogTransmission" - } + "403": { + "description": "Unauthorized to update a dialog for the given serviceResource (not owned by authenticated organization or has additional scope requirements defined in policy)" }, - "guiActions": { - "type": "array", - "description": "The GUI actions associated with the dialog. Should be used in browser-based interactive frontends.", - "nullable": true, - "items": { - "$ref": "#/components/schemas/V1EndUserDialogsQueriesGet_DialogGuiAction" - } + "404": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ProblemDetails" + } + } + }, + "description": "The given dialog ID was not found or is deleted" }, - "apiActions": { - "type": "array", - "description": "The API actions associated with the dialog. Should be used in specialized, non-browser-based integrations.", - "nullable": true, - "items": { - "$ref": "#/components/schemas/V1EndUserDialogsQueriesGet_DialogApiAction" - } + "412": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ProblemDetails" + } + } + }, + "description": "The supplied Revision does not match the current Revision of the dialog" }, - "activities": { - "type": "array", - "description": "An immutable list of activities associated with the dialog.", - "nullable": true, - "items": { - "$ref": "#/components/schemas/V1EndUserDialogsQueriesGet_DialogActivity" + "422": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ProblemDetails" + } + } + }, + "description": "Domain error occured. See problem details for a list of errors." + } + }, + "security": [ + { + "JWTBearerAuth": [] + } + ], + "summary": "Patch a single dialog", + "tags": [ + "Serviceowner" + ] + }, + "put": { + "description": "Replaces a given dialog with the supplied model. For more information see the documentation (link TBD).\n\nOptimistic 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.", + "operationId": "V1ServiceOwnerDialogsUpdate_Dialog", + "parameters": [ + { + "in": "path", + "name": "dialogId", + "required": true, + "schema": { + "format": "guid", + "type": "string" } }, - "seenSinceLastUpdate": { - "type": "array", - "description": "The list of seen log entries for the dialog newer than the dialog ChangedAt date.", - "nullable": true, - "items": { - "$ref": "#/components/schemas/V1EndUserDialogsQueriesGet_DialogSeenLog" + { + "in": "header", + "name": "if-Match", + "schema": { + "format": "guid", + "nullable": true, + "type": "string" } } - } - }, - "V1EndUserDialogsQueriesGet_Content": { - "type": "object", - "additionalProperties": false, - "properties": { - "title": { - "description": "The title of the dialog.", - "oneOf": [ - { - "$ref": "#/components/schemas/V1CommonContent_ContentValue" + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/V1ServiceOwnerDialogsCommandsUpdate_Dialog" } - ] + } }, - "summary": { - "description": "A short summary of the dialog and its current state.", - "oneOf": [ - { - "$ref": "#/components/schemas/V1CommonContent_ContentValue" + "required": true, + "x-name": "dto" + }, + "responses": { + "204": { + "description": "The dialog aggregate was updated successfully.", + "headers": { + "Etag": { + "description": "The new UUID ETag of the dialog", + "example": "123e4567-e89b-12d3-a456-426614174000", + "schema": { + "type": "string" + } } - ] + } }, - "senderName": { - "description": "Overridden sender name. If not supplied, assume \"org\" as the sender name.", - "nullable": true, - "oneOf": [ - { - "$ref": "#/components/schemas/V1CommonContent_ContentValue" + "400": { + "content": { + "application/problem\u002Bjson": { + "schema": { + "$ref": "#/components/schemas/ProblemDetails" + } } - ] + }, + "description": "Validation error occured. See problem details for a list of errors." + }, + "401": { + "description": "Missing or invalid authentication token. Requires a Maskinporten-token with the scope \u0022digdir:dialogporten.serviceprovider\u0022." + }, + "403": { + "description": "Unauthorized to update the supplied dialog (not owned by authenticated organization or has additional scope requirements defined in policy)." }, - "additionalInfo": { - "description": "Additional information about the dialog, this may contain Markdown.", - "nullable": true, - "oneOf": [ - { - "$ref": "#/components/schemas/V1CommonContent_ContentValue" + "404": { + "content": { + "application/problem\u002Bjson": { + "schema": { + "$ref": "#/components/schemas/ProblemDetails" + } } - ] + }, + "description": "The given dialog ID was not found or is already deleted." }, - "extendedStatus": { - "description": "Used as the human-readable label used to describe the \"ExtendedStatus\" field.", - "nullable": true, - "oneOf": [ - { - "$ref": "#/components/schemas/V1CommonContent_ContentValue" + "410": { + "description": "Entity with the given key(s) is removed." + }, + "412": { + "content": { + "application/problem\u002Bjson": { + "schema": { + "$ref": "#/components/schemas/ProblemDetails" + } } - ] + }, + "description": "The supplied If-Match header did not match the current Revision value for the dialog. The request was not applied." }, - "mainContentReference": { - "description": "Front-channel embedded content. Used to dynamically embed content in the frontend from an external URL.", - "nullable": true, - "oneOf": [ - { - "$ref": "#/components/schemas/V1CommonContent_ContentValue" + "422": { + "content": { + "application/problem\u002Bjson": { + "schema": { + "$ref": "#/components/schemas/ProblemDetails" + } } - ] + }, + "description": "Domain error occured. See problem details for a list of errors." } - } - }, - "V1EndUserDialogsQueriesGet_DialogAttachment": { - "type": "object", - "additionalProperties": false, - "properties": { - "id": { - "type": "string", - "description": "The unique identifier for the attachment in UUIDv7 format.", - "format": "guid" - }, - "displayName": { - "type": "array", - "description": "The display name of the attachment that should be used in GUIs.", - "nullable": true, - "items": { - "$ref": "#/components/schemas/V1CommonLocalizations_Localization" + }, + "security": [ + { + "JWTBearerAuth": [] + } + ], + "summary": "Replaces a dialog", + "tags": [ + "Serviceowner" + ] + } + }, + "/api/v1/serviceowner/dialogs/{dialogId}/actions/purge": { + "post": { + "description": "Deletes a given dialog (hard delete). For more information see the documentation (link TBD).\n\nOptimistic 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.", + "operationId": "V1ServiceOwnerDialogsPurge_PurgeDialog", + "parameters": [ + { + "in": "path", + "name": "dialogId", + "required": true, + "schema": { + "format": "guid", + "type": "string" } }, - "urls": { - "type": "array", - "description": "The URLs associated with the attachment, each referring to a different representation of the attachment.", - "nullable": true, - "items": { - "$ref": "#/components/schemas/V1EndUserDialogsQueriesGet_DialogAttachmentUrl" + { + "in": "header", + "name": "if-Match", + "schema": { + "format": "guid", + "nullable": true, + "type": "string" } } - } - }, - "V1EndUserDialogsQueriesGet_DialogAttachmentUrl": { - "type": "object", - "additionalProperties": false, - "properties": { - "id": { - "type": "string", - "description": "The unique identifier for the attachment URL in UUIDv7 format.", - "format": "guid" + ], + "responses": { + "204": { + "description": "The dialog aggregate was deleted successfully." }, - "url": { - "type": "string", - "description": "The fully qualified URL of the attachment.", - "format": "uri", - "example": "https://someendpoint.com/someattachment.pdf" + "401": { + "description": "Missing or invalid authentication token. Requires a Maskinporten-token with the scope \u0022digdir:dialogporten.serviceprovider\u0022." }, - "mediaType": { - "type": "string", - "description": "The media type of the attachment.", - "nullable": true, - "example": "application/pdf\napplication/zip" + "403": { + "description": "Unauthorized to delete the supplied dialog (not owned by authenticated organization or has additional scope requirements defined in policy)." }, - "consumerType": { - "description": "What type of consumer the URL is intended for.", - "oneOf": [ - { - "$ref": "#/components/schemas/Attachments_AttachmentUrlConsumerType" + "404": { + "content": { + "application/problem\u002Bjson": { + "schema": { + "$ref": "#/components/schemas/ProblemDetails" + } } - ] - } - } - }, - "V1EndUserDialogsQueriesGet_DialogTransmission": { - "type": "object", - "additionalProperties": false, - "properties": { - "id": { - "type": "string", - "description": "The unique identifier for the transmission in UUIDv7 format.", - "format": "guid" - }, - "createdAt": { - "type": "string", - "description": "The date and time when the transmission was created.", - "format": "date-time" - }, - "authorizationAttribute": { - "type": "string", - "description": "Contains an authorization resource attributeId, that can used in custom authorization rules in the XACML service\npolicy, which by default is the policy belonging to the service referred to by \"serviceResource\" in the dialog.\n \nCan also be used to refer to other service policies.", - "nullable": true, - "example": "mycustomresource\n/* equivalent to the above */\nurn:altinn:subresource:mycustomresource\nurn:altinn:task:Task_1\n/* refer to another service */\nurn:altinn:resource:some-other-service-identifier" - }, - "isAuthorized": { - "type": "boolean", - "description": "Flag indicating if the authenticated user is authorized for this transmission. If not, embedded content and\nthe attachments will not be available." + }, + "description": "The given dialog ID was not found or is already deleted." }, - "extendedType": { - "type": "string", - "description": "Arbitrary URI/URN describing a service-specific transmission type.\n \nRefer to the service-specific documentation provided by the service owner for details (if in use).", - "format": "uri", - "nullable": true + "412": { + "content": { + "application/problem\u002Bjson": { + "schema": { + "$ref": "#/components/schemas/ProblemDetails" + } + } + }, + "description": "The supplied If-Match header did not match the current Revision value for the dialog. The request was not applied." + } + }, + "security": [ + { + "JWTBearerAuth": [] + } + ], + "summary": "Permanently deletes a dialog", + "tags": [ + "Serviceowner" + ] + } + }, + "/api/v1/serviceowner/dialogs/{dialogId}/actions/should-send-notification": { + "get": { + "description": "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.", + "operationId": "V1ServiceOwnerDialogActivitiesNotificationCondition_NotificationCondition", + "parameters": [ + { + "in": "path", + "name": "dialogId", + "required": true, + "schema": { + "format": "guid", + "type": "string" + } }, - "relatedTransmissionId": { - "type": "string", - "description": "Reference to any other transmission that this transmission is related to.", - "format": "guid", - "nullable": true + { + "in": "query", + "name": "conditionType", + "required": true, + "schema": { + "allOf": [ + { + "$ref": "#/components/schemas/V1ServiceOwnerDialogActivitiesQueriesNotificationCondition_NotificationConditionType" + } + ] + } }, - "type": { - "description": "The type of transmission.", - "oneOf": [ - { - "$ref": "#/components/schemas/DialogsEntitiesTransmissions_DialogTransmissionType" - } - ] + { + "in": "query", + "name": "activityType", + "required": true, + "schema": { + "allOf": [ + { + "$ref": "#/components/schemas/DialogsEntitiesActivities_DialogActivityType" + } + ] + } }, - "sender": { - "description": "The actor that sent the transmission.", - "oneOf": [ - { - "$ref": "#/components/schemas/V1EndUserCommonActors_Actor" + { + "in": "query", + "name": "transmissionId", + "schema": { + "format": "guid", + "nullable": true, + "type": "string" + } + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/V1ServiceOwnerDialogActivitiesQueriesNotificationCondition_NotificationCondition" + } } - ] + }, + "description": "Successfully returned the notification determination." }, - "content": { - "description": "The transmission unstructured text content.", - "oneOf": [ - { - "$ref": "#/components/schemas/V1EndUserDialogsQueriesGet_DialogTransmissionContent" - } - ] + "401": { + "description": "Missing or invalid authentication token. Requires a Maskinporten-token with the scope \u0022altinn:system/notifications.condition.check\u0022." }, - "attachments": { - "type": "array", - "description": "The transmission-level attachments.", - "nullable": true, - "items": { - "$ref": "#/components/schemas/V1EndUserDialogsQueriesGet_DialogTransmissionAttachment" + "403": { + "description": "Forbidden" + } + }, + "security": [ + { + "JWTBearerAuth": [] + } + ], + "summary": "Returns a boolean value based on conditions used to determine if a notification is to be sent", + "tags": [ + "Serviceowner" + ] + } + }, + "/api/v1/serviceowner/dialogs/{dialogId}/activities": { + "get": { + "description": "Gets the list of activities belonging to a dialog", + "operationId": "V1ServiceOwnerDialogActivitiesSearch_SearchDialogActivity", + "parameters": [ + { + "in": "path", + "name": "dialogId", + "required": true, + "schema": { + "format": "guid", + "type": "string" } } - } - }, - "V1EndUserDialogsQueriesGet_DialogTransmissionContent": { - "type": "object", - "additionalProperties": false, - "properties": { - "title": { - "description": "The transmission title.", - "oneOf": [ - { - "$ref": "#/components/schemas/V1CommonContent_ContentValue" + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "items": { + "$ref": "#/components/schemas/V1ServiceOwnerDialogActivitiesQueriesSearch_Activity" + }, + "type": "array" + } } - ] + }, + "description": "Successfully returned the dialog activity list." }, - "summary": { - "description": "The transmission summary.", - "oneOf": [ - { - "$ref": "#/components/schemas/V1CommonContent_ContentValue" - } - ] + "401": { + "description": "Missing or invalid authentication token. Requires a Maskinporten-token with the scope \u0022digdir:dialogporten.serviceprovider\u0022." }, - "contentReference": { - "description": "Front-channel embedded content. Used to dynamically embed content in the frontend from an external URL.\nAllowed media types: application/vnd.dialogporten.frontchannelembed+json;type=markdown", - "nullable": true, - "oneOf": [ - { - "$ref": "#/components/schemas/V1CommonContent_ContentValue" - } - ] + "403": { + "description": "Unauthorized to get the supplied dialog (not owned by authenticated organization or has additional scope requirements defined in policy)." + } + }, + "security": [ + { + "JWTBearerAuth": [] } - } + ], + "summary": "Gets a list of dialog activities", + "tags": [ + "Serviceowner" + ] }, - "V1EndUserDialogsQueriesGet_DialogTransmissionAttachment": { - "type": "object", - "additionalProperties": false, - "properties": { - "id": { - "type": "string", - "description": "The unique identifier for the attachment in UUIDv7 format.", - "format": "guid" - }, - "displayName": { - "type": "array", - "description": "The display name of the attachment that should be used in GUIs.", - "nullable": true, - "items": { - "$ref": "#/components/schemas/V1CommonLocalizations_Localization" + "post": { + "description": "The activity is created with the given configuration. For more information see the documentation (link TBD).\n\nOptimistic 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.", + "operationId": "V1ServiceOwnerDialogActivitiesCreate_DialogActivity", + "parameters": [ + { + "in": "path", + "name": "dialogId", + "required": true, + "schema": { + "format": "guid", + "type": "string" } }, - "urls": { - "type": "array", - "description": "The URLs associated with the attachment, each referring to a different representation of the attachment.", - "nullable": true, - "items": { - "$ref": "#/components/schemas/V1EndUserDialogsQueriesGet_DialogTransmissionAttachmentUrl" + { + "in": "header", + "name": "if-Match", + "schema": { + "format": "guid", + "nullable": true, + "type": "string" } } - } - }, - "V1EndUserDialogsQueriesGet_DialogTransmissionAttachmentUrl": { - "type": "object", - "additionalProperties": false, - "properties": { - "url": { - "type": "string", - "description": "The fully qualified URL of the attachment. Will be set to \"urn:dialogporten:unauthorized\" if the user is\nnot authorized to access the transmission.", - "format": "uri", - "example": "https://someendpoint.com/someattachment.pdf\nurn:dialogporten:unauthorized" - }, - "mediaType": { - "type": "string", - "description": "The media type of the attachment.", - "nullable": true, - "example": "application/pdf\napplication/zip" - }, - "consumerType": { - "description": "The type of consumer the URL is intended for.", - "oneOf": [ - { - "$ref": "#/components/schemas/Attachments_AttachmentUrlConsumerType" + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/V1ServiceOwnerDialogActivitiesCreate_ActivityRequest" } - ] - } - } - }, - "V1EndUserDialogsQueriesGet_DialogGuiAction": { - "type": "object", - "additionalProperties": false, - "properties": { - "id": { - "type": "string", - "description": "The unique identifier for the action in UUIDv7 format.", - "format": "guid" + } }, - "action": { - "type": "string", - "description": "The action identifier for the action, corresponding to the \"action\" attributeId used in the XACML service policy." + "description": "", + "required": true, + "x-name": "CreateActivityRequest", + "x-position": 1 + }, + "responses": { + "201": { + "content": { + "application/json": { + "example": "018bb8e5-d9d0-7434-8ec5-569a6c8e01fc", + "schema": { + "type": "string" + } + } + }, + "description": "The UUID of the created dialog activity. A relative URL to the newly created activity is set in the \u0022Location\u0022 header.", + "headers": { + "Etag": { + "description": "The new UUID ETag of the dialog", + "example": "123e4567-e89b-12d3-a456-426614174000", + "schema": { + "type": "string" + } + } + } }, - "url": { - "type": "string", - "description": "The fully qualified URL of the action, to which the user will be redirected when the action is triggered. Will be set to\n\"urn:dialogporten:unauthorized\" if the user is not authorized to perform the action.", - "format": "uri", - "example": "urn:dialogporten:unauthorized\nhttps://someendpoint.com/gui/some-service-instance-id" + "204": { + "description": "No Content" }, - "authorizationAttribute": { - "type": "string", - "description": "Contains an authorization resource attributeId, that can used in custom authorization rules in the XACML service\npolicy, which by default is the policy belonging to the service referred to by \"serviceResource\" in the dialog.\n \nCan also be used to refer to other service policies.", - "nullable": true, - "example": "mycustomresource\n/* equivalent to the above */\nurn:altinn:subresource:mycustomresource\nurn:altinn:task:Task_1\n/* refer to another service */\nurn:altinn:resource:some-other-service-identifier" + "400": { + "content": { + "application/problem\u002Bjson": { + "schema": { + "$ref": "#/components/schemas/ProblemDetails" + } + } + }, + "description": "Validation error occured. See problem details for a list of errors." }, - "isAuthorized": { - "type": "boolean", - "description": "Whether the user is authorized to perform the action." + "401": { + "description": "Missing or invalid authentication token. Requires a Maskinporten-token with the scope \u0022digdir:dialogporten.serviceprovider\u0022." }, - "isDeleteDialogAction": { - "type": "boolean", - "description": "Indicates whether the action results in the dialog being deleted. Used by frontends to implement custom UX\nfor delete actions." + "403": { + "description": "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)." }, - "priority": { - "description": "Indicates a priority for the action, making it possible for frontends to adapt GUI elements based on action\npriority.", - "oneOf": [ - { - "$ref": "#/components/schemas/DialogsEntitiesActions_DialogGuiActionPriority" + "404": { + "content": { + "application/problem\u002Bjson": { + "schema": { + "$ref": "#/components/schemas/ProblemDetails" + } } - ] + }, + "description": "The given dialog ID was not found or is already deleted." }, - "httpMethod": { - "description": "The HTTP method that the frontend should use when redirecting the user.", - "oneOf": [ - { - "$ref": "#/components/schemas/Http_HttpVerb" - } - ] + "410": { + "description": "Entity with the given key(s) is removed." }, - "title": { - "type": "array", - "description": "The title of the action, this should be short and in verb form.", - "nullable": true, - "items": { - "$ref": "#/components/schemas/V1CommonLocalizations_Localization" - } + "412": { + "content": { + "application/problem\u002Bjson": { + "schema": { + "$ref": "#/components/schemas/ProblemDetails" + } + } + }, + "description": "The supplied If-Match header did not match the current Revision value for the dialog. The request was not applied." }, - "prompt": { - "type": "array", - "description": "If there should be a prompt asking the user for confirmation before the action is executed,\nthis field should contain the prompt text.", - "nullable": true, - "items": { - "$ref": "#/components/schemas/V1CommonLocalizations_Localization" - } + "422": { + "content": { + "application/problem\u002Bjson": { + "schema": { + "$ref": "#/components/schemas/ProblemDetails" + } + } + }, + "description": "Domain error occured. See problem details for a list of errors." } - } - }, - "V1EndUserDialogsQueriesGet_DialogApiAction": { - "type": "object", - "additionalProperties": false, - "properties": { - "id": { - "type": "string", - "description": "The unique identifier for the action in UUIDv7 format.", - "format": "guid" - }, - "action": { - "type": "string", - "description": "String identifier for the action, corresponding to the \"action\" attributeId used in the XACML service policy,\nwhich by default is the policy belonging to the service referred to by \"serviceResource\" in the dialog.", - "example": "write" - }, - "authorizationAttribute": { - "type": "string", - "description": "Contains an authorization resource attributeId, that can used in custom authorization rules in the XACML service\npolicy, which by default is the policy belonging to the service referred to by \"serviceResource\" in the dialog.\n \nCan also be used to refer to other service policies.", - "nullable": true, - "example": "mycustomresource\n/* equivalent to the above */\nurn:altinn:subresource:mycustomresource\nurn:altinn:task:Task_1\n/* refer to another service */\nurn:altinn:resource:some-other-service-identifier" - }, - "isAuthorized": { - "type": "boolean", - "description": "True if the authenticated user is authorized for this action. If not, the action will not be available\nand all endpoints will be replaced with a fixed placeholder." + }, + "security": [ + { + "JWTBearerAuth": [] + } + ], + "summary": "Adds a activity to a dialogs activity history", + "tags": [ + "Serviceowner" + ] + } + }, + "/api/v1/serviceowner/dialogs/{dialogId}/activities/{activityId}": { + "get": { + "description": "Gets a single activity belonging to a dialog. For more information see the documentation (link TBD).", + "operationId": "V1ServiceOwnerDialogActivitiesGet_GetDialogActivity", + "parameters": [ + { + "in": "path", + "name": "dialogId", + "required": true, + "schema": { + "format": "guid", + "type": "string" + } }, - "endpoints": { - "type": "array", - "description": "The endpoints associated with the action.", - "nullable": true, - "items": { - "$ref": "#/components/schemas/V1EndUserDialogsQueriesGet_DialogApiActionEndpoint" + { + "in": "path", + "name": "activityId", + "required": true, + "schema": { + "format": "guid", + "type": "string" } } - } - }, - "V1EndUserDialogsQueriesGet_DialogApiActionEndpoint": { - "type": "object", - "additionalProperties": false, - "properties": { - "id": { - "type": "string", - "description": "The unique identifier for the endpoint in UUIDv7 format.", - "format": "guid" + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/V1ServiceOwnerDialogActivitiesQueriesGet_Activity" + } + } + }, + "description": "Successfully returned the dialog activity." }, - "version": { - "type": "string", - "description": "Arbitrary string indicating the version of the endpoint.\n \nConsult the service-specific documentation provided by the service owner for details (if in use).", - "nullable": true + "401": { + "description": "Missing or invalid authentication token. Requires a Maskinporten-token with the scope \u0022digdir:dialogporten.serviceprovider\u0022." }, - "url": { - "type": "string", - "description": "The fully qualified URL of the API endpoint. Will be set to \"urn:dialogporten:unauthorized\" if the user is\nnot authorized to perform the action.", - "format": "uri", - "example": "https://someendpoint.com/api/v1/someaction\nurn:dialogporten:unauthorized" + "403": { + "description": "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)." }, - "httpMethod": { - "description": "The HTTP method that the endpoint expects for this action.", - "oneOf": [ - { - "$ref": "#/components/schemas/Http_HttpVerb" + "404": { + "content": { + "application/problem\u002Bjson": { + "schema": { + "$ref": "#/components/schemas/ProblemDetails" + } } - ] + }, + "description": "The given dialog ID was not found or was deleted, or the given activity ID was not found." }, - "documentationUrl": { - "type": "string", - "description": "Link to service provider documentation for the endpoint. Used for service owners to provide documentation for\nintegrators. Should be a URL to a human-readable page.", - "format": "uri", - "nullable": true + "410": { + "description": "Entity with the given key(s) is removed." + } + }, + "security": [ + { + "JWTBearerAuth": [] + } + ], + "summary": "Gets a single dialog activity", + "tags": [ + "Serviceowner" + ] + } + }, + "/api/v1/serviceowner/dialogs/{dialogId}/seenlog": { + "get": { + "description": "Gets all seen log records for a dialog. For more information see the documentation (link TBD).", + "operationId": "V1ServiceOwnerDialogSeenLogsSearch_SearchDialogSeenLog", + "parameters": [ + { + "in": "path", + "name": "dialogId", + "required": true, + "schema": { + "format": "guid", + "type": "string" + } + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "items": { + "$ref": "#/components/schemas/V1ServiceOwnerDialogSeenLogsQueriesSearch_SeenLog" + }, + "type": "array" + } + } + }, + "description": "Successfully returned the dialog seen log records." }, - "requestSchema": { - "type": "string", - "description": "Link to the request schema for the endpoint. Used by service owners to provide documentation for integrators.\nDialogporten will not validate information on this endpoint.", - "format": "uri", - "nullable": true + "401": { + "description": "Unauthorized" }, - "responseSchema": { - "type": "string", - "description": "Link to the response schema for the endpoint. Used for service owners to provide documentation for integrators.\nDialogporten will not validate information on this endpoint.", - "format": "uri", - "nullable": true + "403": { + "description": "Forbidden" }, - "deprecated": { - "type": "boolean", - "description": "Boolean indicating if the endpoint is deprecated. Integrators should migrate to endpoints with a higher version." + "404": { + "content": { + "application/problem\u002Bjson": { + "schema": { + "$ref": "#/components/schemas/ProblemDetails" + } + } + }, + "description": "The given dialog ID was not found or is already deleted." }, - "sunsetAt": { - "type": "string", - "description": "Date and time when the service owner has indicated that endpoint will no longer function. Only set if the endpoint\nis deprecated. Dialogporten will not enforce this date.", - "format": "date-time", - "nullable": true + "410": { + "description": "Entity with the given key(s) is removed." } - } - }, - "V1EndUserDialogsQueriesGet_DialogActivity": { - "type": "object", - "additionalProperties": false, - "properties": { - "id": { - "type": "string", - "description": "The unique identifier for the activity in UUIDv7 format.", - "format": "guid" - }, - "createdAt": { - "type": "string", - "description": "The date and time when the activity was created.", - "format": "date-time", - "nullable": true - }, - "extendedType": { - "type": "string", - "description": "An arbitrary URI/URN with a service-specific activity type.\n \nConsult the service-specific documentation provided by the service owner for details (if in use).", - "format": "uri", - "nullable": true + }, + "security": [ + { + "JWTBearerAuth": [] + } + ], + "summary": "Gets all seen log records for a dialog", + "tags": [ + "Serviceowner" + ] + } + }, + "/api/v1/serviceowner/dialogs/{dialogId}/seenlog/{seenLogId}": { + "get": { + "description": "Gets a single dialog seen log record. For more information see the documentation (link TBD).", + "operationId": "V1ServiceOwnerDialogSeenLogsGet_GetDialogSeenLog", + "parameters": [ + { + "in": "path", + "name": "dialogId", + "required": true, + "schema": { + "format": "guid", + "type": "string" + } }, - "type": { - "description": "The type of activity.", - "oneOf": [ - { - "$ref": "#/components/schemas/DialogsEntitiesActivities_DialogActivityType" + { + "in": "path", + "name": "seenLogId", + "required": true, + "schema": { + "format": "guid", + "type": "string" + } + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/V1ServiceOwnerDialogSeenLogsQueriesGet_SeenLog" + } } - ] + }, + "description": "Successfully returned the dialog seen log record." }, - "transmissionId": { - "type": "string", - "description": "If the activity is related to a particular transmission, this field will contain the transmission identifier.", - "format": "guid", - "nullable": true + "401": { + "description": "Unauthorized" }, - "performedBy": { - "description": "The actor that performed the activity.", - "oneOf": [ - { - "$ref": "#/components/schemas/V1EndUserCommonActors_Actor" + "403": { + "description": "Forbidden" + }, + "404": { + "content": { + "application/problem\u002Bjson": { + "schema": { + "$ref": "#/components/schemas/ProblemDetails" + } } - ] + }, + "description": "The given dialog ID was not found or is already deleted." }, - "description": { - "type": "array", - "description": "Unstructured text describing the activity. Only set if the activity type is \"Information\".", - "nullable": true, - "items": { - "$ref": "#/components/schemas/V1CommonLocalizations_Localization" + "410": { + "description": "Entity with the given key(s) is removed." + } + }, + "security": [ + { + "JWTBearerAuth": [] + } + ], + "summary": "Gets a single dialog seen log record", + "tags": [ + "Serviceowner" + ] + } + }, + "/api/v1/serviceowner/dialogs/{dialogId}/transmissions": { + "get": { + "description": "Gets the list of transmissions belonging to a dialog", + "operationId": "V1ServiceOwnerDialogTransmissionsSearch_SearchDialogTransmission", + "parameters": [ + { + "in": "path", + "name": "dialogId", + "required": true, + "schema": { + "format": "guid", + "type": "string" } } - } - }, - "V1EndUserDialogsQueriesGet_DialogSeenLog": { - "type": "object", - "additionalProperties": false, - "properties": { - "id": { - "type": "string", - "description": "The unique identifier for the seen log entry in UUIDv7 format.", - "format": "guid" - }, - "seenAt": { - "type": "string", - "description": "The timestamp when the dialog revision was seen.", - "format": "date-time" - }, - "seenBy": { - "description": "The actor that saw the dialog revision.", - "oneOf": [ - { - "$ref": "#/components/schemas/V1EndUserCommonActors_Actor" + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "items": { + "$ref": "#/components/schemas/V1ServiceOwnerDialogTransmissionsQueriesSearch_Transmission" + }, + "type": "array" + } } - ] - }, - "isViaServiceOwner": { - "type": "boolean", - "description": "Flag indicating whether the seen log entry was created via the service owner.\n \nThis is used when the service owner uses the service owner API to implement its own frontend.", - "nullable": true + }, + "description": "Successfully returned the dialog transmission list." }, - "isCurrentEndUser": { - "type": "boolean", - "description": "Flag indicating whether the seen log entry was created by the current end user." - } - } - }, - "V1EndUserDialogLabelAssignmentLogQueriesSearch_LabelAssignmentLog": { - "type": "object", - "additionalProperties": false, - "properties": { - "createdAt": { - "type": "string", - "format": "date-time" + "401": { + "description": "Missing or invalid authentication token. Requires a Maskinporten-token with the scope \u0022digdir:dialogporten.serviceprovider\u0022." }, - "name": { - "type": "string" + "403": { + "description": "Unauthorized to get the supplied dialog (not owned by authenticated organization or has additional scope requirements defined in policy)." }, - "action": { - "type": "string" + "404": { + "content": { + "application/problem\u002Bjson": { + "schema": { + "$ref": "#/components/schemas/ProblemDetails" + } + } + }, + "description": "The given dialog ID was not found or is already deleted." }, - "performedBy": { - "$ref": "#/components/schemas/V1EndUserCommonActors_Actor" + "410": { + "description": "Entity with the given key(s) is removed." + } + }, + "security": [ + { + "JWTBearerAuth": [] } - } + ], + "summary": "Gets a list of dialog transmissions", + "tags": [ + "Serviceowner" + ] }, - "V1EndUserDialogActivitiesQueriesSearch_Activity": { - "type": "object", - "additionalProperties": false, - "properties": { - "id": { - "type": "string", - "format": "guid" + "post": { + "description": "The transmission is created with the given configuration. For more information see the documentation (link TBD).\n\nOptimistic 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.", + "operationId": "V1ServiceOwnerDialogTransmissionsCreate_DialogTransmission", + "parameters": [ + { + "in": "path", + "name": "dialogId", + "required": true, + "schema": { + "format": "guid", + "type": "string" + } }, - "createdAt": { - "type": "string", - "format": "date-time" + { + "in": "header", + "name": "if-Match", + "schema": { + "format": "guid", + "nullable": true, + "type": "string" + } + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/V1ServiceOwnerDialogTransmissionsCreate_TransmissionRequest" + } + } }, - "extendedType": { - "type": "string", - "format": "uri", - "nullable": true + "description": "", + "required": true, + "x-name": "CreateTransmissionRequest", + "x-position": 1 + }, + "responses": { + "201": { + "content": { + "application/json": { + "example": "018bb8e5-d9d0-7434-8ec5-569a6c8e01fc", + "schema": { + "type": "string" + } + } + }, + "description": "The UUID of the created dialog transmission. A relative URL to the newly created activity is set in the \u0022Location\u0022 header.", + "headers": { + "Etag": { + "description": "The new UUID ETag of the dialog", + "example": "123e4567-e89b-12d3-a456-426614174000", + "schema": { + "type": "string" + } + } + } }, - "seenByEndUserIdHash": { - "type": "string", - "nullable": true + "204": { + "description": "No Content" }, - "type": { - "$ref": "#/components/schemas/DialogsEntitiesActivities_DialogActivityType" + "400": { + "content": { + "application/problem\u002Bjson": { + "schema": { + "$ref": "#/components/schemas/ProblemDetails" + } + } + }, + "description": "Validation error occured. See problem details for a list of errors." }, - "transmissionId": { - "type": "string", - "format": "guid", - "nullable": true - } - } - }, - "V1EndUserDialogActivitiesQueriesGet_Activity": { - "type": "object", - "additionalProperties": false, - "properties": { - "id": { - "type": "string", - "format": "guid" + "401": { + "description": "Missing or invalid authentication token. Requires a Maskinporten-token with the scope \u0022digdir:dialogporten.serviceprovider\u0022." }, - "createdAt": { - "type": "string", - "format": "date-time", - "nullable": true + "403": { + "description": "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)." }, - "extendedType": { - "type": "string", - "format": "uri", - "nullable": true + "404": { + "content": { + "application/problem\u002Bjson": { + "schema": { + "$ref": "#/components/schemas/ProblemDetails" + } + } + }, + "description": "The given dialog ID was not found or is already deleted." }, - "type": { - "$ref": "#/components/schemas/DialogsEntitiesActivities_DialogActivityType" + "410": { + "description": "Entity with the given key(s) is removed." }, - "transmissionId": { - "type": "string", - "format": "guid", - "nullable": true + "412": { + "content": { + "application/problem\u002Bjson": { + "schema": { + "$ref": "#/components/schemas/ProblemDetails" + } + } + }, + "description": "The supplied If-Match header did not match the current Revision value for the dialog. The request was not applied." }, - "performedBy": { - "$ref": "#/components/schemas/V1EndUserCommonActors_Actor" + "422": { + "content": { + "application/problem\u002Bjson": { + "schema": { + "$ref": "#/components/schemas/ProblemDetails" + } + } + }, + "description": "Domain error occured. See problem details for a list of errors." + } + }, + "security": [ + { + "JWTBearerAuth": [] + } + ], + "summary": "Adds a transmission to a dialog", + "tags": [ + "Serviceowner" + ] + } + }, + "/api/v1/serviceowner/dialogs/{dialogId}/transmissions/{transmissionId}": { + "get": { + "description": "Gets a single transmission belonging to a dialog. For more information see the documentation (link TBD).", + "operationId": "V1ServiceOwnerDialogTransmissionsGet_GetDialogTransmission", + "parameters": [ + { + "in": "path", + "name": "dialogId", + "required": true, + "schema": { + "format": "guid", + "type": "string" + } }, - "description": { - "type": "array", - "nullable": true, - "items": { - "$ref": "#/components/schemas/V1CommonLocalizations_Localization" + { + "in": "path", + "name": "transmissionId", + "required": true, + "schema": { + "format": "guid", + "type": "string" } } - } - }, - "JsonPatchOperations_Operation": { - "type": "object", - "additionalProperties": false, - "properties": { - "operationType": { - "$ref": "#/components/schemas/JsonPatchOperations_OperationType" + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/V1ServiceOwnerDialogTransmissionsQueriesGet_Transmission" + } + } + }, + "description": "Successfully returned the dialog transmission." }, - "path": { - "type": "string", - "nullable": true + "401": { + "description": "Missing or invalid authentication token. Requires a Maskinporten-token with the scope \u0022digdir:dialogporten.serviceprovider\u0022." }, - "op": { - "type": "string", - "nullable": true + "403": { + "description": "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)." }, - "from": { - "type": "string", - "nullable": true + "404": { + "content": { + "application/problem\u002Bjson": { + "schema": { + "$ref": "#/components/schemas/ProblemDetails" + } + } + }, + "description": "The given dialog ID was not found or was deleted, or the given transmission ID was not found." }, - "value": { - "nullable": true + "410": { + "description": "Entity with the given key(s) is removed." + } + }, + "security": [ + { + "JWTBearerAuth": [] } - } - }, - "JsonPatchOperations_OperationType": { - "type": "string", - "description": "", - "x-enumNames": [ - "Add", - "Remove", - "Replace", - "Move", - "Copy", - "Test", - "Invalid" ], - "enum": [ - "Add", - "Remove", - "Replace", - "Move", - "Copy", - "Test", - "Invalid" + "summary": "Gets a single dialog transmission", + "tags": [ + "Serviceowner" ] } - }, - "securitySchemes": { - "JWTBearerAuth": { - "type": "http", - "description": "Enter a JWT token to authorize the requests...", - "scheme": "bearer", - "bearerFormat": "JWT" - } } - } + }, + "servers": [ + { + "url": "https://localhost:7214/" + } + ] } From 025dadbc297b925f10feb88a2a0289e56fa3d935 Mon Sep 17 00:00:00 2001 From: Amund Myrbostad Date: Thu, 23 Jan 2025 14:58:04 +0100 Subject: [PATCH 105/169] Cleanup refitterTests Renamed WepApi Integration test to WepApi Unit test --- Digdir.Domain.Dialogporten.sln | 2 +- ...ain.Dialogporten.WebApi.Unit.Tests.csproj} | 0 .../Features/V1/SwaggerSnapshotTests.cs | 14 +- .../Utils.cs | 2 +- .../RefitterInterfaceTests.cs | 37 -- .../WebApiClientTests.cs | 559 ------------------ 6 files changed, 5 insertions(+), 609 deletions(-) rename tests/{Digdir.Domain.Dialogporten.WebApi.Integration.Tests/Digdir.Domain.Dialogporten.WebApi.Integration.Tests.csproj => Digdir.Domain.Dialogporten.WebApi.Unit.Tests/Digdir.Domain.Dialogporten.WebApi.Unit.Tests.csproj} (100%) rename tests/{Digdir.Domain.Dialogporten.WebApi.Integration.Tests => Digdir.Domain.Dialogporten.WebApi.Unit.Tests}/Features/V1/SwaggerSnapshotTests.cs (86%) rename tests/{Digdir.Domain.Dialogporten.WebApi.Integration.Tests => Digdir.Domain.Dialogporten.WebApi.Unit.Tests}/Utils.cs (87%) delete mode 100644 tests/Digdir.Library.Dialogporten.WebApiClient.Integration.Tests/RefitterInterfaceTests.cs delete mode 100644 tests/Digdir.Library.Dialogporten.WebApiClient.Integration.Tests/WebApiClientTests.cs diff --git a/Digdir.Domain.Dialogporten.sln b/Digdir.Domain.Dialogporten.sln index 3f6de6786..3b003c44a 100644 --- a/Digdir.Domain.Dialogporten.sln +++ b/Digdir.Domain.Dialogporten.sln @@ -49,7 +49,7 @@ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Digdir.Domain.Dialogporten. EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Digdir.Tool.Dialogporten.Ed25519KeyPairGenerator", "src\Digdir.Tool.Dialogporten.Ed25519KeyPairGenerator\Digdir.Tool.Dialogporten.Ed25519KeyPairGenerator.csproj", "{030909AA-5B61-46B4-9B74-0D2D779478FF}" EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Digdir.Domain.Dialogporten.WebApi.Integration.Tests", "tests\Digdir.Domain.Dialogporten.WebApi.Integration.Tests\Digdir.Domain.Dialogporten.WebApi.Integration.Tests.csproj", "{42004236-D45C-4A1F-9FF9-CF12B7388389}" +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Digdir.Domain.Dialogporten.WebApi.Unit.Tests", "tests\Digdir.Domain.Dialogporten.WebApi.Unit.Tests\Digdir.Domain.Dialogporten.WebApi.Unit.Tests.csproj", "{42004236-D45C-4A1F-9FF9-CF12B7388389}" EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Digdir.Domain.Dialogporten.GraphQL", "src\Digdir.Domain.Dialogporten.GraphQL\Digdir.Domain.Dialogporten.GraphQL.csproj", "{234FE24D-1047-4E29-A625-1EB406C37A2D}" EndProject diff --git a/tests/Digdir.Domain.Dialogporten.WebApi.Integration.Tests/Digdir.Domain.Dialogporten.WebApi.Integration.Tests.csproj b/tests/Digdir.Domain.Dialogporten.WebApi.Unit.Tests/Digdir.Domain.Dialogporten.WebApi.Unit.Tests.csproj similarity index 100% rename from tests/Digdir.Domain.Dialogporten.WebApi.Integration.Tests/Digdir.Domain.Dialogporten.WebApi.Integration.Tests.csproj rename to tests/Digdir.Domain.Dialogporten.WebApi.Unit.Tests/Digdir.Domain.Dialogporten.WebApi.Unit.Tests.csproj diff --git a/tests/Digdir.Domain.Dialogporten.WebApi.Integration.Tests/Features/V1/SwaggerSnapshotTests.cs b/tests/Digdir.Domain.Dialogporten.WebApi.Unit.Tests/Features/V1/SwaggerSnapshotTests.cs similarity index 86% rename from tests/Digdir.Domain.Dialogporten.WebApi.Integration.Tests/Features/V1/SwaggerSnapshotTests.cs rename to tests/Digdir.Domain.Dialogporten.WebApi.Unit.Tests/Features/V1/SwaggerSnapshotTests.cs index 17f0249fd..d15e60f82 100644 --- a/tests/Digdir.Domain.Dialogporten.WebApi.Integration.Tests/Features/V1/SwaggerSnapshotTests.cs +++ b/tests/Digdir.Domain.Dialogporten.WebApi.Unit.Tests/Features/V1/SwaggerSnapshotTests.cs @@ -1,19 +1,11 @@ using System.Diagnostics.CodeAnalysis; using System.Text.Json; -using Microsoft.AspNetCore.Hosting; -using Microsoft.AspNetCore.Mvc.Testing; #pragma warning disable CS1998 // Async method lacks 'await' operators and will run synchronously. If tests are run in DEBUG mode, this is expected. -namespace Digdir.Domain.Dialogporten.WebApi.Integration.Tests.Features.V1; +namespace Digdir.Domain.Dialogporten.WebApi.Unit.Tests.Features.V1; -public class SwaggerSnapshotTests : IClassFixture> +public class SwaggerSnapshotTests { - private readonly WebApplicationFactory _webApplicationFactory; - - public SwaggerSnapshotTests(WebApplicationFactory webApplicationFactory) - { - _webApplicationFactory = webApplicationFactory; - } [Fact] public async Task FailIfSwaggerSnapshotDoesNotMatch() @@ -28,7 +20,7 @@ public async Task FailIfSwaggerSnapshotDoesNotMatch() var swaggerPath = Path.Combine(rootPath!, "docs/schema/V1"); var newSwaggerPath = Path.Combine(rootPath!, "src/Digdir.Domain.Dialogporten.WebApi/bin/Release/net9.0/swagger.json"); // Act - var newSwagger = File.ReadAllText(newSwaggerPath); + var newSwagger = await File.ReadAllTextAsync(newSwaggerPath); // The order of the properties in the swagger.json file is not cross-platform deterministic. // Running Nswag on Windows and Mac will produce diff --git a/tests/Digdir.Domain.Dialogporten.WebApi.Integration.Tests/Utils.cs b/tests/Digdir.Domain.Dialogporten.WebApi.Unit.Tests/Utils.cs similarity index 87% rename from tests/Digdir.Domain.Dialogporten.WebApi.Integration.Tests/Utils.cs rename to tests/Digdir.Domain.Dialogporten.WebApi.Unit.Tests/Utils.cs index 3f44e2cbe..7d5ce1614 100644 --- a/tests/Digdir.Domain.Dialogporten.WebApi.Integration.Tests/Utils.cs +++ b/tests/Digdir.Domain.Dialogporten.WebApi.Unit.Tests/Utils.cs @@ -1,4 +1,4 @@ -namespace Digdir.Domain.Dialogporten.WebApi.Integration.Tests; +namespace Digdir.Domain.Dialogporten.WebApi.Unit.Tests; public static class Utils { diff --git a/tests/Digdir.Library.Dialogporten.WebApiClient.Integration.Tests/RefitterInterfaceTests.cs b/tests/Digdir.Library.Dialogporten.WebApiClient.Integration.Tests/RefitterInterfaceTests.cs deleted file mode 100644 index 1505278b9..000000000 --- a/tests/Digdir.Library.Dialogporten.WebApiClient.Integration.Tests/RefitterInterfaceTests.cs +++ /dev/null @@ -1,37 +0,0 @@ -namespace Digdir.Library.Dialogporten.WebApiClient.Integration.Tests; - -public sealed class RefitterInterfaceTests -{ - - [Fact] - public async Task FailIfRefitterInterfaceDoesNotMatch() - { - 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); - Assert.True(File.Exists(newRifitterPath)); - await Verify(newRefitter, extension: "cs") - .UseFileName("RefitterInterface") - .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() - { - var currentDirectory = Directory.GetCurrentDirectory(); - var solutionFolder = currentDirectory; - while (solutionFolder != null && Directory.GetFiles(solutionFolder, "*.sln").Length == 0) - { - solutionFolder = Directory.GetParent(solutionFolder)?.FullName; - } - return solutionFolder; - } - -} diff --git a/tests/Digdir.Library.Dialogporten.WebApiClient.Integration.Tests/WebApiClientTests.cs b/tests/Digdir.Library.Dialogporten.WebApiClient.Integration.Tests/WebApiClientTests.cs deleted file mode 100644 index 6981e8f89..000000000 --- a/tests/Digdir.Library.Dialogporten.WebApiClient.Integration.Tests/WebApiClientTests.cs +++ /dev/null @@ -1,559 +0,0 @@ -using System.Net; -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 WebApiClientFixture : IDisposable -{ - public IServiceownerApi DialogportenClient { get; } - public WebApiClientFixture() - { - - var configuration = new ConfigurationBuilder() - .AddUserSecrets() - .AddEnvironmentVariables() - // .AddJsonFile("appsettings.local.json", optional: false, reloadOnChange: true) - .Build(); - var services = new ServiceCollection(); - services.AddSingleton(configuration); - - services.AddDialogportenClient(); - services.AddDialogTokenVerifer(); - DialogportenClient = services.BuildServiceProvider().GetRequiredService(); - - } - - public void Dispose() - { - GC.SuppressFinalize(this); - } -} - -public class WebApiClientTests(WebApiClientFixture fixture) : IClassFixture, IDisposable -{ - [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() - { - 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(V1ServiceOwnerDialogsCommandsCreate_Dialog createDialogCommand) - { - - 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_Invalid_Dialog_Returns_400() - { - var createDialogCommand = CreateCommand(); - var dialogId = await CreateDialog(createDialogCommand); - - 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); - - var purgeResponse = await fixture.DialogportenClient.V1ServiceOwnerDialogsPurgePurgeDialog(dialogId, null); - Assert.Equal(HttpStatusCode.NoContent, purgeResponse.StatusCode); - } - [Fact] - public async Task Patch_Dialog_Returns_204() - { - var createDialogCommand = CreateCommand(); - var dialogId = await CreateDialog(createDialogCommand); - - List patchDocument = - [ - new() - { - Op = "replace", - OperationType = JsonPatchOperations_OperationType.Replace, - Path = "/progress", - Value = 50 - } - ]; - 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); - - var purgeResponse = await fixture.DialogportenClient.V1ServiceOwnerDialogsPurgePurgeDialog(dialogId, null); - Assert.Equal(HttpStatusCode.NoContent, purgeResponse.StatusCode); - } - - [Fact] - public async Task Get_Dialog_Returns_200() - { - var createDialogCommand = CreateCommand(); - var dialogId = await CreateDialog(createDialogCommand); - - var getResponse = await fixture.DialogportenClient.V1ServiceOwnerDialogsGetGetDialog(dialogId, null!, CancellationToken.None); - - Assert.Equal(HttpStatusCode.OK, getResponse.StatusCode); - - var purgeResponse = await fixture.DialogportenClient.V1ServiceOwnerDialogsPurgePurgeDialog(dialogId, null); - Assert.Equal(HttpStatusCode.NoContent, purgeResponse.StatusCode); - } - [Fact] - public async Task Update_Invalid_Dialog_Returns_400() - { - var createDialogCommand = CreateCommand(); - var dialogId = await CreateDialog(createDialogCommand); - - var updateDialogCommand = UpdateCommand(); - updateDialogCommand.Progress = 200; - var updateResponse = await fixture.DialogportenClient.V1ServiceOwnerDialogsUpdateDialog(dialogId, updateDialogCommand, null!, CancellationToken.None); - Assert.Equal(HttpStatusCode.BadRequest, updateResponse.StatusCode); - - var purgeResponse = await fixture.DialogportenClient.V1ServiceOwnerDialogsPurgePurgeDialog(dialogId, null); - Assert.Equal(HttpStatusCode.NoContent, purgeResponse.StatusCode); - } - [Fact] - public async Task Update_Dialog_Returns_204() - { - var createDialogCommand = CreateCommand(); - var dialogId = await CreateDialog(createDialogCommand); - - var updateDialogCommand = UpdateCommand(); - var updateResponse = await fixture.DialogportenClient.V1ServiceOwnerDialogsUpdateDialog(dialogId, updateDialogCommand, null!, CancellationToken.None); - Assert.Equal(HttpStatusCode.NoContent, updateResponse.StatusCode); - - var getResponse = await fixture.DialogportenClient.V1ServiceOwnerDialogsGetGetDialog(dialogId, null!); - Assert.Equal(HttpStatusCode.OK, getResponse.StatusCode); - Assert.Equal(updateDialogCommand.Progress, getResponse.Content!.Progress); - - var purgeResponse = await fixture.DialogportenClient.V1ServiceOwnerDialogsPurgePurgeDialog(dialogId, null); - Assert.Equal(HttpStatusCode.NoContent, purgeResponse.StatusCode); - } - [Fact] - public async Task Search_Dialog_Returns_200() - { - - var dateOffset = DateTimeOffset.UtcNow; - var createDialogCommand = CreateCommand(); - createDialogCommand.SystemLabel = DialogEndUserContextsEntities_SystemLabel.Bin; - var dialogId = await CreateDialog(createDialogCommand); - var param = new V1ServiceOwnerDialogsSearchSearchDialogQueryParams - { - CreatedAfter = dateOffset, - SystemLabel = [DialogEndUserContextsEntities_SystemLabel.Bin] - }; - var searchResponse = await fixture.DialogportenClient.V1ServiceOwnerDialogsSearchSearchDialog(param, CancellationToken.None); - Assert.Equal(HttpStatusCode.OK, searchResponse.StatusCode); - Assert.NotNull(searchResponse.Content); - Assert.Single(searchResponse.Content!.Items); - - var purgeResponse = await fixture.DialogportenClient.V1ServiceOwnerDialogsPurgePurgeDialog(dialogId, null); - Assert.Equal(HttpStatusCode.NoContent, purgeResponse.StatusCode); - } - - [Fact] - public async Task Search_Multiple_Dialogs() - { - var dateOffset = DateTime.UtcNow; - var dialogsCreated = 5; - var dialogIds = new List(); - for (var i = 0; i < dialogsCreated; i++) - { - var createDialogCommand = CreateCommand(); - createDialogCommand.SystemLabel = DialogEndUserContextsEntities_SystemLabel.Archive; - var dialogId = await CreateDialog(createDialogCommand); - dialogIds.Add(dialogId); - } - var param = new V1ServiceOwnerDialogsSearchSearchDialogQueryParams - { - CreatedAfter = dateOffset, - SystemLabel = [DialogEndUserContextsEntities_SystemLabel.Archive] - }; - 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); - for (var i = 0; i < dialogsCreated; i++) - { - var purgeResponse = await fixture.DialogportenClient.V1ServiceOwnerDialogsPurgePurgeDialog(dialogIds[i], null); - Assert.Equal(HttpStatusCode.NoContent, purgeResponse.StatusCode); - } - } - - [Fact] - public async Task Delete_Dialog_Returns_204() - { - var createDialogCommand = CreateCommand(); - var dialogId = await CreateDialog(createDialogCommand); - - var deleteResponse = await fixture.DialogportenClient.V1ServiceOwnerDialogsDeleteDialog(dialogId, null); - Assert.Equal(HttpStatusCode.NoContent, deleteResponse.StatusCode); - - var getResponse = await fixture.DialogportenClient.V1ServiceOwnerDialogsGetGetDialog(dialogId, null!); - Assert.Equal(HttpStatusCode.OK, getResponse.StatusCode); - Assert.NotNull(getResponse.Content!.DeletedAt); - - var purgeResponse = await fixture.DialogportenClient.V1ServiceOwnerDialogsPurgePurgeDialog(dialogId, null); - Assert.Equal(HttpStatusCode.NoContent, purgeResponse.StatusCode); - } - - [Fact] - public async Task Create_Dialog_Transmission_returns_201() - { - - var createDialogCommand = CreateCommand(); - createDialogCommand.Transmissions = []; - var dialogId = await CreateDialog(createDialogCommand); - 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); - - - var purgeResponse = await fixture.DialogportenClient.V1ServiceOwnerDialogsPurgePurgeDialog(dialogId, null); - Assert.Equal(HttpStatusCode.NoContent, purgeResponse.StatusCode); - - } - private static V1ServiceOwnerDialogsCommandsUpdate_Dialog UpdateCommand() - { - var createDialogCommand = new V1ServiceOwnerDialogsCommandsUpdate_Dialog - { - Activities = [], - Status = DialogsEntities_DialogStatus.New, - Progress = 60, - Attachments = [], - GuiActions = [], - ApiActions = [], - SearchTags = [], - Content = new V1ServiceOwnerDialogsCommandsUpdate_Content - { - Title = new V1CommonContent_ContentValue - { - MediaType = "text/plain", - Value = - [ - new V1CommonLocalizations_Localization - { - LanguageCode = "nb", - Value = "Hoved" - }, - new V1CommonLocalizations_Localization - { - LanguageCode = "en", - Value = "Main" - } - ], - }, - 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; - } - private static V1ServiceOwnerDialogsCommandsCreate_Dialog CreateCommand() - { - var createDialogCommand = new V1ServiceOwnerDialogsCommandsCreate_Dialog - { - GuiActions = [], - Activities = - [ - new V1ServiceOwnerDialogsCommandsCreate_Activity - { - 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" - } - ] - } - ], - Attachments = [], - // 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 - { - 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 mission" - } - ], - 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 = "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; - } - - public void Dispose() - { - GC.SuppressFinalize(this); - } -} From a58f91289f1358d67efdfc4493513087f17c5f3b Mon Sep 17 00:00:00 2001 From: Amund Myrbostad Date: Thu, 23 Jan 2025 15:00:54 +0100 Subject: [PATCH 106/169] Is it done?! --- .../Features/V1/SwaggerSnapshotTests.cs | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/tests/Digdir.Domain.Dialogporten.WebApi.Unit.Tests/Features/V1/SwaggerSnapshotTests.cs b/tests/Digdir.Domain.Dialogporten.WebApi.Unit.Tests/Features/V1/SwaggerSnapshotTests.cs index d15e60f82..c55f3d7e9 100644 --- a/tests/Digdir.Domain.Dialogporten.WebApi.Unit.Tests/Features/V1/SwaggerSnapshotTests.cs +++ b/tests/Digdir.Domain.Dialogporten.WebApi.Unit.Tests/Features/V1/SwaggerSnapshotTests.cs @@ -1,6 +1,9 @@ +#if DEBUG +#pragma warning disable CS1998 // Async method lacks 'await' operators and will run synchronously. +#endif + using System.Diagnostics.CodeAnalysis; using System.Text.Json; -#pragma warning disable CS1998 // Async method lacks 'await' operators and will run synchronously. If tests are run in DEBUG mode, this is expected. namespace Digdir.Domain.Dialogporten.WebApi.Unit.Tests.Features.V1; @@ -35,7 +38,8 @@ await Verify(orderedSwagger, extension: "json") .UseFileName("swagger") .UseDirectory(swaggerPath); #else - Assert.Fail("Swagger snapshot tests are not supported in DEBUG mode. Swagger is NOT generated in DEBUG mode, this is to keep build times low. therefore this test will always fail. Run in RELEASE mode to enable."); + Assert.Fail( + "Swagger snapshot tests are not supported in DEBUG mode. Swagger is NOT generated in DEBUG mode, this is to keep build times low. therefore this test will always fail. Run in RELEASE mode to enable."); #endif } From 74170c6b949296946044cef87048e06caaf324b0 Mon Sep 17 00:00:00 2001 From: Amund Myrbostad Date: Thu, 23 Jan 2025 15:12:23 +0100 Subject: [PATCH 107/169] Now done probably! --- .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 52f3c8a85..dab2c6141 100644 --- a/.github/workflows/ci-cd-main.yml +++ b/.github/workflows/ci-cd-main.yml @@ -117,7 +117,7 @@ jobs: 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' }} + if: ${{ needs.check-for-changes.outputs.hasBackendChanges == 'true' || needs.check-for-changes.outputs.hasSchemaChanges == '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) From c6d4a3f7fd077d612256d4eb49d1908cf2842fbd Mon Sep 17 00:00:00 2001 From: Amund Myrbostad Date: Fri, 24 Jan 2025 14:19:18 +0100 Subject: [PATCH 108/169] Clean up --- .refitter | 14 -------------- 1 file changed, 14 deletions(-) delete mode 100644 .refitter diff --git a/.refitter b/.refitter deleted file mode 100644 index 62ef65a3d..000000000 --- a/.refitter +++ /dev/null @@ -1,14 +0,0 @@ -{ - "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" -} From 3064ea019c9f810285c78c158ac17f0643cc211d Mon Sep 17 00:00:00 2001 From: Amund Myrbostad Date: Fri, 24 Jan 2025 14:31:12 +0100 Subject: [PATCH 109/169] Clean up --- Digdir.Domain.Dialogporten.sln | 7 ------ .../nswag.json | 25 ------------------- .../Dialogs.cs | 10 +------- ...r.Library.Dialogporten.WebApiClient.csproj | 2 +- 4 files changed, 2 insertions(+), 42 deletions(-) delete mode 100644 src/Digdir.Domain.Dialogporten.WebApi/nswag.json diff --git a/Digdir.Domain.Dialogporten.sln b/Digdir.Domain.Dialogporten.sln index 3b003c44a..c991a98b6 100644 --- a/Digdir.Domain.Dialogporten.sln +++ b/Digdir.Domain.Dialogporten.sln @@ -69,8 +69,6 @@ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Digdir.Library.Dialogporten 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 @@ -169,10 +167,6 @@ Global {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 @@ -205,7 +199,6 @@ Global {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.Domain.Dialogporten.WebApi/nswag.json b/src/Digdir.Domain.Dialogporten.WebApi/nswag.json deleted file mode 100644 index 9c25e8c76..000000000 --- a/src/Digdir.Domain.Dialogporten.WebApi/nswag.json +++ /dev/null @@ -1,25 +0,0 @@ -{ - "runtime": "Net90", - "documentGenerator": { - "webApiToOpenApi": { - "isAspNetCore": true, - "addMissingPathParameters": false, - "defaultPropertyNameHandling": "Default", - "defaultReferenceTypeNullHandling": "Null", - "defaultEnumHandling": "Integer", - "flattenInheritanceHierarchy": false, - "generateKnownTypes": true, - "generateXmlObjects": false, - "generateAbstractProperties": false, - "ignoreObsoleteProperties": false, - "allowReferencesWithProperties": false, - "excludedTypeNames": [], - "infoTitle": "My Title", - "infoVersion": "1.0.0", - "output": "swagger.json", - "outputType": "Swagger2", - "assemblyPaths": [], - "referencePaths": [] - } - } -} diff --git a/src/Digdir.Library.Dialogporten.WebApiClient.Sample/Dialogs.cs b/src/Digdir.Library.Dialogporten.WebApiClient.Sample/Dialogs.cs index 9251bbed6..cc800c16b 100644 --- a/src/Digdir.Library.Dialogporten.WebApiClient.Sample/Dialogs.cs +++ b/src/Digdir.Library.Dialogporten.WebApiClient.Sample/Dialogs.cs @@ -3,16 +3,8 @@ namespace Digdir.Library.Dialogporten.WebApiClient.Sample; -public sealed class Dialogs(IServiceownerApi client) +public sealed class Dialogs { - 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}"); 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 d389f03a6..ddb75f2f8 100644 --- a/src/Digdir.Library.Dialogporten.WebApiClient/Digdir.Library.Dialogporten.WebApiClient.csproj +++ b/src/Digdir.Library.Dialogporten.WebApiClient/Digdir.Library.Dialogporten.WebApiClient.csproj @@ -8,7 +8,7 @@ Digitaliseringsdirektoratet digdir;altinn;dialogporten git - https://github.com/digdir/dialogporten + https://github.com/altinn/dialogporten From 2652f57eb91ddf4024eac4187b8fd185afc6b873 Mon Sep 17 00:00:00 2001 From: Amund Myrbostad Date: Mon, 27 Jan 2025 09:17:28 +0100 Subject: [PATCH 110/169] Fixes from PR --- .../Digdir.Domain.Dialogporten.WebApi.csproj | 47 +++++++++---------- .../Program.cs | 15 +++--- ...r.Library.Dialogporten.WebApiClient.csproj | 4 -- 3 files changed, 28 insertions(+), 38 deletions(-) diff --git a/src/Digdir.Domain.Dialogporten.WebApi/Digdir.Domain.Dialogporten.WebApi.csproj b/src/Digdir.Domain.Dialogporten.WebApi/Digdir.Domain.Dialogporten.WebApi.csproj index 2ca308fdf..426376282 100644 --- a/src/Digdir.Domain.Dialogporten.WebApi/Digdir.Domain.Dialogporten.WebApi.csproj +++ b/src/Digdir.Domain.Dialogporten.WebApi/Digdir.Domain.Dialogporten.WebApi.csproj @@ -8,42 +8,39 @@ - - - - - + + + + + all runtime; build; native; contentfiles; analyzers; buildtransitive - - - - - - - - - - - - - + + + + + + + + + + + + - - - - + + + + - - - + diff --git a/src/Digdir.Domain.Dialogporten.WebApi/Program.cs b/src/Digdir.Domain.Dialogporten.WebApi/Program.cs index c9e43dba5..9753e1a43 100644 --- a/src/Digdir.Domain.Dialogporten.WebApi/Program.cs +++ b/src/Digdir.Domain.Dialogporten.WebApi/Program.cs @@ -66,7 +66,7 @@ static void BuildAndRun(string[] args) .ReadFrom.Configuration(context.Configuration) .ReadFrom.Services(services) .Enrich.WithEnvironmentName() - .Enrich.FromLogContext() + .Enrich.FromLogContext() .WriteTo.OpenTelemetryOrConsole(context)); builder.Services @@ -85,8 +85,8 @@ static void BuildAndRun(string[] args) // Clean architecture projects .AddApplication(builder.Configuration, builder.Environment) .AddInfrastructure(builder.Configuration, builder.Environment) - .WithPubCapabilities() - .Build() + .WithPubCapabilities() + .Build() // Asp infrastructure .AddExceptionHandler() @@ -142,8 +142,8 @@ static void BuildAndRun(string[] args) }; }) .AddControllers(options => options.InputFormatters.Insert(0, JsonPatchInputFormatter.Get())) - .AddNewtonsoftJson() - .Services + .AddNewtonsoftJson() + .Services // Add health checks with the retrieved URLs .AddAspNetHealthChecks((x, y) => x.HealthCheckSettings.HttpGetEndpointsToCheck = y .GetRequiredService>().Value? @@ -197,10 +197,7 @@ static void BuildAndRun(string[] args) // Do not serialize empty collections x.Serializer.Options.TypeInfoResolver = new DefaultJsonTypeInfoResolver { - Modifiers = - { - IgnoreEmptyCollections - } + Modifiers = { IgnoreEmptyCollections } }; x.Serializer.Options.Converters.Add(new JsonStringEnumConverter()); x.Serializer.Options.Converters.Add(new UtcDateTimeOffsetConverter()); 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 ddb75f2f8..22410ce52 100644 --- a/src/Digdir.Library.Dialogporten.WebApiClient/Digdir.Library.Dialogporten.WebApiClient.csproj +++ b/src/Digdir.Library.Dialogporten.WebApiClient/Digdir.Library.Dialogporten.WebApiClient.csproj @@ -32,8 +32,4 @@ - - - - From 08f69ca05b5c6d2ff7705e6043953fcadba77bcd Mon Sep 17 00:00:00 2001 From: Amund Myrbostad Date: Mon, 27 Jan 2025 09:59:15 +0100 Subject: [PATCH 111/169] Code rabbit changes --- .../Features/V1/SwaggerSnapshotTests.cs | 1 + 1 file changed, 1 insertion(+) diff --git a/tests/Digdir.Domain.Dialogporten.WebApi.Unit.Tests/Features/V1/SwaggerSnapshotTests.cs b/tests/Digdir.Domain.Dialogporten.WebApi.Unit.Tests/Features/V1/SwaggerSnapshotTests.cs index c55f3d7e9..0bed8186c 100644 --- a/tests/Digdir.Domain.Dialogporten.WebApi.Unit.Tests/Features/V1/SwaggerSnapshotTests.cs +++ b/tests/Digdir.Domain.Dialogporten.WebApi.Unit.Tests/Features/V1/SwaggerSnapshotTests.cs @@ -22,6 +22,7 @@ public async Task FailIfSwaggerSnapshotDoesNotMatch() var rootPath = Utils.GetSolutionRootFolder(); var swaggerPath = Path.Combine(rootPath!, "docs/schema/V1"); var newSwaggerPath = Path.Combine(rootPath!, "src/Digdir.Domain.Dialogporten.WebApi/bin/Release/net9.0/swagger.json"); + Assert.True(File.Exists(newSwaggerPath), $"Swagger file not found at {newSwaggerPath}. Make sure you have built the project in RELEASE mode."); // Act var newSwagger = await File.ReadAllTextAsync(newSwaggerPath); From 4ef23e5376611c9f91bc441654aebfd4e161d1e8 Mon Sep 17 00:00:00 2001 From: Amund Myrbostad Date: Mon, 27 Jan 2025 10:43:49 +0100 Subject: [PATCH 112/169] Removed secrets from settings --- .../appsettings.json | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/src/Digdir.Library.Dialogporten.WebApiClient.Sample/appsettings.json b/src/Digdir.Library.Dialogporten.WebApiClient.Sample/appsettings.json index 1fb853d49..51aad2692 100644 --- a/src/Digdir.Library.Dialogporten.WebApiClient.Sample/appsettings.json +++ b/src/Digdir.Library.Dialogporten.WebApiClient.Sample/appsettings.json @@ -2,9 +2,15 @@ "DialogportenSettings": { "Environment": "local", "Maskinporten": { - "ClientId": "ce3b732a-d4f2-4997-8545-adf8df70fe6c", - "Scope": "digdir:dialogporten.serviceprovider digdir:dialogporten.serviceprovider.search", - "EncodedJwk": "eyJwIjoieTRBZEhlVVBxdFEtSFlOWkR5ci0zS09RT3NQajA5TFh2a2hIUFlTdGFYNThkMndIWUJiVXlDTWdMYWtGTHo4UExKNWtscURsanRoczFtM1dFVGJhSWVuY25TalpjZTh4S1Q2SHh3bTNyaDlydWZ1TWVOZDRqaFptTm9WZmJrcGNXcVh0UDFvb1NPTE5zYUNVUWFUUEVKTXlFd3VhdWxMSzgxRG1SSTlMSmVNIiwia3R5IjoiUlNBIiwicSI6InFmOEQ2Uy1Kd19BdVQ0Q2hjQTlDek9WNk1uTW9mc1VCdTkteHJBcVFDRjh4WWZZOTRxQ1ZjQ3llajlkTlN3eXZUZXg1dThIMzNSaU1LMEFWM2tTQlpJLVZqcXJHLUx6YzNfTUlTTVpSVDJfbzNVQlRWVHpqTkUtSkpMX1hKaXJ6ZVhhQjM1UmFZMjFnWVhKQWg3X2tuR3dpRzF3MGxiT2ozQ0FzdnVwaU1BMCIsImQiOiJLVkF1b1Zhd2paTTgwenRYcUxSZUJGZkJ3M3pxVjdkUGFpaWFONWU0RFp6bW5MYTFMNEZJMTgtanVraHN4UVdqR1NFQnBIdTFrOHRPUWMyWjBsSDVaaTBydERqM0JKeEhxeDNsUGdYMWdTNXNiX1EyeXNfb2FKcklSX012MHBDQUFHX3hpa2lUY2kzTHMyeV9femV4QTdLbG0yalNmYW9Udzdhbml1R3RId1d5dHhCSnJnZ0J2c3loaHZIaUVQcnZaMHZBZldYYWI3QUtkUjc1cEtEaVVHOGdGNTdJN0hrWnpJSk9QYXp3MTU1Skx4TG9HcDVzeTFCVVpBNHRiQmlseWVsdG9ONGZINWd1aUktOXJjTE5zUmVYazJ1c3NFbE9EbVZ2Qmx2ZVVfb1ZRMVYtVDRJRnUzZk1BYVJGUFA2Wlo1akJJX2hkOFJOTTJ3eUp5UHVRWVEiLCJlIjoiQVFBQiIsInVzZSI6InNpZyIsImtpZCI6ImRpYWxvZ3BvcnRlbi1zcC1zZGstdGVzdC0yMDI0MTAxMCIsInFpIjoiQm9VS0RlczQ0UTNpXzNyT3Q4aHRrS2NxWkFNem00Njl2cTZuQnJVcHBTU1Ric3YwalZwN1daRGRRR0Q0bU8yMVJVOEFUbmN3NjFPOUt3YXktOGloX082VWFWbGxZN3NHYlVrQ2NVaG43ZDkzSElLZnhybnhWVE9nNUNMWTBka2Zwa3A1V2pyU1VvMTVKQURsY3BRM0ItRlU0Nm9PTG9ydjJ0SVFQekE4OF93IiwiZHAiOiJ1emVaRWZpN2Fqa3JFREhYekZtTThXWFUtZ3RmM1ctN0pnY082MnpWc1JrNTN4QlcxTE1NZlRlN2tlWk9xOEhDN3hTbGktSm9idnR6WGU3Y295ZW9sTXkzTnlydXFhQVp4VTBPMHpHQWQ4UFdjdHNXeDlITHlrU1hNby1QVlVNNkpmZERCaWFtcXk5bGQ0WTRfdzlscEdVWEMyaUFwLXdsWktaSHdrbG1KR3MiLCJhbGciOiJSUzI1NiIsImRxIjoiVENBcV9DMlJuX0RhakRlcUU2aUIzWWVWNVNtMHBMQk1Tbm10OHNENEp3ZVo4YWgzcGhrTFVxUm9qVGw1SDNhYXVtWl9UUmxiaWVNSVFnWDh4UUFnZ1l2YkNYeG9oZEx0aGt3ckZZdlp0WjBEeHJDYm9Md1hjc0Y3Ukwyejl4LWMwSFBGVFAzLVREQWF6UWlBNVVtRmNwYnAzeDYzWGFLSWFuYnVFc0NiSDdFIiwibiI6Imh5Sks4WnE2Wk8tRjFSSklVWVNCdUpfeG9RWkNNV1EyTVhrSFQ1bVROVVJJZmVWWWpCNWMwMzI0Uk5nc3ZPMEtXX0hUejRRSnptLV9rU1VaZ0h1Z2JoR0F3a1Vqc1lwTlJJRTBvLVNtdEExMlMxZHVCZWx6ajg2LVFrZkFzeFlwblNnSzl5OXpTS1B0YVlzMS1EcEVIb0hVdk9BSDJlNktFTXRaYUZPM0J0Yk9WUURXMENMYi1FY0UyaDBQRlFMMUp3NU8zeDhHcXBZeUFhamNoWnptcWlFbjBaSEd1QTNZZ1NyNGxQV1lkTzBNWHZmRFdyaFBTcnVTS3FodzBHMTlBRUpHOFhoek9xTWxLTUFIbW5ybk9XOHM2cWR2Sy1UQ1BiVGJJOU5XUWdFd2JpUFBBdlU0MUFITzZmTEYxUHZzQ3FhNjZTSGdYMkJzS3pvNVhORjhodyJ9" + "ClientId": "", + "Scope": "", + "EncodedJwk": "" + }, + "Ed25519Keys": { + "Primary": { + "Kid": "", + "PublicComponent": "" + } } } -} +} From 748f2bdcdad04253e93db8516ec261237d4749c0 Mon Sep 17 00:00:00 2001 From: Amund Myrbostad Date: Thu, 30 Jan 2025 10:32:37 +0100 Subject: [PATCH 113/169] Removed Token --- .../Program.cs | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/src/Digdir.Library.Dialogporten.WebApiClient.Sample/Program.cs b/src/Digdir.Library.Dialogporten.WebApiClient.Sample/Program.cs index 57a910fa3..d18586150 100644 --- a/src/Digdir.Library.Dialogporten.WebApiClient.Sample/Program.cs +++ b/src/Digdir.Library.Dialogporten.WebApiClient.Sample/Program.cs @@ -24,16 +24,16 @@ var dialogportenClient = serviceProvider.GetRequiredService(); -var verifier = serviceProvider.GetRequiredService(); +// var verifier = serviceProvider.GetRequiredService(); // 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]); +// var token = +// ""; +// Console.WriteLine(verifier.Verify(token)); +// var dict = DialogTokenVerifier.GetDialogTokenClaims(token); +// Console.WriteLine(dict); +// Console.WriteLine(dict[DialogTokenClaimTypes.Actions]); Console.WriteLine("== Start Create Dialog =="); From 855fdf230b5c7cf2f6410363030fe2fd4e65c18b Mon Sep 17 00:00:00 2001 From: Amund Myrbostad Date: Mon, 3 Feb 2025 08:46:47 +0100 Subject: [PATCH 114/169] Updated Refitter.SourceGenerator to 1.5.2 --- .../Digdir.Library.Dialogporten.WebApiClient.csproj | 2 +- .../Features/V1/RefitterInterface.cs | 2 +- 2 files changed, 2 insertions(+), 2 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 22410ce52..05a4406e1 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 @@ - + all runtime; build; native; contentfiles; analyzers; buildtransitive diff --git a/src/Digdir.Library.Dialogporten.WebApiClient/Features/V1/RefitterInterface.cs b/src/Digdir.Library.Dialogporten.WebApiClient/Features/V1/RefitterInterface.cs index 429edef02..9fbed59ff 100644 --- a/src/Digdir.Library.Dialogporten.WebApiClient/Features/V1/RefitterInterface.cs +++ b/src/Digdir.Library.Dialogporten.WebApiClient/Features/V1/RefitterInterface.cs @@ -162,7 +162,7 @@ public V1ServiceOwnerDialogActivitiesNotificationConditionNotificationConditionQ } /// Gets a list of dialog transmissions - [System.CodeDom.Compiler.GeneratedCode("Refitter", "1.5.0.0")] + [System.CodeDom.Compiler.GeneratedCode("Refitter", "1.5.2.0")] public partial interface IServiceownerApi { /// Gets a list of dialog transmissions From d5096b9945a07d11922f56bf32e85c3fcce737cd Mon Sep 17 00:00:00 2001 From: Amund Myrbostad Date: Mon, 3 Feb 2025 08:48:20 +0100 Subject: [PATCH 115/169] Merged Main into branch --- .../Features/V1/RefitterInterface.cs | 28 +++++++++++-------- 1 file changed, 17 insertions(+), 11 deletions(-) diff --git a/src/Digdir.Library.Dialogporten.WebApiClient/Features/V1/RefitterInterface.cs b/src/Digdir.Library.Dialogporten.WebApiClient/Features/V1/RefitterInterface.cs index 9fbed59ff..7a43e31be 100644 --- a/src/Digdir.Library.Dialogporten.WebApiClient/Features/V1/RefitterInterface.cs +++ b/src/Digdir.Library.Dialogporten.WebApiClient/Features/V1/RefitterInterface.cs @@ -223,7 +223,7 @@ public partial interface IServiceownerApi /// /// /// 400 - /// Validation error occured. See problem details for a list of errors. + /// Validation error occurred. See problem details for a list of errors. /// /// /// 401 @@ -247,7 +247,7 @@ public partial interface IServiceownerApi /// /// /// 422 - /// Domain error occured. See problem details for a list of errors. + /// Domain error occurred. See problem details for a list of errors. /// /// /// @@ -379,7 +379,7 @@ public partial interface IServiceownerApi /// /// /// 400 - /// Validation error occured. See problem details for a list of errors. + /// Validation error occurred. See problem details for a list of errors. /// /// /// 401 @@ -403,7 +403,7 @@ public partial interface IServiceownerApi /// /// /// 422 - /// Domain error occured. See problem details for a list of errors. + /// Domain error occurred. See problem details for a list of errors. /// /// /// @@ -469,7 +469,7 @@ public partial interface IServiceownerApi /// /// /// 400 - /// Validation error occured. See problem details for a list of errors. + /// Validation error occurred. See problem details for a list of errors. /// /// /// 401 @@ -517,7 +517,7 @@ public partial interface IServiceownerApi /// /// /// 400 - /// Validation error occured. See problem details for a list of errors. + /// Validation error occurred. See problem details for a list of errors. /// /// /// 401 @@ -537,7 +537,7 @@ public partial interface IServiceownerApi /// /// /// 422 - /// Domain error occured. See problem details for a list of errors. + /// Domain error occurred. See problem details for a list of errors. /// /// /// @@ -598,7 +598,7 @@ public partial interface IServiceownerApi /// /// /// 400 - /// Validation error occured. See problem details for a list of errors. + /// Validation error occurred. See problem details for a list of errors. /// /// /// 401 @@ -610,7 +610,7 @@ public partial interface IServiceownerApi /// /// /// 422 - /// Domain error occured. See problem details for a list of errors. + /// Domain error occurred. See problem details for a list of errors. /// /// /// @@ -707,7 +707,7 @@ public partial interface IServiceownerApi /// /// /// 400 - /// Validation error occured. See problem details for a list of errors. + /// Validation error occurred. See problem details for a list of errors. /// /// /// 401 @@ -731,7 +731,7 @@ public partial interface IServiceownerApi /// /// /// 422 - /// Domain error occured. See problem details for a list of errors. + /// Domain error occurred. See problem details for a list of errors. /// /// /// @@ -2184,6 +2184,12 @@ public enum DialogsEntitiesActivities_DialogActivityType [System.Runtime.Serialization.EnumMember(Value = @"SentToPayment")] SentToPayment = 12, + [System.Runtime.Serialization.EnumMember(Value = @"FormSubmitted")] + FormSubmitted = 13, + + [System.Runtime.Serialization.EnumMember(Value = @"FormSaved")] + FormSaved = 14, + } [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "14.2.0.0 (NJsonSchema v11.1.0.0 (Newtonsoft.Json v13.0.0.0))")] From 4f9928be74ae7ec3f43561047fa29d4156110d65 Mon Sep 17 00:00:00 2001 From: Amund Myrbostad Date: Mon, 3 Feb 2025 15:06:21 +0100 Subject: [PATCH 116/169] Code review --- .github/workflows/ci-cd-main.yml | 8 +--- .github/workflows/ci-cd-pull-request.yml | 8 +--- .github/workflows/ci-cd-staging.yml | 3 +- .github/workflows/workflow-build-and-test.yml | 18 -------- .github/workflows/workflow-publish-nuget.yml | 28 +++---------- .../Digdir.Domain.Dialogporten.WebApi.csproj | 1 - ...ry.Dialogporten.WebApiClient.Sample.csproj | 2 - .../AssemblyMarker.cs | 9 ++++ .../Config/DialogportenSettings.cs | 4 +- .../Config/MaskinportenSettings.cs | 3 -- ...r.Library.Dialogporten.WebApiClient.csproj | 2 - .../Extensions/ServiceCollectionExtensions.cs | 24 ++++++++++- .../.refitter | 18 -------- ...rten.WebApiClient.Integration.Tests.csproj | 42 ------------------- 14 files changed, 44 insertions(+), 126 deletions(-) create mode 100644 src/Digdir.Library.Dialogporten.WebApiClient/AssemblyMarker.cs delete mode 100644 src/Digdir.Library.Dialogporten.WebApiClient/Config/MaskinportenSettings.cs delete mode 100644 tests/Digdir.Library.Dialogporten.WebApiClient.Integration.Tests/.refitter delete mode 100644 tests/Digdir.Library.Dialogporten.WebApiClient.Integration.Tests/Digdir.Library.Dialogporten.WebApiClient.Integration.Tests.csproj diff --git a/.github/workflows/ci-cd-main.yml b/.github/workflows/ci-cd-main.yml index 02c45ce69..99fa85b1a 100644 --- a/.github/workflows/ci-cd-main.yml +++ b/.github/workflows/ci-cd-main.yml @@ -32,12 +32,6 @@ jobs: uses: ./.github/workflows/workflow-build-and-test.yml needs: [check-for-changes] if: ${{ github.event_name == 'workflow_dispatch' || needs.check-for-changes.outputs.hasBackendChanges == 'true' || needs.check-for-changes.outputs.hasTestChanges == 'true' }} - secrets: - DIALOGPORTEN_MASKINPORTEN_ENCODEDJWK: ${{ secrets.DIALOGPORTEN_MASKINPORTEN_ENCODEDJWK }} - DIALOGPORTEN_MASKINPORTEN_CLIENTID: ${{ secrets.DIALOGPORTEN_MASKINPORTEN_CLIENTID }} - DIALOGPORTEN_MASKINPORTEN_SCOPE: ${{ secrets.DIALOGPORTEN_MASKINPORTEN_SCOPE }} - ED25519KEYS_PRIMARY_KID: ${{ secrets.ED25519KEYS_PRIMARY_KID }} - ED25519KEYS_PRIMARY_PUBLICCOMPONENT: ${{ secrets.ED25519KEYS_PRIMARY_PUBLICCOMPONENT }} publish: name: Build and publish docker images @@ -107,7 +101,7 @@ jobs: 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.hasSchemaChanges == 'true' }} + if: ${{ needs.check-for-changes.outputs.hasSchemaChanges == '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) diff --git a/.github/workflows/ci-cd-pull-request.yml b/.github/workflows/ci-cd-pull-request.yml index 4a59a3104..96b6e0b71 100644 --- a/.github/workflows/ci-cd-pull-request.yml +++ b/.github/workflows/ci-cd-pull-request.yml @@ -23,13 +23,7 @@ jobs: 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' }} - secrets: - DIALOGPORTEN_MASKINPORTEN_ENCODEDJWK: ${{ secrets.DIALOGPORTEN_MASKINPORTEN_ENCODEDJWK }} - DIALOGPORTEN_MASKINPORTEN_CLIENTID: ${{ secrets.DIALOGPORTEN_MASKINPORTEN_CLIENTID }} - DIALOGPORTEN_MASKINPORTEN_SCOPE: ${{ secrets.DIALOGPORTEN_MASKINPORTEN_SCOPE }} - ED25519KEYS_PRIMARY_KID: ${{ secrets.ED25519KEYS_PRIMARY_KID }} - ED25519KEYS_PRIMARY_PUBLICCOMPONENT: ${{ secrets.ED25519KEYS_PRIMARY_PUBLICCOMPONENT }} - + build-infrastructure: uses: ./.github/workflows/workflow-build-infrastructure.yml needs: [ check-for-changes ] diff --git a/.github/workflows/ci-cd-staging.yml b/.github/workflows/ci-cd-staging.yml index 172d59524..8e396220c 100644 --- a/.github/workflows/ci-cd-staging.yml +++ b/.github/workflows/ci-cd-staging.yml @@ -89,7 +89,8 @@ jobs: 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) + path: 'src/Digdir.Library.Dialogporten.WebApiClient/Digdir.Library.Dialogporten.WebApiClient.csproj' + source: 'https://api.nuget.org/v3/index.json' secrets: NUGET_API_KEY: ${{ secrets.NUGET_API_TEST_KEY }} diff --git a/.github/workflows/workflow-build-and-test.yml b/.github/workflows/workflow-build-and-test.yml index 7881995c5..93f63b2da 100644 --- a/.github/workflows/workflow-build-and-test.yml +++ b/.github/workflows/workflow-build-and-test.yml @@ -3,17 +3,6 @@ name: Build and test .NET on: workflow_dispatch: workflow_call: - secrets: - DIALOGPORTEN_MASKINPORTEN_ENCODEDJWK: - required: true - DIALOGPORTEN_MASKINPORTEN_CLIENTID: - required: true - DIALOGPORTEN_MASKINPORTEN_SCOPE: - required: true - ED25519KEYS_PRIMARY_KID: - required: true - ED25519KEYS_PRIMARY_PUBLICCOMPONENT: - required: true jobs: build-and-test: @@ -34,11 +23,4 @@ jobs: run: dotnet build --no-restore --configuration Release - name: Test - env: - DialogportenSettings:Environment: "test" - DialogportenSettings:Maskinporten:ClientId: ${{secrets.DIALOGPORTEN_MASKINPORTEN_CLIENTID}} - DialogportenSettings:Maskinporten:Scope: ${{secrets.DIALOGPORTEN_MASKINPORTEN_SCOPE}} - DialogportenSettings:Maskinporten:EncodedJwk: ${{secrets.DIALOGPORTEN_MASKINPORTEN_ENCODEDJWK}} - Ed25519Keys:Primary:Kid: "${{secrets.ED25519KEYS_PRIMARY_KID}}" - Ed25519Keys:Primary:PublicComponent: "${{secrets.ED25519KEYS_PRIMARY_PUBLICCOMPONENT}}" run: dotnet test --no-build --configuration Release diff --git a/.github/workflows/workflow-publish-nuget.yml b/.github/workflows/workflow-publish-nuget.yml index 0b5304c1a..c0e401725 100644 --- a/.github/workflows/workflow-publish-nuget.yml +++ b/.github/workflows/workflow-publish-nuget.yml @@ -13,50 +13,32 @@ on: type: string source: description: "Nuget Source" - required: false + required: true type: string - default: https://int.nugettest.org secrets: NUGET_API_KEY: required: true jobs: - build: + build-and-push: runs-on: ubuntu-latest timeout-minutes: 15 steps: - name: Checkout uses: actions/checkout@v4 - - name: set PROJECT variable to point to project - run: | - PROJECT="${{inputs.path}}" - 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="${{ 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}" + 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 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 + + - name: Push to NuGet run: dotnet nuget push *.nupkg --source "${{ inputs.source }}" --api-key ${{secrets.NUGET_API_KEY}} - diff --git a/src/Digdir.Domain.Dialogporten.WebApi/Digdir.Domain.Dialogporten.WebApi.csproj b/src/Digdir.Domain.Dialogporten.WebApi/Digdir.Domain.Dialogporten.WebApi.csproj index f01645552..5eb987095 100644 --- a/src/Digdir.Domain.Dialogporten.WebApi/Digdir.Domain.Dialogporten.WebApi.csproj +++ b/src/Digdir.Domain.Dialogporten.WebApi/Digdir.Domain.Dialogporten.WebApi.csproj @@ -12,7 +12,6 @@ - all runtime; build; native; contentfiles; analyzers; buildtransitive 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 6f78501ed..65157054f 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 @@ -2,8 +2,6 @@ Exe - enable - enable diff --git a/src/Digdir.Library.Dialogporten.WebApiClient/AssemblyMarker.cs b/src/Digdir.Library.Dialogporten.WebApiClient/AssemblyMarker.cs new file mode 100644 index 000000000..060ac1ce2 --- /dev/null +++ b/src/Digdir.Library.Dialogporten.WebApiClient/AssemblyMarker.cs @@ -0,0 +1,9 @@ +using System.Reflection; + +namespace Digdir.Library.Dialogporten.WebApiClient; + +internal sealed class AssemblyMarker +{ + + public static readonly Assembly Assembly = typeof(AssemblyMarker).Assembly; +} diff --git a/src/Digdir.Library.Dialogporten.WebApiClient/Config/DialogportenSettings.cs b/src/Digdir.Library.Dialogporten.WebApiClient/Config/DialogportenSettings.cs index b9ebd64bc..c1bcefa31 100644 --- a/src/Digdir.Library.Dialogporten.WebApiClient/Config/DialogportenSettings.cs +++ b/src/Digdir.Library.Dialogporten.WebApiClient/Config/DialogportenSettings.cs @@ -1,8 +1,10 @@ +using Altinn.ApiClients.Maskinporten.Config; + namespace Digdir.Library.Dialogporten.WebApiClient.Config; public class DialogportenSettings { - public string Environment { get; set; } = null!; + public string BaseUri { get; set; } = null!; public MaskinportenSettings Maskinporten { get; set; } = null!; } diff --git a/src/Digdir.Library.Dialogporten.WebApiClient/Config/MaskinportenSettings.cs b/src/Digdir.Library.Dialogporten.WebApiClient/Config/MaskinportenSettings.cs deleted file mode 100644 index 1fdc74983..000000000 --- a/src/Digdir.Library.Dialogporten.WebApiClient/Config/MaskinportenSettings.cs +++ /dev/null @@ -1,3 +0,0 @@ -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 index 05a4406e1..bc4dd104f 100644 --- a/src/Digdir.Library.Dialogporten.WebApiClient/Digdir.Library.Dialogporten.WebApiClient.csproj +++ b/src/Digdir.Library.Dialogporten.WebApiClient/Digdir.Library.Dialogporten.WebApiClient.csproj @@ -1,8 +1,6 @@  - enable - enable README.md LICENSE Digitaliseringsdirektoratet diff --git a/src/Digdir.Library.Dialogporten.WebApiClient/Extensions/ServiceCollectionExtensions.cs b/src/Digdir.Library.Dialogporten.WebApiClient/Extensions/ServiceCollectionExtensions.cs index 56968e5fe..50c954a95 100644 --- a/src/Digdir.Library.Dialogporten.WebApiClient/Extensions/ServiceCollectionExtensions.cs +++ b/src/Digdir.Library.Dialogporten.WebApiClient/Extensions/ServiceCollectionExtensions.cs @@ -1,4 +1,5 @@ using System.Buffers.Text; +using System.CodeDom.Compiler; using System.Reflection; using Altinn.ApiClients.Maskinporten.Extensions; using Altinn.ApiClients.Maskinporten.Services; @@ -62,7 +63,8 @@ public static IServiceCollection AddDialogportenClient(this IServiceCollection s var refitClients = Assembly.GetExecutingAssembly().GetTypes() .Where(x => x.Namespace!.StartsWith("Digdir.Library.Dialogporten.WebApiClient.Features.V1", StringComparison.InvariantCulture) && - x.IsInterface) + x.IsInterface && + x.GetCustomAttribute()?.Tool == "Refitter") .ToList(); foreach (var refitClient in refitClients) @@ -76,6 +78,26 @@ public static IServiceCollection AddDialogportenClient(this IServiceCollection s .AddMaskinportenHttpMessageHandler("dialogporten-sp-sdk"); } + return services; + } + + public static IServiceCollection AddDialogportenClient(this IServiceCollection services, Action configureOptions) + { + var dialogportenSettings = new DialogportenSettings(); + configureOptions.Invoke(dialogportenSettings); + services.ConfigureOptions(dialogportenSettings); + + services.RegisterMaskinportenClientDefinition("dialogporten-sp-sdk", dialogportenSettings.Maskinporten); + + var refitClients = AssemblyMarker.Assembly.GetTypes() + .Where(x => + x.Namespace!.StartsWith("Digdir.Library.Dialogporten.WebApiClient.Features.V1", StringComparison.InvariantCulture) && + x.IsInterface && + x.GetCustomAttribute()?.Tool == "Refitter") + .ToList(); + + + return services; } } diff --git a/tests/Digdir.Library.Dialogporten.WebApiClient.Integration.Tests/.refitter b/tests/Digdir.Library.Dialogporten.WebApiClient.Integration.Tests/.refitter deleted file mode 100644 index 700fb94a8..000000000 --- a/tests/Digdir.Library.Dialogporten.WebApiClient.Integration.Tests/.refitter +++ /dev/null @@ -1,18 +0,0 @@ -{ - "openApiPath": "../../docs/schema/V1/swagger.verified.json", - "namespace": "Digdir.Library.Dialogporten.WebApiClient.Features.V1", - "outputFolder": "refitter", - "operationNameGenerator": "SingleClientFromOperationId", - "trimUnusedSchema": true, - "multipleInterfaces": "ByTag", - "includeTags": [ - "Serviceowner" - ], - "useCancellationTokens": true, - "returnIApiResponse": true, - "useDynamicQuerystringParameters": true, - "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 deleted file mode 100644 index 7233bdbeb..000000000 --- a/tests/Digdir.Library.Dialogporten.WebApiClient.Integration.Tests/Digdir.Library.Dialogporten.WebApiClient.Integration.Tests.csproj +++ /dev/null @@ -1,42 +0,0 @@ - - - - net9.0 - enable - enable - false - - - - - - - - - - - all - runtime; build; native; contentfiles; analyzers; buildtransitive - - - - - - - - - - - - - - - - - - - - - - - From 9d90fc8a38a7b817bd9c17755d77f40205fa1c54 Mon Sep 17 00:00:00 2001 From: Amund Myrbostad Date: Thu, 6 Feb 2025 13:55:16 +0100 Subject: [PATCH 117/169] PR stuff --- .../Dialogs.cs | 3 +- .../Program.cs | 18 ++-- .../.refitter | 2 +- .../AssemblyMarker.cs | 3 +- .../Config/DialogportenSettings.cs | 9 +- ...r.Library.Dialogporten.WebApiClient.csproj | 3 + .../Extensions/ServiceCollectionExtensions.cs | 83 ++++------------- .../Features/V1/RefitterInterface.cs | 4 +- .../Services/DialogTokenVerifier.cs | 90 +++++++++++++------ 9 files changed, 99 insertions(+), 116 deletions(-) diff --git a/src/Digdir.Library.Dialogporten.WebApiClient.Sample/Dialogs.cs b/src/Digdir.Library.Dialogporten.WebApiClient.Sample/Dialogs.cs index cc800c16b..203ed4ef9 100644 --- a/src/Digdir.Library.Dialogporten.WebApiClient.Sample/Dialogs.cs +++ b/src/Digdir.Library.Dialogporten.WebApiClient.Sample/Dialogs.cs @@ -1,5 +1,4 @@ -using Digdir.Library.Dialogporten.WebApiClient.Features.V1; -using Refit; +using Altinn.ApiClients.Dialogporten.Features.V1; namespace Digdir.Library.Dialogporten.WebApiClient.Sample; diff --git a/src/Digdir.Library.Dialogporten.WebApiClient.Sample/Program.cs b/src/Digdir.Library.Dialogporten.WebApiClient.Sample/Program.cs index d18586150..494fa2199 100644 --- a/src/Digdir.Library.Dialogporten.WebApiClient.Sample/Program.cs +++ b/src/Digdir.Library.Dialogporten.WebApiClient.Sample/Program.cs @@ -1,8 +1,8 @@ using System.Diagnostics; -using Digdir.Library.Dialogporten.WebApiClient.Extensions; -using Digdir.Library.Dialogporten.WebApiClient.Features.V1; +using Altinn.ApiClients.Dialogporten.Config; +using Altinn.ApiClients.Dialogporten.Extensions; +using Altinn.ApiClients.Dialogporten.Features.V1; using Digdir.Library.Dialogporten.WebApiClient.Sample; -using Digdir.Library.Dialogporten.WebApiClient.Services; using Microsoft.Extensions.Configuration; using Microsoft.Extensions.DependencyInjection; @@ -14,10 +14,8 @@ var services = new ServiceCollection(); services.AddSingleton(configuration); - -services.AddDialogportenClient(); -services.AddDialogTokenVerifer(); - +var settings = configuration.GetSection("DialogportenSettings").Get()!; +services.AddDialogportenClient(settings); var serviceProvider = services.BuildServiceProvider(); var now = DateTime.UtcNow; @@ -102,12 +100,6 @@ Dialogs.PrintGetDialog(dialog); Console.WriteLine("==End Get Single Dialog=="); - -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 dialogportenClient.V1ServiceOwnerDialogsPurgePurgeDialog(guid, dialog.Revision); Console.WriteLine($"Purge response status code: {response.StatusCode}"); diff --git a/src/Digdir.Library.Dialogporten.WebApiClient/.refitter b/src/Digdir.Library.Dialogporten.WebApiClient/.refitter index 8dc18a8ed..097e97970 100644 --- a/src/Digdir.Library.Dialogporten.WebApiClient/.refitter +++ b/src/Digdir.Library.Dialogporten.WebApiClient/.refitter @@ -1,6 +1,6 @@ { "openApiPath": "../Digdir.Domain.Dialogporten.WebApi/bin/Release/net9.0/swagger.json", - "namespace": "Digdir.Library.Dialogporten.WebApiClient.Features.V1", + "namespace": "Altinn.ApiClients.Dialogporten.Features.V1", "outputFolder": "Features/V1", "operationNameGenerator": "SingleClientFromOperationId", "trimUnusedSchema": true, diff --git a/src/Digdir.Library.Dialogporten.WebApiClient/AssemblyMarker.cs b/src/Digdir.Library.Dialogporten.WebApiClient/AssemblyMarker.cs index 060ac1ce2..fa23cf0eb 100644 --- a/src/Digdir.Library.Dialogporten.WebApiClient/AssemblyMarker.cs +++ b/src/Digdir.Library.Dialogporten.WebApiClient/AssemblyMarker.cs @@ -1,9 +1,8 @@ using System.Reflection; -namespace Digdir.Library.Dialogporten.WebApiClient; +namespace Altinn.ApiClients.Dialogporten; internal sealed class AssemblyMarker { - public static readonly Assembly Assembly = typeof(AssemblyMarker).Assembly; } diff --git a/src/Digdir.Library.Dialogporten.WebApiClient/Config/DialogportenSettings.cs b/src/Digdir.Library.Dialogporten.WebApiClient/Config/DialogportenSettings.cs index c1bcefa31..e3c5c4085 100644 --- a/src/Digdir.Library.Dialogporten.WebApiClient/Config/DialogportenSettings.cs +++ b/src/Digdir.Library.Dialogporten.WebApiClient/Config/DialogportenSettings.cs @@ -1,11 +1,18 @@ using Altinn.ApiClients.Maskinporten.Config; -namespace Digdir.Library.Dialogporten.WebApiClient.Config; +namespace Altinn.ApiClients.Dialogporten.Config; public class DialogportenSettings { public string BaseUri { get; set; } = null!; public MaskinportenSettings Maskinporten { get; set; } = null!; + public Ed25519Keys Ed25519Keys { get; set; } = null!; +#pragma warning disable CA1822 // Mark members as static + internal bool Validate() + { + return true; + } +#pragma warning restore CA1822 // Mark members as static } public record Ed25519Keys 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 bc4dd104f..f286a0f69 100644 --- a/src/Digdir.Library.Dialogporten.WebApiClient/Digdir.Library.Dialogporten.WebApiClient.csproj +++ b/src/Digdir.Library.Dialogporten.WebApiClient/Digdir.Library.Dialogporten.WebApiClient.csproj @@ -7,6 +7,9 @@ digdir;altinn;dialogporten git https://github.com/altinn/dialogporten + Altinn.ApiClients.Dialogporten + Altinn.ApiClients.Dialogporten + Altinn.ApiClients.Dialogporten diff --git a/src/Digdir.Library.Dialogporten.WebApiClient/Extensions/ServiceCollectionExtensions.cs b/src/Digdir.Library.Dialogporten.WebApiClient/Extensions/ServiceCollectionExtensions.cs index 50c954a95..6d849cfc3 100644 --- a/src/Digdir.Library.Dialogporten.WebApiClient/Extensions/ServiceCollectionExtensions.cs +++ b/src/Digdir.Library.Dialogporten.WebApiClient/Extensions/ServiceCollectionExtensions.cs @@ -1,68 +1,30 @@ -using System.Buffers.Text; using System.CodeDom.Compiler; using System.Reflection; +using Altinn.ApiClients.Dialogporten.Config; +using Altinn.ApiClients.Dialogporten.Services; 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 Microsoft.Extensions.DependencyInjection.Extensions; +using Microsoft.Extensions.Options; using Refit; -using MaskinportenSettings = Altinn.ApiClients.Maskinporten.Config.MaskinportenSettings; -namespace Digdir.Library.Dialogporten.WebApiClient.Extensions; +namespace Altinn.ApiClients.Dialogporten.Extensions; public static class ServiceCollectionExtensions { - - public static IServiceCollection AddDialogTokenVerifer(this IServiceCollection services) - { - var provider = services.BuildServiceProvider(); - var dialogportenSettings = provider.GetRequiredService() - .GetSection("Ed25519Keys") - .Get(); - - var keyPair = dialogportenSettings!.Primary; - var kid = keyPair.Kid; - var publicKey = PublicKey.Import(SignatureAlgorithm.Ed25519, - Base64Url.DecodeFromChars(keyPair.PublicComponent), KeyBlobFormat.RawPublicKey); - services.AddSingleton(new DialogTokenVerifier(kid, publicKey)); - return services; - } - public static IServiceCollection AddDialogportenClient(this IServiceCollection services) + public static IServiceCollection AddDialogportenClient(this IServiceCollection services, DialogportenSettings settings) { - var provider = services.BuildServiceProvider(); - var dialogportenSettings = provider.GetRequiredService() - .GetSection("DialogportenSettings") - .Get(); - - var maskinportenSettings = new MaskinportenSettings() + if (!settings.Validate()) { - EncodedJwk = dialogportenSettings!.Maskinporten.EncodedJwk, - ClientId = dialogportenSettings.Maskinporten.ClientId, - Environment = dialogportenSettings.Environment switch - { - "prod" => "prod", - "local" => "test", - "test" => "test", - _ => throw new ArgumentException() - }, - Scope = dialogportenSettings.Maskinporten.Scope - }; + throw new InvalidOperationException("Invalid configuration"); + } + services.TryAddSingleton>(new OptionsWrapper(settings)); - services.RegisterMaskinportenClientDefinition("dialogporten-sp-sdk", maskinportenSettings); + services.RegisterMaskinportenClientDefinition("dialogporten-sp-sdk", settings.Maskinporten); - var baseAddress = dialogportenSettings.Environment switch - { - "test" => "https://platform.tt02.altinn.no/dialogporten", - "local" => "https://localhost:7214", - "prod" => "https://platform.altinn.no/dialogporten", - _ => throw new NotImplementedException() - }; - var refitClients = Assembly.GetExecutingAssembly().GetTypes() + var refitClients = AssemblyMarker.Assembly.GetTypes() .Where(x => - x.Namespace!.StartsWith("Digdir.Library.Dialogporten.WebApiClient.Features.V1", StringComparison.InvariantCulture) && x.IsInterface && x.GetCustomAttribute()?.Tool == "Refitter") .ToList(); @@ -71,13 +33,11 @@ public static IServiceCollection AddDialogportenClient(this IServiceCollection s { services .AddRefitClient(refitClient) - .ConfigureHttpClient(c => - { - c.BaseAddress = new Uri(baseAddress); - }) + .ConfigureHttpClient(c => c.BaseAddress = new Uri(settings.BaseUri)) .AddMaskinportenHttpMessageHandler("dialogporten-sp-sdk"); } + services.TryAddSingleton(); return services; } @@ -85,19 +45,6 @@ public static IServiceCollection AddDialogportenClient(this IServiceCollection s { var dialogportenSettings = new DialogportenSettings(); configureOptions.Invoke(dialogportenSettings); - services.ConfigureOptions(dialogportenSettings); - - services.RegisterMaskinportenClientDefinition("dialogporten-sp-sdk", dialogportenSettings.Maskinporten); - - var refitClients = AssemblyMarker.Assembly.GetTypes() - .Where(x => - x.Namespace!.StartsWith("Digdir.Library.Dialogporten.WebApiClient.Features.V1", StringComparison.InvariantCulture) && - x.IsInterface && - x.GetCustomAttribute()?.Tool == "Refitter") - .ToList(); - - - - return services; + return services.AddDialogportenClient(dialogportenSettings); } } diff --git a/src/Digdir.Library.Dialogporten.WebApiClient/Features/V1/RefitterInterface.cs b/src/Digdir.Library.Dialogporten.WebApiClient/Features/V1/RefitterInterface.cs index 7a43e31be..5bafc0622 100644 --- a/src/Digdir.Library.Dialogporten.WebApiClient/Features/V1/RefitterInterface.cs +++ b/src/Digdir.Library.Dialogporten.WebApiClient/Features/V1/RefitterInterface.cs @@ -11,7 +11,7 @@ #nullable enable annotations -namespace Digdir.Library.Dialogporten.WebApiClient.Features.V1 +namespace Altinn.ApiClients.Dialogporten.Features.V1 { public class V1ServiceOwnerDialogsSearchSearchDialogQueryParams { @@ -825,7 +825,7 @@ public partial interface IServiceownerApi #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 +namespace Altinn.ApiClients.Dialogporten.Features.V1 { using System = global::System; diff --git a/src/Digdir.Library.Dialogporten.WebApiClient/Services/DialogTokenVerifier.cs b/src/Digdir.Library.Dialogporten.WebApiClient/Services/DialogTokenVerifier.cs index 2f03d547d..a22fa6dba 100644 --- a/src/Digdir.Library.Dialogporten.WebApiClient/Services/DialogTokenVerifier.cs +++ b/src/Digdir.Library.Dialogporten.WebApiClient/Services/DialogTokenVerifier.cs @@ -1,60 +1,96 @@ using System.Buffers.Text; using System.Text; using System.Text.Json; +using Altinn.ApiClients.Dialogporten.Config; +using Microsoft.Extensions.Configuration; +using Microsoft.Extensions.Options; using NSec.Cryptography; -namespace Digdir.Library.Dialogporten.WebApiClient.Services; +namespace Altinn.ApiClients.Dialogporten.Services; -public sealed class DialogTokenVerifier(string kid, PublicKey publicKey) +public interface IDialogTokenVerifier { - public bool Verify(string token) + bool Verify(ReadOnlySpan token); +} + +internal sealed class DialogTokenVerifier : IDialogTokenVerifier +{ + private readonly string _kid; + private readonly PublicKey _publicKey; + public DialogTokenVerifier(IOptions options) { - var parts = token.Split('.'); - if (parts.Length != 3) + _kid = options.Value.Ed25519Keys.Primary.Kid; + _publicKey = PublicKey.Import(SignatureAlgorithm.Ed25519, + Base64Url.DecodeFromChars(options.Value.Ed25519Keys.Primary.PublicComponent), KeyBlobFormat.RawPublicKey); + } + public bool Verify(ReadOnlySpan token) + { + var tokenPartEnumerator = token.Split('.'); + if (!tokenPartEnumerator.MoveNext()) + { + return false; + } + + var header = Base64Url.DecodeFromChars(token[tokenPartEnumerator.Current]); + if (!tokenPartEnumerator.MoveNext()) { return false; } - var header = Base64Url.DecodeFromChars(parts[0]); + + var body = Base64Url.DecodeFromChars(token[tokenPartEnumerator.Current]); + if (!tokenPartEnumerator.MoveNext()) + { + return false; + } + + var signature = Base64Url.DecodeFromChars(token[tokenPartEnumerator.Current]); + if (tokenPartEnumerator.MoveNext()) + { + return false; + } + var headerJson = JsonSerializer.Deserialize(header); - if (!headerJson.TryGetProperty("kid", out var value) && value.GetString() != kid) + if (!headerJson.TryGetProperty("kid", out var value) && value.GetString() != _kid) { return false; } - var signature = Base64Url.DecodeFromChars(parts[2]); + var headerAndBody = header + .Append((byte)'.') + .Concat(body) + .ToArray(); - return SignatureAlgorithm.Ed25519.Verify(publicKey, Encoding.UTF8.GetBytes(parts[0] + '.' + parts[1]), signature); + if (!SignatureAlgorithm.Ed25519.Verify(_publicKey, headerAndBody, signature)) + { + return false; + } + var bodyJson = JsonSerializer.Deserialize(body); + + return TryGetExpires(bodyJson, out var expiresOffset) && + expiresOffset >= DateTimeOffset.UtcNow; } - public static Dictionary GetDialogTokenClaims(string token) - { - var claims = new Dictionary(); - var parts = token.Split('.'); - if (parts.Length != 3) + private static bool TryGetExpires(JsonElement bodyJson, out DateTimeOffset expires) + { + expires = default; + if (!bodyJson.TryGetProperty(DialogTokenClaimTypes.Expires, out var expiresElement)) { - throw new ArgumentException("Invalid dialog token"); + return false; } - 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) + if (!expiresElement.TryGetInt32(out var expiresIn)) { - var value = fieldInfo.GetValue(null); - if (value != null && bodyJson.TryGetProperty(value.ToString()!, out var jsonValue)) - { - claims.Add(value.ToString()!, jsonValue); - } + return false; } - return claims; + expires = DateTimeOffset.FromUnixTimeSeconds(expiresIn); + return true; } } -public static class DialogTokenClaimTypes +internal static class DialogTokenClaimTypes { public const string JwtId = "jti"; public const string Issuer = "iss"; From 8e41d4d117e1929aa4fc08fd94485df5c0732eb9 Mon Sep 17 00:00:00 2001 From: Amund Myrbostad Date: Thu, 6 Feb 2025 13:58:14 +0100 Subject: [PATCH 118/169] Removed find --- .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 99fa85b1a..e26c48b61 100644 --- a/.github/workflows/ci-cd-main.yml +++ b/.github/workflows/ci-cd-main.yml @@ -104,7 +104,7 @@ jobs: if: ${{ needs.check-for-changes.outputs.hasSchemaChanges == '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) + path: 'src/Digdir.Library.Dialogporten.WebApiClient.csproj' secrets: NUGET_API_KEY: ${{ secrets.NUGET_API_TEST_KEY }} From 66e7d76c1f70a910580e6cd8ba32d09815783f38 Mon Sep 17 00:00:00 2001 From: Amund Myrbostad Date: Thu, 6 Feb 2025 14:03:23 +0100 Subject: [PATCH 119/169] Source added --- .github/workflows/ci-cd-main.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/ci-cd-main.yml b/.github/workflows/ci-cd-main.yml index e26c48b61..7f4c6244f 100644 --- a/.github/workflows/ci-cd-main.yml +++ b/.github/workflows/ci-cd-main.yml @@ -105,6 +105,7 @@ jobs: with: version: ${{ needs.get-current-version.outputs.version }}-rc.${{ needs.generate-git-short-sha.outputs.gitShortSha }} path: 'src/Digdir.Library.Dialogporten.WebApiClient.csproj' + source: 'https://api.nuget.org/v3/index.json' secrets: NUGET_API_KEY: ${{ secrets.NUGET_API_TEST_KEY }} From ee0369e9df265d499ff370bab04578cfd1cb9701 Mon Sep 17 00:00:00 2001 From: Amund Myrbostad Date: Thu, 6 Feb 2025 14:05:52 +0100 Subject: [PATCH 120/169] Removed test environment from build and test --- .github/workflows/workflow-build-and-test.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/.github/workflows/workflow-build-and-test.yml b/.github/workflows/workflow-build-and-test.yml index 93f63b2da..44f343145 100644 --- a/.github/workflows/workflow-build-and-test.yml +++ b/.github/workflows/workflow-build-and-test.yml @@ -7,7 +7,6 @@ on: jobs: build-and-test: runs-on: ubuntu-latest - environment: test steps: - uses: actions/checkout@v4 From 5862f65e21507fcc249534502f99a0a2f18e56ba Mon Sep 17 00:00:00 2001 From: Amund Myrbostad Date: Thu, 6 Feb 2025 14:08:33 +0100 Subject: [PATCH 121/169] Clean up Sample.cdproj --- .../Digdir.Library.Dialogporten.WebApiClient.Sample.csproj | 3 --- 1 file changed, 3 deletions(-) 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 65157054f..ac0a23411 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 @@ -9,9 +9,6 @@ - - PreserveNewest - PreserveNewest From 92fd82c8bbefd46e59f6526e05d2b9b0a7c99e7f Mon Sep 17 00:00:00 2001 From: Amund Myrbostad Date: Thu, 6 Feb 2025 14:23:42 +0100 Subject: [PATCH 122/169] Clean up --- .../Digdir.Library.Dialogporten.WebApiClient.Sample.csproj | 4 ++++ .../Config/DialogportenSettings.cs | 6 +++--- .../Digdir.Library.Dialogporten.WebApiClient.csproj | 2 -- 3 files changed, 7 insertions(+), 5 deletions(-) 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 ac0a23411..703792c15 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,4 +14,8 @@ + + + + diff --git a/src/Digdir.Library.Dialogporten.WebApiClient/Config/DialogportenSettings.cs b/src/Digdir.Library.Dialogporten.WebApiClient/Config/DialogportenSettings.cs index e3c5c4085..d2460826e 100644 --- a/src/Digdir.Library.Dialogporten.WebApiClient/Config/DialogportenSettings.cs +++ b/src/Digdir.Library.Dialogporten.WebApiClient/Config/DialogportenSettings.cs @@ -2,7 +2,7 @@ namespace Altinn.ApiClients.Dialogporten.Config; -public class DialogportenSettings +public sealed class DialogportenSettings { public string BaseUri { get; set; } = null!; public MaskinportenSettings Maskinporten { get; set; } = null!; @@ -15,13 +15,13 @@ internal bool Validate() #pragma warning restore CA1822 // Mark members as static } -public record Ed25519Keys +public sealed record Ed25519Keys { public Ed25519Key Primary { get; set; } = null!; public Ed25519Key Secondary { get; set; } = null!; } -public record Ed25519Key +public sealed record Ed25519Key { public string Kid { get; set; } = null!; public string PublicComponent { get; set; } = null!; 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 f286a0f69..7d316fc7f 100644 --- a/src/Digdir.Library.Dialogporten.WebApiClient/Digdir.Library.Dialogporten.WebApiClient.csproj +++ b/src/Digdir.Library.Dialogporten.WebApiClient/Digdir.Library.Dialogporten.WebApiClient.csproj @@ -22,8 +22,6 @@ - - From 9b9014cb995650e11e178612357cf9be1468d8b7 Mon Sep 17 00:00:00 2001 From: Amund Myrbostad Date: Thu, 6 Feb 2025 14:31:03 +0100 Subject: [PATCH 123/169] PR --- .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 8e396220c..90e03151f 100644 --- a/.github/workflows/ci-cd-staging.yml +++ b/.github/workflows/ci-cd-staging.yml @@ -86,7 +86,7 @@ jobs: 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' }} + if: ${{ needs.check-for-changes.outputs.hasSchemaChanges == 'true' }} with: version: ${{ needs.get-current-version.outputs.version }} path: 'src/Digdir.Library.Dialogporten.WebApiClient/Digdir.Library.Dialogporten.WebApiClient.csproj' From bb34c4a6e1f8c589478198d4ad624679b8f97929 Mon Sep 17 00:00:00 2001 From: Amund Myrbostad Date: Thu, 6 Feb 2025 15:08:20 +0100 Subject: [PATCH 124/169] Clean up --- .../Features/V1/SwaggerSnapshotTests.cs | 3 +++ 1 file changed, 3 insertions(+) diff --git a/tests/Digdir.Domain.Dialogporten.WebApi.Unit.Tests/Features/V1/SwaggerSnapshotTests.cs b/tests/Digdir.Domain.Dialogporten.WebApi.Unit.Tests/Features/V1/SwaggerSnapshotTests.cs index 0bed8186c..22cb3da75 100644 --- a/tests/Digdir.Domain.Dialogporten.WebApi.Unit.Tests/Features/V1/SwaggerSnapshotTests.cs +++ b/tests/Digdir.Domain.Dialogporten.WebApi.Unit.Tests/Features/V1/SwaggerSnapshotTests.cs @@ -3,6 +3,8 @@ #endif using System.Diagnostics.CodeAnalysis; +using System.Reflection; +using System.Runtime.Versioning; using System.Text.Json; namespace Digdir.Domain.Dialogporten.WebApi.Unit.Tests.Features.V1; @@ -21,6 +23,7 @@ public async Task FailIfSwaggerSnapshotDoesNotMatch() // of the npm package located in the same folder var rootPath = Utils.GetSolutionRootFolder(); var swaggerPath = Path.Combine(rootPath!, "docs/schema/V1"); + var newSwaggerPath = Path.Combine(rootPath!, "src/Digdir.Domain.Dialogporten.WebApi/bin/Release/net9.0/swagger.json"); Assert.True(File.Exists(newSwaggerPath), $"Swagger file not found at {newSwaggerPath}. Make sure you have built the project in RELEASE mode."); // Act From 14b84639b01fee166df67b75b86d44676f715851 Mon Sep 17 00:00:00 2001 From: Amund Myrbostad Date: Fri, 7 Feb 2025 09:50:07 +0100 Subject: [PATCH 125/169] Updated SwaggerSnapshotTests --- .../Features/V1/SwaggerSnapshotTests.cs | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/tests/Digdir.Domain.Dialogporten.WebApi.Unit.Tests/Features/V1/SwaggerSnapshotTests.cs b/tests/Digdir.Domain.Dialogporten.WebApi.Unit.Tests/Features/V1/SwaggerSnapshotTests.cs index 22cb3da75..c2a96d1f2 100644 --- a/tests/Digdir.Domain.Dialogporten.WebApi.Unit.Tests/Features/V1/SwaggerSnapshotTests.cs +++ b/tests/Digdir.Domain.Dialogporten.WebApi.Unit.Tests/Features/V1/SwaggerSnapshotTests.cs @@ -1,10 +1,8 @@ #if DEBUG #pragma warning disable CS1998 // Async method lacks 'await' operators and will run synchronously. -#endif +#endif // DEBUG using System.Diagnostics.CodeAnalysis; -using System.Reflection; -using System.Runtime.Versioning; using System.Text.Json; namespace Digdir.Domain.Dialogporten.WebApi.Unit.Tests.Features.V1; @@ -24,7 +22,12 @@ public async Task FailIfSwaggerSnapshotDoesNotMatch() var rootPath = Utils.GetSolutionRootFolder(); var swaggerPath = Path.Combine(rootPath!, "docs/schema/V1"); +#if NET9_0 var newSwaggerPath = Path.Combine(rootPath!, "src/Digdir.Domain.Dialogporten.WebApi/bin/Release/net9.0/swagger.json"); +#else // NET9_0 + Assert.Fail("Swagger snapshot tests are only supported in .NET 9.0."); +#endif // NET9_0 + Assert.True(File.Exists(newSwaggerPath), $"Swagger file not found at {newSwaggerPath}. Make sure you have built the project in RELEASE mode."); // Act var newSwagger = await File.ReadAllTextAsync(newSwaggerPath); @@ -41,11 +44,11 @@ public async Task FailIfSwaggerSnapshotDoesNotMatch() await Verify(orderedSwagger, extension: "json") .UseFileName("swagger") .UseDirectory(swaggerPath); -#else +#else // RELEASE Assert.Fail( "Swagger snapshot tests are not supported in DEBUG mode. Swagger is NOT generated in DEBUG mode, this is to keep build times low. therefore this test will always fail. Run in RELEASE mode to enable."); -#endif +#endif // RELEASE } private static readonly JsonSerializerOptions SerializerOptions = new() From 7a6e048c14773430a64ae34312c854b52d6eb6e5 Mon Sep 17 00:00:00 2001 From: Amund Myrbostad Date: Fri, 7 Feb 2025 09:50:56 +0100 Subject: [PATCH 126/169] Updated SwaggerSnapshotTests.cs --- .../Features/V1/SwaggerSnapshotTests.cs | 2 -- 1 file changed, 2 deletions(-) diff --git a/tests/Digdir.Domain.Dialogporten.WebApi.Unit.Tests/Features/V1/SwaggerSnapshotTests.cs b/tests/Digdir.Domain.Dialogporten.WebApi.Unit.Tests/Features/V1/SwaggerSnapshotTests.cs index c2a96d1f2..8a3eb6509 100644 --- a/tests/Digdir.Domain.Dialogporten.WebApi.Unit.Tests/Features/V1/SwaggerSnapshotTests.cs +++ b/tests/Digdir.Domain.Dialogporten.WebApi.Unit.Tests/Features/V1/SwaggerSnapshotTests.cs @@ -24,8 +24,6 @@ public async Task FailIfSwaggerSnapshotDoesNotMatch() #if NET9_0 var newSwaggerPath = Path.Combine(rootPath!, "src/Digdir.Domain.Dialogporten.WebApi/bin/Release/net9.0/swagger.json"); -#else // NET9_0 - Assert.Fail("Swagger snapshot tests are only supported in .NET 9.0."); #endif // NET9_0 Assert.True(File.Exists(newSwaggerPath), $"Swagger file not found at {newSwaggerPath}. Make sure you have built the project in RELEASE mode."); From d67c9679e7c7b637157fe4c53d55b08b099ff092 Mon Sep 17 00:00:00 2001 From: Amund Date: Fri, 7 Feb 2025 09:52:29 +0100 Subject: [PATCH 127/169] Update tests/Digdir.Domain.Dialogporten.WebApi.Unit.Tests/Features/V1/SwaggerSnapshotTests.cs MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: Ole Jørgen Skogstad --- .../Features/V1/SwaggerSnapshotTests.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/Digdir.Domain.Dialogporten.WebApi.Unit.Tests/Features/V1/SwaggerSnapshotTests.cs b/tests/Digdir.Domain.Dialogporten.WebApi.Unit.Tests/Features/V1/SwaggerSnapshotTests.cs index 8a3eb6509..4f1e096e0 100644 --- a/tests/Digdir.Domain.Dialogporten.WebApi.Unit.Tests/Features/V1/SwaggerSnapshotTests.cs +++ b/tests/Digdir.Domain.Dialogporten.WebApi.Unit.Tests/Features/V1/SwaggerSnapshotTests.cs @@ -44,7 +44,7 @@ await Verify(orderedSwagger, extension: "json") .UseDirectory(swaggerPath); #else // RELEASE Assert.Fail( - "Swagger snapshot tests are not supported in DEBUG mode. Swagger is NOT generated in DEBUG mode, this is to keep build times low. therefore this test will always fail. Run in RELEASE mode to enable."); + "Swagger snapshot tests are not supported in DEBUG mode. Swagger is NOT generated in DEBUG mode, this is to keep build times low. Therefore, this test will always fail. Run in RELEASE mode to enable."); #endif // RELEASE } From 1c3760eafe14b3526341b3cdc680131ea56c3be3 Mon Sep 17 00:00:00 2001 From: Amund Myrbostad Date: Tue, 11 Feb 2025 08:47:41 +0100 Subject: [PATCH 128/169] Updated DialogTokenVerifier to handle invalid tokens without throwing exceptions --- .../Services/DialogTokenVerifier.cs | 28 +++++++++++-------- 1 file changed, 16 insertions(+), 12 deletions(-) diff --git a/src/Digdir.Library.Dialogporten.WebApiClient/Services/DialogTokenVerifier.cs b/src/Digdir.Library.Dialogporten.WebApiClient/Services/DialogTokenVerifier.cs index a22fa6dba..d434c85ae 100644 --- a/src/Digdir.Library.Dialogporten.WebApiClient/Services/DialogTokenVerifier.cs +++ b/src/Digdir.Library.Dialogporten.WebApiClient/Services/DialogTokenVerifier.cs @@ -31,36 +31,40 @@ public bool Verify(ReadOnlySpan token) return false; } - var header = Base64Url.DecodeFromChars(token[tokenPartEnumerator.Current]); - if (!tokenPartEnumerator.MoveNext()) + // Amund Q: Sparer ca 3 operations i IL med å lagre i egen variabel først + var current = tokenPartEnumerator.Current; + Span header = stackalloc byte[current.End.Value - current.Start.Value]; + var headerLength = 0; + if (!tokenPartEnumerator.MoveNext() && !Base64Url.TryDecodeFromChars(token[tokenPartEnumerator.Current], header, out headerLength)) { return false; } - var body = Base64Url.DecodeFromChars(token[tokenPartEnumerator.Current]); - if (!tokenPartEnumerator.MoveNext()) + current = tokenPartEnumerator.Current; + Span body = stackalloc byte[current.End.Value - current.Start.Value]; + var bodyLength = 0; + if (!tokenPartEnumerator.MoveNext() && !Base64Url.TryDecodeFromChars(token[tokenPartEnumerator.Current], body, out bodyLength)) { return false; } - var signature = Base64Url.DecodeFromChars(token[tokenPartEnumerator.Current]); - if (tokenPartEnumerator.MoveNext()) + current = tokenPartEnumerator.Current; + Span signature = stackalloc byte[current.End.Value - current.Start.Value]; + if (tokenPartEnumerator.MoveNext() && !Base64Url.TryDecodeFromChars(token[tokenPartEnumerator.Current], signature, out _)) { return false; } - var headerJson = JsonSerializer.Deserialize(header); - if (!headerJson.TryGetProperty("kid", out var value) && value.GetString() != _kid) { return false; } - var headerAndBody = header - .Append((byte)'.') - .Concat(body) - .ToArray(); + Span headerAndBody = stackalloc byte[headerLength + bodyLength + 1]; + header[..headerLength].CopyTo(headerAndBody); + headerAndBody[header.Length] = (byte)'.'; + body[..bodyLength].CopyTo(headerAndBody[(header.Length + 1)..]); if (!SignatureAlgorithm.Ed25519.Verify(_publicKey, headerAndBody, signature)) { From 1821c44a68ae97faee253004d2e3e66a6d5a71c7 Mon Sep 17 00:00:00 2001 From: Amund Myrbostad Date: Tue, 11 Feb 2025 08:53:08 +0100 Subject: [PATCH 129/169] Updated comment --- .../Services/DialogTokenVerifier.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Digdir.Library.Dialogporten.WebApiClient/Services/DialogTokenVerifier.cs b/src/Digdir.Library.Dialogporten.WebApiClient/Services/DialogTokenVerifier.cs index d434c85ae..70d8f7f51 100644 --- a/src/Digdir.Library.Dialogporten.WebApiClient/Services/DialogTokenVerifier.cs +++ b/src/Digdir.Library.Dialogporten.WebApiClient/Services/DialogTokenVerifier.cs @@ -31,7 +31,7 @@ public bool Verify(ReadOnlySpan token) return false; } - // Amund Q: Sparer ca 3 operations i IL med å lagre i egen variabel først + // Amund: Sparer ca 3 operations i IL med å lagre i egen variabel først var current = tokenPartEnumerator.Current; Span header = stackalloc byte[current.End.Value - current.Start.Value]; var headerLength = 0; From 5c8e550a459b39d47890119fd95a093da6925a45 Mon Sep 17 00:00:00 2001 From: Amund Myrbostad Date: Tue, 11 Feb 2025 09:34:06 +0100 Subject: [PATCH 130/169] Fixed If error --- .../Services/DialogTokenVerifier.cs | 86 ++++++++++--------- 1 file changed, 46 insertions(+), 40 deletions(-) diff --git a/src/Digdir.Library.Dialogporten.WebApiClient/Services/DialogTokenVerifier.cs b/src/Digdir.Library.Dialogporten.WebApiClient/Services/DialogTokenVerifier.cs index 70d8f7f51..29e4b60de 100644 --- a/src/Digdir.Library.Dialogporten.WebApiClient/Services/DialogTokenVerifier.cs +++ b/src/Digdir.Library.Dialogporten.WebApiClient/Services/DialogTokenVerifier.cs @@ -1,4 +1,5 @@ using System.Buffers.Text; +using System.Diagnostics.CodeAnalysis; using System.Text; using System.Text.Json; using Altinn.ApiClients.Dialogporten.Config; @@ -25,56 +26,61 @@ public DialogTokenVerifier(IOptions options) } public bool Verify(ReadOnlySpan token) { - var tokenPartEnumerator = token.Split('.'); - if (!tokenPartEnumerator.MoveNext()) + try // Amund: me no like { - return false; - } + var tokenPartEnumerator = token.Split('.'); + if (!tokenPartEnumerator.MoveNext()) + { + return false; + } - // Amund: Sparer ca 3 operations i IL med å lagre i egen variabel først - var current = tokenPartEnumerator.Current; - Span header = stackalloc byte[current.End.Value - current.Start.Value]; - var headerLength = 0; - if (!tokenPartEnumerator.MoveNext() && !Base64Url.TryDecodeFromChars(token[tokenPartEnumerator.Current], header, out headerLength)) - { - return false; - } + // Amund: Sparer ca 3 operations i IL med å lagre i egen variabel først + var current = tokenPartEnumerator.Current; + Span header = stackalloc byte[current.End.Value - current.Start.Value]; + if (!tokenPartEnumerator.MoveNext() || !Base64Url.TryDecodeFromChars(token[tokenPartEnumerator.Current], header, out var headerLength)) + { + return false; + } - current = tokenPartEnumerator.Current; - Span body = stackalloc byte[current.End.Value - current.Start.Value]; - var bodyLength = 0; - if (!tokenPartEnumerator.MoveNext() && !Base64Url.TryDecodeFromChars(token[tokenPartEnumerator.Current], body, out bodyLength)) - { - return false; - } + current = tokenPartEnumerator.Current; + Span body = stackalloc byte[current.End.Value - current.Start.Value]; + if (!tokenPartEnumerator.MoveNext() || !Base64Url.TryDecodeFromChars(token[tokenPartEnumerator.Current], body, out var bodyLength)) + { + return false; + } - current = tokenPartEnumerator.Current; - Span signature = stackalloc byte[current.End.Value - current.Start.Value]; - if (tokenPartEnumerator.MoveNext() && !Base64Url.TryDecodeFromChars(token[tokenPartEnumerator.Current], signature, out _)) - { - return false; - } + current = tokenPartEnumerator.Current; + Span signature = stackalloc byte[current.End.Value - current.Start.Value]; + if (tokenPartEnumerator.MoveNext() && !Base64Url.TryDecodeFromChars(token[tokenPartEnumerator.Current], signature, out _)) + { + return false; + } - var headerJson = JsonSerializer.Deserialize(header); - if (!headerJson.TryGetProperty("kid", out var value) && value.GetString() != _kid) - { - return false; - } + var headerJson = JsonSerializer.Deserialize(header); + if (!headerJson.TryGetProperty("kid", out var value) && value.GetString() != _kid) + { + return false; + } + + Span headerAndBody = stackalloc byte[headerLength + bodyLength + 1]; + header[..headerLength].CopyTo(headerAndBody); + headerAndBody[header.Length] = (byte)'.'; + body[..bodyLength].CopyTo(headerAndBody[(header.Length + 1)..]); - Span headerAndBody = stackalloc byte[headerLength + bodyLength + 1]; - header[..headerLength].CopyTo(headerAndBody); - headerAndBody[header.Length] = (byte)'.'; - body[..bodyLength].CopyTo(headerAndBody[(header.Length + 1)..]); + if (!SignatureAlgorithm.Ed25519.Verify(_publicKey, headerAndBody, signature)) + { + return false; + } - if (!SignatureAlgorithm.Ed25519.Verify(_publicKey, headerAndBody, signature)) + var bodyJson = JsonSerializer.Deserialize(body); + + return TryGetExpires(bodyJson, out var expiresOffset) && + expiresOffset >= DateTimeOffset.UtcNow; + } + catch (FormatException) { return false; } - - var bodyJson = JsonSerializer.Deserialize(body); - - return TryGetExpires(bodyJson, out var expiresOffset) && - expiresOffset >= DateTimeOffset.UtcNow; } private static bool TryGetExpires(JsonElement bodyJson, out DateTimeOffset expires) From 8243cbe49e3487c1dc8dde5f44df4729135f97be Mon Sep 17 00:00:00 2001 From: Amund Myrbostad Date: Tue, 11 Feb 2025 10:09:14 +0100 Subject: [PATCH 131/169] Saved more IL ops! --- .../Services/DialogTokenVerifier.cs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/Digdir.Library.Dialogporten.WebApiClient/Services/DialogTokenVerifier.cs b/src/Digdir.Library.Dialogporten.WebApiClient/Services/DialogTokenVerifier.cs index 29e4b60de..aa1e43e80 100644 --- a/src/Digdir.Library.Dialogporten.WebApiClient/Services/DialogTokenVerifier.cs +++ b/src/Digdir.Library.Dialogporten.WebApiClient/Services/DialogTokenVerifier.cs @@ -37,21 +37,21 @@ public bool Verify(ReadOnlySpan token) // Amund: Sparer ca 3 operations i IL med å lagre i egen variabel først var current = tokenPartEnumerator.Current; Span header = stackalloc byte[current.End.Value - current.Start.Value]; - if (!tokenPartEnumerator.MoveNext() || !Base64Url.TryDecodeFromChars(token[tokenPartEnumerator.Current], header, out var headerLength)) + if (!tokenPartEnumerator.MoveNext() || !Base64Url.TryDecodeFromChars(token[current], header, out var headerLength)) { return false; } current = tokenPartEnumerator.Current; Span body = stackalloc byte[current.End.Value - current.Start.Value]; - if (!tokenPartEnumerator.MoveNext() || !Base64Url.TryDecodeFromChars(token[tokenPartEnumerator.Current], body, out var bodyLength)) + if (!tokenPartEnumerator.MoveNext() || !Base64Url.TryDecodeFromChars(token[current], body, out var bodyLength)) { return false; } current = tokenPartEnumerator.Current; Span signature = stackalloc byte[current.End.Value - current.Start.Value]; - if (tokenPartEnumerator.MoveNext() && !Base64Url.TryDecodeFromChars(token[tokenPartEnumerator.Current], signature, out _)) + if (tokenPartEnumerator.MoveNext() && !Base64Url.TryDecodeFromChars(token[current], signature, out _)) { return false; } From ba45bd34709a280c98799ee7d48f6a0f82fc2253 Mon Sep 17 00:00:00 2001 From: Amund Myrbostad Date: Tue, 11 Feb 2025 13:39:37 +0100 Subject: [PATCH 132/169] Started Creating proper sample project --- Digdir.Domain.Dialogporten.sln | 7 +++++ ...logporten.WebApiClient.SampleWebApp.csproj | 19 +++++++++++++ .../Program.cs | 20 ++++++++++++++ .../Properties/launchSettings.json | 23 ++++++++++++++++ .../appsettings.Development.json | 8 ++++++ .../appsettings.json | 9 +++++++ .../controllers/DialogportenTestController.cs | 27 +++++++++++++++++++ 7 files changed, 113 insertions(+) create mode 100644 src/Digdir.Library.Dialogporten.WebApiClient.SampleWebApp/Digdir.Library.Dialogporten.WebApiClient.SampleWebApp.csproj create mode 100644 src/Digdir.Library.Dialogporten.WebApiClient.SampleWebApp/Program.cs create mode 100644 src/Digdir.Library.Dialogporten.WebApiClient.SampleWebApp/Properties/launchSettings.json create mode 100644 src/Digdir.Library.Dialogporten.WebApiClient.SampleWebApp/appsettings.Development.json create mode 100644 src/Digdir.Library.Dialogporten.WebApiClient.SampleWebApp/appsettings.json create mode 100644 src/Digdir.Library.Dialogporten.WebApiClient.SampleWebApp/controllers/DialogportenTestController.cs diff --git a/Digdir.Domain.Dialogporten.sln b/Digdir.Domain.Dialogporten.sln index c991a98b6..516a81283 100644 --- a/Digdir.Domain.Dialogporten.sln +++ b/Digdir.Domain.Dialogporten.sln @@ -69,6 +69,8 @@ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Digdir.Library.Dialogporten 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.SampleWebApp", "src\Digdir.Library.Dialogporten.WebApiClient.SampleWebApp\Digdir.Library.Dialogporten.WebApiClient.SampleWebApp.csproj", "{5B29C9D8-EEB6-40A8-A17B-52A5FC408706}" +EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution Debug|Any CPU = Debug|Any CPU @@ -167,6 +169,10 @@ Global {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 + {5B29C9D8-EEB6-40A8-A17B-52A5FC408706}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {5B29C9D8-EEB6-40A8-A17B-52A5FC408706}.Debug|Any CPU.Build.0 = Debug|Any CPU + {5B29C9D8-EEB6-40A8-A17B-52A5FC408706}.Release|Any CPU.ActiveCfg = Release|Any CPU + {5B29C9D8-EEB6-40A8-A17B-52A5FC408706}.Release|Any CPU.Build.0 = Release|Any CPU EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE @@ -199,6 +205,7 @@ Global {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} + {5B29C9D8-EEB6-40A8-A17B-52A5FC408706} = {9B809C3A-B169-4599-A2D3-A25E87C510FC} EndGlobalSection GlobalSection(ExtensibilityGlobals) = postSolution SolutionGuid = {B2FE67FF-7622-4AFB-AD8E-961B6A39D888} diff --git a/src/Digdir.Library.Dialogporten.WebApiClient.SampleWebApp/Digdir.Library.Dialogporten.WebApiClient.SampleWebApp.csproj b/src/Digdir.Library.Dialogporten.WebApiClient.SampleWebApp/Digdir.Library.Dialogporten.WebApiClient.SampleWebApp.csproj new file mode 100644 index 000000000..fd9d0f2b0 --- /dev/null +++ b/src/Digdir.Library.Dialogporten.WebApiClient.SampleWebApp/Digdir.Library.Dialogporten.WebApiClient.SampleWebApp.csproj @@ -0,0 +1,19 @@ + + + + net9.0 + enable + enable + + + + + + + + + PreserveNewest + + + + diff --git a/src/Digdir.Library.Dialogporten.WebApiClient.SampleWebApp/Program.cs b/src/Digdir.Library.Dialogporten.WebApiClient.SampleWebApp/Program.cs new file mode 100644 index 000000000..bd1ac2891 --- /dev/null +++ b/src/Digdir.Library.Dialogporten.WebApiClient.SampleWebApp/Program.cs @@ -0,0 +1,20 @@ +using Altinn.ApiClients.Dialogporten.Config; +using Altinn.ApiClients.Dialogporten.Extensions; + +var builder = WebApplication.CreateBuilder(args); +var services = builder.Services; + +var configuration = new ConfigurationBuilder() + .AddJsonFile("appsettings.local.json", optional: false, reloadOnChange: true) + .Build(); +var settings = configuration.GetSection("DialogportenSettings").Get()!; + +services.AddControllers(); +services.AddRouting(); +services.AddSingleton(configuration); +services.AddDialogportenClient(settings); + +var app = builder.Build(); +app.MapControllers(); +app.UseRouting(); +app.Run(); diff --git a/src/Digdir.Library.Dialogporten.WebApiClient.SampleWebApp/Properties/launchSettings.json b/src/Digdir.Library.Dialogporten.WebApiClient.SampleWebApp/Properties/launchSettings.json new file mode 100644 index 000000000..93c932b29 --- /dev/null +++ b/src/Digdir.Library.Dialogporten.WebApiClient.SampleWebApp/Properties/launchSettings.json @@ -0,0 +1,23 @@ +{ + "$schema": "https://json.schemastore.org/launchsettings.json", + "profiles": { + "http": { + "commandName": "Project", + "dotnetRunMessages": true, + "launchBrowser": false, + "applicationUrl": "http://localhost:5271", + "environmentVariables": { + "ASPNETCORE_ENVIRONMENT": "Development" + } + }, + "https": { + "commandName": "Project", + "dotnetRunMessages": true, + "launchBrowser": false, + "applicationUrl": "https://localhost:7273;http://localhost:5271", + "environmentVariables": { + "ASPNETCORE_ENVIRONMENT": "Development" + } + } + } +} diff --git a/src/Digdir.Library.Dialogporten.WebApiClient.SampleWebApp/appsettings.Development.json b/src/Digdir.Library.Dialogporten.WebApiClient.SampleWebApp/appsettings.Development.json new file mode 100644 index 000000000..0c208ae91 --- /dev/null +++ b/src/Digdir.Library.Dialogporten.WebApiClient.SampleWebApp/appsettings.Development.json @@ -0,0 +1,8 @@ +{ + "Logging": { + "LogLevel": { + "Default": "Information", + "Microsoft.AspNetCore": "Warning" + } + } +} diff --git a/src/Digdir.Library.Dialogporten.WebApiClient.SampleWebApp/appsettings.json b/src/Digdir.Library.Dialogporten.WebApiClient.SampleWebApp/appsettings.json new file mode 100644 index 000000000..10f68b8c8 --- /dev/null +++ b/src/Digdir.Library.Dialogporten.WebApiClient.SampleWebApp/appsettings.json @@ -0,0 +1,9 @@ +{ + "Logging": { + "LogLevel": { + "Default": "Information", + "Microsoft.AspNetCore": "Warning" + } + }, + "AllowedHosts": "*" +} diff --git a/src/Digdir.Library.Dialogporten.WebApiClient.SampleWebApp/controllers/DialogportenTestController.cs b/src/Digdir.Library.Dialogporten.WebApiClient.SampleWebApp/controllers/DialogportenTestController.cs new file mode 100644 index 000000000..4db3575f5 --- /dev/null +++ b/src/Digdir.Library.Dialogporten.WebApiClient.SampleWebApp/controllers/DialogportenTestController.cs @@ -0,0 +1,27 @@ +using Altinn.ApiClients.Dialogporten.Services; +using Microsoft.AspNetCore.Mvc; + +namespace Digdir.Library.Dialogporten.WebApiClient.SampleWebApp.controllers; + +[ApiController] +[Route("[controller]")] +public class DialogportenTestController : ControllerBase +{ + private readonly IDialogTokenVerifier _dialogTokenVerifier; + public DialogportenTestController(IDialogTokenVerifier dialogTokenVerifier) + { + _dialogTokenVerifier = dialogTokenVerifier; + } + [HttpGet] + public string Get() + { + return "This is the Dialogporten Test Controller"; + } + + [HttpGet] + [Route("verify/{token}")] + public bool Verify(string token) + { + return _dialogTokenVerifier.Verify(token); + } +} From 56e3122c23c561ec1ba84f1ff3b440303100fc0c Mon Sep 17 00:00:00 2001 From: Amund Myrbostad Date: Tue, 11 Feb 2025 13:39:55 +0100 Subject: [PATCH 133/169] public key cache thingy --- .../Services/DialogTokenVerifier.cs | 107 +++++++++++++++++- 1 file changed, 104 insertions(+), 3 deletions(-) diff --git a/src/Digdir.Library.Dialogporten.WebApiClient/Services/DialogTokenVerifier.cs b/src/Digdir.Library.Dialogporten.WebApiClient/Services/DialogTokenVerifier.cs index aa1e43e80..c358dd4cc 100644 --- a/src/Digdir.Library.Dialogporten.WebApiClient/Services/DialogTokenVerifier.cs +++ b/src/Digdir.Library.Dialogporten.WebApiClient/Services/DialogTokenVerifier.cs @@ -1,10 +1,9 @@ using System.Buffers.Text; -using System.Diagnostics.CodeAnalysis; -using System.Text; using System.Text.Json; using Altinn.ApiClients.Dialogporten.Config; -using Microsoft.Extensions.Configuration; +using Microsoft.Extensions.Logging; using Microsoft.Extensions.Options; +using Microsoft.IdentityModel.Tokens; using NSec.Cryptography; namespace Altinn.ApiClients.Dialogporten.Services; @@ -115,3 +114,105 @@ internal static class DialogTokenClaimTypes public const string DialogId = "i"; public const string Actions = "a"; } + +internal sealed class JsonWebKeyTypes +{ + public const string Kty = "kty"; + public const string Use = "use"; + public const string Kid = "kid"; + public const string Crv = "crv"; + public const string X = "x"; + public const string Alg = "alg"; +} + +internal class EdDsaSecurityKeysCacheService : IHostedService, IDisposable +{ + public static List PublicKeys => _keys; + private static volatile List _keys = new(); + + private PeriodicTimer? _timer; + private readonly IHttpClientFactory _httpClientFactory; + private readonly ILogger _logger; + + private readonly TimeSpan _refreshInterval = TimeSpan.FromHours(12); + + // In this service we allow keys for all non-production environments for + // simplicity. Usually one would only allow a single environment (issuer) here, + // which we could get from an injected IConfiguration/IOptions + private readonly List _wellKnownEndpoints = + [ + //"https://localhost:7214/api/v1/.well-known/jwks.json", + "https://altinn-dev-api.azure-api.net/dialogporten/api/v1/.well-known/jwks.json", + "https://platform.tt02.altinn.no/dialogporten/api/v1/.well-known/https://altinn-dev-api.azure-api.net/dialogporten/api/v1/.well-known/jwks.jsonhttps://altinn-dev-api.azure-api.net/dialogporten/api/v1/.well-known/jwks.jsonjwks.json" + ]; + + public EdDsaSecurityKeysCacheService(IHttpClientFactory httpClientFactory, ILogger logger) + { + _httpClientFactory = httpClientFactory; + _logger = logger; + } + + public async Task StartAsync(CancellationToken cancellationToken) + { + _ = Task.Run(async () => + { + _timer = new PeriodicTimer(_refreshInterval); + while (await _timer.WaitForNextTickAsync(cancellationToken)) + { + try + { + await RefreshAsync(cancellationToken); + } + catch (Exception ex) + { + _logger.LogError(ex, "An error occurred while refreshing the EdDsa keys."); + } + } + }, cancellationToken); + + await RefreshAsync(cancellationToken); + } + + public Task StopAsync(CancellationToken cancellationToken) + { + _timer?.Dispose(); + return Task.CompletedTask; + } + + public void Dispose() + { + _timer?.Dispose(); + } + + private async Task RefreshAsync(CancellationToken cancellationToken) + { + var httpClient = _httpClientFactory.CreateClient(); + var keys = new List(); + + foreach (var endpoint in _wellKnownEndpoints) + { + try + { + var response = await httpClient.GetStringAsync(endpoint, cancellationToken); + var jwks = JsonSerializer.Deserialize(response); + + if (jwks.TryGetProperty(JsonWebKeyTypes.X, out var publicKey)) + { + keys.Add(PublicKey.Import( + SignatureAlgorithm.Ed25519, + Base64Url.DecodeFromChars(publicKey.GetString()), + KeyBlobFormat.RawPublicKey)); + } + } + catch (Exception ex) + { + _logger.LogWarning(ex, "Failed to retrieve keys from {endpoint}", endpoint); + } + } + + _logger.LogInformation("Refreshed EdDsa keys cache with {count} keys", keys.Count); + + var newKeys = keys.ToList(); + _keys = newKeys; // Atomic replace + } +} From 41cd154dca5a23568dda33cc9db3bb655c939b3a Mon Sep 17 00:00:00 2001 From: Amund Myrbostad Date: Tue, 11 Feb 2025 13:47:49 +0100 Subject: [PATCH 134/169] Added more checks to EdDSA cache thing --- .../Services/DialogTokenVerifier.cs | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/src/Digdir.Library.Dialogporten.WebApiClient/Services/DialogTokenVerifier.cs b/src/Digdir.Library.Dialogporten.WebApiClient/Services/DialogTokenVerifier.cs index c358dd4cc..ec2649565 100644 --- a/src/Digdir.Library.Dialogporten.WebApiClient/Services/DialogTokenVerifier.cs +++ b/src/Digdir.Library.Dialogporten.WebApiClient/Services/DialogTokenVerifier.cs @@ -196,8 +196,14 @@ private async Task RefreshAsync(CancellationToken cancellationToken) var response = await httpClient.GetStringAsync(endpoint, cancellationToken); var jwks = JsonSerializer.Deserialize(response); - if (jwks.TryGetProperty(JsonWebKeyTypes.X, out var publicKey)) + if (!jwks.TryGetProperty(JsonWebKeyTypes.X, out var publicKey) || !jwks.TryGetProperty(JsonWebKeyTypes.Alg, out var alg)) { + continue; + } + + if (alg.GetString() == "EdDSA") + { + keys.Add(PublicKey.Import( SignatureAlgorithm.Ed25519, Base64Url.DecodeFromChars(publicKey.GetString()), From 2a968f91deeff70f604f8af4c7786a6829b3a8b9 Mon Sep 17 00:00:00 2001 From: Amund Myrbostad Date: Tue, 11 Feb 2025 13:49:47 +0100 Subject: [PATCH 135/169] Clean up --- .../Services/DialogTokenVerifier.cs | 23 ++++++++++--------- 1 file changed, 12 insertions(+), 11 deletions(-) diff --git a/src/Digdir.Library.Dialogporten.WebApiClient/Services/DialogTokenVerifier.cs b/src/Digdir.Library.Dialogporten.WebApiClient/Services/DialogTokenVerifier.cs index ec2649565..fa30418f8 100644 --- a/src/Digdir.Library.Dialogporten.WebApiClient/Services/DialogTokenVerifier.cs +++ b/src/Digdir.Library.Dialogporten.WebApiClient/Services/DialogTokenVerifier.cs @@ -3,7 +3,6 @@ using Altinn.ApiClients.Dialogporten.Config; using Microsoft.Extensions.Logging; using Microsoft.Extensions.Options; -using Microsoft.IdentityModel.Tokens; using NSec.Cryptography; namespace Altinn.ApiClients.Dialogporten.Services; @@ -115,16 +114,6 @@ internal static class DialogTokenClaimTypes public const string Actions = "a"; } -internal sealed class JsonWebKeyTypes -{ - public const string Kty = "kty"; - public const string Use = "use"; - public const string Kid = "kid"; - public const string Crv = "crv"; - public const string X = "x"; - public const string Alg = "alg"; -} - internal class EdDsaSecurityKeysCacheService : IHostedService, IDisposable { public static List PublicKeys => _keys; @@ -221,4 +210,16 @@ private async Task RefreshAsync(CancellationToken cancellationToken) var newKeys = keys.ToList(); _keys = newKeys; // Atomic replace } + + +} + +internal sealed class JsonWebKeyTypes +{ + public const string Kty = "kty"; + public const string Use = "use"; + public const string Kid = "kid"; + public const string Crv = "crv"; + public const string X = "x"; + public const string Alg = "alg"; } From 8e2593dba4f22815afb4fdb98003a63842cf6ceb Mon Sep 17 00:00:00 2001 From: Amund Myrbostad Date: Tue, 11 Feb 2025 13:55:47 +0100 Subject: [PATCH 136/169] Added Hosting? --- .../Digdir.Library.Dialogporten.WebApiClient.csproj | 1 + .../Services/DialogTokenVerifier.cs | 1 + 2 files changed, 2 insertions(+) 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 7d316fc7f..6c4b0fc4b 100644 --- a/src/Digdir.Library.Dialogporten.WebApiClient/Digdir.Library.Dialogporten.WebApiClient.csproj +++ b/src/Digdir.Library.Dialogporten.WebApiClient/Digdir.Library.Dialogporten.WebApiClient.csproj @@ -22,6 +22,7 @@ + diff --git a/src/Digdir.Library.Dialogporten.WebApiClient/Services/DialogTokenVerifier.cs b/src/Digdir.Library.Dialogporten.WebApiClient/Services/DialogTokenVerifier.cs index fa30418f8..9b09e50f4 100644 --- a/src/Digdir.Library.Dialogporten.WebApiClient/Services/DialogTokenVerifier.cs +++ b/src/Digdir.Library.Dialogporten.WebApiClient/Services/DialogTokenVerifier.cs @@ -1,6 +1,7 @@ using System.Buffers.Text; using System.Text.Json; using Altinn.ApiClients.Dialogporten.Config; +using Microsoft.Extensions.Hosting; using Microsoft.Extensions.Logging; using Microsoft.Extensions.Options; using NSec.Cryptography; From bd9a458a3e9d319ad9f16a850a1f80816833c02c Mon Sep 17 00:00:00 2001 From: Amund Myrbostad Date: Tue, 11 Feb 2025 13:57:31 +0100 Subject: [PATCH 137/169] Moved stuff to its own file --- .../Services/DialogTokenVerifier.cs | 111 ----------------- .../Services/EdDsaSecurityKeysCacheService.cs | 117 ++++++++++++++++++ 2 files changed, 117 insertions(+), 111 deletions(-) create mode 100644 src/Digdir.Library.Dialogporten.WebApiClient/Services/EdDsaSecurityKeysCacheService.cs diff --git a/src/Digdir.Library.Dialogporten.WebApiClient/Services/DialogTokenVerifier.cs b/src/Digdir.Library.Dialogporten.WebApiClient/Services/DialogTokenVerifier.cs index 9b09e50f4..571ebe5de 100644 --- a/src/Digdir.Library.Dialogporten.WebApiClient/Services/DialogTokenVerifier.cs +++ b/src/Digdir.Library.Dialogporten.WebApiClient/Services/DialogTokenVerifier.cs @@ -1,8 +1,6 @@ using System.Buffers.Text; using System.Text.Json; using Altinn.ApiClients.Dialogporten.Config; -using Microsoft.Extensions.Hosting; -using Microsoft.Extensions.Logging; using Microsoft.Extensions.Options; using NSec.Cryptography; @@ -115,112 +113,3 @@ internal static class DialogTokenClaimTypes public const string Actions = "a"; } -internal class EdDsaSecurityKeysCacheService : IHostedService, IDisposable -{ - public static List PublicKeys => _keys; - private static volatile List _keys = new(); - - private PeriodicTimer? _timer; - private readonly IHttpClientFactory _httpClientFactory; - private readonly ILogger _logger; - - private readonly TimeSpan _refreshInterval = TimeSpan.FromHours(12); - - // In this service we allow keys for all non-production environments for - // simplicity. Usually one would only allow a single environment (issuer) here, - // which we could get from an injected IConfiguration/IOptions - private readonly List _wellKnownEndpoints = - [ - //"https://localhost:7214/api/v1/.well-known/jwks.json", - "https://altinn-dev-api.azure-api.net/dialogporten/api/v1/.well-known/jwks.json", - "https://platform.tt02.altinn.no/dialogporten/api/v1/.well-known/https://altinn-dev-api.azure-api.net/dialogporten/api/v1/.well-known/jwks.jsonhttps://altinn-dev-api.azure-api.net/dialogporten/api/v1/.well-known/jwks.jsonjwks.json" - ]; - - public EdDsaSecurityKeysCacheService(IHttpClientFactory httpClientFactory, ILogger logger) - { - _httpClientFactory = httpClientFactory; - _logger = logger; - } - - public async Task StartAsync(CancellationToken cancellationToken) - { - _ = Task.Run(async () => - { - _timer = new PeriodicTimer(_refreshInterval); - while (await _timer.WaitForNextTickAsync(cancellationToken)) - { - try - { - await RefreshAsync(cancellationToken); - } - catch (Exception ex) - { - _logger.LogError(ex, "An error occurred while refreshing the EdDsa keys."); - } - } - }, cancellationToken); - - await RefreshAsync(cancellationToken); - } - - public Task StopAsync(CancellationToken cancellationToken) - { - _timer?.Dispose(); - return Task.CompletedTask; - } - - public void Dispose() - { - _timer?.Dispose(); - } - - private async Task RefreshAsync(CancellationToken cancellationToken) - { - var httpClient = _httpClientFactory.CreateClient(); - var keys = new List(); - - foreach (var endpoint in _wellKnownEndpoints) - { - try - { - var response = await httpClient.GetStringAsync(endpoint, cancellationToken); - var jwks = JsonSerializer.Deserialize(response); - - if (!jwks.TryGetProperty(JsonWebKeyTypes.X, out var publicKey) || !jwks.TryGetProperty(JsonWebKeyTypes.Alg, out var alg)) - { - continue; - } - - if (alg.GetString() == "EdDSA") - { - - keys.Add(PublicKey.Import( - SignatureAlgorithm.Ed25519, - Base64Url.DecodeFromChars(publicKey.GetString()), - KeyBlobFormat.RawPublicKey)); - } - } - catch (Exception ex) - { - _logger.LogWarning(ex, "Failed to retrieve keys from {endpoint}", endpoint); - } - } - - _logger.LogInformation("Refreshed EdDsa keys cache with {count} keys", keys.Count); - - var newKeys = keys.ToList(); - _keys = newKeys; // Atomic replace - } - - -} - -internal sealed class JsonWebKeyTypes -{ - public const string Kty = "kty"; - public const string Use = "use"; - public const string Kid = "kid"; - public const string Crv = "crv"; - public const string X = "x"; - public const string Alg = "alg"; -} diff --git a/src/Digdir.Library.Dialogporten.WebApiClient/Services/EdDsaSecurityKeysCacheService.cs b/src/Digdir.Library.Dialogporten.WebApiClient/Services/EdDsaSecurityKeysCacheService.cs new file mode 100644 index 000000000..928c1e03f --- /dev/null +++ b/src/Digdir.Library.Dialogporten.WebApiClient/Services/EdDsaSecurityKeysCacheService.cs @@ -0,0 +1,117 @@ +using System.Buffers.Text; +using System.Text.Json; +using Microsoft.Extensions.Hosting; +using Microsoft.Extensions.Logging; +using NSec.Cryptography; + +namespace Altinn.ApiClients.Dialogporten.Services; + +internal class EdDsaSecurityKeysCacheService : IHostedService, IDisposable +{ + public static List PublicKeys => _keys; + private static volatile List _keys = new(); + + private PeriodicTimer? _timer; + private readonly IHttpClientFactory _httpClientFactory; + private readonly ILogger _logger; + + private readonly TimeSpan _refreshInterval = TimeSpan.FromHours(12); + + // In this service we allow keys for all non-production environments for + // simplicity. Usually one would only allow a single environment (issuer) here, + // which we could get from an injected IConfiguration/IOptions + private readonly List _wellKnownEndpoints = + [ + //"https://localhost:7214/api/v1/.well-known/jwks.json", + "https://altinn-dev-api.azure-api.net/dialogporten/api/v1/.well-known/jwks.json", + "https://platform.tt02.altinn.no/dialogporten/api/v1/.well-known/https://altinn-dev-api.azure-api.net/dialogporten/api/v1/.well-known/jwks.jsonhttps://altinn-dev-api.azure-api.net/dialogporten/api/v1/.well-known/jwks.jsonjwks.json" + ]; + + public EdDsaSecurityKeysCacheService(IHttpClientFactory httpClientFactory, ILogger logger) + { + _httpClientFactory = httpClientFactory; + _logger = logger; + } + + public async Task StartAsync(CancellationToken cancellationToken) + { + _ = Task.Run(async () => + { + _timer = new PeriodicTimer(_refreshInterval); + while (await _timer.WaitForNextTickAsync(cancellationToken)) + { + try + { + await RefreshAsync(cancellationToken); + } + catch (Exception ex) + { + _logger.LogError(ex, "An error occurred while refreshing the EdDsa keys."); + } + } + }, cancellationToken); + + await RefreshAsync(cancellationToken); + } + + public Task StopAsync(CancellationToken cancellationToken) + { + _timer?.Dispose(); + return Task.CompletedTask; + } + + public void Dispose() + { + _timer?.Dispose(); + } + + private async Task RefreshAsync(CancellationToken cancellationToken) + { + var httpClient = _httpClientFactory.CreateClient(); + var keys = new List(); + + foreach (var endpoint in _wellKnownEndpoints) + { + try + { + var response = await httpClient.GetStringAsync(endpoint, cancellationToken); + var jwks = JsonSerializer.Deserialize(response); + + if (!jwks.TryGetProperty(JsonWebKeyTypes.X, out var publicKey) || !jwks.TryGetProperty(JsonWebKeyTypes.Alg, out var alg)) + { + continue; + } + + if (alg.GetString() == "EdDSA") + { + + keys.Add(PublicKey.Import( + SignatureAlgorithm.Ed25519, + Base64Url.DecodeFromChars(publicKey.GetString()), + KeyBlobFormat.RawPublicKey)); + } + } + catch (Exception ex) + { + _logger.LogWarning(ex, "Failed to retrieve keys from {endpoint}", endpoint); + } + } + + _logger.LogInformation("Refreshed EdDsa keys cache with {count} keys", keys.Count); + + var newKeys = keys.ToList(); + _keys = newKeys; // Atomic replace + } + + +} + +internal sealed class JsonWebKeyTypes +{ + public const string Kty = "kty"; + public const string Use = "use"; + public const string Kid = "kid"; + public const string Crv = "crv"; + public const string X = "x"; + public const string Alg = "alg"; +} From 456c677b6391d031d041956bdd6120a7859f9548 Mon Sep 17 00:00:00 2001 From: Amund Myrbostad Date: Tue, 11 Feb 2025 14:16:25 +0100 Subject: [PATCH 138/169] Now loops through all keys in respons --- .../Services/EdDsaSecurityKeysCacheService.cs | 22 +++++++++++++------ 1 file changed, 15 insertions(+), 7 deletions(-) diff --git a/src/Digdir.Library.Dialogporten.WebApiClient/Services/EdDsaSecurityKeysCacheService.cs b/src/Digdir.Library.Dialogporten.WebApiClient/Services/EdDsaSecurityKeysCacheService.cs index 928c1e03f..a36330719 100644 --- a/src/Digdir.Library.Dialogporten.WebApiClient/Services/EdDsaSecurityKeysCacheService.cs +++ b/src/Digdir.Library.Dialogporten.WebApiClient/Services/EdDsaSecurityKeysCacheService.cs @@ -77,18 +77,26 @@ private async Task RefreshAsync(CancellationToken cancellationToken) var response = await httpClient.GetStringAsync(endpoint, cancellationToken); var jwks = JsonSerializer.Deserialize(response); - if (!jwks.TryGetProperty(JsonWebKeyTypes.X, out var publicKey) || !jwks.TryGetProperty(JsonWebKeyTypes.Alg, out var alg)) + if (!jwks.TryGetProperty("keys", out var keysElement)) { continue; } - - if (alg.GetString() == "EdDSA") + foreach (var jwk in keysElement.EnumerateArray()) { - keys.Add(PublicKey.Import( - SignatureAlgorithm.Ed25519, - Base64Url.DecodeFromChars(publicKey.GetString()), - KeyBlobFormat.RawPublicKey)); + if (!jwk.TryGetProperty(JsonWebKeyTypes.X, out var publicKey) || !jwk.TryGetProperty(JsonWebKeyTypes.Alg, out var alg)) + { + continue; + } + + if (alg.GetString() == "EdDSA") + { + + keys.Add(PublicKey.Import( + SignatureAlgorithm.Ed25519, + Base64Url.DecodeFromChars(publicKey.GetString()), + KeyBlobFormat.RawPublicKey)); + } } } catch (Exception ex) From 3d05c1b77a6b994bbf7c0b75b11ecbed95a55710 Mon Sep 17 00:00:00 2001 From: Amund Myrbostad Date: Tue, 11 Feb 2025 15:47:29 +0100 Subject: [PATCH 139/169] Updated key cache service --- .../Extensions/ServiceCollectionExtensions.cs | 5 + .../Interfaces/IInternalDialogportenApi.cs | 24 +++++ .../Services/EdDsaSecurityKeysCacheService.cs | 95 ++++++------------- 3 files changed, 57 insertions(+), 67 deletions(-) create mode 100644 src/Digdir.Library.Dialogporten.WebApiClient/Interfaces/IInternalDialogportenApi.cs diff --git a/src/Digdir.Library.Dialogporten.WebApiClient/Extensions/ServiceCollectionExtensions.cs b/src/Digdir.Library.Dialogporten.WebApiClient/Extensions/ServiceCollectionExtensions.cs index 6d849cfc3..3c1b9d5ba 100644 --- a/src/Digdir.Library.Dialogporten.WebApiClient/Extensions/ServiceCollectionExtensions.cs +++ b/src/Digdir.Library.Dialogporten.WebApiClient/Extensions/ServiceCollectionExtensions.cs @@ -1,6 +1,7 @@ using System.CodeDom.Compiler; using System.Reflection; using Altinn.ApiClients.Dialogporten.Config; +using Altinn.ApiClients.Dialogporten.Interfaces; using Altinn.ApiClients.Dialogporten.Services; using Altinn.ApiClients.Maskinporten.Extensions; using Altinn.ApiClients.Maskinporten.Services; @@ -37,6 +38,10 @@ public static IServiceCollection AddDialogportenClient(this IServiceCollection s .AddMaskinportenHttpMessageHandler("dialogporten-sp-sdk"); } + services + .AddRefitClient() + .ConfigureHttpClient(c => c.BaseAddress = new Uri(settings.BaseUri)); + services.TryAddSingleton(); return services; } diff --git a/src/Digdir.Library.Dialogporten.WebApiClient/Interfaces/IInternalDialogportenApi.cs b/src/Digdir.Library.Dialogporten.WebApiClient/Interfaces/IInternalDialogportenApi.cs new file mode 100644 index 000000000..97ef43bc1 --- /dev/null +++ b/src/Digdir.Library.Dialogporten.WebApiClient/Interfaces/IInternalDialogportenApi.cs @@ -0,0 +1,24 @@ +using Refit; + +namespace Altinn.ApiClients.Dialogporten.Interfaces; + +internal interface IInternalDialogportenApi +{ + [Get("/api/v1/.well-known/jwks.json")] + Task> GetJwks(CancellationToken cancellationToken); +} + +internal sealed class DialogportenJwks +{ + public required List Keys { get; init; } + + internal sealed class JsonWebKey + { + public required string Kty { get; init; } + public required string Use { get; init; } + public required string Kid { get; init; } + public required string Crv { get; init; } + public required string X { get; init; } + public required string Alg { get; init; } + } +} diff --git a/src/Digdir.Library.Dialogporten.WebApiClient/Services/EdDsaSecurityKeysCacheService.cs b/src/Digdir.Library.Dialogporten.WebApiClient/Services/EdDsaSecurityKeysCacheService.cs index a36330719..a4a26af5a 100644 --- a/src/Digdir.Library.Dialogporten.WebApiClient/Services/EdDsaSecurityKeysCacheService.cs +++ b/src/Digdir.Library.Dialogporten.WebApiClient/Services/EdDsaSecurityKeysCacheService.cs @@ -1,39 +1,33 @@ using System.Buffers.Text; -using System.Text.Json; +using System.Net; +using Altinn.ApiClients.Dialogporten.Interfaces; +using Microsoft.Extensions.DependencyInjection; using Microsoft.Extensions.Hosting; using Microsoft.Extensions.Logging; using NSec.Cryptography; namespace Altinn.ApiClients.Dialogporten.Services; -internal class EdDsaSecurityKeysCacheService : IHostedService, IDisposable +internal class EdDsaSecurityKeysCacheService : BackgroundService { public static List PublicKeys => _keys; - private static volatile List _keys = new(); + private static volatile List _keys = []; private PeriodicTimer? _timer; - private readonly IHttpClientFactory _httpClientFactory; private readonly ILogger _logger; private readonly TimeSpan _refreshInterval = TimeSpan.FromHours(12); + private readonly IServiceScopeFactory _serviceScopeFactory; - // In this service we allow keys for all non-production environments for - // simplicity. Usually one would only allow a single environment (issuer) here, - // which we could get from an injected IConfiguration/IOptions - private readonly List _wellKnownEndpoints = - [ - //"https://localhost:7214/api/v1/.well-known/jwks.json", - "https://altinn-dev-api.azure-api.net/dialogporten/api/v1/.well-known/jwks.json", - "https://platform.tt02.altinn.no/dialogporten/api/v1/.well-known/https://altinn-dev-api.azure-api.net/dialogporten/api/v1/.well-known/jwks.jsonhttps://altinn-dev-api.azure-api.net/dialogporten/api/v1/.well-known/jwks.jsonjwks.json" - ]; + private const string EdDsaAlg = "EdDSA"; - public EdDsaSecurityKeysCacheService(IHttpClientFactory httpClientFactory, ILogger logger) + public EdDsaSecurityKeysCacheService(ILogger logger, IServiceScopeFactory serviceScopeFactory) { - _httpClientFactory = httpClientFactory; _logger = logger; + _serviceScopeFactory = serviceScopeFactory; } - public async Task StartAsync(CancellationToken cancellationToken) + protected override async Task ExecuteAsync(CancellationToken cancellationToken) { _ = Task.Run(async () => { @@ -54,72 +48,39 @@ public async Task StartAsync(CancellationToken cancellationToken) await RefreshAsync(cancellationToken); } - public Task StopAsync(CancellationToken cancellationToken) + public override Task StopAsync(CancellationToken cancellationToken) { _timer?.Dispose(); + base.Dispose(); return Task.CompletedTask; } - public void Dispose() + public override void Dispose() { _timer?.Dispose(); + base.Dispose(); } private async Task RefreshAsync(CancellationToken cancellationToken) { - var httpClient = _httpClientFactory.CreateClient(); - var keys = new List(); + using var scope = _serviceScopeFactory.CreateScope(); + var dialogportenApi = scope.ServiceProvider.GetRequiredService(); + var response = await dialogportenApi.GetJwks(cancellationToken); - foreach (var endpoint in _wellKnownEndpoints) + if (response.StatusCode != HttpStatusCode.OK || response.Content == null) { - try - { - var response = await httpClient.GetStringAsync(endpoint, cancellationToken); - var jwks = JsonSerializer.Deserialize(response); - - if (!jwks.TryGetProperty("keys", out var keysElement)) - { - continue; - } - foreach (var jwk in keysElement.EnumerateArray()) - { - - if (!jwk.TryGetProperty(JsonWebKeyTypes.X, out var publicKey) || !jwk.TryGetProperty(JsonWebKeyTypes.Alg, out var alg)) - { - continue; - } - - if (alg.GetString() == "EdDSA") - { - - keys.Add(PublicKey.Import( - SignatureAlgorithm.Ed25519, - Base64Url.DecodeFromChars(publicKey.GetString()), - KeyBlobFormat.RawPublicKey)); - } - } - } - catch (Exception ex) - { - _logger.LogWarning(ex, "Failed to retrieve keys from {endpoint}", endpoint); - } + return; } - _logger.LogInformation("Refreshed EdDsa keys cache with {count} keys", keys.Count); - - var newKeys = keys.ToList(); - _keys = newKeys; // Atomic replace - } + var keys = response.Content.Keys + .Where(x => StringComparer.OrdinalIgnoreCase.Equals(x.Alg, EdDsaAlg)) + .Select(k => PublicKey.Import( + SignatureAlgorithm.Ed25519, + Base64Url.DecodeFromChars(k.X), + KeyBlobFormat.RawPublicKey)) + .ToList(); + _keys = keys; -} - -internal sealed class JsonWebKeyTypes -{ - public const string Kty = "kty"; - public const string Use = "use"; - public const string Kid = "kid"; - public const string Crv = "crv"; - public const string X = "x"; - public const string Alg = "alg"; + } } From c8cf0a4a31d5b87fc74f6b94944191f45bdfd27d Mon Sep 17 00:00:00 2001 From: Amund Myrbostad Date: Wed, 12 Feb 2025 08:34:58 +0100 Subject: [PATCH 140/169] Added EdDsaSecurityKeysCacheService as Singleton in IoC --- .../Extensions/ServiceCollectionExtensions.cs | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/Digdir.Library.Dialogporten.WebApiClient/Extensions/ServiceCollectionExtensions.cs b/src/Digdir.Library.Dialogporten.WebApiClient/Extensions/ServiceCollectionExtensions.cs index 3c1b9d5ba..ff3f8a9c4 100644 --- a/src/Digdir.Library.Dialogporten.WebApiClient/Extensions/ServiceCollectionExtensions.cs +++ b/src/Digdir.Library.Dialogporten.WebApiClient/Extensions/ServiceCollectionExtensions.cs @@ -42,6 +42,8 @@ public static IServiceCollection AddDialogportenClient(this IServiceCollection s .AddRefitClient() .ConfigureHttpClient(c => c.BaseAddress = new Uri(settings.BaseUri)); + services.TryAddSingleton(); + services.TryAddSingleton(); return services; } From a02c169b314900c6c61a251a1e93a8087a60977f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ole=20J=C3=B8rgen=20Skogstad?= Date: Wed, 12 Feb 2025 09:18:54 +0100 Subject: [PATCH 141/169] suggestion: Split schema check-for-changes (#1835) --- .github/workflows/ci-cd-main.yml | 6 +++--- .github/workflows/ci-cd-staging.yml | 6 +++--- .../workflows/workflow-check-for-changes.yml | 18 ++++++++++++------ 3 files changed, 18 insertions(+), 12 deletions(-) diff --git a/.github/workflows/ci-cd-main.yml b/.github/workflows/ci-cd-main.yml index 7f4c6244f..e9cc1ede9 100644 --- a/.github/workflows/ci-cd-main.yml +++ b/.github/workflows/ci-cd-main.yml @@ -101,18 +101,18 @@ jobs: 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.hasSchemaChanges == 'true' }} + if: ${{ needs.check-for-changes.outputs.hasSwaggerSchemaChanges == 'true' }} with: version: ${{ needs.get-current-version.outputs.version }}-rc.${{ needs.generate-git-short-sha.outputs.gitShortSha }} path: 'src/Digdir.Library.Dialogporten.WebApiClient.csproj' source: 'https://api.nuget.org/v3/index.json' secrets: NUGET_API_KEY: ${{ secrets.NUGET_API_TEST_KEY }} - + publish-schema-npm: name: Deploy schema npm package 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') }} + if: ${{ always() && !failure() && !cancelled() && (github.event_name == 'workflow_dispatch' || needs.check-for-changes.outputs.hasSwaggerSchemaChanges == 'true' || needs.check-for-changes.outputs.hasGqlSchemaChanges == 'true') }} uses: ./.github/workflows/workflow-publish-schema.yml with: version: ${{ needs.get-current-version.outputs.version }}-${{ needs.generate-git-short-sha.outputs.gitShortSha }} diff --git a/.github/workflows/ci-cd-staging.yml b/.github/workflows/ci-cd-staging.yml index 90e03151f..a5621bea4 100644 --- a/.github/workflows/ci-cd-staging.yml +++ b/.github/workflows/ci-cd-staging.yml @@ -86,14 +86,14 @@ jobs: publish-sdk-to-nuget: uses: ./.github/workflows/workflow-publish-nuget.yml needs: [ get-current-version, check-for-changes ] - if: ${{ needs.check-for-changes.outputs.hasSchemaChanges == 'true' }} + if: ${{ needs.check-for-changes.outputs.hasSwaggerSchemaChanges == 'true' }} with: version: ${{ needs.get-current-version.outputs.version }} path: 'src/Digdir.Library.Dialogporten.WebApiClient/Digdir.Library.Dialogporten.WebApiClient.csproj' source: 'https://api.nuget.org/v3/index.json' secrets: NUGET_API_KEY: ${{ secrets.NUGET_API_TEST_KEY }} - + store-apps-version: name: Store Latest Deployed Apps Version as GitHub Variable needs: [deploy-apps, get-current-version] @@ -109,7 +109,7 @@ jobs: publish-schema-npm: name: Publish schema npm package 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') }} + if: ${{ always() && !failure() && !cancelled() && (github.event_name == 'workflow_dispatch' || needs.check-for-changes.outputs.hasSwaggerSchemaChanges == 'true' || needs.check-for-changes.outputs.hasGqlSchemaChanges == 'true') }} uses: ./.github/workflows/workflow-publish-schema.yml with: version: ${{ needs.get-current-version.outputs.version }} diff --git a/.github/workflows/workflow-check-for-changes.yml b/.github/workflows/workflow-check-for-changes.yml index b15de102c..f5f7cd386 100644 --- a/.github/workflows/workflow-check-for-changes.yml +++ b/.github/workflows/workflow-check-for-changes.yml @@ -26,9 +26,12 @@ on: hasSlackNotifierChanges: description: "Slack Notifier function related files changed" value: ${{ jobs.check-for-changes.outputs.hasSlackNotifierChanges }} - hasSchemaChanges: - description: "Schema has changed" - value: ${{ jobs.check-for-changes.outputs.hasSchemaChanges }} + hasSwaggerSchemaChanges: + description: "Swagger schema has changed" + value: ${{ jobs.check-for-changes.outputs.hasSwaggerSchemaChanges }} + hasGqlSchemaChanges: + description: "GraphQL schema has changed" + value: ${{ jobs.check-for-changes.outputs.hasGqlSchemaChanges }} hasMigrationChanges: description: "Migration related files changed" value: ${{ jobs.check-for-changes.outputs.hasMigrationChanges }} @@ -42,7 +45,8 @@ jobs: hasSlackNotifierChanges: ${{ steps.filter.outputs.slackNotifier_any_modified == 'true'}} hasBackendChanges: ${{ steps.filter-backend.outputs.backend_any_modified == 'true' }} hasTestChanges: ${{ steps.filter-backend.outputs.tests_any_modified == 'true' }} - hasSchemaChanges: ${{ steps.filter-backend.outputs.schema_any_modified == 'true'}} + hasSwaggerSchemaChanges: ${{ steps.filter-backend.outputs.swagger_schema_any_modified == 'true'}} + hasGqlSchemaChanges: ${{ steps.filter-backend.outputs.gql_schema_any_modified == 'true'}} hasMigrationChanges: ${{ steps.filter-backend.outputs.migration_any_modified == 'true'}} steps: - name: Checkout @@ -75,7 +79,9 @@ jobs: - '.azure/modules/containerApp/**/*' tests: - 'tests/**/*' - schema: - - 'docs/schema/V1/**/*' + swagger_schema: + - 'docs/schema/V1/swagger.verified.json' + gql_schema: + - 'docs/schema/V1/schema.verified.graphql' migration: - 'src/Digdir.Domain.Dialogporten.Infrastructure/Persistence/Migrations/**/*' From d7e6bd91aea9b63b3066edac9b595b7d158bdae5 Mon Sep 17 00:00:00 2001 From: Amund Myrbostad Date: Thu, 13 Feb 2025 08:16:15 +0100 Subject: [PATCH 142/169] Stuff --- .../Extensions/ServiceCollectionExtensions.cs | 3 +-- .../Services/DialogTokenVerifier.cs | 11 ++++++----- .../Services/EdDsaSecurityKeysCacheService.cs | 1 - 3 files changed, 7 insertions(+), 8 deletions(-) diff --git a/src/Digdir.Library.Dialogporten.WebApiClient/Extensions/ServiceCollectionExtensions.cs b/src/Digdir.Library.Dialogporten.WebApiClient/Extensions/ServiceCollectionExtensions.cs index ff3f8a9c4..4dd7e9a77 100644 --- a/src/Digdir.Library.Dialogporten.WebApiClient/Extensions/ServiceCollectionExtensions.cs +++ b/src/Digdir.Library.Dialogporten.WebApiClient/Extensions/ServiceCollectionExtensions.cs @@ -42,8 +42,7 @@ public static IServiceCollection AddDialogportenClient(this IServiceCollection s .AddRefitClient() .ConfigureHttpClient(c => c.BaseAddress = new Uri(settings.BaseUri)); - services.TryAddSingleton(); - + services.AddHostedService(); services.TryAddSingleton(); return services; } diff --git a/src/Digdir.Library.Dialogporten.WebApiClient/Services/DialogTokenVerifier.cs b/src/Digdir.Library.Dialogporten.WebApiClient/Services/DialogTokenVerifier.cs index 571ebe5de..aab4999aa 100644 --- a/src/Digdir.Library.Dialogporten.WebApiClient/Services/DialogTokenVerifier.cs +++ b/src/Digdir.Library.Dialogporten.WebApiClient/Services/DialogTokenVerifier.cs @@ -18,8 +18,9 @@ internal sealed class DialogTokenVerifier : IDialogTokenVerifier public DialogTokenVerifier(IOptions options) { _kid = options.Value.Ed25519Keys.Primary.Kid; - _publicKey = PublicKey.Import(SignatureAlgorithm.Ed25519, - Base64Url.DecodeFromChars(options.Value.Ed25519Keys.Primary.PublicComponent), KeyBlobFormat.RawPublicKey); + // _publicKey = PublicKey.Import(SignatureAlgorithm.Ed25519, + // Base64Url.DecodeFromChars(options.Value.Ed25519Keys.Primary.PublicComponent), KeyBlobFormat.RawPublicKey); + _publicKey = EdDsaSecurityKeysCacheService.PublicKeys[0]; } public bool Verify(ReadOnlySpan token) { @@ -54,7 +55,7 @@ public bool Verify(ReadOnlySpan token) } var headerJson = JsonSerializer.Deserialize(header); - if (!headerJson.TryGetProperty("kid", out var value) && value.GetString() != _kid) + if (!headerJson.TryGetProperty("kid", out var value) && value.GetString() != EdDsaSecurityKeysCacheService.PublicKeys[0].Kid) { return false; } @@ -64,7 +65,8 @@ public bool Verify(ReadOnlySpan token) headerAndBody[header.Length] = (byte)'.'; body[..bodyLength].CopyTo(headerAndBody[(header.Length + 1)..]); - if (!SignatureAlgorithm.Ed25519.Verify(_publicKey, headerAndBody, signature)) + var publicKey = EdDsaSecurityKeysCacheService.PublicKeys[0]; + if (!SignatureAlgorithm.Ed25519.Verify(publicKey, headerAndBody, signature)) { return false; } @@ -112,4 +114,3 @@ internal static class DialogTokenClaimTypes public const string DialogId = "i"; public const string Actions = "a"; } - diff --git a/src/Digdir.Library.Dialogporten.WebApiClient/Services/EdDsaSecurityKeysCacheService.cs b/src/Digdir.Library.Dialogporten.WebApiClient/Services/EdDsaSecurityKeysCacheService.cs index a4a26af5a..57af8b5bc 100644 --- a/src/Digdir.Library.Dialogporten.WebApiClient/Services/EdDsaSecurityKeysCacheService.cs +++ b/src/Digdir.Library.Dialogporten.WebApiClient/Services/EdDsaSecurityKeysCacheService.cs @@ -81,6 +81,5 @@ private async Task RefreshAsync(CancellationToken cancellationToken) .ToList(); _keys = keys; - } } From 644ddd1aeeaa2c3e2ce0e3d7792b2d9eef679bf0 Mon Sep 17 00:00:00 2001 From: Amund Myrbostad Date: Thu, 13 Feb 2025 10:38:08 +0100 Subject: [PATCH 143/169] Fixes --- .../Interfaces/IInternalDialogportenApi.cs | 2 +- .../Services/DialogTokenVerifier.cs | 11 +-- .../Services/EdDsaSecurityKeysCacheService.cs | 73 ++++++++----------- 3 files changed, 37 insertions(+), 49 deletions(-) diff --git a/src/Digdir.Library.Dialogporten.WebApiClient/Interfaces/IInternalDialogportenApi.cs b/src/Digdir.Library.Dialogporten.WebApiClient/Interfaces/IInternalDialogportenApi.cs index 97ef43bc1..31ee74605 100644 --- a/src/Digdir.Library.Dialogporten.WebApiClient/Interfaces/IInternalDialogportenApi.cs +++ b/src/Digdir.Library.Dialogporten.WebApiClient/Interfaces/IInternalDialogportenApi.cs @@ -5,7 +5,7 @@ namespace Altinn.ApiClients.Dialogporten.Interfaces; internal interface IInternalDialogportenApi { [Get("/api/v1/.well-known/jwks.json")] - Task> GetJwks(CancellationToken cancellationToken); + Task GetJwks(CancellationToken cancellationToken); } internal sealed class DialogportenJwks diff --git a/src/Digdir.Library.Dialogporten.WebApiClient/Services/DialogTokenVerifier.cs b/src/Digdir.Library.Dialogporten.WebApiClient/Services/DialogTokenVerifier.cs index aab4999aa..59e5c9080 100644 --- a/src/Digdir.Library.Dialogporten.WebApiClient/Services/DialogTokenVerifier.cs +++ b/src/Digdir.Library.Dialogporten.WebApiClient/Services/DialogTokenVerifier.cs @@ -1,4 +1,5 @@ using System.Buffers.Text; +using System.Collections.ObjectModel; using System.Text.Json; using Altinn.ApiClients.Dialogporten.Config; using Microsoft.Extensions.Options; @@ -14,13 +15,13 @@ public interface IDialogTokenVerifier internal sealed class DialogTokenVerifier : IDialogTokenVerifier { private readonly string _kid; - private readonly PublicKey _publicKey; + private readonly ReadOnlyCollection _publicKey; public DialogTokenVerifier(IOptions options) { _kid = options.Value.Ed25519Keys.Primary.Kid; // _publicKey = PublicKey.Import(SignatureAlgorithm.Ed25519, // Base64Url.DecodeFromChars(options.Value.Ed25519Keys.Primary.PublicComponent), KeyBlobFormat.RawPublicKey); - _publicKey = EdDsaSecurityKeysCacheService.PublicKeys[0]; + _publicKey = EdDsaSecurityKeysCacheService.PublicKeys; } public bool Verify(ReadOnlySpan token) { @@ -54,8 +55,9 @@ public bool Verify(ReadOnlySpan token) return false; } + var publicKey = EdDsaSecurityKeysCacheService.PublicKeys[0]; var headerJson = JsonSerializer.Deserialize(header); - if (!headerJson.TryGetProperty("kid", out var value) && value.GetString() != EdDsaSecurityKeysCacheService.PublicKeys[0].Kid) + if (!headerJson.TryGetProperty("kid", out var value) && value.GetString() != publicKey.Kid) { return false; } @@ -65,8 +67,7 @@ public bool Verify(ReadOnlySpan token) headerAndBody[header.Length] = (byte)'.'; body[..bodyLength].CopyTo(headerAndBody[(header.Length + 1)..]); - var publicKey = EdDsaSecurityKeysCacheService.PublicKeys[0]; - if (!SignatureAlgorithm.Ed25519.Verify(publicKey, headerAndBody, signature)) + if (!SignatureAlgorithm.Ed25519.Verify(publicKey.Key, headerAndBody, signature)) { return false; } diff --git a/src/Digdir.Library.Dialogporten.WebApiClient/Services/EdDsaSecurityKeysCacheService.cs b/src/Digdir.Library.Dialogporten.WebApiClient/Services/EdDsaSecurityKeysCacheService.cs index 57af8b5bc..23d0b8d9c 100644 --- a/src/Digdir.Library.Dialogporten.WebApiClient/Services/EdDsaSecurityKeysCacheService.cs +++ b/src/Digdir.Library.Dialogporten.WebApiClient/Services/EdDsaSecurityKeysCacheService.cs @@ -1,5 +1,7 @@ using System.Buffers.Text; +using System.Collections.ObjectModel; using System.Net; +using Altinn.ApiClients.Dialogporten.Config; using Altinn.ApiClients.Dialogporten.Interfaces; using Microsoft.Extensions.DependencyInjection; using Microsoft.Extensions.Hosting; @@ -8,17 +10,14 @@ namespace Altinn.ApiClients.Dialogporten.Services; -internal class EdDsaSecurityKeysCacheService : BackgroundService +internal sealed class EdDsaSecurityKeysCacheService : BackgroundService { - public static List PublicKeys => _keys; - private static volatile List _keys = []; + public static ReadOnlyCollection PublicKeys => _keys.AsReadOnly(); + private static volatile List _keys = []; - private PeriodicTimer? _timer; + private readonly PeriodicTimer _timer = new(TimeSpan.FromHours(12)); private readonly ILogger _logger; - - private readonly TimeSpan _refreshInterval = TimeSpan.FromHours(12); private readonly IServiceScopeFactory _serviceScopeFactory; - private const string EdDsaAlg = "EdDSA"; public EdDsaSecurityKeysCacheService(ILogger logger, IServiceScopeFactory serviceScopeFactory) @@ -29,57 +28,45 @@ public EdDsaSecurityKeysCacheService(ILogger logg protected override async Task ExecuteAsync(CancellationToken cancellationToken) { - _ = Task.Run(async () => + while (await _timer.WaitForNextTickAsync(cancellationToken)) { - _timer = new PeriodicTimer(_refreshInterval); - while (await _timer.WaitForNextTickAsync(cancellationToken)) + try + { + await RefreshAsync(cancellationToken); + } + catch (Exception ex) { - try - { - await RefreshAsync(cancellationToken); - } - catch (Exception ex) - { - _logger.LogError(ex, "An error occurred while refreshing the EdDsa keys."); - } + _logger.LogError(ex, "An error occurred while refreshing the EdDsa keys."); } - }, cancellationToken); + } await RefreshAsync(cancellationToken); } - public override Task StopAsync(CancellationToken cancellationToken) - { - _timer?.Dispose(); - base.Dispose(); - return Task.CompletedTask; - } - - public override void Dispose() - { - _timer?.Dispose(); - base.Dispose(); - } - private async Task RefreshAsync(CancellationToken cancellationToken) { using var scope = _serviceScopeFactory.CreateScope(); var dialogportenApi = scope.ServiceProvider.GetRequiredService(); - var response = await dialogportenApi.GetJwks(cancellationToken); - - if (response.StatusCode != HttpStatusCode.OK || response.Content == null) - { - return; - } + var jwks = await dialogportenApi.GetJwks(cancellationToken); - var keys = response.Content.Keys + var keys = jwks.Keys .Where(x => StringComparer.OrdinalIgnoreCase.Equals(x.Alg, EdDsaAlg)) - .Select(k => PublicKey.Import( - SignatureAlgorithm.Ed25519, - Base64Url.DecodeFromChars(k.X), - KeyBlobFormat.RawPublicKey)) + .Select(k => new PublicKeyPair( + PublicKey.Import( + SignatureAlgorithm.Ed25519, + Base64Url.DecodeFromChars(k.X), + KeyBlobFormat.RawPublicKey), + k.Kid)) .ToList(); _keys = keys; } + + public override void Dispose() + { + _timer.Dispose(); + base.Dispose(); + } } + +internal sealed record PublicKeyPair(PublicKey Key, string Kid); From 551ed94c2d46d5dc390620630f41c6613fb380fa Mon Sep 17 00:00:00 2001 From: Amund Myrbostad Date: Thu, 13 Feb 2025 10:44:03 +0100 Subject: [PATCH 144/169] Cleanup --- .../Services/DialogTokenVerifier.cs | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/src/Digdir.Library.Dialogporten.WebApiClient/Services/DialogTokenVerifier.cs b/src/Digdir.Library.Dialogporten.WebApiClient/Services/DialogTokenVerifier.cs index 59e5c9080..f3e4f2568 100644 --- a/src/Digdir.Library.Dialogporten.WebApiClient/Services/DialogTokenVerifier.cs +++ b/src/Digdir.Library.Dialogporten.WebApiClient/Services/DialogTokenVerifier.cs @@ -14,14 +14,8 @@ public interface IDialogTokenVerifier internal sealed class DialogTokenVerifier : IDialogTokenVerifier { - private readonly string _kid; - private readonly ReadOnlyCollection _publicKey; - public DialogTokenVerifier(IOptions options) + public DialogTokenVerifier() { - _kid = options.Value.Ed25519Keys.Primary.Kid; - // _publicKey = PublicKey.Import(SignatureAlgorithm.Ed25519, - // Base64Url.DecodeFromChars(options.Value.Ed25519Keys.Primary.PublicComponent), KeyBlobFormat.RawPublicKey); - _publicKey = EdDsaSecurityKeysCacheService.PublicKeys; } public bool Verify(ReadOnlySpan token) { From e1bd63c784275be3642cfec3ab0f59ed552d43af Mon Sep 17 00:00:00 2001 From: Amund Myrbostad Date: Thu, 13 Feb 2025 10:52:46 +0100 Subject: [PATCH 145/169] CleanUp --- .../Config/DialogportenSettings.cs | 18 +----------------- .../Extensions/ServiceCollectionExtensions.cs | 2 +- .../Services/DialogTokenVerifier.cs | 12 +++--------- 3 files changed, 5 insertions(+), 27 deletions(-) diff --git a/src/Digdir.Library.Dialogporten.WebApiClient/Config/DialogportenSettings.cs b/src/Digdir.Library.Dialogporten.WebApiClient/Config/DialogportenSettings.cs index d2460826e..a4b8fba47 100644 --- a/src/Digdir.Library.Dialogporten.WebApiClient/Config/DialogportenSettings.cs +++ b/src/Digdir.Library.Dialogporten.WebApiClient/Config/DialogportenSettings.cs @@ -6,23 +6,7 @@ public sealed class DialogportenSettings { public string BaseUri { get; set; } = null!; public MaskinportenSettings Maskinporten { get; set; } = null!; - public Ed25519Keys Ed25519Keys { get; set; } = null!; #pragma warning disable CA1822 // Mark members as static - internal bool Validate() - { - return true; - } + internal bool Validate() => true; #pragma warning restore CA1822 // Mark members as static } - -public sealed record Ed25519Keys -{ - public Ed25519Key Primary { get; set; } = null!; - public Ed25519Key Secondary { get; set; } = null!; -} - -public sealed record Ed25519Key -{ - public string Kid { get; set; } = null!; - public string PublicComponent { get; set; } = null!; -} diff --git a/src/Digdir.Library.Dialogporten.WebApiClient/Extensions/ServiceCollectionExtensions.cs b/src/Digdir.Library.Dialogporten.WebApiClient/Extensions/ServiceCollectionExtensions.cs index 4dd7e9a77..4a05117fc 100644 --- a/src/Digdir.Library.Dialogporten.WebApiClient/Extensions/ServiceCollectionExtensions.cs +++ b/src/Digdir.Library.Dialogporten.WebApiClient/Extensions/ServiceCollectionExtensions.cs @@ -43,7 +43,7 @@ public static IServiceCollection AddDialogportenClient(this IServiceCollection s .ConfigureHttpClient(c => c.BaseAddress = new Uri(settings.BaseUri)); services.AddHostedService(); - services.TryAddSingleton(); + services.TryAddScoped(); return services; } diff --git a/src/Digdir.Library.Dialogporten.WebApiClient/Services/DialogTokenVerifier.cs b/src/Digdir.Library.Dialogporten.WebApiClient/Services/DialogTokenVerifier.cs index f3e4f2568..6b2d68e66 100644 --- a/src/Digdir.Library.Dialogporten.WebApiClient/Services/DialogTokenVerifier.cs +++ b/src/Digdir.Library.Dialogporten.WebApiClient/Services/DialogTokenVerifier.cs @@ -1,8 +1,5 @@ using System.Buffers.Text; -using System.Collections.ObjectModel; using System.Text.Json; -using Altinn.ApiClients.Dialogporten.Config; -using Microsoft.Extensions.Options; using NSec.Cryptography; namespace Altinn.ApiClients.Dialogporten.Services; @@ -14,9 +11,6 @@ public interface IDialogTokenVerifier internal sealed class DialogTokenVerifier : IDialogTokenVerifier { - public DialogTokenVerifier() - { - } public bool Verify(ReadOnlySpan token) { try // Amund: me no like @@ -49,9 +43,9 @@ public bool Verify(ReadOnlySpan token) return false; } - var publicKey = EdDsaSecurityKeysCacheService.PublicKeys[0]; + var publicKeyPair = EdDsaSecurityKeysCacheService.PublicKeys[0]; var headerJson = JsonSerializer.Deserialize(header); - if (!headerJson.TryGetProperty("kid", out var value) && value.GetString() != publicKey.Kid) + if (!headerJson.TryGetProperty("kid", out var value) && value.GetString() != publicKeyPair.Kid) { return false; } @@ -61,7 +55,7 @@ public bool Verify(ReadOnlySpan token) headerAndBody[header.Length] = (byte)'.'; body[..bodyLength].CopyTo(headerAndBody[(header.Length + 1)..]); - if (!SignatureAlgorithm.Ed25519.Verify(publicKey.Key, headerAndBody, signature)) + if (!SignatureAlgorithm.Ed25519.Verify(publicKeyPair.Key, headerAndBody, signature)) { return false; } From 1fb421c0904a74827cb3f2dee180cc1ea919a185 Mon Sep 17 00:00:00 2001 From: Amund Myrbostad Date: Thu, 13 Feb 2025 10:55:33 +0100 Subject: [PATCH 146/169] Added check for if any public keys exists --- .../Services/DialogTokenVerifier.cs | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/src/Digdir.Library.Dialogporten.WebApiClient/Services/DialogTokenVerifier.cs b/src/Digdir.Library.Dialogporten.WebApiClient/Services/DialogTokenVerifier.cs index 6b2d68e66..a83c5493f 100644 --- a/src/Digdir.Library.Dialogporten.WebApiClient/Services/DialogTokenVerifier.cs +++ b/src/Digdir.Library.Dialogporten.WebApiClient/Services/DialogTokenVerifier.cs @@ -15,6 +15,12 @@ public bool Verify(ReadOnlySpan token) { try // Amund: me no like { + if (EdDsaSecurityKeysCacheService.PublicKeys.Count == 0) + { + return false; + } + var publicKeyPair = EdDsaSecurityKeysCacheService.PublicKeys[0]; + var tokenPartEnumerator = token.Split('.'); if (!tokenPartEnumerator.MoveNext()) { @@ -42,8 +48,6 @@ public bool Verify(ReadOnlySpan token) { return false; } - - var publicKeyPair = EdDsaSecurityKeysCacheService.PublicKeys[0]; var headerJson = JsonSerializer.Deserialize(header); if (!headerJson.TryGetProperty("kid", out var value) && value.GetString() != publicKeyPair.Kid) { From c43a8905a9c3e997a49a7c516da3cffbc85993a2 Mon Sep 17 00:00:00 2001 From: Magnus Sandgren <5285192+MagnusSandgren@users.noreply.github.com> Date: Thu, 13 Feb 2025 12:34:04 +0100 Subject: [PATCH 147/169] WIP --- Digdir.Domain.Dialogporten.sln | 14 ++-- .../Program.cs | 3 +- .../appsettings.json | 6 -- .../Program.cs | 20 ----- .../appsettings.Development.json | 8 -- .../appsettings.json | 9 --- .../controllers/DialogportenTestController.cs | 27 ------- ...ogporten.WebApiClient.WebApiSample.csproj} | 6 +- .../Program.cs | 31 +++++++ .../Properties/launchSettings.json | 4 +- .../WebApiSample.http | 16 ++++ .../appsettings.json | 19 +++++ ...alogportenClientInitializationException.cs | 3 + .../Config/DialogportenSettings.cs | 12 --- .../DialogportenSettings.cs | 25 ++++++ .../IDialogTokenVerifier.cs | 6 ++ .../IInternalDialogportenApi.cs | 2 +- .../ServiceCollectionExtensions.cs | 7 +- .../Services/DialogTokenVerifier.cs | 5 -- .../Services/EdDsaSecurityKeysCacheService.cs | 80 ++++++++++++++----- 20 files changed, 174 insertions(+), 129 deletions(-) delete mode 100644 src/Digdir.Library.Dialogporten.WebApiClient.SampleWebApp/Program.cs delete mode 100644 src/Digdir.Library.Dialogporten.WebApiClient.SampleWebApp/appsettings.Development.json delete mode 100644 src/Digdir.Library.Dialogporten.WebApiClient.SampleWebApp/appsettings.json delete mode 100644 src/Digdir.Library.Dialogporten.WebApiClient.SampleWebApp/controllers/DialogportenTestController.cs rename src/{Digdir.Library.Dialogporten.WebApiClient.SampleWebApp/Digdir.Library.Dialogporten.WebApiClient.SampleWebApp.csproj => Digdir.Library.Dialogporten.WebApiClient.WebApiSample/Digdir.Library.Dialogporten.WebApiClient.WebApiSample.csproj} (53%) create mode 100644 src/Digdir.Library.Dialogporten.WebApiClient.WebApiSample/Program.cs rename src/{Digdir.Library.Dialogporten.WebApiClient.SampleWebApp => Digdir.Library.Dialogporten.WebApiClient.WebApiSample}/Properties/launchSettings.json (80%) create mode 100644 src/Digdir.Library.Dialogporten.WebApiClient.WebApiSample/WebApiSample.http create mode 100644 src/Digdir.Library.Dialogporten.WebApiClient.WebApiSample/appsettings.json create mode 100644 src/Digdir.Library.Dialogporten.WebApiClient/Common/Exceptions/IncompleteDialogportenClientInitializationException.cs delete mode 100644 src/Digdir.Library.Dialogporten.WebApiClient/Config/DialogportenSettings.cs create mode 100644 src/Digdir.Library.Dialogporten.WebApiClient/DialogportenSettings.cs create mode 100644 src/Digdir.Library.Dialogporten.WebApiClient/IDialogTokenVerifier.cs rename src/Digdir.Library.Dialogporten.WebApiClient/{Interfaces => Infrastructure}/IInternalDialogportenApi.cs (91%) rename src/Digdir.Library.Dialogporten.WebApiClient/{Extensions => }/ServiceCollectionExtensions.cs (92%) diff --git a/Digdir.Domain.Dialogporten.sln b/Digdir.Domain.Dialogporten.sln index 3c5d9834b..90ec37401 100644 --- a/Digdir.Domain.Dialogporten.sln +++ b/Digdir.Domain.Dialogporten.sln @@ -67,10 +67,10 @@ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Digdir.Library.Dialogporten 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.SampleWebApp", "src\Digdir.Library.Dialogporten.WebApiClient.SampleWebApp\Digdir.Library.Dialogporten.WebApiClient.SampleWebApp.csproj", "{5B29C9D8-EEB6-40A8-A17B-52A5FC408706}" -EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Digdir.Tool.Dialogporten.LargeDataSetGenerator", "src\Digdir.Tool.Dialogporten.LargeDataSetGenerator\Digdir.Tool.Dialogporten.LargeDataSetGenerator.csproj", "{B0E0E9EE-AFBE-4013-908C-5F8DF66AB671}" EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Digdir.Library.Dialogporten.WebApiClient.WebApiSample", "src\Digdir.Library.Dialogporten.WebApiClient.WebApiSample\Digdir.Library.Dialogporten.WebApiClient.WebApiSample.csproj", "{FBF19369-21CD-437D-BB88-CCB81EC947CF}" +EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution Debug|Any CPU = Debug|Any CPU @@ -165,14 +165,14 @@ Global {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 - {5B29C9D8-EEB6-40A8-A17B-52A5FC408706}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {5B29C9D8-EEB6-40A8-A17B-52A5FC408706}.Debug|Any CPU.Build.0 = Debug|Any CPU - {5B29C9D8-EEB6-40A8-A17B-52A5FC408706}.Release|Any CPU.ActiveCfg = Release|Any CPU - {5B29C9D8-EEB6-40A8-A17B-52A5FC408706}.Release|Any CPU.Build.0 = Release|Any CPU {B0E0E9EE-AFBE-4013-908C-5F8DF66AB671}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {B0E0E9EE-AFBE-4013-908C-5F8DF66AB671}.Debug|Any CPU.Build.0 = Debug|Any CPU {B0E0E9EE-AFBE-4013-908C-5F8DF66AB671}.Release|Any CPU.ActiveCfg = Release|Any CPU {B0E0E9EE-AFBE-4013-908C-5F8DF66AB671}.Release|Any CPU.Build.0 = Release|Any CPU + {FBF19369-21CD-437D-BB88-CCB81EC947CF}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {FBF19369-21CD-437D-BB88-CCB81EC947CF}.Debug|Any CPU.Build.0 = Debug|Any CPU + {FBF19369-21CD-437D-BB88-CCB81EC947CF}.Release|Any CPU.ActiveCfg = Release|Any CPU + {FBF19369-21CD-437D-BB88-CCB81EC947CF}.Release|Any CPU.Build.0 = Release|Any CPU EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE @@ -204,8 +204,8 @@ Global {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} - {5B29C9D8-EEB6-40A8-A17B-52A5FC408706} = {9B809C3A-B169-4599-A2D3-A25E87C510FC} {B0E0E9EE-AFBE-4013-908C-5F8DF66AB671} = {3C2C775D-F2D1-42A2-B53F-CC6D5FF59633} + {FBF19369-21CD-437D-BB88-CCB81EC947CF} = {9B809C3A-B169-4599-A2D3-A25E87C510FC} EndGlobalSection GlobalSection(ExtensibilityGlobals) = postSolution SolutionGuid = {B2FE67FF-7622-4AFB-AD8E-961B6A39D888} diff --git a/src/Digdir.Library.Dialogporten.WebApiClient.Sample/Program.cs b/src/Digdir.Library.Dialogporten.WebApiClient.Sample/Program.cs index 494fa2199..d92321bba 100644 --- a/src/Digdir.Library.Dialogporten.WebApiClient.Sample/Program.cs +++ b/src/Digdir.Library.Dialogporten.WebApiClient.Sample/Program.cs @@ -1,6 +1,5 @@ using System.Diagnostics; -using Altinn.ApiClients.Dialogporten.Config; -using Altinn.ApiClients.Dialogporten.Extensions; +using Altinn.ApiClients.Dialogporten; using Altinn.ApiClients.Dialogporten.Features.V1; using Digdir.Library.Dialogporten.WebApiClient.Sample; using Microsoft.Extensions.Configuration; diff --git a/src/Digdir.Library.Dialogporten.WebApiClient.Sample/appsettings.json b/src/Digdir.Library.Dialogporten.WebApiClient.Sample/appsettings.json index 51aad2692..9ac8e8d36 100644 --- a/src/Digdir.Library.Dialogporten.WebApiClient.Sample/appsettings.json +++ b/src/Digdir.Library.Dialogporten.WebApiClient.Sample/appsettings.json @@ -5,12 +5,6 @@ "ClientId": "", "Scope": "", "EncodedJwk": "" - }, - "Ed25519Keys": { - "Primary": { - "Kid": "", - "PublicComponent": "" - } } } } diff --git a/src/Digdir.Library.Dialogporten.WebApiClient.SampleWebApp/Program.cs b/src/Digdir.Library.Dialogporten.WebApiClient.SampleWebApp/Program.cs deleted file mode 100644 index bd1ac2891..000000000 --- a/src/Digdir.Library.Dialogporten.WebApiClient.SampleWebApp/Program.cs +++ /dev/null @@ -1,20 +0,0 @@ -using Altinn.ApiClients.Dialogporten.Config; -using Altinn.ApiClients.Dialogporten.Extensions; - -var builder = WebApplication.CreateBuilder(args); -var services = builder.Services; - -var configuration = new ConfigurationBuilder() - .AddJsonFile("appsettings.local.json", optional: false, reloadOnChange: true) - .Build(); -var settings = configuration.GetSection("DialogportenSettings").Get()!; - -services.AddControllers(); -services.AddRouting(); -services.AddSingleton(configuration); -services.AddDialogportenClient(settings); - -var app = builder.Build(); -app.MapControllers(); -app.UseRouting(); -app.Run(); diff --git a/src/Digdir.Library.Dialogporten.WebApiClient.SampleWebApp/appsettings.Development.json b/src/Digdir.Library.Dialogporten.WebApiClient.SampleWebApp/appsettings.Development.json deleted file mode 100644 index 0c208ae91..000000000 --- a/src/Digdir.Library.Dialogporten.WebApiClient.SampleWebApp/appsettings.Development.json +++ /dev/null @@ -1,8 +0,0 @@ -{ - "Logging": { - "LogLevel": { - "Default": "Information", - "Microsoft.AspNetCore": "Warning" - } - } -} diff --git a/src/Digdir.Library.Dialogporten.WebApiClient.SampleWebApp/appsettings.json b/src/Digdir.Library.Dialogporten.WebApiClient.SampleWebApp/appsettings.json deleted file mode 100644 index 10f68b8c8..000000000 --- a/src/Digdir.Library.Dialogporten.WebApiClient.SampleWebApp/appsettings.json +++ /dev/null @@ -1,9 +0,0 @@ -{ - "Logging": { - "LogLevel": { - "Default": "Information", - "Microsoft.AspNetCore": "Warning" - } - }, - "AllowedHosts": "*" -} diff --git a/src/Digdir.Library.Dialogporten.WebApiClient.SampleWebApp/controllers/DialogportenTestController.cs b/src/Digdir.Library.Dialogporten.WebApiClient.SampleWebApp/controllers/DialogportenTestController.cs deleted file mode 100644 index 4db3575f5..000000000 --- a/src/Digdir.Library.Dialogporten.WebApiClient.SampleWebApp/controllers/DialogportenTestController.cs +++ /dev/null @@ -1,27 +0,0 @@ -using Altinn.ApiClients.Dialogporten.Services; -using Microsoft.AspNetCore.Mvc; - -namespace Digdir.Library.Dialogporten.WebApiClient.SampleWebApp.controllers; - -[ApiController] -[Route("[controller]")] -public class DialogportenTestController : ControllerBase -{ - private readonly IDialogTokenVerifier _dialogTokenVerifier; - public DialogportenTestController(IDialogTokenVerifier dialogTokenVerifier) - { - _dialogTokenVerifier = dialogTokenVerifier; - } - [HttpGet] - public string Get() - { - return "This is the Dialogporten Test Controller"; - } - - [HttpGet] - [Route("verify/{token}")] - public bool Verify(string token) - { - return _dialogTokenVerifier.Verify(token); - } -} diff --git a/src/Digdir.Library.Dialogporten.WebApiClient.SampleWebApp/Digdir.Library.Dialogporten.WebApiClient.SampleWebApp.csproj b/src/Digdir.Library.Dialogporten.WebApiClient.WebApiSample/Digdir.Library.Dialogporten.WebApiClient.WebApiSample.csproj similarity index 53% rename from src/Digdir.Library.Dialogporten.WebApiClient.SampleWebApp/Digdir.Library.Dialogporten.WebApiClient.SampleWebApp.csproj rename to src/Digdir.Library.Dialogporten.WebApiClient.WebApiSample/Digdir.Library.Dialogporten.WebApiClient.WebApiSample.csproj index fd9d0f2b0..8102a8f83 100644 --- a/src/Digdir.Library.Dialogporten.WebApiClient.SampleWebApp/Digdir.Library.Dialogporten.WebApiClient.SampleWebApp.csproj +++ b/src/Digdir.Library.Dialogporten.WebApiClient.WebApiSample/Digdir.Library.Dialogporten.WebApiClient.WebApiSample.csproj @@ -7,13 +7,11 @@ - + - - PreserveNewest - + diff --git a/src/Digdir.Library.Dialogporten.WebApiClient.WebApiSample/Program.cs b/src/Digdir.Library.Dialogporten.WebApiClient.WebApiSample/Program.cs new file mode 100644 index 000000000..dca6e83ae --- /dev/null +++ b/src/Digdir.Library.Dialogporten.WebApiClient.WebApiSample/Program.cs @@ -0,0 +1,31 @@ +using Altinn.ApiClients.Dialogporten; +using Altinn.ApiClients.Dialogporten.Features.V1; +using Microsoft.AspNetCore.Mvc; + +var builder = WebApplication.CreateBuilder(args); + +var dialogportenSettings = builder.Configuration + .GetSection("DialogportenSettings") + .Get()!; +builder.Services.AddDialogportenClient(dialogportenSettings); + +builder.Services.AddOpenApi(); + +var app = builder.Build(); +app.MapOpenApi(); +app.UseHttpsRedirection(); + +app.MapPost("/dialogTokenVerify", ( + [FromServices] IDialogTokenVerifier dialogTokenVerifier, + [FromBody] string token) + => dialogTokenVerifier.Verify(token) + ? Results.Ok() + : Results.Unauthorized()); + +app.MapGet("/dialog/{dialogId:Guid}", ( + [FromServices] IServiceownerApi serviceOwnerApi, + [FromRoute] Guid dialogId, + CancellationToken cancellationToken) + => Results.Ok(serviceOwnerApi.V1ServiceOwnerDialogsGetGetDialog(dialogId, null!, cancellationToken))); + +app.Run(); diff --git a/src/Digdir.Library.Dialogporten.WebApiClient.SampleWebApp/Properties/launchSettings.json b/src/Digdir.Library.Dialogporten.WebApiClient.WebApiSample/Properties/launchSettings.json similarity index 80% rename from src/Digdir.Library.Dialogporten.WebApiClient.SampleWebApp/Properties/launchSettings.json rename to src/Digdir.Library.Dialogporten.WebApiClient.WebApiSample/Properties/launchSettings.json index 93c932b29..67adf16f7 100644 --- a/src/Digdir.Library.Dialogporten.WebApiClient.SampleWebApp/Properties/launchSettings.json +++ b/src/Digdir.Library.Dialogporten.WebApiClient.WebApiSample/Properties/launchSettings.json @@ -5,7 +5,7 @@ "commandName": "Project", "dotnetRunMessages": true, "launchBrowser": false, - "applicationUrl": "http://localhost:5271", + "applicationUrl": "http://localhost:5006", "environmentVariables": { "ASPNETCORE_ENVIRONMENT": "Development" } @@ -14,7 +14,7 @@ "commandName": "Project", "dotnetRunMessages": true, "launchBrowser": false, - "applicationUrl": "https://localhost:7273;http://localhost:5271", + "applicationUrl": "https://localhost:7171;http://localhost:5006", "environmentVariables": { "ASPNETCORE_ENVIRONMENT": "Development" } diff --git a/src/Digdir.Library.Dialogporten.WebApiClient.WebApiSample/WebApiSample.http b/src/Digdir.Library.Dialogporten.WebApiClient.WebApiSample/WebApiSample.http new file mode 100644 index 000000000..4c896e588 --- /dev/null +++ b/src/Digdir.Library.Dialogporten.WebApiClient.WebApiSample/WebApiSample.http @@ -0,0 +1,16 @@ +@HostAddress = http://localhost:5006 +@dialogId = "DIALOG_ID_HERE" +@dialogToken = "DIALOG_TOKEN_HERE" + +### Verify DialogToken + +POST {{HostAddress}}/dialogTokenVerify/ +Accept: application/json + +{ + "token": {{dialogToken}} +} + +### Get dialog by id +GET {{HostAddress}}/dialog/{{dialogId}}} +Accept: application/json diff --git a/src/Digdir.Library.Dialogporten.WebApiClient.WebApiSample/appsettings.json b/src/Digdir.Library.Dialogporten.WebApiClient.WebApiSample/appsettings.json new file mode 100644 index 000000000..c8998404d --- /dev/null +++ b/src/Digdir.Library.Dialogporten.WebApiClient.WebApiSample/appsettings.json @@ -0,0 +1,19 @@ +{ + "Logging": { + "LogLevel": { + "Default": "Information", + "Microsoft.AspNetCore": "Warning" + } + }, + "AllowedHosts": "*", + "DialogportenSettings": { + "BaseUri": "https://localhost:7214", + "ThrowOnPublicKeyFetchInit": false, + "Maskinporten": { + "Environment": "test", + "Scope": "digdir:dialogporten.serviceprovider digdir:dialogporten.serviceprovider.search", + "ClientId": "Configure in local secrets", + "EncodedJwk": "Configure in local secrets" + } + } +} diff --git a/src/Digdir.Library.Dialogporten.WebApiClient/Common/Exceptions/IncompleteDialogportenClientInitializationException.cs b/src/Digdir.Library.Dialogporten.WebApiClient/Common/Exceptions/IncompleteDialogportenClientInitializationException.cs new file mode 100644 index 000000000..6c08ce255 --- /dev/null +++ b/src/Digdir.Library.Dialogporten.WebApiClient/Common/Exceptions/IncompleteDialogportenClientInitializationException.cs @@ -0,0 +1,3 @@ +namespace Altinn.ApiClients.Dialogporten.Common.Exceptions; + +public sealed class IncompleteDialogportenClientInitializationException(string message) : Exception(message); diff --git a/src/Digdir.Library.Dialogporten.WebApiClient/Config/DialogportenSettings.cs b/src/Digdir.Library.Dialogporten.WebApiClient/Config/DialogportenSettings.cs deleted file mode 100644 index a4b8fba47..000000000 --- a/src/Digdir.Library.Dialogporten.WebApiClient/Config/DialogportenSettings.cs +++ /dev/null @@ -1,12 +0,0 @@ -using Altinn.ApiClients.Maskinporten.Config; - -namespace Altinn.ApiClients.Dialogporten.Config; - -public sealed class DialogportenSettings -{ - public string BaseUri { get; set; } = null!; - public MaskinportenSettings Maskinporten { get; set; } = null!; -#pragma warning disable CA1822 // Mark members as static - internal bool Validate() => true; -#pragma warning restore CA1822 // Mark members as static -} diff --git a/src/Digdir.Library.Dialogporten.WebApiClient/DialogportenSettings.cs b/src/Digdir.Library.Dialogporten.WebApiClient/DialogportenSettings.cs new file mode 100644 index 000000000..2861026cf --- /dev/null +++ b/src/Digdir.Library.Dialogporten.WebApiClient/DialogportenSettings.cs @@ -0,0 +1,25 @@ +using Altinn.ApiClients.Maskinporten.Config; + +namespace Altinn.ApiClients.Dialogporten; + +public sealed class DialogportenSettings +{ + /// + /// The base URI for the dialogporten endpoint, up to but excluding "/api/v...". + /// For example the base URI of 'https://altinn-tt02-api.azure-api.net/dialogporten/api/v1/serviceowner/dialogs' + /// is 'https://altinn-tt02-api.azure-api.net/dialogporten'. + /// + public string BaseUri { get; set; } = null!; + + /// + /// If true, the library will throw an exception if it cannot fetch public keys from dialogporten .wellKnown endpoint. + /// + /// + /// Default is true. + /// + public bool ThrowOnPublicKeyFetchInit { get; set; } = true; + + public MaskinportenSettings Maskinporten { get; set; } = null!; + + internal static bool Validate() => true; +} diff --git a/src/Digdir.Library.Dialogporten.WebApiClient/IDialogTokenVerifier.cs b/src/Digdir.Library.Dialogporten.WebApiClient/IDialogTokenVerifier.cs new file mode 100644 index 000000000..602a8abf1 --- /dev/null +++ b/src/Digdir.Library.Dialogporten.WebApiClient/IDialogTokenVerifier.cs @@ -0,0 +1,6 @@ +namespace Altinn.ApiClients.Dialogporten; + +public interface IDialogTokenVerifier +{ + bool Verify(ReadOnlySpan token); +} diff --git a/src/Digdir.Library.Dialogporten.WebApiClient/Interfaces/IInternalDialogportenApi.cs b/src/Digdir.Library.Dialogporten.WebApiClient/Infrastructure/IInternalDialogportenApi.cs similarity index 91% rename from src/Digdir.Library.Dialogporten.WebApiClient/Interfaces/IInternalDialogportenApi.cs rename to src/Digdir.Library.Dialogporten.WebApiClient/Infrastructure/IInternalDialogportenApi.cs index 31ee74605..fae0f2fbb 100644 --- a/src/Digdir.Library.Dialogporten.WebApiClient/Interfaces/IInternalDialogportenApi.cs +++ b/src/Digdir.Library.Dialogporten.WebApiClient/Infrastructure/IInternalDialogportenApi.cs @@ -1,6 +1,6 @@ using Refit; -namespace Altinn.ApiClients.Dialogporten.Interfaces; +namespace Altinn.ApiClients.Dialogporten.Infrastructure; internal interface IInternalDialogportenApi { diff --git a/src/Digdir.Library.Dialogporten.WebApiClient/Extensions/ServiceCollectionExtensions.cs b/src/Digdir.Library.Dialogporten.WebApiClient/ServiceCollectionExtensions.cs similarity index 92% rename from src/Digdir.Library.Dialogporten.WebApiClient/Extensions/ServiceCollectionExtensions.cs rename to src/Digdir.Library.Dialogporten.WebApiClient/ServiceCollectionExtensions.cs index 4a05117fc..b1005b1ae 100644 --- a/src/Digdir.Library.Dialogporten.WebApiClient/Extensions/ServiceCollectionExtensions.cs +++ b/src/Digdir.Library.Dialogporten.WebApiClient/ServiceCollectionExtensions.cs @@ -1,7 +1,6 @@ using System.CodeDom.Compiler; using System.Reflection; -using Altinn.ApiClients.Dialogporten.Config; -using Altinn.ApiClients.Dialogporten.Interfaces; +using Altinn.ApiClients.Dialogporten.Infrastructure; using Altinn.ApiClients.Dialogporten.Services; using Altinn.ApiClients.Maskinporten.Extensions; using Altinn.ApiClients.Maskinporten.Services; @@ -10,13 +9,13 @@ using Microsoft.Extensions.Options; using Refit; -namespace Altinn.ApiClients.Dialogporten.Extensions; +namespace Altinn.ApiClients.Dialogporten; public static class ServiceCollectionExtensions { public static IServiceCollection AddDialogportenClient(this IServiceCollection services, DialogportenSettings settings) { - if (!settings.Validate()) + if (!DialogportenSettings.Validate()) { throw new InvalidOperationException("Invalid configuration"); } diff --git a/src/Digdir.Library.Dialogporten.WebApiClient/Services/DialogTokenVerifier.cs b/src/Digdir.Library.Dialogporten.WebApiClient/Services/DialogTokenVerifier.cs index a83c5493f..a7c3251fb 100644 --- a/src/Digdir.Library.Dialogporten.WebApiClient/Services/DialogTokenVerifier.cs +++ b/src/Digdir.Library.Dialogporten.WebApiClient/Services/DialogTokenVerifier.cs @@ -4,11 +4,6 @@ namespace Altinn.ApiClients.Dialogporten.Services; -public interface IDialogTokenVerifier -{ - bool Verify(ReadOnlySpan token); -} - internal sealed class DialogTokenVerifier : IDialogTokenVerifier { public bool Verify(ReadOnlySpan token) diff --git a/src/Digdir.Library.Dialogporten.WebApiClient/Services/EdDsaSecurityKeysCacheService.cs b/src/Digdir.Library.Dialogporten.WebApiClient/Services/EdDsaSecurityKeysCacheService.cs index 23d0b8d9c..bc27df3e7 100644 --- a/src/Digdir.Library.Dialogporten.WebApiClient/Services/EdDsaSecurityKeysCacheService.cs +++ b/src/Digdir.Library.Dialogporten.WebApiClient/Services/EdDsaSecurityKeysCacheService.cs @@ -1,48 +1,84 @@ using System.Buffers.Text; using System.Collections.ObjectModel; -using System.Net; -using Altinn.ApiClients.Dialogporten.Config; -using Altinn.ApiClients.Dialogporten.Interfaces; +using Altinn.ApiClients.Dialogporten.Common; +using Altinn.ApiClients.Dialogporten.Common.Exceptions; +using Altinn.ApiClients.Dialogporten.Infrastructure; using Microsoft.Extensions.DependencyInjection; using Microsoft.Extensions.Hosting; using Microsoft.Extensions.Logging; +using Microsoft.Extensions.Options; using NSec.Cryptography; namespace Altinn.ApiClients.Dialogporten.Services; internal sealed class EdDsaSecurityKeysCacheService : BackgroundService { - public static ReadOnlyCollection PublicKeys => _keys.AsReadOnly(); - private static volatile List _keys = []; + internal static ReadOnlyCollection PublicKeys => _publicKeys.AsReadOnly(); + private static volatile List _publicKeys = []; - private readonly PeriodicTimer _timer = new(TimeSpan.FromHours(12)); - private readonly ILogger _logger; + private static readonly TimeSpan InitInterval = TimeSpan.FromSeconds(10); + private static readonly TimeSpan ErrorInterval = TimeSpan.FromMinutes(10); + private static readonly TimeSpan RefreshInterval = TimeSpan.FromHours(12); + + private readonly PeriodicTimer _timer = new(InitInterval); private readonly IServiceScopeFactory _serviceScopeFactory; + private readonly ILogger _logger; + private readonly DialogportenSettings _settings; private const string EdDsaAlg = "EdDSA"; - public EdDsaSecurityKeysCacheService(ILogger logger, IServiceScopeFactory serviceScopeFactory) + public EdDsaSecurityKeysCacheService( + IServiceScopeFactory serviceScopeFactory, + ILogger logger, + IOptions settings) { - _logger = logger; _serviceScopeFactory = serviceScopeFactory; + _logger = logger; + _settings = settings.Value; + } + + public override async Task StartAsync(CancellationToken cancellationToken) + { + if (!_settings.ThrowOnPublicKeyFetchInit) + { + await base.StartAsync(cancellationToken); + return; + } + + if (!await TryRefreshAsync(cancellationToken)) + { + throw new IncompleteDialogportenClientInitializationException("Failed to fetch public keys."); + } + + _timer.Period = RefreshInterval; + await base.StartAsync(cancellationToken); } protected override async Task ExecuteAsync(CancellationToken cancellationToken) { while (await _timer.WaitForNextTickAsync(cancellationToken)) { - try - { - await RefreshAsync(cancellationToken); - } - catch (Exception ex) - { - _logger.LogError(ex, "An error occurred while refreshing the EdDsa keys."); - } + _timer.Period = await TryRefreshAsync(cancellationToken) + ? RefreshInterval + : ErrorInterval; } + } - await RefreshAsync(cancellationToken); + private async Task TryRefreshAsync(CancellationToken cancellationToken) + { + try + { + await RefreshAsync(cancellationToken); + } + catch (Exception e) + { + _logger.LogError(e, "An error occurred while refreshing the EdDsa keys."); + return false; + } + + return true; } + private async Task RefreshAsync(CancellationToken cancellationToken) { using var scope = _serviceScopeFactory.CreateScope(); @@ -52,14 +88,14 @@ private async Task RefreshAsync(CancellationToken cancellationToken) var keys = jwks.Keys .Where(x => StringComparer.OrdinalIgnoreCase.Equals(x.Alg, EdDsaAlg)) .Select(k => new PublicKeyPair( + k.Kid, PublicKey.Import( SignatureAlgorithm.Ed25519, Base64Url.DecodeFromChars(k.X), - KeyBlobFormat.RawPublicKey), - k.Kid)) + KeyBlobFormat.RawPublicKey))) .ToList(); - _keys = keys; + _publicKeys = keys; } public override void Dispose() @@ -69,4 +105,4 @@ public override void Dispose() } } -internal sealed record PublicKeyPair(PublicKey Key, string Kid); +internal sealed record PublicKeyPair(string Kid, PublicKey Key); From 97bd96f76ecff74dfc07ebe1d00c3b1a57a2c32d Mon Sep 17 00:00:00 2001 From: Magnus Sandgren <5285192+MagnusSandgren@users.noreply.github.com> Date: Thu, 13 Feb 2025 12:37:13 +0100 Subject: [PATCH 148/169] Fix format issue --- .../Program.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Digdir.Library.Dialogporten.WebApiClient.WebApiSample/Program.cs b/src/Digdir.Library.Dialogporten.WebApiClient.WebApiSample/Program.cs index dca6e83ae..2c47fcb56 100644 --- a/src/Digdir.Library.Dialogporten.WebApiClient.WebApiSample/Program.cs +++ b/src/Digdir.Library.Dialogporten.WebApiClient.WebApiSample/Program.cs @@ -17,7 +17,7 @@ app.MapPost("/dialogTokenVerify", ( [FromServices] IDialogTokenVerifier dialogTokenVerifier, - [FromBody] string token) + [FromBody] string token) => dialogTokenVerifier.Verify(token) ? Results.Ok() : Results.Unauthorized()); From 3ce164b318c7a0da62e965323c3d0398347da566 Mon Sep 17 00:00:00 2001 From: Magnus Sandgren <5285192+MagnusSandgren@users.noreply.github.com> Date: Thu, 13 Feb 2025 16:13:42 +0100 Subject: [PATCH 149/169] WIP --- Digdir.Domain.Dialogporten.sln | 13 ++ ...r.Library.Dialogporten.WebApiClient.csproj | 5 + .../ServiceCollectionExtensions.cs | 4 +- .../Services/DialogTokenVerifier.cs | 175 ++++++++++++------ .../Services/EdDsaSecurityKeysCacheService.cs | 22 ++- .../DialogTokenVerifierTests.cs | 38 ++++ ...ialogporten.WebApiClient.Unit.Tests.csproj | 26 +++ 7 files changed, 222 insertions(+), 61 deletions(-) create mode 100644 tests/Digdir.Library.Dialogporten.WebApiClient.Unit.Tests/DialogTokenVerifierTests.cs create mode 100644 tests/Digdir.Library.Dialogporten.WebApiClient.Unit.Tests/Digdir.Library.Dialogporten.WebApiClient.Unit.Tests.csproj diff --git a/Digdir.Domain.Dialogporten.sln b/Digdir.Domain.Dialogporten.sln index 90ec37401..4d0dbf9a5 100644 --- a/Digdir.Domain.Dialogporten.sln +++ b/Digdir.Domain.Dialogporten.sln @@ -71,6 +71,12 @@ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Digdir.Tool.Dialogporten.La EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Digdir.Library.Dialogporten.WebApiClient.WebApiSample", "src\Digdir.Library.Dialogporten.WebApiClient.WebApiSample\Digdir.Library.Dialogporten.WebApiClient.WebApiSample.csproj", "{FBF19369-21CD-437D-BB88-CCB81EC947CF}" EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Libraries", "Libraries", "{21A54524-CC15-42A7-804B-1E4DEBFAA1F7}" +EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "WebApiClient", "WebApiClient", "{020E53CD-4575-44BA-81AC-26CE948EE0E7}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Digdir.Library.Dialogporten.WebApiClient.Unit.Tests", "tests\Digdir.Library.Dialogporten.WebApiClient.Unit.Tests\Digdir.Library.Dialogporten.WebApiClient.Unit.Tests.csproj", "{E6CBC569-6821-4DBB-A819-AC95AA8A0682}" +EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution Debug|Any CPU = Debug|Any CPU @@ -173,6 +179,10 @@ Global {FBF19369-21CD-437D-BB88-CCB81EC947CF}.Debug|Any CPU.Build.0 = Debug|Any CPU {FBF19369-21CD-437D-BB88-CCB81EC947CF}.Release|Any CPU.ActiveCfg = Release|Any CPU {FBF19369-21CD-437D-BB88-CCB81EC947CF}.Release|Any CPU.Build.0 = Release|Any CPU + {E6CBC569-6821-4DBB-A819-AC95AA8A0682}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {E6CBC569-6821-4DBB-A819-AC95AA8A0682}.Debug|Any CPU.Build.0 = Debug|Any CPU + {E6CBC569-6821-4DBB-A819-AC95AA8A0682}.Release|Any CPU.ActiveCfg = Release|Any CPU + {E6CBC569-6821-4DBB-A819-AC95AA8A0682}.Release|Any CPU.Build.0 = Release|Any CPU EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE @@ -206,6 +216,9 @@ Global {F8CB7159-4346-4436-9C35-BFCFDDE5DC2B} = {9B809C3A-B169-4599-A2D3-A25E87C510FC} {B0E0E9EE-AFBE-4013-908C-5F8DF66AB671} = {3C2C775D-F2D1-42A2-B53F-CC6D5FF59633} {FBF19369-21CD-437D-BB88-CCB81EC947CF} = {9B809C3A-B169-4599-A2D3-A25E87C510FC} + {21A54524-CC15-42A7-804B-1E4DEBFAA1F7} = {CADB8189-4AA1-4732-844A-C41DBF3EC8B7} + {020E53CD-4575-44BA-81AC-26CE948EE0E7} = {21A54524-CC15-42A7-804B-1E4DEBFAA1F7} + {E6CBC569-6821-4DBB-A819-AC95AA8A0682} = {020E53CD-4575-44BA-81AC-26CE948EE0E7} EndGlobalSection GlobalSection(ExtensibilityGlobals) = postSolution SolutionGuid = {B2FE67FF-7622-4AFB-AD8E-961B6A39D888} 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 6c4b0fc4b..4b44b6e50 100644 --- a/src/Digdir.Library.Dialogporten.WebApiClient/Digdir.Library.Dialogporten.WebApiClient.csproj +++ b/src/Digdir.Library.Dialogporten.WebApiClient/Digdir.Library.Dialogporten.WebApiClient.csproj @@ -32,4 +32,9 @@ + + + + + diff --git a/src/Digdir.Library.Dialogporten.WebApiClient/ServiceCollectionExtensions.cs b/src/Digdir.Library.Dialogporten.WebApiClient/ServiceCollectionExtensions.cs index b1005b1ae..b16a17555 100644 --- a/src/Digdir.Library.Dialogporten.WebApiClient/ServiceCollectionExtensions.cs +++ b/src/Digdir.Library.Dialogporten.WebApiClient/ServiceCollectionExtensions.cs @@ -42,7 +42,9 @@ public static IServiceCollection AddDialogportenClient(this IServiceCollection s .ConfigureHttpClient(c => c.BaseAddress = new Uri(settings.BaseUri)); services.AddHostedService(); - services.TryAddScoped(); + services.TryAddTransient(); + services.TryAddSingleton(); + services.TryAddSingleton(x => x.GetRequiredService()); return services; } diff --git a/src/Digdir.Library.Dialogporten.WebApiClient/Services/DialogTokenVerifier.cs b/src/Digdir.Library.Dialogporten.WebApiClient/Services/DialogTokenVerifier.cs index a7c3251fb..e385bc889 100644 --- a/src/Digdir.Library.Dialogporten.WebApiClient/Services/DialogTokenVerifier.cs +++ b/src/Digdir.Library.Dialogporten.WebApiClient/Services/DialogTokenVerifier.cs @@ -1,4 +1,5 @@ using System.Buffers.Text; +using System.Text; using System.Text.Json; using NSec.Cryptography; @@ -6,68 +7,132 @@ namespace Altinn.ApiClients.Dialogporten.Services; internal sealed class DialogTokenVerifier : IDialogTokenVerifier { + private readonly IEdDsaSecurityKeysCache _publicKeysCache; + + public DialogTokenVerifier(IEdDsaSecurityKeysCache publicKeysCache) + { + _publicKeysCache = publicKeysCache; + } + public bool Verify(ReadOnlySpan token) { - try // Amund: me no like + var publicKeys = _publicKeysCache.PublicKeys; + if (publicKeys.Count == 0) + { + // TODO: Fix this + throw new InvalidOperationException(); + } + + Span tokenByteSpan = stackalloc byte[Base64Url.GetMaxDecodedLength(token.Length)]; + if (!TryExtractTokenParts(token, tokenByteSpan, out var headerSpan, out var bodySpan, out var signatureSpan)) { - if (EdDsaSecurityKeysCacheService.PublicKeys.Count == 0) - { - return false; - } - var publicKeyPair = EdDsaSecurityKeysCacheService.PublicKeys[0]; - - var tokenPartEnumerator = token.Split('.'); - if (!tokenPartEnumerator.MoveNext()) - { - return false; - } - - // Amund: Sparer ca 3 operations i IL med å lagre i egen variabel først - var current = tokenPartEnumerator.Current; - Span header = stackalloc byte[current.End.Value - current.Start.Value]; - if (!tokenPartEnumerator.MoveNext() || !Base64Url.TryDecodeFromChars(token[current], header, out var headerLength)) - { - return false; - } - - current = tokenPartEnumerator.Current; - Span body = stackalloc byte[current.End.Value - current.Start.Value]; - if (!tokenPartEnumerator.MoveNext() || !Base64Url.TryDecodeFromChars(token[current], body, out var bodyLength)) - { - return false; - } - - current = tokenPartEnumerator.Current; - Span signature = stackalloc byte[current.End.Value - current.Start.Value]; - if (tokenPartEnumerator.MoveNext() && !Base64Url.TryDecodeFromChars(token[current], signature, out _)) - { - return false; - } - var headerJson = JsonSerializer.Deserialize(header); - if (!headerJson.TryGetProperty("kid", out var value) && value.GetString() != publicKeyPair.Kid) - { - return false; - } - - Span headerAndBody = stackalloc byte[headerLength + bodyLength + 1]; - header[..headerLength].CopyTo(headerAndBody); - headerAndBody[header.Length] = (byte)'.'; - body[..bodyLength].CopyTo(headerAndBody[(header.Length + 1)..]); - - if (!SignatureAlgorithm.Ed25519.Verify(publicKeyPair.Key, headerAndBody, signature)) - { - return false; - } - - var bodyJson = JsonSerializer.Deserialize(body); - - return TryGetExpires(bodyJson, out var expiresOffset) && - expiresOffset >= DateTimeOffset.UtcNow; + return false; } - catch (FormatException) + + var headerAndBodySpan = tokenByteSpan[..(headerSpan.Length + bodySpan.Length + 1)]; + var lala = Encoding.UTF8.GetString(headerAndBodySpan).Split('.'); + + if (!SignatureAlgorithm.Ed25519.Verify(publicKeys[1].Key, headerAndBodySpan, signatureSpan)) { return false; } + + return false; + // TODO: Get correct public key based on kid + + // try // Amund: me no like + // { + // if (EdDsaSecurityKeysCacheService.PublicKeys.Count == 0) + // { + // return false; + // } + // var publicKeyPair = EdDsaSecurityKeysCacheService.PublicKeys[0]; + // + // var tokenPartEnumerator = token.Split('.'); + // if (!tokenPartEnumerator.MoveNext()) + // { + // return false; + // } + // + // // Amund: Sparer ca 3 operations i IL med å lagre i egen variabel først + // var current = tokenPartEnumerator.Current; + // Span header = stackalloc byte[current.End.Value - current.Start.Value]; + // if (!tokenPartEnumerator.MoveNext() || !Base64Url.TryDecodeFromChars(token[current], header, out var headerLength)) + // { + // return false; + // } + // + // current = tokenPartEnumerator.Current; + // Span body = stackalloc byte[current.End.Value - current.Start.Value]; + // if (!tokenPartEnumerator.MoveNext() || !Base64Url.TryDecodeFromChars(token[current], body, out var bodyLength)) + // { + // return false; + // } + // + // current = tokenPartEnumerator.Current; + // Span signature = stackalloc byte[current.End.Value - current.Start.Value]; + // if (tokenPartEnumerator.MoveNext() && !Base64Url.TryDecodeFromChars(token[current], signature, out _)) + // { + // return false; + // } + // var headerJson = JsonSerializer.Deserialize(header); + // if (!headerJson.TryGetProperty("kid", out var value) && value.GetString() != publicKeyPair.Kid) + // { + // return false; + // } + // + // Span headerAndBody = stackalloc byte[headerLength + bodyLength + 1]; + // header[..headerLength].CopyTo(headerAndBody); + // headerAndBody[header.Length] = (byte)'.'; + // body[..bodyLength].CopyTo(headerAndBody[(header.Length + 1)..]); + // + // if (!SignatureAlgorithm.Ed25519.Verify(publicKeyPair.Key, headerAndBody, signature)) + // { + // return false; + // } + // + // var bodyJson = JsonSerializer.Deserialize(body); + // + // return TryGetExpires(bodyJson, out var expiresOffset) && + // expiresOffset >= DateTimeOffset.UtcNow; + // } + // catch (FormatException) + // { + // return false; + // } + } + + private static bool TryExtractTokenParts( + ReadOnlySpan token, + Span tokenBytes, + out ReadOnlySpan header, + out ReadOnlySpan body, + out ReadOnlySpan signature) + { + header = body = signature = default; + var enumerator = token.Split('.'); + var spanPointer = 0; + + // Header + if (!enumerator.MoveNext()) return false; + var spanPointerNext = spanPointer + Base64Url.DecodeFromChars(token[enumerator.Current], tokenBytes[spanPointer..]); + header = tokenBytes[spanPointer..spanPointerNext]; + tokenBytes[spanPointerNext++] = (byte)'.'; + spanPointer = spanPointerNext; + + // Body + if (!enumerator.MoveNext()) return false; + spanPointerNext = spanPointer + Base64Url.DecodeFromChars(token[enumerator.Current], tokenBytes[spanPointer..]); + body = tokenBytes[spanPointer..spanPointerNext]; + tokenBytes[spanPointerNext++] = (byte)'.'; + spanPointer = spanPointerNext; + + // Signature + if (!enumerator.MoveNext()) return false; + spanPointerNext = spanPointer + Base64Url.DecodeFromChars(token[enumerator.Current], tokenBytes[spanPointer..]); + signature = tokenBytes[spanPointer..spanPointerNext]; + + return !enumerator.MoveNext(); } private static bool TryGetExpires(JsonElement bodyJson, out DateTimeOffset expires) diff --git a/src/Digdir.Library.Dialogporten.WebApiClient/Services/EdDsaSecurityKeysCacheService.cs b/src/Digdir.Library.Dialogporten.WebApiClient/Services/EdDsaSecurityKeysCacheService.cs index bc27df3e7..22b4b6c2c 100644 --- a/src/Digdir.Library.Dialogporten.WebApiClient/Services/EdDsaSecurityKeysCacheService.cs +++ b/src/Digdir.Library.Dialogporten.WebApiClient/Services/EdDsaSecurityKeysCacheService.cs @@ -11,11 +11,20 @@ namespace Altinn.ApiClients.Dialogporten.Services; -internal sealed class EdDsaSecurityKeysCacheService : BackgroundService +internal interface IEdDsaSecurityKeysCache { - internal static ReadOnlyCollection PublicKeys => _publicKeys.AsReadOnly(); - private static volatile List _publicKeys = []; + ReadOnlyCollection PublicKeys { get; } +} +internal sealed class DefaultEdDsaSecurityKeysCache : IEdDsaSecurityKeysCache +{ + private List _publicKeys = []; + public ReadOnlyCollection PublicKeys => _publicKeys.AsReadOnly(); + internal void SetPublicKeys(List publicKeys) => _publicKeys = publicKeys; +} + +internal sealed class EdDsaSecurityKeysCacheService : BackgroundService +{ private static readonly TimeSpan InitInterval = TimeSpan.FromSeconds(10); private static readonly TimeSpan ErrorInterval = TimeSpan.FromMinutes(10); private static readonly TimeSpan RefreshInterval = TimeSpan.FromHours(12); @@ -24,15 +33,18 @@ internal sealed class EdDsaSecurityKeysCacheService : BackgroundService private readonly IServiceScopeFactory _serviceScopeFactory; private readonly ILogger _logger; private readonly DialogportenSettings _settings; + private readonly DefaultEdDsaSecurityKeysCache _cache; private const string EdDsaAlg = "EdDSA"; public EdDsaSecurityKeysCacheService( IServiceScopeFactory serviceScopeFactory, ILogger logger, - IOptions settings) + IOptions settings, + DefaultEdDsaSecurityKeysCache cache) { _serviceScopeFactory = serviceScopeFactory; _logger = logger; + _cache = cache; _settings = settings.Value; } @@ -95,7 +107,7 @@ private async Task RefreshAsync(CancellationToken cancellationToken) KeyBlobFormat.RawPublicKey))) .ToList(); - _publicKeys = keys; + _cache.SetPublicKeys(keys); } public override void Dispose() diff --git a/tests/Digdir.Library.Dialogporten.WebApiClient.Unit.Tests/DialogTokenVerifierTests.cs b/tests/Digdir.Library.Dialogporten.WebApiClient.Unit.Tests/DialogTokenVerifierTests.cs new file mode 100644 index 000000000..cfc2e8e4b --- /dev/null +++ b/tests/Digdir.Library.Dialogporten.WebApiClient.Unit.Tests/DialogTokenVerifierTests.cs @@ -0,0 +1,38 @@ +using System.Buffers.Text; +using System.Collections.ObjectModel; +using Altinn.ApiClients.Dialogporten.Services; +using NSec.Cryptography; +using NSubstitute; + +namespace Digdir.Library.Dialogporten.WebApiClient.Unit.Tests; + +public class DialogTokenVerifierTests +{ + [Fact] + public void Test1() + { + // Arrange + const string dialogToken = "eyJhbGciOiJFZERTQSIsInR5cCI6IkpXVCIsImtpZCI6ImRldi1wcmltYXJ5LXNpZ25pbmcta2V5In0.eyJqdGkiOiI1MDk1YzdiMC0xODA5LTRkNDMtODE4ZC1lYTkzYWJmMmQ5NGQiLCJjIjoidXJuOmFsdGlubjpwZXJzb246aWRlbnRpZmllci1ubzowODg5NTY5OTY4NCIsImwiOjMsInAiOiJ1cm46YWx0aW5uOm9yZ2FuaXphdGlvbjppZGVudGlmaWVyLW5vOjMxMzM0NTQ3NSIsInMiOiJ1cm46YWx0aW5uOnJlc291cmNlOnN1cGVyLXNpbXBsZS1zZXJ2aWNlIiwiaSI6IjAxOTRmZjZkLWRjOGMtNzdhNC04YTU0LWIwMDQxZDNiNDlmNiIsImEiOiJyZWFkIiwiaXNzIjoiaHR0cHM6Ly9sb2NhbGhvc3Q6NzIxNC9hcGkvdjEiLCJpYXQiOjE3Mzk0NTIxOTUsIm5iZiI6MTczOTQ1MjE5NSwiZXhwIjoxNzM5NDUyNzk1fQ.9Ii2mgqaeIV5bdSJchk00liajmdN8qWXjpyREKDyrGREV7DVE52v98Br8UxBt791sbvNXgTeZAdbDzS_MH7UBg"; + var keyCache = CreateEdDsaSecurityKeysCacheMock([ + new("dev-primary-signing-key", ToPublicKey("C8XkQ28jpOrKao-rI6m8qc4BqfkKBgBTll05az183Dg")), + new("dev-secondary-signing-key", ToPublicKey("OlP9jLxmFccltkzeiQerR4k2P3yWq5nKO3V9VXq5IvY")), + ]); + var sut = new DialogTokenVerifier(keyCache); + + // Act + var result = sut.Verify(dialogToken); + + // Assert + Assert.True(result); + } + + private static IEdDsaSecurityKeysCache CreateEdDsaSecurityKeysCacheMock(IEnumerable publicKeyPairs) + { + var keyCache = Substitute.For(); + keyCache.PublicKeys.Returns(new ReadOnlyCollection(publicKeyPairs.ToList())); + return keyCache; + } + + private static PublicKey ToPublicKey(string key) + => PublicKey.Import(SignatureAlgorithm.Ed25519, Base64Url.DecodeFromChars(key), KeyBlobFormat.RawPublicKey); +} diff --git a/tests/Digdir.Library.Dialogporten.WebApiClient.Unit.Tests/Digdir.Library.Dialogporten.WebApiClient.Unit.Tests.csproj b/tests/Digdir.Library.Dialogporten.WebApiClient.Unit.Tests/Digdir.Library.Dialogporten.WebApiClient.Unit.Tests.csproj new file mode 100644 index 000000000..c26e687a5 --- /dev/null +++ b/tests/Digdir.Library.Dialogporten.WebApiClient.Unit.Tests/Digdir.Library.Dialogporten.WebApiClient.Unit.Tests.csproj @@ -0,0 +1,26 @@ + + + + net9.0 + + false + true + + + + + + + + + + + + + + + + + + + From daf7b6ba83ee651894eabf8363ca48c3e27d3aa3 Mon Sep 17 00:00:00 2001 From: Amund Myrbostad Date: Fri, 14 Feb 2025 09:36:15 +0100 Subject: [PATCH 150/169] Comments and UserSecrets --- ...logporten.WebApiClient.WebApiSample.csproj | 2 ++ .../Services/DialogTokenVerifier.cs | 31 ++++++++++++++++++- 2 files changed, 32 insertions(+), 1 deletion(-) diff --git a/src/Digdir.Library.Dialogporten.WebApiClient.WebApiSample/Digdir.Library.Dialogporten.WebApiClient.WebApiSample.csproj b/src/Digdir.Library.Dialogporten.WebApiClient.WebApiSample/Digdir.Library.Dialogporten.WebApiClient.WebApiSample.csproj index 8102a8f83..beedf265b 100644 --- a/src/Digdir.Library.Dialogporten.WebApiClient.WebApiSample/Digdir.Library.Dialogporten.WebApiClient.WebApiSample.csproj +++ b/src/Digdir.Library.Dialogporten.WebApiClient.WebApiSample/Digdir.Library.Dialogporten.WebApiClient.WebApiSample.csproj @@ -1,7 +1,9 @@ + net9.0 + 750256a4-f332-4783-8802-8a7d9566f9cb enable enable diff --git a/src/Digdir.Library.Dialogporten.WebApiClient/Services/DialogTokenVerifier.cs b/src/Digdir.Library.Dialogporten.WebApiClient/Services/DialogTokenVerifier.cs index e385bc889..b173deee7 100644 --- a/src/Digdir.Library.Dialogporten.WebApiClient/Services/DialogTokenVerifier.cs +++ b/src/Digdir.Library.Dialogporten.WebApiClient/Services/DialogTokenVerifier.cs @@ -28,8 +28,37 @@ public bool Verify(ReadOnlySpan token) { return false; } - var headerAndBodySpan = tokenByteSpan[..(headerSpan.Length + bodySpan.Length + 1)]; + + // Amund Note: + // [x] Er signatureSpan korrekt? + // [x] signatureSpan korrekt lengde? 64 + // [x] signatureSpan korrekt innhold? + // [x] Er headerSpan korrekt? + // [x] headerSpan korrekt lengde? 59 + // [x] headerSpan korrekt innhold? + // [x] Er bodySpan korrekt? + // [x] bodySpan korrekt lengde? 346 + // [x] bodySpan korrekt innhold? + // [x] HeaderAndBodySpan virker korrekt med manuel Byte sjekk i debugger + // [x] HeaderAndBodySpan lengde er som forventet headderLen + BodyLen + 1 = 59 + 346 + 1 = 406 + + // Amund Note: Sig fra denne er lik med signatureSpan + // Manuelt sjekking av bytes viser at begge har 64 elementer (index 0 -> inc 63) + // sig[..64].SequenceEqual(signatureSpan) i debugger gir True + + // var enumerator = token.Split('.'); + // enumerator.MoveNext(); + // Span header = stackalloc byte[enumerator.Current.End.Value - enumerator.Current.Start.Value]; + // Base64Url.DecodeFromChars(token[enumerator.Current], header); + // enumerator.MoveNext(); + // Span body = stackalloc byte[enumerator.Current.End.Value - enumerator.Current.Start.Value]; + // Base64Url.DecodeFromChars(token[enumerator.Current], body); + // enumerator.MoveNext(); + // Span sig = stackalloc byte[token.Length]; + // Base64Url.DecodeFromChars(token[enumerator.Current], sig); + + var lala = Encoding.UTF8.GetString(headerAndBodySpan).Split('.'); if (!SignatureAlgorithm.Ed25519.Verify(publicKeys[1].Key, headerAndBodySpan, signatureSpan)) From 657518500fe26bf4552d832737d095d3dc6b45f5 Mon Sep 17 00:00:00 2001 From: Magnus Sandgren <5285192+MagnusSandgren@users.noreply.github.com> Date: Fri, 14 Feb 2025 14:55:19 +0100 Subject: [PATCH 151/169] WIP --- .../Common/IClock.cs | 11 + .../ServiceCollectionExtensions.cs | 2 + .../Services/DialogTokenVerifier.cs | 280 ++++++++++-------- .../DialogTokenVerifierTests.cs | 12 +- 4 files changed, 185 insertions(+), 120 deletions(-) create mode 100644 src/Digdir.Library.Dialogporten.WebApiClient/Common/IClock.cs diff --git a/src/Digdir.Library.Dialogporten.WebApiClient/Common/IClock.cs b/src/Digdir.Library.Dialogporten.WebApiClient/Common/IClock.cs new file mode 100644 index 000000000..a4c6b040d --- /dev/null +++ b/src/Digdir.Library.Dialogporten.WebApiClient/Common/IClock.cs @@ -0,0 +1,11 @@ +namespace Altinn.ApiClients.Dialogporten.Common; + +internal interface IClock +{ + DateTimeOffset UtcNow { get; } +} + +internal class DefaultClock : IClock +{ + public DateTimeOffset UtcNow => DateTimeOffset.UtcNow; +} diff --git a/src/Digdir.Library.Dialogporten.WebApiClient/ServiceCollectionExtensions.cs b/src/Digdir.Library.Dialogporten.WebApiClient/ServiceCollectionExtensions.cs index b16a17555..fa00083bc 100644 --- a/src/Digdir.Library.Dialogporten.WebApiClient/ServiceCollectionExtensions.cs +++ b/src/Digdir.Library.Dialogporten.WebApiClient/ServiceCollectionExtensions.cs @@ -1,5 +1,6 @@ using System.CodeDom.Compiler; using System.Reflection; +using Altinn.ApiClients.Dialogporten.Common; using Altinn.ApiClients.Dialogporten.Infrastructure; using Altinn.ApiClients.Dialogporten.Services; using Altinn.ApiClients.Maskinporten.Extensions; @@ -45,6 +46,7 @@ public static IServiceCollection AddDialogportenClient(this IServiceCollection s services.TryAddTransient(); services.TryAddSingleton(); services.TryAddSingleton(x => x.GetRequiredService()); + services.TryAddTransient(); return services; } diff --git a/src/Digdir.Library.Dialogporten.WebApiClient/Services/DialogTokenVerifier.cs b/src/Digdir.Library.Dialogporten.WebApiClient/Services/DialogTokenVerifier.cs index e385bc889..ef8d2efb3 100644 --- a/src/Digdir.Library.Dialogporten.WebApiClient/Services/DialogTokenVerifier.cs +++ b/src/Digdir.Library.Dialogporten.WebApiClient/Services/DialogTokenVerifier.cs @@ -1,6 +1,9 @@ using System.Buffers.Text; +using System.Collections.ObjectModel; +using System.Diagnostics.CodeAnalysis; using System.Text; using System.Text.Json; +using Altinn.ApiClients.Dialogporten.Common; using NSec.Cryptography; namespace Altinn.ApiClients.Dialogporten.Services; @@ -8,162 +11,207 @@ namespace Altinn.ApiClients.Dialogporten.Services; internal sealed class DialogTokenVerifier : IDialogTokenVerifier { private readonly IEdDsaSecurityKeysCache _publicKeysCache; + private readonly IClock _clock; - public DialogTokenVerifier(IEdDsaSecurityKeysCache publicKeysCache) + public DialogTokenVerifier(IEdDsaSecurityKeysCache publicKeysCache, IClock clock) { _publicKeysCache = publicKeysCache; + _clock = clock; } public bool Verify(ReadOnlySpan token) { - var publicKeys = _publicKeysCache.PublicKeys; - if (publicKeys.Count == 0) - { - // TODO: Fix this - throw new InvalidOperationException(); - } - - Span tokenByteSpan = stackalloc byte[Base64Url.GetMaxDecodedLength(token.Length)]; - if (!TryExtractTokenParts(token, tokenByteSpan, out var headerSpan, out var bodySpan, out var signatureSpan)) + if (!TryGetTokenParts(token, out var tokenParts)) { return false; } - var headerAndBodySpan = tokenByteSpan[..(headerSpan.Length + bodySpan.Length + 1)]; - var lala = Encoding.UTF8.GetString(headerAndBodySpan).Split('.'); - - if (!SignatureAlgorithm.Ed25519.Verify(publicKeys[1].Key, headerAndBodySpan, signatureSpan)) + Span tokenDecodeBuffer = stackalloc byte[Base64Url.GetMaxDecodedLength(token.Length)]; + if (!TryDecodeParts(tokenDecodeBuffer, tokenParts, out var decodedTokenParts)) { return false; } - return false; - // TODO: Get correct public key based on kid - - // try // Amund: me no like - // { - // if (EdDsaSecurityKeysCacheService.PublicKeys.Count == 0) - // { - // return false; - // } - // var publicKeyPair = EdDsaSecurityKeysCacheService.PublicKeys[0]; - // - // var tokenPartEnumerator = token.Split('.'); - // if (!tokenPartEnumerator.MoveNext()) - // { - // return false; - // } - // - // // Amund: Sparer ca 3 operations i IL med å lagre i egen variabel først - // var current = tokenPartEnumerator.Current; - // Span header = stackalloc byte[current.End.Value - current.Start.Value]; - // if (!tokenPartEnumerator.MoveNext() || !Base64Url.TryDecodeFromChars(token[current], header, out var headerLength)) - // { - // return false; - // } - // - // current = tokenPartEnumerator.Current; - // Span body = stackalloc byte[current.End.Value - current.Start.Value]; - // if (!tokenPartEnumerator.MoveNext() || !Base64Url.TryDecodeFromChars(token[current], body, out var bodyLength)) - // { - // return false; - // } - // - // current = tokenPartEnumerator.Current; - // Span signature = stackalloc byte[current.End.Value - current.Start.Value]; - // if (tokenPartEnumerator.MoveNext() && !Base64Url.TryDecodeFromChars(token[current], signature, out _)) - // { - // return false; - // } - // var headerJson = JsonSerializer.Deserialize(header); - // if (!headerJson.TryGetProperty("kid", out var value) && value.GetString() != publicKeyPair.Kid) - // { - // return false; - // } - // - // Span headerAndBody = stackalloc byte[headerLength + bodyLength + 1]; - // header[..headerLength].CopyTo(headerAndBody); - // headerAndBody[header.Length] = (byte)'.'; - // body[..bodyLength].CopyTo(headerAndBody[(header.Length + 1)..]); - // - // if (!SignatureAlgorithm.Ed25519.Verify(publicKeyPair.Key, headerAndBody, signature)) - // { - // return false; - // } - // - // var bodyJson = JsonSerializer.Deserialize(body); - // - // return TryGetExpires(bodyJson, out var expiresOffset) && - // expiresOffset >= DateTimeOffset.UtcNow; - // } - // catch (FormatException) - // { - // return false; - // } + return VerifySignature(tokenParts, decodedTokenParts) + && VerifyExpiration(decodedTokenParts); } - private static bool TryExtractTokenParts( - ReadOnlySpan token, - Span tokenBytes, - out ReadOnlySpan header, - out ReadOnlySpan body, - out ReadOnlySpan signature) + private static bool TryGetTokenParts(ReadOnlySpan token, out JwksTokenParts tokenParts) { - header = body = signature = default; + tokenParts = default; var enumerator = token.Split('.'); - var spanPointer = 0; - // Header if (!enumerator.MoveNext()) return false; - var spanPointerNext = spanPointer + Base64Url.DecodeFromChars(token[enumerator.Current], tokenBytes[spanPointer..]); - header = tokenBytes[spanPointer..spanPointerNext]; - tokenBytes[spanPointerNext++] = (byte)'.'; - spanPointer = spanPointerNext; + var header = token[enumerator.Current]; // Body if (!enumerator.MoveNext()) return false; - spanPointerNext = spanPointer + Base64Url.DecodeFromChars(token[enumerator.Current], tokenBytes[spanPointer..]); - body = tokenBytes[spanPointer..spanPointerNext]; - tokenBytes[spanPointerNext++] = (byte)'.'; - spanPointer = spanPointerNext; + var body = token[enumerator.Current]; // Signature if (!enumerator.MoveNext()) return false; - spanPointerNext = spanPointer + Base64Url.DecodeFromChars(token[enumerator.Current], tokenBytes[spanPointer..]); - signature = tokenBytes[spanPointer..spanPointerNext]; + var signature = token[enumerator.Current]; + tokenParts = new JwksTokenParts(token, header, body, signature); return !enumerator.MoveNext(); } - private static bool TryGetExpires(JsonElement bodyJson, out DateTimeOffset expires) + private static bool TryDecodeParts( + Span buffer, + JwksTokenParts parts, + out JwksTokenParts decodedParts) { - expires = default; - if (!bodyJson.TryGetProperty(DialogTokenClaimTypes.Expires, out var expiresElement)) + decodedParts = default; + var bufferPointer = 0; + if (!TryDecodePart(parts.Header, buffer, out var header, out var headerLength)) + { + return false; + } + + bufferPointer += headerLength; + buffer[bufferPointer++] = (byte)'.'; + if (!TryDecodePart(parts.Body, buffer[bufferPointer..], out var body, out var bodyLength)) { return false; } - if (!expiresElement.TryGetInt32(out var expiresIn)) + bufferPointer += bodyLength; + buffer[bufferPointer++] = (byte)'.'; + if (!TryDecodePart(parts.Signature, buffer[bufferPointer..], out var signature, out _)) { return false; } - expires = DateTimeOffset.FromUnixTimeSeconds(expiresIn); + + decodedParts = new JwksTokenParts(buffer, header, body, signature); return true; } -} -internal 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"; + private bool VerifySignature( + JwksTokenParts tokenParts, + JwksTokenParts decodedTokenParts) + { + var publicKeys = _publicKeysCache.PublicKeys; + if (publicKeys.Count == 0) + { + throw new InvalidOperationException( + "No public keys available. Most likely due to an error when fetching the " + + "public keys from the dialogporten well-known endpoint. Please check the " + + "logs for more information. Alternatively, set " + + "DialogportenSettings.ThrowOnPublicKeyFetchInit=true to ensure public " + + "keys are fetched before starting up the application."); + } + + var rawSignedPartLength = tokenParts.Header.Length + tokenParts.Body.Length + 1; + Span signedPartBuffer = stackalloc byte[Encoding.UTF8.GetMaxByteCount(rawSignedPartLength)]; + if (!Encoding.UTF8.TryGetBytes(tokenParts.Buffer[..rawSignedPartLength], signedPartBuffer, out var signedPartLength)) + { + return false; + } + + var signedPart = signedPartBuffer[..signedPartLength]; + + return TryGetPublicKey(publicKeys, decodedTokenParts.Header, out var publicKey) + && SignatureAlgorithm.Ed25519.Verify(publicKey, signedPart, decodedTokenParts.Signature); + } + + private bool VerifyExpiration(JwksTokenParts decodedTokenParts) + { + const string expiresPropertyName = "exp"; + if (!TryGetPropertyValue(decodedTokenParts.Body, expiresPropertyName, out var expiresSpan)) + { + return false; + } + + if (!Utf8Parser.TryParse(expiresSpan, out long expiresUnixTimeSeconds, out var bytesConsumed)) + { + return false; + } + + if (bytesConsumed != expiresSpan.Length) + { + return false; + } + + var expires = DateTimeOffset.FromUnixTimeSeconds(expiresUnixTimeSeconds); + return expires >= _clock.UtcNow; + } + + private static bool TryDecodePart(ReadOnlySpan tokenPart, Span buffer, out ReadOnlySpan span, out int length) + { + if (!Base64Url.TryDecodeFromChars(tokenPart, buffer, out length)) + { + span = default; + return false; + } + + span = buffer[..length]; + return true; + } + + private static bool TryGetPublicKey(ReadOnlyCollection keyPairs, ReadOnlySpan header, [NotNullWhen(true)] out PublicKey? publicKey) + { + const string kidPropertyName = "kid"; + publicKey = null; + if (!TryGetPropertyValue(header, kidPropertyName, out var tokenKid)) + { + return false; + } + + Span kidCharBuffer = stackalloc char[Encoding.UTF8.GetMaxCharCount(tokenKid.Length)]; + if (!Encoding.UTF8.TryGetChars(tokenKid, kidCharBuffer, out var charsWritten)) + { + return false; + } + + foreach (var (kid, key) in keyPairs) + { + if (!kid.AsSpan().SequenceEqual(kidCharBuffer[..charsWritten])) continue; + publicKey = key; + return true; + } + + return false; + } + + private static bool TryGetPropertyValue(ReadOnlySpan json, ReadOnlySpan name, out ReadOnlySpan value) + { + var reader = new Utf8JsonReader(json); + while (reader.Read()) + { + if (!IsPropertyName(reader, name)) continue; + reader.Read(); + value = reader.ValueSpan; + return true; + } + + value = default; + return false; + } + + private static bool IsPropertyName(Utf8JsonReader reader, ReadOnlySpan name) + { + return reader.TokenType == JsonTokenType.PropertyName && reader.ValueTextEquals(name); + } + + private readonly ref struct JwksTokenParts + where T : unmanaged + { + public ReadOnlySpan Buffer { get; } + + public ReadOnlySpan Header { get; } + + public ReadOnlySpan Body { get; } + + public ReadOnlySpan Signature { get; } + + public JwksTokenParts(ReadOnlySpan buffer, ReadOnlySpan header, ReadOnlySpan body, ReadOnlySpan signature) + { + Buffer = buffer; + Header = header; + Body = body; + Signature = signature; + } + } } + + diff --git a/tests/Digdir.Library.Dialogporten.WebApiClient.Unit.Tests/DialogTokenVerifierTests.cs b/tests/Digdir.Library.Dialogporten.WebApiClient.Unit.Tests/DialogTokenVerifierTests.cs index cfc2e8e4b..54f43f5f3 100644 --- a/tests/Digdir.Library.Dialogporten.WebApiClient.Unit.Tests/DialogTokenVerifierTests.cs +++ b/tests/Digdir.Library.Dialogporten.WebApiClient.Unit.Tests/DialogTokenVerifierTests.cs @@ -1,5 +1,7 @@ using System.Buffers.Text; using System.Collections.ObjectModel; +using System.Globalization; +using Altinn.ApiClients.Dialogporten.Common; using Altinn.ApiClients.Dialogporten.Services; using NSec.Cryptography; using NSubstitute; @@ -12,12 +14,14 @@ public class DialogTokenVerifierTests public void Test1() { // Arrange - const string dialogToken = "eyJhbGciOiJFZERTQSIsInR5cCI6IkpXVCIsImtpZCI6ImRldi1wcmltYXJ5LXNpZ25pbmcta2V5In0.eyJqdGkiOiI1MDk1YzdiMC0xODA5LTRkNDMtODE4ZC1lYTkzYWJmMmQ5NGQiLCJjIjoidXJuOmFsdGlubjpwZXJzb246aWRlbnRpZmllci1ubzowODg5NTY5OTY4NCIsImwiOjMsInAiOiJ1cm46YWx0aW5uOm9yZ2FuaXphdGlvbjppZGVudGlmaWVyLW5vOjMxMzM0NTQ3NSIsInMiOiJ1cm46YWx0aW5uOnJlc291cmNlOnN1cGVyLXNpbXBsZS1zZXJ2aWNlIiwiaSI6IjAxOTRmZjZkLWRjOGMtNzdhNC04YTU0LWIwMDQxZDNiNDlmNiIsImEiOiJyZWFkIiwiaXNzIjoiaHR0cHM6Ly9sb2NhbGhvc3Q6NzIxNC9hcGkvdjEiLCJpYXQiOjE3Mzk0NTIxOTUsIm5iZiI6MTczOTQ1MjE5NSwiZXhwIjoxNzM5NDUyNzk1fQ.9Ii2mgqaeIV5bdSJchk00liajmdN8qWXjpyREKDyrGREV7DVE52v98Br8UxBt791sbvNXgTeZAdbDzS_MH7UBg"; + const string dialogToken = "eyJhbGciOiJFZERTQSIsInR5cCI6IkpXVCIsImtpZCI6ImRwLXN0YWdpbmctMjQwMzIyLW81eW1uIn0.eyJqdGkiOiIzOGNmZGNiOS0zODhiLTQ3YjgtYTFiZi05ZjE1YjI4MTk4OTQiLCJjIjoidXJuOmFsdGlubjpwZXJzb246aWRlbnRpZmllci1ubzoxNDg4NjQ5ODIyNiIsImwiOjMsInAiOiJ1cm46YWx0aW5uOnBlcnNvbjppZGVudGlmaWVyLW5vOjE0ODg2NDk4MjI2IiwicyI6InVybjphbHRpbm46cmVzb3VyY2U6ZGFnbC1jb3JyZXNwb25kZW5jZSIsImkiOiIwMTk0ZmU4Mi05MjgwLTc3YTUtYTdjZC01ZmYwZTZhNmZhMDciLCJhIjoicmVhZCIsImlzcyI6Imh0dHBzOi8vcGxhdGZvcm0udHQwMi5hbHRpbm4ubm8vZGlhbG9ncG9ydGVuL2FwaS92MSIsImlhdCI6MTczOTUyMzM2NywibmJmIjoxNzM5NTIzMzY3LCJleHAiOjE3Mzk1MjM5Njd9.O_f-RJhRPT7B76S7aOGw6jfxKDki3uJQLLC8nVlcNVJWFIOQUsy6gU4bG1ZdqoMBZPvb2K2X4I5fGpHW9dQMAA"; var keyCache = CreateEdDsaSecurityKeysCacheMock([ - new("dev-primary-signing-key", ToPublicKey("C8XkQ28jpOrKao-rI6m8qc4BqfkKBgBTll05az183Dg")), - new("dev-secondary-signing-key", ToPublicKey("OlP9jLxmFccltkzeiQerR4k2P3yWq5nKO3V9VXq5IvY")), + new("dp-staging-240322-o5ymn", ToPublicKey("zs9hR9oqgf53th2lTdrBq3C1TZ9UlR-HVJOiUpWV63o")), + new("dp-staging-240322-rju3g", ToPublicKey("23Sijekv5ATW4sSEiRPzL_rXH-zRV8MK8jcs5ExCmSU")), ]); - var sut = new DialogTokenVerifier(keyCache); + var clock = Substitute.For(); + clock.UtcNow.Returns(DateTimeOffset.Parse("2025-02-14T09:00:00Z", CultureInfo.InvariantCulture)); + var sut = new DialogTokenVerifier(keyCache, clock); // Act var result = sut.Verify(dialogToken); From ea8a5d007c5616bd5498a047cb77c207ad376865 Mon Sep 17 00:00:00 2001 From: Magnus Sandgren <5285192+MagnusSandgren@users.noreply.github.com> Date: Fri, 14 Feb 2025 15:33:30 +0100 Subject: [PATCH 152/169] Add validation result to DialogTokenVerifier --- .../Program.cs | 2 +- .../IDialogTokenVerifier.cs | 4 ++- .../Services/DialogTokenVerifier.cs | 35 ++++++++++++++----- .../Services/IValidationResult.cs | 23 ++++++++++++ .../DialogTokenVerifierTests.cs | 4 +-- 5 files changed, 56 insertions(+), 12 deletions(-) create mode 100644 src/Digdir.Library.Dialogporten.WebApiClient/Services/IValidationResult.cs diff --git a/src/Digdir.Library.Dialogporten.WebApiClient.WebApiSample/Program.cs b/src/Digdir.Library.Dialogporten.WebApiClient.WebApiSample/Program.cs index 2c47fcb56..c868b2f12 100644 --- a/src/Digdir.Library.Dialogporten.WebApiClient.WebApiSample/Program.cs +++ b/src/Digdir.Library.Dialogporten.WebApiClient.WebApiSample/Program.cs @@ -18,7 +18,7 @@ app.MapPost("/dialogTokenVerify", ( [FromServices] IDialogTokenVerifier dialogTokenVerifier, [FromBody] string token) - => dialogTokenVerifier.Verify(token) + => dialogTokenVerifier.Validate(token).IsValid ? Results.Ok() : Results.Unauthorized()); diff --git a/src/Digdir.Library.Dialogporten.WebApiClient/IDialogTokenVerifier.cs b/src/Digdir.Library.Dialogporten.WebApiClient/IDialogTokenVerifier.cs index 602a8abf1..816aa51ba 100644 --- a/src/Digdir.Library.Dialogporten.WebApiClient/IDialogTokenVerifier.cs +++ b/src/Digdir.Library.Dialogporten.WebApiClient/IDialogTokenVerifier.cs @@ -1,6 +1,8 @@ +using Altinn.ApiClients.Dialogporten.Services; + namespace Altinn.ApiClients.Dialogporten; public interface IDialogTokenVerifier { - bool Verify(ReadOnlySpan token); + IValidationResult Validate(ReadOnlySpan token); } diff --git a/src/Digdir.Library.Dialogporten.WebApiClient/Services/DialogTokenVerifier.cs b/src/Digdir.Library.Dialogporten.WebApiClient/Services/DialogTokenVerifier.cs index ef8d2efb3..5512fcdd5 100644 --- a/src/Digdir.Library.Dialogporten.WebApiClient/Services/DialogTokenVerifier.cs +++ b/src/Digdir.Library.Dialogporten.WebApiClient/Services/DialogTokenVerifier.cs @@ -19,21 +19,40 @@ public DialogTokenVerifier(IEdDsaSecurityKeysCache publicKeysCache, IClock clock _clock = clock; } - public bool Verify(ReadOnlySpan token) + public IValidationResult Validate(ReadOnlySpan token) { - if (!TryGetTokenParts(token, out var tokenParts)) + const string tokenPropertyName = "token"; + var validationResult = new DefaultValidationResult(); + Span tokenDecodeBuffer = stackalloc byte[Base64Url.GetMaxDecodedLength(token.Length)]; + + if (!TryDecodeToken(token, tokenDecodeBuffer, out var tokenParts, out var decodedTokenParts)) { - return false; + validationResult.AddError(tokenPropertyName, "Invalid token format"); + return validationResult; } - Span tokenDecodeBuffer = stackalloc byte[Base64Url.GetMaxDecodedLength(token.Length)]; - if (!TryDecodeParts(tokenDecodeBuffer, tokenParts, out var decodedTokenParts)) + if (!VerifySignature(tokenParts, decodedTokenParts)) { - return false; + validationResult.AddError(tokenPropertyName, "Invalid signature"); } - return VerifySignature(tokenParts, decodedTokenParts) - && VerifyExpiration(decodedTokenParts); + if (!VerifyExpiration(decodedTokenParts)) + { + validationResult.AddError(tokenPropertyName, "Token has expired"); + } + + return validationResult; + } + + private static bool TryDecodeToken( + ReadOnlySpan token, + Span tokenDecodeBuffer, + out JwksTokenParts tokenParts, + out JwksTokenParts decodedTokenParts) + { + decodedTokenParts = default; + return TryGetTokenParts(token, out tokenParts) + && TryDecodeParts(tokenDecodeBuffer, tokenParts, out decodedTokenParts); } private static bool TryGetTokenParts(ReadOnlySpan token, out JwksTokenParts tokenParts) diff --git a/src/Digdir.Library.Dialogporten.WebApiClient/Services/IValidationResult.cs b/src/Digdir.Library.Dialogporten.WebApiClient/Services/IValidationResult.cs new file mode 100644 index 000000000..87da5f46e --- /dev/null +++ b/src/Digdir.Library.Dialogporten.WebApiClient/Services/IValidationResult.cs @@ -0,0 +1,23 @@ +namespace Altinn.ApiClients.Dialogporten.Services; + +public interface IValidationResult +{ + bool IsValid { get; } + Dictionary> Errors { get; } +} + +internal sealed class DefaultValidationResult : IValidationResult +{ + public Dictionary> Errors { get; } = []; + public bool IsValid => Errors.Count == 0; + + internal void AddError(string key, string message) + { + if (!Errors.TryGetValue(key, out var messages)) + { + Errors[key] = messages = []; + } + + messages.Add(message); + } +} diff --git a/tests/Digdir.Library.Dialogporten.WebApiClient.Unit.Tests/DialogTokenVerifierTests.cs b/tests/Digdir.Library.Dialogporten.WebApiClient.Unit.Tests/DialogTokenVerifierTests.cs index 54f43f5f3..7980b3f1e 100644 --- a/tests/Digdir.Library.Dialogporten.WebApiClient.Unit.Tests/DialogTokenVerifierTests.cs +++ b/tests/Digdir.Library.Dialogporten.WebApiClient.Unit.Tests/DialogTokenVerifierTests.cs @@ -24,10 +24,10 @@ public void Test1() var sut = new DialogTokenVerifier(keyCache, clock); // Act - var result = sut.Verify(dialogToken); + var result = sut.Validate(dialogToken); // Assert - Assert.True(result); + Assert.True(result.IsValid); } private static IEdDsaSecurityKeysCache CreateEdDsaSecurityKeysCacheMock(IEnumerable publicKeyPairs) From af555a08564584b2376535c1bad729d7eb7c3982 Mon Sep 17 00:00:00 2001 From: Magnus Sandgren <5285192+MagnusSandgren@users.noreply.github.com> Date: Fri, 14 Feb 2025 15:49:23 +0100 Subject: [PATCH 153/169] WIP --- .../Program.cs | 2 +- .../IDialogTokenValidator.cs | 12 +++++ .../IDialogTokenVerifier.cs | 8 ---- .../ServiceCollectionExtensions.cs | 2 +- ...onResult.cs => DefaultValidationResult.cs} | 6 --- ...kenVerifier.cs => DialogTokenValidator.cs} | 4 +- .../DialogTokenValidatorTests.cs | 46 +++++++++++++++++++ .../DialogTokenVerifierTests.cs | 42 ----------------- 8 files changed, 62 insertions(+), 60 deletions(-) create mode 100644 src/Digdir.Library.Dialogporten.WebApiClient/IDialogTokenValidator.cs delete mode 100644 src/Digdir.Library.Dialogporten.WebApiClient/IDialogTokenVerifier.cs rename src/Digdir.Library.Dialogporten.WebApiClient/Services/{IValidationResult.cs => DefaultValidationResult.cs} (79%) rename src/Digdir.Library.Dialogporten.WebApiClient/Services/{DialogTokenVerifier.cs => DialogTokenValidator.cs} (98%) create mode 100644 tests/Digdir.Library.Dialogporten.WebApiClient.Unit.Tests/DialogTokenValidatorTests.cs delete mode 100644 tests/Digdir.Library.Dialogporten.WebApiClient.Unit.Tests/DialogTokenVerifierTests.cs diff --git a/src/Digdir.Library.Dialogporten.WebApiClient.WebApiSample/Program.cs b/src/Digdir.Library.Dialogporten.WebApiClient.WebApiSample/Program.cs index c868b2f12..dd9700d16 100644 --- a/src/Digdir.Library.Dialogporten.WebApiClient.WebApiSample/Program.cs +++ b/src/Digdir.Library.Dialogporten.WebApiClient.WebApiSample/Program.cs @@ -16,7 +16,7 @@ app.UseHttpsRedirection(); app.MapPost("/dialogTokenVerify", ( - [FromServices] IDialogTokenVerifier dialogTokenVerifier, + [FromServices] IDialogTokenValidator dialogTokenVerifier, [FromBody] string token) => dialogTokenVerifier.Validate(token).IsValid ? Results.Ok() diff --git a/src/Digdir.Library.Dialogporten.WebApiClient/IDialogTokenValidator.cs b/src/Digdir.Library.Dialogporten.WebApiClient/IDialogTokenValidator.cs new file mode 100644 index 000000000..36a38ff81 --- /dev/null +++ b/src/Digdir.Library.Dialogporten.WebApiClient/IDialogTokenValidator.cs @@ -0,0 +1,12 @@ +namespace Altinn.ApiClients.Dialogporten; + +public interface IDialogTokenValidator +{ + IValidationResult Validate(ReadOnlySpan token); +} + +public interface IValidationResult +{ + bool IsValid { get; } + Dictionary> Errors { get; } +} diff --git a/src/Digdir.Library.Dialogporten.WebApiClient/IDialogTokenVerifier.cs b/src/Digdir.Library.Dialogporten.WebApiClient/IDialogTokenVerifier.cs deleted file mode 100644 index 816aa51ba..000000000 --- a/src/Digdir.Library.Dialogporten.WebApiClient/IDialogTokenVerifier.cs +++ /dev/null @@ -1,8 +0,0 @@ -using Altinn.ApiClients.Dialogporten.Services; - -namespace Altinn.ApiClients.Dialogporten; - -public interface IDialogTokenVerifier -{ - IValidationResult Validate(ReadOnlySpan token); -} diff --git a/src/Digdir.Library.Dialogporten.WebApiClient/ServiceCollectionExtensions.cs b/src/Digdir.Library.Dialogporten.WebApiClient/ServiceCollectionExtensions.cs index fa00083bc..e9f1914f0 100644 --- a/src/Digdir.Library.Dialogporten.WebApiClient/ServiceCollectionExtensions.cs +++ b/src/Digdir.Library.Dialogporten.WebApiClient/ServiceCollectionExtensions.cs @@ -43,7 +43,7 @@ public static IServiceCollection AddDialogportenClient(this IServiceCollection s .ConfigureHttpClient(c => c.BaseAddress = new Uri(settings.BaseUri)); services.AddHostedService(); - services.TryAddTransient(); + services.TryAddTransient(); services.TryAddSingleton(); services.TryAddSingleton(x => x.GetRequiredService()); services.TryAddTransient(); diff --git a/src/Digdir.Library.Dialogporten.WebApiClient/Services/IValidationResult.cs b/src/Digdir.Library.Dialogporten.WebApiClient/Services/DefaultValidationResult.cs similarity index 79% rename from src/Digdir.Library.Dialogporten.WebApiClient/Services/IValidationResult.cs rename to src/Digdir.Library.Dialogporten.WebApiClient/Services/DefaultValidationResult.cs index 87da5f46e..987a17321 100644 --- a/src/Digdir.Library.Dialogporten.WebApiClient/Services/IValidationResult.cs +++ b/src/Digdir.Library.Dialogporten.WebApiClient/Services/DefaultValidationResult.cs @@ -1,11 +1,5 @@ namespace Altinn.ApiClients.Dialogporten.Services; -public interface IValidationResult -{ - bool IsValid { get; } - Dictionary> Errors { get; } -} - internal sealed class DefaultValidationResult : IValidationResult { public Dictionary> Errors { get; } = []; diff --git a/src/Digdir.Library.Dialogporten.WebApiClient/Services/DialogTokenVerifier.cs b/src/Digdir.Library.Dialogporten.WebApiClient/Services/DialogTokenValidator.cs similarity index 98% rename from src/Digdir.Library.Dialogporten.WebApiClient/Services/DialogTokenVerifier.cs rename to src/Digdir.Library.Dialogporten.WebApiClient/Services/DialogTokenValidator.cs index 5512fcdd5..a18189340 100644 --- a/src/Digdir.Library.Dialogporten.WebApiClient/Services/DialogTokenVerifier.cs +++ b/src/Digdir.Library.Dialogporten.WebApiClient/Services/DialogTokenValidator.cs @@ -8,12 +8,12 @@ namespace Altinn.ApiClients.Dialogporten.Services; -internal sealed class DialogTokenVerifier : IDialogTokenVerifier +internal sealed class DialogTokenValidator : IDialogTokenValidator { private readonly IEdDsaSecurityKeysCache _publicKeysCache; private readonly IClock _clock; - public DialogTokenVerifier(IEdDsaSecurityKeysCache publicKeysCache, IClock clock) + public DialogTokenValidator(IEdDsaSecurityKeysCache publicKeysCache, IClock clock) { _publicKeysCache = publicKeysCache; _clock = clock; diff --git a/tests/Digdir.Library.Dialogporten.WebApiClient.Unit.Tests/DialogTokenValidatorTests.cs b/tests/Digdir.Library.Dialogporten.WebApiClient.Unit.Tests/DialogTokenValidatorTests.cs new file mode 100644 index 000000000..218a368ee --- /dev/null +++ b/tests/Digdir.Library.Dialogporten.WebApiClient.Unit.Tests/DialogTokenValidatorTests.cs @@ -0,0 +1,46 @@ +using System.Buffers.Text; +using System.Collections.ObjectModel; +using System.Globalization; +using Altinn.ApiClients.Dialogporten.Common; +using Altinn.ApiClients.Dialogporten.Services; +using NSec.Cryptography; +using NSubstitute; + +namespace Digdir.Library.Dialogporten.WebApiClient.Unit.Tests; + +public class DialogTokenValidatorTests +{ + private const string DialogToken = "eyJhbGciOiJFZERTQSIsInR5cCI6IkpXVCIsImtpZCI6ImRwLXN0YWdpbmctMjQwMzIyLW81eW1uIn0.eyJqdGkiOiIzOGNmZGNiOS0zODhiLTQ3YjgtYTFiZi05ZjE1YjI4MTk4OTQiLCJjIjoidXJuOmFsdGlubjpwZXJzb246aWRlbnRpZmllci1ubzoxNDg4NjQ5ODIyNiIsImwiOjMsInAiOiJ1cm46YWx0aW5uOnBlcnNvbjppZGVudGlmaWVyLW5vOjE0ODg2NDk4MjI2IiwicyI6InVybjphbHRpbm46cmVzb3VyY2U6ZGFnbC1jb3JyZXNwb25kZW5jZSIsImkiOiIwMTk0ZmU4Mi05MjgwLTc3YTUtYTdjZC01ZmYwZTZhNmZhMDciLCJhIjoicmVhZCIsImlzcyI6Imh0dHBzOi8vcGxhdGZvcm0udHQwMi5hbHRpbm4ubm8vZGlhbG9ncG9ydGVuL2FwaS92MSIsImlhdCI6MTczOTUyMzM2NywibmJmIjoxNzM5NTIzMzY3LCJleHAiOjE3Mzk1MjM5Njd9.O_f-RJhRPT7B76S7aOGw6jfxKDki3uJQLLC8nVlcNVJWFIOQUsy6gU4bG1ZdqoMBZPvb2K2X4I5fGpHW9dQMAA"; + private static readonly PublicKeyPair[] ValidPublicKeyPairs = + [ + new("dp-staging-240322-o5ymn", ToPublicKey("zs9hR9oqgf53th2lTdrBq3C1TZ9UlR-HVJOiUpWV63o")), + new("dp-staging-240322-rju3g", ToPublicKey("23Sijekv5ATW4sSEiRPzL_rXH-zRV8MK8jcs5ExCmSU")) + ]; + + [Fact] + public void ShouldReturnIsValid_GivenValidToken() + { + // Arrange + var sut = GetSut( + DateTimeOffset.Parse("2025-02-14T09:00:00Z", CultureInfo.InvariantCulture), + ValidPublicKeyPairs); + + // Act + var result = sut.Validate(DialogToken); + + // Assert + Assert.True(result.IsValid); + } + + private static DialogTokenValidator GetSut(DateTimeOffset simulatedNow, params PublicKeyPair[] publicKeyPairs) + { + var keyCache = Substitute.For(); + var clock = Substitute.For(); + keyCache.PublicKeys.Returns(new ReadOnlyCollection(publicKeyPairs)); + clock.UtcNow.Returns(simulatedNow); + return new DialogTokenValidator(keyCache, clock); + } + + private static PublicKey ToPublicKey(string key) + => PublicKey.Import(SignatureAlgorithm.Ed25519, Base64Url.DecodeFromChars(key), KeyBlobFormat.RawPublicKey); +} diff --git a/tests/Digdir.Library.Dialogporten.WebApiClient.Unit.Tests/DialogTokenVerifierTests.cs b/tests/Digdir.Library.Dialogporten.WebApiClient.Unit.Tests/DialogTokenVerifierTests.cs deleted file mode 100644 index 7980b3f1e..000000000 --- a/tests/Digdir.Library.Dialogporten.WebApiClient.Unit.Tests/DialogTokenVerifierTests.cs +++ /dev/null @@ -1,42 +0,0 @@ -using System.Buffers.Text; -using System.Collections.ObjectModel; -using System.Globalization; -using Altinn.ApiClients.Dialogporten.Common; -using Altinn.ApiClients.Dialogporten.Services; -using NSec.Cryptography; -using NSubstitute; - -namespace Digdir.Library.Dialogporten.WebApiClient.Unit.Tests; - -public class DialogTokenVerifierTests -{ - [Fact] - public void Test1() - { - // Arrange - const string dialogToken = "eyJhbGciOiJFZERTQSIsInR5cCI6IkpXVCIsImtpZCI6ImRwLXN0YWdpbmctMjQwMzIyLW81eW1uIn0.eyJqdGkiOiIzOGNmZGNiOS0zODhiLTQ3YjgtYTFiZi05ZjE1YjI4MTk4OTQiLCJjIjoidXJuOmFsdGlubjpwZXJzb246aWRlbnRpZmllci1ubzoxNDg4NjQ5ODIyNiIsImwiOjMsInAiOiJ1cm46YWx0aW5uOnBlcnNvbjppZGVudGlmaWVyLW5vOjE0ODg2NDk4MjI2IiwicyI6InVybjphbHRpbm46cmVzb3VyY2U6ZGFnbC1jb3JyZXNwb25kZW5jZSIsImkiOiIwMTk0ZmU4Mi05MjgwLTc3YTUtYTdjZC01ZmYwZTZhNmZhMDciLCJhIjoicmVhZCIsImlzcyI6Imh0dHBzOi8vcGxhdGZvcm0udHQwMi5hbHRpbm4ubm8vZGlhbG9ncG9ydGVuL2FwaS92MSIsImlhdCI6MTczOTUyMzM2NywibmJmIjoxNzM5NTIzMzY3LCJleHAiOjE3Mzk1MjM5Njd9.O_f-RJhRPT7B76S7aOGw6jfxKDki3uJQLLC8nVlcNVJWFIOQUsy6gU4bG1ZdqoMBZPvb2K2X4I5fGpHW9dQMAA"; - var keyCache = CreateEdDsaSecurityKeysCacheMock([ - new("dp-staging-240322-o5ymn", ToPublicKey("zs9hR9oqgf53th2lTdrBq3C1TZ9UlR-HVJOiUpWV63o")), - new("dp-staging-240322-rju3g", ToPublicKey("23Sijekv5ATW4sSEiRPzL_rXH-zRV8MK8jcs5ExCmSU")), - ]); - var clock = Substitute.For(); - clock.UtcNow.Returns(DateTimeOffset.Parse("2025-02-14T09:00:00Z", CultureInfo.InvariantCulture)); - var sut = new DialogTokenVerifier(keyCache, clock); - - // Act - var result = sut.Validate(dialogToken); - - // Assert - Assert.True(result.IsValid); - } - - private static IEdDsaSecurityKeysCache CreateEdDsaSecurityKeysCacheMock(IEnumerable publicKeyPairs) - { - var keyCache = Substitute.For(); - keyCache.PublicKeys.Returns(new ReadOnlyCollection(publicKeyPairs.ToList())); - return keyCache; - } - - private static PublicKey ToPublicKey(string key) - => PublicKey.Import(SignatureAlgorithm.Ed25519, Base64Url.DecodeFromChars(key), KeyBlobFormat.RawPublicKey); -} From 67b5986cd75df0eee5b4e15c63102bffc099cb76 Mon Sep 17 00:00:00 2001 From: Amund Myrbostad Date: Mon, 17 Feb 2025 10:04:09 +0100 Subject: [PATCH 154/169] Created some tests for DialogTokenValidator --- .../Services/DialogTokenValidator.cs | 43 ++++++---- .../DialogTokenValidatorTests.cs | 80 ++++++++++++++++++- 2 files changed, 106 insertions(+), 17 deletions(-) diff --git a/src/Digdir.Library.Dialogporten.WebApiClient/Services/DialogTokenValidator.cs b/src/Digdir.Library.Dialogporten.WebApiClient/Services/DialogTokenValidator.cs index a18189340..89f322b18 100644 --- a/src/Digdir.Library.Dialogporten.WebApiClient/Services/DialogTokenValidator.cs +++ b/src/Digdir.Library.Dialogporten.WebApiClient/Services/DialogTokenValidator.cs @@ -52,7 +52,7 @@ private static bool TryDecodeToken( { decodedTokenParts = default; return TryGetTokenParts(token, out tokenParts) - && TryDecodeParts(tokenDecodeBuffer, tokenParts, out decodedTokenParts); + && TryDecodeParts(tokenDecodeBuffer, tokenParts, out decodedTokenParts); } private static bool TryGetTokenParts(ReadOnlySpan token, out JwksTokenParts tokenParts) @@ -130,7 +130,7 @@ private bool VerifySignature( var signedPart = signedPartBuffer[..signedPartLength]; return TryGetPublicKey(publicKeys, decodedTokenParts.Header, out var publicKey) - && SignatureAlgorithm.Ed25519.Verify(publicKey, signedPart, decodedTokenParts.Signature); + && SignatureAlgorithm.Ed25519.Verify(publicKey, signedPart, decodedTokenParts.Signature); } private bool VerifyExpiration(JwksTokenParts decodedTokenParts) @@ -157,14 +157,22 @@ private bool VerifyExpiration(JwksTokenParts decodedTokenParts) private static bool TryDecodePart(ReadOnlySpan tokenPart, Span buffer, out ReadOnlySpan span, out int length) { - if (!Base64Url.TryDecodeFromChars(tokenPart, buffer, out length)) + span = default; + length = 0; + try + { + if (!Base64Url.TryDecodeFromChars(tokenPart, buffer, out length)) + { + return false; + } + span = buffer[..length]; + return true; + } + catch (FormatException) { - span = default; return false; } - span = buffer[..length]; - return true; } private static bool TryGetPublicKey(ReadOnlyCollection keyPairs, ReadOnlySpan header, [NotNullWhen(true)] out PublicKey? publicKey) @@ -194,16 +202,23 @@ private static bool TryGetPublicKey(ReadOnlyCollection keyPairs, private static bool TryGetPropertyValue(ReadOnlySpan json, ReadOnlySpan name, out ReadOnlySpan value) { + value = default; var reader = new Utf8JsonReader(json); - while (reader.Read()) + try { - if (!IsPropertyName(reader, name)) continue; - reader.Read(); - value = reader.ValueSpan; - return true; - } + while (reader.Read()) + { + if (!IsPropertyName(reader, name)) continue; + reader.Read(); + value = reader.ValueSpan; + return true; + } - value = default; + } + catch (JsonException) + { + return false; + } return false; } @@ -232,5 +247,3 @@ public JwksTokenParts(ReadOnlySpan buffer, ReadOnlySpan header, ReadOnlySp } } } - - diff --git a/tests/Digdir.Library.Dialogporten.WebApiClient.Unit.Tests/DialogTokenValidatorTests.cs b/tests/Digdir.Library.Dialogporten.WebApiClient.Unit.Tests/DialogTokenValidatorTests.cs index 218a368ee..efc645a3e 100644 --- a/tests/Digdir.Library.Dialogporten.WebApiClient.Unit.Tests/DialogTokenValidatorTests.cs +++ b/tests/Digdir.Library.Dialogporten.WebApiClient.Unit.Tests/DialogTokenValidatorTests.cs @@ -10,7 +10,8 @@ namespace Digdir.Library.Dialogporten.WebApiClient.Unit.Tests; public class DialogTokenValidatorTests { - private const string DialogToken = "eyJhbGciOiJFZERTQSIsInR5cCI6IkpXVCIsImtpZCI6ImRwLXN0YWdpbmctMjQwMzIyLW81eW1uIn0.eyJqdGkiOiIzOGNmZGNiOS0zODhiLTQ3YjgtYTFiZi05ZjE1YjI4MTk4OTQiLCJjIjoidXJuOmFsdGlubjpwZXJzb246aWRlbnRpZmllci1ubzoxNDg4NjQ5ODIyNiIsImwiOjMsInAiOiJ1cm46YWx0aW5uOnBlcnNvbjppZGVudGlmaWVyLW5vOjE0ODg2NDk4MjI2IiwicyI6InVybjphbHRpbm46cmVzb3VyY2U6ZGFnbC1jb3JyZXNwb25kZW5jZSIsImkiOiIwMTk0ZmU4Mi05MjgwLTc3YTUtYTdjZC01ZmYwZTZhNmZhMDciLCJhIjoicmVhZCIsImlzcyI6Imh0dHBzOi8vcGxhdGZvcm0udHQwMi5hbHRpbm4ubm8vZGlhbG9ncG9ydGVuL2FwaS92MSIsImlhdCI6MTczOTUyMzM2NywibmJmIjoxNzM5NTIzMzY3LCJleHAiOjE3Mzk1MjM5Njd9.O_f-RJhRPT7B76S7aOGw6jfxKDki3uJQLLC8nVlcNVJWFIOQUsy6gU4bG1ZdqoMBZPvb2K2X4I5fGpHW9dQMAA"; + private const string DialogToken = + "eyJhbGciOiJFZERTQSIsInR5cCI6IkpXVCIsImtpZCI6ImRwLXN0YWdpbmctMjQwMzIyLW81eW1uIn0.eyJqdGkiOiIzOGNmZGNiOS0zODhiLTQ3YjgtYTFiZi05ZjE1YjI4MTk4OTQiLCJjIjoidXJuOmFsdGlubjpwZXJzb246aWRlbnRpZmllci1ubzoxNDg4NjQ5ODIyNiIsImwiOjMsInAiOiJ1cm46YWx0aW5uOnBlcnNvbjppZGVudGlmaWVyLW5vOjE0ODg2NDk4MjI2IiwicyI6InVybjphbHRpbm46cmVzb3VyY2U6ZGFnbC1jb3JyZXNwb25kZW5jZSIsImkiOiIwMTk0ZmU4Mi05MjgwLTc3YTUtYTdjZC01ZmYwZTZhNmZhMDciLCJhIjoicmVhZCIsImlzcyI6Imh0dHBzOi8vcGxhdGZvcm0udHQwMi5hbHRpbm4ubm8vZGlhbG9ncG9ydGVuL2FwaS92MSIsImlhdCI6MTczOTUyMzM2NywibmJmIjoxNzM5NTIzMzY3LCJleHAiOjE3Mzk1MjM5Njd9.O_f-RJhRPT7B76S7aOGw6jfxKDki3uJQLLC8nVlcNVJWFIOQUsy6gU4bG1ZdqoMBZPvb2K2X4I5fGpHW9dQMAA"; private static readonly PublicKeyPair[] ValidPublicKeyPairs = [ new("dp-staging-240322-o5ymn", ToPublicKey("zs9hR9oqgf53th2lTdrBq3C1TZ9UlR-HVJOiUpWV63o")), @@ -32,6 +33,81 @@ public void ShouldReturnIsValid_GivenValidToken() Assert.True(result.IsValid); } + [Fact] + public void ShouldReturnError_GivenMalformedToken() + { + // Arrange + var sut = GetSut( + DateTimeOffset.Parse("2025-02-14T09:00:00Z", CultureInfo.InvariantCulture), + ValidPublicKeyPairs); + + // Act + var result = sut.Validate("This.TokenIsMalformed..."); + + // Assert + Assert.False(result.IsValid); + Assert.True(result.Errors.ContainsKey("token")); + Assert.Contains("Invalid token format", result.Errors["token"]); + } + + [Fact] + public void ShouldReturnError_GivenExpiredToken() + { + + // Arrange + var sut = GetSut( + DateTimeOffset.Parse("2025-02-17T09:00:00Z", CultureInfo.InvariantCulture), + ValidPublicKeyPairs); + + // Act + var result = sut.Validate(DialogToken); + + // Assert + Assert.False(result.IsValid); + Assert.True(result.Errors.ContainsKey("token")); + Assert.Contains("Token has expired", result.Errors["token"]); + } + + [Fact] + public void ShouldReturnError_GivenEmptyToken() + { + // Arrange + var sut = GetSut( + DateTimeOffset.Parse("2025-02-14T09:00:00Z", CultureInfo.InvariantCulture), + ValidPublicKeyPairs); + + // Act + var result = sut.Validate(""); + + // Assert + Assert.False(result.IsValid); + Assert.True(result.Errors.ContainsKey("token")); + Assert.Contains("Invalid token format", result.Errors["token"]); + } + + [Fact] + public void ShouldReturnError_GivenInvalidSignature() + { + // Arrange + var sut = GetSut( + DateTimeOffset.Parse("2025-02-14T09:00:00Z", CultureInfo.InvariantCulture), + ValidPublicKeyPairs); + + // Swap payload with well formed JWT token. changed "l" from 3 -> 4 + var tokenParts = DialogToken.Split('.'); + tokenParts[1] = + "eyJqdGkiOiIzOGNmZGNiOS0zODhiLTQ3YjgtYTFiZi05ZjE1YjI4MTk4OTQiLCJjIjoidXJuOmFsdGlubjpwZXJzb246aWRlbnRpZmllci1ubzoxNDg4NjQ5ODIyNiIsImwiOjQsInAiOiJ1cm46YWx0aW5uOnBlcnNvbjppZGVudGlmaWVyLW5vOjE0ODg2NDk4MjI2IiwicyI6InVybjphbHRpbm46cmVzb3VyY2U6ZGFnbC1jb3JyZXNwb25kZW5jZSIsImkiOiIwMTk0ZmU4Mi05MjgwLTc3YTUtYTdjZC01ZmYwZTZhNmZhMDciLCJhIjoicmVhZCIsImlzcyI6Imh0dHBzOi8vcGxhdGZvcm0udHQwMi5hbHRpbm4ubm8vZGlhbG9ncG9ydGVuL2FwaS92MSIsImlhdCI6MTczOTUyMzM2NywibmJmIjoxNzM5NTIzMzY3LCJleHAiOjE3Mzk1MjM5Njd9"; + var token = string.Join(".", tokenParts); + + // Act + var result = sut.Validate(token); + + // Assert + Assert.False(result.IsValid); + Assert.True(result.Errors.ContainsKey("token")); + Assert.Contains("Invalid signature", result.Errors["token"]); + } + private static DialogTokenValidator GetSut(DateTimeOffset simulatedNow, params PublicKeyPair[] publicKeyPairs) { var keyCache = Substitute.For(); @@ -43,4 +119,4 @@ private static DialogTokenValidator GetSut(DateTimeOffset simulatedNow, params P private static PublicKey ToPublicKey(string key) => PublicKey.Import(SignatureAlgorithm.Ed25519, Base64Url.DecodeFromChars(key), KeyBlobFormat.RawPublicKey); -} +}; From e96eff37305834f90e57d2fd00fabf2339adbc73 Mon Sep 17 00:00:00 2001 From: Amund Myrbostad Date: Mon, 17 Feb 2025 10:20:47 +0100 Subject: [PATCH 155/169] Added more tests --- .../DialogTokenValidatorTests.cs | 31 ++++++++++++++++++- 1 file changed, 30 insertions(+), 1 deletion(-) diff --git a/tests/Digdir.Library.Dialogporten.WebApiClient.Unit.Tests/DialogTokenValidatorTests.cs b/tests/Digdir.Library.Dialogporten.WebApiClient.Unit.Tests/DialogTokenValidatorTests.cs index efc645a3e..40af19e07 100644 --- a/tests/Digdir.Library.Dialogporten.WebApiClient.Unit.Tests/DialogTokenValidatorTests.cs +++ b/tests/Digdir.Library.Dialogporten.WebApiClient.Unit.Tests/DialogTokenValidatorTests.cs @@ -33,6 +33,18 @@ public void ShouldReturnIsValid_GivenValidToken() Assert.True(result.IsValid); } + [Fact] + public void ShouldThrowException_GivenNoPublicKeys() + { + + // Arrange + var sut = GetSut( + DateTimeOffset.Parse("2025-02-17T09:00:00Z", CultureInfo.InvariantCulture)); + + // Assert + Assert.Throws(() => sut.Validate(DialogToken)); + } + [Fact] public void ShouldReturnError_GivenMalformedToken() { @@ -50,6 +62,23 @@ public void ShouldReturnError_GivenMalformedToken() Assert.Contains("Invalid token format", result.Errors["token"]); } + [Fact] + public void ShouldReturnError_GivenNoPublicWithCorrectKeyId() + { + // Arrange + var sut = GetSut( + DateTimeOffset.Parse("2025-02-14T09:00:00Z", CultureInfo.InvariantCulture), + ValidPublicKeyPairs[1]); + + // Act + var result = sut.Validate(DialogToken); + + // Assert + Assert.False(result.IsValid); + Assert.True(result.Errors.ContainsKey("token")); + Assert.Contains("Invalid signature", result.Errors["token"]); + } + [Fact] public void ShouldReturnError_GivenExpiredToken() { @@ -86,7 +115,7 @@ public void ShouldReturnError_GivenEmptyToken() } [Fact] - public void ShouldReturnError_GivenInvalidSignature() + public void ShouldReturnError_GivenTokenWithWrongSignature() { // Arrange var sut = GetSut( From 18a01ca1f239467c238cce97a99564ded861e303 Mon Sep 17 00:00:00 2001 From: Amund Myrbostad Date: Mon, 17 Feb 2025 10:58:28 +0100 Subject: [PATCH 156/169] Added Test for invalid Token --- .../DialogTokenValidatorTests.cs | 33 +++++++++++++++++-- 1 file changed, 31 insertions(+), 2 deletions(-) diff --git a/tests/Digdir.Library.Dialogporten.WebApiClient.Unit.Tests/DialogTokenValidatorTests.cs b/tests/Digdir.Library.Dialogporten.WebApiClient.Unit.Tests/DialogTokenValidatorTests.cs index 40af19e07..cafd3a250 100644 --- a/tests/Digdir.Library.Dialogporten.WebApiClient.Unit.Tests/DialogTokenValidatorTests.cs +++ b/tests/Digdir.Library.Dialogporten.WebApiClient.Unit.Tests/DialogTokenValidatorTests.cs @@ -1,6 +1,8 @@ using System.Buffers.Text; using System.Collections.ObjectModel; using System.Globalization; +using System.Text; +using System.Text.Json; using Altinn.ApiClients.Dialogporten.Common; using Altinn.ApiClients.Dialogporten.Services; using NSec.Cryptography; @@ -54,7 +56,7 @@ public void ShouldReturnError_GivenMalformedToken() ValidPublicKeyPairs); // Act - var result = sut.Validate("This.TokenIsMalformed..."); + var result = sut.Validate("This.TokenIsMalformed...."); // Assert Assert.False(result.IsValid); @@ -62,6 +64,22 @@ public void ShouldReturnError_GivenMalformedToken() Assert.Contains("Invalid token format", result.Errors["token"]); } + [Fact] + public void ShouldReturnError_GivenInvalidToken() + { + // Arrange + var sut = GetSut( + DateTimeOffset.Parse("2025-02-14T09:00:00Z", CultureInfo.InvariantCulture), + ValidPublicKeyPairs); + + // Act + var result = sut.Validate("This.TokenIs.Invalid"); + + // Assert + Assert.False(result.IsValid); + Assert.True(result.Errors.ContainsKey("token")); + Assert.Contains("Invalid token format", result.Errors["token"]); + } [Fact] public void ShouldReturnError_GivenNoPublicWithCorrectKeyId() { @@ -148,4 +166,15 @@ private static DialogTokenValidator GetSut(DateTimeOffset simulatedNow, params P private static PublicKey ToPublicKey(string key) => PublicKey.Import(SignatureAlgorithm.Ed25519, Base64Url.DecodeFromChars(key), KeyBlobFormat.RawPublicKey); -}; + + // #pragma warning disable IDE0060 + // private static string UpdateTokenParts(string part, string property, string value) + // #pragma warning restore IDE0060 + // { + // var decodedPart = Base64Url.DecodeFromChars(part); + // var json = JsonSerializer.Deserialize(decodedPart); + // json.GetProperty(property); + // var encodedpart = Base64Url.EncodeToUtf8(JsonSerializer.SerializeToUtf8Bytes(json)); + // return Encoding.UTF8.GetString(encodedpart); + // } +} From b3da2914de4a09ea4096f29279be7de3ae9595c1 Mon Sep 17 00:00:00 2001 From: Amund Myrbostad Date: Mon, 17 Feb 2025 11:17:00 +0100 Subject: [PATCH 157/169] Added more tests --- .../DialogTokenValidatorTests.cs | 56 ++++++++++++++----- 1 file changed, 41 insertions(+), 15 deletions(-) diff --git a/tests/Digdir.Library.Dialogporten.WebApiClient.Unit.Tests/DialogTokenValidatorTests.cs b/tests/Digdir.Library.Dialogporten.WebApiClient.Unit.Tests/DialogTokenValidatorTests.cs index cafd3a250..96738b2a2 100644 --- a/tests/Digdir.Library.Dialogporten.WebApiClient.Unit.Tests/DialogTokenValidatorTests.cs +++ b/tests/Digdir.Library.Dialogporten.WebApiClient.Unit.Tests/DialogTokenValidatorTests.cs @@ -140,11 +140,7 @@ public void ShouldReturnError_GivenTokenWithWrongSignature() DateTimeOffset.Parse("2025-02-14T09:00:00Z", CultureInfo.InvariantCulture), ValidPublicKeyPairs); - // Swap payload with well formed JWT token. changed "l" from 3 -> 4 - var tokenParts = DialogToken.Split('.'); - tokenParts[1] = - "eyJqdGkiOiIzOGNmZGNiOS0zODhiLTQ3YjgtYTFiZi05ZjE1YjI4MTk4OTQiLCJjIjoidXJuOmFsdGlubjpwZXJzb246aWRlbnRpZmllci1ubzoxNDg4NjQ5ODIyNiIsImwiOjQsInAiOiJ1cm46YWx0aW5uOnBlcnNvbjppZGVudGlmaWVyLW5vOjE0ODg2NDk4MjI2IiwicyI6InVybjphbHRpbm46cmVzb3VyY2U6ZGFnbC1jb3JyZXNwb25kZW5jZSIsImkiOiIwMTk0ZmU4Mi05MjgwLTc3YTUtYTdjZC01ZmYwZTZhNmZhMDciLCJhIjoicmVhZCIsImlzcyI6Imh0dHBzOi8vcGxhdGZvcm0udHQwMi5hbHRpbm4ubm8vZGlhbG9ncG9ydGVuL2FwaS92MSIsImlhdCI6MTczOTUyMzM2NywibmJmIjoxNzM5NTIzMzY3LCJleHAiOjE3Mzk1MjM5Njd9"; - var token = string.Join(".", tokenParts); + var token = UpdateTokenPayload(DialogToken, "l", "4"); // Act var result = sut.Validate(token); @@ -155,6 +151,24 @@ public void ShouldReturnError_GivenTokenWithWrongSignature() Assert.Contains("Invalid signature", result.Errors["token"]); } + [Fact] + public void ShouldReturnError_GivenTokenWithWrongAlg() + { + // Arrange + var sut = GetSut( + DateTimeOffset.Parse("2025-02-14T09:00:00Z", CultureInfo.InvariantCulture), + ValidPublicKeyPairs); + + var token = UpdateTokenHeader(DialogToken, "alg", "RS512"); + + // Act + var result = sut.Validate(token); + + // Assert + Assert.False(result.IsValid); + Assert.True(result.Errors.ContainsKey("token")); + Assert.Contains("Invalid signature", result.Errors["token"]); + } private static DialogTokenValidator GetSut(DateTimeOffset simulatedNow, params PublicKeyPair[] publicKeyPairs) { var keyCache = Substitute.For(); @@ -167,14 +181,26 @@ private static DialogTokenValidator GetSut(DateTimeOffset simulatedNow, params P private static PublicKey ToPublicKey(string key) => PublicKey.Import(SignatureAlgorithm.Ed25519, Base64Url.DecodeFromChars(key), KeyBlobFormat.RawPublicKey); - // #pragma warning disable IDE0060 - // private static string UpdateTokenParts(string part, string property, string value) - // #pragma warning restore IDE0060 - // { - // var decodedPart = Base64Url.DecodeFromChars(part); - // var json = JsonSerializer.Deserialize(decodedPart); - // json.GetProperty(property); - // var encodedpart = Base64Url.EncodeToUtf8(JsonSerializer.SerializeToUtf8Bytes(json)); - // return Encoding.UTF8.GetString(encodedpart); - // } + private static string UpdateTokenParts(string part, string property, string value) + { + var decodedPart = Base64Url.DecodeFromChars(part); + var json = JsonSerializer.Deserialize>(decodedPart)!; + json[property] = value; + var encodedPart = Base64Url.EncodeToUtf8(JsonSerializer.SerializeToUtf8Bytes(json)); + return Encoding.UTF8.GetString(encodedPart); + } + + private static string UpdateTokenPayload(string token, string property, string value) + { + var tokenParts = token.Split('.'); + tokenParts[1] = UpdateTokenParts(tokenParts[1], property, value); + return string.Join(".", tokenParts); + } + + private static string UpdateTokenHeader(string token, string property, string value) + { + var tokenParts = token.Split('.'); + tokenParts[0] = UpdateTokenParts(tokenParts[0], property, value); + return string.Join(".", tokenParts); + } } From 948239d9c5fa5151a1b5221d96626695cd9f3a09 Mon Sep 17 00:00:00 2001 From: Amund Myrbostad Date: Mon, 17 Feb 2025 11:25:02 +0100 Subject: [PATCH 158/169] Cleanup tests --- .../DialogTokenValidatorTests.cs | 23 +++++++++++-------- 1 file changed, 13 insertions(+), 10 deletions(-) diff --git a/tests/Digdir.Library.Dialogporten.WebApiClient.Unit.Tests/DialogTokenValidatorTests.cs b/tests/Digdir.Library.Dialogporten.WebApiClient.Unit.Tests/DialogTokenValidatorTests.cs index 96738b2a2..41ed0087f 100644 --- a/tests/Digdir.Library.Dialogporten.WebApiClient.Unit.Tests/DialogTokenValidatorTests.cs +++ b/tests/Digdir.Library.Dialogporten.WebApiClient.Unit.Tests/DialogTokenValidatorTests.cs @@ -12,6 +12,7 @@ namespace Digdir.Library.Dialogporten.WebApiClient.Unit.Tests; public class DialogTokenValidatorTests { + private const string ValidTimeStampString = "2025-02-14T09:00:00Z"; private const string DialogToken = "eyJhbGciOiJFZERTQSIsInR5cCI6IkpXVCIsImtpZCI6ImRwLXN0YWdpbmctMjQwMzIyLW81eW1uIn0.eyJqdGkiOiIzOGNmZGNiOS0zODhiLTQ3YjgtYTFiZi05ZjE1YjI4MTk4OTQiLCJjIjoidXJuOmFsdGlubjpwZXJzb246aWRlbnRpZmllci1ubzoxNDg4NjQ5ODIyNiIsImwiOjMsInAiOiJ1cm46YWx0aW5uOnBlcnNvbjppZGVudGlmaWVyLW5vOjE0ODg2NDk4MjI2IiwicyI6InVybjphbHRpbm46cmVzb3VyY2U6ZGFnbC1jb3JyZXNwb25kZW5jZSIsImkiOiIwMTk0ZmU4Mi05MjgwLTc3YTUtYTdjZC01ZmYwZTZhNmZhMDciLCJhIjoicmVhZCIsImlzcyI6Imh0dHBzOi8vcGxhdGZvcm0udHQwMi5hbHRpbm4ubm8vZGlhbG9ncG9ydGVuL2FwaS92MSIsImlhdCI6MTczOTUyMzM2NywibmJmIjoxNzM5NTIzMzY3LCJleHAiOjE3Mzk1MjM5Njd9.O_f-RJhRPT7B76S7aOGw6jfxKDki3uJQLLC8nVlcNVJWFIOQUsy6gU4bG1ZdqoMBZPvb2K2X4I5fGpHW9dQMAA"; private static readonly PublicKeyPair[] ValidPublicKeyPairs = @@ -25,7 +26,7 @@ public void ShouldReturnIsValid_GivenValidToken() { // Arrange var sut = GetSut( - DateTimeOffset.Parse("2025-02-14T09:00:00Z", CultureInfo.InvariantCulture), + DateTimeOffset.Parse(ValidTimeStampString, CultureInfo.InvariantCulture), ValidPublicKeyPairs); // Act @@ -41,7 +42,7 @@ public void ShouldThrowException_GivenNoPublicKeys() // Arrange var sut = GetSut( - DateTimeOffset.Parse("2025-02-17T09:00:00Z", CultureInfo.InvariantCulture)); + DateTimeOffset.Parse(ValidTimeStampString, CultureInfo.InvariantCulture)); // Assert Assert.Throws(() => sut.Validate(DialogToken)); @@ -52,7 +53,7 @@ public void ShouldReturnError_GivenMalformedToken() { // Arrange var sut = GetSut( - DateTimeOffset.Parse("2025-02-14T09:00:00Z", CultureInfo.InvariantCulture), + DateTimeOffset.Parse(ValidTimeStampString, CultureInfo.InvariantCulture), ValidPublicKeyPairs); // Act @@ -69,7 +70,7 @@ public void ShouldReturnError_GivenInvalidToken() { // Arrange var sut = GetSut( - DateTimeOffset.Parse("2025-02-14T09:00:00Z", CultureInfo.InvariantCulture), + DateTimeOffset.Parse(ValidTimeStampString, CultureInfo.InvariantCulture), ValidPublicKeyPairs); // Act @@ -85,11 +86,12 @@ public void ShouldReturnError_GivenNoPublicWithCorrectKeyId() { // Arrange var sut = GetSut( - DateTimeOffset.Parse("2025-02-14T09:00:00Z", CultureInfo.InvariantCulture), - ValidPublicKeyPairs[1]); + DateTimeOffset.Parse(ValidTimeStampString, CultureInfo.InvariantCulture), + ValidPublicKeyPairs); + var token = UpdateTokenHeader(DialogToken, "kid", "dp-testing-fake-kid"); // Act - var result = sut.Validate(DialogToken); + var result = sut.Validate(token); // Assert Assert.False(result.IsValid); @@ -120,7 +122,7 @@ public void ShouldReturnError_GivenEmptyToken() { // Arrange var sut = GetSut( - DateTimeOffset.Parse("2025-02-14T09:00:00Z", CultureInfo.InvariantCulture), + DateTimeOffset.Parse(ValidTimeStampString, CultureInfo.InvariantCulture), ValidPublicKeyPairs); // Act @@ -137,7 +139,7 @@ public void ShouldReturnError_GivenTokenWithWrongSignature() { // Arrange var sut = GetSut( - DateTimeOffset.Parse("2025-02-14T09:00:00Z", CultureInfo.InvariantCulture), + DateTimeOffset.Parse(ValidTimeStampString, CultureInfo.InvariantCulture), ValidPublicKeyPairs); var token = UpdateTokenPayload(DialogToken, "l", "4"); @@ -156,7 +158,7 @@ public void ShouldReturnError_GivenTokenWithWrongAlg() { // Arrange var sut = GetSut( - DateTimeOffset.Parse("2025-02-14T09:00:00Z", CultureInfo.InvariantCulture), + DateTimeOffset.Parse(ValidTimeStampString, CultureInfo.InvariantCulture), ValidPublicKeyPairs); var token = UpdateTokenHeader(DialogToken, "alg", "RS512"); @@ -169,6 +171,7 @@ public void ShouldReturnError_GivenTokenWithWrongAlg() Assert.True(result.Errors.ContainsKey("token")); Assert.Contains("Invalid signature", result.Errors["token"]); } + private static DialogTokenValidator GetSut(DateTimeOffset simulatedNow, params PublicKeyPair[] publicKeyPairs) { var keyCache = Substitute.For(); From 9ce79c0340dc23cdfadcf159ed10bb75150e538e Mon Sep 17 00:00:00 2001 From: Magnus Sandgren <5285192+MagnusSandgren@users.noreply.github.com> Date: Mon, 17 Feb 2025 12:38:07 +0100 Subject: [PATCH 159/169] Remove one of the trys in DialogTokenValidator --- .../Services/DialogTokenValidator.cs | 27 ++++++++----------- .../DialogTokenValidatorTests.cs | 3 +-- 2 files changed, 12 insertions(+), 18 deletions(-) diff --git a/src/Digdir.Library.Dialogporten.WebApiClient/Services/DialogTokenValidator.cs b/src/Digdir.Library.Dialogporten.WebApiClient/Services/DialogTokenValidator.cs index 89f322b18..3f5c8853f 100644 --- a/src/Digdir.Library.Dialogporten.WebApiClient/Services/DialogTokenValidator.cs +++ b/src/Digdir.Library.Dialogporten.WebApiClient/Services/DialogTokenValidator.cs @@ -1,3 +1,4 @@ +using System.Buffers; using System.Buffers.Text; using System.Collections.ObjectModel; using System.Diagnostics.CodeAnalysis; @@ -158,21 +159,19 @@ private bool VerifyExpiration(JwksTokenParts decodedTokenParts) private static bool TryDecodePart(ReadOnlySpan tokenPart, Span buffer, out ReadOnlySpan span, out int length) { span = default; - length = 0; - try - { - if (!Base64Url.TryDecodeFromChars(tokenPart, buffer, out length)) - { - return false; - } - span = buffer[..length]; - return true; - } - catch (FormatException) + if (!TryDecodeFromChars(tokenPart, buffer, out length)) { return false; } + span = buffer[..length]; + return true; + } + + private static bool TryDecodeFromChars(ReadOnlySpan source, Span destination, out int bytesWritten) + { + var result = Base64Url.DecodeFromChars(source, destination, out _, out bytesWritten); + return result is OperationStatus.Done; } private static bool TryGetPublicKey(ReadOnlyCollection keyPairs, ReadOnlySpan header, [NotNullWhen(true)] out PublicKey? publicKey) @@ -213,12 +212,8 @@ private static bool TryGetPropertyValue(ReadOnlySpan json, ReadOnlySpan Date: Mon, 17 Feb 2025 13:07:20 +0100 Subject: [PATCH 160/169] Added more tests --- .../DialogTokenValidatorTests.cs | 21 +++++++++++++++++++ 1 file changed, 21 insertions(+) diff --git a/tests/Digdir.Library.Dialogporten.WebApiClient.Unit.Tests/DialogTokenValidatorTests.cs b/tests/Digdir.Library.Dialogporten.WebApiClient.Unit.Tests/DialogTokenValidatorTests.cs index 13b916e90..1fd9732b8 100644 --- a/tests/Digdir.Library.Dialogporten.WebApiClient.Unit.Tests/DialogTokenValidatorTests.cs +++ b/tests/Digdir.Library.Dialogporten.WebApiClient.Unit.Tests/DialogTokenValidatorTests.cs @@ -133,6 +133,27 @@ public void ShouldReturnError_GivenEmptyToken() Assert.Contains("Invalid token format", result.Errors["token"]); } + [Fact] + public void ShouldReturnError_GivenTokenWithInvalidJsonInPayload() + { + // Arrange + var sut = GetSut( + DateTimeOffset.Parse(ValidTimeStampString, CultureInfo.InvariantCulture), + ValidPublicKeyPairs); + + var tokenParts = DialogToken.Split('.'); + tokenParts[1] = Base64Url.EncodeToString("invalid json payload"u8); + var token = string.Join(".", tokenParts); + + // Act + var result = sut.Validate(token); + + // Assert + Assert.False(result.IsValid); + Assert.True(result.Errors.ContainsKey("token")); + Assert.Contains("Invalid token format", result.Errors["token"]); + } + [Fact] public void ShouldReturnError_GivenTokenWithWrongSignature() { From 3290bbfa1609413c66e689b64543b558f3a5a95a Mon Sep 17 00:00:00 2001 From: Amund Myrbostad Date: Mon, 17 Feb 2025 13:22:23 +0100 Subject: [PATCH 161/169] Added more tests --- .../DialogTokenValidatorTests.cs | 45 +++++++++++++++++++ 1 file changed, 45 insertions(+) diff --git a/tests/Digdir.Library.Dialogporten.WebApiClient.Unit.Tests/DialogTokenValidatorTests.cs b/tests/Digdir.Library.Dialogporten.WebApiClient.Unit.Tests/DialogTokenValidatorTests.cs index 1fd9732b8..abd5d19dd 100644 --- a/tests/Digdir.Library.Dialogporten.WebApiClient.Unit.Tests/DialogTokenValidatorTests.cs +++ b/tests/Digdir.Library.Dialogporten.WebApiClient.Unit.Tests/DialogTokenValidatorTests.cs @@ -153,6 +153,51 @@ public void ShouldReturnError_GivenTokenWithInvalidJsonInPayload() Assert.True(result.Errors.ContainsKey("token")); Assert.Contains("Invalid token format", result.Errors["token"]); } + [Fact] + public void ShouldReturnError_GivenMalformedJsonHeader() + { + var invalidHeader = """ + { + "alg": "EdDSA", + "typ": "JWT", + "kid": "dp-staging-240322-o5ymn" + """u8; + + // Arrange + var sut = GetSut( + DateTimeOffset.Parse(ValidTimeStampString, CultureInfo.InvariantCulture), + ValidPublicKeyPairs); + var tokenParts = DialogToken.Split('.'); + tokenParts[0] = Base64Url.EncodeToString(invalidHeader); + var token = string.Join(".", tokenParts); + + // Act + var result = sut.Validate(token); + Assert.False(result.IsValid); + Assert.True(result.Errors.ContainsKey("token")); + Assert.Contains("Invalid token format", result.Errors["token"]); + } + [Fact] + public void ShouldReturnError_GivenMalformedJsonBody() + { + var invalidBody = """ + { + "jti": "38cfdcb9-388b-47b8-a1bf-9f15b2819894", + "c": "urn:altinn:person:identifier-no:14886498226", + """u8; + // Arrange + var sut = GetSut( + DateTimeOffset.Parse(ValidTimeStampString, CultureInfo.InvariantCulture), + ValidPublicKeyPairs); + var tokenParts = DialogToken.Split('.'); + tokenParts[1] = Base64Url.EncodeToString(invalidBody); + var token = string.Join(".", tokenParts); + // Act + var result = sut.Validate(token); + Assert.False(result.IsValid); + Assert.True(result.Errors.ContainsKey("token")); + Assert.Contains("Invalid token format", result.Errors["token"]); + } [Fact] public void ShouldReturnError_GivenTokenWithWrongSignature() From 1c0e3957f3753ad31ff44123cfb37f5ea5c3bdc8 Mon Sep 17 00:00:00 2001 From: Magnus Sandgren <5285192+MagnusSandgren@users.noreply.github.com> Date: Mon, 17 Feb 2025 14:07:08 +0100 Subject: [PATCH 162/169] Validate that header and body is correctly formated json. --- .../Services/DialogTokenValidator.cs | 38 +++++++--- .../DialogTokenValidatorTests.cs | 70 +++++++++++-------- 2 files changed, 69 insertions(+), 39 deletions(-) diff --git a/src/Digdir.Library.Dialogporten.WebApiClient/Services/DialogTokenValidator.cs b/src/Digdir.Library.Dialogporten.WebApiClient/Services/DialogTokenValidator.cs index 3f5c8853f..ac75cfa34 100644 --- a/src/Digdir.Library.Dialogporten.WebApiClient/Services/DialogTokenValidator.cs +++ b/src/Digdir.Library.Dialogporten.WebApiClient/Services/DialogTokenValidator.cs @@ -52,8 +52,28 @@ private static bool TryDecodeToken( out JwksTokenParts decodedTokenParts) { decodedTokenParts = default; - return TryGetTokenParts(token, out tokenParts) - && TryDecodeParts(tokenDecodeBuffer, tokenParts, out decodedTokenParts); + if (!TryGetTokenParts(token, out tokenParts) || + !TryDecodeParts(tokenDecodeBuffer, tokenParts, out decodedTokenParts)) + { + return false; + } + + // Validate that the header and body are valid JSON + return IsValidJson(decodedTokenParts.Header) && + IsValidJson(decodedTokenParts.Body); + } + + private static bool IsValidJson(ReadOnlySpan span) + { + var reader = new Utf8JsonReader(span); + try + { + while (reader.Read()) { } + + return true; + } + catch (JsonException) { } + return false; } private static bool TryGetTokenParts(ReadOnlySpan token, out JwksTokenParts tokenParts) @@ -203,17 +223,13 @@ private static bool TryGetPropertyValue(ReadOnlySpan json, ReadOnlySpan Date: Mon, 17 Feb 2025 14:39:38 +0100 Subject: [PATCH 163/169] Clean up tests --- .../DialogTokenValidatorTests.cs | 53 +++++-------------- 1 file changed, 13 insertions(+), 40 deletions(-) diff --git a/tests/Digdir.Library.Dialogporten.WebApiClient.Unit.Tests/DialogTokenValidatorTests.cs b/tests/Digdir.Library.Dialogporten.WebApiClient.Unit.Tests/DialogTokenValidatorTests.cs index 6295e4370..4b2b760ff 100644 --- a/tests/Digdir.Library.Dialogporten.WebApiClient.Unit.Tests/DialogTokenValidatorTests.cs +++ b/tests/Digdir.Library.Dialogporten.WebApiClient.Unit.Tests/DialogTokenValidatorTests.cs @@ -133,27 +133,6 @@ public void ShouldReturnError_GivenEmptyToken() Assert.Contains("Invalid token format", result.Errors["token"]); } - [Fact] - public void ShouldReturnError_GivenTokenWithInvalidJsonInPayload() - { - // Arrange - var sut = GetSut( - DateTimeOffset.Parse(ValidTimeStampString, CultureInfo.InvariantCulture), - ValidPublicKeyPairs); - - var tokenParts = DialogToken.Split('.'); - tokenParts[1] = Base64Url.EncodeToString("invalid json payload"u8); - var token = string.Join(".", tokenParts); - - // Act - var result = sut.Validate(token); - - // Assert - Assert.False(result.IsValid); - Assert.True(result.Errors.ContainsKey("token")); - Assert.Contains("Invalid token format", result.Errors["token"]); - } - [Fact] public void ShouldReturnError_GivenTokenWithWrongSignature() { @@ -195,22 +174,19 @@ public void ShouldReturnError_GivenTokenWithWrongAlg() [Fact] public void ShouldReturnError_GivenMalformedJsonHeader() { - const string invalidHeader = """ - { - "alg": "EdDSA", - "typ": "JWT", - "kid": "dp-staging-240322-o5ymn" - """; + var invalidHeader = """ + { + "alg": "EdDSA", + "typ": "JWT", + "kid": "dp-staging-240322-o5ymn" + """u8; // Arrange var sut = GetSut( DateTimeOffset.Parse(ValidTimeStampString, CultureInfo.InvariantCulture), ValidPublicKeyPairs); var tokenParts = DialogToken.Split('.'); - tokenParts[0] = Encoding.UTF8.GetString( - Base64Url.EncodeToUtf8( - Encoding.UTF8.GetBytes( - invalidHeader))); + tokenParts[0] = Base64Url.EncodeToString(invalidHeader); var token = string.Join(".", tokenParts); // Act @@ -225,21 +201,18 @@ public void ShouldReturnError_GivenMalformedJsonHeader() [Fact] public void ShouldReturnError_GivenMalformedJsonBody() { - const string invalidBody = """ - { - "jti": "38cfdcb9-388b-47b8-a1bf-9f15b2819894", - "c": "urn:altinn:person:identifier-no:14886498226", - """; + var invalidBody = """ + { + "jti": "38cfdcb9-388b-47b8-a1bf-9f15b2819894", + "c": "urn:altinn:person:identifier-no:14886498226", + """u8; // Arrange var sut = GetSut( DateTimeOffset.Parse(ValidTimeStampString, CultureInfo.InvariantCulture), ValidPublicKeyPairs); var tokenParts = DialogToken.Split('.'); - tokenParts[1] = Encoding.UTF8.GetString( - Base64Url.EncodeToUtf8( - Encoding.UTF8.GetBytes( - invalidBody))); + tokenParts[1] = Base64Url.EncodeToString(invalidBody); var token = string.Join(".", tokenParts); // Act From 184e60b39b7ba5dbcd86e93ea3c2175dd93792c7 Mon Sep 17 00:00:00 2001 From: Amund Myrbostad Date: Mon, 17 Feb 2025 14:48:54 +0100 Subject: [PATCH 164/169] Removed "Sample" project --- Digdir.Domain.Dialogporten.sln | 7 - .../Dialogs.cs | 15 - ...ry.Dialogporten.WebApiClient.Sample.csproj | 21 -- .../Program.cs | 347 ------------------ .../appsettings.json | 10 - 5 files changed, 400 deletions(-) delete mode 100644 src/Digdir.Library.Dialogporten.WebApiClient.Sample/Dialogs.cs delete mode 100644 src/Digdir.Library.Dialogporten.WebApiClient.Sample/Digdir.Library.Dialogporten.WebApiClient.Sample.csproj delete mode 100644 src/Digdir.Library.Dialogporten.WebApiClient.Sample/Program.cs delete mode 100644 src/Digdir.Library.Dialogporten.WebApiClient.Sample/appsettings.json diff --git a/Digdir.Domain.Dialogporten.sln b/Digdir.Domain.Dialogporten.sln index 4d0dbf9a5..858783cd1 100644 --- a/Digdir.Domain.Dialogporten.sln +++ b/Digdir.Domain.Dialogporten.sln @@ -65,8 +65,6 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "WebApiClient", "WebApiClien 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.Tool.Dialogporten.LargeDataSetGenerator", "src\Digdir.Tool.Dialogporten.LargeDataSetGenerator\Digdir.Tool.Dialogporten.LargeDataSetGenerator.csproj", "{B0E0E9EE-AFBE-4013-908C-5F8DF66AB671}" EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Digdir.Library.Dialogporten.WebApiClient.WebApiSample", "src\Digdir.Library.Dialogporten.WebApiClient.WebApiSample\Digdir.Library.Dialogporten.WebApiClient.WebApiSample.csproj", "{FBF19369-21CD-437D-BB88-CCB81EC947CF}" @@ -167,10 +165,6 @@ Global {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 {B0E0E9EE-AFBE-4013-908C-5F8DF66AB671}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {B0E0E9EE-AFBE-4013-908C-5F8DF66AB671}.Debug|Any CPU.Build.0 = Debug|Any CPU {B0E0E9EE-AFBE-4013-908C-5F8DF66AB671}.Release|Any CPU.ActiveCfg = Release|Any CPU @@ -213,7 +207,6 @@ Global {6A485C65-3613-4A49-A16F-2789119F6F38} = {096E9B69-6783-4446-A895-0B6D7729A0D9} {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} {B0E0E9EE-AFBE-4013-908C-5F8DF66AB671} = {3C2C775D-F2D1-42A2-B53F-CC6D5FF59633} {FBF19369-21CD-437D-BB88-CCB81EC947CF} = {9B809C3A-B169-4599-A2D3-A25E87C510FC} {21A54524-CC15-42A7-804B-1E4DEBFAA1F7} = {CADB8189-4AA1-4732-844A-C41DBF3EC8B7} diff --git a/src/Digdir.Library.Dialogporten.WebApiClient.Sample/Dialogs.cs b/src/Digdir.Library.Dialogporten.WebApiClient.Sample/Dialogs.cs deleted file mode 100644 index 203ed4ef9..000000000 --- a/src/Digdir.Library.Dialogporten.WebApiClient.Sample/Dialogs.cs +++ /dev/null @@ -1,15 +0,0 @@ -using Altinn.ApiClients.Dialogporten.Features.V1; - -namespace Digdir.Library.Dialogporten.WebApiClient.Sample; - -public sealed class Dialogs -{ - 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/Digdir.Library.Dialogporten.WebApiClient.Sample.csproj b/src/Digdir.Library.Dialogporten.WebApiClient.Sample/Digdir.Library.Dialogporten.WebApiClient.Sample.csproj deleted file mode 100644 index 703792c15..000000000 --- a/src/Digdir.Library.Dialogporten.WebApiClient.Sample/Digdir.Library.Dialogporten.WebApiClient.Sample.csproj +++ /dev/null @@ -1,21 +0,0 @@ - - - - Exe - - - - - - - - - PreserveNewest - - - - - - - - diff --git a/src/Digdir.Library.Dialogporten.WebApiClient.Sample/Program.cs b/src/Digdir.Library.Dialogporten.WebApiClient.Sample/Program.cs deleted file mode 100644 index d92321bba..000000000 --- a/src/Digdir.Library.Dialogporten.WebApiClient.Sample/Program.cs +++ /dev/null @@ -1,347 +0,0 @@ -using System.Diagnostics; -using Altinn.ApiClients.Dialogporten; -using Altinn.ApiClients.Dialogporten.Features.V1; -using Digdir.Library.Dialogporten.WebApiClient.Sample; -using Microsoft.Extensions.Configuration; -using Microsoft.Extensions.DependencyInjection; - -// Setup -var configuration = new ConfigurationBuilder() - .AddJsonFile("appsettings.local.json", optional: false, reloadOnChange: true) - .Build(); - -var services = new ServiceCollection(); - -services.AddSingleton(configuration); -var settings = configuration.GetSection("DialogportenSettings").Get()!; -services.AddDialogportenClient(settings); - -var serviceProvider = services.BuildServiceProvider(); -var now = DateTime.UtcNow; - -var dialogportenClient = serviceProvider.GetRequiredService(); - -// var verifier = serviceProvider.GetRequiredService(); - -// Usage -// Test token -// var token = -// ""; -// Console.WriteLine(verifier.Verify(token)); -// var dict = DialogTokenVerifier.GetDialogTokenClaims(token); -// Console.WriteLine(dict); -// Console.WriteLine(dict[DialogTokenClaimTypes.Actions]); - - -Console.WriteLine("== Start Create Dialog =="); -var createDialogCommand = CreateCommand(); -var response = await dialogportenClient.V1ServiceOwnerDialogsCreateDialog(createDialogCommand); -Console.WriteLine(response.StatusCode); -Console.WriteLine(response.Content); -Console.WriteLine("== End Create Dialog =="); - - -// Get single dialog SO -Console.WriteLine("==Start Get Single Dialog=="); -var guid = Guid.Parse(response.Content!.Replace("\"", "").Trim()); -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() -{ - SystemLabel = [DialogEndUserContextsEntities_SystemLabel.Default] -}; -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=="); - - -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 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=="); -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 Purge Dialog == "); -var purgeResponse = await dialogportenClient.V1ServiceOwnerDialogsPurgePurgeDialog(guid, dialog.Revision); -Console.WriteLine($"Purge response status code: {response.StatusCode}"); -Console.WriteLine($"Purge Response: {response.StatusCode}"); - -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 =="); -return; - -static V1ServiceOwnerDialogsCommandsCreate_Dialog CreateCommand() -{ - return new V1ServiceOwnerDialogsCommandsCreate_Dialog - { - Activities = [], - ApiActions = [], - GuiActions = [], - Attachments = [], - SearchTags = [], - 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" - } - - - }, - Id = null, - 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 - } - ] - }; -} - -static V1ServiceOwnerDialogsCommandsUpdate_Dialog UpdateCommand() -{ - return new V1ServiceOwnerDialogsCommandsUpdate_Dialog - { - Activities = [], - ApiActions = [], - Attachments = [], - SearchTags = [], - 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" - } - - - }, - GuiActions = [], - 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 - }; -} diff --git a/src/Digdir.Library.Dialogporten.WebApiClient.Sample/appsettings.json b/src/Digdir.Library.Dialogporten.WebApiClient.Sample/appsettings.json deleted file mode 100644 index 9ac8e8d36..000000000 --- a/src/Digdir.Library.Dialogporten.WebApiClient.Sample/appsettings.json +++ /dev/null @@ -1,10 +0,0 @@ -{ - "DialogportenSettings": { - "Environment": "local", - "Maskinporten": { - "ClientId": "", - "Scope": "", - "EncodedJwk": "" - } - } -} From 75600329c4a9ab1a5b233e1c3573c571b4c09f95 Mon Sep 17 00:00:00 2001 From: Amund Myrbostad Date: Tue, 18 Feb 2025 14:37:55 +0100 Subject: [PATCH 165/169] Fixed issue with multi line comment. this is a bug in refitter and will be in multi line when fix is released --- .../Queries/Search/SearchDialogQuery.cs | 4 +- .../Features/V1/RefitterInterface.cs | 114 ++++++++++++++++-- 2 files changed, 106 insertions(+), 12 deletions(-) diff --git a/src/Digdir.Domain.Dialogporten.Application/Features/V1/ServiceOwner/Dialogs/Queries/Search/SearchDialogQuery.cs b/src/Digdir.Domain.Dialogporten.Application/Features/V1/ServiceOwner/Dialogs/Queries/Search/SearchDialogQuery.cs index 19808ad54..9ea2aa82a 100644 --- a/src/Digdir.Domain.Dialogporten.Application/Features/V1/ServiceOwner/Dialogs/Queries/Search/SearchDialogQuery.cs +++ b/src/Digdir.Domain.Dialogporten.Application/Features/V1/ServiceOwner/Dialogs/Queries/Search/SearchDialogQuery.cs @@ -54,9 +54,7 @@ public sealed class SearchDialogQuery : SortablePaginationParameter - /// If set to 'include', the result will include both deleted and non-deleted dialogs - /// If set to 'exclude', the result will only include non-deleted dialogs - /// If set to 'only', the result will only include deleted dialogs + /// If set to 'include', the result will include both deleted and non-deleted dialogs. If set to 'exclude', the result will only include non-deleted dialogs. If set to 'only', the result will only include deleted dialogs ///
public DeletedFilter? Deleted { diff --git a/src/Digdir.Library.Dialogporten.WebApiClient/Features/V1/RefitterInterface.cs b/src/Digdir.Library.Dialogporten.WebApiClient/Features/V1/RefitterInterface.cs index 5bafc0622..cc3dd0aa0 100644 --- a/src/Digdir.Library.Dialogporten.WebApiClient/Features/V1/RefitterInterface.cs +++ b/src/Digdir.Library.Dialogporten.WebApiClient/Features/V1/RefitterInterface.cs @@ -52,6 +52,12 @@ public class V1ServiceOwnerDialogsSearchSearchDialogQueryParams [Query(CollectionFormat.Multi)] public IEnumerable Status { get; set; } + /// + /// If set to 'include', the result will include both deleted and non-deleted dialogs. If set to 'exclude', the result will only include non-deleted dialogs. If set to 'only', the result will only include deleted dialogs + /// + [Query] + public V1Common_DeletedFilter? Deleted { get; set; } + /// /// Only return dialogs created after this date /// @@ -188,7 +194,7 @@ public partial interface IServiceownerApi /// /// /// 404 - /// The given dialog ID was not found or is already deleted. + /// The given dialog ID was not found. /// /// /// 410 @@ -235,7 +241,7 @@ public partial interface IServiceownerApi /// /// /// 404 - /// The given dialog ID was not found or is already deleted. + /// The given dialog ID was not found. /// /// /// 410 @@ -313,7 +319,7 @@ public partial interface IServiceownerApi /// /// /// 404 - /// The given dialog ID was not found or is already deleted. + /// The given dialog ID was not found. /// /// /// 410 @@ -348,7 +354,7 @@ public partial interface IServiceownerApi /// /// /// 404 - /// The given dialog ID was not found or is already deleted. + /// The given dialog ID was not found. /// /// /// 410 @@ -391,7 +397,7 @@ public partial interface IServiceownerApi /// /// /// 404 - /// The given dialog ID was not found or is already deleted. + /// The given dialog ID was not found. /// /// /// 410 @@ -439,7 +445,7 @@ public partial interface IServiceownerApi /// /// /// 404 - /// The given dialog ID was not found or is already deleted. + /// The given dialog ID was not found. /// /// /// @@ -481,7 +487,7 @@ public partial interface IServiceownerApi /// /// /// 404 - /// The given dialog ID was not found or is already deleted. + /// The given dialog ID was not found. /// /// /// 410 @@ -609,6 +615,10 @@ public partial interface IServiceownerApi /// Unauthorized to create a dialog for the given serviceResource (not owned by authenticated organization or has additional scope requirements defined in policy). /// /// + /// 409 + /// Dialog with IdempotentKey 01941821-ffca-73a1-9335-435a882be014 has already been created. + /// + /// /// 422 /// Domain error occurred. See problem details for a list of errors. /// @@ -618,6 +628,41 @@ public partial interface IServiceownerApi [Post("/api/v1/serviceowner/dialogs")] Task> V1ServiceOwnerDialogsCreateDialog([Body] V1ServiceOwnerDialogsCommandsCreate_Dialog dto, CancellationToken cancellationToken = default); + /// Restore a dialog + /// Restore a dialog. For more information see the documentation (link TBD). + /// + /// A representing the instance containing the result: + /// + /// + /// Status + /// Description + /// + /// + /// 204 + /// The dialog aggregate was restored successfully. + /// + /// + /// 401 + /// Unauthorized + /// + /// + /// 403 + /// Forbidden + /// + /// + /// 404 + /// The given dialog ID was not found. + /// + /// + /// 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/restore")] + Task V1ServiceOwnerDialogsRestoreRestoreDialog(System.Guid dialogId, [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). @@ -645,7 +690,7 @@ public partial interface IServiceownerApi /// /// /// 404 - /// The given dialog ID was not found or is already deleted. + /// The given dialog ID was not found. /// /// /// 412 @@ -719,7 +764,7 @@ public partial interface IServiceownerApi /// /// /// 404 - /// The given dialog ID was not found or is already deleted. + /// The given dialog ID was not found. /// /// /// 410 @@ -1558,6 +1603,20 @@ public partial class V1ServiceOwnerDialogsCommandsUpdate_Dialog [JsonPropertyName("dueAt")] public System.DateTimeOffset? DueAt { get; set; } + /// + /// Optional process identifier used to indicate a business process this dialog belongs to. + /// + + [JsonPropertyName("process")] + public string Process { 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; } + /// /// The expiration date for the dialog. This is the last date when the dialog is available for the end user. ///
@@ -2341,6 +2400,13 @@ public partial class V1ServiceOwnerDialogsQueriesSearch_Dialog [JsonPropertyName("dueAt")] public System.DateTimeOffset? DueAt { get; set; } + /// + /// If deleted, the date and time when the deletion was performed. + /// + + [JsonPropertyName("deletedAt")] + public System.DateTimeOffset? DeletedAt { get; set; } + /// /// The timestamp when the dialog will be made visible for authorized end users. /// @@ -2544,6 +2610,14 @@ public partial class V1ServiceOwnerDialogsQueriesGet_Dialog [JsonPropertyName("id")] public System.Guid Id { get; set; } + /// + /// An optional key to ensure idempotency in dialog creation. If provided, it allows for the safe re-submission of the same dialog creation request without creating duplicate entries. + ///
+ ///
+ + [JsonPropertyName("idempotentKey")] + public string IdempotentKey { get; set; } + /// /// The unique identifier for the revision in UUIDv4 format. /// @@ -2772,6 +2846,21 @@ public IDictionary AdditionalProperties } + [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "14.2.0.0 (NJsonSchema v11.1.0.0 (Newtonsoft.Json v13.0.0.0))")] + public enum V1Common_DeletedFilter + { + + [System.Runtime.Serialization.EnumMember(Value = @"Exclude")] + Exclude = 0, + + [System.Runtime.Serialization.EnumMember(Value = @"Include")] + Include = 1, + + [System.Runtime.Serialization.EnumMember(Value = @"Only")] + Only = 2, + + } + [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 { @@ -3365,6 +3454,13 @@ public partial class V1ServiceOwnerDialogsCommandsCreate_Dialog [JsonPropertyName("id")] public System.Guid? Id { get; set; } + /// + /// An optional key to ensure idempotency in dialog creation. If provided, it allows for the safe re-submission of the same dialog creation request without creating duplicate entries. + /// + + [JsonPropertyName("idempotentKey")] + public string IdempotentKey { 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 From b21246c5ce728bd20e8856506b4b180c92fe2a4e Mon Sep 17 00:00:00 2001 From: Amund Myrbostad Date: Tue, 18 Feb 2025 14:47:35 +0100 Subject: [PATCH 166/169] Wont push to nuget --- .github/workflows/ci-cd-main.yml | 20 ++++++++++---------- .github/workflows/ci-cd-staging.yml | 20 ++++++++++---------- 2 files changed, 20 insertions(+), 20 deletions(-) diff --git a/.github/workflows/ci-cd-main.yml b/.github/workflows/ci-cd-main.yml index e9cc1ede9..630076309 100644 --- a/.github/workflows/ci-cd-main.yml +++ b/.github/workflows/ci-cd-main.yml @@ -98,16 +98,16 @@ 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-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.hasSwaggerSchemaChanges == 'true' }} - with: - version: ${{ needs.get-current-version.outputs.version }}-rc.${{ needs.generate-git-short-sha.outputs.gitShortSha }} - path: 'src/Digdir.Library.Dialogporten.WebApiClient.csproj' - source: 'https://api.nuget.org/v3/index.json' - secrets: - NUGET_API_KEY: ${{ secrets.NUGET_API_TEST_KEY }} +# 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.hasSwaggerSchemaChanges == 'true' }} +# with: +# version: ${{ needs.get-current-version.outputs.version }}-rc.${{ needs.generate-git-short-sha.outputs.gitShortSha }} +# path: 'src/Digdir.Library.Dialogporten.WebApiClient.csproj' +# source: 'https://api.nuget.org/v3/index.json' +# secrets: +# NUGET_API_KEY: ${{ secrets.NUGET_API_TEST_KEY }} publish-schema-npm: name: Deploy schema npm package diff --git a/.github/workflows/ci-cd-staging.yml b/.github/workflows/ci-cd-staging.yml index 837fe0d6e..69c068d5b 100644 --- a/.github/workflows/ci-cd-staging.yml +++ b/.github/workflows/ci-cd-staging.yml @@ -79,16 +79,16 @@ jobs: runMigration: ${{ needs.check-for-changes.outputs.hasMigrationChanges == 'true' }} ref: "refs/tags/v${{ github.event.client_payload.version }}" - publish-sdk-to-nuget: - uses: ./.github/workflows/workflow-publish-nuget.yml - needs: [ get-current-version, check-for-changes ] - if: ${{ needs.check-for-changes.outputs.hasSwaggerSchemaChanges == 'true' }} - with: - version: ${{ needs.get-current-version.outputs.version }} - path: 'src/Digdir.Library.Dialogporten.WebApiClient/Digdir.Library.Dialogporten.WebApiClient.csproj' - source: 'https://api.nuget.org/v3/index.json' - secrets: - NUGET_API_KEY: ${{ secrets.NUGET_API_TEST_KEY }} +# publish-sdk-to-nuget: +# uses: ./.github/workflows/workflow-publish-nuget.yml +# needs: [ get-current-version, check-for-changes ] +# if: ${{ needs.check-for-changes.outputs.hasSwaggerSchemaChanges == 'true' }} +# with: +# version: ${{ needs.get-current-version.outputs.version }} +# path: 'src/Digdir.Library.Dialogporten.WebApiClient/Digdir.Library.Dialogporten.WebApiClient.csproj' +# source: 'https://api.nuget.org/v3/index.json' +# secrets: +# NUGET_API_KEY: ${{ secrets.NUGET_API_TEST_KEY }} store-apps-version: name: Store Latest Deployed Apps Version as GitHub Variable From c0e7f34bd747579963f90639b9b051064795bf22 Mon Sep 17 00:00:00 2001 From: Amund Myrbostad Date: Wed, 19 Feb 2025 10:06:18 +0100 Subject: [PATCH 167/169] Cleanup --- .../WebApiSample.http | 4 +- .../README.md | 185 ++---------------- 2 files changed, 18 insertions(+), 171 deletions(-) diff --git a/src/Digdir.Library.Dialogporten.WebApiClient.WebApiSample/WebApiSample.http b/src/Digdir.Library.Dialogporten.WebApiClient.WebApiSample/WebApiSample.http index 4c896e588..e5f2d214e 100644 --- a/src/Digdir.Library.Dialogporten.WebApiClient.WebApiSample/WebApiSample.http +++ b/src/Digdir.Library.Dialogporten.WebApiClient.WebApiSample/WebApiSample.http @@ -1,5 +1,5 @@ @HostAddress = http://localhost:5006 -@dialogId = "DIALOG_ID_HERE" +@dialogId = DIALOG_ID_HERE @dialogToken = "DIALOG_TOKEN_HERE" ### Verify DialogToken @@ -12,5 +12,5 @@ Accept: application/json } ### Get dialog by id -GET {{HostAddress}}/dialog/{{dialogId}}} +GET {{HostAddress}}/dialog/{{dialogId}} Accept: application/json diff --git a/src/Digdir.Library.Dialogporten.WebApiClient/README.md b/src/Digdir.Library.Dialogporten.WebApiClient/README.md index 5b6b4cf1b..c114a167c 100644 --- a/src/Digdir.Library.Dialogporten.WebApiClient/README.md +++ b/src/Digdir.Library.Dialogporten.WebApiClient/README.md @@ -1,6 +1,6 @@ # SO SDK -Simple overview +Simple overview Refit-based client SDK Based on https://github.com/altinn/altinn-apiclient-maskinporten The refit-Interface is autogenerated with refitter. It uses OperationId to create method names. @@ -16,6 +16,21 @@ This library provides extensions methods providing means to create dialogporten Setup +```json +{ + "dialogportenSettings": { + "BaseUri": "", + "ThrowOnPublicKeyFetchInit": "", + "Maskinporten": { + "ClientId": "", + "Environment": "", + "Scope": "", + "EncodedJwk": "" + } + } +} +``` + ```C# var configuration = new ConfigurationBuilder() .AddJsonFile("appsettings.json", optional: false, reloadOnChange: true) @@ -32,176 +47,8 @@ var dialogportenClient = serviceProvider.GetRequiredService(); var verifier = serviceProvider.GetRequiredService(); ``` -AppSettings - -```JSON -{ - "DialogportenSettings": { - "Environment": "", - "Maskinporten": { - "ClientId": "", - "Scope": "", - "EncodedJwk": "" - } - }, - "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); ``` -DialogToken verification - -```C# -var verifier = serviceProvider.GetRequiredService(); -var token = ""; // Dialog token -Console.WriteLine(verifier.Verify(token)); -var dict = DialogTokenVerifier.GetDialogTokenClaims(token); -``` From 7dbd1e55b2247136137d4614c98e488f9de3cf50 Mon Sep 17 00:00:00 2001 From: Amund Myrbostad Date: Thu, 20 Feb 2025 08:38:29 +0100 Subject: [PATCH 168/169] CleanUP --- src/Digdir.Library.Dialogporten.WebApiClient/README.md | 10 ---------- 1 file changed, 10 deletions(-) diff --git a/src/Digdir.Library.Dialogporten.WebApiClient/README.md b/src/Digdir.Library.Dialogporten.WebApiClient/README.md index c114a167c..ba77839b2 100644 --- a/src/Digdir.Library.Dialogporten.WebApiClient/README.md +++ b/src/Digdir.Library.Dialogporten.WebApiClient/README.md @@ -41,14 +41,4 @@ var services = new ServiceCollection(); services.AddSingleton(configuration); services.AddDialogportenClient(); -services.AddDialogTokenVerifer(); - -var dialogportenClient = serviceProvider.GetRequiredService(); -var verifier = serviceProvider.GetRequiredService(); -``` - -Basic usage - -```C# ``` - From 21b36db99d2be8342ddd29d4ac53437d3a1a9ec6 Mon Sep 17 00:00:00 2001 From: Amund Myrbostad Date: Thu, 20 Feb 2025 08:54:17 +0100 Subject: [PATCH 169/169] Fix version thingy --- .../Digdir.Domain.Dialogporten.WebApi.csproj | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/Digdir.Domain.Dialogporten.WebApi/Digdir.Domain.Dialogporten.WebApi.csproj b/src/Digdir.Domain.Dialogporten.WebApi/Digdir.Domain.Dialogporten.WebApi.csproj index c87022c9a..a2138a614 100644 --- a/src/Digdir.Domain.Dialogporten.WebApi/Digdir.Domain.Dialogporten.WebApi.csproj +++ b/src/Digdir.Domain.Dialogporten.WebApi/Digdir.Domain.Dialogporten.WebApi.csproj @@ -13,9 +13,9 @@ - - - + + + all runtime; build; native; contentfiles; analyzers; buildtransitive