From 0ca4ef6812a66f9759adbf9643b0520d30f3c565 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Kristen=20H=C3=A6rum?= Date: Thu, 14 Mar 2024 09:29:16 +0100 Subject: [PATCH 01/20] Feature/funksjonalitet for doedsmedling og foedselsmelding (#3433) Funksjonalitet for foedsels- og doedsmeldinger --- apps/adresse-service/config.yml | 2 + apps/endringsmelding-service/config.yml | 3 + .../config/Consumers.java | 4 +- .../consumer/AdresseServiceConsumer.java | 38 +++ .../consumer/GenererNavnServiceConsumer.java | 38 +++ .../consumer/IdentPoolConsumer.java | 38 +++ .../consumer/TpsForvalterConsumer.java | 8 +- .../consumer/TpsMessagingConsumer.java | 84 ++++- .../command/GenererNavnServiceCommand.java | 38 +++ .../command/GetAdressehistorikkCommand.java | 44 +++ .../command/GetEksistererPersonCommand.java | 47 +++ .../command/GetPersondataCommand.java | 41 +++ .../command/IdentpoolPostCommand.java | 46 +++ .../command/SendDoedsmeldingCommand.java | 39 ++- .../command/SendDoedsmeldingOldCommand.java | 47 +++ .../command/SendFoedselsmeldingCommand.java | 37 +-- .../SendFoedselsmeldingOldCommand.java | 47 +++ .../SendKansellerDoedsmeldingCommand.java | 45 +++ .../command/VegadresseServiceCommand.java | 56 ++++ .../consumer/dto/HentIdenterRequest.java | 37 +++ .../SkdEndringsmeldingerController.java | 52 +++ .../mapper/AdressehistorikkMapper.java | 115 +++++++ .../mapper/FoedselsmeldingRequestMapper.java | 112 +++++++ .../mapper/IdentpoolRequestMapper.java | 44 +++ .../service/DoedsmeldingService.java | 165 ++++++++++ .../service/FoedselsmeldingService.java | 113 +++++++ .../utility/KjoennFraIdentUtility.java | 15 + .../src/main/resources/application-dev.yml | 10 + .../src/main/resources/application-prod.yml | 9 + .../src/main/resources/application.yml | 19 +- apps/generer-navn-service/config.yml | 2 + apps/testnav-ident-pool/config.yml | 2 + apps/tps-messaging-service/build.gradle | 2 +- .../config/MapperFacadeConfig.java | 20 +- .../consumer/TestmiljoerServiceConsumer.java | 9 +- .../consumer/TpsConsumer.java | 2 +- .../command/TestmiljoerServiceCommand.java | 7 +- .../consumer/command/TpsMeldingCommand.java | 3 +- .../tpsmessagingservice/dto/TpsRequest.java | 4 + .../dto/TpsServiceRutine.java | 21 -- .../TpsServicerutineAksjonsdatoRequest.java | 35 ++ .../dto/TpsServicerutineM201Response.java | 6 +- .../dto/TpsServicerutineRequest.java | 19 +- .../dto/TpsServicerutineS018Response.java | 39 +++ .../dto/TpsServicerutineS610Response.java | 2 +- .../SkdFeltDefinisjonerTrans1.java | 208 ++++++++++++ .../endringsmeldinger/SkdMeldingTrans1.java | 207 ++++++++++++ .../endringsmeldinger/SkdMeldingsheader.java | 51 +++ .../WhitespaceConstants.java | 21 ++ .../mapper/AdresseMappingStrategy.java | 4 - .../mapper/LocalDateCustomMapping.java | 30 ++ .../mapper/LocalDateTimeCustomMapping.java | 37 +++ .../provider/v1/PersonController.java | 42 +++ .../service/AdressehistorikkService.java | 130 ++++++++ .../service/DoedsmeldingService.java | 68 ++++ .../service/FoedselsmeldingService.java | 44 +++ .../service/IdentService.java | 12 +- .../service/PersonService.java | 11 +- .../service/skd/AdresseAppenderService.java | 107 +++++++ ...DoedsmeldingAnnulleringBuilderService.java | 54 ++++ .../skd/DoedsmeldingBuilderService.java | 52 +++ .../skd/FoedselsmeldingBuilderService.java | 107 +++++++ .../service/skd/SendSkdMeldinger.java | 40 +++ .../utils/ConvertDateToStringUtility.java | 25 ++ .../utils/HentDatoFraIdentUtility.java | 63 ++++ .../utils/HusbokstavEncoder.java | 50 +++ .../utils/IdenttypeFraIdentUtility.java | 24 ++ .../utils/LandkodeEncoder.java | 302 ++++++++++++++++++ .../utils/NullcheckUtil.java | 13 + .../utils/ResponseStatus.java | 37 +++ .../utils/ServiceRutineUtil.java | 8 +- .../utils/TranslittereringUtil.java | 131 -------- .../src/main/resources/application-prod.yaml | 9 + .../src/main/resources/application.yaml | 11 +- .../ApplicationContextTest.java | 2 +- .../v1/FoedselsmeldingDTO.java | 1 + .../dto/endringsmelding/v2/AdresseFra.java | 7 + .../endringsmelding/v2/DoedsmeldingDTO.java | 18 ++ .../v2/DoedsmeldingResponseDTO.java | 20 ++ .../v2/FoedselsmeldingDTO.java | 22 ++ .../v2/FoedselsmeldingResponseDTO.java | 20 ++ .../dto/endringsmelding/v2/Identtype.java | 8 + .../v2/KansellerDoedsmeldingDTO.java | 15 + .../libs/dto/endringsmelding/v2/Kjoenn.java | 7 + .../tpsmessagingservice/v1/AdresseDTO.java | 6 +- .../v1/AdressehistorikkDTO.java | 227 +++++++++++++ .../v1/AdressehistorikkRequest.java | 18 ++ .../v1/DoedsmeldingRequest.java | 18 ++ .../v1/DoedsmeldingResponse.java | 18 ++ .../v1/FoedselsmeldingRequest.java | 17 + .../v1/FoedselsmeldingResponse.java | 18 ++ .../v1/GateadresseDTO.java | 13 +- .../v1/IdentMiljoeDTO.java | 31 ++ .../v1/MatrikkeladresseDTO.java | 11 +- .../tpsmessagingservice/v1/PersonDTO.java | 6 + 95 files changed, 3709 insertions(+), 258 deletions(-) create mode 100644 apps/endringsmelding-service/src/main/java/no/nav/testnav/endringsmeldingservice/consumer/AdresseServiceConsumer.java create mode 100644 apps/endringsmelding-service/src/main/java/no/nav/testnav/endringsmeldingservice/consumer/GenererNavnServiceConsumer.java create mode 100644 apps/endringsmelding-service/src/main/java/no/nav/testnav/endringsmeldingservice/consumer/IdentPoolConsumer.java create mode 100644 apps/endringsmelding-service/src/main/java/no/nav/testnav/endringsmeldingservice/consumer/command/GenererNavnServiceCommand.java create mode 100644 apps/endringsmelding-service/src/main/java/no/nav/testnav/endringsmeldingservice/consumer/command/GetAdressehistorikkCommand.java create mode 100644 apps/endringsmelding-service/src/main/java/no/nav/testnav/endringsmeldingservice/consumer/command/GetEksistererPersonCommand.java create mode 100644 apps/endringsmelding-service/src/main/java/no/nav/testnav/endringsmeldingservice/consumer/command/GetPersondataCommand.java create mode 100644 apps/endringsmelding-service/src/main/java/no/nav/testnav/endringsmeldingservice/consumer/command/IdentpoolPostCommand.java create mode 100644 apps/endringsmelding-service/src/main/java/no/nav/testnav/endringsmeldingservice/consumer/command/SendDoedsmeldingOldCommand.java create mode 100644 apps/endringsmelding-service/src/main/java/no/nav/testnav/endringsmeldingservice/consumer/command/SendFoedselsmeldingOldCommand.java create mode 100644 apps/endringsmelding-service/src/main/java/no/nav/testnav/endringsmeldingservice/consumer/command/SendKansellerDoedsmeldingCommand.java create mode 100644 apps/endringsmelding-service/src/main/java/no/nav/testnav/endringsmeldingservice/consumer/command/VegadresseServiceCommand.java create mode 100644 apps/endringsmelding-service/src/main/java/no/nav/testnav/endringsmeldingservice/consumer/dto/HentIdenterRequest.java create mode 100644 apps/endringsmelding-service/src/main/java/no/nav/testnav/endringsmeldingservice/controller/SkdEndringsmeldingerController.java create mode 100644 apps/endringsmelding-service/src/main/java/no/nav/testnav/endringsmeldingservice/mapper/AdressehistorikkMapper.java create mode 100644 apps/endringsmelding-service/src/main/java/no/nav/testnav/endringsmeldingservice/mapper/FoedselsmeldingRequestMapper.java create mode 100644 apps/endringsmelding-service/src/main/java/no/nav/testnav/endringsmeldingservice/mapper/IdentpoolRequestMapper.java create mode 100644 apps/endringsmelding-service/src/main/java/no/nav/testnav/endringsmeldingservice/service/DoedsmeldingService.java create mode 100644 apps/endringsmelding-service/src/main/java/no/nav/testnav/endringsmeldingservice/service/FoedselsmeldingService.java create mode 100644 apps/endringsmelding-service/src/main/java/no/nav/testnav/endringsmeldingservice/utility/KjoennFraIdentUtility.java create mode 100644 apps/endringsmelding-service/src/main/resources/application-dev.yml create mode 100644 apps/endringsmelding-service/src/main/resources/application-prod.yml create mode 100644 apps/tps-messaging-service/src/main/java/no/nav/testnav/apps/tpsmessagingservice/dto/TpsRequest.java delete mode 100644 apps/tps-messaging-service/src/main/java/no/nav/testnav/apps/tpsmessagingservice/dto/TpsServiceRutine.java create mode 100644 apps/tps-messaging-service/src/main/java/no/nav/testnav/apps/tpsmessagingservice/dto/TpsServicerutineAksjonsdatoRequest.java create mode 100644 apps/tps-messaging-service/src/main/java/no/nav/testnav/apps/tpsmessagingservice/dto/TpsServicerutineS018Response.java create mode 100644 apps/tps-messaging-service/src/main/java/no/nav/testnav/apps/tpsmessagingservice/dto/endringsmeldinger/SkdFeltDefinisjonerTrans1.java create mode 100644 apps/tps-messaging-service/src/main/java/no/nav/testnav/apps/tpsmessagingservice/dto/endringsmeldinger/SkdMeldingTrans1.java create mode 100644 apps/tps-messaging-service/src/main/java/no/nav/testnav/apps/tpsmessagingservice/dto/endringsmeldinger/SkdMeldingsheader.java create mode 100644 apps/tps-messaging-service/src/main/java/no/nav/testnav/apps/tpsmessagingservice/dto/endringsmeldinger/WhitespaceConstants.java create mode 100644 apps/tps-messaging-service/src/main/java/no/nav/testnav/apps/tpsmessagingservice/mapper/LocalDateCustomMapping.java create mode 100644 apps/tps-messaging-service/src/main/java/no/nav/testnav/apps/tpsmessagingservice/mapper/LocalDateTimeCustomMapping.java create mode 100644 apps/tps-messaging-service/src/main/java/no/nav/testnav/apps/tpsmessagingservice/service/AdressehistorikkService.java create mode 100644 apps/tps-messaging-service/src/main/java/no/nav/testnav/apps/tpsmessagingservice/service/DoedsmeldingService.java create mode 100644 apps/tps-messaging-service/src/main/java/no/nav/testnav/apps/tpsmessagingservice/service/FoedselsmeldingService.java create mode 100644 apps/tps-messaging-service/src/main/java/no/nav/testnav/apps/tpsmessagingservice/service/skd/AdresseAppenderService.java create mode 100644 apps/tps-messaging-service/src/main/java/no/nav/testnav/apps/tpsmessagingservice/service/skd/DoedsmeldingAnnulleringBuilderService.java create mode 100644 apps/tps-messaging-service/src/main/java/no/nav/testnav/apps/tpsmessagingservice/service/skd/DoedsmeldingBuilderService.java create mode 100644 apps/tps-messaging-service/src/main/java/no/nav/testnav/apps/tpsmessagingservice/service/skd/FoedselsmeldingBuilderService.java create mode 100644 apps/tps-messaging-service/src/main/java/no/nav/testnav/apps/tpsmessagingservice/service/skd/SendSkdMeldinger.java create mode 100644 apps/tps-messaging-service/src/main/java/no/nav/testnav/apps/tpsmessagingservice/utils/ConvertDateToStringUtility.java create mode 100644 apps/tps-messaging-service/src/main/java/no/nav/testnav/apps/tpsmessagingservice/utils/HentDatoFraIdentUtility.java create mode 100644 apps/tps-messaging-service/src/main/java/no/nav/testnav/apps/tpsmessagingservice/utils/HusbokstavEncoder.java create mode 100644 apps/tps-messaging-service/src/main/java/no/nav/testnav/apps/tpsmessagingservice/utils/IdenttypeFraIdentUtility.java create mode 100644 apps/tps-messaging-service/src/main/java/no/nav/testnav/apps/tpsmessagingservice/utils/LandkodeEncoder.java create mode 100644 apps/tps-messaging-service/src/main/java/no/nav/testnav/apps/tpsmessagingservice/utils/NullcheckUtil.java create mode 100644 apps/tps-messaging-service/src/main/java/no/nav/testnav/apps/tpsmessagingservice/utils/ResponseStatus.java delete mode 100644 apps/tps-messaging-service/src/main/java/no/nav/testnav/apps/tpsmessagingservice/utils/TranslittereringUtil.java create mode 100644 apps/tps-messaging-service/src/main/resources/application-prod.yaml create mode 100644 libs/data-transfer-objects/src/main/java/no/nav/testnav/libs/dto/endringsmelding/v2/AdresseFra.java create mode 100644 libs/data-transfer-objects/src/main/java/no/nav/testnav/libs/dto/endringsmelding/v2/DoedsmeldingDTO.java create mode 100644 libs/data-transfer-objects/src/main/java/no/nav/testnav/libs/dto/endringsmelding/v2/DoedsmeldingResponseDTO.java create mode 100644 libs/data-transfer-objects/src/main/java/no/nav/testnav/libs/dto/endringsmelding/v2/FoedselsmeldingDTO.java create mode 100644 libs/data-transfer-objects/src/main/java/no/nav/testnav/libs/dto/endringsmelding/v2/FoedselsmeldingResponseDTO.java create mode 100644 libs/data-transfer-objects/src/main/java/no/nav/testnav/libs/dto/endringsmelding/v2/Identtype.java create mode 100644 libs/data-transfer-objects/src/main/java/no/nav/testnav/libs/dto/endringsmelding/v2/KansellerDoedsmeldingDTO.java create mode 100644 libs/data-transfer-objects/src/main/java/no/nav/testnav/libs/dto/endringsmelding/v2/Kjoenn.java create mode 100644 libs/data-transfer-search-objects/src/main/java/no/nav/testnav/libs/data/tpsmessagingservice/v1/AdressehistorikkDTO.java create mode 100644 libs/data-transfer-search-objects/src/main/java/no/nav/testnav/libs/data/tpsmessagingservice/v1/AdressehistorikkRequest.java create mode 100644 libs/data-transfer-search-objects/src/main/java/no/nav/testnav/libs/data/tpsmessagingservice/v1/DoedsmeldingRequest.java create mode 100644 libs/data-transfer-search-objects/src/main/java/no/nav/testnav/libs/data/tpsmessagingservice/v1/DoedsmeldingResponse.java create mode 100644 libs/data-transfer-search-objects/src/main/java/no/nav/testnav/libs/data/tpsmessagingservice/v1/FoedselsmeldingRequest.java create mode 100644 libs/data-transfer-search-objects/src/main/java/no/nav/testnav/libs/data/tpsmessagingservice/v1/FoedselsmeldingResponse.java create mode 100644 libs/data-transfer-search-objects/src/main/java/no/nav/testnav/libs/data/tpsmessagingservice/v1/IdentMiljoeDTO.java diff --git a/apps/adresse-service/config.yml b/apps/adresse-service/config.yml index 018505cf6f3..9afa0b9e9c5 100644 --- a/apps/adresse-service/config.yml +++ b/apps/adresse-service/config.yml @@ -62,6 +62,8 @@ spec: - application: app-1 namespace: plattformsikkerhet cluster: dev-gcp + - application: testnav-endringsmelding-service + cluster: dev-gcp outbound: external: - host: testnav-pdl-proxy.dev-fss-pub.nais.io diff --git a/apps/endringsmelding-service/config.yml b/apps/endringsmelding-service/config.yml index 0eb96c908cb..4e0c0a762e8 100644 --- a/apps/endringsmelding-service/config.yml +++ b/apps/endringsmelding-service/config.yml @@ -28,6 +28,9 @@ spec: outbound: rules: - application: testnav-tps-messaging-service + - application: testnav-ident-pool + - application: generer-navn-service + - application: testnav-adresse-service external: - host: tps-forvalteren-proxy.dev-fss-pub.nais.io liveness: diff --git a/apps/endringsmelding-service/src/main/java/no/nav/testnav/endringsmeldingservice/config/Consumers.java b/apps/endringsmelding-service/src/main/java/no/nav/testnav/endringsmeldingservice/config/Consumers.java index 0b633903ee0..67a149f36c7 100644 --- a/apps/endringsmelding-service/src/main/java/no/nav/testnav/endringsmeldingservice/config/Consumers.java +++ b/apps/endringsmelding-service/src/main/java/no/nav/testnav/endringsmeldingservice/config/Consumers.java @@ -26,5 +26,7 @@ public class Consumers { private ServerProperties tpsForvalterenProxy; private ServerProperties tpsMessagingService; - + private ServerProperties adresseService; + private ServerProperties genererNavnService; + private ServerProperties identPool; } diff --git a/apps/endringsmelding-service/src/main/java/no/nav/testnav/endringsmeldingservice/consumer/AdresseServiceConsumer.java b/apps/endringsmelding-service/src/main/java/no/nav/testnav/endringsmeldingservice/consumer/AdresseServiceConsumer.java new file mode 100644 index 00000000000..d9234331567 --- /dev/null +++ b/apps/endringsmelding-service/src/main/java/no/nav/testnav/endringsmeldingservice/consumer/AdresseServiceConsumer.java @@ -0,0 +1,38 @@ +package no.nav.testnav.endringsmeldingservice.consumer; + +import no.nav.testnav.endringsmeldingservice.config.Consumers; +import no.nav.testnav.endringsmeldingservice.consumer.command.VegadresseServiceCommand; +import no.nav.testnav.libs.dto.adresseservice.v1.VegadresseDTO; +import no.nav.testnav.libs.reactivesecurity.exchange.TokenExchange; +import no.nav.testnav.libs.securitycore.domain.ServerProperties; +import org.springframework.stereotype.Service; +import org.springframework.web.reactive.function.client.WebClient; +import reactor.core.publisher.Mono; + +import java.util.List; + +@Service +public class AdresseServiceConsumer { + private final WebClient webClient; + private final TokenExchange tokenExchange; + private final ServerProperties serverProperties; + + public AdresseServiceConsumer( + TokenExchange tokenExchange, + Consumers consumers) { + this.tokenExchange = tokenExchange; + serverProperties = consumers.getAdresseService(); + this.webClient = WebClient + .builder() + .baseUrl(serverProperties.getUrl()) + .build(); + } + + public Mono> getVegadresse() { + + return tokenExchange.exchange(serverProperties) + .flatMapMany(token -> new VegadresseServiceCommand(webClient, token.getTokenValue()).call()) + .collectList(); + + } +} diff --git a/apps/endringsmelding-service/src/main/java/no/nav/testnav/endringsmeldingservice/consumer/GenererNavnServiceConsumer.java b/apps/endringsmelding-service/src/main/java/no/nav/testnav/endringsmeldingservice/consumer/GenererNavnServiceConsumer.java new file mode 100644 index 00000000000..905d09107e1 --- /dev/null +++ b/apps/endringsmelding-service/src/main/java/no/nav/testnav/endringsmeldingservice/consumer/GenererNavnServiceConsumer.java @@ -0,0 +1,38 @@ +package no.nav.testnav.endringsmeldingservice.consumer; + +import no.nav.testnav.endringsmeldingservice.config.Consumers; +import no.nav.testnav.endringsmeldingservice.consumer.command.GenererNavnServiceCommand; +import no.nav.testnav.libs.dto.generernavnservice.v1.NavnDTO; +import no.nav.testnav.libs.reactivesecurity.exchange.TokenExchange; +import no.nav.testnav.libs.securitycore.domain.ServerProperties; +import org.springframework.stereotype.Service; +import org.springframework.web.reactive.function.client.WebClient; +import reactor.core.publisher.Mono; + +import java.util.List; + +@Service +public class GenererNavnServiceConsumer { + + private final WebClient webClient; + private final TokenExchange tokenExchange; + private final ServerProperties serverProperties; + + public GenererNavnServiceConsumer( + TokenExchange tokenExchange, + Consumers consumers) { + this.tokenExchange = tokenExchange; + serverProperties = consumers.getGenererNavnService(); + this.webClient = WebClient + .builder() + .baseUrl(serverProperties.getUrl()) + .build(); + } + + public Mono> getNavn() { + + return tokenExchange.exchange(serverProperties) + .flatMapMany(token -> new GenererNavnServiceCommand(webClient, 1, token.getTokenValue()).call()) + .collectList(); + } +} diff --git a/apps/endringsmelding-service/src/main/java/no/nav/testnav/endringsmeldingservice/consumer/IdentPoolConsumer.java b/apps/endringsmelding-service/src/main/java/no/nav/testnav/endringsmeldingservice/consumer/IdentPoolConsumer.java new file mode 100644 index 00000000000..76c17363321 --- /dev/null +++ b/apps/endringsmelding-service/src/main/java/no/nav/testnav/endringsmeldingservice/consumer/IdentPoolConsumer.java @@ -0,0 +1,38 @@ +package no.nav.testnav.endringsmeldingservice.consumer; + +import no.nav.testnav.endringsmeldingservice.config.Consumers; +import no.nav.testnav.endringsmeldingservice.consumer.command.IdentpoolPostCommand; +import no.nav.testnav.endringsmeldingservice.consumer.dto.HentIdenterRequest; +import no.nav.testnav.libs.reactivesecurity.exchange.TokenExchange; +import no.nav.testnav.libs.securitycore.domain.ServerProperties; +import org.springframework.stereotype.Service; +import org.springframework.web.reactive.function.client.WebClient; +import reactor.core.publisher.Mono; + +import java.util.List; + +@Service +public class IdentPoolConsumer { + + private final WebClient webClient; + private final TokenExchange tokenExchange; + private final ServerProperties serverProperties; + + public IdentPoolConsumer( + TokenExchange tokenExchange, + Consumers consumers) { + this.tokenExchange = tokenExchange; + serverProperties = consumers.getIdentPool(); + this.webClient = WebClient + .builder() + .baseUrl(serverProperties.getUrl()) + .build(); + } + + public Mono> acquireIdents(HentIdenterRequest request) { + + return tokenExchange.exchange(serverProperties) + .flatMap(token -> new IdentpoolPostCommand(webClient, request, + token.getTokenValue()).call()); + } +} \ No newline at end of file diff --git a/apps/endringsmelding-service/src/main/java/no/nav/testnav/endringsmeldingservice/consumer/TpsForvalterConsumer.java b/apps/endringsmelding-service/src/main/java/no/nav/testnav/endringsmeldingservice/consumer/TpsForvalterConsumer.java index c35e4f060e6..952856c6331 100644 --- a/apps/endringsmelding-service/src/main/java/no/nav/testnav/endringsmeldingservice/consumer/TpsForvalterConsumer.java +++ b/apps/endringsmelding-service/src/main/java/no/nav/testnav/endringsmeldingservice/consumer/TpsForvalterConsumer.java @@ -2,8 +2,8 @@ import com.fasterxml.jackson.databind.ObjectMapper; import no.nav.testnav.endringsmeldingservice.config.Consumers; -import no.nav.testnav.endringsmeldingservice.consumer.command.SendDoedsmeldingCommand; -import no.nav.testnav.endringsmeldingservice.consumer.command.SendFoedselsmeldingCommand; +import no.nav.testnav.endringsmeldingservice.consumer.command.SendDoedsmeldingOldCommand; +import no.nav.testnav.endringsmeldingservice.consumer.command.SendFoedselsmeldingOldCommand; import no.nav.testnav.endringsmeldingservice.consumer.dto.DoedsmeldingDTO; import no.nav.testnav.endringsmeldingservice.consumer.request.FoedselsmeldingRequest; import no.nav.testnav.endringsmeldingservice.domain.Status; @@ -53,14 +53,14 @@ public TpsForvalterConsumer( public Mono sendFoedselsmelding(FoedselsmeldingDTO dto, Set miljoer) { return accessTokenService .exchange(serverProperties) - .flatMap(accessToken -> new SendFoedselsmeldingCommand(webClient, new FoedselsmeldingRequest(dto, miljoer), accessToken.getTokenValue()).call()) + .flatMap(accessToken -> new SendFoedselsmeldingOldCommand(webClient, new FoedselsmeldingRequest(dto, miljoer), accessToken.getTokenValue()).call()) .map(Status::new); } public Mono sendDoedsmelding(no.nav.testnav.libs.dto.endringsmelding.v1.DoedsmeldingDTO dto, Set miljoer) { return accessTokenService .exchange(serverProperties) - .flatMap(accessToken -> new SendDoedsmeldingCommand(webClient, new DoedsmeldingDTO(dto, miljoer), accessToken.getTokenValue()).call()) + .flatMap(accessToken -> new SendDoedsmeldingOldCommand(webClient, new DoedsmeldingDTO(dto, miljoer), accessToken.getTokenValue()).call()) .map(Status::new); } } diff --git a/apps/endringsmelding-service/src/main/java/no/nav/testnav/endringsmeldingservice/consumer/TpsMessagingConsumer.java b/apps/endringsmelding-service/src/main/java/no/nav/testnav/endringsmeldingservice/consumer/TpsMessagingConsumer.java index dbed99e80e6..05ac4a5ee1d 100644 --- a/apps/endringsmelding-service/src/main/java/no/nav/testnav/endringsmeldingservice/consumer/TpsMessagingConsumer.java +++ b/apps/endringsmelding-service/src/main/java/no/nav/testnav/endringsmeldingservice/consumer/TpsMessagingConsumer.java @@ -1,8 +1,23 @@ package no.nav.testnav.endringsmeldingservice.consumer; import com.fasterxml.jackson.databind.ObjectMapper; +import lombok.extern.slf4j.Slf4j; import no.nav.testnav.endringsmeldingservice.config.Consumers; +import no.nav.testnav.endringsmeldingservice.consumer.command.GetAdressehistorikkCommand; +import no.nav.testnav.endringsmeldingservice.consumer.command.GetEksistererPersonCommand; import no.nav.testnav.endringsmeldingservice.consumer.command.GetIdentEnvironmentsCommand; +import no.nav.testnav.endringsmeldingservice.consumer.command.GetPersondataCommand; +import no.nav.testnav.endringsmeldingservice.consumer.command.SendDoedsmeldingCommand; +import no.nav.testnav.endringsmeldingservice.consumer.command.SendFoedselsmeldingCommand; +import no.nav.testnav.endringsmeldingservice.consumer.command.SendKansellerDoedsmeldingCommand; +import no.nav.testnav.libs.data.tpsmessagingservice.v1.AdressehistorikkDTO; +import no.nav.testnav.libs.data.tpsmessagingservice.v1.AdressehistorikkRequest; +import no.nav.testnav.libs.data.tpsmessagingservice.v1.DoedsmeldingRequest; +import no.nav.testnav.libs.data.tpsmessagingservice.v1.DoedsmeldingResponse; +import no.nav.testnav.libs.data.tpsmessagingservice.v1.FoedselsmeldingRequest; +import no.nav.testnav.libs.data.tpsmessagingservice.v1.FoedselsmeldingResponse; +import no.nav.testnav.libs.data.tpsmessagingservice.v1.IdentMiljoeDTO; +import no.nav.testnav.libs.data.tpsmessagingservice.v1.PersonDTO; import no.nav.testnav.libs.data.tpsmessagingservice.v1.PersonMiljoeDTO; import no.nav.testnav.libs.reactivesecurity.exchange.TokenExchange; import no.nav.testnav.libs.securitycore.domain.ServerProperties; @@ -13,7 +28,12 @@ import org.springframework.web.reactive.function.client.ExchangeStrategies; import org.springframework.web.reactive.function.client.WebClient; import reactor.core.publisher.Flux; +import reactor.core.publisher.Mono; +import java.time.LocalDate; +import java.util.Set; + +@Slf4j @Component public class TpsMessagingConsumer { private final WebClient webClient; @@ -44,9 +64,71 @@ public TpsMessagingConsumer( .build(); } - public Flux hentMiljoer(String ident) { + public Flux hentMiljoer(String ident) { // Skal ryddes til slutt return accessTokenService .exchange(serverProperties) .flatMapMany(accessToken -> new GetIdentEnvironmentsCommand(webClient, ident, accessToken.getTokenValue()).call()); } + + public Flux getEksistererPerson(Set identer, Set miljoer) { + + return accessTokenService + .exchange(serverProperties) + .flatMapMany(accessToken -> new GetEksistererPersonCommand(webClient, identer, miljoer, accessToken.getTokenValue()).call()) + .doOnNext(resultat -> log.info("Get eksisterende resultat {}", resultat)); + } + + public Flux getPersondata(String ident, Set miljoer) { + + return accessTokenService + .exchange(serverProperties) + .flatMapMany(accessToken -> new GetPersondataCommand(webClient, ident, miljoer, accessToken.getTokenValue()).call()); + } + + public Flux getAdressehistorikk(String ident, LocalDate aksjonsdato, Set miljoer) { + + return getAdressehistorikk(AdressehistorikkRequest.builder() + .ident(ident) + .aksjonsdato(aksjonsdato) + .build(), + miljoer); + } + + public Flux getAdressehistorikk(AdressehistorikkRequest request, Set miljoer) { + + return accessTokenService + .exchange(serverProperties) + .flatMapMany(accessToken -> + new GetAdressehistorikkCommand(webClient, request, miljoer, accessToken.getTokenValue()).call()) + .doOnNext(response -> log.info("Adressehistorikk mottatt: {}", response)); + } + + public Mono sendKansellerDoedsmelding(PersonDTO person, Set miljoer) { + + return accessTokenService + .exchange(serverProperties) + .flatMap(accessToken -> + new SendKansellerDoedsmeldingCommand(webClient, person, miljoer, accessToken.getTokenValue()).call()) + .doOnNext(response -> log.info("Mottatt status for kanseller dødsmelding {}", response)); + } + + public Mono sendDoedsmelding(DoedsmeldingRequest request, Set miljoer) { + + return accessTokenService + .exchange(serverProperties) + .flatMap(accessToken -> + new SendDoedsmeldingCommand(webClient, request, miljoer, accessToken.getTokenValue()).call()) + .doOnNext(response -> log.info("Mottatt status for dødsmelding {}", response)); + } + + public Mono sendFoedselsmelding(FoedselsmeldingRequest request, Set miljoer) { + + log.info("Sender fødselsmelding til miljøer {} {}", miljoer, request); + + return accessTokenService + .exchange(serverProperties) + .flatMap(accessToken -> + new SendFoedselsmeldingCommand(webClient, request, miljoer, accessToken.getTokenValue()).call()) + .doOnNext(response -> log.info("Mottatt status for fødselsmelding {}", response)); + } } diff --git a/apps/endringsmelding-service/src/main/java/no/nav/testnav/endringsmeldingservice/consumer/command/GenererNavnServiceCommand.java b/apps/endringsmelding-service/src/main/java/no/nav/testnav/endringsmeldingservice/consumer/command/GenererNavnServiceCommand.java new file mode 100644 index 00000000000..6953946a4e8 --- /dev/null +++ b/apps/endringsmelding-service/src/main/java/no/nav/testnav/endringsmeldingservice/consumer/command/GenererNavnServiceCommand.java @@ -0,0 +1,38 @@ +package no.nav.testnav.endringsmeldingservice.consumer.command; + +import lombok.RequiredArgsConstructor; +import no.nav.testnav.libs.dto.generernavnservice.v1.NavnDTO; +import no.nav.testnav.libs.reactivecore.utils.WebClientFilter; +import org.springframework.http.HttpHeaders; +import org.springframework.http.MediaType; +import org.springframework.web.reactive.function.client.WebClient; +import reactor.core.publisher.Flux; +import reactor.util.retry.Retry; + +import java.time.Duration; +import java.util.concurrent.Callable; + +@RequiredArgsConstructor +public class GenererNavnServiceCommand implements Callable> { + + private static final String NAVN_URL = "/api/v1/navn"; + + private final WebClient webClient; + private final Integer antall; + private final String token; + + @Override + public Flux call() { + + return webClient + .get() + .uri(builder -> builder.path(NAVN_URL).queryParam("antall", antall).build()) + .header(HttpHeaders.CONTENT_TYPE, MediaType.APPLICATION_JSON_VALUE) + .header(HttpHeaders.AUTHORIZATION, "Bearer " + token) + .retrieve() + .bodyToFlux(NavnDTO.class) + .doOnError(WebClientFilter::logErrorMessage) + .retryWhen(Retry.backoff(3, Duration.ofSeconds(5)) + .filter(WebClientFilter::is5xxException)); + } +} \ No newline at end of file diff --git a/apps/endringsmelding-service/src/main/java/no/nav/testnav/endringsmeldingservice/consumer/command/GetAdressehistorikkCommand.java b/apps/endringsmelding-service/src/main/java/no/nav/testnav/endringsmeldingservice/consumer/command/GetAdressehistorikkCommand.java new file mode 100644 index 00000000000..8b4c950049a --- /dev/null +++ b/apps/endringsmelding-service/src/main/java/no/nav/testnav/endringsmeldingservice/consumer/command/GetAdressehistorikkCommand.java @@ -0,0 +1,44 @@ +package no.nav.testnav.endringsmeldingservice.consumer.command; + +import lombok.RequiredArgsConstructor; +import no.nav.testnav.libs.data.tpsmessagingservice.v1.AdressehistorikkDTO; +import no.nav.testnav.libs.data.tpsmessagingservice.v1.AdressehistorikkRequest; +import no.nav.testnav.libs.reactivecore.utils.WebClientFilter; +import org.springframework.http.HttpHeaders; +import org.springframework.web.reactive.function.BodyInserters; +import org.springframework.web.reactive.function.client.WebClient; +import reactor.core.publisher.Flux; +import reactor.util.retry.Retry; + +import java.time.Duration; +import java.util.Set; +import java.util.concurrent.Callable; + +@RequiredArgsConstructor +public class GetAdressehistorikkCommand implements Callable> { + + private static final String ADRESSE_HIST_URL = "/api/v1/personer/adressehistorikk"; + private static final String MILJOER = "miljoer"; + + private final WebClient webClient; + private final AdressehistorikkRequest request; + private final Set miljoer; + private final String token; + + @Override + public Flux call() { + + return webClient + .post() + .uri(builder -> builder.path(ADRESSE_HIST_URL) + .queryParam(MILJOER, miljoer) + .build()) + .header(HttpHeaders.AUTHORIZATION, "Bearer " + token) + .body(BodyInserters.fromValue(request)) + .retrieve() + .bodyToFlux(AdressehistorikkDTO.class) + .retryWhen(Retry.backoff(3, Duration.ofSeconds(5)) + .filter(WebClientFilter::is5xxException)) + .doOnError(WebClientFilter::logErrorMessage); + } +} diff --git a/apps/endringsmelding-service/src/main/java/no/nav/testnav/endringsmeldingservice/consumer/command/GetEksistererPersonCommand.java b/apps/endringsmelding-service/src/main/java/no/nav/testnav/endringsmeldingservice/consumer/command/GetEksistererPersonCommand.java new file mode 100644 index 00000000000..b569e68923e --- /dev/null +++ b/apps/endringsmelding-service/src/main/java/no/nav/testnav/endringsmeldingservice/consumer/command/GetEksistererPersonCommand.java @@ -0,0 +1,47 @@ +package no.nav.testnav.endringsmeldingservice.consumer.command; + +import lombok.RequiredArgsConstructor; +import no.nav.testnav.libs.data.tpsmessagingservice.v1.IdentMiljoeDTO; +import no.nav.testnav.libs.reactivecore.utils.WebClientFilter; +import org.springframework.http.HttpHeaders; +import org.springframework.web.reactive.function.client.WebClient; +import reactor.core.publisher.Flux; +import reactor.util.retry.Retry; + +import java.time.Duration; +import java.util.Optional; +import java.util.Set; +import java.util.concurrent.Callable; + +@RequiredArgsConstructor +public class GetEksistererPersonCommand implements Callable> { + + private static final String PERSON_DATA_URL = "/api/v1/identer"; + private static final String MILJOER = "miljoer"; + private static final String IDENTER = "identer"; + + private static final String INCLUDE_PROD = "includeProd"; + + private final WebClient webClient; + private final Set identer; + private final Set miljoer; + private final String token; + + @Override + public Flux call() { + + return webClient + .get() + .uri(builder -> builder.path(PERSON_DATA_URL) + .queryParam(IDENTER, identer) + .queryParamIfPresent(MILJOER, Optional.ofNullable(miljoer)) + .queryParam(INCLUDE_PROD, true) + .build()) + .header(HttpHeaders.AUTHORIZATION, "Bearer " + token) + .retrieve() + .bodyToFlux(IdentMiljoeDTO.class) + .retryWhen(Retry.backoff(3, Duration.ofSeconds(5)) + .filter(WebClientFilter::is5xxException)) + .doOnError(WebClientFilter::logErrorMessage); + } +} diff --git a/apps/endringsmelding-service/src/main/java/no/nav/testnav/endringsmeldingservice/consumer/command/GetPersondataCommand.java b/apps/endringsmelding-service/src/main/java/no/nav/testnav/endringsmeldingservice/consumer/command/GetPersondataCommand.java new file mode 100644 index 00000000000..63c7c8dd37c --- /dev/null +++ b/apps/endringsmelding-service/src/main/java/no/nav/testnav/endringsmeldingservice/consumer/command/GetPersondataCommand.java @@ -0,0 +1,41 @@ +package no.nav.testnav.endringsmeldingservice.consumer.command; + +import lombok.RequiredArgsConstructor; +import no.nav.testnav.libs.data.tpsmessagingservice.v1.PersonMiljoeDTO; +import no.nav.testnav.libs.reactivecore.utils.WebClientFilter; +import org.springframework.http.HttpHeaders; +import org.springframework.web.reactive.function.client.WebClient; +import reactor.core.publisher.Flux; +import reactor.util.retry.Retry; + +import java.time.Duration; +import java.util.Set; +import java.util.concurrent.Callable; + +@RequiredArgsConstructor +public class GetPersondataCommand implements Callable> { + + private static final String PERSON_DATA_URL = "/api/v1/personer/{ident}"; + private static final String MILJOER = "miljoer"; + + private final WebClient webClient; + private final String ident; + private final Set miljoer; + private final String token; + + @Override + public Flux call() { + + return webClient + .get() + .uri(builder -> builder.path(PERSON_DATA_URL) + .queryParam(MILJOER, miljoer) + .build(ident)) + .header(HttpHeaders.AUTHORIZATION, "Bearer " + token) + .retrieve() + .bodyToFlux(PersonMiljoeDTO.class) + .retryWhen(Retry.backoff(3, Duration.ofSeconds(5)) + .filter(WebClientFilter::is5xxException)) + .doOnError(WebClientFilter::logErrorMessage); + } +} diff --git a/apps/endringsmelding-service/src/main/java/no/nav/testnav/endringsmeldingservice/consumer/command/IdentpoolPostCommand.java b/apps/endringsmelding-service/src/main/java/no/nav/testnav/endringsmeldingservice/consumer/command/IdentpoolPostCommand.java new file mode 100644 index 00000000000..5e682ab1bfa --- /dev/null +++ b/apps/endringsmelding-service/src/main/java/no/nav/testnav/endringsmeldingservice/consumer/command/IdentpoolPostCommand.java @@ -0,0 +1,46 @@ +package no.nav.testnav.endringsmeldingservice.consumer.command; + +import lombok.RequiredArgsConstructor; +import lombok.extern.slf4j.Slf4j; +import no.nav.testnav.endringsmeldingservice.consumer.dto.HentIdenterRequest; +import no.nav.testnav.libs.reactivecore.utils.WebClientFilter; +import org.springframework.http.HttpHeaders; +import org.springframework.http.MediaType; +import org.springframework.web.reactive.function.BodyInserters; +import org.springframework.web.reactive.function.client.WebClient; +import reactor.core.publisher.Mono; +import reactor.util.retry.Retry; + +import java.time.Duration; +import java.util.Arrays; +import java.util.List; +import java.util.concurrent.Callable; + +@Slf4j +@RequiredArgsConstructor +public class IdentpoolPostCommand implements Callable>> { + + private static final String ACQUIRE_IDENTS_URL = "/api/v1/identifikator"; + + private final WebClient webClient; + private final HentIdenterRequest body; + private final String token; + + @Override + public Mono> call() { + return webClient + .post() + .uri(builder -> builder.path(ACQUIRE_IDENTS_URL).build()) + .body(BodyInserters.fromValue(body)) + .header(HttpHeaders.CONTENT_TYPE, MediaType.APPLICATION_JSON_VALUE) + .header(HttpHeaders.AUTHORIZATION, "Bearer " + token) + .retrieve() + .bodyToMono(String[].class) + .map(Arrays::asList) + .retryWhen(Retry.backoff(3, Duration.ofSeconds(5)) + .filter(WebClientFilter::is5xxException) + .onRetryExhaustedThrow((retryBackoffSpec, retrySignal) -> + new InternalError("Identpool: antall repeterende forsøk nådd"))) + .doOnError(WebClientFilter::logErrorMessage); + } +} diff --git a/apps/endringsmelding-service/src/main/java/no/nav/testnav/endringsmeldingservice/consumer/command/SendDoedsmeldingCommand.java b/apps/endringsmelding-service/src/main/java/no/nav/testnav/endringsmeldingservice/consumer/command/SendDoedsmeldingCommand.java index 34739353b95..9ef9c0bd681 100644 --- a/apps/endringsmelding-service/src/main/java/no/nav/testnav/endringsmeldingservice/consumer/command/SendDoedsmeldingCommand.java +++ b/apps/endringsmelding-service/src/main/java/no/nav/testnav/endringsmeldingservice/consumer/command/SendDoedsmeldingCommand.java @@ -1,47 +1,44 @@ package no.nav.testnav.endringsmeldingservice.consumer.command; import lombok.RequiredArgsConstructor; -import lombok.extern.slf4j.Slf4j; -import no.nav.testnav.endringsmeldingservice.consumer.dto.DoedsmeldingDTO; -import no.nav.testnav.endringsmeldingservice.consumer.response.EndringsmeldingResponse; +import no.nav.testnav.libs.data.tpsmessagingservice.v1.DoedsmeldingRequest; +import no.nav.testnav.libs.data.tpsmessagingservice.v1.DoedsmeldingResponse; import no.nav.testnav.libs.reactivecore.utils.WebClientFilter; import org.springframework.http.HttpHeaders; import org.springframework.web.reactive.function.BodyInserters; import org.springframework.web.reactive.function.client.WebClient; -import org.springframework.web.reactive.function.client.WebClientResponseException; import reactor.core.publisher.Mono; import reactor.util.retry.Retry; import java.time.Duration; +import java.util.Set; import java.util.concurrent.Callable; -@Slf4j @RequiredArgsConstructor -public class SendDoedsmeldingCommand implements Callable> { +public class SendDoedsmeldingCommand implements Callable> { + + private static final String DOEDSMELDING_URL = "/api/v1/personer/doedsmelding"; + private static final String MILJOER = "miljoer"; + private final WebClient webClient; - private final DoedsmeldingDTO dto; + private final DoedsmeldingRequest request; + private final Set miljoer; private final String token; @Override - public Mono call() { + public Mono call() { + return webClient .post() - .uri("/api/v1/tpsmelding/doedsmelding") + .uri(builder -> builder.path(DOEDSMELDING_URL) + .queryParam(MILJOER, miljoer) + .build()) .header(HttpHeaders.AUTHORIZATION, "Bearer " + token) - .body(BodyInserters.fromPublisher(Mono.just(dto), DoedsmeldingDTO.class)) + .body(BodyInserters.fromValue(request)) .retrieve() - .bodyToMono(EndringsmeldingResponse.class) + .bodyToMono(DoedsmeldingResponse.class) .retryWhen(Retry.backoff(3, Duration.ofSeconds(5)) .filter(WebClientFilter::is5xxException)) - .doOnError(error -> { - if (error instanceof WebClientResponseException) { - log.error( - "Feil ved innsendelse av dødsmelding. Feilmelding: {}.", - ((WebClientResponseException) error).getResponseBodyAsString() - ); - } else { - log.error("Feil ved innsendelse av dødsmelding.", error); - } - }); + .doOnError(WebClientFilter::logErrorMessage); } } diff --git a/apps/endringsmelding-service/src/main/java/no/nav/testnav/endringsmeldingservice/consumer/command/SendDoedsmeldingOldCommand.java b/apps/endringsmelding-service/src/main/java/no/nav/testnav/endringsmeldingservice/consumer/command/SendDoedsmeldingOldCommand.java new file mode 100644 index 00000000000..ef314c3f595 --- /dev/null +++ b/apps/endringsmelding-service/src/main/java/no/nav/testnav/endringsmeldingservice/consumer/command/SendDoedsmeldingOldCommand.java @@ -0,0 +1,47 @@ +package no.nav.testnav.endringsmeldingservice.consumer.command; + +import lombok.RequiredArgsConstructor; +import lombok.extern.slf4j.Slf4j; +import no.nav.testnav.endringsmeldingservice.consumer.dto.DoedsmeldingDTO; +import no.nav.testnav.endringsmeldingservice.consumer.response.EndringsmeldingResponse; +import no.nav.testnav.libs.reactivecore.utils.WebClientFilter; +import org.springframework.http.HttpHeaders; +import org.springframework.web.reactive.function.BodyInserters; +import org.springframework.web.reactive.function.client.WebClient; +import org.springframework.web.reactive.function.client.WebClientResponseException; +import reactor.core.publisher.Mono; +import reactor.util.retry.Retry; + +import java.time.Duration; +import java.util.concurrent.Callable; + +@Slf4j +@RequiredArgsConstructor +public class SendDoedsmeldingOldCommand implements Callable> { + private final WebClient webClient; + private final DoedsmeldingDTO dto; + private final String token; + + @Override + public Mono call() { + return webClient + .post() + .uri("/api/v1/tpsmelding/doedsmelding") + .header(HttpHeaders.AUTHORIZATION, "Bearer " + token) + .body(BodyInserters.fromPublisher(Mono.just(dto), DoedsmeldingDTO.class)) + .retrieve() + .bodyToMono(EndringsmeldingResponse.class) + .retryWhen(Retry.backoff(3, Duration.ofSeconds(5)) + .filter(WebClientFilter::is5xxException)) + .doOnError(error -> { + if (error instanceof WebClientResponseException) { + log.error( + "Feil ved innsendelse av dødsmelding. Feilmelding: {}.", + ((WebClientResponseException) error).getResponseBodyAsString() + ); + } else { + log.error("Feil ved innsendelse av dødsmelding.", error); + } + }); + } +} diff --git a/apps/endringsmelding-service/src/main/java/no/nav/testnav/endringsmeldingservice/consumer/command/SendFoedselsmeldingCommand.java b/apps/endringsmelding-service/src/main/java/no/nav/testnav/endringsmeldingservice/consumer/command/SendFoedselsmeldingCommand.java index 96a95f5a0c6..abb2d14229a 100644 --- a/apps/endringsmelding-service/src/main/java/no/nav/testnav/endringsmeldingservice/consumer/command/SendFoedselsmeldingCommand.java +++ b/apps/endringsmelding-service/src/main/java/no/nav/testnav/endringsmeldingservice/consumer/command/SendFoedselsmeldingCommand.java @@ -1,47 +1,44 @@ package no.nav.testnav.endringsmeldingservice.consumer.command; import lombok.RequiredArgsConstructor; -import lombok.extern.slf4j.Slf4j; -import no.nav.testnav.endringsmeldingservice.consumer.request.FoedselsmeldingRequest; -import no.nav.testnav.endringsmeldingservice.consumer.response.EndringsmeldingResponse; +import no.nav.testnav.libs.data.tpsmessagingservice.v1.FoedselsmeldingRequest; +import no.nav.testnav.libs.data.tpsmessagingservice.v1.FoedselsmeldingResponse; import no.nav.testnav.libs.reactivecore.utils.WebClientFilter; import org.springframework.http.HttpHeaders; import org.springframework.web.reactive.function.BodyInserters; import org.springframework.web.reactive.function.client.WebClient; -import org.springframework.web.reactive.function.client.WebClientResponseException; import reactor.core.publisher.Mono; import reactor.util.retry.Retry; import java.time.Duration; +import java.util.Set; import java.util.concurrent.Callable; -@Slf4j @RequiredArgsConstructor -public class SendFoedselsmeldingCommand implements Callable> { +public class SendFoedselsmeldingCommand implements Callable> { + + private static final String FOEDSELSMELDING_URL = "/api/v1/personer/foedselsmelding"; + private static final String MILJOER = "miljoer"; + private final WebClient webClient; private final FoedselsmeldingRequest request; + private final Set miljoer; private final String token; @Override - public Mono call() { + public Mono call() { + return webClient .post() - .uri("/api/v1/tpsmelding/foedselsmelding") + .uri(builder -> builder.path(FOEDSELSMELDING_URL) + .queryParam(MILJOER, miljoer) + .build()) .header(HttpHeaders.AUTHORIZATION, "Bearer " + token) - .body(BodyInserters.fromPublisher(Mono.just(request), FoedselsmeldingRequest.class)) + .body(BodyInserters.fromValue(request)) .retrieve() - .bodyToMono(EndringsmeldingResponse.class) + .bodyToMono(FoedselsmeldingResponse.class) .retryWhen(Retry.backoff(3, Duration.ofSeconds(5)) .filter(WebClientFilter::is5xxException)) - .doOnError(error -> { - if (error instanceof WebClientResponseException) { - log.error( - "Feil ved innsendelse av fødseslmelding. Feilmelding: {}.", - ((WebClientResponseException) error).getResponseBodyAsString() - ); - } else { - log.error("Feil ved innsendelse av fødseslmelding.", error); - } - }); + .doOnError(WebClientFilter::logErrorMessage); } } diff --git a/apps/endringsmelding-service/src/main/java/no/nav/testnav/endringsmeldingservice/consumer/command/SendFoedselsmeldingOldCommand.java b/apps/endringsmelding-service/src/main/java/no/nav/testnav/endringsmeldingservice/consumer/command/SendFoedselsmeldingOldCommand.java new file mode 100644 index 00000000000..3ca70f1e1c2 --- /dev/null +++ b/apps/endringsmelding-service/src/main/java/no/nav/testnav/endringsmeldingservice/consumer/command/SendFoedselsmeldingOldCommand.java @@ -0,0 +1,47 @@ +package no.nav.testnav.endringsmeldingservice.consumer.command; + +import lombok.RequiredArgsConstructor; +import lombok.extern.slf4j.Slf4j; +import no.nav.testnav.endringsmeldingservice.consumer.request.FoedselsmeldingRequest; +import no.nav.testnav.endringsmeldingservice.consumer.response.EndringsmeldingResponse; +import no.nav.testnav.libs.reactivecore.utils.WebClientFilter; +import org.springframework.http.HttpHeaders; +import org.springframework.web.reactive.function.BodyInserters; +import org.springframework.web.reactive.function.client.WebClient; +import org.springframework.web.reactive.function.client.WebClientResponseException; +import reactor.core.publisher.Mono; +import reactor.util.retry.Retry; + +import java.time.Duration; +import java.util.concurrent.Callable; + +@Slf4j +@RequiredArgsConstructor +public class SendFoedselsmeldingOldCommand implements Callable> { + private final WebClient webClient; + private final FoedselsmeldingRequest request; + private final String token; + + @Override + public Mono call() { + return webClient + .post() + .uri("/api/v1/tpsmelding/foedselsmelding") + .header(HttpHeaders.AUTHORIZATION, "Bearer " + token) + .body(BodyInserters.fromPublisher(Mono.just(request), FoedselsmeldingRequest.class)) + .retrieve() + .bodyToMono(EndringsmeldingResponse.class) + .retryWhen(Retry.backoff(3, Duration.ofSeconds(5)) + .filter(WebClientFilter::is5xxException)) + .doOnError(error -> { + if (error instanceof WebClientResponseException) { + log.error( + "Feil ved innsendelse av fødseslmelding. Feilmelding: {}.", + ((WebClientResponseException) error).getResponseBodyAsString() + ); + } else { + log.error("Feil ved innsendelse av fødseslmelding.", error); + } + }); + } +} diff --git a/apps/endringsmelding-service/src/main/java/no/nav/testnav/endringsmeldingservice/consumer/command/SendKansellerDoedsmeldingCommand.java b/apps/endringsmelding-service/src/main/java/no/nav/testnav/endringsmeldingservice/consumer/command/SendKansellerDoedsmeldingCommand.java new file mode 100644 index 00000000000..7e446f23ced --- /dev/null +++ b/apps/endringsmelding-service/src/main/java/no/nav/testnav/endringsmeldingservice/consumer/command/SendKansellerDoedsmeldingCommand.java @@ -0,0 +1,45 @@ +package no.nav.testnav.endringsmeldingservice.consumer.command; + +import lombok.RequiredArgsConstructor; +import no.nav.testnav.libs.data.tpsmessagingservice.v1.DoedsmeldingResponse; +import no.nav.testnav.libs.data.tpsmessagingservice.v1.PersonDTO; +import no.nav.testnav.libs.reactivecore.utils.WebClientFilter; +import org.springframework.http.HttpHeaders; +import org.springframework.http.HttpMethod; +import org.springframework.web.reactive.function.BodyInserters; +import org.springframework.web.reactive.function.client.WebClient; +import reactor.core.publisher.Mono; +import reactor.util.retry.Retry; + +import java.time.Duration; +import java.util.Set; +import java.util.concurrent.Callable; + +@RequiredArgsConstructor +public class SendKansellerDoedsmeldingCommand implements Callable> { + + private static final String DOEDSMELDING_URL = "/api/v1/personer/doedsmelding"; + private static final String MILJOER = "miljoer"; + + private final WebClient webClient; + private final PersonDTO person; + private final Set miljoer; + private final String token; + + @Override + public Mono call() { + + return webClient + .method(HttpMethod.DELETE) + .uri(builder -> builder.path(DOEDSMELDING_URL) + .queryParam(MILJOER, miljoer) + .build()) + .header(HttpHeaders.AUTHORIZATION, "Bearer " + token) + .body(BodyInserters.fromValue(person)) + .retrieve() + .bodyToMono(DoedsmeldingResponse.class) + .retryWhen(Retry.backoff(3, Duration.ofSeconds(5)) + .filter(WebClientFilter::is5xxException)) + .doOnError(WebClientFilter::logErrorMessage); + } +} diff --git a/apps/endringsmelding-service/src/main/java/no/nav/testnav/endringsmeldingservice/consumer/command/VegadresseServiceCommand.java b/apps/endringsmelding-service/src/main/java/no/nav/testnav/endringsmeldingservice/consumer/command/VegadresseServiceCommand.java new file mode 100644 index 00000000000..3702d40ba65 --- /dev/null +++ b/apps/endringsmelding-service/src/main/java/no/nav/testnav/endringsmeldingservice/consumer/command/VegadresseServiceCommand.java @@ -0,0 +1,56 @@ +package no.nav.testnav.endringsmeldingservice.consumer.command; + +import lombok.RequiredArgsConstructor; +import no.nav.testnav.libs.dto.adresseservice.v1.VegadresseDTO; +import no.nav.testnav.libs.reactivecore.utils.WebClientFilter; +import org.springframework.http.HttpHeaders; +import org.springframework.http.MediaType; +import org.springframework.web.reactive.function.client.WebClient; +import org.springframework.web.reactive.function.client.WebClientResponseException; +import reactor.core.Exceptions; +import reactor.core.publisher.Flux; +import reactor.core.publisher.Mono; +import reactor.util.retry.Retry; + +import java.time.Duration; +import java.util.concurrent.Callable; + +@RequiredArgsConstructor +public class VegadresseServiceCommand implements Callable> { + + private static final String ADRESSER_VEG_URL = "/api/v1/adresser/veg"; + + private final WebClient webClient; + private final String token; + + @Override + public Flux call() { + + return webClient + .get() + .uri(builder -> builder.path(ADRESSER_VEG_URL).build()) + .header("antall", "1") + .header(HttpHeaders.CONTENT_TYPE, MediaType.APPLICATION_JSON_VALUE) + .header(HttpHeaders.AUTHORIZATION, "Bearer " + token) + .retrieve() + .bodyToFlux(VegadresseDTO.class) + .retryWhen(Retry.backoff(3, Duration.ofSeconds(5)) + .filter(WebClientFilter::is5xxException)) + .onErrorResume(throwable -> throwable instanceof WebClientResponseException.NotFound || + throwable instanceof WebClientResponseException.BadRequest || + Exceptions.isRetryExhausted(throwable), + throwable -> Mono.just(defaultAdresse())); + } + + public static VegadresseDTO defaultAdresse() { + + return VegadresseDTO.builder() + .matrikkelId("285693617") + .adressenavn("FYRSTIKKALLÉEN") + .postnummer("0661") + .husnummer(2) + .kommunenummer("0301") + .poststed("Oslo") + .build(); + } +} diff --git a/apps/endringsmelding-service/src/main/java/no/nav/testnav/endringsmeldingservice/consumer/dto/HentIdenterRequest.java b/apps/endringsmelding-service/src/main/java/no/nav/testnav/endringsmeldingservice/consumer/dto/HentIdenterRequest.java new file mode 100644 index 00000000000..0e0f5df9eea --- /dev/null +++ b/apps/endringsmelding-service/src/main/java/no/nav/testnav/endringsmeldingservice/consumer/dto/HentIdenterRequest.java @@ -0,0 +1,37 @@ +package no.nav.testnav.endringsmeldingservice.consumer.dto; + +import lombok.AllArgsConstructor; +import lombok.Builder; +import lombok.Data; +import lombok.NoArgsConstructor; + +import jakarta.validation.constraints.NotNull; +import java.time.LocalDate; + +@Data +@Builder +@AllArgsConstructor +@NoArgsConstructor +public class HentIdenterRequest { + + private Identtype identtype; + private LocalDate foedtEtter; + private LocalDate foedtFoer; + private Kjoenn kjoenn; + + @NotNull + private int antall; + private String rekvirertAv; + private Boolean syntetisk; + + public enum Identtype { + FNR, + DNR, + BOST + } + + public enum Kjoenn { + KVINNE, + MANN + } +} diff --git a/apps/endringsmelding-service/src/main/java/no/nav/testnav/endringsmeldingservice/controller/SkdEndringsmeldingerController.java b/apps/endringsmelding-service/src/main/java/no/nav/testnav/endringsmeldingservice/controller/SkdEndringsmeldingerController.java new file mode 100644 index 00000000000..a07b93a17d4 --- /dev/null +++ b/apps/endringsmelding-service/src/main/java/no/nav/testnav/endringsmeldingservice/controller/SkdEndringsmeldingerController.java @@ -0,0 +1,52 @@ +package no.nav.testnav.endringsmeldingservice.controller; + +import lombok.RequiredArgsConstructor; +import no.nav.testnav.endringsmeldingservice.service.DoedsmeldingService; +import no.nav.testnav.endringsmeldingservice.service.FoedselsmeldingService; +import no.nav.testnav.libs.dto.endringsmelding.v2.DoedsmeldingDTO; +import no.nav.testnav.libs.dto.endringsmelding.v2.DoedsmeldingResponseDTO; +import no.nav.testnav.libs.dto.endringsmelding.v2.FoedselsmeldingDTO; +import no.nav.testnav.libs.dto.endringsmelding.v2.FoedselsmeldingResponseDTO; +import no.nav.testnav.libs.dto.endringsmelding.v2.KansellerDoedsmeldingDTO; +import org.springframework.web.bind.annotation.DeleteMapping; +import org.springframework.web.bind.annotation.PostMapping; +import org.springframework.web.bind.annotation.RequestBody; +import org.springframework.web.bind.annotation.RequestHeader; +import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.web.bind.annotation.RestController; +import reactor.core.publisher.Mono; + +import java.util.Set; + +@RestController +@RequestMapping("/api/v2/endringsmelding") +@RequiredArgsConstructor +public class SkdEndringsmeldingerController { + + private final FoedselsmeldingService foedselsmeldingService; + private final DoedsmeldingService doedsmeldingService; + + @PostMapping("/foedselsmelding") + public Mono sendFoedselsmelding( + @RequestHeader Set miljoer, + @RequestBody FoedselsmeldingDTO dto) { + + return foedselsmeldingService.sendFoedselsmelding(dto, miljoer); + } + + @PostMapping("/doedsmelding") + public Mono sendDoedsmelding( + @RequestHeader Set miljoer, + @RequestBody DoedsmeldingDTO doedsmelding) { + + return doedsmeldingService.sendDoedsmelding(doedsmelding, miljoer); + } + + @DeleteMapping("/doedsmelding") + public Mono kansellerDoedsmelding( + @RequestHeader Set miljoer, + @RequestBody KansellerDoedsmeldingDTO kansellerDoedsmelding) { + + return doedsmeldingService.sendKansellerDoedsmelding(kansellerDoedsmelding.getIdent(), miljoer); + } +} diff --git a/apps/endringsmelding-service/src/main/java/no/nav/testnav/endringsmeldingservice/mapper/AdressehistorikkMapper.java b/apps/endringsmelding-service/src/main/java/no/nav/testnav/endringsmeldingservice/mapper/AdressehistorikkMapper.java new file mode 100644 index 00000000000..7d7c8ebb28f --- /dev/null +++ b/apps/endringsmelding-service/src/main/java/no/nav/testnav/endringsmeldingservice/mapper/AdressehistorikkMapper.java @@ -0,0 +1,115 @@ +package no.nav.testnav.endringsmeldingservice.mapper; + +import lombok.experimental.UtilityClass; +import no.nav.testnav.libs.data.tpsmessagingservice.v1.AdresseDTO; +import no.nav.testnav.libs.data.tpsmessagingservice.v1.AdressehistorikkDTO; +import no.nav.testnav.libs.data.tpsmessagingservice.v1.AdressehistorikkRequest; +import no.nav.testnav.libs.data.tpsmessagingservice.v1.GateadresseDTO; +import no.nav.testnav.libs.data.tpsmessagingservice.v1.MatrikkeladresseDTO; +import no.nav.testnav.libs.data.tpsmessagingservice.v1.PersonDTO; +import no.nav.testnav.libs.data.tpsmessagingservice.v1.PersonMiljoeDTO; +import no.nav.testnav.libs.data.tpsmessagingservice.v1.PostadresseDTO; + +import java.time.LocalDate; + +@UtilityClass +public class AdressehistorikkMapper { + + public static PersonDTO mapHistorikk(AdressehistorikkDTO.PersonData person) { + + return PersonDTO.builder() + .ident(person.getIdent()) + .identtype(person.getIdentType()) + .boadresse(mapBoadresse(person)) + .postadresse(person.getPostAdresse().stream() + .map(postadresse -> PostadresseDTO.builder() + .postLinje1(postadresse.getAdresse1()) + .postLinje2(postadresse.getAdresse2()) + .postLinje3(postadresse.getAdresse3()) + .postLand(postadresse.getLand()) + .build() + ) + .findFirst() + .orElse(null) + ) + .build(); + } + + public static AdresseDTO mapBoadresse(AdressehistorikkDTO.PersonData person) { + + return (AdresseDTO) person.getBostedsAdresse().stream() + .map(boadresse -> { + + if ("OFFA".equals(boadresse.getAdresseType())) { + return GateadresseDTO.builder() + .gatekode(boadresse.getOffAdresse().getGatekode()) + .adresse(boadresse.getOffAdresse().getGateNavn()) + .husnummer(boadresse.getOffAdresse().getHusnr()) + .husbokstav(boadresse.getOffAdresse().getBokstav()) + .bolignr(boadresse.getBolignr()) + .flyttedato(boadresse.getDatoFom().atStartOfDay()) + .postnr(boadresse.getPostnr()) + .kommunenr(boadresse.getKommunenr()) + .tilleggsadresse(boadresse.getTilleggsAdresseSKD()) + .build(); + } else { + + return MatrikkeladresseDTO.builder() + .mellomnavn(boadresse.getMatrAdresse().getMellomAdresse()) + .gardsnr(boadresse.getMatrAdresse().getGardsnr()) + .bruksnr(boadresse.getMatrAdresse().getBruksnr()) + .festenr(boadresse.getMatrAdresse().getFestenr()) + .undernr(boadresse.getMatrAdresse().getUndernr()) + .bolignr(boadresse.getBolignr()) + .flyttedato(boadresse.getDatoFom().atStartOfDay()) + .postnr(boadresse.getPostnr()) + .kommunenr(boadresse.getKommunenr()) + .tilleggsadresse(boadresse.getTilleggsAdresseSKD()); + } + }) + .findFirst() + .orElse(null); + } + + public static PostadresseDTO mapPostBoadresse(AdressehistorikkDTO.PersonData person) { + + return (PostadresseDTO) person.getBostedsAdresse().stream() + .map(boadresse -> { + + if ("OFFA".equals(boadresse.getAdresseType())) { + return PostadresseDTO.builder() + .postLinje1("%s %s%s".formatted(boadresse.getOffAdresse().getGateNavn(), + boadresse.getOffAdresse().getHusnr(), + boadresse.getOffAdresse().getBokstav())) + .postLinje2("%s %s".formatted(boadresse.getPostnr(), boadresse.getPoststed())) + .postLand("NOR") + .build(); + } else { + + return PostadresseDTO.builder() + .postLinje1("Gardsnummer: " + boadresse.getMatrAdresse().getGardsnr()) + .postLinje2("Bruksnummer: " + boadresse.getMatrAdresse().getBruksnr()) + .postLinje3("Kommunenummer: " + boadresse.getKommunenr()) + .postLand("NOR"); + } + }) + .findFirst() + .orElse(null); + } + + public static AdressehistorikkRequest buildAdresseRequest(PersonMiljoeDTO person) { + + return AdressehistorikkRequest.builder() + .ident(person.getIdent()) + .aksjonsdato(person.getPerson().getDoedsdato().toLocalDate().minusDays(1)) + .build(); + } + + public static AdressehistorikkRequest buildAdresseRequest(String ident, LocalDate aksjonsdato) { + + return AdressehistorikkRequest.builder() + .ident(ident) + .aksjonsdato(aksjonsdato) + .build(); + } +} diff --git a/apps/endringsmelding-service/src/main/java/no/nav/testnav/endringsmeldingservice/mapper/FoedselsmeldingRequestMapper.java b/apps/endringsmelding-service/src/main/java/no/nav/testnav/endringsmeldingservice/mapper/FoedselsmeldingRequestMapper.java new file mode 100644 index 00000000000..175dbbd4ea8 --- /dev/null +++ b/apps/endringsmelding-service/src/main/java/no/nav/testnav/endringsmeldingservice/mapper/FoedselsmeldingRequestMapper.java @@ -0,0 +1,112 @@ +package no.nav.testnav.endringsmeldingservice.mapper; + +import lombok.experimental.UtilityClass; +import no.nav.testnav.endringsmeldingservice.utility.KjoennFraIdentUtility; +import no.nav.testnav.libs.data.tpsmessagingservice.v1.AdresseDTO; +import no.nav.testnav.libs.data.tpsmessagingservice.v1.AdressehistorikkDTO; +import no.nav.testnav.libs.data.tpsmessagingservice.v1.FoedselsmeldingRequest; +import no.nav.testnav.libs.data.tpsmessagingservice.v1.GateadresseDTO; +import no.nav.testnav.libs.data.tpsmessagingservice.v1.PersonDTO; +import no.nav.testnav.libs.data.tpsmessagingservice.v1.PostadresseDTO; +import no.nav.testnav.libs.dto.adresseservice.v1.VegadresseDTO; +import no.nav.testnav.libs.dto.endringsmelding.v2.FoedselsmeldingDTO; +import no.nav.testnav.libs.dto.generernavnservice.v1.NavnDTO; +import reactor.util.function.Tuple5; + +import java.util.List; +import java.util.Objects; + +import static java.util.Objects.isNull; +import static java.util.Objects.nonNull; +import static no.nav.testnav.endringsmeldingservice.mapper.AdressehistorikkMapper.mapBoadresse; +import static no.nav.testnav.endringsmeldingservice.mapper.AdressehistorikkMapper.mapPostBoadresse; +import static org.apache.commons.lang3.StringUtils.isNotBlank; + +@UtilityClass +public class FoedselsmeldingRequestMapper { + + public static FoedselsmeldingRequest map(FoedselsmeldingDTO foedselsmelding, Tuple5, List, List, + List, List> opplysninger) { + + return FoedselsmeldingRequest.builder() + .barn(PersonDTO.builder() + .ident(opplysninger.getT1().getFirst()) + .identtype(foedselsmelding.getIdenttype().name()) + .fornavn(opplysninger.getT2().getFirst().getAdjektiv()) + .mellomnavn(opplysninger.getT2().getFirst().getAdverb()) + .etternavn(opplysninger.getT2().getFirst().getSubstantiv()) + .boadresse(mapAdresse(foedselsmelding, opplysninger.getT3(), opplysninger.getT4(), opplysninger.getT5())) + .postadresse(mapPostadresse(foedselsmelding, opplysninger.getT3(), opplysninger.getT4(), opplysninger.getT5())) + .kjonn(KjoennFraIdentUtility.get(opplysninger.getT1().getFirst())) + .build()) + .mor(PersonDTO.builder() + .ident(foedselsmelding.getIdentMor()) + .build()) + .far(isNotBlank(foedselsmelding.getIdentFar()) ? + PersonDTO.builder() + .ident(foedselsmelding.getIdentFar()) + .build() : null) + .build(); + } + + private static PostadresseDTO mapPostadresse(FoedselsmeldingDTO foedselsmelding, List vegadresse, + List morsadresser, List farsadresser) { + + if (isNull(foedselsmelding.getAdresseFra())) { + return mapPostadresse(vegadresse.getFirst()); + } + + return switch (foedselsmelding.getAdresseFra()) { + + case LAG_NY_ADRESSE -> mapPostadresse(vegadresse.getFirst()); + case ARV_FRA_MORS -> mapPostBoadresse(morsadresser.getFirst().getPersondata()); + case ARV_FRA_FARS -> nonNull(farsadresser) && !farsadresser.isEmpty() && + nonNull(farsadresser.getFirst().getPersondata()) ? + mapPostBoadresse(farsadresser.getFirst().getPersondata()) : + mapPostadresse(vegadresse.getFirst()); + }; + } + + private static AdresseDTO mapAdresse(FoedselsmeldingDTO foedselsmelding, List vegadresse, + List morsadresser, List farsadresser) { + + if (isNull(foedselsmelding.getAdresseFra())) { + return mapAdresse(vegadresse.getFirst()); + } + + return switch (foedselsmelding.getAdresseFra()) { + + case LAG_NY_ADRESSE -> mapAdresse(vegadresse.getFirst()); + case ARV_FRA_MORS -> mapBoadresse(morsadresser.getFirst().getPersondata()); + case ARV_FRA_FARS -> nonNull(farsadresser) && !farsadresser.isEmpty() && + nonNull(farsadresser.getFirst().getPersondata()) ? + mapBoadresse(farsadresser.getFirst().getPersondata()) : + mapAdresse(vegadresse.getFirst()); + }; + } + + private static AdresseDTO mapAdresse(VegadresseDTO vegadresse) { + + return GateadresseDTO.builder() + .adresse(vegadresse.getAdressenavn()) + .gatekode(vegadresse.getAdressekode()) + .husnummer(vegadresse.getHusnummer().toString()) + .husbokstav(vegadresse.getHusbokstav()) + .postnr(vegadresse.getPostnummer()) + .poststed(vegadresse.getPoststed()) + .kommunenr(vegadresse.getKommunenummer()) + .kommuneNavn(vegadresse.getKommunenavn()) + .tilleggsadresse(vegadresse.getTilleggsnavn()) + .build(); + } + + private static PostadresseDTO mapPostadresse(VegadresseDTO vegadresse) { + + return PostadresseDTO.builder() + .postLinje1("%s %s%s".formatted(vegadresse.getAdressenavn(), vegadresse.getHusnummer().toString(), + Objects.toString(vegadresse.getHusbokstav(), ""))) + .postLinje2("%s %s".formatted(vegadresse.getPostnummer(), vegadresse.getPoststed())) + .postLand("NOR") + .build(); + } +} diff --git a/apps/endringsmelding-service/src/main/java/no/nav/testnav/endringsmeldingservice/mapper/IdentpoolRequestMapper.java b/apps/endringsmelding-service/src/main/java/no/nav/testnav/endringsmeldingservice/mapper/IdentpoolRequestMapper.java new file mode 100644 index 00000000000..f5f049a7dbb --- /dev/null +++ b/apps/endringsmelding-service/src/main/java/no/nav/testnav/endringsmeldingservice/mapper/IdentpoolRequestMapper.java @@ -0,0 +1,44 @@ +package no.nav.testnav.endringsmeldingservice.mapper; + +import lombok.experimental.UtilityClass; +import no.nav.testnav.endringsmeldingservice.consumer.dto.HentIdenterRequest; +import no.nav.testnav.endringsmeldingservice.consumer.dto.HentIdenterRequest.Identtype; +import no.nav.testnav.libs.dto.endringsmelding.v2.FoedselsmeldingDTO; +import no.nav.testnav.libs.dto.endringsmelding.v2.Kjoenn; + +import java.security.SecureRandom; +import java.util.Random; + +import static java.util.Objects.isNull; +import static no.nav.testnav.endringsmeldingservice.consumer.dto.HentIdenterRequest.Kjoenn.KVINNE; +import static no.nav.testnav.endringsmeldingservice.consumer.dto.HentIdenterRequest.Kjoenn.MANN; + +@UtilityClass +public class IdentpoolRequestMapper { + + private static final Random random = new SecureRandom(); + + public HentIdenterRequest convert(FoedselsmeldingDTO fodselsmelding) { + + return HentIdenterRequest.builder() + .identtype(Identtype.valueOf(fodselsmelding.getIdenttype().name())) + .foedtFoer(fodselsmelding.getFoedselsdato()) + .foedtEtter(fodselsmelding.getFoedselsdato()) + .kjoenn(convertKjoenn(fodselsmelding.getKjoenn())) + .rekvirertAv("TEMS") // testnav-endringsmelding-service + .antall(1) + .build(); + } + private HentIdenterRequest.Kjoenn convertKjoenn(Kjoenn kjoenn) { + + if (isNull(kjoenn)) { + return random.nextBoolean() ? MANN : KVINNE; + } + + return switch (kjoenn) { + case GUTT -> MANN; + case JENTE -> KVINNE; + case UKJENT -> random.nextBoolean() ? MANN : KVINNE; + }; + } +} diff --git a/apps/endringsmelding-service/src/main/java/no/nav/testnav/endringsmeldingservice/service/DoedsmeldingService.java b/apps/endringsmelding-service/src/main/java/no/nav/testnav/endringsmeldingservice/service/DoedsmeldingService.java new file mode 100644 index 00000000000..85c1ec1ae02 --- /dev/null +++ b/apps/endringsmelding-service/src/main/java/no/nav/testnav/endringsmeldingservice/service/DoedsmeldingService.java @@ -0,0 +1,165 @@ +package no.nav.testnav.endringsmeldingservice.service; + +import lombok.RequiredArgsConstructor; +import no.nav.testnav.endringsmeldingservice.consumer.TpsMessagingConsumer; +import no.nav.testnav.endringsmeldingservice.mapper.AdressehistorikkMapper; +import no.nav.testnav.libs.data.tpsmessagingservice.v1.AdressehistorikkDTO; +import no.nav.testnav.libs.data.tpsmessagingservice.v1.DoedsmeldingRequest; +import no.nav.testnav.libs.data.tpsmessagingservice.v1.DoedsmeldingResponse; +import no.nav.testnav.libs.data.tpsmessagingservice.v1.IdentMiljoeDTO; +import no.nav.testnav.libs.data.tpsmessagingservice.v1.PersonMiljoeDTO; +import no.nav.testnav.libs.dto.endringsmelding.v2.DoedsmeldingDTO; +import no.nav.testnav.libs.dto.endringsmelding.v2.DoedsmeldingResponseDTO; +import org.springframework.http.HttpStatus; +import org.springframework.stereotype.Service; +import org.springframework.web.server.ResponseStatusException; +import reactor.core.publisher.Mono; + +import java.util.List; +import java.util.Set; +import java.util.stream.Collectors; + +import static java.util.Objects.isNull; +import static no.nav.testnav.endringsmeldingservice.mapper.AdressehistorikkMapper.buildAdresseRequest; +import static org.apache.commons.lang3.StringUtils.isBlank; +import static org.apache.commons.lang3.StringUtils.isNotBlank; + +@Service +@RequiredArgsConstructor +public class DoedsmeldingService { + + private final TpsMessagingConsumer tpsMessagingConsumer; + + public Mono sendDoedsmelding(DoedsmeldingDTO doedsmelding, Set miljoer) { + + if (isNotBlank(validate(doedsmelding))) { + + return Mono.just(DoedsmeldingResponseDTO.builder() + .error(validate(doedsmelding)) + .build()); + } + + return tpsMessagingConsumer.getEksistererPerson(Set.of(doedsmelding.getIdent()), miljoer) + .collectList() + .flatMap(resultater -> { + + if (resultater.stream() + .anyMatch(resultat -> resultat.getMiljoer().contains("p") || + !resultat.getMiljoer().containsAll(miljoer))) { + + return getDoedsmeldingResponseDTO(miljoer, resultater); + + } else { + + return tpsMessagingConsumer.getPersondata(doedsmelding.getIdent(), miljoer) + .filter(PersonMiljoeDTO::isOk) + .flatMap(persondata -> { + + if (persondata.getPerson().isDoed()) { + return tpsMessagingConsumer.getAdressehistorikk(buildAdresseRequest(persondata), + Set.of(persondata.getMiljoe())) + .filter(AdressehistorikkDTO::isOk) + .map(AdressehistorikkDTO::getPersondata) + .map(AdressehistorikkMapper::mapHistorikk) + .flatMap(person -> + tpsMessagingConsumer.sendKansellerDoedsmelding(person, Set.of(persondata.getMiljoe()))) + .flatMap(response -> tpsMessagingConsumer.sendDoedsmelding(DoedsmeldingRequest.builder() + .ident(doedsmelding.getIdent()) + .doedsdato(doedsmelding.getDoedsdato()) + .build(), Set.of(persondata.getMiljoe()))); + + } else { + return tpsMessagingConsumer.sendDoedsmelding(DoedsmeldingRequest.builder() + .ident(doedsmelding.getIdent()) + .doedsdato(doedsmelding.getDoedsdato()) + .build(), Set.of(persondata.getMiljoe())); + + } + }) + .map(DoedsmeldingResponse::getMiljoStatus) + .reduce((firstMap, secondMap) -> { + firstMap.putAll(secondMap); + return firstMap; + }) + .map(status -> DoedsmeldingResponseDTO.builder() + .ident(doedsmelding.getIdent()) + .miljoStatus(status) + .build()); + } + }); + } + + private static Mono getDoedsmeldingResponseDTO(Set miljoer, List resultater) { + + return resultater.stream() + .filter(resultat -> resultat.getMiljoer().contains("p") || + !resultat.getMiljoer().containsAll(miljoer)) + .map(resultat -> + Mono.just(DoedsmeldingResponseDTO.builder() + .ident(resultat.getIdent()) + .miljoStatus(resultat.getMiljoer().stream() + .sorted() + .collect(Collectors.toMap(miljoe -> miljoe, + miljoe -> "finnes i %smiljø".formatted("p".equals(miljoe) ? "produksjons" : "")))) + .error("FEIL: ident %s finnes ikke i alle forspurte miljøer/og eller i prod(p) %s".formatted( + resultat.getIdent(), miljoer)) + .build())) + .findFirst() + .orElseThrow(() -> new ResponseStatusException(HttpStatus.INTERNAL_SERVER_ERROR, "Feilet å dekode identstatus")); + } + + public Mono sendKansellerDoedsmelding(String ident, Set miljoer) { + + if (isBlank(ident)) { + + return Mono.just(DoedsmeldingResponseDTO.builder() + .error("FEIL: ident mangler") + .build()); + } + + return tpsMessagingConsumer.getEksistererPerson(Set.of(ident), miljoer) + .collectList() + .flatMap(resultater -> { + + if (resultater.stream() + .anyMatch(resultat -> resultat.getMiljoer().contains("p") || + !resultat.getMiljoer().containsAll(miljoer))) { + + return getDoedsmeldingResponseDTO(miljoer, resultater); + + } else { + + return tpsMessagingConsumer.getPersondata(ident, miljoer) + .filter(PersonMiljoeDTO::isOk) + .filter(persondata -> persondata.getPerson().isDoed()) + .collectList() + .filter(persondata -> !persondata.isEmpty()) + .flatMap(persondata -> tpsMessagingConsumer.getAdressehistorikk(buildAdresseRequest(persondata.getFirst()), + persondata.stream().map(PersonMiljoeDTO::getMiljoe).collect(Collectors.toSet())) + .filter(AdressehistorikkDTO::isOk) + .map(AdressehistorikkDTO::getPersondata) + .map(AdressehistorikkMapper::mapHistorikk) + .collectList() + .flatMap(personer -> + tpsMessagingConsumer.sendKansellerDoedsmelding(personer.getFirst(), + persondata.stream().map(PersonMiljoeDTO::getMiljoe).collect(Collectors.toSet())))) + .map(response -> DoedsmeldingResponseDTO.builder() + .ident(ident) + .miljoStatus(response.getMiljoStatus()) + .build()); + } + }); + } + + private static String validate(DoedsmeldingDTO doedsmelding) { + + if (isBlank(doedsmelding.getIdent())) { + return "FEIL: ident mangler"; + + } else if (isNull(doedsmelding.getDoedsdato())) { + return "FEIL: dødsdato mangler"; + + } + return null; + } +} diff --git a/apps/endringsmelding-service/src/main/java/no/nav/testnav/endringsmeldingservice/service/FoedselsmeldingService.java b/apps/endringsmelding-service/src/main/java/no/nav/testnav/endringsmeldingservice/service/FoedselsmeldingService.java new file mode 100644 index 00000000000..4d937a0048c --- /dev/null +++ b/apps/endringsmelding-service/src/main/java/no/nav/testnav/endringsmeldingservice/service/FoedselsmeldingService.java @@ -0,0 +1,113 @@ +package no.nav.testnav.endringsmeldingservice.service; + +import lombok.RequiredArgsConstructor; +import lombok.extern.slf4j.Slf4j; +import no.nav.testnav.endringsmeldingservice.consumer.AdresseServiceConsumer; +import no.nav.testnav.endringsmeldingservice.consumer.GenererNavnServiceConsumer; +import no.nav.testnav.endringsmeldingservice.consumer.IdentPoolConsumer; +import no.nav.testnav.endringsmeldingservice.consumer.TpsMessagingConsumer; +import no.nav.testnav.endringsmeldingservice.mapper.FoedselsmeldingRequestMapper; +import no.nav.testnav.endringsmeldingservice.mapper.IdentpoolRequestMapper; +import no.nav.testnav.libs.data.tpsmessagingservice.v1.AdressehistorikkDTO; +import no.nav.testnav.libs.dto.endringsmelding.v2.FoedselsmeldingDTO; +import no.nav.testnav.libs.dto.endringsmelding.v2.FoedselsmeldingResponseDTO; +import org.springframework.http.HttpStatus; +import org.springframework.stereotype.Service; +import org.springframework.web.server.ResponseStatusException; +import reactor.core.publisher.Mono; + +import java.util.Collection; +import java.util.Collections; +import java.util.List; +import java.util.Set; +import java.util.stream.Collectors; +import java.util.stream.Stream; + +import static java.util.Objects.isNull; +import static org.apache.commons.lang3.StringUtils.isBlank; +import static org.apache.commons.lang3.StringUtils.isNotBlank; + +@Slf4j +@Service +@RequiredArgsConstructor +public class FoedselsmeldingService { + + private final IdentPoolConsumer identPoolConsumer; + private final GenererNavnServiceConsumer genererNavnServiceConsumer; + private final AdresseServiceConsumer adresseServiceConsumer; + private final TpsMessagingConsumer tpsMessagingConsumer; + + public Mono sendFoedselsmelding(FoedselsmeldingDTO request, Set miljoer) { + + if (isNotBlank(validate(request))) { + + return Mono.just(FoedselsmeldingResponseDTO.builder() + .error(validate(request)) + .build()); + } + + return tpsMessagingConsumer.getEksistererPerson(getForeldre(request), miljoer) + .collectList() + .flatMap(resultater -> { + + if (resultater.stream() + .anyMatch(resultat -> resultat.getMiljoer().contains("p") || + !resultat.getMiljoer().containsAll(miljoer))) { + + return resultater.stream() + .filter(resultat -> resultat.getMiljoer().contains("p") || + !resultat.getMiljoer().containsAll(miljoer)) + .map(resultat -> + Mono.just(FoedselsmeldingResponseDTO.builder() + .ident(resultat.getIdent()) + .miljoStatus(resultat.getMiljoer().stream() + .sorted() + .collect(Collectors.toMap(miljoe -> miljoe, + miljoe -> "finnes i %smiljø".formatted("p".equals(miljoe) ? "produksjons" : "")))) + .error("FEIL: ident %s finnes ikke i alle forspurte miljøer/og eller i prod(p) %s".formatted( + resultat.getIdent(), miljoer)) + .build())) + .findFirst() + .orElseThrow(() -> new ResponseStatusException(HttpStatus.INTERNAL_SERVER_ERROR, "Feilet å dekode identstatus")); + + } else { + return Mono.zip(identPoolConsumer.acquireIdents( + IdentpoolRequestMapper.convert(request)), + genererNavnServiceConsumer.getNavn(), + adresseServiceConsumer.getVegadresse(), + tpsMessagingConsumer.getAdressehistorikk(request.getIdentMor(), request.getFoedselsdato(), miljoer).collectList(), + isBlank(request.getIdentFar()) ? Mono.just(Collections.emptyList()) : + tpsMessagingConsumer.getAdressehistorikk(request.getIdentFar(), request.getFoedselsdato(), miljoer).collectList()) + .flatMap(opplysninger -> Mono.just(FoedselsmeldingRequestMapper.map(request, opplysninger)) + .flatMap(foedselsmelding -> tpsMessagingConsumer.sendFoedselsmelding(foedselsmelding, + opplysninger.getT4().stream().map(AdressehistorikkDTO::getMiljoe).collect(Collectors.toSet())))) + .map(response -> FoedselsmeldingResponseDTO.builder() + .ident(response.getIdent()) + .miljoStatus(response.getMiljoStatus()) + .build()); + } + }); + } + + private static String validate(FoedselsmeldingDTO request) { + + if (isBlank(request.getIdentMor())) { + return "FEIL: mors ident mangler"; + + } else if (isNull(request.getFoedselsdato())) { + return "FEIL: fødselsdato mangler"; + + } else if (isNull(request.getIdenttype())) { + return "FEIL: identtype mangler"; + + } else return null; + } + + private static Set getForeldre(FoedselsmeldingDTO request) { + + return Stream.of(List.of(request.getIdentMor()), + isNotBlank(request.getIdentFar()) ? List.of(request.getIdentFar()) : Collections.emptyList()) + .flatMap(Collection::stream) + .collect(Collectors.toSet()); + } +} diff --git a/apps/endringsmelding-service/src/main/java/no/nav/testnav/endringsmeldingservice/utility/KjoennFraIdentUtility.java b/apps/endringsmelding-service/src/main/java/no/nav/testnav/endringsmeldingservice/utility/KjoennFraIdentUtility.java new file mode 100644 index 00000000000..7876fef778e --- /dev/null +++ b/apps/endringsmelding-service/src/main/java/no/nav/testnav/endringsmeldingservice/utility/KjoennFraIdentUtility.java @@ -0,0 +1,15 @@ +package no.nav.testnav.endringsmeldingservice.utility; + +import lombok.experimental.UtilityClass; + +import static java.lang.Integer.parseInt; + +@UtilityClass +public class KjoennFraIdentUtility { + + public String get(String ident){ + + int kjoennNummer = parseInt(ident.substring(8,9)); + return kjoennNummer % 2 == 0 ? "K" : "M"; + } +} \ No newline at end of file diff --git a/apps/endringsmelding-service/src/main/resources/application-dev.yml b/apps/endringsmelding-service/src/main/resources/application-dev.yml new file mode 100644 index 00000000000..749d6f813ed --- /dev/null +++ b/apps/endringsmelding-service/src/main/resources/application-dev.yml @@ -0,0 +1,10 @@ + +consumers: + adresse-service: + url: https://testnav-adresse-service.intern.dev.nav.no + generer-navn-service: + url: https://generer-navn-service.intern.dev.nav.no + ident-pool: + url: https://testnav-ident-pool.intern.dev.nav.no + tps-messaging-service: + url: https://testnav-tps-messaging-service.intern.dev.nav.no \ No newline at end of file diff --git a/apps/endringsmelding-service/src/main/resources/application-prod.yml b/apps/endringsmelding-service/src/main/resources/application-prod.yml new file mode 100644 index 00000000000..894f2d09e4e --- /dev/null +++ b/apps/endringsmelding-service/src/main/resources/application-prod.yml @@ -0,0 +1,9 @@ + +spring: + security: + oauth2: + resourceserver: + tokenx: + issuer-uri: ${TOKEN_X_ISSUER} + jwk-set-uri: ${TOKEN_X_JWKS_URI} + accepted-audience: ${TOKEN_X_CLIENT_ID} \ No newline at end of file diff --git a/apps/endringsmelding-service/src/main/resources/application.yml b/apps/endringsmelding-service/src/main/resources/application.yml index 40398f5dfe6..6b234af6b85 100644 --- a/apps/endringsmelding-service/src/main/resources/application.yml +++ b/apps/endringsmelding-service/src/main/resources/application.yml @@ -12,10 +12,6 @@ spring: issuer-uri: ${AAD_ISSUER_URI}/v2.0 jwk-set-uri: ${AAD_ISSUER_URI}/discovery/v2.0/keys accepted-audience: ${azure.app.client.id}, api://${azure.app.client.id} - tokenx: - issuer-uri: ${TOKEN_X_ISSUER} - jwk-set-uri: ${TOKEN_X_JWKS_URI} - accepted-audience: ${TOKEN_X_CLIENT_ID} springdoc: swagger-ui: @@ -33,6 +29,21 @@ consumers: cluster: dev-gcp namespace: dolly name: testnav-tps-messaging-service + ident-pool: + url: http://testnav-ident-pool.dolly.svc.cluster.local + cluster: dev-gcp + namespace: dolly + name: testnav-ident-pool + adresse-service: + url: http://testnav-adresse-service.dolly.svc.cluster.local + cluster: dev-gcp + namespace: dolly + name: testnav-adresse-service + generer-navn-service: + url: http://generer-navn-service.dolly.svc.cluster.local + cluster: dev-gcp + namespace: dolly + name: generer-navn-service management: endpoints: diff --git a/apps/generer-navn-service/config.yml b/apps/generer-navn-service/config.yml index 2e2ad5598d3..62df6e2fd25 100644 --- a/apps/generer-navn-service/config.yml +++ b/apps/generer-navn-service/config.yml @@ -39,6 +39,8 @@ spec: cluster: dev-gcp - application: testnav-budpro-service cluster: dev-gcp + - application: testnav-endringsmelding-service + cluster: dev-gcp tokenx: enabled: true azure: diff --git a/apps/testnav-ident-pool/config.yml b/apps/testnav-ident-pool/config.yml index 64c3d600750..db7359ec9db 100644 --- a/apps/testnav-ident-pool/config.yml +++ b/apps/testnav-ident-pool/config.yml @@ -61,6 +61,8 @@ spec: - application: app-1 namespace: plattformsikkerhet cluster: dev-gcp + - application: testnav-endringsmelding-service + cluster: dev-gcp outbound: rules: - application: testnav-tps-messaging-service diff --git a/apps/tps-messaging-service/build.gradle b/apps/tps-messaging-service/build.gradle index 5486d73e8e8..88d48546719 100644 --- a/apps/tps-messaging-service/build.gradle +++ b/apps/tps-messaging-service/build.gradle @@ -81,7 +81,6 @@ dependencies { implementation 'org.springframework.boot:spring-boot-starter-oauth2-client' implementation 'org.springframework.cloud:spring-cloud-starter-bootstrap' - implementation 'com.fasterxml.jackson.core:jackson-annotations' implementation 'com.fasterxml.jackson.core:jackson-databind' implementation 'com.ibm.mq:mq-jms-spring-boot-starter:3.2.1' @@ -96,6 +95,7 @@ dependencies { implementation 'no.nav.repository.fellesreg.tpsws:nav-repository-fellesregister-jaxb-tps-s610-domain:2020.08.27-09.53-183ead3d81eb' implementation 'no.nav.repository.fellesreg.tpsws:nav-repository-fellesregister-jaxb-tps-m201-domain:2020.08.27-09.53-183ead3d81eb' + implementation 'no.nav.repository.fellesreg.tpsws:nav-repository-fellesregister-castor-tps-s018-domain:2020.08.27-09.53-183ead3d81eb' implementation 'io.micrometer:micrometer-registry-prometheus' implementation 'ma.glasnost.orika:orika-core:1.5.4' diff --git a/apps/tps-messaging-service/src/main/java/no/nav/testnav/apps/tpsmessagingservice/config/MapperFacadeConfig.java b/apps/tps-messaging-service/src/main/java/no/nav/testnav/apps/tpsmessagingservice/config/MapperFacadeConfig.java index 224fc7b82c2..12fdadf32c2 100644 --- a/apps/tps-messaging-service/src/main/java/no/nav/testnav/apps/tpsmessagingservice/config/MapperFacadeConfig.java +++ b/apps/tps-messaging-service/src/main/java/no/nav/testnav/apps/tpsmessagingservice/config/MapperFacadeConfig.java @@ -1,10 +1,9 @@ package no.nav.testnav.apps.tpsmessagingservice.config; -import lombok.RequiredArgsConstructor; +import ma.glasnost.orika.CustomConverter; import ma.glasnost.orika.MapperFacade; import ma.glasnost.orika.impl.DefaultMapperFactory; import no.nav.testnav.apps.tpsmessagingservice.mapper.MappingStrategy; - import org.springframework.context.annotation.Bean; import org.springframework.context.annotation.Configuration; @@ -13,19 +12,24 @@ import static java.util.Objects.nonNull; @Configuration -@RequiredArgsConstructor public class MapperFacadeConfig { - private final List mappingStrategies; - @Bean - MapperFacade mapperFacade() { + MapperFacade mapperFacade(List mappingStrategies, List customConverters) { DefaultMapperFactory mapperFactory = new DefaultMapperFactory.Builder().build(); if (nonNull(mappingStrategies)) { - mappingStrategies.forEach(mapper -> mapper.register(mapperFactory)); + for (MappingStrategy mapper : mappingStrategies) { + mapper.register(mapperFactory); + } + } + + if (nonNull(customConverters)) { + for (CustomConverter converter : customConverters) { + mapperFactory.getConverterFactory().registerConverter(converter); + } } return mapperFactory.getMapperFacade(); } -} +} \ No newline at end of file diff --git a/apps/tps-messaging-service/src/main/java/no/nav/testnav/apps/tpsmessagingservice/consumer/TestmiljoerServiceConsumer.java b/apps/tps-messaging-service/src/main/java/no/nav/testnav/apps/tpsmessagingservice/consumer/TestmiljoerServiceConsumer.java index c4b6fa2bea8..2337605971b 100644 --- a/apps/tps-messaging-service/src/main/java/no/nav/testnav/apps/tpsmessagingservice/consumer/TestmiljoerServiceConsumer.java +++ b/apps/tps-messaging-service/src/main/java/no/nav/testnav/apps/tpsmessagingservice/consumer/TestmiljoerServiceConsumer.java @@ -8,13 +8,14 @@ import org.springframework.stereotype.Service; import org.springframework.web.reactive.function.client.WebClient; -import java.util.Arrays; import java.util.List; +import java.util.stream.Stream; @Slf4j @Service public class TestmiljoerServiceConsumer { + private final static List EXTRA_ENV = List.of("q5"); private final WebClient webClient; private final ServerProperties serverProperties; private final TokenExchange tokenExchange; @@ -33,8 +34,10 @@ public TestmiljoerServiceConsumer( public List getMiljoer() { - return Arrays.asList(tokenExchange.exchange(serverProperties) + return tokenExchange.exchange(serverProperties) .flatMap(token -> new TestmiljoerServiceCommand(webClient, token.getTokenValue()).call()) - .block()); + .map(miljoer -> Stream.concat(miljoer.stream(), EXTRA_ENV.stream()) + .toList()) + .block(); } } diff --git a/apps/tps-messaging-service/src/main/java/no/nav/testnav/apps/tpsmessagingservice/consumer/TpsConsumer.java b/apps/tps-messaging-service/src/main/java/no/nav/testnav/apps/tpsmessagingservice/consumer/TpsConsumer.java index c72482156b9..0b46187871f 100644 --- a/apps/tps-messaging-service/src/main/java/no/nav/testnav/apps/tpsmessagingservice/consumer/TpsConsumer.java +++ b/apps/tps-messaging-service/src/main/java/no/nav/testnav/apps/tpsmessagingservice/consumer/TpsConsumer.java @@ -1,5 +1,6 @@ package no.nav.testnav.apps.tpsmessagingservice.consumer; +import jakarta.xml.bind.JAXBException; import lombok.AllArgsConstructor; import lombok.Builder; import lombok.Data; @@ -11,7 +12,6 @@ import org.springframework.beans.factory.annotation.Value; import org.springframework.stereotype.Service; -import jakarta.xml.bind.JAXBException; import java.util.List; import java.util.Map; import java.util.Objects; diff --git a/apps/tps-messaging-service/src/main/java/no/nav/testnav/apps/tpsmessagingservice/consumer/command/TestmiljoerServiceCommand.java b/apps/tps-messaging-service/src/main/java/no/nav/testnav/apps/tpsmessagingservice/consumer/command/TestmiljoerServiceCommand.java index 54c28f0d3bc..109be41e979 100644 --- a/apps/tps-messaging-service/src/main/java/no/nav/testnav/apps/tpsmessagingservice/consumer/command/TestmiljoerServiceCommand.java +++ b/apps/tps-messaging-service/src/main/java/no/nav/testnav/apps/tpsmessagingservice/consumer/command/TestmiljoerServiceCommand.java @@ -8,10 +8,12 @@ import reactor.util.retry.Retry; import java.time.Duration; +import java.util.Arrays; +import java.util.List; import java.util.concurrent.Callable; @RequiredArgsConstructor -public class TestmiljoerServiceCommand implements Callable> { +public class TestmiljoerServiceCommand implements Callable>> { private static final String MILJOER_URL = "/api/v1/miljoer"; @@ -19,13 +21,14 @@ public class TestmiljoerServiceCommand implements Callable> { private final String token; @Override - public Mono call() { + public Mono> call() { return webClient.get() .uri(builder -> builder.path(MILJOER_URL).build()) .header(HttpHeaders.AUTHORIZATION, "Bearer " + token) .retrieve() .bodyToMono(String[].class) + .map(Arrays::asList) .retryWhen(Retry.backoff(3, Duration.ofSeconds(5)) .filter(WebClientFilter::is5xxException)) .cache(Duration.ofSeconds(10)); diff --git a/apps/tps-messaging-service/src/main/java/no/nav/testnav/apps/tpsmessagingservice/consumer/command/TpsMeldingCommand.java b/apps/tps-messaging-service/src/main/java/no/nav/testnav/apps/tpsmessagingservice/consumer/command/TpsMeldingCommand.java index 4a3544ce01c..9a48e690386 100644 --- a/apps/tps-messaging-service/src/main/java/no/nav/testnav/apps/tpsmessagingservice/consumer/command/TpsMeldingCommand.java +++ b/apps/tps-messaging-service/src/main/java/no/nav/testnav/apps/tpsmessagingservice/consumer/command/TpsMeldingCommand.java @@ -1,7 +1,6 @@ package no.nav.testnav.apps.tpsmessagingservice.consumer.command; import com.ibm.mq.jakarta.jms.MQQueue; -import com.ibm.mq.jmqi.JmqiException; import com.ibm.msg.client.jakarta.wmq.compat.jms.internal.JMSC; import jakarta.jms.Connection; import jakarta.jms.ConnectionFactory; @@ -33,7 +32,7 @@ public class TpsMeldingCommand implements Callable { private final String password; private final String requestMessageContent; - public String call() throws JMSException, JmqiException { + public String call() throws JMSException { try (Connection connection = connectionFactory.createConnection(username, password)) { connection.start(); diff --git a/apps/tps-messaging-service/src/main/java/no/nav/testnav/apps/tpsmessagingservice/dto/TpsRequest.java b/apps/tps-messaging-service/src/main/java/no/nav/testnav/apps/tpsmessagingservice/dto/TpsRequest.java new file mode 100644 index 00000000000..cedc3a6ee61 --- /dev/null +++ b/apps/tps-messaging-service/src/main/java/no/nav/testnav/apps/tpsmessagingservice/dto/TpsRequest.java @@ -0,0 +1,4 @@ +package no.nav.testnav.apps.tpsmessagingservice.dto; + +public interface TpsRequest { +} diff --git a/apps/tps-messaging-service/src/main/java/no/nav/testnav/apps/tpsmessagingservice/dto/TpsServiceRutine.java b/apps/tps-messaging-service/src/main/java/no/nav/testnav/apps/tpsmessagingservice/dto/TpsServiceRutine.java deleted file mode 100644 index c6901b839c5..00000000000 --- a/apps/tps-messaging-service/src/main/java/no/nav/testnav/apps/tpsmessagingservice/dto/TpsServiceRutine.java +++ /dev/null @@ -1,21 +0,0 @@ -package no.nav.testnav.apps.tpsmessagingservice.dto; - -import lombok.AllArgsConstructor; -import lombok.Builder; -import lombok.Data; -import lombok.NoArgsConstructor; - -import jakarta.xml.bind.annotation.XmlType; - -@Data -@Builder -@NoArgsConstructor -@AllArgsConstructor -@XmlType(propOrder = {"serviceRutinenavn", "fnr", "aksjonsKode", "aksjonsKode2"}) -public class TpsServiceRutine { - - private String serviceRutinenavn; - private String fnr; - private String aksjonsKode; - private String aksjonsKode2; -} \ No newline at end of file diff --git a/apps/tps-messaging-service/src/main/java/no/nav/testnav/apps/tpsmessagingservice/dto/TpsServicerutineAksjonsdatoRequest.java b/apps/tps-messaging-service/src/main/java/no/nav/testnav/apps/tpsmessagingservice/dto/TpsServicerutineAksjonsdatoRequest.java new file mode 100644 index 00000000000..834df522540 --- /dev/null +++ b/apps/tps-messaging-service/src/main/java/no/nav/testnav/apps/tpsmessagingservice/dto/TpsServicerutineAksjonsdatoRequest.java @@ -0,0 +1,35 @@ +package no.nav.testnav.apps.tpsmessagingservice.dto; + +import com.fasterxml.jackson.annotation.JsonInclude; +import jakarta.xml.bind.annotation.XmlRootElement; +import jakarta.xml.bind.annotation.XmlType; +import lombok.AllArgsConstructor; +import lombok.Builder; +import lombok.Data; +import lombok.NoArgsConstructor; + +@Data +@Builder +@NoArgsConstructor +@AllArgsConstructor +@XmlRootElement(name = "tpsPersonData") +@JsonInclude(JsonInclude.Include.NON_EMPTY) +public class TpsServicerutineAksjonsdatoRequest implements TpsRequest { + + private TpsServiceRutineMedAksjonsdato tpsServiceRutine; + + @Data + @Builder + @NoArgsConstructor + @AllArgsConstructor + @XmlType(propOrder = {"serviceRutinenavn", "fnr", "aksjonsDato", "aksjonsKode", "aksjonsKode2", "buffNr"}) + public static class TpsServiceRutineMedAksjonsdato { + + private String serviceRutinenavn; + private String fnr; + private String aksjonsDato; + private String aksjonsKode; + private String aksjonsKode2; + private String buffNr; + } +} diff --git a/apps/tps-messaging-service/src/main/java/no/nav/testnav/apps/tpsmessagingservice/dto/TpsServicerutineM201Response.java b/apps/tps-messaging-service/src/main/java/no/nav/testnav/apps/tpsmessagingservice/dto/TpsServicerutineM201Response.java index e0d4bf2febb..ec19307221e 100644 --- a/apps/tps-messaging-service/src/main/java/no/nav/testnav/apps/tpsmessagingservice/dto/TpsServicerutineM201Response.java +++ b/apps/tps-messaging-service/src/main/java/no/nav/testnav/apps/tpsmessagingservice/dto/TpsServicerutineM201Response.java @@ -4,14 +4,14 @@ import com.fasterxml.jackson.dataformat.xml.annotation.JacksonXmlCData; import com.fasterxml.jackson.dataformat.xml.annotation.JacksonXmlElementWrapper; import com.fasterxml.jackson.dataformat.xml.annotation.JacksonXmlProperty; +import jakarta.xml.bind.annotation.XmlRootElement; +import jakarta.xml.bind.annotation.XmlType; import lombok.AllArgsConstructor; import lombok.Builder; import lombok.Data; import lombok.NoArgsConstructor; import no.nav.tps.ctg.m201.domain.TpsServiceRutineType; -import jakarta.xml.bind.annotation.XmlRootElement; -import jakarta.xml.bind.annotation.XmlType; import java.util.ArrayList; import java.util.List; import java.util.Objects; @@ -89,4 +89,4 @@ public static class EFnr { private String en; private TpsMeldingResponse svarStatus; } -} +} \ No newline at end of file diff --git a/apps/tps-messaging-service/src/main/java/no/nav/testnav/apps/tpsmessagingservice/dto/TpsServicerutineRequest.java b/apps/tps-messaging-service/src/main/java/no/nav/testnav/apps/tpsmessagingservice/dto/TpsServicerutineRequest.java index 4a9f69f5fe5..43d28e21fd8 100644 --- a/apps/tps-messaging-service/src/main/java/no/nav/testnav/apps/tpsmessagingservice/dto/TpsServicerutineRequest.java +++ b/apps/tps-messaging-service/src/main/java/no/nav/testnav/apps/tpsmessagingservice/dto/TpsServicerutineRequest.java @@ -1,20 +1,33 @@ package no.nav.testnav.apps.tpsmessagingservice.dto; import com.fasterxml.jackson.annotation.JsonInclude; +import jakarta.xml.bind.annotation.XmlRootElement; +import jakarta.xml.bind.annotation.XmlType; import lombok.AllArgsConstructor; import lombok.Builder; import lombok.Data; import lombok.NoArgsConstructor; -import jakarta.xml.bind.annotation.XmlRootElement; - @Data @Builder @NoArgsConstructor @AllArgsConstructor @XmlRootElement(name = "tpsPersonData") @JsonInclude(JsonInclude.Include.NON_EMPTY) -public class TpsServicerutineRequest { +public class TpsServicerutineRequest implements TpsRequest { private TpsServiceRutine tpsServiceRutine; + + @Data + @Builder + @NoArgsConstructor + @AllArgsConstructor + @XmlType(propOrder = {"serviceRutinenavn", "fnr", "aksjonsKode", "aksjonsKode2"}) + public static class TpsServiceRutine { + + private String serviceRutinenavn; + private String fnr; + private String aksjonsKode; + private String aksjonsKode2; + } } diff --git a/apps/tps-messaging-service/src/main/java/no/nav/testnav/apps/tpsmessagingservice/dto/TpsServicerutineS018Response.java b/apps/tps-messaging-service/src/main/java/no/nav/testnav/apps/tpsmessagingservice/dto/TpsServicerutineS018Response.java new file mode 100644 index 00000000000..d6d4a9cb365 --- /dev/null +++ b/apps/tps-messaging-service/src/main/java/no/nav/testnav/apps/tpsmessagingservice/dto/TpsServicerutineS018Response.java @@ -0,0 +1,39 @@ +package no.nav.testnav.apps.tpsmessagingservice.dto; + +import com.fasterxml.jackson.annotation.JsonInclude; +import lombok.AllArgsConstructor; +import lombok.Builder; +import lombok.Data; +import lombok.NoArgsConstructor; +import no.nav.tps.xjc.ctg.domain.s018.S018PersonType; + +@Data +@Builder +@NoArgsConstructor +@AllArgsConstructor +@JsonInclude(JsonInclude.Include.NON_EMPTY) +public class TpsServicerutineS018Response { + + private TpsPersonData tpsPersonData; + + @Data + @Builder + @NoArgsConstructor + @AllArgsConstructor + @JsonInclude(JsonInclude.Include.NON_EMPTY) + public static class TpsPersonData { + private TpsServicerutineAksjonsdatoRequest.TpsServiceRutineMedAksjonsdato tpsServiceRutine; + private TpsServicerutineS018Response.TpsSvar tpsSvar; + } + + @Data + @Builder + @NoArgsConstructor + @AllArgsConstructor + @JsonInclude(JsonInclude.Include.NON_EMPTY) + public static class TpsSvar { + + private TpsMeldingResponse svarStatus; + private S018PersonType personDataS018; + } +} diff --git a/apps/tps-messaging-service/src/main/java/no/nav/testnav/apps/tpsmessagingservice/dto/TpsServicerutineS610Response.java b/apps/tps-messaging-service/src/main/java/no/nav/testnav/apps/tpsmessagingservice/dto/TpsServicerutineS610Response.java index ef5a5b75f68..8f7c614afe0 100644 --- a/apps/tps-messaging-service/src/main/java/no/nav/testnav/apps/tpsmessagingservice/dto/TpsServicerutineS610Response.java +++ b/apps/tps-messaging-service/src/main/java/no/nav/testnav/apps/tpsmessagingservice/dto/TpsServicerutineS610Response.java @@ -23,7 +23,7 @@ public class TpsServicerutineS610Response { @JsonInclude(JsonInclude.Include.NON_EMPTY) public static class TpsPersonData { - private TpsServiceRutine tpsServiceRutine; + private TpsServicerutineRequest.TpsServiceRutine tpsServiceRutine; private TpsSvar tpsSvar; } diff --git a/apps/tps-messaging-service/src/main/java/no/nav/testnav/apps/tpsmessagingservice/dto/endringsmeldinger/SkdFeltDefinisjonerTrans1.java b/apps/tps-messaging-service/src/main/java/no/nav/testnav/apps/tpsmessagingservice/dto/endringsmeldinger/SkdFeltDefinisjonerTrans1.java new file mode 100644 index 00000000000..2b64d4e810c --- /dev/null +++ b/apps/tps-messaging-service/src/main/java/no/nav/testnav/apps/tpsmessagingservice/dto/endringsmeldinger/SkdFeltDefinisjonerTrans1.java @@ -0,0 +1,208 @@ +package no.nav.testnav.apps.tpsmessagingservice.dto.endringsmeldinger; + +import lombok.Getter; + +import java.util.ArrayList; +import java.util.Arrays; +import java.util.Comparator; +import java.util.List; + +import static no.nav.testnav.apps.tpsmessagingservice.dto.endringsmeldinger.WhitespaceConstants.DUMMY_DATO; +import static no.nav.testnav.apps.tpsmessagingservice.dto.endringsmeldinger.WhitespaceConstants.DUMMY_IDENT; +import static no.nav.testnav.apps.tpsmessagingservice.dto.endringsmeldinger.WhitespaceConstants.FIVE_OES; +import static no.nav.testnav.apps.tpsmessagingservice.dto.endringsmeldinger.WhitespaceConstants.SIX_OES; +import static no.nav.testnav.apps.tpsmessagingservice.dto.endringsmeldinger.WhitespaceConstants.WHITESPACE_100_STK; +import static no.nav.testnav.apps.tpsmessagingservice.dto.endringsmeldinger.WhitespaceConstants.WHITESPACE_25_STK; +import static no.nav.testnav.apps.tpsmessagingservice.dto.endringsmeldinger.WhitespaceConstants.WHITESPACE_30_STK; +import static no.nav.testnav.apps.tpsmessagingservice.dto.endringsmeldinger.WhitespaceConstants.WHITESPACE_40_STK; +import static no.nav.testnav.apps.tpsmessagingservice.dto.endringsmeldinger.WhitespaceConstants.WHITESPACE_50_STK; + +@Getter +public enum SkdFeltDefinisjonerTrans1 { + FODSELSDATO("fodselsdato", SIX_OES, 1, 6, 1, 6), + PERSONNUMMER("personnummer", FIVE_OES, 2, 5, 7, 11), + MASKINDATO("maskindato", DUMMY_DATO, 3, 8, 12, 19), + MASKINTID("maskintid", SIX_OES, 4, 6, 20, 25), + TRANSTYPE("transtype", "0", 5, 1, 26, 26), + AARSAKSKODE("aarsakskode", "00", 6, 2, 27, 28), + REG_DATO("regDato", DUMMY_DATO, 7, 8, 29, 36), + STATUSKODE("statuskode", " ", 8, 1, 37, 37), + DOEDSDATO("datoDoed", DUMMY_DATO, 9, 8, 38, 45), + SLEKTSNAVN("slektsnavn", WHITESPACE_50_STK, 10, 50, 46, 95), + FORNAVN("fornavn", WHITESPACE_50_STK, 11, 50, 96, 145), + MELLOMNAVN("mellomnavn", WHITESPACE_50_STK, 12, 50, 146, 195), + SLEKTSNAVN_UGIFT_T("slektsnavnUgift", WHITESPACE_50_STK, 13, 50, 196, 245), + FORKORTET_NAVN("forkortetNavn", WHITESPACE_25_STK, 14, 25, 246, 270), + REGDATO_NAVN("regDatoNavn", DUMMY_DATO, 15, 8, 271, 278), + FOEDEKOMMUNE_LAND("foedekommLand", " ", 16, 4, 279, 282), + FOEDESTED("foedested", " ", 17, 20, 283, 302), + STATSBORGERSKAP("statsborgerskap", "000", 18, 3, 303, 305), + STATSBORGERSKAP_REGDATO("regdatoStatsb", DUMMY_DATO, 19, 8, 306, 313), + FAMILIENUMMER("familienummer", DUMMY_IDENT, 20, 11, 314, 324), + REG_DATO_FAM_NR("regdatoFamnr", DUMMY_DATO, 21, 8, 325, 332), + PERSONKODE("personkode", "0", 22, 1, 333, 333), + SPES_REGTYPE("spesRegType", "0", 23, 1, 334, 334), + DATO_SPES_REGTYPE("datoSpesRegType", DUMMY_DATO, 24, 8, 335, 342), + SIVILSTAND("sivilstand", "0", 25, 1, 343, 343), + REGDATO_SIVILSTAND("regdatoSivilstand", DUMMY_DATO, 26, 8, 344, 351), + EKTEFELLE_PARTNER_FODSELSDATO("ektefellePartnerFoedselsdato", SIX_OES, 28, 6, 352, 357), + EKTEFELLE_PARTNER_PERSONNUMMMER("ektefellePartnerPersonnr", FIVE_OES, 29, 5, 358, 362), + EKTEFELLE_PARTNER_NAVN("ektefellePartnerNavn", WHITESPACE_50_STK, 30, 50, 363, 412), + EKTEFELLER_PARTNER_STATSBORGERSKAP("ektefellePartnerStatsb", "000", 31, 3, 413, 415), + REG_DATO_ADR("regdatoAdr", DUMMY_DATO, 33, 8, 416, 423), + FLYTTEDATO_ADR("flyttedatoAdr", DUMMY_DATO, 34, 8, 424, 431), + KOMMUNENUMMER("kommunenummer", "0000", 35, 4, 432, 435), + GATEGAARD("gateGaard", FIVE_OES, 36, 5, 436, 440), + HUSBRUK("husBruk", "0000", 37, 4, 441, 444, true), + BOKSTAVFESTENR("bokstavFestenr", "0000", 38, 4, 445, 448), + UNDERNR("undernr", "000", 39, 3, 449, 451), + ADRESSENAVN("adressenavn", WHITESPACE_25_STK, 40, 25, 452, 476), + ADRESSETYPE("adressetype", " ", 41, 1, 477, 477), + TILLEGGSADRESSE("tilleggsadresse", WHITESPACE_25_STK, 42, 25, 478, 502), + POSTNUMMER("postnummer", "0000", 43, 4, 503, 506), + VALGKRETS("valgkrets", "0000", 44, 4, 507, 510), + POSTADRESSE1("postadresse1", WHITESPACE_30_STK, 46, 30, 511, 540), + POSTADRESSE2("postadresse2", WHITESPACE_30_STK, 47, 30, 541, 570), + POSTADRESSE3("postadresse3", WHITESPACE_30_STK, 48, 30, 571, 600), + POSTADRESSE_LAND("postadresseLand", "000", 49, 3, 601, 603), + INNVANDRET_FRA_LAND("innvandretFraLand", "000", 50, 3, 604, 606), + FRA_LAND_REGDATO("fraLandRegdato", DUMMY_DATO, 51, 8, 607, 614), + FRA_LAND_FLYTTEDATO("fraLandFlyttedato", DUMMY_DATO, 52, 8, 615, 622), + FRA_KOMMUNE("fraKommune", "0000", 53, 4, 623, 626), + FRA_KOMMUNE_REGDATO("fraKommRegdato", DUMMY_DATO, 54, 8, 627, 634), + FRA_KOMMUNE_FLYTTEDATO("fraKommFlyttedato", DUMMY_DATO, 55, 8, 635, 642), + UTVANDRET_TIL_LAND("utvandretTilLand", "000", 56, 3, 643, 645), + TIL_LAND_REGDATO("tilLandRegdato", DUMMY_DATO, 57, 8, 646, 653), + TIL_LAND_FLYTTEDATO("tilLandFlyttedato", DUMMY_DATO, 58, 8, 654, 661), + SAMEMANNTALL("samemanntall", " ", 59, 1, 662, 662), + DATO_SAMEMANNTALL("datoSamemanntall", DUMMY_DATO, 60, 8, 663, 670), + UMYNDIGGJORT("umyndiggjort", " ", 61, 1, 671, 671), + DATO_UMYNDIGGJORT("datoUmyndiggjort", DUMMY_DATO, 62, 8, 672, 679), + FORELDREANSVAR("foreldreansvar", " ", 63, 1, 680, 680), + DATO_FORELDREANSVAR("datoForeldreansvar", DUMMY_DATO, 64, 8, 681, 688), + ARBEIDSTILLATELSE("arbeidstillatelse", " ", 65, 1, 689, 689), + DATO_ARBEIDSTILLATELSE("datoArbeidstillatelse", DUMMY_DATO, 66, 8, 690, 697), + FREMKONNUMMER("fremkonnummer", DUMMY_DATO, 67, 8, 698, 705), + MORS_FODSELSDATO("morsFodselsdato", SIX_OES, 69, 6, 706, 711), + MORS_PERSONNUMMER("morsPersonnummer", FIVE_OES, 70, 5, 712, 716), + MORS_NAVN("morsNavn", WHITESPACE_50_STK, 71, 50, 717, 766), + MORS_STATSBORGERSKAP("morsStatsbSkap", "000", 72, 3, 767, 769), + FARS_FODSELSDATO("farsFodselsdato", SIX_OES, 74, 6, 770, 775), + FARS_PERSONNUMMER("farsPersonnummer", FIVE_OES, 75, 5, 776, 780), + FARS_NAVN("farsNavn", WHITESPACE_50_STK, 76, 50, 781, 830), + FARS_STATSBSKAP("farsStatsbSkap", "000", 77, 3, 831, 833), + TIDLIGERE_FNR_DNR("tidligereFnrDnr", DUMMY_IDENT, 78, 11, 834, 844), + DATO_TIDLIGERE_FNRDNR("datoTidlFnrDnr", DUMMY_DATO, 79, 8, 845, 852), + NYTT_FNR("nyttFnr", DUMMY_IDENT, 80, 11, 853, 863), + DATO_NYTT_FNR("datoNyttFnr", DUMMY_DATO, 81, 8, 864, 871), + LEVENDE_DOED("levendeDoed", " ", 82, 1, 872, 872), + KJOENN("kjoenn", " ", 83, 1, 873, 873), + TILDELINGSKODE("tildelingskode", " ", 84, 1, 874, 874), + FOEDSELSTYPE("foedselstype", " ", 85, 2, 875, 876), + MORS_SIVILSTAND("morsSivilstand", " ", 86, 1, 877, 877), + EKTESKAP_PARTNERSKAP_NUMMER("ekteskapPartnerskapNr", " ", 87, 1, 878, 878), + EKTEFELLE_EKTESKAP_PARTNERSKAP_NUMMER("ektefelleEkteskapPartnerskapNr", " ", 88, 1, 879, 879), + VIGSELSTYPE("vigselstype", " ", 89, 1, 880, 880), + FORS_BYRDE("forsByrde", " ", 90, 2, 881, 882), + DOMBEVILLING("dombevilling", " ", 91, 1, 883, 883), + ANTALL_BARN("antallBarn", " ", 92, 2, 884, 885), + TIDLIGERE_SIVILSTAND("tidligereSivilstand", " ", 93, 1, 886, 886), + EKTEFELLE_TIDLIGERE_SIVILSTAND("ektefelleTidligereSivilstand", " ", 94, 1, 887, 887), + HJEMMEL("hjemmel", " ", 95, 1, 888, 888), + FYLKE("fylke", " ", 96, 2, 889, 890), + VIGSELSKOMMUNE("vigselskommune", "0000", 97, 4, 891, 894), + TIDL_SEP_DOM_BEV("tidlSepDomBev", " ", 98, 1, 895, 895), + BEGJERT_AV("begjertAv", " ", 99, 1, 896, 896), + REGISTRERINGSGRUNNLAG("registrGrunnlag", " ", 100, 1, 897, 897), + DOEDSSTED("doedssted", " ", 101, 4, 898, 901), + TYPE_DOEDSSTED("typeDoedssted", " ", 102, 1, 902, 902), + VIGSELSDATO("vigselsdato", DUMMY_DATO, 103, 8, 903, 910), + MEDLEM_KIRKEN("medlKirken", " ", 104, 1, 911, 911), + SEKVENS_NR("sekvensnr", SIX_OES, 105, 6, 912, 917), + BOLIG_NR("bolignr", " ", 106, 5, 918, 922), + DUF_ID("dufId", "000000000000", 107, 12, 923, 934), + BRUKERIDENT("brukerident", " ", 108, 8, 935, 942), + SKOLERETS("skolerets", "0000", 109, 4, 943, 946), + TK_NR("tkNr", "0000", 110, 4, 947, 950), + DNR_HJEMLANDSADRESSE1("dnrHjemlandsadresse1", WHITESPACE_40_STK, 111, 40, 951, 990), + DNR_HJEMLANDSADRESSE2("dnrHjemlandsadresse2", WHITESPACE_40_STK, 112, 40, 991, 1030), + DNR_HJEMLANDSADRESSE3("dnrHjemlandsadresse3", WHITESPACE_40_STK, 113, 40, 1031, 1070), + DNR_HJEMLAND_LANDKODE("dnrHjemlandLandkode", "000", 114, 3, 1071, 1073), + DNR_HJEMLAND_REGDATO("dnrHjemlandRegDato", DUMMY_DATO, 115, 8, 1074, 1081), + DNR_ID_KONTROLL("dnrIdKontroll", " ", 116, 1, 1082, 1082), + POSTADRESSE_REGDATO("postadrRegDato", DUMMY_DATO, 117, 8, 1083, 1090), + UTVANDRINGSTYPE("utvandringstype", " ", 118, 1, 1091, 1091), + GRUNNKRETS("grunnkrets", "0000", 119, 4, 1092, 1095), + STATSBORGERSKAP2("statsborgerskap2", "000", 120, 3, 1096, 1098), + REGDATO_STATSB2("regdatoStatsb2", DUMMY_DATO, 121, 8, 1099, 1106), + STATSBORGERSKAP3("statsborgerskap3", "000", 122, 3, 1107, 1109), + REGDATO_STATSB3("regdatoStatsb3", DUMMY_DATO, 123, 8, 1110, 1117), + STATSBORGERSKAP4("statsborgerskap4", "000", 124, 3, 1118, 1120), + REGDATO_STATSB4("regdatoStatsb4", DUMMY_DATO, 125, 8, 1121, 1128), + STATSBORGERSKAP5("statsborgerskap5", "000", 126, 3, 1129, 1131), + REGDATO_STATSB5("regdatoStatsb5", DUMMY_DATO, 127, 8, 1132, 1139), + STATSBORGERSKAP6("statsborgerskap6", "000", 128, 3, 1140, 1142), + REGDATO_STATSB6("regdatoStatsb6", DUMMY_DATO, 129, 8, 1143, 1150), + STATSBORGERSKAP7("statsborgerskap7", "000", 130, 3, 1151, 1153), + REGDATO_STATSB7("regdatoStatsb7", DUMMY_DATO, 131, 8, 1154, 1161), + STATSBORGERSKAP8("statsborgerskap8", "000", 132, 3, 1162, 1164), + REGDATO_STATSB8("regdatoStatsb8", DUMMY_DATO, 132, 8, 1165, 1172), + STATSBORGERSKAP9("statsborgerskap9", "000", 133, 3, 1173, 1175), + REGDATO_STATSB9("regdatoStatsb9", DUMMY_DATO, 134, 8, 1176, 1183), + STATSBORGERSKAP10("statsborgerskap10", "000", 135, 3, 1184, 1186), + REGDATO_STATSB10("regdatoStatsb10", DUMMY_DATO, 136, 8, 1187, 1194), + BIBEHOLD("bibehold", " ", 137, 1, 1195, 1195), + REGDATO_BIBEHOLD("regdatoBibehold", DUMMY_DATO, 138, 8, 1196, 1203), + SAKSID("saksid", "0000000", 139, 7, 1204, 1210), + EMBETE("embete", " ", 140, 4, 1211, 1214), + SAKSTYPE("sakstype", " ", 141, 3, 1215, 1217), + VEDTAKSDATO("vedtaksdato", " ", 142, 8, 1218, 1225), + INTERN_VERGE_ID("internVergeid", "0000000", 143, 7, 1226, 1232), + VERGE_FNR_DNR("vergeFnrDnr", DUMMY_IDENT, 144, 11, 1233, 1243), + VERGETYPE("vergetype", " ", 145, 3, 1244, 1246), + MANDATTYPE("mandattype", " ", 146, 3, 1247, 1249), + MANDAT_TEKST("mandatTekst", WHITESPACE_100_STK, 147, 100, 1250, 1349), + RESERVER_FRAMTIDIG_BRUK("reserverFramtidigBruk", WHITESPACE_100_STK + WHITESPACE_50_STK + " ", 148, 151, 1350, 1500); + + private String variabelNavn; + private String defaultVerdi; + private int idRekkefolge; + private int antallBytesAvsatt; + private int fraByte; + private int tilByte; + private boolean isValueLastInSkdField = false; + + public static final int TRANSTYPE_START_POSITION = 25; + public static final int TRANSTYPE_END_POSITION = 26; + + SkdFeltDefinisjonerTrans1(String variabelnavn, String defaultVerdi, int idRekkefolge, int antallBytesAvsatt, int fraByte, int tilByte, boolean isValueLastInSkdField) { + this.variabelNavn = variabelnavn; + this.defaultVerdi = defaultVerdi; + this.idRekkefolge = idRekkefolge; + this.antallBytesAvsatt = antallBytesAvsatt; + this.fraByte = fraByte; + this.tilByte = tilByte; + this.isValueLastInSkdField = isValueLastInSkdField; + } + + SkdFeltDefinisjonerTrans1(String variabelnavn, String defaultVerdi, int idRekkefolge, int antallBytesAvsatt, + int fraByte, int tilByte) { + this.variabelNavn = variabelnavn; + this.defaultVerdi = defaultVerdi; + this.idRekkefolge = idRekkefolge; + this.antallBytesAvsatt = antallBytesAvsatt; + this.fraByte = fraByte; + this.tilByte = tilByte; + } + + public static List getAllFeltDefinisjonerInSortedList() { + return new ArrayList<>(Arrays.stream(SkdFeltDefinisjonerTrans1.values()) + .sorted(Comparator.comparingInt(SkdFeltDefinisjonerTrans1::getIdRekkefolge)) + .toList()); + } + + public String extractMeldingsfeltverdiFromString(String skdMeldingUtenHeader) { + String extractedValue = skdMeldingUtenHeader.substring(this.getFraByte() - 1, this.getTilByte()); + return extractedValue.equals(this.getDefaultVerdi()) ? null : extractedValue.trim(); + } +} diff --git a/apps/tps-messaging-service/src/main/java/no/nav/testnav/apps/tpsmessagingservice/dto/endringsmeldinger/SkdMeldingTrans1.java b/apps/tps-messaging-service/src/main/java/no/nav/testnav/apps/tpsmessagingservice/dto/endringsmeldinger/SkdMeldingTrans1.java new file mode 100644 index 00000000000..0599afbc98d --- /dev/null +++ b/apps/tps-messaging-service/src/main/java/no/nav/testnav/apps/tpsmessagingservice/dto/endringsmeldinger/SkdMeldingTrans1.java @@ -0,0 +1,207 @@ +package no.nav.testnav.apps.tpsmessagingservice.dto.endringsmeldinger; + +import lombok.AllArgsConstructor; +import lombok.Builder; +import lombok.Getter; +import lombok.NoArgsConstructor; +import lombok.Setter; +import org.apache.commons.lang3.StringUtils; +import org.springframework.http.HttpStatus; +import org.springframework.web.server.ResponseStatusException; + +import java.lang.reflect.InvocationTargetException; + +import static java.lang.Math.min; + +/** + * Java-representasjon av skdmeldingen. Objektet bærer verdiene til de utfylte elementene i skd-meldingen. + */ +@Getter +@Setter +@NoArgsConstructor +@AllArgsConstructor +@Builder +public class SkdMeldingTrans1 { + private static final int MELDINGSLENGDE_UTEN_HEADER = 1500; + + private String header; + private String fodselsdato; + private String personnummer; + private String maskindato; + private String maskintid; + private String transtype; + private String aarsakskode; + private String regDato; + private String statuskode; + private String datoDoed; + private String slektsnavn; + private String fornavn; + private String mellomnavn; + private String slektsnavnUgift; + private String forkortetNavn; + private String regDatoNavn; + private String foedekommLand; + private String foedested; + private String statsborgerskap; + private String regdatoStatsb; + private String familienummer; + private String regdatoFamnr; + private String personkode; + private String spesRegType; + private String datoSpesRegType; + private String sivilstand; + private String regdatoSivilstand; + private String ektefellePartnerFoedselsdato; + private String ektefellePartnerPersonnr; + private String ektefellePartnerNavn; + private String ektefellePartnerStatsb; + private String regdatoAdr; + private String flyttedatoAdr; + private String kommunenummer; + private String gateGaard; + private String husBruk; + private String bokstavFestenr; + private String undernr; + private String adressenavn; + private String adressetype; + private String tilleggsadresse; + private String postnummer; + private String valgkrets; + private String postadresse1; + private String postadresse2; + private String postadresse3; + private String postadresseLand; + private String innvandretFraLand; + private String fraLandRegdato; + private String fraLandFlyttedato; + private String fraKommune; + private String fraKommRegdato; + private String fraKommFlyttedato; + private String utvandretTilLand; + private String tilLandRegdato; + private String tilLandFlyttedato; + private String samemanntall; + private String datoSamemanntall; + private String umyndiggjort; + private String datoUmyndiggjort; + private String foreldreansvar; + private String datoForeldreansvar; + private String arbeidstillatelse; + private String datoArbeidstillatelse; + private String fremkonnummer; + private String morsFodselsdato; + private String morsPersonnummer; + private String morsNavn; + private String morsStatsbSkap; + private String farsFodselsdato; + private String farsPersonnummer; + private String farsNavn; + private String farsStatsbSkap; + private String tidligereFnrDnr; + private String datoTidlFnrDnr; + private String nyttFnr; + private String datoNyttFnr; + private String levendeDoed; + private String kjoenn; + private String tildelingskode; + private String foedselstype; + private String morsSivilstand; + private String ekteskapPartnerskapNr; + private String ektefelleEkteskapPartnerskapNr; + private String vigselstype; + private String forsByrde; + private String dombevilling; + private String antallBarn; + private String tidligereSivilstand; + private String ektefelleTidligereSivilstand; + private String hjemmel; + private String fylke; + private String vigselskommune; + private String tidlSepDomBev; + private String begjertAv; + private String registrGrunnlag; + private String doedssted; + private String typeDoedssted; + private String vigselsdato; + private String medlKirken; + private String sekvensnr; + private String bolignr; + private String dufId; + private String brukerident; + private String skolerets; + private String tkNr; + private String dnrHjemlandsadresse1; + private String dnrHjemlandsadresse2; + private String dnrHjemlandsadresse3; + private String dnrHjemlandLandkode; + private String dnrHjemlandRegDato; + private String dnrIdKontroll; + private String postadrRegDato; + private String utvandringstype; + private String grunnkrets; + private String statsborgerskap2; + private String regdatoStatsb2; + private String statsborgerskap3; + private String regdatoStatsb3; + private String statsborgerskap4; + private String regdatoStatsb4; + private String statsborgerskap5; + private String regdatoStatsb5; + private String statsborgerskap6; + private String regdatoStatsb6; + private String statsborgerskap7; + private String regdatoStatsb7; + private String statsborgerskap8; + private String regdatoStatsb8; + private String statsborgerskap9; + private String regdatoStatsb9; + private String statsborgerskap10; + private String regdatoStatsb10; + private String bibehold; + private String regdatoBibehold; + private String saksid; + private String embete; + private String sakstype; + private String vedtaksdato; + private String internVergeid; + private String vergeFnrDnr; + private String vergetype; + private String mandattype; + private String mandatTekst; + private String reserverFramtidigBruk; + + @Override + public String toString() { + StringBuilder skdMelding = new StringBuilder(); + if (header != null) { + skdMelding.append(header); + } + + SkdFeltDefinisjonerTrans1.getAllFeltDefinisjonerInSortedList().forEach(skdFeltDefinisjon -> { + String parameterverdien = getMeldingsverdien(skdFeltDefinisjon); + skdMelding.append(parameterverdien == null ? + skdFeltDefinisjon.getDefaultVerdi() : addDefaultValueToEndOfString(parameterverdien, skdFeltDefinisjon)); + }); + + return skdMelding.toString(); + } + + private String addDefaultValueToEndOfString(String parameterverdien, SkdFeltDefinisjonerTrans1 skdFeltDefinisjon) { + if (!skdFeltDefinisjon.isValueLastInSkdField()) { + return parameterverdien.substring(0, min(parameterverdien.length(), skdFeltDefinisjon.getAntallBytesAvsatt())) + + skdFeltDefinisjon.getDefaultVerdi().substring(min(skdFeltDefinisjon.getAntallBytesAvsatt(), parameterverdien.length())); + } else { + return skdFeltDefinisjon.getDefaultVerdi().substring(0, + (skdFeltDefinisjon.getDefaultVerdi().length() - parameterverdien.length())) + parameterverdien; + } + } + + public String getMeldingsverdien(SkdFeltDefinisjonerTrans1 skdFeltDefinisjon) { + try { + return ((String) getClass().getMethod("get" + StringUtils.capitalize(skdFeltDefinisjon.getVariabelNavn())) + .invoke(this)); + } catch (NoSuchMethodException | InvocationTargetException | IllegalAccessException e) { + throw new ResponseStatusException(HttpStatus.INTERNAL_SERVER_ERROR, e.getMessage(), e); + } + } +} diff --git a/apps/tps-messaging-service/src/main/java/no/nav/testnav/apps/tpsmessagingservice/dto/endringsmeldinger/SkdMeldingsheader.java b/apps/tps-messaging-service/src/main/java/no/nav/testnav/apps/tpsmessagingservice/dto/endringsmeldinger/SkdMeldingsheader.java new file mode 100644 index 00000000000..a086d58bc06 --- /dev/null +++ b/apps/tps-messaging-service/src/main/java/no/nav/testnav/apps/tpsmessagingservice/dto/endringsmeldinger/SkdMeldingsheader.java @@ -0,0 +1,51 @@ +package no.nav.testnav.apps.tpsmessagingservice.dto.endringsmeldinger; + +import lombok.experimental.UtilityClass; + +@UtilityClass +public class SkdMeldingsheader { + + private static final String KJORE_NUMMER = "000004421"; + private static final String KODE_SYSTEM = "TPSF"; + private static final String MQ_HANDLE = "000000000"; + private static final String SKD_REFERANSE = WhitespaceConstants.WHITESPACE_20_STK; + + private static final int INDEX_START_TILDELINGSKODE = 873; + private static final int INDEX_SLUTT_TILDELINGSKODE = 874; + + private static final int INDEX_START_AARSAKSKODE = 26; + private static final int INDEX_SLUTT_AARSAKSKODE = 28; + + private static final int INDEX_START_TRANSTYPE = 25; + private static final int INDEX_SLUTT_TRANSTYPE = 26; + + public String appendHeader(String skdMelding) { + + var aarsakskode = extractAArsakskode(skdMelding); + var transType = extractTranstype(skdMelding); + var tildelingsKode = extractTildelingskode(skdMelding); + + return new StringBuilder() + .append(MQ_HANDLE) + .append(KODE_SYSTEM) + .append(KJORE_NUMMER) + .append(aarsakskode) + .append(transType) + .append(tildelingsKode) + .append(SKD_REFERANSE) + .append(skdMelding) + .toString(); + } + + private String extractAArsakskode(String skdMelding) { + return skdMelding.length() > INDEX_SLUTT_AARSAKSKODE ? skdMelding.substring(INDEX_START_AARSAKSKODE, INDEX_SLUTT_AARSAKSKODE) : " "; + } + + private String extractTranstype(String skdMelding) { + return skdMelding.length() > INDEX_SLUTT_TRANSTYPE ? skdMelding.substring(INDEX_START_TRANSTYPE, INDEX_SLUTT_TRANSTYPE) : " "; + } + + private String extractTildelingskode(String skdMelding) { + return skdMelding.length() > INDEX_SLUTT_TILDELINGSKODE ? skdMelding.substring(INDEX_START_TILDELINGSKODE, INDEX_SLUTT_TILDELINGSKODE) : "0"; + } +} diff --git a/apps/tps-messaging-service/src/main/java/no/nav/testnav/apps/tpsmessagingservice/dto/endringsmeldinger/WhitespaceConstants.java b/apps/tps-messaging-service/src/main/java/no/nav/testnav/apps/tpsmessagingservice/dto/endringsmeldinger/WhitespaceConstants.java new file mode 100644 index 00000000000..ebf9421ca8e --- /dev/null +++ b/apps/tps-messaging-service/src/main/java/no/nav/testnav/apps/tpsmessagingservice/dto/endringsmeldinger/WhitespaceConstants.java @@ -0,0 +1,21 @@ +package no.nav.testnav.apps.tpsmessagingservice.dto.endringsmeldinger; + +import lombok.experimental.UtilityClass; + +@UtilityClass +public final class WhitespaceConstants { + + public static final String WHITESPACE_5_STK = " "; + public static final String WHITESPACE_10_STK = WHITESPACE_5_STK + WHITESPACE_5_STK; + public static final String WHITESPACE_20_STK = WHITESPACE_10_STK + WHITESPACE_10_STK; + public static final String WHITESPACE_25_STK = WHITESPACE_5_STK + WHITESPACE_20_STK; + public static final String WHITESPACE_40_STK = WHITESPACE_20_STK + WHITESPACE_20_STK; + public static final String WHITESPACE_30_STK = WHITESPACE_5_STK + WHITESPACE_25_STK; + public static final String WHITESPACE_50_STK = WHITESPACE_25_STK + WHITESPACE_25_STK; + public static final String WHITESPACE_100_STK = WHITESPACE_50_STK + WHITESPACE_50_STK; + + public static final String FIVE_OES = "00000"; + public static final String SIX_OES = "000000"; + public static final String DUMMY_DATO = "00000000"; + public static final String DUMMY_IDENT = "00000000000"; +} diff --git a/apps/tps-messaging-service/src/main/java/no/nav/testnav/apps/tpsmessagingservice/mapper/AdresseMappingStrategy.java b/apps/tps-messaging-service/src/main/java/no/nav/testnav/apps/tpsmessagingservice/mapper/AdresseMappingStrategy.java index dcd08fd69ec..bc2309a2c91 100644 --- a/apps/tps-messaging-service/src/main/java/no/nav/testnav/apps/tpsmessagingservice/mapper/AdresseMappingStrategy.java +++ b/apps/tps-messaging-service/src/main/java/no/nav/testnav/apps/tpsmessagingservice/mapper/AdresseMappingStrategy.java @@ -17,8 +17,6 @@ import java.time.LocalDateTime; import static java.util.Objects.nonNull; -import static no.nav.testnav.libs.data.tpsmessagingservice.v1.AdresseDTO.Adressetype.GATE; -import static no.nav.testnav.libs.data.tpsmessagingservice.v1.AdresseDTO.Adressetype.MATR; @Component public class AdresseMappingStrategy implements MappingStrategy { @@ -70,7 +68,6 @@ public void mapAtoB(BoAdresseType source, GateadresseDTO target, MappingContext target.setHusnummer(skipLeadZeros(source.getOffAdresse().getHusnr())); target.setGatekode(source.getOffAdresse().getGatekode()); target.setFlyttedato(getDate(source.getDatoFom())); - target.setAdressetype(GATE); } }) .byDefault() @@ -87,7 +84,6 @@ public void mapAtoB(BoAdresseType source, MatrikkeladresseDTO target, MappingCon target.setFestenr(skipLeadZeros(source.getMatrAdresse().getFestenr())); target.setUndernr(skipLeadZeros(source.getMatrAdresse().getUndernr())); target.setFlyttedato(getDate(source.getDatoFom())); - target.setAdressetype(MATR); } }) .byDefault() diff --git a/apps/tps-messaging-service/src/main/java/no/nav/testnav/apps/tpsmessagingservice/mapper/LocalDateCustomMapping.java b/apps/tps-messaging-service/src/main/java/no/nav/testnav/apps/tpsmessagingservice/mapper/LocalDateCustomMapping.java new file mode 100644 index 00000000000..a3dbe79577d --- /dev/null +++ b/apps/tps-messaging-service/src/main/java/no/nav/testnav/apps/tpsmessagingservice/mapper/LocalDateCustomMapping.java @@ -0,0 +1,30 @@ +package no.nav.testnav.apps.tpsmessagingservice.mapper; + +import lombok.extern.slf4j.Slf4j; +import ma.glasnost.orika.MappingContext; +import ma.glasnost.orika.converter.BidirectionalConverter; +import ma.glasnost.orika.metadata.Type; +import org.springframework.stereotype.Component; + +import java.time.LocalDate; +import java.time.format.DateTimeFormatter; + +import static java.util.Objects.nonNull; +import static org.apache.commons.lang3.StringUtils.isNotBlank; + +@Slf4j +@Component +public class LocalDateCustomMapping extends BidirectionalConverter { + + @Override + public LocalDate convertTo(String localDate, Type type, MappingContext mappingContext) { + + return isNotBlank(localDate) ? LocalDate.parse(localDate) : null; + } + + @Override + public String convertFrom(LocalDate localDate, Type type, MappingContext mappingContext) { + + return nonNull(localDate) ? localDate.format(DateTimeFormatter.ISO_LOCAL_DATE) : null; + } +} \ No newline at end of file diff --git a/apps/tps-messaging-service/src/main/java/no/nav/testnav/apps/tpsmessagingservice/mapper/LocalDateTimeCustomMapping.java b/apps/tps-messaging-service/src/main/java/no/nav/testnav/apps/tpsmessagingservice/mapper/LocalDateTimeCustomMapping.java new file mode 100644 index 00000000000..4ce8f381e6a --- /dev/null +++ b/apps/tps-messaging-service/src/main/java/no/nav/testnav/apps/tpsmessagingservice/mapper/LocalDateTimeCustomMapping.java @@ -0,0 +1,37 @@ +package no.nav.testnav.apps.tpsmessagingservice.mapper; + +import lombok.extern.slf4j.Slf4j; +import ma.glasnost.orika.MappingContext; +import ma.glasnost.orika.converter.BidirectionalConverter; +import ma.glasnost.orika.metadata.Type; +import org.springframework.stereotype.Component; + +import java.time.LocalDate; +import java.time.LocalDateTime; +import java.time.format.DateTimeFormatter; + +import static java.util.Objects.nonNull; +import static org.apache.commons.lang3.StringUtils.isBlank; + +@Slf4j +@Component +public class LocalDateTimeCustomMapping extends BidirectionalConverter { + + @Override + public LocalDateTime convertTo(String localDateTime, Type type, MappingContext mappingContext) { + + if (isBlank(localDateTime)) { + return null; + } + + return localDateTime.length() == 10 ? + LocalDate.parse(localDateTime).atStartOfDay() : + LocalDateTime.parse(localDateTime); + } + + @Override + public String convertFrom(LocalDateTime localDateTime, Type type, MappingContext mappingContext) { + + return nonNull(localDateTime) ? localDateTime.format(DateTimeFormatter.ISO_LOCAL_DATE_TIME) : null; + } +} \ No newline at end of file diff --git a/apps/tps-messaging-service/src/main/java/no/nav/testnav/apps/tpsmessagingservice/provider/v1/PersonController.java b/apps/tps-messaging-service/src/main/java/no/nav/testnav/apps/tpsmessagingservice/provider/v1/PersonController.java index 12f77f44f1c..db20e8fe24f 100644 --- a/apps/tps-messaging-service/src/main/java/no/nav/testnav/apps/tpsmessagingservice/provider/v1/PersonController.java +++ b/apps/tps-messaging-service/src/main/java/no/nav/testnav/apps/tpsmessagingservice/provider/v1/PersonController.java @@ -2,13 +2,23 @@ import lombok.RequiredArgsConstructor; import no.nav.testnav.apps.tpsmessagingservice.dto.TpsMeldingResponse; +import no.nav.testnav.apps.tpsmessagingservice.service.AdressehistorikkService; import no.nav.testnav.apps.tpsmessagingservice.service.BankkontoNorskService; import no.nav.testnav.apps.tpsmessagingservice.service.BankkontoUtlandService; +import no.nav.testnav.apps.tpsmessagingservice.service.DoedsmeldingService; import no.nav.testnav.apps.tpsmessagingservice.service.EgenansattService; +import no.nav.testnav.apps.tpsmessagingservice.service.FoedselsmeldingService; import no.nav.testnav.apps.tpsmessagingservice.service.PersonService; import no.nav.testnav.apps.tpsmessagingservice.service.SpraakService; import no.nav.testnav.libs.data.kontoregister.v1.BankkontonrNorskDTO; import no.nav.testnav.libs.data.kontoregister.v1.BankkontonrUtlandDTO; +import no.nav.testnav.libs.data.tpsmessagingservice.v1.AdressehistorikkDTO; +import no.nav.testnav.libs.data.tpsmessagingservice.v1.AdressehistorikkRequest; +import no.nav.testnav.libs.data.tpsmessagingservice.v1.DoedsmeldingRequest; +import no.nav.testnav.libs.data.tpsmessagingservice.v1.DoedsmeldingResponse; +import no.nav.testnav.libs.data.tpsmessagingservice.v1.FoedselsmeldingRequest; +import no.nav.testnav.libs.data.tpsmessagingservice.v1.FoedselsmeldingResponse; +import no.nav.testnav.libs.data.tpsmessagingservice.v1.PersonDTO; import no.nav.testnav.libs.data.tpsmessagingservice.v1.PersonMiljoeDTO; import no.nav.testnav.libs.data.tpsmessagingservice.v1.SpraakDTO; import no.nav.testnav.libs.data.tpsmessagingservice.v1.TpsMeldingResponseDTO; @@ -27,6 +37,7 @@ import java.util.Map; import static java.util.Collections.emptyList; +import static java.util.Objects.isNull; import static java.util.Objects.nonNull; @RestController @@ -39,6 +50,9 @@ public class PersonController { private final SpraakService spraakService; private final BankkontoUtlandService bankkontoUtlandService; private final BankkontoNorskService bankkontoNorskService; + private final AdressehistorikkService adressehistorikkService; + private final FoedselsmeldingService foedselsmeldingService; + private final DoedsmeldingService doedsmeldingService; private static List convert(Map tpsMeldingDTO) { @@ -113,5 +127,33 @@ public List opphoerBankkontonrUtland(@PathVariable String return convert(bankkontoUtlandService.opphoerBankkontonrUtland(ident, miljoer)); } + + @PostMapping("/adressehistorikk") + public List personhistorikk(@RequestBody AdressehistorikkRequest request, + @RequestParam(required = false) List miljoer) { + + return adressehistorikkService.hentHistorikk(request, isNull(miljoer) ? emptyList() : miljoer); + } + + @PostMapping("/foedselsmelding") + public FoedselsmeldingResponse sendFoedselsmelding(@RequestParam(required = false) List miljoer, + @RequestBody FoedselsmeldingRequest persondata) { + + return foedselsmeldingService.sendFoedselsmelding(persondata, isNull(miljoer) ? emptyList() : miljoer); + } + + @PostMapping("/doedsmelding") + public DoedsmeldingResponse sendDoedsmelding(@RequestBody DoedsmeldingRequest request, + @RequestParam(required = false) List miljoer) { + + return doedsmeldingService.sendDoedsmelding(request, isNull(miljoer) ? emptyList() : miljoer); + } + + @DeleteMapping("/doedsmelding") + public DoedsmeldingResponse annulerDoedsmelding(@RequestParam(required = false) List miljoer, + @RequestBody PersonDTO persondata) { + + return doedsmeldingService.annulerDoedsmelding(persondata, isNull(miljoer) ? emptyList() : miljoer); + } } diff --git a/apps/tps-messaging-service/src/main/java/no/nav/testnav/apps/tpsmessagingservice/service/AdressehistorikkService.java b/apps/tps-messaging-service/src/main/java/no/nav/testnav/apps/tpsmessagingservice/service/AdressehistorikkService.java new file mode 100644 index 00000000000..894b4418dd6 --- /dev/null +++ b/apps/tps-messaging-service/src/main/java/no/nav/testnav/apps/tpsmessagingservice/service/AdressehistorikkService.java @@ -0,0 +1,130 @@ +package no.nav.testnav.apps.tpsmessagingservice.service; + +import com.fasterxml.jackson.databind.ObjectMapper; +import jakarta.xml.bind.JAXBContext; +import jakarta.xml.bind.JAXBException; +import lombok.SneakyThrows; +import lombok.extern.slf4j.Slf4j; +import ma.glasnost.orika.MapperFacade; +import no.nav.testnav.apps.tpsmessagingservice.consumer.ServicerutineConsumer; +import no.nav.testnav.apps.tpsmessagingservice.consumer.TestmiljoerServiceConsumer; +import no.nav.testnav.apps.tpsmessagingservice.consumer.command.TpsMeldingCommand; +import no.nav.testnav.apps.tpsmessagingservice.dto.TpsServicerutineAksjonsdatoRequest; +import no.nav.testnav.apps.tpsmessagingservice.dto.TpsServicerutineS018Response; +import no.nav.testnav.apps.tpsmessagingservice.utils.EndringsmeldingUtil; +import no.nav.testnav.apps.tpsmessagingservice.utils.ResponseStatus; +import no.nav.testnav.apps.tpsmessagingservice.utils.ServiceRutineUtil; +import no.nav.testnav.libs.data.tpsmessagingservice.v1.AdressehistorikkDTO; +import no.nav.testnav.libs.data.tpsmessagingservice.v1.AdressehistorikkRequest; +import no.nav.tps.xjc.ctg.domain.s018.S018PersonType; +import no.nav.tps.xjc.ctg.domain.s018.SRnavnType; +import org.json.XML; +import org.springframework.stereotype.Service; + +import java.time.LocalDate; +import java.time.format.DateTimeFormatter; +import java.util.List; +import java.util.Map; +import java.util.stream.Collectors; + +import static java.util.Objects.nonNull; + +@Slf4j +@Service +public class AdressehistorikkService { + + private final TestmiljoerServiceConsumer testmiljoerServiceConsumer; + private final JAXBContext requestContext; + private final ServicerutineConsumer servicerutineConsumer; + private final MapperFacade mapperFacade; + private final ObjectMapper objectMapper; + + public AdressehistorikkService(TestmiljoerServiceConsumer testmiljoerServiceConsumer, + ServicerutineConsumer servicerutineConsumer, + MapperFacade mapperFacade, + ObjectMapper objectMapper) throws JAXBException { + + this.testmiljoerServiceConsumer = testmiljoerServiceConsumer; + this.requestContext = JAXBContext.newInstance(TpsServicerutineAksjonsdatoRequest.class); + this.servicerutineConsumer = servicerutineConsumer; + this.mapperFacade = mapperFacade; + this.objectMapper = objectMapper; + } + + public List hentHistorikk(AdressehistorikkRequest request, List miljoer) { + + if (miljoer.isEmpty()) { + miljoer = testmiljoerServiceConsumer.getMiljoer(); + } + + var tpsPersoner = readFromTps(request.getIdent(), + nonNull(request.getAksjonsdato()) ? request.getAksjonsdato() : LocalDate.now(), + miljoer); + + return tpsPersoner.entrySet().stream() + .map(entry -> { + var status = ResponseStatus.decodeStatus(nonNull(entry.getValue()) && + nonNull(entry.getValue().getTpsPersonData()) ? + entry.getValue().getTpsPersonData().getTpsSvar().getSvarStatus() : null); + return AdressehistorikkDTO.builder() + .miljoe(entry.getKey()) + .status(mapperFacade.map(status, AdressehistorikkDTO.TpsMeldingResponse.class)) + .persondata("OK".equals(status.getReturStatus()) ? + mapAdressehistorikk(request.getIdent(), + entry.getValue().getTpsPersonData().getTpsSvar().getPersonDataS018()) : + null) + .build(); + }) + .toList(); + } + + private AdressehistorikkDTO.PersonData mapAdressehistorikk(String ident, S018PersonType persondataS18) { + + var persondata = mapperFacade.map(persondataS18, AdressehistorikkDTO.PersonData.class); + persondata.setIdent(ident); + return persondata; + } + + private Map readFromTps(String ident, LocalDate foedselsdato, List miljoer) { + + var request = TpsServicerutineAksjonsdatoRequest.builder() + .tpsServiceRutine(TpsServicerutineAksjonsdatoRequest.TpsServiceRutineMedAksjonsdato.builder() + .serviceRutinenavn(SRnavnType.FS_03_FDNUMMER_PADRHIST_O.value()) + .fnr(ident) + .aksjonsKode("A") + .aksjonsKode2("0") + .aksjonsDato(foedselsdato.format(DateTimeFormatter.ofPattern("yyyy-MM-dd"))) + .build()) + .build(); + + var xmlRequest = ServiceRutineUtil.marshallToXML(requestContext, request); + + var miljoerResponse = servicerutineConsumer.sendMessage(xmlRequest, miljoer); + + miljoerResponse.forEach((key, value) -> log.info("Miljø: {} XML: {}", key, value)); + + return miljoerResponse.entrySet().stream() + .collect(Collectors.toMap(Map.Entry::getKey, + entry -> unmarshallFromXml(entry.getValue()))); + } + + @SneakyThrows + private TpsServicerutineS018Response unmarshallFromXml(String endringsmeldingResponse) { + + if (TpsMeldingCommand.NO_RESPONSE.equals(endringsmeldingResponse)) { + + return TpsServicerutineS018Response.builder() + .tpsPersonData(TpsServicerutineS018Response.TpsPersonData.builder() + .tpsSvar(TpsServicerutineS018Response.TpsSvar.builder() + .svarStatus(EndringsmeldingUtil.getNoAnswerStatus()) + .build()) + .build()) + .build(); + + } else { + + var jsonRoot = XML.toJSONObject(endringsmeldingResponse); + return objectMapper.readValue(jsonRoot.toString(), TpsServicerutineS018Response.class); + } + } +} diff --git a/apps/tps-messaging-service/src/main/java/no/nav/testnav/apps/tpsmessagingservice/service/DoedsmeldingService.java b/apps/tps-messaging-service/src/main/java/no/nav/testnav/apps/tpsmessagingservice/service/DoedsmeldingService.java new file mode 100644 index 00000000000..2c6c68133c5 --- /dev/null +++ b/apps/tps-messaging-service/src/main/java/no/nav/testnav/apps/tpsmessagingservice/service/DoedsmeldingService.java @@ -0,0 +1,68 @@ +package no.nav.testnav.apps.tpsmessagingservice.service; + +import lombok.RequiredArgsConstructor; +import lombok.extern.slf4j.Slf4j; +import no.nav.testnav.apps.tpsmessagingservice.consumer.TestmiljoerServiceConsumer; +import no.nav.testnav.apps.tpsmessagingservice.service.skd.DoedsmeldingAnnulleringBuilderService; +import no.nav.testnav.apps.tpsmessagingservice.service.skd.DoedsmeldingBuilderService; +import no.nav.testnav.apps.tpsmessagingservice.service.skd.SendSkdMeldinger; +import no.nav.testnav.apps.tpsmessagingservice.utils.ResponseStatus; +import no.nav.testnav.libs.data.tpsmessagingservice.v1.DoedsmeldingRequest; +import no.nav.testnav.libs.data.tpsmessagingservice.v1.DoedsmeldingResponse; +import no.nav.testnav.libs.data.tpsmessagingservice.v1.PersonDTO; +import org.springframework.stereotype.Service; + +import java.util.List; +import java.util.Map; + +@Slf4j +@Service +@RequiredArgsConstructor +public class DoedsmeldingService { + + private final SendSkdMeldinger sendSkdMeldinger; + private final DoedsmeldingBuilderService doedsmeldingBuilderService; + private final DoedsmeldingAnnulleringBuilderService doedsmeldingAnnulleringBuilderService; + private final TestmiljoerServiceConsumer testmiljoerServiceConsumer; + + public DoedsmeldingResponse sendDoedsmelding(DoedsmeldingRequest request, List miljoer) { + + if (miljoer.isEmpty()) { + miljoer = testmiljoerServiceConsumer.getMiljoer(); + } + + var skdMelding = doedsmeldingBuilderService.build(request); + + var miljoerStatus = sendSkdMeldinger.sendMeldinger(skdMelding.toString(), miljoer); + prepareStatus(miljoerStatus); + + return DoedsmeldingResponse.builder() + .ident(request.getIdent()) + .miljoStatus(miljoerStatus) + .build(); + } + + public DoedsmeldingResponse annulerDoedsmelding(PersonDTO person, List miljoer) { + + if (miljoer.isEmpty()) { + miljoer = testmiljoerServiceConsumer.getMiljoer(); + } + + var skdMelding = doedsmeldingAnnulleringBuilderService.execute(person); + + var miljoerStatus = sendSkdMeldinger.sendMeldinger(skdMelding.toString(), miljoer); + prepareStatus(miljoerStatus); + + return DoedsmeldingResponse.builder() + .ident(person.getIdent()) + .miljoStatus(miljoerStatus) + .build(); + } + + private void prepareStatus(Map sentStatus) { + + sentStatus.forEach((env, status) -> log.info("Doedsmelding i miljø {} status {} ", env, status)); + + sentStatus.replaceAll((env, status) -> status.matches("^00.*") ? "OK" : ResponseStatus.extract(status)); + } +} \ No newline at end of file diff --git a/apps/tps-messaging-service/src/main/java/no/nav/testnav/apps/tpsmessagingservice/service/FoedselsmeldingService.java b/apps/tps-messaging-service/src/main/java/no/nav/testnav/apps/tpsmessagingservice/service/FoedselsmeldingService.java new file mode 100644 index 00000000000..d29c5cf2b3b --- /dev/null +++ b/apps/tps-messaging-service/src/main/java/no/nav/testnav/apps/tpsmessagingservice/service/FoedselsmeldingService.java @@ -0,0 +1,44 @@ +package no.nav.testnav.apps.tpsmessagingservice.service; + +import lombok.RequiredArgsConstructor; +import no.nav.testnav.apps.tpsmessagingservice.consumer.TestmiljoerServiceConsumer; +import no.nav.testnav.apps.tpsmessagingservice.service.skd.FoedselsmeldingBuilderService; +import no.nav.testnav.apps.tpsmessagingservice.service.skd.SendSkdMeldinger; +import no.nav.testnav.apps.tpsmessagingservice.utils.ResponseStatus; +import no.nav.testnav.libs.data.tpsmessagingservice.v1.FoedselsmeldingRequest; +import no.nav.testnav.libs.data.tpsmessagingservice.v1.FoedselsmeldingResponse; +import org.springframework.stereotype.Service; + +import java.util.List; +import java.util.Map; + +@Service +@RequiredArgsConstructor +public class FoedselsmeldingService { + + private final SendSkdMeldinger sendSkdMeldinger; + private final FoedselsmeldingBuilderService foedselsmeldingBuilderService; + private final TestmiljoerServiceConsumer testmiljoerServiceConsumer; + + public FoedselsmeldingResponse sendFoedselsmelding(FoedselsmeldingRequest persondata, List miljoer) { + + if (miljoer.isEmpty()) { + miljoer = testmiljoerServiceConsumer.getMiljoer(); + } + + var skdMelding = foedselsmeldingBuilderService.build(persondata); + + var miljoerStatus = sendSkdMeldinger.sendMeldinger(skdMelding.toString(), miljoer); + prepareStatus(miljoerStatus); + + return FoedselsmeldingResponse.builder() + .ident(persondata.getBarn().getIdent()) + .miljoStatus(miljoerStatus) + .build(); + } + + private void prepareStatus(Map sentStatus) { + + sentStatus.replaceAll((env, status) -> status.matches("^00.*") ? "OK" : ResponseStatus.extract(status)); + } +} diff --git a/apps/tps-messaging-service/src/main/java/no/nav/testnav/apps/tpsmessagingservice/service/IdentService.java b/apps/tps-messaging-service/src/main/java/no/nav/testnav/apps/tpsmessagingservice/service/IdentService.java index 01ca63330be..ea4dfcb36d3 100644 --- a/apps/tps-messaging-service/src/main/java/no/nav/testnav/apps/tpsmessagingservice/service/IdentService.java +++ b/apps/tps-messaging-service/src/main/java/no/nav/testnav/apps/tpsmessagingservice/service/IdentService.java @@ -94,11 +94,11 @@ private Map readFromTps(List ident var xmlRequest = prepareRequest(identer, isProd); - log.trace("M201 request: {}", xmlRequest); + log.info("M201 request: {}", xmlRequest); var miljoerResponse = servicerutineConsumer.sendMessage(xmlRequest, miljoer); - miljoerResponse.forEach((key, value) -> log.trace("Miljø: {} XML: {}", key, value)); + miljoerResponse.forEach((key, value) -> log.info("Miljø: {} XML: {}", key, value)); return miljoerResponse.entrySet().parallelStream() .collect(Collectors.toMap(Map.Entry::getKey, @@ -130,9 +130,9 @@ private String prepareRequest(List identer, boolean isProd) { "A" + "%s%s%s" .formatted(isProd ? "2" : "0", - Integer.toString(identer.size()), - identer.stream() - .map("%s"::formatted) - .collect(Collectors.joining())); + Integer.toString(identer.size()), + identer.stream() + .map("%s"::formatted) + .collect(Collectors.joining())); } } diff --git a/apps/tps-messaging-service/src/main/java/no/nav/testnav/apps/tpsmessagingservice/service/PersonService.java b/apps/tps-messaging-service/src/main/java/no/nav/testnav/apps/tpsmessagingservice/service/PersonService.java index feb02f5a0bf..469fdad6989 100644 --- a/apps/tps-messaging-service/src/main/java/no/nav/testnav/apps/tpsmessagingservice/service/PersonService.java +++ b/apps/tps-messaging-service/src/main/java/no/nav/testnav/apps/tpsmessagingservice/service/PersonService.java @@ -14,7 +14,6 @@ import no.nav.testnav.apps.tpsmessagingservice.consumer.TestmiljoerServiceConsumer; import no.nav.testnav.apps.tpsmessagingservice.consumer.command.TpsMeldingCommand; import no.nav.testnav.apps.tpsmessagingservice.dto.TpsMeldingResponse; -import no.nav.testnav.apps.tpsmessagingservice.dto.TpsServiceRutine; import no.nav.testnav.apps.tpsmessagingservice.dto.TpsServicerutineRequest; import no.nav.testnav.apps.tpsmessagingservice.dto.TpsServicerutineS610Response; import no.nav.testnav.apps.tpsmessagingservice.utils.EndringsmeldingUtil; @@ -57,8 +56,11 @@ public class PersonService { private final ObjectMapper objectMapper; private final MapperFacade mapperFacade; - public PersonService(ServicerutineConsumer servicerutineConsumer, ObjectMapper objectMapper, - MapperFacade mapperFacade, TestmiljoerServiceConsumer testmiljoerServiceConsumer) throws JAXBException { + public PersonService(ServicerutineConsumer servicerutineConsumer, + ObjectMapper objectMapper, + MapperFacade mapperFacade, + TestmiljoerServiceConsumer testmiljoerServiceConsumer) throws JAXBException { + this.servicerutineConsumer = servicerutineConsumer; this.objectMapper = objectMapper; this.mapperFacade = mapperFacade; @@ -165,7 +167,7 @@ public TpsServicerutineS610Response unmarshallFromXml(String endringsmeldingResp private Map readFromTps(String ident, List miljoer) { var request = TpsServicerutineRequest.builder() - .tpsServiceRutine(TpsServiceRutine.builder() + .tpsServiceRutine(TpsServicerutineRequest.TpsServiceRutine.builder() .serviceRutinenavn(PERSON_KERNINFO_SERVICE_ROUTINE) .fnr(ident) .aksjonsKode("D") @@ -204,6 +206,7 @@ public List getPerson(String ident, List miljoer) { var personerMedRelasjoner = buildMiljoePersonWithRelasjon(relasjoner).entrySet().stream() .map(entry -> PersonMiljoeDTO.builder() + .ident(ident) .miljoe(entry.getKey()) .status("OK") .person(entry.getValue()) diff --git a/apps/tps-messaging-service/src/main/java/no/nav/testnav/apps/tpsmessagingservice/service/skd/AdresseAppenderService.java b/apps/tps-messaging-service/src/main/java/no/nav/testnav/apps/tpsmessagingservice/service/skd/AdresseAppenderService.java new file mode 100644 index 00000000000..3eed3029390 --- /dev/null +++ b/apps/tps-messaging-service/src/main/java/no/nav/testnav/apps/tpsmessagingservice/service/skd/AdresseAppenderService.java @@ -0,0 +1,107 @@ +package no.nav.testnav.apps.tpsmessagingservice.service.skd; + +import lombok.RequiredArgsConstructor; +import no.nav.testnav.apps.tpsmessagingservice.dto.endringsmeldinger.SkdMeldingTrans1; +import no.nav.testnav.apps.tpsmessagingservice.utils.ConvertDateToStringUtility; +import no.nav.testnav.apps.tpsmessagingservice.utils.HentDatoFraIdentUtility; +import no.nav.testnav.apps.tpsmessagingservice.utils.HusbokstavEncoder; +import no.nav.testnav.apps.tpsmessagingservice.utils.LandkodeEncoder; +import no.nav.testnav.apps.tpsmessagingservice.utils.NullcheckUtil; +import no.nav.testnav.libs.data.tpsmessagingservice.v1.AdresseDTO; +import no.nav.testnav.libs.data.tpsmessagingservice.v1.GateadresseDTO; +import no.nav.testnav.libs.data.tpsmessagingservice.v1.MatrikkeladresseDTO; +import no.nav.testnav.libs.data.tpsmessagingservice.v1.PersonDTO; +import org.apache.commons.lang3.StringUtils; +import org.springframework.stereotype.Service; + +import java.util.regex.Pattern; + +import static java.lang.String.format; +import static java.util.Objects.nonNull; +import static no.nav.testnav.apps.tpsmessagingservice.utils.HentDatoFraIdentUtility.enforceValidTpsDate; +import static org.apache.commons.lang3.StringUtils.isNotBlank; + +@Service +@RequiredArgsConstructor +public class AdresseAppenderService { + + private static final Pattern HUSNUMMER_PATTERN = Pattern.compile("(\\d+)"); + private static final Pattern HUSBOKSTAV_PATTERN = Pattern.compile("([A-ZÆØÅÁ])"); + + public void execute(SkdMeldingTrans1 skdMeldingTrans1, PersonDTO person) { + + /* Boadresse */ + if (nonNull(person.getBoadresse())) { + + if (AdresseDTO.Adressetype.GATE == person.getBoadresse().getAdressetype()) { + + var gateadresse = (GateadresseDTO) person.getBoadresse(); + skdMeldingTrans1.setAdressetype("O"); + skdMeldingTrans1.setGateGaard(fixGatekode(gateadresse.getGatekode())); + addHusBrukAndBokstavFestenr(skdMeldingTrans1, gateadresse); + skdMeldingTrans1.setAdressenavn(StringUtils.abbreviate(gateadresse.getAdresse(), 25)); + skdMeldingTrans1.setKommunenummer(gateadresse.getKommunenr()); + skdMeldingTrans1.setPostnummer(gateadresse.getPostnr()); + skdMeldingTrans1.setTilleggsadresse(gateadresse.getTilleggsadresse()); + skdMeldingTrans1.setFlyttedatoAdr(ConvertDateToStringUtility.yyyyMMdd( + enforceValidTpsDate(NullcheckUtil.nullcheckSetDefaultValue(gateadresse.getFlyttedato(), + HentDatoFraIdentUtility.extract(person.getIdent()))))); + + } else if (AdresseDTO.Adressetype.MATR == person.getBoadresse().getAdressetype()) { + + var matrikkeladresse = (MatrikkeladresseDTO) person.getBoadresse(); + skdMeldingTrans1.setAdressetype("M"); + skdMeldingTrans1.setGateGaard(prepad(matrikkeladresse.getGardsnr(), 5)); + skdMeldingTrans1.setHusBruk(prepad(matrikkeladresse.getBruksnr(), 4)); + skdMeldingTrans1.setAdressenavn(matrikkeladresse.getMellomnavn()); + skdMeldingTrans1.setKommunenummer(matrikkeladresse.getKommunenr()); + skdMeldingTrans1.setPostnummer(matrikkeladresse.getPostnr()); + skdMeldingTrans1.setTilleggsadresse(matrikkeladresse.getTilleggsadresse()); + skdMeldingTrans1.setFlyttedatoAdr(ConvertDateToStringUtility.yyyyMMdd( + enforceValidTpsDate(NullcheckUtil.nullcheckSetDefaultValue(matrikkeladresse.getFlyttedato(), + HentDatoFraIdentUtility.extract(person.getIdent()))))); + } + + } else { + skdMeldingTrans1.setFlyttedatoAdr(ConvertDateToStringUtility.yyyyMMdd(enforceValidTpsDate( + HentDatoFraIdentUtility.extract(person.getIdent())))); + } + + /* Postadresse */ + if (nonNull(person.getPostadresse())) { + + var postadresse = person.getPostadresse(); + skdMeldingTrans1.setPostadresse1(postadresse.getPostLinje1()); + skdMeldingTrans1.setPostadresse2(postadresse.getPostLinje2()); + skdMeldingTrans1.setPostadresse3(postadresse.getPostLinje3()); + skdMeldingTrans1.setPostadresseLand(LandkodeEncoder.encode(postadresse.getPostLand())); + } + } + + private static String fixGatekode(String gatekode) { + + return format("%05d", isNotBlank(gatekode) ? Integer.parseInt(gatekode) : 0); + } + + private static String prepad(String value, int length) { + + var formatter = "%1$" + length + 's'; + return format(formatter, nonNull(value) ? value : '0').replace(' ', '0'); + } + + private void addHusBrukAndBokstavFestenr(SkdMeldingTrans1 skdMeldingTrans1, GateadresseDTO gateadresse) { + + if (isNotBlank(gateadresse.getHusnummer())) { + + var husbokstavMatcher = HUSBOKSTAV_PATTERN.matcher(gateadresse.getHusnummer()); + var husnummerMatcher = HUSNUMMER_PATTERN.matcher(gateadresse.getHusnummer()); + + if (husbokstavMatcher.find()) { + skdMeldingTrans1.setBokstavFestenr(HusbokstavEncoder.encode(husbokstavMatcher.group(1))); + } + if (husnummerMatcher.find()) { + skdMeldingTrans1.setHusBruk(husnummerMatcher.group(1)); + } + } + } +} diff --git a/apps/tps-messaging-service/src/main/java/no/nav/testnav/apps/tpsmessagingservice/service/skd/DoedsmeldingAnnulleringBuilderService.java b/apps/tps-messaging-service/src/main/java/no/nav/testnav/apps/tpsmessagingservice/service/skd/DoedsmeldingAnnulleringBuilderService.java new file mode 100644 index 00000000000..780b7ff4cff --- /dev/null +++ b/apps/tps-messaging-service/src/main/java/no/nav/testnav/apps/tpsmessagingservice/service/skd/DoedsmeldingAnnulleringBuilderService.java @@ -0,0 +1,54 @@ +package no.nav.testnav.apps.tpsmessagingservice.service.skd; + +import no.nav.testnav.apps.tpsmessagingservice.dto.endringsmeldinger.SkdMeldingTrans1; +import no.nav.testnav.apps.tpsmessagingservice.utils.ConvertDateToStringUtility; +import no.nav.testnav.libs.data.tpsmessagingservice.v1.PersonDTO; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Service; + +import java.time.LocalDateTime; + +@Service +public class DoedsmeldingAnnulleringBuilderService { + + private static final String AARSAKS_KO_DE_FOR_DOEDSMELDING = "45"; + private static final String TRANSTYPE_FOR_DOEDSMELDING = "1"; + private static final String STATUS_KO_DE_FOR_DOEDSMELDING = "1"; + private static final String TILDELINGS_KO_DE_DOEDSMELDING_ANNULERING = "0"; + + @Autowired + private AdresseAppenderService adresseAppenderService; + + public SkdMeldingTrans1 execute(PersonDTO person) { + + var skdMeldingTrans1 = new SkdMeldingTrans1(); + skdMeldingTrans1.setTildelingskode(TILDELINGS_KO_DE_DOEDSMELDING_ANNULERING); + + addSkdParametersExtractedFromPerson(skdMeldingTrans1, person); + adresseAppenderService.execute(skdMeldingTrans1, person); + addDefaultParam(skdMeldingTrans1); + + return skdMeldingTrans1; + } + + private void addSkdParametersExtractedFromPerson(SkdMeldingTrans1 skdMeldingTrans1, PersonDTO person) { + + skdMeldingTrans1.setFodselsdato(person.getIdent().substring(0, 6)); + skdMeldingTrans1.setPersonnummer(person.getIdent().substring(6, 11)); + + var yyyyMMdd = ConvertDateToStringUtility.yyyyMMdd(LocalDateTime.now()); + var hhMMss = ConvertDateToStringUtility.hhMMss(LocalDateTime.now()); + + skdMeldingTrans1.setMaskintid(hhMMss); + skdMeldingTrans1.setMaskindato(yyyyMMdd); + + skdMeldingTrans1.setRegDato(yyyyMMdd); + } + + private void addDefaultParam(SkdMeldingTrans1 skdMeldingTrans1) { + + skdMeldingTrans1.setAarsakskode(AARSAKS_KO_DE_FOR_DOEDSMELDING); + skdMeldingTrans1.setTranstype(TRANSTYPE_FOR_DOEDSMELDING); + skdMeldingTrans1.setStatuskode(STATUS_KO_DE_FOR_DOEDSMELDING); + } +} diff --git a/apps/tps-messaging-service/src/main/java/no/nav/testnav/apps/tpsmessagingservice/service/skd/DoedsmeldingBuilderService.java b/apps/tps-messaging-service/src/main/java/no/nav/testnav/apps/tpsmessagingservice/service/skd/DoedsmeldingBuilderService.java new file mode 100644 index 00000000000..9021c61b7ee --- /dev/null +++ b/apps/tps-messaging-service/src/main/java/no/nav/testnav/apps/tpsmessagingservice/service/skd/DoedsmeldingBuilderService.java @@ -0,0 +1,52 @@ +package no.nav.testnav.apps.tpsmessagingservice.service.skd; + +import lombok.RequiredArgsConstructor; +import no.nav.testnav.apps.tpsmessagingservice.dto.endringsmeldinger.SkdMeldingTrans1; +import no.nav.testnav.apps.tpsmessagingservice.utils.ConvertDateToStringUtility; +import no.nav.testnav.apps.tpsmessagingservice.utils.IdenttypeFraIdentUtility; +import no.nav.testnav.libs.data.pdlforvalter.v1.Identtype; +import no.nav.testnav.libs.data.tpsmessagingservice.v1.DoedsmeldingRequest; +import org.springframework.stereotype.Service; + +import java.time.LocalDateTime; + +@Service +@RequiredArgsConstructor +public class DoedsmeldingBuilderService { + + private static final String AARSAKSKODE_FOR_DOEDSMELDING = "43"; + private static final String TRANSTYPE_FOR_DOEDSMELDING = "1"; + private static final String STATUSKODE_FNR = "5"; + private static final String STATUSKODE_DNR = "2"; + private static final String TILDELINGSKODE_DOEDSMELDING = "0"; + + public SkdMeldingTrans1 build(DoedsmeldingRequest request) { + + var skdMeldingTrans1 = new SkdMeldingTrans1(); + skdMeldingTrans1.setTildelingskode(TILDELINGSKODE_DOEDSMELDING); + + addSkdParametersExtractedFromPerson(skdMeldingTrans1, request); + + return skdMeldingTrans1; + } + + private void addSkdParametersExtractedFromPerson(SkdMeldingTrans1 skdMeldingTrans1, DoedsmeldingRequest request) { + + skdMeldingTrans1.setFodselsdato(request.getIdent().substring(0, 6)); + skdMeldingTrans1.setPersonnummer(request.getIdent().substring(6, 11)); + + var datoDoed = ConvertDateToStringUtility.yyyyMMdd(request.getDoedsdato().atStartOfDay()); + + skdMeldingTrans1.setMaskintid(ConvertDateToStringUtility.hhMMss(LocalDateTime.now())); + skdMeldingTrans1.setMaskindato(ConvertDateToStringUtility.yyyyMMdd(LocalDateTime.now())); + + // The specification for doedsmelding says reg-dato should be doedsdato + skdMeldingTrans1.setRegDato(datoDoed); + skdMeldingTrans1.setDatoDoed(datoDoed); + + skdMeldingTrans1.setAarsakskode(AARSAKSKODE_FOR_DOEDSMELDING); + skdMeldingTrans1.setStatuskode(Identtype.FNR == IdenttypeFraIdentUtility.getIdenttype(request.getIdent()) ? + STATUSKODE_FNR : STATUSKODE_DNR); + skdMeldingTrans1.setTranstype(TRANSTYPE_FOR_DOEDSMELDING); + } +} diff --git a/apps/tps-messaging-service/src/main/java/no/nav/testnav/apps/tpsmessagingservice/service/skd/FoedselsmeldingBuilderService.java b/apps/tps-messaging-service/src/main/java/no/nav/testnav/apps/tpsmessagingservice/service/skd/FoedselsmeldingBuilderService.java new file mode 100644 index 00000000000..a6bb9a98566 --- /dev/null +++ b/apps/tps-messaging-service/src/main/java/no/nav/testnav/apps/tpsmessagingservice/service/skd/FoedselsmeldingBuilderService.java @@ -0,0 +1,107 @@ +package no.nav.testnav.apps.tpsmessagingservice.service.skd; + +import lombok.RequiredArgsConstructor; +import no.nav.testnav.apps.tpsmessagingservice.dto.endringsmeldinger.SkdMeldingTrans1; +import no.nav.testnav.apps.tpsmessagingservice.utils.ConvertDateToStringUtility; +import no.nav.testnav.apps.tpsmessagingservice.utils.HentDatoFraIdentUtility; +import no.nav.testnav.libs.data.tpsmessagingservice.v1.FoedselsmeldingRequest; +import no.nav.testnav.libs.data.tpsmessagingservice.v1.PersonDTO; +import org.springframework.http.HttpStatus; +import org.springframework.stereotype.Service; +import org.springframework.web.server.ResponseStatusException; + +import java.time.LocalDateTime; + +import static java.util.Objects.isNull; +import static java.util.Objects.nonNull; + +@Service +@RequiredArgsConstructor +public class FoedselsmeldingBuilderService { + + private static final String AARSAKSKODE_FOR_FOEDSELSMELDING = "01"; + private static final String TILDELINGSKODE_FOEDSELSMELDING = "0"; + + private final AdresseAppenderService adresseAppenderService; + + public SkdMeldingTrans1 build(FoedselsmeldingRequest request) { + + var skdMeldingTrans1 = new SkdMeldingTrans1(); + skdMeldingTrans1.setTildelingskode(TILDELINGSKODE_FOEDSELSMELDING); + + addSkdParametersExtractedFromPerson(skdMeldingTrans1, request.getBarn()); + addSkdParametersExtractedFromForeldre(skdMeldingTrans1, request); + addDefaultParam(skdMeldingTrans1); + + return skdMeldingTrans1; + } + + private void addSkdParametersExtractedFromPerson(SkdMeldingTrans1 skdMeldingTrans1, PersonDTO barn) { + + var regdato = ConvertDateToStringUtility.yyyyMMdd(HentDatoFraIdentUtility.extract(barn.getIdent())); + + skdMeldingTrans1.setFodselsdato(getDato(barn)); + skdMeldingTrans1.setPersonnummer(getPersonnr(barn)); + + skdMeldingTrans1.setMaskintid("000000"); + skdMeldingTrans1.setMaskindato(ConvertDateToStringUtility.yyyyMMdd(LocalDateTime.now())); + skdMeldingTrans1.setRegDato(regdato); + + skdMeldingTrans1.setFoedekommLand("0301"); + skdMeldingTrans1.setFoedested("Sykehus"); + + skdMeldingTrans1.setFornavn(barn.getFornavn()); + skdMeldingTrans1.setSlektsnavn(barn.getEtternavn()); + skdMeldingTrans1.setKjoenn(barn.getKjonn()); + + skdMeldingTrans1.setRegdatoAdr(regdato); + skdMeldingTrans1.setPersonkode("3"); + skdMeldingTrans1.setLevendeDoed("1"); + skdMeldingTrans1.setStatuskode("1"); + + skdMeldingTrans1.setSpesRegType(barn.getSpesreg()); + skdMeldingTrans1.setDatoSpesRegType(regdato); + } + + private void addSkdParametersExtractedFromForeldre(SkdMeldingTrans1 skdMeldingTrans1, FoedselsmeldingRequest request) { + + if (isNull(request.getMor())) { + throw new ResponseStatusException(HttpStatus.BAD_REQUEST, request.getBarn().getIdent() + " mangler en mor i fødselsmeldingen."); + } + + skdMeldingTrans1.setMorsFodselsdato(getDato(request.getMor())); + skdMeldingTrans1.setMorsPersonnummer(getPersonnr(request.getMor())); + skdMeldingTrans1.setSlektsnavn(request.getBarn().getEtternavn()); + skdMeldingTrans1.setFamilienummer(request.getMor().getIdent()); + skdMeldingTrans1.setRegdatoFamnr( + ConvertDateToStringUtility.yyyyMMdd(HentDatoFraIdentUtility.extract(request.getBarn().getIdent()))); + + if (nonNull(request.getFar())) { + skdMeldingTrans1.setForeldreansvar("D"); + skdMeldingTrans1.setFarsFodselsdato(getDato(request.getFar())); + skdMeldingTrans1.setFarsPersonnummer(getPersonnr(request.getFar())); + } else { + skdMeldingTrans1.setForeldreansvar("M"); + } + skdMeldingTrans1.setDatoForeldreansvar( + ConvertDateToStringUtility.yyyyMMdd(HentDatoFraIdentUtility.extract(request.getBarn().getIdent()))); + + adresseAppenderService.execute(skdMeldingTrans1, request.getBarn()); + } + + private void addDefaultParam(SkdMeldingTrans1 skdMeldingTrans1) { + skdMeldingTrans1.setSivilstand("1"); + skdMeldingTrans1.setTranstype("1"); + skdMeldingTrans1.setAarsakskode(AARSAKSKODE_FOR_FOEDSELSMELDING); + } + + private String getPersonnr(PersonDTO person) { + + return person.getIdent().substring(6, 11); + } + + private static String getDato(PersonDTO person) { + + return person.getIdent().substring(0, 6); + } +} diff --git a/apps/tps-messaging-service/src/main/java/no/nav/testnav/apps/tpsmessagingservice/service/skd/SendSkdMeldinger.java b/apps/tps-messaging-service/src/main/java/no/nav/testnav/apps/tpsmessagingservice/service/skd/SendSkdMeldinger.java new file mode 100644 index 00000000000..1255eb6cf73 --- /dev/null +++ b/apps/tps-messaging-service/src/main/java/no/nav/testnav/apps/tpsmessagingservice/service/skd/SendSkdMeldinger.java @@ -0,0 +1,40 @@ +package no.nav.testnav.apps.tpsmessagingservice.service.skd; + +import lombok.RequiredArgsConstructor; +import lombok.extern.slf4j.Slf4j; +import no.nav.testnav.apps.tpsmessagingservice.consumer.EndringsmeldingConsumer; +import no.nav.testnav.apps.tpsmessagingservice.consumer.command.TpsMeldingCommand; +import no.nav.testnav.apps.tpsmessagingservice.dto.endringsmeldinger.SkdMeldingsheader; +import org.springframework.http.HttpStatus; +import org.springframework.jms.JmsException; +import org.springframework.stereotype.Service; +import org.springframework.web.server.ResponseStatusException; + +import java.util.List; +import java.util.Map; +import java.util.stream.Collectors; + +@Slf4j +@Service +@RequiredArgsConstructor +public class SendSkdMeldinger { + + private final EndringsmeldingConsumer endringsmeldingConsumer; + + public Map sendMeldinger(String skdMelding, List environments) { + + try { + var skdMeldingMedHeader = SkdMeldingsheader.appendHeader(skdMelding); + log.info("SKD-melding til miljøer {} {}", environments, skdMeldingMedHeader); + + return endringsmeldingConsumer.sendMessage(skdMeldingMedHeader, environments) + .entrySet().stream() + .collect(Collectors.toMap(Map.Entry::getKey, respone -> respone.getValue() + .replace(TpsMeldingCommand.NO_RESPONSE, "FEIL: TPS svarer ikke"))); + + } catch (JmsException jmsException) { + log.error(jmsException.getMessage(), jmsException); + throw new ResponseStatusException(HttpStatus.INTERNAL_SERVER_ERROR, jmsException.getMessage()); + } + } +} diff --git a/apps/tps-messaging-service/src/main/java/no/nav/testnav/apps/tpsmessagingservice/utils/ConvertDateToStringUtility.java b/apps/tps-messaging-service/src/main/java/no/nav/testnav/apps/tpsmessagingservice/utils/ConvertDateToStringUtility.java new file mode 100644 index 00000000000..fd043e40321 --- /dev/null +++ b/apps/tps-messaging-service/src/main/java/no/nav/testnav/apps/tpsmessagingservice/utils/ConvertDateToStringUtility.java @@ -0,0 +1,25 @@ +package no.nav.testnav.apps.tpsmessagingservice.utils; + +import lombok.experimental.UtilityClass; + +import java.time.LocalDateTime; +import java.time.format.DateTimeFormatter; + +import static java.util.Objects.nonNull; + +@UtilityClass +public final class ConvertDateToStringUtility { + + private static final DateTimeFormatter DATE_FORMAT = DateTimeFormatter.ofPattern("yyyyMMdd"); + private static final DateTimeFormatter TIME_FORMAT = DateTimeFormatter.ofPattern("HHmmss"); + + public static String yyyyMMdd(LocalDateTime localDateTime) { + + return nonNull(localDateTime) ? localDateTime.format(DATE_FORMAT) : null; + } + + public static String hhMMss(LocalDateTime localDateTime) { + + return nonNull(localDateTime) ? localDateTime.format(TIME_FORMAT) : null; + } +} diff --git a/apps/tps-messaging-service/src/main/java/no/nav/testnav/apps/tpsmessagingservice/utils/HentDatoFraIdentUtility.java b/apps/tps-messaging-service/src/main/java/no/nav/testnav/apps/tpsmessagingservice/utils/HentDatoFraIdentUtility.java new file mode 100644 index 00000000000..b7235aac145 --- /dev/null +++ b/apps/tps-messaging-service/src/main/java/no/nav/testnav/apps/tpsmessagingservice/utils/HentDatoFraIdentUtility.java @@ -0,0 +1,63 @@ +package no.nav.testnav.apps.tpsmessagingservice.utils; + +import lombok.experimental.UtilityClass; + +import java.time.LocalDate; +import java.time.LocalDateTime; + +import static java.lang.Integer.parseInt; +import static java.time.LocalDateTime.of; +import static java.util.Objects.isNull; + +/** + * INDIVID(POS 7-9) 500-749 OG ÅR > 54 => ÅRHUNDRE = 1800 + * INDIVID(POS 7-9) 000-499 => ÅRHUNDRE = 1900 + * INDIVID(POS 7-9) 900-999 OG ÅR > 39 => ÅRHUNDRE = 1900 + * INDIVID(POS 7-9) 500-999 OG ÅR < 40 => ÅRHUNDRE = 2000 + */ +@UtilityClass +public class HentDatoFraIdentUtility { + + private static final LocalDateTime TPS_MIN_REG_DATE = of(1900, 1, 1, 0, 0); + + public static LocalDateTime extract(String ident) { + + int year = parseInt(ident.substring(4, 6)); + int individ = parseInt(ident.substring(6, 9)); + + // Find century + int century; + if (parseInt(ident.substring(6, 10)) == 0) { + century = year <= LocalDate.now().getYear() % 100 ? 2000 : 1900; + } else if (individ < 500 || (individ >= 900 && year > 39)) { + century = 1900; + } else if (individ >= 500 && year < 40) { + century = 2000; + } else if (individ >= 500 && individ < 750 && year > 54) { + century = 1800; + } else { + century = 2000; + } + + return LocalDateTime.of(century + year, getMonth(ident), getDay(ident), 0, 0); + } + + public static LocalDateTime enforceValidTpsDate(LocalDateTime date) { + + if (isNull(date)) { + return null; + } else { + return date.isBefore(TPS_MIN_REG_DATE) ? TPS_MIN_REG_DATE : date; + } + } + + private int getDay(String ident) { + + return parseInt(ident.substring(0, 2)) % 40; + } + + private int getMonth(String ident) { + + return parseInt(ident.substring(2, 4)) % 20; + } +} \ No newline at end of file diff --git a/apps/tps-messaging-service/src/main/java/no/nav/testnav/apps/tpsmessagingservice/utils/HusbokstavEncoder.java b/apps/tps-messaging-service/src/main/java/no/nav/testnav/apps/tpsmessagingservice/utils/HusbokstavEncoder.java new file mode 100644 index 00000000000..de77844c525 --- /dev/null +++ b/apps/tps-messaging-service/src/main/java/no/nav/testnav/apps/tpsmessagingservice/utils/HusbokstavEncoder.java @@ -0,0 +1,50 @@ +package no.nav.testnav.apps.tpsmessagingservice.utils; + +import lombok.experimental.UtilityClass; + +import java.util.HashMap; +import java.util.Map; + +@UtilityClass +public class HusbokstavEncoder { + + private static final Map encodingMap; + static { + encodingMap = new HashMap<>(); + encodingMap.put("A", "9901"); + encodingMap.put("B", "9902"); + encodingMap.put("C", "9903"); + encodingMap.put("D", "9904"); + encodingMap.put("E", "9905"); + encodingMap.put("F", "9906"); + encodingMap.put("G", "9907"); + encodingMap.put("H", "9908"); + encodingMap.put("I", "9909"); + encodingMap.put("J", "9910"); + encodingMap.put("K", "9911"); + encodingMap.put("L", "9912"); + encodingMap.put("M", "9913"); + encodingMap.put("N", "9914"); + encodingMap.put("O", "9915"); + encodingMap.put("P", "9916"); + encodingMap.put("Q", "9917"); + encodingMap.put("R", "9918"); + encodingMap.put("S", "9919"); + encodingMap.put("T", "9920"); + encodingMap.put("U", "9921"); + encodingMap.put("V", "9922"); + encodingMap.put("W", "9923"); + encodingMap.put("X", "9924"); + encodingMap.put("Y", "9925"); + encodingMap.put("Z", "9926"); + encodingMap.put("Æ", "9927"); + encodingMap.put("Ø", "9928"); + encodingMap.put("Å", "9929"); + encodingMap.put("Á", "9930"); + } + + public static String encode(String husbokstav) { + return encodingMap.get(husbokstav); + } + +} diff --git a/apps/tps-messaging-service/src/main/java/no/nav/testnav/apps/tpsmessagingservice/utils/IdenttypeFraIdentUtility.java b/apps/tps-messaging-service/src/main/java/no/nav/testnav/apps/tpsmessagingservice/utils/IdenttypeFraIdentUtility.java new file mode 100644 index 00000000000..34a489158ec --- /dev/null +++ b/apps/tps-messaging-service/src/main/java/no/nav/testnav/apps/tpsmessagingservice/utils/IdenttypeFraIdentUtility.java @@ -0,0 +1,24 @@ +package no.nav.testnav.apps.tpsmessagingservice.utils; + +import lombok.experimental.UtilityClass; +import no.nav.testnav.libs.data.pdlforvalter.v1.Identtype; + +import static java.lang.Integer.parseInt; +import static no.nav.testnav.libs.data.pdlforvalter.v1.Identtype.DNR; +import static no.nav.testnav.libs.data.pdlforvalter.v1.Identtype.FNR; +import static no.nav.testnav.libs.data.pdlforvalter.v1.Identtype.NPID; + +@UtilityClass +public class IdenttypeFraIdentUtility { + + public static Identtype getIdenttype(String ident) { + + if (parseInt(ident.substring(2, 3)) % 4 >= 2) { + return NPID; + } else if (parseInt(ident.substring(0, 1)) >= 4) { + return DNR; + } else { + return FNR; + } + } +} \ No newline at end of file diff --git a/apps/tps-messaging-service/src/main/java/no/nav/testnav/apps/tpsmessagingservice/utils/LandkodeEncoder.java b/apps/tps-messaging-service/src/main/java/no/nav/testnav/apps/tpsmessagingservice/utils/LandkodeEncoder.java new file mode 100644 index 00000000000..e30b0473319 --- /dev/null +++ b/apps/tps-messaging-service/src/main/java/no/nav/testnav/apps/tpsmessagingservice/utils/LandkodeEncoder.java @@ -0,0 +1,302 @@ +package no.nav.testnav.apps.tpsmessagingservice.utils; + +import lombok.AllArgsConstructor; +import lombok.Getter; +import lombok.NoArgsConstructor; +import lombok.Setter; +import lombok.experimental.UtilityClass; + +import java.time.LocalDateTime; +import java.util.HashMap; +import java.util.Map; + +import static java.time.LocalDateTime.of; + +@UtilityClass +public class LandkodeEncoder { + + private static final LocalDateTime START_OF_ERA = of(1800, 1, 1, 0, 0); + private static final LocalDateTime FORESEEABLE_FUTURE = of(9999, 12, 31, 0, 0); + + private static final Map landkoderMap = new HashMap<>(); + + private static final LandDetails DEFAULT = new LandDetails("990", START_OF_ERA, FORESEEABLE_FUTURE); + + static { //NOSONAR + landkoderMap.put("???", DEFAULT); + landkoderMap.put("ABW", new LandDetails("657", START_OF_ERA, FORESEEABLE_FUTURE)); + landkoderMap.put("AFG", new LandDetails("404", START_OF_ERA, FORESEEABLE_FUTURE)); + landkoderMap.put("AGO", new LandDetails("204", START_OF_ERA, FORESEEABLE_FUTURE)); + landkoderMap.put("AIA", new LandDetails("660", START_OF_ERA, FORESEEABLE_FUTURE)); + landkoderMap.put("ALB", new LandDetails("111", START_OF_ERA, FORESEEABLE_FUTURE)); + landkoderMap.put("AND", new LandDetails("114", START_OF_ERA, FORESEEABLE_FUTURE)); + landkoderMap.put("ANT", new LandDetails("656", START_OF_ERA, FORESEEABLE_FUTURE)); + landkoderMap.put("ARE", new LandDetails("426", START_OF_ERA, FORESEEABLE_FUTURE)); + landkoderMap.put("ARG", new LandDetails("705", START_OF_ERA, FORESEEABLE_FUTURE)); + landkoderMap.put("ARM", new LandDetails("406", START_OF_ERA, FORESEEABLE_FUTURE)); + landkoderMap.put("ASM", new LandDetails("802", START_OF_ERA, FORESEEABLE_FUTURE)); + landkoderMap.put("ATF", new LandDetails("628", START_OF_ERA, of(2000, 1, 1, 0, 0))); + landkoderMap.put("ATG", new LandDetails("603", START_OF_ERA, FORESEEABLE_FUTURE)); + landkoderMap.put("AUS", new LandDetails("805", START_OF_ERA, FORESEEABLE_FUTURE)); + landkoderMap.put("AUT", new LandDetails("153", START_OF_ERA, FORESEEABLE_FUTURE)); + landkoderMap.put("AZE", new LandDetails("407", START_OF_ERA, FORESEEABLE_FUTURE)); + landkoderMap.put("BDI", new LandDetails("216", START_OF_ERA, FORESEEABLE_FUTURE)); + landkoderMap.put("BEL", new LandDetails("112", START_OF_ERA, FORESEEABLE_FUTURE)); + landkoderMap.put("BEN", new LandDetails("229", START_OF_ERA, FORESEEABLE_FUTURE)); + landkoderMap.put("BES", new LandDetails("659", of(2011, 12, 1, 0, 0), FORESEEABLE_FUTURE)); + landkoderMap.put("BFA", new LandDetails("393", START_OF_ERA, FORESEEABLE_FUTURE)); + landkoderMap.put("BGD", new LandDetails("410", START_OF_ERA, FORESEEABLE_FUTURE)); + landkoderMap.put("BGR", new LandDetails("113", START_OF_ERA, FORESEEABLE_FUTURE)); + landkoderMap.put("BHR", new LandDetails("409", START_OF_ERA, FORESEEABLE_FUTURE)); + landkoderMap.put("BHS", new LandDetails("605", START_OF_ERA, FORESEEABLE_FUTURE)); + landkoderMap.put("BIH", new LandDetails("155", START_OF_ERA, FORESEEABLE_FUTURE)); + landkoderMap.put("BLM", new LandDetails("687", START_OF_ERA, FORESEEABLE_FUTURE)); + landkoderMap.put("BLR", new LandDetails("120", START_OF_ERA, FORESEEABLE_FUTURE)); + landkoderMap.put("BLZ", new LandDetails("604", START_OF_ERA, FORESEEABLE_FUTURE)); + landkoderMap.put("BMU", new LandDetails("606", START_OF_ERA, FORESEEABLE_FUTURE)); + landkoderMap.put("BOL", new LandDetails("710", START_OF_ERA, FORESEEABLE_FUTURE)); + landkoderMap.put("BRA", new LandDetails("715", START_OF_ERA, FORESEEABLE_FUTURE)); + landkoderMap.put("BRB", new LandDetails("602", START_OF_ERA, FORESEEABLE_FUTURE)); + landkoderMap.put("BRN", new LandDetails("416", START_OF_ERA, FORESEEABLE_FUTURE)); + landkoderMap.put("BTN", new LandDetails("412", START_OF_ERA, FORESEEABLE_FUTURE)); + landkoderMap.put("BVT", new LandDetails("875", START_OF_ERA, FORESEEABLE_FUTURE)); + landkoderMap.put("BWA", new LandDetails("205", START_OF_ERA, FORESEEABLE_FUTURE)); + landkoderMap.put("CAF", new LandDetails("337", START_OF_ERA, FORESEEABLE_FUTURE)); + landkoderMap.put("CAN", new LandDetails("612", START_OF_ERA, FORESEEABLE_FUTURE)); + landkoderMap.put("CCK", new LandDetails("808", START_OF_ERA, FORESEEABLE_FUTURE)); + landkoderMap.put("CHE", new LandDetails("141", START_OF_ERA, FORESEEABLE_FUTURE)); + landkoderMap.put("CHL", new LandDetails("725", START_OF_ERA, FORESEEABLE_FUTURE)); + landkoderMap.put("CHN", new LandDetails("484", START_OF_ERA, FORESEEABLE_FUTURE)); + landkoderMap.put("CIV", new LandDetails("239", START_OF_ERA, FORESEEABLE_FUTURE)); + landkoderMap.put("CMR", new LandDetails("270", START_OF_ERA, FORESEEABLE_FUTURE)); + landkoderMap.put("COD", new LandDetails("279", START_OF_ERA, FORESEEABLE_FUTURE)); + landkoderMap.put("COG", new LandDetails("278", START_OF_ERA, FORESEEABLE_FUTURE)); + landkoderMap.put("COK", new LandDetails("809", START_OF_ERA, FORESEEABLE_FUTURE)); + landkoderMap.put("COL", new LandDetails("730", START_OF_ERA, FORESEEABLE_FUTURE)); + landkoderMap.put("COM", new LandDetails("220", START_OF_ERA, FORESEEABLE_FUTURE)); + landkoderMap.put("CPV", new LandDetails("273", START_OF_ERA, FORESEEABLE_FUTURE)); + landkoderMap.put("CRI", new LandDetails("616", START_OF_ERA, FORESEEABLE_FUTURE)); + landkoderMap.put("CSK", new LandDetails("142", START_OF_ERA, FORESEEABLE_FUTURE)); + landkoderMap.put("CUB", new LandDetails("620", START_OF_ERA, FORESEEABLE_FUTURE)); + landkoderMap.put("CUW", new LandDetails("661", of(2011, 12, 1, 0, 0), FORESEEABLE_FUTURE)); + landkoderMap.put("CXR", new LandDetails("807", START_OF_ERA, FORESEEABLE_FUTURE)); + landkoderMap.put("CYM", new LandDetails("613", START_OF_ERA, FORESEEABLE_FUTURE)); + landkoderMap.put("CYP", new LandDetails("500", START_OF_ERA, FORESEEABLE_FUTURE)); + landkoderMap.put("CZE", new LandDetails("158", START_OF_ERA, FORESEEABLE_FUTURE)); + landkoderMap.put("DDR", new LandDetails("151", START_OF_ERA, FORESEEABLE_FUTURE)); + landkoderMap.put("DEU", new LandDetails("144", START_OF_ERA, FORESEEABLE_FUTURE)); + landkoderMap.put("DJI", new LandDetails("250", START_OF_ERA, FORESEEABLE_FUTURE)); + landkoderMap.put("DMA", new LandDetails("622", START_OF_ERA, FORESEEABLE_FUTURE)); + landkoderMap.put("DNK", new LandDetails("101", START_OF_ERA, FORESEEABLE_FUTURE)); + landkoderMap.put("DOM", new LandDetails("624", START_OF_ERA, FORESEEABLE_FUTURE)); + landkoderMap.put("DZA", new LandDetails("203", START_OF_ERA, FORESEEABLE_FUTURE)); + landkoderMap.put("ECU", new LandDetails("735", START_OF_ERA, FORESEEABLE_FUTURE)); + landkoderMap.put("EGY", new LandDetails("249", START_OF_ERA, FORESEEABLE_FUTURE)); + landkoderMap.put("ERI", new LandDetails("241", START_OF_ERA, FORESEEABLE_FUTURE)); + landkoderMap.put("ESH", new LandDetails("304", START_OF_ERA, FORESEEABLE_FUTURE)); + landkoderMap.put("ESP", new LandDetails("137", START_OF_ERA, FORESEEABLE_FUTURE)); + landkoderMap.put("EST", new LandDetails("115", START_OF_ERA, FORESEEABLE_FUTURE)); + landkoderMap.put("ETH", new LandDetails("246", START_OF_ERA, FORESEEABLE_FUTURE)); + landkoderMap.put("FIN", new LandDetails("103", START_OF_ERA, FORESEEABLE_FUTURE)); + landkoderMap.put("FJI", new LandDetails("811", START_OF_ERA, FORESEEABLE_FUTURE)); + landkoderMap.put("FLK", new LandDetails("740", START_OF_ERA, FORESEEABLE_FUTURE)); + landkoderMap.put("FRA", new LandDetails("117", START_OF_ERA, FORESEEABLE_FUTURE)); + landkoderMap.put("FRO", new LandDetails("104", START_OF_ERA, FORESEEABLE_FUTURE)); + landkoderMap.put("FSM", new LandDetails("826", START_OF_ERA, FORESEEABLE_FUTURE)); + landkoderMap.put("GAB", new LandDetails("254", START_OF_ERA, FORESEEABLE_FUTURE)); + landkoderMap.put("GBR", new LandDetails("139", START_OF_ERA, FORESEEABLE_FUTURE)); + landkoderMap.put("GEO", new LandDetails("430", START_OF_ERA, FORESEEABLE_FUTURE)); + landkoderMap.put("GGY", new LandDetails("162", START_OF_ERA, FORESEEABLE_FUTURE)); + landkoderMap.put("GHA", new LandDetails("260", START_OF_ERA, FORESEEABLE_FUTURE)); + landkoderMap.put("GIB", new LandDetails("118", START_OF_ERA, FORESEEABLE_FUTURE)); + landkoderMap.put("GIN", new LandDetails("264", START_OF_ERA, FORESEEABLE_FUTURE)); + landkoderMap.put("GLP", new LandDetails("631", START_OF_ERA, FORESEEABLE_FUTURE)); + landkoderMap.put("GMB", new LandDetails("256", START_OF_ERA, FORESEEABLE_FUTURE)); + landkoderMap.put("GNB", new LandDetails("266", START_OF_ERA, FORESEEABLE_FUTURE)); + landkoderMap.put("GNQ", new LandDetails("235", START_OF_ERA, FORESEEABLE_FUTURE)); + landkoderMap.put("GRC", new LandDetails("119", START_OF_ERA, FORESEEABLE_FUTURE)); + landkoderMap.put("GRD", new LandDetails("629", START_OF_ERA, FORESEEABLE_FUTURE)); + landkoderMap.put("GRL", new LandDetails("102", START_OF_ERA, FORESEEABLE_FUTURE)); + landkoderMap.put("GTM", new LandDetails("632", START_OF_ERA, FORESEEABLE_FUTURE)); + landkoderMap.put("GUF", new LandDetails("745", START_OF_ERA, FORESEEABLE_FUTURE)); + landkoderMap.put("GUM", new LandDetails("817", START_OF_ERA, FORESEEABLE_FUTURE)); + landkoderMap.put("GUY", new LandDetails("720", START_OF_ERA, FORESEEABLE_FUTURE)); + landkoderMap.put("HKG", new LandDetails("436", START_OF_ERA, FORESEEABLE_FUTURE)); + landkoderMap.put("HMD", new LandDetails("870", START_OF_ERA, FORESEEABLE_FUTURE)); + landkoderMap.put("HND", new LandDetails("644", START_OF_ERA, FORESEEABLE_FUTURE)); + landkoderMap.put("HRV", new LandDetails("122", START_OF_ERA, FORESEEABLE_FUTURE)); + landkoderMap.put("HTI", new LandDetails("636", START_OF_ERA, FORESEEABLE_FUTURE)); + landkoderMap.put("HUN", new LandDetails("152", START_OF_ERA, FORESEEABLE_FUTURE)); + landkoderMap.put("IDN", new LandDetails("448", START_OF_ERA, FORESEEABLE_FUTURE)); + landkoderMap.put("IMN", new LandDetails("164", START_OF_ERA, FORESEEABLE_FUTURE)); + landkoderMap.put("IND", new LandDetails("444", START_OF_ERA, FORESEEABLE_FUTURE)); + landkoderMap.put("IOT", new LandDetails("213", START_OF_ERA, FORESEEABLE_FUTURE)); + landkoderMap.put("IRL", new LandDetails("121", START_OF_ERA, FORESEEABLE_FUTURE)); + landkoderMap.put("IRN", new LandDetails("456", START_OF_ERA, FORESEEABLE_FUTURE)); + landkoderMap.put("IRQ", new LandDetails("452", START_OF_ERA, FORESEEABLE_FUTURE)); + landkoderMap.put("ISL", new LandDetails("105", START_OF_ERA, FORESEEABLE_FUTURE)); + landkoderMap.put("ISR", new LandDetails("460", START_OF_ERA, FORESEEABLE_FUTURE)); + landkoderMap.put("ITA", new LandDetails("123", START_OF_ERA, FORESEEABLE_FUTURE)); + landkoderMap.put("JAM", new LandDetails("648", START_OF_ERA, FORESEEABLE_FUTURE)); + landkoderMap.put("JEY", new LandDetails("163", of(2011, 12, 1, 0, 0), FORESEEABLE_FUTURE)); + landkoderMap.put("JOR", new LandDetails("476", START_OF_ERA, FORESEEABLE_FUTURE)); + landkoderMap.put("JPN", new LandDetails("464", START_OF_ERA, FORESEEABLE_FUTURE)); + landkoderMap.put("KAZ", new LandDetails("480", START_OF_ERA, FORESEEABLE_FUTURE)); + landkoderMap.put("KEN", new LandDetails("276", START_OF_ERA, FORESEEABLE_FUTURE)); + landkoderMap.put("KGZ", new LandDetails("502", START_OF_ERA, FORESEEABLE_FUTURE)); + landkoderMap.put("KHM", new LandDetails("478", START_OF_ERA, FORESEEABLE_FUTURE)); + landkoderMap.put("KIR", new LandDetails("815", START_OF_ERA, FORESEEABLE_FUTURE)); + landkoderMap.put("KNA", new LandDetails("677", START_OF_ERA, FORESEEABLE_FUTURE)); + landkoderMap.put("KOR", new LandDetails("492", START_OF_ERA, FORESEEABLE_FUTURE)); + landkoderMap.put("KWT", new LandDetails("496", START_OF_ERA, FORESEEABLE_FUTURE)); + landkoderMap.put("LAO", new LandDetails("504", START_OF_ERA, FORESEEABLE_FUTURE)); + landkoderMap.put("LBN", new LandDetails("508", START_OF_ERA, FORESEEABLE_FUTURE)); + landkoderMap.put("LBR", new LandDetails("283", START_OF_ERA, FORESEEABLE_FUTURE)); + landkoderMap.put("LBY", new LandDetails("286", START_OF_ERA, FORESEEABLE_FUTURE)); + landkoderMap.put("LCA", new LandDetails("678", START_OF_ERA, FORESEEABLE_FUTURE)); + landkoderMap.put("LIE", new LandDetails("128", START_OF_ERA, FORESEEABLE_FUTURE)); + landkoderMap.put("LKA", new LandDetails("424", START_OF_ERA, FORESEEABLE_FUTURE)); + landkoderMap.put("LSO", new LandDetails("281", START_OF_ERA, FORESEEABLE_FUTURE)); + landkoderMap.put("LTU", new LandDetails("136", START_OF_ERA, FORESEEABLE_FUTURE)); + landkoderMap.put("LUX", new LandDetails("129", START_OF_ERA, FORESEEABLE_FUTURE)); + landkoderMap.put("LVA", new LandDetails("124", START_OF_ERA, FORESEEABLE_FUTURE)); + landkoderMap.put("MAC", new LandDetails("510", START_OF_ERA, FORESEEABLE_FUTURE)); + landkoderMap.put("MAF", new LandDetails("686", START_OF_ERA, FORESEEABLE_FUTURE)); + landkoderMap.put("MAR", new LandDetails("303", START_OF_ERA, FORESEEABLE_FUTURE)); + landkoderMap.put("MCO", new LandDetails("130", START_OF_ERA, FORESEEABLE_FUTURE)); + landkoderMap.put("MDA", new LandDetails("138", START_OF_ERA, FORESEEABLE_FUTURE)); + landkoderMap.put("MDG", new LandDetails("289", START_OF_ERA, FORESEEABLE_FUTURE)); + landkoderMap.put("MDV", new LandDetails("513", START_OF_ERA, FORESEEABLE_FUTURE)); + landkoderMap.put("MEX", new LandDetails("652", START_OF_ERA, FORESEEABLE_FUTURE)); + landkoderMap.put("MHL", new LandDetails("835", START_OF_ERA, FORESEEABLE_FUTURE)); + landkoderMap.put("MKD", new LandDetails("156", START_OF_ERA, FORESEEABLE_FUTURE)); + landkoderMap.put("MLI", new LandDetails("299", START_OF_ERA, FORESEEABLE_FUTURE)); + landkoderMap.put("MLT", new LandDetails("126", START_OF_ERA, FORESEEABLE_FUTURE)); + landkoderMap.put("MMR", new LandDetails("420", START_OF_ERA, FORESEEABLE_FUTURE)); + landkoderMap.put("MNE", new LandDetails("160", of(2006, 11, 1, 0, 0), FORESEEABLE_FUTURE)); + landkoderMap.put("MNG", new LandDetails("516", START_OF_ERA, FORESEEABLE_FUTURE)); + landkoderMap.put("MNP", new LandDetails("840", START_OF_ERA, FORESEEABLE_FUTURE)); + landkoderMap.put("MOZ", new LandDetails("319", START_OF_ERA, FORESEEABLE_FUTURE)); + landkoderMap.put("MRT", new LandDetails("306", START_OF_ERA, FORESEEABLE_FUTURE)); + landkoderMap.put("MSR", new LandDetails("654", START_OF_ERA, FORESEEABLE_FUTURE)); + landkoderMap.put("MTQ", new LandDetails("650", START_OF_ERA, FORESEEABLE_FUTURE)); + landkoderMap.put("MUS", new LandDetails("307", START_OF_ERA, FORESEEABLE_FUTURE)); + landkoderMap.put("MWI", new LandDetails("296", START_OF_ERA, FORESEEABLE_FUTURE)); + landkoderMap.put("MYS", new LandDetails("512", START_OF_ERA, FORESEEABLE_FUTURE)); + landkoderMap.put("MYT", new LandDetails("322", START_OF_ERA, FORESEEABLE_FUTURE)); + landkoderMap.put("NAM", new LandDetails("308", START_OF_ERA, FORESEEABLE_FUTURE)); + landkoderMap.put("NCL", new LandDetails("833", START_OF_ERA, FORESEEABLE_FUTURE)); + landkoderMap.put("NER", new LandDetails("309", START_OF_ERA, FORESEEABLE_FUTURE)); + landkoderMap.put("NFK", new LandDetails("822", START_OF_ERA, FORESEEABLE_FUTURE)); + landkoderMap.put("NGA", new LandDetails("313", START_OF_ERA, FORESEEABLE_FUTURE)); + landkoderMap.put("NIC", new LandDetails("664", START_OF_ERA, FORESEEABLE_FUTURE)); + landkoderMap.put("NIU", new LandDetails("821", START_OF_ERA, FORESEEABLE_FUTURE)); + landkoderMap.put("NLD", new LandDetails("127", START_OF_ERA, FORESEEABLE_FUTURE)); + landkoderMap.put("NOR", new LandDetails("000", START_OF_ERA, FORESEEABLE_FUTURE)); + landkoderMap.put("NPL", new LandDetails("528", START_OF_ERA, FORESEEABLE_FUTURE)); + landkoderMap.put("NRU", new LandDetails("818", START_OF_ERA, FORESEEABLE_FUTURE)); + landkoderMap.put("NZL", new LandDetails("820", START_OF_ERA, FORESEEABLE_FUTURE)); + landkoderMap.put("OMN", new LandDetails("520", START_OF_ERA, FORESEEABLE_FUTURE)); + landkoderMap.put("PAK", new LandDetails("534", START_OF_ERA, FORESEEABLE_FUTURE)); + landkoderMap.put("PAN", new LandDetails("668", START_OF_ERA, FORESEEABLE_FUTURE)); + landkoderMap.put("PCN", new LandDetails("828", START_OF_ERA, FORESEEABLE_FUTURE)); + landkoderMap.put("PER", new LandDetails("760", START_OF_ERA, FORESEEABLE_FUTURE)); + landkoderMap.put("PHL", new LandDetails("428", START_OF_ERA, FORESEEABLE_FUTURE)); + landkoderMap.put("PLW", new LandDetails("839", START_OF_ERA, FORESEEABLE_FUTURE)); + landkoderMap.put("PNG", new LandDetails("827", START_OF_ERA, FORESEEABLE_FUTURE)); + landkoderMap.put("POL", new LandDetails("131", START_OF_ERA, FORESEEABLE_FUTURE)); + landkoderMap.put("PRI", new LandDetails("685", START_OF_ERA, FORESEEABLE_FUTURE)); + landkoderMap.put("PRK", new LandDetails("488", START_OF_ERA, FORESEEABLE_FUTURE)); + landkoderMap.put("PRT", new LandDetails("132", START_OF_ERA, FORESEEABLE_FUTURE)); + landkoderMap.put("PRY", new LandDetails("755", START_OF_ERA, FORESEEABLE_FUTURE)); + landkoderMap.put("PSE", new LandDetails("524", START_OF_ERA, FORESEEABLE_FUTURE)); + landkoderMap.put("PYF", new LandDetails("814", START_OF_ERA, FORESEEABLE_FUTURE)); + landkoderMap.put("QAT", new LandDetails("540", START_OF_ERA, FORESEEABLE_FUTURE)); + landkoderMap.put("REU", new LandDetails("323", START_OF_ERA, FORESEEABLE_FUTURE)); + landkoderMap.put("ROU", new LandDetails("133", START_OF_ERA, FORESEEABLE_FUTURE)); + landkoderMap.put("RUS", new LandDetails("140", START_OF_ERA, FORESEEABLE_FUTURE)); + landkoderMap.put("RWA", new LandDetails("329", START_OF_ERA, FORESEEABLE_FUTURE)); + landkoderMap.put("SAU", new LandDetails("544", START_OF_ERA, FORESEEABLE_FUTURE)); + landkoderMap.put("SCG", new LandDetails("125", of(1994, 1, 1, 0, 0), FORESEEABLE_FUTURE)); + landkoderMap.put("SDN", new LandDetails("356", of(2011, 12, 1, 0, 0), FORESEEABLE_FUTURE)); + landkoderMap.put("SEN", new LandDetails("336", START_OF_ERA, FORESEEABLE_FUTURE)); + landkoderMap.put("SGP", new LandDetails("548", START_OF_ERA, FORESEEABLE_FUTURE)); + landkoderMap.put("SGS", new LandDetails("865", START_OF_ERA, FORESEEABLE_FUTURE)); + landkoderMap.put("SHN", new LandDetails("209", START_OF_ERA, FORESEEABLE_FUTURE)); + landkoderMap.put("SJM", new LandDetails("744", START_OF_ERA, FORESEEABLE_FUTURE)); + landkoderMap.put("SLB", new LandDetails("806", START_OF_ERA, FORESEEABLE_FUTURE)); + landkoderMap.put("SLE", new LandDetails("339", START_OF_ERA, FORESEEABLE_FUTURE)); + landkoderMap.put("SLV", new LandDetails("672", START_OF_ERA, FORESEEABLE_FUTURE)); + landkoderMap.put("SMR", new LandDetails("134", START_OF_ERA, FORESEEABLE_FUTURE)); + landkoderMap.put("SOM", new LandDetails("346", START_OF_ERA, FORESEEABLE_FUTURE)); + landkoderMap.put("SPM", new LandDetails("676", START_OF_ERA, FORESEEABLE_FUTURE)); + landkoderMap.put("SRB", new LandDetails("159", of(2006, 11, 1, 0, 0), FORESEEABLE_FUTURE)); + landkoderMap.put("SSD", new LandDetails("355", of(2011,12,1,0,0), FORESEEABLE_FUTURE)); + landkoderMap.put("STP", new LandDetails("333", START_OF_ERA, FORESEEABLE_FUTURE)); + landkoderMap.put("SUN", new LandDetails("135", START_OF_ERA, FORESEEABLE_FUTURE)); + landkoderMap.put("SUR", new LandDetails("765", START_OF_ERA, FORESEEABLE_FUTURE)); + landkoderMap.put("SVK", new LandDetails("157", START_OF_ERA, FORESEEABLE_FUTURE)); + landkoderMap.put("SVN", new LandDetails("146", START_OF_ERA, FORESEEABLE_FUTURE)); + landkoderMap.put("SWE", new LandDetails("106", START_OF_ERA, FORESEEABLE_FUTURE)); + landkoderMap.put("SWZ", new LandDetails("357", START_OF_ERA, FORESEEABLE_FUTURE)); + landkoderMap.put("SXM", new LandDetails("658", of(2011, 12, 1, 0, 0), FORESEEABLE_FUTURE)); + landkoderMap.put("SYC", new LandDetails("338", START_OF_ERA, FORESEEABLE_FUTURE)); + landkoderMap.put("SYR", new LandDetails("564", START_OF_ERA, FORESEEABLE_FUTURE)); + landkoderMap.put("TCA", new LandDetails("681", START_OF_ERA, FORESEEABLE_FUTURE)); + landkoderMap.put("TCD", new LandDetails("373", START_OF_ERA, FORESEEABLE_FUTURE)); + landkoderMap.put("TGO", new LandDetails("376", START_OF_ERA, FORESEEABLE_FUTURE)); + landkoderMap.put("THA", new LandDetails("568", START_OF_ERA, FORESEEABLE_FUTURE)); + landkoderMap.put("TJK", new LandDetails("550", START_OF_ERA, FORESEEABLE_FUTURE)); + landkoderMap.put("TKL", new LandDetails("829", START_OF_ERA, FORESEEABLE_FUTURE)); + landkoderMap.put("TKM", new LandDetails("552", START_OF_ERA, FORESEEABLE_FUTURE)); + landkoderMap.put("TLS", new LandDetails("537", of(2002, 5, 20, 0, 0), FORESEEABLE_FUTURE)); + landkoderMap.put("TON", new LandDetails("813", START_OF_ERA, FORESEEABLE_FUTURE)); + landkoderMap.put("TTO", new LandDetails("680", START_OF_ERA, FORESEEABLE_FUTURE)); + landkoderMap.put("TUN", new LandDetails("379", START_OF_ERA, FORESEEABLE_FUTURE)); + landkoderMap.put("TUR", new LandDetails("143", START_OF_ERA, FORESEEABLE_FUTURE)); + landkoderMap.put("TUV", new LandDetails("816", START_OF_ERA, FORESEEABLE_FUTURE)); + landkoderMap.put("TWN", new LandDetails("432", START_OF_ERA, FORESEEABLE_FUTURE)); + landkoderMap.put("TZA", new LandDetails("369", START_OF_ERA, FORESEEABLE_FUTURE)); + landkoderMap.put("UGA", new LandDetails("386", START_OF_ERA, FORESEEABLE_FUTURE)); + landkoderMap.put("UKR", new LandDetails("148", START_OF_ERA, FORESEEABLE_FUTURE)); + landkoderMap.put("UMI", new LandDetails("819", START_OF_ERA, FORESEEABLE_FUTURE)); + landkoderMap.put("URY", new LandDetails("770", START_OF_ERA, FORESEEABLE_FUTURE)); + landkoderMap.put("USA", new LandDetails("684", START_OF_ERA, FORESEEABLE_FUTURE)); + landkoderMap.put("UZB", new LandDetails("554", START_OF_ERA, FORESEEABLE_FUTURE)); + landkoderMap.put("VAT", new LandDetails("154", START_OF_ERA, FORESEEABLE_FUTURE)); + landkoderMap.put("VCT", new LandDetails("679", START_OF_ERA, FORESEEABLE_FUTURE)); + landkoderMap.put("VEN", new LandDetails("775", START_OF_ERA, FORESEEABLE_FUTURE)); + landkoderMap.put("VGB", new LandDetails("608", START_OF_ERA, FORESEEABLE_FUTURE)); + landkoderMap.put("VIR", new LandDetails("601", START_OF_ERA, FORESEEABLE_FUTURE)); + landkoderMap.put("VNM", new LandDetails("575", START_OF_ERA, FORESEEABLE_FUTURE)); + landkoderMap.put("VUT", new LandDetails("812", START_OF_ERA, FORESEEABLE_FUTURE)); + landkoderMap.put("WAK", new LandDetails("831", START_OF_ERA, of(2001, 1, 1, 0, 0))); + landkoderMap.put("WLF", new LandDetails("832", START_OF_ERA, FORESEEABLE_FUTURE)); + landkoderMap.put("WSM", new LandDetails("830", START_OF_ERA, FORESEEABLE_FUTURE)); + landkoderMap.put("XXK", new LandDetails("161", START_OF_ERA, FORESEEABLE_FUTURE)); + landkoderMap.put("XXX", new LandDetails("980", START_OF_ERA, FORESEEABLE_FUTURE)); + landkoderMap.put("YEM", new LandDetails("578", START_OF_ERA, FORESEEABLE_FUTURE)); + landkoderMap.put("YUG", new LandDetails("925", of(1944, 1, 1, 0, 0), of(2003, 11, 30, 0, 0))); + landkoderMap.put("ZAF", new LandDetails("359", START_OF_ERA, FORESEEABLE_FUTURE)); + landkoderMap.put("ZMB", new LandDetails("389", START_OF_ERA, FORESEEABLE_FUTURE)); + landkoderMap.put("ZWE", new LandDetails("326", START_OF_ERA, FORESEEABLE_FUTURE)); + landkoderMap.put("349", new LandDetails("349", START_OF_ERA, FORESEEABLE_FUTURE)); + landkoderMap.put("546", new LandDetails("546", START_OF_ERA, FORESEEABLE_FUTURE)); + landkoderMap.put("556", new LandDetails("556", START_OF_ERA, FORESEEABLE_FUTURE)); + landkoderMap.put("669", new LandDetails("669", START_OF_ERA, FORESEEABLE_FUTURE)); + } + + public String encode(String statsborgerskap) { + return landkoderMap.getOrDefault(statsborgerskap, DEFAULT).getTpsCode(); + } + + @Getter + @Setter + @NoArgsConstructor + @AllArgsConstructor + static class LandDetails { + private String tpsCode; + private LocalDateTime fom; + private LocalDateTime tom; + } +} diff --git a/apps/tps-messaging-service/src/main/java/no/nav/testnav/apps/tpsmessagingservice/utils/NullcheckUtil.java b/apps/tps-messaging-service/src/main/java/no/nav/testnav/apps/tpsmessagingservice/utils/NullcheckUtil.java new file mode 100644 index 00000000000..5d648969c98 --- /dev/null +++ b/apps/tps-messaging-service/src/main/java/no/nav/testnav/apps/tpsmessagingservice/utils/NullcheckUtil.java @@ -0,0 +1,13 @@ +package no.nav.testnav.apps.tpsmessagingservice.utils; + +import lombok.experimental.UtilityClass; + +import static java.util.Objects.nonNull; + +@UtilityClass +public final class NullcheckUtil { + + public static T nullcheckSetDefaultValue(T value, T defaultValue) { + return nonNull(value) ? value : defaultValue; + } +} diff --git a/apps/tps-messaging-service/src/main/java/no/nav/testnav/apps/tpsmessagingservice/utils/ResponseStatus.java b/apps/tps-messaging-service/src/main/java/no/nav/testnav/apps/tpsmessagingservice/utils/ResponseStatus.java new file mode 100644 index 00000000000..26982ecef2c --- /dev/null +++ b/apps/tps-messaging-service/src/main/java/no/nav/testnav/apps/tpsmessagingservice/utils/ResponseStatus.java @@ -0,0 +1,37 @@ +package no.nav.testnav.apps.tpsmessagingservice.utils; + +import lombok.experimental.UtilityClass; +import no.nav.testnav.apps.tpsmessagingservice.dto.TpsMeldingResponse; + +import static java.lang.String.format; +import static java.util.Objects.nonNull; + +@UtilityClass +public final class ResponseStatus { + + public static String extract(String status) { + + if (nonNull(status) && status.contains("FEIL")) { + return status; + } else if (nonNull(status) && status.length() > 3) { + return format("FEIL: %s", status.substring(3).replaceAll("\\d*%[A-Z]\\d*%", "").replaceAll("%; *", "")); + } else { + return "STATUS: TIDSAVBRUDD"; + } + } + + public static TpsMeldingResponse decodeStatus(TpsMeldingResponse response) { + + return nonNull(response) ? + TpsMeldingResponse.builder() + .returStatus("00".equals(response.getReturStatus()) || "04".equals(response.getReturStatus()) ? "OK" : "FEIL") + .returMelding(response.getReturMelding()) + .utfyllendeMelding(response.getUtfyllendeMelding()) + .build() : + TpsMeldingResponse.builder() + .returStatus("FEIL") + .returMelding("Ingen data") + .utfyllendeMelding("Melding fra TPS er tom") + .build(); + } +} \ No newline at end of file diff --git a/apps/tps-messaging-service/src/main/java/no/nav/testnav/apps/tpsmessagingservice/utils/ServiceRutineUtil.java b/apps/tps-messaging-service/src/main/java/no/nav/testnav/apps/tpsmessagingservice/utils/ServiceRutineUtil.java index 5833499e2f0..185b689203f 100644 --- a/apps/tps-messaging-service/src/main/java/no/nav/testnav/apps/tpsmessagingservice/utils/ServiceRutineUtil.java +++ b/apps/tps-messaging-service/src/main/java/no/nav/testnav/apps/tpsmessagingservice/utils/ServiceRutineUtil.java @@ -1,22 +1,22 @@ package no.nav.testnav.apps.tpsmessagingservice.utils; +import jakarta.xml.bind.JAXBContext; import lombok.SneakyThrows; import lombok.experimental.UtilityClass; -import no.nav.testnav.apps.tpsmessagingservice.dto.TpsServicerutineRequest; +import no.nav.testnav.apps.tpsmessagingservice.dto.TpsRequest; -import jakarta.xml.bind.JAXBContext; import java.io.StringWriter; @UtilityClass public class ServiceRutineUtil { @SneakyThrows - public static String marshallToXML(JAXBContext requestContext, TpsServicerutineRequest endringsmelding) { + public static String marshallToXML(JAXBContext requestContext, TpsRequest melding) { var marshaller = requestContext.createMarshaller(); var writer = new StringWriter(); - marshaller.marshal(endringsmelding, writer); + marshaller.marshal(melding, writer); return writer.toString(); } diff --git a/apps/tps-messaging-service/src/main/java/no/nav/testnav/apps/tpsmessagingservice/utils/TranslittereringUtil.java b/apps/tps-messaging-service/src/main/java/no/nav/testnav/apps/tpsmessagingservice/utils/TranslittereringUtil.java deleted file mode 100644 index 8e6383d5fbb..00000000000 --- a/apps/tps-messaging-service/src/main/java/no/nav/testnav/apps/tpsmessagingservice/utils/TranslittereringUtil.java +++ /dev/null @@ -1,131 +0,0 @@ -package no.nav.testnav.apps.tpsmessagingservice.utils; - -import com.ibm.icu.text.Transliterator; -import lombok.experimental.UtilityClass; -import lombok.val; - -import java.text.Normalizer; -import java.util.Map; -import java.util.regex.Pattern; - -import static java.util.Map.Entry; -import static java.util.Map.entry; -import static java.util.Map.ofEntries; -import static java.util.Objects.isNull; - -@UtilityClass -public class TranslittereringUtil { - - private final String LATIN_CYRILLIC = "Latin-Russian/BGN"; - private final Transliterator cyrillicToLatinTrans = Transliterator.getInstance(LATIN_CYRILLIC).getInverse(); - - private final Pattern pattern = Pattern.compile("\\p{InCombiningDiacriticalMarks}+"); - - private final Map PRINTABLE_BY_NON_PRINTABLE = ofEntries( - entry('å', '\u0001'), - entry('Å', '\u0002'), - entry('ä', '\u0003'), - entry('Ä', '\u0004'), - entry('é', '\u0005'), - entry('É', '\u0006'), - entry('è', '\u0007'), - entry('È', '\u0008'), - entry('ö', '\u000B'), - entry('Ö', '\u0010'), - entry('ü', '\u0011'), - entry('Ü', '\u0012') - ); - - /** - * Implementerer følgende regler: - *
    - *
  • {@code äöü éè æøå ÄÖÜ ÉÈ ÆØÅ} forblir uendret
  • - *
  • Folkeregisterets regler for translitterering mot DSF https://confluence.adeo.no/download/attachments/229949696/Regler%20for%20translitterering.docx
  • - *
  • DIFI sin erstatningstabell for samiske tegn https://www.difi.no/fagomrader-og-tjenester/digitalisering-og-samordning/standarder/forslag-og-utredninger/hvorfor-felles-tegnsett#Erstatningstabell
  • - *
  • Bokstavene i Unicode Basic Latin (ISO 8859-1) og noen enkeltbokstaver i Latin Extended-A og Extended-B
  • - *
- * Spesialregler for å håndtere tegn utover overstående regelsett blir laget for hvert enkelt tilfelle, se {@code convertKnownCharactersNotHandledByNormalization()}. - * Resten ignoreres/bevares. Se read-me for detaljer.
- */ - public String translitterer(String str) { - - if (isNull(str)) { - return null; - } - - final var prepared = preprocess(str); - final var normalized = pattern.matcher(Normalizer.normalize(prepared, Normalizer.Form.NFD)).replaceAll(""); - final var processed = postprocess(normalized); - String text = convertKnownCharactersNotHandledByNormalization(processed); - return cyrillicToLatinTrans.transliterate(text); - } - - private String preprocess(String str) { - // replace wanted characters with non-printable characters to save them from normalization - for (Entry entry : PRINTABLE_BY_NON_PRINTABLE.entrySet()) { - - var original = entry.getKey(); - var nonPrintable = entry.getValue(); - str = str.replace(nonPrintable.toString(), ""); - str = str.replace(original, nonPrintable); - } - return str; - } - - private String postprocess(String str) { - // replace non-printable characters with original characters after normalization - for (Entry entry : PRINTABLE_BY_NON_PRINTABLE.entrySet()) { - var original = entry.getKey(); - var nonPrintable = entry.getValue(); - str = str.replace(nonPrintable, original); - } - return str; - } - - private String convertKnownCharactersNotHandledByNormalization(String str) { - // replace characters not covered by normalization - return str - .replace('\u0189', 'D') // 'Ɖ' Afrikansk D - .replace('\u0256', 'd') // 'ɖ' Liten afrikansk d med hale - .replace('\u00D0', 'D') // 'Ð' Stor eth (islandsk) - .replace('\u00F0', 'd') // 'ð' Liten eth - .replace('\u0110', 'D') // 'Đ' Stor D med strek (samisk, slavisk, vietnamesisk, mf.) - .replace('\u0111', 'd') // 'đ' Liten d med strek - .replace('\u01E4', 'G') // 'Ǥ' Stor G med strek (samisk) - .replace('\u01E5', 'g') // Liten g med strek (samisk) - .replace('ı', 'i') // LATIN SMALL LETTER DOTLESS I U+0131 - .replace('Ł', 'L') - .replace('ł', 'l') - .replace('Ŋ', 'N') - .replace('ŋ', 'n') - .replace('Ŧ', 'T') - .replace('ŧ', 't') - .replace('Ɓ', 'B') // B med krok - .replace('ɓ', 'b') // b med krok - .replace('\u0187', 'C') // C med krok - .replace('\u0188', 'c') // c med krok - .replace('Ɗ', 'D') // D med krok - .replace('ɗ', 'd') // d med krok - .replace('Ɠ', 'G') // G med krok - .replace('ɠ', 'g') // g med krok - .replace('Ƙ', 'K') // K med krok - .replace('ƙ', 'k') // k med krok - .replace('Ƥ', 'P') // P med krok - .replace('ƥ', 'p') // p med krok - .replace('Ƭ', 'T') // T med krok - .replace('ƭ', 't') // t med krok - .replace('\u01B3', 'Y') // 'Ƴ', Y med krok U+01B3 - .replace('\u01B4', 'y') // 'ƴ', y med krok U+01B4 - .replace("Þ", "TH") - .replace("þ", "th") - .replace("ß", "ss") - .replace("⁰", "") - .replace("Ԉ", "(komi lje)") - .replace("Б", "be") // cyrillisk Komi Lje - .replace("\u001A", " ") // "substitute" control char (ascii 26) - - // strek symboler, finnes mange fler men tar en så lenge bare de vi har sett (https://en.wikipedia.org/wiki/Dash#Unicode) - .replace("–", "-") // Kort Tankestrek til Bindestrek - .replace("—", "-"); // Lang Tankestrek til Bindestrek - } -} \ No newline at end of file diff --git a/apps/tps-messaging-service/src/main/resources/application-prod.yaml b/apps/tps-messaging-service/src/main/resources/application-prod.yaml new file mode 100644 index 00000000000..896466cec53 --- /dev/null +++ b/apps/tps-messaging-service/src/main/resources/application-prod.yaml @@ -0,0 +1,9 @@ + +spring: + security: + oauth2: + resourceserver: + tokenx: + issuer-uri: ${TOKEN_X_ISSUER} + jwk-set-uri: ${TOKEN_X_JWKS_URI} + accepted-audience: ${TOKEN_X_CLIENT_ID} \ No newline at end of file diff --git a/apps/tps-messaging-service/src/main/resources/application.yaml b/apps/tps-messaging-service/src/main/resources/application.yaml index d55c85176d4..68eb6a128f4 100644 --- a/apps/tps-messaging-service/src/main/resources/application.yaml +++ b/apps/tps-messaging-service/src/main/resources/application.yaml @@ -3,6 +3,9 @@ AAD_ISSUER_URI: https://login.microsoftonline.com/62366534-1ec3-4962-8869-9b5535 spring: application: name: testnav-tps-messaging-service + cloud: + vault: + enabled: false flyway: enabled: false security: @@ -12,13 +15,6 @@ spring: issuer-uri: ${AAD_ISSUER_URI}/v2.0 jwk-set-uri: ${AAD_ISSUER_URI}/discovery/v2.0/keys accepted-audience: ${azure.app.client.id}, api://${azure.app.client.id} - tokenx: - issuer-uri: ${TOKEN_X_ISSUER} - jwk-set-uri: ${TOKEN_X_JWKS_URI} - accepted-audience: ${TOKEN_X_CLIENT_ID} - cloud: - vault: - enabled: false springdoc: swagger-ui: @@ -68,6 +64,7 @@ management: metrics: export: enabled: true + server: servlet: encoding: diff --git a/apps/tps-messaging-service/src/test/java/no/nav/testnav/apps/tpsmessagingservice/ApplicationContextTest.java b/apps/tps-messaging-service/src/test/java/no/nav/testnav/apps/tpsmessagingservice/ApplicationContextTest.java index bdd45254bf4..a2835984b37 100644 --- a/apps/tps-messaging-service/src/test/java/no/nav/testnav/apps/tpsmessagingservice/ApplicationContextTest.java +++ b/apps/tps-messaging-service/src/test/java/no/nav/testnav/apps/tpsmessagingservice/ApplicationContextTest.java @@ -25,4 +25,4 @@ void load_app_context() { assertThat(true).isTrue(); } -} +} \ No newline at end of file diff --git a/libs/data-transfer-objects/src/main/java/no/nav/testnav/libs/dto/endringsmelding/v1/FoedselsmeldingDTO.java b/libs/data-transfer-objects/src/main/java/no/nav/testnav/libs/dto/endringsmelding/v1/FoedselsmeldingDTO.java index b489d637b77..f3ba9c037fe 100644 --- a/libs/data-transfer-objects/src/main/java/no/nav/testnav/libs/dto/endringsmelding/v1/FoedselsmeldingDTO.java +++ b/libs/data-transfer-objects/src/main/java/no/nav/testnav/libs/dto/endringsmelding/v1/FoedselsmeldingDTO.java @@ -12,6 +12,7 @@ @AllArgsConstructor @NoArgsConstructor(force = true) public class FoedselsmeldingDTO { + String identFar; String identMor; String identtype; diff --git a/libs/data-transfer-objects/src/main/java/no/nav/testnav/libs/dto/endringsmelding/v2/AdresseFra.java b/libs/data-transfer-objects/src/main/java/no/nav/testnav/libs/dto/endringsmelding/v2/AdresseFra.java new file mode 100644 index 00000000000..43b8d22c0f8 --- /dev/null +++ b/libs/data-transfer-objects/src/main/java/no/nav/testnav/libs/dto/endringsmelding/v2/AdresseFra.java @@ -0,0 +1,7 @@ +package no.nav.testnav.libs.dto.endringsmelding.v2; + +public enum AdresseFra { + LAG_NY_ADRESSE, + ARV_FRA_MORS, + ARV_FRA_FARS +} diff --git a/libs/data-transfer-objects/src/main/java/no/nav/testnav/libs/dto/endringsmelding/v2/DoedsmeldingDTO.java b/libs/data-transfer-objects/src/main/java/no/nav/testnav/libs/dto/endringsmelding/v2/DoedsmeldingDTO.java new file mode 100644 index 00000000000..83b879d2492 --- /dev/null +++ b/libs/data-transfer-objects/src/main/java/no/nav/testnav/libs/dto/endringsmelding/v2/DoedsmeldingDTO.java @@ -0,0 +1,18 @@ +package no.nav.testnav.libs.dto.endringsmelding.v2; + +import lombok.AllArgsConstructor; +import lombok.Builder; +import lombok.NoArgsConstructor; +import lombok.Value; + +import java.time.LocalDate; + +@Value +@Builder +@AllArgsConstructor +@NoArgsConstructor(force = true) +public class DoedsmeldingDTO { + + String ident; + LocalDate doedsdato; +} diff --git a/libs/data-transfer-objects/src/main/java/no/nav/testnav/libs/dto/endringsmelding/v2/DoedsmeldingResponseDTO.java b/libs/data-transfer-objects/src/main/java/no/nav/testnav/libs/dto/endringsmelding/v2/DoedsmeldingResponseDTO.java new file mode 100644 index 00000000000..7d729a22168 --- /dev/null +++ b/libs/data-transfer-objects/src/main/java/no/nav/testnav/libs/dto/endringsmelding/v2/DoedsmeldingResponseDTO.java @@ -0,0 +1,20 @@ +package no.nav.testnav.libs.dto.endringsmelding.v2; + +import lombok.AllArgsConstructor; +import lombok.Builder; +import lombok.Data; +import lombok.NoArgsConstructor; + +import java.util.Map; + +@Data +@Builder +@NoArgsConstructor +@AllArgsConstructor +public class DoedsmeldingResponseDTO { + + private String ident; + private Map miljoStatus; + + private String error; +} \ No newline at end of file diff --git a/libs/data-transfer-objects/src/main/java/no/nav/testnav/libs/dto/endringsmelding/v2/FoedselsmeldingDTO.java b/libs/data-transfer-objects/src/main/java/no/nav/testnav/libs/dto/endringsmelding/v2/FoedselsmeldingDTO.java new file mode 100644 index 00000000000..2b7ede29057 --- /dev/null +++ b/libs/data-transfer-objects/src/main/java/no/nav/testnav/libs/dto/endringsmelding/v2/FoedselsmeldingDTO.java @@ -0,0 +1,22 @@ +package no.nav.testnav.libs.dto.endringsmelding.v2; + +import lombok.AllArgsConstructor; +import lombok.Builder; +import lombok.NoArgsConstructor; +import lombok.Value; + +import java.time.LocalDate; + +@Value +@Builder +@AllArgsConstructor +@NoArgsConstructor(force = true) +public class FoedselsmeldingDTO { + + String identFar; + String identMor; + Identtype identtype; + LocalDate foedselsdato; + Kjoenn kjoenn; + AdresseFra adresseFra; +} diff --git a/libs/data-transfer-objects/src/main/java/no/nav/testnav/libs/dto/endringsmelding/v2/FoedselsmeldingResponseDTO.java b/libs/data-transfer-objects/src/main/java/no/nav/testnav/libs/dto/endringsmelding/v2/FoedselsmeldingResponseDTO.java new file mode 100644 index 00000000000..c61fce4c5c0 --- /dev/null +++ b/libs/data-transfer-objects/src/main/java/no/nav/testnav/libs/dto/endringsmelding/v2/FoedselsmeldingResponseDTO.java @@ -0,0 +1,20 @@ +package no.nav.testnav.libs.dto.endringsmelding.v2; + +import lombok.AllArgsConstructor; +import lombok.Builder; +import lombok.Data; +import lombok.NoArgsConstructor; + +import java.util.Map; + +@Data +@Builder +@NoArgsConstructor +@AllArgsConstructor +public class FoedselsmeldingResponseDTO { + + private String ident; + private Map miljoStatus; + + private String error; +} \ No newline at end of file diff --git a/libs/data-transfer-objects/src/main/java/no/nav/testnav/libs/dto/endringsmelding/v2/Identtype.java b/libs/data-transfer-objects/src/main/java/no/nav/testnav/libs/dto/endringsmelding/v2/Identtype.java new file mode 100644 index 00000000000..326333c2de5 --- /dev/null +++ b/libs/data-transfer-objects/src/main/java/no/nav/testnav/libs/dto/endringsmelding/v2/Identtype.java @@ -0,0 +1,8 @@ +package no.nav.testnav.libs.dto.endringsmelding.v2; + +public enum Identtype { + + FNR, + DNR, + BOST +} diff --git a/libs/data-transfer-objects/src/main/java/no/nav/testnav/libs/dto/endringsmelding/v2/KansellerDoedsmeldingDTO.java b/libs/data-transfer-objects/src/main/java/no/nav/testnav/libs/dto/endringsmelding/v2/KansellerDoedsmeldingDTO.java new file mode 100644 index 00000000000..cd76040f29e --- /dev/null +++ b/libs/data-transfer-objects/src/main/java/no/nav/testnav/libs/dto/endringsmelding/v2/KansellerDoedsmeldingDTO.java @@ -0,0 +1,15 @@ +package no.nav.testnav.libs.dto.endringsmelding.v2; + +import lombok.AllArgsConstructor; +import lombok.Builder; +import lombok.NoArgsConstructor; +import lombok.Value; + +@Value +@Builder +@AllArgsConstructor +@NoArgsConstructor(force = true) +public class KansellerDoedsmeldingDTO { + + String ident; +} diff --git a/libs/data-transfer-objects/src/main/java/no/nav/testnav/libs/dto/endringsmelding/v2/Kjoenn.java b/libs/data-transfer-objects/src/main/java/no/nav/testnav/libs/dto/endringsmelding/v2/Kjoenn.java new file mode 100644 index 00000000000..975a8ffd376 --- /dev/null +++ b/libs/data-transfer-objects/src/main/java/no/nav/testnav/libs/dto/endringsmelding/v2/Kjoenn.java @@ -0,0 +1,7 @@ +package no.nav.testnav.libs.dto.endringsmelding.v2; + +public enum Kjoenn { + GUTT, + JENTE, + UKJENT +} diff --git a/libs/data-transfer-search-objects/src/main/java/no/nav/testnav/libs/data/tpsmessagingservice/v1/AdresseDTO.java b/libs/data-transfer-search-objects/src/main/java/no/nav/testnav/libs/data/tpsmessagingservice/v1/AdresseDTO.java index 9e941f3622e..b2ae6fd4b22 100644 --- a/libs/data-transfer-search-objects/src/main/java/no/nav/testnav/libs/data/tpsmessagingservice/v1/AdresseDTO.java +++ b/libs/data-transfer-search-objects/src/main/java/no/nav/testnav/libs/data/tpsmessagingservice/v1/AdresseDTO.java @@ -5,10 +5,12 @@ import com.fasterxml.jackson.annotation.JsonTypeInfo; import lombok.Data; import lombok.NoArgsConstructor; +import lombok.experimental.SuperBuilder; import java.time.LocalDateTime; @Data +@SuperBuilder @NoArgsConstructor @JsonTypeInfo(use = JsonTypeInfo.Id.NAME, property = "adressetype") @JsonSubTypes({ @@ -19,14 +21,16 @@ public abstract class AdresseDTO { private String kommunenr; + private String kommuneNavn; private LocalDateTime flyttedato; private LocalDateTime gyldigTilDato; private String postnr; + private String poststed; private String tilleggsadresse; private String bolignr; private Boolean deltAdresse; private String matrikkelId; - private Adressetype adressetype; + public abstract Adressetype getAdressetype(); public enum Adressetype {GATE, MATR} } diff --git a/libs/data-transfer-search-objects/src/main/java/no/nav/testnav/libs/data/tpsmessagingservice/v1/AdressehistorikkDTO.java b/libs/data-transfer-search-objects/src/main/java/no/nav/testnav/libs/data/tpsmessagingservice/v1/AdressehistorikkDTO.java new file mode 100644 index 00000000000..0948d9874d9 --- /dev/null +++ b/libs/data-transfer-search-objects/src/main/java/no/nav/testnav/libs/data/tpsmessagingservice/v1/AdressehistorikkDTO.java @@ -0,0 +1,227 @@ +package no.nav.testnav.libs.data.tpsmessagingservice.v1; + +import com.fasterxml.jackson.annotation.JsonInclude; +import lombok.AllArgsConstructor; +import lombok.Builder; +import lombok.Data; +import lombok.NoArgsConstructor; + +import java.time.LocalDate; +import java.time.LocalDateTime; +import java.util.ArrayList; +import java.util.List; + +import static java.util.Objects.isNull; +import static java.util.Objects.nonNull; + +@Data +@Builder +@NoArgsConstructor +@AllArgsConstructor +public class AdressehistorikkDTO { + + public enum PersonStatus { + ABNR, + ADNR, + BOSA, + DØD, + DØDD, + FØDR, + FOSV, + UREG, + UTPE, + UTAN, + UFUL, + UTVA + } + + private String miljoe; + private TpsMeldingResponse status; + private PersonData persondata; + + @Data + @Builder + @NoArgsConstructor + @AllArgsConstructor + public static class PersonData { + private String Ident; + private String identType; + private List personStatus; + private List bostedsAdresse; + private List postAdresse; + private List tilleggAdresseNAV; + + public List getPersonStatus() { + + if (isNull(personStatus)) { + personStatus = new ArrayList<>(); + } + return personStatus; + } + + public List getBostedsAdresse() { + + if (isNull(bostedsAdresse)) { + bostedsAdresse = new ArrayList<>(); + } + return bostedsAdresse; + } + + public List getPostAdresse() { + + if (isNull(postAdresse)) { + postAdresse = new ArrayList<>(); + } + return postAdresse; + } + + public List getTilleggAdresseNAV() { + + if (isNull(tilleggAdresseNAV)) { + tilleggAdresseNAV = new ArrayList<>(); + } + return tilleggAdresseNAV; + } + } + + @Data + @Builder + @NoArgsConstructor + @AllArgsConstructor + public static class PersonstatusType { + + protected LocalDate datoFom; + protected LocalDate datoTom; + protected PersonStatus kodePersonstatus; + protected LocalDateTime tidspunktReg; + protected String system; + protected String saksbehandler; + } + + @Data + @Builder + @NoArgsConstructor + @AllArgsConstructor + public static class BoAdresseType { + private LocalDate datoFom; + private LocalDate datoTom; + private String adresse1; + private String adresse2; + private String tilleggsAdresseSKD; + private String kommunenr; + private String kommuneNavn; + private String bolignr; + private String postnr; + private String poststed; + private String landKode; + private String land; + private String adresseType; + private String beskrAdrType; + private LOffAdrType offAdresse; + private LMatrAdrType matrAdresse; + private LocalDateTime tidspunktReg; + private String system; + private String saksbehandler; + } + + @Data + @Builder + @NoArgsConstructor + @AllArgsConstructor + public static class PostAdresseType { + + private LocalDate datoFom; + private LocalDate datoTom; + private String landKode; + private String land; + private String adresseType; + private String beskrAdrType; + private String adresse1; + private String adresse2; + private String adresse3; + private String postnr; + private String poststed; + private LocalDateTime tidspunktReg; + private String system; + private String saksbehandler; + } + + @Data + @Builder + @NoArgsConstructor + @AllArgsConstructor + public static class NavTilleggType { + + private LocalDate datoFom; + private LocalDate datoTom; + private String adresseType; + private String beskrAdrType; + private String typeAdresseNavNorge; + private String beskrTypeAdresseNavNorge; + private String typeTilleggsLinje; + private String beskrTypeTilleggsLinje; + private String tilleggsLinje; + private String kommunenr; + private String kommuneNavn; + private String gatekode; + private String gatenavn; + private String husnr; + private String husbokstav; + private String eiendomsnavn; + private String bolignr; + private String postboksnr; + private String postboksAnlegg; + private String postnr; + private String poststed; + private String landKode; + private String land; + private String adresse1; + private String adresse2; + private String adresse3; + private LocalDateTime tidspunktReg; + private String system; + private String saksbehandler; + } + + @Data + @Builder + @NoArgsConstructor + @AllArgsConstructor + public static class LOffAdrType { + + private String gatekode; + private String gateNavn; + private String husnr; + private String bokstav; + } + + @Data + @Builder + @NoArgsConstructor + @AllArgsConstructor + public static class LMatrAdrType { + + protected String mellomAdresse; + protected String gardsnr; + protected String bruksnr; + protected String festenr; + protected String undernr; + } + + @Data + @Builder + @NoArgsConstructor + @AllArgsConstructor + @JsonInclude(JsonInclude.Include.NON_EMPTY) + public static class TpsMeldingResponse { + + private String returStatus; + private String returMelding; + private String utfyllendeMelding; + } + + public boolean isOk() { + + return nonNull(status) && "OK".equals(status.getReturStatus()); + } +} diff --git a/libs/data-transfer-search-objects/src/main/java/no/nav/testnav/libs/data/tpsmessagingservice/v1/AdressehistorikkRequest.java b/libs/data-transfer-search-objects/src/main/java/no/nav/testnav/libs/data/tpsmessagingservice/v1/AdressehistorikkRequest.java new file mode 100644 index 00000000000..cc03d94cf36 --- /dev/null +++ b/libs/data-transfer-search-objects/src/main/java/no/nav/testnav/libs/data/tpsmessagingservice/v1/AdressehistorikkRequest.java @@ -0,0 +1,18 @@ +package no.nav.testnav.libs.data.tpsmessagingservice.v1; + +import lombok.AllArgsConstructor; +import lombok.Builder; +import lombok.Data; +import lombok.NoArgsConstructor; + +import java.time.LocalDate; + +@Data +@Builder +@NoArgsConstructor +@AllArgsConstructor +public class AdressehistorikkRequest { + + private String ident; + private LocalDate aksjonsdato; +} diff --git a/libs/data-transfer-search-objects/src/main/java/no/nav/testnav/libs/data/tpsmessagingservice/v1/DoedsmeldingRequest.java b/libs/data-transfer-search-objects/src/main/java/no/nav/testnav/libs/data/tpsmessagingservice/v1/DoedsmeldingRequest.java new file mode 100644 index 00000000000..14a81480d20 --- /dev/null +++ b/libs/data-transfer-search-objects/src/main/java/no/nav/testnav/libs/data/tpsmessagingservice/v1/DoedsmeldingRequest.java @@ -0,0 +1,18 @@ +package no.nav.testnav.libs.data.tpsmessagingservice.v1; + +import lombok.AllArgsConstructor; +import lombok.Builder; +import lombok.Data; +import lombok.NoArgsConstructor; + +import java.time.LocalDate; + +@Data +@Builder +@NoArgsConstructor +@AllArgsConstructor +public class DoedsmeldingRequest { + + private String ident; + private LocalDate doedsdato; +} diff --git a/libs/data-transfer-search-objects/src/main/java/no/nav/testnav/libs/data/tpsmessagingservice/v1/DoedsmeldingResponse.java b/libs/data-transfer-search-objects/src/main/java/no/nav/testnav/libs/data/tpsmessagingservice/v1/DoedsmeldingResponse.java new file mode 100644 index 00000000000..1cc4f590840 --- /dev/null +++ b/libs/data-transfer-search-objects/src/main/java/no/nav/testnav/libs/data/tpsmessagingservice/v1/DoedsmeldingResponse.java @@ -0,0 +1,18 @@ +package no.nav.testnav.libs.data.tpsmessagingservice.v1; + +import lombok.AllArgsConstructor; +import lombok.Builder; +import lombok.Data; +import lombok.NoArgsConstructor; + +import java.util.Map; + +@Data +@Builder +@NoArgsConstructor +@AllArgsConstructor +public class DoedsmeldingResponse { + + private String ident; + private Map miljoStatus; +} diff --git a/libs/data-transfer-search-objects/src/main/java/no/nav/testnav/libs/data/tpsmessagingservice/v1/FoedselsmeldingRequest.java b/libs/data-transfer-search-objects/src/main/java/no/nav/testnav/libs/data/tpsmessagingservice/v1/FoedselsmeldingRequest.java new file mode 100644 index 00000000000..cc8a798d610 --- /dev/null +++ b/libs/data-transfer-search-objects/src/main/java/no/nav/testnav/libs/data/tpsmessagingservice/v1/FoedselsmeldingRequest.java @@ -0,0 +1,17 @@ +package no.nav.testnav.libs.data.tpsmessagingservice.v1; + +import lombok.AllArgsConstructor; +import lombok.Builder; +import lombok.Data; +import lombok.NoArgsConstructor; + +@Data +@Builder +@NoArgsConstructor +@AllArgsConstructor +public class FoedselsmeldingRequest { + + private PersonDTO barn; + private PersonDTO mor; + private PersonDTO far; +} diff --git a/libs/data-transfer-search-objects/src/main/java/no/nav/testnav/libs/data/tpsmessagingservice/v1/FoedselsmeldingResponse.java b/libs/data-transfer-search-objects/src/main/java/no/nav/testnav/libs/data/tpsmessagingservice/v1/FoedselsmeldingResponse.java new file mode 100644 index 00000000000..9b055c124fb --- /dev/null +++ b/libs/data-transfer-search-objects/src/main/java/no/nav/testnav/libs/data/tpsmessagingservice/v1/FoedselsmeldingResponse.java @@ -0,0 +1,18 @@ +package no.nav.testnav.libs.data.tpsmessagingservice.v1; + +import lombok.AllArgsConstructor; +import lombok.Builder; +import lombok.Data; +import lombok.NoArgsConstructor; + +import java.util.Map; + +@Data +@Builder +@NoArgsConstructor +@AllArgsConstructor +public class FoedselsmeldingResponse { + + private String ident; + private Map miljoStatus; +} diff --git a/libs/data-transfer-search-objects/src/main/java/no/nav/testnav/libs/data/tpsmessagingservice/v1/GateadresseDTO.java b/libs/data-transfer-search-objects/src/main/java/no/nav/testnav/libs/data/tpsmessagingservice/v1/GateadresseDTO.java index d9ce3d70123..47179d98b40 100644 --- a/libs/data-transfer-search-objects/src/main/java/no/nav/testnav/libs/data/tpsmessagingservice/v1/GateadresseDTO.java +++ b/libs/data-transfer-search-objects/src/main/java/no/nav/testnav/libs/data/tpsmessagingservice/v1/GateadresseDTO.java @@ -2,13 +2,15 @@ import com.fasterxml.jackson.annotation.JsonInclude; import lombok.AllArgsConstructor; -import lombok.Builder; import lombok.Data; import lombok.EqualsAndHashCode; import lombok.NoArgsConstructor; +import lombok.ToString; +import lombok.experimental.SuperBuilder; @Data -@Builder +@ToString(callSuper = true) +@SuperBuilder @EqualsAndHashCode(callSuper = true) @NoArgsConstructor @AllArgsConstructor @@ -19,5 +21,12 @@ public class GateadresseDTO extends AdresseDTO { private String husnummer; + private String husbokstav; + private String gatekode; + + @Override + public Adressetype getAdressetype() { + return Adressetype.GATE; + } } diff --git a/libs/data-transfer-search-objects/src/main/java/no/nav/testnav/libs/data/tpsmessagingservice/v1/IdentMiljoeDTO.java b/libs/data-transfer-search-objects/src/main/java/no/nav/testnav/libs/data/tpsmessagingservice/v1/IdentMiljoeDTO.java new file mode 100644 index 00000000000..d6b71aef34f --- /dev/null +++ b/libs/data-transfer-search-objects/src/main/java/no/nav/testnav/libs/data/tpsmessagingservice/v1/IdentMiljoeDTO.java @@ -0,0 +1,31 @@ +package no.nav.testnav.libs.data.tpsmessagingservice.v1; + +import com.fasterxml.jackson.annotation.JsonInclude; +import lombok.AllArgsConstructor; +import lombok.Builder; +import lombok.Data; +import lombok.NoArgsConstructor; + +import java.util.HashSet; +import java.util.Set; + +import static java.util.Objects.isNull; + +@Data +@Builder +@NoArgsConstructor +@AllArgsConstructor +@JsonInclude(JsonInclude.Include.NON_EMPTY) +public class IdentMiljoeDTO { + + private String ident; + private Set miljoer; + + public Set getMiljoer() { + + if (isNull(miljoer)) { + miljoer = new HashSet<>(); + } + return miljoer; + } +} \ No newline at end of file diff --git a/libs/data-transfer-search-objects/src/main/java/no/nav/testnav/libs/data/tpsmessagingservice/v1/MatrikkeladresseDTO.java b/libs/data-transfer-search-objects/src/main/java/no/nav/testnav/libs/data/tpsmessagingservice/v1/MatrikkeladresseDTO.java index 360c6e67fb0..26ede8186a0 100644 --- a/libs/data-transfer-search-objects/src/main/java/no/nav/testnav/libs/data/tpsmessagingservice/v1/MatrikkeladresseDTO.java +++ b/libs/data-transfer-search-objects/src/main/java/no/nav/testnav/libs/data/tpsmessagingservice/v1/MatrikkeladresseDTO.java @@ -2,13 +2,15 @@ import com.fasterxml.jackson.annotation.JsonInclude; import lombok.AllArgsConstructor; -import lombok.Builder; import lombok.Data; import lombok.EqualsAndHashCode; import lombok.NoArgsConstructor; +import lombok.ToString; +import lombok.experimental.SuperBuilder; @Data -@Builder +@ToString(callSuper = true) +@SuperBuilder @EqualsAndHashCode(callSuper = true) @NoArgsConstructor @AllArgsConstructor @@ -24,4 +26,9 @@ public class MatrikkeladresseDTO extends AdresseDTO { private String festenr; private String undernr; + + @Override + public Adressetype getAdressetype() { + return Adressetype.MATR; + } } diff --git a/libs/data-transfer-search-objects/src/main/java/no/nav/testnav/libs/data/tpsmessagingservice/v1/PersonDTO.java b/libs/data-transfer-search-objects/src/main/java/no/nav/testnav/libs/data/tpsmessagingservice/v1/PersonDTO.java index bfad5551584..5e7930b1f28 100644 --- a/libs/data-transfer-search-objects/src/main/java/no/nav/testnav/libs/data/tpsmessagingservice/v1/PersonDTO.java +++ b/libs/data-transfer-search-objects/src/main/java/no/nav/testnav/libs/data/tpsmessagingservice/v1/PersonDTO.java @@ -13,6 +13,7 @@ import java.util.List; import static java.util.Objects.isNull; +import static java.util.Objects.nonNull; @Data @Builder @@ -105,4 +106,9 @@ public List getTelefonnumre() { } return telefonnumre; } + + public boolean isDoed() { + + return nonNull(doedsdato); + } } From 69db3ed4057a26a57de0f8d78deae64b9266bc5e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Kristen=20H=C3=A6rum?= Date: Thu, 14 Mar 2024 14:12:42 +0100 Subject: [PATCH 02/20] Feature/amelding progress indikator (#3431) Feilretting ved innsending av Amelding --- .../dolly/DollyBackendApplicationStarter.java | 2 +- .../dolly/bestilling/aareg/AaregClient.java | 3 +- .../aareg/amelding/AmeldingConsumer.java | 33 +++++++++++++++---- .../aareg/amelding/AmeldingService.java | 20 ++++++----- .../AmeldingRequestMappingStrategy.java | 28 ++++++++++------ .../mapper/BestillingAaregStatusMapper.java | 33 ++++++++++--------- .../OppsummeringsdokumentRepository.java | 5 --- .../service/SearchQueryUtility.java | 2 +- 8 files changed, 78 insertions(+), 48 deletions(-) diff --git a/apps/dolly-backend/src/main/java/no/nav/dolly/DollyBackendApplicationStarter.java b/apps/dolly-backend/src/main/java/no/nav/dolly/DollyBackendApplicationStarter.java index 6af8668f777..f0ef428e58d 100644 --- a/apps/dolly-backend/src/main/java/no/nav/dolly/DollyBackendApplicationStarter.java +++ b/apps/dolly-backend/src/main/java/no/nav/dolly/DollyBackendApplicationStarter.java @@ -10,4 +10,4 @@ public static void main(String[] args) { SpringApplication.run(DollyBackendApplicationStarter.class, args); } -} \ No newline at end of file +} diff --git a/apps/dolly-backend/src/main/java/no/nav/dolly/bestilling/aareg/AaregClient.java b/apps/dolly-backend/src/main/java/no/nav/dolly/bestilling/aareg/AaregClient.java index 7e7b9949089..2d1f778f561 100644 --- a/apps/dolly-backend/src/main/java/no/nav/dolly/bestilling/aareg/AaregClient.java +++ b/apps/dolly-backend/src/main/java/no/nav/dolly/bestilling/aareg/AaregClient.java @@ -68,6 +68,7 @@ public Flux gjenopprett(RsDollyUtvidetBestilling bestilling, Dolly var initStatus = miljoer.stream() .map(miljo -> String.format("%s:%s", miljo, getInfoVenter(SYSTEM))) .collect(Collectors.joining(",")); + transactionHelperService.persister(progress, BestillingProgress::getAaregStatus, BestillingProgress::setAaregStatus, initStatus); @@ -79,7 +80,7 @@ public Flux gjenopprett(RsDollyUtvidetBestilling bestilling, Dolly return sendArbeidsforhold(bestilling, dollyPerson, miljoerTrygg.get(), isOpprettEndre); } else { - return ameldingService.sendAmelding(bestilling, dollyPerson, miljoerTrygg.get()); + return ameldingService.sendAmelding(bestilling, dollyPerson, miljoerTrygg.get(), progress); } }) .map(status -> futurePersist(progress, status)); diff --git a/apps/dolly-backend/src/main/java/no/nav/dolly/bestilling/aareg/amelding/AmeldingConsumer.java b/apps/dolly-backend/src/main/java/no/nav/dolly/bestilling/aareg/amelding/AmeldingConsumer.java index 764d7cecd77..a967466d8b0 100644 --- a/apps/dolly-backend/src/main/java/no/nav/dolly/bestilling/aareg/amelding/AmeldingConsumer.java +++ b/apps/dolly-backend/src/main/java/no/nav/dolly/bestilling/aareg/amelding/AmeldingConsumer.java @@ -5,18 +5,24 @@ import lombok.extern.slf4j.Slf4j; import no.nav.dolly.bestilling.aareg.command.AmeldingPutCommand; import no.nav.dolly.config.Consumers; +import no.nav.dolly.domain.jpa.BestillingProgress; import no.nav.dolly.errorhandling.ErrorStatusDecoder; import no.nav.dolly.metrics.Timed; import no.nav.testnav.libs.dto.ameldingservice.v1.AMeldingDTO; import no.nav.testnav.libs.dto.ameldingservice.v1.VirksomhetDTO; import no.nav.testnav.libs.securitycore.domain.ServerProperties; import no.nav.testnav.libs.standalone.servletsecurity.exchange.TokenExchange; +import org.slf4j.event.Level; import org.springframework.http.HttpStatus; +import org.springframework.http.client.reactive.ReactorClientHttpConnector; import org.springframework.stereotype.Service; import org.springframework.web.reactive.function.client.WebClient; import reactor.core.publisher.Flux; import reactor.core.publisher.Mono; +import reactor.netty.http.client.HttpClient; +import reactor.netty.resources.ConnectionProvider; +import java.time.Duration; import java.time.format.DateTimeFormatter; import java.util.List; import java.util.stream.Collectors; @@ -30,7 +36,6 @@ public class AmeldingConsumer { private static final String JURIDISK_ENHET_IKKE_FUNNET = "Feil= Juridisk enhet for organisasjon(ene): %s ble ikke funnet i miljø"; private static final DateTimeFormatter YEAR_MONTH = DateTimeFormatter.ofPattern("yyyy-MM"); - private final TokenExchange tokenService; private final WebClient webClient; private final ServerProperties serverProperties; @@ -41,19 +46,29 @@ public AmeldingConsumer( Consumers consumers, ObjectMapper objectMapper, ErrorStatusDecoder errorStatusDecoder, - WebClient.Builder webClientBuilder - ) { + WebClient.Builder webClientBuilder) { + this.tokenService = tokenService; serverProperties = consumers.getTestnavAmeldingService(); this.webClient = webClientBuilder .baseUrl(serverProperties.getUrl()) .exchangeStrategies(getJacksonStrategy(objectMapper)) + .clientConnector( + new ReactorClientHttpConnector( + HttpClient + .create(ConnectionProvider.builder("Testnorge connection pool") + .maxConnections(5) + .pendingAcquireMaxCount(10000) + .pendingAcquireTimeout(Duration.ofMinutes(30)) + .build()) + .responseTimeout(Duration.ofSeconds(3)) + )) .build(); this.errorStatusDecoder = errorStatusDecoder; } - @Timed(name = "providers", tags = { "operation", "amelding_put" }) - public Flux sendAmeldinger(List ameldinger, String miljoe) { + @Timed(name = "providers", tags = {"operation", "amelding_put"}) + public Flux sendAmeldinger(List ameldinger, String miljoe, BestillingProgress progress) { return tokenService.exchange(serverProperties) .flatMapMany(token -> Flux.fromIterable(ameldinger) @@ -67,9 +82,13 @@ public Flux sendAmeldinger(List ameldinger, String miljoe) log.info("Sender Amelding {} til miljø {}: {}", amelding.getKalendermaaned().format(YEAR_MONTH), miljoe, Json.pretty(amelding)); return new AmeldingPutCommand(webClient, amelding, miljoe, token.getTokenValue()).call() - .doOnNext(status -> log.info("Ameldingstatus: {}", status.getStatusCode())) .map(status -> status.getStatusCode().is2xxSuccessful() ? "OK" : - errorStatusDecoder.getErrorText(HttpStatus.valueOf(status.getStatusCode().value()), status.getBody())); + errorStatusDecoder.getErrorText(HttpStatus.valueOf(status.getStatusCode().value()), status.getBody())) + .doOnNext(status -> + log.atLevel("OK".equals(status) ? Level.INFO : Level.ERROR) + .log("Ameldingstatus: {}, miljoe: {}, kalendermåned: {}, organisasjon: {}", + status, miljoe, amelding.getKalendermaaned(), + amelding.getOpplysningspliktigOrganisajonsnummer())); } })); } diff --git a/apps/dolly-backend/src/main/java/no/nav/dolly/bestilling/aareg/amelding/AmeldingService.java b/apps/dolly-backend/src/main/java/no/nav/dolly/bestilling/aareg/amelding/AmeldingService.java index 388baf613bc..95b766dcb39 100644 --- a/apps/dolly-backend/src/main/java/no/nav/dolly/bestilling/aareg/amelding/AmeldingService.java +++ b/apps/dolly-backend/src/main/java/no/nav/dolly/bestilling/aareg/amelding/AmeldingService.java @@ -4,6 +4,7 @@ import lombok.extern.slf4j.Slf4j; import ma.glasnost.orika.MapperFacade; import ma.glasnost.orika.MappingContext; +import no.nav.dolly.domain.jpa.BestillingProgress; import no.nav.dolly.domain.resultset.RsDollyUtvidetBestilling; import no.nav.dolly.domain.resultset.aareg.RsAareg; import no.nav.dolly.domain.resultset.aareg.RsAmeldingRequest; @@ -16,6 +17,7 @@ import reactor.core.publisher.Mono; import java.util.Collection; +import java.util.Comparator; import java.util.Map; import java.util.Set; import java.util.stream.Collectors; @@ -25,16 +27,16 @@ @Slf4j public class AmeldingService { - private static final String STATUS_ELEMENT = "%s: arbforhold=1$%s"; + private static final String STATUS_ELEMENT = "%s:Amelding$%s"; private final AmeldingConsumer ameldingConsumer; private final MapperFacade mapperFacade; private final OrganisasjonServiceConsumer organisasjonServiceConsumer; public Mono sendAmelding(RsDollyUtvidetBestilling bestilling, DollyPerson dollyPerson, - Set miljoer) { + Set miljoer, BestillingProgress progress) { - var orgnumre = bestilling.getAareg().get(0).getAmelding().stream() + var orgnumre = bestilling.getAareg().getFirst().getAmelding().stream() .map(RsAmeldingRequest::getArbeidsforhold) .flatMap(Collection::stream) .map(RsArbeidsforholdAareg::getArbeidsgiver) @@ -46,14 +48,15 @@ public Mono sendAmelding(RsDollyUtvidetBestilling bestilling, DollyPerso .filter(OrganisasjonDTO::isFunnet) .collect(Collectors.toMap(OrganisasjonDTO::getOrgnummer, OrganisasjonDTO::getJuridiskEnhet)) .flatMapMany(organisasjon -> - prepareAmeldinger(bestilling.getAareg().get(0), dollyPerson.getIdent(), - organisasjon, miljoe)) + prepareAmeldinger(bestilling.getAareg().getFirst(), dollyPerson.getIdent(), + organisasjon, miljoe, progress)) .collect(Collectors.joining(","))) .flatMap(Flux::from) .collect(Collectors.joining(",")); } - private Flux prepareAmeldinger(RsAareg aareg, String ident, Map organisasjon, String miljoe) { + private Flux prepareAmeldinger(RsAareg aareg, String ident, Map organisasjon, + String miljoe, BestillingProgress progress) { var context = new MappingContext.Factory().getContext(); context.setProperty("personIdent", ident); @@ -62,9 +65,10 @@ private Flux prepareAmeldinger(RsAareg aareg, String ident, Map mapperFacade.map(aamelding, AMeldingDTO.class, context)) + .sort(Comparator.comparing(AMeldingDTO::getKalendermaaned)) .collectList() - .flatMapMany(reultat -> ameldingConsumer.sendAmeldinger(reultat, miljoe) + .flatMapMany(ameldinger -> ameldingConsumer.sendAmeldinger(ameldinger, miljoe, progress) .distinct() - .map(status -> String.format(STATUS_ELEMENT, miljoe, status))); + .map(status -> STATUS_ELEMENT.formatted(miljoe, status))); } } diff --git a/apps/dolly-backend/src/main/java/no/nav/dolly/bestilling/aareg/amelding/mapper/AmeldingRequestMappingStrategy.java b/apps/dolly-backend/src/main/java/no/nav/dolly/bestilling/aareg/amelding/mapper/AmeldingRequestMappingStrategy.java index 9d0d11df1b2..89ad49345d5 100644 --- a/apps/dolly-backend/src/main/java/no/nav/dolly/bestilling/aareg/amelding/mapper/AmeldingRequestMappingStrategy.java +++ b/apps/dolly-backend/src/main/java/no/nav/dolly/bestilling/aareg/amelding/mapper/AmeldingRequestMappingStrategy.java @@ -24,6 +24,7 @@ import java.time.LocalDate; import java.time.LocalDateTime; import java.util.Collection; +import java.util.HashMap; import java.util.List; import java.util.Map; import java.util.concurrent.atomic.AtomicInteger; @@ -54,16 +55,21 @@ public void mapAtoB(RsAmeldingRequest rsAmelding, amelding.setKalendermaaned(LocalDate.of(Integer.parseInt(date[0]), Integer.parseInt(date[1]), 1)); var opplysningsPliktig = (Map) context.getProperty("opplysningspliktig"); - amelding.setOpplysningspliktigOrganisajonsnummer(opplysningsPliktig.get(rsAmelding.getArbeidsforhold().get(0).getArbeidsgiver().getOrgnummer())); + amelding.setOpplysningspliktigOrganisajonsnummer(opplysningsPliktig.get(rsAmelding.getArbeidsforhold() + .getFirst().getArbeidsgiver().getOrgnummer())); var virksomheter = mapperFacade.mapAsList(rsAmelding.getArbeidsforhold(), Virksomhet.class, context); - virksomheter.forEach(virksomhet -> { - var arbForholdId = new AtomicInteger(0); - virksomhet.getPersoner() - .forEach(person -> person.getArbeidsforhold() - .forEach(arbeidsforhold -> arbeidsforhold - .setArbeidsforholdId(Integer.toString(arbForholdId.incrementAndGet())))); - }); + var arbeidsForholdIder = new HashMap(); + virksomheter + .forEach(virksomhet -> virksomhet.getPersoner().forEach(person -> + arbeidsForholdIder.put(virksomhet.getOrganisajonsnummer()+person.getIdent(), + new AtomicInteger(0)))); + virksomheter.forEach(virksomhet -> virksomhet.getPersoner() + .forEach(person -> person.getArbeidsforhold() + .forEach(arbeidsforhold -> arbeidsforhold + .setArbeidsforholdId(Integer.toString( + arbeidsForholdIder.get(virksomhet.getOrganisajonsnummer()+person.getIdent()) + .incrementAndGet()))))); var ameldingVirksomheter = virksomheter.stream().map(virksomhet -> VirksomhetDTO.builder() .organisajonsnummer(virksomhet.getOrganisajonsnummer()) @@ -94,12 +100,14 @@ public void mapAtoB(RsArbeidsforholdAareg rsArbeidsforholdAareg, Virksomhet virk getDate(rsArbeidsforholdAareg.getAnsettelsesPeriode().getTom()) : null) .antallTimerPerUke( !rsArbeidsforholdAareg.getAntallTimerForTimeloennet().isEmpty() ? - rsArbeidsforholdAareg.getAntallTimerForTimeloennet().get(0).getAntallTimer().floatValue() : + rsArbeidsforholdAareg.getAntallTimerForTimeloennet() + .getFirst().getAntallTimer().floatValue() : getAvtaltArbeidstidPerUke(rsArbeidsforholdAareg)) .arbeidsforholdType((String) context.getProperty("arbeidsforholdstype")) .arbeidstidsordning(rsArbeidsforholdAareg.getArbeidsavtale().getArbeidstidsordning()) .fartoey(nonNull(rsArbeidsforholdAareg.getFartoy()) && !rsArbeidsforholdAareg.getFartoy().isEmpty() ? - mapperFacade.map(rsArbeidsforholdAareg.getFartoy().get(0), FartoeyDTO.class) : null) + mapperFacade.map(rsArbeidsforholdAareg.getFartoy() + .getFirst(), FartoeyDTO.class) : null) .inntekter( (nonNull(rsArbeidsforholdAareg.getUtenlandsopphold()) && !rsArbeidsforholdAareg.getUtenlandsopphold().isEmpty()) || diff --git a/apps/dolly-backend/src/main/java/no/nav/dolly/mapper/BestillingAaregStatusMapper.java b/apps/dolly-backend/src/main/java/no/nav/dolly/mapper/BestillingAaregStatusMapper.java index 65cde2d4305..b648b8b13cb 100644 --- a/apps/dolly-backend/src/main/java/no/nav/dolly/mapper/BestillingAaregStatusMapper.java +++ b/apps/dolly-backend/src/main/java/no/nav/dolly/mapper/BestillingAaregStatusMapper.java @@ -8,12 +8,12 @@ import no.nav.dolly.domain.resultset.RsStatusRapport; import java.util.Arrays; +import java.util.Collections; import java.util.HashMap; import java.util.List; import java.util.Map; import java.util.Set; -import static java.util.Collections.emptyList; import static java.util.Collections.singletonList; import static no.nav.dolly.domain.resultset.SystemTyper.AAREG; import static no.nav.dolly.mapper.AbstractRsStatusMiljoeIdentForhold.checkAndUpdateStatus; @@ -43,23 +43,26 @@ public static List buildAaregStatusMap(List } }); - return errorEnvIdents.isEmpty() ? emptyList() : - singletonList(RsStatusRapport.builder().id(AAREG).navn(AAREG.getBeskrivelse()) - .statuser(errorEnvIdents.entrySet().stream().map(status -> - RsStatusRapport.Status.builder() - .melding(status.getKey().replace(";", ",")) - .detaljert(status.getValue().entrySet().stream().map(miljo -> - RsStatusRapport.Detaljert.builder() - .miljo(miljo.getKey()) - .identer(miljo.getValue()) - .build()) - .toList()) - .build()) - .toList()) + var statuser = errorEnvIdents.entrySet().stream().map(status -> + RsStatusRapport.Status.builder() + .melding(status.getKey().replace(";", ",")) + .detaljert(status.getValue().entrySet().stream().map(miljo -> + RsStatusRapport.Detaljert.builder() + .miljo(miljo.getKey()) + .identer(miljo.getValue()) + .build()) + .toList()) + .build()) + .toList(); + + return statuser.isEmpty() ? Collections.emptyList() : + singletonList(RsStatusRapport.builder() + .navn(AAREG.getBeskrivelse()) + .id(AAREG) + .statuser(statuser) .build()); } - public static String konverterBAfeilkodeTilFeilmelding(String baKode) { var baFeilkode = getBaFeilkodeFromFeilmelding(baKode); try { diff --git a/apps/oppsummeringsdokument-service/src/main/java/no/nav/testnav/apps/oppsummeringsdokumentservice/repository/OppsummeringsdokumentRepository.java b/apps/oppsummeringsdokument-service/src/main/java/no/nav/testnav/apps/oppsummeringsdokumentservice/repository/OppsummeringsdokumentRepository.java index 9e22e797374..a744f3ab626 100644 --- a/apps/oppsummeringsdokument-service/src/main/java/no/nav/testnav/apps/oppsummeringsdokumentservice/repository/OppsummeringsdokumentRepository.java +++ b/apps/oppsummeringsdokument-service/src/main/java/no/nav/testnav/apps/oppsummeringsdokumentservice/repository/OppsummeringsdokumentRepository.java @@ -1,14 +1,9 @@ package no.nav.testnav.apps.oppsummeringsdokumentservice.repository; import no.nav.testnav.apps.oppsummeringsdokumentservice.repository.model.OppsummeringsdokumentModel; -import no.nav.testnav.libs.dto.oppsummeringsdokumentservice.v2.Populasjon; import org.springframework.data.elasticsearch.repository.ElasticsearchRepository; public interface OppsummeringsdokumentRepository extends ElasticsearchRepository { - void deleteAllByMiljoAndPopulasjon(String miljo, Populasjon populasjon); - - void deleteAllByMiljo(String miljo); - } diff --git a/apps/oppsummeringsdokument-service/src/main/java/no/nav/testnav/apps/oppsummeringsdokumentservice/service/SearchQueryUtility.java b/apps/oppsummeringsdokument-service/src/main/java/no/nav/testnav/apps/oppsummeringsdokumentservice/service/SearchQueryUtility.java index a596653e8bc..4331755b721 100644 --- a/apps/oppsummeringsdokument-service/src/main/java/no/nav/testnav/apps/oppsummeringsdokumentservice/service/SearchQueryUtility.java +++ b/apps/oppsummeringsdokument-service/src/main/java/no/nav/testnav/apps/oppsummeringsdokumentservice/service/SearchQueryUtility.java @@ -23,8 +23,8 @@ public static QueryBuilder prepareQuery(QueryRequest request) { matchString(query, "_id", request.getId()); matchString(query, "miljo", request.getMiljo()); + matchString(query, "opplysningspliktigOrganisajonsnummer", request.getOrgnummer()); matchString(query, "virksomheter.personer.ident", request.getIdent()); - matchString(query, "virksomheter.organisajonsnummer", request.getOrgnummer()); matchString(query, "virksomheter.personer.arbeidsforhold.typeArbeidsforhold", request.getTypeArbeidsforhold()); if (nonNull(request.getFom())) { From 83cfb6131f184188f238281dafbf8f6601fed702 Mon Sep 17 00:00:00 2001 From: Stian Gustavsson Date: Fri, 15 Mar 2024 10:31:05 +0100 Subject: [PATCH 03/20] Datepicker og Monthpicker mindre refaktorering (#3437) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * Datepicker og Monthpicker mindre refaktorering for å vise innhold etter navigering frem og tilbake og fikset bug som noen ganger viste tomt felt selv om form var fylt inn --- .../src/main/js/package-lock.json | 54 +++++++++---------- apps/dolly-frontend/src/main/js/package.json | 2 +- .../form/partials/arbeidsforholdForm.tsx | 20 +++++-- .../ui/form/inputs/datepicker/Datepicker.tsx | 26 ++++++--- .../form/inputs/monthpicker/Monthpicker.tsx | 32 ++++++++--- 5 files changed, 88 insertions(+), 46 deletions(-) diff --git a/apps/dolly-frontend/src/main/js/package-lock.json b/apps/dolly-frontend/src/main/js/package-lock.json index ec997444229..d6094648b74 100644 --- a/apps/dolly-frontend/src/main/js/package-lock.json +++ b/apps/dolly-frontend/src/main/js/package-lock.json @@ -1,12 +1,12 @@ { "name": "dolly", - "version": "3.0.4", + "version": "3.0.6", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "dolly", - "version": "3.0.4", + "version": "3.0.6", "license": "ISC", "dependencies": { "@babel/preset-flow": "^7.18.6", @@ -3120,15 +3120,15 @@ "integrity": "sha512-dRLjCWHYg4oaA77cxO64oO+7JwCwnIzkZPdrrC71jQmQtlhM556pwKo5bUzqvZndkVbeFLIIi+9TC40JNF5hNQ==" }, "node_modules/@types/lodash": { - "version": "4.14.202", - "resolved": "https://registry.npmjs.org/@types/lodash/-/lodash-4.14.202.tgz", - "integrity": "sha512-OvlIYQK9tNneDlS0VN54LLd5uiPCBOp7gS5Z0f1mjoJYBrtStzgmJBxONW3U6OZqdtNzZPmn9BS/7WI7BFFcFQ==", + "version": "4.17.0", + "resolved": "https://registry.npmjs.org/@types/lodash/-/lodash-4.17.0.tgz", + "integrity": "sha512-t7dhREVv6dbNj0q17X12j7yDG4bD/DHYX7o5/DbDxobP0HnGPgpRz2Ej77aL7TZT3DSw13fqUTj8J4mMnqa7WA==", "dev": true }, "node_modules/@types/node": { - "version": "20.11.26", - "resolved": "https://registry.npmjs.org/@types/node/-/node-20.11.26.tgz", - "integrity": "sha512-YwOMmyhNnAWijOBQweOJnQPl068Oqd4K3OFbTc6AHJwzweUwwWG3GIFY74OKks2PJUDkQPeddOQES9mLn1CTEQ==", + "version": "20.11.27", + "resolved": "https://registry.npmjs.org/@types/node/-/node-20.11.27.tgz", + "integrity": "sha512-qyUZfMnCg1KEz57r7pzFtSGt49f6RPkPBis3Vo4PbS7roQEDn22hiHzl/Lo1q4i4hDEgBJmBF/NTNg2XR0HbFg==", "dev": true, "dependencies": { "undici-types": "~5.26.4" @@ -3196,9 +3196,9 @@ "dev": true }, "node_modules/@types/react-dom": { - "version": "18.2.21", - "resolved": "https://registry.npmjs.org/@types/react-dom/-/react-dom-18.2.21.tgz", - "integrity": "sha512-gnvBA/21SA4xxqNXEwNiVcP0xSGHh/gi1VhWv9Bl46a0ItbTT5nFY+G9VSQpaG/8N/qdJpJ+vftQ4zflTtnjLw==", + "version": "18.2.22", + "resolved": "https://registry.npmjs.org/@types/react-dom/-/react-dom-18.2.22.tgz", + "integrity": "sha512-fHkBXPeNtfvri6gdsMYyW+dW7RXFo6Ad09nLFK0VQWR7yGLai/Cyvyj696gbwYvBnhGtevUG9cET0pmUbMtoPQ==", "dev": true, "dependencies": { "@types/react": "*" @@ -4950,9 +4950,9 @@ "integrity": "sha512-LO/lzYRw134LMDVnLyAf1dHE5tyO6axEFkR3TXjQIOmMkAM9YL6QsiUwuXzZAmFnuDJcs4hayOgyIYtViXFrLw==" }, "node_modules/cypress": { - "version": "13.6.6", - "resolved": "https://registry.npmjs.org/cypress/-/cypress-13.6.6.tgz", - "integrity": "sha512-S+2S9S94611hXimH9a3EAYt81QM913ZVA03pUmGDfLTFa5gyp85NJ8dJGSlEAEmyRsYkioS1TtnWtbv/Fzt11A==", + "version": "13.7.0", + "resolved": "https://registry.npmjs.org/cypress/-/cypress-13.7.0.tgz", + "integrity": "sha512-UimjRSJJYdTlvkChcdcfywKJ6tUYuwYuk/n1uMMglrvi+ZthNhoRYcxnWgTqUtkl17fXrPAsD5XT2rcQYN1xKA==", "dev": true, "hasInstallScript": true, "dependencies": { @@ -5397,9 +5397,9 @@ } }, "node_modules/electron-to-chromium": { - "version": "1.4.701", - "resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.4.701.tgz", - "integrity": "sha512-K3WPQ36bUOtXg/1+69bFlFOvdSm0/0bGqmsfPDLRXLanoKXdA+pIWuf/VbA9b+2CwBFuONgl4NEz4OEm+OJOKA==" + "version": "1.4.705", + "resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.4.705.tgz", + "integrity": "sha512-LKqhpwJCLhYId2VVwEzFXWrqQI5n5zBppz1W9ehhTlfYU8CUUW6kClbN8LHF/v7flMgRdETS772nqywJ+ckVAw==" }, "node_modules/emoji-regex": { "version": "9.2.2", @@ -10249,9 +10249,9 @@ } }, "node_modules/require-in-the-middle": { - "version": "7.2.0", - "resolved": "https://registry.npmjs.org/require-in-the-middle/-/require-in-the-middle-7.2.0.tgz", - "integrity": "sha512-3TLx5TGyAY6AOqLBoXmHkNql0HIf2RGbuMgCDT2WO/uGVAPJs6h7Kl+bN6TIZGd9bWhWPwnDnTHGtW8Iu77sdw==", + "version": "7.2.1", + "resolved": "https://registry.npmjs.org/require-in-the-middle/-/require-in-the-middle-7.2.1.tgz", + "integrity": "sha512-u5XngygsJ+XV2dBV/Pl4SrcNpUXQfmYmXtuFeHDXfzk4i4NnGnret6xKWkkJHjMHS/16yMV9pEAlAunqmjllkA==", "dependencies": { "debug": "^4.1.1", "module-details-from-path": "^1.0.3", @@ -10583,9 +10583,9 @@ "dev": true }, "node_modules/sass": { - "version": "1.71.1", - "resolved": "https://registry.npmjs.org/sass/-/sass-1.71.1.tgz", - "integrity": "sha512-wovtnV2PxzteLlfNzbgm1tFXPLoZILYAMJtvoXXkD7/+1uP41eKkIt1ypWq5/q2uT94qHjXehEYfmjKOvjL9sg==", + "version": "1.72.0", + "resolved": "https://registry.npmjs.org/sass/-/sass-1.72.0.tgz", + "integrity": "sha512-Gpczt3WA56Ly0Mn8Sl21Vj94s1axi9hDIzDFn9Ph9x3C3p4nNyvsqJoQyVXKou6cBlfFWEgRW4rT8Tb4i3XnVA==", "dev": true, "dependencies": { "chokidar": ">=3.0.0 <4.0.0", @@ -12019,14 +12019,14 @@ } }, "node_modules/vite-tsconfig-paths": { - "version": "4.3.1", - "resolved": "https://registry.npmjs.org/vite-tsconfig-paths/-/vite-tsconfig-paths-4.3.1.tgz", - "integrity": "sha512-cfgJwcGOsIxXOLU/nELPny2/LUD/lcf1IbfyeKTv2bsupVbTH/xpFtdQlBmIP1GEK2CjjLxYhFfB+QODFAx5aw==", + "version": "4.3.2", + "resolved": "https://registry.npmjs.org/vite-tsconfig-paths/-/vite-tsconfig-paths-4.3.2.tgz", + "integrity": "sha512-0Vd/a6po6Q+86rPlntHye7F31zA2URZMbH8M3saAZ/xR9QoGN/L21bxEGfXdWmFdNkqPpRdxFT7nmNe12e9/uA==", "dev": true, "dependencies": { "debug": "^4.1.1", "globrex": "^0.1.2", - "tsconfck": "^3.0.1" + "tsconfck": "^3.0.3" }, "peerDependencies": { "vite": "*" diff --git a/apps/dolly-frontend/src/main/js/package.json b/apps/dolly-frontend/src/main/js/package.json index 1f28751bcf2..65f4d589edc 100644 --- a/apps/dolly-frontend/src/main/js/package.json +++ b/apps/dolly-frontend/src/main/js/package.json @@ -1,6 +1,6 @@ { "name": "dolly", - "version": "3.0.4", + "version": "3.0.6", "type": "module", "description": "", "main": "index.js", diff --git a/apps/dolly-frontend/src/main/js/src/components/fagsystem/aareg/form/partials/arbeidsforholdForm.tsx b/apps/dolly-frontend/src/main/js/src/components/fagsystem/aareg/form/partials/arbeidsforholdForm.tsx index 88b0a17ace8..aa8ad5257dd 100644 --- a/apps/dolly-frontend/src/main/js/src/components/fagsystem/aareg/form/partials/arbeidsforholdForm.tsx +++ b/apps/dolly-frontend/src/main/js/src/components/fagsystem/aareg/form/partials/arbeidsforholdForm.tsx @@ -89,8 +89,16 @@ export const ArbeidsforholdForm = ({ } const { setError, watch, control, getValues, setValue, trigger, resetField } = useFormContext() - const [navArbeidsforholdPeriode, setNavArbeidsforholdPeriode] = useState(null as unknown as Date) - const { tidligereBestillinger } = useContext(BestillingsveilederContext) + const eksisterendeArbeidsforholdPeriode = watch(`${path}.navArbeidsforholdPeriode`) + const [navArbeidsforholdPeriode, setNavArbeidsforholdPeriode] = useState( + eksisterendeArbeidsforholdPeriode + ? new Date( + eksisterendeArbeidsforholdPeriode.year, + eksisterendeArbeidsforholdPeriode.monthValue, + ) + : null, + ) + const { tidligereBestillinger }: any = useContext(BestillingsveilederContext) const tidligereAaregBestillinger = hentUnikeAaregBestillinger(tidligereBestillinger) const erLaastArbeidsforhold = (arbeidsgiverType === ArbeidsgiverTyper.felles || @@ -101,12 +109,13 @@ export const ArbeidsforholdForm = ({ if (_.isEmpty(tidligereAaregBestillinger) || harGjortFormEndringer()) { return } - resetField('aareg', { - defaultValue: tidligereAaregBestillinger?.map((aaregBestilling) => { + setValue( + 'aareg', + tidligereAaregBestillinger?.map((aaregBestilling) => { aaregBestilling.isOppdatering = true return aaregBestilling }), - }) + ) trigger('aareg') }, [watch('aareg')]) @@ -306,6 +315,7 @@ export const ArbeidsforholdForm = ({ date={navArbeidsforholdPeriode} label="NAV arbeidsforholdsperiode" onChange={setNavArbeidsforholdPeriode} + value={navArbeidsforholdPeriode} isClearable={true} /> {arbeidsforholdstype === 'forenkletOppgjoersordning' && ( diff --git a/apps/dolly-frontend/src/main/js/src/components/ui/form/inputs/datepicker/Datepicker.tsx b/apps/dolly-frontend/src/main/js/src/components/ui/form/inputs/datepicker/Datepicker.tsx index dca3e42330c..09ace0a2cd0 100644 --- a/apps/dolly-frontend/src/main/js/src/components/ui/form/inputs/datepicker/Datepicker.tsx +++ b/apps/dolly-frontend/src/main/js/src/components/ui/form/inputs/datepicker/Datepicker.tsx @@ -1,5 +1,5 @@ import { registerLocale } from 'react-datepicker' -import { addYears, subYears } from 'date-fns' +import { addYears, isDate, subYears } from 'date-fns' import locale_nb from 'date-fns/locale/nb' import { Label } from '@/components/ui/form/inputs/label/Label' import { InputWrapper } from '@/components/ui/form/inputWrapper/InputWrapper' @@ -10,11 +10,12 @@ import './Datepicker.less' import { useFormContext } from 'react-hook-form' import { DatePicker, useDatepicker } from '@navikt/ds-react' import _ from 'lodash' +import { formatDate } from '@/utils/DataFormatter' registerLocale('nb', locale_nb) function addHours(date, amount) { - date.setHours(amount, 0, 0) + date.setHours(amount) return date } @@ -30,23 +31,36 @@ export const Datepicker = ({ maxDate, }) => { const formMethods = useFormContext() - const eksisterendeVerdi = formMethods.watch(name) - const { datepickerProps, inputProps, selectedDay } = useDatepicker({ + + const getSelectedDay = () => { + const selected = formMethods.watch(name) + if (_.isNil(selected) || _.isEmpty(selected)) { + return undefined + } else if (isDate(selected)) { + return fixTimezone(selected) + } else { + return fixTimezone(new Date(selected)) + } + } + + const { datepickerProps, inputProps } = useDatepicker({ fromDate: minDate || subYears(new Date(), 125), toDate: maxDate || addYears(new Date(), 5), onDateChange: onChange || onBlur, - defaultSelected: !_.isEmpty(eksisterendeVerdi) ? new Date(eksisterendeVerdi) : undefined, disabled: excludeDates, + defaultSelected: getSelectedDay(), }) + const selectedDay = getSelectedDay() return ( ) diff --git a/apps/dolly-frontend/src/main/js/src/components/ui/form/inputs/monthpicker/Monthpicker.tsx b/apps/dolly-frontend/src/main/js/src/components/ui/form/inputs/monthpicker/Monthpicker.tsx index b52186d5a29..40bce233630 100644 --- a/apps/dolly-frontend/src/main/js/src/components/ui/form/inputs/monthpicker/Monthpicker.tsx +++ b/apps/dolly-frontend/src/main/js/src/components/ui/form/inputs/monthpicker/Monthpicker.tsx @@ -1,7 +1,7 @@ import { Label } from '@/components/ui/form/inputs/label/Label' import { InputWrapper } from '@/components/ui/form/inputWrapper/InputWrapper' import { MonthPicker, useMonthpicker } from '@navikt/ds-react' -import { addYears, subYears } from 'date-fns' +import { addYears, isDate, subYears } from 'date-fns' import { useFormContext } from 'react-hook-form' import _ from 'lodash' @@ -28,24 +28,42 @@ export const Monthpicker = ({ ...props }: MonthpickerProps) => { const formMethods = useFormContext() - const eksisterendeVerdi = formMethods.watch(name) + const val = formMethods.watch(name) - const formattedDate = date instanceof Date || date === null ? date : new Date(date) + function getEksisterendeVerdi() { + if (name.includes('navArbeidsforholdPeriode')) { + return val?.year ? new Date(val?.year, val?.monthValue) : null + } + return val + } - const { monthpickerProps, inputProps, selectedMonth } = useMonthpicker({ + const eksisterendeVerdi = getEksisterendeVerdi() + + const formattedDate = + eksisterendeVerdi instanceof Date + ? eksisterendeVerdi + : date instanceof Date || date === null + ? date + : new Date(date) + + const { monthpickerProps, inputProps } = useMonthpicker({ fromDate: minDate || subYears(new Date(), 125), toDate: maxDate || addYears(new Date(), 5), onMonthChange: (selectedDate) => { - selectedDate?.setHours(12, 0, 0, 0) + selectedDate?.setHours(12) onChange ? onChange(selectedDate) : handleDateChange(selectedDate) }, - defaultSelected: !_.isEmpty(eksisterendeVerdi) ? new Date(eksisterendeVerdi) : undefined, + defaultSelected: !_.isNil(formattedDate) + ? isDate(formattedDate) + ? formattedDate + : new Date(formattedDate) + : undefined, }) return ( From 4863f869b0580d408f274accc8f3649c18cbccab Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Fri, 15 Mar 2024 10:34:24 +0100 Subject: [PATCH 04/20] Bump follow-redirects in /apps/endringsmelding-frontend/src/main/js (#3440) Bumps [follow-redirects](https://github.com/follow-redirects/follow-redirects) from 1.15.5 to 1.15.6. - [Release notes](https://github.com/follow-redirects/follow-redirects/releases) - [Commits](https://github.com/follow-redirects/follow-redirects/compare/v1.15.5...v1.15.6) --- updated-dependencies: - dependency-name: follow-redirects dependency-type: indirect ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- apps/endringsmelding-frontend/src/main/js/package-lock.json | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/apps/endringsmelding-frontend/src/main/js/package-lock.json b/apps/endringsmelding-frontend/src/main/js/package-lock.json index e465541bd01..f4e4179b166 100644 --- a/apps/endringsmelding-frontend/src/main/js/package-lock.json +++ b/apps/endringsmelding-frontend/src/main/js/package-lock.json @@ -2764,9 +2764,9 @@ } }, "node_modules/follow-redirects": { - "version": "1.15.5", - "resolved": "https://registry.npmjs.org/follow-redirects/-/follow-redirects-1.15.5.tgz", - "integrity": "sha512-vSFWUON1B+yAw1VN4xMfxgn5fTUiaOzAJCKBwIIgT/+7CuGy9+r+5gITvP62j3RmaD5Ph65UaERdOSRGUzZtgw==", + "version": "1.15.6", + "resolved": "https://registry.npmjs.org/follow-redirects/-/follow-redirects-1.15.6.tgz", + "integrity": "sha512-wWN62YITEaOpSK584EZXJafH1AGpO8RVgElfkuXbTOrPX4fIfOyEpW/CsiNd8JdYrAoOvafRTOEnvsO++qCqFA==", "funding": [ { "type": "individual", From c0c2ee9d38e5e5e0d075695e8176680367e4bfc3 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Fri, 15 Mar 2024 10:34:37 +0100 Subject: [PATCH 05/20] Bump follow-redirects in /apps/dolly-frontend/src/main/js (#3441) Bumps [follow-redirects](https://github.com/follow-redirects/follow-redirects) from 1.15.5 to 1.15.6. - [Release notes](https://github.com/follow-redirects/follow-redirects/releases) - [Commits](https://github.com/follow-redirects/follow-redirects/compare/v1.15.5...v1.15.6) --- updated-dependencies: - dependency-name: follow-redirects dependency-type: indirect ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- apps/dolly-frontend/src/main/js/package-lock.json | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/apps/dolly-frontend/src/main/js/package-lock.json b/apps/dolly-frontend/src/main/js/package-lock.json index d6094648b74..9e7f00d1f20 100644 --- a/apps/dolly-frontend/src/main/js/package-lock.json +++ b/apps/dolly-frontend/src/main/js/package-lock.json @@ -6524,9 +6524,9 @@ "integrity": "sha512-X8cqMLLie7KsNUDSdzeN8FYK9rEt4Dt67OsG/DNGnYTSDBG4uFAJFBnUeiV+zCVAvwFy56IjM9sH51jVaEhNxw==" }, "node_modules/follow-redirects": { - "version": "1.15.5", - "resolved": "https://registry.npmjs.org/follow-redirects/-/follow-redirects-1.15.5.tgz", - "integrity": "sha512-vSFWUON1B+yAw1VN4xMfxgn5fTUiaOzAJCKBwIIgT/+7CuGy9+r+5gITvP62j3RmaD5Ph65UaERdOSRGUzZtgw==", + "version": "1.15.6", + "resolved": "https://registry.npmjs.org/follow-redirects/-/follow-redirects-1.15.6.tgz", + "integrity": "sha512-wWN62YITEaOpSK584EZXJafH1AGpO8RVgElfkuXbTOrPX4fIfOyEpW/CsiNd8JdYrAoOvafRTOEnvsO++qCqFA==", "funding": [ { "type": "individual", From 9a22f4000a5aecc1dcb6b45dd7ac4642b715a903 Mon Sep 17 00:00:00 2001 From: kristenhaerum Date: Fri, 15 Mar 2024 12:31:52 +0100 Subject: [PATCH 06/20] Set responseTimeout for HttpClientRequest in Pensjonforvalter commands Implemented a responseTimeout in the httpClientRequests for different commands in the Pensjonforvalter package. A constant REQUEST_DURATION of 30000 ms, was included in PensjonforvalterConsumer to be used as the timeout period. This enhancement will ensure that the application doesn't hang while waiting for responses if a server is slow or unresponsive. --- .../pensjonforvalter/PensjonforvalterConsumer.java | 1 + .../pensjonforvalter/command/LagreAlderspensjonCommand.java | 6 ++++++ .../pensjonforvalter/command/LagrePoppInntektCommand.java | 6 ++++++ .../pensjonforvalter/command/LagreTpForholdCommand.java | 6 ++++++ .../pensjonforvalter/command/LagreTpYtelseCommand.java | 6 ++++++ .../pensjonforvalter/command/LagreUforetrygdCommand.java | 6 ++++++ 6 files changed, 31 insertions(+) diff --git a/apps/dolly-backend/src/main/java/no/nav/dolly/bestilling/pensjonforvalter/PensjonforvalterConsumer.java b/apps/dolly-backend/src/main/java/no/nav/dolly/bestilling/pensjonforvalter/PensjonforvalterConsumer.java index 518fa494706..81cdf5ac5f7 100644 --- a/apps/dolly-backend/src/main/java/no/nav/dolly/bestilling/pensjonforvalter/PensjonforvalterConsumer.java +++ b/apps/dolly-backend/src/main/java/no/nav/dolly/bestilling/pensjonforvalter/PensjonforvalterConsumer.java @@ -41,6 +41,7 @@ @Service public class PensjonforvalterConsumer implements ConsumerStatus { + public static final int REQUEST_DURATION = 30000; private final TokenExchange tokenService; private final WebClient webClient; private final ServerProperties serverProperties; diff --git a/apps/dolly-backend/src/main/java/no/nav/dolly/bestilling/pensjonforvalter/command/LagreAlderspensjonCommand.java b/apps/dolly-backend/src/main/java/no/nav/dolly/bestilling/pensjonforvalter/command/LagreAlderspensjonCommand.java index b5f0c468b75..4c165bd170f 100644 --- a/apps/dolly-backend/src/main/java/no/nav/dolly/bestilling/pensjonforvalter/command/LagreAlderspensjonCommand.java +++ b/apps/dolly-backend/src/main/java/no/nav/dolly/bestilling/pensjonforvalter/command/LagreAlderspensjonCommand.java @@ -9,11 +9,13 @@ import org.springframework.web.reactive.function.client.WebClient; import reactor.core.publisher.Flux; import reactor.core.publisher.Mono; +import reactor.netty.http.client.HttpClientRequest; import reactor.util.retry.Retry; import java.time.Duration; import java.util.concurrent.Callable; +import static no.nav.dolly.bestilling.pensjonforvalter.PensjonforvalterConsumer.REQUEST_DURATION; import static no.nav.dolly.domain.CommonKeysAndUtils.CONSUMER; import static no.nav.dolly.domain.CommonKeysAndUtils.HEADER_NAV_CALL_ID; import static no.nav.dolly.domain.CommonKeysAndUtils.HEADER_NAV_CONSUMER_ID; @@ -40,6 +42,10 @@ public Flux call() { .path(alderspensjonRequest instanceof AlderspensjonVedtakRequest ? PENSJON_AP_VEDTAK_URL : PENSJON_AP_SOKNAD_URL) .build()) + .httpRequest(httpRequest -> { + HttpClientRequest reactorRequest = httpRequest.getNativeRequest(); + reactorRequest.responseTimeout(Duration.ofSeconds(REQUEST_DURATION)); + }) .header(AUTHORIZATION, "Bearer " + token) .header(HEADER_NAV_CALL_ID, generateCallId()) .header(HEADER_NAV_CONSUMER_ID, CONSUMER) diff --git a/apps/dolly-backend/src/main/java/no/nav/dolly/bestilling/pensjonforvalter/command/LagrePoppInntektCommand.java b/apps/dolly-backend/src/main/java/no/nav/dolly/bestilling/pensjonforvalter/command/LagrePoppInntektCommand.java index 6b3fba6f980..28b8cfdd874 100644 --- a/apps/dolly-backend/src/main/java/no/nav/dolly/bestilling/pensjonforvalter/command/LagrePoppInntektCommand.java +++ b/apps/dolly-backend/src/main/java/no/nav/dolly/bestilling/pensjonforvalter/command/LagrePoppInntektCommand.java @@ -8,11 +8,13 @@ import org.springframework.web.reactive.function.client.WebClient; import reactor.core.publisher.Flux; import reactor.core.publisher.Mono; +import reactor.netty.http.client.HttpClientRequest; import reactor.util.retry.Retry; import java.time.Duration; import java.util.concurrent.Callable; +import static no.nav.dolly.bestilling.pensjonforvalter.PensjonforvalterConsumer.REQUEST_DURATION; import static no.nav.dolly.domain.CommonKeysAndUtils.CONSUMER; import static no.nav.dolly.domain.CommonKeysAndUtils.HEADER_NAV_CALL_ID; import static no.nav.dolly.domain.CommonKeysAndUtils.HEADER_NAV_CONSUMER_ID; @@ -35,6 +37,10 @@ public Flux call() { .uri(uriBuilder -> uriBuilder .path(POPP_INNTEKT_URL) .build()) + .httpRequest(httpRequest -> { + HttpClientRequest reactorRequest = httpRequest.getNativeRequest(); + reactorRequest.responseTimeout(Duration.ofSeconds(REQUEST_DURATION)); + }) .header(AUTHORIZATION, "Bearer " + token) .header(HEADER_NAV_CALL_ID, generateCallId()) .header(HEADER_NAV_CONSUMER_ID, CONSUMER) diff --git a/apps/dolly-backend/src/main/java/no/nav/dolly/bestilling/pensjonforvalter/command/LagreTpForholdCommand.java b/apps/dolly-backend/src/main/java/no/nav/dolly/bestilling/pensjonforvalter/command/LagreTpForholdCommand.java index 108db087f52..60dca6399da 100644 --- a/apps/dolly-backend/src/main/java/no/nav/dolly/bestilling/pensjonforvalter/command/LagreTpForholdCommand.java +++ b/apps/dolly-backend/src/main/java/no/nav/dolly/bestilling/pensjonforvalter/command/LagreTpForholdCommand.java @@ -9,11 +9,13 @@ import org.springframework.web.reactive.function.client.WebClient; import reactor.core.publisher.Flux; import reactor.core.publisher.Mono; +import reactor.netty.http.client.HttpClientRequest; import reactor.util.retry.Retry; import java.time.Duration; import java.util.concurrent.Callable; +import static no.nav.dolly.bestilling.pensjonforvalter.PensjonforvalterConsumer.REQUEST_DURATION; import static no.nav.dolly.domain.CommonKeysAndUtils.CONSUMER; import static no.nav.dolly.domain.CommonKeysAndUtils.HEADER_NAV_CALL_ID; import static no.nav.dolly.domain.CommonKeysAndUtils.HEADER_NAV_CONSUMER_ID; @@ -39,6 +41,10 @@ public Flux call() { .uri(uriBuilder -> uriBuilder .path(PENSJON_TP_FORHOLD_URL) .build()) + .httpRequest(httpRequest -> { + HttpClientRequest reactorRequest = httpRequest.getNativeRequest(); + reactorRequest.responseTimeout(Duration.ofSeconds(REQUEST_DURATION)); + }) .header(AUTHORIZATION, "Bearer " + token) .header(UserConstant.USER_HEADER_JWT, getUserJwt()) .header(HEADER_NAV_CALL_ID, generateCallId()) diff --git a/apps/dolly-backend/src/main/java/no/nav/dolly/bestilling/pensjonforvalter/command/LagreTpYtelseCommand.java b/apps/dolly-backend/src/main/java/no/nav/dolly/bestilling/pensjonforvalter/command/LagreTpYtelseCommand.java index 97e408b817c..69659c1eba2 100644 --- a/apps/dolly-backend/src/main/java/no/nav/dolly/bestilling/pensjonforvalter/command/LagreTpYtelseCommand.java +++ b/apps/dolly-backend/src/main/java/no/nav/dolly/bestilling/pensjonforvalter/command/LagreTpYtelseCommand.java @@ -9,11 +9,13 @@ import org.springframework.web.reactive.function.client.WebClient; import reactor.core.publisher.Flux; import reactor.core.publisher.Mono; +import reactor.netty.http.client.HttpClientRequest; import reactor.util.retry.Retry; import java.time.Duration; import java.util.concurrent.Callable; +import static no.nav.dolly.bestilling.pensjonforvalter.PensjonforvalterConsumer.REQUEST_DURATION; import static no.nav.dolly.domain.CommonKeysAndUtils.CONSUMER; import static no.nav.dolly.domain.CommonKeysAndUtils.HEADER_NAV_CALL_ID; import static no.nav.dolly.domain.CommonKeysAndUtils.HEADER_NAV_CONSUMER_ID; @@ -38,6 +40,10 @@ public Flux call() { .uri(uriBuilder -> uriBuilder .path(PENSJON_TP_YTELSE_URL) .build()) + .httpRequest(httpRequest -> { + HttpClientRequest reactorRequest = httpRequest.getNativeRequest(); + reactorRequest.responseTimeout(Duration.ofSeconds(REQUEST_DURATION)); + }) .header(AUTHORIZATION, "Bearer " + token) .header(UserConstant.USER_HEADER_JWT, getUserJwt()) .header(HEADER_NAV_CALL_ID, generateCallId()) diff --git a/apps/dolly-backend/src/main/java/no/nav/dolly/bestilling/pensjonforvalter/command/LagreUforetrygdCommand.java b/apps/dolly-backend/src/main/java/no/nav/dolly/bestilling/pensjonforvalter/command/LagreUforetrygdCommand.java index 8d8effe2cc6..e294e1542e9 100644 --- a/apps/dolly-backend/src/main/java/no/nav/dolly/bestilling/pensjonforvalter/command/LagreUforetrygdCommand.java +++ b/apps/dolly-backend/src/main/java/no/nav/dolly/bestilling/pensjonforvalter/command/LagreUforetrygdCommand.java @@ -8,11 +8,13 @@ import org.springframework.web.reactive.function.client.WebClient; import reactor.core.publisher.Flux; import reactor.core.publisher.Mono; +import reactor.netty.http.client.HttpClientRequest; import reactor.util.retry.Retry; import java.time.Duration; import java.util.concurrent.Callable; +import static no.nav.dolly.bestilling.pensjonforvalter.PensjonforvalterConsumer.REQUEST_DURATION; import static no.nav.dolly.domain.CommonKeysAndUtils.CONSUMER; import static no.nav.dolly.domain.CommonKeysAndUtils.HEADER_NAV_CALL_ID; import static no.nav.dolly.domain.CommonKeysAndUtils.HEADER_NAV_CONSUMER_ID; @@ -37,6 +39,10 @@ public Flux call() { .uri(uriBuilder -> uriBuilder .path(PENSJON_UT_URL) .build()) + .httpRequest(httpRequest -> { + HttpClientRequest reactorRequest = httpRequest.getNativeRequest(); + reactorRequest.responseTimeout(Duration.ofSeconds(REQUEST_DURATION)); + }) .header(AUTHORIZATION, "Bearer " + token) .header(HEADER_NAV_CALL_ID, generateCallId()) .header(HEADER_NAV_CONSUMER_ID, CONSUMER) From 9af9a0bd7383c3b9cf311cf40a34a9211fcf8efa Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Kristen=20H=C3=A6rum?= Date: Mon, 18 Mar 2024 12:25:42 +0100 Subject: [PATCH 07/20] Refactor httpClientRequests to add responseTimeout (#3442) Refactor httpClientRequests to add responseTimeout --- .../nav/dolly/bestilling/aareg/AaregClient.java | 2 +- .../aareg/amelding/AmeldingConsumer.java | 17 +---------------- .../aareg/amelding/AmeldingService.java | 9 ++++----- .../aareg/command/AmeldingPutCommand.java | 7 +++++++ .../command/PdlDataOppdateringCommand.java | 6 ++++++ .../command/PdlDataOpprettingCommand.java | 6 ++++++ .../pdldata/command/PdlDataOrdreCommand.java | 6 ++++++ .../PensjonforvalterConsumer.java | 1 - .../command/LagreAlderspensjonCommand.java | 2 +- .../command/LagrePoppInntektCommand.java | 2 +- .../command/LagreTpForholdCommand.java | 2 +- .../command/LagreTpYtelseCommand.java | 2 +- .../command/LagreUforetrygdCommand.java | 2 +- .../command/EgenansattPostCommand.java | 6 ++++++ .../command/TpsMessagingPostCommand.java | 6 ++++++ .../java/no/nav/dolly/util/RequestTimeout.java | 9 +++++++++ 16 files changed, 57 insertions(+), 28 deletions(-) create mode 100644 apps/dolly-backend/src/main/java/no/nav/dolly/util/RequestTimeout.java diff --git a/apps/dolly-backend/src/main/java/no/nav/dolly/bestilling/aareg/AaregClient.java b/apps/dolly-backend/src/main/java/no/nav/dolly/bestilling/aareg/AaregClient.java index 2d1f778f561..9333c6fe6b2 100644 --- a/apps/dolly-backend/src/main/java/no/nav/dolly/bestilling/aareg/AaregClient.java +++ b/apps/dolly-backend/src/main/java/no/nav/dolly/bestilling/aareg/AaregClient.java @@ -80,7 +80,7 @@ public Flux gjenopprett(RsDollyUtvidetBestilling bestilling, Dolly return sendArbeidsforhold(bestilling, dollyPerson, miljoerTrygg.get(), isOpprettEndre); } else { - return ameldingService.sendAmelding(bestilling, dollyPerson, miljoerTrygg.get(), progress); + return ameldingService.sendAmelding(bestilling, dollyPerson, miljoerTrygg.get()); } }) .map(status -> futurePersist(progress, status)); diff --git a/apps/dolly-backend/src/main/java/no/nav/dolly/bestilling/aareg/amelding/AmeldingConsumer.java b/apps/dolly-backend/src/main/java/no/nav/dolly/bestilling/aareg/amelding/AmeldingConsumer.java index a967466d8b0..7891bc02455 100644 --- a/apps/dolly-backend/src/main/java/no/nav/dolly/bestilling/aareg/amelding/AmeldingConsumer.java +++ b/apps/dolly-backend/src/main/java/no/nav/dolly/bestilling/aareg/amelding/AmeldingConsumer.java @@ -5,7 +5,6 @@ import lombok.extern.slf4j.Slf4j; import no.nav.dolly.bestilling.aareg.command.AmeldingPutCommand; import no.nav.dolly.config.Consumers; -import no.nav.dolly.domain.jpa.BestillingProgress; import no.nav.dolly.errorhandling.ErrorStatusDecoder; import no.nav.dolly.metrics.Timed; import no.nav.testnav.libs.dto.ameldingservice.v1.AMeldingDTO; @@ -14,15 +13,11 @@ import no.nav.testnav.libs.standalone.servletsecurity.exchange.TokenExchange; import org.slf4j.event.Level; import org.springframework.http.HttpStatus; -import org.springframework.http.client.reactive.ReactorClientHttpConnector; import org.springframework.stereotype.Service; import org.springframework.web.reactive.function.client.WebClient; import reactor.core.publisher.Flux; import reactor.core.publisher.Mono; -import reactor.netty.http.client.HttpClient; -import reactor.netty.resources.ConnectionProvider; -import java.time.Duration; import java.time.format.DateTimeFormatter; import java.util.List; import java.util.stream.Collectors; @@ -53,22 +48,12 @@ public AmeldingConsumer( this.webClient = webClientBuilder .baseUrl(serverProperties.getUrl()) .exchangeStrategies(getJacksonStrategy(objectMapper)) - .clientConnector( - new ReactorClientHttpConnector( - HttpClient - .create(ConnectionProvider.builder("Testnorge connection pool") - .maxConnections(5) - .pendingAcquireMaxCount(10000) - .pendingAcquireTimeout(Duration.ofMinutes(30)) - .build()) - .responseTimeout(Duration.ofSeconds(3)) - )) .build(); this.errorStatusDecoder = errorStatusDecoder; } @Timed(name = "providers", tags = {"operation", "amelding_put"}) - public Flux sendAmeldinger(List ameldinger, String miljoe, BestillingProgress progress) { + public Flux sendAmeldinger(List ameldinger, String miljoe) { return tokenService.exchange(serverProperties) .flatMapMany(token -> Flux.fromIterable(ameldinger) diff --git a/apps/dolly-backend/src/main/java/no/nav/dolly/bestilling/aareg/amelding/AmeldingService.java b/apps/dolly-backend/src/main/java/no/nav/dolly/bestilling/aareg/amelding/AmeldingService.java index 95b766dcb39..ad4c851d363 100644 --- a/apps/dolly-backend/src/main/java/no/nav/dolly/bestilling/aareg/amelding/AmeldingService.java +++ b/apps/dolly-backend/src/main/java/no/nav/dolly/bestilling/aareg/amelding/AmeldingService.java @@ -4,7 +4,6 @@ import lombok.extern.slf4j.Slf4j; import ma.glasnost.orika.MapperFacade; import ma.glasnost.orika.MappingContext; -import no.nav.dolly.domain.jpa.BestillingProgress; import no.nav.dolly.domain.resultset.RsDollyUtvidetBestilling; import no.nav.dolly.domain.resultset.aareg.RsAareg; import no.nav.dolly.domain.resultset.aareg.RsAmeldingRequest; @@ -34,7 +33,7 @@ public class AmeldingService { private final OrganisasjonServiceConsumer organisasjonServiceConsumer; public Mono sendAmelding(RsDollyUtvidetBestilling bestilling, DollyPerson dollyPerson, - Set miljoer, BestillingProgress progress) { + Set miljoer) { var orgnumre = bestilling.getAareg().getFirst().getAmelding().stream() .map(RsAmeldingRequest::getArbeidsforhold) @@ -49,14 +48,14 @@ public Mono sendAmelding(RsDollyUtvidetBestilling bestilling, DollyPerso .collect(Collectors.toMap(OrganisasjonDTO::getOrgnummer, OrganisasjonDTO::getJuridiskEnhet)) .flatMapMany(organisasjon -> prepareAmeldinger(bestilling.getAareg().getFirst(), dollyPerson.getIdent(), - organisasjon, miljoe, progress)) + organisasjon, miljoe)) .collect(Collectors.joining(","))) .flatMap(Flux::from) .collect(Collectors.joining(",")); } private Flux prepareAmeldinger(RsAareg aareg, String ident, Map organisasjon, - String miljoe, BestillingProgress progress) { + String miljoe) { var context = new MappingContext.Factory().getContext(); context.setProperty("personIdent", ident); @@ -67,7 +66,7 @@ private Flux prepareAmeldinger(RsAareg aareg, String ident, Map mapperFacade.map(aamelding, AMeldingDTO.class, context)) .sort(Comparator.comparing(AMeldingDTO::getKalendermaaned)) .collectList() - .flatMapMany(ameldinger -> ameldingConsumer.sendAmeldinger(ameldinger, miljoe, progress) + .flatMapMany(ameldinger -> ameldingConsumer.sendAmeldinger(ameldinger, miljoe) .distinct() .map(status -> STATUS_ELEMENT.formatted(miljoe, status))); } diff --git a/apps/dolly-backend/src/main/java/no/nav/dolly/bestilling/aareg/command/AmeldingPutCommand.java b/apps/dolly-backend/src/main/java/no/nav/dolly/bestilling/aareg/command/AmeldingPutCommand.java index 7abf1f1b253..b675a80a052 100644 --- a/apps/dolly-backend/src/main/java/no/nav/dolly/bestilling/aareg/command/AmeldingPutCommand.java +++ b/apps/dolly-backend/src/main/java/no/nav/dolly/bestilling/aareg/command/AmeldingPutCommand.java @@ -9,11 +9,14 @@ import org.springframework.http.ResponseEntity; import org.springframework.web.reactive.function.client.WebClient; import reactor.core.publisher.Mono; +import reactor.netty.http.client.HttpClientRequest; import reactor.util.retry.Retry; import java.time.Duration; import java.util.concurrent.Callable; +import static no.nav.dolly.util.RequestTimeout.REQUEST_DURATION; + @RequiredArgsConstructor public class AmeldingPutCommand implements Callable>> { @@ -31,6 +34,10 @@ public Mono> call() { return webClient.put() .uri(uriBuilder -> uriBuilder.path(AMELDING_URL) .build()) + .httpRequest(httpRequest -> { + HttpClientRequest reactorRequest = httpRequest.getNativeRequest(); + reactorRequest.responseTimeout(Duration.ofSeconds(REQUEST_DURATION)); + }) .header(HttpHeaders.AUTHORIZATION, "Bearer " + token) .header(UserConstant.USER_HEADER_JWT, TokenXUtil.getUserJwt()) .header(MILJOE, miljo) diff --git a/apps/dolly-backend/src/main/java/no/nav/dolly/bestilling/pdldata/command/PdlDataOppdateringCommand.java b/apps/dolly-backend/src/main/java/no/nav/dolly/bestilling/pdldata/command/PdlDataOppdateringCommand.java index aea49ffdfb4..47d8da35b38 100644 --- a/apps/dolly-backend/src/main/java/no/nav/dolly/bestilling/pdldata/command/PdlDataOppdateringCommand.java +++ b/apps/dolly-backend/src/main/java/no/nav/dolly/bestilling/pdldata/command/PdlDataOppdateringCommand.java @@ -13,12 +13,14 @@ import org.springframework.web.reactive.function.BodyInserters; import org.springframework.web.reactive.function.client.WebClient; import reactor.core.publisher.Flux; +import reactor.netty.http.client.HttpClientRequest; import reactor.util.retry.Retry; import java.net.http.HttpTimeoutException; import java.time.Duration; import java.util.concurrent.Callable; +import static no.nav.dolly.util.RequestTimeout.REQUEST_DURATION; import static no.nav.dolly.util.TokenXUtil.getUserJwt; @Slf4j @@ -37,6 +39,10 @@ public Flux call() { return webClient .put() .uri(PDL_FORVALTER_PERSONER_URL, ident) + .httpRequest(httpRequest -> { + HttpClientRequest reactorRequest = httpRequest.getNativeRequest(); + reactorRequest.responseTimeout(Duration.ofSeconds(REQUEST_DURATION)); + }) .header(HttpHeaders.AUTHORIZATION, "Bearer " + token) .header(UserConstant.USER_HEADER_JWT, getUserJwt()) .contentType(MediaType.APPLICATION_JSON) diff --git a/apps/dolly-backend/src/main/java/no/nav/dolly/bestilling/pdldata/command/PdlDataOpprettingCommand.java b/apps/dolly-backend/src/main/java/no/nav/dolly/bestilling/pdldata/command/PdlDataOpprettingCommand.java index e476b4e6ce9..ee9a194e245 100644 --- a/apps/dolly-backend/src/main/java/no/nav/dolly/bestilling/pdldata/command/PdlDataOpprettingCommand.java +++ b/apps/dolly-backend/src/main/java/no/nav/dolly/bestilling/pdldata/command/PdlDataOpprettingCommand.java @@ -13,12 +13,14 @@ import org.springframework.web.reactive.function.BodyInserters; import org.springframework.web.reactive.function.client.WebClient; import reactor.core.publisher.Flux; +import reactor.netty.http.client.HttpClientRequest; import reactor.util.retry.Retry; import java.net.http.HttpTimeoutException; import java.time.Duration; import java.util.concurrent.Callable; +import static no.nav.dolly.util.RequestTimeout.REQUEST_DURATION; import static no.nav.dolly.util.TokenXUtil.getUserJwt; @Slf4j @@ -36,6 +38,10 @@ public Flux call() { return webClient .post() .uri(PDL_FORVALTER_PERSONER_URL) + .httpRequest(httpRequest -> { + HttpClientRequest reactorRequest = httpRequest.getNativeRequest(); + reactorRequest.responseTimeout(Duration.ofSeconds(REQUEST_DURATION)); + }) .header(HttpHeaders.AUTHORIZATION, "Bearer " + token) .header(UserConstant.USER_HEADER_JWT, getUserJwt()) .contentType(MediaType.APPLICATION_JSON) diff --git a/apps/dolly-backend/src/main/java/no/nav/dolly/bestilling/pdldata/command/PdlDataOrdreCommand.java b/apps/dolly-backend/src/main/java/no/nav/dolly/bestilling/pdldata/command/PdlDataOrdreCommand.java index 353b0290336..1b9dcc72e2b 100644 --- a/apps/dolly-backend/src/main/java/no/nav/dolly/bestilling/pdldata/command/PdlDataOrdreCommand.java +++ b/apps/dolly-backend/src/main/java/no/nav/dolly/bestilling/pdldata/command/PdlDataOrdreCommand.java @@ -10,12 +10,14 @@ import org.springframework.http.MediaType; import org.springframework.web.reactive.function.client.WebClient; import reactor.core.publisher.Flux; +import reactor.netty.http.client.HttpClientRequest; import reactor.util.retry.Retry; import java.net.http.HttpTimeoutException; import java.time.Duration; import java.util.concurrent.Callable; +import static no.nav.dolly.util.RequestTimeout.REQUEST_DURATION; import static no.nav.dolly.util.TokenXUtil.getUserJwt; @RequiredArgsConstructor @@ -36,6 +38,10 @@ public Flux call() { .uri(uriBuilder -> uriBuilder.path(PDL_FORVALTER_ORDRE_URL) .queryParam(EXCLUDE_EKSTERNE_PERSONER, ekskluderEksternePersoner) .build(ident)) + .httpRequest(httpRequest -> { + HttpClientRequest reactorRequest = httpRequest.getNativeRequest(); + reactorRequest.responseTimeout(Duration.ofSeconds(REQUEST_DURATION)); + }) .header(HttpHeaders.AUTHORIZATION, "Bearer " + token) .header(UserConstant.USER_HEADER_JWT, getUserJwt()) .contentType(MediaType.APPLICATION_JSON) diff --git a/apps/dolly-backend/src/main/java/no/nav/dolly/bestilling/pensjonforvalter/PensjonforvalterConsumer.java b/apps/dolly-backend/src/main/java/no/nav/dolly/bestilling/pensjonforvalter/PensjonforvalterConsumer.java index 81cdf5ac5f7..518fa494706 100644 --- a/apps/dolly-backend/src/main/java/no/nav/dolly/bestilling/pensjonforvalter/PensjonforvalterConsumer.java +++ b/apps/dolly-backend/src/main/java/no/nav/dolly/bestilling/pensjonforvalter/PensjonforvalterConsumer.java @@ -41,7 +41,6 @@ @Service public class PensjonforvalterConsumer implements ConsumerStatus { - public static final int REQUEST_DURATION = 30000; private final TokenExchange tokenService; private final WebClient webClient; private final ServerProperties serverProperties; diff --git a/apps/dolly-backend/src/main/java/no/nav/dolly/bestilling/pensjonforvalter/command/LagreAlderspensjonCommand.java b/apps/dolly-backend/src/main/java/no/nav/dolly/bestilling/pensjonforvalter/command/LagreAlderspensjonCommand.java index 4c165bd170f..1a7c18149f2 100644 --- a/apps/dolly-backend/src/main/java/no/nav/dolly/bestilling/pensjonforvalter/command/LagreAlderspensjonCommand.java +++ b/apps/dolly-backend/src/main/java/no/nav/dolly/bestilling/pensjonforvalter/command/LagreAlderspensjonCommand.java @@ -15,11 +15,11 @@ import java.time.Duration; import java.util.concurrent.Callable; -import static no.nav.dolly.bestilling.pensjonforvalter.PensjonforvalterConsumer.REQUEST_DURATION; import static no.nav.dolly.domain.CommonKeysAndUtils.CONSUMER; import static no.nav.dolly.domain.CommonKeysAndUtils.HEADER_NAV_CALL_ID; import static no.nav.dolly.domain.CommonKeysAndUtils.HEADER_NAV_CONSUMER_ID; import static no.nav.dolly.util.CallIdUtil.generateCallId; +import static no.nav.dolly.util.RequestTimeout.REQUEST_DURATION; import static org.springframework.http.HttpHeaders.AUTHORIZATION; @Slf4j diff --git a/apps/dolly-backend/src/main/java/no/nav/dolly/bestilling/pensjonforvalter/command/LagrePoppInntektCommand.java b/apps/dolly-backend/src/main/java/no/nav/dolly/bestilling/pensjonforvalter/command/LagrePoppInntektCommand.java index 28b8cfdd874..48c050b98c8 100644 --- a/apps/dolly-backend/src/main/java/no/nav/dolly/bestilling/pensjonforvalter/command/LagrePoppInntektCommand.java +++ b/apps/dolly-backend/src/main/java/no/nav/dolly/bestilling/pensjonforvalter/command/LagrePoppInntektCommand.java @@ -14,11 +14,11 @@ import java.time.Duration; import java.util.concurrent.Callable; -import static no.nav.dolly.bestilling.pensjonforvalter.PensjonforvalterConsumer.REQUEST_DURATION; import static no.nav.dolly.domain.CommonKeysAndUtils.CONSUMER; import static no.nav.dolly.domain.CommonKeysAndUtils.HEADER_NAV_CALL_ID; import static no.nav.dolly.domain.CommonKeysAndUtils.HEADER_NAV_CONSUMER_ID; import static no.nav.dolly.util.CallIdUtil.generateCallId; +import static no.nav.dolly.util.RequestTimeout.REQUEST_DURATION; import static org.springframework.http.HttpHeaders.AUTHORIZATION; @Slf4j diff --git a/apps/dolly-backend/src/main/java/no/nav/dolly/bestilling/pensjonforvalter/command/LagreTpForholdCommand.java b/apps/dolly-backend/src/main/java/no/nav/dolly/bestilling/pensjonforvalter/command/LagreTpForholdCommand.java index 60dca6399da..4a4b5488661 100644 --- a/apps/dolly-backend/src/main/java/no/nav/dolly/bestilling/pensjonforvalter/command/LagreTpForholdCommand.java +++ b/apps/dolly-backend/src/main/java/no/nav/dolly/bestilling/pensjonforvalter/command/LagreTpForholdCommand.java @@ -15,11 +15,11 @@ import java.time.Duration; import java.util.concurrent.Callable; -import static no.nav.dolly.bestilling.pensjonforvalter.PensjonforvalterConsumer.REQUEST_DURATION; import static no.nav.dolly.domain.CommonKeysAndUtils.CONSUMER; import static no.nav.dolly.domain.CommonKeysAndUtils.HEADER_NAV_CALL_ID; import static no.nav.dolly.domain.CommonKeysAndUtils.HEADER_NAV_CONSUMER_ID; import static no.nav.dolly.util.CallIdUtil.generateCallId; +import static no.nav.dolly.util.RequestTimeout.REQUEST_DURATION; import static no.nav.dolly.util.TokenXUtil.getUserJwt; import static org.springframework.http.HttpHeaders.AUTHORIZATION; diff --git a/apps/dolly-backend/src/main/java/no/nav/dolly/bestilling/pensjonforvalter/command/LagreTpYtelseCommand.java b/apps/dolly-backend/src/main/java/no/nav/dolly/bestilling/pensjonforvalter/command/LagreTpYtelseCommand.java index 69659c1eba2..f6f41a82704 100644 --- a/apps/dolly-backend/src/main/java/no/nav/dolly/bestilling/pensjonforvalter/command/LagreTpYtelseCommand.java +++ b/apps/dolly-backend/src/main/java/no/nav/dolly/bestilling/pensjonforvalter/command/LagreTpYtelseCommand.java @@ -15,11 +15,11 @@ import java.time.Duration; import java.util.concurrent.Callable; -import static no.nav.dolly.bestilling.pensjonforvalter.PensjonforvalterConsumer.REQUEST_DURATION; import static no.nav.dolly.domain.CommonKeysAndUtils.CONSUMER; import static no.nav.dolly.domain.CommonKeysAndUtils.HEADER_NAV_CALL_ID; import static no.nav.dolly.domain.CommonKeysAndUtils.HEADER_NAV_CONSUMER_ID; import static no.nav.dolly.util.CallIdUtil.generateCallId; +import static no.nav.dolly.util.RequestTimeout.REQUEST_DURATION; import static no.nav.dolly.util.TokenXUtil.getUserJwt; import static org.springframework.http.HttpHeaders.AUTHORIZATION; diff --git a/apps/dolly-backend/src/main/java/no/nav/dolly/bestilling/pensjonforvalter/command/LagreUforetrygdCommand.java b/apps/dolly-backend/src/main/java/no/nav/dolly/bestilling/pensjonforvalter/command/LagreUforetrygdCommand.java index e294e1542e9..dd1d77c0d1c 100644 --- a/apps/dolly-backend/src/main/java/no/nav/dolly/bestilling/pensjonforvalter/command/LagreUforetrygdCommand.java +++ b/apps/dolly-backend/src/main/java/no/nav/dolly/bestilling/pensjonforvalter/command/LagreUforetrygdCommand.java @@ -14,11 +14,11 @@ import java.time.Duration; import java.util.concurrent.Callable; -import static no.nav.dolly.bestilling.pensjonforvalter.PensjonforvalterConsumer.REQUEST_DURATION; import static no.nav.dolly.domain.CommonKeysAndUtils.CONSUMER; import static no.nav.dolly.domain.CommonKeysAndUtils.HEADER_NAV_CALL_ID; import static no.nav.dolly.domain.CommonKeysAndUtils.HEADER_NAV_CONSUMER_ID; import static no.nav.dolly.util.CallIdUtil.generateCallId; +import static no.nav.dolly.util.RequestTimeout.REQUEST_DURATION; import static org.springframework.http.HttpHeaders.AUTHORIZATION; @Slf4j diff --git a/apps/dolly-backend/src/main/java/no/nav/dolly/bestilling/tpsmessagingservice/command/EgenansattPostCommand.java b/apps/dolly-backend/src/main/java/no/nav/dolly/bestilling/tpsmessagingservice/command/EgenansattPostCommand.java index 132696f1460..8cae609e3e0 100644 --- a/apps/dolly-backend/src/main/java/no/nav/dolly/bestilling/tpsmessagingservice/command/EgenansattPostCommand.java +++ b/apps/dolly-backend/src/main/java/no/nav/dolly/bestilling/tpsmessagingservice/command/EgenansattPostCommand.java @@ -9,6 +9,7 @@ import org.springframework.web.reactive.function.client.WebClient; import reactor.core.publisher.Flux; import reactor.core.publisher.Mono; +import reactor.netty.http.client.HttpClientRequest; import reactor.util.retry.Retry; import java.time.Duration; @@ -18,6 +19,7 @@ import java.util.concurrent.Callable; import static java.util.Objects.nonNull; +import static no.nav.dolly.util.RequestTimeout.REQUEST_DURATION; @RequiredArgsConstructor @Slf4j @@ -44,6 +46,10 @@ public Flux call() { .queryParamIfPresent(MILJOER_PARAM, nonNull(miljoer) ? Optional.of(miljoer) : Optional.empty()) .queryParam(EGENANSATT_FRA_PARAM, datoFra) .build(ident)) + .httpRequest(httpRequest -> { + HttpClientRequest reactorRequest = httpRequest.getNativeRequest(); + reactorRequest.responseTimeout(Duration.ofSeconds(REQUEST_DURATION)); + }) .contentType(MediaType.APPLICATION_JSON) .header(HttpHeaders.AUTHORIZATION, "Bearer " + token) .retrieve() diff --git a/apps/dolly-backend/src/main/java/no/nav/dolly/bestilling/tpsmessagingservice/command/TpsMessagingPostCommand.java b/apps/dolly-backend/src/main/java/no/nav/dolly/bestilling/tpsmessagingservice/command/TpsMessagingPostCommand.java index cf17fa53891..a2d111acb97 100644 --- a/apps/dolly-backend/src/main/java/no/nav/dolly/bestilling/tpsmessagingservice/command/TpsMessagingPostCommand.java +++ b/apps/dolly-backend/src/main/java/no/nav/dolly/bestilling/tpsmessagingservice/command/TpsMessagingPostCommand.java @@ -9,6 +9,7 @@ import org.springframework.web.reactive.function.client.WebClient; import reactor.core.publisher.Flux; import reactor.core.publisher.Mono; +import reactor.netty.http.client.HttpClientRequest; import reactor.util.retry.Retry; import java.time.Duration; @@ -17,6 +18,7 @@ import java.util.concurrent.Callable; import static java.util.Objects.nonNull; +import static no.nav.dolly.util.RequestTimeout.REQUEST_DURATION; @RequiredArgsConstructor @Slf4j @@ -41,6 +43,10 @@ public Flux call() { .path(urlPath) .queryParamIfPresent(MILJOER_PARAM, nonNull(miljoer) ? Optional.of(miljoer) : Optional.empty()) .build(ident)) + .httpRequest(httpRequest -> { + HttpClientRequest reactorRequest = httpRequest.getNativeRequest(); + reactorRequest.responseTimeout(Duration.ofSeconds(REQUEST_DURATION)); + }) .contentType(MediaType.APPLICATION_JSON) .header(HttpHeaders.AUTHORIZATION, "Bearer " + token) .bodyValue(body) diff --git a/apps/dolly-backend/src/main/java/no/nav/dolly/util/RequestTimeout.java b/apps/dolly-backend/src/main/java/no/nav/dolly/util/RequestTimeout.java new file mode 100644 index 00000000000..4f646e47f71 --- /dev/null +++ b/apps/dolly-backend/src/main/java/no/nav/dolly/util/RequestTimeout.java @@ -0,0 +1,9 @@ +package no.nav.dolly.util; + +import lombok.experimental.UtilityClass; + +@UtilityClass +public class RequestTimeout { + + public static final int REQUEST_DURATION = 30000; +} From 7dc03210e8f6a08c620eefa5e740167ad389b9d3 Mon Sep 17 00:00:00 2001 From: Betsy Carina Traran Date: Mon, 18 Mar 2024 13:56:00 +0100 Subject: [PATCH 08/20] Fix dato som ikke vises --- .../js/src/components/ui/form/inputs/datepicker/Datepicker.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/apps/dolly-frontend/src/main/js/src/components/ui/form/inputs/datepicker/Datepicker.tsx b/apps/dolly-frontend/src/main/js/src/components/ui/form/inputs/datepicker/Datepicker.tsx index 09ace0a2cd0..af34c0e70f6 100644 --- a/apps/dolly-frontend/src/main/js/src/components/ui/form/inputs/datepicker/Datepicker.tsx +++ b/apps/dolly-frontend/src/main/js/src/components/ui/form/inputs/datepicker/Datepicker.tsx @@ -34,7 +34,7 @@ export const Datepicker = ({ const getSelectedDay = () => { const selected = formMethods.watch(name) - if (_.isNil(selected) || _.isEmpty(selected)) { + if (_.isNil(selected) || (!isDate(selected) && _.isEmpty(selected))) { return undefined } else if (isDate(selected)) { return fixTimezone(selected) From c9ece8eb052de1c631864a988340ef91b5a90a69 Mon Sep 17 00:00:00 2001 From: kristenhaerum Date: Wed, 20 Mar 2024 15:19:52 +0100 Subject: [PATCH 09/20] Replace Integer with BigInteger in TenorRequest Several fields in TenorRequest.java that were of type Integer have been replaced with BigInteger. This was done to accommodate larger numerical values that may not fit in the range of Integer. Additionally, a setting to always include error messages was added in application.yml. --- .../domain/TenorRequest.java | 23 ++++++++++--------- .../src/main/resources/application.yml | 2 ++ 2 files changed, 14 insertions(+), 11 deletions(-) diff --git a/apps/tenor-search-service/src/main/java/no/nav/testnav/apps/tenorsearchservice/domain/TenorRequest.java b/apps/tenor-search-service/src/main/java/no/nav/testnav/apps/tenorsearchservice/domain/TenorRequest.java index 0415704b80a..2a2e1b4a399 100644 --- a/apps/tenor-search-service/src/main/java/no/nav/testnav/apps/tenorsearchservice/domain/TenorRequest.java +++ b/apps/tenor-search-service/src/main/java/no/nav/testnav/apps/tenorsearchservice/domain/TenorRequest.java @@ -4,6 +4,7 @@ import lombok.Data; import lombok.NoArgsConstructor; +import java.math.BigInteger; import java.time.LocalDate; import java.time.YearMonth; import java.util.ArrayList; @@ -139,8 +140,8 @@ public static class DatoIntervall { @NoArgsConstructor public static class Intervall { - private Integer fraOgMed; - private Integer tilOgMed; + private BigInteger fraOgMed; + private BigInteger tilOgMed; } @Data @@ -159,7 +160,7 @@ public static class Adresser { @Schema(description = "Adressesøk, fritekst") private AdresseGradering adresseGradering; - private Integer kommunenummer; + private BigInteger kommunenummer; private Boolean harBostedsadresse; private Boolean harOppholdAnnetSted; private Boolean harPostadresseNorge; @@ -207,7 +208,7 @@ public static class Tjenestepensjonsavtale { public static class Skattemelding { @Schema(description = "Inntektsår, 4 siffre, årene 2018, 2019, 2020, 2021, 2022 ... osv opptil i forfjor") - private Integer inntektsaar; + private BigInteger inntektsaar; private Skattemeldingstype skattemeldingstype; } @@ -216,7 +217,7 @@ public static class Skattemelding { public static class Inntekt { private MonthInterval periode; - private Integer opplysningspliktig; + private BigInteger opplysningspliktig; private List inntektstyper; private AOrdningBeskrivelse beskrivelse; private List forskuddstrekk; @@ -254,7 +255,7 @@ public static class MonthInterval { public static class Skatteplikt { @Schema(description = "Inntektsår, 4 siffre, årene 2019, 2019, 2020, 2021, 2022, 2023 ... osv opptil i fjor") - private Integer inntektsaar; + private BigInteger inntektsaar; private List skattepliktstyper; private SaerskiltSkatteplikt saerskiltSkatteplikt; @@ -271,7 +272,7 @@ public List getSkattepliktstyper() { @NoArgsConstructor public static class Tilleggsskatt { - private Integer inntektsaar; + private BigInteger inntektsaar; private List tilleggsskattTyper; public List getTilleggsskattTyper() { @@ -303,7 +304,7 @@ public static class Arbeidsforhold { public static class BeregnetSkatt { @Schema(description = "Inntektsår, 4 siffre, årene 2018, 2019, 2020, 2021, 2022, 2023 ... osv opptil i fjor") - private Integer inntektsaar; + private BigInteger inntektsaar; private Oppgjoerstype oppgjoerstype; private Boolean pensjonsgivendeInntekt; } @@ -314,7 +315,7 @@ public static class BeregnetSkatt { public static class TestinnsendingSkattPerson { @Schema(description = "Inntektsår, 4 siffre, årene 2020, 2021, 2022, 2023 ... osv opptil i fjor") - private Integer inntektsaar; + private BigInteger inntektsaar; @Schema(description = "Skattemelding utkast, merk at false indikerer har ikke skatteMeldingUtkast") private Boolean harSkattemeldingUtkast; @Schema(description = "Skattemelding fastsatt, merk at false indikerer har ikke skatteMeldingFastsatt") @@ -334,7 +335,7 @@ public static class SamletReskontroInnsyn { public static class SummertSkattegrunnlag { @Schema(description = "Inntektsår, 4 siffre, årene 2019, 2020, 2021, 2022, 2023 ... osv opptil i fjor") - private Integer inntektsaar; + private BigInteger inntektsaar; private Stadietype stadietype; private Oppgjoerstype oppgjoerstype; private TekniskNavn tekniskNavn; @@ -346,7 +347,7 @@ public static class SummertSkattegrunnlag { public static class SpesisfisertSummertSkattegrunnlag { @Schema(description = "Inntektsår, 4 siffre, årene 2019, 2020, 2021, 2022, 2023 ... osv opptil i fjor") - private Integer inntektsaar; + private BigInteger inntektsaar; private Stadietype stadietype; private Oppgjoerstype oppgjoerstype; private TekniskNavn tekniskNavn; diff --git a/apps/tenor-search-service/src/main/resources/application.yml b/apps/tenor-search-service/src/main/resources/application.yml index ae8b30ef805..5a061bada64 100644 --- a/apps/tenor-search-service/src/main/resources/application.yml +++ b/apps/tenor-search-service/src/main/resources/application.yml @@ -50,6 +50,8 @@ server: force: true force-request: true force-response: true + error: + include-message: always consumers: tenor-search-service: From d48b5e0df9c35411cab22a5f6afbf4746b937eef Mon Sep 17 00:00:00 2001 From: Stian Gustavsson Date: Thu, 21 Mar 2024 08:58:58 +0100 Subject: [PATCH 10/20] Setter registreringsdato til dagen etter stiftelsesdato for nye org (#3439) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * Setter registreringsdato til dagen etter stiftelsesdato for nye organisasjoner * Ereg batch status spør mot modapp isteden på q2 * Mer logging og svarer med 404 dersom kall ikke kommer gjennom, slik at org-service ikke blir stuck i loop * Refaktor av batch status henting fra modapp-q2 * Skrevet om ereg-batch-status-service til reactive * Lagt til modapp ereg proxy * Endret oppsett for ereg-batch-status-service og flyttet den til gcp * Refaktorert apper til å fungere med nye ereg-batch-status-service i dev-gcp * Refaktorert org-bestilling-service --- .../app.ereg-batch-status-service.yml | 2 +- .github/workflows/proxy.modapp-ereg-proxy.yml | 23 ++ .gitignore | 1 + apps/ereg-batch-status-service/README.md | 2 +- apps/ereg-batch-status-service/build.gradle | 10 +- apps/ereg-batch-status-service/config.yml | 5 +- .../ereg-batch-status-service/settings.gradle | 4 +- .../config/ApplicationConfig.java | 9 +- .../config/Consumers.java | 29 +++ .../config/EregProperties.java | 16 -- .../config/OpenApiConfig.java | 15 +- .../config/SecurityConfig.java | 33 +-- .../consumer/EregConsumer.java | 45 ++-- .../command/GetBatchStatusCommand.java | 28 ++- .../filter/SwaggerWebFilter.java | 23 ++ .../provider/BatchStatusController.java | 8 +- .../src/main/resources/application-dev.yml | 1 + .../src/main/resources/application.yml | 20 +- .../src/main/resources/bootstrap.yml | 4 - .../config.yml | 4 +- .../command/GetEregBatchStatusCommand.java | 29 ++- .../src/main/resources/application.yml | 6 +- .../organisasjonmottak/domain/Record.java | 40 +-- .../listener/OrganisasjonMottakListener.java | 14 ++ .../organisasjonmottak/domain/RecordTest.java | 42 ++++ .../EregProxyApplicationStarter.java | 4 +- proxies/modapp-ereg-proxy/Dockerfile | 8 + proxies/modapp-ereg-proxy/build.gradle | 71 ++++++ proxies/modapp-ereg-proxy/config.yml | 66 +++++ .../gradle/wrapper/gradle-wrapper.jar | Bin 0 -> 59536 bytes .../gradle/wrapper/gradle-wrapper.properties | 5 + proxies/modapp-ereg-proxy/gradlew | 234 ++++++++++++++++++ proxies/modapp-ereg-proxy/gradlew.bat | 89 +++++++ proxies/modapp-ereg-proxy/gradlewUpdate.sh | 3 + proxies/modapp-ereg-proxy/settings.gradle | 18 ++ .../proxies/modapperegproxy/Consumers.java | 29 +++ .../ModappEregProxyApplicationStarter.java | 73 ++++++ .../src/main/resources/application.yml | 30 +++ .../src/main/resources/logback-spring.xml | 40 +++ .../ApplicationContextTest.java | 20 ++ .../src/test/resources/application-test.yml | 11 + settings.gradle | 1 + 42 files changed, 982 insertions(+), 133 deletions(-) create mode 100644 .github/workflows/proxy.modapp-ereg-proxy.yml create mode 100644 apps/ereg-batch-status-service/src/main/java/no/nav/registre/testnorge/eregbatchstatusservice/config/Consumers.java delete mode 100644 apps/ereg-batch-status-service/src/main/java/no/nav/registre/testnorge/eregbatchstatusservice/config/EregProperties.java create mode 100644 apps/ereg-batch-status-service/src/main/java/no/nav/registre/testnorge/eregbatchstatusservice/filter/SwaggerWebFilter.java create mode 100644 apps/ereg-batch-status-service/src/main/resources/application-dev.yml delete mode 100644 apps/ereg-batch-status-service/src/main/resources/bootstrap.yml create mode 100644 apps/organisasjon-mottak-service/src/test/java/no/nav/registre/testnorge/organisasjonmottak/domain/RecordTest.java create mode 100644 proxies/modapp-ereg-proxy/Dockerfile create mode 100644 proxies/modapp-ereg-proxy/build.gradle create mode 100644 proxies/modapp-ereg-proxy/config.yml create mode 100644 proxies/modapp-ereg-proxy/gradle/wrapper/gradle-wrapper.jar create mode 100644 proxies/modapp-ereg-proxy/gradle/wrapper/gradle-wrapper.properties create mode 100755 proxies/modapp-ereg-proxy/gradlew create mode 100644 proxies/modapp-ereg-proxy/gradlew.bat create mode 100755 proxies/modapp-ereg-proxy/gradlewUpdate.sh create mode 100644 proxies/modapp-ereg-proxy/settings.gradle create mode 100644 proxies/modapp-ereg-proxy/src/main/java/no/nav/testnav/proxies/modapperegproxy/Consumers.java create mode 100644 proxies/modapp-ereg-proxy/src/main/java/no/nav/testnav/proxies/modapperegproxy/ModappEregProxyApplicationStarter.java create mode 100644 proxies/modapp-ereg-proxy/src/main/resources/application.yml create mode 100644 proxies/modapp-ereg-proxy/src/main/resources/logback-spring.xml create mode 100644 proxies/modapp-ereg-proxy/src/test/java/no/nav/testnav/proxies/modapperegproxy/ApplicationContextTest.java create mode 100644 proxies/modapp-ereg-proxy/src/test/resources/application-test.yml diff --git a/.github/workflows/app.ereg-batch-status-service.yml b/.github/workflows/app.ereg-batch-status-service.yml index f9f8e2ac8fd..3547091010a 100644 --- a/.github/workflows/app.ereg-batch-status-service.yml +++ b/.github/workflows/app.ereg-batch-status-service.yml @@ -14,7 +14,7 @@ jobs: workflow: uses: ./.github/workflows/common.workflow.backend.yml with: - cluster: "dev-fss" + cluster: "dev-gcp" working-directory: "apps/ereg-batch-status-service" deploy-tag: "#deploy-ereg-batch-status-service" permissions: diff --git a/.github/workflows/proxy.modapp-ereg-proxy.yml b/.github/workflows/proxy.modapp-ereg-proxy.yml new file mode 100644 index 00000000000..ec4b0b6bdb9 --- /dev/null +++ b/.github/workflows/proxy.modapp-ereg-proxy.yml @@ -0,0 +1,23 @@ +name: modapp-ereg-proxy + +on: + push: + paths: + - libs/reactive-core + - libs/reactive-proxy + - libs/reactive-security + - libs/security-core + - proxies/modapp-ereg-proxy/** + - .github/workflows/proxy.modapp-ereg-proxy.yml + +jobs: + workflow: + uses: ./.github/workflows/common.workflow.backend.yml + with: + cluster: "dev-fss" + working-directory: "proxies/modapp-ereg-proxy" + deploy-tag: "#deploy-proxy" + permissions: + contents: read + id-token: write + secrets: inherit diff --git a/.gitignore b/.gitignore index 88695f9e761..82bf724a9e9 100644 --- a/.gitignore +++ b/.gitignore @@ -1,6 +1,7 @@ *.idea/ *target/ *.iml +*.http # See https://help.github.com/articles/ignoring-files/ for more about ignoring files. diff --git a/apps/ereg-batch-status-service/README.md b/apps/ereg-batch-status-service/README.md index b258606b430..030a76d60dc 100644 --- a/apps/ereg-batch-status-service/README.md +++ b/apps/ereg-batch-status-service/README.md @@ -2,7 +2,7 @@ App for å hente ut batch status. ## Swagger -Swagger finnes under [/swagger](https://ereg-batch-status-service.dev.intern.nav.no/swagger) -endepunktet til applikasjonen. +Swagger finnes under [/swagger](https://testnav-ereg-batch-status-service.intern.dev.nav.no/swagger) -endepunktet til applikasjonen. ## Lokal kjøring Ha naisdevice kjørende og kjør EregBatchServiceServiceApplicationStarter med følgende argumenter: diff --git a/apps/ereg-batch-status-service/build.gradle b/apps/ereg-batch-status-service/build.gradle index ac3f1fb375e..c5aa01d3aaa 100644 --- a/apps/ereg-batch-status-service/build.gradle +++ b/apps/ereg-batch-status-service/build.gradle @@ -44,21 +44,21 @@ dependencies { implementation 'no.nav.testnav.libs:data-transfer-objects' implementation 'no.nav.testnav.libs:reactive-core' - implementation 'no.nav.testnav.libs:servlet-core' - implementation 'no.nav.testnav.libs:servlet-security' + implementation 'no.nav.testnav.libs:reactive-security' + implementation 'no.nav.testnav.libs:security-core' implementation 'org.springframework.boot:spring-boot-starter-webflux' - implementation 'org.springframework.boot:spring-boot-starter-web' implementation 'org.springframework.boot:spring-boot-starter-oauth2-client' + implementation 'org.springframework.boot:spring-boot-starter-oauth2-resource-server' implementation 'org.springframework.boot:spring-boot-starter-security' + implementation 'org.springframework.cloud:spring-cloud-starter-gateway' implementation 'org.springframework.cloud:spring-cloud-starter-vault-config' - implementation 'org.springframework.cloud:spring-cloud-starter-bootstrap' // TODO remove legacy bootstrap config implementation 'org.springframework.boot:spring-boot-starter-actuator' implementation 'io.micrometer:micrometer-registry-prometheus' - implementation 'org.springdoc:springdoc-openapi-starter-webmvc-ui:2.3.0' + implementation 'org.springdoc:springdoc-openapi-starter-webflux-ui:2.3.0' implementation 'io.swagger.core.v3:swagger-annotations-jakarta:2.2.20' implementation 'net.logstash.logback:logstash-logback-encoder:7.4' diff --git a/apps/ereg-batch-status-service/config.yml b/apps/ereg-batch-status-service/config.yml index 23f5416dc3e..5e1b25b8980 100644 --- a/apps/ereg-batch-status-service/config.yml +++ b/apps/ereg-batch-status-service/config.yml @@ -18,6 +18,9 @@ spec: cluster: dev-gcp - application: organisasjon-bestilling-service cluster: dev-gcp + outbound: + external: + - host: testnav-modapp-ereg-proxy.dev-fss-pub.nais.io tokenx: enabled: true azure: @@ -48,4 +51,4 @@ spec: limits: memory: 2048Mi ingresses: - - "https://ereg-batch-status-service.dev-fss-pub.nais.io" \ No newline at end of file + - "https://testnav-ereg-batch-status-service.intern.dev.nav.no" \ No newline at end of file diff --git a/apps/ereg-batch-status-service/settings.gradle b/apps/ereg-batch-status-service/settings.gradle index 5b9f453200b..8c37d66ba90 100644 --- a/apps/ereg-batch-status-service/settings.gradle +++ b/apps/ereg-batch-status-service/settings.gradle @@ -6,8 +6,8 @@ rootProject.name = 'ereg-batch-status-service' includeBuild '../../libs/data-transfer-objects' includeBuild '../../libs/reactive-core' -includeBuild '../../libs/servlet-core' -includeBuild '../../libs/servlet-security' +includeBuild '../../libs/reactive-security' +includeBuild '../../libs/security-core' gradleEnterprise { buildScan { diff --git a/apps/ereg-batch-status-service/src/main/java/no/nav/registre/testnorge/eregbatchstatusservice/config/ApplicationConfig.java b/apps/ereg-batch-status-service/src/main/java/no/nav/registre/testnorge/eregbatchstatusservice/config/ApplicationConfig.java index 67f13c87191..6e6b082290c 100644 --- a/apps/ereg-batch-status-service/src/main/java/no/nav/registre/testnorge/eregbatchstatusservice/config/ApplicationConfig.java +++ b/apps/ereg-batch-status-service/src/main/java/no/nav/registre/testnorge/eregbatchstatusservice/config/ApplicationConfig.java @@ -1,14 +1,17 @@ package no.nav.registre.testnorge.eregbatchstatusservice.config; +import no.nav.testnav.libs.reactivecore.config.CoreConfig; +import no.nav.testnav.libs.reactivesecurity.config.SecureOAuth2ServerToServerConfiguration; import org.springframework.context.annotation.Configuration; import org.springframework.context.annotation.Import; +import org.springframework.web.reactive.config.EnableWebFlux; -import no.nav.testnav.libs.servletcore.config.ApplicationCoreConfig; -import no.nav.testnav.libs.servletsecurity.config.SecureOAuth2ServerToServerConfiguration; @Configuration +@EnableWebFlux @Import({ - ApplicationCoreConfig.class, + CoreConfig.class, + SecurityConfig.class, SecureOAuth2ServerToServerConfiguration.class }) public class ApplicationConfig { diff --git a/apps/ereg-batch-status-service/src/main/java/no/nav/registre/testnorge/eregbatchstatusservice/config/Consumers.java b/apps/ereg-batch-status-service/src/main/java/no/nav/registre/testnorge/eregbatchstatusservice/config/Consumers.java new file mode 100644 index 00000000000..a39eadfc259 --- /dev/null +++ b/apps/ereg-batch-status-service/src/main/java/no/nav/registre/testnorge/eregbatchstatusservice/config/Consumers.java @@ -0,0 +1,29 @@ +package no.nav.registre.testnorge.eregbatchstatusservice.config; + +import lombok.Getter; +import lombok.NoArgsConstructor; +import lombok.Setter; +import no.nav.testnav.libs.securitycore.domain.ServerProperties; +import org.springframework.boot.context.properties.ConfigurationProperties; +import org.springframework.context.annotation.Configuration; + +import static lombok.AccessLevel.PACKAGE; + +/** + * Samler alle placeholders for ulike {@code consumers.*}-konfigurasjon her, dvs. subklasser av {@code ServerProperties}. + *

+ * Husk at Spring Boot bruker relaxed binding + * mellom configuration properties og field names. + * + * @see ServerProperties + */ +@Configuration +@ConfigurationProperties(prefix = "consumers") +@NoArgsConstructor(access = PACKAGE) +@Getter +@Setter(PACKAGE) +public class Consumers { + + private ServerProperties modappEregProxy; + +} diff --git a/apps/ereg-batch-status-service/src/main/java/no/nav/registre/testnorge/eregbatchstatusservice/config/EregProperties.java b/apps/ereg-batch-status-service/src/main/java/no/nav/registre/testnorge/eregbatchstatusservice/config/EregProperties.java deleted file mode 100644 index 4b3c4647e47..00000000000 --- a/apps/ereg-batch-status-service/src/main/java/no/nav/registre/testnorge/eregbatchstatusservice/config/EregProperties.java +++ /dev/null @@ -1,16 +0,0 @@ -package no.nav.registre.testnorge.eregbatchstatusservice.config; - -import lombok.Getter; -import lombok.Setter; -import org.springframework.boot.context.properties.ConfigurationProperties; -import org.springframework.context.annotation.Configuration; - -import java.util.Map; - -@Getter -@Setter -@Configuration -@ConfigurationProperties(prefix = "ereg") -public class EregProperties { - private Map envHostMap; -} diff --git a/apps/ereg-batch-status-service/src/main/java/no/nav/registre/testnorge/eregbatchstatusservice/config/OpenApiConfig.java b/apps/ereg-batch-status-service/src/main/java/no/nav/registre/testnorge/eregbatchstatusservice/config/OpenApiConfig.java index 49734eadc21..d72806f2a12 100644 --- a/apps/ereg-batch-status-service/src/main/java/no/nav/registre/testnorge/eregbatchstatusservice/config/OpenApiConfig.java +++ b/apps/ereg-batch-status-service/src/main/java/no/nav/registre/testnorge/eregbatchstatusservice/config/OpenApiConfig.java @@ -7,17 +7,15 @@ import io.swagger.v3.oas.models.info.License; import io.swagger.v3.oas.models.security.SecurityRequirement; import io.swagger.v3.oas.models.security.SecurityScheme; +import no.nav.testnav.libs.reactivecore.config.ApplicationProperties; import org.springframework.context.annotation.Bean; import org.springframework.context.annotation.Configuration; -import org.springframework.web.servlet.config.annotation.ViewControllerRegistry; -import org.springframework.web.servlet.config.annotation.WebMvcConfigurer; +import org.springframework.http.HttpHeaders; import java.util.Arrays; -import no.nav.testnav.libs.servletcore.config.ApplicationProperties; - @Configuration -public class OpenApiConfig implements WebMvcConfigurer { +public class OpenApiConfig { @Bean public OpenAPI openApi(ApplicationProperties applicationProperties) { @@ -27,7 +25,7 @@ public OpenAPI openApi(ApplicationProperties applicationProperties) { .scheme("bearer") .bearerFormat("JWT") .in(SecurityScheme.In.HEADER) - .name("Authorization") + .name(HttpHeaders.AUTHORIZATION) )) .addSecurityItem( new SecurityRequirement().addList("bearer-jwt", Arrays.asList("read", "write"))) @@ -47,9 +45,4 @@ public OpenAPI openApi(ApplicationProperties applicationProperties) { ) ); } - - @Override - public void addViewControllers(ViewControllerRegistry registry) { - registry.addViewController("/swagger").setViewName("redirect:/swagger-ui.html"); - } } \ No newline at end of file diff --git a/apps/ereg-batch-status-service/src/main/java/no/nav/registre/testnorge/eregbatchstatusservice/config/SecurityConfig.java b/apps/ereg-batch-status-service/src/main/java/no/nav/registre/testnorge/eregbatchstatusservice/config/SecurityConfig.java index 11037bdd77f..8edc18ab66e 100644 --- a/apps/ereg-batch-status-service/src/main/java/no/nav/registre/testnorge/eregbatchstatusservice/config/SecurityConfig.java +++ b/apps/ereg-batch-status-service/src/main/java/no/nav/registre/testnorge/eregbatchstatusservice/config/SecurityConfig.java @@ -1,26 +1,30 @@ package no.nav.registre.testnorge.eregbatchstatusservice.config; +import lombok.RequiredArgsConstructor; +import no.nav.testnav.libs.reactivesecurity.manager.JwtReactiveAuthenticationManager; import org.springframework.context.annotation.Bean; import org.springframework.context.annotation.Configuration; import org.springframework.context.annotation.Profile; -import org.springframework.security.config.Customizer; -import org.springframework.security.config.annotation.web.builders.HttpSecurity; -import org.springframework.security.config.annotation.web.configuration.EnableWebSecurity; -import org.springframework.security.config.annotation.web.configurers.AbstractHttpConfigurer; -import org.springframework.security.config.http.SessionCreationPolicy; -import org.springframework.security.web.SecurityFilterChain; +import org.springframework.security.config.annotation.method.configuration.EnableReactiveMethodSecurity; +import org.springframework.security.config.annotation.web.reactive.EnableWebFluxSecurity; +import org.springframework.security.config.web.server.ServerHttpSecurity; +import org.springframework.security.web.server.SecurityWebFilterChain; -@EnableWebSecurity @Configuration +@EnableWebFluxSecurity +@EnableReactiveMethodSecurity +@RequiredArgsConstructor @Profile({ "prod", "dev" }) public class SecurityConfig { + private final JwtReactiveAuthenticationManager jwtReactiveAuthenticationManager; + @Bean - public SecurityFilterChain filterChain(HttpSecurity httpSecurity) throws Exception { + public SecurityWebFilterChain springSecurityFilterChain(ServerHttpSecurity httpSecurity) { - httpSecurity.sessionManagement(sessionConfig -> sessionConfig.sessionCreationPolicy(SessionCreationPolicy.STATELESS)) - .csrf(AbstractHttpConfigurer::disable) - .authorizeHttpRequests(authorizeConfig -> authorizeConfig.requestMatchers( + return httpSecurity + .csrf(ServerHttpSecurity.CsrfSpec::disable) + .authorizeExchange(authorizeConfig -> authorizeConfig.pathMatchers( "/internal/**", "/webjars/**", "/swagger-resources/**", @@ -29,10 +33,9 @@ public SecurityFilterChain filterChain(HttpSecurity httpSecurity) throws Excepti "/swagger", "/error", "/swagger-ui.html" - ).permitAll().requestMatchers("/api/**").fullyAuthenticated()) - .oauth2ResourceServer(oauth2RSConfig -> oauth2RSConfig.jwt(Customizer.withDefaults())); - - return httpSecurity.build(); + ).permitAll().anyExchange().authenticated()) + .oauth2ResourceServer(oauth2RSConfig -> oauth2RSConfig.jwt(jwtSpec -> jwtSpec.authenticationManager(jwtReactiveAuthenticationManager))) + .build(); } } diff --git a/apps/ereg-batch-status-service/src/main/java/no/nav/registre/testnorge/eregbatchstatusservice/consumer/EregConsumer.java b/apps/ereg-batch-status-service/src/main/java/no/nav/registre/testnorge/eregbatchstatusservice/consumer/EregConsumer.java index 5a9164c9ca2..b5ed69cfced 100644 --- a/apps/ereg-batch-status-service/src/main/java/no/nav/registre/testnorge/eregbatchstatusservice/consumer/EregConsumer.java +++ b/apps/ereg-batch-status-service/src/main/java/no/nav/registre/testnorge/eregbatchstatusservice/consumer/EregConsumer.java @@ -1,38 +1,37 @@ package no.nav.registre.testnorge.eregbatchstatusservice.consumer; import lombok.extern.slf4j.Slf4j; -import no.nav.registre.testnorge.eregbatchstatusservice.config.EregProperties; +import no.nav.registre.testnorge.eregbatchstatusservice.config.Consumers; import no.nav.registre.testnorge.eregbatchstatusservice.consumer.command.GetBatchStatusCommand; +import no.nav.testnav.libs.reactivesecurity.exchange.TokenExchange; +import no.nav.testnav.libs.securitycore.domain.ServerProperties; import org.springframework.stereotype.Component; import org.springframework.web.reactive.function.client.WebClient; - -import java.util.Map; -import java.util.stream.Collectors; +import reactor.core.publisher.Mono; @Slf4j @Component public class EregConsumer { - private final Map envWebClientMap; + private final ServerProperties serverProperties; + private final WebClient webClient; + private final TokenExchange tokenService; + - public EregConsumer(EregProperties eregProperties) { + public EregConsumer(TokenExchange tokenService, + Consumers consumers + ) { - this.envWebClientMap = eregProperties - .getEnvHostMap() - .entrySet() - .stream() - .collect(Collectors.toMap( - Map.Entry::getKey, - entry -> WebClient.builder() - .baseUrl(entry.getValue()) - .build() - )); + this.tokenService = tokenService; + this.serverProperties = consumers.getModappEregProxy(); + this.webClient = WebClient.builder() + .baseUrl(consumers.getModappEregProxy().getUrl()) + .build(); } - public Long getStatusKode(String miljo, Long id) { - if (!envWebClientMap.containsKey(miljo)) { - throw new RuntimeException("Stotter ikke miljo: " + miljo + " i EREG."); - } else { - return new GetBatchStatusCommand(envWebClientMap.get(miljo), id).call(); - } + public Mono getStatusKode(String miljo, Long id) { + return tokenService + .exchange(serverProperties) + .flatMap(accessToken -> + new GetBatchStatusCommand(webClient, miljo, id, accessToken.getTokenValue()).call()); } -} +} \ No newline at end of file diff --git a/apps/ereg-batch-status-service/src/main/java/no/nav/registre/testnorge/eregbatchstatusservice/consumer/command/GetBatchStatusCommand.java b/apps/ereg-batch-status-service/src/main/java/no/nav/registre/testnorge/eregbatchstatusservice/consumer/command/GetBatchStatusCommand.java index fbbf9ec1e25..cf5cc38f465 100644 --- a/apps/ereg-batch-status-service/src/main/java/no/nav/registre/testnorge/eregbatchstatusservice/consumer/command/GetBatchStatusCommand.java +++ b/apps/ereg-batch-status-service/src/main/java/no/nav/registre/testnorge/eregbatchstatusservice/consumer/command/GetBatchStatusCommand.java @@ -1,27 +1,45 @@ package no.nav.registre.testnorge.eregbatchstatusservice.consumer.command; import lombok.RequiredArgsConstructor; +import lombok.extern.slf4j.Slf4j; import no.nav.registre.testnorge.eregbatchstatusservice.util.WebClientFilter; +import org.springframework.http.HttpStatus; +import org.springframework.http.HttpStatusCode; import org.springframework.web.reactive.function.client.WebClient; +import org.springframework.web.server.ResponseStatusException; +import reactor.core.publisher.Mono; import reactor.util.retry.Retry; import java.time.Duration; import java.util.concurrent.Callable; +import static org.springframework.http.HttpHeaders.AUTHORIZATION; + @RequiredArgsConstructor -public class GetBatchStatusCommand implements Callable { +@Slf4j +public class GetBatchStatusCommand implements Callable> { private final WebClient webClient; + private final String miljoe; private final Long id; + private final String token; @Override - public Long call() { + public Mono call() { return webClient .get() - .uri(builder -> builder.path("/ereg/internal/batch/poll/{id}").build(id)) + .uri(builder -> builder.path("/{miljoe}/ereg/internal/batch/poll/{id}").build(miljoe, id)) + .header(AUTHORIZATION, "Bearer " + token) .retrieve() + .onStatus(HttpStatusCode::is4xxClientError, clientResponse -> { + if (clientResponse.statusCode().equals(HttpStatus.UNAUTHORIZED)) { + log.error("Unauthorized error occurred when calling modapp-ereg-proxy"); + return Mono.error(new ResponseStatusException(HttpStatus.NOT_FOUND, "Resource not found")); + } + log.error("Client error occurred when calling modapp-ereg-proxy"); + return Mono.error(new ResponseStatusException(clientResponse.statusCode(), "Client error occurred")); + }) .bodyToMono(Long.class) .retryWhen(Retry.backoff(3, Duration.ofSeconds(5)) - .filter(WebClientFilter::is5xxException)) - .block(); + .filter(WebClientFilter::is5xxException)); } } diff --git a/apps/ereg-batch-status-service/src/main/java/no/nav/registre/testnorge/eregbatchstatusservice/filter/SwaggerWebFilter.java b/apps/ereg-batch-status-service/src/main/java/no/nav/registre/testnorge/eregbatchstatusservice/filter/SwaggerWebFilter.java new file mode 100644 index 00000000000..6141d2e2409 --- /dev/null +++ b/apps/ereg-batch-status-service/src/main/java/no/nav/registre/testnorge/eregbatchstatusservice/filter/SwaggerWebFilter.java @@ -0,0 +1,23 @@ +package no.nav.registre.testnorge.eregbatchstatusservice.filter; + +import org.springframework.stereotype.Component; +import org.springframework.web.server.ServerWebExchange; +import org.springframework.web.server.WebFilter; +import org.springframework.web.server.WebFilterChain; +import reactor.core.publisher.Mono; + +@Component +public class SwaggerWebFilter implements WebFilter { + @Override + public Mono filter(ServerWebExchange exchange, WebFilterChain chain) { + if (exchange.getRequest().getURI().getPath().equals("/swagger")) { + return chain + .filter(exchange.mutate() + .request(exchange.getRequest() + .mutate().path("/swagger-ui.html").build()) + .build()); + } + + return chain.filter(exchange); + } +} \ No newline at end of file diff --git a/apps/ereg-batch-status-service/src/main/java/no/nav/registre/testnorge/eregbatchstatusservice/provider/BatchStatusController.java b/apps/ereg-batch-status-service/src/main/java/no/nav/registre/testnorge/eregbatchstatusservice/provider/BatchStatusController.java index f886c3ed961..4086e65f040 100644 --- a/apps/ereg-batch-status-service/src/main/java/no/nav/registre/testnorge/eregbatchstatusservice/provider/BatchStatusController.java +++ b/apps/ereg-batch-status-service/src/main/java/no/nav/registre/testnorge/eregbatchstatusservice/provider/BatchStatusController.java @@ -1,6 +1,7 @@ package no.nav.registre.testnorge.eregbatchstatusservice.provider; import lombok.RequiredArgsConstructor; +import lombok.extern.slf4j.Slf4j; import no.nav.registre.testnorge.eregbatchstatusservice.consumer.EregConsumer; import org.springframework.http.ResponseEntity; import org.springframework.web.bind.annotation.GetMapping; @@ -9,7 +10,9 @@ import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.RestController; import org.springframework.web.reactive.function.client.WebClientResponseException; +import reactor.core.publisher.Mono; +@Slf4j @RequiredArgsConstructor @RestController @RequestMapping("/api/v1/batch/items") @@ -17,11 +20,12 @@ public class BatchStatusController { private final EregConsumer eregConsumer; @GetMapping("/{id}") - public ResponseEntity getStatusKode(@RequestHeader("miljoe") String miljo, @PathVariable("id") Long id) { + public ResponseEntity> getStatusKode(@RequestHeader("miljoe") String miljo, @PathVariable("id") Long id) { try { var status = eregConsumer.getStatusKode(miljo, id); return ResponseEntity.ok(status); - } catch (WebClientResponseException.NotFound e) { + } catch (WebClientResponseException e) { + log.error(e.getMessage(), e); return ResponseEntity.notFound().build(); } } diff --git a/apps/ereg-batch-status-service/src/main/resources/application-dev.yml b/apps/ereg-batch-status-service/src/main/resources/application-dev.yml new file mode 100644 index 00000000000..f05debbd219 --- /dev/null +++ b/apps/ereg-batch-status-service/src/main/resources/application-dev.yml @@ -0,0 +1 @@ +TOKEN_X_ISSUER: dummy \ No newline at end of file diff --git a/apps/ereg-batch-status-service/src/main/resources/application.yml b/apps/ereg-batch-status-service/src/main/resources/application.yml index ede2e74d146..dbdd87a98e5 100644 --- a/apps/ereg-batch-status-service/src/main/resources/application.yml +++ b/apps/ereg-batch-status-service/src/main/resources/application.yml @@ -1,11 +1,14 @@ AAD_ISSUER_URI: https://login.microsoftonline.com/62366534-1ec3-4962-8869-9b5535279d0b spring: + cloud: + vault: + enabled: false main: banner-mode: off application: name: ereg-batch-status-service - version: application.version.todo #TODO Finn ut hvordan denne kan settes fra gradle + version: application.version.todo description: Tjeneste for å hente ut batch status fra EREG. security: oauth2: @@ -15,7 +18,7 @@ spring: jwk-set-uri: ${AAD_ISSUER_URI}/discovery/v2.0/keys accepted-audience: ${azure.app.client.id}, api://${azure.app.client.id} tokenx: - issuer-uri: ${TOKEN_X_ISSUER} + issuer-uri: ${TOKEN_X_ISSUER} jwk-set-uri: ${TOKEN_X_JWKS_URI} accepted-audience: ${TOKEN_X_CLIENT_ID} @@ -24,13 +27,12 @@ springdoc: disable-swagger-default-url: true url: /v3/api-docs -ereg: - envHostMap: - q1: https://ereg-services-q1.dev.intern.nav.no - q2: https://ereg-services-q2.dev.intern.nav.no - q4: https://ereg-services-q4.dev.intern.nav.no - q5: https://ereg-services-q5.dev.intern.nav.no - t3: https://ereg-services-t3.dev.intern.nav.no +consumers: + modapp-ereg-proxy: + name: testnav-modapp-ereg-proxy + namespace: dolly + url: https://testnav-modapp-ereg-proxy.dev-fss-pub.nais.io + cluster: dev-fss management: endpoints: diff --git a/apps/ereg-batch-status-service/src/main/resources/bootstrap.yml b/apps/ereg-batch-status-service/src/main/resources/bootstrap.yml deleted file mode 100644 index 0451449ca23..00000000000 --- a/apps/ereg-batch-status-service/src/main/resources/bootstrap.yml +++ /dev/null @@ -1,4 +0,0 @@ -spring: - cloud: - vault: - enabled: false \ No newline at end of file diff --git a/apps/organisasjon-bestilling-service/config.yml b/apps/organisasjon-bestilling-service/config.yml index aac16e21e70..085a993d852 100644 --- a/apps/organisasjon-bestilling-service/config.yml +++ b/apps/organisasjon-bestilling-service/config.yml @@ -33,8 +33,10 @@ spec: - application: testnav-organisasjon-mottak-service cluster: dev-gcp outbound: + rules: + - application: ereg-batch-status-service + cluster: dev-gcp external: - - host: ereg-batch-status-service.dev-fss-pub.nais.io - host: testnorge-batch-adeo-proxy.dev-fss-pub.nais.io gcp: sqlInstances: diff --git a/apps/organisasjon-bestilling-service/src/main/java/no/nav/testnav/apps/organisasjonbestillingservice/consumer/command/GetEregBatchStatusCommand.java b/apps/organisasjon-bestilling-service/src/main/java/no/nav/testnav/apps/organisasjonbestillingservice/consumer/command/GetEregBatchStatusCommand.java index 1efac7ce2b5..e480b8ab753 100644 --- a/apps/organisasjon-bestilling-service/src/main/java/no/nav/testnav/apps/organisasjonbestillingservice/consumer/command/GetEregBatchStatusCommand.java +++ b/apps/organisasjon-bestilling-service/src/main/java/no/nav/testnav/apps/organisasjonbestillingservice/consumer/command/GetEregBatchStatusCommand.java @@ -1,14 +1,18 @@ package no.nav.testnav.apps.organisasjonbestillingservice.consumer.command; import lombok.RequiredArgsConstructor; -import no.nav.testnav.libs.commands.utils.WebClientFilter; +import lombok.extern.slf4j.Slf4j; import org.springframework.http.HttpHeaders; +import org.springframework.http.HttpStatus; import org.springframework.web.reactive.function.client.WebClient; +import org.springframework.web.reactive.function.client.WebClientResponseException; +import org.springframework.web.server.ResponseStatusException; import reactor.util.retry.Retry; import java.time.Duration; import java.util.concurrent.Callable; +@Slf4j @RequiredArgsConstructor public class GetEregBatchStatusCommand implements Callable { private final WebClient webClient; @@ -18,14 +22,19 @@ public class GetEregBatchStatusCommand implements Callable { @Override public Long call() { - return webClient.get() - .uri(uriBuilder -> uriBuilder.path("/api/v1/batch/items/{id}").build(batchId)) - .header(HttpHeaders.AUTHORIZATION, "Bearer " + token) - .header("miljoe", miljo) - .retrieve() - .bodyToMono(Long.class) - .retryWhen(Retry.backoff(3, Duration.ofSeconds(5)) - .filter(WebClientFilter::is5xxException)) - .block(); + try { + return webClient.get() + .uri(uriBuilder -> uriBuilder.path("/api/v1/batch/items/{id}").build(batchId)) + .header(HttpHeaders.AUTHORIZATION, "Bearer " + token) + .header("miljoe", miljo) + .retrieve() + .bodyToMono(Long.class) + .retryWhen(Retry.backoff(3, Duration.ofSeconds(5)) + .filter(throwable -> throwable instanceof WebClientResponseException.GatewayTimeout)) + .block(); + } catch (Exception e) { + log.error("Failed to get status for batch with id: " + batchId, e); + throw new ResponseStatusException(HttpStatus.NOT_FOUND, "Resource not found", e); + } } } \ No newline at end of file diff --git a/apps/organisasjon-bestilling-service/src/main/resources/application.yml b/apps/organisasjon-bestilling-service/src/main/resources/application.yml index 3d3df5fd455..805ee2e6965 100644 --- a/apps/organisasjon-bestilling-service/src/main/resources/application.yml +++ b/apps/organisasjon-bestilling-service/src/main/resources/application.yml @@ -16,7 +16,7 @@ spring: jwk-set-uri: ${AAD_ISSUER_URI}/discovery/v2.0/keys accepted-audience: ${azure.app.client.id}, api://${azure.app.client.id} tokenx: - issuer-uri: ${TOKEN_X_ISSUER} + issuer-uri: ${TOKEN_X_ISSUER} jwk-set-uri: ${TOKEN_X_JWKS_URI} accepted-audience: ${TOKEN_X_CLIENT_ID} @@ -27,8 +27,8 @@ springdoc: consumers: ereg-batch-status-service: - url: https://ereg-batch-status-service.dev-fss-pub.nais.io - cluster: dev-fss + url: http://ereg-batch-status-service.dolly.svc.cluster.local + cluster: dev-gcp namespace: dolly name: ereg-batch-status-service jenkins: diff --git a/apps/organisasjon-mottak-service/src/main/java/no/nav/registre/testnorge/organisasjonmottak/domain/Record.java b/apps/organisasjon-mottak-service/src/main/java/no/nav/registre/testnorge/organisasjonmottak/domain/Record.java index 0d1f11a0c4e..cecc9238ecc 100644 --- a/apps/organisasjon-mottak-service/src/main/java/no/nav/registre/testnorge/organisasjonmottak/domain/Record.java +++ b/apps/organisasjon-mottak-service/src/main/java/no/nav/registre/testnorge/organisasjonmottak/domain/Record.java @@ -4,21 +4,36 @@ import java.util.Date; import java.util.List; +import static java.util.Objects.nonNull; + public class Record { private final StringBuilder builder = new StringBuilder(); private int record = 0; - public static Record create(List lines, String orgnummer, String enhetstype, boolean update) { + public void append(String value) { + record++; + builder.append(value); + } + + public int getRecord() { + return record; + } + + public String build() { + return builder.toString(); + } + + public static Record create(List lines, String orgnummer, String enhetstype, Date regDato, boolean update) { Record record = new Record(); - record.append(createEHN(update, orgnummer, enhetstype)); + record.append(createEHN(update, orgnummer, enhetstype, regDato)); lines.forEach(line -> record.append(line.getValue())); return record; } - private static String createEHN(boolean update, String orgnummer, String enhetstype) { + private static String createEHN(boolean update, String orgnummer, String enhetstype, Date regDato) { StringBuilder stringBuilder = createStringBuilderWithReplacement(49, ' '); - String dateNowFormatted = getDateNowFormatted(); + String dateNowFormatted = getDateNowFormatted(regDato); String undersakstype = update ? "EN" : "NY"; stringBuilder.replace(0, "ENH".length(), "ENH") @@ -41,21 +56,8 @@ private static StringBuilder createStringBuilderWithReplacement(int size, char r return stringBuilder; } - private static String getDateNowFormatted() { + private static String getDateNowFormatted(Date regDato) { SimpleDateFormat format = new SimpleDateFormat("yyyyMMdd"); - return format.format(new Date()); - } - - public void append(String value) { - record++; - builder.append(value); - } - - public int getRecord() { - return record; - } - - public String build() { - return builder.toString(); + return format.format(nonNull(regDato) ? regDato : new Date()); } } diff --git a/apps/organisasjon-mottak-service/src/main/java/no/nav/registre/testnorge/organisasjonmottak/listener/OrganisasjonMottakListener.java b/apps/organisasjon-mottak-service/src/main/java/no/nav/registre/testnorge/organisasjonmottak/listener/OrganisasjonMottakListener.java index 92ac3f4e787..a20a58ca856 100644 --- a/apps/organisasjon-mottak-service/src/main/java/no/nav/registre/testnorge/organisasjonmottak/listener/OrganisasjonMottakListener.java +++ b/apps/organisasjon-mottak-service/src/main/java/no/nav/registre/testnorge/organisasjonmottak/listener/OrganisasjonMottakListener.java @@ -29,13 +29,18 @@ import org.springframework.kafka.annotation.KafkaListener; import org.springframework.stereotype.Component; +import java.time.LocalDate; +import java.time.ZoneOffset; import java.util.ArrayList; import java.util.Collection; +import java.util.Date; import java.util.List; import java.util.Optional; import java.util.Set; import java.util.stream.Collectors; +import static java.util.Objects.nonNull; + @Slf4j @Profile("prod") @Component @@ -95,11 +100,20 @@ private void createRecords(List records, Organisasjon organisasjon, Orga Optional.ofNullable(organisasjon.getFormaal()).ifPresent(value -> list.add(new Formaal(value))); Optional.ofNullable(parent).ifPresent(value -> list.add(new Knytning(value, organisasjon))); + var stiftelsesDato = (nonNull(organisasjon.getStiftelsesdato()) && nonNull(organisasjon.getStiftelsesdato().getDato()) ? organisasjon.getStiftelsesdato().getDato() : null); + var regDato = (nonNull(organisasjon.getStiftelsesdato()) + //Registreringsdato settes til dagen etter stiftelsesdato hvis den er satt + ? Date.from(LocalDate.of(stiftelsesDato.getAar(), stiftelsesDato.getMaaned(), stiftelsesDato.getDag()) + .plusDays(1).atStartOfDay() + .toInstant(ZoneOffset.UTC)) + : null); + var record = Record.create( list.stream().map(ToLine::toLine) .toList(), organisasjon.getOrgnummer(), organisasjon.getEnhetstype(), + regDato, update ); diff --git a/apps/organisasjon-mottak-service/src/test/java/no/nav/registre/testnorge/organisasjonmottak/domain/RecordTest.java b/apps/organisasjon-mottak-service/src/test/java/no/nav/registre/testnorge/organisasjonmottak/domain/RecordTest.java new file mode 100644 index 00000000000..2db6ce7748c --- /dev/null +++ b/apps/organisasjon-mottak-service/src/test/java/no/nav/registre/testnorge/organisasjonmottak/domain/RecordTest.java @@ -0,0 +1,42 @@ +package no.nav.registre.testnorge.organisasjonmottak.domain; + +import org.junit.jupiter.api.BeforeEach; +import org.junit.jupiter.api.Test; +import org.mockito.InjectMocks; +import org.mockito.MockitoAnnotations; + +import java.time.LocalDate; +import java.time.ZoneOffset; +import java.util.Collections; +import java.util.Date; + +import static org.junit.jupiter.api.Assertions.assertTrue; +import static org.mockito.Mockito.mock; + +class RecordTest { + + @InjectMocks + Record record; + + @BeforeEach + void setUp() { + MockitoAnnotations.openMocks(this); + } + + @Test + void testCreate() { + // Create mock objects + var line = mock(Line.class); + var orgnummer = "123456789"; + var enhetstype = "AS"; + var regDato = Date.from(LocalDate.of(2022, 1, 1).atStartOfDay().toInstant(ZoneOffset.UTC)); + var update = false; + + // Call method under test + var result = Record.create(Collections.singletonList(line), orgnummer, enhetstype, regDato, update); + + // Verify that the StringBuilder contains the correct date + var expectedDate = "20220101"; + assertTrue(result.build().contains(expectedDate)); + } +} \ No newline at end of file diff --git a/proxies/ereg-proxy/src/main/java/no/nav/testnav/proxies/eregproxy/EregProxyApplicationStarter.java b/proxies/ereg-proxy/src/main/java/no/nav/testnav/proxies/eregproxy/EregProxyApplicationStarter.java index 4ec7582870a..b5f7b4f5d37 100644 --- a/proxies/ereg-proxy/src/main/java/no/nav/testnav/proxies/eregproxy/EregProxyApplicationStarter.java +++ b/proxies/ereg-proxy/src/main/java/no/nav/testnav/proxies/eregproxy/EregProxyApplicationStarter.java @@ -12,6 +12,7 @@ import org.springframework.cloud.gateway.route.builder.RouteLocatorBuilder; import org.springframework.context.annotation.Bean; import org.springframework.context.annotation.Import; +import org.springframework.http.HttpHeaders; import java.util.function.Function; @@ -29,8 +30,6 @@ public RouteLocator customRouteLocator(RouteLocatorBuilder builder) { .route(createRoute("q1")) .route(createRoute("q2")) .route(createRoute("q4")) - .route(createRoute("q5")) - .route(createRoute("t3")) .build(); } @@ -43,6 +42,7 @@ private Function> createRoute(String miljo) { .path("/api/" + miljo + "/**") .filters(filterSpec -> filterSpec .rewritePath("/api/" + miljo + "/(?.*)", "/${segment}") + .removeRequestHeader(HttpHeaders.AUTHORIZATION) ).uri("https://ereg-services-" + miljo + ".dev.intern.nav.no/"); } } diff --git a/proxies/modapp-ereg-proxy/Dockerfile b/proxies/modapp-ereg-proxy/Dockerfile new file mode 100644 index 00000000000..4a36f93546f --- /dev/null +++ b/proxies/modapp-ereg-proxy/Dockerfile @@ -0,0 +1,8 @@ +FROM ghcr.io/navikt/baseimages/temurin:21 +LABEL maintainer="Team Dolly" + +ENV JAVA_OPTS="-Dspring.profiles.active=prod" + +ADD /build/libs/app.jar /app/app.jar + +EXPOSE 8080 diff --git a/proxies/modapp-ereg-proxy/build.gradle b/proxies/modapp-ereg-proxy/build.gradle new file mode 100644 index 00000000000..5f8425ba179 --- /dev/null +++ b/proxies/modapp-ereg-proxy/build.gradle @@ -0,0 +1,71 @@ +plugins { + id 'java' + id "org.sonarqube" version "4.4.1.3373" + id 'org.springframework.boot' version "3.2.1" + id 'io.spring.dependency-management' version "1.1.4" + id "jacoco" +} + +test { + useJUnitPlatform() +} + +sonarqube { + properties { + property "sonar.dynamicAnalysis", "reuseReports" + property "sonar.host.url", "https://sonarcloud.io" + property "sonar.java.coveragePlugin", "jacoco" + property "sonar.language", "java" + property "sonar.token", System.getenv("SONAR_TOKEN") + property "sonar.organization", "navikt" + property "sonar.project.monorepo.enabled", true + property "sonar.projectKey", "testnav-modapp-ereg-proxy" + property "sonar.projectName", "testnav-modapp-ereg-proxy" + property "sonar.sourceEncoding", "UTF-8" + } +} +bootJar { + archiveFileName = "app.jar" +} + +dependencyManagement { + applyMavenExclusions = false + imports { + mavenBom 'org.springframework.cloud:spring-cloud-dependencies:2023.0.0' + } +} + +repositories { + mavenCentral() + mavenLocal() +} + +dependencies { + + implementation 'no.nav.testnav.libs:security-core' + implementation 'no.nav.testnav.libs:reactive-core' + implementation 'no.nav.testnav.libs:reactive-proxy' + implementation 'no.nav.testnav.libs:reactive-security' + + implementation 'org.springframework.boot:spring-boot-starter-oauth2-resource-server' + implementation 'org.springframework.boot:spring-boot-starter-webflux' + + implementation 'org.springframework.cloud:spring-cloud-starter-vault-config' + implementation 'org.springframework.cloud:spring-cloud-starter-gateway' + + + implementation 'net.logstash.logback:logstash-logback-encoder:7.4' + implementation 'org.hibernate.validator:hibernate-validator' + + testImplementation 'org.springframework.boot:spring-boot-starter-test' + testImplementation 'org.springframework.cloud:spring-cloud-contract-wiremock' + + annotationProcessor 'org.projectlombok:lombok' + implementation 'org.projectlombok:lombok' + testAnnotationProcessor 'org.projectlombok:lombok' +} +java { + toolchain { + languageVersion = JavaLanguageVersion.of(21) + } +} diff --git a/proxies/modapp-ereg-proxy/config.yml b/proxies/modapp-ereg-proxy/config.yml new file mode 100644 index 00000000000..be0933c0b8c --- /dev/null +++ b/proxies/modapp-ereg-proxy/config.yml @@ -0,0 +1,66 @@ +--- +apiVersion: nais.io/v1 +kind: AzureAdApplication +metadata: + name: testnav-modapp-ereg-proxy-trygdeetaten + namespace: dolly + labels: + team: dolly +spec: + secretName: azure-trygdeetaten-testnav-modapp-ereg-proxy-trygdeetaten + secretKeyPrefix: "AZURE_TRYGDEETATEN" + tenant: trygdeetaten.no +--- +apiVersion: "nais.io/v1alpha1" +kind: "Application" +metadata: + name: testnav-modapp-ereg-proxy + namespace: dolly + labels: + team: dolly +spec: + image: "{{image}}" + port: 8080 + webproxy: true + tokenx: + enabled: true + azure: + application: + allowAllUsers: true + enabled: true + tenant: nav.no + accessPolicy: + inbound: + rules: + - application: team-dolly-lokal-app + cluster: dev-gcp + - application: testnav-oversikt-frontend + cluster: dev-gcp + - application: ereg-batch-status-service + cluster: dev-gcp + - application: app-1 + namespace: plattformsikkerhet + cluster: dev-gcp + liveness: + path: /internal/isAlive + initialDelay: 4 + periodSeconds: 5 + failureThreshold: 500 + readiness: + path: /internal/isReady + initialDelay: 4 + periodSeconds: 5 + failureThreshold: 500 + replicas: + min: 1 + max: 1 + resources: + requests: + cpu: 200m + memory: 1025Mi + limits: + memory: 2048Mi + envFrom: + - secret: azure-trygdeetaten-testnav-modapp-ereg-proxy-trygdeetaten + ingresses: + - "https://testnav-modapp-ereg-proxy.dev-fss-pub.nais.io" diff --git a/proxies/modapp-ereg-proxy/gradle/wrapper/gradle-wrapper.jar b/proxies/modapp-ereg-proxy/gradle/wrapper/gradle-wrapper.jar new file mode 100644 index 0000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/modapp-ereg-proxy/gradle/wrapper/gradle-wrapper.properties b/proxies/modapp-ereg-proxy/gradle/wrapper/gradle-wrapper.properties new file mode 100644 index 00000000000..a5952066425 --- /dev/null +++ b/proxies/modapp-ereg-proxy/gradle/wrapper/gradle-wrapper.properties @@ -0,0 +1,5 @@ +distributionBase=GRADLE_USER_HOME +distributionPath=wrapper/dists +distributionUrl=https\://services.gradle.org/distributions/gradle-8.5-bin.zip +zipStoreBase=GRADLE_USER_HOME +zipStorePath=wrapper/dists diff --git a/proxies/modapp-ereg-proxy/gradlew b/proxies/modapp-ereg-proxy/gradlew new file mode 100755 index 00000000000..3da45c161b0 --- /dev/null +++ b/proxies/modapp-ereg-proxy/gradlew @@ -0,0 +1,234 @@ +#!/bin/sh + +# +# Copyright ? 2015-2021 the original authors. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# + +############################################################################## +# +# Gradle start up script for POSIX generated by Gradle. +# +# Important for running: +# +# (1) You need a POSIX-compliant shell to run this script. If your /bin/sh is +# noncompliant, but you have some other compliant shell such as ksh or +# bash, then to run this script, type that shell name before the whole +# command line, like: +# +# ksh Gradle +# +# Busybox and similar reduced shells will NOT work, because this script +# requires all of these POSIX shell features: +# * functions; +# * expansions ?$var?, ?${var}?, ?${var:-default}?, ?${var+SET}?, +# ?${var#prefix}?, ?${var%suffix}?, and ?$( cmd )?; +# * compound commands having a testable exit status, especially ?case?; +# * various built-in commands including ?command?, ?set?, and ?ulimit?. +# +# Important for patching: +# +# (2) This script targets any POSIX shell, so it avoids extensions provided +# by Bash, Ksh, etc; in particular arrays are avoided. +# +# The "traditional" practice of packing multiple parameters into a +# space-separated string is a well documented source of bugs and security +# problems, so this is (mostly) avoided, by progressively accumulating +# options in "$@", and eventually passing that to Java. +# +# Where the inherited environment variables (DEFAULT_JVM_OPTS, JAVA_OPTS, +# and GRADLE_OPTS) rely on word-splitting, this is performed explicitly; +# see the in-line comments for details. +# +# There are tweaks for specific operating systems such as AIX, CygWin, +# Darwin, MinGW, and NonStop. +# +# (3) This script is generated from the Groovy template +# https://github.com/gradle/gradle/blob/master/subprojects/plugins/src/main/resources/org/gradle/api/internal/plugins/unixStartScript.txt +# within the Gradle project. +# +# You can find Gradle at https://github.com/gradle/gradle/. +# +############################################################################## + +# Attempt to set APP_HOME + +# Resolve links: $0 may be a link +app_path=$0 + +# Need this for daisy-chained symlinks. +while + APP_HOME=${app_path%"${app_path##*/}"} # leaves a trailing /; empty if no leading path + [ -h "$app_path" ] +do + ls=$( ls -ld "$app_path" ) + link=${ls#*' -> '} + case $link in #( + /*) app_path=$link ;; #( + *) app_path=$APP_HOME$link ;; + esac +done + +APP_HOME=$( cd "${APP_HOME:-./}" && pwd -P ) || exit + +APP_NAME="Gradle" +APP_BASE_NAME=${0##*/} + +# Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script. +DEFAULT_JVM_OPTS='"-Xmx64m" "-Xms64m"' + +# Use the maximum available, or set MAX_FD != -1 to use that value. +MAX_FD=maximum + +warn () { + echo "$*" +} >&2 + +die () { + echo + echo "$*" + echo + exit 1 +} >&2 + +# OS specific support (must be 'true' or 'false'). +cygwin=false +msys=false +darwin=false +nonstop=false +case "$( uname )" in #( + CYGWIN* ) cygwin=true ;; #( + Darwin* ) darwin=true ;; #( + MSYS* | MINGW* ) msys=true ;; #( + NONSTOP* ) nonstop=true ;; +esac + +CLASSPATH=$APP_HOME/gradle/wrapper/gradle-wrapper.jar + + +# Determine the Java command to use to start the JVM. +if [ -n "$JAVA_HOME" ] ; then + if [ -x "$JAVA_HOME/jre/sh/java" ] ; then + # IBM's JDK on AIX uses strange locations for the executables + JAVACMD=$JAVA_HOME/jre/sh/java + else + JAVACMD=$JAVA_HOME/bin/java + fi + if [ ! -x "$JAVACMD" ] ; then + die "ERROR: JAVA_HOME is set to an invalid directory: $JAVA_HOME + +Please set the JAVA_HOME variable in your environment to match the +location of your Java installation." + fi +else + JAVACMD=java + which java >/dev/null 2>&1 || die "ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. + +Please set the JAVA_HOME variable in your environment to match the +location of your Java installation." +fi + +# Increase the maximum file descriptors if we can. +if ! "$cygwin" && ! "$darwin" && ! "$nonstop" ; then + case $MAX_FD in #( + max*) + MAX_FD=$( ulimit -H -n ) || + warn "Could not query maximum file descriptor limit" + esac + case $MAX_FD in #( + '' | soft) :;; #( + *) + ulimit -n "$MAX_FD" || + warn "Could not set maximum file descriptor limit to $MAX_FD" + esac +fi + +# Collect all arguments for the java command, stacking in reverse order: +# * args from the command line +# * the main class name +# * -classpath +# * -D...appname settings +# * --module-path (only if needed) +# * DEFAULT_JVM_OPTS, JAVA_OPTS, and GRADLE_OPTS environment variables. + +# For Cygwin or MSYS, switch paths to Windows format before running java +if "$cygwin" || "$msys" ; then + APP_HOME=$( cygpath --path --mixed "$APP_HOME" ) + CLASSPATH=$( cygpath --path --mixed "$CLASSPATH" ) + + JAVACMD=$( cygpath --unix "$JAVACMD" ) + + # Now convert the arguments - kludge to limit ourselves to /bin/sh + for arg do + if + case $arg in #( + -*) false ;; # don't mess with options #( + /?*) t=${arg#/} t=/${t%%/*} # looks like a POSIX filepath + [ -e "$t" ] ;; #( + *) false ;; + esac + then + arg=$( cygpath --path --ignore --mixed "$arg" ) + fi + # Roll the args list around exactly as many times as the number of + # args, so each arg winds up back in the position where it started, but + # possibly modified. + # + # NB: a `for` loop captures its iteration list before it begins, so + # changing the positional parameters here affects neither the number of + # iterations, nor the values presented in `arg`. + shift # remove old arg + set -- "$@" "$arg" # push replacement arg + done +fi + +# Collect all arguments for the java command; +# * $DEFAULT_JVM_OPTS, $JAVA_OPTS, and $GRADLE_OPTS can contain fragments of +# shell script including quotes and variable substitutions, so put them in +# double quotes to make sure that they get re-expanded; and +# * put everything else in single quotes, so that it's not re-expanded. + +set -- \ + "-Dorg.gradle.appname=$APP_BASE_NAME" \ + -classpath "$CLASSPATH" \ + org.gradle.wrapper.GradleWrapperMain \ + "$@" + +# Use "xargs" to parse quoted args. +# +# With -n1 it outputs one arg per line, with the quotes and backslashes removed. +# +# In Bash we could simply go: +# +# readarray ARGS < <( xargs -n1 <<<"$var" ) && +# set -- "${ARGS[@]}" "$@" +# +# but POSIX shell has neither arrays nor command substitution, so instead we +# post-process each arg (as a line of input to sed) to backslash-escape any +# character that might be a shell metacharacter, then use eval to reverse +# that process (while maintaining the separation between arguments), and wrap +# the whole thing up as a single "set" statement. +# +# This will of course break if any of these variables contains a newline or +# an unmatched quote. +# + +eval "set -- $( + printf '%s\n' "$DEFAULT_JVM_OPTS $JAVA_OPTS $GRADLE_OPTS" | + xargs -n1 | + sed ' s~[^-[:alnum:]+,./:=@_]~\\&~g; ' | + tr '\n' ' ' + )" '"$@"' + +exec "$JAVACMD" "$@" diff --git a/proxies/modapp-ereg-proxy/gradlew.bat b/proxies/modapp-ereg-proxy/gradlew.bat new file mode 100644 index 00000000000..107acd32c4e --- /dev/null +++ b/proxies/modapp-ereg-proxy/gradlew.bat @@ -0,0 +1,89 @@ +@rem +@rem Copyright 2015 the original author or authors. +@rem +@rem Licensed under the Apache License, Version 2.0 (the "License"); +@rem you may not use this file except in compliance with the License. +@rem You may obtain a copy of the License at +@rem +@rem https://www.apache.org/licenses/LICENSE-2.0 +@rem +@rem Unless required by applicable law or agreed to in writing, software +@rem distributed under the License is distributed on an "AS IS" BASIS, +@rem WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +@rem See the License for the specific language governing permissions and +@rem limitations under the License. +@rem + +@if "%DEBUG%" == "" @echo off +@rem ########################################################################## +@rem +@rem Gradle startup script for Windows +@rem +@rem ########################################################################## + +@rem Set local scope for the variables with windows NT shell +if "%OS%"=="Windows_NT" setlocal + +set DIRNAME=%~dp0 +if "%DIRNAME%" == "" set DIRNAME=. +set APP_BASE_NAME=%~n0 +set APP_HOME=%DIRNAME% + +@rem Resolve any "." and ".." in APP_HOME to make it shorter. +for %%i in ("%APP_HOME%") do set APP_HOME=%%~fi + +@rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script. +set DEFAULT_JVM_OPTS="-Xmx64m" "-Xms64m" + +@rem Find java.exe +if defined JAVA_HOME goto findJavaFromJavaHome + +set JAVA_EXE=java.exe +%JAVA_EXE% -version >NUL 2>&1 +if "%ERRORLEVEL%" == "0" goto execute + +echo. +echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. +echo. +echo Please set the JAVA_HOME variable in your environment to match the +echo location of your Java installation. + +goto fail + +:findJavaFromJavaHome +set JAVA_HOME=%JAVA_HOME:"=% +set JAVA_EXE=%JAVA_HOME%/bin/java.exe + +if exist "%JAVA_EXE%" goto execute + +echo. +echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME% +echo. +echo Please set the JAVA_HOME variable in your environment to match the +echo location of your Java installation. + +goto fail + +:execute +@rem Setup the command line + +set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar + + +@rem Execute Gradle +"%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" org.gradle.wrapper.GradleWrapperMain %* + +:end +@rem End local scope for the variables with windows NT shell +if "%ERRORLEVEL%"=="0" goto mainEnd + +:fail +rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of +rem the _cmd.exe /c_ return code! +if not "" == "%GRADLE_EXIT_CONSOLE%" exit 1 +exit /b 1 + +:mainEnd +if "%OS%"=="Windows_NT" endlocal + +:omega diff --git a/proxies/modapp-ereg-proxy/gradlewUpdate.sh b/proxies/modapp-ereg-proxy/gradlewUpdate.sh new file mode 100755 index 00000000000..e5ee6361152 --- /dev/null +++ b/proxies/modapp-ereg-proxy/gradlewUpdate.sh @@ -0,0 +1,3 @@ +#!/bin/bash + +gradle wrapper \ No newline at end of file diff --git a/proxies/modapp-ereg-proxy/settings.gradle b/proxies/modapp-ereg-proxy/settings.gradle new file mode 100644 index 00000000000..ef5b8a957cb --- /dev/null +++ b/proxies/modapp-ereg-proxy/settings.gradle @@ -0,0 +1,18 @@ +plugins { + id "com.gradle.enterprise" version "3.12.3" +} + +rootProject.name = 'modapp-ereg-proxy' + + +includeBuild '../../libs/reactive-core' +includeBuild '../../libs/reactive-proxy' +includeBuild '../../libs/security-core' +includeBuild '../../libs/reactive-security' + +gradleEnterprise { + buildScan { + termsOfServiceUrl = "https://gradle.com/terms-of-service" + termsOfServiceAgree = "yes" + } +} diff --git a/proxies/modapp-ereg-proxy/src/main/java/no/nav/testnav/proxies/modapperegproxy/Consumers.java b/proxies/modapp-ereg-proxy/src/main/java/no/nav/testnav/proxies/modapperegproxy/Consumers.java new file mode 100644 index 00000000000..32e25c534b9 --- /dev/null +++ b/proxies/modapp-ereg-proxy/src/main/java/no/nav/testnav/proxies/modapperegproxy/Consumers.java @@ -0,0 +1,29 @@ +package no.nav.testnav.proxies.modapperegproxy; + +import lombok.Getter; +import lombok.NoArgsConstructor; +import lombok.Setter; +import no.nav.testnav.libs.securitycore.domain.ServerProperties; +import org.springframework.boot.context.properties.ConfigurationProperties; +import org.springframework.context.annotation.Configuration; + +import static lombok.AccessLevel.PACKAGE; + +/** + * Samler alle placeholders for ulike {@code consumers.*}-konfigurasjon her, dvs. subklasser av {@code ServerProperties}. + *

+ * Husk at Spring Boot bruker
relaxed binding + * mellom configuration properties og field names. + * + * @see ServerProperties + */ +@Configuration +@ConfigurationProperties(prefix = "consumers") +@NoArgsConstructor(access = PACKAGE) +@Getter +@Setter(PACKAGE) +public class Consumers { + + private ServerProperties eregAura; + +} diff --git a/proxies/modapp-ereg-proxy/src/main/java/no/nav/testnav/proxies/modapperegproxy/ModappEregProxyApplicationStarter.java b/proxies/modapp-ereg-proxy/src/main/java/no/nav/testnav/proxies/modapperegproxy/ModappEregProxyApplicationStarter.java new file mode 100644 index 00000000000..4e3b05118bd --- /dev/null +++ b/proxies/modapp-ereg-proxy/src/main/java/no/nav/testnav/proxies/modapperegproxy/ModappEregProxyApplicationStarter.java @@ -0,0 +1,73 @@ +package no.nav.testnav.proxies.modapperegproxy; + +import no.nav.testnav.libs.reactivecore.config.CoreConfig; +import no.nav.testnav.libs.reactiveproxy.config.DevConfig; +import no.nav.testnav.libs.reactiveproxy.config.SecurityConfig; +import no.nav.testnav.libs.securitycore.domain.ServerProperties; +import org.springframework.boot.SpringApplication; +import org.springframework.boot.autoconfigure.SpringBootApplication; +import org.springframework.cloud.gateway.route.Route; +import org.springframework.cloud.gateway.route.RouteLocator; +import org.springframework.cloud.gateway.route.builder.Buildable; +import org.springframework.cloud.gateway.route.builder.PredicateSpec; +import org.springframework.cloud.gateway.route.builder.RouteLocatorBuilder; +import org.springframework.context.annotation.Bean; +import org.springframework.context.annotation.Import; + +import java.util.Arrays; +import java.util.Map; +import java.util.function.Function; + +@Import({ + CoreConfig.class, + DevConfig.class, + SecurityConfig.class +}) +@SpringBootApplication +public class ModappEregProxyApplicationStarter { + + private static final String[] miljoer = new String[]{ "q1", "q2", "q4" }; + private static final Map miljoeUrlSegment = Map.of( + "q1", "05", + "q2", "10", + "q4", "09" + ); + + @Bean + public RouteLocator customRouteLocator( + RouteLocatorBuilder builder, + Consumers consumers + ) { + var routes = builder.routes(); + Arrays + .asList(miljoer) + .forEach( + miljoe -> { + var properties = forEnvironment(consumers.getEregAura(), miljoeUrlSegment.get(miljoe)); + routes + .route(createRoute(miljoe, properties.getUrl())); + }); + return routes.build(); + } + + public static void main(String[] args) { + SpringApplication.run(ModappEregProxyApplicationStarter.class, args); + } + + private Function> createRoute(String miljo, String url) { + return spec -> spec + .path("/" + miljo + "/**") + .filters(filterSpec -> filterSpec + .rewritePath("/" + miljo + "/(?.*)", "/${segment}") + ).uri(url); + } + + private static ServerProperties forEnvironment(ServerProperties original, String urlSegment) { + return ServerProperties.of( + original.getCluster(), + original.getNamespace(), + original.getName(), + original.getUrl().replace("-MILJOE", urlSegment) + ); + } +} \ No newline at end of file diff --git a/proxies/modapp-ereg-proxy/src/main/resources/application.yml b/proxies/modapp-ereg-proxy/src/main/resources/application.yml new file mode 100644 index 00000000000..4842e668d2b --- /dev/null +++ b/proxies/modapp-ereg-proxy/src/main/resources/application.yml @@ -0,0 +1,30 @@ +AAD_ISSUER_URI: https://login.microsoftonline.com/62366534-1ec3-4962-8869-9b5535279d0b + +spring: + application: + name: testnav-modapp-ereg-proxy + desciption: Proxy for ereg appen i modapp som legger på sikkerhet og redirecter til riktig miljø. + security: + oauth2: + resourceserver: + aad: + issuer-uri: ${AAD_ISSUER_URI}/v2.0 + jwk-set-uri: ${AAD_ISSUER_URI}/discovery/v2.0/keys + accepted-audience: ${azure.app.client.id}, api://${azure.app.client.id} + tokenx: + issuer-uri: ${TOKEN_X_ISSUER} + jwk-set-uri: ${TOKEN_X_JWKS_URI} + accepted-audience: ${TOKEN_X_CLIENT_ID} + cloud: + gateway: + httpclient: + response-timeout: 1200s + vault: + enabled: false + +consumers: + ereg-aura: + name: ereg-aura + namespace: arbeidsforhold + url: https://b27jbsl016-MILJOE.preprod.local:8443 + cluster: dev-fss \ No newline at end of file diff --git a/proxies/modapp-ereg-proxy/src/main/resources/logback-spring.xml b/proxies/modapp-ereg-proxy/src/main/resources/logback-spring.xml new file mode 100644 index 00000000000..52c15597b3c --- /dev/null +++ b/proxies/modapp-ereg-proxy/src/main/resources/logback-spring.xml @@ -0,0 +1,40 @@ + + + + + + + true + 256 + 10280 + 20 + ^sun\.reflect\..*\.invoke + ^net\.sf\.cglib\.proxy\.MethodProxy\.invoke + java\.util\.concurrent\..* + org\.apache\.catalina\..* + org\.apache\.coyote\..* + org\.apache\.tomcat\..* + + + + + + + + + + + + + %d{HH:mm:ss.SSS} | %5p | %logger{25} | %m%n + + utf8 + + + + + + + + + \ No newline at end of file diff --git a/proxies/modapp-ereg-proxy/src/test/java/no/nav/testnav/proxies/modapperegproxy/ApplicationContextTest.java b/proxies/modapp-ereg-proxy/src/test/java/no/nav/testnav/proxies/modapperegproxy/ApplicationContextTest.java new file mode 100644 index 00000000000..315981c5591 --- /dev/null +++ b/proxies/modapp-ereg-proxy/src/test/java/no/nav/testnav/proxies/modapperegproxy/ApplicationContextTest.java @@ -0,0 +1,20 @@ +package no.nav.testnav.proxies.modapperegproxy; + +import org.junit.jupiter.api.Test; +import org.springframework.boot.test.context.SpringBootTest; +import org.springframework.boot.test.mock.mockito.MockBean; +import org.springframework.security.oauth2.jwt.ReactiveJwtDecoder; +import org.springframework.test.context.ActiveProfiles; + +@SpringBootTest +@ActiveProfiles("test") +class ApplicationContextTest { + + @MockBean + public ReactiveJwtDecoder reactiveJwtDecoder; + + @Test + @SuppressWarnings("java:S2699") + void load_app_context() { + } +} diff --git a/proxies/modapp-ereg-proxy/src/test/resources/application-test.yml b/proxies/modapp-ereg-proxy/src/test/resources/application-test.yml new file mode 100644 index 00000000000..905697c5bae --- /dev/null +++ b/proxies/modapp-ereg-proxy/src/test/resources/application-test.yml @@ -0,0 +1,11 @@ +TOKEN_X_ISSUER: dummy +consumers: + ereg-aura: + url: http://ereg-dummy.dummy.no + cluster: dev-fss + name: ereg-dummy + namespace: dummy +spring: + cloud: + vault: + enabled: false diff --git a/settings.gradle b/settings.gradle index 1a3d42dbd11..c1a87b24977 100644 --- a/settings.gradle +++ b/settings.gradle @@ -25,6 +25,7 @@ includeBuild './proxies/udistub-proxy' includeBuild './proxies/skjermingsregister-proxy' includeBuild './proxies/batch-adeo-proxy' includeBuild './proxies/saf-proxy' +includeBuild './proxies/modapp-ereg-proxy' includeBuild './proxies/dokarkiv-proxy' includeBuild './proxies/tps-forvalteren-proxy' includeBuild './proxies/aareg-synt-services-proxy' From 08ba8ef03c2b727d14e0d67ea558870a830092d3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Kristen=20H=C3=A6rum?= Date: Fri, 22 Mar 2024 09:39:55 +0100 Subject: [PATCH 11/20] Add error message inclusion across applications (#3445) Add error message inclusion across applications The configuration changes mean error messages will now be included in API responses for all applications. This improves error traceability and debugging. Changes were made in the 'application.yml' or 'application.yaml' files across multiple applications. --- apps/adresse-service/src/main/resources/application.yaml | 4 +++- apps/amelding-service/src/main/resources/application.yml | 4 +++- .../src/main/resources/application.yml | 4 +++- .../src/main/resources/application.yml | 4 +++- .../src/main/resources/application.yml | 2 ++ apps/brreg-stub/src/main/resources/application.yaml | 4 +++- apps/bruker-service/src/main/resources/application.yml | 4 +++- apps/budpro-service/src/main/resources/application.yml | 7 +++++++ apps/dolly-backend/src/main/resources/application.yaml | 7 ++----- apps/dolly-frontend/src/main/resources/application.yml | 2 ++ apps/dollystatus/src/main/resources/application.yml | 2 ++ .../src/main/resources/application.yml | 2 ++ .../src/main/resources/application.yml | 4 +++- .../src/main/resources/application.yml | 4 +++- .../src/main/resources/application.yml | 2 ++ .../src/main/resources/application.yml | 4 +++- .../src/main/resources/application.yml | 4 +++- .../src/main/resources/application.yml | 4 +++- .../src/main/resources/application.yml | 4 +++- .../src/main/resources/application.yml | 4 +++- .../src/main/resources/application.yml | 4 +++- .../src/main/resources/application.yml | 4 +++- apps/miljoer-service/src/main/resources/application.yml | 4 +++- .../src/main/resources/application.yml | 2 ++ .../src/main/resources/application.yml | 4 +++- .../src/main/resources/application.yml | 4 +++- .../src/main/resources/application.yml | 4 +++- .../src/main/resources/application.yml | 4 +++- .../src/main/resources/application.yml | 4 +++- .../src/main/resources/application.yml | 4 +++- .../src/main/resources/application.yml | 4 +++- .../orgnummer-service/src/main/resources/application.yml | 4 +++- .../oversikt-frontend/src/main/resources/application.yml | 2 ++ apps/pdl-forvalter/src/main/resources/application.yaml | 4 +++- .../src/main/resources/application.yml | 4 +++- .../src/main/resources/application.yml | 4 +++- .../src/main/resources/application.yml | 4 +++- apps/person-service/src/main/resources/application.yml | 4 +++- apps/profil-api/src/main/resources/application.yml | 4 +++- apps/sykemelding-api/src/main/resources/application.yml | 2 ++ .../src/main/resources/application.yml | 4 +++- .../src/main/resources/application.yml | 3 ++- .../src/main/resources/application.yaml | 9 ++++++++- .../src/main/resources/application.yml | 2 ++ .../src/main/resources/application.yml | 4 +++- .../src/main/resources/application.yaml | 4 +++- apps/udi-stub/src/main/resources/application.yml | 2 ++ .../src/main/resources/application.yml | 4 +++- proxies/aareg-proxy/src/main/resources/application.yaml | 7 +++++++ .../src/main/resources/application.yml | 9 ++++++++- .../src/main/resources/application.yml | 7 +++++++ .../src/main/resources/application.yml | 7 +++++++ .../batch-adeo-proxy/src/main/resources/application.yml | 9 ++++++++- .../brregstub-proxy/src/main/resources/application.yml | 9 ++++++++- .../dokarkiv-proxy/src/main/resources/application.yml | 7 +++++++ proxies/ereg-proxy/src/main/resources/application.yml | 7 +++++++ proxies/histark-proxy/src/main/resources/application.yml | 9 ++++++++- .../inntektstub-proxy/src/main/resources/application.yml | 9 ++++++++- proxies/inst-proxy/src/main/resources/application.yml | 7 +++++++ .../src/main/resources/application.yml | 7 +++++++ proxies/krrstub-proxy/src/main/resources/application.yml | 7 +++++++ proxies/medl-proxy/src/main/resources/application.yml | 7 +++++++ proxies/norg2-proxy/src/main/resources/application.yml | 9 ++++++++- proxies/pdl-proxy/src/main/resources/application.yml | 7 +++++++ .../src/main/resources/application.yml | 7 +++++++ proxies/saf-proxy/src/main/resources/application.yml | 7 +++++++ .../sigrunstub-proxy/src/main/resources/application.yml | 9 ++++++++- .../src/main/resources/application.yml | 7 +++++++ .../src/main/resources/application.yml | 7 +++++++ .../src/main/resources/application.yml | 7 +++++++ proxies/udistub-proxy/src/main/resources/application.yml | 7 +++++++ 71 files changed, 309 insertions(+), 48 deletions(-) diff --git a/apps/adresse-service/src/main/resources/application.yaml b/apps/adresse-service/src/main/resources/application.yaml index 248874c9951..e899f831d91 100644 --- a/apps/adresse-service/src/main/resources/application.yaml +++ b/apps/adresse-service/src/main/resources/application.yaml @@ -50,4 +50,6 @@ management: server: servlet: encoding: - charset: UTF-8 \ No newline at end of file + charset: UTF-8 + error: + include-message: always \ No newline at end of file diff --git a/apps/amelding-service/src/main/resources/application.yml b/apps/amelding-service/src/main/resources/application.yml index bb95d741739..1698ea6a87f 100644 --- a/apps/amelding-service/src/main/resources/application.yml +++ b/apps/amelding-service/src/main/resources/application.yml @@ -43,4 +43,6 @@ management: server: servlet: encoding: - charset: UTF-8 \ No newline at end of file + charset: UTF-8 + error: + include-message: always \ No newline at end of file diff --git a/apps/app-tilgang-analyse-service/src/main/resources/application.yml b/apps/app-tilgang-analyse-service/src/main/resources/application.yml index 822047d0729..3ec1b0c00ee 100644 --- a/apps/app-tilgang-analyse-service/src/main/resources/application.yml +++ b/apps/app-tilgang-analyse-service/src/main/resources/application.yml @@ -48,4 +48,6 @@ management: server: servlet: encoding: - charset: UTF-8 \ No newline at end of file + charset: UTF-8 + error: + include-message: always \ No newline at end of file diff --git a/apps/arbeidsforhold-service/src/main/resources/application.yml b/apps/arbeidsforhold-service/src/main/resources/application.yml index a73601451b5..0cebd9bc87e 100644 --- a/apps/arbeidsforhold-service/src/main/resources/application.yml +++ b/apps/arbeidsforhold-service/src/main/resources/application.yml @@ -46,4 +46,6 @@ management: server: servlet: encoding: - charset: UTF-8 \ No newline at end of file + charset: UTF-8 + error: + include-message: always \ No newline at end of file diff --git a/apps/batch-bestilling-service/src/main/resources/application.yml b/apps/batch-bestilling-service/src/main/resources/application.yml index c94c017e80e..2c0f29cb9dd 100644 --- a/apps/batch-bestilling-service/src/main/resources/application.yml +++ b/apps/batch-bestilling-service/src/main/resources/application.yml @@ -45,6 +45,8 @@ server: servlet: encoding: charset: UTF-8 + error: + include-message: always consumers: dolly-backend: diff --git a/apps/brreg-stub/src/main/resources/application.yaml b/apps/brreg-stub/src/main/resources/application.yaml index 1ee72bc46e8..f5cbfac1e91 100644 --- a/apps/brreg-stub/src/main/resources/application.yaml +++ b/apps/brreg-stub/src/main/resources/application.yaml @@ -29,4 +29,6 @@ management: server: servlet: encoding: - charset: UTF-8 \ No newline at end of file + charset: UTF-8 + error: + include-message: always \ No newline at end of file diff --git a/apps/bruker-service/src/main/resources/application.yml b/apps/bruker-service/src/main/resources/application.yml index 7269e777be2..8e7c4794648 100644 --- a/apps/bruker-service/src/main/resources/application.yml +++ b/apps/bruker-service/src/main/resources/application.yml @@ -44,4 +44,6 @@ management: server: servlet: encoding: - charset: UTF-8 \ No newline at end of file + charset: UTF-8 + error: + include-message: always \ No newline at end of file diff --git a/apps/budpro-service/src/main/resources/application.yml b/apps/budpro-service/src/main/resources/application.yml index 8e0b8718658..dbaf3135de7 100644 --- a/apps/budpro-service/src/main/resources/application.yml +++ b/apps/budpro-service/src/main/resources/application.yml @@ -37,3 +37,10 @@ consumers: app: security: allow-api: true + +server: + servlet: + encoding: + charset: UTF-8 + error: + include-message: always diff --git a/apps/dolly-backend/src/main/resources/application.yaml b/apps/dolly-backend/src/main/resources/application.yaml index c77f4fce394..162828fbb86 100644 --- a/apps/dolly-backend/src/main/resources/application.yaml +++ b/apps/dolly-backend/src/main/resources/application.yaml @@ -17,6 +17,8 @@ server: encoding: charset: UTF-8 max-http-header-size: 70KB + error: + include-message: always spring: cloud: @@ -83,11 +85,6 @@ open: total-fields: 1500 index: bestilling -tps: - person: - service: - wait: 30_000 - consumers: testnav-organisasjon-forvalter: name: testnav-organisasjon-forvalter diff --git a/apps/dolly-frontend/src/main/resources/application.yml b/apps/dolly-frontend/src/main/resources/application.yml index 5062856d51f..a9deec0b05f 100644 --- a/apps/dolly-frontend/src/main/resources/application.yml +++ b/apps/dolly-frontend/src/main/resources/application.yml @@ -233,6 +233,8 @@ server: servlet: encoding: charset: UTF-8 + error: + include-message: always logging: pattern: diff --git a/apps/dollystatus/src/main/resources/application.yml b/apps/dollystatus/src/main/resources/application.yml index cd124ff3702..ff84d84209f 100644 --- a/apps/dollystatus/src/main/resources/application.yml +++ b/apps/dollystatus/src/main/resources/application.yml @@ -15,6 +15,8 @@ server: servlet: encoding: charset: UTF-8 + error: + include-message: always logging: level: diff --git a/apps/endringsmelding-frontend/src/main/resources/application.yml b/apps/endringsmelding-frontend/src/main/resources/application.yml index d17fabe319b..b80dc78aaaf 100644 --- a/apps/endringsmelding-frontend/src/main/resources/application.yml +++ b/apps/endringsmelding-frontend/src/main/resources/application.yml @@ -60,6 +60,8 @@ server: servlet: encoding: charset: UTF-8 + error: + include-message: always logging: level: diff --git a/apps/endringsmelding-service/src/main/resources/application.yml b/apps/endringsmelding-service/src/main/resources/application.yml index 6b234af6b85..0bf48ac4a92 100644 --- a/apps/endringsmelding-service/src/main/resources/application.yml +++ b/apps/endringsmelding-service/src/main/resources/application.yml @@ -66,4 +66,6 @@ management: server: servlet: encoding: - charset: UTF-8 \ No newline at end of file + charset: UTF-8 + error: + include-message: always \ No newline at end of file diff --git a/apps/ereg-batch-status-service/src/main/resources/application.yml b/apps/ereg-batch-status-service/src/main/resources/application.yml index dbdd87a98e5..37422dfcf14 100644 --- a/apps/ereg-batch-status-service/src/main/resources/application.yml +++ b/apps/ereg-batch-status-service/src/main/resources/application.yml @@ -52,4 +52,6 @@ management: server: servlet: encoding: - charset: UTF-8 \ No newline at end of file + charset: UTF-8 + error: + include-message: always \ No newline at end of file diff --git a/apps/faste-data-frontend/src/main/resources/application.yml b/apps/faste-data-frontend/src/main/resources/application.yml index 6dd51931bf9..154c8d31050 100644 --- a/apps/faste-data-frontend/src/main/resources/application.yml +++ b/apps/faste-data-frontend/src/main/resources/application.yml @@ -76,6 +76,8 @@ server: servlet: encoding: charset: UTF-8 + error: + include-message: always logging: level: diff --git a/apps/generer-arbeidsforhold-populasjon-service/src/main/resources/application.yml b/apps/generer-arbeidsforhold-populasjon-service/src/main/resources/application.yml index 085b24d0fab..cc75a1aabe5 100644 --- a/apps/generer-arbeidsforhold-populasjon-service/src/main/resources/application.yml +++ b/apps/generer-arbeidsforhold-populasjon-service/src/main/resources/application.yml @@ -64,4 +64,6 @@ management: server: servlet: encoding: - charset: UTF-8 \ No newline at end of file + charset: UTF-8 + error: + include-message: always \ No newline at end of file diff --git a/apps/generer-navn-service/src/main/resources/application.yml b/apps/generer-navn-service/src/main/resources/application.yml index fbf80725da1..b4332bd4614 100644 --- a/apps/generer-navn-service/src/main/resources/application.yml +++ b/apps/generer-navn-service/src/main/resources/application.yml @@ -45,4 +45,6 @@ management: server: servlet: encoding: - charset: UTF-8 \ No newline at end of file + charset: UTF-8 + error: + include-message: always \ No newline at end of file diff --git a/apps/generer-organisasjon-populasjon-service/src/main/resources/application.yml b/apps/generer-organisasjon-populasjon-service/src/main/resources/application.yml index 1095396feec..49df1d9f339 100644 --- a/apps/generer-organisasjon-populasjon-service/src/main/resources/application.yml +++ b/apps/generer-organisasjon-populasjon-service/src/main/resources/application.yml @@ -54,4 +54,6 @@ management: server: servlet: encoding: - charset: UTF-8 \ No newline at end of file + charset: UTF-8 + error: + include-message: always \ No newline at end of file diff --git a/apps/geografiske-kodeverk-service/src/main/resources/application.yml b/apps/geografiske-kodeverk-service/src/main/resources/application.yml index 90f1aec1670..0ddc0bcbe92 100644 --- a/apps/geografiske-kodeverk-service/src/main/resources/application.yml +++ b/apps/geografiske-kodeverk-service/src/main/resources/application.yml @@ -39,4 +39,6 @@ management: server: servlet: encoding: - charset: UTF-8 \ No newline at end of file + charset: UTF-8 + error: + include-message: always \ No newline at end of file diff --git a/apps/inntektsmelding-generator-service/src/main/resources/application.yml b/apps/inntektsmelding-generator-service/src/main/resources/application.yml index 110264c0e1e..36e7e00f1e5 100644 --- a/apps/inntektsmelding-generator-service/src/main/resources/application.yml +++ b/apps/inntektsmelding-generator-service/src/main/resources/application.yml @@ -40,4 +40,6 @@ management: server: servlet: encoding: - charset: UTF-8 \ No newline at end of file + charset: UTF-8 + error: + include-message: always \ No newline at end of file diff --git a/apps/jenkins-batch-status-service/src/main/resources/application.yml b/apps/jenkins-batch-status-service/src/main/resources/application.yml index 282bf9b0a24..e03bc81d3c9 100644 --- a/apps/jenkins-batch-status-service/src/main/resources/application.yml +++ b/apps/jenkins-batch-status-service/src/main/resources/application.yml @@ -54,4 +54,6 @@ management: server: servlet: encoding: - charset: UTF-8 \ No newline at end of file + charset: UTF-8 + error: + include-message: always \ No newline at end of file diff --git a/apps/joark-dokument-service/src/main/resources/application.yml b/apps/joark-dokument-service/src/main/resources/application.yml index d9900d2f2c7..fbbb0b3349a 100644 --- a/apps/joark-dokument-service/src/main/resources/application.yml +++ b/apps/joark-dokument-service/src/main/resources/application.yml @@ -47,4 +47,6 @@ management: server: servlet: encoding: - charset: UTF-8 \ No newline at end of file + charset: UTF-8 + error: + include-message: always \ No newline at end of file diff --git a/apps/miljoer-service/src/main/resources/application.yml b/apps/miljoer-service/src/main/resources/application.yml index 4beddf8972e..41871840501 100644 --- a/apps/miljoer-service/src/main/resources/application.yml +++ b/apps/miljoer-service/src/main/resources/application.yml @@ -47,4 +47,6 @@ management: server: servlet: encoding: - charset: UTF-8 \ No newline at end of file + charset: UTF-8 + error: + include-message: always \ No newline at end of file diff --git a/apps/oppsummeringsdokument-service/src/main/resources/application.yml b/apps/oppsummeringsdokument-service/src/main/resources/application.yml index b3e24a33969..f24768dca66 100644 --- a/apps/oppsummeringsdokument-service/src/main/resources/application.yml +++ b/apps/oppsummeringsdokument-service/src/main/resources/application.yml @@ -47,3 +47,5 @@ server: servlet: encoding: charset: UTF-8 + error: + include-message: always diff --git a/apps/organisasjon-bestilling-service/src/main/resources/application.yml b/apps/organisasjon-bestilling-service/src/main/resources/application.yml index 805ee2e6965..65128d8b646 100644 --- a/apps/organisasjon-bestilling-service/src/main/resources/application.yml +++ b/apps/organisasjon-bestilling-service/src/main/resources/application.yml @@ -55,4 +55,6 @@ management: server: servlet: encoding: - charset: UTF-8 \ No newline at end of file + charset: UTF-8 + error: + include-message: always \ No newline at end of file diff --git a/apps/organisasjon-faste-data-service/src/main/resources/application.yml b/apps/organisasjon-faste-data-service/src/main/resources/application.yml index 8a26cd2b93a..ffe179b761c 100644 --- a/apps/organisasjon-faste-data-service/src/main/resources/application.yml +++ b/apps/organisasjon-faste-data-service/src/main/resources/application.yml @@ -54,4 +54,6 @@ management: server: servlet: encoding: - charset: UTF-8 \ No newline at end of file + charset: UTF-8 + error: + include-message: always \ No newline at end of file diff --git a/apps/organisasjon-forvalter/src/main/resources/application.yml b/apps/organisasjon-forvalter/src/main/resources/application.yml index 281ffe2add2..9cc4dd6812d 100644 --- a/apps/organisasjon-forvalter/src/main/resources/application.yml +++ b/apps/organisasjon-forvalter/src/main/resources/application.yml @@ -76,4 +76,6 @@ management: server: servlet: encoding: - charset: UTF-8 \ No newline at end of file + charset: UTF-8 + error: + include-message: always \ No newline at end of file diff --git a/apps/organisasjon-mottak-service/src/main/resources/application.yml b/apps/organisasjon-mottak-service/src/main/resources/application.yml index 12b7a1c3f77..15761dcdecc 100644 --- a/apps/organisasjon-mottak-service/src/main/resources/application.yml +++ b/apps/organisasjon-mottak-service/src/main/resources/application.yml @@ -64,4 +64,6 @@ management: server: servlet: encoding: - charset: UTF-8 \ No newline at end of file + charset: UTF-8 + error: + include-message: always \ No newline at end of file diff --git a/apps/organisasjon-service/src/main/resources/application.yml b/apps/organisasjon-service/src/main/resources/application.yml index 0b30288e953..acb2f690e9c 100644 --- a/apps/organisasjon-service/src/main/resources/application.yml +++ b/apps/organisasjon-service/src/main/resources/application.yml @@ -50,4 +50,6 @@ management: server: servlet: encoding: - charset: UTF-8 \ No newline at end of file + charset: UTF-8 + error: + include-message: always \ No newline at end of file diff --git a/apps/organisasjon-tilgang-frontend/src/main/resources/application.yml b/apps/organisasjon-tilgang-frontend/src/main/resources/application.yml index 4e89713750f..7802aaaadfa 100644 --- a/apps/organisasjon-tilgang-frontend/src/main/resources/application.yml +++ b/apps/organisasjon-tilgang-frontend/src/main/resources/application.yml @@ -50,4 +50,6 @@ management: server: servlet: encoding: - charset: UTF-8 \ No newline at end of file + charset: UTF-8 + error: + include-message: always \ No newline at end of file diff --git a/apps/organisasjon-tilgang-service/src/main/resources/application.yml b/apps/organisasjon-tilgang-service/src/main/resources/application.yml index c8e30c1fe89..b1a79edb18b 100644 --- a/apps/organisasjon-tilgang-service/src/main/resources/application.yml +++ b/apps/organisasjon-tilgang-service/src/main/resources/application.yml @@ -54,4 +54,6 @@ management: server: servlet: encoding: - charset: UTF-8 \ No newline at end of file + charset: UTF-8 + error: + include-message: always \ No newline at end of file diff --git a/apps/orgnummer-service/src/main/resources/application.yml b/apps/orgnummer-service/src/main/resources/application.yml index f46b42ceace..58c3ed56ef1 100644 --- a/apps/orgnummer-service/src/main/resources/application.yml +++ b/apps/orgnummer-service/src/main/resources/application.yml @@ -59,4 +59,6 @@ management: server: servlet: encoding: - charset: UTF-8 \ No newline at end of file + charset: UTF-8 + error: + include-message: always \ No newline at end of file diff --git a/apps/oversikt-frontend/src/main/resources/application.yml b/apps/oversikt-frontend/src/main/resources/application.yml index f65bec9fdf9..7b9ccda5e73 100644 --- a/apps/oversikt-frontend/src/main/resources/application.yml +++ b/apps/oversikt-frontend/src/main/resources/application.yml @@ -55,6 +55,8 @@ server: servlet: encoding: charset: UTF-8 + error: + include-message: always logging: level: diff --git a/apps/pdl-forvalter/src/main/resources/application.yaml b/apps/pdl-forvalter/src/main/resources/application.yaml index be3bb4cf4bb..b38645ecc26 100644 --- a/apps/pdl-forvalter/src/main/resources/application.yaml +++ b/apps/pdl-forvalter/src/main/resources/application.yaml @@ -70,4 +70,6 @@ management: server: servlet: encoding: - charset: UTF-8 \ No newline at end of file + charset: UTF-8 + error: + include-message: always \ No newline at end of file diff --git a/apps/person-faste-data-service/src/main/resources/application.yml b/apps/person-faste-data-service/src/main/resources/application.yml index 2515f413b99..85ac1aca946 100644 --- a/apps/person-faste-data-service/src/main/resources/application.yml +++ b/apps/person-faste-data-service/src/main/resources/application.yml @@ -45,4 +45,6 @@ management: server: servlet: encoding: - charset: UTF-8 \ No newline at end of file + charset: UTF-8 + error: + include-message: always \ No newline at end of file diff --git a/apps/person-organisasjon-tilgang-service/src/main/resources/application.yml b/apps/person-organisasjon-tilgang-service/src/main/resources/application.yml index 749173ef3ec..f52d93eb62a 100644 --- a/apps/person-organisasjon-tilgang-service/src/main/resources/application.yml +++ b/apps/person-organisasjon-tilgang-service/src/main/resources/application.yml @@ -49,4 +49,6 @@ management: server: servlet: encoding: - charset: UTF-8 \ No newline at end of file + charset: UTF-8 + error: + include-message: always \ No newline at end of file diff --git a/apps/person-search-service/src/main/resources/application.yml b/apps/person-search-service/src/main/resources/application.yml index c98ec2ef19c..970fa1f9642 100644 --- a/apps/person-search-service/src/main/resources/application.yml +++ b/apps/person-search-service/src/main/resources/application.yml @@ -57,4 +57,6 @@ management: server: servlet: encoding: - charset: UTF-8 \ No newline at end of file + charset: UTF-8 + error: + include-message: always \ No newline at end of file diff --git a/apps/person-service/src/main/resources/application.yml b/apps/person-service/src/main/resources/application.yml index 484075fff2e..a60afe1552d 100644 --- a/apps/person-service/src/main/resources/application.yml +++ b/apps/person-service/src/main/resources/application.yml @@ -59,4 +59,6 @@ management: server: servlet: encoding: - charset: UTF-8 \ No newline at end of file + charset: UTF-8 + error: + include-message: always \ No newline at end of file diff --git a/apps/profil-api/src/main/resources/application.yml b/apps/profil-api/src/main/resources/application.yml index 9290a3c1203..9a6bdad86fc 100644 --- a/apps/profil-api/src/main/resources/application.yml +++ b/apps/profil-api/src/main/resources/application.yml @@ -54,4 +54,6 @@ management: server: servlet: encoding: - charset: UTF-8 \ No newline at end of file + charset: UTF-8 + error: + include-message: always \ No newline at end of file diff --git a/apps/sykemelding-api/src/main/resources/application.yml b/apps/sykemelding-api/src/main/resources/application.yml index d6dfd75a4f4..341ca3b64f1 100644 --- a/apps/sykemelding-api/src/main/resources/application.yml +++ b/apps/sykemelding-api/src/main/resources/application.yml @@ -48,6 +48,8 @@ server: servlet: encoding: charset: UTF-8 + error: + include-message: always ibm: mq: queueManager: ${IBM_MQ_QUEUE_MANAGER} diff --git a/apps/synt-sykemelding-api/src/main/resources/application.yml b/apps/synt-sykemelding-api/src/main/resources/application.yml index f080bf7ac5f..11992aca432 100644 --- a/apps/synt-sykemelding-api/src/main/resources/application.yml +++ b/apps/synt-sykemelding-api/src/main/resources/application.yml @@ -75,4 +75,6 @@ management: server: servlet: encoding: - charset: UTF-8 \ No newline at end of file + charset: UTF-8 + error: + include-message: always \ No newline at end of file diff --git a/apps/synt-vedtakshistorikk-service/src/main/resources/application.yml b/apps/synt-vedtakshistorikk-service/src/main/resources/application.yml index 7ae839c58cf..9d5ade6dbbd 100644 --- a/apps/synt-vedtakshistorikk-service/src/main/resources/application.yml +++ b/apps/synt-vedtakshistorikk-service/src/main/resources/application.yml @@ -16,7 +16,6 @@ spring: vault: enabled: false - springdoc: swagger-ui: disable-swagger-default-url: true @@ -83,3 +82,5 @@ server: servlet: encoding: charset: UTF-8 + error: + include-message: always diff --git a/apps/testnav-ident-pool/src/main/resources/application.yaml b/apps/testnav-ident-pool/src/main/resources/application.yaml index baa41b6593b..f411431ba17 100644 --- a/apps/testnav-ident-pool/src/main/resources/application.yaml +++ b/apps/testnav-ident-pool/src/main/resources/application.yaml @@ -61,4 +61,11 @@ consumers: url: http://testnav-tps-messaging-service.dolly.svc.cluster.local cluster: dev-gcp namespace: dolly - name: testnav-tps-messaging-service \ No newline at end of file + name: testnav-tps-messaging-service + +server: + servlet: + encoding: + charset: UTF-8 + error: + include-message: always diff --git a/apps/testnorge-statisk-data-forvalter/src/main/resources/application.yml b/apps/testnorge-statisk-data-forvalter/src/main/resources/application.yml index 9c5ba4c9407..f38c4d4cc98 100644 --- a/apps/testnorge-statisk-data-forvalter/src/main/resources/application.yml +++ b/apps/testnorge-statisk-data-forvalter/src/main/resources/application.yml @@ -97,3 +97,5 @@ server: servlet: encoding: charset: UTF-8 + error: + include-message: always diff --git a/apps/tilbakemelding-api/src/main/resources/application.yml b/apps/tilbakemelding-api/src/main/resources/application.yml index f6eaecb9bc1..5a9f356e5bd 100644 --- a/apps/tilbakemelding-api/src/main/resources/application.yml +++ b/apps/tilbakemelding-api/src/main/resources/application.yml @@ -51,4 +51,6 @@ management: server: servlet: encoding: - charset: UTF-8 \ No newline at end of file + charset: UTF-8 + error: + include-message: always \ No newline at end of file diff --git a/apps/tps-messaging-service/src/main/resources/application.yaml b/apps/tps-messaging-service/src/main/resources/application.yaml index 68eb6a128f4..d0c77894e46 100644 --- a/apps/tps-messaging-service/src/main/resources/application.yaml +++ b/apps/tps-messaging-service/src/main/resources/application.yaml @@ -68,4 +68,6 @@ management: server: servlet: encoding: - charset: UTF-8 \ No newline at end of file + charset: UTF-8 + error: + include-message: always \ No newline at end of file diff --git a/apps/udi-stub/src/main/resources/application.yml b/apps/udi-stub/src/main/resources/application.yml index 84004ebefe6..01a94b41a53 100644 --- a/apps/udi-stub/src/main/resources/application.yml +++ b/apps/udi-stub/src/main/resources/application.yml @@ -48,4 +48,6 @@ server: servlet: encoding: charset: UTF-8 + error: + include-message: always diff --git a/apps/varslinger-service/src/main/resources/application.yml b/apps/varslinger-service/src/main/resources/application.yml index 11ce8b758f9..8a78f09871b 100644 --- a/apps/varslinger-service/src/main/resources/application.yml +++ b/apps/varslinger-service/src/main/resources/application.yml @@ -42,4 +42,6 @@ management: server: servlet: encoding: - charset: UTF-8 \ No newline at end of file + charset: UTF-8 + error: + include-message: always \ No newline at end of file diff --git a/proxies/aareg-proxy/src/main/resources/application.yaml b/proxies/aareg-proxy/src/main/resources/application.yaml index 581167fdfe9..a66a8f59855 100644 --- a/proxies/aareg-proxy/src/main/resources/application.yaml +++ b/proxies/aareg-proxy/src/main/resources/application.yaml @@ -28,6 +28,13 @@ springdoc: disable-swagger-default-url: true url: /v3/api-docs +server: + servlet: + encoding: + charset: UTF-8 + error: + include-message: always + consumers: aareg-services: name: aareg-services-nais-{env} diff --git a/proxies/aareg-synt-services-proxy/src/main/resources/application.yml b/proxies/aareg-synt-services-proxy/src/main/resources/application.yml index c071ceed37d..075c3c04e6b 100644 --- a/proxies/aareg-synt-services-proxy/src/main/resources/application.yml +++ b/proxies/aareg-synt-services-proxy/src/main/resources/application.yml @@ -20,4 +20,11 @@ spring: httpclient: response-timeout: 600s vault: - enabled: false \ No newline at end of file + enabled: false + +server: + servlet: + encoding: + charset: UTF-8 + error: + include-message: always \ No newline at end of file diff --git a/proxies/arbeidsplassencv-proxy/src/main/resources/application.yml b/proxies/arbeidsplassencv-proxy/src/main/resources/application.yml index e9ee116ac3c..6d226f14d87 100644 --- a/proxies/arbeidsplassencv-proxy/src/main/resources/application.yml +++ b/proxies/arbeidsplassencv-proxy/src/main/resources/application.yml @@ -22,6 +22,13 @@ spring: vault: enabled: false +server: + servlet: + encoding: + charset: UTF-8 + error: + include-message: always + consumers: arbeidsplassencv: name: pam-cv-api-gcp diff --git a/proxies/arena-forvalteren-proxy/src/main/resources/application.yml b/proxies/arena-forvalteren-proxy/src/main/resources/application.yml index 0ce1e194fba..0de10a6f643 100644 --- a/proxies/arena-forvalteren-proxy/src/main/resources/application.yml +++ b/proxies/arena-forvalteren-proxy/src/main/resources/application.yml @@ -22,6 +22,13 @@ spring: vault: enabled: false +server: + servlet: + encoding: + charset: UTF-8 + error: + include-message: always + consumers: arena-services: name: arena-services-MILJOE diff --git a/proxies/batch-adeo-proxy/src/main/resources/application.yml b/proxies/batch-adeo-proxy/src/main/resources/application.yml index 2254c5bf0bf..cfdde3eaad8 100644 --- a/proxies/batch-adeo-proxy/src/main/resources/application.yml +++ b/proxies/batch-adeo-proxy/src/main/resources/application.yml @@ -20,4 +20,11 @@ spring: httpclient: response-timeout: 30s vault: - enabled: false \ No newline at end of file + enabled: false + +server: + servlet: + encoding: + charset: UTF-8 + error: + include-message: always \ No newline at end of file diff --git a/proxies/brregstub-proxy/src/main/resources/application.yml b/proxies/brregstub-proxy/src/main/resources/application.yml index 65a307c0448..b2925a062a0 100644 --- a/proxies/brregstub-proxy/src/main/resources/application.yml +++ b/proxies/brregstub-proxy/src/main/resources/application.yml @@ -20,4 +20,11 @@ spring: httpclient: response-timeout: 30s vault: - enabled: false \ No newline at end of file + enabled: false + +server: + servlet: + encoding: + charset: UTF-8 + error: + include-message: always \ No newline at end of file diff --git a/proxies/dokarkiv-proxy/src/main/resources/application.yml b/proxies/dokarkiv-proxy/src/main/resources/application.yml index f7ffec35e2d..4fbaeda098b 100644 --- a/proxies/dokarkiv-proxy/src/main/resources/application.yml +++ b/proxies/dokarkiv-proxy/src/main/resources/application.yml @@ -22,6 +22,13 @@ spring: vault: enabled: false +server: + servlet: + encoding: + charset: UTF-8 + error: + include-message: always + consumers: dokarkiv: url: http://dokarkiv-MILJOE.teamdokumenthandtering.svc.nais.local diff --git a/proxies/ereg-proxy/src/main/resources/application.yml b/proxies/ereg-proxy/src/main/resources/application.yml index 7f2ae7279b8..2e7fe7f93e8 100644 --- a/proxies/ereg-proxy/src/main/resources/application.yml +++ b/proxies/ereg-proxy/src/main/resources/application.yml @@ -19,3 +19,10 @@ spring: gateway: httpclient: response-timeout: 120s + +server: + servlet: + encoding: + charset: UTF-8 + error: + include-message: always \ No newline at end of file diff --git a/proxies/histark-proxy/src/main/resources/application.yml b/proxies/histark-proxy/src/main/resources/application.yml index 38fd86cbaf9..c57132d143a 100644 --- a/proxies/histark-proxy/src/main/resources/application.yml +++ b/proxies/histark-proxy/src/main/resources/application.yml @@ -20,4 +20,11 @@ spring: httpclient: response-timeout: 600s vault: - enabled: false \ No newline at end of file + enabled: false + +server: + servlet: + encoding: + charset: UTF-8 + error: + include-message: always \ No newline at end of file diff --git a/proxies/inntektstub-proxy/src/main/resources/application.yml b/proxies/inntektstub-proxy/src/main/resources/application.yml index d341f86a4e5..d887142145a 100644 --- a/proxies/inntektstub-proxy/src/main/resources/application.yml +++ b/proxies/inntektstub-proxy/src/main/resources/application.yml @@ -20,4 +20,11 @@ spring: httpclient: response-timeout: 600s vault: - enabled: false \ No newline at end of file + enabled: false + +server: + servlet: + encoding: + charset: UTF-8 + error: + include-message: always \ No newline at end of file diff --git a/proxies/inst-proxy/src/main/resources/application.yml b/proxies/inst-proxy/src/main/resources/application.yml index 838ce3ffad1..01dd5bd794a 100644 --- a/proxies/inst-proxy/src/main/resources/application.yml +++ b/proxies/inst-proxy/src/main/resources/application.yml @@ -22,6 +22,13 @@ spring: httpclient: response-timeout: 180s +server: + servlet: + encoding: + charset: UTF-8 + error: + include-message: always + consumers: inst: name: opphold-testdata diff --git a/proxies/kontoregister-person-proxy/src/main/resources/application.yml b/proxies/kontoregister-person-proxy/src/main/resources/application.yml index da810748166..9e6cd97e0d9 100644 --- a/proxies/kontoregister-person-proxy/src/main/resources/application.yml +++ b/proxies/kontoregister-person-proxy/src/main/resources/application.yml @@ -22,6 +22,13 @@ spring: vault: enabled: false +server: + servlet: + encoding: + charset: UTF-8 + error: + include-message: always + consumers: kontoregister: name: sokos-kontoregister-person diff --git a/proxies/krrstub-proxy/src/main/resources/application.yml b/proxies/krrstub-proxy/src/main/resources/application.yml index ff8220fce27..8a784650e62 100644 --- a/proxies/krrstub-proxy/src/main/resources/application.yml +++ b/proxies/krrstub-proxy/src/main/resources/application.yml @@ -22,6 +22,13 @@ spring: vault: enabled: false +server: + servlet: + encoding: + charset: UTF-8 + error: + include-message: always + consumers: krrstub: name: digdir-krr-stub diff --git a/proxies/medl-proxy/src/main/resources/application.yml b/proxies/medl-proxy/src/main/resources/application.yml index 83dedfa1672..fdbf0b0c264 100644 --- a/proxies/medl-proxy/src/main/resources/application.yml +++ b/proxies/medl-proxy/src/main/resources/application.yml @@ -22,6 +22,13 @@ spring: vault: enabled: false +server: + servlet: + encoding: + charset: UTF-8 + error: + include-message: always + consumers: medlstub: name: medlemskap-medl-testdata diff --git a/proxies/norg2-proxy/src/main/resources/application.yml b/proxies/norg2-proxy/src/main/resources/application.yml index 656cb23834e..824d19c8596 100644 --- a/proxies/norg2-proxy/src/main/resources/application.yml +++ b/proxies/norg2-proxy/src/main/resources/application.yml @@ -18,4 +18,11 @@ spring: cloud: gateway: httpclient: - response-timeout: 600s \ No newline at end of file + response-timeout: 600s + +server: + servlet: + encoding: + charset: UTF-8 + error: + include-message: always \ No newline at end of file diff --git a/proxies/pdl-proxy/src/main/resources/application.yml b/proxies/pdl-proxy/src/main/resources/application.yml index 0a99cca928d..e26237f80f4 100644 --- a/proxies/pdl-proxy/src/main/resources/application.yml +++ b/proxies/pdl-proxy/src/main/resources/application.yml @@ -25,6 +25,13 @@ sts: provider: url: https://security-token-service.dev.adeo.no/rest/v1/sts/token +server: + servlet: + encoding: + charset: UTF-8 + error: + include-message: always + consumers: pdl-testdata: url: http://pdl-testdata.pdl.svc.nais.local diff --git a/proxies/pensjon-testdata-facade-proxy/src/main/resources/application.yml b/proxies/pensjon-testdata-facade-proxy/src/main/resources/application.yml index a39776feb28..80815dce95e 100644 --- a/proxies/pensjon-testdata-facade-proxy/src/main/resources/application.yml +++ b/proxies/pensjon-testdata-facade-proxy/src/main/resources/application.yml @@ -22,6 +22,13 @@ spring: vault: enabled: false +server: + servlet: + encoding: + charset: UTF-8 + error: + include-message: always + consumers: samboer-testdata: name: pensjon-samboerforhold-backend-MILJOE diff --git a/proxies/saf-proxy/src/main/resources/application.yml b/proxies/saf-proxy/src/main/resources/application.yml index c7952e5627b..5ad17d622f3 100644 --- a/proxies/saf-proxy/src/main/resources/application.yml +++ b/proxies/saf-proxy/src/main/resources/application.yml @@ -22,6 +22,13 @@ spring: vault: enabled: false +server: + servlet: + encoding: + charset: UTF-8 + error: + include-message: always + consumers: saf: url: http://saf-MILJOE.teamdokumenthandtering.svc.nais.local diff --git a/proxies/sigrunstub-proxy/src/main/resources/application.yml b/proxies/sigrunstub-proxy/src/main/resources/application.yml index f2667f033bc..7276fd556ff 100644 --- a/proxies/sigrunstub-proxy/src/main/resources/application.yml +++ b/proxies/sigrunstub-proxy/src/main/resources/application.yml @@ -20,4 +20,11 @@ spring: httpclient: response-timeout: 600s vault: - enabled: false \ No newline at end of file + enabled: false + +server: + servlet: + encoding: + charset: UTF-8 + error: + include-message: always \ No newline at end of file diff --git a/proxies/skjermingsregister-proxy/src/main/resources/application.yml b/proxies/skjermingsregister-proxy/src/main/resources/application.yml index 7ab17a5a1c7..675b5454381 100644 --- a/proxies/skjermingsregister-proxy/src/main/resources/application.yml +++ b/proxies/skjermingsregister-proxy/src/main/resources/application.yml @@ -22,6 +22,13 @@ spring: httpclient: response-timeout: 30s +server: + servlet: + encoding: + charset: UTF-8 + error: + include-message: always + consumers: skjermingsregister: name: skjermede-personer diff --git a/proxies/synthdata-meldekort-proxy/src/main/resources/application.yml b/proxies/synthdata-meldekort-proxy/src/main/resources/application.yml index 8bea364b981..9e4e5fcdf42 100644 --- a/proxies/synthdata-meldekort-proxy/src/main/resources/application.yml +++ b/proxies/synthdata-meldekort-proxy/src/main/resources/application.yml @@ -15,6 +15,13 @@ spring: vault: enabled: false +server: + servlet: + encoding: + charset: UTF-8 + error: + include-message: always + consumers: synt-meldekort: url: https://synthdata-arena-meldekort.intern.dev.nav.no diff --git a/proxies/tps-forvalteren-proxy/src/main/resources/application.yml b/proxies/tps-forvalteren-proxy/src/main/resources/application.yml index 87ce883e8a1..7fd9e27269a 100644 --- a/proxies/tps-forvalteren-proxy/src/main/resources/application.yml +++ b/proxies/tps-forvalteren-proxy/src/main/resources/application.yml @@ -19,3 +19,10 @@ spring: gateway: httpclient: response-timeout: 1200s + +server: + servlet: + encoding: + charset: UTF-8 + error: + include-message: always \ No newline at end of file diff --git a/proxies/udistub-proxy/src/main/resources/application.yml b/proxies/udistub-proxy/src/main/resources/application.yml index 06c736b4f2c..c3d6f395292 100644 --- a/proxies/udistub-proxy/src/main/resources/application.yml +++ b/proxies/udistub-proxy/src/main/resources/application.yml @@ -20,6 +20,13 @@ spring: httpclient: response-timeout: 1200s +server: + servlet: + encoding: + charset: UTF-8 + error: + include-message: always + consumers: testnav-udistub: url: http://testnav-udi-stub.dolly.svc.nais.local From 4ae06c579d3267fec44eb9b6f6ca574ed39ea536 Mon Sep 17 00:00:00 2001 From: Cato Olsen Date: Wed, 27 Mar 2024 09:57:49 +0100 Subject: [PATCH 12/20] cleanup/fjerner_build_workflow (#3447) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Fjerner unødvendig workflow build.yml. --- .github/workflows/build.yml | 35 ------------------- .../{tests.yml => integration-tests.yml} | 2 +- 2 files changed, 1 insertion(+), 36 deletions(-) delete mode 100644 .github/workflows/build.yml rename .github/workflows/{tests.yml => integration-tests.yml} (96%) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml deleted file mode 100644 index b0da88e14e6..00000000000 --- a/.github/workflows/build.yml +++ /dev/null @@ -1,35 +0,0 @@ -name: Build -on: - push: - branches: - - master - paths-ignore: - - 'navikt/**' - - '.github/**' - - '.nais/alerting-dolly.yml' - pull_request: - types: [ assigned, opened, synchronize, reopened ] - workflow_dispatch: - -jobs: - build: - runs-on: ubuntu-latest - steps: - - name: "Checkout" - uses: actions/checkout@v4 - - name: "Git" - run: git fetch --unshallow - - name: "Java" - uses: actions/setup-java@v4 - with: - distribution: 'temurin' - java-version: 21 - - name: "Gradle" - env: - NAV_TOKEN: ${{ secrets.NAV_TOKEN }} - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - GITHUB_USERNAME: token - uses: gradle/gradle-build-action@v2 - with: - arguments: build --scan - cache-read-only: false \ No newline at end of file diff --git a/.github/workflows/tests.yml b/.github/workflows/integration-tests.yml similarity index 96% rename from .github/workflows/tests.yml rename to .github/workflows/integration-tests.yml index 0a27c9e4c1e..cecb9bed8d1 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/integration-tests.yml @@ -1,4 +1,4 @@ -name: Tests +name: Integration Tests on: push: branches: From 3e7af62678ed28f7aed43176d3ecf5334225b9ab Mon Sep 17 00:00:00 2001 From: Cato Olsen Date: Wed, 27 Mar 2024 09:58:12 +0100 Subject: [PATCH 13/20] =?UTF-8?q?Endrer=20navn=20p=C3=A5=20@Configuration-?= =?UTF-8?q?filer=20brukt=20i=20test,=20for=20=C3=A5=20unng=C3=A5=20at=20Ja?= =?UTF-8?q?CoCo=20klager=20p=C3=A5=20at=20kompilerte=20filer=20ikke=20matc?= =?UTF-8?q?her.=20(#3448)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../config/{CachingConfig.java => TestCachingConfig.java} | 7 +++++-- .../{OpenSearchConfig.java => TestOpenSearchConfig.java} | 4 +++- 2 files changed, 8 insertions(+), 3 deletions(-) rename apps/dolly-backend/src/test/java/no/nav/dolly/config/{CachingConfig.java => TestCachingConfig.java} (76%) rename apps/dolly-backend/src/test/java/no/nav/dolly/config/{OpenSearchConfig.java => TestOpenSearchConfig.java} (90%) diff --git a/apps/dolly-backend/src/test/java/no/nav/dolly/config/CachingConfig.java b/apps/dolly-backend/src/test/java/no/nav/dolly/config/TestCachingConfig.java similarity index 76% rename from apps/dolly-backend/src/test/java/no/nav/dolly/config/CachingConfig.java rename to apps/dolly-backend/src/test/java/no/nav/dolly/config/TestCachingConfig.java index 8c3637d9ca2..35e12eb8005 100644 --- a/apps/dolly-backend/src/test/java/no/nav/dolly/config/CachingConfig.java +++ b/apps/dolly-backend/src/test/java/no/nav/dolly/config/TestCachingConfig.java @@ -4,13 +4,16 @@ import org.springframework.cache.annotation.EnableCaching; import org.springframework.cache.support.NoOpCacheManager; import org.springframework.context.annotation.Bean; +import org.springframework.context.annotation.Configuration; import org.springframework.context.annotation.Profile; +@Configuration @EnableCaching -public class CachingConfig { +@Profile("test") +public class TestCachingConfig { @Bean - @Profile("test") public CacheManager cacheManager() { return new NoOpCacheManager(); } + } \ No newline at end of file diff --git a/apps/dolly-backend/src/test/java/no/nav/dolly/config/OpenSearchConfig.java b/apps/dolly-backend/src/test/java/no/nav/dolly/config/TestOpenSearchConfig.java similarity index 90% rename from apps/dolly-backend/src/test/java/no/nav/dolly/config/OpenSearchConfig.java rename to apps/dolly-backend/src/test/java/no/nav/dolly/config/TestOpenSearchConfig.java index 6c94c7f5b8c..9a943bafd9c 100644 --- a/apps/dolly-backend/src/test/java/no/nav/dolly/config/OpenSearchConfig.java +++ b/apps/dolly-backend/src/test/java/no/nav/dolly/config/TestOpenSearchConfig.java @@ -7,12 +7,14 @@ import org.opensearch.testcontainers.OpensearchContainer; import org.springframework.context.annotation.Bean; import org.springframework.context.annotation.Configuration; +import org.springframework.context.annotation.Profile; import org.springframework.data.elasticsearch.repository.config.EnableElasticsearchRepositories; import org.testcontainers.utility.DockerImageName; @Configuration +@Profile("test") @EnableElasticsearchRepositories("no.nav.dolly.elastic") -public class OpenSearchConfig extends AbstractOpenSearchConfiguration { +public class TestOpenSearchConfig extends AbstractOpenSearchConfiguration { private static final DockerImageName OPENSEARCH_IMAGE = DockerImageName.parse("opensearchproject/opensearch:2.0.0"); From c53e6f04b1352d5b81a1000c583d2a6e31db7b58 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue, 2 Apr 2024 08:34:41 +0200 Subject: [PATCH 14/20] Bump express from 4.18.2 to 4.19.2 in /navikt/dolly-komponenter (#3450) Bumps [express](https://github.com/expressjs/express) from 4.18.2 to 4.19.2. - [Release notes](https://github.com/expressjs/express/releases) - [Changelog](https://github.com/expressjs/express/blob/master/History.md) - [Commits](https://github.com/expressjs/express/compare/4.18.2...4.19.2) --- updated-dependencies: - dependency-name: express dependency-type: indirect ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- navikt/dolly-komponenter/package-lock.json | 36 +++++++++++----------- 1 file changed, 18 insertions(+), 18 deletions(-) diff --git a/navikt/dolly-komponenter/package-lock.json b/navikt/dolly-komponenter/package-lock.json index ce880e78523..9e75d61b4ae 100644 --- a/navikt/dolly-komponenter/package-lock.json +++ b/navikt/dolly-komponenter/package-lock.json @@ -1,12 +1,12 @@ { "name": "@navikt/dolly-komponenter", - "version": "1.3.34", + "version": "1.3.35", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "@navikt/dolly-komponenter", - "version": "1.3.34", + "version": "1.3.35", "license": "MIT", "dependencies": { "@navikt/dolly-assets": "^1.2.9", @@ -7429,13 +7429,13 @@ } }, "node_modules/body-parser": { - "version": "1.20.1", - "resolved": "https://registry.npmjs.org/body-parser/-/body-parser-1.20.1.tgz", - "integrity": "sha512-jWi7abTbYwajOytWCQc37VulmWiRae5RyTpaCyDcS5/lMdtwSz5lOpDE67srw/HYe35f1z3fDQw+3txg7gNtWw==", + "version": "1.20.2", + "resolved": "https://registry.npmjs.org/body-parser/-/body-parser-1.20.2.tgz", + "integrity": "sha512-ml9pReCu3M61kGlqoTm2umSXTlRTuGTx0bfYj+uIUKKYycG5NtSbeetV3faSU6R7ajOPw0g/J1PvK4qNy7s5bA==", "dev": true, "dependencies": { "bytes": "3.1.2", - "content-type": "~1.0.4", + "content-type": "~1.0.5", "debug": "2.6.9", "depd": "2.0.0", "destroy": "1.2.0", @@ -7443,7 +7443,7 @@ "iconv-lite": "0.4.24", "on-finished": "2.4.1", "qs": "6.11.0", - "raw-body": "2.5.1", + "raw-body": "2.5.2", "type-is": "~1.6.18", "unpipe": "1.0.0" }, @@ -8106,9 +8106,9 @@ "dev": true }, "node_modules/cookie": { - "version": "0.5.0", - "resolved": "https://registry.npmjs.org/cookie/-/cookie-0.5.0.tgz", - "integrity": "sha512-YZ3GUyn/o8gfKJlnlX7g7xq4gyO6OSuhGPKaaGssGB2qgDUS0gPgtTvoyZLTt9Ab6dC4hfc9dV5arkvc/OCmrw==", + "version": "0.6.0", + "resolved": "https://registry.npmjs.org/cookie/-/cookie-0.6.0.tgz", + "integrity": "sha512-U71cyTamuh1CRNCfpGY6to28lxvNwPG4Guz/EVjgf3Jmzv0vlDp1atT9eS5dDjMYHucpHbWns6Lwf3BKz6svdw==", "dev": true, "engines": { "node": ">= 0.6" @@ -9286,17 +9286,17 @@ } }, "node_modules/express": { - "version": "4.18.2", - "resolved": "https://registry.npmjs.org/express/-/express-4.18.2.tgz", - "integrity": "sha512-5/PsL6iGPdfQ/lKM1UuielYgv3BUoJfz1aUwU9vHZ+J7gyvwdQXFEBIEIaxeGf0GIcreATNyBExtalisDbuMqQ==", + "version": "4.19.2", + "resolved": "https://registry.npmjs.org/express/-/express-4.19.2.tgz", + "integrity": "sha512-5T6nhjsT+EOMzuck8JjBHARTHfMht0POzlA60WV2pMD3gyXw2LZnZ+ueGdNxG+0calOJcWKbpFcuzLZ91YWq9Q==", "dev": true, "dependencies": { "accepts": "~1.3.8", "array-flatten": "1.1.1", - "body-parser": "1.20.1", + "body-parser": "1.20.2", "content-disposition": "0.5.4", "content-type": "~1.0.4", - "cookie": "0.5.0", + "cookie": "0.6.0", "cookie-signature": "1.0.6", "debug": "2.6.9", "depd": "2.0.0", @@ -13435,9 +13435,9 @@ } }, "node_modules/raw-body": { - "version": "2.5.1", - "resolved": "https://registry.npmjs.org/raw-body/-/raw-body-2.5.1.tgz", - "integrity": "sha512-qqJBtEyVgS0ZmPGdCFPWJ3FreoqvG4MVQln/kCgF7Olq95IbOp0/BWyMwbdtn4VTvkM8Y7khCQ2Xgk/tcrCXig==", + "version": "2.5.2", + "resolved": "https://registry.npmjs.org/raw-body/-/raw-body-2.5.2.tgz", + "integrity": "sha512-8zGqypfENjCIqGhgXToC8aB2r7YrBX+AQAfIPs/Mlk+BtPTztOvTS01NRW/3Eh60J+a48lt8qsCzirQ6loCVfA==", "dev": true, "dependencies": { "bytes": "3.1.2", From f3559a1077147c5607261b59d9ac6924ae48e867 Mon Sep 17 00:00:00 2001 From: Stian Gustavsson Date: Tue, 2 Apr 2024 08:42:16 +0200 Subject: [PATCH 15/20] Bugfix/endringsmelding 404 (#3435) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * Refaktor av endringsmelding-service * Tydeligere beskrevet post operation * Endret endringsmelding-frontend til å matche det nye oppsettet til endringsmelding-service * Byttet endepunkt endringsmelding-service bruker mot tps-messaging * Refaktor av identhenting --- ...ingsmeldingFrontendApplicationStarter.java | 18 +- .../src/main/js/package-lock.json | 905 ++++++++++-------- .../src/main/js/package.json | 16 +- .../src/main/js/src/App.tsx | 2 +- .../main/js/src/components/search/Search.tsx | 77 +- .../form/dodsmelding-form/DodsmeldingForm.tsx | 7 +- .../FodselsmeldingForm.tsx | 6 +- .../src/main/js/src/useIdentSearch.tsx | 34 - .../src/main/resources/logback-spring.xml | 1 - ...ringsmeldingServiceApplicationStarter.java | 2 +- .../consumer/TpsMessagingConsumer.java | 6 +- .../command/GetIdentEnvironmentsCommand.java | 12 +- .../controller/IdentMiljoeController.java | 19 +- .../domain/IdenterRequest.java | 4 + .../src/main/resources/logback-spring.xml | 2 - 15 files changed, 623 insertions(+), 488 deletions(-) delete mode 100644 apps/endringsmelding-frontend/src/main/js/src/useIdentSearch.tsx create mode 100644 apps/endringsmelding-service/src/main/java/no/nav/testnav/endringsmeldingservice/domain/IdenterRequest.java diff --git a/apps/endringsmelding-frontend/src/main/java/no/nav/testnav/apps/endringsmeldingfrontend/EndringsmeldingFrontendApplicationStarter.java b/apps/endringsmelding-frontend/src/main/java/no/nav/testnav/apps/endringsmeldingfrontend/EndringsmeldingFrontendApplicationStarter.java index 3687476c9d4..00a741fa6a7 100644 --- a/apps/endringsmelding-frontend/src/main/java/no/nav/testnav/apps/endringsmeldingfrontend/EndringsmeldingFrontendApplicationStarter.java +++ b/apps/endringsmelding-frontend/src/main/java/no/nav/testnav/apps/endringsmeldingfrontend/EndringsmeldingFrontendApplicationStarter.java @@ -38,7 +38,7 @@ public class EndringsmeldingFrontendApplicationStarter { public RouteLocator customRouteLocator(RouteLocatorBuilder builder) { return builder .routes() - .route(createRoute(consumers.getEndringsmeldingService())) + .route(createRoute(consumers.getEndringsmeldingService(), "endringsmelding-service")) .route(createRoute(consumers.getTestnorgeProfilApi())) .build(); } @@ -68,4 +68,20 @@ private Function> createRoute(ServerProperties s ).uri(host); } + private Function> createRoute(ServerProperties serverProperties, String segment) { + return createRoute( + segment, + serverProperties.getUrl(), + addAuthenticationHeaderFilterFrom(serverProperties) + ); + } + + private Function> createRoute(String segment, String host, GatewayFilter filter) { + return spec -> spec + .path("/" + segment + "/**") + .filters(filterSpec -> filterSpec + .rewritePath("/" + segment + "/(?.*)", "/${segment}") + .filters(filter) + ).uri(host); + } } \ No newline at end of file diff --git a/apps/endringsmelding-frontend/src/main/js/package-lock.json b/apps/endringsmelding-frontend/src/main/js/package-lock.json index f4e4179b166..9fc9a89792c 100644 --- a/apps/endringsmelding-frontend/src/main/js/package-lock.json +++ b/apps/endringsmelding-frontend/src/main/js/package-lock.json @@ -1,35 +1,39 @@ { "name": "endringsmelding-frontend", - "version": "1.2.11", + "version": "1.2.15", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "endringsmelding-frontend", - "version": "1.2.11", + "version": "1.2.15", "dependencies": { "@navikt/dolly-komponenter": "^1.3.33", "@navikt/ds-icons": "^3.4.3", "@navikt/ds-react": "^6.0.0", - "@navikt/fnrvalidator": "^1.3.0", + "@navikt/fnrvalidator": "^2.0.7", "axios": "^1.1.3", "classnames": "^2.3.1", + "cors": "^2.8.5", "dayjs": "^1.11.4", "lodash.throttle": "^4.1.1", "prop-types": "^15.8.1", "react": "^18.2.0", "react-dom": "^18.2.0", - "react-router-dom": "^6.3.0", + "react-router-dom": "^6.22.3", "react-select": "^5.4.0", "styled-components": "^6.0.0" }, "devDependencies": { + "@types/lodash": "^4.14.202", "@types/react": "^18.0.15", "@types/react-dom": "^18.0.6", "@types/react-router-dom": "^5.3.3", "@vitejs/plugin-react": "^4.0.0", "babel-plugin-styled-components": "^2.0.7", + "isomorphic-fetch": "^3.0.0", "less": "^4.1.3", + "lodash": "^4.17.21", "mini-css-extract-plugin": "^2.6.1", "prettier": "^3.0.1", "swr": "^2.0.0", @@ -40,55 +44,55 @@ } }, "node_modules/@ampproject/remapping": { - "version": "2.2.1", - "resolved": "https://registry.npmjs.org/@ampproject/remapping/-/remapping-2.2.1.tgz", - "integrity": "sha512-lFMjJTrFL3j7L9yBxwYfCq2k6qqwHyzuUl/XBnif78PWTJYyL/dfowQHWE3sp6U6ZzqWiiIZnpTMO96zhkjwtg==", + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/@ampproject/remapping/-/remapping-2.3.0.tgz", + "integrity": "sha512-30iZtAPgz+LTIYoeivqYo853f02jBYSd5uGnGpkFV0M3xOt9aN73erkgYAmZU43x4VfqcnLxW9Kpg3R5LC4YYw==", "dev": true, "dependencies": { - "@jridgewell/gen-mapping": "^0.3.0", - "@jridgewell/trace-mapping": "^0.3.9" + "@jridgewell/gen-mapping": "^0.3.5", + "@jridgewell/trace-mapping": "^0.3.24" }, "engines": { "node": ">=6.0.0" } }, "node_modules/@babel/code-frame": { - "version": "7.23.5", - "resolved": "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.23.5.tgz", - "integrity": "sha512-CgH3s1a96LipHCmSUmYFPwY7MNx8C3avkq7i4Wl3cfa662ldtUe4VM1TPXX70pfmrlWTb6jLqTYrZyT2ZTJBgA==", + "version": "7.24.2", + "resolved": "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.24.2.tgz", + "integrity": "sha512-y5+tLQyV8pg3fsiln67BVLD1P13Eg4lh5RW9mF0zUuvLrv9uIQ4MCL+CRT+FTsBlBjcIan6PGsLcBN0m3ClUyQ==", "dependencies": { - "@babel/highlight": "^7.23.4", - "chalk": "^2.4.2" + "@babel/highlight": "^7.24.2", + "picocolors": "^1.0.0" }, "engines": { "node": ">=6.9.0" } }, "node_modules/@babel/compat-data": { - "version": "7.23.5", - "resolved": "https://registry.npmjs.org/@babel/compat-data/-/compat-data-7.23.5.tgz", - "integrity": "sha512-uU27kfDRlhfKl+w1U6vp16IuvSLtjAxdArVXPa9BvLkrr7CYIsxH5adpHObeAGY/41+syctUWOZ140a2Rvkgjw==", + "version": "7.24.1", + "resolved": "https://registry.npmjs.org/@babel/compat-data/-/compat-data-7.24.1.tgz", + "integrity": "sha512-Pc65opHDliVpRHuKfzI+gSA4zcgr65O4cl64fFJIWEEh8JoHIHh0Oez1Eo8Arz8zq/JhgKodQaxEwUPRtZylVA==", "dev": true, "engines": { "node": ">=6.9.0" } }, "node_modules/@babel/core": { - "version": "7.23.9", - "resolved": "https://registry.npmjs.org/@babel/core/-/core-7.23.9.tgz", - "integrity": "sha512-5q0175NOjddqpvvzU+kDiSOAk4PfdO6FvwCWoQ6RO7rTzEe8vlo+4HVfcnAREhD4npMs0e9uZypjTwzZPCf/cw==", + "version": "7.24.3", + "resolved": "https://registry.npmjs.org/@babel/core/-/core-7.24.3.tgz", + "integrity": "sha512-5FcvN1JHw2sHJChotgx8Ek0lyuh4kCKelgMTTqhYJJtloNvUfpAFMeNQUtdlIaktwrSV9LtCdqwk48wL2wBacQ==", "dev": true, "dependencies": { "@ampproject/remapping": "^2.2.0", - "@babel/code-frame": "^7.23.5", - "@babel/generator": "^7.23.6", + "@babel/code-frame": "^7.24.2", + "@babel/generator": "^7.24.1", "@babel/helper-compilation-targets": "^7.23.6", "@babel/helper-module-transforms": "^7.23.3", - "@babel/helpers": "^7.23.9", - "@babel/parser": "^7.23.9", - "@babel/template": "^7.23.9", - "@babel/traverse": "^7.23.9", - "@babel/types": "^7.23.9", + "@babel/helpers": "^7.24.1", + "@babel/parser": "^7.24.1", + "@babel/template": "^7.24.0", + "@babel/traverse": "^7.24.1", + "@babel/types": "^7.24.0", "convert-source-map": "^2.0.0", "debug": "^4.1.0", "gensync": "^1.0.0-beta.2", @@ -104,14 +108,14 @@ } }, "node_modules/@babel/generator": { - "version": "7.23.6", - "resolved": "https://registry.npmjs.org/@babel/generator/-/generator-7.23.6.tgz", - "integrity": "sha512-qrSfCYxYQB5owCmGLbl8XRpX1ytXlpueOb0N0UmQwA073KZxejgQTzAmJezxvpwQD9uGtK2shHdi55QT+MbjIw==", + "version": "7.24.1", + "resolved": "https://registry.npmjs.org/@babel/generator/-/generator-7.24.1.tgz", + "integrity": "sha512-DfCRfZsBcrPEHUfuBMgbJ1Ut01Y/itOs+hY2nFLgqsqXd52/iSiVq5TITtUasIUgm+IIKdY2/1I7auiQOEeC9A==", "dev": true, "dependencies": { - "@babel/types": "^7.23.6", - "@jridgewell/gen-mapping": "^0.3.2", - "@jridgewell/trace-mapping": "^0.3.17", + "@babel/types": "^7.24.0", + "@jridgewell/gen-mapping": "^0.3.5", + "@jridgewell/trace-mapping": "^0.3.25", "jsesc": "^2.5.1" }, "engines": { @@ -181,11 +185,11 @@ } }, "node_modules/@babel/helper-module-imports": { - "version": "7.22.15", - "resolved": "https://registry.npmjs.org/@babel/helper-module-imports/-/helper-module-imports-7.22.15.tgz", - "integrity": "sha512-0pYVBnDKZO2fnSPCrgM/6WMc7eS20Fbok+0r88fp+YtWVLZrp4CkafFGIp+W0VKw4a22sgebPT99y+FDNMdP4w==", + "version": "7.24.3", + "resolved": "https://registry.npmjs.org/@babel/helper-module-imports/-/helper-module-imports-7.24.3.tgz", + "integrity": "sha512-viKb0F9f2s0BCS22QSF308z/+1YWKV/76mwt61NBzS5izMzDPwdq1pTrzf+Li3npBWX9KdQbkeCt1jSAM7lZqg==", "dependencies": { - "@babel/types": "^7.22.15" + "@babel/types": "^7.24.0" }, "engines": { "node": ">=6.9.0" @@ -211,9 +215,9 @@ } }, "node_modules/@babel/helper-plugin-utils": { - "version": "7.22.5", - "resolved": "https://registry.npmjs.org/@babel/helper-plugin-utils/-/helper-plugin-utils-7.22.5.tgz", - "integrity": "sha512-uLls06UVKgFG9QD4OeFYLEGteMIAa5kpTPcFL28yuCIIzsf6ZyKZMllKVOCZFhiZ5ptnwX4mtKdWCBE/uT4amg==", + "version": "7.24.0", + "resolved": "https://registry.npmjs.org/@babel/helper-plugin-utils/-/helper-plugin-utils-7.24.0.tgz", + "integrity": "sha512-9cUznXMG0+FxRuJfvL82QlTqIzhVW9sL0KjMPHhAOOvpQGL8QtdxnBKILjBqxlHyliz0yCa1G903ZXI/FuHy2w==", "dev": true, "engines": { "node": ">=6.9.0" @@ -244,9 +248,9 @@ } }, "node_modules/@babel/helper-string-parser": { - "version": "7.23.4", - "resolved": "https://registry.npmjs.org/@babel/helper-string-parser/-/helper-string-parser-7.23.4.tgz", - "integrity": "sha512-803gmbQdqwdf4olxrX4AJyFBV/RTr3rSmOj0rKwesmzlfhYNDEs+/iOcznzpNWlJlIlTJC2QfPFcHB6DlzdVLQ==", + "version": "7.24.1", + "resolved": "https://registry.npmjs.org/@babel/helper-string-parser/-/helper-string-parser-7.24.1.tgz", + "integrity": "sha512-2ofRCjnnA9y+wk8b9IAREroeUP02KHp431N2mhKniy2yKIDKpbrHv9eXwm8cBeWQYcJmzv5qKCu65P47eCF7CQ==", "engines": { "node": ">=6.9.0" } @@ -269,36 +273,37 @@ } }, "node_modules/@babel/helpers": { - "version": "7.23.9", - "resolved": "https://registry.npmjs.org/@babel/helpers/-/helpers-7.23.9.tgz", - "integrity": "sha512-87ICKgU5t5SzOT7sBMfCOZQ2rHjRU+Pcb9BoILMYz600W6DkVRLFBPwQ18gwUVvggqXivaUakpnxWQGbpywbBQ==", + "version": "7.24.1", + "resolved": "https://registry.npmjs.org/@babel/helpers/-/helpers-7.24.1.tgz", + "integrity": "sha512-BpU09QqEe6ZCHuIHFphEFgvNSrubve1FtyMton26ekZ85gRGi6LrTF7zArARp2YvyFxloeiRmtSCq5sjh1WqIg==", "dev": true, "dependencies": { - "@babel/template": "^7.23.9", - "@babel/traverse": "^7.23.9", - "@babel/types": "^7.23.9" + "@babel/template": "^7.24.0", + "@babel/traverse": "^7.24.1", + "@babel/types": "^7.24.0" }, "engines": { "node": ">=6.9.0" } }, "node_modules/@babel/highlight": { - "version": "7.23.4", - "resolved": "https://registry.npmjs.org/@babel/highlight/-/highlight-7.23.4.tgz", - "integrity": "sha512-acGdbYSfp2WheJoJm/EBBBLh/ID8KDc64ISZ9DYtBmC8/Q204PZJLHyzeB5qMzJ5trcOkybd78M4x2KWsUq++A==", + "version": "7.24.2", + "resolved": "https://registry.npmjs.org/@babel/highlight/-/highlight-7.24.2.tgz", + "integrity": "sha512-Yac1ao4flkTxTteCDZLEvdxg2fZfz1v8M4QpaGypq/WPDqg3ijHYbDfs+LG5hvzSoqaSZ9/Z9lKSP3CjZjv+pA==", "dependencies": { "@babel/helper-validator-identifier": "^7.22.20", "chalk": "^2.4.2", - "js-tokens": "^4.0.0" + "js-tokens": "^4.0.0", + "picocolors": "^1.0.0" }, "engines": { "node": ">=6.9.0" } }, "node_modules/@babel/parser": { - "version": "7.23.9", - "resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.23.9.tgz", - "integrity": "sha512-9tcKgqKbs3xGJ+NtKF2ndOBBLVwPjl1SHxPQkd36r3Dlirw3xWUeGaTbqr7uGZcTaxkVNwc+03SVP7aCdWrTlA==", + "version": "7.24.1", + "resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.24.1.tgz", + "integrity": "sha512-Zo9c7N3xdOIQrNip7Lc9wvRPzlRtovHVE4lkz8WEDr7uYh/GMQhSiIgFxGIArRHYdJE5kxtZjAf8rT0xhdLCzg==", "dev": true, "bin": { "parser": "bin/babel-parser.js" @@ -308,12 +313,12 @@ } }, "node_modules/@babel/plugin-syntax-jsx": { - "version": "7.23.3", - "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-jsx/-/plugin-syntax-jsx-7.23.3.tgz", - "integrity": "sha512-EB2MELswq55OHUoRZLGg/zC7QWUKfNLpE57m/S2yr1uEneIgsTgrSzXP3NXEsMkVn76OlaVVnzN+ugObuYGwhg==", + "version": "7.24.1", + "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-jsx/-/plugin-syntax-jsx-7.24.1.tgz", + "integrity": "sha512-2eCtxZXf+kbkMIsXS4poTvT4Yu5rXiRa+9xGVT56raghjmBTKMpFNc9R4IDiB4emao9eO22Ox7CxuJG7BgExqA==", "dev": true, "dependencies": { - "@babel/helper-plugin-utils": "^7.22.5" + "@babel/helper-plugin-utils": "^7.24.0" }, "engines": { "node": ">=6.9.0" @@ -323,12 +328,12 @@ } }, "node_modules/@babel/plugin-transform-react-jsx-self": { - "version": "7.23.3", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-react-jsx-self/-/plugin-transform-react-jsx-self-7.23.3.tgz", - "integrity": "sha512-qXRvbeKDSfwnlJnanVRp0SfuWE5DQhwQr5xtLBzp56Wabyo+4CMosF6Kfp+eOD/4FYpql64XVJ2W0pVLlJZxOQ==", + "version": "7.24.1", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-react-jsx-self/-/plugin-transform-react-jsx-self-7.24.1.tgz", + "integrity": "sha512-kDJgnPujTmAZ/9q2CN4m2/lRsUUPDvsG3+tSHWUJIzMGTt5U/b/fwWd3RO3n+5mjLrsBrVa5eKFRVSQbi3dF1w==", "dev": true, "dependencies": { - "@babel/helper-plugin-utils": "^7.22.5" + "@babel/helper-plugin-utils": "^7.24.0" }, "engines": { "node": ">=6.9.0" @@ -338,12 +343,12 @@ } }, "node_modules/@babel/plugin-transform-react-jsx-source": { - "version": "7.23.3", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-react-jsx-source/-/plugin-transform-react-jsx-source-7.23.3.tgz", - "integrity": "sha512-91RS0MDnAWDNvGC6Wio5XYkyWI39FMFO+JK9+4AlgaTH+yWwVTsw7/sn6LK0lH7c5F+TFkpv/3LfCJ1Ydwof/g==", + "version": "7.24.1", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-react-jsx-source/-/plugin-transform-react-jsx-source-7.24.1.tgz", + "integrity": "sha512-1v202n7aUq4uXAieRTKcwPzNyphlCuqHHDcdSNc+vdhoTEZcFMh+L5yZuCmGaIO7bs1nJUNfHB89TZyoL48xNA==", "dev": true, "dependencies": { - "@babel/helper-plugin-utils": "^7.22.5" + "@babel/helper-plugin-utils": "^7.24.0" }, "engines": { "node": ">=6.9.0" @@ -353,9 +358,9 @@ } }, "node_modules/@babel/runtime": { - "version": "7.23.9", - "resolved": "https://registry.npmjs.org/@babel/runtime/-/runtime-7.23.9.tgz", - "integrity": "sha512-0CX6F+BI2s9dkUqr08KFrAIZgNFj75rdBU/DjCyYLIaV/quFjkk6T+EJ2LkZHyZTbEV4L5p97mNkUsHl2wLFAw==", + "version": "7.24.1", + "resolved": "https://registry.npmjs.org/@babel/runtime/-/runtime-7.24.1.tgz", + "integrity": "sha512-+BIznRzyqBf+2wCTxcKE3wDjfGeCoVE61KSHGpkzqrLi8qxqFwBeUFyId2cxkTmm55fzDGnm0+yCxaxygrLUnQ==", "dependencies": { "regenerator-runtime": "^0.14.0" }, @@ -364,33 +369,33 @@ } }, "node_modules/@babel/template": { - "version": "7.23.9", - "resolved": "https://registry.npmjs.org/@babel/template/-/template-7.23.9.tgz", - "integrity": "sha512-+xrD2BWLpvHKNmX2QbpdpsBaWnRxahMwJjO+KZk2JOElj5nSmKezyS1B4u+QbHMTX69t4ukm6hh9lsYQ7GHCKA==", + "version": "7.24.0", + "resolved": "https://registry.npmjs.org/@babel/template/-/template-7.24.0.tgz", + "integrity": "sha512-Bkf2q8lMB0AFpX0NFEqSbx1OkTHf0f+0j82mkw+ZpzBnkk7e9Ql0891vlfgi+kHwOk8tQjiQHpqh4LaSa0fKEA==", "dev": true, "dependencies": { "@babel/code-frame": "^7.23.5", - "@babel/parser": "^7.23.9", - "@babel/types": "^7.23.9" + "@babel/parser": "^7.24.0", + "@babel/types": "^7.24.0" }, "engines": { "node": ">=6.9.0" } }, "node_modules/@babel/traverse": { - "version": "7.23.9", - "resolved": "https://registry.npmjs.org/@babel/traverse/-/traverse-7.23.9.tgz", - "integrity": "sha512-I/4UJ9vs90OkBtY6iiiTORVMyIhJ4kAVmsKo9KFc8UOxMeUfi2hvtIBsET5u9GizXE6/GFSuKCTNfgCswuEjRg==", + "version": "7.24.1", + "resolved": "https://registry.npmjs.org/@babel/traverse/-/traverse-7.24.1.tgz", + "integrity": "sha512-xuU6o9m68KeqZbQuDt2TcKSxUw/mrsvavlEqQ1leZ/B+C9tk6E4sRWy97WaXgvq5E+nU3cXMxv3WKOCanVMCmQ==", "dev": true, "dependencies": { - "@babel/code-frame": "^7.23.5", - "@babel/generator": "^7.23.6", + "@babel/code-frame": "^7.24.1", + "@babel/generator": "^7.24.1", "@babel/helper-environment-visitor": "^7.22.20", "@babel/helper-function-name": "^7.23.0", "@babel/helper-hoist-variables": "^7.22.5", "@babel/helper-split-export-declaration": "^7.22.6", - "@babel/parser": "^7.23.9", - "@babel/types": "^7.23.9", + "@babel/parser": "^7.24.1", + "@babel/types": "^7.24.0", "debug": "^4.3.1", "globals": "^11.1.0" }, @@ -399,9 +404,9 @@ } }, "node_modules/@babel/types": { - "version": "7.23.9", - "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.23.9.tgz", - "integrity": "sha512-dQjSq/7HaSjRM43FFGnv5keM2HsxpmyV1PfaSVm0nzzjwwTmjOe6J4bC8e3+pTEIgHaHj+1ZlLThRJ2auc/w1Q==", + "version": "7.24.0", + "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.24.0.tgz", + "integrity": "sha512-+j7a5c253RfKh8iABBhywc8NSfP5LURe7Uh4qpsh6jc+aLJguvmIUBdjSdEMQv2bENrCR5MfRdjGo7vzS/ob7w==", "dependencies": { "@babel/helper-string-parser": "^7.23.4", "@babel/helper-validator-identifier": "^7.22.20", @@ -484,9 +489,9 @@ "integrity": "sha512-W2P2c/VRW1/1tLox0mVUalvnWXxavmv/Oum2aPsRcoDJuob75FC3Y8FbpfLwUegRcxINtGUMPq0tFCvYNTBXNA==" }, "node_modules/@emotion/react": { - "version": "11.11.3", - "resolved": "https://registry.npmjs.org/@emotion/react/-/react-11.11.3.tgz", - "integrity": "sha512-Cnn0kuq4DoONOMcnoVsTOR8E+AdnKFf//6kUWc4LCdnxj31pZWn7rIULd6Y7/Js1PiPHzn7SKCM9vB/jBni8eA==", + "version": "11.11.4", + "resolved": "https://registry.npmjs.org/@emotion/react/-/react-11.11.4.tgz", + "integrity": "sha512-t8AjMlF0gHpvvxk5mAtCqR4vmxiGHCeJBaQO6gncUSdklELOgtwjerNY2yuJNfwnc6vi16U/+uMF+afIawJ9iw==", "dependencies": { "@babel/runtime": "^7.18.3", "@emotion/babel-plugin": "^11.11.0", @@ -547,9 +552,9 @@ "integrity": "sha512-EsBwpc7hBUJWAsNPBmJy4hxWx12v6bshQsldrVmjxJoc3isbxhOrF2IcCpaXxfvq03NwkI7sbsOLXbYuqF/8Ww==" }, "node_modules/@esbuild/aix-ppc64": { - "version": "0.19.12", - "resolved": "https://registry.npmjs.org/@esbuild/aix-ppc64/-/aix-ppc64-0.19.12.tgz", - "integrity": "sha512-bmoCYyWdEL3wDQIVbcyzRyeKLgk2WtWLTWz1ZIAZF/EGbNOwSA6ew3PftJ1PqMiOOGu0OyFMzG53L0zqIpPeNA==", + "version": "0.20.2", + "resolved": "https://registry.npmjs.org/@esbuild/aix-ppc64/-/aix-ppc64-0.20.2.tgz", + "integrity": "sha512-D+EBOJHXdNZcLJRBkhENNG8Wji2kgc9AZ9KiPr1JuZjsNtyHzrsfLRrY0tk2H2aoFu6RANO1y1iPPUCDYWkb5g==", "cpu": [ "ppc64" ], @@ -563,9 +568,9 @@ } }, "node_modules/@esbuild/android-arm": { - "version": "0.19.12", - "resolved": "https://registry.npmjs.org/@esbuild/android-arm/-/android-arm-0.19.12.tgz", - "integrity": "sha512-qg/Lj1mu3CdQlDEEiWrlC4eaPZ1KztwGJ9B6J+/6G+/4ewxJg7gqj8eVYWvao1bXrqGiW2rsBZFSX3q2lcW05w==", + "version": "0.20.2", + "resolved": "https://registry.npmjs.org/@esbuild/android-arm/-/android-arm-0.20.2.tgz", + "integrity": "sha512-t98Ra6pw2VaDhqNWO2Oph2LXbz/EJcnLmKLGBJwEwXX/JAN83Fym1rU8l0JUWK6HkIbWONCSSatf4sf2NBRx/w==", "cpu": [ "arm" ], @@ -579,9 +584,9 @@ } }, "node_modules/@esbuild/android-arm64": { - "version": "0.19.12", - "resolved": "https://registry.npmjs.org/@esbuild/android-arm64/-/android-arm64-0.19.12.tgz", - "integrity": "sha512-P0UVNGIienjZv3f5zq0DP3Nt2IE/3plFzuaS96vihvD0Hd6H/q4WXUGpCxD/E8YrSXfNyRPbpTq+T8ZQioSuPA==", + "version": "0.20.2", + "resolved": "https://registry.npmjs.org/@esbuild/android-arm64/-/android-arm64-0.20.2.tgz", + "integrity": "sha512-mRzjLacRtl/tWU0SvD8lUEwb61yP9cqQo6noDZP/O8VkwafSYwZ4yWy24kan8jE/IMERpYncRt2dw438LP3Xmg==", "cpu": [ "arm64" ], @@ -595,9 +600,9 @@ } }, "node_modules/@esbuild/android-x64": { - "version": "0.19.12", - "resolved": "https://registry.npmjs.org/@esbuild/android-x64/-/android-x64-0.19.12.tgz", - "integrity": "sha512-3k7ZoUW6Q6YqhdhIaq/WZ7HwBpnFBlW905Fa4s4qWJyiNOgT1dOqDiVAQFwBH7gBRZr17gLrlFCRzF6jFh7Kew==", + "version": "0.20.2", + "resolved": "https://registry.npmjs.org/@esbuild/android-x64/-/android-x64-0.20.2.tgz", + "integrity": "sha512-btzExgV+/lMGDDa194CcUQm53ncxzeBrWJcncOBxuC6ndBkKxnHdFJn86mCIgTELsooUmwUm9FkhSp5HYu00Rg==", "cpu": [ "x64" ], @@ -611,9 +616,9 @@ } }, "node_modules/@esbuild/darwin-arm64": { - "version": "0.19.12", - "resolved": "https://registry.npmjs.org/@esbuild/darwin-arm64/-/darwin-arm64-0.19.12.tgz", - "integrity": "sha512-B6IeSgZgtEzGC42jsI+YYu9Z3HKRxp8ZT3cqhvliEHovq8HSX2YX8lNocDn79gCKJXOSaEot9MVYky7AKjCs8g==", + "version": "0.20.2", + "resolved": "https://registry.npmjs.org/@esbuild/darwin-arm64/-/darwin-arm64-0.20.2.tgz", + "integrity": "sha512-4J6IRT+10J3aJH3l1yzEg9y3wkTDgDk7TSDFX+wKFiWjqWp/iCfLIYzGyasx9l0SAFPT1HwSCR+0w/h1ES/MjA==", "cpu": [ "arm64" ], @@ -627,9 +632,9 @@ } }, "node_modules/@esbuild/darwin-x64": { - "version": "0.19.12", - "resolved": "https://registry.npmjs.org/@esbuild/darwin-x64/-/darwin-x64-0.19.12.tgz", - "integrity": "sha512-hKoVkKzFiToTgn+41qGhsUJXFlIjxI/jSYeZf3ugemDYZldIXIxhvwN6erJGlX4t5h417iFuheZ7l+YVn05N3A==", + "version": "0.20.2", + "resolved": "https://registry.npmjs.org/@esbuild/darwin-x64/-/darwin-x64-0.20.2.tgz", + "integrity": "sha512-tBcXp9KNphnNH0dfhv8KYkZhjc+H3XBkF5DKtswJblV7KlT9EI2+jeA8DgBjp908WEuYll6pF+UStUCfEpdysA==", "cpu": [ "x64" ], @@ -643,9 +648,9 @@ } }, "node_modules/@esbuild/freebsd-arm64": { - "version": "0.19.12", - "resolved": "https://registry.npmjs.org/@esbuild/freebsd-arm64/-/freebsd-arm64-0.19.12.tgz", - "integrity": "sha512-4aRvFIXmwAcDBw9AueDQ2YnGmz5L6obe5kmPT8Vd+/+x/JMVKCgdcRwH6APrbpNXsPz+K653Qg8HB/oXvXVukA==", + "version": "0.20.2", + "resolved": "https://registry.npmjs.org/@esbuild/freebsd-arm64/-/freebsd-arm64-0.20.2.tgz", + "integrity": "sha512-d3qI41G4SuLiCGCFGUrKsSeTXyWG6yem1KcGZVS+3FYlYhtNoNgYrWcvkOoaqMhwXSMrZRl69ArHsGJ9mYdbbw==", "cpu": [ "arm64" ], @@ -659,9 +664,9 @@ } }, "node_modules/@esbuild/freebsd-x64": { - "version": "0.19.12", - "resolved": "https://registry.npmjs.org/@esbuild/freebsd-x64/-/freebsd-x64-0.19.12.tgz", - "integrity": "sha512-EYoXZ4d8xtBoVN7CEwWY2IN4ho76xjYXqSXMNccFSx2lgqOG/1TBPW0yPx1bJZk94qu3tX0fycJeeQsKovA8gg==", + "version": "0.20.2", + "resolved": "https://registry.npmjs.org/@esbuild/freebsd-x64/-/freebsd-x64-0.20.2.tgz", + "integrity": "sha512-d+DipyvHRuqEeM5zDivKV1KuXn9WeRX6vqSqIDgwIfPQtwMP4jaDsQsDncjTDDsExT4lR/91OLjRo8bmC1e+Cw==", "cpu": [ "x64" ], @@ -675,9 +680,9 @@ } }, "node_modules/@esbuild/linux-arm": { - "version": "0.19.12", - "resolved": "https://registry.npmjs.org/@esbuild/linux-arm/-/linux-arm-0.19.12.tgz", - "integrity": "sha512-J5jPms//KhSNv+LO1S1TX1UWp1ucM6N6XuL6ITdKWElCu8wXP72l9MM0zDTzzeikVyqFE6U8YAV9/tFyj0ti+w==", + "version": "0.20.2", + "resolved": "https://registry.npmjs.org/@esbuild/linux-arm/-/linux-arm-0.20.2.tgz", + "integrity": "sha512-VhLPeR8HTMPccbuWWcEUD1Az68TqaTYyj6nfE4QByZIQEQVWBB8vup8PpR7y1QHL3CpcF6xd5WVBU/+SBEvGTg==", "cpu": [ "arm" ], @@ -691,9 +696,9 @@ } }, "node_modules/@esbuild/linux-arm64": { - "version": "0.19.12", - "resolved": "https://registry.npmjs.org/@esbuild/linux-arm64/-/linux-arm64-0.19.12.tgz", - "integrity": "sha512-EoTjyYyLuVPfdPLsGVVVC8a0p1BFFvtpQDB/YLEhaXyf/5bczaGeN15QkR+O4S5LeJ92Tqotve7i1jn35qwvdA==", + "version": "0.20.2", + "resolved": "https://registry.npmjs.org/@esbuild/linux-arm64/-/linux-arm64-0.20.2.tgz", + "integrity": "sha512-9pb6rBjGvTFNira2FLIWqDk/uaf42sSyLE8j1rnUpuzsODBq7FvpwHYZxQ/It/8b+QOS1RYfqgGFNLRI+qlq2A==", "cpu": [ "arm64" ], @@ -707,9 +712,9 @@ } }, "node_modules/@esbuild/linux-ia32": { - "version": "0.19.12", - "resolved": "https://registry.npmjs.org/@esbuild/linux-ia32/-/linux-ia32-0.19.12.tgz", - "integrity": "sha512-Thsa42rrP1+UIGaWz47uydHSBOgTUnwBwNq59khgIwktK6x60Hivfbux9iNR0eHCHzOLjLMLfUMLCypBkZXMHA==", + "version": "0.20.2", + "resolved": "https://registry.npmjs.org/@esbuild/linux-ia32/-/linux-ia32-0.20.2.tgz", + "integrity": "sha512-o10utieEkNPFDZFQm9CoP7Tvb33UutoJqg3qKf1PWVeeJhJw0Q347PxMvBgVVFgouYLGIhFYG0UGdBumROyiig==", "cpu": [ "ia32" ], @@ -723,9 +728,9 @@ } }, "node_modules/@esbuild/linux-loong64": { - "version": "0.19.12", - "resolved": "https://registry.npmjs.org/@esbuild/linux-loong64/-/linux-loong64-0.19.12.tgz", - "integrity": "sha512-LiXdXA0s3IqRRjm6rV6XaWATScKAXjI4R4LoDlvO7+yQqFdlr1Bax62sRwkVvRIrwXxvtYEHHI4dm50jAXkuAA==", + "version": "0.20.2", + "resolved": "https://registry.npmjs.org/@esbuild/linux-loong64/-/linux-loong64-0.20.2.tgz", + "integrity": "sha512-PR7sp6R/UC4CFVomVINKJ80pMFlfDfMQMYynX7t1tNTeivQ6XdX5r2XovMmha/VjR1YN/HgHWsVcTRIMkymrgQ==", "cpu": [ "loong64" ], @@ -739,9 +744,9 @@ } }, "node_modules/@esbuild/linux-mips64el": { - "version": "0.19.12", - "resolved": "https://registry.npmjs.org/@esbuild/linux-mips64el/-/linux-mips64el-0.19.12.tgz", - "integrity": "sha512-fEnAuj5VGTanfJ07ff0gOA6IPsvrVHLVb6Lyd1g2/ed67oU1eFzL0r9WL7ZzscD+/N6i3dWumGE1Un4f7Amf+w==", + "version": "0.20.2", + "resolved": "https://registry.npmjs.org/@esbuild/linux-mips64el/-/linux-mips64el-0.20.2.tgz", + "integrity": "sha512-4BlTqeutE/KnOiTG5Y6Sb/Hw6hsBOZapOVF6njAESHInhlQAghVVZL1ZpIctBOoTFbQyGW+LsVYZ8lSSB3wkjA==", "cpu": [ "mips64el" ], @@ -755,9 +760,9 @@ } }, "node_modules/@esbuild/linux-ppc64": { - "version": "0.19.12", - "resolved": "https://registry.npmjs.org/@esbuild/linux-ppc64/-/linux-ppc64-0.19.12.tgz", - "integrity": "sha512-nYJA2/QPimDQOh1rKWedNOe3Gfc8PabU7HT3iXWtNUbRzXS9+vgB0Fjaqr//XNbd82mCxHzik2qotuI89cfixg==", + "version": "0.20.2", + "resolved": "https://registry.npmjs.org/@esbuild/linux-ppc64/-/linux-ppc64-0.20.2.tgz", + "integrity": "sha512-rD3KsaDprDcfajSKdn25ooz5J5/fWBylaaXkuotBDGnMnDP1Uv5DLAN/45qfnf3JDYyJv/ytGHQaziHUdyzaAg==", "cpu": [ "ppc64" ], @@ -771,9 +776,9 @@ } }, "node_modules/@esbuild/linux-riscv64": { - "version": "0.19.12", - "resolved": "https://registry.npmjs.org/@esbuild/linux-riscv64/-/linux-riscv64-0.19.12.tgz", - "integrity": "sha512-2MueBrlPQCw5dVJJpQdUYgeqIzDQgw3QtiAHUC4RBz9FXPrskyyU3VI1hw7C0BSKB9OduwSJ79FTCqtGMWqJHg==", + "version": "0.20.2", + "resolved": "https://registry.npmjs.org/@esbuild/linux-riscv64/-/linux-riscv64-0.20.2.tgz", + "integrity": "sha512-snwmBKacKmwTMmhLlz/3aH1Q9T8v45bKYGE3j26TsaOVtjIag4wLfWSiZykXzXuE1kbCE+zJRmwp+ZbIHinnVg==", "cpu": [ "riscv64" ], @@ -787,9 +792,9 @@ } }, "node_modules/@esbuild/linux-s390x": { - "version": "0.19.12", - "resolved": "https://registry.npmjs.org/@esbuild/linux-s390x/-/linux-s390x-0.19.12.tgz", - "integrity": "sha512-+Pil1Nv3Umes4m3AZKqA2anfhJiVmNCYkPchwFJNEJN5QxmTs1uzyy4TvmDrCRNT2ApwSari7ZIgrPeUx4UZDg==", + "version": "0.20.2", + "resolved": "https://registry.npmjs.org/@esbuild/linux-s390x/-/linux-s390x-0.20.2.tgz", + "integrity": "sha512-wcWISOobRWNm3cezm5HOZcYz1sKoHLd8VL1dl309DiixxVFoFe/o8HnwuIwn6sXre88Nwj+VwZUvJf4AFxkyrQ==", "cpu": [ "s390x" ], @@ -803,9 +808,9 @@ } }, "node_modules/@esbuild/linux-x64": { - "version": "0.19.12", - "resolved": "https://registry.npmjs.org/@esbuild/linux-x64/-/linux-x64-0.19.12.tgz", - "integrity": "sha512-B71g1QpxfwBvNrfyJdVDexenDIt1CiDN1TIXLbhOw0KhJzE78KIFGX6OJ9MrtC0oOqMWf+0xop4qEU8JrJTwCg==", + "version": "0.20.2", + "resolved": "https://registry.npmjs.org/@esbuild/linux-x64/-/linux-x64-0.20.2.tgz", + "integrity": "sha512-1MdwI6OOTsfQfek8sLwgyjOXAu+wKhLEoaOLTjbijk6E2WONYpH9ZU2mNtR+lZ2B4uwr+usqGuVfFT9tMtGvGw==", "cpu": [ "x64" ], @@ -819,9 +824,9 @@ } }, "node_modules/@esbuild/netbsd-x64": { - "version": "0.19.12", - "resolved": "https://registry.npmjs.org/@esbuild/netbsd-x64/-/netbsd-x64-0.19.12.tgz", - "integrity": "sha512-3ltjQ7n1owJgFbuC61Oj++XhtzmymoCihNFgT84UAmJnxJfm4sYCiSLTXZtE00VWYpPMYc+ZQmB6xbSdVh0JWA==", + "version": "0.20.2", + "resolved": "https://registry.npmjs.org/@esbuild/netbsd-x64/-/netbsd-x64-0.20.2.tgz", + "integrity": "sha512-K8/DhBxcVQkzYc43yJXDSyjlFeHQJBiowJ0uVL6Tor3jGQfSGHNNJcWxNbOI8v5k82prYqzPuwkzHt3J1T1iZQ==", "cpu": [ "x64" ], @@ -835,9 +840,9 @@ } }, "node_modules/@esbuild/openbsd-x64": { - "version": "0.19.12", - "resolved": "https://registry.npmjs.org/@esbuild/openbsd-x64/-/openbsd-x64-0.19.12.tgz", - "integrity": "sha512-RbrfTB9SWsr0kWmb9srfF+L933uMDdu9BIzdA7os2t0TXhCRjrQyCeOt6wVxr79CKD4c+p+YhCj31HBkYcXebw==", + "version": "0.20.2", + "resolved": "https://registry.npmjs.org/@esbuild/openbsd-x64/-/openbsd-x64-0.20.2.tgz", + "integrity": "sha512-eMpKlV0SThJmmJgiVyN9jTPJ2VBPquf6Kt/nAoo6DgHAoN57K15ZghiHaMvqjCye/uU4X5u3YSMgVBI1h3vKrQ==", "cpu": [ "x64" ], @@ -851,9 +856,9 @@ } }, "node_modules/@esbuild/sunos-x64": { - "version": "0.19.12", - "resolved": "https://registry.npmjs.org/@esbuild/sunos-x64/-/sunos-x64-0.19.12.tgz", - "integrity": "sha512-HKjJwRrW8uWtCQnQOz9qcU3mUZhTUQvi56Q8DPTLLB+DawoiQdjsYq+j+D3s9I8VFtDr+F9CjgXKKC4ss89IeA==", + "version": "0.20.2", + "resolved": "https://registry.npmjs.org/@esbuild/sunos-x64/-/sunos-x64-0.20.2.tgz", + "integrity": "sha512-2UyFtRC6cXLyejf/YEld4Hajo7UHILetzE1vsRcGL3earZEW77JxrFjH4Ez2qaTiEfMgAXxfAZCm1fvM/G/o8w==", "cpu": [ "x64" ], @@ -867,9 +872,9 @@ } }, "node_modules/@esbuild/win32-arm64": { - "version": "0.19.12", - "resolved": "https://registry.npmjs.org/@esbuild/win32-arm64/-/win32-arm64-0.19.12.tgz", - "integrity": "sha512-URgtR1dJnmGvX864pn1B2YUYNzjmXkuJOIqG2HdU62MVS4EHpU2946OZoTMnRUHklGtJdJZ33QfzdjGACXhn1A==", + "version": "0.20.2", + "resolved": "https://registry.npmjs.org/@esbuild/win32-arm64/-/win32-arm64-0.20.2.tgz", + "integrity": "sha512-GRibxoawM9ZCnDxnP3usoUDO9vUkpAxIIZ6GQI+IlVmr5kP3zUq+l17xELTHMWTWzjxa2guPNyrpq1GWmPvcGQ==", "cpu": [ "arm64" ], @@ -883,9 +888,9 @@ } }, "node_modules/@esbuild/win32-ia32": { - "version": "0.19.12", - "resolved": "https://registry.npmjs.org/@esbuild/win32-ia32/-/win32-ia32-0.19.12.tgz", - "integrity": "sha512-+ZOE6pUkMOJfmxmBZElNOx72NKpIa/HFOMGzu8fqzQJ5kgf6aTGrcJaFsNiVMH4JKpMipyK+7k0n2UXN7a8YKQ==", + "version": "0.20.2", + "resolved": "https://registry.npmjs.org/@esbuild/win32-ia32/-/win32-ia32-0.20.2.tgz", + "integrity": "sha512-HfLOfn9YWmkSKRQqovpnITazdtquEW8/SoHW7pWpuEeguaZI4QnCRW6b+oZTztdBnZOS2hqJ6im/D5cPzBTTlQ==", "cpu": [ "ia32" ], @@ -899,9 +904,9 @@ } }, "node_modules/@esbuild/win32-x64": { - "version": "0.19.12", - "resolved": "https://registry.npmjs.org/@esbuild/win32-x64/-/win32-x64-0.19.12.tgz", - "integrity": "sha512-T1QyPSDCyMXaO3pzBkF96E8xMkiRYbUEZADd29SyPGabqxMViNoii+NcK7eWJAEoU6RZyEm5lVSIjTmcdoB9HA==", + "version": "0.20.2", + "resolved": "https://registry.npmjs.org/@esbuild/win32-x64/-/win32-x64-0.20.2.tgz", + "integrity": "sha512-N49X4lJX27+l9jbLKSqZ6bKNjzQvHaT8IIFUy+YIqmXQdjYCToGWwOItDrfby14c78aDd5NHQl29xingXfCdLQ==", "cpu": [ "x64" ], @@ -973,14 +978,14 @@ "integrity": "sha512-OfX7E2oUDYxtBvsuS4e/jSn4Q9Qb6DzgeYtsAdkPZ47znpoNsMgZw0+tVijiv3uGNR6dgNlty6r9rzIzHjtd/A==" }, "node_modules/@jridgewell/gen-mapping": { - "version": "0.3.3", - "resolved": "https://registry.npmjs.org/@jridgewell/gen-mapping/-/gen-mapping-0.3.3.tgz", - "integrity": "sha512-HLhSWOLRi875zjjMG/r+Nv0oCW8umGb0BgEhyX3dDX3egwZtB8PqLnjz3yedt8R5StBrzcg4aBpnh8UA9D1BoQ==", + "version": "0.3.5", + "resolved": "https://registry.npmjs.org/@jridgewell/gen-mapping/-/gen-mapping-0.3.5.tgz", + "integrity": "sha512-IzL8ZoEDIBRWEzlCcRhOaCupYyN5gdIK+Q6fbFdPDg6HqX6jpkItn7DFIpW9LQzXG6Df9sA7+OKnq0qlz/GaQg==", "dev": true, "dependencies": { - "@jridgewell/set-array": "^1.0.1", + "@jridgewell/set-array": "^1.2.1", "@jridgewell/sourcemap-codec": "^1.4.10", - "@jridgewell/trace-mapping": "^0.3.9" + "@jridgewell/trace-mapping": "^0.3.24" }, "engines": { "node": ">=6.0.0" @@ -996,23 +1001,23 @@ } }, "node_modules/@jridgewell/set-array": { - "version": "1.1.2", - "resolved": "https://registry.npmjs.org/@jridgewell/set-array/-/set-array-1.1.2.tgz", - "integrity": "sha512-xnkseuNADM0gt2bs+BvhO0p78Mk762YnZdsuzFV018NoG1Sj1SCQvpSqa7XUaTam5vAGasABV9qXASMKnFMwMw==", + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/@jridgewell/set-array/-/set-array-1.2.1.tgz", + "integrity": "sha512-R8gLRTZeyp03ymzP/6Lil/28tGeGEzhx1q2k703KGWRAI1VdvPIXdG70VJc2pAMw3NA6JKL5hhFu1sJX0Mnn/A==", "dev": true, "engines": { "node": ">=6.0.0" } }, "node_modules/@jridgewell/source-map": { - "version": "0.3.5", - "resolved": "https://registry.npmjs.org/@jridgewell/source-map/-/source-map-0.3.5.tgz", - "integrity": "sha512-UTYAUj/wviwdsMfzoSJspJxbkH5o1snzwX0//0ENX1u/55kkZZkcTZP6u9bwKGkv+dkk9at4m1Cpt0uY80kcpQ==", + "version": "0.3.6", + "resolved": "https://registry.npmjs.org/@jridgewell/source-map/-/source-map-0.3.6.tgz", + "integrity": "sha512-1ZJTZebgqllO79ue2bm3rIGud/bOe0pP5BjSRCRxxYkEZS8STV7zN84UBbiYu7jy+eCKSnVIUgoWWE/tt+shMQ==", "dev": true, "peer": true, "dependencies": { - "@jridgewell/gen-mapping": "^0.3.0", - "@jridgewell/trace-mapping": "^0.3.9" + "@jridgewell/gen-mapping": "^0.3.5", + "@jridgewell/trace-mapping": "^0.3.25" } }, "node_modules/@jridgewell/sourcemap-codec": { @@ -1022,9 +1027,9 @@ "dev": true }, "node_modules/@jridgewell/trace-mapping": { - "version": "0.3.22", - "resolved": "https://registry.npmjs.org/@jridgewell/trace-mapping/-/trace-mapping-0.3.22.tgz", - "integrity": "sha512-Wf963MzWtA2sjrNt+g18IAln9lKnlRp+K2eH4jjIoF1wYeq3aMREpG09xhlhdzS0EjwU7qmUJYangWa+151vZw==", + "version": "0.3.25", + "resolved": "https://registry.npmjs.org/@jridgewell/trace-mapping/-/trace-mapping-0.3.25.tgz", + "integrity": "sha512-vNk6aEwybGtawWmy/PzwnGDOjCkLWSD2wqvjGGAgOAwCGWySYXfYoxt00IJkTF+8Lb57DwOb3Aa0o9CApepiYQ==", "dev": true, "dependencies": { "@jridgewell/resolve-uri": "^3.1.0", @@ -1032,9 +1037,9 @@ } }, "node_modules/@navikt/aksel-icons": { - "version": "6.0.0", - "resolved": "https://npm.pkg.github.com/download/@navikt/aksel-icons/6.0.0/c43fb02f061aea1df175436345cae28d83ac8c46", - "integrity": "sha512-41U7tHtCfoBPoEO1FGYl2p8yDvtXOtR6CJ9d4qFbM2Wii7vt50D994W7u4Z11K3PbLKCGcHFlAPbkXU9LQvujA==" + "version": "6.3.3", + "resolved": "https://npm.pkg.github.com/download/@navikt/aksel-icons/6.3.3/251b544c7aea1904c7d11341fbc999e6b7e6e3e1", + "integrity": "sha512-DRWDvqJCPc1kYTjJwzv6sw5Bxf6DfHortkYDUtFSriwvXRaL1DM1/LxPtpu+fkMlCIBBioGps8CHZzRpg7Q8UQ==" }, "node_modules/@navikt/dolly-assets": { "version": "1.2.15", @@ -1076,9 +1081,9 @@ "integrity": "sha512-9cuullCMapcPoIPOad2j6DkOr8ZWCm9zxRv5n+2EOAD7y3Ex4bVgJgSHSgc4bvB2Td4ApWyhTocQvyo2OfjSHg==" }, "node_modules/@navikt/ds-css": { - "version": "6.0.0", - "resolved": "https://npm.pkg.github.com/download/@navikt/ds-css/6.0.0/0943c7f430f62d5bbd64c21b6dd0fb19a1eb375a", - "integrity": "sha512-r54/kB9CYWvHFht1qUhy9iySzJU9OkzvGR8X1SMmLIHddI4GrZPfRbgtRZhFFCTl7b+ilnav6iETNgZ4tRfChw==" + "version": "6.3.3", + "resolved": "https://npm.pkg.github.com/download/@navikt/ds-css/6.3.3/86285e2560cc1c06a9fdac1baf34415dcf7808dd", + "integrity": "sha512-Rpm71ivCpJ5CQuItrIKCe7h/tSnjqnZh9+DS1Mq3LUXaAEdBa1wIg1wF8Eqximy3QcObcO/tRwEkMcFxKe4xLQ==" }, "node_modules/@navikt/ds-icons": { "version": "3.4.3", @@ -1090,13 +1095,13 @@ } }, "node_modules/@navikt/ds-react": { - "version": "6.0.0", - "resolved": "https://npm.pkg.github.com/download/@navikt/ds-react/6.0.0/715b264e3a69856666fc1409ad85477c136b86b5", - "integrity": "sha512-/791FxO1L+d/G8qSpjCHAYsYcHxhRXY/lFEUScWDEOkLQt63pr3qnpjKyNX1cc2PsJVj5AAAMWiO09o4J9g/vg==", + "version": "6.3.3", + "resolved": "https://npm.pkg.github.com/download/@navikt/ds-react/6.3.3/b432ae6ff3940ea88951a467923d96ff53b16b96", + "integrity": "sha512-iOCX4zO/CB6yM5GxTBDd8yl/sFe7QP2aNMxgA2uqH6l4S+tX1T7CKnMyUhxWrYTgGYFbjAaEppj77q2Gjokvkg==", "dependencies": { "@floating-ui/react": "0.25.4", - "@navikt/aksel-icons": "^6.0.0", - "@navikt/ds-tokens": "^6.0.0", + "@navikt/aksel-icons": "^6.3.3", + "@navikt/ds-tokens": "^6.3.3", "@radix-ui/react-tabs": "1.0.0", "@radix-ui/react-toggle-group": "1.0.0", "clsx": "^2.1.0", @@ -1109,14 +1114,17 @@ } }, "node_modules/@navikt/ds-tokens": { - "version": "6.0.0", - "resolved": "https://npm.pkg.github.com/download/@navikt/ds-tokens/6.0.0/d362b06543941efa9b8f5df9d179d372ff792e02", - "integrity": "sha512-CLjtNMhW0LpAutfU5SuW35Vic+MUsB3d9d8Pu3A9rdqnOOqLK1PWrHRTmW+MJpbKA53kF0vbAApw/fAaUqvkoQ==" + "version": "6.3.3", + "resolved": "https://npm.pkg.github.com/download/@navikt/ds-tokens/6.3.3/d6403f08c3aa389e917b6fbb962ded0c5ce6f603", + "integrity": "sha512-EArixE4zSCbkqAYh2iQarsWtTl80yhcKrkAyPlQHrUr19EeRLJIRBQW+lnSiGFMXe+jh7ZUqsHeY1mDOr693Eg==" }, "node_modules/@navikt/fnrvalidator": { - "version": "1.3.3", - "resolved": "https://npm.pkg.github.com/download/@navikt/fnrvalidator/1.3.3/8414963a30e59e3056c9befea7bb022498a2a742", - "integrity": "sha512-GsLa9ioYPGsDMBHcgKUNoYbZor09KyFIqSaWy8jy1I7f06q6DgUhdpZuRTHLVRCPjWqF2aLzKtvAfrw5dSeakg==" + "version": "2.0.7", + "resolved": "https://npm.pkg.github.com/download/@navikt/fnrvalidator/2.0.7/89ceb6a448fbd068e4ad8ff7a414705bd0ea6315", + "integrity": "sha512-3TQ2NLUk1rstZEoF65r9dr4RZxvmBEcXNKfA1dcZNpLw0SAb89WwcRpUrZMhd+7UdrfmKvfoTBvsfBwMoP9cyw==", + "dependencies": { + "typescript": "^5.4.2" + } }, "node_modules/@popperjs/core": { "version": "2.11.8", @@ -1346,9 +1354,9 @@ } }, "node_modules/@remix-run/router": { - "version": "1.15.1", - "resolved": "https://registry.npmjs.org/@remix-run/router/-/router-1.15.1.tgz", - "integrity": "sha512-zcU0gM3z+3iqj8UX45AmWY810l3oUmXM7uH4dt5xtzvMhRtYVhKGOmgOd1877dOPPepfCjUv57w+syamWIYe7w==", + "version": "1.15.3", + "resolved": "https://registry.npmjs.org/@remix-run/router/-/router-1.15.3.tgz", + "integrity": "sha512-Oy8rmScVrVxWZVOpEF57ovlnhpZ8CCPlnIIumVcV9nFdiSIrus99+Lw78ekXyGvVDlIsFJbSfmSovJUhCWYV3w==", "engines": { "node": ">=14.0.0" } @@ -1375,9 +1383,9 @@ } }, "node_modules/@rollup/rollup-android-arm-eabi": { - "version": "4.12.0", - "resolved": "https://registry.npmjs.org/@rollup/rollup-android-arm-eabi/-/rollup-android-arm-eabi-4.12.0.tgz", - "integrity": "sha512-+ac02NL/2TCKRrJu2wffk1kZ+RyqxVUlbjSagNgPm94frxtr+XDL12E5Ll1enWskLrtrZ2r8L3wED1orIibV/w==", + "version": "4.13.0", + "resolved": "https://registry.npmjs.org/@rollup/rollup-android-arm-eabi/-/rollup-android-arm-eabi-4.13.0.tgz", + "integrity": "sha512-5ZYPOuaAqEH/W3gYsRkxQATBW3Ii1MfaT4EQstTnLKViLi2gLSQmlmtTpGucNP3sXEpOiI5tdGhjdE111ekyEg==", "cpu": [ "arm" ], @@ -1387,9 +1395,9 @@ ] }, "node_modules/@rollup/rollup-android-arm64": { - "version": "4.12.0", - "resolved": "https://registry.npmjs.org/@rollup/rollup-android-arm64/-/rollup-android-arm64-4.12.0.tgz", - "integrity": "sha512-OBqcX2BMe6nvjQ0Nyp7cC90cnumt8PXmO7Dp3gfAju/6YwG0Tj74z1vKrfRz7qAv23nBcYM8BCbhrsWqO7PzQQ==", + "version": "4.13.0", + "resolved": "https://registry.npmjs.org/@rollup/rollup-android-arm64/-/rollup-android-arm64-4.13.0.tgz", + "integrity": "sha512-BSbaCmn8ZadK3UAQdlauSvtaJjhlDEjS5hEVVIN3A4bbl3X+otyf/kOJV08bYiRxfejP3DXFzO2jz3G20107+Q==", "cpu": [ "arm64" ], @@ -1399,9 +1407,9 @@ ] }, "node_modules/@rollup/rollup-darwin-arm64": { - "version": "4.12.0", - "resolved": "https://registry.npmjs.org/@rollup/rollup-darwin-arm64/-/rollup-darwin-arm64-4.12.0.tgz", - "integrity": "sha512-X64tZd8dRE/QTrBIEs63kaOBG0b5GVEd3ccoLtyf6IdXtHdh8h+I56C2yC3PtC9Ucnv0CpNFJLqKFVgCYe0lOQ==", + "version": "4.13.0", + "resolved": "https://registry.npmjs.org/@rollup/rollup-darwin-arm64/-/rollup-darwin-arm64-4.13.0.tgz", + "integrity": "sha512-Ovf2evVaP6sW5Ut0GHyUSOqA6tVKfrTHddtmxGQc1CTQa1Cw3/KMCDEEICZBbyppcwnhMwcDce9ZRxdWRpVd6g==", "cpu": [ "arm64" ], @@ -1411,9 +1419,9 @@ ] }, "node_modules/@rollup/rollup-darwin-x64": { - "version": "4.12.0", - "resolved": "https://registry.npmjs.org/@rollup/rollup-darwin-x64/-/rollup-darwin-x64-4.12.0.tgz", - "integrity": "sha512-cc71KUZoVbUJmGP2cOuiZ9HSOP14AzBAThn3OU+9LcA1+IUqswJyR1cAJj3Mg55HbjZP6OLAIscbQsQLrpgTOg==", + "version": "4.13.0", + "resolved": "https://registry.npmjs.org/@rollup/rollup-darwin-x64/-/rollup-darwin-x64-4.13.0.tgz", + "integrity": "sha512-U+Jcxm89UTK592vZ2J9st9ajRv/hrwHdnvyuJpa5A2ngGSVHypigidkQJP+YiGL6JODiUeMzkqQzbCG3At81Gg==", "cpu": [ "x64" ], @@ -1423,9 +1431,9 @@ ] }, "node_modules/@rollup/rollup-linux-arm-gnueabihf": { - "version": "4.12.0", - "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm-gnueabihf/-/rollup-linux-arm-gnueabihf-4.12.0.tgz", - "integrity": "sha512-a6w/Y3hyyO6GlpKL2xJ4IOh/7d+APaqLYdMf86xnczU3nurFTaVN9s9jOXQg97BE4nYm/7Ga51rjec5nfRdrvA==", + "version": "4.13.0", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm-gnueabihf/-/rollup-linux-arm-gnueabihf-4.13.0.tgz", + "integrity": "sha512-8wZidaUJUTIR5T4vRS22VkSMOVooG0F4N+JSwQXWSRiC6yfEsFMLTYRFHvby5mFFuExHa/yAp9juSphQQJAijQ==", "cpu": [ "arm" ], @@ -1435,9 +1443,9 @@ ] }, "node_modules/@rollup/rollup-linux-arm64-gnu": { - "version": "4.12.0", - "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm64-gnu/-/rollup-linux-arm64-gnu-4.12.0.tgz", - "integrity": "sha512-0fZBq27b+D7Ar5CQMofVN8sggOVhEtzFUwOwPppQt0k+VR+7UHMZZY4y+64WJ06XOhBTKXtQB/Sv0NwQMXyNAA==", + "version": "4.13.0", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm64-gnu/-/rollup-linux-arm64-gnu-4.13.0.tgz", + "integrity": "sha512-Iu0Kno1vrD7zHQDxOmvweqLkAzjxEVqNhUIXBsZ8hu8Oak7/5VTPrxOEZXYC1nmrBVJp0ZcL2E7lSuuOVaE3+w==", "cpu": [ "arm64" ], @@ -1447,9 +1455,9 @@ ] }, "node_modules/@rollup/rollup-linux-arm64-musl": { - "version": "4.12.0", - "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm64-musl/-/rollup-linux-arm64-musl-4.12.0.tgz", - "integrity": "sha512-eTvzUS3hhhlgeAv6bfigekzWZjaEX9xP9HhxB0Dvrdbkk5w/b+1Sxct2ZuDxNJKzsRStSq1EaEkVSEe7A7ipgQ==", + "version": "4.13.0", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm64-musl/-/rollup-linux-arm64-musl-4.13.0.tgz", + "integrity": "sha512-C31QrW47llgVyrRjIwiOwsHFcaIwmkKi3PCroQY5aVq4H0A5v/vVVAtFsI1nfBngtoRpeREvZOkIhmRwUKkAdw==", "cpu": [ "arm64" ], @@ -1459,9 +1467,9 @@ ] }, "node_modules/@rollup/rollup-linux-riscv64-gnu": { - "version": "4.12.0", - "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-riscv64-gnu/-/rollup-linux-riscv64-gnu-4.12.0.tgz", - "integrity": "sha512-ix+qAB9qmrCRiaO71VFfY8rkiAZJL8zQRXveS27HS+pKdjwUfEhqo2+YF2oI+H/22Xsiski+qqwIBxVewLK7sw==", + "version": "4.13.0", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-riscv64-gnu/-/rollup-linux-riscv64-gnu-4.13.0.tgz", + "integrity": "sha512-Oq90dtMHvthFOPMl7pt7KmxzX7E71AfyIhh+cPhLY9oko97Zf2C9tt/XJD4RgxhaGeAraAXDtqxvKE1y/j35lA==", "cpu": [ "riscv64" ], @@ -1471,9 +1479,9 @@ ] }, "node_modules/@rollup/rollup-linux-x64-gnu": { - "version": "4.12.0", - "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-x64-gnu/-/rollup-linux-x64-gnu-4.12.0.tgz", - "integrity": "sha512-TenQhZVOtw/3qKOPa7d+QgkeM6xY0LtwzR8OplmyL5LrgTWIXpTQg2Q2ycBf8jm+SFW2Wt/DTn1gf7nFp3ssVA==", + "version": "4.13.0", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-x64-gnu/-/rollup-linux-x64-gnu-4.13.0.tgz", + "integrity": "sha512-yUD/8wMffnTKuiIsl6xU+4IA8UNhQ/f1sAnQebmE/lyQ8abjsVyDkyRkWop0kdMhKMprpNIhPmYlCxgHrPoXoA==", "cpu": [ "x64" ], @@ -1483,9 +1491,9 @@ ] }, "node_modules/@rollup/rollup-linux-x64-musl": { - "version": "4.12.0", - "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-x64-musl/-/rollup-linux-x64-musl-4.12.0.tgz", - "integrity": "sha512-LfFdRhNnW0zdMvdCb5FNuWlls2WbbSridJvxOvYWgSBOYZtgBfW9UGNJG//rwMqTX1xQE9BAodvMH9tAusKDUw==", + "version": "4.13.0", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-x64-musl/-/rollup-linux-x64-musl-4.13.0.tgz", + "integrity": "sha512-9RyNqoFNdF0vu/qqX63fKotBh43fJQeYC98hCaf89DYQpv+xu0D8QFSOS0biA7cGuqJFOc1bJ+m2rhhsKcw1hw==", "cpu": [ "x64" ], @@ -1495,9 +1503,9 @@ ] }, "node_modules/@rollup/rollup-win32-arm64-msvc": { - "version": "4.12.0", - "resolved": "https://registry.npmjs.org/@rollup/rollup-win32-arm64-msvc/-/rollup-win32-arm64-msvc-4.12.0.tgz", - "integrity": "sha512-JPDxovheWNp6d7AHCgsUlkuCKvtu3RB55iNEkaQcf0ttsDU/JZF+iQnYcQJSk/7PtT4mjjVG8N1kpwnI9SLYaw==", + "version": "4.13.0", + "resolved": "https://registry.npmjs.org/@rollup/rollup-win32-arm64-msvc/-/rollup-win32-arm64-msvc-4.13.0.tgz", + "integrity": "sha512-46ue8ymtm/5PUU6pCvjlic0z82qWkxv54GTJZgHrQUuZnVH+tvvSP0LsozIDsCBFO4VjJ13N68wqrKSeScUKdA==", "cpu": [ "arm64" ], @@ -1507,9 +1515,9 @@ ] }, "node_modules/@rollup/rollup-win32-ia32-msvc": { - "version": "4.12.0", - "resolved": "https://registry.npmjs.org/@rollup/rollup-win32-ia32-msvc/-/rollup-win32-ia32-msvc-4.12.0.tgz", - "integrity": "sha512-fjtuvMWRGJn1oZacG8IPnzIV6GF2/XG+h71FKn76OYFqySXInJtseAqdprVTDTyqPxQOG9Exak5/E9Z3+EJ8ZA==", + "version": "4.13.0", + "resolved": "https://registry.npmjs.org/@rollup/rollup-win32-ia32-msvc/-/rollup-win32-ia32-msvc-4.13.0.tgz", + "integrity": "sha512-P5/MqLdLSlqxbeuJ3YDeX37srC8mCflSyTrUsgbU1c/U9j6l2g2GiIdYaGD9QjdMQPMSgYm7hgg0551wHyIluw==", "cpu": [ "ia32" ], @@ -1519,9 +1527,9 @@ ] }, "node_modules/@rollup/rollup-win32-x64-msvc": { - "version": "4.12.0", - "resolved": "https://registry.npmjs.org/@rollup/rollup-win32-x64-msvc/-/rollup-win32-x64-msvc-4.12.0.tgz", - "integrity": "sha512-ZYmr5mS2wd4Dew/JjT0Fqi2NPB/ZhZ2VvPp7SmvPZb4Y1CG/LRcS6tcRo2cYU7zLK5A7cdbhWnnWmUjoI4qapg==", + "version": "4.13.0", + "resolved": "https://registry.npmjs.org/@rollup/rollup-win32-x64-msvc/-/rollup-win32-x64-msvc-4.13.0.tgz", + "integrity": "sha512-UKXUQNbO3DOhzLRwHSpa0HnhhCgNODvfoPWv2FCXme8N/ANFfhIPMGuOT+QuKd16+B5yxZ0HdpNlqPvTMS1qfw==", "cpu": [ "x64" ], @@ -1811,9 +1819,9 @@ } }, "node_modules/@types/eslint": { - "version": "8.56.2", - "resolved": "https://registry.npmjs.org/@types/eslint/-/eslint-8.56.2.tgz", - "integrity": "sha512-uQDwm1wFHmbBbCZCqAlq6Do9LYwByNZHWzXppSnay9SuwJ+VRbjkbLABer54kcPnMSlG6Fdiy2yaFXm/z9Z5gw==", + "version": "8.56.6", + "resolved": "https://registry.npmjs.org/@types/eslint/-/eslint-8.56.6.tgz", + "integrity": "sha512-ymwc+qb1XkjT/gfoQwxIeHZ6ixH23A+tCT2ADSA/DPVKzAjwYkTXBMCQ/f6fe4wEa85Lhp26VPeUxI7wMhAi7A==", "dev": true, "peer": true, "dependencies": { @@ -1849,10 +1857,16 @@ "integrity": "sha512-5+fP8P8MFNC+AyZCDxrB2pkZFPGzqQWUzpSeuuVLvm8VMcorNYavBqoFcxK8bQz4Qsbn4oUEEem4wDLfcysGHA==", "dev": true }, + "node_modules/@types/lodash": { + "version": "4.17.0", + "resolved": "https://registry.npmjs.org/@types/lodash/-/lodash-4.17.0.tgz", + "integrity": "sha512-t7dhREVv6dbNj0q17X12j7yDG4bD/DHYX7o5/DbDxobP0HnGPgpRz2Ej77aL7TZT3DSw13fqUTj8J4mMnqa7WA==", + "dev": true + }, "node_modules/@types/node": { - "version": "20.11.19", - "resolved": "https://registry.npmjs.org/@types/node/-/node-20.11.19.tgz", - "integrity": "sha512-7xMnVEcZFu0DikYjWOlRq7NTPETrm7teqUT2WkQjrTIkEgUyyGdWsj/Zg8bEJt5TNklzbPD1X3fqfsHw3SpapQ==", + "version": "20.11.30", + "resolved": "https://registry.npmjs.org/@types/node/-/node-20.11.30.tgz", + "integrity": "sha512-dHM6ZxwlmuZaRmUPfv1p+KrdD1Dci04FbdEm/9wEMouFqxYoFl5aMkt0VMAUtYRQDyYvD41WJLukhq/ha3YuTw==", "dev": true, "peer": true, "dependencies": { @@ -1870,9 +1884,9 @@ "integrity": "sha512-ga8y9v9uyeiLdpKddhxYQkxNDrfvuPrlFb0N1qnZZByvcElJaXthF1UhvCh9TLWJBEHeNtdnbysW7Y6Uq8CVng==" }, "node_modules/@types/react": { - "version": "18.2.57", - "resolved": "https://registry.npmjs.org/@types/react/-/react-18.2.57.tgz", - "integrity": "sha512-ZvQsktJgSYrQiMirAN60y4O/LRevIV8hUzSOSNB6gfR3/o3wCBFQx3sPwIYtuDMeiVgsSS3UzCV26tEzgnfvQw==", + "version": "18.2.67", + "resolved": "https://registry.npmjs.org/@types/react/-/react-18.2.67.tgz", + "integrity": "sha512-vkIE2vTIMHQ/xL0rgmuoECBCkZFZeHr49HeWSc24AptMbNRo7pwSBvj73rlJJs9fGKj0koS+V7kQB1jHS0uCgw==", "dependencies": { "@types/prop-types": "*", "@types/scheduler": "*", @@ -1880,9 +1894,9 @@ } }, "node_modules/@types/react-dom": { - "version": "18.2.19", - "resolved": "https://registry.npmjs.org/@types/react-dom/-/react-dom-18.2.19.tgz", - "integrity": "sha512-aZvQL6uUbIJpjZk4U8JZGbau9KDeAwMfmhyWorxgBkqDIEf6ROjRozcmPIicqsUwPUjbkDfHKgGee1Lq65APcA==", + "version": "18.2.22", + "resolved": "https://registry.npmjs.org/@types/react-dom/-/react-dom-18.2.22.tgz", + "integrity": "sha512-fHkBXPeNtfvri6gdsMYyW+dW7RXFo6Ad09nLFK0VQWR7yGLai/Cyvyj696gbwYvBnhGtevUG9cET0pmUbMtoPQ==", "dev": true, "dependencies": { "@types/react": "*" @@ -1947,9 +1961,9 @@ } }, "node_modules/@webassemblyjs/ast": { - "version": "1.11.6", - "resolved": "https://registry.npmjs.org/@webassemblyjs/ast/-/ast-1.11.6.tgz", - "integrity": "sha512-IN1xI7PwOvLPgjcf180gC1bqn3q/QaOCwYUahIOhbYUu8KA/3tw2RT/T0Gidi1l7Hhj5D/INhJxiICObqpMu4Q==", + "version": "1.12.1", + "resolved": "https://registry.npmjs.org/@webassemblyjs/ast/-/ast-1.12.1.tgz", + "integrity": "sha512-EKfMUOPRRUTy5UII4qJDGPpqfwjOmZ5jeGFwid9mnoqIFK+e0vqoi1qH56JpmZSzEL53jKnNzScdmftJyG5xWg==", "dev": true, "peer": true, "dependencies": { @@ -1972,9 +1986,9 @@ "peer": true }, "node_modules/@webassemblyjs/helper-buffer": { - "version": "1.11.6", - "resolved": "https://registry.npmjs.org/@webassemblyjs/helper-buffer/-/helper-buffer-1.11.6.tgz", - "integrity": "sha512-z3nFzdcp1mb8nEOFFk8DrYLpHvhKC3grJD2ardfKOzmbmJvEf/tPIqCY+sNcwZIY8ZD7IkB2l7/pqhUhqm7hLA==", + "version": "1.12.1", + "resolved": "https://registry.npmjs.org/@webassemblyjs/helper-buffer/-/helper-buffer-1.12.1.tgz", + "integrity": "sha512-nzJwQw99DNDKr9BVCOZcLuJJUlqkJh+kVzVl6Fmq/tI5ZtEyWT1KZMyOXltXLZJmDtvLCDgwsyrkohEtopTXCw==", "dev": true, "peer": true }, @@ -1998,16 +2012,16 @@ "peer": true }, "node_modules/@webassemblyjs/helper-wasm-section": { - "version": "1.11.6", - "resolved": "https://registry.npmjs.org/@webassemblyjs/helper-wasm-section/-/helper-wasm-section-1.11.6.tgz", - "integrity": "sha512-LPpZbSOwTpEC2cgn4hTydySy1Ke+XEu+ETXuoyvuyezHO3Kjdu90KK95Sh9xTbmjrCsUwvWwCOQQNta37VrS9g==", + "version": "1.12.1", + "resolved": "https://registry.npmjs.org/@webassemblyjs/helper-wasm-section/-/helper-wasm-section-1.12.1.tgz", + "integrity": "sha512-Jif4vfB6FJlUlSbgEMHUyk1j234GTNG9dBJ4XJdOySoj518Xj0oGsNi59cUQF4RRMS9ouBUxDDdyBVfPTypa5g==", "dev": true, "peer": true, "dependencies": { - "@webassemblyjs/ast": "1.11.6", - "@webassemblyjs/helper-buffer": "1.11.6", + "@webassemblyjs/ast": "1.12.1", + "@webassemblyjs/helper-buffer": "1.12.1", "@webassemblyjs/helper-wasm-bytecode": "1.11.6", - "@webassemblyjs/wasm-gen": "1.11.6" + "@webassemblyjs/wasm-gen": "1.12.1" } }, "node_modules/@webassemblyjs/ieee754": { @@ -2038,30 +2052,30 @@ "peer": true }, "node_modules/@webassemblyjs/wasm-edit": { - "version": "1.11.6", - "resolved": "https://registry.npmjs.org/@webassemblyjs/wasm-edit/-/wasm-edit-1.11.6.tgz", - "integrity": "sha512-Ybn2I6fnfIGuCR+Faaz7YcvtBKxvoLV3Lebn1tM4o/IAJzmi9AWYIPWpyBfU8cC+JxAO57bk4+zdsTjJR+VTOw==", + "version": "1.12.1", + "resolved": "https://registry.npmjs.org/@webassemblyjs/wasm-edit/-/wasm-edit-1.12.1.tgz", + "integrity": "sha512-1DuwbVvADvS5mGnXbE+c9NfA8QRcZ6iKquqjjmR10k6o+zzsRVesil54DKexiowcFCPdr/Q0qaMgB01+SQ1u6g==", "dev": true, "peer": true, "dependencies": { - "@webassemblyjs/ast": "1.11.6", - "@webassemblyjs/helper-buffer": "1.11.6", + "@webassemblyjs/ast": "1.12.1", + "@webassemblyjs/helper-buffer": "1.12.1", "@webassemblyjs/helper-wasm-bytecode": "1.11.6", - "@webassemblyjs/helper-wasm-section": "1.11.6", - "@webassemblyjs/wasm-gen": "1.11.6", - "@webassemblyjs/wasm-opt": "1.11.6", - "@webassemblyjs/wasm-parser": "1.11.6", - "@webassemblyjs/wast-printer": "1.11.6" + "@webassemblyjs/helper-wasm-section": "1.12.1", + "@webassemblyjs/wasm-gen": "1.12.1", + "@webassemblyjs/wasm-opt": "1.12.1", + "@webassemblyjs/wasm-parser": "1.12.1", + "@webassemblyjs/wast-printer": "1.12.1" } }, "node_modules/@webassemblyjs/wasm-gen": { - "version": "1.11.6", - "resolved": "https://registry.npmjs.org/@webassemblyjs/wasm-gen/-/wasm-gen-1.11.6.tgz", - "integrity": "sha512-3XOqkZP/y6B4F0PBAXvI1/bky7GryoogUtfwExeP/v7Nzwo1QLcq5oQmpKlftZLbT+ERUOAZVQjuNVak6UXjPA==", + "version": "1.12.1", + "resolved": "https://registry.npmjs.org/@webassemblyjs/wasm-gen/-/wasm-gen-1.12.1.tgz", + "integrity": "sha512-TDq4Ojh9fcohAw6OIMXqiIcTq5KUXTGRkVxbSo1hQnSy6lAM5GSdfwWeSxpAo0YzgsgF182E/U0mDNhuA0tW7w==", "dev": true, "peer": true, "dependencies": { - "@webassemblyjs/ast": "1.11.6", + "@webassemblyjs/ast": "1.12.1", "@webassemblyjs/helper-wasm-bytecode": "1.11.6", "@webassemblyjs/ieee754": "1.11.6", "@webassemblyjs/leb128": "1.11.6", @@ -2069,26 +2083,26 @@ } }, "node_modules/@webassemblyjs/wasm-opt": { - "version": "1.11.6", - "resolved": "https://registry.npmjs.org/@webassemblyjs/wasm-opt/-/wasm-opt-1.11.6.tgz", - "integrity": "sha512-cOrKuLRE7PCe6AsOVl7WasYf3wbSo4CeOk6PkrjS7g57MFfVUF9u6ysQBBODX0LdgSvQqRiGz3CXvIDKcPNy4g==", + "version": "1.12.1", + "resolved": "https://registry.npmjs.org/@webassemblyjs/wasm-opt/-/wasm-opt-1.12.1.tgz", + "integrity": "sha512-Jg99j/2gG2iaz3hijw857AVYekZe2SAskcqlWIZXjji5WStnOpVoat3gQfT/Q5tb2djnCjBtMocY/Su1GfxPBg==", "dev": true, "peer": true, "dependencies": { - "@webassemblyjs/ast": "1.11.6", - "@webassemblyjs/helper-buffer": "1.11.6", - "@webassemblyjs/wasm-gen": "1.11.6", - "@webassemblyjs/wasm-parser": "1.11.6" + "@webassemblyjs/ast": "1.12.1", + "@webassemblyjs/helper-buffer": "1.12.1", + "@webassemblyjs/wasm-gen": "1.12.1", + "@webassemblyjs/wasm-parser": "1.12.1" } }, "node_modules/@webassemblyjs/wasm-parser": { - "version": "1.11.6", - "resolved": "https://registry.npmjs.org/@webassemblyjs/wasm-parser/-/wasm-parser-1.11.6.tgz", - "integrity": "sha512-6ZwPeGzMJM3Dqp3hCsLgESxBGtT/OeCvCZ4TA1JUPYgmhAx38tTPR9JaKy0S5H3evQpO/h2uWs2j6Yc/fjkpTQ==", + "version": "1.12.1", + "resolved": "https://registry.npmjs.org/@webassemblyjs/wasm-parser/-/wasm-parser-1.12.1.tgz", + "integrity": "sha512-xikIi7c2FHXysxXe3COrVUPSheuBtpcfhbpFj4gmu7KRLYOzANztwUU0IbsqvMqzuNK2+glRGWCEqZo1WCLyAQ==", "dev": true, "peer": true, "dependencies": { - "@webassemblyjs/ast": "1.11.6", + "@webassemblyjs/ast": "1.12.1", "@webassemblyjs/helper-api-error": "1.11.6", "@webassemblyjs/helper-wasm-bytecode": "1.11.6", "@webassemblyjs/ieee754": "1.11.6", @@ -2097,13 +2111,13 @@ } }, "node_modules/@webassemblyjs/wast-printer": { - "version": "1.11.6", - "resolved": "https://registry.npmjs.org/@webassemblyjs/wast-printer/-/wast-printer-1.11.6.tgz", - "integrity": "sha512-JM7AhRcE+yW2GWYaKeHL5vt4xqee5N2WcezptmgyhNS+ScggqcT1OtXykhAb13Sn5Yas0j2uv9tHgrjwvzAP4A==", + "version": "1.12.1", + "resolved": "https://registry.npmjs.org/@webassemblyjs/wast-printer/-/wast-printer-1.12.1.tgz", + "integrity": "sha512-+X4WAlOisVWQMikjbcvY2e0rwPsKQ9F688lksZhBcPycBBuii3O7m8FACbDMWDojpAqvjIncrG8J0XHKyQfVeA==", "dev": true, "peer": true, "dependencies": { - "@webassemblyjs/ast": "1.11.6", + "@webassemblyjs/ast": "1.12.1", "@xtuc/long": "4.2.2" } }, @@ -2217,11 +2231,11 @@ "integrity": "sha512-Oei9OH4tRh0YqU3GxhX79dM/mwVgvbZJaSNaRk+bshkj0S5cfHcgYakreBjrHwatXKbz+IoIdYLxrKim2MjW0Q==" }, "node_modules/axios": { - "version": "1.6.7", - "resolved": "https://registry.npmjs.org/axios/-/axios-1.6.7.tgz", - "integrity": "sha512-/hDJGff6/c7u0hDkvkGxR/oy6CbCs8ziCsC7SqmhjfozqiJGc8Z11wrv9z9lYfY4K8l+H9TpjcMDX0xOZmx+RA==", + "version": "1.6.8", + "resolved": "https://registry.npmjs.org/axios/-/axios-1.6.8.tgz", + "integrity": "sha512-v/ZHtJDU39mDpyBoFVkETcd/uNdxrWRrg3bKpOKzXFA6Bvqopts6ALSMU3y6ijYxbw2B+wPrIv46egTzJXCLGQ==", "dependencies": { - "follow-redirects": "^1.15.4", + "follow-redirects": "^1.15.6", "form-data": "^4.0.0", "proxy-from-env": "^1.1.0" } @@ -2340,9 +2354,9 @@ } }, "node_modules/caniuse-lite": { - "version": "1.0.30001588", - "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001588.tgz", - "integrity": "sha512-+hVY9jE44uKLkH0SrUTqxjxqNTOWHsbnQDIKjwkZ3lNTzUUVdBLBGXtj/q5Mp5u98r3droaZAewQuEDzjQdZlQ==", + "version": "1.0.30001600", + "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001600.tgz", + "integrity": "sha512-+2S9/2JFhYmYaDpZvo0lKkfvuKIglrx68MwOBqMGHhQsNkLjB5xtc/TGoEPs+MxjSyN/72qer2g97nzR641mOQ==", "dev": true, "funding": [ { @@ -2450,6 +2464,18 @@ "url": "https://github.com/sponsors/mesqueeb" } }, + "node_modules/cors": { + "version": "2.8.5", + "resolved": "https://registry.npmjs.org/cors/-/cors-2.8.5.tgz", + "integrity": "sha512-KIHbLJqu73RGr/hnbrO9uBeixNGuvSQjul/jdFvS/KFSIH1hWVd1ng7zOHx+YrEfInLG7q4n6GHQ9cDtxv/P6g==", + "dependencies": { + "object-assign": "^4", + "vary": "^1" + }, + "engines": { + "node": ">= 0.10" + } + }, "node_modules/cosmiconfig": { "version": "7.1.0", "resolved": "https://registry.npmjs.org/cosmiconfig/-/cosmiconfig-7.1.0.tgz", @@ -2489,9 +2515,9 @@ "integrity": "sha512-M1uQkMl8rQK/szD0LNhtqxIPLpimGm8sOBwU7lLnCpSbTyY3yeU1Vc7l4KT5zT4s/yOxHH5O7tIuuLOCnLADRw==" }, "node_modules/date-fns": { - "version": "3.3.1", - "resolved": "https://registry.npmjs.org/date-fns/-/date-fns-3.3.1.tgz", - "integrity": "sha512-y8e109LYGgoQDveiEBD3DYXKba1jWf5BA8YU1FL5Tvm0BTdEfy54WLCwnuYWZNnzzvALy/QQ4Hov+Q9RVRv+Zw==", + "version": "3.6.0", + "resolved": "https://registry.npmjs.org/date-fns/-/date-fns-3.6.0.tgz", + "integrity": "sha512-fRHTG8g/Gif+kSh50gaGEdToemgfj74aRX3swtiouboip5JDLAyDE9F11nHMIcvOaXeOC6D7SpNhi7uFyB7Uww==", "funding": { "type": "github", "url": "https://github.com/sponsors/kossnocorp" @@ -2547,15 +2573,15 @@ } }, "node_modules/electron-to-chromium": { - "version": "1.4.677", - "resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.4.677.tgz", - "integrity": "sha512-erDa3CaDzwJOpyvfKhOiJjBVNnMM0qxHq47RheVVwsSQrgBA9ZSGV9kdaOfZDPXcHzhG7lBxhj6A7KvfLJBd6Q==", + "version": "1.4.715", + "resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.4.715.tgz", + "integrity": "sha512-XzWNH4ZSa9BwVUQSDorPWAUQ5WGuYz7zJUNpNif40zFCiCl20t8zgylmreNmn26h5kiyw2lg7RfTmeMBsDklqg==", "dev": true }, "node_modules/enhanced-resolve": { - "version": "5.15.0", - "resolved": "https://registry.npmjs.org/enhanced-resolve/-/enhanced-resolve-5.15.0.tgz", - "integrity": "sha512-LXYT42KJ7lpIKECr2mAXIaMldcNCh/7E0KBKOu4KSfkHmP+mZmSs+8V5gBAqisWBy0OO4W5Oyys0GO1Y8KtdKg==", + "version": "5.16.0", + "resolved": "https://registry.npmjs.org/enhanced-resolve/-/enhanced-resolve-5.16.0.tgz", + "integrity": "sha512-O+QWCviPNSSLAD9Ucn8Awv+poAkqn3T1XY5/N7kR7rQO9yfSGWkYZDwpJ+iKF7B8rxaQKWngSqACpgzeapSyoA==", "dev": true, "peer": true, "dependencies": { @@ -2600,16 +2626,16 @@ } }, "node_modules/es-module-lexer": { - "version": "1.4.1", - "resolved": "https://registry.npmjs.org/es-module-lexer/-/es-module-lexer-1.4.1.tgz", - "integrity": "sha512-cXLGjP0c4T3flZJKQSuziYoq7MlT+rnvfZjfp7h+I7K9BNX54kP9nyWvdbwjQ4u1iWbOL4u96fgeZLToQlZC7w==", + "version": "1.4.2", + "resolved": "https://registry.npmjs.org/es-module-lexer/-/es-module-lexer-1.4.2.tgz", + "integrity": "sha512-7nOqkomXZEaxUDJw21XZNtRk739QvrPSoZoRtbsEfcii00vdzZUh6zh1CQwHhrib8MdEtJfv5rJiGeb4KuV/vw==", "dev": true, "peer": true }, "node_modules/esbuild": { - "version": "0.19.12", - "resolved": "https://registry.npmjs.org/esbuild/-/esbuild-0.19.12.tgz", - "integrity": "sha512-aARqgq8roFBj054KvQr5f1sFu0D65G+miZRCuJyJ0G13Zwx7vRar5Zhn2tkQNzIXcBrNVsv/8stehpj+GAjgbg==", + "version": "0.20.2", + "resolved": "https://registry.npmjs.org/esbuild/-/esbuild-0.20.2.tgz", + "integrity": "sha512-WdOOppmUNU+IbZ0PaDiTst80zjnrOkyJNHoKupIcVyU8Lvla3Ugx94VzkQ32Ijqd7UhHJy75gNWDMUekcrSJ6g==", "dev": true, "hasInstallScript": true, "bin": { @@ -2619,29 +2645,29 @@ "node": ">=12" }, "optionalDependencies": { - "@esbuild/aix-ppc64": "0.19.12", - "@esbuild/android-arm": "0.19.12", - "@esbuild/android-arm64": "0.19.12", - "@esbuild/android-x64": "0.19.12", - "@esbuild/darwin-arm64": "0.19.12", - "@esbuild/darwin-x64": "0.19.12", - "@esbuild/freebsd-arm64": "0.19.12", - "@esbuild/freebsd-x64": "0.19.12", - "@esbuild/linux-arm": "0.19.12", - "@esbuild/linux-arm64": "0.19.12", - "@esbuild/linux-ia32": "0.19.12", - "@esbuild/linux-loong64": "0.19.12", - "@esbuild/linux-mips64el": "0.19.12", - "@esbuild/linux-ppc64": "0.19.12", - "@esbuild/linux-riscv64": "0.19.12", - "@esbuild/linux-s390x": "0.19.12", - "@esbuild/linux-x64": "0.19.12", - "@esbuild/netbsd-x64": "0.19.12", - "@esbuild/openbsd-x64": "0.19.12", - "@esbuild/sunos-x64": "0.19.12", - "@esbuild/win32-arm64": "0.19.12", - "@esbuild/win32-ia32": "0.19.12", - "@esbuild/win32-x64": "0.19.12" + "@esbuild/aix-ppc64": "0.20.2", + "@esbuild/android-arm": "0.20.2", + "@esbuild/android-arm64": "0.20.2", + "@esbuild/android-x64": "0.20.2", + "@esbuild/darwin-arm64": "0.20.2", + "@esbuild/darwin-x64": "0.20.2", + "@esbuild/freebsd-arm64": "0.20.2", + "@esbuild/freebsd-x64": "0.20.2", + "@esbuild/linux-arm": "0.20.2", + "@esbuild/linux-arm64": "0.20.2", + "@esbuild/linux-ia32": "0.20.2", + "@esbuild/linux-loong64": "0.20.2", + "@esbuild/linux-mips64el": "0.20.2", + "@esbuild/linux-ppc64": "0.20.2", + "@esbuild/linux-riscv64": "0.20.2", + "@esbuild/linux-s390x": "0.20.2", + "@esbuild/linux-x64": "0.20.2", + "@esbuild/netbsd-x64": "0.20.2", + "@esbuild/openbsd-x64": "0.20.2", + "@esbuild/sunos-x64": "0.20.2", + "@esbuild/win32-arm64": "0.20.2", + "@esbuild/win32-ia32": "0.20.2", + "@esbuild/win32-x64": "0.20.2" } }, "node_modules/escalade": { @@ -2862,9 +2888,9 @@ } }, "node_modules/hasown": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/hasown/-/hasown-2.0.1.tgz", - "integrity": "sha512-1/th4MHjnwncwXsIW6QMzlvYL9kG5e/CpVvLRZe4XPa8TOUNbCELqmvhDmnkNsAjwaG4+I8gJJL0JBvTTLO9qA==", + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/hasown/-/hasown-2.0.2.tgz", + "integrity": "sha512-0hJU9SCPvmMzIBdZFqNPXWa6dqh7WdH0cII9y+CyS8rG3nL48Bclra9HmKhVVUHyPWNH5Y7xDwAB7bfgSjkUMQ==", "dependencies": { "function-bind": "^1.1.2" }, @@ -2943,6 +2969,16 @@ "integrity": "sha512-sNxgpk9793nzSs7bA6JQJGeIuRBQhAaNGG77kzYQgMkrID+lS6SlK07K5LaptscDlSaIgH+GPFzf+d75FVxozA==", "dev": true }, + "node_modules/isomorphic-fetch": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/isomorphic-fetch/-/isomorphic-fetch-3.0.0.tgz", + "integrity": "sha512-qvUtwJ3j6qwsF3jLxkZ72qCgjMysPzDfeV240JHiGZsANBYd+EEuu35v7dfrJ9Up0Ak07D7GGSkGhCHTqg/5wA==", + "dev": true, + "dependencies": { + "node-fetch": "^2.6.1", + "whatwg-fetch": "^3.4.1" + } + }, "node_modules/jest-worker": { "version": "27.5.1", "resolved": "https://registry.npmjs.org/jest-worker/-/jest-worker-27.5.1.tgz", @@ -3197,9 +3233,9 @@ } }, "node_modules/mini-css-extract-plugin": { - "version": "2.8.0", - "resolved": "https://registry.npmjs.org/mini-css-extract-plugin/-/mini-css-extract-plugin-2.8.0.tgz", - "integrity": "sha512-CxmUYPFcTgET1zImteG/LZOy/4T5rTojesQXkSNBiquhydn78tfbCE9sjIjnJ/UcjNjOC1bphTCCW5rrS7cXAg==", + "version": "2.8.1", + "resolved": "https://registry.npmjs.org/mini-css-extract-plugin/-/mini-css-extract-plugin-2.8.1.tgz", + "integrity": "sha512-/1HDlyFRxWIZPI1ZpgqlZ8jMw/1Dp/dl3P0L1jtZ+zVcHqwPhGwaJwKL00WVgfnBy6PWCde9W65or7IIETImuA==", "dev": true, "dependencies": { "schema-utils": "^4.0.0", @@ -3273,6 +3309,26 @@ "tslib": "^2.0.3" } }, + "node_modules/node-fetch": { + "version": "2.7.0", + "resolved": "https://registry.npmjs.org/node-fetch/-/node-fetch-2.7.0.tgz", + "integrity": "sha512-c4FRfUm/dbcWZ7U+1Wq0AwCyFL+3nt2bEw05wfxSz+DWpWsitgmSgYmy2dQdWyKC1694ELPqMs/YzUSNozLt8A==", + "dev": true, + "dependencies": { + "whatwg-url": "^5.0.0" + }, + "engines": { + "node": "4.x || >=6.0.0" + }, + "peerDependencies": { + "encoding": "^0.1.0" + }, + "peerDependenciesMeta": { + "encoding": { + "optional": true + } + } + }, "node_modules/node-releases": { "version": "2.0.14", "resolved": "https://registry.npmjs.org/node-releases/-/node-releases-2.0.14.tgz", @@ -3471,9 +3527,9 @@ } }, "node_modules/react-datepicker": { - "version": "6.1.0", - "resolved": "https://registry.npmjs.org/react-datepicker/-/react-datepicker-6.1.0.tgz", - "integrity": "sha512-8uz+hAOpvHqZGvD4Ky1hJ0/tLI4S9B0Gu9LV7LtLxRKXODs/xrxEay0aMVp7AW9iizTeImZh/6aA00fFaRZpJw==", + "version": "6.5.0", + "resolved": "https://registry.npmjs.org/react-datepicker/-/react-datepicker-6.5.0.tgz", + "integrity": "sha512-VXufB/CH04O9K/puRxr7BGBD+2Hf9mSSwG9HMa6ZP+LXckCpibllOPuRYxk4kW8W22AfLps4MY04NJAgk4JpJg==", "dependencies": { "@floating-ui/react": "^0.26.2", "classnames": "^2.2.6", @@ -3577,11 +3633,11 @@ } }, "node_modules/react-router": { - "version": "6.22.1", - "resolved": "https://registry.npmjs.org/react-router/-/react-router-6.22.1.tgz", - "integrity": "sha512-0pdoRGwLtemnJqn1K0XHUbnKiX0S4X8CgvVVmHGOWmofESj31msHo/1YiqcJWK7Wxfq2a4uvvtS01KAQyWK/CQ==", + "version": "6.22.3", + "resolved": "https://registry.npmjs.org/react-router/-/react-router-6.22.3.tgz", + "integrity": "sha512-dr2eb3Mj5zK2YISHK++foM9w4eBnO23eKnZEDs7c880P6oKbrjz/Svg9+nxqtHQK+oMW4OtjZca0RqPglXxguQ==", "dependencies": { - "@remix-run/router": "1.15.1" + "@remix-run/router": "1.15.3" }, "engines": { "node": ">=14.0.0" @@ -3591,12 +3647,12 @@ } }, "node_modules/react-router-dom": { - "version": "6.22.1", - "resolved": "https://registry.npmjs.org/react-router-dom/-/react-router-dom-6.22.1.tgz", - "integrity": "sha512-iwMyyyrbL7zkKY7MRjOVRy+TMnS/OPusaFVxM2P11x9dzSzGmLsebkCvYirGq0DWB9K9hOspHYYtDz33gE5Duw==", + "version": "6.22.3", + "resolved": "https://registry.npmjs.org/react-router-dom/-/react-router-dom-6.22.3.tgz", + "integrity": "sha512-7ZILI7HjcE+p31oQvwbokjk6OA/bnFxrhJ19n82Ex9Ph8fNAq+Hm/7KchpMGlTgWhUxRHMMCut+vEtNpWpowKw==", "dependencies": { - "@remix-run/router": "1.15.1", - "react-router": "6.22.1" + "@remix-run/router": "1.15.3", + "react-router": "6.22.3" }, "engines": { "node": ">=14.0.0" @@ -3669,9 +3725,9 @@ } }, "node_modules/rollup": { - "version": "4.12.0", - "resolved": "https://registry.npmjs.org/rollup/-/rollup-4.12.0.tgz", - "integrity": "sha512-wz66wn4t1OHIJw3+XU7mJJQV/2NAfw5OAk6G6Hoo3zcvz/XOfQ52Vgi+AN4Uxoxi0KBBwk2g8zPrTDA4btSB/Q==", + "version": "4.13.0", + "resolved": "https://registry.npmjs.org/rollup/-/rollup-4.13.0.tgz", + "integrity": "sha512-3YegKemjoQnYKmsBlOHfMLVPPA5xLkQ8MHLLSw/fBrFaVkEayL51DilPpNNLq1exr98F2B1TzrV0FUlN3gWRPg==", "dependencies": { "@types/estree": "1.0.5" }, @@ -3683,26 +3739,26 @@ "npm": ">=8.0.0" }, "optionalDependencies": { - "@rollup/rollup-android-arm-eabi": "4.12.0", - "@rollup/rollup-android-arm64": "4.12.0", - "@rollup/rollup-darwin-arm64": "4.12.0", - "@rollup/rollup-darwin-x64": "4.12.0", - "@rollup/rollup-linux-arm-gnueabihf": "4.12.0", - "@rollup/rollup-linux-arm64-gnu": "4.12.0", - "@rollup/rollup-linux-arm64-musl": "4.12.0", - "@rollup/rollup-linux-riscv64-gnu": "4.12.0", - "@rollup/rollup-linux-x64-gnu": "4.12.0", - "@rollup/rollup-linux-x64-musl": "4.12.0", - "@rollup/rollup-win32-arm64-msvc": "4.12.0", - "@rollup/rollup-win32-ia32-msvc": "4.12.0", - "@rollup/rollup-win32-x64-msvc": "4.12.0", + "@rollup/rollup-android-arm-eabi": "4.13.0", + "@rollup/rollup-android-arm64": "4.13.0", + "@rollup/rollup-darwin-arm64": "4.13.0", + "@rollup/rollup-darwin-x64": "4.13.0", + "@rollup/rollup-linux-arm-gnueabihf": "4.13.0", + "@rollup/rollup-linux-arm64-gnu": "4.13.0", + "@rollup/rollup-linux-arm64-musl": "4.13.0", + "@rollup/rollup-linux-riscv64-gnu": "4.13.0", + "@rollup/rollup-linux-x64-gnu": "4.13.0", + "@rollup/rollup-linux-x64-musl": "4.13.0", + "@rollup/rollup-win32-arm64-msvc": "4.13.0", + "@rollup/rollup-win32-ia32-msvc": "4.13.0", + "@rollup/rollup-win32-x64-msvc": "4.13.0", "fsevents": "~2.3.2" } }, "node_modules/rollup-plugin-import-css": { - "version": "3.4.0", - "resolved": "https://registry.npmjs.org/rollup-plugin-import-css/-/rollup-plugin-import-css-3.4.0.tgz", - "integrity": "sha512-997dJi7M7yYFn7tZer/UVt72mh4GH/hHBv48j3V4jsGSg+1DdYUXn+QB9SMMCNKF99pSv6QXmIOLTyeuijIsgg==", + "version": "3.5.0", + "resolved": "https://registry.npmjs.org/rollup-plugin-import-css/-/rollup-plugin-import-css-3.5.0.tgz", + "integrity": "sha512-JOVow6n00qt2C/NnsqPmIjFOfxIAudwWqC5SaC84CodMGiMFaP1gPAdgnJ8g8hcG+P85TCYp2kI98grYCEt5pg==", "dependencies": { "@rollup/pluginutils": "^5.0.4" }, @@ -3819,9 +3875,9 @@ } }, "node_modules/source-map-js": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/source-map-js/-/source-map-js-1.0.2.tgz", - "integrity": "sha512-R0XvVJ9WusLiqTCEiGCmICCMplcCkIwwR11mOSD9CR5u+IXYdiseeEuXCVAjS54zqwkLcPNnmU4OeJ6tUrWhDw==", + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/source-map-js/-/source-map-js-1.2.0.tgz", + "integrity": "sha512-itJW8lvSA0TXEphiRoawsCksnlf8SyvmFzIhltqAHluXd88pkCd+cXJVHTDwdCr0IzwptSm035IHQktUu1QUMg==", "engines": { "node": ">=0.10.0" } @@ -3945,9 +4001,9 @@ } }, "node_modules/terser": { - "version": "5.27.2", - "resolved": "https://registry.npmjs.org/terser/-/terser-5.27.2.tgz", - "integrity": "sha512-sHXmLSkImesJ4p5apTeT63DsV4Obe1s37qT8qvwHRmVxKTBH7Rv9Wr26VcAMmLbmk9UliiwK8z+657NyJHHy/w==", + "version": "5.29.2", + "resolved": "https://registry.npmjs.org/terser/-/terser-5.29.2.tgz", + "integrity": "sha512-ZiGkhUBIM+7LwkNjXYJq8svgkd+QK3UUr0wJqY4MieaezBSAIPgbSPZyIx0idM6XWK5CMzSWa8MJIzmRcB8Caw==", "dev": true, "peer": true, "dependencies": { @@ -4059,10 +4115,16 @@ "node": ">=4" } }, + "node_modules/tr46": { + "version": "0.0.3", + "resolved": "https://registry.npmjs.org/tr46/-/tr46-0.0.3.tgz", + "integrity": "sha512-N3WMsuqV66lT30CrXNbEjx4GEwlow3v6rr4mCcv6prnfwhS01rkgyFdjPNBYd9br7LpXV1+Emh01fHnq2Gdgrw==", + "dev": true + }, "node_modules/tsconfck": { - "version": "3.0.2", - "resolved": "https://registry.npmjs.org/tsconfck/-/tsconfck-3.0.2.tgz", - "integrity": "sha512-6lWtFjwuhS3XI4HsX4Zg0izOI3FU/AI9EGVlPEUMDIhvLPMD4wkiof0WCoDgW7qY+Dy198g4d9miAqUHWHFH6Q==", + "version": "3.0.3", + "resolved": "https://registry.npmjs.org/tsconfck/-/tsconfck-3.0.3.tgz", + "integrity": "sha512-4t0noZX9t6GcPTfBAbIbbIU4pfpCwh0ueq3S4O/5qXI1VwK1outmxhe9dOiEWqMz3MW2LKgDTpqWV+37IWuVbA==", "dev": true, "bin": { "tsconfck": "bin/tsconfck.js" @@ -4086,10 +4148,9 @@ "dev": true }, "node_modules/typescript": { - "version": "5.3.3", - "resolved": "https://registry.npmjs.org/typescript/-/typescript-5.3.3.tgz", - "integrity": "sha512-pXWcraxM0uxAS+tN0AG/BF2TyqmHO014Z070UsJ+pFvYuRSq8KH8DmWpnbXe0pEPDHXZV3FcAbJkijJ5oNEnWw==", - "dev": true, + "version": "5.4.3", + "resolved": "https://registry.npmjs.org/typescript/-/typescript-5.4.3.tgz", + "integrity": "sha512-KrPd3PKaCLr78MalgiwJnA25Nm8HAmdwN3mYUYZgG/wizIo9EainNVQI9/yDavtVFRN2h3k8uf3GLHuhDMgEHg==", "bin": { "tsc": "bin/tsc", "tsserver": "bin/tsserver" @@ -4166,15 +4227,23 @@ "react": "^16.8.0 || ^17.0.0 || ^18.0.0" } }, + "node_modules/vary": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/vary/-/vary-1.1.2.tgz", + "integrity": "sha512-BNGbWLfd0eUPabhkXUVm0j8uuvREyTh5ovRa/dyow/BqAbZJyC+5fU+IzQOzmAKzYqYRAISoRhdQr3eIZ/PXqg==", + "engines": { + "node": ">= 0.8" + } + }, "node_modules/vite": { - "version": "5.1.4", - "resolved": "https://registry.npmjs.org/vite/-/vite-5.1.4.tgz", - "integrity": "sha512-n+MPqzq+d9nMVTKyewqw6kSt+R3CkvF9QAKY8obiQn8g1fwTscKxyfaYnC632HtBXAQGc1Yjomphwn1dtwGAHg==", + "version": "5.2.2", + "resolved": "https://registry.npmjs.org/vite/-/vite-5.2.2.tgz", + "integrity": "sha512-FWZbz0oSdLq5snUI0b6sULbz58iXFXdvkZfZWR/F0ZJuKTSPO7v72QPXt6KqYeMFb0yytNp6kZosxJ96Nr/wDQ==", "dev": true, "dependencies": { - "esbuild": "^0.19.3", - "postcss": "^8.4.35", - "rollup": "^4.2.0" + "esbuild": "^0.20.1", + "postcss": "^8.4.36", + "rollup": "^4.13.0" }, "bin": { "vite": "bin/vite.js" @@ -4236,14 +4305,14 @@ } }, "node_modules/vite-tsconfig-paths": { - "version": "4.3.1", - "resolved": "https://registry.npmjs.org/vite-tsconfig-paths/-/vite-tsconfig-paths-4.3.1.tgz", - "integrity": "sha512-cfgJwcGOsIxXOLU/nELPny2/LUD/lcf1IbfyeKTv2bsupVbTH/xpFtdQlBmIP1GEK2CjjLxYhFfB+QODFAx5aw==", + "version": "4.3.2", + "resolved": "https://registry.npmjs.org/vite-tsconfig-paths/-/vite-tsconfig-paths-4.3.2.tgz", + "integrity": "sha512-0Vd/a6po6Q+86rPlntHye7F31zA2URZMbH8M3saAZ/xR9QoGN/L21bxEGfXdWmFdNkqPpRdxFT7nmNe12e9/uA==", "dev": true, "dependencies": { "debug": "^4.1.1", "globrex": "^0.1.2", - "tsconfck": "^3.0.1" + "tsconfck": "^3.0.3" }, "peerDependencies": { "vite": "*" @@ -4255,9 +4324,9 @@ } }, "node_modules/vite/node_modules/postcss": { - "version": "8.4.35", - "resolved": "https://registry.npmjs.org/postcss/-/postcss-8.4.35.tgz", - "integrity": "sha512-u5U8qYpBCpN13BsiEB0CbR1Hhh4Gc0zLFuedrHJKMctHCHAGrMdG0PRM/KErzAL3CU6/eckEtmHNB3x6e3c0vA==", + "version": "8.4.38", + "resolved": "https://registry.npmjs.org/postcss/-/postcss-8.4.38.tgz", + "integrity": "sha512-Wglpdk03BSfXkHoQa3b/oulrotAkwrlLDRSOb9D0bN86FdRyE9lppSp33aHNPgBa0JKCoB+drFLZkQoRRYae5A==", "dev": true, "funding": [ { @@ -4276,7 +4345,7 @@ "dependencies": { "nanoid": "^3.3.7", "picocolors": "^1.0.0", - "source-map-js": "^1.0.2" + "source-map-js": "^1.2.0" }, "engines": { "node": "^10 || ^12 || >=14" @@ -4291,9 +4360,9 @@ } }, "node_modules/watchpack": { - "version": "2.4.0", - "resolved": "https://registry.npmjs.org/watchpack/-/watchpack-2.4.0.tgz", - "integrity": "sha512-Lcvm7MGST/4fup+ifyKi2hjyIAwcdI4HRgtvTpIUxBRhB+RFtUh8XtDOxUfctVCnhVi+QQj49i91OyvzkJl6cg==", + "version": "2.4.1", + "resolved": "https://registry.npmjs.org/watchpack/-/watchpack-2.4.1.tgz", + "integrity": "sha512-8wrBCMtVhqcXP2Sup1ctSkga6uc2Bx0IIvKyT7yTFier5AXHooSI+QyQQAtTb7+E0IUCCKyTFmXqdqgum2XWGg==", "dev": true, "peer": true, "dependencies": { @@ -4304,28 +4373,34 @@ "node": ">=10.13.0" } }, + "node_modules/webidl-conversions": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/webidl-conversions/-/webidl-conversions-3.0.1.tgz", + "integrity": "sha512-2JAn3z8AR6rjK8Sm8orRC0h/bcl/DqL7tRPdGZ4I1CjdF+EaMLmYxBHyXuKL849eucPFhvBoxMsflfOb8kxaeQ==", + "dev": true + }, "node_modules/webpack": { - "version": "5.90.3", - "resolved": "https://registry.npmjs.org/webpack/-/webpack-5.90.3.tgz", - "integrity": "sha512-h6uDYlWCctQRuXBs1oYpVe6sFcWedl0dpcVaTf/YF67J9bKvwJajFulMVSYKHrksMB3I/pIagRzDxwxkebuzKA==", + "version": "5.91.0", + "resolved": "https://registry.npmjs.org/webpack/-/webpack-5.91.0.tgz", + "integrity": "sha512-rzVwlLeBWHJbmgTC/8TvAcu5vpJNII+MelQpylD4jNERPwpBJOE2lEcko1zJX3QJeLjTTAnQxn/OJ8bjDzVQaw==", "dev": true, "peer": true, "dependencies": { "@types/eslint-scope": "^3.7.3", "@types/estree": "^1.0.5", - "@webassemblyjs/ast": "^1.11.5", - "@webassemblyjs/wasm-edit": "^1.11.5", - "@webassemblyjs/wasm-parser": "^1.11.5", + "@webassemblyjs/ast": "^1.12.1", + "@webassemblyjs/wasm-edit": "^1.12.1", + "@webassemblyjs/wasm-parser": "^1.12.1", "acorn": "^8.7.1", "acorn-import-assertions": "^1.9.0", "browserslist": "^4.21.10", "chrome-trace-event": "^1.0.2", - "enhanced-resolve": "^5.15.0", + "enhanced-resolve": "^5.16.0", "es-module-lexer": "^1.2.1", "eslint-scope": "5.1.1", "events": "^3.2.0", "glob-to-regexp": "^0.4.1", - "graceful-fs": "^4.2.9", + "graceful-fs": "^4.2.11", "json-parse-even-better-errors": "^2.3.1", "loader-runner": "^4.2.0", "mime-types": "^2.1.27", @@ -4333,7 +4408,7 @@ "schema-utils": "^3.2.0", "tapable": "^2.1.1", "terser-webpack-plugin": "^5.3.10", - "watchpack": "^2.4.0", + "watchpack": "^2.4.1", "webpack-sources": "^3.2.3" }, "bin": { @@ -4415,6 +4490,22 @@ "url": "https://opencollective.com/webpack" } }, + "node_modules/whatwg-fetch": { + "version": "3.6.20", + "resolved": "https://registry.npmjs.org/whatwg-fetch/-/whatwg-fetch-3.6.20.tgz", + "integrity": "sha512-EqhiFU6daOA8kpjOWTL0olhVOF3i7OrFzSYiGsEMB8GcXS+RrzauAERX65xMeNWVqxA6HXH2m69Z9LaKKdisfg==", + "dev": true + }, + "node_modules/whatwg-url": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/whatwg-url/-/whatwg-url-5.0.0.tgz", + "integrity": "sha512-saE57nupxk6v3HY35+jzBwYa0rKSy0XR8JSxZPwgLr7ys0IBzhGviA1/TUGJLmSVqs8pb9AnvICXEuOHLprYTw==", + "dev": true, + "dependencies": { + "tr46": "~0.0.3", + "webidl-conversions": "^3.0.0" + } + }, "node_modules/yallist": { "version": "3.1.1", "resolved": "https://registry.npmjs.org/yallist/-/yallist-3.1.1.tgz", diff --git a/apps/endringsmelding-frontend/src/main/js/package.json b/apps/endringsmelding-frontend/src/main/js/package.json index f55e69ead7a..93d27d3e41a 100644 --- a/apps/endringsmelding-frontend/src/main/js/package.json +++ b/apps/endringsmelding-frontend/src/main/js/package.json @@ -1,6 +1,6 @@ { "name": "endringsmelding-frontend", - "version": "1.2.11", + "version": "1.2.15", "private": true, "type": "module", "homepage": "/", @@ -8,31 +8,35 @@ "@navikt/dolly-komponenter": "^1.3.33", "@navikt/ds-icons": "^3.4.3", "@navikt/ds-react": "^6.0.0", - "@navikt/fnrvalidator": "^1.3.0", + "@navikt/fnrvalidator": "^2.0.7", + "axios": "^1.1.3", "classnames": "^2.3.1", + "cors": "^2.8.5", "dayjs": "^1.11.4", - "axios": "^1.1.3", "lodash.throttle": "^4.1.1", "prop-types": "^15.8.1", "react": "^18.2.0", "react-dom": "^18.2.0", - "react-router-dom": "^6.3.0", + "react-router-dom": "^6.22.3", "react-select": "^5.4.0", "styled-components": "^6.0.0" }, "devDependencies": { + "@types/lodash": "^4.14.202", "@types/react": "^18.0.15", "@types/react-dom": "^18.0.6", "@types/react-router-dom": "^5.3.3", + "@vitejs/plugin-react": "^4.0.0", "babel-plugin-styled-components": "^2.0.7", + "isomorphic-fetch": "^3.0.0", "less": "^4.1.3", + "lodash": "^4.17.21", "mini-css-extract-plugin": "^2.6.1", "prettier": "^3.0.1", + "swr": "^2.0.0", "typescript": "^5.0.2", - "@vitejs/plugin-react": "^4.0.0", "vite": "^5.0.12", "vite-plugin-svgr": "^4.0.0", - "swr": "^2.0.0", "vite-tsconfig-paths": "^4.0.0" }, "scripts": { diff --git a/apps/endringsmelding-frontend/src/main/js/src/App.tsx b/apps/endringsmelding-frontend/src/main/js/src/App.tsx index 519a26df1d9..c793e3ac073 100644 --- a/apps/endringsmelding-frontend/src/main/js/src/App.tsx +++ b/apps/endringsmelding-frontend/src/main/js/src/App.tsx @@ -12,7 +12,7 @@ const App = () => (
} /> } /> - } /> + } /> ); diff --git a/apps/endringsmelding-frontend/src/main/js/src/components/search/Search.tsx b/apps/endringsmelding-frontend/src/main/js/src/components/search/Search.tsx index 2adedcd8285..8250405d593 100644 --- a/apps/endringsmelding-frontend/src/main/js/src/components/search/Search.tsx +++ b/apps/endringsmelding-frontend/src/main/js/src/components/search/Search.tsx @@ -9,7 +9,7 @@ import { WarningAlert, WarningAlertstripe, } from '@navikt/dolly-komponenter'; -import { useIdentSearch } from '@/useIdentSearch'; +import _ from 'lodash'; import { Action } from '@/pages/endringsmelding-page/form/endringsmelding-form/EndringsmeldingReducer'; const Search = styled.div` @@ -57,18 +57,68 @@ const StyledWarning = styled(WarningAlertstripe)` width: -webkit-fill-available; `; -export default ({ labels, onChange, setMiljoer, dispatch }: Props) => { +export default ({ labels, onChange, dispatch, setMiljoer }: Props) => { const [value, setValue] = useState(''); const [search, setSearch] = useState(null); + const [response, setResponse] = useState(null); + const [loading, setLoading] = useState(null); + const [error, setError] = useState(null); - const { error, identer, loading } = useIdentSearch(search); + const renderAlert = () => { + if (_.isEmpty(response?.miljoer)) { + return null; + } else if (error) { + return ; + } else if (response.miljoer.length === 0) { + return ; + } else { + return ; + } + }; + + const hentMiljoeInfo = async (ident: string) => { + setError(false); + setLoading(true); + return fetch(`/endringsmelding-service/api/v1/ident/miljoer`, { + method: 'POST', + headers: { 'Content-Type': 'application/json' }, + body: JSON.stringify({ ident: ident }), + }) + .then(async (res) => { + setLoading(false); + const jsonResponse = await res.json(); + setResponse(jsonResponse?.[0]); + }) + .catch((reason) => { + console.error(reason); + setLoading(false); + setError(true); + if (reason?.response?.status === 401 || reason?.response?.status === 403) { + console.error('Auth feilet'); + } + if (reason.status === 404 || reason.response?.status === 404) { + if (reason.response?.data?.error) { + throw new Error(reason.response?.data?.error); + } + } + throw new Error(`Henting av data fra endringsmelding-service feilet.`); + }); + }; useEffect(() => { - setMiljoer(identer?.map((ident) => ident.miljoe)); + if (search && search.length === 11) { + hentMiljoeInfo(search); + } else { + setError('Ident må være 11 siffer.'); + } + }, [search]); + + useEffect(() => { + setMiljoer(response?.miljoer); error ? dispatch({ type: Action.SET_HENT_MILJOER_ERROR_ACTION }) : dispatch({ type: Action.SET_HENT_MILJOER_SUCCESS_ACTION }); - }, [identer, error]); + }, [response, error]); return ( @@ -83,24 +133,17 @@ export default ({ labels, onChange, setMiljoer, dispatch }: P }} /> setSearch(value)} + onClick={(event: any) => { + event.preventDefault(); + setSearch(value); + }} disabled={loading || isSyntheticIdent(value)} loading={loading} > {labels.button} {isSyntheticIdent(value) && } - - {!identer ? null : identer.length === 0 ? ( - error ? ( - - ) : ( - - ) - ) : ( - - )} - + {renderAlert()} ); }; diff --git a/apps/endringsmelding-frontend/src/main/js/src/pages/endringsmelding-page/form/dodsmelding-form/DodsmeldingForm.tsx b/apps/endringsmelding-frontend/src/main/js/src/pages/endringsmelding-page/form/dodsmelding-form/DodsmeldingForm.tsx index 0d93b4705fb..23cc720de40 100644 --- a/apps/endringsmelding-frontend/src/main/js/src/pages/endringsmelding-page/form/dodsmelding-form/DodsmeldingForm.tsx +++ b/apps/endringsmelding-frontend/src/main/js/src/pages/endringsmelding-page/form/dodsmelding-form/DodsmeldingForm.tsx @@ -36,11 +36,11 @@ export default () => { ident: state.ident.trim(), handling: state.handling, }, - state.miljoer + state.miljoer, ); const getSuccessMessage = () => { - const miljoer = state.miljoer?.join(', '); + const miljoer = state.miljoer; if (state.handling === 'SETTE_DOEDSDATO') { return `Dødsmelding for ident ${state.ident} ble sendt til miljø ${miljoer}.`; } @@ -61,6 +61,9 @@ export default () => { getSuccessMessage={getSuccessMessage} setMiljoer={(miljoer) => { dispatch({ type: Action.SET_MILJOER_OPTIONS_ACTION, value: miljoer }); + if (miljoer?.length > 0) { + dispatch({ type: Action.SET_MILJOER_ACTION, value: [miljoer[0]] }); + } }} > diff --git a/apps/endringsmelding-frontend/src/main/js/src/pages/endringsmelding-page/form/fodselsmelding-from/FodselsmeldingForm.tsx b/apps/endringsmelding-frontend/src/main/js/src/pages/endringsmelding-page/form/fodselsmelding-from/FodselsmeldingForm.tsx index 4987293da2b..fb602d8ffc2 100644 --- a/apps/endringsmelding-frontend/src/main/js/src/pages/endringsmelding-page/form/fodselsmelding-from/FodselsmeldingForm.tsx +++ b/apps/endringsmelding-frontend/src/main/js/src/pages/endringsmelding-page/form/fodselsmelding-from/FodselsmeldingForm.tsx @@ -39,7 +39,7 @@ export default () => { foedselsdato: state.foedselsdato, kjoenn: state.kjoenType, }, - state.miljoer + state.miljoer, ).then((ident) => { dispatch({ type: Action.SET_BARNS_IDENT, value: ident.trim() }); return Promise.resolve(ident); @@ -60,6 +60,10 @@ export default () => { getSuccessMessage={getSuccessMessage} setMiljoer={(miljoer) => { dispatch({ type: Action.SET_MILJOER_OPTIONS_ACTION, value: miljoer }); + + if (miljoer?.length > 0) { + dispatch({ type: Action.SET_MILJOER_ACTION, value: [miljoer[0]] }); + } }} > diff --git a/apps/endringsmelding-frontend/src/main/js/src/useIdentSearch.tsx b/apps/endringsmelding-frontend/src/main/js/src/useIdentSearch.tsx deleted file mode 100644 index 76e678a3e15..00000000000 --- a/apps/endringsmelding-frontend/src/main/js/src/useIdentSearch.tsx +++ /dev/null @@ -1,34 +0,0 @@ -import useSWR from 'swr'; -import axios from 'axios'; - -const fetcher = (url, headers) => - axios - .get(url, { headers: headers }) - .then((res) => { - return res.data; - }) - .catch((reason) => { - if (reason?.response?.status === 401 || reason?.response?.status === 403) { - console.error('Auth feilet'); - } - if (reason.status === 404 || reason.response?.status === 404) { - if (reason.response?.data?.error) { - throw new Error(reason.response?.data?.error); - } - } - throw new Error(`Henting av data fra ${url} feilet.`); - }); - -const getIdentSearchUrl = (ident) => { - return ident ? `/endringsmelding-service/api/v1/identer/${ident}/miljoer` : null; -}; - -export const useIdentSearch = (ident) => { - const { data, isLoading, error } = useSWR(getIdentSearchUrl(ident), fetcher); - - return { - identer: data, - loading: isLoading, - error: error, - }; -}; diff --git a/apps/endringsmelding-frontend/src/main/resources/logback-spring.xml b/apps/endringsmelding-frontend/src/main/resources/logback-spring.xml index 52c15597b3c..9ebcb909c3d 100644 --- a/apps/endringsmelding-frontend/src/main/resources/logback-spring.xml +++ b/apps/endringsmelding-frontend/src/main/resources/logback-spring.xml @@ -36,5 +36,4 @@ - \ No newline at end of file diff --git a/apps/endringsmelding-service/src/main/java/no/nav/testnav/endringsmeldingservice/EndringsmeldingServiceApplicationStarter.java b/apps/endringsmelding-service/src/main/java/no/nav/testnav/endringsmeldingservice/EndringsmeldingServiceApplicationStarter.java index ba8d360a362..5f6bc7c91ce 100644 --- a/apps/endringsmelding-service/src/main/java/no/nav/testnav/endringsmeldingservice/EndringsmeldingServiceApplicationStarter.java +++ b/apps/endringsmelding-service/src/main/java/no/nav/testnav/endringsmeldingservice/EndringsmeldingServiceApplicationStarter.java @@ -17,4 +17,4 @@ public class EndringsmeldingServiceApplicationStarter { public static void main(String[] args) { SpringApplication.run(EndringsmeldingServiceApplicationStarter.class, args); } -} \ No newline at end of file +} diff --git a/apps/endringsmelding-service/src/main/java/no/nav/testnav/endringsmeldingservice/consumer/TpsMessagingConsumer.java b/apps/endringsmelding-service/src/main/java/no/nav/testnav/endringsmeldingservice/consumer/TpsMessagingConsumer.java index 05ac4a5ee1d..9888efcefc9 100644 --- a/apps/endringsmelding-service/src/main/java/no/nav/testnav/endringsmeldingservice/consumer/TpsMessagingConsumer.java +++ b/apps/endringsmelding-service/src/main/java/no/nav/testnav/endringsmeldingservice/consumer/TpsMessagingConsumer.java @@ -19,6 +19,8 @@ import no.nav.testnav.libs.data.tpsmessagingservice.v1.IdentMiljoeDTO; import no.nav.testnav.libs.data.tpsmessagingservice.v1.PersonDTO; import no.nav.testnav.libs.data.tpsmessagingservice.v1.PersonMiljoeDTO; +import no.nav.testnav.endringsmeldingservice.domain.IdenterRequest; +import no.nav.testnav.libs.data.tpsmessagingservice.v1.TpsIdentStatusDTO; import no.nav.testnav.libs.reactivesecurity.exchange.TokenExchange; import no.nav.testnav.libs.securitycore.domain.ServerProperties; import org.springframework.http.MediaType; @@ -64,10 +66,10 @@ public TpsMessagingConsumer( .build(); } - public Flux hentMiljoer(String ident) { // Skal ryddes til slutt + public Flux hentMiljoer(IdenterRequest body) { // Skal ryddes til slutt return accessTokenService .exchange(serverProperties) - .flatMapMany(accessToken -> new GetIdentEnvironmentsCommand(webClient, ident, accessToken.getTokenValue()).call()); + .flatMapMany(accessToken -> new GetIdentEnvironmentsCommand(webClient, body.ident(), accessToken.getTokenValue()).call()); } public Flux getEksistererPerson(Set identer, Set miljoer) { diff --git a/apps/endringsmelding-service/src/main/java/no/nav/testnav/endringsmeldingservice/consumer/command/GetIdentEnvironmentsCommand.java b/apps/endringsmelding-service/src/main/java/no/nav/testnav/endringsmeldingservice/consumer/command/GetIdentEnvironmentsCommand.java index c0c14e4e837..b11c0792820 100644 --- a/apps/endringsmelding-service/src/main/java/no/nav/testnav/endringsmeldingservice/consumer/command/GetIdentEnvironmentsCommand.java +++ b/apps/endringsmelding-service/src/main/java/no/nav/testnav/endringsmeldingservice/consumer/command/GetIdentEnvironmentsCommand.java @@ -2,7 +2,7 @@ import lombok.RequiredArgsConstructor; import lombok.extern.slf4j.Slf4j; -import no.nav.testnav.libs.data.tpsmessagingservice.v1.PersonMiljoeDTO; +import no.nav.testnav.libs.data.tpsmessagingservice.v1.TpsIdentStatusDTO; import no.nav.testnav.libs.reactivecore.utils.WebClientFilter; import org.springframework.http.HttpHeaders; import org.springframework.web.reactive.function.client.WebClient; @@ -14,20 +14,22 @@ @Slf4j @RequiredArgsConstructor -public class GetIdentEnvironmentsCommand implements Callable> { +public class GetIdentEnvironmentsCommand implements Callable> { private final WebClient webClient; private final String ident; private final String token; @Override - public Flux call() { + public Flux call() { return webClient .get() - .uri(builder -> builder.path("/api/v1/personer/{ident}") + .uri(builder -> builder.path("/api/v1/identer") + .queryParam("identer", ident) + .queryParam("includeProd", false) .build(ident)) .header(HttpHeaders.AUTHORIZATION, "Bearer " + token) .retrieve() - .bodyToFlux(PersonMiljoeDTO.class) + .bodyToFlux(TpsIdentStatusDTO.class) .retryWhen(Retry.backoff(3, Duration.ofSeconds(5)) .filter(WebClientFilter::is5xxException)); } diff --git a/apps/endringsmelding-service/src/main/java/no/nav/testnav/endringsmeldingservice/controller/IdentMiljoeController.java b/apps/endringsmelding-service/src/main/java/no/nav/testnav/endringsmeldingservice/controller/IdentMiljoeController.java index 2eda8247e5d..2b48adc7daa 100644 --- a/apps/endringsmelding-service/src/main/java/no/nav/testnav/endringsmeldingservice/controller/IdentMiljoeController.java +++ b/apps/endringsmelding-service/src/main/java/no/nav/testnav/endringsmeldingservice/controller/IdentMiljoeController.java @@ -1,23 +1,26 @@ package no.nav.testnav.endringsmeldingservice.controller; +import io.swagger.v3.oas.annotations.Operation; import lombok.RequiredArgsConstructor; import no.nav.testnav.endringsmeldingservice.consumer.TpsMessagingConsumer; -import no.nav.testnav.libs.data.tpsmessagingservice.v1.PersonMiljoeDTO; -import org.springframework.web.bind.annotation.GetMapping; -import org.springframework.web.bind.annotation.PathVariable; +import no.nav.testnav.endringsmeldingservice.domain.IdenterRequest; +import no.nav.testnav.libs.data.tpsmessagingservice.v1.TpsIdentStatusDTO; +import org.springframework.web.bind.annotation.PostMapping; +import org.springframework.web.bind.annotation.RequestBody; import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.RestController; import reactor.core.publisher.Flux; @RestController -@RequestMapping("/api/v1/identer/{ident}/miljoer") +@RequestMapping("/api/v1/ident") @RequiredArgsConstructor public class IdentMiljoeController { private final TpsMessagingConsumer tpsMessagingConsumer; - @GetMapping - public Flux getMiljoer(@PathVariable String ident) { - return tpsMessagingConsumer.hentMiljoer(ident); + @PostMapping("/miljoer") + @Operation(description = "Sjekk om ident finnes i miljøer") + public Flux identFinnesIMiljoer(@RequestBody IdenterRequest body) { + return tpsMessagingConsumer.hentMiljoer(body); } -} +} \ No newline at end of file diff --git a/apps/endringsmelding-service/src/main/java/no/nav/testnav/endringsmeldingservice/domain/IdenterRequest.java b/apps/endringsmelding-service/src/main/java/no/nav/testnav/endringsmeldingservice/domain/IdenterRequest.java new file mode 100644 index 00000000000..1d2c9fc4589 --- /dev/null +++ b/apps/endringsmelding-service/src/main/java/no/nav/testnav/endringsmeldingservice/domain/IdenterRequest.java @@ -0,0 +1,4 @@ +package no.nav.testnav.endringsmeldingservice.domain; + +public record IdenterRequest(String ident) { +} diff --git a/apps/endringsmelding-service/src/main/resources/logback-spring.xml b/apps/endringsmelding-service/src/main/resources/logback-spring.xml index 52c15597b3c..de8c7308e9c 100644 --- a/apps/endringsmelding-service/src/main/resources/logback-spring.xml +++ b/apps/endringsmelding-service/src/main/resources/logback-spring.xml @@ -35,6 +35,4 @@ - - \ No newline at end of file From 44f32638e5491101ac58d17355f26518e36f3ae2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Kristen=20H=C3=A6rum?= Date: Tue, 2 Apr 2024 10:53:24 +0200 Subject: [PATCH 16/20] Add new AzureAdApplication and GitHub workflow files (#3451) Lagt til team-dolly-lokal-app i monorepo --- .../workflows/app.team-dolly-lokal-app.yml | 21 +++++++++++++++++++ .nais/team-dolly-lokal-app.yml | 17 +++++++++++++++ 2 files changed, 38 insertions(+) create mode 100644 .github/workflows/app.team-dolly-lokal-app.yml create mode 100644 .nais/team-dolly-lokal-app.yml diff --git a/.github/workflows/app.team-dolly-lokal-app.yml b/.github/workflows/app.team-dolly-lokal-app.yml new file mode 100644 index 00000000000..efd2f58b851 --- /dev/null +++ b/.github/workflows/app.team-dolly-lokal-app.yml @@ -0,0 +1,21 @@ +name: team-dolly-lokal-app + +on: + push: + paths: + - .nais/team-dolly-lokal-app.yml + - .github/workflows/app.team-dolly-lokal-app.yml + +jobs: + deploy-redis: + name: Deploy team-dolly-lokal-app + runs-on: ubuntu-latest + permissions: + contents: read + id-token: write + steps: + - uses: actions/checkout@v4 + - uses: nais/deploy/actions/deploy@v2 + env: + CLUSTER: dev-gcp + RESOURCE: .nais/team-dolly-lokal-app.yml \ No newline at end of file diff --git a/.nais/team-dolly-lokal-app.yml b/.nais/team-dolly-lokal-app.yml new file mode 100644 index 00000000000..12183a601a9 --- /dev/null +++ b/.nais/team-dolly-lokal-app.yml @@ -0,0 +1,17 @@ +apiVersion: nais.io/v1 +kind: AzureAdApplication +metadata: + labels: + team: dolly + name: team-dolly-lokal-app + namespace: dolly +spec: + logoutUrl: https://localhost:8080/oauth2/logout + preAuthorizedApplications: + - application: testnorge-oversikt-frontend + cluster: dev-gcp + namespace: dolly + replyUrls: + - url: http://localhost:8080/login/oauth2/code/aad + secretName: azuread-team-dolly-lokal-app + tenant: nav.no \ No newline at end of file From b4808db1f36ddc9267a5a262e429f2194ba94fb3 Mon Sep 17 00:00:00 2001 From: kristenhaerum Date: Tue, 2 Apr 2024 11:18:32 +0200 Subject: [PATCH 17/20] Oppdatert tilganger --- .github/workflows/app.team-dolly-lokal-app.yml | 2 +- .nais/team-dolly-lokal-app.yml | 3 +++ 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/.github/workflows/app.team-dolly-lokal-app.yml b/.github/workflows/app.team-dolly-lokal-app.yml index efd2f58b851..0d7e273dd1f 100644 --- a/.github/workflows/app.team-dolly-lokal-app.yml +++ b/.github/workflows/app.team-dolly-lokal-app.yml @@ -7,7 +7,7 @@ on: - .github/workflows/app.team-dolly-lokal-app.yml jobs: - deploy-redis: + deploy: name: Deploy team-dolly-lokal-app runs-on: ubuntu-latest permissions: diff --git a/.nais/team-dolly-lokal-app.yml b/.nais/team-dolly-lokal-app.yml index 12183a601a9..9f1015286ff 100644 --- a/.nais/team-dolly-lokal-app.yml +++ b/.nais/team-dolly-lokal-app.yml @@ -6,6 +6,9 @@ metadata: name: team-dolly-lokal-app namespace: dolly spec: + azure: + application: + allowAllUsers: true logoutUrl: https://localhost:8080/oauth2/logout preAuthorizedApplications: - application: testnorge-oversikt-frontend From 715b353b43dde37876fdec14fa43d37f31131acd Mon Sep 17 00:00:00 2001 From: kristenhaerum Date: Tue, 2 Apr 2024 11:22:30 +0200 Subject: [PATCH 18/20] Revert "Oppdatert tilganger" This reverts commit b4808db1f36ddc9267a5a262e429f2194ba94fb3. --- .github/workflows/app.team-dolly-lokal-app.yml | 2 +- .nais/team-dolly-lokal-app.yml | 3 --- 2 files changed, 1 insertion(+), 4 deletions(-) diff --git a/.github/workflows/app.team-dolly-lokal-app.yml b/.github/workflows/app.team-dolly-lokal-app.yml index 0d7e273dd1f..efd2f58b851 100644 --- a/.github/workflows/app.team-dolly-lokal-app.yml +++ b/.github/workflows/app.team-dolly-lokal-app.yml @@ -7,7 +7,7 @@ on: - .github/workflows/app.team-dolly-lokal-app.yml jobs: - deploy: + deploy-redis: name: Deploy team-dolly-lokal-app runs-on: ubuntu-latest permissions: diff --git a/.nais/team-dolly-lokal-app.yml b/.nais/team-dolly-lokal-app.yml index 9f1015286ff..12183a601a9 100644 --- a/.nais/team-dolly-lokal-app.yml +++ b/.nais/team-dolly-lokal-app.yml @@ -6,9 +6,6 @@ metadata: name: team-dolly-lokal-app namespace: dolly spec: - azure: - application: - allowAllUsers: true logoutUrl: https://localhost:8080/oauth2/logout preAuthorizedApplications: - application: testnorge-oversikt-frontend From 80bc088eb385e452334c3a56b3936d8f14a4c001 Mon Sep 17 00:00:00 2001 From: kristenhaerum Date: Tue, 2 Apr 2024 11:23:52 +0200 Subject: [PATCH 19/20] Reapply "Oppdatert tilganger" This reverts commit 715b353b43dde37876fdec14fa43d37f31131acd. --- .github/workflows/app.team-dolly-lokal-app.yml | 2 +- .nais/team-dolly-lokal-app.yml | 3 +++ 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/.github/workflows/app.team-dolly-lokal-app.yml b/.github/workflows/app.team-dolly-lokal-app.yml index efd2f58b851..0d7e273dd1f 100644 --- a/.github/workflows/app.team-dolly-lokal-app.yml +++ b/.github/workflows/app.team-dolly-lokal-app.yml @@ -7,7 +7,7 @@ on: - .github/workflows/app.team-dolly-lokal-app.yml jobs: - deploy-redis: + deploy: name: Deploy team-dolly-lokal-app runs-on: ubuntu-latest permissions: diff --git a/.nais/team-dolly-lokal-app.yml b/.nais/team-dolly-lokal-app.yml index 12183a601a9..9f1015286ff 100644 --- a/.nais/team-dolly-lokal-app.yml +++ b/.nais/team-dolly-lokal-app.yml @@ -6,6 +6,9 @@ metadata: name: team-dolly-lokal-app namespace: dolly spec: + azure: + application: + allowAllUsers: true logoutUrl: https://localhost:8080/oauth2/logout preAuthorizedApplications: - application: testnorge-oversikt-frontend From e86810f4ba0e363913687959fdf082d8337cf184 Mon Sep 17 00:00:00 2001 From: kristenhaerum Date: Tue, 2 Apr 2024 11:24:32 +0200 Subject: [PATCH 20/20] Oppdatert tilganger II --- .nais/team-dolly-lokal-app.yml | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/.nais/team-dolly-lokal-app.yml b/.nais/team-dolly-lokal-app.yml index 9f1015286ff..d553d559dca 100644 --- a/.nais/team-dolly-lokal-app.yml +++ b/.nais/team-dolly-lokal-app.yml @@ -6,9 +6,7 @@ metadata: name: team-dolly-lokal-app namespace: dolly spec: - azure: - application: - allowAllUsers: true + allowAllUsers: true logoutUrl: https://localhost:8080/oauth2/logout preAuthorizedApplications: - application: testnorge-oversikt-frontend