From 50d39c41026096b0b69c8861c28cc0883c02a8c8 Mon Sep 17 00:00:00 2001 From: "Anders.Vik.Lysne" Date: Fri, 15 Nov 2024 11:47:57 +0100 Subject: [PATCH 1/9] Legg til ny mottaker i graphql produsent schema. oppdater docs --- app/src/main/resources/produsent.graphql | 23 ++++++++++++++++++++--- 1 file changed, 20 insertions(+), 3 deletions(-) diff --git a/app/src/main/resources/produsent.graphql b/app/src/main/resources/produsent.graphql index 2c214ee80..e7d5991f5 100644 --- a/app/src/main/resources/produsent.graphql +++ b/app/src/main/resources/produsent.graphql @@ -1691,22 +1691,39 @@ Vi har implementert det på denne måten fordi GraphQL ikke støtter union-typer """ input MottakerInput @ExactlyOneFieldGiven { altinn: AltinnMottakerInput + altinnRessurs: AltinnRessursMottakerInput naermesteLeder: NaermesteLederMottakerInput } """ -Spesifiser mottaker ved hjelp av tilganger i Altinn. Enhver som har den gitte tilgangen vil +Spesifiser mottaker ved hjelp av tilganger i Altinn 2. Enhver som har den gitte tilgangen vil kunne se notifikasjone. Tilgangssjekken utføres hver gang en bruker ser på notifikasjoner. Det betyr at hvis en -bruker mister en Altinn-tilgang, så vil de hverken se historiske eller nye notifikasjone knyttet til den Altinn-tilgangen. -Og motsatt, hvis en bruker får en Altinn-tilgang, vil de se tidligere notifikasjoner for den Altinn-tilgangen. +bruker mister en Altinn 2-tilgang, så vil de hverken se historiske eller nye notifikasjone knyttet til den Altinn 2-tilgangen. +Og motsatt, hvis en bruker får en Altinn 2-tilgang, vil de se tidligere notifikasjoner for den Altinn2-tilgangen. + +Altinn 2 skal avvikles innen juni 2026, og denne mottakeren vil da også forsvinne. Vi anbefaler å migrere til Altinn 3, og ta i bruk +AltinnRessursMottakerInput. Når dere migrerer til Altinn3 kan vi sørge for at brukere fortsatt får tilgang til gamle saker og notifikasjoner, så lenge vi blir informert +om hvilke Altinn 3 ressurser som tilsvarer hvilke Altinn 2 tjenester. Ta gjerne kontakt med oss og gi beskjed. """ input AltinnMottakerInput { serviceCode: String! serviceEdition: String! } +""" +Spesifiser mottaker ved hjelp av tilganger i Altinn 3. Enhver som har den gitte tilgangen vil +kunne se notifikasjone. + +Tilgangssjekken utføres hver gang en bruker ser på notifikasjoner. Det betyr at hvis en +bruker mister en Altinn 3-tilgang, så vil de hverken se historiske eller nye notifikasjone knyttet til den Altinn 3-tilgangen. +Og motsatt, hvis en bruker får en Altinn 3-tilgang, vil de se tidligere notifikasjoner for den Altinn2-tilgangen. +""" +input AltinnRessursMottakerInput { + ressursId: String! +} + """ Spesifiser mottaker ved hjelp av fødselsnummer. Fødselsnummeret er det til nærmeste leder. Det er kun denne personen som potensielt kan se notifikasjonen. Det er videre en sjekk for å se om denne personen fortsatt er nærmeste leder From aaa7b2b11c67bb7ec4ce4a54594ad0ae7381aab4 Mon Sep 17 00:00:00 2001 From: "Anders.Vik.Lysne" Date: Fri, 15 Nov 2024 15:23:27 +0100 Subject: [PATCH 2/9] =?UTF-8?q?Lagt=20til=20ny=20mottaker=20p=C3=A5=20prod?= =?UTF-8?q?usentApi.=20skrevet=20tester?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../notifikasjon/bruker/BrukerRepository.kt | 9 ++++ .../notifikasjon/hendelse/Hendelse.kt | 7 +++ .../produsenter/ProdusentRegister.kt | 27 ++++++++++++ .../produsenter/ProdusentRegisterImpl.kt | 1 + .../produsent/ProdusentRepository.kt | 24 +++++++++++ .../produsent/api/MutationNySak.kt | 2 + .../produsent/api/NyNotifikasjonFelles.kt | 30 ++++++++++--- .../produsent/api/QueryNotifikasjoner.kt | 16 +++++++ .../statistikk/StatistikkModel.kt | 1 + ...ottaker_altinn_ressurs_enkeltrettighet.sql | 25 +++++++++++ app/src/main/resources/produsent.graphql | 6 +++ .../notifikasjon/produsent/api/Common.kt | 1 + .../api/NyBeskjedFlereMottakereTests.kt | 43 +++++++++++++++---- 13 files changed, 178 insertions(+), 14 deletions(-) create mode 100644 app/src/main/resources/db/migration/produsent_model/V28__mottaker_altinn_ressurs_enkeltrettighet.sql diff --git a/app/src/main/kotlin/no/nav/arbeidsgiver/notifikasjon/bruker/BrukerRepository.kt b/app/src/main/kotlin/no/nav/arbeidsgiver/notifikasjon/bruker/BrukerRepository.kt index c587d16a8..c3378fbea 100644 --- a/app/src/main/kotlin/no/nav/arbeidsgiver/notifikasjon/bruker/BrukerRepository.kt +++ b/app/src/main/kotlin/no/nav/arbeidsgiver/notifikasjon/bruker/BrukerRepository.kt @@ -1145,6 +1145,15 @@ class BrukerRepositoryImpl( altinnTilgang = "${mottaker.serviceCode}:${mottaker.serviceEdition}" ) } + + is HendelseModel.AltinnRessursMottaker -> { + storeAltinnMottaker( + notifikasjonId = notifikasjonId, + sakId = sakId, + orgNr = mottaker.virksomhetsnummer, + altinnTilgang = mottaker.ressursId + ) + } } } diff --git a/app/src/main/kotlin/no/nav/arbeidsgiver/notifikasjon/hendelse/Hendelse.kt b/app/src/main/kotlin/no/nav/arbeidsgiver/notifikasjon/hendelse/Hendelse.kt index 5626c136f..393645bb7 100644 --- a/app/src/main/kotlin/no/nav/arbeidsgiver/notifikasjon/hendelse/Hendelse.kt +++ b/app/src/main/kotlin/no/nav/arbeidsgiver/notifikasjon/hendelse/Hendelse.kt @@ -724,6 +724,12 @@ object HendelseModel { val virksomhetsnummer: String, ) : Mottaker() + @JsonTypeName("altinnRessurs") + data class AltinnRessursMottaker( + val virksomhetsnummer: String, + val ressursId: String, + ) : Mottaker() + @JsonTypeInfo(use = JsonTypeInfo.Id.NAME) sealed class EksterntVarsel { abstract val varselId: UUID @@ -804,4 +810,5 @@ val HendelseModel.Mottaker.virksomhetsnummer: String get() = when (this) { is HendelseModel.NærmesteLederMottaker -> this.virksomhetsnummer is HendelseModel.AltinnMottaker -> this.virksomhetsnummer + is HendelseModel.AltinnRessursMottaker -> this.virksomhetsnummer } diff --git a/app/src/main/kotlin/no/nav/arbeidsgiver/notifikasjon/infrastruktur/produsenter/ProdusentRegister.kt b/app/src/main/kotlin/no/nav/arbeidsgiver/notifikasjon/infrastruktur/produsenter/ProdusentRegister.kt index a02292e9b..874e52900 100644 --- a/app/src/main/kotlin/no/nav/arbeidsgiver/notifikasjon/infrastruktur/produsenter/ProdusentRegister.kt +++ b/app/src/main/kotlin/no/nav/arbeidsgiver/notifikasjon/infrastruktur/produsenter/ProdusentRegister.kt @@ -1,6 +1,8 @@ package no.nav.arbeidsgiver.notifikasjon.infrastruktur.produsenter +import no.nav.arbeidsgiver.notifikasjon.hendelse.HendelseModel import no.nav.arbeidsgiver.notifikasjon.hendelse.HendelseModel.AltinnMottaker +import no.nav.arbeidsgiver.notifikasjon.hendelse.HendelseModel.AltinnRessursMottaker import no.nav.arbeidsgiver.notifikasjon.hendelse.HendelseModel.Mottaker import no.nav.arbeidsgiver.notifikasjon.hendelse.HendelseModel.NærmesteLederMottaker import no.nav.arbeidsgiver.notifikasjon.infrastruktur.azuread.AppName @@ -51,6 +53,25 @@ data class ServicecodeDefinisjon( override fun hashCode(): Int = Objects.hash(code, version) } +data class RessursIdDefinisjon( + val ressursId: String, +) : MottakerDefinisjon() { + override fun akseptererMottaker(mottaker: Mottaker): Boolean = + when (mottaker) { + is AltinnRessursMottaker -> + mottaker.ressursId == ressursId + else -> false + } + + override fun equals(other: Any?): Boolean = when { + this === other -> true + other is RessursIdDefinisjon -> this.ressursId == other.ressursId + else -> false + } + + override fun hashCode(): Int = Objects.hash(ressursId) +} + object NærmesteLederDefinisjon : MottakerDefinisjon() { override fun akseptererMottaker(mottaker: Mottaker): Boolean = when (mottaker) { @@ -65,10 +86,16 @@ object MottakerRegister { return MOTTAKER_REGISTER.filterIsInstance() } + val ressursIdDefinisjoner: List + get() { + return MOTTAKER_REGISTER.filterIsInstance() + } + fun erDefinert(mottakerDefinisjon: MottakerDefinisjon): Boolean = when (mottakerDefinisjon) { is ServicecodeDefinisjon -> servicecodeDefinisjoner.contains(mottakerDefinisjon) is NærmesteLederDefinisjon -> true + is RessursIdDefinisjon -> ressursIdDefinisjoner.contains(mottakerDefinisjon) } } diff --git a/app/src/main/kotlin/no/nav/arbeidsgiver/notifikasjon/infrastruktur/produsenter/ProdusentRegisterImpl.kt b/app/src/main/kotlin/no/nav/arbeidsgiver/notifikasjon/infrastruktur/produsenter/ProdusentRegisterImpl.kt index 06120b9be..3e2358b27 100644 --- a/app/src/main/kotlin/no/nav/arbeidsgiver/notifikasjon/infrastruktur/produsenter/ProdusentRegisterImpl.kt +++ b/app/src/main/kotlin/no/nav/arbeidsgiver/notifikasjon/infrastruktur/produsenter/ProdusentRegisterImpl.kt @@ -25,6 +25,7 @@ val FAGER_TESTPRODUSENT = Produsent( "Inntektsmelding opplæringspenger", ), tillatteMottakere = listOf( + RessursIdDefinisjon(ressursId = "test-fager"), ServicecodeDefinisjon(code = "4936", version = "1"), ServicecodeDefinisjon(code = "5516", version = "1", description = "Midlertidig lønnstilskudd"), ServicecodeDefinisjon(code = "5516", version = "2", description = "Varig lønnstilskudd'"), diff --git a/app/src/main/kotlin/no/nav/arbeidsgiver/notifikasjon/produsent/ProdusentRepository.kt b/app/src/main/kotlin/no/nav/arbeidsgiver/notifikasjon/produsent/ProdusentRepository.kt index 896ee74e5..580ced04a 100644 --- a/app/src/main/kotlin/no/nav/arbeidsgiver/notifikasjon/produsent/ProdusentRepository.kt +++ b/app/src/main/kotlin/no/nav/arbeidsgiver/notifikasjon/produsent/ProdusentRepository.kt @@ -4,6 +4,7 @@ import com.fasterxml.jackson.module.kotlin.readValue import no.nav.arbeidsgiver.notifikasjon.hendelse.HardDeletedRepository import no.nav.arbeidsgiver.notifikasjon.hendelse.HendelseModel import no.nav.arbeidsgiver.notifikasjon.hendelse.HendelseModel.AltinnMottaker +import no.nav.arbeidsgiver.notifikasjon.hendelse.HendelseModel.AltinnRessursMottaker import no.nav.arbeidsgiver.notifikasjon.hendelse.HendelseModel.BeskjedOpprettet import no.nav.arbeidsgiver.notifikasjon.hendelse.HendelseModel.BrukerKlikket import no.nav.arbeidsgiver.notifikasjon.hendelse.HendelseModel.EksterntVarselFeilet @@ -234,6 +235,13 @@ class ProdusentRepositoryImpl( where md.notifikasjon_id = valgt_notifikasjon.id ), '[]'::jsonb) + || coalesce( + ( + select mar.mottakere::jsonb + from mottakere_altinn_ressurs_json mar + where mar.notifikasjon_id = valgt_notifikasjon.id + ), + '[]'::jsonb) ) as mottakere from valgt_notifikasjon """, @@ -855,6 +863,7 @@ class ProdusentRepositoryImpl( when (mottaker) { is NærmesteLederMottaker -> storeNærmesteLederMottaker(notifikasjonId, mottaker) is AltinnMottaker -> storeAltinnMottaker(notifikasjonId, mottaker) + is AltinnRessursMottaker -> storeAltinnRessursMottaker(notifikasjonId, mottaker) } } @@ -889,6 +898,21 @@ class ProdusentRepositoryImpl( } } + private fun Transaction.storeAltinnRessursMottaker(notifikasjonId: UUID, mottaker: AltinnRessursMottaker) { + executeUpdate( + """ + insert into mottaker_altinn_ressurs + (notifikasjon_id, virksomhet, ressursId) + values (?, ?, ?) + on conflict do nothing + """ + ) { + uuid(notifikasjonId) + text(mottaker.virksomhetsnummer) + text(mottaker.ressursId) + } + } + private suspend fun oppdaterModellEtterKalenderavtaleOpprettet(hendelse: KalenderavtaleOpprettet) { database.transaction { executeUpdate( diff --git a/app/src/main/kotlin/no/nav/arbeidsgiver/notifikasjon/produsent/api/MutationNySak.kt b/app/src/main/kotlin/no/nav/arbeidsgiver/notifikasjon/produsent/api/MutationNySak.kt index f899d91e1..dfd85608f 100644 --- a/app/src/main/kotlin/no/nav/arbeidsgiver/notifikasjon/produsent/api/MutationNySak.kt +++ b/app/src/main/kotlin/no/nav/arbeidsgiver/notifikasjon/produsent/api/MutationNySak.kt @@ -5,6 +5,7 @@ import com.fasterxml.jackson.annotation.JsonTypeName import graphql.schema.idl.RuntimeWiring import no.nav.arbeidsgiver.notifikasjon.hendelse.HendelseModel import no.nav.arbeidsgiver.notifikasjon.hendelse.HendelseModel.AltinnMottaker +import no.nav.arbeidsgiver.notifikasjon.hendelse.HendelseModel.AltinnRessursMottaker import no.nav.arbeidsgiver.notifikasjon.hendelse.HendelseModel.Mottaker import no.nav.arbeidsgiver.notifikasjon.hendelse.HendelseModel.NyStatusSak import no.nav.arbeidsgiver.notifikasjon.hendelse.HendelseModel.NærmesteLederMottaker @@ -227,6 +228,7 @@ private fun MottakerInput.sammeSom(mottaker: Mottaker): Boolean { is NærmesteLederMottaker -> mottaker.ansattFnr == this.naermesteLeder?.ansattFnr && mottaker.naermesteLederFnr == this.naermesteLeder.naermesteLederFnr + is AltinnRessursMottaker -> mottaker.ressursId == this.altinnRessurs?.ressursId } } diff --git a/app/src/main/kotlin/no/nav/arbeidsgiver/notifikasjon/produsent/api/NyNotifikasjonFelles.kt b/app/src/main/kotlin/no/nav/arbeidsgiver/notifikasjon/produsent/api/NyNotifikasjonFelles.kt index d30c1b42a..070e4661f 100644 --- a/app/src/main/kotlin/no/nav/arbeidsgiver/notifikasjon/produsent/api/NyNotifikasjonFelles.kt +++ b/app/src/main/kotlin/no/nav/arbeidsgiver/notifikasjon/produsent/api/NyNotifikasjonFelles.kt @@ -2,6 +2,7 @@ package no.nav.arbeidsgiver.notifikasjon.produsent.api import no.nav.arbeidsgiver.notifikasjon.hendelse.HendelseModel import no.nav.arbeidsgiver.notifikasjon.hendelse.HendelseModel.AltinnMottaker +import no.nav.arbeidsgiver.notifikasjon.hendelse.HendelseModel.AltinnRessursMottaker import no.nav.arbeidsgiver.notifikasjon.hendelse.HendelseModel.AltinntjenesteVarselKontaktinfo import no.nav.arbeidsgiver.notifikasjon.hendelse.HendelseModel.EksterntVarsel import no.nav.arbeidsgiver.notifikasjon.hendelse.HendelseModel.EksterntVarselSendingsvindu @@ -162,23 +163,35 @@ internal data class AltinnMottakerInput( ) } +internal data class AltinnRessursMottakerInput( + val ressursId: String, +) { + fun tilDomene(virksomhetsnummer: String): Mottaker = + AltinnRessursMottaker( + ressursId = ressursId, + virksomhetsnummer = virksomhetsnummer + ) +} + internal class UkjentRolleException(message: String) : RuntimeException(message) internal data class MottakerInput( val altinn: AltinnMottakerInput?, val naermesteLeder: NaermesteLederMottakerInput?, + val altinnRessurs: AltinnRessursMottakerInput? ) { fun tilHendelseModel( virksomhetsnummer: String, ): Mottaker { - check(listOfNotNull(altinn, naermesteLeder).size == 1) { + check(listOfNotNull(altinn, naermesteLeder, altinnRessurs).size == 1) { "Ugyldig mottaker" } - return altinn?.tilDomene(virksomhetsnummer) - ?: (naermesteLeder?.tilDomene(virksomhetsnummer) - ?: throw IllegalArgumentException("Ugyldig mottaker")) + return altinnRessurs?.tilDomene(virksomhetsnummer) + ?: altinn?.tilDomene(virksomhetsnummer) + ?: naermesteLeder?.tilDomene(virksomhetsnummer) + ?: throw IllegalArgumentException("Ugyldig mottaker") } } @@ -213,7 +226,6 @@ internal fun EksterntVarselInput.SendetidspunktInput.somVinduOgTidspunkt(): Pair } - internal data class PaaminnelseInput( val tidspunkt: PaaminnelseTidspunktInput, val eksterneVarsler: List, @@ -223,7 +235,7 @@ internal data class PaaminnelseInput( frist: LocalDate?, startTidspunkt: LocalDateTime?, virksomhetsnummer: String, - ) : HendelseModel.Påminnelse = HendelseModel.Påminnelse( + ): HendelseModel.Påminnelse = HendelseModel.Påminnelse( tidspunkt = tidspunkt.tilDomene(notifikasjonOpprettetTidspunkt, frist, startTidspunkt), eksterneVarsler = eksterneVarsler.map { it.tilDomene(virksomhetsnummer) @@ -248,22 +260,26 @@ data class PaaminnelseTidspunktInput( frist, startTidspunkt, ) + etterOpprettelse != null -> HendelseModel.PåminnelseTidspunkt.createAndValidateEtterOpprettelse( etterOpprettelse, notifikasjonOpprettetTidspunkt, frist, startTidspunkt ) + foerFrist != null -> HendelseModel.PåminnelseTidspunkt.createAndValidateFørFrist( foerFrist, notifikasjonOpprettetTidspunkt, frist, ) + foerStartTidspunkt != null -> HendelseModel.PåminnelseTidspunkt.createAndValidateFørStartTidspunkt( foerStartTidspunkt, notifikasjonOpprettetTidspunkt, startTidspunkt, ) + else -> throw RuntimeException("Feil format") } } @@ -300,6 +316,7 @@ internal class PaaminnelseEksterntVarselInput( throw RuntimeException("mottaker-felt mangler for sms") } } + class Epost( val mottaker: EksterntVarselInput.Epost.Mottaker, val epostTittel: String, @@ -321,6 +338,7 @@ internal class PaaminnelseEksterntVarselInput( throw RuntimeException("mottaker mangler for epost") } } + data class Altinntjeneste( val mottaker: Mottaker, val tittel: String, diff --git a/app/src/main/kotlin/no/nav/arbeidsgiver/notifikasjon/produsent/api/QueryNotifikasjoner.kt b/app/src/main/kotlin/no/nav/arbeidsgiver/notifikasjon/produsent/api/QueryNotifikasjoner.kt index b2ef38eaa..7d1d96946 100644 --- a/app/src/main/kotlin/no/nav/arbeidsgiver/notifikasjon/produsent/api/QueryNotifikasjoner.kt +++ b/app/src/main/kotlin/no/nav/arbeidsgiver/notifikasjon/produsent/api/QueryNotifikasjoner.kt @@ -266,6 +266,7 @@ internal class QueryNotifikasjoner( return when (domene) { is HendelseModel.AltinnMottaker -> AltinnMottaker.fraDomene(domene) is HendelseModel.NærmesteLederMottaker -> NærmesteLederMottaker.fraDomene(domene) + is HendelseModel.AltinnRessursMottaker -> AltinnRessursMottaker.fraDomene(domene) } } } @@ -305,6 +306,21 @@ internal class QueryNotifikasjoner( } } + @JsonTypeName("AltinnRessursMottaker") + data class AltinnRessursMottaker( + val ressursId: String, + val virksomhetsnummer: String + ) : Mottaker(){ + companion object { + fun fraDomene(domene: HendelseModel.AltinnRessursMottaker): AltinnRessursMottaker { + return AltinnRessursMottaker( + ressursId = domene.ressursId, + virksomhetsnummer = domene.virksomhetsnummer + ) + } + } + } + @JsonTypeInfo(use = JsonTypeInfo.Id.NAME, property = "__typename") sealed interface MineNotifikasjonerResultat diff --git a/app/src/main/kotlin/no/nav/arbeidsgiver/notifikasjon/statistikk/StatistikkModel.kt b/app/src/main/kotlin/no/nav/arbeidsgiver/notifikasjon/statistikk/StatistikkModel.kt index 68f99dc2f..5662bc75a 100644 --- a/app/src/main/kotlin/no/nav/arbeidsgiver/notifikasjon/statistikk/StatistikkModel.kt +++ b/app/src/main/kotlin/no/nav/arbeidsgiver/notifikasjon/statistikk/StatistikkModel.kt @@ -522,6 +522,7 @@ fun List.oppsummering(): String = when (it) { is NærmesteLederMottaker -> "NærmesteLeder" is AltinnMottaker -> "Altinn:${it.serviceCode}:${it.serviceEdition}" + is HendelseModel.AltinnRessursMottaker -> "AltinnRessurs:${it.ressursId}" } } .sorted() diff --git a/app/src/main/resources/db/migration/produsent_model/V28__mottaker_altinn_ressurs_enkeltrettighet.sql b/app/src/main/resources/db/migration/produsent_model/V28__mottaker_altinn_ressurs_enkeltrettighet.sql new file mode 100644 index 000000000..be2dcbf00 --- /dev/null +++ b/app/src/main/resources/db/migration/produsent_model/V28__mottaker_altinn_ressurs_enkeltrettighet.sql @@ -0,0 +1,25 @@ +create table mottaker_altinn_ressurs +( + id bigserial primary key, + notifikasjon_id uuid not null references notifikasjon on delete cascade, + virksomhet text not null, + ressursId text not null +); + +create index mottaker_altinn_ressurs_notifikasjon_id_idx + on mottaker_altinn_ressurs (notifikasjon_id); + +create unique index mottaker_altinn_ressurs_unique + on mottaker_altinn_ressurs (notifikasjon_id, virksomhet, ressursId); + +create view mottakere_altinn_ressurs_json as +select notifikasjon_id, + json_agg( + json_build_object( + '@type', 'altinnRessurs', + 'virksomhetsnummer', virksomhet, + 'ressursId', ressursId + ) + ) as mottakere +from mottaker_altinn_ressurs +group by notifikasjon_id; \ No newline at end of file diff --git a/app/src/main/resources/produsent.graphql b/app/src/main/resources/produsent.graphql index e7d5991f5..c9d844c15 100644 --- a/app/src/main/resources/produsent.graphql +++ b/app/src/main/resources/produsent.graphql @@ -180,6 +180,7 @@ type Kalenderavtale { union Mottaker = | AltinnMottaker | NaermesteLederMottaker + | AltinnRessursMottaker type AltinnMottaker { serviceCode: String! @@ -193,6 +194,11 @@ type NaermesteLederMottaker { virksomhetsnummer: String! } +type AltinnRessursMottaker { + virksomhetsnummer: String! + ressursId: String! +} + type OppgaveData { tilstand: OppgaveTilstand diff --git a/app/src/test/kotlin/no/nav/arbeidsgiver/notifikasjon/produsent/api/Common.kt b/app/src/test/kotlin/no/nav/arbeidsgiver/notifikasjon/produsent/api/Common.kt index 4407a363c..86e591f6a 100644 --- a/app/src/test/kotlin/no/nav/arbeidsgiver/notifikasjon/produsent/api/Common.kt +++ b/app/src/test/kotlin/no/nav/arbeidsgiver/notifikasjon/produsent/api/Common.kt @@ -35,6 +35,7 @@ val stubProdusentRegister: ProdusentRegister = object : ProdusentRegister { tillatteMerkelapper = listOf("tag", "tag2"), tillatteMottakere = listOf( ServicecodeDefinisjon(code = "5441", version = "1"), + RessursIdDefinisjon(ressursId = "test-fager"), NærmesteLederDefinisjon, ) ) diff --git a/app/src/test/kotlin/no/nav/arbeidsgiver/notifikasjon/produsent/api/NyBeskjedFlereMottakereTests.kt b/app/src/test/kotlin/no/nav/arbeidsgiver/notifikasjon/produsent/api/NyBeskjedFlereMottakereTests.kt index b073fd23b..11150ba7c 100644 --- a/app/src/test/kotlin/no/nav/arbeidsgiver/notifikasjon/produsent/api/NyBeskjedFlereMottakereTests.kt +++ b/app/src/test/kotlin/no/nav/arbeidsgiver/notifikasjon/produsent/api/NyBeskjedFlereMottakereTests.kt @@ -5,16 +5,16 @@ import com.fasterxml.jackson.module.kotlin.convertValue import io.kotest.core.spec.style.DescribeSpec import io.kotest.matchers.collections.beEmpty import io.kotest.matchers.collections.shouldBeEmpty +import io.kotest.matchers.nulls.shouldNotBeNull import io.kotest.matchers.shouldBe import io.kotest.matchers.shouldNot import io.ktor.server.testing.* +import no.nav.arbeidsgiver.notifikasjon.hendelse.HendelseModel +import no.nav.arbeidsgiver.notifikasjon.hendelse.HendelseProdusent import no.nav.arbeidsgiver.notifikasjon.infrastruktur.json.laxObjectMapper import no.nav.arbeidsgiver.notifikasjon.produsent.Produsent import no.nav.arbeidsgiver.notifikasjon.produsent.ProdusentRepositoryImpl -import no.nav.arbeidsgiver.notifikasjon.util.getGraphqlErrors -import no.nav.arbeidsgiver.notifikasjon.util.getTypedContent -import no.nav.arbeidsgiver.notifikasjon.util.ktorProdusentTestServer -import no.nav.arbeidsgiver.notifikasjon.util.testDatabase +import no.nav.arbeidsgiver.notifikasjon.util.* import java.util.* class NyBeskjedFlereMottakereTests : DescribeSpec({ @@ -103,8 +103,9 @@ class NyBeskjedFlereMottakereTests : DescribeSpec({ ) } } - describe("sender 2 mottakere i 'mottakere'") { - val engine = setupEngine() + describe("sender 3 mottakere i 'mottakere'") { + val kafkaProducer = FakeHendelseProdusent() + val engine = setupEngine(kafkaProducer) val response = engine.produsentApi( nyBeskjed( """ @@ -120,6 +121,11 @@ class NyBeskjedFlereMottakereTests : DescribeSpec({ naermesteLederFnr: "2" ansattFnr: "3" } + }, + { + altinnRessurs: { + ressursId: "test-fager" + } } ] """ @@ -129,7 +135,7 @@ class NyBeskjedFlereMottakereTests : DescribeSpec({ val errors = response.getGraphqlErrors() errors.shouldBeEmpty() } - it("en mottaker registrert") { + it("alle mottakere registreres") { val resultType = response.getTypedContent("$.nyBeskjed.__typename") resultType shouldBe "NyBeskjedVellykket" @@ -145,9 +151,21 @@ class NyBeskjedFlereMottakereTests : DescribeSpec({ ansattFnr = "3", naermesteLederFnr = "2", virksomhetsnummer = "0" + ), + QueryNotifikasjoner.AltinnRessursMottaker( + ressursId = "test-fager", + virksomhetsnummer = "0" ) ) } + it("sender hendelse med korrekt mottakere til kafka") { + kafkaProducer.hendelser.filterIsInstance().first().let { + it.mottakere.size shouldBe 3 + it.mottakere.filterIsInstance().size shouldBe 1 + it.mottakere.filterIsInstance().size shouldBe 1 + it.mottakere.filterIsInstance().size shouldBe 1 + } + } } describe("sender 2 mottaker, en i 'mottaker' og en i 'mottakere'") { @@ -198,10 +216,11 @@ class NyBeskjedFlereMottakereTests : DescribeSpec({ } }) -private fun DescribeSpec.setupEngine(): TestApplicationEngine { +private fun DescribeSpec.setupEngine(kafkaProducer: HendelseProdusent = NoopHendelseProdusent): TestApplicationEngine { val database = testDatabase(Produsent.databaseConfig) val produsentRepository = ProdusentRepositoryImpl(database) val engine = ktorProdusentTestServer( + kafkaProducer = kafkaProducer, produsentRepository = produsentRepository, ) return engine @@ -258,6 +277,10 @@ internal fun TestApplicationEngine.hentMottakere(id: UUID): List Date: Fri, 15 Nov 2024 15:25:52 +0100 Subject: [PATCH 3/9] =?UTF-8?q?Lagt=20til=20AltinnRessursMottaker=20p?= =?UTF-8?q?=C3=A5=20EksempelHendelse?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../nav/arbeidsgiver/notifikasjon/util/EksempelHendelser.kt | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/app/src/test/kotlin/no/nav/arbeidsgiver/notifikasjon/util/EksempelHendelser.kt b/app/src/test/kotlin/no/nav/arbeidsgiver/notifikasjon/util/EksempelHendelser.kt index 1da5c2e6a..e27243891 100644 --- a/app/src/test/kotlin/no/nav/arbeidsgiver/notifikasjon/util/EksempelHendelser.kt +++ b/app/src/test/kotlin/no/nav/arbeidsgiver/notifikasjon/util/EksempelHendelser.kt @@ -3,6 +3,7 @@ package no.nav.arbeidsgiver.notifikasjon.util import com.fasterxml.jackson.databind.node.NullNode import no.nav.arbeidsgiver.notifikasjon.hendelse.HendelseModel import no.nav.arbeidsgiver.notifikasjon.hendelse.HendelseModel.AltinnMottaker +import no.nav.arbeidsgiver.notifikasjon.hendelse.HendelseModel.AltinnRessursMottaker import no.nav.arbeidsgiver.notifikasjon.hendelse.HendelseModel.BeskjedOpprettet import no.nav.arbeidsgiver.notifikasjon.hendelse.HendelseModel.EksterntVarselSendingsvindu import no.nav.arbeidsgiver.notifikasjon.hendelse.HendelseModel.EpostVarselKontaktinfo @@ -184,10 +185,9 @@ object EksempelHendelse { merkelapp = "1", eksternId = id.toString(), mottakere = listOf( - AltinnMottaker( + AltinnRessursMottaker( virksomhetsnummer = "1", - serviceCode = "1", - serviceEdition = "1" + ressursId = "test-fager" ) ), tekst = "1", From ed88f7680bf0b5d9920b5d2eb4ce8c2354c2c5b3 Mon Sep 17 00:00:00 2001 From: Ken Gullaksen Date: Mon, 18 Nov 2024 10:19:19 +0100 Subject: [PATCH 4/9] =?UTF-8?q?legg=20til=20test=20av=20ressursmottaker=20?= =?UTF-8?q?p=C3=A5=20bruker=20api?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit todo: legg til test på QueryNotifikasjoner og QueryKommendeKalenderavtaler --- .../bruker/AltinnTilgangsstyringTests.kt | 45 ++++++++++++------- .../notifikasjon/bruker/QuerySakerTests.kt | 21 +++++---- 2 files changed, 42 insertions(+), 24 deletions(-) diff --git a/app/src/test/kotlin/no/nav/arbeidsgiver/notifikasjon/bruker/AltinnTilgangsstyringTests.kt b/app/src/test/kotlin/no/nav/arbeidsgiver/notifikasjon/bruker/AltinnTilgangsstyringTests.kt index 01cc148c3..287b6eb2b 100644 --- a/app/src/test/kotlin/no/nav/arbeidsgiver/notifikasjon/bruker/AltinnTilgangsstyringTests.kt +++ b/app/src/test/kotlin/no/nav/arbeidsgiver/notifikasjon/bruker/AltinnTilgangsstyringTests.kt @@ -4,6 +4,8 @@ import io.kotest.core.spec.style.DescribeSpec import io.kotest.matchers.collections.shouldContainExactlyInAnyOrder import io.kotest.matchers.collections.shouldHaveSize import no.nav.arbeidsgiver.notifikasjon.hendelse.HendelseModel.AltinnMottaker +import no.nav.arbeidsgiver.notifikasjon.hendelse.HendelseModel.AltinnRessursMottaker +import no.nav.arbeidsgiver.notifikasjon.hendelse.HendelseModel.NærmesteLederMottaker import no.nav.arbeidsgiver.notifikasjon.infrastruktur.altinn.AltinnTilgang import no.nav.arbeidsgiver.notifikasjon.infrastruktur.altinn.AltinnTilganger import no.nav.arbeidsgiver.notifikasjon.util.testDatabase @@ -15,11 +17,26 @@ class AltinnTilgangsstyringTests : DescribeSpec({ val database = testDatabase(Bruker.databaseConfig) val brukerRepository = BrukerRepositoryImpl(database) - for ((id, serviceCode) in listOf( - "0" to "HarTilgang0", - "1" to "HarTilgang1", - "2" to "IkkeTilgang2", - "3" to "IkkeTilgang3", + for ((id, mottaker) in mapOf( + "0" to AltinnMottaker( + virksomhetsnummer = "1", + serviceCode = "HarTilgang0", + serviceEdition = "serviceedition1", + ), + "1" to AltinnRessursMottaker( + virksomhetsnummer = "1", + ressursId = "nav_test_HarTilgang1", + ), + "2" to NærmesteLederMottaker( + virksomhetsnummer = "1", + ansattFnr = "IkkeTilgang2", + naermesteLederFnr = "1", + ), + "3" to AltinnMottaker( + virksomhetsnummer = "1", + serviceCode = "IkkeTilgang3", + serviceEdition = "1", + ), )) { val uuid = uuid(id) brukerRepository.beskjedOpprettet( @@ -27,13 +44,7 @@ class AltinnTilgangsstyringTests : DescribeSpec({ notifikasjonId = uuid, merkelapp = "m", eksternId = uuid.toString(), - mottakere = listOf( - AltinnMottaker( - virksomhetsnummer = "1", - serviceCode = serviceCode, - serviceEdition = "1", - ) - ), + mottakere = listOf(mottaker), opprettetTidspunkt = OffsetDateTime.parse("2020-02-02T02:02:02+02"), ) } @@ -42,12 +53,16 @@ class AltinnTilgangsstyringTests : DescribeSpec({ fnr = "", altinnTilganger = AltinnTilganger( harFeil = false, - tilganger = listOf("HarTilgang0", "HarTilgang1").map { + tilganger = listOf( + AltinnTilgang( + orgNr = "1", + tilgang = "HarTilgang0:serviceedition1" + ), AltinnTilgang( orgNr = "1", - tilgang = "$it:1" + tilgang = "nav_test_HarTilgang1" ) - }, + ), ) ) diff --git a/app/src/test/kotlin/no/nav/arbeidsgiver/notifikasjon/bruker/QuerySakerTests.kt b/app/src/test/kotlin/no/nav/arbeidsgiver/notifikasjon/bruker/QuerySakerTests.kt index ac70705c9..f4f40c155 100644 --- a/app/src/test/kotlin/no/nav/arbeidsgiver/notifikasjon/bruker/QuerySakerTests.kt +++ b/app/src/test/kotlin/no/nav/arbeidsgiver/notifikasjon/bruker/QuerySakerTests.kt @@ -9,6 +9,8 @@ import io.kotest.matchers.shouldBe import io.ktor.server.testing.* import no.nav.arbeidsgiver.notifikasjon.bruker.BrukerAPI.SakSortering.OPPRETTET import no.nav.arbeidsgiver.notifikasjon.hendelse.HendelseModel.AltinnMottaker +import no.nav.arbeidsgiver.notifikasjon.hendelse.HendelseModel.AltinnRessursMottaker +import no.nav.arbeidsgiver.notifikasjon.hendelse.HendelseModel.Mottaker import no.nav.arbeidsgiver.notifikasjon.hendelse.HendelseModel.SakOpprettet import no.nav.arbeidsgiver.notifikasjon.hendelse.HendelseModel.SakStatus import no.nav.arbeidsgiver.notifikasjon.hendelse.HendelseModel.SakStatus.FERDIG @@ -230,8 +232,8 @@ class QuerySakerTests : DescribeSpec({ context("søk på tvers av virksomheter") { val (brukerRepository, engine) = setupRepoOgEngine() - val sak1 = brukerRepository.opprettSak(uuid("1"), "42") - val sak2 = brukerRepository.opprettSak(uuid("2"), "43") + val sak1 = brukerRepository.opprettSak(uuid("1"), "42", AltinnMottaker("5441", "1", "42")) + val sak2 = brukerRepository.opprettSak(uuid("2"), "43", AltinnRessursMottaker("43", "nav_test_foo-ressursid")) it("hentSaker med tom liste av virksomhetsnumre gir tom liste") { val response = engine.hentSaker(virksomhetsnumre = listOf()) @@ -262,10 +264,10 @@ class QuerySakerTests : DescribeSpec({ context("søk på type sak") { val (brukerRepository, engine) = setupRepoOgEngine() - brukerRepository.opprettSak(uuid("1"), "42", "merkelapp1") // tilgang til 42 - brukerRepository.opprettSak(uuid("2"), "43", "merkelapp2") // tilgang til 43 - brukerRepository.opprettSak(uuid("3"), "44", "merkelapp3") // ikke tilgang til 44 - brukerRepository.opprettSak(uuid("4"), "45", "merkelapp1") // ikke tilgang til 45 + brukerRepository.opprettSak(uuid("1"), "42", AltinnMottaker("5441", "1", "42"), "merkelapp1") // tilgang til 42 + brukerRepository.opprettSak(uuid("2"), "43", AltinnRessursMottaker("43", "nav_test_foo-ressursid"), "merkelapp2") // tilgang til 43 + brukerRepository.opprettSak(uuid("3"), "44", AltinnMottaker("5441", "1", "44"), "merkelapp3") // ikke tilgang til 44 + brukerRepository.opprettSak(uuid("4"), "45", AltinnMottaker("5441", "1", "45"), "merkelapp1") // ikke tilgang til 45 it("søk på null sakstyper returnere alle") { @@ -325,7 +327,7 @@ private fun DescribeSpec.setupRepoOgEngine(): Pair Date: Mon, 18 Nov 2024 12:00:02 +0100 Subject: [PATCH 5/9] =?UTF-8?q?legg=20til=20test=20p=C3=A5=20QueryNotifika?= =?UTF-8?q?sjoner=20og=20QueryKommendeKalenderavtaler?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../notifikasjon/bruker/Common.kt | 13 ++++--- .../QueryKommendeKalenderavtalerTests.kt | 34 +++++++++++++------ .../bruker/QueryNotifikasjonerMedSakTests.kt | 7 ++-- 3 files changed, 36 insertions(+), 18 deletions(-) diff --git a/app/src/test/kotlin/no/nav/arbeidsgiver/notifikasjon/bruker/Common.kt b/app/src/test/kotlin/no/nav/arbeidsgiver/notifikasjon/bruker/Common.kt index 0c41536b9..3e3785fa3 100644 --- a/app/src/test/kotlin/no/nav/arbeidsgiver/notifikasjon/bruker/Common.kt +++ b/app/src/test/kotlin/no/nav/arbeidsgiver/notifikasjon/bruker/Common.kt @@ -30,8 +30,7 @@ const val TEST_SERVICE_CODE_1 = "1234" const val TEST_SERVICE_EDITION_1 = "1" const val TEST_VIRKSOMHET_2 = "111111111" -const val TEST_SERVICE_CODE_2 = "5678" -const val TEST_SERVICE_EDITION_2 = "2" +const val TEST_RESSURS_ID_1 = "nav_test_testressurs1" val TEST_MOTTAKER_1 = HendelseModel.AltinnMottaker( virksomhetsnummer = TEST_VIRKSOMHET_1, @@ -39,10 +38,9 @@ val TEST_MOTTAKER_1 = HendelseModel.AltinnMottaker( serviceEdition = TEST_SERVICE_EDITION_1, ) -val TEST_MOTTAKER_2 = HendelseModel.AltinnMottaker( +val TEST_MOTTAKER_2 = HendelseModel.AltinnRessursMottaker( virksomhetsnummer = TEST_VIRKSOMHET_2, - serviceCode = TEST_SERVICE_CODE_2, - serviceEdition = TEST_SERVICE_EDITION_2, + ressursId = TEST_RESSURS_ID_1, ) val TEST_TILGANG_1 = AltinnTilgang( @@ -50,6 +48,11 @@ val TEST_TILGANG_1 = AltinnTilgang( tilgang = "$TEST_SERVICE_CODE_1:$TEST_SERVICE_EDITION_1", ) +val TEST_TILGANG_2 = AltinnTilgang( + orgNr = TEST_VIRKSOMHET_2 , + tilgang = TEST_RESSURS_ID_1, +) + val TEST_OPPRETTET_TIDSPUNKT_1 = OffsetDateTime.parse("2020-01-01T01:01:01+01") /* Use randomness to prevent implicit dependencies in unit tests on default values. diff --git a/app/src/test/kotlin/no/nav/arbeidsgiver/notifikasjon/bruker/QueryKommendeKalenderavtalerTests.kt b/app/src/test/kotlin/no/nav/arbeidsgiver/notifikasjon/bruker/QueryKommendeKalenderavtalerTests.kt index c9b372161..e56c77ba0 100644 --- a/app/src/test/kotlin/no/nav/arbeidsgiver/notifikasjon/bruker/QueryKommendeKalenderavtalerTests.kt +++ b/app/src/test/kotlin/no/nav/arbeidsgiver/notifikasjon/bruker/QueryKommendeKalenderavtalerTests.kt @@ -19,23 +19,32 @@ class QueryKommendeKalenderavtalerTests: DescribeSpec({ altinnTilgangerService = AltinnTilgangerServiceStub { _, _ -> AltinnTilganger( harFeil = false, - tilganger = listOf(TEST_TILGANG_1) + tilganger = listOf(TEST_TILGANG_1, TEST_TILGANG_2) ) } ) val grupperingsid = "42" val merkelapp = "tag" - brukerRepository.sakOpprettet( + val sak1 = brukerRepository.sakOpprettet( sakId = uuid("1"), + mottakere = listOf(TEST_MOTTAKER_1), virksomhetsnummer = TEST_VIRKSOMHET_1, merkelapp = merkelapp, grupperingsid = grupperingsid, ) + val sak2 = brukerRepository.sakOpprettet( + sakId = uuid("1"), + mottakere = listOf(TEST_MOTTAKER_2), + virksomhetsnummer = TEST_VIRKSOMHET_2, + merkelapp = merkelapp, + grupperingsid = grupperingsid, + ) brukerRepository.kalenderavtaleOpprettet( - sakId = uuid("1"), + sakId = sak1.sakId, + virksomhetsnummer = sak1.virksomhetsnummer, + mottakere = sak1.mottakere, notifikasjonId = uuid("2"), - virksomhetsnummer = TEST_VIRKSOMHET_1, merkelapp = merkelapp, grupperingsid = grupperingsid, startTidspunkt = now.plusDays(1), @@ -43,9 +52,10 @@ class QueryKommendeKalenderavtalerTests: DescribeSpec({ tekst = "2. plass" ) brukerRepository.kalenderavtaleOpprettet( - sakId = uuid("1"), + sakId = sak2.sakId, + virksomhetsnummer = sak2.virksomhetsnummer, + mottakere = sak2.mottakere, notifikasjonId = uuid("3"), - virksomhetsnummer = TEST_VIRKSOMHET_1, merkelapp = merkelapp, grupperingsid = grupperingsid, startTidspunkt = now.plusHours(1), @@ -53,9 +63,10 @@ class QueryKommendeKalenderavtalerTests: DescribeSpec({ tekst = "1. plass" ) brukerRepository.kalenderavtaleOpprettet( - sakId = uuid("1"), + sakId = sak1.sakId, + virksomhetsnummer = sak1.virksomhetsnummer, + mottakere = sak1.mottakere, notifikasjonId = uuid("4"), - virksomhetsnummer = TEST_VIRKSOMHET_1, merkelapp = merkelapp, grupperingsid = grupperingsid, startTidspunkt = now.minusHours(2), @@ -63,9 +74,10 @@ class QueryKommendeKalenderavtalerTests: DescribeSpec({ tekst = "DNF" ) brukerRepository.kalenderavtaleOpprettet( - sakId = uuid("1"), + sakId = sak2.sakId, + virksomhetsnummer = sak2.virksomhetsnummer, + mottakere = sak2.mottakere, notifikasjonId = uuid("5"), - virksomhetsnummer = TEST_VIRKSOMHET_1, merkelapp = merkelapp, grupperingsid = grupperingsid, startTidspunkt = now.minusDays(2), @@ -80,7 +92,7 @@ class QueryKommendeKalenderavtalerTests: DescribeSpec({ tekst = "fra DNF til 3. plass" ) - val response = engine.queryKommendeKalenderavtalerJson(listOf(TEST_VIRKSOMHET_1)) + val response = engine.queryKommendeKalenderavtalerJson(listOf(TEST_VIRKSOMHET_1, TEST_VIRKSOMHET_2)) it("returnerer kommende kalenderavtaler nærmest først") { val kalenderavtaler = response.getTypedContent>("kommendeKalenderavtaler/avtaler") diff --git a/app/src/test/kotlin/no/nav/arbeidsgiver/notifikasjon/bruker/QueryNotifikasjonerMedSakTests.kt b/app/src/test/kotlin/no/nav/arbeidsgiver/notifikasjon/bruker/QueryNotifikasjonerMedSakTests.kt index d47cef816..d582d8aa3 100644 --- a/app/src/test/kotlin/no/nav/arbeidsgiver/notifikasjon/bruker/QueryNotifikasjonerMedSakTests.kt +++ b/app/src/test/kotlin/no/nav/arbeidsgiver/notifikasjon/bruker/QueryNotifikasjonerMedSakTests.kt @@ -24,7 +24,7 @@ class QueryNotifikasjonerMedSakTests : DescribeSpec({ altinnTilgangerService = AltinnTilgangerServiceStub { _, _ -> AltinnTilganger( harFeil = false, - tilganger = listOf(TEST_TILGANG_1) + tilganger = listOf(TEST_TILGANG_1, TEST_TILGANG_2) ) } ) @@ -61,6 +61,7 @@ class QueryNotifikasjonerMedSakTests : DescribeSpec({ } val beskjedMedSakOpprettet = brukerRepository.beskjedOpprettet( + mottakere = listOf(TEST_MOTTAKER_2), grupperingsid = "3", opprettetTidspunkt = opprettetTidspunkt.minusHours(3), tekst = "beskjed med sak", @@ -75,6 +76,7 @@ class QueryNotifikasjonerMedSakTests : DescribeSpec({ } val kalenderavtaleMedSak = brukerRepository.sakOpprettet( + mottakere = listOf(TEST_MOTTAKER_2), grupperingsid = "4", tittel = "Sakstittel for kalenderavtale", mottattTidspunkt = OffsetDateTime.now(), @@ -83,6 +85,7 @@ class QueryNotifikasjonerMedSakTests : DescribeSpec({ brukerRepository.kalenderavtaleOpprettet( opprettetTidspunkt = opprettetTidspunkt.minusHours(4), grupperingsid = sak.grupperingsid, + mottakere = sak.mottakere, merkelapp = sak.merkelapp, tekst = "kalenderavtale med sak", sakId = sak.sakId, @@ -105,7 +108,7 @@ class QueryNotifikasjonerMedSakTests : DescribeSpec({ it.id shouldBe oppgaveMedSakOpprettet.aggregateId it.sak shouldNot beNull() it.sak!!.tittel shouldBe "Sakstittel for oppgave" - it.sak.tilleggsinformasjon shouldBe "Tilleggsinformasjon om saken" + it.sak!!.tilleggsinformasjon shouldBe "Tilleggsinformasjon om saken" } (notifikasjoner[3] as BrukerAPI.Notifikasjon.Beskjed).let { it.id shouldBe beskjedMedSakOpprettet.aggregateId From acc8638419d2906274fe42e30dbf410c95e9bd4d Mon Sep 17 00:00:00 2001 From: Ken Gullaksen Date: Mon, 18 Nov 2024 13:59:03 +0100 Subject: [PATCH 6/9] =?UTF-8?q?legg=20til=20st=C3=B8tte=20for=20mottakere?= =?UTF-8?q?=20i=20test-produsent?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- test-produsent/server/esm-require.js | 9 + test-produsent/server/package-lock.json | 1441 +++++++++++++++++ test-produsent/server/package.json | 2 + test-produsent/server/server.js | 57 +- test-produsent/src/App.tsx | 24 +- .../src/Komponenter/EksternVarsling.tsx | 2 +- .../EndreP\303\245minnelseOppgave.tsx" | 2 +- .../src/Komponenter/KalenderAvtale.tsx | 10 +- .../src/Komponenter/MottakerInput.tsx | 55 + test-produsent/src/Komponenter/NyBeskjed.tsx | 5 +- test-produsent/src/Komponenter/NyOppgave.tsx | 15 +- test-produsent/src/Komponenter/NySak.tsx | 12 +- test-produsent/src/api/graphql-types.ts | 71 +- 13 files changed, 1638 insertions(+), 67 deletions(-) create mode 100644 test-produsent/server/esm-require.js create mode 100644 test-produsent/src/Komponenter/MottakerInput.tsx diff --git a/test-produsent/server/esm-require.js b/test-produsent/server/esm-require.js new file mode 100644 index 000000000..b6f810198 --- /dev/null +++ b/test-produsent/server/esm-require.js @@ -0,0 +1,9 @@ +import {createRequire} from 'module'; + +/** + * en liten hack for å importere pakker som ikke er kompatible med ESM. + * som f.eks. prometheus-api-metrics + * + * med inspirasjon fra: https://github.com/sindresorhus/meow/pull/147/files + */ +export default (module) => createRequire(import.meta.url)(module); \ No newline at end of file diff --git a/test-produsent/server/package-lock.json b/test-produsent/server/package-lock.json index 7906bb43b..10ae0c409 100644 --- a/test-produsent/server/package-lock.json +++ b/test-produsent/server/package-lock.json @@ -9,11 +9,164 @@ "version": "1.0.0", "license": "MIT", "dependencies": { + "apollo-server-express": "^3.13.0", "express": "^4.21.0", + "graphql": "^16.9.0", "http-proxy-middleware": "3.0.3", "winston": "3.11.0" } }, + "node_modules/@apollo/protobufjs": { + "version": "1.2.7", + "resolved": "https://registry.npmjs.org/@apollo/protobufjs/-/protobufjs-1.2.7.tgz", + "integrity": "sha512-Lahx5zntHPZia35myYDBRuF58tlwPskwHc5CWBZC/4bMKB6siTBWwtMrkqXcsNwQiFSzSx5hKdRPUmemrEp3Gg==", + "hasInstallScript": true, + "dependencies": { + "@protobufjs/aspromise": "^1.1.2", + "@protobufjs/base64": "^1.1.2", + "@protobufjs/codegen": "^2.0.4", + "@protobufjs/eventemitter": "^1.1.0", + "@protobufjs/fetch": "^1.1.0", + "@protobufjs/float": "^1.0.2", + "@protobufjs/inquire": "^1.1.0", + "@protobufjs/path": "^1.1.2", + "@protobufjs/pool": "^1.1.0", + "@protobufjs/utf8": "^1.1.0", + "@types/long": "^4.0.0", + "long": "^4.0.0" + }, + "bin": { + "apollo-pbjs": "bin/pbjs", + "apollo-pbts": "bin/pbts" + } + }, + "node_modules/@apollo/usage-reporting-protobuf": { + "version": "4.1.1", + "resolved": "https://registry.npmjs.org/@apollo/usage-reporting-protobuf/-/usage-reporting-protobuf-4.1.1.tgz", + "integrity": "sha512-u40dIUePHaSKVshcedO7Wp+mPiZsaU6xjv9J+VyxpoU/zL6Jle+9zWeG98tr/+SZ0nZ4OXhrbb8SNr0rAPpIDA==", + "dependencies": { + "@apollo/protobufjs": "1.2.7" + } + }, + "node_modules/@apollo/utils.dropunuseddefinitions": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/@apollo/utils.dropunuseddefinitions/-/utils.dropunuseddefinitions-1.1.0.tgz", + "integrity": "sha512-jU1XjMr6ec9pPoL+BFWzEPW7VHHulVdGKMkPAMiCigpVIT11VmCbnij0bWob8uS3ODJ65tZLYKAh/55vLw2rbg==", + "engines": { + "node": ">=12.13.0" + }, + "peerDependencies": { + "graphql": "14.x || 15.x || 16.x" + } + }, + "node_modules/@apollo/utils.keyvaluecache": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/@apollo/utils.keyvaluecache/-/utils.keyvaluecache-1.0.2.tgz", + "integrity": "sha512-p7PVdLPMnPzmXSQVEsy27cYEjVON+SH/Wb7COyW3rQN8+wJgT1nv9jZouYtztWW8ZgTkii5T6tC9qfoDREd4mg==", + "dependencies": { + "@apollo/utils.logger": "^1.0.0", + "lru-cache": "7.10.1 - 7.13.1" + } + }, + "node_modules/@apollo/utils.keyvaluecache/node_modules/lru-cache": { + "version": "7.13.1", + "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-7.13.1.tgz", + "integrity": "sha512-CHqbAq7NFlW3RSnoWXLJBxCWaZVBrfa9UEHId2M3AW8iEBurbqduNexEUCGc3SHc6iCYXNJCDi903LajSVAEPQ==", + "engines": { + "node": ">=12" + } + }, + "node_modules/@apollo/utils.logger": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/@apollo/utils.logger/-/utils.logger-1.0.1.tgz", + "integrity": "sha512-XdlzoY7fYNK4OIcvMD2G94RoFZbzTQaNP0jozmqqMudmaGo2I/2Jx71xlDJ801mWA/mbYRihyaw6KJii7k5RVA==" + }, + "node_modules/@apollo/utils.printwithreducedwhitespace": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/@apollo/utils.printwithreducedwhitespace/-/utils.printwithreducedwhitespace-1.1.0.tgz", + "integrity": "sha512-GfFSkAv3n1toDZ4V6u2d7L4xMwLA+lv+6hqXicMN9KELSJ9yy9RzuEXaX73c/Ry+GzRsBy/fdSUGayGqdHfT2Q==", + "engines": { + "node": ">=12.13.0" + }, + "peerDependencies": { + "graphql": "14.x || 15.x || 16.x" + } + }, + "node_modules/@apollo/utils.removealiases": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/@apollo/utils.removealiases/-/utils.removealiases-1.0.0.tgz", + "integrity": "sha512-6cM8sEOJW2LaGjL/0vHV0GtRaSekrPQR4DiywaApQlL9EdROASZU5PsQibe2MWeZCOhNrPRuHh4wDMwPsWTn8A==", + "engines": { + "node": ">=12.13.0" + }, + "peerDependencies": { + "graphql": "14.x || 15.x || 16.x" + } + }, + "node_modules/@apollo/utils.sortast": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/@apollo/utils.sortast/-/utils.sortast-1.1.0.tgz", + "integrity": "sha512-VPlTsmUnOwzPK5yGZENN069y6uUHgeiSlpEhRnLFYwYNoJHsuJq2vXVwIaSmts015WTPa2fpz1inkLYByeuRQA==", + "dependencies": { + "lodash.sortby": "^4.7.0" + }, + "engines": { + "node": ">=12.13.0" + }, + "peerDependencies": { + "graphql": "14.x || 15.x || 16.x" + } + }, + "node_modules/@apollo/utils.stripsensitiveliterals": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/@apollo/utils.stripsensitiveliterals/-/utils.stripsensitiveliterals-1.2.0.tgz", + "integrity": "sha512-E41rDUzkz/cdikM5147d8nfCFVKovXxKBcjvLEQ7bjZm/cg9zEcXvS6vFY8ugTubI3fn6zoqo0CyU8zT+BGP9w==", + "engines": { + "node": ">=12.13.0" + }, + "peerDependencies": { + "graphql": "14.x || 15.x || 16.x" + } + }, + "node_modules/@apollo/utils.usagereporting": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/@apollo/utils.usagereporting/-/utils.usagereporting-1.0.1.tgz", + "integrity": "sha512-6dk+0hZlnDbahDBB2mP/PZ5ybrtCJdLMbeNJD+TJpKyZmSY6bA3SjI8Cr2EM9QA+AdziywuWg+SgbWUF3/zQqQ==", + "dependencies": { + "@apollo/usage-reporting-protobuf": "^4.0.0", + "@apollo/utils.dropunuseddefinitions": "^1.1.0", + "@apollo/utils.printwithreducedwhitespace": "^1.1.0", + "@apollo/utils.removealiases": "1.0.0", + "@apollo/utils.sortast": "^1.1.0", + "@apollo/utils.stripsensitiveliterals": "^1.2.0" + }, + "engines": { + "node": ">=12.13.0" + }, + "peerDependencies": { + "graphql": "14.x || 15.x || 16.x" + } + }, + "node_modules/@apollographql/apollo-tools": { + "version": "0.5.4", + "resolved": "https://registry.npmjs.org/@apollographql/apollo-tools/-/apollo-tools-0.5.4.tgz", + "integrity": "sha512-shM3q7rUbNyXVVRkQJQseXv6bnYM3BUma/eZhwXR4xsuM+bqWnJKvW7SAfRjP7LuSCocrexa5AXhjjawNHrIlw==", + "engines": { + "node": ">=8", + "npm": ">=6" + }, + "peerDependencies": { + "graphql": "^14.2.1 || ^15.0.0 || ^16.0.0" + } + }, + "node_modules/@apollographql/graphql-playground-html": { + "version": "1.6.29", + "resolved": "https://registry.npmjs.org/@apollographql/graphql-playground-html/-/graphql-playground-html-1.6.29.tgz", + "integrity": "sha512-xCcXpoz52rI4ksJSdOCxeOCn2DLocxwHf9dVT/Q90Pte1LX+LY+91SFtJF3KXVHH8kEin+g1KKCQPKBjZJfWNA==", + "dependencies": { + "xss": "^1.0.8" + } + }, "node_modules/@colors/colors": { "version": "1.6.0", "resolved": "https://registry.npmjs.org/@colors/colors/-/colors-1.6.0.tgz", @@ -32,6 +185,237 @@ "kuler": "^2.0.0" } }, + "node_modules/@graphql-tools/merge": { + "version": "8.3.1", + "resolved": "https://registry.npmjs.org/@graphql-tools/merge/-/merge-8.3.1.tgz", + "integrity": "sha512-BMm99mqdNZbEYeTPK3it9r9S6rsZsQKtlqJsSBknAclXq2pGEfOxjcIZi+kBSkHZKPKCRrYDd5vY0+rUmIHVLg==", + "dependencies": { + "@graphql-tools/utils": "8.9.0", + "tslib": "^2.4.0" + }, + "peerDependencies": { + "graphql": "^14.0.0 || ^15.0.0 || ^16.0.0 || ^17.0.0" + } + }, + "node_modules/@graphql-tools/merge/node_modules/@graphql-tools/utils": { + "version": "8.9.0", + "resolved": "https://registry.npmjs.org/@graphql-tools/utils/-/utils-8.9.0.tgz", + "integrity": "sha512-pjJIWH0XOVnYGXCqej8g/u/tsfV4LvLlj0eATKQu5zwnxd/TiTHq7Cg313qUPTFFHZ3PP5wJ15chYVtLDwaymg==", + "dependencies": { + "tslib": "^2.4.0" + }, + "peerDependencies": { + "graphql": "^14.0.0 || ^15.0.0 || ^16.0.0 || ^17.0.0" + } + }, + "node_modules/@graphql-tools/mock": { + "version": "8.7.20", + "resolved": "https://registry.npmjs.org/@graphql-tools/mock/-/mock-8.7.20.tgz", + "integrity": "sha512-ljcHSJWjC/ZyzpXd5cfNhPI7YljRVvabKHPzKjEs5ElxWu2cdlLGvyNYepApXDsM/OJG/2xuhGM+9GWu5gEAPQ==", + "dependencies": { + "@graphql-tools/schema": "^9.0.18", + "@graphql-tools/utils": "^9.2.1", + "fast-json-stable-stringify": "^2.1.0", + "tslib": "^2.4.0" + }, + "peerDependencies": { + "graphql": "^14.0.0 || ^15.0.0 || ^16.0.0 || ^17.0.0" + } + }, + "node_modules/@graphql-tools/mock/node_modules/@graphql-tools/merge": { + "version": "8.4.2", + "resolved": "https://registry.npmjs.org/@graphql-tools/merge/-/merge-8.4.2.tgz", + "integrity": "sha512-XbrHAaj8yDuINph+sAfuq3QCZ/tKblrTLOpirK0+CAgNlZUCHs0Fa+xtMUURgwCVThLle1AF7svJCxFizygLsw==", + "dependencies": { + "@graphql-tools/utils": "^9.2.1", + "tslib": "^2.4.0" + }, + "peerDependencies": { + "graphql": "^14.0.0 || ^15.0.0 || ^16.0.0 || ^17.0.0" + } + }, + "node_modules/@graphql-tools/mock/node_modules/@graphql-tools/schema": { + "version": "9.0.19", + "resolved": "https://registry.npmjs.org/@graphql-tools/schema/-/schema-9.0.19.tgz", + "integrity": "sha512-oBRPoNBtCkk0zbUsyP4GaIzCt8C0aCI4ycIRUL67KK5pOHljKLBBtGT+Jr6hkzA74C8Gco8bpZPe7aWFjiaK2w==", + "dependencies": { + "@graphql-tools/merge": "^8.4.1", + "@graphql-tools/utils": "^9.2.1", + "tslib": "^2.4.0", + "value-or-promise": "^1.0.12" + }, + "peerDependencies": { + "graphql": "^14.0.0 || ^15.0.0 || ^16.0.0 || ^17.0.0" + } + }, + "node_modules/@graphql-tools/mock/node_modules/value-or-promise": { + "version": "1.0.12", + "resolved": "https://registry.npmjs.org/value-or-promise/-/value-or-promise-1.0.12.tgz", + "integrity": "sha512-Z6Uz+TYwEqE7ZN50gwn+1LCVo9ZVrpxRPOhOLnncYkY1ZzOYtrX8Fwf/rFktZ8R5mJms6EZf5TqNOMeZmnPq9Q==", + "engines": { + "node": ">=12" + } + }, + "node_modules/@graphql-tools/schema": { + "version": "8.5.1", + "resolved": "https://registry.npmjs.org/@graphql-tools/schema/-/schema-8.5.1.tgz", + "integrity": "sha512-0Esilsh0P/qYcB5DKQpiKeQs/jevzIadNTaT0jeWklPMwNbT7yMX4EqZany7mbeRRlSRwMzNzL5olyFdffHBZg==", + "dependencies": { + "@graphql-tools/merge": "8.3.1", + "@graphql-tools/utils": "8.9.0", + "tslib": "^2.4.0", + "value-or-promise": "1.0.11" + }, + "peerDependencies": { + "graphql": "^14.0.0 || ^15.0.0 || ^16.0.0 || ^17.0.0" + } + }, + "node_modules/@graphql-tools/schema/node_modules/@graphql-tools/utils": { + "version": "8.9.0", + "resolved": "https://registry.npmjs.org/@graphql-tools/utils/-/utils-8.9.0.tgz", + "integrity": "sha512-pjJIWH0XOVnYGXCqej8g/u/tsfV4LvLlj0eATKQu5zwnxd/TiTHq7Cg313qUPTFFHZ3PP5wJ15chYVtLDwaymg==", + "dependencies": { + "tslib": "^2.4.0" + }, + "peerDependencies": { + "graphql": "^14.0.0 || ^15.0.0 || ^16.0.0 || ^17.0.0" + } + }, + "node_modules/@graphql-tools/utils": { + "version": "9.2.1", + "resolved": "https://registry.npmjs.org/@graphql-tools/utils/-/utils-9.2.1.tgz", + "integrity": "sha512-WUw506Ql6xzmOORlriNrD6Ugx+HjVgYxt9KCXD9mHAak+eaXSwuGGPyE60hy9xaDEoXKBsG7SkG69ybitaVl6A==", + "dependencies": { + "@graphql-typed-document-node/core": "^3.1.1", + "tslib": "^2.4.0" + }, + "peerDependencies": { + "graphql": "^14.0.0 || ^15.0.0 || ^16.0.0 || ^17.0.0" + } + }, + "node_modules/@graphql-typed-document-node/core": { + "version": "3.2.0", + "resolved": "https://registry.npmjs.org/@graphql-typed-document-node/core/-/core-3.2.0.tgz", + "integrity": "sha512-mB9oAsNCm9aM3/SOv4YtBMqZbYj10R7dkq8byBqxGY/ncFwhf2oQzMV+LCRlWoDSEBJ3COiR1yeDvMtsoOsuFQ==", + "peerDependencies": { + "graphql": "^0.8.0 || ^0.9.0 || ^0.10.0 || ^0.11.0 || ^0.12.0 || ^0.13.0 || ^14.0.0 || ^15.0.0 || ^16.0.0 || ^17.0.0" + } + }, + "node_modules/@josephg/resolvable": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/@josephg/resolvable/-/resolvable-1.0.1.tgz", + "integrity": "sha512-CtzORUwWTTOTqfVtHaKRJ0I1kNQd1bpn3sUh8I3nJDVY+5/M/Oe1DnEWzPQvqq/xPIIkzzzIP7mfCoAjFRvDhg==" + }, + "node_modules/@protobufjs/aspromise": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/@protobufjs/aspromise/-/aspromise-1.1.2.tgz", + "integrity": "sha512-j+gKExEuLmKwvz3OgROXtrJ2UG2x8Ch2YZUxahh+s1F2HZ+wAceUNLkvy6zKCPVRkU++ZWQrdxsUeQXmcg4uoQ==" + }, + "node_modules/@protobufjs/base64": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/@protobufjs/base64/-/base64-1.1.2.tgz", + "integrity": "sha512-AZkcAA5vnN/v4PDqKyMR5lx7hZttPDgClv83E//FMNhR2TMcLUhfRUBHCmSl0oi9zMgDDqRUJkSxO3wm85+XLg==" + }, + "node_modules/@protobufjs/codegen": { + "version": "2.0.4", + "resolved": "https://registry.npmjs.org/@protobufjs/codegen/-/codegen-2.0.4.tgz", + "integrity": "sha512-YyFaikqM5sH0ziFZCN3xDC7zeGaB/d0IUb9CATugHWbd1FRFwWwt4ld4OYMPWu5a3Xe01mGAULCdqhMlPl29Jg==" + }, + "node_modules/@protobufjs/eventemitter": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/@protobufjs/eventemitter/-/eventemitter-1.1.0.tgz", + "integrity": "sha512-j9ednRT81vYJ9OfVuXG6ERSTdEL1xVsNgqpkxMsbIabzSo3goCjDIveeGv5d03om39ML71RdmrGNjG5SReBP/Q==" + }, + "node_modules/@protobufjs/fetch": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/@protobufjs/fetch/-/fetch-1.1.0.tgz", + "integrity": "sha512-lljVXpqXebpsijW71PZaCYeIcE5on1w5DlQy5WH6GLbFryLUrBD4932W/E2BSpfRJWseIL4v/KPgBFxDOIdKpQ==", + "dependencies": { + "@protobufjs/aspromise": "^1.1.1", + "@protobufjs/inquire": "^1.1.0" + } + }, + "node_modules/@protobufjs/float": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/@protobufjs/float/-/float-1.0.2.tgz", + "integrity": "sha512-Ddb+kVXlXst9d+R9PfTIxh1EdNkgoRe5tOX6t01f1lYWOvJnSPDBlG241QLzcyPdoNTsblLUdujGSE4RzrTZGQ==" + }, + "node_modules/@protobufjs/inquire": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/@protobufjs/inquire/-/inquire-1.1.0.tgz", + "integrity": "sha512-kdSefcPdruJiFMVSbn801t4vFK7KB/5gd2fYvrxhuJYg8ILrmn9SKSX2tZdV6V+ksulWqS7aXjBcRXl3wHoD9Q==" + }, + "node_modules/@protobufjs/path": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/@protobufjs/path/-/path-1.1.2.tgz", + "integrity": "sha512-6JOcJ5Tm08dOHAbdR3GrvP+yUUfkjG5ePsHYczMFLq3ZmMkAD98cDgcT2iA1lJ9NVwFd4tH/iSSoe44YWkltEA==" + }, + "node_modules/@protobufjs/pool": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/@protobufjs/pool/-/pool-1.1.0.tgz", + "integrity": "sha512-0kELaGSIDBKvcgS4zkjz1PeddatrjYcmMWOlAuAPwAeccUrPHdUqo/J6LiymHHEiJT5NrF1UVwxY14f+fy4WQw==" + }, + "node_modules/@protobufjs/utf8": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/@protobufjs/utf8/-/utf8-1.1.0.tgz", + "integrity": "sha512-Vvn3zZrhQZkkBE8LSuW3em98c0FwgO4nxzv6OdSxPKJIEKY2bGbHn+mhGIPerzI4twdxaP8/0+06HBpwf345Lw==" + }, + "node_modules/@types/accepts": { + "version": "1.3.7", + "resolved": "https://registry.npmjs.org/@types/accepts/-/accepts-1.3.7.tgz", + "integrity": "sha512-Pay9fq2lM2wXPWbteBsRAGiWH2hig4ZE2asK+mm7kUzlxRTfL961rj89I6zV/E3PcIkDqyuBEcMxFT7rccugeQ==", + "dependencies": { + "@types/node": "*" + } + }, + "node_modules/@types/body-parser": { + "version": "1.19.2", + "resolved": "https://registry.npmjs.org/@types/body-parser/-/body-parser-1.19.2.tgz", + "integrity": "sha512-ALYone6pm6QmwZoAgeyNksccT9Q4AWZQ6PvfwR37GT6r6FWUPguq6sUmNGSMV2Wr761oQoBxwGGa6DR5o1DC9g==", + "dependencies": { + "@types/connect": "*", + "@types/node": "*" + } + }, + "node_modules/@types/connect": { + "version": "3.4.38", + "resolved": "https://registry.npmjs.org/@types/connect/-/connect-3.4.38.tgz", + "integrity": "sha512-K6uROf1LD88uDQqJCktA4yzL1YYAK6NgfsI0v/mTgyPKWsX1CnJ0XPSDhViejru1GcRkLWb8RlzFYJRqGUbaug==", + "dependencies": { + "@types/node": "*" + } + }, + "node_modules/@types/cors": { + "version": "2.8.12", + "resolved": "https://registry.npmjs.org/@types/cors/-/cors-2.8.12.tgz", + "integrity": "sha512-vt+kDhq/M2ayberEtJcIN/hxXy1Pk+59g2FV/ZQceeaTyCtCucjL2Q7FXlFjtWn4n15KCr1NE2lNNFhp0lEThw==" + }, + "node_modules/@types/express": { + "version": "4.17.14", + "resolved": "https://registry.npmjs.org/@types/express/-/express-4.17.14.tgz", + "integrity": "sha512-TEbt+vaPFQ+xpxFLFssxUDXj5cWCxZJjIcB7Yg0k0GMHGtgtQgpvx/MUQUeAkNbA9AAGrwkAsoeItdTgS7FMyg==", + "dependencies": { + "@types/body-parser": "*", + "@types/express-serve-static-core": "^4.17.18", + "@types/qs": "*", + "@types/serve-static": "*" + } + }, + "node_modules/@types/express-serve-static-core": { + "version": "4.17.31", + "resolved": "https://registry.npmjs.org/@types/express-serve-static-core/-/express-serve-static-core-4.17.31.tgz", + "integrity": "sha512-DxMhY+NAsTwMMFHBTtJFNp5qiHKJ7TeqOo23zVEM9alT1Ml27Q3xcTH0xwxn7Q0BbMcVEJOs/7aQtUWupUQN3Q==", + "dependencies": { + "@types/node": "*", + "@types/qs": "*", + "@types/range-parser": "*" + } + }, + "node_modules/@types/http-errors": { + "version": "2.0.4", + "resolved": "https://registry.npmjs.org/@types/http-errors/-/http-errors-2.0.4.tgz", + "integrity": "sha512-D0CFMMtydbJAegzOyHjtiKPLlvnm3iTZyZRSZoLq2mRhDdmLfIWOCYPfQJ4cu2erKghU++QvjcUjp/5h7hESpA==" + }, "node_modules/@types/http-proxy": { "version": "1.17.15", "resolved": "https://registry.npmjs.org/@types/http-proxy/-/http-proxy-1.17.15.tgz", @@ -40,6 +424,16 @@ "@types/node": "*" } }, + "node_modules/@types/long": { + "version": "4.0.2", + "resolved": "https://registry.npmjs.org/@types/long/-/long-4.0.2.tgz", + "integrity": "sha512-MqTGEo5bj5t157U6fA/BiDynNkn0YknVdh48CMPkTSpFTVmvao5UQmm7uEF6xBEo7qIMAlY/JSleYaE6VOdpaA==" + }, + "node_modules/@types/mime": { + "version": "1.3.5", + "resolved": "https://registry.npmjs.org/@types/mime/-/mime-1.3.5.tgz", + "integrity": "sha512-/pyBZWSLD2n0dcHE3hq8s8ZvcETHtEuF+3E7XVt0Ig2nvsVQXdghHVcEkIWjy9A0wKfTn97a/PSDYohKIlnP/w==" + }, "node_modules/@types/node": { "version": "22.8.7", "resolved": "https://registry.npmjs.org/@types/node/-/node-22.8.7.tgz", @@ -48,6 +442,35 @@ "undici-types": "~6.19.8" } }, + "node_modules/@types/qs": { + "version": "6.9.17", + "resolved": "https://registry.npmjs.org/@types/qs/-/qs-6.9.17.tgz", + "integrity": "sha512-rX4/bPcfmvxHDv0XjfJELTTr+iB+tn032nPILqHm5wbthUUUuVtNGGqzhya9XUxjTP8Fpr0qYgSZZKxGY++svQ==" + }, + "node_modules/@types/range-parser": { + "version": "1.2.7", + "resolved": "https://registry.npmjs.org/@types/range-parser/-/range-parser-1.2.7.tgz", + "integrity": "sha512-hKormJbkJqzQGhziax5PItDUTMAM9uE2XXQmM37dyd4hVM+5aVl7oVxMVUiVQn2oCQFN/LKCZdvSM0pFRqbSmQ==" + }, + "node_modules/@types/send": { + "version": "0.17.4", + "resolved": "https://registry.npmjs.org/@types/send/-/send-0.17.4.tgz", + "integrity": "sha512-x2EM6TJOybec7c52BX0ZspPodMsQUd5L6PRwOunVyVUhXiBSKf3AezDL8Dgvgt5o0UfKNfuA0eMLr2wLT4AiBA==", + "dependencies": { + "@types/mime": "^1", + "@types/node": "*" + } + }, + "node_modules/@types/serve-static": { + "version": "1.15.7", + "resolved": "https://registry.npmjs.org/@types/serve-static/-/serve-static-1.15.7.tgz", + "integrity": "sha512-W8Ym+h8nhuRwaKPaDw34QUkwsGi6Rc4yYqvKFo5rm2FUEhCFbzVWrxXUxuKK8TASjWsysJY0nsmNCGhCOIsrOw==", + "dependencies": { + "@types/http-errors": "*", + "@types/node": "*", + "@types/send": "*" + } + }, "node_modules/@types/triple-beam": { "version": "1.3.5", "resolved": "https://registry.npmjs.org/@types/triple-beam/-/triple-beam-1.3.5.tgz", @@ -65,6 +488,178 @@ "node": ">= 0.6" } }, + "node_modules/apollo-datasource": { + "version": "3.3.2", + "resolved": "https://registry.npmjs.org/apollo-datasource/-/apollo-datasource-3.3.2.tgz", + "integrity": "sha512-L5TiS8E2Hn/Yz7SSnWIVbZw0ZfEIXZCa5VUiVxD9P53JvSrf4aStvsFDlGWPvpIdCR+aly2CfoB79B9/JjKFqg==", + "deprecated": "The `apollo-datasource` package is part of Apollo Server v2 and v3, which are now end-of-life (as of October 22nd 2023 and October 22nd 2024, respectively). See https://www.apollographql.com/docs/apollo-server/previous-versions/ for more details.", + "dependencies": { + "@apollo/utils.keyvaluecache": "^1.0.1", + "apollo-server-env": "^4.2.1" + }, + "engines": { + "node": ">=12.0" + } + }, + "node_modules/apollo-reporting-protobuf": { + "version": "3.4.0", + "resolved": "https://registry.npmjs.org/apollo-reporting-protobuf/-/apollo-reporting-protobuf-3.4.0.tgz", + "integrity": "sha512-h0u3EbC/9RpihWOmcSsvTW2O6RXVaD/mPEjfrPkxRPTEPWqncsgOoRJw+wih4OqfH3PvTJvoEIf4LwKrUaqWog==", + "deprecated": "The `apollo-reporting-protobuf` package is part of Apollo Server v2 and v3, which are now end-of-life (as of October 22nd 2023 and October 22nd 2024, respectively). This package's functionality is now found in the `@apollo/usage-reporting-protobuf` package. See https://www.apollographql.com/docs/apollo-server/previous-versions/ for more details.", + "dependencies": { + "@apollo/protobufjs": "1.2.6" + } + }, + "node_modules/apollo-reporting-protobuf/node_modules/@apollo/protobufjs": { + "version": "1.2.6", + "resolved": "https://registry.npmjs.org/@apollo/protobufjs/-/protobufjs-1.2.6.tgz", + "integrity": "sha512-Wqo1oSHNUj/jxmsVp4iR3I480p6qdqHikn38lKrFhfzcDJ7lwd7Ck7cHRl4JE81tWNArl77xhnG/OkZhxKBYOw==", + "hasInstallScript": true, + "dependencies": { + "@protobufjs/aspromise": "^1.1.2", + "@protobufjs/base64": "^1.1.2", + "@protobufjs/codegen": "^2.0.4", + "@protobufjs/eventemitter": "^1.1.0", + "@protobufjs/fetch": "^1.1.0", + "@protobufjs/float": "^1.0.2", + "@protobufjs/inquire": "^1.1.0", + "@protobufjs/path": "^1.1.2", + "@protobufjs/pool": "^1.1.0", + "@protobufjs/utf8": "^1.1.0", + "@types/long": "^4.0.0", + "@types/node": "^10.1.0", + "long": "^4.0.0" + }, + "bin": { + "apollo-pbjs": "bin/pbjs", + "apollo-pbts": "bin/pbts" + } + }, + "node_modules/apollo-reporting-protobuf/node_modules/@types/node": { + "version": "10.17.60", + "resolved": "https://registry.npmjs.org/@types/node/-/node-10.17.60.tgz", + "integrity": "sha512-F0KIgDJfy2nA3zMLmWGKxcH2ZVEtCZXHHdOQs2gSaQ27+lNeEfGxzkIw90aXswATX7AZ33tahPbzy6KAfUreVw==" + }, + "node_modules/apollo-server-core": { + "version": "3.13.0", + "resolved": "https://registry.npmjs.org/apollo-server-core/-/apollo-server-core-3.13.0.tgz", + "integrity": "sha512-v/g6DR6KuHn9DYSdtQijz8dLOkP78I5JSVJzPkARhDbhpH74QNwrQ2PP2URAPPEDJ2EeZNQDX8PvbYkAKqg+kg==", + "deprecated": "The `apollo-server-core` package is part of Apollo Server v2 and v3, which are now end-of-life (as of October 22nd 2023 and October 22nd 2024, respectively). This package's functionality is now found in the `@apollo/server` package. See https://www.apollographql.com/docs/apollo-server/previous-versions/ for more details.", + "dependencies": { + "@apollo/utils.keyvaluecache": "^1.0.1", + "@apollo/utils.logger": "^1.0.0", + "@apollo/utils.usagereporting": "^1.0.0", + "@apollographql/apollo-tools": "^0.5.3", + "@apollographql/graphql-playground-html": "1.6.29", + "@graphql-tools/mock": "^8.1.2", + "@graphql-tools/schema": "^8.0.0", + "@josephg/resolvable": "^1.0.0", + "apollo-datasource": "^3.3.2", + "apollo-reporting-protobuf": "^3.4.0", + "apollo-server-env": "^4.2.1", + "apollo-server-errors": "^3.3.1", + "apollo-server-plugin-base": "^3.7.2", + "apollo-server-types": "^3.8.0", + "async-retry": "^1.2.1", + "fast-json-stable-stringify": "^2.1.0", + "graphql-tag": "^2.11.0", + "loglevel": "^1.6.8", + "lru-cache": "^6.0.0", + "node-abort-controller": "^3.0.1", + "sha.js": "^2.4.11", + "uuid": "^9.0.0", + "whatwg-mimetype": "^3.0.0" + }, + "engines": { + "node": ">=12.0" + }, + "peerDependencies": { + "graphql": "^15.3.0 || ^16.0.0" + } + }, + "node_modules/apollo-server-env": { + "version": "4.2.1", + "resolved": "https://registry.npmjs.org/apollo-server-env/-/apollo-server-env-4.2.1.tgz", + "integrity": "sha512-vm/7c7ld+zFMxibzqZ7SSa5tBENc4B0uye9LTfjJwGoQFY5xsUPH5FpO5j0bMUDZ8YYNbrF9SNtzc5Cngcr90g==", + "deprecated": "The `apollo-server-env` package is part of Apollo Server v2 and v3, which are now end-of-life (as of October 22nd 2023 and October 22nd 2024, respectively). This package's functionality is now found in the `@apollo/utils.fetcher` package. See https://www.apollographql.com/docs/apollo-server/previous-versions/ for more details.", + "dependencies": { + "node-fetch": "^2.6.7" + }, + "engines": { + "node": ">=12.0" + } + }, + "node_modules/apollo-server-errors": { + "version": "3.3.1", + "resolved": "https://registry.npmjs.org/apollo-server-errors/-/apollo-server-errors-3.3.1.tgz", + "integrity": "sha512-xnZJ5QWs6FixHICXHxUfm+ZWqqxrNuPlQ+kj5m6RtEgIpekOPssH/SD9gf2B4HuWV0QozorrygwZnux8POvyPA==", + "deprecated": "The `apollo-server-errors` package is part of Apollo Server v2 and v3, which are now end-of-life (as of October 22nd 2023 and October 22nd 2024, respectively). This package's functionality is now found in the `@apollo/server` package. See https://www.apollographql.com/docs/apollo-server/previous-versions/ for more details.", + "engines": { + "node": ">=12.0" + }, + "peerDependencies": { + "graphql": "^15.3.0 || ^16.0.0" + } + }, + "node_modules/apollo-server-express": { + "version": "3.13.0", + "resolved": "https://registry.npmjs.org/apollo-server-express/-/apollo-server-express-3.13.0.tgz", + "integrity": "sha512-iSxICNbDUyebOuM8EKb3xOrpIwOQgKxGbR2diSr4HP3IW8T3njKFOoMce50vr+moOCe1ev8BnLcw9SNbuUtf7g==", + "deprecated": "The `apollo-server-express` package is part of Apollo Server v2 and v3, which are now end-of-life (as of October 22nd 2023 and October 22nd 2024, respectively). This package's functionality is now found in the `@apollo/server` package. See https://www.apollographql.com/docs/apollo-server/previous-versions/ for more details.", + "dependencies": { + "@types/accepts": "^1.3.5", + "@types/body-parser": "1.19.2", + "@types/cors": "2.8.12", + "@types/express": "4.17.14", + "@types/express-serve-static-core": "4.17.31", + "accepts": "^1.3.5", + "apollo-server-core": "^3.13.0", + "apollo-server-types": "^3.8.0", + "body-parser": "^1.19.0", + "cors": "^2.8.5", + "parseurl": "^1.3.3" + }, + "engines": { + "node": ">=12.0" + }, + "peerDependencies": { + "express": "^4.17.1", + "graphql": "^15.3.0 || ^16.0.0" + } + }, + "node_modules/apollo-server-plugin-base": { + "version": "3.7.2", + "resolved": "https://registry.npmjs.org/apollo-server-plugin-base/-/apollo-server-plugin-base-3.7.2.tgz", + "integrity": "sha512-wE8dwGDvBOGehSsPTRZ8P/33Jan6/PmL0y0aN/1Z5a5GcbFhDaaJCjK5cav6npbbGL2DPKK0r6MPXi3k3N45aw==", + "deprecated": "The `apollo-server-plugin-base` package is part of Apollo Server v2 and v3, which are now end-of-life (as of October 22nd 2023 and October 22nd 2024, respectively). This package's functionality is now found in the `@apollo/server` package. See https://www.apollographql.com/docs/apollo-server/previous-versions/ for more details.", + "dependencies": { + "apollo-server-types": "^3.8.0" + }, + "engines": { + "node": ">=12.0" + }, + "peerDependencies": { + "graphql": "^15.3.0 || ^16.0.0" + } + }, + "node_modules/apollo-server-types": { + "version": "3.8.0", + "resolved": "https://registry.npmjs.org/apollo-server-types/-/apollo-server-types-3.8.0.tgz", + "integrity": "sha512-ZI/8rTE4ww8BHktsVpb91Sdq7Cb71rdSkXELSwdSR0eXu600/sY+1UXhTWdiJvk+Eq5ljqoHLwLbY2+Clq2b9A==", + "deprecated": "The `apollo-server-types` package is part of Apollo Server v2 and v3, which are now end-of-life (as of October 22nd 2023 and October 22nd 2024, respectively). This package's functionality is now found in the `@apollo/server` package. See https://www.apollographql.com/docs/apollo-server/previous-versions/ for more details.", + "dependencies": { + "@apollo/utils.keyvaluecache": "^1.0.1", + "@apollo/utils.logger": "^1.0.0", + "apollo-reporting-protobuf": "^3.4.0", + "apollo-server-env": "^4.2.1" + }, + "engines": { + "node": ">=12.0" + }, + "peerDependencies": { + "graphql": "^15.3.0 || ^16.0.0" + } + }, "node_modules/array-flatten": { "version": "1.1.1", "resolved": "https://registry.npmjs.org/array-flatten/-/array-flatten-1.1.1.tgz", @@ -75,6 +670,14 @@ "resolved": "https://registry.npmjs.org/async/-/async-3.2.3.tgz", "integrity": "sha512-spZRyzKL5l5BZQrr/6m/SqFdBN0q3OCI0f9rjfBzCMBIP4p75P620rR3gTmaksNOhmzgdxcaxdNfMy6anrbM0g==" }, + "node_modules/async-retry": { + "version": "1.3.3", + "resolved": "https://registry.npmjs.org/async-retry/-/async-retry-1.3.3.tgz", + "integrity": "sha512-wfr/jstw9xNi/0teMHrRW7dsz3Lt5ARhYNZ2ewpadnhaIp5mbALhOAP+EAdsC7t4Z6wqsDVv9+W6gm1Dk9mEyw==", + "dependencies": { + "retry": "0.13.1" + } + }, "node_modules/body-parser": { "version": "1.20.3", "resolved": "https://registry.npmjs.org/body-parser/-/body-parser-1.20.3.tgz", @@ -175,6 +778,11 @@ "text-hex": "1.0.x" } }, + "node_modules/commander": { + "version": "2.20.3", + "resolved": "https://registry.npmjs.org/commander/-/commander-2.20.3.tgz", + "integrity": "sha512-GpVkmM8vF2vQUkj2LvZmD35JxeJOLCwJ9cUkugyk2nuhbv3+mJvpLYYt+0+USMxE+oj+ey/lJEnhZw75x/OMcQ==" + }, "node_modules/content-disposition": { "version": "0.5.4", "resolved": "https://registry.npmjs.org/content-disposition/-/content-disposition-0.5.4.tgz", @@ -207,6 +815,23 @@ "resolved": "https://registry.npmjs.org/cookie-signature/-/cookie-signature-1.0.6.tgz", "integrity": "sha1-4wOogrNCzD7oylE6eZmXNNqzriw=" }, + "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/cssfilter": { + "version": "0.0.10", + "resolved": "https://registry.npmjs.org/cssfilter/-/cssfilter-0.0.10.tgz", + "integrity": "sha512-FAaLDaplstoRsDR8XGYH51znUN0UY7nMc6Z9/fvE8EXGwvJE9hu7W2vHwx1+bd6gCYnln9nLbzxFTrcO9YQDZw==" + }, "node_modules/debug": { "version": "2.6.9", "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz", @@ -344,6 +969,11 @@ "node": ">= 0.10.0" } }, + "node_modules/fast-json-stable-stringify": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/fast-json-stable-stringify/-/fast-json-stable-stringify-2.1.0.tgz", + "integrity": "sha512-lhd/wF+Lk98HZoTCtlVraHtfh5XYijIjalXck7saUtuanSDyLMxnHhSXEDJqHxD7msR8D0uCmqlkwjCV8xvwHw==" + }, "node_modules/fecha": { "version": "4.2.3", "resolved": "https://registry.npmjs.org/fecha/-/fecha-4.2.3.tgz", @@ -454,6 +1084,28 @@ "url": "https://github.com/sponsors/ljharb" } }, + "node_modules/graphql": { + "version": "16.9.0", + "resolved": "https://registry.npmjs.org/graphql/-/graphql-16.9.0.tgz", + "integrity": "sha512-GGTKBX4SD7Wdb8mqeDLni2oaRGYQWjWHGKPQ24ZMnUtKfcsVoiv4uX8+LJr1K6U5VW2Lu1BwJnj7uiori0YtRw==", + "engines": { + "node": "^12.22.0 || ^14.16.0 || ^16.0.0 || >=17.0.0" + } + }, + "node_modules/graphql-tag": { + "version": "2.12.6", + "resolved": "https://registry.npmjs.org/graphql-tag/-/graphql-tag-2.12.6.tgz", + "integrity": "sha512-FdSNcu2QQcWnM2VNvSCCDCVS5PpPqpzgFT8+GXzqJuoDd0CBncxCY278u4mhRO7tMgo2JjgJA5aZ+nWSQ/Z+xg==", + "dependencies": { + "tslib": "^2.1.0" + }, + "engines": { + "node": ">=10" + }, + "peerDependencies": { + "graphql": "^0.9.0 || ^0.10.0 || ^0.11.0 || ^0.12.0 || ^0.13.0 || ^14.0.0 || ^15.0.0 || ^16.0.0" + } + }, "node_modules/has-property-descriptors": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/has-property-descriptors/-/has-property-descriptors-1.0.2.tgz", @@ -643,6 +1295,11 @@ "resolved": "https://registry.npmjs.org/kuler/-/kuler-2.0.0.tgz", "integrity": "sha512-Xq9nH7KlWZmXAtodXDDRE7vs6DU1gTU8zYDHDiWLSip45Egwq3plLHzPn27NgvzL2r1LMPC1vdqh98sQxtqj4A==" }, + "node_modules/lodash.sortby": { + "version": "4.7.0", + "resolved": "https://registry.npmjs.org/lodash.sortby/-/lodash.sortby-4.7.0.tgz", + "integrity": "sha512-HDWXG8isMntAyRF5vZ7xKuEvOhT4AhlRt/3czTSjvGUxjYCBVRQY48ViDHyfYz9VIoBkW4TMGQNapx+l3RUwdA==" + }, "node_modules/logform": { "version": "2.6.0", "resolved": "https://registry.npmjs.org/logform/-/logform-2.6.0.tgz", @@ -664,6 +1321,34 @@ "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.3.tgz", "integrity": "sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA==" }, + "node_modules/loglevel": { + "version": "1.9.2", + "resolved": "https://registry.npmjs.org/loglevel/-/loglevel-1.9.2.tgz", + "integrity": "sha512-HgMmCqIJSAKqo68l0rS2AanEWfkxaZ5wNiEFb5ggm08lDs9Xl2KxBlX3PTcaD2chBM1gXAYf491/M2Rv8Jwayg==", + "engines": { + "node": ">= 0.6.0" + }, + "funding": { + "type": "tidelift", + "url": "https://tidelift.com/funding/github/npm/loglevel" + } + }, + "node_modules/long": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/long/-/long-4.0.0.tgz", + "integrity": "sha512-XsP+KhQif4bjX1kbuSiySJFNAehNxgLb6hPRGJ9QsUr8ajHkuXGdrHmFUTUUXhDwVX2R5bY4JNZEwbUiMhV+MA==" + }, + "node_modules/lru-cache": { + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-6.0.0.tgz", + "integrity": "sha512-Jo6dJ04CmSjuznwJSS3pUeWmd/H0ffTlkXXgwZi+eq1UCmqQwCh+eLsYOYCwY991i2Fah4h1BEMCx4qThGbsiA==", + "dependencies": { + "yallist": "^4.0.0" + }, + "engines": { + "node": ">=10" + } + }, "node_modules/media-typer": { "version": "0.3.0", "resolved": "https://registry.npmjs.org/media-typer/-/media-typer-0.3.0.tgz", @@ -743,6 +1428,38 @@ "node": ">= 0.6" } }, + "node_modules/node-abort-controller": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/node-abort-controller/-/node-abort-controller-3.1.1.tgz", + "integrity": "sha512-AGK2yQKIjRuqnc6VkX2Xj5d+QW8xZ87pa1UK6yA6ouUyuxfHuMP6umE5QK7UmTeOAymo+Zx1Fxiuw9rVx8taHQ==" + }, + "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==", + "dependencies": { + "whatwg-url": "^5.0.0" + }, + "engines": { + "node": "4.x || >=6.0.0" + }, + "peerDependencies": { + "encoding": "^0.1.0" + }, + "peerDependenciesMeta": { + "encoding": { + "optional": true + } + } + }, + "node_modules/object-assign": { + "version": "4.1.1", + "resolved": "https://registry.npmjs.org/object-assign/-/object-assign-4.1.1.tgz", + "integrity": "sha512-rJgTQnkUnH1sFw8yT6VSU3zD3sWmu6sZhIseY8VX+GRu3P6F7Fu+JNDoXfklElbLJSnc3FUQHVe4cU5hj+BcUg==", + "engines": { + "node": ">=0.10.0" + } + }, "node_modules/object-inspect": { "version": "1.13.2", "resolved": "https://registry.npmjs.org/object-inspect/-/object-inspect-1.13.2.tgz", @@ -863,6 +1580,14 @@ "resolved": "https://registry.npmjs.org/requires-port/-/requires-port-1.0.0.tgz", "integrity": "sha1-kl0mAdOaxIXgkc8NpcbmlNw9yv8=" }, + "node_modules/retry": { + "version": "0.13.1", + "resolved": "https://registry.npmjs.org/retry/-/retry-0.13.1.tgz", + "integrity": "sha512-XQBQ3I8W1Cge0Seh+6gjj03LbmRFWuoszgK9ooCpwYIrhhoO80pfq4cUkU5DkknwfOfFteRwlZ56PYOGYyFWdg==", + "engines": { + "node": ">= 4" + } + }, "node_modules/safe-buffer": { "version": "5.2.1", "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.2.1.tgz", @@ -966,6 +1691,18 @@ "resolved": "https://registry.npmjs.org/setprototypeof/-/setprototypeof-1.2.0.tgz", "integrity": "sha512-E5LDX7Wrp85Kil5bhZv46j8jOeboKq5JMmYM3gVGdGH8xFpPWXUMsNrlODCrkoxMEeNi/XZIwuRvY4XNwYMJpw==" }, + "node_modules/sha.js": { + "version": "2.4.11", + "resolved": "https://registry.npmjs.org/sha.js/-/sha.js-2.4.11.tgz", + "integrity": "sha512-QMEp5B7cftE7APOjk5Y6xgrbWu+WkLVQwk8JNjZ8nKRciZaByEW6MubieAiToS7+dwvrjGhH8jRXz3MVd0AYqQ==", + "dependencies": { + "inherits": "^2.0.1", + "safe-buffer": "^5.0.1" + }, + "bin": { + "sha.js": "bin.js" + } + }, "node_modules/side-channel": { "version": "1.0.6", "resolved": "https://registry.npmjs.org/side-channel/-/side-channel-1.0.6.tgz", @@ -1039,6 +1776,11 @@ "node": ">=0.6" } }, + "node_modules/tr46": { + "version": "0.0.3", + "resolved": "https://registry.npmjs.org/tr46/-/tr46-0.0.3.tgz", + "integrity": "sha512-N3WMsuqV66lT30CrXNbEjx4GEwlow3v6rr4mCcv6prnfwhS01rkgyFdjPNBYd9br7LpXV1+Emh01fHnq2Gdgrw==" + }, "node_modules/triple-beam": { "version": "1.4.1", "resolved": "https://registry.npmjs.org/triple-beam/-/triple-beam-1.4.1.tgz", @@ -1047,6 +1789,11 @@ "node": ">= 14.0.0" } }, + "node_modules/tslib": { + "version": "2.8.1", + "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.8.1.tgz", + "integrity": "sha512-oJFu94HQb+KVduSUQL7wnpmqnfmLsOA/nAh6b6EH0wCEoK0/mPeXU6c3wKDV83MkOuHPRHtSXKKU99IBazS/2w==" + }, "node_modules/type-is": { "version": "1.6.18", "resolved": "https://registry.npmjs.org/type-is/-/type-is-1.6.18.tgz", @@ -1085,6 +1832,26 @@ "node": ">= 0.4.0" } }, + "node_modules/uuid": { + "version": "9.0.1", + "resolved": "https://registry.npmjs.org/uuid/-/uuid-9.0.1.tgz", + "integrity": "sha512-b+1eJOlsR9K8HJpow9Ok3fiWOWSIcIzXodvv0rQjVoOVNpWMpxf1wZNpt4y9h10odCNrqnYp1OBzRktckBe3sA==", + "funding": [ + "https://github.com/sponsors/broofa", + "https://github.com/sponsors/ctavan" + ], + "bin": { + "uuid": "dist/bin/uuid" + } + }, + "node_modules/value-or-promise": { + "version": "1.0.11", + "resolved": "https://registry.npmjs.org/value-or-promise/-/value-or-promise-1.0.11.tgz", + "integrity": "sha512-41BrgH+dIbCFXClcSapVs5M6GkENd3gQOJpEfPDNa71LsUGMXDL0jMWpI/Rh7WhX+Aalfz2TTS3Zt5pUsbnhLg==", + "engines": { + "node": ">=12" + } + }, "node_modules/vary": { "version": "1.1.2", "resolved": "https://registry.npmjs.org/vary/-/vary-1.1.2.tgz", @@ -1093,6 +1860,28 @@ "node": ">= 0.8" } }, + "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==" + }, + "node_modules/whatwg-mimetype": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/whatwg-mimetype/-/whatwg-mimetype-3.0.0.tgz", + "integrity": "sha512-nt+N2dzIutVRxARx1nghPKGv1xHikU7HKdfafKkLNLindmPU/ch3U31NOCGGA/dmPcmb1VlofO0vnKAcsm0o/Q==", + "engines": { + "node": ">=12" + } + }, + "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==", + "dependencies": { + "tr46": "~0.0.3", + "webidl-conversions": "^3.0.0" + } + }, "node_modules/winston": { "version": "3.11.0", "resolved": "https://registry.npmjs.org/winston/-/winston-3.11.0.tgz", @@ -1126,9 +1915,136 @@ "engines": { "node": ">= 12.0.0" } + }, + "node_modules/xss": { + "version": "1.0.15", + "resolved": "https://registry.npmjs.org/xss/-/xss-1.0.15.tgz", + "integrity": "sha512-FVdlVVC67WOIPvfOwhoMETV72f6GbW7aOabBC3WxN/oUdoEMDyLz4OgRv5/gck2ZeNqEQu+Tb0kloovXOfpYVg==", + "dependencies": { + "commander": "^2.20.3", + "cssfilter": "0.0.10" + }, + "bin": { + "xss": "bin/xss" + }, + "engines": { + "node": ">= 0.10.0" + } + }, + "node_modules/yallist": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/yallist/-/yallist-4.0.0.tgz", + "integrity": "sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A==" } }, "dependencies": { + "@apollo/protobufjs": { + "version": "1.2.7", + "resolved": "https://registry.npmjs.org/@apollo/protobufjs/-/protobufjs-1.2.7.tgz", + "integrity": "sha512-Lahx5zntHPZia35myYDBRuF58tlwPskwHc5CWBZC/4bMKB6siTBWwtMrkqXcsNwQiFSzSx5hKdRPUmemrEp3Gg==", + "requires": { + "@protobufjs/aspromise": "^1.1.2", + "@protobufjs/base64": "^1.1.2", + "@protobufjs/codegen": "^2.0.4", + "@protobufjs/eventemitter": "^1.1.0", + "@protobufjs/fetch": "^1.1.0", + "@protobufjs/float": "^1.0.2", + "@protobufjs/inquire": "^1.1.0", + "@protobufjs/path": "^1.1.2", + "@protobufjs/pool": "^1.1.0", + "@protobufjs/utf8": "^1.1.0", + "@types/long": "^4.0.0", + "long": "^4.0.0" + } + }, + "@apollo/usage-reporting-protobuf": { + "version": "4.1.1", + "resolved": "https://registry.npmjs.org/@apollo/usage-reporting-protobuf/-/usage-reporting-protobuf-4.1.1.tgz", + "integrity": "sha512-u40dIUePHaSKVshcedO7Wp+mPiZsaU6xjv9J+VyxpoU/zL6Jle+9zWeG98tr/+SZ0nZ4OXhrbb8SNr0rAPpIDA==", + "requires": { + "@apollo/protobufjs": "1.2.7" + } + }, + "@apollo/utils.dropunuseddefinitions": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/@apollo/utils.dropunuseddefinitions/-/utils.dropunuseddefinitions-1.1.0.tgz", + "integrity": "sha512-jU1XjMr6ec9pPoL+BFWzEPW7VHHulVdGKMkPAMiCigpVIT11VmCbnij0bWob8uS3ODJ65tZLYKAh/55vLw2rbg==", + "requires": {} + }, + "@apollo/utils.keyvaluecache": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/@apollo/utils.keyvaluecache/-/utils.keyvaluecache-1.0.2.tgz", + "integrity": "sha512-p7PVdLPMnPzmXSQVEsy27cYEjVON+SH/Wb7COyW3rQN8+wJgT1nv9jZouYtztWW8ZgTkii5T6tC9qfoDREd4mg==", + "requires": { + "@apollo/utils.logger": "^1.0.0", + "lru-cache": "7.10.1 - 7.13.1" + }, + "dependencies": { + "lru-cache": { + "version": "7.13.1", + "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-7.13.1.tgz", + "integrity": "sha512-CHqbAq7NFlW3RSnoWXLJBxCWaZVBrfa9UEHId2M3AW8iEBurbqduNexEUCGc3SHc6iCYXNJCDi903LajSVAEPQ==" + } + } + }, + "@apollo/utils.logger": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/@apollo/utils.logger/-/utils.logger-1.0.1.tgz", + "integrity": "sha512-XdlzoY7fYNK4OIcvMD2G94RoFZbzTQaNP0jozmqqMudmaGo2I/2Jx71xlDJ801mWA/mbYRihyaw6KJii7k5RVA==" + }, + "@apollo/utils.printwithreducedwhitespace": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/@apollo/utils.printwithreducedwhitespace/-/utils.printwithreducedwhitespace-1.1.0.tgz", + "integrity": "sha512-GfFSkAv3n1toDZ4V6u2d7L4xMwLA+lv+6hqXicMN9KELSJ9yy9RzuEXaX73c/Ry+GzRsBy/fdSUGayGqdHfT2Q==", + "requires": {} + }, + "@apollo/utils.removealiases": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/@apollo/utils.removealiases/-/utils.removealiases-1.0.0.tgz", + "integrity": "sha512-6cM8sEOJW2LaGjL/0vHV0GtRaSekrPQR4DiywaApQlL9EdROASZU5PsQibe2MWeZCOhNrPRuHh4wDMwPsWTn8A==", + "requires": {} + }, + "@apollo/utils.sortast": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/@apollo/utils.sortast/-/utils.sortast-1.1.0.tgz", + "integrity": "sha512-VPlTsmUnOwzPK5yGZENN069y6uUHgeiSlpEhRnLFYwYNoJHsuJq2vXVwIaSmts015WTPa2fpz1inkLYByeuRQA==", + "requires": { + "lodash.sortby": "^4.7.0" + } + }, + "@apollo/utils.stripsensitiveliterals": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/@apollo/utils.stripsensitiveliterals/-/utils.stripsensitiveliterals-1.2.0.tgz", + "integrity": "sha512-E41rDUzkz/cdikM5147d8nfCFVKovXxKBcjvLEQ7bjZm/cg9zEcXvS6vFY8ugTubI3fn6zoqo0CyU8zT+BGP9w==", + "requires": {} + }, + "@apollo/utils.usagereporting": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/@apollo/utils.usagereporting/-/utils.usagereporting-1.0.1.tgz", + "integrity": "sha512-6dk+0hZlnDbahDBB2mP/PZ5ybrtCJdLMbeNJD+TJpKyZmSY6bA3SjI8Cr2EM9QA+AdziywuWg+SgbWUF3/zQqQ==", + "requires": { + "@apollo/usage-reporting-protobuf": "^4.0.0", + "@apollo/utils.dropunuseddefinitions": "^1.1.0", + "@apollo/utils.printwithreducedwhitespace": "^1.1.0", + "@apollo/utils.removealiases": "1.0.0", + "@apollo/utils.sortast": "^1.1.0", + "@apollo/utils.stripsensitiveliterals": "^1.2.0" + } + }, + "@apollographql/apollo-tools": { + "version": "0.5.4", + "resolved": "https://registry.npmjs.org/@apollographql/apollo-tools/-/apollo-tools-0.5.4.tgz", + "integrity": "sha512-shM3q7rUbNyXVVRkQJQseXv6bnYM3BUma/eZhwXR4xsuM+bqWnJKvW7SAfRjP7LuSCocrexa5AXhjjawNHrIlw==", + "requires": {} + }, + "@apollographql/graphql-playground-html": { + "version": "1.6.29", + "resolved": "https://registry.npmjs.org/@apollographql/graphql-playground-html/-/graphql-playground-html-1.6.29.tgz", + "integrity": "sha512-xCcXpoz52rI4ksJSdOCxeOCn2DLocxwHf9dVT/Q90Pte1LX+LY+91SFtJF3KXVHH8kEin+g1KKCQPKBjZJfWNA==", + "requires": { + "xss": "^1.0.8" + } + }, "@colors/colors": { "version": "1.6.0", "resolved": "https://registry.npmjs.org/@colors/colors/-/colors-1.6.0.tgz", @@ -1144,6 +2060,214 @@ "kuler": "^2.0.0" } }, + "@graphql-tools/merge": { + "version": "8.3.1", + "resolved": "https://registry.npmjs.org/@graphql-tools/merge/-/merge-8.3.1.tgz", + "integrity": "sha512-BMm99mqdNZbEYeTPK3it9r9S6rsZsQKtlqJsSBknAclXq2pGEfOxjcIZi+kBSkHZKPKCRrYDd5vY0+rUmIHVLg==", + "requires": { + "@graphql-tools/utils": "8.9.0", + "tslib": "^2.4.0" + }, + "dependencies": { + "@graphql-tools/utils": { + "version": "8.9.0", + "resolved": "https://registry.npmjs.org/@graphql-tools/utils/-/utils-8.9.0.tgz", + "integrity": "sha512-pjJIWH0XOVnYGXCqej8g/u/tsfV4LvLlj0eATKQu5zwnxd/TiTHq7Cg313qUPTFFHZ3PP5wJ15chYVtLDwaymg==", + "requires": { + "tslib": "^2.4.0" + } + } + } + }, + "@graphql-tools/mock": { + "version": "8.7.20", + "resolved": "https://registry.npmjs.org/@graphql-tools/mock/-/mock-8.7.20.tgz", + "integrity": "sha512-ljcHSJWjC/ZyzpXd5cfNhPI7YljRVvabKHPzKjEs5ElxWu2cdlLGvyNYepApXDsM/OJG/2xuhGM+9GWu5gEAPQ==", + "requires": { + "@graphql-tools/schema": "^9.0.18", + "@graphql-tools/utils": "^9.2.1", + "fast-json-stable-stringify": "^2.1.0", + "tslib": "^2.4.0" + }, + "dependencies": { + "@graphql-tools/merge": { + "version": "8.4.2", + "resolved": "https://registry.npmjs.org/@graphql-tools/merge/-/merge-8.4.2.tgz", + "integrity": "sha512-XbrHAaj8yDuINph+sAfuq3QCZ/tKblrTLOpirK0+CAgNlZUCHs0Fa+xtMUURgwCVThLle1AF7svJCxFizygLsw==", + "requires": { + "@graphql-tools/utils": "^9.2.1", + "tslib": "^2.4.0" + } + }, + "@graphql-tools/schema": { + "version": "9.0.19", + "resolved": "https://registry.npmjs.org/@graphql-tools/schema/-/schema-9.0.19.tgz", + "integrity": "sha512-oBRPoNBtCkk0zbUsyP4GaIzCt8C0aCI4ycIRUL67KK5pOHljKLBBtGT+Jr6hkzA74C8Gco8bpZPe7aWFjiaK2w==", + "requires": { + "@graphql-tools/merge": "^8.4.1", + "@graphql-tools/utils": "^9.2.1", + "tslib": "^2.4.0", + "value-or-promise": "^1.0.12" + } + }, + "value-or-promise": { + "version": "1.0.12", + "resolved": "https://registry.npmjs.org/value-or-promise/-/value-or-promise-1.0.12.tgz", + "integrity": "sha512-Z6Uz+TYwEqE7ZN50gwn+1LCVo9ZVrpxRPOhOLnncYkY1ZzOYtrX8Fwf/rFktZ8R5mJms6EZf5TqNOMeZmnPq9Q==" + } + } + }, + "@graphql-tools/schema": { + "version": "8.5.1", + "resolved": "https://registry.npmjs.org/@graphql-tools/schema/-/schema-8.5.1.tgz", + "integrity": "sha512-0Esilsh0P/qYcB5DKQpiKeQs/jevzIadNTaT0jeWklPMwNbT7yMX4EqZany7mbeRRlSRwMzNzL5olyFdffHBZg==", + "requires": { + "@graphql-tools/merge": "8.3.1", + "@graphql-tools/utils": "8.9.0", + "tslib": "^2.4.0", + "value-or-promise": "1.0.11" + }, + "dependencies": { + "@graphql-tools/utils": { + "version": "8.9.0", + "resolved": "https://registry.npmjs.org/@graphql-tools/utils/-/utils-8.9.0.tgz", + "integrity": "sha512-pjJIWH0XOVnYGXCqej8g/u/tsfV4LvLlj0eATKQu5zwnxd/TiTHq7Cg313qUPTFFHZ3PP5wJ15chYVtLDwaymg==", + "requires": { + "tslib": "^2.4.0" + } + } + } + }, + "@graphql-tools/utils": { + "version": "9.2.1", + "resolved": "https://registry.npmjs.org/@graphql-tools/utils/-/utils-9.2.1.tgz", + "integrity": "sha512-WUw506Ql6xzmOORlriNrD6Ugx+HjVgYxt9KCXD9mHAak+eaXSwuGGPyE60hy9xaDEoXKBsG7SkG69ybitaVl6A==", + "requires": { + "@graphql-typed-document-node/core": "^3.1.1", + "tslib": "^2.4.0" + } + }, + "@graphql-typed-document-node/core": { + "version": "3.2.0", + "resolved": "https://registry.npmjs.org/@graphql-typed-document-node/core/-/core-3.2.0.tgz", + "integrity": "sha512-mB9oAsNCm9aM3/SOv4YtBMqZbYj10R7dkq8byBqxGY/ncFwhf2oQzMV+LCRlWoDSEBJ3COiR1yeDvMtsoOsuFQ==", + "requires": {} + }, + "@josephg/resolvable": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/@josephg/resolvable/-/resolvable-1.0.1.tgz", + "integrity": "sha512-CtzORUwWTTOTqfVtHaKRJ0I1kNQd1bpn3sUh8I3nJDVY+5/M/Oe1DnEWzPQvqq/xPIIkzzzIP7mfCoAjFRvDhg==" + }, + "@protobufjs/aspromise": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/@protobufjs/aspromise/-/aspromise-1.1.2.tgz", + "integrity": "sha512-j+gKExEuLmKwvz3OgROXtrJ2UG2x8Ch2YZUxahh+s1F2HZ+wAceUNLkvy6zKCPVRkU++ZWQrdxsUeQXmcg4uoQ==" + }, + "@protobufjs/base64": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/@protobufjs/base64/-/base64-1.1.2.tgz", + "integrity": "sha512-AZkcAA5vnN/v4PDqKyMR5lx7hZttPDgClv83E//FMNhR2TMcLUhfRUBHCmSl0oi9zMgDDqRUJkSxO3wm85+XLg==" + }, + "@protobufjs/codegen": { + "version": "2.0.4", + "resolved": "https://registry.npmjs.org/@protobufjs/codegen/-/codegen-2.0.4.tgz", + "integrity": "sha512-YyFaikqM5sH0ziFZCN3xDC7zeGaB/d0IUb9CATugHWbd1FRFwWwt4ld4OYMPWu5a3Xe01mGAULCdqhMlPl29Jg==" + }, + "@protobufjs/eventemitter": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/@protobufjs/eventemitter/-/eventemitter-1.1.0.tgz", + "integrity": "sha512-j9ednRT81vYJ9OfVuXG6ERSTdEL1xVsNgqpkxMsbIabzSo3goCjDIveeGv5d03om39ML71RdmrGNjG5SReBP/Q==" + }, + "@protobufjs/fetch": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/@protobufjs/fetch/-/fetch-1.1.0.tgz", + "integrity": "sha512-lljVXpqXebpsijW71PZaCYeIcE5on1w5DlQy5WH6GLbFryLUrBD4932W/E2BSpfRJWseIL4v/KPgBFxDOIdKpQ==", + "requires": { + "@protobufjs/aspromise": "^1.1.1", + "@protobufjs/inquire": "^1.1.0" + } + }, + "@protobufjs/float": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/@protobufjs/float/-/float-1.0.2.tgz", + "integrity": "sha512-Ddb+kVXlXst9d+R9PfTIxh1EdNkgoRe5tOX6t01f1lYWOvJnSPDBlG241QLzcyPdoNTsblLUdujGSE4RzrTZGQ==" + }, + "@protobufjs/inquire": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/@protobufjs/inquire/-/inquire-1.1.0.tgz", + "integrity": "sha512-kdSefcPdruJiFMVSbn801t4vFK7KB/5gd2fYvrxhuJYg8ILrmn9SKSX2tZdV6V+ksulWqS7aXjBcRXl3wHoD9Q==" + }, + "@protobufjs/path": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/@protobufjs/path/-/path-1.1.2.tgz", + "integrity": "sha512-6JOcJ5Tm08dOHAbdR3GrvP+yUUfkjG5ePsHYczMFLq3ZmMkAD98cDgcT2iA1lJ9NVwFd4tH/iSSoe44YWkltEA==" + }, + "@protobufjs/pool": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/@protobufjs/pool/-/pool-1.1.0.tgz", + "integrity": "sha512-0kELaGSIDBKvcgS4zkjz1PeddatrjYcmMWOlAuAPwAeccUrPHdUqo/J6LiymHHEiJT5NrF1UVwxY14f+fy4WQw==" + }, + "@protobufjs/utf8": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/@protobufjs/utf8/-/utf8-1.1.0.tgz", + "integrity": "sha512-Vvn3zZrhQZkkBE8LSuW3em98c0FwgO4nxzv6OdSxPKJIEKY2bGbHn+mhGIPerzI4twdxaP8/0+06HBpwf345Lw==" + }, + "@types/accepts": { + "version": "1.3.7", + "resolved": "https://registry.npmjs.org/@types/accepts/-/accepts-1.3.7.tgz", + "integrity": "sha512-Pay9fq2lM2wXPWbteBsRAGiWH2hig4ZE2asK+mm7kUzlxRTfL961rj89I6zV/E3PcIkDqyuBEcMxFT7rccugeQ==", + "requires": { + "@types/node": "*" + } + }, + "@types/body-parser": { + "version": "1.19.2", + "resolved": "https://registry.npmjs.org/@types/body-parser/-/body-parser-1.19.2.tgz", + "integrity": "sha512-ALYone6pm6QmwZoAgeyNksccT9Q4AWZQ6PvfwR37GT6r6FWUPguq6sUmNGSMV2Wr761oQoBxwGGa6DR5o1DC9g==", + "requires": { + "@types/connect": "*", + "@types/node": "*" + } + }, + "@types/connect": { + "version": "3.4.38", + "resolved": "https://registry.npmjs.org/@types/connect/-/connect-3.4.38.tgz", + "integrity": "sha512-K6uROf1LD88uDQqJCktA4yzL1YYAK6NgfsI0v/mTgyPKWsX1CnJ0XPSDhViejru1GcRkLWb8RlzFYJRqGUbaug==", + "requires": { + "@types/node": "*" + } + }, + "@types/cors": { + "version": "2.8.12", + "resolved": "https://registry.npmjs.org/@types/cors/-/cors-2.8.12.tgz", + "integrity": "sha512-vt+kDhq/M2ayberEtJcIN/hxXy1Pk+59g2FV/ZQceeaTyCtCucjL2Q7FXlFjtWn4n15KCr1NE2lNNFhp0lEThw==" + }, + "@types/express": { + "version": "4.17.14", + "resolved": "https://registry.npmjs.org/@types/express/-/express-4.17.14.tgz", + "integrity": "sha512-TEbt+vaPFQ+xpxFLFssxUDXj5cWCxZJjIcB7Yg0k0GMHGtgtQgpvx/MUQUeAkNbA9AAGrwkAsoeItdTgS7FMyg==", + "requires": { + "@types/body-parser": "*", + "@types/express-serve-static-core": "^4.17.18", + "@types/qs": "*", + "@types/serve-static": "*" + } + }, + "@types/express-serve-static-core": { + "version": "4.17.31", + "resolved": "https://registry.npmjs.org/@types/express-serve-static-core/-/express-serve-static-core-4.17.31.tgz", + "integrity": "sha512-DxMhY+NAsTwMMFHBTtJFNp5qiHKJ7TeqOo23zVEM9alT1Ml27Q3xcTH0xwxn7Q0BbMcVEJOs/7aQtUWupUQN3Q==", + "requires": { + "@types/node": "*", + "@types/qs": "*", + "@types/range-parser": "*" + } + }, + "@types/http-errors": { + "version": "2.0.4", + "resolved": "https://registry.npmjs.org/@types/http-errors/-/http-errors-2.0.4.tgz", + "integrity": "sha512-D0CFMMtydbJAegzOyHjtiKPLlvnm3iTZyZRSZoLq2mRhDdmLfIWOCYPfQJ4cu2erKghU++QvjcUjp/5h7hESpA==" + }, "@types/http-proxy": { "version": "1.17.15", "resolved": "https://registry.npmjs.org/@types/http-proxy/-/http-proxy-1.17.15.tgz", @@ -1152,6 +2276,16 @@ "@types/node": "*" } }, + "@types/long": { + "version": "4.0.2", + "resolved": "https://registry.npmjs.org/@types/long/-/long-4.0.2.tgz", + "integrity": "sha512-MqTGEo5bj5t157U6fA/BiDynNkn0YknVdh48CMPkTSpFTVmvao5UQmm7uEF6xBEo7qIMAlY/JSleYaE6VOdpaA==" + }, + "@types/mime": { + "version": "1.3.5", + "resolved": "https://registry.npmjs.org/@types/mime/-/mime-1.3.5.tgz", + "integrity": "sha512-/pyBZWSLD2n0dcHE3hq8s8ZvcETHtEuF+3E7XVt0Ig2nvsVQXdghHVcEkIWjy9A0wKfTn97a/PSDYohKIlnP/w==" + }, "@types/node": { "version": "22.8.7", "resolved": "https://registry.npmjs.org/@types/node/-/node-22.8.7.tgz", @@ -1160,6 +2294,35 @@ "undici-types": "~6.19.8" } }, + "@types/qs": { + "version": "6.9.17", + "resolved": "https://registry.npmjs.org/@types/qs/-/qs-6.9.17.tgz", + "integrity": "sha512-rX4/bPcfmvxHDv0XjfJELTTr+iB+tn032nPILqHm5wbthUUUuVtNGGqzhya9XUxjTP8Fpr0qYgSZZKxGY++svQ==" + }, + "@types/range-parser": { + "version": "1.2.7", + "resolved": "https://registry.npmjs.org/@types/range-parser/-/range-parser-1.2.7.tgz", + "integrity": "sha512-hKormJbkJqzQGhziax5PItDUTMAM9uE2XXQmM37dyd4hVM+5aVl7oVxMVUiVQn2oCQFN/LKCZdvSM0pFRqbSmQ==" + }, + "@types/send": { + "version": "0.17.4", + "resolved": "https://registry.npmjs.org/@types/send/-/send-0.17.4.tgz", + "integrity": "sha512-x2EM6TJOybec7c52BX0ZspPodMsQUd5L6PRwOunVyVUhXiBSKf3AezDL8Dgvgt5o0UfKNfuA0eMLr2wLT4AiBA==", + "requires": { + "@types/mime": "^1", + "@types/node": "*" + } + }, + "@types/serve-static": { + "version": "1.15.7", + "resolved": "https://registry.npmjs.org/@types/serve-static/-/serve-static-1.15.7.tgz", + "integrity": "sha512-W8Ym+h8nhuRwaKPaDw34QUkwsGi6Rc4yYqvKFo5rm2FUEhCFbzVWrxXUxuKK8TASjWsysJY0nsmNCGhCOIsrOw==", + "requires": { + "@types/http-errors": "*", + "@types/node": "*", + "@types/send": "*" + } + }, "@types/triple-beam": { "version": "1.3.5", "resolved": "https://registry.npmjs.org/@types/triple-beam/-/triple-beam-1.3.5.tgz", @@ -1174,6 +2337,131 @@ "negotiator": "0.6.3" } }, + "apollo-datasource": { + "version": "3.3.2", + "resolved": "https://registry.npmjs.org/apollo-datasource/-/apollo-datasource-3.3.2.tgz", + "integrity": "sha512-L5TiS8E2Hn/Yz7SSnWIVbZw0ZfEIXZCa5VUiVxD9P53JvSrf4aStvsFDlGWPvpIdCR+aly2CfoB79B9/JjKFqg==", + "requires": { + "@apollo/utils.keyvaluecache": "^1.0.1", + "apollo-server-env": "^4.2.1" + } + }, + "apollo-reporting-protobuf": { + "version": "3.4.0", + "resolved": "https://registry.npmjs.org/apollo-reporting-protobuf/-/apollo-reporting-protobuf-3.4.0.tgz", + "integrity": "sha512-h0u3EbC/9RpihWOmcSsvTW2O6RXVaD/mPEjfrPkxRPTEPWqncsgOoRJw+wih4OqfH3PvTJvoEIf4LwKrUaqWog==", + "requires": { + "@apollo/protobufjs": "1.2.6" + }, + "dependencies": { + "@apollo/protobufjs": { + "version": "1.2.6", + "resolved": "https://registry.npmjs.org/@apollo/protobufjs/-/protobufjs-1.2.6.tgz", + "integrity": "sha512-Wqo1oSHNUj/jxmsVp4iR3I480p6qdqHikn38lKrFhfzcDJ7lwd7Ck7cHRl4JE81tWNArl77xhnG/OkZhxKBYOw==", + "requires": { + "@protobufjs/aspromise": "^1.1.2", + "@protobufjs/base64": "^1.1.2", + "@protobufjs/codegen": "^2.0.4", + "@protobufjs/eventemitter": "^1.1.0", + "@protobufjs/fetch": "^1.1.0", + "@protobufjs/float": "^1.0.2", + "@protobufjs/inquire": "^1.1.0", + "@protobufjs/path": "^1.1.2", + "@protobufjs/pool": "^1.1.0", + "@protobufjs/utf8": "^1.1.0", + "@types/long": "^4.0.0", + "@types/node": "^10.1.0", + "long": "^4.0.0" + } + }, + "@types/node": { + "version": "10.17.60", + "resolved": "https://registry.npmjs.org/@types/node/-/node-10.17.60.tgz", + "integrity": "sha512-F0KIgDJfy2nA3zMLmWGKxcH2ZVEtCZXHHdOQs2gSaQ27+lNeEfGxzkIw90aXswATX7AZ33tahPbzy6KAfUreVw==" + } + } + }, + "apollo-server-core": { + "version": "3.13.0", + "resolved": "https://registry.npmjs.org/apollo-server-core/-/apollo-server-core-3.13.0.tgz", + "integrity": "sha512-v/g6DR6KuHn9DYSdtQijz8dLOkP78I5JSVJzPkARhDbhpH74QNwrQ2PP2URAPPEDJ2EeZNQDX8PvbYkAKqg+kg==", + "requires": { + "@apollo/utils.keyvaluecache": "^1.0.1", + "@apollo/utils.logger": "^1.0.0", + "@apollo/utils.usagereporting": "^1.0.0", + "@apollographql/apollo-tools": "^0.5.3", + "@apollographql/graphql-playground-html": "1.6.29", + "@graphql-tools/mock": "^8.1.2", + "@graphql-tools/schema": "^8.0.0", + "@josephg/resolvable": "^1.0.0", + "apollo-datasource": "^3.3.2", + "apollo-reporting-protobuf": "^3.4.0", + "apollo-server-env": "^4.2.1", + "apollo-server-errors": "^3.3.1", + "apollo-server-plugin-base": "^3.7.2", + "apollo-server-types": "^3.8.0", + "async-retry": "^1.2.1", + "fast-json-stable-stringify": "^2.1.0", + "graphql-tag": "^2.11.0", + "loglevel": "^1.6.8", + "lru-cache": "^6.0.0", + "node-abort-controller": "^3.0.1", + "sha.js": "^2.4.11", + "uuid": "^9.0.0", + "whatwg-mimetype": "^3.0.0" + } + }, + "apollo-server-env": { + "version": "4.2.1", + "resolved": "https://registry.npmjs.org/apollo-server-env/-/apollo-server-env-4.2.1.tgz", + "integrity": "sha512-vm/7c7ld+zFMxibzqZ7SSa5tBENc4B0uye9LTfjJwGoQFY5xsUPH5FpO5j0bMUDZ8YYNbrF9SNtzc5Cngcr90g==", + "requires": { + "node-fetch": "^2.6.7" + } + }, + "apollo-server-errors": { + "version": "3.3.1", + "resolved": "https://registry.npmjs.org/apollo-server-errors/-/apollo-server-errors-3.3.1.tgz", + "integrity": "sha512-xnZJ5QWs6FixHICXHxUfm+ZWqqxrNuPlQ+kj5m6RtEgIpekOPssH/SD9gf2B4HuWV0QozorrygwZnux8POvyPA==", + "requires": {} + }, + "apollo-server-express": { + "version": "3.13.0", + "resolved": "https://registry.npmjs.org/apollo-server-express/-/apollo-server-express-3.13.0.tgz", + "integrity": "sha512-iSxICNbDUyebOuM8EKb3xOrpIwOQgKxGbR2diSr4HP3IW8T3njKFOoMce50vr+moOCe1ev8BnLcw9SNbuUtf7g==", + "requires": { + "@types/accepts": "^1.3.5", + "@types/body-parser": "1.19.2", + "@types/cors": "2.8.12", + "@types/express": "4.17.14", + "@types/express-serve-static-core": "4.17.31", + "accepts": "^1.3.5", + "apollo-server-core": "^3.13.0", + "apollo-server-types": "^3.8.0", + "body-parser": "^1.19.0", + "cors": "^2.8.5", + "parseurl": "^1.3.3" + } + }, + "apollo-server-plugin-base": { + "version": "3.7.2", + "resolved": "https://registry.npmjs.org/apollo-server-plugin-base/-/apollo-server-plugin-base-3.7.2.tgz", + "integrity": "sha512-wE8dwGDvBOGehSsPTRZ8P/33Jan6/PmL0y0aN/1Z5a5GcbFhDaaJCjK5cav6npbbGL2DPKK0r6MPXi3k3N45aw==", + "requires": { + "apollo-server-types": "^3.8.0" + } + }, + "apollo-server-types": { + "version": "3.8.0", + "resolved": "https://registry.npmjs.org/apollo-server-types/-/apollo-server-types-3.8.0.tgz", + "integrity": "sha512-ZI/8rTE4ww8BHktsVpb91Sdq7Cb71rdSkXELSwdSR0eXu600/sY+1UXhTWdiJvk+Eq5ljqoHLwLbY2+Clq2b9A==", + "requires": { + "@apollo/utils.keyvaluecache": "^1.0.1", + "@apollo/utils.logger": "^1.0.0", + "apollo-reporting-protobuf": "^3.4.0", + "apollo-server-env": "^4.2.1" + } + }, "array-flatten": { "version": "1.1.1", "resolved": "https://registry.npmjs.org/array-flatten/-/array-flatten-1.1.1.tgz", @@ -1184,6 +2472,14 @@ "resolved": "https://registry.npmjs.org/async/-/async-3.2.3.tgz", "integrity": "sha512-spZRyzKL5l5BZQrr/6m/SqFdBN0q3OCI0f9rjfBzCMBIP4p75P620rR3gTmaksNOhmzgdxcaxdNfMy6anrbM0g==" }, + "async-retry": { + "version": "1.3.3", + "resolved": "https://registry.npmjs.org/async-retry/-/async-retry-1.3.3.tgz", + "integrity": "sha512-wfr/jstw9xNi/0teMHrRW7dsz3Lt5ARhYNZ2ewpadnhaIp5mbALhOAP+EAdsC7t4Z6wqsDVv9+W6gm1Dk9mEyw==", + "requires": { + "retry": "0.13.1" + } + }, "body-parser": { "version": "1.20.3", "resolved": "https://registry.npmjs.org/body-parser/-/body-parser-1.20.3.tgz", @@ -1268,6 +2564,11 @@ "text-hex": "1.0.x" } }, + "commander": { + "version": "2.20.3", + "resolved": "https://registry.npmjs.org/commander/-/commander-2.20.3.tgz", + "integrity": "sha512-GpVkmM8vF2vQUkj2LvZmD35JxeJOLCwJ9cUkugyk2nuhbv3+mJvpLYYt+0+USMxE+oj+ey/lJEnhZw75x/OMcQ==" + }, "content-disposition": { "version": "0.5.4", "resolved": "https://registry.npmjs.org/content-disposition/-/content-disposition-0.5.4.tgz", @@ -1291,6 +2592,20 @@ "resolved": "https://registry.npmjs.org/cookie-signature/-/cookie-signature-1.0.6.tgz", "integrity": "sha1-4wOogrNCzD7oylE6eZmXNNqzriw=" }, + "cors": { + "version": "2.8.5", + "resolved": "https://registry.npmjs.org/cors/-/cors-2.8.5.tgz", + "integrity": "sha512-KIHbLJqu73RGr/hnbrO9uBeixNGuvSQjul/jdFvS/KFSIH1hWVd1ng7zOHx+YrEfInLG7q4n6GHQ9cDtxv/P6g==", + "requires": { + "object-assign": "^4", + "vary": "^1" + } + }, + "cssfilter": { + "version": "0.0.10", + "resolved": "https://registry.npmjs.org/cssfilter/-/cssfilter-0.0.10.tgz", + "integrity": "sha512-FAaLDaplstoRsDR8XGYH51znUN0UY7nMc6Z9/fvE8EXGwvJE9hu7W2vHwx1+bd6gCYnln9nLbzxFTrcO9YQDZw==" + }, "debug": { "version": "2.6.9", "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz", @@ -1400,6 +2715,11 @@ "vary": "~1.1.2" } }, + "fast-json-stable-stringify": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/fast-json-stable-stringify/-/fast-json-stable-stringify-2.1.0.tgz", + "integrity": "sha512-lhd/wF+Lk98HZoTCtlVraHtfh5XYijIjalXck7saUtuanSDyLMxnHhSXEDJqHxD7msR8D0uCmqlkwjCV8xvwHw==" + }, "fecha": { "version": "4.2.3", "resolved": "https://registry.npmjs.org/fecha/-/fecha-4.2.3.tgz", @@ -1472,6 +2792,19 @@ "get-intrinsic": "^1.1.3" } }, + "graphql": { + "version": "16.9.0", + "resolved": "https://registry.npmjs.org/graphql/-/graphql-16.9.0.tgz", + "integrity": "sha512-GGTKBX4SD7Wdb8mqeDLni2oaRGYQWjWHGKPQ24ZMnUtKfcsVoiv4uX8+LJr1K6U5VW2Lu1BwJnj7uiori0YtRw==" + }, + "graphql-tag": { + "version": "2.12.6", + "resolved": "https://registry.npmjs.org/graphql-tag/-/graphql-tag-2.12.6.tgz", + "integrity": "sha512-FdSNcu2QQcWnM2VNvSCCDCVS5PpPqpzgFT8+GXzqJuoDd0CBncxCY278u4mhRO7tMgo2JjgJA5aZ+nWSQ/Z+xg==", + "requires": { + "tslib": "^2.1.0" + } + }, "has-property-descriptors": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/has-property-descriptors/-/has-property-descriptors-1.0.2.tgz", @@ -1604,6 +2937,11 @@ "resolved": "https://registry.npmjs.org/kuler/-/kuler-2.0.0.tgz", "integrity": "sha512-Xq9nH7KlWZmXAtodXDDRE7vs6DU1gTU8zYDHDiWLSip45Egwq3plLHzPn27NgvzL2r1LMPC1vdqh98sQxtqj4A==" }, + "lodash.sortby": { + "version": "4.7.0", + "resolved": "https://registry.npmjs.org/lodash.sortby/-/lodash.sortby-4.7.0.tgz", + "integrity": "sha512-HDWXG8isMntAyRF5vZ7xKuEvOhT4AhlRt/3czTSjvGUxjYCBVRQY48ViDHyfYz9VIoBkW4TMGQNapx+l3RUwdA==" + }, "logform": { "version": "2.6.0", "resolved": "https://registry.npmjs.org/logform/-/logform-2.6.0.tgz", @@ -1624,6 +2962,24 @@ } } }, + "loglevel": { + "version": "1.9.2", + "resolved": "https://registry.npmjs.org/loglevel/-/loglevel-1.9.2.tgz", + "integrity": "sha512-HgMmCqIJSAKqo68l0rS2AanEWfkxaZ5wNiEFb5ggm08lDs9Xl2KxBlX3PTcaD2chBM1gXAYf491/M2Rv8Jwayg==" + }, + "long": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/long/-/long-4.0.0.tgz", + "integrity": "sha512-XsP+KhQif4bjX1kbuSiySJFNAehNxgLb6hPRGJ9QsUr8ajHkuXGdrHmFUTUUXhDwVX2R5bY4JNZEwbUiMhV+MA==" + }, + "lru-cache": { + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-6.0.0.tgz", + "integrity": "sha512-Jo6dJ04CmSjuznwJSS3pUeWmd/H0ffTlkXXgwZi+eq1UCmqQwCh+eLsYOYCwY991i2Fah4h1BEMCx4qThGbsiA==", + "requires": { + "yallist": "^4.0.0" + } + }, "media-typer": { "version": "0.3.0", "resolved": "https://registry.npmjs.org/media-typer/-/media-typer-0.3.0.tgz", @@ -1676,6 +3032,24 @@ "resolved": "https://registry.npmjs.org/negotiator/-/negotiator-0.6.3.tgz", "integrity": "sha512-+EUsqGPLsM+j/zdChZjsnX51g4XrHFOIXwfnCVPGlQk/k5giakcKsuxCObBRu6DSm9opw/O6slWbJdghQM4bBg==" }, + "node-abort-controller": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/node-abort-controller/-/node-abort-controller-3.1.1.tgz", + "integrity": "sha512-AGK2yQKIjRuqnc6VkX2Xj5d+QW8xZ87pa1UK6yA6ouUyuxfHuMP6umE5QK7UmTeOAymo+Zx1Fxiuw9rVx8taHQ==" + }, + "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==", + "requires": { + "whatwg-url": "^5.0.0" + } + }, + "object-assign": { + "version": "4.1.1", + "resolved": "https://registry.npmjs.org/object-assign/-/object-assign-4.1.1.tgz", + "integrity": "sha512-rJgTQnkUnH1sFw8yT6VSU3zD3sWmu6sZhIseY8VX+GRu3P6F7Fu+JNDoXfklElbLJSnc3FUQHVe4cU5hj+BcUg==" + }, "object-inspect": { "version": "1.13.2", "resolved": "https://registry.npmjs.org/object-inspect/-/object-inspect-1.13.2.tgz", @@ -1760,6 +3134,11 @@ "resolved": "https://registry.npmjs.org/requires-port/-/requires-port-1.0.0.tgz", "integrity": "sha1-kl0mAdOaxIXgkc8NpcbmlNw9yv8=" }, + "retry": { + "version": "0.13.1", + "resolved": "https://registry.npmjs.org/retry/-/retry-0.13.1.tgz", + "integrity": "sha512-XQBQ3I8W1Cge0Seh+6gjj03LbmRFWuoszgK9ooCpwYIrhhoO80pfq4cUkU5DkknwfOfFteRwlZ56PYOGYyFWdg==" + }, "safe-buffer": { "version": "5.2.1", "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.2.1.tgz", @@ -1836,6 +3215,15 @@ "resolved": "https://registry.npmjs.org/setprototypeof/-/setprototypeof-1.2.0.tgz", "integrity": "sha512-E5LDX7Wrp85Kil5bhZv46j8jOeboKq5JMmYM3gVGdGH8xFpPWXUMsNrlODCrkoxMEeNi/XZIwuRvY4XNwYMJpw==" }, + "sha.js": { + "version": "2.4.11", + "resolved": "https://registry.npmjs.org/sha.js/-/sha.js-2.4.11.tgz", + "integrity": "sha512-QMEp5B7cftE7APOjk5Y6xgrbWu+WkLVQwk8JNjZ8nKRciZaByEW6MubieAiToS7+dwvrjGhH8jRXz3MVd0AYqQ==", + "requires": { + "inherits": "^2.0.1", + "safe-buffer": "^5.0.1" + } + }, "side-channel": { "version": "1.0.6", "resolved": "https://registry.npmjs.org/side-channel/-/side-channel-1.0.6.tgz", @@ -1891,11 +3279,21 @@ "resolved": "https://registry.npmjs.org/toidentifier/-/toidentifier-1.0.1.tgz", "integrity": "sha512-o5sSPKEkg/DIQNmH43V0/uerLrpzVedkUh8tGNvaeXpfpuwjKenlSox/2O/BTlZUtEe+JG7s5YhEz608PlAHRA==" }, + "tr46": { + "version": "0.0.3", + "resolved": "https://registry.npmjs.org/tr46/-/tr46-0.0.3.tgz", + "integrity": "sha512-N3WMsuqV66lT30CrXNbEjx4GEwlow3v6rr4mCcv6prnfwhS01rkgyFdjPNBYd9br7LpXV1+Emh01fHnq2Gdgrw==" + }, "triple-beam": { "version": "1.4.1", "resolved": "https://registry.npmjs.org/triple-beam/-/triple-beam-1.4.1.tgz", "integrity": "sha512-aZbgViZrg1QNcG+LULa7nhZpJTZSLm/mXnHXnbAbjmN5aSa0y7V+wvv6+4WaBtpISJzThKy+PIPxc1Nq1EJ9mg==" }, + "tslib": { + "version": "2.8.1", + "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.8.1.tgz", + "integrity": "sha512-oJFu94HQb+KVduSUQL7wnpmqnfmLsOA/nAh6b6EH0wCEoK0/mPeXU6c3wKDV83MkOuHPRHtSXKKU99IBazS/2w==" + }, "type-is": { "version": "1.6.18", "resolved": "https://registry.npmjs.org/type-is/-/type-is-1.6.18.tgz", @@ -1925,11 +3323,40 @@ "resolved": "https://registry.npmjs.org/utils-merge/-/utils-merge-1.0.1.tgz", "integrity": "sha1-n5VxD1CiZ5R7LMwSR0HBAoQn5xM=" }, + "uuid": { + "version": "9.0.1", + "resolved": "https://registry.npmjs.org/uuid/-/uuid-9.0.1.tgz", + "integrity": "sha512-b+1eJOlsR9K8HJpow9Ok3fiWOWSIcIzXodvv0rQjVoOVNpWMpxf1wZNpt4y9h10odCNrqnYp1OBzRktckBe3sA==" + }, + "value-or-promise": { + "version": "1.0.11", + "resolved": "https://registry.npmjs.org/value-or-promise/-/value-or-promise-1.0.11.tgz", + "integrity": "sha512-41BrgH+dIbCFXClcSapVs5M6GkENd3gQOJpEfPDNa71LsUGMXDL0jMWpI/Rh7WhX+Aalfz2TTS3Zt5pUsbnhLg==" + }, "vary": { "version": "1.1.2", "resolved": "https://registry.npmjs.org/vary/-/vary-1.1.2.tgz", "integrity": "sha1-IpnwLG3tMNSllhsLn3RSShj2NPw=" }, + "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==" + }, + "whatwg-mimetype": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/whatwg-mimetype/-/whatwg-mimetype-3.0.0.tgz", + "integrity": "sha512-nt+N2dzIutVRxARx1nghPKGv1xHikU7HKdfafKkLNLindmPU/ch3U31NOCGGA/dmPcmb1VlofO0vnKAcsm0o/Q==" + }, + "whatwg-url": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/whatwg-url/-/whatwg-url-5.0.0.tgz", + "integrity": "sha512-saE57nupxk6v3HY35+jzBwYa0rKSy0XR8JSxZPwgLr7ys0IBzhGviA1/TUGJLmSVqs8pb9AnvICXEuOHLprYTw==", + "requires": { + "tr46": "~0.0.3", + "webidl-conversions": "^3.0.0" + } + }, "winston": { "version": "3.11.0", "resolved": "https://registry.npmjs.org/winston/-/winston-3.11.0.tgz", @@ -1957,6 +3384,20 @@ "readable-stream": "^3.6.0", "triple-beam": "^1.3.0" } + }, + "xss": { + "version": "1.0.15", + "resolved": "https://registry.npmjs.org/xss/-/xss-1.0.15.tgz", + "integrity": "sha512-FVdlVVC67WOIPvfOwhoMETV72f6GbW7aOabBC3WxN/oUdoEMDyLz4OgRv5/gck2ZeNqEQu+Tb0kloovXOfpYVg==", + "requires": { + "commander": "^2.20.3", + "cssfilter": "0.0.10" + } + }, + "yallist": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/yallist/-/yallist-4.0.0.tgz", + "integrity": "sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A==" } } } diff --git a/test-produsent/server/package.json b/test-produsent/server/package.json index 2c3586983..65e128d46 100644 --- a/test-produsent/server/package.json +++ b/test-produsent/server/package.json @@ -5,7 +5,9 @@ "type": "module", "main": "server.js", "dependencies": { + "apollo-server-express": "^3.13.0", "express": "^4.21.0", + "graphql": "^16.9.0", "http-proxy-middleware": "3.0.3", "winston": "3.11.0" }, diff --git a/test-produsent/server/server.js b/test-produsent/server/server.js index 6012e9039..92ea5091d 100644 --- a/test-produsent/server/server.js +++ b/test-produsent/server/server.js @@ -7,7 +7,10 @@ import httpProxyMiddleware, { } from 'http-proxy-middleware'; import {createLogger, format, transports} from 'winston'; import {fetchAccessToken} from "./accessToken.js"; +import fs from "fs"; +import require from "./esm-require.js"; +const {ApolloServer, gql} = require('apollo-server-express'); const {createProxyMiddleware} = httpProxyMiddleware; const { @@ -77,13 +80,9 @@ const loggerPlugin = (proxyServer, options) => { log.info(`Frackend startup: ${JSON.stringify({NAIS_CLUSTER_NAME, GIT_COMMIT})}`); let BUILD_PATH = path.join(process.cwd(), '../build'); -let GRAPHQL_ENDPOINT = 'http://notifikasjon-produsent-api/api/graphql' -if (NAIS_CLUSTER_NAME === 'local') { - GRAPHQL_ENDPOINT = 'https://notifikasjon-fake-produsent-api.ekstern.dev.nav.no/api/graphql' -} +const GRAPHQL_ENDPOINT = 'http://notifikasjon-produsent-api/api/graphql' const main = async () => { - let appReady = false; const app = express(); app.disable('x-powered-by'); @@ -101,23 +100,37 @@ const main = async () => { ], }; - app.use( - '/notifikasjon-produsent-api', - async (req, res, next) => { - try { - const accessToken = await fetchAccessToken(); - req.headers.authorization = `Bearer ${accessToken}`; - next(); - } catch (err) { - next(err); - } - }, - createProxyMiddleware({ - ...proxyOptions, - pathRewrite: {'^/': ''}, - target: GRAPHQL_ENDPOINT, - }) - ); + if (NAIS_CLUSTER_NAME === 'local') { + const sdl = fs.readFileSync('../../app/src/main/resources/produsent.graphql'); + const typeDefs = gql(sdl.toString()); + const server = new ApolloServer({ + typeDefs, + mocks: { + ISO8601DateTime: () => new Date().toISOString(), + }, + }); + await server.start(); + log.info("🤖🤖 Started local mock ApolloServer, all responses are fake 🤖🤖"); + server.applyMiddleware({app, path: '/notifikasjon-produsent-api'}); + } else { + app.use( + '/notifikasjon-produsent-api', + async (req, res, next) => { + try { + const accessToken = await fetchAccessToken(); + req.headers.authorization = `Bearer ${accessToken}`; + next(); + } catch (err) { + next(err); + } + }, + createProxyMiddleware({ + ...proxyOptions, + pathRewrite: {'^/': ''}, + target: GRAPHQL_ENDPOINT, + }) + ); + } app.get('/ok', (req, res) => res.sendStatus(200)); app.use('/', express.static(BUILD_PATH, { maxAge: '1h' })); diff --git a/test-produsent/src/App.tsx b/test-produsent/src/App.tsx index 42cf95972..70b80ee76 100644 --- a/test-produsent/src/App.tsx +++ b/test-produsent/src/App.tsx @@ -1,9 +1,9 @@ import {ApolloClient, ApolloProvider, InMemoryCache} from '@apollo/client'; -import {Button, Heading, TextField} from "@navikt/ds-react"; +import {Box, Button, Heading, TextField, VStack} from "@navikt/ds-react"; import "@navikt/ds-css"; import "./App.css" -import React, {ReactNode} from "react"; -import {alleKomponenter, komponenter} from "./Komponenter/Komponenter"; +import React from "react"; +import {alleKomponenter, komponenter, KomponentNavn} from "./Komponenter/Komponenter"; import shipit from "./assets/shipit.png" const client = new ApolloClient({ @@ -14,7 +14,7 @@ const client = new ApolloClient({ export const GrupperingsidContext = React.createContext("") function App() { - const [valgtKomponent, setValgtKomponent] = React.useState(Object.values(komponenter)[0]) + const [valgtKomponent, setValgtKomponent] = React.useState(alleKomponenter[0]) const [grupperingsid, setGrupperingsid] = React.useState(() => crypto.randomUUID()) @@ -50,16 +50,24 @@ function App() {
- {valgtKomponent} + + + {valgtKomponent} + + + + {komponenter[valgtKomponent]} + +
diff --git a/test-produsent/src/Komponenter/EksternVarsling.tsx b/test-produsent/src/Komponenter/EksternVarsling.tsx index bf433982f..5bf7e4266 100644 --- a/test-produsent/src/Komponenter/EksternVarsling.tsx +++ b/test-produsent/src/Komponenter/EksternVarsling.tsx @@ -104,7 +104,7 @@ export const EksternVarsel = React.forwardRef((_props, ref) => { : null} {eksternVarsel !== "Ingen" ? : null} + defaultValue={new Date().toISOString().replace(/\..+/, '')}/> : null} }); diff --git "a/test-produsent/src/Komponenter/EndreP\303\245minnelseOppgave.tsx" "b/test-produsent/src/Komponenter/EndreP\303\245minnelseOppgave.tsx" index 4956c08e3..4f2727574 100644 --- "a/test-produsent/src/Komponenter/EndreP\303\245minnelseOppgave.tsx" +++ "b/test-produsent/src/Komponenter/EndreP\303\245minnelseOppgave.tsx" @@ -68,7 +68,7 @@ export const EndrePåminnelseOppgave = () => { data, loading, error, - }] = useMutation>(queryType === 'Oppgave-id' ? ENDRE_PAAMINNELSE_OPPGAVE : ENDRE_PAAMINNELSE_OPPGAVE_EKSTERN_ID); + }] = useMutation>(queryType === 'Oppgave-id' ? ENDRE_PAAMINNELSE_OPPGAVE : ENDRE_PAAMINNELSE_OPPGAVE_EKSTERN_ID); const handleSend = () => { diff --git a/test-produsent/src/Komponenter/KalenderAvtale.tsx b/test-produsent/src/Komponenter/KalenderAvtale.tsx index 61f3e885a..2609d0523 100644 --- a/test-produsent/src/Komponenter/KalenderAvtale.tsx +++ b/test-produsent/src/Komponenter/KalenderAvtale.tsx @@ -26,6 +26,7 @@ import { formateEksternVarsel, formaterPåminnelse, } from "./EksternVarsling.tsx"; +import {MottakerInput, MottakerRef} from "./MottakerInput.tsx"; const NY_KALENDERAVTALE = gql` mutation ( @@ -40,9 +41,10 @@ const NY_KALENDERAVTALE = gql` $paaminnelse: PaaminnelseInput $lokasjon: LokasjonInput $erDigitalt: Boolean + $mottaker: MottakerInput! ) { nyKalenderavtale( - mottakere: [{ altinn: { serviceCode: "4936", serviceEdition: "1" } }] + mottakere: [$mottaker] virksomhetsnummer: $virksomhetsnummer grupperingsid: $grupperingsid eksternId: $eksternId @@ -93,14 +95,15 @@ export const NyKalenderAvtale: FunctionComponent = () => { const lokasjonRef = React.useRef(null); const lenkeRef = React.useRef(null); const merkelappRef = React.useRef(null); - const eksternVarselRef = React.useRef(null); + const mottakerRef = React.useRef(null); const handleSend = () => { nyKalenderavtale({ variables: { grupperingsid: nullIfEmpty(grupperingsidRef.current?.value), virksomhetsnummer: nullIfEmpty(virksomhetsnummerRef.current?.value), + mottaker: mottakerRef.current?.hentMottaker(), eksternId: nullIfEmpty(eksternIdRef.current?.value), lenke: nullIfEmpty(lenkeRef.current?.value), tekst: nullIfEmpty(tekstRef.current?.value), @@ -142,6 +145,7 @@ export const NyKalenderAvtale: FunctionComponent = () => { ref={virksomhetsnummerRef} defaultValue="910825526" /> + { ref={merkelappRef} defaultValue="fager" /> - + Mottaker | null } + +export const MottakerInput = forwardRef((_props, ref) => { + const [mottakerType, setMottakerType] = useState("altinn"); + const altinn = { + serviceCode: "4936", + serviceEdition: "1" + } + const altinnRessurs = { + ressursId: "test-fager", + } + const naermesteLeder = { + ansattFnr: "42", + naermesteLederFnr: "16120101181", + } + useImperativeHandle(ref, () => ({ + hentMottaker: () => { + if (mottakerType === "altinn") { + return { altinn } + } else if (mottakerType === "altinnRessurs") { + return { altinnRessurs } + } else if (mottakerType === "naermesteLeder") { + return { naermesteLeder } + } else { + return null + } + } + }), [mottakerType]); + + return
+ setMottakerType(value as MottakerInputType)} + label="Mottaker"> + altinn + altinnRessurs + naermesteLeder + + {mottakerType === "altinn" ? <> + + + : null} + {mottakerType === "altinnRessurs" ? <> + + : null} + {mottakerType === "naermesteLeder" ? <> + + + : null} +
+}); diff --git a/test-produsent/src/Komponenter/NyBeskjed.tsx b/test-produsent/src/Komponenter/NyBeskjed.tsx index 7345aba4d..0ae92f42d 100644 --- a/test-produsent/src/Komponenter/NyBeskjed.tsx +++ b/test-produsent/src/Komponenter/NyBeskjed.tsx @@ -8,6 +8,7 @@ import {darcula} from "react-syntax-highlighter/dist/esm/styles/prism"; import {print} from "graphql/language"; import {Button, TextField} from "@navikt/ds-react"; import {EksternVarsel, formateEksternVarsel} from "./EksternVarsling.tsx"; +import {MottakerInput, MottakerRef} from "./MottakerInput.tsx"; const NY_BESKJED = gql` mutation ( @@ -69,7 +70,7 @@ export const NyBeskjed: React.FunctionComponent = () => { const lenkeRef = React.useRef(null); const eksternIdRef = React.useRef(null); const eksternVarselRef = React.useRef(null); - + const mottakerRef = React.useRef(null); useEffect(() => { if (grupperingsidRef.current !== null) { @@ -85,6 +86,7 @@ export const NyBeskjed: React.FunctionComponent = () => { variables: { grupperingsid: nullIfEmpty(grupperingsidRef.current?.value), virksomhetsnummer: nullIfEmpty(virksomhetsnummerRef.current?.value), + mottaker: mottakerRef.current?.hentMottaker(), tekst: nullIfEmpty(tekstRef.current?.value), merkelapp: nullIfEmpty(merkelappRef.current?.value), lenke: lenkeRef.current?.value ?? "", @@ -108,6 +110,7 @@ export const NyBeskjed: React.FunctionComponent = () => {
+ diff --git a/test-produsent/src/Komponenter/NyOppgave.tsx b/test-produsent/src/Komponenter/NyOppgave.tsx index a03b942a6..7b60f5fc2 100644 --- a/test-produsent/src/Komponenter/NyOppgave.tsx +++ b/test-produsent/src/Komponenter/NyOppgave.tsx @@ -8,6 +8,7 @@ import {Prism as SyntaxHighlighter} from 'react-syntax-highlighter'; import {darcula} from 'react-syntax-highlighter/dist/esm/styles/prism'; import {GrupperingsidContext} from "../App.tsx"; import {EksternVarsel, formateEksternVarsel} from "./EksternVarsling.tsx"; +import {MottakerRef, MottakerInput} from "./MottakerInput.tsx"; const NY_OPPGAVE = gql` mutation ( @@ -15,6 +16,8 @@ const NY_OPPGAVE = gql` $virksomhetsnummer: String! $lenke: String! $tekst: String! + $merkelapp: String! + $mottaker: MottakerInput! $frist: ISO8601Date $eksternId: String! $opprettetTidspunkt: ISO8601DateTime @@ -23,15 +26,10 @@ const NY_OPPGAVE = gql` ) { nyOppgave( nyOppgave: { - mottakere: [{ - altinn: { - serviceCode: "4936" - serviceEdition: "1" - } - }] + mottakere: [$mottaker] frist: $frist notifikasjon: { - merkelapp: "fager" + merkelapp: $merkelapp lenke: $lenke tekst: $tekst } @@ -74,6 +72,7 @@ export const NyOppgave: React.FunctionComponent = () => { const eksternIdRef = React.useRef(null); const paaminnelseRef = React.useRef(null); const eksternVarselRef = React.useRef(null); + const mottakerRef = React.useRef(null); const [harPaaminnelse, setHarPaaminnelse] = React.useState(false); @@ -91,6 +90,7 @@ export const NyOppgave: React.FunctionComponent = () => { variables: { grupperingsid: nullIfEmpty(grupperingsidRef.current?.value), virksomhetsnummer: nullIfEmpty(virksomhetsnummerRef.current?.value), + mottaker: mottakerRef.current?.hentMottaker(), lenke: lenkeRef.current?.value ?? "", tekst: nullIfEmpty(tekstRef.current?.value), eksternId: nullIfEmpty(eksternIdRef.current?.value), @@ -118,6 +118,7 @@ export const NyOppgave: React.FunctionComponent = () => {
+ diff --git a/test-produsent/src/Komponenter/NySak.tsx b/test-produsent/src/Komponenter/NySak.tsx index 76dcb9372..c36638dce 100644 --- a/test-produsent/src/Komponenter/NySak.tsx +++ b/test-produsent/src/Komponenter/NySak.tsx @@ -7,11 +7,13 @@ import cssClasses from "./KalenderAvtale.module.css"; import {Prism as SyntaxHighlighter} from 'react-syntax-highlighter'; import {darcula} from 'react-syntax-highlighter/dist/esm/styles/prism'; import {GrupperingsidContext} from "../App.tsx"; +import {MottakerInput, MottakerRef} from "./MottakerInput.tsx"; const NY_SAK = gql` mutation ( $grupperingsid: String! $virksomhetsnummer: String! + $mottaker: MottakerInput! $lenke: String $tittel: String! $merkelapp: String! @@ -20,12 +22,7 @@ const NY_SAK = gql` $tilleggsinformasjon: String ) { nySak( - mottakere: [{ - altinn: { - serviceCode: "4936" - serviceEdition: "1" - } - }] + mottakere: [$mottaker] virksomhetsnummer: $virksomhetsnummer, grupperingsid: $grupperingsid lenke: $lenke @@ -58,6 +55,7 @@ export const NySak: React.FunctionComponent = () => { const initiellStatusRef = React.useRef(null) const nesteStegRef = React.useRef(null) const tilleggsinformasjonRef = React.useRef(null) + const mottakerRef = React.useRef(null); const [nySak, { data, @@ -80,6 +78,7 @@ export const NySak: React.FunctionComponent = () => { variables: { grupperingsid: nullIfEmpty(grupperingsidRef.current?.value), virksomhetsnummer: nullIfEmpty(virksomhetsnummerRef.current?.value), + mottaker: mottakerRef.current?.hentMottaker(), eksternId: nullIfEmpty(eksternIdRef.current?.value), lenke: nullIfEmpty(lenkeRef.current?.value), tittel: nullIfEmpty(tittelRef.current?.value), @@ -100,6 +99,7 @@ export const NySak: React.FunctionComponent = () => {
+ diff --git a/test-produsent/src/api/graphql-types.ts b/test-produsent/src/api/graphql-types.ts index 6300b01d9..43ae14d18 100644 --- a/test-produsent/src/api/graphql-types.ts +++ b/test-produsent/src/api/graphql-types.ts @@ -41,18 +41,40 @@ export type AltinnMottaker = { }; /** - * Spesifiser mottaker ved hjelp av tilganger i Altinn. Enhver som har den gitte tilgangen vil + * Spesifiser mottaker ved hjelp av tilganger i Altinn 2. Enhver som har den gitte tilgangen vil * kunne se notifikasjone. * * Tilgangssjekken utføres hver gang en bruker ser på notifikasjoner. Det betyr at hvis en - * bruker mister en Altinn-tilgang, så vil de hverken se historiske eller nye notifikasjone knyttet til den Altinn-tilgangen. - * Og motsatt, hvis en bruker får en Altinn-tilgang, vil de se tidligere notifikasjoner for den Altinn-tilgangen. + * bruker mister en Altinn 2-tilgang, så vil de hverken se historiske eller nye notifikasjone knyttet til den Altinn 2-tilgangen. + * Og motsatt, hvis en bruker får en Altinn 2-tilgang, vil de se tidligere notifikasjoner for den Altinn2-tilgangen. + * + * Altinn 2 skal avvikles innen juni 2026, og denne mottakeren vil da også forsvinne. Vi anbefaler å migrere til Altinn 3, og ta i bruk + * AltinnRessursMottakerInput. Når dere migrerer til Altinn3 kan vi sørge for at brukere fortsatt får tilgang til gamle saker og notifikasjoner, så lenge vi blir informert + * om hvilke Altinn 3 ressurser som tilsvarer hvilke Altinn 2 tjenester. Ta gjerne kontakt med oss og gi beskjed. */ export type AltinnMottakerInput = { serviceCode: Scalars['String']['input']; serviceEdition: Scalars['String']['input']; }; +export type AltinnRessursMottaker = { + __typename?: 'AltinnRessursMottaker'; + ressursId: Scalars['String']['output']; + virksomhetsnummer: Scalars['String']['output']; +}; + +/** + * Spesifiser mottaker ved hjelp av tilganger i Altinn 3. Enhver som har den gitte tilgangen vil + * kunne se notifikasjone. + * + * Tilgangssjekken utføres hver gang en bruker ser på notifikasjoner. Det betyr at hvis en + * bruker mister en Altinn 3-tilgang, så vil de hverken se historiske eller nye notifikasjone knyttet til den Altinn 3-tilgangen. + * Og motsatt, hvis en bruker får en Altinn 3-tilgang, vil de se tidligere notifikasjoner for den Altinn2-tilgangen. + */ +export type AltinnRessursMottakerInput = { + ressursId: Scalars['String']['input']; +}; + export type AltinntjenesteMottakerInput = { serviceCode: Scalars['String']['input']; serviceEdition: Scalars['String']['input']; @@ -364,7 +386,7 @@ export type MetadataInput = { export type MineNotifikasjonerResultat = NotifikasjonConnection | UgyldigMerkelapp | UkjentProdusent; -export type Mottaker = AltinnMottaker | NaermesteLederMottaker; +export type Mottaker = AltinnMottaker | AltinnRessursMottaker | NaermesteLederMottaker; /** * Hvem som skal se notifikasjonen. @@ -375,6 +397,7 @@ export type Mottaker = AltinnMottaker | NaermesteLederMottaker; */ export type MottakerInput = { altinn?: InputMaybe; + altinnRessurs?: InputMaybe; naermesteLeder?: InputMaybe; }; @@ -437,22 +460,30 @@ export type Mutation = { * Dette gjelder også hvis dere gjør kallet uten å oppgi noen nye verdier. */ oppdaterKalenderavtaleByEksternId: OppdaterKalenderavtaleResultat; - /** TODO: skriv beskrivelse */ - oppgaveEndrePaaminnelse?: Maybe; - /** TODO: skriv beskrivelse */ - oppgaveEndrePaaminnelseByExternId?: Maybe; - /** Marker en oppgave (identifisert ved id) som utført. */ + /** + * Endre påminnelsen for en oppgave. + * Dersom oppgaven har en eksisterende påminnelse, vil denne bli overskrevet. Eksterne varsler blir også overskrevet + * For fjerning av påminnelse, kan man send inn null + */ + oppgaveEndrePaaminnelse: OppgaveEndrePaaminnelseResultat; + /** + * Endre påminnelsen for en oppgave (identifisert ved ekstern id) + * Dersom oppgaven har en eksisterende påminnelse, vil denne bli overskrevet. Eksterne varsler blir også overskrevet + * For fjerning av påminnelse, kan man send inn null + */ + oppgaveEndrePaaminnelseByEksternId: OppgaveEndrePaaminnelseResultat; + /** Marker en oppgave (identifisert ved id) som utført. Dersom oppgaven har påminnelse, vil denne og eventuelle eksterne varsler på påminnelsen bli kansellert. */ oppgaveUtfoert: OppgaveUtfoertResultat; /** - * Marker en oppgave (identifisert ved ekstern id) som utført. + * Marker en oppgave (identifisert ved ekstern id) som utført. Dersom oppgaven har påminnelse, vil denne og eventuelle eksterne varsler på påminnelsen bli kansellert. * @deprecated Using the type ID for `eksternId` can lead to unexpected behaviour. Use oppgaveUtfoertByEksternId_V2 instead. */ oppgaveUtfoertByEksternId: OppgaveUtfoertResultat; - /** Marker en oppgave (identifisert ved ekstern id) som utført. */ + /** Marker en oppgave (identifisert ved ekstern id) som utført. Dersom oppgaven har påminnelse, vil denne og eventuelle eksterne varsler på påminnelsen bli kansellert. */ oppgaveUtfoertByEksternId_V2: OppgaveUtfoertResultat; - /** Marker en oppgave (identifisert ved id) som utgått. */ + /** Marker en oppgave (identifisert ved id) som utgått. Dersom oppgaven har påminnelse, vil denne og eventuelle eksterne varsler på påminnelsen bli kansellert. */ oppgaveUtgaatt: OppgaveUtgaattResultat; - /** Marker en oppgave (identifisert ved ekstern id) som utgått. */ + /** Marker en oppgave (identifisert ved ekstern id) som utgått. Dersom oppgaven har påminnelse, vil denne og eventuelle eksterne varsler på påminnelsen bli kansellert. */ oppgaveUtgaattByEksternId: OppgaveUtgaattResultat; /** * Utsett frist på en oppgave. @@ -711,6 +742,7 @@ export type MutationOppdaterKalenderavtaleByEksternIdArgs = { */ export type MutationOppgaveEndrePaaminnelseArgs = { id: Scalars['ID']['input']; + idempotencyKey?: InputMaybe; paaminnelse?: InputMaybe; }; @@ -719,8 +751,9 @@ export type MutationOppgaveEndrePaaminnelseArgs = { * Dette er roten som alle endringer ("mutations") starter fra. Endringer inkluderer også * å opprette nye ting. */ -export type MutationOppgaveEndrePaaminnelseByExternIdArgs = { +export type MutationOppgaveEndrePaaminnelseByEksternIdArgs = { eksternId: Scalars['String']['input']; + idempotencyKey?: InputMaybe; merkelapp: Scalars['String']['input']; paaminnelse?: InputMaybe; }; @@ -1209,10 +1242,7 @@ export type PaaminnelseResultat = { }; export type PaaminnelseTidspunktInput = { - /** - * Relativ til når oppgaven/kalenderavtalen er angitt som opprettet. Altså X duration etter opprettelse. - * Ved utsatt frist er den relativ til tidspunktet fristen ble utsatt. - */ + /** Relativ til når oppgaven/kalenderavtalen er angitt som opprettet. Altså X duration etter opprettelse. */ etterOpprettelse?: InputMaybe; /** Relativ til oppgavens frist, altså X duration før frist. Anses som ugyldig dersom det ikke er en oppgave med frist. */ foerFrist?: InputMaybe; @@ -1365,6 +1395,11 @@ export enum Sendevindu { export type SmsKontaktInfoInput = { /** deprecated. value is ignored. */ fnr?: InputMaybe; + /** + * Må være et gyldig norsk mobilnummer. Kan inneholde landkode på format +47 eller 0047. + * Nummeret må være gyldig iht norske mobilnummer-regler (40000000-49999999, 90000000-99999999) + * se https://nkom.no/telefoni-og-telefonnummer/telefonnummer-og-den-norske-nummerplan/alle-nummerserier-for-norske-telefonnumre + */ tlf: Scalars['String']['input']; }; From 7581ab964e44d38916198a602899f3df6972b492 Mon Sep 17 00:00:00 2001 From: Ken Gullaksen Date: Tue, 19 Nov 2024 08:22:07 +0100 Subject: [PATCH 7/9] =?UTF-8?q?en=20til=20test=20p=C3=A5=20ressurs=20motta?= =?UTF-8?q?ker?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../arbeidsgiver/notifikasjon/bruker/QuerySakerTests.kt | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/app/src/test/kotlin/no/nav/arbeidsgiver/notifikasjon/bruker/QuerySakerTests.kt b/app/src/test/kotlin/no/nav/arbeidsgiver/notifikasjon/bruker/QuerySakerTests.kt index f4f40c155..8d47cca47 100644 --- a/app/src/test/kotlin/no/nav/arbeidsgiver/notifikasjon/bruker/QuerySakerTests.kt +++ b/app/src/test/kotlin/no/nav/arbeidsgiver/notifikasjon/bruker/QuerySakerTests.kt @@ -56,11 +56,11 @@ class QuerySakerTests : DescribeSpec({ context("med sak og status") { val (brukerRepository, engine) = setupRepoOgEngine() val sakOpprettet = brukerRepository.sakOpprettet( - virksomhetsnummer = "42", + virksomhetsnummer = "43", grupperingsid = "42", merkelapp = "tag", lenke = null, - mottakere = listOf(AltinnMottaker("5441", "1", "42")), + mottakere = listOf(AltinnRessursMottaker("43", "nav_test_foo-ressursid")), oppgittTidspunkt = OffsetDateTime.parse("2021-01-01T13:37:00Z"), mottattTidspunkt = OffsetDateTime.now(), ) @@ -73,7 +73,9 @@ class QuerySakerTests : DescribeSpec({ idempotensKey = IdempotenceKey.initial(), ) - val response = engine.hentSaker() + val response = engine.hentSaker( + virksomhetsnumre = listOf("43"), + ) it("response inneholder riktig data for sak") { val sak = response.getTypedContent("saker/saker/0") From 97a3bcb211cfff1b71a6df0b10c5ba64d0e2899e Mon Sep 17 00:00:00 2001 From: Ken Gullaksen Date: Tue, 19 Nov 2024 10:00:03 +0100 Subject: [PATCH 8/9] fiks hardkodet mottaker --- test-produsent/src/Komponenter/KalenderAvtale.tsx | 2 +- test-produsent/src/Komponenter/NyBeskjed.tsx | 8 ++------ test-produsent/src/Komponenter/NyOppgave.tsx | 2 +- 3 files changed, 4 insertions(+), 8 deletions(-) diff --git a/test-produsent/src/Komponenter/KalenderAvtale.tsx b/test-produsent/src/Komponenter/KalenderAvtale.tsx index 2609d0523..3668f65c5 100644 --- a/test-produsent/src/Komponenter/KalenderAvtale.tsx +++ b/test-produsent/src/Komponenter/KalenderAvtale.tsx @@ -32,6 +32,7 @@ const NY_KALENDERAVTALE = gql` mutation ( $grupperingsid: String! $virksomhetsnummer: String! + $mottaker: MottakerInput! $eksternId: String! $lenke: String! $tekst: String! @@ -41,7 +42,6 @@ const NY_KALENDERAVTALE = gql` $paaminnelse: PaaminnelseInput $lokasjon: LokasjonInput $erDigitalt: Boolean - $mottaker: MottakerInput! ) { nyKalenderavtale( mottakere: [$mottaker] diff --git a/test-produsent/src/Komponenter/NyBeskjed.tsx b/test-produsent/src/Komponenter/NyBeskjed.tsx index 0ae92f42d..212433d27 100644 --- a/test-produsent/src/Komponenter/NyBeskjed.tsx +++ b/test-produsent/src/Komponenter/NyBeskjed.tsx @@ -14,6 +14,7 @@ const NY_BESKJED = gql` mutation ( $grupperingsid: String! $virksomhetsnummer: String! + $mottaker: MottakerInput! $lenke: String! $tekst: String! $eksternId: String! @@ -23,12 +24,7 @@ const NY_BESKJED = gql` ) { nyBeskjed( nyBeskjed: { - mottakere: [{ - altinn: { - serviceCode: "4936" - serviceEdition: "1" - } - }] + mottakere: [$mottaker] notifikasjon: { merkelapp: $merkelapp lenke: $lenke diff --git a/test-produsent/src/Komponenter/NyOppgave.tsx b/test-produsent/src/Komponenter/NyOppgave.tsx index 7b60f5fc2..e9d3b7c84 100644 --- a/test-produsent/src/Komponenter/NyOppgave.tsx +++ b/test-produsent/src/Komponenter/NyOppgave.tsx @@ -14,10 +14,10 @@ const NY_OPPGAVE = gql` mutation ( $grupperingsid: String! $virksomhetsnummer: String! + $mottaker: MottakerInput! $lenke: String! $tekst: String! $merkelapp: String! - $mottaker: MottakerInput! $frist: ISO8601Date $eksternId: String! $opprettetTidspunkt: ISO8601DateTime From 4f91ad344382c28b8c38dea59b5463620ff957ae Mon Sep 17 00:00:00 2001 From: Ken Gullaksen Date: Tue, 19 Nov 2024 10:56:19 +0100 Subject: [PATCH 9/9] fjern esm require --- fake-produsent-api/server/esm-require.js | 9 --------- fake-produsent-api/server/server.js | 5 ++--- test-produsent/server/esm-require.js | 9 --------- test-produsent/server/server.js | 3 +-- 4 files changed, 3 insertions(+), 23 deletions(-) delete mode 100644 fake-produsent-api/server/esm-require.js delete mode 100644 test-produsent/server/esm-require.js diff --git a/fake-produsent-api/server/esm-require.js b/fake-produsent-api/server/esm-require.js deleted file mode 100644 index b6f810198..000000000 --- a/fake-produsent-api/server/esm-require.js +++ /dev/null @@ -1,9 +0,0 @@ -import {createRequire} from 'module'; - -/** - * en liten hack for å importere pakker som ikke er kompatible med ESM. - * som f.eks. prometheus-api-metrics - * - * med inspirasjon fra: https://github.com/sindresorhus/meow/pull/147/files - */ -export default (module) => createRequire(import.meta.url)(module); \ No newline at end of file diff --git a/fake-produsent-api/server/server.js b/fake-produsent-api/server/server.js index 1fa868e05..3c9aa168e 100644 --- a/fake-produsent-api/server/server.js +++ b/fake-produsent-api/server/server.js @@ -2,15 +2,14 @@ import fs from 'fs' import express from 'express'; import casual from 'casual'; import {createLogger, transports, format} from 'winston'; -import require from "./esm-require.js"; +import {ApolloServerPluginLandingPageGraphQLPlayground} from "apollo-server-core"; +import {ApolloServer, gql} from 'apollo-server-express'; const { PORT = 8080, ALWAYS_SUCCESSFUL_RESPONSE = 'false', } = process.env; -const {ApolloServerPluginLandingPageGraphQLPlayground} = require("apollo-server-core"); -const {ApolloServer, gql} = require('apollo-server-express'); const successfulMocks = { HardDeleteNotifikasjonResultat: () => ({__typename: "HardDeleteNotifikasjonVellykket"}), diff --git a/test-produsent/server/esm-require.js b/test-produsent/server/esm-require.js deleted file mode 100644 index b6f810198..000000000 --- a/test-produsent/server/esm-require.js +++ /dev/null @@ -1,9 +0,0 @@ -import {createRequire} from 'module'; - -/** - * en liten hack for å importere pakker som ikke er kompatible med ESM. - * som f.eks. prometheus-api-metrics - * - * med inspirasjon fra: https://github.com/sindresorhus/meow/pull/147/files - */ -export default (module) => createRequire(import.meta.url)(module); \ No newline at end of file diff --git a/test-produsent/server/server.js b/test-produsent/server/server.js index 92ea5091d..8e60d82dd 100644 --- a/test-produsent/server/server.js +++ b/test-produsent/server/server.js @@ -8,9 +8,8 @@ import httpProxyMiddleware, { import {createLogger, format, transports} from 'winston'; import {fetchAccessToken} from "./accessToken.js"; import fs from "fs"; -import require from "./esm-require.js"; +import {ApolloServer, gql} from 'apollo-server-express'; -const {ApolloServer, gql} = require('apollo-server-express'); const {createProxyMiddleware} = httpProxyMiddleware; const {